@remit/web-client-dist 0.0.695 → 0.0.696

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 (203) hide show
  1. package/assets/{BriefPane-BJLNB-w7.js → BriefPane-DqAium13.js} +1 -1
  2. package/assets/{CalendarEventEditor-MMNLFvjJ.js → CalendarEventEditor-53hot8oY.js} +1 -1
  3. package/assets/{CalendarEventPopup-DVJ9DC_Y.js → CalendarEventPopup-BBlKWgkP.js} +1 -1
  4. package/assets/{CalendarLoadFailed-uHGxFBGx.js → CalendarLoadFailed-D9O_t7aS.js} +1 -1
  5. package/assets/{CalendarQuickCreate-CzJ4lehP.js → CalendarQuickCreate-B39DWHxB.js} +1 -1
  6. package/assets/{CalendarSession-BVuy8A2H.js → CalendarSession-CjGsYSn3.js} +1 -1
  7. package/assets/CollectionPane-DH6KjfeW.js +1 -0
  8. package/assets/{DesktopChrome-Ct-IB4ks.js → DesktopChrome-DrLXNfAF.js} +1 -1
  9. package/assets/{DropdownMenu-CTCHgh4X.js → DropdownMenu-CgMO6e8h.js} +1 -1
  10. package/assets/{EmptyState-CN-AyHj-.js → EmptyState-FjON9Ve2.js} +1 -1
  11. package/assets/{ErrorState-Bk3DwNvd.js → ErrorState-DHsQU1XS.js} +1 -1
  12. package/assets/{FullCompose-BWiLy3Vm.js → FullCompose-karPPSLh.js} +1 -1
  13. package/assets/{LabelApplyTrigger-52QGuTLD.js → LabelApplyTrigger-BLIxuWTi.js} +1 -1
  14. package/assets/{MailShell-DAqGpnce.js → MailShell-jW6JmRUB.js} +1 -1
  15. package/assets/MailViewChrome-By52WjOW.js +1 -0
  16. package/assets/{MailboxPane-DUI-sxQF.js → MailboxPane-dO1WtQIE.js} +2 -2
  17. package/assets/{MessageBody-BeciCqb_.js → MessageBody-bibpHbC1.js} +2 -2
  18. package/assets/{MessageToolbar-BYhqv9RG.js → MessageToolbar-BK8iddsy.js} +1 -1
  19. package/assets/{NavMenuButton-A6v6v8tE.js → NavMenuButton-DMqlg3at.js} +1 -1
  20. package/assets/{OnboardingWizard-CIneAccs.js → OnboardingWizard-BVm-45mM.js} +1 -1
  21. package/assets/{OutboxPane-InUnHiNC.js → OutboxPane-BwIG-6n1.js} +1 -1
  22. package/assets/{ReportLink-q8WFRQli.js → ReportLink-DbjCeZ9_.js} +1 -1
  23. package/assets/_calendarObjectId-DcrqQ1pT.js +1 -0
  24. package/assets/_labelId-B-uoAJUi.js +1 -0
  25. package/assets/_mailboxId-B_BsU1d4.js +1 -0
  26. package/assets/_messageId-BBhFHooJ.js +1 -0
  27. package/assets/_messageId-BC4E5AdD.js +1 -0
  28. package/assets/_messageId-BFceTya0.js +1 -0
  29. package/assets/_messageId-CaLvmUYl.js +1 -0
  30. package/assets/_outboxMessageId-D3RH7suq.js +1 -0
  31. package/assets/_recurrenceId-BmFnTbJZ.js +1 -0
  32. package/assets/{_slotId-Cf-NASLE.js → _slotId-ipxsVzxt.js} +1 -1
  33. package/assets/_threadId-BdAvQAKq.js +1 -0
  34. package/assets/_threadId-Ok6MuUb2.js +1 -0
  35. package/assets/_threadId-PwztExmU.js +1 -0
  36. package/assets/_threadId-oAltpOkl.js +1 -0
  37. package/assets/{_view._date-dARprXsM.js → _view._date-kxLdB_iw.js} +1 -1
  38. package/assets/{account-service-status-DexPoUiT.js → account-service-status-jau7OHM-.js} +1 -1
  39. package/assets/{accounts-DPvTdrTr.js → accounts-Dv0XYTrh.js} +1 -1
  40. package/assets/{advanced-CDr_JOXg.js → advanced-Co1jIx2-.js} +1 -1
  41. package/assets/{agenda-time-BcOiQ5_R.js → agenda-time--0lz2pGX.js} +1 -1
  42. package/assets/{app-chrome-6ZXmy5H4.js → app-chrome-BtWv1mrl.js} +1 -1
  43. package/assets/{appearance-BQZnBlkc.js → appearance-CIaVIf5W.js} +1 -1
  44. package/assets/{avatar-B_QEsxCw.js → avatar-BLhNXW-W.js} +1 -1
  45. package/assets/{badge-CeCxCmzS.js → badge-CoJzTE5F.js} +1 -1
  46. package/assets/{bottom-sheet-DWqGf7I3.js → bottom-sheet-BSnl2giv.js} +1 -1
  47. package/assets/{brief-B7EfkUB4.js → brief-BIpUj9JN.js} +1 -1
  48. package/assets/brief-E24hWVP8.js +1 -0
  49. package/assets/{calendar-DxjT7IrR.js → calendar-B4zVNn1v.js} +1 -1
  50. package/assets/{calendar-CJGXdypt.js → calendar-BRsmtlld.js} +1 -1
  51. package/assets/{calendar-event-popup-y4Z860B0.js → calendar-event-popup-DsOb1y1u.js} +1 -1
  52. package/assets/{calendar-event-sidebar-BaAGgT2x.js → calendar-event-sidebar-Bi4U7yon.js} +1 -1
  53. package/assets/{calendar-failure-note-CJvPzX2o.js → calendar-failure-note-DlpRkxBL.js} +1 -1
  54. package/assets/{calendar-guests-DeRthr7k.js → calendar-guests-BQoxXEOG.js} +1 -1
  55. package/assets/{calendar-suggestion-BulekNHV.js → calendar-suggestion-CJMwfDpf.js} +1 -1
  56. package/assets/{calendars-D-Use38B.js → calendars-0hXvo4Yo.js} +1 -1
  57. package/assets/{card-0Dzt3Scs.js → card-CAuqZLKK.js} +1 -1
  58. package/assets/{checkbox-DIKh2-eX.js → checkbox-ImKY_DpK.js} +1 -1
  59. package/assets/{chevron-down-BnC2m4J6.js → chevron-down-CHMH78GK.js} +1 -1
  60. package/assets/{chevron-left-CNQ3caMn.js → chevron-left-Brxnh-p_.js} +1 -1
  61. package/assets/{circle-check-CTlM3FQo.js → circle-check-bdTVfKb7.js} +1 -1
  62. package/assets/{circle-check-big-DCVJA_H0.js → circle-check-big-D7T0Fr-Y.js} +1 -1
  63. package/assets/{circle-question-mark-CpApZe3H.js → circle-question-mark-BJ-7TUgf.js} +1 -1
  64. package/assets/{classification-C7_2tIfb.js → classification-IsZmGA3c.js} +1 -1
  65. package/assets/{clock-CTlZVcLb.js → clock-CcJSq9G-.js} +1 -1
  66. package/assets/{cloud-off-CtJJ9OTh.js → cloud-off-KCT2nWKe.js} +1 -1
  67. package/assets/compose._-_outboxMessageId_-5h4Thyui.js +1 -0
  68. package/assets/compose._-_outboxMessageId_-CG67dlL2.js +1 -0
  69. package/assets/compose._-_outboxMessageId_-Dm_l3weH.js +1 -0
  70. package/assets/compose._-_outboxMessageId_-TYmtS11N.js +1 -0
  71. package/assets/compose._-_outboxMessageId_-wdQo3fol.js +1 -0
  72. package/assets/{config-import-CHZ9oJuF.js → config-import-CDPSmiwE.js} +1 -1
  73. package/assets/{confirm-dialog-Cc446-7C.js → confirm-dialog-Nw9MwHVJ.js} +1 -1
  74. package/assets/{copy-jXKvwaUz.js → copy-CBfiykpW.js} +1 -1
  75. package/assets/{credential-steps-yT5IXLY8.js → credential-steps-DijGQsa7.js} +1 -1
  76. package/assets/{download-CyhaY4zL.js → download-BGcYYhWw.js} +1 -1
  77. package/assets/{draft-C1ufEqDz.js → draft-BIlfX99J.js} +1 -1
  78. package/assets/edit-DPWo7v-f.js +1 -0
  79. package/assets/edit-DZEKnuQ0.js +1 -0
  80. package/assets/{external-link-1TiTglgB.js → external-link-D7g7AAZP.js} +1 -1
  81. package/assets/{file-braces-CXZUVCry.js → file-braces-GrxXAr-8.js} +1 -1
  82. package/assets/{filters-CR0iG1ow.js → filters-DfUsL7bX.js} +1 -1
  83. package/assets/{flagged-DuEE_WUV.js → flagged-B833_7J0.js} +1 -1
  84. package/assets/flagged-zsMPG8wt.js +1 -0
  85. package/assets/{folder-input-kcvJkrLj.js → folder-input-uYHmZSIB.js} +1 -1
  86. package/assets/{folders-6mmHeM8E.js → folders-B2KHLLXQ.js} +1 -1
  87. package/assets/{help-copy-CIhcXCo3.js → help-copy-DWTmr8ZJ.js} +1 -1
  88. package/assets/{import-76KXkdMq.js → import-S0-kKNSZ.js} +1 -1
  89. package/assets/{index-yeSesYv-.js → index-9QMShYZC.js} +35 -35
  90. package/assets/index-BBhFHooJ.js +1 -0
  91. package/assets/index-BC4E5AdD.js +1 -0
  92. package/assets/{index-iXcp-mGT.js → index-Baytk5ez.js} +4 -4
  93. package/assets/index-BeYdWLSr.js +1 -0
  94. package/assets/index-BlWjdYaS.js +1 -0
  95. package/assets/index-CgyMBBs4.js +1 -0
  96. package/assets/index-D2U9KSTT.js +1 -0
  97. package/assets/index-DB540_Zp.js +1 -0
  98. package/assets/index-DX3L0os1.js +1 -0
  99. package/assets/index-DwKXH-XS.js +1 -0
  100. package/assets/index-dE8tDfaV.js +1 -0
  101. package/assets/index-gg1vreMW.js +1 -0
  102. package/assets/index-opRNV15g.js +1 -0
  103. package/assets/{kbd-BVK8yKhS.js → kbd-BD-ER_Yv.js} +1 -1
  104. package/assets/{label-chip-CrQMhpJe.js → label-chip-D6mHiJlY.js} +1 -1
  105. package/assets/{labels-CaXUAL8B.js → labels-SmD1KE3F.js} +1 -1
  106. package/assets/mail-AiBxTd_5.js +1 -0
  107. package/assets/{mail-CLkdzm71.js → mail-DZhnB5_L.js} +1 -1
  108. package/assets/{menu-Cn2tY52U.js → menu-BQAGsNoE.js} +1 -1
  109. package/assets/{nav-link-BvlYCbp-.js → nav-link-BaRr8ufx.js} +1 -1
  110. package/assets/new-CBzvvAzX.js +1 -0
  111. package/assets/onboarding-Boe7D95J.js +1 -0
  112. package/assets/{onboarding-completion-CJl9zKMA.js → onboarding-completion-CEthyLI-.js} +1 -1
  113. package/assets/outbox-BqHfAcnr.js +1 -0
  114. package/assets/{pencil-A679n1yJ.js → pencil-Dp-S5che.js} +1 -1
  115. package/assets/{people-C5ni4bV_.js → people-CFuQvhz_.js} +1 -1
  116. package/assets/{plus-D9A6i0pi.js → plus-ivySO7aD.js} +1 -1
  117. package/assets/{popover-menu-wrc2e8Vk.js → popover-menu-CNRsrfGN.js} +1 -1
  118. package/assets/{refresh-cw-BRmmCn_2.js → refresh-cw-D43K-uJ_.js} +1 -1
  119. package/assets/{reply-DL5kkaJs.js → reply-CdhmgK8D.js} +1 -1
  120. package/assets/{rich-text-EZFEOU8t.js → rich-text-BNnd4RhC.js} +1 -1
  121. package/assets/{rich-text-spellcheck-worker-provider-NOmoFs4G.js → rich-text-spellcheck-worker-provider-D35wa69O.js} +1 -1
  122. package/assets/{rotate-ccw-C2NtRHS-.js → rotate-ccw-DY-C3cnl.js} +1 -1
  123. package/assets/{roving-focus-CSq3MPWi.js → roving-focus-CfNxjWPW.js} +1 -1
  124. package/assets/{row-actions-Cthc4RCY.js → row-actions-DMyxcQFg.js} +1 -1
  125. package/assets/{search-mirror-CCAs_ZWe.js → search-mirror-PLEys8yY.js} +1 -1
  126. package/assets/{search-scope-DaiXqXNv.js → search-scope-DowTds7f.js} +1 -1
  127. package/assets/{search-token-index-VBBiMTaA.js → search-token-index-Qe9FLPUx.js} +1 -1
  128. package/assets/{sections-uFHlOXiA.js → sections-aErIO9A7.js} +1 -1
  129. package/assets/{segmented-control-DNxc5Ghi.js → segmented-control-CZRUmZT-.js} +1 -1
  130. package/assets/{select-B9t8348S.js → select-Bar5gCGO.js} +1 -1
  131. package/assets/{senders-uBzIqu95.js → senders-6bWn5dUX.js} +1 -1
  132. package/assets/settings-BfuOXGy8.js +1 -0
  133. package/assets/{settings-screen-CafoSGzb.js → settings-screen-DjVJZ-eS.js} +1 -1
  134. package/assets/{shield-check-BdZGtm0z.js → shield-check-C-ddv9so.js} +1 -1
  135. package/assets/{spam-DKjh33Xi.js → spam-CfM26JXy.js} +1 -1
  136. package/assets/{suggest-list-Do7i1-gb.js → suggest-list-BU1CAWaS.js} +1 -1
  137. package/assets/{suggested-vips-C-je5foZ.js → suggested-vips-CVTKxBdO.js} +1 -1
  138. package/assets/{suggestion._suggestionId-DF2BM_zX.js → suggestion._suggestionId-LOmWNAzV.js} +1 -1
  139. package/assets/{switch-1RDXcNo-.js → switch-C60zzRNi.js} +1 -1
  140. package/assets/{task._calendarTaskId-B7k5whQt.js → task._calendarTaskId-CwbcSZL4.js} +1 -1
  141. package/assets/{undo-2-B-b8_FeJ.js → undo-2-D6HzUJ41.js} +1 -1
  142. package/assets/{useCalendarData-BcNSn1yP.js → useCalendarData-n3x_s1Nb.js} +1 -1
  143. package/assets/{useCalendarScheduling-Dfk1b293.js → useCalendarScheduling-B3bHM8TC.js} +1 -1
  144. package/assets/{useCalendarSuggestions-D_tk6nh4.js → useCalendarSuggestions-dbmN8tRh.js} +1 -1
  145. package/assets/{useCalendarTasks-CX2Wh1Fn.js → useCalendarTasks-CC9jcVTp.js} +1 -1
  146. package/assets/{useClassificationSettings-Bi0m63-O.js → useClassificationSettings-DDXeuHc9.js} +1 -1
  147. package/assets/useCollectionThreads-bR-HQDXT.js +1 -0
  148. package/assets/{useDebouncedValue-AWe2Zncy.js → useDebouncedValue-nIbP08sa.js} +1 -1
  149. package/assets/{useFilters-Bp1QgyWU.js → useFilters-C3QPNclJ.js} +1 -1
  150. package/assets/useInfiniteQuery-CneHLmnO.js +1 -0
  151. package/assets/{useJunkMailboxIds-CWScvBHw.js → useJunkMailboxIds-BCvLXlA_.js} +1 -1
  152. package/assets/{useLabels-CGE9kc74.js → useLabels-BiYidhrJ.js} +1 -1
  153. package/assets/{useLayoutTier-D5MoTNho.js → useLayoutTier-c01ZWqQ0.js} +1 -1
  154. package/assets/{useMediaQuery-Bf7zukl9.js → useMediaQuery-BL50IiYB.js} +1 -1
  155. package/assets/{useMessageBodyContent-BxjoKGiE.js → useMessageBodyContent-DdX1ZZwR.js} +1 -1
  156. package/assets/{useQueries-Dj93detX.js → useQueries-B2w-f15M.js} +1 -1
  157. package/assets/{useRefreshControl-DCFTdDZz.js → useRefreshControl-C-8PJltS.js} +1 -1
  158. package/assets/{useResultFolderIndex-DAcbTt0T.js → useResultFolderIndex-BTY9xXDW.js} +1 -1
  159. package/assets/{useSignature-CA8ypw7f.js → useSignature-DQ-8mjVB.js} +1 -1
  160. package/assets/{warnings-C-blkf-m.js → warnings-iL5faBYa.js} +1 -1
  161. package/index.html +1 -1
  162. package/package.json +1 -1
  163. package/assets/CollectionPane-RUuB6sFo.js +0 -1
  164. package/assets/MailViewChrome-BDymWKX9.js +0 -1
  165. package/assets/_calendarObjectId-B3IHxxnZ.js +0 -1
  166. package/assets/_labelId-BX1_9FW3.js +0 -1
  167. package/assets/_mailboxId-BKCf6hRR.js +0 -1
  168. package/assets/_messageId-DGc5xyqH.js +0 -1
  169. package/assets/_messageId-ODP9L5rG.js +0 -1
  170. package/assets/_messageId-_9l1GYCG.js +0 -1
  171. package/assets/_messageId-t0gwqxwG.js +0 -1
  172. package/assets/_outboxMessageId-DGFiVWCU.js +0 -1
  173. package/assets/_recurrenceId-yqFEhvsn.js +0 -1
  174. package/assets/_threadId-Bvd5G-pJ.js +0 -1
  175. package/assets/_threadId-BwJQjORR.js +0 -1
  176. package/assets/_threadId-CFLbzDUi.js +0 -1
  177. package/assets/_threadId-Dj29QtLs.js +0 -1
  178. package/assets/brief-NsiukvBp.js +0 -1
  179. package/assets/compose._-_outboxMessageId_-BT2RKEAF.js +0 -1
  180. package/assets/compose._-_outboxMessageId_-B_NGqkpg.js +0 -1
  181. package/assets/compose._-_outboxMessageId_-CCPr3GjM.js +0 -1
  182. package/assets/compose._-_outboxMessageId_-CFBNHbeY.js +0 -1
  183. package/assets/compose._-_outboxMessageId_-Cw-Zq1kx.js +0 -1
  184. package/assets/edit-BGhTeEac.js +0 -1
  185. package/assets/edit-CeXJ3wiI.js +0 -1
  186. package/assets/flagged-B4N5fCui.js +0 -1
  187. package/assets/index-5PtybTMj.js +0 -1
  188. package/assets/index-B-gNDz7v.js +0 -1
  189. package/assets/index-B1AltYi_.js +0 -1
  190. package/assets/index-BX5kv92z.js +0 -1
  191. package/assets/index-CzMYehsR.js +0 -1
  192. package/assets/index-DT4iQTvg.js +0 -1
  193. package/assets/index-DZ4zN_a2.js +0 -1
  194. package/assets/index-Xq-TD3Lr.js +0 -1
  195. package/assets/index-eKzwYumy.js +0 -1
  196. package/assets/index-ehMMhnu5.js +0 -1
  197. package/assets/index-rui9BQ_f.js +0 -1
  198. package/assets/index-t0gwqxwG.js +0 -1
  199. package/assets/mail-CiuTTyMm.js +0 -1
  200. package/assets/new-ZEuIlDnl.js +0 -1
  201. package/assets/onboarding-bCsMaIPY.js +0 -1
  202. package/assets/outbox-BthyAXQ5.js +0 -1
  203. package/assets/settings-BLs90wKU.js +0 -1
@@ -1 +1 @@
1
- import{j as s,p as o,B as t}from"./index-yeSesYv-.js";import{u as i}from"./search-scope-DaiXqXNv.js";import{M as l}from"./menu-Cn2tY52U.js";function p({title:e,leading:a,children:n,className:r}){return s.jsxs("header",{className:o("flex h-pane-header shrink-0 items-center gap-2 border-b border-line px-row-inset",r),children:[a,e!==void 0&&s.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:e}),n]})}const h=e=>e.trim().toLocaleLowerCase();function x(){const e=i();return!e||e.showNavPane?null:s.jsx(t,{variant:"ghost",size:"sm",icon:s.jsx(l,{className:"size-4"}),onClick:e.openNav,"aria-label":"Open folders",className:"-ml-1 shrink-0"})}export{x as N,p as P,h as n};
1
+ import{j as s,p as o,B as t}from"./index-9QMShYZC.js";import{u as i}from"./search-scope-DowTds7f.js";import{M as l}from"./menu-BQAGsNoE.js";function p({title:e,leading:a,children:n,className:r}){return s.jsxs("header",{className:o("flex h-pane-header shrink-0 items-center gap-2 border-b border-line px-row-inset",r),children:[a,e!==void 0&&s.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:e}),n]})}const h=e=>e.trim().toLocaleLowerCase();function x(){const e=i();return!e||e.showNavPane?null:s.jsx(t,{variant:"ghost",size:"sm",icon:s.jsx(l,{className:"size-4"}),onClick:e.openNav,"aria-label":"Open folders",className:"-ml-1 shrink-0"})}export{x as N,p as P,h as n};
@@ -1 +1 @@
1
- import{b as de,r as t,j as e,d as L,e as ue,f as te,k as me,aq as pe,a as D,aI as Q,c as U,B as C,L as G,aJ as W,ar as $,I as he,m as fe}from"./index-yeSesYv-.js";import{A as xe,c as ge,d as ye,s as V,W as R,C as _,g as ve,e as K,f as Se,h as je,a as X,S as be,b as Ce,R as we}from"./credential-steps-yT5IXLY8.js";import{c as ke}from"./account-form-helpers-DhckT_PN.js";import{S as Ee}from"./select-B9t8348S.js";import{M as Ne}from"./mail-CLkdzm71.js";import{F as Me}from"./file-braces-CXZUVCry.js";import{K as Ae}from"./kbd-BVK8yKhS.js";import{C as Ie}from"./checkbox-DIKh2-eX.js";const se={name:"at-sign",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]};se.node;const ne=de(se),Te="Pick at least one. An account has to sync something.",ae=[{id:"Mail",label:"Mail",description:"Messages, folders and sending."},{id:"Calendar",label:"Calendar",description:"This account's provider calendar, read into Remit."}];function Pe({providerName:s,offered:i,selected:c,onChange:o,error:u}){const g=t.useId(),r=ae.filter(p=>i.includes(p.id)),f=u?e.jsx(L,{tone:"danger",variant:"soft",className:"mt-2 text-xs",children:u}):null;if(r.length<2)return f;const l=(p,y)=>{if(!y){o(c.filter(a=>a!==p));return}o(r.filter(a=>a.id===p||c.includes(a.id)).map(a=>a.id))};return e.jsxs("fieldset",{"aria-describedby":g,children:[e.jsx("legend",{className:"text-sm font-semibold text-fg",children:"What should Remit sync?"}),e.jsx("div",{className:"mt-1 divide-y divide-line",children:r.map(p=>e.jsx(Ie,{label:p.label,description:p.description,checked:c.includes(p.id),onChange:y=>l(p.id,y.target.checked)},p.id))}),e.jsx("p",{id:g,className:"mt-1.5 text-2xs text-fg-subtle",children:`Adding a service later means signing in with ${s} again.`}),f]})}const ie=[{id:"icloud",label:"iCloud",username:"full-email",imap:{host:"imap.mail.me.com",port:993,security:"tls"},smtp:{host:"smtp.mail.me.com",port:587,security:"starttls"},passwordHelp:{text:"iCloud requires an app-specific password, not your Apple ID password. Generate one under Sign-In & Security → App-Specific Passwords.",url:"https://support.apple.com/en-us/102654"}},{id:"yahoo",label:"Yahoo",username:"full-email",imap:{host:"imap.mail.yahoo.com",port:993,security:"tls"},smtp:{host:"smtp.mail.yahoo.com",port:465,security:"tls"},passwordHelp:{text:"Yahoo requires an app password, not your login password. Generate one under Account Security.",url:"https://help.yahoo.com/kb/generate-manage-third-party-passwords-sln15241.html"}},{id:"aol",label:"AOL",username:"full-email",imap:{host:"imap.aol.com",port:993,security:"tls"},smtp:{host:"smtp.aol.com",port:465,security:"tls"},passwordHelp:{text:"AOL requires an app password, not your login password. Generate one under Account Security.",url:"https://login.aol.com/account/security"}},{id:"fastmail",label:"Fastmail",username:"full-email",imap:{host:"imap.fastmail.com",port:993,security:"tls"},smtp:{host:"smtp.fastmail.com",port:465,security:"tls"},passwordHelp:{text:"Fastmail requires an app password, not your login password. Create one under Settings → Privacy & Security → App passwords.",url:"https://www.fastmail.help/hc/en-us/articles/360058752854"}},{id:"gmail",label:"Gmail",username:"full-email",imap:{host:"imap.gmail.com",port:993,security:"tls"},smtp:{host:"smtp.gmail.com",port:587,security:"starttls"},passwordHelp:{text:"Gmail requires an app password, not your Google password. First turn on 2-Step Verification for your Google Account, then create an app password under Security → 2-Step Verification → App passwords.",url:xe["gmail.com"]}}];function Y(s){return ie.find(i=>i.id===s)}const Re={"icloud.com":"icloud","me.com":"icloud","mac.com":"icloud","yahoo.com":"yahoo","yahoo.co.uk":"yahoo","ymail.com":"yahoo","aol.com":"aol","fastmail.com":"fastmail","fastmail.fm":"fastmail","gmail.com":"gmail","googlemail.com":"gmail"};function Fe(s){const i=s.indexOf("@");if(i===-1)return"";const c=s.slice(i+1).toLowerCase();return Re[c]??""}const A=["Connector","Address","Servers","Credentials","Test","Sync"],P={connector:0,"microsoft-granted":5,address:1,servers:2,credentials:3,test:4,sync:5},J={host:"",port:993,security:"tls"},Z={host:"",port:587,security:"starttls"};function Le({onStart:s,onImportConfig:i}){return t.useEffect(()=>{const c=o=>{o.key==="Enter"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),e.jsx(R,{steps:A,activeStep:0,hideSteps:!0,title:"Welcome to Remit",subtitle:i?"Set up your first account, or bring the settings from another Reader.":"One inbox for all your mail, with context about every message.",footer:e.jsxs(e.Fragment,{children:[i?e.jsx(C,{variant:"secondary",icon:e.jsx(Me,{className:"size-4"}),onClick:i,children:"Import a config file"}):e.jsxs("span",{className:"text-2xs text-fg-subtle",children:[e.jsx(Ae,{children:"Enter"})," to continue"]}),e.jsx(C,{variant:"primary",onClick:s,children:"Add your first account"})]}),children:e.jsxs("div",{className:"flex flex-col items-start py-5",children:[e.jsx("span",{className:"flex size-14 items-center justify-center rounded-md bg-accent-soft",children:e.jsx(Ne,{className:"size-7 text-accent"})}),e.jsx("p",{className:"mt-5 max-w-sm text-sm leading-relaxed text-fg-muted",children:"Remit syncs your existing mailboxes and tells you who is really writing to you — sender history, authenticity checks, and similar messages, right next to every email."}),i&&e.jsx("p",{className:"mt-3 max-w-sm text-sm leading-relaxed text-fg-muted",children:"A config file carries your accounts, folder roles, rules, flagged senders and appearance from another Reader. It never carries passwords, so you sign in again here."})]})})}function Oe({onContinue:s,onMicrosoft:i,onBack:c,showBack:o}){const[u,g]=t.useState("imap");t.useEffect(()=>{const f=l=>{l.key==="Enter"&&(u==="microsoft"?i():s()),l.key==="Escape"&&c()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[s,i,c,u]);const r=()=>{u==="microsoft"?i():s()};return e.jsx(R,{steps:A,activeStep:P.connector,title:"How does this account connect?",subtitle:"Choose a sign-in method. IMAP works with any provider.",footer:e.jsxs(e.Fragment,{children:[o?e.jsx(C,{variant:"ghost",onClick:c,children:"Back"}):e.jsx("span",{}),e.jsx(C,{variant:"primary",onClick:r,children:u==="microsoft"?"Continue with Microsoft":"Continue with IMAP"})]}),children:e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[e.jsx(X,{name:"IMAP / SMTP",description:"Any mail provider — Fastmail, iCloud, your own server.",icon:e.jsx(be,{className:"size-5"}),selected:u==="imap",onSelect:()=>g("imap")}),e.jsx(X,{name:"Outlook / Microsoft 365",description:"Sign in with Microsoft. Works with Outlook.com and work accounts.",icon:e.jsx(he,{className:"size-5"}),selected:u==="microsoft",onSelect:()=>g("microsoft")})]})})}const ee=["Mail","Calendar"];function _e({refusal:s,onBack:i,onConnected:c}){const[o,u]=t.useState(s?.email??""),[g,r]=t.useState(s?.services??ee),[f,l]=t.useState(!1),[p,y]=t.useState(s?.message??null),[a,w]=t.useState(!1),[N,j]=t.useState(!1),h=t.useRef(!0);t.useEffect(()=>(h.current=!0,()=>{h.current=!1}),[]);const v=t.useRef(new Set),{refetch:b}=D(U()),k=Ce(d=>{if(j(!1),d==="stalled"){w(!1),y(we);return}b().then(({data:S,isError:x})=>{if(!h.current)return;if(x||!S){y("Couldn't check whether the sign-in finished. Open Settings › Accounts to see whether the account is connected.");return}y(null);const m=S.accounts.find(n=>!v.current.has(n.accountId));m&&c(m.accountId)})}),F=te({...fe(),onSuccess:d=>{h.current&&(k(),w(!0),window.location.assign(d.authorizationUrl))},onError:d=>{j(!1),y(d instanceof Error?d.message:"Failed to start sign-in")}}),I=N||F.isPending,M=()=>{if(!I){if(g.length===0){l(!0);return}y(null),j(!0),b().then(({data:d,isError:S})=>{if(h.current){if(S||!d){j(!1),y("Couldn't read this instance's accounts, so sign-in can't be tracked. Check your connection and try again.");return}v.current=new Set(d.accounts.map(x=>x.accountId)),F.mutate({body:{email:o.trim()||void 0,services:g}})}})}},T=t.useRef(M);return T.current=M,t.useEffect(()=>{const d=S=>{S.key==="Enter"&&T.current(),S.key==="Escape"&&i()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[i]),e.jsx(R,{steps:A,activeStep:P.connector,title:s?.reconnect&&s.email?`Reconnect ${s.email}`:"Sign in with Microsoft",subtitle:"Microsoft is asked for the mail and calendar access you pick here.",footer:e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"ghost",onClick:i,children:"Back"}),e.jsx(C,{variant:"primary",onClick:M,disabled:I,icon:I?e.jsx(G,{className:"size-4 animate-spin"}):void 0,children:I?"Redirecting…":a?"Start over":"Sign in with Microsoft"})]}),children:e.jsxs("div",{className:"space-y-3",children:[e.jsx(Pe,{providerName:"Microsoft",offered:ee,selected:g,onChange:d=>{r(d),d.length>0&&l(!1)},error:f?Te:void 0}),e.jsxs("div",{children:[e.jsx(W,{htmlFor:"microsoft-email",children:"Email address (optional)"}),e.jsx($,{id:"microsoft-email",icon:e.jsx(ne,{className:"size-4"}),placeholder:"you@outlook.com",value:o,onChange:d=>u(d.target.value),type:"email",autoComplete:"email"}),e.jsx("p",{className:"mt-1.5 text-2xs text-fg-subtle",children:"Pre-fills the Microsoft sign-in form. Leave blank to choose on the Microsoft page."})]}),a&&e.jsx(L,{tone:"info",children:"Waiting for Microsoft. Finish signing in — this window carries on the moment the account is connected, wherever you finished."}),p&&e.jsx(L,{tone:"danger",children:p})]})})}function Ge({accountId:s,onSignInAgain:i,onContinue:c}){const{data:o,isError:u,isFetching:g,refetch:r}=D(U()),f=o?.accounts.find(l=>l.accountId===s);return u?e.jsx(R,{steps:A,activeStep:P["microsoft-granted"],title:"Couldn't read the new account",subtitle:"Microsoft finished, but this instance did not answer.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{}),e.jsx(C,{variant:"primary",onClick:()=>{r()},disabled:g,children:"Retry"})]}),children:e.jsx(L,{tone:"danger",children:"Couldn't load the account Microsoft just connected. Check your connection and retry, or open Settings › Accounts to see it."})}):!o||!f&&g?e.jsx(R,{steps:A,activeStep:P["microsoft-granted"],title:"Reading the new account",subtitle:"Checking what Microsoft granted.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-2xs text-fg-subtle",children:"Loading…"}),e.jsx("span",{})]}),children:e.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-fg-muted",children:[e.jsx(G,{className:"size-4 animate-spin text-accent"}),"Loading the account…"]})}):f?e.jsx(He,{account:f,onContinue:c}):e.jsx(R,{steps:A,activeStep:P["microsoft-granted"],title:"The account is not here",subtitle:"Microsoft sent the sign-in back, but no account was kept.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{}),e.jsx(C,{variant:"primary",onClick:i,children:"Sign in again"})]}),children:e.jsx(L,{tone:"danger",children:"This instance holds no account from that sign-in. Sign in with Microsoft again to connect it."})})}function He({account:s,onContinue:i}){const c=s.syncedServices.includes("Mail");return e.jsx(R,{steps:A,activeStep:P["microsoft-granted"],title:`Connected ${s.email}`,subtitle:"Microsoft granted access to what you picked.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-2xs text-fg-subtle",children:"Change this later in Settings › Accounts"}),e.jsx(C,{variant:"primary",onClick:()=>i(s.accountId),children:c?"Go to inbox":"Continue"})]}),children:e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"divide-y divide-line",children:ae.map(o=>s.syncedServices.includes(o.id)?e.jsx(_,{label:o.label,detail:"Access granted — syncing",state:"ok"},o.id):e.jsx(_,{label:o.label,detail:"Not synced. Turn it on in Settings › Accounts; Microsoft asks for access then.",state:"pending"},o.id))}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xs text-fg-subtle",children:"Permissions Microsoft granted"}),e.jsx("code",{className:"mt-1 block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted","data-testid":"granted-scopes",children:s.grantedScopes.join(" ")})]})]})})}function ze({initialEmail:s,initialDisplayName:i,onContinue:c,onBack:o}){const[u,g]=t.useState(s),[r,f]=t.useState(i),[l,p]=t.useState(!1),[y,a]=t.useState(""),[w,N]=t.useState(null),j=t.useCallback(async()=>{const h=u.trim();if(!h.includes("@")||!h.includes(".")){N("Enter a valid email address.");return}N(null),p(!0),a(Se(h));try{const v=await je(h);c(h,r.trim(),v)}finally{p(!1)}},[u,r,c]);return t.useEffect(()=>{const h=v=>{v.key==="Enter"&&!l&&j(),v.key==="Escape"&&o()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[j,l,o]),e.jsx(R,{steps:A,activeStep:P.address,title:"What's the email address?",subtitle:"We'll detect the server settings for you.",footer:e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"ghost",onClick:o,children:"Back"}),e.jsx(C,{variant:"primary",disabled:l,onClick:()=>{j()},children:"Continue"})]}),children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(W,{htmlFor:"onboarding-email",children:"Email address"}),e.jsx($,{id:"onboarding-email",icon:e.jsx(ne,{className:"size-4"}),placeholder:"you@example.com",value:u,onChange:h=>{g(h.target.value),N(null)},type:"email",autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsx(W,{htmlFor:"onboarding-display-name",children:"Display name (optional)"}),e.jsx($,{id:"onboarding-display-name",placeholder:"Alice",value:r,onChange:h=>f(h.target.value)}),e.jsx("p",{className:"mt-1.5 text-2xs text-fg-subtle",children:"What to call this account in Remit. Leave blank to use a name derived from the address."})]}),l&&e.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs text-fg-muted",children:[e.jsx(G,{className:"size-3.5 animate-spin text-accent"}),y]}),w&&!l&&e.jsx("div",{className:"mt-3",children:e.jsx(L,{tone:"danger",children:w})})]})})}function Be({email:s,imapConfig:i,smtpConfig:c,discovered:o,onContinue:u,onBack:g,onChange:r}){const[f,l]=t.useState(i),[p,y]=t.useState(c),[a,w]=t.useState(()=>Fe(s)),[N,j]=t.useState(!1),[h,v]=t.useState(null),b=Y(a),k=b!==void 0&&!N,F=t.useCallback(m=>{w(m),j(!1),v(null);const n=Y(m);n&&(l({host:n.imap.host,port:n.imap.port,security:n.imap.security}),y({host:n.smtp.host,port:n.smtp.port,security:n.smtp.security}))},[]);t.useEffect(()=>{r(f,p)},[f,p,r]);const I=f.host.trim()!=="",M=t.useCallback(()=>{if(!I){v("Enter the IMAP host.");return}v(null),u()},[I,u]);t.useEffect(()=>{const m=n=>{n.key==="Enter"&&M(),n.key==="Escape"&&g()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[M,g]);const T=s.split("@")[1]??"your domain",d=b?"Pick your provider to fill in the right settings — or choose Custom to enter them by hand.":o?"Found via autodiscovery — adjust anything that looks off.":`We couldn't detect settings for ${T} — enter them manually.`,S=k?{label:"preset",tone:"neutral"}:!b&&o?{label:"detected",tone:"positive"}:void 0,x=b?.passwordHelp.url??ve(s);return e.jsx(R,{steps:A,activeStep:P.servers,title:"Confirm server settings",subtitle:d,footer:e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"ghost",onClick:g,children:"Back"}),e.jsx(C,{variant:"primary",onClick:M,children:"Continue"})]}),children:e.jsxs("div",{className:"space-y-5",children:[h&&e.jsx(L,{tone:"danger",children:h}),e.jsxs("div",{children:[e.jsx(W,{htmlFor:"provider-select",children:"Provider"}),e.jsxs(Ee,{id:"provider-select",value:a,onChange:m=>F(m.target.value),children:[e.jsx("option",{value:"",children:"Custom / other"}),ie.map(m=>e.jsx("option",{value:m.id,children:m.label},m.id))]}),b&&e.jsx("p",{className:"mt-1 text-2xs text-fg-subtle",children:k?e.jsxs(e.Fragment,{children:["Server settings are pre-filled for ",b.label," and locked."," ",e.jsx("button",{type:"button",className:"text-accent underline",onClick:()=>j(!0),children:"Advanced"})," ","lets you edit them by hand."]}):e.jsxs(e.Fragment,{children:["Editing ",b.label,"'s settings by hand."]})})]}),e.jsx(K,{legend:"IMAP — incoming",badge:S,readOnly:k,host:f.host,port:String(f.port),security:f.security,hostPlaceholder:"imap.example.com",portPlaceholder:"993",onHostChange:m=>{l(n=>({...n,host:m})),v(null)},onPortChange:m=>l(n=>({...n,port:Number(m)})),onSecurityChange:m=>l(n=>({...n,security:m}))}),e.jsx("p",{className:"text-2xs text-fg-subtle",children:"Sending (SMTP) is optional — leave it blank to set up a receive-only account and add sending later in Settings."}),e.jsx(K,{legend:"SMTP — outgoing (optional)",badge:S,readOnly:k,host:p.host,port:String(p.port),security:p.security,hostPlaceholder:"smtp.example.com",portPlaceholder:"587",onHostChange:m=>{y(n=>({...n,host:m})),v(null)},onPortChange:m=>y(n=>({...n,port:Number(m)})),onSecurityChange:m=>y(n=>({...n,security:m}))}),b&&e.jsxs("p",{className:"text-2xs text-fg-subtle",children:[b.passwordHelp.text," ",x&&e.jsx("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"text-accent underline",children:"Get an app password"})]})]})})}const De=2e4;function We({email:s,displayName:i,imapConfig:c,smtpConfig:o,username:u,password:g,onGoToInbox:r}){const f=ue(),[l,p]=t.useState(null),[y,a]=t.useState(null),w=t.useRef(!1),N=V(c.security),j=V(o.security),h=te({...pe(),onSuccess:E=>{p(E.accountId),f.invalidateQueries({queryKey:me()})},onError:E=>{a(E instanceof Error?E.message:"Failed to create account")}});t.useEffect(()=>{if(w.current)return;w.current=!0;const E=o.host.trim()!=="",z=ke({imapHost:c.host,smtpHost:o.host,smtpPort:o.port}),B=E?z??{smtpHost:o.host,smtpPort:o.port,smtpTls:j.tls,smtpStartTls:j.startTls}:null;h.mutate({body:{email:s,displayName:i||void 0,username:u!==s?u:void 0,password:g,imapHost:c.host,imapPort:c.port,imapTls:N.tls,imapStartTls:N.startTls,smtpHost:B?.smtpHost||void 0,smtpPort:B?.smtpPort||void 0,smtpTls:B?.smtpTls??!1,smtpStartTls:B?.smtpStartTls??!1}})},[]);const{data:v,isError:b}=D({...Q({path:{accountId:l??""}}),enabled:!!l,refetchInterval:E=>{const z=E.state.data?.syncPhase;return z==="complete"||z==="error"?!1:2e3}}),k=v?.syncPhase==="error",{data:F}=D({...U(),enabled:!!l&&k}),I=F?.accounts.find(E=>E.accountId===l)?.lastError,M=v?.mailboxes.find(E=>E.fullPath==="INBOX"||E.fullPath==="Inbox"),T=v?.mailboxCountTotal??0,d=v?.mailboxCountSynced??0,S=M?.messagesTotal??0,x=M?.messagesSynced??0,m=S>0?x/S:0,n=v?.syncPhase,H=k?"failed":n==="idle"||n===void 0||n==="discovering_mailboxes"?"running":T>0?"ok":"running",O=k?"failed":!n||n==="idle"||n==="discovering_mailboxes"?"pending":n==="syncing_inbox"||n==="syncing_others"?"running":"ok",q=k?"failed":!n||n==="idle"||n==="discovering_mailboxes"||n==="syncing_inbox"?"pending":n==="syncing_others"?"running":"ok",oe=x>0||M?.phase==="complete"||n==="complete"||k,[re,ce]=t.useState(!1);t.useEffect(()=>{if(!l)return;const E=setTimeout(()=>ce(!0),De);return()=>clearTimeout(E)},[l]);const le=!!l&&(oe||b||re);return y?e.jsx(R,{steps:A,activeStep:P.sync,title:"Couldn't create account",subtitle:"Something went wrong saving your account.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{}),e.jsx(C,{variant:"primary",onClick:()=>{w.current=!1,a(null),h.mutate({body:{email:s,displayName:i||void 0,username:u!==s?u:void 0,password:g,imapHost:c.host,imapPort:c.port,imapTls:N.tls,imapStartTls:N.startTls,smtpHost:o.host||void 0,smtpPort:o.port||void 0,smtpTls:j.tls,smtpStartTls:j.startTls}})},children:"Retry"})]}),children:e.jsx("code",{className:"block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted",children:y})}):e.jsx(R,{steps:A,activeStep:P.sync,title:`Syncing ${s}`,subtitle:"Newest mail first — you can start reading right away.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-2xs text-fg-subtle",children:"Sync continues in the background"}),le?e.jsx(C,{variant:"primary",onClick:()=>l&&r(l),children:"Go to inbox"}):e.jsx(C,{variant:"primary",disabled:!0,icon:e.jsx(G,{className:"size-3.5 animate-spin"}),children:"Getting your mail…"})]}),children:h.isPending?e.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-fg-muted",children:[e.jsx(G,{className:"size-4 animate-spin text-accent"}),"Creating your account…"]}):e.jsxs("div",{className:"space-y-3",children:[S>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline justify-between text-xs",children:[e.jsx("span",{className:"font-medium text-fg",children:"INBOX"}),e.jsxs("span",{className:"text-fg-subtle tabular-nums",children:[x.toLocaleString()," / ",S.toLocaleString()," ","messages"]})]}),e.jsx("div",{className:"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-sunken",children:e.jsx("div",{className:"h-full rounded-full bg-accent transition-all duration-500",style:{width:`${Math.max(2,m*100)}%`}})})]}),e.jsxs("div",{className:"divide-y divide-line",children:[e.jsx(_,{label:"Mailboxes discovered",detail:T>0?`${T} mailbox${T===1?"":"es"} found`:"Discovering…",state:H}),e.jsx(_,{label:"INBOX",detail:O==="ok"?`${x.toLocaleString()} messages synced`:O==="running"?"Syncing newest first…":"Queued",state:O}),d>1||n==="syncing_others"||n==="complete"?e.jsx(_,{label:"Other mailboxes",detail:q==="ok"?`${d-1} mailboxes synced`:q==="running"?"Syncing…":"Queued",state:q}):null]}),k&&e.jsxs("div",{className:"mt-2 space-y-2",children:[e.jsxs("p",{className:"text-xs text-danger",children:["Sync stalled. The account is still active —"," ",e.jsx("button",{type:"button",className:"underline",onClick:()=>{f.invalidateQueries({queryKey:Q({path:{accountId:l??""}}).queryKey})},children:"retry"})]}),I&&e.jsx("code",{className:"block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted",children:I})]})]})})}const qe=(s,i)=>i?.kind==="connected"?"microsoft-granted":i?.kind==="refused"?"microsoft-email":s?"connector":"welcome";function Ze({skipWelcome:s=!1,onComplete:i,onCancel:c,onImportConfig:o,microsoftReturn:u}){const[g,r]=t.useState(qe(s,u)),[f,l]=t.useState(u?.kind==="refused"?u:void 0),[p,y]=t.useState(u?.kind==="connected"?u.accountId:null),[a,w]=t.useState({email:"",displayName:"",imapConfig:J,smtpConfig:Z,username:"",password:"",discoveryResult:null,discovered:!1,createdAccountId:null}),N=t.useCallback(()=>r("connector"),[]),j=t.useCallback(()=>r("address"),[]),h=t.useCallback(()=>r("microsoft-email"),[]),v=t.useCallback(()=>{s?c?.():r("welcome")},[s,c]),b=t.useCallback((d,S,x)=>{let m=J,n=Z,H=!1;x&&(H=x.source!=="heuristic",m={host:x.imap.host,port:x.imap.port,security:x.imap.security},n={host:x.smtp.host,port:x.smtp.port,security:x.smtp.security}),w(O=>({...O,email:d,displayName:S,imapConfig:m,smtpConfig:n,discoveryResult:x,discovered:H,username:d})),r("servers")},[]),k=t.useCallback((d,S)=>{w(x=>({...x,imapConfig:d,smtpConfig:S}))},[]),F=t.useCallback((d,S)=>{w(x=>({...x,username:d,password:S}))},[]),I=t.useCallback(()=>r("sync"),[]),M=t.useCallback(d=>{i(d)},[i]),T=e.jsx(_e,{refusal:f,onBack:()=>{l(void 0),r("connector")},onConnected:d=>{y(d),r("microsoft-granted")}});switch(g){case"welcome":return e.jsx(Le,{onStart:N,onImportConfig:o});case"connector":return e.jsx(Oe,{onContinue:j,onMicrosoft:h,onBack:v,showBack:!s});case"microsoft-email":return T;case"microsoft-granted":return p===null?T:e.jsx(Ge,{accountId:p,onSignInAgain:()=>r("microsoft-email"),onContinue:M});case"address":return e.jsx(ze,{initialEmail:a.email,initialDisplayName:a.displayName,onContinue:b,onBack:()=>r("connector")});case"servers":return e.jsx(Be,{email:a.email,imapConfig:a.imapConfig,smtpConfig:a.smtpConfig,discovered:a.discovered,onContinue:()=>r("credentials"),onBack:()=>r("address"),onChange:k});case"credentials":return e.jsx(ye,{steps:A,activeStep:P.credentials,title:`Sign in to ${a.email.split("@")[1]||"your mail server"}`,subtitle:"Many providers require an app password instead of your normal one.",email:a.email,username:a.username,password:a.password,onContinue:()=>r("test"),onBack:()=>r("servers"),onChange:F});case"test":return e.jsx(ge,{steps:A,activeStep:P.test,email:a.email,imapConfig:a.imapConfig,smtpConfig:a.smtpConfig,username:a.username,password:a.password,onSuccess:I,onBackToCredentials:()=>r("credentials"),onBackToServers:()=>r("servers")});case"sync":return e.jsx(We,{email:a.email,displayName:a.displayName,imapConfig:a.imapConfig,smtpConfig:a.smtpConfig,username:a.username,password:a.password,onGoToInbox:M})}}export{ae as A,Ze as O,ie as P,Y as g};
1
+ import{b as de,r as t,j as e,d as L,e as ue,f as te,k as me,aq as pe,a as D,aI as Q,c as U,B as C,L as G,aJ as W,ar as $,I as he,m as fe}from"./index-9QMShYZC.js";import{A as xe,c as ge,d as ye,s as V,W as R,C as _,g as ve,e as K,f as Se,h as je,a as X,S as be,b as Ce,R as we}from"./credential-steps-DijGQsa7.js";import{c as ke}from"./account-form-helpers-DhckT_PN.js";import{S as Ee}from"./select-Bar5gCGO.js";import{M as Ne}from"./mail-DZhnB5_L.js";import{F as Me}from"./file-braces-GrxXAr-8.js";import{K as Ae}from"./kbd-BD-ER_Yv.js";import{C as Ie}from"./checkbox-ImKY_DpK.js";const se={name:"at-sign",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]};se.node;const ne=de(se),Te="Pick at least one. An account has to sync something.",ae=[{id:"Mail",label:"Mail",description:"Messages, folders and sending."},{id:"Calendar",label:"Calendar",description:"This account's provider calendar, read into Remit."}];function Pe({providerName:s,offered:i,selected:c,onChange:o,error:u}){const g=t.useId(),r=ae.filter(p=>i.includes(p.id)),f=u?e.jsx(L,{tone:"danger",variant:"soft",className:"mt-2 text-xs",children:u}):null;if(r.length<2)return f;const l=(p,y)=>{if(!y){o(c.filter(a=>a!==p));return}o(r.filter(a=>a.id===p||c.includes(a.id)).map(a=>a.id))};return e.jsxs("fieldset",{"aria-describedby":g,children:[e.jsx("legend",{className:"text-sm font-semibold text-fg",children:"What should Remit sync?"}),e.jsx("div",{className:"mt-1 divide-y divide-line",children:r.map(p=>e.jsx(Ie,{label:p.label,description:p.description,checked:c.includes(p.id),onChange:y=>l(p.id,y.target.checked)},p.id))}),e.jsx("p",{id:g,className:"mt-1.5 text-2xs text-fg-subtle",children:`Adding a service later means signing in with ${s} again.`}),f]})}const ie=[{id:"icloud",label:"iCloud",username:"full-email",imap:{host:"imap.mail.me.com",port:993,security:"tls"},smtp:{host:"smtp.mail.me.com",port:587,security:"starttls"},passwordHelp:{text:"iCloud requires an app-specific password, not your Apple ID password. Generate one under Sign-In & Security → App-Specific Passwords.",url:"https://support.apple.com/en-us/102654"}},{id:"yahoo",label:"Yahoo",username:"full-email",imap:{host:"imap.mail.yahoo.com",port:993,security:"tls"},smtp:{host:"smtp.mail.yahoo.com",port:465,security:"tls"},passwordHelp:{text:"Yahoo requires an app password, not your login password. Generate one under Account Security.",url:"https://help.yahoo.com/kb/generate-manage-third-party-passwords-sln15241.html"}},{id:"aol",label:"AOL",username:"full-email",imap:{host:"imap.aol.com",port:993,security:"tls"},smtp:{host:"smtp.aol.com",port:465,security:"tls"},passwordHelp:{text:"AOL requires an app password, not your login password. Generate one under Account Security.",url:"https://login.aol.com/account/security"}},{id:"fastmail",label:"Fastmail",username:"full-email",imap:{host:"imap.fastmail.com",port:993,security:"tls"},smtp:{host:"smtp.fastmail.com",port:465,security:"tls"},passwordHelp:{text:"Fastmail requires an app password, not your login password. Create one under Settings → Privacy & Security → App passwords.",url:"https://www.fastmail.help/hc/en-us/articles/360058752854"}},{id:"gmail",label:"Gmail",username:"full-email",imap:{host:"imap.gmail.com",port:993,security:"tls"},smtp:{host:"smtp.gmail.com",port:587,security:"starttls"},passwordHelp:{text:"Gmail requires an app password, not your Google password. First turn on 2-Step Verification for your Google Account, then create an app password under Security → 2-Step Verification → App passwords.",url:xe["gmail.com"]}}];function Y(s){return ie.find(i=>i.id===s)}const Re={"icloud.com":"icloud","me.com":"icloud","mac.com":"icloud","yahoo.com":"yahoo","yahoo.co.uk":"yahoo","ymail.com":"yahoo","aol.com":"aol","fastmail.com":"fastmail","fastmail.fm":"fastmail","gmail.com":"gmail","googlemail.com":"gmail"};function Fe(s){const i=s.indexOf("@");if(i===-1)return"";const c=s.slice(i+1).toLowerCase();return Re[c]??""}const A=["Connector","Address","Servers","Credentials","Test","Sync"],P={connector:0,"microsoft-granted":5,address:1,servers:2,credentials:3,test:4,sync:5},J={host:"",port:993,security:"tls"},Z={host:"",port:587,security:"starttls"};function Le({onStart:s,onImportConfig:i}){return t.useEffect(()=>{const c=o=>{o.key==="Enter"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),e.jsx(R,{steps:A,activeStep:0,hideSteps:!0,title:"Welcome to Remit",subtitle:i?"Set up your first account, or bring the settings from another Reader.":"One inbox for all your mail, with context about every message.",footer:e.jsxs(e.Fragment,{children:[i?e.jsx(C,{variant:"secondary",icon:e.jsx(Me,{className:"size-4"}),onClick:i,children:"Import a config file"}):e.jsxs("span",{className:"text-2xs text-fg-subtle",children:[e.jsx(Ae,{children:"Enter"})," to continue"]}),e.jsx(C,{variant:"primary",onClick:s,children:"Add your first account"})]}),children:e.jsxs("div",{className:"flex flex-col items-start py-5",children:[e.jsx("span",{className:"flex size-14 items-center justify-center rounded-md bg-accent-soft",children:e.jsx(Ne,{className:"size-7 text-accent"})}),e.jsx("p",{className:"mt-5 max-w-sm text-sm leading-relaxed text-fg-muted",children:"Remit syncs your existing mailboxes and tells you who is really writing to you — sender history, authenticity checks, and similar messages, right next to every email."}),i&&e.jsx("p",{className:"mt-3 max-w-sm text-sm leading-relaxed text-fg-muted",children:"A config file carries your accounts, folder roles, rules, flagged senders and appearance from another Reader. It never carries passwords, so you sign in again here."})]})})}function Oe({onContinue:s,onMicrosoft:i,onBack:c,showBack:o}){const[u,g]=t.useState("imap");t.useEffect(()=>{const f=l=>{l.key==="Enter"&&(u==="microsoft"?i():s()),l.key==="Escape"&&c()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[s,i,c,u]);const r=()=>{u==="microsoft"?i():s()};return e.jsx(R,{steps:A,activeStep:P.connector,title:"How does this account connect?",subtitle:"Choose a sign-in method. IMAP works with any provider.",footer:e.jsxs(e.Fragment,{children:[o?e.jsx(C,{variant:"ghost",onClick:c,children:"Back"}):e.jsx("span",{}),e.jsx(C,{variant:"primary",onClick:r,children:u==="microsoft"?"Continue with Microsoft":"Continue with IMAP"})]}),children:e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[e.jsx(X,{name:"IMAP / SMTP",description:"Any mail provider — Fastmail, iCloud, your own server.",icon:e.jsx(be,{className:"size-5"}),selected:u==="imap",onSelect:()=>g("imap")}),e.jsx(X,{name:"Outlook / Microsoft 365",description:"Sign in with Microsoft. Works with Outlook.com and work accounts.",icon:e.jsx(he,{className:"size-5"}),selected:u==="microsoft",onSelect:()=>g("microsoft")})]})})}const ee=["Mail","Calendar"];function _e({refusal:s,onBack:i,onConnected:c}){const[o,u]=t.useState(s?.email??""),[g,r]=t.useState(s?.services??ee),[f,l]=t.useState(!1),[p,y]=t.useState(s?.message??null),[a,w]=t.useState(!1),[N,j]=t.useState(!1),h=t.useRef(!0);t.useEffect(()=>(h.current=!0,()=>{h.current=!1}),[]);const v=t.useRef(new Set),{refetch:b}=D(U()),k=Ce(d=>{if(j(!1),d==="stalled"){w(!1),y(we);return}b().then(({data:S,isError:x})=>{if(!h.current)return;if(x||!S){y("Couldn't check whether the sign-in finished. Open Settings › Accounts to see whether the account is connected.");return}y(null);const m=S.accounts.find(n=>!v.current.has(n.accountId));m&&c(m.accountId)})}),F=te({...fe(),onSuccess:d=>{h.current&&(k(),w(!0),window.location.assign(d.authorizationUrl))},onError:d=>{j(!1),y(d instanceof Error?d.message:"Failed to start sign-in")}}),I=N||F.isPending,M=()=>{if(!I){if(g.length===0){l(!0);return}y(null),j(!0),b().then(({data:d,isError:S})=>{if(h.current){if(S||!d){j(!1),y("Couldn't read this instance's accounts, so sign-in can't be tracked. Check your connection and try again.");return}v.current=new Set(d.accounts.map(x=>x.accountId)),F.mutate({body:{email:o.trim()||void 0,services:g}})}})}},T=t.useRef(M);return T.current=M,t.useEffect(()=>{const d=S=>{S.key==="Enter"&&T.current(),S.key==="Escape"&&i()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[i]),e.jsx(R,{steps:A,activeStep:P.connector,title:s?.reconnect&&s.email?`Reconnect ${s.email}`:"Sign in with Microsoft",subtitle:"Microsoft is asked for the mail and calendar access you pick here.",footer:e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"ghost",onClick:i,children:"Back"}),e.jsx(C,{variant:"primary",onClick:M,disabled:I,icon:I?e.jsx(G,{className:"size-4 animate-spin"}):void 0,children:I?"Redirecting…":a?"Start over":"Sign in with Microsoft"})]}),children:e.jsxs("div",{className:"space-y-3",children:[e.jsx(Pe,{providerName:"Microsoft",offered:ee,selected:g,onChange:d=>{r(d),d.length>0&&l(!1)},error:f?Te:void 0}),e.jsxs("div",{children:[e.jsx(W,{htmlFor:"microsoft-email",children:"Email address (optional)"}),e.jsx($,{id:"microsoft-email",icon:e.jsx(ne,{className:"size-4"}),placeholder:"you@outlook.com",value:o,onChange:d=>u(d.target.value),type:"email",autoComplete:"email"}),e.jsx("p",{className:"mt-1.5 text-2xs text-fg-subtle",children:"Pre-fills the Microsoft sign-in form. Leave blank to choose on the Microsoft page."})]}),a&&e.jsx(L,{tone:"info",children:"Waiting for Microsoft. Finish signing in — this window carries on the moment the account is connected, wherever you finished."}),p&&e.jsx(L,{tone:"danger",children:p})]})})}function Ge({accountId:s,onSignInAgain:i,onContinue:c}){const{data:o,isError:u,isFetching:g,refetch:r}=D(U()),f=o?.accounts.find(l=>l.accountId===s);return u?e.jsx(R,{steps:A,activeStep:P["microsoft-granted"],title:"Couldn't read the new account",subtitle:"Microsoft finished, but this instance did not answer.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{}),e.jsx(C,{variant:"primary",onClick:()=>{r()},disabled:g,children:"Retry"})]}),children:e.jsx(L,{tone:"danger",children:"Couldn't load the account Microsoft just connected. Check your connection and retry, or open Settings › Accounts to see it."})}):!o||!f&&g?e.jsx(R,{steps:A,activeStep:P["microsoft-granted"],title:"Reading the new account",subtitle:"Checking what Microsoft granted.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-2xs text-fg-subtle",children:"Loading…"}),e.jsx("span",{})]}),children:e.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-fg-muted",children:[e.jsx(G,{className:"size-4 animate-spin text-accent"}),"Loading the account…"]})}):f?e.jsx(He,{account:f,onContinue:c}):e.jsx(R,{steps:A,activeStep:P["microsoft-granted"],title:"The account is not here",subtitle:"Microsoft sent the sign-in back, but no account was kept.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{}),e.jsx(C,{variant:"primary",onClick:i,children:"Sign in again"})]}),children:e.jsx(L,{tone:"danger",children:"This instance holds no account from that sign-in. Sign in with Microsoft again to connect it."})})}function He({account:s,onContinue:i}){const c=s.syncedServices.includes("Mail");return e.jsx(R,{steps:A,activeStep:P["microsoft-granted"],title:`Connected ${s.email}`,subtitle:"Microsoft granted access to what you picked.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-2xs text-fg-subtle",children:"Change this later in Settings › Accounts"}),e.jsx(C,{variant:"primary",onClick:()=>i(s.accountId),children:c?"Go to inbox":"Continue"})]}),children:e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"divide-y divide-line",children:ae.map(o=>s.syncedServices.includes(o.id)?e.jsx(_,{label:o.label,detail:"Access granted — syncing",state:"ok"},o.id):e.jsx(_,{label:o.label,detail:"Not synced. Turn it on in Settings › Accounts; Microsoft asks for access then.",state:"pending"},o.id))}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xs text-fg-subtle",children:"Permissions Microsoft granted"}),e.jsx("code",{className:"mt-1 block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted","data-testid":"granted-scopes",children:s.grantedScopes.join(" ")})]})]})})}function ze({initialEmail:s,initialDisplayName:i,onContinue:c,onBack:o}){const[u,g]=t.useState(s),[r,f]=t.useState(i),[l,p]=t.useState(!1),[y,a]=t.useState(""),[w,N]=t.useState(null),j=t.useCallback(async()=>{const h=u.trim();if(!h.includes("@")||!h.includes(".")){N("Enter a valid email address.");return}N(null),p(!0),a(Se(h));try{const v=await je(h);c(h,r.trim(),v)}finally{p(!1)}},[u,r,c]);return t.useEffect(()=>{const h=v=>{v.key==="Enter"&&!l&&j(),v.key==="Escape"&&o()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[j,l,o]),e.jsx(R,{steps:A,activeStep:P.address,title:"What's the email address?",subtitle:"We'll detect the server settings for you.",footer:e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"ghost",onClick:o,children:"Back"}),e.jsx(C,{variant:"primary",disabled:l,onClick:()=>{j()},children:"Continue"})]}),children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(W,{htmlFor:"onboarding-email",children:"Email address"}),e.jsx($,{id:"onboarding-email",icon:e.jsx(ne,{className:"size-4"}),placeholder:"you@example.com",value:u,onChange:h=>{g(h.target.value),N(null)},type:"email",autoComplete:"email"})]}),e.jsxs("div",{children:[e.jsx(W,{htmlFor:"onboarding-display-name",children:"Display name (optional)"}),e.jsx($,{id:"onboarding-display-name",placeholder:"Alice",value:r,onChange:h=>f(h.target.value)}),e.jsx("p",{className:"mt-1.5 text-2xs text-fg-subtle",children:"What to call this account in Remit. Leave blank to use a name derived from the address."})]}),l&&e.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs text-fg-muted",children:[e.jsx(G,{className:"size-3.5 animate-spin text-accent"}),y]}),w&&!l&&e.jsx("div",{className:"mt-3",children:e.jsx(L,{tone:"danger",children:w})})]})})}function Be({email:s,imapConfig:i,smtpConfig:c,discovered:o,onContinue:u,onBack:g,onChange:r}){const[f,l]=t.useState(i),[p,y]=t.useState(c),[a,w]=t.useState(()=>Fe(s)),[N,j]=t.useState(!1),[h,v]=t.useState(null),b=Y(a),k=b!==void 0&&!N,F=t.useCallback(m=>{w(m),j(!1),v(null);const n=Y(m);n&&(l({host:n.imap.host,port:n.imap.port,security:n.imap.security}),y({host:n.smtp.host,port:n.smtp.port,security:n.smtp.security}))},[]);t.useEffect(()=>{r(f,p)},[f,p,r]);const I=f.host.trim()!=="",M=t.useCallback(()=>{if(!I){v("Enter the IMAP host.");return}v(null),u()},[I,u]);t.useEffect(()=>{const m=n=>{n.key==="Enter"&&M(),n.key==="Escape"&&g()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[M,g]);const T=s.split("@")[1]??"your domain",d=b?"Pick your provider to fill in the right settings — or choose Custom to enter them by hand.":o?"Found via autodiscovery — adjust anything that looks off.":`We couldn't detect settings for ${T} — enter them manually.`,S=k?{label:"preset",tone:"neutral"}:!b&&o?{label:"detected",tone:"positive"}:void 0,x=b?.passwordHelp.url??ve(s);return e.jsx(R,{steps:A,activeStep:P.servers,title:"Confirm server settings",subtitle:d,footer:e.jsxs(e.Fragment,{children:[e.jsx(C,{variant:"ghost",onClick:g,children:"Back"}),e.jsx(C,{variant:"primary",onClick:M,children:"Continue"})]}),children:e.jsxs("div",{className:"space-y-5",children:[h&&e.jsx(L,{tone:"danger",children:h}),e.jsxs("div",{children:[e.jsx(W,{htmlFor:"provider-select",children:"Provider"}),e.jsxs(Ee,{id:"provider-select",value:a,onChange:m=>F(m.target.value),children:[e.jsx("option",{value:"",children:"Custom / other"}),ie.map(m=>e.jsx("option",{value:m.id,children:m.label},m.id))]}),b&&e.jsx("p",{className:"mt-1 text-2xs text-fg-subtle",children:k?e.jsxs(e.Fragment,{children:["Server settings are pre-filled for ",b.label," and locked."," ",e.jsx("button",{type:"button",className:"text-accent underline",onClick:()=>j(!0),children:"Advanced"})," ","lets you edit them by hand."]}):e.jsxs(e.Fragment,{children:["Editing ",b.label,"'s settings by hand."]})})]}),e.jsx(K,{legend:"IMAP — incoming",badge:S,readOnly:k,host:f.host,port:String(f.port),security:f.security,hostPlaceholder:"imap.example.com",portPlaceholder:"993",onHostChange:m=>{l(n=>({...n,host:m})),v(null)},onPortChange:m=>l(n=>({...n,port:Number(m)})),onSecurityChange:m=>l(n=>({...n,security:m}))}),e.jsx("p",{className:"text-2xs text-fg-subtle",children:"Sending (SMTP) is optional — leave it blank to set up a receive-only account and add sending later in Settings."}),e.jsx(K,{legend:"SMTP — outgoing (optional)",badge:S,readOnly:k,host:p.host,port:String(p.port),security:p.security,hostPlaceholder:"smtp.example.com",portPlaceholder:"587",onHostChange:m=>{y(n=>({...n,host:m})),v(null)},onPortChange:m=>y(n=>({...n,port:Number(m)})),onSecurityChange:m=>y(n=>({...n,security:m}))}),b&&e.jsxs("p",{className:"text-2xs text-fg-subtle",children:[b.passwordHelp.text," ",x&&e.jsx("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"text-accent underline",children:"Get an app password"})]})]})})}const De=2e4;function We({email:s,displayName:i,imapConfig:c,smtpConfig:o,username:u,password:g,onGoToInbox:r}){const f=ue(),[l,p]=t.useState(null),[y,a]=t.useState(null),w=t.useRef(!1),N=V(c.security),j=V(o.security),h=te({...pe(),onSuccess:E=>{p(E.accountId),f.invalidateQueries({queryKey:me()})},onError:E=>{a(E instanceof Error?E.message:"Failed to create account")}});t.useEffect(()=>{if(w.current)return;w.current=!0;const E=o.host.trim()!=="",z=ke({imapHost:c.host,smtpHost:o.host,smtpPort:o.port}),B=E?z??{smtpHost:o.host,smtpPort:o.port,smtpTls:j.tls,smtpStartTls:j.startTls}:null;h.mutate({body:{email:s,displayName:i||void 0,username:u!==s?u:void 0,password:g,imapHost:c.host,imapPort:c.port,imapTls:N.tls,imapStartTls:N.startTls,smtpHost:B?.smtpHost||void 0,smtpPort:B?.smtpPort||void 0,smtpTls:B?.smtpTls??!1,smtpStartTls:B?.smtpStartTls??!1}})},[]);const{data:v,isError:b}=D({...Q({path:{accountId:l??""}}),enabled:!!l,refetchInterval:E=>{const z=E.state.data?.syncPhase;return z==="complete"||z==="error"?!1:2e3}}),k=v?.syncPhase==="error",{data:F}=D({...U(),enabled:!!l&&k}),I=F?.accounts.find(E=>E.accountId===l)?.lastError,M=v?.mailboxes.find(E=>E.fullPath==="INBOX"||E.fullPath==="Inbox"),T=v?.mailboxCountTotal??0,d=v?.mailboxCountSynced??0,S=M?.messagesTotal??0,x=M?.messagesSynced??0,m=S>0?x/S:0,n=v?.syncPhase,H=k?"failed":n==="idle"||n===void 0||n==="discovering_mailboxes"?"running":T>0?"ok":"running",O=k?"failed":!n||n==="idle"||n==="discovering_mailboxes"?"pending":n==="syncing_inbox"||n==="syncing_others"?"running":"ok",q=k?"failed":!n||n==="idle"||n==="discovering_mailboxes"||n==="syncing_inbox"?"pending":n==="syncing_others"?"running":"ok",oe=x>0||M?.phase==="complete"||n==="complete"||k,[re,ce]=t.useState(!1);t.useEffect(()=>{if(!l)return;const E=setTimeout(()=>ce(!0),De);return()=>clearTimeout(E)},[l]);const le=!!l&&(oe||b||re);return y?e.jsx(R,{steps:A,activeStep:P.sync,title:"Couldn't create account",subtitle:"Something went wrong saving your account.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{}),e.jsx(C,{variant:"primary",onClick:()=>{w.current=!1,a(null),h.mutate({body:{email:s,displayName:i||void 0,username:u!==s?u:void 0,password:g,imapHost:c.host,imapPort:c.port,imapTls:N.tls,imapStartTls:N.startTls,smtpHost:o.host||void 0,smtpPort:o.port||void 0,smtpTls:j.tls,smtpStartTls:j.startTls}})},children:"Retry"})]}),children:e.jsx("code",{className:"block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted",children:y})}):e.jsx(R,{steps:A,activeStep:P.sync,title:`Syncing ${s}`,subtitle:"Newest mail first — you can start reading right away.",footer:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-2xs text-fg-subtle",children:"Sync continues in the background"}),le?e.jsx(C,{variant:"primary",onClick:()=>l&&r(l),children:"Go to inbox"}):e.jsx(C,{variant:"primary",disabled:!0,icon:e.jsx(G,{className:"size-3.5 animate-spin"}),children:"Getting your mail…"})]}),children:h.isPending?e.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-fg-muted",children:[e.jsx(G,{className:"size-4 animate-spin text-accent"}),"Creating your account…"]}):e.jsxs("div",{className:"space-y-3",children:[S>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline justify-between text-xs",children:[e.jsx("span",{className:"font-medium text-fg",children:"INBOX"}),e.jsxs("span",{className:"text-fg-subtle tabular-nums",children:[x.toLocaleString()," / ",S.toLocaleString()," ","messages"]})]}),e.jsx("div",{className:"mt-1 h-1.5 overflow-hidden rounded-full bg-surface-sunken",children:e.jsx("div",{className:"h-full rounded-full bg-accent transition-all duration-500",style:{width:`${Math.max(2,m*100)}%`}})})]}),e.jsxs("div",{className:"divide-y divide-line",children:[e.jsx(_,{label:"Mailboxes discovered",detail:T>0?`${T} mailbox${T===1?"":"es"} found`:"Discovering…",state:H}),e.jsx(_,{label:"INBOX",detail:O==="ok"?`${x.toLocaleString()} messages synced`:O==="running"?"Syncing newest first…":"Queued",state:O}),d>1||n==="syncing_others"||n==="complete"?e.jsx(_,{label:"Other mailboxes",detail:q==="ok"?`${d-1} mailboxes synced`:q==="running"?"Syncing…":"Queued",state:q}):null]}),k&&e.jsxs("div",{className:"mt-2 space-y-2",children:[e.jsxs("p",{className:"text-xs text-danger",children:["Sync stalled. The account is still active —"," ",e.jsx("button",{type:"button",className:"underline",onClick:()=>{f.invalidateQueries({queryKey:Q({path:{accountId:l??""}}).queryKey})},children:"retry"})]}),I&&e.jsx("code",{className:"block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted",children:I})]})]})})}const qe=(s,i)=>i?.kind==="connected"?"microsoft-granted":i?.kind==="refused"?"microsoft-email":s?"connector":"welcome";function Ze({skipWelcome:s=!1,onComplete:i,onCancel:c,onImportConfig:o,microsoftReturn:u}){const[g,r]=t.useState(qe(s,u)),[f,l]=t.useState(u?.kind==="refused"?u:void 0),[p,y]=t.useState(u?.kind==="connected"?u.accountId:null),[a,w]=t.useState({email:"",displayName:"",imapConfig:J,smtpConfig:Z,username:"",password:"",discoveryResult:null,discovered:!1,createdAccountId:null}),N=t.useCallback(()=>r("connector"),[]),j=t.useCallback(()=>r("address"),[]),h=t.useCallback(()=>r("microsoft-email"),[]),v=t.useCallback(()=>{s?c?.():r("welcome")},[s,c]),b=t.useCallback((d,S,x)=>{let m=J,n=Z,H=!1;x&&(H=x.source!=="heuristic",m={host:x.imap.host,port:x.imap.port,security:x.imap.security},n={host:x.smtp.host,port:x.smtp.port,security:x.smtp.security}),w(O=>({...O,email:d,displayName:S,imapConfig:m,smtpConfig:n,discoveryResult:x,discovered:H,username:d})),r("servers")},[]),k=t.useCallback((d,S)=>{w(x=>({...x,imapConfig:d,smtpConfig:S}))},[]),F=t.useCallback((d,S)=>{w(x=>({...x,username:d,password:S}))},[]),I=t.useCallback(()=>r("sync"),[]),M=t.useCallback(d=>{i(d)},[i]),T=e.jsx(_e,{refusal:f,onBack:()=>{l(void 0),r("connector")},onConnected:d=>{y(d),r("microsoft-granted")}});switch(g){case"welcome":return e.jsx(Le,{onStart:N,onImportConfig:o});case"connector":return e.jsx(Oe,{onContinue:j,onMicrosoft:h,onBack:v,showBack:!s});case"microsoft-email":return T;case"microsoft-granted":return p===null?T:e.jsx(Ge,{accountId:p,onSignInAgain:()=>r("microsoft-email"),onContinue:M});case"address":return e.jsx(ze,{initialEmail:a.email,initialDisplayName:a.displayName,onContinue:b,onBack:()=>r("connector")});case"servers":return e.jsx(Be,{email:a.email,imapConfig:a.imapConfig,smtpConfig:a.smtpConfig,discovered:a.discovered,onContinue:()=>r("credentials"),onBack:()=>r("address"),onChange:k});case"credentials":return e.jsx(ye,{steps:A,activeStep:P.credentials,title:`Sign in to ${a.email.split("@")[1]||"your mail server"}`,subtitle:"Many providers require an app password instead of your normal one.",email:a.email,username:a.username,password:a.password,onContinue:()=>r("test"),onBack:()=>r("servers"),onChange:F});case"test":return e.jsx(ge,{steps:A,activeStep:P.test,email:a.email,imapConfig:a.imapConfig,smtpConfig:a.smtpConfig,username:a.username,password:a.password,onSuccess:I,onBackToCredentials:()=>r("credentials"),onBackToServers:()=>r("servers")});case"sync":return e.jsx(We,{email:a.email,displayName:a.displayName,imapConfig:a.imapConfig,smtpConfig:a.smtpConfig,username:a.username,password:a.password,onGoToInbox:M})}}export{ae as A,Ze as O,ie as P,Y as g};
@@ -1 +1 @@
1
- import{ag as b,y as w,L as C,j as s,p as g,T as H,z as S,K as _,u as q,r as x,cw as U,a as K,Z as W,P as G,e as Z,an as J,dg as V,f as v,ao as y,cL as X,cM as Y,bU as p,fm as ee}from"./index-yeSesYv-.js";import{u as se,p as te,R as j,A as ne,l as ae}from"./MessageBody-BeciCqb_.js";import{i as oe,s as k}from"./outbox-status-BlKn6P0x.js";import{n as re,P as R,N as ie}from"./NavMenuButton-A6v6v8tE.js";import{c as le}from"./nav-link-BvlYCbp-.js";import{g as ce}from"./useMessageBodyContent-BxjoKGiE.js";import{e as ue}from"./reply-DL5kkaJs.js";import{a as de,u as L,L as I}from"./roving-focus-CSq3MPWi.js";import{C as T}from"./circle-check-big-DCVJA_H0.js";import{C as A}from"./clock-CTlZVcLb.js";import{R as xe}from"./row-actions-Cthc4RCY.js";import{R as fe}from"./rotate-ccw-C2NtRHS-.js";const me={queued:{icon:A,label:"Queued",className:"text-warning"},sending:{icon:C,label:"Sending…",className:"text-accent-2",spin:!0},sent:{icon:T,label:"Sent",className:"text-positive"},unfiled:{icon:b,label:"Sent, not filed",className:"text-warning"},failed:{icon:w,label:"Failed",className:"text-danger"},blocked:{icon:b,label:"Blocked",className:"text-warning"}};function O({status:e,iconOnly:t,className:a}){const n=me[e],o=n.icon;return s.jsxs("span",{className:g("inline-flex items-center gap-1.5 text-xs font-medium",n.className,a),children:[s.jsx(o,{className:g("size-4",n.spin&&"animate-spin")}),!t&&n.label]})}const he=(e,t)=>t?"bg-accent-2-soft":e==="failed"?"bg-danger-soft":e==="blocked"||e==="unfiled"?"bg-warning/10":"";function ge({recipients:e,subject:t,time:a,status:n,error:o,selected:l,onSelect:c,onRetry:r,retrying:u,onEdit:i,onDelete:f,deleting:d}){const m=n==="failed"||n==="blocked"||n==="unfiled";return s.jsxs("div",{className:g("flex items-start gap-3 border-b border-line px-4 py-3 transition-colors hover:bg-surface-raised",he(n,l)),children:[s.jsxs("button",{type:"button",...de,onClick:c,className:"flex flex-1 min-w-0 items-start gap-3 text-left",children:[s.jsx("div",{className:"mt-0.5 shrink-0",children:s.jsx(O,{status:n,iconOnly:!0})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"truncate text-sm font-medium",children:e}),s.jsx("span",{className:"shrink-0 text-xs text-fg-muted",children:a})]}),s.jsx("div",{className:"truncate text-sm",children:t||"No subject"}),s.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[s.jsx(O,{status:n}),o&&s.jsxs("span",{className:"truncate text-xs text-fg-muted",children:["— ",o]})]})]})]}),m&&s.jsx("div",{className:"shrink-0",children:s.jsx(xe,{actions:[...n==="failed"&&r?[{label:"Retry sending",iconOnly:!0,icon:s.jsx(fe,{className:"size-3.5"}),busy:u,onClick:r}]:[],{label:"Edit as draft",iconOnly:!0,icon:s.jsx(S,{className:"size-3.5"}),onClick:i}],destructive:{label:"Delete message",iconOnly:!0,icon:s.jsx(H,{className:"size-3.5"}),busy:d,confirm:{prompt:"Delete this message?",confirmLabel:"Delete"},onClick:f}})})]})}function ze(){return _({from:"/mail/outbox/draft/$outboxMessageId",shouldThrow:!1})?.outboxMessageId}function be(){const e=q(),t=le();return x.useCallback(a=>{e({to:"/mail/outbox/draft/$outboxMessageId",params:{outboxMessageId:a},search:U,hash:t})},[e,t])}function pe(){return ue()}function je(e,t){const a=t.trim().toLowerCase();if(a.length===0)return!0;const n=[e.subject,e.fromAddress,e.fromName,...e.toAddresses??[],...e.ccAddresses??[]].filter(o=>typeof o=="string").join(" ").toLowerCase();return a.split(/\s+/).every(o=>o.length===0||n.includes(o))}function Ne(e){return e.tokens.length>0&&e.freeText.trim().length===0}const D={queued:{icon:A,label:"Queued",className:"text-warning"},sending:{icon:C,label:"Sending…",className:"text-accent-2"},sent:{icon:T,label:"Sent",className:"text-positive"},unfiled:{icon:b,label:"Sent, not filed",className:"text-warning"},failed:{icon:w,label:"Failed",className:"text-danger"},blocked:{icon:b,label:"Blocked",className:"text-warning"}},ve=e=>ee(e).toDateString()===new Date().toDateString()?p(e,{hour:"numeric",minute:"2-digit"}):p(e,{month:"short",day:"numeric"}),M=e=>p(e,{dateStyle:"medium",timeStyle:"short"}),ye=e=>{const t=e.toAddresses??[];return t.length===0?"No recipients":t.length===1?t[0]:`${t[0]} +${t.length-1}`},E=(e,t)=>t?"The outbox cannot filter on those terms":e?"No matching outbox messages":"No outbox messages",P=x.createContext(null);function N(){const e=x.useContext(P);if(!e)throw new Error("OutboxPane.* must be used inside <OutboxPane>");return e}function Oe({outboxMessageId:e,children:t}){const a=be(),n=pe(),{data:o,isLoading:l}=K(W()),{searchQuery:c}=G(),r=se(),u=re(c),i=te(u,r),f=u.length>0,d=Ne(i),m=x.useMemo(()=>d?[]:(o?.items??[]).filter(h=>oe(h.status)).filter(h=>je(h,i.freeText)),[o,i.freeText,d]),F=x.useMemo(()=>m.find(h=>h.outboxMessageId===e),[m,e]),$={messages:m,hasQuery:f,unsupportedQuery:d,isLoading:l,selectedMessageId:e,selectedMessage:F,onOpenMessage:a,onCloseMessage:n};return s.jsx(P.Provider,{value:$,children:t})}function Q({message:e,isSelected:t,onSelect:a}){const n=Z(),o=ce(),{pushError:l}=J(),c=x.useCallback(()=>{n.invalidateQueries({queryKey:V()})},[n]),r=v({...X(),onSuccess:c,onError:d=>{l(y("Couldn't resend message","The message wasn't sent.",d))}}),u=v({...Y(),onSuccess:c,onError:d=>{l(y("Couldn't delete message","The message wasn't deleted.",d))}}),i=e.status;if(!D[i])return null;const f=k(e.status);return s.jsx(ge,{recipients:ye(e),subject:e.subject||"",time:ve(e.sentAt??e.updatedAt),status:i,error:f?e.lastError??void 0:void 0,selected:t,onSelect:a,onRetry:i==="failed"?()=>r.mutate({path:{outboxMessageId:e.outboxMessageId}}):void 0,retrying:r.isPending,onEdit:()=>o(e.outboxMessageId),onDelete:()=>u.mutate({path:{outboxMessageId:e.outboxMessageId}}),deleting:u.isPending})}function B({message:e,onBack:t}){const a=e.status,n=D[a],o=n?.icon??S,l=e.sentAt?M(e.sentAt):M(e.updatedAt);return s.jsxs("div",{className:"h-full overflow-y-auto bg-canvas",children:[s.jsxs("div",{className:"border-b border-line p-4",children:[t&&s.jsxs("button",{type:"button",onClick:t,className:"mb-3 inline-flex items-center gap-1 text-sm text-fg-muted hover:text-fg",children:[s.jsx(ne,{className:"size-4"}),s.jsx("span",{children:"Back"})]}),s.jsx("h1",{className:"text-xl font-semibold mb-3",children:e.subject||"(No subject)"}),s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-fg-muted shrink-0 w-12",children:"From:"}),s.jsx("span",{className:"text-fg",children:e.fromName?`${e.fromName} <${e.fromAddress}>`:e.fromAddress})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-fg-muted shrink-0 w-12",children:"To:"}),s.jsx("span",{className:"text-fg",children:(e.toAddresses??[]).join(", ")})]}),e.ccAddresses&&e.ccAddresses.length>0&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-fg-muted shrink-0 w-12",children:"Cc:"}),s.jsx("span",{className:"text-fg",children:e.ccAddresses.join(", ")})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-fg-muted shrink-0 w-12",children:"Date:"}),s.jsx("span",{className:"text-fg",children:l})]}),n&&s.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[s.jsx(o,{className:g("size-4",n.className,a==="sending"&&"animate-spin")}),s.jsx("span",{className:g("text-xs font-medium",n.className),children:n.label}),k(e.status)&&e.lastError&&s.jsxs("span",{className:"text-xs text-fg-muted",children:["— ",e.lastError]})]})]})]}),s.jsx("div",{className:"p-4",children:s.jsx(ae,{html:e.htmlBody,text:e.textBody})})]})}function Me(){const{messages:e,hasQuery:t,unsupportedQuery:a,isLoading:n,selectedMessageId:o,onOpenMessage:l}=N(),c=x.useRef(null);return L({containerRef:c,itemSelector:I}),n?s.jsx("div",{className:"flex h-full items-center justify-center bg-canvas",children:s.jsx("span",{className:"text-fg-muted",children:"Loading..."})}):e.length===0?s.jsx("div",{className:"flex h-full bg-surface",children:s.jsx(j,{message:E(t,a),showHints:!1})}):s.jsxs("div",{className:"h-full flex flex-col bg-canvas",children:[s.jsx(z,{count:e.length}),s.jsx("div",{ref:c,className:"flex-1 overflow-y-auto",children:e.map(r=>s.jsx(Q,{message:r,isSelected:o===r.outboxMessageId,onSelect:()=>l(r.outboxMessageId)},r.outboxMessageId))})]})}function z({count:e}){return s.jsx(R,{title:"Outbox",leading:s.jsx(ie,{}),children:s.jsxs("span",{className:"shrink-0 text-2xs text-fg-subtle",children:[e," ",e===1?"message":"messages"]})})}function we(){const{selectedMessage:e}=N();return s.jsxs("section",{className:"flex h-full w-full min-w-0 flex-col bg-canvas",children:[s.jsx(R,{}),s.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e?s.jsx(B,{message:e}):s.jsx(j,{message:"Select a message to read",showHints:!1})})]})}function Ce(){const{messages:e,hasQuery:t,unsupportedQuery:a,isLoading:n,selectedMessageId:o,selectedMessage:l,onOpenMessage:c,onCloseMessage:r}=N(),u=x.useRef(null);return L({containerRef:u,itemSelector:I}),n?s.jsx("div",{className:"flex h-full items-center justify-center bg-canvas",children:s.jsx("span",{className:"text-fg-muted",children:"Loading..."})}):l?s.jsx(B,{message:l,onBack:r}):e.length===0?s.jsx("div",{className:"flex h-full bg-surface",children:s.jsx(j,{message:E(t,a),showHints:!1})}):s.jsxs("div",{className:"h-full flex flex-col bg-canvas",children:[s.jsx(z,{count:e.length}),s.jsx("div",{ref:u,className:"flex-1 overflow-y-auto",children:e.map(i=>s.jsx(Q,{message:i,isSelected:o===i.outboxMessageId,onSelect:()=>c(i.outboxMessageId)},i.outboxMessageId))})]})}const Fe=Object.assign(Oe,{List:Me,Reading:we,Phone:Ce});export{Fe as O,ze as u};
1
+ import{ag as g,y as w,L as C,j as s,p as b,T as H,z as S,K as _,u as q,r as x,cw as U,a as K,Z as W,P as G,e as Z,an as J,dk as V,f as v,ao as y,cL as X,cM as Y,bU as p,fm as ee}from"./index-9QMShYZC.js";import{u as se,p as te,R as j,A as ne,j as ae}from"./MessageBody-bibpHbC1.js";import{i as oe,s as k}from"./outbox-status-BlKn6P0x.js";import{n as re,P as R,N as ie}from"./NavMenuButton-DMqlg3at.js";import{c as le}from"./nav-link-BaRr8ufx.js";import{g as ce}from"./useMessageBodyContent-DdX1ZZwR.js";import{e as ue}from"./reply-CdhmgK8D.js";import{a as de,u as L,L as I}from"./roving-focus-CfNxjWPW.js";import{C as T}from"./circle-check-big-D7T0Fr-Y.js";import{C as A}from"./clock-CcJSq9G-.js";import{R as xe}from"./row-actions-DMyxcQFg.js";import{R as fe}from"./rotate-ccw-DY-C3cnl.js";const me={queued:{icon:A,label:"Queued",className:"text-warning"},sending:{icon:C,label:"Sending…",className:"text-accent-2",spin:!0},sent:{icon:T,label:"Sent",className:"text-positive"},unfiled:{icon:g,label:"Sent, not filed",className:"text-warning"},failed:{icon:w,label:"Failed",className:"text-danger"},blocked:{icon:g,label:"Blocked",className:"text-warning"}};function O({status:e,iconOnly:t,className:a}){const n=me[e],o=n.icon;return s.jsxs("span",{className:b("inline-flex items-center gap-1.5 text-xs font-medium",n.className,a),children:[s.jsx(o,{className:b("size-4",n.spin&&"animate-spin")}),!t&&n.label]})}const he=(e,t)=>t?"bg-accent-2-soft":e==="failed"?"bg-danger-soft":e==="blocked"||e==="unfiled"?"bg-warning/10":"";function be({recipients:e,subject:t,time:a,status:n,error:o,selected:l,onSelect:c,onRetry:r,retrying:u,onEdit:i,onDelete:f,deleting:d}){const m=n==="failed"||n==="blocked"||n==="unfiled";return s.jsxs("div",{className:b("flex items-start gap-3 border-b border-line px-4 py-3 transition-colors hover:bg-surface-raised",he(n,l)),children:[s.jsxs("button",{type:"button",...de,onClick:c,className:"flex flex-1 min-w-0 items-start gap-3 text-left",children:[s.jsx("div",{className:"mt-0.5 shrink-0",children:s.jsx(O,{status:n,iconOnly:!0})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"truncate text-sm font-medium",children:e}),s.jsx("span",{className:"shrink-0 text-xs text-fg-muted",children:a})]}),s.jsx("div",{className:"truncate text-sm",children:t||"No subject"}),s.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[s.jsx(O,{status:n}),o&&s.jsxs("span",{className:"truncate text-xs text-fg-muted",children:["— ",o]})]})]})]}),m&&s.jsx("div",{className:"shrink-0",children:s.jsx(xe,{actions:[...n==="failed"&&r?[{label:"Retry sending",iconOnly:!0,icon:s.jsx(fe,{className:"size-3.5"}),busy:u,onClick:r}]:[],{label:"Edit as draft",iconOnly:!0,icon:s.jsx(S,{className:"size-3.5"}),onClick:i}],destructive:{label:"Delete message",iconOnly:!0,icon:s.jsx(H,{className:"size-3.5"}),busy:d,confirm:{prompt:"Delete this message?",confirmLabel:"Delete"},onClick:f}})})]})}function ze(){return _({from:"/mail/outbox/draft/$outboxMessageId",shouldThrow:!1})?.outboxMessageId}function ge(){const e=q(),t=le();return x.useCallback(a=>{e({to:"/mail/outbox/draft/$outboxMessageId",params:{outboxMessageId:a},search:U,hash:t})},[e,t])}function pe(){return ue()}function je(e,t){const a=t.trim().toLowerCase();if(a.length===0)return!0;const n=[e.subject,e.fromAddress,e.fromName,...e.toAddresses??[],...e.ccAddresses??[]].filter(o=>typeof o=="string").join(" ").toLowerCase();return a.split(/\s+/).every(o=>o.length===0||n.includes(o))}function Ne(e){return e.tokens.length>0&&e.freeText.trim().length===0}const D={queued:{icon:A,label:"Queued",className:"text-warning"},sending:{icon:C,label:"Sending…",className:"text-accent-2"},sent:{icon:T,label:"Sent",className:"text-positive"},unfiled:{icon:g,label:"Sent, not filed",className:"text-warning"},failed:{icon:w,label:"Failed",className:"text-danger"},blocked:{icon:g,label:"Blocked",className:"text-warning"}},ve=e=>ee(e).toDateString()===new Date().toDateString()?p(e,{hour:"numeric",minute:"2-digit"}):p(e,{month:"short",day:"numeric"}),M=e=>p(e,{dateStyle:"medium",timeStyle:"short"}),ye=e=>{const t=e.toAddresses??[];return t.length===0?"No recipients":t.length===1?t[0]:`${t[0]} +${t.length-1}`},E=(e,t)=>t?"The outbox cannot filter on those terms":e?"No matching outbox messages":"No outbox messages",P=x.createContext(null);function N(){const e=x.useContext(P);if(!e)throw new Error("OutboxPane.* must be used inside <OutboxPane>");return e}function Oe({outboxMessageId:e,children:t}){const a=ge(),n=pe(),{data:o,isLoading:l}=K(W()),{searchQuery:c}=G(),r=se(),u=re(c),i=te(u,r),f=u.length>0,d=Ne(i),m=x.useMemo(()=>d?[]:(o?.items??[]).filter(h=>oe(h.status)).filter(h=>je(h,i.freeText)),[o,i.freeText,d]),F=x.useMemo(()=>m.find(h=>h.outboxMessageId===e),[m,e]),$={messages:m,hasQuery:f,unsupportedQuery:d,isLoading:l,selectedMessageId:e,selectedMessage:F,onOpenMessage:a,onCloseMessage:n};return s.jsx(P.Provider,{value:$,children:t})}function Q({message:e,isSelected:t,onSelect:a}){const n=Z(),o=ce(),{pushError:l}=J(),c=x.useCallback(()=>{n.invalidateQueries({queryKey:V()})},[n]),r=v({...X(),onSuccess:c,onError:d=>{l(y("Couldn't resend message","The message wasn't sent.",d))}}),u=v({...Y(),onSuccess:c,onError:d=>{l(y("Couldn't delete message","The message wasn't deleted.",d))}}),i=e.status;if(!D[i])return null;const f=k(e.status);return s.jsx(be,{recipients:ye(e),subject:e.subject||"",time:ve(e.sentAt??e.updatedAt),status:i,error:f?e.lastError??void 0:void 0,selected:t,onSelect:a,onRetry:i==="failed"?()=>r.mutate({path:{outboxMessageId:e.outboxMessageId}}):void 0,retrying:r.isPending,onEdit:()=>o(e.outboxMessageId),onDelete:()=>u.mutate({path:{outboxMessageId:e.outboxMessageId}}),deleting:u.isPending})}function B({message:e,onBack:t}){const a=e.status,n=D[a],o=n?.icon??S,l=e.sentAt?M(e.sentAt):M(e.updatedAt);return s.jsxs("div",{className:"h-full overflow-y-auto bg-canvas",children:[s.jsxs("div",{className:"border-b border-line p-4",children:[t&&s.jsxs("button",{type:"button",onClick:t,className:"mb-3 inline-flex items-center gap-1 text-sm text-fg-muted hover:text-fg",children:[s.jsx(ne,{className:"size-4"}),s.jsx("span",{children:"Back"})]}),s.jsx("h1",{className:"text-xl font-semibold mb-3",children:e.subject||"(No subject)"}),s.jsxs("div",{className:"space-y-1 text-sm",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-fg-muted shrink-0 w-12",children:"From:"}),s.jsx("span",{className:"text-fg",children:e.fromName?`${e.fromName} <${e.fromAddress}>`:e.fromAddress})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-fg-muted shrink-0 w-12",children:"To:"}),s.jsx("span",{className:"text-fg",children:(e.toAddresses??[]).join(", ")})]}),e.ccAddresses&&e.ccAddresses.length>0&&s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-fg-muted shrink-0 w-12",children:"Cc:"}),s.jsx("span",{className:"text-fg",children:e.ccAddresses.join(", ")})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-fg-muted shrink-0 w-12",children:"Date:"}),s.jsx("span",{className:"text-fg",children:l})]}),n&&s.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[s.jsx(o,{className:b("size-4",n.className,a==="sending"&&"animate-spin")}),s.jsx("span",{className:b("text-xs font-medium",n.className),children:n.label}),k(e.status)&&e.lastError&&s.jsxs("span",{className:"text-xs text-fg-muted",children:["— ",e.lastError]})]})]})]}),s.jsx("div",{className:"p-4",children:s.jsx(ae,{html:e.htmlBody,text:e.textBody})})]})}function Me(){const{messages:e,hasQuery:t,unsupportedQuery:a,isLoading:n,selectedMessageId:o,onOpenMessage:l}=N(),c=x.useRef(null);return L({containerRef:c,itemSelector:I}),n?s.jsx("div",{className:"flex h-full items-center justify-center bg-canvas",children:s.jsx("span",{className:"text-fg-muted",children:"Loading..."})}):e.length===0?s.jsx("div",{className:"flex h-full bg-surface",children:s.jsx(j,{message:E(t,a),showHints:!1})}):s.jsxs("div",{className:"h-full flex flex-col bg-canvas",children:[s.jsx(z,{count:e.length}),s.jsx("div",{ref:c,className:"flex-1 overflow-y-auto",children:e.map(r=>s.jsx(Q,{message:r,isSelected:o===r.outboxMessageId,onSelect:()=>l(r.outboxMessageId)},r.outboxMessageId))})]})}function z({count:e}){return s.jsx(R,{title:"Outbox",leading:s.jsx(ie,{}),children:s.jsxs("span",{className:"shrink-0 text-2xs text-fg-subtle",children:[e," ",e===1?"message":"messages"]})})}function we(){const{selectedMessage:e}=N();return s.jsxs("section",{className:"flex h-full w-full min-w-0 flex-col bg-canvas",children:[s.jsx(R,{}),s.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e?s.jsx(B,{message:e}):s.jsx(j,{message:"Select a message to read",showHints:!1})})]})}function Ce(){const{messages:e,hasQuery:t,unsupportedQuery:a,isLoading:n,selectedMessageId:o,selectedMessage:l,onOpenMessage:c,onCloseMessage:r}=N(),u=x.useRef(null);return L({containerRef:u,itemSelector:I}),n?s.jsx("div",{className:"flex h-full items-center justify-center bg-canvas",children:s.jsx("span",{className:"text-fg-muted",children:"Loading..."})}):l?s.jsx(B,{message:l,onBack:r}):e.length===0?s.jsx("div",{className:"flex h-full bg-surface",children:s.jsx(j,{message:E(t,a),showHints:!1})}):s.jsxs("div",{className:"h-full flex flex-col bg-canvas",children:[s.jsx(z,{count:e.length}),s.jsx("div",{ref:u,className:"flex-1 overflow-y-auto",children:e.map(i=>s.jsx(Q,{message:i,isSelected:o===i.outboxMessageId,onSelect:()=>c(i.outboxMessageId)},i.outboxMessageId))})]})}const Fe=Object.assign(Oe,{List:Me,Reading:we,Phone:Ce});export{Fe as O,ze as u};
@@ -1 +1 @@
1
- import{j as r}from"./index-yeSesYv-.js";function t({href:e}){return r.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"inline-flex min-h-11 items-center font-medium text-accent hover:underline",children:"Report an issue"})}export{t as R};
1
+ import{j as r}from"./index-9QMShYZC.js";function t({href:e}){return r.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"inline-flex min-h-11 items-center font-medium text-accent hover:underline",children:"Report an issue"})}export{t as R};
@@ -0,0 +1 @@
1
+ import{O as o}from"./index-9QMShYZC.js";const n=o;export{n as component};
@@ -0,0 +1 @@
1
+ import{fs as n,P as l,r as c,j as o,O as u}from"./index-9QMShYZC.js";import{a as x}from"./MailShell-jW6JmRUB.js";import{C as r}from"./CollectionPane-DH6KjfeW.js";import{u as d}from"./useLabels-BiYidhrJ.js";import"./nav-link-BaRr8ufx.js";import{a as h}from"./search-token-index-Qe9FLPUx.js";import"./reply-CdhmgK8D.js";import{u as f}from"./search-mirror-PLEys8yY.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./FullCompose-karPPSLh.js";import"./index-Baytk5ez.js";import"./useSignature-DQ-8mjVB.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-nIbP08sa.js";import"./suggest-list-BU1CAWaS.js";import"./sections-aErIO9A7.js";import"./useMediaQuery-BL50IiYB.js";import"./chevron-down-CHMH78GK.js";import"./ErrorState-DHsQU1XS.js";import"./confirm-dialog-Nw9MwHVJ.js";import"./search-scope-DowTds7f.js";import"./app-chrome-BtWv1mrl.js";import"./useCollectionThreads-bR-HQDXT.js";import"./useQueries-B2w-f15M.js";import"./useInfiniteQuery-CneHLmnO.js";import"./MessageToolbar-BK8iddsy.js";import"./MessageBody-bibpHbC1.js";import"./kbd-BD-ER_Yv.js";import"./roving-focus-CfNxjWPW.js";import"./useJunkMailboxIds-BCvLXlA_.js";import"./badge-CoJzTE5F.js";import"./undo-2-D6HzUJ41.js";import"./DropdownMenu-CgMO6e8h.js";import"./refresh-cw-D43K-uJ_.js";import"./popover-menu-CNRsrfGN.js";import"./mail-DZhnB5_L.js";import"./download-BGcYYhWw.js";import"./avatar-BLhNXW-W.js";import"./EmptyState-FjON9Ve2.js";import"./circle-question-mark-BJ-7TUgf.js";import"./useFilters-C3QPNclJ.js";import"./select-Bar5gCGO.js";import"./plus-ivySO7aD.js";import"./calendar-suggestion-CJMwfDpf.js";import"./useCalendarSuggestions-dbmN8tRh.js";import"./agenda-time--0lz2pGX.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-BRsmtlld.js";import"./calendar-failure-note-DlpRkxBL.js";import"./checkbox-ImKY_DpK.js";import"./clock-CcJSq9G-.js";import"./segmented-control-CZRUmZT-.js";import"./useLayoutTier-c01ZWqQ0.js";import"./menu-BQAGsNoE.js";import"./folder-input-uYHmZSIB.js";import"./label-chip-D6mHiJlY.js";import"./cloud-off-KCT2nWKe.js";import"./MailViewChrome-By52WjOW.js";import"./wizard-selection-zWa1qc6-.js";function go(){const{labelId:t}=n.useParams(),{accounts:m}=l(),i=h(),{labels:p}=d(m[0]?.accountId),e=p.find(s=>s.labelId===t)?.name??"";f({to:"/mail/label/$labelId",params:{labelId:t}});const a=c.useMemo(()=>({labelId:t}),[t]);return o.jsx(r,{collection:a,title:e,thread:i,children:o.jsx(x,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(u,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!i})})}export{go as component};
@@ -0,0 +1 @@
1
+ import{ac as m,j as o,O as p}from"./index-9QMShYZC.js";import{a}from"./MailShell-jW6JmRUB.js";import{M as r}from"./MailboxPane-dO1WtQIE.js";import"./nav-link-BaRr8ufx.js";import{a as e}from"./search-token-index-Qe9FLPUx.js";import"./reply-CdhmgK8D.js";import{u as s}from"./search-mirror-PLEys8yY.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./FullCompose-karPPSLh.js";import"./index-Baytk5ez.js";import"./useSignature-DQ-8mjVB.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-nIbP08sa.js";import"./suggest-list-BU1CAWaS.js";import"./sections-aErIO9A7.js";import"./useMediaQuery-BL50IiYB.js";import"./chevron-down-CHMH78GK.js";import"./ErrorState-DHsQU1XS.js";import"./confirm-dialog-Nw9MwHVJ.js";import"./search-scope-DowTds7f.js";import"./app-chrome-BtWv1mrl.js";import"./useInfiniteQuery-CneHLmnO.js";import"./MessageToolbar-BK8iddsy.js";import"./MessageBody-bibpHbC1.js";import"./kbd-BD-ER_Yv.js";import"./roving-focus-CfNxjWPW.js";import"./useQueries-B2w-f15M.js";import"./useJunkMailboxIds-BCvLXlA_.js";import"./badge-CoJzTE5F.js";import"./undo-2-D6HzUJ41.js";import"./DropdownMenu-CgMO6e8h.js";import"./refresh-cw-D43K-uJ_.js";import"./popover-menu-CNRsrfGN.js";import"./mail-DZhnB5_L.js";import"./download-BGcYYhWw.js";import"./avatar-BLhNXW-W.js";import"./EmptyState-FjON9Ve2.js";import"./circle-question-mark-BJ-7TUgf.js";import"./useFilters-C3QPNclJ.js";import"./select-Bar5gCGO.js";import"./plus-ivySO7aD.js";import"./calendar-suggestion-CJMwfDpf.js";import"./useCalendarSuggestions-dbmN8tRh.js";import"./agenda-time--0lz2pGX.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-BRsmtlld.js";import"./calendar-failure-note-DlpRkxBL.js";import"./checkbox-ImKY_DpK.js";import"./clock-CcJSq9G-.js";import"./segmented-control-CZRUmZT-.js";import"./useLayoutTier-c01ZWqQ0.js";import"./menu-BQAGsNoE.js";import"./folder-input-uYHmZSIB.js";import"./label-chip-D6mHiJlY.js";import"./useLabels-BiYidhrJ.js";import"./cloud-off-KCT2nWKe.js";import"./useRefreshControl-C-8PJltS.js";import"./circle-check-big-D7T0Fr-Y.js";import"./LabelApplyTrigger-BLIxuWTi.js";import"./MailViewChrome-By52WjOW.js";import"./NavMenuButton-DMqlg3at.js";import"./shield-check-C-ddv9so.js";import"./bottom-sheet-BSnl2giv.js";import"./circle-check-bdTVfKb7.js";function Po(){const{mailboxId:t}=m.useParams(),i=e();return s({to:"/mail/$mailboxId",params:{mailboxId:t}}),o.jsx(r,{mailboxId:t,thread:i,children:o.jsx(a,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(p,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!i})})}export{Po as component};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-9QMShYZC.js";import{B as o}from"./BriefPane-DqAium13.js";import"./MessageToolbar-BK8iddsy.js";import"./MessageBody-bibpHbC1.js";import"./kbd-BD-ER_Yv.js";import"./search-scope-DowTds7f.js";import"./app-chrome-BtWv1mrl.js";import"./nav-link-BaRr8ufx.js";import"./useMediaQuery-BL50IiYB.js";import"./reply-CdhmgK8D.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./roving-focus-CfNxjWPW.js";import"./chevron-down-CHMH78GK.js";import"./search-token-index-Qe9FLPUx.js";import"./useQueries-B2w-f15M.js";import"./useLabels-BiYidhrJ.js";import"./index-Baytk5ez.js";import"./useSignature-DQ-8mjVB.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-nIbP08sa.js";import"./suggest-list-BU1CAWaS.js";import"./sections-aErIO9A7.js";import"./useJunkMailboxIds-BCvLXlA_.js";import"./badge-CoJzTE5F.js";import"./undo-2-D6HzUJ41.js";import"./DropdownMenu-CgMO6e8h.js";import"./refresh-cw-D43K-uJ_.js";import"./popover-menu-CNRsrfGN.js";import"./ErrorState-DHsQU1XS.js";import"./mail-DZhnB5_L.js";import"./download-BGcYYhWw.js";import"./avatar-BLhNXW-W.js";import"./EmptyState-FjON9Ve2.js";import"./circle-question-mark-BJ-7TUgf.js";import"./useFilters-C3QPNclJ.js";import"./select-Bar5gCGO.js";import"./plus-ivySO7aD.js";import"./calendar-suggestion-CJMwfDpf.js";import"./useCalendarSuggestions-dbmN8tRh.js";import"./agenda-time--0lz2pGX.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-BRsmtlld.js";import"./calendar-failure-note-DlpRkxBL.js";import"./checkbox-ImKY_DpK.js";import"./clock-CcJSq9G-.js";import"./segmented-control-CZRUmZT-.js";import"./useLayoutTier-c01ZWqQ0.js";import"./menu-BQAGsNoE.js";import"./folder-input-uYHmZSIB.js";import"./confirm-dialog-Nw9MwHVJ.js";import"./label-chip-D6mHiJlY.js";import"./cloud-off-KCT2nWKe.js";import"./LabelApplyTrigger-BLIxuWTi.js";import"./useRefreshControl-C-8PJltS.js";import"./circle-check-big-D7T0Fr-Y.js";import"./wizard-selection-zWa1qc6-.js";function mr(){return r.jsx(o.Reading,{})}export{mr as component};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-9QMShYZC.js";import{M as r}from"./MailboxPane-dO1WtQIE.js";import"./useInfiniteQuery-CneHLmnO.js";import"./MessageToolbar-BK8iddsy.js";import"./MessageBody-bibpHbC1.js";import"./kbd-BD-ER_Yv.js";import"./search-scope-DowTds7f.js";import"./app-chrome-BtWv1mrl.js";import"./nav-link-BaRr8ufx.js";import"./useMediaQuery-BL50IiYB.js";import"./reply-CdhmgK8D.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./roving-focus-CfNxjWPW.js";import"./chevron-down-CHMH78GK.js";import"./search-token-index-Qe9FLPUx.js";import"./useQueries-B2w-f15M.js";import"./useLabels-BiYidhrJ.js";import"./index-Baytk5ez.js";import"./useSignature-DQ-8mjVB.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-nIbP08sa.js";import"./suggest-list-BU1CAWaS.js";import"./sections-aErIO9A7.js";import"./useJunkMailboxIds-BCvLXlA_.js";import"./badge-CoJzTE5F.js";import"./undo-2-D6HzUJ41.js";import"./DropdownMenu-CgMO6e8h.js";import"./refresh-cw-D43K-uJ_.js";import"./popover-menu-CNRsrfGN.js";import"./ErrorState-DHsQU1XS.js";import"./mail-DZhnB5_L.js";import"./download-BGcYYhWw.js";import"./avatar-BLhNXW-W.js";import"./EmptyState-FjON9Ve2.js";import"./circle-question-mark-BJ-7TUgf.js";import"./useFilters-C3QPNclJ.js";import"./select-Bar5gCGO.js";import"./plus-ivySO7aD.js";import"./calendar-suggestion-CJMwfDpf.js";import"./useCalendarSuggestions-dbmN8tRh.js";import"./agenda-time--0lz2pGX.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-BRsmtlld.js";import"./calendar-failure-note-DlpRkxBL.js";import"./checkbox-ImKY_DpK.js";import"./clock-CcJSq9G-.js";import"./segmented-control-CZRUmZT-.js";import"./useLayoutTier-c01ZWqQ0.js";import"./menu-BQAGsNoE.js";import"./folder-input-uYHmZSIB.js";import"./confirm-dialog-Nw9MwHVJ.js";import"./label-chip-D6mHiJlY.js";import"./cloud-off-KCT2nWKe.js";import"./useRefreshControl-C-8PJltS.js";import"./circle-check-big-D7T0Fr-Y.js";import"./LabelApplyTrigger-BLIxuWTi.js";import"./MailViewChrome-By52WjOW.js";import"./NavMenuButton-DMqlg3at.js";import"./shield-check-C-ddv9so.js";import"./bottom-sheet-BSnl2giv.js";import"./circle-check-bdTVfKb7.js";function so(){return o.jsx(r.Reading,{})}export{so as component};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-9QMShYZC.js";import{C as t}from"./CollectionPane-DH6KjfeW.js";import"./useCollectionThreads-bR-HQDXT.js";import"./useQueries-B2w-f15M.js";import"./useInfiniteQuery-CneHLmnO.js";import"./MessageToolbar-BK8iddsy.js";import"./MessageBody-bibpHbC1.js";import"./kbd-BD-ER_Yv.js";import"./search-scope-DowTds7f.js";import"./app-chrome-BtWv1mrl.js";import"./nav-link-BaRr8ufx.js";import"./useMediaQuery-BL50IiYB.js";import"./reply-CdhmgK8D.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./roving-focus-CfNxjWPW.js";import"./chevron-down-CHMH78GK.js";import"./search-token-index-Qe9FLPUx.js";import"./useLabels-BiYidhrJ.js";import"./index-Baytk5ez.js";import"./useSignature-DQ-8mjVB.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-nIbP08sa.js";import"./suggest-list-BU1CAWaS.js";import"./sections-aErIO9A7.js";import"./useJunkMailboxIds-BCvLXlA_.js";import"./badge-CoJzTE5F.js";import"./undo-2-D6HzUJ41.js";import"./DropdownMenu-CgMO6e8h.js";import"./refresh-cw-D43K-uJ_.js";import"./popover-menu-CNRsrfGN.js";import"./ErrorState-DHsQU1XS.js";import"./mail-DZhnB5_L.js";import"./download-BGcYYhWw.js";import"./avatar-BLhNXW-W.js";import"./EmptyState-FjON9Ve2.js";import"./circle-question-mark-BJ-7TUgf.js";import"./useFilters-C3QPNclJ.js";import"./select-Bar5gCGO.js";import"./plus-ivySO7aD.js";import"./calendar-suggestion-CJMwfDpf.js";import"./useCalendarSuggestions-dbmN8tRh.js";import"./agenda-time--0lz2pGX.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-BRsmtlld.js";import"./calendar-failure-note-DlpRkxBL.js";import"./checkbox-ImKY_DpK.js";import"./clock-CcJSq9G-.js";import"./segmented-control-CZRUmZT-.js";import"./useLayoutTier-c01ZWqQ0.js";import"./menu-BQAGsNoE.js";import"./folder-input-uYHmZSIB.js";import"./confirm-dialog-Nw9MwHVJ.js";import"./label-chip-D6mHiJlY.js";import"./cloud-off-KCT2nWKe.js";import"./MailViewChrome-By52WjOW.js";import"./wizard-selection-zWa1qc6-.js";function mo(){return o.jsx(t.Reading,{})}export{mo as component};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-9QMShYZC.js";import{C as t}from"./CollectionPane-DH6KjfeW.js";import"./useCollectionThreads-bR-HQDXT.js";import"./useQueries-B2w-f15M.js";import"./useInfiniteQuery-CneHLmnO.js";import"./MessageToolbar-BK8iddsy.js";import"./MessageBody-bibpHbC1.js";import"./kbd-BD-ER_Yv.js";import"./search-scope-DowTds7f.js";import"./app-chrome-BtWv1mrl.js";import"./nav-link-BaRr8ufx.js";import"./useMediaQuery-BL50IiYB.js";import"./reply-CdhmgK8D.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./roving-focus-CfNxjWPW.js";import"./chevron-down-CHMH78GK.js";import"./search-token-index-Qe9FLPUx.js";import"./useLabels-BiYidhrJ.js";import"./index-Baytk5ez.js";import"./useSignature-DQ-8mjVB.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-nIbP08sa.js";import"./suggest-list-BU1CAWaS.js";import"./sections-aErIO9A7.js";import"./useJunkMailboxIds-BCvLXlA_.js";import"./badge-CoJzTE5F.js";import"./undo-2-D6HzUJ41.js";import"./DropdownMenu-CgMO6e8h.js";import"./refresh-cw-D43K-uJ_.js";import"./popover-menu-CNRsrfGN.js";import"./ErrorState-DHsQU1XS.js";import"./mail-DZhnB5_L.js";import"./download-BGcYYhWw.js";import"./avatar-BLhNXW-W.js";import"./EmptyState-FjON9Ve2.js";import"./circle-question-mark-BJ-7TUgf.js";import"./useFilters-C3QPNclJ.js";import"./select-Bar5gCGO.js";import"./plus-ivySO7aD.js";import"./calendar-suggestion-CJMwfDpf.js";import"./useCalendarSuggestions-dbmN8tRh.js";import"./agenda-time--0lz2pGX.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-BRsmtlld.js";import"./calendar-failure-note-DlpRkxBL.js";import"./checkbox-ImKY_DpK.js";import"./clock-CcJSq9G-.js";import"./segmented-control-CZRUmZT-.js";import"./useLayoutTier-c01ZWqQ0.js";import"./menu-BQAGsNoE.js";import"./folder-input-uYHmZSIB.js";import"./confirm-dialog-Nw9MwHVJ.js";import"./label-chip-D6mHiJlY.js";import"./cloud-off-KCT2nWKe.js";import"./MailViewChrome-By52WjOW.js";import"./wizard-selection-zWa1qc6-.js";function mo(){return o.jsx(t.Reading,{})}export{mo as component};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-9QMShYZC.js";import{O as t}from"./OutboxPane-BwIG-6n1.js";import"./MessageBody-bibpHbC1.js";import"./kbd-BD-ER_Yv.js";import"./search-scope-DowTds7f.js";import"./app-chrome-BtWv1mrl.js";import"./nav-link-BaRr8ufx.js";import"./useMediaQuery-BL50IiYB.js";import"./reply-CdhmgK8D.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-DMqlg3at.js";import"./menu-BQAGsNoE.js";import"./roving-focus-CfNxjWPW.js";import"./circle-check-big-D7T0Fr-Y.js";import"./clock-CcJSq9G-.js";import"./row-actions-DMyxcQFg.js";import"./rotate-ccw-DY-C3cnl.js";function g(){return o.jsx(t.Reading,{})}export{g as component};
@@ -0,0 +1 @@
1
+ import{O as o}from"./index-9QMShYZC.js";const n=o;export{n as component};
@@ -1 +1 @@
1
- import{ae as m,ab as l,u as c,af as S,r as g,j as e}from"./index-yeSesYv-.js";import{N as u}from"./nav-link-BvlYCbp-.js";import{a as d}from"./sections-uFHlOXiA.js";import{S as x}from"./settings-screen-CafoSGzb.js";import"./useMediaQuery-Bf7zukl9.js";import"./avatar-B_QEsxCw.js";import"./badge-CeCxCmzS.js";import"./chevron-left-CNQ3caMn.js";import"./menu-Cn2tY52U.js";import"./circle-question-mark-CpApZe3H.js";function B(){const{slotId:o}=m.useParams(),t=l().find(({id:s})=>s===o),n=c(),i=S(),a=d(),[r,p]=g.useState(!0);return e.jsx(x,{items:i,activeId:o,title:t?t.label:"Section not found",help:t?.help,helpOpen:r,onToggleHelp:()=>p(s=>!s),onSelect:a,onBackToMail:()=>{n({to:"/mail"})},children:t?e.jsx(t.Component,{}):e.jsxs("div",{className:"space-y-3 text-sm text-fg-muted",children:[e.jsx("p",{children:"This settings section doesn't exist."}),e.jsx(u,{to:"/settings",variant:"inline",children:"Back to settings"})]})})}export{B as component};
1
+ import{ae as m,ab as l,u as c,af as S,r as g,j as e}from"./index-9QMShYZC.js";import{N as u}from"./nav-link-BaRr8ufx.js";import{a as d}from"./sections-aErIO9A7.js";import{S as x}from"./settings-screen-DjVJZ-eS.js";import"./useMediaQuery-BL50IiYB.js";import"./avatar-BLhNXW-W.js";import"./badge-CoJzTE5F.js";import"./chevron-left-Brxnh-p_.js";import"./menu-BQAGsNoE.js";import"./circle-question-mark-BJ-7TUgf.js";function B(){const{slotId:o}=m.useParams(),t=l().find(({id:s})=>s===o),n=c(),i=S(),a=d(),[r,p]=g.useState(!0);return e.jsx(x,{items:i,activeId:o,title:t?t.label:"Section not found",help:t?.help,helpOpen:r,onToggleHelp:()=>p(s=>!s),onSelect:a,onBackToMail:()=>{n({to:"/mail"})},children:t?e.jsx(t.Component,{}):e.jsxs("div",{className:"space-y-3 text-sm text-fg-muted",children:[e.jsx("p",{children:"This settings section doesn't exist."}),e.jsx(u,{to:"/settings",variant:"inline",children:"Back to settings"})]})})}export{B as component};
@@ -0,0 +1 @@
1
+ import{O as o}from"./index-9QMShYZC.js";const n=o;export{n as component};
@@ -0,0 +1 @@
1
+ import{O as o}from"./index-9QMShYZC.js";const n=o;export{n as component};
@@ -0,0 +1 @@
1
+ import{O as o}from"./index-9QMShYZC.js";const n=o;export{n as component};
@@ -0,0 +1 @@
1
+ import{O as o}from"./index-9QMShYZC.js";const n=o;export{n as component};