@remit/web-client-dist 0.0.429 → 0.0.430
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/BriefPane-CytP3J7O.js +1 -0
- package/assets/{ErrorState-CNHmvGYF.js → ErrorState-B_pp6XjY.js} +1 -1
- package/assets/FlaggedPane-BTGAqs21.js +1 -0
- package/assets/FullCompose-D8BBZrtI.js +1 -0
- package/assets/MailListHeader-BjsRsJYI.js +7 -0
- package/assets/MailShell-CvPQWjl1.js +1 -0
- package/assets/{MailViewChrome-CZb8kPr_.js → MailViewChrome-ZN5UsScT.js} +1 -1
- package/assets/MailboxPane-Bca57rKs.js +1 -0
- package/assets/{NavMenuButton-BIPTnOry.js → NavMenuButton-_aiK1QXb.js} +1 -1
- package/assets/OnboardingWizard-BdBknD3m.js +1 -0
- package/assets/OutboxPane-3nlNVjx6.js +1 -0
- package/assets/_mailboxId-ByYUZV2Y.js +1 -0
- package/assets/_messageId-DLU18Mnl.js +1 -0
- package/assets/_messageId-DzC6VHu2.js +1 -0
- package/assets/_messageId-yJtPeY_Z.js +1 -0
- package/assets/_outboxMessageId-AEnONMiY.js +1 -0
- package/assets/_threadId-BdblixoD.js +1 -0
- package/assets/_threadId-CC5eBVBw.js +1 -0
- package/assets/_threadId-Cb8ALPnU.js +1 -0
- package/assets/accounts-Cji9zFqV.js +1 -0
- package/assets/{advanced-DKEc5X7D.js → advanced-BXCAioJN.js} +2 -2
- package/assets/appearance-Dg7qROVT.js +1 -0
- package/assets/{attachment-file-BrXH3M3V.js → attachment-file-CLrI3kMw.js} +1 -1
- package/assets/{avatar-DtND0ruk.js → avatar-C8lpjlQO.js} +1 -1
- package/assets/{bottom-sheet-Cpg512Z8.js → bottom-sheet-BuEgZWXh.js} +1 -1
- package/assets/brief-06HoE0GS.js +1 -0
- package/assets/{brief-CP_gyoWx.js → brief-Dt7lMB8R.js} +1 -1
- package/assets/{browser-ponyfill-BQQucyWN.js → browser-ponyfill-g58jgFl_.js} +2 -2
- package/assets/{bug-D-5qIgn1.js → bug-CDU4oK_3.js} +1 -1
- package/assets/{circle-check-CyTXHuU4.js → circle-check-BhMyR8BA.js} +1 -1
- package/assets/{circle-check-big-BCgBHZQm.js → circle-check-big-5NMrNFUI.js} +1 -1
- package/assets/{circle-help-lK4oidSt.js → circle-help-BAup3nOG.js} +1 -1
- package/assets/{clock-CpWsGek7.js → clock-DCdX5E4T.js} +1 -1
- package/assets/compose._-_outboxMessageId_-CyN4sUxa.js +1 -0
- package/assets/compose._-_outboxMessageId_-D5_JMiLJ.js +1 -0
- package/assets/compose._-_outboxMessageId_-Db3_5Bzx.js +1 -0
- package/assets/compose._-_outboxMessageId_-YqQysly2.js +1 -0
- package/assets/{confirm-dialog-CSNgGV-I.js → confirm-dialog-BxXd7BDT.js} +1 -1
- package/assets/{download-Yg8MAJuV.js → download-Br1uSntK.js} +1 -1
- package/assets/filters-snY8U8V2.js +1 -0
- package/assets/{flagged-CPZoSWDR.js → flagged-DBt5871J.js} +1 -1
- package/assets/flagged-DErOl3l4.js +1 -0
- package/assets/folders-BzRKidwZ.js +1 -0
- package/assets/{help-copy-o2bu5jXr.js → help-copy-D1mikTkH.js} +1 -1
- package/assets/index--TsBKY5T.js +1 -0
- package/assets/index-BG1B897N.js +1 -0
- package/assets/index-BIcRfpbR.js +1 -0
- package/assets/index-DLU18Mnl.js +1 -0
- package/assets/{index-DwTAdS0U.js → index-DX5RhVmh.js} +7 -7
- package/assets/index-DqLBbxu3.js +1 -0
- package/assets/index-DwKeNLeB.js +1 -0
- package/assets/{index-D_YBuI3z.js → index-idulIG65.js} +69 -69
- package/assets/index-yJtPeY_Z.js +1 -0
- package/assets/index-zNCEv1vY.js +1 -0
- package/assets/{kbd-BUm8HPo9.js → kbd-eZWvlfcb.js} +1 -1
- package/assets/labels-DFa210V0.js +1 -0
- package/assets/{mail-yZgIYq66.js → mail-Ba7j-n-X.js} +1 -1
- package/assets/mail-lLnBwPN-.js +1 -0
- package/assets/{menu-B4mmeG34.js → menu-MXmFQ7m-.js} +1 -1
- package/assets/onboarding-BQv4jg_d.js +1 -0
- package/assets/outbox-Dye6uwnb.js +1 -0
- package/assets/{pencil-rdzjE11g.js → pencil-CFys2EU7.js} +1 -1
- package/assets/{rich-text-BKM0xPkp.js → rich-text-DUWqcHC5.js} +3 -3
- package/assets/{rich-text-spellcheck-worker-provider-Dg635-7T.js → rich-text-spellcheck-worker-provider-DTxcyJ9W.js} +1 -1
- package/assets/{rotate-ccw-5k3dg52M.js → rotate-ccw-DfGOnKhE.js} +1 -1
- package/assets/{row-actions-BGPkkIDv.js → row-actions-zVghhE3a.js} +1 -1
- package/assets/search-mirror-_pK4jqc8.js +1 -0
- package/assets/search-scope-DTcpOp3S.js +1 -0
- package/assets/search-token-index-C-cpQFN3.js +1 -0
- package/assets/senders-Gj8Yentl.js +1 -0
- package/assets/settings-D96it8Kf.js +1 -0
- package/assets/{settings-screen-D53GKsd_.js → settings-screen-B17eDLDl.js} +1 -1
- package/assets/{shield-check-BZ36Y5z_.js → shield-check-DG9twqa-.js} +1 -1
- package/assets/suggested-vips--KmGV5np.js +1 -0
- package/assets/{useDebouncedValue-4E-721vu.js → useDebouncedValue-CntZIoMR.js} +1 -1
- package/assets/{useFilters-BdPFYyLi.js → useFilters-DaiBln2b.js} +1 -1
- package/assets/useLabels-amyS-Wph.js +1 -0
- package/assets/useMessageBodyContent-5kw10g9a.js +1 -0
- package/assets/useRefreshControl-CUTMAyIA.js +1 -0
- package/assets/{useSearchTokenContext-DROeO7xw.js → useSearchTokenContext-BxDapNdu.js} +4 -4
- package/assets/useSemanticSearch-BDxoAQSc.js +1 -0
- package/assets/useSignature-osTmnWZe.js +1 -0
- package/index.html +1 -1
- package/package.json +1 -1
- package/assets/BriefPane-D4GKn4Vw.js +0 -1
- package/assets/FlaggedPane-CIICNSCS.js +0 -1
- package/assets/FullCompose-B0bbns1M.js +0 -1
- package/assets/MailListHeader-BcdPneAy.js +0 -7
- package/assets/MailboxPane-MXdO0Vz2.js +0 -1
- package/assets/OnboardingWizard-yfi2kykm.js +0 -1
- package/assets/OutboxPane-mFkq2dEJ.js +0 -1
- package/assets/_mailboxId--xq6K8vG.js +0 -1
- package/assets/_messageId-CTALYmhq.js +0 -1
- package/assets/_messageId-CmMd3Ukp.js +0 -1
- package/assets/_messageId-CtxjpTtR.js +0 -1
- package/assets/_outboxMessageId-VPhQOPhK.js +0 -1
- package/assets/_threadId-1kFdcas1.js +0 -1
- package/assets/_threadId-7ZWe-9US.js +0 -1
- package/assets/_threadId-DNmSvZSP.js +0 -1
- package/assets/accounts--GnFjtNP.js +0 -1
- package/assets/appearance-Bn-KJ5jL.js +0 -1
- package/assets/brief-DWBpwjTi.js +0 -1
- package/assets/compose._-_outboxMessageId_-Bh6SV1dn.js +0 -1
- package/assets/compose._-_outboxMessageId_-CYWE1jEd.js +0 -1
- package/assets/compose._-_outboxMessageId_-Cn0WCeO7.js +0 -1
- package/assets/compose._-_outboxMessageId_-SUbFIkQY.js +0 -1
- package/assets/filters-BYXepTJ3.js +0 -1
- package/assets/flagged-CtM4krn0.js +0 -1
- package/assets/folders-BMWrmSe-.js +0 -1
- package/assets/index-BaVdEvyR.js +0 -1
- package/assets/index-BgNbixl6.js +0 -1
- package/assets/index-C015CYKF.js +0 -1
- package/assets/index-Cf-KjbzP.js +0 -1
- package/assets/index-CmMd3Ukp.js +0 -1
- package/assets/index-CtxjpTtR.js +0 -1
- package/assets/index-TQGaXC_d.js +0 -1
- package/assets/index-zMBRTYBv.js +0 -1
- package/assets/labels-DriP01Rs.js +0 -1
- package/assets/mail-Byqd_siN.js +0 -1
- package/assets/onboarding-BbbW2CcQ.js +0 -1
- package/assets/outbox-B7YGZwez.js +0 -1
- package/assets/search-scope-MtY0zpRq.js +0 -1
- package/assets/search-token-index-nAK4hI7B.js +0 -1
- package/assets/search-view-CtInfT0I.js +0 -1
- package/assets/senders-CRCPlNSI.js +0 -1
- package/assets/settings-zuLLX00L.js +0 -1
- package/assets/suggested-vips-BZprt8nM.js +0 -1
- package/assets/useLabels-CwcqSC09.js +0 -1
- package/assets/useMediaQuery-CDMcFeIb.js +0 -1
- package/assets/useMessageBodyContent-DEOYO0s3.js +0 -1
- package/assets/useRefreshControl-h1VyXjLX.js +0 -1
- package/assets/useSearchMirror-rswuH5l3.js +0 -1
- package/assets/useSemanticSearch-RnkqtV8e.js +0 -1
- package/assets/useSignature-C3CmLf8D.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./index-idulIG65.js";import{B as o}from"./BriefPane-CytP3J7O.js";import"./useSearchTokenContext-BxDapNdu.js";import"./kbd-eZWvlfcb.js";import"./useMessageBodyContent-5kw10g9a.js";import"./search-scope-DTcpOp3S.js";import"./MailListHeader-BjsRsJYI.js";import"./search-token-index-C-cpQFN3.js";import"./attachment-file-CLrI3kMw.js";import"./mail-Ba7j-n-X.js";import"./avatar-C8lpjlQO.js";import"./index-DX5RhVmh.js";import"./useSignature-osTmnWZe.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-CntZIoMR.js";import"./ErrorState-B_pp6XjY.js";import"./format-23Av07Go.js";import"./download-Br1uSntK.js";import"./shield-check-DG9twqa-.js";import"./useFilters-DaiBln2b.js";import"./confirm-dialog-BxXd7BDT.js";import"./clock-DCdX5E4T.js";import"./menu-MXmFQ7m-.js";import"./useRefreshControl-CUTMAyIA.js";import"./circle-check-big-5NMrNFUI.js";import"./useLabels-amyS-Wph.js";import"./useSemanticSearch-BDxoAQSc.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function A(){return r.jsx(o.Reading,{})}export{A as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-idulIG65.js";import{F as r}from"./FlaggedPane-BTGAqs21.js";import"./useSearchTokenContext-BxDapNdu.js";import"./kbd-eZWvlfcb.js";import"./useMessageBodyContent-5kw10g9a.js";import"./search-scope-DTcpOp3S.js";import"./MailListHeader-BjsRsJYI.js";import"./search-token-index-C-cpQFN3.js";import"./attachment-file-CLrI3kMw.js";import"./mail-Ba7j-n-X.js";import"./avatar-C8lpjlQO.js";import"./index-DX5RhVmh.js";import"./useSignature-osTmnWZe.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-CntZIoMR.js";import"./ErrorState-B_pp6XjY.js";import"./format-23Av07Go.js";import"./download-Br1uSntK.js";import"./shield-check-DG9twqa-.js";import"./useFilters-DaiBln2b.js";import"./confirm-dialog-BxXd7BDT.js";import"./clock-DCdX5E4T.js";import"./menu-MXmFQ7m-.js";import"./MailViewChrome-ZN5UsScT.js";import"./wizard-selection-B1bng5Jq.js";function w(){return o.jsx(r.Reading,{})}export{w as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,b as t}from"./index-
|
|
1
|
+
import{j as s,b as t}from"./index-idulIG65.js";function x({className:e,...n}){return s.jsx("kbd",{className:t("inline-flex h-4 min-w-4 items-center justify-center rounded-xs border border-line bg-surface-sunken px-1 font-sans text-2xs text-fg-muted",e),...n})}export{x as K};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e,ap as h,b5 as y,ao as b,bu as g,B as v,T as N,a0 as C,D as L,a1 as D,aD as I,aH as S,aE as E}from"./index-idulIG65.js";import{C as w}from"./confirm-dialog-BxXd7BDT.js";import{S as $}from"./settings-screen-B17eDLDl.js";import{E as j}from"./ErrorState-B_pp6XjY.js";import{a as T,b as k,c as R,u as O}from"./useLabels-amyS-Wph.js";import"./avatar-C8lpjlQO.js";import"./menu-MXmFQ7m-.js";import"./circle-help-BAup3nOG.js";function B({labels:l,onRename:i,onRecolor:n,onDelete:m,deletingLabelId:c}){const[u,r]=f.useState(),[o,d]=f.useState("");if(l.length===0)return e.jsx("p",{className:"py-6 text-sm text-fg-muted",children:"No labels yet. Create one below, then use it in a filter or apply it to mail directly."});const t=a=>{const s=o.trim();s!==""&&i(a,s),r(void 0)};return e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:l.map(a=>e.jsxs("li",{className:"flex items-center gap-3 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[u===a.labelId?e.jsx(h,{autoFocus:!0,value:o,onChange:s=>d(s.target.value),onBlur:()=>t(a.labelId),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),t(a.labelId)),s.key==="Escape"&&(s.preventDefault(),r(void 0))},"aria-label":`Rename label ${a.name}`}):e.jsx("button",{type:"button",onClick:()=>{r(a.labelId),d(a.name)},"aria-label":`Rename label ${a.name}`,className:"flex items-center gap-2 rounded-sm text-left hover:opacity-80",children:e.jsx(y,{label:a})}),e.jsx("p",{className:"mt-0.5 text-xs text-fg-subtle",children:a.filterCount===0?"Not used in any filter":`Used in ${a.filterCount} ${a.filterCount===1?"filter":"filters"}`})]}),e.jsx(b,{"aria-label":`Color for ${a.name}`,value:a.color,onChange:s=>n(a.labelId,s.target.value),className:"w-28 shrink-0",children:g.map(s=>e.jsx("option",{value:s,children:s},s))}),e.jsx(v,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4 text-danger"}),onClick:()=>m(a),disabled:c===a.labelId,"aria-label":`Delete label ${a.name}`})]},a.labelId))})}const P=(l,i)=>{if(i===0)return{title:`Delete the "${l}" label?`};const n=i===1?"filter":"filters";return{title:`Delete the "${l}" label?`,description:`This also deletes ${i} ${n} that ${i===1?"applies":"apply"} it — they can't be recovered.`}},H=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Labels mark mail without moving it — a message can carry any number of them alongside whichever folder it lives in."}),e.jsx("p",{children:"Use a label in a filter's action to have new (and existing) mail label itself automatically, or apply one to a selection directly from the mailbox."}),e.jsx("p",{children:"Deleting a label removes it from every message, and deletes every filter that applies it — the confirmation names how many."})]});function _({accountId:l}){const{createLabel:i,isPending:n,isError:m}=O(l),[c,u]=f.useState(""),[r,o]=f.useState("Default"),d=()=>{const t=c.trim();t!==""&&i(t,r).then(()=>{u(""),o("Default")})};return e.jsxs("div",{className:"space-y-2 rounded-sm border border-line bg-surface p-3",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"New label"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Name"}),e.jsx(h,{value:c,onChange:t=>u(t.target.value),placeholder:"e.g. Receipts","aria-label":"Label name",onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),d())}})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Color"}),e.jsx(b,{value:r,onChange:t=>o(t.target.value),"aria-label":"Label color",className:"w-28",children:g.map(t=>e.jsx("option",{value:t,children:t},t))})]}),e.jsx(v,{variant:"primary",onClick:d,disabled:n||c.trim()==="",children:n?"Creating…":"Create label"})]}),m&&e.jsx(E,{tone:"danger",variant:"soft",children:"Couldn't create that label. Please try again."})]})}function A({account:l}){const i=l.accountId,{labels:n,isPending:m,isError:c,error:u,refetch:r}=T(i),{updateLabel:o}=k(i),{deleteLabel:d,deletingLabelId:t}=R(i),[a,s]=f.useState();return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:l.email}),m?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading labels for ${l.email}`}):c?e.jsx(j,{variant:"inline",title:`Couldn't load labels for ${l.email}`,error:u,onRetry:()=>{r()}}):e.jsx(B,{labels:n,onRename:(p,x)=>o(p,{name:x}),onRecolor:(p,x)=>o(p,{color:x}),onDelete:s,deletingLabelId:t}),e.jsx(_,{accountId:i}),a&&(()=>{const p=P(a.name,a.filterCount);return e.jsx(w,{isOpen:!0,title:p.title,description:p.description,confirmLabel:"Delete label",destructive:!0,isBusy:t===a.labelId,onConfirm:()=>{d(a.labelId),s(void 0)},onCancel:()=>s(void 0)})})()]})}function q(){const l=C(),[i,n]=f.useState(!0),{data:m,isPending:c,isError:u,error:r,refetch:o}=L(D()),d=t=>{const a=S[t];a&&l({to:a})};return e.jsx($,{items:I,activeId:"labels",title:"Labels",description:"Mark mail without moving it, per account.",help:H,helpOpen:i,onToggleHelp:()=>n(t=>!t),onSelect:d,onBackToMail:()=>{l({to:"/mail"})},children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):u?e.jsx(j,{title:"Couldn't load accounts",error:r,onRetry:()=>{o()}}):m.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:m.accounts.map(t=>e.jsx(A,{account:t},t.accountId))})})}export{q as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./index-
|
|
1
|
+
import{c as e}from"./index-idulIG65.js";const a=e("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);export{a as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as L,r as u,u as Re,j as e,S as Pe,a as pe,b as k,C as ee,d as te,e as Le,f as ge,F as Ae,g as ze,X as be,T as Te,O as Fe,M as De,A as _e,h as Be,I as Ke,i as ve,B as F,k as Qe,l as Ve,m as z,n as qe,o as U,p as se,q as He,s as $e,t as Ue,v as ye,w as je,x as Se,y as Ge,z as J,D as Ne,E as Ye,G as Je,H as G,J as We,N as R,K as Xe,L as Ze,P as et,Q as tt,R as st,U as at,V as nt,W as rt,Y as ot,Z as it,_ as lt,$ as ct,a0 as ut,a1 as dt,a2 as mt,a3 as xt,a4 as ht}from"./index-idulIG65.js";import{B as ft,S as pt,D as gt,a as bt,b as vt,u as yt,s as jt,c as St,d as W,K as Nt,e as Ct,f as Ce,g as kt,h as wt,i as It,j as Mt}from"./search-token-index-C-cpQFN3.js";import{u as X,a as Ot}from"./useMessageBodyContent-5kw10g9a.js";import{P as Et}from"./pencil-CFys2EU7.js";import{c as Rt,s as Pt,M as Lt}from"./MailShell-CvPQWjl1.js";import{u as At,a as zt,R as Tt,M as Ft}from"./useRefreshControl-CUTMAyIA.js";import{M as Dt}from"./menu-MXmFQ7m-.js";import{B as ke}from"./bug-CDU4oK_3.js";import{A as _t}from"./avatar-C8lpjlQO.js";import{u as Bt,a as Kt}from"./index-DX5RhVmh.js";import{i as Qt}from"./outbox-status-BlKn6P0x.js";import{E as Vt}from"./ErrorState-B_pp6XjY.js";import{K as ae}from"./kbd-eZWvlfcb.js";import{u as qt}from"./useDebouncedValue-CntZIoMR.js";import"./search-scope-DTcpOp3S.js";import"./FullCompose-D8BBZrtI.js";import"./confirm-dialog-BxXd7BDT.js";import"./circle-check-big-5NMrNFUI.js";import"./useSignature-osTmnWZe.js";import"./account-form-helpers-DhckT_PN.js";const Ht=L("BookmarkPlus",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}],["line",{x1:"12",x2:"12",y1:"7",y2:"13",key:"1cppfj"}],["line",{x1:"15",x2:"9",y1:"10",y2:"10",key:"1gty7f"}]]);const $t=L("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);const we=L("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);const Ie=L("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Ut=L("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),Gt="button:not([disabled]), a[href]",E="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface-sunken";function Yt({active:t,dimmed:s,indent:a}){return k("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors",E,a&&"pl-7",t?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg",s&&"opacity-55")}function Jt({icon:t,label:s,count:a,active:n}){return e.jsxs(e.Fragment,{children:[t&&e.jsx("span",{className:k("shrink-0",n?"text-accent-2":"text-fg-subtle"),children:t}),e.jsx("span",{className:"flex-1 truncate",children:s}),a!=null&&a>0&&e.jsx("span",{className:k("text-2xs tabular-nums",n?"text-accent-2":"text-fg-subtle"),children:a})]})}function P({icon:t,label:s,count:a,active:n,dimmed:r,indent:o,navId:i,linkComponent:c,ariaLabel:h,title:d,onClick:g}){const x=Yt({active:n,dimmed:r,indent:o}),p=e.jsx(Jt,{icon:t,label:s,count:a,active:n});return i&&c?c({navId:i,className:x,ariaLabel:h??s,title:d,onClick:g,children:p}):e.jsx("button",{type:"button",onClick:g,className:x,"aria-label":h,title:d,children:p})}const ne={inbox:0,flagged:1,drafts:2,sent:3,archive:4,all:5,junk:6,trash:7};function Wt(t){switch(t){case"inbox":return e.jsx(Ke,{className:"size-4"});case"flagged":return e.jsx(pe,{className:"size-4"});case"drafts":return e.jsx(Be,{className:"size-4"});case"sent":return e.jsx(ge,{className:"size-4"});case"archive":return e.jsx(_e,{className:"size-4"});case"all":return e.jsx(De,{className:"size-4"});case"junk":return e.jsx(Fe,{className:"size-4"});case"trash":return e.jsx(Te,{className:"size-4"})}}const re=t=>t.role!=null,$=8,oe="remit.nav.folders.open.",ie="remit.nav.account.open.";function le(t,s,a){if(typeof localStorage>"u")return a;const n=localStorage.getItem(t+s);return n===null?a:n!=="0"}function ce(t,s,a){typeof localStorage>"u"||localStorage.setItem(t+s,a?"1":"0")}function Xt({query:t,onSelect:s,onRemove:a}){return e.jsxs("div",{className:"group flex w-full items-center gap-1 rounded-md pr-1 hover:bg-surface",children:[e.jsxs("button",{type:"button",onClick:s,className:k("flex min-w-0 flex-1 items-center gap-2 px-2 py-1 text-left text-sm text-fg-muted transition-colors hover:text-fg",E),children:[e.jsx(ze,{className:"size-4 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t})]}),a&&e.jsx("button",{type:"button",onClick:a,"aria-label":`Remove saved search: ${t}`,className:k("shrink-0 rounded-full p-1 text-fg-subtle opacity-0 transition-opacity hover:bg-surface-sunken hover:text-fg group-hover:opacity-100 focus-visible:opacity-100",E),children:e.jsx(be,{className:"size-3.5"})})]})}function Zt({savedSearches:t,saveableQuery:s,onSelectSavedSearch:a,onRemoveSavedSearch:n,onSaveCurrentSearch:r}){return t.length===0&&!s?null:e.jsxs("div",{className:"mt-3",children:[e.jsx("div",{className:"px-2 pb-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Saved searches"}),s&&e.jsxs("button",{type:"button",onClick:r,className:k("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-accent transition-colors hover:bg-surface",E),children:[e.jsx(Ht,{className:"size-4 shrink-0"}),e.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["Save “",s,"”"]})]}),t.map(o=>e.jsx(Xt,{query:o,onSelect:()=>a?.(o),onRemove:n?()=>n(o):void 0},o))]})}function es({account:t,selectedNavId:s,onSelectNav:a,linkComponent:n}){const[r,o]=u.useState(()=>le(ie,t.id,!0)),[i,c]=u.useState(()=>le(oe,t.id,!0)),[h,d]=u.useState(!1),g=()=>{o(l=>{const S=!l;return ce(ie,t.id,S),S})},x=()=>{c(l=>{const S=!l;return ce(oe,t.id,S),S})},p=t.mailboxes.filter(re).sort((l,S)=>ne[l.role]-ne[S.role]),m=t.mailboxes.filter(l=>!re(l)),b=h||m.length<=$?m:m.slice(0,$),j=m.length-b.length,y=t.status??"ready",N=y==="ready"&&p.length===0&&m.length===0;return e.jsxs("div",{className:"mt-3",children:[e.jsxs("button",{type:"button",onClick:g,"aria-expanded":r,className:k("flex w-full items-center gap-1.5 px-2 pb-1 text-left transition-colors hover:text-fg",E,t.muted&&"opacity-55"),children:[r?e.jsx(ee,{className:"size-3 shrink-0 text-fg-subtle"}):e.jsx(te,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),t.muted&&e.jsxs(e.Fragment,{children:[e.jsx(ft,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:"muted"})]})]}),r&&e.jsxs(e.Fragment,{children:[y==="loading"&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"Loading…"}),y==="error"&&e.jsxs("div",{role:"alert",className:"mx-2 my-1 flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-2 py-1.5 text-sm",children:[e.jsx(Le,{className:"mt-0.5 size-4 shrink-0 text-danger","aria-hidden":"true"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("p",{className:"font-medium text-danger",children:"Couldn't load mailboxes"})}),t.onRetry&&e.jsx("button",{type:"button",onClick:t.onRetry,className:"shrink-0 text-sm font-medium text-accent hover:underline",children:"Retry"})]}),N&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"No mailboxes"}),y==="ready"&&e.jsxs(e.Fragment,{children:[p.map(l=>e.jsx(P,{navId:l.id,linkComponent:n,icon:Wt(l.role),label:l.name,ariaLabel:l.name,title:l.fullPath??l.name,count:l.unseen,active:s===l.id,dimmed:t.muted,onClick:()=>a?.(l.id)},l.id)),t.outboxPending!==void 0&&e.jsx(P,{navId:"outbox",linkComponent:n,icon:e.jsx(ge,{className:"size-4"}),label:"Outbox",ariaLabel:"Outbox",count:t.outboxPending>0?t.outboxPending:void 0,active:s==="outbox",dimmed:t.muted,onClick:()=>a?.("outbox")}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:x,"aria-expanded":i,className:k("mt-1 flex w-full items-center gap-1 px-2 py-1 text-left text-2xs font-semibold uppercase tracking-wider text-fg-subtle transition-colors hover:text-fg",E),children:[i?e.jsx(ee,{className:"size-3 shrink-0"}):e.jsx(te,{className:"size-3 shrink-0"}),e.jsx("span",{className:"flex-1",children:"Folders"}),e.jsx("span",{className:"tabular-nums opacity-70",children:m.length})]}),i&&e.jsxs(e.Fragment,{children:[b.map(l=>e.jsx(P,{navId:l.id,linkComponent:n,icon:e.jsx(Ae,{className:"size-4"}),label:l.name,ariaLabel:l.name,title:l.fullPath??l.name,count:l.unseen,active:s===l.id,dimmed:t.muted,onClick:()=>a?.(l.id)},l.id)),(j>0||h)&&m.length>$&&e.jsx("button",{type:"button",onClick:()=>d(l=>!l),className:k("ml-7 flex items-center px-2 py-1 text-2xs font-medium text-accent transition-colors hover:underline",E),children:h?"Show less":`Show all (${m.length})`})]})]})]})]})]})}function ts({accounts:t,selectedNavId:s,briefUnseen:a,onSelectNav:n,variant:r="desktop",linkComponent:o,calendarNav:i="hidden",savedSearches:c=[],saveableQuery:h,onSelectSavedSearch:d,onRemoveSavedSearch:g,onSaveCurrentSearch:x}){const p=u.useRef(null);Re({containerRef:p,itemSelector:Gt});const m=r==="drawer",b=e.jsxs("nav",{ref:m?p:void 0,className:m?"px-2 py-2":"flex-1 overflow-y-auto px-2 py-2","aria-label":"Mailboxes",children:[e.jsx(P,{navId:"brief",linkComponent:o,icon:e.jsx(Pe,{className:"size-4"}),label:"Daily brief",ariaLabel:"Daily brief",count:a,active:s==="brief",onClick:()=>n?.("brief")}),i==="shown"&&e.jsx(P,{navId:"calendar",linkComponent:o,icon:e.jsx($t,{className:"size-4"}),label:"Calendar",ariaLabel:"Calendar",active:s==="calendar",onClick:()=>n?.("calendar")}),e.jsx(P,{navId:"flagged",linkComponent:o,icon:e.jsx(pe,{className:"size-4"}),label:"Starred",ariaLabel:"Starred",active:s==="flagged",onClick:()=>n?.("flagged")}),e.jsx(Zt,{savedSearches:c,saveableQuery:h,onSelectSavedSearch:d,onRemoveSavedSearch:g,onSaveCurrentSearch:x}),t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-sm text-fg-muted",children:"No accounts configured"}):t.map(j=>e.jsx(es,{account:j,selectedNavId:s,onSelectNav:n,linkComponent:o},j.id))]});return m?b:e.jsx("aside",{ref:p,className:"flex h-full w-full flex-col bg-surface-sunken",children:b})}function ss({leading:t,search:s,actions:a,className:n}){return e.jsxs("header",{className:k("flex min-h-pane-header w-full shrink-0 items-center gap-2 border-b border-line bg-canvas px-row-inset py-1",n),children:[t&&e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:t}),e.jsx("div",{className:"flex min-w-0 flex-1 justify-start",children:e.jsx("div",{className:"w-full max-w-xs transition-[max-width] duration-150 ease-out focus-within:max-w-lg",children:s})}),a&&e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:a})]})}function as(){const t=ve();if(!t)return null;const s=t.showNavPane?!t.navCollapsed:!1;return e.jsx(F,{variant:"ghost",size:"sm",icon:e.jsx(Dt,{className:"size-4"}),onClick:t.toggleNav,"aria-label":s?"Hide folders":"Show folders","aria-expanded":s,title:"Folders",className:"shrink-0"})}const ns={global:"Search all mail",pending:"Search mail",scoped:"Search this folder"};function rs({search:t,onCompose:s,onReportBug:a,onOpenSettings:n,composeShortcut:r,refreshControl:o,account:i}){return e.jsx(ss,{leading:e.jsx(as,{}),search:e.jsx(pt,{value:t.value,onChange:t.onChange,onClear:t.onClear,onClearQuery:t.onClearQuery,chips:t.chips,onRemoveChip:t.onRemoveChip,placeholder:ns[t.scope]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(F,{variant:"ghost",size:"sm",icon:e.jsx(Ut,{className:"size-4"}),title:r?`Compose (${r})`:"Compose","aria-label":"Compose",onClick:s}),e.jsx(F,{variant:"ghost",size:"sm",icon:e.jsx(ke,{className:"size-4"}),title:"Report a bug","aria-label":"Report a bug",onClick:a}),e.jsx(F,{variant:"ghost",size:"sm",icon:e.jsx(Ie,{className:"size-4"}),title:"Settings","aria-label":"Settings",onClick:n}),o,i]})})}function os(){const{pathname:t}=Qe(),s=Ve({from:"/mail/$mailboxId",shouldThrow:!1});return z(t,"/settings")?"settings":z(t,"/mail/outbox")?"outbox":z(t,"/mail/flagged")?"flagged":z(t,"/mail/brief")?"brief":s?.mailboxId??""}function is(){const t=qe(),s=U({select:d=>se(d.location.pathname)}),a=U({select:d=>He(d.location.search)}),[n,r]=u.useState(a),o=qt(n,200),[i,c]=u.useState(s);if(i!==s){const d=Pt(i,s,a);c(s),d!==void 0&&r(d)}const h=u.useCallback(d=>{c(se(t.state.location.pathname)),r(d)},[t]);return{searchInput:n,committedQuery:Rt(n,o),viewKey:s,setSearchInput:h}}const ls=()=>{const t=X();return $e()?null:e.jsx("button",{type:"button",onClick:t,"aria-label":"Compose new message",className:"lg:hidden fixed right-4 z-30 h-14 w-14 rounded-full bg-accent text-accent-fg shadow-lg flex items-center justify-center hover:opacity-90 active:scale-95 transition-all",style:{bottom:"calc(env(safe-area-inset-bottom, 0) + 1rem)"},children:e.jsx(Et,{className:"size-6"})})},Me=({children:t})=>{const{Account:s}=Ue();return e.jsx(s,{children:t})},cs=({email:t,onSignOut:s})=>{const a=t??"Account";return e.jsxs(gt,{trigger:e.jsx(_t,{name:a,email:t??void 0,size:"sm"}),align:"right",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-3 py-2 text-xs text-fg-muted truncate",title:t,"data-testid":"account-menu-email",children:t}),e.jsx(bt,{})]}),e.jsxs(vt,{onClick:s,children:[e.jsx(we,{className:"size-4"}),"Sign out"]})]})},us=()=>e.jsx(Me,{children:({email:t,signOut:s})=>e.jsx(cs,{email:t,onSignOut:s})});function ds({accounts:t}){const{searchInput:s,onSearchChange:a,onSearchClear:n,onSearchClearQuery:r}=ye(),o=Bt(),i=X(),{scope:c,clearScope:h}=yt(t),d=c.kind==="scoped"?[{id:c.chip.id,label:c.chip.label,tone:"scope"}]:void 0,g=u.useMemo(()=>t.map(j=>j.accountId),[t]),{hasNewMail:x}=At(),{state:p,errorMessage:m,refresh:b}=zt(g);return e.jsx(rs,{search:{value:s,scope:c.kind,chips:d,onChange:a,onClear:n,onClearQuery:r,onRemoveChip:h},onCompose:i,onReportBug:je,onOpenSettings:()=>o("accounts"),composeShortcut:jt("compose"),refreshControl:e.jsx(Tt,{state:p,onRefresh:b,label:"Refresh all accounts",errorMessage:m,hasUpdate:x(g)}),account:e.jsx(us,{})})}const Z="remit.savedSearches",ms=25;function _(){try{const t=localStorage.getItem(Z);if(!t)return[];const s=JSON.parse(t);return Array.isArray(s)?s.filter(a=>typeof a=="string"):[]}catch{return[]}}function xs(t){const s=t.trim();if(!s)return _();const a=[s,..._().filter(n=>n!==s)].slice(0,ms);try{localStorage.setItem(Z,JSON.stringify(a))}catch{return a}return a}function hs(t){const s=_().filter(a=>a!==t);try{localStorage.setItem(Z,JSON.stringify(s))}catch{return s}return s}const ue=t=>/^\d/.test(t),fs=(t,s)=>{const a=ue(t),n=ue(s);return a&&!n?-1:!a&&n?1:t.localeCompare(s,void 0,{sensitivity:"base",numeric:!0})};function ps(t,s,a){const n=[],r=[];for(const o of t)s.has(o.mailboxId)?n.push(o):r.push(o);return r.sort((o,i)=>fs(G(o,void 0,a),G(i,void 0,a))),{system:n,labels:r}}function gs(t,s,a){const n=We(s)&&t.unseenCount>0;return{id:t.mailboxId,name:G(t,s,a),unseen:n?t.unseenCount:void 0,role:s,fullPath:t.fullPath}}function de({accounts:t,onMailboxSelect:s,variant:a="desktop"}){const n=Se(),r=St(),o=os(),{searchInput:i,onSearchChange:c}=ye(),[h,d]=u.useState(_),{t:g}=Ge("mail",{useSuspense:!1}),x=u.useCallback((f,C)=>g(f,{defaultValue:C}),[g]),p=W({queries:t.map(f=>({...J({path:{accountId:f.accountId}}),staleTime:1/0}))}),{data:m}=Ne(Ye()),b=u.useMemo(()=>(m?.items??[]).filter(f=>Qt(f.status)).length,[m?.items]),j=u.useMemo(()=>t.map((f,C)=>{const v=p[C],I=v?.data?.items??[],w=Je(f.folderAppointments),{system:M,labels:V}=ps(I,w,x),q=v?.isError?"error":v?.isLoading?"loading":"ready";return{id:f.accountId,label:f.email,email:f.email,muted:!!f.muted,outboxPending:b,status:q,onRetry:()=>v?.refetch(),mailboxes:[...M,...V].map(A=>gs(A,w.get(A.mailboxId),x))}}),[t,p,b,x]),y=f=>{n.invalidateQueries({queryKey:Xe({path:{mailboxId:f},query:{order:"desc"}})})},N=({navId:f,className:C,ariaLabel:v,title:I,children:w,onClick:M})=>f==="brief"?e.jsx(R,{to:"/mail/brief",search:{q:void 0},activeOptions:{includeSearch:!1},onClick:()=>M?.(),className:C,"aria-label":v,title:I,children:w}):f==="outbox"?e.jsx(R,{to:"/mail/outbox",search:{q:void 0},onClick:()=>M?.(),className:C,"aria-label":v,title:I,children:w}):f==="flagged"?e.jsx(R,{to:"/mail/flagged",search:{q:void 0},onClick:()=>M?.(),className:C,"aria-label":v,title:I,children:w}):f==="settings"?e.jsx(R,{to:"/settings/accounts",onClick:()=>M?.(),className:C,"aria-label":v,title:I,children:w}):e.jsx(R,{to:"/mail/$mailboxId",params:{mailboxId:f},search:{q:void 0},onClick:()=>{y(f),M?.()},className:C,"aria-label":v,title:I,children:w}),l=()=>{c(""),s?.()},S=i.trim(),O=S.length>0&&!h.includes(S)?S:void 0,B=u.useCallback(()=>{O&&d(xs(O))},[O]),K=u.useCallback(f=>{d(hs(f))},[]),Q=u.useCallback(f=>{c(f),r(f),s?.()},[c,r,s]);return e.jsx(ts,{accounts:j,selectedNavId:o,onSelectNav:l,linkComponent:N,variant:a,savedSearches:h,saveableQuery:O,onSaveCurrentSearch:B,onSelectSavedSearch:Q,onRemoveSavedSearch:K})}function bs(){return e.jsxs("button",{type:"button",onClick:je,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg",children:[e.jsx(ke,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Report a bug"})]})}function vs({accounts:t,onMailboxSelect:s}){return ve()?.showNavPane??!0?e.jsx(de,{accounts:t}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(de,{accounts:t,onMailboxSelect:s,variant:"drawer"})}),e.jsxs("div",{className:"border-t border-line px-2 py-2",children:[e.jsxs(R,{to:"/settings/accounts",onClick:s,children:[e.jsx(Ie,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Settings"})]}),e.jsx(bs,{}),e.jsx(Me,{children:({signOut:r})=>e.jsxs("button",{type:"button",onClick:()=>{s?.(),r()},className:"flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg","data-testid":"sign-out-button",children:[e.jsx(we,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Sign out"})]})})]})]})}const ys=({isOpen:t,onClose:s})=>{const a=u.useCallback(n=>{n.key==="Escape"&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),s())},[s]);return u.useEffect(()=>{if(t)return window.addEventListener("keydown",a,!0),()=>window.removeEventListener("keydown",a,!0)},[t,a]),t?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx(Ze,{label:"Dismiss keyboard shortcuts",onDismiss:s,className:"backdrop-blur-sm"}),e.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:k("relative z-10 max-h-[85vh] w-full max-w-2xl overflow-y-auto","rounded-lg border border-line bg-surface shadow-lg","p-6"),children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard shortcuts"}),e.jsx("button",{type:"button",onClick:s,className:"p-1 text-fg-muted transition-colors hover:text-fg","aria-label":"Close",children:e.jsx(be,{className:"size-5"})})]}),e.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2",children:Nt.map(n=>e.jsxs("div",{children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-fg-muted",children:n.title}),e.jsx("div",{className:"space-y-2",children:n.hints.map(r=>e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-sm",children:r.description}),e.jsx("span",{className:"flex shrink-0 items-center gap-1",children:r.keys.map((o,i)=>e.jsxs(u.Fragment,{children:[i>0&&r.keys[0]==="g"&&e.jsx("span",{className:"text-2xs text-fg-subtle",children:"then"}),e.jsx(ae,{children:o})]},o))})]},`${r.action}-${r.keys.join("+")}`))})]},n.title))}),e.jsx("div",{className:"mt-6 border-t border-line pt-4",children:e.jsxs("p",{className:"text-center text-xs text-fg-muted",children:["Press ",e.jsx(ae,{children:"Esc"})," to close"]})})]})]}):null};function js(t){const s=W({queries:t.map(a=>({...J({path:{accountId:a.accountId}}),staleTime:1/0}))});return u.useMemo(()=>Ct(s.map(a=>a.data?.items??[])),[s])}const Oe="remit:intelligence-open";function Ss(){try{return localStorage.getItem(Oe)!=="closed"}catch{return!0}}function Ns(t){try{localStorage.setItem(Oe,t?"open":"closed")}catch{}}function me({panels:t,prefersOpen:s,isDesktop:a,hasThread:n,raisedFor:r,openMessage:o}){return r!==null&&r===o?!0:t.length>0?t.includes("intelligence"):a&&n&&s}const Cs=()=>{const t=Ce(),s=et(),a=tt(),n=s.find(st),r=kt(),[o,i]=u.useState(Ss),c=r?`${r.threadId}/${r.messageId??""}`:null,[h,d]=u.useState(null),g={panels:s,prefersOpen:o,isDesktop:t==="desktop",hasThread:r!==void 0,openMessage:c},x=me({...g,raisedFor:h}),p=me({...g,raisedFor:null}),m=u.useCallback((N,l)=>{a([...N?["intelligence"]:[],...l?[l]:[]])},[a]),b=u.useCallback(N=>{m(p,N)},[p,m]),j=u.useCallback(()=>{if(x&&!p){d(null);return}const N=!x;Ns(N),i(N),d(null),m(N,n)},[p,x,n,m]),y=u.useCallback(()=>{d(c)},[c]);return{openOverlay:n,intelligenceOpen:x,showOverlay:b,toggleIntelligence:j,raiseIntelligence:y}},ks=t=>t.map(s=>s.data?.items??[]);function ws(t){const s=W({queries:t.map(a=>({...J({path:{accountId:a.accountId}}),staleTime:1/0})),combine:ks});return u.useMemo(()=>at(t.map((a,n)=>({folderAppointments:a.folderAppointments,mailboxes:s[n]??[]}))),[t,s])}var T={exports:{}},xe;function Is(){if(xe)return T.exports;xe=1;const t=(s,a,n)=>new Promise((r,o)=>{if(n=Object.assign({concurrency:1/0},n),typeof a!="function")throw new TypeError("Mapper function is required");const{concurrency:i}=n;if(!(typeof i=="number"&&i>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${i}\` (${typeof i})`);const c=[],h=s[Symbol.iterator]();let d=!1,g=!1,x=0,p=0;const m=()=>{if(d)return;const b=h.next(),j=p;if(p++,b.done){g=!0,x===0&&r(c);return}x++,Promise.resolve(b.value).then(y=>a(y,j)).then(y=>{c[j]=y,x--,m()},y=>{d=!0,o(y)})};for(let b=0;b<i&&(m(),!g);b++);});return T.exports=t,T.exports.default=t,T.exports}var Ms=Is();const Os=nt(Ms),Es=900*1e3,Rs=300,Ps=(t,s)=>{if(!t)return s;const a=Number.parseInt(t,10);return Number.isFinite(a)&&a>0?a:s},Ls=60*1e3,As=t=>Math.max(Ps(t,Rs)*1e3,Ls),D=As(ct().mailboxPollIntervalSeconds),zs=5,Y=new Set,Ts=(t,s,a=Es)=>t.filter(n=>{const r=n.lastSyncAt;return r==null?!0:s-r>a}).map(n=>n.accountId),Fs=(t,s,a=D)=>t-s>=a,Ds=(t,s)=>t.filter(a=>!s.has(a)),he=(t,s)=>{if(Y.delete(t),it(s,{softError:!0},"nobody")){lt(s);return}console.warn("[remit] background mailbox sync failed",{accountId:t,error:s})},fe=(t,s)=>rt({path:{accountId:t},throwOnError:!0}).then(()=>{s.invalidateQueries({queryKey:ot({path:{accountId:t}})})}),_s=t=>{const s=Se(),a=u.useRef(t);a.current=t;const n=t.map(r=>r.accountId).join(",");u.useEffect(()=>{const r=Date.now(),i=Ts(a.current,r).filter(c=>!Y.has(c));if(i.length!==0)for(const c of i)Y.add(c),fe(c,s).catch(h=>{he(c,h)})},[n,s]),u.useEffect(()=>{let r=Date.now(),o;const i=new Set,c=()=>{r=Date.now();const g=Ds(a.current.map(x=>x.accountId),i);for(const x of g)i.add(x);Os(g,x=>fe(x,s).catch(p=>{he(x,p)}).finally(()=>{i.delete(x)}),{concurrency:zs})},h=()=>{if(document.visibilityState==="visible"){c(),o=setTimeout(h,D);return}},d=()=>{document.visibilityState==="visible"&&Fs(Date.now(),r)&&(o!==void 0&&clearTimeout(o),c(),o=setTimeout(h,D))};return o=setTimeout(h,D),document.addEventListener("visibilitychange",d),()=>{o!==void 0&&clearTimeout(o),document.removeEventListener("visibilitychange",d)}},[n,s])};function oa(){const t=ut(),s=Ce(),a=Mt(s),{openOverlay:n,intelligenceOpen:r,showOverlay:o,toggleIntelligence:i,raiseIntelligence:c}=Cs(),h=n==="shortcuts",d=n==="nav",{searchInput:g,committedQuery:x,viewKey:p,setSearchInput:m}=is(),{data:b,isLoading:j,isError:y,error:N,refetch:l}=Ne({...dt(),staleTime:1/0}),S=!!(b&&(b.accounts?.length??0)===0);u.useEffect(()=>{S&&t({to:"/onboarding",replace:!0})},[S,t]),Kt({enabled:!h,bindings:[{key:"?",handler:()=>o("shortcuts"),noModifiers:!1,preventDefault:!0}]});const O=X(),B=Ot(),K=U({select:H=>mt(H.matches)?.list==="mailbox"}),Q=u.useMemo(()=>({compose:O}),[O]);wt({enabled:!K&&!B,handlers:Q});const f=u.useCallback(()=>{m("")},[m]),C=u.useCallback(()=>{m("")},[m]),v=b?.accounts??[],I=u.useMemo(()=>v.map(H=>H.accountId),[v]),w=js(v),M=ws(v),V=u.useMemo(()=>It(v),[v]);_s(v);const q=u.useCallback(()=>{n==="nav"&&o(void 0)},[n,o]),A={accounts:v,mailboxNameIndex:w,accountNameIndex:V,resultFolderIndex:M,searchQuery:x,searchInput:g,searchViewKey:p,onSearchChange:m,onSearchClear:f,onSearchClearQuery:C,intelligenceOpen:r,onToggleIntelligence:i,onRaiseIntelligence:c},Ee={isSinglePane:a,isLoading:j||S,intelligenceOpen:r,nav:e.jsx(vs,{accounts:v,onMailboxSelect:q}),topBar:a?void 0:e.jsx(ds,{accounts:v}),overlay:a?e.jsx(ls,{}):void 0,navOpen:d,onOpenNav:()=>o("nav"),onCloseNav:()=>o(void 0)};return e.jsx(xt.Provider,{value:A,children:e.jsxs(Ft,{accountIds:I,children:[y?e.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:e.jsx(Vt,{title:"Couldn't load your account",error:N,onRetry:()=>{l()}})}):e.jsx(Lt,{chrome:Ee,children:e.jsx(ht,{})}),e.jsx(ys,{isOpen:h,onClose:()=>o(void 0)})]})})}export{oa as component,ye as useMailContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./index-
|
|
1
|
+
import{c as e}from"./index-idulIG65.js";const n=e("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);export{n as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a5 as n,a6 as r,x as a,r as i,j as s}from"./index-idulIG65.js";import{O as c}from"./OnboardingWizard-BdBknD3m.js";import"./kbd-eZWvlfcb.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-Ba7j-n-X.js";async function m(e){e.recordCompleted(),await e.queryClient.refetchQueries({queryKey:n()}),e.navigateToInbox()}function C(){const e=r(),o=a(),t=i.useCallback(l=>{m({queryClient:o,recordCompleted:()=>e.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[e,o]);return s.jsx(c,{skipWelcome:!1,onComplete:t})}export{C as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o,a4 as i}from"./index-idulIG65.js";import{a as m}from"./MailShell-CvPQWjl1.js";import{u as p,O as t}from"./OutboxPane-3nlNVjx6.js";import{u as s}from"./search-mirror-_pK4jqc8.js";import"./FullCompose-D8BBZrtI.js";import"./ErrorState-B_pp6XjY.js";import"./index-DX5RhVmh.js";import"./useMessageBodyContent-5kw10g9a.js";import"./useSignature-osTmnWZe.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-CntZIoMR.js";import"./confirm-dialog-BxXd7BDT.js";import"./useSearchTokenContext-BxDapNdu.js";import"./kbd-eZWvlfcb.js";import"./search-scope-DTcpOp3S.js";import"./circle-check-big-5NMrNFUI.js";import"./clock-DCdX5E4T.js";import"./row-actions-zVghhE3a.js";import"./rotate-ccw-DfGOnKhE.js";import"./NavMenuButton-_aiK1QXb.js";import"./menu-MXmFQ7m-.js";import"./format-23Av07Go.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function q(){const r=p();return s({to:"/mail/outbox"}),o.jsx(t,{outboxMessageId:r,children:o.jsx(m,{phone:o.jsx(t.Phone,{}),list:o.jsx(t.List,{}),reading:o.jsx(i,{})})})}export{q as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./index-
|
|
1
|
+
import{c as a}from"./index-idulIG65.js";const c=a("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);export{c as P};
|