@remit/web-client-dist 0.0.635 → 0.0.636

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 (156) hide show
  1. package/assets/{BriefPane-CcPGCsdQ.js → BriefPane-D75cGk9R.js} +1 -1
  2. package/assets/{CalendarComposePane-CS0JzQe5.js → CalendarComposePane-CQPTeieA.js} +1 -1
  3. package/assets/{CalendarComposeSeed-DiWHEwyG.js → CalendarComposeSeed-YcnTcc9q.js} +1 -1
  4. package/assets/{CalendarShell-B3kqh203.js → CalendarShell-C5-6_oQz.js} +1 -1
  5. package/assets/{EmptyState-D0-8vkl7.js → EmptyState-CwwN8uxT.js} +1 -1
  6. package/assets/{ErrorState-VVAbrV2n.js → ErrorState-DWzQfscg.js} +1 -1
  7. package/assets/{FlaggedPane-C10WBIzH.js → FlaggedPane-Jts36qML.js} +1 -1
  8. package/assets/{FullCompose-BPnHusXz.js → FullCompose-CPT2R-pn.js} +1 -1
  9. package/assets/{MailListHeader-nOmDteIr.js → MailListHeader-BVdr1xz_.js} +1 -1
  10. package/assets/{MailNav-CgR3wyoa.js → MailNav-CmvgCpY4.js} +1 -1
  11. package/assets/{MailShell-Pr322jmK.js → MailShell-DpEV7moX.js} +1 -1
  12. package/assets/{MailViewChrome-BQ6rm7E7.js → MailViewChrome-DO8IvQ0g.js} +1 -1
  13. package/assets/{MailboxPane-BXtDimzQ.js → MailboxPane-BsR7VsfJ.js} +1 -1
  14. package/assets/{NavMenuButton-RbQrIxF8.js → NavMenuButton-6SG5syJx.js} +1 -1
  15. package/assets/{OnboardingWizard-BFedeDPT.js → OnboardingWizard-CSUHbolo.js} +1 -1
  16. package/assets/{OpenCalendarEvent-BHw5I86C.js → OpenCalendarEvent-CeB7apup.js} +1 -1
  17. package/assets/{OutboxPane-CTseFzTa.js → OutboxPane-y8lpgoA7.js} +1 -1
  18. package/assets/_calendarObjectId-CIuW-Ie5.js +1 -0
  19. package/assets/_mailboxId-5RNGPJGS.js +1 -0
  20. package/assets/_messageId-BuD0qcm0.js +1 -0
  21. package/assets/_messageId-DUkglFhL.js +1 -0
  22. package/assets/_messageId-DfTFQr44.js +1 -0
  23. package/assets/_outboxMessageId-jTJb98_M.js +1 -0
  24. package/assets/_recurrenceId-CKRdebZ4.js +1 -0
  25. package/assets/_threadId-9TH68C7M.js +1 -0
  26. package/assets/_threadId-BzUUgT3O.js +1 -0
  27. package/assets/_threadId-CqA1Cn_c.js +1 -0
  28. package/assets/_view._date-DZANiEIP.js +1 -0
  29. package/assets/{accounts-CJxJvm7i.js → accounts-BNbNVL6a.js} +1 -1
  30. package/assets/{advanced-DlUXSovP.js → advanced-jKFdPJg9.js} +1 -1
  31. package/assets/{appearance-C974dCog.js → appearance-szgjdrBE.js} +1 -1
  32. package/assets/{attendee-row-DjEgLprV.js → attendee-row-BMb3eM14.js} +1 -1
  33. package/assets/{avatar-C2fjt5Oo.js → avatar-BI9-h2CG.js} +1 -1
  34. package/assets/{bell-off-DAf1mpP9.js → bell-off-CC53fBB2.js} +1 -1
  35. package/assets/{bottom-sheet-V9w5p7mb.js → bottom-sheet-D8oEb9Zv.js} +1 -1
  36. package/assets/brief-Bd33YTD_.js +1 -0
  37. package/assets/{brief-B0ofNfT2.js → brief-DE8_cylr.js} +1 -1
  38. package/assets/{browser-ponyfill-BQRK5_Us.js → browser-ponyfill-CRcfJGCX.js} +2 -2
  39. package/assets/{bug-ChX59CrI.js → bug-Dh0UIzTd.js} +1 -1
  40. package/assets/{calendar-CJmjuskA.js → calendar-DI1uSMAF.js} +1 -1
  41. package/assets/{calendar-clash-strip-DFE2SLBf.js → calendar-clash-strip-BeF8DhB-.js} +1 -1
  42. package/assets/{calendar-format-DLCAmYF3.js → calendar-format-nYSxDVLX.js} +1 -1
  43. package/assets/{calendar-report--e3n3TXF.js → calendar-report-_QLAbdRS.js} +1 -1
  44. package/assets/{calendar-suggestion-Bey-p_uQ.js → calendar-suggestion-E9w2nRWu.js} +1 -1
  45. package/assets/{calendars-IOjKgVC9.js → calendars-Boz0CIFB.js} +1 -1
  46. package/assets/{card-DR5Bp3Kv.js → card-BmYyqZU8.js} +1 -1
  47. package/assets/{checkbox-rzdV9G0C.js → checkbox-CZD6i6IR.js} +1 -1
  48. package/assets/chevron-left-B1U3lovQ.js +1 -0
  49. package/assets/{circle-check-BniV5uth.js → circle-check-Bpm-cdIg.js} +1 -1
  50. package/assets/{circle-check-big-DdHuPOQ8.js → circle-check-big-CA-bYUtr.js} +1 -1
  51. package/assets/{circle-help-CxYf0rqb.js → circle-help-gF5YAjts.js} +1 -1
  52. package/assets/{clock-DMOwCMnh.js → clock-CHCFgl4d.js} +1 -1
  53. package/assets/compose._-_outboxMessageId_-BH8gcpDj.js +1 -0
  54. package/assets/compose._-_outboxMessageId_-D3WpZSA8.js +1 -0
  55. package/assets/compose._-_outboxMessageId_-DI8h85aO.js +1 -0
  56. package/assets/compose._-_outboxMessageId_-WBhljHnY.js +1 -0
  57. package/assets/{config-import-xKkBqDs3.js → config-import-D9ehhdRH.js} +1 -1
  58. package/assets/{confirm-dialog-Cfujg7eJ.js → confirm-dialog-CocDko9U.js} +1 -1
  59. package/assets/{copy-CkTTUrrp.js → copy-DgGekFwr.js} +1 -1
  60. package/assets/{credential-steps-DRNC_g97.js → credential-steps-C6B4LLDZ.js} +1 -1
  61. package/assets/{download-BQh_pCga.js → download-CHu9yf-9.js} +1 -1
  62. package/assets/{file-json-BlL9tl5c.js → file-json-lCoJ4MMG.js} +1 -1
  63. package/assets/{filters-DOtkcHka.js → filters-CgNi0_GK.js} +1 -1
  64. package/assets/flagged-BRQyqp_w.js +1 -0
  65. package/assets/{flagged-BrPpE3Sc.js → flagged-C06PvFbr.js} +1 -1
  66. package/assets/{folders-DurPEuZa.js → folders-BC2O8pN-.js} +1 -1
  67. package/assets/{help-copy-uYovF378.js → help-copy-0vW7Uvdo.js} +1 -1
  68. package/assets/{import-DMXkiU6R.js → import-BJiWqnIA.js} +1 -1
  69. package/assets/index-6DAZlug3.js +1 -0
  70. package/assets/index-B4H0cbaA.js +1 -0
  71. package/assets/{index-BZsbyrwY.css → index-BOf0CjTQ.css} +1 -1
  72. package/assets/index-BuD0qcm0.js +1 -0
  73. package/assets/index-CEzeDIpM.js +1 -0
  74. package/assets/{index-DIEie7Yj.js → index-CTrN7dU7.js} +59 -59
  75. package/assets/index-CdEqoUhn.js +1 -0
  76. package/assets/index-CxnKAlnw.js +1 -0
  77. package/assets/{index-Bsm5MTTG.js → index-DMA0YSsS.js} +4 -4
  78. package/assets/{index-B3zzgv4e.js → index-DdmJVTyk.js} +1 -1
  79. package/assets/index-DfTFQr44.js +1 -0
  80. package/assets/index-XCWyX4Nu.js +1 -0
  81. package/assets/index-jeAFdPQ9.js +1 -0
  82. package/assets/{kbd-lDzxHVCS.js → kbd-DNmTK9ke.js} +1 -1
  83. package/assets/{labels-DNITzKN5.js → labels-1K3nCcmA.js} +1 -1
  84. package/assets/{mail-1A5f6iAE.js → mail-2Lzca0sU.js} +1 -1
  85. package/assets/{mail-BeoUl3Ta.js → mail-DverAFVu.js} +1 -1
  86. package/assets/{menu-C21gm-LC.js → menu-AiRz5rLS.js} +1 -1
  87. package/assets/minus-QLsR9rVM.js +1 -0
  88. package/assets/{new-DnBb5DN4.js → new-DHyHJz8l.js} +1 -1
  89. package/assets/onboarding-CRGGfEXZ.js +1 -0
  90. package/assets/{onboarding-completion-Bmd-HN_3.js → onboarding-completion-Bgona01R.js} +1 -1
  91. package/assets/outbox-egss0WYm.js +1 -0
  92. package/assets/{pane-header-B3IIk3fJ.js → pane-header-C6F97UxO.js} +1 -1
  93. package/assets/{pencil-D2ugaHF8.js → pencil-DpZEcc9Q.js} +1 -1
  94. package/assets/{popover-menu-BzPU2XRv.js → popover-menu-I_p7C4RX.js} +1 -1
  95. package/assets/{refresh-cw-Ckd0XdaA.js → refresh-cw-CrSEtN0j.js} +1 -1
  96. package/assets/{rich-text-Rzrxb7e0.js → rich-text-BY2WyJzR.js} +1 -1
  97. package/assets/{rich-text-spellcheck-worker-provider-CqKdM7_E.js → rich-text-spellcheck-worker-provider-C53QtR8U.js} +1 -1
  98. package/assets/{rotate-ccw-BeK7IKWo.js → rotate-ccw-BwoJPdTA.js} +1 -1
  99. package/assets/{roving-focus-CB0KLgKq.js → roving-focus-BYBMU9YM.js} +1 -1
  100. package/assets/{row-actions-Dig-tNEz.js → row-actions-M9Ety9op.js} +1 -1
  101. package/assets/{search-mirror-Bt_QYWap.js → search-mirror-C1R24HUl.js} +1 -1
  102. package/assets/{search-token-index-CclyV_x2.js → search-token-index-BinolOMC.js} +1 -1
  103. package/assets/{sections-n58EA842.js → sections-CfTDsSEu.js} +1 -1
  104. package/assets/{senders-WSsq5WoC.js → senders-CxFpOLNR.js} +1 -1
  105. package/assets/settings-I6fzE2gz.js +1 -0
  106. package/assets/{settings-screen-xG7ySj9h.js → settings-screen-BVPfYXKu.js} +1 -1
  107. package/assets/{shield-check-Bl7sJ69b.js → shield-check-B8NtyqSa.js} +1 -1
  108. package/assets/{suggested-vips-Bl6VCH8I.js → suggested-vips-CvGUhfMR.js} +1 -1
  109. package/assets/{undo-2-CXpll-5G.js → undo-2-DafMLJl8.js} +1 -1
  110. package/assets/{useCalendarData-CBlxoUbW.js → useCalendarData-CEqOF86-.js} +1 -1
  111. package/assets/{useCalendarWrites-LDB7-Ss2.js → useCalendarWrites-B66T9V8C.js} +1 -1
  112. package/assets/{useCalendars-CLOowhmo.js → useCalendars-DSVgnNGS.js} +1 -1
  113. package/assets/{useDebouncedValue-CkCDwwGn.js → useDebouncedValue-DgoW2gtH.js} +1 -1
  114. package/assets/{useFilters-Dog2qi1C.js → useFilters-CI6nPI8A.js} +1 -1
  115. package/assets/{useLabels-BJtlozty.js → useLabels-BLAR4UCi.js} +1 -1
  116. package/assets/{useLayoutTier-nR-X4oh4.js → useLayoutTier-Cs2hRSyr.js} +1 -1
  117. package/assets/{useMessageBodyContent-DaCPQpX3.js → useMessageBodyContent-C6WheWR5.js} +1 -1
  118. package/assets/{useQueries-DfoafMCX.js → useQueries-8ibIA6jj.js} +1 -1
  119. package/assets/{useRefreshControl-CHw1FCdw.js → useRefreshControl-BHFXn1pg.js} +1 -1
  120. package/assets/{useResultFolderIndex-BwoZm495.js → useResultFolderIndex-BhA2C88T.js} +1 -1
  121. package/assets/{useSearchTokenContext-MVchIFCF.js → useSearchTokenContext-BZ3hasAQ.js} +3 -3
  122. package/assets/{useSemanticSearch-BVBm7ORD.js → useSemanticSearch-BPL9gQ__.js} +1 -1
  123. package/assets/{useSignature-D4rel0VO.js → useSignature-COUd5paq.js} +1 -1
  124. package/index.html +2 -2
  125. package/package.json +1 -1
  126. package/assets/_calendarObjectId-DJdM4tzN.js +0 -1
  127. package/assets/_mailboxId-BLQlyM6f.js +0 -1
  128. package/assets/_messageId-B04z2hI3.js +0 -1
  129. package/assets/_messageId-CB5hv97O.js +0 -1
  130. package/assets/_messageId-LXUUSaOB.js +0 -1
  131. package/assets/_outboxMessageId-B9tYWk_8.js +0 -1
  132. package/assets/_recurrenceId-BiHsfCKf.js +0 -1
  133. package/assets/_threadId-6k0O2tZu.js +0 -1
  134. package/assets/_threadId-BQm-zwWW.js +0 -1
  135. package/assets/_threadId-oj5Cr5Su.js +0 -1
  136. package/assets/_view._date-D-aH9vb8.js +0 -1
  137. package/assets/brief-jd-FT6Hv.js +0 -1
  138. package/assets/chevron-left-wWboU2sl.js +0 -1
  139. package/assets/compose._-_outboxMessageId_-BiXse-xz.js +0 -1
  140. package/assets/compose._-_outboxMessageId_-DGECiGv0.js +0 -1
  141. package/assets/compose._-_outboxMessageId_-Oje2LYqv.js +0 -1
  142. package/assets/compose._-_outboxMessageId_-jGe5jfaP.js +0 -1
  143. package/assets/flagged-C4VIjSex.js +0 -1
  144. package/assets/index-B1vstv9o.js +0 -1
  145. package/assets/index-BMDcfxBa.js +0 -1
  146. package/assets/index-BhWy8P2E.js +0 -1
  147. package/assets/index-Bu1epPot.js +0 -1
  148. package/assets/index-CB5hv97O.js +0 -1
  149. package/assets/index-CbT_w2eV.js +0 -1
  150. package/assets/index-CvYaSCJa.js +0 -1
  151. package/assets/index-D6xImJHd.js +0 -1
  152. package/assets/index-LXUUSaOB.js +0 -1
  153. package/assets/minus-BYvW5VdR.js +0 -1
  154. package/assets/onboarding-D_uulq54.js +0 -1
  155. package/assets/outbox-Dc0K4OF8.js +0 -1
  156. package/assets/settings-kGy860Jm.js +0 -1
@@ -1 +1 @@
1
- import{c3 as Q,c4 as y,c5 as S,c6 as w,c7 as C,h as k,c8 as q,c9 as x,r as p,ca as M,cb as H,cc as L,cd as P,ce as O,cf as B,cg as A}from"./index-DIEie7Yj.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var z=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];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.#d(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.#f(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,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(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.#a(t,s)]}#a(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}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(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}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),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 U({queries:r,...e},s){const t=k(),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{M(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new z(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>O(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
1
+ import{c2 as Q,c3 as y,c4 as S,c5 as w,c6 as C,h as k,c7 as q,c8 as x,r as p,c9 as M,ca as H,cb as L,cc as P,cd as O,ce as B,cf as A}from"./index-CTrN7dU7.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var z=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];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.#d(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.#f(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,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(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.#a(t,s)]}#a(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}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(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}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),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 U({queries:r,...e},s){const t=k(),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{M(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new z(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>O(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
@@ -1 +1 @@
1
- import{j as E,a0 as K,t as Q,f as U,r as o,aT as R,h as N,C as $,E as z,F as B,q as G,P as I,Q as X,R as V,S as J}from"./index-DIEie7Yj.js";import{C as Y}from"./circle-check-big-DdHuPOQ8.js";import{R as Z}from"./refresh-cw-Ckd0XdaA.js";import{u as P}from"./useQueries-DfoafMCX.js";function ye({state:e,onRefresh:s,label:t,errorMessage:n,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",r=e==="error",h=e==="success",S=r?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(Y,{className:"size-4 text-positive"}):E.jsx(Z,{className:Q("size-4",i&&"animate-spin")}),w=r?`${t} — failed: ${n??"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:S,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:r?n: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 F=3e3,te=F*2,C={syncing:!1,resolved:!1,synced:0,total:0};function we(e,s){const t=e.join(","),[n,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&&!n,refetchInterval:F,meta:{softError:!0}}))}),r=i.every(m=>m.isSuccess||m.isError),h=i.length===0||r||u;let S=!1,w=0,y=0;for(const m of i)if(L(m.data?.syncPhase)){S=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,y+=l.messagesTotal}const x=s&&h&&!S;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?C:{syncing:S,resolved:!0,synced:w,total:y}}const se=180*1e3,xe=30*1e3;let q=0;const M=new Set,re=(e=Date.now())=>{q=e+se;for(const s of M)s()},pe=(e=Date.now())=>e<q,Ee=e=>(M.add(e),()=>{M.delete(e)}),T=6e4,ne=new Set(["sent","drafts","trash","archive"]),_=(e,s)=>{const t=new Map;for(const n of e){const a=s.get(n.mailboxId)?.role;a&&ne.has(a)||t.set(n.mailboxId,n.highWaterMarkUid)}return t},j=(e,s)=>{const t=[];for(const[n,a]of s)a>(e.get(n)??0)&&t.push(n);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=N(),{resultFolderIndex:n}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,r]=o.useState(new Set),h=P({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:T,staleTime:T,meta:{softError:!0}}))}),S=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=_(b.mailboxes??[],n),v=c.current.get(d);if(c.current.set(d,g),v){const A=j(v,g);A.length>0&&z(t,B(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const W=a.current.get(d)??new Map;oe(W,g)&&(f.add(d),l=!0)}),l&&r(f)},[w,S]);const y=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{r(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,_(d?.mailboxes??[],n)),u.current.add(f)}},[t,n]),m=o.useMemo(()=>({hasNewMail:y,acknowledge:x}),[y,x]);return E.jsx(D.Provider,{value:m,children:s})}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),k=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{V(e,{softError:!0},"user")&&J(e)},O=(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:n=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const r=await s().then(y=>({ok:!0,data:y})).catch(y=>({ok:!1,error:y}));if(!r.ok)return{accountId:e,message:k(r.error)};const{syncPhase:h,lastSyncAt:S}=r.data;if((S??0)>t&&!L(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(r.data)>n&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,n,a)=>{const u=await O(e,t).then(r=>({ok:!0,lastSyncAt:r.lastSyncAt??0,inboxSyncedAt:H(r)})).catch(r=>({ok:!1,error:r}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(r=>({ok:!1,error:r}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>O(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:n});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=N(),n=G(),{acknowledge:a}=ae(),[u,c]=o.useState("idle"),[i,r]=o.useState(),h=o.useRef(0),S=o.useRef(e);S.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 y=o.useCallback(()=>{const x=S.current;if(x.length===0){c("error"),r("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),r(void 0),re();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,n,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"),r(b[0]?.message))})()},[a,t,n]);return{state:u,errorMessage:i,refresh:y}};export{xe as H,be as M,ye 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,a0 as K,t as Q,f as U,r as o,aT as R,h as N,C as $,E as z,F as B,q as G,P as I,Q as X,R as V,S as J}from"./index-CTrN7dU7.js";import{C as Y}from"./circle-check-big-CA-bYUtr.js";import{R as Z}from"./refresh-cw-CrSEtN0j.js";import{u as P}from"./useQueries-8ibIA6jj.js";function ye({state:e,onRefresh:s,label:t,errorMessage:n,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",r=e==="error",h=e==="success",S=r?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(Y,{className:"size-4 text-positive"}):E.jsx(Z,{className:Q("size-4",i&&"animate-spin")}),w=r?`${t} — failed: ${n??"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:S,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:r?n: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 F=3e3,te=F*2,C={syncing:!1,resolved:!1,synced:0,total:0};function we(e,s){const t=e.join(","),[n,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&&!n,refetchInterval:F,meta:{softError:!0}}))}),r=i.every(m=>m.isSuccess||m.isError),h=i.length===0||r||u;let S=!1,w=0,y=0;for(const m of i)if(L(m.data?.syncPhase)){S=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,y+=l.messagesTotal}const x=s&&h&&!S;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?C:{syncing:S,resolved:!0,synced:w,total:y}}const se=180*1e3,xe=30*1e3;let q=0;const M=new Set,re=(e=Date.now())=>{q=e+se;for(const s of M)s()},pe=(e=Date.now())=>e<q,Ee=e=>(M.add(e),()=>{M.delete(e)}),T=6e4,ne=new Set(["sent","drafts","trash","archive"]),_=(e,s)=>{const t=new Map;for(const n of e){const a=s.get(n.mailboxId)?.role;a&&ne.has(a)||t.set(n.mailboxId,n.highWaterMarkUid)}return t},j=(e,s)=>{const t=[];for(const[n,a]of s)a>(e.get(n)??0)&&t.push(n);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=N(),{resultFolderIndex:n}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,r]=o.useState(new Set),h=P({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:T,staleTime:T,meta:{softError:!0}}))}),S=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=_(b.mailboxes??[],n),v=c.current.get(d);if(c.current.set(d,g),v){const A=j(v,g);A.length>0&&z(t,B(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const W=a.current.get(d)??new Map;oe(W,g)&&(f.add(d),l=!0)}),l&&r(f)},[w,S]);const y=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{r(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,_(d?.mailboxes??[],n)),u.current.add(f)}},[t,n]),m=o.useMemo(()=>({hasNewMail:y,acknowledge:x}),[y,x]);return E.jsx(D.Provider,{value:m,children:s})}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),k=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{V(e,{softError:!0},"user")&&J(e)},O=(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:n=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const r=await s().then(y=>({ok:!0,data:y})).catch(y=>({ok:!1,error:y}));if(!r.ok)return{accountId:e,message:k(r.error)};const{syncPhase:h,lastSyncAt:S}=r.data;if((S??0)>t&&!L(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(r.data)>n&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,n,a)=>{const u=await O(e,t).then(r=>({ok:!0,lastSyncAt:r.lastSyncAt??0,inboxSyncedAt:H(r)})).catch(r=>({ok:!1,error:r}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(r=>({ok:!1,error:r}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>O(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:n});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=N(),n=G(),{acknowledge:a}=ae(),[u,c]=o.useState("idle"),[i,r]=o.useState(),h=o.useRef(0),S=o.useRef(e);S.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 y=o.useCallback(()=>{const x=S.current;if(x.length===0){c("error"),r("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),r(void 0),re();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,n,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"),r(b[0]?.message))})()},[a,t,n]);return{state:u,errorMessage:i,refresh:y}};export{xe as H,be as M,ye as R,Re as a,L as b,we as c,pe as i,Ee as s,ae as u};
@@ -1 +1 @@
1
- import{K as r,r as s,b7 as t}from"./index-DIEie7Yj.js";import{u as m}from"./useQueries-DfoafMCX.js";const a=i=>({items:i.map(e=>e.data?.items??[]),isPending:i.some(e=>e.isPending),error:i.find(e=>e.error)?.error??null});function u(i){const e=m({queries:i.map(o=>({...r({path:{accountId:o.accountId}}),staleTime:1/0})),combine:a});return{index:s.useMemo(()=>t(i.map((o,n)=>({folderAppointments:o.folderAppointments,mailboxes:e.items[n]??[]}))),[i,e]),isPending:e.isPending,error:e.error}}export{u};
1
+ import{K as r,r as s,b7 as t}from"./index-CTrN7dU7.js";import{u as m}from"./useQueries-8ibIA6jj.js";const a=i=>({items:i.map(e=>e.data?.items??[]),isPending:i.some(e=>e.isPending),error:i.find(e=>e.error)?.error??null});function u(i){const e=m({queries:i.map(o=>({...r({path:{accountId:o.accountId}}),staleTime:1/0})),combine:a});return{index:s.useMemo(()=>t(i.map((o,n)=>({folderAppointments:o.folderAppointments,mailboxes:e.items[n]??[]}))),[i,e]),isPending:e.isPending,error:e.error}}export{u};
@@ -1,4 +1,4 @@
1
- import{r as h,j as a,cu as Y,t as b,I as X,h as Z,at as J,i as ee,av as te,cN as se,bS as re,ab as ne,a0 as ae,X as oe,d6 as _,d7 as I,C as ie,co as ce}from"./index-DIEie7Yj.js";import{K as A}from"./kbd-lDzxHVCS.js";import{B as le,b as de}from"./useMessageBodyContent-DaCPQpX3.js";import{i as ue}from"./search-scope-B5-OK3Cq.js";const me='"Geist Variable", "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',k={light:{fg:"oklch(0.3 0.025 235)",canvas:"oklch(0.96 0.015 90)",accent:"oklch(0.55 0.14 150)"},dark:{fg:"oklch(0.88 0.02 90)",canvas:"oklch(0.22 0.025 220)",accent:"oklch(0.78 0.16 150)"}},fe={background:!1,spacing:!1},he="16px",ge=()=>`html{padding:0}body{padding:${he};box-sizing:border-box}`,pe=()=>"html{overflow:hidden}body{overflow-x:auto}",be=/prefers-color-scheme\s*:\s*dark|color-scheme\s*:\s*[^;}"']*\bdark\b/i,ye='<meta name="viewport" content="width=device-width, initial-scale=1">',xe=e=>{const t=e?k.dark:k.light;return`
1
+ import{r as h,j as a,ct as Y,t as b,I as X,h as Z,at as J,i as ee,av as te,cM as se,bS as re,ab as ne,a0 as ae,X as oe,d5 as _,d6 as I,C as ie,cn as ce}from"./index-CTrN7dU7.js";import{K as A}from"./kbd-DNmTK9ke.js";import{B as le,b as de}from"./useMessageBodyContent-C6WheWR5.js";import{i as ue}from"./search-scope-B5-OK3Cq.js";const me='"Geist Variable", "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',k={light:{fg:"oklch(0.3 0.025 235)",canvas:"oklch(0.96 0.015 90)",accent:"oklch(0.55 0.14 150)"},dark:{fg:"oklch(0.88 0.02 90)",canvas:"oklch(0.22 0.025 220)",accent:"oklch(0.78 0.16 150)"}},fe={background:!1,spacing:!1},he="16px",ge=()=>`html{padding:0}body{padding:${he};box-sizing:border-box}`,pe=()=>"html{overflow:hidden}body{overflow-x:auto}",be=/prefers-color-scheme\s*:\s*dark|color-scheme\s*:\s*[^;}"']*\bdark\b/i,ye='<meta name="viewport" content="width=device-width, initial-scale=1">',xe=e=>{const t=e?k.dark:k.light;return`
2
2
  /* Plain-email base: UI font-stack + theme-aware colors (#424) */
3
3
  html, body {
4
4
  font-family: ${me};
@@ -74,11 +74,11 @@ pre, code {
74
74
  :is(pre, code, pre *, code *):is([nowrap], [style*="nowrap" i]) {
75
75
  white-space: pre-wrap !important;
76
76
  }
77
- `,je=e=>{const t=new Map;for(const s of e){if(!s.contentId||s.contentUrl.length===0)continue;const r=s.contentId.replace(/^<|>$/g,"");t.set(r,s.contentUrl)}return s=>t.get(s.replace(/^<|>$/g,""))},Le=/^(none|transparent|inherit|initial|unset)\s*$/i,$=e=>{const t=[],s=/<style[^>]*>([\s\S]*?)<\/style>/gi;let r;for(r=s.exec(e);r!==null;)t.push(r[1]),r=s.exec(e);return t},Re=e=>{const t=/background(?:-color)?\s*:\s*([^;}\n]+)/gi;let s;for(s=t.exec(e);s!==null;){const r=s[1].trim();if(!Le.test(r))return!0;s=t.exec(e)}return!1},_e=e=>{if(/\bstyle\s*=\s*["'][^"']*background/i.test(e)||/\bbgcolor\s*=/i.test(e))return!0;for(const t of $(e))if(Re(t))return!0;return!1},Ie=new Set(["auto","none","initial","inherit","unset","revert","revert-layer"]),$e=new RegExp(`(?<![-\\w])(?:padding|margin)(?:-(top|right|bottom|left|block|inline)(?:-(?:start|end))?)?\\s*:\\s*([^;}"']+)`,"gi"),Be=new Set(["top","bottom","block"]),B=e=>e.replace(/\/\*[\s\S]*?\*\//g,""),T=e=>{const t=e.toLowerCase();if(!t||Ie.has(t)||t.startsWith("-"))return!1;const s=/^\+?(\d*\.?\d+)[a-z%]*$/.exec(t);return s?Number.parseFloat(s[1])!==0:!0},Oe=e=>{const t=e.split(/\s+/).filter(Boolean);return t.length<2?t:t.length<4?[t[1]]:[t[1],t[3]]},Me=(e,t)=>{if(e&&Be.has(e))return!1;const s=t.replace(/!\s*important/gi,"").trim();return s?e?s.split(/\s+/).some(T):Oe(s).some(T):!1},j=e=>{for(const t of B(e).matchAll($e))if(Me(t[1],t[2]))return!0;return!1},O=new Set(["blockquote"]),De=e=>e.replace(/<!--[\s\S]*?-->/g,""),ze=e=>{const t=[],s=/<([a-zA-Z][\w:-]*)((?:"[^"]*"|'[^']*'|[^>"'])*)>/g,r=/\bstyle\s*=\s*(?:"([^"]*)"|'([^']*)')/gi;for(const[,n,o]of e.matchAll(s))for(const d of o.matchAll(r))t.push({tag:n.toLowerCase(),style:d[1]??d[2]??""});return t},Pe=e=>[...B(e).matchAll(/([^{}]*)\{([^{}]*)\}/g)].map(t=>({selector:t[1].trim(),body:t[2]})),Ke=e=>{const t=e.trim().split(/[\s>+~]+/).pop()??"";return(/^[a-zA-Z][\w-]*/.exec(t)?.[0]??"").toLowerCase()},Fe=e=>e.split(",").every(t=>O.has(Ke(t))),He=e=>{const t=$(e),s=De(e);if(/\bcellpadding\s*=\s*["']?(?!0["'\s>])\d/i.test(s))return!0;for(const{tag:r,style:n}of ze(s))if(!O.has(r)&&j(n))return!0;for(const r of t)for(const n of Pe(r))if(!Fe(n.selector)&&j(n.body))return!0;return!1},Ge=["script","iframe","object","embed","form","input","button","textarea","select","meta","link","base"],Ue=["onerror","onload","onclick","onmouseover","onmouseout","onfocus","onblur","onsubmit","onkeydown","onkeyup","formaction","xlink:href","data-bind"],We="data:image/svg+xml,"+encodeURIComponent(`
77
+ `,je=e=>{const t=new Map;for(const s of e){if(!s.contentId||s.contentUrl.length===0)continue;const r=s.contentId.replace(/^<|>$/g,"");t.set(r,s.contentUrl)}return s=>t.get(s.replace(/^<|>$/g,""))},Le=/^(none|transparent|inherit|initial|unset)\s*$/i,$=e=>{const t=[],s=/<style[^>]*>([\s\S]*?)<\/style>/gi;let r;for(r=s.exec(e);r!==null;)t.push(r[1]),r=s.exec(e);return t},Re=e=>{const t=/background(?:-color)?\s*:\s*([^;}\n]+)/gi;let s;for(s=t.exec(e);s!==null;){const r=s[1].trim();if(!Le.test(r))return!0;s=t.exec(e)}return!1},_e=e=>{if(/\bstyle\s*=\s*["'][^"']*background/i.test(e)||/\bbgcolor\s*=/i.test(e))return!0;for(const t of $(e))if(Re(t))return!0;return!1},Ie=new Set(["auto","none","initial","inherit","unset","revert","revert-layer"]),$e=new RegExp(`(?<![-\\w])(?:padding|margin)(?:-(top|right|bottom|left|block|inline)(?:-(?:start|end))?)?\\s*:\\s*([^;}"']+)`,"gi"),Be=new Set(["top","bottom","block"]),B=e=>e.replace(/\/\*[\s\S]*?\*\//g,""),T=e=>{const t=e.toLowerCase();if(!t||Ie.has(t)||t.startsWith("-"))return!1;const s=/^\+?(\d*\.?\d+)[a-z%]*$/.exec(t);return s?Number.parseFloat(s[1])!==0:!0},Me=e=>{const t=e.split(/\s+/).filter(Boolean);return t.length<2?t:t.length<4?[t[1]]:[t[1],t[3]]},Oe=(e,t)=>{if(e&&Be.has(e))return!1;const s=t.replace(/!\s*important/gi,"").trim();return s?e?s.split(/\s+/).some(T):Me(s).some(T):!1},j=e=>{for(const t of B(e).matchAll($e))if(Oe(t[1],t[2]))return!0;return!1},M=new Set(["blockquote"]),De=e=>e.replace(/<!--[\s\S]*?-->/g,""),ze=e=>{const t=[],s=/<([a-zA-Z][\w:-]*)((?:"[^"]*"|'[^']*'|[^>"'])*)>/g,r=/\bstyle\s*=\s*(?:"([^"]*)"|'([^']*)')/gi;for(const[,n,o]of e.matchAll(s))for(const d of o.matchAll(r))t.push({tag:n.toLowerCase(),style:d[1]??d[2]??""});return t},Pe=e=>[...B(e).matchAll(/([^{}]*)\{([^{}]*)\}/g)].map(t=>({selector:t[1].trim(),body:t[2]})),Ke=e=>{const t=e.trim().split(/[\s>+~]+/).pop()??"";return(/^[a-zA-Z][\w-]*/.exec(t)?.[0]??"").toLowerCase()},Fe=e=>e.split(",").every(t=>M.has(Ke(t))),He=e=>{const t=$(e),s=De(e);if(/\bcellpadding\s*=\s*["']?(?!0["'\s>])\d/i.test(s))return!0;for(const{tag:r,style:n}of ze(s))if(!M.has(r)&&j(n))return!0;for(const r of t)for(const n of Pe(r))if(!Fe(n.selector)&&j(n.body))return!0;return!1},Ge=["script","iframe","object","embed","form","input","button","textarea","select","meta","link","base"],Ue=["onerror","onload","onclick","onmouseover","onmouseout","onfocus","onblur","onsubmit","onkeydown","onkeyup","formaction","xlink:href","data-bind"],We="data:image/svg+xml,"+encodeURIComponent(`
78
78
  <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
79
79
  <rect fill="#f0f0f0" width="100" height="100"/>
80
80
  <text x="50" y="50" text-anchor="middle" dy=".3em" fill="#999" font-size="12">
81
81
  Image blocked
82
82
  </text>
83
83
  </svg>
84
- `),Ve=e=>e.replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),Qe=e=>e.replace(/@import[^;]*;/gi,"/* @import blocked */").replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),qe=(e={})=>{const t=Y(),s={FORBID_TAGS:Ge,FORBID_ATTR:Ue,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1};return t.addHook("afterSanitizeAttributes",r=>{if(e.allowExternalImages||(r.tagName==="IMG"&&r.removeAttribute("srcset"),r.tagName==="SOURCE"&&(r.removeAttribute("srcset"),r.removeAttribute("src")),r.tagName==="VIDEO"&&r.removeAttribute("poster")),r.tagName==="IMG"){const n=r.getAttribute("src")||"";if(n.startsWith("data:"))return;if(n.startsWith("cid:")){const d=n.slice(4).replace(/^<|>$/g,""),g=e.resolveCid?.(d);g&&(r.setAttribute("src",g),r.classList.add("inline-content"));return}e.allowExternalImages||(r.setAttribute("data-blocked-src",n),r.setAttribute("src",We),r.setAttribute("alt","[Blocked image]"),r.classList.add("blocked-image"))}if(r.tagName==="A"){const n=r.getAttribute("href")||"";if(/^(javascript|data):/i.test(n)){r.removeAttribute("href");return}r.setAttribute("target","_blank"),r.setAttribute("rel","noopener noreferrer nofollow"),r.classList.add("external-link")}if(r.hasAttribute("style")){const n=r.getAttribute("style")||"";r.setAttribute("style",Ve(n))}}),t.addHook("uponSanitizeElement",(r,n)=>{if(n.tagName==="style"){const o=r.textContent||"";r.textContent=Qe(o)}}),r=>{const n=_e(r),o=He(r),d=t.sanitize(r,s);return{html:`<style>${Te()}</style>${d}`,hasAuthorBackground:n,hasAuthorSpacing:o}}},L=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),Et=({className:e,children:t})=>a.jsx("div",{className:b("[&_.message-body-frame]:-mx-2 lg:[&_.message-body-frame]:-mx-4",e),children:t}),Ye=({html:e,text:t,isDark:s=!1,category:r,allowImages:n=!1,resolveCid:o,className:d,renderBlockedNotice:g})=>{const i=h.useMemo(()=>!e||typeof document>"u"?null:qe({allowExternalImages:n,resolveCid:o})(e),[e,n,o]),c=i?.html??null,{framed:u,isPlain:m}=Ce(r,i?.hasAuthorBackground??!1),f=h.useMemo(()=>({background:i?.hasAuthorBackground??!1,spacing:i?.hasAuthorSpacing??!1}),[i?.hasAuthorBackground,i?.hasAuthorSpacing]),p=h.useMemo(()=>!c||n?0:(c.match(/data-blocked-src/g)||[]).length,[c,n]);return!c&&!t?a.jsx("div",{className:b("message-body",d),children:a.jsx(L,{})}):a.jsxs("div",{className:b("message-body",d),children:[p>0&&a.jsx("div",{children:g?.(p)}),c?a.jsx("div",{className:"message-body-frame",children:u?a.jsx("div",{className:"w-full max-w-full",children:a.jsx(C,{html:c,variant:"framed",isDark:s,declares:f})}):a.jsx("div",{className:"max-w-full lg:max-w-2xl",children:a.jsx(C,{html:c,variant:m?"plain":"framed",isDark:s,declares:f})})}):t?a.jsx("pre",{className:"email-text whitespace-pre-wrap text-sm leading-relaxed",children:t}):a.jsx(L,{})]})};function Nt({message:e="Select a thread to read",icon:t,showHints:s=!0,className:r}){return a.jsxs("div",{className:b("flex flex-1 flex-col items-center justify-center text-center",r),children:[t??a.jsx(X,{className:"size-10 text-fg-subtle"}),a.jsx("p",{className:"mt-3 text-sm text-fg-muted",children:e}),s&&a.jsxs("p",{className:"text-2xs text-fg-subtle",children:[a.jsx(A,{children:"j"})," / ",a.jsx(A,{children:"k"})," to move, ",a.jsx(A,{children:"Enter"})," to open"]})]})}function M(e){const t=[];let s=-1,r=!1;for(let n=0;n<e.length;n++){const o=e[n];if(o==='"'){r=!r,s<0&&(s=n);continue}if(!r&&/\s/.test(o)){s>=0&&t.push({raw:e.slice(s,n),start:s,end:n}),s=-1;continue}s<0&&(s=n)}return s>=0&&t.push({raw:e.slice(s),start:s,end:e.length}),t}const Xe=e=>{if(!e.startsWith('"'))return e;const t=e.slice(1);return t.endsWith('"')?t.slice(0,-1):t};function Ze(e){const t=e.indexOf(":");if(t<=0)return;const s=e.slice(t+1);return{name:e.slice(0,t).toLowerCase(),value:Xe(s),rawValue:s}}const Je=e=>/[\s"]/.test(e),et=e=>Je(e)?`"${e.replace(/"/g,"")}"`:e,Ct=(e,t)=>`${e}:${et(t)}`,D=(e,t=Date.now())=>({value:e,setAt:t}),tt=(e,t,s,r)=>{if(e.addressId!==t)return e;const n={...e.flags??{}};return s?n.trusted=D(!0,r):delete n.trusted,{...e,flags:n}},st=(e,t,s,r)=>{const n=o=>o.map(d=>tt(d,t,s,r));return{...e,envelope:{...e.envelope,from:n(e.envelope.from),to:n(e.envelope.to),cc:n(e.envelope.cc),bcc:n(e.envelope.bcc),replyTo:n(e.envelope.replyTo)}}},rt=({messageId:e})=>{const t=Z(),{pushError:s}=J(),{mutate:r,isPending:n,error:o,reset:d}=ee({...re(),onMutate:async i=>{const c=i.path.addressId,m=i.body.flags?.trusted?.value===!0,f=se({path:{messageId:e}});await t.cancelQueries({queryKey:f});const p=t.getQueriesData({queryKey:f}).filter(l=>l[1]!==void 0).map(([l,x])=>({queryKey:l,data:x}));return t.setQueriesData({queryKey:f},l=>l&&st(l,c,m)),{describePrefix:f,previous:p}},onError:(i,c,u)=>{if(u)for(const m of u.previous)t.setQueryData(m.queryKey,m.data);s(te("Couldn't trust sender","The change wasn't saved.",i))},onSettled:(i,c,u,m)=>{m&&t.invalidateQueries({queryKey:m.describePrefix})}});return{toggleTrusted:(i,c)=>{r({path:{addressId:i},body:{flags:{trusted:D(!c)}}})},isPending:n,error:o,reset:d}},nt=()=>{const[e,t]=h.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark"));return h.useEffect(()=>{const s=document.documentElement,r=new MutationObserver(()=>{t(s.classList.contains("dark"))});return r.observe(s,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),e},at=(e,t)=>{const s=`${e} image${e>1?"s":""}`;return t?`${s} hidden — you blocked this sender`:`${s} blocked for privacy`},ot=({blockedImageCount:e,canAlwaysTrust:t,isTrustPending:s,isSenderBlocked:r,onLoadOnce:n,onAlwaysTrust:o})=>a.jsxs("div",{"data-testid":"blocked-images-notice",className:"mb-3 flex items-center justify-between rounded-md bg-surface-sunken/50 px-3 py-2 text-sm",children:[a.jsx("span",{className:"text-fg-muted",children:at(e,r)}),!r&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("button",{type:"button",onClick:n,className:"text-accent hover:underline",children:"Load once"}),t&&a.jsx("button",{type:"button",onClick:o,"aria-busy":s,className:"text-accent hover:underline aria-busy:opacity-50",children:s?"Trusting…":"Always trust"})]})]}),it=(e,t)=>{switch(e){case"auth":return{title:"Your session expired",detail:"Sign in again to reload the message body. Other parts of the app may also stop responding until you do."};case"body-missing":return{title:"Message body is missing in storage",detail:"A sync failure may have left this message without its body bytes. Contact support, or run the reconcile script to refetch from the upstream IMAP server."};case"content-type-mismatch":return{title:"Couldn't load message body",detail:"The server returned an unexpected content type for this part. The message body has not been rendered to keep you safe."};case"spa-shell-leak":return{title:"Couldn't load message body",detail:"The server returned the app shell instead of the message body. This is an infrastructure bug — please report it."};case"not-ready":return{title:"Message body is still syncing",detail:"This message's body hasn't finished downloading from the mail server yet. It should appear shortly — reopen the message to try again."};default:return{title:"Couldn't load message body",detail:t}}},ct=e=>e instanceof le?e.reason:"generic",lt=e=>e instanceof Error?e.message:typeof e=="string"?e:"An unexpected error occurred while loading the message body.",dt=({error:e,onRetry:t})=>{const s=ct(e),r=lt(e),{title:n,detail:o}=it(s,r),[d,g]=h.useState(!1),{Account:i}=ne();return d?null:a.jsxs("div",{role:"alert","data-testid":"message-body-error-banner","data-reason":s,className:"flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm",children:[a.jsx(ae,{className:"size-4 shrink-0 text-danger mt-0.5","aria-hidden":"true"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium text-danger",children:n}),a.jsx("p",{className:"text-fg-muted mt-1 break-words",children:o})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[s==="auth"&&a.jsx(i,{children:({signOut:c})=>a.jsx("button",{type:"button",onClick:()=>c(),className:"text-sm font-medium text-accent hover:underline",children:"Sign in again"})}),t&&a.jsx("button",{type:"button",onClick:t,className:"text-sm font-medium text-accent hover:underline",children:"Retry"}),a.jsx("button",{type:"button",onClick:()=>g(!0),"aria-label":"Dismiss message body error",className:"rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors",children:a.jsx(oe,{className:"size-4","aria-hidden":"true"})})]})]})},ut=()=>a.jsxs("div",{className:"animate-pulse space-y-2",role:"status","aria-label":"Loading message body",children:[a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-full"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-11/12"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-3/4"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-5/6"})]}),R=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),Tt=({bodyParts:e,html:t,text:s,isTrusted:r=!1,isBlocked:n=!1,messageId:o,fromAddressId:d,category:g,className:i})=>{const[c,u]=h.useState(!1),[m,f]=h.useState(o);m!==o&&(f(o),u(!1));const p=!n&&(r||c),l=nt(),{toggleTrusted:x,isPending:w}=rt({messageId:o??""}),y=!!e&&e.length>0,{picked:z,data:v,isLoading:P,isError:K,error:F,refetch:H}=de({messageId:o,bodyParts:e,enabled:y}),G=h.useMemo(()=>je(e??[]),[e]),U=y&&v?.kind==="html"?v.body:t,W=y&&v?.kind==="text"?v.body:s;if(y){if(P)return a.jsx("div",{className:b("message-body",i),children:a.jsx(ut,{})});if(K)return a.jsx("div",{className:b("message-body",i),children:a.jsx(dt,{error:F,onRetry:()=>H()})});if(!z)return a.jsx("div",{className:b("message-body",i),children:a.jsx(R,{})})}else if(!t&&!s)return a.jsx("div",{className:b("message-body",i),children:a.jsx(R,{})});const V=!!(d&&o),Q=()=>{!d||w||(u(!0),x(d,!1))};return a.jsx(Ye,{className:i,html:U,text:W,isDark:l,category:g,allowImages:p,resolveCid:G,renderBlockedNotice:q=>a.jsx(ot,{blockedImageCount:q,canAlwaysTrust:V,isTrustPending:w,isSenderBlocked:n,onLoadOnce:()=>u(!0),onAlwaysTrust:Q})})},mt=Object.values(_).map(e=>({value:e,label:I[e]})),ft={unclassified:"uncategorized"},ht=[{name:"from",label:"Sender",values:"contact"},{name:"subject",label:"Subject",values:"text"},{name:"category",label:"Category",values:"fixed",options:mt},{name:"is",label:"State",values:"fixed",options:[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"starred",label:"Starred"}]},{name:"has",label:"Contents",values:"fixed",options:[{value:"attachment",label:"Has attachment"}]},{name:"in",label:"Folder",values:"mailbox"},{name:"account",label:"Account",values:"account"},{name:"after",label:"Sent on or after",values:"date"},{name:"before",label:"Sent before",values:"date"}],gt=new Map(ht.map(e=>[e.name,e])),jt=e=>gt.get(e.toLowerCase()),pt=/^\d{4}-\d{2}-\d{2}$/;function bt(e,t,s){if(!pt.test(s))return;const r=Date.parse(`${s}T00:00:00Z`);if(!Number.isNaN(r))return{type:e,raw:t,value:s,epochSeconds:Math.floor(r/1e3)}}function yt(e){const t=e.toLowerCase(),s=ft[t];return s||Object.values(_).find(n=>n===t)}function xt(e,t){switch(t.toLowerCase()){case"unread":return{type:"isUnread",raw:e};case"read":return{type:"isRead",raw:e};case"starred":case"flagged":return{type:"isStarred",raw:e};default:return}}function wt(e,t){const s=Ze(e);if(!s||s.value.length===0)return;const{name:r,value:n}=s;switch(r){case"from":return{type:"from",raw:e,value:n};case"subject":return{type:"subject",raw:e,value:n};case"category":{const o=yt(n);return o?{type:"category",raw:e,value:n,category:o}:void 0}case"is":return xt(e,n);case"has":return n.toLowerCase()==="attachment"?{type:"hasAttachment",raw:e}:void 0;case"before":case"after":return bt(r,e,n);case"in":{const o=t.mailboxesByName?.get(n.toLowerCase());return o?{type:"in",raw:e,value:n,mailboxId:o}:void 0}case"account":{const o=t.accountsByName?.get(n.toLowerCase());return o?{type:"account",raw:e,value:n,accountId:o}:void 0}default:return}}function Lt(e,t={}){const s=[],r=[];for(const n of M(e)){const o=wt(n.raw,t);o?s.push(o):r.push(n.raw)}return{freeText:r.join(" "),tokens:s}}function Rt(e,t){return M(e).filter(s=>s.raw!==t.raw).map(s=>s.raw).join(" ")}function _t(e){switch(e.type){case"from":return`From: ${e.value}`;case"subject":return`Subject: ${e.value}`;case"category":return`Category: ${I[e.category]}`;case"hasAttachment":return"Has attachment";case"isUnread":return"Unread";case"isRead":return"Read";case"isStarred":return"Starred";case"before":return`Before ${e.value}`;case"after":return`After ${e.value}`;case"in":return`In: ${e.value}`;case"account":return`Account: ${e.value}`}}function It(){const{mailboxNameIndex:e,accountNameIndex:t}=ie(),s=ce();return{...ue(s)?{}:{mailboxesByName:e},accountsByName:t}}export{Et as M,Nt as R,ht as S,Ye as a,rt as b,Tt as c,jt as d,M as e,Ze as f,Ct as g,Lt as p,Rt as r,_t as s,It as u};
84
+ `),Ve=e=>e.replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),Qe=e=>e.replace(/@import[^;]*;/gi,"/* @import blocked */").replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),qe=(e={})=>{const t=Y(),s={FORBID_TAGS:Ge,FORBID_ATTR:Ue,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1};return t.addHook("afterSanitizeAttributes",r=>{if(e.allowExternalImages||(r.tagName==="IMG"&&r.removeAttribute("srcset"),r.tagName==="SOURCE"&&(r.removeAttribute("srcset"),r.removeAttribute("src")),r.tagName==="VIDEO"&&r.removeAttribute("poster")),r.tagName==="IMG"){const n=r.getAttribute("src")||"";if(n.startsWith("data:"))return;if(n.startsWith("cid:")){const d=n.slice(4).replace(/^<|>$/g,""),g=e.resolveCid?.(d);g&&(r.setAttribute("src",g),r.classList.add("inline-content"));return}e.allowExternalImages||(r.setAttribute("data-blocked-src",n),r.setAttribute("src",We),r.setAttribute("alt","[Blocked image]"),r.classList.add("blocked-image"))}if(r.tagName==="A"){const n=r.getAttribute("href")||"";if(/^(javascript|data):/i.test(n)){r.removeAttribute("href");return}r.setAttribute("target","_blank"),r.setAttribute("rel","noopener noreferrer nofollow"),r.classList.add("external-link")}if(r.hasAttribute("style")){const n=r.getAttribute("style")||"";r.setAttribute("style",Ve(n))}}),t.addHook("uponSanitizeElement",(r,n)=>{if(n.tagName==="style"){const o=r.textContent||"";r.textContent=Qe(o)}}),r=>{const n=_e(r),o=He(r),d=t.sanitize(r,s);return{html:`<style>${Te()}</style>${d}`,hasAuthorBackground:n,hasAuthorSpacing:o}}},L=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),Et=({className:e,children:t})=>a.jsx("div",{className:b("[&_.message-body-frame]:-mx-2 lg:[&_.message-body-frame]:-mx-4",e),children:t}),Ye=({html:e,text:t,isDark:s=!1,category:r,allowImages:n=!1,resolveCid:o,className:d,renderBlockedNotice:g})=>{const i=h.useMemo(()=>!e||typeof document>"u"?null:qe({allowExternalImages:n,resolveCid:o})(e),[e,n,o]),c=i?.html??null,{framed:u,isPlain:m}=Ce(r,i?.hasAuthorBackground??!1),f=h.useMemo(()=>({background:i?.hasAuthorBackground??!1,spacing:i?.hasAuthorSpacing??!1}),[i?.hasAuthorBackground,i?.hasAuthorSpacing]),p=h.useMemo(()=>!c||n?0:(c.match(/data-blocked-src/g)||[]).length,[c,n]);return!c&&!t?a.jsx("div",{className:b("message-body",d),children:a.jsx(L,{})}):a.jsxs("div",{className:b("message-body",d),children:[p>0&&a.jsx("div",{children:g?.(p)}),c?a.jsx("div",{className:"message-body-frame",children:u?a.jsx("div",{className:"w-full max-w-full",children:a.jsx(C,{html:c,variant:"framed",isDark:s,declares:f})}):a.jsx("div",{className:"max-w-full lg:max-w-2xl",children:a.jsx(C,{html:c,variant:m?"plain":"framed",isDark:s,declares:f})})}):t?a.jsx("pre",{className:"email-text whitespace-pre-wrap text-sm leading-relaxed",children:t}):a.jsx(L,{})]})};function Nt({message:e="Select a thread to read",icon:t,showHints:s=!0,className:r}){return a.jsxs("div",{className:b("flex flex-1 flex-col items-center justify-center text-center",r),children:[t??a.jsx(X,{className:"size-10 text-fg-subtle"}),a.jsx("p",{className:"mt-3 text-sm text-fg-muted",children:e}),s&&a.jsxs("p",{className:"text-2xs text-fg-subtle",children:[a.jsx(A,{children:"j"})," / ",a.jsx(A,{children:"k"})," to move, ",a.jsx(A,{children:"Enter"})," to open"]})]})}function O(e){const t=[];let s=-1,r=!1;for(let n=0;n<e.length;n++){const o=e[n];if(o==='"'){r=!r,s<0&&(s=n);continue}if(!r&&/\s/.test(o)){s>=0&&t.push({raw:e.slice(s,n),start:s,end:n}),s=-1;continue}s<0&&(s=n)}return s>=0&&t.push({raw:e.slice(s),start:s,end:e.length}),t}const Xe=e=>{if(!e.startsWith('"'))return e;const t=e.slice(1);return t.endsWith('"')?t.slice(0,-1):t};function Ze(e){const t=e.indexOf(":");if(t<=0)return;const s=e.slice(t+1);return{name:e.slice(0,t).toLowerCase(),value:Xe(s),rawValue:s}}const Je=e=>/[\s"]/.test(e),et=e=>Je(e)?`"${e.replace(/"/g,"")}"`:e,Ct=(e,t)=>`${e}:${et(t)}`,D=(e,t=Date.now())=>({value:e,setAt:t}),tt=(e,t,s,r)=>{if(e.addressId!==t)return e;const n={...e.flags??{}};return s?n.trusted=D(!0,r):delete n.trusted,{...e,flags:n}},st=(e,t,s,r)=>{const n=o=>o.map(d=>tt(d,t,s,r));return{...e,envelope:{...e.envelope,from:n(e.envelope.from),to:n(e.envelope.to),cc:n(e.envelope.cc),bcc:n(e.envelope.bcc),replyTo:n(e.envelope.replyTo)}}},rt=({messageId:e})=>{const t=Z(),{pushError:s}=J(),{mutate:r,isPending:n,error:o,reset:d}=ee({...re(),onMutate:async i=>{const c=i.path.addressId,m=i.body.flags?.trusted?.value===!0,f=se({path:{messageId:e}});await t.cancelQueries({queryKey:f});const p=t.getQueriesData({queryKey:f}).filter(l=>l[1]!==void 0).map(([l,x])=>({queryKey:l,data:x}));return t.setQueriesData({queryKey:f},l=>l&&st(l,c,m)),{describePrefix:f,previous:p}},onError:(i,c,u)=>{if(u)for(const m of u.previous)t.setQueryData(m.queryKey,m.data);s(te("Couldn't trust sender","The change wasn't saved.",i))},onSettled:(i,c,u,m)=>{m&&t.invalidateQueries({queryKey:m.describePrefix})}});return{toggleTrusted:(i,c)=>{r({path:{addressId:i},body:{flags:{trusted:D(!c)}}})},isPending:n,error:o,reset:d}},nt=()=>{const[e,t]=h.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark"));return h.useEffect(()=>{const s=document.documentElement,r=new MutationObserver(()=>{t(s.classList.contains("dark"))});return r.observe(s,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),e},at=(e,t)=>{const s=`${e} image${e>1?"s":""}`;return t?`${s} hidden — you blocked this sender`:`${s} blocked for privacy`},ot=({blockedImageCount:e,canAlwaysTrust:t,isTrustPending:s,isSenderBlocked:r,onLoadOnce:n,onAlwaysTrust:o})=>a.jsxs("div",{"data-testid":"blocked-images-notice",className:"mb-3 flex items-center justify-between rounded-md bg-surface-sunken/50 px-3 py-2 text-sm",children:[a.jsx("span",{className:"text-fg-muted",children:at(e,r)}),!r&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("button",{type:"button",onClick:n,className:"text-accent hover:underline",children:"Load once"}),t&&a.jsx("button",{type:"button",onClick:o,"aria-busy":s,className:"text-accent hover:underline aria-busy:opacity-50",children:s?"Trusting…":"Always trust"})]})]}),it=(e,t)=>{switch(e){case"auth":return{title:"Your session expired",detail:"Sign in again to reload the message body. Other parts of the app may also stop responding until you do."};case"body-missing":return{title:"Message body is missing in storage",detail:"A sync failure may have left this message without its body bytes. Contact support, or run the reconcile script to refetch from the upstream IMAP server."};case"content-type-mismatch":return{title:"Couldn't load message body",detail:"The server returned an unexpected content type for this part. The message body has not been rendered to keep you safe."};case"spa-shell-leak":return{title:"Couldn't load message body",detail:"The server returned the app shell instead of the message body. This is an infrastructure bug — please report it."};case"not-ready":return{title:"Message body is still syncing",detail:"This message's body hasn't finished downloading from the mail server yet. It should appear shortly — reopen the message to try again."};default:return{title:"Couldn't load message body",detail:t}}},ct=e=>e instanceof le?e.reason:"generic",lt=e=>e instanceof Error?e.message:typeof e=="string"?e:"An unexpected error occurred while loading the message body.",dt=({error:e,onRetry:t})=>{const s=ct(e),r=lt(e),{title:n,detail:o}=it(s,r),[d,g]=h.useState(!1),{Account:i}=ne();return d?null:a.jsxs("div",{role:"alert","data-testid":"message-body-error-banner","data-reason":s,className:"flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm",children:[a.jsx(ae,{className:"size-4 shrink-0 text-danger mt-0.5","aria-hidden":"true"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium text-danger",children:n}),a.jsx("p",{className:"text-fg-muted mt-1 break-words",children:o})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[s==="auth"&&a.jsx(i,{children:({signOut:c})=>a.jsx("button",{type:"button",onClick:()=>c(),className:"text-sm font-medium text-accent hover:underline",children:"Sign in again"})}),t&&a.jsx("button",{type:"button",onClick:t,className:"text-sm font-medium text-accent hover:underline",children:"Retry"}),a.jsx("button",{type:"button",onClick:()=>g(!0),"aria-label":"Dismiss message body error",className:"rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors",children:a.jsx(oe,{className:"size-4","aria-hidden":"true"})})]})]})},ut=()=>a.jsxs("div",{className:"animate-pulse space-y-2",role:"status","aria-label":"Loading message body",children:[a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-full"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-11/12"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-3/4"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-5/6"})]}),R=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),Tt=({bodyParts:e,html:t,text:s,isTrusted:r=!1,isBlocked:n=!1,messageId:o,fromAddressId:d,category:g,className:i})=>{const[c,u]=h.useState(!1),[m,f]=h.useState(o);m!==o&&(f(o),u(!1));const p=!n&&(r||c),l=nt(),{toggleTrusted:x,isPending:w}=rt({messageId:o??""}),y=!!e&&e.length>0,{picked:z,data:v,isLoading:P,isError:K,error:F,refetch:H}=de({messageId:o,bodyParts:e,enabled:y}),G=h.useMemo(()=>je(e??[]),[e]),U=y&&v?.kind==="html"?v.body:t,W=y&&v?.kind==="text"?v.body:s;if(y){if(P)return a.jsx("div",{className:b("message-body",i),children:a.jsx(ut,{})});if(K)return a.jsx("div",{className:b("message-body",i),children:a.jsx(dt,{error:F,onRetry:()=>H()})});if(!z)return a.jsx("div",{className:b("message-body",i),children:a.jsx(R,{})})}else if(!t&&!s)return a.jsx("div",{className:b("message-body",i),children:a.jsx(R,{})});const V=!!(d&&o),Q=()=>{!d||w||(u(!0),x(d,!1))};return a.jsx(Ye,{className:i,html:U,text:W,isDark:l,category:g,allowImages:p,resolveCid:G,renderBlockedNotice:q=>a.jsx(ot,{blockedImageCount:q,canAlwaysTrust:V,isTrustPending:w,isSenderBlocked:n,onLoadOnce:()=>u(!0),onAlwaysTrust:Q})})},mt=Object.values(_).map(e=>({value:e,label:I[e]})),ft={unclassified:"uncategorized"},ht=[{name:"from",label:"Sender",values:"contact"},{name:"subject",label:"Subject",values:"text"},{name:"category",label:"Category",values:"fixed",options:mt},{name:"is",label:"State",values:"fixed",options:[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"starred",label:"Starred"}]},{name:"has",label:"Contents",values:"fixed",options:[{value:"attachment",label:"Has attachment"}]},{name:"in",label:"Folder",values:"mailbox"},{name:"account",label:"Account",values:"account"},{name:"after",label:"Sent on or after",values:"date"},{name:"before",label:"Sent before",values:"date"}],gt=new Map(ht.map(e=>[e.name,e])),jt=e=>gt.get(e.toLowerCase()),pt=/^\d{4}-\d{2}-\d{2}$/;function bt(e,t,s){if(!pt.test(s))return;const r=Date.parse(`${s}T00:00:00Z`);if(!Number.isNaN(r))return{type:e,raw:t,value:s,epochSeconds:Math.floor(r/1e3)}}function yt(e){const t=e.toLowerCase(),s=ft[t];return s||Object.values(_).find(n=>n===t)}function xt(e,t){switch(t.toLowerCase()){case"unread":return{type:"isUnread",raw:e};case"read":return{type:"isRead",raw:e};case"starred":case"flagged":return{type:"isStarred",raw:e};default:return}}function wt(e,t){const s=Ze(e);if(!s||s.value.length===0)return;const{name:r,value:n}=s;switch(r){case"from":return{type:"from",raw:e,value:n};case"subject":return{type:"subject",raw:e,value:n};case"category":{const o=yt(n);return o?{type:"category",raw:e,value:n,category:o}:void 0}case"is":return xt(e,n);case"has":return n.toLowerCase()==="attachment"?{type:"hasAttachment",raw:e}:void 0;case"before":case"after":return bt(r,e,n);case"in":{const o=t.mailboxesByName?.get(n.toLowerCase());return o?{type:"in",raw:e,value:n,mailboxId:o}:void 0}case"account":{const o=t.accountsByName?.get(n.toLowerCase());return o?{type:"account",raw:e,value:n,accountId:o}:void 0}default:return}}function Lt(e,t={}){const s=[],r=[];for(const n of O(e)){const o=wt(n.raw,t);o?s.push(o):r.push(n.raw)}return{freeText:r.join(" "),tokens:s}}function Rt(e,t){return O(e).filter(s=>s.raw!==t.raw).map(s=>s.raw).join(" ")}function _t(e){switch(e.type){case"from":return`From: ${e.value}`;case"subject":return`Subject: ${e.value}`;case"category":return`Category: ${I[e.category]}`;case"hasAttachment":return"Has attachment";case"isUnread":return"Unread";case"isRead":return"Read";case"isStarred":return"Starred";case"before":return`Before ${e.value}`;case"after":return`After ${e.value}`;case"in":return`In: ${e.value}`;case"account":return`Account: ${e.value}`}}function It(){const{mailboxNameIndex:e,accountNameIndex:t}=ie(),s=ce();return{...ue(s)?{}:{mailboxesByName:e},accountsByName:t}}export{Et as M,Nt as R,ht as S,Ye as a,rt as b,Tt as c,jt as d,O as e,Ze as f,Ct as g,Lt as p,Rt as r,_t as s,It as u};
@@ -1 +1 @@
1
- import{h as L,at as M,i as k,E as I,F as E,cz as A,el as R,r as v,dy as w,j as p,em as h,en as D,eo as _,C as j,co as z,c as N,dS as Q,d6 as O}from"./index-DIEie7Yj.js";import{c as U}from"./popover-menu-BzPU2XRv.js";import{ai as q}from"./MailListHeader-nOmDteIr.js";import{a as P}from"./useLabels-BJtlozty.js";import{n as B}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-MVchIFCF.js";const ne=e=>{const t=new Set;for(const s of e)s&&t.add(s);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}},K=e=>{const{mailboxId:t,messages:s}=e,n=L(),{pushError:l}=M(),{mutateAsync:c,isPending:a}=k({...R(),onError:(r,u)=>{l({title:u.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:A(r),error:r})},onSettled:(r,u,d)=>{I(n,E(q(d.body.messageIds??[],s??[],t)))}});return{applyLabel:v.useCallback((r,u,d)=>{r.length!==0&&w(r,m=>c({body:{messageIds:m,labelId:u,action:d}}))},[c]),isPending:a}};function re({accountId:e,mailboxId:t,messageIds:s}){const{labels:n}=P(e),{applyLabel:l}=K({mailboxId:t}),c=v.useMemo(()=>n.map(a=>({key:a.labelId,label:a.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${D(a.color)?h[a.color]:h.Default}`}),onSelect:()=>l(s,a.labelId,"Apply")})),[n,s,l]);return c.length===0?null:p.jsx(U,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(_,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:c,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 V=3,ie=({hasSearchQuery:e,freeText:t,residualTokenCount:s})=>{if(!e||s>0)return!1;const n=t.trim();return n.length===0||n.length>=V},ce=e=>e===void 0?{kind:"unknown"}:{kind:"exact",value:e},Y=20,$=new Set(Object.values(O)),J=e=>e!==void 0&&$.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 le({mailboxId:e,filterCategory:t}={}){const{searchQuery:s}=j(),n=G(),l=z(),c=B(s),{freeText:a,tokens:i}=H(c,n),r=a.length>0,u=i.find(o=>o.type==="category"),d=J(t)??u?.category,m=i.some(o=>o.type==="hasAttachment")?!0:void 0,f=i.some(o=>o.type==="isStarred")?!0:void 0,y=W(i),b=i.find(o=>o.type==="after"),g=i.find(o=>o.type==="before"),S=i.find(o=>o.type==="in"),x=F({browsed:l,callerMailboxId:e,inTokenMailboxId:S?.mailboxId}),{data:T,isLoading:C}=N({...Q({query:{query:a,mailboxId:x,limit:Y,...d!==void 0?{category:d}:{},...m!==void 0?{hasAttachment:m}:{},...f!==void 0?{hasStars:f}:{},...y!==void 0?{isRead:y}:{},...b?{sentDateFrom:b.epochSeconds}:{},...g?{sentDateTo:g.epochSeconds}:{}}}),enabled:r,staleTime:6e4});return{hits:T?.items??[],isLoading:r&&C}}export{re as L,ne as r,ie as s,ce as t,le as u};
1
+ import{h as L,at as M,i as k,E as I,F as E,cy as A,ek as R,r as v,dx as w,j as p,el as h,em as D,en as _,C as j,cn as N,c as Q,dR as z,d5 as O}from"./index-CTrN7dU7.js";import{c as U}from"./popover-menu-I_p7C4RX.js";import{ai as q}from"./MailListHeader-BVdr1xz_.js";import{a as P}from"./useLabels-BLAR4UCi.js";import{n as B}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-BZ3hasAQ.js";const ne=e=>{const t=new Set;for(const s of e)s&&t.add(s);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}},K=e=>{const{mailboxId:t,messages:s}=e,n=L(),{pushError:l}=M(),{mutateAsync:c,isPending:a}=k({...R(),onError:(r,u)=>{l({title:u.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:A(r),error:r})},onSettled:(r,u,d)=>{I(n,E(q(d.body.messageIds??[],s??[],t)))}});return{applyLabel:v.useCallback((r,u,d)=>{r.length!==0&&w(r,m=>c({body:{messageIds:m,labelId:u,action:d}}))},[c]),isPending:a}};function re({accountId:e,mailboxId:t,messageIds:s}){const{labels:n}=P(e),{applyLabel:l}=K({mailboxId:t}),c=v.useMemo(()=>n.map(a=>({key:a.labelId,label:a.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${D(a.color)?h[a.color]:h.Default}`}),onSelect:()=>l(s,a.labelId,"Apply")})),[n,s,l]);return c.length===0?null:p.jsx(U,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(_,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:c,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 V=3,ie=({hasSearchQuery:e,freeText:t,residualTokenCount:s})=>{if(!e||s>0)return!1;const n=t.trim();return n.length===0||n.length>=V},ce=e=>e===void 0?{kind:"unknown"}:{kind:"exact",value:e},Y=20,$=new Set(Object.values(O)),J=e=>e!==void 0&&$.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 le({mailboxId:e,filterCategory:t}={}){const{searchQuery:s}=j(),n=G(),l=N(),c=B(s),{freeText:a,tokens:i}=H(c,n),r=a.length>0,u=i.find(o=>o.type==="category"),d=J(t)??u?.category,m=i.some(o=>o.type==="hasAttachment")?!0:void 0,f=i.some(o=>o.type==="isStarred")?!0:void 0,y=W(i),b=i.find(o=>o.type==="after"),g=i.find(o=>o.type==="before"),x=i.find(o=>o.type==="in"),S=F({browsed:l,callerMailboxId:e,inTokenMailboxId:x?.mailboxId}),{data:T,isLoading:C}=Q({...z({query:{query:a,mailboxId:S,limit:Y,...d!==void 0?{category:d}:{},...m!==void 0?{hasAttachment:m}:{},...f!==void 0?{hasStars:f}:{},...y!==void 0?{isRead:y}:{},...b?{sentDateFrom:b.epochSeconds}:{},...g?{sentDateTo:g.epochSeconds}:{}}}),enabled:r,staleTime:6e4});return{hits:T?.items??[],isLoading:r&&C}}export{re as L,ne as r,ie as s,ce as t,le as u};
@@ -1 +1 @@
1
- import{h as g,at as p,c as f,d as m,r,i as y,av as T,o as E,l as d}from"./index-DIEie7Yj.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,at as p,c as f,d as m,r,i as y,av as T,o as E,l as d}from"./index-CTrN7dU7.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,8 +38,8 @@
38
38
  } catch (_) {}
39
39
  })();
40
40
  </script>
41
- <script type="module" crossorigin src="/assets/index-DIEie7Yj.js"></script>
42
- <link rel="stylesheet" crossorigin href="/assets/index-BZsbyrwY.css">
41
+ <script type="module" crossorigin src="/assets/index-CTrN7dU7.js"></script>
42
+ <link rel="stylesheet" crossorigin href="/assets/index-BOf0CjTQ.css">
43
43
  </head>
44
44
  <body>
45
45
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client-dist",
3
- "version": "0.0.635",
3
+ "version": "0.0.636",
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-DIEie7Yj.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{aj as m,j as o,O as p}from"./index-DIEie7Yj.js";import{a}from"./MailShell-Pr322jmK.js";import{M as r}from"./MailboxPane-BXtDimzQ.js";import{a as e}from"./search-token-index-CclyV_x2.js";import{u as s}from"./search-mirror-Bt_QYWap.js";import"./FullCompose-BPnHusXz.js";import"./ErrorState-VVAbrV2n.js";import"./index-Bsm5MTTG.js";import"./useMessageBodyContent-DaCPQpX3.js";import"./useSignature-D4rel0VO.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-CkCDwwGn.js";import"./sections-n58EA842.js";import"./confirm-dialog-Cfujg7eJ.js";import"./useSearchTokenContext-MVchIFCF.js";import"./kbd-lDzxHVCS.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-CHw1FCdw.js";import"./circle-check-big-DdHuPOQ8.js";import"./refresh-cw-Ckd0XdaA.js";import"./useQueries-DfoafMCX.js";import"./MailListHeader-nOmDteIr.js";import"./roving-focus-CB0KLgKq.js";import"./popover-menu-BzPU2XRv.js";import"./mail-1A5f6iAE.js";import"./avatar-C2fjt5Oo.js";import"./EmptyState-D0-8vkl7.js";import"./undo-2-CXpll-5G.js";import"./download-BQh_pCga.js";import"./calendar-suggestion-Bey-p_uQ.js";import"./calendar-format-DLCAmYF3.js";import"./useCalendars-CLOowhmo.js";import"./calendar-report--e3n3TXF.js";import"./attendee-row-DjEgLprV.js";import"./minus-BYvW5VdR.js";import"./clock-DMOwCMnh.js";import"./calendar-clash-strip-DFE2SLBf.js";import"./bell-off-DAf1mpP9.js";import"./copy-CkTTUrrp.js";import"./shield-check-Bl7sJ69b.js";import"./useFilters-Dog2qi1C.js";import"./checkbox-rzdV9G0C.js";import"./useLayoutTier-nR-X4oh4.js";import"./menu-C21gm-LC.js";import"./MailViewChrome-BQ6rm7E7.js";import"./pane-header-B3IIk3fJ.js";import"./NavMenuButton-RbQrIxF8.js";import"./useLabels-BJtlozty.js";import"./useSemanticSearch-BVBm7ORD.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-V9w5p7mb.js";import"./circle-help-CxYf0rqb.js";import"./circle-check-BniV5uth.js";function so(){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{so as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-DIEie7Yj.js";import{F as r}from"./FlaggedPane-C10WBIzH.js";import"./useSearchTokenContext-MVchIFCF.js";import"./kbd-lDzxHVCS.js";import"./useMessageBodyContent-DaCPQpX3.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-nOmDteIr.js";import"./roving-focus-CB0KLgKq.js";import"./search-token-index-CclyV_x2.js";import"./useQueries-DfoafMCX.js";import"./popover-menu-BzPU2XRv.js";import"./mail-1A5f6iAE.js";import"./avatar-C2fjt5Oo.js";import"./index-Bsm5MTTG.js";import"./useSignature-D4rel0VO.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-CkCDwwGn.js";import"./sections-n58EA842.js";import"./EmptyState-D0-8vkl7.js";import"./ErrorState-VVAbrV2n.js";import"./undo-2-CXpll-5G.js";import"./download-BQh_pCga.js";import"./calendar-suggestion-Bey-p_uQ.js";import"./calendar-format-DLCAmYF3.js";import"./useCalendars-CLOowhmo.js";import"./calendar-report--e3n3TXF.js";import"./attendee-row-DjEgLprV.js";import"./minus-BYvW5VdR.js";import"./clock-DMOwCMnh.js";import"./calendar-clash-strip-DFE2SLBf.js";import"./bell-off-DAf1mpP9.js";import"./copy-CkTTUrrp.js";import"./shield-check-Bl7sJ69b.js";import"./useFilters-Dog2qi1C.js";import"./checkbox-rzdV9G0C.js";import"./confirm-dialog-Cfujg7eJ.js";import"./useLayoutTier-nR-X4oh4.js";import"./menu-C21gm-LC.js";import"./MailViewChrome-BQ6rm7E7.js";import"./refresh-cw-Ckd0XdaA.js";import"./wizard-selection-DxUM65kM.js";function Q(){return o.jsx(r.Reading,{})}export{Q as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-DIEie7Yj.js";import{B as o}from"./BriefPane-CcPGCsdQ.js";import"./useSearchTokenContext-MVchIFCF.js";import"./kbd-lDzxHVCS.js";import"./useMessageBodyContent-DaCPQpX3.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-nOmDteIr.js";import"./roving-focus-CB0KLgKq.js";import"./search-token-index-CclyV_x2.js";import"./useQueries-DfoafMCX.js";import"./popover-menu-BzPU2XRv.js";import"./mail-1A5f6iAE.js";import"./avatar-C2fjt5Oo.js";import"./index-Bsm5MTTG.js";import"./useSignature-D4rel0VO.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-CkCDwwGn.js";import"./sections-n58EA842.js";import"./EmptyState-D0-8vkl7.js";import"./ErrorState-VVAbrV2n.js";import"./undo-2-CXpll-5G.js";import"./download-BQh_pCga.js";import"./calendar-suggestion-Bey-p_uQ.js";import"./calendar-format-DLCAmYF3.js";import"./useCalendars-CLOowhmo.js";import"./calendar-report--e3n3TXF.js";import"./attendee-row-DjEgLprV.js";import"./minus-BYvW5VdR.js";import"./clock-DMOwCMnh.js";import"./calendar-clash-strip-DFE2SLBf.js";import"./bell-off-DAf1mpP9.js";import"./copy-CkTTUrrp.js";import"./shield-check-Bl7sJ69b.js";import"./useFilters-Dog2qi1C.js";import"./checkbox-rzdV9G0C.js";import"./confirm-dialog-Cfujg7eJ.js";import"./useLayoutTier-nR-X4oh4.js";import"./menu-C21gm-LC.js";import"./useRefreshControl-CHw1FCdw.js";import"./circle-check-big-DdHuPOQ8.js";import"./refresh-cw-Ckd0XdaA.js";import"./useSemanticSearch-BVBm7ORD.js";import"./useLabels-BJtlozty.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function V(){return r.jsx(o.Reading,{})}export{V as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-DIEie7Yj.js";import{M as r}from"./MailboxPane-BXtDimzQ.js";import"./useSearchTokenContext-MVchIFCF.js";import"./kbd-lDzxHVCS.js";import"./useMessageBodyContent-DaCPQpX3.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-CHw1FCdw.js";import"./circle-check-big-DdHuPOQ8.js";import"./refresh-cw-Ckd0XdaA.js";import"./useQueries-DfoafMCX.js";import"./MailListHeader-nOmDteIr.js";import"./roving-focus-CB0KLgKq.js";import"./search-token-index-CclyV_x2.js";import"./popover-menu-BzPU2XRv.js";import"./mail-1A5f6iAE.js";import"./avatar-C2fjt5Oo.js";import"./index-Bsm5MTTG.js";import"./useSignature-D4rel0VO.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-CkCDwwGn.js";import"./sections-n58EA842.js";import"./EmptyState-D0-8vkl7.js";import"./ErrorState-VVAbrV2n.js";import"./undo-2-CXpll-5G.js";import"./download-BQh_pCga.js";import"./calendar-suggestion-Bey-p_uQ.js";import"./calendar-format-DLCAmYF3.js";import"./useCalendars-CLOowhmo.js";import"./calendar-report--e3n3TXF.js";import"./attendee-row-DjEgLprV.js";import"./minus-BYvW5VdR.js";import"./clock-DMOwCMnh.js";import"./calendar-clash-strip-DFE2SLBf.js";import"./bell-off-DAf1mpP9.js";import"./copy-CkTTUrrp.js";import"./shield-check-Bl7sJ69b.js";import"./useFilters-Dog2qi1C.js";import"./checkbox-rzdV9G0C.js";import"./confirm-dialog-Cfujg7eJ.js";import"./useLayoutTier-nR-X4oh4.js";import"./menu-C21gm-LC.js";import"./MailViewChrome-BQ6rm7E7.js";import"./pane-header-B3IIk3fJ.js";import"./NavMenuButton-RbQrIxF8.js";import"./useLabels-BJtlozty.js";import"./useSemanticSearch-BVBm7ORD.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-V9w5p7mb.js";import"./circle-help-CxYf0rqb.js";import"./circle-check-BniV5uth.js";function _(){return o.jsx(r.Reading,{})}export{_ as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-DIEie7Yj.js";import{O as t}from"./OutboxPane-CTseFzTa.js";import"./roving-focus-CB0KLgKq.js";import"./useSearchTokenContext-MVchIFCF.js";import"./kbd-lDzxHVCS.js";import"./useMessageBodyContent-DaCPQpX3.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-DdHuPOQ8.js";import"./clock-DMOwCMnh.js";import"./row-actions-Dig-tNEz.js";import"./rotate-ccw-BeK7IKWo.js";import"./pane-header-B3IIk3fJ.js";import"./NavMenuButton-RbQrIxF8.js";import"./menu-C21gm-LC.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function R(){return o.jsx(t.Reading,{})}export{R as component};
@@ -1 +0,0 @@
1
- import{eX as o,j as m}from"./index-DIEie7Yj.js";import{O as p}from"./OpenCalendarEvent-BHw5I86C.js";import"./CalendarComposePane-CS0JzQe5.js";import"./calendar-format-DLCAmYF3.js";import"./useQueries-DfoafMCX.js";import"./useCalendars-CLOowhmo.js";import"./calendar-clash-strip-DFE2SLBf.js";import"./attendee-row-DjEgLprV.js";import"./avatar-C2fjt5Oo.js";import"./minus-BYvW5VdR.js";import"./clock-DMOwCMnh.js";import"./calendar-report--e3n3TXF.js";import"./mail-1A5f6iAE.js";import"./pencil-D2ugaHF8.js";import"./useCalendarWrites-LDB7-Ss2.js";import"./ErrorState-VVAbrV2n.js";import"./useCalendarData-CBlxoUbW.js";import"./calendar-subscription-B-aAc2Gy.js";function v(){const{calendarObjectId:r,recurrenceId:t}=o.useParams();return m.jsx(p,{calendarObjectId:r,recurrenceId:t})}export{v as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-DIEie7Yj.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-DIEie7Yj.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-DIEie7Yj.js";const n=o;export{n as component};