@remit/web-client-dist 0.0.483 → 0.0.485

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.
Files changed (138) hide show
  1. package/assets/{BriefPane-D6mVesqu.js → BriefPane-Cl8R7dxi.js} +1 -1
  2. package/assets/{CalendarShell-CbesY9P5.js → CalendarShell-VhzpaDzW.js} +1 -1
  3. package/assets/{EmptyState-DYWkEoYy.js → EmptyState-CNq5kRbL.js} +1 -1
  4. package/assets/{ErrorState-CQA1uNfQ.js → ErrorState-ChE4cD6L.js} +1 -1
  5. package/assets/{FlaggedPane-DoeXJfm_.js → FlaggedPane-BgE032jx.js} +1 -1
  6. package/assets/{FullCompose-DdXnvGhK.js → FullCompose-iOBy387u.js} +1 -1
  7. package/assets/{MailListHeader-Dv4RRNrm.js → MailListHeader-CTuKhh89.js} +1 -1
  8. package/assets/{MailNav-v3LcAYtx.js → MailNav-BadJFJ7M.js} +1 -1
  9. package/assets/{MailShell-CqyZkGBA.js → MailShell-CSKUYwVQ.js} +1 -1
  10. package/assets/{MailViewChrome-BrAblQ-h.js → MailViewChrome-BpY3NV8F.js} +1 -1
  11. package/assets/{MailboxPane-B1OopvI6.js → MailboxPane-0DFD6R2e.js} +1 -1
  12. package/assets/{NavMenuButton-DsipgLLk.js → NavMenuButton-D9vY2hyG.js} +1 -1
  13. package/assets/{OnboardingWizard-LMPbQ6jT.js → OnboardingWizard-3Gqo7aiq.js} +1 -1
  14. package/assets/{OpenCalendarEvent-jziTx8_b.js → OpenCalendarEvent-CIa3O60j.js} +1 -1
  15. package/assets/{OutboxPane-C5Ns55rS.js → OutboxPane-DPOW7AN8.js} +1 -1
  16. package/assets/_calendarObjectId-BnJzkJLO.js +1 -0
  17. package/assets/_mailboxId-BgyDwntX.js +1 -0
  18. package/assets/_messageId-Bo4_Dmti.js +1 -0
  19. package/assets/_messageId-DR1T5jrD.js +1 -0
  20. package/assets/_messageId-YFZhbxKB.js +1 -0
  21. package/assets/_outboxMessageId-DYXlxBsw.js +1 -0
  22. package/assets/_recurrenceId-CQbuvQSd.js +1 -0
  23. package/assets/_threadId-7S_lVo4J.js +1 -0
  24. package/assets/_threadId-ATy1qjNP.js +1 -0
  25. package/assets/_threadId-BrUd06O5.js +1 -0
  26. package/assets/{_view._date-kUsauS8B.js → _view._date-BbYZWcoj.js} +1 -1
  27. package/assets/{accounts-Dzj3yoGR.js → accounts-CagjQ9Qq.js} +1 -1
  28. package/assets/{advanced-DUCDPZSq.js → advanced-CgLn37_s.js} +1 -1
  29. package/assets/{appearance-BOPQSuz4.js → appearance-C8PTPFiD.js} +1 -1
  30. package/assets/{attachment-file-DClGI76U.js → attachment-file-CR02jgI7.js} +1 -1
  31. package/assets/{avatar-wLH6-Ayd.js → avatar-CM8hEDwE.js} +1 -1
  32. package/assets/{bottom-sheet-D6dXigqc.js → bottom-sheet-Du8tLPNT.js} +1 -1
  33. package/assets/{brief-BVNqThW-.js → brief-BUeLY5d6.js} +1 -1
  34. package/assets/brief-G-sgDaLa.js +1 -0
  35. package/assets/{browser-ponyfill-CH8d2KQ8.js → browser-ponyfill-CLwkH6Ur.js} +1 -1
  36. package/assets/{bug-C9mbESSL.js → bug-STyAYVZ1.js} +1 -1
  37. package/assets/{calendar-_byPswbZ.js → calendar-Bu9-fc-l.js} +1 -1
  38. package/assets/{calendar-ZcQGYvWc.js → calendar-W9WEWqZ6.js} +1 -1
  39. package/assets/{calendar-days-GutYioyG.js → calendar-days-BmVknK-R.js} +1 -1
  40. package/assets/{card-D55_7IJj.js → card-BpM3r3Ep.js} +1 -1
  41. package/assets/chevron-left-BuscGo4h.js +1 -0
  42. package/assets/{circle-check-big-B1p6oh-i.js → circle-check-big-C86hi2JF.js} +1 -1
  43. package/assets/{circle-check-o0AqGZ-u.js → circle-check-tE6CqgJO.js} +1 -1
  44. package/assets/{circle-help-DtvJPapE.js → circle-help-BJ7R5dEF.js} +1 -1
  45. package/assets/{clock-Z-oAijsz.js → clock-64ozmnZA.js} +1 -1
  46. package/assets/compose._-_outboxMessageId_-B4Mqtl56.js +1 -0
  47. package/assets/compose._-_outboxMessageId_-BB2Ycxyv.js +1 -0
  48. package/assets/compose._-_outboxMessageId_-BrTPm1gE.js +1 -0
  49. package/assets/compose._-_outboxMessageId_-DNzIphSB.js +1 -0
  50. package/assets/{config-import-CMt0F7iy.js → config-import-DDCiJjNB.js} +1 -1
  51. package/assets/{confirm-dialog-XKVleo_p.js → confirm-dialog-DcvMFWsx.js} +1 -1
  52. package/assets/{credential-steps-Bhbo8-zA.js → credential-steps-BA-GTxHC.js} +1 -1
  53. package/assets/{download-BzIqNtrq.js → download-DUiUTCDs.js} +1 -1
  54. package/assets/{filters-Cp8CCnd5.js → filters-RAHQYgNR.js} +1 -1
  55. package/assets/{flagged-CLgTXep4.js → flagged-BX9k1TTo.js} +1 -1
  56. package/assets/flagged-ByfW94lG.js +1 -0
  57. package/assets/{folders-BiY-9lME.js → folders-BYV7HWbV.js} +1 -1
  58. package/assets/{format-CCaI2KqP.js → format-X7XYeRkH.js} +1 -1
  59. package/assets/{help-copy-DawC2xSA.js → help-copy-DLrtBRYv.js} +1 -1
  60. package/assets/{import-CJAbCD1j.js → import-vbn8t5ab.js} +1 -1
  61. package/assets/{index-CeziyGm_.js → index-3a1Jz-mL.js} +1 -1
  62. package/assets/{index-y3enq74c.js → index-B7sEEVpJ.js} +4 -4
  63. package/assets/index-BIC5OoDZ.js +1 -0
  64. package/assets/index-BOcB1kIO.js +1 -0
  65. package/assets/index-Byx7X2Dh.js +1 -0
  66. package/assets/index-C1m1u5df.js +1 -0
  67. package/assets/{index-lxVTsHBH.js → index-C4lWhv5N.js} +4 -4
  68. package/assets/index-CImnXknM.js +1 -0
  69. package/assets/index-CPojU05e.js +1 -0
  70. package/assets/index-DQWJfuff.js +1 -0
  71. package/assets/index-DR1T5jrD.js +1 -0
  72. package/assets/index-YFZhbxKB.js +1 -0
  73. package/assets/{kbd-Ds8JAL-i.js → kbd-bGQtDDL5.js} +1 -1
  74. package/assets/{labels-CwARLqAD.js → labels-BNmEjFhq.js} +1 -1
  75. package/assets/{mail-Bux3edOt.js → mail-B2P_93hC.js} +1 -1
  76. package/assets/{mail-CSpgLNSC.js → mail-DEL_fhRL.js} +1 -1
  77. package/assets/{menu-D6aq1T1f.js → menu-BDLGBflE.js} +1 -1
  78. package/assets/minus-jpkeRykm.js +1 -0
  79. package/assets/{new-DwJ7NLZR.js → new-DeXkDQSb.js} +1 -1
  80. package/assets/onboarding-DG2JOY8C.js +1 -0
  81. package/assets/{onboarding-completion-WuK4B8wi.js → onboarding-completion-fleNtjTd.js} +1 -1
  82. package/assets/outbox-BzEBmBo_.js +1 -0
  83. package/assets/{pencil-DJPntSjN.js → pencil-BRwzP7vr.js} +1 -1
  84. package/assets/{rich-text-Ticmqq6R.js → rich-text-D_JdA-u6.js} +1 -1
  85. package/assets/{rich-text-spellcheck-worker-provider-CEjXNkTo.js → rich-text-spellcheck-worker-provider-EcsLzprC.js} +1 -1
  86. package/assets/{rotate-ccw-Snzk6-SP.js → rotate-ccw-BMtLSKeU.js} +1 -1
  87. package/assets/{row-actions-BY8sJ70m.js → row-actions-mDsB9nmt.js} +1 -1
  88. package/assets/{search-mirror-CgMxavNa.js → search-mirror-QcWTsOYf.js} +1 -1
  89. package/assets/{search-token-index-D1mRODfF.js → search-token-index-CS6saRU0.js} +1 -1
  90. package/assets/{sections-BaNfgGs8.js → sections-Bd2gpQ7i.js} +1 -1
  91. package/assets/{senders-DtfLvp-S.js → senders-CsvkiAgP.js} +1 -1
  92. package/assets/settings-DNtLRn74.js +1 -0
  93. package/assets/{settings-screen-D5PdsyBl.js → settings-screen-DxyMATUM.js} +1 -1
  94. package/assets/{shield-check-Bvnu7s8U.js → shield-check-e69uUaG5.js} +1 -1
  95. package/assets/{suggested-vips-W8f9qNN8.js → suggested-vips-jo4jtOCd.js} +1 -1
  96. package/assets/{useCalendarData-CBjm4DbE.js → useCalendarData-CW4gb00t.js} +1 -1
  97. package/assets/{useDebouncedValue-D4EGUdvx.js → useDebouncedValue-BzA-FXMB.js} +1 -1
  98. package/assets/{useFilters-CW_hrFZo.js → useFilters-2kzBAmiF.js} +1 -1
  99. package/assets/{useLabels-Dlob_XK-.js → useLabels-dKNXAicy.js} +1 -1
  100. package/assets/{useLayoutTier-Ciq4HlaK.js → useLayoutTier-Vr_7ynVD.js} +1 -1
  101. package/assets/{useMessageBodyContent-CUM4C6Cq.js → useMessageBodyContent-CCi8rlSA.js} +1 -1
  102. package/assets/{useQueries-CPnZMt_1.js → useQueries-BJL3TPFn.js} +1 -1
  103. package/assets/{useRefreshControl-DiNXvxEh.js → useRefreshControl-CNhOeSWr.js} +1 -1
  104. package/assets/{useSearchTokenContext-mRvSGuNd.js → useSearchTokenContext-BGbtRg7p.js} +1 -1
  105. package/assets/{useSemanticSearch-DqVnsXbc.js → useSemanticSearch-BZuCxxx8.js} +1 -1
  106. package/assets/{useSignature-CrrwTrAx.js → useSignature-BUDPjxUZ.js} +1 -1
  107. package/index.html +1 -1
  108. package/package.json +1 -1
  109. package/assets/_calendarObjectId-BwZvTd4q.js +0 -1
  110. package/assets/_mailboxId-r4aTgexi.js +0 -1
  111. package/assets/_messageId-B1vH4rgJ.js +0 -1
  112. package/assets/_messageId-BtEEXwAi.js +0 -1
  113. package/assets/_messageId-Df_PxEto.js +0 -1
  114. package/assets/_outboxMessageId-CxMGfZJP.js +0 -1
  115. package/assets/_recurrenceId-C2heuIxv.js +0 -1
  116. package/assets/_threadId-BCSAHVdO.js +0 -1
  117. package/assets/_threadId-qoVrigtw.js +0 -1
  118. package/assets/_threadId-vleFQxLm.js +0 -1
  119. package/assets/brief-DZPDGIPc.js +0 -1
  120. package/assets/chevron-left-KNAXuraL.js +0 -1
  121. package/assets/compose._-_outboxMessageId_-5aWrcne1.js +0 -1
  122. package/assets/compose._-_outboxMessageId_-Bi_nmcO4.js +0 -1
  123. package/assets/compose._-_outboxMessageId_-D3DAlT64.js +0 -1
  124. package/assets/compose._-_outboxMessageId_-PDfNjd_n.js +0 -1
  125. package/assets/flagged-D-ptU5v2.js +0 -1
  126. package/assets/index-BDh85s_o.js +0 -1
  127. package/assets/index-BluhX7J5.js +0 -1
  128. package/assets/index-BqjhYbTK.js +0 -1
  129. package/assets/index-BtEEXwAi.js +0 -1
  130. package/assets/index-CJDhCMZY.js +0 -1
  131. package/assets/index-CxA7LBuE.js +0 -1
  132. package/assets/index-D8-XdCBI.js +0 -1
  133. package/assets/index-Df_PxEto.js +0 -1
  134. package/assets/index-lqmSDAG_.js +0 -1
  135. package/assets/minus-DW1FraKg.js +0 -1
  136. package/assets/onboarding-0lqsEEMH.js +0 -1
  137. package/assets/outbox-4__1O2vy.js +0 -1
  138. package/assets/settings-JoaCyeEy.js +0 -1
@@ -1 +1 @@
1
- import{r as p,i as b,dR as E,c as C,dS as x,dp as F,dT as D,h as M,dU as N,dV as P,dW as L,dX as z}from"./index-lxVTsHBH.js";const B=(e,t)=>{if(e.state==="Expired")return"Expired";if(e.scope!=="Temporary"||!e.expiresAt)return"Active";const r=Date.parse(e.expiresAt);return Number.isNaN(r)?"Active":r<=t?"Expired":"Active"},K=e=>{if(!e)return;const t=Date.parse(e);if(!Number.isNaN(t))return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},O=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,a,i,n]=r,s=new Date(Number(a),Number(i)-1,Number(n),23,59,59,0);if(Number.isNaN(s.getTime()))return;const o=-t.getTimezoneOffset(),d=o>=0?"+":"-",l=Math.abs(o),c=String(Math.floor(l/60)).padStart(2,"0"),f=String(l%60).padStart(2,"0"),u=m=>String(m).padStart(2,"0");return`${s.getFullYear()}-${u(s.getMonth()+1)}-${u(s.getDate())}T${u(s.getHours())}:${u(s.getMinutes())}:${u(s.getSeconds())}${d}${c}:${f}`},h="None",V=e=>!e.literalClauses.some(t=>t.field==="HasWords"),y=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h}),X=({mode:e,ruleScope:t})=>t==="standing"?"standing":t==="until"?"temporary":e==="selected"?"just-these":"all-like-these",G=({mode:e,ruleScope:t,anchorMessageId:r,clauses:a,matchOperator:i,moveMailboxId:n,until:s})=>({...e==="similar"&&r?{anchorMessageId:r}:{},matchOperator:i==="all"?"And":"Or",literalClauses:a.map(o=>({field:o.field,value:o.value})),moveMailboxId:n,expiresAt:t==="until"?O(s??""):void 0}),S=(e,t,r)=>({name:r,scope:t==="standing"?"Standing":"Temporary",...t==="temporary"&&e.expiresAt?{expiresAt:e.expiresAt}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),T=new Set(["Complete","Failed"]),v=e=>e!==void 0&&T.has(e),w=1e3,J=15e3,R=e=>{const t=Math.max(0,e),r=w*2**t;return Math.min(r,J)},_=(e,t,r)=>{if(e)return{kind:r?"restartFailed":"startFailed",error:e};if(t)return{kind:"statusUnreadable",error:t}},Y=e=>{const[t,r]=p.useState(),a=b({...E(),onSuccess:g=>r(g.organizeJobId)}),{mutate:i}=a,n=C({...x({path:{accountId:e??"",organizeJobId:t??""}}),enabled:!!e&&!!t,refetchInterval:g=>{const I=g.state.data?.state;return v(I)?!1:R(g.state.dataUpdateCount)}}),s=p.useCallback(g=>{e&&i({path:{accountId:e},body:y(g)})},[e,i]),{refetch:o}=n,d=p.useCallback(()=>{o()},[o]),l=n.data,c=a.isPending?void 0:l,f=c?.state??a.data?.state,u=v(c?.state),m={state:f,matchedCount:c?.matchedCount??0,appliedCount:c?.appliedCount??0,failedCount:c?.failedCount??0,errorMessage:c?.errorMessage??""};return{start:s,refreshStatus:d,progress:m,isStarting:a.isPending,isRunning:!!t&&!u,isDone:u,failure:_(a.error,n.error,!!l)}},Z=["From","Subject","HasWords","ListId","FromDomain"],$=e=>{const t=e.trim(),r=t.match(/<([^>]+)>/);return(r?r[1]:t).trim().toLowerCase()},ee=(e,t)=>e==="ListId"?$(t):t.trim(),k=e=>e==="all"?"And":"Or",U=(e,t)=>{const r=e.widen!==void 0&&!e.widen.inactive,a=e.clauses.map(i=>({field:i.field,value:i.value}));return{...r&&t?{anchorMessageId:t}:{},matchOperator:k(e.matchOperator),literalClauses:a}},Q=e=>e.anchorMessageId!==void 0||!e.literalClauses.some(t=>t.field==="HasWords"),W=e=>JSON.stringify({anchor:e.anchorMessageId??null,operator:e.matchOperator,clauses:e.literalClauses.map(t=>`${t.field} ${t.value}`)}),te=(e,t)=>{const r=U(e,t);return{...r.anchorMessageId?{anchorMessageId:r.anchorMessageId}:{},matchOperator:r.matchOperator,literalClauses:r.literalClauses,moveMailboxId:e.moveMailboxId,labelId:e.labelId,expiresAt:e.scope==="until"?O(e.until??""):void 0}},j=(e,t)=>e.error!==void 0&&e.errorSignature===t?{status:"error",reason:e.error}:e.count===void 0?{status:"loading"}:e.previewedSignature===t?{status:"ready",count:e.count}:{status:"ready",count:e.count,stale:!0},q=350,re=(e,t,r)=>{const a=b(F()),{mutateAsync:i}=a,n=W(t),[s,o]=p.useState(()=>({})),d=p.useRef(t);d.current=t;const l=p.useRef(n),c=Q(t);return p.useEffect(()=>{if(!e||!c||n===s.previewedSignature||n===s.errorSignature)return;const f=setTimeout(()=>{const u=n;l.current=u,i({path:{accountId:e},body:y({...d.current})}).then(m=>{l.current===u&&o({count:m.matchedCount,matchedIds:m.messageIds,previewedSignature:u})}).catch(m=>{l.current===u&&o(g=>({...g,error:m instanceof Error?m.message:"Couldn't count matches.",errorSignature:u}))})},q);return()=>clearTimeout(f)},[e,c,n,s.previewedSignature,s.errorSignature,i]),c?{count:j(s,n),matchedIds:s.previewedSignature===n?s.matchedIds??[]:[]}:{count:{status:"error",reason:D},matchedIds:[]}},A=e=>P({path:{accountId:e}}),se=e=>{const t=C({...L({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},ae=e=>{const t=M(),r=b({...N(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a,mutateAsync:i}=r,n=p.useCallback((o,d,l)=>{e&&a({path:{accountId:e},body:S(o,d,l)})},[e,a]),s=p.useCallback(async(o,d,l)=>e?i({path:{accountId:e},body:S(o,d,l)}).then(()=>!0,()=>!1):!1,[e,i]);return{createFilter:n,createFilterAsync:s,isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},ne=e=>{const t=M(),r=b({...z(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a}=r;return{deleteFilter:p.useCallback(n=>{e&&a({path:{accountId:e,filterId:n}})},[e,a]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}};export{h as N,Z as S,Y as a,A as b,te as c,K as d,se as e,B as f,ne as g,y as h,ae as i,G as j,V as k,ee as n,X as o,O as p,U as r,re as u};
1
+ import{r as p,i as b,dR as E,c as C,dS as x,dp as F,dT as D,h as M,dU as N,dV as P,dW as L,dX as z}from"./index-C4lWhv5N.js";const B=(e,t)=>{if(e.state==="Expired")return"Expired";if(e.scope!=="Temporary"||!e.expiresAt)return"Active";const r=Date.parse(e.expiresAt);return Number.isNaN(r)?"Active":r<=t?"Expired":"Active"},K=e=>{if(!e)return;const t=Date.parse(e);if(!Number.isNaN(t))return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},O=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,a,i,n]=r,s=new Date(Number(a),Number(i)-1,Number(n),23,59,59,0);if(Number.isNaN(s.getTime()))return;const o=-t.getTimezoneOffset(),d=o>=0?"+":"-",l=Math.abs(o),c=String(Math.floor(l/60)).padStart(2,"0"),f=String(l%60).padStart(2,"0"),u=m=>String(m).padStart(2,"0");return`${s.getFullYear()}-${u(s.getMonth()+1)}-${u(s.getDate())}T${u(s.getHours())}:${u(s.getMinutes())}:${u(s.getSeconds())}${d}${c}:${f}`},h="None",V=e=>!e.literalClauses.some(t=>t.field==="HasWords"),y=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h}),X=({mode:e,ruleScope:t})=>t==="standing"?"standing":t==="until"?"temporary":e==="selected"?"just-these":"all-like-these",G=({mode:e,ruleScope:t,anchorMessageId:r,clauses:a,matchOperator:i,moveMailboxId:n,until:s})=>({...e==="similar"&&r?{anchorMessageId:r}:{},matchOperator:i==="all"?"And":"Or",literalClauses:a.map(o=>({field:o.field,value:o.value})),moveMailboxId:n,expiresAt:t==="until"?O(s??""):void 0}),S=(e,t,r)=>({name:r,scope:t==="standing"?"Standing":"Temporary",...t==="temporary"&&e.expiresAt?{expiresAt:e.expiresAt}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),T=new Set(["Complete","Failed"]),v=e=>e!==void 0&&T.has(e),w=1e3,J=15e3,R=e=>{const t=Math.max(0,e),r=w*2**t;return Math.min(r,J)},_=(e,t,r)=>{if(e)return{kind:r?"restartFailed":"startFailed",error:e};if(t)return{kind:"statusUnreadable",error:t}},Y=e=>{const[t,r]=p.useState(),a=b({...E(),onSuccess:g=>r(g.organizeJobId)}),{mutate:i}=a,n=C({...x({path:{accountId:e??"",organizeJobId:t??""}}),enabled:!!e&&!!t,refetchInterval:g=>{const I=g.state.data?.state;return v(I)?!1:R(g.state.dataUpdateCount)}}),s=p.useCallback(g=>{e&&i({path:{accountId:e},body:y(g)})},[e,i]),{refetch:o}=n,d=p.useCallback(()=>{o()},[o]),l=n.data,c=a.isPending?void 0:l,f=c?.state??a.data?.state,u=v(c?.state),m={state:f,matchedCount:c?.matchedCount??0,appliedCount:c?.appliedCount??0,failedCount:c?.failedCount??0,errorMessage:c?.errorMessage??""};return{start:s,refreshStatus:d,progress:m,isStarting:a.isPending,isRunning:!!t&&!u,isDone:u,failure:_(a.error,n.error,!!l)}},Z=["From","Subject","HasWords","ListId","FromDomain"],$=e=>{const t=e.trim(),r=t.match(/<([^>]+)>/);return(r?r[1]:t).trim().toLowerCase()},ee=(e,t)=>e==="ListId"?$(t):t.trim(),k=e=>e==="all"?"And":"Or",U=(e,t)=>{const r=e.widen!==void 0&&!e.widen.inactive,a=e.clauses.map(i=>({field:i.field,value:i.value}));return{...r&&t?{anchorMessageId:t}:{},matchOperator:k(e.matchOperator),literalClauses:a}},Q=e=>e.anchorMessageId!==void 0||!e.literalClauses.some(t=>t.field==="HasWords"),W=e=>JSON.stringify({anchor:e.anchorMessageId??null,operator:e.matchOperator,clauses:e.literalClauses.map(t=>`${t.field} ${t.value}`)}),te=(e,t)=>{const r=U(e,t);return{...r.anchorMessageId?{anchorMessageId:r.anchorMessageId}:{},matchOperator:r.matchOperator,literalClauses:r.literalClauses,moveMailboxId:e.moveMailboxId,labelId:e.labelId,expiresAt:e.scope==="until"?O(e.until??""):void 0}},j=(e,t)=>e.error!==void 0&&e.errorSignature===t?{status:"error",reason:e.error}:e.count===void 0?{status:"loading"}:e.previewedSignature===t?{status:"ready",count:e.count}:{status:"ready",count:e.count,stale:!0},q=350,re=(e,t,r)=>{const a=b(F()),{mutateAsync:i}=a,n=W(t),[s,o]=p.useState(()=>({})),d=p.useRef(t);d.current=t;const l=p.useRef(n),c=Q(t);return p.useEffect(()=>{if(!e||!c||n===s.previewedSignature||n===s.errorSignature)return;const f=setTimeout(()=>{const u=n;l.current=u,i({path:{accountId:e},body:y({...d.current})}).then(m=>{l.current===u&&o({count:m.matchedCount,matchedIds:m.messageIds,previewedSignature:u})}).catch(m=>{l.current===u&&o(g=>({...g,error:m instanceof Error?m.message:"Couldn't count matches.",errorSignature:u}))})},q);return()=>clearTimeout(f)},[e,c,n,s.previewedSignature,s.errorSignature,i]),c?{count:j(s,n),matchedIds:s.previewedSignature===n?s.matchedIds??[]:[]}:{count:{status:"error",reason:D},matchedIds:[]}},A=e=>P({path:{accountId:e}}),se=e=>{const t=C({...L({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},ae=e=>{const t=M(),r=b({...N(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a,mutateAsync:i}=r,n=p.useCallback((o,d,l)=>{e&&a({path:{accountId:e},body:S(o,d,l)})},[e,a]),s=p.useCallback(async(o,d,l)=>e?i({path:{accountId:e},body:S(o,d,l)}).then(()=>!0,()=>!1):!1,[e,i]);return{createFilter:n,createFilterAsync:s,isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},ne=e=>{const t=M(),r=b({...z(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a}=r;return{deleteFilter:p.useCallback(n=>{e&&a({path:{accountId:e,filterId:n}})},[e,a]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}};export{h as N,Z as S,Y as a,A as b,te as c,K as d,se as e,B as f,ne as g,y as h,ae as i,G as j,V as k,ee as n,X as o,O as p,U as r,re as u};
@@ -1 +1 @@
1
- import{c as d,dM as L,h as n,i as l,dN as p,r as o,dO as y,dP as c,dQ as g}from"./index-lxVTsHBH.js";const u=e=>y({path:{accountId:e}}),f=e=>{const r=d({...L({path:{accountId:e??""}}),enabled:!!e});return{labels:r.data?.items??[],isPending:r.isPending,isError:r.isError,error:r.error,refetch:r.refetch}},h=e=>{const r=n(),t=l({...p(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutateAsync:s}=t;return{createLabel:o.useCallback((a,i="Default")=>e?s({path:{accountId:e},body:{name:a,color:i}}):Promise.reject(new Error("No account")),[e,s]),isPending:t.isPending,isError:t.isError,error:t.error,reset:t.reset}},m=e=>{const r=n(),t=l({...c(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutate:s}=t;return{updateLabel:o.useCallback((a,i)=>{e&&s({path:{accountId:e,labelId:a},body:i})},[e,s]),isPending:t.isPending,updatingLabelId:t.isPending?t.variables?.path.labelId:void 0}},C=e=>{const r=n(),t=l({...g(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutate:s}=t;return{deleteLabel:o.useCallback(a=>{e&&s({path:{accountId:e,labelId:a}})},[e,s]),isPending:t.isPending,deletingLabelId:t.isPending?t.variables?.path.labelId:void 0}};export{f as a,m as b,C as c,h as u};
1
+ import{c as d,dM as L,h as n,i as l,dN as p,r as o,dO as y,dP as c,dQ as g}from"./index-C4lWhv5N.js";const u=e=>y({path:{accountId:e}}),f=e=>{const r=d({...L({path:{accountId:e??""}}),enabled:!!e});return{labels:r.data?.items??[],isPending:r.isPending,isError:r.isError,error:r.error,refetch:r.refetch}},h=e=>{const r=n(),t=l({...p(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutateAsync:s}=t;return{createLabel:o.useCallback((a,i="Default")=>e?s({path:{accountId:e},body:{name:a,color:i}}):Promise.reject(new Error("No account")),[e,s]),isPending:t.isPending,isError:t.isError,error:t.error,reset:t.reset}},m=e=>{const r=n(),t=l({...c(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutate:s}=t;return{updateLabel:o.useCallback((a,i)=>{e&&s({path:{accountId:e,labelId:a},body:i})},[e,s]),isPending:t.isPending,updatingLabelId:t.isPending?t.variables?.path.labelId:void 0}},C=e=>{const r=n(),t=l({...g(),onSuccess:()=>{e&&r.invalidateQueries({queryKey:u(e)})}}),{mutate:s}=t;return{deleteLabel:o.useCallback(a=>{e&&s({path:{accountId:e,labelId:a}})},[e,s]),isPending:t.isPending,deletingLabelId:t.isPending?t.variables?.path.labelId:void 0}};export{f as a,m as b,C as c,h as u};
@@ -1 +1 @@
1
- import{e as r,u as s,r as o,bJ as t,bK as n}from"./index-lxVTsHBH.js";const p=r("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);function l(){const e=s();return o.useCallback(a=>{e({to:"/mail/brief",search:{q:a||void 0}})},[e])}function h(){const e=s();return o.useCallback((a,i)=>{e({to:"/mail/$mailboxId",params:{mailboxId:a},search:{q:i||void 0}})},[e])}const c=768,d=e=>e!=="desktop",b=()=>{const e=t(`(min-width: ${c}px)`);return t(n)?"desktop":e?"tablet":"phone"};export{p as B,l as a,h as b,d as i,b as u};
1
+ import{e as r,u as s,r as o,bJ as t,bK as n}from"./index-C4lWhv5N.js";const p=r("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);function l(){const e=s();return o.useCallback(a=>{e({to:"/mail/brief",search:{q:a||void 0}})},[e])}function h(){const e=s();return o.useCallback((a,i)=>{e({to:"/mail/$mailboxId",params:{mailboxId:a},search:{q:i||void 0}})},[e])}const c=768,d=e=>e!=="desktop",b=()=>{const e=t(`(min-width: ${c}px)`);return t(n)?"desktop":e?"tablet":"phone"};export{p as B,l as a,h as b,d as i,b as u};
@@ -1 +1 @@
1
- import{r as c,u as M,c3 as S,c4 as O,a8 as h,c5 as B,q as P,aa as U,h as N,c as $,cu as D,cv as F}from"./index-lxVTsHBH.js";const w="/mail/brief/compose/{-$outboxMessageId}",R="/mail/flagged/compose/{-$outboxMessageId}",E="/mail/outbox/compose/{-$outboxMessageId}",k="/mail/$mailboxId/compose/{-$outboxMessageId}";function T(){const e=h({from:w,shouldThrow:!1}),t=h({from:R,shouldThrow:!1}),r=h({from:E,shouldThrow:!1}),s=h({from:k,shouldThrow:!1});return e??t??r??s}function z(){return T()!==void 0}function Y(){return T()?.outboxMessageId}function v(e,t,r){return e==="flagged"?{to:R,params:{outboxMessageId:r}}:e==="outbox"?{to:E,params:{outboxMessageId:r}}:e==="mailbox"&&t?{to:k,params:{mailboxId:t,outboxMessageId:r}}:{to:w,params:{outboxMessageId:r}}}function b(){const e=M(),t=S(),{list:r,mailboxId:s}=O();return c.useCallback((n,o)=>{e({...v(r,s,n),search:a=>a,hash:o?.keepPanels?!0:t,replace:o?.replace??!1})},[e,t,r,s])}function j(){const e=b();return c.useCallback(()=>e(void 0),[e])}function J(){const e=b();return c.useCallback(t=>e(t),[e])}function V(){const e=b();return c.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function Z(){return B()}const L=e=>{const t=e.filter(n=>!n.isMultipart&&n.disposition!=="attachment"&&n.mediaType==="TEXT"&&n.contentUrl.length>0),r=t.find(n=>n.mediaSubtype.toUpperCase()==="HTML");if(r)return{kind:"html",contentUrl:r.contentUrl};const s=t.find(n=>n.mediaSubtype.toUpperCase()==="PLAIN");return s?{kind:"text",contentUrl:s.contentUrl}:null},g={all:["messages"],detail:e=>[...g.all,"detail",e],body:e=>[...g.detail(e),"body"]};class f extends Error{reason;status;retryAfterSeconds;constructor(t,r,s,n){super(r),this.name="BodyFetchError",this.reason=t,this.status=s,this.retryAfterSeconds=n}}const _=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},q=8,K="x-remit-403-reason",Q=(e,t)=>{const r=t?.trim()??"";return e===401?"auth":e===403?r.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},I=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,X=(e,t)=>{const r=(t??"").toLowerCase();return!!(e==="text"&&r.startsWith("text/html"))},G=async(e,t,r=async()=>null)=>{const s={},n=await r();n&&(s.Authorization=`Bearer ${n}`);const o=await F(e,{headers:s});if(o.status===202)throw new f("not-ready","Message body is still syncing",202,_(o.headers.get("Retry-After")));if(!o.ok){const l=o.headers.get(K),m=Q(o.status,l);throw new f(m,`Failed to load message body (${o.status} ${o.statusText})`,o.status)}const a=o.headers.get("content-type");if(X(t,a))throw new f("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${a}`);const y=await o.text();if(I(y,a))throw new f("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return y},H=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),ee=({messageId:e,bodyParts:t,enabled:r=!0})=>{const s=t?L(t):null,n=P(),{getToken:o}=U(),a=c.useRef(null),y=N(),l=c.useRef(!1),m=c.useRef(null),C=e&&s?`${e}:${s.contentUrl}`:null;m.current!==C&&(m.current=C,l.current=!1);const i=$({queryKey:e?[...g.body(e),s?.contentUrl??null]:["messages","body","noop"],queryFn:()=>{if(!s)throw new Error("No renderable body part");if(!e)throw new Error("No messageId");const d=l.current;return l.current=!1,H({fetchContent:(u,A)=>G(u,A,o),refetchDescribeMessage:()=>y.refetchQueries({queryKey:D({path:{messageId:e}})})},{contentUrl:s.contentUrl,kind:s.kind,isRetryAfterNotReady:d})},enabled:r&&!!e&&!!s,staleTime:300*1e3,gcTime:1800*1e3,retry:(d,u)=>u instanceof f&&u.reason==="not-ready"?d<q:d<1,retryDelay:(d,u)=>u instanceof f&&u.reason==="not-ready"?(l.current=!0,(u.retryAfterSeconds??1)*1e3):1e3,meta:{softError:!0}}),p=i.isLoading&&!!s;c.useEffect(()=>{p&&(a.current=performance.now())},[p]),c.useEffect(()=>{i.isSuccess&&a.current!==null&&(n.recordTiming("message.body.load",Math.round(performance.now()-a.current)),a.current=null)},[i.isSuccess,n]);const x=i.data&&s?{kind:s.kind,body:i.data}:void 0;return{picked:s,data:x,isLoading:p,isError:i.isError,error:i.error,refetch:i.refetch}};export{f as B,z as a,ee as b,Y as c,V as d,Z as e,J as f,Q as g,j as u};
1
+ import{r as c,u as M,c3 as S,c4 as O,a8 as h,c5 as B,q as P,aa as U,h as N,c as $,cu as D,cv as F}from"./index-C4lWhv5N.js";const w="/mail/brief/compose/{-$outboxMessageId}",R="/mail/flagged/compose/{-$outboxMessageId}",E="/mail/outbox/compose/{-$outboxMessageId}",k="/mail/$mailboxId/compose/{-$outboxMessageId}";function T(){const e=h({from:w,shouldThrow:!1}),t=h({from:R,shouldThrow:!1}),r=h({from:E,shouldThrow:!1}),s=h({from:k,shouldThrow:!1});return e??t??r??s}function z(){return T()!==void 0}function Y(){return T()?.outboxMessageId}function v(e,t,r){return e==="flagged"?{to:R,params:{outboxMessageId:r}}:e==="outbox"?{to:E,params:{outboxMessageId:r}}:e==="mailbox"&&t?{to:k,params:{mailboxId:t,outboxMessageId:r}}:{to:w,params:{outboxMessageId:r}}}function b(){const e=M(),t=S(),{list:r,mailboxId:s}=O();return c.useCallback((n,o)=>{e({...v(r,s,n),search:a=>a,hash:o?.keepPanels?!0:t,replace:o?.replace??!1})},[e,t,r,s])}function j(){const e=b();return c.useCallback(()=>e(void 0),[e])}function J(){const e=b();return c.useCallback(t=>e(t),[e])}function V(){const e=b();return c.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function Z(){return B()}const L=e=>{const t=e.filter(n=>!n.isMultipart&&n.disposition!=="attachment"&&n.mediaType==="TEXT"&&n.contentUrl.length>0),r=t.find(n=>n.mediaSubtype.toUpperCase()==="HTML");if(r)return{kind:"html",contentUrl:r.contentUrl};const s=t.find(n=>n.mediaSubtype.toUpperCase()==="PLAIN");return s?{kind:"text",contentUrl:s.contentUrl}:null},g={all:["messages"],detail:e=>[...g.all,"detail",e],body:e=>[...g.detail(e),"body"]};class f extends Error{reason;status;retryAfterSeconds;constructor(t,r,s,n){super(r),this.name="BodyFetchError",this.reason=t,this.status=s,this.retryAfterSeconds=n}}const _=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},q=8,K="x-remit-403-reason",Q=(e,t)=>{const r=t?.trim()??"";return e===401?"auth":e===403?r.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},I=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,X=(e,t)=>{const r=(t??"").toLowerCase();return!!(e==="text"&&r.startsWith("text/html"))},G=async(e,t,r=async()=>null)=>{const s={},n=await r();n&&(s.Authorization=`Bearer ${n}`);const o=await F(e,{headers:s});if(o.status===202)throw new f("not-ready","Message body is still syncing",202,_(o.headers.get("Retry-After")));if(!o.ok){const l=o.headers.get(K),m=Q(o.status,l);throw new f(m,`Failed to load message body (${o.status} ${o.statusText})`,o.status)}const a=o.headers.get("content-type");if(X(t,a))throw new f("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${a}`);const y=await o.text();if(I(y,a))throw new f("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return y},H=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),ee=({messageId:e,bodyParts:t,enabled:r=!0})=>{const s=t?L(t):null,n=P(),{getToken:o}=U(),a=c.useRef(null),y=N(),l=c.useRef(!1),m=c.useRef(null),C=e&&s?`${e}:${s.contentUrl}`:null;m.current!==C&&(m.current=C,l.current=!1);const i=$({queryKey:e?[...g.body(e),s?.contentUrl??null]:["messages","body","noop"],queryFn:()=>{if(!s)throw new Error("No renderable body part");if(!e)throw new Error("No messageId");const d=l.current;return l.current=!1,H({fetchContent:(u,A)=>G(u,A,o),refetchDescribeMessage:()=>y.refetchQueries({queryKey:D({path:{messageId:e}})})},{contentUrl:s.contentUrl,kind:s.kind,isRetryAfterNotReady:d})},enabled:r&&!!e&&!!s,staleTime:300*1e3,gcTime:1800*1e3,retry:(d,u)=>u instanceof f&&u.reason==="not-ready"?d<q:d<1,retryDelay:(d,u)=>u instanceof f&&u.reason==="not-ready"?(l.current=!0,(u.retryAfterSeconds??1)*1e3):1e3,meta:{softError:!0}}),p=i.isLoading&&!!s;c.useEffect(()=>{p&&(a.current=performance.now())},[p]),c.useEffect(()=>{i.isSuccess&&a.current!==null&&(n.recordTiming("message.body.load",Math.round(performance.now()-a.current)),a.current=null)},[i.isSuccess,n]);const x=i.data&&s?{kind:s.kind,body:i.data}:void 0;return{picked:s,data:x,isLoading:p,isError:i.isError,error:i.error,refetch:i.refetch}};export{f as B,z as a,ee as b,Y as c,V as d,Z as e,J as f,Q as g,j as u};
@@ -1 +1 @@
1
- import{bL as E,bM as y,bN as S,bO as w,bP as C,h as k,bQ as M,bR as q,r as d,bS as x,bT as H,bU as L,bV as P,bW as R,bX as B,bY as T}from"./index-lxVTsHBH.js";function v(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function A(r,e,s){const t=r.slice(0);return t[e]=s,t}var U=class extends E{#i;#e;#n;#r;#s;#t;#o;#u;#h;#a=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#f(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#b(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,c=i.some((o,f)=>o!==s[f]),b=u||c,p=b?!0:n.some((o,f)=>{const g=this.#e[f];return!g||!S(o,g)});!b&&!p||(b&&(this.#a=t,this.#s=i),this.#e=n,this.hasListeners()&&(b&&(v(s,i).forEach(o=>{o.destroy()}),v(i,s).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#d()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#b(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#c(t,s)]}#c(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#p(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#b(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#f(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=A(this.#e,s,e),this.#d())}#d(){if(this.hasListeners()){const r=this.#c(this.#e,this.#a),e=this.#p(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function I({queries:r,...e},s){const t=k(),i=M(),n=q(),u=d.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{x(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),L(n);const[c]=d.useState(()=>new U(t,u,e)),[b,p,o]=c.getOptimisticResult(u,e.combine),f=!i&&e.subscribed!==!1;d.useSyncExternalStore(d.useCallback(h=>f?c.subscribe(y.batchCalls(h)):P,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d.useEffect(()=>{c.setQueries(u,e)},[u,e,c]);const m=b.some((h,a)=>R(u[a],h))?b.flatMap((h,a)=>{const l=u[a];if(l&&R(l,h)){const Q=new C(t,l);return B(l,Q,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const O=b.find((h,a)=>{const l=u[a];return l&&T({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(O?.error)throw O.error;return p(o())}export{I as u};
1
+ import{bL as E,bM as y,bN as S,bO as w,bP as C,h as k,bQ as M,bR as q,r as d,bS as x,bT as H,bU as L,bV as P,bW as R,bX as B,bY as T}from"./index-C4lWhv5N.js";function v(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function A(r,e,s){const t=r.slice(0);return t[e]=s,t}var U=class extends E{#i;#e;#n;#r;#s;#t;#o;#u;#h;#a=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#f(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#b(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,c=i.some((o,f)=>o!==s[f]),b=u||c,p=b?!0:n.some((o,f)=>{const g=this.#e[f];return!g||!S(o,g)});!b&&!p||(b&&(this.#a=t,this.#s=i),this.#e=n,this.hasListeners()&&(b&&(v(s,i).forEach(o=>{o.destroy()}),v(i,s).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#d()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#b(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#c(t,s)]}#c(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#p(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#b(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#f(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=A(this.#e,s,e),this.#d())}#d(){if(this.hasListeners()){const r=this.#c(this.#e,this.#a),e=this.#p(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function I({queries:r,...e},s){const t=k(),i=M(),n=q(),u=d.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{x(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),L(n);const[c]=d.useState(()=>new U(t,u,e)),[b,p,o]=c.getOptimisticResult(u,e.combine),f=!i&&e.subscribed!==!1;d.useSyncExternalStore(d.useCallback(h=>f?c.subscribe(y.batchCalls(h)):P,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d.useEffect(()=>{c.setQueries(u,e)},[u,e,c]);const m=b.some((h,a)=>R(u[a],h))?b.flatMap((h,a)=>{const l=u[a];if(l&&R(l,h)){const Q=new C(t,l);return B(l,Q,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const O=b.find((h,a)=>{const l=u[a];return l&&T({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(O?.error)throw O.error;return p(o())}export{I as u};
@@ -1 +1 @@
1
- import{j as E,_ as Q,t as W,f as U,r as o,aN as R,h as O,C as $,q as z,M as B,N as G,P as I,Q as X}from"./index-lxVTsHBH.js";import{C as V}from"./circle-check-big-B1p6oh-i.js";import{R as J,i as Y,t as Z}from"./search-token-index-D1mRODfF.js";import{u as P}from"./useQueries-CPnZMt_1.js";function Se({state:e,onRefresh:s,label:t,errorMessage:r,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",n=e==="error",h=e==="success",y=n?E.jsx(Q,{className:"size-4 text-danger"}):h?E.jsx(V,{className:"size-4 text-positive"}):E.jsx(J,{className:W("size-4",i&&"animate-spin")}),w=n?`${t} — failed: ${r??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:y,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:n?r:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const ee=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function L(e){return!!e&&ee.has(e)}const q=3e3,te=q*2,T={syncing:!1,resolved:!1,synced:0,total:0};function we(e,s){const t=e.join(","),[r,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),te);return()=>clearTimeout(m)},[t,s]);const i=P({queries:e.map(m=>({...R({path:{accountId:m}}),enabled:s&&!r,refetchInterval:q,meta:{softError:!0}}))}),n=i.every(m=>m.isSuccess||m.isError),h=i.length===0||n||u;let y=!1,w=0,S=0;for(const m of i)if(L(m.data?.syncPhase)){y=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,S+=l.messagesTotal}const x=s&&h&&!y;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?T:{syncing:y,resolved:!0,synced:w,total:S}}const se=180*1e3,xe=30*1e3;let F=0;const M=new Set,ne=(e=Date.now())=>{F=e+se;for(const s of M)s()},pe=(e=Date.now())=>e<F,Ee=e=>(M.add(e),()=>{M.delete(e)}),_=6e4,re=new Set(["sent","drafts","trash","archive"]),C=(e,s)=>{const t=new Map;for(const r of e){const a=s.get(r.mailboxId)?.role;a&&re.has(a)||t.set(r.mailboxId,r.messagesTotal)}return t},j=(e,s)=>{const t=[];for(const[r,a]of s)a>(e.get(r)??0)&&t.push(r);return t},oe=(e,s)=>j(e,s).length>0,D=o.createContext(null),ae=()=>{const e=o.useContext(D);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function be({accountIds:e,children:s}){const t=O(),{resultFolderIndex:r}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,n]=o.useState(new Set),h=P({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:_,staleTime:_,meta:{softError:!0}}))}),y=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=C(b.mailboxes??[],r),k=c.current.get(d);if(c.current.set(d,g),k){const A=j(k,g);A.length>0&&Y(t,Z(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const K=a.current.get(d)??new Map;oe(K,g)&&(f.add(d),l=!0)}),l&&n(f)},[w,y]);const S=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{n(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(R({path:{accountId:f}}).queryKey);a.current.set(f,C(d?.mailboxes??[],r)),u.current.add(f)}},[t,r]),m=o.useMemo(()=>({hasNewMail:S,acknowledge:x}),[S,x]);return E.jsx(D.Provider,{value:m,children:s})}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),v=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{I(e,{softError:!0},"user")&&X(e)},N=(e,s)=>e.fetchQuery({...R({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,fe=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:r=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const n=await s().then(S=>({ok:!0,data:S})).catch(S=>({ok:!1,error:S}));if(!n.ok)return{accountId:e,message:v(n.error)};const{syncPhase:h,lastSyncAt:y}=n.data;if((y??0)>t&&!L(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(n.data)>r&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,r,a)=>{const u=await N(e,t).then(n=>({ok:!0,lastSyncAt:n.lastSyncAt??0,inboxSyncedAt:H(n)})).catch(n=>({ok:!1,error:n}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:v(u.error)};const c=await B({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(n=>({ok:!1,error:n}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:v(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>N(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:r});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=O(),r=z(),{acknowledge:a}=ae(),[u,c]=o.useState("idle"),[i,n]=o.useState(),h=o.useRef(0),y=o.useRef(e);y.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const S=o.useCallback(()=>{const x=y.current;if(x.length===0){c("error"),n("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),n(void 0),ne();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:G({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,r,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),n(b[0]?.message))})()},[a,t,r]);return{state:u,errorMessage:i,refresh:S}};export{xe as H,be as M,Se as R,Re as a,L as b,we as c,pe as i,Ee as s,ae as u};
1
+ import{j as E,_ as Q,t as W,f as U,r as o,aN as R,h as O,C as $,q as z,M as B,N as G,P as I,Q as X}from"./index-C4lWhv5N.js";import{C as V}from"./circle-check-big-C86hi2JF.js";import{R as J,i as Y,t as Z}from"./search-token-index-CS6saRU0.js";import{u as P}from"./useQueries-BJL3TPFn.js";function Se({state:e,onRefresh:s,label:t,errorMessage:r,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",n=e==="error",h=e==="success",y=n?E.jsx(Q,{className:"size-4 text-danger"}):h?E.jsx(V,{className:"size-4 text-positive"}):E.jsx(J,{className:W("size-4",i&&"animate-spin")}),w=n?`${t} — failed: ${r??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:y,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:n?r:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const ee=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function L(e){return!!e&&ee.has(e)}const q=3e3,te=q*2,T={syncing:!1,resolved:!1,synced:0,total:0};function we(e,s){const t=e.join(","),[r,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),te);return()=>clearTimeout(m)},[t,s]);const i=P({queries:e.map(m=>({...R({path:{accountId:m}}),enabled:s&&!r,refetchInterval:q,meta:{softError:!0}}))}),n=i.every(m=>m.isSuccess||m.isError),h=i.length===0||n||u;let y=!1,w=0,S=0;for(const m of i)if(L(m.data?.syncPhase)){y=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,S+=l.messagesTotal}const x=s&&h&&!y;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?T:{syncing:y,resolved:!0,synced:w,total:S}}const se=180*1e3,xe=30*1e3;let F=0;const M=new Set,ne=(e=Date.now())=>{F=e+se;for(const s of M)s()},pe=(e=Date.now())=>e<F,Ee=e=>(M.add(e),()=>{M.delete(e)}),_=6e4,re=new Set(["sent","drafts","trash","archive"]),C=(e,s)=>{const t=new Map;for(const r of e){const a=s.get(r.mailboxId)?.role;a&&re.has(a)||t.set(r.mailboxId,r.messagesTotal)}return t},j=(e,s)=>{const t=[];for(const[r,a]of s)a>(e.get(r)??0)&&t.push(r);return t},oe=(e,s)=>j(e,s).length>0,D=o.createContext(null),ae=()=>{const e=o.useContext(D);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function be({accountIds:e,children:s}){const t=O(),{resultFolderIndex:r}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,n]=o.useState(new Set),h=P({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:_,staleTime:_,meta:{softError:!0}}))}),y=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=C(b.mailboxes??[],r),k=c.current.get(d);if(c.current.set(d,g),k){const A=j(k,g);A.length>0&&Y(t,Z(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const K=a.current.get(d)??new Map;oe(K,g)&&(f.add(d),l=!0)}),l&&n(f)},[w,y]);const S=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{n(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(R({path:{accountId:f}}).queryKey);a.current.set(f,C(d?.mailboxes??[],r)),u.current.add(f)}},[t,r]),m=o.useMemo(()=>({hasNewMail:S,acknowledge:x}),[S,x]);return E.jsx(D.Provider,{value:m,children:s})}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),v=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{I(e,{softError:!0},"user")&&X(e)},N=(e,s)=>e.fetchQuery({...R({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,fe=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:r=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const n=await s().then(S=>({ok:!0,data:S})).catch(S=>({ok:!1,error:S}));if(!n.ok)return{accountId:e,message:v(n.error)};const{syncPhase:h,lastSyncAt:y}=n.data;if((y??0)>t&&!L(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(n.data)>r&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,r,a)=>{const u=await N(e,t).then(n=>({ok:!0,lastSyncAt:n.lastSyncAt??0,inboxSyncedAt:H(n)})).catch(n=>({ok:!1,error:n}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:v(u.error)};const c=await B({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(n=>({ok:!1,error:n}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:v(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>N(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:r});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=O(),r=z(),{acknowledge:a}=ae(),[u,c]=o.useState("idle"),[i,n]=o.useState(),h=o.useRef(0),y=o.useRef(e);y.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const S=o.useCallback(()=>{const x=y.current;if(x.length===0){c("error"),n("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),n(void 0),ne();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:G({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,r,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),n(b[0]?.message))})()},[a,t,r]);return{state:u,errorMessage:i,refresh:S}};export{xe as H,be as M,Se as R,Re as a,L as b,we as c,pe as i,Ee as s,ae as u};
@@ -1,4 +1,4 @@
1
- import{cc as V,r as g,j as a,t as b,I as Q,h as Y,as as q,i as X,au as Z,cu as J,bE as ee,aa as te,_ as se,X as re,cJ as R,C as ne,c4 as ae}from"./index-lxVTsHBH.js";import{K as k}from"./kbd-Ds8JAL-i.js";import{B as oe,b as ie}from"./useMessageBodyContent-CUM4C6Cq.js";import{i as ce}from"./search-scope-B5-OK3Cq.js";const le=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},de=()=>`
1
+ import{cc as V,r as g,j as a,t as b,I as Q,h as Y,as as q,i as X,au as Z,cu as J,bE as ee,aa as te,_ as se,X as re,cJ as R,C as ne,c4 as ae}from"./index-C4lWhv5N.js";import{K as k}from"./kbd-bGQtDDL5.js";import{B as oe,b as ie}from"./useMessageBodyContent-CCi8rlSA.js";import{i as ce}from"./search-scope-B5-OK3Cq.js";const le=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},de=()=>`
2
2
  /* Zero the UA default body margin and clamp the document to the iframe width so
3
3
  wide author markup can't push the body (and the page) past the viewport. */
4
4
  html, body {
@@ -1 +1 @@
1
- import{h as T,as as I,i as C,cq as k,dI as A,r as v,j as p,dJ as h,dK as E,dL as j,C as w,c4 as D,c as z,dh as Q,cJ as R}from"./index-lxVTsHBH.js";import{P as O}from"./attachment-file-DClGI76U.js";import{ag as P,ah as _}from"./MailListHeader-Dv4RRNrm.js";import{i as q,t as N}from"./search-token-index-D1mRODfF.js";import{a as B}from"./useLabels-Dlob_XK-.js";import{n as U}from"./search-query-Cr_ZXBCp.js";import{b as F}from"./search-scope-B5-OK3Cq.js";import{u as G,p as H}from"./useSearchTokenContext-mRvSGuNd.js";const ne=e=>{const t=new Set;for(const a of e)a&&t.add(a);return t.size>1?{accountId:void 0,restriction:"spansAccounts",moveDisabledHint:"Move only works within one account — clear selection or pick messages from a single account"}:{accountId:t.size===1?[...t][0]:void 0,restriction:void 0,moveDisabledHint:void 0}},J=e=>{const{mailboxId:t,messages:a}=e,c=T(),{pushError:l}=I(),{mutateAsync:i,isPending:o}=C({...A(),onError:(n,d)=>{l({title:d.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:k(n),error:n})},onSettled:(n,d,u)=>{q(c,N(P(u.body.messageIds??[],a??[],t)))}});return{applyLabel:v.useCallback((n,d,u)=>{n.length!==0&&_(n,m=>i({body:{messageIds:m,labelId:d,action:u}}))},[i]),isPending:o}};function re({accountId:e,mailboxId:t,messageIds:a}){const{labels:c}=B(e),{applyLabel:l}=J({mailboxId:t}),i=v.useMemo(()=>c.map(o=>({key:o.labelId,label:o.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${E(o.color)?h[o.color]:h.Default}`}),onSelect:()=>l(a,o.labelId,"Apply")})),[c,a,l]);return i.length===0?null:p.jsx(O,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(j,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:i,align:"start",nested:!0,touch:!1,triggerClassName:"min-h-11 w-full justify-start gap-3 px-4 py-2.5 text-sm font-normal text-fg"})}const K=20,V=new Set(Object.values(R)),$=e=>e!==void 0&&V.has(e)?e:void 0,W=e=>{if(e.some(t=>t.type==="isUnread"))return!1;if(e.some(t=>t.type==="isRead"))return!0};function ie({mailboxId:e,filterCategory:t}={}){const{searchQuery:a}=w(),c=G(),l=D(),i=U(a),{freeText:o,tokens:r}=H(i,c),n=o.length>0,d=r.find(s=>s.type==="category"),u=$(t)??d?.category,m=r.some(s=>s.type==="hasAttachment")?!0:void 0,f=r.some(s=>s.type==="isStarred")?!0:void 0,y=W(r),b=r.find(s=>s.type==="after"),g=r.find(s=>s.type==="before"),S=r.find(s=>s.type==="in"),x=F({browsed:l,callerMailboxId:e,inTokenMailboxId:S?.mailboxId}),{data:L,isLoading:M}=z({...Q({query:{query:o,mailboxId:x,limit:K,...u!==void 0?{category:u}:{},...m!==void 0?{hasAttachment:m}:{},...f!==void 0?{hasStars:f}:{},...y!==void 0?{isRead:y}:{},...b?{sentDateFrom:b.epochSeconds}:{},...g?{sentDateTo:g.epochSeconds}:{}}}),enabled:n,staleTime:6e4});return{hits:L?.items??[],isLoading:n&&M}}export{re as L,ne as r,ie as u};
1
+ import{h as T,as as I,i as C,cq as k,dI as A,r as v,j as p,dJ as h,dK as E,dL as j,C as w,c4 as D,c as z,dh as Q,cJ as R}from"./index-C4lWhv5N.js";import{P as O}from"./attachment-file-CR02jgI7.js";import{ag as P,ah as _}from"./MailListHeader-CTuKhh89.js";import{i as q,t as N}from"./search-token-index-CS6saRU0.js";import{a as B}from"./useLabels-dKNXAicy.js";import{n as U}from"./search-query-Cr_ZXBCp.js";import{b as F}from"./search-scope-B5-OK3Cq.js";import{u as G,p as H}from"./useSearchTokenContext-BGbtRg7p.js";const ne=e=>{const t=new Set;for(const a of e)a&&t.add(a);return t.size>1?{accountId:void 0,restriction:"spansAccounts",moveDisabledHint:"Move only works within one account — clear selection or pick messages from a single account"}:{accountId:t.size===1?[...t][0]:void 0,restriction:void 0,moveDisabledHint:void 0}},J=e=>{const{mailboxId:t,messages:a}=e,c=T(),{pushError:l}=I(),{mutateAsync:i,isPending:o}=C({...A(),onError:(n,d)=>{l({title:d.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:k(n),error:n})},onSettled:(n,d,u)=>{q(c,N(P(u.body.messageIds??[],a??[],t)))}});return{applyLabel:v.useCallback((n,d,u)=>{n.length!==0&&_(n,m=>i({body:{messageIds:m,labelId:d,action:u}}))},[i]),isPending:o}};function re({accountId:e,mailboxId:t,messageIds:a}){const{labels:c}=B(e),{applyLabel:l}=J({mailboxId:t}),i=v.useMemo(()=>c.map(o=>({key:o.labelId,label:o.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${E(o.color)?h[o.color]:h.Default}`}),onSelect:()=>l(a,o.labelId,"Apply")})),[c,a,l]);return i.length===0?null:p.jsx(O,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(j,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:i,align:"start",nested:!0,touch:!1,triggerClassName:"min-h-11 w-full justify-start gap-3 px-4 py-2.5 text-sm font-normal text-fg"})}const K=20,V=new Set(Object.values(R)),$=e=>e!==void 0&&V.has(e)?e:void 0,W=e=>{if(e.some(t=>t.type==="isUnread"))return!1;if(e.some(t=>t.type==="isRead"))return!0};function ie({mailboxId:e,filterCategory:t}={}){const{searchQuery:a}=w(),c=G(),l=D(),i=U(a),{freeText:o,tokens:r}=H(i,c),n=o.length>0,d=r.find(s=>s.type==="category"),u=$(t)??d?.category,m=r.some(s=>s.type==="hasAttachment")?!0:void 0,f=r.some(s=>s.type==="isStarred")?!0:void 0,y=W(r),b=r.find(s=>s.type==="after"),g=r.find(s=>s.type==="before"),S=r.find(s=>s.type==="in"),x=F({browsed:l,callerMailboxId:e,inTokenMailboxId:S?.mailboxId}),{data:L,isLoading:M}=z({...Q({query:{query:o,mailboxId:x,limit:K,...u!==void 0?{category:u}:{},...m!==void 0?{hasAttachment:m}:{},...f!==void 0?{hasStars:f}:{},...y!==void 0?{isRead:y}:{},...b?{sentDateFrom:b.epochSeconds}:{},...g?{sentDateTo:g.epochSeconds}:{}}}),enabled:n,staleTime:6e4});return{hits:L?.items??[],isLoading:n&&M}}export{re as L,ne as r,ie as u};
@@ -1 +1 @@
1
- import{h as g,as as p,c as f,d as m,r,i as y,au as T,o as E,l as d}from"./index-lxVTsHBH.js";const i={html:"",plainText:""},x=e=>{const u=g(),{pushError:o}=p(),{data:n}=f({...m(),staleTime:1/0}),l=r.useMemo(()=>{if(!e||!n)return i;const t=n.accounts.find(a=>a.accountId===e);return t?{html:t.signatureHtml??"",plainText:t.signaturePlainText??""}:i},[e,n]),s=y({...d(),onSuccess:()=>{u.invalidateQueries({queryKey:E()})},onError:t=>{o(T("Couldn't save signature","The signature wasn't saved.",t))}}),c=r.useCallback((t,a)=>{e&&s.mutate({path:{accountId:e},body:{signatureHtml:t,signaturePlainText:a}})},[e,s]);return{signature:l,setSignature:c,isSaving:s.isPending}};export{x as u};
1
+ import{h as g,as as p,c as f,d as m,r,i as y,au as T,o as E,l as d}from"./index-C4lWhv5N.js";const i={html:"",plainText:""},x=e=>{const u=g(),{pushError:o}=p(),{data:n}=f({...m(),staleTime:1/0}),l=r.useMemo(()=>{if(!e||!n)return i;const t=n.accounts.find(a=>a.accountId===e);return t?{html:t.signatureHtml??"",plainText:t.signaturePlainText??""}:i},[e,n]),s=y({...d(),onSuccess:()=>{u.invalidateQueries({queryKey:E()})},onError:t=>{o(T("Couldn't save signature","The signature wasn't saved.",t))}}),c=r.useCallback((t,a)=>{e&&s.mutate({path:{accountId:e},body:{signatureHtml:t,signaturePlainText:a}})},[e,s]);return{signature:l,setSignature:c,isSaving:s.isPending}};export{x as u};
package/index.html CHANGED
@@ -38,7 +38,7 @@
38
38
  } catch (_) {}
39
39
  })();
40
40
  </script>
41
- <script type="module" crossorigin src="/assets/index-lxVTsHBH.js"></script>
41
+ <script type="module" crossorigin src="/assets/index-C4lWhv5N.js"></script>
42
42
  <link rel="stylesheet" crossorigin href="/assets/index-DYO-sbPN.css">
43
43
  </head>
44
44
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client-dist",
3
- "version": "0.0.483",
3
+ "version": "0.0.485",
4
4
  "description": "Built Remit web client — static assets and the default runtime config.",
5
5
  "files": [
6
6
  "**/*"
@@ -1 +0,0 @@
1
- import{O as o}from"./index-lxVTsHBH.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{ai as m,j as o,O as p}from"./index-lxVTsHBH.js";import{a}from"./MailShell-CqyZkGBA.js";import{M as r}from"./MailboxPane-B1OopvI6.js";import{d as e}from"./search-token-index-D1mRODfF.js";import{u as s}from"./search-mirror-CgMxavNa.js";import"./FullCompose-DdXnvGhK.js";import"./ErrorState-CQA1uNfQ.js";import"./index-y3enq74c.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./confirm-dialog-XKVleo_p.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-DiNXvxEh.js";import"./circle-check-big-B1p6oh-i.js";import"./useQueries-CPnZMt_1.js";import"./MailListHeader-Dv4RRNrm.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./EmptyState-DYWkEoYy.js";import"./download-BzIqNtrq.js";import"./useLayoutTier-Ciq4HlaK.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./MailViewChrome-BrAblQ-h.js";import"./NavMenuButton-DsipgLLk.js";import"./useLabels-Dlob_XK-.js";import"./useSemanticSearch-DqVnsXbc.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-D6dXigqc.js";import"./circle-help-DtvJPapE.js";import"./circle-check-o0AqGZ-u.js";function X(){const{mailboxId:t}=m.useParams(),i=e();return s({to:"/mail/$mailboxId",params:{mailboxId:t}}),o.jsx(r,{mailboxId:t,thread:i,children:o.jsx(a,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(p,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!i})})}export{X as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-lxVTsHBH.js";import{M as r}from"./MailboxPane-B1OopvI6.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-DiNXvxEh.js";import"./circle-check-big-B1p6oh-i.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./MailListHeader-Dv4RRNrm.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./MailViewChrome-BrAblQ-h.js";import"./NavMenuButton-DsipgLLk.js";import"./useLabels-Dlob_XK-.js";import"./useSemanticSearch-DqVnsXbc.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-D6dXigqc.js";import"./circle-help-DtvJPapE.js";import"./circle-check-o0AqGZ-u.js";function L(){return o.jsx(r.Reading,{})}export{L as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-lxVTsHBH.js";import{B as o}from"./BriefPane-D6mVesqu.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dv4RRNrm.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./useRefreshControl-DiNXvxEh.js";import"./circle-check-big-B1p6oh-i.js";import"./useLabels-Dlob_XK-.js";import"./useSemanticSearch-DqVnsXbc.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function H(){return r.jsx(o.Reading,{})}export{H as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-lxVTsHBH.js";import{F as r}from"./FlaggedPane-DoeXJfm_.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dv4RRNrm.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./MailViewChrome-BrAblQ-h.js";import"./wizard-selection-B1bng5Jq.js";function B(){return o.jsx(r.Reading,{})}export{B as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-lxVTsHBH.js";import{O as t}from"./OutboxPane-C5Ns55rS.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-B1p6oh-i.js";import"./clock-Z-oAijsz.js";import"./row-actions-BY8sJ70m.js";import"./rotate-ccw-Snzk6-SP.js";import"./NavMenuButton-DsipgLLk.js";import"./menu-D6aq1T1f.js";import"./format-CCaI2KqP.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function P(){return o.jsx(t.Reading,{})}export{P as component};
@@ -1 +0,0 @@
1
- import{e5 as o,j as e}from"./index-lxVTsHBH.js";import{O as m}from"./OpenCalendarEvent-jziTx8_b.js";import"./useCalendarData-CBjm4DbE.js";import"./avatar-wLH6-Ayd.js";import"./minus-DW1FraKg.js";import"./clock-Z-oAijsz.js";import"./mail-CSpgLNSC.js";import"./pencil-DJPntSjN.js";import"./calendar-days-GutYioyG.js";import"./calendar-ZcQGYvWc.js";function O(){const{calendarObjectId:r,recurrenceId:t}=o.useParams();return e.jsx(m,{calendarObjectId:r,recurrenceId:t})}export{O as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-lxVTsHBH.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-lxVTsHBH.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-lxVTsHBH.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{j as r,O as i}from"./index-lxVTsHBH.js";import{a as m}from"./MailShell-CqyZkGBA.js";import{B as o}from"./BriefPane-D6mVesqu.js";import{d as p}from"./search-token-index-D1mRODfF.js";import{u as e}from"./search-mirror-CgMxavNa.js";import"./FullCompose-DdXnvGhK.js";import"./ErrorState-CQA1uNfQ.js";import"./index-y3enq74c.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./confirm-dialog-XKVleo_p.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dv4RRNrm.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./EmptyState-DYWkEoYy.js";import"./download-BzIqNtrq.js";import"./useLayoutTier-Ciq4HlaK.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./useQueries-CPnZMt_1.js";import"./minus-DW1FraKg.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./useRefreshControl-DiNXvxEh.js";import"./circle-check-big-B1p6oh-i.js";import"./useLabels-Dlob_XK-.js";import"./useSemanticSearch-DqVnsXbc.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function N(){const t=p();return e({to:"/mail/brief"}),r.jsx(o,{thread:t,children:r.jsx(m,{phone:r.jsx(o.Phone,{}),list:r.jsx(o.List,{}),reading:r.jsx(i,{}),intelligence:r.jsx(o.Intelligence,{}),hasThread:!!t})})}export{N as component};
@@ -1 +0,0 @@
1
- import{e}from"./index-lxVTsHBH.js";const t=e("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);export{t as C};
@@ -1 +0,0 @@
1
- import{F as o}from"./FullCompose-DdXnvGhK.js";import"./index-lxVTsHBH.js";import"./ErrorState-CQA1uNfQ.js";import"./index-y3enq74c.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./confirm-dialog-XKVleo_p.js";const C=o;export{C as component};
@@ -1 +0,0 @@
1
- import{F as o}from"./FullCompose-DdXnvGhK.js";import"./index-lxVTsHBH.js";import"./ErrorState-CQA1uNfQ.js";import"./index-y3enq74c.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./confirm-dialog-XKVleo_p.js";const C=o;export{C as component};
@@ -1 +0,0 @@
1
- import{F as o}from"./FullCompose-DdXnvGhK.js";import"./index-lxVTsHBH.js";import"./ErrorState-CQA1uNfQ.js";import"./index-y3enq74c.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./confirm-dialog-XKVleo_p.js";const C=o;export{C as component};
@@ -1 +0,0 @@
1
- import{F as o}from"./FullCompose-DdXnvGhK.js";import"./index-lxVTsHBH.js";import"./ErrorState-CQA1uNfQ.js";import"./index-y3enq74c.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./confirm-dialog-XKVleo_p.js";const C=o;export{C as component};
@@ -1 +0,0 @@
1
- import{j as o,O as i}from"./index-lxVTsHBH.js";import{a as m}from"./MailShell-CqyZkGBA.js";import{F as r}from"./FlaggedPane-DoeXJfm_.js";import{d as p}from"./search-token-index-D1mRODfF.js";import{u as e}from"./search-mirror-CgMxavNa.js";import"./FullCompose-DdXnvGhK.js";import"./ErrorState-CQA1uNfQ.js";import"./index-y3enq74c.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./confirm-dialog-XKVleo_p.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dv4RRNrm.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./EmptyState-DYWkEoYy.js";import"./download-BzIqNtrq.js";import"./useLayoutTier-Ciq4HlaK.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./useQueries-CPnZMt_1.js";import"./minus-DW1FraKg.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./MailViewChrome-BrAblQ-h.js";import"./wizard-selection-B1bng5Jq.js";function G(){const t=p();return e({to:"/mail/flagged"}),o.jsx(r,{thread:t,children:o.jsx(m,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(i,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!t})})}export{G as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-lxVTsHBH.js";import{M as i}from"./MailboxPane-B1OopvI6.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-DiNXvxEh.js";import"./circle-check-big-B1p6oh-i.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./MailListHeader-Dv4RRNrm.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./MailViewChrome-BrAblQ-h.js";import"./NavMenuButton-DsipgLLk.js";import"./useLabels-Dlob_XK-.js";import"./useSemanticSearch-DqVnsXbc.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-D6dXigqc.js";import"./circle-help-DtvJPapE.js";import"./circle-check-o0AqGZ-u.js";function L(){return o.jsx(i.Reading,{})}export{L as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-lxVTsHBH.js";import{O as t}from"./OutboxPane-C5Ns55rS.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-B1p6oh-i.js";import"./clock-Z-oAijsz.js";import"./row-actions-BY8sJ70m.js";import"./rotate-ccw-Snzk6-SP.js";import"./NavMenuButton-DsipgLLk.js";import"./menu-D6aq1T1f.js";import"./format-CCaI2KqP.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function c(){return o.jsx(t.Reading,{})}export{c as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-lxVTsHBH.js";import{M as r}from"./MailboxPane-B1OopvI6.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-DiNXvxEh.js";import"./circle-check-big-B1p6oh-i.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./MailListHeader-Dv4RRNrm.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./MailViewChrome-BrAblQ-h.js";import"./NavMenuButton-DsipgLLk.js";import"./useLabels-Dlob_XK-.js";import"./useSemanticSearch-DqVnsXbc.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-D6dXigqc.js";import"./circle-help-DtvJPapE.js";import"./circle-check-o0AqGZ-u.js";function K(){return o.jsx(r.Reading,{})}export{K as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-lxVTsHBH.js";import{B as o}from"./BriefPane-D6mVesqu.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dv4RRNrm.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./useRefreshControl-DiNXvxEh.js";import"./circle-check-big-B1p6oh-i.js";import"./useLabels-Dlob_XK-.js";import"./useSemanticSearch-DqVnsXbc.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function H(){return r.jsx(o.Reading,{})}export{H as component};
@@ -1 +0,0 @@
1
- import{j as t,am as o}from"./index-lxVTsHBH.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-lxVTsHBH.js";import{F as r}from"./FlaggedPane-DoeXJfm_.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dv4RRNrm.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./MailViewChrome-BrAblQ-h.js";import"./wizard-selection-B1bng5Jq.js";function C(){return o.jsx(r.Reading,{})}export{C as component};
@@ -1 +0,0 @@
1
- import{e4 as o,j as r}from"./index-lxVTsHBH.js";import{O as e}from"./OpenCalendarEvent-jziTx8_b.js";import"./useCalendarData-CBjm4DbE.js";import"./avatar-wLH6-Ayd.js";import"./minus-DW1FraKg.js";import"./clock-Z-oAijsz.js";import"./mail-CSpgLNSC.js";import"./pencil-DJPntSjN.js";import"./calendar-days-GutYioyG.js";import"./calendar-ZcQGYvWc.js";function x(){const{calendarObjectId:t}=o.useParams();return r.jsx(e,{calendarObjectId:t})}export{x as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-lxVTsHBH.js";import{F as r}from"./FlaggedPane-DoeXJfm_.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dv4RRNrm.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./MailViewChrome-BrAblQ-h.js";import"./wizard-selection-B1bng5Jq.js";function B(){return o.jsx(r.Reading,{})}export{B as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-lxVTsHBH.js";import{B as o}from"./BriefPane-D6mVesqu.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dv4RRNrm.js";import"./search-token-index-D1mRODfF.js";import"./useLayoutTier-Ciq4HlaK.js";import"./useQueries-CPnZMt_1.js";import"./attachment-file-DClGI76U.js";import"./mail-CSpgLNSC.js";import"./avatar-wLH6-Ayd.js";import"./index-y3enq74c.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./EmptyState-DYWkEoYy.js";import"./ErrorState-CQA1uNfQ.js";import"./download-BzIqNtrq.js";import"./shield-check-Bvnu7s8U.js";import"./useFilters-CW_hrFZo.js";import"./minus-DW1FraKg.js";import"./confirm-dialog-XKVleo_p.js";import"./clock-Z-oAijsz.js";import"./menu-D6aq1T1f.js";import"./useRefreshControl-DiNXvxEh.js";import"./circle-check-big-B1p6oh-i.js";import"./useLabels-Dlob_XK-.js";import"./useSemanticSearch-DqVnsXbc.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function I(){return r.jsx(o.Reading,{})}export{I as component};
@@ -1 +0,0 @@
1
- import{e}from"./index-lxVTsHBH.js";const a=e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);export{a as M};
@@ -1 +0,0 @@
1
- import{q as n,h as a,u as i,r as m,j as s}from"./index-lxVTsHBH.js";import{O as p}from"./OnboardingWizard-LMPbQ6jT.js";import{c}from"./onboarding-completion-WuK4B8wi.js";import"./kbd-Ds8JAL-i.js";import"./credential-steps-Bhbo8-zA.js";import"./card-D55_7IJj.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-CSpgLNSC.js";function y(){const o=n(),e=a(),t=i(),r=m.useCallback(l=>{c({queryClient:e,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,e]);return s.jsx(p,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{t({to:"/import"})}})}export{y as component};
@@ -1 +0,0 @@
1
- import{j as o,O as i}from"./index-lxVTsHBH.js";import{a as m}from"./MailShell-CqyZkGBA.js";import{u as p,O as t}from"./OutboxPane-C5Ns55rS.js";import{u as s}from"./search-mirror-CgMxavNa.js";import"./FullCompose-DdXnvGhK.js";import"./ErrorState-CQA1uNfQ.js";import"./index-y3enq74c.js";import"./useMessageBodyContent-CUM4C6Cq.js";import"./useSignature-CrrwTrAx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-D4EGUdvx.js";import"./sections-BaNfgGs8.js";import"./format-CCaI2KqP.js";import"./confirm-dialog-XKVleo_p.js";import"./useSearchTokenContext-mRvSGuNd.js";import"./kbd-Ds8JAL-i.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-B1p6oh-i.js";import"./clock-Z-oAijsz.js";import"./row-actions-BY8sJ70m.js";import"./rotate-ccw-Snzk6-SP.js";import"./NavMenuButton-DsipgLLk.js";import"./menu-D6aq1T1f.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function v(){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{v as component};
@@ -1 +0,0 @@
1
- import{j as t,O as o}from"./index-lxVTsHBH.js";const n=()=>t.jsx(o,{});export{n as component};