1import{u as y,h as k,r as N,j as e,d as b,b as c,E as C,e as g,A as I,f as p}from"./index-BnbUY42c.js";import{I as n}from"./IssuerShell-Cna3YDi_.js";import{h as m}from"./Certificate-BMrvtQO8.js";import"./LanguageSwitch-DbqlIf1o.js";import"./BrandMark-BSqVbc6d.js";import"./QrKod-Bin5V9Cl.js";function D(){const{m:a,locale:l}=y(),s=a.app.proofs,{data:d,error:f,isLoading:x,reload:v}=k("/v1/proof"),[h,j]=N.useState("");function _(i){return i.revoked_at!==null?{ad:"revoked",etiket:s.revoked,tone:"critical"}:i.expires_at!==null&&new Date(i.expires_at)<new Date?{ad:"expired",etiket:s.expired,tone:"muted"}:{ad:"valid",etiket:s.valid,tone:"positive"}}if(x)return e.jsxs(n,{aktif:"proofs",children:[e.jsx("h1",{children:s.title}),e.jsx(b,{label:s.loading})]});if(f!==null)return e.jsxs(n,{aktif:"proofs",children:[e.jsx("h1",{children:s.failTitle}),e.jsx("p",{children:s.failBody}),e.jsx("p",{children:e.jsx("code",{children:f.code})}),e.jsx(c,{variant:"secondary",onClick:v,children:a.app.dash.retry})]});const o=(d==null?void 0:d.proofs)??[];return o.length===0?e.jsxs(n,{aktif:"proofs",children:[e.jsx("h1",{children:s.title}),e.jsx(C,{title:s.emptyTitle,body:s.emptyBody,action:e.jsx(c,{as:"a",href:"/proof/new",variant:"primary",children:s.issue})})]}):e.jsxs(n,{aktif:"proofs",children:[e.jsx("h1",{children:s.title}),e.jsx("p",{className:"muted",children:g(s.count,{n:o.length})}),e.jsx(I,{label:s.issue,children:e.jsx(c,{as:"a",href:"/proof/new",variant:"primary",children:s.issue})}),e.jsxs("div",{className:"set-field v5-filter",children:[e.jsx("label",{htmlFor:"pl-filter",className:"v5-visually-hidden",children:a.v5.issuer.filter}),e.jsx("input",{id:"pl-filter",type:"search",value:h,placeholder:a.v5.issuer.filter,onChange:i=>j(i.target.value)})]}),(()=>{const i=h.trim().toLowerCase(),u=i===""?o:o.filter(r=>r.proof_id.toLowerCase().includes(i)||r.claim_type.toLowerCase().includes(i)||m(r.claim_type).toLowerCase().includes(i));return u.length===0?e.jsx("p",{className:"muted",role:"status",children:a.v5.issuer.noMatch}):e.jsx("ul",{className:"v5-proofs",children:u.map(r=>{const t=_(r);return e.jsxs("li",{"data-state":t.ad,children:[e.jsxs("div",{className:"v5-proofs__main",children:[e.jsx("span",{className:"v5-chip","data-state":t.ad==="valid"?"done":t.ad==="revoked"?"failed":void 0,children:t.etiket}),e.jsx("a",{className:"v5-proofs__title",href:`/proof/${encodeURIComponent(r.proof_id)}`,children:m(r.claim_type)}),e.jsx("code",{className:"v5-proofs__id",translate:"no",children:r.proof_id})]}),e.jsxs("div",{className:"v5-proofs__meta",children:[e.jsxs("span",{children:[a.proof.issued,": ",p(r.issued_at,l)]}),r.expires_at!==null&&e.jsxs("span",{children:[a.proof.expires,": ",p(r.expires_at,l)]}),r.revoked_at!==null&&e.jsxs("span",{children:[a.proof.sealRevoked,": ",p(r.revoked_at,l)]})]}),e.jsxs("div",{className:"v5-proofs__actions",children:[e.jsx("a",{className:"v5-btn v5-btn--secondary",href:`/proof/${encodeURIComponent(r.proof_id)}`,children:s.open}),t.ad==="valid"&&e.jsx("a",{className:"v5-btn v5-btn--primary",href:`/proof/${encodeURIComponent(r.proof_id)}/share`,children:a.v5.issuer.share})]})]},r.proof_id)})})})()]})}export{D as default}; 2//# sourceMappingURL=ProofList-UXg939vM.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.