@remit/web-client-dist 0.0.682 → 0.0.683

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 (217) hide show
  1. package/assets/BriefPane-B3D5-BM0.js +1 -0
  2. package/assets/CalendarEventEditor-CorHNzvG.js +1 -0
  3. package/assets/CalendarEventPopup-D-SdDSgQ.js +1 -0
  4. package/assets/{CalendarLoadFailed-DNV1DlXi.js → CalendarLoadFailed-fjYDcNBn.js} +1 -1
  5. package/assets/CalendarQuickCreate-BNdOcecP.js +1 -0
  6. package/assets/{CalendarSession-CTmh2tcD.js → CalendarSession-DVmvDWU4.js} +1 -1
  7. package/assets/DesktopChrome-BTELS57y.js +1 -0
  8. package/assets/{DropdownMenu-D3gGWitE.js → DropdownMenu-CMRvH2nc.js} +1 -1
  9. package/assets/{EmptyState-5XJzmFAK.js → EmptyState-D9VF8IjN.js} +1 -1
  10. package/assets/{ErrorState-Dzdw33-3.js → ErrorState-94ifepAa.js} +1 -1
  11. package/assets/FlaggedPane-CpXIW-t2.js +1 -0
  12. package/assets/FullCompose-D0r-tiQo.js +1 -0
  13. package/assets/{LabelApplyTrigger-CSWiFHCu.js → LabelApplyTrigger-C03Hgfzy.js} +1 -1
  14. package/assets/MailShell-CtmFFRYB.js +1 -0
  15. package/assets/{MailViewChrome-C47Pffjf.js → MailViewChrome-Dsvhd_KV.js} +1 -1
  16. package/assets/{MailboxPane-CBl3PnOT.js → MailboxPane-CZB7l_UU.js} +2 -2
  17. package/assets/MessageBody-D3iuMLwF.js +84 -0
  18. package/assets/MessageToolbar-BEI90gj6.js +1 -0
  19. package/assets/{NavMenuButton-CN3ovZVQ.js → NavMenuButton-DSOpFRST.js} +1 -1
  20. package/assets/{OnboardingWizard-CIAVrjJr.js → OnboardingWizard-B59qf55_.js} +1 -1
  21. package/assets/OutboxPane-BUI6ugaL.js +1 -0
  22. package/assets/_calendarObjectId-BY50J2hr.js +1 -0
  23. package/assets/_mailboxId-0i2eghj0.js +1 -0
  24. package/assets/_messageId-BQqk5gfw.js +1 -0
  25. package/assets/_messageId-BqO-NhQa.js +1 -0
  26. package/assets/_messageId-Cmg2GAfD.js +1 -0
  27. package/assets/_outboxMessageId-BDvXTrQM.js +1 -0
  28. package/assets/_recurrenceId-CMVJw-Ue.js +1 -0
  29. package/assets/_slotId-CFujBWsH.js +1 -0
  30. package/assets/_threadId-BSlijLpe.js +1 -0
  31. package/assets/_threadId-BiFfo-Au.js +1 -0
  32. package/assets/_threadId-CvKjrqYT.js +1 -0
  33. package/assets/_view._date-BZkjct9_.js +1 -0
  34. package/assets/{account-service-status-C_MJ-o-p.js → account-service-status-DcgJfCAF.js} +1 -1
  35. package/assets/accounts-CEI9HlTN.js +1 -0
  36. package/assets/advanced-BK0dqfFu.js +1 -0
  37. package/assets/{agenda-time-ACtN6wfF.js → agenda-time-BuLpxvQJ.js} +1 -1
  38. package/assets/{app-chrome-Dbvu4ieD.js → app-chrome-Do6quK12.js} +1 -1
  39. package/assets/appearance-BLw-N7mB.js +1 -0
  40. package/assets/{avatar-BV5vFJ_r.js → avatar-LbufyW4K.js} +1 -1
  41. package/assets/{badge-CbfjHXMg.js → badge-C9PbkapD.js} +1 -1
  42. package/assets/{bottom-sheet-4tvR-sri.js → bottom-sheet-CGUsHUE9.js} +1 -1
  43. package/assets/{brief-DbMpucTQ.js → brief-CcMmKq4G.js} +1 -1
  44. package/assets/brief-ZZJ3nfgH.js +1 -0
  45. package/assets/calendar-C-SC0LmB.js +1 -0
  46. package/assets/calendar-CZgZil9h.js +1 -0
  47. package/assets/{calendar-event-popup-CYCnsOds.js → calendar-event-popup--BJKBvHu.js} +1 -1
  48. package/assets/{calendar-event-sidebar-TTXLpS2C.js → calendar-event-sidebar-s-VGamZ2.js} +1 -1
  49. package/assets/{calendar-failure-note-A4rOKZNb.js → calendar-failure-note-CEYH2UEH.js} +1 -1
  50. package/assets/{calendar-guests-BXmTl5jL.js → calendar-guests-BaqdXc5Z.js} +1 -1
  51. package/assets/calendar-suggestion-hiP6smEM.js +1 -0
  52. package/assets/calendars-BB8BOIZF.js +1 -0
  53. package/assets/{card-f9A3um0u.js → card-D7vOetR8.js} +1 -1
  54. package/assets/{checkbox-BlFhjoed.js → checkbox-BG_wsoD6.js} +1 -1
  55. package/assets/chevron-down-Np6EEMl-.js +1 -0
  56. package/assets/chevron-left-CpG9UDY6.js +1 -0
  57. package/assets/{circle-check-BUMxM7Pv.js → circle-check-DTYzt_6O.js} +1 -1
  58. package/assets/{circle-check-big-BP7Pn5eb.js → circle-check-big-Bm7lzv-i.js} +1 -1
  59. package/assets/{circle-help-B083hm65.js → circle-help-BbeOW2US.js} +1 -1
  60. package/assets/{clock-8nW9RI8K.js → clock-BzJ_fFzJ.js} +1 -1
  61. package/assets/compose._-_outboxMessageId_-BqsxhT9K.js +1 -0
  62. package/assets/compose._-_outboxMessageId_-CproJqKO.js +1 -0
  63. package/assets/compose._-_outboxMessageId_-D4ti_AhM.js +1 -0
  64. package/assets/compose._-_outboxMessageId_-DUOU8Jn4.js +1 -0
  65. package/assets/{config-import-Bk6uFuiN.js → config-import-C8-amzAu.js} +1 -1
  66. package/assets/{confirm-dialog-BXhRj5Sm.js → confirm-dialog-CJxHNbgP.js} +1 -1
  67. package/assets/{copy-cdXYXbA6.js → copy-BXsMQRiH.js} +1 -1
  68. package/assets/{credential-steps-B4j2Icsi.js → credential-steps-rbRE-sDX.js} +1 -1
  69. package/assets/{download-D9_dvZ6g.js → download-BfBVKcRB.js} +1 -1
  70. package/assets/{draft-BIQ0-Lk_.js → draft-DNq8lw24.js} +1 -1
  71. package/assets/edit-BHhIau_f.js +1 -0
  72. package/assets/edit-DgebsJae.js +1 -0
  73. package/assets/{external-link-Ct6hJ8mI.js → external-link-BJSinsZe.js} +1 -1
  74. package/assets/{file-json-FJobBXk2.js → file-json-BQnHw6MM.js} +1 -1
  75. package/assets/filters-PWUZK_ek.js +1 -0
  76. package/assets/{flagged-C439b_WS.js → flagged-CKVThblv.js} +1 -1
  77. package/assets/flagged-CXvEvVrc.js +1 -0
  78. package/assets/{folder-input-DjxVjldz.js → folder-input-ByfaQaN_.js} +1 -1
  79. package/assets/folders-CN4VErkf.js +1 -0
  80. package/assets/{help-copy-YhaxQEIY.js → help-copy-CiMWKARn.js} +1 -1
  81. package/assets/{import-af_hbF-p.js → import-Bp-nuO1l.js} +1 -1
  82. package/assets/index-B9liPKRG.js +1 -0
  83. package/assets/index-BQqk5gfw.js +1 -0
  84. package/assets/index-BxeM8f0P.js +1 -0
  85. package/assets/index-C8IkDmiU.js +1 -0
  86. package/assets/index-CGpfssJ_.js +1 -0
  87. package/assets/{index-D94MOpo0.js → index-CKflMWYU.js} +18 -18
  88. package/assets/index-Cmg2GAfD.js +1 -0
  89. package/assets/index-CnG5iabp.js +1 -0
  90. package/assets/index-CsYB5imQ.js +1 -0
  91. package/assets/{index-BlOq3dK1.js → index-Dd-3T--b.js} +7 -7
  92. package/assets/index-Dzu-4vEF.js +1 -0
  93. package/assets/index-ddvd0V_o.js +1 -0
  94. package/assets/{kbd-cd0_OQ1u.js → kbd-BncXAFDO.js} +1 -1
  95. package/assets/{label-chip-BYIaT-tI.js → label-chip-WqxiwOiU.js} +1 -1
  96. package/assets/labels-Dg7TTcGv.js +1 -0
  97. package/assets/mail-BXR9_JRf.js +1 -0
  98. package/assets/{mail-4EQRG36P.js → mail-D6kMQxBk.js} +1 -1
  99. package/assets/{menu-C3buEsRL.js → menu-DoDMKB2j.js} +1 -1
  100. package/assets/nav-link-D4-gc9H1.js +1 -0
  101. package/assets/new-cj3Hd_mI.js +1 -0
  102. package/assets/onboarding-DVmfGdcY.js +1 -0
  103. package/assets/{onboarding-completion-BxKBJWb5.js → onboarding-completion-CidQapv1.js} +1 -1
  104. package/assets/outbox-FTmGdqfa.js +1 -0
  105. package/assets/{pencil-Cr6xAk53.js → pencil-DWPNxo1l.js} +1 -1
  106. package/assets/people-aWk5_IT2.js +1 -0
  107. package/assets/{plus-BEkGxsOV.js → plus-BQ1_1L0j.js} +1 -1
  108. package/assets/{popover-menu-D1Ggz_nA.js → popover-menu-CNRLhp3y.js} +1 -1
  109. package/assets/{refresh-cw-BDamTi58.js → refresh-cw-BmzOf0Tw.js} +1 -1
  110. package/assets/reply-CM_F5zLS.js +1 -0
  111. package/assets/{rich-text-D3EPlK78.js → rich-text-DGbE9Son.js} +2 -2
  112. package/assets/{rich-text-spellcheck-worker-provider-DPs4YZHA.js → rich-text-spellcheck-worker-provider-CIgyTxax.js} +1 -1
  113. package/assets/{rotate-ccw-Dxx7BcD7.js → rotate-ccw-BGcFG-wN.js} +1 -1
  114. package/assets/{roving-focus-CJC-AjPO.js → roving-focus-5GpSESqn.js} +1 -1
  115. package/assets/{row-actions-uPzTjymf.js → row-actions-Cj5ovPiM.js} +1 -1
  116. package/assets/search-mirror-C3jFbnCg.js +1 -0
  117. package/assets/{search-scope-CdH_SY3a.js → search-scope-4mzoV4f2.js} +1 -1
  118. package/assets/search-token-index-CjZf08nc.js +1 -0
  119. package/assets/sections-HylxNewe.js +1 -0
  120. package/assets/{segmented-control-D_XxaVb8.js → segmented-control-DIfCqJPe.js} +1 -1
  121. package/assets/{select-CB3Efp6I.js → select-DBBB1VI8.js} +1 -1
  122. package/assets/senders-CjRXvk8z.js +1 -0
  123. package/assets/settings-BLU5tEtD.js +1 -0
  124. package/assets/{settings-screen-CF0fiL2l.js → settings-screen-83hRChID.js} +1 -1
  125. package/assets/shield-check-BtDXLNzB.js +1 -0
  126. package/assets/{sparkles-rKmhB5Fk.js → sparkles-DxQ7dXLC.js} +1 -1
  127. package/assets/{suggest-list-Dz1MsIYD.js → suggest-list-B3YTezx4.js} +1 -1
  128. package/assets/{suggested-vips-idJBB-lA.js → suggested-vips-DeXMjfai.js} +1 -1
  129. package/assets/suggestion._suggestionId-BFy5c2Ae.js +1 -0
  130. package/assets/task._calendarTaskId--_XtqsMj.js +1 -0
  131. package/assets/{undo-2-BAub6h7R.js → undo-2-CG4e15mN.js} +1 -1
  132. package/assets/{useCalendarData-DQ7oi-nJ.js → useCalendarData-CjjJgU5o.js} +1 -1
  133. package/assets/{useCalendarScheduling-DAb_8yBj.js → useCalendarScheduling-BgRBx6lW.js} +1 -1
  134. package/assets/{useCalendarSuggestions-BfA31NJY.js → useCalendarSuggestions--U0GEAn1.js} +1 -1
  135. package/assets/{useCalendarTasks-BMPfFFau.js → useCalendarTasks-vfDCVCeh.js} +1 -1
  136. package/assets/{useDebouncedValue-BQRYh_4T.js → useDebouncedValue-DjJaY9PG.js} +1 -1
  137. package/assets/{useFilters-IsqJ-AEH.js → useFilters-CfG8A2Tp.js} +1 -1
  138. package/assets/{useLabels-CrZtVj3Y.js → useLabels-QIv6Xivl.js} +1 -1
  139. package/assets/{useLayoutTier-CIlJuePx.js → useLayoutTier-4MDmjdnr.js} +1 -1
  140. package/assets/{useMediaQuery-CGZfUxdm.js → useMediaQuery-B1PJEoqh.js} +1 -1
  141. package/assets/{useMessageBodyContent-yhApp3IG.js → useMessageBodyContent-B0iiI3OV.js} +2 -2
  142. package/assets/{useQueries-CIIHHroC.js → useQueries-DVcMuKhn.js} +1 -1
  143. package/assets/{useRefreshControl-MOracVIf.js → useRefreshControl-CY786xTG.js} +1 -1
  144. package/assets/{useResultFolderIndex-BjaX8bsI.js → useResultFolderIndex-DkgVg9nE.js} +1 -1
  145. package/assets/useSignature-DR9rEETd.js +1 -0
  146. package/assets/{warnings-BRGgf3x_.js → warnings-BM1pwMF7.js} +4 -4
  147. package/index.html +1 -1
  148. package/package.json +1 -1
  149. package/assets/AccountSession-BYJ1unhC.js +0 -1
  150. package/assets/BriefPane-mADSC2OK.js +0 -1
  151. package/assets/CalendarEventEditor-C8_kOvZ3.js +0 -1
  152. package/assets/CalendarEventPopup-7lWwS7jN.js +0 -1
  153. package/assets/CalendarQuickCreate-BG0qeW8s.js +0 -1
  154. package/assets/DesktopChrome-Bj6-FRYu.js +0 -1
  155. package/assets/FlaggedPane-IgqQna9q.js +0 -1
  156. package/assets/FullCompose-CppNsB88.js +0 -1
  157. package/assets/MailShell-DbZolZ7P.js +0 -1
  158. package/assets/MessageBody-C2-SQjAb.js +0 -84
  159. package/assets/MessageToolbar-2VWnNBpw.js +0 -1
  160. package/assets/OutboxPane-C7vPOisX.js +0 -1
  161. package/assets/_calendarObjectId-BOWn0Wc1.js +0 -1
  162. package/assets/_mailboxId-CbT5t4kO.js +0 -1
  163. package/assets/_messageId-CUzI2YR7.js +0 -1
  164. package/assets/_messageId-DiJIuK0Z.js +0 -1
  165. package/assets/_messageId-aGpmi6EA.js +0 -1
  166. package/assets/_outboxMessageId-D9yNQ74_.js +0 -1
  167. package/assets/_recurrenceId-BUk6g_uR.js +0 -1
  168. package/assets/_threadId-BQKxqX_U.js +0 -1
  169. package/assets/_threadId-DNM46Cj0.js +0 -1
  170. package/assets/_threadId-DQ9Ns1qA.js +0 -1
  171. package/assets/_view._date-Cb0nAaKf.js +0 -1
  172. package/assets/accounts-CahoQhl7.js +0 -1
  173. package/assets/advanced-Cf1h5R7s.js +0 -1
  174. package/assets/appearance-BnPvwrqn.js +0 -1
  175. package/assets/brief-DhhQktQG.js +0 -1
  176. package/assets/calendar-C4YDxHb-.js +0 -1
  177. package/assets/calendar-CNIMaOb7.js +0 -1
  178. package/assets/calendar-suggestion-cOTOb7Lm.js +0 -1
  179. package/assets/calendars-DNlrofPU.js +0 -1
  180. package/assets/chevron-down-UUw56DjM.js +0 -1
  181. package/assets/chevron-left-D5-k3mB7.js +0 -1
  182. package/assets/cloud-off-BRk6zo1b.js +0 -1
  183. package/assets/compose._-_outboxMessageId_-CN2ZUrAe.js +0 -1
  184. package/assets/compose._-_outboxMessageId_-DmK_lXQP.js +0 -1
  185. package/assets/compose._-_outboxMessageId_-Lkfk9hrZ.js +0 -1
  186. package/assets/compose._-_outboxMessageId_-uc2TFREe.js +0 -1
  187. package/assets/edit-DGHa68Jh.js +0 -1
  188. package/assets/edit-cyEdCEG-.js +0 -1
  189. package/assets/filters-BAyEbBhi.js +0 -1
  190. package/assets/flagged-pJGEDQAe.js +0 -1
  191. package/assets/folders-CIyVw-EH.js +0 -1
  192. package/assets/index-BZPylmnf.js +0 -1
  193. package/assets/index-BnrEzeaK.js +0 -1
  194. package/assets/index-CUzI2YR7.js +0 -1
  195. package/assets/index-CpjgMzVc.js +0 -1
  196. package/assets/index-D9j5MCr1.js +0 -1
  197. package/assets/index-DJh02QjC.js +0 -1
  198. package/assets/index-DiJIuK0Z.js +0 -1
  199. package/assets/index-aGpmi6EA.js +0 -1
  200. package/assets/index-g59ADgCj.js +0 -1
  201. package/assets/index-vFdlNYM0.js +0 -1
  202. package/assets/labels-DnNxXAR1.js +0 -1
  203. package/assets/mail-CE3n3sQ0.js +0 -1
  204. package/assets/new-CByizl3m.js +0 -1
  205. package/assets/onboarding-CA8Qn0P1.js +0 -1
  206. package/assets/outbox-wQ86O6i5.js +0 -1
  207. package/assets/people-H9fmtU8R.js +0 -1
  208. package/assets/reply-DPVLqPcI.js +0 -1
  209. package/assets/search-mirror-C2_MRHKT.js +0 -1
  210. package/assets/search-token-index-DXiN1835.js +0 -1
  211. package/assets/sections-Dm0mEk9W.js +0 -1
  212. package/assets/security-C1G2I4K2.js +0 -1
  213. package/assets/senders-BPIkrH6Y.js +0 -1
  214. package/assets/settings-BjSixogd.js +0 -1
  215. package/assets/suggestion._suggestionId-Cn195KCI.js +0 -1
  216. package/assets/task._calendarTaskId-CzVuyEtm.js +0 -1
  217. package/assets/useSignature-ClOAemBi.js +0 -1
@@ -1 +0,0 @@
1
- import{j as r}from"./index-D94MOpo0.js";import{B as o}from"./BriefPane-mADSC2OK.js";import"./MessageToolbar-2VWnNBpw.js";import"./MessageBody-C2-SQjAb.js";import"./kbd-cd0_OQ1u.js";import"./search-scope-CdH_SY3a.js";import"./app-chrome-Dbvu4ieD.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./useMessageBodyContent-yhApp3IG.js";import"./roving-focus-CJC-AjPO.js";import"./chevron-down-UUw56DjM.js";import"./search-token-index-DXiN1835.js";import"./useQueries-CIIHHroC.js";import"./index-BlOq3dK1.js";import"./useSignature-ClOAemBi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BQRYh_4T.js";import"./suggest-list-Dz1MsIYD.js";import"./sections-Dm0mEk9W.js";import"./badge-CbfjHXMg.js";import"./undo-2-BAub6h7R.js";import"./DropdownMenu-D3gGWitE.js";import"./popover-menu-D1Ggz_nA.js";import"./ErrorState-Dzdw33-3.js";import"./mail-4EQRG36P.js";import"./download-D9_dvZ6g.js";import"./avatar-BV5vFJ_r.js";import"./EmptyState-5XJzmFAK.js";import"./calendar-suggestion-cOTOb7Lm.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./agenda-time-ACtN6wfF.js";import"./sparkles-rKmhB5Fk.js";import"./plus-BEkGxsOV.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-CNIMaOb7.js";import"./calendar-failure-note-A4rOKZNb.js";import"./checkbox-BlFhjoed.js";import"./clock-8nW9RI8K.js";import"./segmented-control-D_XxaVb8.js";import"./useLayoutTier-CIlJuePx.js";import"./menu-C3buEsRL.js";import"./useFilters-IsqJ-AEH.js";import"./select-CB3Efp6I.js";import"./folder-input-DjxVjldz.js";import"./confirm-dialog-BXhRj5Sm.js";import"./label-chip-BYIaT-tI.js";import"./cloud-off-BRk6zo1b.js";import"./LabelApplyTrigger-CSWiFHCu.js";import"./useLabels-CrZtVj3Y.js";import"./useRefreshControl-MOracVIf.js";import"./circle-check-big-BP7Pn5eb.js";import"./refresh-cw-BDamTi58.js";import"./wizard-selection-zWa1qc6-.js";function ir(){return r.jsx(o.Reading,{})}export{ir as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-D94MOpo0.js";import{M as i}from"./MailboxPane-CBl3PnOT.js";import"./MailViewChrome-C47Pffjf.js";import"./search-token-index-DXiN1835.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./search-scope-CdH_SY3a.js";import"./app-chrome-Dbvu4ieD.js";import"./useQueries-CIIHHroC.js";import"./roving-focus-CJC-AjPO.js";import"./MessageToolbar-2VWnNBpw.js";import"./MessageBody-C2-SQjAb.js";import"./kbd-cd0_OQ1u.js";import"./useMessageBodyContent-yhApp3IG.js";import"./chevron-down-UUw56DjM.js";import"./index-BlOq3dK1.js";import"./useSignature-ClOAemBi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BQRYh_4T.js";import"./suggest-list-Dz1MsIYD.js";import"./sections-Dm0mEk9W.js";import"./badge-CbfjHXMg.js";import"./undo-2-BAub6h7R.js";import"./DropdownMenu-D3gGWitE.js";import"./popover-menu-D1Ggz_nA.js";import"./ErrorState-Dzdw33-3.js";import"./mail-4EQRG36P.js";import"./download-D9_dvZ6g.js";import"./avatar-BV5vFJ_r.js";import"./EmptyState-5XJzmFAK.js";import"./calendar-suggestion-cOTOb7Lm.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./agenda-time-ACtN6wfF.js";import"./sparkles-rKmhB5Fk.js";import"./plus-BEkGxsOV.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-CNIMaOb7.js";import"./calendar-failure-note-A4rOKZNb.js";import"./checkbox-BlFhjoed.js";import"./clock-8nW9RI8K.js";import"./segmented-control-D_XxaVb8.js";import"./useLayoutTier-CIlJuePx.js";import"./menu-C3buEsRL.js";import"./useFilters-IsqJ-AEH.js";import"./select-CB3Efp6I.js";import"./folder-input-DjxVjldz.js";import"./confirm-dialog-BXhRj5Sm.js";import"./label-chip-BYIaT-tI.js";import"./cloud-off-BRk6zo1b.js";import"./refresh-cw-BDamTi58.js";import"./useRefreshControl-MOracVIf.js";import"./circle-check-big-BP7Pn5eb.js";import"./LabelApplyTrigger-CSWiFHCu.js";import"./useLabels-CrZtVj3Y.js";import"./NavMenuButton-CN3ovZVQ.js";import"./bottom-sheet-4tvR-sri.js";import"./circle-help-B083hm65.js";import"./circle-check-BUMxM7Pv.js";function no(){return o.jsx(i.Reading,{})}export{no as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-D94MOpo0.js";import{F as r}from"./FlaggedPane-IgqQna9q.js";import"./MessageToolbar-2VWnNBpw.js";import"./MessageBody-C2-SQjAb.js";import"./kbd-cd0_OQ1u.js";import"./search-scope-CdH_SY3a.js";import"./app-chrome-Dbvu4ieD.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./useMessageBodyContent-yhApp3IG.js";import"./roving-focus-CJC-AjPO.js";import"./chevron-down-UUw56DjM.js";import"./search-token-index-DXiN1835.js";import"./useQueries-CIIHHroC.js";import"./index-BlOq3dK1.js";import"./useSignature-ClOAemBi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BQRYh_4T.js";import"./suggest-list-Dz1MsIYD.js";import"./sections-Dm0mEk9W.js";import"./badge-CbfjHXMg.js";import"./undo-2-BAub6h7R.js";import"./DropdownMenu-D3gGWitE.js";import"./popover-menu-D1Ggz_nA.js";import"./ErrorState-Dzdw33-3.js";import"./mail-4EQRG36P.js";import"./download-D9_dvZ6g.js";import"./avatar-BV5vFJ_r.js";import"./EmptyState-5XJzmFAK.js";import"./calendar-suggestion-cOTOb7Lm.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./agenda-time-ACtN6wfF.js";import"./sparkles-rKmhB5Fk.js";import"./plus-BEkGxsOV.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-CNIMaOb7.js";import"./calendar-failure-note-A4rOKZNb.js";import"./checkbox-BlFhjoed.js";import"./clock-8nW9RI8K.js";import"./segmented-control-D_XxaVb8.js";import"./useLayoutTier-CIlJuePx.js";import"./menu-C3buEsRL.js";import"./useFilters-IsqJ-AEH.js";import"./select-CB3Efp6I.js";import"./folder-input-DjxVjldz.js";import"./confirm-dialog-BXhRj5Sm.js";import"./label-chip-BYIaT-tI.js";import"./cloud-off-BRk6zo1b.js";import"./MailViewChrome-C47Pffjf.js";import"./refresh-cw-BDamTi58.js";import"./wizard-selection-zWa1qc6-.js";function $(){return o.jsx(r.Reading,{})}export{$ as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-D94MOpo0.js";import{F as r}from"./FlaggedPane-IgqQna9q.js";import"./MessageToolbar-2VWnNBpw.js";import"./MessageBody-C2-SQjAb.js";import"./kbd-cd0_OQ1u.js";import"./search-scope-CdH_SY3a.js";import"./app-chrome-Dbvu4ieD.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./useMessageBodyContent-yhApp3IG.js";import"./roving-focus-CJC-AjPO.js";import"./chevron-down-UUw56DjM.js";import"./search-token-index-DXiN1835.js";import"./useQueries-CIIHHroC.js";import"./index-BlOq3dK1.js";import"./useSignature-ClOAemBi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BQRYh_4T.js";import"./suggest-list-Dz1MsIYD.js";import"./sections-Dm0mEk9W.js";import"./badge-CbfjHXMg.js";import"./undo-2-BAub6h7R.js";import"./DropdownMenu-D3gGWitE.js";import"./popover-menu-D1Ggz_nA.js";import"./ErrorState-Dzdw33-3.js";import"./mail-4EQRG36P.js";import"./download-D9_dvZ6g.js";import"./avatar-BV5vFJ_r.js";import"./EmptyState-5XJzmFAK.js";import"./calendar-suggestion-cOTOb7Lm.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./agenda-time-ACtN6wfF.js";import"./sparkles-rKmhB5Fk.js";import"./plus-BEkGxsOV.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-CNIMaOb7.js";import"./calendar-failure-note-A4rOKZNb.js";import"./checkbox-BlFhjoed.js";import"./clock-8nW9RI8K.js";import"./segmented-control-D_XxaVb8.js";import"./useLayoutTier-CIlJuePx.js";import"./menu-C3buEsRL.js";import"./useFilters-IsqJ-AEH.js";import"./select-CB3Efp6I.js";import"./folder-input-DjxVjldz.js";import"./confirm-dialog-BXhRj5Sm.js";import"./label-chip-BYIaT-tI.js";import"./cloud-off-BRk6zo1b.js";import"./MailViewChrome-C47Pffjf.js";import"./refresh-cw-BDamTi58.js";import"./wizard-selection-zWa1qc6-.js";function $(){return o.jsx(r.Reading,{})}export{$ as component};
@@ -1 +0,0 @@
1
- import{eS as o,j as r}from"./index-D94MOpo0.js";import{C as m}from"./CalendarEventPopup-7lWwS7jN.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./ErrorState-Dzdw33-3.js";import"./useQueries-CIIHHroC.js";import"./useCalendarData-DQ7oi-nJ.js";import"./useCalendarTasks-BMPfFFau.js";import"./calendar-format-BwCpz-JZ.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./calendar-CNIMaOb7.js";import"./CalendarSession-CTmh2tcD.js";import"./calendar-event-popup-CYCnsOds.js";import"./pencil-Cr6xAk53.js";import"./calendar-guests-BXmTl5jL.js";import"./circle-help-B083hm65.js";import"./confirm-dialog-BXhRj5Sm.js";function P(){const{calendarObjectId:t}=o.useParams();return r.jsx(m,{calendarObjectId:t})}export{P as component};
@@ -1 +0,0 @@
1
- import{j as t,a9 as o}from"./index-D94MOpo0.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-D94MOpo0.js";import{M as r}from"./MailboxPane-CBl3PnOT.js";import"./MailViewChrome-C47Pffjf.js";import"./search-token-index-DXiN1835.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./search-scope-CdH_SY3a.js";import"./app-chrome-Dbvu4ieD.js";import"./useQueries-CIIHHroC.js";import"./roving-focus-CJC-AjPO.js";import"./MessageToolbar-2VWnNBpw.js";import"./MessageBody-C2-SQjAb.js";import"./kbd-cd0_OQ1u.js";import"./useMessageBodyContent-yhApp3IG.js";import"./chevron-down-UUw56DjM.js";import"./index-BlOq3dK1.js";import"./useSignature-ClOAemBi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BQRYh_4T.js";import"./suggest-list-Dz1MsIYD.js";import"./sections-Dm0mEk9W.js";import"./badge-CbfjHXMg.js";import"./undo-2-BAub6h7R.js";import"./DropdownMenu-D3gGWitE.js";import"./popover-menu-D1Ggz_nA.js";import"./ErrorState-Dzdw33-3.js";import"./mail-4EQRG36P.js";import"./download-D9_dvZ6g.js";import"./avatar-BV5vFJ_r.js";import"./EmptyState-5XJzmFAK.js";import"./calendar-suggestion-cOTOb7Lm.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./agenda-time-ACtN6wfF.js";import"./sparkles-rKmhB5Fk.js";import"./plus-BEkGxsOV.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-CNIMaOb7.js";import"./calendar-failure-note-A4rOKZNb.js";import"./checkbox-BlFhjoed.js";import"./clock-8nW9RI8K.js";import"./segmented-control-D_XxaVb8.js";import"./useLayoutTier-CIlJuePx.js";import"./menu-C3buEsRL.js";import"./useFilters-IsqJ-AEH.js";import"./select-CB3Efp6I.js";import"./folder-input-DjxVjldz.js";import"./confirm-dialog-BXhRj5Sm.js";import"./label-chip-BYIaT-tI.js";import"./cloud-off-BRk6zo1b.js";import"./refresh-cw-BDamTi58.js";import"./useRefreshControl-MOracVIf.js";import"./circle-check-big-BP7Pn5eb.js";import"./LabelApplyTrigger-CSWiFHCu.js";import"./useLabels-CrZtVj3Y.js";import"./NavMenuButton-CN3ovZVQ.js";import"./bottom-sheet-4tvR-sri.js";import"./circle-help-B083hm65.js";import"./circle-check-BUMxM7Pv.js";function ao(){return o.jsx(r.Reading,{})}export{ao as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-D94MOpo0.js";import{B as o}from"./BriefPane-mADSC2OK.js";import"./MessageToolbar-2VWnNBpw.js";import"./MessageBody-C2-SQjAb.js";import"./kbd-cd0_OQ1u.js";import"./search-scope-CdH_SY3a.js";import"./app-chrome-Dbvu4ieD.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./useMessageBodyContent-yhApp3IG.js";import"./roving-focus-CJC-AjPO.js";import"./chevron-down-UUw56DjM.js";import"./search-token-index-DXiN1835.js";import"./useQueries-CIIHHroC.js";import"./index-BlOq3dK1.js";import"./useSignature-ClOAemBi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BQRYh_4T.js";import"./suggest-list-Dz1MsIYD.js";import"./sections-Dm0mEk9W.js";import"./badge-CbfjHXMg.js";import"./undo-2-BAub6h7R.js";import"./DropdownMenu-D3gGWitE.js";import"./popover-menu-D1Ggz_nA.js";import"./ErrorState-Dzdw33-3.js";import"./mail-4EQRG36P.js";import"./download-D9_dvZ6g.js";import"./avatar-BV5vFJ_r.js";import"./EmptyState-5XJzmFAK.js";import"./calendar-suggestion-cOTOb7Lm.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./agenda-time-ACtN6wfF.js";import"./sparkles-rKmhB5Fk.js";import"./plus-BEkGxsOV.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-CNIMaOb7.js";import"./calendar-failure-note-A4rOKZNb.js";import"./checkbox-BlFhjoed.js";import"./clock-8nW9RI8K.js";import"./segmented-control-D_XxaVb8.js";import"./useLayoutTier-CIlJuePx.js";import"./menu-C3buEsRL.js";import"./useFilters-IsqJ-AEH.js";import"./select-CB3Efp6I.js";import"./folder-input-DjxVjldz.js";import"./confirm-dialog-BXhRj5Sm.js";import"./label-chip-BYIaT-tI.js";import"./cloud-off-BRk6zo1b.js";import"./LabelApplyTrigger-CSWiFHCu.js";import"./useLabels-CrZtVj3Y.js";import"./useRefreshControl-MOracVIf.js";import"./circle-check-big-BP7Pn5eb.js";import"./refresh-cw-BDamTi58.js";import"./wizard-selection-zWa1qc6-.js";function tr(){return r.jsx(o.Reading,{})}export{tr as component};
@@ -1 +0,0 @@
1
- import{eV as t,j as m}from"./index-D94MOpo0.js";import{C as p}from"./CalendarEventPopup-7lWwS7jN.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./ErrorState-Dzdw33-3.js";import"./useQueries-CIIHHroC.js";import"./useCalendarData-DQ7oi-nJ.js";import"./useCalendarTasks-BMPfFFau.js";import"./calendar-format-BwCpz-JZ.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./calendar-CNIMaOb7.js";import"./CalendarSession-CTmh2tcD.js";import"./calendar-event-popup-CYCnsOds.js";import"./pencil-Cr6xAk53.js";import"./calendar-guests-BXmTl5jL.js";import"./circle-help-B083hm65.js";import"./confirm-dialog-BXhRj5Sm.js";function P(){const{calendarObjectId:r,recurrenceId:o}=t.useParams();return m.jsx(p,{calendarObjectId:r,recurrenceId:o})}export{P as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-D94MOpo0.js";import{O as t}from"./OutboxPane-C7vPOisX.js";import"./MessageBody-C2-SQjAb.js";import"./kbd-cd0_OQ1u.js";import"./search-scope-CdH_SY3a.js";import"./app-chrome-Dbvu4ieD.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./useMessageBodyContent-yhApp3IG.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-CN3ovZVQ.js";import"./menu-C3buEsRL.js";import"./roving-focus-CJC-AjPO.js";import"./circle-check-big-BP7Pn5eb.js";import"./clock-8nW9RI8K.js";import"./row-actions-uPzTjymf.js";import"./rotate-ccw-Dxx7BcD7.js";function g(){return o.jsx(t.Reading,{})}export{g as component};
@@ -1 +0,0 @@
1
- import{r as f,j as e,al as h,B as b,T as y,u as N,aA as C,a as L,c as I,aC as D,d as S}from"./index-D94MOpo0.js";import{L as w,l as g}from"./label-chip-BYIaT-tI.js";import{S as v}from"./select-CB3Efp6I.js";import{a as $,b as E,c as k,u as R}from"./useLabels-CrZtVj3Y.js";import{S as T}from"./settings-screen-CF0fiL2l.js";import{E as j}from"./ErrorState-Dzdw33-3.js";import{C as O}from"./confirm-dialog-BXhRj5Sm.js";import"./chevron-down-UUw56DjM.js";import"./avatar-BV5vFJ_r.js";import"./badge-CbfjHXMg.js";import"./chevron-left-D5-k3mB7.js";import"./menu-C3buEsRL.js";import"./circle-help-B083hm65.js";function B({labels:i,onRename:l,onRecolor:n,onDelete:u,deletingLabelId:r}){const[m,o]=f.useState(),[c,d]=f.useState("");if(i.length===0)return e.jsx("p",{className:"py-6 text-sm text-fg-muted",children:"No labels yet. Create one below, then use it in a filter or apply it to mail directly."});const s=t=>{const a=c.trim();a!==""&&l(t,a),o(void 0)};return e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:i.map(t=>e.jsxs("li",{className:"flex items-center gap-3 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[m===t.labelId?e.jsx(h,{autoFocus:!0,value:c,onChange:a=>d(a.target.value),onBlur:()=>s(t.labelId),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),s(t.labelId)),a.key==="Escape"&&(a.preventDefault(),o(void 0))},"aria-label":`Rename label ${t.name}`}):e.jsx("button",{type:"button",onClick:()=>{o(t.labelId),d(t.name)},"aria-label":`Rename label ${t.name}`,className:"flex items-center gap-2 rounded-sm text-left hover:opacity-80",children:e.jsx(w,{label:t})}),e.jsx("p",{className:"mt-0.5 text-xs text-fg-subtle",children:t.filterCount===0?"Not used in any filter":`Used in ${t.filterCount} ${t.filterCount===1?"filter":"filters"}`})]}),e.jsx(v,{"aria-label":`Color for ${t.name}`,value:t.color,onChange:a=>n(t.labelId,a.target.value),className:"w-28 shrink-0",children:g.map(a=>e.jsx("option",{value:a,children:a},a))}),e.jsx(b,{variant:"ghost",size:"sm",icon:e.jsx(y,{className:"size-4 text-danger"}),onClick:()=>u(t),disabled:r===t.labelId,"aria-label":`Delete label ${t.name}`})]},t.labelId))})}const P=(i,l)=>{if(l===0)return{title:`Delete the "${i}" label?`};const n=l===1?"filter":"filters";return{title:`Delete the "${i}" label?`,description:`This also deletes ${l} ${n} that ${l===1?"applies":"apply"} it — they can't be recovered.`}},H=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Labels mark mail without moving it — a message can carry any number of them alongside whichever folder it lives in."}),e.jsx("p",{children:"Use a label in a filter's action to have new (and existing) mail label itself automatically, or apply one to a selection directly from the mailbox."}),e.jsx("p",{children:"Deleting a label removes it from every message, and deletes every filter that applies it — the confirmation names how many."})]});function A({accountId:i}){const{createLabel:l,isPending:n,isError:u}=R(i),[r,m]=f.useState(""),[o,c]=f.useState("Default"),d=()=>{const s=r.trim();s!==""&&l(s,o).then(()=>{m(""),c("Default")})};return e.jsxs("div",{className:"space-y-2 rounded-sm border border-line bg-surface p-3",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"New label"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Name"}),e.jsx(h,{value:r,onChange:s=>m(s.target.value),placeholder:"e.g. Receipts","aria-label":"Label name",onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),d())}})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Color"}),e.jsx(v,{value:o,onChange:s=>c(s.target.value),"aria-label":"Label color",className:"w-28",children:g.map(s=>e.jsx("option",{value:s,children:s},s))})]}),e.jsx(b,{variant:"primary",onClick:d,disabled:n||r.trim()==="",children:n?"Creating…":"Create label"})]}),u&&e.jsx(S,{tone:"danger",variant:"soft",children:"Couldn't create that label. Please try again."})]})}function U({account:i}){const l=i.accountId,{labels:n,isPending:u,isError:r,error:m,refetch:o}=$(l),{updateLabel:c}=E(l),{deleteLabel:d,deletingLabelId:s}=k(l),[t,a]=f.useState();return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:i.email}),u?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading labels for ${i.email}`}):r?e.jsx(j,{variant:"inline",title:`Couldn't load labels for ${i.email}`,error:m,onRetry:()=>{o()}}):e.jsx(B,{labels:n,onRename:(p,x)=>c(p,{name:x}),onRecolor:(p,x)=>c(p,{color:x}),onDelete:a,deletingLabelId:s}),e.jsx(A,{accountId:l}),t&&(()=>{const p=P(t.name,t.filterCount);return e.jsx(O,{isOpen:!0,title:p.title,description:p.description,confirmLabel:"Delete label",destructive:!0,isBusy:s===t.labelId,onConfirm:()=>{d(t.labelId),a(void 0)},onCancel:()=>a(void 0)})})()]})}function Z(){const i=N(),l=C(),[n,u]=f.useState(!0),{data:r,isPending:m,isError:o,error:c,refetch:d}=L(I()),s=t=>{const a=D[t];a&&i({to:a})};return e.jsx(T,{items:l,activeId:"labels",title:"Labels",description:"Mark mail without moving it, per account.",help:H,helpOpen:n,onToggleHelp:()=>u(t=>!t),onSelect:s,onBackToMail:()=>{i({to:"/mail"})},children:m?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):o?e.jsx(j,{title:"Couldn't load accounts",error:c,onRetry:()=>{d()}}):r.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:r.accounts.map(t=>e.jsx(U,{account:t},t.accountId))})})}export{Z as component};
@@ -1 +0,0 @@
1
- import{b as Me,j as e,r as p,n as Ee,o as Pe,D as Le,X as Te,p as I,C as Fe,S as oe,q as Q,t as re,v as ie,F as Ae,T as ze,w as De,M as _e,x as Be,y as Ke,I as Qe,B as E,z as le,E as qe,G as He,H as ce,e as B,J as ue,K as de,N as $e,P as Ve,Q as Ue,R as me,a as xe,U as We,V as Ge,W as z,Y as Ye,Z as Je,_ as Xe,$ as Ze,a0 as es,a1 as ss,a2 as ts,a3 as as,a4 as ns,u as os,c as rs,a5 as is,O as ls}from"./index-D94MOpo0.js";import{u as cs,l as O,a as D,m as q,b as us,c as ds,N as C,d as ms,e as xs,i as fs,f as ps}from"./reply-DPVLqPcI.js";import{A as hs,S as fe,a as gs,L as bs,b as vs,D as ys,c as js}from"./DesktopChrome-Bj6-FRYu.js";import{u as K,a as Ns}from"./useMessageBodyContent-yhApp3IG.js";import{P as Ss}from"./pencil-Cr6xAk53.js";import{c as Cs,s as Is,M as ws}from"./MailShell-DbZolZ7P.js";import{u as Os,a as ks,R as Rs,s as Ms,i as Es,H as Ps,M as Ls}from"./useRefreshControl-MOracVIf.js";import{K as Ts,B as Fs,S as As,u as zs,s as Ds,b as _s,a as Bs,c as Ks,d as Qs}from"./search-token-index-DXiN1835.js";import{u as qs}from"./sections-Dm0mEk9W.js";import{u as pe}from"./search-scope-CdH_SY3a.js";import{M as Hs}from"./menu-C3buEsRL.js";import{B as he,u as $s}from"./useResultFolderIndex-BjaX8bsI.js";import{A as Vs}from"./AccountSession-BYJ1unhC.js";import{u as ge}from"./useQueries-CIIHHroC.js";import{f as Us}from"./folder-failure-CqkVSsrb.js";import{i as Ws}from"./outbox-status-BlKn6P0x.js";import{u as Gs}from"./roving-focus-CJC-AjPO.js";import{C as Ys,A as Js}from"./account-service-status-C_MJ-o-p.js";import{S as Xs}from"./sparkles-rKmhB5Fk.js";import{C as H}from"./chevron-down-UUw56DjM.js";import{u as Zs}from"./index-BlOq3dK1.js";import{u as be,i as et}from"./useLayoutTier-CIlJuePx.js";import{u as st}from"./useDebouncedValue-BQRYh_4T.js";import{E as tt}from"./ErrorState-Dzdw33-3.js";import{K as $}from"./kbd-cd0_OQ1u.js";import"./useMediaQuery-CGZfUxdm.js";import"./avatar-BV5vFJ_r.js";import"./popover-menu-D1Ggz_nA.js";import"./mail-4EQRG36P.js";import"./app-chrome-Dbvu4ieD.js";import"./FullCompose-CppNsB88.js";import"./confirm-dialog-BXhRj5Sm.js";import"./circle-check-big-BP7Pn5eb.js";import"./refresh-cw-BDamTi58.js";import"./useSignature-ClOAemBi.js";import"./account-form-helpers-DhckT_PN.js";import"./suggest-list-Dz1MsIYD.js";const at=Me("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 nt({onCompose:s}){return e.jsx("button",{type:"button",onClick:s,"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(var(--app-tab-bar, 0px) + env(safe-area-inset-bottom, 0px) + 1rem)"},children:e.jsx(Ss,{className:"size-6"})})}const ot=({isOpen:s,onClose:t})=>{const a=p.useRef(null);return Ee({id:"shortcuts",open:s,answers:{back:t}}),Pe(a,s),s?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx(Le,{label:"Dismiss keyboard shortcuts",onDismiss:t,className:"backdrop-blur-sm"}),e.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",tabIndex:-1,className:I("relative z-10 max-h-[85vh] w-full max-w-2xl overflow-y-auto","rounded-lg border border-line bg-surface shadow-lg","p-6"),children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard shortcuts"}),e.jsx("button",{type:"button",onClick:t,className:"p-1 text-fg-muted transition-colors hover:text-fg","aria-label":"Close",children:e.jsx(Te,{className:"size-5"})})]}),e.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2",children:Ts.map(n=>e.jsxs("div",{children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-fg-muted",children:n.title}),e.jsx("div",{className:"space-y-2",children:n.hints.map(o=>e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-sm",children:o.description}),e.jsx("span",{className:"flex shrink-0 items-center gap-1",children:o.keys.map((r,c)=>e.jsxs(p.Fragment,{children:[c>0&&o.keys[0]==="g"&&e.jsx("span",{className:"text-2xs text-fg-subtle",children:"then"}),e.jsx($,{children:r})]},r))})]},`${o.action}-${o.keys.join("+")}`))})]},n.title))}),e.jsx("div",{className:"mt-6 border-t border-line pt-4",children:e.jsxs("p",{className:"text-center text-xs text-fg-muted",children:["Press ",e.jsx($,{children:"Esc"})," to close"]})})]})]}):null},rt="button:not([disabled]), a[href]",P="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface-sunken";function it({active:s,dimmed:t,indent:a}){return I("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors",P,a&&"pl-7",s?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg",t&&"opacity-55")}function lt({icon:s,label:t,count:a,active:n,failure:o}){return e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:I("shrink-0",n?"text-accent-2":"text-fg-subtle"),children:s}),e.jsx("span",{className:"flex-1 truncate",children:t}),o&&e.jsx(re,{className:"size-3.5 shrink-0 text-danger","aria-hidden":"true"}),a!=null&&a>0&&e.jsx("span",{className:I("text-2xs tabular-nums",n?"text-accent-2":"text-fg-subtle"),children:a})]})}function w({icon:s,label:t,count:a,active:n,dimmed:o,indent:r,navId:c,linkComponent:u,ariaLabel:x,title:d,failure:h,onClick:y}){const g=it({active:n,dimmed:o,indent:r}),l=e.jsx(lt,{icon:s,label:t,count:a,active:n,failure:h}),v=x??t,m=h?`${v} — ${h}`:v,f=h?`${d??t} — ${h}`:d;return c&&u?u({navId:c,className:g,ariaLabel:m,title:f,onClick:y,children:l}):e.jsx("button",{type:"button",onClick:y,className:g,"aria-label":h?m:x,title:f,children:l})}const V={inbox:0,flagged:1,drafts:2,sent:3,archive:4,all:5,junk:6,trash:7};function ct(s){switch(s){case"inbox":return e.jsx(Qe,{className:"size-4"});case"flagged":return e.jsx(oe,{className:"size-4"});case"drafts":return e.jsx(Ke,{className:"size-4"});case"sent":return e.jsx(ie,{className:"size-4"});case"archive":return e.jsx(Be,{className:"size-4"});case"all":return e.jsx(_e,{className:"size-4"});case"junk":return e.jsx(De,{className:"size-4"});case"trash":return e.jsx(ze,{className:"size-4"})}}const U=s=>s.role!=null,A=8,W="remit.nav.folders.open.",G="remit.nav.account.open.";function Y(s,t,a){if(typeof localStorage>"u")return a;const n=localStorage.getItem(s+t);return n===null?a:n!=="0"}function J(s,t,a){typeof localStorage>"u"||localStorage.setItem(s+t,a?"1":"0")}function ut({account:s,selectedNavId:t,onSelectNav:a,linkComponent:n}){const[o,r]=p.useState(()=>Y(G,s.id,!0)),[c,u]=p.useState(()=>Y(W,s.id,!0)),[x,d]=p.useState(!1),h=()=>{r(i=>{const j=!i;return J(G,s.id,j),j})},y=()=>{u(i=>{const j=!i;return J(W,s.id,j),j})},g=s.mailboxes.filter(U).sort((i,j)=>V[i.role]-V[j.role]),l=s.mailboxes.filter(i=>!U(i)),v=x||l.length<=A?l:l.slice(0,A),m=l.length-v.length,f=s.status??"ready",b=s.syncedServices!==void 0&&!s.syncedServices.includes("Mail"),N=f==="ready"&&g.length===0&&l.length===0;return e.jsxs("div",{className:"mt-3",children:[e.jsxs("button",{type:"button",onClick:h,"aria-expanded":o,className:I("flex w-full items-center gap-1.5 px-2 pb-1 text-left transition-colors hover:text-fg",P,s.muted&&"opacity-55"),children:[o?e.jsx(H,{className:"size-3 shrink-0 text-fg-subtle"}):e.jsx(Q,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:s.label}),s.muted&&e.jsxs(e.Fragment,{children:[e.jsx(Fs,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:"muted"})]}),b&&e.jsxs(e.Fragment,{children:[e.jsx(Ys,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:Js.Mail})]})]}),o&&e.jsxs(e.Fragment,{children:[f==="loading"&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"Loading…"}),f==="error"&&e.jsxs("div",{role:"alert",className:"mx-2 my-1 flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-2 py-1.5 text-sm",children:[e.jsx(re,{className:"mt-0.5 size-4 shrink-0 text-danger","aria-hidden":"true"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("p",{className:"font-medium text-danger",children:"Couldn't load mailboxes"})}),s.onRetry&&e.jsx("button",{type:"button",onClick:s.onRetry,className:"shrink-0 text-sm font-medium text-accent hover:underline",children:"Retry"})]}),N&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"No mailboxes"}),f==="ready"&&e.jsxs(e.Fragment,{children:[g.map(i=>e.jsx(w,{navId:i.id,linkComponent:n,icon:ct(i.role),label:i.name,ariaLabel:i.name,title:i.fullPath??i.name,failure:i.failure,count:i.unseen,active:t===i.id,dimmed:s.muted,onClick:()=>a?.(i.id)},i.id)),s.outboxPending!==void 0&&e.jsx(w,{navId:"outbox",linkComponent:n,icon:e.jsx(ie,{className:"size-4"}),label:"Outbox",ariaLabel:"Outbox",count:s.outboxPending>0?s.outboxPending:void 0,active:t==="outbox",dimmed:s.muted,onClick:()=>a?.("outbox")}),l.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:y,"aria-expanded":c,className:I("mt-1 flex w-full items-center gap-1 px-2 py-1 text-left text-2xs font-semibold uppercase tracking-wider text-fg-subtle transition-colors hover:text-fg",P),children:[c?e.jsx(H,{className:"size-3 shrink-0"}):e.jsx(Q,{className:"size-3 shrink-0"}),e.jsx("span",{className:"flex-1",children:"Folders"}),e.jsx("span",{className:"tabular-nums opacity-70",children:l.length})]}),c&&e.jsxs(e.Fragment,{children:[v.map(i=>e.jsx(w,{navId:i.id,linkComponent:n,icon:e.jsx(Ae,{className:"size-4"}),label:i.name,ariaLabel:i.name,title:i.fullPath??i.name,failure:i.failure,count:i.unseen,active:t===i.id,dimmed:s.muted,onClick:()=>a?.(i.id)},i.id)),(m>0||x)&&l.length>A&&e.jsx("button",{type:"button",onClick:()=>d(i=>!i),className:I("ml-7 flex items-center px-2 py-1 text-2xs font-medium text-accent transition-colors hover:underline",P),children:x?"Show less":`Show all (${l.length})`})]})]})]})]})]})}function dt({accounts:s,selectedNavId:t,briefUnseen:a,onSelectNav:n,variant:o="desktop",linkComponent:r,calendarNav:c="hidden"}){const u=p.useRef(null);Gs({containerRef:u,itemSelector:rt});const x=o==="drawer",d=e.jsxs("nav",{ref:x?u:void 0,className:x?"px-2 py-2":"flex-1 overflow-y-auto px-2 py-2","aria-label":"Mailboxes",children:[e.jsx(w,{navId:"brief",linkComponent:r,icon:e.jsx(Xs,{className:"size-4"}),label:"Daily brief",ariaLabel:"Daily brief",count:a,active:t==="brief",onClick:()=>n?.("brief")}),c==="shown"&&e.jsx(w,{navId:"calendar",linkComponent:r,icon:e.jsx(Fe,{className:"size-4"}),label:"Calendar",ariaLabel:"Calendar",active:t==="calendar",onClick:()=>n?.("calendar")}),e.jsx(w,{navId:"flagged",linkComponent:r,icon:e.jsx(oe,{className:"size-4"}),label:"Starred",ariaLabel:"Starred",active:t==="flagged",onClick:()=>n?.("flagged")}),s.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-sm text-fg-muted",children:"No accounts configured"}):s.map(h=>e.jsx(ut,{account:h,selectedNavId:t,onSelectNav:n,linkComponent:r},h.id))]});return x?d:e.jsx("aside",{ref:u,className:"flex h-full w-full flex-col bg-surface-sunken",children:d})}function mt(){const s=pe();if(!s)return null;const t=s.showNavPane?!s.navCollapsed:!1;return e.jsx(E,{variant:"ghost",size:"sm",icon:e.jsx(Hs,{className:"size-4"}),onClick:s.toggleNav,"aria-label":t?"Hide folders":"Show folders","aria-expanded":t,title:"Folders",className:"shrink-0"})}const xt={global:"Search all mail",pending:"Search mail",scoped:"Search this folder"};function ft({search:s,onCompose:t,onReportBug:a,onOpenSettings:n,settingsAttention:o,composeShortcut:r,refreshControl:c,account:u}){return e.jsx(hs,{leading:e.jsx(mt,{}),search:e.jsx(As,{value:s.value,onChange:s.onChange,onClear:s.onClear,onClearQuery:s.onClearQuery,chips:s.chips,onRemoveChip:s.onRemoveChip,placeholder:xt[s.scope]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(E,{variant:"ghost",size:"sm",icon:e.jsx(at,{className:"size-4"}),title:r?`Compose (${r})`:"Compose","aria-label":"Compose",onClick:t}),e.jsx(E,{variant:"ghost",size:"sm",icon:e.jsx(he,{className:"size-4"}),title:"Report a bug","aria-label":"Report a bug",onClick:a}),e.jsx(E,{variant:"ghost",size:"sm",icon:e.jsx(le,{label:o,children:e.jsx(fe,{className:"size-4"})}),title:"Settings","aria-label":o?`Settings — ${o}`:"Settings",onClick:n}),c,u]})})}function pt(){const{pathname:s}=cs(),t=qe({from:"/mail/$mailboxId",shouldThrow:!1});return O(s,"/settings")?"settings":O(s,"/calendar")?"calendar":O(s,"/mail/outbox")?"outbox":O(s,"/mail/flagged")?"flagged":O(s,"/mail/brief")?"brief":t?.mailboxId??""}function ht(){const s=He(),t=D({select:d=>q(d.location.pathname)}),a=D({select:d=>us(d.location.search)}),[n,o]=p.useState(a),r=st(n,200),[c,u]=p.useState(t);if(c!==t){const d=Is(c,t,a);u(t),d!==void 0&&o(d)}const x=p.useCallback(d=>{u(q(s.state.location.pathname)),o(d)},[s]);return{searchInput:n,committedQuery:Cs(n,r),viewKey:t,setSearchInput:x}}const gt=()=>{const s=K();return ds()?null:e.jsx(nt,{onCompose:s})};function X({accounts:s}){const{searchInput:t,onSearchChange:a,onSearchClear:n,onSearchClearQuery:o,resultFolderIndex:r}=ce(),c=B(),u=qs(),x=K(),{scope:d,clearScope:h}=zs(s),y=ue(),g=d.kind==="scoped"?[{id:d.chip.id,label:d.chip.label,tone:"scope"}]:void 0,l=p.useMemo(()=>s.map(N=>N.accountId),[s]),{hasNewMail:v}=Os(),{state:m,errorMessage:f,refresh:b}=ks(l,{onSettled:()=>$e(c,Ve(r.keys()))});return e.jsx(ft,{search:{value:t,scope:d.kind,chips:g,onChange:a,onClear:n,onClearQuery:o,onRemoveChip:h},onCompose:x,onReportBug:de,onOpenSettings:()=>u("accounts"),settingsAttention:y,composeShortcut:Ds("compose"),refreshControl:e.jsx(Rs,{state:m,onRefresh:b,label:"Refresh all accounts",errorMessage:f,hasUpdate:v(l)}),account:e.jsx(gs,{})})}function bt(){return e.jsxs("button",{type:"button",onClick:de,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg",children:[e.jsx(he,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Report a bug"})]})}const Z=s=>/^\d/.test(s),vt=(s,t)=>{const a=Z(s),n=Z(t);return a&&!n?-1:!a&&n?1:s.localeCompare(t,void 0,{sensitivity:"base",numeric:!0})};function yt(s,t,a){const n=[],o=[];for(const r of s)t.has(r.mailboxId)?n.push(r):o.push(r);return o.sort((r,c)=>vt(z(r,void 0,a),z(c,void 0,a))),{system:n,labels:o}}function jt(s,t,a){const n=Ye(t)&&s.unseenCount>0;return{id:s.mailboxId,name:z(s,t,a),unseen:n?s.unseenCount:void 0,role:t,fullPath:s.fullPath,failure:Us(s)}}function ee({accounts:s,onMailboxSelect:t,variant:a="desktop"}){const n=B(),o=pt(),{onSearchChange:r}=ce(),{t:c}=Ue("mail",{useSuspense:!1}),u=p.useCallback((m,f)=>c(m,{defaultValue:f}),[c]),x=ge({queries:s.map(m=>({...me({path:{accountId:m.accountId}}),staleTime:1/0}))}),{data:d}=xe(We()),h=p.useMemo(()=>(d?.items??[]).filter(m=>Ws(m.status)).length,[d?.items]),y=p.useMemo(()=>s.map((m,f)=>{const b=x[f],N=b?.data?.items??[],i=Ge(m.folderAppointments),{system:j,labels:L}=yt(N,i,u),T=b?.isError?"error":b?.isLoading?"loading":"ready";return{id:m.accountId,label:m.email,email:m.email,muted:!!m.muted,outboxPending:h,status:T,onRetry:()=>b?.refetch(),mailboxes:[...j,...L].map(k=>jt(k,i.get(k.mailboxId),u))}}),[s,x,h,u]),g=m=>{n.invalidateQueries({queryKey:Je({path:{mailboxId:m},query:{order:"desc"}})})},l=({navId:m,className:f,ariaLabel:b,title:N,children:i,onClick:j})=>m==="brief"?e.jsx(C,{to:"/mail/brief",search:{q:void 0},activeOptions:{includeSearch:!1},onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):m==="calendar"?e.jsx(C,{to:"/calendar",onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):m==="outbox"?e.jsx(C,{to:"/mail/outbox",search:{q:void 0},onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):m==="flagged"?e.jsx(C,{to:"/mail/flagged",search:{q:void 0},onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):m==="settings"?e.jsx(C,{to:"/settings/accounts",onClick:()=>j?.(),className:f,"aria-label":b,title:N,children:i}):e.jsx(C,{to:"/mail/$mailboxId",params:{mailboxId:m},search:{q:void 0},onClick:()=>{g(m),j?.()},className:f,"aria-label":b,title:N,children:i}),v=()=>{r(""),t?.()};return e.jsx(dt,{accounts:y,selectedNavId:o,onSelectNav:v,linkComponent:l,variant:a})}function Nt({accounts:s,onMailboxSelect:t}){const n=pe()?.showNavPane??!0,o=ue();return n?e.jsx(ee,{accounts:s}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(ee,{accounts:s,onMailboxSelect:t,variant:"drawer"})}),e.jsxs("div",{className:"border-t border-line px-2 py-2",children:[e.jsxs(C,{to:"/settings/accounts",onClick:t,children:[e.jsx(le,{label:o,children:e.jsx(fe,{className:"size-4 shrink-0"})}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Settings"})]}),e.jsx(bt,{}),e.jsx(Vs,{children:({signOut:r})=>e.jsxs("button",{type:"button",onClick:()=>{t?.(),r()},className:"flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg","data-testid":"sign-out-button",children:[e.jsx(bs,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Sign out"})]})})]})]})}function St(s){const t=ge({queries:s.map(a=>({...me({path:{accountId:a.accountId}}),staleTime:1/0}))});return p.useMemo(()=>_s(t.map(a=>a.data?.items??[])),[t])}const ve="remit:intelligence-open";function Ct(){try{return localStorage.getItem(ve)!=="closed"}catch{return!0}}function It(s){try{localStorage.setItem(ve,s?"open":"closed")}catch{}}function se({panels:s,prefersOpen:t,isDesktop:a,hasThread:n,raisedFor:o,openMessage:r}){if(o!==null&&o===r)return!0;const c=s.filter(u=>u!=="sidebar");return c.length>0?c.includes("intelligence"):a&&n&&t}const wt=()=>{const s=be(),t=ms(),a=xs(),n=t.find(fs),o=Bs(),[r,c]=p.useState(Ct),u=o?`${o.threadId}/${o.messageId??""}`:null,[x,d]=p.useState(null),h={panels:t,prefersOpen:r,isDesktop:s==="desktop",hasThread:o!==void 0,openMessage:u},y=se({...h,raisedFor:x}),g=se({...h,raisedFor:null}),l=p.useCallback((b,N)=>{a([...b?["intelligence"]:[],...N?[N]:[]])},[a]),v=p.useCallback(b=>{l(g,b)},[g,l]),m=p.useCallback(()=>{if(y&&!g){d(null);return}const b=!y;It(b),c(b),d(null),l(b,n)},[g,y,n,l]),f=p.useCallback(()=>{d(u)},[u]);return{openOverlay:n,intelligenceOpen:y,showOverlay:v,toggleIntelligence:m,raiseIntelligence:f}};var R={exports:{}},te;function Ot(){if(te)return R.exports;te=1;const s=(t,a,n)=>new Promise((o,r)=>{if(n=Object.assign({concurrency:1/0},n),typeof a!="function")throw new TypeError("Mapper function is required");const{concurrency:c}=n;if(!(typeof c=="number"&&c>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${c}\` (${typeof c})`);const u=[],x=t[Symbol.iterator]();let d=!1,h=!1,y=0,g=0;const l=()=>{if(d)return;const v=x.next(),m=g;if(g++,v.done){h=!0,y===0&&o(u);return}y++,Promise.resolve(v.value).then(f=>a(f,m)).then(f=>{u[m]=f,y--,l()},f=>{d=!0,r(f)})};for(let v=0;v<c&&(l(),!h);v++);});return R.exports=s,R.exports.default=s,R.exports}var kt=Ot();const Rt=Xe(kt),Mt=900*1e3,Et=30,Pt=(s,t)=>{if(!s)return t;const a=Number.parseInt(s,10);return Number.isFinite(a)&&a>0?a:t},Lt=30*1e3,Tt=s=>Math.max(Pt(s,Et)*1e3,Lt),ye=Tt(ns().mailboxPollIntervalSeconds),M=(s=Date.now(),t=ye)=>Es(s)?Math.min(Ps,t):t,Ft=5,_=new Set,At=(s,t,a=Mt)=>s.filter(n=>{const o=n.lastSyncAt;return o==null?!0:t-o>a}).map(n=>n.accountId),zt=(s,t,a=ye)=>s-t>=a,Dt=(s,t)=>s.filter(a=>!t.has(a)),ae=(s,t)=>{if(_.delete(s),ss(t)||ts(t,{softError:!0})){as(t,{softError:!0});return}console.warn("[remit] background mailbox sync failed",{accountId:s,error:t})},ne=(s,t)=>Ze({path:{accountId:s},throwOnError:!0}).then(()=>{t.invalidateQueries({queryKey:es({path:{accountId:s}})})}),_t=s=>{const t=B(),a=p.useRef(s);a.current=s;const n=s.map(o=>o.accountId).join(",");p.useEffect(()=>{const o=Date.now(),c=At(a.current,o).filter(u=>!_.has(u));if(c.length!==0)for(const u of c)_.add(u),ne(u,t).catch(x=>{ae(u,x)})},[n,t]),p.useEffect(()=>{let o=Date.now(),r;const c=new Set,u=()=>{o=Date.now();const g=Dt(a.current.map(l=>l.accountId),c);for(const l of g)c.add(l);Rt(g,l=>ne(l,t).catch(v=>{ae(l,v)}).finally(()=>{c.delete(l)}),{concurrency:Ft})},x=()=>{if(document.visibilityState==="visible"){u(),r=setTimeout(x,M());return}},d=()=>{if(document.visibilityState!=="visible")return;r!==void 0&&clearTimeout(r);const g=Date.now(),l=M(g);if(zt(g,o,l)){u(),r=setTimeout(x,l);return}r=setTimeout(x,o+l-g)},h=()=>{document.visibilityState==="visible"&&(r!==void 0&&clearTimeout(r),o=Date.now(),r=setTimeout(x,M()))};r=setTimeout(x,M()),document.addEventListener("visibilitychange",d);const y=Ms(h);return()=>{r!==void 0&&clearTimeout(r),document.removeEventListener("visibilitychange",d),y()}},[n,t])};function Sa(){const s=os(),t=be(),a=et(t),{openOverlay:n,intelligenceOpen:o,showOverlay:r,toggleIntelligence:c,raiseIntelligence:u}=wt(),x=n==="shortcuts",d=n==="nav",{searchInput:h,committedQuery:y,viewKey:g,setSearchInput:l}=ht(),{data:v,isLoading:m,isError:f,error:b,refetch:N}=xe({...rs(),staleTime:1/0}),i=!!(v&&(v.accounts?.length??0)===0);p.useEffect(()=>{i&&s({to:"/onboarding",replace:!0})},[i,s]),Zs({enabled:!x,bindings:[{key:"?",action:"help",handler:()=>r("shortcuts"),noModifiers:!1,preventDefault:!0}]});const j=K(),L=Ns(),T=D({select:F=>ps(F.matches)?.list==="mailbox"}),k=p.useMemo(()=>({compose:j}),[j]);Ks({enabled:!T&&!L,handlers:k});const je=p.useCallback(()=>{l("")},[l]),Ne=p.useCallback(()=>{l("")},[l]),S=v?.accounts??[],Se=p.useMemo(()=>S.map(F=>F.accountId),[S]),Ce=St(S),Ie=$s(S).index,we=p.useMemo(()=>Qs(S),[S]);_t(S);const Oe=p.useCallback(()=>{n==="nav"&&r(void 0)},[n,r]),ke={accounts:S,mailboxNameIndex:Ce,accountNameIndex:we,resultFolderIndex:Ie,searchQuery:y,searchInput:h,searchViewKey:g,onSearchChange:l,onSearchClear:je,onSearchClearQuery:Ne,intelligenceOpen:o,onToggleIntelligence:c,onRaiseIntelligence:u},Re={isSinglePane:a,isLoading:m||i,intelligenceOpen:o,nav:e.jsx(Nt,{accounts:S,onMailboxSelect:Oe}),topBar:a?void 0:e.jsx(X,{accounts:S}),appBar:t==="phone"?void 0:e.jsx(js,{}),overlay:a?e.jsx(gt,{}):void 0,navOpen:d,onOpenNav:()=>r("nav"),onCloseNav:()=>r(void 0)};return e.jsx(is.Provider,{value:ke,children:e.jsxs(Ls,{accountIds:Se,children:[e.jsx(vs,{children:f?e.jsx(ys,{topBar:e.jsx(X,{accounts:S}),children:e.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:e.jsx(tt,{title:"Couldn't load your account",error:b,onRetry:()=>{N()}})})}):e.jsx(ws,{chrome:Re,children:e.jsx(ls,{})})}),e.jsx(ot,{isOpen:x,onClose:()=>r(void 0)})]})})}export{Sa as component,ce as useMailContext};
@@ -1 +0,0 @@
1
- import{C as o}from"./CalendarEventEditor-C8_kOvZ3.js";import"./index-D94MOpo0.js";import"./draft-BIQ0-Lk_.js";import"./agenda-time-ACtN6wfF.js";import"./calendar-guests-BXmTl5jL.js";import"./calendar-event-popup-CYCnsOds.js";import"./useCalendarSuggestions-BfA31NJY.js";import"./ErrorState-Dzdw33-3.js";import"./useQueries-CIIHHroC.js";import"./pencil-Cr6xAk53.js";import"./circle-help-B083hm65.js";import"./useCalendarData-DQ7oi-nJ.js";import"./useCalendarTasks-BMPfFFau.js";import"./useCalendarScheduling-DAb_8yBj.js";import"./useDebouncedValue-BQRYh_4T.js";import"./calendar-format-BwCpz-JZ.js";import"./reply-DPVLqPcI.js";import"./useMediaQuery-CGZfUxdm.js";import"./calendar-CNIMaOb7.js";import"./CalendarQuickCreate-BG0qeW8s.js";import"./CalendarSession-CTmh2tcD.js";import"./calendar-event-sidebar-TTXLpS2C.js";import"./select-CB3Efp6I.js";import"./chevron-down-UUw56DjM.js";import"./confirm-dialog-BXhRj5Sm.js";const q=o;export{q as component};
@@ -1 +0,0 @@
1
- import{l as i,e as n,u as a,r as m,j as p}from"./index-D94MOpo0.js";import{O as s}from"./OnboardingWizard-CIAVrjJr.js";import{c}from"./onboarding-completion-BxKBJWb5.js";import"./credential-steps-B4j2Icsi.js";import"./select-CB3Efp6I.js";import"./chevron-down-UUw56DjM.js";import"./badge-CbfjHXMg.js";import"./card-f9A3um0u.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-4EQRG36P.js";import"./file-json-FJobBXk2.js";import"./kbd-cd0_OQ1u.js";import"./checkbox-BlFhjoed.js";function k(){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 p.jsx(s,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{e({to:"/import"})}})}export{k as component};
@@ -1 +0,0 @@
1
- import{j as o,O as i}from"./index-D94MOpo0.js";import{a as m}from"./MailShell-DbZolZ7P.js";import{u as p,O as t}from"./OutboxPane-C7vPOisX.js";import"./reply-DPVLqPcI.js";import{u as s}from"./search-mirror-C2_MRHKT.js";import"./useMessageBodyContent-yhApp3IG.js";import"./FullCompose-CppNsB88.js";import"./index-BlOq3dK1.js";import"./useSignature-ClOAemBi.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BQRYh_4T.js";import"./suggest-list-Dz1MsIYD.js";import"./sections-Dm0mEk9W.js";import"./useMediaQuery-CGZfUxdm.js";import"./chevron-down-UUw56DjM.js";import"./ErrorState-Dzdw33-3.js";import"./confirm-dialog-BXhRj5Sm.js";import"./search-scope-CdH_SY3a.js";import"./app-chrome-Dbvu4ieD.js";import"./MessageBody-C2-SQjAb.js";import"./kbd-cd0_OQ1u.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-CN3ovZVQ.js";import"./menu-C3buEsRL.js";import"./roving-focus-CJC-AjPO.js";import"./circle-check-big-BP7Pn5eb.js";import"./clock-8nW9RI8K.js";import"./row-actions-uPzTjymf.js";import"./rotate-ccw-Dxx7BcD7.js";function B(){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{B as component};
@@ -1 +0,0 @@
1
- import{b as D,e as I,f as O,bx as E,by as T,bz as A,bA as R,bB as F,bC as L,bD as z,bE as v,r as c,j as e,ay as k,B as m,X as M,am as U,bF as y,bG as B,an as H,bH as _,d as b,bI as G,bJ as C,bK as w,u as K,aA as Q,aC as W}from"./index-D94MOpo0.js";import{C as Y}from"./copy-cdXYXbA6.js";import{D as q,a as h,b as $}from"./DropdownMenu-D3gGWitE.js";import{S as J}from"./settings-screen-CF0fiL2l.js";import"./avatar-BV5vFJ_r.js";import"./badge-CbfjHXMg.js";import"./chevron-left-D5-k3mB7.js";import"./menu-C3buEsRL.js";import"./circle-help-B083hm65.js";const X=D("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),V=async({action:s,person:t},r)=>{const n={userId:t.userId};if(s==="SignOut"){const{data:a}=await F({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a,resetUrl:void 0}}if(s==="ResetPassword"){const{data:a}=await L({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a.person,resetUrl:a.resetUrl}}const{data:o}=await z({path:n,body:{status:s==="Disable"?"Disabled":"Active",stepUpToken:r},throwOnError:!0});return{person:o,resetUrl:void 0}},Z=s=>{const t=I();return O({meta:E,gcTime:0,mutationFn:async r=>{const{data:n}=await R({body:{password:s,action:r.action,userId:r.person.userId},throwOnError:!0});return V(r,n.stepUpToken)},onSuccess:({person:r})=>{t.setQueryData(T(),n=>n&&{people:A(n.people,r)})}})},ee="That is not your password. Try again.",se="Five wrong passwords in 15 minutes. Wait 15 minutes, then try again.";function te({action:s,person:t,onCancel:r,onDone:n,onFailed:o}){const a=v(s,t.email),[l,p]=c.useState(""),[u,x]=c.useState(null),i=Z(l),d=()=>{i.isPending||r()},P=f=>{f.preventDefault(),!(i.isPending||l==="")&&(x(null),i.mutate({action:s,person:t},{onSuccess:n,onError:g=>{const j=y(g);if(j.kind==="wrongPassword"){p(""),x(ee);return}if(j.kind==="locked"){p(""),x(se);return}if(j.kind==="signedOut"){r(),B();return}o(g)}}))};return e.jsx(k,{open:!0,onClose:d,title:a.title,children:e.jsxs("form",{onSubmit:P,children:[e.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[e.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:a.title}),e.jsx(m,{variant:"ghost",size:"sm",icon:e.jsx(M,{className:"size-3.5"}),onClick:d,"aria-label":"Close"})]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:a.body}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"people-step-up-password",className:"text-xs font-medium text-fg",children:"Your password"}),e.jsx(U,{id:"people-step-up-password",autoComplete:"current-password",value:l,onChange:f=>{p(f.target.value),x(null)},"aria-invalid":u!==null,"aria-describedby":"people-step-up-hint",required:!0}),e.jsx("p",{id:"people-step-up-hint",className:"text-xs",children:u?e.jsx("span",{className:"text-danger",role:"alert",children:u}):"Confirm with your own password. It counts for this one action."})]})]}),e.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[e.jsx(m,{variant:"secondary",size:"sm",onClick:d,children:"Cancel"}),e.jsx(m,{type:"submit",variant:a.destructive?"danger":"primary",size:"sm",disabled:l==="","aria-busy":i.isPending,children:a.confirmLabel})]})]})})}const ne=()=>{};function re({email:s,resetUrl:t,onDone:r}){const[n,o]=c.useState(!1),[a,l]=c.useState(!1),p=()=>{navigator.clipboard.writeText(t).then(()=>{l(!1),o(!0)}).catch(()=>l(!0))};return e.jsxs(k,{open:!0,onClose:ne,title:`Reset link for ${s}`,children:[e.jsxs("header",{className:"border-b border-line px-5 py-3 text-sm font-semibold text-fg",children:["Reset link for ",s]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:"They are signed out everywhere. Give them this link, by message or in person. It works once, for 24 hours."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx(m,{variant:"primary",size:"sm",icon:n?e.jsx(H,{className:"size-3.5"}):e.jsx(Y,{className:"size-3.5"}),onClick:p,children:n?"Copied":"Copy"}),e.jsx("input",{readOnly:!0,tabIndex:-1,value:t,"aria-label":`Reset link for ${s}`,onFocus:u=>u.currentTarget.select(),className:"min-w-0 flex-1 rounded-sm border border-line bg-surface px-2 py-1.5 font-mono text-xs text-fg sm:order-first"})]}),a&&e.jsx("p",{className:"text-xs text-danger",role:"alert",children:"Copying did not work in this browser. Select the link and copy it by hand."}),e.jsx("p",{children:"You see this link only now. Close this window and it is gone. Make a new one if it gets lost."})]}),e.jsx("footer",{className:"flex justify-end border-t border-line px-5 py-3",children:e.jsx(m,{variant:"secondary",size:"sm",onClick:r,children:"Done"})})]})}const N="The list of people did not load";function S({href:s}){return e.jsx("a",{href:s,target:"_blank",rel:"noreferrer",className:"font-medium text-accent hover:underline",children:"Report an issue"})}function ae({failure:s}){const t=c.useRef(null);return c.useEffect(()=>{t.current?.focus()},[]),e.jsx("div",{ref:t,tabIndex:-1,className:"outline-none",children:e.jsxs(b,{tone:"danger",children:[e.jsx("p",{className:"font-medium",children:s.title}),e.jsx("p",{className:"mt-1 text-fg-muted",children:s.reason}),e.jsx("p",{className:"mt-1",children:e.jsx(S,{href:C(s.title,s.error)})})]})})}function oe({person:s,onPick:t}){const r=s.status==="Disabled";return e.jsxs(q,{trigger:e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"size-4","aria-hidden":"true"}),e.jsxs("span",{className:"sr-only",children:["Actions for ",s.email]})]}),children:[e.jsx(h,{onClick:()=>t("SignOut"),children:"Sign out everywhere"}),e.jsx(h,{onClick:()=>t("ResetPassword"),children:"Reset password"}),e.jsx($,{}),r?e.jsx(h,{onClick:()=>t("Enable"),children:"Enable"}):e.jsx(h,{onClick:()=>t("Disable"),disabled:s.isCaller,destructive:!s.isCaller,children:e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{children:"Disable"}),s.isCaller&&e.jsx("span",{className:"text-xs text-fg-subtle",children:"Not your own account"})]})})]})}function ie({people:s,onPick:t}){const r=new Date;return e.jsx("div",{className:"overflow-x-auto rounded-sm border border-line bg-surface",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"border-b border-line text-xs text-fg-muted",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Email"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Created"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Last sign-in"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Sessions"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),e.jsx("th",{scope:"col",className:"w-12 px-1 py-2",children:e.jsx("span",{className:"sr-only",children:"Actions"})})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-line last:border-b-0",children:[e.jsxs("td",{className:"px-3 py-1 text-fg",children:[n.email,n.isCaller&&e.jsx("span",{className:"text-fg-muted",children:" (you)"})]}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.createdAt,r)}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.lastSignInAt,r)}),e.jsx("td",{className:"px-3 py-1 tabular-nums text-fg-muted",children:n.sessionCount}),e.jsx("td",{className:n.status==="Disabled"?"px-3 py-1 text-danger":"px-3 py-1 text-fg-muted",children:n.status}),e.jsx("td",{className:"px-1 py-1",children:e.jsx(oe,{person:n,onPick:o=>t(o,n)})})]},n.userId))})]})})}function le(){const s=_(),[t,r]=c.useState(null),[n,o]=c.useState(null),[a,l]=c.useState(null);if(s.isPending)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading people"});if(s.unavailable)return e.jsx(b,{tone:"info",children:"This server has no People page. It shows on a self-hosted server once self sign-up is turned off."});if(s.isError)return y(s.error).kind==="signedOut"?null:e.jsxs(b,{tone:"danger",children:[e.jsxs("p",{className:"font-medium",children:[N,"."]}),e.jsx("p",{className:"mt-1 text-fg-muted",children:G(s.error)}),e.jsxs("p",{className:"mt-2 flex items-center gap-3",children:[e.jsx(m,{variant:"secondary",size:"sm",onClick:()=>{s.refetch()},children:"Try again"}),e.jsx(S,{href:C(N,s.error)})]})]});const p=(i,d)=>{o(null),r({action:i,person:d})},u=i=>{i.resetUrl&&t&&l({email:t.person.email,resetUrl:i.resetUrl}),r(null)},x=i=>{if(!t)return;const d=y(i);o({title:v(t.action,t.person.email).failedTitle,reason:d.kind==="failed"?d.reason:"Something went wrong. Nothing changed. Try again.",error:i}),r(null)};return e.jsxs("div",{className:"space-y-4",children:[n&&e.jsx(ae,{failure:n}),e.jsx(ie,{people:s.data.people,onPick:p}),t&&e.jsx(te,{action:t.action,person:t.person,onCancel:()=>r(null),onDone:u,onFailed:x}),a&&e.jsx(re,{email:a.email,resetUrl:a.resetUrl,onDone:()=>l(null)})]})}const ce=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Anyone signed in here can manage every account. Each action asks for your own password first, and is recorded with who took it and from where."}),e.jsx("p",{children:"Disabling an account signs that person out within 15 minutes and stops their calendar feed links. Their mail stays. You cannot disable your own account, so one account always stays on."}),e.jsx("p",{children:"A reset link works once, for 24 hours, and is shown only once. Making one stops the old password at once."}),e.jsxs("p",{children:["The person who runs this server can turn all sign-in off with"," ",e.jsx("code",{children:"remit sign-in off"}),", and recover an account from the host with"," ",e.jsx("code",{children:"remit people enable"})," or ",e.jsx("code",{children:"remit people reset"}),"."]})]});function be(){const s=K(),t=Q(),[r,n]=c.useState(!0);return e.jsx(J,{items:t,activeId:"people",title:"People",description:"Everyone with an account on this server.",help:ce,helpOpen:r,onToggleHelp:()=>n(o=>!o),onSelect:o=>{const a=W[o];a&&s({to:a})},onBackToMail:()=>{s({to:"/mail"})},children:e.jsx(le,{})})}export{be as component};
@@ -1 +0,0 @@
1
- import{j as L,p as c,G as _,c2 as k,c3 as M,r as i,u as l,c4 as P,E as d,c5 as F,c6 as h,c7 as O}from"./index-D94MOpo0.js";import{u as j}from"./useMediaQuery-CGZfUxdm.js";const w="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface",G="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",U={nav:{base:c("flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors",w),rest:"text-fg-muted hover:bg-surface hover:text-fg",current:"bg-accent-2-soft font-medium text-accent-2"},row:{base:c("relative flex w-full items-start text-left transition-colors",G),rest:"hover:bg-surface-sunken",current:"bg-accent-2-soft"},inline:{base:c("rounded-sm underline-offset-2 transition-colors hover:underline",w),rest:"text-accent hover:text-accent-hover",current:"font-medium text-accent"}};function V(e){return e!==void 0&&e!==!1&&e!=="false"}function X({variant:e="nav",current:t,"aria-current":s,className:n,children:r,ref:o,...a}){const u=t??s,g=U[e];return L.jsx("a",{ref:o,"aria-current":u,className:c(g.base,V(u)?g.current:g.rest,n),...a,children:r})}function Y(e){const t=_({warn:e?.router===void 0}),s=e?.router||t;return k(s.stores.__store,M(e,s))}function T(e){const t=_();return k(t.stores.location,M(e,t))}const I=["intelligence","sidebar","nav","shortcuts"],q=["nav","shortcuts"],S=e=>q.includes(e);function ae(e,t){return[...e.filter(s=>!S(s)),...t?[t]:[]]}const K=P(I);function b(e){const t=new Set(e.split(",").map(s=>K.safeParse(s)).filter(s=>s.success).map(s=>s.data));return I.filter(s=>t.has(s))}function p(e){return I.filter(t=>e.includes(t)).join(",")}function ie(){const e=T({select:t=>p(b(t.hash))});return i.useMemo(()=>b(e),[e])}const W=(e,t)=>!S(e)&&t;function Q(e){return(t="")=>p(b(t).filter(s=>W(s,e)))}function f(){const e=j();return i.useMemo(()=>Q(e),[e])}function ue(){const e=l();return i.useCallback(t=>{e({search:!0,hash:p(t),replace:!0,hashScrollIntoView:!1})},[e])}const E="/mail/brief",D="/mail/$mailboxId",A="/mail/outbox",B="/mail/flagged";function z(e){for(const t of e){if(t.routeId===E)return{list:"brief"};if(t.routeId===B)return{list:"flagged"};if(t.routeId===A)return{list:"outbox"};if(t.routeId===D)return{list:"mailbox",mailboxId:t.params?.mailboxId}}}function le(e){const t=e.split(/[?#]/)[0].split("/").filter(Boolean);if(t[0]!=="mail")return"";const s=t[1];return s?s==="brief"?E:s==="flagged"?B:s==="outbox"?A:H(s):""}function ce(e){if(typeof e!="object"||e===null)return"";const{q:t}=e;return typeof t=="string"?t:""}function H(e){return`${D}:${e}`}function de(e,t){return e===t?!0:e.startsWith(`${t}/`)}function J(e){const t=e.split(/[?#]/)[0].split("/").filter(Boolean);return t[0]==="mail"&&t.length>2}function m(){const e=Y({select:n=>z(n.matches)?.list}),s=d({from:"/mail/$mailboxId",shouldThrow:!1})?.mailboxId;return i.useMemo(()=>({list:e,mailboxId:s}),[e,s])}function fe(){const{pathname:e}=T();return J(e)}function me(){const e=l(),t=f(),{list:s,mailboxId:n}=m();return i.useCallback(()=>{const r=a=>a,o=t;if(s==="flagged"){e({to:"/mail/flagged",search:r,hash:o});return}if(s==="outbox"){e({to:"/mail/outbox",search:r,hash:o});return}if(s==="mailbox"&&n){e({to:"/mail/$mailboxId",params:{mailboxId:n},search:r,hash:o});return}e({to:"/mail/brief",search:r,hash:o})},[e,t,s,n])}const Z=F(X);function ge({fragment:e,...t}){const s=f();return L.jsx(Z,{...t,hash:e??s})}const ee=["reply","reply-all","forward"],te=P(ee),x="/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}",v="/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}",y="/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}";function N(){const e=d({from:x,shouldThrow:!1}),t=d({from:v,shouldThrow:!1}),s=d({from:y,shouldThrow:!1});return e??t??s}function se(){const e=h({from:x,shouldThrow:!1}),t=h({from:v,shouldThrow:!1}),s=h({from:y,shouldThrow:!1});return(e??t??s)?.body}const R=e=>t=>e===void 0?O(t):{...O(t),body:e.body};function $(){const e=N(),t=se();return i.useMemo(()=>{if(!e)return;const s=te.safeParse(e.mode);return s.success?{kind:"reply",mode:s.data,threadId:e.threadId,sourceMessageId:e.messageId,outboxMessageId:e.outboxMessageId,seed:t===void 0?void 0:{body:t}}:{kind:"unknown",segment:e.mode}},[e,t])}function he(){return $()?.kind==="reply"}function C(e,t,s,n){return e==="flagged"?{to:v,params:{...s,outboxMessageId:n}}:e==="mailbox"&&t?{to:y,params:{...s,mailboxId:t,outboxMessageId:n}}:{to:x,params:{...s,outboxMessageId:n}}}function ne(e,t){if(e?.kind==="reply"&&e.threadId===t.threadId&&e.sourceMessageId===t.messageId)return e.outboxMessageId}function be(){const e=l(),t=f(),{list:s,mailboxId:n}=m(),r=$();return i.useCallback((o,a)=>{e({...C(s,n,o,a===void 0?ne(r,o):void 0),search:R(a),hash:t})},[e,t,s,n,r])}function Ie(e,t,s){if(!(!t||!s))return n=>e({threadId:t,messageId:s,mode:n})}function pe(){const e=l(),{list:t,mailboxId:s}=m(),n=$();return i.useCallback(r=>{n?.kind==="reply"&&e({...C(t,s,{threadId:n.threadId,messageId:n.sourceMessageId,mode:n.mode},r),search:R(void 0),hash:!0,replace:!0})},[e,t,s,n])}function xe(){const e=l(),t=f(),{list:s,mailboxId:n}=m(),r=N();return i.useCallback(()=>{if(!r)return;const o=R(void 0),a=t,u={threadId:r.threadId,messageId:r.messageId};if(s==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:u,search:o,hash:a});return}if(s==="mailbox"&&n){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{...u,mailboxId:n},search:o,hash:a});return}e({to:"/mail/brief/$threadId/$messageId",params:u,search:o,hash:a})},[e,t,s,n,r])}export{ge as N,Y as a,ce as b,fe as c,ie as d,ue as e,z as f,f as g,he as h,S as i,m as j,me as k,de as l,le as m,be as n,pe as o,ae as p,xe as q,Ie as r,$ as s,T as u};
@@ -1 +0,0 @@
1
- import{u as v,H as x,r as I}from"./index-D94MOpo0.js";import{a as p,b,h as g}from"./reply-DPVLqPcI.js";import{b as Q}from"./MailShell-DbZolZ7P.js";import{a as q}from"./useMessageBodyContent-yhApp3IG.js";function A(a){const t=v(),{searchInput:c,searchQuery:e}=x(),i=p({select:o=>b(o.location.search)}),u=p({select:o=>o.location.pathname}),h=q(),f=g(),m=h||f,{to:s}=a,r="params"in a?a.params.mailboxId:void 0,l=r?`/mail/${r}`:s;I.useEffect(()=>{if(!Q({searchInput:c,committedQuery:e,urlQuery:i,pathname:u,listPath:l}))return;const y=!!e&&i!==e&&!m,n=d=>({...d,q:e||void 0});if(!y){t({to:".",search:n,hash:!0,replace:!0});return}if(s==="/mail/$mailboxId"){if(!r)return;t({to:s,params:{mailboxId:r},search:n,hash:!0,replace:!0});return}t({to:s,search:n,hash:!0,replace:!0})},[c,e,i,t,s,r,l,u,m])}export{A as u};
@@ -1 +0,0 @@
1
- import{b as z,r as l,j as d,p as y,X as R,bO as G,cd as D,cr as X,cs as J,ct as W,cu as Y,E as k,u as j,Q as Z,R as M,V as ee,W as te,H as ne,cv as N}from"./index-D94MOpo0.js";import{g as re,j as I,k as se}from"./reply-DPVLqPcI.js";import{s as oe,S as ae}from"./search-scope-CdH_SY3a.js";import{u as K}from"./useQueries-CIIHHroC.js";const Ce=z("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]),ie=[{action:"focusNext",keys:["j","k"],label:"navigate"},{action:"muteSender",keys:["m"],label:"mute"},{action:"help",keys:["?"],label:"all shortcuts"}];function Se(e){return ie.filter(t=>e[t.action]!==void 0)}const ce=[{title:"Navigation",hints:[{action:"focusNext",keys:["j"],description:"Focus the message below"},{action:"focusPrevious",keys:["k"],description:"Focus the message above"},{action:"focusNext",keys:["↓"],description:"Focus the message below"},{action:"focusPrevious",keys:["↑"],description:"Focus the message above"},{action:"focusFirst",keys:["Home"],description:"Focus first"},{action:"focusLast",keys:["End"],description:"Focus last"},{action:"openFocused",keys:["Enter"],description:"Open focused thread"},{action:"back",keys:["Esc"],description:"Back / close overlay"}]},{title:"Selection",hints:[{action:"toggleSelect",keys:["x"],description:"Toggle select"},{action:"toggleSelect",keys:["Space"],description:"Toggle select"},{action:"extendSelectDown",keys:["Shift","j"],description:"Extend selection down"},{action:"extendSelectUp",keys:["Shift","k"],description:"Extend selection up"},{action:"extendSelectDown",keys:["Shift","↓"],description:"Extend selection down"},{action:"extendSelectUp",keys:["Shift","↑"],description:"Extend selection up"},{action:"selectAll",keys:["⌘","A"],description:"Select all"}]},{title:"Actions",hints:[{action:"reply",keys:["r"],description:"Reply"},{action:"replyAll",keys:["a"],description:"Reply all"},{action:"forward",keys:["f"],description:"Forward"},{action:"delete",keys:["#"],description:"Delete"},{action:"toggleStar",keys:["s"],description:"Star / unstar"},{action:"toggleRead",keys:["u"],description:"Toggle read / unread"}]},{title:"Sender",hints:[{action:"muteSender",keys:["m"],description:"Mute sender"},{action:"blockSender",keys:["b"],description:"Block sender"},{action:"vipSender",keys:["v"],description:"VIP sender"},{action:"markJunk",keys:["!"],description:"Mark junk"}]},{title:"Go to",hints:[{action:"goBrief",keys:["g","b"],description:"Daily brief"},{action:"goInbox",keys:["g","i"],description:"Inbox"},{action:"goSent",keys:["g","s"],description:"Sent"},{action:"goFlagged",keys:["g","f"],description:"Starred"},{action:"goSettings",keys:["g",","],description:"Settings"}]},{title:"View & global",hints:[{action:"toggleIntelligence",keys:["i"],description:"Toggle intelligence"},{action:"toggleDensity",keys:["d"],description:"Toggle density"},{action:"focusSearch",keys:["/"],description:"Focus search"},{action:"compose",keys:["c"],description:"Compose"},{action:"compose",keys:["⌘","N"],description:"Compose"},{action:"help",keys:["?"],description:"Shortcut help"}]}];function le(e){for(const t of ce){const n=t.hints.find(r=>r.action===e);if(n)return n.keys}}function ue(e){const t=le(e);return!t||t.length===0?"":t.length===1?t[0]??"":t[0]==="g"?t.join(" then "):t.join("")}function ve(e){const t=ue(e);return t===""?"":`(${t})`}function de({key:e,shiftKey:t=!1,repeat:n=!1,caretAtStart:r,hasValue:i,chipCount:s}){const a=s-1;return e==="Escape"?i?{type:"clearQuery"}:{type:"blur"}:e==="Tab"&&t?s===0?{type:"none"}:{type:"focusChip",index:a}:e==="Backspace"||e==="ArrowLeft"?!r||s===0?{type:"none"}:n?{type:"none"}:{type:"focusChip",index:a}:{type:"none"}}function fe({key:e,repeat:t=!1,index:n,chipCount:r}){return e==="Backspace"||e==="Delete"?t?{type:"none"}:{type:"removeChip",index:n}:e==="ArrowLeft"?n===0?{type:"none"}:{type:"focusChip",index:n-1}:e==="ArrowRight"?n>=r-1?{type:"focusInput"}:{type:"focusChip",index:n+1}:e==="Enter"||e===" "?{type:"activateChip",index:n}:e==="Escape"?{type:"focusInput"}:{type:"none"}}function pe(e,t){const n=t-1;return n<=0?null:e<n?e:n-1}const q={filter:"border-line bg-surface-sunken text-fg-muted",scope:"border-accent-2/40 bg-accent-2-soft text-accent-2"},me=({label:e,onRemove:t,tone:n="filter",className:r})=>d.jsxs("span",{className:y("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs",q[n],r),children:[d.jsx("span",{children:e}),d.jsx("button",{type:"button",onClick:t,className:"shrink-0 rounded-full p-0.5 hover:bg-fg-muted/20 transition-colors","aria-label":`Remove filter: ${e}`,children:d.jsx(R,{className:"size-3"})})]}),O=l.forwardRef(({label:e,onRemove:t,onActivate:n,tone:r="filter",focused:i=!1,onKeyDown:s,onFocusLabel:a,className:u},f)=>d.jsxs("span",{role:"row",tabIndex:-1,className:y("inline-flex max-w-48 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs transition-colors",q[r],i&&"ring-2 ring-ring",u),children:[d.jsx("button",{ref:f,type:"button",role:"gridcell",tabIndex:i?0:-1,onClick:n,onFocus:a,onKeyDown:s,className:y("block min-w-0 max-w-full truncate rounded-full outline-none",n?"cursor-pointer":"cursor-default"),children:e}),d.jsx("button",{type:"button",role:"gridcell",tabIndex:-1,onClick:t,className:"block shrink-0 rounded-full p-0.5 transition-colors hover:bg-fg-muted/20","aria-label":`Remove filter: ${e}`,children:d.jsx(R,{className:"size-3"})})]}));O.displayName="SearchChipRow";const Te=({tokens:e,className:t})=>e.length===0?null:d.jsx("div",{className:y("flex flex-wrap items-center gap-1.5 border-b border-line bg-surface px-row-inset py-1.5",t),children:e.map(n=>d.jsx(me,{label:n.label,onRemove:n.onRemove},n.label))}),he=e=>e instanceof HTMLElement?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable:!1,ge=({chips:e=[],onRemoveChip:t,value:n,onChange:r,onClear:i,onClearQuery:s,placeholder:a="Search mail...",globalFocusKey:u=!0,showClearButton:f=!0,size:h="sm",inputId:p,suggest:m,className:x})=>{const B=l.useId(),F=p??B,w=l.useRef(null),$=l.useRef([]),P=s??i,[A,C]=l.useState(null),v=l.useRef(void 0),[H,V]=l.useState(""),T=e.length>0;l.useEffect(()=>{C(o=>o!==null&&o>=e.length?null:o)},[e.length]),l.useEffect(()=>{const o=v.current;if(o!==void 0){if(v.current=void 0,o===null){w.current?.focus();return}$.current[o]?.focus()}});const L=l.useRef(void 0);l.useEffect(()=>{const o=m?.caret;if(!o||o===L.current)return;L.current=o;const c=w.current;!c||c.ownerDocument.activeElement!==c||(c.setSelectionRange(o.cursor,o.cursor),m?.onCaretChange(o.cursor))});const S=o=>{m?.onCaretChange(o.selectionStart??o.value.length)},g=l.useCallback(o=>{C(o),v.current=o},[]),E=l.useCallback(o=>{const c=e[o];c&&t&&(g(pe(o,e.length)),V(`${c.label} removed`),t(c.id))},[e,t,g]),U=l.useCallback(()=>{g(null),i()},[i,g]),Q=l.useCallback(o=>{const c=o.currentTarget;if(m?.onKeyDown(o))return;const b=de({key:o.key,shiftKey:o.shiftKey,repeat:o.repeat,caretAtStart:c.selectionStart===0&&c.selectionEnd===0,hasValue:n.length>0,chipCount:e.length});switch(b.type){case"focusChip":o.preventDefault(),g(b.index);return;case"clearQuery":P();return;case"blur":c.blur();return;case"none":return}},[e.length,n,P,g,m]),_=l.useCallback(o=>c=>{const b=fe({key:c.key,repeat:c.repeat,index:o,chipCount:e.length});switch(b.type!=="none"&&c.preventDefault(),b.type){case"removeChip":E(b.index);return;case"focusChip":g(b.index);return;case"focusInput":g(null);return;case"activateChip":return;case"none":return}},[e,E,g]);return l.useEffect(()=>{if(!u)return;const o=c=>{c.key!=="/"||c.metaKey||c.ctrlKey||c.altKey||he(c.target)||D("focusSearch")||(c.preventDefault(),w.current?.focus())};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[u]),d.jsxs("label",{htmlFor:F,className:y("flex w-full items-center gap-1.5 text-sm","bg-surface-sunken/50 border border-transparent","focus-within:bg-canvas focus-within:border-line focus-within:ring-2 focus-within:ring-ring","transition-colors",h==="lg"?"rounded-xl px-4 py-2":"rounded-md px-2.5 py-1",x),children:[d.jsx(G,{className:y("shrink-0 text-fg-muted pointer-events-none",h==="lg"?"size-5":"size-4")}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",children:[T&&d.jsx("div",{role:"grid","aria-label":"Search filters",className:"flex min-w-0 flex-wrap items-center gap-1",children:e.map((o,c)=>d.jsx(O,{ref:b=>{$.current[c]=b},label:o.label,tone:o.tone,focused:A===c,onFocusLabel:()=>C(c),onKeyDown:_(c),onRemove:()=>E(c)},o.id))}),d.jsx("input",{ref:w,id:F,name:"q",type:"text","aria-label":"Search mail",autoComplete:"off",value:n,tabIndex:A===null?0:-1,onChange:o=>{r(o.target.value),S(o.target)},onKeyDown:Q,onKeyUp:o=>S(o.currentTarget),onClick:o=>S(o.currentTarget),onFocus:o=>{C(null),m?.onFocusChange?.(!0),S(o.currentTarget)},onBlur:()=>m?.onFocusChange?.(!1),...m?.comboboxProps,placeholder:T?void 0:a,className:"min-w-24 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-muted"})]}),(n||T)&&f&&d.jsx("button",{type:"button",onClick:U,className:"shrink-0 rounded p-0.5 hover:bg-surface-raised transition-colors","aria-label":"Clear search",children:d.jsx(R,{className:y("text-fg-muted",h==="lg"?"size-5":"size-4")})}),d.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:H})]})},Ee=({value:e,onChange:t,onClear:n,onClearQuery:r,chips:i,onRemoveChip:s,placeholder:a="Search mail...",globalFocusKey:u=!0,showClearButton:f=!0,size:h,inputId:p,suggest:m,className:x})=>d.jsx(ge,{value:e,onChange:t,onClear:n,onClearQuery:r,chips:i,onRemoveChip:s,placeholder:a,globalFocusKey:u,showClearButton:f,size:h,inputId:p,suggest:m,className:x});function Ne({handlers:e,enabled:t=!0,target:n,sequenceTimeoutMs:r=1e3}){const i=l.useRef(e);i.current=e;const s=l.useRef(null),a=l.useRef(null);l.useEffect(()=>{if(!t)return;const u=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null)},f=p=>{const m=X({key:p.key,shiftKey:p.shiftKey,metaKey:p.metaKey,ctrlKey:p.ctrlKey,altKey:p.altKey,inEditable:W(p.target),onControl:J(p.target)},s.current);if(Y().length>0){u(),s.current=null;return}if(u(),s.current=m.nextPrefix,m.nextPrefix!==null&&(a.current=setTimeout(()=>{s.current=null,a.current=null},r)),m.action===null||D(m.action)!==null)return;const x=i.current[m.action];x&&(m.preventDefault&&p.preventDefault(),x())},h=n===void 0?window:n;if(h!==null)return h.addEventListener("keydown",f),()=>{h.removeEventListener("keydown",f),u(),s.current=null}},[t,r,n])}function Re(){const e=k({from:"/mail/brief/$threadId",shouldThrow:!1}),t=k({from:"/mail/brief/$threadId/$messageId",shouldThrow:!1}),n=k({from:"/mail/flagged/$threadId",shouldThrow:!1}),r=k({from:"/mail/flagged/$threadId/$messageId",shouldThrow:!1}),i=k({from:"/mail/$mailboxId/$threadId",shouldThrow:!1}),s=k({from:"/mail/$mailboxId/$threadId/$messageId",shouldThrow:!1}),a=e?.threadId??n?.threadId??i?.threadId,u=t?.messageId??r?.messageId??s?.messageId;return l.useMemo(()=>a?{threadId:a,messageId:u}:void 0,[a,u])}function je(){const e=j(),t=re(),{list:n,mailboxId:r}=I();return l.useCallback((i,s)=>{const a=s?.query,f={search:p=>a===void 0?p:{...p,q:a||void 0},hash:t,replace:s?.replace??!1};if(n==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:i,...f});return}const h=s?.mailboxId??r;if(n==="mailbox"&&h){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{mailboxId:h,...i},...f});return}e({to:"/mail/brief/$threadId/$messageId",params:i,...f})},[e,t,n,r])}function Me(){return se()}function be(){const e=j();return l.useCallback(t=>{e({to:"/mail/brief",search:{q:t||void 0}})},[e])}function Ke(){const e=j();return l.useCallback((t,n)=>{e({to:"/mail/$mailboxId",params:{mailboxId:t},search:{q:n||void 0}})},[e])}const ye=({accounts:e})=>{const{list:t,mailboxId:n}=I(),{t:r}=Z("mail",{useSuspense:!1}),i=l.useCallback((a,u)=>r(a,{defaultValue:u}),[r]),s=K({queries:e.map(a=>({...M({path:{accountId:a.accountId}}),staleTime:1/0}))});if(t==="outbox")return"Outbox";if(!n)return null;for(let a=0;a<e.length;a++){const u=s[a]?.data?.items;if(!u)continue;const f=u.find(p=>p.mailboxId===n);if(!f)continue;const h=ee(e[a].folderAppointments);return te(f,h.get(n),i)}return null},Fe=({accounts:e})=>{const{mailboxId:t}=I(),n=K({queries:e.map(r=>({...M({path:{accountId:r.accountId}}),staleTime:1/0}))});if(!t)return null;for(const r of n){const i=r.data?.items;if(!i)continue;const s=i.find(a=>a.mailboxId===t);if(s)return s.unseenCount}return null},$e=({accounts:e})=>{const{mailboxId:t}=I(),n=K({queries:e.map(r=>({...M({path:{accountId:r.accountId}}),staleTime:1/0}))});if(!t)return 0;for(const r of n){const i=r.data?.items;if(!i)continue;const s=i.find(a=>a.mailboxId===t);if(s)return s.messageCount}return 0};function Pe(e){const t=be(),{searchInput:n}=ne(),r=ye({accounts:e}),i=I(),s=l.useMemo(()=>oe(i,r),[i,r]),a=l.useCallback(u=>{u===ae&&t(n)},[t,n]);return{scope:s,clearScope:a}}function Ae(e){const t=new Map;for(const n of e){const r=n.email.toLowerCase(),i=r.split("@")[0];i&&!t.has(i)&&t.set(i,n.accountId),t.has(r)||t.set(r,n.accountId)}return t}function Le(e){const t=new Map;for(const n of e)for(const r of n){const i=r.fullPath?.toLowerCase();if(!i)continue;const s=N(r).toLowerCase();t.has(i)||t.set(i,r.mailboxId),t.has(s)||t.set(s,r.mailboxId)}return t}function De(e,t=[]){const n=e.flat().filter(s=>s.fullPath),r=new Map;for(const s of n){const a=N(s).toLowerCase();r.set(a,(r.get(a)??0)+1)}const i=new Map(t.map(s=>[s.accountId,s.email]));return n.map(s=>{const a=N(s),u=r.get(a.toLowerCase())===1,f=t.length>1?i.get(s.accountId):void 0;return{value:u?a:s.fullPath,label:s.displayNameOverride?.trim()||a,...f?{hint:f}:{}}})}function qe(e){const t=new Map;for(const n of e){const r=n.email.toLowerCase().split("@")[0]??"";t.set(r,(t.get(r)??0)+1)}return e.map(n=>{const r=n.email.split("@")[0]??n.email,i=t.get(r.toLowerCase())===1,s=n.displayName?.trim();return{value:i?r:n.email,label:s||n.email,...s?{hint:n.email}:{}}})}export{Ce as B,ce as K,Ee as S,Re as a,Le as b,Ne as c,Ae as d,je as e,Me as f,ye as g,Fe as h,$e as i,ie as j,Se as k,Te as l,De as m,qe as n,Ke as o,ue as s,ve as t,Pe as u};
@@ -1 +0,0 @@
1
- import{u as e,r as o}from"./index-D94MOpo0.js";const a={brief:"/mail/brief",flagged:"/mail/flagged",outbox:"/mail/outbox",settings:"/settings",accounts:"/settings/accounts",security:"/settings/security",importConfig:"/import"};function n(){const t=e();return o.useCallback(s=>{t({to:a[s]})},[t])}function c(){const t=e();return o.useCallback(s=>{t({to:"/settings/accounts",search:{editAccountId:s,focusSmtp:!0}})},[t])}export{c as a,n as u};
@@ -1 +0,0 @@
1
- import{u as c,aA as p,r as m,j as e,aC as l}from"./index-D94MOpo0.js";import{A as u}from"./AccountSession-BYJ1unhC.js";import{s as d}from"./help-copy-YhaxQEIY.js";import{S as h}from"./settings-screen-CF0fiL2l.js";import"./kbd-cd0_OQ1u.js";import"./avatar-BV5vFJ_r.js";import"./badge-CbfjHXMg.js";import"./chevron-left-D5-k3mB7.js";import"./menu-C3buEsRL.js";import"./circle-help-B083hm65.js";function A(){const s=c(),a=p(),[i,n]=m.useState(!0),r=t=>{const o=l[t];o&&s({to:o})};return e.jsx(h,{items:a,activeId:"security",title:"Security",description:"Protect your account with a second step and passkeys.",help:d,helpOpen:i,onToggleHelp:()=>n(t=>!t),onSelect:r,onBackToMail:()=>{s({to:"/mail"})},children:e.jsx("div",{className:"space-y-3 text-sm text-fg-muted",children:e.jsx(u,{children:({securityUrl:t})=>t?e.jsx("a",{href:t,className:"font-medium text-accent hover:underline",children:"Manage two-factor authentication and passkeys"}):null})})})}export{A as component};
@@ -1 +0,0 @@
1
- import{j as e,p as S,e as I,r as c,bL as A,a as C,f as k,bM as P,bN as L,B as w,X as O,u as $,aA as q,al as M,bO as Q,aC as R,bP as D,bQ as T,S as B}from"./index-D94MOpo0.js";import{u as G}from"./useDebouncedValue-BQRYh_4T.js";import{d as K}from"./help-copy-YhaxQEIY.js";import{K as y}from"./kbd-cd0_OQ1u.js";import{E}from"./ErrorState-Dzdw33-3.js";import{a as V,S as F}from"./settings-screen-CF0fiL2l.js";import"./avatar-BV5vFJ_r.js";import"./badge-CbfjHXMg.js";import"./chevron-left-D5-k3mB7.js";import"./menu-C3buEsRL.js";import"./circle-help-B083hm65.js";function H({options:t,active:m,onSelect:r}){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(i=>{const l=i.id===m;return e.jsxs("button",{type:"button",role:"tab","aria-selected":l,onClick:()=>r(i.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",l?"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:i.label}),e.jsx("span",{className:S("text-2xs tabular-nums",l?"text-accent-2":"text-fg-subtle"),children:i.count??"—"})]},i.id)})})}const j={vip:"VIPs",muted:"Muted",blocked:"Blocked"};function _({query:t,onCount:m}){const{data:r,isPending:i,isError:l,error:f}=C(D()),b=I(),d=k({...P(),onSettled:()=>{b.invalidateQueries({queryKey:T()})}}),o=r?.suggestions??[],p=t.trim().toLowerCase(),u=p?o.filter(a=>(a.displayName??"").toLowerCase().includes(p)||a.normalizedEmail.toLowerCase().includes(p)):o;return c.useEffect(()=>{m?.(u.length,o.length)},[m,u.length,o.length]),i?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Loading VIP suggestions…"}):l?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(E,{variant:"inline",title:"Couldn't load VIP suggestions",error:f})}):o.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(y,{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(V,{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(w,{variant:"ghost",size:"sm",icon:e.jsx(B,{className:"size-3.5"}),"aria-busy":d.isPending,onClick:()=>{d.isPending||d.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:m,onCount:r}){const i=G(m.trim(),300),l=I(),[f,b]=c.useState(null),d=i.length>=2,o=A({query:{q:i,limit:50}}),{data:p,isPending:u,isError:a,error:N}=C({...o,enabled:d}),x=k({...P(),onSuccess:()=>{l.invalidateQueries({queryKey:o.queryKey})}}),g=(p?.items??[]).filter(n=>t==="muted"?n.flags?.muted?.value??!1:n.flags?.blocked?.value??!1);return c.useEffect(()=>{r?.(d?g.length:0,null)},[r,d,g.length]),d?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(E,{variant:"inline",title:"Search failed",error:N})}):g.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No ",j[t].toLowerCase()," senders matching “",i,"”."]}):e.jsx(e.Fragment,{children:g.map(n=>{const s=t==="muted"?n.flags?.muted:n.flags?.blocked,h=s?[`${t}`,s.setAt&&L(s.setAt,{month:"short",year:"numeric"})||null,s.reason?`— ${s.reason}`:null].filter(Boolean).join(" "):t,v=x.isPending&&x.variables?.path.addressId===n.addressId,z=x.isError&&f===n.addressId;return e.jsx(V,{name:n.displayName??n.normalizedEmail,email:n.normalizedEmail,danger:t==="blocked",meta:h,trailing:z?e.jsx(w,{variant:"secondary",size:"sm",onClick:()=>{b(n.addressId),x.mutate({path:{addressId:n.addressId},body:{flags:{[t]:{value:!1,setAt:Date.now()}}}})},children:"Retry"}):e.jsx(w,{variant:"ghost",size:"sm",icon:e.jsx(O,{className:"size-3.5"}),"aria-busy":v,"aria-label":`Remove ${t} flag`,onClick:()=>{v||(b(n.addressId),x.mutate({path:{addressId:n.addressId},body:{flags:{[t]:{value:!1,setAt:Date.now()}}}}))}})},n.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 ",j[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(y,{children:"m"})," on any message to mute its sender; ",e.jsx(y,{children:"b"})," to block."]})]})}function ie(){const t=$(),m=q(),[r,i]=c.useState("vip"),[l,f]=c.useState(""),[b,d]=c.useState(!0),[o,p]=c.useState(0),[u,a]=c.useState({vip:0,muted:null,blocked:null}),N=c.useCallback((s,h)=>{p(s),a(v=>({...v,vip:h}))},[]),x=c.useCallback((s,h)=>{p(s),a(v=>({...v,[r]:s}))},[r]),g=u[r],n=s=>{const h=R[s];h&&t({to:h})};return e.jsx(F,{items:m,activeId:"senders",title:"Senders & Rules",description:"Per-sender preferences — set with one key from any message, managed here.",flush:!0,help:K,helpOpen:b,onToggleHelp:()=>d(s=>!s),onSelect:n,onBackToMail:()=>{t({to:"/mail"})},children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[e.jsx(H,{active:r,onSelect:s=>{i(s),f("")},options:["vip","muted","blocked"].map(s=>({id:s,label:j[s],count:u[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(M,{icon:e.jsx(Q,{className:"size-4"}),placeholder:`Filter ${j[r].toLowerCase()} by name or address`,className:"h-8 max-w-sm",value:l,onChange:s=>f(s.target.value)})}),e.jsx("div",{className:"min-h-0 flex-1 divide-y divide-line overflow-y-auto",children:r==="vip"?e.jsx(_,{query:l,onCount:N}):e.jsx(U,{group:r,query:l,onCount:x})}),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:g!=null?`${o} of ${g} flagged senders`:`${o} flagged senders`}),e.jsxs("span",{children:[e.jsx(y,{children:"j"})," ",e.jsx(y,{children:"k"})," navigate · ",e.jsx(y,{children:"⌫"})," remove flag"]})]})]})]})})}export{U as SearchGroupPane,ie as component};
@@ -1 +0,0 @@
1
- import{a7 as n,j as t,O as e,r as a}from"./index-D94MOpo0.js";const r=a.createContext(void 0),i=()=>{const{Account:o}=n();return t.jsx(o,{fallback:t.jsx(r.Provider,{value:void 0,children:t.jsx(e,{})}),children:({securityUrl:s})=>t.jsx(r.Provider,{value:s,children:t.jsx(e,{})})})};export{i as component};
@@ -1 +0,0 @@
1
- import{j as i,X as Z,p as O,ee as R,eg as $,ef as v,r as u,bZ as E}from"./index-D94MOpo0.js";import{b as S,n as F,f as h,o as L,t as W,U as j,y as z,l as k,k as B,p as H}from"./useCalendarSuggestions-BfA31NJY.js";import{e as w,p as U,a as _}from"./draft-BIQ0-Lk_.js";import{f as P}from"./calendar-format-BwCpz-JZ.js";import{t as M}from"./agenda-time-ACtN6wfF.js";import{a as V}from"./CalendarSession-CTmh2tcD.js";import{C as G}from"./calendar-failure-note-A4rOKZNb.js";import{E as X,C as Y}from"./EmptyState-5XJzmFAK.js";import{C as q}from"./calendar-event-sidebar-TTXLpS2C.js";import"./reply-DPVLqPcI.js";import{k as J,b as K}from"./calendar-CNIMaOb7.js";import"./ErrorState-Dzdw33-3.js";import"./useQueries-CIIHHroC.js";import"./calendar-guests-BXmTl5jL.js";import"./calendar-event-popup-CYCnsOds.js";import"./pencil-Cr6xAk53.js";import"./circle-help-B083hm65.js";import"./select-CB3Efp6I.js";import"./chevron-down-UUw56DjM.js";import"./useMediaQuery-CGZfUxdm.js";function I({title:e,subtitle:a,onClose:r,children:s,className:o}){return i.jsxs("section",{className:O("flex h-full w-full flex-col bg-surface",o),children:[i.jsxs("header",{className:"flex h-pane-header shrink-0 items-center gap-2 border-b border-line px-row-inset",children:[i.jsx("h2",{className:"shrink-0 text-xs font-medium text-fg",children:e}),a!==void 0&&a!==""&&i.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-fg-muted",children:a}),i.jsx("button",{type:"button","aria-label":"Close editor",onClick:r,className:"ml-auto flex size-7 shrink-0 items-center justify-center rounded-md text-fg-subtle outline-none hover:bg-surface-sunken hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",children:i.jsx(Z,{className:"size-4"})})]}),i.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-row-inset py-5",children:i.jsx("div",{className:"mx-auto w-full max-w-2xl",children:s})})]})}function Q(e,a,r){const s={title:e.summary,location:e.location};if(e.allDay){const t=e.dtStart.slice(0,10),c=e.dtEnd.slice(0,10);return{...w(t,a),...s,allDay:!0,startTime:"",endDate:c>t?R(c,-1):t,endTime:""}}const o=t=>e.zoneCertainty==="Ambiguous"?t:$(t,r),l=o(e.dtStart),d=o(e.dtEnd);return{...w(l.slice(0,10),a),...s,startTime:l.slice(11,16),endDate:d.slice(0,10),endTime:d.slice(11,16)}}function ee(e,a,r,s){const o=U(a,r,s);if(!o.ok)return o;const d=e.zoneCertainty==="Ambiguous"||o.patch.start!==void 0?{...o.patch,..._(r,s.clock),allDay:r.allDay,timeZone:s.anchor}:o.patch;return{ok:!0,input:{calendarId:r.calendarId,event:d}}}const te=[],ae={from:"",to:""};function ne(e,a=""){const{timeZoneByCalendarId:r}=S(),s=e.date!==""&&!e.allDay&&e.endDate!==""&&e.startTime!==""&&e.endTime!==""&&`${e.endDate}T${e.endTime}`>`${e.date}T${e.startTime}`,{instances:o,isLoading:l,error:d}=F({...s?{from:v("week",e.date).from,to:v("week",e.endDate).to}:ae,calendarIds:te,enabled:s}),t=h();return u.useMemo(()=>{if(!s||l||d)return;const c=E(e.date,e.startTime,t),p=E(e.endDate,e.endTime,t),f=o.filter(m=>L(m)&&m.calendarObjectId!==a).map(m=>W(m,r[m.calendarId]??j,t));return M({start:c,end:p},f).map(m=>({id:m.id,label:`${m.title}, ${P(m)}`}))},[s,l,d,e.date,e.endDate,e.startTime,e.endTime,t,o,a,r])}const y="Add from mail",se="The invitation named a time zone nothing could resolve. The time below is as the mail wrote it — check it before adding.";function oe({suggestionId:e,onClose:a}){const{suggestion:r,isLoading:s,error:o}=z(e),l=r??void 0,[d,t]=u.useState(void 0);l!==void 0&&d===void 0&&t(l);const c=d??l;if(c!==void 0)return i.jsx(ie,{suggestion:c,onClose:a},c.suggestionId);if(o!==null){const p="Couldn't read what your mail is waiting on.";return i.jsx(I,{title:y,onClose:a,children:i.jsx(G,{text:`${p} Close this and try again.`,reportHref:k(p),className:"m-row-inset"})})}return i.jsx(I,{title:y,onClose:a,children:i.jsx(X,{message:s?"Reading the suggestion…":"This suggestion is no longer waiting on you. It was answered, or a later message replaced it."})})}function ie({suggestion:e,onClose:a}){const{calendars:r,defaultCalendarId:s,timeZoneByCalendarId:o}=S(),l=r.filter(n=>!n.readOnly),d=B(),[t]=u.useState(()=>Q(e,"",h())),[c,p]=u.useState(t),f=V()?.dispatch;u.useEffect(()=>{f?.({type:"sidebar-range",range:{date:t.date,endDate:t.endDate,startTime:t.allDay?"":t.startTime,endTime:t.allDay?"":t.endTime,allDay:t.allDay}})},[t,f]);const[m,D]=u.useState(""),[N,A]=u.useState(),x=ne(c),g=l.some(n=>n.id===s)?s:l[0]?.id??"";u.useEffect(()=>{g!==""&&p(n=>n.calendarId===""?{...n,calendarId:g}:n)},[g]);const C=()=>{const n=ee(e,t,c,{clock:h(),anchor:H(o[c.calendarId]??j)});if(!n.ok){D(n.problem);return}D(""),d.acceptEdited(e.suggestionId,n.input).then(b=>{if(b.kind==="answered"){a();return}const T=`Couldn't add this to your calendar: ${b.message}`;A({text:T,reportHref:k(T),onRetry:C})})};return i.jsx(q,{heading:y,draft:c,onChange:n=>{p(n),f?.({type:"sidebar-range",range:{date:n.date,endDate:n.endDate,startTime:n.allDay?"":n.startTime,endTime:n.allDay?"":n.endTime,allDay:n.allDay}})},calendars:l,calendarEditable:!0,repeatEditable:!1,timeZone:h(),timeZones:[h()],onTimeZone:()=>{},busy:!0,onBusy:()=>{},onSave:C,onCancel:a,saving:d.isAnswering,saveLabel:"Add",failure:N,problem:m!==""?m:e.zoneCertainty==="Ambiguous"?se:"",children:x&&i.jsx(Y,{clashes:x})})}function Se(){const e=J(),{closeToView:a}=K();return e===void 0?null:i.jsx(oe,{suggestionId:e,onClose:a})}export{Se as component};
@@ -1 +0,0 @@
1
- import{b as w,r as d,j as e,T as R,X as E,p as z,C as $,eg as B,bZ as L,eU as q}from"./index-D94MOpo0.js";import{b as Z,f as F,c as P}from"./useCalendarSuggestions-BfA31NJY.js";import{b as V,C as j,u as H}from"./useCalendarTasks-BMPfFFau.js";import"./reply-DPVLqPcI.js";import{b as S}from"./calendar-CNIMaOb7.js";import{C as K}from"./CalendarLoadFailed-DNV1DlXi.js";import{C as M}from"./calendar-event-popup-CYCnsOds.js";import"./ErrorState-Dzdw33-3.js";import"./useQueries-CIIHHroC.js";import"./useMediaQuery-CGZfUxdm.js";import"./pencil-Cr6xAk53.js";const A=w("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const O=w("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),D="flex size-9 items-center justify-center rounded-full text-fg-muted outline-none hover:bg-surface-sunken hover:text-fg focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40",v="h-9 w-full rounded-md border border-line bg-surface-sunken px-2 text-sm text-fg outline-none focus-visible:ring-2 focus-visible:ring-ring/30";function U({headingId:t,headingRef:i,fields:l,dueText:r,listName:u,completed:c,onToggle:f,onSave:x,onDelete:g,onClose:p,busy:m=!1,failure:h}){const[s,o]=d.useState(null);return e.jsxs("div",{className:"flex flex-col gap-3 p-3",children:[e.jsxs("div",{className:"flex justify-end gap-1",children:[s===null&&e.jsx("button",{type:"button",onClick:()=>o(l),className:"rounded-md px-3 text-sm font-medium text-accent hover:bg-accent-soft focus-visible:ring-2 focus-visible:ring-ring",children:"Edit"}),e.jsx("button",{type:"button","aria-label":"Delete",onClick:g,disabled:m,className:D,children:e.jsx(R,{className:"size-4"})}),e.jsx("button",{type:"button","aria-label":"Close",onClick:p,className:D,children:e.jsx(E,{className:"size-4"})})]}),s===null?e.jsxs("div",{className:"flex flex-col gap-2 px-2",children:[e.jsx("h2",{id:t,ref:i,tabIndex:-1,className:z("text-xl font-normal break-words text-fg outline-none",c&&"text-fg-muted line-through"),children:l.title===""?"(No title)":l.title}),e.jsx("p",{className:"text-sm text-fg-muted",children:r}),e.jsxs("p",{className:"flex items-center gap-2 text-sm",children:[e.jsx($,{className:"size-4 text-fg-subtle","aria-label":"List"}),u]}),l.description!==""&&e.jsx("p",{className:"text-sm whitespace-pre-wrap break-words",children:l.description})]}):e.jsxs("form",{className:"flex flex-col gap-2 px-2",onSubmit:n=>{n.preventDefault(),x(s),o(null)},children:[e.jsx("h2",{id:t,className:"sr-only",children:"Edit task"}),e.jsx("input",{"aria-label":"Title",value:s.title,onChange:n=>o({...s,title:n.target.value}),className:v}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{type:"date","aria-label":"Due date",value:s.dueDate,onChange:n=>n.target.value!==""&&o({...s,dueDate:n.target.value}),className:v}),e.jsx("input",{type:"time","aria-label":"Due time",value:s.dueTime,onChange:n=>o({...s,dueTime:n.target.value}),className:v})]}),e.jsx("textarea",{"aria-label":"Description",rows:3,value:s.description,onChange:n=>o({...s,description:n.target.value}),className:"w-full rounded-md border border-line bg-surface-sunken px-2 py-1 text-sm"}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>o(null),className:"h-9 rounded-md border border-line px-3 text-sm font-medium",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:m,className:"h-9 rounded-md bg-accent px-4 text-sm font-medium text-accent-fg disabled:opacity-50",children:"Save"})]})]}),h&&e.jsx(M,{failure:h}),s===null&&e.jsx("div",{className:"flex justify-end px-2",children:e.jsxs("button",{type:"button",onClick:f,disabled:m,className:"inline-flex h-9 items-center gap-2 rounded-md border border-line px-3 text-sm font-medium hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",children:[c?e.jsx(O,{className:"size-4","aria-hidden":"true"}):e.jsx(A,{className:"size-4","aria-hidden":"true"}),c?"Mark not done":"Mark done"]})})]})}const W=(t,i)=>{const l=new Date(`${t.slice(0,10)}T00:00:00Z`),r=new Intl.DateTimeFormat(void 0,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"}).format(l);return i?`Due ${r}`:`Due ${r} · ${t.slice(11,16)}`};function X({calendarTaskId:t}){const i=V(t),{closeToView:l}=S(),r=d.useId(),u=d.useRef(null),c=i.kind==="gone";return d.useEffect(()=>{c&&u.current?.focus()},[c]),i.kind==="loading"?null:i.kind==="found"?e.jsx(G,{task:i.task}):i.kind==="failed"?e.jsx(j,{anchor:null,anchorKey:"failed",labelledBy:r,children:e.jsx("div",{id:r,className:"p-4",children:e.jsx(K,{title:"Couldn't open this task",error:i.error,onRetry:i.retry,compact:!0})})}):e.jsx(j,{anchor:null,anchorKey:"gone",labelledBy:r,children:e.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[e.jsx("h2",{id:r,className:"text-base font-medium text-fg",children:"This task was deleted or moved"}),e.jsx("button",{ref:u,type:"button",onClick:l,className:"self-end rounded-md border border-line px-3 py-1.5 text-sm font-medium hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",children:"Close"})]})})}function G({task:t}){const{taskLists:i}=Z(),{closeToView:l}=S(),{updateTask:r,deleteTask:u,isWriting:c}=H(),f=d.useId(),x=d.useRef(null),[g,p]=d.useState(),[m,h]=d.useState(null),{calendarTaskId:s}=t;d.useLayoutEffect(()=>{h(document.querySelector(`[data-task-id="${CSS.escape(s)}"]`))},[s]),d.useEffect(()=>{x.current?.focus()},[]);const o=F(),n=t.allDay?t.due:B(t.due,o),I={title:t.summary,dueDate:n.slice(0,10),dueTime:t.allDay?"":n.slice(11,16),description:t.description},b=a=>N=>{if(N.kind==="written"){p(void 0);return}const T=`Couldn't save the task: ${N.message}`;p({text:T,reportHref:P(T),onRetry:a})},y=()=>{r(t,{completed:!t.completed}).then(b(y))},C=a=>{r(t,{summary:a.title,description:a.description,allDay:a.dueTime==="",due:a.dueTime===""?a.dueDate:L(a.dueDate,a.dueTime,o)}).then(b(()=>C(a)))},k=()=>{u(t).then(a=>{if(a.kind==="written"){l();return}b(k)(a)})};return e.jsx(j,{anchor:m,anchorKey:`${s}:${m?"chip":"none"}`,labelledBy:f,children:e.jsx(U,{headingId:f,headingRef:x,fields:I,dueText:W(n,t.allDay),listName:i.find(a=>a.id===t.calendarId)?.name??"Tasks",completed:t.completed,onToggle:y,onSave:C,onDelete:k,onClose:l,busy:c,failure:g})})}function re(){const{calendarTaskId:t}=q.useParams();return e.jsx(X,{calendarTaskId:t})}export{re as component};
@@ -1 +0,0 @@
1
- import{e as m,ah as y,a as b,c as L,r as c,f as w,ai as S,k as E,h as k}from"./index-D94MOpo0.js";var u={en:1199414,"en-GB":1199758,nl:3180464},g=["en","en-GB","nl"];const h=()=>typeof g>"u"?[]:g,M=()=>{const e="/spellcheck/de99b00dc30674fd/";return typeof document>"u"?e:new URL(e,document.baseURI).href},_=e=>typeof u>"u"?0:u[e]??0,O=(e,n=h())=>{const t=e.toLowerCase(),a=n.find(i=>i.toLowerCase()===t);if(a)return a;const o=t.split("-")[0];return n.find(i=>i.toLowerCase().split("-")[0]===o)??null},T=[{tag:"ar",detectionCode:"arb"},{tag:"az",detectionCode:"azj"},{tag:"be",detectionCode:"bel"},{tag:"bg",detectionCode:"bul"},{tag:"bs",detectionCode:"bos"},{tag:"cs",detectionCode:"ces"},{tag:"de",detectionCode:"deu"},{tag:"en",detectionCode:"eng"},{tag:"es",detectionCode:"spa"},{tag:"fa",detectionCode:"pes"},{tag:"fr",detectionCode:"fra"},{tag:"ha",detectionCode:"hau"},{tag:"hi",detectionCode:"hin"},{tag:"hr",detectionCode:"hrv"},{tag:"hu",detectionCode:"hun"},{tag:"id",detectionCode:"ind"},{tag:"ig",detectionCode:"ibo"},{tag:"it",detectionCode:"ita"},{tag:"jv",detectionCode:"jav"},{tag:"kk",detectionCode:"kaz"},{tag:"mr",detectionCode:"mar"},{tag:"ms",detectionCode:"zlm"},{tag:"ne",detectionCode:"npi"},{tag:"nl",detectionCode:"nld"},{tag:"pl",detectionCode:"pol"},{tag:"ps",detectionCode:"pbu"},{tag:"pt",detectionCode:"por"},{tag:"ro",detectionCode:"ron"},{tag:"ru",detectionCode:"rus"},{tag:"so",detectionCode:"som"},{tag:"sr",detectionCode:"srp"},{tag:"su",detectionCode:"sun"},{tag:"sv",detectionCode:"swe"},{tag:"sw",detectionCode:"swh"},{tag:"tl",detectionCode:"tgl"},{tag:"tr",detectionCode:"tur"},{tag:"uk",detectionCode:"ukr"},{tag:"ur",detectionCode:"urd"},{tag:"vi",detectionCode:"vie"},{tag:"yo",detectionCode:"yor"},{tag:"zu",detectionCode:"zul"}],d=e=>(e.split("-")[0]??"").toLowerCase(),v=new Map(T.map(e=>[e.tag,e])),x=e=>v.get(d(e))?.detectionCode??null,P=/^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i,G=e=>d(e).toUpperCase(),H=e=>{if(!P.test(e))return e;const t=new Intl.DisplayNames([e],{type:"language",fallback:"none"}).of(e);return t?t.charAt(0).toLocaleUpperCase(e)+t.slice(1):e},z=(e,n=h())=>{const t=[...e,...n].filter(o=>x(o)!==null),a=[...new Set(t.map(d))];return a.includes("en")||a.push("en"),a},N=e=>/iPhone|iPad|iPod/.test(e)?"On iPhone and iPad the keyboard decides this. Add the language under Settings, then General, then Keyboard.":/Edg\//.test(e)?"Edge checks every language you add under Settings, then Languages. Adding one there checks it alongside the others.":/Firefox\//.test(e)?"Firefox uses this setting. Right-click the message to add a dictionary for it.":/Chrome\/|Chromium\//.test(e)?"Chrome checks every language you add under Settings, then Languages. Adding one there checks it alongside the others.":/Safari\//.test(e)?"macOS decides this under Keyboard, then Text Input, then Spelling. Automatic by Language covers every language enabled there.":"Your browser decides which dictionaries it checks. Add this language in its own language settings to have it spellchecked.",C=e=>new DOMParser().parseFromString(e,"text/html"),p=e=>{const n=[...e.children];if(n.length!==1)return null;const t=n[0];return t?[...e.childNodes].some(o=>o!==t&&(o.textContent??"").trim()!=="")?null:t:null},R=(e,n)=>{if(e==="")return"";const t=C(e),a=p(t.body);if(a?.tagName==="DIV"&&a.hasAttribute("lang"))return a.setAttribute("lang",n),t.body.innerHTML;const o=t.createElement("div");for(o.setAttribute("lang",n);t.body.firstChild;)o.append(t.body.firstChild);return t.body.append(o),t.body.innerHTML},U=e=>{if(e==="")return{html:e,language:null};const n=C(e),t=p(n.body);return t?.tagName!=="DIV"||!t.hasAttribute("lang")?{html:e,language:null}:{html:t.innerHTML,language:t.getAttribute("lang")}},l={html:"",plainText:""},B=e=>{const n=m(),{pushError:t}=y(),{data:a}=b({...L(),staleTime:1/0}),o=c.useMemo(()=>{if(!e||!a)return l;const s=a.accounts.find(r=>r.accountId===e);return s?{html:s.signatureHtml??"",plainText:s.signaturePlainText??""}:l},[e,a]),i=w({...k(),onSuccess:()=>{n.invalidateQueries({queryKey:E()})},onError:s=>{t(S("Couldn't save signature","The signature wasn't saved.",s))}}),f=c.useCallback((s,r)=>{e&&i.mutate({path:{accountId:e},body:{signatureHtml:s,signaturePlainText:r}})},[e,i]);return{signature:o,setSignature:f,isSaving:i.isPending}};export{T as C,U as a,G as b,N as c,z as d,x as e,O as f,_ as g,H as l,d as p,M as s,B as u,R as w};