@remit/web-client-dist 0.0.684 → 0.0.685

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 (187) hide show
  1. package/assets/{BriefPane-DKV1iFiW.js → BriefPane-BfKwBxLe.js} +1 -1
  2. package/assets/{CalendarEventEditor-BVJVcn8c.js → CalendarEventEditor-Bsugk6rT.js} +1 -1
  3. package/assets/{CalendarEventPopup-BY5hHIwf.js → CalendarEventPopup-C-BVvxfV.js} +1 -1
  4. package/assets/{CalendarLoadFailed-CFhSME4B.js → CalendarLoadFailed-DcrF_lyr.js} +1 -1
  5. package/assets/{CalendarQuickCreate-AsCrUcAa.js → CalendarQuickCreate-_ki0X3rq.js} +1 -1
  6. package/assets/{CalendarSession-DRZ92kL4.js → CalendarSession-CK-EC1yK.js} +1 -1
  7. package/assets/{DesktopChrome-C8Sk2ut7.js → DesktopChrome-BfOVbUXt.js} +1 -1
  8. package/assets/{DropdownMenu-DB36Lfi7.js → DropdownMenu-B4qvRStt.js} +1 -1
  9. package/assets/{EmptyState-DjjWzqfi.js → EmptyState-BYR2eIr2.js} +1 -1
  10. package/assets/{ErrorState-k3wt6L_r.js → ErrorState-BXxvOnci.js} +1 -1
  11. package/assets/{FlaggedPane-BKSCs9yQ.js → FlaggedPane-F0FM2UJN.js} +1 -1
  12. package/assets/{FullCompose-Um26w7lB.js → FullCompose-DEhDpjci.js} +1 -1
  13. package/assets/{LabelApplyTrigger-BYIdJG0t.js → LabelApplyTrigger-C4ode0Y9.js} +1 -1
  14. package/assets/{MailShell-Dy-TBL0C.js → MailShell-DvQDMygz.js} +1 -1
  15. package/assets/{MailViewChrome-DbIMXxXm.js → MailViewChrome-D66Dcy3c.js} +1 -1
  16. package/assets/{MailboxPane-DE0MG44k.js → MailboxPane-BDYnlpr2.js} +1 -1
  17. package/assets/{MessageBody-CQSDERa-.js → MessageBody-CDTfM1lc.js} +4 -4
  18. package/assets/{MessageToolbar-DBu6zN25.js → MessageToolbar-BW852rJj.js} +1 -1
  19. package/assets/{NavMenuButton-DwbUNWYU.js → NavMenuButton-BZWw6TBA.js} +1 -1
  20. package/assets/{OnboardingWizard-G419TXSu.js → OnboardingWizard-Bppp1CPR.js} +1 -1
  21. package/assets/OutboxPane-B_ihIEGn.js +1 -0
  22. package/assets/{ReportLink-By19dSP-.js → ReportLink-CwxUgr_7.js} +1 -1
  23. package/assets/_calendarObjectId-CSwodc6y.js +1 -0
  24. package/assets/_mailboxId-BlTWUSb1.js +1 -0
  25. package/assets/_messageId-BaqNxGqi.js +1 -0
  26. package/assets/_messageId-DNtVsPPW.js +1 -0
  27. package/assets/_messageId-ciVFKEzn.js +1 -0
  28. package/assets/_outboxMessageId-LLqtF8cH.js +1 -0
  29. package/assets/_recurrenceId-G4qPwsrp.js +1 -0
  30. package/assets/{_slotId-B0VWha3i.js → _slotId-D9HVYRDd.js} +1 -1
  31. package/assets/_threadId-BAVZ7S8M.js +1 -0
  32. package/assets/_threadId-DL34NZT4.js +1 -0
  33. package/assets/_threadId-qmAQ7RKu.js +1 -0
  34. package/assets/{_view._date-9VfJM2qY.js → _view._date-DCmCYHjG.js} +1 -1
  35. package/assets/{account-service-status-CADf5pX0.js → account-service-status-D-hGpg9e.js} +1 -1
  36. package/assets/{accounts-CrGdo3ni.js → accounts-BcJ04H8d.js} +1 -1
  37. package/assets/{advanced-CHxdFeri.js → advanced-DnA-3VCS.js} +1 -1
  38. package/assets/{agenda-time-0kHgN1IS.js → agenda-time-O7rJVIvd.js} +1 -1
  39. package/assets/{app-chrome-tFbuBSBl.js → app-chrome-DvUymvcE.js} +1 -1
  40. package/assets/{appearance-CmzgZOVO.js → appearance-CypE55tV.js} +1 -1
  41. package/assets/{avatar-BmY6XepY.js → avatar-BgqBWztU.js} +1 -1
  42. package/assets/{badge-DNMAx4D3.js → badge-CfQoDkmE.js} +1 -1
  43. package/assets/{bottom-sheet-C2SG5YmN.js → bottom-sheet-Dhk1Aqz2.js} +1 -1
  44. package/assets/brief-DcbZ7jHO.js +1 -0
  45. package/assets/{brief-DJx3XIOx.js → brief-DgC2R0u5.js} +1 -1
  46. package/assets/{calendar-DzAewYd3.js → calendar-BJu4Vl-g.js} +1 -1
  47. package/assets/{calendar-exLBND8p.js → calendar-Ix1rbLDg.js} +1 -1
  48. package/assets/{calendar-event-popup-BX4yyqgU.js → calendar-event-popup-B4-Dpgb6.js} +1 -1
  49. package/assets/{calendar-event-sidebar-DG9W-BJ-.js → calendar-event-sidebar-DZum-8WN.js} +1 -1
  50. package/assets/{calendar-failure-note-4QbINaXF.js → calendar-failure-note-DK-uzvky.js} +1 -1
  51. package/assets/{calendar-guests-C7ZBcQWB.js → calendar-guests-Diti9JO5.js} +1 -1
  52. package/assets/{calendar-suggestion-wnuXxa-h.js → calendar-suggestion-C8kx9fKn.js} +1 -1
  53. package/assets/{calendars-XiQ85lmu.js → calendars-ne1Oj2RW.js} +1 -1
  54. package/assets/{card-C42r2UXP.js → card-B-YLocTg.js} +1 -1
  55. package/assets/{checkbox-CjhlhVd0.js → checkbox-DL0pObJW.js} +1 -1
  56. package/assets/chevron-down-BWbeCM3N.js +1 -0
  57. package/assets/chevron-left-CliOUq1O.js +1 -0
  58. package/assets/{circle-check-B9p7FADR.js → circle-check-OUBTwy71.js} +1 -1
  59. package/assets/{circle-check-big-BTaxDmjy.js → circle-check-big-Czqmzl9y.js} +1 -1
  60. package/assets/{circle-help-B5aCQkW2.js → circle-help-DJ-Mtycd.js} +1 -1
  61. package/assets/classification-DLUltDdR.js +1 -0
  62. package/assets/{clock-CqDLo2F2.js → clock-Bw2dEIoB.js} +1 -1
  63. package/assets/compose._-_outboxMessageId_-CAx_e1OV.js +1 -0
  64. package/assets/compose._-_outboxMessageId_-CnWaV_IX.js +1 -0
  65. package/assets/compose._-_outboxMessageId_-Dmj8hyvT.js +1 -0
  66. package/assets/compose._-_outboxMessageId_-z980Xa6X.js +1 -0
  67. package/assets/{config-import-9beahVan.js → config-import-B6tjROvg.js} +1 -1
  68. package/assets/{confirm-dialog-By4KyYtA.js → confirm-dialog-sa45Xnmn.js} +1 -1
  69. package/assets/{copy-BYqJcNuv.js → copy-9W6V4dQI.js} +1 -1
  70. package/assets/{credential-steps-ioVIFoHi.js → credential-steps-P9fRg1pE.js} +1 -1
  71. package/assets/{download-DHu_VILi.js → download-O3cdl6IV.js} +1 -1
  72. package/assets/{draft-DBSWcwcO.js → draft-QkjvtbSZ.js} +1 -1
  73. package/assets/edit-B31QMGS3.js +1 -0
  74. package/assets/edit-DjkZZFBG.js +1 -0
  75. package/assets/{external-link-CbBMj0Z_.js → external-link-BYIIFw9_.js} +1 -1
  76. package/assets/{file-json-DbQ50vT6.js → file-json-vVOzTp-u.js} +1 -1
  77. package/assets/filters-DohRSViK.js +1 -0
  78. package/assets/{flagged-DCJxt3_p.js → flagged-BHlMmpp_.js} +1 -1
  79. package/assets/flagged-DIi4rqg8.js +1 -0
  80. package/assets/{folder-input-F5BBuwYo.js → folder-input-hVRteCio.js} +1 -1
  81. package/assets/{folders-CboZBGx6.js → folders-BFfd-sur.js} +1 -1
  82. package/assets/{help-copy-UAU_hrL0.js → help-copy-_K3IfQdg.js} +1 -1
  83. package/assets/{import-BsVMIlh9.js → import-ByOg30ul.js} +1 -1
  84. package/assets/index-BIhlBhBD.js +1 -0
  85. package/assets/index-BaqNxGqi.js +1 -0
  86. package/assets/{index-CjLIM85N.js → index-Bn8n_AsE.js} +3 -3
  87. package/assets/index-C53Z5hF_.js +1 -0
  88. package/assets/index-CRnDeQMw.js +1 -0
  89. package/assets/index-CzbtDE1H.js +1 -0
  90. package/assets/index-DNtVsPPW.js +1 -0
  91. package/assets/index-DR2Joq7n.js +1 -0
  92. package/assets/index-DbyBl7Lq.js +1 -0
  93. package/assets/index-cVALleyU.js +1 -0
  94. package/assets/index-ciVFKEzn.js +1 -0
  95. package/assets/{index-C8_kRlZw.js → index-k6LzEquX.js} +4 -4
  96. package/assets/{kbd-CMsSty4m.js → kbd-PiHV4odS.js} +1 -1
  97. package/assets/{label-chip-Dy8yMiFM.js → label-chip-BnNtXrWd.js} +1 -1
  98. package/assets/{labels-Dn7EENvK.js → labels-BQe-BkCj.js} +1 -1
  99. package/assets/{mail-ERxPLc6T.js → mail-BFIBAL7w.js} +1 -1
  100. package/assets/{mail-BYU-RvAA.js → mail-CPplAOgE.js} +1 -1
  101. package/assets/{menu-S5zj22BN.js → menu-znX-3dzE.js} +1 -1
  102. package/assets/{nav-link-BJFBTF93.js → nav-link-CtuHya9S.js} +1 -1
  103. package/assets/new-psckzAFd.js +1 -0
  104. package/assets/onboarding-B_l5ow67.js +1 -0
  105. package/assets/{onboarding-completion-BGw_CF3C.js → onboarding-completion-CKAiaYkS.js} +1 -1
  106. package/assets/outbox-BTiQbMrW.js +1 -0
  107. package/assets/{pencil-DhM7psiB.js → pencil-DA21sF5f.js} +1 -1
  108. package/assets/{people-CJWst29Y.js → people-BQjKSotc.js} +1 -1
  109. package/assets/{plus-CWdC1Tqr.js → plus-6ss9YFRF.js} +1 -1
  110. package/assets/{popover-menu-vk6Zc0z7.js → popover-menu-iCbmrU-E.js} +1 -1
  111. package/assets/{refresh-cw-B_uXAs1Z.js → refresh-cw-CUyjBEl4.js} +1 -1
  112. package/assets/{reply-jAIguvVh.js → reply-DmpF7cgR.js} +1 -1
  113. package/assets/{rich-text-BNKeOthA.js → rich-text-Cppy56p_.js} +1 -1
  114. package/assets/{rich-text-spellcheck-worker-provider-Cpg7LbTE.js → rich-text-spellcheck-worker-provider-Bk2_kAe9.js} +1 -1
  115. package/assets/{rotate-ccw-BO87SEMT.js → rotate-ccw-Dtkxt0CH.js} +1 -1
  116. package/assets/{roving-focus-DxrxBKOA.js → roving-focus-CzX6YmR4.js} +1 -1
  117. package/assets/{row-actions-B2Y3De5s.js → row-actions-Cn7bQ_Ks.js} +1 -1
  118. package/assets/{search-mirror-aqcvRPsg.js → search-mirror-BSzHMUcd.js} +1 -1
  119. package/assets/{search-scope-m65PO2OM.js → search-scope-Cl87snrn.js} +1 -1
  120. package/assets/{search-token-index-BV0MxVc4.js → search-token-index-BSaB7qLo.js} +1 -1
  121. package/assets/{sections-1CLsW1zC.js → sections-DwdsQ0ad.js} +1 -1
  122. package/assets/{segmented-control-D85OUPJd.js → segmented-control-68-bWTGV.js} +1 -1
  123. package/assets/{select-BccK4I_R.js → select-Cc2Vc4qL.js} +1 -1
  124. package/assets/{senders-NrVp71W0.js → senders-DwOfiVHu.js} +1 -1
  125. package/assets/settings-BdeAbD2h.js +1 -0
  126. package/assets/{settings-screen-B0brDUWW.js → settings-screen-IjQOks0s.js} +1 -1
  127. package/assets/{shield-check-nCSxAGzG.js → shield-check-jkVgxi6o.js} +1 -1
  128. package/assets/{suggest-list-CGKa8tfA.js → suggest-list-FaY4DThZ.js} +1 -1
  129. package/assets/{suggested-vips-D9HP0DVS.js → suggested-vips-BLlvjvH5.js} +1 -1
  130. package/assets/{suggestion._suggestionId-DYsuCqNh.js → suggestion._suggestionId-CL7hLrk-.js} +1 -1
  131. package/assets/{switch-BDBBnLpE.js → switch-a7x-CFTd.js} +1 -1
  132. package/assets/{task._calendarTaskId-DXwhwAoI.js → task._calendarTaskId-CkPsJj-a.js} +1 -1
  133. package/assets/{undo-2-DzniM_WO.js → undo-2-CnxBm8gd.js} +1 -1
  134. package/assets/{useCalendarData-CiACY6bV.js → useCalendarData-RUYA8D_t.js} +1 -1
  135. package/assets/{useCalendarScheduling-Brb1S1QL.js → useCalendarScheduling-CO3VOpcB.js} +1 -1
  136. package/assets/{useCalendarSuggestions-9OSR5bVj.js → useCalendarSuggestions-Bb4PGHae.js} +1 -1
  137. package/assets/{useCalendarTasks-DZa9ySo0.js → useCalendarTasks-RmI_Ij1j.js} +1 -1
  138. package/assets/{useDebouncedValue-m2WIWKGa.js → useDebouncedValue-I0sDLoIF.js} +1 -1
  139. package/assets/{useFilters-C1uvJ4Ho.js → useFilters-DT8SxgF4.js} +1 -1
  140. package/assets/{useLabels-BvI8jwIJ.js → useLabels-DO4UWjpG.js} +1 -1
  141. package/assets/{useLayoutTier-CL2fFLId.js → useLayoutTier-Cn3SwiV2.js} +1 -1
  142. package/assets/{useMediaQuery-Ct2USFCe.js → useMediaQuery-C00TiD5k.js} +1 -1
  143. package/assets/{useMessageBodyContent-MKSJN2kk.js → useMessageBodyContent-lqVkO1fM.js} +1 -1
  144. package/assets/{useQueries-DiYEl2LH.js → useQueries-Bs7-L_2j.js} +1 -1
  145. package/assets/{useRefreshControl-guVLGaLs.js → useRefreshControl-Bt-oDRnY.js} +1 -1
  146. package/assets/{useResultFolderIndex--Vh1kDTt.js → useResultFolderIndex-CALTzfWS.js} +1 -1
  147. package/assets/{useSignature-Ck8XWicp.js → useSignature-DRFIcifS.js} +1 -1
  148. package/assets/{warnings-CC5t4Lye.js → warnings-ClaUoDQx.js} +3 -3
  149. package/index.html +1 -1
  150. package/package.json +1 -1
  151. package/assets/OutboxPane-CijiwhdB.js +0 -1
  152. package/assets/_calendarObjectId-fr_DOSB5.js +0 -1
  153. package/assets/_mailboxId-rxS0aTPA.js +0 -1
  154. package/assets/_messageId-Dd8DtbFX.js +0 -1
  155. package/assets/_messageId-MltBMuB2.js +0 -1
  156. package/assets/_messageId-OX5-naZB.js +0 -1
  157. package/assets/_outboxMessageId-CR43Ykvj.js +0 -1
  158. package/assets/_recurrenceId-5xRvoQr3.js +0 -1
  159. package/assets/_threadId-PVllb6ST.js +0 -1
  160. package/assets/_threadId-QNe6ZU7G.js +0 -1
  161. package/assets/_threadId-kRDsdwV9.js +0 -1
  162. package/assets/brief-CDD1sD46.js +0 -1
  163. package/assets/chevron-down-DCUrV3H_.js +0 -1
  164. package/assets/chevron-left-Br4HtAWp.js +0 -1
  165. package/assets/classification-BQpRhmik.js +0 -1
  166. package/assets/compose._-_outboxMessageId_-0TViPHVJ.js +0 -1
  167. package/assets/compose._-_outboxMessageId_-12b-uBgV.js +0 -1
  168. package/assets/compose._-_outboxMessageId_-B3fhCxCx.js +0 -1
  169. package/assets/compose._-_outboxMessageId_-Bfz6_gPW.js +0 -1
  170. package/assets/edit-CDsGkq55.js +0 -1
  171. package/assets/edit-J4rkAx6h.js +0 -1
  172. package/assets/filters-CZ386C51.js +0 -1
  173. package/assets/flagged-C-zdu9Ko.js +0 -1
  174. package/assets/index-BBSi34NI.js +0 -1
  175. package/assets/index-BXFzm6T3.js +0 -1
  176. package/assets/index-DVR7EF8n.js +0 -1
  177. package/assets/index-DXkPJvhA.js +0 -1
  178. package/assets/index-DYGeUOj0.js +0 -1
  179. package/assets/index-Dd8DtbFX.js +0 -1
  180. package/assets/index-DfDT80hv.js +0 -1
  181. package/assets/index-MltBMuB2.js +0 -1
  182. package/assets/index-OX5-naZB.js +0 -1
  183. package/assets/index-vUwnX4dj.js +0 -1
  184. package/assets/new-apNYVdcM.js +0 -1
  185. package/assets/onboarding-BuXQ-yrG.js +0 -1
  186. package/assets/outbox-BZL_g_gu.js +0 -1
  187. package/assets/settings-ohqabhz3.js +0 -1
@@ -1,3 +1,3 @@
1
- import{r as V,u as go,ce as _o,G as Wt,l as Eo,a7 as yo,e as Ao,a as bo,cC as So,co as Ro}from"./index-CjLIM85N.js";import{e as Oo,f as wo}from"./reply-jAIguvVh.js";import{c as Do}from"./nav-link-BJFBTF93.js";function fn(n,o){(o==null||o>n.length)&&(o=n.length);for(var a=0,l=Array(o);a<o;a++)l[a]=n[a];return l}function Co(n){if(Array.isArray(n))return n}function Lo(n,o){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var l,c,p,h,F=[],A=!0,G=!1;try{if(p=(a=a.call(n)).next,o!==0)for(;!(A=(l=p.call(a)).done)&&(F.push(l.value),F.length!==o);A=!0);}catch(W){G=!0,c=W}finally{try{if(!A&&a.return!=null&&(h=a.return(),Object(h)!==h))return}finally{if(G)throw c}}return F}}function No(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as V,u as go,ce as _o,G as Wt,l as Eo,a7 as yo,e as Ao,a as bo,cC as So,co as Ro}from"./index-Bn8n_AsE.js";import{e as Oo,f as wo}from"./reply-DmpF7cgR.js";import{c as Do}from"./nav-link-CtuHya9S.js";function fn(n,o){(o==null||o>n.length)&&(o=n.length);for(var a=0,l=Array(o);a<o;a++)l[a]=n[a];return l}function Co(n){if(Array.isArray(n))return n}function Lo(n,o){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var l,c,p,h,F=[],A=!0,G=!1;try{if(p=(a=a.call(n)).next,o!==0)for(;!(A=(l=p.call(a)).done)&&(F.push(l.value),F.length!==o);A=!0);}catch(W){G=!0,c=W}finally{try{if(!A&&a.return!=null&&(h=a.return(),Object(h)!==h))return}finally{if(G)throw c}}return F}}function No(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Io(n,o){return Co(n)||Lo(n,o)||Mo(n,o)||No()}function Mo(n,o){if(n){if(typeof n=="string")return fn(n,o);var a={}.toString.call(n).slice(8,-1);return a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set"?Array.from(n):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?fn(n,o):void 0}}const wn=Object.entries,pn=Object.setPrototypeOf,Po=Object.isFrozen,Dn=Object.getPrototypeOf,Cn=Object.getOwnPropertyDescriptor;let O=Object.freeze,D=Object.seal,Tt=Object.create,Ln=typeof Reflect<"u"&&Reflect,De=Ln.apply,Ce=Ln.construct;O||(O=function(o){return o});D||(D=function(o){return o});De||(De=function(o,a){for(var l=arguments.length,c=new Array(l>2?l-2:0),p=2;p<l;p++)c[p-2]=arguments[p];return o.apply(a,c)});Ce||(Ce=function(o){for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];return new o(...l)});const $=E(Array.prototype.forEach),xo=E(Array.prototype.lastIndexOf),mn=E(Array.prototype.pop),Dt=E(Array.prototype.push),vo=E(Array.prototype.slice),ko=E(Array.prototype.splice),_t=Array.isArray,_e=Nn(Set),Ee=E(Set.prototype.add),Ct=E(Set.prototype.has),st=E(String.prototype.toLowerCase),ye=E(String.prototype.toString),dn=E(String.prototype.match),Lt=E(String.prototype.replace),hn=E(String.prototype.indexOf),Uo=E(String.prototype.trim),Fo=E(Number.prototype.toString),zo=E(Boolean.prototype.toString),Tn=typeof BigInt>"u"?null:E(BigInt.prototype.toString),gn=typeof Symbol>"u"?null:E(Symbol.prototype.toString),P=E(Object.prototype.hasOwnProperty),Nt=E(Object.prototype.toString),w=E(RegExp.prototype.test),j=Nn(TypeError);function E(n){return function(o){o instanceof RegExp&&(o.lastIndex=0);for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];return De(n,o,l)}}function Nn(n){return function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return Ce(n,a)}}function d(n,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:st;if(pn&&pn(n,null),!_t(o))return n;let l=o.length;for(;l--;){let c=o[l];if(typeof c=="string"){const p=a(c);p!==c&&(Po(o)||(o[l]=p),c=p)}n[c]=!0}return n}function Ho(n){for(let o=0;o<n.length;o++)P(n,o)||(n[o]=null);return n}function x(n){const o=Tt(null);for(const l of wn(n)){var a=Io(l,2);const c=a[0],p=a[1];P(n,c)&&(_t(p)?o[c]=Ho(p):p&&typeof p=="object"&&p.constructor===Object?o[c]=x(p):o[c]=p)}return o}function Bo(n){switch(typeof n){case"string":return n;case"number":return Fo(n);case"boolean":return zo(n);case"bigint":return Tn?Tn(n):"0";case"symbol":return gn?gn(n):"Symbol()";case"undefined":return Nt(n);case"function":case"object":{if(n===null)return Nt(n);const o=n,a=k(o,"toString");if(typeof a=="function"){const l=a(o);return typeof l=="string"?l:Nt(l)}return Nt(n)}default:return Nt(n)}}function k(n,o){for(;n!==null;){const l=Cn(n,o);if(l){if(l.get)return E(l.get);if(typeof l.value=="function")return E(l.value)}n=Dn(n)}function a(){return null}return a}function Go(n,o){for(;n!==null;){const a=Cn(n,o);if(a)return a.get?E(a.get):null;n=Dn(n)}return null}function Wo(n){try{return w(n,""),!0}catch{return!1}}const _n=O(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ae=O(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),be=O(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Yo=O(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Se=O(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$o=O(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),En=O(["#text"]),yn=O(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Re=O(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),An=O(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Yt=O(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jo=D(/{{[\w\W]*|^[\w\W]*}}/g),Vo=D(/<%[\w\W]*|^[\w\W]*%>/g),Xo=D(/\${[\w\W]*/g),Ko=D(/^data-[\-\w.\u00B7-\uFFFF]+$/),qo=D(/^aria-[\-\w]+$/),bn=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Qo=D(/^(?:\w+script|data):/i),Zo=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jo=D(/^html$/i),tr=D(/^[a-z][.\w]*(-[.\w]+)+$/i),Oe=D(/<[/\w!]/g),Sn=D(/<[/\w]/g),er=D(/<\/no(script|embed|frames)/i),Rn=D(/\/>/i),b={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},nr=O(d({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),or=function(){return typeof window>"u"?null:window},rr=function(o,a){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let l=null;const c="data-tt-policy-suffix";a&&a.hasAttribute(c)&&(l=a.getAttribute(c));const p="dompurify"+(l?"#"+l:"");try{return o.createPolicy(p,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+p+" could not be created."),null}},On=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Z=function(o,a,l,c){return P(o,a)&&_t(o[a])?d(c.base?x(c.base):{},o[a],c.transform):l},we=function(o,a,l){const c=P(o,a)?o[a]:void 0;return c&&typeof c=="object"?x(c):l()};function In(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:or();const o=s=>In(s);if(o.version="3.4.17",o.removed=[],!n||!n.document||n.document.nodeType!==b.document||!n.Element)return o.isSupported=!1,o;let a=n.document;const l=a,c=l.currentScript;n.DocumentFragment;const p=n.HTMLTemplateElement,h=n.Node,F=n.Element,A=n.NodeFilter;n.NamedNodeMap===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const G=n.DOMParser,W=n.trustedTypes,R=F.prototype,Et=k(R,"cloneNode"),yt=k(R,"remove"),It=k(R,"removeAttributeNode"),J=k(R,"nextSibling"),L=k(R,"childNodes"),X=k(R,"parentNode"),$t=k(R,"shadowRoot"),jt=k(R,"attributes"),tt=h&&h.prototype?k(h.prototype,"nodeType"):null,at=h&&h.prototype?k(h.prototype,"nodeName"):null,Mt=h&&h.prototype?k(h.prototype,"ownerDocument"):null,v=function(t){return tt?tt(t):t.nodeType},At=function(t){return at?at(t):t.nodeName},Ie=Go(R,"namespaceURI"),Vt=function(t){return Ie?Ie(t):t.namespaceURI};if(typeof p=="function"){const s=a.createElement("template");s.content&&s.content.ownerDocument&&(a=s.content.ownerDocument)}let N,et="",Xt,Me=!1,bt=0;const Pe=function(){if(bt>0)throw j('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},lt=function(t){Pe(),bt++;try{return N.createHTML(t)}finally{bt--}},Fn=function(t){Pe(),bt++;try{return N.createScriptURL(t)}finally{bt--}},zn=function(){return Me||(Xt=rr(W,c),Me=!0),Xt},Pt=a,Kt=Pt.implementation,xe=Pt.createNodeIterator,Hn=Pt.createDocumentFragment,Bn=Pt.getElementsByTagName,Gn=l.importNode;let T=On();o.isSupported=typeof wn=="function"&&typeof X=="function"&&Kt&&Kt.createHTMLDocument!==void 0;const Wn=jo,Yn=Vo,$n=Xo,jn=Ko,Vn=qo,Xn=Qo,ve=Zo,Kn=tr;let ke=bn,g=null;const qt=d({},[..._n,...Ae,...be,...Se,...En]);let _=null;const Qt=d({},[...yn,...Re,...An,...Yt]);let z=Object.seal(Tt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),St=null,Ue=null;const K=Object.seal(Tt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Fe=!0,Zt=!0,ze=!1,Jt=!0,Y=!1,nt=!0,ot=!1,te=!1,xt=null,vt=null,ee=!1,ct=!1,kt=!1,Ut=!1,He=!0,Be=!1;const Ge="user-content-";let ne=!0,oe=!1,rt=null,ut={},it=null;const We=d({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ye=null;const $e=d({},["audio","video","img","source","image","track"]);let je=null;const Ve=d({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ft="http://www.w3.org/1998/Math/MathML",zt="http://www.w3.org/2000/svg",H="http://www.w3.org/1999/xhtml";let ft=H,re=!1,ie=null;const qn=d({},[Ft,zt,H],ye),Xe=O(["mi","mo","mn","ms","mtext"]);let se=d({},Xe);const Ke=O(["annotation-xml"]);let ae=d({},Ke);const Qn=d({},["title","style","font","a","script"]);let Rt=null;const Zn=["application/xhtml+xml","text/html"],Jn="text/html";let y=null,pt=null;const to=a.createElement("form"),qe=function(t){return t instanceof RegExp||t instanceof Function},le=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pt&&pt===t)return;(!t||typeof t!="object")&&(t={}),t=x(t),Rt=Zn.indexOf(t.PARSER_MEDIA_TYPE)===-1?Jn:t.PARSER_MEDIA_TYPE,y=Rt==="application/xhtml+xml"?ye:st,g=Z(t,"ALLOWED_TAGS",qt,{transform:y}),_=Z(t,"ALLOWED_ATTR",Qt,{transform:y}),ie=Z(t,"ALLOWED_NAMESPACES",qn,{transform:ye}),je=Z(t,"ADD_URI_SAFE_ATTR",Ve,{transform:y,base:Ve}),Ye=Z(t,"ADD_DATA_URI_TAGS",$e,{transform:y,base:$e}),it=Z(t,"FORBID_CONTENTS",We,{transform:y}),St=Z(t,"FORBID_TAGS",x({}),{transform:y}),Ue=Z(t,"FORBID_ATTR",x({}),{transform:y}),ut=P(t,"USE_PROFILES")?t.USE_PROFILES&&typeof t.USE_PROFILES=="object"?x(t.USE_PROFILES):t.USE_PROFILES:!1,Fe=t.ALLOW_ARIA_ATTR!==!1,Zt=t.ALLOW_DATA_ATTR!==!1,ze=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Jt=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Y=t.SAFE_FOR_TEMPLATES||!1,nt=t.SAFE_FOR_XML!==!1,ot=t.WHOLE_DOCUMENT||!1,ct=t.RETURN_DOM||!1,kt=t.RETURN_DOM_FRAGMENT||!1,Ut=t.RETURN_TRUSTED_TYPE||!1,ee=t.FORCE_BODY||!1,He=t.SANITIZE_DOM!==!1,Be=t.SANITIZE_NAMED_PROPS||!1,ne=t.KEEP_CONTENT!==!1,oe=t.IN_PLACE||!1,ke=Wo(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:bn,ft=typeof t.NAMESPACE=="string"?t.NAMESPACE:H,se=we(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>d({},Xe)),ae=we(t,"HTML_INTEGRATION_POINTS",()=>d({},Ke));const e=we(t,"CUSTOM_ELEMENT_HANDLING",()=>Tt(null));if(z=Tt(null),P(e,"tagNameCheck")&&qe(e.tagNameCheck)&&(z.tagNameCheck=e.tagNameCheck),P(e,"attributeNameCheck")&&qe(e.attributeNameCheck)&&(z.attributeNameCheck=e.attributeNameCheck),P(e,"allowCustomizedBuiltInElements")&&typeof e.allowCustomizedBuiltInElements=="boolean"&&(z.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),D(z),Y&&(Zt=!1),kt&&(ct=!0),ut&&(g=d({},En),_=Tt(null),ut.html===!0&&(d(g,_n),d(_,yn)),ut.svg===!0&&(d(g,Ae),d(_,Re),d(_,Yt)),ut.svgFilters===!0&&(d(g,be),d(_,Re),d(_,Yt)),ut.mathMl===!0&&(d(g,Se),d(_,An),d(_,Yt))),K.tagCheck=null,K.attributeCheck=null,P(t,"ADD_TAGS")&&(typeof t.ADD_TAGS=="function"?K.tagCheck=t.ADD_TAGS:_t(t.ADD_TAGS)&&(g===qt&&(g=x(g)),d(g,t.ADD_TAGS,y))),P(t,"ADD_ATTR")&&(typeof t.ADD_ATTR=="function"?K.attributeCheck=t.ADD_ATTR:_t(t.ADD_ATTR)&&(_===Qt&&(_=x(_)),d(_,t.ADD_ATTR,y))),P(t,"ADD_FORBID_CONTENTS")&&_t(t.ADD_FORBID_CONTENTS)&&(it===We&&(it=x(it)),d(it,t.ADD_FORBID_CONTENTS,y)),ne&&(g["#text"]=!0),ot&&d(g,["html","head","body"]),g.table&&(d(g,["tbody"]),delete St.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw j('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw j('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const r=N;N=t.TRUSTED_TYPES_POLICY;try{et=lt("")}catch(i){throw N=r,i}}else t.TRUSTED_TYPES_POLICY===null?(N=void 0,et=""):(N===void 0&&(N=zn()),N&&typeof et=="string"&&(et=lt("")));O&&O(t),pt=t},Qe=d({},[...Ae,...be,...Yo]),Ze=d({},[...Se,...$o]),eo=function(t,e,r){return e.namespaceURI===H?t==="svg":e.namespaceURI===Ft?t==="svg"&&(r==="annotation-xml"||se[r]):!!Qe[t]},no=function(t,e,r){return e.namespaceURI===H?t==="math":e.namespaceURI===zt?t==="math"&&ae[r]:!!Ze[t]},oo=function(t,e,r){return e.namespaceURI===zt&&!ae[r]||e.namespaceURI===Ft&&!se[r]?!1:!Ze[t]&&(Qn[t]||!Qe[t])},ro=function(t){const e=Vt(t),r=st(At(t)),i=X(t);let u,f;return i&&v(i)===b.element?(u={namespaceURI:Vt(i)},f=st(At(i))):(u={namespaceURI:ft},f="template"),ie[e]?e===zt?eo(r,u,f):e===Ft?no(r,u,f):e===H?oo(r,u,f):!!(Rt==="application/xhtml+xml"&&ie[e]):!1},q=function(t){Dt(o.removed,{element:t});try{X(t).removeChild(t)}catch{if(yt(t),!X(t))throw j("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Je=function(t,e,r){try{It(t,e)}catch{try{t.removeAttribute(r)}catch{}}},ce=function(t){fe(t);const e=L(t);e&&$(vo(e),i=>{try{yt(i)}catch{}});const r=v(t)===b.element?jt(t):null;if(r)for(let i=r.length-1;i>=0;--i){const u=r[i],f=u&&u.name;typeof f=="string"&&Je(t,u,f)}},mt=function(t,e,r){if(!r)try{r=e.getAttributeNode(t)}catch{r=null}Dt(o.removed,{attribute:r||null,from:e});try{r?It(e,r):e.removeAttribute(t)}catch{try{e.removeAttribute(t)}catch{}}if(t==="is")if(ct||kt)try{q(e)}catch{}else try{e.setAttribute(t,"")}catch{}},tn=function(t){const e=jt(t);if(e)for(let r=e.length-1;r>=0;--r){const i=e[r],u=i&&i.name;typeof u!="string"||_[y(u)]||Je(t,i,u)}},ue=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=[t];for(;i.length>0;){const u=i.pop();if(e(u)===!1)continue;if(r&&v(u)===b.element){const m=$t(u);Q(m)&&i.push(m)}const f=L(u);if(f)for(let m=f.length-1;m>=0;--m)i.push(f[m])}},fe=function(t){ue(t,e=>{v(e)===b.element&&tn(e)})},pe=function(t){const e=[];return ue(t,r=>{e.push(r)},!0),e},io=function(t,e){const r=_e();$(pe(t),i=>{v(i)===b.element&&Ee(r,i)}),$(e,i=>{v(i)===b.element&&!Ct(r,i)&&tn(i)})},en=function(t,e){let r=!1;return $(o.removed,i=>{i.element&&(r=r||i.element===t,fe(i.element))}),io(t,e),r},so=8,ao=function(t,e){const r=rt;let i=null;const u=()=>(i||(i=_e(),$(e,f=>{Ee(i,f)})),i);for(let f=0;;f++){const m=pe(t),S=[t];let B=!1;if($(m,C=>{v(C)===b.documentFragment?Dt(S,C):!B&&!Ct(r,C)&&(B=Ct(u(),C))}),!B)return;if(f>=so)throw j("the tree kept changing during in-place sanitization; refusing to return it");$(S,(C,I)=>{lo(C,I>0,t,u())})}},lo=function(t,e,r,i){const u=me(t);let f;for(;f=u.nextNode();)!Ct(i,f)||Ct(rt,f)||(e&&U(T.uponSanitizeShadowNode,f,null),he(f,r),Te(f,r),Q(f.content)&&wt(f.content))},co=function(t){rt&&Ee(rt,t)},nn=function(t,e){return nt?t==="patchsrc"?!0:t==="for"&&e!=="label"&&e!=="output":!1},uo=function(t){nt&&ue(t,e=>{const r=v(e);if(r===b.processingInstruction||r===b.comment&&w(Sn,e.data)){try{yt(e)}catch{}return!1}if(r===b.element){const i=e,u=y(At(e));try{i.hasAttribute&&i.hasAttribute("patchsrc")&&i.removeAttribute("patchsrc"),i.hasAttribute&&i.hasAttribute("for")&&nn("for",u)&&i.removeAttribute("for")}catch{}}return!0})},on=function(t){let e=null,r=null;if(ee)t="<remove></remove>"+t;else{const f=dn(t,/^[\r\n\t ]+/);r=f&&f[0]}Rt==="application/xhtml+xml"&&ft===H&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const i=N?lt(t):t;if(ft===H)try{e=new G().parseFromString(i,Rt)}catch{}if(!e||!e.documentElement){e=Kt.createDocument(ft,"template",null);try{e.documentElement.innerHTML=re?et:i}catch{}}const u=e.body||e.documentElement;return t&&r&&u.insertBefore(a.createTextNode(r),u.childNodes[0]||null),ft===H?Bn.call(e,ot?"html":"body")[0]:ot?e.documentElement:u},me=function(t){const e=Mt?Mt(t):t.ownerDocument;return xe.call(e||t,t,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},Ht=function(t){return t=Lt(t,Wn," "),t=Lt(t,Yn," "),t=Lt(t,$n," "),t},de=function(t){var e;rn(t);const r=(e=t.querySelectorAll)===null||e===void 0?void 0:e.call(t,"template");r&&$(r,i=>{Q(i.content)&&de(i.content)})},rn=function(t){t.normalize();const e=Mt?Mt(t):t.ownerDocument,r=xe.call(e||t,t,A.SHOW_TEXT|A.SHOW_COMMENT|A.SHOW_CDATA_SECTION|A.SHOW_PROCESSING_INSTRUCTION,null);let i=r.nextNode();for(;i;)i.data=Ht(i.data),i=r.nextNode()},Bt=function(t){const e=at?at(t):null;return typeof e!="string"||y(e)!=="form"?!1:typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||t.attributes!==jt(t)||typeof t.removeAttribute!="function"||typeof t.removeAttributeNode!="function"||typeof t.getAttributeNode!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function"||t.nodeType!==tt(t)||t.childNodes!==L(t)},Q=function(t){if(!tt||typeof t!="object"||t===null)return!1;try{return tt(t)===b.documentFragment}catch{return!1}},Ot=function(t){if(!tt||typeof t!="object"||t===null)return!1;try{return typeof tt(t)=="number"}catch{return!1}};function U(s,t,e){s.length!==0&&$(s,r=>{r.call(o,t,e,pt)})}const fo=function(t,e){return!!(nt&&t.hasChildNodes()&&!Ot(t.firstElementChild)&&w(Oe,t.textContent)&&w(Oe,t.innerHTML)||nt&&nr[e]&&v(t)===b.element&&Vt(t)===H&&(Ot(t.firstElementChild)||typeof t.textContent=="string"&&w(Oe,t.textContent))||t.nodeType===b.processingInstruction||nt&&t.nodeType===b.comment&&w(Sn,t.data))},Gt=function(t,e){if(t instanceof RegExp)return w(t,e);if(t instanceof Function){for(var r=arguments.length,i=new Array(r>2?r-2:0),u=2;u<r;u++)i[u-2]=arguments[u];return!!t(e,...i)}return!1},po=function(t,e,r){if(!St[e]&&ln(e)&&Gt(z.tagNameCheck,e))return!1;if(ne&&!it[e]&&!it[st(e)]){const i=X(t),u=L(t);if(u&&i){const f=u.length;for(let m=f-1;m>=0;--m){const S=t===r?Et(u[m],!0):u[m];i.insertBefore(S,J(t))}}}return q(t),!0},sn=function(t,e,r,i){return t.length===0?e:e===r||e===i?x(e):e},dt=function(t,e){return t===e||X(t)!==null?!1:(oe&&fe(t),!0)},he=function(t,e){if(co(t),U(T.beforeSanitizeElements,t,null),dt(t,e))return!0;if(Bt(t))return q(t),!0;const r=y(At(t));if(g=sn(T.uponSanitizeElement,g,qt,xt),U(T.uponSanitizeElement,t,{tagName:r,allowedTags:g}),dt(t,e))return!0;if(fo(t,r))return q(t),!0;if(St[r]||!(K.tagCheck instanceof Function&&K.tagCheck(r))&&!g[r]){const i=po(t,r,e);return i===!1&&(U(T.afterSanitizeElements,t,null),dt(t,e))?!0:i}if(v(t)===b.element&&!ro(t)||(r==="noscript"||r==="noembed"||r==="noframes")&&w(er,t.innerHTML))return q(t),!0;if(Y&&t.nodeType===b.text){const i=Ht(t.textContent);t.textContent!==i&&(Dt(o.removed,{element:t.cloneNode()}),t.textContent=i)}return U(T.afterSanitizeElements,t,null),dt(t,e)},an=function(t,e,r){if(Ue[e]||nn(e,t)||He&&(e==="id"||e==="name")&&(r in a||r in to))return!1;const i=_[e]||K.attributeCheck instanceof Function&&K.attributeCheck(e,t);return Zt&&w(jn,e)||Fe&&w(Vn,e)?!0:i?je[e]||w(ke,Lt(r,ve,""))||(e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&hn(r,"data:")===0&&Ye[t]||ze&&!w(Xn,Lt(r,ve,""))?!0:!r:ln(t)&&Gt(z.tagNameCheck,t)&&Gt(z.attributeNameCheck,e,t)||e==="is"&&z.allowCustomizedBuiltInElements&&Gt(z.tagNameCheck,r)},mo=d({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ln=function(t){return!mo[st(t)]&&w(Kn,t)},ho=function(t,e,r,i){if(N&&typeof W=="object"&&typeof W.getAttributeType=="function"&&!r)switch(W.getAttributeType(t,e)){case"TrustedHTML":return lt(i);case"TrustedScriptURL":return Fn(i)}return i},To=function(t,e,r,i){try{return r?t.setAttributeNS(r,e,i):t.setAttribute(e,i),Bt(t)?(q(t),!1):!0}catch{return mt(e,t),!1}},cn=function(t,e){return nt&&w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,e)?!0:st(t)==="attributename"&&dn(e,"href")!==null},Te=function(t,e){if(U(T.beforeSanitizeAttributes,t,null),dt(t,e))return;const r=t.attributes;if(!r||Bt(t))return;_=sn(T.uponSanitizeAttribute,_,Qt,vt);const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_,forceKeepAttr:void 0};let u=r.length;const f=y(t.nodeName);for(;u--;){const m=r[u],S=m.name,B=m.namespaceURI,C=m.value,I=y(S),ht=C;let M=S==="value"?ht:Uo(ht),un=!1;if(i.attrName=I,i.attrValue=M,i.keepAttr=!0,i.forceKeepAttr=void 0,U(T.uponSanitizeAttribute,t,i),M=i.attrValue,Be&&(I==="id"||I==="name")&&hn(M,Ge)!==0&&(mt(S,t,m),M=Ge+M,un=!0),cn(S,M)){mt(S,t,m);continue}if(!i.forceKeepAttr){if(!i.keepAttr){mt(S,t,m);continue}if(!Jt&&w(Rn,M)){mt(S,t,m);continue}if(Y&&(M=Ht(M)),!an(f,I,M)){mt(S,t,m);continue}M=ho(f,I,B,M),M!==ht&&To(t,S,B,M)&&un&&mn(o.removed)}}U(T.afterSanitizeAttributes,t,null),dt(t,e)},wt=function(t){let e=null;const r=me(t);for(U(T.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)if(U(T.uponSanitizeShadowNode,e,null),he(e,t),Te(e,t),Q(e.content)&&wt(e.content),v(e)===b.element){const i=$t(e);Q(i)&&(ge(i),wt(i))}Y&&rn(t),U(T.afterSanitizeShadowDOM,t,null)},ge=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const r=e.pop();if(r.shadow){wt(r.shadow);continue}const i=r.node,u=v(i)===b.element,f=L(i);if(f)for(let m=f.length-1;m>=0;--m)e.push({node:f[m],shadow:null});if(u){const m=at?at(i):null;if(typeof m=="string"&&y(m)==="template"){const S=i.content;Q(S)&&e.push({node:S,shadow:null})}}if(u){const m=$t(i);Q(m)&&e.push({node:null,shadow:m},{node:m,shadow:null})}}};return o.sanitize=function(s){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,r=null,i=null,u=null;if(re=!s,re&&(s="<!-->"),typeof s!="string"&&!Ot(s)&&(s=Bo(s),typeof s!="string"))throw j("dirty is not a string, aborting");if(!o.isSupported)return s;te?(g=xt,_=vt):le(t),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(g=x(g)),T.uponSanitizeAttribute.length>0&&(_=x(_)),o.removed=[];const f=oe&&typeof s!="string"&&Ot(s);let m=[];const S=rt;if(f){uo(s);const I=At(s);if(typeof I=="string"){const ht=y(I);if(!g[ht]||St[ht])throw ce(s),j("root node is forbidden and cannot be sanitized in-place")}if(Bt(s))throw ce(s),j("root node is clobbered and cannot be sanitized in-place");m=pe(s),rt=_e()}else if(Ot(s))e=on("<!---->"),r=e.ownerDocument.importNode(s,!0),r.nodeType===b.element&&r.nodeName==="BODY"||r.nodeName==="HTML"?e=r:e.appendChild(r),ge(e);else{if(!ct&&!Y&&!ot&&s.indexOf("<")===-1)return N&&Ut?lt(s):s;if(e=on(s),!e)return ct?null:Ut?et:""}e&&ee&&q(e.firstChild);const B=f?s:e;try{f&&ge(s);const I=me(B);for(;i=I.nextNode();)he(i,B),Te(i,B),Q(i.content)&&wt(i.content);f&&ao(s,m)}catch(I){throw f&&(ce(s),en(s,m)),I}finally{rt=S}if(f){if(en(s,m))throw j("a node selected for removal could not be safely returned; refusing to sanitize in place");return Y&&de(s),s}if(ct){if(Y&&de(e),kt)for(u=Hn.call(e.ownerDocument);e.firstChild;)u.appendChild(e.firstChild);else u=e;return(_.shadowroot||_.shadowrootmode)&&(u=Gn.call(l,u,!0)),u}let C=ot?e.outerHTML:e.innerHTML;return ot&&g["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&w(Jo,e.ownerDocument.doctype.name)&&(C="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
3
3
  `+C),Y&&(C=Ht(C)),N&&Ut?lt(C):C},o.setConfig=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le(s),te=!0,xt=g,vt=_},o.clearConfig=function(){pt=null,te=!1,xt=null,vt=null,N=Xt,et=""},o.isValidAttribute=function(s,t,e){pt||le({});const r=y(s),i=y(t);return typeof e=="string"&&(cn(t,e)||!Jt&&w(Rn,e))?!1:an(r,i,e)},o.addHook=function(s,t){typeof t=="function"&&P(T,s)&&Dt(T[s],t)},o.removeHook=function(s,t){if(P(T,s)){if(t!==void 0){const e=xo(T[s],t);return e===-1?void 0:ko(T[s],e,1)[0]}return mn(T[s])}},o.removeHooks=function(s){P(T,s)&&(T[s]=[])},o.removeAllHooks=function(){T=On()},o}var Ar=In();const Mn="/mail/brief/compose/{-$outboxMessageId}",Pn="/mail/flagged/compose/{-$outboxMessageId}",xn="/mail/outbox/compose/{-$outboxMessageId}",vn="/mail/$mailboxId/compose/{-$outboxMessageId}";function kn(){const n=Wt({from:Mn,shouldThrow:!1}),o=Wt({from:Pn,shouldThrow:!1}),a=Wt({from:xn,shouldThrow:!1}),l=Wt({from:vn,shouldThrow:!1});return n??o??a??l}function br(){return kn()!==void 0}function Sr(){return kn()?.outboxMessageId}function ir(n,o,a){return n==="flagged"?{to:Pn,params:{outboxMessageId:a}}:n==="outbox"?{to:xn,params:{outboxMessageId:a}}:n==="mailbox"&&o?{to:vn,params:{mailboxId:o,outboxMessageId:a}}:{to:Mn,params:{outboxMessageId:a}}}function Ne(){const n=go(),o=Do(),{list:a,mailboxId:l}=Oo();return V.useCallback((c,p)=>{n({...ir(a,l,c),search:_o,hash:p?.keepPanels?!0:o,replace:p?.replace??!1})},[n,o,a,l])}function Rr(){const n=Ne();return V.useCallback(()=>n(void 0),[n])}function Or(){const n=Ne();return V.useCallback(o=>n(o),[n])}function wr(){const n=Ne();return V.useCallback(o=>n(o,{replace:!0,keepPanels:!0}),[n])}function Dr(){return wo()}const sr=new Set(["rfc822","global"]),ar=n=>n.mediaType.toUpperCase()==="MESSAGE"&&sr.has(n.mediaSubtype.toLowerCase()),Un=(n,o)=>n.partPath.startsWith(`${o}.`),lr=n=>{const o=n.filter(ar);return n.filter(a=>!o.some(l=>Un(a,l.partPath)))},Cr=(n,o)=>n.filter(a=>Un(a,o)),cr=n=>{const o=lr(n).filter(c=>!c.isMultipart&&c.disposition!=="attachment"&&c.mediaType==="TEXT"&&c.contentUrl.length>0),a=o.find(c=>c.mediaSubtype.toUpperCase()==="HTML");if(a)return{kind:"html",contentUrl:a.contentUrl};const l=o.find(c=>c.mediaSubtype.toUpperCase()==="PLAIN");return l?{kind:"text",contentUrl:l.contentUrl}:null},Le={all:["messages"],detail:n=>[...Le.all,"detail",n],body:n=>[...Le.detail(n),"body"]};class gt extends Error{reason;status;retryAfterSeconds;constructor(o,a,l,c){super(a),this.name="BodyFetchError",this.reason=o,this.status=l,this.retryAfterSeconds=c}}const ur=n=>{const o=Number.parseInt(n??"",10);return!Number.isFinite(o)||o<=0?1:Math.min(o,30)},fr=8,pr="x-remit-403-reason",mr=(n,o)=>{const a=o?.trim()??"";return n===401?"auth":n===403?a.length>0?"auth":"body-missing":n===404?"body-missing":"generic"},dr=(n,o)=>(o??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(n):!1,hr=(n,o)=>{const a=(o??"").toLowerCase();return!!(n==="text"&&a.startsWith("text/html"))},Tr=async(n,o,a=async()=>null)=>{const l={},c=await a();c&&(l.Authorization=`Bearer ${c}`);const p=await Ro(n,{headers:l});if(p.status===202)throw new gt("not-ready","Message body is still syncing",202,ur(p.headers.get("Retry-After")));if(!p.ok){const A=p.headers.get(pr),G=mr(p.status,A);throw new gt(G,`Failed to load message body (${p.status} ${p.statusText})`,p.status)}const h=p.headers.get("content-type");if(hr(o,h))throw new gt("content-type-mismatch",`Refusing to render message body — expected ${o}, got Content-Type ${h}`);const F=await p.text();if(dr(F,h))throw new gt("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return F},gr=async(n,o)=>(o.isRetryAfterNotReady&&await n.refetchDescribeMessage(),n.fetchContent(o.contentUrl,o.kind)),Lr=({messageId:n,bodyParts:o,enabled:a=!0})=>{const l=o?cr(o):null,c=Eo(),{getToken:p}=yo(),h=V.useRef(null),F=Ao(),A=V.useRef(!1),G=V.useRef(null),W=n&&l?`${n}:${l.contentUrl}`:null;G.current!==W&&(G.current=W,A.current=!1);const R=bo({queryKey:n?[...Le.body(n),l?.contentUrl??null]:["messages","body","noop"],queryFn:()=>{if(!l)throw new Error("No renderable body part");if(!n)throw new Error("No messageId");const J=A.current;return A.current=!1,gr({fetchContent:(L,X)=>Tr(L,X,p),refetchDescribeMessage:()=>F.refetchQueries({queryKey:So({path:{messageId:n}})})},{contentUrl:l.contentUrl,kind:l.kind,isRetryAfterNotReady:J})},enabled:a&&!!n&&!!l,staleTime:300*1e3,gcTime:1800*1e3,retry:(J,L)=>L instanceof gt&&L.reason==="not-ready"?J<fr:J<1,retryDelay:(J,L)=>L instanceof gt&&L.reason==="not-ready"?(A.current=!0,(L.retryAfterSeconds??1)*1e3):1e3,meta:{softError:!0}}),Et=R.isLoading&&!!l,yt=o!==void 0&&l===null;V.useEffect(()=>{Et&&(h.current=performance.now())},[Et]),V.useEffect(()=>{R.isSuccess&&h.current!==null&&(c.recordTiming("message.body.load",Math.round(performance.now()-h.current)),h.current=null)},[R.isSuccess,c]);const It=R.data&&l?{kind:l.kind,body:R.data}:void 0;return{picked:l,data:It,isLoading:Et,hasNoRenderablePart:yt,isError:R.isError,error:R.error,refetch:R.refetch}};export{gt as B,br as a,Lr as b,mr as c,Sr as d,wr as e,Dr as f,Or as g,Cr as h,ar as i,lr as o,Ar as p,Rr as u};
@@ -1 +1 @@
1
- import{cD as Q,cE as y,cF as S,cG as w,cH as C,e as k,cI as M,cJ as q,r as p,cK as x,cL as H,cM as L,cN as P,cO as v,cP as B,cQ as A}from"./index-CjLIM85N.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function I(r,e,s){const t=r.slice(0);return t[e]=s,t}var T=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#a(t,s)]}#a(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=I(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function D({queries:r,...e},s){const t=k(),i=M(),n=q(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{x(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new T(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>v(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&v(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const O=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(O?.error)throw O.error;return b(o())}export{D as u};
1
+ import{cD as Q,cE as y,cF as S,cG as w,cH as C,e as k,cI as M,cJ as q,r as p,cK as x,cL as H,cM as L,cN as P,cO as v,cP as B,cQ as A}from"./index-Bn8n_AsE.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function I(r,e,s){const t=r.slice(0);return t[e]=s,t}var T=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#a(t,s)]}#a(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=I(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function D({queries:r,...e},s){const t=k(),i=M(),n=q(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{x(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new T(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>v(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&v(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const O=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(O?.error)throw O.error;return b(o())}export{D as u};
@@ -1 +1 @@
1
- import{j as E,v as K,p as Q,B as U,e as N,J as B,r as o,aF as R,P as $,Q as z,l as G,a0 as I,a1 as X,a4 as J}from"./index-CjLIM85N.js";import{C as V}from"./circle-check-big-BTaxDmjy.js";import{R as Y}from"./refresh-cw-B_uXAs1Z.js";import{u as P}from"./useQueries-DiYEl2LH.js";function ye({state:e,onRefresh:s,label:t,errorMessage:r,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",n=e==="error",h=e==="success",y=n?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(V,{className:"size-4 text-positive"}):E.jsx(Y,{className:Q("size-4",i&&"animate-spin")}),w=n?`${t} — failed: ${r??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:y,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:n?r:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const Z=180*1e3,Se=30*1e3;let L=0;const M=new Set,ee=(e=Date.now())=>{L=e+Z;for(const s of M)s()},we=(e=Date.now())=>e<L,xe=e=>(M.add(e),()=>{M.delete(e)}),_=6e4,te=new Set(["sent","drafts","trash","archive"]),C=(e,s)=>{const t=new Map;for(const r of e){const a=s.get(r.mailboxId)?.role;a&&te.has(a)||t.set(r.mailboxId,r.highWaterMarkUid)}return t},F=(e,s)=>{const t=[];for(const[r,a]of s)a>(e.get(r)??0)&&t.push(r);return t},se=(e,s)=>F(e,s).length>0,q=o.createContext(null),ne=()=>{const e=o.useContext(q);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function pe({accountIds:e,children:s}){const t=N(),{resultFolderIndex:r}=B(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,n]=o.useState(new Set),h=P({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:_,staleTime:_,meta:{softError:!0}}))}),y=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=C(b.mailboxes??[],r),v=c.current.get(d);if(c.current.set(d,g),v){const A=F(v,g);A.length>0&&$(t,z(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const W=a.current.get(d)??new Map;se(W,g)&&(f.add(d),l=!0)}),l&&n(f)},[w,y]);const S=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{n(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(R({path:{accountId:f}}).queryKey);a.current.set(f,C(d?.mailboxes??[],r)),u.current.add(f)}},[t,r]),m=o.useMemo(()=>({hasNewMail:S,acknowledge:x}),[S,x]);return E.jsx(q.Provider,{value:m,children:s})}const re=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function j(e){return!!e&&re.has(e)}const D=3e3,oe=D*2,O={syncing:!1,resolved:!1,synced:0,total:0};function Ee(e,s){const t=e.join(","),[r,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),oe);return()=>clearTimeout(m)},[t,s]);const i=P({queries:e.map(m=>({...R({path:{accountId:m}}),enabled:s&&!r,refetchInterval:D,meta:{softError:!0}}))}),n=i.every(m=>m.isSuccess||m.isError),h=i.length===0||n||u;let y=!1,w=0,S=0;for(const m of i)if(j(m.data?.syncPhase)){y=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,S+=l.messagesTotal}const x=s&&h&&!y;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?O:{syncing:y,resolved:!0,synced:w,total:S}}const ae=2e3,ie=45e3,ce=e=>new Promise(s=>setTimeout(s,e)),k=e=>e instanceof Error&&e.message?e.message:"Something went wrong",ue=e=>{J(e,{softError:!0})},T=(e,s)=>e.fetchQuery({...R({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,le=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:r=0,onInboxSynced:a,deadline:u,pollMs:c=ae})=>{let i=!1;for(;;){const n=await s().then(S=>({ok:!0,data:S})).catch(S=>({ok:!1,error:S}));if(!n.ok)return{accountId:e,message:k(n.error)};const{syncPhase:h,lastSyncAt:y}=n.data;if((y??0)>t&&!j(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(n.data)>r&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ce(c)}},fe=async(e,s,t,r,a)=>{const u=await T(e,t).then(n=>({ok:!0,lastSyncAt:n.lastSyncAt??0,inboxSyncedAt:H(n)})).catch(n=>({ok:!1,error:n}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(n=>({ok:!1,error:n}));if(!c.ok)return ue(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await le({accountId:t,readStatus:()=>T(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:r});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},be=(e,s={})=>{const t=N(),r=G(),{acknowledge:a}=ne(),[u,c]=o.useState("idle"),[i,n]=o.useState(),h=o.useRef(0),y=o.useRef(e);y.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const S=o.useCallback(()=>{const x=y.current;if(x.length===0){c("error"),n("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),n(void 0),ee();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ie,d=await Promise.all(x.map(g=>fe(t,r,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),n(b[0]?.message))})()},[a,t,r]);return{state:u,errorMessage:i,refresh:S}};export{Se as H,pe as M,ye as R,be as a,j as b,Ee as c,we as i,xe as s,ne as u};
1
+ import{j as E,v as K,p as Q,B as U,e as N,J as B,r as o,aF as R,P as $,Q as z,l as G,a0 as I,a1 as X,a4 as J}from"./index-Bn8n_AsE.js";import{C as V}from"./circle-check-big-Czqmzl9y.js";import{R as Y}from"./refresh-cw-CUyjBEl4.js";import{u as P}from"./useQueries-Bs7-L_2j.js";function ye({state:e,onRefresh:s,label:t,errorMessage:r,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",n=e==="error",h=e==="success",y=n?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(V,{className:"size-4 text-positive"}):E.jsx(Y,{className:Q("size-4",i&&"animate-spin")}),w=n?`${t} — failed: ${r??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:y,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:n?r:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const Z=180*1e3,Se=30*1e3;let L=0;const M=new Set,ee=(e=Date.now())=>{L=e+Z;for(const s of M)s()},we=(e=Date.now())=>e<L,xe=e=>(M.add(e),()=>{M.delete(e)}),_=6e4,te=new Set(["sent","drafts","trash","archive"]),C=(e,s)=>{const t=new Map;for(const r of e){const a=s.get(r.mailboxId)?.role;a&&te.has(a)||t.set(r.mailboxId,r.highWaterMarkUid)}return t},F=(e,s)=>{const t=[];for(const[r,a]of s)a>(e.get(r)??0)&&t.push(r);return t},se=(e,s)=>F(e,s).length>0,q=o.createContext(null),ne=()=>{const e=o.useContext(q);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function pe({accountIds:e,children:s}){const t=N(),{resultFolderIndex:r}=B(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,n]=o.useState(new Set),h=P({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:_,staleTime:_,meta:{softError:!0}}))}),y=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=C(b.mailboxes??[],r),v=c.current.get(d);if(c.current.set(d,g),v){const A=F(v,g);A.length>0&&$(t,z(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const W=a.current.get(d)??new Map;se(W,g)&&(f.add(d),l=!0)}),l&&n(f)},[w,y]);const S=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{n(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(R({path:{accountId:f}}).queryKey);a.current.set(f,C(d?.mailboxes??[],r)),u.current.add(f)}},[t,r]),m=o.useMemo(()=>({hasNewMail:S,acknowledge:x}),[S,x]);return E.jsx(q.Provider,{value:m,children:s})}const re=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function j(e){return!!e&&re.has(e)}const D=3e3,oe=D*2,O={syncing:!1,resolved:!1,synced:0,total:0};function Ee(e,s){const t=e.join(","),[r,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),oe);return()=>clearTimeout(m)},[t,s]);const i=P({queries:e.map(m=>({...R({path:{accountId:m}}),enabled:s&&!r,refetchInterval:D,meta:{softError:!0}}))}),n=i.every(m=>m.isSuccess||m.isError),h=i.length===0||n||u;let y=!1,w=0,S=0;for(const m of i)if(j(m.data?.syncPhase)){y=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,S+=l.messagesTotal}const x=s&&h&&!y;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?O:{syncing:y,resolved:!0,synced:w,total:S}}const ae=2e3,ie=45e3,ce=e=>new Promise(s=>setTimeout(s,e)),k=e=>e instanceof Error&&e.message?e.message:"Something went wrong",ue=e=>{J(e,{softError:!0})},T=(e,s)=>e.fetchQuery({...R({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,le=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:r=0,onInboxSynced:a,deadline:u,pollMs:c=ae})=>{let i=!1;for(;;){const n=await s().then(S=>({ok:!0,data:S})).catch(S=>({ok:!1,error:S}));if(!n.ok)return{accountId:e,message:k(n.error)};const{syncPhase:h,lastSyncAt:y}=n.data;if((y??0)>t&&!j(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(n.data)>r&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ce(c)}},fe=async(e,s,t,r,a)=>{const u=await T(e,t).then(n=>({ok:!0,lastSyncAt:n.lastSyncAt??0,inboxSyncedAt:H(n)})).catch(n=>({ok:!1,error:n}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(n=>({ok:!1,error:n}));if(!c.ok)return ue(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await le({accountId:t,readStatus:()=>T(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:r});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},be=(e,s={})=>{const t=N(),r=G(),{acknowledge:a}=ne(),[u,c]=o.useState("idle"),[i,n]=o.useState(),h=o.useRef(0),y=o.useRef(e);y.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const S=o.useCallback(()=>{const x=y.current;if(x.length===0){c("error"),n("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),n(void 0),ee();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ie,d=await Promise.all(x.map(g=>fe(t,r,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),n(b[0]?.message))})()},[a,t,r]);return{state:u,errorMessage:i,refresh:S}};export{Se as H,pe as M,ye as R,be as a,j as b,Ee as c,we as i,xe as s,ne as u};
@@ -1 +1 @@
1
- import{b as s,U as o,r as n,b_ as r}from"./index-CjLIM85N.js";import{u as d}from"./useQueries-DiYEl2LH.js";const h=s("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),p=t=>({items:t.map(e=>e.data?.items??[]),isPending:t.some(e=>e.isPending),error:t.find(e=>e.error)?.error??null});function u(t){const e=d({queries:t.map(i=>({...o({path:{accountId:i.accountId}}),staleTime:1/0})),combine:p});return{index:n.useMemo(()=>r(t.map((i,a)=>({folderAppointments:i.folderAppointments,mailboxes:e.items[a]??[]}))),[t,e]),isPending:e.isPending,error:e.error}}export{h as B,u};
1
+ import{b as s,U as o,r as n,b_ as r}from"./index-Bn8n_AsE.js";import{u as d}from"./useQueries-Bs7-L_2j.js";const h=s("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),p=t=>({items:t.map(e=>e.data?.items??[]),isPending:t.some(e=>e.isPending),error:t.find(e=>e.error)?.error??null});function u(t){const e=d({queries:t.map(i=>({...o({path:{accountId:i.accountId}}),staleTime:1/0})),combine:p});return{index:n.useMemo(()=>r(t.map((i,a)=>({folderAppointments:i.folderAppointments,mailboxes:e.items[a]??[]}))),[t,e]),isPending:e.isPending,error:e.error}}export{h as B,u};
@@ -1 +1 @@
1
- import{e as m,ak as y,a as b,c as L,r as c,f as w,al as S,k,h as E}from"./index-CjLIM85N.js";var u={en:1199414,"en-GB":1199758,nl:3180464},g=["en","en-GB","nl"];const C=()=>typeof g>"u"?[]:g,M=()=>{const e="/spellcheck/de99b00dc30674fd/";return typeof document>"u"?e:new URL(e,document.baseURI).href},_=e=>typeof u>"u"?0:u[e]??0,O=(e,n=C())=>{const t=e.toLowerCase(),a=n.find(i=>i.toLowerCase()===t);if(a)return a;const o=t.split("-")[0];return n.find(i=>i.toLowerCase().split("-")[0]===o)??null},T=[{tag:"ar",detectionCode:"arb"},{tag:"az",detectionCode:"azj"},{tag:"be",detectionCode:"bel"},{tag:"bg",detectionCode:"bul"},{tag:"bs",detectionCode:"bos"},{tag:"cs",detectionCode:"ces"},{tag:"de",detectionCode:"deu"},{tag:"en",detectionCode:"eng"},{tag:"es",detectionCode:"spa"},{tag:"fa",detectionCode:"pes"},{tag:"fr",detectionCode:"fra"},{tag:"ha",detectionCode:"hau"},{tag:"hi",detectionCode:"hin"},{tag:"hr",detectionCode:"hrv"},{tag:"hu",detectionCode:"hun"},{tag:"id",detectionCode:"ind"},{tag:"ig",detectionCode:"ibo"},{tag:"it",detectionCode:"ita"},{tag:"jv",detectionCode:"jav"},{tag:"kk",detectionCode:"kaz"},{tag:"mr",detectionCode:"mar"},{tag:"ms",detectionCode:"zlm"},{tag:"ne",detectionCode:"npi"},{tag:"nl",detectionCode:"nld"},{tag:"pl",detectionCode:"pol"},{tag:"ps",detectionCode:"pbu"},{tag:"pt",detectionCode:"por"},{tag:"ro",detectionCode:"ron"},{tag:"ru",detectionCode:"rus"},{tag:"so",detectionCode:"som"},{tag:"sr",detectionCode:"srp"},{tag:"su",detectionCode:"sun"},{tag:"sv",detectionCode:"swe"},{tag:"sw",detectionCode:"swh"},{tag:"tl",detectionCode:"tgl"},{tag:"tr",detectionCode:"tur"},{tag:"uk",detectionCode:"ukr"},{tag:"ur",detectionCode:"urd"},{tag:"vi",detectionCode:"vie"},{tag:"yo",detectionCode:"yor"},{tag:"zu",detectionCode:"zul"}],d=e=>(e.split("-")[0]??"").toLowerCase(),v=new Map(T.map(e=>[e.tag,e])),x=e=>v.get(d(e))?.detectionCode??null,P=/^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i,G=e=>d(e).toUpperCase(),H=e=>{if(!P.test(e))return e;const t=new Intl.DisplayNames([e],{type:"language",fallback:"none"}).of(e);return t?t.charAt(0).toLocaleUpperCase(e)+t.slice(1):e},z=(e,n=C())=>{const t=[...e,...n].filter(o=>x(o)!==null),a=[...new Set(t.map(d))];return a.includes("en")||a.push("en"),a},N=e=>/iPhone|iPad|iPod/.test(e)?"On iPhone and iPad the keyboard decides this. Add the language under Settings, then General, then Keyboard.":/Edg\//.test(e)?"Edge checks every language you add under Settings, then Languages. Adding one there checks it alongside the others.":/Firefox\//.test(e)?"Firefox uses this setting. Right-click the message to add a dictionary for it.":/Chrome\/|Chromium\//.test(e)?"Chrome checks every language you add under Settings, then Languages. Adding one there checks it alongside the others.":/Safari\//.test(e)?"macOS decides this under Keyboard, then Text Input, then Spelling. Automatic by Language covers every language enabled there.":"Your browser decides which dictionaries it checks. Add this language in its own language settings to have it spellchecked.",h=e=>new DOMParser().parseFromString(e,"text/html"),p=e=>{const n=[...e.children];if(n.length!==1)return null;const t=n[0];return t?[...e.childNodes].some(o=>o!==t&&(o.textContent??"").trim()!=="")?null:t:null},R=(e,n)=>{if(e==="")return"";const t=h(e),a=p(t.body);if(a?.tagName==="DIV"&&a.hasAttribute("lang"))return a.setAttribute("lang",n),t.body.innerHTML;const o=t.createElement("div");for(o.setAttribute("lang",n);t.body.firstChild;)o.append(t.body.firstChild);return t.body.append(o),t.body.innerHTML},U=e=>{if(e==="")return{html:e,language:null};const n=h(e),t=p(n.body);return t?.tagName!=="DIV"||!t.hasAttribute("lang")?{html:e,language:null}:{html:t.innerHTML,language:t.getAttribute("lang")}},l={html:"",plainText:""},B=e=>{const n=m(),{pushError:t}=y(),{data:a}=b({...L(),staleTime:1/0}),o=c.useMemo(()=>{if(!e||!a)return l;const s=a.accounts.find(r=>r.accountId===e);return s?{html:s.signatureHtml??"",plainText:s.signaturePlainText??""}:l},[e,a]),i=w({...E(),onSuccess:()=>{n.invalidateQueries({queryKey:k()})},onError:s=>{t(S("Couldn't save signature","The signature wasn't saved.",s))}}),f=c.useCallback((s,r)=>{e&&i.mutate({path:{accountId:e},body:{signatureHtml:s,signaturePlainText:r}})},[e,i]);return{signature:o,setSignature:f,isSaving:i.isPending}};export{T as C,U as a,G as b,N as c,z as d,x as e,O as f,_ as g,H as l,d as p,M as s,B as u,R as w};
1
+ import{e as m,ak as y,a as b,c as L,r as c,f as w,al as S,k,h as E}from"./index-Bn8n_AsE.js";var u={en:1199414,"en-GB":1199758,nl:3180464},g=["en","en-GB","nl"];const C=()=>typeof g>"u"?[]:g,M=()=>{const e="/spellcheck/de99b00dc30674fd/";return typeof document>"u"?e:new URL(e,document.baseURI).href},_=e=>typeof u>"u"?0:u[e]??0,O=(e,n=C())=>{const t=e.toLowerCase(),a=n.find(i=>i.toLowerCase()===t);if(a)return a;const o=t.split("-")[0];return n.find(i=>i.toLowerCase().split("-")[0]===o)??null},T=[{tag:"ar",detectionCode:"arb"},{tag:"az",detectionCode:"azj"},{tag:"be",detectionCode:"bel"},{tag:"bg",detectionCode:"bul"},{tag:"bs",detectionCode:"bos"},{tag:"cs",detectionCode:"ces"},{tag:"de",detectionCode:"deu"},{tag:"en",detectionCode:"eng"},{tag:"es",detectionCode:"spa"},{tag:"fa",detectionCode:"pes"},{tag:"fr",detectionCode:"fra"},{tag:"ha",detectionCode:"hau"},{tag:"hi",detectionCode:"hin"},{tag:"hr",detectionCode:"hrv"},{tag:"hu",detectionCode:"hun"},{tag:"id",detectionCode:"ind"},{tag:"ig",detectionCode:"ibo"},{tag:"it",detectionCode:"ita"},{tag:"jv",detectionCode:"jav"},{tag:"kk",detectionCode:"kaz"},{tag:"mr",detectionCode:"mar"},{tag:"ms",detectionCode:"zlm"},{tag:"ne",detectionCode:"npi"},{tag:"nl",detectionCode:"nld"},{tag:"pl",detectionCode:"pol"},{tag:"ps",detectionCode:"pbu"},{tag:"pt",detectionCode:"por"},{tag:"ro",detectionCode:"ron"},{tag:"ru",detectionCode:"rus"},{tag:"so",detectionCode:"som"},{tag:"sr",detectionCode:"srp"},{tag:"su",detectionCode:"sun"},{tag:"sv",detectionCode:"swe"},{tag:"sw",detectionCode:"swh"},{tag:"tl",detectionCode:"tgl"},{tag:"tr",detectionCode:"tur"},{tag:"uk",detectionCode:"ukr"},{tag:"ur",detectionCode:"urd"},{tag:"vi",detectionCode:"vie"},{tag:"yo",detectionCode:"yor"},{tag:"zu",detectionCode:"zul"}],d=e=>(e.split("-")[0]??"").toLowerCase(),v=new Map(T.map(e=>[e.tag,e])),x=e=>v.get(d(e))?.detectionCode??null,P=/^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i,G=e=>d(e).toUpperCase(),H=e=>{if(!P.test(e))return e;const t=new Intl.DisplayNames([e],{type:"language",fallback:"none"}).of(e);return t?t.charAt(0).toLocaleUpperCase(e)+t.slice(1):e},z=(e,n=C())=>{const t=[...e,...n].filter(o=>x(o)!==null),a=[...new Set(t.map(d))];return a.includes("en")||a.push("en"),a},N=e=>/iPhone|iPad|iPod/.test(e)?"On iPhone and iPad the keyboard decides this. Add the language under Settings, then General, then Keyboard.":/Edg\//.test(e)?"Edge checks every language you add under Settings, then Languages. Adding one there checks it alongside the others.":/Firefox\//.test(e)?"Firefox uses this setting. Right-click the message to add a dictionary for it.":/Chrome\/|Chromium\//.test(e)?"Chrome checks every language you add under Settings, then Languages. Adding one there checks it alongside the others.":/Safari\//.test(e)?"macOS decides this under Keyboard, then Text Input, then Spelling. Automatic by Language covers every language enabled there.":"Your browser decides which dictionaries it checks. Add this language in its own language settings to have it spellchecked.",h=e=>new DOMParser().parseFromString(e,"text/html"),p=e=>{const n=[...e.children];if(n.length!==1)return null;const t=n[0];return t?[...e.childNodes].some(o=>o!==t&&(o.textContent??"").trim()!=="")?null:t:null},R=(e,n)=>{if(e==="")return"";const t=h(e),a=p(t.body);if(a?.tagName==="DIV"&&a.hasAttribute("lang"))return a.setAttribute("lang",n),t.body.innerHTML;const o=t.createElement("div");for(o.setAttribute("lang",n);t.body.firstChild;)o.append(t.body.firstChild);return t.body.append(o),t.body.innerHTML},U=e=>{if(e==="")return{html:e,language:null};const n=h(e),t=p(n.body);return t?.tagName!=="DIV"||!t.hasAttribute("lang")?{html:e,language:null}:{html:t.innerHTML,language:t.getAttribute("lang")}},l={html:"",plainText:""},B=e=>{const n=m(),{pushError:t}=y(),{data:a}=b({...L(),staleTime:1/0}),o=c.useMemo(()=>{if(!e||!a)return l;const s=a.accounts.find(r=>r.accountId===e);return s?{html:s.signatureHtml??"",plainText:s.signaturePlainText??""}:l},[e,a]),i=w({...E(),onSuccess:()=>{n.invalidateQueries({queryKey:k()})},onError:s=>{t(S("Couldn't save signature","The signature wasn't saved.",s))}}),f=c.useCallback((s,r)=>{e&&i.mutate({path:{accountId:e},body:{signatureHtml:s,signaturePlainText:r}})},[e,i]);return{signature:o,setSignature:f,isSaving:i.isPending}};export{T as C,U as a,G as b,N as c,z as d,x as e,O as f,_ as g,H as l,d as p,M as s,B as u,R as w};
@@ -1,5 +1,5 @@
1
- import{j as s,aB as T,B as d,aI as C,bl as j,bj as N,d as $,ad as A,a7 as k,bB as E,bX as f,bY as _,bZ as M,a as P,c as W,r as l,a2 as z,aw as x,ax as p,u as O,ac as B}from"./index-CjLIM85N.js";import{B as h,u as L}from"./useResultFolderIndex--Vh1kDTt.js";import{B as y}from"./badge-DNMAx4D3.js";import{C as S}from"./circle-check-B9p7FADR.js";import{C as q}from"./copy-BYqJcNuv.js";import{E as D}from"./external-link-CbBMj0Z_.js";import{f as U}from"./ErrorState-k3wt6L_r.js";import{a as F}from"./sections-1CLsW1zC.js";import{w as G}from"./help-copy-UAU_hrL0.js";import{S as H}from"./settings-screen-B0brDUWW.js";import"./useQueries-DiYEl2LH.js";import"./kbd-CMsSty4m.js";import"./avatar-BmY6XepY.js";import"./chevron-left-Br4HtAWp.js";import"./menu-S5zj22BN.js";import"./circle-help-B5aCQkW2.js";function Q({report:e,onClose:t,issueUrl:n,onCopy:a}){return e===null?null:s.jsx(T,{open:!0,onClose:t,title:"Report this message",children:s.jsxs("div",{className:"flex max-h-[80vh] flex-col",children:[s.jsxs("header",{className:"space-y-1 border-b border-line px-4 py-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-fg",children:"Report this message"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"This is everything the report contains. It describes what went wrong with the message — never its contents, addresses, subject, attachment names, folder name, or the parser's own error text."})]}),s.jsx("pre",{className:"flex-1 overflow-auto bg-surface-sunken px-4 py-3 text-2xs leading-relaxed whitespace-pre-wrap text-fg-muted",children:e}),s.jsxs("footer",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-4 py-3",children:[s.jsx(d,{variant:"ghost",size:"sm",onClick:t,children:"Cancel"}),s.jsx(d,{variant:"secondary",size:"sm",icon:s.jsx(q,{className:"size-3.5"}),onClick:()=>a(e),children:"Copy report"}),s.jsx(C,{external:!0,size:"sm",href:n,icon:s.jsx(D,{className:"size-3.5"}),children:"Open on GitHub"})]})]})})}const V={BodyParse:"The message is built in a way Remit could not read."};function Y(e){return V[e]}function R(e){return e.split(";")[0].trim()}const b=/^[A-Za-z0-9!#$%&'*+._-]+$/,v=/^[A-Za-z0-9!#$%&'*+._-]+\/[A-Za-z0-9!#$%&'*+._-]+$/;function m(e,t){return t.test(e)?`\`${e}\``:`\`${JSON.stringify(e).replace(/`/g,"\\u0060")}\` (malformed)`}function Z(e){const t=R(e);return v.test(t)?t:JSON.stringify(t)}const g="_not read_";function J(e){return e.length===0?["(no MIME structure was read)"]:e.map(t=>`${" ".repeat(t.depth)}- ${Z(t.contentType)}`)}const K="_No message content, addresses, subject, attachment names or parser output are included._";function w(e){return{head:[`### Message quarantined at \`${e.failureStage}\``,"",`- **Failure**: \`${e.failureCode}\``,`- **Folder role**: ${e.mailboxRole??"_none appointed_"}`,`- **Failing part**: ${e.failurePartPath==null?"_whole message_":`\`${e.failurePartPath}\``}`,`- **Attempts before quarantine**: ${e.attempts}`,`- **Worker build**: ${e.workerVersion}`,`- **Message-ID hash**: ${e.messageIdHash==null?"_none declared_":`\`${e.messageIdHash}\``}`,"","#### Message shape","",`- **Content-Type**: ${e.contentType==null?g:m(R(e.contentType),v)}`,`- **Content-Transfer-Encoding**: ${e.transferEncoding==null?g:m(e.transferEncoding,b)}`,`- **Charset**: ${e.charset==null?"_not declared_":m(e.charset,b)}`,`- **Size**: ${e.sizeBytes==null?g:`${e.sizeBytes} bytes`}`,"","MIME structure:"].join(`
1
+ import{j as s,aB as T,B as d,aI as C,bm as j,bk as N,d as $,ad as k,a7 as A,bC as E,bX as f,bY as _,bZ as M,a as P,c as W,r as l,a2 as z,aw as x,ax as p,u as O,ac as B}from"./index-Bn8n_AsE.js";import{B as h,u as L}from"./useResultFolderIndex-CALTzfWS.js";import{B as y}from"./badge-CfQoDkmE.js";import{C as S}from"./circle-check-OUBTwy71.js";import{C as q}from"./copy-9W6V4dQI.js";import{E as D}from"./external-link-BYIIFw9_.js";import{f as U}from"./ErrorState-BXxvOnci.js";import{a as F}from"./sections-DwdsQ0ad.js";import{w as G}from"./help-copy-_K3IfQdg.js";import{S as H}from"./settings-screen-IjQOks0s.js";import"./useQueries-Bs7-L_2j.js";import"./kbd-PiHV4odS.js";import"./avatar-BgqBWztU.js";import"./chevron-left-CliOUq1O.js";import"./menu-znX-3dzE.js";import"./circle-help-DJ-Mtycd.js";function Q({report:e,onClose:t,issueUrl:n,onCopy:a}){return e===null?null:s.jsx(T,{open:!0,onClose:t,title:"Report this message",children:s.jsxs("div",{className:"flex max-h-[80vh] flex-col",children:[s.jsxs("header",{className:"space-y-1 border-b border-line px-4 py-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-fg",children:"Report this message"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"This is everything the report contains. It describes what went wrong with the message — never its contents, addresses, subject, attachment names, folder name, or the parser's own error text."})]}),s.jsx("pre",{className:"flex-1 overflow-auto bg-surface-sunken px-4 py-3 text-2xs leading-relaxed whitespace-pre-wrap text-fg-muted",children:e}),s.jsxs("footer",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-4 py-3",children:[s.jsx(d,{variant:"ghost",size:"sm",onClick:t,children:"Cancel"}),s.jsx(d,{variant:"secondary",size:"sm",icon:s.jsx(q,{className:"size-3.5"}),onClick:()=>a(e),children:"Copy report"}),s.jsx(C,{external:!0,size:"sm",href:n,icon:s.jsx(D,{className:"size-3.5"}),children:"Open on GitHub"})]})]})})}const V={BodyParse:"The message is built in a way Remit could not read."};function Y(e){return V[e]}function R(e){return e.split(";")[0].trim()}const b=/^[A-Za-z0-9!#$%&'*+._-]+$/,v=/^[A-Za-z0-9!#$%&'*+._-]+\/[A-Za-z0-9!#$%&'*+._-]+$/;function m(e,t){return t.test(e)?`\`${e}\``:`\`${JSON.stringify(e).replace(/`/g,"\\u0060")}\` (malformed)`}function Z(e){const t=R(e);return v.test(t)?t:JSON.stringify(t)}const g="_not read_";function J(e){return e.length===0?["(no MIME structure was read)"]:e.map(t=>`${" ".repeat(t.depth)}- ${Z(t.contentType)}`)}const K="_No message content, addresses, subject, attachment names or parser output are included._";function w(e){return{head:[`### Message quarantined at \`${e.failureStage}\``,"",`- **Failure**: \`${e.failureCode}\``,`- **Folder role**: ${e.mailboxRole??"_none appointed_"}`,`- **Failing part**: ${e.failurePartPath==null?"_whole message_":`\`${e.failurePartPath}\``}`,`- **Attempts before quarantine**: ${e.attempts}`,`- **Worker build**: ${e.workerVersion}`,`- **Message-ID hash**: ${e.messageIdHash==null?"_none declared_":`\`${e.messageIdHash}\``}`,"","#### Message shape","",`- **Content-Type**: ${e.contentType==null?g:m(R(e.contentType),v)}`,`- **Content-Transfer-Encoding**: ${e.transferEncoding==null?g:m(e.transferEncoding,b)}`,`- **Charset**: ${e.charset==null?"_not declared_":m(e.charset,b)}`,`- **Size**: ${e.sizeBytes==null?g:`${e.sizeBytes} bytes`}`,"","MIME structure:"].join(`
2
2
  `),structure:J(e.structure).join(`
3
3
  `),disclaimer:K}}function X(e){const{head:t,structure:n,disclaimer:a}=w(e);return[t,"","```",n,"```","",a].join(`
4
- `)}function ee(e){return`Message quarantined: ${e.failureCode} at ${e.failureStage}`}function se(e){return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function te({entry:e,onCutBug:t}){return s.jsxs("li",{className:"flex flex-col gap-2 border-b border-line px-row-inset py-3 last:border-b-0 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"text-sm text-fg",children:Y(e.failureStage)}),s.jsx("p",{className:"truncate text-xs text-fg-muted",title:e.failureMessage,children:e.failureMessage}),s.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-fg-subtle",children:[e.mailboxRole&&s.jsx(y,{tone:"warning",children:j(e.mailboxRole)}),s.jsx("span",{className:"truncate",title:e.mailboxPath,children:N(e.mailboxPath,e.mailboxDelimiter)}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`uid ${e.uid}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:se(e.quarantinedAt)}),e.attempts>1&&s.jsxs(s.Fragment,{children:[s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`${e.attempts} attempts`})]})]})]}),s.jsx(d,{variant:"secondary",size:"sm",className:"shrink-0",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>t(e),children:"Cut a bug"})]})}function ne({entries:e,onCutBug:t}){return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("header",{className:"space-y-1",children:[s.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Messages set aside"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"Mail Remit could not read is set aside here instead of being skipped, so nothing goes missing quietly. The rest of the folder keeps syncing. Recovering a set-aside message is a re-sync, not a per-row action."})]}),e.length===0&&s.jsxs("div",{className:"flex items-center gap-2 rounded-sm border border-line bg-surface px-row-inset py-3",children:[s.jsx(S,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Every message has been read successfully. Nothing is set aside."})]}),e.length>1&&s.jsx($,{tone:"warning",children:s.jsxs("p",{className:"flex items-start gap-2",children:[s.jsx(A,{className:"mt-0.5 size-4 shrink-0","aria-hidden":!0}),s.jsxs("span",{children:[s.jsx("span",{className:"font-semibold",children:`${e.length} messages could not be read.`})," ","More than one means something is wrong with how Remit reads mail, not with the mail. Reporting one of these gets it fixed."]})]})}),e.length>0&&s.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:e.map(n=>s.jsx(te,{entry:n,onCutBug:t},n.quarantineId))})]})}const ae={Retrying:"The message could not be synced. Remit tries again every sync.",GaveUp:"The message body could not be downloaded. Remit has stopped trying."};function re(e){return ae[e.state]}const ie="_No message content, addresses, subject, folder name or error text are included._";function oe(e){return[`### Message failed to sync at \`${e.stage}\``,"",`- **State**: \`${e.state}\``,`- **Attempts**: ${e.attempts}`,"",ie].join(`
5
- `)}function le(e){return`Message failed to sync: ${e.state} at ${e.stage}`}function ce(e){return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function de({entry:e,onReport:t}){const n=e.state==="GaveUp";return s.jsxs("li",{className:"flex flex-col gap-2 border-b border-line px-row-inset py-3 last:border-b-0 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"text-sm text-fg",children:re(e)}),s.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-fg-subtle",children:[s.jsx(y,{tone:n?"danger":"warning",children:n?"Gave up":"Retrying"}),s.jsx("span",{className:"truncate",children:e.folderLabel}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`uid ${e.uid}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`since ${ce(e.createdAt)}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`${e.attempts} attempts`})]})]}),s.jsx(d,{variant:"secondary",size:"sm",className:"shrink-0",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>t(e),children:"Cut a bug"})]})}function ue({entries:e,total:t,onReport:n}){return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("header",{className:"space-y-1",children:[s.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Messages that failed to sync"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"A message shows here after three failed rounds and leaves on its own once it syncs. The rest of the folder keeps syncing."})]}),e.length===0&&s.jsxs("div",{className:"flex items-center gap-2 rounded-sm border border-line bg-surface px-row-inset py-3",children:[s.jsx(S,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Every message is syncing. Nothing has failed."})]}),t>e.length&&s.jsx("p",{className:"text-xs text-fg-muted",children:`Showing the ${e.length} newest of ${t} messages that failed to sync.`}),e.length>0&&s.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:e.map(a=>s.jsx(de,{entry:a,onReport:n},a.syncWarningId))})]})}function me(){const{Account:e}=k();return s.jsx(e,{children:({signOut:t})=>s.jsx("button",{type:"button",onClick:()=>t(),className:"rounded-md border border-line px-2.5 py-1 text-sm font-medium text-fg outline-none hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",children:"Sign in again"})})}function ge(e,t){return{quarantineId:e.quarantineId,accountId:e.accountId,mailboxId:e.mailboxId,uidValidity:e.uidValidity,uid:e.uid,mailboxRole:e.mailboxRole?E[e.mailboxRole]:void 0,mailboxPath:e.mailboxPath,mailboxDelimiter:t,failureStage:e.failureStage,failureCode:e.failureCode,failureMessage:e.failureMessage,failurePartPath:e.failurePartPath,quarantinedAt:e.quarantinedAt,attempts:e.attempts,sizeBytes:e.sizeBytes,contentType:e.contentType,transferEncoding:e.transferEncoding,charset:e.charset,structure:e.structure,messageIdHash:e.messageIdHash,workerVersion:e.workerVersion}}const xe=3,pe=(e,t)=>e===_.Body&&t>=xe?f.GaveUp:f.Retrying,he="A folder no longer listed";function fe(e){return e?.role?j(e.role):e?.providerPath?N(e.providerPath,e.hierarchyDelimiter):he}function be(e,t){return{syncWarningId:e.syncWarningId,uid:e.uid,stage:e.stage,state:pe(e.stage,e.attempts),attempts:e.attempts,createdAt:e.createdAt,folderLabel:fe(t)}}const je=[],Ne=[];function ye(e){window.open(e,"_blank","noopener,noreferrer")}function Se(e){return{report:X(e),issueUrl:x(p({quarantine:w(e),title:ee(e)}))}}function Re(e){const t=oe(e);return{report:t,issueUrl:x(p({syncWarning:t,title:le(e)}))}}function ve({signIn:e}){return s.jsx("section",{role:"alert",className:"space-y-3",children:s.jsxs("div",{className:"space-y-2 rounded-sm border border-danger/40 bg-danger-soft px-row-inset py-3",children:[s.jsx("p",{className:"text-sm font-medium text-danger",children:"Your session has ended."}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Sign in again to see the messages that failed to sync or were set aside."}),e]})})}function we({error:e}){return s.jsx("section",{role:"alert",className:"space-y-3",children:s.jsxs("div",{className:"space-y-2 rounded-sm border border-danger/40 bg-danger-soft px-row-inset py-3",children:[s.jsx("p",{className:"text-sm font-medium text-danger",children:"The warnings could not be read."}),s.jsx("p",{className:"break-words text-sm text-fg-muted",children:U(e)}),s.jsx("p",{className:"text-xs text-fg-muted",children:"Mail may still be failing to sync or have been set aside — this page cannot say either way until it can read the list. Reporting this gets it fixed."}),s.jsx(d,{variant:"secondary",size:"sm",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>ye(x(p())),children:"Report this"})]})})}function Ie({read:e,signIn:t}){const[n,a]=l.useState(null),[o,r]=l.useState(!1);if(e.kind==="Pending")return s.jsx("p",{className:"animate-pulse text-sm text-fg-subtle",children:"Checking for warnings…"});if(e.kind==="SignedOut")return s.jsx(ve,{signIn:t});if(e.kind==="Failed")return s.jsx(we,{error:e.error});const u=i=>{navigator.clipboard.writeText(i).then(()=>{r(!1),a(null)},()=>{r(!0),a(null)})};return s.jsxs("div",{className:"space-y-6",children:[o&&s.jsx("p",{role:"alert",className:"text-sm text-danger",children:"The report was not copied — this browser refused clipboard access. Cut the bug again and use Open on GitHub, which needs no clipboard."}),s.jsx(ue,{entries:e.warnings,total:e.warningsTotal,onReport:i=>a(Re(i))}),s.jsx(ne,{entries:e.quarantine,onCutBug:i=>a(Se(i))}),s.jsx(Q,{report:n?.report??null,issueUrl:n?.issueUrl??"",onClose:()=>a(null),onCopy:u})]})}function Te(e,t){return e.get(t)?.hierarchyDelimiter??""}function Ce(){const e=M(),t=P(W()),n=l.useMemo(()=>t.data?.accounts??[],[t.data]),a=L(n),o=e.data?.entries??je,r=e.data?.warnings??Ne,u=l.useMemo(()=>o.map(c=>ge(c,Te(a.index,c.mailboxId))),[o,a.index]),i=l.useMemo(()=>r.map(c=>be(c,a.index.get(c.mailboxId))),[r,a.index]),I=$e(e.error??t.error??a.error,e.isPending||t.isPending||a.isPending,{kind:"Ready",quarantine:u,warnings:i,warningsTotal:e.data?.warningsTotal??0});return s.jsx(Ie,{read:I,signIn:s.jsx(me,{})})}function $e(e,t,n){return z(e)?{kind:"SignedOut"}:e?{kind:"Failed",error:e}:t?{kind:"Pending"}:n}function He(){const e=O(),t=B(),n=F(),[a,o]=l.useState(!0);return s.jsx(H,{items:t,activeId:"warnings",title:"Warnings",description:"Messages that failed to sync, and messages set aside.",help:G,helpOpen:a,onToggleHelp:()=>o(r=>!r),onSelect:n,onBackToMail:()=>{e({to:"/mail"})},children:s.jsx(Ce,{})})}export{He as component};
4
+ `)}function ee(e){return`Message quarantined: ${e.failureCode} at ${e.failureStage}`}function se(e){return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function te({entry:e,onCutBug:t}){return s.jsxs("li",{className:"flex flex-col gap-2 border-b border-line px-row-inset py-3 last:border-b-0 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"text-sm text-fg",children:Y(e.failureStage)}),s.jsx("p",{className:"truncate text-xs text-fg-muted",title:e.failureMessage,children:e.failureMessage}),s.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-fg-subtle",children:[e.mailboxRole&&s.jsx(y,{tone:"warning",children:j(e.mailboxRole)}),s.jsx("span",{className:"truncate",title:e.mailboxPath,children:N(e.mailboxPath,e.mailboxDelimiter)}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`uid ${e.uid}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:se(e.quarantinedAt)}),e.attempts>1&&s.jsxs(s.Fragment,{children:[s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`${e.attempts} attempts`})]})]})]}),s.jsx(d,{variant:"secondary",size:"sm",className:"shrink-0",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>t(e),children:"Cut a bug"})]})}function ne({entries:e,onCutBug:t}){return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("header",{className:"space-y-1",children:[s.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Messages set aside"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"Mail Remit could not read is set aside here instead of being skipped, so nothing goes missing quietly. The rest of the folder keeps syncing. Recovering a set-aside message is a re-sync, not a per-row action."})]}),e.length===0&&s.jsxs("div",{className:"flex items-center gap-2 rounded-sm border border-line bg-surface px-row-inset py-3",children:[s.jsx(S,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Every message has been read successfully. Nothing is set aside."})]}),e.length>1&&s.jsx($,{tone:"warning",children:s.jsxs("p",{className:"flex items-start gap-2",children:[s.jsx(k,{className:"mt-0.5 size-4 shrink-0","aria-hidden":!0}),s.jsxs("span",{children:[s.jsx("span",{className:"font-semibold",children:`${e.length} messages could not be read.`})," ","More than one means something is wrong with how Remit reads mail, not with the mail. Reporting one of these gets it fixed."]})]})}),e.length>0&&s.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:e.map(n=>s.jsx(te,{entry:n,onCutBug:t},n.quarantineId))})]})}const ae={Retrying:"The message could not be synced. Remit tries again every sync.",GaveUp:"The message body could not be downloaded. Remit has stopped trying."};function re(e){return ae[e.state]}const ie="_No message content, addresses, subject, folder name or error text are included._";function oe(e){return[`### Message failed to sync at \`${e.stage}\``,"",`- **State**: \`${e.state}\``,`- **Attempts**: ${e.attempts}`,"",ie].join(`
5
+ `)}function le(e){return`Message failed to sync: ${e.state} at ${e.stage}`}function ce(e){return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function de({entry:e,onReport:t}){const n=e.state==="GaveUp";return s.jsxs("li",{className:"flex flex-col gap-2 border-b border-line px-row-inset py-3 last:border-b-0 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"text-sm text-fg",children:re(e)}),s.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-fg-subtle",children:[s.jsx(y,{tone:n?"danger":"warning",children:n?"Gave up":"Retrying"}),s.jsx("span",{className:"truncate",children:e.folderLabel}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`uid ${e.uid}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`since ${ce(e.createdAt)}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`${e.attempts} attempts`})]})]}),s.jsx(d,{variant:"secondary",size:"sm",className:"shrink-0",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>t(e),children:"Cut a bug"})]})}function ue({entries:e,total:t,onReport:n}){return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("header",{className:"space-y-1",children:[s.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Messages that failed to sync"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"A message shows here after three failed rounds and leaves on its own once it syncs. The rest of the folder keeps syncing."})]}),e.length===0&&s.jsxs("div",{className:"flex items-center gap-2 rounded-sm border border-line bg-surface px-row-inset py-3",children:[s.jsx(S,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Every message is syncing. Nothing has failed."})]}),t>e.length&&s.jsx("p",{className:"text-xs text-fg-muted",children:`Showing the ${e.length} newest of ${t} messages that failed to sync.`}),e.length>0&&s.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:e.map(a=>s.jsx(de,{entry:a,onReport:n},a.syncWarningId))})]})}function me(){const{Account:e}=A();return s.jsx(e,{children:({signOut:t})=>s.jsx("button",{type:"button",onClick:()=>t(),className:"rounded-md border border-line px-2.5 py-1 text-sm font-medium text-fg outline-none hover:bg-surface-sunken focus-visible:ring-2 focus-visible:ring-ring",children:"Sign in again"})})}function ge(e,t){return{quarantineId:e.quarantineId,accountId:e.accountId,mailboxId:e.mailboxId,uidValidity:e.uidValidity,uid:e.uid,mailboxRole:e.mailboxRole?E[e.mailboxRole]:void 0,mailboxPath:e.mailboxPath,mailboxDelimiter:t,failureStage:e.failureStage,failureCode:e.failureCode,failureMessage:e.failureMessage,failurePartPath:e.failurePartPath,quarantinedAt:e.quarantinedAt,attempts:e.attempts,sizeBytes:e.sizeBytes,contentType:e.contentType,transferEncoding:e.transferEncoding,charset:e.charset,structure:e.structure,messageIdHash:e.messageIdHash,workerVersion:e.workerVersion}}const xe=3,pe=(e,t)=>e===_.Body&&t>=xe?f.GaveUp:f.Retrying,he="A folder no longer listed";function fe(e){return e?.role?j(e.role):e?.providerPath?N(e.providerPath,e.hierarchyDelimiter):he}function be(e,t){return{syncWarningId:e.syncWarningId,uid:e.uid,stage:e.stage,state:pe(e.stage,e.attempts),attempts:e.attempts,createdAt:e.createdAt,folderLabel:fe(t)}}const je=[],Ne=[];function ye(e){window.open(e,"_blank","noopener,noreferrer")}function Se(e){return{report:X(e),issueUrl:x(p({quarantine:w(e),title:ee(e)}))}}function Re(e){const t=oe(e);return{report:t,issueUrl:x(p({syncWarning:t,title:le(e)}))}}function ve({signIn:e}){return s.jsx("section",{role:"alert",className:"space-y-3",children:s.jsxs("div",{className:"space-y-2 rounded-sm border border-danger/40 bg-danger-soft px-row-inset py-3",children:[s.jsx("p",{className:"text-sm font-medium text-danger",children:"Your session has ended."}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Sign in again to see the messages that failed to sync or were set aside."}),e]})})}function we({error:e}){return s.jsx("section",{role:"alert",className:"space-y-3",children:s.jsxs("div",{className:"space-y-2 rounded-sm border border-danger/40 bg-danger-soft px-row-inset py-3",children:[s.jsx("p",{className:"text-sm font-medium text-danger",children:"The warnings could not be read."}),s.jsx("p",{className:"break-words text-sm text-fg-muted",children:U(e)}),s.jsx("p",{className:"text-xs text-fg-muted",children:"Mail may still be failing to sync or have been set aside — this page cannot say either way until it can read the list. Reporting this gets it fixed."}),s.jsx(d,{variant:"secondary",size:"sm",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>ye(x(p())),children:"Report this"})]})})}function Ie({read:e,signIn:t}){const[n,a]=l.useState(null),[o,r]=l.useState(!1);if(e.kind==="Pending")return s.jsx("p",{className:"animate-pulse text-sm text-fg-subtle",children:"Checking for warnings…"});if(e.kind==="SignedOut")return s.jsx(ve,{signIn:t});if(e.kind==="Failed")return s.jsx(we,{error:e.error});const u=i=>{navigator.clipboard.writeText(i).then(()=>{r(!1),a(null)},()=>{r(!0),a(null)})};return s.jsxs("div",{className:"space-y-6",children:[o&&s.jsx("p",{role:"alert",className:"text-sm text-danger",children:"The report was not copied — this browser refused clipboard access. Cut the bug again and use Open on GitHub, which needs no clipboard."}),s.jsx(ue,{entries:e.warnings,total:e.warningsTotal,onReport:i=>a(Re(i))}),s.jsx(ne,{entries:e.quarantine,onCutBug:i=>a(Se(i))}),s.jsx(Q,{report:n?.report??null,issueUrl:n?.issueUrl??"",onClose:()=>a(null),onCopy:u})]})}function Te(e,t){return e.get(t)?.hierarchyDelimiter??""}function Ce(){const e=M(),t=P(W()),n=l.useMemo(()=>t.data?.accounts??[],[t.data]),a=L(n),o=e.data?.entries??je,r=e.data?.warnings??Ne,u=l.useMemo(()=>o.map(c=>ge(c,Te(a.index,c.mailboxId))),[o,a.index]),i=l.useMemo(()=>r.map(c=>be(c,a.index.get(c.mailboxId))),[r,a.index]),I=$e(e.error??t.error??a.error,e.isPending||t.isPending||a.isPending,{kind:"Ready",quarantine:u,warnings:i,warningsTotal:e.data?.warningsTotal??0});return s.jsx(Ie,{read:I,signIn:s.jsx(me,{})})}function $e(e,t,n){return z(e)?{kind:"SignedOut"}:e?{kind:"Failed",error:e}:t?{kind:"Pending"}:n}function He(){const e=O(),t=B(),n=F(),[a,o]=l.useState(!0);return s.jsx(H,{items:t,activeId:"warnings",title:"Warnings",description:"Messages that failed to sync, and messages set aside.",help:G,helpOpen:a,onToggleHelp:()=>o(r=>!r),onSelect:n,onBackToMail:()=>{e({to:"/mail"})},children:s.jsx(Ce,{})})}export{He as component};
package/index.html CHANGED
@@ -35,7 +35,7 @@
35
35
  } catch (_) {}
36
36
  })();
37
37
  </script>
38
- <script type="module" crossorigin src="/assets/index-CjLIM85N.js"></script>
38
+ <script type="module" crossorigin src="/assets/index-Bn8n_AsE.js"></script>
39
39
  <link rel="stylesheet" crossorigin href="/assets/index-CqMlmBtY.css">
40
40
  </head>
41
41
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client-dist",
3
- "version": "0.0.684",
3
+ "version": "0.0.685",
4
4
  "description": "Built Remit web client — static assets and the default runtime config.",
5
5
  "files": [
6
6
  "**/*"
@@ -1 +0,0 @@
1
- import{ad as g,v as w,L as C,j as s,p as b,T as H,w as S,G as _,u as q,r as x,ce as U,a as G,V as K,J as W,e as J,ak as V,cY as Y,f as v,al as y,cu as X,cv as Z,bT as p,eP as ee}from"./index-CjLIM85N.js";import{u as se,p as te,R as j,A as ne,l as ae}from"./MessageBody-CQSDERa-.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-DwbUNWYU.js";import{c as le}from"./nav-link-BJFBTF93.js";import{g as ce}from"./useMessageBodyContent-MKSJN2kk.js";import{f as ue}from"./reply-jAIguvVh.js";import{a as de,u as T,L as I}from"./roving-focus-DxrxBKOA.js";import{C as L}from"./circle-check-big-BTaxDmjy.js";import{C as A}from"./clock-CqDLo2F2.js";import{R as xe}from"./row-actions-B2Y3De5s.js";import{R as fe}from"./rotate-ccw-BO87SEMT.js";const me={queued:{icon:A,label:"Queued",className:"text-warning"},sending:{icon:C,label:"Sending…",className:"text-accent-2",spin:!0},sent:{icon:L,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:L,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}=G(K()),{searchQuery:c}=W(),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=J(),o=ce(),{pushError:l}=V(),c=x.useCallback(()=>{n.invalidateQueries({queryKey:Y()})},[n]),r=v({...X(),onSuccess:c,onError:d=>{l(y("Couldn't resend message","The message wasn't sent.",d))}}),u=v({...Z(),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 T({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 T({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 +0,0 @@
1
- import{O as o}from"./index-CjLIM85N.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{a9 as m,j as o,O as p}from"./index-CjLIM85N.js";import{a}from"./MailShell-Dy-TBL0C.js";import{M as r}from"./MailboxPane-DE0MG44k.js";import"./nav-link-BJFBTF93.js";import{a as e}from"./search-token-index-BV0MxVc4.js";import"./reply-jAIguvVh.js";import{u as s}from"./search-mirror-aqcvRPsg.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./FullCompose-Um26w7lB.js";import"./index-C8_kRlZw.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./useMediaQuery-Ct2USFCe.js";import"./chevron-down-DCUrV3H_.js";import"./ErrorState-k3wt6L_r.js";import"./confirm-dialog-By4KyYtA.js";import"./search-scope-m65PO2OM.js";import"./app-chrome-tFbuBSBl.js";import"./MailViewChrome-DbIMXxXm.js";import"./roving-focus-DxrxBKOA.js";import"./MessageToolbar-DBu6zN25.js";import"./MessageBody-CQSDERa-.js";import"./kbd-CMsSty4m.js";import"./useQueries-DiYEl2LH.js";import"./badge-DNMAx4D3.js";import"./undo-2-DzniM_WO.js";import"./DropdownMenu-DB36Lfi7.js";import"./popover-menu-vk6Zc0z7.js";import"./mail-BYU-RvAA.js";import"./download-DHu_VILi.js";import"./avatar-BmY6XepY.js";import"./EmptyState-DjjWzqfi.js";import"./calendar-suggestion-wnuXxa-h.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./agenda-time-0kHgN1IS.js";import"./plus-CWdC1Tqr.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DzAewYd3.js";import"./calendar-failure-note-4QbINaXF.js";import"./checkbox-CjhlhVd0.js";import"./clock-CqDLo2F2.js";import"./segmented-control-D85OUPJd.js";import"./shield-check-nCSxAGzG.js";import"./useLayoutTier-CL2fFLId.js";import"./menu-S5zj22BN.js";import"./useFilters-C1uvJ4Ho.js";import"./select-BccK4I_R.js";import"./folder-input-F5BBuwYo.js";import"./label-chip-Dy8yMiFM.js";import"./refresh-cw-B_uXAs1Z.js";import"./useRefreshControl-guVLGaLs.js";import"./circle-check-big-BTaxDmjy.js";import"./LabelApplyTrigger-BYIdJG0t.js";import"./useLabels-BvI8jwIJ.js";import"./NavMenuButton-DwbUNWYU.js";import"./bottom-sheet-C2SG5YmN.js";import"./circle-help-B5aCQkW2.js";import"./circle-check-B9p7FADR.js";function fo(){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{fo as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-CjLIM85N.js";import{M as r}from"./MailboxPane-DE0MG44k.js";import"./MailViewChrome-DbIMXxXm.js";import"./search-token-index-BV0MxVc4.js";import"./reply-jAIguvVh.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./search-scope-m65PO2OM.js";import"./app-chrome-tFbuBSBl.js";import"./useQueries-DiYEl2LH.js";import"./roving-focus-DxrxBKOA.js";import"./MessageToolbar-DBu6zN25.js";import"./MessageBody-CQSDERa-.js";import"./kbd-CMsSty4m.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./chevron-down-DCUrV3H_.js";import"./index-C8_kRlZw.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./badge-DNMAx4D3.js";import"./undo-2-DzniM_WO.js";import"./DropdownMenu-DB36Lfi7.js";import"./popover-menu-vk6Zc0z7.js";import"./ErrorState-k3wt6L_r.js";import"./mail-BYU-RvAA.js";import"./download-DHu_VILi.js";import"./avatar-BmY6XepY.js";import"./EmptyState-DjjWzqfi.js";import"./calendar-suggestion-wnuXxa-h.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./agenda-time-0kHgN1IS.js";import"./plus-CWdC1Tqr.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DzAewYd3.js";import"./calendar-failure-note-4QbINaXF.js";import"./checkbox-CjhlhVd0.js";import"./clock-CqDLo2F2.js";import"./segmented-control-D85OUPJd.js";import"./shield-check-nCSxAGzG.js";import"./useLayoutTier-CL2fFLId.js";import"./menu-S5zj22BN.js";import"./useFilters-C1uvJ4Ho.js";import"./select-BccK4I_R.js";import"./folder-input-F5BBuwYo.js";import"./confirm-dialog-By4KyYtA.js";import"./label-chip-Dy8yMiFM.js";import"./refresh-cw-B_uXAs1Z.js";import"./useRefreshControl-guVLGaLs.js";import"./circle-check-big-BTaxDmjy.js";import"./LabelApplyTrigger-BYIdJG0t.js";import"./useLabels-BvI8jwIJ.js";import"./NavMenuButton-DwbUNWYU.js";import"./bottom-sheet-C2SG5YmN.js";import"./circle-help-B5aCQkW2.js";import"./circle-check-B9p7FADR.js";function ao(){return o.jsx(r.Reading,{})}export{ao as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-CjLIM85N.js";import{B as o}from"./BriefPane-DKV1iFiW.js";import"./MessageToolbar-DBu6zN25.js";import"./MessageBody-CQSDERa-.js";import"./kbd-CMsSty4m.js";import"./search-scope-m65PO2OM.js";import"./app-chrome-tFbuBSBl.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./reply-jAIguvVh.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./roving-focus-DxrxBKOA.js";import"./chevron-down-DCUrV3H_.js";import"./search-token-index-BV0MxVc4.js";import"./useQueries-DiYEl2LH.js";import"./index-C8_kRlZw.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./badge-DNMAx4D3.js";import"./undo-2-DzniM_WO.js";import"./DropdownMenu-DB36Lfi7.js";import"./popover-menu-vk6Zc0z7.js";import"./ErrorState-k3wt6L_r.js";import"./mail-BYU-RvAA.js";import"./download-DHu_VILi.js";import"./avatar-BmY6XepY.js";import"./EmptyState-DjjWzqfi.js";import"./calendar-suggestion-wnuXxa-h.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./agenda-time-0kHgN1IS.js";import"./plus-CWdC1Tqr.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DzAewYd3.js";import"./calendar-failure-note-4QbINaXF.js";import"./checkbox-CjhlhVd0.js";import"./clock-CqDLo2F2.js";import"./segmented-control-D85OUPJd.js";import"./shield-check-nCSxAGzG.js";import"./useLayoutTier-CL2fFLId.js";import"./menu-S5zj22BN.js";import"./useFilters-C1uvJ4Ho.js";import"./select-BccK4I_R.js";import"./folder-input-F5BBuwYo.js";import"./confirm-dialog-By4KyYtA.js";import"./label-chip-Dy8yMiFM.js";import"./LabelApplyTrigger-BYIdJG0t.js";import"./useLabels-BvI8jwIJ.js";import"./useRefreshControl-guVLGaLs.js";import"./circle-check-big-BTaxDmjy.js";import"./refresh-cw-B_uXAs1Z.js";import"./wizard-selection-zWa1qc6-.js";function tr(){return r.jsx(o.Reading,{})}export{tr as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-CjLIM85N.js";import{F as r}from"./FlaggedPane-BKSCs9yQ.js";import"./MessageToolbar-DBu6zN25.js";import"./MessageBody-CQSDERa-.js";import"./kbd-CMsSty4m.js";import"./search-scope-m65PO2OM.js";import"./app-chrome-tFbuBSBl.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./reply-jAIguvVh.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./roving-focus-DxrxBKOA.js";import"./chevron-down-DCUrV3H_.js";import"./search-token-index-BV0MxVc4.js";import"./useQueries-DiYEl2LH.js";import"./index-C8_kRlZw.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./badge-DNMAx4D3.js";import"./undo-2-DzniM_WO.js";import"./DropdownMenu-DB36Lfi7.js";import"./popover-menu-vk6Zc0z7.js";import"./ErrorState-k3wt6L_r.js";import"./mail-BYU-RvAA.js";import"./download-DHu_VILi.js";import"./avatar-BmY6XepY.js";import"./EmptyState-DjjWzqfi.js";import"./calendar-suggestion-wnuXxa-h.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./agenda-time-0kHgN1IS.js";import"./plus-CWdC1Tqr.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DzAewYd3.js";import"./calendar-failure-note-4QbINaXF.js";import"./checkbox-CjhlhVd0.js";import"./clock-CqDLo2F2.js";import"./segmented-control-D85OUPJd.js";import"./shield-check-nCSxAGzG.js";import"./useLayoutTier-CL2fFLId.js";import"./menu-S5zj22BN.js";import"./useFilters-C1uvJ4Ho.js";import"./select-BccK4I_R.js";import"./folder-input-F5BBuwYo.js";import"./confirm-dialog-By4KyYtA.js";import"./label-chip-Dy8yMiFM.js";import"./MailViewChrome-DbIMXxXm.js";import"./refresh-cw-B_uXAs1Z.js";import"./wizard-selection-zWa1qc6-.js";function $(){return o.jsx(r.Reading,{})}export{$ as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-CjLIM85N.js";import{O as t}from"./OutboxPane-CijiwhdB.js";import"./MessageBody-CQSDERa-.js";import"./kbd-CMsSty4m.js";import"./search-scope-m65PO2OM.js";import"./app-chrome-tFbuBSBl.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./reply-jAIguvVh.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-DwbUNWYU.js";import"./menu-S5zj22BN.js";import"./roving-focus-DxrxBKOA.js";import"./circle-check-big-BTaxDmjy.js";import"./clock-CqDLo2F2.js";import"./row-actions-B2Y3De5s.js";import"./rotate-ccw-BO87SEMT.js";function g(){return o.jsx(t.Reading,{})}export{g as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-CjLIM85N.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-CjLIM85N.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-CjLIM85N.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{O as o}from"./index-CjLIM85N.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{j as r,O as i}from"./index-CjLIM85N.js";import{a as m}from"./MailShell-Dy-TBL0C.js";import{B as o}from"./BriefPane-DKV1iFiW.js";import"./nav-link-BJFBTF93.js";import{a as p}from"./search-token-index-BV0MxVc4.js";import"./reply-jAIguvVh.js";import{u as e}from"./search-mirror-aqcvRPsg.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./FullCompose-Um26w7lB.js";import"./index-C8_kRlZw.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./useMediaQuery-Ct2USFCe.js";import"./chevron-down-DCUrV3H_.js";import"./ErrorState-k3wt6L_r.js";import"./confirm-dialog-By4KyYtA.js";import"./search-scope-m65PO2OM.js";import"./app-chrome-tFbuBSBl.js";import"./MessageToolbar-DBu6zN25.js";import"./MessageBody-CQSDERa-.js";import"./kbd-CMsSty4m.js";import"./roving-focus-DxrxBKOA.js";import"./useQueries-DiYEl2LH.js";import"./badge-DNMAx4D3.js";import"./undo-2-DzniM_WO.js";import"./DropdownMenu-DB36Lfi7.js";import"./popover-menu-vk6Zc0z7.js";import"./mail-BYU-RvAA.js";import"./download-DHu_VILi.js";import"./avatar-BmY6XepY.js";import"./EmptyState-DjjWzqfi.js";import"./calendar-suggestion-wnuXxa-h.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./agenda-time-0kHgN1IS.js";import"./plus-CWdC1Tqr.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DzAewYd3.js";import"./calendar-failure-note-4QbINaXF.js";import"./checkbox-CjhlhVd0.js";import"./clock-CqDLo2F2.js";import"./segmented-control-D85OUPJd.js";import"./shield-check-nCSxAGzG.js";import"./useLayoutTier-CL2fFLId.js";import"./menu-S5zj22BN.js";import"./useFilters-C1uvJ4Ho.js";import"./select-BccK4I_R.js";import"./folder-input-F5BBuwYo.js";import"./label-chip-Dy8yMiFM.js";import"./LabelApplyTrigger-BYIdJG0t.js";import"./useLabels-BvI8jwIJ.js";import"./useRefreshControl-guVLGaLs.js";import"./circle-check-big-BTaxDmjy.js";import"./refresh-cw-B_uXAs1Z.js";import"./wizard-selection-zWa1qc6-.js";function lr(){const t=p();return e({to:"/mail/brief"}),r.jsx(o,{thread:t,children:r.jsx(m,{phone:r.jsx(o.Phone,{}),list:r.jsx(o.List,{}),reading:r.jsx(i,{}),intelligence:r.jsx(o.Intelligence,{}),hasThread:!!t})})}export{lr as component};
@@ -1 +0,0 @@
1
- import{b as o}from"./index-CjLIM85N.js";const n=o("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);export{n as C};
@@ -1 +0,0 @@
1
- import{b as e}from"./index-CjLIM85N.js";const t=e("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);export{t as C};
@@ -1 +0,0 @@
1
- import{aP as ge,aw as ye,ax as be,b0 as ve,s as z,a as je,b1 as J,r as o,b2 as V,e as Z,f as A,b3 as Se,b4 as Ce,b5 as ke,j as s,d as M,B as x,aG as Ne,ao as W,aY as we,ap as Ie,u as Pe,ac as Ue}from"./index-CjLIM85N.js";import{R as ee}from"./ReportLink-By19dSP-.js";import{f as Ke}from"./ErrorState-k3wt6L_r.js";import{S as Re}from"./select-BccK4I_R.js";import{C as $e}from"./confirm-dialog-By4KyYtA.js";import{S as Ee}from"./switch-BDBBnLpE.js";import{a as Me}from"./sections-1CLsW1zC.js";import{S as Ae}from"./settings-screen-B0brDUWW.js";import"./chevron-down-DCUrV3H_.js";import"./avatar-BmY6XepY.js";import"./badge-DNMAx4D3.js";import"./chevron-left-Br4HtAWp.js";import"./menu-S5zj22BN.js";import"./circle-help-B5aCQkW2.js";const Be=z(403),B={...z(400,403,404,409,422,429),...ve},se=e=>ge(e)===403,te=e=>e.state==="Configured"?{presetId:e.presetId,model:e.model,baseUrl:e.baseUrl,apiKey:""}:{presetId:void 0,model:"",baseUrl:"",apiKey:""},Fe=(e,t)=>t.state==="Configured"&&t.presetId===e?te(t):{presetId:e,model:"",baseUrl:"",apiKey:""},Te={Hosted:"Hosted",Custom:"Your own endpoint",Local:"Self-hosted"},Le=e=>{const t=[];for(const i of e){const n=t.find(r=>r.group===i.group);if(n){n.presets.push(i);continue}t.push({group:i.group,label:Te[i.group],presets:[i]})}return t},ae=e=>e.defaultBaseUrl===void 0,ie=(e,t)=>e.state==="Configured"&&e.presetId===t&&e.apiKeySaved,Oe="Paste an API key",X="Enter a URL that starts with http:// or https://",De=e=>{if(!URL.canParse(e))return!1;const{protocol:t}=new URL(e);return t==="http:"||t==="https:"},He=(e,t,i)=>{const n=e.baseUrl.trim(),r=e.apiKey.trim();return n!==""&&!De(n)?{ok:!1,field:"BaseUrl",message:X}:n===""&&ae(t)?{ok:!1,field:"BaseUrl",message:X}:t.needsKey&&r===""&&!ie(i,t.presetId)?{ok:!1,field:"ApiKey",message:Oe}:{ok:!0,body:{...i.state!=="Configured"||i.presetId!==t.presetId?{classificationPresetId:t.presetId}:{},classificationModel:e.model.trim(),classificationBaseUrl:n,...t.needsKey&&r!==""?{classificationApiKey:r}:{}}}},qe=(e,t,i)=>{if(!(e.state!=="Configured"||t===void 0)&&e.presetId!==t)return i.find(n=>n.presetId===e.presetId)},_e=e=>{const t=e.status===void 0?e.kind:`${e.status}`;return`Test failed after ${e.latencyMs} ms: ${t}`},ne=(e,t)=>ye(be({title:`Mail classification: ${e}`,errorMessage:`${e}. ${t}`})),Ge=e=>{const t=e.needsKey?"Needs an API key.":"No key needed.";if(e.price.state!=="Priced")return t;const i=new Intl.NumberFormat("en",{style:"currency",currency:e.price.currency,maximumFractionDigits:4}).format(e.price.perMillionInputTokens);return`${t} ${i} per million input tokens.`},F=e=>{se(e)&&V()},re=e=>t=>{e.setQueryData(J().queryKey,t)},Qe=()=>{const e=je({...J(),meta:Be}),t=e.isError&&se(e.error);return o.useEffect(()=>{t&&V()},[t]),{...e,signedOut:t}},le=()=>{const e=Z();return A({...Se(),meta:B,onSuccess:re(e),onError:F})},Ye=()=>{const e=Z();return A({...Ce(),meta:B,onSuccess:re(e),onError:F})},We=()=>A({...ke(),meta:B,onError:F});function T({failure:e,onRetry:t}){const i=Ke(e.error);return s.jsxs(M,{tone:"danger",variant:"soft",children:[s.jsx("p",{className:"font-medium",children:e.title}),s.jsx("p",{className:"mt-0.5 break-words text-fg-muted",children:i}),s.jsxs("p",{className:"flex flex-wrap items-center gap-x-4",children:[t&&s.jsx(x,{variant:"secondary",className:"min-h-11",onClick:t,children:"Retry"}),s.jsx(ee,{href:ne(e.title,i)})]})]})}const Xe={ApiKey:"Replace key",Model:"Fix the model",BaseUrl:"Fix the base URL"};function ze({result:e,presetLabel:t,onFix:i,shown:n}){if(e.state==="Passed")return s.jsxs(M,{tone:"success",variant:"soft",children:[s.jsxs("p",{className:"font-medium",children:["Test passed in ",e.latencyMs," ms"]}),s.jsxs("p",{className:"mt-0.5 text-fg-muted",children:["Sample message labelled ",e.label,","," ",Math.round(e.confidence*100),"% confident."]})]});const r=_e(e),l=e.field;return s.jsxs(M,{tone:"danger",variant:"soft",children:[s.jsx("p",{className:"font-medium",children:r}),s.jsxs("p",{className:"mt-0.5 break-words text-fg-muted",children:[e.fix," Nothing changed: classification stays as it was."]}),s.jsxs("p",{className:"flex flex-wrap items-center gap-x-4",children:[l!==void 0&&n[l]&&s.jsx("button",{type:"button",onClick:()=>i(l),className:"inline-flex min-h-11 items-center font-medium text-accent hover:underline",children:Xe[l]}),s.jsx(ee,{href:ne(`Test of ${t} failed`,`${r}. ${e.kind}. ${e.fix}`)})]})]})}function S({id:e,label:t,hint:i,error:n,children:r}){return s.jsxs("div",{children:[s.jsx(Ne,{htmlFor:e,children:t}),r,n&&s.jsx("p",{id:`${e}-error`,className:"mt-1 text-xs text-danger",children:n}),i&&s.jsx("p",{id:`${e}-hint`,className:"mt-1 text-xs text-fg-subtle",children:i})]})}const C=(e,t,i)=>[i?`${e}-error`:"",t?`${e}-hint`:""].filter(Boolean).join(" ")||void 0;function Je({preset:e,settings:t,onAnnounce:i}){const n=le(),r=Ye(),l=We(),[c,p]=o.useState(()=>Fe(e.presetId,t)),[u,f]=o.useState(null),[v,k]=o.useState(null),[m,N]=o.useState(!1),[oe,w]=o.useState(!1),[L,g]=o.useState(null),[I,ce]=o.useState(null),O=o.useRef(null),D=o.useRef(null),H=o.useRef(null),q=o.useRef(null),P=o.useId(),U=`${P}-model`,K=`${P}-base-url`,R=`${P}-key`;o.useEffect(()=>{if(!I)return;({Model:O,BaseUrl:D,ApiKey:H,Replace:q})[I.target].current?.focus()},[I]);const j=e.needsKey&&ie(t,e.presetId)?t:void 0,de=e.needsKey&&(j===void 0||m),_=ae(e),ue={ApiKey:e.needsKey,Model:!0,BaseUrl:_},h=a=>u?.field===a?u.message:void 0,y=a=>h(a)!==void 0||v?.state==="Failed"&&v.field===a,b=a=>ce({target:a}),$=(a,E)=>{p(d=>({...d,...E})),k(d=>d?.state==="Passed"?null:d),f(d=>d?.field===a?null:d),i("")},G=()=>{N(!0),b("ApiKey")},Q=()=>{N(!1),p(a=>({...a,apiKey:""})),f(a=>a?.field==="ApiKey"?null:a),b("Replace")},fe=a=>{if(a==="ApiKey"&&j){G();return}b(a)},me=()=>{const a=He(c,e,t);if(!a.ok){f({field:a.field,message:a.message}),b(a.field);return}g(null);const E=m;n.mutate({body:a.body},{onSuccess:()=>{p(d=>({...d,apiKey:""})),N(!1),f(null),i("Saved"),E&&b("Replace")},onError:d=>g({title:`${e.label} was not saved`,error:d})})},pe=()=>{l.isPending||(k(null),g(null),i(""),l.mutate({body:{presetId:e.presetId,model:c.model.trim(),baseUrl:c.baseUrl.trim(),apiKey:c.apiKey.trim()}},{onSuccess:k,onError:a=>g({title:`The test of ${e.label} did not run`,error:a})}))},he=()=>{r.mutate({},{onError:a=>{w(!1),g({title:`The ${e.label} key was not cleared`,error:a})}})},xe=t.state==="Configured"&&t.enabled,Y=h("ApiKey");return s.jsxs(s.Fragment,{children:[s.jsx(S,{id:U,label:"Model",hint:`Empty uses ${e.defaultModel}.`,error:h("Model"),children:s.jsx(W,{id:U,ref:O,className:"h-11",value:c.model,placeholder:e.defaultModel,autoComplete:"off",spellCheck:!1,"aria-invalid":y("Model"),"aria-describedby":C(U,!0,h("Model")!==void 0),onChange:a=>$("Model",{model:a.target.value})})}),_&&s.jsx(S,{id:K,label:"Base URL",hint:"Remit's server calls this URL.",error:h("BaseUrl"),children:s.jsx(W,{id:K,ref:D,className:"h-11",type:"url",inputMode:"url",value:c.baseUrl,placeholder:"http://localhost:11434/v1",autoComplete:"off",spellCheck:!1,required:!0,"aria-invalid":y("BaseUrl"),"aria-describedby":C(K,!0,h("BaseUrl")!==void 0),onChange:a=>$("BaseUrl",{baseUrl:a.target.value})})}),j&&!m&&s.jsxs("div",{children:[s.jsx("p",{className:"mb-1 text-xs font-medium text-fg-muted",children:"API key"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[s.jsx("span",{className:y("ApiKey")?"text-sm text-danger":"text-sm text-fg",children:"set"}),s.jsxs("span",{className:"text-sm text-fg-muted",children:["saved ",we(j.savedAt,"short")]}),s.jsx("span",{className:"flex-1"}),s.jsx(x,{ref:q,variant:"secondary",className:"min-h-11","aria-invalid":y("ApiKey"),onClick:G,children:"Replace"}),s.jsx(x,{variant:"secondary",className:"min-h-11",onClick:()=>w(!0),children:"Clear"})]})]}),de&&s.jsx(S,{id:R,label:m?"New API key":"API key",hint:m?"The saved key stays in use until you press Save.":void 0,error:Y,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ie,{id:R,ref:H,className:"h-11 flex-1",value:c.apiKey,placeholder:m?"Paste the new key":"Paste the key",autoComplete:"off",spellCheck:!1,"aria-invalid":y("ApiKey"),"aria-describedby":C(R,m,Y!==void 0),onChange:a=>$("ApiKey",{apiKey:a.target.value}),onKeyDown:a=>{a.key==="Escape"&&m&&(a.preventDefault(),a.stopPropagation(),Q())}}),m&&s.jsx(x,{variant:"ghost",className:"min-h-11",onClick:Q,children:"Cancel"})]})}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(x,{variant:"primary",className:"min-h-11","aria-disabled":n.isPending,onClick:()=>{n.isPending||me()},children:n.isPending?"Saving…":"Save"}),s.jsx(x,{variant:"secondary",className:"min-h-11","aria-disabled":l.isPending,"aria-busy":l.isPending,onClick:pe,children:l.isPending?"Testing…":"Test connection"})]}),s.jsx("p",{"aria-live":"polite",className:"text-sm text-fg-muted empty:hidden",children:l.isPending?`Sending one sample message to ${e.label}`:""}),v&&s.jsx(ze,{result:v,presetLabel:e.label,onFix:fe,shown:ue}),L&&s.jsx(T,{failure:L}),s.jsx($e,{isOpen:oe,title:`Clear the ${e.label} key?`,description:xe?`Classification is on. Clearing the key switches it off, and new mail goes back to built-in rules. To use ${e.label} again you paste the key again.`:`To use ${e.label} again you paste the key again.`,confirmLabel:"Clear key",destructive:!0,isBusy:r.isPending,onConfirm:he,onCancel:()=>w(!1)})]})}function Ve({presets:e,settings:t,onAnnounce:i}){const[n,r]=o.useState(()=>te(t).presetId),l=o.useId(),c=e.find(u=>u.presetId===n),p=qe(t,n,e);return s.jsxs("section",{className:"space-y-4",children:[s.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Provider"}),s.jsx(S,{id:l,label:"Provider",hint:c?Ge(c):void 0,children:s.jsxs(Re,{id:l,className:"h-11",value:n??"",onChange:u=>r(e.find(f=>f.presetId===u.target.value)?.presetId),"aria-describedby":C(l,c!==void 0,!1),children:[s.jsx("option",{value:"",disabled:!0,children:"Choose a provider"}),Le(e).map(u=>s.jsx("optgroup",{label:u.label,children:u.presets.map(f=>s.jsx("option",{value:f.presetId,children:f.label},f.presetId))},u.group))]})}),p&&s.jsxs("p",{className:"text-sm text-warning",children:["Saving switches from ",p.label,t.state==="Configured"&&t.apiKeySaved?" and deletes its saved key.":"."]}),c&&s.jsx(Je,{preset:c,settings:t,onAnnounce:i},c.presetId)]})}const Ze="Mail classification settings did not load",es=e=>e.state==="NotConfigured"?"Save a provider below first. Until then, built-in rules label your mail.":e.enabled?"New mail goes to the model. A failed call falls back to built-in rules.":"Provider saved. Built-in rules label your mail until you switch this on.";function ss({settings:e}){const t=le(),[i,n]=o.useState(null),r=o.useId(),l=e.state==="Configured",c=l&&e.enabled,p=()=>{n(null),t.mutate({body:{classificationEnabled:!c}},{onError:n})};return s.jsxs("section",{"aria-labelledby":`${r}-title`,className:"space-y-3",children:[s.jsx("h2",{id:`${r}-title`,className:"text-xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Status"}),s.jsxs("div",{className:"flex min-h-11 items-center gap-3",children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsx("span",{id:`${r}-label`,className:"text-sm text-fg",children:"Use the model"}),s.jsx("span",{id:`${r}-note`,className:"text-xs text-fg-subtle",children:es(e)})]}),s.jsx(Ee,{checked:c,"aria-labelledby":`${r}-label`,"aria-describedby":`${r}-note`,"aria-disabled":!l||t.isPending,"aria-busy":t.isPending,onToggle:p})]}),i!==null&&s.jsx(T,{failure:{title:c?"Classification was not switched off":"Classification was not switched on",error:i}})]})}function ts(){const e=Qe(),[t,i]=o.useState("");if(e.isPending)return s.jsx("div",{className:"h-48 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading mail classification settings"});if(e.signedOut)return null;if(e.isError)return s.jsx(T,{failure:{title:Ze,error:e.error},onRetry:()=>{e.refetch()}});const{classification:n,classificationPresets:r}=e.data;return s.jsxs("div",{className:"max-w-xl space-y-8",children:[s.jsx(ss,{settings:n}),s.jsx(Ve,{presets:r,settings:n,onAnnounce:i},n.state),s.jsx("p",{"aria-live":"polite",className:"text-sm text-fg-muted",children:t})]})}const as=s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{children:"A model labels new mail: spam and phishing, priority, personal, and a category. With classification off, or when a call fails, the built-in rules label it."}),s.jsx("p",{children:"The API key is stored encrypted on the server and never sent back to the browser. Test connection sends one built-in sample message, with the form as it stands, and changes nothing."})]});function ys(){const e=Pe(),t=Ue(),i=Me(),[n,r]=o.useState(!0);return s.jsx(Ae,{items:t,activeId:"classification",title:"Mail classification",description:"Label new mail with a model. Mail already in your folders keeps its labels.",help:as,helpOpen:n,onToggleHelp:()=>r(l=>!l),onSelect:i,onBackToMail:()=>{e({to:"/mail"})},children:s.jsx(ts,{})})}export{ys as component};
@@ -1 +0,0 @@
1
- import{F as o}from"./FullCompose-Um26w7lB.js";import"./index-CjLIM85N.js";import"./index-C8_kRlZw.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./reply-jAIguvVh.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./chevron-down-DCUrV3H_.js";import"./ErrorState-k3wt6L_r.js";import"./confirm-dialog-By4KyYtA.js";const x=o;export{x as component};
@@ -1 +0,0 @@
1
- import{F as o}from"./FullCompose-Um26w7lB.js";import"./index-CjLIM85N.js";import"./index-C8_kRlZw.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./reply-jAIguvVh.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./chevron-down-DCUrV3H_.js";import"./ErrorState-k3wt6L_r.js";import"./confirm-dialog-By4KyYtA.js";const x=o;export{x as component};
@@ -1 +0,0 @@
1
- import{F as o}from"./FullCompose-Um26w7lB.js";import"./index-CjLIM85N.js";import"./index-C8_kRlZw.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./reply-jAIguvVh.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./chevron-down-DCUrV3H_.js";import"./ErrorState-k3wt6L_r.js";import"./confirm-dialog-By4KyYtA.js";const x=o;export{x as component};
@@ -1 +0,0 @@
1
- import{F as o}from"./FullCompose-Um26w7lB.js";import"./index-CjLIM85N.js";import"./index-C8_kRlZw.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./reply-jAIguvVh.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./chevron-down-DCUrV3H_.js";import"./ErrorState-k3wt6L_r.js";import"./confirm-dialog-By4KyYtA.js";const x=o;export{x as component};
@@ -1 +0,0 @@
1
- import{e_ as o,j as i}from"./index-CjLIM85N.js";import{a as m}from"./CalendarEventEditor-BVJVcn8c.js";import"./draft-DBSWcwcO.js";import"./agenda-time-0kHgN1IS.js";import"./calendar-guests-C7ZBcQWB.js";import"./calendar-event-popup-BX4yyqgU.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./ErrorState-k3wt6L_r.js";import"./useQueries-DiYEl2LH.js";import"./pencil-DhM7psiB.js";import"./circle-help-B5aCQkW2.js";import"./useCalendarData-CiACY6bV.js";import"./useCalendarTasks-DZa9ySo0.js";import"./useCalendarScheduling-Brb1S1QL.js";import"./useDebouncedValue-m2WIWKGa.js";import"./calendar-format-BwCpz-JZ.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./calendar-DzAewYd3.js";import"./reply-jAIguvVh.js";import"./CalendarQuickCreate-AsCrUcAa.js";import"./CalendarSession-DRZ92kL4.js";import"./calendar-event-sidebar-DG9W-BJ-.js";import"./select-BccK4I_R.js";import"./chevron-down-DCUrV3H_.js";import"./confirm-dialog-By4KyYtA.js";function w(){const{calendarObjectId:r,recurrenceId:t}=o.useParams();return i.jsx(m,{calendarObjectId:r,recurrenceId:t})}export{w as component};
@@ -1 +0,0 @@
1
- import{eX as o,j as r}from"./index-CjLIM85N.js";import{a as i}from"./CalendarEventEditor-BVJVcn8c.js";import"./draft-DBSWcwcO.js";import"./agenda-time-0kHgN1IS.js";import"./calendar-guests-C7ZBcQWB.js";import"./calendar-event-popup-BX4yyqgU.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./ErrorState-k3wt6L_r.js";import"./useQueries-DiYEl2LH.js";import"./pencil-DhM7psiB.js";import"./circle-help-B5aCQkW2.js";import"./useCalendarData-CiACY6bV.js";import"./useCalendarTasks-DZa9ySo0.js";import"./useCalendarScheduling-Brb1S1QL.js";import"./useDebouncedValue-m2WIWKGa.js";import"./calendar-format-BwCpz-JZ.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./calendar-DzAewYd3.js";import"./reply-jAIguvVh.js";import"./CalendarQuickCreate-AsCrUcAa.js";import"./CalendarSession-DRZ92kL4.js";import"./calendar-event-sidebar-DG9W-BJ-.js";import"./select-BccK4I_R.js";import"./chevron-down-DCUrV3H_.js";import"./confirm-dialog-By4KyYtA.js";function q(){const{calendarObjectId:t}=o.useParams();return r.jsx(i,{calendarObjectId:t})}export{q as component};
@@ -1 +0,0 @@
1
- import{b6 as ee,j as e,L as B,ad as oe,p as ce,b7 as de,b8 as me,r as m,ao as H,B as k,b9 as ue,ba as J,bb as xe,bc as pe,aP as fe,e as he,f as ge,bd as be,be as je,bf as ve,aB as Ne,T as ye,aw as te,ax as se,a as ae,U as Ce,bg as Se,W as we,Y as Fe,bh as ke,bi as Ie,u as Me,ac as Re,c as Ee}from"./index-CjLIM85N.js";import{E as K,f as Oe}from"./ErrorState-k3wt6L_r.js";import{u as De}from"./useMediaQuery-Ct2USFCe.js";import{u as Le,a as Ae}from"./useLabels-BvI8jwIJ.js";import{C as Te,A as ze,a as $e,b as Pe,N as E,p as Be,u as Ue,r as _e,c as ne,S as Q,d as He,n as Ke,f as qe,e as Je,g as Qe,h as Ve,i as Ge,j as We}from"./useFilters-C1uvJ4Ho.js";import{L as ie}from"./label-chip-Dy8yMiFM.js";import{S as V}from"./segmented-control-D85OUPJd.js";import{S as Ye}from"./select-BccK4I_R.js";import{C as q}from"./circle-check-B9p7FADR.js";import{B as Xe}from"./bottom-sheet-C2SG5YmN.js";import{B as Ze}from"./badge-DNMAx4D3.js";import{a as et}from"./sections-1CLsW1zC.js";import{S as tt}from"./settings-screen-B0brDUWW.js";import"./suggest-list-CGKa8tfA.js";import"./plus-CWdC1Tqr.js";import"./chevron-down-DCUrV3H_.js";import"./avatar-BmY6XepY.js";import"./chevron-left-Br4HtAWp.js";import"./menu-S5zj22BN.js";import"./circle-help-B5aCQkW2.js";function st({preview:t}){const s=ee(t);if(t.status==="loading")return e.jsxs("p",{className:"flex items-center gap-2 text-xs text-fg-muted","aria-live":"polite",children:[e.jsx(B,{className:"size-3.5 animate-spin","aria-hidden":"true"}),s]});if(t.status==="error")return e.jsxs("p",{className:"flex items-center gap-2 text-xs text-danger",role:"alert",children:[e.jsx(oe,{className:"size-3.5 shrink-0","aria-hidden":"true"}),s]});const a=t.count===0;return e.jsxs("p",{className:ce("flex items-center gap-2 text-xs",t.stale?"text-fg-subtle":a?"text-fg-muted":"font-medium text-fg"),"aria-live":"polite",children:[t.stale&&e.jsx(B,{className:"size-3.5 animate-spin","aria-hidden":"true"}),s]})}const at=[{value:"all",label:J("all")},{value:"any",label:J("any")}],G=[{value:"once",label:"Just once"},{value:"standing",label:"Keep doing this"},{value:"until",label:"Until a date"}],W="__filter_create_label__";function nt({folders:t,value:s,delimiter:a="/",onChangeMove:n,onCreateFolder:u}){const[x,j]=m.useState(!1),[f,h]=m.useState(),[o,g]=m.useState([]),S=m.useMemo(()=>{const v=new Set(t.map(p=>p.id));return[...t,...o.filter(p=>!v.has(p.id))]},[t,o]),l=m.useMemo(()=>{if(u)return async(v,p,r)=>{const d=await u(v,p,r);return g(w=>w.some(M=>M.id===d.id)?w:[...w,d]),d}},[u]),F=S.find(v=>v.id===s),y=S.find(v=>v.id===f),b=v=>{const p=pe(v.path,a);return p.map((r,d)=>{const w=p.slice(0,d+1).join(a);return S.find(M=>M.path===w)?.label??r}).join(" / ")},C=()=>{j(!1),h(void 0)};return x?e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex h-72 min-h-0 overflow-hidden rounded-md border border-line bg-surface",children:e.jsx(xe,{folders:S,selectedId:f,delimiter:a,onSelect:h,onCreateFolder:l,onCancel:C,labels:{createPending:"Waiting for the mail server to confirm the folder…"}})}),y?e.jsx(k,{variant:"primary",onClick:()=>{n?.(y.id),C()},className:"w-full",children:e.jsx("span",{className:"truncate",children:`Move matches to ${b(y)}`})}):e.jsx("p",{className:"text-2xs text-fg-subtle",children:"Tap a folder to open it, or make a new one where you want it."}),e.jsx(k,{variant:"ghost",size:"sm",onClick:C,className:"w-full",children:"Cancel"})]}):e.jsxs("div",{className:"rounded-md border border-line bg-surface-sunken p-3",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:F?b(F):"No folder yet"}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-3",children:[e.jsx(k,{variant:"ghost",size:"sm",className:"px-0",onClick:()=>{h(s),j(!0)},children:"Choose a folder"}),F&&e.jsx(k,{variant:"ghost",size:"sm",className:"px-0",onClick:()=>n?.(""),children:"Don't move matches"})]})]})}function it({labels:t,value:s,onChangeLabel:a,onCreateLabel:n}){const[u,x]=m.useState(!1),[j,f]=m.useState(""),[h,o]=m.useState(!1),[g,S]=m.useState(),[l,F]=m.useState([]),y=m.useMemo(()=>{const r=new Set(t.map(d=>d.id));return[...t,...l.filter(d=>!r.has(d.id))]},[t,l]),b=y.find(r=>r.id===s),C=r=>{if(r===W){S(void 0),x(!0);return}a?.(r)},v=()=>{if(!n)return;const r=j.trim();r!==""&&(o(!0),S(void 0),n(r).then(d=>{F(w=>w.some(M=>M.id===d.id)?w:[...w,d]),a?.(d.id),x(!1),f(""),o(!1)}).catch(d=>{S(d instanceof Error?d.message:"Couldn't create that label. Please try again."),o(!1)}))},p=()=>{x(!1),f(""),S(void 0)};return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(Ye,{"aria-label":"Label to apply",value:s,onChange:r=>C(r.target.value),className:"flex-1",children:[e.jsx("option",{value:"",children:"No label"}),y.map(r=>e.jsx("option",{value:r.id,children:r.name},r.id)),n&&e.jsx("option",{value:W,children:"+ New label…"})]}),b&&e.jsx(ie,{label:{...b,labelId:b.id}})]}),u&&e.jsxs("div",{className:"space-y-2 rounded-md border border-line bg-surface-sunken p-2",children:[e.jsx(H,{value:j,onChange:r=>f(r.target.value),placeholder:"Label name","aria-label":"New label name",disabled:h,autoFocus:!0,onKeyDown:r=>{r.key==="Enter"&&(r.preventDefault(),v()),r.key==="Escape"&&(r.preventDefault(),p())}}),g&&e.jsx("p",{className:"text-2xs text-danger",role:"alert",children:g}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(k,{variant:"primary",size:"sm",onClick:v,disabled:h||j.trim()==="",children:h?"Creating…":"Create label"}),e.jsx(k,{variant:"ghost",size:"sm",onClick:p,disabled:h,children:"Cancel"})]})]})]})}function rt({rule:t,folders:s,delimiter:a,labels:n=[],preview:u,notice:x,clauseFields:j,persisted:f=!1,clauseSuggestions:h,clauseEdit:o,onStartAddClause:g,onStartEditClause:S,onRemoveClause:l,onChangeDraftField:F,onChangeDraftValue:y,onSubmitClause:b,onCancelClause:C,onChangeMatchOperator:v,onChangeMove:p,onCreateFolder:r,onChangeLabel:d,onCreateLabel:w,onChangeScope:M,onChangeName:O,onChangeUntil:L,onCommit:D,onCancel:z}){const A=t.clauses.length>=2,$=de(t.matchOperator),N=me(t,u),T=t.scope==="standing"||t.scope==="until",P=f?G.filter(I=>I.value!=="once"):G;return e.jsxs("div",{className:"flex min-h-0 flex-col",children:[e.jsxs("div",{className:"border-b border-line px-5 py-3",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Filter rule"}),e.jsx("p",{className:"mt-0.5 text-xs text-fg-muted",children:"These chips are the whole rule — what you see is what applies."})]}),e.jsxs("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-4",children:[x,e.jsxs("section",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.clauses.map((I,U)=>e.jsxs(m.Fragment,{children:[U>0&&e.jsx("span",{className:"text-2xs font-medium uppercase text-fg-subtle",children:$}),e.jsx(Te,{clause:I,onEdit:()=>S?.(I.id),onRemove:()=>l?.(I.id)})]},I.id)),!o&&e.jsx(ze,{label:"Add clause",onClick:g})]}),o&&e.jsx($e,{draft:o.draft,mode:o.mode,fields:j,suggestions:h,onChangeField:F,onChangeValue:y,onSubmit:b,onCancel:C}),A&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Match"}),e.jsx(V,{name:"match-operator",size:"sm","aria-label":"Match operator",options:at,value:t.matchOperator,onChange:I=>v?.(I)})]})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"Move matches to"}),e.jsx(nt,{folders:s,value:t.moveMailboxId,delimiter:a,onChangeMove:p,onCreateFolder:r})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"Apply a label"}),e.jsx(it,{labels:n,value:t.labelId??"",onChangeLabel:d,onCreateLabel:w})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs font-medium text-fg-muted",children:"How long"}),e.jsx(V,{name:"rule-scope",size:"sm","aria-label":"Rule scope",options:P,value:t.scope,onChange:I=>M?.(I)}),T&&e.jsx(H,{value:t.name??"",onChange:I=>O?.(I.target.value),placeholder:"Name this rule (e.g. Receipts)","aria-label":"Rule name",className:"w-full"}),t.scope==="until"&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[e.jsx("span",{children:"Until"}),e.jsx(H,{type:"date",value:t.until??"",onChange:I=>L?.(I.target.value),"aria-label":"Expiry date",className:"flex-1"})]})]}),e.jsx("div",{className:"border-t border-line pt-3",children:e.jsx(st,{preview:u})})]}),e.jsxs("div",{className:"space-y-2 border-t border-line px-5 py-3",children:[N&&e.jsx("p",{className:"text-xs text-fg-subtle",role:"status",children:N}),e.jsx(k,{variant:"primary",onClick:D,disabled:N!==void 0,className:"w-full",children:ue(t.scope)}),e.jsx(k,{variant:"ghost",onClick:z,className:"w-full",children:"Not now"})]})]})}const lt=t=>{const s=fe(t);return s!==void 0&&s>=400&&s<500};function Y({title:t,error:s,onRetry:a,reportHref:n}){return e.jsxs("div",{className:"space-y-1",children:[e.jsx(K,{variant:"inline",title:t,error:s,onRetry:lt(s)?void 0:a}),e.jsx("a",{href:n(Oe(s)),target:"_blank",rel:"noreferrer",className:"text-xs text-accent hover:underline",children:"Report an issue"})]})}const ot=(t,s)=>{const a=he(),n=ge({...je(),onSuccess:()=>{t&&(a.invalidateQueries({queryKey:Pe(t)}),s&&a.invalidateQueries({queryKey:be({path:{accountId:t,filterId:s}})}))}}),{mutate:u}=n;return{updateFilter:m.useCallback(j=>{!t||!s||u({path:{accountId:t,filterId:s},body:j})},[t,s,u]),isPending:n.isPending,isSuccess:n.isSuccess,isError:n.isError,error:n.error,reset:n.reset}},ct=t=>({clauses:t.literalClauses.map((a,n)=>({id:`clause-${n}`,field:a.field,value:a.value})),matchOperator:t.matchOperator==="And"?"all":"any",moveMailboxId:t.actionMailboxId!==E?t.actionMailboxId:void 0,labelId:t.actionLabelId!==E?t.actionLabelId:void 0,scope:t.scope==="Temporary"?"until":"standing",until:t.scope==="Temporary"?dt(t.expiresAt):void 0,name:t.name}),dt=t=>{if(!t)return"";const s=Date.parse(t);if(Number.isNaN(s))return"";const a=new Date(s),n=u=>String(u).padStart(2,"0");return`${a.getFullYear()}-${n(a.getMonth()+1)}-${n(a.getDate())}`},X=t=>JSON.stringify({clauses:t.clauses.map(s=>[s.field,s.value]),operator:t.matchOperator,move:t.moveMailboxId??null,label:t.labelId??null}),re=(t,s)=>X(t)!==X(s),Z=t=>JSON.stringify({scope:t.scope==="until"?"until":"standing",until:t.scope==="until"?t.until??"":""}),le=(t,s)=>Z(t)!==Z(s),mt=(t,s)=>{const a={},n=(t.name??"").trim();return n!==(s.name??"").trim()&&(a.name=n),re(t,s)&&(a.matchOperator=t.matchOperator==="all"?"And":"Or",a.literalClauses=t.clauses.map(u=>({field:u.field,value:u.value})),a.actionMailboxId=t.moveMailboxId??E,a.actionLabelId=t.labelId??E),le(t,s)&&(a.scope=t.scope==="until"?"Temporary":"Standing",t.scope==="until"&&(a.expiresAt=Be(t.until??""))),a};function ut({accountId:t,filter:s,folders:a,delimiter:n,labels:u,onClose:x}){const j=m.useMemo(()=>ct(s),[s]),[f,h]=m.useState(j),[o,g]=m.useState(),[S,l]=m.useState(!1),F=m.useRef(0),{count:y}=Ue(t,_e(f)),b=ot(t,s.filterId),C=ne(t),{createFolderIn:v}=ve(t),{createLabel:p}=Le(t),r=async c=>{const i=await p(c);return{id:i.labelId,name:i.name,color:i.color}},d=()=>g({mode:"add",draft:{field:Q[0],value:""}}),w=c=>{const i=f.clauses.find(R=>R.id===c);i&&g({mode:"edit",clauseId:c,draft:{field:i.field,value:i.value}})},M=c=>g(i=>i&&{...i,draft:{...i.draft,field:c}}),O=c=>g(i=>i&&{...i,draft:{...i.draft,value:c}}),L=()=>{if(!o)return;const c=o.draft.field,i=Ke(c,o.draft.value);i!==""&&(h(R=>o.mode==="edit"&&o.clauseId?{...R,clauses:R.clauses.map(_=>_.id===o.clauseId?{id:_.id,field:c,value:i}:_)}:(F.current+=1,{...R,clauses:[...R.clauses,{id:`new-${F.current}`,field:c,value:i}]})),g(void 0))},D=c=>h(i=>({...i,clauses:i.clauses.filter(R=>R.id!==c)})),z=c=>h(i=>({...i,matchOperator:c})),A=c=>h(i=>({...i,moveMailboxId:c||void 0})),$=c=>h(i=>({...i,labelId:c||void 0})),N=c=>h(i=>({...i,name:c})),T=c=>h(i=>({...i,scope:c,until:c==="until"?i.until:void 0})),P=c=>h(i=>({...i,until:c})),I=()=>{const c=re(f,j)||le(f,j),i=mt(f,j);if(Object.keys(i).length===0){x();return}l(c),b.updateFilter(i)},U=()=>C.start(He(f));return C.isStarting||C.isRunning||C.isDone?e.jsx(ht,{progress:C.progress,isDone:C.isDone,onClose:x}):b.isPending?e.jsx(xt,{}):b.isError?e.jsx(gt,{onRetry:b.reset,onClose:x}):b.isSuccess?S?e.jsx(ft,{preview:ee(y),blocked:y.status!=="ready"||y.stale===!0,onReapply:U,onClose:x}):e.jsx(pt,{onClose:x}):e.jsx(rt,{rule:f,folders:a,delimiter:n,labels:u,preview:y,clauseFields:Q,persisted:!0,clauseEdit:o,onStartAddClause:d,onStartEditClause:w,onRemoveClause:D,onChangeDraftField:M,onChangeDraftValue:O,onSubmitClause:L,onCancelClause:()=>g(void 0),onChangeMatchOperator:z,onChangeMove:A,onCreateFolder:v,onChangeLabel:$,onCreateLabel:r,onChangeName:N,onChangeScope:T,onChangeUntil:P,onCommit:I,onCancel:x})}function xt(){return e.jsxs("div",{className:"flex flex-col items-center gap-3 px-5 py-10 text-center",children:[e.jsx(B,{className:"size-8 animate-spin text-accent-2"}),e.jsx("p",{className:"text-sm font-medium text-fg",children:"Saving changes…"})]})}function pt({onClose:t}){return e.jsxs("div",{className:"flex flex-col items-center gap-3 px-5 py-8 text-center",children:[e.jsx(q,{className:"size-8 text-positive"}),e.jsx("p",{className:"text-sm font-medium text-fg",children:"Filter updated"}),e.jsx(k,{variant:"primary",onClick:t,className:"mt-2",children:"Done"})]})}function ft({preview:t,blocked:s,onReapply:a,onClose:n}){return e.jsxs("div",{className:"flex flex-col items-center gap-3 px-5 py-8 text-center",children:[e.jsx(q,{className:"size-8 text-positive"}),e.jsx("p",{className:"text-sm font-medium text-fg",children:"Rule saved"}),e.jsxs("p",{className:"max-w-xs text-xs text-fg-muted",children:["New mail follows the rule automatically. ",t," — move the mail already in your mailbox too?"]}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[e.jsx(k,{variant:"primary",onClick:a,disabled:s,children:"Move existing mail"}),e.jsx(k,{variant:"ghost",onClick:n,children:"Not now"})]})]})}function ht({progress:t,isDone:s,onClose:a}){const n=t.state==="Failed";return e.jsxs("div",{className:"flex flex-col items-center gap-3 px-5 py-8 text-center",children:[s?n?e.jsx("span",{className:"text-sm font-semibold text-danger",children:"Move failed"}):e.jsx(q,{className:"size-8 text-positive"}):e.jsx(B,{className:"size-8 animate-spin text-accent-2"}),!s&&e.jsx("p",{className:"text-sm font-medium text-fg",children:"Moving existing mail…"}),s&&!n&&e.jsxs("div",{className:"text-sm text-fg",children:[e.jsx("p",{className:"font-medium",children:"Done"}),e.jsxs("p",{className:"mt-1 text-xs text-fg-muted",children:[t.appliedCount," of ",t.matchedCount," moved",t.failedCount>0?` · ${t.failedCount} failed`:"","."]})]}),s&&n&&e.jsx("p",{className:"max-w-xs text-xs text-fg-muted",children:t.errorMessage||"Something went wrong. Please try again."}),s&&e.jsx(k,{variant:"primary",onClick:a,className:"mt-2",children:"Done"})]})}function gt({onRetry:t,onClose:s}){return e.jsxs("div",{className:"flex flex-col items-center gap-3 px-5 py-8 text-center",children:[e.jsx("p",{className:"text-sm font-medium text-danger",children:"Couldn't save changes"}),e.jsx("p",{className:"max-w-xs text-xs text-fg-muted",children:"Please try again."}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[e.jsx(k,{variant:"primary",onClick:t,children:"Try again"}),e.jsx(k,{variant:"ghost",onClick:s,children:"Not now"})]})]})}function bt({accountId:t,filter:s,folders:a,delimiter:n,labels:u,onClose:x}){const j=De(),f=e.jsx(ut,{accountId:t,filter:s,folders:a,delimiter:n,labels:u,onClose:x});return j?e.jsx(Ne,{open:!0,onClose:x,title:"Filter rule",children:f}):e.jsx(Xe,{open:!0,onClose:x,label:"Filter rule",dismissLabel:"Dismiss filter rule",children:f})}const jt=t=>{switch(t.kind){case"queuing":case"running":return"Running over the inbox…";case"done":return t.matched===0?"Done. Nothing in the inbox matched.":`Done. Filed ${t.applied} of ${t.matched} matching messages in the inbox.`;case"failed":return}};function vt({filters:t,mailboxName:s,labelById:a,onEdit:n,onDelete:u,deletingFilterId:x,onToggle:j,togglingFilterId:f,onRunNow:h,runFilterId:o,runStatus:g,now:S=Date.now()}){return t.length===0?e.jsx("p",{className:"py-6 text-sm text-fg-muted",children:"No filters yet. Select a few messages in the inbox and choose Organize to make one."}):e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:t.map(l=>{const F=qe(l,S),y=F==="Expired",b=F==="Disabled",C=b?Je(l):void 0,v=l.actionMailboxId!==E?s(l.actionMailboxId):void 0,p=l.actionLabelId!==E?a.get(l.actionLabelId):void 0,r=Qe(l.expiresAt),d=o===l.filterId?g:void 0,w=d?.kind==="queuing"||d?.kind==="running",M=d?jt(d):void 0,O=F==="Active"&&(l.actionMailboxId!==E||l.actionLabelId!==E);return e.jsxs("li",{className:"flex items-start gap-3 px-3 py-2.5",children:[e.jsxs("button",{type:"button",onClick:()=>n(l.filterId),"aria-label":`Edit filter ${l.name}`,className:"min-w-0 flex-1 rounded-sm text-left hover:opacity-80",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`truncate text-sm font-medium ${y||b?"text-fg-muted":"text-fg"}`,children:l.name}),e.jsx(Ze,{tone:y?"neutral":b?"warning":"positive",dot:!0,children:F})]}),e.jsxs("p",{className:"mt-0.5 text-xs text-fg-subtle",children:[v?`Moves matches to ${v}`:"No move action",l.scope==="Temporary"&&r?y?` · expired ${r}`:` · until ${r}`:l.scope==="Standing"?" · always":""]}),C&&e.jsx("p",{className:"mt-0.5 text-xs text-warning",children:C}),M&&e.jsx("p",{role:"status",className:"mt-0.5 text-xs text-fg-muted",children:M}),p&&e.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:e.jsx(ie,{label:{labelId:p.id,name:p.name,color:p.color}})})]}),O&&e.jsx(k,{variant:"ghost",size:"sm",onClick:()=>h(l.filterId),disabled:w,"aria-label":`Run now: filter ${l.name}`,children:w?"Running…":"Run now"}),!y&&e.jsx(k,{variant:"ghost",size:"sm",onClick:()=>j(l.filterId,b),disabled:f===l.filterId,"aria-label":`${b?"Turn on":"Turn off"} filter ${l.name}`,children:b?"Turn on":"Turn off"}),e.jsx(k,{variant:"ghost",size:"sm",icon:e.jsx(ye,{className:"size-4 text-danger"}),onClick:()=>u(l.filterId),disabled:x===l.filterId,"aria-label":`Delete filter ${l.name}`})]},l.filterId)})})}function Nt(t){return te(se({title:`Filter toggle: ${t}`,errorMessage:t}))}function yt(t){return te(se({title:`Filter run now: ${t}`,errorMessage:t}))}const Ct=t=>{if(t.failure)return{kind:"failed",error:t.failure.error};if(t.isStarting)return{kind:"queuing"};if(t.isDone)return t.progress.state==="Failed"?{kind:"failed",error:new Error(t.progress.errorMessage||"The run over the inbox failed.")}:{kind:"done",matched:t.progress.matchedCount,applied:t.progress.appliedCount};if(t.isRunning)return{kind:"running"}},St=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Filters are the standing rules Organize creates. A"," ",e.jsx("strong",{children:"Standing"})," filter keeps working on new mail; a"," ",e.jsx("strong",{children:"Temporary"})," one stops on its own at the date you picked."]}),e.jsx("p",{children:"An expired filter isn't deleted the instant it lapses — it stays here, marked Expired, so you can see what it did and when it stopped."}),e.jsx("p",{children:"A filter that can't do its job turns itself off and says why, for example when its folder no longer exists. Turn it back on once that is fixed."})]});function wt({account:t}){const s=t.accountId,{filters:a,isPending:n,isError:u,error:x,refetch:j}=Ve(s),{deleteFilter:f,deletingFilterId:h}=Ge(s),o=We(s),g=ne(s),{startForFilter:S}=g,[l,F]=m.useState(),y=m.useCallback(N=>{F(N),S(N)},[S]),b=Ct(g),[C,v]=m.useState(),{data:p}=ae({...Ce({path:{accountId:s}}),staleTime:1/0}),r=Se(),d=m.useMemo(()=>we(t.folderAppointments),[t.folderAppointments]),w=m.useCallback(N=>{const T=p?.items.find(P=>P.mailboxId===N);if(T)return Fe(T,d.get(N),r)},[p?.items,d,r]),M=m.useMemo(()=>ke({mailboxes:p?.items??[],folderAppointments:t.folderAppointments,translator:r}),[p?.items,t.folderAppointments,r]),O=Ie(p?.items??[]),{labels:L}=Ae(s),D=m.useMemo(()=>L.map(N=>({id:N.labelId,name:N.name,color:N.color})),[L]),z=m.useMemo(()=>new Map(D.map(N=>[N.id,N])),[D]),A=a.find(N=>N.filterId===C),$=a.find(N=>N.filterId===l)?.name;return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:t.email}),A&&e.jsx(bt,{accountId:s,filter:A,folders:M,delimiter:O,labels:D,onClose:()=>v(void 0)}),n?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading filters for ${t.email}`}):u?e.jsx(K,{variant:"inline",title:`Couldn't load filters for ${t.email}`,error:x,onRetry:()=>{j()}}):e.jsxs(e.Fragment,{children:[o.isError&&e.jsx(Y,{title:o.enabling?"Couldn't turn the filter on":"Couldn't turn the filter off",error:o.error,onRetry:o.retry,reportHref:Nt}),l&&b?.kind==="failed"&&e.jsx(Y,{title:`Couldn't run ${$??"the filter"} over the inbox`,error:b.error,onRetry:g.failure?.kind==="statusUnreadable"?g.refreshStatus:()=>y(l),reportHref:yt}),e.jsx(vt,{filters:a,mailboxName:w,labelById:z,onEdit:v,onDelete:f,deletingFilterId:h,onToggle:o.toggleFilter,togglingFilterId:o.togglingFilterId,onRunNow:y,runFilterId:l,runStatus:b})]})]})}function Jt(){const t=Me(),s=Re(),a=et(),[n,u]=m.useState(!0),{data:x,isPending:j,isError:f,error:h,refetch:o}=ae(Ee());return e.jsx(tt,{items:s,activeId:"filters",title:"Filters",description:"Standing and temporary rules created by Organize, per account.",help:St,helpOpen:n,onToggleHelp:()=>u(g=>!g),onSelect:a,onBackToMail:()=>{t({to:"/mail"})},children:j?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):f?e.jsx(K,{title:"Couldn't load accounts",error:h,onRetry:()=>{o()}}):x.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:x.accounts.map(g=>e.jsx(wt,{account:g},g.accountId))})})}export{wt as AccountFilters,Jt as component};
@@ -1 +0,0 @@
1
- import{j as o,O as i}from"./index-CjLIM85N.js";import{a as m}from"./MailShell-Dy-TBL0C.js";import{F as r}from"./FlaggedPane-BKSCs9yQ.js";import"./nav-link-BJFBTF93.js";import{a as p}from"./search-token-index-BV0MxVc4.js";import"./reply-jAIguvVh.js";import{u as e}from"./search-mirror-aqcvRPsg.js";import"./useMessageBodyContent-MKSJN2kk.js";import"./FullCompose-Um26w7lB.js";import"./index-C8_kRlZw.js";import"./useSignature-Ck8XWicp.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-m2WIWKGa.js";import"./suggest-list-CGKa8tfA.js";import"./sections-1CLsW1zC.js";import"./useMediaQuery-Ct2USFCe.js";import"./chevron-down-DCUrV3H_.js";import"./ErrorState-k3wt6L_r.js";import"./confirm-dialog-By4KyYtA.js";import"./search-scope-m65PO2OM.js";import"./app-chrome-tFbuBSBl.js";import"./MessageToolbar-DBu6zN25.js";import"./MessageBody-CQSDERa-.js";import"./kbd-CMsSty4m.js";import"./roving-focus-DxrxBKOA.js";import"./useQueries-DiYEl2LH.js";import"./badge-DNMAx4D3.js";import"./undo-2-DzniM_WO.js";import"./DropdownMenu-DB36Lfi7.js";import"./popover-menu-vk6Zc0z7.js";import"./mail-BYU-RvAA.js";import"./download-DHu_VILi.js";import"./avatar-BmY6XepY.js";import"./EmptyState-DjjWzqfi.js";import"./calendar-suggestion-wnuXxa-h.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./agenda-time-0kHgN1IS.js";import"./plus-CWdC1Tqr.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DzAewYd3.js";import"./calendar-failure-note-4QbINaXF.js";import"./checkbox-CjhlhVd0.js";import"./clock-CqDLo2F2.js";import"./segmented-control-D85OUPJd.js";import"./shield-check-nCSxAGzG.js";import"./useLayoutTier-CL2fFLId.js";import"./menu-S5zj22BN.js";import"./useFilters-C1uvJ4Ho.js";import"./select-BccK4I_R.js";import"./folder-input-F5BBuwYo.js";import"./label-chip-Dy8yMiFM.js";import"./MailViewChrome-DbIMXxXm.js";import"./refresh-cw-B_uXAs1Z.js";import"./wizard-selection-zWa1qc6-.js";function ao(){const t=p();return e({to:"/mail/flagged"}),o.jsx(r,{thread:t,children:o.jsx(m,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(i,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!t})})}export{ao as component};
@@ -1 +0,0 @@
1
- import{eW as o,j as r}from"./index-CjLIM85N.js";import{C as m}from"./CalendarEventPopup-BY5hHIwf.js";import"./useCalendarSuggestions-9OSR5bVj.js";import"./ErrorState-k3wt6L_r.js";import"./useQueries-DiYEl2LH.js";import"./useCalendarData-CiACY6bV.js";import"./useCalendarTasks-DZa9ySo0.js";import"./calendar-format-BwCpz-JZ.js";import"./nav-link-BJFBTF93.js";import"./useMediaQuery-Ct2USFCe.js";import"./calendar-DzAewYd3.js";import"./reply-jAIguvVh.js";import"./CalendarSession-DRZ92kL4.js";import"./calendar-event-popup-BX4yyqgU.js";import"./pencil-DhM7psiB.js";import"./calendar-guests-C7ZBcQWB.js";import"./circle-help-B5aCQkW2.js";import"./confirm-dialog-By4KyYtA.js";function b(){const{calendarObjectId:t}=o.useParams();return r.jsx(m,{calendarObjectId:t})}export{b as component};
@@ -1 +0,0 @@
1
- import{j as t,aa as o}from"./index-CjLIM85N.js";const a=()=>t.jsx(o,{to:"/settings/accounts"});export{a as component};