@remit/web-client-dist 0.0.656 → 0.0.658

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 (189) hide show
  1. package/assets/BriefPane-DTnPypWR.js +1 -0
  2. package/assets/CalendarComposePane-B5vgWbn2.js +1 -0
  3. package/assets/{CalendarComposeSeed-B6HxfV-P.js → CalendarComposeSeed-CvfYDo6K.js} +1 -1
  4. package/assets/{CalendarShell-D-5dI0jc.js → CalendarShell-CNCnuYI7.js} +1 -1
  5. package/assets/{EmptyState-Dw5-fMm4.js → EmptyState-DCvsovpV.js} +1 -1
  6. package/assets/{ErrorState-PNI7QSLU.js → ErrorState-BVvZa9Hj.js} +1 -1
  7. package/assets/{FlaggedPane-D0pQWXT9.js → FlaggedPane-CmOkn_je.js} +1 -1
  8. package/assets/{FullCompose-BACzjpTB.js → FullCompose-C-kYe1x_.js} +1 -1
  9. package/assets/MailListHeader-qqqmfyRg.js +1 -0
  10. package/assets/MailNav-UWoxDID1.js +1 -0
  11. package/assets/MailShell-D1RYjXBs.js +1 -0
  12. package/assets/{MailViewChrome-CP2oa-r7.js → MailViewChrome-CyrIkwO-.js} +1 -1
  13. package/assets/MailboxPane-sVCHNXDC.js +1 -0
  14. package/assets/{NavMenuButton-D17iXFBM.js → NavMenuButton-tjQzgXI6.js} +1 -1
  15. package/assets/{OnboardingWizard-BOAnucJW.js → OnboardingWizard-DC3VOl45.js} +1 -1
  16. package/assets/OpenCalendarEvent-DIV9Zaoz.js +2 -0
  17. package/assets/OutboxPane-DYMpq8YL.js +1 -0
  18. package/assets/SignInAgain-BroDYbz-.js +1 -0
  19. package/assets/_calendarObjectId-vj5yYITL.js +1 -0
  20. package/assets/_mailboxId-Cd2gcjfj.js +1 -0
  21. package/assets/_messageId-CKLpxaGL.js +1 -0
  22. package/assets/_messageId-otRrahEY.js +1 -0
  23. package/assets/_messageId-r661xgv7.js +1 -0
  24. package/assets/_outboxMessageId-DDWh3QXk.js +1 -0
  25. package/assets/_recurrenceId-Dmg0Y1yT.js +1 -0
  26. package/assets/_threadId-CatNqDrS.js +1 -0
  27. package/assets/_threadId-CtFGotoc.js +1 -0
  28. package/assets/_threadId-bIsty-QI.js +1 -0
  29. package/assets/_view._date-DWJzo3Lb.js +1 -0
  30. package/assets/accounts-BnWAstqJ.js +1 -0
  31. package/assets/advanced-CO3uos8-.js +1 -0
  32. package/assets/{appearance-CIBowvkx.js → appearance-l54q8jn2.js} +1 -1
  33. package/assets/{attendee-row-BRiEaasS.js → attendee-row-D2LMbq_7.js} +1 -1
  34. package/assets/{avatar-CCaAcetc.js → avatar-BEy9bmfT.js} +1 -1
  35. package/assets/{bell-off-CpcOtCIq.js → bell-off-o-5HqpFD.js} +1 -1
  36. package/assets/{bottom-sheet-BPiS9aBo.js → bottom-sheet-BQrIuUAp.js} +1 -1
  37. package/assets/{brief-C2k_YLnA.js → brief-BRyi3cpm.js} +1 -1
  38. package/assets/brief-CubStJH7.js +1 -0
  39. package/assets/{bug-C6xR86kp.js → bug-CiMAHRp3.js} +1 -1
  40. package/assets/calendar-CUTV9vSe.js +1 -0
  41. package/assets/{calendar-clash-strip-7S3XyUIT.js → calendar-clash-strip-BbznG7yo.js} +1 -1
  42. package/assets/{calendar-format-CDiJYM60.js → calendar-format-BZ1D5Ywu.js} +1 -1
  43. package/assets/{calendar-report-C-w9d_X_.js → calendar-report-1ttmpioo.js} +1 -1
  44. package/assets/{calendar-suggestion-BQoWPMtl.js → calendar-suggestion-DJ5uMZX8.js} +1 -1
  45. package/assets/{calendars-DHYpHK8C.js → calendars-Db5I-yCU.js} +1 -1
  46. package/assets/{card-Bqz6khhJ.js → card-BKgdv2bH.js} +1 -1
  47. package/assets/{checkbox-BwzvnbNT.js → checkbox-p9mLPjVs.js} +1 -1
  48. package/assets/chevron-left-iD9K0p2O.js +1 -0
  49. package/assets/{circle-check-DE9CwgTP.js → circle-check-6Bb3NNZS.js} +1 -1
  50. package/assets/{circle-check-big-kuolCFUC.js → circle-check-big-Cc1ertAI.js} +1 -1
  51. package/assets/{circle-help--jGrrMan.js → circle-help-C0X0r4BQ.js} +1 -1
  52. package/assets/{clock-CwmO_JCY.js → clock-BDHe3TX8.js} +1 -1
  53. package/assets/compose._-_outboxMessageId_-BAjHEoO7.js +1 -0
  54. package/assets/compose._-_outboxMessageId_-BjU_oGCR.js +1 -0
  55. package/assets/compose._-_outboxMessageId_-C-wPU4AM.js +1 -0
  56. package/assets/compose._-_outboxMessageId_-OEkiz68p.js +1 -0
  57. package/assets/{config-import-jGvPqLLa.js → config-import-DH8GC5mw.js} +1 -1
  58. package/assets/{confirm-dialog-WrJoQuYb.js → confirm-dialog-BmiOsB9N.js} +1 -1
  59. package/assets/{copy-BVqTKL-m.js → copy-B89b-33D.js} +1 -1
  60. package/assets/{credential-steps-BPNJm3Px.js → credential-steps-CKcZdVNd.js} +1 -1
  61. package/assets/{download-BoHBLdA7.js → download-53lT8mTP.js} +1 -1
  62. package/assets/external-link-NCezTZkT.js +1 -0
  63. package/assets/{file-json-CTXp7rcG.js → file-json-ofsJkIbX.js} +1 -1
  64. package/assets/filters-aur8iSET.js +1 -0
  65. package/assets/flagged-Cr5tlDf5.js +1 -0
  66. package/assets/{flagged-Cg2xxD0P.js → flagged-gRZxDkLX.js} +1 -1
  67. package/assets/folders-17G_KhLm.js +1 -0
  68. package/assets/{help-copy-BReMOm6I.js → help-copy-CADUhLzQ.js} +1 -1
  69. package/assets/{import-x6uYtBKs.js → import-CdvuJtNy.js} +1 -1
  70. package/assets/index-69yokqv5.js +1 -0
  71. package/assets/index-BDIVfNXM.js +293 -0
  72. package/assets/index-BFBfS7ek.js +1 -0
  73. package/assets/index-BRntGNJA.js +1 -0
  74. package/assets/{index-Cw3Kql7t.js → index-BngpvrPX.js} +1 -1
  75. package/assets/{index-BtYEmjxr.css → index-C2Hz4y-Q.css} +1 -1
  76. package/assets/index-Cg4p98vB.js +1 -0
  77. package/assets/{index-CyocVpgw.js → index-DDSpdJ8F.js} +8 -8
  78. package/assets/index-RmCPyEb8.js +1 -0
  79. package/assets/index-bYkeiMeC.js +1 -0
  80. package/assets/index-otRrahEY.js +1 -0
  81. package/assets/index-r661xgv7.js +1 -0
  82. package/assets/index-tN5HaTuq.js +1 -0
  83. package/assets/{kbd-Ccl_4UMN.js → kbd-BTTdW6-z.js} +1 -1
  84. package/assets/{labels-BbpPALNZ.js → labels-DoKExISZ.js} +1 -1
  85. package/assets/mail--BAAD5Tl.js +1 -0
  86. package/assets/{mail-BD9CFExB.js → mail-bV9GGVUQ.js} +1 -1
  87. package/assets/{map-pin-DM-UwFHl.js → map-pin-Bme-miZ2.js} +1 -1
  88. package/assets/{menu-Bk7fxS2w.js → menu-DQ-pJ4eT.js} +1 -1
  89. package/assets/minus-kSr1dVnA.js +1 -0
  90. package/assets/{new-mpTt3w7l.js → new-B4HXKzav.js} +1 -1
  91. package/assets/onboarding-Bsm3JVIj.js +1 -0
  92. package/assets/{onboarding-completion-Ckx99cv9.js → onboarding-completion-5Y5D9Jbr.js} +1 -1
  93. package/assets/outbox-BfHInRjp.js +1 -0
  94. package/assets/{pencil-C8Yuq6zp.js → pencil-D3GOCGCB.js} +1 -1
  95. package/assets/{popover-menu-CG5nGI0G.js → popover-menu-BRPef6re.js} +1 -1
  96. package/assets/{refresh-cw-DV6lCoUu.js → refresh-cw-BQa9I63p.js} +1 -1
  97. package/assets/result-count-C11MdZzg.js +1 -0
  98. package/assets/{rich-text-BFDSPN3k.js → rich-text-BxJPXURQ.js} +1 -1
  99. package/assets/{rich-text-spellcheck-worker-provider-eksJruIx.js → rich-text-spellcheck-worker-provider-BL2Dc5f1.js} +1 -1
  100. package/assets/{rotate-ccw-BWReSl7L.js → rotate-ccw-BzM31Pwc.js} +1 -1
  101. package/assets/{roving-focus-BgNxAjAj.js → roving-focus-DyhhSwbQ.js} +1 -1
  102. package/assets/{row-actions-BwuDucsx.js → row-actions-BtiK9OA9.js} +1 -1
  103. package/assets/{search-mirror-DSVQGDLi.js → search-mirror-CJ0qbKsO.js} +1 -1
  104. package/assets/search-query-hRPzdZsl.js +1 -0
  105. package/assets/search-scope-UI1H6AzA.js +1 -0
  106. package/assets/{search-token-index-BXtgewDi.js → search-token-index-C1Z6zA5N.js} +1 -1
  107. package/assets/{sections-45KeddjZ.js → sections-FEvJ4c2c.js} +1 -1
  108. package/assets/senders-DtHgpQ3C.js +1 -0
  109. package/assets/settings-DO0FWB3_.js +1 -0
  110. package/assets/{settings-screen-Bm-R0ESO.js → settings-screen-B51b9lvj.js} +1 -1
  111. package/assets/{shield-check-B_rWkRQY.js → shield-check-CgX3iFVl.js} +1 -1
  112. package/assets/suggested-vips-CZ7lFymc.js +1 -0
  113. package/assets/{suggestion._suggestionId-DHVADd-e.js → suggestion._suggestionId-YuPshPzz.js} +1 -1
  114. package/assets/{undo-2-UQEFkwhb.js → undo-2-DkaYLmdO.js} +1 -1
  115. package/assets/{useCalendarData-D27Ge-qS.js → useCalendarData-BQoK5111.js} +1 -1
  116. package/assets/useCalendarFreeBusy-d-s_-0eR.js +1 -0
  117. package/assets/{useCalendarWrites-OAZeHI6o.js → useCalendarWrites-xN5WbPCM.js} +1 -1
  118. package/assets/{useCalendars-O5ZvqPWu.js → useCalendars-CqOpDn21.js} +1 -1
  119. package/assets/{useDebouncedValue-BSAyBygv.js → useDebouncedValue-CTq8lKtR.js} +1 -1
  120. package/assets/useFilters-Oiv4LZCZ.js +1 -0
  121. package/assets/{useLabels-qT2MGxVA.js → useLabels-DLtLZsv9.js} +1 -1
  122. package/assets/useLayoutTier-94OSKAiu.js +1 -0
  123. package/assets/useMessageBodyContent-BTmHg9m0.js +1 -0
  124. package/assets/{useQueries-DH9StZ-W.js → useQueries-DFq_6laq.js} +1 -1
  125. package/assets/useRefreshControl-DzEBgWRZ.js +1 -0
  126. package/assets/{useResultFolderIndex-DYd3UAzD.js → useResultFolderIndex-DqH89sZ0.js} +1 -1
  127. package/assets/{useSearchTokenContext-CnVweHh1.js → useSearchTokenContext-BYEkwdSc.js} +3 -3
  128. package/assets/{useSignature-B8GSTQOi.js → useSignature-V-VSVmYl.js} +1 -1
  129. package/assets/warnings-rdkIsd04.js +5 -0
  130. package/index.html +2 -2
  131. package/package.json +1 -1
  132. package/assets/BriefPane-l0C6HwIU.js +0 -1
  133. package/assets/CalendarComposePane-C61ZEczL.js +0 -1
  134. package/assets/MailListHeader-Dp-YNlPj.js +0 -1
  135. package/assets/MailNav-C7sJoax-.js +0 -1
  136. package/assets/MailShell-DzKQC7Uj.js +0 -1
  137. package/assets/MailboxPane-DkOrdudP.js +0 -1
  138. package/assets/OpenCalendarEvent-CYS0fC96.js +0 -2
  139. package/assets/OutboxPane-DNsIelwN.js +0 -1
  140. package/assets/_calendarObjectId-BkE4AxkO.js +0 -1
  141. package/assets/_mailboxId-BrtMTF-6.js +0 -1
  142. package/assets/_messageId-96unnwX9.js +0 -1
  143. package/assets/_messageId-BsV3aJW4.js +0 -1
  144. package/assets/_messageId-Rm-pv9Lj.js +0 -1
  145. package/assets/_outboxMessageId-DZ9oEoGq.js +0 -1
  146. package/assets/_recurrenceId-lKshLGFv.js +0 -1
  147. package/assets/_threadId-Cn4_VbTC.js +0 -1
  148. package/assets/_threadId-CtlfYdJq.js +0 -1
  149. package/assets/_threadId-DQSQ3t5D.js +0 -1
  150. package/assets/_view._date-CxLoYpLy.js +0 -1
  151. package/assets/accounts-BOzP33IK.js +0 -1
  152. package/assets/advanced-DH74AtyY.js +0 -4
  153. package/assets/brief-CCQtHA98.js +0 -1
  154. package/assets/browser-ponyfill-DJ9g5dlz.js +0 -2
  155. package/assets/calendar-CGSjs-MW.js +0 -1
  156. package/assets/chevron-left-DV5pp97l.js +0 -1
  157. package/assets/compose._-_outboxMessageId_-80p_LIdF.js +0 -1
  158. package/assets/compose._-_outboxMessageId_-CGCC4WR7.js +0 -1
  159. package/assets/compose._-_outboxMessageId_-DAF6UnCQ.js +0 -1
  160. package/assets/compose._-_outboxMessageId_-PPnxrxD_.js +0 -1
  161. package/assets/filters-C2ETBIda.js +0 -1
  162. package/assets/flagged-CXk9IuTv.js +0 -1
  163. package/assets/folders-CZZ0A6LY.js +0 -1
  164. package/assets/index-8Jk9sv8H.js +0 -1
  165. package/assets/index-96unnwX9.js +0 -1
  166. package/assets/index-BsV3aJW4.js +0 -1
  167. package/assets/index-C3Ii4qBr.js +0 -1
  168. package/assets/index-CPfQZ4De.js +0 -1
  169. package/assets/index-CnGqfQe0.js +0 -1
  170. package/assets/index-Dtovse-L.js +0 -294
  171. package/assets/index-Fjp1XhHg.js +0 -1
  172. package/assets/index-VbZ_wTmr.js +0 -1
  173. package/assets/index-vGdOUxLx.js +0 -1
  174. package/assets/mail-kBNM6qac.js +0 -1
  175. package/assets/minus-BUHU6kmL.js +0 -1
  176. package/assets/onboarding-DanUIq9r.js +0 -1
  177. package/assets/outbox-DuDPZsm-.js +0 -1
  178. package/assets/pane-header-BTNHnxOW.js +0 -1
  179. package/assets/search-query-Cr_ZXBCp.js +0 -1
  180. package/assets/search-scope-B5-OK3Cq.js +0 -1
  181. package/assets/senders-C2MCK2u2.js +0 -1
  182. package/assets/settings-_XfaP7nx.js +0 -1
  183. package/assets/suggested-vips-DZJBdJAU.js +0 -1
  184. package/assets/useCalendarFreeBusy-BgHa55K-.js +0 -1
  185. package/assets/useFilters-R3V1TB7X.js +0 -1
  186. package/assets/useLayoutTier-BT9E1-ej.js +0 -1
  187. package/assets/useMessageBodyContent-DIF3dieb.js +0 -1
  188. package/assets/useRefreshControl-DfkVEG2l.js +0 -1
  189. package/assets/useSemanticSearch-BQ_df8hM.js +0 -1
@@ -1 +0,0 @@
1
- import{j as r}from"./index-Dtovse-L.js";import{B as o}from"./BriefPane-l0C6HwIU.js";import"./useSearchTokenContext-CnVweHh1.js";import"./kbd-Ccl_4UMN.js";import"./useMessageBodyContent-DIF3dieb.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dp-YNlPj.js";import"./roving-focus-BgNxAjAj.js";import"./search-token-index-BXtgewDi.js";import"./useQueries-DH9StZ-W.js";import"./popover-menu-CG5nGI0G.js";import"./mail-BD9CFExB.js";import"./avatar-CCaAcetc.js";import"./index-CyocVpgw.js";import"./useSignature-B8GSTQOi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BSAyBygv.js";import"./sections-45KeddjZ.js";import"./EmptyState-Dw5-fMm4.js";import"./ErrorState-PNI7QSLU.js";import"./undo-2-UQEFkwhb.js";import"./download-BoHBLdA7.js";import"./useCalendarFreeBusy-BgHa55K-.js";import"./calendar-format-CDiJYM60.js";import"./useCalendars-O5ZvqPWu.js";import"./map-pin-DM-UwFHl.js";import"./calendar-suggestion-BQoWPMtl.js";import"./attendee-row-BRiEaasS.js";import"./minus-BUHU6kmL.js";import"./clock-CwmO_JCY.js";import"./calendar-clash-strip-7S3XyUIT.js";import"./bell-off-CpcOtCIq.js";import"./shield-check-B_rWkRQY.js";import"./calendar-report-C-w9d_X_.js";import"./useFilters-R3V1TB7X.js";import"./checkbox-BwzvnbNT.js";import"./confirm-dialog-WrJoQuYb.js";import"./useLayoutTier-BT9E1-ej.js";import"./menu-Bk7fxS2w.js";import"./useRefreshControl-DfkVEG2l.js";import"./circle-check-big-kuolCFUC.js";import"./refresh-cw-DV6lCoUu.js";import"./useSemanticSearch-BQ_df8hM.js";import"./useLabels-qT2MGxVA.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-zWa1qc6-.js";function W(){return r.jsx(o.Reading,{})}export{W as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-Dtovse-L.js";import{F as r}from"./FlaggedPane-D0pQWXT9.js";import"./useSearchTokenContext-CnVweHh1.js";import"./kbd-Ccl_4UMN.js";import"./useMessageBodyContent-DIF3dieb.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-Dp-YNlPj.js";import"./roving-focus-BgNxAjAj.js";import"./search-token-index-BXtgewDi.js";import"./useQueries-DH9StZ-W.js";import"./popover-menu-CG5nGI0G.js";import"./mail-BD9CFExB.js";import"./avatar-CCaAcetc.js";import"./index-CyocVpgw.js";import"./useSignature-B8GSTQOi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BSAyBygv.js";import"./sections-45KeddjZ.js";import"./EmptyState-Dw5-fMm4.js";import"./ErrorState-PNI7QSLU.js";import"./undo-2-UQEFkwhb.js";import"./download-BoHBLdA7.js";import"./useCalendarFreeBusy-BgHa55K-.js";import"./calendar-format-CDiJYM60.js";import"./useCalendars-O5ZvqPWu.js";import"./map-pin-DM-UwFHl.js";import"./calendar-suggestion-BQoWPMtl.js";import"./attendee-row-BRiEaasS.js";import"./minus-BUHU6kmL.js";import"./clock-CwmO_JCY.js";import"./calendar-clash-strip-7S3XyUIT.js";import"./bell-off-CpcOtCIq.js";import"./shield-check-B_rWkRQY.js";import"./calendar-report-C-w9d_X_.js";import"./useFilters-R3V1TB7X.js";import"./checkbox-BwzvnbNT.js";import"./confirm-dialog-WrJoQuYb.js";import"./useLayoutTier-BT9E1-ej.js";import"./menu-Bk7fxS2w.js";import"./MailViewChrome-CP2oa-r7.js";import"./refresh-cw-DV6lCoUu.js";import"./wizard-selection-zWa1qc6-.js";function Q(){return o.jsx(r.Reading,{})}export{Q as component};
@@ -1 +0,0 @@
1
- import{f8 as o,j as r}from"./index-Dtovse-L.js";import{O as m}from"./OpenCalendarEvent-CYS0fC96.js";import"./CalendarComposePane-C61ZEczL.js";import"./calendar-format-CDiJYM60.js";import"./useQueries-DH9StZ-W.js";import"./useCalendars-O5ZvqPWu.js";import"./calendar-clash-strip-7S3XyUIT.js";import"./attendee-row-BRiEaasS.js";import"./avatar-CCaAcetc.js";import"./minus-BUHU6kmL.js";import"./clock-CwmO_JCY.js";import"./map-pin-DM-UwFHl.js";import"./mail-BD9CFExB.js";import"./pencil-C8Yuq6zp.js";import"./useCalendarWrites-OAZeHI6o.js";import"./ErrorState-PNI7QSLU.js";import"./useCalendarData-D27Ge-qS.js";import"./calendar-report-C-w9d_X_.js";import"./calendar-subscription-B-aAc2Gy.js";function I(){const{calendarObjectId:t}=o.useParams();return r.jsx(m,{calendarObjectId:t})}export{I as component};
@@ -1 +0,0 @@
1
- import{e as ee,r as u,j as t,t as D,v as te,f as N,w as se,x as M,y as O,z as ne,A as oe,C as ae,h as Q,D as re,E as ie,F as ce,G as le,H as ue,J as de,X as me,K as pe,a as he,b as fe,M as xe,N as ge,P as be,Q as ve,R as ye,S as Se,T as je,u as Ce,c as Ne,d as Ie,U as we,O as Me,V as Pe}from"./index-Dtovse-L.js";import{S as Re,u as Ee,s as Oe,K as Te,b as ke,a as Le,c as Ae,d as Fe}from"./search-token-index-BXtgewDi.js";import{P as De}from"./pencil-C8Yuq6zp.js";import{u as R,a as Qe}from"./useMessageBodyContent-DIF3dieb.js";import{c as Ke,s as _e,M as ze}from"./MailShell-DzKQC7Uj.js";import{u as Be,a as He,R as Ve,s as qe,i as $e,H as Ge,M as Ue}from"./useRefreshControl-DfkVEG2l.js";import{M as We}from"./menu-Bk7fxS2w.js";import{B as Ye}from"./bug-C6xR86kp.js";import{L as Je,S as Xe,A as Ze,M as et}from"./MailNav-C7sJoax-.js";import{A as tt}from"./avatar-CCaAcetc.js";import{u as st,P as nt,a as ot,b as at}from"./popover-menu-CG5nGI0G.js";import{u as rt}from"./sections-45KeddjZ.js";import{E as it}from"./ErrorState-PNI7QSLU.js";import{K as T}from"./kbd-Ccl_4UMN.js";import{u as ct}from"./index-CyocVpgw.js";import{u as K,i as lt}from"./useLayoutTier-BT9E1-ej.js";import{u as ut}from"./useQueries-DH9StZ-W.js";import{u as dt}from"./useResultFolderIndex-DYd3UAzD.js";import{u as mt}from"./useDebouncedValue-BSAyBygv.js";import"./search-scope-B5-OK3Cq.js";import"./FullCompose-BACzjpTB.js";import"./confirm-dialog-WrJoQuYb.js";import"./circle-check-big-kuolCFUC.js";import"./refresh-cw-DV6lCoUu.js";import"./roving-focus-BgNxAjAj.js";import"./bell-off-CpcOtCIq.js";import"./folder-failure-CqkVSsrb.js";import"./outbox-status-BlKn6P0x.js";import"./useSignature-B8GSTQOi.js";import"./account-form-helpers-DhckT_PN.js";const pt=ee("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);function ht({email:e,onSignOut:s}){const n=u.useRef(null),{open:a,setOpen:o,containerRef:r,panelRef:i,getAnchor:d}=st("account-menu",()=>n.current?.focus());u.useEffect(()=>{if(!a)return;const c=requestAnimationFrame(()=>i.current?.querySelector('[role="menuitem"]')?.focus());return()=>cancelAnimationFrame(c)},[a,i]);const m=e??"Account";return t.jsxs("div",{ref:r,className:"relative",children:[t.jsx("button",{ref:n,type:"button","aria-label":"Account","aria-haspopup":"menu","aria-expanded":a,onClick:()=>o(c=>!c),className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-md p-1.5 text-fg-muted transition-colors hover:bg-surface-raised hover:text-fg",children:t.jsx(tt,{name:m,email:e??void 0,size:"sm"})}),t.jsx(nt,{open:a,align:"end",panelRef:i,getAnchor:d,children:t.jsxs(ot,{ref:i,label:m,children:[e&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"truncate px-4 py-2 text-xs text-fg-muted",title:e,"data-testid":"account-menu-email",children:e}),t.jsx("hr",{className:"my-1 h-px border-0 bg-line"})]}),t.jsx(at,{label:"Sign out",icon:t.jsx(Je,{className:"size-4"}),onSelect:()=>{o(!1),n.current?.focus(),s()}})]})})]})}function ft({leading:e,search:s,actions:n,className:a}){return t.jsxs("header",{className:D("flex min-h-pane-header w-full shrink-0 items-center gap-2 border-b border-line bg-canvas px-row-inset py-1",a),children:[e&&t.jsx("div",{className:"flex shrink-0 items-center gap-1",children:e}),t.jsx("div",{className:"flex min-w-0 flex-1 justify-start",children:t.jsx("div",{className:"w-full max-w-xs transition-[max-width] duration-150 ease-out focus-within:max-w-lg",children:s})}),n&&t.jsx("div",{className:"flex shrink-0 items-center gap-1",children:n})]})}function xt({onCompose:e}){return t.jsx("button",{type:"button",onClick:e,"aria-label":"Compose new message",className:"lg:hidden fixed right-4 z-30 h-14 w-14 rounded-full bg-accent text-accent-fg shadow-lg flex items-center justify-center hover:opacity-90 active:scale-95 transition-all",style:{bottom:"calc(env(safe-area-inset-bottom, 0) + 1rem)"},children:t.jsx(De,{className:"size-6"})})}function gt(){const e=te();if(!e)return null;const s=e.showNavPane?!e.navCollapsed:!1;return t.jsx(N,{variant:"ghost",size:"sm",icon:t.jsx(We,{className:"size-4"}),onClick:e.toggleNav,"aria-label":s?"Hide folders":"Show folders","aria-expanded":s,title:"Folders",className:"shrink-0"})}const bt={global:"Search all mail",pending:"Search mail",scoped:"Search this folder"};function vt({search:e,onCompose:s,onReportBug:n,onOpenSettings:a,composeShortcut:o,refreshControl:r,account:i}){return t.jsx(ft,{leading:t.jsx(gt,{}),search:t.jsx(Re,{value:e.value,onChange:e.onChange,onClear:e.onClear,onClearQuery:e.onClearQuery,chips:e.chips,onRemoveChip:e.onRemoveChip,placeholder:bt[e.scope]}),actions:t.jsxs(t.Fragment,{children:[t.jsx(N,{variant:"ghost",size:"sm",icon:t.jsx(pt,{className:"size-4"}),title:o?`Compose (${o})`:"Compose","aria-label":"Compose",onClick:s}),t.jsx(N,{variant:"ghost",size:"sm",icon:t.jsx(Ye,{className:"size-4"}),title:"Report a bug","aria-label":"Report a bug",onClick:n}),t.jsx(N,{variant:"ghost",size:"sm",icon:t.jsx(Xe,{className:"size-4"}),title:"Settings","aria-label":"Settings",onClick:a}),r,i]})})}function yt(){const e=se(),s=M({select:c=>O(c.location.pathname)}),n=M({select:c=>ne(c.location.search)}),[a,o]=u.useState(n),r=mt(a,200),[i,d]=u.useState(s);if(i!==s){const c=_e(i,s,n);d(s),c!==void 0&&o(c)}const m=u.useCallback(c=>{d(O(e.state.location.pathname)),o(c)},[e]);return{searchInput:a,committedQuery:Ke(a,r),viewKey:s,setSearchInput:m}}const St=()=>{const e=R();return oe()?null:t.jsx(xt,{onCompose:e})},jt=()=>t.jsx(Ze,{children:({email:e,signOut:s})=>t.jsx(ht,{email:e,onSignOut:s})});function Ct({accounts:e}){const{searchInput:s,onSearchChange:n,onSearchClear:a,onSearchClearQuery:o,resultFolderIndex:r}=ae(),i=Q(),d=rt(),m=R(),{scope:c,clearScope:x}=Ee(e),f=c.kind==="scoped"?[{id:c.chip.id,label:c.chip.label,tone:"scope"}]:void 0,p=u.useMemo(()=>e.map(b=>b.accountId),[e]),{hasNewMail:l}=Be(),{state:h,errorMessage:y,refresh:g}=He(p,{onSettled:()=>ie(i,ce(r.keys()))});return t.jsx(vt,{search:{value:s,scope:c.kind,chips:f,onChange:n,onClear:a,onClearQuery:o,onRemoveChip:x},onCompose:m,onReportBug:re,onOpenSettings:()=>d("accounts"),composeShortcut:Oe("compose"),refreshControl:t.jsx(Ve,{state:h,onRefresh:g,label:"Refresh all accounts",errorMessage:y,hasUpdate:l(p)}),account:t.jsx(jt,{})})}const Nt=({isOpen:e,onClose:s})=>{const n=u.useRef(null);return le({id:"shortcuts",open:e,answers:{back:s}}),ue(n,e),e?t.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[t.jsx(de,{label:"Dismiss keyboard shortcuts",onDismiss:s,className:"backdrop-blur-sm"}),t.jsxs("div",{ref:n,role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",tabIndex:-1,className:D("relative z-10 max-h-[85vh] w-full max-w-2xl overflow-y-auto","rounded-lg border border-line bg-surface shadow-lg","p-6"),children:[t.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard shortcuts"}),t.jsx("button",{type:"button",onClick:s,className:"p-1 text-fg-muted transition-colors hover:text-fg","aria-label":"Close",children:t.jsx(me,{className:"size-5"})})]}),t.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2",children:Te.map(a=>t.jsxs("div",{children:[t.jsx("h3",{className:"mb-3 text-sm font-medium text-fg-muted",children:a.title}),t.jsx("div",{className:"space-y-2",children:a.hints.map(o=>t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx("span",{className:"text-sm",children:o.description}),t.jsx("span",{className:"flex shrink-0 items-center gap-1",children:o.keys.map((r,i)=>t.jsxs(u.Fragment,{children:[i>0&&o.keys[0]==="g"&&t.jsx("span",{className:"text-2xs text-fg-subtle",children:"then"}),t.jsx(T,{children:r})]},r))})]},`${o.action}-${o.keys.join("+")}`))})]},a.title))}),t.jsx("div",{className:"mt-6 border-t border-line pt-4",children:t.jsxs("p",{className:"text-center text-xs text-fg-muted",children:["Press ",t.jsx(T,{children:"Esc"})," to close"]})})]})]}):null};function It(e){const s=ut({queries:e.map(n=>({...pe({path:{accountId:n.accountId}}),staleTime:1/0}))});return u.useMemo(()=>ke(s.map(n=>n.data?.items??[])),[s])}const _="remit:intelligence-open";function wt(){try{return localStorage.getItem(_)!=="closed"}catch{return!0}}function Mt(e){try{localStorage.setItem(_,e?"open":"closed")}catch{}}function k({panels:e,prefersOpen:s,isDesktop:n,hasThread:a,raisedFor:o,openMessage:r}){return o!==null&&o===r?!0:e.length>0?e.includes("intelligence"):n&&a&&s}const Pt=()=>{const e=K(),s=he(),n=fe(),a=s.find(xe),o=Le(),[r,i]=u.useState(wt),d=o?`${o.threadId}/${o.messageId??""}`:null,[m,c]=u.useState(null),x={panels:s,prefersOpen:r,isDesktop:e==="desktop",hasThread:o!==void 0,openMessage:d},f=k({...x,raisedFor:m}),p=k({...x,raisedFor:null}),l=u.useCallback((b,S)=>{n([...b?["intelligence"]:[],...S?[S]:[]])},[n]),h=u.useCallback(b=>{l(p,b)},[p,l]),y=u.useCallback(()=>{if(f&&!p){c(null);return}const b=!f;Mt(b),i(b),c(null),l(b,a)},[p,f,a,l]),g=u.useCallback(()=>{c(d)},[d]);return{openOverlay:a,intelligenceOpen:f,showOverlay:h,toggleIntelligence:y,raiseIntelligence:g}};var j={exports:{}},L;function Rt(){if(L)return j.exports;L=1;const e=(s,n,a)=>new Promise((o,r)=>{if(a=Object.assign({concurrency:1/0},a),typeof n!="function")throw new TypeError("Mapper function is required");const{concurrency:i}=a;if(!(typeof i=="number"&&i>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${i}\` (${typeof i})`);const d=[],m=s[Symbol.iterator]();let c=!1,x=!1,f=0,p=0;const l=()=>{if(c)return;const h=m.next(),y=p;if(p++,h.done){x=!0,f===0&&o(d);return}f++,Promise.resolve(h.value).then(g=>n(g,y)).then(g=>{d[y]=g,f--,l()},g=>{c=!0,r(g)})};for(let h=0;h<i&&(l(),!x);h++);});return j.exports=e,j.exports.default=e,j.exports}var Et=Rt();const Ot=ge(Et),Tt=900*1e3,kt=30,Lt=(e,s)=>{if(!e)return s;const n=Number.parseInt(e,10);return Number.isFinite(n)&&n>0?n:s},At=30*1e3,Ft=e=>Math.max(Lt(e,kt)*1e3,At),z=Ft(je().mailboxPollIntervalSeconds),C=(e=Date.now(),s=z)=>$e(e)?Math.min(Ge,s):s,Dt=5,P=new Set,Qt=(e,s,n=Tt)=>e.filter(a=>{const o=a.lastSyncAt;return o==null?!0:s-o>n}).map(a=>a.accountId),Kt=(e,s,n=z)=>e-s>=n,_t=(e,s)=>e.filter(n=>!s.has(n)),A=(e,s)=>{if(P.delete(e),ye(s,{softError:!0},"nobody")){Se(s);return}console.warn("[remit] background mailbox sync failed",{accountId:e,error:s})},F=(e,s)=>be({path:{accountId:e},throwOnError:!0}).then(()=>{s.invalidateQueries({queryKey:ve({path:{accountId:e}})})}),zt=e=>{const s=Q(),n=u.useRef(e);n.current=e;const a=e.map(o=>o.accountId).join(",");u.useEffect(()=>{const o=Date.now(),i=Qt(n.current,o).filter(d=>!P.has(d));if(i.length!==0)for(const d of i)P.add(d),F(d,s).catch(m=>{A(d,m)})},[a,s]),u.useEffect(()=>{let o=Date.now(),r;const i=new Set,d=()=>{o=Date.now();const p=_t(n.current.map(l=>l.accountId),i);for(const l of p)i.add(l);Ot(p,l=>F(l,s).catch(h=>{A(l,h)}).finally(()=>{i.delete(l)}),{concurrency:Dt})},m=()=>{if(document.visibilityState==="visible"){d(),r=setTimeout(m,C());return}},c=()=>{if(document.visibilityState!=="visible")return;r!==void 0&&clearTimeout(r);const p=Date.now(),l=C(p);if(Kt(p,o,l)){d(),r=setTimeout(m,l);return}r=setTimeout(m,o+l-p)},x=()=>{document.visibilityState==="visible"&&(r!==void 0&&clearTimeout(r),o=Date.now(),r=setTimeout(m,C()))};r=setTimeout(m,C()),document.addEventListener("visibilitychange",c);const f=qe(x);return()=>{r!==void 0&&clearTimeout(r),document.removeEventListener("visibilitychange",c),f()}},[a,s])};function bs(){const e=Ce(),s=K(),n=lt(s),{openOverlay:a,intelligenceOpen:o,showOverlay:r,toggleIntelligence:i,raiseIntelligence:d}=Pt(),m=a==="shortcuts",c=a==="nav",{searchInput:x,committedQuery:f,viewKey:p,setSearchInput:l}=yt(),{data:h,isLoading:y,isError:g,error:b,refetch:S}=Ne({...Ie(),staleTime:1/0}),I=!!(h&&(h.accounts?.length??0)===0);u.useEffect(()=>{I&&e({to:"/onboarding",replace:!0})},[I,e]),ct({enabled:!m,bindings:[{key:"?",action:"help",handler:()=>r("shortcuts"),noModifiers:!1,preventDefault:!0}]});const E=R(),B=Qe(),H=M({select:w=>Pe(w.matches)?.list==="mailbox"}),V=u.useMemo(()=>({compose:E}),[E]);Ae({enabled:!H&&!B,handlers:V});const q=u.useCallback(()=>{l("")},[l]),$=u.useCallback(()=>{l("")},[l]),v=h?.accounts??[],G=u.useMemo(()=>v.map(w=>w.accountId),[v]),U=It(v),W=dt(v).index,Y=u.useMemo(()=>Fe(v),[v]);zt(v);const J=u.useCallback(()=>{a==="nav"&&r(void 0)},[a,r]),X={accounts:v,mailboxNameIndex:U,accountNameIndex:Y,resultFolderIndex:W,searchQuery:f,searchInput:x,searchViewKey:p,onSearchChange:l,onSearchClear:q,onSearchClearQuery:$,intelligenceOpen:o,onToggleIntelligence:i,onRaiseIntelligence:d},Z={isSinglePane:n,isLoading:y||I,intelligenceOpen:o,nav:t.jsx(et,{accounts:v,onMailboxSelect:J}),topBar:n?void 0:t.jsx(Ct,{accounts:v}),overlay:n?t.jsx(St,{}):void 0,navOpen:c,onOpenNav:()=>r("nav"),onCloseNav:()=>r(void 0)};return t.jsx(we.Provider,{value:X,children:t.jsxs(Ue,{accountIds:G,children:[g?t.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:t.jsx(it,{title:"Couldn't load your account",error:b,onRetry:()=>{S()}})}):t.jsx(ze,{chrome:Z,children:t.jsx(Me,{})}),t.jsx(Nt,{isOpen:m,onClose:()=>r(void 0)})]})})}export{bs as component,ae as useMailContext};
@@ -1 +0,0 @@
1
- import{e}from"./index-Dtovse-L.js";const a=e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);export{a as M};
@@ -1 +0,0 @@
1
- import{q as i,h as n,u as a,r as m,j as s}from"./index-Dtovse-L.js";import{O as p}from"./OnboardingWizard-BOAnucJW.js";import{c}from"./onboarding-completion-Ckx99cv9.js";import"./checkbox-BwzvnbNT.js";import"./minus-BUHU6kmL.js";import"./kbd-Ccl_4UMN.js";import"./credential-steps-BPNJm3Px.js";import"./card-Bqz6khhJ.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-BD9CFExB.js";import"./file-json-CTXp7rcG.js";function E(){const o=i(),t=n(),e=a(),r=m.useCallback(l=>{c({queryClient:t,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,t]);return s.jsx(p,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{e({to:"/import"})}})}export{E as component};
@@ -1 +0,0 @@
1
- import{j as o,O as i}from"./index-Dtovse-L.js";import{a as m}from"./MailShell-DzKQC7Uj.js";import{u as p,O as t}from"./OutboxPane-DNsIelwN.js";import{u as s}from"./search-mirror-DSVQGDLi.js";import"./FullCompose-BACzjpTB.js";import"./ErrorState-PNI7QSLU.js";import"./index-CyocVpgw.js";import"./useMessageBodyContent-DIF3dieb.js";import"./useSignature-B8GSTQOi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BSAyBygv.js";import"./sections-45KeddjZ.js";import"./confirm-dialog-WrJoQuYb.js";import"./roving-focus-BgNxAjAj.js";import"./useSearchTokenContext-CnVweHh1.js";import"./kbd-Ccl_4UMN.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-kuolCFUC.js";import"./clock-CwmO_JCY.js";import"./row-actions-BwuDucsx.js";import"./rotate-ccw-BWReSl7L.js";import"./pane-header-BTNHnxOW.js";import"./NavMenuButton-D17iXFBM.js";import"./menu-Bk7fxS2w.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function w(){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{w as component};
@@ -1 +0,0 @@
1
- import{j as r,t as a}from"./index-Dtovse-L.js";function o({title:e,leading:s,children:n,className:t}){return r.jsxs("header",{className:a("flex h-pane-header shrink-0 items-center gap-2 border-b border-line px-row-inset",t),children:[s,e!==void 0&&r.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:e}),n]})}export{o as P};
@@ -1 +0,0 @@
1
- const o=e=>e.trim().toLocaleLowerCase();export{o as n};
@@ -1 +0,0 @@
1
- const o="search-scope";function t(i){const e=i.trim().replace(/\s+/g," ").toLowerCase();return/\s/.test(e)?`in:"${e}"`:`in:${e}`}function l(i){return i.list!==void 0&&i.list!=="brief"}function r(i){return i.list==="mailbox"?i.mailboxId:void 0}function c(i){const e=r(i.browsed);return e||(l(i.browsed)?i.callerMailboxId:i.callerMailboxId??i.inTokenMailboxId)}function a(i,e){return i.list==="flagged"?{kind:"scoped",chip:{id:o,label:"is:starred"}}:i.list==="outbox"?{kind:"scoped",chip:{id:o,label:"in:outbox"}}:i.list==="mailbox"?e?{kind:"scoped",chip:{id:o,label:t(e)}}:{kind:"pending"}:{kind:"global"}}function s(i,e,n){return e.kind==="global"?{kind:"global"}:i.list==="flagged"?{kind:"collection"}:{kind:"folder",...n?{role:n}:{}}}export{o as S,s as a,c as b,l as i,r,a as s};
@@ -1 +0,0 @@
1
- import{j as e,t as S,h as I,r as c,bR as A,c as C,i as k,bS as P,bT as T,f as N,X as L,u as O,aP as R,az as $,bU as q,aR as M,bV as D,bW as G,Z as Q}from"./index-Dtovse-L.js";import{K as f}from"./kbd-Ccl_4UMN.js";import{a as E,S as K}from"./settings-screen-Bm-R0ESO.js";import{E as V}from"./ErrorState-PNI7QSLU.js";import{u as _}from"./useDebouncedValue-BSAyBygv.js";import{s as B}from"./help-copy-BReMOm6I.js";import"./avatar-CCaAcetc.js";import"./chevron-left-DV5pp97l.js";import"./menu-Bk7fxS2w.js";import"./circle-help--jGrrMan.js";function F({options:t,active:r,onSelect:m}){return e.jsx("div",{role:"tablist",className:S("flex shrink-0 gap-1 overflow-x-auto border-b border-line p-2","lg:w-44 lg:flex-col lg:gap-0 lg:overflow-visible lg:border-r lg:border-b-0 lg:py-2 lg:pr-2 lg:pl-3"),children:t.map(n=>{const d=n.id===r;return e.jsxs("button",{type:"button",role:"tab","aria-selected":d,onClick:()=>m(n.id),className:S("flex min-h-11 shrink-0 items-center gap-2 rounded-md px-3 text-left text-sm transition-colors lg:min-h-0 lg:px-2 lg:py-1",d?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface-sunken hover:text-fg"),children:[e.jsx("span",{className:"flex-1 truncate",children:n.label}),e.jsx("span",{className:S("text-2xs tabular-nums",d?"text-accent-2":"text-fg-subtle"),children:n.count??"—"})]},n.id)})})}const v={vip:"VIPs",muted:"Muted",blocked:"Blocked"};function H({query:t,onCount:r}){const{data:m,isPending:n,isError:d,error:b}=C(D()),g=I(),i=k({...P(),onSettled:()=>{g.invalidateQueries({queryKey:G()})}}),l=m?.suggestions??[],p=t.trim().toLowerCase(),u=p?l.filter(a=>(a.displayName??"").toLowerCase().includes(p)||a.normalizedEmail.toLowerCase().includes(p)):l;return c.useEffect(()=>{r?.(u.length,l.length)},[r,u.length,l.length]),n?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Loading VIP suggestions…"}):d?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Couldn't load VIP suggestions",error:b})}):l.length===0?e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIP suggestions yet. As you reply to senders, they'll appear here. Press ",e.jsx(f,{children:"v"})," on any message to promote a sender to VIP."]}):u.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIPs match “",t,"”."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-row-inset py-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Suggested — promote to VIP"}),u.map(a=>e.jsx(E,{name:a.displayName??a.normalizedEmail,email:a.normalizedEmail,meta:a.replyCount>0?`${a.inboundCount} received · you replied ${a.replyCount}×`:`${a.inboundCount} received · you've never replied`,trailing:e.jsx(N,{variant:"ghost",size:"sm",icon:e.jsx(Q,{className:"size-3.5"}),"aria-busy":i.isPending,onClick:()=>{i.isPending||i.mutate({path:{addressId:a.addressId},body:{flags:{vip:{value:!0,setAt:Date.now(),setBy:"user"}}}})},children:"Add VIP"})},a.addressId))]})}function U({group:t,query:r,onCount:m}){const n=_(r.trim(),300),d=I(),[b,g]=c.useState(null),i=n.length>=2,l=A({query:{q:n,limit:50}}),{data:p,isPending:u,isError:a,error:j}=C({...l,enabled:i}),x=k({...P(),onSuccess:()=>{d.invalidateQueries({queryKey:l.queryKey})}}),h=(p?.items??[]).filter(s=>t==="muted"?s.flags?.muted?.value??!1:s.flags?.blocked?.value??!1);return c.useEffect(()=>{m?.(i?h.length:0,null)},[m,i,h.length]),i?u?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Searching…"}):a?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Search failed",error:j})}):h.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No ",v[t].toLowerCase()," senders matching “",n,"”."]}):e.jsx(e.Fragment,{children:h.map(s=>{const o=t==="muted"?s.flags?.muted:s.flags?.blocked,y=o?[`${t}`,o.setAt&&T(o.setAt,{month:"short",year:"numeric"})||null,o.reason?`— ${o.reason}`:null].filter(Boolean).join(" "):t,w=x.isPending&&x.variables?.path.addressId===s.addressId,z=x.isError&&b===s.addressId;return e.jsx(E,{name:s.displayName??s.normalizedEmail,email:s.normalizedEmail,danger:t==="blocked",meta:y,trailing:z?e.jsx(N,{variant:"secondary",size:"sm",onClick:()=>{g(s.addressId),x.mutate({path:{addressId:s.addressId},body:{flags:{[t]:{value:!1,setAt:Date.now()}}}})},children:"Retry"}):e.jsx(N,{variant:"ghost",size:"sm",icon:e.jsx(L,{className:"size-3.5"}),"aria-busy":w,"aria-label":`Remove ${t} flag`,onClick:()=>{w||(g(s.addressId),x.mutate({path:{addressId:s.addressId},body:{flags:{[t]:{value:!1,setAt:Date.now()}}}}))}})},s.addressId)})}):e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle space-y-2",children:[e.jsxs("p",{children:["Type 2+ characters to search ",v[t].toLowerCase()," ","senders by name or address."]}),e.jsxs("p",{className:"text-2xs text-fg-subtle",children:["Note: a dedicated flagged-address list endpoint is in the backlog. Press ",e.jsx(f,{children:"m"})," on any message to mute its sender; ",e.jsx(f,{children:"b"})," to block."]})]})}function re(){const t=O(),[r,m]=c.useState("vip"),[n,d]=c.useState(""),[b,g]=c.useState(!0),[i,l]=c.useState(0),[p,u]=c.useState({vip:0,muted:null,blocked:null}),a=c.useCallback((s,o)=>{l(s),u(y=>({...y,vip:o}))},[]),j=c.useCallback((s,o)=>{l(s),u(y=>({...y,[r]:s}))},[r]),x=p[r],h=s=>{const o=M[s];o&&t({to:o})};return e.jsx(K,{items:R,activeId:"senders",title:"Senders & Rules",description:"Per-sender preferences — set with one key from any message, managed here.",flush:!0,help:B,helpOpen:b,onToggleHelp:()=>g(s=>!s),onSelect:h,onBackToMail:()=>{t({to:"/mail"})},children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[e.jsx(F,{active:r,onSelect:s=>{m(s),d("")},options:["vip","muted","blocked"].map(s=>({id:s,label:v[s],count:p[s]}))}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx("div",{className:"border-b border-line px-row-inset py-2",children:e.jsx($,{icon:e.jsx(q,{className:"size-4"}),placeholder:`Filter ${v[r].toLowerCase()} by name or address`,className:"h-8 max-w-sm",value:n,onChange:s=>d(s.target.value)})}),e.jsx("div",{className:"min-h-0 flex-1 divide-y divide-line overflow-y-auto",children:r==="vip"?e.jsx(H,{query:n,onCount:a}):e.jsx(U,{group:r,query:n,onCount:j})}),e.jsxs("footer",{className:"flex items-center justify-between border-t border-line px-row-inset py-1 text-2xs text-fg-subtle",children:[e.jsx("span",{children:x!=null?`${i} of ${x} flagged senders`:`${i} flagged senders`}),e.jsxs("span",{children:[e.jsx(f,{children:"j"})," ",e.jsx(f,{children:"k"})," navigate · ",e.jsx(f,{children:"⌫"})," remove flag"]})]})]})]})})}export{U as SearchGroupPane,re as component};
@@ -1 +0,0 @@
1
- import{j as t,O as o}from"./index-Dtovse-L.js";const n=()=>t.jsx(o,{});export{n as component};
@@ -1 +0,0 @@
1
- import{j as t,an as e}from"./index-Dtovse-L.js";const o=()=>t.jsx(e,{to:"/settings/senders",replace:!0});export{o as component};
@@ -1 +0,0 @@
1
- import{e as R,t as c,j as e,r as N,W as D,X as P,ar as T,dA as Z,f as z,aQ as I,ah as L,eH as O,s as _}from"./index-Dtovse-L.js";import{c as F,R as B,C as W}from"./calendar-format-CDiJYM60.js";import{M as C}from"./mail-BD9CFExB.js";import{G as A}from"./map-pin-DM-UwFHl.js";import{u as G}from"./useQueries-DH9StZ-W.js";const U=R("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);function X(s){const n=F(s.color),a=s.rsvp==="tentative"||s.status==="tentative";return c("flex min-w-0 overflow-hidden rounded-sm border-l-2 px-1.5 py-0.5",n.soft,n.text,n.rail,s.layout==="column"||s.stacked?"flex-col":"items-center gap-1.5",a&&"border-y border-r border-dashed",a&&n.border,s.rsvp==="declined"&&"opacity-60",s.selected&&"ring-2 ring-ring",s.density==="compact"?"text-2xs":"text-xs")}function $({title:s,timeText:n,layout:a,rsvp:l,hasThread:d,isRecurring:m,zoneCertainty:x,trailing:t,detail:p}){const r=a==="column",i=x==="ambiguous",o=!r&&p!==void 0,u=e.jsxs("span",{className:c("flex min-w-0 items-center gap-1",r&&"w-full",l==="declined"&&"line-through"),children:[n!==""&&e.jsx("span",{className:"shrink-0 tabular-nums opacity-80",children:n}),e.jsx("span",{className:"truncate font-medium",children:s})]}),h=(m||d||i)&&e.jsxs("span",{className:c("flex shrink-0 items-center gap-1",r&&"mt-0.5",!r&&t===void 0&&"ml-auto"),children:[m&&e.jsx(B,{className:"size-2.5","aria-label":"Repeats"}),d&&e.jsx(C,{className:"size-2.5","aria-label":"From mail"}),i&&e.jsx(A,{className:"size-2.5 text-warning","aria-label":"Unclear zone"})]}),g=t!==void 0&&e.jsx("span",{className:c("shrink-0 opacity-80",!r&&"ml-auto"),children:t});return e.jsxs(e.Fragment,{children:[o?e.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[u,h,g]}):e.jsxs(e.Fragment,{children:[u,h,g]}),p]})}function ne({title:s,timeText:n,color:a,layout:l,density:d,rsvp:m,status:x,hasThread:t,isRecurring:p,zoneCertainty:r,selected:i,onClick:o,leading:u,trailing:h,detail:g}){const j=l==="column";return e.jsxs("button",{type:"button",onClick:o,"aria-pressed":i,className:c("group flex w-full min-w-0 text-left outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface",j?"h-full":"items-start",u!==void 0&&"gap-2"),children:[u,e.jsx("span",{className:c(X({color:a,layout:l,density:d,rsvp:m,status:x,selected:i,stacked:g!==void 0}),"flex-1",j&&"h-full"),children:e.jsx($,{title:s,timeText:n,layout:l,rsvp:m,hasThread:t,isRecurring:p,zoneCertainty:r,trailing:h,detail:g})})]})}const E=96,q=6;function ae({children:s,hasCard:n,onConfirm:a,onReject:l,blocked:d,blockedReason:m,remaining:x,confirmLabel:t="Add",emptyText:p="Nothing in your mail is waiting on a decision about time.",className:r}){const[i,o]=N.useState(0),[u,h]=N.useState(null);if(!n)return e.jsxs("div",{className:c("flex flex-col items-center gap-2 p-6 text-center",r),children:[e.jsx(D,{className:"size-6 text-fg-subtle","aria-hidden":!0}),e.jsx("p",{className:"text-sm text-fg-muted",children:p})]});const g=Math.abs(i)>E,j=i>0;return e.jsxs("div",{className:c("flex flex-col gap-3",r),children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"touch-pan-y select-none",style:{transform:`translateX(${i}px) rotate(${i/40}deg)`,transition:u===null?"transform 180ms ease-out":"none"},onPointerDown:b=>{h(b.clientX)},onPointerMove:b=>{if(u===null)return;const v=b.clientX-u;Math.abs(v)>q&&!b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.setPointerCapture(b.pointerId),o(v)},onPointerUp:()=>{Math.abs(i)>E&&(i>0&&!d&&a(),i<0&&l()),h(null),o(0)},onPointerCancel:()=>{h(null),o(0)},children:s}),g&&e.jsx("span",{className:c("pointer-events-none absolute top-3 rounded-md px-2 py-1 text-xs font-semibold",j?"right-3 bg-accent-soft text-accent":"left-3 bg-danger-soft text-danger"),children:j?d?m:t:"Not this"})]}),e.jsxs("p",{className:"text-center text-2xs text-fg-subtle",children:[x," left · swipe right to accept, left to drop, or use the buttons"]})]})}const H="Pick a clock first. The mail never said, and the reader will not choose for you.";function Q(s,n){const a=s.zoneOptions;return a===void 0?{settled:!0,timeZone:""}:a.some(l=>l.timeZone===n)?{settled:!0,timeZone:n}:{settled:!1,reason:H}}function S(s){return s.threadSubject===""?s.sender:`${s.sender} — ${s.threadSubject}`}function K(s){return s>=.85?"Read cleanly":s>=.6?"Read with gaps":"Barely read"}function re({suggestion:s,whenText:n,onAdd:a,onReview:l,onDismiss:d,onOpenThread:m,busy:x=!1,addBlocked:t=!1,zoneChoice:p,onZoneChoice:r,addLabel:i="Add",touch:o,className:u}){const[h,g]=N.useState(""),[j,b]=N.useState(!1),v=N.useId(),k=p??h,M=f=>{b(!1),r?r(f):g(f)},y=Q(s,k),w=f=>()=>{if(!y.settled){b(!0);return}f(y.timeZone)};return e.jsxs("article",{"aria-label":s.title,className:c("flex flex-col gap-2 rounded-lg border border-dashed border-line-strong bg-surface-sunken p-3",u),children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"block text-2xs uppercase tracking-wider text-fg-subtle",children:["Suggested from mail · ",K(s.confidence)]}),e.jsx("span",{className:"block truncate text-sm font-medium text-fg",children:s.title}),e.jsx("span",{className:"block text-xs text-fg-muted",children:n}),s.location!==""&&e.jsx("span",{className:"block truncate text-xs text-fg-muted",children:s.location})]}),e.jsx("button",{type:"button","aria-label":"Dismiss suggestion",onClick:d,disabled:x,className:c("flex shrink-0 items-center justify-center rounded-md text-fg-subtle outline-none hover:bg-surface hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",o?"size-11":"size-7"),children:e.jsx(P,{className:"size-4"})})]}),s.ambiguity!==""&&e.jsxs("p",{className:"flex items-start gap-1.5 text-2xs text-warning",children:[e.jsx(T,{className:"mt-0.5 size-3 shrink-0","aria-hidden":!0}),s.ambiguity]}),m?e.jsxs("button",{type:"button",onClick:m,className:"flex w-full min-w-0 items-center gap-1.5 rounded-sm text-left text-2xs text-accent-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(C,{className:"size-3 shrink-0"}),e.jsx("span",{className:"truncate",children:S(s)})]}):e.jsxs("p",{className:"flex w-full min-w-0 items-center gap-1.5 text-2xs text-fg-subtle",children:[e.jsx(C,{className:"size-3 shrink-0"}),e.jsx("span",{className:"truncate",children:S(s)})]}),s.zoneOptions&&e.jsxs("div",{className:"flex flex-col gap-1.5 rounded-md border border-warning/40 p-2",children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-2xs font-semibold text-warning",children:[e.jsx(A,{className:"size-3 shrink-0","aria-hidden":!0}),"Which clock is this on?"]}),s.zoneOptions.map(f=>e.jsxs("button",{type:"button","aria-pressed":k===f.timeZone,onClick:()=>M(f.timeZone),className:c("rounded-md border px-2 py-1 text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",o&&"min-h-11",k===f.timeZone?"border-accent bg-accent-soft":"border-line bg-surface hover:border-line-strong"),children:[e.jsx("span",{className:"block text-xs font-medium text-fg",children:f.label}),e.jsx("span",{className:"block text-2xs text-fg-subtle",children:f.note})]},f.timeZone))]}),!y.settled&&e.jsx(Z,{id:v,reason:y.reason,nudged:j,className:"text-2xs text-warning"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(z,{variant:"primary",size:o?"md":"sm",icon:e.jsx(I,{className:"size-3.5"}),onClick:w(a),disabled:x||t,"aria-describedby":y.settled?void 0:v,className:c(o&&"min-h-11 flex-1",!y.settled&&"opacity-55"),children:i}),l&&e.jsx(z,{variant:"secondary",size:o?"md":"sm",icon:e.jsx(U,{className:"size-3.5"}),onClick:w(l),disabled:x,"aria-describedby":y.settled?void 0:v,className:c(o&&"min-h-11",!y.settled&&"opacity-55"),children:"Change first"})]})]})}function ie(s){return s.defaultCalendarId!==""?"ready":s.error!==null?"failed":s.isLoading?"loading":"none"}function le(s,n){if(s!=="ready")return s==="loading"?"Reading your calendars…":s==="failed"?e.jsxs(e.Fragment,{children:["Couldn't read your calendars, so there is nowhere to add this yet. Reload to try again."," ",e.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"font-medium text-accent hover:underline",children:"Report an issue"})]}):e.jsxs(e.Fragment,{children:["You have no calendar yet, so there is nowhere to add this."," ",e.jsx(L,{to:"/settings/calendars",className:"font-medium text-accent hover:underline",children:"Create a calendar"})]})}const Y=_(400,404);function oe(s){const n=G({queries:s.map(t=>({...O({query:{from:t.from,to:t.to}}),meta:Y,staleTime:W}))}),a=s.map(t=>t.from).join("|"),l=n.map(t=>t.data),d=n.map(t=>t.isPending).join("|"),m=N.useMemo(()=>l.flatMap(t=>t?.items??[]),[a,d]),x=N.useMemo(()=>{const t=new Set;return s.forEach((p,r)=>{n[r]?.isPending&&t.add(p.from)}),t},[a,d]);return{spans:m,pendingWindows:x,error:n.find(t=>t.error)?.error??null,refetch:()=>{for(const t of n)t.error&&t.refetch()}}}export{ne as C,re as E,H as Z,$ as a,ae as b,X as c,le as d,ie as e,Q as s,oe as u};
@@ -1 +0,0 @@
1
- import{r as d,i as h,eU as D,c as F,eV as I,ec as P,eW as N,h as S,eX as L,eY as w,eZ as T,e_ as z,bm as R}from"./index-Dtovse-L.js";const X=(e,t)=>{if(e.state==="Expired")return"Expired";const r=e.state==="Disabled"?"Disabled":"Active";if(e.scope!=="Temporary"||!e.expiresAt)return r;const s=Date.parse(e.expiresAt);return Number.isNaN(s)?r:s<=t?"Expired":r},y={UserDisabled:"Turned off. Turn it on to run it on new mail again.",AwaitingFolder:"Off until its folder exists on the mail server. It turns on by itself once the folder is created.",FolderCreateFailed:"Off: the mail server refused to create its folder. Pick another folder in the rule, then turn it on.",FolderMissing:"Off: the folder it moves mail into no longer exists. Pick another folder in the rule, then turn it on."},G=e=>e.disabledReason==="None"?void 0:(e.disabledReason==="AwaitingFolder"||e.disabledReason==="FolderCreateFailed")&&e.actionMailboxId!=="None"?y.UserDisabled:y[e.disabledReason],Z=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"})},A=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,s,a,i]=r,n=new Date(Number(s),Number(a)-1,Number(i),23,59,59,0);if(Number.isNaN(n.getTime()))return;const o=-t.getTimezoneOffset(),l=o>=0?"+":"-",c=Math.abs(o),p=String(Math.floor(c/60)).padStart(2,"0"),g=String(c%60).padStart(2,"0"),u=m=>String(m).padStart(2,"0");return`${n.getFullYear()}-${u(n.getMonth()+1)}-${u(n.getDate())}T${u(n.getHours())}:${u(n.getMinutes())}:${u(n.getSeconds())}${l}${p}:${g}`},b="None",k=e=>({filterId:e,matchOperator:"And",literalClauses:[],actionLabelId:b,actionMailboxId:b}),E=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??b,actionMailboxId:e.moveMailboxId??b}),ee=({mode:e,ruleScope:t})=>t==="standing"?"standing":t==="until"?"temporary":e==="selected"?"just-these":"all-like-these",te=({mode:e,ruleScope:t,anchorMessageId:r,clauses:s,matchOperator:a,moveMailboxId:i,until:n})=>({...e==="similar"&&r?{anchorMessageId:r}:{},matchOperator:a==="all"?"And":"Or",literalClauses:s.map(o=>({field:o.field,value:o.value})),moveMailboxId:i,expiresAt:t==="until"?A(n??""):void 0}),O=(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??b,actionMailboxId:e.moveMailboxId??b,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),_=new Set(["Complete","Failed"]),M=e=>e!==void 0&&_.has(e),J=1e3,$=15e3,U=e=>{const t=Math.max(0,e),r=J*2**t;return Math.min(r,$)},q=(e,t,r)=>{if(e)return{kind:r?"restartFailed":"startFailed",error:e};if(t)return{kind:"statusUnreadable",error:t}},re=e=>{const[t,r]=d.useState(),s=h({...D(),onSuccess:f=>r(f.organizeJobId)}),{mutate:a}=s,i=F({...I({path:{accountId:e??"",organizeJobId:t??""}}),enabled:!!e&&!!t,refetchInterval:f=>{const x=f.state.data?.state;return M(x)?!1:U(f.state.dataUpdateCount)}}),n=d.useCallback(f=>{e&&a({path:{accountId:e},body:E(f)})},[e,a]),o=d.useCallback(f=>{e&&a({path:{accountId:e},body:k(f)})},[e,a]),{refetch:l}=i,c=d.useCallback(()=>{l()},[l]),p=i.data,g=s.isPending?void 0:p,u=g?.state??s.data?.state,m=M(g?.state),v={state:u,matchedCount:g?.matchedCount??0,appliedCount:g?.appliedCount??0,failedCount:g?.failedCount??0,errorMessage:g?.errorMessage??""};return{start:n,startForFilter:o,watch:r,refreshStatus:c,progress:v,isStarting:s.isPending,isRunning:!!t&&!m,isDone:m,failure:q(s.error,i.error,!!p)}},se=["From","Subject","HasWords","ListId","FromDomain"],Q=e=>{const t=e.trim(),r=t.match(/<([^>]+)>/);return(r?r[1]:t).trim().toLowerCase()},ae=(e,t)=>e==="ListId"?Q(t):t.trim(),j=e=>e==="all"?"And":"Or",K=(e,t)=>{const r=e.widen!==void 0&&!e.widen.inactive,s=e.clauses.map(a=>({field:a.field,value:a.value}));return{...r&&t?{anchorMessageId:t}:{},matchOperator:j(e.matchOperator),literalClauses:s}},W=e=>e.anchorMessageId!==void 0||!e.literalClauses.some(t=>t.field==="HasWords"),B=e=>JSON.stringify({anchor:e.anchorMessageId??null,operator:e.matchOperator,clauses:e.literalClauses.map(t=>`${t.field} ${t.value}`)}),ne=(e,t)=>{const r=K(e,t);return{...r.anchorMessageId?{anchorMessageId:r.anchorMessageId}:{},matchOperator:r.matchOperator,literalClauses:r.literalClauses,moveMailboxId:e.moveMailboxId,labelId:e.labelId,expiresAt:e.scope==="until"?A(e.until??""):void 0}},H=(e,t)=>{if(e.error!==void 0&&e.errorSignature===t)return{status:"error",reason:e.error};if(e.count===void 0)return{status:"loading"};const r=e.indexEmpty===!0?{indexEmpty:!0}:{};return e.previewedSignature===t?{status:"ready",count:e.count,...r}:{status:"ready",count:e.count,stale:!0,...r}},V=350,ie=(e,t,r)=>{const s=h(P()),{mutateAsync:a}=s,i=B(t),[n,o]=d.useState(()=>({})),l=d.useRef(t);l.current=t;const c=d.useRef(i),p=W(t);return d.useEffect(()=>{if(!e||!p||i===n.previewedSignature||i===n.errorSignature)return;const g=setTimeout(()=>{const u=i;c.current=u,a({path:{accountId:e},body:E({...l.current})}).then(m=>{c.current===u&&o({count:m.matchedCount,matchedIds:m.messageIds,indexEmpty:m.semanticIndexEmpty===!0,previewedSignature:u})}).catch(m=>{c.current===u&&o(v=>({...v,error:m instanceof Error?m.message:"Couldn't count matches.",errorSignature:u}))})},V);return()=>clearTimeout(g)},[e,p,i,n.previewedSignature,n.errorSignature,a]),p?{count:H(n,i),matchedIds:n.previewedSignature===i?n.matchedIds??[]:[]}:{count:{status:"error",reason:N},matchedIds:[]}},C=e=>w({path:{accountId:e}}),oe=e=>{const t=F({...T({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},le=e=>{const t=S(),r=h({...L(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:C(e)})}}),{mutate:s,mutateAsync:a}=r,i=d.useCallback((o,l,c)=>{e&&s({path:{accountId:e},body:O(o,l,c)})},[e,s]),n=d.useCallback(async(o,l,c)=>{if(e)return a({path:{accountId:e},body:O(o,l,c)}).then(p=>p,()=>{})},[e,a]);return{createFilter:i,createFilterAsync:n,data:r.data,isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},ue=e=>{const t=S(),r=h({...z(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:C(e)})}}),{mutate:s}=r;return{deleteFilter:d.useCallback(i=>{e&&s({path:{accountId:e,filterId:i}})},[e,s]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}},de=e=>{const t=S(),r=h({...R(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:C(e)})}}),{mutate:s,variables:a}=r,i=d.useCallback((o,l)=>{e&&s({path:{accountId:e,filterId:o},body:{state:l?"Active":"Disabled"}})},[e,s]),n=d.useCallback(()=>{a&&s(a)},[s,a]);return{toggleFilter:i,retry:n,togglingFilterId:r.isPending?a?.path.filterId:void 0,isError:r.isError,error:r.error,enabling:a?.body?.state==="Active"}};export{b as N,se as S,re as a,C as b,ne as c,G as d,Z as e,X as f,oe as g,ue as h,de as i,E as j,le as k,te as l,ae as n,ee as o,A as p,K as r,ie as u};
@@ -1 +0,0 @@
1
- import{c0 as s,c1 as e}from"./index-Dtovse-L.js";const i=768,r=t=>t!=="desktop",a=()=>{const t=s(`(min-width: ${i}px)`);return s(e)?"desktop":t?"tablet":"phone"};export{r as i,a as u};
@@ -1 +0,0 @@
1
- import{r as a,u as M,cm as O,cn as N,cN as B,a9 as y,co as P,q as U,ab as $,h as D,c as F,cO as v,cC as L}from"./index-Dtovse-L.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=y({from:w,shouldThrow:!1}),t=y({from:R,shouldThrow:!1}),r=y({from:E,shouldThrow:!1}),s=y({from:k,shouldThrow:!1});return e??t??r??s}function j(){return T()!==void 0}function J(){return T()?.outboxMessageId}function _(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 g(){const e=M(),t=O(),{list:r,mailboxId:s}=N();return a.useCallback((n,o)=>{e({..._(r,s,n),search:B,hash:o?.keepPanels?!0:t,replace:o?.replace??!1})},[e,t,r,s])}function V(){const e=g();return a.useCallback(()=>e(void 0),[e])}function Z(){const e=g();return a.useCallback(t=>e(t),[e])}function ee(){const e=g();return a.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function te(){return P()}const q=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},b={all:["messages"],detail:e=>[...b.all,"detail",e],body:e=>[...b.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 K=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},Q=8,I="x-remit-403-reason",X=(e,t)=>{const r=t?.trim()??"";return e===401?"auth":e===403?r.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},G=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,H=(e,t)=>{const r=(t??"").toLowerCase();return!!(e==="text"&&r.startsWith("text/html"))},W=async(e,t,r=async()=>null)=>{const s={},n=await r();n&&(s.Authorization=`Bearer ${n}`);const o=await L(e,{headers:s});if(o.status===202)throw new f("not-ready","Message body is still syncing",202,K(o.headers.get("Retry-After")));if(!o.ok){const l=o.headers.get(I),h=X(o.status,l);throw new f(h,`Failed to load message body (${o.status} ${o.statusText})`,o.status)}const c=o.headers.get("content-type");if(H(t,c))throw new f("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${c}`);const m=await o.text();if(G(m,c))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 m},z=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),se=({messageId:e,bodyParts:t,enabled:r=!0})=>{const s=t?q(t):null,n=U(),{getToken:o}=$(),c=a.useRef(null),m=D(),l=a.useRef(!1),h=a.useRef(null),C=e&&s?`${e}:${s.contentUrl}`:null;h.current!==C&&(h.current=C,l.current=!1);const i=F({queryKey:e?[...b.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,z({fetchContent:(u,S)=>W(u,S,o),refetchDescribeMessage:()=>m.refetchQueries({queryKey:v({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,x=t!==void 0&&s===null;a.useEffect(()=>{p&&(c.current=performance.now())},[p]),a.useEffect(()=>{i.isSuccess&&c.current!==null&&(n.recordTiming("message.body.load",Math.round(performance.now()-c.current)),c.current=null)},[i.isSuccess,n]);const A=i.data&&s?{kind:s.kind,body:i.data}:void 0;return{picked:s,data:A,isLoading:p,hasNoRenderablePart:x,isError:i.isError,error:i.error,refetch:i.refetch}};export{f as B,j as a,se as b,X as c,J as d,ee as e,te as f,Z as g,V as u};
@@ -1 +0,0 @@
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-Dtovse-L.js";import{C as Y}from"./circle-check-big-kuolCFUC.js";import{R as Z}from"./refresh-cw-DV6lCoUu.js";import{u as P}from"./useQueries-DH9StZ-W.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 +0,0 @@
1
- import{h as L,at as M,i as k,E as I,F as E,cy as A,ey as R,r as v,dJ as w,j as p,ez as h,eA as D,eB as _,C as j,cn as z,c as N,e2 as Q,df as O}from"./index-Dtovse-L.js";import{c as U}from"./popover-menu-CG5nGI0G.js";import{an as q}from"./MailListHeader-Dp-YNlPj.js";import{a as B}from"./useLabels-qT2MGxVA.js";import{n as P}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-CnVweHh1.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}},J=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}=B(e),{applyLabel:l}=J({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 K=3,ie=({hasSearchQuery:e,freeText:t,residualTokenCount:s})=>{if(!e||s>0)return!1;const n=t.trim();return n.length===0||n.length>=K},ce=e=>e===void 0?{kind:"unknown"}:{kind:"exact",value:e},V=20,Y=new Set(Object.values(O)),$=e=>e!==void 0&&Y.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=P(s),{freeText:a,tokens:i}=H(c,n),r=a.length>0,u=i.find(o=>o.type==="category"),d=$(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}=N({...Q({query:{query:a,mailboxId:S,limit:V,...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};