PageSourceSearch

https://crm.virtuity.com/assets/ClientIllustrationsPage-CXRjTD1h.js

js virtuity.com collected 2026-10-05 04:00:51 UTC 6,578 bytes, 1 lines download raw bytes

1import{r as f,j as e}from"./react-vendor-DXQ86C-C.js";import{u as b}from"./query-DucsTCn7.js";import{D as N,N as y,bS as k,dc as h,ae as w,bx as g}from"./vendor-DxGOTvbs.js";import{n as P,o as v,p as D}from"./clientPortal-SQysz3Sz.js";import{b as T,c as L}from"./ClientShell-C3L-OHNB.js";import{C as S,p as z}from"./ClientLanguage-D-dwUbhc.js";import{b as C,cq as A,u as E,aP as F,S as p,aI as I,aO as B,M as O,N as U,O as $,P as q,a as V}from"./index-CzKkSRka.js";import"./pfr-presenter--l_RjT9R.js";import"./format-CJIzHqiS.js";import"./radix-CsDBrh6s.js";const M=[{key:"policyType",label:"clientPortal.illustrations.field.type"},{key:"faceAmount",label:"clientPortal.illustrations.field.deathBenefit",fmt:n},{key:"monthlyPremium",label:"clientPortal.illustrations.field.monthlyPremium",fmt:n},{key:"annualPremium",label:"clientPortal.illustrations.field.annualPremium",fmt:n},{key:"initialPremium",label:"clientPortal.illustrations.field.initialPremium",fmt:n},{key:"cashValueAtAge65",label:"clientPortal.illustrations.field.cashValue65",fmt:n},{key:"cashValueAtAge100",label:"clientPortal.illustrations.field.cashValue100",fmt:n}];function R(){const{branding:t}=V(),r=t?.logoDarkUrl??t?.logoLightUrl;return r?e.jsx("img",{src:r,alt:"",className:"h-auto max-h-12 w-auto max-w-[12rem] object-contain"}):null}function n(t){if(t==null||t==="")return"—";const r=typeof t=="number"?t:Number(t);return Number.isFinite(r)?`$${r.toLocaleString(void 0,{maximumFractionDigits:0})}`:String(t)}function ee(){const t=C(),r=A(),c=E(),[,d]=N(),m=c?`/portal/orgs/${c}/login`:"/portal/login",i=b({queryKey:D,queryFn:v,staleTime:3e4,retry:!1});f.useEffect(()=>{F(i.error)&&d(m)},[i.error,m,d]);const u=i.data?.illustrations??[],[a,x]=f.useState(null);return e.jsxs("main",{className:"min-h-full bg-surface font-brand text-surface-fg",children:[e.jsx("div",{className:"bg-hero px-6 pb-6 pt-8 text-surface-dark-fg",children:e.jsxs("div",{className:"mx-auto max-w-3xl",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(R,{}),e.jsxs(y,{href:"/portal/home",className:"mt-3 inline-flex items-center gap-1 text-xs font-semibold text-surface-dark-muted hover:text-highlight",children:[e.jsx(k,{className:"size-3.5","aria-hidden":!0}),t("clientPortal.backToHome")]}),e.jsx("p",{className:"mt-3 text-[11px] font-bold uppercase tracking-[0.22em] text-highlight",children:t("clientPortal.illustrations.eyebrow")}),e.jsx("h1",{className:"mt-1 text-2xl font-black tracking-tight",children:t("clientPortal.illustrations.title")}),e.jsx("p",{className:"mt-1 text-sm text-surface-dark-muted",children:t("clientPortal.illustrations.intro")})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(S,{})})]}),e.jsx("nav",{className:"mt-6 flex flex-wrap items-center gap-2 text-sm",children:e.jsx(T,{})})]})}),e.jsx("div",{className:"mx-auto max-w-3xl px-6 pb-12 pt-8",children:e.jsx("div",{className:"space-y-6","data-testid":"page-client-illustrations",children:i.isPending?e.jsxs(e.Fragment,{children:[e.jsx(p,{className:"h-40 w-full rounded-2xl"}),e.jsx(p,{className:"h-40 w-full rounded-2xl"})]}):i.isError?e.jsx(I,{kind:"error",text:z(r,B(i.error,""),t("clientPortal.illustrations.loadError"))}):u.length===0?e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-10 text-center shadow-sm",children:[e.jsx("div",{className:"mx-auto mb-3 flex size-14 items-center justify-center rounded-2xl bg-success-wash",children:e.jsx(h,{className:"size-7 text-success","aria-hidden":!0})}),e.jsx("h2",{className:"font-bold text-foreground",children:t("clientPortal.illustrations.emptyTitle")}),e.jsx("p",{className:"mx-auto mt-1 max-w-xs text-sm text-muted-foreground",children:t("clientPortal.illustrations.emptyBody")})]}):e.jsx("div",{className:"space-y-3",children:u.map(s=>{const j=String(s.fields.productName??s.filename),o=String(s.fields.carrier??"");return e.jsxs("article",{className:"rounded-2xl border border-border bg-card p-6 transition hover:shadow-md","data-testid":`illustration-${s.id}`,children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3.5",children:[e.jsx("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-xl bg-success text-success-foreground shadow-md",children:e.jsx(h,{className:"size-5","aria-hidden":!0})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-lg font-bold text-foreground",children:j}),e.jsxs("div",{className:"mt-0.5 flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground",children:[o?e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(w,{className:"size-3","aria-hidden":!0}),o]}
1):null,s.sharedAt?e.jsxs("span",{children:[o?"· ":"",t("clientPortal.illustrations.shared",{date:new Date(s.sharedAt).toLocaleDateString(r)})]}):null]})]})]}),e.jsxs("button",{type:"button",onClick:()=>x({name:s.filename,contentType:s.mimeType,url:P(s.id)}),className:"inline-flex items-center gap-1.5 rounded-lg bg-highlight-wash px-3 py-2 text-xs font-semibold text-foreground","data-testid":`open-illustration-${s.id}`,children:[t("clientPortal.illustrations.open"),e.jsx(g,{className:"size-3","aria-hidden":!0})]})]}),e.jsx("dl",{className:"mt-5 grid grid-cols-2 gap-x-4 gap-y-3 border-t border-border pt-4 text-sm sm:grid-cols-3",children:M.filter(l=>s.fields[l.key]!==void 0&&s.fields[l.key]!==null&&s.fields[l.key]!=="").map(l=>e.jsxs("div",{children:[e.jsx("dt",{className:"text-[10px] font-bold uppercase tracking-[0.16em] text-muted-foreground",children:t(l.label)}),e.jsx("dd",{className:"mt-0.5 font-semibold text-foreground",children:(l.fmt??String)(s.fields[l.key])})]},l.key))})]},s.id)})})})}),e.jsx(O,{open:a!==null,onOpenChange:s=>{s||x(null)},children:e.jsxs(U,{className:"max-w-4xl","data-testid":"illustration-viewer",children:[e.jsx($,{children:e.jsx(q,{className:"truncate",children:a?.name??""})}),a?a.contentType.startsWith("image/")?e.jsx("img",{src:a.url,alt:a.name,className:"max-h-[75vh] w-full object-contain"}):e.jsx("iframe",{src:a.url,title:a.name,className:"h-[75vh] w-full rounded-md border border-border"}):null,a?e.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 self-end text-xs font-semibold text-foreground underline",children:[t("clientPortal.illustrations.openNewTab"),e.jsx(g,{className:"size-3","aria-hidden":!0})]}):null]})}),e.jsx(L,{})]})}export{ee as ClientIllustrationsPage};

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.