@remit/web-client-dist 0.0.692 → 0.0.694
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.
- package/assets/BriefPane-DfgrMpfo.js +1 -0
- package/assets/{CalendarEventEditor-9IlkB0YL.js → CalendarEventEditor-nNdTRvrP.js} +1 -1
- package/assets/{CalendarEventPopup-Dgio1io7.js → CalendarEventPopup-CK0ThqUH.js} +1 -1
- package/assets/{CalendarLoadFailed-BrNZqBKA.js → CalendarLoadFailed-DqZc18ET.js} +1 -1
- package/assets/{CalendarQuickCreate-By7rnSuh.js → CalendarQuickCreate-DvzkHIO9.js} +1 -1
- package/assets/{CalendarSession-CjfkNnKN.js → CalendarSession-D_c9Y6UZ.js} +1 -1
- package/assets/CollectionPane-Ud4h-8ub.js +1 -0
- package/assets/{DesktopChrome-CjDc9EdH.js → DesktopChrome-DHYyHOV_.js} +1 -1
- package/assets/{DropdownMenu-D4QQzyrH.js → DropdownMenu-BPnbuxSi.js} +1 -1
- package/assets/{EmptyState-DiS0VQW5.js → EmptyState-B6TJewxS.js} +1 -1
- package/assets/{ErrorState-BmGgdm41.js → ErrorState-B5x7OO3P.js} +1 -1
- package/assets/{FullCompose-ZjHfjPwG.js → FullCompose-By2bNMiB.js} +1 -1
- package/assets/LabelApplyTrigger-Bxs6cDOn.js +1 -0
- package/assets/{MailShell-BO8c-sH6.js → MailShell-BAZsxo3-.js} +1 -1
- package/assets/{MailViewChrome-DfgW3Ikc.js → MailViewChrome-CeNEd8rP.js} +1 -1
- package/assets/MailboxPane-pHPHm1KP.js +135 -0
- package/assets/MessageBody-BHkIMp4s.js +84 -0
- package/assets/MessageToolbar-CMdOlqF2.js +1 -0
- package/assets/{NavMenuButton-CkmJu7iR.js → NavMenuButton-Dha0SvsJ.js} +1 -1
- package/assets/{OnboardingWizard-reo_AB5t.js → OnboardingWizard-DqRtmDGR.js} +1 -1
- package/assets/{OutboxPane-qaAt9-sk.js → OutboxPane-CWhLXXM2.js} +1 -1
- package/assets/{ReportLink-DVR5iYy8.js → ReportLink-T3skoNQg.js} +1 -1
- package/assets/_calendarObjectId-D-xdcBhY.js +1 -0
- package/assets/_labelId-Cl0mm0aS.js +1 -0
- package/assets/_mailboxId-DXY2xie_.js +1 -0
- package/assets/_messageId-1xfg9JRz.js +1 -0
- package/assets/_messageId-C7RYu8D4.js +1 -0
- package/assets/_messageId-CpLDLwG4.js +1 -0
- package/assets/_messageId-DM4J2nkn.js +1 -0
- package/assets/_outboxMessageId-DbphUtGt.js +1 -0
- package/assets/_recurrenceId-B_wIJyrZ.js +1 -0
- package/assets/{_slotId-BwEkuNG8.js → _slotId-DSoyw2sm.js} +1 -1
- package/assets/_threadId-CWcvebi1.js +1 -0
- package/assets/_threadId-D1KeSzSU.js +1 -0
- package/assets/_threadId-DhAQNmCG.js +1 -0
- package/assets/_threadId-rafiyWr7.js +1 -0
- package/assets/{_view._date-XDQ3AudE.js → _view._date-hcmgBm1_.js} +1 -1
- package/assets/{account-service-status-DJyM-qfq.js → account-service-status-DIZp2CJy.js} +1 -1
- package/assets/{accounts-Dei0QQHb.js → accounts-C97z1Pd0.js} +1 -1
- package/assets/advanced--29ZYfrn.js +1 -0
- package/assets/{agenda-time-9aN7iZnW.js → agenda-time-bZcjQKSG.js} +1 -1
- package/assets/{app-chrome-DEclDxYQ.js → app-chrome-UVvRNKwI.js} +1 -1
- package/assets/{appearance-UFpWVtEM.js → appearance-ZXFz5lao.js} +1 -1
- package/assets/{avatar-DZNFp-l_.js → avatar-D3At1Qul.js} +1 -1
- package/assets/{badge-DXTfgcBt.js → badge-dj8dD-AR.js} +1 -1
- package/assets/{bottom-sheet-CBxZPIwF.js → bottom-sheet-CV9rObvl.js} +1 -1
- package/assets/{brief-fIZB7Fkj.js → brief-2yNYS3wf.js} +1 -1
- package/assets/brief-TvSyJ0Hh.js +1 -0
- package/assets/{calendar-BIfjhUb1.js → calendar-CCfPHKaQ.js} +1 -1
- package/assets/{calendar-CmjULz3U.js → calendar-Cx77i_wv.js} +1 -1
- package/assets/{calendar-event-popup-By-Wnzww.js → calendar-event-popup-knBxRz2d.js} +1 -1
- package/assets/{calendar-event-sidebar-DqoVNv2n.js → calendar-event-sidebar-3BKQojrV.js} +1 -1
- package/assets/{calendar-failure-note-CmQObVh4.js → calendar-failure-note-BUiZ-O7a.js} +1 -1
- package/assets/{calendar-guests-DivZiKa8.js → calendar-guests-aFcN8ViV.js} +1 -1
- package/assets/{calendar-suggestion-CO8Q4tfB.js → calendar-suggestion-Cm4KjSk-.js} +1 -1
- package/assets/{calendars-Dpds3q2Z.js → calendars-BFDTOhwb.js} +1 -1
- package/assets/{card-BkVHxya_.js → card-DLgsoLfF.js} +1 -1
- package/assets/{checkbox-Cxv99wmn.js → checkbox-DmpjHqx5.js} +1 -1
- package/assets/{chevron-down-CuQovlNy.js → chevron-down-B0Bkzz-J.js} +1 -1
- package/assets/{chevron-left-CO-V7AVZ.js → chevron-left-CXtArtIm.js} +1 -1
- package/assets/{circle-check-big-Q5xMZBl1.js → circle-check-big-CI7pNoKP.js} +1 -1
- package/assets/{circle-check-H4iBGaFc.js → circle-check-luU3Az-0.js} +1 -1
- package/assets/{circle-question-mark-Dt4vUSbc.js → circle-question-mark-DS_MwyOq.js} +1 -1
- package/assets/classification-M7vyyYc0.js +1 -0
- package/assets/{clock-Ctw4TG15.js → clock-CXNiym3R.js} +1 -1
- package/assets/cloud-off-DEFh0ByK.js +1 -0
- package/assets/compose._-_outboxMessageId_-C4UqzqsB.js +1 -0
- package/assets/compose._-_outboxMessageId_-CSUyyPsf.js +1 -0
- package/assets/compose._-_outboxMessageId_-CUUUaKzp.js +1 -0
- package/assets/compose._-_outboxMessageId_-D3ZrtXb-.js +1 -0
- package/assets/compose._-_outboxMessageId_-txkeSl3z.js +1 -0
- package/assets/{config-import-_7OioB2-.js → config-import-DYrX4xYR.js} +1 -1
- package/assets/{confirm-dialog-C8W1RcOV.js → confirm-dialog-CeB0RrSC.js} +1 -1
- package/assets/{copy-Eu3Pxnsn.js → copy-BVh-dc4N.js} +1 -1
- package/assets/{credential-steps-D8_QxBU3.js → credential-steps-ihHk8G-d.js} +1 -1
- package/assets/{download-B9mjNNRB.js → download-Im4qAd93.js} +1 -1
- package/assets/{draft-OCADnKfj.js → draft-gA8ktwkL.js} +1 -1
- package/assets/edit-AeV5d7Q9.js +1 -0
- package/assets/edit-C9IrXIRT.js +1 -0
- package/assets/{external-link-Byo-O3sb.js → external-link-BPfutwMA.js} +1 -1
- package/assets/{file-braces-CskVbU-i.js → file-braces-DImhKXQB.js} +1 -1
- package/assets/filters-BixikXOX.js +1 -0
- package/assets/{flagged-A9fk8Fz2.js → flagged-DlXuJV7_.js} +1 -1
- package/assets/flagged-UlACOt4x.js +1 -0
- package/assets/{folder-input-hWCgPqfm.js → folder-input-BBQLR_tO.js} +1 -1
- package/assets/{folders-Dfg9m7Cm.js → folders-tN5ItNP7.js} +1 -1
- package/assets/{help-copy-CnlNZ8sK.js → help-copy-CHQ_TpI3.js} +1 -1
- package/assets/{import-BIxL3HZr.js → import-BRAmXjIS.js} +1 -1
- package/assets/index-0F6D1QL4.js +1 -0
- package/assets/index-BNnZBbIV.js +1 -0
- package/assets/index-BeKthChA.js +1 -0
- package/assets/index-BhPUwC8f.js +1 -0
- package/assets/index-CUf1A0fN.js +1 -0
- package/assets/index-CbjCUjyM.js +1 -0
- package/assets/index-Chdoahsq.js +1 -0
- package/assets/index-CisM5xYX.js +1 -0
- package/assets/index-CpLDLwG4.js +1 -0
- package/assets/index-D-qIc_Ph.js +1 -0
- package/assets/index-DFaozp7e.js +1 -0
- package/assets/{index-CpNGDsVT.js → index-DHBczCNW.js} +10 -10
- package/assets/index-DR_5o1cC.js +213 -0
- package/assets/{index-DjD_uOHk.css → index-DS2W4dIw.css} +1 -1
- package/assets/index-UJSPAbyu.js +1 -0
- package/assets/{kbd-BMGsOR5H.js → kbd-B0NHhH5P.js} +1 -1
- package/assets/label-chip-DSBEe7ry.js +1 -0
- package/assets/{labels-jKncGvQ3.js → labels-BHUDM5JS.js} +1 -1
- package/assets/mail-D2zTFQj4.js +1 -0
- package/assets/{mail-qvbIZwSA.js → mail-aEfuaSCr.js} +1 -1
- package/assets/{menu-g1nN4c6m.js → menu-CnR5z5hQ.js} +1 -1
- package/assets/{nav-link-Bdv8kjEd.js → nav-link-UUbkPPMg.js} +1 -1
- package/assets/new-UOrJpTbz.js +1 -0
- package/assets/onboarding-CE1GqVAK.js +1 -0
- package/assets/{onboarding-completion-CjqVIsEV.js → onboarding-completion-yyY7ooIW.js} +1 -1
- package/assets/outbox-BjrTttbX.js +1 -0
- package/assets/{pencil-C3mJE9QO.js → pencil-B7A6MPOt.js} +1 -1
- package/assets/{people-ClLsRDo6.js → people-lwS7SzAR.js} +1 -1
- package/assets/{plus-B9Kjb5MA.js → plus-D_zwaNNt.js} +1 -1
- package/assets/{popover-menu-kMqLztgE.js → popover-menu-Cwo1QYau.js} +1 -1
- package/assets/{refresh-cw-DdZ8vtf2.js → refresh-cw-Ct8GI0Vj.js} +1 -1
- package/assets/reply-CKR0JbDH.js +1 -0
- package/assets/{rich-text-DTsRvBWK.js → rich-text-DoqySYOC.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-Bf2g3xpp.js → rich-text-spellcheck-worker-provider-CRq84w6_.js} +1 -1
- package/assets/{rotate-ccw-DU-xqseJ.js → rotate-ccw-DLTgUk3r.js} +1 -1
- package/assets/{roving-focus-h-W142Au.js → roving-focus-DZDqBfb5.js} +1 -1
- package/assets/{row-actions-CJJYnXCz.js → row-actions-B2wFen9R.js} +1 -1
- package/assets/search-mirror-DpnpCDcj.js +1 -0
- package/assets/{search-scope-BCz9qlCH.js → search-scope-T2j_EsV0.js} +1 -1
- package/assets/search-token-index-BP7yKtG_.js +1 -0
- package/assets/{sections-40tp2E7G.js → sections-6h7DKCxQ.js} +1 -1
- package/assets/{segmented-control-CMCgmRqX.js → segmented-control-1R4LBvE6.js} +1 -1
- package/assets/{select-CpLCf4_c.js → select-CzHV_FFG.js} +1 -1
- package/assets/senders-BPxxJ0j1.js +1 -0
- package/assets/settings-CxT_7aK9.js +1 -0
- package/assets/{settings-screen-Bx-jomcC.js → settings-screen-Bbjg-6l6.js} +1 -1
- package/assets/shield-check-C2UgIrHV.js +1 -0
- package/assets/spam-ZsXuaYs-.js +1 -0
- package/assets/{suggest-list-gj7TdgNf.js → suggest-list-B6cD40Oq.js} +1 -1
- package/assets/{suggested-vips-D9pkriav.js → suggested-vips-CSjON5_8.js} +1 -1
- package/assets/suggestion._suggestionId-DuDQGf01.js +1 -0
- package/assets/{switch-D9ilXr2Z.js → switch-RGS_qoTB.js} +1 -1
- package/assets/{task._calendarTaskId-c5dsQ5Rn.js → task._calendarTaskId-Ckwunqac.js} +1 -1
- package/assets/{undo-2-B0kA9_bY.js → undo-2-Bnztakne.js} +1 -1
- package/assets/{useCalendarData-QcaY0Cgc.js → useCalendarData-CVSSTX7q.js} +1 -1
- package/assets/{useCalendarScheduling-BXMaoFja.js → useCalendarScheduling-A8jy-RIu.js} +1 -1
- package/assets/{useCalendarSuggestions-iprVdeF2.js → useCalendarSuggestions-BUA2-2mf.js} +1 -1
- package/assets/{useCalendarTasks-D9R56VL3.js → useCalendarTasks-DSxaVdL9.js} +1 -1
- package/assets/useClassificationSettings-ChYo6qTF.js +1 -0
- package/assets/{useDebouncedValue-M5m0kaQD.js → useDebouncedValue-KKz10SXI.js} +1 -1
- package/assets/{useFilters-BybioZf1.js → useFilters-DhxRBswc.js} +1 -1
- package/assets/useJunkMailboxIds-B_SqvUpu.js +1 -0
- package/assets/useLabels-CIb1kkc9.js +1 -0
- package/assets/{useLayoutTier-BpSsrmgl.js → useLayoutTier-DinVKpNb.js} +1 -1
- package/assets/{useMediaQuery-uf6mjwPE.js → useMediaQuery-BRSRIX06.js} +1 -1
- package/assets/useMessageBodyContent-B8gK2Lo3.js +3 -0
- package/assets/useQueries-Dp5PLsrF.js +1 -0
- package/assets/{useRefreshControl-ByEWNZY9.js → useRefreshControl-CAy6K6Em.js} +1 -1
- package/assets/{useResultFolderIndex-BksYikib.js → useResultFolderIndex-JpPkIntb.js} +1 -1
- package/assets/{useSignature-klArqmQ3.js → useSignature-C-S_OGgq.js} +1 -1
- package/assets/{warnings-B1lLZh5p.js → warnings-BaDRsN2r.js} +3 -3
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/BriefPane-B8ecM3zB.js +0 -1
- package/assets/FlaggedPane-kBIob-rC.js +0 -1
- package/assets/LabelApplyTrigger-OJ81BaYH.js +0 -1
- package/assets/MailboxPane-BRUYtKC7.js +0 -135
- package/assets/MessageBody-BIp2OZY6.js +0 -84
- package/assets/MessageToolbar-BzxIP4DM.js +0 -1
- package/assets/_calendarObjectId-DNhcPvtT.js +0 -1
- package/assets/_mailboxId-ThNYujv3.js +0 -1
- package/assets/_messageId-CKJI1yyc.js +0 -1
- package/assets/_messageId-ChPDqFRo.js +0 -1
- package/assets/_messageId-zm_VBLaY.js +0 -1
- package/assets/_outboxMessageId-DcDyjoYW.js +0 -1
- package/assets/_recurrenceId-C0Y19B2U.js +0 -1
- package/assets/_threadId-CmA2aUrS.js +0 -1
- package/assets/_threadId-Cqj7hjyS.js +0 -1
- package/assets/_threadId-DI4EN6E1.js +0 -1
- package/assets/advanced-CmaLt1-e.js +0 -1
- package/assets/brief-MY0I_pcw.js +0 -1
- package/assets/classification-0ZO1lOyG.js +0 -1
- package/assets/compose._-_outboxMessageId_-B1VRxkLN.js +0 -1
- package/assets/compose._-_outboxMessageId_-C46VmFN6.js +0 -1
- package/assets/compose._-_outboxMessageId_-CNjOOJSh.js +0 -1
- package/assets/compose._-_outboxMessageId_-P_jyR3kH.js +0 -1
- package/assets/edit-AzkegsLe.js +0 -1
- package/assets/edit-qD-xofN1.js +0 -1
- package/assets/filters-DEBkAOGr.js +0 -1
- package/assets/flagged-D6O3EhIo.js +0 -1
- package/assets/index-BA_isERD.js +0 -1
- package/assets/index-BI3VHL-i.js +0 -1
- package/assets/index-C-PJeYPQ.js +0 -1
- package/assets/index-CKJI1yyc.js +0 -1
- package/assets/index-COXNp0IG.js +0 -1
- package/assets/index-CfV5o-lD.js +0 -1
- package/assets/index-ChPDqFRo.js +0 -1
- package/assets/index-CkmUVU7Z.js +0 -1
- package/assets/index-CmOAOx38.js +0 -213
- package/assets/index-CrZmkeYk.js +0 -1
- package/assets/index-zm_VBLaY.js +0 -1
- package/assets/label-chip-OfJL52HU.js +0 -1
- package/assets/mail-Bf1kTy2y.js +0 -1
- package/assets/new-Dcxxskrf.js +0 -1
- package/assets/onboarding-cRvBetgB.js +0 -1
- package/assets/outbox-CTC-6RuN.js +0 -1
- package/assets/reply-BBXEHuds.js +0 -1
- package/assets/search-mirror-CqXcmXWg.js +0 -1
- package/assets/search-token-index-e0cXuR4s.js +0 -1
- package/assets/senders-DjPDuDhf.js +0 -1
- package/assets/settings-CWQQ_e-3.js +0 -1
- package/assets/shield-check-BbVUhw_R.js +0 -1
- package/assets/suggestion._suggestionId-BsoCLJDm.js +0 -1
- package/assets/useLabels-iMMBj-Ba.js +0 -1
- package/assets/useMessageBodyContent-CsZ9VCHu.js +0 -3
- package/assets/useQueries-DeYJYa06.js +0 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/calendar-CCfPHKaQ.js","assets/DesktopChrome-DHYyHOV_.js","assets/useLayoutTier-DinVKpNb.js","assets/useMediaQuery-BRSRIX06.js","assets/nav-link-UUbkPPMg.js","assets/reply-CKR0JbDH.js","assets/sections-6h7DKCxQ.js","assets/avatar-D3At1Qul.js","assets/popover-menu-Cwo1QYau.js","assets/roving-focus-DZDqBfb5.js","assets/mail-aEfuaSCr.js","assets/app-chrome-UVvRNKwI.js","assets/calendar-Cx77i_wv.js","assets/ErrorState-B5x7OO3P.js","assets/import-BRAmXjIS.js","assets/credential-steps-ihHk8G-d.js","assets/select-CzHV_FFG.js","assets/chevron-down-B0Bkzz-J.js","assets/badge-dj8dD-AR.js","assets/card-DLgsoLfF.js","assets/config-import-DYrX4xYR.js","assets/file-braces-DImhKXQB.js","assets/onboarding-completion-yyY7ooIW.js","assets/mail-D2zTFQj4.js","assets/useMessageBodyContent-B8gK2Lo3.js","assets/pencil-B7A6MPOt.js","assets/MailShell-BAZsxo3-.js","assets/FullCompose-By2bNMiB.js","assets/index-DHBczCNW.js","assets/useSignature-C-S_OGgq.js","assets/account-form-helpers-DhckT_PN.js","assets/useDebouncedValue-KKz10SXI.js","assets/suggest-list-B6cD40Oq.js","assets/confirm-dialog-CeB0RrSC.js","assets/search-scope-T2j_EsV0.js","assets/useRefreshControl-CAy6K6Em.js","assets/circle-check-big-CI7pNoKP.js","assets/refresh-cw-Ct8GI0Vj.js","assets/useQueries-Dp5PLsrF.js","assets/search-token-index-BP7yKtG_.js","assets/useLabels-CIb1kkc9.js","assets/menu-CnR5z5hQ.js","assets/useResultFolderIndex-JpPkIntb.js","assets/folder-failure-CqkVSsrb.js","assets/outbox-status-BlKn6P0x.js","assets/account-service-status-DIZp2CJy.js","assets/kbd-B0NHhH5P.js","assets/onboarding-CE1GqVAK.js","assets/OnboardingWizard-DqRtmDGR.js","assets/checkbox-DmpjHqx5.js","assets/_mailboxId-DXY2xie_.js","assets/MailboxPane-pHPHm1KP.js","assets/MailViewChrome-CeNEd8rP.js","assets/MessageToolbar-CMdOlqF2.js","assets/MessageBody-BHkIMp4s.js","assets/useJunkMailboxIds-B_SqvUpu.js","assets/undo-2-Bnztakne.js","assets/DropdownMenu-BPnbuxSi.js","assets/download-Im4qAd93.js","assets/EmptyState-B6TJewxS.js","assets/circle-question-mark-DS_MwyOq.js","assets/useFilters-DhxRBswc.js","assets/plus-D_zwaNNt.js","assets/calendar-suggestion-Cm4KjSk-.js","assets/useCalendarSuggestions-BUA2-2mf.js","assets/agenda-time-bZcjQKSG.js","assets/calendar-format-BwCpz-JZ.js","assets/calendar-failure-note-BUiZ-O7a.js","assets/clock-CXNiym3R.js","assets/segmented-control-1R4LBvE6.js","assets/folder-input-BBQLR_tO.js","assets/label-chip-DSBEe7ry.js","assets/cloud-off-DEFh0ByK.js","assets/LabelApplyTrigger-Bxs6cDOn.js","assets/NavMenuButton-Dha0SvsJ.js","assets/shield-check-C2UgIrHV.js","assets/bottom-sheet-CV9rObvl.js","assets/circle-check-luU3Az-0.js","assets/search-mirror-DpnpCDcj.js","assets/brief-2yNYS3wf.js","assets/brief-TvSyJ0Hh.js","assets/BriefPane-DfgrMpfo.js","assets/wizard-selection-zWa1qc6-.js","assets/flagged-DlXuJV7_.js","assets/flagged-UlACOt4x.js","assets/CollectionPane-Ud4h-8ub.js","assets/outbox-BjrTttbX.js","assets/OutboxPane-CWhLXXM2.js","assets/row-actions-B2wFen9R.js","assets/rotate-ccw-DLTgUk3r.js","assets/_slotId-DSoyw2sm.js","assets/settings-screen-Bbjg-6l6.js","assets/chevron-left-CXtArtIm.js","assets/accounts-C97z1Pd0.js","assets/switch-RGS_qoTB.js","assets/help-copy-CHQ_TpI3.js","assets/advanced--29ZYfrn.js","assets/external-link-BPfutwMA.js","assets/appearance-ZXFz5lao.js","assets/calendars-BFDTOhwb.js","assets/useCalendarScheduling-A8jy-RIu.js","assets/calendar-guests-aFcN8ViV.js","assets/calendar-event-popup-knBxRz2d.js","assets/copy-BVh-dc4N.js","assets/classification-M7vyyYc0.js","assets/useClassificationSettings-ChYo6qTF.js","assets/ReportLink-T3skoNQg.js","assets/filters-BixikXOX.js","assets/folders-tN5ItNP7.js","assets/labels-BHUDM5JS.js","assets/people-lwS7SzAR.js","assets/senders-BPxxJ0j1.js","assets/spam-ZsXuaYs-.js","assets/warnings-BaDRsN2r.js","assets/_view._date-hcmgBm1_.js","assets/useCalendarTasks-DSxaVdL9.js","assets/useCalendarData-CVSSTX7q.js","assets/CalendarLoadFailed-DqZc18ET.js","assets/CalendarQuickCreate-DvzkHIO9.js","assets/draft-gA8ktwkL.js","assets/CalendarSession-D_c9Y6UZ.js","assets/_view-CtgngRpB.css","assets/index-CUf1A0fN.js","assets/index-CbjCUjyM.js","assets/index-CisM5xYX.js","assets/_labelId-Cl0mm0aS.js","assets/index-BhPUwC8f.js","assets/new-UOrJpTbz.js","assets/CalendarEventEditor-nNdTRvrP.js","assets/calendar-event-sidebar-3BKQojrV.js","assets/index-DFaozp7e.js","assets/_messageId-DM4J2nkn.js","assets/compose._-_outboxMessageId_-CUUUaKzp.js","assets/index-CpLDLwG4.js","assets/_messageId-CpLDLwG4.js","assets/compose._-_outboxMessageId_-txkeSl3z.js","assets/index-Chdoahsq.js","assets/_messageId-C7RYu8D4.js","assets/compose._-_outboxMessageId_-C4UqzqsB.js","assets/index-0F6D1QL4.js","assets/compose._-_outboxMessageId_-D3ZrtXb-.js","assets/_outboxMessageId-DbphUtGt.js","assets/index-UJSPAbyu.js","assets/CalendarEventPopup-CK0ThqUH.js","assets/edit-AeV5d7Q9.js","assets/suggestion._suggestionId-DuDQGf01.js","assets/task._calendarTaskId-Ckwunqac.js","assets/index-BeKthChA.js","assets/_messageId-1xfg9JRz.js","assets/compose._-_outboxMessageId_-CSUyyPsf.js","assets/index-D-qIc_Ph.js","assets/edit-C9IrXIRT.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function mF(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var pm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w1={exports:{}},$d={};var zN;function AZ(){if(zN)return $d;zN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return $d.Fragment=t,$d.jsx=n,$d.jsxs=n,$d}var jN;function RZ(){return jN||(jN=1,w1.exports=AZ()),w1.exports}var O=RZ();const TZ="Logging",OZ="x-amz-user-agent",MZ="NoHubcallbackProvidedException";var Lr;(function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"})(Lr||(Lr={}));const BN={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class Vn{constructor(t,n=Lr.WARN){this.name=t,this.level=n,this._pluggables=[]}_padding(t){return t<10?"0"+t:""+t}_ts(){const t=new Date;return[this._padding(t.getMinutes()),this._padding(t.getSeconds())].join(":")+"."+t.getMilliseconds()}configure(t){return t?(this._config=t,this._config):this._config}_log(t,...n){let r=this.level;Vn.LOG_LEVEL&&(r=Vn.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const o=BN[r];if(!(BN[t]>=o))return;let a=console.log.bind(console);t===Lr.ERROR&&console.error&&(a=console.error.bind(console)),t===Lr.WARN&&console.warn&&(a=console.warn.bind(console)),Vn.BIND_ALL_LOG_LEVELS&&(t===Lr.INFO&&console.info&&(a=console.info.bind(console)),t===Lr.DEBUG&&console.debug&&(a=console.debug.bind(console)));const c=`[${t}] ${this._ts()} ${this.name}`;let u="";if(n.length===1&&typeof n[0]=="string")u=`${c} - ${n[0]}`,a(u);else if(n.length===1)u=`${c} ${n[0]}`,a(c,n[0]);else if(typeof n[0]=="string"){let f=n.slice(1);f.length===1&&(f=f[0]),u=`${c} - ${n[0]} ${f}`,a(`${c} - ${n[0]}`,f)}else u=`${c} ${n}`,a(c,n);for(const f of this._pluggables){const h={message:u,timestamp:Date.now()};f.pushLogs([h])}}log(...t){this._log(Lr.INFO,...t)}info(...t){this._log(Lr.INFO,...t)}warn(...t){this._log(Lr.WARN,...t)}error(...t){this._log(Lr.ERROR,...t)}debug(...t){this._log(Lr.DEBUG,...t)}verbose(...t){this._log(Lr.VERBOSE,...t)}addPluggable(t){t&&t.getCategoryName()===TZ&&(this._pluggables.push(t),t.configure(this._config))}listPluggables(){return this._pluggables}}Vn.LOG_LEVEL=null;Vn.BIND_ALL_LOG_LEVELS=!1;class Sr extends Error{constructor({message:t,name:n,recoverySuggestion:r,underlyingError:o,metadata:s}){if(super(t),this.name=n,this.underlyingError=o,this.recoverySuggestion=r,s){const{extendedRequestId:a,httpStatusCode:c,requestId:u}=s;this.metadata={extendedRequestId:a,httpStatusCode:c,requestId:u}}this.constructor=Sr,Object.setPrototypeOf(this,Sr.prototype)}}var Gi;(function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"})(Gi||(Gi={}));const uy=(e,t=Sr)=>(n,r,o)=>{const{message:s,recoverySuggestion:a}=e[r];if(!n)throw new t({name:r,message:o?`${s} ${o}`:s,recoverySuggestion:a})},Go=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",zd=new Vn("Hub");class gF{constructor(t){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=t}_remove(t,n){const r=this.listeners.get(t);if(!r){zd.warn(`No listeners for ${t}`);return}this.listeners.set(t,[...r.filter(({callback:o})=>o!==n)])}dispatch(t,n,r,o){typeof t=="string"&&this.protectedChannels.indexOf(t)>-1&&(o===Go||zd.warn(`WARNING: ${t} is protected and dispatching on it can have unintended consequences`));const s={channel:t,payload:{...n},source:r,patternInfo:[]};try{this._toListeners(s)}catch(a){zd.error(a)}}listen(t,n,r="noname"){let o;if(typeof n!="function")throw new Sr({name:MZ,message:"No callback supplied to Hub"});o=n;let s=this.listeners.get(t);return s||(s=[],this.listeners.set(t,s)),s.push({name:r,callback:o}),()=>{this._remove(t,o)}}_toListeners(t){const{channel:n,payload:r}=t,o=this.listeners.get(n);o&&o.forEach(s=>{zd.debug(`Dispatching to ${n} with `,r);try{s.callback(t)}catch(a){zd.error(a)}})}}const Ko=new gF("__default__"),nv=new gF("internal-hub"),MA=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new Sr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},PZ=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new Sr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},NZ=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new Sr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},PA={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),NZ()(n)}};var qo;(function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"})(qo||(qo={}));const kZ={[qo.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[qo.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[qo.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[qo.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[qo.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},NA=uy(kZ);function et(e){let t=!0;e?t=!!e.userPoolId&&!!e.userPoolClientId:t=!1,NA(t,qo.AuthUserPoolException)}function dy(e){const t=!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType;NA(t,qo.OAuthNotConfigureException)}function Ag(e){const t=!!e?.identityPoolId;NA(t,qo.InvalidIdentityPoolIdException)}function $s(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid token");try{const r=t[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(PA.convert(r).split("").map(a=>`%${`00${a.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),s=JSON.parse(o);return{toString:()=>e,payload:s}}catch{throw new Error("Invalid token payload")}}const vF=e=>{const t=Reflect.ownKeys(e);for(const n of t){const r=e[n];(r&&typeof r=="object"||typeof r=="function")&&vF(r)}return Object.freeze(e)},DZ=new Vn("parseAWSExports"),LZ={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},UZ=(e={})=>{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new Sr({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:o,aws_bots_config:s,aws_cognito_identity_pool_id:a,aws_cognito_sign_up_verification_method:c,aws_cognito_mfa_configuration:u,aws_cognito_mfa_types:f,aws_cognito_password_protection_settings:h,aws_cognito_verification_mechanisms:m,aws_cognito_signup_attributes:g,aws_cognito_social_providers:v,aws_cognito_username_attributes:C,aws_mandatory_sign_in:b,aws_mobile_analytics_app_id:E,aws_mobile_analytics_app_region:x,aws_user_files_s3_bucket:I,aws_user_files_s3_bucket_region:R,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:M,aws_user_pools_id:D,aws_user_pools_web_client_id:N,geo:T,oauth:L,predictions:$,aws_cloud_logic_custom:G,Notifications:z,modelIntrospection:F}=e,q={};E&&(q.Analytics={Pinpoint:{appId:E,region:x}});const{InAppMessaging:X,Push:Se}=z??{};if(X?.AWSPinpoint||Se?.AWSPinpoint){if(X?.AWSPinpoint){const{appId:ae,region:be}=X.AWSPinpoint;q.Notifications={InAppMessaging:{Pinpoint:{appId:ae,region:be}}}}if(Se?.AWSPinpoint){const{appId:ae,region:be}=Se.AWSPinpoint;q.Notifications={...q.Notifications,PushNotification:{Pinpoint:{appId:ae,region:be}}}}}if(Array.isArray(s)&&(q.Interactions={LexV1:Object.fromEntries(s.map(ae=>[ae.name,ae]))}),r){const ae=LZ[n];ae||DZ.debug(`Invalid authentication type ${n}. Falling back to IAM.`),q.API={GraphQL:{endpoint:r,apiKey:t,region:o,defaultAuthMode:ae??"iam"}},F&&(q.API.GraphQL.modelIntrospection=F)}const V=u?{status:u&&u.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,ee=h?{minLength:h.passwordPolicyMinLength,requireLowercase:h.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:h.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:h.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:h.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,ge=Array.from(new Set([...m??[],...g??[]])).reduce((ae,be)=>({...ae,[be.toLowerCase()]:{required:!0}}),{}),Te=C?.includes("EMAIL")??!1,j=C?.includes("PHONE_NUMBER")??!1;(a||D)&&(q.Auth={Cognito:{identityPoolId:a,allowGuestAccess:b!=="enable",signUpVerificationMethod:c,userAttributes:ge,userPoolClientId:N,userPoolId:D,mfa:V,passwordFormat:ee,loginWith:{username:!(Te||j),email:Te,phone:j}}});const te=L?Object.keys(L).length>0:!1,fe=v?v.length>0:!1;if(q.Auth&&te&&(q.Auth.Cognito.loginWith={...q.Auth.Cognito.loginWith,oauth:{...FZ(L),...fe&&{providers:$Z(v)}}}),I&&(q.Storage={S3:{bucket:I,region:R,dangerouslyConnectToHttpEndpointForTesting:M}}),T){const{amazon_location_service:ae}=T;q.Geo={LocationService:{maps:ae.maps,geofenceCollections:ae.geofenceCollections,searchIndices:ae.search_indices,region:ae.region}}}if(G&&(q.API={...q.API,REST:G.reduce((ae,be)=>{const{name:Fe,endpoint:ke,region:le,service:Re}=be;return{...ae,[Fe]:{endpoint:ke,...Re?{service:Re}:void 0,...le?{region:le}:void 0}}},{})}),$){const{VoiceId:ae}=$?.convert?.speechGenerator?.defaults??{};q.Predictions=ae?{...$,convert:{...$.convert,speechGenerator:{...$.convert.speechGenerator,defaults:{voiceId:ae}}}}:$}return q},HN=e=>e?.split(",")??[],FZ=({domain:e,scope:t,redirectSignIn:n,redirectSignOut:r,responseType:o})=>({domain:e,scopes:t,redirectSignIn:HN(n),redirectSignOut:HN(r),responseType:o}),$Z=e=>e.map(t=>{const n=t.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),yF=Symbol("oauth-listener"),Hn=[];for(let e=0;e<256;++e)Hn.push((e+256).toString(16).slice(1));function zZ(e,t=0){return(Hn[e[t+0]]+Hn[e[t+1]]+Hn[e[t+2]]+Hn[e[t+3]]+"-"+Hn[e[t+4]]+Hn[e[t+5]]+"-"+Hn[e[t+6]]+Hn[e[t+7]]+"-"+Hn[e[t+8]]+Hn[e[t+9]]+"-"+Hn[e[t+10]]+Hn[e[t+11]]+Hn[e[t+12]]+Hn[e[t+13]]+Hn[e[t+14]]+Hn[e[t+15]]).toLowerCase()}let E1;const jZ=new Uint8Array(16);function BZ(){if(!E1){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");E1=crypto.getRandomValues.bind(crypto)}return E1(jZ)}const HZ=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qN={randomUUID:HZ};function qZ(e,t,n){e=e||{};const r=e.random??e.rng?.()??BZ();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[n+o]=r[o];return t}return zZ(r)}function Gc(e,t,n){return qN.randomUUID&&!t&&!e?qN.randomUUID():qZ(e,t,n)}function VZ(e){const{version:t}=e;return t?t.startsWith("1"):!1}function WZ(e){if(!e)return;const{bucket_name:t,aws_region:n,buckets:r}=e;return{S3:{bucket:t,region:n,buckets:r&&rY(r)}}}function GZ(e){if(!e)return;const{user_pool_id:t,user_pool_client_id:n,identity_pool_id:r,password_policy:o,mfa_configuration:s,mfa_methods:a,unauthenticated_identities_enabled:c,oauth:u,username_attributes:f,standard_required_attributes:h,groups:m,passwordless:g}=e,v={Cognito:{userPoolId:t,userPoolClientId:n,groups:m}};return r&&(v.Cognito={...v.Cognito,identityPoolId:r}),o&&(v.Cognito.passwordFormat={requireLowercase:o.require_lowercase,requireNumbers:o.require_numbers,requireUppercase:o.require_uppercase,requireSpecialCharacters:o.require_symbols,minLength:o.min_length??6}),s&&(v.Cognito.mfa={status:nY(s),smsEnabled:a?.includes("SMS"),totpEnabled:a?.includes("TOTP")}),c&&(v.Cognito.allowGuestAccess=c),u&&(v.Cognito.loginWith={oauth:{domain:u.domain,redirectSignIn:u.redirect_sign_in_uri,redirectSignOut:u.redirect_sign_out_uri,responseType:u.response_type==="token"?"token":"code",scopes:u.scopes,providers:tY(u.identity_providers)}}),f&&(v.Cognito.loginWith={...v.Cognito.loginWith,email:f.includes("email"),phone:f.includes("phone_number"),username:f.includes("username")}),h&&(v.Cognito.userAttributes=h.reduce((C,b)=>({...C,[b]:{required:!0}}),{})),g&&(v.Cognito.passwordless={emailOtpEnabled:g.email_otp_enabled,smsOtpEnabled:g.sms_otp_enabled,webAuthn:g.web_authn?{relyingPartyId:g.web_authn.relying_party_id,userVerification:g.web_authn.user_verification}:void 0,preferredChallenge:g.preferred_challenge}),v}function KZ(e){if(!e?.amazon_pinpoint)return;const{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}function ZZ(e){if(!e)return;const{aws_region:t,geofence_collections:n,maps:r,search_indices:o}=e;return{LocationService:{region:t,searchIndices:o,geofenceCollections:n,maps:r}}}function YZ(e){if(!e)return;const{aws_region:t,default_authorization_type:n,url:r,api_key:o,model_introspection:s}=e;return{GraphQL:{endpoint:r,defaultAuthMode:bF(n),region:t,apiKey:o,modelIntrospection:s}}}function QZ(e){if(!e?.events)return;const{url:t,aws_region:n,api_key:r,default_authorization_type:o}=e.events;return{Events:{endpoint:t,defaultAuthMode:bF(o),region:n,apiKey:r}}}function XZ(e){if(!e)return;const{aws_region:t,channels:n,amazon_pinpoint_app_id:r}=e,o=n.includes("IN_APP_MESSAGING"),s=n.includes("APNS")||n.includes("FCM");if(!(o||s))return;const a={};return o&&(a.InAppMessaging={Pinpoint:{appId:r,region:t}}),s&&(a.PushNotification={Pinpoint:{appId:r,region:t}}),a}function JZ(e){const t={};if(e.storage&&(t.Storage=WZ(e.storage)),e.auth&&(t.Auth=GZ(e.auth)),e.analytics&&(t.Analytics=KZ(e.analytics)),e.geo&&(t.Geo=ZZ(e.geo)),e.data&&(t.API=YZ(e.data)),e.custom){const n=QZ(e.custom);n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=XZ(e.notifications)),t}const eY={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function bF(e){return eY[e]}const VN={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function tY(e=[]){return e.reduce((t,n)=>(VN[n]!==void 0&&t.push(VN[n]),t),[])}function nY(e){return e==="OPTIONAL"?"optional":e==="REQUIRED"?"on":"off"}function rY(e){const t={};return e.forEach(({name:n,bucket_name:r,aws_region:o,paths:s})=>{if(n in t)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const a=s?Object.entries(s).reduce((c,[u,f])=>(f!==void 0&&(c[u]=f),c),{}):void 0;t[n]={bucketName:r,region:o,paths:a}}),t}const SF=e=>Object.keys(e).some(t=>t.startsWith("aws_"))?UZ(e):VZ(e)?JZ(e):e;var WN=function(){return WN=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},WN.apply(this,arguments)};function hze(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function oY(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function c(h){try{f(r.next(h))}catch(m){a(m)}}function u(h){try{f(r.throw(h))}catch(m){a(m)}}function f(h){h.done?s(h.value):o(h.value).then(c,u)}f((r=r.apply(e,t||[])).next())})}function sY(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(f){return function(h){return u([f,h])}}function u(f){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(s=f[0]&2?o.return:f[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,f[1])).done)return s;switch(o=0,s&&(f=[f[0]&2,s.value]),f[0]){case 0:case 1:s=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]<s[3])){n.label=f[1];break}if(f[0]===6&&n.label<s[1]){n.label=s[1],s=f;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(f);break}s[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(h){f=[6,h],o=0}finally{r=s=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function pze(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var no=64,iY=32,aY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),lY=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],cY=Math.pow(2,53)-1,Rg=(function(){function e(){this.state=Int32Array.from(lY),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>cY)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===no&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%no>=no-8){for(var o=this.bufferLength;o<no;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<no-8;o++)n.setUint8(o,0);n.setUint32(no-8,Math.floor(t/4294967296),!0),n.setUint32(no-4,t),this.hashBuffer(),this.finished=!0}for(var s=new Uint8Array(iY),o=0;o<8;o++)s[o*4]=this.state[o]>>>24&255,s[o*4+1]=this.state[o]>>>16&255,s[o*4+2]=this.state[o]>>>8&255,s[o*4+3]=this.state[o]>>>0&255;return s},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,o=r[0],s=r[1],a=r[2],c=r[3],u=r[4],f=r[5],h=r[6],m=r[7],g=0;g<no;g++){if(g<16)this.temp[g]=(n[g*4]&255)<<24|(n[g*4+1]&255)<<16|(n[g*4+2]&255)<<8|n[g*4+3]&255;else{var v=this.temp[g-2],C=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10;v=this.temp[g-15];var b=(v>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;this.temp[g]=(C+this.temp[g-7]|0)+(b+this.temp[g-16]|0)}var E=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&f^~u&h)|0)+(m+(aY[g]+this.temp[g]|0)|0)|0,x=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&s^o&a^s&a)|0;m=h,h=f,f=u,u=c+E|0,c=a,a=s,s=o,o=E+x|0}r[0]+=o,r[1]+=s,r[2]+=a,r[3]+=c,r[4]+=u,r[5]+=f,r[6]+=h,r[7]+=m},e})();const uY=e=>new TextEncoder().encode(e);var dY=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:uY;function CF(e){return e instanceof Uint8Array?e:typeof e=="string"?dY(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function fY(e){return typeof e=="string"?e.length===0:e.byteLength===0}var nl=(function(){function e(t){this.secret=t,this.hash=new Rg,this.reset()}return e.prototype.update=function(t){if(!(fY(t)||this.error))try{this.hash.update(CF(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return oY(this,void 0,void 0,function(){return sY(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Rg,this.secret){this.outer=new Rg;var t=hY(this.secret),n=new Uint8Array(no);n.set(t);for(var r=0;r<no;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e})();function hY(e){var t=CF(e);if(t.byteLength>no){var n=new Rg;n.update(t),t=n.digest()}var r=new Uint8Array(no);return r.set(t),r}for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`)}var bn;(function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"})(bn||(bn={}));var lo;(function(e){e.AI="ai",e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"})(lo||(lo={}));var Ts;(function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"})(Ts||(Ts={}));var GN;(function(e){e.Record="1",e.IdentifyUser="2"})(GN||(GN={}));var KN;(function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"})(KN||(KN={}));var Ve;(function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"})(Ve||(Ve={}));var ZN;(function(e){e.Subscribe="1",e.GraphQl="2"})(ZN||(ZN={}));var xf;(function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"})(xf||(xf={}));var y_;(function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"})(y_||(y_={}));var YN;(function(e){e.None="0"})(YN||(YN={}));var QN;(function(e){e.Convert="1",e.Identify="2",e.Interpret="3"})(QN||(QN={}));var XN;(function(e){e.Subscribe="1"})(XN||(XN={}));var JN;(function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"})(JN||(JN={}));var Co;(function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"})(Co||(Co={}));const pY="6.18.0",fy=()=>typeof global<"u",xu=()=>typeof window<"u",wF=()=>typeof document<"u",kA=()=>typeof process<"u",$f=(e,t)=>!!Object.keys(e).find(n=>n.startsWith(t));var ek={};function mY(){const e=r=>r.startsWith("_react")||r.startsWith("__react"),t=r=>Object.keys(r).find(e),n=()=>Array.from(document.querySelectorAll("[id]"));return wF()&&n().some(t)}function gY(){return kA()&&typeof ek<"u"&&!!Object.keys(ek).find(e=>e.includes("react"))}function vY(){return xu()&&$f(window,"__VUE")}function yY(){return fy()&&$f(global,"__VUE")}var tk={};function bY(){return xu()&&$f(window,"__SVELTE")}function SY(){return kA()&&typeof tk<"u"&&!!Object.keys(tk).find(e=>e.includes("svelte"))}function CY(){return xu()&&window.next&&typeof window.next=="object"}function wY(){return fy()&&($f(global,"__next")||$f(global,"__NEXT"))}function EY(){return xu()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function xY(){return fy()&&typeof global.__NUXT_PATHS__<"u"}var nk={};function _Y(){const e=!!(wF()&&document.querySelector("[ng-version]")),t=!!(xu()&&typeof window.ng<"u");return e||t}function IY(){return kA()&&typeof nk=="object"&&nk.npm_lifecycle_script?.startsWith("ng ")||!1}function AY(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function RY(){return fy()&&typeof global.expo<"u"}function TY(){return xu()}const OY=[{platform:bn.Expo,detectionMethod:RY},{platform:bn.ReactNative,detectionMethod:AY},{platform:bn.NextJs,detectionMethod:CY},{platform:bn.Nuxt,detectionMethod:EY},{platform:bn.Angular,detectionMethod:_Y},{platform:bn.React,detectionMethod:mY},{platform:bn.VueJs,detectionMethod:vY},{platform:bn.Svelte,detectionMethod:bY},{platform:bn.WebUnknown,detectionMethod:TY},{platform:bn.NextJsSSR,detectionMethod:wY},{platform:bn.NuxtSSR,detectionMethod:xY},{platform:bn.ReactSSR,detectionMethod:gY},{platform:bn.VueJsSSR,detectionMethod:yY},{platform:bn.AngularSSR,detectionMethod:IY},{platform:bn.SvelteSSR,detectionMethod:SY}];function MY(){return OY.find(e=>e.detectionMethod())?.platform||bn.ServerSideUnknown}let _f;const x1=[];let b_=!1;const PY=10,NY=10,kY=1e3,EF=()=>{if(!_f){if(_f=MY(),b_)for(;x1.length;)x1.pop()?.();else x1.forEach(e=>{e()});rk(bn.ServerSideUnknown,PY),rk(bn.WebUnknown,NY)}return _f};function DY(){_f=void 0}function rk(e,t){_f===e&&!b_&&setTimeout(()=>{DY(),b_=!0,setTimeout(EF,kY)},t)}const Oi={},Es=e=>{Oi[e.category]=e.apis.reduce((r,o)=>({...r,[o]:{refCount:r[o]?.refCount?r[o].refCount+1:1,additionalDetails:e.additionalDetails}}),Oi[e.category]??{});let t=!1;return()=>{t||(t=!0,e.apis.forEach(r=>{const o=Oi[e.category][r].refCount;o>1?Oi[e.category][r].refCount=o-1:(delete Oi[e.category][r],Object.keys(Oi[e.category]).length||delete Oi[e.category])}))}},LY=(e,t)=>Oi[e]?.[t]?.additionalDetails,UY="aws-amplify",FY=e=>e.replace(/\+.*/,""),$Y=({category:e,action:t}={})=>{const n=[[UY,FY(pY)]];if(e&&n.push([e,t]),n.push(["framework",EF()]),e&&t){const r=LY(e,t);r&&r.forEach(o=>{n.push(o)})}return n},hy=e=>$Y(e).map(([r,o])=>r&&o?`${r}/${o}`:r).join(" "),py=()=>typeof window<"u"&&typeof window.document<"u",ok=new Vn("Auth");class zY{configure(t,n){this.authConfig=t,this.authOptions=n,t&&t.Cognito?.userPoolEndpoint&&ok.warn(sk("Amazon Cognito User Pool")),t&&t.Cognito?.identityPoolEndpoint&&ok.warn(sk("Amazon Cognito Identity Pool"))}async fetchAuthSession(t={}){let n,r;const o=await this.getTokens(t);return o?(r=o.accessToken?.payload?.sub,n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:o,authenticated:!0,forceRefresh:t.forceRefresh})):n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:t.forceRefresh}),{tokens:o,credentials:n?.credentials,identityId:n?.identityId,userSub:r}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(t){return await this.authOptions?.tokenProvider?.getTokens(t)??void 0}}const sk=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;class jY{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new zY}configure(t,n){const r=SF(t);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=vF(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),Ko.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",Go),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[yF](t){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?t(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=t}notifyOAuthListener(){!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth||!this.oAuthListener||(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}const Ut=new jY,xF=(e,t)=>e.Auth.fetchAuthSession(t),my=e=>xF(Ut,e);function _F(){return Ut.Auth.clearCredentials()}const gy=e=>{const{headers:t,statusCode:n}=e;return{...BY(e)?e.$metadata:{},httpStatusCode:n,requestId:t["x-amzn-requestid"]??t["x-amzn-request-id"]??t["x-amz-request-id"],extendedRequestId:t["x-amz-id-2"],cfId:t["x-amz-cf-id"]}},BY=e=>typeof e?.$metadata=="object",_u=async e=>{if(!e||e.statusCode<300)return;const t=await Sh(e),r=(a=>{const[c]=a.toString().split(/[,:]+/);return c.includes("#")?c.split("#")[1]:c})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError"),o=t.message??t.Message??"Unknown error",s=new Error(o);return Object.assign(s,{name:r,$metadata:gy(e)})},Sh=async e=>{if(!e.body)throw new Error("Missing response payload");const t=await e.body.json();return Object.assign(t,{$metadata:gy(e)})},Cn=(e,t,n,r)=>async(o,s)=>{const a={...r,...o},c=await a.endpointResolver(a,s),u=await t(s,c),f=await e(u,{...a});return n(f)},HY=300*1e3;function qY(e=HY){return r=>{const o=2**r*100+100*Math.random();return o>e?!1:o}}const IF=3,ik="amz-sdk-invocation-id",VY="amz-sdk-request",ak=300*1e3,AF=e=>{const n=qY(ak)(e);return n===!1?ak:n},WY=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],GY=e=>!!e&&WY.includes(e),RF=e=>async(t,n)=>{const r=n??await e(t)??void 0,o=r?.code||r?.name,s=t?.statusCode;return{retryable:QY(n)||YY(s,o)||GY(o)||XY(s,o)}},KY=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],ZY=["TimeoutError","RequestTimeout","RequestTimeoutException"],YY=(e,t)=>e===429||!!t&&KY.includes(t),QY=e=>[Gi.NetworkError,"ERR_NETWORK"].includes(e?.name),XY=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&ZY.includes(t),TF="cognito-identity",OF={service:TF,retryDecider:RF(_u),computeDelay:AF,cache:"no-store"},JY=({maxAttempts:e=IF,retryDecider:t,computeDelay:n,abortSignal:r})=>{if(e<1)throw new Error("maxAttempts must be greater than 0");return(o,s)=>async function(c){let u,f=s.attemptsCount??0,h;const m=()=>{if(h)return lk(h,f),h;throw lk(u,f),u};for(;!r?.aborted&&f<e;){try{h=await o(c),u=void 0}catch(C){u=C,h=void 0}f=(s.attemptsCount??0)>f?s.attemptsCount??0:f+1,s.attemptsCount=f;const{isCredentialsExpiredError:g,retryable:v}=await t(h,u,s);if(v){if(s.isCredentialsExpired=!!g,!r?.aborted&&f<e){const C=n(f);await eQ(C,r)}continue}else return m()}if(r?.aborted)throw new Error("Request aborted.");return m()}},eQ=(e,t)=>{if(t?.aborted)return Promise.resolve();let n,r;const o=new Promise(s=>{r=s,n=setTimeout(s,e)});return t?.addEventListener("abort",function s(a){clearTimeout(n),t?.removeEventListener("abort",s),r()}),o},lk=(e,t)=>{Object.prototype.toString.call(e)==="[object Object]"&&(e.$metadata={...e.$metadata??{},attempts:t})},tQ=Gc,nQ=()=>e=>async function(n){return n.headers[ik]||(n.headers[ik]=tQ()),e(n)},rQ=({maxAttempts:e=IF})=>(t,n)=>async function(o){const s=n.attemptsCount??0;return o.headers[VY]=`attempt=${s+1}; max=${e}`,t(o)},oQ=({userAgentHeader:e="x-amz-user-agent",userAgentValue:t=""})=>n=>async function(o){if(t.trim().length===0)return await n(o);{const s=e.toLowerCase();return o.headers[s]=o.headers[s]?`${o.headers[s]} ${t}`:t,await n(o)}},DA=(e,t)=>(n,r)=>{const o={};let s=a=>e(a,r);for(let a=t.length-1;a>=0;a--){const c=t[a];s=c(r)(s,o)}return s(n)},_1=e=>{let t;return()=>(t||(t=e()),t)},sQ=e=>!["HEAD","GET"].includes(e.toUpperCase()),iQ=async({url:e,method:t,headers:n,body:r},{abortSignal:o,cache:s,withCrossDomainCredentials:a})=>{let c;try{c=await fetch(e,{method:t,headers:n,body:sQ(t)?r:void 0,signal:o,cache:s,credentials:a?"include":"same-origin"})}catch(m){throw m instanceof TypeError?new Sr({name:Gi.NetworkError,message:"A network error has occurred.",underlyingError:m}):m}const u={};c.headers?.forEach((m,g)=>{u[g.toLowerCase()]=m});const f={statusCode:c.status,headers:u,body:null},h=Object.assign(c.body??{},{text:_1(()=>c.text()),blob:_1(()=>c.blob()),json:_1(()=>c.json())});return{...f,body:h}},MF=DA(iQ,[oQ,nQ,JY,rQ]),aQ=()=>e=>async function(n){return n.headers["cache-control"]="no-store",e(n)},PF=DA(MF,[aQ]),NF=e=>(t,n)=>{const r=lQ(e),o=JSON.stringify(t);return cQ(n,r,o)},lQ=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),cQ=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"}),ck=e=>Cn(PF,NF("GetCredentialsForIdentity"),uQ,{...OF,...e,userAgentValue:hy()}),uQ=async e=>{if(e.statusCode>=300)throw await _u(e);const t=await Sh(e);return{IdentityId:t.IdentityId,Credentials:dQ(t.Credentials),$metadata:gy(e)}},dQ=({Expiration:e,...t}={})=>({...t,Expiration:e&&new Date(e*1e3)}),fQ=e=>Cn(PF,NF("GetId"),hQ,{...OF,...e,userAgentValue:hy()}),hQ=async e=>{if(e.statusCode>=300)throw await _u(e);return{IdentityId:(await Sh(e)).IdentityId,$metadata:gy(e)}},kF={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},pQ={partitions:[kF,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},DF=e=>{const{partitions:t}=pQ;for(const{regions:n,outputs:r,regionRegex:o}of t){const s=new RegExp(o);if(n.includes(e)||s.test(e))return r.dnsSuffix}return kF.outputs.dnsSuffix},oa=URL,mQ=({region:e})=>({url:new oa(`https://${TF}.${e}.${DF(e)}`)});class df extends Sr{constructor(){super({name:Gi.PlatformNotSupported,message:"Function not supported on current platform"})}}class LF{constructor(t){this.storage=t}async setItem(t,n){if(!this.storage)throw new df;this.storage.setItem(t,n)}async getItem(t){if(!this.storage)throw new df;return this.storage.getItem(t)}async removeItem(t){if(!this.storage)throw new df;this.storage.removeItem(t)}async clear(){if(!this.storage)throw new df;this.storage.clear()}}class UF{constructor(){this.storage=new Map}get length(){return this.storage.size}key(t){return t>this.length-1?null:Array.from(this.storage.keys())[t]}setItem(t,n){this.storage.set(t,n)}getItem(t){return this.storage.get(t)??null}removeItem(t){this.storage.delete(t)}clear(){this.storage.clear()}}const FF=new Vn("CoreStorageUtils"),gQ=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{FF.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new UF},$F=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return FF.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new UF}};class vQ extends LF{constructor(){super(gQ())}}class yQ extends LF{constructor(){super($F())}}class bQ{constructor(t){this._storage=t}get storage(){if(!this._storage)throw new df;return this._storage}setItem(t,n){this.storage.setItem(t,n)}getItem(t){return this.storage.getItem(t)}removeItem(t){this.storage.removeItem(t)}clear(){this.storage.clear()}}class SQ extends bQ{constructor(){super($F())}}function mm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!=="__proto__"&&(e[r]=n[r])}return e}var CQ={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function S_(e,t){function n(o,s,a){if(!(typeof document>"u")){a=mm({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in a)a[u]&&(c+="; "+u,a[u]!==!0&&(c+="="+a[u].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+c}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],a={},c=0;c<s.length;c++){var u=s[c].split("="),f=u.slice(1).join("=");try{var h=decodeURIComponent(u[0]);if(h in a||(a[h]=e.read(f,h)),o===h)break}catch{}}return o?a[o]:a}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",mm({},s,{expires:-1}))},withAttributes:function(o){return S_(this.converter,mm({},this.attributes,o))},withConverter:function(o){return S_(mm({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var gm=S_(CQ,{path:"/"});class wQ{constructor(t={}){const{path:n,domain:r,expires:o,sameSite:s,secure:a}=t;if(this.domain=r,this.path=n||"/",this.expires=Object.prototype.hasOwnProperty.call(t,"expires")?o:365,this.secure=Object.prototype.hasOwnProperty.call(t,"secure")?a:!0,Object.prototype.hasOwnProperty.call(t,"sameSite")){if(!s||!["strict","lax","none"].includes(s))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if(s==="none"&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=s}}async setItem(t,n){gm.set(t,n,this.getData())}async getItem(t){return gm.get(t)??null}async removeItem(t){gm.remove(t,this.getData())}async clear(){const t=gm.get(),n=Object.keys(t).map(r=>this.removeItem(r));await Promise.all(n)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}const Ch=new vQ;new yQ;const Ns=new SQ,EQ=new Vn("I18n");let xQ=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),EQ.debug(this._lang)}setLanguage(t){this._lang=t}get(t,n=void 0){if(this.setDefaultLanguage(),!this._lang)return typeof n<"u"?n:t;const r=this._lang;let o=this.getByLanguage(t,r);return o||(r.indexOf("-")>0&&(o=this.getByLanguage(t,r.split("-")[0])),o)?o:typeof n<"u"?n:t}getByLanguage(t,n,r=null){if(!n)return r;const o=this._dict[n];return o?o[t]:r}putVocabulariesForLanguage(t,n){let r=this._dict[t];r||(r=this._dict[t]={}),this._dict[t]={...r,...n}}putVocabularies(t){Object.keys(t).forEach(n=>{this.putVocabulariesForLanguage(n,t[n])})}};var Ua;(function(e){e.NotConfigured="NotConfigured"})(Ua||(Ua={}));const _Q={[Ua.NotConfigured]:{message:"i18n is not configured."}},vm=uy(_Q),uk=new Vn("I18n");let ym={language:null},vo=null,zF=class Da{static configure(t){return uk.debug("configure I18n"),t&&(ym=Object.assign({},ym,t.I18n||t),Da.createInstance()),ym}static getModuleName(){return"I18n"}static createInstance(){uk.debug("create I18n instance"),!vo&&(vo=new xQ)}static setLanguage(t){Da.checkConfig(),vm(!!vo,Ua.NotConfigured),vo.setLanguage(t)}static get(t,n){return Da.checkConfig(),vm(!!vo,Ua.NotConfigured),vo.get(t,n)}static putVocabulariesForLanguage(t,n){Da.checkConfig(),vm(!!vo,Ua.NotConfigured),vo.putVocabulariesForLanguage(t,n)}static putVocabularies(t){Da.checkConfig(),vm(!!vo,Ua.NotConfigured),vo.putVocabularies(t)}static checkConfig(){return vo||Da.createInstance(),!0}};zF.createInstance();const IQ=e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(e);MA().getRandomValues(r);for(const o of r)n.push(t[o%t.length]);return n.join("")};function AQ(e){return(e.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function RQ(e){return e.split("").map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const TQ=e=>{let t;return async(...n)=>t||(t=new Promise((r,o)=>{e(...n).then(s=>{r(s)}).catch(s=>{o(s)}).finally(()=>{t=void 0})}),t)};function dk({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}const OQ=async()=>{const{userAgentData:e}=navigator;if(!e)return navigator.userAgent;const{platform:t="",platformVersion:n="",model:r="",architecture:o="",fullVersionList:s=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]),a=s.map(u=>`${u.brand}/${u.version}`).join(";");return[t,n,o,r,t,a].filter(u=>u).join(" ")||navigator.userAgent};function MQ(e){return Array.from(e,t=>String.fromCodePoint(t)).join("")}const nu={convert(e,t={urlSafe:!1,skipPadding:!1}){const n=typeof e=="string"?e:MQ(e);let r=PZ()(n);return t.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(r=r.replace(/=/g,"")),r}};function PQ(){return MA().getRandomValues(new Uint32Array(1))[0]}function NQ(e){const{words:t}=e,{sigBytes:n}=e,r=[];for(let o=0;o<n;o++){const s=t[o>>>2]>>>24-o%4*8&255;r.push((s>>>4).toString(16)),r.push((s&15).toString(16))}return r.join("")}class LA{constructor(t,n){this.words=[];let r=t;r=this.words=r||[],n!==void 0?this.sigBytes=n:this.sigBytes=r.length*4}random(t){const n=[];for(let r=0;r<t;r+=4)n.push(PQ());return new LA(n,t)}toString(){return NQ(this)}}var qe;(function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"})(qe||(qe={}));const jF={[qe.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[qe.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[qe.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[qe.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[qe.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[qe.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[qe.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[qe.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[qe.EmptySignInPassword]:{message:"password is required to signIn"},[qe.EmptySignInUsername]:{message:"username is required to signIn"},[qe.EmptySignUpPassword]:{message:"password is required to signUp"},[qe.EmptySignUpUsername]:{message:"username is required to signUp"},[qe.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[qe.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[qe.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[qe.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[qe.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[qe.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var Pn;(function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"})(Pn||(Pn={}));var Zo;(function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"})(Zo||(Zo={}));class Ue extends Sr{constructor(t){super(t),this.constructor=Ue,Object.setPrototypeOf(this,Ue.prototype)}}function an(e,t){const{message:n,recoverySuggestion:r}=jF[t];if(!e)throw new Ue({name:t,message:n,recoverySuggestion:r})}function dt(e){const t=e?.split("_")[0];if(!e||e.indexOf("_")<0||!t||typeof t!="string")throw new Ue({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function C_(e){if(!e||!e.includes(":"))throw new Ue({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}function fk(e){return Object.entries(e).map(([t,n])=>({Name:t,Value:n}))}function kQ(e){const t={};return e?.forEach(n=>{n.Name&&(t[n.Name]=n.Value)}),t}var hk;(function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(hk||(hk={}));var pk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(pk||(pk={}));var mk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UsernameExistsException="UsernameExistsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(mk||(mk={}));var gk;(function(e){e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(gk||(gk={}));var vk;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(vk||(vk={}));var yk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(yk||(yk={}));var bk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(bk||(bk={}));var Sk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Sk||(Sk={}));var Ck;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(Ck||(Ck={}));var wk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(wk||(wk={}));var Ek;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(Ek||(Ek={}));var xk;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(xk||(xk={}));var _k;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(_k||(_k={}));var Ik;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException"})(Ik||(Ik={}));var rv;(function(e){e.PasswordResetRequiredException="PasswordResetRequiredException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(rv||(rv={}));var Ak;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(Ak||(Ak={}));var Rk;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.MFAMethodNotFoundException="MFAMethodNotFoundException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Rk||(Rk={}));var Tk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Tk||(Tk={}));var w_;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UsernameExistsException="UsernameExistsException"})(w_||(w_={}));var Ok;(function(e){e.AliasExistsException="AliasExistsException",e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Ok||(Ok={}));var Mk;(function(e){e.CodeMismatchException="CodeMismatchException",e.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Mk||(Mk={}));var Pk;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Pk||(Pk={}));var Nk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Nk||(Nk={}));var kk;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(kk||(kk={}));const vy="UserUnAuthenticatedException",DQ="UserAlreadyAuthenticatedException",LQ="DeviceMetadataNotFoundException",BF="AutoSignInException",UQ="InvalidRedirectException",FQ="InvalidAppSchemeException",$Q="InvalidPreferredRedirectUrlException",zQ=new Ue({name:UQ,message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new Ue({name:FQ,message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});new Ue({name:$Q,message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."});const jQ="InvalidOriginException",BQ=new Ue({name:jQ,message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),HQ="OAuthSignOutException",qQ="TokenRefreshException",VQ="UnexpectedSignInInterruptionException";function Iu(e){if(!e||!e.accessToken)throw new Ue({name:vy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function WQ(e){if(!e||!e.idToken)throw new Ue({name:vy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const GQ=new Ue({name:qQ,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
|
|
3
|
+
Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow.
|
|
4
|
+
E.g { responseType: 'code' }`}),KQ=new Ue({name:vy,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function HF(e){if(QQ(e))throw GQ;if(!YQ(e))throw KQ}function qF(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new Ue({name:LQ,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}const ZQ={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function VF(e){return e?.accessToken||e?.idToken}function YQ(e){return VF(e)&&e?.refreshToken}function QQ(e){return VF(e)&&!e?.refreshToken}const XQ=async e=>{const t=e.getConfig().Auth?.Cognito;et(t);const n=await e.Auth.getTokens({forceRefresh:!1});Iu(n);const{"cognito:username":r,sub:o}=n.idToken?.payload??{},s={username:r,userId:o},a=JQ(n);return a&&(s.signInDetails=a),s};function JQ(e){return e?.signInDetails}const yy=async()=>XQ(Ut),It=(e,t)=>hy({category:lo.Auth,action:e,...t}),Nn=e=>(t,n)=>{const r=eX(e),o=JSON.stringify(t);return tX(n,r,o)},eX=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),tX=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"});function co(e){if(!e||e.name==="Error"||e instanceof TypeError)throw new Ue({name:Gi.Unknown,message:"An unknown error has occurred.",underlyingError:e})}const Wn=()=>async e=>{if(e.statusCode>=300){const t=await _u(e);throw co(t),new Ue({name:t.name,message:t.message,metadata:t.$metadata})}return Sh(e)},nX=()=>(e,t)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await Ut.libraryOptions?.Auth?.headers?.()},e(r)},kn=DA(MF,[nX]),WF="cognito-idp",Dn={service:WF,retryDecider:RF(_u),computeDelay:AF,get userAgentValue(){return hy()},cache:"no-store"},wh=e=>Cn(kn,Nn("InitiateAuth"),Wn(),{...Dn,...e}),$r=e=>Cn(kn,Nn("RespondToAuthChallenge"),Wn(),{...Dn,...e}),rX=e=>Cn(kn,Nn("VerifySoftwareToken"),Wn(),{...Dn,...e}),oX=e=>Cn(kn,Nn("AssociateSoftwareToken"),Wn(),{...Dn,...e}),sX=({region:e})=>({url:new oa(`https://${WF}.${e}.${DF(e)}`)}),ft=({endpointOverride:e})=>t=>e?{url:new oa(e)}:sX(t),iX=e=>Cn(kn,Nn("GetTokensFromRefreshToken"),Wn(),{...Dn,...e}),aX=async({tokens:e,authConfig:t,username:n,clientMetadata:r})=>{et(t?.Cognito);const{userPoolId:o,userPoolClientId:s,userPoolEndpoint:a}=t.Cognito,c=dt(o);HF(e);const u=iX({endpointResolver:ft({endpointOverride:a})}),{AuthenticationResult:f}=await u({region:c},{ClientId:s,RefreshToken:e.refreshToken,DeviceKey:e.deviceMetadata?.deviceKey,ClientMetadata:r}),h=$s(f?.AccessToken??""),m=f?.IdToken?$s(f.IdToken):void 0,{iat:g}=h.payload;if(!g)throw new Ue({name:"iatNotFoundException",message:"iat not found in access token"});const v=g*1e3-new Date().getTime();return{accessToken:h,idToken:m,clockDrift:v,refreshToken:f?.RefreshToken??e.refreshToken,username:n}},lX=TQ(aX),cX={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var ov;(function(e){e.InvalidAuthTokens="InvalidAuthTokens"})(ov||(ov={}));const uX={[ov.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},dX=uy(uX),Dk="CognitoIdentityServiceProvider";class fX{getKeyValueStorage(){if(!this.keyValueStorage)throw new Ue({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(t){this.keyValueStorage=t}setAuthConfig(t){this.authConfig=t}async loadTokens(){try{const t=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(t.accessToken);if(!n)throw new Ue({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const r=$s(n),o=await this.getKeyValueStorage().getItem(t.idToken),s=o?$s(o):void 0,a=await this.getKeyValueStorage().getItem(t.refreshToken)??void 0,c=await this.getKeyValueStorage().getItem(t.clockDrift)??"0",u=Number.parseInt(c),f=await this.getKeyValueStorage().getItem(t.signInDetails),h={accessToken:r,idToken:s,refreshToken:a,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:u,username:await this.getLastAuthUser()};return f&&(h.signInDetails=JSON.parse(f)),h}catch{return null}}async storeTokens(t){dX(t!==void 0,ov.InvalidAuthTokens);const n=t.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),n);const r=await this.getAuthKeys();await this.getKeyValueStorage().setItem(r.accessToken,t.accessToken.toString()),t.idToken?await this.getKeyValueStorage().setItem(r.idToken,t.idToken.toString()):await this.getKeyValueStorage().removeItem(r.idToken),t.refreshToken?await this.getKeyValueStorage().setItem(r.refreshToken,t.refreshToken):await this.getKeyValueStorage().removeItem(r.refreshToken),t.deviceMetadata&&(t.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(r.deviceKey,t.deviceMetadata.deviceKey),t.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(r.deviceGroupKey,t.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(r.randomPasswordKey,t.deviceMetadata.randomPassword)),t.signInDetails?await this.getKeyValueStorage().setItem(r.signInDetails,JSON.stringify(t.signInDetails)):await this.getKeyValueStorage().removeItem(r.signInDetails),await this.getKeyValueStorage().setItem(r.clockDrift,`${t.clockDrift}`)}async clearTokens(){const t=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(t.accessToken),this.getKeyValueStorage().removeItem(t.idToken),this.getKeyValueStorage().removeItem(t.clockDrift),this.getKeyValueStorage().removeItem(t.refreshToken),this.getKeyValueStorage().removeItem(t.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(t.oauthMetadata)])}async getDeviceMetadata(t){const n=await this.getAuthKeys(t),r=await this.getKeyValueStorage().getItem(n.deviceKey),o=await this.getKeyValueStorage().getItem(n.deviceGroupKey),s=await this.getKeyValueStorage().getItem(n.randomPasswordKey);return s&&o&&r?{deviceKey:r,deviceGroupKey:o,randomPassword:s}:null}async clearDeviceMetadata(t){const n=await this.getAuthKeys(t);await Promise.all([this.getKeyValueStorage().removeItem(n.deviceKey),this.getKeyValueStorage().removeItem(n.deviceGroupKey),this.getKeyValueStorage().removeItem(n.randomPasswordKey)])}async getAuthKeys(t){et(this.authConfig?.Cognito);const n=t??await this.getLastAuthUser();return hX(Dk,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){et(this.authConfig?.Cognito);const t=this.authConfig.Cognito.userPoolClientId;return`${Dk}.${t}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(t){const{oauthMetadata:n}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n,JSON.stringify(t))}async getOAuthMetadata(){const{oauthMetadata:t}=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(t);return n&&JSON.parse(n)}}const hX=(e,t)=>UA(cX)(`${e}`,t);function UA(e){const t=Object.values({...e});return(n,r)=>t.reduce((o,s)=>({...o,[s]:`${n}.${r}.${s}`}),{})}const Lk="amplify-signin-with-hostedUI",Uo="CognitoIdentityServiceProvider";class GF{constructor(t){this.keyValueStorage=t}async clearOAuthInflightData(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(t.inflightOAuth),this.keyValueStorage.removeItem(t.oauthPKCE),this.keyValueStorage.removeItem(t.oauthState)])}async clearOAuthData(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(Lk),this.keyValueStorage.removeItem(t.oauthSignIn)}loadOAuthState(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthState)}storeOAuthState(t){et(this.cognitoConfig);const n=Fo(Uo,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,t)}loadPKCE(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthPKCE)}storePKCE(t){et(this.cognitoConfig);const n=Fo(Uo,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,t)}setAuthConfig(t){this.cognitoConfig=t}async loadOAuthInFlight(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(t.inflightOAuth)==="true"}async storeOAuthInFlight(t){et(this.cognitoConfig);const n=Fo(Uo,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${t}`)}async loadOAuthSignIn(){et(this.cognitoConfig);const t=Fo(Uo,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(Lk),[r,o]=(await this.keyValueStorage.getItem(t.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:r==="true"||n==="true",preferPrivateSession:o==="true"}}async storeOAuthSignIn(t,n=!1){et(this.cognitoConfig);const r=Fo(Uo,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${t},${n}`)}}const Fo=(e,t)=>UA(ZQ)(e,t),gr=new GF(Ch),E_=[],pX=e=>{E_.push(e)},KF=()=>{for(;E_.length;)E_.pop()?.()};class mX{constructor(){this.waitForInflightOAuth=py()?async()=>{if(await gr.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((t,n)=>{pX(t)}),this.inflightPromise)}:async()=>{}}setAuthConfig(t){gr.setAuthConfig(t.Cognito),this.authConfig=t}setTokenRefresher(t){this.tokenRefresher=t}setAuthTokenStore(t){this.tokenStore=t}getTokenStore(){if(!this.tokenStore)throw new Ue({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new Ue({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(t){this.clientMetadataProvider=t}async getTokens(t){let n;try{et(this.authConfig?.Cognito)}catch{return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,n=await this.getTokenStore().loadTokens();const r=await this.getTokenStore().getLastAuthUser();if(n===null)return null;const o=!!n?.idToken&&dk({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),s=dk({expiresAt:(n.accessToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0});return(t?.forceRefresh||o||s)&&(n=await this.refreshTokens({tokens:n,username:r,clientMetadata:t?.clientMetadata??await this.clientMetadataProvider?.()}),n===null)?null:{accessToken:n?.accessToken,idToken:n?.idToken,signInDetails:n?.signInDetails}}async refreshTokens({tokens:t,username:n,clientMetadata:r}){try{const{signInDetails:o}=t,s=await this.getTokenRefresher()({tokens:t,authConfig:this.authConfig,username:n,clientMetadata:r});return s.signInDetails=o,await this.setTokens({tokens:s}),Ko.dispatch("auth",{event:"tokenRefresh"},"Auth",Go),s}catch(o){return this.handleErrors(o)}}handleErrors(t){if(co(t),this.isAuthenticationError(t)&&this.clearTokens(),Ko.dispatch("auth",{event:"tokenRefresh_failure",data:{error:t}},"Auth",Go),t.name.startsWith("NotAuthorizedException"))return null;throw t}isAuthenticationError(t){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(r=>t?.name?.startsWith?.(r))}async setTokens({tokens:t}){return this.getTokenStore().storeTokens(t)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(t){return this.getTokenStore().getDeviceMetadata(t)}clearDeviceMetadata(t){return this.getTokenStore().clearDeviceMetadata(t)}setOAuthMetadata(t){return this.getTokenStore().setOAuthMetadata(t)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class gX{constructor(){this.authTokenStore=new fX,this.authTokenStore.setKeyValueStorage(Ch),this.tokenOrchestrator=new mX,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(lX)}getTokens(t={}){return this.tokenOrchestrator.getTokens(t)}setKeyValueStorage(t){this.authTokenStore.setKeyValueStorage(t)}setClientMetadataProvider(t){this.tokenOrchestrator.setClientMetadataProvider(t)}setAuthConfig(t){this.authTokenStore.setAuthConfig(t),this.tokenOrchestrator.setAuthConfig(t)}}const Tg=new gX,{tokenOrchestrator:Cr}=Tg;async function Zs(e){if(e.AccessToken){const t=$s(e.AccessToken),n=(t.payload.iat||0)*1e3,r=new Date().getTime(),o=n>0?n-r:0;let s,a,c;e.RefreshToken&&(a=e.RefreshToken),e.IdToken&&(s=$s(e.IdToken)),e?.NewDeviceMetadata&&(c=e.NewDeviceMetadata);const u={accessToken:t,idToken:s,refreshToken:a,clockDrift:o,deviceMetadata:c,username:e.username};e?.signInDetails&&(u.signInDetails=e.signInDetails),await Cr.setTokens({tokens:u})}else throw new Sr({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const vX="Unable to get user session following successful sign-in.",sa=async()=>{try{Ko.dispatch("auth",{event:"signedIn",data:await yy()},"Auth",Go)}catch(e){throw e.name===vy?new Ue({name:VQ,message:vX,recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."}):e}};function ZF(){return{active:!1}}const yX=(e,t)=>{switch(t.type){case"SET_USERNAME":return{...e,username:t.value};case"SET_SESSION":return{...e,session:t.value};case"START":return{...e,active:!0};case"RESET":return ZF();default:return e}},bX=e=>{let t=e(ZF(),{type:"RESET"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},zi=bX(yX),SX=180*1e3,bm="CognitoSignInState",ks={username:`${bm}.username`,challengeName:`${bm}.challengeName`,signInSession:`${bm}.signInSession`,expiry:`${bm}.expiry`},CX=(e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return Sm({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return Sm(t.value),{...t.value};case"SET_CHALLENGE_NAME":return Sm({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return Sm({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return EX();case"RESET_STATE":return YF(),FA();default:return e}},wX=e=>{const t=Number(e),n=Date.now();return t<=n},Ro=()=>{Yo.dispatch({type:"RESET_STATE"})},YF=()=>{for(const e of Object.values(ks))Ns.removeItem(e)},FA=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),EX=()=>{const e=Ns.getItem(ks.expiry);if(!e||wX(e))return YF(),FA();const t=Ns.getItem(ks.username)??void 0,n=Ns.getItem(ks.challengeName)??void 0,r=Ns.getItem(ks.signInSession)??void 0;return{username:t,challengeName:n,signInSession:r}},xX=e=>{let t=e(FA(),{type:"SET_INITIAL_STATE"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},Yo=xX(CX);function gl(e){Yo.dispatch({type:"SET_SIGN_IN_STATE",value:e})}const Sm=({challengeName:e,signInSession:t,username:n})=>{n&&Ns.setItem(ks.username,n),e&&Ns.setItem(ks.challengeName,e),t&&(Ns.setItem(ks.signInSession,t),Ns.setItem(ks.expiry,String(Date.now()+SX)))},Uk="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class ao extends Sr{constructor(t){super(t),this.constructor=ao,Object.setPrototypeOf(this,ao.prototype)}}var Dt;(function(e){e.PasskeyNotSupported="PasskeyNotSupported",e.PasskeyAlreadyExists="PasskeyAlreadyExists",e.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",e.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",e.RelyingPartyMismatch="RelyingPartyMismatch",e.PasskeyRegistrationFailed="PasskeyRegistrationFailed",e.PasskeyRetrievalFailed="PasskeyRetrievalFailed",e.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",e.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",e.PasskeyOperationAborted="PasskeyOperationAborted"})(Dt||(Dt={}));const I1="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",Fk="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",ru={[Dt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:Uk},[Dt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:Fk},[Dt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:Fk},[Dt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:Uk},[Dt.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[Dt.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[Dt.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:I1},[Dt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:I1},[Dt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:I1},[Dt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},Au=uy(ru,ao),QF=e=>{if(e instanceof Error){if(e.name==="AbortError"){const{message:t,recoverySuggestion:n}=ru[Dt.PasskeyOperationAborted];return new ao({name:Dt.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="SecurityError"){const{message:t,recoverySuggestion:n}=ru[Dt.RelyingPartyMismatch];return new ao({name:Dt.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new ao({name:Gi.Unknown,message:"An unknown error has occurred.",underlyingError:e})},_X=e=>{if(e instanceof ao)return e;if(e instanceof Error&&e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=ru[Dt.PasskeyAuthenticationCanceled];return new ao({name:Dt.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return QF(e)},XF=()=>py()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Vo=e=>nu.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0}),If=e=>Uint8Array.from(PA.convert(e,{urlSafe:!0}),t=>t.charCodeAt(0)).buffer,IX=e=>{const t=If(e.user.id),n=If(e.challenge),r=(e.excludeCredentials||[]).map(o=>({...o,id:If(o.id)}));return{...e,excludeCredentials:r,challenge:n,user:{...e.user,id:t}}},AX=e=>{const t={clientDataJSON:Vo(e.response.clientDataJSON),attestationObject:Vo(e.response.attestationObject),transports:e.response.getTransports(),publicKeyAlgorithm:e.response.getPublicKeyAlgorithm(),authenticatorData:Vo(e.response.getAuthenticatorData())},n=e.response.getPublicKey();n&&(t.publicKey=Vo(n));const r={type:e.type,id:e.id,rawId:Vo(e.rawId),clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(r.authenticatorAttachment=e.authenticatorAttachment),r},RX=e=>{const t=If(e.challenge),n=(e.allowCredentials||[]).map(r=>({...r,id:If(r.id)}));return{...e,challenge:t,allowCredentials:n}},TX=e=>{const t={clientDataJSON:Vo(e.response.clientDataJSON),authenticatorData:Vo(e.response.authenticatorData),signature:Vo(e.response.signature)};e.response.userHandle&&(t.userHandle=Vo(e.response.userHandle));const n={id:e.id,rawId:Vo(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n};function OX(e){Au([!!e,!!e?.challenge,!!e?.user,!!e?.rp,!!e?.pubKeyCredParams].every(Boolean),Dt.InvalidPasskeyRegistrationOptions)}function MX(e){Au(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAttestationResponse,Dt.PasskeyRegistrationFailed)}function PX(e){Au(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,Dt.PasskeyRetrievalFailed)}const NX=async e=>{try{const t=XF();Au(t,Dt.PasskeyNotSupported);const n=RX(e),r=await navigator.credentials.get({publicKey:n});return PX(r),TX(r)}catch(t){throw _X(t)}},kX=e=>Cn(kn,Nn("ConfirmDevice"),Wn(),{...Dn,...e}),Og={convert(e){return new TextEncoder().encode(e)}};function Ae(e,t){e!=null&&this.fromString(e,t)}function ir(){return new Ae(null,null)}let qi;const DX=0xdeadbeefcafe,$k=(DX&16777215)===15715070;function LX(e,t,n,r,o,s){for(;--s>=0;){const a=t*this[e++]+n[r]+o;o=Math.floor(a/67108864),n[r++]=a&67108863}return o}function UX(e,t,n,r,o,s){const a=t&32767,c=t>>15;for(;--s>=0;){let u=this[e]&32767;const f=this[e++]>>15,h=c*u+f*a;u=a*u+((h&32767)<<15)+n[r]+(o&1073741823),o=(u>>>30)+(h>>>15)+c*f+(o>>>30),n[r++]=u&1073741823}return o}function FX(e,t,n,r,o,s){const a=t&16383,c=t>>14;for(;--s>=0;){let u=this[e]&16383;const f=this[e++]>>14,h=c*u+f*a;u=a*u+((h&16383)<<14)+n[r]+o,o=(u>>28)+(h>>14)+c*f,n[r++]=u&268435455}return o}const zk=typeof navigator<"u";zk&&$k&&navigator.appName==="Microsoft Internet Explorer"?(Ae.prototype.am=UX,qi=30):zk&&$k&&navigator.appName!=="Netscape"?(Ae.prototype.am=LX,qi=26):(Ae.prototype.am=FX,qi=28);Ae.prototype.DB=qi;Ae.prototype.DM=(1<<qi)-1;Ae.prototype.DV=1<<qi;const $A=52;Ae.prototype.FV=Math.pow(2,$A);Ae.prototype.F1=$A-qi;Ae.prototype.F2=2*qi-$A;const $X="0123456789abcdefghijklmnopqrstuvwxyz",by=[];let Ru,oo;Ru=48;for(oo=0;oo<=9;++oo)by[Ru++]=oo;Ru=97;for(oo=10;oo<36;++oo)by[Ru++]=oo;Ru=65;for(oo=10;oo<36;++oo)by[Ru++]=oo;function jk(e){return $X.charAt(e)}function zX(e,t){const n=by[e.charCodeAt(t)];return n??-1}function jX(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function BX(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function zA(e){const t=ir();return t.fromInt(e),t}function HX(e,t){let n;if(t===16)n=4;else if(t===8)n=3;else if(t===2)n=1;else if(t===32)n=5;else if(t===4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let r=e.length,o=!1,s=0;for(;--r>=0;){const a=zX(e,r);if(a<0){e.charAt(r)==="-"&&(o=!0);continue}o=!1,s===0?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,s+=n,s>=this.DB&&(s-=this.DB)}this.clamp(),o&&Ae.ZERO.subTo(this,this)}function qX(){const e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t}function VX(e){if(this.s<0)return"-"+this.negate().toString(e);let t;if(e==16)t=4;else if(e===8)t=3;else if(e===2)t=1;else if(e===32)t=5;else if(e===4)t=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");const n=(1<<t)-1;let r,o=!1,s="",a=this.t,c=this.DB-a*this.DB%t;if(a-- >0)for(c<this.DB&&(r=this[a]>>c)>0&&(o=!0,s=jk(r));a>=0;)c<t?(r=(this[a]&(1<<c)-1)<<t-c,r|=this[--a]>>(c+=this.DB-t)):(r=this[a]>>(c-=t)&n,c<=0&&(c+=this.DB,--a)),r>0&&(o=!0),o&&(s+=jk(r));return o?s:"0"}function WX(){const e=ir();return Ae.ZERO.subTo(this,e),e}function GX(){return this.s<0?this.negate():this}function KX(e){let t=this.s-e.s;if(t!=0)return t;let n=this.t;if(t=n-e.t,t!=0)return this.s<0?-t:t;for(;--n>=0;)if((t=this[n]-e[n])!=0)return t;return 0}function jA(e){let t=1,n;return(n=e>>>16)!==0&&(e=n,t+=16),(n=e>>8)!==0&&(e=n,t+=8),(n=e>>4)!==0&&(e=n,t+=4),(n=e>>2)!==0&&(e=n,t+=2),(n=e>>1)!==0&&(e=n,t+=1),t}function ZX(){return this.t<=0?0:this.DB*(this.t-1)+jA(this[this.t-1]^this.s&this.DM)}function YX(e,t){let n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function QX(e,t){for(let n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s}function XX(e,t){const n=e%this.DB,r=this.DB-n,o=(1<<r)-1,s=Math.floor(e/this.DB);let a=this.s<<n&this.DM,c;for(c=this.t-1;c>=0;--c)t[c+s+1]=this[c]>>r|a,a=(this[c]&o)<<n;for(c=s-1;c>=0;--c)t[c]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()}function JX(e,t){t.s=this.s;const n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}const r=e%this.DB,o=this.DB-r,s=(1<<r)-1;t[0]=this[n]>>r;for(let a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&s)<<o,t[a-n]=this[a]>>r;r>0&&(t[this.t-n-1]|=(this.s&s)<<o),t.t=this.t-n,t.clamp()}function eJ(e,t){let n=0,r=0;const o=Math.min(e.t,this.t);for(;n<o;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()}function tJ(e,t){const n=this.abs(),r=e.abs();let o=n.t;for(t.t=o+r.t;--o>=0;)t[o]=0;for(o=0;o<r.t;++o)t[o+n.t]=n.am(0,r[o],t,o,0,n.t);t.s=0,t.clamp(),this.s!==e.s&&Ae.ZERO.subTo(t,t)}function nJ(e){const t=this.abs();let n=e.t=2*t.t;for(;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){const r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()}function rJ(e,t,n){const r=e.abs();if(r.t<=0)return;const o=this.abs();if(o.t<r.t){t?.fromInt(0),n!=null&&this.copyTo(n);return}n===null&&(n=ir());const s=ir(),a=this.s,c=e.s,u=this.DB-jA(r[r.t-1]);u>0?(r.lShiftTo(u,s),o.lShiftTo(u,n)):(r.copyTo(s),o.copyTo(n));const f=s.t,h=s[f-1];if(h===0)return;const m=h*(1<<this.F1)+(f>1?s[f-2]>>this.F2:0),g=this.FV/m,v=(1<<this.F1)/m,C=1<<this.F2;let b=n.t,E=b-f;const x=t===null?ir():t;for(s.dlShiftTo(E,x),n.compareTo(x)>=0&&(n[n.t++]=1,n.subTo(x,n)),Ae.ONE.dlShiftTo(f,x),x.subTo(s,s);s.t<f;)s[s.t++]=0;for(;--E>=0;){let I=n[--b]===h?this.DM:Math.floor(n[b]*g+(n[b-1]+C)*v);if((n[b]+=s.am(0,I,n,E,0,f))<I)for(s.dlShiftTo(E,x),n.subTo(x,n);n[b]<--I;)n.subTo(x,n)}t!==null&&(n.drShiftTo(f,t),a!==c&&Ae.ZERO.subTo(t,t)),n.t=f,n.clamp(),u>0&&n.rShiftTo(u,n),a<0&&Ae.ZERO.subTo(n,n)}function oJ(e){const t=ir();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Ae.ZERO)>0&&e.subTo(t,t),t}function sJ(){if(this.t<1)return 0;const e=this[0];if((e&1)===0)return 0;let t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function iJ(e){return this.compareTo(e)===0}function aJ(e,t){let n=0,r=0;const o=Math.min(e.t,this.t);for(;n<o;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()}function lJ(e){const t=ir();return this.addTo(e,t),t}function cJ(e){const t=ir();return this.subTo(e,t),t}function uJ(e){const t=ir();return this.multiplyTo(e,t),t}function dJ(e){const t=ir();return this.divRemTo(e,t,null),t}function Tu(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function fJ(e){const t=ir();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Ae.ZERO)>0&&this.m.subTo(t,t),t}function hJ(e){const t=ir();return e.copyTo(t),this.reduce(t),t}function pJ(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(let t=0;t<this.m.t;++t){let n=e[t]&32767;const r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function mJ(e,t){e.squareTo(t),this.reduce(t)}function gJ(e,t,n){e.multiplyTo(t,n),this.reduce(n)}Tu.prototype.convert=fJ;Tu.prototype.revert=hJ;Tu.prototype.reduce=pJ;Tu.prototype.mulTo=gJ;Tu.prototype.sqrTo=mJ;function vJ(e,t,n){let r=e.bitLength(),o,s=zA(1);const a=new Tu(t);if(r<=0)return s;r<18?o=1:r<48?o=3:r<144?o=4:r<768?o=5:o=6;const c=[];let u=3;const f=o-1,h=(1<<o)-1;if(c[1]=a.convert(this),o>1){const x=ir();for(a.sqrTo(c[1],x);u<=h;)c[u]=ir(),a.mulTo(x,c[u-2],c[u]),u+=2}let m=e.t-1,g,v=!0,C=ir(),b;for(r=jA(e[m])-1;m>=0;){for(r>=f?g=e[m]>>r-f&h:(g=(e[m]&(1<<r+1)-1)<<f-r,m>0&&(g|=e[m-1]>>this.DB+r-f)),u=o;(g&1)===0;)g>>=1,--u;if((r-=u)<0&&(r+=this.DB,--m),v)c[g].copyTo(s),v=!1;else{for(;u>1;)a.sqrTo(s,C),a.sqrTo(C,s),u-=2;u>0?a.sqrTo(s,C):(b=s,s=C,C=b),a.mulTo(C,c[g],s)}for(;m>=0&&(e[m]&1<<r)===0;)a.sqrTo(s,C),b=s,s=C,C=b,--r<0&&(r=this.DB-1,--m)}const E=a.revert(s);return n(null,E),E}Ae.prototype.copyTo=jX;Ae.prototype.fromInt=BX;Ae.prototype.fromString=HX;Ae.prototype.clamp=qX;Ae.prototype.dlShiftTo=YX;Ae.prototype.drShiftTo=QX;Ae.prototype.lShiftTo=XX;Ae.prototype.rShiftTo=JX;Ae.prototype.subTo=eJ;Ae.prototype.multiplyTo=tJ;Ae.prototype.squareTo=nJ;Ae.prototype.divRemTo=rJ;Ae.prototype.invDigit=sJ;Ae.prototype.addTo=aJ;Ae.prototype.toString=VX;Ae.prototype.negate=WX;Ae.prototype.abs=GX;Ae.prototype.compareTo=KX;Ae.prototype.bitLength=ZX;Ae.prototype.mod=oJ;Ae.prototype.equals=iJ;Ae.prototype.add=lJ;Ae.prototype.subtract=cJ;Ae.prototype.multiply=uJ;Ae.prototype.divide=dJ;Ae.prototype.modPow=vJ;Ae.ZERO=zA(0);Ae.ONE=zA(1);const yJ=async({a:e,g:t,k:n,x:r,B:o,N:s,U:a})=>new Promise((c,u)=>{t.modPow(r,s,(f,h)=>{if(f){u(f);return}o.subtract(n.multiply(h)).modPow(e.add(a.multiply(r)),s,(m,g)=>{if(m){u(m);return}c(g.mod(s))})})}),bJ="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",JF={},x_={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),JF[e]=t,x_[t]=e}const ou=e=>{if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(r in x_)t[n/2]=x_[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t},BA=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=JF[e[n]];return t},__=e=>{const t=new nl;t.update(e);const n=t.digestSync(),r=BA(n);return new Array(64-r.length).join("0")+r},Mg=e=>__(ou(e)),SJ=/^[89a-f]/i,Os=e=>{if(!(e instanceof Ae))throw new Error("Not a BigInteger");const t=e.compareTo(Ae.ZERO)<0;let n=e.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=SJ.test(n)?`00${n}`:n,t){const r=n.split("").map(s=>{const a=~parseInt(s,16)&15;return"0123456789ABCDEF".charAt(a)}).join("");n=new Ae(r,16).add(Ae.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},CJ=({A:e,B:t})=>{const n=new Ae(Mg(Os(e)+Os(t)),16);if(n.equals(Ae.ZERO))throw new Error("U cannot be zero.");return n},wJ=(e,t,n)=>{const r=new nl(t);r.update(e);const o=r.digestSync(),s=new nl(o);return s.update(n),s.digestSync().slice(0,16)},HA=e=>{const t=new LA().random(e).toString();return ou(t)},EJ=()=>nu.convert(HA(40));class xJ{constructor({userPoolName:t,a:n,g:r,A:o,N:s}){this.encoder=Og,this.userPoolName=t,this.a=n,this.g=r,this.A=o,this.N=s,this.k=new Ae(Mg(`${Os(s)}${Os(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new Ue({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new Ue({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new Ue({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(t,n){this.randomPassword=EJ();const r=`${t}${n}:${this.randomPassword}`,o=__(r),s=BA(HA(16));return this.saltToHashDevices=Os(new Ae(s,16)),new Promise((a,c)=>{this.g.modPow(new Ae(Mg(this.saltToHashDevices+o),16),this.N,(u,f)=>{if(u){c(u);return}this.verifierDevices=Os(f),a()})})}async getPasswordAuthenticationKey({username:t,password:n,serverBValue:r,salt:o}){if(r.mod(this.N).equals(Ae.ZERO))throw new Error("B cannot be zero.");const s=CJ({A:this.A,B:r}),a=`${this.userPoolName}${t}:${n}`,c=__(a),u=new Ae(Mg(Os(o)+c),16),f=await yJ({a:this.a,g:this.g,k:this.k,x:u,B:r,N:this.N,U:s}),h=this.encoder.convert("Caldera Derived Key"),m=this.encoder.convert(""),g=new Uint8Array(h.byteLength+m.byteLength);return g.set(h,0),g.set(m,h.byteLength),wJ(ou(Os(f)),ou(Os(s)),g)}}const _J=async({a:e,g:t,N:n})=>new Promise((r,o)=>{t.modPow(e,n,(s,a)=>{if(s){o(s);return}if(a.mod(n).equals(Ae.ZERO)){o(new Error("Illegal parameter. A mod N cannot be 0."));return}r(a)})}),Eh=async e=>{const t=new Ae(bJ,16),n=new Ae("2",16),r=IJ(),o=await _J({a:r,g:n,N:t});return new xJ({userPoolName:e,a:r,g:n,A:o,N:t})},IJ=()=>{const e=BA(HA(128));return new Ae(e,16)};async function vl({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:r}){if(!n)return;const o=e.split("_")[1]||"",s=await Eh(o),a=n?.DeviceKey,c=n?.DeviceGroupKey;try{await s.generateHashDevice(c??"",a??"")}catch{return}const u={Salt:nu.convert(ou(s.getSaltToHashDevices())),PasswordVerifier:nu.convert(ou(s.getVerifierDevices()))},f=s.getRandomPassword();try{return await kX({endpointResolver:ft({endpointOverride:t})})({region:dt(e)},{AccessToken:r,DeviceName:await OQ(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:u}),{deviceKey:a,deviceGroupKey:c,randomPassword:f}}catch{return}}async function AJ(e){const t=Ut.getConfig().Auth?.Cognito;et(t);const{username:n,signInSession:r,signInDetails:o,challengeName:s}=Yo.getState();if(s!=="WEB_AUTHN"||!n)throw new Ue({name:Zo.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:a}=e;Au(!!a,Dt.InvalidPasskeyAuthenticationOptions);const c=await NX(JSON.parse(a)),u=$r({endpointResolver:ft({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:h,AuthenticationResult:m,Session:g}=await u({region:dt(t.userPoolId),userAgentValue:It(Ve.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(c)},ClientId:t.userPoolClientId,Session:r});if(gl({signInSession:g,username:n,challengeName:f,signInDetails:o}),m)return await Zs({...m,username:n,NewDeviceMetadata:await vl({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:m.NewDeviceMetadata,accessToken:m.AccessToken}),signInDetails:o}),Yo.dispatch({type:"RESET_STATE"}),await sa(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Ue({name:Zo.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:h}}function Ln({username:e,userPoolId:t,userPoolClientId:n}){if(typeof window>"u")return;const r=window.AmazonCognitoAdvancedSecurityData;if(typeof r>"u")return;const o=r.getData(e,t,n);return o?{EncodedData:o}:{}}const RJ=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],TJ=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e$=()=>{const e=new Date,t=TJ[e.getUTCDay()],n=RJ[e.getUTCMonth()],r=e.getUTCDate();let o=e.getUTCHours();o<10&&(o=`0${o}`);let s=e.getUTCMinutes();s<10&&(s=`0${s}`);let a=e.getUTCSeconds();a<10&&(a=`0${a}`);const c=e.getUTCFullYear();return`${t} ${n} ${r} ${o}:${s}:${a} UTC ${c}`},t$=({userPoolName:e,username:t,challengeParameters:n,dateNow:r,hkdf:o})=>{const s=Og.convert(e),a=Og.convert(t),c=OJ(n.SECRET_BLOCK),u=Og.convert(r),f=new Uint8Array(s.byteLength+a.byteLength+c.byteLength+u.byteLength);f.set(s,0),f.set(a,s.byteLength),f.set(c,s.byteLength+a.byteLength),f.set(u,s.byteLength+a.byteLength+c.byteLength);const h=new nl(o);h.update(f);const m=h.digestSync();return nu.convert(m)},OJ=e=>{const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=PA.convert(n),o=new Uint8Array(r.length);for(let s=0;s<r.length;++s)o[s]=r.charCodeAt(s);return o};async function xh({username:e,config:t,clientMetadata:n,session:r,tokenOrchestrator:o}){const{userPoolId:s,userPoolEndpoint:a}=t,c=t.userPoolClientId,u=await o?.getDeviceMetadata(e);qF(u);const f=await Eh(u.deviceGroupKey),h={USERNAME:e,SRP_A:f.A.toString(16),DEVICE_KEY:u.deviceKey},m={ChallengeName:"DEVICE_SRP_AUTH",ClientId:c,ChallengeResponses:h,ClientMetadata:n,Session:r},g=$r({endpointResolver:ft({endpointOverride:a})}),{ChallengeParameters:v,Session:C}=await g({region:dt(s)},m);return MJ(e,v,n,C,f,t,o)}async function MJ(e,t,n,r,o,{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c},u){const f=await u?.getDeviceMetadata(e);qF(f);const h=new Ae(t?.SRP_B,16),m=new Ae(t?.SALT,16),{deviceKey:g}=f,{deviceGroupKey:v}=f,C=await o.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:h,salt:m}),b=e$(),E={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:b,PASSWORD_CLAIM_SIGNATURE:t$({username:g,userPoolName:v,challengeParameters:t,dateNow:b,hkdf:C}),DEVICE_KEY:g},x=Ln({username:e,userPoolId:s,userPoolClientId:a}),I={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:a,ChallengeResponses:E,Session:r,ClientMetadata:n,UserContextData:x};return $r({endpointResolver:ft({endpointOverride:c})})({region:dt(s)},I)}async function qA(e,t,n,r,o,s,a){const{userPoolId:c,userPoolClientId:u,userPoolEndpoint:f}=s,h=c?.split("_")[1]||"",m=new Ae(t?.SRP_B,16),g=new Ae(t?.SALT,16),v=t?.USER_ID_FOR_SRP;if(!v)throw new Ue({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const C=await o.getPasswordAuthenticationKey({username:v,password:e,serverBValue:m,salt:g}),b=e$(),E={USERNAME:v,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:b,PASSWORD_CLAIM_SIGNATURE:t$({username:v,userPoolName:h,challengeParameters:t,dateNow:b,hkdf:C})},x=await a.getDeviceMetadata(v);x&&x.deviceKey&&(E.DEVICE_KEY=x.deviceKey);const I=Ln({username:v,userPoolId:c,userPoolClientId:u}),R={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:E,ClientMetadata:n,Session:r,ClientId:u,UserContextData:I},D=await $r({endpointResolver:ft({endpointOverride:f})})({region:dt(c)},R);return D.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:v,config:s,clientMetadata:n,session:D.Session,tokenOrchestrator:a}):D}async function Ou(e,t,n,r){try{return await e(...t)}catch(o){if(o instanceof Ue&&o.name==="ResourceNotFoundException"&&o.message.includes("Device does not exist."))return await r.clearDeviceMetadata(n),e(...t);throw o}}function yl(e){const{dispatch:t}=Yo;t({type:"SET_USERNAME",value:e})}async function n$({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:s,preferredChallenge:a}){const{userPoolId:c,userPoolClientId:u,userPoolEndpoint:f}=r,h=c?.split("_")[1]||"",m=await Eh(h),g={USERNAME:e,SRP_A:m.A.toString(16)};s==="USER_AUTH"&&a&&(g.PREFERRED_CHALLENGE=a);const v=Ln({username:e,userPoolId:c,userPoolClientId:u}),C={AuthFlow:s,AuthParameters:g,ClientMetadata:n,ClientId:u,UserContextData:v},E=await wh({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:It(Ve.SignIn)},C),{ChallengeParameters:x,Session:I}=E,R=x?.USERNAME??e;return yl(R),E.ChallengeName==="PASSWORD_VERIFIER"?Ou(qA,[t,x,n,I,m,r,o],R,o):E}async function PJ({username:e,session:t,selectedChallenge:n,config:r,clientMetadata:o}){return $r({endpointResolver:ft({endpointOverride:r.userPoolEndpoint})})({region:dt(r.userPoolId),userAgentValue:It(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:e,ANSWER:n},ClientId:r.userPoolClientId,Session:t,ClientMetadata:o})}async function NJ(e,t,n,r,o){const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c}=r,u={ANSWER:"PASSWORD",USERNAME:e,PASSWORD:t},f=Ln({username:e,userPoolId:s,userPoolClientId:a}),m=await $r({endpointResolver:ft({endpointOverride:c})})({region:dt(s),userAgentValue:It(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:u,ClientId:a,ClientMetadata:n,Session:o,UserContextData:f}),g=m.ChallengeParameters?.USERNAME??e;return yl(g),m}async function kJ(e,t,n,r,o,s){const{userPoolId:a,userPoolClientId:c,userPoolEndpoint:u}=r,f=a.split("_")[1]||"",h=await Eh(f),m={ANSWER:"PASSWORD_SRP",USERNAME:e,SRP_A:h.A.toString(16)},g=Ln({username:e,userPoolId:a,userPoolClientId:c}),C=await $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:m,ClientId:c,ClientMetadata:n,Session:o,UserContextData:g}),b=C.ChallengeParameters?.USERNAME??e;return yl(b),C.ChallengeName==="PASSWORD_VERIFIER"?Ou(qA,[t,C.ChallengeParameters,n,C.Session,h,r,s],b,s):C}const I_="userAttributes.";function DJ(e){return"isSignedIn"in e&&"nextStep"in e}async function LJ({challengeResponse:e,clientMetadata:t,session:n,username:r,config:o,tokenOrchestrator:s}){const{userPoolId:a,userPoolClientId:c,userPoolEndpoint:u}=o,f={USERNAME:r,ANSWER:e},h=await s?.getDeviceMetadata(r);h&&h.deviceKey&&(f.DEVICE_KEY=h.deviceKey);const m=Ln({username:r,userPoolId:a,userPoolClientId:c}),g={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:t,ClientId:c,UserContextData:m},C=await $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},g);return C.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:r,config:o,clientMetadata:t,session:C.Session,tokenOrchestrator:s}):C}async function UJ({challengeResponse:e,username:t,clientMetadata:n,session:r,deviceName:o,config:s}){const{userPoolId:a,userPoolClientId:c,userPoolEndpoint:u}=s;if(e==="EMAIL")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if(e==="TOTP")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};const f={USERNAME:t};if(/^\d+$/.test(e)){const g=rX({endpointResolver:ft({endpointOverride:u})}),{Session:v}=await g({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},{UserCode:e,Session:r,FriendlyDeviceName:o});Yo.dispatch({type:"SET_SIGN_IN_SESSION",value:v});const C={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:v,ClientMetadata:n,ClientId:c};return $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},C)}if(e.includes("@")){f.EMAIL=e;const g={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:r,ClientMetadata:n,ClientId:c};return $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},g)}throw new Ue({name:Zo.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${e}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP code as the challengeResponse.'})}async function FJ({challengeResponse:e,username:t,clientMetadata:n,session:r,config:o}){const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c}=o;an(e==="TOTP"||e==="SMS"||e==="EMAIL",qe.IncorrectMFAMethod);const u={USERNAME:t,ANSWER:KJ(e)},f=Ln({username:t,userPoolId:s,userPoolClientId:a}),h={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:u,Session:r,ClientMetadata:n,ClientId:a,UserContextData:f};return $r({endpointResolver:ft({endpointOverride:c})})({region:dt(s),userAgentValue:It(Ve.ConfirmSignIn)},h)}async function $J({challengeResponse:e,clientMetadata:t,session:n,username:r,requiredAttributes:o,config:s}){const{userPoolId:a,userPoolClientId:c,userPoolEndpoint:u}=s,f={...WJ(o),NEW_PASSWORD:e,USERNAME:r},h=Ln({username:r,userPoolId:a,userPoolClientId:c}),m={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:t,Session:n,ClientId:c,UserContextData:h};return $r({endpointResolver:ft({endpointOverride:u})})({region:dt(a),userAgentValue:It(Ve.ConfirmSignIn)},m)}async function zJ(e,t,n,r,o){const{userPoolClientId:s,userPoolId:a,userPoolEndpoint:c}=r,u={USERNAME:e,PASSWORD:t},f=await o.getDeviceMetadata(e);f&&f.deviceKey&&(u.DEVICE_KEY=f.deviceKey);const h=Ln({username:e,userPoolId:a,userPoolClientId:s}),m={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:u,ClientMetadata:n,ClientId:s,UserContextData:h},v=await wh({endpointResolver:ft({endpointOverride:c})})({region:dt(a),userAgentValue:It(Ve.SignIn)},m),C=v.ChallengeParameters?.USERNAME??v.ChallengeParameters?.USER_ID_FOR_SRP??e;return yl(C),v.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:C,config:r,clientMetadata:n,session:v.Session,tokenOrchestrator:o}):v}async function jJ(e,t,n,r,o){return n$({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:"USER_SRP_AUTH"})}async function BJ(e,t,n,r){const{userPoolClientId:o,userPoolId:s,userPoolEndpoint:a}=n,c={USERNAME:e},u=await r.getDeviceMetadata(e);u&&u.deviceKey&&(c.DEVICE_KEY=u.deviceKey);const f=Ln({username:e,userPoolId:s,userPoolClientId:o}),h={AuthFlow:"CUSTOM_AUTH",AuthParameters:c,ClientMetadata:t,ClientId:o,UserContextData:f},g=await wh({endpointResolver:ft({endpointOverride:a})})({region:dt(s),userAgentValue:It(Ve.SignIn)},h),v=g.ChallengeParameters?.USERNAME??e;return yl(v),g.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:v,config:n,clientMetadata:t,session:g.Session,tokenOrchestrator:r}):g}async function HJ(e,t,n,r,o){et(r);const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c}=r,u=s?.split("_")[1]||"",f=await Eh(u),h={USERNAME:e,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},m=Ln({username:e,userPoolId:s,userPoolClientId:a}),g={AuthFlow:"CUSTOM_AUTH",AuthParameters:h,ClientMetadata:n,ClientId:a,UserContextData:m},v=wh({endpointResolver:ft({endpointOverride:c})}),{ChallengeParameters:C,Session:b}=await v({region:dt(s),userAgentValue:It(Ve.SignIn)},g),E=C?.USERNAME??e;return yl(E),Ou(qA,[t,C,n,b,f,r,o],E,o)}async function bl(e){const{challengeName:t,challengeParameters:n,availableChallenges:r}=e,o=Ut.getConfig().Auth?.Cognito;switch(et(o),t){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{const{signInSession:s,username:a}=Yo.getState(),c=Bk(Hk(n.MFAS_CAN_SETUP))||[],u=YJ(c),f=u.includes("TOTP"),h=u.includes("EMAIL");if(f&&h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:u}};if(h)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const m=oX({endpointResolver:ft({endpointOverride:o.userPoolEndpoint})}),{Session:g,SecretCode:v}=await m({region:dt(o.userPoolId)},{Session:s});return Yo.dispatch({type:"SET_SIGN_IN_SESSION",value:g}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:qJ(v,a)}}}throw new Ue({name:Zo.SignInException,message:`Cannot initiate MFA setup from available types: ${c}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:VJ(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:Bk(Hk(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{const s=await AJ(n);return DJ(s)?s:bl(s)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:r}}}throw new Ue({name:Zo.SignInException,message:`An error occurred during the sign in process. ${t} challengeName returned by the underlying service was not addressed.`})}function qJ(e,t){return{sharedSecret:e,getSetupUri:(n,r)=>{const o=`otpauth://totp/${n}:${r??t}?secret=${e}&issuer=${n}`;return new oa(o)}}}function Mu(e){if(e===rv.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(e===rv.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function VJ(e){return e?JSON.parse(e).map(n=>n.includes(I_)?n.replace(I_,""):n):[]}function WJ(e){if(!e)return{};const t={};return Object.entries(e).forEach(([n,r])=>{r&&(t[`${I_}${n}`]=r)}),t}async function GJ(e,t,n,r,o,s,a,c){const u=c?.userAttributes,f=c?.friendlyDeviceName;switch(t){case"WEB_AUTHN":case"SELECT_CHALLENGE":return r==="PASSWORD_SRP"||r==="PASSWORD"?{ChallengeName:r,Session:n,$metadata:{}}:PJ({username:e,session:n,selectedChallenge:r,config:o,clientMetadata:a});case"SELECT_MFA_TYPE":return FJ({challengeResponse:r,clientMetadata:a,session:n,username:e,config:o});case"MFA_SETUP":return UJ({challengeResponse:r,clientMetadata:a,session:n,username:e,deviceName:f,config:o});case"NEW_PASSWORD_REQUIRED":return $J({challengeResponse:r,clientMetadata:a,session:n,username:e,requiredAttributes:u,config:o});case"CUSTOM_CHALLENGE":return Ou(LJ,[{challengeResponse:r,clientMetadata:a,session:n,username:e,config:o,tokenOrchestrator:s}],e,s);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return QJ({challengeName:t,challengeResponse:r,clientMetadata:a,session:n,username:e,config:o,tokenOrchestrator:s});case"PASSWORD":return NJ(e,r,a,o,n);case"PASSWORD_SRP":return kJ(e,r,a,o,n,s)}throw new Ue({name:Zo.SignInException,message:`An error occurred during the sign in process.
|
|
5
|
+
${t} challengeName returned by the underlying service was not addressed.`})}function KJ(e){let t="SMS_MFA";return e==="TOTP"&&(t="SOFTWARE_TOKEN_MFA"),e==="EMAIL"&&(t="EMAIL_OTP"),t}function ZJ(e){if(e==="SMS_MFA")return"SMS";if(e==="SOFTWARE_TOKEN_MFA")return"TOTP";if(e==="EMAIL_OTP")return"EMAIL"}function Bk(e){if(e)return e.map(ZJ).filter(Boolean)}function Hk(e){return e?JSON.parse(e):[]}function YJ(e){return e.filter(t=>t==="EMAIL"||t==="TOTP")}async function r$(){let e;try{e=await yy()}catch{}if(e&&e.userId&&e.username)throw new Ue({name:DQ,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function _h(e){return Yo.getState().username??e}async function QJ({challengeName:e,challengeResponse:t,clientMetadata:n,session:r,username:o,config:s,tokenOrchestrator:a}){const{userPoolId:c,userPoolClientId:u,userPoolEndpoint:f}=s,h={USERNAME:o};e==="EMAIL_OTP"&&(h.EMAIL_OTP_CODE=t),e==="SMS_MFA"&&(h.SMS_MFA_CODE=t),e==="SMS_OTP"&&(h.SMS_OTP_CODE=t),e==="SOFTWARE_TOKEN_MFA"&&(h.SOFTWARE_TOKEN_MFA_CODE=t);const m=await a?.getDeviceMetadata(o);m&&m.deviceKey&&(h.DEVICE_KEY=m.deviceKey);const g=Ln({username:o,userPoolId:c,userPoolClientId:u}),v={ChallengeName:e,ChallengeResponses:h,Session:r,ClientMetadata:n,ClientId:u,UserContextData:g},b=await $r({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:It(Ve.ConfirmSignIn)},v);return b.ChallengeName==="DEVICE_SRP_AUTH"?xh({username:o,config:s,clientMetadata:n,session:b.Session,tokenOrchestrator:a}):b}async function XJ(e){const t=Ut.getConfig().Auth?.Cognito;et(t);const{username:n,password:r,options:o}=e,s={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},a=o?.clientMetadata;an(!!n,qe.EmptySignInUsername),an(!r,qe.CustomAuthSignInPassword);try{const{ChallengeName:c,ChallengeParameters:u,AuthenticationResult:f,Session:h}=await Ou(BJ,[n,a,t,Cr],n,Cr),m=_h(n);return gl({signInSession:h,username:m,challengeName:c,signInDetails:s}),f?(await Zs({username:m,...f,NewDeviceMetadata:await vl({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),Ro(),await sa(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:c,challengeParameters:u})}catch(c){Ro(),co(c);const u=Mu(c.name);if(u)return u;throw c}}async function JJ(e){const{username:t,password:n,options:r}=e,o={loginId:t,authFlowType:"CUSTOM_WITH_SRP"},s=Ut.getConfig().Auth?.Cognito;et(s);const a=r?.clientMetadata;an(!!t,qe.EmptySignInUsername),an(!!n,qe.EmptySignInPassword);try{const{ChallengeName:c,ChallengeParameters:u,AuthenticationResult:f,Session:h}=await HJ(t,n,a,s,Cr),m=_h(t);return gl({signInSession:h,username:m,challengeName:c,signInDetails:o}),f?(await Zs({username:m,...f,NewDeviceMetadata:await vl({userPoolId:s.userPoolId,userPoolEndpoint:s.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),Ro(),await sa(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:c,challengeParameters:u})}catch(c){Ro(),co(c);const u=Mu(c.name);if(u)return u;throw c}}const o$=async()=>{throw new Ue({name:BF,message:"The autoSignIn flow has not started, or has been cancelled/completed.",recoverySuggestion:"Please try to use the signIn API or log out before starting a new autoSignIn flow."})};let VA=o$;function A_(e){VA=e}function yr(e=!0){e&&(VA=o$),zi.dispatch({type:"RESET"})}async function qk(e){const{username:t,password:n}=e,r=Ut.getConfig().Auth?.Cognito,o={loginId:t,authFlowType:"USER_SRP_AUTH"};et(r);const s=e.options?.clientMetadata;an(!!t,qe.EmptySignInUsername),an(!!n,qe.EmptySignInPassword);try{const{ChallengeName:a,ChallengeParameters:c,AuthenticationResult:u,Session:f}=await jJ(t,n,s,r,Cr),h=_h(t);return gl({signInSession:f,username:h,challengeName:a,signInDetails:o}),u?(await Zs({username:h,...u,NewDeviceMetadata:await vl({userPoolId:r.userPoolId,userPoolEndpoint:r.userPoolEndpoint,newDeviceMetadata:u.NewDeviceMetadata,accessToken:u.AccessToken}),signInDetails:o}),Ro(),await sa(),yr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:a,challengeParameters:c})}catch(a){Ro(),yr(),co(a);const c=Mu(a.name);if(c)return c;throw a}}async function eee(e){const{username:t,password:n,options:r}=e,o=Ut.getConfig().Auth?.Cognito,s={loginId:t,authFlowType:"USER_PASSWORD_AUTH"};et(o);const a=r?.clientMetadata;an(!!t,qe.EmptySignInUsername),an(!!n,qe.EmptySignInPassword);try{const{ChallengeName:c,ChallengeParameters:u,AuthenticationResult:f,Session:h}=await Ou(zJ,[t,n,a,o,Cr],t,Cr),m=_h(t);return gl({signInSession:h,username:m,challengeName:c,signInDetails:s}),f?(await Zs({...f,username:m,NewDeviceMetadata:await vl({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:s}),Ro(),await sa(),yr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:c,challengeParameters:u})}catch(c){Ro(),yr(),co(c);const u=Mu(c.name);if(u)return u;throw c}}async function tee({username:e,clientMetadata:t,config:n,tokenOrchestrator:r,preferredChallenge:o,password:s,session:a}){const{userPoolId:c,userPoolClientId:u,userPoolEndpoint:f}=n,h=Ln({username:e,userPoolId:c,userPoolClientId:u}),m={USERNAME:e};if(o){if(n.passwordless&&(o==="EMAIL_OTP"&&!n.passwordless.emailOtpEnabled||o==="SMS_OTP"&&!n.passwordless.smsOtpEnabled||o==="WEB_AUTHN"&&!n.passwordless.webAuthn)&&an(!1,qe.InvalidPreferredChallenge),o==="PASSWORD_SRP")return an(!!s,qe.EmptySignInPassword),n$({username:e,password:s,clientMetadata:t,config:n,tokenOrchestrator:r,authFlow:"USER_AUTH",preferredChallenge:o});o==="PASSWORD"&&(an(!!s,qe.EmptySignInPassword),m.PASSWORD=s),m.PREFERRED_CHALLENGE=o}const g={AuthFlow:"USER_AUTH",AuthParameters:m,ClientMetadata:t,ClientId:u,UserContextData:h};a&&(g.Session=a);const C=await wh({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:It(Ve.SignIn)},g);return yl(e),C}async function s$(e){const{username:t,password:n,options:r}=e,o=Ut.getConfig().Auth?.Cognito,s={loginId:t,authFlowType:"USER_AUTH"};et(o);const a=r?.clientMetadata,c=r?.preferredChallenge??o?.passwordless?.preferredChallenge;an(!!t,qe.EmptySignInUsername);try{const u={username:t,config:o,tokenOrchestrator:Cr,clientMetadata:a,preferredChallenge:c,password:n},f=zi.getState();f.active&&f.username===t&&(u.session=f.session);const h=await tee(u),m=_h(t);return gl({signInSession:h.Session,username:m,challengeName:h.ChallengeName,signInDetails:s}),h.AuthenticationResult?(await Zs({username:m,...h.AuthenticationResult,NewDeviceMetadata:await vl({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:h.AuthenticationResult.NewDeviceMetadata,accessToken:h.AuthenticationResult.AccessToken}),signInDetails:s}),Ro(),await sa(),yr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:h.ChallengeName,challengeParameters:h.ChallengeParameters,availableChallenges:"AvailableChallenges"in h?h.AvailableChallenges:void 0})}catch(u){Ro(),yr(),co(u);const f=Mu(u.name);if(f)return f;throw u}}async function WA(e){yr(!1);const t=e.options?.authFlowType;switch(await r$(),t){case"USER_SRP_AUTH":return qk(e);case"USER_PASSWORD_AUTH":return eee(e);case"CUSTOM_WITHOUT_SRP":return XJ(e);case"CUSTOM_WITH_SRP":return JJ(e);case"USER_AUTH":return s$(e);default:return qk(e)}}const i$=180*1e3;function nee(e){const t=nv.listen("auth-internal",async({payload:r})=>{r.event==="confirmSignUp"&&r.data?.isSignUpComplete&&(nv.dispatch("auth-internal",{event:"autoSignIn"}),A_(l$(e)),t())}),n=setTimeout(()=>{t(),clearTimeout(n),yr()},i$)}function a$(e,t){let n;return r=>{n||e(...r),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}}function ree(e,t,n){const r=Date.now(),o=setInterval(async()=>{if(Date.now()-r>i$)clearInterval(o),n(new Ue({name:BF,message:"The account was not confirmed on time.",recoverySuggestion:"Try to verify your account by clicking the link sent your email or phone and then login manually."})),yr();else try{const c=await WA(e);c.nextStep.signInStep!=="CONFIRM_SIGN_UP"&&(t(c),clearInterval(o),yr())}catch(c){clearInterval(o),n(c),yr()}},5e3)}const oee=a$(ree,300),see=a$(aee,300);function iee(e){return async()=>new Promise((t,n)=>{oee([e,t,n])})}async function aee(e,t,n){try{const r=e?.options?.authFlowType==="USER_AUTH"?await s$(e):await WA(e);t(r),yr()}catch(r){n(r),yr()}}function l$(e){return async()=>new Promise((t,n)=>{see([e,t,n])})}const lee=l$,cee=()=>async e=>{if(e.statusCode>=300){const t=await _u(e);if(co(t),t.name===w_.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){const n=qe.EmptySignUpPassword,{message:r,recoverySuggestion:o}=jF[n];throw new Ue({name:n,message:r,recoverySuggestion:o})}throw new Ue({name:t.name,message:t.message})}return Sh(e)},uee=e=>Cn(kn,Nn("SignUp"),cee(),{...Dn,...e});async function dee(e){const{username:t,password:n,options:r}=e,o=Ut.getConfig().Auth?.Cognito,s=o?.signUpVerificationMethod??"code",{clientMetadata:a,validationData:c,autoSignIn:u}=e.options??{};et(o),an(!!t,qe.EmptySignUpUsername);const f=typeof u!="boolean"?u:void 0,h={username:t,options:f};f?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(h.password=n);const{userPoolId:m,userPoolClientId:g,userPoolEndpoint:v}=o,C=uee({endpointResolver:ft({endpointOverride:v})}),b={Username:t,Password:void 0,UserAttributes:r?.userAttributes&&fk(r?.userAttributes),ClientMetadata:a,ValidationData:c&&fk(c),ClientId:g,UserContextData:Ln({username:t,userPoolId:m,userPoolClientId:g})};n&&(b.Password=n);const{UserSub:E,CodeDeliveryDetails:x,UserConfirmed:I,Session:R}=await C({region:dt(m),userAgentValue:It(Ve.SignUp)},b);(f||u===!0)&&(zi.dispatch({type:"START"}),zi.dispatch({type:"SET_USERNAME",value:t}),zi.dispatch({type:"SET_SESSION",value:R}));const M={destination:x?.Destination,deliveryMedium:x?.DeliveryMedium,attributeName:x?.AttributeName},D=!!I,N=zi.getState().active;if(D)return N?(A_(lee(h)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:E}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:E};if(N){if(s==="link")return A_(iee(h)),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:M},userId:E};nee(h)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:M},userId:E}}const fee=e=>Cn(kn,Nn("ForgotPassword"),Wn(),{...Dn,...e});async function c$(e){const{username:t}=e;an(!!t,qe.EmptyResetPasswordUsername);const n=Ut.getConfig().Auth?.Cognito;et(n);const{userPoolClientId:r,userPoolId:o,userPoolEndpoint:s}=n,a=e.options?.clientMetadata,c=Ln({username:t,userPoolId:o,userPoolClientId:r}),h=(await fee({endpointResolver:ft({endpointOverride:s})})({region:dt(o),userAgentValue:It(Ve.ResetPassword)},{Username:t,ClientMetadata:a,ClientId:r,UserContextData:c})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:h?.DeliveryMedium,destination:h?.Destination,attributeName:h?.AttributeName}}}}const hee=e=>Cn(kn,Nn("ConfirmForgotPassword"),Wn(),{...Dn,...e});async function pee(e){const t=Ut.getConfig().Auth?.Cognito;et(t);const{userPoolClientId:n,userPoolId:r,userPoolEndpoint:o}=t,{username:s,newPassword:a}=e;an(!!s,qe.EmptyConfirmResetPasswordUsername),an(!!a,qe.EmptyConfirmResetPasswordNewPassword);const c=e.confirmationCode;an(!!c,qe.EmptyConfirmResetPasswordConfirmationCode);const u=e.options?.clientMetadata,f=Ln({username:s,userPoolId:r,userPoolClientId:n});await hee({endpointResolver:ft({endpointOverride:o})})({region:dt(t.userPoolId),userAgentValue:It(Ve.ConfirmResetPassword)},{Username:s,ConfirmationCode:c,Password:a,ClientMetadata:u,ClientId:t.userPoolClientId,UserContextData:f})}const mee=e=>Cn(kn,Nn("ResendConfirmationCode"),Wn(),{...Dn,...e});async function gee(e){const{username:t}=e;an(!!t,qe.EmptySignUpUsername);const n=Ut.getConfig().Auth?.Cognito;et(n);const{userPoolClientId:r,userPoolId:o,userPoolEndpoint:s}=n,a=e.options?.clientMetadata,c=Ln({username:t,userPoolId:o,userPoolClientId:r}),u=mee({endpointResolver:ft({endpointOverride:s})}),{CodeDeliveryDetails:f}=await u({region:dt(n.userPoolId),userAgentValue:It(Ve.ResendSignUpCode)},{Username:t,ClientMetadata:a,ClientId:n.userPoolClientId,UserContextData:c}),{DeliveryMedium:h,AttributeName:m,Destination:g}={...f};return{destination:g,deliveryMedium:h,attributeName:m||void 0}}const vee=e=>Cn(kn,Nn("ConfirmSignUp"),Wn(),{...Dn,...e});async function yee(e){const{username:t,confirmationCode:n,options:r}=e,o=Ut.getConfig().Auth?.Cognito;et(o);const{userPoolId:s,userPoolClientId:a,userPoolEndpoint:c}=o,u=r?.clientMetadata;an(!!t,qe.EmptyConfirmSignUpUsername),an(!!n,qe.EmptyConfirmSignUpCode);const f=Ln({username:t,userPoolId:s,userPoolClientId:a}),h=vee({endpointResolver:ft({endpointOverride:c})}),{Session:m}=await h({region:dt(o.userPoolId),userAgentValue:It(Ve.ConfirmSignUp)},{Username:t,ConfirmationCode:n,ClientMetadata:u,ForceAliasCreation:r?.forceAliasCreation,ClientId:o.userPoolClientId,UserContextData:f});return new Promise((g,v)=>{try{const C={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},b=zi.getState();if(!b.active||b.username!==t){g(C),yr();return}zi.dispatch({type:"SET_SESSION",value:m});const E=nv.listen("auth-internal",({payload:x})=>{x.event==="autoSignIn"&&(g({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),E())});nv.dispatch("auth-internal",{event:"confirmSignUp",data:C})}catch(C){v(C)}})}async function u$(e){const{challengeResponse:t,options:n}=e,{username:r,challengeName:o,signInSession:s,signInDetails:a}=Yo.getState(),c=Ut.getConfig().Auth?.Cognito;et(c);const u=n?.clientMetadata;if(an(!!t,qe.EmptyChallengeResponse),!r||!o||!s)throw new Ue({name:Zo.SignInException,message:`
|
|
6
|
+
An error occurred during the sign in process.
|
|
7
|
+
|
|
8
|
+
This most likely occurred due to:
|
|
9
|
+
1. signIn was not called before confirmSignIn.
|
|
10
|
+
2. signIn threw an exception.
|
|
11
|
+
3. page was refreshed during the sign in flow and session has expired.
|
|
12
|
+
`,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{const{Session:f,ChallengeName:h,AuthenticationResult:m,ChallengeParameters:g}=await GJ(r,o,s,t,c,Cr,u,n);return gl({signInSession:f,username:r,challengeName:h,signInDetails:a}),m?(await Zs({username:r,...m,NewDeviceMetadata:await vl({userPoolId:c.userPoolId,userPoolEndpoint:c.userPoolEndpoint,newDeviceMetadata:m.NewDeviceMetadata,accessToken:m.AccessToken}),signInDetails:a}),Ro(),await sa(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):bl({challengeName:h,challengeParameters:g})}catch(f){co(f);const h=Mu(f.name);if(h)return h;throw f}}const bee=e=>Cn(kn,Nn("GetUser"),Wn(),{...Dn,...e}),See=e=>Cn(kn,Nn("VerifyUserAttribute"),Wn(),{...Dn,...e});async function Cee(e){const t=Ut.getConfig().Auth?.Cognito;et(t);const{userPoolEndpoint:n,userPoolId:r}=t,{confirmationCode:o,userAttributeKey:s}=e;an(!!o,qe.EmptyConfirmUserAttributeCode);const{tokens:a}=await my({forceRefresh:!1});Iu(a),await See({endpointResolver:ft({endpointOverride:n})})({region:dt(r),userAgentValue:It(Ve.ConfirmUserAttribute)},{AccessToken:a.accessToken.toString(),AttributeName:s,Code:o})}new Vn("AuthError");const wee={oauthSignInError:{message:Pn.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:Pn.DEFAULT_MSG},missingAuthConfig:{message:Pn.DEFAULT_MSG},emptyUsername:{message:Pn.EMPTY_USERNAME},invalidUsername:{message:Pn.INVALID_USERNAME},emptyPassword:{message:Pn.EMPTY_PASSWORD},emptyCode:{message:Pn.EMPTY_CODE},signUpError:{message:Pn.SIGN_UP_ERROR},noMFA:{message:Pn.NO_MFA},invalidMFA:{message:Pn.INVALID_MFA},emptyChallengeResponse:{message:Pn.EMPTY_CHALLENGE},noUserSession:{message:Pn.NO_USER_SESSION},deviceConfig:{message:Pn.DEVICE_CONFIG},networkError:{message:Pn.NETWORK_ERROR},autoSignInError:{message:Pn.AUTOSIGNIN_ERROR},default:{message:Pn.DEFAULT_MSG}},Ki=(e,t)=>new Ue({message:e??"An error has occurred during the oauth process.",name:Zo.OAuthSignInError,recoverySuggestion:wee.oauthSignInError.log});var R_;(function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError",e.OAuthSignInError="oauthSignInError"})(R_||(R_={}));const Eee="`signInWithRedirect` has been canceled.",xee="An error occurred while validating the state.",_ee="Try to initiate an OAuth flow from Amplify",d$=async e=>{const t=await gr.loadOAuthState(),n=e===t?t:void 0;if(!n)throw new Ue({name:R_.OAuthSignInError,message:e===null?Eee:xee,recoverySuggestion:e===null?void 0:_ee});return n},f$=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,responseType:o,domain:s,preferPrivateSession:a})=>{const c=new oa(e),u=c.searchParams.get("error"),f=c.searchParams.get("error_description");if(u)throw Ki(f??u);return o==="code"?Iee({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,domain:s,preferPrivateSession:a}):Aee({currentUrl:e,redirectUri:r,preferPrivateSession:a})},Iee=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,domain:o,preferPrivateSession:s})=>{const a=new oa(e),c=a.searchParams.get("code"),u=a.searchParams.get("state");if(!c||!u)throw Ki("User cancelled OAuth flow.");const f=await d$(u),h="https://"+o+"/oauth2/token",m=await gr.loadPKCE(),g={grant_type:"authorization_code",code:c,client_id:n,redirect_uri:r,...m?{code_verifier:m}:{}},v=Object.entries(g).map(([N,T])=>`${encodeURIComponent(N)}=${encodeURIComponent(T)}`).join("&"),{access_token:C,refresh_token:b,id_token:E,error:x,error_message:I,token_type:R,expires_in:M}=await(await fetch(h,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[OZ]:t},body:v})).json();if(x)throw Ki(I??x);const D=(C&&$s(C).payload.username)??"username";return await Zs({username:D,AccessToken:C,IdToken:E,RefreshToken:b}),h$({redirectUri:r,state:f,preferPrivateSession:s})},Aee=async({currentUrl:e,redirectUri:t,preferPrivateSession:n})=>{const r=new oa(e),{id_token:o,access_token:s,state:a,token_type:c,expires_in:u,error_description:f,error:h}=(r.hash??"#").substring(1).split("&").map(v=>v.split("=")).reduce((v,[C,b])=>({...v,[C]:b}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(h)throw Ki(f??h);if(!s)throw Ki("No access token returned from OAuth flow.");const m=await d$(a),g=(s&&$s(s).payload.username)??"username";return await Zs({username:g,AccessToken:s,IdToken:o}),h$({redirectUri:t,state:m,preferPrivateSession:n})},h$=async({redirectUri:e,state:t,preferPrivateSession:n})=>{await Cr.setOAuthMetadata({oauthSignIn:!0}),await gr.clearOAuthData(),await gr.storeOAuthSignIn(!0,n),KF(),Oee(e),Ree(t)&&Ko.dispatch("auth",{event:"customOAuthState",data:AQ(Tee(t))},"Auth",Go),Ko.dispatch("auth",{event:"signInWithRedirect"},"Auth",Go),await sa()},Ree=e=>/-/.test(e),Tee=e=>e.split("-").splice(1).join("-"),Oee=e=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",e)};function GA(e,t){{const n=e?.find(Mee)??e?.find(Pee),r=e?.find(kee)??e?.find(Nee);if(n)return n;throw r?BQ:zQ}}const Mee=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),Pee=e=>e.includes(String(window.location.hostname)),Nee=e=>e.startsWith("http://"),kee=e=>e.startsWith("https://"),KA=async e=>{KF(),await gr.clearOAuthInflightData(),Ko.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:e}},"Auth",Go)},Dee=async e=>{try{et(e),dy(e),gr.setAuthConfig(e)}catch{return}if(await gr.loadOAuthInFlight())try{const t=window.location.href,{loginWith:n,userPoolClientId:r}=e,{domain:o,redirectSignIn:s,responseType:a}=n.oauth,c=GA(s);await f$({currentUrl:t,clientId:r,domain:o,redirectUri:c,responseType:a,userAgentValue:It(Ve.SignInWithRedirect)})}catch(t){await KA(t)}};py()&&Ut[yF](Dee);const Lee={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},p$=async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))},Vk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Uee=e=>{const t=new Uint8Array(e);MA().getRandomValues(t);let n="",r;for(const o of t)n+=Vk.charAt(o%Vk.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=Fee(n),r)}}};function Fee(e){const t=new nl;return t.update(e),$ee(nu.convert(t.digestSync(),{urlSafe:!0}))}function $ee(e){return e.replace(/=/g,"")}const zee=()=>IQ(32),jee=e=>{async function t(n){if(n.persisted&&await e.loadOAuthInFlight()){const o=Ki("User cancelled OAuth flow.");await KA(o)}window.removeEventListener("pageshow",t)}window.addEventListener("pageshow",t)};async function m$(e){const t=Ut.getConfig().Auth?.Cognito;et(t),dy(t),gr.setAuthConfig(t),e?.options?.prompt||await r$();let n="COGNITO",r;return typeof e?.provider=="string"?n=Lee[e.provider]:e?.provider?.custom?n=e.provider.custom:e?.provider?.idpIdentifier&&({idpIdentifier:r}=e.provider),Bee({oauthConfig:t.loginWith.oauth,clientId:t.userPoolClientId,provider:n,idpIdentifier:r,customState:e?.customState,preferPrivateSession:e?.options?.preferPrivateSession,options:{loginHint:e?.options?.loginHint,lang:e?.options?.lang,nonce:e?.options?.nonce,prompt:e?.options?.prompt},authSessionOpener:e?.options?.authSessionOpener})}const Bee=async({oauthConfig:e,provider:t,idpIdentifier:n,clientId:r,customState:o,preferPrivateSession:s,options:a,authSessionOpener:c})=>{const{domain:u,redirectSignIn:f,responseType:h,scopes:m}=e,{loginHint:g,lang:v,nonce:C,prompt:b}=a??{},E=zee(),x=c||p$,I=o?`${E}-${RQ(o)}`:E,{value:R,method:M,toCodeChallenge:D}=Uee(128),N=GA(e.redirectSignIn);py()&&gr.storeOAuthInFlight(!0),gr.storeOAuthState(I),gr.storePKCE(R);const T=new URLSearchParams;T.append("redirect_uri",N),T.append("response_type",h),T.append("client_id",r),n?T.append("idp_identifier",n):T.append("identity_provider",t),T.append("scope",m.join(" ")),g&&T.append("login_hint",g),v&&T.append("lang",v),C&&T.append("nonce",C),b&&T.append("prompt",b.toLowerCase()),T.append("state",I),h==="code"&&(T.append("code_challenge",D()),T.append("code_challenge_method",M));const L=`https://${u}/oauth2/authorize?${T.toString()}`;jee(gr);const{type:$,error:G,url:z}=await x(L,f,s)??{};try{if($==="error")throw Ki(String(G));if($==="canceled")throw Ki(String($));$==="success"&&z&&await f$({currentUrl:z,clientId:r,domain:u,redirectUri:N,responseType:h,userAgentValue:It(Ve.SignInWithRedirect),preferPrivateSession:s})}catch(F){throw await KA(F),F}},Hee=async e=>{const t=e.getConfig().Auth?.Cognito;et(t);const{userPoolEndpoint:n,userPoolId:r}=t,{tokens:o}=await xF(e,{forceRefresh:!1});Iu(o);const s=bee({endpointResolver:ft({endpointOverride:n})}),{UserAttributes:a}=await s({region:dt(r),userAgentValue:It(Ve.FetchUserAttributes)},{AccessToken:o.accessToken.toString()});return kQ(a)},g$=()=>Hee(Ut),qee=async e=>{await e.clearOAuthData(),Cr.clearTokens(),await _F(),Ko.dispatch("auth",{event:"signedOut"},"Auth",Go)},Vee=async(e,t=!1,n)=>{dy(e);const{loginWith:r,userPoolClientId:o}=e,{domain:s,redirectSignOut:a}=r.oauth,c=GA(a),u=`https://${s}/logout?${Object.entries({client_id:o,logout_uri:encodeURIComponent(c)}).map(([f,h])=>`${f}=${h}`).join("&")}`;return p$(u)},Wee=async(e,t,n,r)=>{const{isOAuthSignIn:o}=await t.loadOAuthSignIn(),s=await n.getOAuthMetadata();if(await qee(t),o||s?.oauthSignIn)return Vee(e,!1)},Gee=e=>Cn(kn,Nn("RevokeToken"),Wn(),{...Dn,...e}),Kee=new Vn("Auth");async function Zee(e){const t=Ut.getConfig().Auth?.Cognito;et(t),await Yee(t);let n;try{dy(t),n=!0}catch{n=!1}if(n){const r=new GF(Ch);r.setAuthConfig(t);const{type:o}=await Wee(t,r,Cr)??{};if(o==="error")throw new Ue({name:HQ,message:"An error occurred when attempting to log out from OAuth provider."})}else Cr.clearTokens(),await _F(),Ko.dispatch("auth",{event:"signedOut"},"Auth",Go)}async function Yee(e){try{const{userPoolEndpoint:t,userPoolId:n,userPoolClientId:r}=e,o=await Cr.getTokenStore().loadTokens();HF(o),Qee(o.accessToken)&&await Gee({endpointResolver:ft({endpointOverride:t})})({region:dt(n),userAgentValue:It(Ve.SignOut)},{ClientId:r,Token:o.refreshToken})}catch{Kee.debug("Client signOut error caught but will proceed with token removal")}}const Qee=e=>!!e?.payload?.origin_jti,Xee=e=>Cn(kn,Nn("GetUserAttributeVerificationCode"),Wn(),{...Dn,...e}),Jee=async e=>{const{userAttributeKey:t,options:n}=e,r=Ut.getConfig().Auth?.Cognito,o=n?.clientMetadata;et(r);const{userPoolEndpoint:s,userPoolId:a}=r,{tokens:c}=await my({forceRefresh:!1});Iu(c);const u=Xee({endpointResolver:ft({endpointOverride:s})}),{CodeDeliveryDetails:f}=await u({region:dt(a),userAgentValue:It(Ve.SendUserAttributeVerificationCode)},{AccessToken:c.accessToken.toString(),ClientMetadata:o,AttributeName:t}),{DeliveryMedium:h,AttributeName:m,Destination:g}={...f};return{destination:g,deliveryMedium:h,attributeName:m}},ete={identityId:"identityId"},tte=new Vn("DefaultIdentityIdStore");class v${setAuthConfig(t){Ag(t.Cognito),this.authConfig=t,this._authKeys=nte("Cognito",t.Cognito.identityPoolId)}constructor(t){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=t}async loadIdentityId(){Ag(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{const t=await this.keyValueStorage.getItem(this._authKeys.identityId);return t?(this._hasGuestIdentityId=!0,{id:t,type:"guest"}):null}}catch(t){return tte.log("Error getting stored IdentityId.",t),null}}async storeIdentityId(t){Ag(this.authConfig?.Cognito),t.type==="guest"?(this.keyValueStorage.setItem(this._authKeys.identityId,t.id),this._primaryIdentityId=void 0,this._hasGuestIdentityId=!0):(this._primaryIdentityId=t.id,this._hasGuestIdentityId&&(this.keyValueStorage.removeItem(this._authKeys.identityId),this._hasGuestIdentityId=!1))}async clearIdentityId(){this._primaryIdentityId=void 0,await this.keyValueStorage.removeItem(this._authKeys.identityId)}}const nte=(e,t)=>UA(ete)(`com.amplify.${e}`,t),T_=({endpointOverride:e})=>t=>e?{url:new oa(e)}:mQ(t);function y$(e){const t=$s(e).payload.iss,n={};if(!t)throw new Ue({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=t.replace(/(^\w+:|^)\/\//,"");return n[r]=e,n}async function rte({tokens:e,authConfig:t,identityIdStore:n}){n.setAuthConfig({Cognito:t});const r=await n.loadIdentityId();if(r)return r.id;const o=e?.idToken?y$(e.idToken.toString()):{},s=await ote(o,t);return n.storeIdentityId({id:s,type:e?"primary":"guest"}),s}async function ote(e,t){const n=t?.identityPoolId,r=C_(n),o=fQ({endpointResolver:T_({endpointOverride:t.identityPoolEndpoint})});let s;try{s=(await o({region:r},{IdentityPoolId:n,Logins:e})).IdentityId}catch(a){throw co(a),new Ue(a)}if(!s)throw new Ue({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return s}const Cm=new Vn("CognitoCredentialsProvider"),Wk=3e3*1e3;class b${constructor(t){this._nextCredentialsRefresh=0,this._identityIdStore=t}async clearCredentialsAndIdentityId(){Cm.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Cm.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(t){const n=t.authenticated,{tokens:r}=t,{authConfig:o}=t;try{Ag(o?.Cognito)}catch{return}if(!n&&!o.Cognito.allowGuestAccess)return;const{forceRefresh:s}=t,a=this.hasTokenChanged(r),c=await rte({tokens:r,authConfig:o.Cognito,identityIdStore:this._identityIdStore});return(s||a)&&this.clearCredentials(),n?(WQ(r),this.credsForOIDCTokens(o.Cognito,r,c)):this.getGuestCredentials(c,o.Cognito)}async getGuestCredentials(t,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!1)return Cm.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=C_(n.identityPoolId),o=ck({endpointResolver:T_({endpointOverride:n.identityPoolEndpoint})});let s;try{s=await o({region:r},{IdentityId:t})}catch(a){throw co(a),new Ue(a)}if(s?.Credentials?.AccessKeyId&&s?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+Wk;const a={credentials:{accessKeyId:s.Credentials.AccessKeyId,secretAccessKey:s.Credentials.SecretKey,sessionToken:s.Credentials.SessionToken,expiration:s.Credentials.Expiration},identityId:t};return s.IdentityId&&(a.identityId=s.IdentityId,this._identityIdStore.storeIdentityId({id:s.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...a,isAuthenticatedCreds:!1},a}else throw new Ue({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(t,n,r){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!0)return Cm.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const o=n.idToken?y$(n.idToken.toString()):{},s=C_(t.identityPoolId),a=ck({endpointResolver:T_({endpointOverride:t.identityPoolEndpoint})});let c;try{c=await a({region:s},{IdentityId:r,Logins:o})}catch(u){throw co(u),new Ue(u)}if(c?.Credentials?.AccessKeyId&&c?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+Wk;const u={credentials:{accessKeyId:c.Credentials.AccessKeyId,secretAccessKey:c.Credentials.SecretKey,sessionToken:c.Credentials.SessionToken,expiration:c.Credentials.Expiration},identityId:r};return c.IdentityId&&(u.identityId=c.IdentityId,this._identityIdStore.storeIdentityId({id:c.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...u,isAuthenticatedCreds:!0,associatedIdToken:n.idToken?.toString()},u}else throw new Ue({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return this._nextCredentialsRefresh===void 0?!0:this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(t){return!!t&&!!this._credentialsAndIdentityId?.associatedIdToken&&t.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}const ste=new b$(new v$(Ch)),S$={configure(e,t){const n=SF(e),r=new wQ({sameSite:"lax"}),o=t?.ssr?r:Ch,s=t?.ssr?new b$(new v$(r)):ste;if(!n.Auth||t?.Auth){Ut.configure(n,t);return}Tg.setAuthConfig(n.Auth),Tg.setKeyValueStorage(o),Ut.configure(n,{...t,Auth:{tokenProvider:Tg,credentialsProvider:s}})},getConfig(){return Ut.getConfig()}},ite="https://github.com/remit-mail/reader/issues/new",ate=["internal","acme","tailscale","off"],lte=["self","managed"],Gk=(e,t,n)=>e.find(r=>r===t)??n,Pu=()=>{const e=globalThis.__REMIT_CONFIG__??{};return{apiUrl:e.apiUrl??"/api",appOrigin:e.appOrigin??"",betterAuthEnabled:e.betterAuthEnabled??!1,cognito:{userPoolId:e.cognito?.userPoolId??"",clientId:e.cognito?.clientId??"",domain:e.cognito?.domain??"",region:e.cognito?.region??""},rum:{appMonitorId:e.rum?.appMonitorId??"",identityPoolId:e.rum?.identityPoolId??"",region:e.rum?.region??"eu-west-1"},mailboxPollIntervalSeconds:e.mailboxPollIntervalSeconds!=null?String(e.mailboxPollIntervalSeconds):void 0,disableDevtools:e.disableDevtools??!1,tlsMode:Gk(ate,e.tlsMode,"off"),issuesUrl:e.issuesUrl??ite,updateMode:Gk(lte,e.updateMode,"self")}},C$=()=>{const e=Pu(),{userPoolId:t,clientId:n,domain:r,region:o}=e.cognito;return!t||!n?null:{userPoolId:t,userPoolClientId:n,domain:r,region:o,appOrigin:e.appOrigin}},Sy=()=>C$()!==null,w$=()=>{const e=C$();if(!e){console.warn("[auth] Cognito user pool is not configured. Running in local dev mode without Cognito auth.");return}const{userPoolId:t,userPoolClientId:n,domain:r,appOrigin:o}=e;S$.configure({Auth:{Cognito:{userPoolId:t,userPoolClientId:n,loginWith:r?{oauth:{domain:r,scopes:["openid","email","profile"],redirectSignIn:o?[o]:[],redirectSignOut:o?[o]:[],responseType:"code"}}:void 0}}})};var cte={};const Pg=Object.create(null),jd=e=>cte||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Pg:globalThis),Mi=new Proxy(Pg,{get(e,t){return jd()[t]??Pg[t]},has(e,t){return t in jd()||t in Pg},set(e,t,n){const r=jd(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=jd(!0);return delete n[t],!0},ownKeys(){const e=jd(!0);return Object.keys(e)}});Mi.NODE_ENV;var Ng=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};const ute=47;function E$(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===ute;)t--;return t===e.length?e:e.slice(0,t)}function dte(e){try{return(E$(new URL(e).pathname)||"/")!=="/"}catch{throw new Ng(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function fte(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Ng(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Ng?t:new Ng(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Kk(e,t="/api/auth"){if(fte(e),dte(e))return e;const n=E$(e);return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function hte(e,t,n,r,o){{const s=Mi.BETTER_AUTH_URL||Mi.NEXT_PUBLIC_BETTER_AUTH_URL||Mi.PUBLIC_BETTER_AUTH_URL||Mi.NUXT_PUBLIC_BETTER_AUTH_URL||Mi.NUXT_PUBLIC_AUTH_URL||(Mi.BASE_URL!=="/"?Mi.BASE_URL:void 0);if(s)return Kk(s,t)}if(typeof window<"u"&&window.location)return Kk(window.location.origin,t)}const pte={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},mte=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Zk={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},gte=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function vte(e){return e instanceof Date&&!isNaN(e.getTime())}function yte(e){const t=gte.exec(e);if(!t)return null;const[,n,r,o,s,a,c,u,f,h,m]=t,g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(o,10),parseInt(s,10),parseInt(a,10),parseInt(c,10),u?parseInt(u.padEnd(3,"0"),10):0));if(f){const v=(parseInt(h,10)*60+parseInt(m,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+v)}return vte(g)?g:null}function bte(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:o,parseDates:s=!0}=t;if(typeof e!="string")return e;const a=e.trim(),c=a.toLowerCase();if(c.length<=9&&c in Zk)return Zk[c];if(!mte.test(a)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(pte).some(([u,f])=>{const h=f.test(a);return h&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${u} pattern`),h})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(f,h)=>{if(f==="__proto__"||f==="constructor"&&h&&typeof h=="object"&&"prototype"in h){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(s&&typeof h=="string"){const m=yte(h);if(m)return m}return o?o(f,h):h})}catch(u){if(n)throw u;return e}}function Ste(e,t={strict:!0}){return bte(e,t)}const Cte=["javascript:","data:","vbscript:"];function wte(e){let t;try{t=new URL(e)}catch{return!0}return!Cte.includes(t.protocol)}const Ete={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&wte(e.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};let Eo=[],Pi=0;const kg=4,xte=globalThis.nanostoresGlobal||={epoch:0};let _te=()=>{for(Pi=0;Pi<Eo.length;Pi+=kg)Eo[Pi](Eo[Pi+1].value,Eo[Pi+2],Eo[Pi+3]);Eo.length=0};const x$=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(r){return n.lc=t.push(r),()=>{for(let s=Pi+kg;s<Eo.length;)Eo[s]===r?Eo.splice(s,kg):s+=kg;let o=t.indexOf(r);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(r,o){xte.epoch++;let s=!Eo.length&&!0;for(let a of t)Eo.push(a,n,r,o);s&&_te()},off(){},set(r){let o=n.value;o!==r&&(n.value=r,n.notify(o))},subscribe(r){let o=n.listen(r);return r(n.value),o},value:e};return n},Ite=2,Ate=5,wm=6,Em=10;let _$=(e,t,n,r)=>(e.events=e.events||{},e.events[n+Em]||(e.events[n+Em]=r(o=>{e.events[n].reduceRight((s,a)=>(a(s),s),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],s=o.indexOf(t);o.splice(s,1),o.length||(delete e.events[n],e.events[n+Em](),delete e.events[n+Em])}),Rte=(e,t)=>_$(e,t,Ite,n=>{let r=e.set,o=e.setKey;return e.setKey&&(e.setKey=(s,a)=>{let c;if(n({abort:()=>{c=!0},changed:s,newValue:{...e.value,[s]:a}}),!c)return o(s,a)}),e.set=s=>{let a;if(n({abort:()=>{a=!0},newValue:s}),!a)return r(s)},()=>{e.set=r,e.setKey=o}});const I$=1e3;let Tte=(e,t)=>_$(e,r=>{let o=t(r);o&&e.events[wm].push(o)},Ate,r=>{let o=e.listen;e.listen=(...a)=>(!e.lc&&!e.active&&(e.active=!0,r()),o(...a));let s=e.off;return e.events[wm]=[],e.off=()=>{s(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let a of e.events[wm])a();e.events[wm]=[]}},I$)},()=>{e.listen=o,e.off=s}});function Ote(e,t,n){let r=new Set(t);return e.listen((o,s,a)=>{(a===void 0?t.some(c=>o[c]!==s[c]):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(o,s,a)})}function Yk(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function sv(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!sv(e[n],t[n]))return!1;return!0}if(Yk(e)&&Yk(t)){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!(o in t)||!sv(e[o],t[o]))return!1;return!0}return!1}function Mte(e,t){return Rte(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}const O_=Symbol.for("better-auth:auth-query");function Pte(e){return O_ in e&&e[O_]===!0}function Nte(e){const t=x$(e);return Object.defineProperty(t,O_,{value:!0}),t}const A1=Symbol.for("better-auth:broadcast-channel"),kte=()=>Math.floor(Date.now()/1e3);var Dte=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:kte()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function R1(e="better-auth.message"){return globalThis[A1]||(globalThis[A1]=new Dte(e)),globalThis[A1]}const T1=Symbol.for("better-auth:focus-manager");var Lte=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function Qk(){return globalThis[T1]||(globalThis[T1]=new Lte),globalThis[T1]}const O1=Symbol.for("better-auth:online-manager");var Ute=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function M1(){return globalThis[O1]||(globalThis[O1]=new Ute),globalThis[O1]}const P1=()=>Math.floor(Date.now()/1e3),Fte=5;function $te(e){const{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:o={}}=e,s=o.sessionOptions?.refetchInterval??0,a=o.sessionOptions?.refetchOnWindowFocus??!0,c=o.sessionOptions?.refetchWhenOffline??!1,u={isInitialized:!1,lastSessionRequest:0},f=()=>c||M1().isOnline,h=R=>{if(f()){if(R?.event==="storage"){t();return}if(R?.event==="poll"){u.lastSessionRequest=P1(),t();return}if(R?.event==="visibilitychange"){if(P1()-u.lastSessionRequest<Fte)return;u.lastSessionRequest=P1(),t();return}t()}},m=R=>{R1().post({event:"session",data:{trigger:R},clientId:Math.random().toString(36).substring(7)})},g=()=>{s&&s>0&&(u.pollInterval=setInterval(()=>{n()&&h({event:"poll"})},s*1e3))},v=()=>{u.unsubscribeBroadcast=R1().subscribe(()=>{h({event:"storage"})})},C=()=>{a&&(u.unsubscribeFocus=Qk().subscribe(()=>{h({event:"visibilitychange"})}))},b=()=>{u.unsubscribeOnline=M1().subscribe(R=>{R&&h({event:"visibilitychange"})})},E=()=>{u.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{u.isInitialized||(u.isInitialized=!0,g(),v(),C(),b(),E(),u.cleanupBroadcastSetup=R1().setup(),u.cleanupFocusSetup=Qk().setup(),u.cleanupOnlineSetup=M1().setup())},cleanup:()=>{u.isInitialized&&(u.pollInterval&&(clearInterval(u.pollInterval),u.pollInterval=void 0),u.unsubscribeBroadcast&&(u.unsubscribeBroadcast(),u.unsubscribeBroadcast=void 0),u.unsubscribeFocus&&(u.unsubscribeFocus(),u.unsubscribeFocus=void 0),u.unsubscribeOnline&&(u.unsubscribeOnline(),u.unsubscribeOnline=void 0),u.unsubscribeSignal&&(u.unsubscribeSignal(),u.unsubscribeSignal=void 0),u.cleanupBroadcastSetup&&(u.cleanupBroadcastSetup(),u.cleanupBroadcastSetup=void 0),u.cleanupFocusSetup&&(u.cleanupFocusSetup(),u.cleanupFocusSetup=void 0),u.cleanupOnlineSetup&&(u.cleanupOnlineSetup(),u.cleanupOnlineSetup=void 0),u.isInitialized=!1,u.lastSessionRequest=0)},triggerRefetch:h,broadcastSessionUpdate:m}}const zte=()=>typeof window>"u",jte=I$;function Bte(e,t){if(typeof window>"u")return;const n=e.get();n.data!==null||t===null||e.set({...n,data:t,error:null,isPending:!1})}function Xk(e){return typeof e=="object"&&e!==null&&"data"in e&&"error"in e?e:{data:e,error:null}}function Hte(e){return!e||e.session===null&&e.user===null?null:e}function qte(e,t){return sv(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function Vte(e,t){const n=x$(!1);let r,o=0,s=0;n.listen(()=>{s++,o=0});const a=v=>h(v),c=Nte({data:null,error:null,isPending:!0,isRefetching:!1,refetch:a});Mte(c,qte);const u=async(v,C)=>{const b=c.value;if(c.set({...b,isPending:b.data===null,isRefetching:!0,error:null,refetch:a}),v.aborted)return"aborted";try{const E=await e("/get-session",{method:"GET",query:C?.query,signal:v});if(v.aborted)return"aborted";let{data:x,error:I}=Xk(E),R="fresh";if(x?.needsRefresh)try{const T=await e("/get-session",{method:"POST",signal:v});if(v.aborted)return"aborted";({data:x,error:I}=Xk(T))}catch{if(v.aborted)return"aborted";R="stale"}if(I){const T=c.value,L=I?.status===401;return c.set({data:L?null:T.data,error:I,isPending:!1,isRefetching:!1,refetch:a}),"failed"}const M=Hte(x),D=c.value,N=D.data!=null&&M!=null&&sv(D.data,M)?D.data:M;return c.set({data:N,error:null,isPending:!1,isRefetching:!1,refetch:a}),R}catch(E){if(v.aborted)return"aborted";const x=c.value;return c.set({data:x.data,error:E,isPending:!1,isRefetching:!1,refetch:a}),"failed"}},f=()=>{const v=c.value.data?.session?.expiresAt,C=v instanceof Date?v.getTime():Number.POSITIVE_INFINITY;return Math.min(Date.now()+jte,C)},h=v=>{o=0,r?.cancel();const C=new AbortController,b={cancel:()=>C.abort(),promise:Promise.resolve().then(()=>C.signal.aborted?"aborted":u(C.signal,v)),revision:s};r=b;const E=x=>{r===b&&(r=void 0,x==="fresh"&&b.revision===s&&(o=f()))};return b.promise.then(E,()=>E("failed")),b.promise.then(()=>{})},m=()=>r?.revision===s?r.promise.then(()=>{}):Date.now()<o?Promise.resolve():h();let g=()=>{};return Tte(c,()=>{let v;zte()||(v=setTimeout(()=>{m()},0));const C=$te({fetchSession:h,shouldPollSession:()=>c.value.data!=null,sessionSignal:n,options:t});return C.init(),g=C.broadcastSessionUpdate,()=>{v&&clearTimeout(v),C.cleanup()}}),{session:c,$sessionSignal:n,broadcastSessionUpdate:v=>g(v)}}function N1(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function M_(e,t,n=".",r){if(!N1(t))return M_(e,{},n,r);const o={...t};for(const s of Object.keys(e)){if(s==="__proto__"||s==="constructor")continue;const a=e[s];a!=null&&(r&&r(o,s,a,n)||(Array.isArray(a)&&Array.isArray(o[s])?o[s]=[...a,...o[s]]:N1(a)&&N1(o[s])?o[s]=M_(a,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=a))}return o}function Wte(e){return(...t)=>t.reduce((n,r)=>M_(n,r,"",e),{})}const Gte=Wte();var Kte=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}};const Zte=async(e,t)=>{let n=t||{};const r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(const h of t?.plugins||[]){var o,s,a,c,u;if(h.init){var f;const m=await((f=h.init)===null||f===void 0?void 0:f.call(h,e.toString(),n));n=m.options||n,e=m.url}r.onRequest.push((o=h.hooks)===null||o===void 0?void 0:o.onRequest),r.onResponse.push((s=h.hooks)===null||s===void 0?void 0:s.onResponse),r.onSuccess.push((a=h.hooks)===null||a===void 0?void 0:a.onSuccess),r.onError.push((c=h.hooks)===null||c===void 0?void 0:c.onError),r.onRetry.push((u=h.hooks)===null||u===void 0?void 0:u.onRetry)}return{url:e,options:n,hooks:r}};var Jk=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Yte=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Qte(e){if(typeof e=="number")return new Jk({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Jk(e);case"exponential":return new Yte(e);default:throw new Error("Invalid retry strategy")}}const Xte=["get","post","put","patch","delete"];function ZA(e){if(!e.startsWith("@"))return{method:void 0,path:e};const t=e.indexOf("/"),n=e.slice(1,t===-1?void 0:t);return Xte.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}const Jte=e=>e==="."||e==="..",ene=e=>e.split(":").map(t=>encodeURIComponent(t)).join(":");function tne(e,t){const n=t.get(e);if(n===void 0)return ene(e);if(Jte(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function nne(e,t){const{baseURL:n,params:r,query:o}=t||{query:{},params:{},baseURL:""};let s=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";const{path:a}=ZA(e);a!==e&&(e=`/${a}`),s.endsWith("/")||(s+="/");let[c,u]=e.replace(s,"").split("?");const f=new URLSearchParams(u);for(const[g,v]of Object.entries(o||{})){if(v==null)continue;let C;if(typeof v=="string")C=v;else if(Array.isArray(v)){for(const b of v)f.append(g,b);continue}else C=JSON.stringify(v);f.set(g,C)}const h=new Map;if(r)if(Array.isArray(r)){const g=c.split("/").filter(v=>v.startsWith(":"));for(const[v,C]of g.entries()){const b=r[v];h.set(C,String(b))}}else for(const[g,v]of Object.entries(r))h.set(`:${g}`,String(v));c=c.split("/").map(g=>tne(g,h)).join("/"),c=c.replace(/^\/+/,"");let m=f.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",s.startsWith("http")?new URL(`${c}${m}`,s):`${s}${c}${m}`}const rne=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const[r,o]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!o)return t;t.authorization=`Basic ${btoa(`${r}:${o}`)}`}else if(e.auth.type==="Custom"){const[r,o]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!o)return t;t.authorization=`${r??""} ${o}`}}return t},one=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function sne(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return one.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function ine(e){try{return JSON.parse(e),!0}catch{return!1}}function A$(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function e3(e){try{return JSON.parse(e)}catch{return e}}function t3(e){return typeof e=="function"}function ane(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&t3(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&t3(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function R$(...e){const t={};for(const n of e)if(n)if(n instanceof Headers)n.forEach((r,o)=>{t[o]=r});else{const r=Array.isArray(n)?n:Object.entries(n);for(const[o,s]of r)s!=null&&(t[o]=s)}return t}async function lne(e){const t=new Headers(R$(e?.headers,await rne(e)));if(!t.has("content-type")){const n=cne(e?.body);n&&t.set("content-type",n)}return t}function cne(e){return A$(e)?"application/json":null}function une(e){const t=e.get("content-type");return t?t.split(";")[0].trim().toLowerCase():null}function dne(e,t){const{body:n}=e;return n?!A$(n)||typeof n=="string"?n:une(t)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function fne(e,t){if(t?.method)return t.method.toUpperCase();const{method:n}=ZA(e);return n?n.toUpperCase():t?.body?"POST":"GET"}function hne(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var pne=class T$ extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,T$.prototype)}};async function ff(e,t){const n=await e["~standard"].validate(t);if(n.issues)throw new pne(n.issues);return n.value}function zf(e){"@babel/helpers - typeof";return zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(e)}function mne(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gne(e){var t=mne(e,"string");return zf(t)=="symbol"?t:t+""}function vne(e,t,n){return(t=gne(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n3(Object(n),!0).forEach(function(r){vne(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const P_=async(e,t)=>{var n,r,o;const{hooks:s,url:a,options:c}=await Zte(e,t),u=ane(c),f=new AbortController,h=(n=c.signal)!==null&&n!==void 0?n:f.signal,m=nne(a,c),g=await lne(c),v=dne(c,g),C=fne(a,c),b=St(St({},c),{},{url:m,headers:g,body:v,method:C,signal:h});for(const q of s.onRequest)if(q){const X=await q(b);typeof X=="object"&&X!==null&&Object.assign(b,X)}("pipeTo"in b&&typeof b.pipeTo=="function"||typeof(t==null||(r=t.body)===null||r===void 0?void 0:r.pipe)=="function")&&("duplex"in b||(b.duplex="half"));const{clearTimeout:E}=hne(c,f);let x=await u(b.url,b);E();const I={response:x,request:b};for(const q of s.onResponse)if(q){var R;const X=await q(St(St({},I),{},{response:!(t==null||(R=t.hookOptions)===null||R===void 0)&&R.cloneResponse?x.clone():x}));X instanceof Response?x=X:typeof X=="object"&&X!==null&&(x=X.response)}if(x.ok){if(b.method==="HEAD")return{data:"",error:null};const q=sne(x),X={data:null,response:x,request:b};if(q==="json"||q==="text"){var M;const Se=await x.text();X.data=await((M=b.jsonParser)!==null&&M!==void 0?M:e3)(Se)}else X.data=await x[q]();b?.output&&b.output&&!b.disableValidation&&(X.data=await ff(b.output,X.data));for(const Se of s.onSuccess)if(Se){var D;await Se(St(St({},X),{},{response:!(t==null||(D=t.hookOptions)===null||D===void 0)&&D.cloneResponse?x.clone():x}))}return t?.throw?X.data:{data:X.data,error:null}}const N=(o=t?.jsonParser)!==null&&o!==void 0?o:e3,T=await x.text(),L=ine(T),$=L?await N(T):null,G={response:x,responseText:T,request:b,error:St(St({},$),{},{status:x.status,statusText:x.statusText})};for(const q of s.onError)if(q){var z;await q(St(St({},G),{},{response:!(t==null||(z=t.hookOptions)===null||z===void 0)&&z.cloneResponse?x.clone():x}))}if(t?.retry){var F;const q=Qte(t.retry),X=(F=t.retryAttempt)!==null&&F!==void 0?F:0;if(await q.shouldAttemptRetry(X,x)){for(const V of s.onRetry)V&&await V(I);const Se=q.getDelay(X);return await new Promise(V=>setTimeout(V,Se)),await P_(e,St(St({},t),{},{retryAttempt:X+1}))}}if(t?.throw)throw new Kte(x.status,x.statusText,L?$:T);return{data:null,error:St(St({},$),{},{status:x.status,statusText:x.statusText})}},yne=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r;let o=St(St({},n),e.query!==void 0&&{query:St(St({},e.query),n?.query)});const s=((r=e.plugins)===null||r===void 0||(r=r.find(f=>{var h;return!((h=f.schema)===null||h===void 0)&&h.config?t.startsWith(f.schema.config.baseURL||"")||t.startsWith(f.schema.config.prefix||""):!1}))===null||r===void 0?void 0:r.schema)||e.schema;if(s){var a,c;let f=t;!((a=s.config)===null||a===void 0)&&a.prefix&&f.startsWith(s.config.prefix)&&(f=f.replace(s.config.prefix,""),s.config.baseURL&&(t=t.replace(s.config.prefix,s.config.baseURL))),!((c=s.config)===null||c===void 0)&&c.baseURL&&f.startsWith(s.config.baseURL)&&(f=f.replace(s.config.baseURL,"")),f.startsWith("/")&&f.charAt(1)==="@"&&(f=f.substring(1));const h=s.schema[f];if(h){var u;const{method:m,path:g}=ZA(f);m&&(t=t.slice(0,t.length-f.length)+g);let v=n?.headers;if(h.headers&&!n?.disableValidation){const b={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((I,R)=>{b[R.toLowerCase()]=I});else if(typeof n.headers=="object")for(const[I,R]of Object.entries(n.headers))R!=null&&(b[I.toLowerCase()]=R)}const E=await ff(h.headers,b),x={};for(const[I,R]of Object.entries(E))x[I.toLowerCase()]=R;v=x}const C=(u=h.method)!==null&&u!==void 0?u:m;if(o=St(St(St(St({},o),C!==void 0&&{method:C}),h.output!==void 0&&{output:h.output}),v!==void 0&&{headers:v}),!n?.disableValidation){if(h.query&&(o.query=await ff(h.query,n?.query),o.query!==null&&typeof o.query=="object")){const b=St({},e.query);for(const E of Object.keys(b))n?.query&&Object.prototype.hasOwnProperty.call(n.query,E)&&(b[E]=n.query[E]);o.query=St(St({},b),o.query)}o=St(St({},o),{},{body:h.input?await ff(h.input,n?.body):n?.body,params:h.params?await ff(h.params,n?.params):n?.params})}return{url:t,options:o}}}return St({url:t},(n!==void 0||e.query!==void 0)&&{options:o})}}),bne=e=>{async function t(n,r){const o=St(St(St({},e),r),{},{headers:R$(e?.headers,r?.headers),plugins:[...e?.plugins||[],yne(e||{}),...r?.plugins||[]]});if(e?.catchAllError)try{return await P_(n,o)}catch(s){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:s}}}return await P_(n,o)}return t};var Pa={};const Sne=e=>{if(typeof process>"u")return;const t="/api/auth";if(Pa.NEXT_PUBLIC_AUTH_URL)return Pa.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Pa.NEXTAUTH_URL)try{return Pa.NEXTAUTH_URL}catch{}if(Pa.VERCEL_URL)try{const n=Pa.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${Pa.VERCEL_URL}`).origin}${t}`}catch{}}},Cne=e=>e==="/sign-out"||e==="/update-user"||e==="/update-session"||e==="/sign-up/email"||e==="/sign-in/email"||e==="/delete-user"||e==="/verify-email"||e==="/revoke-sessions"||e==="/revoke-session"||e==="/revoke-other-sessions"||e==="/change-email"||e==="/change-password",wne=(e,t)=>{const n="credentials"in Request.prototype,r=hte(e?.baseURL,e?.basePath)??Sne()??"/api/auth",o=[],s={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:a,onError:c,onRequest:u,onResponse:f,...h}={},m=bne({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(T){return T?Ste(T,{strict:!1}):null},customFetchImpl:fetch,...h,plugins:[s,...h.plugins||[],Ete,...o]}),{$sessionSignal:g,session:v,broadcastSessionUpdate:C}=Vte(m,e);let b=!1;const E=T=>{b||T===null||(b=!0,Bte(v,T))},x=[];let I={};const R={$sessionSignal:g,session:v},M={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},D=[{signal:"$sessionSignal",matcher:Cne,callback(T){T==="/sign-out"?C("signout"):(T==="/update-user"||T==="/update-session")&&C("updateUser")}}];for(const T of x)T.getAtoms&&Object.assign(R,T.getAtoms?.(m)),T.pathMethods&&Object.assign(M,T.pathMethods),T.atomListeners&&D.push(...T.atomListeners);const N={notify:T=>{R[T].set(!R[T].get())},listen:(T,L)=>{R[T].subscribe(L)},atoms:R};for(const T of x)T.getActions&&(I=Gte(T.getActions?.(m,N,e)??{},I));return{get baseURL(){return r},pluginsActions:I,pluginsAtoms:R,pluginPathMethods:M,atomListeners:D,hydrateSession:E,$sessionSignal:g,$fetch:m,$store:N}};function Ene(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function xne(e){return e.charAt(0).toUpperCase()+e.slice(1)}const _ne=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),Ine=/['\u2019]/g;function Ane(e){return e.replace(Ine,"").match(_ne)??[]}function Rne(e){return Ane(e).map(t=>t.toLowerCase()).join("-")}function Tne(e,t,n){const r=t[e],{fetchOptions:o,query:s,...a}=n||{};return r||(o?.method?o.method:a&&Object.keys(a).length>0?"POST":"GET")}function One(e,t,n,r,o){function s(a=[]){return new Proxy(function(){},{get(c,u){if(typeof u!="string"||u==="then"||u==="catch"||u==="finally")return;const f=[...a,u];let h=e;for(const m of f)if(h&&typeof h=="object"&&m in h)h=h[m];else{h=void 0;break}return typeof h=="function"||Ene(h)?h:s(f)},apply:async(c,u,f)=>{const h="/"+a.map(Rne).join("/"),m=f[0]||{},g=f[1]||{},{query:v,fetchOptions:C,...b}=m,E={...g,...C},x=Tne(h,n,m);return await t(h,{...E,body:x==="GET"?void 0:{...b,...E?.body||{}},query:v||E?.query,method:x,async onSuccess(I){if(await E?.onSuccess?.(I),!o||E.disableSignal)return;const R=o.filter(D=>D.matcher(h));if(!R.length)return;const M=new Set;for(const D of R){const N=r[D.signal];if(!N)return;if(M.has(D.signal))continue;M.add(D.signal);const T=N.get();setTimeout(()=>{N.set(!T)},10),D.callback?.(h)}}})}})}return s()}var k1={exports:{}},He={};var r3;function Mne(){if(r3)return He;r3=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v(j){return j===null||typeof j!="object"?null:(j=g&&j[g]||j["@@iterator"],typeof j=="function"?j:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,E={};function x(j,te,fe){this.props=j,this.context=te,this.refs=E,this.updater=fe||C}x.prototype.isReactComponent={},x.prototype.setState=function(j,te){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,te,"setState")},x.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function I(){}I.prototype=x.prototype;function R(j,te,fe){this.props=j,this.context=te,this.refs=E,this.updater=fe||C}var M=R.prototype=new I;M.constructor=R,b(M,x.prototype),M.isPureReactComponent=!0;var D=Array.isArray;function N(){}var T={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function $(j,te,fe){var ae=fe.ref;return{$$typeof:e,type:j,key:te,ref:ae!==void 0?ae:null,props:fe}}function G(j,te){return $(j.type,te,j.props)}function z(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function F(j){var te={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(fe){return te[fe]})}var q=/\/+/g;function X(j,te){return typeof j=="object"&&j!==null&&j.key!=null?F(""+j.key):te.toString(36)}function Se(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(N,N):(j.status="pending",j.then(function(te){j.status==="pending"&&(j.status="fulfilled",j.value=te)},function(te){j.status==="pending"&&(j.status="rejected",j.reason=te)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function V(j,te,fe,ae,be){var Fe=typeof j;(Fe==="undefined"||Fe==="boolean")&&(j=null);var ke=!1;if(j===null)ke=!0;else switch(Fe){case"bigint":case"string":case"number":ke=!0;break;case"object":switch(j.$$typeof){case e:case t:ke=!0;break;case h:return ke=j._init,V(ke(j._payload),te,fe,ae,be)}}if(ke)return be=be(j),ke=ae===""?"."+X(j,0):ae,D(be)?(fe="",ke!=null&&(fe=ke.replace(q,"$&/")+"/"),V(be,te,fe,"",function(rt){return rt})):be!=null&&(z(be)&&(be=G(be,fe+(be.key==null||j&&j.key===be.key?"":(""+be.key).replace(q,"$&/")+"/")+ke)),te.push(be)),1;ke=0;var le=ae===""?".":ae+":";if(D(j))for(var Re=0;Re<j.length;Re++)ae=j[Re],Fe=le+X(ae,Re),ke+=V(ae,te,fe,Fe,be);else if(Re=v(j),typeof Re=="function")for(j=Re.call(j),Re=0;!(ae=j.next()).done;)ae=ae.value,Fe=le+X(ae,Re++),ke+=V(ae,te,fe,Fe,be);else if(Fe==="object"){if(typeof j.then=="function")return V(Se(j),te,fe,ae,be);throw te=String(j),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return ke}function ee(j,te,fe){if(j==null)return j;var ae=[],be=0;return V(j,ae,"","",function(Fe){return te.call(fe,Fe,be++)}),ae}function pe(j){if(j._status===-1){var te=j._result;te=te(),te.then(function(fe){(j._status===0||j._status===-1)&&(j._status=1,j._result=fe)},function(fe){(j._status===0||j._status===-1)&&(j._status=2,j._result=fe)}),j._status===-1&&(j._status=0,j._result=te)}if(j._status===1)return j._result.default;throw j._result}var ge=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Te={map:ee,forEach:function(j,te,fe){ee(j,function(){te.apply(this,arguments)},fe)},count:function(j){var te=0;return ee(j,function(){te++}),te},toArray:function(j){return ee(j,function(te){return te})||[]},only:function(j){if(!z(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return He.Activity=m,He.Children=Te,He.Component=x,He.Fragment=n,He.Profiler=o,He.PureComponent=R,He.StrictMode=r,He.Suspense=u,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,He.__COMPILER_RUNTIME={__proto__:null,c:function(j){return T.H.useMemoCache(j)}},He.cache=function(j){return function(){return j.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(j,te,fe){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ae=b({},j.props),be=j.key;if(te!=null)for(Fe in te.key!==void 0&&(be=""+te.key),te)!L.call(te,Fe)||Fe==="key"||Fe==="__self"||Fe==="__source"||Fe==="ref"&&te.ref===void 0||(ae[Fe]=te[Fe]);var Fe=arguments.length-2;if(Fe===1)ae.children=fe;else if(1<Fe){for(var ke=Array(Fe),le=0;le<Fe;le++)ke[le]=arguments[le+2];ae.children=ke}return $(j.type,be,ae)},He.createContext=function(j){return j={$$typeof:a,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:s,_context:j},j},He.createElement=function(j,te,fe){var ae,be={},Fe=null;if(te!=null)for(ae in te.key!==void 0&&(Fe=""+te.key),te)L.call(te,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(be[ae]=te[ae]);var ke=arguments.length-2;if(ke===1)be.children=fe;else if(1<ke){for(var le=Array(ke),Re=0;Re<ke;Re++)le[Re]=arguments[Re+2];be.children=le}if(j&&j.defaultProps)for(ae in ke=j.defaultProps,ke)be[ae]===void 0&&(be[ae]=ke[ae]);return $(j,Fe,be)},He.createRef=function(){return{current:null}},He.forwardRef=function(j){return{$$typeof:c,render:j}},He.isValidElement=z,He.lazy=function(j){return{$$typeof:h,_payload:{_status:-1,_result:j},_init:pe}},He.memo=function(j,te){return{$$typeof:f,type:j,compare:te===void 0?null:te}},He.startTransition=function(j){var te=T.T,fe={};T.T=fe;try{var ae=j(),be=T.S;be!==null&&be(fe,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(N,ge)}catch(Fe){ge(Fe)}finally{te!==null&&fe.types!==null&&(te.types=fe.types),T.T=te}},He.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},He.use=function(j){return T.H.use(j)},He.useActionState=function(j,te,fe){return T.H.useActionState(j,te,fe)},He.useCallback=function(j,te){return T.H.useCallback(j,te)},He.useContext=function(j){return T.H.useContext(j)},He.useDebugValue=function(){},He.useDeferredValue=function(j,te){return T.H.useDeferredValue(j,te)},He.useEffect=function(j,te){return T.H.useEffect(j,te)},He.useEffectEvent=function(j){return T.H.useEffectEvent(j)},He.useId=function(){return T.H.useId()},He.useImperativeHandle=function(j,te,fe){return T.H.useImperativeHandle(j,te,fe)},He.useInsertionEffect=function(j,te){return T.H.useInsertionEffect(j,te)},He.useLayoutEffect=function(j,te){return T.H.useLayoutEffect(j,te)},He.useMemo=function(j,te){return T.H.useMemo(j,te)},He.useOptimistic=function(j,te){return T.H.useOptimistic(j,te)},He.useReducer=function(j,te,fe){return T.H.useReducer(j,te,fe)},He.useRef=function(j){return T.H.useRef(j)},He.useState=function(j){return T.H.useState(j)},He.useSyncExternalStore=function(j,te,fe){return T.H.useSyncExternalStore(j,te,fe)},He.useTransition=function(){return T.H.useTransition()},He.version="19.2.7",He}var o3;function Ih(){return o3||(o3=1,k1.exports=Mne()),k1.exports}var _=Ih();const B=Eu(_),Pne=mF({__proto__:null,default:B},[_]);function Nne(e,t={}){const n=_.useRef(e.get()),{keys:r,deps:o=[e,r]}=t,s=_.useCallback(c=>{const u=f=>{n.current!==f&&(n.current=f,c())};return u(e.value),r?.length?Ote(e,r,u):e.listen(u)},o),a=()=>n.current;return _.useSyncExternalStore(s,a,Pte(e)?()=>e.init:a)}function kne(e){return`use${xne(e)}`}function Dne(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:o,$fetch:s,$store:a,atomListeners:c}=wne(e),u={};for(const[f,h]of Object.entries(r))u[kne(f)]=()=>Nne(h);return One({...n,...u,hydrateSession:o,$fetch:s,$store:a},s,t,r,c)}const Lne=10,Kc=[],Une=["x-correlation-id","x-request-id","x-amzn-requestid","x-amzn-trace-id","apigw-requestid","x-trace-id"];function Fne(e){const t=typeof e=="string"?e:e instanceof URL?e.href:e.url;try{return new URL(t,window.location.origin).pathname}catch{return t.split(/[?#]/)[0]}}function $ne(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function zne(e){for(const t of Une){const n=e.headers.get(t);if(n)return n}}function jne(e){Kc.push(e),Kc.length>Lne&&Kc.shift()}function s3(e){const{input:t,init:n,response:r,durationMs:o}=e;jne({method:$ne(t,n),path:Fne(t),status:r?.status??0,durationMs:Math.round(o),correlationId:r?zne(r):void 0,timestamp:new Date().toISOString()})}function Bne(){return Kc.slice()}function Hne(){for(let e=Kc.length-1;e>=0;e--){const t=Kc[e];if(t.status===0||t.status>=400)return t}}class YA extends Error{constructor(t){super(t instanceof Error&&t.message?t.message:"The request could not be completed.",{cause:t}),this.name="NetworkError"}}const qne=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError",O$=async(e,t)=>{const n=performance.now();try{const r=await fetch(e,{...t,redirect:"manual"}),o=r.type==="opaqueredirect"?new Response(null,{status:401}):r;return s3({input:e,init:t,response:o,durationMs:performance.now()-n}),o}catch(r){throw qne(r)?r:(s3({input:e,init:t,durationMs:performance.now()-n}),new YA(r))}},QA=()=>{try{return globalThis.sessionStorage??null}catch{return null}},Cy=()=>Pu().betterAuthEnabled,Vne="EMAIL_PASSWORD_SIGN_UP_DISABLED",Wne=e=>typeof e=="object"&&e!==null&&e.code===Vne,rl=Dne(),Gne=60,Kne=30,N_="remit.better-auth.token",Zne=()=>{const e=QA()?.getItem(N_);if(!e)return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.value=="string"&&typeof t.expiresAt=="number")return{value:t.value,expiresAt:t.expiresAt}}catch{}return null},M$=e=>{const t=QA();if(t)try{if(!e){t.removeItem(N_);return}t.setItem(N_,JSON.stringify(e))}catch{}};let Fa=null,iv=0;const Yne=()=>Fa||(Fa=Zne(),Fa),qa=()=>Math.floor(Date.now()/1e3),Qne=e=>{const[,t]=e.split(".");if(!t)return qa();try{const n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:qa()}catch{return qa()}};class av extends Error{status;constructor(t,n){super(t),this.name="AuthTokenError",this.status=n}}const Xne=async()=>{const e=await O$("/api/auth/token",{credentials:"include"});if(!e.ok)throw new av(`Could not mint a session token: ${e.status} ${e.statusText}`,e.status);const t=await e.json();if(t&&typeof t=="object"&&"token"in t&&typeof t.token=="string")return t.token;throw new av("The token endpoint returned no token")};let Bd=null;const Jne=()=>Bd||(Bd=Xne().then(e=>(Fa={value:e,expiresAt:Qne(e)},M$(Fa),iv=0,e)).finally(()=>{Bd=null}),Bd),ere=e=>e.expiresAt-Gne>qa(),i3=e=>e.expiresAt>qa(),tre=e=>e instanceof YA?!0:e instanceof av?e.status===408||e.status===429||(e.status??0)>=500:!1,nre=e=>e instanceof av&&(e.status===401||e.status===403),rre=async()=>{const e=Yne();if(e&&ere(e)||e&&i3(e)&&qa()<iv)return e.value;try{return await Jne()}catch(t){if(nre(t))throw XA(),t.status===403&&rl.$store.notify("$sessionSignal"),t;if(e&&i3(e)&&tre(t))return iv=qa()+Kne,e.value;throw t}},XA=()=>{iv=0,M$(null),Fa=null};const ore=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function sre(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:ore(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}const ire=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t};const are=e=>{const t=ire(e);return t.charAt(0).toUpperCase()+t.slice(1)};const k_=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const Na={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function D1(e){return e!=null}function lre(e,t={}){const n=t.attributeNames??{},r=g=>n[g]??g,o=e.size??e.width??Na.width,s=e.size??e.height??Na.height,a=e.aliases?.filter(g=>typeof g=="string"&&g.trim()!=="").map(g=>`lucide-${g}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...a],u=t.className?.split(" ").filter(Boolean)??[],f=t.includeDefaultClasses===!1?k_(...u):k_("lucide",...c,...u),h=t.absoluteStrokeWidth?Number(t.strokeWidth??Na["stroke-width"])*Number(e.size??e.width??Na.width)/Number(t.size??t.width??Na.width):t.strokeWidth??Na["stroke-width"];return["svg",{...Object.entries(Na).reduce((g,[v,C])=>(g[r(v)]=C,g),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&D1(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&D1(t.width)&&{[r("width")]:t.width},..."height"in t&&D1(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:h,...f&&{[r("class")]:f},[r("viewBox")]:`0 0 ${o} ${s}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(g=>{const[v,C,b]=g,E=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...C}:C;return b?[v,E,b]:[v,E]})]}function cre(e,t={}){return lre(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const ure=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},dre=_.createContext({}),fre=()=>_.useContext(dre),hre=_.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:o,absoluteStrokeWidth:s,nonScalingStroke:a,className:c="",children:u,iconNode:f=[],icon:h={node:f,aliases:[],size:24},...m},g)=>{const{size:v=24,strokeWidth:C=2,absoluteStrokeWidth:b=!1,nonScalingStroke:E=!1,color:x="currentColor",className:I=""}=fre()??{},R=!!u||ure(m),[M,D,N=[]]=cre(h,{color:e??x,width:n??t??v,height:r??t??v,strokeWidth:o??C,absoluteStrokeWidth:s??b,nonScalingStroke:a??E,className:k_(I,c),hasA11yProp:R,attributes:m});return _.createElement(M,{ref:g,...D},[...N.map(([T,L])=>_.createElement(T,L)),...Array.isArray(u)?u:[u]])});function Et(e,t=[],n=[]){const r=typeof e=="string"?sre(e,t,n):e,o=_.forwardRef(({className:s,...a},c)=>_.createElement(hre,{ref:c,icon:r,className:s,...a}));return r.name&&(o.displayName=are(r.name)),o}const P$={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};P$.node;const pre=Et(P$);const N$={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};N$.node;const mre=Et(N$);const k$={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};k$.node;const D$=Et(k$);const L$={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};L$.node;const gre=Et(L$);const U$={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};U$.node;const F$=Et(U$);const $$={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};$$.node;const vre=Et($$);const z$={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};z$.node;const yre=Et(z$);const j$={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};j$.node;const bre=Et(j$);const B$={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};B$.node;const Sre=Et(B$);const H$={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};H$.node;const Cre=Et(H$);const q$={name:"folder-tree",size:24,node:[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]};q$.node;const wre=Et(q$);const V$={name:"funnel",size:24,node:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],aliases:["filter"]};V$.node;const Ere=Et(V$);const W$={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};W$.node;const G$=Et(W$);const K$={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};K$.node;const xre=Et(K$);const Z$={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Z$.node;const Y$=Et(Z$);const Q$={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};Q$.node;const a3=Et(Q$);const X$={name:"mails",size:24,node:[["path",{d:"M17 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 1-1.732",key:"1vyzll"}],["path",{d:"m22 5.5-6.419 4.179a2 2 0 0 1-2.162 0L7 5.5",key:"k7ramc"}],["rect",{x:"7",y:"3",width:"15",height:"12",rx:"2",key:"17196g"}]]};X$.node;const _re=Et(X$);const J$={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};J$.node;const JA=Et(J$);const ez={name:"palette",size:24,node:[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]};ez.node;const Ire=Et(ez);const tz={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};tz.node;const Are=Et(tz);const nz={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};nz.node;const Rre=Et(nz);const rz={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};rz.node;const Tre=Et(rz);const oz={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};oz.node;const Ore=Et(oz);const sz={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};sz.node;const Mre=Et(sz);const iz={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};iz.node;const Pre=Et(iz);const az={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};az.node;const Nre=Et(az);const lz={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};lz.node;const eR=Et(lz);const cz={name:"user-cog",size:24,node:[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};cz.node;const kre=Et(cz);const uz={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};uz.node;const Dre=Et(uz);const dz={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};dz.node;const Lre=Et(dz);const fz={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};fz.node;const D_=Et(fz);function hz(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=hz(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ure(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=hz(e))&&(r&&(r+=" "),r+=t);return r}const tR="-",Fre=e=>{const t=zre(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const c=a.split(tR);return c[0]===""&&c.length!==1&&c.shift(),pz(c,t)||$re(a)},getConflictingClassGroupIds:(a,c)=>{const u=n[a]||[];return c&&r[a]?[...u,...r[a]]:u}}},pz=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?pz(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(tR);return t.validators.find(({validator:a})=>a(s))?.classGroupId},l3=/^\[(.+)\]$/,$re=e=>{if(l3.test(e)){const t=l3.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},zre=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Bre(Object.entries(e.classGroups),n).forEach(([s,a])=>{L_(a,r,s,t)}),r},L_=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:c3(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(jre(o)){L_(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{L_(a,c3(t,s),n,r)})})},c3=(e,t)=>{let n=e;return t.split(tR).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},jre=e=>e.isThemeGetter,Bre=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,c])=>[t+a,c])):s);return[n,o]}):e,Hre=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},mz="!",qre=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,a=c=>{const u=[];let f=0,h=0,m;for(let E=0;E<c.length;E++){let x=c[E];if(f===0){if(x===o&&(r||c.slice(E,E+s)===t)){u.push(c.slice(h,E)),h=E+s;continue}if(x==="/"){m=E;continue}}x==="["?f++:x==="]"&&f--}const g=u.length===0?c:c.substring(h),v=g.startsWith(mz),C=v?g.substring(1):g,b=m&&m>h?m-h:void 0;return{modifiers:u,hasImportantModifier:v,baseClassName:C,maybePostfixModifierPosition:b}};return n?c=>n({className:c,parseClassName:a}):a},Vre=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Wre=e=>({cache:Hre(e.cacheSize),parseClassName:qre(e),...Fre(e)}),Gre=/\s+/,Kre=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],a=e.trim().split(Gre);let c="";for(let u=a.length-1;u>=0;u-=1){const f=a[u],{modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=n(f);let C=!!v,b=r(C?g.substring(0,v):g);if(!b){if(!C){c=f+(c.length>0?" "+c:c);continue}if(b=r(g),!b){c=f+(c.length>0?" "+c:c);continue}C=!1}const E=Vre(h).join(":"),x=m?E+mz:E,I=x+b;if(s.includes(I))continue;s.push(I);const R=o(b,C);for(let M=0;M<R.length;++M){const D=R[M];s.push(x+D)}c=f+(c.length>0?" "+c:c)}return c};function Zre(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=gz(t))&&(r&&(r+=" "),r+=n);return r}const gz=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=gz(e[r]))&&(n&&(n+=" "),n+=t);return n};function Yre(e,...t){let n,r,o,s=a;function a(u){const f=t.reduce((h,m)=>m(h),e());return n=Wre(f),r=n.cache.get,o=n.cache.set,s=c,c(u)}function c(u){const f=r(u);if(f)return f;const h=Kre(u,n);return o(u,h),h}return function(){return s(Zre.apply(null,arguments))}}const qt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},vz=/^\[(?:([a-z-]+):)?(.+)\]$/i,Qre=/^\d+\/\d+$/,Xre=new Set(["px","full","screen"]),Jre=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eoe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,toe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,noe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,roe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=e=>Zc(e)||Xre.has(e)||Qre.test(e),Ai=e=>Nu(e,"length",doe),Zc=e=>!!e&&!Number.isNaN(Number(e)),L1=e=>Nu(e,"number",Zc),Hd=e=>!!e&&Number.isInteger(Number(e)),ooe=e=>e.endsWith("%")&&Zc(e.slice(0,-1)),Ze=e=>vz.test(e),Ri=e=>Jre.test(e),soe=new Set(["length","size","percentage"]),ioe=e=>Nu(e,soe,yz),aoe=e=>Nu(e,"position",yz),loe=new Set(["image","url"]),coe=e=>Nu(e,loe,hoe),uoe=e=>Nu(e,"",foe),qd=()=>!0,Nu=(e,t,n)=>{const r=vz.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},doe=e=>eoe.test(e)&&!toe.test(e),yz=()=>!1,foe=e=>noe.test(e),hoe=e=>roe.test(e),poe=()=>{const e=qt("colors"),t=qt("spacing"),n=qt("blur"),r=qt("brightness"),o=qt("borderColor"),s=qt("borderRadius"),a=qt("borderSpacing"),c=qt("borderWidth"),u=qt("contrast"),f=qt("grayscale"),h=qt("hueRotate"),m=qt("invert"),g=qt("gap"),v=qt("gradientColorStops"),C=qt("gradientColorStopPositions"),b=qt("inset"),E=qt("margin"),x=qt("opacity"),I=qt("padding"),R=qt("saturate"),M=qt("scale"),D=qt("sepia"),N=qt("skew"),T=qt("space"),L=qt("translate"),$=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",Ze,t],F=()=>[Ze,t],q=()=>["",xs,Ai],X=()=>["auto",Zc,Ze],Se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>["start","end","center","between","around","evenly","stretch"],ge=()=>["","0",Ze],Te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],j=()=>[Zc,Ze];return{cacheSize:500,separator:":",theme:{colors:[qd],spacing:[xs,Ai],blur:["none","",Ri,Ze],brightness:j(),borderColor:[e],borderRadius:["none","","full",Ri,Ze],borderSpacing:F(),borderWidth:q(),contrast:j(),grayscale:ge(),hueRotate:j(),invert:ge(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[ooe,Ai],inset:z(),margin:z(),opacity:j(),padding:F(),saturate:j(),scale:j(),sepia:ge(),skew:j(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",Ze]}],container:["container"],columns:[{columns:[Ri]}],"break-after":[{"break-after":Te()}],"break-before":[{"break-before":Te()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Se(),Ze]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Hd,Ze]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ze]}],grow:[{grow:ge()}],shrink:[{shrink:ge()}],order:[{order:["first","last","none",Hd,Ze]}],"grid-cols":[{"grid-cols":[qd]}],"col-start-end":[{col:["auto",{span:["full",Hd,Ze]},Ze]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[qd]}],"row-start-end":[{row:["auto",{span:[Hd,Ze]},Ze]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ze]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...pe()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...pe(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...pe(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ze,t]}],"min-w":[{"min-w":[Ze,t,"min","max","fit"]}],"max-w":[{"max-w":[Ze,t,"none","full","min","max","fit","prose",{screen:[Ri]},Ri]}],h:[{h:[Ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ri,Ai]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",L1]}],"font-family":[{font:[qd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ze]}],"line-clamp":[{"line-clamp":["none",Zc,L1]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xs,Ze]}],"list-image":[{"list-image":["none",Ze]}],"list-style-type":[{list:["none","disc","decimal",Ze]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xs,Ai]}],"underline-offset":[{"underline-offset":["auto",xs,Ze]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Se(),aoe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ioe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},coe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[xs,Ze]}],"outline-w":[{outline:[xs,Ai]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[xs,Ai]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ri,uoe]}],"shadow-color":[{shadow:[qd]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ri,Ze]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[R]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ze]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",Ze]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Hd,Ze]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ze]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xs,Ai,L1]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},moe=Yre(poe);function Jt(...e){return moe(Ure(e))}var U1={exports:{}},Kn={};var u3;function goe(){if(u3)return Kn;u3=1;var e=Ih();function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(u,f,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:u,containerInfo:f,implementation:h}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Kn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Kn.createPortal=function(u,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(u,f,null,h)},Kn.flushSync=function(u){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,u)return u()}finally{a.T=f,r.p=h,r.d.f()}},Kn.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(u,f))},Kn.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Kn.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):h==="script"&&r.d.X(u,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Kn.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=c(f.as,f.crossOrigin);r.d.M(u,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(u)},Kn.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,m=c(h,f.crossOrigin);r.d.L(u,h,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Kn.preloadModule=function(u,f){if(typeof u=="string")if(f){var h=c(f.as,f.crossOrigin);r.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(u)},Kn.requestFormReset=function(u){r.d.r(u)},Kn.unstable_batchedUpdates=function(u,f){return u(f)},Kn.useFormState=function(u,f,h){return a.H.useFormState(u,f,h)},Kn.useFormStatus=function(){return a.H.useHostTransitionStatus()},Kn.version="19.2.7",Kn}var d3;function bz(){if(d3)return U1.exports;d3=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),U1.exports=goe(),U1.exports}var voe=bz();const Vd={action:null,nextPrefix:null,preventDefault:!1},yoe={b:"goBrief",i:"goInbox",s:"goSent",f:"goFlagged",",":"goSettings"},boe={j:{action:"focusNext"},k:{action:"focusPrevious"},arrowdown:{action:"focusNext"},arrowup:{action:"focusPrevious"},home:{action:"focusFirst"},end:{action:"focusLast"},enter:{action:"openFocused"}," ":{action:"toggleSelect"},delete:{action:"delete"},backspace:{action:"delete"},u:{action:"toggleRead"},x:{action:"toggleSelect"},r:{action:"reply"},a:{action:"replyAll"},f:{action:"forward"},"#":{action:"delete"},s:{action:"toggleStar"},m:{action:"muteSender"},b:{action:"blockSender"},v:{action:"vipSender"},"!":{action:"markJunk"},i:{action:"toggleIntelligence"},d:{action:"toggleDensity"},"/":{action:"focusSearch"},c:{action:"compose"},"?":{action:"help"}};function Soe(e,t){const n=e.key.toLowerCase(),r=e.metaKey||e.ctrlKey;if(e.inEditable)return{...Vd,nextPrefix:t==="g"?null:t};if(e.onControl&&(n==="enter"||n===" "))return{...Vd,nextPrefix:t==="g"?null:t};if(r&&n==="n")return{action:"compose",nextPrefix:null,preventDefault:!0};if(r&&n==="a")return{action:"selectAll",nextPrefix:null,preventDefault:!0};if(r)return{...Vd,nextPrefix:t==="g"?null:t};if(n==="escape")return{action:"back",nextPrefix:null,preventDefault:!1};if(t==="g"){const a=yoe[n===","?",":n]??null;return{action:a,nextPrefix:null,preventDefault:a!==null}}if(n==="g"&&!e.shiftKey)return{action:null,nextPrefix:"g",preventDefault:!0};if(e.shiftKey){const s=n==="j"||n==="arrowdown";if(s||(n==="k"||n==="arrowup"))return{action:s?"extendSelectDown":"extendSelectUp",nextPrefix:null,preventDefault:!0}}const o=boe[n];if(o){const s=o.requireShift===!0,a=n.length===1&&!/[a-z0-9]/.test(n);return!s&&e.shiftKey&&!a?Vd:{action:o.action,nextPrefix:null,preventDefault:!0}}return Vd}function Coe(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}const woe="data-message-row",Eoe='button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"]';function xoe(e){if(!(e instanceof HTMLElement))return!1;const t=e.closest(Eoe);return t?!t.hasAttribute(woe):!1}const _oe=["reply","replyAll","forward","delete","toggleStar","toggleRead","muteSender","blockSender","vipSender","markJunk"],Ioe=["focusNext","focusPrevious","focusFirst","focusLast","openFocused","toggleSelect","extendSelectDown","extendSelectUp","selectAll","toggleDensity"],Mn=(e,...t)=>({action:e,requires:t});Mn("help"),Mn("goBrief",{listIsNot:"brief"}),Mn("goFlagged",{listIsNot:"flagged"}),Mn("goInbox",{listIsNot:"inbox"}),Mn("goSent",{listIsNot:"sent"}),Mn("goSettings"),Mn("compose"),Mn("focusSearch"),Mn("toggleIntelligence"),[...Ioe.map(e=>Mn(e,"listVisible")),..._oe.map(e=>Mn(e,"aimed")),Mn("back","selection")],Mn("focusNext","threadOpen",{not:"listVisible"}),Mn("focusPrevious","threadOpen",{not:"listVisible"}),Mn("reply","threadOpen"),Mn("replyAll","threadOpen"),Mn("forward","threadOpen"),Mn("back");function Aoe(e,t){const n=t.at(-1);return n?n.handles.includes(e)?{outcome:"act",target:{kind:"overlay",frame:n}}:{outcome:"contained",by:{kind:"overlay",frame:n}}:null}const Roe="[data-escape-owner]";let su=[],Toe=0;const Ooe=()=>++Toe;function Sz(){const[e]=_.useState(Ooe);return e}const Moe=(e,t)=>e.depth-t.depth;function Poe(){return[...su].sort(Moe).map(e=>({id:e.id,handles:Object.entries(e.run()).filter(([,t])=>t).map(([t])=>t)}))}function Noe(){let e;for(const t of su)(!e||t.depth>e.depth)&&(e=t);return e}function gze(e){return Aoe(e,Poe())}function koe(e){if(e.key==="Escape"){const t=document.activeElement;return t instanceof Element&&t.closest(Roe)?null:"back"}return Soe({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,inEditable:Coe(e.target),onControl:xoe(e.target)},null).action}function f3(e){const t=Noe();if(!t)return;const n=koe(e);if(!n)return;const r=t.run()[n];r&&(e.preventDefault(),e.stopImmediatePropagation(),r())}function h3(e){const t=su.length===0;if(su=e,t!==(e.length===0)){if(e.length>0){window.addEventListener("keydown",f3,!0);return}window.removeEventListener("keydown",f3,!0)}}function wy({id:e,open:t,answers:n={}}){const r=_.useRef(n);r.current=n;const o=Sz();_.useEffect(()=>{if(!t)return;const s={id:e,depth:o,run:()=>r.current};return h3([...su,s]),()=>{h3(su.filter(a=>a!==s))}},[e,t,o])}const nR="inline-flex items-center justify-center gap-2 rounded-md font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface disabled:opacity-50 disabled:pointer-events-none",rR={primary:"bg-accent text-accent-fg hover:bg-accent-hover",secondary:"bg-surface text-fg border border-line hover:bg-surface-sunken hover:border-line-strong",ghost:"text-fg-muted hover:bg-surface-sunken hover:text-fg",danger:"bg-danger text-accent-fg hover:opacity-90"},oR={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm",touch:"h-11 w-11 text-sm"},vze=({variant:e="primary",size:t="md"})=>Jt(nR,rR[e],oR[t]);function Qn({variant:e="primary",size:t="md",icon:n,className:r,children:o,ref:s,...a}){return O.jsxs("button",{type:"button",ref:s,className:Jt(nR,rR[e],oR[t],r),...a,children:[n,o]})}function Doe({variant:e="primary",size:t="md",icon:n,external:r,className:o,children:s,...a}){return O.jsxs("a",{className:Jt(nR,rR[e],oR[t],o),...r?{target:"_blank",rel:"noopener noreferrer"}:{},...a,children:[n,s]})}const Loe='a[href], button, input, select, textarea, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])';function Uoe(e){if(Number(e.getAttribute("tabindex")??0)<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"||e.closest("[inert], [hidden], [aria-hidden='true']"))return!1;const t=getComputedStyle(e);return t.display!=="none"&&t.visibility!=="hidden"}function p3(e){const t=e.querySelectorAll('[role="dialog"][aria-modal="true"]');return[...(t[t.length-1]??e).querySelectorAll(Loe)].filter(Uoe)}const U_=new Set;function Foe(e){for(const t of U_)if(t>e)return!1;return!0}function $oe(e,t){return!(t instanceof HTMLElement)||t===document.body||t===document.documentElement?!1:!e.contains(t)}function Ey(e,t){const n=Sz();_.useEffect(()=>{if(t)return U_.add(n),()=>{U_.delete(n)}},[t,n]),_.useEffect(()=>{if(!t)return;const r=document.activeElement instanceof HTMLElement?document.activeElement:null,o=e.current;return o&&(p3(o)[0]??o).focus(),()=>{r?.isConnected&&r.focus()}},[t,e]),_.useEffect(()=>{if(!t)return;const r=o=>{if(o.key!=="Tab"||o.defaultPrevented||!Foe(n))return;const s=e.current;if(!s)return;const a=document.activeElement;if($oe(s,a))return;const c=p3(s),u=c[0],f=c.at(-1);if(!u||!f){o.preventDefault(),s.focus();return}const h=a instanceof HTMLElement&&c.includes(a);if(o.shiftKey){(!h||a===u)&&(o.preventDefault(),f.focus());return}(!h||a===f)&&(o.preventDefault(),u.focus())};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[t,e,n])}const zoe=({label:e,onDismiss:t,className:n})=>O.jsx("button",{type:"button","aria-label":e,tabIndex:-1,onClick:t,className:Jt("absolute inset-0 bg-canvas/80",n)}),joe={info:"bg-accent-2/15 text-accent-2 border-accent-2/40",success:"bg-positive/15 text-positive border-positive/40",warning:"bg-warning/15 text-warning border-warning/40",danger:"bg-danger/15 text-danger border-danger/40"},Boe={info:"bg-surface-sunken text-fg-muted",success:"bg-positive/10 text-positive",warning:"bg-warning/10 text-warning",danger:"bg-danger-soft text-danger"},Hoe={info:"status",success:"status",warning:"alert",danger:"alert"};function so({tone:e="info",variant:t="framed",onDismiss:n,role:r,className:o,children:s,...a}){const c=t==="soft";return O.jsxs("div",{role:r??Hoe[e],className:Jt("flex gap-2 px-3 py-2 text-sm",c?Jt("items-start rounded-md",Boe[e]):Jt("items-center border",joe[e]),o),...a,children:[O.jsx("div",{className:"flex-1 min-w-0",children:s}),n&&(c?O.jsx(Qn,{variant:"ghost",size:"sm",icon:O.jsx(D_,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):O.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:O.jsx(D_,{className:"size-4","aria-hidden":"true"})}))]})}function m3({open:e,onClose:t,title:n,children:r,className:o,anchor:s="center"}){const a=_.useRef(null);if(wy({id:"dialog",open:e,answers:{back:t}}),Ey(a,e),!e)return null;const c=s==="left",u=s==="right";return O.jsxs("div",{className:Jt("fixed inset-0 z-50 flex",c?"items-stretch justify-start":u?"items-stretch justify-end":"items-center justify-center px-4"),children:[O.jsx(zoe,{label:"Dismiss dialog",onDismiss:t}),O.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title",tabIndex:-1,className:Jt("relative z-10 overflow-hidden border-line bg-surface shadow-xl",c?"safe-area-frame h-full w-72 max-w-[85vw] border-r":u?"safe-area-frame h-full w-[80vw] max-w-[320px] border-l":"w-full max-w-lg rounded-md border",o),children:[O.jsx("h2",{id:"dialog-title",className:"sr-only",children:n}),r]})]})}function Cz({children:e,label:t}){return O.jsxs("span",{className:"relative inline-flex",children:[e,t!==void 0&&O.jsxs(O.Fragment,{children:[O.jsx("span",{"data-testid":"attention-dot",className:"absolute -right-1 -top-1 size-2 rounded-full bg-accent-2"}),O.jsx("span",{className:"sr-only",children:t})]})]})}function xy({children:e,className:t}){return O.jsx("div",{"data-auth-page":!0,className:Jt("flex min-h-dvh w-full flex-col items-center justify-center overflow-y-auto bg-surface-sunken pb-[max(2rem,env(safe-area-inset-bottom,0px))] pl-[max(1rem,env(safe-area-inset-left,0px))] pr-[max(1rem,env(safe-area-inset-right,0px))] pt-[max(2rem,env(safe-area-inset-top,0px))] text-fg",t),style:{backgroundImage:"radial-gradient(at 20% 0%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%), radial-gradient(at 80% 100%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%)"},children:O.jsx("div",{className:"w-full max-w-[26rem]",children:e})})}const qoe="Secure sign-in powered by AWS Cognito";function sR(e){const t=e?.note??"Secure sign-in";return O.jsx("div",{className:"text-center pt-5",children:O.jsx("p",{className:"text-xs text-fg-muted",children:t})})}const Voe=()=>O.jsxs("svg",{width:"36",height:"36",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"text-accent",children:[O.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),O.jsx("path",{d:"M3 7l9 6 9-6"})]});function _y({wordmark:e="remit,",tagline:t="your email client in the cloud.",mark:n=O.jsx(Voe,{})}){return O.jsxs("div",{className:"text-center pb-6",children:[O.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),O.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:e}),O.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:t})]})}const Woe={default:Jt("flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken px-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors"),inline:"flex items-center gap-2 bg-transparent text-sm"};function jf({icon:e,className:t,variant:n="default",trailing:r,ref:o,...s}){return O.jsxs("div",{className:Jt(Woe[n],t),children:[e&&O.jsx("span",{className:"text-fg-subtle shrink-0",children:e}),O.jsx("input",{ref:o,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...s}),r]})}const Goe={info:"bg-accent-2",success:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function F1({value:e,max:t,tone:n="info",indeterminate:r=!1,className:o}){const s=r?100:t<=0?0:Math.min(100,Math.max(0,e/t*100));return O.jsx("div",{role:"progressbar","aria-valuenow":r?void 0:e,"aria-valuemin":r?void 0:0,"aria-valuemax":r?void 0:t,className:Jt("h-1.5 w-full overflow-hidden rounded-full bg-surface-sunken",o),children:O.jsx("div",{className:Jt("h-full rounded-full transition-[width] duration-300 ease-out",Goe[n],r&&"w-1/3 animate-pulse"),style:r?void 0:{width:`${s}%`}})})}const wz={DmarcFail:"It failed the sender domain's DMARC check.",SignerMismatch:"It was signed by a different domain than its sender.",ReplyToMismatch:"Replies would go to a different domain than the sender's.",LinkTextMismatch:"A link's text shows one domain and opens another.",LinkDomainDistant:"A link leads to a domain unrelated to the sender's.",PunycodeDomain:"A domain in it is written in punycode, which can hide lookalike letters.",MixedScriptDomain:"A domain in it mixes letters from different alphabets.",ConfusableDomains:"Two different domains in it look the same.",SingleOffDomainLink:"Its only link leads away from the sender's domain.",GeneratedName:"The sender's address looks machine-generated.",FirstContactDomain:"The sender's domain has sent you nothing before.",RecentlyRegisteredDomain:"The sender's domain was registered recently.",UnknownRegistrationDate:"The sender's domain has no public registration date.",ClassifierSpam:"Remit's classifier rated it as likely spam.",ClassifierPhishing:"Remit's classifier rated it as likely phishing.",ProviderSpam:"Your provider marked it as spam.",DisplayNameForeignAddress:"The display name spells out an address at another domain.",DisplayNameLookalike:"The display name looks like a different domain's name.",ModelImpersonation:"The model judged that it claims an organisation its sender does not belong to.",ModelSpam:"The model judged it spam.",ModelClean:"The model judged it legitimate.",ListedPhishingLink:"A link in it is on a list of known phishing pages."},Koe=new Set(["ModelImpersonation","ModelSpam","ModelClean"]),Zoe=e=>Koe.has(e.name),Yoe="Remit ran a check this version can't describe.",yze="Remit couldn't check this message",bze="Only the basic checks ran",Qoe=e=>Object.hasOwn(wz,e);function Xoe(e){return Qoe(e)?wz[e]:void 0}function Joe(e){return e.reduce((t,n)=>t&&t.score>=n.score?t:n,void 0)}function Sze(e){const t=Joe(e);return t?Xoe(t.name)??Yoe:""}function Cze(e){if(e.modelOutcome!=="Answered")return;const t=e.reasons.find(Zoe);if(!(!t||t.options.length===0))return t.options.join(" ")}const ese={NotConfigured:"this account has no model set up.",DailyLimit:"this account reached its daily model limit.",RateLimited:"the model provider asked Remit to slow down."};function wze(e){const t=e.modelOutcome;if(!(t==="Answered"||t==="OutOfBand"))return ese[t]}const Eze={Unreachable:"the spam service could not be reached",TimedOut:"the spam service did not answer in time",ServiceError:"the spam service answered with an error",Unparseable:"Remit could not read the spam service's answer"},Ez={RateLimited:"try again in a minute.",DailyCap:"try again tomorrow (daily model limit).",NotSettled:"a move is still settling. Remit will retry it once the move lands.",NotFound:"the message is gone from the server. No retry for this one.",NotPermitted:"the server refused access to this message. No retry for this one."},xze={NeverSpam:"You marked this sender Never in Spam.",Vip:"This sender is a VIP.",WellKnown:"You know this sender well.",Newsletter:"It is a newsletter from a sender you already get mail from."},_ze=e=>`Your filter "${e}" matched it.`,Ize={Spam:"Remit suspects this is spam",Phishing:"Remit suspects this message impersonates someone"},xm=e=>e.toFixed(2),Aze=(e,t)=>t.state==="Set"?`Score ${xm(e)}. Remit warns from ${xm(t.cleanBelow)} and moves to Spam from ${xm(t.spamAt)}.`:`Score ${xm(e)}. The spam service applies its own thresholds.`;function tse(e){const t=[e.nowSpam>0&&`${e.nowSpam} now reach Spam`,e.nowSuspected>0&&`${e.nowSuspected} ${e.nowSuspected===1?"is":"are"} now suspected`,e.noLongerSuspected>0&&`${e.noLongerSuspected} ${e.noLongerSuspected===1?"is":"are"} no longer suspected`].filter(o=>typeof o=="string"),n=e.nowSpam+e.nowSuspected+e.noLongerSuspected,r=e.nowSpam>0?"Nothing moved. Open a message to move it to Spam.":"Nothing moved.";return n===0?`Nothing changed. ${r}`:`${n} changed: ${t.join(", ")}. ${r}`}const $1=e=>t=>{t.key==="Escape"&&(t.stopPropagation(),e())};function z1({children:e,onKeyDown:t}){return O.jsx("section",{"aria-label":"Check again",onKeyDown:t,className:"w-full max-w-md space-y-3 rounded-lg border border-line bg-surface p-4 text-sm shadow-lg",children:e})}function nse(e){const t=_.useRef(null),{state:n}=e;if(_.useEffect(()=>{t.current?.focus()},[n]),e.state==="Running")return O.jsxs(z1,{onKeyDown:$1(e.onStop),children:[O.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.checked} of ${e.total}`}),O.jsx(F1,{value:e.checked,max:e.total}),O.jsx("p",{className:"text-fg-muted",children:"Remit sends ten at a time and waits for each answer. Keep this page open until it finishes."}),O.jsx(Qn,{ref:t,variant:"secondary",size:"md",onClick:e.onStop,children:"Stop"})]});if(e.state==="Done")return O.jsxs(z1,{onKeyDown:$1(e.onDone),children:[O.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.total} of ${e.total}`}),O.jsx(F1,{value:e.total,max:e.total,tone:"success"}),O.jsx("p",{className:"text-fg-muted",children:tse(e.summary)}),O.jsx(Qn,{ref:t,variant:"primary",size:"md",onClick:e.onDone,children:"Done"})]});const r=e.failures.filter(o=>o.retryable).length;return O.jsxs(z1,{onKeyDown:$1(e.onClose),children:[O.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.checked} of ${e.total}. ${e.failures.length} couldn't be checked.`}),O.jsx(F1,{value:e.checked,max:e.total,tone:"warning"}),O.jsx("ul",{className:"list-disc space-y-1 pl-4 text-fg-muted marker:text-fg-subtle",children:e.failures.map(o=>O.jsxs("li",{children:[O.jsx("span",{className:"text-fg",children:o.subject}),":"," ",Ez[o.code]]},o.messageId))}),O.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r>0&&O.jsx(Qn,{ref:t,variant:"primary",size:"md",onClick:e.onRetry,children:`Try again for ${r}`}),O.jsx(Doe,{variant:"ghost",size:"md",href:e.reportIssueHref,external:!0,children:"Report an issue"}),O.jsx(Qn,{ref:r>0?void 0:t,variant:"secondary",size:"md",onClick:e.onClose,children:"Close"})]})]})}const rse={error:{container:"border-danger/50 bg-danger-soft",icon:"text-danger",title:"text-danger"},warning:{container:"border-warning/50 bg-warning-soft",icon:"text-warning",title:"text-warning"},info:{container:"border-accent-2/50 bg-accent-2-soft",icon:"text-accent-2",title:"text-accent-2"}},ose={error:F$,warning:eR,info:xre},sse={error:"Error",warning:"Warning",info:"Information"},ise=({id:e,severity:t,title:n,detail:r,action:o,onDismiss:s})=>{const a=rse[t],c=ose[t];return O.jsxs("div",{role:t==="error"?"alert":"status","aria-live":t==="error"?"assertive":"polite",className:Jt("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",a.container),children:[O.jsx(c,{className:Jt("size-5 shrink-0 mt-0.5",a.icon),"aria-hidden":"true"}),O.jsxs("div",{className:"flex-1 min-w-0",children:[O.jsx("p",{className:Jt("text-sm font-medium",a.title),children:n}),r&&O.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r}),o&&O.jsx("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-block text-xs font-medium text-accent-2 underline underline-offset-2",children:o.label})]}),O.jsx("button",{type:"button",onClick:()=>s(e),className:"shrink-0 rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors","aria-label":`Dismiss ${sse[t].toLowerCase()}`,children:O.jsx(D_,{className:"size-4","aria-hidden":"true"})})]})},ase=({errors:e,onDismiss:t})=>e.length===0?null:O.jsx("section",{"aria-label":"Notifications",className:"pointer-events-none fixed inset-x-0 top-0 z-[60] flex flex-col items-center gap-2 px-4 pt-[calc(1rem+env(safe-area-inset-top,0px))] sm:items-end sm:pr-6",children:O.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:e.map(n=>O.jsx(ise,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,action:n.action,onDismiss:t},n.id))})});function lse({className:e,children:t,...n}){return O.jsx("label",{className:Jt("mb-1 block text-xs font-medium text-fg-muted",e),...n,children:t})}const cse="Matches on what the messages say about themselves — sender, subject, list. No reading involved.",use={From:"From",Subject:"Subject",HasWords:"Has the words",ListId:"List",FromDomain:"Domain"};function dse(e){return use[e]}const fse={ListId:"The mailing list's List-Id header, matched exactly. New mail is matched as it arrives — mail delivered before this was set up may not carry it yet.",FromDomain:"The sender's registrable domain — matches anyone at it, subdomains included (a look-alike like example.com.evil.test never matches)."};function Rze(e){return fse[e]}function hse(e){return e==="HasWords"}function xz(e){return e.clauses.length>0}function _z(e){return e.clauses.filter(t=>hse(t.field))}const Tze=["From","Subject","HasWords","ListId","FromDomain"],pse={all:"Match all",any:"Match any"};function Oze(e){return pse[e]}function mse(e){return e==="all"?"and":"or"}function Mze(e){if(e.status==="loading")return"Counting matches…";if(e.status==="error")return e.reason;if(e.count===0)return"No mail matches yet";const t=e.count===1?"message":"messages",n=`${e.count} ${t} match`;return e.stale?`${n} — recounting`:n}const gse={once:"Just once",standing:"Keep doing this",until:"Until a date"};function Pze(e){return gse[e]}function Nze(e){return e==="once"?"Apply now":e==="standing"?"Save rule":"Save until then"}const ro={noMatch:"Add a clause so the rule has something to match.",bodyTextOnce:"Applying once can't read message bodies. Save this as a rule instead, or drop the “has the words” clause.",noAction:"Pick a folder to move into, or a label to apply.",unnamed:"Name this rule so you can find it later.",noUntilDate:"Pick the date this rule should stop on.",counting:"Counting matches — save once the count settles.",recounting:"Recounting matches — save once the count settles."},kze="Can't count matches — “has the words” reads message bodies, which only a saved rule does.";function Iz(e){if(e.status==="loading")return ro.counting;if(e.status==="ready"&&e.stale)return ro.recounting}function Dze(e,t){return xz(e)?e.scope==="once"&&_z(e).length>0?ro.bodyTextOnce:!e.moveMailboxId&&!e.labelId?ro.noAction:(e.scope==="standing"||e.scope==="until")&&(e.name??"").trim()===""?ro.unnamed:e.scope==="until"&&!e.until?ro.noUntilDate:Iz(t):ro.noMatch}const iR=(e,t)=>t.length===0?[e]:e.split(t),vse=(e,t)=>{const n=iR(e,t);return n[n.length-1]||e},Bf=(e,t)=>{if(t.length===0)return"";const n=e.lastIndexOf(t);return n===-1?"":e.slice(0,n)},Az=(e,t)=>iR(e,t).length-1,Hf=(e,t)=>{const n=[];let r=e,o=Bf(r,t);for(;o&&o.length<r.length;)n.push(o),r=o,o=Bf(r,t);return n},yse=(e,t)=>{const n=new Set(e.map(a=>a.path)),r=new Set,o=[],s=a=>{if(!r.has(a.path)){r.add(a.path),o.push(a);for(const c of e)Bf(c.path,t)===a.path&&s(c)}};for(const a of e){const c=Bf(a.path,t);c&&n.has(c)||s(a)}return o},Rz=(e,t)=>e.label.toLowerCase().includes(t)||e.path.toLowerCase().includes(t),bse=(e,t,n)=>{const r=new Set;if(!t)return r;for(const o of e)if(Rz(o,t))for(const s of Hf(o.path,n))r.add(s);return r},Sse=(e,t,n,r=new Set)=>{const o=(c,u)=>({folder:c,depth:Az(c.path,n),context:u,expanded:r.has(c.path)});if(!t)return e.map(c=>o(c,!1));const s=new Set;for(const c of e)Rz(c,t)&&s.add(c.path);const a=new Set(s);for(const c of s)for(const u of Hf(c,n))a.add(u);return e.filter(c=>a.has(c.path)).map(c=>o(c,!s.has(c.path)))},Cse=(e,t,n)=>{const r=new Set(e.map(o=>o.path));return e.filter(o=>Hf(o.path,n).every(s=>!r.has(s)||t.has(s))).map(o=>({folder:o,depth:Az(o.path,n),context:!1,expanded:t.has(o.path)}))},wse=(e,t)=>{if(t.length===0)return e.map((s,a)=>({kind:"folder",row:s,index:a}));const n=[],r=[],o=s=>{for(;r.length>0;){const a=r[r.length-1];if(!a||s?.startsWith(`${a.folder.path}${t}`))break;r.pop(),n.push({kind:"create",parent:a.folder,depth:a.depth+1})}};return e.forEach((s,a)=>{o(s.folder.path),n.push({kind:"folder",row:s,index:a}),s.expanded&&r.push(s)}),o(null),n},Ese=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError",Ho=e=>e!==void 0&&!e.context,j1=e=>e!==void 0&&!e.folder.isCurrent&&!e.context,B1=e=>{for(let t=0;t<e.length;t+=1)if(Ho(e[t]))return t;return-1},xse=e=>{for(let t=e.length-1;t>=0;t-=1)if(Ho(e[t]))return t;return-1},g3=(e,t,n)=>{const r=e.length;if(r<=0)return-1;const o=t<0?n===1?-1:r:t;for(let s=1;s<=r;s+=1){const a=((o+n*s)%r+r)%r;if(Ho(e[a]))return a}return-1},_se=(e,t,n)=>{const r=e[t];if(!r)return-1;const o=Bf(r.folder.path,n);if(!o)return-1;for(let s=t-1;s>=0;s-=1)if(e[s]?.folder.path===o)return Ho(e[s])?s:-1;return-1},F_="flex min-h-11 min-w-0 flex-1 items-center gap-2 px-3 py-2.5 text-left text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",Tz=14,Ise=60,$_=({depth:e})=>e>0?O.jsx("span",{"aria-hidden":"true",className:"shrink-0",style:{width:e*Tz}}):null,z_=({depth:e})=>O.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-0 bottom-0 h-px bg-line",style:{left:Ise+e*Tz}}),Ase=({label:e,depth:t,expanded:n,ariaLabel:r,selected:o=!1,context:s=!1,current:a=!1,currentTag:c,messageCount:u,failure:f,separated:h=!1,actions:m,tabIndex:g,onActivate:v,onFocus:C,ref:b})=>{const E=O.jsx(gre,{className:Jt("size-4 shrink-0 text-fg-subtle transition-transform",n&&"rotate-90"),"aria-hidden":"true"}),x=O.jsx(Sre,{className:"size-4 shrink-0 text-fg-subtle","aria-hidden":"true"}),I=u===void 0?null:O.jsxs("span",{"aria-hidden":"true",className:"shrink-0 text-2xs text-fg-subtle",children:[u," ",u===1?"msg":"msgs"]}),R=O.jsxs("span",{className:"min-w-0 flex-1",children:[O.jsx("span",{className:"block truncate",children:e}),f&&O.jsxs("span",{className:"flex items-center gap-1 text-2xs text-danger",children:[O.jsx(F$,{className:"size-3 shrink-0","aria-hidden":"true"}),O.jsx("span",{className:"truncate",children:f})]})]}),M=f?`${r} — ${f}`:r;return s?O.jsxs("div",{className:"relative flex items-center",children:[O.jsxs("div",{role:"treeitem","aria-level":t+1,"aria-selected":!1,"aria-expanded":n,"aria-label":M,className:Jt(F_,"opacity-60"),children:[O.jsx($_,{depth:t}),E,x,R,I]}),m,h&&O.jsx(z_,{depth:t})]}):O.jsxs("div",{className:"relative flex items-center",children:[O.jsxs("button",{ref:b,type:"button",role:"treeitem","aria-level":t+1,"aria-selected":o,"aria-expanded":n,"aria-current":a?"true":void 0,"aria-label":M,tabIndex:g,onClick:v,onFocus:C,className:Jt(F_,"hover:bg-surface-raised active:bg-surface-sunken",a&&"text-fg-muted"),children:[O.jsx($_,{depth:t}),E,x,R,I,a&&c&&O.jsx("span",{className:"shrink-0 text-xs text-fg-muted",children:c}),o&&O.jsx(D$,{className:"size-4 shrink-0 text-accent","aria-hidden":"true"})]}),m,h&&O.jsx(z_,{depth:t})]})},v3=({label:e,ariaLabel:t,depth:n=0,prominence:r="prominent",separated:o=!1,onOpen:s})=>O.jsxs("div",{className:Jt("relative",r==="prominent"&&"p-2"),children:[O.jsxs("button",{type:"button",onClick:s,"aria-label":t,"data-prominence":r,className:Jt(F_,"w-full active:bg-surface-sunken",r==="prominent"?"rounded-lg border border-line-strong border-dashed font-medium text-fg-muted hover:border-accent-2 hover:text-accent-2":"text-fg-subtle hover:bg-surface-raised hover:text-fg-muted"),children:[O.jsx($_,{depth:n}),O.jsx("span",{"aria-hidden":"true",className:"size-4 shrink-0"}),O.jsx(Cre,{className:"size-4 shrink-0","aria-hidden":"true"}),O.jsx("span",{className:"min-w-0 flex-1 truncate",children:e})]}),o&&O.jsx(z_,{depth:n})]}),Oz={nameLabel:"Folder name",namePlaceholder:"Hotels",insideLabel:"Inside",create:"Create folder",cancel:"Cancel",createPending:"Creating folder…"},Rse=({parentLabel:e,name:t,onNameChange:n,onSubmit:r,onCancel:o,pending:s=!1,error:a,labels:c})=>{const u={...Oz,...c},f=_.useId(),h=_.useRef(null),m=_.useRef(null);return _.useEffect(()=>{h.current?.focus({preventScroll:!0}),m.current?.scrollIntoView({block:"nearest"})},[]),O.jsxs("div",{ref:m,className:"space-y-3 border-y border-line bg-surface-sunken px-3 py-3",children:[O.jsxs("div",{children:[O.jsx(lse,{htmlFor:f,children:u.nameLabel}),O.jsx(jf,{id:f,ref:h,value:t,placeholder:u.namePlaceholder,onChange:g=>n(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),r()),g.key==="Escape"&&(g.preventDefault(),o())}})]}),O.jsxs("p",{className:"text-xs text-fg-muted",children:[u.insideLabel," ",O.jsx("span",{className:"font-medium text-fg",children:e})]}),a&&O.jsx("p",{className:"text-xs text-danger",role:"alert",children:a}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Qn,{variant:"ghost",size:"md",onClick:o,className:"min-h-11 shrink-0",children:u.cancel}),O.jsx(Qn,{variant:"secondary",size:"md",onClick:r,disabled:s,className:"min-h-11 shrink-0",children:s?u.createPending:u.create})]})]})},Tse={...Oz,filterPlaceholder:"Filter folders…",filterAriaLabel:"Filter folders",treeAriaLabel:"Destination folders",currentSuffix:"(current folder)",currentTag:"current",contextSuffix:"(containing folder)",emptyMessage:e=>`No folders match "${e}"`,noFolders:"No folders to show",optionLabel:e=>`Move to ${e.label}`,newFolder:"New folder",newSubfolder:e=>`New folder inside ${e}`,topLevel:"Top level",nameRequired:"Give the folder a name.",createError:"Couldn't create that folder. Please try again."},Ose=({folders:e,selectedId:t,onSelect:n,rowActions:r,rowFailure:o,onCreateFolder:s,onCancel:a,delimiter:c="/",labels:u,autoFocusFilter:f=!1})=>{const h={...Tse,...u},[m,g]=_.useState(""),[v,C]=_.useState(()=>{const le=e.find(Re=>Re.id===t);return new Set(le?Hf(le.path,c):[])}),[b,E]=_.useState(null),[x,I]=_.useState(""),[R,M]=_.useState(),[D,N]=_.useState(!1),[T,L]=_.useState(-1),$=_.useRef([]),G=_.useRef(null),z=_.useRef(!1),F=_.useRef(null);_.useEffect(()=>()=>F.current?.abort(),[]),_.useEffect(()=>{f&&G.current?.focus()},[f]);const q=m.trim().toLowerCase(),X=_.useMemo(()=>yse(e,c),[e,c]),Se=_.useMemo(()=>{const le=bse(X,q,c);return le.size===0?v:new Set([...v,...le])},[X,v,q,c]),V=_.useMemo(()=>q?Sse(X,q,c,Se):Cse(X,Se,c),[X,q,c,Se]),ee=_.useMemo(()=>s?wse(V,c):void 0,[V,c,s]);_.useEffect(()=>{L(le=>Ho(V[le])?le:B1(V))},[V]),_.useEffect(()=>{z.current&&(z.current=!1,!(T<0)&&$.current[T]?.focus())},[T]);const pe=_.useCallback((le,Re)=>{C(rt=>{if(Re)return new Set([...Hf(le,c),le]);const xe=new Set(rt);return xe.delete(le),xe})},[c]),ge=_.useCallback(le=>{j1(le)&&n?.(le.folder.id),pe(le.folder.path,!le.expanded)},[n,pe]),Te=_.useCallback(()=>{F.current?.abort(),E(null),I(""),M(void 0),N(!1)},[]),j=_.useCallback(le=>{F.current?.abort(),E({anchorId:le?.id??null,parentPath:le?.path??"",parentLabel:le?.label??h.topLevel}),I(""),M(void 0),N(!1)},[h.topLevel]),te=_.useCallback(()=>{if(!s||!b||D)return;const le=x.trim();if(le===""){M(h.nameRequired);return}N(!0),M(void 0),F.current?.abort();const Re=new AbortController;F.current=Re;const rt=b.parentPath;s(le,rt,Re.signal).then(xe=>{N(!1),E(null),I(""),rt&&pe(rt,!0),n?.(xe.id)}).catch(xe=>{Ese(xe)||(M(xe instanceof Error?xe.message:h.createError),N(!1))})},[s,b,D,x,n,pe,h.nameRequired,h.createError]),fe=_.useCallback(le=>{const Re=le.target;if(!(Re instanceof Element)||!Re.closest('[role="treeitem"]'))return;const rt=xt=>{le.preventDefault(),z.current=!0,L(xt)},xe=V[T];switch(le.key){case"ArrowDown":return rt(g3(V,T,1));case"ArrowUp":return rt(g3(V,T,-1));case"Home":return rt(B1(V));case"End":return rt(xse(V));case"ArrowRight":{if(!Ho(xe)||!xe)return;if(le.preventDefault(),!xe.expanded){pe(xe.folder.path,!0);return}const xt=T+1;Ho(V[xt])&&rt(xt);return}case"ArrowLeft":{if(!Ho(xe)||!xe)return;if(le.preventDefault(),xe.expanded){pe(xe.folder.path,!1);return}const xt=_se(V,T,c);xt>=0&&rt(xt);return}case"Enter":case" ":{if(!Ho(xe)||!xe)return;le.preventDefault(),ge(xe);return}case"Escape":le.preventDefault(),a?.();return;default:return}},[V,T,c,ge,pe,a]),ae=b!==null&&b.anchorId!==null&&(ee?.some(le=>le.kind==="create"&&le.parent.id===b.anchorId)??!1),be=b&&O.jsx(Rse,{parentLabel:b.parentLabel,name:x,onNameChange:le=>{I(le),M(void 0)},onSubmit:te,onCancel:Te,pending:D,error:R,labels:h}),Fe=le=>le.context?`${le.folder.label} ${h.contextSuffix}`:j1(le)?h.optionLabel(le.folder):`${le.folder.label} ${h.currentSuffix}`,ke=(le,Re,rt)=>{const{folder:xe,depth:xt}=le,_t=j1(le);return O.jsx(Ase,{ref:ot=>{$.current[Re]=ot},label:xe.label,depth:xt,expanded:le.expanded,context:le.context,current:xe.isCurrent,currentTag:h.currentTag,messageCount:xe.messageCount,selected:_t&&xe.id===t,separated:rt,failure:o?.(xe),actions:r?.(xe),ariaLabel:Fe(le),tabIndex:Re===T?0:-1,onActivate:()=>ge(le),onFocus:()=>L(Re)})};return O.jsxs("div",{className:"flex min-h-0 w-full min-w-0 flex-col",children:[O.jsx(jf,{ref:G,variant:"inline",className:"border-b border-line px-3 py-2",icon:O.jsx(Are,{className:"size-4","aria-hidden":"true"}),type:"search",value:m,onChange:le=>g(le.target.value),onKeyDown:le=>{if(le.key==="Escape"){le.preventDefault(),a?.();return}if(le.key!=="ArrowDown")return;le.preventDefault();const Re=Ho(V[T])?T:B1(V);Re<0||(z.current=!0,L(Re),$.current[Re]?.focus())},placeholder:h.filterPlaceholder,"aria-label":h.filterAriaLabel}),s&&O.jsx("div",{className:"shrink-0 border-b border-line","data-create-anchor":"top",children:b&&!ae?be:O.jsx(v3,{label:h.newFolder,ariaLabel:h.newFolder,prominence:"prominent",onOpen:()=>j(null)})}),V.length===0?O.jsx("p",{className:"px-3 py-3 text-sm text-fg-muted","aria-live":"polite",children:e.length===0?h.noFolders:h.emptyMessage(m)}):O.jsx("div",{role:"tree","aria-label":h.treeAriaLabel,className:"min-h-0 flex-1 overflow-y-auto overflow-x-hidden pb-24",onKeyDown:fe,children:(ee??V.map((le,Re)=>({kind:"folder",row:le,index:Re}))).map((le,Re,rt)=>{const xe=Re<rt.length-1;return le.kind==="create"?O.jsx("div",{role:"none","data-create-anchor":le.parent.id,children:b?.anchorId===le.parent.id?be:O.jsx(v3,{label:h.newFolder,ariaLabel:h.newSubfolder(le.parent.label),depth:le.depth,prominence:"quiet",separated:xe,onOpen:()=>j(le.parent)})},`new:${le.parent.id}`):O.jsx("div",{role:"none",children:ke(le.row,le.index,xe)},le.row.folder.id)})})]})},Mse={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Spam",trash:"Trash",flagged:"Starred",all:"All Mail"};function Pse(e){return Mse[e]}const Nse=new Set(["all","flagged"]);function kse(e){return Nse.has(e)}const Dse=new Set(["[Gmail]","[Google Mail]"]);function Lse(e){if(e.role)return kse(e.role)?void 0:Pse(e.role);if(!e.providerPath)return;const t=iR(e.providerPath,e.hierarchyDelimiter);if(!Dse.has(t[0]))return vse(e.providerPath,e.hierarchyDelimiter)}function Lze(e){return e==="inbox"?O.jsx(G$,{className:"size-4"}):e==="drafts"?O.jsx(bre,{className:"size-4"}):e==="sent"?O.jsx(Rre,{className:"size-4"}):e==="archive"?O.jsx(pre,{className:"size-4"}):e==="junk"?O.jsx(JA,{className:"size-4"}):e==="trash"?O.jsx(Nre,{className:"size-4"}):e==="flagged"?O.jsx(Mre,{className:"size-4"}):O.jsx(_re,{className:"size-4"})}const Use={Inbox:"Inbox",Drafts:"Drafts",Sent:"Sent",Archive:"Archive",Junk:"Junk",Trash:"Trash",All:"All",Flagged:"Flagged"},Uze={Body:"Body"},Fze={Mail:"Mail",Calendar:"Calendar"},yc={Appointed:"Appointed",Flagged:"Flagged",Reserved:"Reserved",Proposed:"Proposed",Stale:"Stale",None:"None"},Va={SignInDisabled:"sign_in_disabled",CallerDisabled:"caller_disabled",ForeignOrigin:"foreign_origin",StepUpRequired:"step_up_required",WrongPassword:"wrong_password",StepUpLocked:"step_up_locked",CannotDisableSelf:"cannot_disable_self"},y3={synced:"synced",failed:"failed"},$ze={Saved:"Saved",Deployment:"Deployment",Default:"Default"},zze={NoBaseUrl:"NoBaseUrl",NoApiKey:"NoApiKey"},jze={uncategorized:"uncategorized",personal:"personal",newsletter:"newsletter",marketing:"marketing",automated:"automated",transactional:"transactional",social:"social",coldOutreach:"coldOutreach"},Bze={abandoned:"abandoned"},Hze={none:"none",move:"move",delete:"delete"},qze={MoveToInbox:"MoveToInbox",MoveToJunk:"MoveToJunk"},Vze={Confident:"Confident",Unsure:"Unsure"},Wze={Attachment:"attachment"},Gze={None:"None"},Kze={Retrying:"Retrying",GaveUp:"GaveUp"};function Mz(e){const[t,n]=_.useState(!1),r=t?yre:vre,o=t?"Hide password":"Show password";return O.jsx(jf,{...e,type:t?"text":"password",trailing:O.jsx("button",{type:"button","aria-label":o,"aria-pressed":t,title:o,onClick:()=>n(s=>!s),className:"-my-1 -mr-2 flex size-11 shrink-0 cursor-pointer items-center justify-center rounded-md text-fg-subtle transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:O.jsx(r,{className:"size-4","aria-hidden":!0})})})}const Fse=e=>e===1?"message":"messages",lv=e=>`${e.toLocaleString()} ${Fse(e)}`,H1=(e,t)=>e.kind==="delete"?`delete ${lv(e.count)}`:t===void 0?"empty it":`empty ${lv(t)}`,Pz=e=>e.kind==="delete"?"Nothing has been deleted.":"Nothing has been emptied.",$se=(e,t,n={})=>{const{trashFolderLabel:r,staleFolderLabel:o,selectedCount:s}=n,a=Pz(t);if(e==="none")return{title:"No folder is set as Trash",description:`${a} reader files deleted mail in the folder you set as Trash, and this account has none.`,pickerPrompt:"Which folder does this account use for deleted mail?",confirmLabel:`Set as Trash and ${H1(t,void 0)}`,cancelLabel:"Cancel"};if(e==="stale")return{title:"The Trash folder you chose is gone",description:o?`${a} You set ${o} as this account's Trash and it is no longer on the mail server — another mail app may have renamed or removed it.`:`${a} The folder you set as this account's Trash is no longer on the mail server — another mail app may have renamed or removed it.`,pickerPrompt:"Which folder should reader use instead?",confirmLabel:`Set as Trash and ${H1(t,void 0)}`,cancelLabel:"Cancel"};const c=t.kind==="delete"?`Deleting ${lv(t.count)} there erases them from the mail server, and that cannot be restored.`:"Emptying a folder erases everything in it from the mail server, and that cannot be restored.";return{title:"Confirm this account's Trash folder",description:r?`${a} reader files this account's deleted mail in ${r} because of its name — you never chose it, and the mail server doesn't mark it as Trash. ${c}`:`${a} reader files this account's deleted mail in a folder it matched by name — you never chose it, and the mail server doesn't mark it as Trash. ${c}`,pickerPrompt:r?`Confirm ${r}, or pick the folder this account really uses.`:"Pick the folder this account really uses for deleted mail.",confirmLabel:`Set as Trash and ${H1(t,s)}`,cancelLabel:"Cancel"}},zse=(e,t,n,r)=>e.kind==="appointing"?{headline:"Setting the Trash folder…",status:n}:t.kind==="delete"?{headline:`Deleting ${lv(t.count)}…`,status:r?`Erasing them from ${n}. This can't be undone.`:`Moving them to ${n}`}:{headline:`Emptying ${n}…`,status:"This can't be undone."},jse=(e,t,n,r)=>e==="unconfirmed"&&t.kind==="delete"&&n!==void 0&&r===n,Bse=(e,t,n)=>e==="mailbox-pending"?`${n} is still being created on the mail server. Wait for it to finish, then try again.`:`Couldn't set that folder as Trash. ${Pz(t)} Please try again.`,Hse=({open:e,reason:t,action:n,folders:r,delimiter:o,trashFolderLabel:s,guessedMailboxId:a,staleFolderLabel:c,accountEmail:u,phase:f,selectedId:h,onSelect:m,onCreateFolder:g,onConfirm:v,onCancel:C})=>{const b=_.useRef(null),E=f.kind==="appointing"||f.kind==="acting";_.useEffect(()=>{E&&b.current?.focus()},[E]);const x=r.find(D=>D.id===h),I=$se(t,n,{trashFolderLabel:s,staleFolderLabel:c,selectedCount:x?.messageCount}),R=jse(t,n,a,h),M=n.kind==="emptyTrash"||R;if(!e)return null;if(E){const D=zse(f,n,x?.label??"",R);return O.jsx(m3,{open:e,onClose:()=>{},title:I.title,children:O.jsxs("div",{ref:b,"data-escape-owner":!0,tabIndex:-1,className:"flex flex-col items-center gap-3 px-5 py-10 text-center outline-none",children:[O.jsx(Y$,{className:"size-8 animate-spin text-accent-2"}),O.jsx("p",{className:"text-sm font-medium text-fg",children:D.headline}),O.jsx("p",{className:"text-xs text-fg-muted",role:"status","aria-live":"polite",children:D.status})]})})}return O.jsxs(m3,{open:e,onClose:C,title:I.title,children:[O.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[O.jsx(eR,{className:`size-4 shrink-0 ${M?"text-danger":"text-warning"}`}),O.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:I.title})]}),O.jsxs("div",{className:"flex max-h-[70vh] flex-col",children:[O.jsxs("div",{className:"space-y-1 px-5 py-4",children:[O.jsx("p",{className:"text-sm text-fg-muted",children:I.description}),u&&O.jsx("p",{className:"text-xs text-fg-subtle",children:u})]}),f.kind==="appoint-failed"&&O.jsx("div",{className:"px-5 pb-3",children:O.jsx(so,{tone:"danger",variant:"soft",children:Bse(f.cause,n,x?.label??"That folder")})}),O.jsx("p",{className:"px-5 pb-2 text-sm text-fg-muted",children:I.pickerPrompt}),O.jsx("div",{className:"flex h-[26rem] min-h-0 flex-1 overflow-hidden",children:O.jsx(Ose,{folders:r,selectedId:h,delimiter:o,onSelect:m,onCreateFolder:t==="none"?g:void 0,onCancel:C,labels:{treeAriaLabel:"Folders on this account",optionLabel:D=>`Set ${D.label}${D.messageCount===void 0?"":`, ${D.messageCount} messages`}, as Trash`}})})]}),O.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[O.jsx(Qn,{variant:"secondary",size:"sm",onClick:C,children:I.cancelLabel}),x&&O.jsx(Qn,{variant:M?"danger":"primary",size:"sm",onClick:()=>v(x.id),children:O.jsx("span",{className:"truncate",children:I.confirmLabel})})]})]})},qse={delete:{label:"Delete",present:"Deleting",past:"Deleted",destructive:!0},move:{label:"Move",present:"Moving",past:"Moved",destructive:!1},junk:{label:"Junk",present:"Marking as junk",past:"Marked as junk",destructive:!0},markRead:{label:"Mark read",present:"Marking read",past:"Marked read",destructive:!1},organize:{label:"Organize",present:"Organizing",past:"Organized",destructive:!1}},Vse=e=>qse[e],Wse={match:"Apply to",properties:"Properties",folder:"Folder",rule:"Rule",name:"Name",review:"Review",run:"Run"},Zze=e=>Wse[e],Yze=({verb:e,mode:t,scope:n,fromSearch:r})=>{const o=r?["properties"]:t==="properties"?["match","properties"]:["match"];return e==="move"?[...o,"folder","review","run"]:e==="organize"?n==="standing"||n==="until"?[...o,"folder","rule","name","review","run"]:[...o,"folder","rule","review","run"]:[...o,"review","run"]},Nz=(e,t)=>Math.max(0,e.indexOf(t)),Qze=(e,t)=>Nz(e,t)===0||t==="run",kz=(e,t)=>({clauses:[...e.clauses],matchOperator:e.matchOperator,moveMailboxId:e.moveMailboxId,scope:t,until:e.until,name:e.name}),Gse=e=>_z(kz(e,e.scope??"once")),b3=e=>{if(!(e.scope!=="standing"&&e.scope!=="until")&&!xz(kz(e,e.scope)))return ro.noMatch},Kse="A rule only works within one account — clear the selection, or pick messages from a single account.",Zse="A destination only works within one account — clear the selection, or pick messages from a single account.",Xze="Matching beyond the messages you picked only works within one account — clear the selection, or pick messages from a single account.",Yse="A rule only works within one folder — clear the selection, or pick messages from a single folder.",Qse="A destination only works within one folder — clear the selection, or pick messages from a single folder.",Xse={spansAccounts:{rule:Kse,destination:Zse},spansFolders:{rule:Yse,destination:Qse}},Jse="A match this wide applies once — use “Make this a filter” above the results to keep doing it.",Jze=(e,t)=>e==="escalated"?Jse:t.rule,e9e=(e,t)=>{const n=e===void 0?"spansAccounts":t;if(!n)return{accountId:e};const r=Xse[n];return{accountId:n==="spansAccounts"?void 0:e,rule:r.rule,destination:r.destination}},t9e=e=>e===void 0?["selected"]:["selected","properties"],eie="This matches no messages, so there is nothing to do. Go back and change what it applies to.",tie="Fill in every property, or take the empty one off.",nie="Pick a destination first.",rie="Choose one of the three first.",n9e=(e,t,n)=>{if(e==="properties")return t.clauses.length===0?ro.noMatch:t.clauses.some(r=>r.value.trim()==="")?tie:void 0;if(e==="folder")return t.moveMailboxId?void 0:nie;if(e==="rule"){if(!t.scope)return rie;const r=b3(t);return r||(t.scope==="once"&&Gse(t).length>0?ro.bodyTextOnce:t.scope==="until"&&!t.until?.trim()?ro.noUntilDate:void 0)}if(e==="name"&&!t.name?.trim())return ro.unnamed;if(e==="review"){const r=b3(t);return r||(n.status==="uncounted"?void 0:n.status==="ready"&&n.count===0&&!n.stale?eie:Iz(n))}},r9e="Nothing matches this yet. Widen a property, or match on a different one.",o9e=({state:e,verb:t,scope:n,matched:r,applied:o,failed:s,failureReason:a})=>{const{label:c,present:u,past:f}=Vse(t),h=f.toLowerCase(),m=n==="standing"||n==="until",v={screenTitle:e==="saving"||e==="backApplyRunning"||e==="statusUnknown"||e==="commitFailed"?c:"Done",showProgress:e==="backApplyRunning"||e==="backApplyComplete"||e==="backApplyFailed"||e==="backApplyRestartFailed"||e==="statusUnknown"||e==="runStopped",failureListLabel:`Not ${h}`};return e==="saving"?{...v,title:m?"Saving rule…":"Applying…",detail:"Nothing has been changed yet.",tone:"progress",dismissLabel:"Close"}:e==="backApplyRunning"?{...v,title:m?"Rule saved. Moving the mail already in your mailbox…":`${u} ${r} messages…`,detail:"This keeps running if you close the wizard.",tone:"progress",dismissLabel:"Close",cancelLabel:"Stop the run"}:e==="statusUnknown"?{...v,title:m?"Rule saved. Its progress over your existing mail is unknown":`${u} — progress unknown`,detail:m?"The connection dropped, so the bar shows the last that was read. The pass runs on the mail server, and the rule keeps working on new mail either way. This keeps checking.":"The connection dropped, so the bar shows the last that was read. The run is on the mail server and carries on either way. This keeps checking.",tone:"warning",dismissLabel:"Close",retryLabel:"Check again"}:e==="backApplyComplete"?{...v,title:m?"Rule saved and applied":`${f} ${o}`,detail:m?`${o} of ${r} already in your mailbox ${h}. New mail follows the rule as it arrives.`:`Every message the match reached was ${h}. Your mail server is still catching up, so the list can lag behind.`,tone:"success",dismissLabel:"Done"}:e==="backApplyFailed"?{...v,title:m?"Rule saved — some mail stayed put":`Not everything was ${h}`,detail:`${o} of ${r} ${h} · the mail server rejected ${s}.${m?" The rule itself is saved and keeps working on new mail.":""}`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${s}`}:e==="runStopped"?{...v,title:`Stopped after ${o}`,detail:`${o} of ${r} ${h}. The rest were not sent, apart from the ones already on their way when you stopped — those may still have gone through.`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${s}`}:e==="backApplyRestartFailed"?{...v,title:m?"Rule saved — the retry didn't start":"The retry didn't start",detail:`${o} of ${r} ${h} · the mail server rejected ${s}, which are still where they were.${m?" The rule itself is saved and keeps working on new mail.":""} Check your connection and try again.`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${s}`}:e==="backApplyStartFailed"?{...v,title:"Rule saved",detail:"New mail follows it automatically. The pass over the mail already in your mailbox never started.",tone:"warning",dismissLabel:"Not now",retryLabel:"Run it over existing mail"}:e==="filterSaved"?{...v,title:"Filter saved",detail:"There is no mail in your mailbox to apply it to yet. New mail follows it as it arrives. You can see it, and when it expires, under Settings › Filters.",tone:"success",dismissLabel:"Done"}:{...v,title:m?"Couldn't save the rule":`Couldn't start ${c.toLowerCase()}`,detail:a??"Nothing has changed.",tone:"danger",dismissLabel:a===void 0?"Not now":"Close",retryLabel:a===void 0?"Try again":void 0}},oie=e=>`${dse(e.field)} "${e.value}"`,Dz=(e,t)=>e.map(oie).join(` ${mse(t)} `),sie=(e,t)=>e==="selected"?`These ${t} messages`:"Its properties",s9e=e=>e==="selected"?"Only the messages ticked in the list.":cse,iie=e=>`Every message ${e}`,Lz="the list is showing",i9e="This reaches every match on the mail server, including the ones the list has not loaded. The search is already the match, so there is nothing to widen.",a9e="This covers messages not shown in the list, and anything else matching by the time it runs.",l9e=({mode:e,selectedCount:t,clauses:n,matchOperator:r,escalatedScope:o})=>e==="escalated"?iie(o??Lz):e==="properties"?Dz(n,r):sie(e,t),c9e=({mode:e,selectedCount:t,clauses:n,matchOperator:r,escalatedScope:o,escalatedCount:s})=>{if(e==="selected")return`${t} messages`;if(e==="escalated"){const a=o??Lz;return s===void 0?`every message ${a}`:`all ${s.toLocaleString()} messages ${a}`}return n.length===0?"every message":`every message where ${Dz(n,r)}`},aie={preparing:"Getting the new version ready",restarting:"Restarting Remit",reconnecting:"Waiting for Remit to answer again"};function S3(e){return aie[e]}function lie(e){return e<90?"This usually takes about a minute.":e<240?"Longer than usual. Remit is still trying to reach the server.":"Still no answer. Remit keeps trying."}function u9e(e,t=Date.now()){const n=Math.floor((t-e)/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function d9e(e){return new Date(e).toLocaleDateString(void 0,{dateStyle:"medium"})}const C3=["preparing","restarting","reconnecting"],Uz="fixed inset-0 z-50 flex flex-col items-center justify-center gap-6 bg-canvas p-6 text-center outline-none";function cie({target:e,phase:t,elapsedSeconds:n}){const r=_.useRef(null);Ey(r,!0),wy({id:"self-update",open:!0});const o=C3.indexOf(t);return O.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"self-update-progress-title",tabIndex:-1,className:Uz,children:[O.jsxs("div",{className:"max-w-md space-y-2",children:[O.jsxs("h1",{id:"self-update-progress-title",className:"text-lg font-semibold text-fg",children:["Installing Remit ",e]}),O.jsx("p",{className:"text-sm text-fg-muted",children:"Remit is restarting, so this page has no server to talk to for a moment. Leave this open — it reconnects on its own."})]}),O.jsx("ol",{className:"w-full max-w-sm space-y-2 text-left",children:C3.map((s,a)=>{const c=a<o,u=a===o;return O.jsxs("li",{className:Jt("flex items-center gap-3 rounded-sm border px-row-inset py-2 text-sm",u?"border-line-strong bg-surface text-fg":"border-line bg-surface-sunken text-fg-subtle"),children:[c?O.jsx(D$,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}):u?O.jsx(Y$,{className:"size-4 shrink-0 animate-spin text-accent-2","aria-hidden":!0}):O.jsx("span",{className:"size-4 shrink-0 rounded-full border border-line-strong"}),S3(s)]},s)})}),O.jsxs("p",{"aria-live":"polite",className:"max-w-md text-xs text-fg-subtle",children:[O.jsx("span",{className:"sr-only",children:`${S3(t)}. `}),lie(n)]})]})}function uie({attemptedVersion:e,previousVersion:t,elapsedSeconds:n,logsCommand:r,onRetryConnection:o}){const s=_.useRef(null);Ey(s,!0);const a=Math.max(1,Math.round(n/60));return O.jsxs("div",{ref:s,role:"alertdialog","aria-modal":"true","aria-labelledby":"self-update-unreachable-title",tabIndex:-1,className:Uz,children:[O.jsx(JA,{className:"size-12 shrink-0 text-danger","aria-hidden":!0}),O.jsxs("div",{className:"max-w-lg space-y-3",children:[O.jsx("h1",{id:"self-update-unreachable-title",className:"text-lg font-semibold text-fg",children:"Remit has not answered since the restart"}),O.jsxs("p",{className:"text-sm text-fg-muted",children:["Installing ",e," started ",a," minute",a===1?"":"s"," ago and the server has been silent since. Your mail is safe at your provider — it was never part of the update."]}),O.jsxs("p",{className:"text-sm text-fg-muted",children:["Remit rolls back to ",t," on its own when the new version fails to start, but this page cannot confirm that from here. Check the server directly:"]}),O.jsx("code",{className:"block rounded-xs bg-surface-sunken px-3 py-2 text-left text-xs text-fg-muted",children:r})]}),O.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:O.jsx(Qn,{size:"sm",onClick:o,children:"Try connecting again"})})]})}const die=()=>O.jsxs("div",{className:"hidden h-full w-[17%] min-w-40 max-w-64 shrink-0 flex-col gap-1 border-r border-line p-3 md:flex",children:[O.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((e,t)=>O.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[O.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},t))]}),fie=()=>O.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((e,t)=>O.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[O.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),O.jsxs("div",{className:"flex-1 space-y-1.5",children:[O.jsxs("div",{className:"flex justify-between gap-2",children:[O.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),O.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),O.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},t))}),Iy=()=>O.jsxs("div",{className:"flex h-full animate-pulse bg-canvas","aria-hidden":"true",children:[O.jsx(die,{}),O.jsx(fie,{})]}),Ay="bfebfabf6f33f701f5561f24214d311afc0e93eb",hie="2026-11-14T00:03:37.528Z",pie=Ay.slice(0,7),mie=/^[0-9a-f]{40}$/.test(Ay),gie=mie?`https://github.com/remit-mail/reader/commit/${Ay}`:void 0;class Ah extends Error{constructor(t,n,r){super(t),this.status=n,this.body=r,this.name="ApiError"}status;body}const j_=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Sl=e=>{const t=e instanceof Ah?e.body:e;if(!j_(t))return;const{code:n,details:r}=t;if(typeof n=="string")return{code:n,details:j_(r)?r:void 0}},vie=(e,t)=>{if(j_(e)&&e.message!==void 0&&e.message!==null){const n=String(e.message);if(n)return n}return`Request failed with status ${t}`},yie=(e,t)=>new Ah(vie(e,t),t,e),wn=e=>{if(e instanceof Ah)return e.status;if(e&&typeof e=="object"){const t=e;if(typeof t.status=="number")return t.status;if(typeof t.statusCode=="number")return t.statusCode}},Fz=e=>wn(e)!==void 0,Ry=e=>{const t=wn(e);return t!==void 0&&t>=500&&t<=599},Ty=e=>!!(typeof DOMException<"u"&&e instanceof DOMException&&e.name==="AbortError"||e&&typeof e=="object"&&"name"in e&&e.name==="AbortError"),bie=()=>typeof navigator<"u"&&navigator.onLine===!1,Oy=e=>Ty(e)||Fz(e)?!1:e instanceof YA?!0:bie(),Sie=e=>!Fz(e)&&!Ty(e)&&!Oy(e),$z=e=>Ry(e)||Sie(e),Cie=e=>e instanceof Error&&e.name==="AuthTokenError"&&wn(e)===403,My=e=>wn(e)===401||Cie(e),wie=(e,t)=>{if(t?.softError===!0)return!0;const n=t?.softErrorStatuses;if(!Array.isArray(n))return!1;const r=wn(e);return r!==void 0&&n.includes(r)},Eie=[502,503,504],xie=(e,t)=>{if(t?.restartExpected!==!0)return!1;const n=wn(e);return n!==void 0&&Eie.includes(n)},_ie=(e,t)=>Ry(e)?!xie(e,t)&&t?.ownsServerErrors!==!0:Ty(e)||Oy(e)||My(e)?!1:$z(e)?!0:!wie(e,t),aR={softError:!0},Py=(...e)=>({softErrorStatuses:e}),Iie={restartExpected:!0},Aie={ownsServerErrors:!0},zz=e=>wn(e)===404,Rie=e=>Ry(e),B_=new Set;let jz=null,Bz=null;const Tie=e=>{Bz=e},Oie=e=>e instanceof Error?e:new Error(Hz(e)),Hz=e=>e instanceof Error?e.message||e.name:typeof e=="string"?e:e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"?e.message:"An unexpected server error occurred.",Mie=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,iu=(e,t)=>{const n={error:e,message:Hz(e),correlationId:Mie(),at:Date.now(),recoverable:t?.recoverable??Rie(e),stack:e instanceof Error?e.stack:void 0,componentStack:t?.componentStack};jz=n,Uie(`Fatal: ${n.message} [${n.correlationId}]`),Bz?.recordError(Oie(e),{fatal:"true",correlationId:n.correlationId});for(const r of B_)r(n);return n},Pie=e=>(B_.add(e),()=>{B_.delete(e)}),Nie=()=>jz,kie=20,Dg=[],Die=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function Lie(e){return typeof e!="string"?!1:Die.has(e.replace(/\.\s*$/,""))}function Lg(e){Dg.push(e),Dg.length>kie&&Dg.shift()}function Uie(e){Lg(e)}function Fie(e){return e.map(t=>{if(typeof t=="string")return t;if(t instanceof Error)return`${t.name}: ${t.message}`;try{return JSON.stringify(t)}catch{return String(t)}}).join(" ")}function $ie(){const e=console.error.bind(console);console.error=(...t)=>{Lg(Fie(t)),e(...t)},window.addEventListener("error",t=>{Lie(t.message)||(Lg(`Uncaught ${t.error instanceof Error?`${t.error.name}: ${t.error.message}`:String(t.message)} (${t.filename}:${t.lineno})`),iu(t.error??t.message))}),window.addEventListener("unhandledrejection",t=>{const n=t.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);Lg(`Unhandled rejection: ${r}`),iu(n)})}function zie(){return Dg.slice()}const jie=8,Pc=[];function Bie(e){const t=e.split(/[?#]/)[0],n=Pc[Pc.length-1];n&&n.path===t||(Pc.push({path:t,timestamp:new Date().toISOString()}),Pc.length>jie&&Pc.shift())}function Hie(){return Pc.slice()}const q1=7500,w3=`
|
|
13
|
+
… (truncated — the copy action on this screen has the full report)`;function ol(e){return{appShortSha:pie,appCommitUrl:gie,appBuildTime:hie,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:zie(),requests:Bne(),routes:Hie(),failingRequest:Hne(),errorMessage:e?.errorMessage,stack:e?.stack,componentStack:e?.componentStack,quarantine:e?.quarantine,syncWarning:e?.syncWarning,title:e?.title}}function V1(e){return["```",e,"```"].join(`
|
|
14
|
+
`)}function qz(e){const t=/T(\d{2}:\d{2}:\d{2})/.exec(e);return t?t[1]:e}function qie(e){return`- **Version**: ${e.appCommitUrl?`[\`${e.appShortSha}\`](${e.appCommitUrl})`:`\`${e.appShortSha}\``} built ${e.appBuildTime}`}function Vie(e){const t=e.status===0?"no response (transport failure)":`${e.status}`;return["## Failing request",`- **Endpoint**: \`${e.path}\``,`- **Method**: ${e.method}`,`- **Status**: ${t}`,`- **Correlation id**: ${e.correlationId??"(none)"}`,""]}function Wie(e){return e.length===0?["## Recent API requests","(none)",""]:["## Recent API requests","| Time | Method | Path | Status | Duration | Correlation |","| --- | --- | --- | --- | --- | --- |",...e.map(n=>{const r=n.status===0?"ERR":`${n.status}`;return`| ${qz(n.timestamp)} | ${n.method} | \`${n.path}\` | ${r} | ${n.durationMs}ms | ${n.correlationId??""} |`}),""]}function Gie(e){return e.length===0?["## Navigation trail","(none)",""]:["## Navigation trail",...e.map(n=>`- ${qz(n.timestamp)} \`${n.path}\``),""]}function Vz(e,t){const n=e.recentErrors.length>0?e.recentErrors.map(s=>` - ${s}`).join(`
|
|
15
|
+
`):" (none)",r=["## Environment",qie(e),`- **Browser**: ${e.userAgent}`,`- **Viewport**: ${e.viewport}`,`- **Time**: ${e.timestamp} (${e.timezone})`,"","## URL",e.href,""];if(e.errorMessage&&r.push("## Error",e.errorMessage,""),e.failingRequest&&r.push(...Vie(e.failingRequest)),e.quarantine){const s=t?.quarantineStructure??e.quarantine.structure;r.push(e.quarantine.head,"",V1(s),"",e.quarantine.disclaimer,"")}e.syncWarning&&r.push(e.syncWarning,"");const o=t?.stack??e.stack;return o&&r.push("## Stacktrace",V1(o),""),e.componentStack&&r.push("## Component stack",V1(e.componentStack),""),r.push(...Wie(e.requests)),r.push(...Gie(e.routes)),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
|
|
16
|
+
`)}function Kie(e){if(e.title)return e.title;if(!e.errorMessage)return"Bug: ";const t=e.errorMessage.split(`
|
|
17
|
+
`)[0].trim();return`Bug: ${t.length>120?`${t.slice(0,117)}…`:t}`}function _m(e,t){const n=new URLSearchParams({title:Kie(e),body:Vz(e,t)});return`${Pu().issuesUrl}?${n.toString()}`}function Zie(e){return Vz(e)}function ku(e){const t=_m(e);if(t.length<=q1)return t;const n={...e,componentStack:void 0},r=[];e.stack&&r.push(["stack",e.stack]),e.quarantine?.structure&&r.push(["quarantineStructure",e.quarantine.structure]),r.sort((s,a)=>a[1].length-s[1].length);let o={};for(const[s,a]of r){if(_m(n,o).length<=q1)break;let c=0,u=a.length,f=0;for(;c<=u;){const h=c+u>>1;_m(n,{...o,[s]:a.slice(0,h)+w3}).length<=q1?(f=h,c=h+1):u=h-1}o={...o,[s]:a.slice(0,f)+w3}}return _m(n,o)}function Yie(){const e=ku(ol());window.open(e,"_blank","noopener,noreferrer")}const Qie="/mail",Wz=()=>{const[e,t]=_.useState(()=>Nie());return _.useEffect(()=>Pie(t),[]),e?O.jsx(Gz,{fatal:e}):null},E3=e=>({errorMessage:e.message,stack:e.stack,componentStack:e.componentStack}),Gz=({fatal:e,onRetry:t})=>{wy({id:"fatal-error",open:!0});const[n,r]=_.useState(!1),o=()=>{window.location.reload()},s=()=>{if(t){t();return}o()},a=()=>{const f=ku(ol(E3(e)));window.open(f,"_blank","noopener,noreferrer")},c=async()=>{const f=Zie(ol(E3(e)));await navigator.clipboard.writeText(f),r(!0),window.setTimeout(()=>r(!1),2e3)},u=e.recoverable?"The server returned an unexpected error. This is not your fault — nothing was saved or sent. Retry, or report a bug so we can fix it.":"Something went wrong and this page can't recover. This is not your fault — nothing was saved or sent. Go to your inbox, or report a bug so we can fix it.";return O.jsxs("div",{role:"alert","aria-live":"assertive","data-testid":"fatal-error-overlay",className:"fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white",children:[O.jsx(JA,{className:"size-16 shrink-0","aria-hidden":"true"}),O.jsxs("div",{className:"max-w-lg space-y-3",children:[O.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),O.jsx("p",{className:"text-base text-red-50",children:u}),O.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:e.message}),O.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",e.correlationId]})]}),O.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[e.recoverable?O.jsx("button",{type:"button",onClick:s,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Retry"}):O.jsx("a",{href:Qie,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Go to inbox"}),O.jsx("button",{type:"button",onClick:a,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:"Report a bug"}),O.jsx("button",{type:"button",onClick:c,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:n?"Copied":"Copy full details"})]})]})},Xie=({betterAuthEnabled:e,cognitoConfigured:t})=>e?"betterAuth":t?"cognito":"none",lR=e=>Xie(e)==="cognito"?qoe:void 0,Jie="Fetch Error",eae=429,cR=(e,t)=>{if(e&&typeof e=="object"&&t in e){const n=e[t];if(typeof n=="string"&&n.trim().length>0)return n}},qf=e=>cR(e,"message"),tae=e=>Ty(e)?!1:cR(e,"statusText")===Jie?!0:wn(e)===void 0,Kz=e=>{if(tae(e))return"network";const t=wn(e);return t===void 0?"fatal":t===eae?"rateLimited":t===404||t>=500?"fatal":qf(e)?"validation":"fatal"},nae="Can't reach the server. You may be offline — check your connection and try again.",rae="Too many requests from this address. Everyone behind the same address — other people on this network, and every tab you have open — shares one limit. Wait a minute and try again.",oae=(e,t)=>t==="network"?nae:t==="rateLimited"?rae:qf(e)??"Please check your details and try again.",sae=e=>{const t=wn(e);if(t===void 0)return"no response";const n=cR(e,"statusText");return n?`${t} ${n}`:String(t)},iae=(e,t)=>{const n=sae(e),r=wn(e)===404?"The endpoint did not respond as expected — check that the backend is running and up to date (see the deployment guide's troubleshooting section).":"The server returned an unexpected response.",o=qf(e),s=o?` Server said: ${o}.`:"";return`${t.method} ${t.path} failed: ${n}. ${r}${s}`},aae=(e,t)=>{iu(new Error(iae(e,t)),{recoverable:!1})},lae={SIGN_IN_DISABLED:"signInOff",ACCOUNT_DISABLED:"accountDisabled"},uR=e=>{if(wn(e)!==403||!e||typeof e!="object"||!("code"in e))return;const{code:t}=e;return typeof t=="string"?lae[t]:void 0},cae=/\/reset-password\/([^/]+)\/?$/,uae=e=>{const t=cae.exec(e);return t?.[1]?decodeURIComponent(t[1]):void 0},dae="Your password was not set",fae=e=>ku({...ol({title:`Reset password: ${e}`,errorMessage:e}),href:`${window.location.origin}/reset-password/<token>`}),hae=e=>{if(uR(e)==="signInOff")return{kind:"signInOff"};const t=e&&typeof e=="object"&&"code"in e?e.code:void 0;if(t==="INVALID_TOKEN")return{kind:"deadLink"};if(t==="PASSWORD_TOO_SHORT"||t==="PASSWORD_TOO_LONG")return{kind:"password",message:qf(e)??"Use 12 to 128 characters."};const n=Kz(e);if(n==="network")return{kind:"inline",message:"Can't reach the server. You may be offline. Check your connection and try again."};if(n==="rateLimited")return{kind:"inline",message:"Too many tries from this address. Wait a minute and try again."};const r=wn(e),o=qf(e);return{kind:"server",message:`${dae}. The server answered ${r??"nothing"}${o?`: ${o}`:""}.`}};function pae({token:e,onDone:t}){const[n,r]=_.useState(""),[o,s]=_.useState(null),[a,c]=_.useState(!1),u=_.useRef(null);_.useEffect(()=>{u.current?.focus()},[]);const f=async h=>{if(h.preventDefault(),a)return;s(null),c(!0);const m=await rl.resetPassword({newPassword:n,token:e}).then(g=>g.error??null,g=>g);if(c(!1),!m){t();return}s(hae(m))};return O.jsxs(xy,{children:[O.jsx(_y,{}),O.jsxs("form",{onSubmit:f,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[O.jsx("h1",{className:"text-base font-semibold text-fg",children:"Choose a new password"}),o?.kind==="deadLink"&&O.jsx(so,{tone:"danger",children:"This link no longer works. Ask for a new one."}),o?.kind==="signInOff"&&O.jsxs(so,{tone:"info",children:[O.jsx("p",{className:"font-medium",children:"Sign-in is turned off on this server."}),O.jsx("p",{className:"mt-1",children:"The link works once the person who runs this server turns sign-in back on."})]}),o?.kind==="inline"&&O.jsx(so,{tone:"danger",children:o.message}),o?.kind==="server"&&O.jsxs(so,{tone:"danger",children:[O.jsx("p",{children:o.message}),O.jsx("a",{href:fae(o.message),target:"_blank",rel:"noreferrer",className:"mt-1 inline-block font-medium text-accent hover:underline",children:"Report an issue"})]}),O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"reset-new-password",className:"text-fg-muted",children:"New password"}),O.jsx(Mz,{ref:u,id:"reset-new-password",autoComplete:"new-password",value:n,onChange:h=>{r(h.target.value),o?.kind==="password"&&s(null)},placeholder:"12 to 128 characters","aria-invalid":o?.kind==="password","aria-describedby":"reset-new-password-hint",required:!0}),O.jsx("p",{id:"reset-new-password-hint",className:"text-xs text-fg-muted",children:o?.kind==="password"?O.jsx("span",{className:"text-danger",role:"alert",children:o.message}):"Use 12 to 128 characters. Spaces and any symbols are fine. A long phrase is easy to remember."})]}),O.jsx(Qn,{type:"submit","aria-busy":a,children:"Set password"})]}),O.jsx(sR,{note:lR({betterAuthEnabled:!0,cognitoConfigured:!1})})]})}const mae=({onRetry:e,onReport:t})=>O.jsxs(xy,{children:[O.jsx(_y,{}),O.jsxs("div",{className:"flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[O.jsxs(so,{tone:"warning",children:[O.jsx("p",{className:"font-medium",children:"Too many requests from this address"}),O.jsx("p",{className:"mt-1",children:"The server is limiting requests from your network address, so it could not check whether you are signed in. You have not been signed out."})]}),O.jsx("p",{className:"text-sm text-fg-muted",children:"Wait a minute and try again. Everyone behind the same address — other people on this network, and every tab you have open — shares one limit."}),O.jsx(Qn,{onClick:e,children:"Try again"}),O.jsx(Qn,{variant:"ghost",size:"sm",onClick:t,children:"Report an issue"})]})]}),gae=429,vae=({data:e,isPending:t,error:n})=>{const r=uR(n);return r?{kind:"refused",refusal:r}:e?{kind:"active"}:t?{kind:"pending"}:wn(n)===gae?{kind:"rateLimited"}:{kind:"signedOut"}},yae={method:"POST",path:"/api/auth/sign-up/email"},bae={method:"POST",path:"/api/auth/sign-in/email"},Sae=({notice:e})=>{const t=_.useRef(null);return _.useEffect(()=>{t.current?.focus()},[]),O.jsxs("div",{ref:t,tabIndex:-1,className:"outline-none",children:[e==="signInOff"&&O.jsxs(so,{tone:"info",children:[O.jsx("p",{className:"font-medium",children:"Sign-in is turned off on this server."}),O.jsx("p",{className:"mt-1",children:"The person who runs this server turned it off. Ask them when it is back."})]}),e==="accountDisabled"&&O.jsxs(so,{tone:"danger",children:[O.jsx("p",{className:"font-medium",children:"This account is disabled."}),O.jsx("p",{className:"mt-1",children:"Ask the person who runs this server."})]}),e==="passwordChanged"&&O.jsx(so,{tone:"success",children:"Password changed. Sign in with your new password."})]})},x3=({notice:e})=>{const[t,n]=_.useState("signIn"),[r,o]=_.useState(""),[s,a]=_.useState(""),[c,u]=_.useState(""),[f,h]=_.useState(null),[m,g]=_.useState(!1),[v,C]=_.useState(!1),[b,E]=_.useState(e),x=b==="signInOff",I=v||x?"signIn":t,R=(D,N)=>{const T=uR(D);if(T){E(T);return}if(Wne(D)){C(!0),n("signIn");return}const L=Kz(D);if(L==="fatal"){aae(D,N);return}h(oae(D,L))},M=async D=>{if(D.preventDefault(),m)return;h(null),E(void 0),g(!0);const N=I==="signUp"?yae:bae,T=await(I==="signUp"?rl.signUp.email({email:s,password:c,name:r}):rl.signIn.email({email:s,password:c})).then(L=>L.error??null,L=>L);g(!1),T&&R(T,N)};return O.jsxs(O.Fragment,{children:[O.jsx(Wz,{}),O.jsxs(xy,{children:[O.jsx(_y,{}),O.jsxs("form",{onSubmit:M,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[b&&O.jsx(Sae,{notice:b},b),x?null:v?O.jsx(so,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):O.jsxs("div",{className:"flex gap-1",children:[O.jsx(Qn,{size:"sm",variant:I==="signIn"?"secondary":"ghost","aria-pressed":I==="signIn",onClick:()=>n("signIn"),children:"Sign in"}),O.jsx(Qn,{size:"sm",variant:I==="signUp"?"secondary":"ghost","aria-pressed":I==="signUp",onClick:()=>n("signUp"),children:"Create account"})]}),f&&O.jsx(so,{tone:"danger",children:f}),I==="signUp"&&O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),O.jsx(jf,{id:"ba-name",type:"text",autoComplete:"name",value:r,onChange:D=>o(D.target.value),placeholder:"Your name",required:!0})]}),O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),O.jsx(jf,{id:"ba-email",type:"email",autoComplete:"email",value:s,onChange:D=>a(D.target.value),placeholder:"you@example.com",required:!0,disabled:x})]}),O.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[O.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),O.jsx(Mz,{id:"ba-password",autoComplete:I==="signUp"?"new-password":"current-password",value:c,onChange:D=>u(D.target.value),placeholder:"Your password",required:!0,disabled:x})]}),O.jsx(Qn,{type:"submit",disabled:x,children:I==="signUp"?"Create account":"Sign in"})]}),O.jsx(sR,{note:lR({betterAuthEnabled:Cy(),cognitoConfigured:!1})})]})]})},Cae=({session:e,onRetry:t,notice:n,children:r})=>{const o=vae(e);return o.kind==="active"?O.jsx(O.Fragment,{children:r}):o.kind==="pending"?O.jsx(Iy,{}):o.kind==="rateLimited"?O.jsx(mae,{onRetry:t,onReport:Yie}):o.kind==="refused"?O.jsx(x3,{notice:o.refusal},o.refusal):O.jsx(x3,{notice:n})},wae=({children:e})=>{const{data:t,isPending:n,error:r,refetch:o}=rl.useSession(),[s,a]=_.useState(()=>uae(window.location.pathname)),[c,u]=_.useState(void 0);return s?O.jsx(pae,{token:s,onDone:()=>{window.history.replaceState(null,"","/"),a(void 0),u("passwordChanged")}}):O.jsx(Cae,{session:{data:t,isPending:n,error:r},onRetry:()=>{o()},notice:c,children:e})},Eae=({children:e,fallback:t=null})=>{const{data:n}=rl.useSession();if(!n)return O.jsx(O.Fragment,{children:t});const r=async()=>{await rl.signOut(),XA()};return O.jsx(O.Fragment,{children:e({email:n.user.email??null,signOut:r})})},cv={configure:()=>{},getToken:rre,resetToken:XA,Shell:wae,Account:Eae};var W1,_3;function xae(){if(_3)return W1;_3=1;function e(){this.__data__=[],this.size=0}return W1=e,W1}var G1,I3;function Rh(){if(I3)return G1;I3=1;function e(t,n){return t===n||t!==t&&n!==n}return G1=e,G1}var K1,A3;function Ny(){if(A3)return K1;A3=1;var e=Rh();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return K1=t,K1}var Z1,R3;function _ae(){if(R3)return Z1;R3=1;var e=Ny(),t=Array.prototype,n=t.splice;function r(o){var s=this.__data__,a=e(s,o);if(a<0)return!1;var c=s.length-1;return a==c?s.pop():n.call(s,a,1),--this.size,!0}return Z1=r,Z1}var Y1,T3;function Iae(){if(T3)return Y1;T3=1;var e=Ny();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return Y1=t,Y1}var Q1,O3;function Aae(){if(O3)return Q1;O3=1;var e=Ny();function t(n){return e(this.__data__,n)>-1}return Q1=t,Q1}var X1,M3;function Rae(){if(M3)return X1;M3=1;var e=Ny();function t(n,r){var o=this.__data__,s=e(o,n);return s<0?(++this.size,o.push([n,r])):o[s][1]=r,this}return X1=t,X1}var J1,P3;function ky(){if(P3)return J1;P3=1;var e=xae(),t=_ae(),n=Iae(),r=Aae(),o=Rae();function s(a){var c=-1,u=a==null?0:a.length;for(this.clear();++c<u;){var f=a[c];this.set(f[0],f[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,J1=s,J1}var eC,N3;function Tae(){if(N3)return eC;N3=1;var e=ky();function t(){this.__data__=new e,this.size=0}return eC=t,eC}var tC,k3;function Oae(){if(k3)return tC;k3=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return tC=e,tC}var nC,D3;function Mae(){if(D3)return nC;D3=1;function e(t){return this.__data__.get(t)}return nC=e,nC}var rC,L3;function Pae(){if(L3)return rC;L3=1;function e(t){return this.__data__.has(t)}return rC=e,rC}var oC,U3;function Zz(){if(U3)return oC;U3=1;var e=typeof pm=="object"&&pm&&pm.Object===Object&±return oC=e,oC}var sC,F3;function ts(){if(F3)return sC;F3=1;var e=Zz(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return sC=n,sC}var iC,$3;function Dy(){if($3)return iC;$3=1;var e=ts(),t=e.Symbol;return iC=t,iC}var aC,z3;function Nae(){if(z3)return aC;z3=1;var e=Dy(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function s(a){var c=n.call(a,o),u=a[o];try{a[o]=void 0;var f=!0}catch{}var h=r.call(a);return f&&(c?a[o]=u:delete a[o]),h}return aC=s,aC}var lC,j3;function kae(){if(j3)return lC;j3=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return lC=n,lC}var cC,B3;function Du(){if(B3)return cC;B3=1;var e=Dy(),t=Nae(),n=kae(),r="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function a(c){return c==null?c===void 0?o:r:s&&s in Object(c)?t(c):n(c)}return cC=a,cC}var uC,H3;function Ys(){if(H3)return uC;H3=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return uC=e,uC}var dC,q3;function dR(){if(q3)return dC;q3=1;var e=Du(),t=Ys(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function a(c){if(!t(c))return!1;var u=e(c);return u==r||u==o||u==n||u==s}return dC=a,dC}var fC,V3;function Dae(){if(V3)return fC;V3=1;var e=ts(),t=e["__core-js_shared__"];return fC=t,fC}var hC,W3;function Lae(){if(W3)return hC;W3=1;var e=Dae(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return hC=n,hC}var pC,G3;function Yz(){if(G3)return pC;G3=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return pC=n,pC}var mC,K3;function Uae(){if(K3)return mC;K3=1;var e=dR(),t=Lae(),n=Ys(),r=Yz(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,a=Function.prototype,c=Object.prototype,u=a.toString,f=c.hasOwnProperty,h=RegExp("^"+u.call(f).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var v=e(g)?h:s;return v.test(r(g))}return mC=m,mC}var gC,Z3;function Fae(){if(Z3)return gC;Z3=1;function e(t,n){return t?.[n]}return gC=e,gC}var vC,Y3;function Cl(){if(Y3)return vC;Y3=1;var e=Uae(),t=Fae();function n(r,o){var s=t(r,o);return e(s)?s:void 0}return vC=n,vC}var yC,Q3;function fR(){if(Q3)return yC;Q3=1;var e=Cl(),t=ts(),n=e(t,"Map");return yC=n,yC}var bC,X3;function Ly(){if(X3)return bC;X3=1;var e=Cl(),t=e(Object,"create");return bC=t,bC}var SC,J3;function $ae(){if(J3)return SC;J3=1;var e=Ly();function t(){this.__data__=e?e(null):{},this.size=0}return SC=t,SC}var CC,eD;function zae(){if(eD)return CC;eD=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return CC=e,CC}var wC,tD;function jae(){if(tD)return wC;tD=1;var e=Ly(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(s){var a=this.__data__;if(e){var c=a[s];return c===t?void 0:c}return r.call(a,s)?a[s]:void 0}return wC=o,wC}var EC,nD;function Bae(){if(nD)return EC;nD=1;var e=Ly(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var s=this.__data__;return e?s[o]!==void 0:n.call(s,o)}return EC=r,EC}var xC,rD;function Hae(){if(rD)return xC;rD=1;var e=Ly(),t="__lodash_hash_undefined__";function n(r,o){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&o===void 0?t:o,this}return xC=n,xC}var _C,oD;function qae(){if(oD)return _C;oD=1;var e=$ae(),t=zae(),n=jae(),r=Bae(),o=Hae();function s(a){var c=-1,u=a==null?0:a.length;for(this.clear();++c<u;){var f=a[c];this.set(f[0],f[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,_C=s,_C}var IC,sD;function Vae(){if(sD)return IC;sD=1;var e=qae(),t=ky(),n=fR();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return IC=r,IC}var AC,iD;function Wae(){if(iD)return AC;iD=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return AC=e,AC}var RC,aD;function Uy(){if(aD)return RC;aD=1;var e=Wae();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return RC=t,RC}var TC,lD;function Gae(){if(lD)return TC;lD=1;var e=Uy();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return TC=t,TC}var OC,cD;function Kae(){if(cD)return OC;cD=1;var e=Uy();function t(n){return e(this,n).get(n)}return OC=t,OC}var MC,uD;function Zae(){if(uD)return MC;uD=1;var e=Uy();function t(n){return e(this,n).has(n)}return MC=t,MC}var PC,dD;function Yae(){if(dD)return PC;dD=1;var e=Uy();function t(n,r){var o=e(this,n),s=o.size;return o.set(n,r),this.size+=o.size==s?0:1,this}return PC=t,PC}var NC,fD;function hR(){if(fD)return NC;fD=1;var e=Vae(),t=Gae(),n=Kae(),r=Zae(),o=Yae();function s(a){var c=-1,u=a==null?0:a.length;for(this.clear();++c<u;){var f=a[c];this.set(f[0],f[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=o,NC=s,NC}var kC,hD;function Qae(){if(hD)return kC;hD=1;var e=ky(),t=fR(),n=hR(),r=200;function o(s,a){var c=this.__data__;if(c instanceof e){var u=c.__data__;if(!t||u.length<r-1)return u.push([s,a]),this.size=++c.size,this;c=this.__data__=new n(u)}return c.set(s,a),this.size=c.size,this}return kC=o,kC}var DC,pD;function pR(){if(pD)return DC;pD=1;var e=ky(),t=Tae(),n=Oae(),r=Mae(),o=Pae(),s=Qae();function a(c){var u=this.__data__=new e(c);this.size=u.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=s,DC=a,DC}var LC,mD;function Xae(){if(mD)return LC;mD=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return LC=t,LC}var UC,gD;function Jae(){if(gD)return UC;gD=1;function e(t){return this.__data__.has(t)}return UC=e,UC}var FC,vD;function ele(){if(vD)return FC;vD=1;var e=hR(),t=Xae(),n=Jae();function r(o){var s=-1,a=o==null?0:o.length;for(this.__data__=new e;++s<a;)this.add(o[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,FC=r,FC}var $C,yD;function tle(){if(yD)return $C;yD=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return $C=e,$C}var zC,bD;function nle(){if(bD)return zC;bD=1;function e(t,n){return t.has(n)}return zC=e,zC}var jC,SD;function Qz(){if(SD)return jC;SD=1;var e=ele(),t=tle(),n=nle(),r=1,o=2;function s(a,c,u,f,h,m){var g=u&r,v=a.length,C=c.length;if(v!=C&&!(g&&C>v))return!1;var b=m.get(a),E=m.get(c);if(b&&E)return b==c&&E==a;var x=-1,I=!0,R=u&o?new e:void 0;for(m.set(a,c),m.set(c,a);++x<v;){var M=a[x],D=c[x];if(f)var N=g?f(D,M,x,c,a,m):f(M,D,x,a,c,m);if(N!==void 0){if(N)continue;I=!1;break}if(R){if(!t(c,function(T,L){if(!n(R,L)&&(M===T||h(M,T,u,f,m)))return R.push(L)})){I=!1;break}}else if(!(M===D||h(M,D,u,f,m))){I=!1;break}}return m.delete(a),m.delete(c),I}return jC=s,jC}var BC,CD;function Xz(){if(CD)return BC;CD=1;var e=ts(),t=e.Uint8Array;return BC=t,BC}var HC,wD;function rle(){if(wD)return HC;wD=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,s){r[++n]=[s,o]}),r}return HC=e,HC}var qC,ED;function ole(){if(ED)return qC;ED=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return qC=e,qC}var VC,xD;function sle(){if(xD)return VC;xD=1;var e=Dy(),t=Xz(),n=Rh(),r=Qz(),o=rle(),s=ole(),a=1,c=2,u="[object Boolean]",f="[object Date]",h="[object Error]",m="[object Map]",g="[object Number]",v="[object RegExp]",C="[object Set]",b="[object String]",E="[object Symbol]",x="[object ArrayBuffer]",I="[object DataView]",R=e?e.prototype:void 0,M=R?R.valueOf:void 0;function D(N,T,L,$,G,z,F){switch(L){case I:if(N.byteLength!=T.byteLength||N.byteOffset!=T.byteOffset)return!1;N=N.buffer,T=T.buffer;case x:return!(N.byteLength!=T.byteLength||!z(new t(N),new t(T)));case u:case f:case g:return n(+N,+T);case h:return N.name==T.name&&N.message==T.message;case v:case b:return N==T+"";case m:var q=o;case C:var X=$&a;if(q||(q=s),N.size!=T.size&&!X)return!1;var Se=F.get(N);if(Se)return Se==T;$|=c,F.set(N,T);var V=r(q(N),q(T),$,G,z,F);return F.delete(N),V;case E:if(M)return M.call(N)==M.call(T)}return!1}return VC=D,VC}var WC,_D;function Jz(){if(_D)return WC;_D=1;function e(t,n){for(var r=-1,o=n.length,s=t.length;++r<o;)t[s+r]=n[r];return t}return WC=e,WC}var GC,ID;function Qs(){if(ID)return GC;ID=1;var e=Array.isArray;return GC=e,GC}var KC,AD;function e9(){if(AD)return KC;AD=1;var e=Jz(),t=Qs();function n(r,o,s){var a=o(r);return t(r)?a:e(a,s(r))}return KC=n,KC}var ZC,RD;function ile(){if(RD)return ZC;RD=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=0,a=[];++r<o;){var c=t[r];n(c,r,t)&&(a[s++]=c)}return a}return ZC=e,ZC}var YC,TD;function t9(){if(TD)return YC;TD=1;function e(){return[]}return YC=e,YC}var QC,OD;function n9(){if(OD)return QC;OD=1;var e=ile(),t=t9(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(a){return a==null?[]:(a=Object(a),e(o(a),function(c){return r.call(a,c)}))}:t;return QC=s,QC}var XC,MD;function ale(){if(MD)return XC;MD=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return XC=e,XC}var JC,PD;function wl(){if(PD)return JC;PD=1;function e(t){return t!=null&&typeof t=="object"}return JC=e,JC}var ew,ND;function lle(){if(ND)return ew;ND=1;var e=Du(),t=wl(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return ew=r,ew}var tw,kD;function mR(){if(kD)return tw;kD=1;var e=lle(),t=wl(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(a){return t(a)&&r.call(a,"callee")&&!o.call(a,"callee")};return tw=s,tw}var hf={exports:{}},nw,DD;function cle(){if(DD)return nw;DD=1;function e(){return!1}return nw=e,nw}hf.exports;var LD;function gR(){return LD||(LD=1,(function(e,t){var n=ts(),r=cle(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,c=a?n.Buffer:void 0,u=c?c.isBuffer:void 0,f=u||r;e.exports=f})(hf,hf.exports)),hf.exports}var rw,UD;function Fy(){if(UD)return rw;UD=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var s=typeof r;return o=o??e,!!o&&(s=="number"||s!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return rw=n,rw}var ow,FD;function vR(){if(FD)return ow;FD=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return ow=t,ow}var sw,$D;function ule(){if($D)return sw;$D=1;var e=Du(),t=vR(),n=wl(),r="[object Arguments]",o="[object Array]",s="[object Boolean]",a="[object Date]",c="[object Error]",u="[object Function]",f="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",v="[object Set]",C="[object String]",b="[object WeakMap]",E="[object ArrayBuffer]",x="[object DataView]",I="[object Float32Array]",R="[object Float64Array]",M="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",T="[object Uint8Array]",L="[object Uint8ClampedArray]",$="[object Uint16Array]",G="[object Uint32Array]",z={};z[I]=z[R]=z[M]=z[D]=z[N]=z[T]=z[L]=z[$]=z[G]=!0,z[r]=z[o]=z[E]=z[s]=z[x]=z[a]=z[c]=z[u]=z[f]=z[h]=z[m]=z[g]=z[v]=z[C]=z[b]=!1;function F(q){return n(q)&&t(q.length)&&!!z[e(q)]}return sw=F,sw}var iw,zD;function dle(){if(zD)return iw;zD=1;function e(t){return function(n){return t(n)}}return iw=e,iw}var pf={exports:{}};pf.exports;var jD;function fle(){return jD||(jD=1,(function(e,t){var n=Zz(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,a=s&&n.process,c=(function(){try{var u=o&&o.require&&o.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}})();e.exports=c})(pf,pf.exports)),pf.exports}var aw,BD;function yR(){if(BD)return aw;BD=1;var e=ule(),t=dle(),n=fle(),r=n&&n.isTypedArray,o=r?t(r):e;return aw=o,aw}var lw,HD;function r9(){if(HD)return lw;HD=1;var e=ale(),t=mR(),n=Qs(),r=gR(),o=Fy(),s=yR(),a=Object.prototype,c=a.hasOwnProperty;function u(f,h){var m=n(f),g=!m&&t(f),v=!m&&!g&&r(f),C=!m&&!g&&!v&&s(f),b=m||g||v||C,E=b?e(f.length,String):[],x=E.length;for(var I in f)(h||c.call(f,I))&&!(b&&(I=="length"||v&&(I=="offset"||I=="parent")||C&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||o(I,x)))&&E.push(I);return E}return lw=u,lw}var cw,qD;function bR(){if(qD)return cw;qD=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return cw=t,cw}var uw,VD;function o9(){if(VD)return uw;VD=1;function e(t,n){return function(r){return t(n(r))}}return uw=e,uw}var dw,WD;function hle(){if(WD)return dw;WD=1;var e=o9(),t=e(Object.keys,Object);return dw=t,dw}var fw,GD;function ple(){if(GD)return fw;GD=1;var e=bR(),t=hle(),n=Object.prototype,r=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var a=[];for(var c in Object(s))r.call(s,c)&&c!="constructor"&&a.push(c);return a}return fw=o,fw}var hw,KD;function $y(){if(KD)return hw;KD=1;var e=dR(),t=vR();function n(r){return r!=null&&t(r.length)&&!e(r)}return hw=n,hw}var pw,ZD;function s9(){if(ZD)return pw;ZD=1;var e=r9(),t=ple(),n=$y();function r(o){return n(o)?e(o):t(o)}return pw=r,pw}var mw,YD;function mle(){if(YD)return mw;YD=1;var e=e9(),t=n9(),n=s9();function r(o){return e(o,n,t)}return mw=r,mw}var gw,QD;function gle(){if(QD)return gw;QD=1;var e=mle(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(s,a,c,u,f,h){var m=c&t,g=e(s),v=g.length,C=e(a),b=C.length;if(v!=b&&!m)return!1;for(var E=v;E--;){var x=g[E];if(!(m?x in a:r.call(a,x)))return!1}var I=h.get(s),R=h.get(a);if(I&&R)return I==a&&R==s;var M=!0;h.set(s,a),h.set(a,s);for(var D=m;++E<v;){x=g[E];var N=s[x],T=a[x];if(u)var L=m?u(T,N,x,a,s,h):u(N,T,x,s,a,h);if(!(L===void 0?N===T||f(N,T,c,u,h):L)){M=!1;break}D||(D=x=="constructor")}if(M&&!D){var $=s.constructor,G=a.constructor;$!=G&&"constructor"in s&&"constructor"in a&&!(typeof $=="function"&&$ instanceof $&&typeof G=="function"&&G instanceof G)&&(M=!1)}return h.delete(s),h.delete(a),M}return gw=o,gw}var vw,XD;function vle(){if(XD)return vw;XD=1;var e=Cl(),t=ts(),n=e(t,"DataView");return vw=n,vw}var yw,JD;function yle(){if(JD)return yw;JD=1;var e=Cl(),t=ts(),n=e(t,"Promise");return yw=n,yw}var bw,e5;function ble(){if(e5)return bw;e5=1;var e=Cl(),t=ts(),n=e(t,"Set");return bw=n,bw}var Sw,t5;function Sle(){if(t5)return Sw;t5=1;var e=Cl(),t=ts(),n=e(t,"WeakMap");return Sw=n,Sw}var Cw,n5;function Cle(){if(n5)return Cw;n5=1;var e=vle(),t=fR(),n=yle(),r=ble(),o=Sle(),s=Du(),a=Yz(),c="[object Map]",u="[object Object]",f="[object Promise]",h="[object Set]",m="[object WeakMap]",g="[object DataView]",v=a(e),C=a(t),b=a(n),E=a(r),x=a(o),I=s;return(e&&I(new e(new ArrayBuffer(1)))!=g||t&&I(new t)!=c||n&&I(n.resolve())!=f||r&&I(new r)!=h||o&&I(new o)!=m)&&(I=function(R){var M=s(R),D=M==u?R.constructor:void 0,N=D?a(D):"";if(N)switch(N){case v:return g;case C:return c;case b:return f;case E:return h;case x:return m}return M}),Cw=I,Cw}var ww,r5;function wle(){if(r5)return ww;r5=1;var e=pR(),t=Qz(),n=sle(),r=gle(),o=Cle(),s=Qs(),a=gR(),c=yR(),u=1,f="[object Arguments]",h="[object Array]",m="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function C(b,E,x,I,R,M){var D=s(b),N=s(E),T=D?h:o(b),L=N?h:o(E);T=T==f?m:T,L=L==f?m:L;var $=T==m,G=L==m,z=T==L;if(z&&a(b)){if(!a(E))return!1;D=!0,$=!1}if(z&&!$)return M||(M=new e),D||c(b)?t(b,E,x,I,R,M):n(b,E,T,x,I,R,M);if(!(x&u)){var F=$&&v.call(b,"__wrapped__"),q=G&&v.call(E,"__wrapped__");if(F||q){var X=F?b.value():b,Se=q?E.value():E;return M||(M=new e),R(X,Se,x,I,M)}}return z?(M||(M=new e),r(b,E,x,I,R,M)):!1}return ww=C,ww}var Ew,o5;function i9(){if(o5)return Ew;o5=1;var e=wle(),t=wl();function n(r,o,s,a,c){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,s,a,n,c)}return Ew=n,Ew}var xw={exports:{}},_w={},Iw={exports:{}},Aw={};var s5;function Ele(){if(s5)return Aw;s5=1;var e=Ih();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,a=e.useDebugValue;function c(m,g){var v=g(),C=r({inst:{value:v,getSnapshot:g}}),b=C[0].inst,E=C[1];return s(function(){b.value=v,b.getSnapshot=g,u(b)&&E({inst:b})},[m,v,g]),o(function(){return u(b)&&E({inst:b}),m(function(){u(b)&&E({inst:b})})},[m]),a(v),v}function u(m){var g=m.getSnapshot;m=m.value;try{var v=g();return!n(m,v)}catch{return!0}}function f(m,g){return g()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Aw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Aw}var i5;function xle(){return i5||(i5=1,Iw.exports=Ele()),Iw.exports}var a5;function _le(){if(a5)return _w;a5=1;var e=Ih(),t=xle();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,c=e.useMemo,u=e.useDebugValue;return _w.useSyncExternalStoreWithSelector=function(f,h,m,g,v){var C=s(null);if(C.current===null){var b={hasValue:!1,value:null};C.current=b}else b=C.current;C=c(function(){function x(N){if(!I){if(I=!0,R=N,N=g(N),v!==void 0&&b.hasValue){var T=b.value;if(v(T,N))return M=T}return M=N}if(T=M,r(R,N))return T;var L=g(N);return v!==void 0&&v(T,L)?(R=N,T):(R=N,M=L)}var I=!1,R,M,D=m===void 0?null:m;return[function(){return x(h())},D===null?void 0:function(){return x(D())}]},[h,m,g,v]);var E=o(f,C[0],C[1]);return a(function(){b.hasValue=!0,b.value=E},[E]),u(E),E},_w}var l5;function Ile(){return l5||(l5=1,xw.exports=_le()),xw.exports}var a9=Ile();var ve=function(){return ve=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ve.apply(this,arguments)};function SR(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lt(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function vt(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(c){a={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function Gt(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Tt;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(Tt||(Tt={}));var sl;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(sl||(sl={}));var H_=Tt.Start,CR=Tt.Stop,Th=Tt.Raise,zy=Tt.Send,l9=Tt.Cancel,Ale=Tt.NullEvent,wR=Tt.Assign;Tt.After;Tt.DoneState;var c9=Tt.Log,Rle=Tt.Init,q_=Tt.Invoke;Tt.ErrorExecution;var c5=Tt.ErrorPlatform,Tle=Tt.ErrorCustom,ER=Tt.Update,Ole=Tt.Choose,Mle=Tt.Pure,u9=".",u5={},V_="xstate.guard",Ple="",Im;function xR(e,t,n){n===void 0&&(n=u9);var r=Af(e,n),o=Af(t,n);return Ct(o)?Ct(r)?o===r:!1:Ct(r)?r in o:Object.keys(r).every(function(s){return s in o?xR(r[s],o[s]):!1})}function d9(e){try{return Ct(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function W_(e,t){try{return Lu(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function Nle(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Af(e,t){if(Nle(e))return e.value;if(Lu(e))return uv(e);if(typeof e!="string")return e;var n=W_(e,t);return uv(n)}function uv(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function mf(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var s=r[o];n[s]=t(e[s],s,e,o)}return n}function d5(e,t,n){var r,o,s={};try{for(var a=lt(Object.keys(e)),c=a.next();!c.done;c=a.next()){var u=c.value,f=e[u];n(f)&&(s[u]=t(f,u,e))}}catch(h){r={error:h}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}var kle=function(e){return function(t){var n,r,o=t;try{for(var s=lt(e),a=s.next();!a.done;a=s.next()){var c=a.value;o=o[c]}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}};function Dle(e,t){return function(n){var r,o,s=n;try{for(var a=lt(e),c=a.next();!c.done;c=a.next()){var u=c.value;s=s[t][u]}}catch(f){r={error:f}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}}function Ug(e){if(!e)return[[]];if(Ct(e))return[[e]];var t=sn(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:Ug(e[n]).map(function(o){return[n].concat(o)})}));return t}function sn(e){var t;return(t=[]).concat.apply(t,Gt([],vt(e),!1))}function f9(e){return Lu(e)?e:[e]}function bo(e){return e===void 0?[]:f9(e)}function dv(e,t,n){var r,o;if(wt(e))return e(t,n.data);var s={};try{for(var a=lt(Object.keys(e)),c=a.next();!c.done;c=a.next()){var u=c.value,f=e[u];wt(f)?s[u]=f(t,n.data):s[u]=f}}catch(h){r={error:h}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return s}function Lle(e){return/^(done|error)\./.test(e)}function f5(e){return!!(e instanceof Promise||e!==null&&(wt(e)||typeof e=="object")&&wt(e.then))}function Ule(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function Fle(e,t){var n,r,o=vt([[],[]],2),s=o[0],a=o[1];try{for(var c=lt(e),u=c.next();!u.done;u=c.next()){var f=u.value;t(f)?s.push(f):a.push(f)}}catch(h){n={error:h}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return[s,a]}function h9(e,t){return mf(e.states,function(n,r){if(n){var o=(Ct(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:h9(n,o)}}})}function $le(e,t){return{current:t,states:h9(e,t)}}function h5(e,t,n,r){var o=e&&n.reduce(function(s,a){var c,u,f=a.assignment,h={state:r,action:a,_event:t},m={};if(wt(f))m=f(s,t.data,h);else try{for(var g=lt(Object.keys(f)),v=g.next();!v.done;v=g.next()){var C=v.value,b=f[C];m[C]=wt(b)?b(s,t.data,h):b}}catch(E){c={error:E}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}return Object.assign({},s,m)},e);return o}var zle=function(){};function Lu(e){return Array.isArray(e)}function wt(e){return typeof e=="function"}function Ct(e){return typeof e=="string"}function p9(e,t){if(e)return Ct(e)?{type:V_,name:e,predicate:t?t[e]:void 0}:wt(e)?{type:V_,name:e.name,predicate:e}:e}function jle(e){try{return"subscribe"in e&&wt(e.subscribe)}catch{return!1}}var Ui=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Im={},Im[Ui]=function(){return this},Im[Symbol.observable]=function(){return this};function au(e){return!!e&&"__xstatenode"in e}function Ble(e){return!!e&&typeof e.send=="function"}var Hle=(function(){var e=0;return function(){return e++,e.toString(16)}})();function jy(e,t){return Ct(e)||typeof e=="number"?ve({type:e},t):e}function qn(e,t){if(!Ct(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=jy(e);return ve({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function bc(e,t){var n=f9(t).map(function(r){return typeof r>"u"||typeof r=="string"||au(r)?{target:r,event:e}:ve(ve({},r),{event:e})});return n}function qle(e){if(!(e===void 0||e===Ple))return bo(e)}function m9(e,t,n,r,o){var s=e.options.guards,a={state:o,cond:t,_event:r};if(t.type===V_)return(s?.[t.name]||t.predicate)(n,r.data,a);var c=s?.[t.type];if(!c)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return c(n,r.data,a)}function g9(e){return typeof e=="string"?{type:e}:e}function Rf(e,t,n){var r=function(){},o=typeof e=="object",s=o?e:null;return{next:((o?e.next:e)||r).bind(s),error:((o?e.error:t)||r).bind(s),complete:((o?e.complete:n)||r).bind(s)}}function Am(e,t){return"".concat(e,":invocation[").concat(t,"]")}function G_(e){return(e.type===Th||e.type===zy&&e.to===sl.Internal)&&typeof e.delay!="number"}var Wa=qn({type:Rle});function fv(e,t){return t&&t[e]||void 0}function lu(e,t){var n;if(Ct(e)||typeof e=="number"){var r=fv(e,t);wt(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(wt(e))n={type:e.name||e.toString(),exec:e};else{var r=fv(e.type,t);if(wt(r))n=ve(ve({},e),{exec:r});else if(r){var o=r.type||e.type;n=ve(ve(ve({},r),e),{type:o})}else n=e}return n}var Ps=function(e,t){if(!e)return[];var n=Lu(e)?e:[e];return n.map(function(r){return lu(r,t)})};function By(e){var t=lu(e);return ve(ve({id:Ct(e)?e:t.id},t),{type:t.type})}function v9(e,t){return{type:Th,event:typeof e=="function"?e:jy(e),delay:t?t.delay:void 0,id:t?.id}}function y9(e,t,n,r){var o={_event:n},s=qn(wt(e.event)?e.event(t,n.data,o):e.event),a;if(Ct(e.delay)){var c=r&&r[e.delay];a=wt(c)?c(t,n.data,o):c}else a=wt(e.delay)?e.delay(t,n.data,o):e.delay;return ve(ve({},e),{type:Th,_event:s,delay:a})}function Hy(e,t){return{to:t?t.to:void 0,type:zy,event:wt(e)?e:jy(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:wt(e)?e.name:d9(e)}}function b9(e,t,n,r){var o={_event:n},s=qn(wt(e.event)?e.event(t,n.data,o):e.event),a;if(Ct(e.delay)){var c=r&&r[e.delay];a=wt(c)?c(t,n.data,o):c}else a=wt(e.delay)?e.delay(t,n.data,o):e.delay;var u=wt(e.to)?e.to(t,n.data,o):e.to;return ve(ve({},e),{to:u,_event:s,event:s.data,delay:a})}function S9(e,t){return Hy(e,ve(ve({},t),{to:sl.Parent}))}function C9(){return S9(ER)}var w9=function(e,t,n){return ve(ve({},e),{value:Ct(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},E9=function(e){return{type:l9,sendId:e}};function x9(e){var t=By(e);return{type:Tt.Start,activity:t,exec:void 0}}function _9(e){var t=wt(e)?e:By(e);return{type:Tt.Stop,activity:t,exec:void 0}}function I9(e,t,n){var r=wt(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,s={type:Tt.Stop,activity:o};return s}var A9=function(e){return{type:wR,assignment:e}};function R9(e,t){var n=t?"#".concat(t):"";return"".concat(Tt.After,"(").concat(e,")").concat(n)}function gf(e,t){var n="".concat(Tt.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Tf(e,t){var n="".concat(Tt.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function Fc(e,t){var n="".concat(Tt.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function T9(e,t){return Hy(function(n,r){return r},ve(ve({},t),{to:e}))}function Vle(e){return{type:Tt.Choose,conds:e}}var Wle=function(e){var t,n,r=[];try{for(var o=lt(e),s=o.next();!s.done;s=o.next())for(var a=s.value,c=0;c<a.actions.length;){if(a.actions[c].type===wR){r.push(a.actions[c]),a.actions.splice(c,1);continue}c++}}catch(u){t={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function Vf(e,t,n,r,o,s,a){a===void 0&&(a=!1);var c=a?[]:Wle(o),u=c.length?h5(n,r,c,t):n,f=a?[n]:void 0,h=[];function m(C,b){var E;switch(b.type){case Th:{var x=y9(b,u,r,e.options.delays);return s&&typeof x.delay=="number"&&s(x,u,r),x}case zy:var I=b9(b,u,r,e.options.delays);return s&&I.to!==sl.Internal&&(C==="entry"?h.push(I):s(I,u,r)),I;case c9:{var R=w9(b,u,r);return s?.(R,u,r),R}case Ole:{var M=b,D=(E=M.conds.find(function(V){var ee=p9(V.cond,e.options.guards);return!ee||m9(e,ee,u,r,s?void 0:t)}))===null||E===void 0?void 0:E.actions;if(!D)return[];var N=vt(Vf(e,t,u,r,[{type:C,actions:Ps(bo(D),e.options.actions)}],s,a),2),T=N[0],L=N[1];return u=L,f?.push(u),T}case Mle:{var D=b.get(u,r.data);if(!D)return[];var $=vt(Vf(e,t,u,r,[{type:C,actions:Ps(bo(D),e.options.actions)}],s,a),2),G=$[0],z=$[1];return u=z,f?.push(u),G}case CR:{var R=I9(b,u,r);return s?.(R,n,r),R}case wR:{u=h5(u,r,[b],s?void 0:t),f?.push(u);break}default:var F=lu(b,e.options.actions),q=F.exec;if(s)s(F,u,r);else if(q&&f){var X=f.length-1,Se=ve(ve({},F),{exec:function(V){for(var ee=[],pe=1;pe<arguments.length;pe++)ee[pe-1]=arguments[pe];q.apply(void 0,Gt([f[X]],vt(ee),!1))}});F=Se}return F}}function g(C){var b,E,x=[];try{for(var I=lt(C.actions),R=I.next();!R.done;R=I.next()){var M=R.value,D=m(C.type,M);D&&(x=x.concat(D))}}catch(N){b={error:N}}finally{try{R&&!R.done&&(E=I.return)&&E.call(I)}finally{if(b)throw b.error}}return h.forEach(function(N){s(N,u,r)}),h.length=0,x}var v=sn(o.map(g));return[v,u]}const O9=Object.freeze(Object.defineProperty({__proto__:null,after:R9,assign:A9,cancel:E9,choose:Vle,done:gf,doneInvoke:Tf,error:Fc,forwardTo:T9,getActionFunction:fv,initEvent:Wa,raise:v9,resolveActions:Vf,resolveLog:w9,resolveRaise:y9,resolveSend:b9,resolveStop:I9,send:Hy,sendParent:S9,sendUpdate:C9,start:x9,stop:_9,toActionObject:lu,toActionObjects:Ps,toActivityDefinition:By},Symbol.toStringTag,{value:"Module"}));var hv=[],Nc=function(e,t){hv.push(e);var n=t(e);return hv.pop(),n},Gle=function(e){return e(hv[hv.length-1])};function M9(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[Ui]=function(){return this},t}function Kle(e,t,n,r){var o,s=g9(e.src),a=(o=t?.options.services)===null||o===void 0?void 0:o[s.type],c=e.data?dv(e.data,n,r):void 0,u=a?_R(a,e.id,c):M9(e.id);return u.meta=e,u}function _R(e,t,n){var r=M9(t);if(r.deferred=!0,au(e)){var o=r.state=Nc(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function Zle(e){try{return typeof e.send=="function"}catch{return!1}}function Yle(e){return Zle(e)&&"id"in e}function Qle(e){var t;return ve((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[Ui]=function(){return this},t),e)}var pv=function(e){return e.type==="atomic"||e.type==="final"};function P9(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function Wf(e){return P9(e).filter(function(t){return t.type!=="history"})}function N9(e){var t=[e];return pv(e)?t:t.concat(sn(Wf(e).map(N9)))}function vf(e,t){var n,r,o,s,a,c,u,f,h=new Set(e),m=K_(h),g=new Set(t);try{for(var v=lt(g),C=v.next();!C.done;C=v.next())for(var b=C.value,E=b.parent;E&&!g.has(E);)g.add(E),E=E.parent}catch($){n={error:$}}finally{try{C&&!C.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var x=K_(g);try{for(var I=lt(g),R=I.next();!R.done;R=I.next()){var b=R.value;if(b.type==="compound"&&(!x.get(b)||!x.get(b).length))m.get(b)?m.get(b).forEach(function(G){return g.add(G)}):b.initialStateNodes.forEach(function(G){return g.add(G)});else if(b.type==="parallel")try{for(var M=(a=void 0,lt(Wf(b))),D=M.next();!D.done;D=M.next()){var N=D.value;g.has(N)||(g.add(N),m.get(N)?m.get(N).forEach(function(G){return g.add(G)}):N.initialStateNodes.forEach(function(G){return g.add(G)}))}}catch(G){a={error:G}}finally{try{D&&!D.done&&(c=M.return)&&c.call(M)}finally{if(a)throw a.error}}}}catch($){o={error:$}}finally{try{R&&!R.done&&(s=I.return)&&s.call(I)}finally{if(o)throw o.error}}try{for(var T=lt(g),L=T.next();!L.done;L=T.next())for(var b=L.value,E=b.parent;E&&!g.has(E);)g.add(E),E=E.parent}catch($){u={error:$}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(u)throw u.error}}return g}function k9(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(pv(r))return r.key}else return{}}var o={};return n.forEach(function(s){o[s.key]=k9(s,t)}),o}function K_(e){var t,n,r=new Map;try{for(var o=lt(e),s=o.next();!s.done;s=o.next()){var a=s.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function Xle(e,t){var n=vf([e],t);return k9(e,K_(n))}function yf(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Jle(e){return Gt([],vt(new Set(sn(Gt([],vt(e.map(function(t){return t.ownEvents})),!1)))),!1)}function Fg(e,t){return t.type==="compound"?Wf(t).some(function(n){return n.type==="final"&&yf(e,n)}):t.type==="parallel"?Wf(t).every(function(n){return Fg(e,n)}):!1}function ece(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function p5(e){return new Set(sn(e.map(function(t){return t.tags})))}function D9(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(Ct(e)||Ct(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return D9(e[o],t[o])})}function tce(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function nce(e,t){var n=e.exec,r=ve(ve({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var So=(function(){function e(t){var n=this,r;this.actions=[],this.activities=u5,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||u5,this.meta=ece(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Jle(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t;var r=Wa;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=Wa;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),Ct(t))return[t];var o=Object.keys(t);return o.concat.apply(o,Gt([],vt(o.map(function(s){return r.toStrings(t[s],n).map(function(a){return s+n+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=SR(t,["configuration","transitions","tags","machine"]);return ve(ve({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return xR(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;zle(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!r?.transitions.length&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e})(),rce={deferEvents:!1},m5=(function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ve(ve({},rce),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e})(),Rw=new Map,oce=0,Wd={bookId:function(){return"x:".concat(oce++)},register:function(e,t){return Rw.set(e,t),e},get:function(e){return Rw.get(e)},free:function(e){Rw.delete(e)}};function IR(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function sce(){var e=IR();if(e&&"__xstate__"in e)return e.__xstate__}function ice(e){if(IR()){var t=sce();t&&t.register(e)}}function ace(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],s=!1,a=function(){if(!s){for(s=!0;o.length>0;){var f=o.shift();n=e.transition(n,f,u),r.forEach(function(h){return h.next(n)})}s=!1}},c=Qle({id:t.id,send:function(f){o.push(f),a()},getSnapshot:function(){return n},subscribe:function(f,h,m){var g=Rf(f,h,m);return r.add(g),g.next(n),{unsubscribe:function(){r.delete(g)}}}}),u={parent:t.parent,self:c,id:t.id||"anonymous",observers:r};return n=e.start?e.start(u):n,c}var Z_={sync:!1,autoForward:!1},_n;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(_n||(_n={}));var lce=(function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=_n.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(h,m){if(Lu(h))return r.batch(h),r.state;var g=qn(jy(h,m));if(r.status===_n.Stopped)return r.state;if(r.status!==_n.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(g.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
18
|
+
Event: `).concat(JSON.stringify(g.data)));return r.scheduler.schedule(function(){r.forward(g);var v=r._nextState(g);r.update(v,g)}),r._state},this.sendTo=function(h,m,g){var v=r.parent&&(m===sl.Parent||r.parent.id===m),C=v?r.parent:Ct(m)?m===sl.Internal?r:r.children.get(m)||Wd.get(m):Ble(m)?m:void 0;if(!C){if(!v)throw new Error("Unable to send event to child '".concat(m,"' from service '").concat(r.id,"'."));return}if("machine"in C){if(r.status!==_n.Stopped||r.parent!==C||r.state.done){var b=ve(ve({},h),{name:h.name===Tle?"".concat(Fc(r.id)):h.name,origin:r.sessionId});!g&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([C,b]):C.send(b)}}else!g&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([C,h.data]):C.send(h.data)},this._exec=function(h,m,g,v){v===void 0&&(v=r.machine.options.actions);var C=h.exec||fv(h.type,v),b=wt(C)?C:C?C.exec:h.exec;if(b)try{return b(m,g.data,r.machine.config.predictableActionArguments?{action:h,_event:g}:{action:h,state:r.state,_event:g})}catch(X){throw r.parent&&r.parent.send({type:"xstate.error",data:X}),X}switch(h.type){case Th:{var E=h;r.defer(E);break}case zy:var x=h;if(typeof x.delay=="number"){r.defer(x);return}else x.to?r.sendTo(x._event,x.to,g===Wa):r.send(x._event);break;case l9:r.cancel(h.sendId);break;case H_:{if(r.status!==_n.Running)return;var I=h.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[I.id||I.type])break;if(I.type===Tt.Invoke){var R=g9(I.src),M=r.machine.options.services?r.machine.options.services[R.type]:void 0,D=I.id,N=I.data,T="autoForward"in I?I.autoForward:!!I.forward;if(!M)return;var L=N?dv(N,m,g):void 0;if(typeof M=="string")return;var $=wt(M)?M(m,g.data,{data:L,src:R,meta:I.meta}):M;if(!$)return;var G=void 0;au($)&&($=L?$.withContext(L):$,G={autoForward:T}),r.spawn($,D,G)}else r.spawnActivity(I);break}case CR:{r.stopChild(h.activity.id);break}case c9:var z=h,F=z.label,q=z.value;F?r.logger(F,q):r.logger(q);break}};var o=ve(ve({},e.defaultOptions),n),s=o.clock,a=o.logger,c=o.parent,u=o.id,f=u!==void 0?u:t.id;this.id=f,this.logger=a,this.clock=s,this.parent=c,this.options=o,this.scheduler=new m5({deferEvents:this.options.deferEvents}),this.sessionId=Wd.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Nc(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var r,o;try{for(var s=lt(t.actions),a=s.next();!a.done;a=s.next()){var c=a.value;this.exec(c,t,n)}}catch(u){r={error:u}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}},e.prototype.update=function(t,n){var r,o,s,a,c,u,f,h,m=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===Wa)&&this.options.execute)this.execute(this.state);else for(var g=void 0;g=this._outgoingQueue.shift();)g[0].send(g[1]);if(this.children.forEach(function($){m.state.children[$.id]=$}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var v=lt(this.eventListeners),C=v.next();!C.done;C=v.next()){var b=C.value;b(t.event)}}catch($){r={error:$}}finally{try{C&&!C.done&&(o=v.return)&&o.call(v)}finally{if(r)throw r.error}}try{for(var E=lt(this.listeners),x=E.next();!x.done;x=E.next()){var b=x.value;b(t,t.event)}}catch($){s={error:$}}finally{try{x&&!x.done&&(a=E.return)&&a.call(E)}finally{if(s)throw s.error}}try{for(var I=lt(this.contextListeners),R=I.next();!R.done;R=I.next()){var M=R.value;M(this.state.context,this.state.history?this.state.history.context:void 0)}}catch($){c={error:$}}finally{try{R&&!R.done&&(u=I.return)&&u.call(I)}finally{if(c)throw c.error}}if(this.state.done){var D=t.configuration.find(function($){return $.type==="final"&&$.parent===m.machine}),N=D&&D.doneData?dv(D.doneData,t.context,n):void 0;this._doneEvent=Tf(this.id,N);try{for(var T=lt(this.doneListeners),L=T.next();!L.done;L=T.next()){var b=L.value;b(this._doneEvent)}}catch($){f={error:$}}finally{try{L&&!L.done&&(h=T.return)&&h.call(T)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),Wd.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===_n.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var o=this,s=Rf(t,n,r);this.listeners.add(s.next),this.status!==_n.NotStarted&&s.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),s.complete()};return this.status===_n.Stopped?s.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(s.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===_n.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===_n.Running)return this;this.machine._init(),Wd.register(this.sessionId,this),this.initialized=!0,this.status=_n.Running;var r=t===void 0?this.initialState:Nc(this,function(){return tce(t)?n.machine.resolveState(t):n.machine.resolveState(So.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,Wa)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){wt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,o,s,a,c,u,f,h;try{for(var m=lt(this.listeners),g=m.next();!g.done;g=m.next()){var v=g.value;this.listeners.delete(v)}}catch(T){t={error:T}}finally{try{g&&!g.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var C=lt(this.stopListeners),b=C.next();!b.done;b=C.next()){var v=b.value;v(),this.stopListeners.delete(v)}}catch(T){r={error:T}}finally{try{b&&!b.done&&(o=C.return)&&o.call(C)}finally{if(r)throw r.error}}try{for(var E=lt(this.contextListeners),x=E.next();!x.done;x=E.next()){var v=x.value;this.contextListeners.delete(v)}}catch(T){s={error:T}}finally{try{x&&!x.done&&(a=E.return)&&a.call(E)}finally{if(s)throw s.error}}try{for(var I=lt(this.doneListeners),R=I.next();!R.done;R=I.next()){var v=R.value;this.doneListeners.delete(v)}}catch(T){c={error:T}}finally{try{R&&!R.done&&(u=I.return)&&u.call(I)}finally{if(c)throw c.error}}if(!this.initialized)return this;this.initialized=!1,this.status=_n.Stopped,this._initialState=void 0;try{for(var M=lt(Object.keys(this.delayedEventsMap)),D=M.next();!D.done;D=M.next()){var N=D.value;this.clock.clearTimeout(this.delayedEventsMap[N])}}catch(T){f={error:T}}finally{try{D&&!D.done&&(h=M.return)&&h.call(M)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new m5({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=t._state)===null||r===void 0)&&r.done)){var o=qn({type:"xstate.stop"}),s=Nc(t,function(){var a=sn(Gt([],vt(t.state.configuration),!1).sort(function(m,g){return g.order-m.order}).map(function(m){return Ps(m.onExit,t.machine.options.actions)})),c=vt(Vf(t.machine,t.state,t.state.context,o,[{type:"exit",actions:a}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),u=c[0],f=c[1],h=new So({value:t.state.value,context:f,_event:o,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:u.filter(function(m){return!G_(m)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return h.changed=!0,h});t.update(s,o),t._stopChildren(),Wd.free(t.sessionId)}}),this},e.prototype.batch=function(t){var n=this;if(!(this.status===_n.NotStarted&&this.options.deferEvents)){if(this.status!==_n.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,s,a=n.state,c=!1,u=[],f=function(v){var C=qn(v);n.forward(C),a=Nc(n,function(){return n.machine.transition(a,C,void 0,r||void 0)}),u.push.apply(u,Gt([],vt(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(b){return nce(b,a)})),!1)),c=c||!!a.changed};try{for(var h=lt(t),m=h.next();!m.done;m=h.next()){var g=m.value;f(g)}}catch(v){o={error:v}}finally{try{m&&!m.done&&(s=h.return)&&s.call(h)}finally{if(o)throw o.error}}a.changed=c,a.actions=u,n.update(a,qn(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var o=qn(t);if(o.name.indexOf(c5)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(c5)===0}))throw o.data.data;var s=Nc(this,function(){return r.machine.transition(r.state,o,void 0,n||void 0)});return s},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var o=lt(this.forwardTo),s=o.next();!s.done;s=o.next()){var a=s.value,c=this.children.get(a);if(!c)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));c.send(t)}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),wt(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==_n.Running)return _R(t,n);if(f5(t))return this.spawnPromise(Promise.resolve(t),n);if(wt(t))return this.spawnCallback(t,n);if(Yle(t))return this.spawnActor(t,n);if(jle(t))return this.spawnObservable(t,n);if(au(t))return this.spawnMachine(t,ve(ve({},r),{id:n}));if(Ule(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var o=new e(t,ve(ve({},this.options),{parent:this,id:n.id||t.id})),s=ve(ve({},Z_),n);s.sync&&o.onTransition(function(c){r.send(ER,{state:c,id:o.id})});var a=o;return this.children.set(o.id,a),s.autoForward&&this.forwardTo.add(o.id),o.onDone(function(c){r.removeChild(o.id),r.send(qn(c,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var r=ace(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,o=this,s=!1,a;t.then(function(u){s||(a=u,o.removeChild(n),o.send(qn(Tf(n,u),{origin:n})))},function(u){if(!s){o.removeChild(n);var f=Fc(n,u);try{o.send(qn(f,{origin:n}))}catch{o.devTools&&o.devTools.send(f,o.state),o.machine.strict&&o.stop()}}});var c=(r={id:n,send:function(){},subscribe:function(u,f,h){var m=Rf(u,f,h),g=!1;return t.then(function(v){g||(m.next(v),!g&&m.complete())},function(v){g||m.error(v)}),{unsubscribe:function(){return g=!0}}},stop:function(){s=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},r[Ui]=function(){return this},r);return this.children.set(n,c),c},e.prototype.spawnCallback=function(t,n){var r,o=this,s=!1,a=new Set,c=new Set,u,f=function(g){u=g,c.forEach(function(v){return v(g)}),!s&&o.send(qn(g,{origin:n}))},h;try{h=t(f,function(g){a.add(g)})}catch(g){this.send(Fc(n,g))}if(f5(h))return this.spawnPromise(h,n);var m=(r={id:n,send:function(g){return a.forEach(function(v){return v(g)})},subscribe:function(g){var v=Rf(g);return c.add(v.next),{unsubscribe:function(){c.delete(v.next)}}},stop:function(){s=!0,wt(h)&&h()},toJSON:function(){return{id:n}},getSnapshot:function(){return u}},r[Ui]=function(){return this},r);return this.children.set(n,m),m},e.prototype.spawnObservable=function(t,n){var r,o=this,s,a=t.subscribe(function(u){s=u,o.send(qn(u,{origin:n}))},function(u){o.removeChild(n),o.send(qn(Fc(n,u),{origin:n}))},function(){o.removeChild(n),o.send(qn(Tf(n),{origin:n}))}),c=(r={id:n,send:function(){},subscribe:function(u,f,h){return t.subscribe(u,f,h)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return s},toJSON:function(){return{id:n}}},r[Ui]=function(){return this},r);return this.children.set(n,c),c},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(n){var r=n(this.state.context,t);this.spawnEffect(t.id,r)}},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[Ui]=function(){return this},r))},e.prototype.attachDev=function(){var t=IR();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ve(ve({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:ve({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}ice(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Ui]=function(){return this},e.prototype.getSnapshot=function(){return this.status===_n.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=L9,e})(),cce=function(e){return Ct(e)?ve(ve({},Z_),{name:e}):ve(ve(ve({},Z_),{name:Hle()}),e)};function Gd(e,t){var n=cce(t);return Gle(function(r){return r?r.spawn(e,n.name,n):_R(e,n.name)})}function L9(e,t){var n=new lce(e,t);return n}function uce(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Rm(e){return ve(ve({type:q_},e),{toJSON:function(){e.onDone,e.onError;var t=SR(e,["onDone","onError"]);return ve(ve({},t),{type:q_,src:uce(e.src)})}})}var Tm="",Y_="#",Tw="*",Sc={},Cc=function(e){return e[0]===Y_},dce=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},fce=(function(){function e(t,n,r,o){r===void 0&&(r="context"in t?t.context:void 0);var s=this,a;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(dce(),n),this.parent=o?.parent,this.key=this.config.key||o?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:u9),this.id=this.config.id||Gt([this.machine.key],vt(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?mf(this.config.states,function(f,h){var m,g=new e(f,{},void 0,{parent:s,key:h});return Object.assign(s.idMap,ve((m={},m[g.id]=g,m),g.idMap)),g}):Sc;var c=0;function u(f){var h,m;f.order=c++;try{for(var g=lt(P9(f)),v=g.next();!v.done;v=g.next()){var C=v.value;u(C)}}catch(b){h={error:b}}finally{try{v&&!v.done&&(m=g.return)&&m.call(g)}finally{if(h)throw h.error}}}u(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(f){var h=f.event;return h===Tm}):Tm in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=bo(this.config.entry||this.config.onEntry).map(function(f){return lu(f)}),this.onExit=bo(this.config.exit||this.config.onExit).map(function(f){return lu(f)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=bo(this.config.invoke).map(function(f,h){var m,g;if(au(f)){var v=Am(s.id,h);return s.machine.options.services=ve((m={},m[v]=f,m),s.machine.options.services),Rm({src:v,id:v})}else if(Ct(f.src)){var v=f.id||Am(s.id,h);return Rm(ve(ve({},f),{id:v,src:f.src}))}else if(au(f.src)||wt(f.src)){var v=f.id||Am(s.id,h);return s.machine.options.services=ve((g={},g[v]=f.src,g),s.machine.options.services),Rm(ve(ve({id:v},f),{src:v}))}else{var C=f.src;return Rm(ve(ve({id:Am(s.id,h)},f),{src:C}))}}),this.activities=bo(this.config.activities).concat(this.invoke).map(function(f){return By(f)}),this.transition=this.transition.bind(this),this.tags=bo(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||N9(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,s=r.activities,a=r.guards,c=r.services,u=r.delays;return new e(this.config,{actions:ve(ve({},o),t.actions),activities:ve(ve({},s),t.activities),guards:ve(ve({},a),t.guards),services:ve(ve({},c),t.services),delays:ve(ve({},u),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return wt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:mf(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===Tm,r=this.transitions.filter(function(o){var s=o.eventType===t;return n?s:s||o.eventType===Tw});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(s,a){var c=wt(s)?"".concat(t.id,":delay[").concat(a,"]"):s,u=R9(c,t.id);return t.onEntry.push(Hy(u,{delay:s})),t.onExit.push(E9(u)),u},o=Lu(n)?n.map(function(s,a){var c=r(s.delay,a);return ve(ve({},s),{event:c})}):sn(Object.keys(n).map(function(s,a){var c=n[s],u=Ct(c)?{target:c}:c,f=isNaN(+s)?s:+s,h=r(f,a);return bo(u).map(function(m){return ve(ve({},m),{event:h,delay:f})})}));return o.map(function(s){var a=s.delay;return ve(ve({},t.formatTransition(s)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof So?t.value:Af(t,this.delimiter);if(Ct(o)){var s=this.getStateNode(o).initial;return s!==void 0?this.getStateNodes((n={},n[o]=s,n)):[this,this.states[o]]}var a=Object.keys(o),c=[this];return c.push.apply(c,Gt([],vt(sn(a.map(function(u){return r.getStateNode(u).getStateNodes(o[u])}))),!1)),c},e.prototype.handles=function(t){var n=d9(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof So?t:So.create(t),r=Array.from(vf([],this.getStateNodes(n.value)));return new So(ve(ve({},n),{value:this.resolve(n.value),configuration:r,done:Fg(r,this),tags:p5(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var o=this.getStateNode(t),s=o.next(n,r);return!s||!s.transitions.length?this.next(n,r):s},e.prototype.transitionCompoundNode=function(t,n,r){var o=Object.keys(t),s=this.getStateNode(o[0]),a=s._transition(t[o[0]],n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionParallelNode=function(t,n,r){var o,s,a={};try{for(var c=lt(Object.keys(t)),u=c.next();!u.done;u=c.next()){var f=u.value,h=t[f];if(h){var m=this.getStateNode(f),g=m._transition(h,n,r);g&&(a[f]=g)}}}catch(x){o={error:x}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}var v=Object.keys(a).map(function(x){return a[x]}),C=sn(v.map(function(x){return x.transitions})),b=v.some(function(x){return x.transitions.length>0});if(!b)return this.next(n,r);var E=sn(Object.keys(a).map(function(x){return a[x].configuration}));return{transitions:C,exitSet:sn(v.map(function(x){return x.exitSet})),configuration:E,source:n,actions:sn(Object.keys(a).map(function(x){return a[x].actions}))}},e.prototype._transition=function(t,n,r){return Ct(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,qn(n))},e.prototype.next=function(t,n){var r,o,s=this,a=n.name,c=[],u=[],f;try{for(var h=lt(this.getCandidates(a)),m=h.next();!m.done;m=h.next()){var g=m.value,v=g.cond,C=g.in,b=t.context,E=C?Ct(C)&&Cc(C)?t.matches(Af(this.getStateNodeById(C).path,this.delimiter)):xR(Af(C,this.delimiter),kle(this.path.slice(0,-2))(t.value)):!0,x=!1;try{x=!v||m9(this.machine,v,b,n,t)}catch(M){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
19
|
+
`).concat(M.message))}if(x&&E){g.target!==void 0&&(u=g.target),c.push.apply(c,Gt([],vt(g.actions),!1)),f=g;break}}}catch(M){r={error:M}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}if(f){if(!u.length)return{transitions:[f],exitSet:[],configuration:t.value?[this]:[],source:t,actions:c};var I=sn(u.map(function(M){return s.getRelativeStateNodes(M,t.historyValue)})),R=!!f.internal;return{transitions:[f],exitSet:R?[]:sn(u.map(function(M){return s.getPotentiallyReenteringNodes(M)})),configuration:I,source:t,actions:c}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],r=this,o=t;r&&r!==o;)n.push(r),r=r.parent;return r!==o?[]:(n.push(o),n)},e.prototype.getActions=function(t,n,r,o,s,a,c){var u,f,h,m,g=this,v=a?vf([],this.getStateNodes(a.value)):[],C=new Set;try{for(var b=lt(Array.from(t).sort(function(z,F){return z.order-F.order})),E=b.next();!E.done;E=b.next()){var x=E.value;(!yf(v,x)||yf(r.exitSet,x)||x.parent&&C.has(x.parent))&&C.add(x)}}catch(z){u={error:z}}finally{try{E&&!E.done&&(f=b.return)&&f.call(b)}finally{if(u)throw u.error}}try{for(var I=lt(v),R=I.next();!R.done;R=I.next()){var x=R.value;(!yf(t,x)||yf(r.exitSet,x.parent))&&r.exitSet.push(x)}}catch(z){h={error:z}}finally{try{R&&!R.done&&(m=I.return)&&m.call(I)}finally{if(h)throw h.error}}r.exitSet.sort(function(z,F){return F.order-z.order});var M=Array.from(C).sort(function(z,F){return z.order-F.order}),D=new Set(r.exitSet),N=sn(M.map(function(z){var F=[];if(z.type!=="final")return F;var q=z.parent;if(!q.parent)return F;F.push(gf(z.id,z.doneData),gf(q.id,z.doneData?dv(z.doneData,o,s):void 0));var X=q.parent;return X.type==="parallel"&&Wf(X).every(function(Se){return Fg(r.configuration,Se)})&&F.push(gf(X.id)),F})),T=M.map(function(z){var F=z.onEntry,q=z.activities.map(function(X){return x9(X)});return{type:"entry",actions:Ps(c?Gt(Gt([],vt(F),!1),vt(q),!1):Gt(Gt([],vt(q),!1),vt(F),!1),g.machine.options.actions)}}).concat({type:"state_done",actions:N.map(function(z){return v9(z)})}),L=Array.from(D).map(function(z){return{type:"exit",actions:Ps(Gt(Gt([],vt(z.onExit),!1),vt(z.activities.map(function(F){return _9(F)})),!1),g.machine.options.actions)}}),$=L.concat({type:"transition",actions:Ps(r.actions,this.machine.options.actions)}).concat(T);if(n){var G=Ps(sn(Gt([],vt(t),!1).sort(function(z,F){return F.order-z.order}).map(function(z){return z.onExit})),this.machine.options.actions).filter(function(z){return!G_(z)});return $.concat({type:"stop",actions:G})}return $},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var s=qn(n),a;if(t instanceof So)a=r===void 0?t:this.resolveState(So.from(t,r));else{var c=Ct(t)?this.resolve(uv(this.getResolvedPath(t))):this.resolve(t),u=r??this.machine.context;a=this.resolveState(So.from(c,u))}if(this.strict&&!this.events.includes(s.name)&&!Lle(s.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(s.name,"'"));var f=this._transition(a.value,a,s)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},h=vf([],this.getStateNodes(a.value)),m=f.configuration.length?vf(h,f.configuration):h;return f.configuration=Gt([],vt(m),!1),this.resolveTransition(f,a,a.context,o,s)},e.prototype.resolveRaisedTransition=function(t,n,r,o){var s,a=t.actions;return t=this.transition(t,n,void 0,o),t._event=r,t.event=r.data,(s=t.actions).unshift.apply(s,Gt([],vt(a),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,s){var a,c,u,f,h=this;s===void 0&&(s=Wa);var m=t.configuration,g=!n||t.transitions.length>0,v=g?t.configuration:n?n.configuration:[],C=Fg(v,this),b=g?Xle(this.machine,m):void 0,E=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,x=this.getActions(new Set(v),C,t,r,s,n,o),I=n?ve({},n.activities):{};try{for(var R=lt(x),M=R.next();!M.done;M=R.next()){var D=M.value;try{for(var N=(u=void 0,lt(D.actions)),T=N.next();!T.done;T=N.next()){var L=T.value;L.type===H_?I[L.activity.id||L.activity.type]=L:L.type===CR&&(I[L.activity.id||L.activity.type]=!1)}}catch(ae){u={error:ae}}finally{try{T&&!T.done&&(f=N.return)&&f.call(N)}finally{if(u)throw u.error}}}}catch(ae){a={error:ae}}finally{try{M&&!M.done&&(c=R.return)&&c.call(R)}finally{if(a)throw a.error}}var $=vt(Vf(this,n,r,s,x,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),G=$[0],z=$[1],F=vt(Fle(G,G_),2),q=F[0],X=F[1],Se=G.filter(function(ae){var be;return ae.type===H_&&((be=ae.activity)===null||be===void 0?void 0:be.type)===q_}),V=Se.reduce(function(ae,be){return ae[be.activity.id]=Kle(be.activity,h.machine,z,s),ae},n?ve({},n.children):{}),ee=new So({value:b||n.value,context:z,_event:s,_sessionid:n?n._sessionid:null,historyValue:b?E?$le(E,b):void 0:n?n.historyValue:void 0,history:!b||t.source?n:void 0,actions:b?X:[],activities:b?I:n?n.activities:{},events:[],configuration:v,transitions:t.transitions,children:V,done:C,tags:p5(v),machine:this}),pe=r!==z;ee.changed=s.name===ER||pe;var ge=ee.history;ge&&delete ge.history;var Te=!C&&(this._transient||m.some(function(ae){return ae._transient}));if(!g&&(!Te||s.name===Tm))return ee;var j=ee;if(!C)for(Te&&(j=this.resolveRaisedTransition(j,{type:Ale},s,o));q.length;){var te=q.shift();j=this.resolveRaisedTransition(j,te._event,s,o)}var fe=j.changed||(ge?!!j.actions.length||pe||typeof ge.value!=typeof j.value||!D9(j.value,ge.value):void 0);return j.changed=fe,j.history=ge,j},e.prototype.getStateNode=function(t){if(Cc(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=Cc(t)?t.slice(Y_.length):t;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Cc(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=W_(t,this.delimiter).slice(),r=this;n.length;){var o=n.shift();if(!o.length)break;r=r.getStateNode(o)}return r},e.prototype.resolve=function(t){var n,r=this;if(!t)return this.initialStateValue||Sc;switch(this.type){case"parallel":return mf(this.initialStateValue,function(s,a){return s?r.getStateNode(a).resolve(t[a]||s):Sc});case"compound":if(Ct(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(n={},n[t]=o.initialStateValue,n):t}return Object.keys(t).length?mf(t,function(s,a){return s?r.getStateNode(a).resolve(s):Sc}):this.initialStateValue||{};default:return t||Sc}},e.prototype.getResolvedPath=function(t){if(Cc(t)){var n=this.machine.idMap[t.slice(Y_.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return W_(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=d5(this.states,function(r){return r.initialStateValue||Sc},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=pv(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var r=this.getStateNodes(t);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;Ct(n.target)?t=Cc(n.target)?uv(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,r){return r===void 0&&(r=!0),r?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(pv(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=Ug(this.initialStateValue);return sn(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=vt(t),r=n[0],o=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var s=this.getStateNode(r);if(s.type==="history")return s.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:d5(this.states,function(n,r){if(!t)return n.historyValue();var o=Ct(t)?void 0:t[r];return n.historyValue(o||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!t){var o=this.target;return o?sn(Ug(o).map(function(a){return r.getFromRelativePath(a)})):r.initialStateNodes}var s=Dle(r.path,"states")(t).current;return Ct(s)?[r.getStateNode(s)]:sn(Ug(s).map(function(a){return n.history==="deep"?r.getFromRelativePath(a):[r.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=sn(Object.keys(this.states).map(function(r){return t.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,r,o;if(this.__cache.events)return this.__cache.events;var s=this.states,a=new Set(this.ownEvents);if(s)try{for(var c=lt(Object.keys(s)),u=c.next();!u.done;u=c.next()){var f=u.value,h=s[f];if(h.states)try{for(var m=(r=void 0,lt(h.events)),g=m.next();!g.done;g=m.next()){var v=g.value;a.add("".concat(v))}}catch(C){r={error:C}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}}}catch(C){t={error:C}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(r){if(!Ct(r))return r;var o=r[0]===n.delimiter;if(o&&!n.parent)return n.getStateNodeByPath(r.slice(1));var s=o?n.key+r:r;if(n.parent)try{var a=n.parent.getStateNodeByPath(s);return a}catch(c){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
|
|
20
|
+
`).concat(c.message))}else return n.getStateNodeByPath(s)})},e.prototype.formatTransition=function(t){var n=this,r=qle(t.target),o="internal"in t?t.internal:r?r.some(function(u){return Ct(u)&&u[0]===n.delimiter}):!0,s=this.machine.options.guards,a=this.resolveTarget(r),c=ve(ve({},t),{actions:Ps(bo(t.actions)),cond:p9(t.cond,s),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ve(ve({},c),{target:c.target?c.target.map(function(u){return"#".concat(u.id)}):void 0,source:"#".concat(n.id)})}});return c},e.prototype.formatTransitions=function(){var t,n,r=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var s=this.config.on,a=Tw,c=s[a],u=c===void 0?[]:c,f=SR(s,[typeof a=="symbol"?a:a+""]);o=sn(Object.keys(f).map(function(I){var R=bc(I,f[I]);return R}).concat(bc(Tw,u)))}var h=this.config.always?bc("",this.config.always):[],m=this.config.onDone?bc(String(gf(this.id)),this.config.onDone):[],g=sn(this.invoke.map(function(I){var R=[];return I.onDone&&R.push.apply(R,Gt([],vt(bc(String(Tf(I.id)),I.onDone)),!1)),I.onError&&R.push.apply(R,Gt([],vt(bc(String(Fc(I.id)),I.onError)),!1)),R})),v=this.after,C=sn(Gt(Gt(Gt(Gt([],vt(m),!1),vt(g),!1),vt(o),!1),vt(h),!1).map(function(I){return bo(I).map(function(R){return r.formatTransition(R)})}));try{for(var b=lt(v),E=b.next();!E.done;E=b.next()){var x=E.value;C.push(x)}}catch(I){t={error:I}}finally{try{E&&!E.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}return C},e})();function Uu(e,t){return new fce(e,t)}var _s=A9,qy=C9,hce=T9,pce=_.useLayoutEffect;function g5(e){var t=_.useRef();return t.current||(t.current={v:e()}),t.current.v}var mv=function(){return mv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},mv.apply(this,arguments)},mce=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},gce=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(c){a={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function vce(e,t){var n=g5(function(){return typeof e=="function"?e():e}),r=t.context,o=t.guards,s=t.actions,a=t.activities,c=t.services,u=t.delays;t.state;var f=mce(t,["context","guards","actions","activities","services","delays","state"]),h=g5(function(){var m={context:r,guards:o,actions:s,activities:a,services:c,delays:u},g=n.withConfig(m,function(){return mv(mv({},n.context),r)});return L9(g,f)});return pce(function(){Object.assign(h.machine.options.actions,s),Object.assign(h.machine.options.guards,o),Object.assign(h.machine.options.activities,a),Object.assign(h.machine.options.services,c),Object.assign(h.machine.options.delays,u)},[s,o,a,c,u]),h}function yce(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=gce(t,2),o=r[0],s=o===void 0?{}:o,a=r[1],c=vce(e,s);return _.useEffect(function(){if(a){var u=c.subscribe(Rf(a));return function(){u.unsubscribe()}}},[a]),_.useEffect(function(){var u=s.state;return c.start(u?So.create(u):void 0),function(){c.stop(),c.status=_n.NotStarted}},[]),c}function bce(e){return e.status!==0?e.getSnapshot():e.machine.initialState}function Sce(e){return"state"in e&&"machine"in e}function Cce(e){return"state"in e}var wce=function(e,t){return e===t},Ece=function(e,t){if(Sce(e)){if(e.status===0&&t.current)return t.current;var n=bce(e);return t.current=e.status===0?n:null,n}return Cce(e)?e.state:void 0};function xce(e,t,n,r){n===void 0&&(n=wce);var o=_.useRef(null),s=_.useCallback(function(u){var f=e.subscribe(u).unsubscribe;return f},[e]),a=_.useCallback(function(){return Ece(e,o)},[e,r]),c=a9.useSyncExternalStoreWithSelector(s,a,a,t,n);return c}const _ce=e=>{if(e instanceof ao)return e;if(e instanceof Error){if(e.name==="InvalidStateError"){const{message:t,recoverySuggestion:n}=ru[Dt.PasskeyAlreadyExists];return new ao({name:Dt.PasskeyAlreadyExists,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=ru[Dt.PasskeyRegistrationCanceled];return new ao({name:Dt.PasskeyRegistrationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}}return QF(e)},Ice=async e=>{try{const t=XF();Au(t,Dt.PasskeyNotSupported);const n=IX(e),r=await navigator.credentials.create({publicKey:n});return MX(r),AX(r)}catch(t){throw _ce(t)}},Ace=e=>Cn(kn,Nn("StartWebAuthnRegistration"),Wn(),{...Dn,...e}),Rce=e=>Cn(kn,Nn("CompleteWebAuthnRegistration"),Wn(),{...Dn,...e});async function Tce(){const e=Ut.getConfig().Auth?.Cognito;et(e);const{userPoolEndpoint:t,userPoolId:n}=e,{tokens:r}=await my();Iu(r);const o=Ace({endpointResolver:ft({endpointOverride:t})}),{CredentialCreationOptions:s}=await o({region:dt(n),userAgentValue:It(Ve.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});OX(s);const a=await Ice(s);await Rce({endpointResolver:ft({endpointOverride:t})})({region:dt(n),userAgentValue:It(Ve.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:a})}const Oce=e=>Cn(kn,Nn("ListWebAuthnCredentials"),Wn(),{...Dn,...e});async function Mce(e,t){const n=e.getConfig().Auth?.Cognito;et(n);const{userPoolEndpoint:r,userPoolId:o}=n,{tokens:s}=await e.Auth.fetchAuthSession();Iu(s);const a=Oce({endpointResolver:ft({endpointOverride:r})}),{Credentials:c=[],NextToken:u}=await a({region:dt(o),userAgentValue:It(Ve.ListWebAuthnCredentials)},{AccessToken:s.accessToken.toString(),MaxResults:t?.pageSize,NextToken:t?.nextToken});return{credentials:c.map(h=>({credentialId:h.CredentialId,friendlyCredentialName:h.FriendlyCredentialName,relyingPartyId:h.RelyingPartyId,authenticatorAttachment:h.AuthenticatorAttachment,authenticatorTransports:h.AuthenticatorTransports,createdAt:h.CreatedAt?new Date(h.CreatedAt*1e3):void 0})),nextToken:u}}async function AR(e){return Mce(Ut,e)}const RR=e=>e.context.actorRef?.getSnapshot(),Gf=e=>RR(e)?.context,Pce={category:lo.AI,apis:[Ts.CreateConversation,Ts.DeleteConversation,Ts.ListConversations,Ts.UpdateConversation,Ts.OnMessage,Ts.SendMessage,Ts.Generation]},Nce={apis:[Ve.DeleteUser,Ve.UpdatePassword],category:lo.Auth},kce={apis:[Ve.SignUp,Ve.ConfirmSignUp,Ve.ResendSignUpCode,Ve.SignIn,Ve.ConfirmSignIn,Ve.FetchUserAttributes,Ve.SignOut,Ve.ResetPassword,Ve.ConfirmResetPassword,Ve.SignInWithRedirect],category:lo.Auth},Dce={apis:[Co.UploadData],category:lo.Storage},Lce={apis:[y_.NotifyMessageInteraction],category:lo.InAppMessaging},Uce={category:lo.Geo,apis:[xf.SearchByText,xf.SearchForSuggestions,xf.SearchByPlaceId]},Fce={category:lo.Geo,apis:[]},$ce={apis:[Co.UploadData],category:lo.Storage},zce={apis:[Co.UploadData,Co.Copy,Co.GetUrl,Co.List,Co.Remove,Co.GetDataAccess,Co.ListCallerAccessGrants],category:lo.Storage};function zr(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function zs(e){return typeof e=="string"||typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"}function jce(e){return zr(e)&&Object.prototype.toString.call(e)==="[object Map]"}function Bce(e){return zr(e)&&Object.prototype.toString.call(e)==="[object Set]"}function TR(e){if(e==null)return!0;if(zr(e)&&(jce(e)||Bce(e)))return!e.size;if(zr(e)&&(zs(e)||Array.isArray(e)))return!e.length;for(const t in e)if(js(e,t))return!1;return!0}function Hce(e){return Array.isArray(e)&&TR(e)}function qce(...e){return e.every(Hce)}function U9(e){return zr(e)&&TR(e)}function Vce(...e){return e.every(U9)}function js(e,t){return e!=null&&Object.prototype.hasOwnProperty.call(e,t)}function Bs(e){return typeof e=="function"}const Lt=(e,t)=>t?`${e}--${t}`:"",br=(e,t,n)=>n?`${e}--${t}`:"";function Wce(...e){}function Gce(e,t){const n={},r={};return Object.entries(e).forEach(([o,s])=>{t(o)?n[o]=s:r[o]=s}),[n,r]}const F9=({payload:e},t,n)=>{const{data:r,event:o}=e,{send:s}=t,{onSignIn:a,onSignOut:c}=n??{};switch(o){case"signedIn":{Bs(a)&&a(e);break}case"signInWithRedirect":{s("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{Bs(c)&&c(),s("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===Gi.NetworkError)return;s("SIGN_OUT");break}}},Kce=(e,t=F9)=>{const n=r=>t(r,e);return Ko.listen("auth",n,"authenticator-hub-handler")},$9=["+1","+7","+20","+27","+30","+31","+32","+33","+34","+36","+39","+40","+41","+43","+44","+45","+46","+47","+48","+49","+51","+52","+53","+54","+55","+56","+57","+58","+60","+61","+62","+63","+64","+65","+66","+81","+82","+84","+86","+90","+91","+92","+93","+94","+95","+98","+212","+213","+216","+218","+220","+221","+222","+223","+224","+225","+226","+227","+228","+229","+230","+231","+232","+233","+234","+235","+236","+237","+238","+239","+240","+241","+242","+243","+244","+245","+246","+248","+249","+250","+251","+252","+253","+254","+255","+256","+257","+258","+260","+261","+262","+263","+264","+265","+266","+267","+268","+269","+290","+291","+297","+298","+299","+345","+350","+351","+352","+353","+354","+355","+356","+357","+358","+359","+370","+371","+372","+373","+374","+375","+376","+377","+378","+379","+380","+381","+382","+385","+386","+387","+389","+420","+421","+423","+500","+501","+502","+503","+504","+505","+506","+507","+508","+509","+537","+590","+591","+593","+594","+595","+596","+597","+598","+599","+670","+672","+673","+674","+675","+676","+677","+678","+679","+680","+681","+682","+683","+685","+686","+687","+688","+689","+690","+691","+692","+850","+852","+853","+855","+856","+872","+880","+886","+960","+961","+962","+963","+964","+965","+966","+967","+968","+970","+971","+972","+973","+974","+975","+976","+977","+992","+993","+994","+995","+996","+998"],Vy={birthdate:{label:"Birthdate",placeholder:"Enter your Birthdate",type:"date",autocomplete:"bday",isRequired:!0},confirmation_code:{label:"Confirmation Code",placeholder:"Enter your Confirmation Code",type:"text",autocomplete:"one-time-code",isRequired:!0},confirm_password:{label:"Confirm Password",placeholder:"Please confirm your Password",type:"password",autocomplete:"new-password",isRequired:!0},email:{label:"Email",placeholder:"Enter your Email",type:"email",autocomplete:"username",isRequired:!0},family_name:{label:"Family Name",placeholder:"Enter your Family Name",type:"text",autocomplete:"family-name",isRequired:!0},given_name:{label:"Given Name",placeholder:"Enter your Given Name",type:"text",autocomplete:"given-name",isRequired:!0},middle_name:{label:"Middle Name",placeholder:"Enter your Middle Name",type:"text",autocomplete:"additional-name",isRequired:!0},name:{label:"Name",placeholder:"Enter your Name",type:"text",autocomplete:"name",isRequired:!0},nickname:{label:"Nickname",placeholder:"Enter your Nickname",type:"text",autocomplete:"tel",isRequired:!0},password:{label:"Password",placeholder:"Enter your Password",type:"password",autocomplete:"new-password",isRequired:!0},phone_number:{label:"Phone Number",placeholder:"Enter your Phone Number",type:"tel",autocomplete:"tel",dialCode:"+1",dialCodeList:$9,isRequired:!0},preferred_username:{label:"Preferred Username",placeholder:"Enter your Preferred Username",type:"text",isRequired:!0},profile:{label:"Profile",placeholder:"Add your Profile",type:"url",autocomplete:"url",isRequired:!0},website:{label:"Website",placeholder:"Add your Website",type:"url",autocomplete:"url",isRequired:!0},username:{label:"Username",placeholder:"Enter your Username",type:"text",autocomplete:"username",isRequired:!0}},Zce=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],Yce=(e,t)=>{if(t?.matches("federatedSignIn")){if(e.matches("signUpActor"))return"signUp";if(e.matches("signInActor"))return"signIn"}switch(!0){case e.matches("idle"):return"idle";case e.matches("setup"):return"setup";case e.matches("signOut"):return"signOut";case e.matches("authenticated"):return"authenticated";case t?.matches("confirmSignUp"):case t?.matches("resendSignUpCode"):return"confirmSignUp";case t?.matches("confirmSignIn"):return"confirmSignIn";case t?.matches("setupTotp.edit"):case t?.matches("setupTotp.submit"):return"setupTotp";case t?.matches("signIn.submit"):return t?.context.selectedAuthMethod!=null?"signInSelectAuthFactor":"signIn";case t?.matches("signIn.selectMethod"):return"signInSelectAuthFactor";case t?.matches("passkeyPrompt"):return"passkeyPrompt";case t?.matches("signIn"):return"signIn";case t?.matches("signUp"):case t?.matches("autoSignIn"):return"signUp";case t?.matches("forceChangePassword"):return"forceNewPassword";case t?.matches("forgotPassword"):return"forgotPassword";case t?.matches("confirmResetPassword"):return"confirmResetPassword";case t?.matches("selectUserAttributes"):return"verifyUser";case t?.matches("confirmVerifyUserAttribute"):return"confirmVerifyUser";case t?.matches("setupEmail"):return"setupEmail";case t?.matches("selectMfaType"):return"selectMfaType";case e.matches("getCurrentUser"):case t?.matches("fetchUserAttributes"):return"transition";default:return null}},Qce=e=>{const t=n=>r=>e({type:n,data:r});return{initializeMachine:t("INIT"),resendCode:t("RESEND"),selectAuthMethod:t("SELECT_METHOD"),signOut:t("SIGN_OUT"),submitForm:t("SUBMIT"),toShowAuthMethods:t("SHOW_AUTH_METHODS"),updateForm:t("CHANGE"),updateBlur:t("BLUR"),toFederatedSignIn:t("FEDERATED_SIGN_IN"),toForgotPassword:t("FORGOT_PASSWORD"),toSignIn:t("SIGN_IN"),toSignUp:t("SIGN_UP"),skipVerification:t("SKIP")}},Xce=e=>{const t=Gf(e)??{},{allowedMfaTypes:n,availableAuthMethods:r,challengeName:o,codeDeliveryDetails:s,preferredChallenge:a,remoteError:c,selectedAuthMethod:u,validationError:f,totpSecretCode:h=null,unverifiedUserAttributes:m,username:g}=t,{socialProviders:v=[],loginMechanisms:C}=e.context?.config??{},b=C?.[0],E=t?.user??e.context?.user,x=!!(f&&Object.keys(f).length>0),I=RR(e),R=e.hasTag("pending")||I?.hasTag("pending"),M=Yce(e,I),D=(T=>{switch(T){case"idle":case"setup":return"configuring";case"authenticated":return"authenticated";default:return"unauthenticated"}})(M);return{allowedMfaTypes:n,authStatus:D,availableAuthMethods:r,challengeName:o,codeDeliveryDetails:s,error:c,hasValidationErrors:x,isPending:R,loginMechanism:b,preferredChallenge:a,route:M,selectedAuthMethod:u,socialProviders:v,totpSecretCode:h,unverifiedUserAttributes:m,user:E,username:g,validationErrors:f}},Jce=({send:e,state:t})=>{const n=Qce(e),r=Xce(t);return{...n,...r}};var $c;(function(e){e.Apple="Apple",e.Amazon="Amazon",e.Facebook="Facebook",e.Google="Google"})($c||($c={}));var v5;(function(e){e.Email="email",e.PhoneNumber="phone_number"})(v5||(v5={}));const eue=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],tue=["username","email","phone_number"],z9=[...tue,...eue,"confirmation_code","password","confirm_password"],nue=e=>z9.includes(e),j9=e=>z9.includes(e),rue=e=>Array.isArray(e),oue=e=>e?rue(e)?e:[e]:null,sue=e=>{const t=e.trim().split("");for(let n=0;n<t.length;n++)n>0&&n<t.length-1&&(t[n]="*");return t.join("")},iue=e=>{if(e.length<4)return e;const t=e.split("");for(let n=0;n<t.length-4;n++)t[n]="*";return t.join("")},aue=e=>{const t=e.split("@");return`${sue(t[0])}@${t[1]}`},lue=(e,t)=>e==="Phone Number"?iue(t):aue(t),cue=e=>Zce.some(t=>e.includes(t)),uue=(e,t,n)=>encodeURI(`otpauth://totp/${e}:${t}?secret=${n}&issuer=${e}`);function due(e,...t){return Object.entries(e).reduce((n,[r,o])=>({...n,[r]:t.includes(r)?o:o?.trim()}),{})}const fue={ADD_PROFILE:"Add your Profile",ADD_WEBSITE:"Add your Website",BACK_SIGN_IN:"Back to Sign In",BIRTHDATE:"Birthdate",CHANGE_PASSWORD:"Change Password",CHANGING_PASSWORD:"Changing",CODE:"Code",CODE_ARRIVAL:"It may take a minute to arrive",CODE_EMAILED:"Your code is on the way. To log in, enter the code we emailed to",CODE_SENT:"Your code is on the way. To log in, enter the code we sent you",CODE_TEXTED:"Your code is on the way. To log in, enter the code we texted to",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Please confirm your Password",CONFIRM_RESET_PASSWORD_HEADING:"Reset your Password",CONFIRM_SIGNUP_HEADING:"Confirm Sign Up",CONFIRM_SMS:"Confirm SMS Code",CONFIRM_EMAIL:"Confirm Email Code",CONFIRM_MFA_DEFAULT:"Confirm MFA Code",CONFIRM_TOTP:"Confirm TOTP Code",CONFIRM:"Confirm",CONFIRMATION_CODE:"Confirmation Code",CONFIRMING:"Confirming",CONTINUE:"Continue",CONTINUE_WITHOUT_PASSKEY:"Continue without a Passkey",CREATE_ACCOUNT:"Create Account",CREATE_ACCOUNT_WITH_EMAIL_OTP:"Create account with Email OTP",CREATE_ACCOUNT_WITH_PASSWORD:"Create account with Password",CREATE_ACCOUNT_WITH_SMS_OTP:"Create account with SMS OTP",CREATE_PASSKEY:"Create a Passkey",CREATING_ACCOUNT:"Creating Account",EMAIL_ADDRESS:"Email",EMAIL_OTP:"Email Message",ENTER_BIRTHDATE:"Enter your Birthdate",ENTER_CODE:"Enter your code",ENTER_CONFIRMATION_CODE:"Enter your Confirmation Code",ENTER_EMAIL:"Enter your Email",ENTER_FAMILY_NAME:"Enter your Family Name",ENTER_GIVEN_NAME:"Enter your Given Name",ENTER_MIDDLE_NAME:"Enter your Middle Name",ENTER_NAME:"Enter your Name",ENTER_NICK_NAME:"Enter your Nickname",ENTER_PASSWORD:"Enter your Password",ENTER_PHONE_NUMBER:"Enter your Phone Number",ENTER_PREFERRED_USERNAME:"Enter your Preferred Username",ENTER_USERNAME:"Enter your username",ENTER_USERNAME_FIRST:"Please enter your username first",EXISTING_PASSKEYS:"Existing Passkeys",FAMILY_NAME:"Family Name",GIVEN_NAME:"Given Name",FORGOT_PASSWORD:"Forgot Password?",FORGOT_YOUR_PASSWORD:"Forgot your password?",HIDE_PASSWORD:"Hide password",LOADING:"Loading",LOGIN_NAME:"Username",MIDDLE_NAME:"Middle Name",MFA_SETUP_SELECTION:"Multi-Factor Authentication Setup",MFA_SELECTION:"Multi-Factor Authentication",NAME:"Name",NICKNAME:"Nickname",NEW_PASSWORD:"New password",OR:"or",OTHER_SIGN_IN_OPTIONS:"Other sign-in options",PASSKEY_AUTHENTICATION_CANCELED:"Passkey authentication was canceled. Please try again or use a different sign-in method.",PASSKEY_CREATED_SUCCESS:"Passkey created successfully!",PASSKEY_LABEL:"Passkey",PASSKEY_PROMPT_DESCRIPTION:"Passkeys are WebAuthn credentials that validate your identity using biometric data like touch or facial recognition or device authentication like passwords or PINs, serving as a secure password replacement.",PASSKEY_PROMPT_HEADING:"Sign in faster with Passkey",PASSKEY_REGISTERED:"Your passkey has been successfully registered.",PASSKEY_REGISTRATION_FAILED:"Failed to create passkey. Please try again.",PASSWORD:"Password",PASSWORDLESS_NOT_ENABLED:"Passwordless authentication is not enabled for this account. Please contact your administrator or use password sign-in.",PHONE_NUMBER:"Phone Number",PREFERRED_USERNAME:"Preferred Username",PROFILE:"Profile",REGISTERING:"Registering",RESEND_CODE:"Resend Code",RESET_PASSWORD_HEADING:"Reset your password",RESET_PASSWORD:"Reset Password",SEND_CODE:"Send code",CODE_DELIVERY_FAILED:"Unable to send verification code. Please try again.",VERIFICATION_CODE_EXPIRED:"Your verification code has expired. Please request a new code.",VERIFICATION_CODE_INVALID:"The verification code you entered is incorrect. Please try again.",SENDING:"Sending",SELECT_MFA_TYPE:"Select MFA Type",SETUP_ANOTHER_PASSKEY:"Setup another Passkey",SETUP_EMAIL:"Setup Email",SETUP_TOTP:"Setup TOTP",SHOW_PASSWORD:"Show password",SIGN_IN_BUTTON:"Sign in",SIGN_IN_TAB:"Sign In",SIGN_IN_WITH_AMAZON:"Sign In with Amazon",SIGN_IN_WITH_APPLE:"Sign In with Apple",SIGN_IN_WITH_EMAIL:"Sign In with Email",SIGN_IN_WITH_FACEBOOK:"Sign In with Facebook",SIGN_IN_WITH_GOOGLE:"Sign In with Google",SIGN_IN_WITH_PASSKEY:"Sign In with Passkey",SIGN_IN_WITH_PASSWORD:"Sign In with Password",SIGN_IN_WITH_SMS:"Sign In with SMS",SIGN_IN:"Sign in to your account",SIGN_UP_BUTTON:"Create a new account",SIGNING_IN_BUTTON:"Signing in",SKIP:"Skip",SMS_MFA:"Text Message (SMS)",SUBMIT:"Submit",SUBMITTING:"Submitting",SOFTWARE_TOKEN_MFA:"Authenticator App (TOTP)",UPPERCASE_COPY:"COPY",USERNAME:"Username",VERIFY_CONTACT:"Verify Contact",VERIFY_HEADING:"Account recovery requires verified contact information",VERIFY:"Verify",WE_EMAILED:"We Emailed You",WE_SENT_CODE:"We Sent A Code",WE_TEXTED:"We Texted You",WEBSITE:"Website"},$g={...fue},Ee={...$g};function ye(e){return zF.get(e)}const OR=e=>{const t=e?.context.config?.loginMechanisms,[n]=t??["username"];return n},hue=e=>{const t={...e};for(const[n,r]of Object.entries(e)){const{label:o,placeholder:s}=r;t[n]={...r,label:o?ye(o):void 0,placeholder:s?ye(s):void 0}}return t},pue=e=>Object.entries(e).sort((t,n)=>{const r=t[1].order||Number.MAX_VALUE,o=n[1].order||Number.MAX_VALUE;return r-o}).filter(t=>t[1]!==void 0),mue="+1",Hs=e=>{let t=Vy[e];const{type:n}=t;return n==="tel"&&(t={...t,dialCode:mue}),t},Wy=e=>{const t=OR(e);return{...Hs(t),autocomplete:"username"}},zg=e=>({confirmation_code:{...Hs("confirmation_code"),label:"Code *",placeholder:"Code"}}),gue=e=>{const t=e.context.actorRef?.getSnapshot()?.context,n=t?.availableAuthMethods,r=t?.preferredChallenge,o=!n?.length||n.length===1&&n[0]==="PASSWORD"||n.length>1&&(!r||r==="PASSWORD"),s={username:{...Wy(e)}};return o&&(s.password={...Hs("password"),autocomplete:"current-password"}),s},vue=e=>{const{loginMechanisms:t,signUpAttributes:n}=e.context.config,r=OR(e),s=e.context.actorRef?.getSnapshot()?.context?.availableAuthMethods,a=s&&s.length>1,c=Array.from(new Set([...t,"password","confirm_password",...n])),u={};for(const f of c)if(j9(f)){const h=f===r?Wy(e):Hs(f),m=a&&(f==="email"||f==="phone_number"||f==="password"||f==="confirm_password");u[f]={...h,...m&&{isRequired:!1}}}else console.debug(`Authenticator does not have a default implementation for ${f}. Customize SignUp FormFields to add your own.`);return u},yue=e=>({confirmation_code:{...Hs("confirmation_code"),placeholder:"Enter your code"}}),bue=e=>{const t=OR(e),{label:n}=Vy[t];return{username:{...Wy(e),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},Sue=e=>({...zg(),password:{...Hs("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...Hs("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),Cue=e=>{const t=RR(e),{missingAttributes:n}=t.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),o={};for(const s of r)j9(s)?o[s]={...Hs(s)}:console.debug(`Authenticator does not have a default implementation for ${s}. Customize ForceNewPassword FormFields to add your own.`);return o},wue=e=>({email:Hs("email")}),Eue={signIn:gue,signUp:vue,confirmSignUp:yue,confirmSignIn:zg,forceNewPassword:Cue,forgotPassword:bue,confirmResetPassword:Sue,confirmVerifyUser:zg,setupEmail:wue,setupTotp:zg},xue=(e,t)=>{const n=Eue[e];return n(t)},_ue=(e,t)=>{const n=Gf(t)?.formFields?.[e];return!n||Object.keys(n).length===0?{}:Object.entries(n).reduce((r,[o,s])=>{if((e==="signIn"||e==="forgotPassword")&&o==="username"){const c={...Wy(t),...s};return{...r,[o]:c}}else if(nue(o)){const c={...Vy[o],...s};return{...r,[o]:c}}else return{...r,[o]:s}},{})},Iue=(e,t)=>{const n=xue(e,t),r=_ue(e,t),o={...n,...r};return delete o.QR,hue(o)},Aue=e=>e.map(t=>{const n=t[0],r={...t[1],order:void 0};return[n,r]}),Rue=(e,t)=>{const n=Iue(e,t);return Aue(pue(n))},Tue=e=>{switch(e){case"EMAIL_OTP":return ye(Ee.CONFIRM_EMAIL);case"SMS_MFA":return ye(Ee.CONFIRM_SMS);case"SOFTWARE_TOKEN_MFA":return ye(Ee.CONFIRM_TOTP);default:return ye(Ee.CONFIRM_MFA_DEFAULT)}},Oue=e=>{const{DeliveryMedium:t,Destination:n}=e??{},r=t==="EMAIL",o=t==="SMS",s=ye(Ee.CODE_ARRIVAL);return r||o?`${ye(r?Ee.CODE_EMAILED:Ee.CODE_TEXTED)} ${n}. ${s}.`:`${ye(Ee.CODE_SENT)}. ${s}.`},Mue=e=>{const{DeliveryMedium:t}=e??{},n=t==="EMAIL";return ye(!n&&t==="SMS"?Ee.WE_SENT_CODE:n?Ee.WE_EMAILED:Ee.WE_TEXTED)},Pue={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},Nue=(e,t)=>ye(`Sign ${e==="signIn"?"In":"Up"} with ${Pue[t]}`),kue=e=>ye(e==="MFA_SETUP"?Ee.MFA_SETUP_SELECTION:Ee.MFA_SELECTION),Due=e=>{switch(e){case"email":return ye(Ee.EMAIL_ADDRESS);case"phone_number":return ye(Ee.PHONE_NUMBER);default:return ye(Ee.USERNAME)}},Lue=e=>{switch(e){case"EMAIL":return ye($g.EMAIL_OTP);case"SMS":return ye($g.SMS_MFA);case"TOTP":return ye($g.SOFTWARE_TOKEN_MFA);default:return ye(e)}},Rn={getBackToSignInText:()=>ye(Ee.BACK_SIGN_IN),getChangePasswordText:()=>ye(Ee.CHANGE_PASSWORD),getChangingText:()=>ye(Ee.CHANGING_PASSWORD),getConfirmText:()=>ye(Ee.CONFIRM),getConfirmingText:()=>ye(Ee.CONFIRMING),getContinueText:()=>ye(Ee.CONTINUE),getCopyText:()=>ye(Ee.UPPERCASE_COPY),getHidePasswordText:()=>ye(Ee.HIDE_PASSWORD),getLoadingText:()=>ye(Ee.LOADING),getOrText:()=>ye(Ee.OR),getResendCodeText:()=>ye(Ee.RESEND_CODE),getSendCodeText:()=>ye(Ee.SEND_CODE),getSendingText:()=>ye(Ee.SENDING),getShowPasswordText:()=>ye(Ee.SHOW_PASSWORD),getSubmitText:()=>ye(Ee.SUBMIT),getSubmittingText:()=>ye(Ee.SUBMITTING),getSignInTabText:()=>ye(Ee.SIGN_IN_TAB),getSignUpTabText:()=>ye(Ee.CREATE_ACCOUNT),getForgotPasswordText:e=>ye(e?Ee.FORGOT_PASSWORD:Ee.FORGOT_YOUR_PASSWORD),getSigningInText:()=>ye(Ee.SIGNING_IN_BUTTON),getSignInText:()=>ye(Ee.SIGN_IN_BUTTON),getCreatingAccountText:()=>ye(Ee.CREATING_ACCOUNT),getCreateAccountText:()=>ye(Ee.CREATE_ACCOUNT),getCreateAccountWithEmailText:()=>ye(Ee.CREATE_ACCOUNT_WITH_EMAIL_OTP),getCreateAccountWithPasswordText:()=>ye(Ee.CREATE_ACCOUNT_WITH_PASSWORD),getCreateAccountWithSmsText:()=>ye(Ee.CREATE_ACCOUNT_WITH_SMS_OTP),getDeliveryMessageText:Oue,getDeliveryMethodText:Mue,getChallengeText:Tue,getResetYourPasswordText:()=>ye(Ee.RESET_PASSWORD),getSetupEmailText:()=>ye(Ee.SETUP_EMAIL),getSetupTotpText:()=>ye(Ee.SETUP_TOTP),getSetupTotpInstructionsText:()=>ye("Copy and paste the secret key below into an authenticator app and then enter the code in the text field below."),getCopiedText:()=>ye("COPIED"),getSignInWithFederationText:Nue,getMfaTypeLabelByValue:Lue,getSelectMfaTypeByChallengeName:kue,getSelectMfaTypeText:()=>ye(Ee.SELECT_MFA_TYPE),getSkipText:()=>ye(Ee.SKIP),getVerifyText:()=>ye(Ee.VERIFY),getVerifyContactText:()=>ye(Ee.VERIFY_CONTACT),getAccountRecoveryInfoText:()=>ye(Ee.VERIFY_HEADING),getPasskeyPromptHeadingText:()=>ye(Ee.PASSKEY_PROMPT_HEADING),getPasskeyPromptDescriptionText:()=>ye(Ee.PASSKEY_PROMPT_DESCRIPTION),getCreatePasskeyText:()=>ye(Ee.CREATE_PASSKEY),getRegisteringText:()=>ye(Ee.REGISTERING),getContinueWithoutPasskeyText:()=>ye(Ee.CONTINUE_WITHOUT_PASSKEY),getPasskeyCreatedSuccessText:()=>ye(Ee.PASSKEY_CREATED_SUCCESS),getPasskeyRegisteredText:()=>ye(Ee.PASSKEY_REGISTERED),getPasskeyRegistrationFailedText:()=>ye(Ee.PASSKEY_REGISTRATION_FAILED),getPasskeyLabelText:()=>ye(Ee.PASSKEY_LABEL),getExistingPasskeysText:()=>ye(Ee.EXISTING_PASSKEYS),getSetupAnotherPasskeyText:()=>ye(Ee.SETUP_ANOTHER_PASSKEY),getSignInWithPasswordText:()=>ye(Ee.SIGN_IN_WITH_PASSWORD),getSignInWithEmailText:()=>ye(Ee.SIGN_IN_WITH_EMAIL),getSignInWithSmsText:()=>ye(Ee.SIGN_IN_WITH_SMS),getSignInWithPasskeyText:()=>ye(Ee.SIGN_IN_WITH_PASSKEY),getOtherSignInOptionsText:()=>ye(Ee.OTHER_SIGN_IN_OPTIONS),getEnterUsernameFirstText:()=>ye(Ee.ENTER_USERNAME_FIRST),getUsernameLabelByLoginMechanism:Due,getInvalidEmailText:()=>ye("Please enter a valid email"),getRequiredFieldText:()=>ye("This field is required")};var Ow,y5;function B9(){if(y5)return Ow;y5=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,s=Array(o);++r<o;)s[r]=n(t[r],r,t);return s}return Ow=e,Ow}var Mw,b5;function Uue(){if(b5)return Mw;b5=1;var e=pR(),t=i9(),n=1,r=2;function o(s,a,c,u){var f=c.length,h=f,m=!u;if(s==null)return!h;for(s=Object(s);f--;){var g=c[f];if(m&&g[2]?g[1]!==s[g[0]]:!(g[0]in s))return!1}for(;++f<h;){g=c[f];var v=g[0],C=s[v],b=g[1];if(m&&g[2]){if(C===void 0&&!(v in s))return!1}else{var E=new e;if(u)var x=u(C,b,v,s,a,E);if(!(x===void 0?t(b,C,n|r,u,E):x))return!1}}return!0}return Mw=o,Mw}var Pw,S5;function H9(){if(S5)return Pw;S5=1;var e=Ys();function t(n){return n===n&&!e(n)}return Pw=t,Pw}var Nw,C5;function Fue(){if(C5)return Nw;C5=1;var e=H9(),t=s9();function n(r){for(var o=t(r),s=o.length;s--;){var a=o[s],c=r[a];o[s]=[a,c,e(c)]}return o}return Nw=n,Nw}var kw,w5;function q9(){if(w5)return kw;w5=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return kw=e,kw}var Dw,E5;function $ue(){if(E5)return Dw;E5=1;var e=Uue(),t=Fue(),n=q9();function r(o){var s=t(o);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(a){return a===o||e(a,o,s)}}return Dw=r,Dw}var Lw,x5;function MR(){if(x5)return Lw;x5=1;var e=Du(),t=wl(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return Lw=r,Lw}var Uw,_5;function PR(){if(_5)return Uw;_5=1;var e=Qs(),t=MR(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(s,a){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||a!=null&&s in Object(a)}return Uw=o,Uw}var Fw,I5;function zue(){if(I5)return Fw;I5=1;var e=hR(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var s=function(){var a=arguments,c=o?o.apply(this,a):a[0],u=s.cache;if(u.has(c))return u.get(c);var f=r.apply(this,a);return s.cache=u.set(c,f)||u,f};return s.cache=new(n.Cache||e),s}return n.Cache=e,Fw=n,Fw}var $w,A5;function jue(){if(A5)return $w;A5=1;var e=zue(),t=500;function n(r){var o=e(r,function(a){return s.size===t&&s.clear(),a}),s=o.cache;return o}return $w=n,$w}var zw,R5;function Bue(){if(R5)return zw;R5=1;var e=jue(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var s=[];return o.charCodeAt(0)===46&&s.push(""),o.replace(t,function(a,c,u,f){s.push(u?f.replace(n,"$1"):c||a)}),s});return zw=r,zw}var jw,T5;function Hue(){if(T5)return jw;T5=1;var e=Dy(),t=B9(),n=Qs(),r=MR(),o=e?e.prototype:void 0,s=o?o.toString:void 0;function a(c){if(typeof c=="string")return c;if(n(c))return t(c,a)+"";if(r(c))return s?s.call(c):"";var u=c+"";return u=="0"&&1/c==-1/0?"-0":u}return jw=a,jw}var Bw,O5;function NR(){if(O5)return Bw;O5=1;var e=Hue();function t(n){return n==null?"":e(n)}return Bw=t,Bw}var Hw,M5;function Gy(){if(M5)return Hw;M5=1;var e=Qs(),t=PR(),n=Bue(),r=NR();function o(s,a){return e(s)?s:t(s,a)?[s]:n(r(s))}return Hw=o,Hw}var qw,P5;function Oh(){if(P5)return qw;P5=1;var e=MR();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return qw=t,qw}var Vw,N5;function kR(){if(N5)return Vw;N5=1;var e=Gy(),t=Oh();function n(r,o){o=e(o,r);for(var s=0,a=o.length;r!=null&&s<a;)r=r[t(o[s++])];return s&&s==a?r:void 0}return Vw=n,Vw}var Ww,k5;function que(){if(k5)return Ww;k5=1;var e=kR();function t(n,r,o){var s=n==null?void 0:e(n,r);return s===void 0?o:s}return Ww=t,Ww}var Gw,D5;function Vue(){if(D5)return Gw;D5=1;function e(t,n){return t!=null&&n in Object(t)}return Gw=e,Gw}var Kw,L5;function Wue(){if(L5)return Kw;L5=1;var e=Gy(),t=mR(),n=Qs(),r=Fy(),o=vR(),s=Oh();function a(c,u,f){u=e(u,c);for(var h=-1,m=u.length,g=!1;++h<m;){var v=s(u[h]);if(!(g=c!=null&&f(c,v)))break;c=c[v]}return g||++h!=m?g:(m=c==null?0:c.length,!!m&&o(m)&&r(v,m)&&(n(c)||t(c)))}return Kw=a,Kw}var Zw,U5;function Gue(){if(U5)return Zw;U5=1;var e=Vue(),t=Wue();function n(r,o){return r!=null&&t(r,o,e)}return Zw=n,Zw}var Yw,F5;function Kue(){if(F5)return Yw;F5=1;var e=i9(),t=que(),n=Gue(),r=PR(),o=H9(),s=q9(),a=Oh(),c=1,u=2;function f(h,m){return r(h)&&o(m)?s(a(h),m):function(g){var v=t(g,h);return v===void 0&&v===m?n(g,h):e(m,v,c|u)}}return Yw=f,Yw}var Qw,$5;function DR(){if($5)return Qw;$5=1;function e(t){return t}return Qw=e,Qw}var Xw,z5;function Zue(){if(z5)return Xw;z5=1;function e(t){return function(n){return n?.[t]}}return Xw=e,Xw}var Jw,j5;function Yue(){if(j5)return Jw;j5=1;var e=kR();function t(n){return function(r){return e(r,n)}}return Jw=t,Jw}var eE,B5;function Que(){if(B5)return eE;B5=1;var e=Zue(),t=Yue(),n=PR(),r=Oh();function o(s){return n(s)?e(r(s)):t(s)}return eE=o,eE}var tE,H5;function Xue(){if(H5)return tE;H5=1;var e=$ue(),t=Kue(),n=DR(),r=Qs(),o=Que();function s(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):o(a)}return tE=s,tE}var nE,q5;function V9(){if(q5)return nE;q5=1;var e=Cl(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return nE=t,nE}var rE,V5;function LR(){if(V5)return rE;V5=1;var e=V9();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return rE=t,rE}var oE,W5;function W9(){if(W5)return oE;W5=1;var e=LR(),t=Rh(),n=Object.prototype,r=n.hasOwnProperty;function o(s,a,c){var u=s[a];(!(r.call(s,a)&&t(u,c))||c===void 0&&!(a in s))&&e(s,a,c)}return oE=o,oE}var sE,G5;function Jue(){if(G5)return sE;G5=1;var e=W9(),t=Gy(),n=Fy(),r=Ys(),o=Oh();function s(a,c,u,f){if(!r(a))return a;c=t(c,a);for(var h=-1,m=c.length,g=m-1,v=a;v!=null&&++h<m;){var C=o(c[h]),b=u;if(C==="__proto__"||C==="constructor"||C==="prototype")return a;if(h!=g){var E=v[C];b=f?f(E,C,v):void 0,b===void 0&&(b=r(E)?E:n(c[h+1])?[]:{})}e(v,C,b),v=v[C]}return a}return sE=s,sE}var iE,K5;function ede(){if(K5)return iE;K5=1;var e=kR(),t=Jue(),n=Gy();function r(o,s,a){for(var c=-1,u=s.length,f={};++c<u;){var h=s[c],m=e(o,h);a(m,h)&&t(f,n(h,o),m)}return f}return iE=r,iE}var aE,Z5;function UR(){if(Z5)return aE;Z5=1;var e=o9(),t=e(Object.getPrototypeOf,Object);return aE=t,aE}var lE,Y5;function tde(){if(Y5)return lE;Y5=1;var e=Jz(),t=UR(),n=n9(),r=t9(),o=Object.getOwnPropertySymbols,s=o?function(a){for(var c=[];a;)e(c,n(a)),a=t(a);return c}:r;return lE=s,lE}var cE,Q5;function nde(){if(Q5)return cE;Q5=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return cE=e,cE}var uE,X5;function rde(){if(X5)return uE;X5=1;var e=Ys(),t=bR(),n=nde(),r=Object.prototype,o=r.hasOwnProperty;function s(a){if(!e(a))return n(a);var c=t(a),u=[];for(var f in a)f=="constructor"&&(c||!o.call(a,f))||u.push(f);return u}return uE=s,uE}var dE,J5;function FR(){if(J5)return dE;J5=1;var e=r9(),t=rde(),n=$y();function r(o){return n(o)?e(o,!0):t(o)}return dE=r,dE}var fE,eL;function ode(){if(eL)return fE;eL=1;var e=e9(),t=tde(),n=FR();function r(o){return e(o,n,t)}return fE=r,fE}var hE,tL;function sde(){if(tL)return hE;tL=1;var e=B9(),t=Xue(),n=ede(),r=ode();function o(s,a){if(s==null)return{};var c=e(r(s),function(u){return[u]});return a=t(a),n(s,c,function(u,f){return a(u,f[0])})}return hE=o,hE}var ide=sde();const ade=Eu(ide),lde=!0,cde="",Kf=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),ude=(e,t)=>{switch(t){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return t.startsWith("custom:")}},dde=e=>{const{phone_number:t,...n}=ade(e,ude);if(zs(t)&&t!==cde){const{country_code:r}=e;return{...n,phone_number:Kf(r,t)}}return n},fde=(e,t,n,r)=>{const{password:o,...s}=t,a=dde(s),c=r&&r!=="PASSWORD";let u=a;r==="SMS_OTP"&&a.email&&(u={...a,email:""});const f={autoSignIn:c?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:r}:lde,userAttributes:{...n==="phone_number"?{...u,phone_number:e}:u}};return{username:e,password:c?void 0:o,options:f}},hde=({formValues:e,loginMechanisms:t})=>{const n=e.__authMethod;if(n==="SMS_OTP"){const{country_code:o,phone_number:s}=e;return Kf(o,s)}if(n==="EMAIL_OTP")return e.email;if(t.includes("username"))return e.username;const r=t[0];if(r==="phone_number"){const{country_code:o,phone_number:s}=e;return Kf(o,s)}return e[r]},pde=(e,t)=>{const n=[],r=t!==void 0;n.push("PASSWORD"),(r||e?.emailOtpEnabled)&&n.push("EMAIL_OTP"),(r||e?.smsOtpEnabled)&&n.push("SMS_OTP"),(r||e?.webAuthnEnabled)&&n.push("WEB_AUTHN");const o=t??[],s=n.filter(a=>!o.includes(a));if(s.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return s},{assign:Qe}=O9,mde=Qe({actorDoneData:void 0}),gde=Qe({challengeName:void 0}),vde=Qe({missingAttributes:void 0}),yde=Qe({remoteError:void 0}),bde=Qe({formValues:e=>({username:e.formValues?.username})}),Sde=Qe({touched:{}}),Cde=Qe({user:void 0}),wde=Qe({validationError:{}}),Ede=Qe({totpSecretCode:(e,{data:t})=>{const{sharedSecret:n}=t.nextStep?.totpSetupDetails??{};return n}}),xde=Qe({allowedMfaTypes:(e,{data:t})=>t.nextStep?.allowedMFATypes}),_de=Qe({step:"SIGN_IN"}),Ide=Qe({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Ade=Qe({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Rde=Qe({challengeName:(e,{data:t})=>{const{signInStep:n}=t.nextStep;switch(n){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),Tde=Qe({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:r,country_code:o}=e;return n==="phone_number"?Kf(o,r):r}}),Ode=Qe({username:hde}),Mde=Qe({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:r,country_code:o}=e;return n==="phone_number"?Kf(o,r):r}}),Pde=Qe({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),Nde=Qe({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),kde=Qe({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),Dde=Qe({missingAttributes:(e,{data:t})=>t.nextStep?.missingAttributes}),Lde=Qe({validationError:(e,{data:t})=>t}),Ude=Qe({remoteError:(e,{data:t})=>{if(t.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const n=t?.message||"";return n.includes("USER_AUTH flow not enabled")?ye(Ee.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?ye(Ee.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?ye(Ee.VERIFICATION_CODE_INVALID):n.includes("session is expired")?ye(Ee.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?ye(Ee.PASSKEY_AUTHENTICATION_CANCELED):n||t}}),Fde=Qe({user:(e,{data:t})=>t}),nL=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),$de=Qe({codeDeliveryDetails:(e,{data:t})=>t?.nextStep?.codeDeliveryDetails?nL(t.nextStep.codeDeliveryDetails):nL(t)}),zde=Qe({formValues:(e,{data:t})=>{const{name:n,value:r}=t;return{...e.formValues,[n]:r}}}),jde=Qe({formValues:(e,{data:t})=>due({...e.formValues,...t},"password")}),Bde=Qe({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),Hde=Qe({unverifiedUserAttributes:(e,{data:t})=>{const n=t||e.fetchedUserAttributes;if(!n)return{};const{email:r,phone_number:o}=n;return{...r&&{email:r},...o&&{phone_number:o}}}}),qde=Qe({selectedUserAttribute:void 0}),Vde=Qe({selectedUserAttribute:e=>e.formValues?.unverifiedAttr}),Wde=Qe({step:"CONFIRM_SIGN_UP"}),Gde=Qe({selectedAuthMethod:(e,{data:t})=>t.method}),Kde=Qe({selectedAuthMethod:(e,{data:t})=>t?.__authMethod||"PASSWORD"}),Zde=Qe({step:"SELECT_AUTH_METHOD"}),Yde=Qe({fetchedUserAttributes:(e,t)=>t.data}),Qde=Qe({hasExistingPasskeys:(e,t)=>t.data}),Xde=Qe({hasExistingPasskeys:!1}),Mh={clearActorDoneData:mde,clearChallengeName:gde,clearError:yde,clearFormValues:bde,clearHasExistingPasskeys:Xde,clearMissingAttributes:vde,clearSelectedUserAttribute:qde,clearTouched:Sde,clearUser:Cde,clearValidationError:wde,handleBlur:Bde,handleInput:zde,handleSubmit:jde,setAllowedMfaTypes:xde,setChallengeName:Rde,setCodeDeliveryDetails:$de,setFetchedUserAttributes:Yde,setFieldErrors:Lde,setHasExistingPasskeys:Qde,setMissingAttributes:Dde,setNextResetPasswordStep:kde,setNextSignInStep:Pde,setNextSignUpStep:Nde,setRemoteError:Ude,setConfirmAttributeCompleteStep:Ade,setConfirmSignUpSignUpStep:Wde,setSelectAuthMethodStep:Zde,setSelectedAuthMethod:Gde,setSelectedAuthMethodFromForm:Kde,setShouldVerifyUserAttributeStep:Ide,setSelectedUserAttribute:Vde,setSignInStep:_de,setTotpSecretCode:Ede,setUser:Fde,setUnverifiedUserAttributes:Hde,setUsernameForgotPassword:Tde,setUsernameSignIn:Mde,setUsernameSignUp:Ode},Jde=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],efe=(e,{data:t})=>t?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",tfe=(e,{data:t})=>t?.nextStep?.signInStep==="RESET_PASSWORD",nfe=(e,{data:t})=>t?.nextStep.signInStep==="CONFIRM_SIGN_UP",rfe=(e,{data:t})=>t?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",ofe=(e,{data:t})=>t?.nextStep.signUpStep==="DONE"&&e.step==="CONFIRM_SIGN_UP",sfe=(e,{data:t})=>t?.nextStep.signInStep==="DONE",ife=(e,{data:t})=>t?.nextStep.signUpStep==="DONE",afe=(e,{data:t})=>t?.nextStep.resetPasswordStep==="DONE",lfe=(e,{data:t})=>t?.step==="CONFIRM_ATTRIBUTE_COMPLETE",cfe=(e,{data:t})=>t?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",ufe=(e,{data:t})=>t?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",dfe=(e,{data:t})=>t?.step==="RESET_PASSWORD",ffe=(e,{data:t})=>t?.step==="CONFIRM_SIGN_UP",hfe=({step:e})=>Jde.includes(e),pfe=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",mfe=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",gfe=({step:e})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e),vfe=({step:e})=>e==="RESET_PASSWORD",yfe=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",bfe=({step:e})=>e==="CONFIRM_SIGN_UP",Sfe=(e,t)=>{const n=t.data||e.fetchedUserAttributes;if(!n)return!1;const{email:r,phone_number:o,phone_number_verified:s,email_verified:a}=n;return!r&&!o?!1:(a===void 0||a==="false")&&(s===void 0||s==="false")},Cfe=(e,{data:t})=>t.message==="User is already confirmed.",wfe=({availableAuthMethods:e,preferredChallenge:t,selectedAuthMethod:n})=>e&&e.length>1&&(!t||n===null),Efe=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:n}=e||{};return!n||t?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},xfe=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:n}=e||{};return!n||t?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},_fe=({passwordless:e})=>e?.passkeyRegistrationPrompts!=null,Ife=({selectedAuthMethod:e,step:t})=>e!=null&&t==="SELECT_AUTH_METHOD",Ky={hasCompletedAttributeConfirmation:lfe,hasCompletedResetPassword:afe,hasCompletedSignIn:sfe,hasCompletedSignUp:ife,hasPasskeyRegistrationPrompts:_fe,isConfirmSignUpStep:ffe,isConfirmUserAttributeStep:cfe,isResetPasswordStep:dfe,isShouldConfirmUserAttributeStep:ufe,isUserAlreadyConfirmed:Cfe,shouldAutoSignIn:rfe,shouldManualSignIn:ofe,shouldConfirmResetPassword:yfe,shouldConfirmSignIn:hfe,shouldConfirmSignInWithNewPassword:efe,shouldConfirmSignUp:bfe,shouldConfirmSignUpFromSignIn:nfe,shouldResetPassword:vfe,shouldResetPasswordFromSignIn:tfe,shouldReturnToSelectMethod:Ife,shouldSelectAuthMethod:wfe,shouldSetupTotp:pfe,shouldSetupEmail:mfe,shouldSelectMfaType:gfe,shouldVerifyAttribute:Sfe,shouldPromptPasskeyRegistration:Efe,shouldPromptPasskeyRegistrationAfterSignup:xfe};var pE,rL;function G9(){if(rL)return pE;rL=1;var e=LR(),t=Rh();function n(r,o,s){(s!==void 0&&!t(r[o],s)||s===void 0&&!(o in r))&&e(r,o,s)}return pE=n,pE}var mE,oL;function Afe(){if(oL)return mE;oL=1;function e(t){return function(n,r,o){for(var s=-1,a=Object(n),c=o(n),u=c.length;u--;){var f=c[t?u:++s];if(r(a[f],f,a)===!1)break}return n}}return mE=e,mE}var gE,sL;function Rfe(){if(sL)return gE;sL=1;var e=Afe(),t=e();return gE=t,gE}var bf={exports:{}};bf.exports;var iL;function Tfe(){return iL||(iL=1,(function(e,t){var n=ts(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===r,a=s?n.Buffer:void 0,c=a?a.allocUnsafe:void 0;function u(f,h){if(h)return f.slice();var m=f.length,g=c?c(m):new f.constructor(m);return f.copy(g),g}e.exports=u})(bf,bf.exports)),bf.exports}var vE,aL;function Ofe(){if(aL)return vE;aL=1;var e=Xz();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return vE=t,vE}var yE,lL;function Mfe(){if(lL)return yE;lL=1;var e=Ofe();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return yE=t,yE}var bE,cL;function Pfe(){if(cL)return bE;cL=1;function e(t,n){var r=-1,o=t.length;for(n||(n=Array(o));++r<o;)n[r]=t[r];return n}return bE=e,bE}var SE,uL;function Nfe(){if(uL)return SE;uL=1;var e=Ys(),t=Object.create,n=(function(){function r(){}return function(o){if(!e(o))return{};if(t)return t(o);r.prototype=o;var s=new r;return r.prototype=void 0,s}})();return SE=n,SE}var CE,dL;function kfe(){if(dL)return CE;dL=1;var e=Nfe(),t=UR(),n=bR();function r(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return CE=r,CE}var wE,fL;function Dfe(){if(fL)return wE;fL=1;var e=$y(),t=wl();function n(r){return t(r)&&e(r)}return wE=n,wE}var EE,hL;function Lfe(){if(hL)return EE;hL=1;var e=Du(),t=UR(),n=wl(),r="[object Object]",o=Function.prototype,s=Object.prototype,a=o.toString,c=s.hasOwnProperty,u=a.call(Object);function f(h){if(!n(h)||e(h)!=r)return!1;var m=t(h);if(m===null)return!0;var g=c.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&a.call(g)==u}return EE=f,EE}var xE,pL;function K9(){if(pL)return xE;pL=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return xE=e,xE}var _E,mL;function Ufe(){if(mL)return _E;mL=1;var e=W9(),t=LR();function n(r,o,s,a){var c=!s;s||(s={});for(var u=-1,f=o.length;++u<f;){var h=o[u],m=a?a(s[h],r[h],h,s,r):void 0;m===void 0&&(m=r[h]),c?t(s,h,m):e(s,h,m)}return s}return _E=n,_E}var IE,gL;function Ffe(){if(gL)return IE;gL=1;var e=Ufe(),t=FR();function n(r){return e(r,t(r))}return IE=n,IE}var AE,vL;function $fe(){if(vL)return AE;vL=1;var e=G9(),t=Tfe(),n=Mfe(),r=Pfe(),o=kfe(),s=mR(),a=Qs(),c=Dfe(),u=gR(),f=dR(),h=Ys(),m=Lfe(),g=yR(),v=K9(),C=Ffe();function b(E,x,I,R,M,D,N){var T=v(E,I),L=v(x,I),$=N.get(L);if($){e(E,I,$);return}var G=D?D(T,L,I+"",E,x,N):void 0,z=G===void 0;if(z){var F=a(L),q=!F&&u(L),X=!F&&!q&&g(L);G=L,F||q||X?a(T)?G=T:c(T)?G=r(T):q?(z=!1,G=t(L,!0)):X?(z=!1,G=n(L,!0)):G=[]:m(L)||s(L)?(G=T,s(T)?G=C(T):(!h(T)||f(T))&&(G=o(L))):z=!1}z&&(N.set(L,G),M(G,L,R,D,N),N.delete(L)),e(E,I,G)}return AE=b,AE}var RE,yL;function zfe(){if(yL)return RE;yL=1;var e=pR(),t=G9(),n=Rfe(),r=$fe(),o=Ys(),s=FR(),a=K9();function c(u,f,h,m,g){u!==f&&n(f,function(v,C){if(g||(g=new e),o(v))r(u,f,C,h,c,m,g);else{var b=m?m(a(u,C),v,C+"",u,f,g):void 0;b===void 0&&(b=v),t(u,C,b)}},s)}return RE=c,RE}var TE,bL;function jfe(){if(bL)return TE;bL=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return TE=e,TE}var OE,SL;function Bfe(){if(SL)return OE;SL=1;var e=jfe(),t=Math.max;function n(r,o,s){return o=t(o===void 0?r.length-1:o,0),function(){for(var a=arguments,c=-1,u=t(a.length-o,0),f=Array(u);++c<u;)f[c]=a[o+c];c=-1;for(var h=Array(o+1);++c<o;)h[c]=a[c];return h[o]=s(f),e(r,this,h)}}return OE=n,OE}var ME,CL;function Hfe(){if(CL)return ME;CL=1;function e(t){return function(){return t}}return ME=e,ME}var PE,wL;function qfe(){if(wL)return PE;wL=1;var e=Hfe(),t=V9(),n=DR(),r=t?function(o,s){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return PE=r,PE}var NE,EL;function Vfe(){if(EL)return NE;EL=1;var e=800,t=16,n=Date.now;function r(o){var s=0,a=0;return function(){var c=n(),u=t-(c-a);if(a=c,u>0){if(++s>=e)return arguments[0]}else s=0;return o.apply(void 0,arguments)}}return NE=r,NE}var kE,xL;function Wfe(){if(xL)return kE;xL=1;var e=qfe(),t=Vfe(),n=t(e);return kE=n,kE}var DE,_L;function Gfe(){if(_L)return DE;_L=1;var e=DR(),t=Bfe(),n=Wfe();function r(o,s){return n(t(o,s,e),o+"")}return DE=r,DE}var LE,IL;function Kfe(){if(IL)return LE;IL=1;var e=Rh(),t=$y(),n=Fy(),r=Ys();function o(s,a,c){if(!r(c))return!1;var u=typeof a;return(u=="number"?t(c)&&n(a,c.length):u=="string"&&a in c)?e(c[a],s):!1}return LE=o,LE}var UE,AL;function Zfe(){if(AL)return UE;AL=1;var e=Gfe(),t=Kfe();function n(r){return e(function(o,s){var a=-1,c=s.length,u=c>1?s[c-1]:void 0,f=c>2?s[2]:void 0;for(u=r.length>3&&typeof u=="function"?(c--,u):void 0,f&&t(s[0],s[1],f)&&(u=c<3?void 0:u,c=1),o=Object(o);++a<c;){var h=s[a];h&&r(o,h,a,u)}return o})}return UE=n,UE}var FE,RL;function Yfe(){if(RL)return FE;RL=1;var e=zfe(),t=Zfe(),n=t(function(r,o,s){e(r,o,s)});return FE=n,FE}var Qfe=Yfe();const Xfe=Eu(Qfe),Zy=async(e,t,n,r)=>{const o=await Promise.all(r.map(a=>a(e,t,n))),s=Xfe({},...o);return TR(s)?Promise.resolve():Promise.reject(s)},Jfe=8,ehe=e=>Array.isArray(e),the=e=>{if(e)return ehe(e)?Object.entries(e).map(([t,n])=>Object.keys(n)[0]):Object.keys(e)},Zi={async getAmplifyConfig(){const e=S$.getConfig(),t=e.Auth?.Cognito,{loginWith:n,userAttributes:r}=e.Auth?.Cognito??{},o=n?Object.entries(n).filter(([f,h])=>f!=="oauth").filter(([f,h])=>!!h).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,s=the(r),a=n?.oauth?.providers?n.oauth.providers?.map(f=>f.toString().toLowerCase()):void 0,c=e.Auth?.Cognito?.passwordless,u={emailOtpEnabled:c?.emailOtpEnabled??c?.email_otp_enabled===!0,smsOtpEnabled:c?.smsOtpEnabled??c?.sms_otp_enabled===!0,webAuthnEnabled:!!(c?.webAuthn??c?.web_authn),preferredChallenge:c?.preferredChallenge??c?.preferred_challenge};return{...t,loginMechanisms:o,signUpAttributes:s,socialProviders:a,passwordlessCapabilities:u}},getCurrentUser:yy,handleSignIn:WA,handleSignUp:dee,handleConfirmSignIn:u$,handleConfirmSignUp:yee,handleForgotPasswordSubmit:pee,handleForgotPassword:c$,handleResendSignUpCode:gee,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,n){const{password:r}=e,{password:o}=t;if(!o||!n)return null;const s=[],a=n.minLength??Jfe;return r.length<a&&s.push(`Password must have at least ${a} characters`),n.requireLowercase&&!/[a-z]/.test(r)&&s.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(r)&&s.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(r)&&s.push("Password must have numbers"),n.requireSpecialCharacters&&!cue(r)&&s.push("Password must have special characters"),s.length!==0?{password:s}:null},async validateConfirmPassword(e,t){const{password:n,confirm_password:r}=e,{confirm_password:o,password:s}=t;if(!n&&!r)return null;if((n||r)&&n!==r&&(o&&s||n?.length>=6&&r?.length>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){},async validateRequiredFieldsForAuthMethod(e){const t=e.__authMethod;if(!t)return null;if(t==="EMAIL_OTP"&&!e.email)return{email:"Email is required for Email OTP sign up"};if(t==="SMS_OTP"&&!e.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(t==="PASSWORD"){const n={};return e.password||(n.password="Password is required"),e.confirm_password||(n.confirm_password="Confirm Password is required"),Object.keys(n).length>0?n:null}return null}};function nhe({services:e}){return Uu({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...Mh,sendUpdate:qy()},guards:Ky,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:n}){const{confirmation_code:r,password:o}=t;return e.handleForgotPasswordSubmit({confirmationCode:r,newPassword:o,username:n})},validateFields(t){return Zy(t.formValues,t.touched,t.passwordSettings,[Zi.validateFormPassword,Zi.validateConfirmPassword])}}})}const Z9=e=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:e},onError:{actions:"setRemoteError",target:e}}}),rhe=e=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e)?"mfa_type":e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",jg={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},Om=e=>({initial:"edit",exit:e,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...jg}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function ohe({services:e}){return Uu({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...Z9("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const t=await AR();return t.credentials&&t.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:jg.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},jg.onError]}}}},confirmSignIn:{...Om(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...jg}}}}}},setupTotp:{...Om(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Om(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Om(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Mh,sendUpdate:qy()},guards:Ky,services:{async fetchUserAttributes(){return g$()},resetPassword({username:t}){return c$({username:t})},handleResendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},resendSignInCode({username:t,selectedAuthMethod:n,availableAuthMethods:r,preferredChallenge:o}){const s=n??o??r?.[0]??"PASSWORD";return e.handleSignIn({username:t,options:{authFlowType:"USER_AUTH",preferredChallenge:s}})},handleSignIn({formValues:t,username:n,selectedAuthMethod:r,availableAuthMethods:o,preferredChallenge:s}){const a=r??s??o?.[0]??"PASSWORD";if(a==="PASSWORD"){const{password:c}=t;return e.handleSignIn({username:n,password:c})}else return e.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},confirmSignIn({formValues:t,step:n}){const r=rhe(n),{[r]:o}=t;return e.handleConfirmSignIn({challengeResponse:o})},async handleForceChangePassword({formValues:t}){let{password:n,phone_number:r,country_code:o,confirm_password:s,username:a,...c}=t,u;return r&&(u=`${o}${r}`.replace(/[^A-Z0-9+]/gi,""),c={...c,phone_number:u}),u$({challengeResponse:n,options:{userAttributes:c}})},signInWithRedirect(t,{data:n}){return m$(n)},async validateFields(t){return Zy(t.formValues,t.touched,t.passwordSettings,[Zi.validateFormPassword,Zi.validateConfirmPassword])}}})}const she={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},ihe={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function ahe({services:e}){return Uu({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...ihe}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const t=await AR();return t.credentials&&t.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...Z9("signUp")},resetPassword:{invoke:{src:"resetPassword",...she}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:t=>({challengeName:t.challengeName,missingAttributes:t.missingAttributes,remoteError:t.remoteError,step:t.step,totpSecretCode:t.totpSecretCode,username:t.username,unverifiedUserAttributes:t.unverifiedUserAttributes,allowedMfaTypes:t.allowedMfaTypes})}}},{actions:{...Mh,sendUpdate:qy()},guards:Ky,services:{autoSignIn(){return VA()},async fetchUserAttributes(){return g$()},confirmSignUp({formValues:t,username:n}){const{confirmation_code:r}=t,o={username:n,confirmationCode:r};return e.handleConfirmSignUp(o)},resendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},signInWithRedirect(t,{data:n}){return m$(n)},handleSignUp(t){const{formValues:n,loginMechanisms:r,username:o,selectedAuthMethod:s,preferredChallenge:a}=t,c=r[0],f=fde(o,n,c,s??a);return e.handleSignUp(f)},async validateSignUp(t){return Zy(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateRequiredFieldsForAuthMethod,e.validateCustomSignUp])}}})}const lhe=()=>Uu({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>Zee()}});function che(){return Uu({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...Mh,sendUpdate:qy()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){return Jee({userAttributeKey:e})},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){return Cee({confirmationCode:e,userAttributeKey:t})},async validateFields(e){return Zy(e.formValues,e.touched,e.passwordSettings,[Zi.validateFormPassword,Zi.validateConfirmPassword])}}})}const Mm=(e,t)=>{const n=pde(e.passwordlessCapabilities,e.config?.passwordless?.hiddenAuthMethods),r=e.config?.passwordless?.preferredAuthMethod??e.passwordlessCapabilities?.preferredChallenge;return{...e.actorDoneData,step:e?.actorDoneData?.step??t,formValues:{},touched:{},validationError:{},formFields:e.config?.formFields,loginMechanisms:e.config?.loginMechanisms,passwordSettings:e.config?.passwordSettings,signUpAttributes:e.config?.signUpAttributes,socialProviders:e.config?.socialProviders,availableAuthMethods:n,preferredChallenge:r,passwordless:e.config?.passwordless}},{choose:uhe,stop:dhe}=O9,Kd=e=>dhe(e),fhe={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},hhe={always:{actions:"configure",target:"getConfig"}};function phe(e){const{useNextWaitConfig:t,...n}=e??{};return Uu({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:Zi,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:t?hhe:fhe,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:Kd("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...Mh,forwardToActor:uhe([{cond:"hasActor",actions:hce(({actorRef:o})=>o)}]),setActorDoneData:_s({actorDoneData:(o,s)=>({challengeName:s.data.challengeName,codeDeliveryDetails:s.data.codeDeliveryDetails,missingAttributes:s.data.missingAttributes,remoteError:s.data.remoteError,username:s.data.username,step:s.data.step,totpSecretCode:s.data.totpSecretCode,unverifiedUserAttributes:s.data.unverifiedUserAttributes,allowedMfaTypes:s.data.allowedMfaTypes})}),applyAmplifyConfig:_s({passwordlessCapabilities:(o,{data:s})=>s.passwordlessCapabilities,config(o,{data:s}){const{loginMechanisms:a=s.loginMechanisms??[],signUpAttributes:c=s.signUpAttributes??[],socialProviders:u=s.socialProviders??[],initialState:f,formFields:h,passwordSettings:m=s.passwordFormat??{},passwordless:g}=o.config;return a.length===0&&a.push("username"),{formFields:mhe(h)??{},initialState:f,loginMechanisms:a,passwordSettings:m,passwordless:g,signUpAttributes:c,socialProviders:u}}}),spawnSignInActor:_s({actorRef:(o,s)=>{const{services:a}=o,c=ohe({services:a}).withContext(Mm(o,"SIGN_IN"));return Gd(c,{name:"signInActor"})}}),spawnSignUpActor:_s({actorRef:(o,s)=>{const{services:a}=o,c=ahe({services:a}).withContext(Mm(o,"SIGN_UP"));return Gd(c,{name:"signUpActor"})}}),spawnForgotPasswordActor:_s({actorRef:(o,s)=>{const{services:a}=o,c=nhe({services:a}).withContext(Mm(o,"FORGOT_PASSWORD"));return Gd(c,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:_s({actorRef:o=>{const s=che().withContext(Mm(o));return Gd(s,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:_s({actorRef:o=>{const s=lhe().withContext({user:o?.user});return Gd(s,{name:"signOutActor"})}}),configure:_s((o,s)=>{const{services:a,...c}=U9(n)?s.data??{}:n;return{services:{...Zi,...a},config:c}}),setHasSetup:_s({hasSetup:!0})},guards:{...Ky,hasActor:({actorRef:o})=>!!o,isInitialStateSignUp:({config:o})=>o.initialState==="signUp",isInitialStateResetPassword:({config:o})=>o.initialState==="forgotPassword",shouldSetup:({hasSetup:o})=>!o,hasUser:({user:o})=>!!o},services:{getAmplifyConfig:({services:o})=>o.getAmplifyConfig(),handleGetCurrentUser:({services:o})=>o.getCurrentUser()}})}function mhe(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{let r=e[t][n];r.required=r.isRequired})}),e}const ghe={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},vhe={red:{10:{value:"hsl(0, 75%, 95%)"},20:{value:"hsl(0, 75%, 85%)"},40:{value:"hsl(0, 75%, 75%)"},60:{value:"hsl(0, 50%, 50%)"},80:{value:"hsl(0, 95%, 30%)"},90:{value:"hsl(0, 100%, 20%)"},100:{value:"hsl(0, 100%, 15%)"}},orange:{10:{value:"hsl(30, 75%, 95%)"},20:{value:"hsl(30, 75%, 85%)"},40:{value:"hsl(30, 75%, 75%)"},60:{value:"hsl(30, 50%, 50%)"},80:{value:"hsl(30, 95%, 30%)"},90:{value:"hsl(30, 100%, 20%)"},100:{value:"hsl(30, 100%, 15%)"}},yellow:{10:{value:"hsl(60, 75%, 95%)"},20:{value:"hsl(60, 75%, 85%)"},40:{value:"hsl(60, 75%, 75%)"},60:{value:"hsl(60, 50%, 50%)"},80:{value:"hsl(60, 95%, 30%)"},90:{value:"hsl(60, 100%, 20%)"},100:{value:"hsl(60, 100%, 15%)"}},green:{10:{value:"hsl(130, 60%, 95%)"},20:{value:"hsl(130, 60%, 90%)"},40:{value:"hsl(130, 44%, 63%)"},60:{value:"hsl(130, 43%, 46%)"},80:{value:"hsl(130, 33%, 37%)"},90:{value:"hsl(130, 27%, 29%)"},100:{value:"hsl(130, 22%, 23%)"}},teal:{10:{value:"hsl(190, 75%, 95%)"},20:{value:"hsl(190, 75%, 85%)"},40:{value:"hsl(190, 70%, 70%)"},60:{value:"hsl(190, 50%, 50%)"},80:{value:"hsl(190, 95%, 30%)"},90:{value:"hsl(190, 100%, 20%)"},100:{value:"hsl(190, 100%, 15%)"}},blue:{10:{value:"hsl(220, 95%, 95%)"},20:{value:"hsl(220, 85%, 85%)"},40:{value:"hsl(220, 70%, 70%)"},60:{value:"hsl(220, 50%, 50%)"},80:{value:"hsl(220, 95%, 30%)"},90:{value:"hsl(220, 100%, 20%)"},100:{value:"hsl(220, 100%, 15%)"}},purple:{10:{value:"hsl(300, 95%, 95%)"},20:{value:"hsl(300, 85%, 85%)"},40:{value:"hsl(300, 70%, 70%)"},60:{value:"hsl(300, 50%, 50%)"},80:{value:"hsl(300, 95%, 30%)"},90:{value:"hsl(300, 100%, 20%)"},100:{value:"hsl(300, 100%, 15%)"}},pink:{10:{value:"hsl(340, 95%, 95%)"},20:{value:"hsl(340, 90%, 85%)"},40:{value:"hsl(340, 70%, 70%)"},60:{value:"hsl(340, 50%, 50%)"},80:{value:"hsl(340, 95%, 30%)"},90:{value:"hsl(340, 100%, 20%)"},100:{value:"hsl(340, 100%, 15%)"}},neutral:{10:{value:"hsl(210, 5%, 98%)"},20:{value:"hsl(210, 5%, 94%)"},40:{value:"hsl(210, 5%, 87%)"},60:{value:"hsl(210, 10%, 58%)"},80:{value:"hsl(210, 10%, 40%)"},90:{value:"hsl(210, 25%, 25%)"},100:{value:"hsl(210, 50%, 10%)"}},primary:{10:{value:"{colors.teal.10.value}"},20:{value:"{colors.teal.20.value}"},40:{value:"{colors.teal.40.value}"},60:{value:"{colors.teal.60.value}"},80:{value:"{colors.teal.80.value}"},90:{value:"{colors.teal.90.value}"},100:{value:"{colors.teal.100.value}"}},secondary:{10:{value:"{colors.purple.10.value}"},20:{value:"{colors.purple.20.value}"},40:{value:"{colors.purple.40.value}"},60:{value:"{colors.purple.60.value}"},80:{value:"{colors.purple.80.value}"},90:{value:"{colors.purple.90.value}"},100:{value:"{colors.purple.100.value}"}},font:{primary:{value:"{colors.neutral.100.value}"},secondary:{value:"{colors.neutral.90.value}"},tertiary:{value:"{colors.neutral.80.value}"},disabled:{value:"{colors.neutral.60.value}"},inverse:{value:"{colors.white.value}"},interactive:{value:"{colors.primary.80.value}"},hover:{value:"{colors.primary.90.value}"},focus:{value:"{colors.primary.100.value}"},active:{value:"{colors.primary.100.value}"},info:{value:"{colors.blue.90.value}"},warning:{value:"{colors.orange.90.value}"},error:{value:"{colors.red.90.value}"},success:{value:"{colors.green.90.value}"}},background:{primary:{value:"{colors.white.value}"},secondary:{value:"{colors.neutral.10.value}"},tertiary:{value:"{colors.neutral.20.value}"},quaternary:{value:"{colors.neutral.60.value}"},disabled:{value:"{colors.background.tertiary.value}"},info:{value:"{colors.blue.10.value}"},warning:{value:"{colors.orange.10.value}"},error:{value:"{colors.red.10.value}"},success:{value:"{colors.green.10.value}"}},border:{primary:{value:"{colors.neutral.60.value}"},secondary:{value:"{colors.neutral.40.value}"},tertiary:{value:"{colors.neutral.20.value}"},disabled:{value:"{colors.border.tertiary.value}"},pressed:{value:"{colors.primary.100.value}"},focus:{value:"{colors.primary.100.value}"},error:{value:"{colors.red.80.value}"},info:{value:"{colors.blue.80.value}"},success:{value:"{colors.green.80.value}"},warning:{value:"{colors.orange.80.value}"}},shadow:{primary:{value:"hsla(210, 50%, 10%, 0.25)"},secondary:{value:"hsla(210, 50%, 10%, 0.15)"},tertiary:{value:"hsla(210, 50%, 10%, 0.05)"}},overlay:{5:{value:"hsla(0, 0%, 0%, 0.05)"},10:{value:"hsla(0, 0%, 0%, 0.1)"},20:{value:"hsla(0, 0%, 0%, 0.2)"},30:{value:"hsla(0, 0%, 0%, 0.3)"},40:{value:"hsla(0, 0%, 0%, 0.4)"},50:{value:"hsla(0, 0%, 0%, 0.5)"},60:{value:"hsla(0, 0%, 0%, 0.6)"},70:{value:"hsla(0, 0%, 0%, 0.7)"},80:{value:"hsla(0, 0%, 0%, 0.8)"},90:{value:"hsla(0, 0%, 0%, 0.9)"}},black:{value:"hsl(0, 0%, 0%)"},white:{value:"hsl(0, 0%, 100%)"},transparent:{value:"transparent"}},yhe={alignItems:{value:"center"},justifyContent:{value:"space-between"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}}},bhe={message:{backgroundColor:{value:"{colors.background.secondary.value}"},borderRadius:{value:"{radii.large.value}"},gap:{value:"{space.small.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.small.value}"},user:{backgroundColor:{value:"{colors.background.secondary.value}"}},assistant:{backgroundColor:{value:"{colors.primary.10.value}"}},sender:{gap:{value:"{space.small.value}"},username:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"{fontWeights.bold.value}"}},timestamp:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"inherit"}}},body:{gap:{value:"{space.xs.value}"}},actions:{gap:{value:"{space.xs.value}"}}},form:{gap:{value:"{space.small.value}"},padding:{value:"{space.small.value}"}},attachment:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},fontSize:{value:"{fontSizes.small.value}"},paddingBlock:{value:"{space.xxxs.value}"},paddingInline:{value:"{space.xs.value}"},gap:{value:"{space.xs.value}"},list:{padding:{value:"{space.xs.value}"},paddingBlockStart:{value:"0"},gap:{value:"{space.xxs.value}"}},name:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},size:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},remove:{padding:{value:"{space.xxs.value}"}},image:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}}}},She={menu:{width:{value:"100%"},marginBlockStart:{value:"{space.xxxs}"},backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small}"},options:{display:{value:"flex"},flexDirection:{value:"column"},maxHeight:{value:"300px"}},option:{backgroundColor:{value:"{colors.background.primary}"},color:{value:"currentcolor"},cursor:{value:"pointer"},transitionDuration:{value:"{time.short}"},transitionProperty:{value:"background-color, color"},transitionTimingFunction:{value:"ease"},_active:{backgroundColor:{value:"{colors.primary.80}"},color:{value:"{colors.white}"}}},_empty:{display:{value:"flex"}},_loading:{alignItems:{value:"center"},display:{value:"flex"},gap:{value:"{space.xxxs}"}},spaceShared:{paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"}}}},Che={maxWidth:{value:"60rem"},modal:{width:{value:"{space.relative.full}"},height:{value:"{space.relative.full}"},backgroundColor:{value:"{colors.overlay.50.value}"},top:{value:"{space.zero}"},left:{value:"{space.zero}"}},container:{widthMax:{value:"30rem"}},router:{borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.medium.value}"}},footer:{paddingBottom:{value:"{space.medium.value}"}},form:{padding:{value:"{space.xl.value}"}},state:{inactive:{backgroundColor:{value:"{colors.background.secondary.value}"}}},orContainer:{color:{value:"{colors.neutral.80.value}"},orLine:{backgroundColor:{value:"{colors.background.primary.value}"}}}},whe={color:{value:"{colors.font.tertiary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},width:{value:"{fontSizes.xxl.value}"},height:{value:"{fontSizes.xxl.value}"},backgroundColor:{value:"{colors.background.tertiary}"},borderRadius:{value:"100%"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"{colors.border.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"{colors.border.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"{colors.border.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"{colors.border.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},width:{value:"{fontSizes.xl.value}"},height:{value:"{fontSizes.xl.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}}},Ehe={color:{value:"{colors.font.primary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},paddingVertical:{value:"{space.xs.value}"},paddingHorizontal:{value:"{space.small.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderRadius:{value:"{radii.xl.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},paddingVertical:{value:"{space.xxs.value}"},paddingHorizontal:{value:"{space.xs.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"}}},xhe={flexDirection:{value:"row"},flexWrap:{value:"wrap"},gap:{value:"0"},color:{value:"{colors.font.tertiary}"},item:{flexDirection:{value:"row"},color:{value:"inherit"},fontSize:{value:"inherit"},alignItems:{value:"center"},lineHeight:{value:"1"}},separator:{color:{value:"inherit"},fontSize:{value:"inherit"},paddingInline:{value:"{space.xxs}"}},link:{color:{value:"{components.link.color}"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"},paddingInline:{value:"{space.xs}"},paddingBlock:{value:"{space.xxs}"},current:{color:{value:"inherit"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"}}}},_he={fontWeight:{value:"{fontWeights.bold.value}"},transitionDuration:{value:"{components.fieldcontrol.transitionDuration.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},lineHeight:{value:"{components.fieldcontrol.lineHeight.value}"},paddingBlockStart:{value:"{components.fieldcontrol.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.paddingInlineEnd.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},borderWidth:{value:"{components.fieldcontrol.borderWidth.value}"},borderStyle:{value:"{components.fieldcontrol.borderStyle.value}"},borderRadius:{value:"{components.fieldcontrol.borderRadius.value}"},color:{value:"{colors.font.primary.value}"},_hover:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.primary.60.value}"}},_focus:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{color:{value:"{colors.font.active.value}"},backgroundColor:{value:"{colors.primary.20.value}"},borderColor:{value:"{colors.primary.100.value}"}},_loading:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},outlined:{info:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"}},_focus:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"}},_focus:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"}},_focus:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"}},_focus:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_hover:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"}},_focus:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.neutral.100.value}"}}}},primary:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.font.inverse.value}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.100.value}"},color:{value:"{colors.font.inverse.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.100.value}"},color:{value:"{colors.font.inverse.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.100.value}"},color:{value:"{colors.font.inverse.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100.value}"},color:{value:"{colors.font.inverse.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.100.value}"},color:{value:"{colors.font.inverse.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.70}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}}}},menu:{borderWidth:{value:"{space.zero.value}"},backgroundColor:{value:"transparent"},justifyContent:{value:"start"},_hover:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_focus:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_active:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.90.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"}}},link:{backgroundColor:{value:"transparent"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.interactive.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.hover.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.20.value}"},color:{value:"{colors.font.active.value}"}},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.neutral.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.80.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.overlay.90.value}"}}}},warning:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.red.60}"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.red.60}"},_hover:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.font.error}"}},_focus:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.red.80}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"{colors.red.100}"},backgroundColor:{value:"{colors.red.20}"},color:{value:"{colors.red.100}"}},_disabled:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}}},destructive:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.red.60}"},color:{value:"{colors.font.inverse}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100}"},color:{value:"{colors.font.inverse}"}}},small:{fontSize:{value:"{components.fieldcontrol.small.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.small.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.small.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.small.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.small.paddingInlineEnd.value}"}},large:{fontSize:{value:"{components.fieldcontrol.large.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.large.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.large.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.large.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.large.paddingInlineEnd.value}"}},loaderWrapper:{alignItems:{value:"center"},gap:{value:"{space.xs.value}"}}},Ihe={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"none"},padding:{value:"{space.medium.value}"},outlined:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{components.card.boxShadow.value}"}},elevated:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"{shadows.medium.value}"}}},Ahe={cursor:{value:"pointer"},alignItems:{value:"center"},_disabled:{cursor:{value:"not-allowed"}},button:{position:{value:"relative"},alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},before:{width:{value:"100%"},height:{value:"100%"},borderWidth:{value:"{borderWidths.medium.value}"},borderRadius:{value:"20%"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"}},_focus:{outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{borderColor:{value:"{colors.border.error.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},icon:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"20%"},opacity:{value:"{opacities.0.value}"},transform:{value:"scale(0)"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.short.value}"},transitionTimingFunction:{value:"ease-in-out"},_checked:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},_indeterminate:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},Rhe={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},The={pagination:{current:{color:{value:"{components.pagination.current.color}"},backgroundColor:{value:"{components.pagination.current.backgroundColor}"}},button:{color:{value:"{components.pagination.button.color}"},_hover:{backgroundColor:{value:"{components.pagination.button.hover.backgroundColor}"},color:{value:"{components.pagination.button.hover.color}"}},_disabled:{color:{value:"{components.pagination.button.disabled.color}"}}}},search:{input:{color:{value:"{components.searchfield.color}"}},button:{color:{value:"{components.searchfield.button.color}"},_active:{backgroundColor:{value:"{components.searchfield.button._active.backgroundColor}"},borderColor:{value:"{components.searchfield.button._active.borderColor}"},color:{value:"{components.searchfield.button._active.color}"}},_disabled:{backgroundColor:{value:"{components.searchfield.button._disabled.backgroundColor}"},borderColor:{value:"{components.searchfield.button._disabled.borderColor}"},color:{value:"{components.searchfield.button._disabled.color}"}},_focus:{backgroundColor:{value:"{components.searchfield.button._focus.backgroundColor}"},borderColor:{value:"{components.searchfield.button._focus.borderColor}"},color:{value:"{components.searchfield.button._focus.color}"}},_hover:{backgroundColor:{value:"{components.searchfield.button._hover.backgroundColor}"},borderColor:{value:"{components.searchfield.button._hover.borderColor}"},color:{value:"{components.searchfield.button._hover.color}"}}}}},Ohe={fontSize:{value:"{fontSizes.xs}"},gap:{value:"{space.relative.medium}"},svg:{path:{fill:{value:"{colors.font.primary}"}}},toolTip:{bottom:{value:"{space.large}"},color:{value:"{colors.teal.100}"},fontSize:{value:"{fontSizes.xxs}"}}},Mhe={height:{value:"{space.relative.full.value}"}},Phe={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},label:{color:{value:"{colors.font.tertiary.value}"},paddingInline:{value:"{space.medium.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.background.primary.value}"}},small:{borderWidth:{value:"{borderWidths.small.value}"}},large:{borderWidth:{value:"{borderWidths.large.value}"}},opacity:{value:"{opacities.60.value}"}},Nhe={backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.font.primary}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.primary}"}},_disabled:{backgroundColor:{value:"{colors.background.disabled}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.disabled}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.disabled}"}},accepted:{backgroundColor:{value:"{colors.background.success}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.success}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.success}"}},rejected:{backgroundColor:{value:"{colors.background.error}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.error}"}}},khe={backgroundColor:{value:"{colors.background.primary.value}"},item:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small.value}"},trigger:{alignItems:{value:"center"},backgroundColor:{value:"{colors.background.primary.value}"},color:{value:"inherit"},gap:{value:"{space.small.value}"},justifyContent:{value:"space-between"},paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},_hover:{color:{value:"inherit"},backgroundColor:{value:"{colors.overlay.5.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0",offsetY:"0",blurRadius:"0",spreadRadius:"2px",color:"{colors.border.focus.value}"}}}},content:{color:{value:"inherit"},paddingInline:{value:"{space.small.value}"},paddingBlockEnd:{value:"{space.small.value}"},paddingBlockStart:{value:"{space.xxxs.value}"}},icon:{color:{value:"{colors.font.tertiary.value}"},transitionDuration:{value:"{time.medium.value}"},transitionTimingFunction:{value:"cubic-bezier(0.87, 0, 0.13, 1)"}}}},Dhe={gap:{value:"{space.xs.value}"},fontSize:{value:"{fontSizes.medium.value}"},flexDirection:{value:"column"},small:{gap:{value:"{space.xxxs.value}"},fontSize:{value:"{fontSizes.small.value}"}},large:{gap:{value:"{space.small.value}"},fontSize:{value:"{fontSizes.large.value}"}},label:{color:{value:"{colors.font.secondary.value}"}}},Lhe={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},color:{value:"{colors.font.primary.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"},fontSize:{value:"{components.field.fontSize.value}"},lineHeight:{value:"{lineHeights.medium.value}"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},small:{fontSize:{value:"{components.field.small.fontSize.value}"},paddingBlockStart:{value:"{space.xxs.value}"},paddingBlockEnd:{value:"{space.xxs.value}"},paddingInlineStart:{value:"{space.small.value}"},paddingInlineEnd:{value:"{space.small.value}"}},large:{fontSize:{value:"{components.field.large.fontSize.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}},quiet:{borderStyle:{value:"none"},borderInlineStart:{value:"none"},borderInlineEnd:{value:"none"},borderBlockStart:{value:"none"},borderRadius:{value:"0"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderBlockEndColor:{value:"{colors.border.error.value}"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.focus.value}"}}},_disabled:{color:{value:"{colors.font.disabled.value}"},cursor:{value:"not-allowed"},borderColor:{value:"{colors.transparent.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},color:{value:"{colors.font.error.value}"},_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.error.value}"}}}},info:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.blue.100.value}"}}}},warning:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.orange.100.value}"}}}},success:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.green.100.value}"}}}},overlay:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.overlay.90.value}"}}}}},Uhe={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},Fhe={backgroundColor:{value:"transparent"},borderRadius:{value:"{radii.xs.value}"},flexDirection:{value:"column"},gap:{value:"{components.field.gap.value}"},legend:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{components.field.fontSize.value}"},fontWeight:{value:"{fontWeights.bold.value}"},lineHeight:{value:"{lineHeights.medium.value}"},small:{fontSize:"{components.field.small.fontSize.value}"},large:{fontSize:"{components.field.large.fontSize.value}"}},outlined:{padding:"{space.medium.value}",borderColor:"{colors.neutral.40.value}",borderWidth:"{borderWidths.small.value}",borderStyle:"solid",small:{padding:"{space.small.value}"},large:{padding:"{space.large.value}"}},small:{gap:"{components.field.small.gap.value}"},large:{gap:"{components.field.large.gap.value}"}},$he={error:{color:{value:"{colors.font.error.value}"},fontSize:{value:"{fontSizes.small.value}"}},description:{color:{value:"{colors.font.secondary.value}"},fontStyle:{value:"italic"},fontSize:{value:"{fontSizes.small.value}"}}},zhe={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.fileuploader.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.fileuploader.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},jhe={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},Bhe={color:{value:"{colors.font.primary.value}"},lineHeight:{value:"{lineHeights.small.value}"},1:{fontSize:{value:"{fontSizes.xxxxl.value}"},fontWeight:{value:"{fontWeights.light.value}"}},2:{fontSize:{value:"{fontSizes.xxxl.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},3:{fontSize:{value:"{fontSizes.xxl.value}"},fontWeight:{value:"{fontWeights.medium.value}"}},4:{fontSize:{value:"{fontSizes.xl.value}"},fontWeight:{value:"{fontWeights.semibold.value}"}},5:{fontSize:{value:"{fontSizes.large.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},6:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},Hhe={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},qhe={lineHeight:{value:1},height:{value:"1em"}},Vhe={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Whe={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},Ghe={banner:{height:{value:"150px "},width:{value:"400px "}},button:{backgroundColor:{value:"#e8e8e8"},borderRadius:{value:"5px"},color:{value:"black"}},dialog:{height:{value:"50vh"},minHeight:{value:"400px"},minWidth:{value:"400px"},width:{value:"30vw"}},header:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},Khe={active:{color:{value:"{colors.font.active.value}"}},color:{value:"{colors.font.interactive.value}"},focus:{color:{value:"{colors.font.focus.value}"}},hover:{color:{value:"{colors.font.hover.value}"}},visited:{color:{value:"{colors.font.interactive.value}"}}},Zhe={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},Yhe={width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},fontSize:{value:"{fontSizes.xs.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"},fontSize:{value:"{fontSizes.xxs.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"},fontSize:{value:"{fontSizes.small.value}"}},linear:{width:{value:"100%"},minWidth:{value:"5rem"},fontSize:{value:"{fontSizes.xxs.value}"},strokeWidth:{value:"{fontSizes.xxs.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{strokeWidth:{value:"{fontSizes.xxxs.value}"},fontSize:{value:"{fontSizes.xxxs.value}"}},large:{strokeWidth:{value:"{fontSizes.xs.value}"},fontSize:{value:"{fontSizes.xs.value}"}}},text:{fill:{value:"{colors.font.primary.value}"}}},Qhe={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.medium.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{shadows.large.value}"},flexDirection:{value:"column"},gap:{value:"{space.zero.value}"},maxWidth:{value:"30rem"},minWidth:{value:"14rem"},small:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}},large:{width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}},item:{minHeight:{value:"2.5rem"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}}},Xhe={alignItems:{value:"center"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderColor:{value:"transparent"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.xs.value}"},color:{value:"{colors.font.primary.value}"},justifyContent:{value:"flex-start"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},lineHeight:{value:"{lineHeights.small.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},dismiss:{gap:{value:"{space.xxs.value}"}},plain:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}}},outlined:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.primary.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.error.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.success.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.warning.value}"}}},filled:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.secondary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"transparent"}}}},Jhe={current:{alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.overlay.40.value}"}},button:{color:{value:"{colors.font.primary.value}"},paddingInlineStart:{value:"{space.xxs.value}"},paddingInlineEnd:{value:"{space.xxs.value}"},transitionProperty:{value:"background-color"},transitionDuration:{value:"{time.medium.value}"},hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},disabled:{color:{value:"{colors.font.disabled.value}"}}},ellipsis:{alignItems:{value:"baseline"},justifyContent:{value:"center"},paddingInlineStart:{value:"{space.xs.value}"},paddingInlineEnd:{value:"{space.xs.value}"}},itemContainer:{marginLeft:{value:"{space.xxxs.value}"},marginRight:{value:"{space.xxxs.value}"}},itemShared:{height:{value:"{fontSizes.xxl.value}"},minWidth:{value:"{fontSizes.xxl.value}"},borderRadius:{value:"{fontSizes.medium.value}"}}},epe={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_error:{color:{value:"{components.button.outlined.error.color.value}"},backgroundColor:{value:"{components.button.outlined.error.backgroundColor.value}"},borderColor:{value:"{components.button.outlined.error.borderColor.value}"},_active:{borderColor:{value:"{components.button.outlined.error._active.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._active.backgroundColor.value}"},color:{value:"{components.button.outlined.error._active.color.value}"}},_focus:{borderColor:{value:"{components.button.outlined.error._focus.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._focus.backgroundColor.value}"},color:{value:"{components.button.outlined.error._focus.color.value}"},boxShadow:{value:"{components.button.outlined.error._focus.boxShadow.value}"}},_hover:{borderColor:{value:"{components.button.outlined.error._hover.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._hover.backgroundColor.value}"},color:{value:"{components.button.outlined.error._hover.color.value}"}}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},tpe={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},npe={borderRadius:{value:"{radii.small.value}"},transitionDuration:{value:"{time.long.value}"},startColor:{value:"{colors.background.secondary.value}"},endColor:{value:"{colors.background.tertiary.value}"},small:{height:{value:"{space.small.value}"}},default:{height:{value:"{space.medium.value}"}},large:{height:{value:"{space.large.value}"}}},rpe={alignItems:{value:"center"},justifyContent:{value:"flex-start"},gap:{value:"inherit"},_disabled:{cursor:{value:"not-allowed"}},button:{alignItems:{value:"center"},justifyContent:{value:"center"},width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},boxSizing:{value:"border-box"},borderWidth:{value:"{borderWidths.medium.value}"},borderStyle:{value:"solid"},borderRadius:{value:"50%"},borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.background.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},padding:{value:"{borderWidths.medium.value}"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"}},_checked:{color:{value:"{colors.primary.80.value}"},_disabled:{color:{value:"{colors.background.disabled.value}"}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.primary.value}"}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},ope={radio:{borderWidth:{value:"{components.radio.button.borderWidth}"},borderColor:{value:"{components.radio.button.borderColor}"},backgroundColor:{value:"{components.radio.button.backgroundColor}"},_checked:{color:{value:"{components.radio.button._checked.color}"}},label:{color:{value:"{components.radio.label.color}"}}},legend:{color:{value:"{components.fieldset.legend.color}"},fontWeight:{value:"{fontWeights.normal}"}}},spe={large:{size:{value:"{fontSizes.xxxl.value}"}},default:{size:{value:"{fontSizes.xl.value}"}},small:{size:{value:"{fontSizes.small.value}"}},filled:{color:{value:"{colors.secondary.80.value}"}},empty:{color:{value:"{colors.background.tertiary.value}"}}},ipe={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},backgroundColor:{value:"{colors.background.primary.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},ape={color:{value:"{components.fieldcontrol.color}"},backgroundColor:{value:"{colors.background.primary.value}"},paddingInlineEnd:{value:"{space.xxl.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},wrapper:{flex:{value:"1"},display:{value:"block"},position:{value:"relative"},cursor:{value:"pointer"}},iconWrapper:{alignItems:{value:"center"},position:{value:"absolute"},top:{value:"50%"},right:{value:"{space.medium.value}"},transform:{value:"translateY(-50%)"},pointerEvents:{value:"none"},small:{right:{value:"{space.xs.value}"}},large:{right:{value:"{space.medium.value}"}}},option:{backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"}}},whiteSpace:{value:"nowrap"},minWidth:{value:"6.5rem"},small:{minWidth:{value:"5.5rem"},paddingInlineEnd:{value:"{space.xl.value}"}},large:{minWidth:{value:"7.5rem"},paddingInlineEnd:{value:"{space.xxl.value}"}},expanded:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},option:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"}}}},lpe={borderColor:{value:"{components.fieldcontrol.borderColor}"},color:{value:"{components.fieldcontrol.color}"},flexDirection:{value:"column"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}},label:{color:{value:"{components.field.label.color}"}}},cpe={paddingBlock:{value:"{space.xs.value}"},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"9999px"},height:{value:"0.375rem"},minWidth:{value:"10rem"}},range:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"9999px"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},thumb:{width:{value:"1.25rem"},height:{value:"1.25rem"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.small.value}"},borderRadius:{value:"50%"},borderWidth:{value:"{borderWidths.medium.value}"},borderColor:{value:"{colors.border.primary.value}"},borderStyle:{value:"solid"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"},borderColor:{value:"transparent"},boxShadow:{value:"none"}},_hover:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.focus.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}}},small:{track:{height:{value:"0.25rem"}},thumb:{width:{value:"1rem"},height:{value:"1rem"}}},large:{track:{height:{value:"0.625rem"}},thumb:{width:{value:"1.5rem"},height:{value:"1.5rem"}}}},upe={borderColor:{value:"{components.fieldcontrol.borderColor}"},flexDirection:{value:"column"},input:{color:{value:"{components.fieldcontrol.color}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},textAlign:{value:"center"}},button:{color:{value:"{components.button.color}"},backgroundColor:{value:"{colors.transparent}"},_active:{color:{value:"{components.button._active.color}"},backgroundColor:{value:"{components.button._active.backgroundColor}"}},_focus:{color:{value:"{components.button._focus.color}"},backgroundColor:{value:"{components.button._focus.backgroundColor}"}},_disabled:{color:{value:"{components.button._disabled.color}"},backgroundColor:{value:"{components.fieldcontrol._disabled.backgroundColor}"}},_hover:{color:{value:"{components.button._hover.color}"},backgroundColor:{value:"{components.button._hover.backgroundColor}"}}}},dpe={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.storagemanager.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.storagemanager.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},fpe={_disabled:{opacity:{value:"{opacities.60.value}"}},_focused:{shadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},fontSize:{value:"{fontSizes.medium.value}"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}},label:{padding:{value:"{space.xs.value}"}},thumb:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.xxxl.value}"},checked:{transform:{value:"{transforms.slideX.medium.value}"}},transition:{duration:{value:"{time.medium.value}"}},width:{value:"{space.relative.medium.value}"}},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{backgroundColor:{value:"{colors.primary.80.value}"}},height:{value:"{space.relative.medium.value}"},padding:{value:"{outlineWidths.medium.value}"},transition:{duration:{value:"{time.short.value}"}},width:{value:"{space.relative.xl.value}"},_error:{backgroundColor:{value:"{colors.background.error.value}"}}}},hpe={borderCollapse:{value:"collapse"},display:{value:"table"},width:{value:"100%"},head:{display:{value:"table-header-group"},verticalAlign:{value:"middle"}},body:{display:{value:"table-row-group"},verticalAlign:{value:"middle"}},foot:{display:{value:"table-footer-group"},verticalAlign:{value:"middle"}},row:{display:{value:"table-row"},verticalAlign:{value:"middle"},hover:{backgroundColor:{value:"{colors.background.tertiary.value}"}},striped:{backgroundColor:{value:"{colors.background.secondary.value}"}}},header:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},data:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.normal.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},caption:{captionSide:{value:"bottom"},color:{value:"{colors.font.primary.value}"},display:{value:"table-caption"},fontSize:{value:"{fontSizes.medium.value}"},textAlign:{value:"center"},wordBreak:{value:"break-all"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}}}},ppe={backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},gap:{value:"0"},item:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},color:{value:"{colors.font.secondary.value}"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"},textAlign:{value:"center"},transitionDuration:{value:"{time.medium.value}"},_hover:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.hover.value}"}},_focus:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"{borderWidths.medium}",color:"{colors.border.focus.value}"}},color:{value:"{colors.font.focus.value}"}},_active:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.font.interactive.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.interactive.value}"}},_disabled:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.disabled.value}"}}},panel:{backgroundColor:{value:"transparent"},paddingInline:{value:"0"},paddingBlock:{value:"{space.small.value}"}}},mpe={color:{value:"{colors.font.primary.value}"},primary:{color:{value:"{colors.font.primary.value}"}},secondary:{color:{value:"{colors.font.secondary.value}"}},tertiary:{color:{value:"{colors.font.tertiary.value}"}},error:{color:{value:"{colors.font.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"}},success:{color:{value:"{colors.font.success.value}"}},info:{color:{value:"{colors.font.info.value}"}}},gpe={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},vpe={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},ype={borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.font.primary.value}"},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.font.primary.value}"}},_active:{backgroundColor:{value:"{colors.transparent.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},borderColor:{value:"{colors.border.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{borderColor:{value:"{colors.border.pressed.value}"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.overlay.20.value}"},_hover:{backgroundColor:{value:"{colors.overlay.30.value}"}}},primary:{backgroundColor:{value:"{colors.transparent.value}"},borderWidth:{value:"{borderWidths.small.value}"},_focus:{borderColor:{value:"{colors.border.focus.value}"},backgroundColor:{value:"{colors.transparent.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"},color:{value:"{colors.font.primary.value}"}},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.primary.80.value}"},borderColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.background.primary.value}"},_focus:{backgroundColor:{value:"{colors.border.focus.value}"},borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.background.primary.value}"}},_hover:{borderColor:{value:"{colors.primary.60.value}"},backgroundColor:{value:"{colors.primary.60.value}"},boxShadow:{value:"{colors.primary.60.value}"},color:{value:"{colors.background.primary.value}"}}}},link:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"},_hover:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"}},_hover:{color:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.transparent.value}"}}}}},bpe={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},Spe={accordion:khe,aiConversation:bhe,alert:yhe,authenticator:Che,autocomplete:She,avatar:whe,badge:Ehe,breadcrumbs:xhe,button:_he,card:Ihe,checkbox:Ahe,checkboxfield:Rhe,collection:The,copy:Ohe,countrycodeselect:Mhe,divider:Phe,dropzone:Nhe,field:Dhe,fieldcontrol:Lhe,fieldgroup:Uhe,fieldmessages:$he,fieldset:Fhe,fileuploader:zhe,flex:jhe,heading:Bhe,icon:qhe,highlightmatch:Hhe,image:Whe,inappmessaging:Ghe,input:Vhe,link:Khe,liveness:Zhe,loader:Yhe,menu:Qhe,message:Xhe,pagination:Jhe,passwordfield:epe,phonenumberfield:tpe,placeholder:npe,radio:rpe,radiogroup:ope,rating:spe,searchfield:ipe,select:ape,selectfield:lpe,sliderfield:cpe,stepperfield:upe,storagemanager:dpe,switchfield:fpe,table:hpe,tabs:ppe,text:mpe,textareafield:gpe,textfield:vpe,togglebutton:ype,togglebuttongroup:bpe},Cpe={default:{variable:{value:`'InterVariable', 'Inter var', 'Inter', -apple-system, BlinkMacSystemFont,
|
|
21
|
+
'Helvetica Neue', 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
22
|
+
sans-serif`},static:{value:`'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
|
|
23
|
+
'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif`}}},Is={xxxs:{value:"0.375rem"},xxs:{value:"0.5rem"},xs:{value:"0.75rem"},small:{value:"0.875rem"},medium:{value:"1rem"},large:{value:"1.25rem"},xl:{value:"1.5rem"},xxl:{value:"2rem"},xxxl:{value:"2.5rem"},xxxxl:{value:"3rem"}},wpe={hairline:{value:100},thin:{value:200},light:{value:300},normal:{value:400},medium:{value:500},semibold:{value:600},bold:{value:700},extrabold:{value:800},black:{value:900}},Epe={small:{value:"1.25"},medium:{value:"1.5"},large:{value:"2"}},xpe={0:{value:"0"},10:{value:"0.1"},20:{value:"0.2"},30:{value:"0.3"},40:{value:"0.4"},50:{value:"0.5"},60:{value:"0.6"},70:{value:"0.7"},80:{value:"0.8"},90:{value:"0.9"},100:{value:"1"}},_pe={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Ipe={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Ape={xs:{value:"0.125rem"},small:{value:"0.25rem"},medium:{value:"0.5rem"},large:{value:"1rem"},xl:{value:"2rem"},xxl:{value:"4rem"},xxxl:{value:"8rem"}},Rpe={small:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"4px",color:"{colors.shadow.tertiary.value}"}},medium:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"6px",color:"{colors.shadow.secondary.value}"}},large:{value:{offsetX:"0px",offsetY:"4px",blurRadius:"12px",color:"{colors.shadow.primary.value}"}}},As={zero:{value:"0"},xxxs:{value:"0.25rem"},xxs:{value:"0.375rem"},xs:{value:"0.5rem"},small:{value:"0.75rem"},medium:{value:"1rem"},large:{value:"1.5rem"},xl:{value:"2.0rem"},xxl:{value:"3.0rem"},xxxl:{value:"4.5rem"},relative:{xxxs:{value:"0.25em"},xxs:{value:"0.375em"},xs:{value:"0.5em"},small:{value:"0.75em"},medium:{value:"1em"},large:{value:"1.5em"},xl:{value:"2.0em"},xxl:{value:"3.0em"},xxxl:{value:"4.5em"},full:{value:"100%"}}},Tpe={short:{value:"100ms"},medium:{value:"250ms"},long:{value:"500ms"}},Ope={slideX:{small:{value:"translateX(0.5em)"},medium:{value:"translateX(1em)"},large:{value:"translateX(2em)"}}},Mpe={components:Spe,borderWidths:ghe,colors:vhe,fonts:Cpe,fontSizes:Is,fontWeights:wpe,lineHeights:Epe,opacities:xpe,outlineOffsets:_pe,outlineWidths:Ipe,radii:Ape,shadows:Rpe,space:As,time:Tpe,transforms:Ope};Is.xxs,Is.xs,Is.small,Is.medium,Is.large,Is.xl,Is.xxl,Is.xxxl,As.xxxs,As.xs,As.small,As.medium,As.large,As.xl,As.xxl,As.xxxl;const Ppe={values:{base:0,small:480,medium:768,large:992,xl:1280,xxl:1536},defaultBreakpoint:"base"},Y9={tokens:Mpe,breakpoints:Ppe,name:"default-theme"};var $E,TL;function Npe(){if(TL)return $E;TL=1;function e(t,n,r,o){var s=-1,a=t==null?0:t.length;for(o&&a&&(r=t[++s]);++s<a;)r=n(r,t[s],s,t);return r}return $E=e,$E}var zE,OL;function kpe(){if(OL)return zE;OL=1;function e(t){return function(n){return t?.[n]}}return zE=e,zE}var jE,ML;function Dpe(){if(ML)return jE;ML=1;var e=kpe(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=e(t);return jE=n,jE}var BE,PL;function Lpe(){if(PL)return BE;PL=1;var e=Dpe(),t=NR(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",a=r+o+s,c="["+a+"]",u=RegExp(c,"g");function f(h){return h=t(h),h&&h.replace(n,e).replace(u,"")}return BE=f,BE}var HE,NL;function Upe(){if(NL)return HE;NL=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(n){return n.match(e)||[]}return HE=t,HE}var qE,kL;function Fpe(){if(kL)return qE;kL=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(n){return e.test(n)}return qE=t,qE}var VE,DL;function $pe(){if(DL)return VE;DL=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,s="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",c="\\xac\\xb1\\xd7\\xf7",u="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",h=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",m="A-Z\\xc0-\\xd6\\xd8-\\xde",g="\\ufe0e\\ufe0f",v=c+u+f+h,C="['’]",b="["+v+"]",E="["+o+"]",x="\\d+",I="["+s+"]",R="["+a+"]",M="[^"+e+v+x+s+a+m+"]",D="\\ud83c[\\udffb-\\udfff]",N="(?:"+E+"|"+D+")",T="[^"+e+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",$="[\\ud800-\\udbff][\\udc00-\\udfff]",G="["+m+"]",z="\\u200d",F="(?:"+R+"|"+M+")",q="(?:"+G+"|"+M+")",X="(?:"+C+"(?:d|ll|m|re|s|t|ve))?",Se="(?:"+C+"(?:D|LL|M|RE|S|T|VE))?",V=N+"?",ee="["+g+"]?",pe="(?:"+z+"(?:"+[T,L,$].join("|")+")"+ee+V+")*",ge="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",j=ee+V+pe,te="(?:"+[I,L,$].join("|")+")"+j,fe=RegExp([G+"?"+R+"+"+X+"(?="+[b,G,"$"].join("|")+")",q+"+"+Se+"(?="+[b,G+F,"$"].join("|")+")",G+"?"+F+"+"+X,G+"+"+Se,Te,ge,x,te].join("|"),"g");function ae(be){return be.match(fe)||[]}return VE=ae,VE}var WE,LL;function zpe(){if(LL)return WE;LL=1;var e=Upe(),t=Fpe(),n=NR(),r=$pe();function o(s,a,c){return s=n(s),a=c?void 0:a,a===void 0?t(s)?r(s):e(s):s.match(a)||[]}return WE=o,WE}var GE,UL;function jpe(){if(UL)return GE;UL=1;var e=Npe(),t=Lpe(),n=zpe(),r="['’]",o=RegExp(r,"g");function s(a){return function(c){return e(n(t(c).replace(o,"")),a,"")}}return GE=s,GE}var KE,FL;function Bpe(){if(FL)return KE;FL=1;var e=jpe(),t=e(function(n,r,o){return n+(o?"-":"")+r.toLowerCase()});return KE=t,KE}var Hpe=Bpe();const Q9=Eu(Hpe),qpe=/\{([^}]+)\}/g;function X9(e){const t=new RegExp(qpe);if(typeof e=="string")return t.test(e);if(typeof e=="object"){let n=!1;for(const r in e)if(js(e,r)){const o=e[r];if(X9(o)){n=!0;break}}return n}return!1}const Vpe="amplify";function Q_(e){return Object.entries(e).map(([t,n])=>{const r=Yy(n)?n.toString():J9({value:n});return`${Q9(t)}:${r}; `}).join(" ")}function $R({path:e=[]}){return`${Q9([Vpe,...e].join(" "))}`}const Wpe=["offsetX","offsetY","blurRadius","spreadRadius","color"];function J9(e){const{value:t}=e;return zs(t)?zL(t):$L(t)?Wpe.map(n=>zL($L(e)?e[n]:t[n])).join(" "):t}function Yy(e){return zr(e)&&js(e,"value")}function $L(e){return zr(e)&&js(e,"offsetX")}function zL(e){if(!e)return"";if(X9(e)){const t=e.replace(/\{|\}/g,"").replace(".value","").split(".");return`var(--${$R({path:t})})`}return e}const jL=({token:e,path:t})=>{const n=`--${$R({path:t})}`,{value:r}=e,o=J9(e);return{name:n,original:r,path:t,value:o,toString:()=>`var(${n})`}};function X_({tokens:e,path:t=[],setupToken:n}){if(js(e,"value"))return n({token:e,path:t});const r={};for(const o in e)if(js(e,o)){const s=e[o],a=zr(s)?s:{value:s};r[o]=X_({tokens:a,path:t.concat(o),setupToken:n})}return r}function J_(e,t){t=t||[];for(var n in e)js(e,n)&&(zr(e[n])&&"value"in e[n]?t.push(e[n]):zr(e[n])&&J_(e[n],t));return t}function e7(e,t,n){if(e==null)return{};var r,o,s,a,c,u,f=e[0]||{},h=1,m=e.length;for(n=n||[],typeof f!="object"&&(f={});h<m;h++)if((c=e[h])!=null){for(a in c)if(js(c,a)&&a!=="__proto__"&&(r=f[a],s=c[a],f!==s))if(s&&(zr(s)||(o=Array.isArray(s)))){o?(o=!1,u=r&&Array.isArray(r)?r:[]):u=r&&zr(r)?r:{};var g=n.slice(0);g.push(a),f[a]=e7([u,s],t,g)}else s!==void 0&&(f[a]=s)}return f}function BL(e,t){return t?`${e} { ${Object.entries(t).map(([n,r])=>`--${n}:${r}; `).join(" ")}}
|
|
24
|
+
`:""}function ki(e,t){let n="";const{_modifiers:r={},_element:o={},_vars:s,...a}=t;if(Object.keys(a).length){const[c,u]=Gce(a,f=>f.startsWith(":")||f.startsWith("["));Object.entries(c).forEach(([f,h])=>{const{_modifiers:m={},_element:g={},_vars:v,...C}=h;n+=`${e}${f} { ${Q_(C)} }
|
|
25
|
+
`,n+=BL(`${e}${f}`,v)}),n+=`${e} { ${Q_(u)} }
|
|
26
|
+
`}return n+=BL(e,s),Object.entries(r).forEach(([c,u])=>{u&&Object.keys(u).length&&(n+=ki(`${e}--${c}`,u))}),Object.entries(o).forEach(([c,u])=>{u&&Object.keys(u).length&&(n+=ki(`${e}__${c}`,u))}),n}function Gpe({theme:e,components:t}){let n="";const{tokens:r,name:o,breakpoints:s}=e;return t.forEach(({name:a,theme:c,overrides:u})=>{const f=`amplify-${a}`,h=`[data-amplify-theme="${o}"] .${f}`,m=Bs(c)?c(r):c;n+=ki(h,m),u&&u.forEach(g=>{const v=Bs(g.theme)?g.theme(r):g.theme;if("mediaQuery"in g&&(n+=`@media (${g.mediaQuery}) {
|
|
27
|
+
${ki(h,v)}
|
|
28
|
+
}`),"breakpoint"in g){const C=s.values[g.breakpoint];n+=`
|
|
29
|
+
@media (min-width: ${C}px) {
|
|
30
|
+
${ki(h,v)}
|
|
31
|
+
}`}"selector"in g&&(n+=ki(`${g.selector} .${f}`,v)),"colorMode"in g&&(n+=`
|
|
32
|
+
@media (prefers-color-scheme: ${g.colorMode}) {
|
|
33
|
+
${ki(`[data-amplify-theme="${o}"][data-amplify-color-mode="system"] .${f}`,v)}
|
|
34
|
+
}
|
|
35
|
+
`,n+=ki(`[data-amplify-theme="${o}"][data-amplify-color-mode="${g.colorMode}"] .${f}`,v))})}),n}function HL({keys:e,value:t}){return e.reduce((n,r)=>({...n,[r]:{value:`{colors.${t}.${r}.value}`}}),{})}function Kpe({animations:e,tokens:t}){let n="";return Object.entries(e).forEach(([r,o])=>{n+=`
|
|
36
|
+
@keyframes ${r} {`,Object.entries(o).forEach(([s,a])=>{n+=`
|
|
37
|
+
${s} {
|
|
38
|
+
`;const c=Bs(a)?a(t):a;n+=Q_(c),n+=`
|
|
39
|
+
}`}),n+=`
|
|
40
|
+
}`}),n}function Qy(e,t=Y9){const n=e7([{},t,{...e,components:{}}]),{primaryColor:r,secondaryColor:o}=n;zs(r)&&(n.tokens.colors.primary=HL({keys:Object.keys(n.tokens.colors[r]),value:r})),zs(o)&&(n.tokens.colors.secondary=HL({keys:Object.keys(n.tokens.colors[o]),value:o}));const s=X_({tokens:n.tokens,setupToken:jL}),{breakpoints:a,name:c}=n;let u=`[data-amplify-theme="${c}"] {
|
|
41
|
+
`+J_(s).map(h=>`${h.name}: ${h.value};`).join(`
|
|
42
|
+
`)+`
|
|
43
|
+
}
|
|
44
|
+
`;e?.components&&(u+=Gpe({theme:{...n,tokens:s},components:e.components}));let f=[];return n.animations&&(u+=Kpe({animations:n.animations,tokens:s})),n.overrides&&(f=n.overrides.map(h=>{const m=X_({tokens:h.tokens,setupToken:jL}),g=J_(m).map(v=>`${v.name}: ${v.value};`).join(`
|
|
45
|
+
`);if("selector"in h&&(u+=`
|
|
46
|
+
${h.selector} {
|
|
47
|
+
${g}
|
|
48
|
+
}
|
|
49
|
+
`),"mediaQuery"in h&&(u+=`
|
|
50
|
+
@media (${h.mediaQuery}) {
|
|
51
|
+
[data-amplify-theme="${c}"] {
|
|
52
|
+
${g}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
`),"breakpoint"in h){const v=n.breakpoints.values[h.breakpoint];u+=`
|
|
56
|
+
@media (min-width: ${v}px) {
|
|
57
|
+
[data-amplify-theme="${c}"] {
|
|
58
|
+
${g}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`}return"colorMode"in h&&(u+=`
|
|
62
|
+
@media (prefers-color-scheme: ${h.colorMode}) {
|
|
63
|
+
[data-amplify-theme="${c}"][data-amplify-color-mode="system"] {
|
|
64
|
+
${g}
|
|
65
|
+
color-scheme: ${h.colorMode};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
`,u+=`
|
|
69
|
+
[data-amplify-theme="${c}"][data-amplify-color-mode="${h.colorMode}"] {
|
|
70
|
+
${g}
|
|
71
|
+
color-scheme: ${h.colorMode};
|
|
72
|
+
}
|
|
73
|
+
`),{...h,tokens:m}})),{tokens:s,breakpoints:a,name:c,cssText:u,containerProps:({colorMode:h}={})=>({"data-amplify-theme":c,"data-amplify-color-mode":h}),overrides:f}}const ze=(...e)=>{const t=[];for(const n of e)if(n){if(zs(n)){t.push(n);continue}if(typeof n=="number"){t.push(n.toString());continue}if(Array.isArray(n)){t.push(ze(...n));continue}if(zr(n)){if(n.toString!==Object.prototype.toString&&n.toString()!=="[object Object]"){t.push(n.toString());continue}for(const r in n)js(n,r)&&n[r]&&t.push(r)}}return t.join(" ")},ie={Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Button:"amplify-button",ButtonLoaderWrapper:"amplify-button__loader-wrapper",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",Flex:"amplify-flex",Heading:"amplify-heading",Icon:"amplify-icon",Input:"amplify-input",Label:"amplify-label",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",TextField:"amplify-textfield",VisuallyHidden:"amplify-visually-hidden"},Zpe=({componentName:e,packageName:t,version:n})=>{const r=[`ui-${t}`,n];switch(e){case"AIConversation":{Es({...Pce,additionalDetails:[[e],r]});break}case"Authenticator":{Es({...kce,additionalDetails:[[e],r]});break}case"ChangePassword":case"DeleteUser":{Es({...Nce,additionalDetails:[["AccountSettings"],r]});break}case"FileUploader":{Es({...Dce,additionalDetails:[[e],r]});break}case"InAppMessaging":{Es({...Lce,additionalDetails:[[e],r]});break}case"LocationSearch":{Es({...Uce,additionalDetails:[[e],r]});break}case"MapView":{Es({...Fce,additionalDetails:[[e],r]});break}case"StorageManager":{Es({...$ce,additionalDetails:[[e],r]});break}case"StorageBrowser":{Es({...zce,additionalDetails:[[e],r]});break}}return Wce},eI=B.createContext(null),Ype=e=>(t,n)=>{F9(t,n,e)};function t7({children:e}){const[t,n]=B.useState("configuring");B.useEffect(()=>{yy().then(()=>{n("authenticated")}).catch(()=>{n("unauthenticated")})},[]);const r=_.useContext(eI),o=yce(phe),s=_.useMemo(()=>r??{authStatus:t,service:o},[t,r,o]),{service:a}=s;return _.useEffect(()=>Kce(a,Ype({onSignIn:()=>{n("authenticated")},onSignOut:()=>{n("unauthenticated")}})),[a]),B.createElement(eI.Provider,{value:s},e)}const Qpe="`useAuthenticator` must be used inside an `Authenticator.Provider`.",Xpe=["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"],Jpe=e=>Xpe.some(t=>t===e),eme=()=>!1;function tme(e,t){return e.length!==t.length?!1:e.every((n,r)=>{const o=t[r];return qce(n,o)||Vce(n,o)?!0:n===o})}const nme=e=>(t,n)=>{const r=e(t),o=e(n);return tme(r,o)},rme=e=>({...Gf(e)?.formFields?.setupTotp?.QR}),ome=e=>e.flatMap(([t,n])=>({name:t,...n})),sme=(e={})=>e&&Object.entries(e).map(([t,n])=>!zs(n)||!t?{}:{name:t,label:n,type:"radio",value:n}),ime=(e=[])=>e.map(t=>({name:"mfa_type",label:Rn.getMfaTypeLabelByValue(t),type:"radio",value:t})),ame=(e,t)=>Jpe(e)?e==="verifyUser"?sme(Gf(t).unverifiedUserAttributes):e==="selectMfaType"?ime(Gf(t).allowedMfaTypes):ome(Rue(e,t)):[];function ht(e){const t=B.useContext(eI);if(!t)throw new Error(Qpe);const{service:n}=t,{send:r}=n,o=_.useCallback(b=>({...Jce({send:r,state:b})}),[r]),s=e?nme(e):eme,{authStatus:a}=t,c=xce(n,o,s),{route:u,totpSecretCode:f,user:h,...m}=c,g=n.getSnapshot(),v=u==="setupTotp"?rme(g):null,C=ame(u,g);return{...m,authStatus:a,route:u,totpSecretCode:f,user:h,fields:C,QRFields:v}}const lme=({route:e})=>[e];function cme(e){const{route:t,initializeMachine:n}=ht(lme),r=B.useRef(!1);B.useEffect(()=>{!r.current&&t==="setup"&&(n(e),r.current=!0)},[n,t,e])}const ume=({shouldWarn:e,message:t})=>{_.useEffect(()=>{},[e,t])};function dme({componentName:e,packageName:t,version:n}){_.useEffect(()=>Zpe({componentName:e,packageName:t,version:n}),[e,t,n])}const n7=_.createContext({theme:Qy(),colorMode:void 0}),zR={alignContent:"alignContent",alignItems:"alignItems",alignSelf:"alignSelf",area:"gridArea",aspectRatio:"aspectRatio",autoColumns:"gridAutoColumns",autoFlow:"gridAutoFlow",autoRows:"gridAutoRows",backgroundColor:"backgroundColor",backgroundImage:"backgroundImage",basis:"flexBasis",border:"border",borderRadius:"borderRadius",borderColor:"borderColor",borderWidth:"borderWidth",borderStyle:"borderStyle",bottom:"bottom",boxShadow:"boxShadow",color:"color",column:"gridColumn",columnEnd:"gridColumnEnd",columnGap:"columnGap",columnSpan:"gridColumn",columnStart:"gridColumnStart",direction:"flexDirection",display:"display",flex:"flex",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:"fontStyle",fontWeight:"fontWeight",gap:"gap",grow:"flexGrow",height:"height",justifyContent:"justifyContent",left:"left",letterSpacing:"letterSpacing",lineHeight:"lineHeight",margin:"margin",marginBlock:"marginBlock",marginBlockEnd:"marginBlockEnd",marginBlockStart:"marginBlockStart",marginBottom:"marginBlockEnd",marginInline:"marginInline",marginInlineEnd:"marginInlineEnd",marginInlineStart:"marginInlineStart",marginLeft:"marginInlineStart",marginRight:"marginInlineEnd",marginTop:"marginBlockStart",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",objectFit:"objectFit",objectPosition:"objectPosition",opacity:"opacity",order:"order",overflow:"overflow",padding:"padding",paddingBlock:"paddingBlock",paddingBlockEnd:"paddingBlockEnd",paddingBlockStart:"paddingBlockStart",paddingBottom:"paddingBlockEnd",paddingInline:"paddingInline",paddingInlineEnd:"paddingInlineEnd",paddingInlineStart:"paddingInlineStart",paddingLeft:"paddingInlineStart",paddingRight:"paddingInlineEnd",paddingTop:"paddingBlockStart",position:"position",resize:"resize",right:"right",row:"gridRow",rowEnd:"gridRowEnd",rowGap:"rowGap",rowSpan:"gridRow",rowStart:"gridRowStart",shrink:"flexShrink",templateAreas:"gridTemplateAreas",templateColumns:"gridTemplateColumns",templateRows:"gridTemplateRows",textAlign:"textAlign",textDecoration:"textDecoration",textTransform:"textTransform",top:"top",transform:"transform",transformOrigin:"transformOrigin",width:"width",whiteSpace:"whiteSpace",wrap:"flexWrap"},jR={Alert:{dismissButtonLabel:"Dismiss alert"},PhoneNumberField:{countryCodeLabel:"Country code"},PasswordField:{passwordIsHidden:"Password is hidden",passwordIsShown:"Password is shown",showPassword:"Show password"}},tI={backgroundColor:"colors",borderColor:"colors",borderWidth:"borderWidths",color:"colors",borderRadius:"radii",fontSize:"fontSizes",fontWeight:"fontWeights",fontFamily:"fonts",lineHeight:"lineHeights",opacity:"opacities",boxShadow:"shadows",transform:"transforms",left:"space",right:"space",top:"space",bottom:"space",height:"space",width:"space",letterSpacing:"space",margin:"space",marginBlock:"space",marginBlockEnd:"space",marginBlockStart:"space",marginInline:"space",marginInlineEnd:"space",marginInlineStart:"space",marginLeft:"space",marginRight:"space",marginTop:"space",marginBottom:"space",maxHeight:"space",maxWidth:"space",minHeight:"space",minWidth:"space",padding:"space",paddingBlock:"space",paddingBlockEnd:"space",paddingBlockStart:"space",paddingInline:"space",paddingInlineEnd:"space",paddingInlineStart:"space",paddingLeft:"space",paddingRight:"space",paddingTop:"space",paddingBottom:"space",gap:"space",columnGap:"space",rowGap:"space"},fme=e=>e in tI,r7=e=>typeof e=="string"&&e.length===0,qL=e=>e==null||r7(e),Xy=e=>Object.keys(e),BR=(e,t,n)=>{if(typeof t!="string")return t;if(t.includes(" "))return t.split(" ").map(r=>BR(e,r,n)).join(" ");if(fme(e)){const r=t.split("."),o=tI[e];let s=n[o];for(let a=0;a<r.length;a++){if(s){s=s[r[a]];continue}break}return Yy(s)?`var(--${$R({path:[tI[e],...r]})})`:t}return t},hme=({breakpoint:e,breakpoints:t,values:n})=>{const r=n[e];if(r!==void 0)return r;const o=Xy(t).sort((a,c)=>t[c]-t[a]),s=o.slice(o.indexOf(e));for(const a of s){const c=n[a];if(c!==void 0)return c}return null},pme=e=>Xy(e).reduce((t,n)=>n in Y9.breakpoints.values?{...t,[n]:e[n]}:t,{}),mme=({breakpoint:e,breakpoints:t,values:n})=>{let r={};const o=Xy(t).sort((s,a)=>t[s]-t[a]);return Array.isArray(n)?n.forEach((s,a)=>{r[o[a]]=s}):typeof n=="object"&&(r=pme(n)),hme({breakpoint:e,breakpoints:t,values:r})},gme=({breakpoints:e})=>{const t=Xy(e).sort((n,r)=>e[r]-e[n]);return t.map((n,r)=>{let o="";const s=e[n],a=t[r-1],c=a?e[a]-1:null;return s>=0&&(o=`(min-width: ${s}px)`),c!==null&&(o&&(o+=" and "),o+=`(max-width: ${c}px)`),{breakpoint:n,query:o,maxWidth:c,minWidth:s}})},vme=typeof window>"u"?_.useEffect:_.useLayoutEffect,yme=({breakpoints:e,defaultBreakpoint:t})=>{const r=typeof window<"u"&&typeof window.matchMedia<"u"?window.matchMedia:null,o=_.useMemo(()=>gme({breakpoints:e}),[e]),[s,a]=_.useState(t),c=_.useCallback((u,f)=>{u&&a(f)},[a]);return vme(()=>{if(!r)return;const u=o.map(({query:f,breakpoint:h})=>{const m=r(f);c(m.matches,h);const g=v=>{v.matches&&a(h)};return m.addEventListener("change",g),()=>m.removeEventListener("change",g)});return()=>{u.forEach(f=>f())}},[e,a,r,o]),_.useDebugValue(s,u=>u),s},bme=e=>typeof e>"u"||typeof e.theme>"u"?Qy():e.theme,Sme=()=>{const e=_.useContext(n7);return bme(e)},Cme=({value:e,propKey:t,tokens:n})=>Yy(e)?e.toString():zs(e)?zs(t)?BR(t,e,n):e:null,wme=e=>e==="auto"||typeof e=="number"&&!isNaN(e)||typeof e=="string"&&!isNaN(parseFloat(e)),ZE=e=>e==="auto"?"auto":`span ${e}`,VL=e=>wme(e)?ZE(e):Array.isArray(e)?e.map(t=>ZE(t)):typeof e=="object"&&e!=null?Object.entries(e).reduce((t,[n,r])=>({...t,[n]:ZE(r)}),{}):null,Eme=e=>{const{rowSpan:t,columnSpan:n,row:r,column:o,...s}=e,{rowFromSpanValue:a,columnFromSpanValue:c}=_.useMemo(()=>({rowFromSpanValue:VL(t),columnFromSpanValue:VL(n)}),[t,n]);return{row:qL(r)?a:r,column:qL(o)?c:o,...s}},xme=e=>e in zR,_me=({props:e={},style:t={},breakpoint:n,breakpoints:r,tokens:o})=>{const s={};return Object.keys(e).filter(a=>e[a]!==null).forEach(a=>{if(xme(a)){const c=e[a];if(c==null||r7(c))return;const u=zR[a];let f="";Yy(c)?f=c.toString():typeof c=="string"?f=BR(a,c,o):typeof c=="number"?f=c:typeof c=="object"&&(f=Cme({propKey:a,tokens:o,value:mme({values:c,breakpoint:n,breakpoints:r})})),t={...t,[u]:f}}else typeof e[a]<"u"&&(s[a]=e[a])}),{propStyles:t,nonStyleProps:s}},Ime=(e,t)=>{const{breakpoints:{values:n,defaultBreakpoint:r},tokens:o}=Sme(),s=yme({breakpoints:n,defaultBreakpoint:r}),a=Eme(e);return _.useMemo(()=>_me({props:a,style:t,breakpoint:s,breakpoints:n,tokens:o}),[a,t,n,s,o])},Ft=e=>_.forwardRef(e),Ame=({as:e="div",children:t,testId:n,ariaLabel:r,isDisabled:o,style:s,inert:a,...c},u)=>{const{propStyles:f,nonStyleProps:h}=Ime(c,s);return _.createElement(e,{"aria-label":r,"data-testid":n,disabled:o,ref:u,inert:a?"":null,style:f,...h},t)},je=Ft(Ame);je.displayName="View";const Zd={minX:0,minY:0,width:24,height:24},Rme=({className:e,as:t="svg",fill:n="currentColor",pathData:r,viewBox:o=Zd,children:s,paths:a,...c},u)=>{const f=o.minX??Zd.minX,h=o.minY??Zd.minY,m=o.width??Zd.width,g=o.height??Zd.height;let v;return s&&(v=s),a&&(v=a.map((C,b)=>_.createElement("path",{...C,key:b}))),r&&(v=_.createElement("path",{d:r,fill:n})),_.createElement(je,{as:t,className:ze(ie.Icon,e),ref:u,viewBox:`${f} ${h} ${m} ${g}`,...c},v)},o7=Ft(Rme);o7.displayName="Icon";const Tme=_.createContext({});function Jy(e){const t=_.useContext(Tme);if(e&&t)return t[e]}const Ome=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z",fill:"currentColor"})))},Mme=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z",fill:"currentColor"})))},Pme=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M11 7H13V9H11V7ZM11 11H13V17H11V11ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",fill:"currentColor"})))},Nme=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})))},s7=({variation:e,ariaHidden:t,ariaLabel:n,role:r})=>{const o=Jy("alert");let s;switch(e){case"info":s=o?.info??_.createElement(Pme,{"aria-hidden":t,"aria-label":n,role:r});break;case"error":s=o?.error??_.createElement(Mme,{"aria-hidden":t,"aria-label":n,role:r});break;case"warning":s=o?.warning??_.createElement(Nme,{"aria-hidden":t,"aria-label":n,role:r});break;case"success":s=o?.success??_.createElement(Ome,{"aria-hidden":t,"aria-label":n,role:r});break}return s?_.createElement("span",{className:ie.AlertIcon},s):null};s7.displayName="AlertIcon";const kme=globalThis?.document?_.useLayoutEffect:()=>{},Dme="amplify-id",Lme=Pne.useId||(()=>{});let Ume=0;const Yi=e=>{const[t,n]=_.useState(Lme());return kme(()=>{e||n(r=>r??String(Ume++))},[e]),e??(t?`${Dme}-${t}`:"")},i7=_.createContext({isFieldsetDisabled:!1}),Ph=e=>{let n=_.useContext(i7).isFieldsetDisabled;return(n===void 0||n===!1)&&(n=e),{isFieldsetDisabled:n}},Fme=({className:e,children:t,...n},r)=>_.createElement(je,{className:ze(ie.Flex,e),ref:r,...n},t),$e=Ft(Fme);$e.displayName="Flex";const $me="linear-empty",zme="linear-filled",jme="circular-empty",Bme="circular-filled",WL=8,nI=42,Pm=2*nI*Math.PI,Hme=({className:e,filledColor:t,emptyColor:n,size:r,variation:o,isDeterminate:s=!1,isPercentageTextHidden:a=!1,percentage:c=0,...u},f)=>{c=Math.min(c,100),c=Math.max(c,0);const h=`${c}%`,m=ze(ie.Loader,Lt(ie.Loader,r),Lt(ie.Loader,o),br(ie.Loader,"determinate",s),e),g=_.createElement("g",null,_.createElement("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%",style:{stroke:String(n)},"data-testid":$me}),_.createElement("line",{x1:"0",x2:s?h:"100%",y1:"50%",y2:"50%",style:{stroke:s&&c===0?"none":t?String(t):void 0},"data-testid":zme}),s?_.createElement("text",{"aria-live":"polite",className:ze(ie.LoaderLabel,a?ie.VisuallyHidden:null),x:`${-1+c}%`,y:"200%"},h):null),v=_.createElement("g",null,_.createElement("circle",{cx:"50%",cy:"50%",r:`${nI}%`,strokeWidth:`${WL}%`,style:{stroke:String(n)},"data-testid":jme}),_.createElement("circle",{cx:"50%",cy:"50%",r:`${nI}%`,strokeWidth:`${WL}%`,style:{stroke:String(t),strokeDasharray:s?`${Pm}% ${Pm}%`:void 0,strokeDashoffset:s?`${Pm-Pm*c/100}%`:void 0},"data-testid":Bme}),s?_.createElement("text",{"aria-live":"polite",className:ze(ie.LoaderLabel,a?ie.VisuallyHidden:null),x:"130%",y:"80%"},h):null);return _.createElement(je,{as:"svg","aria-valuenow":s?c:void 0,className:m,ref:f,role:"progressbar",...u},o==="linear"?g:v)},a7=Ft(Hme);a7.displayName="Loader";const qme=["link","primary",void 0],Vme=({className:e,children:t,colorTheme:n,isFullWidth:r=!1,isDisabled:o,isLoading:s,loadingText:a="",size:c,type:u="button",variation:f,...h},m)=>{const g=qme.includes(f)&&n?`${f??"outlined"}--${n}`:void 0,{isFieldsetDisabled:v}=Ph(o??s??h.disabled),C=ze(ie.Button,ie.FieldGroupControl,Lt(ie.Button,f),Lt(ie.Button,g),Lt(ie.Button,c),br(ie.Button,"disabled",v),br(ie.Button,"loading",s),br(ie.Button,"fullwidth",r),e);return _.createElement(je,{ref:m,as:"button",className:C,isDisabled:v,type:u,...h},s?_.createElement($e,{as:"span",className:ie.ButtonLoaderWrapper},_.createElement(a7,{size:c}),a||null):t)},Kt=Ft(Vme);Kt.displayName="Button";const Wme=e=>{const{className:t,size:n,...r}=e;return _.createElement(je,{as:"span",width:n??"1em",height:n??"1em",className:ze(ie.Icon,t),...r},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n?{width:n,height:n}:void 0},_.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})))},Gme=({as:e="p",className:t,children:n,isTruncated:r,variation:o,...s},a)=>{const c=ze(ie.Text,Lt(ie.Text,o),br(ie.Text,"truncated",r),t);return _.createElement(je,{as:e,className:c,ref:a,...s},n)},io=Ft(Gme);io.displayName="Text";const Kme="qa-field-description",eb=({descriptiveText:e,labelHidden:t,...n})=>e?_.createElement(io,{"data-testid":Kme,className:ze(ie.FieldDescription,{[ie.VisuallyHidden]:t}),...n},e):null;eb.displayName="FieldDescription";const tb=({errorMessage:e,hasError:t,...n})=>t&&e?_.createElement(io,{className:ie.FieldErrorMessage,...n},e):null;tb.displayName="FieldErrorMessage";const Zme=({children:e,className:t,visuallyHidden:n,...r},o)=>_.createElement(je,{as:"label",className:ze(ie.Label,t,{[ie.VisuallyHidden]:n}),ref:o,...r},e),HR=Ft(Zme);HR.displayName="Label";const Yme=({buttonRef:e,children:t,className:n,dismissButtonLabel:r=jR.Alert.dismissButtonLabel,hasIcon:o=!0,heading:s,isDismissible:a=!1,onDismiss:c,variation:u,...f},h)=>{const[m,g]=_.useState(!1),v=Jy("alert"),C=_.useCallback(()=>{g(!m),Bs(c)&&c()},[g,c,m]);return m?null:_.createElement($e,{className:ze(ie.Alert,n,Lt(ie.Alert,u)),ref:h,role:"alert",...f},o&&_.createElement(s7,{variation:u,ariaHidden:!0}),_.createElement(je,{flex:"1"},s&&_.createElement(je,{className:ie.AlertHeading},s),_.createElement(je,{className:ie.AlertBody},t)),a&&_.createElement(Kt,{ariaLabel:r,variation:"link",className:ie.AlertDismiss,onClick:C,ref:e},v?.close??_.createElement(Wme,{"aria-hidden":"true"})))},l7=Ft(Yme);l7.displayName="Alert";const Ga=(e,t)=>e&&t?`${e}-${t}`:void 0,Qme=({children:e,className:t,innerEndComponent:n,innerStartComponent:r,orientation:o="horizontal",outerEndComponent:s,outerStartComponent:a,variation:c,...u},f)=>{const h=r!=null,m=n!=null,g=h?ie.FieldGroupHasInnerStart:null,v=m?ie.FieldGroupHasInnerEnd:null,C=ze(ie.FieldGroup,g,v,Lt(ie.FieldGroup,o),t);return _.createElement($e,{className:C,ref:f,...u},a&&_.createElement(je,{className:ze(ie.FieldGroupOuterStart,Lt(ie.FieldGroupOuterStart,c))},a),_.createElement(je,{className:ze(ie.FieldGroupFieldWrapper,Lt(ie.FieldGroupFieldWrapper,o))},r&&_.createElement(je,{className:ie.FieldGroupInnerStart},r),e,n&&_.createElement(je,{className:ie.FieldGroupInnerEnd},n)),s&&_.createElement(je,{className:ze(ie.FieldGroupOuterEnd,Lt(ie.FieldGroupOuterEnd,c))},s))},c7=Ft(Qme);c7.displayName="FieldGroup";const Xme=({autoComplete:e,checked:t,className:n,defaultChecked:r,defaultValue:o,id:s,isDisabled:a,isReadOnly:c,isRequired:u,size:f,type:h="text",hasError:m=!1,value:g,variation:v,...C},b)=>{const E=ze(ie.Input,ie.FieldGroupControl,Lt(ie.Input,v),br(ie.Input,"error",m),Lt(ie.Input,f),n),{isFieldsetDisabled:x}=Ph(a);return _.createElement(je,{"aria-invalid":m,as:"input",autoComplete:e,checked:t,className:E,defaultChecked:r,defaultValue:o,isDisabled:x,id:s,readOnly:c,ref:b,required:u,type:h,value:g,...C})},qR=Ft(Xme);qR.displayName="Input";const Jme=e=>e in zR,u7=e=>{const t={styleProps:{},rest:{}};return Object.keys(e).forEach(n=>{Jme(n)?t.styleProps={...t.styleProps,[n]:e[n]}:t.rest={...t.rest,[n]:e[n]}}),t},VR=e=>{const t=e.filter(n=>n!==void 0).join(" ");return t.length>0?t:void 0},WR="error",GR="description",ege=(e,t)=>{const{className:n,descriptiveText:r,errorMessage:o,hasError:s=!1,id:a,innerEndComponent:c,innerStartComponent:u,label:f,labelHidden:h=!1,outerEndComponent:m,outerStartComponent:g,size:v,testId:C,variation:b,inputStyles:E,...x}=e,I=Yi(a),R=Yi(),M=r?Ga(R,GR):void 0,D=s?Ga(R,WR):void 0,N=VR([D,M]),{styleProps:T,rest:L}=u7(x);return _.createElement($e,{className:ze(ie.Field,Lt(ie.Field,v),ie.TextField,n),testId:C,...T},_.createElement(HR,{htmlFor:I,visuallyHidden:h},f),_.createElement(eb,{id:M,labelHidden:h,descriptiveText:r}),_.createElement(c7,{outerStartComponent:g,outerEndComponent:m,innerStartComponent:u,innerEndComponent:c,variation:b},_.createElement(qR,{"aria-describedby":N,hasError:s,id:I,ref:t,size:v,variation:b,...E,...L})),_.createElement(tb,{id:D,hasError:s,errorMessage:o}))},Nh=Ft(ege);Nh.displayName="TextField";const tge=({as:e="span",children:t,className:n,...r},o)=>_.createElement(je,{as:e,className:ze(ie.VisuallyHidden,n),ref:o,...r},t),nb=Ft(tge);nb.displayName="VisuallyHidden";const nge=({className:e,orientation:t="horizontal",size:n,label:r,...o},s)=>{const a=ze(ie.Divider,Lt(ie.Divider,t),Lt(ie.Divider,n),e);return _.createElement(je,{"aria-orientation":t,as:"hr",className:a,"data-label":r,ref:s,...o})},KR=Ft(nge);KR.displayName="Divider";const rge=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16.59 8.58984L12 13.1698L7.41 8.58984L6 9.99984L12 15.9998L18 9.99984L16.59 8.58984Z",fill:"currentColor"})))},oge=({children:e,className:t,isDisabled:n,legend:r,legendHidden:o,size:s,testId:a,variation:c="plain",...u},f)=>{const{isFieldsetDisabled:h}=Ph(n),m=_.useMemo(()=>({isFieldsetDisabled:h}),[h]),g=ze(ie.Fieldset,Lt(ie.Fieldset,c),Lt(ie.Fieldset,s),t),v=ze(ie.FieldsetLegend,Lt(ie.FieldsetLegend,s),{[ie.VisuallyHidden]:o});return _.createElement(i7.Provider,{value:m},_.createElement($e,{as:"fieldset",className:g,ref:f,disabled:h,testId:a,...u},_.createElement(nb,{as:"legend"},r),_.createElement(je,{as:"div","aria-hidden":"true",className:v},r),e))},d7=Ft(oge);d7.displayName="Fieldset";const sge={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},ige=({className:e,children:t,isTruncated:n,level:r=6,...o},s)=>_.createElement(je,{as:sge[r],className:ze(ie.Heading,Lt(ie.Heading,r),br(ie.Heading,"truncated",n),e),ref:s,...o},t),ar=Ft(ige);ar.displayName="Heading";var age=_.createContext(void 0),lge=e=>{const{dir:t,children:n}=e;return O.jsx(age.Provider,{value:t,children:n})};const cge=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 6.0002C15.79 6.0002 19.17 8.1302 20.82 11.5002C20.23 12.7202 19.4 13.7702 18.41 14.6202L19.82 16.0302C21.21 14.8002 22.31 13.2602 23 11.5002C21.27 7.1102 17 4.0002 12 4.0002C10.73 4.0002 9.51 4.2002 8.36 4.5702L10.01 6.2202C10.66 6.0902 11.32 6.0002 12 6.0002ZM10.93 7.14019L13 9.2102C13.57 9.4602 14.03 9.9202 14.28 10.4902L16.35 12.5602C16.43 12.2202 16.49 11.8602 16.49 11.4902C16.5 9.0102 14.48 7.0002 12 7.0002C11.63 7.0002 11.28 7.05019 10.93 7.14019ZM2.01 3.8702L4.69 6.5502C3.06 7.8302 1.77 9.5302 1 11.5002C2.73 15.8902 7 19.0002 12 19.0002C13.52 19.0002 14.98 18.7102 16.32 18.1802L19.74 21.6002L21.15 20.1902L3.42 2.4502L2.01 3.8702ZM9.51 11.3702L12.12 13.9802C12.08 13.9902 12.04 14.0002 12 14.0002C10.62 14.0002 9.5 12.8802 9.5 11.5002C9.5 11.4502 9.51 11.4202 9.51 11.3702V11.3702ZM6.11 7.97019L7.86 9.7202C7.63 10.2702 7.5 10.8702 7.5 11.5002C7.5 13.9802 9.52 16.0002 12 16.0002C12.63 16.0002 13.23 15.8702 13.77 15.6402L14.75 16.6202C13.87 16.8602 12.95 17.0002 12 17.0002C8.21 17.0002 4.83 14.8702 3.18 11.5002C3.88 10.0702 4.9 8.89019 6.11 7.97019Z",fill:"currentColor"})))},uge=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 6C15.79 6 19.17 8.13 20.82 11.5C19.17 14.87 15.79 17 12 17C8.21 17 4.83 14.87 3.18 11.5C4.83 8.13 8.21 6 12 6ZM12 4C7 4 2.73 7.11 1 11.5C2.73 15.89 7 19 12 19C17 19 21.27 15.89 23 11.5C21.27 7.11 17 4 12 4ZM12 9C13.38 9 14.5 10.12 14.5 11.5C14.5 12.88 13.38 14 12 14C10.62 14 9.5 12.88 9.5 11.5C9.5 10.12 10.62 9 12 9ZM12 7C9.52 7 7.5 9.02 7.5 11.5C7.5 13.98 9.52 16 12 16C14.48 16 16.5 13.98 16.5 11.5C16.5 9.02 14.48 7 12 7Z",fill:"currentColor"})))},{passwordIsHidden:dge,passwordIsShown:fge,showPassword:hge}=jR.PasswordField,pge=({fieldType:e,passwordIsHiddenLabel:t=dge,passwordIsShownLabel:n=fge,showPasswordButtonLabel:r=hge,size:o,hasError:s,...a},c)=>{const u=Jy("passwordField"),f=ze(ie.FieldShowPassword,br(ie.FieldShowPassword,"error",s)),h=e==="password"?u?.visibility??_.createElement(uge,{"aria-hidden":"true"}):u?.visibilityOff??_.createElement(cge,{"aria-hidden":"true"});return _.createElement(Kt,{"aria-checked":e!=="password",ariaLabel:r,className:f,colorTheme:s?"error":void 0,ref:c,role:"switch",size:o,...a},_.createElement(nb,{"aria-live":"polite"},e==="password"?t:n),h)},f7=Ft(pge);f7.displayName="ShowPasswordButton";const mge=({autoComplete:e="current-password",label:t,className:n,hideShowPassword:r=!1,passwordIsHiddenLabel:o,passwordIsShownLabel:s,showPasswordButtonLabel:a,showPasswordButtonRef:c,size:u,hasError:f,...h},m)=>{const[g,v]=_.useState("password"),C=_.useCallback(()=>{v(g==="password"?"text":"password")},[v,g]);return _.createElement(Nh,{autoComplete:e,outerEndComponent:r?null:_.createElement(f7,{fieldType:g,onClick:C,passwordIsHiddenLabel:o,passwordIsShownLabel:s,ref:c,size:u,showPasswordButtonLabel:a,hasError:f}),size:u,type:g,label:t,className:ze(ie.PasswordField,n),ref:m,hasError:f,...h})},ZR=Ft(mge);ZR.displayName="PasswordField";const gge=({autoComplete:e,className:t,size:n,variation:r,value:o,defaultValue:s,hasError:a,icon:c,iconColor:u,children:f,placeholder:h,isDisabled:m,isRequired:g,isMultiple:v=!1,selectSize:C=1,...b},E)=>{const I=o===void 0&&s===void 0&&h,R=v||C>1,M=ze(ie.Select,ie.FieldGroupControl,Lt(ie.Select,n),Lt(ie.Select,r),br(ie.Select,"error",a),br(ie.Select,"expanded",R),t),D=Jy("select"),{isFieldsetDisabled:N}=Ph(m);return _.createElement(je,{className:ie.SelectWrapper},_.createElement(je,{"aria-invalid":a,as:"select",autoComplete:e,value:o,defaultValue:I?"":s,isDisabled:N,multiple:v,size:C,required:g,className:M,ref:E,...b},h&&_.createElement("option",{value:""},h),f),R?null:_.createElement($e,{className:ze(ie.SelectIcon,Lt(ie.SelectIcon,n)),color:u,"aria-hidden":"true"},c??D?.expand??_.createElement(rge,null)))},h7=Ft(gge);h7.displayName="Select";const vge=({children:e,options:t})=>e?(t?.length&&console.warn("Amplify UI: <SelectField> component defaults to rendering children over `options`. When using the `options` prop, omit children."),e):t?.map((n,r)=>_.createElement("option",{label:n,value:n,key:`${n}-${r}`},n)),yge=(e,t)=>{const{children:n,className:r,descriptiveText:o,errorMessage:s,hasError:a=!1,id:c,label:u,labelHidden:f=!1,options:h,size:m,testId:g,inputStyles:v,...C}=e,b=Yi(c),E=Yi(),x=o?Ga(E,GR):void 0,I=a?Ga(E,WR):void 0,R=VR([I,x]),{styleProps:M,rest:D}=u7(C);return _.createElement($e,{className:ze(ie.Field,Lt(ie.Field,m),ie.SelectField,r),testId:g,...M},_.createElement(HR,{htmlFor:b,visuallyHidden:f},u),_.createElement(eb,{id:x,labelHidden:f,descriptiveText:o}),_.createElement(h7,{"aria-describedby":R,hasError:a,id:b,ref:t,size:m,...D,...v},vge({children:n,options:h})),_.createElement(tb,{id:I,hasError:a,errorMessage:s}))},p7=Ft(yge);p7.displayName="SelectField";const bge=({className:e,dialCodeList:t,isReadOnly:n,...r},o)=>{const s=t??$9,a=_.useMemo(()=>s.map(c=>_.createElement("option",{key:c,value:c,disabled:n},c)),[s,n]);return _.createElement(p7,{"aria-disabled":n,autoComplete:"tel-country-code",className:ze(ie.CountryCodeSelect,ie.DialCodeSelect,e),labelHidden:!0,ref:o,...r},a)},m7=Ft(bge);m7.displayName="DialCodeSelect";const Sge=({autoComplete:e="tel-national",className:t,defaultDialCode:n,dialCodeLabel:r=jR.PhoneNumberField.countryCodeLabel,dialCodeList:o,dialCodeName:s,dialCodeRef:a,hasError:c,isDisabled:u,isReadOnly:f,onDialCodeChange:h,onInput:m,size:g,variation:v,...C},b)=>_.createElement(Nh,{outerStartComponent:_.createElement(m7,{defaultValue:n,dialCodeList:o,className:t,hasError:c,isDisabled:u,isReadOnly:f,label:r,name:s,onChange:h,ref:a,size:g,variation:v}),autoComplete:e,className:ze(ie.PhoneNumberField,t),hasError:c,isDisabled:u,isReadOnly:f,onInput:m,ref:b,size:g,type:"tel",variation:v,...C}),g7=Ft(Sge);g7.displayName="PhoneNumberField";const Cge={name:"default"},v7=B.createContext(Cge),wge=()=>_.useContext(v7),Ege=({children:e,className:t,id:n,isDisabled:r=!1,testId:o,value:s,labelPosition:a,...c},u)=>{const{currentValue:f,defaultValue:h,name:m,hasError:g,isGroupDisabled:v=!1,isRequired:C,isReadOnly:b,onChange:E,size:x,labelPosition:I}=wge(),{isFieldsetDisabled:R}=Ph(v||r||b&&h!==s),M=f!==void 0?s===f:void 0,D=h!==void 0?s===h:void 0,N=a??I;return _.createElement($e,{as:"label",className:ze(ie.Radio,br(ie.Radio,"disabled",R),N?`amplify-label-${N}`:null,t)},e&&_.createElement(io,{as:"span",className:ze(ie.RadioLabel,br(ie.RadioLabel,"disabled",R))},e),_.createElement(qR,{checked:M,className:ze(ie.VisuallyHidden,ie.RadioInput),defaultChecked:D,hasError:g,id:n,isDisabled:R,isReadOnly:b,isRequired:C,onChange:E,ref:u,type:"radio",name:m,value:s,...c}),_.createElement($e,{"aria-hidden":"true",as:"span",className:ze(ie.RadioButton,Lt(ie.RadioButton,x)),testId:o}))},YR=Ft(Ege);YR.displayName="Radio";const xge=({children:e,className:t,defaultValue:n,descriptiveText:r,errorMessage:o,hasError:s=!1,id:a,isDisabled:c,isRequired:u,isReadOnly:f,legend:h,legendHidden:m=!1,labelPosition:g,onChange:v,name:C,size:b,testId:E,value:x,variation:I,...R},M)=>{const D=Yi(a),N=Yi(),T=r?Ga(N,GR):void 0,L=s?Ga(N,WR):void 0,$=VR([L,T]),G=Ga(E,ie.RadioGroup),z=_.useMemo(()=>({currentValue:x,defaultValue:n,hasError:s,isRequired:u,isReadOnly:f,isGroupDisabled:c,onChange:v,size:b,name:C,labelPosition:g}),[n,s,c,u,f,v,b,C,x,g]);return _.createElement(d7,{className:ze(ie.Field,Lt(ie.Field,b),ie.RadioGroupField,t),isDisabled:c,legend:h,legendHidden:m,ref:M,role:"radiogroup",size:b,testId:E,variation:I,...R},_.createElement(eb,{id:T,labelHidden:m,descriptiveText:r}),_.createElement($e,{"aria-describedby":$,className:ie.RadioGroup,id:D,testId:G},_.createElement(v7.Provider,{value:z},e)),_.createElement(tb,{id:L,hasError:s,errorMessage:o}))},QR=Ft(xge);QR.displayName="RadioGroupField";const rb=_.createContext({groupId:"",activeTab:"",setActiveTab:()=>{}}),y7="-",_ge=({className:e,value:t,children:n,onClick:r,as:o="button",role:s="tab",...a},c)=>{const{activeTab:u,setActiveTab:f,groupId:h}=_.useContext(rb);let m=t;typeof m=="string"&&(m=m.replace(" ",y7));const g=u===t,v=C=>{Bs(r)&&r?.(C),f(t)};return _.createElement(je,{...a,role:s,as:o,id:`${h}-tab-${m}`,"aria-selected":g,"aria-controls":`${h}-panel-${m}`,tabIndex:g?void 0:-1,className:ze(ie.TabsItem,br(ie.TabsItem,"active",u===t),e),ref:c,onClick:v},n)},XR=Ft(_ge);XR.displayName="Tabs.Item";const Ige=e=>_.isValidElement(e),Age=({className:e,children:t,indicatorPosition:n,spacing:r,role:o="tablist",...s},a)=>{const c=_.useRef(null),{activeTab:u,setActiveTab:f}=_.useContext(rb);_.useImperativeHandle(a,()=>c.current);const h=_.useMemo(()=>_.Children.toArray(t).map(b=>{if(b&&Ige(b))return b.props.value}).filter(b=>!!b),[t]),m=h.indexOf(u),g=_.useCallback(()=>{let b=m===h.length-1?0:m+1;const E=c.current?.querySelectorAll("button")??[];for(;E[b].disabled;)b===h.length-1?b=0:b++;const x=h[b];if(x){f(x);const I=E[b];I?.focus(),I?.click()}},[m,f,h]),v=_.useCallback(()=>{let b=m===0?h.length-1:m-1;const E=c.current?.querySelectorAll("button")??[];for(;E[b].disabled;)b===0?b=h.length-1:b--;const x=h[b];if(x){f(x);const I=E[b];I?.focus(),I?.click()}},[m,f,h]),C=_.useCallback(b=>{switch(b.key){case"ArrowLeft":b.preventDefault(),b.stopPropagation(),v();break;case"ArrowUp":case"ArrowRight":b.preventDefault(),b.stopPropagation(),g();break}},[v,g]);return _.createElement(je,{...s,role:o,onKeyDown:C,className:ze(ie.TabsList,n?Lt(ie.TabsList,n):null,r?Lt(ie.TabsList,r):null,e),ref:c},t)},JR=Ft(Age);JR.displayName="Tabs.List";const Rge=({className:e,value:t,children:n,role:r="tabpanel",...o},s)=>{const{activeTab:a,isLazy:c,groupId:u}=_.useContext(rb);if(c&&a!==t)return null;let f=t;return typeof f=="string"&&(f=f.replace(" ",y7)),_.createElement(je,{...o,role:r,id:`${u}-panel-${f}`,"aria-labelledby":`${u}-tab-${f}`,className:ze(ie.TabsPanel,br(ie.TabsPanel,"active",a===t),e),ref:s},n)},eT=Ft(Rge);eT.displayName="Tabs.Panel";const Tge=({children:e,defaultValue:t,className:n,value:r,onValueChange:o,isLazy:s,...a},c)=>{const u=Yi(),f=r!==void 0,[h,m]=_.useState(()=>f?r:t),g=f?r:h??"",v=_.useCallback(b=>{Bs(o)&&o(b),f||m(b)},[o,f]),C=_.useMemo(()=>({activeTab:g,isLazy:s,setActiveTab:v,groupId:u}),[g,v,s,u]);return _.createElement(rb.Provider,{value:C},_.createElement(je,{...a,ref:c,className:ze(n,ie.Tabs)},e))},tT=Ft(Tge);tT.displayName="Tabs.Container";const Oge=({items:e,indicatorPosition:t,justifyContent:n,spacing:r,...o},s)=>_.createElement(tT,{...o,ref:s},_.createElement(JR,{indicatorPosition:t,justifyContent:n,spacing:r},e?.map(({value:a,label:c,content:u,...f})=>_.createElement(XR,{...f,key:a,value:a},c))),e?.map(({value:a,content:c,isDisabled:u})=>_.createElement(eT,{key:a,value:a,isDisabled:u},c))),La=Object.assign(Ft(Oge),{Item:XR,List:JR,Panel:eT,Container:tT});La.displayName="Tabs";const YE=({errors:e,id:t,dataAttr:n})=>{if(!(e?.length>0))return null;const r=n?{[n]:!0}:{};return B.createElement(je,{...r,id:t},e.map(o=>B.createElement(io,{key:o,role:"alert",variation:"error"},ye(o))))},Mge="6.15.4",Pge=({message:e,shouldWarn:t})=>{ume({message:e,shouldWarn:t})},b7=_.createContext(null),jr=()=>{const e=_.useContext(b7);if(!e)throw new Error("`useCustomComponents` cannot be used outside of a `CustomComponentsContext.Provider`");return e},Nge=e=>{const t=new FormData(e.target);return Object.fromEntries(t)};function Br(){const{submitForm:e,updateBlur:t,updateForm:n}=ht(a=>[a.submitForm,a.updateBlur,a.updateForm]),r=_.useCallback(({target:{name:a}})=>{t({name:a})},[t]),o=_.useCallback(({target:{checked:a,name:c,type:u,value:f}})=>{n({name:c,value:u==="checkbox"&&!a?void 0:f})},[n]),s=_.useCallback(a=>{a.preventDefault(),e(Nge(a))},[e]);return{handleBlur:r,handleChange:o,handleSubmit:s}}const xr=()=>{const{error:e}=ht(t=>[t.error]);return B.createElement(B.Fragment,null,e?B.createElement(l7,{variation:"error",isDismissible:!0},ye(e)):null)};function GL({autocomplete:e,dialCode:t,name:n,type:r,...o}){const{validationErrors:s}=ht(({validationErrors:h})=>[h]),a=_.useMemo(()=>oue(s[n]),[n,s]),c=a?.length>0,u=Yi(),f=c?u:void 0;return r==="tel"?_.createElement(_.Fragment,null,_.createElement(g7,{...o,name:n,defaultDialCode:t,dialCodeName:"country_code",autoComplete:e,hasError:c,"aria-describedby":f}),_.createElement(YE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:u})):r==="password"?_.createElement(_.Fragment,null,_.createElement(ZR,{...o,name:n,autoCapitalize:"off",autoComplete:e,hasError:c,"aria-describedby":f}),_.createElement(YE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:u})):_.createElement(_.Fragment,null,_.createElement(Nh,{...o,name:n,autoCapitalize:"off",autoComplete:e,hasError:c,type:r,"aria-describedby":f}),_.createElement(YE,{dataAttr:"data-amplify-sign-up-errors",errors:a,id:u}))}function ns({includePassword:e}={}){const{fields:t}=ht(({route:c})=>[c]),{selectedAuthMethod:n,preferredChallenge:r}=ht(c=>[c.selectedAuthMethod,c.preferredChallenge]),o=n??r,s=e??(!o||o==="PASSWORD"),a=_.useRef(t.map((c,u)=>(c.name==="password"||c.name==="confirm_password")&&!s?_.createElement(GL,{key:u,...c,isRequired:!1}):_.createElement(GL,{key:u,...c})).filter(Boolean)).current;return _.createElement(_.Fragment,null,a)}function wr({children:e,className:t,variation:n="default"}){ht(({route:s})=>[s]);const{components:{Header:r,Footer:o}}=jr();return B.createElement(je,{className:t,"data-amplify-authenticator":"","data-variation":n},B.createElement(je,{"data-amplify-container":""},B.createElement(r,null),B.createElement(je,{"data-amplify-router":"","data-amplify-router-content":void 0},e),B.createElement(o,null)))}const{getDeliveryMessageText:kge,getDeliveryMethodText:Dge,getConfirmingText:Lge,getConfirmText:Uge,getResendCodeText:Fge}=Rn;function il({className:e,variation:t}){const{isPending:n,resendCode:r,codeDeliveryDetails:o}=ht(f=>[f.isPending,f.resendCode,f.codeDeliveryDetails]),{handleChange:s,handleSubmit:a}=Br(),{components:{ConfirmSignUp:{Header:c=il.Header,Footer:u=il.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignup":"",method:"post",onChange:s,onSubmit:a},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(c,null),B.createElement($e,{direction:"column"},B.createElement(io,{className:"amplify-authenticator__subtitle"},kge(o)),B.createElement(ns,null),B.createElement(xr,null),B.createElement(Kt,{variation:"primary",isDisabled:n,type:"submit",loadingText:Lge(),isLoading:n},Uge()),B.createElement(Kt,{onClick:r,type:"button"},Fge())),B.createElement(u,null))))}const $ge=()=>{const{codeDeliveryDetails:e}=ht(t=>[t.codeDeliveryDetails]);return B.createElement(ar,{level:4},Dge(e))};il.Header=$ge;il.Footer=function(){return null};const{getChangePasswordText:S7,getChangingText:zge,getBackToSignInText:jge}=Rn,Io=({className:e,variation:t})=>{const{isPending:n,toSignIn:r}=ht(h=>[h.isPending,h.toSignIn]),{handleBlur:o,handleChange:s,handleSubmit:a}=Br(),{components:{ForceNewPassword:{FormFields:c=Io.FormFields,Header:u=Io.Header,Footer:f=Io.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forcenewpassword":"",method:"post",onChange:s,onSubmit:a,onBlur:o},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(u,null),B.createElement(c,null),B.createElement(xr,null),B.createElement(Kt,{isDisabled:n,type:"submit",variation:"primary",isLoading:n,loadingText:zge()},S7()),B.createElement(Kt,{onClick:r,type:"button",variation:"link",size:"small"},jge()),B.createElement(f,null))))};Io.FormFields=function(){return B.createElement(ns,null)};Io.Header=function(){return B.createElement(ar,{level:4},S7())};Io.Footer=function(){return null};var wc={},QE,KL;function Bge(){return KL||(KL=1,QE=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),QE}var XE={},Ti={},ZL;function El(){if(ZL)return Ti;ZL=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Ti.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},Ti.getSymbolTotalCodewords=function(r){return t[r]},Ti.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Ti.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Ti.isKanjiModeEnabled=function(){return typeof e<"u"},Ti.toSJIS=function(r){return e(r)},Ti}var JE={},YL;function nT(){return YL||(YL=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(JE)),JE}var ex,QL;function Hge(){if(QL)return ex;QL=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},ex=e,ex}var tx,XL;function qge(){if(XL)return tx;XL=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const s=t*this.size+n;this.data[s]=r,o&&(this.reservedBit[s]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},tx=e,tx}var nx={},JL;function Vge(){return JL||(JL=1,(function(e){const t=El().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,s=t(r),a=s===145?26:Math.ceil((s-13)/(2*o-2))*2,c=[s-7];for(let u=1;u<o-1;u++)c[u]=c[u-1]-a;return c.push(6),c.reverse()},e.getPositions=function(r){const o=[],s=e.getRowColCoords(r),a=s.length;for(let c=0;c<a;c++)for(let u=0;u<a;u++)c===0&&u===0||c===0&&u===a-1||c===a-1&&u===0||o.push([s[c],s[u]]);return o}})(nx)),nx}var rx={},e4;function Wge(){if(e4)return rx;e4=1;const e=El().getSymbolSize,t=7;return rx.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},rx}var ox={},t4;function Gge(){return t4||(t4=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const s=o.size;let a=0,c=0,u=0,f=null,h=null;for(let m=0;m<s;m++){c=u=0,f=h=null;for(let g=0;g<s;g++){let v=o.get(m,g);v===f?c++:(c>=5&&(a+=t.N1+(c-5)),f=v,c=1),v=o.get(g,m),v===h?u++:(u>=5&&(a+=t.N1+(u-5)),h=v,u=1)}c>=5&&(a+=t.N1+(c-5)),u>=5&&(a+=t.N1+(u-5))}return a},e.getPenaltyN2=function(o){const s=o.size;let a=0;for(let c=0;c<s-1;c++)for(let u=0;u<s-1;u++){const f=o.get(c,u)+o.get(c,u+1)+o.get(c+1,u)+o.get(c+1,u+1);(f===4||f===0)&&a++}return a*t.N2},e.getPenaltyN3=function(o){const s=o.size;let a=0,c=0,u=0;for(let f=0;f<s;f++){c=u=0;for(let h=0;h<s;h++)c=c<<1&2047|o.get(f,h),h>=10&&(c===1488||c===93)&&a++,u=u<<1&2047|o.get(h,f),h>=10&&(u===1488||u===93)&&a++}return a*t.N3},e.getPenaltyN4=function(o){let s=0;const a=o.data.length;for(let u=0;u<a;u++)s+=o.data[u];return Math.abs(Math.ceil(s*100/a/5)-10)*t.N4};function n(r,o,s){switch(r){case e.Patterns.PATTERN000:return(o+s)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return s%3===0;case e.Patterns.PATTERN011:return(o+s)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(s/3))%2===0;case e.Patterns.PATTERN101:return o*s%2+o*s%3===0;case e.Patterns.PATTERN110:return(o*s%2+o*s%3)%2===0;case e.Patterns.PATTERN111:return(o*s%3+(o+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,s){const a=s.size;for(let c=0;c<a;c++)for(let u=0;u<a;u++)s.isReserved(u,c)||s.xor(u,c,n(o,u,c))},e.getBestMask=function(o,s){const a=Object.keys(e.Patterns).length;let c=0,u=1/0;for(let f=0;f<a;f++){s(f),e.applyMask(f,o);const h=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(f,o),h<u&&(u=h,c=f)}return c}})(ox)),ox}var Nm={},n4;function C7(){if(n4)return Nm;n4=1;const e=nT(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Nm.getBlocksCount=function(o,s){switch(s){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},Nm.getTotalCodewordsCount=function(o,s){switch(s){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},Nm}var sx={},Yd={},r4;function Kge(){if(r4)return Yd;r4=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Yd.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Yd.exp=function(r){return e[r]},Yd.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},Yd}var o4;function Zge(){return o4||(o4=1,(function(e){const t=Kge();e.mul=function(r,o){const s=new Uint8Array(r.length+o.length-1);for(let a=0;a<r.length;a++)for(let c=0;c<o.length;c++)s[a+c]^=t.mul(r[a],o[c]);return s},e.mod=function(r,o){let s=new Uint8Array(r);for(;s.length-o.length>=0;){const a=s[0];for(let u=0;u<o.length;u++)s[u]^=t.mul(o[u],a);let c=0;for(;c<s.length&&s[c]===0;)c++;s=s.slice(c)}return s},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let s=0;s<r;s++)o=e.mul(o,new Uint8Array([1,t.exp(s)]));return o}})(sx)),sx}var ix,s4;function Yge(){if(s4)return ix;s4=1;const e=Zge();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const s=e.mod(o,this.genPoly),a=this.degree-s.length;if(a>0){const c=new Uint8Array(this.degree);return c.set(s,a),c}return s},ix=t,ix}var ax={},lx={},cx={},i4;function w7(){return i4||(i4=1,cx.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),cx}var $o={},a4;function E7(){if(a4)return $o;a4=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
74
|
+
]))+`;$o.KANJI=new RegExp(n,"g"),$o.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),$o.BYTE=new RegExp(r,"g"),$o.NUMERIC=new RegExp(e,"g"),$o.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+e+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return $o.testKanji=function(u){return o.test(u)},$o.testNumeric=function(u){return s.test(u)},$o.testAlphanumeric=function(u){return a.test(u)},$o}var l4;function xl(){return l4||(l4=1,(function(e){const t=w7(),n=E7();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,a){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?s.ccBits[0]:a<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return n.testNumeric(s)?e.NUMERIC:n.testAlphanumeric(s)?e.ALPHANUMERIC:n.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(s,a){if(e.isValid(s))return s;try{return r(s)}catch{return a}}})(lx)),lx}var c4;function Qge(){return c4||(c4=1,(function(e){const t=El(),n=C7(),r=nT(),o=xl(),s=w7(),a=7973,c=t.getBCHDigit(a);function u(g,v,C){for(let b=1;b<=40;b++)if(v<=e.getCapacity(b,C,g))return b}function f(g,v){return o.getCharCountIndicator(g,v)+4}function h(g,v){let C=0;return g.forEach(function(b){const E=f(b.mode,v);C+=E+b.getBitsLength()}),C}function m(g,v){for(let C=1;C<=40;C++)if(h(g,C)<=e.getCapacity(C,v,o.MIXED))return C}e.from=function(v,C){return s.isValid(v)?parseInt(v,10):C},e.getCapacity=function(v,C,b){if(!s.isValid(v))throw new Error("Invalid QR Code version");typeof b>"u"&&(b=o.BYTE);const E=t.getSymbolTotalCodewords(v),x=n.getTotalCodewordsCount(v,C),I=(E-x)*8;if(b===o.MIXED)return I;const R=I-f(b,v);switch(b){case o.NUMERIC:return Math.floor(R/10*3);case o.ALPHANUMERIC:return Math.floor(R/11*2);case o.KANJI:return Math.floor(R/13);case o.BYTE:default:return Math.floor(R/8)}},e.getBestVersionForData=function(v,C){let b;const E=r.from(C,r.M);if(Array.isArray(v)){if(v.length>1)return m(v,E);if(v.length===0)return 1;b=v[0]}else b=v;return u(b.mode,b.getLength(),E)},e.getEncodedBits=function(v){if(!s.isValid(v)||v<7)throw new Error("Invalid QR Code version");let C=v<<12;for(;t.getBCHDigit(C)-c>=0;)C^=a<<t.getBCHDigit(C)-c;return v<<12|C}})(ax)),ax}var ux={},u4;function Xge(){if(u4)return ux;u4=1;const e=El(),t=1335,n=21522,r=e.getBCHDigit(t);return ux.getEncodedBits=function(s,a){const c=s.bit<<3|a;let u=c<<10;for(;e.getBCHDigit(u)-r>=0;)u^=t<<e.getBCHDigit(u)-r;return(c<<10|u)^n},ux}var dx={},fx,d4;function Jge(){if(d4)return fx;d4=1;const e=xl();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,s,a;for(o=0;o+3<=this.data.length;o+=3)s=this.data.substr(o,3),a=parseInt(s,10),r.put(a,10);const c=this.data.length-o;c>0&&(s=this.data.substr(o),a=parseInt(s,10),r.put(a,c*3+1))},fx=t,fx}var hx,f4;function eve(){if(f4)return hx;f4=1;const e=xl(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let s;for(s=0;s+2<=this.data.length;s+=2){let a=t.indexOf(this.data[s])*45;a+=t.indexOf(this.data[s+1]),o.put(a,11)}this.data.length%2&&o.put(t.indexOf(this.data[s]),6)},hx=n,hx}var px,h4;function tve(){return h4||(h4=1,px=function(t){for(var n=[],r=t.length,o=0;o<r;o++){var s=t.charCodeAt(o);if(s>=55296&&s<=56319&&r>o+1){var a=t.charCodeAt(o+1);a>=56320&&a<=57343&&(s=(s-55296)*1024+a-56320+65536,o+=1)}if(s<128){n.push(s);continue}if(s<2048){n.push(s>>6|192),n.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){n.push(s>>12|224),n.push(s>>6&63|128),n.push(s&63|128);continue}if(s>=65536&&s<=1114111){n.push(s>>18|240),n.push(s>>12&63|128),n.push(s>>6&63|128),n.push(s&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer}),px}var mx,p4;function nve(){if(p4)return mx;p4=1;const e=tve(),t=xl();function n(r){this.mode=t.BYTE,this.data=new Uint8Array(e(r))}return n.getBitsLength=function(o){return o*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){for(let o=0,s=this.data.length;o<s;o++)r.put(this.data[o],8)},mx=n,mx}var gx,m4;function rve(){if(m4)return gx;m4=1;const e=xl(),t=El();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let s=t.toSJIS(this.data[o]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
|
|
75
|
+
Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),r.put(s,13)}},gx=n,gx}var vx={exports:{}},g4;function ove(){return g4||(g4=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var s={},a={};a[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var u,f,h,m,g,v,C,b,E;!c.empty();){u=c.pop(),f=u.value,m=u.cost,g=n[f]||{};for(h in g)g.hasOwnProperty(h)&&(v=g[h],C=m+v,b=a[h],E=typeof a[h]>"u",(E||b>C)&&(a[h]=C,c.push(h,C),s[h]=f))}if(typeof o<"u"&&typeof a[o]>"u"){var x=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(x)}return s},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],s=r;s;)o.push(s),n[s],s=n[s];return o.reverse(),o},find_path:function(n,r,o){var s=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(s,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},s;n=n||{};for(s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(vx)),vx.exports}var v4;function sve(){return v4||(v4=1,(function(e){const t=xl(),n=Jge(),r=eve(),o=nve(),s=rve(),a=E7(),c=El(),u=ove();function f(x){return unescape(encodeURIComponent(x)).length}function h(x,I,R){const M=[];let D;for(;(D=x.exec(R))!==null;)M.push({data:D[0],index:D.index,mode:I,length:D[0].length});return M}function m(x){const I=h(a.NUMERIC,t.NUMERIC,x),R=h(a.ALPHANUMERIC,t.ALPHANUMERIC,x);let M,D;return c.isKanjiModeEnabled()?(M=h(a.BYTE,t.BYTE,x),D=h(a.KANJI,t.KANJI,x)):(M=h(a.BYTE_KANJI,t.BYTE,x),D=[]),I.concat(R,M,D).sort(function(T,L){return T.index-L.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function g(x,I){switch(I){case t.NUMERIC:return n.getBitsLength(x);case t.ALPHANUMERIC:return r.getBitsLength(x);case t.KANJI:return s.getBitsLength(x);case t.BYTE:return o.getBitsLength(x)}}function v(x){return x.reduce(function(I,R){const M=I.length-1>=0?I[I.length-1]:null;return M&&M.mode===R.mode?(I[I.length-1].data+=R.data,I):(I.push(R),I)},[])}function C(x){const I=[];for(let R=0;R<x.length;R++){const M=x[R];switch(M.mode){case t.NUMERIC:I.push([M,{data:M.data,mode:t.ALPHANUMERIC,length:M.length},{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.ALPHANUMERIC:I.push([M,{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.KANJI:I.push([M,{data:M.data,mode:t.BYTE,length:f(M.data)}]);break;case t.BYTE:I.push([{data:M.data,mode:t.BYTE,length:f(M.data)}])}}return I}function b(x,I){const R={},M={start:{}};let D=["start"];for(let N=0;N<x.length;N++){const T=x[N],L=[];for(let $=0;$<T.length;$++){const G=T[$],z=""+N+$;L.push(z),R[z]={node:G,lastCount:0},M[z]={};for(let F=0;F<D.length;F++){const q=D[F];R[q]&&R[q].node.mode===G.mode?(M[q][z]=g(R[q].lastCount+G.length,G.mode)-g(R[q].lastCount,G.mode),R[q].lastCount+=G.length):(R[q]&&(R[q].lastCount=G.length),M[q][z]=g(G.length,G.mode)+4+t.getCharCountIndicator(G.mode,I))}}D=L}for(let N=0;N<D.length;N++)M[D[N]].end=0;return{map:M,table:R}}function E(x,I){let R;const M=t.getBestModeForData(x);if(R=t.from(I,M),R!==t.BYTE&&R.bit<M.bit)throw new Error('"'+x+'" cannot be encoded with mode '+t.toString(R)+`.
|
|
76
|
+
Suggested mode is: `+t.toString(M));switch(R===t.KANJI&&!c.isKanjiModeEnabled()&&(R=t.BYTE),R){case t.NUMERIC:return new n(x);case t.ALPHANUMERIC:return new r(x);case t.KANJI:return new s(x);case t.BYTE:return new o(x)}}e.fromArray=function(I){return I.reduce(function(R,M){return typeof M=="string"?R.push(E(M,null)):M.data&&R.push(E(M.data,M.mode)),R},[])},e.fromString=function(I,R){const M=m(I,c.isKanjiModeEnabled()),D=C(M),N=b(D,R),T=u.find_path(N.map,"start","end"),L=[];for(let $=1;$<T.length-1;$++)L.push(N.table[T[$]].node);return e.fromArray(v(L))},e.rawSplit=function(I){return e.fromArray(m(I,c.isKanjiModeEnabled()))}})(dx)),dx}var y4;function ive(){if(y4)return XE;y4=1;const e=El(),t=nT(),n=Hge(),r=qge(),o=Vge(),s=Wge(),a=Gge(),c=C7(),u=Yge(),f=Qge(),h=Xge(),m=xl(),g=sve();function v(N,T){const L=N.size,$=s.getPositions(T);for(let G=0;G<$.length;G++){const z=$[G][0],F=$[G][1];for(let q=-1;q<=7;q++)if(!(z+q<=-1||L<=z+q))for(let X=-1;X<=7;X++)F+X<=-1||L<=F+X||(q>=0&&q<=6&&(X===0||X===6)||X>=0&&X<=6&&(q===0||q===6)||q>=2&&q<=4&&X>=2&&X<=4?N.set(z+q,F+X,!0,!0):N.set(z+q,F+X,!1,!0))}}function C(N){const T=N.size;for(let L=8;L<T-8;L++){const $=L%2===0;N.set(L,6,$,!0),N.set(6,L,$,!0)}}function b(N,T){const L=o.getPositions(T);for(let $=0;$<L.length;$++){const G=L[$][0],z=L[$][1];for(let F=-2;F<=2;F++)for(let q=-2;q<=2;q++)F===-2||F===2||q===-2||q===2||F===0&&q===0?N.set(G+F,z+q,!0,!0):N.set(G+F,z+q,!1,!0)}}function E(N,T){const L=N.size,$=f.getEncodedBits(T);let G,z,F;for(let q=0;q<18;q++)G=Math.floor(q/3),z=q%3+L-8-3,F=($>>q&1)===1,N.set(G,z,F,!0),N.set(z,G,F,!0)}function x(N,T,L){const $=N.size,G=h.getEncodedBits(T,L);let z,F;for(z=0;z<15;z++)F=(G>>z&1)===1,z<6?N.set(z,8,F,!0):z<8?N.set(z+1,8,F,!0):N.set($-15+z,8,F,!0),z<8?N.set(8,$-z-1,F,!0):z<9?N.set(8,15-z-1+1,F,!0):N.set(8,15-z-1,F,!0);N.set($-8,8,1,!0)}function I(N,T){const L=N.size;let $=-1,G=L-1,z=7,F=0;for(let q=L-1;q>0;q-=2)for(q===6&&q--;;){for(let X=0;X<2;X++)if(!N.isReserved(G,q-X)){let Se=!1;F<T.length&&(Se=(T[F]>>>z&1)===1),N.set(G,q-X,Se),z--,z===-1&&(F++,z=7)}if(G+=$,G<0||L<=G){G-=$,$=-$;break}}}function R(N,T,L){const $=new n;L.forEach(function(X){$.put(X.mode.bit,4),$.put(X.getLength(),m.getCharCountIndicator(X.mode,N)),X.write($)});const G=e.getSymbolTotalCodewords(N),z=c.getTotalCodewordsCount(N,T),F=(G-z)*8;for($.getLengthInBits()+4<=F&&$.put(0,4);$.getLengthInBits()%8!==0;)$.putBit(0);const q=(F-$.getLengthInBits())/8;for(let X=0;X<q;X++)$.put(X%2?17:236,8);return M($,N,T)}function M(N,T,L){const $=e.getSymbolTotalCodewords(T),G=c.getTotalCodewordsCount(T,L),z=$-G,F=c.getBlocksCount(T,L),q=$%F,X=F-q,Se=Math.floor($/F),V=Math.floor(z/F),ee=V+1,pe=Se-V,ge=new u(pe);let Te=0;const j=new Array(F),te=new Array(F);let fe=0;const ae=new Uint8Array(N.buffer);for(let Re=0;Re<F;Re++){const rt=Re<X?V:ee;j[Re]=ae.slice(Te,Te+rt),te[Re]=ge.encode(j[Re]),Te+=rt,fe=Math.max(fe,rt)}const be=new Uint8Array($);let Fe=0,ke,le;for(ke=0;ke<fe;ke++)for(le=0;le<F;le++)ke<j[le].length&&(be[Fe++]=j[le][ke]);for(ke=0;ke<pe;ke++)for(le=0;le<F;le++)be[Fe++]=te[le][ke];return be}function D(N,T,L,$){let G;if(Array.isArray(N))G=g.fromArray(N);else if(typeof N=="string"){let Se=T;if(!Se){const V=g.rawSplit(N);Se=f.getBestVersionForData(V,L)}G=g.fromString(N,Se||40)}else throw new Error("Invalid data");const z=f.getBestVersionForData(G,L);if(!z)throw new Error("The amount of data is too big to be stored in a QR Code");if(!T)T=z;else if(T<z)throw new Error(`
|
|
77
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
78
|
+
Minimum version required to store current data is: `+z+`.
|
|
79
|
+
`);const F=R(T,L,G),q=e.getSymbolSize(T),X=new r(q);return v(X,T),C(X),b(X,T),x(X,L,0),T>=7&&E(X,T),I(X,F),isNaN($)&&($=a.getBestMask(X,x.bind(null,X,L))),a.applyMask($,X),x(X,L,$),{modules:X,version:T,errorCorrectionLevel:L,maskPattern:$,segments:G}}return XE.create=function(T,L){if(typeof T>"u"||T==="")throw new Error("No input text");let $=t.M,G,z;return typeof L<"u"&&($=t.from(L.errorCorrectionLevel,t.M),G=f.from(L.version),z=a.from(L.maskPattern),L.toSJISFunc&&e.setToSJISFunction(L.toSJISFunc)),D(T,G,$,z)},XE}var yx={},bx={},b4;function x7(){return b4||(b4=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(s){return[s,s]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,s=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:s,scale:s?4:a,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const s=e.getScale(r,o);return Math.floor((r+o.margin*2)*s)},e.qrToImageData=function(r,o,s){const a=o.modules.size,c=o.modules.data,u=e.getScale(a,s),f=Math.floor((a+s.margin*2)*u),h=s.margin*u,m=[s.color.light,s.color.dark];for(let g=0;g<f;g++)for(let v=0;v<f;v++){let C=(g*f+v)*4,b=s.color.light;if(g>=h&&v>=h&&g<f-h&&v<f-h){const E=Math.floor((g-h)/u),x=Math.floor((v-h)/u);b=m[c[E*a+x]?1:0]}r[C++]=b.r,r[C++]=b.g,r[C++]=b.b,r[C]=b.a}}})(bx)),bx}var S4;function ave(){return S4||(S4=1,(function(e){const t=x7();function n(o,s,a){o.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=a,s.width=a,s.style.height=a+"px",s.style.width=a+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(s,a,c){let u=c,f=a;typeof u>"u"&&(!a||!a.getContext)&&(u=a,a=void 0),a||(f=r()),u=t.getOptions(u);const h=t.getImageWidth(s.modules.size,u),m=f.getContext("2d"),g=m.createImageData(h,h);return t.qrToImageData(g.data,s,u),n(m,f,h),m.putImageData(g,0,0),f},e.renderToDataURL=function(s,a,c){let u=c;typeof u>"u"&&(!a||!a.getContext)&&(u=a,a=void 0),u||(u={});const f=e.render(s,a,u),h=u.type||"image/png",m=u.rendererOpts||{};return f.toDataURL(h,m.quality)}})(yx)),yx}var Sx={},C4;function lve(){if(C4)return Sx;C4=1;const e=x7();function t(o,s){const a=o.a/255,c=s+'="'+o.hex+'"';return a<1?c+" "+s+'-opacity="'+a.toFixed(2).slice(1)+'"':c}function n(o,s,a){let c=o+s;return typeof a<"u"&&(c+=" "+a),c}function r(o,s,a){let c="",u=0,f=!1,h=0;for(let m=0;m<o.length;m++){const g=Math.floor(m%s),v=Math.floor(m/s);!g&&!f&&(f=!0),o[m]?(h++,m>0&&g>0&&o[m-1]||(c+=f?n("M",g+a,.5+v+a):n("m",u,0),u=0,f=!1),g+1<s&&o[m+1]||(c+=n("h",h),h=0)):u++}return c}return Sx.render=function(s,a,c){const u=e.getOptions(a),f=s.modules.size,h=s.modules.data,m=f+u.margin*2,g=u.color.light.a?"<path "+t(u.color.light,"fill")+' d="M0 0h'+m+"v"+m+'H0z"/>':"",v="<path "+t(u.color.dark,"stroke")+' d="'+r(h,f,u.margin)+'"/>',C='viewBox="0 0 '+m+" "+m+'"',E='<svg xmlns="http://www.w3.org/2000/svg" '+(u.width?'width="'+u.width+'" height="'+u.width+'" ':"")+C+' shape-rendering="crispEdges">'+g+v+`</svg>
|
|
80
|
+
`;return typeof c=="function"&&c(null,E),E},Sx}var w4;function cve(){if(w4)return wc;w4=1;const e=Bge(),t=ive(),n=ave(),r=lve();function o(s,a,c,u,f){const h=[].slice.call(arguments,1),m=h.length,g=typeof h[m-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(m<2)throw new Error("Too few arguments provided");m===2?(f=c,c=a,a=u=void 0):m===3&&(a.getContext&&typeof f>"u"?(f=u,u=void 0):(f=u,u=c,c=a,a=void 0))}else{if(m<1)throw new Error("Too few arguments provided");return m===1?(c=a,a=u=void 0):m===2&&!a.getContext&&(u=c,c=a,a=void 0),new Promise(function(v,C){try{const b=t.create(c,u);v(s(b,a,u))}catch(b){C(b)}})}try{const v=t.create(c,u);f(null,s(v,a,u))}catch(v){f(v)}}return wc.create=t.create,wc.toCanvas=o.bind(null,n.render),wc.toDataURL=o.bind(null,n.renderToDataURL),wc.toString=o.bind(null,function(s,a,c){return r.render(s,c)}),wc}var uve=cve();const dve=Eu(uve),fve=e=>e==="signIn"||e==="signUp",rT=e=>!!e&&(e==="EMAIL_OTP"||e==="SMS_MFA"),{getConfirmText:hve,getConfirmingText:pve,getBackToSignInText:mve,getResendCodeText:gve}=Rn,ob=()=>{const{isPending:e,toSignIn:t,challengeName:n,resendCode:r,selectedAuthMethod:o,availableAuthMethods:s}=ht(u=>[u.isPending,u.toSignIn,u.challengeName,u.resendCode,u.selectedAuthMethod,u.availableAuthMethods]),a=!!o&&o!=="PASSWORD"||!!s?.some(u=>u!=="PASSWORD"),c=rT(n)&&a&&r;return B.createElement($e,{direction:"column"},B.createElement(Kt,{isDisabled:e,type:"submit",variation:"primary",isLoading:e,loadingText:pve()},hve()),c&&B.createElement(Kt,{onClick:r,type:"button"},gve()),B.createElement(Kt,{onClick:t,type:"button",variation:"link",size:"small"},mve()))},vve=new Vn("SetupTotp-logger"),{getSetupTotpText:yve,getCopiedText:bve,getLoadingText:Sve}=Rn,Qi=({className:e,variation:t})=>{const{totpSecretCode:n,isPending:r,username:o,QRFields:s}=ht(M=>[M.isPending,M.totpSecretCode,M.username]),{handleChange:a,handleSubmit:c}=Br(),{components:{SetupTotp:{Header:u=Qi.Header,Footer:f=Qi.Footer}}}=jr(),[h,m]=_.useState(!0),[g,v]=_.useState(),[C,b]=_.useState("COPY"),{totpIssuer:E="AWSCognito",totpUsername:x=o}=s??{},I=_.useCallback(async()=>{try{const M=uue(E,x,n),D=await dve.toDataURL(M);v(D)}catch(M){vve.error(M)}finally{m(!1)}},[E,x,n]);_.useEffect(()=>{g||I()},[I,g]);const R=()=>{navigator.clipboard.writeText(n),b(bve())};return _.createElement(wr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:a,onSubmit:c},_.createElement($e,{as:"fieldset",direction:"column",isDisabled:r},_.createElement(u,null),_.createElement($e,{direction:"column"},h?_.createElement("p",null,Sve(),"…"):_.createElement("img",{"data-amplify-qrcode":!0,src:g,alt:"qr code",width:"228",height:"228"}),_.createElement($e,{"data-amplify-copy":!0},_.createElement("div",null,n),_.createElement($e,{"data-amplify-copy-svg":!0,onClick:R},_.createElement("div",{"data-amplify-copy-tooltip":!0},C),_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})))),_.createElement(ns,null),_.createElement(xr,null)),_.createElement(ob,null),_.createElement(f,null))))};Qi.Header=function(){return _.createElement(ar,{level:3},yve())};Qi.Footer=function(){return null};const{getSubmitText:Cve,getSubmittingText:wve}=Rn,sb=e=>{const{cancelButtonSendType:t,cancelButtonText:n,submitButtonText:r}=e,{isPending:o,resendCode:s,skipVerification:a,toSignIn:c}=ht(m=>[m.isPending]),u=()=>{switch(t){case"SKIP":a();break;case"RESEND":s();break;case"SIGN_IN":c();break;default:return}},f=o?B.createElement(B.Fragment,null,wve(),"…"):B.createElement(B.Fragment,null,Cve()),h=r??f;return B.createElement($e,{direction:"column"},B.createElement(Kt,{variation:"primary",isDisabled:o,type:"submit"},h),B.createElement($e,{direction:"column",alignItems:"center"},B.createElement(Kt,{onClick:u,type:"button",variation:"link",size:"small"},n)))},Eve=()=>B.createElement("svg",{"aria-label":"Apple icon",className:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},B.createElement("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})),xve=()=>B.createElement("svg",{"aria-label":"Google icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},B.createElement("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),B.createElement("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),B.createElement("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),B.createElement("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})),_ve=()=>B.createElement(o7,{className:"federated-sign-in-icon",ariaLabel:"Facebook icon",viewBox:{minX:0,minY:0,width:279,height:538},pathData:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"}),Ive=()=>B.createElement("svg",{"aria-label":"Amazon icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 243 264",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},B.createElement("path",{d:"M230.826 208.039C227.468 203.683 208.551 205.982 200.056 206.998C197.471 207.321 197.076 205.042 199.407 203.405C214.475 192.665 239.201 195.766 242.082 199.364C244.966 202.982 241.337 228.071 227.173 240.049C225.001 241.888 222.93 240.904 223.898 238.468C227.077 230.431 234.205 212.419 230.826 208.039ZM123.769 264C71.0234 264 39.0764 241.955 14.7853 217.542C9.97339 212.706 3.71799 206.296 0.311513 200.691C-1.09773 198.372 2.59096 195.022 5.04421 196.844C35.239 219.268 79.1012 239.538 122.53 239.538C151.82 239.538 188.046 227.47 217.669 214.868C222.147 212.966 222.147 219.18 221.512 221.061C221.183 222.032 206.515 236.221 186.247 247.047C167.304 257.166 143.397 264 123.769 264Z",fill:"#F2541B"}),B.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M142.943 111.185C142.943 124.756 143.268 136.054 136.406 148.123C130.856 157.913 122.027 163.95 112.222 163.95C98.8288 163.95 90.9806 153.772 90.9806 138.693C90.9806 109.036 117.677 103.647 142.943 103.647V111.185ZM178.166 196.081C175.858 198.15 171.635 198.22 169.914 196.894C157.974 187.684 149.89 173.688 149.89 173.688C130.706 193.156 117.127 199 92.2879 199C62.8772 199 40 180.905 40 144.729C40 116.461 55.3552 97.2408 77.2563 87.823C96.2094 79.5256 122.684 78.0173 142.943 75.7517C142.943 75.7517 144.633 53.933 138.699 45.9806C134.098 39.8163 126.272 36.9329 119.089 36.9329C106.127 36.8829 93.61 43.9051 91.1262 57.4188C90.4136 61.2829 87.5533 64.5261 84.54 64.206L51.0823 60.5922C48.5156 60.2951 45.0381 57.6639 45.8636 53.3081C53.644 12.3684 90.7373 0 123.989 0C140.983 0 163.21 4.51651 176.608 17.3349C193.597 33.1648 191.969 54.2755 191.969 77.2722V131.51C191.969 147.835 198.768 154.987 205.151 163.775C207.376 166.953 207.886 170.714 205.04 173.032C197.902 178.999 178.166 196.081 178.166 196.081Z",fill:"#F2541B"})),km=e=>{const{icon:t,provider:n,text:r}=e,{toFederatedSignIn:o}=ht(),s=c=>{c.preventDefault(),o({provider:n})};let a;return t==="facebook"?a=B.createElement(_ve,null):t==="google"?a=B.createElement(xve,null):t==="amazon"?a=B.createElement(Ive,null):t==="apple"&&(a=B.createElement(Eve,null)),B.createElement(Kt,{onClick:s,className:"federated-sign-in-button",gap:"1rem"},a,B.createElement(io,{as:"span"},r))},{getSignInWithFederationText:Dm,getOrText:Ave}=Rn;function _7(){const{route:e,socialProviders:t}=ht(({route:n,socialProviders:r})=>[n,r]);return t.length===0?null:B.createElement($e,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},t.map(n=>{switch(n){case"amazon":return B.createElement(km,{icon:"amazon",key:n,provider:$c.Amazon,text:Dm(e,n)});case"apple":return B.createElement(km,{icon:"apple",key:n,provider:$c.Apple,text:Dm(e,n)});case"facebook":return B.createElement(km,{icon:"facebook",key:n,provider:$c.Facebook,text:Dm(e,n)});case"google":return B.createElement(km,{icon:"google",key:n,provider:$c.Google,text:Dm(e,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),B.createElement(KR,{size:"small",label:Ave()}))}const{getSignInText:Lm,getSigningInText:Rve,getForgotPasswordText:Tve,getSignInWithEmailText:Ove,getSignInWithSmsText:Mve,getSignInWithPasskeyText:Pve,getOtherSignInOptionsText:Nve,getEnterUsernameFirstText:kve}=Rn;function qs(){const{isPending:e,availableAuthMethods:t,preferredChallenge:n,toShowAuthMethods:r}=ht(x=>[x.isPending,x.availableAuthMethods,x.preferredChallenge,x.toShowAuthMethods]),{handleChange:o,handleSubmit:s}=Br(),[a,c]=B.useState(""),{components:{SignIn:{Header:u=qs.Header,Footer:f=qs.Footer}}}=jr(),m=t&&t.length>1&&n,g=a.trim().length>0,v=B.useCallback(x=>{const{name:I,value:R}=x.target;I==="username"&&typeof R=="string"&&c(R),o(x)},[o]),C=()=>{if(!n)return Lm();switch(n){case"EMAIL_OTP":return Ove();case"SMS_OTP":return Mve();case"WEB_AUTHN":return Pve();default:return Lm()}},b=x=>{x.preventDefault(),s(x)},E=x=>{x.preventDefault(),r()};return B.createElement(je,null,B.createElement(u,null),B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:m?b:s,onChange:v},B.createElement(_7,null),B.createElement($e,{direction:"column"},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:e},B.createElement(nb,null,B.createElement("legend",null,Lm())),B.createElement(ns,null)),B.createElement(xr,null),B.createElement(Kt,{isDisabled:e,type:"submit",variation:"primary",isLoading:e,loadingText:Rve()},m?C():Lm()),m&&B.createElement(Kt,{onClick:E,size:"small",variation:"link",isDisabled:e||!g,title:g?void 0:kve()},Nve()),B.createElement(f,null))))}const Dve=()=>{const{toForgotPassword:e}=ht(t=>[t.toForgotPassword]);return B.createElement(je,{"data-amplify-footer":""},B.createElement(Kt,{onClick:e,size:"small",variation:"link"},Tve()))};qs.Footer=Dve;qs.Header=function(){return null};const{getCreateAccountText:E4,getCreatingAccountText:Lve,getCreateAccountWithEmailText:Uve,getCreateAccountWithPasswordText:Fve,getCreateAccountWithSmsText:$ve,getOrText:zve}=Rn;function Ao(){const{hasValidationErrors:e,isPending:t,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:o}=ht(R=>[R.hasValidationErrors,R.isPending,R.availableAuthMethods,R.preferredChallenge,R.selectedAuthMethod]),{handleChange:s,handleBlur:a,handleSubmit:c}=Br(),{components:{SignUp:{Header:u=Ao.Header,FormFields:f=Ao.FormFields,Footer:h=Ao.Footer}}}=jr(),m=n?.filter(R=>R!=="WEB_AUTHN"),g=m&&m.length>1,v=r&&r!=="WEB_AUTHN"?r:"PASSWORD",C=m?.filter(R=>R!==v)??[],E=(o??v)!=="PASSWORD",x=R=>{switch(R){case"EMAIL_OTP":return Uve();case"SMS_OTP":return $ve();case"PASSWORD":return g?Fve():E4();default:return E4()}},I=R=>M=>{M.preventDefault();const D=M.target.closest("form");if(D){if(!D.__authMethod){const N=document.createElement("input");N.name="__authMethod",D.appendChild(N)}D.__authMethod.type="hidden",D.__authMethod.value=R,D.requestSubmit()}};return B.createElement(je,null,B.createElement(u,null),B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:s,onSubmit:c,onBlur:a},B.createElement(_7,null),B.createElement($e,{as:"fieldset",direction:"column",isDisabled:t},B.createElement($e,{direction:"column"},B.createElement(f,{includePassword:!E}),B.createElement(xr,null)),B.createElement(Kt,{isDisabled:(!g||C.length==0)&&e||t,isFullWidth:!0,type:"submit",variation:"primary",isLoading:t,loadingText:Lve(),onClick:I(v)},x(v)),g&&C.length>0&&B.createElement(B.Fragment,null,B.createElement($e,{justifyContent:"center",padding:"medium 0"},zve()),C.map(R=>B.createElement(Kt,{key:R,isDisabled:t,isFullWidth:!0,type:"button",variation:"primary",onClick:I(R)},x(R)))),B.createElement(h,null))))}Ao.Header=function(){return null};Ao.FormFields=function(){return B.createElement(ns,null)};Ao.Footer=function(){return null};const{getSignInTabText:jve,getSignUpTabText:Bve}=Rn,Hve=({className:e,hideSignUp:t,variation:n})=>{const{route:r,toSignIn:o,toSignUp:s}=ht(a=>[a.route,a.toSignIn,a.toSignUp]);return B.createElement(wr,{className:e,variation:n},t?B.createElement(je,{"data-amplify-router-content":""},r==="signIn"&&B.createElement(qs,null)):B.createElement(La.Container,{value:r,isLazy:!0,onValueChange:a=>{a!==r&&(a==="signIn"?o():s())}},B.createElement(La.List,{spacing:"equal",indicatorPosition:"top"},B.createElement(La.Item,{value:"signIn"},jve()),B.createElement(La.Item,{value:"signUp"},Bve())),B.createElement(La.Panel,{value:"signIn","data-amplify-router-content":""},B.createElement(qs,null)),B.createElement(La.Panel,{value:"signUp","data-amplify-router-content":""},B.createElement(Ao,null))))},{getAccountRecoveryInfoText:qve,getSkipText:Vve}=Rn,al=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=Br(),{components:{ConfirmVerifyUser:{Header:s=al.Header,Footer:a=al.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:o},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(s,null),B.createElement($e,{direction:"column"},B.createElement(ns,null)),B.createElement(xr,null),B.createElement(sb,{cancelButtonText:Vve(),cancelButtonSendType:"SKIP"}),B.createElement(a,null))))};al.Header=function(){return B.createElement(ar,{level:3},qve())};al.Footer=function(){return null};const{getSkipText:Wve,getVerifyText:Gve,getVerifyContactText:Kve,getAccountRecoveryInfoText:Zve}=Rn,Yve=e=>Object.entries(e).map(([t,n],r)=>{const o=Vy[t].label;return B.createElement(YR,{name:"unverifiedAttr",value:t,key:t,defaultChecked:r===0},ye(o),":"," ",lue(o,n))}),ll=({className:e,variation:t})=>{const{components:{VerifyUser:{Header:n=ll.Header,Footer:r=ll.Footer}}}=jr(),{isPending:o,unverifiedUserAttributes:s}=ht(({isPending:h,unverifiedUserAttributes:m})=>[h,m]),{handleChange:a,handleSubmit:c}=Br(),u=o?B.createElement(B.Fragment,null,"Verifying…"):B.createElement(B.Fragment,null,Gve()),f=B.createElement(QR,{legend:Kve(),name:"verify_context",isDisabled:o,legendHidden:!0},Yve(s));return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:a,onSubmit:c},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:o},B.createElement(n,null),f,B.createElement(xr,null),B.createElement(sb,{cancelButtonText:Wve(),cancelButtonSendType:"SKIP",submitButtonText:u}),B.createElement(r,null))))};ll.Header=function(){return B.createElement(ar,{level:3},Zve())};ll.Footer=function(){return null};const{getChallengeText:Qve,getDeliveryMessageText:Xve,getDeliveryMethodText:Jve}=Rn,cl=({className:e,variation:t})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:o}=ht(h=>[h.isPending,h.challengeName,h.codeDeliveryDetails]),{handleChange:s,handleSubmit:a}=Br(),{components:{ConfirmSignIn:{Header:c=cl.Header,Footer:u=cl.Footer}}}=jr(),f=rT(r)&&o;return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:s,onSubmit:a},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(c,null),B.createElement($e,{direction:"column"},f&&B.createElement(io,{className:"amplify-authenticator__subtitle"},Xve(o)),B.createElement(ns,null),B.createElement(xr,null)),B.createElement(ob,null),B.createElement(u,null))))};function eye(){const{challengeName:e,codeDeliveryDetails:t}=ht(({challengeName:r,codeDeliveryDetails:o})=>[r,o]),n=rT(e)&&t;return B.createElement(B.Fragment,null,B.createElement(ar,{level:3},Qve(e)),n&&B.createElement(ar,{level:5},Jve(t)))}cl.Header=eye;cl.Footer=function(){return null};const{getResendCodeText:tye,getResetYourPasswordText:nye}=Rn,ul=({className:e,variation:t})=>{const{isPending:n}=ht(u=>[u.isPending]),{handleBlur:r,handleChange:o,handleSubmit:s}=Br(),{components:{ConfirmResetPassword:{Header:a=ul.Header,Footer:c=ul.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:s,onChange:o,onBlur:r},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(a,null),B.createElement($e,{direction:"column"},B.createElement(ns,null)),B.createElement(xr,null),B.createElement(sb,{cancelButtonSendType:"RESEND",cancelButtonText:tye()}),B.createElement(c,null))))};ul.Header=function(){const t=nye();return B.createElement(ar,{level:3},t)};ul.Footer=function(){return null};const{getBackToSignInText:rye,getSendingText:oye,getSendCodeText:sye,getResetYourPasswordText:iye}=Rn,Xi=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=Br(),{components:{ForgotPassword:{Header:s=Xi.Header,Footer:a=Xi.Footer}}}=jr();return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:o},B.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(s,null),B.createElement($e,{direction:"column"},B.createElement(ns,null)),B.createElement(xr,null),B.createElement(sb,{cancelButtonText:rye(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?B.createElement(B.Fragment,null,oye(),"…"):B.createElement(B.Fragment,null,sye())}),B.createElement(a,null))))};Xi.Header=function(){return B.createElement(ar,{level:3},iye())};Xi.Footer=function(){return null};const{getMfaTypeLabelByValue:aye,getSelectMfaTypeByChallengeName:lye,getSelectMfaTypeText:cye}=Rn,Ji=({className:e,variation:t})=>{const{isPending:n,allowedMfaTypes:r=[]}=ht(u=>[u.isPending,u.allowedMfaTypes]),{handleChange:o,handleSubmit:s}=Br(),{components:{SelectMfaType:{Header:a=Ji.Header,Footer:c=Ji.Footer}}}=jr();return _.createElement(wr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:o,onSubmit:s},_.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(a,null),_.createElement($e,{direction:"column"},_.createElement(QR,{name:"mfa_type",legend:cye(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((u,f)=>_.createElement(YR,{name:"mfa_type",key:u,value:u,defaultChecked:f===0},aye(u)))),_.createElement(xr,null)),_.createElement(ob,null),_.createElement(c,null))))};Ji.Header=function(){const{challengeName:t}=ht(n=>[n.challengeName]);return _.createElement(ar,{level:3},lye(t))};Ji.Footer=function(){return null};const{getSetupEmailText:uye}=Rn,ea=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=Br(),{components:{SetupEmail:{Header:s=ea.Header,Footer:a=ea.Footer}}}=jr();return _.createElement(wr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:o},_.createElement($e,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(s,null),_.createElement($e,{direction:"column"},_.createElement(ns,null),_.createElement(xr,null)),_.createElement(ob,null),_.createElement(a,null))))};ea.Header=function(){return _.createElement(ar,{level:3},uye())};ea.Footer=function(){return null};const{getSignInWithPasswordText:rI,getSignInWithEmailText:dye,getSignInWithSmsText:fye,getSignInWithPasskeyText:hye,getSigningInText:pye,getBackToSignInText:mye,getOrText:gye,getUsernameLabelByLoginMechanism:vye}=Rn,yye=e=>{switch(e){case"EMAIL_OTP":return dye();case"SMS_OTP":return fye();case"WEB_AUTHN":return hye();case"PASSWORD":return rI();default:return rI()}},bye=({className:e,variation:t})=>{const{isPending:n,username:r,availableAuthMethods:o,toSignIn:s,selectAuthMethod:a,loginMechanism:c}=ht(b=>[b.isPending,b.username,b.availableAuthMethods,b.toSignIn,b.selectAuthMethod,b.loginMechanism]),{handleChange:u,handleSubmit:f}=Br(),h=o??[],m=h.includes("PASSWORD"),g=h.filter(b=>b!=="PASSWORD"),v=b=>{a({method:b})},C=vye(c);return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:u},B.createElement($e,{direction:"column"},B.createElement(Nh,{label:C,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),m&&B.createElement(B.Fragment,null,B.createElement(ZR,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),B.createElement(Kt,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:pye()},rI())),m&&g.length>0&&B.createElement(KR,{label:gye()}),g.length>0&&B.createElement($e,{direction:"column",gap:"0.5rem"},g.map(b=>B.createElement(Kt,{key:b,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>v(b)},yye(b)))),B.createElement(xr,null),B.createElement(Kt,{onClick:s,size:"small",variation:"link",isDisabled:n},mye()))))},Sye=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M22.9333 38.9333L41.7333 20.1333L38 16.4L22.9333 31.4667L15.3333 23.8667L11.6 27.6L22.9333 38.9333ZM26.6667 53.3333C22.9778 53.3333 19.5111 52.6333 16.2667 51.2333C13.0222 49.8333 10.2 47.9333 7.8 45.5333C5.4 43.1333 3.5 40.3111 2.1 37.0667C0.7 33.8222 0 30.3556 0 26.6667C0 22.9778 0.7 19.5111 2.1 16.2667C3.5 13.0222 5.4 10.2 7.8 7.8C10.2 5.4 13.0222 3.5 16.2667 2.1C19.5111 0.7 22.9778 0 26.6667 0C30.3556 0 33.8222 0.7 37.0667 2.1C40.3111 3.5 43.1333 5.4 45.5333 7.8C47.9333 10.2 49.8333 13.0222 51.2333 16.2667C52.6333 19.5111 53.3333 22.9778 53.3333 26.6667C53.3333 30.3556 52.6333 33.8222 51.2333 37.0667C49.8333 40.3111 47.9333 43.1333 45.5333 45.5333C43.1333 47.9333 40.3111 49.8333 37.0667 51.2333C33.8222 52.6333 30.3556 53.3333 26.6667 53.3333Z",fill:"currentColor"})))},Cye=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:ze(ie.Icon,t),...n},_.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M60 69C84.4313 69 105.396 83.8504 114.357 105.021C116.774 110.729 115.382 116.168 111.798 120.23C108.191 124.319 102.358 127 96 127H24C17.6416 127 11.8094 124.319 8.20215 120.23C4.61836 116.168 3.22626 110.729 5.64258 105.021C14.6036 83.8504 35.5687 69 60 69Z",stroke:"#00404D",strokeWidth:"2"}),_.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),_.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},_.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z"})),_.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z",fill:"#00404D",stroke:"#00404D",strokeWidth:"4",mask:"url(#path-4-inside-1_4178_10171)"}),_.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),_.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),_.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M104 112C116.129 112 126.457 104.288 130.347 93.5H147.5L155.5 101.5L168 89L180.5 101.5L193 89L180.5 76.5H130.984C127.705 64.6779 116.866 56 104 56C88.536 56 76 68.536 76 84C76 99.464 88.536 112 104 112ZM104 98C111.732 98 118 91.732 118 84C118 76.268 111.732 70 104 70C96.268 70 90 76.268 90 84C90 91.732 96.268 98 104 98Z",fill:"#BCECF5"}),_.createElement("path",{d:"M130.347 93.5V92.5H129.645L129.407 93.1608L130.347 93.5ZM147.5 93.5L148.207 92.7929L147.914 92.5H147.5V93.5ZM155.5 101.5L154.793 102.207L155.5 102.914L156.207 102.207L155.5 101.5ZM168 89L168.707 88.2929L168 87.5858L167.293 88.2929L168 89ZM180.5 101.5L179.793 102.207L180.5 102.914L181.207 102.207L180.5 101.5ZM193 89L193.707 89.7071L194.414 89L193.707 88.2929L193 89ZM180.5 76.5L181.207 75.7929L180.914 75.5H180.5V76.5ZM130.984 76.5L130.021 76.7673L130.224 77.5H130.984V76.5ZM129.407 93.1608C125.655 103.565 115.694 111 104 111V113C116.564 113 127.259 105.011 131.288 93.8392L129.407 93.1608ZM147.5 92.5H130.347V94.5H147.5V92.5ZM156.207 100.793L148.207 92.7929L146.793 94.2071L154.793 102.207L156.207 100.793ZM167.293 88.2929L154.793 100.793L156.207 102.207L168.707 89.7071L167.293 88.2929ZM181.207 100.793L168.707 88.2929L167.293 89.7071L179.793 102.207L181.207 100.793ZM192.293 88.2929L179.793 100.793L181.207 102.207L193.707 89.7071L192.293 88.2929ZM179.793 77.2071L192.293 89.7071L193.707 88.2929L181.207 75.7929L179.793 77.2071ZM130.984 77.5H180.5V75.5H130.984V77.5ZM104 57C116.405 57 126.859 65.3669 130.021 76.7673L131.948 76.2327C128.552 63.9889 117.327 55 104 55V57ZM77 84C77 69.0883 89.0883 57 104 57V55C87.9837 55 75 67.9837 75 84H77ZM104 111C89.0883 111 77 98.9117 77 84H75C75 100.016 87.9837 113 104 113V111ZM117 84C117 91.1797 111.18 97 104 97V99C112.284 99 119 92.2843 119 84H117ZM104 71C111.18 71 117 76.8203 117 84H119C119 75.7157 112.284 69 104 69V71ZM91 84C91 76.8203 96.8203 71 104 71V69C95.7157 69 89 75.7157 89 84H91ZM104 97C96.8203 97 91 91.1797 91 84H89C89 92.2843 95.7157 99 104 99V97Z",fill:"#00404D"}),_.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:wye,getPasskeyPromptDescriptionText:Eye,getCreatePasskeyText:xye,getRegisteringText:_ye,getContinueWithoutPasskeyText:Iye,getPasskeyCreatedSuccessText:Aye,getPasskeyRegisteredText:Rye,getPasskeyRegistrationFailedText:Tye,getPasskeyLabelText:Oye,getExistingPasskeysText:Mye,getSetupAnotherPasskeyText:Pye,getContinueText:Nye}=Rn;function kye({className:e,variation:t}){const[n,r]=B.useState(!1),[o,s]=B.useState(null),[a,c]=B.useState(!1),[u,f]=B.useState([]),{submitForm:h,isPending:m}=ht(x=>[x.submitForm,x.isPending]),g=B.useCallback(async()=>{try{const x=await AR();f(x.credentials||[])}catch{}},[]);B.useEffect(()=>{n&&g()},[n,g]);const v=B.useCallback(()=>{h({type:"SKIP"})},[h]),C=B.useCallback(()=>{h({type:"SUBMIT"})},[h]),b=B.useCallback(async()=>{try{s(null),c(!0),await Tce(),r(!0)}catch(x){const I=x,R=I.name??"",M=I.message??"";if(R==="PasskeyRegistrationCanceled"||R==="NotAllowedError"||M.includes("canceled")||M.includes("cancelled")||M.includes("ceremony has been canceled")||M.includes("not allowed")){v();return}s(Tye())}finally{c(!1)}},[v]);if(n)return B.createElement(wr,{className:e,variation:t},B.createElement($e,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},B.createElement($e,{direction:"column",gap:"xs"},B.createElement(Sye,{className:"amplify-authenticator__passkey-success-icon"}),B.createElement(ar,{level:4},Aye()),B.createElement(io,null,Rye())),u.length>0&&B.createElement(je,{marginTop:"large"},B.createElement(ar,{level:5},Mye()),B.createElement($e,{direction:"column",gap:"xs",marginTop:"xs"},u.map((x,I)=>B.createElement(je,{key:x.credentialId,className:"amplify-authenticator__passkey-credential-item"},B.createElement(io,{fontSize:"small"},x.friendlyCredentialName??`${Oye()} ${I+1}`))))),B.createElement($e,{direction:"column",gap:"medium",marginTop:"large"},B.createElement(Kt,{onClick:()=>{r(!1),b()},variation:"link"},Pye()),B.createElement(Kt,{onClick:()=>C(),variation:"primary",isFullWidth:!0},Nye()))));const E=m||a;return B.createElement(wr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},B.createElement($e,{direction:"column",gap:"medium"},B.createElement(ar,{level:4},wye()),B.createElement(io,null,Eye()),B.createElement($e,{justifyContent:"center"},B.createElement(Cye,{className:"amplify-authenticator__passkey-icon"})),B.createElement($e,{direction:"column",gap:"medium"},B.createElement(Kt,{onClick:()=>{b()},variation:"primary",isDisabled:E,isLoading:a,loadingText:_ye()},xye()),B.createElement(Kt,{onClick:v,variation:"link",isDisabled:E},Iye()),o&&B.createElement(io,{className:"amplify-authenticator__passkey-error"},o),B.createElement(xr,null)))))}function x4(){return null}const Dye=e=>{switch(e){case"authenticated":case"idle":case"setup":case"transition":return x4;case"confirmSignUp":return il;case"confirmSignIn":return cl;case"selectMfaType":return Ji;case"setupEmail":return ea;case"setupTotp":return Qi;case"signIn":case"signUp":return Hve;case"signInSelectAuthFactor":return bye;case"passkeyPrompt":return kye;case"forceNewPassword":return Io;case"forgotPassword":return Xi;case"confirmResetPassword":return ul;case"verifyUser":return ll;case"confirmVerifyUser":return al;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${e}`),x4}};function Lye({className:e,hideSignUp:t,variation:n}){const{route:r}=ht(({route:s})=>[s]),o=_.useMemo(()=>Dye(r),[r]);return B.createElement(o,{className:e,hideSignUp:fve(r)?t:void 0,variation:n})}const Uye={Header:()=>null,SignIn:{Header:qs.Header,Footer:qs.Footer},SignUp:{Header:Ao.Header,FormFields:Ao.FormFields,Footer:Ao.Footer},ConfirmSignUp:{Header:il.Header,Footer:il.Footer},SelectMfaType:{Header:Ji.Header,Footer:Ji.Footer},SetupEmail:{Header:ea.Header,Footer:ea.Footer},SetupTotp:{Header:Qi.Header,Footer:Qi.Footer},ConfirmResetPassword:{Header:ul.Header,Footer:ul.Footer},ConfirmSignIn:{Header:cl.Header,Footer:cl.Footer},VerifyUser:{Header:ll.Header,Footer:ll.Footer},ConfirmVerifyUser:{Header:al.Header,Footer:al.Footer},ForceNewPassword:{Header:Io.Header,Footer:Io.Footer,FormFields:Io.FormFields},ForgotPassword:{Header:Xi.Header,Footer:Xi.Footer},Footer:()=>null};function Fye({children:e,className:t,components:n,formFields:r,hideSignUp:o,initialState:s,loginMechanisms:a,passwordSettings:c,passwordless:u,signUpAttributes:f,services:h,socialProviders:m,variation:g}){Pge({message:"The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.",shouldWarn:!1});const{route:v,signOut:C,user:b}=ht(({route:I,signOut:R,user:M})=>[I,R,M]);cme({initialState:s,loginMechanisms:a,passwordSettings:c,passwordless:u,services:h,signUpAttributes:f,socialProviders:m,formFields:r});const E=_.useMemo(()=>({components:{...Uye,...n}}),[n]);return v==="authenticated"||v==="signOut"?e?_.createElement(_.Fragment,null,Bs(e)?e({signOut:C,user:b}):e):null:_.createElement(b7.Provider,{value:E},_.createElement(Lye,{className:t,hideSignUp:o,variation:g}))}function rs(e){return dme({componentName:"Authenticator",packageName:"react",version:Mge}),_.createElement(t7,null,_.createElement(Fye,{...e}))}rs.Provider=t7;rs.ForgotPassword=Xi;rs.SetupTotp=Qi;rs.SignIn=qs;rs.SignUp=Ao;rs.ForceNewPassword=Io;rs.SelectMfaType=Ji;rs.SetupEmail=ea;const I7=({cssText:e,...t})=>e===void 0||/<\/style/i.test(e)?null:_.createElement("style",{...t,dangerouslySetInnerHTML:{__html:e}});I7.displayName="Style";const A7=({theme:e,...t})=>{if(!e)return null;const{name:n,cssText:r}=e;return _.createElement(I7,{...t,cssText:r,id:`amplify-theme-${n}`})};A7.displayName="ThemeStyle";function $ye({children:e,colorMode:t,direction:n="ltr",nonce:r,theme:o}){const s=_.useMemo(()=>({theme:Qy(o),colorMode:t}),[o,t]);return _.createElement(n7.Provider,{value:s},_.createElement(lge,{dir:n},_.createElement("div",{"data-amplify-theme":s.theme.name,"data-amplify-color-mode":t,dir:n},e),o?_.createElement(A7,{theme:s.theme,nonce:r}):null))}const zye=({configured:e,authStatus:t})=>t==="authenticated",jye=e=>e?e.signInDetails?.loginId??e.username??null:null,Bye=({children:e,fallback:t=null})=>{const{authStatus:n,signOut:r,user:o}=ht(s=>[s.authStatus,s.signOut,s.user]);return zye({configured:!0,authStatus:n})?O.jsx(O.Fragment,{children:e({email:jye(o),signOut:()=>r()})}):O.jsx(O.Fragment,{children:t})},Hye=({children:e,fallback:t=null})=>Sy()?O.jsx(Bye,{fallback:t,children:e}):O.jsx(O.Fragment,{children:t}),_4='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Xs=e=>`var(${e})`,on=Xs("--accent"),qye=Xs("--accent-hover"),I4=Xs("--accent-soft"),Qd=Xs("--accent-fg"),A4=Xs("--surface"),Ec=Xs("--fg"),Vye=Xs("--surface-sunken"),Um=Xs("--fg-muted"),Xd=Xs("--line"),Wye=Qy({name:"remit",tokens:{colors:{brand:{primary:{10:{value:I4},20:{value:I4},40:{value:on},60:{value:on},80:{value:on},90:{value:on},100:{value:on}}},background:{primary:{value:A4},secondary:{value:Vye}},font:{primary:{value:Ec},secondary:{value:Um},tertiary:{value:Um},interactive:{value:on},inverse:{value:Qd},hover:{value:on},focus:{value:on},active:{value:on}},border:{primary:{value:Xd},secondary:{value:Xd},focus:{value:on}}},fonts:{default:{variable:{value:_4},static:{value:_4}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Xd},borderWidth:{value:"1px"},boxShadow:{value:"0 10px 30px -10px rgb(15 23 42 / 0.18), 0 4px 12px -6px rgb(15 23 42 / 0.1)"},backgroundColor:{value:A4}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:Um}}},button:{color:{value:Ec},primary:{backgroundColor:{value:on},color:{value:Qd},_hover:{backgroundColor:{value:qye},color:{value:Qd}},_focus:{backgroundColor:{value:on},color:{value:Qd}},_active:{backgroundColor:{value:on},color:{value:Qd}}},link:{color:{value:on},_hover:{color:{value:on},backgroundColor:{value:"transparent"}},_focus:{color:{value:on},backgroundColor:{value:"transparent"}},_active:{color:{value:on},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:Ec},borderColor:{value:Xd},_focus:{borderColor:{value:on},boxShadow:{value:`0 0 0 2px ${on}`}}},field:{label:{color:{value:Ec}}},tabs:{borderColor:{value:Xd},item:{color:{value:Um},backgroundColor:{value:"transparent"},_active:{color:{value:on},borderColor:{value:on},backgroundColor:{value:"transparent"}},_hover:{color:{value:on}},_focus:{color:{value:on}}}},heading:{color:{value:Ec}},text:{color:{value:Ec}}}}}),Gye={signIn:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"}},signUp:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"},confirm_password:{placeholder:"Confirm your password"}}},Kye=()=>O.jsx(so,{tone:"warning",className:"fixed top-0 left-0 right-0 z-50 h-7 sm:h-10 overflow-hidden border-x-0 border-t-0",children:O.jsxs("span",{className:"flex items-center gap-2",children:[O.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),O.jsx("span",{className:"truncate hidden sm:inline",children:"— Cognito not configured. Set VITE_COGNITO_USER_POOL_ID and VITE_COGNITO_CLIENT_ID in .env.local to enable sign-in."}),O.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),Zye=()=>O.jsx(sR,{note:lR({betterAuthEnabled:!1,cognitoConfigured:Sy()})}),Yye=({children:e})=>{const{authStatus:t}=ht(n=>[n.authStatus]);return t==="authenticated"?O.jsx(O.Fragment,{children:e}):t==="configuring"?O.jsx(Iy,{}):O.jsx($ye,{theme:Wye,children:O.jsxs(xy,{children:[O.jsx(_y,{}),O.jsx(rs,{hideSignUp:!1,formFields:Gye,components:{Footer:Zye}})]})})},Qye=({children:e})=>Sy()?O.jsx(rs.Provider,{children:O.jsx(Yye,{children:e})}):O.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[O.jsx(Kye,{}),e]}),R7=60;let Yc=null;const T7=()=>Math.floor(Date.now()/1e3),Xye=e=>e!==null&&e.expiresAt-R7>T7(),Jye=async()=>{const t=(await my()).tokens?.idToken;return t?(Yc={value:t.toString(),expiresAt:t.payload.exp??T7()+R7},Yc.value):(Yc=null,null)},ebe=async()=>Sy()?Xye(Yc)?Yc.value:Jye():null,tbe=()=>{Yc=null},gv={configure:w$,getToken:ebe,resetToken:tbe,Shell:Qye,Account:Hye},nbe=({children:e})=>Cy()?O.jsx(cv.Shell,{children:e}):O.jsx(gv.Shell,{children:e}),rbe=e=>Cy()?O.jsx(cv.Account,{...e}):O.jsx(gv.Account,{...e}),obe={configure:w$,getToken:()=>Cy()?cv.getToken():gv.getToken(),resetToken:()=>{cv.resetToken(),gv.resetToken()},Shell:nbe,Account:rbe};var Fu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sbe=class extends Fu{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},oT=new sbe,ibe={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},abe=class{#e=ibe;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},$a=new abe;function lbe(e){setTimeout(e,0)}var cbe=typeof window>"u"||"Deno"in globalThis;function rr(){}function ube(e,t){return typeof e=="function"?e(t):e}function oI(e){return typeof e=="number"&&e>=0&&e!==1/0}function O7(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vi(e,t){return typeof e=="function"?e(t):e}function Ur(e,t){return typeof e=="function"?e(t):e}function R4(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:c}=e;if(a){if(r){if(t.queryHash!==sT(a,t.options))return!1}else if(!Zf(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function T4(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(dl(t.options.mutationKey)!==dl(s))return!1}else if(!Zf(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function sT(e,t){return(t?.queryKeyHashFn||dl)(e)}function dl(e){return JSON.stringify(e,(t,n)=>sI(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Zf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Zf(e[n],t[n])):!1}var dbe=Object.prototype.hasOwnProperty;function M7(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=O4(e)&&O4(t);if(!r&&!(sI(e)&&sI(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),c=a.length,u=r?new Array(c):{};let f=0;for(let h=0;h<c;h++){const m=r?h:a[h],g=e[m],v=t[m];if(g===v){u[m]=g,(r?h<s:dbe.call(e,m))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){u[m]=v;continue}const C=M7(g,v,n+1);u[m]=C,C===g&&f++}return s===c&&f===s?e:u}function vv(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function O4(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sI(e){if(!M4(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!M4(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function M4(e){return Object.prototype.toString.call(e)==="[object Object]"}function fbe(e){return new Promise(t=>{$a.setTimeout(t,e)})}function iI(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?M7(e,t):t}function hbe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function pbe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var iT=Symbol();function P7(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===iT?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function aT(e,t){return typeof e=="function"?e(...t):!!e}function mbe(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Yf=(()=>{let e=()=>cbe;return{isServer(){return e()},setIsServer(t){e=t}}})();function aI(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var gbe=lbe;function vbe(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=gbe;const s=c=>{t?e.push(c):o(()=>{n(c)})},a=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||a()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var An=vbe(),ybe=class extends Fu{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},yv=new ybe;function bbe(e){return Math.min(1e3*2**e,3e4)}function N7(e){return(e??"online")==="online"?yv.isOnline():!0}var lI=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function k7(e){let t=!1,n=0,r;const o=aI(),s=()=>o.status!=="pending",a=b=>{if(!s()){const E=new lI(b);g(E),e.onCancel?.(E)}},c=()=>{t=!0},u=()=>{t=!1},f=()=>oT.isFocused()&&(e.networkMode==="always"||yv.isOnline())&&e.canRun(),h=()=>N7(e.networkMode)&&e.canRun(),m=b=>{s()||(r?.(),o.resolve(b))},g=b=>{s()||(r?.(),o.reject(b))},v=()=>new Promise(b=>{r=E=>{(s()||f())&&b(E)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),C=()=>{if(s())return;let b;const E=n===0?e.initialPromise:void 0;try{b=E??e.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(m).catch(x=>{if(s())return;const I=e.retry??(Yf.isServer()?0:3),R=e.retryDelay??bbe,M=typeof R=="function"?R(n,x):R,D=I===!0||typeof I=="number"&&n<I||typeof I=="function"&&I(n,x);if(t||!D){g(x);return}n++,e.onFail?.(n,x),fbe(M).then(()=>f()?void 0:v()).then(()=>{t?g(x):C()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:u,canStart:h,start:()=>(h()?C():v().then(C),o)}}var D7=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),oI(this.gcTime)&&(this.#e=$a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yf.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&($a.clearTimeout(this.#e),this.#e=void 0)}};function Sbe(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const f=async()=>{let h=!1;const m=C=>{mbe(C,()=>t.signal,()=>h=!0)},g=P7(t.options,t.fetchOptions),v=async(C,b,E)=>{if(h)return Promise.reject(t.signal.reason);if(b==null&&C.pages.length)return Promise.resolve(C);const I=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:b,direction:E?"backward":"forward",meta:t.options.meta};return m(N),N})(),R=await g(I),{maxPages:M}=t.options,D=E?pbe:hbe;return{pages:D(C.pages,R,M),pageParams:D(C.pageParams,b,M)}};if(o&&s.length){const C=o==="backward",b=C?L7:cI,E={pages:s,pageParams:a},x=b(r,E);c=await v(E,x,C)}else{const C=e??s.length;do{const b=u===0?a[0]??r.initialPageParam:cI(r,c);if(u>0&&b==null)break;c=await v(c,b),u++}while(u<C)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function cI(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function L7(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function f9e(e,t){return t?cI(e,t)!=null:!1}function h9e(e,t){return!t||!e.getPreviousPageParam?!1:L7(e,t)!=null}var Cbe=class extends D7{#e;#t;#n;#r;#s;#o;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#r=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=N4(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#o?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=N4(this.options);t.data!==void 0&&(this.setState(P4(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=iI(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(rr).catch(rr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ur(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===iT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Vi(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!O7(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#o&&(this.#i||this.#u()?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},o=()=>{const u=P7(this.options,t),h=(()=>{const m={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#i=!1,this.options.persister?this.options.persister(u,h,this):u(h)},a=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return r(u),u})();(this.#e==="infinite"?Sbe(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#o=k7({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:u=>{u instanceof lI&&u.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(u,f)=>{this.#l({type:"failed",failureCount:u,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const u=await this.#o.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#r.config.onSuccess?.(u,this),this.#r.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof lI){if(u.silent)return this.#o.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#l({type:"error",error:u}),this.#r.config.onError?.(u,this),this.#r.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...U7(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...P4(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),An.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function U7(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N7(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function P4(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function N4(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var wbe=class extends Fu{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#a=aI(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#s;#o;#a;#i;#u;#l;#p;#d;#f;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),k4(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return uI(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return uI(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#C(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ur(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!vv(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&D4(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Ur(this.options.enabled,this.#t)!==Ur(t.enabled,this.#t)||Vi(this.options.staleTime,this.#t)!==Vi(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||Ur(this.options.enabled,this.#t)!==Ur(t.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return xbe(this,n)&&(this.#r=n,this.#o=this.options,this.#s=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(rr)),t}#g(){this.#S();const e=Vi(this.options.staleTime,this.#t);if(Yf.isServer()||this.#r.isStale||!oI(e))return;const n=O7(this.#r.dataUpdatedAt,e)+1;this.#d=$a.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#C(),this.#c=e,!(Yf.isServer()||Ur(this.options.enabled,this.#t)===!1||!oI(this.#c)||this.#c===0)&&(this.#f=$a.setInterval(()=>{(this.options.refetchIntervalInBackground||oT.isFocused())&&this.#h()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#S(){this.#d!==void 0&&($a.clearTimeout(this.#d),this.#d=void 0)}#C(){this.#f!==void 0&&($a.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#r,s=this.#s,a=this.#o,u=e!==n?e.state:this.#n,{state:f}=e;let h={...f},m=!1,g;if(t._optimisticResults){const L=this.hasListeners(),$=!L&&k4(e,t),G=L&&D4(e,n,t,r);($||G)&&(h={...h,...U7(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:C,status:b}=h;g=h.data;let E=!1;if(t.placeholderData!==void 0&&g===void 0&&b==="pending"){let L;o?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(L=o.data,E=!0):L=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,L!==void 0&&(b="success",g=iI(o?.data,L,t),m=!0)}if(t.select&&g!==void 0&&!E)if(o&&g===s?.data&&t.select===this.#u)g=this.#l;else try{this.#u=t.select,g=t.select(g),g=iI(o?.data,g,t),this.#l=g,this.#i=null}catch(L){this.#i=L}this.#i&&(v=this.#i,g=this.#l,C=Date.now(),b="error");const x=h.fetchStatus==="fetching",I=b==="pending",R=b==="error",M=I&&x,D=g!==void 0,T={status:b,fetchStatus:h.fetchStatus,isPending:I,isSuccess:b==="success",isError:R,isInitialLoading:M,isLoading:M,data:g,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:C,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!I,isLoadingError:R&&!D,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:R&&D,isStale:lT(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Ur(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=T.data!==void 0,$=T.status==="error"&&!L,G=q=>{$?q.reject(T.error):L&&q.resolve(T.data)},z=()=>{const q=this.#a=T.promise=aI();G(q)},F=this.#a;switch(F.status){case"pending":e.queryHash===n.queryHash&&G(F);break;case"fulfilled":($||T.data!==F.value)&&z();break;case"rejected":(!$||T.error!==F.reason)&&z();break}}return T}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#o=this.options,this.#s.data!==void 0&&(this.#p=this.#t),vv(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const s=new Set(o??this.#m);return this.options.throwOnError&&s.add("error"),Object.keys(this.#r).some(a=>{const c=a;return this.#r[c]!==e[c]&&s.has(c)})};this.#E({listeners:n()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(e){An.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Ebe(e,t){return Ur(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ur(t.retryOnMount,e)===!1)}function k4(e,t){return Ebe(e,t)||e.state.data!==void 0&&uI(e,t,t.refetchOnMount)}function uI(e,t,n){if(Ur(t.enabled,e)!==!1&&Vi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&lT(e,t)}return!1}function D4(e,t,n,r){return(e!==t||Ur(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&lT(e,n)}function lT(e,t){return Ur(t.enabled,e)!==!1&&e.isStaleByTime(Vi(t.staleTime,e))}function xbe(e,t){return!vv(e.getCurrentResult(),t)}var _be=class extends D7{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||F7(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=k7({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,a)=>{this.#s({type:"failed",failureCount:s,error:a})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",o=!this.#r.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#s({type:"pending",context:a,variables:e,isPaused:o})}const s=await this.#r.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#s({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#s({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),An.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function F7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $7=class extends Fu{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new _be({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Fm(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Fm(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Fm(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Fm(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){An.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>T4(t,n))}findAll(e={}){return this.getAll().filter(t=>T4(e,t))}notify(e){An.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return An.batch(()=>Promise.all(e.map(t=>t.continue().catch(rr))))}};function Fm(e){return e.options.scope?.id}var Ibe=class extends Fu{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),vv(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&dl(n.mutationKey)!==dl(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#s(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#o()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#s(){const t=this.#n?.state??F7();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){An.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,r,o)}catch(s){Promise.reject(s)}try{this.#r.onSettled?.(t.data,null,n,r,o)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,r,o)}catch(s){Promise.reject(s)}try{this.#r.onSettled?.(void 0,t.error,n,r,o)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},z7=class extends Fu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??sT(r,t);let s=this.get(o);return s||(s=new Cbe({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){An.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>R4(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>R4(e,n)):t}notify(e){An.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){An.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){An.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Abe=class{#e;#t;#n;#r;#s;#o;#a;#i;constructor(e={}){this.#e=e.queryCache||new z7,this.#t=e.mutationCache||new $7,this.#n=e.defaultOptions||{},this.#r=new Map,this.#s=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=oT.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=yv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Vi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,a=ube(t,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return An.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;An.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return An.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=An.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(rr).catch(rr)}invalidateQueries(e,t={}){return An.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=An.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(rr)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(rr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Vi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rr).catch(rr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rr).catch(rr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return yv.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(dl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Zf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(dl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{Zf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=sT(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===iT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},j7=_.createContext(void 0),ia=e=>{const t=_.useContext(j7);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Rbe=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),O.jsx(j7.Provider,{value:e,children:t})),B7=_.createContext(!1),Tbe=()=>_.useContext(B7);B7.Provider;function Obe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Mbe=_.createContext(Obe()),Pbe=()=>_.useContext(Mbe),Nbe=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?aT(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},kbe=e=>{_.useEffect(()=>{e.clearReset()},[e])},Dbe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||aT(n,[e.error,r])),Lbe=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Ube=(e,t)=>e.isLoading&&e.isFetching&&!t,Fbe=(e,t)=>e?.suspense&&t.isPending,L4=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $be(e,t,n){const r=Tbe(),o=Pbe(),s=ia(),a=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const c=s.getQueryCache().get(a.queryHash),u=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":u?"optimistic":void 0,Lbe(a),Nbe(a,o,c),kbe(o);const f=!s.getQueryCache().get(a.queryHash),[h]=_.useState(()=>new t(s,a)),m=h.getOptimisticResult(a),g=!r&&u;if(_.useSyncExternalStore(_.useCallback(v=>{const C=g?h.subscribe(An.batchCalls(v)):rr;return h.updateResult(),C},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),_.useEffect(()=>{h.setOptions(a)},[a,h]),Fbe(a,m))throw L4(a,h,o);if(Dbe({result:m,errorResetBoundary:o,throwOnError:a.throwOnError,query:c,suspense:a.suspense}))throw m.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,m),a.experimental_prefetchInRender&&!Yf.isServer()&&Ube(m,r)&&(f?L4(a,h,o):c?.promise)?.catch(rr).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?m:h.trackResult(m)}function fl(e,t){return $be(e,wbe)}function cT(e,t){const n=ia(),[r]=_.useState(()=>new Ibe(n,e));_.useEffect(()=>{r.setOptions(e)},[r,e]);const o=_.useSyncExternalStore(_.useCallback(a=>r.subscribe(An.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=_.useCallback((a,c)=>{r.mutate(a,c).catch(rr)},[r]);if(o.error&&aT(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const zbe="modulepreload",jbe=function(e){return"/"+e},U4={},Pe=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let u=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");o=u(n.map(f=>{if(f=jbe(f),f in U4)return;U4[f]=!0;const h=f.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${m}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":zbe,h||(g.as="script"),g.crossOrigin="",g.href=f,c&&g.setAttribute("nonce",c),document.head.appendChild(g),h)return new Promise((v,C)=>{g.addEventListener("load",v),g.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return o.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var F4=_.use,zc=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Cx(e){const t=_.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Bbe(e,t,n={},r={}){_.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([s])=>{t(s)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function Hbe(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}const H7=!1;function Qf(e){return e[e.length-1]}function qbe(e){return typeof e=="function"}function za(e,t){return qbe(e)?e(t):e}const q7=Object.prototype.hasOwnProperty,$4=Object.prototype.propertyIsEnumerable;function V7(e){for(const t in e)if(q7.call(e,t))return!0;return!1}const Vbe=()=>Object.create(null),ka=(e,t)=>ja(e,t,Vbe);function ja(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const o=t,s=B4(e)&&B4(o);if(!s&&!(bv(e)&&bv(o)))return o;const a=s?e:z4(e);if(!a)return o;const c=s?o:z4(o);if(!c)return o;const u=a.length,f=c.length,h=s?new Array(f):n();let m=0;for(let g=0;g<f;g++){const v=s?g:c[g],C=e[v],b=o[v];if(C===b){h[v]=C,(s?g<u:q7.call(e,v))&&m++;continue}if(C===null||b===null||typeof C!="object"||typeof b!="object"){h[v]=b;continue}const E=ja(C,b,n,r+1);h[v]=E,E===C&&m++}return u===f&&m===u?e:h}function z4(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!$4.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const o of n){if(!$4.call(e,o))return!1;r.push(o)}return r}function bv(e){if(!j4(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!j4(n)||!n.hasOwnProperty("isPrototypeOf"))}function j4(e){return Object.prototype.toString.call(e)==="[object Object]"}function B4(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ka(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;r++)if(!Ka(e[r],t[r],n))return!1;return!0}if(bv(e)&&bv(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!Ka(e[a],t[a],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&o++;let s=0;for(const a in t)if((!r||t[a]!==void 0)&&(s++,s>o||!Ka(e[a],t[a],n)))return!1;return o===s}return!1}function cu(e){let t,n;const r=new Promise((o,s)=>{t=o,n=s});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e?.(o)},r.reject=o=>{r.status="rejected",n(o)},r}function Wbe(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Xf(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}const Gbe=/[\x00-\x1f\x7f"<>`{}]/g;function Kbe(e){return e.replace(Gbe,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function H4(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Kbe(t)}const Zbe=["http:","https:","mailto:","tel:"];function Sv(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Jd(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",o;for(;(o=t.exec(e))!==null;)r+=H4(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+H4(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function Ybe(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Qbe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Us(){throw new Error("Invariant failed")}function Jf(e){const t=new Map;let n,r;const o=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const a=t.get(s);if(a)return o(a),a.value},set(s,a){if(t.size>=e&&n){const u=n;t.delete(u.key),u.next&&(n=u.next,u.next.prev=void 0),u===r&&(r=void 0)}const c=t.get(s);if(c)c.value=a,o(c);else{const u={key:s,value:a,prev:r};r&&(r.next=u),r=u,n||(n=u),t.set(s,u)}},clear(){t.clear(),n=void 0,r=void 0}}}const ji=4,W7=5;function Xbe(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function G7(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,s=e.substring(t,o);if(!s||!s.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){const c=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=c,n[4]=c,n[5]=c,n}if(s.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const a=Xbe(s);if(a){const[c,u]=a,f=s.charCodeAt(c+1);if(f===45){if(c+2<s.length&&s.charCodeAt(c+2)===36){const h=c+3,m=u;if(h<m)return n[0]=3,n[1]=t+c,n[2]=t+h,n[3]=t+m,n[4]=t+u+1,n[5]=o,n}}else if(f===36){const h=c+1,m=c+2;return m===u?(n[0]=2,n[1]=t+c,n[2]=t+h,n[3]=t+m,n[4]=t+u+1,n[5]=e.length,n):(n[0]=1,n[1]=t+c,n[2]=t+m,n[3]=t+u,n[4]=t+u+1,n[5]=o,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function ib(e,t,n,r,o,s,a){a?.(n);let c=r;{const u=n.fullPath??n.from,f=u.length,h=n.options?.caseSensitive??e,m=n.options?.params?.parse??n.options?.parseParams;for(;c<f;){const v=G7(u,c,t);let C;const b=c,E=v[5];switch(c=E+1,s++,v[0]){case 0:{const x=u.substring(v[2],v[3]);if(h){const I=o.static?.get(x);if(I)C=I;else{o.static??=new Map;const R=Ba(n.fullPath??n.from);R.parent=o,R.depth=s,C=R,o.static.set(x,R)}}else{const I=x.toLowerCase(),R=o.staticInsensitive?.get(I);if(R)C=R;else{o.staticInsensitive??=new Map;const M=Ba(n.fullPath??n.from);M.parent=o,M.depth=s,C=M,o.staticInsensitive.set(I,M)}}break}case 1:{const x=u.substring(b,v[1]),I=u.substring(v[4],E),R=h&&!!(x||I),M=x?R?x:x.toLowerCase():void 0,D=I?R?I:I.toLowerCase():void 0,N=!m&&o.dynamic?.find(T=>!T.parse&&T.caseSensitive===R&&T.prefix===M&&T.suffix===D);if(N)C=N;else{const T=Ex(1,n.fullPath??n.from,R,M,D);C=T,T.depth=s,T.parent=o,o.dynamic??=[],o.dynamic.push(T)}break}case 3:{const x=u.substring(b,v[1]),I=u.substring(v[4],E),R=h&&!!(x||I),M=x?R?x:x.toLowerCase():void 0,D=I?R?I:I.toLowerCase():void 0,N=!m&&o.optional?.find(T=>!T.parse&&T.caseSensitive===R&&T.prefix===M&&T.suffix===D);if(N)C=N;else{const T=Ex(3,n.fullPath??n.from,R,M,D);C=T,T.parent=o,T.depth=s,o.optional??=[],o.optional.push(T)}break}case 2:{const x=u.substring(b,v[1]),I=u.substring(v[4],E),R=h&&!!(x||I),M=x?R?x:x.toLowerCase():void 0,D=I?R?I:I.toLowerCase():void 0,N=Ex(2,n.fullPath??n.from,R,M,D);C=N,N.parent=o,N.depth=s,o.wildcard??=[],o.wildcard.push(N)}}o=C}if(m&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=Ba(n.fullPath??n.from);v.kind=W7,v.parent=o,s++,v.depth=s,o.pathless??=[],o.pathless.push(v),o=v}const g=(n.path||!n.children)&&!n.isRoot;if(g&&u.endsWith("/")){const v=Ba(n.fullPath??n.from);v.kind=ji,v.parent=o,s++,v.depth=s,o.index=v,o=v}o.parse=m??null,o.priority=n.options?.params?.priority??0,g&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const u of n.children)ib(e,t,u,c,o,s,a)}function wx(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Di(e){if(e.pathless)for(const t of e.pathless)Di(t);if(e.static)for(const t of e.static.values())Di(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Di(t);if(e.dynamic?.length){e.dynamic.sort(wx);for(const t of e.dynamic)Di(t)}if(e.optional?.length){e.optional.sort(wx);for(const t of e.optional)Di(t)}if(e.wildcard?.length){e.wildcard.sort(wx);for(const t of e.wildcard)Di(t)}}function Ba(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Ex(e,t,n,r,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:o}}function Jbe(e,t){const n=Ba("/"),r=new Uint16Array(6);for(const o of e)ib(!1,r,o,1,n,0);Di(n),t.masksTree=n,t.flatCache=Jf(1e3)}function e0e(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=uT(e,t.masksTree);return t.flatCache.set(e,r),r}function t0e(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let a=o.singleCache.get(s);return a||(a=Ba("/"),ib(t,new Uint16Array(6),{from:e},1,a,0),o.singleCache.set(s,a)),uT(r,a,n)}function n0e(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||="/";let s;try{s=uT(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)s=null;else throw a}return s&&(s.branch=Z7(s.route)),t.matchCache.set(r,s),s}function r0e(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function o0e(e,t=!1,n){const r=Ba(e.fullPath),o=new Uint16Array(6),s={},a={};let c=0;return ib(t,o,e,1,r,0,u=>{if(n?.(u,c),u.id in s&&Us(),s[u.id]=u,c!==0&&u.path){const f=r0e(u.fullPath);(!a[f]||u.fullPath.endsWith("/"))&&(a[f]=u)}c++}),Di(r),{processedTree:{segmentTree:r,singleCache:Jf(1e3),matchCache:Jf(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:a}}function uT(e,t,n=!1){const r=e.split("/"),o=i0e(e,r,t,n);if(!o)return null;const[s]=K7(e,r,o);return{route:o.node.route,rawParams:s}}function K7(e,t,n){const r=s0e(n.node);let o=null;const s=Object.create(null);let a=n.extract?.part??0,c=n.extract?.node??0,u=n.extract?.path??0,f=n.extract?.segment??0;for(;c<r.length;a++,c++,u++,f++){const h=r[c];if(h.kind===ji)break;if(h.kind===W7){f--,a--,u--;continue}const m=t[a],g=u;if(m&&(u+=m.length),h.kind===1){o??=n.node.fullPath.split("/");const v=o[f],C=h.prefix?.length??0;if(v.charCodeAt(C)===123){const b=h.suffix?.length??0,E=v.substring(C+2,v.length-b-1),x=m.substring(C,m.length-b);s[E]=decodeURIComponent(x)}else{const b=v.substring(1);s[b]=decodeURIComponent(m)}}else if(h.kind===3){if(n.skipped&1<<c){a--,u=g-1;continue}o??=n.node.fullPath.split("/");const v=o[f],C=h.prefix?.length??0,b=h.suffix?.length??0,E=v.substring(C+3,v.length-b-1),x=h.suffix||h.prefix?m.substring(C,m.length-b):m;x&&(s[E]=decodeURIComponent(x))}else if(h.kind===2){const v=h,C=e.substring(g+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),b=decodeURIComponent(C);s["*"]=b,s._splat=b;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:a,node:c,path:u,segment:f}]}function Z7(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function s0e(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function i0e(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Qf(t),s=o&&e!=="/",a=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let u=null,f=null;for(;c.length;){const h=c.pop(),{node:m,index:g,skipped:v,depth:C,statics:b,dynamics:E,optionals:x}=h;let{extract:I,rawParams:R}=h;if(m.kind===2&&m.route&&!zm(f,h))continue;if(m.parse){if(!q4(e,t,h))continue;R=h.rawParams,I=h.extract}r&&m.route&&m.kind!==ji&&zm(u,h)&&(u=h);const M=g===a;if(M&&(m.route&&(!s||m.kind===ji||m.kind===2)&&zm(f,h)&&(f=h),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const D=M?void 0:t[g];let N;if(M&&m.index){const T={node:m.index,index:g,skipped:v,depth:C+1,statics:b,dynamics:E,optionals:x,extract:I,rawParams:R};let L=!0;if(m.index.parse&&(q4(e,t,T)||(L=!1)),L){if(!E&&!x&&!v&&a0e(b,a))return T;zm(f,T)&&(f=T)}}if(m.wildcard)for(let T=m.wildcard.length-1;T>=0;T--){const L=m.wildcard[T],{prefix:$,suffix:G}=L;if(!($&&(M||!(L.caseSensitive?D:N??=D.toLowerCase()).startsWith($)))){if(G){if(M)continue;const z=t.slice(g).join("/").slice(-G.length);if((L.caseSensitive?z:z.toLowerCase())!==G)continue}c.push({node:L,index:a,skipped:v,depth:C+1,statics:b,dynamics:E,optionals:x,extract:I,rawParams:R})}}if(m.optional){const T=v|1<<C,L=C+1;for(let $=m.optional.length-1;$>=0;$--){const G=m.optional[$];c.push({node:G,index:g,skipped:T,depth:L,statics:b,dynamics:E,optionals:x,extract:I,rawParams:R})}if(!M)for(let $=m.optional.length-1;$>=0;$--){const G=m.optional[$],{prefix:z,suffix:F}=G;if(z||F){const q=G.caseSensitive?D:N??=D.toLowerCase();if(z&&!q.startsWith(z)||F&&!q.endsWith(F))continue}c.push({node:G,index:g+1,skipped:v,depth:L,statics:b,dynamics:E,optionals:x+$m(a,g),extract:I,rawParams:R})}}if(!M&&m.dynamic&&D)for(let T=m.dynamic.length-1;T>=0;T--){const L=m.dynamic[T],{prefix:$,suffix:G}=L;if($||G){const z=L.caseSensitive?D:N??=D.toLowerCase();if($&&!z.startsWith($)||G&&!z.endsWith(G))continue}c.push({node:L,index:g+1,skipped:v,depth:C+1,statics:b,dynamics:E+$m(a,g),optionals:x,extract:I,rawParams:R})}if(!M&&m.staticInsensitive){const T=m.staticInsensitive.get(N??=D.toLowerCase());T&&c.push({node:T,index:g+1,skipped:v,depth:C+1,statics:b+$m(a,g),dynamics:E,optionals:x,extract:I,rawParams:R})}if(!M&&m.static){const T=m.static.get(D);T&&c.push({node:T,index:g+1,skipped:v,depth:C+1,statics:b+$m(a,g),dynamics:E,optionals:x,extract:I,rawParams:R})}if(m.pathless){const T=C+1;for(let L=m.pathless.length-1;L>=0;L--){const $=m.pathless[L];c.push({node:$,index:g,skipped:v,depth:T,statics:b,dynamics:E,optionals:x,extract:I,rawParams:R})}}}if(f)return f;if(r&&u){let h=u.index;for(let g=0;g<u.index;g++)h+=t[g].length;const m=h===e.length?"/":e.slice(h);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(m),u}return null}function $m(e,t){return 2**(e-t-1)}function a0e(e,t){return e===2**(t-1)-1}function q4(e,t,n){let r,o;try{[r,o]=K7(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=o,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function zm(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ji)>(e.node.kind===ji)||t.node.kind===ji==(e.node.kind===ji)&&t.depth>e.depth))):!0}function Bg(e){return dT(e.filter(t=>t!==void 0).join("/"))}function dT(e){return e.replace(/\/{2,}/g,"/")}function Y7(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ds(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Q7(e){return Ds(Y7(e))}function Cv(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function l0e(e,t,n){return Cv(e,n)===Cv(t,n)}function c0e({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let a;if(r){a=o?t:s?e:e+"\0"+t;const f=r.get(a);if(f)return f}let c;if(s)c=e.split("/");else if(o)c=t.split("/");else{for(c=e.split("/");c.length>1&&Qf(c)==="";)c.pop();const f=t.split("/");for(let h=0,m=f.length;h<m;h++){const g=f[h];g===""?h?h===m-1&&c.push(g):c=[g]:g===".."?c.pop():g==="."||c.push(g)}}c.length>1&&(Qf(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));const u=dT(c.join("/"))||"/";return a&&r&&r.set(a,u),u}function u0e(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,s=>t.get(s)??s)}function xx(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>W4(o,n)).join("/"):W4(r,n)}function V4({path:e,params:t,decoder:n,...r}){let o=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:o};const a=e.length;let c=0,u,f="";for(;c<a;){const h=c;u=G7(e,h,u);const m=u[5];if(c=m+1,h===m)continue;const g=u[0];if(g===0){f+="/"+e.substring(h,m);continue}if(g===2){const v=t._splat;s._splat=v,s["*"]=v;const C=e.substring(h,u[1]),b=e.substring(u[4],m);if(!v){o=!0,(C||b)&&(f+="/"+C+b);continue}const E=xx("_splat",t,n);f+="/"+C+E+b;continue}if(g===1){const v=e.substring(u[2],u[3]);!o&&!(v in t)&&(o=!0),s[v]=t[v];const C=e.substring(h,u[1]),b=e.substring(u[4],m),E=xx(v,t,n)??"undefined";f+="/"+C+E+b;continue}if(g===3){const v=e.substring(u[2],u[3]),C=t[v];if(C==null)continue;s[v]=C;const b=e.substring(h,u[1]),E=e.substring(u[4],m),x=xx(v,t,n)??"";f+="/"+b+x+E;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:o}}function W4(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Xn(e){return e?.isNotFound===!0}function d0e(){try{return sessionStorage}catch{return}}const f0e="tsr-scroll-restoration-v1_3",X7=d0e();function h0e(){try{return JSON.parse(X7?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function p0e(){try{X7?.setItem(f0e,JSON.stringify(kc))}catch{}}const kc=h0e(),G4="data-scroll-restoration-id",m0e=e=>e.state.__TSR_key||e.href;function g0e(e){const t=e.getAttribute(G4);if(t)return`[${G4}="${t}"]`;let n="",r=e,o;for(;o=r.parentNode;){let s=1,a=r;for(;a=a.previousElementSibling;)s++;const c=`${r.localName}:nth-child(${s})`;n=n?`${c} > ${n}`:c,r=o}return n}let jm=!1;const Hg="window";function dI(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function K4(e){const t=new Set;for(const n of e){if(n===Hg)continue;const r=dI(n);r&&t.add(r)}return t}function v0e(e,t){const n=e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);const o=e.options.getScrollRestorationKey||m0e,s=new Set,a=c=>{const u=kc[c]||={};for(const f of s)f===document?u[Hg]={scrollX,scrollY}:f.isConnected&&(u[g0e(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,jm=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{jm||s.add(c.target)},!0),e.subscribe("onBeforeLoad",c=>{c.fromLocation&&a(o(c.fromLocation)),s.clear()}),addEventListener("pagehide",()=>{a(o(e.stores.resolvedLocation.get()??e.stores.location.get())),p0e()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",c=>{const u=e.options.scrollRestorationBehavior,f=e.options.scrollToTopSelectors,h=r.next,m=r.hash;let g;if(s.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const v=o(c.toLocation),C=c.fromLocation&&o(c.fromLocation);if(r.restoring&&C&&C!==v){const b=kc[C];if(b){let E=kc[v];for(const x in b){if(x===Hg){if(h)continue}else{const I=dI(x);if(!I||h&&f&&(g??=K4(f),g.has(I)))continue}E||(E=kc[v]={}),E[x]??=b[x]}}}jm=!0;try{const b=c.toLocation.hash,E=c.toLocation.state.__hashScrollIntoViewOptions??!0;let x=!1;if(h){!b&&f&&(g??=K4(f));const I=b&&E&&m,R=r.restoring?kc[v]:void 0;if(R)for(const M in R){const{scrollX:D,scrollY:N}=R[M];if(M===Hg){if(I)continue;scrollTo({top:N,left:D,behavior:u}),x=!0}else{const T=dI(M);T&&(T.scrollLeft=D,T.scrollTop=N,g?.delete(T))}}if(!b){const M={top:0,left:0,behavior:u};if(x||scrollTo(M),g)for(const D of g)D.scrollTo(M)}}!x&&b&&E&&document.getElementById(b)?.scrollIntoView(E)}finally{jm=!1}}))}function y0e(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function _x(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function b0e(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,o]of t.entries()){const s=n[r];s==null?n[r]=_x(o):Array.isArray(s)?s.push(_x(o)):n[r]=[s,_x(o)]}return n}const S0e=w0e(JSON.parse),C0e=E0e(JSON.stringify,JSON.parse);function w0e(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=b0e(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function E0e(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const s=y0e(o,r);return s?`?${s}`:""}}const Za="__root__";function _l(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function vr(e){return e instanceof Response&&!!e.options}function x0e(e){return{input:({url:t})=>{for(const n of e)t=fI(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=J7(e[n],t);return t}}}function _0e(e){const t=Q7(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),o=`${r}/`;return{input:({url:s})=>{const a=e.caseSensitive?s.pathname:s.pathname.toLowerCase();return a===r?s.pathname="/":a.startsWith(o)&&(s.pathname=s.pathname.slice(n.length)),s},output:({url:s})=>(s.pathname=Bg(["/",t,s.pathname]),s)}}function fI(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function J7(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function I0e(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:o,init:s}=t,a=new Map,c=new Map,u=new Map,f=n(e.status),h=n(e.loadedAt),m=n(e.isLoading),g=n(e.isTransitioning),v=n(e.location),C=n(e.resolvedLocation),b=n(e.statusCode),E=n(e.redirect),x=n([]),I=n([]),R=n([]),M=r(()=>Ix(a,x.get())),D=r(()=>Ix(c,I.get())),N=r(()=>Ix(u,R.get())),T=r(()=>x.get()[0]),L=r(()=>x.get().some(ee=>a.get(ee)?.get().status==="pending")),$=r(()=>({locationHref:v.get().href,resolvedLocationHref:C.get()?.href,status:f.get()})),G=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:m.get(),isTransitioning:g.get(),matches:M.get(),location:v.get(),resolvedLocation:C.get(),statusCode:b.get(),redirect:E.get()})),z=Jf(64);function F(ee){let pe=z.get(ee);return pe||(pe=r(()=>{const ge=x.get();for(const Te of ge){const j=a.get(Te);if(j&&j.routeId===ee)return j.get()}}),z.set(ee,pe)),pe}const q={status:f,loadedAt:h,isLoading:m,isTransitioning:g,location:v,resolvedLocation:C,statusCode:b,redirect:E,matchesId:x,pendingIds:I,cachedIds:R,matches:M,pendingMatches:D,cachedMatches:N,firstId:T,hasPending:L,matchRouteDeps:$,matchStores:a,pendingMatchStores:c,cachedMatchStores:u,__store:G,getRouteMatchStore:F,setMatches:X,setPending:Se,setCached:V};X(e.matches),s?.(q);function X(ee){Ax(ee,a,x,n,o)}function Se(ee){Ax(ee,c,I,n,o)}function V(ee){Ax(ee,u,R,n,o)}return q}function Ix(e,t){const n=[];for(const r of t){const o=e.get(r);o&&n.push(o.get())}return n}function Ax(e,t,n,r,o){const s=e.map(c=>c.id),a=new Set(s);o(()=>{for(const c of t.keys())a.has(c)||t.delete(c);for(const c of e){const u=t.get(c.id);if(!u){const f=r(c);f.routeId=c.routeId,t.set(c.id,f);continue}u.routeId=c.routeId,u.get()!==c&&u.set(c)}Qbe(n.get(),s)||n.set(s)})}const hI=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},A0e=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),ab=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ya=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const a=e.matches[s];if(!a)continue;const c=e.router.getMatch(a.id);c&&Object.assign(r,c.__routeContext,c.__beforeLoadContext)}return r},Z4=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let a=s;a>=0;a--){const c=e.matches[a];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return a}return n?s:o},Bi=(e,t,n)=>{if(!(!vr(n)&&!Xn(n)))throw vr(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:vr(n)?"redirected":Xn(n)?"notFound":r.status==="pending"?"success":r.status,context:Ya(e,t.index),isFetching:!1,error:n})),Xn(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),vr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},ej=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Y4=(e,t,n)=>{const r=Ya(e,n);e.updateMatch(t,o=>({...o,context:r}))},ef=(e,t,n)=>{const{id:r,routeId:o}=e.matches[t],s=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,Bi(e,e.router.getMatch(r),n);try{s.options.onError?.(n)}catch(a){n=a,Bi(e,e.router.getMatch(r),n)}e.updateMatch(r,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!vr(n)&&!Xn(n)&&(e.serialError??=n)},tj=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!ab(e,t)&&(n.options.loader||n.options.beforeLoad||rj(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const s=setTimeout(()=>{hI(e)},o);r._nonReactive.pendingTimeout=s}},R0e=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;tj(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Bi(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},T0e=(e,t,n,r)=>{const o=e.router.getMatch(t);let s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=cu(()=>{s?.resolve(),s=void 0});const{paramsError:a,searchError:c}=o;a&&ef(e,n,a),c&&ef(e,n,c),tj(e,t,r,o);const u=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,M=>({...M,isFetching:"beforeLoad",fetchCount:M.fetchCount+1,abortController:u})))},m=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,M=>({...M,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),m()});return}o._nonReactive.beforeLoadPromise=cu();const g={...Ya(e,n,!1),...o.__routeContext},{search:v,params:C,cause:b}=o,E=ab(e,t),x={search:v,abortController:u,params:C,preload:E,context:g,location:e.location,navigate:M=>e.router.navigate({...M,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:E?"preload":b,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},I=M=>{if(M===void 0){e.router.batch(()=>{h(),m()});return}(vr(M)||Xn(M))&&(h(),ef(e,n,M)),e.router.batch(()=>{h(),e.updateMatch(t,D=>({...D,__beforeLoadContext:M})),m()})};let R;try{if(R=r.options.beforeLoad(x),Xf(R))return h(),R.catch(M=>{ef(e,n,M)}).then(I)}catch(M){h(),ef(e,n,M)}I(R)},O0e=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>c(),a=()=>T0e(e,n,t,o),c=()=>{if(ej(e,n))return;const u=R0e(e,n,o);return Xf(u)?u.then(a):a()};return s()},M0e=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([s,a,c])=>({meta:s?.meta,links:s?.links,headScripts:s?.scripts,headers:c,scripts:a,styles:s?.styles}))},nj=(e,t,n,r,o)=>{const s=t[r-1],{params:a,loaderDeps:c,abortController:u,cause:f}=e.router.getMatch(n),h=Ya(e,r),m=ab(e,n);return{params:a,deps:c,preload:!!m,parentMatchPromise:s,abortController:u,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:m?"preload":f,route:o,...e.router.options.additionalContext}},Q4=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(H7??e.router.isServer)||s.ssr===!0)&&eh(o);const a=o.options.loader,c=typeof a=="function"?a:a?.handler,u=c?.(nj(e,t,n,r,o)),f=!!c&&Xf(u);if((f||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,m=>({...m,isFetching:"loader"})),c){const m=f?await u:u;Bi(e,e.router.getMatch(n),m),m!==void 0&&e.updateMatch(n,g=>({...g,loaderData:m}))}o._lazyPromise&&await o._lazyPromise;const h=s._nonReactive.minPendingPromise;h&&await h,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,m=>({...m,error:void 0,context:Ya(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let c=a;if(c?.name==="AbortError"){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Ya(e,r)}));return}const u=s._nonReactive.minPendingPromise;u&&await u,Xn(a)&&await o.options.notFoundComponent?.preload?.(),Bi(e,e.router.getMatch(n),a);try{o.options.onError?.(a)}catch(f){c=f,Bi(e,e.router.getMatch(n),f)}!vr(c)&&!Xn(c)&&await eh(o,["errorComponent"]),e.updateMatch(n,f=>({...f,error:c,context:Ya(e,r),status:"error",isFetching:!1}))}}catch(s){const a=e.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Bi(e,a,s)}},P0e=async(e,t,n)=>{async function r(v,C,b,E,x){const I=Date.now()-C.updatedAt,R=v?x.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:x.options.staleTime??e.router.options.defaultStaleTime??0,M=x.options.shouldReload,D=typeof M=="function"?M(nj(e,t,o,n,x)):M,{status:N,invalid:T}=E,L=I>=R&&(!!e.forceStaleReload||E.cause==="enter"||b!==void 0&&b!==E.id);a=N==="success"&&(T||(D??L)),v&&x.options.preload===!1||(a&&!e.sync&&h?(c=!0,(async()=>{try{await Q4(e,t,o,n,x);const $=e.router.getMatch(o);$._nonReactive.loaderPromise?.resolve(),$._nonReactive.loadPromise?.resolve(),$._nonReactive.loaderPromise=void 0,$._nonReactive.loadPromise=void 0}catch($){vr($)&&await e.router.navigate($.options)}})()):N!=="success"||a?await Q4(e,t,o,n,x):Y4(e,o,n))}const{id:o,routeId:s}=e.matches[n];let a=!1,c=!1;const u=e.router.looseRoutesById[s],f=u.options.loader,h=((typeof f=="function"?void 0:f?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(ej(e,o)){if(!e.router.getMatch(o))return e.matches[n];Y4(e,o,n)}else{const v=e.router.getMatch(o),C=e.router.stores.matchesId.get()[n],b=(C&&e.router.stores.matchStores.get(C)||null)?.routeId===s?C:e.router.stores.matches.get().find(x=>x.routeId===s)?.id,E=ab(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&h)return v;await v._nonReactive.loaderPromise;const x=e.router.getMatch(o),I=x._nonReactive.error||x.error;I&&Bi(e,x,I),x.status==="pending"&&await r(E,v,b,x,u)}else{const x=E&&!e.router.stores.matchStores.has(o),I=e.router.getMatch(o);I._nonReactive.loaderPromise=cu(),x!==I.preload&&e.updateMatch(o,R=>({...R,preload:x})),await r(E,v,b,I,u)}}const m=e.router.getMatch(o);c||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,c||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const g=c?m.isFetching:!1;return g!==m.isFetching||m.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:g,invalid:!1})),e.router.getMatch(o)):m};async function X4(e){const t=e,n=[];A0e(t.router)&&hI(t);let r;for(let g=0;g<t.matches.length;g++){try{const v=O0e(t,g);Xf(v)&&await v}catch(v){if(vr(v))throw v;if(Xn(v))r=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?Z4(t,r):void 0,a=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let c,u;for(let g=0;g<a;g++)n.push(P0e(t,n,g));try{await Promise.all(n)}catch{const g=await Promise.allSettled(n);for(const v of g){if(v.status!=="rejected")continue;const C=v.reason;if(vr(C))throw C;Xn(C)?c??=C:u??=C}if(u!==void 0)throw u}const f=c??(r&&!t.preload?r:void 0);let h=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const g=Z4(t,f);g===void 0&&Us();const v=t.matches[g],C=t.router.looseRoutesById[v.routeId],b=t.router.options?.defaultNotFoundComponent;!C.options.notFoundComponent&&b&&(C.options.notFoundComponent=b),f.routeId=v.routeId;const E=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,x=>({...x,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=g,await eh(C,["notFoundComponent"])}else if(!t.preload){const g=t.matches[0];g.globalNotFound||t.router.getMatch(g.id)?.globalNotFound&&t.updateMatch(g.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const g=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await eh(g,["errorComponent"])}for(let g=0;g<=h;g++){const{id:v,routeId:C}=t.matches[g],b=t.router.looseRoutesById[C];try{const E=M0e(t,v,b);if(E){const x=await E;t.updateMatch(v,I=>({...I,...x}))}}catch(E){console.error(`Error executing head for route ${C}:`,E)}}const m=hI(t);if(Xf(m)&&await m,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function J4(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function eh(e,t=qg){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:o,...s}=r.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===qg?(()=>{if(e._componentsPromise===void 0){const r=J4(e,qg);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():J4(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function rj(e){for(const t of qg)if(e.options[t]?.preload)return!0;return!1}const qg=["component","errorComponent","pendingComponent","notFoundComponent"];var Wi="__TSR_index",eU="popstate",tU="beforeunload";function N0e(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:a}))},o=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},s=async({task:a,navigateOpts:c,...u})=>{if(c?.ignoreBlocker??!1){a();return}const f=e.getBlockers?.()??[],h=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const m of f){const g=wv(u.path,u.state);if(await m.blockerFn({currentLocation:t,nextLocation:g,action:u.type})){e.onBlocked?.();return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,c,u)=>{const f=t.state[Wi];c=nU(f+1,c),s({task:()=>{e.pushState(a,c),r({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:a,state:c})},replace:(a,c,u)=>{const f=t.state[Wi];c=nU(f,c),s({task:()=>{e.replaceState(a,c),r({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:a,state:c})},go:(a,c)=>{s({task:()=>{e.go(a),o({type:"GO",index:a})},navigateOpts:c,type:"GO"})},back:a=>{s({task:()=>{e.back(a?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{s({task:()=>{e.forward(a?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[Wi]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,a]),()=>{const u=e.getBlockers?.()??[];e.setBlockers?.(u.filter(f=>f!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function nU(e,t){t||(t={});const n=fT();return{...t,key:n,__TSR_key:n,[Wi]:e}}function k0e(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,a=L=>o=L,c=(L=>L),u=(()=>wv(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const L=fT();t.history.replaceState({[Wi]:0,key:L,__TSR_key:L},"")}let f=u(),h,m=!1,g=!1,v=!1,C=!1;const b=()=>f;let E,x;const I=()=>{E&&(T._ignoreSubscribers=!0,(E.isPush?t.history.pushState:t.history.replaceState)(E.state,"",E.href),T._ignoreSubscribers=!1,E=void 0,x=void 0,h=void 0)},R=(L,$,G)=>{const z=c($);x||(h=f),f=wv($,G),E={href:z,state:G,isPush:E?.isPush||L==="push"},x||(x=Promise.resolve().then(()=>I()))},M=L=>{f=u(),T.notify({type:L})},D=async()=>{if(g){g=!1;return}const L=u(),$=L.state[Wi]-f.state[Wi],G=$===1,z=$===-1,F=!G&&!z||m;m=!1;const q=F?"GO":z?"BACK":"FORWARD",X=F?{type:"GO",index:$}:{type:z?"BACK":"FORWARD"};if(v)v=!1;else{const Se=s();if(typeof document<"u"&&Se.length){for(const V of Se)if(await V.blockerFn({currentLocation:f,nextLocation:L,action:q})){g=!0,t.history.go(1),T.notify(X);return}}}f=u(),T.notify(X)},N=L=>{if(C){C=!1;return}let $=!1;const G=s();if(typeof document<"u"&&G.length)for(const z of G){const F=z.enableBeforeUnload??!0;if(F===!0){$=!0;break}if(typeof F=="function"&&F()===!0){$=!0;break}}if($)return L.preventDefault(),L.returnValue=""},T=N0e({getLocation:b,getLength:()=>t.history.length,pushState:(L,$)=>R("push",L,$),replaceState:(L,$)=>R("replace",L,$),back:L=>(L&&(v=!0),C=!0,t.history.back()),forward:L=>{L&&(v=!0),C=!0,t.history.forward()},go:L=>{m=!0,t.history.go(L)},createHref:L=>c(L),flush:I,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(tU,N,{capture:!0}),t.removeEventListener(eU,D)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(tU,N,{capture:!0}),t.addEventListener(eU,D),t.history.pushState=function(...L){const $=n.apply(t.history,L);return T._ignoreSubscribers||M("PUSH"),$},t.history.replaceState=function(...L){const $=r.apply(t.history,L);return T._ignoreSubscribers||M("REPLACE"),$},T}function D0e(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function wv(e,t){const n=D0e(e),r=n.indexOf("#"),o=n.indexOf("?"),s=fT();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:t||{[Wi]:0,key:s,__TSR_key:s}}}function fT(){return(Math.random()+1).toString(36).substring(7)}function Qc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var L0e=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=u0e(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=k0e()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let h;this.resolvePathCache=Jf(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=I0e(F0e(this.latestLocation),h),v0e(this)}let c=!1;const u=this.options.basepath??"/",f=this.options.rewrite;if(s||o!==u||a!==f){this.basepath=u;const h=[],m=Q7(u);m&&m!=="/"&&h.push(_0e({basepath:u})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:x0e(h),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=o0e(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&Jbe(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({pathname:u,search:f,hash:h,href:m,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){const x=this.options.parseSearch(f),I=this.options.stringifySearch(x);return{href:u+I+h,publicHref:u+I+h,pathname:Jd(u).path,external:!1,searchStr:I,search:ka(r?.search,x),hash:Jd(h.slice(1)).path,state:ja(r?.state,g)}}const v=new URL(m,this.origin),C=fI(this.rewrite,v),b=this.options.parseSearch(C.search),E=this.options.stringifySearch(b);return C.search=E,{href:C.href.replace(C.origin,""),publicHref:m,pathname:Jd(C.pathname).path,external:!!this.rewrite&&C.origin!==this.origin,searchStr:E,search:ka(r?.search,b),hash:Jd(C.hash.slice(1)).path,state:ja(r?.state,g)}},s=o(n),{__tempLocation:a,__tempKey:c}=s.state;if(a&&(!c||c===this.tempLocationKey)){const u=o(a);return u.state.key=s.state.key,u.state.__TSR_key=s.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>c0e({base:n,to:r.includes("//")?dT(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>$0e({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{const a=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(a);s.from;const u=s.unsafeRelative==="path"?a.pathname:s.from??c.fullPath,f=s.to?`${s.to}`:void 0,h=c.search,m=Object.assign(Object.create(null),c.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(u,"."),v=f?this.resolvePathWithBase(g,f):g,C=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?m:Object.assign(m,za(s.params,m)),b=this.routesByPath[Ds(v)];let E;if(b)E=this.getRouteBranch(b);else if(v.includes("$"))E=[];else{const z=this.getMatchedRoutes(v);E=z.matchedRoutes,this.options.notFoundRoute&&(!z.foundRoute||z.foundRoute.path!=="/"&&z.routeParams["**"])&&(E=[...E,this.options.notFoundRoute])}if(E.length&&V7(C))for(const z of E){const F=z.options.params?.stringify??z.options.stringifyParams;if(F)try{Object.assign(C,F(C))}catch{}}const x=n.leaveParams?v:Jd(V4({path:v,params:C,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let I=h;if(n._includeValidateSearch&&this.options.search?.strict){const z={};E.forEach(F=>{if(F.options.validateSearch)try{Object.assign(z,Vg(F.options.validateSearch,{...z,...I}))}catch{}}),I=z}I=z0e({search:I,dest:s,destRoutes:E,_includeValidateSearch:n._includeValidateSearch}),I=ka(h,I);const R=this.options.stringifySearch(I),M=s.hash===!0?a.hash:s.hash?za(s.hash,a.hash):void 0,D=M?`#${M}`:"";let N=s.state===!0?a.state:s.state?za(s.state,a.state):{};N=ja(a.state,N);const T=`${x}${R}${D}`;let L,$,G=!1;if(this.rewrite){const z=new URL(T,this.origin),F=J7(this.rewrite,z);L=z.href.replace(z.origin,""),F.origin!==this.origin?($=F.href,G=!0):$=F.pathname+F.search+F.hash}else L=Ybe(T),$=L;return{publicHref:$,href:L,pathname:x,search:I,searchStr:R,state:N,hash:M??"",external:G,unmaskOnReload:s.unmaskOnReload}},o=(s={},a)=>{const c=r(s);let u=a?r(a):void 0;if(!u){const f=Object.create(null);if(this.options.routeMasks){const h=e0e(c.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:m,params:g,...v}=h.route,C=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,za(g,f));a={from:n.from,...v,params:C},u=r(a)}}}return u&&(c.maskedLocation=u),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{let s;const a=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(m=>{o.state[m]=this.latestLocation.state[m]});const h=Ka(o.state,this.latestLocation.state);return f.forEach(m=>{delete o.state[m]}),h},c=Ds(this.latestLocation.href)===Ds(o.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=cu(()=>{u?.resolve(),u=void 0}),c&&a())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...m}=o;f&&(m={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,s=o.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this._scroll.next=o.resetScroll??!0,this.history.subscribers.size||this.load(s?{action:{type:s}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:a,href:c,...u}={})=>{if(c){const m=this.history.location.state.__TSR_index,g=wv(c,{__TSR_index:n?m:m+1}),v=new URL(g.pathname,this.origin);u.to=fI(this.rewrite,v).pathname,u.search=this.options.parseSearch(g.search),u.hash=g.hash.slice(1)}const f=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...a})=>{let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!r&&(r=!0),r){if(n!==void 0||!o){const f=this.buildLocation({to:n,...a});o=o??f.publicHref,s=s??f.publicHref}const u=!c&&s?s:o;if(Sv(u,this.protocolAllowlist))return;if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const h of f)if(h?.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(u):window.location.href=u;return}return this.buildAndCommitLocation({...a,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(o=>!n.some(s=>s.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{const r=n?.action?.type;let o,s,a;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad(),r&&(this._scroll.hash=r==="PUSH"||r==="REPLACE");const h=this.latestLocation,m=Qc(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await X4({router:this,sync:n?.sync,forceStaleReload:c.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,v=null,C=null,b=null;this.batch(()=>{const E=this.stores.pendingMatches.get(),x=E.length,I=this.stores.matches.get();g=x?I.filter(D=>!this.stores.pendingMatchStores.has(D.id)):null;const R=new Set;for(const D of this.stores.pendingMatchStores.values())D.routeId&&R.add(D.routeId);const M=new Set;for(const D of this.stores.matchStores.values())D.routeId&&M.add(D.routeId);v=x?I.filter(D=>!R.has(D.routeId)):null,C=x?E.filter(D=>!M.has(D.routeId)):null,b=x?E.filter(D=>M.has(D.routeId)):I,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),x&&(this.stores.setMatches(E),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(D=>D.status!=="error"&&D.status!=="notFound"&&D.status!=="redirected")]),this.clearExpiredCache())});for(const[E,x]of[[v,"onLeave"],[C,"onEnter"],[b,"onStay"]])if(E)for(const I of E)this.looseRoutesById[I.routeId].options[x]?.(I)})})}})}catch(h){vr(h)?(o=h,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):Xn(h)&&(s=h);const m=o?o.status:s?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(o)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(f=>f.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,a=this.stores.resolvedLocation.get(),c=typeof r.types=="function"?r.types(Qc(s,a)):r.types;if(c===!1){n();return}o={update:n,types:c}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(n);if(o){o.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const c=r(a.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(u=>u.filter(f=>f!==n)):a.set(c)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(o);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const s=o.pathname+o.search+o.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Sv(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!r(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=o=>{const s=this.looseRoutesById[o.routeId];if(!s.options.loader)return!0;const a=(o.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=eh,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...s,...this.stores.cachedIds.get()]),c=o.filter(u=>!a.has(u.id));if(c.length){const u=this.stores.cachedMatches.get();this.stores.setCached([...u,...c])}try{return o=await X4({router:this,matches:o,location:r,preload:!0,updateMatch:(u,f)=>{s.has(u)?o=o.map(h=>h.id===u?f(h):h):this.updateMatch(u,f)}}),o}catch(u){if(vr(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});Xn(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(o);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const a=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=t0e(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!c||n.params&&!Ka(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ka(a.search,s.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??C0e,parseSearch:e.parseSearch??S0e,protocolAllowlist:e.protocolAllowlist??Zbe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=Z7(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:o}=n;let{matchedRoutes:s}=n,a=!1;(r?r.path!=="/"&&o["**"]:Ds(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:a=!0);const c=a?B0e(this.options.notFoundMode,s):void 0,u=new Array(s.length),f=new Map;for(const h of this.stores.matchStores.values())h.routeId&&f.set(h.routeId,h.get());for(let h=0;h<s.length;h++){const m=s[h],g=u[h-1];let v,C,b;{const F=g?.search??e.search,q=g?._strictSearch??void 0;try{const X=Vg(m.options.validateSearch,{...F})??void 0;v={...F,...X},C={...q,...X},b=void 0}catch(X){let Se=X;if(X instanceof Ev||(Se=new Ev(X.message,{cause:X})),t?.throwOnError)throw Se;v=F,C={},b=Se}}const E=m.options.loaderDeps?.({search:v})??"",x=E?JSON.stringify(E):"",{interpolatedPath:I,usedParams:R}=V4({path:m.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),M=m.id+I+x,D=this.getMatch(M),N=f.get(m.id),T=D?._strictParams??R;let L;if(!D)try{rU(m,T)}catch(F){if(Xn(F)||vr(F)?L=F:L=new U0e(F.message,{cause:F}),t?.throwOnError)throw L}Object.assign(o,T);const $=N?"stay":"enter";let G;if(D)G={...D,cause:$,params:N?.params??o,_strictParams:T,search:ka(N?N.search:D.search,v),_strictSearch:C};else{const F=m.options.loader||m.options.beforeLoad||m.lazyFn||rj(m)?"pending":"success";G={id:M,ssr:m.options.ssr,index:h,routeId:m.id,params:N?.params??o,_strictParams:T,pathname:I,updatedAt:Date.now(),search:N?ka(N.search,v):v,_strictSearch:C,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:cu()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:$,loaderDeps:N?ja(N.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t?.preload||(G.globalNotFound=c===m.id),G.searchError=b;const z=this.getParentContext(g);G.context={...z,...G.__routeContext,...G.__beforeLoadContext},u[h]=G}for(let h=0;h<u.length;h++){const m=u[h],g=this.looseRoutesById[m.routeId],v=this.getMatch(m.id),C=f.get(m.routeId);if(m.params=C?ka(C.params,o):o,!v){const b=u[h-1],E=this.getParentContext(b);if(g.options.context){const x={deps:m.loaderDeps,params:m.params,context:E??{},location:e,navigate:I=>this.navigate({...I,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:g.id};m.__routeContext=g.options.context(x)??void 0}m.context={...E,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(e){const t=Qf(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];const{matchedRoutes:r,routeParams:o}=this.getMatchedRoutes(e.pathname),s=Qf(r),a={...e.search};for(const m of r)try{Object.assign(a,Vg(m.options.validateSearch,a))}catch{}const c=t&&this.stores.matchStores.get(t)?.get(),u=c&&c.routeId===s.id&&c.pathname===e.pathname;let f;if(u)f=c.params;else{const m=Object.assign(Object.create(null),o);for(const g of r)try{rU(g,m)}catch{}f=m}const h={matchedRoutes:r,fullPath:s.fullPath,search:a,params:f};return this.lightweightCache.set(e,[t,h]),h}},Ev=class extends Error{},U0e=class extends Error{};function F0e(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Vg(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Ev("Async validation not supported");if(n.issues)throw new Ev(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function $0e({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),o=Ds(e);let s;const a=n0e(o,n,!0);return a&&(s=a.route,Object.assign(r,a.rawParams)),{matchedRoutes:a?.branch||[t.__root__],routeParams:r,foundRoute:s}}function z0e({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return j0e(n)(e,t,r??!1)}function j0e(e){let t,n;const r=[];for(const s of e){const a=s.options;if("search"in a)a.search?.middlewares&&r.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){const u=({search:f,next:h})=>{const m=h(a.preSearchFilters?a.preSearchFilters.reduce((g,v)=>v(g),f):f);return a.postSearchFilters?a.postSearchFilters.reduce((g,v)=>v(g),m):m};r.push(u)}const c=a.validateSearch;if(c){const u=({search:f,next:h,meta:m})=>{const g=h(f);if(n)try{const v=Vg(c,g);if(m&&v)for(const C in v)C in g||(m.defaulted||=new Map).set(C,v[C]);return{...g,...v}}catch{}return g};r.push(u)}}const o=(s,a,c)=>{if(s>=r.length){if(!t.search)return{};if(t.search===!0)return a;const f=za(t.search,a);return c&&(c.explicit=f),f}const u=(f,h)=>{if(h){const m=c||{};return{search:o(s+1,f,m),meta:m}}return o(s+1,f,c)};return r[s]({search:a,next:u,meta:c})};return function(a,c,u){return t=c,n=u,o(0,a)}}function B0e(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return Za}function rU(e,t){const n=e.options.params?.parse??e.options.parseParams;if(n){const r=n(t);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,r)}}const H0e="Error preloading route! ☝️";var oj=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Za:this.parentRoute||Us();let o=r?Za:n?.path;o&&o!=="/"&&(o=Y7(o));const s=n?.id||o;let a=r?Za:Bg([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);o==="__root__"&&(o="/"),a!=="__root__"&&(a=Bg(["/",a]));const c=a==="__root__"?"/":Bg([this.parentRoute.fullPath,o]);this._path=o,this._id=a,this._fullPath=c,this._to=Ds(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>_l({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},q0e=class extends oj{constructor(e){super(e)}};function hT(e){const t=e.errorComponent??pT;return O.jsx(V0e,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var V0e=class extends _.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function pT({error:e}){const[t,n]=_.useState(!1);return O.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[O.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[O.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),O.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),O.jsx("div",{style:{height:".25rem"}}),t?O.jsx("div",{children:O.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?O.jsx("code",{children:e.message}):null})}):null]})}function W0e({children:e,fallback:t=null}){return sj()?O.jsx(B.Fragment,{children:e}):O.jsx(B.Fragment,{children:t})}function sj(){return B.useSyncExternalStore(G0e,()=>!0,()=>!1)}function G0e(){return()=>{}}var ij=_.createContext(null);function _r(e){return _.useContext(ij)}var lb=_.createContext(void 0),K0e=_.createContext(void 0),Xt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Xt||{});function Z0e({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:a,shallowPropagate:c};function r(f,h,m){const g=h.depsTail;if(g!==void 0&&g.dep===f)return;const v=g!==void 0?g.nextDep:h.deps;if(v!==void 0&&v.dep===f){v.version=m,h.depsTail=v;return}const C=f.subsTail;if(C!==void 0&&C.version===m&&C.sub===h)return;const b=h.depsTail=f.subsTail={version:m,dep:f,sub:h,prevDep:g,nextDep:v,prevSub:C,nextSub:void 0};v!==void 0&&(v.prevDep=b),g!==void 0?g.nextDep=b:h.deps=b,C!==void 0?C.nextSub=b:f.subs=b}function o(f,h=f.sub){const m=f.dep,g=f.prevDep,v=f.nextDep,C=f.nextSub,b=f.prevSub;return v!==void 0?v.prevDep=g:h.depsTail=g,g!==void 0?g.nextDep=v:h.deps=v,C!==void 0?C.prevSub=b:m.subsTail=b,b!==void 0?b.nextSub=C:(m.subs=C)===void 0&&n(m),v}function s(f){let h=f.nextSub,m;e:do{const g=f.sub;let v=g.flags;if(v&60?v&12?v&4?!(v&48)&&u(f,g)?(g.flags=v|40,v&=1):v=0:g.flags=v&-9|32:v=0:g.flags=v|32,v&2&&t(g),v&1){const C=g.subs;if(C!==void 0){const b=(f=C).nextSub;b!==void 0&&(m={value:h,prev:m},h=b);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;m!==void 0;)if(f=m.value,m=m.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let m,g=0,v=!1;e:do{const C=f.dep,b=C.flags;if(h.flags&16)v=!0;else if((b&17)===17){if(e(C)){const E=C.subs;E.nextSub!==void 0&&c(E),v=!0}}else if((b&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(m={value:f,prev:m}),f=C.deps,h=C,++g;continue}if(!v){const E=f.nextDep;if(E!==void 0){f=E;continue}}for(;g--;){const E=h.subs,x=E.nextSub!==void 0;if(x?(f=m.value,m=m.prev):f=E,v){if(e(h)){x&&c(E),h=f.sub;continue}v=!1}else h.flags&=-33;h=f.sub;const I=f.nextDep;if(I!==void 0){f=I;continue e}}return v}while(!0)}function c(f){do{const h=f.sub,m=h.flags;(m&48)===32&&(h.flags=m|16,(m&6)===2&&t(h))}while((f=f.nextSub)!==void 0)}function u(f,h){let m=h.depsTail;for(;m!==void 0;){if(m===f)return!0;m=m.prevDep}return!1}}function Y0e(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}const pI=[];let Wg=0;const{link:oU,unlink:Q0e,propagate:X0e,checkDirty:aj,shallowPropagate:sU}=Z0e({update(e){return e._update()},notify(e){pI[mI++]=e,e.flags&=~Xt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Xt.Mutable|Xt.Dirty,xv(e))}});let Bm=0,mI=0,Bo,gI=0;function lj(e){try{++gI,e()}finally{--gI||cj()}}function xv(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Q0e(n,e)}function cj(){if(!(gI>0)){for(;Bm<mI;){const e=pI[Bm];pI[Bm++]=void 0,e.notify()}Bm=0,mI=0}}function iU(e,t){const n=typeof e=="function",r=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Xt.None:Xt.Mutable,get(){return Bo!==void 0&&oU(o,Bo,Wg),o._snapshot},subscribe(s){const a=Y0e(s),c={current:!1},u=J0e(()=>{o.get(),c.current?a.next?.(o._snapshot):c.current=!0});return{unsubscribe:()=>{u.stop()}}},_update(s){const a=Bo,c=t?.compare??Object.is;if(n)Bo=o,++Wg,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=Xt.Mutable|Xt.RecursedCheck);try{const u=o._snapshot,f=typeof s=="function"?s(u):s===void 0&&n?r(u):s;return u===void 0||!c(u,f)?(o._snapshot=f,!0):!1}finally{Bo=a,n&&(o.flags&=~Xt.RecursedCheck),xv(o)}}};return n?(o.flags=Xt.Mutable|Xt.Dirty,o.get=function(){const s=o.flags;if(s&Xt.Dirty||s&Xt.Pending&&aj(o.deps,o)){if(o._update()){const a=o.subs;a!==void 0&&sU(a)}}else s&Xt.Pending&&(o.flags=s&~Xt.Pending);return Bo!==void 0&&oU(o,Bo,Wg),o._snapshot}):o.set=function(s){if(o._update(s)){const a=o.subs;a!==void 0&&(X0e(a),sU(a),cj())}},o}function J0e(e){const t=()=>{const r=Bo;Bo=n,++Wg,n.depsTail=void 0,n.flags=Xt.Watching|Xt.RecursedCheck;try{return e()}finally{Bo=r,n.flags&=~Xt.RecursedCheck,xv(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Xt.Watching|Xt.RecursedCheck,notify(){const r=this.flags;r&Xt.Dirty||r&Xt.Pending&&aj(this.deps,this)?t():this.flags=Xt.Watching},stop(){this.flags=Xt.None,this.depsTail=void 0,xv(this)}};return t(),n}function eSe(e,t){return e===t}function Er(e,t,n=eSe){const r=_.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(a);return c},[e]),o=_.useCallback(()=>e?.get(),[e]);return a9.useSyncExternalStoreWithSelector(r,o,o,t,n)}var Rx={get(){},subscribe(){return{unsubscribe(){}}}};function tSe(e,t){const n=_.useRef();return r=>{const o=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=ja(n.current,o):o}}function Il(e){const t=_r(),n=_.useContext(e.from?K0e:lb),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),o=tSe(e,t),s=Er(r??Rx,a=>a?o(a):Rx);if(s!==Rx)return s;(e.shouldThrow??!0)&&Us()}function uj(e){return Il({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function dj(e){const{select:t,...n}=e;return Il({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function fj(e){return Il({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function cb(e){return Il({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function kh(e){const t=_r();return _.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function m9e(e){const t=_r(),n=kh(),r=_.useRef(null);return zc(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function hj(e){return Il({...e,select:t=>e.select?e.select(t.context):t.context})}function nSe(e,t){const n=_r(),r=Hbe(t),{activeProps:o,inactiveProps:s,activeOptions:a,to:c,preload:u,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:m,replace:g,startTransition:v,resetScroll:C,viewTransition:b,children:E,target:x,disabled:I,style:R,className:M,onClick:D,onBlur:N,onFocus:T,onMouseEnter:L,onMouseLeave:$,onTouchStart:G,ignoreBlocker:z,params:F,search:q,hash:X,state:Se,mask:V,reloadDocument:ee,unsafeRelative:pe,from:ge,_fromLocation:Te,...j}=e,te=sj(),fe=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ae=Er(n.stores.location,zt=>zt,(zt,Un)=>zt.href===Un.href),be=_.useMemo(()=>{const zt={_fromLocation:ae,...fe};return n.buildLocation(zt)},[n,ae,fe]),Fe=be.maskedLocation?be.maskedLocation.publicHref:be.publicHref,ke=be.maskedLocation?be.maskedLocation.external:be.external,le=_.useMemo(()=>lSe(Fe,ke,n.history,I),[I,ke,Fe,n.history]),Re=_.useMemo(()=>{if(le?.external)return Sv(le.href,n.protocolAllowlist)?void 0:le.href;if(!cSe(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),Sv(c,n.protocolAllowlist)?void 0:c}catch{}},[c,le,n.protocolAllowlist]),rt=_.useMemo(()=>{if(Re)return!1;if(a?.exact){if(!l0e(ae.pathname,be.pathname,n.basepath))return!1}else{const zt=Cv(ae.pathname,n.basepath),Un=Cv(be.pathname,n.basepath);if(!(zt.startsWith(Un)&&(zt.length===Un.length||zt[Un.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Ka(ae.search,be.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?te&&ae.hash===be.hash:!0},[a?.exact,a?.explicitUndefined,a?.includeHash,a?.includeSearch,ae,Re,te,be.hash,be.pathname,be.search,n.basepath]),xe=rt?za(o,{})??rSe:Tx,xt=rt?Tx:za(s,{})??Tx,_t=[M,xe.className,xt.className].filter(Boolean).join(" "),ot=(R||xe.style||xt.style)&&{...R,...xe.style,...xt.style},[En,st]=_.useState(!1),ti=_.useRef(!1),os=e.reloadDocument||Re?!1:u??n.options.defaultPreload,ha=f??n.options.defaultPreloadDelay??0,ho=_.useCallback(()=>{n.preloadRoute({...fe,_builtLocation:be}).catch(zt=>{console.warn(zt),console.warn(H0e)})},[n,fe,be]);Bbe(r,_.useCallback(zt=>{zt?.isIntersecting&&ho()},[ho]),aSe,{disabled:!!I||os!=="viewport"}),_.useEffect(()=>{ti.current||!I&&os==="render"&&(ho(),ti.current=!0)},[I,ho,os]);const Wu=zt=>{const Un=zt.currentTarget.getAttribute("target"),Po=x!==void 0?x:Un;if(!I&&!uSe(zt)&&!zt.defaultPrevented&&(!Po||Po==="_self")&&zt.button===0){zt.preventDefault(),voe.flushSync(()=>{st(!0)});const Nl=n.subscribe("onResolved",()=>{Nl(),st(!1)});n.navigate({...fe,replace:g,resetScroll:C,hashScrollIntoView:m,startTransition:v,viewTransition:b,ignoreBlocker:z})}};if(Re)return{...j,ref:r,href:Re,...E&&{children:E},...x&&{target:x},...I&&{disabled:I},...R&&{style:R},...M&&{className:M},...D&&{onClick:D},...N&&{onBlur:N},...T&&{onFocus:T},...L&&{onMouseEnter:L},...$&&{onMouseLeave:$},...G&&{onTouchStart:G}};const Qh=zt=>{if(I||os!=="intent")return;if(!ha){ho();return}const Un=zt.currentTarget;if(tf.has(Un))return;const Po=setTimeout(()=>{tf.delete(Un),ho()},ha);tf.set(Un,Po)},c0=zt=>{I||os!=="intent"||ho()},Gn=zt=>{if(I||!os||!ha)return;const Un=zt.currentTarget,Po=tf.get(Un);Po&&(clearTimeout(Po),tf.delete(Un))};return{...j,...xe,...xt,href:le?.href,ref:r,onClick:xc([D,Wu]),onBlur:xc([N,Gn]),onFocus:xc([T,Qh]),onMouseEnter:xc([L,Qh]),onMouseLeave:xc([$,Gn]),onTouchStart:xc([G,c0]),disabled:!!I,target:x,...ot&&{style:ot},..._t&&{className:_t},...I&&oSe,...rt&&sSe,...te&&En&&iSe}}var Tx={},rSe={className:"active"},oSe={role:"link","aria-disabled":!0},sSe={"data-status":"active","aria-current":"page"},iSe={"data-transitioning":"transitioning"},tf=new WeakMap,aSe={rootMargin:"100px"},xc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function lSe(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function cSe(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function g9e(e){return _.forwardRef(function(n,r){return O.jsx(mT,{...n,_asChild:e,ref:r})})}var mT=_.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=nSe(r,t),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:c,...u}=s;return _.createElement("a",u,a)}return _.createElement(n,s,a)});function uSe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var dSe=class extends oj{constructor(t){super(t),this.useMatch=n=>Il({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>hj({...n,from:this.id}),this.useSearch=n=>cb({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>fj({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>dj({...n,from:this.id}),this.useLoaderData=n=>uj({...n,from:this.id}),this.useNavigate=()=>kh({from:this.fullPath}),this.Link=B.forwardRef((n,r)=>O.jsx(mT,{ref:r,from:this.fullPath,...n}))}};function fSe(e){return new dSe(e)}function hSe(){return e=>mSe(e)}var pSe=class extends q0e{constructor(e){super(e),this.useMatch=t=>Il({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>hj({...t,from:this.id}),this.useSearch=t=>cb({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>fj({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>dj({...t,from:this.id}),this.useLoaderData=t=>uj({...t,from:this.id}),this.useNavigate=()=>kh({from:this.fullPath}),this.Link=B.forwardRef((t,n)=>O.jsx(mT,{ref:n,from:this.fullPath,...t}))}};function mSe(e){return new pSe(e)}function _e(e){return new gSe(e,{silent:!0}).createRoute}var gSe=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=fSe(n);return r.isRoot=!1,r},this.silent=t?.silent}};function Me(e,t){let n,r,o,s;const a=()=>(n||(n=e().then(u=>{n=void 0,r=u[t??"default"]}).catch(u=>{if(o=u,Wbe(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),s=!0)}})),n),c=function(f){if(s)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if(F4)F4(a());else throw a();return _.createElement(r,f)};return c.preload=a,c}function vSe(e){const t=_r(),n=`not-found-${Er(t.stores.location,r=>r.pathname)}-${Er(t.stores.status,r=>r)}`;return O.jsx(hT,{getResetKey:()=>n,onCatch:(r,o)=>{if(Xn(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Xn(r))return e.fallback?.(r);throw r},children:e.children})}function ySe(){return O.jsx("p",{children:"Not Found"})}function Dc(e){return O.jsx(O.Fragment,{children:e.children})}function pj(e,t,n){return t.options.notFoundComponent?O.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?O.jsx(e.options.defaultNotFoundComponent,{...n}):O.jsx(ySe,{})}function bSe(e){return null}function SSe(){return bSe(_r()),null}var CSe=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,wSe=(e,t)=>e[0]===t[0]&&e[1]===t[1],mj=_.memo(function({matchId:t}){const n=_r(),r=n.stores.matchStores.get(t);r||Us();const o=Er(n.stores.loadedAt,a=>a),s=Er(r,a=>a,CSe);return O.jsx(ESe,{router:n,matchId:t,resetKey:o,matchState:_.useMemo(()=>{const a=s.routeId,c=n.routesById[a].parentRoute?.id;return{routeId:a,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:c}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function ESe({router:e,matchId:t,resetKey:n,matchState:r}){const o=e.routesById[r.routeId],s=o.options.pendingComponent??e.options.defaultPendingComponent,a=s?O.jsx(s,{}):null,c=o.options.errorComponent??e.options.defaultErrorComponent,u=o.options.onCatch??e.options.defaultOnCatch,f=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",m=(!o.isRoot||o.options.wrapInSuspense||h)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||h))?_.Suspense:Dc,g=c?hT:Dc,v=f?vSe:Dc;return O.jsxs(o.isRoot?o.options.shellComponent??Dc:Dc,{children:[O.jsx(lb.Provider,{value:t,children:O.jsx(m,{fallback:a,children:O.jsx(g,{getResetKey:()=>n,errorComponent:c||pT,onCatch:(C,b)=>{if(Xn(C))throw C.routeId??=r.routeId,C;u?.(C,b)},children:O.jsx(v,{fallback:C=>{if(C.routeId??=r.routeId,!f||C.routeId&&C.routeId!==r.routeId||!C.routeId&&!o.isRoot)throw C;return _.createElement(f,C)},children:h||r._displayPending?O.jsx(W0e,{fallback:a,children:O.jsx(aU,{matchId:t})}):O.jsx(aU,{matchId:t})})})})}),r.parentRouteId===Za?O.jsxs(O.Fragment,{children:[O.jsx(xSe,{}),e.options.scrollRestoration&&H7?O.jsx(SSe,{}):null]}):null]})}function xSe(){const e=_r(),t=_.useRef();return zc(()=>{const n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:"onRendered",...Qc(e.stores.location.get(),r??n)}),t.current=n},[Er(e.stores.resolvedLocation,n=>n?.state.__TSR_key),e]),null}var aU=_.memo(function({matchId:t}){const n=_r(),r=(h,m)=>n.getMatch(h.id)?._nonReactive[m]??h._nonReactive[m],o=n.stores.matchStores.get(t);o||Us();const s=Er(o,h=>h),a=s.routeId,c=n.routesById[a],u=_.useMemo(()=>{const h=(n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:a,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return h?JSON.stringify(h):void 0},[a,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=_.useMemo(()=>{const h=c.options.component??n.options.defaultComponent;return h?O.jsx(h,{},u):O.jsx(gj,{})},[u,c.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const h=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const m=n.getMatch(s.id);if(m&&!m._nonReactive.minPendingPromise){const g=cu();m._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),m._nonReactive.minPendingPromise=void 0},h)}}throw r(s,"loadPromise")}if(s.status==="notFound")return Xn(s.error)||Us(),pj(n,c,s.error);if(s.status==="redirected")throw vr(s.error)||Us(),r(s,"loadPromise");if(s.status==="error")throw s.error;return f}),gj=_.memo(function(){const t=_r(),n=_.useContext(lb);let r,o=!1,s;{const f=n?t.stores.matchStores.get(n):void 0;[r,o]=Er(f,h=>[h?.routeId,h?.globalNotFound??!1],wSe),s=Er(t.stores.matchesId,h=>h[h.findIndex(m=>m===n)+1])}const a=r?t.routesById[r]:void 0,c=t.options.defaultPendingComponent?O.jsx(t.options.defaultPendingComponent,{}):null;if(o)return a||Us(),pj(t,a,void 0);if(!s)return null;const u=O.jsx(mj,{matchId:s});return r===Za?O.jsx(_.Suspense,{fallback:c,children:u}):u});function _Se(){const e=_r(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),o=Er(e.stores.isLoading,m=>m),s=Er(e.stores.hasPending,m=>m),a=Cx(o),c=o||n||s,u=Cx(c),f=o||s,h=Cx(f);return e.startTransition=m=>{r(!0),_.startTransition(()=>{m(),r(!1)})},_.useEffect(()=>{const m=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ds(e.latestLocation.publicHref)!==Ds(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{m()}},[e,e.history]),zc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),zc(()=>{a&&!o&&e.emit({type:"onLoad",...Qc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,o]),zc(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...Qc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),zc(()=>{if(u&&!c){const m=Qc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),lj(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())})}},[c,u,e]),null}function ISe(){const e=_r(),t=e.routesById[Za].options.pendingComponent??e.options.defaultPendingComponent,n=t?O.jsx(t,{}):null,r=O.jsxs(typeof document<"u"&&e.ssr?Dc:_.Suspense,{fallback:n,children:[O.jsx(_Se,{}),O.jsx(ASe,{})]});return e.options.InnerWrap?O.jsx(e.options.InnerWrap,{children:r}):r}function ASe(){const e=_r(),t=Er(e.stores.firstId,o=>o),n=Er(e.stores.loadedAt,o=>o),r=t?O.jsx(mj,{matchId:t}):null;return O.jsx(lb.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:O.jsx(hT,{getResetKey:()=>n,errorComponent:pT,onCatch:void 0,children:r})})}var RSe=e=>({createMutableStore:iU,createReadonlyStore:iU,batch:lj}),TSe=e=>new OSe(e),OSe=class extends L0e{constructor(e){super(e,RSe)}};function MSe({router:e,children:t,...n}){V7(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=O.jsx(ij.Provider,{value:e,children:t});return e.options.Wrap?O.jsx(e.options.Wrap,{children:r}):r}function PSe({router:e,...t}){return O.jsx(MSe,{router:e,...t,children:O.jsx(ISe,{})})}var Ox={exports:{}},nf={},Mx={exports:{}},Px={};var lU;function NSe(){return lU||(lU=1,(function(e){function t(V,ee){var pe=V.length;V.push(ee);e:for(;0<pe;){var ge=pe-1>>>1,Te=V[ge];if(0<o(Te,ee))V[ge]=ee,V[pe]=Te,pe=ge;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var ee=V[0],pe=V.pop();if(pe!==ee){V[0]=pe;e:for(var ge=0,Te=V.length,j=Te>>>1;ge<j;){var te=2*(ge+1)-1,fe=V[te],ae=te+1,be=V[ae];if(0>o(fe,pe))ae<Te&&0>o(be,fe)?(V[ge]=be,V[ae]=pe,ge=ae):(V[ge]=fe,V[te]=pe,ge=te);else if(ae<Te&&0>o(be,pe))V[ge]=be,V[ae]=pe,ge=ae;else break e}}return ee}function o(V,ee){var pe=V.sortIndex-ee.sortIndex;return pe!==0?pe:V.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var u=[],f=[],h=1,m=null,g=3,v=!1,C=!1,b=!1,E=!1,x=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function M(V){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=V)r(f),ee.sortIndex=ee.expirationTime,t(u,ee);else break;ee=n(f)}}function D(V){if(b=!1,M(V),!C)if(n(u)!==null)C=!0,N||(N=!0,F());else{var ee=n(f);ee!==null&&Se(D,ee.startTime-V)}}var N=!1,T=-1,L=5,$=-1;function G(){return E?!0:!(e.unstable_now()-$<L)}function z(){if(E=!1,N){var V=e.unstable_now();$=V;var ee=!0;try{e:{C=!1,b&&(b=!1,I(T),T=-1),v=!0;var pe=g;try{t:{for(M(V),m=n(u);m!==null&&!(m.expirationTime>V&&G());){var ge=m.callback;if(typeof ge=="function"){m.callback=null,g=m.priorityLevel;var Te=ge(m.expirationTime<=V);if(V=e.unstable_now(),typeof Te=="function"){m.callback=Te,M(V),ee=!0;break t}m===n(u)&&r(u),M(V)}else r(u);m=n(u)}if(m!==null)ee=!0;else{var j=n(f);j!==null&&Se(D,j.startTime-V),ee=!1}}break e}finally{m=null,g=pe,v=!1}ee=void 0}}finally{ee?F():N=!1}}}var F;if(typeof R=="function")F=function(){R(z)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,X=q.port2;q.port1.onmessage=z,F=function(){X.postMessage(null)}}else F=function(){x(z,0)};function Se(V,ee){T=x(function(){V(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(V){switch(g){case 1:case 2:case 3:var ee=3;break;default:ee=g}var pe=g;g=ee;try{return V()}finally{g=pe}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(V,ee){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var pe=g;g=V;try{return ee()}finally{g=pe}},e.unstable_scheduleCallback=function(V,ee,pe){var ge=e.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?ge+pe:ge):pe=ge,V){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=pe+Te,V={id:h++,callback:ee,priorityLevel:V,startTime:pe,expirationTime:Te,sortIndex:-1},pe>ge?(V.sortIndex=pe,t(f,V),n(u)===null&&V===n(f)&&(b?(I(T),T=-1):b=!0,Se(D,pe-ge))):(V.sortIndex=Te,t(u,V),C||v||(C=!0,N||(N=!0,F()))),V},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(V){var ee=g;return function(){var pe=g;g=ee;try{return V.apply(this,arguments)}finally{g=pe}}}})(Px)),Px}var cU;function kSe(){return cU||(cU=1,Mx.exports=NSe()),Mx.exports}var uU;function DSe(){if(uU)return nf;uU=1;var e=kSe(),t=Ih(),n=bz();function r(i){var l="https://react.dev/errors/"+i;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var l=i,d=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(d=l.return),i=l.return;while(i)}return l.tag===3?d:null}function a(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function c(i){if(i.tag===31){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function u(i){if(s(i)!==i)throw Error(r(188))}function f(i){var l=i.alternate;if(!l){if(l=s(i),l===null)throw Error(r(188));return l!==i?null:i}for(var d=i,p=l;;){var y=d.return;if(y===null)break;var S=y.alternate;if(S===null){if(p=y.return,p!==null){d=p;continue}break}if(y.child===S.child){for(S=y.child;S;){if(S===d)return u(y),i;if(S===p)return u(y),l;S=S.sibling}throw Error(r(188))}if(d.return!==p.return)d=y,p=S;else{for(var A=!1,k=y.child;k;){if(k===d){A=!0,d=y,p=S;break}if(k===p){A=!0,p=y,d=S;break}k=k.sibling}if(!A){for(k=S.child;k;){if(k===d){A=!0,d=S,p=y;break}if(k===p){A=!0,p=S,d=y;break}k=k.sibling}if(!A)throw Error(r(189))}}if(d.alternate!==p)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?i:l}function h(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i;for(i=i.child;i!==null;){if(l=h(i),l!==null)return l;i=i.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),R=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function F(i){return i===null||typeof i!="object"?null:(i=z&&i[z]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function X(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case b:return"Fragment";case x:return"Profiler";case E:return"StrictMode";case D:return"Suspense";case N:return"SuspenseList";case $:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case C:return"Portal";case R:return i.displayName||"Context";case I:return(i._context.displayName||"Context")+".Consumer";case M:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case T:return l=i.displayName||null,l!==null?l:X(i.type)||"Memo";case L:l=i._payload,i=i._init;try{return X(i(l))}catch{}}return null}var Se=Array.isArray,V=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},ge=[],Te=-1;function j(i){return{current:i}}function te(i){0>Te||(i.current=ge[Te],ge[Te]=null,Te--)}function fe(i,l){Te++,ge[Te]=i.current,i.current=l}var ae=j(null),be=j(null),Fe=j(null),ke=j(null);function le(i,l){switch(fe(Fe,l),fe(be,i),fe(ae,null),l.nodeType){case 9:case 11:i=(i=l.documentElement)&&(i=i.namespaceURI)?cN(i):0;break;default:if(i=l.tagName,l=l.namespaceURI)l=cN(l),i=uN(l,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}te(ae),fe(ae,i)}function Re(){te(ae),te(be),te(Fe)}function rt(i){i.memoizedState!==null&&fe(ke,i);var l=ae.current,d=uN(l,i.type);l!==d&&(fe(be,i),fe(ae,d))}function xe(i){be.current===i&&(te(ae),te(be)),ke.current===i&&(te(ke),Dd._currentValue=pe)}var xt,_t;function ot(i){if(xt===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);xt=l&&l[1]||"",_t=-1<d.stack.indexOf(`
|
|
81
|
+
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
82
|
+
`+xt+i+_t}var En=!1;function st(i,l){if(!i||En)return"";En=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(J){var Q=J}Reflect.construct(i,[],se)}else{try{se.call()}catch(J){Q=J}i.call(se.prototype)}}else{try{throw Error()}catch(J){Q=J}(se=i())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(J){if(J&&Q&&typeof J.stack=="string")return[J.stack,Q.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=p.DetermineComponentFrameRoot(),A=S[0],k=S[1];if(A&&k){var H=A.split(`
|
|
83
|
+
`),Y=k.split(`
|
|
84
|
+
`);for(y=p=0;p<H.length&&!H[p].includes("DetermineComponentFrameRoot");)p++;for(;y<Y.length&&!Y[y].includes("DetermineComponentFrameRoot");)y++;if(p===H.length||y===Y.length)for(p=H.length-1,y=Y.length-1;1<=p&&0<=y&&H[p]!==Y[y];)y--;for(;1<=p&&0<=y;p--,y--)if(H[p]!==Y[y]){if(p!==1||y!==1)do if(p--,y--,0>y||H[p]!==Y[y]){var ne=`
|
|
85
|
+
`+H[p].replace(" at new "," at ");return i.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",i.displayName)),ne}while(1<=p&&0<=y);break}}}finally{En=!1,Error.prepareStackTrace=d}return(d=i?i.displayName||i.name:"")?ot(d):""}function ti(i,l){switch(i.tag){case 26:case 27:case 5:return ot(i.type);case 16:return ot("Lazy");case 13:return i.child!==l&&l!==null?ot("Suspense Fallback"):ot("Suspense");case 19:return ot("SuspenseList");case 0:case 15:return st(i.type,!1);case 11:return st(i.type.render,!1);case 1:return st(i.type,!0);case 31:return ot("Activity");default:return""}}function os(i){try{var l="",d=null;do l+=ti(i,d),d=i,i=i.return;while(i);return l}catch(p){return`
|
|
86
|
+
Error generating stack: `+p.message+`
|
|
87
|
+
`+p.stack}}var ha=Object.prototype.hasOwnProperty,ho=e.unstable_scheduleCallback,Wu=e.unstable_cancelCallback,Qh=e.unstable_shouldYield,c0=e.unstable_requestPaint,Gn=e.unstable_now,zt=e.unstable_getCurrentPriorityLevel,Un=e.unstable_ImmediatePriority,Po=e.unstable_UserBlockingPriority,Nl=e.unstable_NormalPriority,lG=e.unstable_LowPriority,H2=e.unstable_IdlePriority,cG=e.log,uG=e.unstable_setDisableYieldValue,Gu=null,Ar=null;function ni(i){if(typeof cG=="function"&&uG(i),Ar&&typeof Ar.setStrictMode=="function")try{Ar.setStrictMode(Gu,i)}catch{}}var Rr=Math.clz32?Math.clz32:hG,dG=Math.log,fG=Math.LN2;function hG(i){return i>>>=0,i===0?32:31-(dG(i)/fG|0)|0}var Xh=256,Jh=262144,ep=4194304;function pa(i){var l=i&42;if(l!==0)return l;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function tp(i,l,d){var p=i.pendingLanes;if(p===0)return 0;var y=0,S=i.suspendedLanes,A=i.pingedLanes;i=i.warmLanes;var k=p&134217727;return k!==0?(p=k&~S,p!==0?y=pa(p):(A&=k,A!==0?y=pa(A):d||(d=k&~i,d!==0&&(y=pa(d))))):(k=p&~S,k!==0?y=pa(k):A!==0?y=pa(A):d||(d=p&~i,d!==0&&(y=pa(d)))),y===0?0:l!==0&&l!==y&&(l&S)===0&&(S=y&-y,d=l&-l,S>=d||S===32&&(d&4194048)!==0)?l:y}function Ku(i,l){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&l)===0}function pG(i,l){switch(i){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function q2(){var i=ep;return ep<<=1,(ep&62914560)===0&&(ep=4194304),i}function u0(i){for(var l=[],d=0;31>d;d++)l.push(i);return l}function Zu(i,l){i.pendingLanes|=l,l!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function mG(i,l,d,p,y,S){var A=i.pendingLanes;i.pendingLanes=d,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=d,i.entangledLanes&=d,i.errorRecoveryDisabledLanes&=d,i.shellSuspendCounter=0;var k=i.entanglements,H=i.expirationTimes,Y=i.hiddenUpdates;for(d=A&~d;0<d;){var ne=31-Rr(d),se=1<<ne;k[ne]=0,H[ne]=-1;var Q=Y[ne];if(Q!==null)for(Y[ne]=null,ne=0;ne<Q.length;ne++){var J=Q[ne];J!==null&&(J.lane&=-536870913)}d&=~se}p!==0&&V2(i,p,0),S!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=S&~(A&~l))}function V2(i,l,d){i.pendingLanes|=l,i.suspendedLanes&=~l;var p=31-Rr(l);i.entangledLanes|=l,i.entanglements[p]=i.entanglements[p]|1073741824|d&261930}function W2(i,l){var d=i.entangledLanes|=l;for(i=i.entanglements;d;){var p=31-Rr(d),y=1<<p;y&l|i[p]&l&&(i[p]|=l),d&=~y}}function G2(i,l){var d=l&-l;return d=(d&42)!==0?1:d0(d),(d&(i.suspendedLanes|l))!==0?0:d}function d0(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function f0(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function K2(){var i=ee.p;return i!==0?i:(i=window.event,i===void 0?32:NN(i.type))}function Z2(i,l){var d=ee.p;try{return ee.p=i,l()}finally{ee.p=d}}var ri=Math.random().toString(36).slice(2),Fn="__reactFiber$"+ri,lr="__reactProps$"+ri,kl="__reactContainer$"+ri,h0="__reactEvents$"+ri,gG="__reactListeners$"+ri,vG="__reactHandles$"+ri,Y2="__reactResources$"+ri,Yu="__reactMarker$"+ri;function p0(i){delete i[Fn],delete i[lr],delete i[h0],delete i[gG],delete i[vG]}function Dl(i){var l=i[Fn];if(l)return l;for(var d=i.parentNode;d;){if(l=d[kl]||d[Fn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(i=vN(i);i!==null;){if(d=i[Fn])return d;i=vN(i)}return l}i=d,d=i.parentNode}return null}function Ll(i){if(i=i[Fn]||i[kl]){var l=i.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return i}return null}function Qu(i){var l=i.tag;if(l===5||l===26||l===27||l===6)return i.stateNode;throw Error(r(33))}function Ul(i){var l=i[Y2];return l||(l=i[Y2]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Tn(i){i[Yu]=!0}var Q2=new Set,X2={};function ma(i,l){Fl(i,l),Fl(i+"Capture",l)}function Fl(i,l){for(X2[i]=l,i=0;i<l.length;i++)Q2.add(l[i])}var yG=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),J2={},eO={};function bG(i){return ha.call(eO,i)?!0:ha.call(J2,i)?!1:yG.test(i)?eO[i]=!0:(J2[i]=!0,!1)}function np(i,l,d){if(bG(l))if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":i.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(l);return}}i.setAttribute(l,""+d)}}function rp(i,l,d){if(d===null)i.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttribute(l,""+d)}}function ss(i,l,d,p){if(p===null)i.removeAttribute(d);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(d);return}i.setAttributeNS(l,d,""+p)}}function qr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function tO(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function SG(i,l,d){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,l);if(!i.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var y=p.get,S=p.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return y.call(this)},set:function(A){d=""+A,S.call(this,A)}}),Object.defineProperty(i,l,{enumerable:p.enumerable}),{getValue:function(){return d},setValue:function(A){d=""+A},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function m0(i){if(!i._valueTracker){var l=tO(i)?"checked":"value";i._valueTracker=SG(i,l,""+i[l])}}function nO(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var d=l.getValue(),p="";return i&&(p=tO(i)?i.checked?"true":"false":i.value),i=p,i!==d?(l.setValue(i),!0):!1}function op(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var CG=/[\n"\\]/g;function Vr(i){return i.replace(CG,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function g0(i,l,d,p,y,S,A,k){i.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?i.type=A:i.removeAttribute("type"),l!=null?A==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+qr(l)):i.value!==""+qr(l)&&(i.value=""+qr(l)):A!=="submit"&&A!=="reset"||i.removeAttribute("value"),l!=null?v0(i,A,qr(l)):d!=null?v0(i,A,qr(d)):p!=null&&i.removeAttribute("value"),y==null&&S!=null&&(i.defaultChecked=!!S),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+qr(k):i.removeAttribute("name")}function rO(i,l,d,p,y,S,A,k){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.type=S),l!=null||d!=null){if(!(S!=="submit"&&S!=="reset"||l!=null)){m0(i);return}d=d!=null?""+qr(d):"",l=l!=null?""+qr(l):d,k||l===i.value||(i.value=l),i.defaultValue=l}p=p??y,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=k?i.checked:!!p,i.defaultChecked=!!p,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(i.name=A),m0(i)}function v0(i,l,d){l==="number"&&op(i.ownerDocument)===i||i.defaultValue===""+d||(i.defaultValue=""+d)}function $l(i,l,d,p){if(i=i.options,l){l={};for(var y=0;y<d.length;y++)l["$"+d[y]]=!0;for(d=0;d<i.length;d++)y=l.hasOwnProperty("$"+i[d].value),i[d].selected!==y&&(i[d].selected=y),y&&p&&(i[d].defaultSelected=!0)}else{for(d=""+qr(d),l=null,y=0;y<i.length;y++){if(i[y].value===d){i[y].selected=!0,p&&(i[y].defaultSelected=!0);return}l!==null||i[y].disabled||(l=i[y])}l!==null&&(l.selected=!0)}}function oO(i,l,d){if(l!=null&&(l=""+qr(l),l!==i.value&&(i.value=l),d==null)){i.defaultValue!==l&&(i.defaultValue=l);return}i.defaultValue=d!=null?""+qr(d):""}function sO(i,l,d,p){if(l==null){if(p!=null){if(d!=null)throw Error(r(92));if(Se(p)){if(1<p.length)throw Error(r(93));p=p[0]}d=p}d==null&&(d=""),l=d}d=qr(l),i.defaultValue=d,p=i.textContent,p===d&&p!==""&&p!==null&&(i.value=p),m0(i)}function zl(i,l){if(l){var d=i.firstChild;if(d&&d===i.lastChild&&d.nodeType===3){d.nodeValue=l;return}}i.textContent=l}var wG=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function iO(i,l,d){var p=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?p?i.setProperty(l,""):l==="float"?i.cssFloat="":i[l]="":p?i.setProperty(l,d):typeof d!="number"||d===0||wG.has(l)?l==="float"?i.cssFloat=d:i[l]=(""+d).trim():i[l]=d+"px"}function aO(i,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(i=i.style,d!=null){for(var p in d)!d.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var y in l)p=l[y],l.hasOwnProperty(y)&&d[y]!==p&&iO(i,y,p)}else for(var S in l)l.hasOwnProperty(S)&&iO(i,S,l[S])}function y0(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var EG=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),xG=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function sp(i){return xG.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function is(){}var b0=null;function S0(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var jl=null,Bl=null;function lO(i){var l=Ll(i);if(l&&(i=l.stateNode)){var d=i[lr]||null;e:switch(i=l.stateNode,l.type){case"input":if(g0(i,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=i;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Vr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var p=d[l];if(p!==i&&p.form===i.form){var y=p[lr]||null;if(!y)throw Error(r(90));g0(p,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(l=0;l<d.length;l++)p=d[l],p.form===i.form&&nO(p)}break e;case"textarea":oO(i,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&$l(i,!!d.multiple,l,!1)}}}var C0=!1;function cO(i,l,d){if(C0)return i(l,d);C0=!0;try{var p=i(l);return p}finally{if(C0=!1,(jl!==null||Bl!==null)&&(Wp(),jl&&(l=jl,i=Bl,Bl=jl=null,lO(l),i)))for(l=0;l<i.length;l++)lO(i[l])}}function Xu(i,l){var d=i.stateNode;if(d===null)return null;var p=d[lr]||null;if(p===null)return null;d=p[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var as=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),w0=!1;if(as)try{var Ju={};Object.defineProperty(Ju,"passive",{get:function(){w0=!0}}),window.addEventListener("test",Ju,Ju),window.removeEventListener("test",Ju,Ju)}catch{w0=!1}var oi=null,E0=null,ip=null;function uO(){if(ip)return ip;var i,l=E0,d=l.length,p,y="value"in oi?oi.value:oi.textContent,S=y.length;for(i=0;i<d&&l[i]===y[i];i++);var A=d-i;for(p=1;p<=A&&l[d-p]===y[S-p];p++);return ip=y.slice(i,1<p?1-p:void 0)}function ap(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function lp(){return!0}function dO(){return!1}function cr(i){function l(d,p,y,S,A){this._reactName=d,this._targetInst=y,this.type=p,this.nativeEvent=S,this.target=A,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(d=i[k],this[k]=d?d(S):S[k]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?lp:dO,this.isPropagationStopped=dO,this}return m(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=lp)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=lp)},persist:function(){},isPersistent:lp}),l}var ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cp=cr(ga),ed=m({},ga,{view:0,detail:0}),_G=cr(ed),x0,_0,td,up=m({},ed,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:A0,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==td&&(td&&i.type==="mousemove"?(x0=i.screenX-td.screenX,_0=i.screenY-td.screenY):_0=x0=0,td=i),x0)},movementY:function(i){return"movementY"in i?i.movementY:_0}}),fO=cr(up),IG=m({},up,{dataTransfer:0}),AG=cr(IG),RG=m({},ed,{relatedTarget:0}),I0=cr(RG),TG=m({},ga,{animationName:0,elapsedTime:0,pseudoElement:0}),OG=cr(TG),MG=m({},ga,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),PG=cr(MG),NG=m({},ga,{data:0}),hO=cr(NG),kG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DG={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},LG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UG(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=LG[i])?!!l[i]:!1}function A0(){return UG}var FG=m({},ed,{key:function(i){if(i.key){var l=kG[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=ap(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?DG[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:A0,charCode:function(i){return i.type==="keypress"?ap(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ap(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),$G=cr(FG),zG=m({},up,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pO=cr(zG),jG=m({},ed,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:A0}),BG=cr(jG),HG=m({},ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),qG=cr(HG),VG=m({},up,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),WG=cr(VG),GG=m({},ga,{newState:0,oldState:0}),KG=cr(GG),ZG=[9,13,27,32],R0=as&&"CompositionEvent"in window,nd=null;as&&"documentMode"in document&&(nd=document.documentMode);var YG=as&&"TextEvent"in window&&!nd,mO=as&&(!R0||nd&&8<nd&&11>=nd),gO=" ",vO=!1;function yO(i,l){switch(i){case"keyup":return ZG.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bO(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Hl=!1;function QG(i,l){switch(i){case"compositionend":return bO(l);case"keypress":return l.which!==32?null:(vO=!0,gO);case"textInput":return i=l.data,i===gO&&vO?null:i;default:return null}}function XG(i,l){if(Hl)return i==="compositionend"||!R0&&yO(i,l)?(i=uO(),ip=E0=oi=null,Hl=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return mO&&l.locale!=="ko"?null:l.data;default:return null}}var JG={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function SO(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!JG[i.type]:l==="textarea"}function CO(i,l,d,p){jl?Bl?Bl.push(p):Bl=[p]:jl=p,l=Jp(l,"onChange"),0<l.length&&(d=new cp("onChange","change",null,d,p),i.push({event:d,listeners:l}))}var rd=null,od=null;function eK(i){rN(i,0)}function dp(i){var l=Qu(i);if(nO(l))return i}function wO(i,l){if(i==="change")return l}var EO=!1;if(as){var T0;if(as){var O0="oninput"in document;if(!O0){var xO=document.createElement("div");xO.setAttribute("oninput","return;"),O0=typeof xO.oninput=="function"}T0=O0}else T0=!1;EO=T0&&(!document.documentMode||9<document.documentMode)}function _O(){rd&&(rd.detachEvent("onpropertychange",IO),od=rd=null)}function IO(i){if(i.propertyName==="value"&&dp(od)){var l=[];CO(l,od,i,S0(i)),cO(eK,l)}}function tK(i,l,d){i==="focusin"?(_O(),rd=l,od=d,rd.attachEvent("onpropertychange",IO)):i==="focusout"&&_O()}function nK(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return dp(od)}function rK(i,l){if(i==="click")return dp(l)}function oK(i,l){if(i==="input"||i==="change")return dp(l)}function sK(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var Tr=typeof Object.is=="function"?Object.is:sK;function sd(i,l){if(Tr(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var d=Object.keys(i),p=Object.keys(l);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var y=d[p];if(!ha.call(l,y)||!Tr(i[y],l[y]))return!1}return!0}function AO(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function RO(i,l){var d=AO(i);i=0;for(var p;d;){if(d.nodeType===3){if(p=i+d.textContent.length,i<=l&&p>=l)return{node:d,offset:l-i};i=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=AO(d)}}function TO(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?TO(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function OO(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var l=op(i.document);l instanceof i.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)i=l.contentWindow;else break;l=op(i.document)}return l}function M0(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}var iK=as&&"documentMode"in document&&11>=document.documentMode,ql=null,P0=null,id=null,N0=!1;function MO(i,l,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;N0||ql==null||ql!==op(p)||(p=ql,"selectionStart"in p&&M0(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),id&&sd(id,p)||(id=p,p=Jp(P0,"onSelect"),0<p.length&&(l=new cp("onSelect","select",null,l,d),i.push({event:l,listeners:p}),l.target=ql)))}function va(i,l){var d={};return d[i.toLowerCase()]=l.toLowerCase(),d["Webkit"+i]="webkit"+l,d["Moz"+i]="moz"+l,d}var Vl={animationend:va("Animation","AnimationEnd"),animationiteration:va("Animation","AnimationIteration"),animationstart:va("Animation","AnimationStart"),transitionrun:va("Transition","TransitionRun"),transitionstart:va("Transition","TransitionStart"),transitioncancel:va("Transition","TransitionCancel"),transitionend:va("Transition","TransitionEnd")},k0={},PO={};as&&(PO=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function ya(i){if(k0[i])return k0[i];if(!Vl[i])return i;var l=Vl[i],d;for(d in l)if(l.hasOwnProperty(d)&&d in PO)return k0[i]=l[d];return i}var NO=ya("animationend"),kO=ya("animationiteration"),DO=ya("animationstart"),aK=ya("transitionrun"),lK=ya("transitionstart"),cK=ya("transitioncancel"),LO=ya("transitionend"),UO=new Map,D0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");D0.push("scrollEnd");function po(i,l){UO.set(i,l),ma(l,[i])}var fp=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Wr=[],Wl=0,L0=0;function hp(){for(var i=Wl,l=L0=Wl=0;l<i;){var d=Wr[l];Wr[l++]=null;var p=Wr[l];Wr[l++]=null;var y=Wr[l];Wr[l++]=null;var S=Wr[l];if(Wr[l++]=null,p!==null&&y!==null){var A=p.pending;A===null?y.next=y:(y.next=A.next,A.next=y),p.pending=y}S!==0&&FO(d,y,S)}}function pp(i,l,d,p){Wr[Wl++]=i,Wr[Wl++]=l,Wr[Wl++]=d,Wr[Wl++]=p,L0|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function U0(i,l,d,p){return pp(i,l,d,p),mp(i)}function ba(i,l){return pp(i,null,null,l),mp(i)}function FO(i,l,d){i.lanes|=d;var p=i.alternate;p!==null&&(p.lanes|=d);for(var y=!1,S=i.return;S!==null;)S.childLanes|=d,p=S.alternate,p!==null&&(p.childLanes|=d),S.tag===22&&(i=S.stateNode,i===null||i._visibility&1||(y=!0)),i=S,S=S.return;return i.tag===3?(S=i.stateNode,y&&l!==null&&(y=31-Rr(d),i=S.hiddenUpdates,p=i[y],p===null?i[y]=[l]:p.push(l),l.lane=d|536870912),S):null}function mp(i){if(50<Rd)throw Rd=0,WS=null,Error(r(185));for(var l=i.return;l!==null;)i=l,l=i.return;return i.tag===3?i.stateNode:null}var Gl={};function uK(i,l,d,p){this.tag=i,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Or(i,l,d,p){return new uK(i,l,d,p)}function F0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ls(i,l){var d=i.alternate;return d===null?(d=Or(i.tag,l,i.key,i.mode),d.elementType=i.elementType,d.type=i.type,d.stateNode=i.stateNode,d.alternate=i,i.alternate=d):(d.pendingProps=l,d.type=i.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=i.flags&65011712,d.childLanes=i.childLanes,d.lanes=i.lanes,d.child=i.child,d.memoizedProps=i.memoizedProps,d.memoizedState=i.memoizedState,d.updateQueue=i.updateQueue,l=i.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=i.sibling,d.index=i.index,d.ref=i.ref,d.refCleanup=i.refCleanup,d}function $O(i,l){i.flags&=65011714;var d=i.alternate;return d===null?(i.childLanes=0,i.lanes=l,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=d.childLanes,i.lanes=d.lanes,i.child=d.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=d.memoizedProps,i.memoizedState=d.memoizedState,i.updateQueue=d.updateQueue,i.type=d.type,l=d.dependencies,i.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),i}function gp(i,l,d,p,y,S){var A=0;if(p=i,typeof i=="function")F0(i)&&(A=1);else if(typeof i=="string")A=mZ(i,d,ae.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case $:return i=Or(31,d,l,y),i.elementType=$,i.lanes=S,i;case b:return Sa(d.children,y,S,l);case E:A=8,y|=24;break;case x:return i=Or(12,d,l,y|2),i.elementType=x,i.lanes=S,i;case D:return i=Or(13,d,l,y),i.elementType=D,i.lanes=S,i;case N:return i=Or(19,d,l,y),i.elementType=N,i.lanes=S,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case R:A=10;break e;case I:A=9;break e;case M:A=11;break e;case T:A=14;break e;case L:A=16,p=null;break e}A=29,d=Error(r(130,i===null?"null":typeof i,"")),p=null}return l=Or(A,d,l,y),l.elementType=i,l.type=p,l.lanes=S,l}function Sa(i,l,d,p){return i=Or(7,i,p,l),i.lanes=d,i}function $0(i,l,d){return i=Or(6,i,null,l),i.lanes=d,i}function zO(i){var l=Or(18,null,null,0);return l.stateNode=i,l}function z0(i,l,d){return l=Or(4,i.children!==null?i.children:[],i.key,l),l.lanes=d,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}var jO=new WeakMap;function Gr(i,l){if(typeof i=="object"&&i!==null){var d=jO.get(i);return d!==void 0?d:(l={value:i,source:l,stack:os(l)},jO.set(i,l),l)}return{value:i,source:l,stack:os(l)}}var Kl=[],Zl=0,vp=null,ad=0,Kr=[],Zr=0,si=null,No=1,ko="";function cs(i,l){Kl[Zl++]=ad,Kl[Zl++]=vp,vp=i,ad=l}function BO(i,l,d){Kr[Zr++]=No,Kr[Zr++]=ko,Kr[Zr++]=si,si=i;var p=No;i=ko;var y=32-Rr(p)-1;p&=~(1<<y),d+=1;var S=32-Rr(l)+y;if(30<S){var A=y-y%5;S=(p&(1<<A)-1).toString(32),p>>=A,y-=A,No=1<<32-Rr(l)+y|d<<y|p,ko=S+i}else No=1<<S|d<<y|p,ko=i}function j0(i){i.return!==null&&(cs(i,1),BO(i,1,0))}function B0(i){for(;i===vp;)vp=Kl[--Zl],Kl[Zl]=null,ad=Kl[--Zl],Kl[Zl]=null;for(;i===si;)si=Kr[--Zr],Kr[Zr]=null,ko=Kr[--Zr],Kr[Zr]=null,No=Kr[--Zr],Kr[Zr]=null}function HO(i,l){Kr[Zr++]=No,Kr[Zr++]=ko,Kr[Zr++]=si,No=l.id,ko=l.overflow,si=i}var $n=null,Bt=null,it=!1,ii=null,Yr=!1,H0=Error(r(519));function ai(i){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ld(Gr(l,i)),H0}function qO(i){var l=i.stateNode,d=i.type,p=i.memoizedProps;switch(l[Fn]=i,l[lr]=p,d){case"dialog":Je("cancel",l),Je("close",l);break;case"iframe":case"object":case"embed":Je("load",l);break;case"video":case"audio":for(d=0;d<Od.length;d++)Je(Od[d],l);break;case"source":Je("error",l);break;case"img":case"image":case"link":Je("error",l),Je("load",l);break;case"details":Je("toggle",l);break;case"input":Je("invalid",l),rO(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Je("invalid",l);break;case"textarea":Je("invalid",l),sO(l,p.value,p.defaultValue,p.children)}d=p.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||p.suppressHydrationWarning===!0||aN(l.textContent,d)?(p.popover!=null&&(Je("beforetoggle",l),Je("toggle",l)),p.onScroll!=null&&Je("scroll",l),p.onScrollEnd!=null&&Je("scrollend",l),p.onClick!=null&&(l.onclick=is),l=!0):l=!1,l||ai(i,!0)}function VO(i){for($n=i.return;$n;)switch($n.tag){case 5:case 31:case 13:Yr=!1;return;case 27:case 3:Yr=!0;return;default:$n=$n.return}}function Yl(i){if(i!==$n)return!1;if(!it)return VO(i),it=!0,!1;var l=i.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=i.type,d=!(d!=="form"&&d!=="button")||a1(i.type,i.memoizedProps)),d=!d),d&&Bt&&ai(i),VO(i),l===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Bt=gN(i)}else if(l===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Bt=gN(i)}else l===27?(l=Bt,Ci(i.type)?(i=f1,f1=null,Bt=i):Bt=l):Bt=$n?Xr(i.stateNode.nextSibling):null;return!0}function Ca(){Bt=$n=null,it=!1}function q0(){var i=ii;return i!==null&&(hr===null?hr=i:hr.push.apply(hr,i),ii=null),i}function ld(i){ii===null?ii=[i]:ii.push(i)}var V0=j(null),wa=null,us=null;function li(i,l,d){fe(V0,l._currentValue),l._currentValue=d}function ds(i){i._currentValue=V0.current,te(V0)}function W0(i,l,d){for(;i!==null;){var p=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),i===d)break;i=i.return}}function G0(i,l,d,p){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var S=y.dependencies;if(S!==null){var A=y.child;S=S.firstContext;e:for(;S!==null;){var k=S;S=y;for(var H=0;H<l.length;H++)if(k.context===l[H]){S.lanes|=d,k=S.alternate,k!==null&&(k.lanes|=d),W0(S.return,d,i),p||(A=null);break e}S=k.next}}else if(y.tag===18){if(A=y.return,A===null)throw Error(r(341));A.lanes|=d,S=A.alternate,S!==null&&(S.lanes|=d),W0(A,d,i),A=null}else A=y.child;if(A!==null)A.return=y;else for(A=y;A!==null;){if(A===i){A=null;break}if(y=A.sibling,y!==null){y.return=A.return,A=y;break}A=A.return}y=A}}function Ql(i,l,d,p){i=null;for(var y=l,S=!1;y!==null;){if(!S){if((y.flags&524288)!==0)S=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var A=y.alternate;if(A===null)throw Error(r(387));if(A=A.memoizedProps,A!==null){var k=y.type;Tr(y.pendingProps.value,A.value)||(i!==null?i.push(k):i=[k])}}else if(y===ke.current){if(A=y.alternate,A===null)throw Error(r(387));A.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(Dd):i=[Dd])}y=y.return}i!==null&&G0(l,i,d,p),l.flags|=262144}function yp(i){for(i=i.firstContext;i!==null;){if(!Tr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ea(i){wa=i,us=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function zn(i){return WO(wa,i)}function bp(i,l){return wa===null&&Ea(i),WO(i,l)}function WO(i,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},us===null){if(i===null)throw Error(r(308));us=l,i.dependencies={lanes:0,firstContext:l},i.flags|=524288}else us=us.next=l;return d}var dK=typeof AbortController<"u"?AbortController:function(){var i=[],l=this.signal={aborted:!1,addEventListener:function(d,p){i.push(p)}};this.abort=function(){l.aborted=!0,i.forEach(function(d){return d()})}},fK=e.unstable_scheduleCallback,hK=e.unstable_NormalPriority,mn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function K0(){return{controller:new dK,data:new Map,refCount:0}}function cd(i){i.refCount--,i.refCount===0&&fK(hK,function(){i.controller.abort()})}var ud=null,Z0=0,Xl=0,Jl=null;function pK(i,l){if(ud===null){var d=ud=[];Z0=0,Xl=XS(),Jl={status:"pending",value:void 0,then:function(p){d.push(p)}}}return Z0++,l.then(GO,GO),l}function GO(){if(--Z0===0&&ud!==null){Jl!==null&&(Jl.status="fulfilled");var i=ud;ud=null,Xl=0,Jl=null;for(var l=0;l<i.length;l++)(0,i[l])()}}function mK(i,l){var d=[],p={status:"pending",value:null,reason:null,then:function(y){d.push(y)}};return i.then(function(){p.status="fulfilled",p.value=l;for(var y=0;y<d.length;y++)(0,d[y])(l)},function(y){for(p.status="rejected",p.reason=y,y=0;y<d.length;y++)(0,d[y])(void 0)}),p}var KO=V.S;V.S=function(i,l){MP=Gn(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&pK(i,l),KO!==null&&KO(i,l)};var xa=j(null);function Y0(){var i=xa.current;return i!==null?i:$t.pooledCache}function Sp(i,l){l===null?fe(xa,xa.current):fe(xa,l.pool)}function ZO(){var i=Y0();return i===null?null:{parent:mn._currentValue,pool:i}}var ec=Error(r(460)),Q0=Error(r(474)),Cp=Error(r(542)),wp={then:function(){}};function YO(i){return i=i.status,i==="fulfilled"||i==="rejected"}function QO(i,l,d){switch(d=i[d],d===void 0?i.push(l):d!==l&&(l.then(is,is),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,JO(i),i;default:if(typeof l.status=="string")l.then(is,is);else{if(i=$t,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=l,i.status="pending",i.then(function(p){if(l.status==="pending"){var y=l;y.status="fulfilled",y.value=p}},function(p){if(l.status==="pending"){var y=l;y.status="rejected",y.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw i=l.reason,JO(i),i}throw Ia=l,ec}}function _a(i){try{var l=i._init;return l(i._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ia=d,ec):d}}var Ia=null;function XO(){if(Ia===null)throw Error(r(459));var i=Ia;return Ia=null,i}function JO(i){if(i===ec||i===Cp)throw Error(r(483))}var tc=null,dd=0;function Ep(i){var l=dd;return dd+=1,tc===null&&(tc=[]),QO(tc,i,l)}function fd(i,l){l=l.props.ref,i.ref=l!==void 0?l:null}function xp(i,l){throw l.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(l),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i)))}function eM(i){function l(K,W){if(i){var Z=K.deletions;Z===null?(K.deletions=[W],K.flags|=16):Z.push(W)}}function d(K,W){if(!i)return null;for(;W!==null;)l(K,W),W=W.sibling;return null}function p(K){for(var W=new Map;K!==null;)K.key!==null?W.set(K.key,K):W.set(K.index,K),K=K.sibling;return W}function y(K,W){return K=ls(K,W),K.index=0,K.sibling=null,K}function S(K,W,Z){return K.index=Z,i?(Z=K.alternate,Z!==null?(Z=Z.index,Z<W?(K.flags|=67108866,W):Z):(K.flags|=67108866,W)):(K.flags|=1048576,W)}function A(K){return i&&K.alternate===null&&(K.flags|=67108866),K}function k(K,W,Z,oe){return W===null||W.tag!==6?(W=$0(Z,K.mode,oe),W.return=K,W):(W=y(W,Z),W.return=K,W)}function H(K,W,Z,oe){var De=Z.type;return De===b?ne(K,W,Z.props.children,oe,Z.key):W!==null&&(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&_a(De)===W.type)?(W=y(W,Z.props),fd(W,Z),W.return=K,W):(W=gp(Z.type,Z.key,Z.props,null,K.mode,oe),fd(W,Z),W.return=K,W)}function Y(K,W,Z,oe){return W===null||W.tag!==4||W.stateNode.containerInfo!==Z.containerInfo||W.stateNode.implementation!==Z.implementation?(W=z0(Z,K.mode,oe),W.return=K,W):(W=y(W,Z.children||[]),W.return=K,W)}function ne(K,W,Z,oe,De){return W===null||W.tag!==7?(W=Sa(Z,K.mode,oe,De),W.return=K,W):(W=y(W,Z),W.return=K,W)}function se(K,W,Z){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return W=$0(""+W,K.mode,Z),W.return=K,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case v:return Z=gp(W.type,W.key,W.props,null,K.mode,Z),fd(Z,W),Z.return=K,Z;case C:return W=z0(W,K.mode,Z),W.return=K,W;case L:return W=_a(W),se(K,W,Z)}if(Se(W)||F(W))return W=Sa(W,K.mode,Z,null),W.return=K,W;if(typeof W.then=="function")return se(K,Ep(W),Z);if(W.$$typeof===R)return se(K,bp(K,W),Z);xp(K,W)}return null}function Q(K,W,Z,oe){var De=W!==null?W.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return De!==null?null:k(K,W,""+Z,oe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return Z.key===De?H(K,W,Z,oe):null;case C:return Z.key===De?Y(K,W,Z,oe):null;case L:return Z=_a(Z),Q(K,W,Z,oe)}if(Se(Z)||F(Z))return De!==null?null:ne(K,W,Z,oe,null);if(typeof Z.then=="function")return Q(K,W,Ep(Z),oe);if(Z.$$typeof===R)return Q(K,W,bp(K,Z),oe);xp(K,Z)}return null}function J(K,W,Z,oe,De){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(Z)||null,k(W,K,""+oe,De);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return K=K.get(oe.key===null?Z:oe.key)||null,H(W,K,oe,De);case C:return K=K.get(oe.key===null?Z:oe.key)||null,Y(W,K,oe,De);case L:return oe=_a(oe),J(K,W,Z,oe,De)}if(Se(oe)||F(oe))return K=K.get(Z)||null,ne(W,K,oe,De,null);if(typeof oe.then=="function")return J(K,W,Z,Ep(oe),De);if(oe.$$typeof===R)return J(K,W,Z,bp(W,oe),De);xp(W,oe)}return null}function Ie(K,W,Z,oe){for(var De=null,mt=null,Oe=W,Ke=W=0,nt=null;Oe!==null&&Ke<Z.length;Ke++){Oe.index>Ke?(nt=Oe,Oe=null):nt=Oe.sibling;var gt=Q(K,Oe,Z[Ke],oe);if(gt===null){Oe===null&&(Oe=nt);break}i&&Oe&>.alternate===null&&l(K,Oe),W=S(gt,W,Ke),mt===null?De=gt:mt.sibling=gt,mt=gt,Oe=nt}if(Ke===Z.length)return d(K,Oe),it&&cs(K,Ke),De;if(Oe===null){for(;Ke<Z.length;Ke++)Oe=se(K,Z[Ke],oe),Oe!==null&&(W=S(Oe,W,Ke),mt===null?De=Oe:mt.sibling=Oe,mt=Oe);return it&&cs(K,Ke),De}for(Oe=p(Oe);Ke<Z.length;Ke++)nt=J(Oe,K,Ke,Z[Ke],oe),nt!==null&&(i&&nt.alternate!==null&&Oe.delete(nt.key===null?Ke:nt.key),W=S(nt,W,Ke),mt===null?De=nt:mt.sibling=nt,mt=nt);return i&&Oe.forEach(function(Ii){return l(K,Ii)}),it&&cs(K,Ke),De}function Le(K,W,Z,oe){if(Z==null)throw Error(r(151));for(var De=null,mt=null,Oe=W,Ke=W=0,nt=null,gt=Z.next();Oe!==null&&!gt.done;Ke++,gt=Z.next()){Oe.index>Ke?(nt=Oe,Oe=null):nt=Oe.sibling;var Ii=Q(K,Oe,gt.value,oe);if(Ii===null){Oe===null&&(Oe=nt);break}i&&Oe&&Ii.alternate===null&&l(K,Oe),W=S(Ii,W,Ke),mt===null?De=Ii:mt.sibling=Ii,mt=Ii,Oe=nt}if(gt.done)return d(K,Oe),it&&cs(K,Ke),De;if(Oe===null){for(;!gt.done;Ke++,gt=Z.next())gt=se(K,gt.value,oe),gt!==null&&(W=S(gt,W,Ke),mt===null?De=gt:mt.sibling=gt,mt=gt);return it&&cs(K,Ke),De}for(Oe=p(Oe);!gt.done;Ke++,gt=Z.next())gt=J(Oe,K,Ke,gt.value,oe),gt!==null&&(i&>.alternate!==null&&Oe.delete(gt.key===null?Ke:gt.key),W=S(gt,W,Ke),mt===null?De=gt:mt.sibling=gt,mt=gt);return i&&Oe.forEach(function(IZ){return l(K,IZ)}),it&&cs(K,Ke),De}function kt(K,W,Z,oe){if(typeof Z=="object"&&Z!==null&&Z.type===b&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:e:{for(var De=Z.key;W!==null;){if(W.key===De){if(De=Z.type,De===b){if(W.tag===7){d(K,W.sibling),oe=y(W,Z.props.children),oe.return=K,K=oe;break e}}else if(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&_a(De)===W.type){d(K,W.sibling),oe=y(W,Z.props),fd(oe,Z),oe.return=K,K=oe;break e}d(K,W);break}else l(K,W);W=W.sibling}Z.type===b?(oe=Sa(Z.props.children,K.mode,oe,Z.key),oe.return=K,K=oe):(oe=gp(Z.type,Z.key,Z.props,null,K.mode,oe),fd(oe,Z),oe.return=K,K=oe)}return A(K);case C:e:{for(De=Z.key;W!==null;){if(W.key===De)if(W.tag===4&&W.stateNode.containerInfo===Z.containerInfo&&W.stateNode.implementation===Z.implementation){d(K,W.sibling),oe=y(W,Z.children||[]),oe.return=K,K=oe;break e}else{d(K,W);break}else l(K,W);W=W.sibling}oe=z0(Z,K.mode,oe),oe.return=K,K=oe}return A(K);case L:return Z=_a(Z),kt(K,W,Z,oe)}if(Se(Z))return Ie(K,W,Z,oe);if(F(Z)){if(De=F(Z),typeof De!="function")throw Error(r(150));return Z=De.call(Z),Le(K,W,Z,oe)}if(typeof Z.then=="function")return kt(K,W,Ep(Z),oe);if(Z.$$typeof===R)return kt(K,W,bp(K,Z),oe);xp(K,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,W!==null&&W.tag===6?(d(K,W.sibling),oe=y(W,Z),oe.return=K,K=oe):(d(K,W),oe=$0(Z,K.mode,oe),oe.return=K,K=oe),A(K)):d(K,W)}return function(K,W,Z,oe){try{dd=0;var De=kt(K,W,Z,oe);return tc=null,De}catch(Oe){if(Oe===ec||Oe===Cp)throw Oe;var mt=Or(29,Oe,null,K.mode);return mt.lanes=oe,mt.return=K,mt}}}var Aa=eM(!0),tM=eM(!1),ci=!1;function X0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function J0(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function ui(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function di(i,l,d){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(bt&2)!==0){var y=p.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),p.pending=l,l=mp(i),FO(i,null,d),l}return pp(i,p,l,d),mp(i)}function hd(i,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,W2(i,d)}}function eS(i,l){var d=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var y=null,S=null;if(d=d.firstBaseUpdate,d!==null){do{var A={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};S===null?y=S=A:S=S.next=A,d=d.next}while(d!==null);S===null?y=S=l:S=S.next=l}else y=S=l;d={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:S,shared:p.shared,callbacks:p.callbacks},i.updateQueue=d;return}i=d.lastBaseUpdate,i===null?d.firstBaseUpdate=l:i.next=l,d.lastBaseUpdate=l}var tS=!1;function pd(){if(tS){var i=Jl;if(i!==null)throw i}}function md(i,l,d,p){tS=!1;var y=i.updateQueue;ci=!1;var S=y.firstBaseUpdate,A=y.lastBaseUpdate,k=y.shared.pending;if(k!==null){y.shared.pending=null;var H=k,Y=H.next;H.next=null,A===null?S=Y:A.next=Y,A=H;var ne=i.alternate;ne!==null&&(ne=ne.updateQueue,k=ne.lastBaseUpdate,k!==A&&(k===null?ne.firstBaseUpdate=Y:k.next=Y,ne.lastBaseUpdate=H))}if(S!==null){var se=y.baseState;A=0,ne=Y=H=null,k=S;do{var Q=k.lane&-536870913,J=Q!==k.lane;if(J?(tt&Q)===Q:(p&Q)===Q){Q!==0&&Q===Xl&&(tS=!0),ne!==null&&(ne=ne.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ie=i,Le=k;Q=l;var kt=d;switch(Le.tag){case 1:if(Ie=Le.payload,typeof Ie=="function"){se=Ie.call(kt,se,Q);break e}se=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Le.payload,Q=typeof Ie=="function"?Ie.call(kt,se,Q):Ie,Q==null)break e;se=m({},se,Q);break e;case 2:ci=!0}}Q=k.callback,Q!==null&&(i.flags|=64,J&&(i.flags|=8192),J=y.callbacks,J===null?y.callbacks=[Q]:J.push(Q))}else J={lane:Q,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ne===null?(Y=ne=J,H=se):ne=ne.next=J,A|=Q;if(k=k.next,k===null){if(k=y.shared.pending,k===null)break;J=k,k=J.next,J.next=null,y.lastBaseUpdate=J,y.shared.pending=null}}while(!0);ne===null&&(H=se),y.baseState=H,y.firstBaseUpdate=Y,y.lastBaseUpdate=ne,S===null&&(y.shared.lanes=0),gi|=A,i.lanes=A,i.memoizedState=se}}function nM(i,l){if(typeof i!="function")throw Error(r(191,i));i.call(l)}function rM(i,l){var d=i.callbacks;if(d!==null)for(i.callbacks=null,i=0;i<d.length;i++)nM(d[i],l)}var nc=j(null),_p=j(0);function oM(i,l){i=Ss,fe(_p,i),fe(nc,l),Ss=i|l.baseLanes}function nS(){fe(_p,Ss),fe(nc,nc.current)}function rS(){Ss=_p.current,te(nc),te(_p)}var Mr=j(null),Qr=null;function fi(i){var l=i.alternate;fe(fn,fn.current&1),fe(Mr,i),Qr===null&&(l===null||nc.current!==null||l.memoizedState!==null)&&(Qr=i)}function oS(i){fe(fn,fn.current),fe(Mr,i),Qr===null&&(Qr=i)}function sM(i){i.tag===22?(fe(fn,fn.current),fe(Mr,i),Qr===null&&(Qr=i)):hi()}function hi(){fe(fn,fn.current),fe(Mr,Mr.current)}function Pr(i){te(Mr),Qr===i&&(Qr=null),te(fn)}var fn=j(0);function Ip(i){for(var l=i;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||u1(d)||d1(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var fs=0,We=null,Pt=null,gn=null,Ap=!1,rc=!1,Ra=!1,Rp=0,gd=0,oc=null,gK=0;function cn(){throw Error(r(321))}function sS(i,l){if(l===null)return!1;for(var d=0;d<l.length&&d<i.length;d++)if(!Tr(i[d],l[d]))return!1;return!0}function iS(i,l,d,p,y,S){return fs=S,We=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,V.H=i===null||i.memoizedState===null?BM:CS,Ra=!1,S=d(p,y),Ra=!1,rc&&(S=aM(l,d,p,y)),iM(i),S}function iM(i){V.H=bd;var l=Pt!==null&&Pt.next!==null;if(fs=0,gn=Pt=We=null,Ap=!1,gd=0,oc=null,l)throw Error(r(300));i===null||vn||(i=i.dependencies,i!==null&&yp(i)&&(vn=!0))}function aM(i,l,d,p){We=i;var y=0;do{if(rc&&(oc=null),gd=0,rc=!1,25<=y)throw Error(r(301));if(y+=1,gn=Pt=null,i.updateQueue!=null){var S=i.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}V.H=HM,S=l(d,p)}while(rc);return S}function vK(){var i=V.H,l=i.useState()[0];return l=typeof l.then=="function"?vd(l):l,i=i.useState()[0],(Pt!==null?Pt.memoizedState:null)!==i&&(We.flags|=1024),l}function aS(){var i=Rp!==0;return Rp=0,i}function lS(i,l,d){l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~d}function cS(i){if(Ap){for(i=i.memoizedState;i!==null;){var l=i.queue;l!==null&&(l.pending=null),i=i.next}Ap=!1}fs=0,gn=Pt=We=null,rc=!1,gd=Rp=0,oc=null}function tr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gn===null?We.memoizedState=gn=i:gn=gn.next=i,gn}function hn(){if(Pt===null){var i=We.alternate;i=i!==null?i.memoizedState:null}else i=Pt.next;var l=gn===null?We.memoizedState:gn.next;if(l!==null)gn=l,Pt=i;else{if(i===null)throw We.alternate===null?Error(r(467)):Error(r(310));Pt=i,i={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},gn===null?We.memoizedState=gn=i:gn=gn.next=i}return gn}function Tp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vd(i){var l=gd;return gd+=1,oc===null&&(oc=[]),i=QO(oc,i,l),l=We,(gn===null?l.memoizedState:gn.next)===null&&(l=l.alternate,V.H=l===null||l.memoizedState===null?BM:CS),i}function Op(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return vd(i);if(i.$$typeof===R)return zn(i)}throw Error(r(438,String(i)))}function uS(i){var l=null,d=We.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var p=We.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(y){return y.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Tp(),We.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(i),p=0;p<i;p++)d[p]=G;return l.index++,d}function hs(i,l){return typeof l=="function"?l(i):l}function Mp(i){var l=hn();return dS(l,Pt,i)}function dS(i,l,d){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=d;var y=i.baseQueue,S=p.pending;if(S!==null){if(y!==null){var A=y.next;y.next=S.next,S.next=A}l.baseQueue=y=S,p.pending=null}if(S=i.baseState,y===null)i.memoizedState=S;else{l=y.next;var k=A=null,H=null,Y=l,ne=!1;do{var se=Y.lane&-536870913;if(se!==Y.lane?(tt&se)===se:(fs&se)===se){var Q=Y.revertLane;if(Q===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),se===Xl&&(ne=!0);else if((fs&Q)===Q){Y=Y.next,Q===Xl&&(ne=!0);continue}else se={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},H===null?(k=H=se,A=S):H=H.next=se,We.lanes|=Q,gi|=Q;se=Y.action,Ra&&d(S,se),S=Y.hasEagerState?Y.eagerState:d(S,se)}else Q={lane:se,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},H===null?(k=H=Q,A=S):H=H.next=Q,We.lanes|=se,gi|=se;Y=Y.next}while(Y!==null&&Y!==l);if(H===null?A=S:H.next=k,!Tr(S,i.memoizedState)&&(vn=!0,ne&&(d=Jl,d!==null)))throw d;i.memoizedState=S,i.baseState=A,i.baseQueue=H,p.lastRenderedState=S}return y===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function fS(i){var l=hn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=i;var p=d.dispatch,y=d.pending,S=l.memoizedState;if(y!==null){d.pending=null;var A=y=y.next;do S=i(S,A.action),A=A.next;while(A!==y);Tr(S,l.memoizedState)||(vn=!0),l.memoizedState=S,l.baseQueue===null&&(l.baseState=S),d.lastRenderedState=S}return[S,p]}function lM(i,l,d){var p=We,y=hn(),S=it;if(S){if(d===void 0)throw Error(r(407));d=d()}else d=l();var A=!Tr((Pt||y).memoizedState,d);if(A&&(y.memoizedState=d,vn=!0),y=y.queue,mS(dM.bind(null,p,y,i),[i]),y.getSnapshot!==l||A||gn!==null&&gn.memoizedState.tag&1){if(p.flags|=2048,sc(9,{destroy:void 0},uM.bind(null,p,y,d,l),null),$t===null)throw Error(r(349));S||(fs&127)!==0||cM(p,l,d)}return d}function cM(i,l,d){i.flags|=16384,i={getSnapshot:l,value:d},l=We.updateQueue,l===null?(l=Tp(),We.updateQueue=l,l.stores=[i]):(d=l.stores,d===null?l.stores=[i]:d.push(i))}function uM(i,l,d,p){l.value=d,l.getSnapshot=p,fM(l)&&hM(i)}function dM(i,l,d){return d(function(){fM(l)&&hM(i)})}function fM(i){var l=i.getSnapshot;i=i.value;try{var d=l();return!Tr(i,d)}catch{return!0}}function hM(i){var l=ba(i,2);l!==null&&pr(l,i,2)}function hS(i){var l=tr();if(typeof i=="function"){var d=i;if(i=d(),Ra){ni(!0);try{d()}finally{ni(!1)}}}return l.memoizedState=l.baseState=i,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:i},l}function pM(i,l,d,p){return i.baseState=d,dS(i,Pt,typeof p=="function"?p:hs)}function yK(i,l,d,p,y){if(kp(i))throw Error(r(485));if(i=l.action,i!==null){var S={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){S.listeners.push(A)}};V.T!==null?d(!0):S.isTransition=!1,p(S),d=l.pending,d===null?(S.next=l.pending=S,mM(l,S)):(S.next=d.next,l.pending=d.next=S)}}function mM(i,l){var d=l.action,p=l.payload,y=i.state;if(l.isTransition){var S=V.T,A={};V.T=A;try{var k=d(y,p),H=V.S;H!==null&&H(A,k),gM(i,l,k)}catch(Y){pS(i,l,Y)}finally{S!==null&&A.types!==null&&(S.types=A.types),V.T=S}}else try{S=d(y,p),gM(i,l,S)}catch(Y){pS(i,l,Y)}}function gM(i,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(p){vM(i,l,p)},function(p){return pS(i,l,p)}):vM(i,l,d)}function vM(i,l,d){l.status="fulfilled",l.value=d,yM(l),i.state=d,l=i.pending,l!==null&&(d=l.next,d===l?i.pending=null:(d=d.next,l.next=d,mM(i,d)))}function pS(i,l,d){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=d,yM(l),l=l.next;while(l!==p)}i.action=null}function yM(i){i=i.listeners;for(var l=0;l<i.length;l++)(0,i[l])()}function bM(i,l){return l}function SM(i,l){if(it){var d=$t.formState;if(d!==null){e:{var p=We;if(it){if(Bt){t:{for(var y=Bt,S=Yr;y.nodeType!==8;){if(!S){y=null;break t}if(y=Xr(y.nextSibling),y===null){y=null;break t}}S=y.data,y=S==="F!"||S==="F"?y:null}if(y){Bt=Xr(y.nextSibling),p=y.data==="F!";break e}}ai(p)}p=!1}p&&(l=d[0])}}return d=tr(),d.memoizedState=d.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bM,lastRenderedState:l},d.queue=p,d=$M.bind(null,We,p),p.dispatch=d,p=hS(!1),S=SS.bind(null,We,!1,p.queue),p=tr(),y={state:l,dispatch:null,action:i,pending:null},p.queue=y,d=yK.bind(null,We,y,S,d),y.dispatch=d,p.memoizedState=i,[l,d,!1]}function CM(i){var l=hn();return wM(l,Pt,i)}function wM(i,l,d){if(l=dS(i,l,bM)[0],i=Mp(hs)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=vd(l)}catch(A){throw A===ec?Cp:A}else p=l;l=hn();var y=l.queue,S=y.dispatch;return d!==l.memoizedState&&(We.flags|=2048,sc(9,{destroy:void 0},bK.bind(null,y,d),null)),[p,S,i]}function bK(i,l){i.action=l}function EM(i){var l=hn(),d=Pt;if(d!==null)return wM(l,d,i);hn(),l=l.memoizedState,d=hn();var p=d.queue.dispatch;return d.memoizedState=i,[l,p,!1]}function sc(i,l,d,p){return i={tag:i,create:d,deps:p,inst:l,next:null},l=We.updateQueue,l===null&&(l=Tp(),We.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=i.next=i:(p=d.next,d.next=i,i.next=p,l.lastEffect=i),i}function xM(){return hn().memoizedState}function Pp(i,l,d,p){var y=tr();We.flags|=i,y.memoizedState=sc(1|l,{destroy:void 0},d,p===void 0?null:p)}function Np(i,l,d,p){var y=hn();p=p===void 0?null:p;var S=y.memoizedState.inst;Pt!==null&&p!==null&&sS(p,Pt.memoizedState.deps)?y.memoizedState=sc(l,S,d,p):(We.flags|=i,y.memoizedState=sc(1|l,S,d,p))}function _M(i,l){Pp(8390656,8,i,l)}function mS(i,l){Np(2048,8,i,l)}function SK(i){We.flags|=4;var l=We.updateQueue;if(l===null)l=Tp(),We.updateQueue=l,l.events=[i];else{var d=l.events;d===null?l.events=[i]:d.push(i)}}function IM(i){var l=hn().memoizedState;return SK({ref:l,nextImpl:i}),function(){if((bt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function AM(i,l){return Np(4,2,i,l)}function RM(i,l){return Np(4,4,i,l)}function TM(i,l){if(typeof l=="function"){i=i();var d=l(i);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function OM(i,l,d){d=d!=null?d.concat([i]):null,Np(4,4,TM.bind(null,l,i),d)}function gS(){}function MM(i,l){var d=hn();l=l===void 0?null:l;var p=d.memoizedState;return l!==null&&sS(l,p[1])?p[0]:(d.memoizedState=[i,l],i)}function PM(i,l){var d=hn();l=l===void 0?null:l;var p=d.memoizedState;if(l!==null&&sS(l,p[1]))return p[0];if(p=i(),Ra){ni(!0);try{i()}finally{ni(!1)}}return d.memoizedState=[p,l],p}function vS(i,l,d){return d===void 0||(fs&1073741824)!==0&&(tt&261930)===0?i.memoizedState=l:(i.memoizedState=d,i=NP(),We.lanes|=i,gi|=i,d)}function NM(i,l,d,p){return Tr(d,l)?d:nc.current!==null?(i=vS(i,d,p),Tr(i,l)||(vn=!0),i):(fs&42)===0||(fs&1073741824)!==0&&(tt&261930)===0?(vn=!0,i.memoizedState=d):(i=NP(),We.lanes|=i,gi|=i,l)}function kM(i,l,d,p,y){var S=ee.p;ee.p=S!==0&&8>S?S:8;var A=V.T,k={};V.T=k,SS(i,!1,l,d);try{var H=y(),Y=V.S;if(Y!==null&&Y(k,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var ne=mK(H,p);yd(i,l,ne,Dr(i))}else yd(i,l,p,Dr(i))}catch(se){yd(i,l,{then:function(){},status:"rejected",reason:se},Dr())}finally{ee.p=S,A!==null&&k.types!==null&&(A.types=k.types),V.T=A}}function CK(){}function yS(i,l,d,p){if(i.tag!==5)throw Error(r(476));var y=DM(i).queue;kM(i,y,l,pe,d===null?CK:function(){return LM(i),d(p)})}function DM(i){var l=i.memoizedState;if(l!==null)return l;l={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:pe},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:d},next:null},i.memoizedState=l,i=i.alternate,i!==null&&(i.memoizedState=l),l}function LM(i){var l=DM(i);l.next===null&&(l=i.alternate.memoizedState),yd(i,l.next.queue,{},Dr())}function bS(){return zn(Dd)}function UM(){return hn().memoizedState}function FM(){return hn().memoizedState}function wK(i){for(var l=i.return;l!==null;){switch(l.tag){case 24:case 3:var d=Dr();i=ui(d);var p=di(l,i,d);p!==null&&(pr(p,l,d),hd(p,l,d)),l={cache:K0()},i.payload=l;return}l=l.return}}function EK(i,l,d){var p=Dr();d={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},kp(i)?zM(l,d):(d=U0(i,l,d,p),d!==null&&(pr(d,i,p),jM(d,l,p)))}function $M(i,l,d){var p=Dr();yd(i,l,d,p)}function yd(i,l,d,p){var y={lane:p,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(kp(i))zM(l,y);else{var S=i.alternate;if(i.lanes===0&&(S===null||S.lanes===0)&&(S=l.lastRenderedReducer,S!==null))try{var A=l.lastRenderedState,k=S(A,d);if(y.hasEagerState=!0,y.eagerState=k,Tr(k,A))return pp(i,l,y,0),$t===null&&hp(),!1}catch{}if(d=U0(i,l,y,p),d!==null)return pr(d,i,p),jM(d,l,p),!0}return!1}function SS(i,l,d,p){if(p={lane:2,revertLane:XS(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},kp(i)){if(l)throw Error(r(479))}else l=U0(i,d,p,2),l!==null&&pr(l,i,2)}function kp(i){var l=i.alternate;return i===We||l!==null&&l===We}function zM(i,l){rc=Ap=!0;var d=i.pending;d===null?l.next=l:(l.next=d.next,d.next=l),i.pending=l}function jM(i,l,d){if((d&4194048)!==0){var p=l.lanes;p&=i.pendingLanes,d|=p,l.lanes=d,W2(i,d)}}var bd={readContext:zn,use:Op,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useLayoutEffect:cn,useInsertionEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useSyncExternalStore:cn,useId:cn,useHostTransitionStatus:cn,useFormState:cn,useActionState:cn,useOptimistic:cn,useMemoCache:cn,useCacheRefresh:cn};bd.useEffectEvent=cn;var BM={readContext:zn,use:Op,useCallback:function(i,l){return tr().memoizedState=[i,l===void 0?null:l],i},useContext:zn,useEffect:_M,useImperativeHandle:function(i,l,d){d=d!=null?d.concat([i]):null,Pp(4194308,4,TM.bind(null,l,i),d)},useLayoutEffect:function(i,l){return Pp(4194308,4,i,l)},useInsertionEffect:function(i,l){Pp(4,2,i,l)},useMemo:function(i,l){var d=tr();l=l===void 0?null:l;var p=i();if(Ra){ni(!0);try{i()}finally{ni(!1)}}return d.memoizedState=[p,l],p},useReducer:function(i,l,d){var p=tr();if(d!==void 0){var y=d(l);if(Ra){ni(!0);try{d(l)}finally{ni(!1)}}}else y=l;return p.memoizedState=p.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},p.queue=i,i=i.dispatch=EK.bind(null,We,i),[p.memoizedState,i]},useRef:function(i){var l=tr();return i={current:i},l.memoizedState=i},useState:function(i){i=hS(i);var l=i.queue,d=$M.bind(null,We,l);return l.dispatch=d,[i.memoizedState,d]},useDebugValue:gS,useDeferredValue:function(i,l){var d=tr();return vS(d,i,l)},useTransition:function(){var i=hS(!1);return i=kM.bind(null,We,i.queue,!0,!1),tr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,l,d){var p=We,y=tr();if(it){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),$t===null)throw Error(r(349));(tt&127)!==0||cM(p,l,d)}y.memoizedState=d;var S={value:d,getSnapshot:l};return y.queue=S,_M(dM.bind(null,p,S,i),[i]),p.flags|=2048,sc(9,{destroy:void 0},uM.bind(null,p,S,d,l),null),d},useId:function(){var i=tr(),l=$t.identifierPrefix;if(it){var d=ko,p=No;d=(p&~(1<<32-Rr(p)-1)).toString(32)+d,l="_"+l+"R_"+d,d=Rp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=gK++,l="_"+l+"r_"+d.toString(32)+"_";return i.memoizedState=l},useHostTransitionStatus:bS,useFormState:SM,useActionState:SM,useOptimistic:function(i){var l=tr();l.memoizedState=l.baseState=i;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=SS.bind(null,We,!0,d),d.dispatch=l,[i,l]},useMemoCache:uS,useCacheRefresh:function(){return tr().memoizedState=wK.bind(null,We)},useEffectEvent:function(i){var l=tr(),d={impl:i};return l.memoizedState=d,function(){if((bt&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},CS={readContext:zn,use:Op,useCallback:MM,useContext:zn,useEffect:mS,useImperativeHandle:OM,useInsertionEffect:AM,useLayoutEffect:RM,useMemo:PM,useReducer:Mp,useRef:xM,useState:function(){return Mp(hs)},useDebugValue:gS,useDeferredValue:function(i,l){var d=hn();return NM(d,Pt.memoizedState,i,l)},useTransition:function(){var i=Mp(hs)[0],l=hn().memoizedState;return[typeof i=="boolean"?i:vd(i),l]},useSyncExternalStore:lM,useId:UM,useHostTransitionStatus:bS,useFormState:CM,useActionState:CM,useOptimistic:function(i,l){var d=hn();return pM(d,Pt,i,l)},useMemoCache:uS,useCacheRefresh:FM};CS.useEffectEvent=IM;var HM={readContext:zn,use:Op,useCallback:MM,useContext:zn,useEffect:mS,useImperativeHandle:OM,useInsertionEffect:AM,useLayoutEffect:RM,useMemo:PM,useReducer:fS,useRef:xM,useState:function(){return fS(hs)},useDebugValue:gS,useDeferredValue:function(i,l){var d=hn();return Pt===null?vS(d,i,l):NM(d,Pt.memoizedState,i,l)},useTransition:function(){var i=fS(hs)[0],l=hn().memoizedState;return[typeof i=="boolean"?i:vd(i),l]},useSyncExternalStore:lM,useId:UM,useHostTransitionStatus:bS,useFormState:EM,useActionState:EM,useOptimistic:function(i,l){var d=hn();return Pt!==null?pM(d,Pt,i,l):(d.baseState=i,[i,d.queue.dispatch])},useMemoCache:uS,useCacheRefresh:FM};HM.useEffectEvent=IM;function wS(i,l,d,p){l=i.memoizedState,d=d(p,l),d=d==null?l:m({},l,d),i.memoizedState=d,i.lanes===0&&(i.updateQueue.baseState=d)}var ES={enqueueSetState:function(i,l,d){i=i._reactInternals;var p=Dr(),y=ui(p);y.payload=l,d!=null&&(y.callback=d),l=di(i,y,p),l!==null&&(pr(l,i,p),hd(l,i,p))},enqueueReplaceState:function(i,l,d){i=i._reactInternals;var p=Dr(),y=ui(p);y.tag=1,y.payload=l,d!=null&&(y.callback=d),l=di(i,y,p),l!==null&&(pr(l,i,p),hd(l,i,p))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var d=Dr(),p=ui(d);p.tag=2,l!=null&&(p.callback=l),l=di(i,p,d),l!==null&&(pr(l,i,d),hd(l,i,d))}};function qM(i,l,d,p,y,S,A){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,S,A):l.prototype&&l.prototype.isPureReactComponent?!sd(d,p)||!sd(y,S):!0}function VM(i,l,d,p){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,p),l.state!==i&&ES.enqueueReplaceState(l,l.state,null)}function Ta(i,l){var d=l;if("ref"in l){d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}if(i=i.defaultProps){d===l&&(d=m({},d));for(var y in i)d[y]===void 0&&(d[y]=i[y])}return d}function WM(i){fp(i)}function GM(i){console.error(i)}function KM(i){fp(i)}function Dp(i,l){try{var d=i.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function ZM(i,l,d){try{var p=i.onCaughtError;p(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function xS(i,l,d){return d=ui(d),d.tag=3,d.payload={element:null},d.callback=function(){Dp(i,l)},d}function YM(i){return i=ui(i),i.tag=3,i}function QM(i,l,d,p){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var S=p.value;i.payload=function(){return y(S)},i.callback=function(){ZM(l,d,p)}}var A=d.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(i.callback=function(){ZM(l,d,p),typeof y!="function"&&(vi===null?vi=new Set([this]):vi.add(this));var k=p.stack;this.componentDidCatch(p.value,{componentStack:k!==null?k:""})})}function xK(i,l,d,p,y){if(d.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=d.alternate,l!==null&&Ql(l,d,y,!0),d=Mr.current,d!==null){switch(d.tag){case 31:case 13:return Qr===null?Gp():d.alternate===null&&un===0&&(un=3),d.flags&=-257,d.flags|=65536,d.lanes=y,p===wp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([p]):l.add(p),ZS(i,p,y)),!1;case 22:return d.flags|=65536,p===wp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([p]):d.add(p)),ZS(i,p,y)),!1}throw Error(r(435,d.tag))}return ZS(i,p,y),Gp(),!1}if(it)return l=Mr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,p!==H0&&(i=Error(r(422),{cause:p}),ld(Gr(i,d)))):(p!==H0&&(l=Error(r(423),{cause:p}),ld(Gr(l,d))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,p=Gr(p,d),y=xS(i.stateNode,p,y),eS(i,y),un!==4&&(un=2)),!1;var S=Error(r(520),{cause:p});if(S=Gr(S,d),Ad===null?Ad=[S]:Ad.push(S),un!==4&&(un=2),l===null)return!0;p=Gr(p,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,i=y&-y,d.lanes|=i,i=xS(d.stateNode,p,i),eS(d,i),!1;case 1:if(l=d.type,S=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(vi===null||!vi.has(S))))return d.flags|=65536,y&=-y,d.lanes|=y,y=YM(y),QM(y,i,d,p),eS(d,y),!1}d=d.return}while(d!==null);return!1}var _S=Error(r(461)),vn=!1;function jn(i,l,d,p){l.child=i===null?tM(l,null,d,p):Aa(l,i.child,d,p)}function XM(i,l,d,p,y){d=d.render;var S=l.ref;if("ref"in p){var A={};for(var k in p)k!=="ref"&&(A[k]=p[k])}else A=p;return Ea(l),p=iS(i,l,d,A,S,y),k=aS(),i!==null&&!vn?(lS(i,l,y),ps(i,l,y)):(it&&k&&j0(l),l.flags|=1,jn(i,l,p,y),l.child)}function JM(i,l,d,p,y){if(i===null){var S=d.type;return typeof S=="function"&&!F0(S)&&S.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=S,eP(i,l,S,p,y)):(i=gp(d.type,null,p,l,l.mode,y),i.ref=l.ref,i.return=l,l.child=i)}if(S=i.child,!NS(i,y)){var A=S.memoizedProps;if(d=d.compare,d=d!==null?d:sd,d(A,p)&&i.ref===l.ref)return ps(i,l,y)}return l.flags|=1,i=ls(S,p),i.ref=l.ref,i.return=l,l.child=i}function eP(i,l,d,p,y){if(i!==null){var S=i.memoizedProps;if(sd(S,p)&&i.ref===l.ref)if(vn=!1,l.pendingProps=p=S,NS(i,y))(i.flags&131072)!==0&&(vn=!0);else return l.lanes=i.lanes,ps(i,l,y)}return IS(i,l,d,p,y)}function tP(i,l,d,p){var y=p.children,S=i!==null?i.memoizedState:null;if(i===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((l.flags&128)!==0){if(S=S!==null?S.baseLanes|d:d,i!==null){for(p=l.child=i.child,y=0;p!==null;)y=y|p.lanes|p.childLanes,p=p.sibling;p=y&~S}else p=0,l.child=null;return nP(i,l,S,d,p)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},i!==null&&Sp(l,S!==null?S.cachePool:null),S!==null?oM(l,S):nS(),sM(l);else return p=l.lanes=536870912,nP(i,l,S!==null?S.baseLanes|d:d,d,p)}else S!==null?(Sp(l,S.cachePool),oM(l,S),hi(),l.memoizedState=null):(i!==null&&Sp(l,null),nS(),hi());return jn(i,l,y,d),l.child}function Sd(i,l){return i!==null&&i.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function nP(i,l,d,p,y){var S=Y0();return S=S===null?null:{parent:mn._currentValue,pool:S},l.memoizedState={baseLanes:d,cachePool:S},i!==null&&Sp(l,null),nS(),sM(l),i!==null&&Ql(i,l,p,!0),l.childLanes=y,null}function Lp(i,l){return l=Fp({mode:l.mode,children:l.children},i.mode),l.ref=i.ref,i.child=l,l.return=i,l}function rP(i,l,d){return Aa(l,i.child,null,d),i=Lp(l,l.pendingProps),i.flags|=2,Pr(l),l.memoizedState=null,i}function _K(i,l,d){var p=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,i===null){if(it){if(p.mode==="hidden")return i=Lp(l,p),l.lanes=536870912,Sd(null,i);if(oS(l),(i=Bt)?(i=mN(i,Yr),i=i!==null&&i.data==="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:si!==null?{id:No,overflow:ko}:null,retryLane:536870912,hydrationErrors:null},d=zO(i),d.return=l,l.child=d,$n=l,Bt=null)):i=null,i===null)throw ai(l);return l.lanes=536870912,null}return Lp(l,p)}var S=i.memoizedState;if(S!==null){var A=S.dehydrated;if(oS(l),y)if(l.flags&256)l.flags&=-257,l=rP(i,l,d);else if(l.memoizedState!==null)l.child=i.child,l.flags|=128,l=null;else throw Error(r(558));else if(vn||Ql(i,l,d,!1),y=(d&i.childLanes)!==0,vn||y){if(p=$t,p!==null&&(A=G2(p,d),A!==0&&A!==S.retryLane))throw S.retryLane=A,ba(i,A),pr(p,i,A),_S;Gp(),l=rP(i,l,d)}else i=S.treeContext,Bt=Xr(A.nextSibling),$n=l,it=!0,ii=null,Yr=!1,i!==null&&HO(l,i),l=Lp(l,p),l.flags|=4096;return l}return i=ls(i.child,{mode:p.mode,children:p.children}),i.ref=l.ref,l.child=i,i.return=l,i}function Up(i,l){var d=l.ref;if(d===null)i!==null&&i.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(i===null||i.ref!==d)&&(l.flags|=4194816)}}function IS(i,l,d,p,y){return Ea(l),d=iS(i,l,d,p,void 0,y),p=aS(),i!==null&&!vn?(lS(i,l,y),ps(i,l,y)):(it&&p&&j0(l),l.flags|=1,jn(i,l,d,y),l.child)}function oP(i,l,d,p,y,S){return Ea(l),l.updateQueue=null,d=aM(l,p,d,y),iM(i),p=aS(),i!==null&&!vn?(lS(i,l,S),ps(i,l,S)):(it&&p&&j0(l),l.flags|=1,jn(i,l,d,S),l.child)}function sP(i,l,d,p,y){if(Ea(l),l.stateNode===null){var S=Gl,A=d.contextType;typeof A=="object"&&A!==null&&(S=zn(A)),S=new d(p,S),l.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=ES,l.stateNode=S,S._reactInternals=l,S=l.stateNode,S.props=p,S.state=l.memoizedState,S.refs={},X0(l),A=d.contextType,S.context=typeof A=="object"&&A!==null?zn(A):Gl,S.state=l.memoizedState,A=d.getDerivedStateFromProps,typeof A=="function"&&(wS(l,d,A,p),S.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(A=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),A!==S.state&&ES.enqueueReplaceState(S,S.state,null),md(l,p,S,y),pd(),S.state=l.memoizedState),typeof S.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(i===null){S=l.stateNode;var k=l.memoizedProps,H=Ta(d,k);S.props=H;var Y=S.context,ne=d.contextType;A=Gl,typeof ne=="object"&&ne!==null&&(A=zn(ne));var se=d.getDerivedStateFromProps;ne=typeof se=="function"||typeof S.getSnapshotBeforeUpdate=="function",k=l.pendingProps!==k,ne||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(k||Y!==A)&&VM(l,S,p,A),ci=!1;var Q=l.memoizedState;S.state=Q,md(l,p,S,y),pd(),Y=l.memoizedState,k||Q!==Y||ci?(typeof se=="function"&&(wS(l,d,se,p),Y=l.memoizedState),(H=ci||qM(l,d,H,p,Q,Y,A))?(ne||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=Y),S.props=p,S.state=Y,S.context=A,p=H):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{S=l.stateNode,J0(i,l),A=l.memoizedProps,ne=Ta(d,A),S.props=ne,se=l.pendingProps,Q=S.context,Y=d.contextType,H=Gl,typeof Y=="object"&&Y!==null&&(H=zn(Y)),k=d.getDerivedStateFromProps,(Y=typeof k=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(A!==se||Q!==H)&&VM(l,S,p,H),ci=!1,Q=l.memoizedState,S.state=Q,md(l,p,S,y),pd();var J=l.memoizedState;A!==se||Q!==J||ci||i!==null&&i.dependencies!==null&&yp(i.dependencies)?(typeof k=="function"&&(wS(l,d,k,p),J=l.memoizedState),(ne=ci||qM(l,d,ne,p,Q,J,H)||i!==null&&i.dependencies!==null&&yp(i.dependencies))?(Y||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(p,J,H),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(p,J,H)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||A===i.memoizedProps&&Q===i.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&Q===i.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=J),S.props=p,S.state=J,S.context=H,p=ne):(typeof S.componentDidUpdate!="function"||A===i.memoizedProps&&Q===i.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&Q===i.memoizedState||(l.flags|=1024),p=!1)}return S=p,Up(i,l),p=(l.flags&128)!==0,S||p?(S=l.stateNode,d=p&&typeof d.getDerivedStateFromError!="function"?null:S.render(),l.flags|=1,i!==null&&p?(l.child=Aa(l,i.child,null,y),l.child=Aa(l,null,d,y)):jn(i,l,d,y),l.memoizedState=S.state,i=l.child):i=ps(i,l,y),i}function iP(i,l,d,p){return Ca(),l.flags|=256,jn(i,l,d,p),l.child}var AS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function RS(i){return{baseLanes:i,cachePool:ZO()}}function TS(i,l,d){return i=i!==null?i.childLanes&~d:0,l&&(i|=kr),i}function aP(i,l,d){var p=l.pendingProps,y=!1,S=(l.flags&128)!==0,A;if((A=S)||(A=i!==null&&i.memoizedState===null?!1:(fn.current&2)!==0),A&&(y=!0,l.flags&=-129),A=(l.flags&32)!==0,l.flags&=-33,i===null){if(it){if(y?fi(l):hi(),(i=Bt)?(i=mN(i,Yr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(l.memoizedState={dehydrated:i,treeContext:si!==null?{id:No,overflow:ko}:null,retryLane:536870912,hydrationErrors:null},d=zO(i),d.return=l,l.child=d,$n=l,Bt=null)):i=null,i===null)throw ai(l);return d1(i)?l.lanes=32:l.lanes=536870912,null}var k=p.children;return p=p.fallback,y?(hi(),y=l.mode,k=Fp({mode:"hidden",children:k},y),p=Sa(p,y,d,null),k.return=l,p.return=l,k.sibling=p,l.child=k,p=l.child,p.memoizedState=RS(d),p.childLanes=TS(i,A,d),l.memoizedState=AS,Sd(null,p)):(fi(l),OS(l,k))}var H=i.memoizedState;if(H!==null&&(k=H.dehydrated,k!==null)){if(S)l.flags&256?(fi(l),l.flags&=-257,l=MS(i,l,d)):l.memoizedState!==null?(hi(),l.child=i.child,l.flags|=128,l=null):(hi(),k=p.fallback,y=l.mode,p=Fp({mode:"visible",children:p.children},y),k=Sa(k,y,d,null),k.flags|=2,p.return=l,k.return=l,p.sibling=k,l.child=p,Aa(l,i.child,null,d),p=l.child,p.memoizedState=RS(d),p.childLanes=TS(i,A,d),l.memoizedState=AS,l=Sd(null,p));else if(fi(l),d1(k)){if(A=k.nextSibling&&k.nextSibling.dataset,A)var Y=A.dgst;A=Y,p=Error(r(419)),p.stack="",p.digest=A,ld({value:p,source:null,stack:null}),l=MS(i,l,d)}else if(vn||Ql(i,l,d,!1),A=(d&i.childLanes)!==0,vn||A){if(A=$t,A!==null&&(p=G2(A,d),p!==0&&p!==H.retryLane))throw H.retryLane=p,ba(i,p),pr(A,i,p),_S;u1(k)||Gp(),l=MS(i,l,d)}else u1(k)?(l.flags|=192,l.child=i.child,l=null):(i=H.treeContext,Bt=Xr(k.nextSibling),$n=l,it=!0,ii=null,Yr=!1,i!==null&&HO(l,i),l=OS(l,p.children),l.flags|=4096);return l}return y?(hi(),k=p.fallback,y=l.mode,H=i.child,Y=H.sibling,p=ls(H,{mode:"hidden",children:p.children}),p.subtreeFlags=H.subtreeFlags&65011712,Y!==null?k=ls(Y,k):(k=Sa(k,y,d,null),k.flags|=2),k.return=l,p.return=l,p.sibling=k,l.child=p,Sd(null,p),p=l.child,k=i.child.memoizedState,k===null?k=RS(d):(y=k.cachePool,y!==null?(H=mn._currentValue,y=y.parent!==H?{parent:H,pool:H}:y):y=ZO(),k={baseLanes:k.baseLanes|d,cachePool:y}),p.memoizedState=k,p.childLanes=TS(i,A,d),l.memoizedState=AS,Sd(i.child,p)):(fi(l),d=i.child,i=d.sibling,d=ls(d,{mode:"visible",children:p.children}),d.return=l,d.sibling=null,i!==null&&(A=l.deletions,A===null?(l.deletions=[i],l.flags|=16):A.push(i)),l.child=d,l.memoizedState=null,d)}function OS(i,l){return l=Fp({mode:"visible",children:l},i.mode),l.return=i,i.child=l}function Fp(i,l){return i=Or(22,i,null,l),i.lanes=0,i}function MS(i,l,d){return Aa(l,i.child,null,d),i=OS(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function lP(i,l,d){i.lanes|=l;var p=i.alternate;p!==null&&(p.lanes|=l),W0(i.return,l,d)}function PS(i,l,d,p,y,S){var A=i.memoizedState;A===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:y,treeForkCount:S}:(A.isBackwards=l,A.rendering=null,A.renderingStartTime=0,A.last=p,A.tail=d,A.tailMode=y,A.treeForkCount=S)}function cP(i,l,d){var p=l.pendingProps,y=p.revealOrder,S=p.tail;p=p.children;var A=fn.current,k=(A&2)!==0;if(k?(A=A&1|2,l.flags|=128):A&=1,fe(fn,A),jn(i,l,p,d),p=it?ad:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&lP(i,d,l);else if(i.tag===19)lP(i,d,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(y){case"forwards":for(d=l.child,y=null;d!==null;)i=d.alternate,i!==null&&Ip(i)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),PS(l,!1,y,d,S,p);break;case"backwards":case"unstable_legacy-backwards":for(d=null,y=l.child,l.child=null;y!==null;){if(i=y.alternate,i!==null&&Ip(i)===null){l.child=y;break}i=y.sibling,y.sibling=d,d=y,y=i}PS(l,!0,d,null,S,p);break;case"together":PS(l,!1,null,null,void 0,p);break;default:l.memoizedState=null}return l.child}function ps(i,l,d){if(i!==null&&(l.dependencies=i.dependencies),gi|=l.lanes,(d&l.childLanes)===0)if(i!==null){if(Ql(i,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(i!==null&&l.child!==i.child)throw Error(r(153));if(l.child!==null){for(i=l.child,d=ls(i,i.pendingProps),l.child=d,d.return=l;i.sibling!==null;)i=i.sibling,d=d.sibling=ls(i,i.pendingProps),d.return=l;d.sibling=null}return l.child}function NS(i,l){return(i.lanes&l)!==0?!0:(i=i.dependencies,!!(i!==null&&yp(i)))}function IK(i,l,d){switch(l.tag){case 3:le(l,l.stateNode.containerInfo),li(l,mn,i.memoizedState.cache),Ca();break;case 27:case 5:rt(l);break;case 4:le(l,l.stateNode.containerInfo);break;case 10:li(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,oS(l),null;break;case 13:var p=l.memoizedState;if(p!==null)return p.dehydrated!==null?(fi(l),l.flags|=128,null):(d&l.child.childLanes)!==0?aP(i,l,d):(fi(l),i=ps(i,l,d),i!==null?i.sibling:null);fi(l);break;case 19:var y=(i.flags&128)!==0;if(p=(d&l.childLanes)!==0,p||(Ql(i,l,d,!1),p=(d&l.childLanes)!==0),y){if(p)return cP(i,l,d);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),fe(fn,fn.current),p)break;return null;case 22:return l.lanes=0,tP(i,l,d,l.pendingProps);case 24:li(l,mn,i.memoizedState.cache)}return ps(i,l,d)}function uP(i,l,d){if(i!==null)if(i.memoizedProps!==l.pendingProps)vn=!0;else{if(!NS(i,d)&&(l.flags&128)===0)return vn=!1,IK(i,l,d);vn=(i.flags&131072)!==0}else vn=!1,it&&(l.flags&1048576)!==0&&BO(l,ad,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(i=_a(l.elementType),l.type=i,typeof i=="function")F0(i)?(p=Ta(i,p),l.tag=1,l=sP(null,l,i,p,d)):(l.tag=0,l=IS(null,l,i,p,d));else{if(i!=null){var y=i.$$typeof;if(y===M){l.tag=11,l=XM(null,l,i,p,d);break e}else if(y===T){l.tag=14,l=JM(null,l,i,p,d);break e}}throw l=X(i)||i,Error(r(306,l,""))}}return l;case 0:return IS(i,l,l.type,l.pendingProps,d);case 1:return p=l.type,y=Ta(p,l.pendingProps),sP(i,l,p,y,d);case 3:e:{if(le(l,l.stateNode.containerInfo),i===null)throw Error(r(387));p=l.pendingProps;var S=l.memoizedState;y=S.element,J0(i,l),md(l,p,null,d);var A=l.memoizedState;if(p=A.cache,li(l,mn,p),p!==S.cache&&G0(l,[mn],d,!0),pd(),p=A.element,S.isDehydrated)if(S={element:p,isDehydrated:!1,cache:A.cache},l.updateQueue.baseState=S,l.memoizedState=S,l.flags&256){l=iP(i,l,p,d);break e}else if(p!==y){y=Gr(Error(r(424)),l),ld(y),l=iP(i,l,p,d);break e}else for(i=l.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Bt=Xr(i.firstChild),$n=l,it=!0,ii=null,Yr=!0,d=tM(l,null,p,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Ca(),p===y){l=ps(i,l,d);break e}jn(i,l,p,d)}l=l.child}return l;case 26:return Up(i,l),i===null?(d=CN(l.type,null,l.pendingProps,null))?l.memoizedState=d:it||(d=l.type,i=l.pendingProps,p=em(Fe.current).createElement(d),p[Fn]=l,p[lr]=i,Bn(p,d,i),Tn(p),l.stateNode=p):l.memoizedState=CN(l.type,i.memoizedProps,l.pendingProps,i.memoizedState),null;case 27:return rt(l),i===null&&it&&(p=l.stateNode=yN(l.type,l.pendingProps,Fe.current),$n=l,Yr=!0,y=Bt,Ci(l.type)?(f1=y,Bt=Xr(p.firstChild)):Bt=y),jn(i,l,l.pendingProps.children,d),Up(i,l),i===null&&(l.flags|=4194304),l.child;case 5:return i===null&&it&&((y=p=Bt)&&(p=nZ(p,l.type,l.pendingProps,Yr),p!==null?(l.stateNode=p,$n=l,Bt=Xr(p.firstChild),Yr=!1,y=!0):y=!1),y||ai(l)),rt(l),y=l.type,S=l.pendingProps,A=i!==null?i.memoizedProps:null,p=S.children,a1(y,S)?p=null:A!==null&&a1(y,A)&&(l.flags|=32),l.memoizedState!==null&&(y=iS(i,l,vK,null,null,d),Dd._currentValue=y),Up(i,l),jn(i,l,p,d),l.child;case 6:return i===null&&it&&((i=d=Bt)&&(d=rZ(d,l.pendingProps,Yr),d!==null?(l.stateNode=d,$n=l,Bt=null,i=!0):i=!1),i||ai(l)),null;case 13:return aP(i,l,d);case 4:return le(l,l.stateNode.containerInfo),p=l.pendingProps,i===null?l.child=Aa(l,null,p,d):jn(i,l,p,d),l.child;case 11:return XM(i,l,l.type,l.pendingProps,d);case 7:return jn(i,l,l.pendingProps,d),l.child;case 8:return jn(i,l,l.pendingProps.children,d),l.child;case 12:return jn(i,l,l.pendingProps.children,d),l.child;case 10:return p=l.pendingProps,li(l,l.type,p.value),jn(i,l,p.children,d),l.child;case 9:return y=l.type._context,p=l.pendingProps.children,Ea(l),y=zn(y),p=p(y),l.flags|=1,jn(i,l,p,d),l.child;case 14:return JM(i,l,l.type,l.pendingProps,d);case 15:return eP(i,l,l.type,l.pendingProps,d);case 19:return cP(i,l,d);case 31:return _K(i,l,d);case 22:return tP(i,l,d,l.pendingProps);case 24:return Ea(l),p=zn(mn),i===null?(y=Y0(),y===null&&(y=$t,S=K0(),y.pooledCache=S,S.refCount++,S!==null&&(y.pooledCacheLanes|=d),y=S),l.memoizedState={parent:p,cache:y},X0(l),li(l,mn,y)):((i.lanes&d)!==0&&(J0(i,l),md(l,null,null,d),pd()),y=i.memoizedState,S=l.memoizedState,y.parent!==p?(y={parent:p,cache:p},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),li(l,mn,p)):(p=S.cache,li(l,mn,p),p!==y.cache&&G0(l,[mn],d,!0))),jn(i,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function ms(i){i.flags|=4}function kS(i,l,d,p,y){if((l=(i.mode&32)!==0)&&(l=!1),l){if(i.flags|=16777216,(y&335544128)===y)if(i.stateNode.complete)i.flags|=8192;else if(UP())i.flags|=8192;else throw Ia=wp,Q0}else i.flags&=-16777217}function dP(i,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!IN(l))if(UP())i.flags|=8192;else throw Ia=wp,Q0}function $p(i,l){l!==null&&(i.flags|=4),i.flags&16384&&(l=i.tag!==22?q2():536870912,i.lanes|=l,cc|=l)}function Cd(i,l){if(!it)switch(i.tailMode){case"hidden":l=i.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i.tail=null:d.sibling=null;break;case"collapsed":d=i.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Ht(i){var l=i.alternate!==null&&i.alternate.child===i.child,d=0,p=0;if(l)for(var y=i.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags&65011712,p|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)d|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=p,i.childLanes=d,l}function AK(i,l,d){var p=l.pendingProps;switch(B0(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(l),null;case 1:return Ht(l),null;case 3:return d=l.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),ds(mn),Re(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Yl(l)?ms(l):i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,q0())),Ht(l),null;case 26:var y=l.type,S=l.memoizedState;return i===null?(ms(l),S!==null?(Ht(l),dP(l,S)):(Ht(l),kS(l,y,null,p,d))):S?S!==i.memoizedState?(ms(l),Ht(l),dP(l,S)):(Ht(l),l.flags&=-16777217):(i=i.memoizedProps,i!==p&&ms(l),Ht(l),kS(l,y,i,p,d)),null;case 27:if(xe(l),d=Fe.current,y=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&ms(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Ht(l),null}i=ae.current,Yl(l)?qO(l):(i=yN(y,p,d),l.stateNode=i,ms(l))}return Ht(l),null;case 5:if(xe(l),y=l.type,i!==null&&l.stateNode!=null)i.memoizedProps!==p&&ms(l);else{if(!p){if(l.stateNode===null)throw Error(r(166));return Ht(l),null}if(S=ae.current,Yl(l))qO(l);else{var A=em(Fe.current);switch(S){case 1:S=A.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:S=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":S=A.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":S=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":S=A.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof p.is=="string"?A.createElement("select",{is:p.is}):A.createElement("select"),p.multiple?S.multiple=!0:p.size&&(S.size=p.size);break;default:S=typeof p.is=="string"?A.createElement(y,{is:p.is}):A.createElement(y)}}S[Fn]=l,S[lr]=p;e:for(A=l.child;A!==null;){if(A.tag===5||A.tag===6)S.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===l)break e;for(;A.sibling===null;){if(A.return===null||A.return===l)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}l.stateNode=S;e:switch(Bn(S,y,p),y){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&ms(l)}}return Ht(l),kS(l,l.type,i===null?null:i.memoizedProps,l.pendingProps,d),null;case 6:if(i&&l.stateNode!=null)i.memoizedProps!==p&&ms(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(r(166));if(i=Fe.current,Yl(l)){if(i=l.stateNode,d=l.memoizedProps,p=null,y=$n,y!==null)switch(y.tag){case 27:case 5:p=y.memoizedProps}i[Fn]=l,i=!!(i.nodeValue===d||p!==null&&p.suppressHydrationWarning===!0||aN(i.nodeValue,d)),i||ai(l,!0)}else i=em(i).createTextNode(p),i[Fn]=l,l.stateNode=i}return Ht(l),null;case 31:if(d=l.memoizedState,i===null||i.memoizedState!==null){if(p=Yl(l),d!==null){if(i===null){if(!p)throw Error(r(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Fn]=l}else Ca(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ht(l),i=!1}else d=q0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=d),i=!0;if(!i)return l.flags&256?(Pr(l),l):(Pr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Ht(l),null;case 13:if(p=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=Yl(l),p!==null&&p.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=l.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Fn]=l}else Ca(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ht(l),y=!1}else y=q0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(Pr(l),l):(Pr(l),null)}return Pr(l),(l.flags&128)!==0?(l.lanes=d,l):(d=p!==null,i=i!==null&&i.memoizedState!==null,d&&(p=l.child,y=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(y=p.alternate.memoizedState.cachePool.pool),S=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(S=p.memoizedState.cachePool.pool),S!==y&&(p.flags|=2048)),d!==i&&d&&(l.child.flags|=8192),$p(l,l.updateQueue),Ht(l),null);case 4:return Re(),i===null&&n1(l.stateNode.containerInfo),Ht(l),null;case 10:return ds(l.type),Ht(l),null;case 19:if(te(fn),p=l.memoizedState,p===null)return Ht(l),null;if(y=(l.flags&128)!==0,S=p.rendering,S===null)if(y)Cd(p,!1);else{if(un!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(S=Ip(i),S!==null){for(l.flags|=128,Cd(p,!1),i=S.updateQueue,l.updateQueue=i,$p(l,i),l.subtreeFlags=0,i=d,d=l.child;d!==null;)$O(d,i),d=d.sibling;return fe(fn,fn.current&1|2),it&&cs(l,p.treeForkCount),l.child}i=i.sibling}p.tail!==null&&Gn()>qp&&(l.flags|=128,y=!0,Cd(p,!1),l.lanes=4194304)}else{if(!y)if(i=Ip(S),i!==null){if(l.flags|=128,y=!0,i=i.updateQueue,l.updateQueue=i,$p(l,i),Cd(p,!0),p.tail===null&&p.tailMode==="hidden"&&!S.alternate&&!it)return Ht(l),null}else 2*Gn()-p.renderingStartTime>qp&&d!==536870912&&(l.flags|=128,y=!0,Cd(p,!1),l.lanes=4194304);p.isBackwards?(S.sibling=l.child,l.child=S):(i=p.last,i!==null?i.sibling=S:l.child=S,p.last=S)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=Gn(),i.sibling=null,d=fn.current,fe(fn,y?d&1|2:d&1),it&&cs(l,p.treeForkCount),i):(Ht(l),null);case 22:case 23:return Pr(l),rS(),p=l.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(d&536870912)!==0&&(l.flags&128)===0&&(Ht(l),l.subtreeFlags&6&&(l.flags|=8192)):Ht(l),d=l.updateQueue,d!==null&&$p(l,d.retryQueue),d=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==d&&(l.flags|=2048),i!==null&&te(xa),null;case 24:return d=null,i!==null&&(d=i.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),ds(mn),Ht(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function RK(i,l){switch(B0(l),l.tag){case 1:return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return ds(mn),Re(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 26:case 27:case 5:return xe(l),null;case 31:if(l.memoizedState!==null){if(Pr(l),l.alternate===null)throw Error(r(340));Ca()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 13:if(Pr(l),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ca()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return te(fn),null;case 4:return Re(),null;case 10:return ds(l.type),null;case 22:case 23:return Pr(l),rS(),i!==null&&te(xa),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 24:return ds(mn),null;case 25:return null;default:return null}}function fP(i,l){switch(B0(l),l.tag){case 3:ds(mn),Re();break;case 26:case 27:case 5:xe(l);break;case 4:Re();break;case 31:l.memoizedState!==null&&Pr(l);break;case 13:Pr(l);break;case 19:te(fn);break;case 10:ds(l.type);break;case 22:case 23:Pr(l),rS(),i!==null&&te(xa);break;case 24:ds(mn)}}function wd(i,l){try{var d=l.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var y=p.next;d=y;do{if((d.tag&i)===i){p=void 0;var S=d.create,A=d.inst;p=S(),A.destroy=p}d=d.next}while(d!==y)}}catch(k){Rt(l,l.return,k)}}function pi(i,l,d){try{var p=l.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var S=y.next;p=S;do{if((p.tag&i)===i){var A=p.inst,k=A.destroy;if(k!==void 0){A.destroy=void 0,y=l;var H=d,Y=k;try{Y()}catch(ne){Rt(y,H,ne)}}}p=p.next}while(p!==S)}}catch(ne){Rt(l,l.return,ne)}}function hP(i){var l=i.updateQueue;if(l!==null){var d=i.stateNode;try{rM(l,d)}catch(p){Rt(i,i.return,p)}}}function pP(i,l,d){d.props=Ta(i.type,i.memoizedProps),d.state=i.memoizedState;try{d.componentWillUnmount()}catch(p){Rt(i,l,p)}}function Ed(i,l){try{var d=i.ref;if(d!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof d=="function"?i.refCleanup=d(p):d.current=p}}catch(y){Rt(i,l,y)}}function Do(i,l){var d=i.ref,p=i.refCleanup;if(d!==null)if(typeof p=="function")try{p()}catch(y){Rt(i,l,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(y){Rt(i,l,y)}else d.current=null}function mP(i){var l=i.type,d=i.memoizedProps,p=i.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&p.focus();break e;case"img":d.src?p.src=d.src:d.srcSet&&(p.srcset=d.srcSet)}}catch(y){Rt(i,i.return,y)}}function DS(i,l,d){try{var p=i.stateNode;YK(p,i.type,d,l),p[lr]=l}catch(y){Rt(i,i.return,y)}}function gP(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ci(i.type)||i.tag===4}function LS(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||gP(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ci(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function US(i,l,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(i,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(i),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=is));else if(p!==4&&(p===27&&Ci(i.type)&&(d=i.stateNode,l=null),i=i.child,i!==null))for(US(i,l,d),i=i.sibling;i!==null;)US(i,l,d),i=i.sibling}function zp(i,l,d){var p=i.tag;if(p===5||p===6)i=i.stateNode,l?d.insertBefore(i,l):d.appendChild(i);else if(p!==4&&(p===27&&Ci(i.type)&&(d=i.stateNode),i=i.child,i!==null))for(zp(i,l,d),i=i.sibling;i!==null;)zp(i,l,d),i=i.sibling}function vP(i){var l=i.stateNode,d=i.memoizedProps;try{for(var p=i.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);Bn(l,p,d),l[Fn]=i,l[lr]=d}catch(S){Rt(i,i.return,S)}}var gs=!1,yn=!1,FS=!1,yP=typeof WeakSet=="function"?WeakSet:Set,On=null;function TK(i,l){if(i=i.containerInfo,s1=am,i=OO(i),M0(i)){if("selectionStart"in i)var d={start:i.selectionStart,end:i.selectionEnd};else e:{d=(d=i.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var y=p.anchorOffset,S=p.focusNode;p=p.focusOffset;try{d.nodeType,S.nodeType}catch{d=null;break e}var A=0,k=-1,H=-1,Y=0,ne=0,se=i,Q=null;t:for(;;){for(var J;se!==d||y!==0&&se.nodeType!==3||(k=A+y),se!==S||p!==0&&se.nodeType!==3||(H=A+p),se.nodeType===3&&(A+=se.nodeValue.length),(J=se.firstChild)!==null;)Q=se,se=J;for(;;){if(se===i)break t;if(Q===d&&++Y===y&&(k=A),Q===S&&++ne===p&&(H=A),(J=se.nextSibling)!==null)break;se=Q,Q=se.parentNode}se=J}d=k===-1||H===-1?null:{start:k,end:H}}else d=null}d=d||{start:0,end:0}}else d=null;for(i1={focusedElem:i,selectionRange:d},am=!1,On=l;On!==null;)if(l=On,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,On=i;else for(;On!==null;){switch(l=On,S=l.alternate,i=l.flags,l.tag){case 0:if((i&4)!==0&&(i=l.updateQueue,i=i!==null?i.events:null,i!==null))for(d=0;d<i.length;d++)y=i[d],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&S!==null){i=void 0,d=l,y=S.memoizedProps,S=S.memoizedState,p=d.stateNode;try{var Ie=Ta(d.type,y);i=p.getSnapshotBeforeUpdate(Ie,S),p.__reactInternalSnapshotBeforeUpdate=i}catch(Le){Rt(d,d.return,Le)}}break;case 3:if((i&1024)!==0){if(i=l.stateNode.containerInfo,d=i.nodeType,d===9)c1(i);else if(d===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":c1(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=l.sibling,i!==null){i.return=l.return,On=i;break}On=l.return}}function bP(i,l,d){var p=d.flags;switch(d.tag){case 0:case 11:case 15:ys(i,d),p&4&&wd(5,d);break;case 1:if(ys(i,d),p&4)if(i=d.stateNode,l===null)try{i.componentDidMount()}catch(A){Rt(d,d.return,A)}else{var y=Ta(d.type,l.memoizedProps);l=l.memoizedState;try{i.componentDidUpdate(y,l,i.__reactInternalSnapshotBeforeUpdate)}catch(A){Rt(d,d.return,A)}}p&64&&hP(d),p&512&&Ed(d,d.return);break;case 3:if(ys(i,d),p&64&&(i=d.updateQueue,i!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{rM(i,l)}catch(A){Rt(d,d.return,A)}}break;case 27:l===null&&p&4&&vP(d);case 26:case 5:ys(i,d),l===null&&p&4&&mP(d),p&512&&Ed(d,d.return);break;case 12:ys(i,d);break;case 31:ys(i,d),p&4&&wP(i,d);break;case 13:ys(i,d),p&4&&EP(i,d),p&64&&(i=d.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(d=FK.bind(null,d),oZ(i,d))));break;case 22:if(p=d.memoizedState!==null||gs,!p){l=l!==null&&l.memoizedState!==null||yn,y=gs;var S=yn;gs=p,(yn=l)&&!S?bs(i,d,(d.subtreeFlags&8772)!==0):ys(i,d),gs=y,yn=S}break;case 30:break;default:ys(i,d)}}function SP(i){var l=i.alternate;l!==null&&(i.alternate=null,SP(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&p0(l)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Qt=null,ur=!1;function vs(i,l,d){for(d=d.child;d!==null;)CP(i,l,d),d=d.sibling}function CP(i,l,d){if(Ar&&typeof Ar.onCommitFiberUnmount=="function")try{Ar.onCommitFiberUnmount(Gu,d)}catch{}switch(d.tag){case 26:yn||Do(d,l),vs(i,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:yn||Do(d,l);var p=Qt,y=ur;Ci(d.type)&&(Qt=d.stateNode,ur=!1),vs(i,l,d),Pd(d.stateNode),Qt=p,ur=y;break;case 5:yn||Do(d,l);case 6:if(p=Qt,y=ur,Qt=null,vs(i,l,d),Qt=p,ur=y,Qt!==null)if(ur)try{(Qt.nodeType===9?Qt.body:Qt.nodeName==="HTML"?Qt.ownerDocument.body:Qt).removeChild(d.stateNode)}catch(S){Rt(d,l,S)}else try{Qt.removeChild(d.stateNode)}catch(S){Rt(d,l,S)}break;case 18:Qt!==null&&(ur?(i=Qt,hN(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,d.stateNode),vc(i)):hN(Qt,d.stateNode));break;case 4:p=Qt,y=ur,Qt=d.stateNode.containerInfo,ur=!0,vs(i,l,d),Qt=p,ur=y;break;case 0:case 11:case 14:case 15:pi(2,d,l),yn||pi(4,d,l),vs(i,l,d);break;case 1:yn||(Do(d,l),p=d.stateNode,typeof p.componentWillUnmount=="function"&&pP(d,l,p)),vs(i,l,d);break;case 21:vs(i,l,d);break;case 22:yn=(p=yn)||d.memoizedState!==null,vs(i,l,d),yn=p;break;default:vs(i,l,d)}}function wP(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{vc(i)}catch(d){Rt(l,l.return,d)}}}function EP(i,l){if(l.memoizedState===null&&(i=l.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{vc(i)}catch(d){Rt(l,l.return,d)}}function OK(i){switch(i.tag){case 31:case 13:case 19:var l=i.stateNode;return l===null&&(l=i.stateNode=new yP),l;case 22:return i=i.stateNode,l=i._retryCache,l===null&&(l=i._retryCache=new yP),l;default:throw Error(r(435,i.tag))}}function jp(i,l){var d=OK(i);l.forEach(function(p){if(!d.has(p)){d.add(p);var y=$K.bind(null,i,p);p.then(y,y)}})}function dr(i,l){var d=l.deletions;if(d!==null)for(var p=0;p<d.length;p++){var y=d[p],S=i,A=l,k=A;e:for(;k!==null;){switch(k.tag){case 27:if(Ci(k.type)){Qt=k.stateNode,ur=!1;break e}break;case 5:Qt=k.stateNode,ur=!1;break e;case 3:case 4:Qt=k.stateNode.containerInfo,ur=!0;break e}k=k.return}if(Qt===null)throw Error(r(160));CP(S,A,y),Qt=null,ur=!1,S=y.alternate,S!==null&&(S.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)xP(l,i),l=l.sibling}var mo=null;function xP(i,l){var d=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:dr(l,i),fr(i),p&4&&(pi(3,i,i.return),wd(3,i),pi(5,i,i.return));break;case 1:dr(l,i),fr(i),p&512&&(yn||d===null||Do(d,d.return)),p&64&&gs&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(d=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=d===null?p:d.concat(p))));break;case 26:var y=mo;if(dr(l,i),fr(i),p&512&&(yn||d===null||Do(d,d.return)),p&4){var S=d!==null?d.memoizedState:null;if(p=i.memoizedState,d===null)if(p===null)if(i.stateNode===null){e:{p=i.type,d=i.memoizedProps,y=y.ownerDocument||y;t:switch(p){case"title":S=y.getElementsByTagName("title")[0],(!S||S[Yu]||S[Fn]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=y.createElement(p),y.head.insertBefore(S,y.querySelector("head > title"))),Bn(S,p,d),S[Fn]=i,Tn(S),p=S;break e;case"link":var A=xN("link","href",y).get(p+(d.href||""));if(A){for(var k=0;k<A.length;k++)if(S=A[k],S.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&S.getAttribute("rel")===(d.rel==null?null:d.rel)&&S.getAttribute("title")===(d.title==null?null:d.title)&&S.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){A.splice(k,1);break t}}S=y.createElement(p),Bn(S,p,d),y.head.appendChild(S);break;case"meta":if(A=xN("meta","content",y).get(p+(d.content||""))){for(k=0;k<A.length;k++)if(S=A[k],S.getAttribute("content")===(d.content==null?null:""+d.content)&&S.getAttribute("name")===(d.name==null?null:d.name)&&S.getAttribute("property")===(d.property==null?null:d.property)&&S.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&S.getAttribute("charset")===(d.charSet==null?null:d.charSet)){A.splice(k,1);break t}}S=y.createElement(p),Bn(S,p,d),y.head.appendChild(S);break;default:throw Error(r(468,p))}S[Fn]=i,Tn(S),p=S}i.stateNode=p}else _N(y,i.type,i.stateNode);else i.stateNode=EN(y,p,i.memoizedProps);else S!==p?(S===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):S.count--,p===null?_N(y,i.type,i.stateNode):EN(y,p,i.memoizedProps)):p===null&&i.stateNode!==null&&DS(i,i.memoizedProps,d.memoizedProps)}break;case 27:dr(l,i),fr(i),p&512&&(yn||d===null||Do(d,d.return)),d!==null&&p&4&&DS(i,i.memoizedProps,d.memoizedProps);break;case 5:if(dr(l,i),fr(i),p&512&&(yn||d===null||Do(d,d.return)),i.flags&32){y=i.stateNode;try{zl(y,"")}catch(Ie){Rt(i,i.return,Ie)}}p&4&&i.stateNode!=null&&(y=i.memoizedProps,DS(i,y,d!==null?d.memoizedProps:y)),p&1024&&(FS=!0);break;case 6:if(dr(l,i),fr(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,d=i.stateNode;try{d.nodeValue=p}catch(Ie){Rt(i,i.return,Ie)}}break;case 3:if(rm=null,y=mo,mo=tm(l.containerInfo),dr(l,i),mo=y,fr(i),p&4&&d!==null&&d.memoizedState.isDehydrated)try{vc(l.containerInfo)}catch(Ie){Rt(i,i.return,Ie)}FS&&(FS=!1,_P(i));break;case 4:p=mo,mo=tm(i.stateNode.containerInfo),dr(l,i),fr(i),mo=p;break;case 12:dr(l,i),fr(i);break;case 31:dr(l,i),fr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,jp(i,p)));break;case 13:dr(l,i),fr(i),i.child.flags&8192&&i.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Hp=Gn()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,jp(i,p)));break;case 22:y=i.memoizedState!==null;var H=d!==null&&d.memoizedState!==null,Y=gs,ne=yn;if(gs=Y||y,yn=ne||H,dr(l,i),yn=ne,gs=Y,fr(i),p&8192)e:for(l=i.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(d===null||H||gs||yn||Oa(i)),d=null,l=i;;){if(l.tag===5||l.tag===26){if(d===null){H=d=l;try{if(S=H.stateNode,y)A=S.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{k=H.stateNode;var se=H.memoizedProps.style,Q=se!=null&&se.hasOwnProperty("display")?se.display:null;k.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(Ie){Rt(H,H.return,Ie)}}}else if(l.tag===6){if(d===null){H=l;try{H.stateNode.nodeValue=y?"":H.memoizedProps}catch(Ie){Rt(H,H.return,Ie)}}}else if(l.tag===18){if(d===null){H=l;try{var J=H.stateNode;y?pN(J,!0):pN(H.stateNode,!1)}catch(Ie){Rt(H,H.return,Ie)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===i)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break e;for(;l.sibling===null;){if(l.return===null||l.return===i)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}p&4&&(p=i.updateQueue,p!==null&&(d=p.retryQueue,d!==null&&(p.retryQueue=null,jp(i,d))));break;case 19:dr(l,i),fr(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,jp(i,p)));break;case 30:break;case 21:break;default:dr(l,i),fr(i)}}function fr(i){var l=i.flags;if(l&2){try{for(var d,p=i.return;p!==null;){if(gP(p)){d=p;break}p=p.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var y=d.stateNode,S=LS(i);zp(i,S,y);break;case 5:var A=d.stateNode;d.flags&32&&(zl(A,""),d.flags&=-33);var k=LS(i);zp(i,k,A);break;case 3:case 4:var H=d.stateNode.containerInfo,Y=LS(i);US(i,Y,H);break;default:throw Error(r(161))}}catch(ne){Rt(i,i.return,ne)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function _P(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var l=i;_P(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),i=i.sibling}}function ys(i,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)bP(i,l.alternate,l),l=l.sibling}function Oa(i){for(i=i.child;i!==null;){var l=i;switch(l.tag){case 0:case 11:case 14:case 15:pi(4,l,l.return),Oa(l);break;case 1:Do(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&pP(l,l.return,d),Oa(l);break;case 27:Pd(l.stateNode);case 26:case 5:Do(l,l.return),Oa(l);break;case 22:l.memoizedState===null&&Oa(l);break;case 30:Oa(l);break;default:Oa(l)}i=i.sibling}}function bs(i,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var p=l.alternate,y=i,S=l,A=S.flags;switch(S.tag){case 0:case 11:case 15:bs(y,S,d),wd(4,S);break;case 1:if(bs(y,S,d),p=S,y=p.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Y){Rt(p,p.return,Y)}if(p=S,y=p.updateQueue,y!==null){var k=p.stateNode;try{var H=y.shared.hiddenCallbacks;if(H!==null)for(y.shared.hiddenCallbacks=null,y=0;y<H.length;y++)nM(H[y],k)}catch(Y){Rt(p,p.return,Y)}}d&&A&64&&hP(S),Ed(S,S.return);break;case 27:vP(S);case 26:case 5:bs(y,S,d),d&&p===null&&A&4&&mP(S),Ed(S,S.return);break;case 12:bs(y,S,d);break;case 31:bs(y,S,d),d&&A&4&&wP(y,S);break;case 13:bs(y,S,d),d&&A&4&&EP(y,S);break;case 22:S.memoizedState===null&&bs(y,S,d),Ed(S,S.return);break;case 30:break;default:bs(y,S,d)}l=l.sibling}}function $S(i,l){var d=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==d&&(i!=null&&i.refCount++,d!=null&&cd(d))}function zS(i,l){i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&cd(i))}function go(i,l,d,p){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)IP(i,l,d,p),l=l.sibling}function IP(i,l,d,p){var y=l.flags;switch(l.tag){case 0:case 11:case 15:go(i,l,d,p),y&2048&&wd(9,l);break;case 1:go(i,l,d,p);break;case 3:go(i,l,d,p),y&2048&&(i=null,l.alternate!==null&&(i=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==i&&(l.refCount++,i!=null&&cd(i)));break;case 12:if(y&2048){go(i,l,d,p),i=l.stateNode;try{var S=l.memoizedProps,A=S.id,k=S.onPostCommit;typeof k=="function"&&k(A,l.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(H){Rt(l,l.return,H)}}else go(i,l,d,p);break;case 31:go(i,l,d,p);break;case 13:go(i,l,d,p);break;case 23:break;case 22:S=l.stateNode,A=l.alternate,l.memoizedState!==null?S._visibility&2?go(i,l,d,p):xd(i,l):S._visibility&2?go(i,l,d,p):(S._visibility|=2,ic(i,l,d,p,(l.subtreeFlags&10256)!==0||!1)),y&2048&&$S(A,l);break;case 24:go(i,l,d,p),y&2048&&zS(l.alternate,l);break;default:go(i,l,d,p)}}function ic(i,l,d,p,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var S=i,A=l,k=d,H=p,Y=A.flags;switch(A.tag){case 0:case 11:case 15:ic(S,A,k,H,y),wd(8,A);break;case 23:break;case 22:var ne=A.stateNode;A.memoizedState!==null?ne._visibility&2?ic(S,A,k,H,y):xd(S,A):(ne._visibility|=2,ic(S,A,k,H,y)),y&&Y&2048&&$S(A.alternate,A);break;case 24:ic(S,A,k,H,y),y&&Y&2048&&zS(A.alternate,A);break;default:ic(S,A,k,H,y)}l=l.sibling}}function xd(i,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=i,p=l,y=p.flags;switch(p.tag){case 22:xd(d,p),y&2048&&$S(p.alternate,p);break;case 24:xd(d,p),y&2048&&zS(p.alternate,p);break;default:xd(d,p)}l=l.sibling}}var _d=8192;function ac(i,l,d){if(i.subtreeFlags&_d)for(i=i.child;i!==null;)AP(i,l,d),i=i.sibling}function AP(i,l,d){switch(i.tag){case 26:ac(i,l,d),i.flags&_d&&i.memoizedState!==null&&gZ(d,mo,i.memoizedState,i.memoizedProps);break;case 5:ac(i,l,d);break;case 3:case 4:var p=mo;mo=tm(i.stateNode.containerInfo),ac(i,l,d),mo=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=_d,_d=16777216,ac(i,l,d),_d=p):ac(i,l,d));break;default:ac(i,l,d)}}function RP(i){var l=i.alternate;if(l!==null&&(i=l.child,i!==null)){l.child=null;do l=i.sibling,i.sibling=null,i=l;while(i!==null)}}function Id(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];On=p,OP(p,i)}RP(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)TP(i),i=i.sibling}function TP(i){switch(i.tag){case 0:case 11:case 15:Id(i),i.flags&2048&&pi(9,i,i.return);break;case 3:Id(i);break;case 12:Id(i);break;case 22:var l=i.stateNode;i.memoizedState!==null&&l._visibility&2&&(i.return===null||i.return.tag!==13)?(l._visibility&=-3,Bp(i)):Id(i);break;default:Id(i)}}function Bp(i){var l=i.deletions;if((i.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var p=l[d];On=p,OP(p,i)}RP(i)}for(i=i.child;i!==null;){switch(l=i,l.tag){case 0:case 11:case 15:pi(8,l,l.return),Bp(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Bp(l));break;default:Bp(l)}i=i.sibling}}function OP(i,l){for(;On!==null;){var d=On;switch(d.tag){case 0:case 11:case 15:pi(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var p=d.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:cd(d.memoizedState.cache)}if(p=d.child,p!==null)p.return=d,On=p;else e:for(d=i;On!==null;){p=On;var y=p.sibling,S=p.return;if(SP(p),p===d){On=null;break e}if(y!==null){y.return=S,On=y;break e}On=S}}}var MK={getCacheForType:function(i){var l=zn(mn),d=l.data.get(i);return d===void 0&&(d=i(),l.data.set(i,d)),d},cacheSignal:function(){return zn(mn).controller.signal}},PK=typeof WeakMap=="function"?WeakMap:Map,bt=0,$t=null,Xe=null,tt=0,At=0,Nr=null,mi=!1,lc=!1,jS=!1,Ss=0,un=0,gi=0,Ma=0,BS=0,kr=0,cc=0,Ad=null,hr=null,HS=!1,Hp=0,MP=0,qp=1/0,Vp=null,vi=null,xn=0,yi=null,uc=null,Cs=0,qS=0,VS=null,PP=null,Rd=0,WS=null;function Dr(){return(bt&2)!==0&&tt!==0?tt&-tt:V.T!==null?XS():K2()}function NP(){if(kr===0)if((tt&536870912)===0||it){var i=Jh;Jh<<=1,(Jh&3932160)===0&&(Jh=262144),kr=i}else kr=536870912;return i=Mr.current,i!==null&&(i.flags|=32),kr}function pr(i,l,d){(i===$t&&(At===2||At===9)||i.cancelPendingCommit!==null)&&(dc(i,0),bi(i,tt,kr,!1)),Zu(i,d),((bt&2)===0||i!==$t)&&(i===$t&&((bt&2)===0&&(Ma|=d),un===4&&bi(i,tt,kr,!1)),Lo(i))}function kP(i,l,d){if((bt&6)!==0)throw Error(r(327));var p=!d&&(l&127)===0&&(l&i.expiredLanes)===0||Ku(i,l),y=p?DK(i,l):KS(i,l,!0),S=p;do{if(y===0){lc&&!p&&bi(i,l,0,!1);break}else{if(d=i.current.alternate,S&&!NK(d)){y=KS(i,l,!1),S=!1;continue}if(y===2){if(S=l,i.errorRecoveryDisabledLanes&S)var A=0;else A=i.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){l=A;e:{var k=i;y=Ad;var H=k.current.memoizedState.isDehydrated;if(H&&(dc(k,A).flags|=256),A=KS(k,A,!1),A!==2){if(jS&&!H){k.errorRecoveryDisabledLanes|=S,Ma|=S,y=4;break e}S=hr,hr=y,S!==null&&(hr===null?hr=S:hr.push.apply(hr,S))}y=A}if(S=!1,y!==2)continue}}if(y===1){dc(i,0),bi(i,l,0,!0);break}e:{switch(p=i,S=y,S){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:bi(p,l,kr,!mi);break e;case 2:hr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(y=Hp+300-Gn(),10<y)){if(bi(p,l,kr,!mi),tp(p,0,!0)!==0)break e;Cs=l,p.timeoutHandle=dN(DP.bind(null,p,d,hr,Vp,HS,l,kr,Ma,cc,mi,S,"Throttled",-0,0),y);break e}DP(p,d,hr,Vp,HS,l,kr,Ma,cc,mi,S,null,-0,0)}}break}while(!0);Lo(i)}function DP(i,l,d,p,y,S,A,k,H,Y,ne,se,Q,J){if(i.timeoutHandle=-1,se=l.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:is},AP(l,S,se);var Ie=(S&62914560)===S?Hp-Gn():(S&4194048)===S?MP-Gn():0;if(Ie=vZ(se,Ie),Ie!==null){Cs=S,i.cancelPendingCommit=Ie(HP.bind(null,i,l,S,d,p,y,A,k,H,ne,se,null,Q,J)),bi(i,S,A,!Y);return}}HP(i,l,S,d,p,y,A,k,H)}function NK(i){for(var l=i;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var p=0;p<d.length;p++){var y=d[p],S=y.getSnapshot;y=y.value;try{if(!Tr(S(),y))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function bi(i,l,d,p){l&=~BS,l&=~Ma,i.suspendedLanes|=l,i.pingedLanes&=~l,p&&(i.warmLanes|=l),p=i.expirationTimes;for(var y=l;0<y;){var S=31-Rr(y),A=1<<S;p[S]=-1,y&=~A}d!==0&&V2(i,d,l)}function Wp(){return(bt&6)===0?(Td(0),!1):!0}function GS(){if(Xe!==null){if(At===0)var i=Xe.return;else i=Xe,us=wa=null,cS(i),tc=null,dd=0,i=Xe;for(;i!==null;)fP(i.alternate,i),i=i.return;Xe=null}}function dc(i,l){var d=i.timeoutHandle;d!==-1&&(i.timeoutHandle=-1,JK(d)),d=i.cancelPendingCommit,d!==null&&(i.cancelPendingCommit=null,d()),Cs=0,GS(),$t=i,Xe=d=ls(i.current,null),tt=l,At=0,Nr=null,mi=!1,lc=Ku(i,l),jS=!1,cc=kr=BS=Ma=gi=un=0,hr=Ad=null,HS=!1,(l&8)!==0&&(l|=l&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=l;0<p;){var y=31-Rr(p),S=1<<y;l|=i[y],p&=~S}return Ss=l,hp(),d}function LP(i,l){We=null,V.H=bd,l===ec||l===Cp?(l=XO(),At=3):l===Q0?(l=XO(),At=4):At=l===_S?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Nr=l,Xe===null&&(un=1,Dp(i,Gr(l,i.current)))}function UP(){var i=Mr.current;return i===null?!0:(tt&4194048)===tt?Qr===null:(tt&62914560)===tt||(tt&536870912)!==0?i===Qr:!1}function FP(){var i=V.H;return V.H=bd,i===null?bd:i}function $P(){var i=V.A;return V.A=MK,i}function Gp(){un=4,mi||(tt&4194048)!==tt&&Mr.current!==null||(lc=!0),(gi&134217727)===0&&(Ma&134217727)===0||$t===null||bi($t,tt,kr,!1)}function KS(i,l,d){var p=bt;bt|=2;var y=FP(),S=$P();($t!==i||tt!==l)&&(Vp=null,dc(i,l)),l=!1;var A=un;e:do try{if(At!==0&&Xe!==null){var k=Xe,H=Nr;switch(At){case 8:GS(),A=6;break e;case 3:case 2:case 9:case 6:Mr.current===null&&(l=!0);var Y=At;if(At=0,Nr=null,fc(i,k,H,Y),d&&lc){A=0;break e}break;default:Y=At,At=0,Nr=null,fc(i,k,H,Y)}}kK(),A=un;break}catch(ne){LP(i,ne)}while(!0);return l&&i.shellSuspendCounter++,us=wa=null,bt=p,V.H=y,V.A=S,Xe===null&&($t=null,tt=0,hp()),A}function kK(){for(;Xe!==null;)zP(Xe)}function DK(i,l){var d=bt;bt|=2;var p=FP(),y=$P();$t!==i||tt!==l?(Vp=null,qp=Gn()+500,dc(i,l)):lc=Ku(i,l);e:do try{if(At!==0&&Xe!==null){l=Xe;var S=Nr;t:switch(At){case 1:At=0,Nr=null,fc(i,l,S,1);break;case 2:case 9:if(YO(S)){At=0,Nr=null,jP(l);break}l=function(){At!==2&&At!==9||$t!==i||(At=7),Lo(i)},S.then(l,l);break e;case 3:At=7;break e;case 4:At=5;break e;case 7:YO(S)?(At=0,Nr=null,jP(l)):(At=0,Nr=null,fc(i,l,S,7));break;case 5:var A=null;switch(Xe.tag){case 26:A=Xe.memoizedState;case 5:case 27:var k=Xe;if(A?IN(A):k.stateNode.complete){At=0,Nr=null;var H=k.sibling;if(H!==null)Xe=H;else{var Y=k.return;Y!==null?(Xe=Y,Kp(Y)):Xe=null}break t}}At=0,Nr=null,fc(i,l,S,5);break;case 6:At=0,Nr=null,fc(i,l,S,6);break;case 8:GS(),un=6;break e;default:throw Error(r(462))}}LK();break}catch(ne){LP(i,ne)}while(!0);return us=wa=null,V.H=p,V.A=y,bt=d,Xe!==null?0:($t=null,tt=0,hp(),un)}function LK(){for(;Xe!==null&&!Qh();)zP(Xe)}function zP(i){var l=uP(i.alternate,i,Ss);i.memoizedProps=i.pendingProps,l===null?Kp(i):Xe=l}function jP(i){var l=i,d=l.alternate;switch(l.tag){case 15:case 0:l=oP(d,l,l.pendingProps,l.type,void 0,tt);break;case 11:l=oP(d,l,l.pendingProps,l.type.render,l.ref,tt);break;case 5:cS(l);default:fP(d,l),l=Xe=$O(l,Ss),l=uP(d,l,Ss)}i.memoizedProps=i.pendingProps,l===null?Kp(i):Xe=l}function fc(i,l,d,p){us=wa=null,cS(l),tc=null,dd=0;var y=l.return;try{if(xK(i,y,l,d,tt)){un=1,Dp(i,Gr(d,i.current)),Xe=null;return}}catch(S){if(y!==null)throw Xe=y,S;un=1,Dp(i,Gr(d,i.current)),Xe=null;return}l.flags&32768?(it||p===1?i=!0:lc||(tt&536870912)!==0?i=!1:(mi=i=!0,(p===2||p===9||p===3||p===6)&&(p=Mr.current,p!==null&&p.tag===13&&(p.flags|=16384))),BP(l,i)):Kp(l)}function Kp(i){var l=i;do{if((l.flags&32768)!==0){BP(l,mi);return}i=l.return;var d=AK(l.alternate,l,Ss);if(d!==null){Xe=d;return}if(l=l.sibling,l!==null){Xe=l;return}Xe=l=i}while(l!==null);un===0&&(un=5)}function BP(i,l){do{var d=RK(i.alternate,i);if(d!==null){d.flags&=32767,Xe=d;return}if(d=i.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(i=i.sibling,i!==null)){Xe=i;return}Xe=i=d}while(i!==null);un=6,Xe=null}function HP(i,l,d,p,y,S,A,k,H){i.cancelPendingCommit=null;do Zp();while(xn!==0);if((bt&6)!==0)throw Error(r(327));if(l!==null){if(l===i.current)throw Error(r(177));if(S=l.lanes|l.childLanes,S|=L0,mG(i,d,S,A,k,H),i===$t&&(Xe=$t=null,tt=0),uc=l,yi=i,Cs=d,qS=S,VS=y,PP=p,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,zK(Nl,function(){return KP(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=V.T,V.T=null,y=ee.p,ee.p=2,A=bt,bt|=4;try{TK(i,l,d)}finally{bt=A,ee.p=y,V.T=p}}xn=1,qP(),VP(),WP()}}function qP(){if(xn===1){xn=0;var i=yi,l=uc,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=V.T,V.T=null;var p=ee.p;ee.p=2;var y=bt;bt|=4;try{xP(l,i);var S=i1,A=OO(i.containerInfo),k=S.focusedElem,H=S.selectionRange;if(A!==k&&k&&k.ownerDocument&&TO(k.ownerDocument.documentElement,k)){if(H!==null&&M0(k)){var Y=H.start,ne=H.end;if(ne===void 0&&(ne=Y),"selectionStart"in k)k.selectionStart=Y,k.selectionEnd=Math.min(ne,k.value.length);else{var se=k.ownerDocument||document,Q=se&&se.defaultView||window;if(Q.getSelection){var J=Q.getSelection(),Ie=k.textContent.length,Le=Math.min(H.start,Ie),kt=H.end===void 0?Le:Math.min(H.end,Ie);!J.extend&&Le>kt&&(A=kt,kt=Le,Le=A);var K=RO(k,Le),W=RO(k,kt);if(K&&W&&(J.rangeCount!==1||J.anchorNode!==K.node||J.anchorOffset!==K.offset||J.focusNode!==W.node||J.focusOffset!==W.offset)){var Z=se.createRange();Z.setStart(K.node,K.offset),J.removeAllRanges(),Le>kt?(J.addRange(Z),J.extend(W.node,W.offset)):(Z.setEnd(W.node,W.offset),J.addRange(Z))}}}}for(se=[],J=k;J=J.parentNode;)J.nodeType===1&&se.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<se.length;k++){var oe=se[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}am=!!s1,i1=s1=null}finally{bt=y,ee.p=p,V.T=d}}i.current=l,xn=2}}function VP(){if(xn===2){xn=0;var i=yi,l=uc,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=V.T,V.T=null;var p=ee.p;ee.p=2;var y=bt;bt|=4;try{bP(i,l.alternate,l)}finally{bt=y,ee.p=p,V.T=d}}xn=3}}function WP(){if(xn===4||xn===3){xn=0,c0();var i=yi,l=uc,d=Cs,p=PP;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?xn=5:(xn=0,uc=yi=null,GP(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(vi=null),f0(d),l=l.stateNode,Ar&&typeof Ar.onCommitFiberRoot=="function")try{Ar.onCommitFiberRoot(Gu,l,void 0,(l.current.flags&128)===128)}catch{}if(p!==null){l=V.T,y=ee.p,ee.p=2,V.T=null;try{for(var S=i.onRecoverableError,A=0;A<p.length;A++){var k=p[A];S(k.value,{componentStack:k.stack})}}finally{V.T=l,ee.p=y}}(Cs&3)!==0&&Zp(),Lo(i),y=i.pendingLanes,(d&261930)!==0&&(y&42)!==0?i===WS?Rd++:(Rd=0,WS=i):Rd=0,Td(0)}}function GP(i,l){(i.pooledCacheLanes&=l)===0&&(l=i.pooledCache,l!=null&&(i.pooledCache=null,cd(l)))}function Zp(){return qP(),VP(),WP(),KP()}function KP(){if(xn!==5)return!1;var i=yi,l=qS;qS=0;var d=f0(Cs),p=V.T,y=ee.p;try{ee.p=32>d?32:d,V.T=null,d=VS,VS=null;var S=yi,A=Cs;if(xn=0,uc=yi=null,Cs=0,(bt&6)!==0)throw Error(r(331));var k=bt;if(bt|=4,TP(S.current),IP(S,S.current,A,d),bt=k,Td(0,!1),Ar&&typeof Ar.onPostCommitFiberRoot=="function")try{Ar.onPostCommitFiberRoot(Gu,S)}catch{}return!0}finally{ee.p=y,V.T=p,GP(i,l)}}function ZP(i,l,d){l=Gr(d,l),l=xS(i.stateNode,l,2),i=di(i,l,2),i!==null&&(Zu(i,2),Lo(i))}function Rt(i,l,d){if(i.tag===3)ZP(i,i,d);else for(;l!==null;){if(l.tag===3){ZP(l,i,d);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(vi===null||!vi.has(p))){i=Gr(d,i),d=YM(2),p=di(l,d,2),p!==null&&(QM(d,p,l,i),Zu(p,2),Lo(p));break}}l=l.return}}function ZS(i,l,d){var p=i.pingCache;if(p===null){p=i.pingCache=new PK;var y=new Set;p.set(l,y)}else y=p.get(l),y===void 0&&(y=new Set,p.set(l,y));y.has(d)||(jS=!0,y.add(d),i=UK.bind(null,i,l,d),l.then(i,i))}function UK(i,l,d){var p=i.pingCache;p!==null&&p.delete(l),i.pingedLanes|=i.suspendedLanes&d,i.warmLanes&=~d,$t===i&&(tt&d)===d&&(un===4||un===3&&(tt&62914560)===tt&&300>Gn()-Hp?(bt&2)===0&&dc(i,0):BS|=d,cc===tt&&(cc=0)),Lo(i)}function YP(i,l){l===0&&(l=q2()),i=ba(i,l),i!==null&&(Zu(i,l),Lo(i))}function FK(i){var l=i.memoizedState,d=0;l!==null&&(d=l.retryLane),YP(i,d)}function $K(i,l){var d=0;switch(i.tag){case 31:case 13:var p=i.stateNode,y=i.memoizedState;y!==null&&(d=y.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(l),YP(i,d)}function zK(i,l){return ho(i,l)}var Yp=null,hc=null,YS=!1,Qp=!1,QS=!1,Si=0;function Lo(i){i!==hc&&i.next===null&&(hc===null?Yp=hc=i:hc=hc.next=i),Qp=!0,YS||(YS=!0,BK())}function Td(i,l){if(!QS&&Qp){QS=!0;do for(var d=!1,p=Yp;p!==null;){if(i!==0){var y=p.pendingLanes;if(y===0)var S=0;else{var A=p.suspendedLanes,k=p.pingedLanes;S=(1<<31-Rr(42|i)+1)-1,S&=y&~(A&~k),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(d=!0,eN(p,S))}else S=tt,S=tp(p,p===$t?S:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(S&3)===0||Ku(p,S)||(d=!0,eN(p,S));p=p.next}while(d);QS=!1}}function jK(){QP()}function QP(){Qp=YS=!1;var i=0;Si!==0&&XK()&&(i=Si);for(var l=Gn(),d=null,p=Yp;p!==null;){var y=p.next,S=XP(p,l);S===0?(p.next=null,d===null?Yp=y:d.next=y,y===null&&(hc=d)):(d=p,(i!==0||(S&3)!==0)&&(Qp=!0)),p=y}xn!==0&&xn!==5||Td(i),Si!==0&&(Si=0)}function XP(i,l){for(var d=i.suspendedLanes,p=i.pingedLanes,y=i.expirationTimes,S=i.pendingLanes&-62914561;0<S;){var A=31-Rr(S),k=1<<A,H=y[A];H===-1?((k&d)===0||(k&p)!==0)&&(y[A]=pG(k,l)):H<=l&&(i.expiredLanes|=k),S&=~k}if(l=$t,d=tt,d=tp(i,i===l?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,d===0||i===l&&(At===2||At===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Wu(p),i.callbackNode=null,i.callbackPriority=0;if((d&3)===0||Ku(i,d)){if(l=d&-d,l===i.callbackPriority)return l;switch(p!==null&&Wu(p),f0(d)){case 2:case 8:d=Po;break;case 32:d=Nl;break;case 268435456:d=H2;break;default:d=Nl}return p=JP.bind(null,i),d=ho(d,p),i.callbackPriority=l,i.callbackNode=d,l}return p!==null&&p!==null&&Wu(p),i.callbackPriority=2,i.callbackNode=null,2}function JP(i,l){if(xn!==0&&xn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var d=i.callbackNode;if(Zp()&&i.callbackNode!==d)return null;var p=tt;return p=tp(i,i===$t?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(kP(i,p,l),XP(i,Gn()),i.callbackNode!=null&&i.callbackNode===d?JP.bind(null,i):null)}function eN(i,l){if(Zp())return null;kP(i,l,!0)}function BK(){eZ(function(){(bt&6)!==0?ho(Un,jK):QP()})}function XS(){if(Si===0){var i=Xl;i===0&&(i=Xh,Xh<<=1,(Xh&261888)===0&&(Xh=256)),Si=i}return Si}function tN(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:sp(""+i)}function nN(i,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,i.id&&d.setAttribute("form",i.id),l.parentNode.insertBefore(d,l),i=new FormData(i),d.parentNode.removeChild(d),i}function HK(i,l,d,p,y){if(l==="submit"&&d&&d.stateNode===y){var S=tN((y[lr]||null).action),A=p.submitter;A&&(l=(l=A[lr]||null)?tN(l.formAction):A.getAttribute("formAction"),l!==null&&(S=l,A=null));var k=new cp("action","action",null,p,y);i.push({event:k,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Si!==0){var H=A?nN(y,A):new FormData(y);yS(d,{pending:!0,data:H,method:y.method,action:S},null,H)}}else typeof S=="function"&&(k.preventDefault(),H=A?nN(y,A):new FormData(y),yS(d,{pending:!0,data:H,method:y.method,action:S},S,H))},currentTarget:y}]})}}for(var JS=0;JS<D0.length;JS++){var e1=D0[JS],qK=e1.toLowerCase(),VK=e1[0].toUpperCase()+e1.slice(1);po(qK,"on"+VK)}po(NO,"onAnimationEnd"),po(kO,"onAnimationIteration"),po(DO,"onAnimationStart"),po("dblclick","onDoubleClick"),po("focusin","onFocus"),po("focusout","onBlur"),po(aK,"onTransitionRun"),po(lK,"onTransitionStart"),po(cK,"onTransitionCancel"),po(LO,"onTransitionEnd"),Fl("onMouseEnter",["mouseout","mouseover"]),Fl("onMouseLeave",["mouseout","mouseover"]),Fl("onPointerEnter",["pointerout","pointerover"]),Fl("onPointerLeave",["pointerout","pointerover"]),ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ma("onBeforeInput",["compositionend","keypress","textInput","paste"]),ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Od="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),WK=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Od));function rN(i,l){l=(l&4)!==0;for(var d=0;d<i.length;d++){var p=i[d],y=p.event;p=p.listeners;e:{var S=void 0;if(l)for(var A=p.length-1;0<=A;A--){var k=p[A],H=k.instance,Y=k.currentTarget;if(k=k.listener,H!==S&&y.isPropagationStopped())break e;S=k,y.currentTarget=Y;try{S(y)}catch(ne){fp(ne)}y.currentTarget=null,S=H}else for(A=0;A<p.length;A++){if(k=p[A],H=k.instance,Y=k.currentTarget,k=k.listener,H!==S&&y.isPropagationStopped())break e;S=k,y.currentTarget=Y;try{S(y)}catch(ne){fp(ne)}y.currentTarget=null,S=H}}}}function Je(i,l){var d=l[h0];d===void 0&&(d=l[h0]=new Set);var p=i+"__bubble";d.has(p)||(oN(l,i,2,!1),d.add(p))}function t1(i,l,d){var p=0;l&&(p|=4),oN(d,i,p,l)}var Xp="_reactListening"+Math.random().toString(36).slice(2);function n1(i){if(!i[Xp]){i[Xp]=!0,Q2.forEach(function(d){d!=="selectionchange"&&(WK.has(d)||t1(d,!1,i),t1(d,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[Xp]||(l[Xp]=!0,t1("selectionchange",!1,l))}}function oN(i,l,d,p){switch(NN(l)){case 2:var y=SZ;break;case 8:y=CZ;break;default:y=v1}d=y.bind(null,l,d,i),y=void 0,!w0||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),p?y!==void 0?i.addEventListener(l,d,{capture:!0,passive:y}):i.addEventListener(l,d,!0):y!==void 0?i.addEventListener(l,d,{passive:y}):i.addEventListener(l,d,!1)}function r1(i,l,d,p,y){var S=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var A=p.tag;if(A===3||A===4){var k=p.stateNode.containerInfo;if(k===y)break;if(A===4)for(A=p.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===y)return;A=A.return}for(;k!==null;){if(A=Dl(k),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){p=S=A;continue e}k=k.parentNode}}p=p.return}cO(function(){var Y=S,ne=S0(d),se=[];e:{var Q=UO.get(i);if(Q!==void 0){var J=cp,Ie=i;switch(i){case"keypress":if(ap(d)===0)break e;case"keydown":case"keyup":J=$G;break;case"focusin":Ie="focus",J=I0;break;case"focusout":Ie="blur",J=I0;break;case"beforeblur":case"afterblur":J=I0;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=fO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=AG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=BG;break;case NO:case kO:case DO:J=OG;break;case LO:J=qG;break;case"scroll":case"scrollend":J=_G;break;case"wheel":J=WG;break;case"copy":case"cut":case"paste":J=PG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=pO;break;case"toggle":case"beforetoggle":J=KG}var Le=(l&4)!==0,kt=!Le&&(i==="scroll"||i==="scrollend"),K=Le?Q!==null?Q+"Capture":null:Q;Le=[];for(var W=Y,Z;W!==null;){var oe=W;if(Z=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Z===null||K===null||(oe=Xu(W,K),oe!=null&&Le.push(Md(W,oe,Z))),kt)break;W=W.return}0<Le.length&&(Q=new J(Q,Ie,null,d,ne),se.push({event:Q,listeners:Le}))}}if((l&7)===0){e:{if(Q=i==="mouseover"||i==="pointerover",J=i==="mouseout"||i==="pointerout",Q&&d!==b0&&(Ie=d.relatedTarget||d.fromElement)&&(Dl(Ie)||Ie[kl]))break e;if((J||Q)&&(Q=ne.window===ne?ne:(Q=ne.ownerDocument)?Q.defaultView||Q.parentWindow:window,J?(Ie=d.relatedTarget||d.toElement,J=Y,Ie=Ie?Dl(Ie):null,Ie!==null&&(kt=s(Ie),Le=Ie.tag,Ie!==kt||Le!==5&&Le!==27&&Le!==6)&&(Ie=null)):(J=null,Ie=Y),J!==Ie)){if(Le=fO,oe="onMouseLeave",K="onMouseEnter",W="mouse",(i==="pointerout"||i==="pointerover")&&(Le=pO,oe="onPointerLeave",K="onPointerEnter",W="pointer"),kt=J==null?Q:Qu(J),Z=Ie==null?Q:Qu(Ie),Q=new Le(oe,W+"leave",J,d,ne),Q.target=kt,Q.relatedTarget=Z,oe=null,Dl(ne)===Y&&(Le=new Le(K,W+"enter",Ie,d,ne),Le.target=Z,Le.relatedTarget=kt,oe=Le),kt=oe,J&&Ie)t:{for(Le=GK,K=J,W=Ie,Z=0,oe=K;oe;oe=Le(oe))Z++;oe=0;for(var De=W;De;De=Le(De))oe++;for(;0<Z-oe;)K=Le(K),Z--;for(;0<oe-Z;)W=Le(W),oe--;for(;Z--;){if(K===W||W!==null&&K===W.alternate){Le=K;break t}K=Le(K),W=Le(W)}Le=null}else Le=null;J!==null&&sN(se,Q,J,Le,!1),Ie!==null&&kt!==null&&sN(se,kt,Ie,Le,!0)}}e:{if(Q=Y?Qu(Y):window,J=Q.nodeName&&Q.nodeName.toLowerCase(),J==="select"||J==="input"&&Q.type==="file")var mt=wO;else if(SO(Q))if(EO)mt=oK;else{mt=nK;var Oe=tK}else J=Q.nodeName,!J||J.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?Y&&y0(Y.elementType)&&(mt=wO):mt=rK;if(mt&&(mt=mt(i,Y))){CO(se,mt,d,ne);break e}Oe&&Oe(i,Q,Y),i==="focusout"&&Y&&Q.type==="number"&&Y.memoizedProps.value!=null&&v0(Q,"number",Q.value)}switch(Oe=Y?Qu(Y):window,i){case"focusin":(SO(Oe)||Oe.contentEditable==="true")&&(ql=Oe,P0=Y,id=null);break;case"focusout":id=P0=ql=null;break;case"mousedown":N0=!0;break;case"contextmenu":case"mouseup":case"dragend":N0=!1,MO(se,d,ne);break;case"selectionchange":if(iK)break;case"keydown":case"keyup":MO(se,d,ne)}var Ke;if(R0)e:{switch(i){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else Hl?yO(i,d)&&(nt="onCompositionEnd"):i==="keydown"&&d.keyCode===229&&(nt="onCompositionStart");nt&&(mO&&d.locale!=="ko"&&(Hl||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&Hl&&(Ke=uO()):(oi=ne,E0="value"in oi?oi.value:oi.textContent,Hl=!0)),Oe=Jp(Y,nt),0<Oe.length&&(nt=new hO(nt,i,null,d,ne),se.push({event:nt,listeners:Oe}),Ke?nt.data=Ke:(Ke=bO(d),Ke!==null&&(nt.data=Ke)))),(Ke=YG?QG(i,d):XG(i,d))&&(nt=Jp(Y,"onBeforeInput"),0<nt.length&&(Oe=new hO("onBeforeInput","beforeinput",null,d,ne),se.push({event:Oe,listeners:nt}),Oe.data=Ke)),HK(se,i,Y,d,ne)}rN(se,l)})}function Md(i,l,d){return{instance:i,listener:l,currentTarget:d}}function Jp(i,l){for(var d=l+"Capture",p=[];i!==null;){var y=i,S=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||S===null||(y=Xu(i,d),y!=null&&p.unshift(Md(i,y,S)),y=Xu(i,l),y!=null&&p.push(Md(i,y,S))),i.tag===3)return p;i=i.return}return[]}function GK(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function sN(i,l,d,p,y){for(var S=l._reactName,A=[];d!==null&&d!==p;){var k=d,H=k.alternate,Y=k.stateNode;if(k=k.tag,H!==null&&H===p)break;k!==5&&k!==26&&k!==27||Y===null||(H=Y,y?(Y=Xu(d,S),Y!=null&&A.unshift(Md(d,Y,H))):y||(Y=Xu(d,S),Y!=null&&A.push(Md(d,Y,H)))),d=d.return}A.length!==0&&i.push({event:l,listeners:A})}var KK=/\r\n?/g,ZK=/\u0000|\uFFFD/g;function iN(i){return(typeof i=="string"?i:""+i).replace(KK,`
|
|
88
|
+
`).replace(ZK,"")}function aN(i,l){return l=iN(l),iN(i)===l}function Nt(i,l,d,p,y,S){switch(d){case"children":typeof p=="string"?l==="body"||l==="textarea"&&p===""||zl(i,p):(typeof p=="number"||typeof p=="bigint")&&l!=="body"&&zl(i,""+p);break;case"className":rp(i,"class",p);break;case"tabIndex":rp(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":rp(i,d,p);break;case"style":aO(i,p,S);break;case"data":if(l!=="object"){rp(i,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||d!=="href")){i.removeAttribute(d);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=sp(""+p),i.setAttribute(d,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(d==="formAction"?(l!=="input"&&Nt(i,l,"name",y.name,y,null),Nt(i,l,"formEncType",y.formEncType,y,null),Nt(i,l,"formMethod",y.formMethod,y,null),Nt(i,l,"formTarget",y.formTarget,y,null)):(Nt(i,l,"encType",y.encType,y,null),Nt(i,l,"method",y.method,y,null),Nt(i,l,"target",y.target,y,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(d);break}p=sp(""+p),i.setAttribute(d,p);break;case"onClick":p!=null&&(i.onclick=is);break;case"onScroll":p!=null&&Je("scroll",i);break;case"onScrollEnd":p!=null&&Je("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}d=sp(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,""+p):i.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,""):i.removeAttribute(d);break;case"capture":case"download":p===!0?i.setAttribute(d,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(d,p):i.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(d,p):i.removeAttribute(d);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(d):i.setAttribute(d,p);break;case"popover":Je("beforetoggle",i),Je("toggle",i),np(i,"popover",p);break;case"xlinkActuate":ss(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":ss(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":ss(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":ss(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":ss(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":ss(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":ss(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":ss(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":ss(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":np(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=EG.get(d)||d,np(i,d,p))}}function o1(i,l,d,p,y,S){switch(d){case"style":aO(i,p,S);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(d=p.__html,d!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=d}}break;case"children":typeof p=="string"?zl(i,p):(typeof p=="number"||typeof p=="bigint")&&zl(i,""+p);break;case"onScroll":p!=null&&Je("scroll",i);break;case"onScrollEnd":p!=null&&Je("scrollend",i);break;case"onClick":p!=null&&(i.onclick=is);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!X2.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),l=d.slice(2,y?d.length-7:void 0),S=i[lr]||null,S=S!=null?S[d]:null,typeof S=="function"&&i.removeEventListener(l,S,y),typeof p=="function")){typeof S!="function"&&S!==null&&(d in i?i[d]=null:i.hasAttribute(d)&&i.removeAttribute(d)),i.addEventListener(l,p,y);break e}d in i?i[d]=p:p===!0?i.setAttribute(d,""):np(i,d,p)}}}function Bn(i,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",i),Je("load",i);var p=!1,y=!1,S;for(S in d)if(d.hasOwnProperty(S)){var A=d[S];if(A!=null)switch(S){case"src":p=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Nt(i,l,S,A,d,null)}}y&&Nt(i,l,"srcSet",d.srcSet,d,null),p&&Nt(i,l,"src",d.src,d,null);return;case"input":Je("invalid",i);var k=S=A=y=null,H=null,Y=null;for(p in d)if(d.hasOwnProperty(p)){var ne=d[p];if(ne!=null)switch(p){case"name":y=ne;break;case"type":A=ne;break;case"checked":H=ne;break;case"defaultChecked":Y=ne;break;case"value":S=ne;break;case"defaultValue":k=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,l));break;default:Nt(i,l,p,ne,d,null)}}rO(i,S,k,H,Y,A,y,!1);return;case"select":Je("invalid",i),p=A=S=null;for(y in d)if(d.hasOwnProperty(y)&&(k=d[y],k!=null))switch(y){case"value":S=k;break;case"defaultValue":A=k;break;case"multiple":p=k;default:Nt(i,l,y,k,d,null)}l=S,d=A,i.multiple=!!p,l!=null?$l(i,!!p,l,!1):d!=null&&$l(i,!!p,d,!0);return;case"textarea":Je("invalid",i),S=y=p=null;for(A in d)if(d.hasOwnProperty(A)&&(k=d[A],k!=null))switch(A){case"value":p=k;break;case"defaultValue":y=k;break;case"children":S=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:Nt(i,l,A,k,d,null)}sO(i,p,y,S);return;case"option":for(H in d)d.hasOwnProperty(H)&&(p=d[H],p!=null)&&(H==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":Nt(i,l,H,p,d,null));return;case"dialog":Je("beforetoggle",i),Je("toggle",i),Je("cancel",i),Je("close",i);break;case"iframe":case"object":Je("load",i);break;case"video":case"audio":for(p=0;p<Od.length;p++)Je(Od[p],i);break;case"image":Je("error",i),Je("load",i);break;case"details":Je("toggle",i);break;case"embed":case"source":case"link":Je("error",i),Je("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in d)if(d.hasOwnProperty(Y)&&(p=d[Y],p!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Nt(i,l,Y,p,d,null)}return;default:if(y0(l)){for(ne in d)d.hasOwnProperty(ne)&&(p=d[ne],p!==void 0&&o1(i,l,ne,p,d,void 0));return}}for(k in d)d.hasOwnProperty(k)&&(p=d[k],p!=null&&Nt(i,l,k,p,d,null))}function YK(i,l,d,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,S=null,A=null,k=null,H=null,Y=null,ne=null;for(J in d){var se=d[J];if(d.hasOwnProperty(J)&&se!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":H=se;default:p.hasOwnProperty(J)||Nt(i,l,J,null,p,se)}}for(var Q in p){var J=p[Q];if(se=d[Q],p.hasOwnProperty(Q)&&(J!=null||se!=null))switch(Q){case"type":S=J;break;case"name":y=J;break;case"checked":Y=J;break;case"defaultChecked":ne=J;break;case"value":A=J;break;case"defaultValue":k=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,l));break;default:J!==se&&Nt(i,l,Q,J,p,se)}}g0(i,A,k,H,Y,ne,S,y);return;case"select":J=A=k=Q=null;for(S in d)if(H=d[S],d.hasOwnProperty(S)&&H!=null)switch(S){case"value":break;case"multiple":J=H;default:p.hasOwnProperty(S)||Nt(i,l,S,null,p,H)}for(y in p)if(S=p[y],H=d[y],p.hasOwnProperty(y)&&(S!=null||H!=null))switch(y){case"value":Q=S;break;case"defaultValue":k=S;break;case"multiple":A=S;default:S!==H&&Nt(i,l,y,S,p,H)}l=k,d=A,p=J,Q!=null?$l(i,!!d,Q,!1):!!p!=!!d&&(l!=null?$l(i,!!d,l,!0):$l(i,!!d,d?[]:"",!1));return;case"textarea":J=Q=null;for(k in d)if(y=d[k],d.hasOwnProperty(k)&&y!=null&&!p.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Nt(i,l,k,null,p,y)}for(A in p)if(y=p[A],S=d[A],p.hasOwnProperty(A)&&(y!=null||S!=null))switch(A){case"value":Q=y;break;case"defaultValue":J=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==S&&Nt(i,l,A,y,p,S)}oO(i,Q,J);return;case"option":for(var Ie in d)Q=d[Ie],d.hasOwnProperty(Ie)&&Q!=null&&!p.hasOwnProperty(Ie)&&(Ie==="selected"?i.selected=!1:Nt(i,l,Ie,null,p,Q));for(H in p)Q=p[H],J=d[H],p.hasOwnProperty(H)&&Q!==J&&(Q!=null||J!=null)&&(H==="selected"?i.selected=Q&&typeof Q!="function"&&typeof Q!="symbol":Nt(i,l,H,Q,p,J));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Le in d)Q=d[Le],d.hasOwnProperty(Le)&&Q!=null&&!p.hasOwnProperty(Le)&&Nt(i,l,Le,null,p,Q);for(Y in p)if(Q=p[Y],J=d[Y],p.hasOwnProperty(Y)&&Q!==J&&(Q!=null||J!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,l));break;default:Nt(i,l,Y,Q,p,J)}return;default:if(y0(l)){for(var kt in d)Q=d[kt],d.hasOwnProperty(kt)&&Q!==void 0&&!p.hasOwnProperty(kt)&&o1(i,l,kt,void 0,p,Q);for(ne in p)Q=p[ne],J=d[ne],!p.hasOwnProperty(ne)||Q===J||Q===void 0&&J===void 0||o1(i,l,ne,Q,p,J);return}}for(var K in d)Q=d[K],d.hasOwnProperty(K)&&Q!=null&&!p.hasOwnProperty(K)&&Nt(i,l,K,null,p,Q);for(se in p)Q=p[se],J=d[se],!p.hasOwnProperty(se)||Q===J||Q==null&&J==null||Nt(i,l,se,Q,p,J)}function lN(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function QK(){if(typeof performance.getEntriesByType=="function"){for(var i=0,l=0,d=performance.getEntriesByType("resource"),p=0;p<d.length;p++){var y=d[p],S=y.transferSize,A=y.initiatorType,k=y.duration;if(S&&k&&lN(A)){for(A=0,k=y.responseEnd,p+=1;p<d.length;p++){var H=d[p],Y=H.startTime;if(Y>k)break;var ne=H.transferSize,se=H.initiatorType;ne&&lN(se)&&(H=H.responseEnd,A+=ne*(H<k?1:(k-Y)/(H-Y)))}if(--p,l+=8*(S+A)/(y.duration/1e3),i++,10<i)break}}if(0<i)return l/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var s1=null,i1=null;function em(i){return i.nodeType===9?i:i.ownerDocument}function cN(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function uN(i,l){if(i===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&l==="foreignObject"?0:i}function a1(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var l1=null;function XK(){var i=window.event;return i&&i.type==="popstate"?i===l1?!1:(l1=i,!0):(l1=null,!1)}var dN=typeof setTimeout=="function"?setTimeout:void 0,JK=typeof clearTimeout=="function"?clearTimeout:void 0,fN=typeof Promise=="function"?Promise:void 0,eZ=typeof queueMicrotask=="function"?queueMicrotask:typeof fN<"u"?function(i){return fN.resolve(null).then(i).catch(tZ)}:dN;function tZ(i){setTimeout(function(){throw i})}function Ci(i){return i==="head"}function hN(i,l){var d=l,p=0;do{var y=d.nextSibling;if(i.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(p===0){i.removeChild(y),vc(l);return}p--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")p++;else if(d==="html")Pd(i.ownerDocument.documentElement);else if(d==="head"){d=i.ownerDocument.head,Pd(d);for(var S=d.firstChild;S;){var A=S.nextSibling,k=S.nodeName;S[Yu]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&S.rel.toLowerCase()==="stylesheet"||d.removeChild(S),S=A}}else d==="body"&&Pd(i.ownerDocument.body);d=y}while(d);vc(l)}function pN(i,l){var d=i;i=0;do{var p=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),p&&p.nodeType===8)if(d=p.data,d==="/$"){if(i===0)break;i--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||i++;d=p}while(d)}function c1(i){var l=i.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":c1(d),p0(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}i.removeChild(d)}}function nZ(i,l,d,p){for(;i.nodeType===1;){var y=d;if(i.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Yu])switch(l){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(S=i.getAttribute("rel"),S==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(S!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(S=i.getAttribute("src"),(S!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&S&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(l==="input"&&i.type==="hidden"){var S=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===S)return i}else return i;if(i=Xr(i.nextSibling),i===null)break}return null}function rZ(i,l,d){if(l==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!d||(i=Xr(i.nextSibling),i===null))return null;return i}function mN(i,l){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Xr(i.nextSibling),i===null))return null;return i}function u1(i){return i.data==="$?"||i.data==="$~"}function d1(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function oZ(i,l){var d=i.ownerDocument;if(i.data==="$~")i._reactRetry=l;else if(i.data!=="$?"||d.readyState!=="loading")l();else{var p=function(){l(),d.removeEventListener("DOMContentLoaded",p)};d.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Xr(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return i}var f1=null;function gN(i){i=i.nextSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="/$"||d==="/&"){if(l===0)return Xr(i.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}i=i.nextSibling}return null}function vN(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var d=i.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return i;l--}else d!=="/$"&&d!=="/&"||l++}i=i.previousSibling}return null}function yN(i,l,d){switch(l=em(d),i){case"html":if(i=l.documentElement,!i)throw Error(r(452));return i;case"head":if(i=l.head,!i)throw Error(r(453));return i;case"body":if(i=l.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Pd(i){for(var l=i.attributes;l.length;)i.removeAttributeNode(l[0]);p0(i)}var Jr=new Map,bN=new Set;function tm(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ws=ee.d;ee.d={f:sZ,r:iZ,D:aZ,C:lZ,L:cZ,m:uZ,X:fZ,S:dZ,M:hZ};function sZ(){var i=ws.f(),l=Wp();return i||l}function iZ(i){var l=Ll(i);l!==null&&l.tag===5&&l.type==="form"?LM(l):ws.r(i)}var pc=typeof document>"u"?null:document;function SN(i,l,d){var p=pc;if(p&&typeof l=="string"&&l){var y=Vr(l);y='link[rel="'+i+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),bN.has(y)||(bN.add(y),i={rel:i,crossOrigin:d,href:l},p.querySelector(y)===null&&(l=p.createElement("link"),Bn(l,"link",i),Tn(l),p.head.appendChild(l)))}}function aZ(i){ws.D(i),SN("dns-prefetch",i,null)}function lZ(i,l){ws.C(i,l),SN("preconnect",i,l)}function cZ(i,l,d){ws.L(i,l,d);var p=pc;if(p&&i&&l){var y='link[rel="preload"][as="'+Vr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+Vr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+Vr(d.imageSizes)+'"]')):y+='[href="'+Vr(i)+'"]';var S=y;switch(l){case"style":S=mc(i);break;case"script":S=gc(i)}Jr.has(S)||(i=m({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:i,as:l},d),Jr.set(S,i),p.querySelector(y)!==null||l==="style"&&p.querySelector(Nd(S))||l==="script"&&p.querySelector(kd(S))||(l=p.createElement("link"),Bn(l,"link",i),Tn(l),p.head.appendChild(l)))}}function uZ(i,l){ws.m(i,l);var d=pc;if(d&&i){var p=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+Vr(p)+'"][href="'+Vr(i)+'"]',S=y;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=gc(i)}if(!Jr.has(S)&&(i=m({rel:"modulepreload",href:i},l),Jr.set(S,i),d.querySelector(y)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(kd(S)))return}p=d.createElement("link"),Bn(p,"link",i),Tn(p),d.head.appendChild(p)}}}function dZ(i,l,d){ws.S(i,l,d);var p=pc;if(p&&i){var y=Ul(p).hoistableStyles,S=mc(i);l=l||"default";var A=y.get(S);if(!A){var k={loading:0,preload:null};if(A=p.querySelector(Nd(S)))k.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":l},d),(d=Jr.get(S))&&h1(i,d);var H=A=p.createElement("link");Tn(H),Bn(H,"link",i),H._p=new Promise(function(Y,ne){H.onload=Y,H.onerror=ne}),H.addEventListener("load",function(){k.loading|=1}),H.addEventListener("error",function(){k.loading|=2}),k.loading|=4,nm(A,l,p)}A={type:"stylesheet",instance:A,count:1,state:k},y.set(S,A)}}}function fZ(i,l){ws.X(i,l);var d=pc;if(d&&i){var p=Ul(d).hoistableScripts,y=gc(i),S=p.get(y);S||(S=d.querySelector(kd(y)),S||(i=m({src:i,async:!0},l),(l=Jr.get(y))&&p1(i,l),S=d.createElement("script"),Tn(S),Bn(S,"link",i),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(y,S))}}function hZ(i,l){ws.M(i,l);var d=pc;if(d&&i){var p=Ul(d).hoistableScripts,y=gc(i),S=p.get(y);S||(S=d.querySelector(kd(y)),S||(i=m({src:i,async:!0,type:"module"},l),(l=Jr.get(y))&&p1(i,l),S=d.createElement("script"),Tn(S),Bn(S,"link",i),d.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(y,S))}}function CN(i,l,d,p){var y=(y=Fe.current)?tm(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=mc(d.href),d=Ul(y).hoistableStyles,p=d.get(l),p||(p={type:"style",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){i=mc(d.href);var S=Ul(y).hoistableStyles,A=S.get(i);if(A||(y=y.ownerDocument||y,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(i,A),(S=y.querySelector(Nd(i)))&&!S._p&&(A.instance=S,A.state.loading=5),Jr.has(i)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Jr.set(i,d),S||pZ(y,i,d,A.state))),l&&p===null)throw Error(r(528,""));return A}if(l&&p!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=gc(d),d=Ul(y).hoistableScripts,p=d.get(l),p||(p={type:"script",instance:null,count:0,state:null},d.set(l,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function mc(i){return'href="'+Vr(i)+'"'}function Nd(i){return'link[rel="stylesheet"]['+i+"]"}function wN(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function pZ(i,l,d,p){i.querySelector('link[rel="preload"][as="style"]['+l+"]")?p.loading=1:(l=i.createElement("link"),p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2}),Bn(l,"link",d),Tn(l),i.head.appendChild(l))}function gc(i){return'[src="'+Vr(i)+'"]'}function kd(i){return"script[async]"+i}function EN(i,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var p=i.querySelector('style[data-href~="'+Vr(d.href)+'"]');if(p)return l.instance=p,Tn(p),p;var y=m({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),Tn(p),Bn(p,"style",y),nm(p,d.precedence,i),l.instance=p;case"stylesheet":y=mc(d.href);var S=i.querySelector(Nd(y));if(S)return l.state.loading|=4,l.instance=S,Tn(S),S;p=wN(d),(y=Jr.get(y))&&h1(p,y),S=(i.ownerDocument||i).createElement("link"),Tn(S);var A=S;return A._p=new Promise(function(k,H){A.onload=k,A.onerror=H}),Bn(S,"link",p),l.state.loading|=4,nm(S,d.precedence,i),l.instance=S;case"script":return S=gc(d.src),(y=i.querySelector(kd(S)))?(l.instance=y,Tn(y),y):(p=d,(y=Jr.get(S))&&(p=m({},d),p1(p,y)),i=i.ownerDocument||i,y=i.createElement("script"),Tn(y),Bn(y,"link",p),i.head.appendChild(y),l.instance=y);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,nm(p,d.precedence,i));return l.instance}function nm(i,l,d){for(var p=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=p.length?p[p.length-1]:null,S=y,A=0;A<p.length;A++){var k=p[A];if(k.dataset.precedence===l)S=k;else if(S!==y)break}S?S.parentNode.insertBefore(i,S.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(i,l.firstChild))}function h1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.title==null&&(i.title=l.title)}function p1(i,l){i.crossOrigin==null&&(i.crossOrigin=l.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=l.referrerPolicy),i.integrity==null&&(i.integrity=l.integrity)}var rm=null;function xN(i,l,d){if(rm===null){var p=new Map,y=rm=new Map;y.set(d,p)}else y=rm,p=y.get(d),p||(p=new Map,y.set(d,p));if(p.has(i))return p;for(p.set(i,null),d=d.getElementsByTagName(i),y=0;y<d.length;y++){var S=d[y];if(!(S[Yu]||S[Fn]||i==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var A=S.getAttribute(l)||"";A=i+A;var k=p.get(A);k?k.push(S):p.set(A,[S])}}return p}function _N(i,l,d){i=i.ownerDocument||i,i.head.insertBefore(d,l==="title"?i.querySelector("head > title"):null)}function mZ(i,l,d){if(d===1||l.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(i=l.disabled,typeof l.precedence=="string"&&i==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function IN(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function gZ(i,l,d,p){if(d.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var y=mc(p.href),S=l.querySelector(Nd(y));if(S){l=S._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(i.count++,i=om.bind(i),l.then(i,i)),d.state.loading|=4,d.instance=S,Tn(S);return}S=l.ownerDocument||l,p=wN(p),(y=Jr.get(y))&&h1(p,y),S=S.createElement("link"),Tn(S);var A=S;A._p=new Promise(function(k,H){A.onload=k,A.onerror=H}),Bn(S,"link",p),d.instance=S}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(i.count++,d=om.bind(i),l.addEventListener("load",d),l.addEventListener("error",d))}}var m1=0;function vZ(i,l){return i.stylesheets&&i.count===0&&im(i,i.stylesheets),0<i.count||0<i.imgCount?function(d){var p=setTimeout(function(){if(i.stylesheets&&im(i,i.stylesheets),i.unsuspend){var S=i.unsuspend;i.unsuspend=null,S()}},6e4+l);0<i.imgBytes&&m1===0&&(m1=62500*QK());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&im(i,i.stylesheets),i.unsuspend)){var S=i.unsuspend;i.unsuspend=null,S()}},(i.imgBytes>m1?50:800)+l);return i.unsuspend=d,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(y)}}:null}function om(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)im(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var sm=null;function im(i,l){i.stylesheets=null,i.unsuspend!==null&&(i.count++,sm=new Map,l.forEach(yZ,i),sm=null,om.call(i))}function yZ(i,l){if(!(l.state.loading&4)){var d=sm.get(i);if(d)var p=d.get(null);else{d=new Map,sm.set(i,d);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<y.length;S++){var A=y[S];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(d.set(A.dataset.precedence,A),p=A)}p&&d.set(null,p)}y=l.instance,A=y.getAttribute("data-precedence"),S=d.get(A)||p,S===p&&d.set(null,y),d.set(A,y),this.count++,p=om.bind(this),y.addEventListener("load",p),y.addEventListener("error",p),S?S.parentNode.insertBefore(y,S.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),l.state.loading|=4}}var Dd={$$typeof:R,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function bZ(i,l,d,p,y,S,A,k,H){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=u0(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=u0(0),this.hiddenUpdates=u0(null),this.identifierPrefix=p,this.onUncaughtError=y,this.onCaughtError=S,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function AN(i,l,d,p,y,S,A,k,H,Y,ne,se){return i=new bZ(i,l,d,A,H,Y,ne,se,k),l=1,S===!0&&(l|=24),S=Or(3,null,null,l),i.current=S,S.stateNode=i,l=K0(),l.refCount++,i.pooledCache=l,l.refCount++,S.memoizedState={element:p,isDehydrated:d,cache:l},X0(S),i}function RN(i){return i?(i=Gl,i):Gl}function TN(i,l,d,p,y,S){y=RN(y),p.context===null?p.context=y:p.pendingContext=y,p=ui(l),p.payload={element:d},S=S===void 0?null:S,S!==null&&(p.callback=S),d=di(i,p,l),d!==null&&(pr(d,i,l),hd(d,i,l))}function ON(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var d=i.retryLane;i.retryLane=d!==0&&d<l?d:l}}function g1(i,l){ON(i,l),(i=i.alternate)&&ON(i,l)}function MN(i){if(i.tag===13||i.tag===31){var l=ba(i,67108864);l!==null&&pr(l,i,67108864),g1(i,67108864)}}function PN(i){if(i.tag===13||i.tag===31){var l=Dr();l=d0(l);var d=ba(i,l);d!==null&&pr(d,i,l),g1(i,l)}}var am=!0;function SZ(i,l,d,p){var y=V.T;V.T=null;var S=ee.p;try{ee.p=2,v1(i,l,d,p)}finally{ee.p=S,V.T=y}}function CZ(i,l,d,p){var y=V.T;V.T=null;var S=ee.p;try{ee.p=8,v1(i,l,d,p)}finally{ee.p=S,V.T=y}}function v1(i,l,d,p){if(am){var y=y1(p);if(y===null)r1(i,l,p,lm,d),kN(i,p);else if(EZ(y,i,l,d,p))p.stopPropagation();else if(kN(i,p),l&4&&-1<wZ.indexOf(i)){for(;y!==null;){var S=Ll(y);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var A=pa(S.pendingLanes);if(A!==0){var k=S;for(k.pendingLanes|=2,k.entangledLanes|=2;A;){var H=1<<31-Rr(A);k.entanglements[1]|=H,A&=~H}Lo(S),(bt&6)===0&&(qp=Gn()+500,Td(0))}}break;case 31:case 13:k=ba(S,2),k!==null&&pr(k,S,2),Wp(),g1(S,2)}if(S=y1(p),S===null&&r1(i,l,p,lm,d),S===y)break;y=S}y!==null&&p.stopPropagation()}else r1(i,l,p,null,d)}}function y1(i){return i=S0(i),b1(i)}var lm=null;function b1(i){if(lm=null,i=Dl(i),i!==null){var l=s(i);if(l===null)i=null;else{var d=l.tag;if(d===13){if(i=a(l),i!==null)return i;i=null}else if(d===31){if(i=c(l),i!==null)return i;i=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null)}}return lm=i,null}function NN(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(zt()){case Un:return 2;case Po:return 8;case Nl:case lG:return 32;case H2:return 268435456;default:return 32}default:return 32}}var S1=!1,wi=null,Ei=null,xi=null,Ld=new Map,Ud=new Map,_i=[],wZ="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function kN(i,l){switch(i){case"focusin":case"focusout":wi=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":xi=null;break;case"pointerover":case"pointerout":Ld.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ud.delete(l.pointerId)}}function Fd(i,l,d,p,y,S){return i===null||i.nativeEvent!==S?(i={blockedOn:l,domEventName:d,eventSystemFlags:p,nativeEvent:S,targetContainers:[y]},l!==null&&(l=Ll(l),l!==null&&MN(l)),i):(i.eventSystemFlags|=p,l=i.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),i)}function EZ(i,l,d,p,y){switch(l){case"focusin":return wi=Fd(wi,i,l,d,p,y),!0;case"dragenter":return Ei=Fd(Ei,i,l,d,p,y),!0;case"mouseover":return xi=Fd(xi,i,l,d,p,y),!0;case"pointerover":var S=y.pointerId;return Ld.set(S,Fd(Ld.get(S)||null,i,l,d,p,y)),!0;case"gotpointercapture":return S=y.pointerId,Ud.set(S,Fd(Ud.get(S)||null,i,l,d,p,y)),!0}return!1}function DN(i){var l=Dl(i.target);if(l!==null){var d=s(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){i.blockedOn=l,Z2(i.priority,function(){PN(d)});return}}else if(l===31){if(l=c(d),l!==null){i.blockedOn=l,Z2(i.priority,function(){PN(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){i.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}i.blockedOn=null}function cm(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var d=y1(i.nativeEvent);if(d===null){d=i.nativeEvent;var p=new d.constructor(d.type,d);b0=p,d.target.dispatchEvent(p),b0=null}else return l=Ll(d),l!==null&&MN(l),i.blockedOn=d,!1;l.shift()}return!0}function LN(i,l,d){cm(i)&&d.delete(l)}function xZ(){S1=!1,wi!==null&&cm(wi)&&(wi=null),Ei!==null&&cm(Ei)&&(Ei=null),xi!==null&&cm(xi)&&(xi=null),Ld.forEach(LN),Ud.forEach(LN)}function um(i,l){i.blockedOn===l&&(i.blockedOn=null,S1||(S1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,xZ)))}var dm=null;function UN(i){dm!==i&&(dm=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dm===i&&(dm=null);for(var l=0;l<i.length;l+=3){var d=i[l],p=i[l+1],y=i[l+2];if(typeof p!="function"){if(b1(p||d)===null)continue;break}var S=Ll(d);S!==null&&(i.splice(l,3),l-=3,yS(S,{pending:!0,data:y,method:d.method,action:p},p,y))}}))}function vc(i){function l(H){return um(H,i)}wi!==null&&um(wi,i),Ei!==null&&um(Ei,i),xi!==null&&um(xi,i),Ld.forEach(l),Ud.forEach(l);for(var d=0;d<_i.length;d++){var p=_i[d];p.blockedOn===i&&(p.blockedOn=null)}for(;0<_i.length&&(d=_i[0],d.blockedOn===null);)DN(d),d.blockedOn===null&&_i.shift();if(d=(i.ownerDocument||i).$$reactFormReplay,d!=null)for(p=0;p<d.length;p+=3){var y=d[p],S=d[p+1],A=y[lr]||null;if(typeof S=="function")A||UN(d);else if(A){var k=null;if(S&&S.hasAttribute("formAction")){if(y=S,A=S[lr]||null)k=A.formAction;else if(b1(y)!==null)continue}else k=A.action;typeof k=="function"?d[p+1]=k:(d.splice(p,3),p-=3),UN(d)}}}function FN(){function i(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(A){return y=A})},focusReset:"manual",scroll:"manual"})}function l(){y!==null&&(y(),y=null),p||setTimeout(d,20)}function d(){if(!p&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),y!==null&&(y(),y=null)}}}function C1(i){this._internalRoot=i}fm.prototype.render=C1.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,p=Dr();TN(d,p,i,l,null,null)},fm.prototype.unmount=C1.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;TN(i.current,2,null,i,null,null),Wp(),l[kl]=null}};function fm(i){this._internalRoot=i}fm.prototype.unstable_scheduleHydration=function(i){if(i){var l=K2();i={blockedOn:null,target:i,priority:l};for(var d=0;d<_i.length&&l!==0&&l<_i[d].priority;d++);_i.splice(d,0,i),d===0&&DN(i)}};var $N=t.version;if($N!=="19.2.7")throw Error(r(527,$N,"19.2.7"));ee.findDOMNode=function(i){var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(l),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var _Z={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hm.isDisabled&&hm.supportsFiber)try{Gu=hm.inject(_Z),Ar=hm}catch{}}return nf.createRoot=function(i,l){if(!o(i))throw Error(r(299));var d=!1,p="",y=WM,S=GM,A=KM;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(A=l.onRecoverableError)),l=AN(i,1,!1,null,null,d,p,null,y,S,A,FN),i[kl]=l.current,n1(i),new C1(l)},nf.hydrateRoot=function(i,l,d){if(!o(i))throw Error(r(299));var p=!1,y="",S=WM,A=GM,k=KM,H=null;return d!=null&&(d.unstable_strictMode===!0&&(p=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(S=d.onUncaughtError),d.onCaughtError!==void 0&&(A=d.onCaughtError),d.onRecoverableError!==void 0&&(k=d.onRecoverableError),d.formState!==void 0&&(H=d.formState)),l=AN(i,1,!0,l,d??null,p,y,H,S,A,k,FN),l.context=RN(null),d=l.current,p=Dr(),p=d0(p),y=ui(p),y.callback=null,di(d,y,p),d=p,l.current.lanes=d,Zu(l,d),Lo(l),i[kl]=l.current,n1(i),new fm(l)},nf.version="19.2.7",nf}var dU;function LSe(){if(dU)return Ox.exports;dU=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ox.exports=DSe(),Ox.exports}var USe=LSe();const FSe={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)};function $Se({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:o,sseDefaultRetryDelay:s,sseMaxRetryAttempts:a,sseMaxRetryDelay:c,sseSleepFn:u,url:f,...h}){let m;const g=u??(b=>new Promise(E=>setTimeout(E,b)));return{stream:async function*(){let b=s??3e3,E=0;const x=h.signal??new AbortController().signal;for(;!x.aborted;){E++;const I=h.headers instanceof Headers?h.headers:new Headers(h.headers);m!==void 0&&I.set("Last-Event-ID",m);try{const R={redirect:"follow",...h,body:h.serializedBody,headers:I,signal:x};let M=new Request(f,R);e&&(M=await e(f,R));const N=await(h.fetch??globalThis.fetch)(M);if(!N.ok)throw new Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw new Error("No body in SSE response");const T=N.body.pipeThrough(new TextDecoderStream).getReader();let L="";const $=()=>{try{T.cancel()}catch{}};x.addEventListener("abort",$);try{for(;;){const{done:G,value:z}=await T.read();if(G)break;L+=z,L=L.replace(/\r\n?/g,`
|
|
89
|
+
`);const F=L.split(`
|
|
90
|
+
|
|
91
|
+
`);L=F.pop()??"";for(const q of F){const X=q.split(`
|
|
92
|
+
`),Se=[];let V;for(const ge of X)if(ge.startsWith("data:"))Se.push(ge.replace(/^data:\s*/,""));else if(ge.startsWith("event:"))V=ge.replace(/^event:\s*/,"");else if(ge.startsWith("id:"))m=ge.replace(/^id:\s*/,"");else if(ge.startsWith("retry:")){const Te=Number.parseInt(ge.replace(/^retry:\s*/,""),10);Number.isNaN(Te)||(b=Te)}let ee,pe=!1;if(Se.length){const ge=Se.join(`
|
|
93
|
+
`);try{ee=JSON.parse(ge),pe=!0}catch{ee=ge}}pe&&(o&&await o(ee),r&&(ee=await r(ee))),n?.({data:ee,event:V,id:m,retry:b}),Se.length&&(yield ee)}}}finally{x.removeEventListener("abort",$),T.releaseLock()}break}catch(R){if(t?.(R),a!==void 0&&E>=a)break;const M=Math.min(b*2**(E-1),c??3e4);await g(M)}}}()}}const zSe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},jSe=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},BSe=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},vj=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){const c=(e?o:o.map(u=>encodeURIComponent(u))).join(jSe(r));switch(r){case"label":return`.${c}`;case"matrix":return`;${n}=${c}`;case"simple":return c;default:return`${n}=${c}`}}const s=zSe(r),a=o.map(c=>r==="label"||r==="simple"?e?c:encodeURIComponent(c):ub({allowReserved:e,name:n,value:c})).join(s);return r==="label"||r==="matrix"?s+a:a},ub=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},yj=({allowReserved:e,explode:t,name:n,style:r,value:o,valueOnly:s})=>{if(o instanceof Date)return s?o.toISOString():`${n}=${o.toISOString()}`;if(r!=="deepObject"&&!t){let u=[];Object.entries(o).forEach(([h,m])=>{u=[...u,h,e?m:encodeURIComponent(m)]});const f=u.join(",");switch(r){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const a=BSe(r),c=Object.entries(o).map(([u,f])=>ub({allowReserved:e,name:r==="deepObject"?`${n}[${u}]`:u,value:f})).join(a);return r==="label"||r==="matrix"?a+c:c},HSe=/\{[^{}]+\}/g,qSe=({path:e,url:t})=>{let n=t;const r=t.match(HSe);if(r)for(const o of r){let s=!1,a=o.substring(1,o.length-1),c="simple";a.endsWith("*")&&(s=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),c="label"):a.startsWith(";")&&(a=a.substring(1),c="matrix");const u=e[a];if(u==null)continue;if(Array.isArray(u)){n=n.replace(o,vj({explode:s,name:a,style:c,value:u}));continue}if(typeof u=="object"){n=n.replace(o,yj({explode:s,name:a,style:c,value:u,valueOnly:!0}));continue}if(c==="matrix"){n=n.replace(o,`;${ub({name:a,value:u})}`);continue}const f=encodeURIComponent(c==="label"?`.${u}`:u);n=n.replace(o,f)}return n},VSe=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{const s=o.startsWith("/")?o:`/${o}`;let a=(e??"")+s;t&&(a=qSe({path:t,url:a}));let c=n?r(n):"";return c.startsWith("?")&&(c=c.substring(1)),c&&(a+=`?${c}`),a};function fU(e){const t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}const WSe=async(e,t)=>{const n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},bj=({parameters:e={},...t}={})=>r=>{const o=[];if(r&&typeof r=="object")for(const s in r){const a=r[s];if(a==null)continue;const c=e[s]||t;if(Array.isArray(a)){const u=vj({allowReserved:c.allowReserved,explode:!0,name:s,style:"form",value:a,...c.array});u&&o.push(u)}else if(typeof a=="object"){const u=yj({allowReserved:c.allowReserved,explode:!0,name:s,style:"deepObject",value:a,...c.object});u&&o.push(u)}else{const u=ub({allowReserved:c.allowReserved,name:s,value:a});u&&o.push(u)}}return o.join("&")},GSe=e=>{if(!e)return"stream";const t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>t.startsWith(n)))return"blob";if(t.startsWith("text/"))return"text"}},KSe=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):!1;async function ZSe(e){for(const t of e.security??[]){if(KSe(e,t.name))continue;const n=await WSe(t,e.auth);if(!n)continue;const r=t.name??"Authorization";switch(t.in){case"query":e.query||(e.query={}),e.query[r]=n;break;case"cookie":e.headers.append("Cookie",`${r}=${n}`);break;default:e.headers.set(r,n);break}}}const hU=e=>VSe({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:bj(e.querySerializer),url:e.url}),pU=(e,t)=>{const n={...e,...t};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=Sj(e.headers,t.headers),n},YSe=e=>{const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t},Sj=(...e)=>{const t=new Headers;for(const n of e){if(!n)continue;const r=n instanceof Headers?YSe(n):Object.entries(n);for(const[o,s]of r)if(s===null)t.delete(o);else if(Array.isArray(s))for(const a of s)t.append(o,a);else s!==void 0&&t.set(o,typeof s=="object"?JSON.stringify(s):s)}return t};class Nx{fns=[];clear(){this.fns=[]}eject(t){const n=this.getInterceptorIndex(t);this.fns[n]&&(this.fns[n]=null)}exists(t){const n=this.getInterceptorIndex(t);return!!this.fns[n]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,n){const r=this.getInterceptorIndex(t);return this.fns[r]?(this.fns[r]=n,t):!1}use(t){return this.fns.push(t),this.fns.length-1}}const QSe=()=>({error:new Nx,request:new Nx,response:new Nx}),XSe=bj({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),JSe={"Content-Type":"application/json"},Cj=(e={})=>({...FSe,headers:JSe,parseAs:"auto",querySerializer:XSe,...e}),e1e=(e={})=>{let t=pU(Cj(),e);const n=()=>({...t}),r=h=>(t=pU(t,h),n()),o=QSe(),s=async h=>{const m={...t,...h,fetch:h.fetch??t.fetch??globalThis.fetch,headers:Sj(t.headers,h.headers),serializedBody:void 0};m.security&&await ZSe(m),m.requestValidator&&await m.requestValidator(m),m.body!==void 0&&m.bodySerializer&&(m.serializedBody=m.bodySerializer(m.body)),(m.body===void 0||m.serializedBody==="")&&m.headers.delete("Content-Type");const g=m,v=hU(g);return{opts:g,url:v}},a=async h=>{const m=h.throwOnError??t.throwOnError,g=h.responseStyle??t.responseStyle;let v,C;try{const{opts:b,url:E}=await s(h),x={redirect:"follow",...b,body:fU(b)};v=new Request(E,x);for(const N of o.request.fns)N&&(v=await N(v,b));const I=b.fetch;C=await I(v);for(const N of o.response.fns)N&&(C=await N(C,v,b));const R={request:v,response:C};if(C.ok){const N=(b.parseAs==="auto"?GSe(C.headers.get("Content-Type")):b.parseAs)??"json";if(C.status===204||C.headers.get("Content-Length")==="0"){let L;switch(N){case"arrayBuffer":case"blob":case"text":L=await C[N]();break;case"formData":L=new FormData;break;case"stream":L=C.body;break;default:L={};break}return b.responseStyle==="data"?L:{data:L,...R}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await C[N]();break;case"json":{const L=await C.text();T=L?JSON.parse(L):{};break}case"stream":return b.responseStyle==="data"?C.body:{data:C.body,...R}}return N==="json"&&(b.responseValidator&&await b.responseValidator(T),b.responseTransformer&&(T=await b.responseTransformer(T))),b.responseStyle==="data"?T:{data:T,...R}}const M=await C.text();let D;try{D=JSON.parse(M)}catch{}throw D??M}catch(b){let E=b;for(const x of o.error.fns)x&&(E=await x(E,C,v,h));if(E=E||{},m)throw E;return g==="data"?void 0:{error:E,request:v,response:C}}},c=h=>m=>a({...m,method:h}),u=h=>async m=>{const{opts:g,url:v}=await s(m);return $Se({...g,body:g.body,method:h,onRequest:async(C,b)=>{let E=new Request(C,b);for(const x of o.request.fns)x&&(E=await x(E,g));return E},serializedBody:fU(g),url:v})};return{buildUrl:h=>hU({...t,...h}),connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),getConfig:n,head:c("HEAD"),interceptors:o,options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),request:a,setConfig:r,sse:{connect:u("CONNECT"),delete:u("DELETE"),get:u("GET"),head:u("HEAD"),options:u("OPTIONS"),patch:u("PATCH"),post:u("POST"),put:u("PUT"),trace:u("TRACE")},trace:c("TRACE")}},he=e1e(Cj({baseUrl:"https://api.remit.example.com"}));let mU=!1;const t1e=e=>{mU||(he.interceptors.request.use(async t=>{const n=await e.getToken();return n&&t.headers.set("Authorization",`Bearer ${n}`),t}),mU=!0)},n1e=({children:e})=>O.jsx(O.Fragment,{children:e}),r1e={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:n1e,Account:({fallback:e=null})=>O.jsx(O.Fragment,{children:e})},wj=_.createContext(r1e),o1e=wj.Provider,s1e=()=>_.useContext(wj),_v=new Set;let Iv=!1;const db=()=>{if(!Iv){Iv=!0;for(const e of _v)e(!0)}},i1e=()=>Iv,a1e=e=>(_v.add(e),()=>{_v.delete(e)}),gU=()=>{Iv=!1;for(const e of _v)e(!1)},fb=(e,t)=>{if(My(e)){db();return}_ie(e,t)&&iu(e)},l1e=(e,t)=>{fb(e,t.meta)},c1e=(e,t,n,r)=>{fb(e,r.meta)},vI=e=>new TextEncoder().encode(e),Ej={},yI={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),Ej[e]=t,yI[t]=e}function u1e(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(r in yI)t[n/2]=yI[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t}function Qa(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Ej[e[n]];return t}const th=e=>e instanceof Uint8Array?e:typeof e=="string"?vI(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),d1e=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";class Vs{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new Vs({...t,headers:{...t.headers}});return n.query&&(n.query=f1e(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Vs.clone(this)}}function f1e(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class nh{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const vU=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Xa=e=>encodeURIComponent(e).replace(/[!'()*]/g,h1e),h1e=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function gT(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Xa(n),Array.isArray(r))for(let o=0,s=r.length;o<s;o++)t.push(`${n}=${Xa(r[o])}`);else{let o=n;(r||typeof r=="string")&&(o+=`=${Xa(r)}`),t.push(o)}}return t.join("&")}const Hm="[aws-rum-web:unknown.unknown]";class Ce{static configure(t){Ce.debugEnabled=t}static getCallerInfo(){var t,n;try{const r=new Error().stack;if(!r)return Hm;const o=r.split(`
|
|
94
|
+
`);if(o.length<4)return Hm;const s=o[3];if(!s)return Hm;const a=s.match(/at (?:(.+?)\s+\()?/);if(a&&a.length>=2){const c=a[1].trim(),u=c.split(".");if(u.length>=2){const f=(t=u[u.length-2])!==null&&t!==void 0?t:"unknown",h=(n=u[u.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${h}]`}return`[aws-rum-web:${c}]`}}catch{}return Hm}static info(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.info(r,t,...n)}static debug(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.debug(r,t,...n)}static warn(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.warn(r,t,...n)}static error(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.error(r,t,...n)}}Ce.debugEnabled=!1;const yU=2048,bU=.2,p1e=()=>typeof CompressionStream<"u",m1e=async e=>{const t=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(t).arrayBuffer())},g1e=async e=>{const t=e.length;if(Ce.debug(`compressIfBeneficial called, payload size: ${t}B`),!p1e())return Ce.debug("CompressionStream not supported, skipping compression"),{body:e,compressed:!1};if(t<yU)return Ce.debug(`Payload size ${t}B below threshold ${yU}B, skipping compression`),{body:e,compressed:!1};const n=await m1e(e),r=1-n.length/t;return r>=bU?(Ce.debug(`Compressed ${t}B -> ${n.length}B (${(r*100).toFixed(1)}% reduction)`),{body:n,compressed:!0}):(Ce.debug(`Compression ratio ${(r*100).toFixed(1)}% below threshold ${bU*100}%, skipping`),{body:e,compressed:!1})},v1e="POST",y1e="application/json",b1e="text/plain;charset=UTF-8",S1e=64e3;class C1e{constructor(t,n){this.sendFetch=async r=>{var o,s;const a=JSON.stringify(SU(r)),c=(s=(o=this.config.compressionStrategy)===null||o===void 0?void 0:o.enabled)!==null&&s!==void 0?s:!1,{body:u,compressed:f}=c?await g1e(a):{body:a,compressed:!1},h=await this.getHttpRequestOptions(r,u,y1e,f);let m=new Vs(h);return this.signing&&(m=await this.signing.sign(m)),this.config.fetchRequestHandler.handle(m)},this.sendBeacon=async r=>{const o=JSON.stringify(SU(r));if(o.length>S1e)throw new Error("Payload too large for sendBeacon");const s=await this.getHttpRequestOptions(r,o,b1e,!1);let a=new Vs(s);return this.signing&&(a=await this.signing.presign(a)),this.config.beaconRequestHandler.handle(a)},this.getHttpRequestOptions=async(r,o,s,a)=>{const c=this.config.endpoint.pathname.replace(/\/$/,""),u=Object.assign({"content-type":s,host:this.config.endpoint.host},this.config.headers);a&&(u["Content-Encoding"]="gzip");const f={method:v1e,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:u,hostname:this.config.endpoint.hostname,path:`${c}/appmonitors/${r.AppMonitorDetails.id}`,body:o};return this.signing?Object.assign(Object.assign({},f),{headers:Object.assign(Object.assign({},f.headers),{"X-Amz-Content-Sha256":await this.signing.hashAndEncode(o)})}):f},this.config=t,this.signing=n}}const SU=e=>{const t=[];e.RumEvents.forEach(r=>t.push(w1e(r)));let n={BatchId:e.BatchId,AppMonitorDetails:e.AppMonitorDetails,UserDetails:e.UserDetails,RumEvents:t};return e.SessionMetadata&&(n=Object.assign(Object.assign({},n),{SessionMetadata:e.SessionMetadata})),e.Alias&&(n=Object.assign(Object.assign({},n),{Alias:e.Alias})),n},w1e=e=>({id:e.id,timestamp:Math.round(e.timestamp.getTime()/1e3),type:e.type,metadata:e.metadata,details:e.details});class E1e{handle(t){const n=this.sendBeacon(t);return new Promise((r,o)=>{n?r({response:new nh({statusCode:200})}):o()})}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}sendBeacon(t){let n=t.path;if(t.query){const s=gT(t.query);s&&(n+=`?${s}`)}const{port:r}=t,o=`${t.protocol}//${t.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(o,t.body)}}const x1e=(e=0)=>new Promise((t,n)=>{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)});let _1e=class{constructor({fetchFunction:t,requestTimeout:n}={}){this.requestTimeout=n,this.fetchFunction=t}destroy(){}handle(t,{abortSignal:n}={}){const r=this.requestTimeout;if(n?.aborted){const g=new Error("Request aborted");return g.name="AbortError",Promise.reject(g)}let o=t.path;if(t.query){const g=gT(t.query);g&&(o+=`?${g}`)}const{port:s,method:a}=t,c=`${t.protocol}//${t.hostname}${s?`:${s}`:""}${o}`,f={body:a==="GET"||a==="HEAD"?void 0:t.body,headers:new Headers(t.headers),method:a};typeof AbortController<"u"&&(f.signal=n);const h=new Request(c,f),m=[this.fetchFunction.apply(window,[h]).then(g=>{const v=g.headers,C={};for(const E of v.entries())C[E[0]]=E[1];return g.body!==void 0?{response:new nh({headers:C,statusCode:g.status,body:g.body})}:g.blob().then(E=>({response:new nh({headers:C,statusCode:g.status,body:E})}))}),x1e(r)];return n&&m.push(new Promise((g,v)=>{n.onabort=()=>{const C=new Error("Request aborted");C.name="AbortError",v(C)}})),Promise.race(m)}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}};const vT=e=>{if(crypto)return crypto.getRandomValues(e);if(msCrypto)return msCrypto.getRandomValues(e);throw new Error("No crypto library found.")},xj=[];for(let e=0;e<256;e++)xj[e]=(e+256).toString(16).substr(1);const hb="X-Amzn-Trace-Id",pb="traceparent",I1e=2,A1e=32,R1e=16,T1e=4,_j=(e,t)=>Array.isArray(t)?t.some(n=>n.test(e)):t,Ij={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},O1e=e=>200<=e&&e<300,Aj=e=>Math.floor(e/100)===4,yT=e=>Math.floor(e/100)===5,bT=e=>e===429,Rj=(e,t)=>{const n=t.urlsToInclude.some(o=>o.test(e)),r=t.urlsToExclude.some(o=>o.test(e));return n&&!r},jc=()=>Date.now()/1e3,M1e=(e,t,n)=>{const r={request:{}};return r.request.method=t?.method?t.method:"GET",r.request.traced=n,r.request.url=Gg(e),r},Tj=(e,t,n,r)=>({version:"1.0.0",name:e,origin:"AWS::RUM::AppMonitor",id:Pj(),start_time:t,trace_id:n?U1e():L1e(),end_time:void 0,subsegments:[],in_progress:!1}),Oj=(e,t,n)=>{const r={id:Pj(),name:e,start_time:t,end_time:void 0,in_progress:!1,namespace:e.endsWith(".amazonaws.com")?"aws":"remote"};return n&&(r.http=n),r},Mj=e=>{try{return e.hostname?e.hostname:e.url?new URL(e.url).hostname:new URL(e.toString()).hostname}catch{return window.location.hostname}},P1e=(e,t,n,r)=>{e.headers||(e.headers={}),r?e.headers[pb]=CT(t,n):e.headers[hb]=ST(t,n)},N1e=(e,t,n,r)=>{r?e.set(pb,CT(t,n)):e.set(hb,ST(t,n))},ST=(e,t)=>"Root="+e+";Parent="+t+";Sampled=1",CT=(e,t)=>"00-"+e+"-"+t+"-01",k1e=e=>e?.length===T1e&&e[0].length===I1e&&e[1].length===A1e&&e[2].length===R1e&&(e[3]==="00"||e[3]==="01"),D1e=(e,t)=>{var n,r;const o={};if(e)if(t){const s=(n=e.get(pb))===null||n===void 0?void 0:n.split("-");s&&k1e(s)&&(o.traceId=s[1],o.segmentId=s[2])}else{const s=(r=e.get(hb))===null||r===void 0?void 0:r.split(";");s?.length===3&&(o.traceId=s[0].split("Root=")[1],o.segmentId=s[1].split("Parent=")[1])}return o},Gg=e=>e.url?e.url:e.toString(),L1e=()=>`1-${F1e()}-${$1e()}`,U1e=()=>{const e=new Uint8Array(16);return vT(e),`${wT(e)}`},Pj=()=>{const e=new Uint8Array(8);return vT(e),wT(e)},F1e=()=>Math.floor(Date.now()/1e3).toString(16),$1e=()=>{const e=new Uint8Array(12);return vT(e),wT(e)},wT=e=>{let t="";for(let n=0;n<e.length;n++)t+=xj[e[n]];return t};class z1e{constructor(t,n,r=o=>2e3*Math.pow(2,o-1)){this.handler=t,this.retries=n,this.backoff=r}async handle(t){let n=this.retries;for(;;)try{const r=await this.handler.handle(t);if(O1e(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!bT(r)&&!yT(r))throw new Error(`${r}`);if(n<=0)throw r;n--,await this.sleep(this.backoff(this.retries-n))}}async sleep(t){return new Promise(n=>setTimeout(n,t))}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}}const uu="cwr_c",Av="cwr_i",Rv="cwr_s",Tv="cwr_u",j1e=3e4,B1e="arw-module",CU="CWR: Cannot dispatch; no AWS credentials.";class H1e{constructor(t,n,r,o,s){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>{if(this.doRequest()){const a=this.createRequest();return Ce.info(`Dispatching ${a.RumEvents.length} events via fetch`),this.rum.sendFetch(a).catch(this.handleReject)}},this.dispatchBeacon=async()=>{if(this.doRequest()){const a=this.createRequest();return Ce.info(`Dispatching ${a.RumEvents.length} events via beacon`),this.rum.sendBeacon(a).catch(()=>this.rum.sendFetch(a))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(a=>{Ce.error("Dispatch fetch failed silently:",a)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(a=>{Ce.error("Dispatch beacon failed silently:",a)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let a=this.rum.sendBeacon,c=this.rum.sendFetch;this.config.useBeacon||([a,c]=[c,a]);const u=this.createRequest(!0);Ce.debug(`Flushing ${u.RumEvents.length} events on page hide`),a(u).catch(()=>c(u)).catch(f=>{Ce.error("Page hide flush failed:",f)})}},this.handleReject=a=>{throw a instanceof Error&&(a.message==="403"&&this.config.signing&&this.shouldPurgeCredentials?(this.shouldPurgeCredentials=!1,this.forceRebuildClient()):this.disableCodes.includes(a.message)&&(Ce.error("Dispatch failed with status code:",a.message),this.disable())),a},this.defaultClientBuilder=(a,c,u,f)=>{const h=u&&this.signingConfigFactory?this.signingConfigFactory(u,c):void 0;return new C1e({fetchRequestHandler:new z1e(new _1e({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new E1e,endpoint:a,region:c,credentials:u,headers:this.headers,compressionStrategy:f},h)},this.applicationId=t,this.region=n,this.endpoint=r,this.eventCache=o,this.enabled=!0,this.buildClient=s.clientBuilder||this.defaultClientBuilder,this.config=s,this.headers=s.headers,this.startDispatchTimer(),s.signing?this.rum={sendFetch:()=>Promise.reject(new Error(CU)),sendBeacon:()=>Promise.reject(new Error(CU))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${uu}_${t}`:uu,this.identityStorageKey=this.config.cookieAttributes.unique?`${Av}_${t}`:Av}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,Ce.warn("Dispatch disabled")}setAwsCredentials(t){this.credentialProvider=t,this.rum=this.buildClient(this.endpoint,this.region,t,this.config.compressionStrategy),typeof t=="function"&&t()}setCognitoCredentialProviderFactory(t){this.cognitoCredentialProviderFactory=t}setSigningConfigFactory(t){this.signingConfigFactory=t}setCognitoCredentials(t,n){this.identityPoolId=t,this.guestRoleArn=n,this.cognitoCredentialProviderFactory&&this.setAwsCredentials(this.cognitoCredentialProviderFactory(this.config,this.applicationId,t,n))}startDispatchTimer(){document.addEventListener("visibilitychange",this.flushSync),document.addEventListener("pagehide",this.flushSync),!(this.config.dispatchInterval<=0||this.dispatchTimerId)&&(this.dispatchTimerId=window.setInterval(this.dispatchFetchFailSilent,this.config.dispatchInterval))}stopDispatchTimer(){document.removeEventListener("visibilitychange",this.flushSync),document.removeEventListener("pagehide",this.flushSync),this.dispatchTimerId&&(window.clearInterval(this.dispatchTimerId),this.dispatchTimerId=void 0)}doRequest(t=!1){return this.enabled?t&&this.eventCache.hasCandidates()?!0:this.eventCache.hasEvents():!1}createRequest(t=!1){return{BatchId:Gc(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(t),Alias:this.config.alias}}forceRebuildClient(){Ce.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(Ce.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(Ce.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}}const Nj={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),Nj[e]=t}function q1e(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Nj[e[n]];return t}class V1e{format(t){const n=[];for(const s of Object.keys(t)){const a=vI(s);n.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[s]))}const r=new Uint8Array(n.reduce((s,a)=>s+a.byteLength,0));let o=0;for(const s of n)r.set(s,o),o+=s.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?to.boolTrue:to.boolFalse]);case"byte":return Uint8Array.from([to.byte,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,to.short),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,to.integer),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const o=new Uint8Array(9);return o[0]=to.long,o.set(t.value.bytes,1),o;case"binary":const s=new DataView(new ArrayBuffer(3+t.value.byteLength));s.setUint8(0,to.byteArray),s.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(s.buffer);return a.set(t.value,3),a;case"string":const c=vI(t.value),u=new DataView(new ArrayBuffer(3+c.byteLength));u.setUint8(0,to.string),u.setUint16(1,c.byteLength,!1);const f=new Uint8Array(u.buffer);return f.set(c,3),f;case"timestamp":const h=new Uint8Array(9);return h[0]=to.timestamp,h.set(ET.fromNumber(t.value.valueOf()).bytes,1),h;case"uuid":if(!W1e.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const m=new Uint8Array(17);return m[0]=to.uuid,m.set(u1e(t.value.replace(/-/g,"")),1),m}}}var to;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(to||(to={}));const W1e=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ET{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,o=Math.abs(Math.round(t));r>-1&&o>0;r--,o/=256)n[r]=o;return t<0&&wU(n),new ET(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&wU(t),parseInt(Qa(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function wU(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const G1e="X-Amz-Algorithm",K1e="X-Amz-Credential",kj="X-Amz-Date",Z1e="X-Amz-SignedHeaders",Y1e="X-Amz-Expires",Dj="X-Amz-Signature",Lj="X-Amz-Security-Token",Uj="authorization",Fj=kj.toLowerCase(),Q1e="date",X1e=[Uj,Fj,Q1e],J1e=Dj.toLowerCase(),bI="x-amz-content-sha256",eCe=Lj.toLowerCase(),tCe={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},nCe=/^proxy-/,rCe=/^sec-/,kx="AWS4-HMAC-SHA256",oCe="AWS4-HMAC-SHA256-PAYLOAD",sCe="UNSIGNED-PAYLOAD",iCe=50,$j="aws4_request",aCe=3600*24*7,lCe=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===J1e)continue;const o=Xa(r);t.push(o);const s=e[r];typeof s=="string"?n[o]=`${o}=${Xa(s)}`:Array.isArray(s)&&(n[o]=s.slice(0).reduce((a,c)=>a.concat([`${o}=${Xa(c)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},cCe=e=>uCe(e).toISOString().replace(/\.\d{3}Z$/,"Z"),uCe=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class dCe{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:o,sha256:s,uriEscapePath:a=!0}){this.service=o,this.sha256=s,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=vU(r),this.credentialProvider=vU(n)}createCanonicalRequest(t,n,r){const o=Object.keys(n).sort();return`${t.method}
|
|
95
|
+
${this.getCanonicalPath(t)}
|
|
96
|
+
${lCe(t)}
|
|
97
|
+
${o.map(s=>`${s}:${n[s]}`).join(`
|
|
98
|
+
`)}
|
|
99
|
+
|
|
100
|
+
${o.join(";")}
|
|
101
|
+
${r}`}async createStringToSign(t,n,r,o){const s=new this.sha256;s.update(th(r));const a=await s.digest();return`${o}
|
|
102
|
+
${t}
|
|
103
|
+
${n}
|
|
104
|
+
${Qa(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const s of t.split("/"))s?.length!==0&&s!=="."&&(s===".."?n.pop():n.push(s));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return Xa(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=cCe(t).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}const qm={},Dx=[],Lx=(e,t,n)=>`${e}/${t}/${n}/${$j}`,fCe=async(e,t,n,r,o)=>{const s=await EU(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${o}:${Qa(s)}:${t.sessionToken}`;if(a in qm)return qm[a];for(Dx.push(a);Dx.length>iCe;)delete qm[Dx.shift()];let c=`AWS4${t.secretAccessKey}`;for(const u of[n,r,o,$j])c=await EU(e,c,u);return qm[a]=c},EU=(e,t,n)=>{const r=new e(t);return r.update(th(n)),r.digest()},xU=({headers:e},t,n)=>{const r={};for(const o of Object.keys(e).sort()){if(e[o]==null)continue;const s=o.toLowerCase();(s in tCe||t?.has(s)||nCe.test(s)||rCe.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[o].trim().replace(/\s+/g," "))}return r},Ux=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===bI)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||d1e(t)){const r=new n;return r.update(th(t)),Qa(await r.digest())}return sCe},hCe=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},pCe=(e,t={})=>{const{headers:n,query:r={}}=Vs.clone(e);for(const o of Object.keys(n)){const s=o.toLowerCase();(s.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(s)||t.hoistableHeaders?.has(s))&&(r[o]=n[o],delete n[o])}return{...e,headers:n,query:r}},_U=e=>{e=Vs.clone(e);for(const t of Object.keys(e.headers))X1e.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};class mCe extends dCe{headerFormatter=new V1e;constructor({applyChecksum:t,credentials:n,region:r,service:o,sha256:s,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:n,region:r,service:o,sha256:s,uriEscapePath:a})}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:o=3600,unsignableHeaders:s,unhoistableHeaders:a,signableHeaders:c,hoistableHeaders:u,signingRegion:f,signingService:h}=n,m=await this.credentialProvider();this.validateResolvedCredentials(m);const g=f??await this.regionProvider(),{longDate:v,shortDate:C}=this.formatDate(r);if(o>aCe)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const b=Lx(C,g,h??this.service),E=pCe(_U(t),{unhoistableHeaders:a,hoistableHeaders:u});m.sessionToken&&(E.query[Lj]=m.sessionToken),E.query[G1e]=kx,E.query[K1e]=`${m.accessKeyId}/${b}`,E.query[kj]=v,E.query[Y1e]=o.toString(10);const x=xU(E,s,c);return E.query[Z1e]=this.getCanonicalHeaderList(x),E.query[Dj]=await this.getSignature(v,b,this.getSigningKey(m,g,C,h),this.createCanonicalRequest(E,x,await Ux(t,this.sha256))),E}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:o,signingRegion:s,signingService:a,eventStreamCredentials:c}){const u=s??await this.regionProvider(),{shortDate:f,longDate:h}=this.formatDate(r),m=Lx(f,u,a??this.service),g=await Ux({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const C=Qa(await v.digest()),b=[oCe,h,m,o,C,g].join(`
|
|
105
|
+
`);return this.signString(b,{signingDate:r,signingRegion:u,signingService:a,eventStreamCredentials:c})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:o,eventStreamCredentials:s}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:o,priorSignature:t.priorSignature,eventStreamCredentials:s}).then(c=>({message:t.message,signature:c}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:o,eventStreamCredentials:s}={}){const a=s??await this.credentialProvider();this.validateResolvedCredentials(a);const c=r??await this.regionProvider(),{shortDate:u}=this.formatDate(n),f=new this.sha256(await this.getSigningKey(a,c,u,o));return f.update(th(t)),Qa(await f.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:o,signingRegion:s,signingService:a}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const u=s??await this.regionProvider(),f=_U(t),{longDate:h,shortDate:m}=this.formatDate(n),g=Lx(m,u,a??this.service);f.headers[Fj]=h,c.sessionToken&&(f.headers[eCe]=c.sessionToken);const v=await Ux(f,this.sha256);!hCe(bI,f.headers)&&this.applyChecksum&&(f.headers[bI]=v);const C=xU(f,o,r),b=await this.getSignature(h,g,this.getSigningKey(c,u,m,a),this.createCanonicalRequest(f,C,v));return f.headers[Uj]=`${kx} Credential=${c.accessKeyId}/${g}, SignedHeaders=${this.getCanonicalHeaderList(C)}, Signature=${b}`,f}async getSignature(t,n,r,o){const s=await this.createStringToSign(t,n,o,kx),a=new this.sha256(await r);return a.update(th(s)),Qa(await a.digest())}getSigningKey(t,n,r,o){return fCe(this.sha256,t,r,n,o||this.service)}}const gCe="rum",vCe={expiresIn:60},yCe=(e,t)=>{const n=new mCe({applyChecksum:!0,credentials:e,region:t,service:gCe,uriEscapePath:!0,sha256:nl});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,vCe),hashAndEncode:async r=>{const o=new nl;return o.update(r),q1e(await o.digest()).toLowerCase()}}};function IU(e,t){return new Request(e,t)}function bCe(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const Fx={supported:void 0};class mb{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new mb(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),Fx.supported===void 0&&(Fx.supported=typeof Request<"u"&&"keepalive"in IU("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const o=r??this.config.requestTimeout,s=this.config.keepAlive===!0,a=this.config.credentials;if(n?.aborted){const I=AU(n);return Promise.reject(I)}let c=t.path;const u=gT(t.query||{});u&&(c+=`?${u}`),t.fragment&&(c+=`#${t.fragment}`);let f="";if(t.username!=null||t.password!=null){const I=t.username??"",R=t.password??"";f=`${I}:${R}@`}const{port:h,method:m}=t,g=`${t.protocol}//${f}${t.hostname}${h?`:${h}`:""}${c}`,v=m==="GET"||m==="HEAD"?void 0:t.body,C={body:v,headers:new Headers(t.headers),method:m,credentials:a};this.config?.cache&&(C.cache=this.config.cache),v&&(C.duplex="half"),typeof AbortController<"u"&&(C.signal=n),Fx.supported&&(C.keepalive=s),typeof this.config.requestInit=="function"&&Object.assign(C,this.config.requestInit(t));let b=()=>{};const E=IU(g,C),x=[fetch(E).then(I=>{const R=I.headers,M={};for(const N of R.entries())M[N[0]]=N[1];return I.body!=null?{response:new nh({headers:M,reason:I.statusText,statusCode:I.status,body:I.body})}:I.blob().then(N=>({response:new nh({headers:M,reason:I.statusText,statusCode:I.status,body:N})}))}),bCe(o)];return n&&x.push(new Promise((I,R)=>{const M=()=>{const D=AU(n);R(D)};if(typeof n.addEventListener=="function"){const D=n;D.addEventListener("abort",M,{once:!0}),b=()=>D.removeEventListener("abort",M)}else n.onabort=M})),Promise.race(x).finally(b)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}function AU(e){const t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const o=new Error("Request aborted");return o.name="AbortError",o.cause=t,o}const r=new Error(String(t));return r.name="AbortError",r}const n=new Error("Request aborted");return n.name="AbortError",n}const $x=async e=>{const{value:t}=await e.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,t))},SCe=async e=>{const{value:t}=await e.body.getReader().read();return String.fromCharCode.apply(null,t)},CCe="POST",wCe="application/x-www-form-urlencoded",ECe="https:",xCe="AssumeRoleWithWebIdentity",_Ce="2011-06-15";class ICe{constructor(t){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:xCe,Version:_Ce}),o=new URLSearchParams(Object.entries(r)).toString(),s=new Vs({method:CCe,headers:{"content-type":wCe,host:this.hostname},protocol:ECe,hostname:this.hostname,body:o}),{response:a}=await this.fetchRequestHandler.handle(s),c=await SCe(a);return{accessKeyId:c.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:c.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:c.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(c.split("<Expiration>")[1].split("</Expiration>")[0])}}catch(r){throw new Error(`CWR: Failed to retrieve credentials from STS: ${r}`)}},this.hostname=`sts.${t.region}.amazonaws.com`,this.fetchRequestHandler=t.fetchRequestHandler}}const ACe="POST",RCe="application/x-amz-json-1.1",TCe="https:",OCe="AWSCognitoIdentityService.GetId",MCe="AWSCognitoIdentityService.GetOpenIdToken",PCe="AWSCognitoIdentityService.GetCredentialsForIdentity";class NCe{constructor(t){var n;this.getId=async r=>{var o;let s=null;try{s=JSON.parse(localStorage.getItem(this.identityStorageKey))}catch(a){!((o=this.config)===null||o===void 0)&&o.debug&&Ce.error("Failed to parse stored identity:",a)}if(s&&s.IdentityId)return Promise.resolve(s);try{const a=JSON.stringify(r),c=this.getHttpRequest(OCe,a),u=await $x((await this.fetchRequestHandler.handle(c)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:u.IdentityId}))}catch(f){Ce.error("Failed to store identity:",f)}return u}catch(a){throw new Error(`CWR: Failed to retrieve Cognito identity: ${a}`)}},this.getOpenIdToken=async r=>{try{const o=JSON.stringify(r),s=this.getHttpRequest(MCe,o),{response:a}=await this.fetchRequestHandler.handle(s);return this.validateOpenIdTokenResponse(await $x(a))}catch(o){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve Cognito OpenId token: ${o}`)}},this.getCredentialsForIdentity=async r=>{try{const o=JSON.stringify({IdentityId:r}),s=this.getHttpRequest(PCe,o),{response:a}=await this.fetchRequestHandler.handle(s),{AccessKeyId:c,Expiration:u,SecretKey:f,SessionToken:h}=this.validateCredenentialsResponse(await $x(a));return{accessKeyId:c,secretAccessKey:f,sessionToken:h,expiration:new Date(u*1e3)}}catch(o){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve credentials for Cognito identity: ${o}`)}},this.validateOpenIdTokenResponse=r=>{if("IdentityId"in r&&"Token"in r)return r;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown OpenIdToken response")},this.validateCredenentialsResponse=r=>{if("IdentityId"in r&&"Credentials"in r)return r.Credentials;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown Credentials response")},this.getHttpRequest=(r,o)=>new Vs({method:ACe,headers:{"content-type":RCe,"x-amz-target":r},protocol:TCe,hostname:this.hostname,body:o}),this.hostname=`cognito-identity.${t.region}.amazonaws.com`,this.fetchRequestHandler=t.fetchRequestHandler,this.config=t.clientConfig,this.identityStorageKey=!((n=t.clientConfig)===null||n===void 0)&&n.cookieAttributes.unique?`${Av}_${t.applicationId}`:Av}}class zj{constructor(t,n){this.ChainAnonymousCredentialsProvider=async()=>this.AnonymousCredentialsProvider().catch(this.AnonymousStorageCredentialsProvider).catch(this.AnonymousCognitoCredentialsProvider),this.AnonymousCredentialsProvider=async()=>new Promise((o,s)=>{if(this.renewCredentials())return s();o(this.credentials)}),this.AnonymousStorageCredentialsProvider=async()=>new Promise((o,s)=>{let a;try{a=JSON.parse(localStorage.getItem(this.credentialStorageKey))}catch{return s()}if(this.credentials=Object.assign(Object.assign({},a),{expiration:new Date(a.expiration)}),this.renewCredentials())return s();o(this.credentials)});const r=t.identityPoolId.split(":")[0];this.config=t,this.cognitoIdentityClient=new NCe({fetchRequestHandler:new mb,region:r,clientConfig:t,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${uu}_${n}`:uu}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const t=new Date(this.credentials.expiration.getTime()-j1e);return new Date>t}}class kCe extends zj{constructor(t,n){super(t,n),this.AnonymousCognitoCredentialsProvider=async()=>{let o=1;for(;;)try{const s=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),a=await this.cognitoIdentityClient.getOpenIdToken(s),c=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"cwr",WebIdentityToken:a.Token});this.credentials=c;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(c))}catch{}return Ce.debug("AWS credentials fetched successfully"),c}catch(s){if(o)o--,Ce.warn("AWS credential fetch failed, retrying");else throw Ce.error("AWS credential fetch failed:",s),s}};const r=t.identityPoolId.split(":")[0];this.stsClient=new ICe({fetchRequestHandler:new mb,region:r})}}class DCe extends zj{constructor(t,n){super(t,n),this.AnonymousCognitoCredentialsProvider=async()=>{let r=1;for(;;)try{const o=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),s=await this.cognitoIdentityClient.getCredentialsForIdentity(o.IdentityId);this.credentials=s;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(s))}catch{}return Ce.debug("AWS credentials fetched successfully"),s}catch(o){if(r)r--,Ce.warn("AWS credential fetch failed, retrying");else throw Ce.error("AWS credential fetch failed:",o),o}}}}const Hr="com.amazon.rum",LCe="com.amazonaws.rum",Ov=`${Hr}.http_event`,jj=`${Hr}.xray_trace_event`,UCe=`${Hr}.largest_contentful_paint_event`,FCe=`${Hr}.first_input_delay_event`,$Ce=`${Hr}.cumulative_layout_shift_event`,zCe=`${Hr}.interaction_to_next_paint_event`,SI=`${Hr}.performance_navigation_event`,Bj=`${Hr}.performance_resource_event`,jCe=`${Hr}.dom_event`,BCe=`${Hr}.js_error_event`,HCe=`${Hr}.page_view_event`,CI=`${Hr}.session_start_event`,RU=`${Hr}.rrweb_event`;class uo{constructor(t){this.enabled=!0,this.pluginId=uo.generatePluginId(t)}static generatePluginId(t){return`${uo.idPrefix}.${t}`}load(t){var n;this.context=t,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}uo.idPrefix=LCe;class qCe{constructor(t){this.context=t,this.plugins=new Map}addPlugin(t){const n=t.getPluginId();if(this.hasPlugin(n))throw new Error(`Plugin "${n}" already defined in the PluginManager`);this.plugins.set(n,t),t.load(this.context),Ce.debug(`Plugin loaded: ${n}`)}updatePlugin(t,n){var r;const o=this.getPlugin(t);(r=o?.update)===null||r===void 0||r.call(o,n)}enable(){this.plugins.forEach(t=>t.enable())}disable(){this.plugins.forEach(t=>t.disable())}flush(){this.plugins.forEach(t=>{var n;return(n=t.flush)===null||n===void 0?void 0:n.call(t)})}hasPlugin(t){return!!this.getPlugin(t)}record(t,n){const r=this.getPlugin(t);if(r?.record instanceof Function)r.record(n);else throw new Error("AWS RUM Client record: Invalid plugin ID")}getPlugin(t){var n;return(n=this.plugins.get(t))!==null&&n!==void 0?n:this.plugins.get(uo.generatePluginId(t))}}const TU=(e,t,n,r,o)=>{let s=e+"=";s+=t||"",o!==void 0&&(s+=`; Expires=${o.toUTCString()}`),s+=`; Domain=${n.domain}`,s+=`; Path=${n.path}`,s+=`; SameSite=${n.sameSite}`,s+=n.secure?"; Secure":"",document.cookie=s},VCe=(e,t)=>{let n=e+"=";n+=`; Expires=${new Date(0)}`,n+=`; Domain=${t.domain}`,n+=`; Path=${t.path}`,n+=`; SameSite=${t.sameSite}`,n+=t.secure?"Secure":"",document.cookie=n},OU=e=>{const t=document.cookie.split("; ");for(const n of t){const r=n.split("=");if(r[0]===e)return r[1]}return""};var Of;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(Of||(Of={}));const WCe=()=>{var e,t;const n=navigator.userAgentData;if(!n)return;const r=(e=n.brands)!==null&&e!==void 0?e:[],o=(t=r.find(s=>s.brand!=="Chromium"&&!s.brand.startsWith("Not")))!==null&&t!==void 0?t:r[0];return{browserName:o?.brand,browserVersion:o?.version,osName:n.platform,deviceType:n.mobile?"mobile":"desktop"}},Vm="00000000-0000-0000-0000-000000000000",GCe="desktop",KCe="web";class ZCe{constructor(t,n,r,o){this.isSessionIdManual=!1,this.isUserIdManual=!1,this.appMonitorDetails=t,this.config=n,this.recordEvent=r,this.pageManager=o,this.sessionCookieName=this.config.cookieAttributes.unique?`${Rv}_${this.appMonitorDetails.id}`:Rv,this.session={sessionId:Vm,record:this.sample(),eventCount:0},this.config.userId||this.initializeUser(),this.collectAttributes(),this.addSessionAttributes(this.config.sessionAttributes),this.getSessionFromCookie(),this.config.userId&&(this.isUserIdManual=!0,this.adoptUser(this.config.userId)),this.config.sessionId&&(this.isSessionIdManual=!0,this.adoptSession(this.config.sessionId))}isSampled(){return this.session.record}getSession(){return this.isSessionIdManual?(new Date>=this.sessionExpiry&&(this.session.eventCount=0,this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie()),this.session):(this.session.sessionId===Vm?this.createSession():new Date>=this.sessionExpiry&&this.createSession(),this.session)}getAttributes(){return this.attributes}addSessionAttributes(t){this.attributes=Object.assign(Object.assign({},this.attributes),t)}pinSessionId(t){if(!t){Ce.warn("pinSessionId called with empty value; ignoring.");return}this.isSessionIdManual=!0,t!==this.session.sessionId&&this.adoptSession(t)}startSession(t){return t?.userId!==void 0&&(t.userId?(this.isUserIdManual=!0,t.userId!==this.userId&&this.adoptUser(t.userId)):Ce.warn("startSession called with empty userId; ignoring user rotation.")),t?.sessionId!==void 0?t.sessionId?(this.isSessionIdManual=!0,this.adoptSession(t.sessionId),this.config.suppressSessionStartEvent||this.recordEvent(CI,{version:"1.0.0"})):(Ce.warn("startSession called with empty sessionId; minting a fresh session."),this.isSessionIdManual=!1,this.createSession()):(this.isSessionIdManual=!1,this.createSession()),this.session.sessionId}getUserId(){return this.isUserIdManual?this.userId:this.useCookies()?this.userId:Vm}pinUserId(t){if(!t){Ce.warn("pinUserId called with empty value; ignoring.");return}this.isUserIdManual=!0,t!==this.userId&&this.adoptUser(t)}incrementSessionEventCount(){this.session.eventCount++,this.renewSession()}isLimitExceeded(){return this.session.eventCount>=this.config.sessionEventLimit&&this.config.sessionEventLimit>0}canRecord(){return this.session.record&&!this.isLimitExceeded()}initializeUser(){let t="";this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.config.userIdRetentionDays<=0?this.userId="00000000-0000-0000-0000-000000000000":this.useCookies()?(t=this.getUserIdCookie(),this.userId=t||Gc(),this.createOrRenewUserCookie(t,this.userExpiry)):this.userId=Gc()}createOrRenewSessionCookie(t,n){btoa&&TU(this.sessionCookieName,btoa(JSON.stringify(t)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(t,n){TU(Tv,t,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return OU(Tv)}getSessionFromCookie(){if(this.useCookies()){const t=OU(this.sessionCookieName);if(t&&atob)try{this.session=JSON.parse(atob(t)),this.pageManager.resumeSession(this.session.page),Ce.info(`Restored session: ${this.session.sessionId}`)}catch(n){Ce.error("Failed to restore session",n)}}}storeSessionAsCookie(){this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),this.useCookies()&&this.createOrRenewSessionCookie(this.session,this.sessionExpiry)}createSession(){this.session={sessionId:Gc(),record:this.session.sessionId===Vm?this.session.record:this.sample(),eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),Ce.info(`Session start: ${this.session.sessionId}`),this.session.record||Ce.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(CI,{version:"1.0.0"})}adoptSession(t){this.session={sessionId:t,record:this.session.record,eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),Ce.info(`Adopted session: ${t}`)}adoptUser(t){this.userId=t,this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),Ce.info(`Adopted user: ${t}`)}renewSession(){this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.session.page=this.pageManager.getPage(),this.storeSessionAsCookie()}collectAttributes(){var t;const n=WCe();this.attributes={browserLanguage:navigator.language,browserName:n?.browserName,browserVersion:n?.browserVersion,osName:n?.osName,osVersion:n?.osVersion,deviceType:(t=n?.deviceType)!==null&&t!==void 0?t:GCe,platformType:KCe,domain:window.location.hostname,"aws:releaseId":this.config.releaseId},n||(this.attributes["aws:userAgent"]=navigator.userAgent)}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}sample(){return Math.random()<this.config.sessionSampleRate}}class YCe{constructor(t,n){this.config=t,this.record=n,this.page=void 0,this.resumed=!1,this.recordInteraction=!1}getPage(){return this.page}getAttributes(){return this.attributes}resumeSession(t){this.recordInteraction=!0,t&&(this.page=t,this.resumed=!0)}recordPageView(t){let n;if(typeof t=="string"?n=t:n=t.pageId,Ce.debug(`recordPageView called with pageId: ${n}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(n),Ce.info(`Landing page created: ${n}`);else if(this.page.pageId!==n)this.createNextPage(this.page,n),Ce.debug(`Navigation to new page: ${n}`);else if(this.resumed){Ce.info(`Resumed session for page: ${n}`),this.collectAttributes(this.page,typeof t=="object"?t:void 0);return}else{Ce.debug(`No page change detected for: ${n}`);return}this.collectAttributes(this.page,typeof t=="object"?t:void 0),this.recordPageViewEvent(this.page)}createNextPage(t,n){const r=Date.now();Ce.debug(`Creating next page ${n}, interaction: ${t.interaction+1}`),this.timeOnParentPage=r-t.start,this.resumed=!1,this.page={pageId:n,parentPageId:t.pageId,interaction:t.interaction+1,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:r}}createLandingPage(t){this.page={pageId:t,interaction:0,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:Date.now()}}collectAttributes(t,n){var r;this.attributes={title:!((r=n?.pageAttributes)===null||r===void 0)&&r.title?n.pageAttributes.title:document.title,pageId:t.pageId},this.recordInteraction&&(this.attributes.interaction=t.interaction,t.parentPageId!==void 0&&(this.attributes.parentPageId=t.parentPageId)),n?.pageTags&&(this.attributes.pageTags=n.pageTags),n?.pageAttributes&&(this.attributes=Object.assign(Object.assign({},n.pageAttributes),this.attributes))}createPageViewEvent(t){const n={version:"1.0.0",pageId:t.pageId};return this.recordInteraction&&(n.interaction=t.interaction,n.pageInteractionId=t.pageId+"-"+t.interaction,t.parentPageId!==void 0&&(n.parentPageInteractionId=t.parentPageId+"-"+(t.interaction-1),n.timeOnParentPage=this.timeOnParentPage),n.referrer=document.referrer,n.referrerDomain=this.getDomainFromReferrer()),n}recordPageViewEvent(t){this.record(HCe,this.createPageViewEvent(t))}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}getDomainFromReferrer(){try{return new URL(document.referrer).hostname}catch{return document.referrer==="localhost"?document.referrer:""}}}var rh;(function(e){e.EVENT="event"})(rh||(rh={}));class Hj{constructor(){this.subscribers=new Map}subscribe(t,n){var r;const o=(r=this.subscribers.get(t))!==null&&r!==void 0?r:[];o.length||this.subscribers.set(t,o),o.push(n)}unsubscribe(t,n){const r=this.subscribers.get(t);if(r){for(let o=0;o<r.length;o++)if(r[o]===n)return r.splice(o,1),!0}return!1}dispatch(t,n){const r=this.subscribers.get(t);if(r)for(const o of r)o(n)}}const QCe="3.1.0",XCe=new Set(["pageId","parentPageId","interaction","pageTags","title"]),zx=(e,t)=>{if(!e)return{};const n={};for(const[r,o]of Object.entries(e)){if(r.startsWith("aws:")){Ce.warn(`Dropping ${t} metadata key "${r}": "aws:" namespace is reserved.`);continue}if((t==="event"||t==="hook")&&XCe.has(r)){Ce.warn(`Dropping ${t} metadata key "${r}": owned by page state.`);continue}const s=typeof o;if(s!=="string"&&s!=="number"&&s!=="boolean"){Ce.warn(`Dropping ${t} metadata key "${r}": value must be string|number|boolean.`);continue}n[r]=o}return n};class JCe{constructor(t,n,r=new Hj){this.eventBus=r,this.events=[],this.candidates=new Map,this.droppedEvent=0,this.sessionLimitExceeded=0,this.recordPageView=o=>{this.isCurrentUrlAllowed()&&this.pageManager.recordPageView(o)},this.recordEvent=(o,s,a)=>{this.enabled&&this.isCurrentUrlAllowed()&&(o!==CI&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(o,s,a)):this.sessionLimitExceeded++)},this.recordCandidate=(o,s,a)=>{const c=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!c.record)return;const[u]=this.createEvent(o,s,a);if(this.candidates.has(o)){this.candidates.set(o,u);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(o,u),this.sessionManager.incrementSessionEventCount())},this.getSession=()=>{if(this.isCurrentUrlAllowed())return this.sessionManager.getSession()},this.getSessionId=()=>this.sessionManager.getSession().sessionId,this.pinSessionId=o=>{this.sessionManager.pinSessionId(o)},this.startSession=o=>this.sessionManager.startSession(o),this.getUserId=()=>this.sessionManager.getUserId(),this.pinUserId=o=>{this.sessionManager.pinUserId(o)},this.addRecordToCache=(o,s,a)=>{if(!this.enabled)return;if(this.events.length>=this.config.eventCacheSize){this.droppedEvent+=1;return}const[c,u]=this.createEvent(o,s,a);this.eventBus.dispatch(rh.EVENT,u),this.events.push(c)},this.createEvent=(o,s,a)=>{var c;const u=(c=this.pageManager.getAttributes())!==null&&c!==void 0?c:{},f=zx(a,"event");let h={};if(this.eventMetadataHook)try{const v=Object.freeze(Object.assign({},u)),C=this.eventMetadataHook(o,s,v);C&&(h=zx(C,"hook"))}catch(v){Ce.warn(`eventMetadataHook threw for type "${o}"; dropping hook output for this event.`,v)}const m=Object.assign(Object.assign(Object.assign({},u),h),f),g={id:Gc(),timestamp:new Date,type:o};return[Object.assign(Object.assign({},g),{details:JSON.stringify(s),metadata:JSON.stringify(m)}),Object.assign(Object.assign({},g),{details:s,metadata:m})]},this.appMonitorDetails=t,this.config=n,this.enabled=!0,this.pageManager=new YCe(n,this.recordEvent),this.sessionManager=new ZCe(t,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(zx(n.applicationAttributes,"application"))}enable(){this.enabled=!0}disable(){this.enabled=!1}setPluginFlushHook(t){this.pluginFlushHook=t}isSessionSampled(){return this.sessionManager.isSampled()}hasEvents(){if(this.sessionLimitExceeded>0){const t=this.events.length+this.sessionLimitExceeded;this.sessionManager.isSampled()?Ce.warn(`Dropped ${this.sessionLimitExceeded} of ${t} recently observed events (${(this.sessionLimitExceeded/t*100).toFixed(2)}%) because the session limit has exceeded. Consider increasing sessionEventLimit (currently ${this.config.sessionEventLimit}) to ${t} or more to avoid data loss.`):Ce.warn(`Dropped ${this.sessionLimitExceeded} of ${t} recently observed events (${(this.sessionLimitExceeded/t*100).toFixed(2)}%) because current session is not sampled. Consider increasing sessionSampleRate (currently ${this.config.sessionSampleRate}) to capture more user sessions.`),this.sessionLimitExceeded=0}return this.events.length!==0}hasCandidates(){return this.candidates.size!==0}getEventBatch(t=!1){var n;if(this.droppedEvent>0){const o=this.events.length+this.droppedEvent;Ce.warn(`Dropped ${this.droppedEvent} of ${o} recently observed events (${(this.droppedEvent/o*100).toFixed(2)}%) due to insufficient in-memory queue. Increase eventCacheSize to ${o} (currently ${this.config.eventCacheSize}) to avoid data loss.`),this.droppedEvent=0}let r=[];if(t&&((n=this.pluginFlushHook)===null||n===void 0||n.call(this)),t&&this.hasCandidates())if(this.candidates.size<=this.config.batchLimit)r=Array.from(this.candidates.values()),this.candidates.clear();else{let o=0;for(const s of Array.from(this.candidates.keys())){if(o++>=this.config.batchLimit)break;const a=this.candidates.get(s);a&&(r.push(a),this.candidates.delete(s))}}return this.events.length&&(this.events.length<=this.config.batchLimit-r.length?(r.push(...this.events),this.events=[]):r.push(...this.events.splice(0,this.config.batchLimit-r.length))),r}getAppMonitorDetails(){return this.appMonitorDetails}getUserDetails(){return{userId:this.sessionManager.getUserId(),sessionId:this.sessionManager.getSession().sessionId}}addSessionAttributes(t){this.sessionManager.addSessionAttributes(t)}getCommonMetadata(){return Object.assign(Object.assign(Object.assign({},this.sessionManager.getAttributes()),this.applicationAttributes),{version:"1.0.0","aws:client":this.installationMethod,"aws:clientVersion":QCe})}setEventMetadataHook(t){this.eventMetadataHook=t}clearEventMetadataHook(){this.eventMetadataHook=void 0}isCurrentUrlAllowed(){const t=document.location.toString(),n=this.config.pagesToExclude.some(o=>o.test(t));return this.config.pagesToInclude.some(o=>o.test(t))&&!n}}var Sn;(function(e){e.OTHER="other",e.STYLESHEET="stylesheet",e.DOCUMENT="document",e.SCRIPT="script",e.IMAGE="image",e.FONT="font"})(Sn||(Sn={}));var Ms;(function(e){e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.FRAME="frame",e.SCRIPT="script",e.CSS="css"})(Ms||(Ms={}));const MU=e=>[e.startTime,e.duration].join("#"),ewe=[{name:Sn.STYLESHEET,list:["css","less"]},{name:Sn.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:Sn.SCRIPT,list:["js"]},{name:Sn.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:Sn.FONT,list:["fnt","fon","otf","ttf","woff"]}],PU=(e,t)=>{let n=Sn.OTHER;if(e){const r=e.substring(e.lastIndexOf("/")+1),o=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];ewe.forEach(s=>{s.list.indexOf(o)>-1&&(n=s.name)})}if(t&&n===Sn.OTHER)switch(t){case Ms.IMAGE:case Ms.IMG:case Ms.INPUT:n=Sn.IMAGE;break;case Ms.IFRAME:case Ms.FRAME:n=Sn.DOCUMENT;break;case Ms.SCRIPT:n=Sn.SCRIPT;break;case Ms.CSS:n=Sn.STYLESHEET;break}return n},twe=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),nwe=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,rwe=(e,t)=>{try{return new URL(e).hostname===t&&nwe.test(e)}catch{return!1}},qj="dom-event",owe={interactionId:()=>"",enableMutationObserver:!1,events:[]};class xT extends uo{constructor(t){super(qj),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},owe),t)}static getElementInfo(t){const n={name:"UNKNOWN"};return t.target instanceof Node&&(n.name=t.target.nodeName),t.target instanceof Element&&t.target.id&&(n.id=t.target.id),n}enable(){if(document.readyState!=="complete"){window.addEventListener("load",()=>this.enable());return}this.enabled||(this.addListeners(),this.config.enableMutationObserver&&this.observeDOMMutation(),this.enabled=!0)}disable(){this.enabled&&(this.removeListeners(),this.observer&&this.observer.disconnect(),this.enabled=!1)}update(t){t.forEach(n=>{this.addEventHandler(n),this.config.events.push(n)})}onload(){this.enable()}removeListeners(){this.config.events.forEach(t=>this.removeEventHandler(t))}addListeners(){this.config.events.forEach(t=>this.addEventHandler(t))}getEventListener(t){return n=>{var r;const o=xT.getElementInfo(n),s=this.config.interactionId(n),a=Object.assign(Object.assign(Object.assign({version:"1.1.0",event:n.type,element:o.name},o.id?{elementId:o.id}:{}),s?{interactionId:s}:{}),t?{cssLocator:t}:{});!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(jCe,a)}}addEventHandler(t){const n=t.event,r=this.getEventListener(t.cssLocator),o=[],s=this.eventListenerMap.has(t)?this.eventListenerMap.get(t):[];if(t.cssLocator)document.querySelectorAll(t.cssLocator).forEach(c=>{o.push(c)});else if(t.elementId){const a=document.getElementById(t.elementId);a&&o.push(a)}else t.element&&o.push(t.element);o.forEach(a=>{a.addEventListener(n,r),s.push({element:a,eventListener:r})}),this.eventListenerMap.set(t,s)}removeEventHandler(t){const n=this.eventListenerMap.get(t);n&&(n.forEach(r=>{const o=r.element,s=r.eventListener;o.removeEventListener(t.event,s)}),this.eventListenerMap.delete(t))}observeDOMMutation(){this.observer=new MutationObserver(()=>{this.removeListeners(),this.addListeners()}),this.observer.observe(document,{childList:!0,subtree:!0})}}const swe=e=>{const t=typeof e;return(t==="object"||t==="function")&&!!e},iwe=e=>{const t={version:"1.0.0",type:"undefined",message:"undefined"};return e.type!==void 0&&(t.type=e.type),e.message!==void 0&&(t.message=e.message),e.filename!==void 0&&(t.filename=e.filename),e.lineno!==void 0&&(t.lineno=e.lineno),e.colno!==void 0&&(t.colno=e.colno),t},awe=(e,t)=>{e.type!=="unhandledrejection"&&(e.type=t.toString()),e.message=t.toString()},lwe=(e,t,n)=>{t.name&&(e.type=t.name),t.message&&(e.message=t.message),t.fileName&&(e.filename=t.fileName),t.lineNumber&&(e.lineno=t.lineNumber),t.columnNumber&&(e.colno=t.columnNumber),n&&t.stack&&(e.stack=t.stack.length>n?t.stack.substring(0,n)+"...":t.stack)},Vj=e=>e!==Object(e)&&e!==void 0&&e!==null,_T=(e,t)=>{const n=iwe(e),r=e.error;return swe(r)?lwe(n,r,t):Vj(r)&&awe(n,r),n},Wj="js-error",cwe={stackTraceLength:1e3,ignore:()=>!1};class uwe extends uo{constructor(t){super(Wj),this.eventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent(n)},this.promiseRejectEventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent({type:n.type,error:n.reason})},this.config=Object.assign(Object.assign({},cwe),t)}enable(){this.enabled||(this.addEventHandler(),this.enabled=!0)}disable(){this.enabled&&(this.removeEventHandler(),this.enabled=!1)}record(t){t instanceof ErrorEvent?this.recordJsErrorEvent(t):this.recordJsErrorEvent({type:"error",error:t})}onload(){this.addEventHandler()}recordJsErrorEvent(t){var n;(n=this.context)===null||n===void 0||n.record(BCe,_T(t,this.config.stackTraceLength))}addEventHandler(){window.addEventListener("error",this.eventHandler),window.addEventListener("unhandledrejection",this.promiseRejectEventHandler)}removeEventHandler(){window.removeEventListener("error",this.eventHandler),window.removeEventListener("unhandledrejection",this.promiseRejectEventHandler)}}const dwe=e=>e.entryType==="resource"&&(!/^https?:/.test(e.name)||/^(fetch|xmlhttprequest)$/.test(e.initiatorType)),IT={eventLimit:10,ignore:dwe,recordAllTypes:[Sn.DOCUMENT,Sn.SCRIPT,Sn.STYLESHEET,Sn.FONT],sampleTypes:[Sn.IMAGE,Sn.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},fwe="navigation",_c="navigation",jx="load";class hwe extends uo{constructor(t){super(fwe),this.eventListener=()=>{performance.getEntriesByType(_c).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(o=>o.entryType===_c).filter(o=>!this.config.ignore(o)).forEach(o=>{this.performanceNavigationEventHandlerTimingLevel2(o)})}).observe({entryTypes:[_c]})},this.performanceNavigationEventHandlerTimingLevel1=()=>{setTimeout(()=>{var r;const o=performance.timing,s=o.navigationStart,a={version:"1.0.0",initiatorType:"navigation",startTime:0,unloadEventStart:o.unloadEventStart>0?o.unloadEventStart-s:0,promptForUnload:o.unloadEventEnd-o.unloadEventStart,redirectStart:o.redirectStart>0?o.redirectStart-s:0,redirectTime:o.redirectEnd-o.redirectStart,fetchStart:o.fetchStart>0?o.fetchStart-s:0,domainLookupStart:o.domainLookupStart>0?o.domainLookupStart-s:0,dns:o.domainLookupEnd-o.domainLookupStart,connectStart:o.connectStart>0?o.connectStart-s:0,connect:o.connectEnd-o.connectStart,secureConnectionStart:o.secureConnectionStart>0?o.secureConnectionStart-s:0,tlsTime:o.secureConnectionStart>0?o.connectEnd-o.secureConnectionStart:0,requestStart:o.requestStart>0?o.requestStart-s:0,timeToFirstByte:o.responseStart-o.requestStart,responseStart:o.responseStart>0?o.responseStart-s:0,responseTime:o.responseStart>0?o.responseEnd-o.responseStart:0,domInteractive:o.domInteractive>0?o.domInteractive-s:0,domContentLoadedEventStart:o.domContentLoadedEventStart>0?o.domContentLoadedEventStart-s:0,domContentLoaded:o.domContentLoadedEventEnd-o.domContentLoadedEventStart,domComplete:o.domComplete>0?o.domComplete-s:0,domProcessingTime:o.loadEventStart-o.responseEnd,loadEventStart:o.loadEventStart>0?o.loadEventStart-s:0,loadEventTime:o.loadEventEnd-o.loadEventStart,duration:o.loadEventEnd-o.navigationStart,navigationTimingLevel:1};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(SI,a)},0)},this.performanceNavigationEventHandlerTimingLevel2=n=>{var r;const o={version:"1.0.0",initiatorType:n.initiatorType,navigationType:n.type,startTime:n.startTime,unloadEventStart:n.unloadEventStart,promptForUnload:n.unloadEventEnd-n.unloadEventStart,redirectCount:n.redirectCount,redirectStart:n.redirectStart,redirectTime:n.redirectEnd-n.redirectStart,workerStart:n.workerStart,workerTime:n.workerStart>0?n.fetchStart-n.workerStart:0,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,dns:n.domainLookupEnd-n.domainLookupStart,nextHopProtocol:n.nextHopProtocol,connectStart:n.connectStart,connect:n.connectEnd-n.connectStart,secureConnectionStart:n.secureConnectionStart,tlsTime:n.secureConnectionStart>0?n.connectEnd-n.secureConnectionStart:0,requestStart:n.requestStart,timeToFirstByte:n.responseStart-n.requestStart,responseStart:n.responseStart,responseTime:n.responseStart>0?n.responseEnd-n.responseStart:0,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoaded:n.domContentLoadedEventEnd-n.domContentLoadedEventStart,domComplete:n.domComplete,domProcessingTime:n.loadEventStart-n.responseEnd,loadEventStart:n.loadEventStart,loadEventTime:n.loadEventEnd-n.loadEventStart,duration:n.duration,headerSize:n.transferSize>0?n.transferSize-n.encodedBodySize:0,transferSize:n.transferSize,compressionRatio:n.encodedBodySize>0?n.decodedBodySize/n.encodedBodySize:0,navigationTimingLevel:2};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(SI,o)},this.config=Object.assign(Object.assign({},IT),t)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(jx,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(jx,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(_c).length?!!window.performance.getEntriesByType(_c)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(_c).filter(t=>!this.config.ignore(t)).forEach(t=>this.performanceNavigationEventHandlerTimingLevel2(t)):window.addEventListener(jx,this.eventListener))}}var Bx,NU;function pwe(){if(NU)return Bx;NU=1;function e(u){return typeof u=="function"}var t=console.error.bind(console);function n(u,f,h){var m=!!u[f]&&u.propertyIsEnumerable(f);Object.defineProperty(u,f,{configurable:!0,enumerable:m,writable:!0,value:h})}function r(u){u&&u.logger&&(e(u.logger)?t=u.logger:t("new logger isn't a function, not replacing"))}function o(u,f,h){if(!u||!u[f]){t("no original function "+f+" to wrap");return}if(!h){t("no wrapper function"),t(new Error().stack);return}if(!e(u[f])||!e(h)){t("original object and wrapper must be functions");return}var m=u[f],g=h(m,f);return n(g,"__original",m),n(g,"__unwrap",function(){u[f]===g&&n(u,f,m)}),n(g,"__wrapped",!0),n(u,f,g),g}function s(u,f,h){if(u)Array.isArray(u)||(u=[u]);else{t("must provide one or more modules to patch"),t(new Error().stack);return}if(!(f&&Array.isArray(f))){t("must provide one or more functions to wrap on modules");return}u.forEach(function(m){f.forEach(function(g){o(m,g,h)})})}function a(u,f){if(!u||!u[f]){t("no function to unwrap."),t(new Error().stack);return}if(!u[f].__unwrap)t("no original to unwrap to -- has "+f+" already been unwrapped?");else return u[f].__unwrap()}function c(u,f){if(u)Array.isArray(u)||(u=[u]);else{t("must provide one or more modules to patch"),t(new Error().stack);return}if(!(f&&Array.isArray(f))){t("must provide one or more functions to unwrap on modules");return}u.forEach(function(h){f.forEach(function(m){a(h,m)})})}return r.wrap=o,r.massWrap=s,r.unwrap=a,r.massUnwrap=c,Bx=r,Bx}var Mv=pwe();const mwe=Eu(Mv),kU=mF({__proto__:null,default:mwe},[Mv]);class AT extends uo{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const t=Mv.wrap.bind(kU);for(const n of this.patches)t(n.nodule,n.name,n.wrapper())}unpatchAll(){const t=Mv.unwrap.bind(kU);for(const n of this.patches)t(n.nodule,n.name)}patch(t=!0){this.enabled!==t&&(this.enabled=t,t?this.patchAll():this.unpatchAll())}}const gwe="page-view";class vwe extends AT{constructor(){super(gwe),this.pushState=()=>{const t=this;return n=>function(r,o,s){const a=n.apply(this,arguments);return t.recordPageView(),a}},this.replaceState=()=>{const t=this;return n=>function(r,o,s){const a=n.apply(this,arguments);return t.recordPageView(),a}},this.popstateListener=t=>{this.recordPageView()},this.recordPageView=()=>{this.context.recordPageView(this.createIdForCurrentPage())},this.enable()}onload(){this.addListener(),this.recordPageView()}get patches(){return[{nodule:History.prototype,name:"pushState",wrapper:this.pushState},{nodule:History.prototype,name:"replaceState",wrapper:this.replaceState}]}addListener(){window.addEventListener("popstate",this.popstateListener)}createIdForCurrentPage(){const t=window.location.pathname,n=window.location.hash;switch(this.context.config.pageIdFormat){case Of.PathAndHash:return t&&n?t+n:t||n||"";case Of.Hash:return n||"";case Of.Path:default:return t||""}}}const ywe="resource",Hx="resource";class bwe extends uo{constructor(t){super(ywe),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==Hx||this.config.ignore(r))return;const{name:o,initiatorType:s}=r,a=PU(o,s);this.config.recordAllTypes.includes(a)?this.recordResourceEvent(r):this.config.sampleTypes.includes(a)&&this.eventCount<this.config.eventLimit&&(this.recordResourceEvent(r),this.eventCount++)})},this.recordResourceEvent=({name:n,startTime:r,initiatorType:o,duration:s,transferSize:a})=>{var c;if(!rwe(n,this.context.config.endpointUrl.hostname)&&!((c=this.context)===null||c===void 0)&&c.record){const u={version:"1.0.0",initiatorType:o,startTime:r,duration:s,fileType:PU(n,o),transferSize:a};this.context.config.recordResourceUrl&&(u.targetUrl=n),this.context.record(Bj,u)}},this.config=Object.assign(Object.assign({},IT),t),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:Hx,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:Hx,buffered:!0})}}var wI,DU,gb=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},RT=function(e){if(document.readyState==="loading")return"loading";var t=gb();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},Swe=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},vb=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var r=e,o=r.id?"#"+r.id:Swe(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch{}return n},Gj=-1,Cwe=function(){return Gj},$u=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Gj=t.timeStamp,e(t))}),!0)},TT=function(){var e=gb();return e&&e.activationStart||0},Qo=function(e,t){var n=gb(),r="navigate";return Cwe()>=0?r="back-forward-cache":n&&(document.prerendering||TT()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Al=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(o){Promise.resolve().then((function(){t(o.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Xo=function(e,t,n,r){var o,s;return function(a){t.value>=0&&(a||r)&&((s=t.value-(o||0))||o===void 0)&&(o=t.value,t.delta=s,t.rating=(function(c,u){return c>u[1]?"poor":c>u[0]?"needs-improvement":"good"})(t.value,n),e(t))}},OT=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Dh=function(e){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&e()}))},yb=function(e){var t=!1;return function(){t||(e(),t=!0)}},Bc=-1,LU=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},Pv=function(e){document.visibilityState==="hidden"&&Bc>-1&&(Bc=e.type==="visibilitychange"?e.timeStamp:0,wwe())},UU=function(){addEventListener("visibilitychange",Pv,!0),addEventListener("prerenderingchange",Pv,!0)},wwe=function(){removeEventListener("visibilitychange",Pv,!0),removeEventListener("prerenderingchange",Pv,!0)},MT=function(){return Bc<0&&(Bc=LU(),UU(),$u((function(){setTimeout((function(){Bc=LU(),UU()}),0)}))),{get firstHiddenTime(){return Bc}}},bb=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},FU=[1800,3e3],Ewe=function(e,t){t=t||{},bb((function(){var n,r=MT(),o=Qo("FCP"),s=Al("paint",(function(a){a.forEach((function(c){c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<r.firstHiddenTime&&(o.value=Math.max(c.startTime-TT(),0),o.entries.push(c),n(!0)))}))}));s&&(n=Xo(e,o,FU,t.reportAllChanges),$u((function(a){o=Qo("FCP"),n=Xo(e,o,FU,t.reportAllChanges),OT((function(){o.value=performance.now()-a.timeStamp,n(!0)}))})))}))},$U=[.1,.25],xwe=function(e,t){(function(n,r){r=r||{},Ewe(yb((function(){var o,s=Qo("CLS",0),a=0,c=[],u=function(h){h.forEach((function(m){if(!m.hadRecentInput){var g=c[0],v=c[c.length-1];a&&m.startTime-v.startTime<1e3&&m.startTime-g.startTime<5e3?(a+=m.value,c.push(m)):(a=m.value,c=[m])}})),a>s.value&&(s.value=a,s.entries=c,o())},f=Al("layout-shift",u);f&&(o=Xo(n,s,$U,r.reportAllChanges),Dh((function(){u(f.takeRecords()),o(!0)})),$u((function(){a=0,s=Qo("CLS",0),o=Xo(n,s,$U,r.reportAllChanges),OT((function(){return o()}))})),setTimeout(o,0))})))})((function(n){var r=(function(o){var s,a={};if(o.entries.length){var c=o.entries.reduce((function(f,h){return f&&f.value>h.value?f:h}));if(c&&c.sources&&c.sources.length){var u=(s=c.sources).find((function(f){return f.node&&f.node.nodeType===1}))||s[0];u&&(a={largestShiftTarget:vb(u.node),largestShiftTime:c.startTime,largestShiftValue:c.value,largestShiftSource:u,largestShiftEntry:c,loadState:RT(c.startTime)})}}return Object.assign(o,{attribution:a})})(n);e(r)}),t)},Kj=0,qx=1/0,Wm=0,_we=function(e){e.forEach((function(t){t.interactionId&&(qx=Math.min(qx,t.interactionId),Wm=Math.max(Wm,t.interactionId),Kj=Wm?(Wm-qx)/7+1:0)}))},Zj=function(){return wI?Kj:performance.interactionCount||0},Iwe=function(){"interactionCount"in performance||wI||(wI=Al("event",_we,{type:"event",buffered:!0,durationThreshold:0}))},wo=[],Mf=new Map,Yj=0,Awe=function(){var e=Math.min(wo.length-1,Math.floor((Zj()-Yj)/50));return wo[e]},Qj=[],Rwe=function(e){if(Qj.forEach((function(o){return o(e)})),e.interactionId||e.entryType==="first-input"){var t=wo[wo.length-1],n=Mf.get(e.interactionId);if(n||wo.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Mf.set(r.id,r),wo.push(r)}wo.sort((function(o,s){return s.latency-o.latency})),wo.length>10&&wo.splice(10).forEach((function(o){return Mf.delete(o.id)}))}}},PT=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=yb(e),document.visibilityState==="hidden"?e():(n=t(e),Dh(e)),n},zU=[200,500],Twe=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},bb((function(){var n;Iwe();var r,o=Qo("INP"),s=function(c){PT((function(){c.forEach(Rwe);var u=Awe();u&&u.latency!==o.value&&(o.value=u.latency,o.entries=u.entries,r())}))},a=Al("event",s,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=Xo(e,o,zU,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Dh((function(){s(a.takeRecords()),r(!0)})),$u((function(){Yj=Zj(),wo.length=0,Mf.clear(),o=Qo("INP"),r=Xo(e,o,zU,t.reportAllChanges)})))})))},Xc=[],Fi=[],EI=0,NT=new WeakMap,Jc=new Map,xI=-1,Owe=function(e){Xc=Xc.concat(e),Xj()},Xj=function(){xI<0&&(xI=PT(Mwe))},Mwe=function(){Jc.size>10&&Jc.forEach((function(a,c){Mf.has(c)||Jc.delete(c)}));var e=wo.map((function(a){return NT.get(a.entries[0])})),t=Fi.length-50;Fi=Fi.filter((function(a,c){return c>=t||e.includes(a)}));for(var n=new Set,r=0;r<Fi.length;r++){var o=Fi[r];eB(o.startTime,o.processingEnd).forEach((function(a){n.add(a)}))}var s=Xc.length-1-50;Xc=Xc.filter((function(a,c){return a.startTime>EI&&c>s||n.has(a)})),xI=-1};Qj.push((function(e){e.interactionId&&e.target&&!Jc.has(e.interactionId)&&Jc.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;EI=Math.max(EI,e.processingEnd);for(var r=Fi.length-1;r>=0;r--){var o=Fi[r];if(Math.abs(n-o.renderTime)<=8){(t=o).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},Fi.push(t)),(e.interactionId||e.entryType==="first-input")&&NT.set(e,t),Xj()}));var $i,Pf,Jj,Nv,eB=function(e,t){for(var n,r=[],o=0;n=Xc[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},Pwe=function(e,t){DU||(DU=Al("long-animation-frame",Owe)),Twe((function(n){var r=(function(o){var s=o.entries[0],a=NT.get(s),c=s.processingStart,u=a.processingEnd,f=a.entries.sort((function(E,x){return E.processingStart-x.processingStart})),h=eB(s.startTime,u),m=o.entries.find((function(E){return E.target})),g=m&&m.target||Jc.get(s.interactionId),v=[s.startTime+s.duration,u].concat(h.map((function(E){return E.startTime+E.duration}))),C=Math.max.apply(Math,v),b={interactionTarget:vb(g),interactionTargetElement:g,interactionType:s.name.startsWith("key")?"keyboard":"pointer",interactionTime:s.startTime,nextPaintTime:C,processedEventEntries:f,longAnimationFrameEntries:h,inputDelay:c-s.startTime,processingDuration:u-c,presentationDelay:Math.max(C-u,0),loadState:RT(s.startTime)};return Object.assign(o,{attribution:b})})(n);e(r)}),t)},jU=[2500,4e3],Vx={},Nwe=function(e,t){(function(n,r){r=r||{},bb((function(){var o,s=MT(),a=Qo("LCP"),c=function(h){r.reportAllChanges||(h=h.slice(-1)),h.forEach((function(m){m.startTime<s.firstHiddenTime&&(a.value=Math.max(m.startTime-TT(),0),a.entries=[m],o())}))},u=Al("largest-contentful-paint",c);if(u){o=Xo(n,a,jU,r.reportAllChanges);var f=yb((function(){Vx[a.id]||(c(u.takeRecords()),u.disconnect(),Vx[a.id]=!0,o(!0))}));["keydown","click"].forEach((function(h){addEventListener(h,(function(){return PT(f)}),{once:!0,capture:!0})})),Dh(f),$u((function(h){a=Qo("LCP"),o=Xo(n,a,jU,r.reportAllChanges),OT((function(){a.value=performance.now()-h.timeStamp,Vx[a.id]=!0,o(!0)}))}))}}))})((function(n){var r=(function(o){var s={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:o.value};if(o.entries.length){var a=gb();if(a){var c=a.activationStart||0,u=o.entries[o.entries.length-1],f=u.url&&performance.getEntriesByType("resource").filter((function(C){return C.name===u.url}))[0],h=Math.max(0,a.responseStart-c),m=Math.max(h,f?(f.requestStart||f.startTime)-c:0),g=Math.max(m,f?f.responseEnd-c:0),v=Math.max(g,u.startTime-c);s={element:vb(u.element),timeToFirstByte:h,resourceLoadDelay:m-h,resourceLoadDuration:g-m,elementRenderDelay:v-g,navigationEntry:a,lcpEntry:u},u.url&&(s.url=u.url),f&&(s.lcpResourceEntry=f)}}return Object.assign(o,{attribution:s})})(n);e(r)}),t)},Sf={passive:!0,capture:!0},kwe=new Date,BU=function(e,t){$i||($i=t,Pf=e,Jj=new Date,nB(removeEventListener),tB())},tB=function(){if(Pf>=0&&Pf<Jj-kwe){var e={entryType:"first-input",name:$i.type,target:$i.target,cancelable:$i.cancelable,startTime:$i.timeStamp,processingStart:$i.timeStamp+Pf};Nv.forEach((function(t){t(e)})),Nv=[]}},Dwe=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?(function(n,r){var o=function(){BU(n,r),a()},s=function(){a()},a=function(){removeEventListener("pointerup",o,Sf),removeEventListener("pointercancel",s,Sf)};addEventListener("pointerup",o,Sf),addEventListener("pointercancel",s,Sf)})(t,e):BU(t,e)}},nB=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Dwe,Sf)}))},HU=[100,300],Lwe=function(e,t){t=t||{},bb((function(){var n,r=MT(),o=Qo("FID"),s=function(u){u.startTime<r.firstHiddenTime&&(o.value=u.processingStart-u.startTime,o.entries.push(u),n(!0))},a=function(u){u.forEach(s)},c=Al("first-input",a);n=Xo(e,o,HU,t.reportAllChanges),c&&(Dh(yb((function(){a(c.takeRecords()),c.disconnect()}))),$u((function(){var u;o=Qo("FID"),n=Xo(e,o,HU,t.reportAllChanges),Nv=[],Pf=-1,$i=null,nB(addEventListener),u=s,Nv.push(u),tB()})))}))},Uwe=function(e,t){Lwe((function(n){var r=(function(o){var s=o.entries[0],a={eventTarget:vb(s.target),eventType:s.name,eventTime:s.startTime,eventEntry:s,loadState:RT(s.startTime)};return Object.assign(o,{attribution:a})})(n);e(r)}),t)};const Fwe="web-vitals";class $we extends uo{constructor(t){super(Fwe),this.resourceEventIds=new Map,this.cacheLCPCandidates=twe(),this.handleEvent=n=>{switch(n.type){case Bj:const r=n.details;this.cacheLCPCandidates&&r.fileType===Sn.IMAGE&&this.resourceEventIds.set(MU(n.details),n.id);break;case SI:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},IT),t)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(rh.EVENT,this.handleEvent),Nwe(t=>this.handleLCP(t),{reportAllChanges:this.config.reportAllLCP}),Uwe(t=>this.handleFID(t)),xwe(t=>this.handleCLS(t),{reportAllChanges:!0}),Pwe(t=>this.handleINP(t),{reportAllChanges:!0})}handleLCP(t){var n,r;const o=t.attribution,s={element:o?.element,url:o?.url,timeToFirstByte:o?.timeToFirstByte,resourceLoadDelay:o?.resourceLoadDelay,resourceLoadTime:o?.resourceLoadDuration,elementRenderDelay:o?.elementRenderDelay};if(o?.lcpResourceEntry){const a=MU(o?.lcpResourceEntry);s.lcpResourceEntry=this.resourceEventIds.get(a)}this.navigationEventId&&(s.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(UCe,{version:"1.0.0",value:t.value,attribution:s}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(rh.EVENT,this.handleEvent),this.resourceEventIds.clear(),this.navigationEventId=void 0}handleCLS(t){const n=t.attribution,{record:r,recordCandidate:o}=this.context;(this.config.reportAllCLS?r:o)($Ce,{version:"1.0.0",value:t.value,attribution:{largestShiftTarget:n?.largestShiftTarget,largestShiftValue:n?.largestShiftValue,largestShiftTime:n?.largestShiftTime,loadState:n?.loadState}})}handleFID(t){var n;const r=t.attribution;(n=this.context)===null||n===void 0||n.record(FCe,{version:"1.0.0",value:t.value,attribution:{eventTarget:r?.eventTarget,eventType:r?.eventType,eventTime:r?.eventTime,loadState:r?.loadState}})}handleINP(t){const n=t.attribution,{record:r,recordCandidate:o}=this.context;(this.config.reportAllINP?r:o)(zCe,{version:"1.0.0",value:t.value,attribution:{interactionTarget:n?.interactionTarget,interactionTime:n?.interactionTime,nextPaintTime:n?.nextPaintTime,interactionType:n?.interactionType,inputDelay:n?.inputDelay,processingDuration:n?.processingDuration,presentationDelay:n?.presentationDelay,loadState:n?.loadState}})}}const zwe="fetch";class jwe extends AT{constructor(t){super(zwe),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.beginTrace=(n,r,o)=>{const s=jc(),a=M1e(n,r,!0),c=Tj(this.config.logicalServiceName,s,this.context.config.enableW3CTraceId),u=Oj(Mj(n),s,a);return c.subsegments.push(u),this.isTraceIdHeaderEnabled(n)&&this.addXRayTraceIdHeader(n,r,o,c),c},this.addXRayTraceIdHeader=(n,r,o,s)=>{if(n.headers)return N1e(n.headers,s.trace_id,s.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(o,r)),P1e(r,s.trace_id,s.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,o)=>{if(n){const s=jc();if(n.subsegments[0].end_time=s,n.end_time=s,r){n.subsegments[0].http.response={status:r.status},bT(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):Aj(r.status)?(n.subsegments[0].error=!0,n.error=!0):yT(r.status)&&(n.subsegments[0].fault=!0,n.fault=!0);const a=r.headers.get("Content-Length"),c=a?parseInt(a,10):NaN;isNaN(c)||(n.subsegments[0].http.response.content_length=c)}o&&(n.fault=!0,n.subsegments[0].fault=!0,o instanceof Object?this.appendErrorCauseFromObject(n.subsegments[0],o):Vj(o)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],o.toString())),this.context.record(jj,n)}},this.createHttpEvent=(n,r)=>{const o=n;return{version:"1.0.0",request:{url:Gg(n),method:r?.method?r.method:o.method?o.method:"GET"}}},this.recordHttpEventWithResponse=(n,r)=>{(this.config.recordAllRequests||!r.ok)&&(n.response={status:r.status,statusText:r.statusText},this.context.record(Ov,n))},this.recordHttpEventWithError=(n,r)=>{n.error=_T({type:"error",error:r},this.config.stackTraceLength),this.context.record(Ov,n)},this.fetch=(n,r,o,s,a)=>{const c=this.createHttpEvent(s,a);let u;if(!Rj(Gg(s),this.config))return n.apply(r,o);const f=D1e(s.headers,this.context.config.enableW3CTraceId);return f.traceId&&f.segmentId?(c.trace_id=f.traceId,c.segment_id=f.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(u=this.beginTrace(s,a,o),c.trace_id=u.trace_id,c.segment_id=u.subsegments[0].id),n.apply(r,o).then(h=>(this.endTrace(u,h,void 0),this.recordHttpEventWithResponse(c,h),h)).catch(h=>{throw this.endTrace(u,void 0,h),this.recordHttpEventWithError(c,h),h})},this.fetchWrapper=()=>{const n=this;return r=>function(o,s){return n.fetch(r,this,arguments,o,s)}},this.config=Object.assign(Object.assign({},Ij),t)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(t){const n=Gg(t);return _j(n,this.config.addXRayTraceIdHeader)}appendErrorCauseFromPrimitive(t,n){t.cause={exceptions:[{type:n}]}}appendErrorCauseFromObject(t,n){t.cause={exceptions:[{type:n.name,message:n.message}]}}}class Bwe extends Error{constructor(t){super(t),this.name="XMLHttpRequest error"}}const Hwe="xhr";class qwe extends AT{constructor(t){super(Hwe),this.addXRayTraceIdHeader=n=>_j(n,this.config.addXRayTraceIdHeader),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.handleXhrLoadEvent=n=>{const r=n.target,o=this.xhrMap.get(r);if(o){const s=jc();o.trace.end_time=s,o.trace.subsegments[0].end_time=s,o.trace.subsegments[0].http.response={status:r.status},bT(r.status)?(o.trace.subsegments[0].throttle=!0,o.trace.throttle=!0):Aj(r.status)?(o.trace.subsegments[0].error=!0,o.trace.error=!0):yT(r.status)&&(o.trace.subsegments[0].fault=!0,o.trace.fault=!0);const a=r.getResponseHeader("Content-Length"),c=a?parseInt(a,10):NaN;isNaN(c)||(o.trace.subsegments[0].http.response.content_length=c),this.recordTraceEvent(o.trace),this.recordHttpEventWithResponse(o,r)}},this.handleXhrErrorEvent=n=>{const r=n.target,o=this.xhrMap.get(r),s="XMLHttpRequest error",a=r.statusText?r.status.toString()+": "+r.statusText:r.status.toString();if(o){const c=jc();o.trace.fault=!0,o.trace.end_time=c,o.trace.subsegments[0].end_time=c,o.trace.subsegments[0].fault=!0,o.trace.subsegments[0].cause={exceptions:[{type:s,message:a}]},this.recordTraceEvent(o.trace),this.recordHttpEventWithError(o,r,new Bwe(a))}},this.handleXhrAbortEvent=n=>{const r=n.target,o=this.xhrMap.get(r);o&&this.handleXhrDetailsOnError(o,r,"XMLHttpRequest abort")},this.handleXhrTimeoutEvent=n=>{const r=n.target,o=this.xhrMap.get(r);this.handleXhrDetailsOnError(o,r,"XMLHttpRequest timeout")},this.initializeTrace=n=>{const r=jc();n.trace=Tj(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(Oj(Mj(n.url),r,{request:{method:n.method,url:n.url,traced:!0}}))},this.sendWrapper=()=>{const n=this;return r=>function(){const o=n.xhrMap.get(this);return o&&(this.addEventListener("load",n.handleXhrLoadEvent),this.addEventListener("error",n.handleXhrErrorEvent),this.addEventListener("abort",n.handleXhrAbortEvent),this.addEventListener("timeout",n.handleXhrTimeoutEvent),n.initializeTrace(o),!n.isSyntheticsUA&&n.isTracingEnabled()&&n.addXRayTraceIdHeader(o.url)&&n.isSessionRecorded()&&(n.context.config.enableW3CTraceId?this.setRequestHeader(pb,CT(o.trace.trace_id,o.trace.subsegments[0].id)):this.setRequestHeader(hb,ST(o.trace.trace_id,o.trace.subsegments[0].id)))),r.apply(this,arguments)}},this.openWrapper=()=>{const n=this;return r=>function(o,s,a){return Rj(s,n.config)&&n.xhrMap.set(this,{url:s,method:o,async:a}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},Ij),t),this.xhrMap=new Map,this.isSyntheticsUA=navigator.userAgent.includes("CloudWatchSynthetics")}onload(){this.enable()}get patches(){return[{nodule:XMLHttpRequest.prototype,name:"send",wrapper:this.sendWrapper},{nodule:XMLHttpRequest.prototype,name:"open",wrapper:this.openWrapper}]}handleXhrDetailsOnError(t,n,r){if(t){const o=jc();t.trace.end_time=o,t.trace.subsegments[0].end_time=o,t.trace.subsegments[0].error=!0,t.trace.subsegments[0].cause={exceptions:[{type:r}]},this.recordTraceEvent(t.trace),this.recordHttpEventWithError(t,n,r)}}statusOk(t){return t>=200&&t<300}recordHttpEventWithResponse(t,n){this.xhrMap.delete(n);const r={version:"1.0.0",request:{method:t.method,url:t.url},response:{status:n.status,statusText:n.statusText}};this.isTracingEnabled()&&(r.trace_id=t.trace.trace_id,r.segment_id=t.trace.subsegments[0].id),(this.config.recordAllRequests||!this.statusOk(n.status))&&this.context.record(Ov,r)}recordHttpEventWithError(t,n,r){this.xhrMap.delete(n);const o={version:"1.0.0",request:{method:t.method,url:t.url},error:_T({type:"error",error:r},this.config.stackTraceLength)};this.isTracingEnabled()&&(o.trace_id=t.trace.trace_id,o.segment_id=t.trace.subsegments[0].id),this.context.record(Ov,o)}recordTraceEvent(t){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(jj,t)}}var kv={},Vwe=Object.defineProperty,Wwe=(e,t,n)=>t in e?Vwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,we=(e,t,n)=>Wwe(e,typeof t!="symbol"?t+"":t,n),qU,Gwe=Object.defineProperty,Kwe=(e,t,n)=>t in e?Gwe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VU=(e,t,n)=>Kwe(e,typeof t!="symbol"?t+"":t,n),In=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(In||{});const WU={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},GU={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Gm={},Zwe=()=>!!globalThis.Zone;function kT(e){if(Gm[e])return Gm[e];const t=globalThis[e],n=t.prototype,r=e in WU?WU[e]:void 0,o=!!(r&&r.every(c=>{var u,f;return!!((f=(u=Object.getOwnPropertyDescriptor(n,c))==null?void 0:u.get)!=null&&f.toString().includes("[native code]"))})),s=e in GU?GU[e]:void 0,a=!!(s&&s.every(c=>{var u;return typeof n[c]=="function"&&((u=n[c])==null?void 0:u.toString().includes("[native code]"))}));if(o&&a&&!Zwe())return Gm[e]=t.prototype,t.prototype;try{const c=document.createElement("iframe");document.body.appendChild(c);const u=c.contentWindow;if(!u)return t.prototype;const f=u[e].prototype;return document.body.removeChild(c),f?Gm[e]=f:n}catch{return n}}const Wx={};function Js(e,t,n){var r;const o=`${e}.${String(n)}`;if(Wx[o])return Wx[o].call(t);const s=kT(e),a=(r=Object.getOwnPropertyDescriptor(s,n))==null?void 0:r.get;return a?(Wx[o]=a,a.call(t)):t[n]}const Gx={};function rB(e,t,n){const r=`${e}.${String(n)}`;if(Gx[r])return Gx[r].bind(t);const s=kT(e)[n];return typeof s!="function"?t[n]:(Gx[r]=s,s.bind(t))}function Ywe(e){return Js("Node",e,"ownerDocument")}function Qwe(e){return Js("Node",e,"childNodes")}function Xwe(e){return Js("Node",e,"parentNode")}function Jwe(e){return Js("Node",e,"parentElement")}function eEe(e){return Js("Node",e,"textContent")}function tEe(e,t){return rB("Node",e,"contains")(t)}function nEe(e){return rB("Node",e,"getRootNode")()}function rEe(e){return!e||!("host"in e)?null:Js("ShadowRoot",e,"host")}function oEe(e){return e.styleSheets}function sEe(e){return!e||!("shadowRoot"in e)?null:Js("Element",e,"shadowRoot")}function iEe(e,t){return Js("Element",e,"querySelector")(t)}function aEe(e,t){return Js("Element",e,"querySelectorAll")(t)}function lEe(){return kT("MutationObserver").constructor}function cEe(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}const Yn={ownerDocument:Ywe,childNodes:Qwe,parentNode:Xwe,parentElement:Jwe,textContent:eEe,contains:tEe,getRootNode:nEe,host:rEe,styleSheets:oEe,shadowRoot:sEe,querySelector:iEe,querySelectorAll:aEe,mutationObserver:lEe,patch:cEe};function oB(e){return e.nodeType===e.ELEMENT_NODE}function Nf(e){const t=e&&"host"in e&&"mode"in e&&Yn.host(e)||null;return!!(t&&"shadowRoot"in t&&Yn.shadowRoot(t)===e)}function kf(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function uEe(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function dEe(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function _I(e){try{const t=e.rules||e.cssRules;if(!t)return null;let n=e.href;!n&&e.ownerNode&&(n=e.ownerNode.baseURI);const r=Array.from(t,o=>sB(o,n)).join("");return uEe(r)}catch{return null}}function sB(e,t){if(hEe(e)){let n;try{n=_I(e.styleSheet)||dEe(e)}catch{n=e.cssText}return e.styleSheet.href?Uv(n,e.styleSheet.href):n}else{let n=e.cssText;return pEe(e)&&e.selectorText.includes(":")&&(n=fEe(n)),t?Uv(n,t):n}}function fEe(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function hEe(e){return"styleSheet"in e}function pEe(e){return"selectorText"in e}class iB{constructor(){VU(this,"idNodeMap",new Map),VU(this,"nodeMetaMap",new WeakMap)}getId(t){var n;return t?((n=this.getMeta(t))==null?void 0:n.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function mEe(){return new iB}function Dv({element:e,maskInputOptions:t,tagName:n,type:r,value:o,maskInputFn:s}){let a=o||"";const c=r&&hl(r);return(t[n.toLowerCase()]||c&&t[c])&&(s?a=s(a,e):a="*".repeat(a.length)),a}function hl(e){return e.toLowerCase()}const KU="__rrweb_original__";function gEe(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,a=KU in s?s[KU]:s;if(new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(u=>u!==0))return!1}return!0}function Lv(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?hl(t):null}function aB(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,o=n.pathname.match(r);return o?.[1]??null}function vEe(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const yEe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,bEe=/^(?:[a-z+]+:)?\/\//i,SEe=/^www\..*/i,CEe=/^(data:)([^,]*),(.*)/i;function Uv(e,t){return(e||"").replace(yEe,(n,r,o,s,a,c)=>{const u=o||a||c,f=r||s||"";if(!u)return n;if(bEe.test(u)||SEe.test(u))return`url(${f}${u}${f})`;if(CEe.test(u))return`url(${f}${u}${f})`;if(u[0]==="/")return`url(${f}${vEe(t)+u}${f})`;const h=t.split("/"),m=u.split("/");h.pop();for(const g of m)g!=="."&&(g===".."?h.pop():h.push(g));return`url(${f}${h.join("/")}${f})`})}function Km(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function wEe(e,t,n=!1){const r=Array.from(t.childNodes),o=[];let s=0;if(r.length>1&&e&&typeof e=="string"){let a=Km(e,n);const c=a.length/e.length;for(let u=1;u<r.length;u++)if(r[u].textContent&&typeof r[u].textContent=="string"){const f=Km(r[u].textContent,n),h=100;let m=3;for(;m<f.length&&(f[m].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,m),1)!==-1);m++);for(;m<f.length;m++){let g=f.substring(0,m),v=a.split(g),C=-1;if(v.length===2)C=v[0].length;else if(v.length>2&&v[0]===""&&r[u-1].textContent!=="")C=a.indexOf(g,1);else if(v.length===1){if(g=g.substring(0,g.length-1),v=a.split(g),v.length<=1)return o.push(e),o;m=h+1}else m===f.length-1&&(C=a.indexOf(g));if(v.length>=2&&m>h){const b=r[u-1].textContent;if(b&&typeof b=="string"){const E=Km(b).length;C=a.indexOf(g,E)}C===-1&&(C=v[0].length)}if(C!==-1){let b=Math.floor(C/c);for(;b>0&&b<e.length;){if(s+=1,s>50*r.length)return o.push(e),o;const E=Km(e.substring(0,b),n);if(E.length===C){o.push(e.substring(0,b)),e=e.substring(b),a=a.substring(C);break}else E.length<C?b+=Math.max(1,Math.floor((C-E.length)/c)):b-=Math.max(1,Math.floor((E.length-C)*c))}break}}}}return o.push(e),o}function EEe(e,t){return wEe(e,t).join("/* rr_split */")}let xEe=1;const _Ee=new RegExp("[^a-z0-9-_:]"),oh=-2;function lB(){return xEe++}function IEe(e){if(e instanceof HTMLFormElement)return"form";const t=hl(e.tagName);return _Ee.test(t)?"div":t}let Ic,ZU;const AEe=/^[^ \t\n\r\u000c]+/,REe=/^[, \t\n\r\u000c]+/;function TEe(e,t){if(t.trim()==="")return t;let n=0;function r(s){let a;const c=s.exec(t.substring(n));return c?(a=c[0],n+=a.length,a):""}const o=[];for(;r(REe),!(n>=t.length);){let s=r(AEe);if(s.slice(-1)===",")s=Hc(e,s.substring(0,s.length-1)),o.push(s);else{let a="";s=Hc(e,s);let c=!1;for(;;){const u=t.charAt(n);if(u===""){o.push((s+a).trim());break}else if(c)u===")"&&(c=!1);else if(u===","){n+=1,o.push((s+a).trim());break}else u==="("&&(c=!0);a+=u,n+=1}}}return o.join(", ")}const YU=new WeakMap;function Hc(e,t){return!t||t.trim()===""?t:DT(e,t)}function OEe(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function DT(e,t){let n=YU.get(e);if(n||(n=e.createElement("a"),YU.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function cB(e,t,n,r){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&["table","td","th"].includes(t)?Hc(e,r):n==="srcset"?TEe(e,r):n==="style"?Uv(r,DT(e)):t==="object"&&n==="data"?Hc(e,r):r)}function uB(e,t,n){return["video","audio"].includes(e)&&t==="autoplay"}function MEe(e,t,n){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const o=e.classList[r];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function Fv(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Fv(Yn.parentNode(e),t,n):!1;for(let r=e.classList.length;r--;){const o=e.classList[r];if(t.test(o))return!0}return n?Fv(Yn.parentNode(e),t,n):!1}function dB(e,t,n,r){let o;if(oB(e)){if(o=e,!Yn.childNodes(o).length)return!1}else{if(Yn.parentElement(e)===null)return!1;o=Yn.parentElement(e)}try{if(typeof t=="string"){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(Fv(o,t,r))return!0;if(n){if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}}catch{}return!1}function PEe(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const c=setTimeout(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{clearTimeout(c),o=!0,t()});return}const a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function NEe(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const s=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(s),r=!0,t()})}function kEe(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:a,inlineStylesheet:c,maskInputOptions:u={},maskTextFn:f,maskInputFn:h,dataURLOptions:m={},inlineImages:g,recordCanvas:v,keepIframeSrcFn:C,newlyAddedElement:b=!1,cssCaptured:E=!1}=t,x=DEe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:In.Document,childNodes:[],compatMode:e.compatMode}:{type:In.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:In.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return UEe(e,{doc:n,blockClass:o,blockSelector:s,inlineStylesheet:c,maskInputOptions:u,maskInputFn:h,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:C,newlyAddedElement:b,rootId:x});case e.TEXT_NODE:return LEe(e,{doc:n,needsMask:a,maskTextFn:f,rootId:x,cssCaptured:E});case e.CDATA_SECTION_NODE:return{type:In.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:In.Comment,textContent:Yn.textContent(e)||"",rootId:x};default:return!1}}function DEe(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function LEe(e,t){const{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:s}=t,a=Yn.parentNode(e),c=a&&a.tagName;let u="";const f=c==="STYLE"?!0:void 0,h=c==="SCRIPT"?!0:void 0;return h?u="SCRIPT_PLACEHOLDER":s||(u=Yn.textContent(e),f&&u&&(u=Uv(u,DT(t.doc)))),!f&&!h&&u&&n&&(u=r?r(u,Yn.parentElement(e)):u.replace(/[\S]/g,"*")),{type:In.Text,textContent:u||"",rootId:o}}function UEe(e,t){const{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:s,maskInputOptions:a={},maskInputFn:c,dataURLOptions:u={},inlineImages:f,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:g=!1,rootId:v}=t,C=MEe(e,r,o),b=IEe(e);let E={};const x=e.attributes.length;for(let R=0;R<x;R++){const M=e.attributes[R];uB(b,M.name,M.value)||(E[M.name]=cB(n,b,hl(M.name),M.value))}if(b==="link"&&s){const R=Array.from(n.styleSheets).find(D=>D.href===e.href);let M=null;R&&(M=_I(R)),M&&(delete E.rel,delete E.href,E._cssText=M)}if(b==="style"&&e.sheet){let R=_I(e.sheet);R&&(e.childNodes.length>1&&(R=EEe(R,e)),E._cssText=R)}if(["input","textarea","select"].includes(b)){const R=e.value,M=e.checked;E.type!=="radio"&&E.type!=="checkbox"&&E.type!=="submit"&&E.type!=="button"&&R?E.value=Dv({element:e,type:Lv(e),tagName:b,value:R,maskInputOptions:a,maskInputFn:c}):M&&(E.checked=M)}if(b==="option"&&(e.selected&&!a.select?E.selected=!0:delete E.selected),b==="dialog"&&e.open&&(E.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),b==="canvas"&&h){if(e.__context==="2d")gEe(e)||(E.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const R=e.toDataURL(u.type,u.quality),M=n.createElement("canvas");M.width=e.width,M.height=e.height;const D=M.toDataURL(u.type,u.quality);R!==D&&(E.rr_dataURL=R)}}if(b==="img"&&f){Ic||(Ic=n.createElement("canvas"),ZU=Ic.getContext("2d"));const R=e,M=R.currentSrc||R.getAttribute("src")||"<unknown-src>",D=R.crossOrigin,N=()=>{R.removeEventListener("load",N);try{Ic.width=R.naturalWidth,Ic.height=R.naturalHeight,ZU.drawImage(R,0,0),E.rr_dataURL=Ic.toDataURL(u.type,u.quality)}catch(T){if(R.crossOrigin!=="anonymous"){R.crossOrigin="anonymous",R.complete&&R.naturalWidth!==0?N():R.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${M}! Error: ${T}`)}R.crossOrigin==="anonymous"&&(D?E.crossOrigin=D:R.removeAttribute("crossorigin"))};R.complete&&R.naturalWidth!==0?N():R.addEventListener("load",N)}if(["audio","video"].includes(b)){const R=E;R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime,R.rr_mediaPlaybackRate=e.playbackRate,R.rr_mediaMuted=e.muted,R.rr_mediaLoop=e.loop,R.rr_mediaVolume=e.volume}if(g||(e.scrollLeft&&(E.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(E.rr_scrollTop=e.scrollTop)),C){const{width:R,height:M}=e.getBoundingClientRect();E={class:E.class,rr_width:`${R}px`,rr_height:`${M}px`}}b==="iframe"&&!m(E.src)&&(e.contentDocument||(E.rr_src=E.src),delete E.src);let I;try{customElements.get(b)&&(I=!0)}catch{}return{type:In.Element,tagName:b,attributes:E,childNodes:[],isSVG:OEe(e)||void 0,needBlock:C,rootId:v,isCustom:I}}function jt(e){return e==null?"":e.toLowerCase()}function fB(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function FEe(e,t){if(t.comment&&e.type===In.Comment)return!0;if(e.type===In.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&aB(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(jt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||jt(e.attributes.name)==="application-name"||jt(e.attributes.rel)==="icon"||jt(e.attributes.rel)==="apple-touch-icon"||jt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&jt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(jt(e.attributes.property).match(/^(og|twitter|fb):/)||jt(e.attributes.name).match(/^(og|twitter):/)||jt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(jt(e.attributes.name)==="robots"||jt(e.attributes.name)==="googlebot"||jt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(jt(e.attributes.name)==="author"||jt(e.attributes.name)==="generator"||jt(e.attributes.name)==="framework"||jt(e.attributes.name)==="publisher"||jt(e.attributes.name)==="progid"||jt(e.attributes.property).match(/^article:/)||jt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(jt(e.attributes.name)==="google-site-verification"||jt(e.attributes.name)==="yandex-verification"||jt(e.attributes.name)==="csrf-token"||jt(e.attributes.name)==="p:domain_verify"||jt(e.attributes.name)==="verify-v1"||jt(e.attributes.name)==="verification"||jt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function qc(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:c,skipChild:u=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:C={},inlineImages:b=!1,recordCanvas:E=!1,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:R=5e3,onStylesheetLoad:M,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:T=!1,cssCaptured:L=!1}=t;let{needsMask:$}=t,{preserveWhiteSpace:G=!0}=t;$||($=dB(e,a,c,$===void 0));const z=kEe(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:$,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,dataURLOptions:C,inlineImages:b,recordCanvas:E,keepIframeSrcFn:N,newlyAddedElement:T,cssCaptured:L});if(!z)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):FEe(z,v)||!G&&z.type===In.Text&&!z.textContent.replace(/^\s+|\s+$/gm,"").length?F=oh:F=lB();const q=Object.assign(z,{id:F});if(r.add(e,q),F===oh)return null;x&&x(e);let X=!u;if(q.type===In.Element){X=X&&!q.needBlock,delete q.needBlock;const V=Yn.shadowRoot(e);V&&kf(V)&&(q.isShadowHost=!0)}if((q.type===In.Document||q.type===In.Element)&&X){v.headWhitespace&&q.type===In.Element&&q.tagName==="head"&&(G=!1);const V={doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:$,maskTextClass:a,maskTextSelector:c,skipChild:u,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:C,inlineImages:b,recordCanvas:E,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:M,stylesheetLoadTimeout:D,keepIframeSrcFn:N,cssCaptured:!1};if(!(q.type===In.Element&&q.tagName==="textarea"&&q.attributes.value!==void 0)){q.type===In.Element&&q.attributes._cssText!==void 0&&typeof q.attributes._cssText=="string"&&(V.cssCaptured=!0);for(const pe of Array.from(Yn.childNodes(e))){const ge=qc(pe,V);ge&&q.childNodes.push(ge)}}let ee=null;if(oB(e)&&(ee=Yn.shadowRoot(e)))for(const pe of Array.from(Yn.childNodes(ee))){const ge=qc(pe,V);ge&&(kf(ee)&&(ge.isShadow=!0),q.childNodes.push(ge))}}const Se=Yn.parentNode(e);return Se&&Nf(Se)&&kf(Se)&&(q.isShadow=!0),q.type===In.Element&&q.tagName==="iframe"&&PEe(e,()=>{const V=e.contentDocument;if(V&&I){const ee=qc(V,{doc:V,mirror:r,blockClass:o,blockSelector:s,needsMask:$,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:C,inlineImages:b,recordCanvas:E,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:M,stylesheetLoadTimeout:D,keepIframeSrcFn:N});ee&&I(e,ee)}},R),q.type===In.Element&&q.tagName==="link"&&typeof q.attributes.rel=="string"&&(q.attributes.rel==="stylesheet"||q.attributes.rel==="preload"&&typeof q.attributes.href=="string"&&aB(q.attributes.href)==="css")&&NEe(e,()=>{if(M){const V=qc(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,needsMask:$,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:C,inlineImages:b,recordCanvas:E,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:R,onStylesheetLoad:M,stylesheetLoadTimeout:D,keepIframeSrcFn:N});V&&M(e,V)}},D),q}function $Ee(e,t){const{mirror:n=new iB,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,inlineStylesheet:c=!0,inlineImages:u=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskTextFn:m,maskInputFn:g,slimDOM:v=!1,dataURLOptions:C,preserveWhiteSpace:b,onSerialize:E,onIframeLoad:x,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:D=()=>!1}=t||{},N=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,T=fB(v);return qc(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:N,maskTextFn:m,maskInputFn:g,slimDOMOptions:T,dataURLOptions:C,inlineImages:u,recordCanvas:f,preserveWhiteSpace:b,onSerialize:E,onIframeLoad:x,iframeLoadTimeout:I,onStylesheetLoad:R,stylesheetLoadTimeout:M,keepIframeSrcFn:D,newlyAddedElement:!1})}function zEe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jEe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var LT={exports:{}},Vt=String,hB=function(){return{isColorSupported:!1,reset:Vt,bold:Vt,dim:Vt,italic:Vt,underline:Vt,inverse:Vt,hidden:Vt,strikethrough:Vt,black:Vt,red:Vt,green:Vt,yellow:Vt,blue:Vt,magenta:Vt,cyan:Vt,white:Vt,gray:Vt,bgBlack:Vt,bgRed:Vt,bgGreen:Vt,bgYellow:Vt,bgBlue:Vt,bgMagenta:Vt,bgCyan:Vt,bgWhite:Vt}};LT.exports=hB();LT.exports.createColors=hB;var BEe=LT.exports;const HEe={},qEe=Object.freeze(Object.defineProperty({__proto__:null,default:HEe},Symbol.toStringTag,{value:"Module"})),Oo=jEe(qEe);let QU=BEe,XU=Oo,II=class pB extends Error{constructor(t,n,r,o,s,a){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),o&&(this.source=o),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,pB)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=QU.isColorSupported),XU&&t&&(n=XU(n));let r=n.split(/\r?\n/),o=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),a=String(s).length,c,u;if(t){let{bold:f,gray:h,red:m}=QU.createColors(!0);c=g=>f(m(g)),u=g=>h(g)}else c=u=f=>f;return r.slice(o,s).map((f,h)=>{let m=o+1+h,g=" "+(" "+m).slice(-a)+" | ";if(m===this.line){let v=u(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+u(g)+f+`
|
|
106
|
+
`+v+c("^")}return" "+u(g)+f}).join(`
|
|
107
|
+
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
108
|
+
|
|
109
|
+
`+t+`
|
|
110
|
+
`),this.name+": "+this.message+t}};var UT=II;II.default=II;var Lh={};Lh.isClean=Symbol("isClean");Lh.my=Symbol("my");const JU={after:`
|
|
111
|
+
`,beforeClose:`
|
|
112
|
+
`,beforeComment:`
|
|
113
|
+
`,beforeDecl:`
|
|
114
|
+
`,beforeOpen:" ",beforeRule:`
|
|
115
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function VEe(e){return e[0].toUpperCase()+e.slice(1)}let AI=class{constructor(t){this.builder=t}atrule(t,n){let r="@"+t.name,o=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:o&&(r+=" "),t.nodes)this.block(t,r+o);else{let s=(t.raws.between||"")+(n?";":"");this.builder(r+o+s,t)}}beforeAfter(t,n){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):n==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let o=t.parent,s=0;for(;o&&o.type!=="root";)s+=1,o=o.parent;if(r.includes(`
|
|
116
|
+
`)){let a=this.raw(t,null,"indent");if(a.length)for(let c=0;c<s;c++)r+=a}return r}block(t,n){let r=this.raw(t,"between","beforeOpen");this.builder(n+r+"{",t,"start");let o;t.nodes&&t.nodes.length?(this.body(t),o=this.raw(t,"after")):o=this.raw(t,"after","emptyBody"),o&&this.builder(o),this.builder("}",t,"end")}body(t){let n=t.nodes.length-1;for(;n>0&&t.nodes[n].type==="comment";)n-=1;let r=this.raw(t,"semicolon");for(let o=0;o<t.nodes.length;o++){let s=t.nodes[o],a=this.raw(s,"before");a&&this.builder(a),this.stringify(s,n!==o||r)}}comment(t){let n=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+n+t.text+r+"*/",t)}decl(t,n){let r=this.raw(t,"between","colon"),o=t.prop+r+this.rawValue(t,"value");t.important&&(o+=t.raws.important||" !important"),n&&(o+=";"),this.builder(o,t)}document(t){this.body(t)}raw(t,n,r){let o;if(r||(r=n),n&&(o=t.raws[n],typeof o<"u"))return o;let s=t.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===t||s&&s.type==="document"))return"";if(!s)return JU[r];let a=t.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let c="raw"+VEe(r);this[c]?o=this[c](a,t):a.walk(u=>{if(o=u.raws[n],typeof o<"u")return!1})}return typeof o>"u"&&(o=JU[r]),a.rawCache[r]=o,o}rawBeforeClose(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
|
|
117
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let r;return t.walkComments(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
|
|
118
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,n){let r;return t.walkDecls(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
|
|
119
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let n;return t.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
120
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(r=>{let o=r.parent;if(o&&o!==t&&o.parent&&o.parent===t&&typeof r.raws.before<"u"){let s=r.raws.before.split(`
|
|
121
|
+
`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],o=t.raws[n];return o&&o.value===r?o.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};var mB=AI;AI.default=AI;let WEe=mB;function RI(e,t){new WEe(t).stringify(e)}var Sb=RI;RI.default=RI;let{isClean:Zm,my:GEe}=Lh,KEe=UT,ZEe=mB,YEe=Sb;function TI(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let o=e[r],s=typeof o;r==="parent"&&s==="object"?t&&(n[r]=t):r==="source"?n[r]=o:Array.isArray(o)?n[r]=o.map(a=>TI(a,n)):(s==="object"&&o!==null&&(o=TI(o)),n[r]=o)}return n}let OI=class{constructor(t={}){this.raws={},this[Zm]=!1,this[GEe]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=TI(this);for(let r in t)n[r]=t[r];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:r,start:o}=this.rangeBy(n);return this.source.input.error(t,{column:o.column,line:o.line},{column:r.column,line:r.line},n)}return new KEe(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markDirty(){if(this[Zm]){this[Zm]=!1;let t=this;for(;t=t.parent;)t[Zm]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,n){let r=this.source.start;if(t.index)r=this.positionInside(t.index,n);else if(t.word){n=this.toString();let o=n.indexOf(t.word);o!==-1&&(r=this.positionInside(o,n))}return r}positionInside(t,n){let r=n||this.toString(),o=this.source.start.column,s=this.source.start.line;for(let a=0;a<t;a++)r[a]===`
|
|
122
|
+
`?(o=1,s+=1):o+=1;return{column:o,line:s}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(t.word){let o=this.toString(),s=o.indexOf(t.word);s!==-1&&(n=this.positionInside(s,o),r=this.positionInside(s+t.word.length,o))}else t.start?n={column:t.start.column,line:t.start.line}:t.index&&(n=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(t,n){return new ZEe().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,r=!1;for(let o of t)o===this?r=!0:r?(this.parent.insertAfter(n,o),n=o):this.parent.insertBefore(n,o);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let r={},o=n==null;n=n||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let c=this[a];if(Array.isArray(c))r[a]=c.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof c=="object"&&c.toJSON)r[a]=c.toJSON(null,n);else if(a==="source"){let u=n.get(c.input);u==null&&(u=s,n.set(c.input,s),s++),r[a]={end:c.end,inputId:u,start:c.start}}else r[a]=c}return o&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=YEe){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r){let o={node:this};for(let s in r)o[s]=r[s];return t.warn(n,o)}get proxyOf(){return this}};var Cb=OI;OI.default=OI;let QEe=Cb,MI=class extends QEe{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var wb=MI;MI.default=MI;let XEe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",JEe=(e=21)=>{let t="",n=e;for(;n--;)t+=XEe[Math.random()*64|0];return t};var exe={nanoid:JEe};let{SourceMapConsumer:e6,SourceMapGenerator:t6}=Oo,{existsSync:txe,readFileSync:nxe}=Oo,{dirname:Kx,join:rxe}=Oo;function oxe(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let PI=class{constructor(t,n){if(n.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,o=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Kx(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new e6(this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(o.test(t)||s.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||r.test(t))return oxe(t.substr(RegExp.lastMatch.length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=t.lastIndexOf(n.pop()),o=t.indexOf("*/",r);r>-1&&o>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,o)))}loadFile(t){if(this.root=Kx(t),txe(t))return this.mapFile=t,nxe(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(t);if(r){let o=this.loadFile(r);if(!o)throw new Error("Unable to load previous source map: "+r.toString());return o}}else{if(n instanceof e6)return t6.fromSourceMap(n).toString();if(n instanceof t6)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=rxe(Kx(t),r)),this.loadFile(r)}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var gB=PI;PI.default=PI;let{SourceMapConsumer:sxe,SourceMapGenerator:ixe}=Oo,{fileURLToPath:n6,pathToFileURL:Ym}=Oo,{isAbsolute:NI,resolve:kI}=Oo,{nanoid:axe}=exe,Zx=Oo,r6=UT,lxe=gB,Yx=Symbol("fromOffsetCache"),cxe=!!(sxe&&ixe),o6=!!(kI&&NI),$v=class{constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!o6||/^\w+:\/\//.test(n.from)||NI(n.from)?this.file=n.from:this.file=kI(n.from)),o6&&cxe){let r=new lxe(this.css,n);if(r.text){this.map=r;let o=r.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+axe(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,o={}){let s,a,c;if(n&&typeof n=="object"){let f=n,h=r;if(typeof f.offset=="number"){let m=this.fromOffset(f.offset);n=m.line,r=m.col}else n=f.line,r=f.column;if(typeof h.offset=="number"){let m=this.fromOffset(h.offset);a=m.line,c=m.col}else a=h.line,c=h.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let u=this.origin(n,r,a,c);return u?s=new r6(t,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,o.plugin):s=new r6(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:c,line:a},this.css,this.file,o.plugin),s.input={column:r,endColumn:c,endLine:a,line:n,source:this.css},this.file&&(Ym&&(s.input.url=Ym(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,r;if(this[Yx])r=this[Yx];else{let s=this.css.split(`
|
|
123
|
+
`);r=new Array(s.length);let a=0;for(let c=0,u=s.length;c<u;c++)r[c]=a,a+=s[c].length+1;this[Yx]=r}n=r[r.length-1];let o=0;if(t>=n)o=r.length-1;else{let s=r.length-2,a;for(;o<s;)if(a=o+(s-o>>1),t<r[a])s=a-1;else if(t>=r[a+1])o=a+1;else{o=a;break}}return{col:t-r[o]+1,line:o+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:kI(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,o){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:n,line:t});if(!a.source)return!1;let c;typeof r=="number"&&(c=s.originalPositionFor({column:o,line:r}));let u;NI(a.source)?u=Ym(a.source):u=new URL(a.source,this.map.consumer().sourceRoot||Ym(this.map.mapFile));let f={column:a.column,endColumn:c&&c.column,endLine:c&&c.line,line:a.line,url:u.toString()};if(u.protocol==="file:")if(n6)f.file=n6(u);else throw new Error("file: protocol is not available in this PostCSS build");let h=s.sourceContentFor(a.source);return h&&(f.source=h),f}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var Eb=$v;$v.default=$v;Zx&&Zx.registerInput&&Zx.registerInput($v);let{SourceMapConsumer:vB,SourceMapGenerator:Kg}=Oo,{dirname:Zg,relative:yB,resolve:bB,sep:SB}=Oo,{pathToFileURL:s6}=Oo,uxe=Eb,dxe=!!(vB&&Kg),fxe=!!(Zg&&bB&&yB&&SB),hxe=class{constructor(t,n,r,o){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
|
|
124
|
+
`;this.css.includes(`\r
|
|
125
|
+
`)&&(n=`\r
|
|
126
|
+
`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||Zg(t.file),o;this.mapOpts.sourcesContent===!1?(o=new vB(t.text),o.sourcesContent&&(o.sourcesContent=null)):o=t.consumer(),this.map.applySourceMap(o,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),fxe&&dxe&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Kg.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Kg({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Kg({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,r="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(c,u,f)=>{if(this.css+=c,u&&f!=="end"&&(o.generated.line=t,o.generated.column=n-1,u.source&&u.source.start?(o.source=this.sourcePath(u),o.original.line=u.source.start.line,o.original.column=u.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),s=c.match(/\n/g),s?(t+=s.length,a=c.lastIndexOf(`
|
|
127
|
+
`),n=c.length-a):n+=c.length,u&&f!=="start"){let h=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==h.last||h.raws.semicolon)&&(u.source&&u.source.end?(o.source=this.sourcePath(u),o.original.line=u.source.end.line,o.original.column=u.source.end.column-1,o.generated.line=t,o.generated.column=n-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=t,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?Zg(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Zg(bB(r,this.mapOpts.annotation)));let o=yB(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new uxe(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let o=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(o,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(s6){let r=s6(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;SB==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var CB=hxe;let pxe=Cb,DI=class extends pxe{constructor(t){super(t),this.type="comment"}};var xb=DI;DI.default=DI;let{isClean:wB,my:EB}=Lh,xB=wb,_B=xb,mxe=Cb,IB,FT,$T,AB;function RB(e){return e.map(t=>(t.nodes&&(t.nodes=RB(t.nodes)),delete t.source,t))}function TB(e){if(e[wB]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)TB(t)}let Ws=class OB extends mxe{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let o of r)this.proxyOf.nodes.push(o)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,o;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],o=t(this.proxyOf.nodes[r],r),o!==!1);)this.indexes[n]+=1;return delete this.indexes[n],o}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>t[n](...r.map(o=>typeof o=="function"?(s,a)=>o(s.toProxy(),a):o)):n==="every"||n==="some"?r=>t[n]((o,...s)=>r(o.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),o=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of o)this.proxyOf.nodes.splice(r+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}insertBefore(t,n){let r=this.index(t),o=r===0?"prepend":!1,s=this.normalize(n,this.proxyOf.nodes[r],o).reverse();r=this.index(t);for(let c of s)this.proxyOf.nodes.splice(r,0,c);let a;for(let c in this.indexes)a=this.indexes[c],r<=a&&(this.indexes[c]=a+s.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=RB(IB(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let o of t)o.parent&&o.parent.removeChild(o,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let o of t)o.parent&&o.parent.removeChild(o,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new xB(t)]}else if(t.selector)t=[new FT(t)];else if(t.name)t=[new $T(t)];else if(t.text)t=[new _B(t)];else throw new Error("Unknown node type in node creation");return t.map(o=>(o[EB]||OB.rebuild(o),o=o.proxyOf,o.parent&&o.parent.removeChild(o),o[wB]&&TB(o),typeof o.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(o.raws.before=n.raws.before.replace(/\S/g,"")),o.parent=this.proxyOf,o))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let o of r)this.proxyOf.nodes.unshift(o);for(let o in this.indexes)this.indexes[o]=this.indexes[o]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(o=>{n.props&&!n.props.includes(o.prop)||n.fast&&!o.value.includes(n.fast)||(o.value=o.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let o;try{o=t(n,r)}catch(s){throw n.addToError(s)}return o!==!1&&n.walk&&(o=n.walk(t)),o})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,o)}):this.walk((r,o)=>{if(r.type==="atrule"&&r.name===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="atrule")return n(r,o)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,o)}):this.walk((r,o)=>{if(r.type==="decl"&&r.prop===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="decl")return n(r,o)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,o)}):this.walk((r,o)=>{if(r.type==="rule"&&r.selector===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="rule")return n(r,o)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ws.registerParse=e=>{IB=e};Ws.registerRule=e=>{FT=e};Ws.registerAtRule=e=>{$T=e};Ws.registerRoot=e=>{AB=e};var Rl=Ws;Ws.default=Ws;Ws.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,$T.prototype):e.type==="rule"?Object.setPrototypeOf(e,FT.prototype):e.type==="decl"?Object.setPrototypeOf(e,xB.prototype):e.type==="comment"?Object.setPrototypeOf(e,_B.prototype):e.type==="root"&&Object.setPrototypeOf(e,AB.prototype),e[EB]=!0,e.nodes&&e.nodes.forEach(t=>{Ws.rebuild(t)})};let gxe=Rl,MB,PB,sh=class extends gxe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new MB(new PB,this,t).stringify()}};sh.registerLazyResult=e=>{MB=e};sh.registerProcessor=e=>{PB=e};var zT=sh;sh.default=sh;let LI=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var NB=LI;LI.default=LI;let vxe=NB,UI=class{constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new vxe(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var jT=UI;UI.default=UI;const Qx=39,i6=34,Qm=92,a6=47,Xm=10,rf=32,Jm=12,eg=9,tg=13,yxe=91,bxe=93,Sxe=40,Cxe=41,wxe=123,Exe=125,xxe=59,_xe=42,Ixe=58,Axe=64,ng=/[\t\n\f\r "#'()/;[\\\]{}]/g,rg=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Rxe=/.[\r\n"'(/\\]/,l6=/[\da-f]/i;var Txe=function(t,n={}){let r=t.css.valueOf(),o=n.ignoreErrors,s,a,c,u,f,h,m,g,v,C,b=r.length,E=0,x=[],I=[];function R(){return E}function M(L){throw t.error("Unclosed "+L,E)}function D(){return I.length===0&&E>=b}function N(L){if(I.length)return I.pop();if(E>=b)return;let $=L?L.ignoreUnclosed:!1;switch(s=r.charCodeAt(E),s){case Xm:case rf:case eg:case tg:case Jm:{a=E;do a+=1,s=r.charCodeAt(a);while(s===rf||s===Xm||s===eg||s===tg||s===Jm);C=["space",r.slice(E,a)],E=a-1;break}case yxe:case bxe:case wxe:case Exe:case Ixe:case xxe:case Cxe:{let G=String.fromCharCode(s);C=[G,G,E];break}case Sxe:{if(g=x.length?x.pop()[1]:"",v=r.charCodeAt(E+1),g==="url"&&v!==Qx&&v!==i6&&v!==rf&&v!==Xm&&v!==eg&&v!==Jm&&v!==tg){a=E;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(o||$){a=E;break}else M("bracket");for(m=a;r.charCodeAt(m-1)===Qm;)m-=1,h=!h}while(h);C=["brackets",r.slice(E,a+1),E,a],E=a}else a=r.indexOf(")",E+1),u=r.slice(E,a+1),a===-1||Rxe.test(u)?C=["(","(",E]:(C=["brackets",u,E,a],E=a);break}case Qx:case i6:{c=s===Qx?"'":'"',a=E;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(o||$){a=E+1;break}else M("string");for(m=a;r.charCodeAt(m-1)===Qm;)m-=1,h=!h}while(h);C=["string",r.slice(E,a+1),E,a],E=a;break}case Axe:{ng.lastIndex=E+1,ng.test(r),ng.lastIndex===0?a=r.length-1:a=ng.lastIndex-2,C=["at-word",r.slice(E,a+1),E,a],E=a;break}case Qm:{for(a=E,f=!0;r.charCodeAt(a+1)===Qm;)a+=1,f=!f;if(s=r.charCodeAt(a+1),f&&s!==a6&&s!==rf&&s!==Xm&&s!==eg&&s!==tg&&s!==Jm&&(a+=1,l6.test(r.charAt(a)))){for(;l6.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===rf&&(a+=1)}C=["word",r.slice(E,a+1),E,a],E=a;break}default:{s===a6&&r.charCodeAt(E+1)===_xe?(a=r.indexOf("*/",E+2)+1,a===0&&(o||$?a=r.length:M("comment")),C=["comment",r.slice(E,a+1),E,a],E=a):(rg.lastIndex=E+1,rg.test(r),rg.lastIndex===0?a=r.length-1:a=rg.lastIndex-2,C=["word",r.slice(E,a+1),E,a],x.push(C),E=a);break}}return E++,C}function T(L){I.push(L)}return{back:T,endOfFile:D,nextToken:N,position:R}};let kB=Rl,zv=class extends kB{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var BT=zv;zv.default=zv;kB.registerAtRule(zv);let DB=Rl,LB,UB,du=class extends DB{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let o=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of o)s.raws.before=n.raws.before}return o}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new LB(new UB,this,t).stringify()}};du.registerLazyResult=e=>{LB=e};du.registerProcessor=e=>{UB=e};var Uh=du;du.default=du;DB.registerRoot(du);let ih={comma(e){return ih.split(e,[","],!0)},space(e){let t=[" ",`
|
|
128
|
+
`," "];return ih.split(e,t)},split(e,t,n){let r=[],o="",s=!1,a=0,c=!1,u="",f=!1;for(let h of e)f?f=!1:h==="\\"?f=!0:c?h===u&&(c=!1):h==='"'||h==="'"?(c=!0,u=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&t.includes(h)&&(s=!0),s?(o!==""&&r.push(o.trim()),o="",s=!1):o+=h;return(n||o!=="")&&r.push(o.trim()),r}};var FB=ih;ih.default=ih;let $B=Rl,Oxe=FB,jv=class extends $B{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Oxe.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};var HT=jv;jv.default=jv;$B.registerRule(jv);let Mxe=wb,Pxe=Txe,Nxe=xb,kxe=BT,Dxe=Uh,c6=HT;const u6={empty:!0,space:!0};function Lxe(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let Uxe=class{constructor(t){this.input=t,this.root=new Dxe,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new kxe;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,o,s,a=!1,c=!1,u=[],f=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){c=!0;break}else if(r==="}"){if(u.length>0){for(s=u.length-1,o=u[s];o&&o[0]==="space";)o=u[--s];o&&(n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),a&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),c&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,o;for(let s=n-1;s>=0&&(o=t[s],!(o[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(t){let n=0,r,o,s;for(let[a,c]of t.entries()){if(r=c,o=r[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return a}s=r}return!1}comment(t){let n=new Nxe;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let o=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=o[2],n.raws.left=o[1],n.raws.right=o[3]}}createTokenizer(){this.tokenizer=Pxe(this.input)}decl(t,n){let r=new Mxe;this.init(r,t[0][2]);let o=t[t.length-1];for(o[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||Lxe(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let f=t[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],c;for(;t.length&&(c=t[0][0],!(c!=="space"&&c!=="comment"));)a.push(t.shift());this.precheckMissedSemicolon(t);for(let f=t.length-1;f>=0;f--){if(s=t[f],s[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(t,f);h=this.spacesFromEnd(t)+h,h!==" !important"&&(r.raws.important=h);break}else if(s[1].toLowerCase()==="important"){let h=t.slice(0),m="";for(let g=f;g>0;g--){let v=h[g][0];if(m.trim().indexOf("!")===0&&v!=="space")break;m=h.pop()[1]+m}m.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=m,t=h)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new c6;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,o=!1,s=null,a=[],c=t[1].startsWith("--"),u=[],f=t;for(;f;){if(r=f[0],u.push(f),r==="("||r==="[")s||(s=f),a.push(r==="("?")":"]");else if(c&&o&&r==="{")s||(s=f),a.push("}");else if(a.length===0)if(r===";")if(o){this.decl(u,c);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(o=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(s),n&&o){if(!c)for(;u.length&&(f=u[u.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,c)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,o){let s,a,c=r.length,u="",f=!0,h,m;for(let g=0;g<c;g+=1)s=r[g],a=s[0],a==="space"&&g===c-1&&!o?f=!1:a==="comment"?(m=r[g-1]?r[g-1][0]:"empty",h=r[g+1]?r[g+1][0]:"empty",!u6[m]&&!u6[h]?u.slice(-1)===","?f=!1:u+=s[1]:f=!1):u+=s[1];if(!f){let g=r.reduce((v,C)=>v+C[1],"");t.raws[n]={raw:g,value:u}}t[n]=u}rule(t){t.pop();let n=new c6;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let o=n;o<t.length;o++)r+=t[o][1];return t.splice(n,t.length-n),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var Fxe=Uxe;let $xe=Rl,zxe=Fxe,jxe=Eb;function Bv(e,t){let n=new jxe(e,t),r=new zxe(n);try{r.parse()}catch(o){throw o}return r.root}var qT=Bv;Bv.default=Bv;$xe.registerParse(Bv);let{isClean:zo,my:Bxe}=Lh,Hxe=CB,qxe=Sb,Vxe=Rl,Wxe=zT,d6=jT,Gxe=qT,Kxe=Uh;const Zxe={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Yxe={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Qxe={Once:!0,postcssPlugin:!0,prepare:!0},fu=0;function of(e){return typeof e=="object"&&typeof e.then=="function"}function zB(e){let t=!1,n=Zxe[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,fu,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,fu,n+"Exit"]:[n,n+"Exit"]}function f6(e){let t;return e.type==="document"?t=["Document",fu,"DocumentExit"]:e.type==="root"?t=["Root",fu,"RootExit"]:t=zB(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function FI(e){return e[zo]=!1,e.nodes&&e.nodes.forEach(t=>FI(t)),e}let $I={},hu=class jB{constructor(t,n,r){this.stringified=!1,this.processed=!1;let o;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))o=FI(n);else if(n instanceof jB||n instanceof d6)o=FI(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=Gxe;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{o=s(n,r)}catch(a){this.processed=!0,this.error=a}o&&!o[Bxe]&&Vxe.rebuild(o)}this.result=new d6(t,o,r),this.helpers={...$I,postcss:$I,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(o){console&&console.error&&console.error(o)}return t}prepareVisitors(){this.listeners={};let t=(n,r,o)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,o])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!Yxe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Qxe[r])if(typeof n[r]=="object")for(let o in n[r])o==="*"?t(n,r,n[r][o]):t(n,r+"-"+o.toLowerCase(),n[r][o]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],r=this.runOnRoot(n);if(of(r))try{await r}catch(o){throw this.handleError(o)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[zo];){t[zo]=!0;let n=[f6(t)];for(;n.length>0;){let r=this.visitTick(n);if(of(r))try{await r}catch(o){let s=n[n.length-1].node;throw this.handleError(o,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let o=t.nodes.map(s=>r(s,this.helpers));await Promise.all(o)}else await r(t,this.helpers)}catch(o){throw this.handleError(o)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return of(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=qxe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let o=new Hxe(n,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(of(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[zo];)t[zo]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,o]of t){this.result.lastPlugin=r;let s;try{s=o(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(of(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:o}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(o.length>0&&n.visitorIndex<o.length){let[a,c]=o[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===o.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return c(r.toProxy(),this.helpers)}catch(u){throw this.handleError(u,r)}}if(n.iterator!==0){let a=n.iterator,c;for(;c=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!c[zo]){c[zo]=!0,t.push(f6(c));return}n.iterator=0,delete r.indexes[a]}let s=n.events;for(;n.eventIndex<s.length;){let a=s[n.eventIndex];if(n.eventIndex+=1,a===fu){r.nodes&&r.nodes.length&&(r[zo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[zo]=!0;let n=zB(t);for(let r of n)if(r===fu)t.nodes&&t.each(o=>{o[zo]||this.walkSync(o)});else{let o=this.listeners[r];if(o&&this.visitSync(o,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};hu.registerPostcss=e=>{$I=e};var BB=hu;hu.default=hu;Kxe.registerLazyResult(hu);Wxe.registerLazyResult(hu);let Xxe=CB,Jxe=Sb,e_e=qT;const t_e=jT;let zI=class{constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let o,s=Jxe;this.result=new t_e(this._processor,o,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let c=new Xxe(s,o,this._opts,n);if(c.isMap()){let[u,f]=c.generate();u&&(this.result.css=u),f&&(this.result.map=f)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=e_e;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var n_e=zI;zI.default=zI;let r_e=n_e,o_e=BB,s_e=zT,i_e=Uh,ah=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new r_e(this,t,n):new o_e(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var a_e=ah;ah.default=ah;i_e.registerProcessor(ah);s_e.registerProcessor(ah);let l_e=wb,c_e=gB,u_e=xb,d_e=BT,f_e=Eb,h_e=Uh,p_e=HT;function lh(e,t){if(Array.isArray(e))return e.map(o=>lh(o));let{inputs:n,...r}=e;if(n){t=[];for(let o of n){let s={...o,__proto__:f_e.prototype};s.map&&(s.map={...s.map,__proto__:c_e.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(o=>lh(o,t))),r.source){let{inputId:o,...s}=r.source;r.source=s,o!=null&&(r.source.input=t[o])}if(r.type==="root")return new h_e(r);if(r.type==="decl")return new l_e(r);if(r.type==="rule")return new p_e(r);if(r.type==="comment")return new u_e(r);if(r.type==="atrule")return new d_e(r);throw new Error("Unknown node type: "+e.type)}var m_e=lh;lh.default=lh;let g_e=UT,HB=wb,v_e=BB,y_e=Rl,VT=a_e,b_e=Sb,S_e=m_e,qB=zT,C_e=NB,VB=xb,WB=BT,w_e=jT,E_e=Eb,x_e=qT,__e=FB,GB=HT,KB=Uh,I_e=Cb;function Ot(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new VT(e)}Ot.plugin=function(t,n){let r=!1;function o(...a){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
129
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),kv.LANG&&kv.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
130
|
+
https://www.w3ctech.com/topic/2226`));let c=n(...a);return c.postcssPlugin=t,c.postcssVersion=new VT().version,c}let s;return Object.defineProperty(o,"postcss",{get(){return s||(s=o()),s}}),o.process=function(a,c,u){return Ot([o(u)]).process(a,c)},o};Ot.stringify=b_e;Ot.parse=x_e;Ot.fromJSON=S_e;Ot.list=__e;Ot.comment=e=>new VB(e);Ot.atRule=e=>new WB(e);Ot.decl=e=>new HB(e);Ot.rule=e=>new GB(e);Ot.root=e=>new KB(e);Ot.document=e=>new qB(e);Ot.CssSyntaxError=g_e;Ot.Declaration=HB;Ot.Container=y_e;Ot.Processor=VT;Ot.Document=qB;Ot.Comment=VB;Ot.Warning=C_e;Ot.AtRule=WB;Ot.Result=w_e;Ot.Input=E_e;Ot.Rule=GB;Ot.Root=KB;Ot.Node=I_e;v_e.registerPostcss(Ot);var A_e=Ot;Ot.default=Ot;const en=zEe(A_e);en.stringify;en.fromJSON;en.plugin;en.parse;en.list;en.document;en.comment;en.atRule;en.rule;en.decl;en.root;en.CssSyntaxError;en.Declaration;en.Container;en.Processor;en.Document;en.Comment;en.Warning;en.AtRule;en.Result;en.Input;en.Rule;en.Root;en.Node;var R_e=Object.defineProperty,T_e=(e,t,n)=>t in e?R_e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eo=(e,t,n)=>T_e(e,typeof t!="symbol"?t+"":t,n);function O_e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function M_e(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var WT={exports:{}},Wt=String,ZB=function(){return{isColorSupported:!1,reset:Wt,bold:Wt,dim:Wt,italic:Wt,underline:Wt,inverse:Wt,hidden:Wt,strikethrough:Wt,black:Wt,red:Wt,green:Wt,yellow:Wt,blue:Wt,magenta:Wt,cyan:Wt,white:Wt,gray:Wt,bgBlack:Wt,bgRed:Wt,bgGreen:Wt,bgYellow:Wt,bgBlue:Wt,bgMagenta:Wt,bgCyan:Wt,bgWhite:Wt}};WT.exports=ZB();WT.exports.createColors=ZB;var P_e=WT.exports;const N_e={},k_e=Object.freeze(Object.defineProperty({__proto__:null,default:N_e},Symbol.toStringTag,{value:"Module"})),Mo=M_e(k_e);let h6=P_e,p6=Mo,jI=class YB extends Error{constructor(t,n,r,o,s,a){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),o&&(this.source=o),a&&(this.plugin=a),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,YB)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=h6.isColorSupported),p6&&t&&(n=p6(n));let r=n.split(/\r?\n/),o=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),a=String(s).length,c,u;if(t){let{bold:f,gray:h,red:m}=h6.createColors(!0);c=g=>f(m(g)),u=g=>h(g)}else c=u=f=>f;return r.slice(o,s).map((f,h)=>{let m=o+1+h,g=" "+(" "+m).slice(-a)+" | ";if(m===this.line){let v=u(g.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return c(">")+u(g)+f+`
|
|
131
|
+
`+v+c("^")}return" "+u(g)+f}).join(`
|
|
132
|
+
`)}toString(){let t=this.showSourceCode();return t&&(t=`
|
|
133
|
+
|
|
134
|
+
`+t+`
|
|
135
|
+
`),this.name+": "+this.message+t}};var GT=jI;jI.default=jI;var Fh={};Fh.isClean=Symbol("isClean");Fh.my=Symbol("my");const m6={after:`
|
|
136
|
+
`,beforeClose:`
|
|
137
|
+
`,beforeComment:`
|
|
138
|
+
`,beforeDecl:`
|
|
139
|
+
`,beforeOpen:" ",beforeRule:`
|
|
140
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function D_e(e){return e[0].toUpperCase()+e.slice(1)}let BI=class{constructor(t){this.builder=t}atrule(t,n){let r="@"+t.name,o=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?r+=t.raws.afterName:o&&(r+=" "),t.nodes)this.block(t,r+o);else{let s=(t.raws.between||"")+(n?";":"");this.builder(r+o+s,t)}}beforeAfter(t,n){let r;t.type==="decl"?r=this.raw(t,null,"beforeDecl"):t.type==="comment"?r=this.raw(t,null,"beforeComment"):n==="before"?r=this.raw(t,null,"beforeRule"):r=this.raw(t,null,"beforeClose");let o=t.parent,s=0;for(;o&&o.type!=="root";)s+=1,o=o.parent;if(r.includes(`
|
|
141
|
+
`)){let a=this.raw(t,null,"indent");if(a.length)for(let c=0;c<s;c++)r+=a}return r}block(t,n){let r=this.raw(t,"between","beforeOpen");this.builder(n+r+"{",t,"start");let o;t.nodes&&t.nodes.length?(this.body(t),o=this.raw(t,"after")):o=this.raw(t,"after","emptyBody"),o&&this.builder(o),this.builder("}",t,"end")}body(t){let n=t.nodes.length-1;for(;n>0&&t.nodes[n].type==="comment";)n-=1;let r=this.raw(t,"semicolon");for(let o=0;o<t.nodes.length;o++){let s=t.nodes[o],a=this.raw(s,"before");a&&this.builder(a),this.stringify(s,n!==o||r)}}comment(t){let n=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+n+t.text+r+"*/",t)}decl(t,n){let r=this.raw(t,"between","colon"),o=t.prop+r+this.rawValue(t,"value");t.important&&(o+=t.raws.important||" !important"),n&&(o+=";"),this.builder(o,t)}document(t){this.body(t)}raw(t,n,r){let o;if(r||(r=n),n&&(o=t.raws[n],typeof o<"u"))return o;let s=t.parent;if(r==="before"&&(!s||s.type==="root"&&s.first===t||s&&s.type==="document"))return"";if(!s)return m6[r];let a=t.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(t,r);{let c="raw"+D_e(r);this[c]?o=this[c](a,t):a.walk(u=>{if(o=u.raws[n],typeof o<"u")return!1})}return typeof o>"u"&&(o=m6[r]),a.rawCache[r]=o,o}rawBeforeClose(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(`
|
|
142
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(t,n){let r;return t.walkComments(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
|
|
143
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,n){let r;return t.walkDecls(o=>{if(typeof o.raws.before<"u")return r=o.raws.before,r.includes(`
|
|
144
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){let n;return t.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(t){let n;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(`
|
|
145
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(t){let n;return t.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(t){if(t.raws.indent)return t.raws.indent;let n;return t.walk(r=>{let o=r.parent;if(o&&o!==t&&o.parent&&o.parent===t&&typeof r.raws.before<"u"){let s=r.raws.before.split(`
|
|
146
|
+
`);return n=s[s.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(t){let n;return t.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(t,n){let r=t[n],o=t.raws[n];return o&&o.value===r?o.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,n){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,n)}};var QB=BI;BI.default=BI;let L_e=QB;function HI(e,t){new L_e(t).stringify(e)}var _b=HI;HI.default=HI;let{isClean:og,my:U_e}=Fh,F_e=GT,$_e=QB,z_e=_b;function qI(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let o=e[r],s=typeof o;r==="parent"&&s==="object"?t&&(n[r]=t):r==="source"?n[r]=o:Array.isArray(o)?n[r]=o.map(a=>qI(a,n)):(s==="object"&&o!==null&&(o=qI(o)),n[r]=o)}return n}let VI=class{constructor(t={}){this.raws={},this[og]=!1,this[U_e]=!0;for(let n in t)if(n==="nodes"){this.nodes=[];for(let r of t[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=t[n]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let n=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let n in t)this[n]=t[n];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let n=qI(this);for(let r in t)n[r]=t[r];return n}cloneAfter(t={}){let n=this.clone(t);return this.parent.insertAfter(this,n),n}cloneBefore(t={}){let n=this.clone(t);return this.parent.insertBefore(this,n),n}error(t,n={}){if(this.source){let{end:r,start:o}=this.rangeBy(n);return this.source.input.error(t,{column:o.column,line:o.line},{column:r.column,line:r.line},n)}return new F_e(t)}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:n==="root"?()=>t.root().toProxy():t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&t.markDirty()),!0}}}markDirty(){if(this[og]){this[og]=!1;let t=this;for(;t=t.parent;)t[og]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t,n){let r=this.source.start;if(t.index)r=this.positionInside(t.index,n);else if(t.word){n=this.toString();let o=n.indexOf(t.word);o!==-1&&(r=this.positionInside(o,n))}return r}positionInside(t,n){let r=n||this.toString(),o=this.source.start.column,s=this.source.start.line;for(let a=0;a<t;a++)r[a]===`
|
|
147
|
+
`?(o=1,s+=1):o+=1;return{column:o,line:s}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let n={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(t.word){let o=this.toString(),s=o.indexOf(t.word);s!==-1&&(n=this.positionInside(s,o),r=this.positionInside(s+t.word.length,o))}else t.start?n={column:t.start.column,line:t.start.line}:t.index&&(n=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line}),{end:r,start:n}}raw(t,n){return new $_e().raw(this,t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let n=this,r=!1;for(let o of t)o===this?r=!0:r?(this.parent.insertAfter(n,o),n=o):this.parent.insertBefore(n,o);r||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,n){let r={},o=n==null;n=n||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let c=this[a];if(Array.isArray(c))r[a]=c.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof c=="object"&&c.toJSON)r[a]=c.toJSON(null,n);else if(a==="source"){let u=n.get(c.input);u==null&&(u=s,n.set(c.input,s),s++),r[a]={end:c.end,inputId:u,start:c.start}}else r[a]=c}return o&&(r.inputs=[...n.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=z_e){t.stringify&&(t=t.stringify);let n="";return t(this,r=>{n+=r}),n}warn(t,n,r){let o={node:this};for(let s in r)o[s]=r[s];return t.warn(n,o)}get proxyOf(){return this}};var Ib=VI;VI.default=VI;let j_e=Ib,WI=class extends j_e{constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ab=WI;WI.default=WI;let B_e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",H_e=(e=21)=>{let t="",n=e;for(;n--;)t+=B_e[Math.random()*64|0];return t};var q_e={nanoid:H_e};let{SourceMapConsumer:g6,SourceMapGenerator:v6}=Mo,{existsSync:V_e,readFileSync:W_e}=Mo,{dirname:Xx,join:G_e}=Mo;function K_e(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let GI=class{constructor(t,n){if(n.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let r=n.map?n.map.prev:void 0,o=this.loadMap(n.from,r);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=Xx(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new g6(this.text)),this.consumerCache}decodeInline(t){let n=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,o=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/;if(o.test(t)||s.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(n.test(t)||r.test(t))return K_e(t.substr(RegExp.lastMatch.length));let a=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let n=t.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let r=t.lastIndexOf(n.pop()),o=t.indexOf("*/",r);r>-1&&o>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,o)))}loadFile(t){if(this.root=Xx(t),V_e(t))return this.mapFile=t,W_e(t,"utf-8").toString().trim()}loadMap(t,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let r=n(t);if(r){let o=this.loadFile(r);if(!o)throw new Error("Unable to load previous source map: "+r.toString());return o}}else{if(n instanceof g6)return v6.fromSourceMap(n).toString();if(n instanceof v6)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return t&&(r=G_e(Xx(t),r)),this.loadFile(r)}}}startWith(t,n){return t?t.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var XB=GI;GI.default=GI;let{SourceMapConsumer:Z_e,SourceMapGenerator:Y_e}=Mo,{fileURLToPath:y6,pathToFileURL:sg}=Mo,{isAbsolute:KI,resolve:ZI}=Mo,{nanoid:Q_e}=q_e,Jx=Mo,b6=GT,X_e=XB,e_=Symbol("fromOffsetCache"),J_e=!!(Z_e&&Y_e),S6=!!(ZI&&KI),Hv=class{constructor(t,n={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!S6||/^\w+:\/\//.test(n.from)||KI(n.from)?this.file=n.from:this.file=ZI(n.from)),S6&&J_e){let r=new X_e(this.css,n);if(r.text){this.map=r;let o=r.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+Q_e(6)+">"),this.map&&(this.map.file=this.from)}error(t,n,r,o={}){let s,a,c;if(n&&typeof n=="object"){let f=n,h=r;if(typeof f.offset=="number"){let m=this.fromOffset(f.offset);n=m.line,r=m.col}else n=f.line,r=f.column;if(typeof h.offset=="number"){let m=this.fromOffset(h.offset);a=m.line,c=m.col}else a=h.line,c=h.column}else if(!r){let f=this.fromOffset(n);n=f.line,r=f.col}let u=this.origin(n,r,a,c);return u?s=new b6(t,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,o.plugin):s=new b6(t,a===void 0?n:{column:r,line:n},a===void 0?r:{column:c,line:a},this.css,this.file,o.plugin),s.input={column:r,endColumn:c,endLine:a,line:n,source:this.css},this.file&&(sg&&(s.input.url=sg(this.file).toString()),s.input.file=this.file),s}fromOffset(t){let n,r;if(this[e_])r=this[e_];else{let s=this.css.split(`
|
|
148
|
+
`);r=new Array(s.length);let a=0;for(let c=0,u=s.length;c<u;c++)r[c]=a,a+=s[c].length+1;this[e_]=r}n=r[r.length-1];let o=0;if(t>=n)o=r.length-1;else{let s=r.length-2,a;for(;o<s;)if(a=o+(s-o>>1),t<r[a])s=a-1;else if(t>=r[a+1])o=a+1;else{o=a;break}}return{col:t-r[o]+1,line:o+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:ZI(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,n,r,o){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:n,line:t});if(!a.source)return!1;let c;typeof r=="number"&&(c=s.originalPositionFor({column:o,line:r}));let u;KI(a.source)?u=sg(a.source):u=new URL(a.source,this.map.consumer().sourceRoot||sg(this.map.mapFile));let f={column:a.column,endColumn:c&&c.column,endLine:c&&c.line,line:a.line,url:u.toString()};if(u.protocol==="file:")if(y6)f.file=y6(u);else throw new Error("file: protocol is not available in this PostCSS build");let h=s.sourceContentFor(a.source);return h&&(f.source=h),f}toJSON(){let t={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(t[n]=this[n]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}get from(){return this.file||this.id}};var Rb=Hv;Hv.default=Hv;Jx&&Jx.registerInput&&Jx.registerInput(Hv);let{SourceMapConsumer:JB,SourceMapGenerator:Yg}=Mo,{dirname:Qg,relative:eH,resolve:tH,sep:nH}=Mo,{pathToFileURL:C6}=Mo,eIe=Rb,tIe=!!(JB&&Yg),nIe=!!(Qg&&tH&&eH&&nH),rIe=class{constructor(t,n,r,o){this.stringify=t,this.mapOpts=r.map||{},this.root=n,this.opts=r,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";let n=`
|
|
149
|
+
`;this.css.includes(`\r
|
|
150
|
+
`)&&(n=`\r
|
|
151
|
+
`),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||Qg(t.file),o;this.mapOpts.sourcesContent===!1?(o=new JB(t.text),o.sourcesContent&&(o.sourcesContent=null)):o=t.consumer(),this.map.applySourceMap(o,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),nIe&&tIe&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Yg.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Yg({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Yg({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,n=1,r="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,a;this.stringify(this.root,(c,u,f)=>{if(this.css+=c,u&&f!=="end"&&(o.generated.line=t,o.generated.column=n-1,u.source&&u.source.start?(o.source=this.sourcePath(u),o.original.line=u.source.start.line,o.original.column=u.source.start.column-1,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,this.map.addMapping(o))),s=c.match(/\n/g),s?(t+=s.length,a=c.lastIndexOf(`
|
|
152
|
+
`),n=c.length-a):n+=c.length,u&&f!=="start"){let h=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==h.last||h.raws.semicolon)&&(u.source&&u.source.end?(o.source=this.sourcePath(u),o.original.line=u.source.end.line,o.original.column=u.source.end.column-1,o.generated.line=t,o.generated.column=n-2,this.map.addMapping(o)):(o.source=r,o.original.line=1,o.original.column=0,o.generated.line=t,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?Qg(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Qg(tH(r,this.mapOpts.annotation)));let o=eH(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new eIe(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let o=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(o,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(C6){let r=C6(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;nH==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var rH=rIe;let oIe=Ib,YI=class extends oIe{constructor(t){super(t),this.type="comment"}};var Tb=YI;YI.default=YI;let{isClean:oH,my:sH}=Fh,iH=Ab,aH=Tb,sIe=Ib,lH,KT,ZT,cH;function uH(e){return e.map(t=>(t.nodes&&(t.nodes=uH(t.nodes)),delete t.source,t))}function dH(e){if(e[oH]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)dH(t)}let Gs=class fH extends sIe{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let o of r)this.proxyOf.nodes.push(o)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,o;for(;this.indexes[n]<this.proxyOf.nodes.length&&(r=this.indexes[n],o=t(this.proxyOf.nodes[r],r),o!==!1);)this.indexes[n]+=1;return delete this.indexes[n],o}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,n){return n==="proxyOf"?t:t[n]?n==="each"||typeof n=="string"&&n.startsWith("walk")?(...r)=>t[n](...r.map(o=>typeof o=="function"?(s,a)=>o(s.toProxy(),a):o)):n==="every"||n==="some"?r=>t[n]((o,...s)=>r(o.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),o=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of o)this.proxyOf.nodes.splice(r+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],r<s&&(this.indexes[a]=s+o.length);return this.markDirty(),this}insertBefore(t,n){let r=this.index(t),o=r===0?"prepend":!1,s=this.normalize(n,this.proxyOf.nodes[r],o).reverse();r=this.index(t);for(let c of s)this.proxyOf.nodes.splice(r,0,c);let a;for(let c in this.indexes)a=this.indexes[c],r<=a&&(this.indexes[c]=a+s.length);return this.markDirty(),this}normalize(t,n){if(typeof t=="string")t=uH(lH(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let o of t)o.parent&&o.parent.removeChild(o,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let o of t)o.parent&&o.parent.removeChild(o,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new iH(t)]}else if(t.selector)t=[new KT(t)];else if(t.name)t=[new ZT(t)];else if(t.text)t=[new aH(t)];else throw new Error("Unknown node type in node creation");return t.map(o=>(o[sH]||fH.rebuild(o),o=o.proxyOf,o.parent&&o.parent.removeChild(o),o[oH]&&dH(o),typeof o.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(o.raws.before=n.raws.before.replace(/\S/g,"")),o.parent=this.proxyOf,o))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let o of r)this.proxyOf.nodes.unshift(o);for(let o in this.indexes)this.indexes[o]=this.indexes[o]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(o=>{n.props&&!n.props.includes(o.prop)||n.fast&&!o.value.includes(n.fast)||(o.value=o.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let o;try{o=t(n,r)}catch(s){throw n.addToError(s)}return o!==!1&&n.walk&&(o=n.walk(t)),o})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,o)}):this.walk((r,o)=>{if(r.type==="atrule"&&r.name===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="atrule")return n(r,o)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,o)}):this.walk((r,o)=>{if(r.type==="decl"&&r.prop===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="decl")return n(r,o)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,o)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,o)}):this.walk((r,o)=>{if(r.type==="rule"&&r.selector===t)return n(r,o)}):(n=t,this.walk((r,o)=>{if(r.type==="rule")return n(r,o)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Gs.registerParse=e=>{lH=e};Gs.registerRule=e=>{KT=e};Gs.registerAtRule=e=>{ZT=e};Gs.registerRoot=e=>{cH=e};var Tl=Gs;Gs.default=Gs;Gs.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,ZT.prototype):e.type==="rule"?Object.setPrototypeOf(e,KT.prototype):e.type==="decl"?Object.setPrototypeOf(e,iH.prototype):e.type==="comment"?Object.setPrototypeOf(e,aH.prototype):e.type==="root"&&Object.setPrototypeOf(e,cH.prototype),e[sH]=!0,e.nodes&&e.nodes.forEach(t=>{Gs.rebuild(t)})};let iIe=Tl,hH,pH,ch=class extends iIe{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new hH(new pH,this,t).stringify()}};ch.registerLazyResult=e=>{hH=e};ch.registerProcessor=e=>{pH=e};var YT=ch;ch.default=ch;let QI=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var mH=QI;QI.default=QI;let aIe=mH,XI=class{constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new aIe(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var QT=XI;XI.default=XI;const t_=39,w6=34,ig=92,E6=47,ag=10,sf=32,lg=12,cg=9,ug=13,lIe=91,cIe=93,uIe=40,dIe=41,fIe=123,hIe=125,pIe=59,mIe=42,gIe=58,vIe=64,dg=/[\t\n\f\r "#'()/;[\\\]{}]/g,fg=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,yIe=/.[\r\n"'(/\\]/,x6=/[\da-f]/i;var bIe=function(t,n={}){let r=t.css.valueOf(),o=n.ignoreErrors,s,a,c,u,f,h,m,g,v,C,b=r.length,E=0,x=[],I=[];function R(){return E}function M(L){throw t.error("Unclosed "+L,E)}function D(){return I.length===0&&E>=b}function N(L){if(I.length)return I.pop();if(E>=b)return;let $=L?L.ignoreUnclosed:!1;switch(s=r.charCodeAt(E),s){case ag:case sf:case cg:case ug:case lg:{a=E;do a+=1,s=r.charCodeAt(a);while(s===sf||s===ag||s===cg||s===ug||s===lg);C=["space",r.slice(E,a)],E=a-1;break}case lIe:case cIe:case fIe:case hIe:case gIe:case pIe:case dIe:{let G=String.fromCharCode(s);C=[G,G,E];break}case uIe:{if(g=x.length?x.pop()[1]:"",v=r.charCodeAt(E+1),g==="url"&&v!==t_&&v!==w6&&v!==sf&&v!==ag&&v!==cg&&v!==lg&&v!==ug){a=E;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(o||$){a=E;break}else M("bracket");for(m=a;r.charCodeAt(m-1)===ig;)m-=1,h=!h}while(h);C=["brackets",r.slice(E,a+1),E,a],E=a}else a=r.indexOf(")",E+1),u=r.slice(E,a+1),a===-1||yIe.test(u)?C=["(","(",E]:(C=["brackets",u,E,a],E=a);break}case t_:case w6:{c=s===t_?"'":'"',a=E;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(o||$){a=E+1;break}else M("string");for(m=a;r.charCodeAt(m-1)===ig;)m-=1,h=!h}while(h);C=["string",r.slice(E,a+1),E,a],E=a;break}case vIe:{dg.lastIndex=E+1,dg.test(r),dg.lastIndex===0?a=r.length-1:a=dg.lastIndex-2,C=["at-word",r.slice(E,a+1),E,a],E=a;break}case ig:{for(a=E,f=!0;r.charCodeAt(a+1)===ig;)a+=1,f=!f;if(s=r.charCodeAt(a+1),f&&s!==E6&&s!==sf&&s!==ag&&s!==cg&&s!==ug&&s!==lg&&(a+=1,x6.test(r.charAt(a)))){for(;x6.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===sf&&(a+=1)}C=["word",r.slice(E,a+1),E,a],E=a;break}default:{s===E6&&r.charCodeAt(E+1)===mIe?(a=r.indexOf("*/",E+2)+1,a===0&&(o||$?a=r.length:M("comment")),C=["comment",r.slice(E,a+1),E,a],E=a):(fg.lastIndex=E+1,fg.test(r),fg.lastIndex===0?a=r.length-1:a=fg.lastIndex-2,C=["word",r.slice(E,a+1),E,a],x.push(C),E=a);break}}return E++,C}function T(L){I.push(L)}return{back:T,endOfFile:D,nextToken:N,position:R}};let gH=Tl,qv=class extends gH{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var XT=qv;qv.default=qv;gH.registerAtRule(qv);let vH=Tl,yH,bH,pu=class extends vH{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let o=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of o)s.raws.before=n.raws.before}return o}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new yH(new bH,this,t).stringify()}};pu.registerLazyResult=e=>{yH=e};pu.registerProcessor=e=>{bH=e};var $h=pu;pu.default=pu;vH.registerRoot(pu);let uh={comma(e){return uh.split(e,[","],!0)},space(e){let t=[" ",`
|
|
153
|
+
`," "];return uh.split(e,t)},split(e,t,n){let r=[],o="",s=!1,a=0,c=!1,u="",f=!1;for(let h of e)f?f=!1:h==="\\"?f=!0:c?h===u&&(c=!1):h==='"'||h==="'"?(c=!0,u=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&t.includes(h)&&(s=!0),s?(o!==""&&r.push(o.trim()),o="",s=!1):o+=h;return(n||o!=="")&&r.push(o.trim()),r}};var SH=uh;uh.default=uh;let CH=Tl,SIe=SH,Vv=class extends CH{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return SIe.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};var JT=Vv;Vv.default=Vv;CH.registerRule(Vv);let CIe=Ab,wIe=bIe,EIe=Tb,xIe=XT,_Ie=$h,_6=JT;const I6={empty:!0,space:!0};function IIe(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let AIe=class{constructor(t){this.input=t,this.root=new _Ie,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new xIe;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,o,s,a=!1,c=!1,u=[],f=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?f.push(r==="("?")":"]"):r==="{"&&f.length>0?f.push("}"):r===f[f.length-1]&&f.pop(),f.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){c=!0;break}else if(r==="}"){if(u.length>0){for(s=u.length-1,o=u[s];o&&o[0]==="space";)o=u[--s];o&&(n.source.end=this.getPosition(o[3]||o[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){a=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),a&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),c&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,o;for(let s=n-1;s>=0&&(o=t[s],!(o[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(t){let n=0,r,o,s;for(let[a,c]of t.entries()){if(r=c,o=r[0],o==="("&&(n+=1),o===")"&&(n-=1),n===0&&o===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return a}s=r}return!1}comment(t){let n=new EIe;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let o=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=o[2],n.raws.left=o[1],n.raws.right=o[3]}}createTokenizer(){this.tokenizer=wIe(this.input)}decl(t,n){let r=new CIe;this.init(r,t[0][2]);let o=t[t.length-1];for(o[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(o[3]||o[2]||IIe(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let f=t[0][0];if(f===":"||f==="space"||f==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],c;for(;t.length&&(c=t[0][0],!(c!=="space"&&c!=="comment"));)a.push(t.shift());this.precheckMissedSemicolon(t);for(let f=t.length-1;f>=0;f--){if(s=t[f],s[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(t,f);h=this.spacesFromEnd(t)+h,h!==" !important"&&(r.raws.important=h);break}else if(s[1].toLowerCase()==="important"){let h=t.slice(0),m="";for(let g=f;g>0;g--){let v=h[g][0];if(m.trim().indexOf("!")===0&&v!=="space")break;m=h.pop()[1]+m}m.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=m,t=h)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(f=>f[0]!=="space"&&f[0]!=="comment")&&(r.raws.between+=a.map(f=>f[1]).join(""),a=[]),this.raw(r,"value",a.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new _6;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,o=!1,s=null,a=[],c=t[1].startsWith("--"),u=[],f=t;for(;f;){if(r=f[0],u.push(f),r==="("||r==="[")s||(s=f),a.push(r==="("?")":"]");else if(c&&o&&r==="{")s||(s=f),a.push("}");else if(a.length===0)if(r===";")if(o){this.decl(u,c);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(o=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),a.length>0&&this.unclosedBracket(s),n&&o){if(!c)for(;u.length&&(f=u[u.length-1][0],!(f!=="space"&&f!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,c)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,o){let s,a,c=r.length,u="",f=!0,h,m;for(let g=0;g<c;g+=1)s=r[g],a=s[0],a==="space"&&g===c-1&&!o?f=!1:a==="comment"?(m=r[g-1]?r[g-1][0]:"empty",h=r[g+1]?r[g+1][0]:"empty",!I6[m]&&!I6[h]?u.slice(-1)===","?f=!1:u+=s[1]:f=!1):u+=s[1];if(!f){let g=r.reduce((v,C)=>v+C[1],"");t.raws[n]={raw:g,value:u}}t[n]=u}rule(t){t.pop();let n=new _6;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let o=n;o<t.length;o++)r+=t[o][1];return t.splice(n,t.length-n),r}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word",{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,n){throw this.input.error("At-rule without name",{offset:n[2]},{offset:n[2]+n[1].length})}};var RIe=AIe;let TIe=Tl,OIe=RIe,MIe=Rb;function Wv(e,t){let n=new MIe(e,t),r=new OIe(n);try{r.parse()}catch(o){throw o}return r.root}var e2=Wv;Wv.default=Wv;TIe.registerParse(Wv);let{isClean:jo,my:PIe}=Fh,NIe=rH,kIe=_b,DIe=Tl,LIe=YT,A6=QT,UIe=e2,FIe=$h;const $Ie={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zIe={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},jIe={Once:!0,postcssPlugin:!0,prepare:!0},mu=0;function af(e){return typeof e=="object"&&typeof e.then=="function"}function wH(e){let t=!1,n=$Ie[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,mu,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,mu,n+"Exit"]:[n,n+"Exit"]}function R6(e){let t;return e.type==="document"?t=["Document",mu,"DocumentExit"]:e.type==="root"?t=["Root",mu,"RootExit"]:t=wH(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function JI(e){return e[jo]=!1,e.nodes&&e.nodes.forEach(t=>JI(t)),e}let eA={},gu=class EH{constructor(t,n,r){this.stringified=!1,this.processed=!1;let o;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))o=JI(n);else if(n instanceof EH||n instanceof A6)o=JI(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=UIe;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{o=s(n,r)}catch(a){this.processed=!0,this.error=a}o&&!o[PIe]&&DIe.rebuild(o)}this.result=new A6(t,o,r),this.helpers={...eA,postcss:eA,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(o){console&&console.error&&console.error(o)}return t}prepareVisitors(){this.listeners={};let t=(n,r,o)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,o])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!zIe[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jIe[r])if(typeof n[r]=="object")for(let o in n[r])o==="*"?t(n,r,n[r][o]):t(n,r+"-"+o.toLowerCase(),n[r][o]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],r=this.runOnRoot(n);if(af(r))try{await r}catch(o){throw this.handleError(o)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[jo];){t[jo]=!0;let n=[R6(t)];for(;n.length>0;){let r=this.visitTick(n);if(af(r))try{await r}catch(o){let s=n[n.length-1].node;throw this.handleError(o,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let o=t.nodes.map(s=>r(s,this.helpers));await Promise.all(o)}else await r(t,this.helpers)}catch(o){throw this.handleError(o)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return af(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=kIe;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let o=new NIe(n,this.result.root,this.result.opts).generate();return this.result.css=o[0],this.result.map=o[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(af(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[jo];)t[jo]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,o]of t){this.result.lastPlugin=r;let s;try{s=o(n,this.helpers)}catch(a){throw this.handleError(a,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(af(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:o}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(o.length>0&&n.visitorIndex<o.length){let[a,c]=o[n.visitorIndex];n.visitorIndex+=1,n.visitorIndex===o.length&&(n.visitors=[],n.visitorIndex=0),this.result.lastPlugin=a;try{return c(r.toProxy(),this.helpers)}catch(u){throw this.handleError(u,r)}}if(n.iterator!==0){let a=n.iterator,c;for(;c=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!c[jo]){c[jo]=!0,t.push(R6(c));return}n.iterator=0,delete r.indexes[a]}let s=n.events;for(;n.eventIndex<s.length;){let a=s[n.eventIndex];if(n.eventIndex+=1,a===mu){r.nodes&&r.nodes.length&&(r[jo]=!0,n.iterator=r.getIterator());return}else if(this.listeners[a]){n.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[jo]=!0;let n=wH(t);for(let r of n)if(r===mu)t.nodes&&t.each(o=>{o[jo]||this.walkSync(o)});else{let o=this.listeners[r];if(o&&this.visitSync(o,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};gu.registerPostcss=e=>{eA=e};var xH=gu;gu.default=gu;FIe.registerLazyResult(gu);LIe.registerLazyResult(gu);let BIe=rH,HIe=_b,qIe=e2;const VIe=QT;let tA=class{constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let o,s=HIe;this.result=new VIe(this._processor,o,this._opts),this.result.css=n;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let c=new BIe(s,o,this._opts,n);if(c.isMap()){let[u,f]=c.generate();u&&(this.result.css=u),f&&(this.result.map=f)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=qIe;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var WIe=tA;tA.default=tA;let GIe=WIe,KIe=xH,ZIe=YT,YIe=$h,dh=class{constructor(t=[]){this.version="8.4.38",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new GIe(this,t,n):new KIe(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var QIe=dh;dh.default=dh;YIe.registerProcessor(dh);ZIe.registerProcessor(dh);let XIe=Ab,JIe=XB,eAe=Tb,tAe=XT,nAe=Rb,rAe=$h,oAe=JT;function fh(e,t){if(Array.isArray(e))return e.map(o=>fh(o));let{inputs:n,...r}=e;if(n){t=[];for(let o of n){let s={...o,__proto__:nAe.prototype};s.map&&(s.map={...s.map,__proto__:JIe.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(o=>fh(o,t))),r.source){let{inputId:o,...s}=r.source;r.source=s,o!=null&&(r.source.input=t[o])}if(r.type==="root")return new rAe(r);if(r.type==="decl")return new XIe(r);if(r.type==="rule")return new oAe(r);if(r.type==="comment")return new eAe(r);if(r.type==="atrule")return new tAe(r);throw new Error("Unknown node type: "+e.type)}var sAe=fh;fh.default=fh;let iAe=GT,_H=Ab,aAe=xH,lAe=Tl,t2=QIe,cAe=_b,uAe=sAe,IH=YT,dAe=mH,AH=Tb,RH=XT,fAe=QT,hAe=Rb,pAe=e2,mAe=SH,TH=JT,OH=$h,gAe=Ib;function Mt(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new t2(e)}Mt.plugin=function(t,n){let r=!1;function o(...a){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
|
|
154
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),kv.LANG&&kv.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
155
|
+
https://www.w3ctech.com/topic/2226`));let c=n(...a);return c.postcssPlugin=t,c.postcssVersion=new t2().version,c}let s;return Object.defineProperty(o,"postcss",{get(){return s||(s=o()),s}}),o.process=function(a,c,u){return Mt([o(u)]).process(a,c)},o};Mt.stringify=cAe;Mt.parse=pAe;Mt.fromJSON=uAe;Mt.list=mAe;Mt.comment=e=>new AH(e);Mt.atRule=e=>new RH(e);Mt.decl=e=>new _H(e);Mt.rule=e=>new TH(e);Mt.root=e=>new OH(e);Mt.document=e=>new IH(e);Mt.CssSyntaxError=iAe;Mt.Declaration=_H;Mt.Container=lAe;Mt.Processor=t2;Mt.Document=IH;Mt.Comment=AH;Mt.Warning=dAe;Mt.AtRule=RH;Mt.Result=fAe;Mt.Input=hAe;Mt.Rule=TH;Mt.Root=OH;Mt.Node=gAe;aAe.registerPostcss(Mt);var vAe=Mt;Mt.default=Mt;const tn=O_e(vAe);tn.stringify;tn.fromJSON;tn.plugin;tn.parse;tn.list;tn.document;tn.comment;tn.atRule;tn.rule;tn.decl;tn.root;tn.CssSyntaxError;tn.Declaration;tn.Container;tn.Processor;tn.Document;tn.Comment;tn.Warning;tn.AtRule;tn.Result;tn.Input;tn.Rule;tn.Root;tn.Node;class n2{constructor(...t){eo(this,"parentElement",null),eo(this,"parentNode",null),eo(this,"ownerDocument"),eo(this,"firstChild",null),eo(this,"lastChild",null),eo(this,"previousSibling",null),eo(this,"nextSibling",null),eo(this,"ELEMENT_NODE",1),eo(this,"TEXT_NODE",3),eo(this,"nodeType"),eo(this,"nodeName"),eo(this,"RRNodeType")}get childNodes(){const t=[];let n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(t instanceof n2){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const T6={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},O6={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hg={},yAe=()=>!!globalThis.Zone;function r2(e){if(hg[e])return hg[e];const t=globalThis[e],n=t.prototype,r=e in T6?T6[e]:void 0,o=!!(r&&r.every(c=>{var u,f;return!!((f=(u=Object.getOwnPropertyDescriptor(n,c))==null?void 0:u.get)!=null&&f.toString().includes("[native code]"))})),s=e in O6?O6[e]:void 0,a=!!(s&&s.every(c=>{var u;return typeof n[c]=="function"&&((u=n[c])==null?void 0:u.toString().includes("[native code]"))}));if(o&&a&&!yAe())return hg[e]=t.prototype,t.prototype;try{const c=document.createElement("iframe");document.body.appendChild(c);const u=c.contentWindow;if(!u)return t.prototype;const f=u[e].prototype;return document.body.removeChild(c),f?hg[e]=f:n}catch{return n}}const n_={};function ei(e,t,n){var r;const o=`${e}.${String(n)}`;if(n_[o])return n_[o].call(t);const s=r2(e),a=(r=Object.getOwnPropertyDescriptor(s,n))==null?void 0:r.get;return a?(n_[o]=a,a.call(t)):t[n]}const r_={};function MH(e,t,n){const r=`${e}.${String(n)}`;if(r_[r])return r_[r].bind(t);const s=r2(e)[n];return typeof s!="function"?t[n]:(r_[r]=s,s.bind(t))}function bAe(e){return ei("Node",e,"ownerDocument")}function SAe(e){return ei("Node",e,"childNodes")}function CAe(e){return ei("Node",e,"parentNode")}function wAe(e){return ei("Node",e,"parentElement")}function EAe(e){return ei("Node",e,"textContent")}function xAe(e,t){return MH("Node",e,"contains")(t)}function _Ae(e){return MH("Node",e,"getRootNode")()}function IAe(e){return!e||!("host"in e)?null:ei("ShadowRoot",e,"host")}function AAe(e){return e.styleSheets}function RAe(e){return!e||!("shadowRoot"in e)?null:ei("Element",e,"shadowRoot")}function TAe(e,t){return ei("Element",e,"querySelector")(t)}function OAe(e,t){return ei("Element",e,"querySelectorAll")(t)}function PH(){return r2("MutationObserver").constructor}function Ol(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}const Ye={ownerDocument:bAe,childNodes:SAe,parentNode:CAe,parentElement:wAe,textContent:EAe,contains:xAe,getRootNode:_Ae,host:IAe,styleSheets:AAe,shadowRoot:RAe,querySelector:TAe,querySelectorAll:OAe,mutationObserver:PH,patch:Ol};function or(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Lc=`Please stop import mirror directly. Instead of that,\r
|
|
156
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
157
|
+
or you can use record.mirror to access the mirror instance during recording.`;let M6={map:{},getId(){return console.error(Lc),-1},getNode(){return console.error(Lc),null},removeNodeFromMap(){console.error(Lc)},has(){return console.error(Lc),!1},reset(){console.error(Lc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(M6=new Proxy(M6,{get(e,t,n){return t==="map"&&console.error(Lc),Reflect.get(e,t,n)}}));function hh(e,t,n={}){let r=null,o=0;return function(...s){const a=Date.now();!o&&n.leading===!1&&(o=a);const c=t-(a-o),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(u,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(u,s)},c))}}function Ob(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),s&&s.set&&s.set.call(this,a)}}),()=>Ob(e,t,s||{},!0)}let Gv=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Gv=()=>new Date().getTime());function NH(e){var t,n,r,o;const s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:s.documentElement.scrollLeft||s?.body&&((t=Ye.parentElement(s.body))==null?void 0:t.scrollLeft)||((n=s?.body)==null?void 0:n.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:s?.documentElement.scrollTop||s?.body&&((r=Ye.parentElement(s.body))==null?void 0:r.scrollTop)||((o=s?.body)==null?void 0:o.scrollTop)||0}}function kH(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function DH(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function LH(e){return e?e.nodeType===e.ELEMENT_NODE?e:Ye.parentElement(e):null}function sr(e,t,n,r){if(!e)return!1;const o=LH(e);if(!o)return!1;try{if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(Fv(o,t,r))return!0}catch{}return!!(n&&(o.matches(n)||r&&o.closest(n)!==null))}function MAe(e,t){return t.getId(e)!==-1}function o_(e,t,n){return e.tagName==="TITLE"&&n.headTitleMutations?!0:t.getId(e)===oh}function UH(e,t){if(Nf(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const r=Ye.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:r?UH(r,t):!0}function nA(e){return!!e.changedTouches}function PAe(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function FH(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $H(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function rA(e){return e?e instanceof n2&&"shadowRoot"in e?!!e.shadowRoot:!!Ye.shadowRoot(e):!1}class NAe{constructor(){we(this,"id",1),we(this,"styleIDMap",new WeakMap),we(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function zH(e){var t;let n=null;return"getRootNode"in e&&((t=Ye.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ye.host(Ye.getRootNode(e))&&(n=Ye.host(Ye.getRootNode(e))),n}function kAe(e){let t=e,n;for(;n=zH(t);)t=n;return t}function DAe(e){const t=Ye.ownerDocument(e);if(!t)return!1;const n=kAe(e);return Ye.contains(t,n)}function jH(e){const t=Ye.ownerDocument(e);return t?Ye.contains(t,e)||DAe(e):!1}var pt=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(pt||{}),at=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(at||{}),mr=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(mr||{}),Rs=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Rs||{}),vu=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(vu||{}),Uc=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Uc||{}),BH=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(BH||{});function P6(e){return"__ln"in e}class LAe{constructor(){we(this,"length",0),we(this,"head",null),we(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&P6(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&P6(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const N6=(e,t)=>`${e}@${t}`;class UAe{constructor(){we(this,"frozen",!1),we(this,"locked",!1),we(this,"texts",[]),we(this,"attributes",[]),we(this,"attributeMap",new WeakMap),we(this,"removes",[]),we(this,"mapRemoves",[]),we(this,"movedMap",{}),we(this,"addedSet",new Set),we(this,"movedSet",new Set),we(this,"droppedSet",new Set),we(this,"removesSubTreeCache",new Set),we(this,"mutationCb"),we(this,"blockClass"),we(this,"blockSelector"),we(this,"maskTextClass"),we(this,"maskTextSelector"),we(this,"inlineStylesheet"),we(this,"maskInputOptions"),we(this,"maskTextFn"),we(this,"maskInputFn"),we(this,"keepIframeSrcFn"),we(this,"recordCanvas"),we(this,"inlineImages"),we(this,"slimDOMOptions"),we(this,"dataURLOptions"),we(this,"doc"),we(this,"mirror"),we(this,"iframeManager"),we(this,"stylesheetManager"),we(this,"shadowDomManager"),we(this,"canvasManager"),we(this,"processedNodeManager"),we(this,"unattachedDoc"),we(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),we(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new LAe,o=u=>{let f=u,h=oh;for(;h===oh;)f=f&&f.nextSibling,h=f&&this.mirror.getId(f);return h},s=u=>{const f=Ye.parentNode(u);if(!f||!jH(u))return;let h=!1;if(u.nodeType===Node.TEXT_NODE){const C=f.tagName;if(C==="TEXTAREA")return;C==="STYLE"&&this.addedSet.has(f)&&(h=!0)}const m=Nf(f)?this.mirror.getId(zH(u)):this.mirror.getId(f),g=o(u);if(m===-1||g===-1)return r.addNode(u);const v=qc(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:C=>{FH(C,this.mirror)&&this.iframeManager.addIframe(C),$H(C,this.mirror)&&this.stylesheetManager.trackLinkElement(C),rA(u)&&this.shadowDomManager.addShadowRoot(Ye.shadowRoot(u),this.doc)},onIframeLoad:(C,b)=>{this.iframeManager.attachIframe(C,b),this.shadowDomManager.observeAttachShadow(C)},onStylesheetLoad:(C,b)=>{this.stylesheetManager.attachLinkElement(C,b)},cssCaptured:h});v&&(t.push({parentId:m,nextId:g,node:v}),n.add(v.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const u of this.movedSet)k6(this.removesSubTreeCache,u,this.mirror)&&!this.movedSet.has(Ye.parentNode(u))||s(u);for(const u of this.addedSet)!D6(this.droppedSet,u)&&!k6(this.removesSubTreeCache,u,this.mirror)||D6(this.movedSet,u)?s(u):this.droppedSet.add(u);let a=null;for(;r.length;){let u=null;if(a){const f=this.mirror.getId(Ye.parentNode(a.value)),h=o(a.value);f!==-1&&h!==-1&&(u=a)}if(!u){let f=r.tail;for(;f;){const h=f;if(f=f.previous,h){const m=this.mirror.getId(Ye.parentNode(h.value));if(o(h.value)===-1)continue;if(m!==-1){u=h;break}else{const v=h.value,C=Ye.parentNode(v);if(C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const b=Ye.host(C);if(this.mirror.getId(b)!==-1){u=h;break}}}}}}if(!u){for(;r.head;)r.removeNode(r.head.value);break}a=u.previous,r.removeNode(u.value),s(u.value)}const c={texts:this.texts.map(u=>{const f=u.node,h=Ye.parentNode(f);return h&&h.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h),{id:this.mirror.getId(f),value:u.value}}).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{const{attributes:f}=u;if(typeof f.style=="string"){const h=JSON.stringify(u.styleDiff),m=JSON.stringify(u._unchangedStyles);h.length<f.style.length&&(h+m).split("var(").length===f.style.split("var(").length&&(f.style=u.styleDiff)}return{id:this.mirror.getId(u.node),attributes:f}}).filter(u=>!n.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(c))}),we(this,"genTextAreaValueMutation",t=>{let n=this.attributeMap.get(t);n||(n={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(t,n));const r=Array.from(Ye.childNodes(t),o=>Ye.textContent(o)||"").join("");n.attributes.value=Dv({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Lv(t),value:r,maskInputFn:this.maskInputFn})}),we(this,"processMutation",t=>{if(!o_(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const n=Ye.textContent(t.target);!sr(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:dB(t.target,this.maskTextClass,this.maskTextSelector,!0)&&n?this.maskTextFn?this.maskTextFn(n,LH(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const a=Lv(n);o=Dv({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:a,value:o,maskInputFn:this.maskInputFn})}if(sr(t.target,this.blockClass,this.blockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!n.contentDocument)r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!uB(n.tagName,r))if(s.attributes[r]=cB(this.doc,hl(n.tagName),hl(r),o),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const c of Array.from(n.style)){const u=n.style.getPropertyValue(c),f=n.style.getPropertyPriority(c);u!==a.style.getPropertyValue(c)||f!==a.style.getPropertyPriority(c)?f===""?s.styleDiff[c]=u:s.styleDiff[c]=[u,f]:s._unchangedStyles[c]=[u,f]}for(const c of Array.from(a.style))n.style.getPropertyValue(c)===""&&(s.styleDiff[c]=!1)}else r==="open"&&n.tagName==="DIALOG"&&(n.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break}case"childList":{if(sr(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Nf(t.target)?this.mirror.getId(Ye.host(t.target)):this.mirror.getId(t.target);sr(t.target,this.blockClass,this.blockSelector,!1)||o_(n,this.mirror,this.slimDOMOptions)||!MAe(n,this.mirror)||(this.addedSet.has(n)?(oA(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||UH(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[N6(r,o)]?oA(this.movedSet,n):(this.removes.push({parentId:o,id:r,isShadow:Nf(t.target)&&kf(t.target)?!0:void 0}),FAe(n,this.removesSubTreeCache))),this.mapRemoves.push(n))});break}}}),we(this,"genAdds",(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(o_(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[N6(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);sr(t,this.blockClass,this.blockSelector,!1)||(Ye.childNodes(t).forEach(r=>this.genAdds(r)),rA(t)&&Ye.childNodes(Ye.shadowRoot(t)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function oA(e,t){e.delete(t),Ye.childNodes(t).forEach(n=>oA(e,n))}function FAe(e,t){const n=[e];for(;n.length;){const r=n.pop();t.has(r)||(t.add(r),Ye.childNodes(r).forEach(o=>n.push(o)))}}function k6(e,t,n){return e.size===0?!1:$Ae(e,t)}function $Ae(e,t,n){const r=Ye.parentNode(t);return r?e.has(r):!1}function D6(e,t){return e.size===0?!1:HH(e,t)}function HH(e,t){const n=Ye.parentNode(t);return n?e.has(n)?!0:HH(e,n):!1}let Df;function zAe(e){Df=e}function jAe(){Df=void 0}const ct=e=>Df?(...n)=>{try{return e(...n)}catch(r){if(Df&&Df(r)===!0)return;throw r}}:e,Ha=[];function zh(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function qH(e,t){const n=new UAe;Ha.push(n),n.init(e);const r=new(PH())(ct(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function BAe({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],c;const u=hh(ct(m=>{const g=Date.now()-c;e(a.map(v=>(v.timeOffset-=g,v)),m),a=[],c=null}),s),f=ct(hh(ct(m=>{const g=zh(m),{clientX:v,clientY:C}=nA(m)?m.changedTouches[0]:m;c||(c=Gv()),a.push({x:v,y:C,id:r.getId(g),timeOffset:Gv()-c}),u(typeof DragEvent<"u"&&m instanceof DragEvent?at.Drag:m instanceof MouseEvent?at.MouseMove:at.TouchMove)}),o,{trailing:!1})),h=[or("mousemove",f,n),or("touchmove",f,n),or("drag",f,n)];return ct(()=>{h.forEach(m=>m())})}function HAe({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const a=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,c=[];let u=null;const f=h=>m=>{const g=zh(m);if(sr(g,r,o,!0))return;let v=null,C=h;if("pointerType"in m){switch(m.pointerType){case"mouse":v=Rs.Mouse;break;case"touch":v=Rs.Touch;break;case"pen":v=Rs.Pen;break}v===Rs.Touch?mr[h]===mr.MouseDown?C="TouchStart":mr[h]===mr.MouseUp&&(C="TouchEnd"):Rs.Pen}else nA(m)&&(v=Rs.Touch);v!==null?(u=v,(C.startsWith("Touch")&&v===Rs.Touch||C.startsWith("Mouse")&&v===Rs.Mouse)&&(v=null)):mr[h]===mr.Click&&(v=u,u=null);const b=nA(m)?m.changedTouches[0]:m;if(!b)return;const E=n.getId(g),{clientX:x,clientY:I}=b;ct(e)({type:mr[C],id:E,x,y:I,...v!==null&&{pointerType:v}})};return Object.keys(mr).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&a[h]!==!1).forEach(h=>{let m=hl(h);const g=f(h);if(window.PointerEvent)switch(mr[h]){case mr.MouseDown:case mr.MouseUp:m=m.replace("mouse","pointer");break;case mr.TouchStart:case mr.TouchEnd:return}c.push(or(m,g,t))}),ct(()=>{c.forEach(h=>h())})}function VH({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:s}){const a=ct(hh(ct(c=>{const u=zh(c);if(!u||sr(u,r,o,!0))return;const f=n.getId(u);if(u===t&&t.defaultView){const h=NH(t.defaultView);e({id:f,x:h.left,y:h.top})}else e({id:f,x:u.scrollLeft,y:u.scrollTop})}),s.scroll||100));return or("scroll",a,t)}function qAe({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=ct(hh(ct(()=>{const s=kH(),a=DH();(n!==s||r!==a)&&(e({width:Number(a),height:Number(s)}),n=s,r=a)}),200));return or("resize",o,t)}const VAe=["INPUT","TEXTAREA","SELECT"],L6=new WeakMap;function WAe({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:s,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:f,userTriggeredOnInput:h}){function m(I){let R=zh(I);const M=I.isTrusted,D=R&&R.tagName;if(R&&D==="OPTION"&&(R=Ye.parentElement(R)),!R||!D||VAe.indexOf(D)<0||sr(R,r,o,!0)||R.classList.contains(s)||a&&R.matches(a))return;let N=R.value,T=!1;const L=Lv(R)||"";L==="radio"||L==="checkbox"?T=R.checked:(c[D.toLowerCase()]||c[L])&&(N=Dv({element:R,maskInputOptions:c,tagName:D,type:L,value:N,maskInputFn:u})),g(R,h?{text:N,isChecked:T,userTriggered:M}:{text:N,isChecked:T});const $=R.name;L==="radio"&&$&&T&&t.querySelectorAll(`input[type="radio"][name="${$}"]`).forEach(G=>{if(G!==R){const z=G.value;g(G,h?{text:z,isChecked:!T,userTriggered:!1}:{text:z,isChecked:!T})}})}function g(I,R){const M=L6.get(I);if(!M||M.text!==R.text||M.isChecked!==R.isChecked){L6.set(I,R);const D=n.getId(I);ct(e)({...R,id:D})}}const C=(f.input==="last"?["change"]:["input","change"]).map(I=>or(I,ct(m),t)),b=t.defaultView;if(!b)return()=>{C.forEach(I=>I())};const E=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),x=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return E&&E.set&&C.push(...x.map(I=>Ob(I[0],I[1],{set(){ct(m)({target:this,isTrusted:!1})}},!1,b))),ct(()=>{C.forEach(I=>I())})}function Kv(e){const t=[];function n(r,o){if(pg("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||pg("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||pg("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||pg("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(a)}return o}return n(e,t)}function Li(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function GAe({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ct((h,m,g)=>{const[v,C]=g,{id:b,styleId:E}=Li(m,t,n.styleMirror);return(b&&b!==-1||E&&E!==-1)&&e({id:b,styleId:E,adds:[{rule:v,index:C}]}),h.apply(m,g)})}),r.CSSStyleSheet.prototype.addRule=function(h,m,g=this.cssRules.length){const v=`${h} { ${m} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[v,g])};const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:ct((h,m,g)=>{const[v]=g,{id:C,styleId:b}=Li(m,t,n.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,removes:[{index:v}]}),h.apply(m,g)})}),r.CSSStyleSheet.prototype.removeRule=function(h){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:ct((h,m,g)=>{const[v]=g,{id:C,styleId:b}=Li(m,t,n.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,replace:v}),h.apply(m,g)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:ct((h,m,g)=>{const[v]=g,{id:C,styleId:b}=Li(m,t,n.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,replaceSync:v}),h.apply(m,g)})}));const u={};mg("CSSGroupingRule")?u.CSSGroupingRule=r.CSSGroupingRule:(mg("CSSMediaRule")&&(u.CSSMediaRule=r.CSSMediaRule),mg("CSSConditionRule")&&(u.CSSConditionRule=r.CSSConditionRule),mg("CSSSupportsRule")&&(u.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(u).forEach(([h,m])=>{f[h]={insertRule:m.prototype.insertRule,deleteRule:m.prototype.deleteRule},m.prototype.insertRule=new Proxy(f[h].insertRule,{apply:ct((g,v,C)=>{const[b,E]=C,{id:x,styleId:I}=Li(v.parentStyleSheet,t,n.styleMirror);return(x&&x!==-1||I&&I!==-1)&&e({id:x,styleId:I,adds:[{rule:b,index:[...Kv(v),E||0]}]}),g.apply(v,C)})}),m.prototype.deleteRule=new Proxy(f[h].deleteRule,{apply:ct((g,v,C)=>{const[b]=C,{id:E,styleId:x}=Li(v.parentStyleSheet,t,n.styleMirror);return(E&&E!==-1||x&&x!==-1)&&e({id:E,styleId:x,removes:[{index:[...Kv(v),b]}]}),g.apply(v,C)})})}),ct(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,a&&(r.CSSStyleSheet.prototype.replace=a),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach(([h,m])=>{m.prototype.insertRule=f[h].insertRule,m.prototype.deleteRule=f[h].deleteRule})})}function WH({mirror:e,stylesheetManager:t},n){var r,o,s;let a=null;n.nodeName==="#document"?a=e.getId(n):a=e.getId(Ye.host(n));const c=n.nodeName==="#document"?(r=n.defaultView)==null?void 0:r.Document:(s=(o=n.ownerDocument)==null?void 0:o.defaultView)==null?void 0:s.ShadowRoot,u=c?.prototype?Object.getOwnPropertyDescriptor(c?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!c||!u?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var f;return(f=u.get)==null?void 0:f.call(this)},set(f){var h;const m=(h=u.set)==null?void 0:h.call(this,f);if(a!==null&&a!==-1)try{t.adoptStyleSheets(f,a)}catch{}return m}}),ct(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function KAe({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:ct((c,u,f)=>{var h;const[m,g,v]=f;if(n.has(m))return s.apply(u,[m,g,v]);const{id:C,styleId:b}=Li((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,set:{property:m,value:g,priority:v},index:Kv(u.parentRule)}),c.apply(u,f)})});const a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:ct((c,u,f)=>{var h;const[m]=f;if(n.has(m))return a.apply(u,[m]);const{id:g,styleId:v}=Li((h=u.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,remove:{property:m},index:Kv(u.parentRule)}),c.apply(u,f)})}),ct(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=a})}function ZAe({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o,doc:s}){const a=ct(u=>hh(ct(f=>{const h=zh(f);if(!h||sr(h,t,n,!0))return;const{currentTime:m,volume:g,muted:v,playbackRate:C,loop:b}=h;e({type:u,id:r.getId(h),currentTime:m,volume:g,muted:v,playbackRate:C,loop:b})}),o.media||500)),c=[or("play",a(Uc.Play),s),or("pause",a(Uc.Pause),s),or("seeked",a(Uc.Seeked),s),or("volumechange",a(Uc.VolumeChange),s),or("ratechange",a(Uc.RateChange),s)];return ct(()=>{c.forEach(u=>u())})}function YAe({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(u,f,h){const m=new s(u,f,h);return o.set(m,{family:u,buffer:typeof f!="string",descriptors:h,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),m};const a=Ol(t.fonts,"add",function(c){return function(u){return setTimeout(ct(()=>{const f=o.get(u);f&&(e(f),o.delete(u))}),0),c.apply(this,[u])}});return r.push(()=>{n.FontFace=s}),r.push(a),ct(()=>{r.forEach(c=>c())})}function QAe(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:s}=e;let a=!0;const c=ct(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const f=[],h=u.rangeCount||0;for(let m=0;m<h;m++){const g=u.getRangeAt(m),{startContainer:v,startOffset:C,endContainer:b,endOffset:E}=g;sr(v,r,o,!0)||sr(b,r,o,!0)||f.push({start:n.getId(v),startOffset:C,end:n.getId(b),endOffset:E})}s({ranges:f})});return c(),or("selectionchange",c)}function XAe({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Ol(n.customElements,"define",function(o){return function(s,a,c){try{t({define:{name:s}})}catch{console.warn(`Custom element callback failed for ${s}`)}return o.apply(this,[s,a,c])}})}function JAe(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:a,inputCb:c,mediaInteractionCb:u,styleSheetRuleCb:f,styleDeclarationCb:h,canvasMutationCb:m,fontCb:g,selectionCb:v,customElementCb:C}=e;e.mutationCb=(...b)=>{t.mutation&&t.mutation(...b),n(...b)},e.mousemoveCb=(...b)=>{t.mousemove&&t.mousemove(...b),r(...b)},e.mouseInteractionCb=(...b)=>{t.mouseInteraction&&t.mouseInteraction(...b),o(...b)},e.scrollCb=(...b)=>{t.scroll&&t.scroll(...b),s(...b)},e.viewportResizeCb=(...b)=>{t.viewportResize&&t.viewportResize(...b),a(...b)},e.inputCb=(...b)=>{t.input&&t.input(...b),c(...b)},e.mediaInteractionCb=(...b)=>{t.mediaInteaction&&t.mediaInteaction(...b),u(...b)},e.styleSheetRuleCb=(...b)=>{t.styleSheetRule&&t.styleSheetRule(...b),f(...b)},e.styleDeclarationCb=(...b)=>{t.styleDeclaration&&t.styleDeclaration(...b),h(...b)},e.canvasMutationCb=(...b)=>{t.canvasMutation&&t.canvasMutation(...b),m(...b)},e.fontCb=(...b)=>{t.font&&t.font(...b),g(...b)},e.selectionCb=(...b)=>{t.selection&&t.selection(...b),v(...b)},e.customElementCb=(...b)=>{t.customElement&&t.customElement(...b),C(...b)}}function eRe(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};JAe(e,t);let r;e.recordDOM&&(r=qH(e,e.doc));const o=BAe(e),s=HAe(e),a=VH(e),c=qAe(e,{win:n}),u=WAe(e),f=ZAe(e);let h=()=>{},m=()=>{},g=()=>{},v=()=>{};e.recordDOM&&(h=GAe(e,{win:n}),m=WH(e,e.doc),g=KAe(e,{win:n}),e.collectFonts&&(v=YAe(e)));const C=QAe(e),b=XAe(e),E=[];for(const x of e.plugins)E.push(x.observer(x.callback,n,x.options));return ct(()=>{Ha.forEach(x=>x.reset()),r?.disconnect(),o(),s(),a(),c(),u(),f(),h(),m(),g(),v(),C(),b(),E.forEach(x=>x())})}function pg(e){return typeof window[e]<"u"}function mg(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class U6{constructor(t){we(this,"iframeIdToRemoteIdMap",new WeakMap),we(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),a=o||this.getRemoteIdToIdMap(t);let c=s.get(n);return c||(c=this.generateIdFn(),s.set(n,c),a.set(c,n)),c}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class tRe{constructor(t){we(this,"iframes",new WeakMap),we(this,"crossOriginIframeMap",new WeakMap),we(this,"crossOriginIframeMirror",new U6(lB)),we(this,"crossOriginIframeStyleMirror"),we(this,"crossOriginIframeRootIdMap",new WeakMap),we(this,"mirror"),we(this,"mutationCb"),we(this,"wrappedEmit"),we(this,"loadListener"),we(this,"stylesheetManager"),we(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new U6(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var r,o;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=t.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(o=this.loadListener)==null||o.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case pt.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const o=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,o),this.patchRootIdOnNode(n.data.node,o),{timestamp:n.timestamp,type:pt.IncrementalSnapshot,data:{source:at.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case pt.Meta:case pt.Load:case pt.DomContentLoaded:return!1;case pt.Plugin:return n;case pt.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case pt.IncrementalSnapshot:switch(n.data.source){case at.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(o.node,s)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case at.Drag:case at.TouchMove:case at.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case at.ViewportResize:return!1;case at.MediaInteraction:case at.MouseInteraction:case at.Scroll:case at.CanvasMutation:case at.Input:return this.replaceIds(n.data,t,["id"]),n;case at.StyleSheetRule:case at.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case at.Font:return n;case at.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case at.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==BH.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class nRe{constructor(t){we(this,"shadowDoms",new WeakSet),we(this,"mutationCb"),we(this,"scrollCb"),we(this,"bypassOptions"),we(this,"mirror"),we(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!kf(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const r=qH({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(VH({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(Ye.host(t))),this.restoreHandlers.push(WH({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(Ol(t.prototype,"attachShadow",function(o){return function(s){const a=o.call(this,s),c=Ye.shadowRoot(this);return c&&jH(this)&&r.addShadowRoot(c,n),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Vc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rRe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var gg=0;gg<Vc.length;gg++)rRe[Vc.charCodeAt(gg)]=gg;var oRe=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Vc[t[n]>>2],o+=Vc[(t[n]&3)<<4|t[n+1]>>4],o+=Vc[(t[n+1]&15)<<2|t[n+2]>>6],o+=Vc[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const F6=new Map;function sRe(e,t){let n=F6.get(e);return n||(n=new Map,F6.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const GH=(e,t,n)=>{if(!e||!(ZH(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=sRe(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function Xg(e,t,n){if(e instanceof Array)return e.map(r=>Xg(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=oRe(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Xg(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Xg(e.data,t,n),e.width,e.height]};if(ZH(e,t)||typeof e=="object"){const r=e.constructor.name,o=GH(e,t,n);return{rr_type:r,index:o}}}}return e}const KH=(e,t,n)=>e.map(r=>Xg(r,t,n)),ZH=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function iRe(e,t,n,r){const o=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of s)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=Ol(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...f){return sr(this.canvas,n,r,!0)||setTimeout(()=>{const h=KH(f,t,this);e(this.canvas,{type:vu["2D"],property:a,args:h})},0),u.apply(this,f)}});o.push(c)}catch{const c=Ob(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:vu["2D"],property:a,args:[u],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function aRe(e){return e==="experimental-webgl"?"webgl":e}function $6(e,t,n,r){const o=[];try{const s=Ol(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!sr(this,t,n,!0)){const f=aRe(c);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(u[0]&&typeof u[0]=="object"){const h=u[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});o.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(s=>s())}}function z6(e,t,n,r,o,s){const a=[],c=Object.getOwnPropertyNames(e);for(const u of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;const f=Ol(e,u,function(h){return function(...m){const g=h.apply(this,m);if(GH(g,s,this),"tagName"in this.canvas&&!sr(this.canvas,r,o,!0)){const v=KH(m,s,this),C={type:t,property:u,args:v};n(this.canvas,C)}return g}});a.push(f)}catch{const f=Ob(e,u,{set(h){n(this.canvas,{type:t,property:u,args:[h],setter:!0})}});a.push(f)}return a}function lRe(e,t,n,r){const o=[];return o.push(...z6(t.WebGLRenderingContext.prototype,vu.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...z6(t.WebGL2RenderingContext.prototype,vu.WebGL2,e,n,r,t)),()=>{o.forEach(s=>s())}}const YH="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",cRe=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),j6=typeof window<"u"&&window.Blob&&new Blob([cRe(YH)],{type:"text/javascript;charset=utf-8"});function uRe(e){let t;try{if(t=j6&&(window.URL||window.webkitURL).createObjectURL(j6),!t)throw"";const n=new Worker(t,{name:e?.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:text/javascript;base64,"+YH,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class dRe{constructor(t){we(this,"pendingCanvasMutations",new Map),we(this,"rafStamps",{latestId:0,invokeId:null}),we(this,"mirror"),we(this,"mutationCb"),we(this,"resetObservers"),we(this,"frozen",!1),we(this,"locked",!1),we(this,"processMutation",(u,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(u)||this.pendingCanvasMutations.set(u,[]),this.pendingCanvasMutations.get(u).push(f)});const{sampling:n="all",win:r,blockClass:o,blockSelector:s,recordCanvas:a,dataURLOptions:c}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,o,s),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o,s,{dataURLOptions:c})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r,o,s){const a=$6(n,r,o,!0),c=new Map,u=new uRe;u.onmessage=C=>{const{id:b}=C.data;if(c.set(b,!1),!("base64"in C.data))return;const{base64:E,type:x,width:I,height:R}=C.data;this.mutationCb({id:b,type:vu["2D"],commands:[{property:"clearRect",args:[0,0,I,R]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:E}],type:x}]},0,0]}]})};const f=1e3/t;let h=0,m;const g=()=>{const C=[];return n.document.querySelectorAll("canvas").forEach(b=>{sr(b,r,o,!0)||C.push(b)}),C},v=C=>{if(h&&C-h<f){m=requestAnimationFrame(v);return}h=C,g().forEach(async b=>{var E;const x=this.mirror.getId(b);if(c.get(x)||b.width===0||b.height===0)return;if(c.set(x,!0),["webgl","webgl2"].includes(b.__context)){const R=b.getContext(b.__context);((E=R?.getContextAttributes())==null?void 0:E.preserveDrawingBuffer)===!1&&R.clear(R.COLOR_BUFFER_BIT)}const I=await createImageBitmap(b);u.postMessage({id:x,bitmap:I,width:b.width,height:b.height,dataURLOptions:s.dataURLOptions},[I])}),m=requestAnimationFrame(v)};m=requestAnimationFrame(v),this.resetObservers=()=>{a(),cancelAnimationFrame(m)}}initCanvasMutationObserver(t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=$6(t,n,r,!1),s=iRe(this.processMutation.bind(this),t,n,r),a=lRe(this.processMutation.bind(this),t,n,r);this.resetObservers=()=>{o(),s(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(a=>{const{type:c,...u}=a;return u}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}class fRe{constructor(t){we(this,"trackedLinkElements",new WeakSet),we(this,"mutationCb"),we(this,"adoptedStyleSheetCb"),we(this,"styleMirror",new NAe),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of t){let a;this.styleMirror.has(s)?a=this.styleMirror.getId(s):(a=this.styleMirror.add(s),o.push({styleId:a,rules:Array.from(s.rules||CSSRule,(c,u)=>({rule:sB(c,s.href),index:u}))})),r.styleIds.push(a)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class hRe{constructor(){we(this,"nodeMap",new WeakMap),we(this,"active",!1)}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let dn,Jg,s_,Zv=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((qU=e.contentWindow)==null?void 0:qU.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const yo=mEe();function jh(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskTextClass:u="rr-mask",maskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:v,maskInputFn:C,maskTextFn:b,hooks:E,packFn:x,sampling:I={},dataURLOptions:R={},mousemoveWait:M,recordDOM:D=!0,recordCanvas:N=!1,recordCrossOriginIframes:T=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:$=!1,collectFonts:G=!1,inlineImages:z=!1,plugins:F,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:X=new Set([]),errorHandler:Se}=e;zAe(Se);const V=T?window.parent===window:!0;let ee=!1;if(!V)try{window.parent.document&&(ee=!1)}catch{ee=!0}if(V&&!t)throw new Error("emit function is required");if(!V&&!ee)return()=>{};M!==void 0&&I.mousemove===void 0&&(I.mousemove=M),yo.reset();const pe=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:g!==void 0?g:{password:!0},ge=fB(v);PAe();let Te,j=0;const te=xe=>{for(const xt of F||[])xt.eventProcessor&&(xe=xt.eventProcessor(xe));return x&&!ee&&(xe=x(xe)),xe};dn=(xe,xt)=>{var _t;const ot=xe;if(ot.timestamp=Gv(),(_t=Ha[0])!=null&&_t.isFrozen()&&ot.type!==pt.FullSnapshot&&!(ot.type===pt.IncrementalSnapshot&&ot.data.source===at.Mutation)&&Ha.forEach(En=>En.unfreeze()),V)t?.(te(ot),xt);else if(ee){const En={type:"rrweb",event:te(ot),origin:window.location.origin,isCheckout:xt};window.parent.postMessage(En,"*")}if(ot.type===pt.FullSnapshot)Te=ot,j=0;else if(ot.type===pt.IncrementalSnapshot){if(ot.data.source===at.Mutation&&ot.data.isAttachIframe)return;j++;const En=r&&j>=r,st=n&&ot.timestamp-Te.timestamp>n;(En||st)&&Jg(!0)}};const fe=xe=>{dn({type:pt.IncrementalSnapshot,data:{source:at.Mutation,...xe}})},ae=xe=>dn({type:pt.IncrementalSnapshot,data:{source:at.Scroll,...xe}}),be=xe=>dn({type:pt.IncrementalSnapshot,data:{source:at.CanvasMutation,...xe}}),Fe=xe=>dn({type:pt.IncrementalSnapshot,data:{source:at.AdoptedStyleSheet,...xe}}),ke=new fRe({mutationCb:fe,adoptedStyleSheetCb:Fe}),le=new tRe({mirror:yo,mutationCb:fe,stylesheetManager:ke,recordCrossOriginIframes:T,wrappedEmit:dn});for(const xe of F||[])xe.getMirror&&xe.getMirror({nodeMirror:yo,crossOriginIframeMirror:le.crossOriginIframeMirror,crossOriginIframeStyleMirror:le.crossOriginIframeStyleMirror});const Re=new hRe;s_=new dRe({recordCanvas:N,mutationCb:be,win:window,blockClass:o,blockSelector:s,mirror:yo,sampling:I.canvas,dataURLOptions:R});const rt=new nRe({mutationCb:fe,scrollCb:ae,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:u,maskTextSelector:f,inlineStylesheet:h,maskInputOptions:pe,dataURLOptions:R,maskTextFn:b,maskInputFn:C,recordCanvas:N,inlineImages:z,sampling:I,slimDOMOptions:ge,iframeManager:le,stylesheetManager:ke,canvasManager:s_,keepIframeSrcFn:q,processedNodeManager:Re},mirror:yo});Jg=(xe=!1)=>{if(!D)return;dn({type:pt.Meta,data:{href:window.location.href,width:DH(),height:kH()}},xe),ke.reset(),rt.init(),Ha.forEach(_t=>_t.lock());const xt=$Ee(document,{mirror:yo,blockClass:o,blockSelector:s,maskTextClass:u,maskTextSelector:f,inlineStylesheet:h,maskAllInputs:pe,maskTextFn:b,maskInputFn:C,slimDOM:ge,dataURLOptions:R,recordCanvas:N,inlineImages:z,onSerialize:_t=>{FH(_t,yo)&&le.addIframe(_t),$H(_t,yo)&&ke.trackLinkElement(_t),rA(_t)&&rt.addShadowRoot(Ye.shadowRoot(_t),document)},onIframeLoad:(_t,ot)=>{le.attachIframe(_t,ot),rt.observeAttachShadow(_t)},onStylesheetLoad:(_t,ot)=>{ke.attachLinkElement(_t,ot)},keepIframeSrcFn:q});if(!xt)return console.warn("Failed to snapshot the document");dn({type:pt.FullSnapshot,data:{node:xt,initialOffset:NH(window)}},xe),Ha.forEach(_t=>_t.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ke.adoptStyleSheets(document.adoptedStyleSheets,yo.getId(document))};try{const xe=[],xt=ot=>{var En;return ct(eRe)({mutationCb:fe,mousemoveCb:(st,ti)=>dn({type:pt.IncrementalSnapshot,data:{source:ti,positions:st}}),mouseInteractionCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.MouseInteraction,...st}}),scrollCb:ae,viewportResizeCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.ViewportResize,...st}}),inputCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.Input,...st}}),mediaInteractionCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.MediaInteraction,...st}}),styleSheetRuleCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.StyleSheetRule,...st}}),styleDeclarationCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.StyleDeclaration,...st}}),canvasMutationCb:be,fontCb:st=>dn({type:pt.IncrementalSnapshot,data:{source:at.Font,...st}}),selectionCb:st=>{dn({type:pt.IncrementalSnapshot,data:{source:at.Selection,...st}})},customElementCb:st=>{dn({type:pt.IncrementalSnapshot,data:{source:at.CustomElement,...st}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskTextClass:u,maskTextSelector:f,maskInputOptions:pe,inlineStylesheet:h,sampling:I,recordDOM:D,recordCanvas:N,inlineImages:z,userTriggeredOnInput:$,collectFonts:G,doc:ot,maskInputFn:C,maskTextFn:b,keepIframeSrcFn:q,blockSelector:s,slimDOMOptions:ge,dataURLOptions:R,mirror:yo,iframeManager:le,stylesheetManager:ke,shadowDomManager:rt,processedNodeManager:Re,canvasManager:s_,ignoreCSSAttributes:X,plugins:((En=F?.filter(st=>st.observer))==null?void 0:En.map(st=>({observer:st.observer,options:st.options,callback:ti=>dn({type:pt.Plugin,data:{plugin:st.name,payload:ti}})})))||[]},E)};le.addLoadListener(ot=>{try{xe.push(xt(ot.contentDocument))}catch(En){console.warn(En)}});const _t=()=>{Jg(),xe.push(xt(document)),Zv=!0};return["interactive","complete"].includes(document.readyState)?_t():(xe.push(or("DOMContentLoaded",()=>{dn({type:pt.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&_t()})),xe.push(or("load",()=>{dn({type:pt.Load,data:{}}),L==="load"&&_t()},window))),()=>{xe.forEach(ot=>{try{ot()}catch(En){String(En).toLowerCase().includes("cross-origin")||console.warn(En)}}),Re.destroy(),Zv=!1,jAe()}}catch(xe){console.warn(xe)}}jh.addCustomEvent=(e,t)=>{if(!Zv)throw new Error("please add custom event after start recording");dn({type:pt.Custom,data:{tag:e,payload:t}})};jh.freezePage=()=>{Ha.forEach(e=>e.freeze())};jh.takeFullSnapshot=e=>{if(!Zv)throw new Error("please take full snapshot after start recording");Jg(e)};jh.mirror=yo;var B6;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(B6||(B6={}));const pRe="rrweb",mRe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},gRe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},H6=gRe;class vRe extends uo{constructor(t){super(pRe),this.recordingEvents=[],this.isRecording=!1,this.recordingStartTime=null,this.flushTimer=null,this.stopRecording=null,this.enabled=!1;const n=Object.assign(Object.assign(Object.assign({},H6.recordOptions),t?.recordOptions),mRe);this.config=Object.assign(Object.assign(Object.assign({},H6),t),{recordOptions:n}),Ce.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var t;if(this.enabled){Ce.info("RRWebPlugin already enabled");return}const n=(t=this.context)===null||t===void 0?void 0:t.getSession();if(!n||!n.record){Ce.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!n,sessionRecord:n?.record});return}const r=Math.random();if(r>this.config.additionalSampleRate){Ce.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:r,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,Ce.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){Ce.info("RRWebPlugin already disabled");return}Ce.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(t){const n=t?.action;n==="start"?(Ce.info("RRWebPlugin manual start recording"),this.startRecording()):n==="stop"&&(Ce.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,Ce.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});const t=jh(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));t?(this.stopRecording=t,Ce.info("RRWebPlugin rrweb recording initialized successfully")):Ce.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){Ce.info("RRWebPlugin stopCurrentRecording called but not recording");return}Ce.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,Ce.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,Ce.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(t){this.isRecording&&(this.recordingEvents.push(t),this.recordingEvents.length>=this.config.batchSize&&(Ce.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){Ce.info("RRWebPlugin flushEvent called but no events to flush");return}Ce.info("RRWebPlugin flushing events",{eventCount:this.recordingEvents.length});const t=[...this.recordingEvents],n={version:"1.0.0",events:t,eventCount:t.length};this.context.record(RU,n),Ce.info("RRWebPlugin events sent to RUM",{eventType:RU,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var yRe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},sA;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(sA||(sA={}));const QH="us-west-2",iA=`https://dataplane.rum.${QH}.amazonaws.com`,XH=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),JH=e=>({allowCookies:!1,batchLimit:100,client:B1e,compressionStrategy:{enabled:!0},cookieAttributes:e,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:iA,endpointUrl:new URL(iA),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:sA.Path,pagesToExclude:[],pagesToInclude:[/.*/],signing:!1,recordResourceUrl:!0,retries:2,routeChangeComplete:100,routeChangeTimeout:1e4,sessionAttributes:{},sessionEventLimit:200,sessionLengthSeconds:1800,sessionSampleRate:1,suppressSessionStartEvent:!1,useBeacon:!0,userIdRetentionDays:30,enableW3CTraceId:!1,candidatesCacheSize:10});let bRe=class{constructor(t,n,r,o={}){var{cookieAttributes:s}=o,a=yRe(o,["cookieAttributes"]);this.eventBus=new Hj,typeof r>"u"&&(r="us-west-2"),this.applicationId=t;const c=Object.assign(Object.assign({},XH()),s);this.config=Object.assign(Object.assign({fetchFunction:fetch},JH(c)),a),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=a.endpoint?a.endpoint:iA.replace(QH,r),this.config.endpointUrl=new URL(this.config.endpoint),Ce.configure(this.config.debug),Ce.info("Initialized RUM Slim"),this.eventCache=new JCe({id:t,version:n},this.config,this.eventBus),this.dispatchManager=this.initDispatch(r,t),this.pluginManager=this.initPluginManager(t,n),this.eventCache.setPluginFlushHook(()=>this.pluginManager.flush()),this.config.enableRumClient?this.enable():this.disable()}setAwsCredentials(t){this.dispatchManager.setAwsCredentials(t)}setSigningConfigFactory(t){this.dispatchManager.setSigningConfigFactory(t)}addSessionAttributes(t){this.eventCache.addSessionAttributes(t)}getSessionId(){return this.eventCache.getSessionId()}pinSessionId(t){this.eventCache.pinSessionId(t)}startSession(t){return this.eventCache.startSession(t)}getUserId(){return this.eventCache.getUserId()}pinUserId(t){this.eventCache.pinUserId(t)}setEventMetadataHook(t){this.eventCache.setEventMetadataHook(t)}clearEventMetadataHook(){this.eventCache.clearEventMetadataHook()}addPlugin(t){this.pluginManager.addPlugin(t)}dispatch(){this.dispatchManager.dispatchFetch()}dispatchBeacon(){this.dispatchManager.dispatchBeacon()}enable(){this.eventCache.enable(),this.pluginManager.enable(),this.dispatchManager.enable()}disable(){this.dispatchManager.disable(),this.pluginManager.disable(),this.eventCache.disable()}allowCookies(t){this.config.allowCookies=t}clearCookies(){const t=this.config.cookieAttributes;[Rv,Tv,uu,`${Rv}_${this.applicationId}`,`${Tv}_${this.applicationId}`,`${uu}_${this.applicationId}`].forEach(r=>VCe(r,t))}recordPageView(t){this.eventCache.recordPageView(t)}recordError(t){this.pluginManager.record("com.amazonaws.rum.js-error",t)}registerDomEvents(t){this.pluginManager.updatePlugin("com.amazonaws.rum.dom-event",t)}recordEvent(t,n,r){this.eventCache.recordEvent(t,n,r)}initDispatch(t,n){return new H1e(n,t,this.config.endpointUrl,this.eventCache,this.config)}initPluginManager(t,n){const r={applicationId:t,applicationVersion:n,config:this.config,record:this.eventCache.recordEvent,recordCandidate:this.eventCache.recordCandidate,recordPageView:this.eventCache.recordPageView,getSession:this.eventCache.getSession,eventBus:this.eventBus},o=new qCe(r);return this.config.disableAutoPageView||o.addPlugin(new vwe),this.config.eventPluginsToLoad.forEach(s=>{o.addPlugin(s)}),o}};var xo;(function(e){e.Errors="errors",e.Performance="performance",e.Interaction="interaction",e.Http="http",e.Replay="replay"})(xo||(xo={}));var q6;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(q6||(q6={}));const SRe=e=>Object.assign(Object.assign({},JH(e)),{signing:!0,telemetries:[xo.Errors,xo.Performance,xo.Http,xo.Replay]});class CRe extends bRe{constructor(t,n,r,o={}){super(t,n,r,Object.assign(Object.assign({},SRe(XH())),o)),Ce.info(`RUM client initialized for app: ${t}`),Ce.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(t,n){const r=super.initDispatch(t,n);return r.setSigningConfigFactory(yCe),r.setCognitoCredentialProviderFactory((o,s,a,c)=>{const u={identityPoolId:a,guestRoleArn:c,cookieAttributes:o.cookieAttributes};return a&&c?new kCe(u,s).ChainAnonymousCredentialsProvider:new DCe(u,s).ChainAnonymousCredentialsProvider}),this.config.signing&&this.config.identityPoolId&&r.setCognitoCredentials(this.config.identityPoolId,this.config.guestRoleArn),r}initPluginManager(t,n){const r=super.initPluginManager(t,n);return this.constructBuiltinPlugins().forEach(s=>{r.addPlugin(s)}),r}recordError(t){this.pluginManager.record(Wj,t)}registerDomEvents(t){this.pluginManager.updatePlugin(qj,t)}constructBuiltinPlugins(){let t=[];const n=this.telemetryFunctor();return this.config.telemetries.forEach(r=>{typeof r=="string"&&n[r.toLowerCase()]?t=[...t,...n[r.toLowerCase()]({})]:Array.isArray(r)&&n[r[0].toLowerCase()]&&(t=[...t,...n[r[0].toLowerCase()](r[1])])}),t}telemetryFunctor(){return{[xo.Errors]:t=>[new uwe(t)],[xo.Performance]:t=>[new hwe(t),new bwe(t),new $we(t)],[xo.Interaction]:t=>[new xT(t)],[xo.Http]:t=>[new qwe(t),new jwe(t)],[xo.Replay]:t=>[new vRe(t)]}}}const eq={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},wRe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi,ERe=/\/reset-password\/[^/?#\s]+/gi;function tq(e){return e.replace(wRe,"[redacted]").replace(ERe,"/reset-password/[redacted]")}function xRe(e){const t=e.indexOf("?"),n=e.indexOf("#"),r=t===-1&&n===-1?e.length:t===-1?n:n===-1?t:Math.min(t,n);return tq(e.slice(0,r))}function _Re(e){const t=tq(e.message);if(t===e.message)return e;const n=new Error(t);return n.name=e.name,n.stack=e.stack,n}function IRe(e){return{recordPageView(t){e.recordPageView(xRe(t))},recordError(t,n){e.recordError(_Re(t)),n&&e.recordEvent("telemetry.error_context",n)},recordEvent(t,n){e.recordEvent(t,n??{})},recordTiming(t,n,r){e.recordEvent("telemetry.timing",{...r,name:t,durationMs:String(n)})}}}function V6(e){return e instanceof Error?e:new Error(String(e))}function ARe(e){window.addEventListener("error",t=>{e.recordError(V6(t.error??t.message))}),window.addEventListener("unhandledrejection",t=>{e.recordError(V6(t.reason))})}function RRe(){const{appMonitorId:e,identityPoolId:t,region:n}=Pu().rum;if(!e)return eq;const r=new CRe(e,"1.0.0",n,{sessionSampleRate:1,identityPoolId:t,endpoint:`https://dataplane.rum.${n}.amazonaws.com`,telemetries:["performance"],disableAutoPageView:!0,allowCookies:!1,enableXRay:!1}),o=IRe(r);return ARe(o),o}const TRe="remit.stale-build-reload:",ORe=({reload:e,guard:t,commit:n})=>{if(t===null)return!1;const r=`${TRe}${n}`;return t.getItem(r)!==null?!1:(t.setItem(r,String(Date.now())),e(),!0)},MRe=()=>{window.addEventListener("vite:preloadError",e=>{ORe({reload:()=>window.location.reload(),guard:QA(),commit:Ay})&&e.preventDefault()})},nq=_.createContext(eq);function X9e(){return _.useContext(nq)}const aA="remit.theme",PRe="dark";function W6(){return typeof localStorage>"u"?"system":localStorage.getItem(aA)??"system"}function lA(e){if(typeof document>"u")return;const t=e==="dark"||e==="system"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle(PRe,t)}function J9e(e){typeof localStorage<"u"&&(e==="system"?localStorage.removeItem(aA):localStorage.setItem(aA,e)),lA(e)}const NRe=()=>{if(typeof window>"u"||(lA(W6()),typeof window.matchMedia!="function"))return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{lA(W6())};typeof e.addEventListener=="function"?e.addEventListener("change",t):e.addListener(t)},kRe=e=>e==="true"||e==="false"||e==="null"||/^["[{]/.test(e)||e!==""&&Number.isFinite(Number(e));function G6(e){return typeof e=="object"&&e!==null?JSON.stringify(e):typeof e=="string"?kRe(e)?JSON.stringify(e):e:String(e)}function DRe(e){const t=new URLSearchParams;for(const r of Object.keys(e)){const o=e[r];if(o!==void 0){if(Array.isArray(o)){for(const s of o)t.append(r,G6(s));continue}t.set(r,G6(o))}}const n=t.toString();return n===""?"":`?${n}`}const LRe=(e,t,n,r)=>{const o=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Ja(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},K6={},cA=(e,t,n,r)=>{Ja(n)&&K6[n]||(Ja(n)&&(K6[n]=new Date),LRe(e,t,n,r))},rq=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},uA=(e,t,n)=>{e.loadNamespaces(t,rq(e,n))},Z6=(e,t,n,r)=>{if(Ja(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return uA(e,n,r);n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,rq(e,r))},URe=(e,t,n={})=>!t.languages||!t.languages.length?(cA(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),Ja=e=>typeof e=="string",FRe=e=>typeof e=="object"&&e!==null,$Re=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,zRe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},jRe=e=>zRe[e],BRe=e=>e.replace($Re,jRe);let dA={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:BRe};const HRe=(e={})=>{dA={...dA,...e}},qRe=()=>dA;let oq;const VRe=e=>{oq=e},WRe=()=>oq,GRe={type:"3rdParty",init(e){HRe(e.options.react),VRe(e)}},KRe=_.createContext();class ZRe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const YRe=(e,t)=>{const n=_.useRef();return _.useEffect(()=>{n.current=e},[e,t]),n.current},sq=(e,t,n,r)=>e.getFixedT(t,n,r),QRe=(e,t,n,r)=>_.useCallback(sq(e,t,n,r),[e,t,n,r]),iq=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:o}=_.useContext(KRe)||{},s=n||r||WRe();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new ZRe),!s){cA(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const M=(N,T)=>Ja(T)?T:FRe(T)&&Ja(T.defaultValue)?T.defaultValue:Array.isArray(N)?N[N.length-1]:N,D=[M,{},!1];return D.t=M,D.i18n={},D.ready=!1,D}s.options.react?.wait&&cA(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...qRe(),...s.options.react,...t},{useSuspense:c,keyPrefix:u}=a;let f=e||o||s.options?.defaultNS;f=Ja(f)?[f]:f||["translation"],s.reportNamespaces.addUsedNamespaces?.(f);const h=(s.isInitialized||s.initializedStoreOnce)&&f.every(M=>URe(M,s,a)),m=QRe(s,t.lng||null,a.nsMode==="fallback"?f:f[0],u),g=()=>m,v=()=>sq(s,t.lng||null,a.nsMode==="fallback"?f:f[0],u),[C,b]=_.useState(g);let E=f.join();t.lng&&(E=`${t.lng}${E}`);const x=YRe(E),I=_.useRef(!0);_.useEffect(()=>{const{bindI18n:M,bindI18nStore:D}=a;I.current=!0,!h&&!c&&(t.lng?Z6(s,t.lng,f,()=>{I.current&&b(v)}):uA(s,f,()=>{I.current&&b(v)})),h&&x&&x!==E&&I.current&&b(v);const N=()=>{I.current&&b(v)};return M&&s?.on(M,N),D&&s?.store.on(D,N),()=>{I.current=!1,s&&M&&M?.split(" ").forEach(T=>s.off(T,N)),D&&s&&D.split(" ").forEach(T=>s.store.off(T,N))}},[s,E]),_.useEffect(()=>{I.current&&h&&b(g)},[s,u,h]);const R=[C,s,h];if(R.t=C,R.i18n=s,R.ready=h,h||!h&&!c)return R;throw new Promise(M=>{t.lng?Z6(s,t.lng,f,()=>M()):uA(s,f,()=>M())})},XRe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...e,headers:{"Content-Type":"application/json",...e.headers}}),JRe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...e,headers:{"Content-Type":"application/json",...e.headers}}),eTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...e,headers:{"Content-Type":"application/json",...e.headers}}),tTe=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...e}),nTe=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),rTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...e}),oTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...e,headers:{"Content-Type":"application/json",...e.headers}}),sTe=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...e}),iTe=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),aTe=e=>(e.client??he).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...e,headers:{"Content-Type":"application/json",...e.headers}}),e7e=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...e}),lTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),cTe=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...e}),uTe=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),dTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...e}),fTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...e,headers:{"Content-Type":"application/json",...e.headers}}),t7e=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...e}),hTe=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),pTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/messages/rescan",...e,headers:{"Content-Type":"application/json",...e.headers}}),mTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...e,headers:{"Content-Type":"application/json",...e.headers}}),gTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...e,headers:{"Content-Type":"application/json",...e.headers}}),vTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...e}),yTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...e}),bTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...e}),STe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/trash/empty",...e}),CTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...e}),wTe=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),ETe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events",...e}),xTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events",...e,headers:{"Content-Type":"application/json",...e.headers}}),_Te=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e}),ITe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e}),ATe=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),RTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-free-busy",...e}),TTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions",...e}),OTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/accept",...e,headers:{"Content-Type":"application/json",...e.headers}}),MTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/decline",...e}),PTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/dismiss",...e,headers:{"Content-Type":"application/json",...e.headers}}),NTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/reopen",...e}),kTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks",...e}),DTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks",...e,headers:{"Content-Type":"application/json",...e.headers}}),LTe=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e}),UTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e}),FTe=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),$Te=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars",...e}),zTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars",...e,headers:{"Content-Type":"application/json",...e.headers}}),jTe=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}",...e}),BTe=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),HTe=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),qTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),VTe=e=>(e.client??he).put({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),WTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/classification-stats",...e}),GTe=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...e}),KTe=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config/export",...e}),ZTe=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/config/import",...e,headers:{"Content-Type":"application/json",...e.headers}}),n7e=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...e}),YTe=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...e}),QTe=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...e,headers:{"Content-Type":"application/json",...e.headers}}),XTe=e=>(e?.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...e}),JTe=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/quarantine",...e}),e2e=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...e}),t2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...e,headers:{"Content-Type":"application/json",...e.headers}}),n2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...e,headers:{"Content-Type":"application/json",...e.headers}}),r2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),o2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...e,headers:{"Content-Type":"application/json",...e.headers}}),r7e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/not-spam",...e,headers:{"Content-Type":"application/json",...e.headers}}),o7e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/report-spam",...e,headers:{"Content-Type":"application/json",...e.headers}}),s2e=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...e}),i2e=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/calendar-suggestions",...e}),a2e=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...e,headers:{"Content-Type":"application/json",...e.headers}}),l2e=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...e}),c2e=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...e}),u2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...e,headers:{"Content-Type":"application/json",...e.headers}}),d2e=e=>(e.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e}),f2e=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e}),h2e=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),p2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/attachments",...e,headers:{"Content-Type":"application/json",...e.headers}}),m2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/attachments/{outboxAttachmentId}/complete",...e}),g2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...e}),v2e=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/people",...e}),s7e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/step-up",...e,headers:{"Content-Type":"application/json",...e.headers}}),i7e=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),a7e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}/password-reset",...e,headers:{"Content-Type":"application/json",...e.headers}}),l7e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}/sign-out",...e,headers:{"Content-Type":"application/json",...e.headers}}),y2e=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/settings",...e}),b2e=e=>(e.client??he).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/settings",...e,headers:{"Content-Type":"application/json",...e.headers}}),S2e=e=>(e?.client??he).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/settings/classification-provider",...e}),C2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/settings/classification-test",...e,headers:{"Content-Type":"application/json",...e.headers}}),aq=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...e}),w2e=e=>(e.client??he).post({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...e,headers:{"Content-Type":"application/json",...e.headers}}),E2e=e=>(e?.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...e}),x2e=e=>(e.client??he).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...e}),c7e=e=>({mutationFn:async n=>{const{data:r}=await XRe({...e,...n,throwOnError:!0});return r}}),yt=(e,t,n,r)=>{const o={_id:e,baseUrl:t?.baseUrl||(t?.client??he).getConfig().baseUrl};return t?.body&&(o.body=t.body),t?.headers&&(o.headers=t.headers),t?.path&&(o.path=t.path),t?.query&&(o.query=t.query),[o]},u7e=e=>({mutationFn:async n=>{const{data:r}=await JRe({...e,...n,throwOnError:!0});return r}}),d7e=e=>({mutationFn:async n=>{const{data:r}=await eTe({...e,...n,throwOnError:!0});return r}}),f7e=e=>({mutationFn:async n=>{const{data:r}=await tTe({...e,...n,throwOnError:!0});return r}}),h7e=e=>({mutationFn:async n=>{const{data:r}=await nTe({...e,...n,throwOnError:!0});return r}}),_2e=e=>yt("filterOperationsListFilters",e),p7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await rTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:_2e(e)}),m7e=e=>({mutationFn:async n=>{const{data:r}=await oTe({...e,...n,throwOnError:!0});return r}}),g7e=e=>({mutationFn:async n=>{const{data:r}=await sTe({...e,...n,throwOnError:!0});return r}}),v7e=e=>yt("filterDetailOperationsGetFilter",e),y7e=e=>({mutationFn:async n=>{const{data:r}=await iTe({...e,...n,throwOnError:!0});return r}}),I2e=e=>({mutationFn:async n=>{const{data:r}=await aTe({...e,...n,throwOnError:!0});return r}}),b7e=e=>yt("labelOperationsListLabels",e),S7e=e=>({mutationFn:async n=>{const{data:r}=await lTe({...e,...n,throwOnError:!0});return r}}),C7e=e=>({mutationFn:async n=>{const{data:r}=await cTe({...e,...n,throwOnError:!0});return r}}),w7e=e=>({mutationFn:async n=>{const{data:r}=await uTe({...e,...n,throwOnError:!0});return r}}),o2=e=>yt("mailboxOperationsListMailboxes",e),fA=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await dTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:o2(e)}),A2e=e=>({mutationFn:async n=>{const{data:r}=await fTe({...e,...n,throwOnError:!0});return r}}),E7e=e=>({mutationFn:async n=>{const{data:r}=await hTe({...e,...n,throwOnError:!0});return r}}),x7e=e=>({mutationFn:async n=>{const{data:r}=await mTe({...e,...n,throwOnError:!0});return r}}),_7e=e=>({mutationFn:async n=>{const{data:r}=await gTe({...e,...n,throwOnError:!0});return r}}),R2e=e=>yt("organizeJobDetailOperationsGetOrganizeJob",e),I7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await vTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:R2e(e)}),A7e=e=>({mutationFn:async n=>{const{data:r}=await yTe({...e,...n,throwOnError:!0});return r}}),T2e=e=>yt("syncOperationsGetSyncStatus",e),R7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await bTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:T2e(e)}),T7e=e=>({mutationFn:async n=>{const{data:r}=await STe({...e,...n,throwOnError:!0});return r}}),O2e=e=>yt("addressOperationsSearchAddresses",e),O7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await CTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:O2e(e)}),M7e=e=>({mutationFn:async n=>{const{data:r}=await wTe({...e,...n,throwOnError:!0});return r}}),M2e=e=>yt("calendarEventOperationsListCalendarEvents",e),P7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await ETe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:M2e(e)}),N7e=e=>({mutationFn:async n=>{const{data:r}=await xTe({...e,...n,throwOnError:!0});return r}}),k7e=e=>({mutationFn:async n=>{const{data:r}=await _Te({...e,...n,throwOnError:!0});return r}}),P2e=e=>yt("calendarEventDetailOperationsGetCalendarEvent",e),D7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await ITe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:P2e(e)}),L7e=e=>({mutationFn:async n=>{const{data:r}=await ATe({...e,...n,throwOnError:!0});return r}}),N2e=e=>yt("calendarFreeBusyOperationsListCalendarFreeBusy",e),U7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await RTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:N2e(e)}),k2e=e=>yt("calendarSuggestionOperationsListCalendarSuggestions",e),F7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await TTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:k2e(e)}),$7e=e=>({mutationFn:async n=>{const{data:r}=await OTe({...e,...n,throwOnError:!0});return r}}),z7e=e=>({mutationFn:async n=>{const{data:r}=await MTe({...e,...n,throwOnError:!0});return r}}),j7e=e=>({mutationFn:async n=>{const{data:r}=await PTe({...e,...n,throwOnError:!0});return r}}),B7e=e=>({mutationFn:async n=>{const{data:r}=await NTe({...e,...n,throwOnError:!0});return r}}),D2e=e=>yt("calendarTaskOperationsListCalendarTasks",e),H7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await kTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:D2e(e)}),q7e=e=>({mutationFn:async n=>{const{data:r}=await DTe({...e,...n,throwOnError:!0});return r}}),V7e=e=>({mutationFn:async n=>{const{data:r}=await LTe({...e,...n,throwOnError:!0});return r}}),L2e=e=>yt("calendarTaskDetailOperationsGetCalendarTask",e),W7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await UTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:L2e(e)}),G7e=e=>({mutationFn:async n=>{const{data:r}=await FTe({...e,...n,throwOnError:!0});return r}}),U2e=e=>yt("calendarOperationsListCalendars",e),K7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await $Te({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:U2e(e)}),Z7e=e=>({mutationFn:async n=>{const{data:r}=await zTe({...e,...n,throwOnError:!0});return r}}),Y7e=e=>({mutationFn:async n=>{const{data:r}=await jTe({...e,...n,throwOnError:!0});return r}}),Q7e=e=>({mutationFn:async n=>{const{data:r}=await BTe({...e,...n,throwOnError:!0});return r}}),X7e=e=>({mutationFn:async n=>{const{data:r}=await HTe({...e,...n,throwOnError:!0});return r}}),F2e=e=>yt("calendarDetailOperationsGetCalendarFeed",e),J7e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await qTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:F2e(e)}),eje=e=>({mutationFn:async n=>{const{data:r}=await VTe({...e,...n,throwOnError:!0});return r}}),$2e=e=>yt("classificationStatsOperationsGetClassificationStats",e),tje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await WTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:$2e(e)}),lq=e=>yt("configOperationsGetConfig",e),s2=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await GTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:lq(e)}),z2e=e=>yt("configOperationsExportConfig",e),nje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await KTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:z2e(e)}),rje=e=>({mutationFn:async n=>{const{data:r}=await ZTe({...e,...n,throwOnError:!0});return r}}),j2e=e=>yt("threadOperationsListThreads",e),cq=e=>yt("threadOperationsSearchThreads",e),oje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await YTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:cq(e)}),sje=e=>({mutationFn:async n=>{const{data:r}=await QTe({...e,...n,throwOnError:!0});return r}}),ije=e=>({mutationFn:async n=>{const{data:r}=await XTe({...e,...n,throwOnError:!0});return r}}),B2e=e=>yt("meOperationsListQuarantine",e),H2e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await JTe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:B2e(e)}),q2e=e=>yt("meOperationsListVipSuggestions",e),aje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await e2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:q2e(e)}),lje=e=>({mutationFn:async n=>{const{data:r}=await t2e({...e,...n,throwOnError:!0});return r}}),cje=e=>({mutationFn:async n=>{const{data:r}=await n2e({...e,...n,throwOnError:!0});return r}}),uje=e=>({mutationFn:async n=>{const{data:r}=await r2e({...e,...n,throwOnError:!0});return r}}),dje=e=>({mutationFn:async n=>{const{data:r}=await o2e({...e,...n,throwOnError:!0});return r}}),V2e=e=>yt("messageOperationsDescribeMessage",e),fje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await s2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:V2e(e)}),W2e=e=>yt("messageCalendarSuggestionOperationsListMessageCalendarSuggestions",e),hje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await i2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:W2e(e)}),pje=e=>({mutationFn:async n=>{const{data:r}=await a2e({...e,...n,throwOnError:!0});return r}}),G2e=e=>yt("messageOperationsGetRawMessage",e),mje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await l2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:G2e(e)}),uq=e=>yt("outboxOperationsListOutboxMessages",e),gje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await c2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:uq(e)}),vje=e=>({mutationFn:async n=>{const{data:r}=await u2e({...e,...n,throwOnError:!0});return r}}),yje=e=>({mutationFn:async n=>{const{data:r}=await d2e({...e,...n,throwOnError:!0});return r}}),K2e=e=>yt("outboxDetailOperationsGetOutboxMessage",e),Z2e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await f2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:K2e(e)}),bje=e=>({mutationFn:async n=>{const{data:r}=await h2e({...e,...n,throwOnError:!0});return r}}),Sje=e=>({mutationFn:async n=>{const{data:r}=await p2e({...e,...n,throwOnError:!0});return r}}),Cje=e=>({mutationFn:async n=>{const{data:r}=await m2e({...e,...n,throwOnError:!0});return r}}),wje=e=>({mutationFn:async n=>{const{data:r}=await g2e({...e,...n,throwOnError:!0});return r}}),Y2e=e=>yt("peopleOperationsListPeople",e),Q2e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await v2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Y2e(e)}),X2e=e=>yt("userSettingsOperationsGetUserSettings",e),Eje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await y2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:X2e(e)}),xje=e=>({mutationFn:async n=>{const{data:r}=await b2e({...e,...n,throwOnError:!0});return r}}),_je=e=>({mutationFn:async n=>{const{data:r}=await S2e({...e,...n,throwOnError:!0});return r}}),Ije=e=>({mutationFn:async n=>{const{data:r}=await C2e({...e,...n,throwOnError:!0});return r}}),hA=e=>yt("systemOperationsGetSystemUpdate",e),J2e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await aq({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:hA(e)}),eOe=e=>({mutationFn:async n=>{const{data:r}=await w2e({...e,...n,throwOnError:!0});return r}}),dq=e=>yt("unifiedThreadOperationsListAllThreads",e),tOe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await E2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:dq(e)}),fq=e=>yt("threadDetailOperationsListThreadMessages",e),Aje=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await x2e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:fq(e)}),hq=_.createContext(void 0),nOe=2e3,rOe=6e4,oOe=e=>e==="unfiled"||e==="failed"||e==="blocked",sOe=Py(404),Y6=(e,t)=>oOe(e)||t!=null,iOe=({children:e})=>{const[t,n]=_.useState(),r=ia(),{data:o,error:s}=fl({...Z2e({path:{outboxMessageId:t??""}}),enabled:!!t,meta:sOe,retry:(g,v)=>!zz(v)&&g<1,refetchInterval:g=>Y6(g.state.data?.status,g.state.error)?!1:nOe}),a=_.useCallback(()=>{n(void 0),r.invalidateQueries({queryKey:uq()})},[r]);_.useEffect(()=>{t&&Y6(o?.status,s)&&a()},[o,s,t,a]),_.useEffect(()=>{if(!t)return;const g=setTimeout(a,rOe);return()=>clearTimeout(g)},[t,a]);const c=_.useCallback(g=>{n(g)},[]),u=_.useRef(new Map),f=_.useCallback((g,v)=>{const C=u.current.get(g);return C?(C(v),!0):!1},[]),h=_.useCallback((g,v)=>(u.current.set(g,v),()=>{u.current.get(g)===v&&u.current.delete(g)}),[]),m=_.useMemo(()=>({startSendPolling:c,insertIntoOpenReply:f,registerOpenReply:h}),[c,f,h]);return O.jsx(hq.Provider,{value:m,children:e})},Rje=()=>{const e=_.useContext(hq);if(!e)throw new Error("useCompose must be used within a ComposeProvider");return e};function pA(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Q6(e,t="|"){return e.map(n=>bq(n)).join(t)}function mA(e,t){return typeof t=="bigint"?t.toString():t}class aOe{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function i2(e){return new aOe(e)}function lOe(e){return e==null}function a2(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function cOe(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}const X6=Symbol("evaluating");function uOe(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==X6)return r===void 0&&(r=X6,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function aa(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function pq(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Ks(e){return pq(e._zod.def)??e._zod.def.shape}function mq(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return aa(this,t,r),r},enumerable:!0,configurable:!0})}function gq(e,t,n){t in e?aa(e,t,n):e[t]=n}function pl(e,t,n,r){const o=Ks(t);for(const s of n){const a=Object.getOwnPropertyDescriptor(o,s);a.enumerable&&(a.get?mq(e,s,()=>{const c=t._zod.def.shape[s];return r?r(c,s):c}):gq(e,s,r?r(a.value,s):a.value))}}function dOe(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?mq(e,n,()=>t[n]):gq(e,n,r.value))}}function Fr(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function fOe(e){return JSON.stringify(e)}function hOe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const vq="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Yv(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const pOe=i2(()=>{if(To.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function yu(e){if(Yv(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Yv(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function yq(e){return yu(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const mOe=new Set(["string","number","symbol"]);function bu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function la(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ne(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function bq(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function gOe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const Sq={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},vOe={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function yOe(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s={};return pl(s,e,Mb(e,t)),la(e,Fr(n,{shape:s,checks:[]}))}function Mb(e,t){const n=Ks(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function bOe(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=new Set(Mb(e,t)),a={};return pl(a,e,Reflect.ownKeys(Ks(e)).filter(c=>!s.has(c))),la(e,Fr(n,{shape:a,checks:[]}))}function SOe(e,t){if(!yu(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=Ks(e);for(const s of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return la(e,Fr(e._zod.def,{shape:Cq(e,t)}))}function Cq(e,t){const n={};return pl(n,e,Reflect.ownKeys(Ks(e))),dOe(n,t),n}function COe(e,t){if(!yu(t))throw new Error("Invalid input to safeExtend: expected a plain object");return la(e,Fr(e._zod.def,{shape:Cq(e,t)}))}function wOe(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};pl(n,e,Reflect.ownKeys(Ks(e))),pl(n,t,Reflect.ownKeys(Ks(t)));const r=Fr(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return la(e,r)}function J6(e,t,n,r="partial"){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(Mb(t,n)):void 0,u={};return pl(u,t,Reflect.ownKeys(Ks(t)),e&&((f,h)=>c&&!c.has(h)?f:new e({type:"optional",innerType:f}))),la(t,Fr(t._zod.def,{shape:u,checks:[]}))}function EOe(e,t,n){const r=n?new Set(Mb(t,n)):void 0,o={};return pl(o,t,Reflect.ownKeys(Ks(t)),(s,a)=>r&&!r.has(a)?s:new e({type:"nonoptional",innerType:s})),la(t,Fr(t._zod.def,{shape:o}))}function Ls(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xOe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Wc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function lf(e){return typeof e=="string"?e:e?.message}function e8(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function gA(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function ta(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:lf(e.inst?._zod.def?.error?.(e))??lf(s?.(e))??lf(t?.error?.(e))??lf(n.customError?.(e))??lf(n.localeError?.(e))??"Invalid input",c={};for(const u of Object.keys(e))u==="inst"||u==="schema"||u==="continue"||u==="input"||u==="__proto__"||(c[u]=e[u]);return c.path??(c.path=[]),c.message=a,t?.reportInput&&(c.input=e.input),c}const _Oe=/[\uD800-\uDBFF]/;function l2(e){const t=e.length;if(!_Oe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function c2(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function IOe(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ph(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function AOe(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ROe(e,n,r.value)}}function na(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function wq(e,t,n){return na(e,t,n,!1)}function Eq(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return na(this,n,r(this))},set(o){na(this,n,o)}})}return t}function ROe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:na(this,t,n.bind(this))},set(r){na(this,t,r)}})}function TOe(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let i_,Ni=!1;const OOe={configurable:!0,get(){Ni=!0}};function ut(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&i_!==e._zod){i_=void 0;return}i_=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,OOe);const o=Ni;Ni=!1;try{const s=n(this);return Ni?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),Ni=Ni||o,s}catch(s){throw delete this[t],Ni=Ni||o,s}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function MOe(e,t,n,r){const o=TOe(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,s),s.value=n(this),Object.defineProperty(this,t,s),s.value},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const POe="~constantCatch";function NOe(e){const t=()=>e;return t[POe]=!0,t}var t8;const a_={value:void 0,enumerable:!1};let n8="captureStackTrace"in Error?Error:null;function kOe(e){const t=n8;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return n8=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function re(e,t,n,r){const o={};function s(g){this.def=g,this.constr=m,this.traits=new Set}s.prototype=o;const a=n,c=a&&new WeakSet;function u(g,v){if(g._zod){if(g._zod.traits.has(e))return}else{a_.value=new s(v);try{Object.defineProperty(g,"_zod",a_)}finally{a_.value=void 0}}if(g._zod.traits.add(e),t(g,v),c){const b=Object.getPrototypeOf(g),E=g._zod.constr.prototype;let x=b;for(;x&&x!==E;)x=Object.getPrototypeOf(x);const I=x??b;c.has(I)||(c.add(I),AOe(I,a))}const C=m.prototype;for(const b in C)Object.prototype.hasOwnProperty.call(C,b)&&(b in g||(g[b]=C[b].bind(g)))}const f=r?.Parent??Object;class h extends f{}Object.defineProperty(h,"name",{value:e});function m(g){const v=r?.Parent?kOe(h):this;u(v,g);const C=v._zod.deferred;if(C){for(const E of C)E();v._zod.deferred=void 0}const b=globalThis.__zod_globalConfig?.postProcessor;return b&&b(v),v}return Object.defineProperty(m,"init",{value:u}),Object.defineProperty(m,Symbol.hasInstance,{value:g=>r?.Parent&&g instanceof r.Parent?!0:g?._zod?.traits?.has(e)}),Object.defineProperty(m,"name",{value:e}),m}class el extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class xq extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(t8=globalThis).__zod_globalConfig??(t8.__zod_globalConfig={});const To=globalThis.__zod_globalConfig;function Jo(e){return e&&Object.assign(To,e),To}function DOe(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,mA,2)),e.message}function LOe(e){this._zod.message=e}const UOe={get:DOe,set:LOe,enumerable:!0,configurable:!0},l_={value:void 0,enumerable:!1},r8=new WeakSet([Object.prototype,Error.prototype]),_q=(e,t)=>{e.name="$ZodError",l_.value=t,Object.defineProperty(e,"issues",l_),l_.value=void 0,Object.defineProperty(e,"message",UOe);const n=Object.getPrototypeOf(e);r8.has(n)||(r8.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},FOe=re("$ZodError",_q),Iq=re("$ZodError",_q,void 0,{Parent:Error});function $Oe(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function zOe(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?$Oe(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function jOe(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>r({issues:c},[...s,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...s,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...s,...a.path]);else{const c=[...s,...a.path];if(c.length===0)n._errors.push(t(a));else{let u=n,f=0;for(;f<c.length;){const h=c[f],m=f===c.length-1;if(h==="_errors"){m&&u._errors.push(t(a)),f++;continue}Object.prototype.hasOwnProperty.call(u,h)||Object.defineProperty(u,h,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const g=u[h];m&&g._errors.push(t(a)),u=g,f++}}}};return r(e),n}function Pb(e,t){return{callee:t?.callee??e,Err:t?.Err}}const Nb=e=>{const t=(n,r,o,s)=>{const a=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise)throw new el;if(c.issues.length){const u=new(s?.Err??e)(c.issues.map(f=>ta(f,a,Jo())));throw vq(u,s?.callee??t),u}return c.value};return t},Tje=Nb(Iq),kb=e=>{const t=async(n,r,o,s)=>{const a=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},a);if(c instanceof Promise&&(c=await c),c.issues.length){const u=new(s?.Err??e)(c.issues.map(f=>ta(f,a,Jo())));throw vq(u,s?.callee??t),u}return c.value};return t},Oje=kb(Iq),u2=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new el;return s.issues.length?Aq(e,s.issues,o):{success:!0,data:s.value}};function Aq(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>ta(o,n,Jo()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const d2=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?Aq(e,s.issues,o):{success:!0,data:s.value}},BOe=Symbol.for("zod.compile.invalid"),HOe=Symbol.for("zod.compile.fallback"),qOe=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==BOe)return!0;if(r.definite===!0&&n===void 0)return!1}return VOe(e,t,n)});function VOe(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let s;if(o?(r[HOe]=!0,s=o({value:t,issues:[]},r)):s=e._zod.run({value:t,issues:[]},r),s instanceof Promise)throw new el;return s.issues.length===0}const WOe=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},GOe=e=>{const t=Nb(e),n=(r,o,s,a)=>{const c=s?{...s,direction:"backward"}:{direction:"backward"};return t(r,o,c,Pb(n,a))};return n},KOe=e=>{const t=Nb(e),n=(r,o,s,a)=>t(r,o,s,Pb(n,a));return n},ZOe=e=>{const t=kb(e),n=async(r,o,s,a)=>{const c=s?{...s,direction:"backward"}:{direction:"backward"};return await t(r,o,c,Pb(n,a))};return n},YOe=e=>{const t=kb(e),n=async(r,o,s,a)=>await t(r,o,s,Pb(n,a));return n},QOe=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return u2(e)(t,n,o)},XOe=e=>(t,n,r)=>u2(e)(t,n,r),JOe=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return d2(e)(t,n,o)},eMe=e=>async(t,n,r)=>d2(e)(t,n,r),tMe=/^[cC][0-9a-z]{6,}$/,nMe=/^[0-9a-z]+$/,rMe=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,oMe=/^[0-9a-vA-V]{20}$/,sMe=/^[A-Za-z0-9]{27}$/,iMe=/^[a-zA-Z0-9_-]{21}$/;function aMe(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const lMe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,cMe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,o8=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,uMe=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,dMe="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function fMe(){return new RegExp(dMe,"u")}const hMe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pMe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,mMe=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,gMe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vMe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,yMe=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,bMe=/^https?$/,SMe=/^\+[1-9]\d{6,14}$/,Rq="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function CMe(e){return new RegExp(`^${e}$`)}const wMe=CMe(Rq);function vA(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function EMe(e){return new RegExp(`^${vA(e)}$`)}function xMe(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${vA({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${vA({precision:e.precision})}`:n;return new RegExp(`^${Rq}T(?:${r})$`)}const _Me=/^[\s\S]{0,}$/,IMe=/^-?\d+$/,f2=/^-?\d+(?:\.\d+)?$/,AMe=/^(?:true|false)$/i,RMe=/^null$/i,TMe=/^[^A-Z]*$/,OMe=/^[^a-z]*$/,Ir=re("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),h2=e=>{const t=e.value;return!lOe(t)&&t.length!==void 0},Qv={number:"number",bigint:"bigint",object:"date"},Tq=re("$ZodCheckLessThan",(e,t)=>{Ir.init(e,t);const n=Qv[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Qv[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Oq=re("$ZodCheckGreaterThan",(e,t)=>{Ir.init(e,t);const n=Qv[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Qv[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),MMe=re("$ZodCheckMultipleOf",(e,t)=>{Ir.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):cOe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),PMe=re("$ZodCheckNumberFormat",(e,t)=>{Ir.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=Sq[t.format];e._zod.check=a=>{const c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),NMe=re("$ZodCheckMaxLength",(e,t)=>{var n;Ir.init(e,t),(n=e._zod.def).when??(n.when=h2),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>t.maximum?l2(o):s)<=t.maximum)return;const c=c2(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),kMe=re("$ZodCheckMinLength",(e,t)=>{var n;Ir.init(e,t),(n=e._zod.def).when??(n.when=h2),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=t.minimum&&s<t.minimum*2?l2(o):s)>=t.minimum)return;const c=c2(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),DMe=re("$ZodCheckLengthEquals",(e,t)=>{var n;Ir.init(e,t),(n=e._zod.def).when??(n.when=h2),e._zod.check=r=>{const o=r.value,s=o.length,a=typeof o=="string"&&s>=t.length&&s<=t.length*2?l2(o):s;if(a===t.length)return;const c=c2(o),u=a>t.length;r.issues.push({origin:c,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Db=re("$ZodCheckStringFormat",(e,t)=>{var n,r;Ir.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),LMe=re("$ZodCheckRegex",(e,t)=>{Db.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),UMe=re("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=TMe),Db.init(e,t)}),FMe=re("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=OMe),Db.init(e,t)}),$Me=re("$ZodCheckIncludes",(e,t)=>{Ir.init(e,t);const n=bu(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),zMe=re("$ZodCheckStartsWith",(e,t)=>{Ir.init(e,t);const n=new RegExp(`^${bu(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),jMe=re("$ZodCheckEndsWith",(e,t)=>{Ir.init(e,t);const n=new RegExp(`.*${bu(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),BMe=re("$ZodCheckOverwrite",(e,t)=>{Ir.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class HMe{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
158
|
+
`).filter(a=>a),o=Math.min(...r.map(a=>a.length-a.trimStart().length)),s=r.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
159
|
+
${n.join(`
|
|
160
|
+
`)}
|
|
161
|
+
};`)(...Object.values(this.closed))}}const qMe={major:4,minor:6,patch:7},Zt=re("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=qMe;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const s of o)for(const a of s._zod.onattach)a(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(c,u,f)=>{if(c.memo)return c;let h=Ls(c),m;for(const g of u){if(g._zod.def.when){if(xOe(c)||!g._zod.def.when(c))continue}else if(h)continue;const v=c.issues.length,C=g._zod.check(c);if(C instanceof Promise&&f?.async===!1)throw new el;if(m||C instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await C,c.issues.length!==v&&(gA(c.issues,v,e),h||(h=Ls(c,v)))});else{if(c.issues.length===v)continue;gA(c.issues,v,e),h||(h=Ls(c,v))}}return m?m.then(()=>c):c},a=(c,u,f)=>{if(Ls(c))return c.aborted=!0,c;const h=s(u,o,f);if(h instanceof Promise){if(f.async===!1)throw new el;return h.then(m=>e._zod.parse(m,f))}return e._zod.parse(h,f)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return h instanceof Promise?h.then(m=>a(m,c,u)):a(h,c,u)}const f=e._zod.parse(c,u);if(f instanceof Promise){if(u.async===!1)throw new el;return f.then(h=>s(h,o,u))}return s(f,o,u)}}},{get"~standard"(){return wq(this,"~standard",Pq(this))},set"~standard"(e){na(this,"~standard",e)}}),Mq=(e,t)=>e.issues.length?{issues:e.issues.map(n=>ta(n,t,Jo()))}:{value:e.value};async function VMe(e,t){const n={async:!0};return Mq(await e._zod.run({value:t,issues:[]},n),n)}function Pq(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Mq(r,n)}catch{}return VMe(e,t)},vendor:"zod",version:1}}const p2=re("$ZodString",(e,t)=>{Zt.init(e,t),e._zod.pattern=t.pattern??_Me,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),nn=re("$ZodStringFormat",(e,t)=>{Db.init(e,t),p2.init(e,t)}),WMe=re("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=cMe),nn.init(e,t)}),GMe=re("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=o8(r))}else t.pattern??(t.pattern=o8());nn.init(e,t)}),KMe=re("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=uMe),nn.init(e,t)}),Nq=1,Xv=2;function kq(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function ZMe(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?kq(e)||Xv:YMe(e,t)}function YMe(e,t){if(!t.normalize&&t.protocol?.source===bMe.source&&!/^https?:\/\//i.test(e))return Nq;try{if(typeof URL<"u"){const n=URL;if(typeof n.parse=="function")return n.parse(e)??Xv}return new URL(e)}catch{return Xv}}const QMe=/[\t\n\r]/g;function s8(e){return e.replace(QMe,"")}function XMe(e,t){return t.lastIndex=0,t.test(e.hostname)}function JMe(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const ePe=re("$ZodURL",(e,t)=>{nn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=ZMe(r,t);if(o===Nq){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(o===Xv){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}if(o===!0){n.value=s8(r);return}t.hostname&&!XMe(o,t.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!JMe(o,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?o.href:s8(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),tPe=re("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=fMe()),nn.init(e,t)}),nPe=re("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?iMe:aMe(t.length)),nn.init(e,t)}),rPe=re("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tMe),nn.init(e,t)}),oPe=re("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=nMe),nn.init(e,t)}),sPe=re("$ZodULID",(e,t)=>{t.pattern??(t.pattern=rMe),nn.init(e,t)}),iPe=re("$ZodXID",(e,t)=>{t.pattern??(t.pattern=oMe),nn.init(e,t)}),aPe=re("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=sMe),nn.init(e,t)}),lPe=re("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=xMe(t)),nn.init(e,t)}),cPe=re("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=wMe),nn.init(e,t)}),uPe=re("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=EMe(t)),nn.init(e,t)}),dPe=re("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=lMe),nn.init(e,t)}),fPe=re("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=hMe),nn.init(e,t)}),hPe=/^[0-9a-fA-F:.]+$/;function Dq(e){return hPe.test(e)?kq(`http://[${e}]`):!1}const pPe=re("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=pMe),nn.init(e,t),e._zod.check=n=>{Dq(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),mPe=re("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=mMe),nn.init(e,t)});function gPe(e){const t=e.split("/");if(t.length!==2)return!1;const[n,r]=t;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:Dq(n)}const vPe=re("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=gMe),nn.init(e,t),e._zod.check=n=>{gPe(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function Lq(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Uq=/^[0-9a-zA-Z+/]*={0,2}$/,yPe=re("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Uq),nn.init(e,t),e._zod.check=n=>{Lq(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),m2=/^[A-Za-z0-9_-]*$/;function bPe(e){if(!m2.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Lq(n)}const SPe=re("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=m2),nn.init(e,t),e._zod.check=n=>{bPe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),CPe=re("$ZodE164",(e,t)=>{t.pattern??(t.pattern=SMe),nn.init(e,t)});function wPe(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const EPe=re("$ZodJWT",(e,t)=>{nn.init(e,t),e._zod.check=n=>{wPe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Fq=re("$ZodNumber",(e,t)=>{Zt.init(e,t),e._zod.pattern=f2,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),xPe=re("$ZodNumberFormat",(e,t)=>{PMe.init(e,t),Fq.init(e,t)}),_Pe=re("$ZodBoolean",(e,t)=>{Zt.init(e,t),e._zod.pattern=AMe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),IPe=re("$ZodNull",(e,t)=>{Zt.init(e,t),e._zod.pattern=RMe,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),APe=re("$ZodUnknown",(e,t)=>{Zt.init(e,t),e._zod.parse=n=>n}),RPe=re("$ZodNever",(e,t)=>{Zt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function TPe(e,t){const n=e8(e._zod.def.checks);if(!n.length)return;const r=Math.min(...n.map(s=>s[0])),o=e._zod.parse;e._zod.parse=(s,a)=>{const c=t(s.value);if(c>r&&!a?.skipChecks&&a?.direction!=="backward"){for(const[u,f]of e8(e._zod.def.checks))if(c>u&&f._zod.def.when(s)){const h=s.issues.length;return f._zod.check(s),s.issues[h].continue=!1,gA(s.issues,h,e),s}}return o(s,a)}}const OPe=e=>Array.isArray(e)?e.length:-1;function i8(e,t,n){e.issues.length&&t.issues.push(...Wc(n,e.issues)),t.value[n]=e.value}const MPe=re("$ZodArray",(e,t)=>{Zt.init(e,t);const n=To.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=n?n.alloc(e,r,Array(s.length),o):Array(s.length);const a=[],c=o?.abortEarly;for(let u=0;u<s.length;u++){const f=s[u],h=t.element._zod.run({value:f,issues:[]},o);if(h instanceof Promise)a.push(h.then(m=>i8(m,r,u)));else if(i8(h,r,u),c&&h.issues.length!==0&&Ls(h))break}return a.length?Promise.all(a).then(()=>r):r},TPe(e,OPe)});function Jv(e,t,n,r,o,s){const a=n in r,c=s==="optional";if(!(!a&&c&&o==="optional")){if(e.issues.length){if(o!==void 0&&c&&!a)return;t.issues.push(...Wc(n,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(a||o==="defaulted"&&!c)&&(t.value[n]=void 0):t.value[n]=e.value}}const PPe=[];function $q(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:PPe,o=r.length?[...t,...r]:t;for(const a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);const s=gOe(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)}}function zq(e,t,n,r,o,s,a){const c=[],u=o.keySet,f=o.catchall._zod,h=f.def.type,m=f.optin,g=f.optout;let v=0;for(const C in t){if(a&&n.issues.length!==v){if(Ls(n,v))break;v=n.issues.length}if(u.has(C))continue;if(C==="__proto__"){h==="never"&&c.push(C);continue}if(h==="never"){c.push(C);continue}const b=f.run({value:t[C],issues:[]},r);b instanceof Promise?e.push(b.then(E=>Jv(E,n,C,t,m,g))):Jv(b,n,C,t,m,g)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const NPe=re("$ZodObject",(e,t)=>{Zt.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){const f=()=>{const h={...r};return Object.defineProperty(t,"shape",{value:h}),f.raw=h,h};f.raw=r,Object.defineProperty(t,"shape",{get:f})}const o=i2(()=>$q(t));ut(e,"propValues",f=>{const h=f.def.shape,m={};for(const g in h){const v=h[g]._zod;if(v.values){Object.prototype.hasOwnProperty.call(m,g)||aa(m,g,new Set);for(const C of v.values)m[g].add(C);v.optin!==void 0&&m[g].add(void 0)}}return m});const s=Yv,a=t.catchall;let c;const u=To.memoizer;u?.attach(e),e._zod.parse=(f,h)=>{c??(c=o.value);const m=f.value;if(!s(m))return f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f;f.value=u?u.alloc(e,f,{},h):{};const g=[],v=c.shape,C=h?.abortEarly;let b=f.issues.length;for(const E of c.allKeys){if(C&&f.issues.length!==b){if(Ls(f,b))break;b=f.issues.length}if(E==="__proto__")continue;const x=v[E],I=x._zod.optin,R=x._zod.optout,M=x._zod.run({value:m[E],issues:[]},h);M instanceof Promise?g.push(M.then(D=>Jv(D,f,E,m,I,R))):Jv(M,f,E,m,I,R)}return a?zq(g,m,f,h,o.value,e,C===!0):g.length?Promise.all(g).then(()=>f):f}}),kPe=re("$ZodObjectJIT",(e,t)=>{NPe.init(e,t);const n=e._zod.parse,r=i2(()=>$q(t)),o=To.memoizer,s=v=>{const C=r.value,b=C.symbolKeys,E=new HMe(["payload","ctx"],{shape:v,inst:e,memo:o,syms:b}),x=D=>`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`,I=(D,N)=>`
|
|
162
|
+
let ${D}_ab = false;
|
|
163
|
+
for (let i = 0; i < ${D}.issues.length; i++) {
|
|
164
|
+
const iss = ${D}.issues[i];
|
|
165
|
+
iss.path = iss.path ? [${N}, ...iss.path] : [${N}];
|
|
166
|
+
payload.issues.push(iss);
|
|
167
|
+
if (iss.continue !== true) ${D}_ab = true;
|
|
168
|
+
}
|
|
169
|
+
if (${D}_ab && ctx && ctx.abortEarly) {
|
|
170
|
+
payload.value = newResult;
|
|
171
|
+
return payload;
|
|
172
|
+
}`;E.write("const input = payload.value;");const R=Object.create(null);let M=0;for(const D of C.allKeys)R[D]=`key_${M++}`;E.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const D of C.allKeys){if(D==="__proto__")continue;const N=R[D],T=typeof D=="symbol"?`syms[${b.indexOf(D)}]`:fOe(D),L=`${T} in input`,$=v[D],G=$?._zod?.optin,z=G!==void 0,F=$?._zod?.optout==="optional";if(E.write(`const ${N} = ${x(T)};`),z&&F){const q=G==="optional"?`${N}_present`:`${N}.value !== undefined || ${N}_present`;E.write(`
|
|
173
|
+
const ${N}_present = ${L};
|
|
174
|
+
if (!${N}.issues.length || ${N}_present) {
|
|
175
|
+
if (${N}.issues.length) {${I(N,T)}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
if (${q}) {
|
|
179
|
+
newResult[${T}] = ${N}.value;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
`)}else z?(E.write(`
|
|
184
|
+
if (${N}.issues.length) {${I(N,T)}
|
|
185
|
+
}
|
|
186
|
+
`),G==="defaulted"?E.write(`newResult[${T}] = ${N}.value;`):E.write(`
|
|
187
|
+
if (${N}.value !== undefined || ${L}) {
|
|
188
|
+
newResult[${T}] = ${N}.value;
|
|
189
|
+
}
|
|
190
|
+
`)):E.write(`
|
|
191
|
+
const ${N}_present = ${L};
|
|
192
|
+
if (${N}.issues.length) {${I(N,T)}
|
|
193
|
+
}
|
|
194
|
+
if (!${N}_present && !${N}.issues.length) {
|
|
195
|
+
payload.issues.push({
|
|
196
|
+
code: "invalid_type",
|
|
197
|
+
expected: "nonoptional",
|
|
198
|
+
input: undefined,
|
|
199
|
+
path: [${T}]
|
|
200
|
+
});
|
|
201
|
+
if (ctx && ctx.abortEarly) {
|
|
202
|
+
payload.value = newResult;
|
|
203
|
+
return payload;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (${N}_present) {
|
|
208
|
+
newResult[${T}] = ${N}.value;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
`)}return E.write("payload.value = newResult;"),E.write("return payload;"),E.compile()};let a;const c=Yv,u=!To.jitless,h=u&&pOe.value,m=t.catchall;let g;e._zod.parse=(v,C)=>{g??(g=r.value);const b=v.value;return c(b)?u&&h&&C?.async===!1&&C.jitless!==!0?(a||(a=s(t.shape)),v=a(v,C),m?zq([],b,v,C,g,e,C?.abortEarly===!0):v):n(v,C):(v.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),v)}});function a8(e,t,n,r){for(const s of e)if(s.issues.length===0)return t.value=s.value,t;const o=e.filter(s=>!Ls(s));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(a=>ta(a,r,Jo())))}),t)}const DPe=re("$ZodUnion",(e,t)=>{Zt.init(e,t),ut(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),ut(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ut(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),ut(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>a2(s.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let s=!1;const a=[];for(const c of t.options){const u=c._zod.run({value:r.value,issues:[]},o);if(u instanceof Promise)a.push(u),s=!0;else{if(u.issues.length===0)return u;a.push(u)}}return s?Promise.all(a).then(c=>a8(c,r,e,o)):a8(a,r,e,o)}}),LPe=re("$ZodIntersection",(e,t)=>{Zt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||a instanceof Promise?Promise.all([s,a]).then(([u,f])=>l8(n,u,f)):l8(n,s,a)}});function yA(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(yu(e)&&yu(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const s of r){if(s==="__proto__")continue;const a=yA(e[s],t[s]);if(!a.valid)return{valid:!1,mergeErrorPath:[s,...a.mergeErrorPath]};o[s]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],s=t[r],a=yA(o,s);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function l8(e,t,n){const r=new Map;let o;const s=new Map,a=(f,h)=>{let m;if(f.code==="unrecognized_keys"&&!f.path?.length)o??(o=f),m=f.keys;else if(f.code==="invalid_key"&&f.origin==="record"&&f.path?.length===1){const g=String(f.path[0]);s.has(g)||s.set(g,f),m=[g]}else return!1;for(const g of m)r.has(g)||r.set(g,{}),r.get(g)[h]=!0;return!0};for(const f of t.issues)a(f,"l")||e.issues.push(f);for(const f of n.issues)a(f,"r")||e.issues.push(f);const c=[...r].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(c.length){const f=o?c.filter(h=>o.keys.includes(h)):[];f.length&&e.issues.push({...o,keys:f});for(const h of c)!f.includes(h)&&s.has(h)&&e.issues.push(s.get(h))}const u=yA(t.value,n.value);if(!u.valid){if(Ls(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}const UPe=re("$ZodRecord",(e,t)=>{Zt.init(e,t);const n=To.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!yu(s))return r.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),r;const a=[],c=t.keyType._zod.values;if(c&&!t.partial){r.value=n?n.alloc(e,r,{},o):{};const u=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){if(u.add(typeof h=="number"?h.toString():h),h==="__proto__")continue;const m=t.keyType._zod.run({value:h,issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(C=>ta(C,o,Jo())),input:h,path:[h],inst:e});continue}const g=m.value;if(g==="__proto__")continue;const v=t.valueType._zod.run({value:s[h],issues:[]},o);v instanceof Promise?a.push(v.then(C=>{C.issues.length&&r.issues.push(...Wc(h,C.issues)),r.value[g]=C.value})):(v.issues.length&&r.issues.push(...Wc(h,v.issues)),r.value[g]=v.value)}let f;for(const h in s)if(!u.has(h))if(t.mode==="loose"){if(h==="__proto__")continue;r.value[h]=s[h]}else f=f??[],f.push(h);f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:f,continue:!0})}else{r.value=n?n.alloc(e,r,{},o):{};let u;for(const f of Reflect.ownKeys(s)){if(f==="__proto__"||!Object.prototype.propertyIsEnumerable.call(s,f))continue;let h=t.keyType._zod.run({value:f,issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&f2.test(f)&&h.issues.length){const C=t.keyType._zod.run({value:Number(f),issues:[]},o);if(C instanceof Promise)throw new Error("Async schemas not supported in object keys currently");C.issues.length===0&&(h=C)}if(h.issues.length){t.mode==="loose"?r.value[f]=s[f]:c?(u=u??[],u.push(f)):r.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(C=>ta(C,o,Jo())),input:f,path:[f],inst:e});continue}const g=h.value;if(g==="__proto__")continue;const v=t.valueType._zod.run({value:s[f],issues:[]},o);v instanceof Promise?a.push(v.then(C=>{C.issues.length&&r.issues.push(...Wc(f,C.issues)),r.value[g]=C.value})):(v.issues.length&&r.issues.push(...Wc(f,v.issues)),r.value[g]=v.value)}u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:u,continue:!0})}return a.length?Promise.all(a).then(()=>r):r}}),FPe=re("$ZodEnum",(e,t)=>{Zt.init(e,t);const n=pA(t.entries),r=new Set(n);e._zod.values=r,ut(e,"pattern",o=>{const s=pA(o.def.entries).filter(a=>mOe.has(typeof a));return new RegExp(s.length?`^(${s.map(a=>bu(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,s)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),$Pe=re("$ZodLiteral",(e,t)=>{Zt.init(e,t);const n=new Set(t.values);e._zod.values=n,ut(e,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(s=>typeof s=="string"?bu(s):s?bu(s.toString()):String(s)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,o)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),r}}),zPe=re("$ZodTransform",(e,t)=>{Zt.init(e,t),e._zod.optin="optional",To.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new xq(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new el;return n.value=o,n}});function c8(e,t){return e.value=t.issues.length?void 0:t.value,e}const jq=re("$ZodOptional",(e,t)=>{Zt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",ut(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),ut(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${a2(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(s=>c8(n,s)):c8(n,o)}return t.innerType._zod.run(n,r)}}),jPe=re("$ZodExactOptional",(e,t)=>{jq.init(e,t),ut(e,"values",n=>n.def.innerType._zod.values),ut(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),BPe=re("$ZodNullable",(e,t)=>{Zt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin),ut(e,"optout",n=>n.def.innerType._zod.optout),ut(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${a2(r.source)}|null)$`):void 0}),ut(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),HPe=re("$ZodDefault",(e,t)=>{Zt.init(e,t),e._zod.optin="defaulted",ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>u8(s,t)):u8(o,t)}});function u8(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const qPe=re("$ZodPrefault",(e,t)=>{Zt.init(e,t),e._zod.optin="defaulted",ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),VPe=re("$ZodNonOptional",(e,t)=>{Zt.init(e,t),ut(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>d8(s,e)):d8(o,e)}});function d8(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function f8(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>ta(o,r,Jo()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const WPe=re("$ZodCatch",(e,t)=>{Zt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ut(e,"optout",n=>n.def.innerType._zod.optout),ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(s=>f8(n,s,t,r)):f8(n,o,t,r)}}),GPe=re("$ZodPipe",(e,t)=>{Zt.init(e,t),ut(e,"values",n=>n.def.in._zod.values),ut(e,"optin",n=>n.def.in._zod.optin),ut(e,"optout",n=>n.def.out._zod.optout),ut(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=t.out._zod.run(n,r);return s instanceof Promise?s.then(a=>vg(a,t.in,r)):vg(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>vg(s,t.out,r)):vg(o,t.out,r)}});function vg(e,t,n){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const KPe=re("$ZodReadonly",(e,t)=>{Zt.init(e,t),ut(e,"propValues",n=>n.def.innerType._zod.propValues),ut(e,"values",n=>n.def.innerType._zod.values),ut(e,"optin",n=>n.def.innerType?._zod?.optin),ut(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(h8):h8(o)}});function h8(e){return e.memo||(e.value=Object.freeze(e.value)),e}const ZPe=re("$ZodLazy",(e,t)=>{Zt.init(e,t),uOe(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),ut(e,"pattern",n=>n.innerType?._zod?.pattern),ut(e,"propValues",n=>n.innerType?._zod?.propValues),ut(e,"optin",n=>n.innerType?._zod?.optin??void 0),ut(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),YPe=re("$ZodCustom",(e,t)=>{Ir.init(e,t),Zt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(s=>p8(s,n,r,e));p8(o,n,r,e)}});function p8(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(ph(o))}}class QPe extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const bA="~memo",m8=[];function Bq(e){return e!==null&&typeof e=="object"}function c_(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const Hq=new WeakMap,Cf=0,ev=1,Lf=2;function tv(e,t,n){const r=Hq.get(e);if(r!==void 0)return r?Lf:Cf;if(t.has(e))return Lf;t.add(e);let o=Cf;const s=h=>{if(o!==Lf&&h?._zod){const m=tv(h,t);m>o&&(o=m)}},a=(h,m)=>{let g=Cf;for(const v of Reflect.ownKeys(h)){const C=Object.getOwnPropertyDescriptor(h,v);if(!C.enumerable)continue;const b=C.get?ev:C.value?._zod?tv(C.value,t):Cf;b>g&&(g=b)}return g},c=h=>{h>o&&(o=h)},u=e._zod.def;switch(u.type){case"object":{const h=pq(u);c(h?a(h):ev),s(u.catchall);break}case"array":s(u.element);break;case"tuple":for(const h of u.items)s(h);s(u.rest);break;case"record":case"map":s(u.keyType),s(u.valueType);break;case"set":s(u.valueType);break;case"union":for(const h of u.options)s(h);break;case"intersection":s(u.left),s(u.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(u.innerType);break;case"pipe":s(u.in),s(u.out);break;case"function":s(u.input),s(u.output);break;case"lazy":{const h=u._cachedInner??void 0;c(h?tv(h,t):ev);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const h in u){const m=Object.getOwnPropertyDescriptor(u,h);if(!m||m.get)continue;const g=m.value;if(!(!g||typeof g!="object")){if(g._zod)s(g);else if(Array.isArray(g))for(const v of g)s(v)}}}return t.delete(e),XPe(e,o)}function XPe(e,t){return t!==ev&&Hq.set(e,t===Lf),t}function JPe(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}let yg;const bg=[],eNe={alloc(e,t,n){const r=yg;if(!r)return n;yg=void 0;const o={value:n,issues:null};return r.set(t.value,o),bg.push(o),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,r=(o,s)=>{if(s.direction!=="backward"&&nNe(s,o.value))throw new QPe;return n(o,s)};e._zod.parse=r,e._zod.run===n&&(e._zod.run=r)})},attach(e){var t;let n,r=!1,o,s;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const a=e._zod.parse,c=(u,f)=>{if(n===void 0){const x=tv(e,new Set);if(x===Cf)return e._zod.parse=a,e._zod.run===c&&(e._zod.run=a),a(u,f);x===Lf||r?n=!0:r=!0}const h=u.value;if(!Bq(h))return a(u,f);let m=f[bA];m||(m={buckets:new WeakMap,backEdges:void 0},f[bA]=m);let g;o===f?g=s:(g=JPe(m,e),o=f,s=g);const v=g.get(h);if(v)return u.value=v.value,v.issues?v.issues.length&&u.issues.push(...c_(v.issues)):(u.memo=!0,m.backEdges??(m.backEdges=new WeakSet),m.backEdges.add(v.value)),u;yg=g;const C=bg.length,b=a(u,f);yg=void 0;const E=bg.length>C?bg.pop():void 0;return b instanceof Promise?b.then(x=>(E&&(E.issues=x.issues.length?c_(x.issues):m8),x)):(E&&(E.issues=b.issues.length?c_(b.issues):m8),b)};e._zod.parse=c,e._zod.run===a&&(e._zod.run=c)})}};function tNe(){return eNe}function nNe(e,t){const n=e[bA]?.backEdges;return n!==void 0&&Bq(t)&&n.has(t)}const rNe=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(s){return e[s]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(s,a){return s==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):r[s]??s}return s=>{switch(s.code){case"invalid_type":{const a=o(s.expected),c=IOe(s.input),u=o(c,s.input);return`Invalid input: expected ${a}, received ${u}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${bq(s.values[0])}`:`Invalid option: expected one of ${Q6(s.values,"|")}`;case"too_big":{const a=s.exact?"exactly ":s.inclusive?"<=":"<",c=t(s.origin);return c?`Too big: expected ${s.origin??"value"} to have ${a}${s.maximum.toString()} ${c.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${a}${s.maximum.toString()}`}case"too_small":{const a=s.exact?"exactly ":s.inclusive?">=":">",c=t(s.origin);return c?`Too small: expected ${s.origin} to have ${a}${s.minimum.toString()} ${c.unit}`:`Too small: expected ${s.origin} to be ${a}${s.minimum.toString()}`}case"invalid_format":{const a=s;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${n[a.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${Q6(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Invalid discriminator value. Expected ${s.options.map(c=>`'${c}'`).join(" | ")}`:s.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function oNe(){return{localeError:rNe()}}var g8;class sNe{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function iNe(){return new sNe}(g8=globalThis).__zod_globalRegistry??(g8.__zod_globalRegistry=iNe());const wf=globalThis.__zod_globalRegistry;function g2(e){return e.checks&&(e.checks=[...e.checks]),e}function aNe(e,t){return new e(g2({type:"string",...Ne(t)}))}function qq(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ne(t)})}function lNe(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ne(t)})}function cNe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ne(t)})}function uNe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ne(t)})}function dNe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ne(t)})}function fNe(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ne(t)})}function hNe(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ne(t)})}function pNe(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ne(t)})}function mNe(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ne(t)})}function gNe(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ne(t)})}function vNe(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ne(t)})}function yNe(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ne(t)})}function bNe(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ne(t)})}function SNe(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ne(t)})}function CNe(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ne(t)})}function wNe(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ne(t)})}function ENe(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ne(t)})}function xNe(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ne(t)})}function _Ne(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ne(t)})}function INe(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ne(t)})}function ANe(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ne(t)})}function RNe(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ne(t)})}function Vq(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ne(t)})}function Wq(e,t){return new e({type:"string",format:"date",check:"string_format",...Ne(t)})}function TNe(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ne(t)})}function ONe(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ne(t)})}function MNe(e,t){return new e(g2({type:"number",checks:[],...Ne(t)}))}function Mje(e,t){return new e(g2({type:"number",coerce:!0,checks:[],...Ne(t)}))}function PNe(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ne(t)})}function NNe(e,t){return new e({type:"boolean",...Ne(t)})}function kNe(e,t){return new e({type:"null",...Ne(t)})}function DNe(e){return new e({type:"unknown"})}function LNe(e,t){return new e({type:"never",...Ne(t)})}function v8(e,t){return new Tq({check:"less_than",...Ne(t),value:e,inclusive:!1})}function u_(e,t){return new Tq({check:"less_than",...Ne(t),value:e,inclusive:!0})}function y8(e,t){return new Oq({check:"greater_than",...Ne(t),value:e,inclusive:!1})}function d_(e,t){return new Oq({check:"greater_than",...Ne(t),value:e,inclusive:!0})}function b8(e,t){return new MMe({check:"multiple_of",...Ne(t),value:e})}function Gq(e,t){return new NMe({check:"max_length",...Ne(t),maximum:e})}function ey(e,t){return new kMe({check:"min_length",...Ne(t),minimum:e})}function Kq(e,t){return new DMe({check:"length_equals",...Ne(t),length:e})}function UNe(e,t){return new LMe({check:"string_format",format:"regex",...Ne(t),pattern:e})}function FNe(e){return new UMe({check:"string_format",format:"lowercase",...Ne(e)})}function $Ne(e){return new FMe({check:"string_format",format:"uppercase",...Ne(e)})}function zNe(e,t){return new $Me({check:"string_format",format:"includes",...Ne(t),includes:e})}function jNe(e,t){return new zMe({check:"string_format",format:"starts_with",...Ne(t),prefix:e})}function BNe(e,t){return new jMe({check:"string_format",format:"ends_with",...Ne(t),suffix:e})}function zu(e){return new BMe({check:"overwrite",tx:e})}function HNe(e){return zu(t=>t.normalize(e))}function qNe(){return zu(e=>e.trim())}function VNe(){return zu(e=>e.toLowerCase())}function WNe(){return zu(e=>e.toUpperCase())}function GNe(){return zu(e=>hOe(e))}function KNe(e,t,n){return new e({type:"array",element:t,...Ne(n)})}function ZNe(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ne(n)})}function YNe(e,t){const n=QNe(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(ph(o,r.value,n._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),r.issues.push(ph(s))}},e(r.value,r)),t);return n}function QNe(e,t){const n=new Ir({check:"custom",...Ne(t)});return n._zod.check=e,n}function Uf(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&aa(e,r,n[r]);return e}function Zq(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??wf,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function ra(e,t,n,r,o){const s=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:o}):t.unrepresentable;if(s==="any")return!1;if(s===void 0||s==="throw")throw new Error(o);return Object.assign(n,s),!0}function pn(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{const h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,h);else{const g=a.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,g,h)}const m=e._zod.parent;m&&(a.ref||(a.ref=m),pn(m,t,h),t.seen.get(m).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Uf(a.schema,u),t.io==="input"&&nr(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function S8(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Yq(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const a of e.seen.entries()){const c=e.metadataRegistry.get(a[0])?.id;if(c){const u=r.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,a[0])}}const o=a=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=e.external.registry.get(a[0])?.id,g=e.external.uri??(C=>C);if(m)return{ref:g(m)};const v=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${S8(v)}`}}const u="#",f=`${u}/${c}/`;if(a[1]===n&&!a[1].schema.id)return{ref:u};const h=a[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+S8(h)}},s=a=>{if(a[1].schema.$ref)return;const c=a[1],{ref:u,defId:f}=o(a);c.def={...c.schema},f&&(c.defId=f);const h=c.schema;for(const m in h)delete h[m];h.$ref=u};if(e.cycles==="throw")for(const a of e.seen.entries()){const c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
212
|
+
|
|
213
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const c=a[1];if(t===a[0]){s(a);continue}if(e.external){const f=e.external.registry.get(a[0])?.id;if(t!==a[0]&&f){s(a);continue}}if(e.metadataRegistry.get(a[0])?.id){s(a);continue}if(c.cycle){s(a);continue}c.count>1&&e.reused==="ref"&&s(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Qq(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const r of t){if(!r||typeof r!="object")return;Qq(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const s=r.type;for(const a of Array.isArray(s)?s:[s]){if(typeof a!="string")return;n.includes(a)||n.push(a)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const Xq=new Set(["type","properties","required","additionalProperties"]),C8=["oneOf","anyOf"];function w8(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function SA(e){const t=[];for(const s of e){if(typeof s!="object"||s.type!=="object")return null;for(const a in s)if(!Xq.has(a))return null;t.push(s)}const n={},r=new Set;for(const s of t){for(const a in s.properties){if(Object.prototype.hasOwnProperty.call(n,a))continue;const c=[];for(const f of t){const h=f.properties?.[a]??w8(f);h!=null&&(c.some(m=>JSON.stringify(m)===JSON.stringify(h))||c.push(h))}const u=c.length===1?c[0]:SA(c)??{allOf:c};aa(n,a,u)}for(const a of s.required??[])r.add(a)}const o={type:"object",properties:n};if(r.size&&(o.required=[...r]),t.every(s=>s.additionalProperties===!1))o.additionalProperties=!1;else{const s=[];for(const a of t){const c=w8(a);c&&!s.some(u=>JSON.stringify(u)===JSON.stringify(c))&&s.push(c)}s.length===1?o.additionalProperties=s[0]:s.length>1&&(o.additionalProperties={allOf:s})}return o}function XNe(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of Xq)if(o in e)return;const n=t.filter(o=>C8.some(s=>Array.isArray(o[s])));let r=null;if(!n.length)r=SA(t);else{const o=n[0],s=C8.find(u=>Array.isArray(o[u]));if(Object.keys(o).length!==1)return;const a=t.filter(u=>u!==o),c=o[s].map(u=>SA([...a,u]));if(c.some(u=>!u))return;r={[s]:c}}r&&(delete e.allOf,Uf(e,r))}function Jq(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const u=e.seen.get(c);if(u.ref===null)return;const f=u.def??u.schema,h={...f},m=u.ref;if(u.ref=null,m){r(m);const v=e.seen.get(m),C=v.schema;if(C.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(C)):Uf(f,C),Uf(f,h),c._zod.parent===m)for(const E in f)E==="$ref"||E==="allOf"||E in h||delete f[E];if(C.$ref&&v.def)for(const E in f)E==="$ref"||E==="allOf"||E in v.def&&JSON.stringify(f[E])===JSON.stringify(v.def[E])&&delete f[E]}const g=c._zod.parent;if(g&&g!==m){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(f.$ref=v.schema.$ref,v.def))for(const C in f)C==="$ref"||C==="allOf"||C in v.def&&JSON.stringify(f[C])===JSON.stringify(v.def[C])&&delete f[C]}e.override({zodSchema:c,jsonSchema:f,path:u.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const c of[...e.seen.entries()].reverse())r(c[0]);if(e.target!=="openapi-3.0")for(const c of e.seen.entries())Qq(c[1].def??c[1].schema);for(const c of e.deferred)c();if(e.intersections.length){const c=new Map;for(const u of e.seen.values())for(const f of[u.schema,u.def]){const h=f?.allOf;if(!Array.isArray(h))continue;const m=c.get(h);m?m.push(f):c.set(h,[f])}for(const u of e.intersections)for(const f of c.get(u)??[])XNe(f)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}Uf(o,n.defId?n.schema:n.def??n.schema);const s=e.metadataRegistry.get(t)?.id;s!==void 0&&o.id===s&&delete o.id;const a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,aa(a,u.defId,u.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{const c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:ty(t,"input",e.processors),output:ty(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function nr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return nr(r.element,n);if(r.type==="set")return nr(r.valueType,n);if(r.type==="lazy")return nr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return nr(r.innerType,n);if(r.type==="intersection")return nr(r.left,n)||nr(r.right,n);if(r.type==="record"||r.type==="map")return nr(r.keyType,n)||nr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:nr(r.in,n)||nr(r.out,n);if(r.type==="object"){for(const o in r.shape)if(nr(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(nr(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(nr(o,n))return!0;return!!(r.rest&&nr(r.rest,n))}return!1}const JNe=(e,t={})=>n=>{const r=Zq({...n,processors:t});return pn(e,r),Yq(r,e),Jq(r,e)},ty=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},a=Zq({...o??{},target:s,io:t,processors:n});return pn(e,a),Yq(a,e),Jq(a,e)},Su=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Cu=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},E8=(e,t)=>{Su(e,"minimum",t),Cu(e,"maximum",t)},eV=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},tV=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},nV=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},rV=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},x8=(e,t)=>Su(e,"minimum",t.minimum),_8=(e,t)=>Cu(e,"maximum",t.maximum),I8=e=>(t,n)=>{rV(t,n.format);const[r,o]=e[n.format];Su(t,"minimum",r),Cu(t,"maximum",o)},eke={greater_than:(e,t)=>Su(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Cu(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>eV(e,t.value),number_format:I8(Sq),bigint_format:I8(vOe),min_length:x8,max_length:_8,length_equals:(e,t)=>E8(e,t.length),min_size:x8,max_size:_8,size_equals:(e,t)=>E8(e,t.size),string_format:(e,t)=>{rV(e,t.format),t.pattern&&tV(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>nV(e,t.mime)};function _o(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const s of r)eke[s._zod.def.check]?.(t,s._zod.def);const o=e._zod.bag;o.minimum!==void 0&&Su(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&Su(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Cu(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Cu(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&eV(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&nV(t,o.mime);for(const s of o.patterns??[])tV(t,s);return t}const tke={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nke=new Map([[Uq,vMe],[m2,yMe]]),oV=e=>nke.get(e)??e,rke=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:a,format:c,patterns:u,contentEncoding:f,laxFormat:h}=_o(e);if(typeof s=="number"&&(o.minLength=s),typeof a=="number"&&(o.maxLength=a),c&&(o.format=tke[c]??c,o.format===""&&delete o.format,(c==="time"||h)&&delete o.format),f&&(o.contentEncoding=f),u&&u.size>0){const m=[...u].map(oV);m.length===1?o.pattern=m[0].source:m.length>1&&(o.allOf=[...m.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},oke=(e,t,n,r)=>{const o=n,{minimum:s,maximum:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:f,isInt:h}=_o(e);o.type=h?"integer":"number";const m=typeof f=="number"&&f>=(s??Number.NEGATIVE_INFINITY),g=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";if(m?v?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof s=="number"&&(o.minimum=s),g?v?(o.maximum=u,o.exclusiveMaximum=!0):o.exclusiveMaximum=u:typeof a=="number"&&(o.maximum=a),c){const C=new Set;for(const x of c)Number.isFinite(x)&&x!==0?C.add(Math.abs(x)):ra(e,t,o,r,`A multipleOf divisor of ${x} cannot be represented in JSON Schema`);const[b,...E]=C;b!==void 0&&(o.multipleOf=b),E.length&&(o.allOf=[...o.allOf??[],...E.map(x=>({multipleOf:x}))])}},ske=(e,t,n,r)=>{n.type="boolean"},ike=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},ake=(e,t,n,r)=>{n.not={}},lke=(e,t,n,r)=>{},cke=(e,t,n,r)=>{const o=e._zod.def,s=pA(o.entries);if(s.length===0){n.not={};return}s.every(a=>typeof a=="number")&&(n.type="number"),s.every(a=>typeof a=="string")&&(n.type="string"),n.enum=s},uke=(e,t,n,r)=>{const o=e._zod.def;if(o.values.length===0){n.not={};return}const s=[];for(const a of o.values)if(a===void 0){if(ra(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(ra(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;s.push(Number(a))}else s.push(a);if(s.length!==0)if(s.length===1){const a=s[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else s.every(a=>typeof a=="number")&&(n.type="number"),s.every(a=>typeof a=="string")&&(n.type="string"),s.every(a=>typeof a=="boolean")&&(n.type="boolean"),s.every(a=>a===null)&&(n.type="null"),n.enum=s},dke=(e,t,n,r)=>{ra(e,t,n,r,"Custom types cannot be represented in JSON Schema")},fke=(e,t,n,r)=>{ra(e,t,n,r,"Transforms cannot be represented in JSON Schema")},hke=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:a,maximum:c}=_o(e);typeof a=="number"&&(o.minItems=a),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=pn(s.element,t,{...r,path:[...r.path,"items"]})};function ny(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?ny(t.out):t.type==="catch"?ny(t.innerType):e._zod.optin}const pke=(e,t,n,r)=>{const o=n,s=e._zod.def,a=s.shape;if(Object.getOwnPropertySymbols(a).length&&ra(e,t,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const f in a)aa(o.properties,f,pn(a[f],t,{...r,path:[...r.path,"properties",f]}));const u=[];for(const f of Object.keys(a)){const h=s.shape[f];(t.io==="input"?ny(h)===void 0:h._zod.optout===void 0)&&u.push(f)}u.length>0&&(o.required=u),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=pn(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},mke=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,a=o.options.map((c,u)=>pn(c,t,{...r,path:[...r.path,s?"oneOf":"anyOf",u]}));s?n.oneOf=a:n.anyOf=a},gke=(e,t,n,r)=>{const o=e._zod.def,s=pn(o.left,t,{...r,path:[...r.path,"allOf",0]}),a=pn(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,u=[...c(s)?s.allOf:[s],...c(a)?a.allOf:[a]];n.allOf=u,t.intersections.push(u)};function CA(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);const C=e.get(t)?.def;if(!C)return t;const b=CA(e,C,n);return b===C?t:b}for(const C of["anyOf","oneOf"]){const b=t[C];if(!Array.isArray(b))continue;const E=b.map(x=>CA(e,x,n));E.some((x,I)=>x!==b[I])&&(t={...t,[C]:E})}const r=Array.isArray(t.type)?t.type:[t.type],o=!r.includes("string")&&r.some(C=>C==="number"||C==="integer"),s=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!s?.some(C=>typeof C=="number"))return t;const{minimum:a,maximum:c,exclusiveMinimum:u,exclusiveMaximum:f,multipleOf:h,format:m,id:g,...v}=t;return v.enum?v.enum=v.enum.map(C=>typeof C=="number"?String(C):C):typeof v.const=="number"&&(v.const=String(v.const)),o&&(v.type="string",s||(v.pattern=(r.includes("number")?f2:IMe).source)),v}const wA=new WeakMap;function vke(e){const t=new Map;for(const r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);const n=new Map;for(const r of wA.get(e)??[]){const o=e.seen.get(r),s=(o?.def??o?.schema)?.propertyNames;if(!s||s===!0||n.has(s))continue;const a=CA(t,s,new Set);a!==s&&n.set(s,a)}if(n.size)for(const r of e.seen.values())for(const o of[r.schema,r.def]){const s=o&&n.get(o.propertyNames);s&&(o.propertyNames=s)}}const yke=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const a=s.keyType,c=_o(a).patterns;if(s.mode==="loose"&&c&&c.size>0){const h=pn(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const m of c)aa(o.patternProperties,oV(m).source,h)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=pn(s.keyType,t,{...r,path:[...r.path,"propertyNames"]});let h=wA.get(t);h||(h=[],wA.set(t,h),t.deferred.push(()=>vke(t))),h.push(e)}o.additionalProperties=pn(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}const u=a._zod.values,f=t.io==="input"&&ny(s.valueType)!==void 0;if(u&&!s.partial&&!f){const h=[...u].filter(m=>typeof m=="string"||typeof m=="number");h.length>0&&(o.required=h.map(String))}},bke=(e,t,n,r)=>{const o=e._zod.def,s=pn(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},Ske=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},v2=Symbol();function sV(e,t,n,r,o){let s=!1;const a=JSON.stringify(e,(c,u)=>typeof u!="bigint"?u:(s=!0,null));return s?(ra(t,n,r,o,"BigInt defaults cannot be represented in JSON Schema"),v2):JSON.parse(a)}const Cke=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;const a=sV(o.defaultValue,e,t,n,r);a!==v2&&(n.default=a)},wke=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);if(s.ref=o.innerType,t.io!=="input")return;const a=sV(o.defaultValue,e,t,n,r);a!==v2&&(n._prefault=a)},Eke=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{ra(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=a},xke=(e,t,n,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?s?o.out:o.in:o.out;pn(a,t,r);const c=t.seen.get(e);c.ref=a},_ke=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},iV=(e,t,n,r)=>{const o=e._zod.def;pn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Ike=(e,t,n,r)=>{const o=e._zod.innerType;pn(o,t,r);const s=t.seen.get(e);s.ref=o},A8=new WeakSet([Object.prototype,Error.prototype]);function Sg(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const Ake=(e,t)=>{FOe.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);A8.has(n)||(A8.add(n),Sg(n,"format",r=>o=>jOe(r,o)),Sg(n,"flatten",r=>o=>zOe(r,o)),Sg(n,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,mA,2)}),Sg(n,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,mA,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},fo=re("ZodError",Ake,void 0,{Parent:Error}),Rke=Nb(fo),Tke=kb(fo),Oke=u2(fo),Mke=d2(fo),Pke=GOe(fo),Nke=KOe(fo),kke=ZOe(fo),Dke=YOe(fo),Lke=QOe(fo),Uke=XOe(fo),Fke=JOe(fo),$ke=eMe(fo);function zke(){To.localeError||Jo(oNe())}function Lb(){To.memoizer||Jo({memoizer:tNe()})}const Yt=re("ZodType",(e,t)=>(zke(),Zt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Fr(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return la(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(D3e(e,t))},superRefine(e,t){return this.check(L3e(e,t))},overwrite(e){return this.check(zu(e))},optional(){return O8(this)},exactOptional(){return C3e(this)},nullable(){return M8(this)},nullish(){return O8(M8(this))},nonoptional(e){return A3e(this,e)},array(){return ue(this)},or(e){return Ge([this,e])},and(e){return v3e(this,e)},transform(e){return P8(this,S3e(e))},default(e){return x3e(this,e)},prefault(e){return I3e(this,e)},catch(e){return T3e(this,e)},pipe(e){return P8(this,e)},readonly(){return P3e(this)},describe(e){const t=this.clone();return wf.add(t,{description:e}),t},meta(...e){if(e.length===0)return wf.get(this);const t=this.clone();return wf.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return wq(this,"~standard",{...Pq(this),jsonSchema:{input:ty(this,"input"),output:ty(this,"output")}})},set"~standard"(e){na(this,"~standard",e)},parse:function e(t,n){return Rke(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Tke(this,t,n,{callee:e})},safeParse(e,t){return Oke(this,e,t)},async safeParseAsync(e,t){return Mke(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){na(this,"spa",e)},validate(e,t){return qOe(this,e,t)},validateAsync(e,t){return WOe(this,e,t)},encode:function e(t,n){return Pke(this,t,n,{callee:e})},decode:function e(t,n){return Nke(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await kke(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Dke(this,t,n,{callee:e})},safeEncode(e,t){return Lke(this,e,t)},safeDecode(e,t){return Uke(this,e,t)},async safeEncodeAsync(e,t){return Fke(this,e,t)},async safeDecodeAsync(e,t){return $ke(this,e,t)},toJSONSchema(e){return JNe(this,{})(e)},get description(){return wf.get(this)?.description},get _def(){return this._zod.def}}),aV=re("_ZodString",(e,t)=>{p2.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rke(e,n,r)},Eq({format:e=>_o(e).format??null,minLength:e=>_o(e).minimum??null,maxLength:e=>_o(e).maximum??null},{regex(...e){return this.check(UNe(...e))},includes(...e){return this.check(zNe(...e))},startsWith(...e){return this.check(jNe(...e))},endsWith(...e){return this.check(BNe(...e))},min(...e){return this.check(ey(...e))},max(...e){return this.check(Gq(...e))},length(...e){return this.check(Kq(...e))},nonempty(...e){return this.check(ey(1,...e))},lowercase(e){return this.check(FNe(e))},uppercase(e){return this.check($Ne(e))},trim(){return this.check(qNe())},normalize(...e){return this.check(HNe(...e))},toLowerCase(){return this.check(VNe())},toUpperCase(){return this.check(WNe())},slugify(){return this.check(GNe())}})),jke=re("ZodString",(e,t)=>{p2.init(e,t),aV.init(e,t)},{email(e){return this.check(qq(uV,e))},url(e){return this.check(hNe(Vke,e))},jwt(e){return this.check(RNe(i3e,e))},emoji(e){return this.check(pNe(Wke,e))},guid(e){return this.check(lNe(qke,e))},uuid(e){return this.check(cNe(Cg,e))},uuidv4(e){return this.check(uNe(Cg,e))},uuidv6(e){return this.check(dNe(Cg,e))},uuidv7(e){return this.check(fNe(Cg,e))},nanoid(e){return this.check(mNe(Gke,e))},cuid(e){return this.check(gNe(Kke,e))},cuid2(e){return this.check(vNe(Zke,e))},ulid(e){return this.check(yNe(Yke,e))},base64(e){return this.check(_Ne(r3e,e))},base64url(e){return this.check(INe(o3e,e))},xid(e){return this.check(bNe(Qke,e))},ksuid(e){return this.check(SNe(Xke,e))},ipv4(e){return this.check(CNe(Jke,e))},ipv6(e){return this.check(wNe(e3e,e))},cidrv4(e){return this.check(ENe(t3e,e))},cidrv6(e){return this.check(xNe(n3e,e))},e164(e){return this.check(ANe(s3e,e))},datetime(e){return this.check(Vq(lV,e))},date(e){return this.check(Wq(cV,e))},time(e){return this.check(TNe(Bke,e))},duration(e){return this.check(ONe(Hke,e))}});function w(e){return aNe(jke,e)}const ln=re("ZodStringFormat",(e,t)=>{nn.init(e,t),aV.init(e,t)}),lV=re("ZodISODateTime",(e,t)=>{lPe.init(e,t),ln.init(e,t)}),cV=re("ZodISODate",(e,t)=>{cPe.init(e,t),ln.init(e,t)}),Bke=re("ZodISOTime",(e,t)=>{uPe.init(e,t),ln.init(e,t)}),Hke=re("ZodISODuration",(e,t)=>{dPe.init(e,t),ln.init(e,t)}),uV=re("ZodEmail",(e,t)=>{KMe.init(e,t),ln.init(e,t)});function Pje(e){return qq(uV,e)}const qke=re("ZodGUID",(e,t)=>{WMe.init(e,t),ln.init(e,t)}),Cg=re("ZodUUID",(e,t)=>{GMe.init(e,t),ln.init(e,t)}),Vke=re("ZodURL",(e,t)=>{ePe.init(e,t),ln.init(e,t)}),Wke=re("ZodEmoji",(e,t)=>{tPe.init(e,t),ln.init(e,t)}),Gke=re("ZodNanoID",(e,t)=>{nPe.init(e,t),ln.init(e,t)}),Kke=re("ZodCUID",(e,t)=>{rPe.init(e,t),ln.init(e,t)}),Zke=re("ZodCUID2",(e,t)=>{oPe.init(e,t),ln.init(e,t)}),Yke=re("ZodULID",(e,t)=>{sPe.init(e,t),ln.init(e,t)}),Qke=re("ZodXID",(e,t)=>{iPe.init(e,t),ln.init(e,t)}),Xke=re("ZodKSUID",(e,t)=>{aPe.init(e,t),ln.init(e,t)}),Jke=re("ZodIPv4",(e,t)=>{fPe.init(e,t),ln.init(e,t)}),e3e=re("ZodIPv6",(e,t)=>{pPe.init(e,t),ln.init(e,t)}),t3e=re("ZodCIDRv4",(e,t)=>{mPe.init(e,t),ln.init(e,t)}),n3e=re("ZodCIDRv6",(e,t)=>{vPe.init(e,t),ln.init(e,t)}),r3e=re("ZodBase64",(e,t)=>{yPe.init(e,t),ln.init(e,t)}),o3e=re("ZodBase64URL",(e,t)=>{SPe.init(e,t),ln.init(e,t)}),s3e=re("ZodE164",(e,t)=>{CPe.init(e,t),ln.init(e,t)}),i3e=re("ZodJWT",(e,t)=>{EPe.init(e,t),ln.init(e,t)}),dV=re("ZodNumber",(e,t)=>{Fq.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>oke(e,n,r,o),e.isFinite=!0},Eq({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=_o(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=_o(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=_o(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>_o(e).format??null},{gt(e,t){return this.check(y8(e,t))},gte(e,t){return this.check(d_(e,t))},min(e,t){return this.check(d_(e,t))},lt(e,t){return this.check(v8(e,t))},lte(e,t){return this.check(u_(e,t))},max(e,t){return this.check(u_(e,t))},int(e){return this.check(R8(e))},safe(e){return this.check(R8(e))},positive(e){return this.check(y8(0,e))},nonnegative(e){return this.check(d_(0,e))},negative(e){return this.check(v8(0,e))},nonpositive(e){return this.check(u_(0,e))},multipleOf(e,t){return this.check(b8(e,t))},step(e,t){return this.check(b8(e,t))},finite(){return this}}));function P(e){return MNe(dV,e)}const a3e=re("ZodNumberFormat",(e,t)=>{xPe.init(e,t),dV.init(e,t)});function R8(e){return PNe(a3e,e)}const l3e=re("ZodBoolean",(e,t)=>{_Pe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ske(e,n,r)});function ce(e){return NNe(l3e,e)}const c3e=re("ZodNull",(e,t)=>{IPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ike(e,n,r)});function Zn(e){return kNe(c3e,e)}const u3e=re("ZodUnknown",(e,t)=>{APe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lke()});function ml(){return DNe(u3e)}const d3e=re("ZodNever",(e,t)=>{RPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ake(e,n,r)});function f3e(e){return LNe(d3e,e)}const h3e=re("ZodArray",(e,t)=>{Lb(),MPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hke(e,n,r,o),e.element=t.element},{min(e,t){return this.check(ey(e,t))},nonempty(e){return this.check(ey(1,e))},max(e,t){return this.check(Gq(e,t))},length(e,t){return this.check(Kq(e,t))},unwrap(){return this.element}});function ue(e,t){return KNe(h3e,e,t)}const p3e=re("ZodObject",(e,t)=>{Lb(),kPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pke(e,n,r,o),MOe(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return de(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Fr(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Fr(this._zod.def,{catchall:ml()}))},loose(){return this.clone(Fr(this._zod.def,{catchall:ml()}))},strict(){return this.clone(Fr(this._zod.def,{catchall:f3e()}))},strip(){return this.clone(Fr(this._zod.def,{catchall:void 0}))},extend(e){return SOe(this,e)},safeExtend(e){return COe(this,e)},merge(e){return wOe(this,e)},pick(e){return yOe(this,e)},omit(e){return bOe(this,e)},partial(...e){return J6(fV,this,e[0])},exactPartial(...e){return J6(hV,this,e[0],"exactPartial")},required(...e){return EOe(pV,this,e[0])}});function U(e,t){const n={type:"object",shape:e??{},...Ne(t)};return new p3e(n)}const m3e=re("ZodUnion",(e,t)=>{DPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mke(e,n,r,o),e.options=t.options});function Ge(e,t){return new m3e({type:"union",options:e,...Ne(t)})}const g3e=re("ZodIntersection",(e,t)=>{LPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gke(e,n,r,o)});function v3e(e,t){return new g3e({type:"intersection",left:e,right:t})}const T8=re("ZodRecord",(e,t)=>{Lb(),UPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yke(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function rn(e,t,n){return!t||!t._zod?new T8({type:"record",keyType:w(),valueType:e,...Ne(t)}):new T8({type:"record",keyType:e,valueType:t,...Ne(n)})}const EA=re("ZodEnum",(e,t)=>{FPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>cke(e,r,o),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const a of r)if(n.has(a))s[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new EA({...t,checks:[],...Ne(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const a of r)if(n.has(a))delete s[a];else throw new Error(`Key ${a} not found in enum`);return new EA({...t,checks:[],...Ne(o),entries:s})}});function de(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new EA({type:"enum",entries:n,...Ne(t)})}const y3e=re("ZodLiteral",(e,t)=>{$Pe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uke(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function me(e,t){return new y3e({type:"literal",values:Array.isArray(e)?e:[e],...Ne(t)})}const b3e=re("ZodTransform",(e,t)=>{Lb(),zPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>fke(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new xq(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(ph(s,n.value,t));else{const a=s;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=n.value),a.inst??(a.inst=e),n.issues.push(ph(a))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function S3e(e){return new b3e({type:"transform",transform:e})}const fV=re("ZodOptional",(e,t)=>{jq.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function O8(e){return new fV({type:"optional",innerType:e})}const hV=re("ZodExactOptional",(e,t)=>{jPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>iV(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function C3e(e){return new hV({type:"optional",innerType:e})}const w3e=re("ZodNullable",(e,t)=>{BPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function M8(e){return new w3e({type:"nullable",innerType:e})}const E3e=re("ZodDefault",(e,t)=>{HPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function x3e(e,t){return new E3e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():yq(t)}})}const _3e=re("ZodPrefault",(e,t)=>{qPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function I3e(e,t){return new _3e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():yq(t)}})}const pV=re("ZodNonOptional",(e,t)=>{VPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ske(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function A3e(e,t){return new pV({type:"nonoptional",innerType:e,...Ne(t)})}const R3e=re("ZodCatch",(e,t)=>{WPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function T3e(e,t){return new R3e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:NOe(t)})}const O3e=re("ZodPipe",(e,t)=>{GPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xke(e,n,r,o),e.in=t.in,e.out=t.out});function P8(e,t){return new O3e({type:"pipe",in:e,out:t})}const M3e=re("ZodReadonly",(e,t)=>{KPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_ke(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function P3e(e){return new M3e({type:"readonly",innerType:e})}const N3e=re("ZodLazy",(e,t)=>{ZPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ike(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function eu(e){return new N3e({type:"lazy",getter:e})}const k3e=re("ZodCustom",(e,t)=>{YPe.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>dke(e,n,r,o)});function D3e(e,t={}){return ZNe(k3e,e,t)}function L3e(e,t){return YNe(e,t)}function U3e(e){return Vq(lV,e)}function F3e(e){return Wq(cV,e)}const mV=de(["Pending","Processing","Ready","Failed"]),y2=de(["Inbox","Drafts","Sent","Archive","Junk","Trash","All","Flagged"]),gV=de(["BodyParse"]),vV=de(["UnknownCharset","UnreadableBody"]),yV=de(["Header","Body"]),bV=de(["active","deleting"]),b2=de(["password","oauthMicrosoft"]),Bh=de(["Mail","Calendar"]),SV=de(["not_authenticated","authenticated","selected","logout","reauth_required","credentials_missing"]),S2=de(["idle","discovering_mailboxes","syncing_inbox","syncing_others","complete","error"]),$3e=de(["Appointed","Flagged","Reserved","Proposed","Stale","None"]),z3e=de(["validate","apply"]),j3e=de(["abort","merge"]),B3e=de(["ok","failed","disabled"]),H3e=de(["checking","pulling","snapshotting","stopping","starting","verifying","committing","rollingBack","recovering"]),q3e=de(["succeeded","rolledBack","rollbackFailed","abandoned"]),CV=de(["Active","Disabled"]);de(["sign_in_disabled","caller_disabled","foreign_origin","step_up_required","wrong_password","step_up_locked","cannot_disable_self"]);const V3e=de(["SignOut","Disable","Enable","ResetPassword"]),C2=de(["personal","other_users","shared"]),wV=de(["synced","pending","failed","deleting"]),W3e=de(["normal","cursor_invalid","rebuilding"]),w2=de(["All","Archive","Drafts","Flagged","Junk","Sent","Trash","Important"]),Hh=de(["Standing","Temporary"]),Ub=de(["Active","Expired","Disabled"]),E2=de(["None","UserDisabled","AwaitingFolder","FolderCreateFailed","FolderMissing"]),ca=de(["And","Or"]),G3e=de(["From","Subject","HasWords","ListId","FromDomain"]),EV=de(["Is","Contains"]),K3e=de(["From","Subject","ListId"]),Z3e=de(["All","Localpart","Domain","RegistrableDomain"]),Fb=de(["Spam","Phishing","Priority","Personal","Newsletter","Marketing","Automated","Transactional","Social","ColdOutreach"]),qh=de(["Default","Red","Orange","Yellow","Green","Teal","Blue","Purple","Gray"]);de(["Present","Pending","Missing"]);const x2=de(["Pending","Running","Complete","Failed"]),$b=de(["Cal1","Cal2","Cal3","Cal4","Cal5","Cal6"]),xV=de(["VeventOnly","VtodoOnly"]),_V=de(["Default","UserCreated","MailDerived","Subscribed"]),ju=de(["Confirmed","Tentative","Cancelled"]),Bu=de(["Opaque","Transparent"]),Vh=de(["Local","Explicit","Ambiguous"]),IV=de(["Unscheduled","Organizer","NeedsAction","Accepted","Tentative","Declined"]),Y3e=de(["Organizer","Guest"]),Q3e=de(["NeedsAction","Accepted","Tentative","Declined"]),zb=de(["Request","Reply","Cancel","Counter","Publish","None"]),_2=de(["draft","queued","sending","sent","unfiled","failed","blocked"]);de(["This","Following","All"]);const AV=de(["Accepted","Tentative","Declined"]),Wh=de(["Jev","Jina","Mistral","Gemini","OpenAiCompatible","Local"]),X3e=de(["Hosted","Custom","Local"]),J3e=de(["DecisionApi","ChatJsonSchema","JinaClassify"]),Ac=de(["Saved","Deployment","Default"]),eDe=de(["NoBaseUrl","NoApiKey"]),mh=de(["MoveToSpam","WarnOnly"]),tDe=de(["Unauthorized","ModelNotFound","RateLimited","Rejected","ProviderError","Unreachable","TimedOut","Unparseable"]),nDe=de(["ApiKey","Model","BaseUrl"]),Ml=de(["uncategorized","personal","newsletter","marketing","automated","transactional","social","coldOutreach"]),RV=de(["None","Warn","Junk"]),TV=de(["Spam","Phishing"]);de(["asc","desc"]);const jb=de(["none","yellow","orange","red","purple","blue","teal","green","yellow_bang","red_bang","purple_question","blue_info","orange_guillemet","green_check","yellow_check","blue_star"]),OV=de(["unknown","wellknown","vip"]),Bb=de(["active","deleting","deleted","moving"]),Hb=de(["synced","pending","failed","abandoned"]),qb=de(["none","move","delete","copy"]),MV=de(["MoveToInbox","MoveToJunk"]),rDe=de(["Confident","Unsure"]),oDe=de(["ReportedSender","NeverSpam","Vip","WellKnown","Newsletter"]),sDe=de(["DmarcFail","SignerMismatch","ReplyToMismatch","LinkTextMismatch","LinkDomainDistant","PunycodeDomain","MixedScriptDomain","ConfusableDomains","SingleOffDomainLink","GeneratedName","FirstContactDomain","RecentlyRegisteredDomain","UnknownRegistrationDate","ClassifierSpam","ClassifierPhishing","ProviderSpam","DisplayNameForeignAddress","DisplayNameLookalike","ModelImpersonation","ModelSpam","ModelClean","ListedPhishingLink","BackendSymbol"]),iDe=de(["Answered","NotConfigured","DailyLimit","RateLimited","OutOfBand"]),aDe=de(["Unreachable","TimedOut","ServiceError","Unparseable"]),PV=de(["Pending","Stored"]),NV=de(["EmptyFile","UnusableFilename","FileTooLarge","MessageTooLarge","TooManyAttachments","ReservationExpired","UploadMissing","SizeMismatch"]),lDe=de(["trusted","blocked","muted","vip","junkOnly","category","autoArchive","unsubscribed","neverSpam"]),kV=de(["NotExamined","Examined"]),tu=de(["Pass","Fail","None","Neutral","Softfail"]),DV=de(["from","sender","reply_to","to","cc","bcc"]),LV=de(["TEXT","IMAGE","AUDIO","VIDEO","APPLICATION","MULTIPART","MESSAGE"]),cDe=de(["7BIT","8BIT","BINARY","BASE64","QUOTED-PRINTABLE"]),UV=de(["inline","attachment"]),uDe=de(["mixed","alternative","digest","parallel","related","signed","encrypted","form-data","report"]),FV=de(["in_reply_to","references"]),dDe=de(["RateLimited","DailyCap","NotSettled","NotFound","NotPermitted"]),fDe=de(["Apply","Remove"]),$V=de(["Pending","Accepted","Declined","Tentative","Dismissed","Superseded"]),zV=de(["IcalendarPart","IcalendarAttachment","TextHeuristic"]),hDe=de(["None","Cancellation"]),jV=de(["\\Seen","\\Answered","\\Flagged","\\Deleted","\\Draft"]),BV=de(["$Forwarded","$MDNSent","$Junk","$NotJunk","$Phishing"]),pDe=de(["\\NonExistent","\\Noinferiors","\\Noselect","\\HasChildren","\\HasNoChildren","\\Marked","\\Unmarked","\\Subscribed","\\Remote"]),mDe=de(["s3","filesystem","inline","database"]),gDe=de(["none","gzip","zstd"]);de(["none","blocked","neverSpam"]);de(["Theme","Density","DefaultComposerFormat","PinnedFolders","AccountSignaturePlainText","AccountSignatureHtml","AccountDisplayName","AccountMuted","AccountComposeLanguages","MailboxDisplayName","MailboxMuted","FolderRoleAppointment","FolderRoleAppointmentLabel","MailboxRole","DefaultInvitationSenderAccountId","ClassificationPresetId","ClassificationModel","ClassificationBaseUrl","ClassificationApiKey","ClassificationEnabled","ClassificationDailyLimit","ClassificationUsage","SpamPlacementSpam","SpamPlacementPhishing"]);const vDe=de(["Pending","Complete"]),yDe=de(["FolderRole","MailboxOverride","FilterAction"]);de(["Corresponds","Lookalike","ForeignAddress","Unrelated","NoClaim"]);de(["Retrying","GaveUp"]);const bDe=de(["Spam","Clean","Absent"]),SDe=de(["pending","queued","processing","processed"]),CDe=de(["add","remove"]),wDe=de(["pending","queued","processing","processed"]);U({type:me("apiKey"),in:me("header"),name:me("Authorization")});const N8=U({code:w(),message:w(),details:rn(w(),w()).optional()}),EDe=U({path:w(),rule:w(),message:w()});U({statusCode:me(400),code:w(),message:w(),details:rn(w(),w()).optional(),errors:ue(EDe).optional()});U({statusCode:me(401),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(404),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(422),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(403),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(204)});U({statusCode:me(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(422),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(412),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(404),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({statusCode:me(409),code:w(),message:w(),details:rn(w(),w()).optional()});U({type:me("aws_proxy"),httpMethod:me("POST"),passthroughBehavior:me("when_no_match"),uri:U({"Fn::Sub":me("arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations")})});U({statusCode:me(500),code:w(),message:w(),details:rn(w(),w()).optional()});U({confirmEmail:w()});U({statusCode:me(202),message:w()});const xDe=U({addressId:w().min(25).max(25),displayName:w().optional(),normalizedEmail:w(),inboundCount:P(),outboundCount:P(),replyCount:P(),lastReplyAt:P().optional(),lastInboundAt:P().optional()});U({suggestions:ue(xDe)});U({statusCode:me(202),exportId:w()});U({accountExportRequestId:w().min(25).max(25),accountConfigId:w().min(25).max(25),userId:w(),state:mV,createdAt:P(),updatedAt:P(),expiresAt:P().optional(),objectKey:w().optional(),downloadUrl:w().optional(),errorMessage:w().optional()});U({accountExportRequestId:w().min(25).max(25),accountConfigId:w().min(25).max(25),userId:w(),state:mV,createdAt:P(),updatedAt:P(),expiresAt:P().optional(),objectKey:w().optional(),downloadUrl:w().optional(),errorMessage:w().optional()});const HV=U({depth:P(),contentType:w().max(140)}),_De=U({quarantineId:w().min(25).max(25),accountConfigId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),uidValidity:P(),uid:P(),mailboxRole:y2.optional(),mailboxPath:w().max(512),quarantinedAt:P(),attempts:P(),failureStage:gV,failureCode:vV,failureMessage:w().max(512),failurePartPath:w().max(140).optional(),workerVersion:w().max(64),contentType:w().max(140).optional(),transferEncoding:w().max(64).optional(),charset:w().max(64).optional(),sizeBytes:P().optional(),structure:ue(HV),messageIdHash:w().max(140).optional(),createdAt:P(),updatedAt:P()}),IDe=U({syncWarningId:w().min(25).max(25),accountConfigId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),uidValidity:P(),uid:P(),stage:yV,attempts:P(),createdAt:P()});U({entries:ue(_De),warnings:ue(IDe),warningsTotal:P()});U({quarantineId:w().min(25).max(25),accountConfigId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),uidValidity:P(),uid:P(),mailboxRole:y2.optional(),mailboxPath:w().max(512),quarantinedAt:P(),attempts:P(),failureStage:gV,failureCode:vV,failureMessage:w().max(512),failurePartPath:w().max(140).optional(),workerVersion:w().max(64),contentType:w().max(140).optional(),transferEncoding:w().max(64).optional(),charset:w().max(64).optional(),sizeBytes:P().optional(),structure:ue(HV),messageIdHash:w().max(140).optional(),createdAt:P(),updatedAt:P()});U({syncWarningId:w().min(25).max(25),accountConfigId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),uidValidity:P(),uid:P(),stage:yV,attempts:P(),createdAt:P()});const ADe=U({accountConfigId:w().min(25).max(25),userId:w().min(25).max(25),name:w().optional(),state:bV,deletedAt:P().optional(),cascadeStartedAt:P().optional(),createdAt:P(),updatedAt:P()}),Pl=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),RDe=U({role:y2,source:$3e,mailboxId:w().min(25).max(25).optional(),staleAppointmentMailboxId:w().min(25).max(25).optional(),staleAppointmentPath:w().max(512).optional()}),TDe=U({accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),username:w().min(1),email:w(),authType:b2,syncedServices:ue(Bh),grantedScopes:ue(w()),imapHost:w().min(1),imapPort:P().min(1).max(65535),imapTls:ce(),imapStartTls:ce(),smtpEnabled:ce(),smtpHost:w(),smtpPort:P().min(1).max(65535),smtpTls:ce(),smtpStartTls:ce(),smtpUsername:w(),isActive:ce(),connectionState:SV,lastConnectedAt:P().optional(),lastSyncAt:P().optional(),lastError:w().optional(),syncPhase:S2.optional(),mailboxCountTotal:P().min(0).optional(),mailboxCountSynced:P().min(0).optional(),createdAt:P(),updatedAt:P(),displayName:w().optional(),muted:Pl.optional(),signaturePlainText:w().optional(),signatureHtml:w().optional(),composeLanguages:ue(w()).optional(),folderAppointments:ue(RDe)}),ODe=U({importId:w().min(25).max(25),folderPaths:ue(w())});U({accountConfig:ADe,accounts:ue(TDe),buildCommit:w(),pendingImport:ODe.optional()});U({accountConfigId:w().min(25).max(25),userId:w().min(25).max(25),name:w().optional(),state:bV,deletedAt:P().optional(),cascadeStartedAt:P().optional(),createdAt:P(),updatedAt:P()});U({accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),username:w().min(1),email:w(),authType:b2,syncedServices:ue(Bh),grantedScopes:ue(w()),passwordHash:w().optional(),oauthRefreshTokenHash:w().optional(),oauthTokenUpdatedAt:P().optional(),imapHost:w().min(1),imapPort:P().min(1).max(65535),imapTls:ce(),imapStartTls:ce(),smtpEnabled:ce(),smtpHost:w(),smtpPort:P().min(1).max(65535),smtpTls:ce(),smtpStartTls:ce(),smtpUsername:w(),smtpPasswordHash:w().optional(),isActive:ce(),connectionState:SV,lastConnectedAt:P().optional(),lastSyncAt:P().optional(),lastError:w().optional(),syncPhase:S2.optional(),mailboxCountTotal:P().min(0).optional(),mailboxCountSynced:P().min(0).optional(),createdAt:P(),updatedAt:P(),deletedAt:P().optional()});U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional()});U({schemaVersion:P(),document:rn(w(),ml())});U({mode:z3e.optional(),onExisting:j3e.optional(),document:rn(w(),ml())});const MDe=U({section:w(),key:w(),verdict:w(),reason:w().optional()});U({importId:w().min(25).max(25).optional(),valid:ce(),schemaVersion:P(),applied:ce(),items:ue(MDe),errors:ue(N8),warnings:ue(N8),accountsNeedingCredentials:ue(w().min(25).max(25))});U({statusCode:me(409),code:w(),message:w(),details:rn(w(),w()).optional()});const PDe=U({status:B3e,lastCheckedAt:w().optional(),latestVersion:w().optional(),publishedAt:w().optional(),summary:w().optional(),releaseNotesUrl:w().optional(),updateAvailable:ce().optional(),schemaVersion:P().optional(),error:w().optional()}),NDe=U({runId:w(),fromVersion:w(),targetVersion:w(),phase:H3e,outcome:Ge([q3e,Zn()]),startedAt:w(),updatedAt:w(),message:w(),logCommand:w()});U({currentVersion:w(),currentSchemaVersion:P().optional(),check:PDe,run:Ge([NDe,Zn()])});U({targetVersion:w()});const qV=U({userId:w(),email:w(),createdAt:P(),lastSignInAt:P(),sessionCount:P(),status:CV,isCaller:ce()});U({people:ue(qV)});U({statusCode:me(403),message:w(),details:rn(w(),w()).optional(),code:Ge([me("sign_in_disabled"),me("caller_disabled"),me("foreign_origin"),me("step_up_required"),me("wrong_password")])});U({password:w(),action:V3e,userId:w()});U({stepUpToken:w(),expiresAt:P()});U({statusCode:me(429),message:w(),details:rn(w(),w()).optional(),code:me("step_up_locked")});U({stepUpToken:w()});U({status:CV,stepUpToken:w()});U({statusCode:me(409),message:w(),details:rn(w(),w()).optional(),code:me("cannot_disable_self")});U({stepUpToken:w()});U({person:qV,resetUrl:w(),expiresAt:P()});U({mailboxId:w().min(25).max(25),accountId:w().min(25).max(25),namespaceType:C2,namespacePrefix:w(),hierarchyDelimiter:w().min(1).max(1),fullPath:w().min(1).max(512),uidValidity:P().min(1),uidNext:P().min(1),highestModseq:w().max(32),messageCount:P().min(0),unseenCount:P().min(0),deletedCount:P().min(0),totalSize:P().min(0),lastSyncUid:P(),highWaterMarkUid:P(),lastMessageSyncAt:P(),initialSyncCompletedAt:P().optional(),parentMailboxId:w(),syncStatus:wV,pendingPath:w().max(512).optional(),syncFailureReason:w(),cursorState:W3e,specialUse:ue(w2).optional(),createdAt:P(),updatedAt:P()});const kDe=U({mailboxId:w().min(25).max(25),accountId:w().min(25).max(25),namespaceType:C2,namespacePrefix:w(),hierarchyDelimiter:w().min(1).max(1),fullPath:w().min(1).max(512),messageCount:P().min(0),unseenCount:P().min(0),deletedCount:P().min(0),lastSyncUid:P(),highWaterMarkUid:P(),lastMessageSyncAt:P(),syncStatus:wV,pendingPath:w().max(512).optional(),syncFailureReason:w(),specialUse:ue(w2).optional(),createdAt:P(),updatedAt:P(),muted:Pl.optional(),displayNameOverride:w().max(256).optional()});U({continuationToken:w().max(800).optional(),items:ue(kDe)});U({namespaceType:C2,fullPath:w().min(1).max(512)});U({fullPath:w().max(512).optional(),muted:Ge([Pl,Zn()]).optional(),displayNameOverride:Ge([w(),Zn()]).optional()});U({mailboxId:Ge([w(),Zn()])});const ua=U({field:G3e,value:w().max(256)}),VV=U({version:me(0)}),Vb=U({test:me("header"),match:EV,header:K3e,key:w().max(256)}),Wb=U({test:me("address"),match:EV,part:Z3e,key:w().max(256)}),Gb=U({test:me("hasWords"),words:ue(w().max(256))}),Kb=U({test:me("classification"),label:Fb}),Zb=U({test:me("allof"),tests:ue(Ge([eu(()=>Zb),eu(()=>Yb),eu(()=>Qb),Vb,Wb,Gb,Kb])).min(1).max(50)}),Yb=U({test:me("anyof"),tests:ue(Ge([Zb,eu(()=>Yb),eu(()=>Qb),Vb,Wb,Gb,Kb])).min(1).max(50)}),Qb=U({test:me("not"),operand:Ge([Zb,Yb,eu(()=>Qb),Vb,Wb,Gb,Kb])}),Hu=U({version:me(1),test:Ge([Zb,Yb,Qb,Vb,Wb,Gb,Kb])});U({filterId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(256),scope:Hh,expiresAt:w().optional(),ttl:P().optional(),state:Ub,disabledReason:E2,ruleChangedAt:P(),actionChangedAt:P(),matchOperator:ca,literalClauses:ue(ua),rule:Ge([VV,Hu]),priority:P(),stop:ce(),actionLabelId:w(),actionMailboxId:w(),createdAt:P(),updatedAt:P()});U({filterId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(256),scope:Hh,expiresAt:w().optional(),state:Ub,disabledReason:E2,ruleChangedAt:P(),actionChangedAt:P(),matchOperator:ca,literalClauses:ue(ua),priority:P(),stop:ce(),actionLabelId:w(),actionMailboxId:w(),createdAt:P(),updatedAt:P(),rule:Hu});U({name:w().max(256),scope:Hh,expiresAt:w().optional(),matchOperator:ca,actionLabelId:w(),actionMailboxId:w(),priority:P().optional(),stop:ce().optional(),literalClauses:ue(ua).optional(),rule:Hu.optional()});U({filterId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(256),scope:Hh,expiresAt:w().optional(),state:Ub,disabledReason:E2,ruleChangedAt:P(),actionChangedAt:P(),matchOperator:ca,literalClauses:ue(ua),priority:P(),stop:ce(),actionLabelId:w(),actionMailboxId:w(),createdAt:P(),updatedAt:P(),rule:Hu,organizeJobId:w()});U({name:w().max(256).optional(),scope:Hh.optional(),expiresAt:w().optional(),state:Ub.optional(),matchOperator:ca.optional(),literalClauses:ue(ua).optional(),priority:P().optional(),stop:ce().optional(),actionLabelId:w().optional(),actionMailboxId:w().optional(),rule:Hu.optional()});U({labelId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(140),normalizedName:w().max(140),color:qh,createdAt:P(),updatedAt:P()});const DDe=U({accountId:w().min(25).max(25),state:Ge([me("Present"),me("Pending")]),mailboxId:w().min(25).max(25),fullPath:w().max(512)}),LDe=U({accountId:w().min(25).max(25),state:me("Missing")});U({labelId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w().max(140),color:qh,createdAt:P(),updatedAt:P(),filterCount:P(),folders:ue(Ge([DDe,LDe]))});U({name:w().max(140),color:qh});U({name:w().max(140),color:qh});U({filterId:w().min(25).max(25).optional(),matchOperator:ca,literalClauses:ue(ua),actionLabelId:w(),actionMailboxId:w()});U({statusCode:me(202),organizeJobId:w(),state:x2});U({matchedCount:P(),messageIds:ue(w())});U({organizeJobId:w().min(25).max(25),accountConfigId:w().min(25).max(25),userId:w(),state:x2,filterId:w(),matchOperator:ca,literalClauses:ue(ua),rule:Ge([VV,Hu]),actionLabelId:w(),actionMailboxId:w(),sourceMailboxId:w(),sentAfter:w(),sentBefore:w(),matchedCount:P(),appliedCount:P(),failedCount:P(),errorMessage:w(),ttl:P(),createdAt:P(),updatedAt:P()});U({organizeJobId:w().min(25).max(25),accountConfigId:w().min(25).max(25),userId:w(),state:x2,filterId:w(),matchOperator:ca,literalClauses:ue(ua),actionLabelId:w(),actionMailboxId:w(),matchedCount:P(),appliedCount:P(),failedCount:P(),errorMessage:w(),createdAt:P(),updatedAt:P()});const UDe=U({calendarId:w().min(25).max(25),accountConfigId:w().min(25).max(25),urlSegment:w().max(64),displayName:w().max(140),color:$b,componentSet:xV,source:_V,timezone:w().max(64),syncSequence:P(),subscriptionUrl:w().max(2048),subscriptionEnabled:ce(),subscriptionCheckedAt:P(),subscriptionFetchedAt:P(),subscriptionError:w().max(512),createdAt:P(),updatedAt:P()});U({items:ue(UDe)});U({calendarId:w().min(25).max(25),accountConfigId:w().min(25).max(25),urlSegment:w().max(64),displayName:w().max(140),color:$b,componentSet:xV,source:_V,timezone:w().max(64),syncSequence:P(),subscriptionUrl:w().max(2048),subscriptionEnabled:ce(),subscriptionCheckedAt:P(),subscriptionFetchedAt:P(),subscriptionError:w().max(512),createdAt:P(),updatedAt:P()});U({displayName:w().max(140),urlSegment:w().max(64),color:$b.optional(),timezone:w().max(64).optional(),subscriptionUrl:w().max(2048).optional()});U({displayName:w().max(140),color:$b,timezone:w().max(64),subscriptionEnabled:ce()});U({statusCode:me(204)});U({calendarId:w().min(25).max(25),createdAt:P(),rotatedAt:P()});U({calendarId:w().min(25).max(25),feedToken:w().max(512),createdAt:P(),rotatedAt:P()});U({contentType:me("text/calendar; charset=utf-8"),etag:w(),lastModified:w(),icalData:w()});U({statusCode:me(304),etag:w(),lastModified:w()});U({statusCode:me(404),contentType:me("text/plain; charset=utf-8"),message:w()});const FDe=U({calendarId:w().min(25).max(25),calendarObjectId:w().min(25).max(25),recurrenceId:w().max(64),icalUid:w().max(512),summary:w().max(512),start:w().max(64),end:w().max(64),allDay:ce(),status:ju,transparency:Bu,zoneCertainty:Vh,etag:w().max(64),hasRecurrence:ce(),participation:IV});U({items:ue(FDe)});const WV=U({email:w().max(512),displayName:w().max(512)});U({calendarId:w().min(25).max(25),summary:w().max(512),description:w().max(2048).optional(),location:w().max(512).optional(),start:w().max(64),end:w().max(64),allDay:ce().optional(),timeZone:w().max(64).optional(),status:ju.optional(),transparency:Bu.optional(),recurrenceRule:w().max(512).optional(),attendees:ue(WV).optional(),organizerAccountId:w().min(25).max(25).optional()});U({calendarObjectId:w().min(25).max(25),calendarId:w().min(25).max(25),resourceName:w().max(256),icalUid:w().max(512),icalData:w(),etag:w().max(64),sequence:P(),syncSequence:P(),summary:w().max(512),dtStart:w().max(64),dtEnd:w().max(64),allDay:ce(),zoneCertainty:Vh,status:ju,transparency:Bu,hasRecurrence:ce(),expandedThrough:w().max(64),createdAt:P(),updatedAt:P()});const $De=U({email:w().max(512),displayName:w().max(512),role:Y3e,status:Q3e}),zDe=U({accepted:P(),declined:P(),tentative:P(),needsAction:P()}),GV=U({email:w().max(512),outboxMessageId:w().min(25).max(25),method:zb,status:_2});U({calendarObjectId:w().min(25).max(25),calendarId:w().min(25).max(25),resourceName:w().max(256),icalUid:w().max(512),icalData:w(),etag:w().max(64),sequence:P(),syncSequence:P(),summary:w().max(512),dtStart:w().max(64),dtEnd:w().max(64),allDay:ce(),zoneCertainty:Vh,status:ju,transparency:Bu,hasRecurrence:ce(),expandedThrough:w().max(64),createdAt:P(),updatedAt:P(),participation:IV,organizer:w().max(512),attendees:ue($De),attendeeCounts:zDe,sends:ue(GV)});const jDe=U({summary:w().max(512).optional(),description:w().max(2048).optional(),location:w().max(512).optional(),start:w().max(64).optional(),end:w().max(64).optional(),allDay:ce().optional(),timeZone:w().max(64).optional(),status:ju.optional(),transparency:Bu.optional(),recurrenceRule:w().max(512).optional(),attendees:ue(WV).optional(),organizerAccountId:w().min(25).max(25).optional(),answer:AV.optional()});U({statusCode:me(200),sends:ue(GV)});const BDe=U({start:w().max(64),end:w().max(64)});U({items:ue(BDe)});const HDe=U({state:me("Priced"),currency:me("USD"),perMillionInputTokens:P()}),KV=U({state:me("NoPrice")}),qDe=U({presetId:Wh,label:w(),group:X3e,adapterShape:J3e,defaultBaseUrl:w().optional(),defaultModel:w(),needsKey:ce(),price:Ge([HDe,KV])}),VDe=U({state:me("NotConfigured")}),WDe=U({presetId:Ac,model:Ac,baseUrl:Ac,apiKey:Ac,enabled:Ac,dailyLimit:Ac}),GDe=U({state:me("Priced"),currency:me("USD"),amount:P()}),KDe=U({accountId:w().min(25).max(25),calls:P(),dailyLimit:P(),resetsAt:w().datetime(),cost:Ge([GDe,KV])}),ZDe=U({state:me("Configured"),presetId:Wh,model:w(),baseUrl:w(),enabled:ce(),dailyLimit:P(),sources:WDe,usage:ue(KDe)}),YDe=U({state:me("Unrunnable"),presetId:Wh,reason:eDe}),QDe=U({state:me("Unset")}),XDe=U({state:me("Set"),cleanBelow:P().min(0).max(1),spamAt:P().min(0).max(1)}),JDe=U({thresholds:Ge([QDe,XDe]),spamPlacement:mh,phishingPlacement:mh});U({defaultInvitationSenderAccountId:w().min(25).max(25).optional(),defaultInvitationSenderChosen:ce(),classificationPresets:ue(qDe),classification:Ge([VDe,ZDe,YDe]),spam:JDe});U({defaultInvitationSenderAccountId:w().min(25).max(25).optional(),classificationPresetId:Wh.optional(),classificationModel:w().optional(),classificationBaseUrl:w().optional(),classificationApiKey:w().optional(),classificationEnabled:ce().optional(),classificationDailyLimit:P().min(1).optional(),spamPlacementSpam:mh.optional(),spamPlacementPhishing:mh.optional()});U({presetId:Wh,model:w(),baseUrl:w(),apiKey:w()});U({state:me("Passed"),latencyMs:P(),label:Fb,confidence:P()});U({state:me("Failed"),latencyMs:P(),status:P().optional(),kind:tDe,field:nDe.optional(),fix:w()});const e5e=U({category:Ml,count:P()}),t5e=U({label:Fb,count:P()}),n5e=U({spamReportedNotJunk:P(),categoryOverridden:P()}),r5e=U({date:w(),action:RV,kind:TV,count:P()}),o5e=U({from:P().min(0).max(1),count:P()});U({since:w(),examined:P(),byCategory:ue(e5e),byLabel:ue(t5e),corrections:n5e,spamByDay:ue(r5e),spamScoreBands:ue(o5e)});const s5e=U({calendarTaskId:w().min(25).max(25),calendarId:w().min(25).max(25),resourceName:w().max(256),icalUid:w().max(512),icalData:w(),etag:w().max(64),summary:w().max(512),description:w().max(2048),due:w().max(64),dueAt:w().max(64),allDay:ce(),completed:ce(),createdAt:P(),updatedAt:P()});U({items:ue(s5e)});U({calendarTaskId:w().min(25).max(25),calendarId:w().min(25).max(25),resourceName:w().max(256),icalUid:w().max(512),icalData:w(),etag:w().max(64),summary:w().max(512),description:w().max(2048),due:w().max(64),dueAt:w().max(64),allDay:ce(),completed:ce(),createdAt:P(),updatedAt:P()});U({calendarId:w().min(25).max(25).optional(),summary:w().max(512),description:w().max(2048).optional(),due:w().max(64),allDay:ce().optional(),timeZone:w().max(64).optional()});U({summary:w().max(512).optional(),description:w().max(2048).optional(),due:w().max(64).optional(),allDay:ce().optional(),timeZone:w().max(64).optional(),completed:ce().optional()});U({deletedCount:P()});U({triggered:ce(),message:w()});const i5e=U({mailboxId:w().min(25).max(25),fullPath:w(),phase:w(),messagesTotal:P(),messagesSynced:P(),highWaterMarkUid:P(),lastSyncedAt:P().optional()});U({accountId:w().min(25).max(25),syncPhase:S2.optional(),mailboxCountTotal:P().optional(),mailboxCountSynced:P().optional(),lastSyncAt:P().optional(),mailboxes:ue(i5e)});U({email:w().min(1),displayName:w().optional(),username:w().optional(),authType:b2.optional(),syncedServices:ue(Bh).optional(),password:w().optional(),imapHost:w().min(1),imapPort:P().min(1).max(65535),imapTls:ce(),imapStartTls:ce(),smtpEnabled:ce().optional(),smtpHost:w().optional(),smtpPort:P().min(1).max(65535).optional(),smtpTls:ce().optional(),smtpStartTls:ce().optional(),smtpUsername:w().optional(),smtpPassword:w().optional()});U({accountId:w().min(25).max(25).optional(),username:w().min(1),password:w().optional(),imapHost:w().min(1),imapPort:P().min(1).max(65535),imapTls:ce(),imapStartTls:ce(),smtpHost:w().optional(),smtpPort:P().min(1).max(65535).optional(),smtpTls:ce().optional(),smtpStartTls:ce().optional(),smtpUsername:w().optional(),smtpPassword:w().optional()});U({imapSuccess:ce(),imapError:w().optional(),smtpSuccess:ce().optional(),smtpError:w().optional()});U({displayName:w().optional(),password:w().optional(),imapHost:w().optional(),imapPort:P().min(1).max(65535).optional(),imapTls:ce().optional(),imapStartTls:ce().optional(),smtpEnabled:ce().optional(),smtpHost:w().optional(),smtpPort:P().min(1).max(65535).optional(),smtpTls:ce().optional(),smtpStartTls:ce().optional(),smtpUsername:w().optional(),smtpPassword:w().optional(),isActive:ce().optional(),syncedServices:ue(Bh).optional(),signaturePlainText:w().optional(),signatureHtml:w().optional(),composeLanguages:ue(w()).optional(),muted:Ge([Pl,Zn()]).optional()});U({accountId:w().min(25).max(25),deletedAt:P(),message:w()});U({threadMessageId:w().min(25).max(25),threadId:w().min(25).max(25),messageId:w().min(25).max(25),accountConfigId:w().min(25).max(25),mailboxId:w().min(25).max(25),uid:P().min(1),messageIdHeader:w().optional(),inReplyTo:w().optional(),referenceOrder:P().min(0),fromEmail:w().optional(),fromName:w().optional(),subject:w().optional(),listId:w().max(256).optional(),internalDate:P(),sentDate:P(),isRead:ce(),hasAttachment:ce(),star:jb,hasStars:ce(),isDeleted:ce(),snippet:w().max(256).optional(),category:Ml,createdAt:P(),updatedAt:P()});const Xb=U({fromDomain:w(),dkimDomain:w().optional(),dkimMismatch:ce(),signerDomain:w().optional(),envelopeDomain:w().optional(),signerMessageCount:P().optional(),signerFirstSeenAt:P().optional()}),ZV=U({action:MV.optional(),fromPlacement:w().optional(),fromMailboxId:w().min(25).max(25).optional(),destinationMailboxId:w().min(25).max(25).optional(),filterId:w().min(25).max(25).optional()}),YV=U({labelId:w().min(25).max(25),name:w().max(140),color:qh}),Jb=U({reportedAt:P()}),I2=U({action:MV,confidence:rDe,fromPlacement:w(),reasons:ue(w()),dryRun:ce(),decidedAt:P()}),Gh=U({state:me("NotChecked")}),a5e=U({rule:oDe}),l5e=U({rule:me("Filter"),filterId:w().min(25).max(25)}),Kh=U({state:me("ScreenedOut"),screen:Ge([a5e,l5e])}),c5e=U({name:sDe,symbol:w(),score:P(),options:ue(w())}),Zh=U({state:me("Checked"),score:P().min(0).max(1),action:RV,kind:TV,reasons:ue(c5e),modelOutcome:iDe}),Yh=U({state:me("Failed"),kind:aDe}),QV=U({threadMessageId:w().min(25).max(25),threadId:w().min(25).max(25),messageId:w().min(25).max(25),accountConfigId:w().min(25).max(25),mailboxId:w().min(25).max(25),fromEmail:w().optional(),fromName:w().optional(),subject:w().optional(),sentDate:P(),isRead:ce(),hasAttachment:ce(),star:jb,hasStars:ce(),isDeleted:ce(),snippet:w().max(256).optional(),createdAt:P(),updatedAt:P(),category:Ml,senderTrust:OV,muted:ce(),authenticity:Xb.optional(),status:Bb,syncStatus:Hb,abandonedMutation:qb,accountId:w().min(25).max(25),autoMoved:ZV.optional(),labels:ue(YV).optional(),spamReport:Jb.optional(),placementVerdict:I2.optional(),spamVerdict:Ge([Gh,Kh,Zh,Yh]),spamCleared:ce()});U({continuationToken:w().max(800).optional(),items:ue(QV)});U({items:ue(QV).optional(),continuationToken:w().max(800).optional(),count:P().optional()});U({accountId:w().min(25).max(25),toAddresses:ue(w()).min(1),ccAddresses:ue(w()).optional(),bccAddresses:ue(w()).optional(),subject:w().optional(),textBody:w().optional(),htmlBody:w().optional(),inReplyTo:w().optional(),references:ue(w()).optional(),sendImmediately:ce().optional()});U({outboxMessageId:w().min(25).max(25),accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),fromAddress:w(),fromName:w().optional(),toAddresses:ue(w()),ccAddresses:ue(w()),bccAddresses:ue(w()),replyToAddress:w().optional(),subject:w().optional(),messageIdValue:w(),inReplyTo:w().optional(),references:ue(w()),textBody:w().optional(),htmlBody:w().optional(),status:_2,lastError:w().optional(),lastSmtpCode:P().optional(),sentAt:P().optional(),smtpMessageId:w().optional(),appendedUid:P(),createdAt:P(),updatedAt:P()});const u5e=U({outboxAttachmentId:w().min(25).max(25),outboxMessageId:w().min(25).max(25),filename:w().max(256),contentType:w().max(256),sizeBytes:P().min(0),state:PV,contentId:w().max(256),contentUrl:w().url()}),d5e=U({outboxMessageId:w().min(25).max(25),accountId:w().min(25).max(25),fromAddress:w(),fromName:w().optional(),toAddresses:ue(w()),ccAddresses:ue(w()),bccAddresses:ue(w()),subject:w().optional(),inReplyTo:w().optional(),references:ue(w()),textBody:w().optional(),htmlBody:w().optional(),status:_2,lastError:w().optional(),sentAt:P().optional(),createdAt:P(),updatedAt:P(),attachments:ue(u5e)});U({outboxAttachmentId:w().min(25).max(25),outboxMessageId:w().min(25).max(25),accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),filename:w().max(256),contentType:w().max(256),sizeBytes:P().min(0),state:PV,storageKey:w().max(2048),reservationExpiresAt:P().min(0),createdAt:P(),updatedAt:P()});U({continuationToken:w().max(800).optional(),items:ue(d5e)});U({attachmentIds:ue(w().min(25).max(25)).optional(),toAddresses:ue(w()).optional(),ccAddresses:ue(w()).optional(),bccAddresses:ue(w()).optional(),subject:w().optional(),textBody:w().optional(),htmlBody:w().optional(),inReplyTo:w().optional(),references:ue(w()).optional()});U({filename:w().max(256),contentType:w().max(256),sizeBytes:P().min(1)});U({outboxAttachmentId:w().min(25).max(25),outboxMessageId:w().min(25).max(25),filename:w().max(256),contentType:w().max(256),sizeBytes:P().min(1),contentId:w().max(256),uploadUrl:w().max(2048),uploadExpiresAt:P()});U({code:w(),reason:NV,message:w().max(512),limitBytes:P().min(0),usedBytes:P().min(0)});U({statusCode:Ge([me(400),me(413)]),code:w(),reason:NV,message:w().max(512),limitBytes:P().min(0),usedBytes:P().min(0)});const XV=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),JV=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),eW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),tW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),nW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),rW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),oW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:Ml}),sW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),iW=U({setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional(),value:ce()}),A2=U({trusted:XV.optional(),blocked:JV.optional(),neverSpam:eW.optional(),muted:Pl.optional(),vip:tW.optional(),wellknown:nW.optional(),junkOnly:rW.optional(),category:oW.optional(),autoArchive:sW.optional(),unsubscribed:iW.optional()});U({addressId:w().min(25).max(25),accountConfigId:w().min(25).max(25),displayName:w().optional(),localPart:w().min(1),domain:w().min(1),normalizedEmail:w(),normalizedCompound:w(),flags:A2,inboundCount:P(),outboundCount:P(),replyCount:P(),lastInboundAt:P(),lastOutboundAt:P().optional(),lastReplyAt:P(),createdAt:P(),updatedAt:P()});U({addressId:w().min(25).max(25),accountConfigId:w().min(25).max(25),displayName:w().optional(),localPart:w().min(1),domain:w().min(1),normalizedEmail:w(),flags:A2,inboundCount:P(),outboundCount:P(),replyCount:P(),lastInboundAt:P(),lastReplyAt:P(),createdAt:P(),updatedAt:P()});const f5e=U({trusted:Ge([XV,Zn()]).optional(),blocked:Ge([JV,Zn()]).optional(),neverSpam:Ge([eW,Zn()]).optional(),muted:Ge([Pl,Zn()]).optional(),vip:Ge([tW,Zn()]).optional(),wellknown:Ge([nW,Zn()]).optional(),junkOnly:Ge([rW,Zn()]).optional(),category:Ge([oW,Zn()]).optional(),autoArchive:Ge([sW,Zn()]).optional(),unsubscribed:Ge([iW,Zn()]).optional()});U({flags:f5e.optional(),clearFlags:ue(lDe).optional()});const h5e=U({messageId:w().min(25).max(25),mailboxId:w().min(25).max(25),uid:P().min(1),rfc822Size:P().min(0),internalDate:P(),status:Bb,syncStatus:Hb,abandonedMutation:qb,authenticity:Xb.optional(),spamVerdict:Ge([Gh,Kh,Zh,Yh]),spamCleared:ce(),messageIdHeader:w().optional(),autoMoved:ZV.optional(),labels:ue(YV).optional(),spamReport:Jb.optional()}),cf=U({addressId:w().min(25).max(25),displayName:w().optional(),normalizedEmail:w(),addressRole:DV,addressOrder:P(),flags:A2.optional()}),p5e=U({messageId:w().min(25).max(25),date:P(),subject:w().optional(),messageIdValue:w().optional(),from:ue(cf),to:ue(cf),cc:ue(cf),bcc:ue(cf),replyTo:ue(cf),category:Ml,senderTrust:OV}),m5e=U({bodyPartId:w().min(25).max(25),partPath:w().min(1),mediaType:LV,mediaSubtype:w().min(1),contentId:w().optional(),sizeOctets:P().min(0),disposition:UV.optional(),dispositionFilename:w().optional(),isMultipart:ce(),contentUrl:w().url()}),g5e=U({messageIdValue:w(),referenceType:FV,referenceOrder:P().min(0)});U({message:h5e,envelope:p5e,flags:ue(w()),bodyParts:ue(m5e),references:ue(g5e)});const aW=U({dmarc:tu.optional(),spf:tu.optional(),dkim:tu.optional()}),lW=U({classified:ce(),score:w().optional(),source:w().optional()}),cW=U({filterId:w().min(25).max(25),sourceMailboxId:w().min(25).max(25),destinationMailboxId:w().min(25).max(25),decidedAt:P()}),R2=U({label:Fb,confidence:P().min(0).max(1),confident:ce()});U({messageId:w().min(25).max(25),mailboxId:w().min(25).max(25),uid:P().min(1),sequenceNumber:P().min(1),rfc822Size:P().min(0),internalDate:P(),envelopeId:w().min(25).max(25),rootBodyPartId:w().min(25).max(25),bodyStorageKey:w().optional(),status:Bb,syncStatus:Hb,abandonedMutation:qb,originalMailboxId:w().min(25).max(25).optional(),originalUid:P().optional(),category:Ml,classificationState:kV,authenticity:Xb.optional(),authResult:aW.optional(),providerSpam:lW.optional(),hasListUnsubscribe:ce(),movedByRemit:ce(),placementVerdict:I2.optional(),filterMove:cW.optional(),placementDecidedAt:P().optional(),classifierScores:ue(R2),spamReport:Jb.optional(),spamVerdict:Ge([Gh,Kh,Zh,Yh]),spamCleared:ce(),createdAt:P(),updatedAt:P()});U({messageId:w().min(25).max(25),mailboxId:w().min(25).max(25),uid:P().min(1),sequenceNumber:P().min(1),rfc822Size:P().min(0),internalDate:P(),envelopeId:w().min(25).max(25),rootBodyPartId:w().min(25).max(25),bodyStorageKey:w().optional(),status:Bb,syncStatus:Hb,abandonedMutation:qb,originalMailboxId:w().min(25).max(25).optional(),originalUid:P().optional(),category:Ml,classificationState:kV,authenticity:Xb.optional(),authResult:aW.optional(),providerSpam:lW.optional(),hasListUnsubscribe:ce(),movedByRemit:ce(),placementVerdict:I2.optional(),filterMove:cW.optional(),placementDecidedAt:P().optional(),classifierScores:ue(R2),spamReport:Jb.optional(),spamVerdict:Ge([Gh,Kh,Zh,Yh]),spamCleared:ce(),createdAt:P(),updatedAt:P(),messageIdHeader:w().optional()});U({bodyPartId:w().min(25).max(25),messageId:w().min(25).max(25),parentBodyPartId:w().min(25).max(25).optional(),partPath:w().min(1),mediaType:LV,mediaSubtype:w().min(1),contentId:w().optional(),contentDescription:w().optional(),transferEncoding:cDe,sizeOctets:P().min(0),lineCount:P().optional(),md5Hash:w().optional(),disposition:UV.optional(),dispositionFilename:w().optional(),language:w().optional(),location:w().optional(),isMultipart:ce(),multipartSubtype:uDe.optional(),createdAt:P(),updatedAt:P()});U({messageReferenceId:w().min(25).max(25),messageId:w().min(25).max(25),envelopeId:w().min(25).max(25),messageIdValue:w(),referenceType:FV,referenceOrder:P().min(0),createdAt:P(),updatedAt:P()});U({raw:w()});U({isRead:ce().optional(),isStarred:ce().optional(),starColor:jb.optional()});U({messageIds:ue(w().min(25).max(25)).min(1).max(10),move:ce().optional()});const v5e=U({messageId:w().min(25).max(25),verdict:Ge([Gh,Kh,Zh,Yh]),labels:ue(w())}),y5e=U({messageId:w().min(25).max(25),code:dDe,retryable:ce()});U({successful:ue(v5e),failed:ue(y5e)});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),isRead:ce().optional(),isStarred:ce().optional(),starColor:jb.optional()});U({successCount:P(),failureCount:P()});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),permanent:ce().optional()});U({messageIds:ue(w().min(25).max(25)).min(1).max(100)});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),destinationMailboxId:w().min(25).max(25)});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),destinationMailboxId:w().min(25).max(25)});U({messageIds:ue(w().min(25).max(25)).min(1).max(100),labelId:w().min(25).max(25),action:fDe});const b5e=U({messageId:w().min(25).max(25),reason:w()});U({successCount:P(),failureCount:P(),failures:ue(b5e).optional()});U({suggestionId:w().min(25).max(25),accountConfigId:w().min(25).max(25),messageId:w().min(25).max(25),bodyPartId:w().min(25).max(25),icalUid:w().max(512),sequence:P(),method:zb,source:zV,state:$V,summary:w().max(512),dtStart:w().max(64),dtEnd:w().max(64),endsAtUtc:w().max(64),allDay:ce(),location:w().max(512),organizer:w().max(256),zoneCertainty:Vh,icalData:w(),acceptedCalendarObjectId:w(),supersededByMessageId:w(),createdAt:P(),updatedAt:P()});U({suggestionId:w().min(25).max(25),accountConfigId:w().min(25).max(25),messageId:w().min(25).max(25),bodyPartId:w().min(25).max(25),icalUid:w().max(512),sequence:P(),method:zb,source:zV,state:$V,summary:w().max(512),dtStart:w().max(64),dtEnd:w().max(64),endsAtUtc:w().max(64),allDay:ce(),location:w().max(512),organizer:w().max(256),zoneCertainty:Vh,acceptedCalendarObjectId:w(),supersededByMessageId:w(),createdAt:P(),updatedAt:P(),supersededByThreadId:w(),answerOvertakenBy:hDe});U({calendarId:w().min(25).max(25),answer:AV.optional(),event:jDe.optional()});U({muteSender:ce()});U({envelopeAddressId:w().min(25).max(25),messageId:w().min(25).max(25),addressId:w().min(25).max(25),displayName:w().optional(),normalizedEmail:w(),addressRole:DV,addressOrder:P().min(0),createdAt:P(),updatedAt:P()});const S5e=U({kind:yDe,accountId:w().min(25).max(25),folderPath:w().max(512),target:w().max(256),mailboxId:w()});U({importId:w().min(25).max(25),accountConfigId:w().min(25).max(25),schemaVersion:P(),state:vDe,document:rn(w(),ml()),unresolvedRefs:ue(S5e),createdAt:P(),completedAt:P(),updatedAt:P()});U({kind:w()});const C5e=U({kind:me("Boolean"),value:ce()}),w5e=U({kind:me("String"),value:w()}),E5e=U({kind:me("Number"),value:P()}),x5e=U({kind:me("StringList"),value:ue(w())}),_5e=U({kind:me("Map"),value:rn(w(),w())}),I5e=U({kind:me("MutedFlag"),value:Pl}),A5e=U({date:w().date(),calls:P()}),R5e=U({kind:me("DailyCount"),value:A5e});U({accountSettingId:w().min(25).max(25),accountConfigId:w().min(25).max(25),name:w(),value:Ge([C5e,w5e,E5e,x5e,_5e,I5e,R5e]),createdAt:P(),updatedAt:P()});U({mailboxAttributeId:w().min(25).max(25),mailboxId:w().min(25).max(25),attributeName:pDe});U({mailboxSpecialUseId:w().min(25).max(25),mailboxId:w().min(25).max(25),specialUse:w2});U({mailboxFlagId:w().min(25).max(25),mailboxId:w().min(25).max(25),flagName:Ge([jV,BV,w()]),isPermanent:ce()});U({mailboxId:w().min(25).max(25),eventName:w(),accountId:w().min(25).max(25),lockId:w().min(25).max(25),acquiredAt:P(),lockedBy:w(),ttl:P()});U({messageFlagId:w().min(25).max(25),messageId:w().min(25).max(25),flagName:Ge([jV,BV,w()]),setAt:P(),createdAt:P(),updatedAt:P()});const uW=U({name:w(),value:w()}),T5e=U({href:w(),text:w()}),O5e=U({raw:w(),headers:ue(uW),text:w(),html:w(),links:ue(T5e)}),M5e=U({mailFrom:w(),rcpt:ue(w()),ip:w(),helo:w(),hostname:w()}),P5e=U({dmarc:tu,spf:tu,dkim:tu,signerDomain:w(),envelopeDomain:w()}),N5e=U({verdict:bDe,score:w(),headers:ue(uW)}),k5e=U({knownSender:ce(),senderMessagesSeen:P(),senderDomainMessagesSeen:P(),senderDomainRegisteredAt:w().optional(),receivedAt:w(),classifierScores:ue(R2),modelAllowed:ce()});U({message:O5e,envelope:M5e,authentication:P5e,provider:N5e,context:k5e});U({messageId:w().min(25).max(25),accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),sourceMailboxId:w().min(25).max(25),destinationMailboxId:w().min(25).max(25),state:SDe,createdAt:P(),updatedAt:P()});U({messageId:w().min(25).max(25),flagName:w(),accountId:w().min(25).max(25),accountConfigId:w().min(25).max(25),mailboxId:w().min(25).max(25),operation:CDe,state:wDe,createdAt:P(),updatedAt:P()});U({envelopeId:w().min(25).max(25),messageId:w().min(25).max(25),dateValue:P(),dateRaw:w(),subject:w().optional(),messageIdValue:w().optional(),createdAt:P(),updatedAt:P()});const D5e=U({state:me("Published"),registeredAt:w()}),L5e=U({state:me("Unpublished")});U({domainRegistrationId:w().max(256),registration:Ge([D5e,L5e]),createdAt:P(),updatedAt:P()});U({accountConfigId:w().min(25).max(25),senderKey:w().max(256),signerDomain:w().max(256),messageCount:P(),firstSeenAt:P(),lastSeenAt:P(),userAffirmedAt:P(),createdAt:P(),updatedAt:P()});U({bodyPartParameterId:w().min(25).max(25),messageId:w().min(25).max(25),bodyPartId:w().min(25).max(25),parameterName:w().min(1),parameterValue:w(),createdAt:P(),updatedAt:P()});U({messageId:w().min(25).max(25),createdAt:P(),updatedAt:P()});U({messageId:w().min(25).max(25),text:w(),createdAt:P(),updatedAt:P()});U({rawStorageId:w().min(25).max(25),messageId:w().min(25).max(25),storageType:mDe,storageLocation:w(),storageKey:w(),sizeBytes:P().min(0),checksumSha256:w().min(64).max(64),contentEncoding:gDe,storedAt:P(),expiresAt:P().optional(),createdAt:P(),updatedAt:P()});U({outboxMessageId:w().min(25).max(25),accountConfigId:w().min(25).max(25),calendarObjectId:w().min(25).max(25),recipient:w().max(512),method:zb,sequence:P(),icalData:w(),createdAt:P(),updatedAt:P()});U({calendarId:w().min(25).max(25),calendarObjectId:w().min(25).max(25),recurrenceId:w().max(64),startAt:w().max(64),endAt:w().max(64),allDay:ce(),summary:w().max(512),status:ju,transparency:Bu,createdAt:P(),updatedAt:P()});U({feedTokenId:w().min(25).max(25),accountConfigId:w().min(25).max(25),calendarId:w().min(25).max(25),tokenHash:w().max(64),createdAt:P(),rotatedAt:P(),updatedAt:P()});U({messageLabelId:w().min(25).max(25),messageId:w().min(25).max(25),labelId:w().min(25).max(25),accountConfigId:w().min(25).max(25),appliedByFilterId:w().min(25).max(25).optional(),createdAt:P(),updatedAt:P()});U({labelMailboxId:w().min(25).max(25),labelId:w().min(25).max(25),accountId:w().min(25).max(25),mailboxId:w().min(25).max(25),createdAt:P(),updatedAt:P()});U({email:w().optional(),services:ue(Bh).min(1).optional()});U({authorizationUrl:w()});U({kind:me("Boolean"),value:ce()});U({kind:me("String"),value:w()});U({kind:me("String"),value:mh});U({kind:me("Number"),value:P()});U({kind:me("StringList"),value:ue(w())});U({kind:me("Map"),value:rn(w(),w())});U({kind:me("Map"),value:U({encryptedDek:w(),encryptedData:w(),iv:w(),authTag:w()})});U({kind:me("DailyCount"),value:U({date:w(),calls:P().int()})});U({kind:me("MutedFlag"),value:U({value:ce(),setAt:P(),setBy:w().optional(),expiresAt:P().optional(),reason:w().optional()})});const U5e=e=>e.hierarchyDelimiter.length===0?[e.fullPath]:e.fullPath.split(e.hierarchyDelimiter),gh=e=>{const t=U5e(e);return t[t.length-1]||e.fullPath},F5e=(e,t)=>{switch(e.kind){case"appointed":case"flagged":return{allowed:!0,mailbox:e.mailbox};case"proposed":return t==="resolved"?{allowed:!0,mailbox:e.mailbox}:{allowed:!1,reason:"unconfirmed"};case"appointment_stale":return{allowed:!1,reason:"stale"};default:return{allowed:!1,reason:"none"}}},$5e=(e,t)=>F5e(e,t).allowed,z5e={[yc.Appointed]:{kind:"appointed",mailbox:null},[yc.Flagged]:{kind:"flagged",mailbox:null},[yc.Reserved]:{kind:"reserved",mailbox:null},[yc.Proposed]:{kind:"proposed",mailbox:null},[yc.Stale]:{kind:"appointment_stale",appointedMailboxId:"",fallback:{kind:"none"}},[yc.None]:{kind:"none"}},j5e=(e,t)=>$5e(z5e[e],t),T2=()=>typeof navigator<"u"&&(navigator.language||navigator.languages?.[0])||"en-US",es=(e,t)=>new Intl.NumberFormat(T2(),t).format(e),B5e=/^-?\d+$/,O2=e=>{if(e instanceof Date)return e;if(typeof e=="number")return new Date(e);if(typeof e=="string"){const t=e.trim();return B5e.test(t)?new Date(Number(t)):new Date(t)}return new Date(Number.NaN)},M2=e=>Number.isFinite(e.getTime()),Ef=(e,t)=>{const n=O2(e);return M2(n)?new Intl.DateTimeFormat(T2(),t).format(n):""},dW=(e,t)=>Ef(e,{short:{month:"short",day:"numeric"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{month:"short",day:"numeric",hour:"numeric",minute:"numeric"}}[t]),Nje=e=>{const t=O2(e);if(!M2(t))return"";const n=new Intl.RelativeTimeFormat(T2(),{numeric:"auto"}),r=Date.now(),o=t.getTime()-r,s=Math.round(o/1e3),a=Math.round(o/(1e3*60)),c=Math.round(o/(1e3*60*60)),u=Math.round(o/(1e3*60*60*24)),f=Math.round(o/(1e3*60*60*24*7));return Math.abs(s)<60?n.format(s,"second"):Math.abs(a)<60?n.format(a,"minute"):Math.abs(c)<24?n.format(c,"hour"):Math.abs(u)<7?n.format(u,"day"):Math.abs(f)<4?n.format(f,"week"):dW(t,"medium")},kje=e=>{const t=O2(e);if(!M2(t))return"";const n=new Date,r=t.toDateString()===n.toDateString(),o=new Date(n);o.setDate(o.getDate()-1);const s=t.toDateString()===o.toDateString(),a=new Date(n);a.setDate(a.getDate()-6);const c=t>=a&&t<n,u=t.getFullYear()===n.getFullYear();return r?Ef(t,{hour:"numeric",minute:"numeric"}):s?"Yesterday":c?Ef(t,{weekday:"long"}):u?Ef(t,{month:"short",day:"numeric"}):Ef(t,{month:"short",day:"numeric",year:"numeric"})},H5e=e=>`Move ${e===1?"1":es(e)} ${e===1?"message":"messages"} to Trash?`,Dje=({targets:e,trashByAccount:t,hasAppointments:n,isError:r})=>{if(r)return"unavailable";if(!n||e.length===0)return"unknown";let o=!1,s=!1;for(const a of e){if(a.accountId===void 0)return"unknown";const c=t.get(a.accountId);if(c===void 0)return"unknown";if(c.source==="Stale")return"staleTrash";if(c.mailboxId===void 0)return"noTrash";c.mailboxId===a.mailboxId&&(o=!0,j5e(c.source,"confirmed")||(s=!0))}return s?"unconfirmed":o?"permanent":"trash"},q5e=e=>e==="permanent"||e==="unconfirmed",Lje=(e,t,n={})=>{const r=e===1?"1":es(e),o=e===1?"message":"messages",{trashFolderLabel:s,staleFolderLabel:a}=n;if(t==="noTrash")return{title:`Can't delete ${r} ${o} yet`,description:"No folder on this account is set as Trash, so there is nowhere to move the mail. Nothing has been deleted.",confirmLabel:"Pick a Trash folder"};if(t==="staleTrash")return{title:`Can't delete ${r} ${o} yet`,description:a?`The folder you set as this account's Trash — ${a} — is gone from the mail server. Nothing has been deleted.`:"The folder you set as this account's Trash is gone from the mail server. Nothing has been deleted.",confirmLabel:"Pick another folder"};if(t==="unconfirmed"){const c=s?`reader files this account's deleted mail in ${s} because of its name — nobody confirmed it.`:"reader files this account's deleted mail in a folder it matched by name — nobody confirmed it.";return{title:"Confirm this account's Trash folder",description:e>0?`${c} Deleting ${r} ${o} there erases them from the mail server, and that cannot be restored. Nothing has been deleted.`:`${c} Emptying a folder erases everything in it from the mail server, and that cannot be restored. Nothing has been emptied.`,confirmLabel:"Confirm the folder"}}return t==="unavailable"?{title:`Can't delete ${r} ${o}`,description:"reader couldn't read this account's folder settings, so it can't say whether this would move the mail to Trash or erase it. Nothing has been deleted.",confirmLabel:"Sign in again"}:t==="unknown"?{title:`Delete ${r} ${o}?`,description:"Checking where this account files deleted mail…",confirmLabel:"Delete"}:t==="permanent"?{title:`Permanently delete ${r} ${o}?`,description:"They are erased from the mail server and cannot be restored.",confirmLabel:"Delete permanently"}:{title:H5e(e),description:"You can restore them from Trash later.",confirmLabel:"Move to Trash"}},V5e={delete:(e,t)=>`Deleting ${e} of ${t}…`,move:(e,t)=>`Moving ${e} of ${t}…`,markRead:(e,t)=>`Marking ${e} of ${t} as read…`},W5e={delete:"moved to Trash",move:"moved",markRead:"marked as read"},fW=(e,t)=>e==="delete"&&q5e(t)?"permanently deleted":W5e[e],G5e={delete:"couldn't be deleted",move:"couldn't be moved",markRead:"couldn't be marked as read"},K5e={delete:"Couldn't delete these messages",move:"Couldn't move these messages",markRead:"Couldn't mark these messages as read"},Z5e={delete:"The delete didn't finish.",move:"The move didn't finish.",markRead:"The update didn't finish."},Uje=(e,t,n)=>V5e[e](es(t),es(n)),Y5e=(e,t,n="trash")=>`${es(t)} ${fW(e,n)}. Your mail server is still catching up.`,Q5e=e=>`Stopped after ${es(e)}`,X5e=(e,t,n,r="trash")=>`${es(t)} of ${es(n)} ${fW(e,r)}. The rest were not sent, apart from the ones already on their way when you stopped — those may still have gone through.`,k8=(e,t)=>t>0?`Stopped after ${es(t)} — some messages ${G5e[e]}`:K5e[e],J5e=e=>Z5e[e],eLe={delete:e=>`A delete of ${e} messages`,move:e=>`A move of ${e} messages`,markRead:e=>`Marking ${e} messages as read`},tLe=(e,t,n)=>`${eLe[e](es(t))}${n?` in ${n}`:""} is still running — stop it first.`,Fje=e=>e==="delete"?"danger":"info",$je=(e,t,n,r)=>n.error!==void 0?null:n.cancelled?{severity:"warning",title:Q5e(n.done),detail:X5e(e,n.done,t,r)}:{severity:"info",title:Y5e(e,n.done,r)},hW=100,nLe=(e,t)=>e.kind==="move"?[t,e.destinationMailboxId]:[t],rLe=new AbortController().signal,xA=async e=>e.then(t=>({ok:!0,value:t}),t=>({ok:!1,error:t})),oLe=(e,t=hW)=>{if(e.length===0)return[];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n},sLe=(e,t=hW)=>{const n=new Map;for(const r of e){const o=n.get(r.accountId);if(o){o.push(r.id);continue}n.set(r.accountId,[r.id])}return[...n.values()].flatMap(r=>oLe(r,t))},pW=async(e,t,n,r)=>{const o=sLe(e),s=e.length;let a=0,c=0;const u=[];for(let f=0;f<o.length;f++){if(r.aborted)return u.push(...o.slice(f).flat()),{done:a,failedIds:u,refused:c,cancelled:!0};const h=o[f],m=await xA(t(h,r));if(!m.ok)return u.push(...o.slice(f).flat()),r.aborted?{done:a,failedIds:u,refused:c,cancelled:!0}:(n({done:a,total:s}),{done:a,failedIds:u,refused:c,cancelled:!1,error:m.error});c+=m.value?.failureCount??0,a+=h.length,n({done:a,total:s})}return{done:a,failedIds:u,refused:c,cancelled:!1}},zje=async(e,t)=>{await pW(e.map(n=>({id:n,accountId:void 0})),async n=>(await t(n),{successCount:n.length,failureCount:0}),()=>{},rLe)},iLe=async(e,t,n,r,o)=>{let s=0,a=0;const c=[];let u;do{if(o.aborted)return{done:s,failedIds:c,refused:a,cancelled:!0};const f=await xA(e(u,o));if(!f.ok)return o.aborted?{done:s,failedIds:c,refused:a,cancelled:!0}:{done:s,failedIds:c,refused:a,cancelled:!1,error:f.error};const h=f.value;if(h.ids.length>0){const m=await xA(n(h.ids,o));if(!m.ok)return o.aborted?{done:s,failedIds:c,refused:a,cancelled:!0}:{done:s,failedIds:c,refused:a,cancelled:!1,error:m.error};a+=m.value?.failureCount??0,s+=h.ids.length,r({done:s,total:t})}u=h.continuationToken}while(u);return{done:s,failedIds:c,refused:a,cancelled:!1}},aLe=e=>({done:e.done,total:Math.max(e.total,e.done)}),lLe=e=>typeof e=="object"&&e!==null&&Array.isArray(e.pages),cLe=e=>typeof e=="object"&&e!==null&&Array.isArray(e.items),uLe=(e,t)=>e===void 0?e:lLe(e)?{...e,pages:e.pages.map(n=>({...n,items:t(n.items)}))}:cLe(e)?{...e,items:t(e.items)}:e,mW=e=>{const t=[];for(const n of new Set(e))t.push(j2e({path:{mailboxId:n}})),t.push(cq({path:{mailboxId:n}}));return t.push(dq()),t},jje=(e,t)=>Promise.all(t.map(n=>e.cancelQueries({queryKey:n}))),Bje=(e,t)=>t.flatMap(n=>e.getQueriesData({queryKey:n})).filter(n=>n[1]!==void 0).map(([n,r])=>({queryKey:n,data:r})),Hje=(e,t,n)=>{const r=o=>uLe(o,n);for(const o of t)e.setQueriesData({queryKey:o},r)},qje=(e,t)=>{for(const n of t)e.setQueryData(n.queryKey,n.data)},gW=(e,t)=>{for(const n of t)e.invalidateQueries({queryKey:n})},vW=_.createContext(void 0),dLe=e=>{if(e.action)return e.action;if((e.severity??"error")==="error")return{label:"Report an issue",href:ku(ol({title:`Bug: ${e.title}`,errorMessage:e.detail?`${e.title} — ${e.detail}`:e.title,stack:e.error instanceof Error?e.error.stack:void 0}))}},yW=()=>{const e=_.useContext(vW);if(!e)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return e},D8=5,fLe=(e,t,n)=>({title:e,detail:bW(n)??t,error:n}),bW=e=>{if(e!=null){if(e instanceof Error)return e.message||void 0;if(typeof e=="string")return e||void 0;if(typeof e=="object"&&"message"in e&&typeof e.message=="string")return e.message||void 0}},Vje=e=>Sl(e)?.code==="message_gone_from_server",Wje=e=>{const t=bW(e);return t?t.startsWith("Message not found"):!1},hLe=(e,t,n)=>e.severity===n&&e.title===t.title&&e.detail===t.detail,pLe=(e,t)=>{const r=[...e.filter(o=>!hLe(o,{title:t.title,detail:t.detail,severity:t.severity},t.severity)),t];return r.length<=D8?r:r.slice(r.length-D8)},mLe=(e,t)=>e.filter(n=>n.id!==t),gLe=(e,t,n)=>({id:t,severity:e.severity??"error",title:e.title,detail:e.detail,action:e.action,createdAt:n}),vLe=new Set(["none","stale","unconfirmed"]),yLe=new Set(Object.values(Use)),f_=(e,t)=>{const n=e?.[t];return typeof n=="string"?n:void 0},bLe=e=>{const t=Sl(e);if(t?.code!=="folder_role_unresolved")return;const{details:n}=t;if(!n)return;const r=f_(n,"reason"),o=f_(n,"role"),s=f_(n,"accountId");if(!(!r||!vLe.has(r))&&!(!o||!yLe.has(o)||!s))return{reason:r,role:o,accountId:s}},SLe=e=>Sl(e)?.code==="mailbox_not_settled",CLe=3e4,wLe=1e3,ELe="The folder couldn't be created on the mail server. Please try again.",xLe="The folder was created but the mail server hasn't confirmed it yet, so nothing was attached to it. It's in your folder list — try again in a moment.",_Le=(e,t)=>new Promise((n,r)=>{if(t?.aborted){r(t.reason);return}const o=setTimeout(()=>{t?.removeEventListener("abort",s),n()},e),s=()=>{clearTimeout(o),r(t?.reason)};t?.addEventListener("abort",s,{once:!0})});async function ILe({fetchMailboxes:e,mailboxId:t,signal:n,timeoutMs:r=CLe,pollIntervalMs:o=wLe,delay:s=_Le,now:a=Date.now}){const c=a()+r;for(;;){n?.throwIfAborted();const f=(await e()).find(h=>h.mailboxId===t);if(f?.syncStatus===y3.synced)return f;if(f?.syncStatus===y3.failed)throw new Error(ELe);if(a()>=c)throw new Error(xLe);await s(o,n)}}function SW(e,t){const n=e.trim();return t?`${t.fullPath}${t.hierarchyDelimiter}${n}`:n}const L8=(e,t)=>{const n=t.length===0?[e]:e.split(t);return n[0]?.toLowerCase()==="inbox"&&(n[0]="INBOX"),n.join(t)};function ALe({name:e,delimiter:t,parent:n,existingPaths:r}){const o=e.trim();if(o==="")return"Enter a folder name.";if(t.length>0&&o.includes(t))return`A folder name can't contain "${t}".`;const s=L8(SW(o,n),t);if(r.some(c=>L8(c,t)===s))return"A folder with that name already exists."}function RLe(e){const t=ia(),{data:n}=fl({...fA({path:{accountId:e??""}}),enabled:!!e}),r=cT({...A2e(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:o2({path:{accountId:e}})})}}),o=_.useRef(new Map),s=_.useCallback(async(c,u,f)=>{if(!e)throw new Error("No account to create the folder in. Pick messages from a single account first.");const h=n?.items??[],m=u?h.find(E=>E.fullPath===u):void 0;if(u&&!m)throw new Error(`Couldn't find the folder "${u}" to create this one inside.`);const g=m?{fullPath:m.fullPath,hierarchyDelimiter:m.hierarchyDelimiter}:void 0,v=SW(c,g);let C=o.current.get(v);if(!C){const E=g?.hierarchyDelimiter??h[0]?.hierarchyDelimiter??"/",x=ALe({name:c,delimiter:E,parent:g,existingPaths:h.map(R=>R.fullPath)});if(x)throw new Error(x);C=(await r.mutateAsync({path:{accountId:e},body:{fullPath:v,namespaceType:"personal"}})).mailboxId,o.current.set(v,C)}const b=await ILe({mailboxId:C,signal:f,fetchMailboxes:async()=>(await t.fetchQuery({...fA({path:{accountId:e}}),staleTime:0})).items??[]});return o.current.delete(v),{id:b.mailboxId,label:gh(b),path:b.fullPath}},[r,e,n,t]);return{createFolder:_.useCallback((c,u)=>s(c,"",u),[s]),createFolderIn:s,mutation:r}}const TLe=()=>{const{t:e}=iq("mail",{useSuspense:!1});return _.useCallback((t,n)=>e(t,{defaultValue:n}),[e])},h_={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},Gje={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},vh=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function e0(e){const t=new Map,n=[...e].sort((r,o)=>vh.indexOf(h_[r.role])-vh.indexOf(h_[o.role]));for(const r of n){if(!r.mailboxId||t.has(r.mailboxId))continue;const o=h_[r.role];o&&t.set(r.mailboxId,o)}return t}function CW(e,t,n){const r=e.displayNameOverride?.trim();if(r)return r;const o=gh(e);return!t||!n?o:n(`sidebar.${t}`,o)}const OLe=new Set(["sent","drafts","trash"]),Kje=e=>e===void 0||!OLe.has(e),Zje=100,MLe=e=>e.trim().toLowerCase()==="inbox",PLe=(e,t)=>{if(e.hierarchyDelimiter.length===0)return!1;const n=`${e.fullPath}${e.hierarchyDelimiter}`;return t.some(r=>r.mailboxId!==e.mailboxId&&r.fullPath.startsWith(n))},NLe=["Appointed","Flagged","Reserved"],kLe=(e,t)=>e.mailboxId!==t.mailboxId?!1:e.source==="Stale"?t.specialUse?.includes(e.role)??!1:NLe.includes(e.source),DLe=(e,t)=>t.find(n=>kLe(n,e))?.role;function Yje(e,t,n){if(MLe(e.fullPath))return{deletable:!1,reason:"inbox",message:"The inbox can't be deleted."};const r=DLe(e,n);return r?{deletable:!1,reason:"role",message:`This folder is your ${r} folder. Reassign that role before deleting it.`}:PLe(e,t)?{deletable:!1,reason:"children",message:"This folder has subfolders. Delete them first."}:{deletable:!0}}function LLe(e,t){return e.filter(n=>n.mailboxId!==t)}function Qje(e){return{total:e,moved:0,phase:e===0?"moved":"moving"}}function Xje(e,t){if(e.phase!=="moving")return e;const n=Math.min(e.total,e.moved+Math.max(0,t));return{...e,moved:n,phase:n>=e.total?"moved":"moving"}}function Jje(e,t){return{...e,phase:"failed",error:t}}function eBe(e){return`Moved ${e.moved} of ${e.total}`}function tBe(e){const t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function nBe(e){return e>0?"choose-fate":"confirm-empty"}const ULe=new Set(["outbox","postvak uit","boîte d'envoi","postausgang","buzón de salida","posta in uscita","送信トレイ","送件匣","发件箱","skrzynka nadawcza"]),FLe=e=>{const t=gh(e).trim().toLowerCase();return ULe.has(t)},U8=vh.length,$Le=(e,t)=>{const n=e0(t);return[...e.filter(o=>{const s=n.get(o.mailboxId);return s==="drafts"||s==="sent"?!1:!FLe(o)})].sort((o,s)=>{const a=n.has(o.mailboxId)?vh.indexOf(n.get(o.mailboxId)??"inbox"):U8,c=n.has(s.mailboxId)?vh.indexOf(n.get(s.mailboxId)??"inbox"):U8;return a!==c?a-c:gh(o).localeCompare(gh(s),void 0,{sensitivity:"base",numeric:!0})})},zLe=e=>e[0]?.hierarchyDelimiter??"/",jLe=({mailboxes:e,folderAppointments:t,currentMailboxId:n,excludeMailboxId:r,translator:o})=>{const s=$Le(e,t),a=e0(t);return(r?LLe(s,r):s).map(u=>({id:u.mailboxId,label:CW(u,a.get(u.mailboxId),o),path:u.fullPath,isCurrent:u.mailboxId===n,messageCount:u.messageCount}))},wW=_.createContext(void 0),F8=Symbol("appoint-failed"),BLe=({children:e})=>{const t=ia(),n=TLe(),[r,o]=_.useState(null),[s,a]=_.useState(),[c,u]=_.useState({kind:"choosing"}),f=r?.accountId,{data:h}=fl({...s2(),staleTime:1/0,enabled:!!f}),{data:m}=fl({...fA({path:{accountId:f??""}}),enabled:!!f}),{createFolderIn:g}=RLe(f),v=cT({...I2e(),meta:Py(409)}),C=h?.accounts.find(F=>F.accountId===f),b=_.useMemo(()=>m?.items??[],[m]),E=_.useMemo(()=>C?.folderAppointments??[],[C]),x=_.useMemo(()=>jLe({mailboxes:b,folderAppointments:E,translator:n}),[b,E,n]),I=E.find(F=>F.role===r?.role),R=r?.guessedMailboxId??I?.mailboxId,M=b.find(F=>F.mailboxId===R),D=r?.trashFolderLabel??(M?CW(M,e0(E).get(M.mailboxId),n):void 0),N=_.useRef(null),T=_.useCallback(()=>{N.current=null,o(null),a(void 0),u({kind:"choosing"})},[]),L=_.useCallback(F=>{N.current=F,o(F),u({kind:"choosing"}),a(F.reason==="unconfirmed"?F.guessedMailboxId:void 0)},[]),$=_.useCallback(F=>{N.current===F&&T()},[T]),G=_.useCallback(F=>{r&&(u({kind:"appointing"}),v.mutateAsync({path:{accountId:r.accountId,role:r.role},body:{mailboxId:F}}).catch(q=>(u({kind:"appoint-failed",cause:SLe(q)?"mailbox-pending":"generic"}),F8)).then(async q=>{q!==F8&&(await t.invalidateQueries({queryKey:lq()}),u({kind:"acting"}),await r.onAppointed(),$(r))}).catch(()=>$(r)))},[r,v,t,$]),z=_.useMemo(()=>({requestAppointment:L}),[L]);return O.jsxs(wW.Provider,{value:z,children:[e,r&&O.jsx(Hse,{open:!0,reason:r.reason,action:r.action,folders:x,delimiter:zLe(b),trashFolderLabel:D,guessedMailboxId:R,staleFolderLabel:r.staleFolderLabel??I?.staleAppointmentPath,accountEmail:(h?.accounts.length??0)>1?C?.email:void 0,phase:c,selectedId:s,onSelect:a,onCreateFolder:g,onConfirm:G,onCancel:T})]})},HLe=()=>{const e=_.useContext(wW);if(!e)throw new Error("useRoleAppointmentPrompt must be used within a RoleAppointmentPromptProvider");return e},EW=_.createContext(void 0),qLe=({children:e})=>{const[t,n]=_.useState(void 0),r=_.useRef(void 0),o=_.useRef(void 0),s=_.useRef(void 0),a=_.useRef(new Set),c=ia(),{pushError:u}=yW(),{requestAppointment:f}=HLe(),h=_.useRef(async()=>({kind:"ran",outcome:{done:0,failedIds:[],refused:0,cancelled:!1}})),m=_.useCallback(b=>{gW(c,mW(nLe(b.action,b.mailboxId)));const E=new Set;if(b.accountId&&E.add(b.accountId),b.source.kind==="targets")for(const x of b.source.targets)x.accountId&&E.add(x.accountId);for(const x of E)c.invalidateQueries({queryKey:o2({path:{accountId:x}})})},[c]),g=_.useCallback(async b=>{const E=s.current;if(E)return{kind:"refused",reason:tLe(E.action.kind,E.matched,E.mailboxLabel)};const x=Symbol("bulk-run"),I=new AbortController;r.current=I,o.current=x,s.current=b,b.claimEnding&&(a.current.add(x),b.claimEnding(()=>a.current.delete(x))),n({action:b.action,mailboxId:b.mailboxId,progress:{done:0,total:b.matched}});const R=T=>{o.current===x&&n(L=>L&&{...L,progress:aLe(T)})},M=b.source.kind==="targets"?await pW(b.source.targets,b.applyBatch,R,I.signal):await iLe(b.source.fetchPage,b.matched,b.applyBatch,R,I.signal),D=a.current.delete(x);o.current===x&&(o.current=void 0,s.current=void 0,n(void 0));const N=M.error?bLe(M.error):void 0;return N?f({accountId:N.accountId,role:N.role,reason:N.reason,action:{kind:"delete",count:b.matched},onAppointed:async()=>{const T=await h.current({...b,claimEnding:void 0});T.kind==="refused"&&u({title:k8(b.action.kind,0),detail:T.reason})}}):M.error?u(fLe(k8(b.action.kind,M.done),J5e(b.action.kind),M.error)):M.refused>0&&u({severity:"warning",title:M.refused>1?`Couldn't delete ${M.refused} of ${b.matched} messages yet`:"Couldn't delete this message yet",detail:"Something else moved them while the delete was being prepared. They are back where they now sit — try again."}),D||b.reportEnding?.(b.action.kind,b.matched,M),M.done>0&&m(b),{kind:"ran",outcome:M}},[m,u,f]);h.current=g;const v=_.useCallback(b=>{s.current?.mailboxId===b&&r.current?.abort()},[]);_.useEffect(()=>{const b=a.current;return()=>{r.current?.abort(),r.current=void 0,o.current=void 0,s.current=void 0,b.clear()}},[]);const C=_.useMemo(()=>({run:t,start:g,stop:v}),[t,g,v]);return O.jsx(EW.Provider,{value:C,children:e})},rBe=()=>{const e=_.useContext(EW);if(!e)throw new Error("useBulkRun must be used within a BulkRunProvider");return e},VLe=["Phishing","Spam"],xW=e=>VLe.flatMap(t=>e?.filter(n=>n.name===t)??[])[0],WLe=e=>e.state==="Checked"&&e.action!=="None"?{...e,action:e.action}:void 0,GLe=(e,t)=>{if(e.spamCleared)return;const n=xW(e.labels);if(n)return{label:n,suspected:!t.has(e.mailboxId)}},oBe=(e,t)=>!e.spamCleared&&(e.spamVerdict.state==="Failed"||xW(e.labels)!==void 0&&e.spamVerdict.state==="Checked"&&!t),_W=(e,t)=>ku(ol({title:`Spam check: ${e}`,errorMessage:`${e}. ${t}`})),sBe=e=>_W(`Unknown spam reason ${e}`,`The spam check named ${e}, which this version has no sentence for.`),$8=10,KLe=e=>{const t=new Map;for(const r of e){const o=t.get(r.accountId)??[];o.push(r),t.set(r.accountId,o)}const n=[];for(const[r,o]of t)for(let s=0;s<o.length;s+=$8)n.push({accountId:r,targets:o.slice(s,s+$8)});return n},ZLe={nowSpam:0,nowSuspected:0,noLongerSuspected:0},YLe=(e,t,n)=>{const r=WLe(n)?.action,o=t?t.suspected?"Warn":"Junk":void 0;return r===o?e:r==="Junk"?{...e,nowSpam:e.nowSpam+1}:r==="Warn"?{...e,nowSuspected:e.nowSuspected+1}:{...e,noLongerSuspected:e.noLongerSuspected+1}},QLe=(e,t,n)=>{const r=new Map(t.targets.map(a=>[a.messageId,a])),o=n.successful.reduce((a,c)=>YLe(a,r.get(c.messageId)?.before,c.verdict),e.summary),s=[...e.failures,...n.failed.map(a=>({messageId:a.messageId,subject:r.get(a.messageId)?.subject??"(No subject)",code:a.code,retryable:a.retryable}))];return{summary:o,failures:s}},z8=(e,t)=>({successful:[],failed:e.targets.map(n=>({messageId:n.messageId,code:t,retryable:!1}))}),IW=_.createContext(void 0),iBe=()=>_.useContext(IW),XLe=async e=>{const t=await pTe({path:{accountId:e.accountId},body:{messageIds:e.targets.map(r=>r.messageId)}});if(t.data)return t.data;if(!t.response)throw t.error;const n=t.response.status;if(n===401)return"SignedOut";if(n===403)return z8(e,"NotPermitted");if(n===404)return z8(e,"NotFound");throw new Ah(`Check again failed with ${n}`,n,t.error)};function JLe({children:e}){const t=ia(),{pushError:n}=yW(),[r,o]=_.useState(void 0),[s,a]=_.useState(new Set),[c,u]=_.useState(new Map),f=_.useRef(!1),h=_.useRef(!1),m=_.useCallback(x=>{gW(t,mW(x.map(I=>I.mailboxId)));for(const I of new Set(x.map(R=>R.threadId)))I&&t.invalidateQueries({queryKey:fq({path:{threadId:I}})})},[t]),g=_.useCallback(async(x,I)=>{const R=x.length;let M={summary:ZLe,failures:[]},D=0;I&&o({state:"Running",checked:D,total:R});for(const T of KLe(x)){if(h.current)break;a(new Set(T.targets.map($=>$.messageId)));const L=await XLe(T);if(L==="SignedOut"){db(),a(new Set);return}M=QLe(M,T,L),D+=T.targets.length,u($=>{const G=new Map($);for(const z of L.successful)G.delete(z.messageId);for(const z of L.failed)G.set(z.messageId,z.code);return G}),I&&o({state:"Running",checked:D,total:R})}if(a(new Set),m(x),h.current){o(void 0);return}if(!I){for(const T of M.failures)n({title:"Couldn't check this message again",detail:`${T.subject}: ${Ez[T.code]}`});return}if(M.failures.length===0){o({state:"Done",total:R,summary:M.summary});return}const N=new Set(M.failures.filter(T=>T.retryable).map(T=>T.messageId));o({state:"PartialFailure",checked:D,total:R,failures:M.failures,retry:x.filter(T=>N.has(T.messageId))})},[n,m]),v=_.useCallback((x,I)=>{if(x.length!==0){if(f.current){n({severity:"info",title:"Check again is already running",detail:"Wait for the run in progress to finish, or stop it."});return}f.current=!0,h.current=!1,g(x,I).catch(R=>{a(new Set),o(void 0),fb(R)}).finally(()=>{f.current=!1})}},[g,n]),C=_.useCallback((x,I)=>{v([...x],I.panel)},[v]),b=_.useMemo(()=>({checkAgain:C,pendingIds:s,failures:c}),[C,s,c]),E=(()=>{if(r)return r.state==="Running"?{...r,onStop:()=>{h.current=!0}}:r.state==="Done"?{...r,onDone:()=>o(void 0)}:{state:"PartialFailure",checked:r.checked,total:r.total,failures:r.failures,reportIssueHref:_W("Check again left messages unchecked",r.failures.map(x=>`${x.messageId}: ${x.code}`).join(", ")),onRetry:()=>v(r.retry,!0),onClose:()=>o(void 0)}})();return O.jsxs(IW.Provider,{value:b,children:[e,E&&O.jsx("div",{className:"pointer-events-none fixed inset-x-3 bottom-3 z-40 flex justify-center",children:O.jsx("div",{className:"pointer-events-auto w-full max-w-md",children:O.jsx(nse,{...E})})})]})}const aBe=(e,t)=>({messageId:e.messageId,accountId:e.accountId,mailboxId:e.mailboxId,threadId:e.threadId,subject:e.subject??"(No subject)",before:GLe(e,t)}),lBe=e=>e.mailboxId&&e.accountId?{messageId:e.id,accountId:e.accountId,mailboxId:e.mailboxId,threadId:e.threadId,subject:e.subject,before:e.spam}:void 0,e4e=600,t4e=300,AW="remit logs",n4e="https://github.com/remit-mail/reader/releases/tag/";function RW(e,t){const n=t?.check.lastCheckedAt;return n!==void 0&&n!==e.since}function r4e(e){const t=wn(e);return`The check could not be requested — ${t===void 0?"the server did not answer":`the server answered ${t}`}. Run \`remit logs backend\` to see why.`}const o4e={checking:"preparing",pulling:"preparing",snapshotting:"preparing",stopping:"restarting",starting:"restarting",verifying:"reconnecting",committing:"reconnecting",rollingBack:"reconnecting",recovering:"reconnecting"};function P2(e){return o4e[e]??"reconnecting"}function TW(e){const t=wn(e);return t===404||t===403||t===401}function _A(e,t){const n=e?.run??null;return n===null||n.outcome!==null||n.runId===t?null:n}function OW(e,t){const n=e?.check;if(n?.status==="ok"&&!(!n.updateAvailable||!n.latestVersion))return{version:n.latestVersion,releasedAt:ry(n.publishedAt)??t,releaseNotesUrl:n.releaseNotesUrl??MW(n.latestVersion),summary:n.summary??""}}function s4e(e){const t=e?.check.schemaVersion,n=e?.currentSchemaVersion;return t===void 0||n===void 0?!1:t>n}function IA(){return e4e+t4e}function AA(e,t){return Math.max(0,Math.floor((t-e)/1e3))}function ry(e){if(!e)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function MW(e){return`${n4e}${e}`}function yh(e,t,n,r,o){return{status:"applying",runId:e,version:t,target:n,phase:r,elapsedSeconds:o}}function i4e(e,t,n){switch(n){case"succeeded":return{status:"succeeded",runId:t.runId,version:t.targetVersion,previousVersion:t.fromVersion,releaseNotesUrl:e.check.releaseNotesUrl??MW(t.targetVersion)};case"rolledBack":return{status:"rolledBack",runId:t.runId,version:t.fromVersion,attemptedVersion:t.targetVersion,reason:t.message,logsCommand:t.logCommand};case"rollbackFailed":return{status:"rollbackFailed",runId:t.runId,attemptedVersion:t.targetVersion,previousVersion:t.fromVersion,reason:t.message,logsCommand:t.logCommand};case"abandoned":return{status:"abandoned",runId:t.runId,version:t.fromVersion,attemptedVersion:t.targetVersion,reason:t.message,logsCommand:t.logCommand};default:return n}}function a4e(e,t,n,r){const o=e.check,s=ry(o.lastCheckedAt);if(n!==null)return{status:"checkFailed",version:e.currentVersion,reason:n,lastCheckedAt:s};if(t!==null&&!RW(t,e))return{status:"checking",version:e.currentVersion};if(o.status==="failed")return{status:"checkFailed",version:e.currentVersion,reason:o.error??"Remit could not reach the update service.",lastCheckedAt:s};if(o.status==="disabled")return{status:"neverChecked",version:e.currentVersion,lastCheckedAt:s};const a=OW(e,r);return a?{status:"available",version:e.currentVersion,release:a}:{status:"upToDate",version:e.currentVersion,checkedAt:ry(o.lastCheckedAt)??r}}function j8(e,t,n){return{surface:{status:"ready",section:e,overlay:t},releaseHeld:n}}function PW(e,t,n,r){return{status:"ready",section:yh(e,t,n,"reconnecting",r),overlay:{kind:"applying",target:n,phase:"reconnecting",elapsedSeconds:r}}}function NW(e,t,n,r,o){return{status:"ready",section:yh(e,t,n,"reconnecting",r),overlay:{kind:"neverCameBack",attemptedVersion:n,previousVersion:t,elapsedSeconds:r,logsCommand:o}}}function l4e(e,t){return{surface:NW(e.runId,e.previousVersion,e.attemptedVersion,t,AW),releaseHeld:!1}}function c4e(e,t,n,r,o){const s=AA(e.startedAt,o),a=t?.currentVersion??e.previousVersion,c=!r&&n!==null&&n.runId===e.runId;if(c&&n!==null&&n.outcome!==null)return null;if(c&&n!==null){const u=P2(n.phase);return j8(yh(n.runId,a,n.targetVersion,u,s),{kind:"applying",target:n.targetVersion,phase:u,elapsedSeconds:s},!1)}return r?s>IA()?l4e(e,s):{surface:PW(e.runId,e.previousVersion,e.attemptedVersion,s),releaseHeld:!1}:t===void 0?{surface:{status:"loading"},releaseHeld:!1}:s>IA()?{surface:{status:"ready",section:{status:"unreachable",runId:e.runId,previousVersion:e.previousVersion,attemptedVersion:e.attemptedVersion,elapsedSeconds:s,logsCommand:n?.logCommand??AW},overlay:{kind:"none"}},releaseHeld:!0}:j8(yh(e.runId,a,e.attemptedVersion,e.phase,s),{kind:"applying",target:e.attemptedVersion,phase:e.phase,elapsedSeconds:s},!1)}function B8(e){const{data:t,isError:n,dismissedRunId:r,checkPress:o,checkFailure:s,sighting:a,now:c}=e;if(n){const h=_A(t,r);if(h!==null){const m=a!==null&&a.runId===h.runId?a.observedAt:c,g=AA(m,c);return g>IA()?NW(h.runId,h.fromVersion,h.targetVersion,g,h.logCommand):PW(h.runId,h.fromVersion,h.targetVersion,g)}return{status:"ready",section:{status:"checkFailed",version:t?.currentVersion??"the current version",reason:"Remit could not reach the update service."},overlay:{kind:"none"}}}if(!t)return{status:"loading"};const u=t.run,f=u!==null&&r!==null&&u.runId===r;if(u!==null&&!f&&u.outcome!==null)return{status:"ready",section:i4e(t,u,u.outcome),overlay:{kind:"none"}};if(u!==null&&!f&&u.outcome===null){const h=AA(ry(u.startedAt)??c,c),m=P2(u.phase);return{status:"ready",section:yh(u.runId,u.fromVersion,u.targetVersion,m,h),overlay:{kind:"applying",target:u.targetVersion,phase:m,elapsedSeconds:h}}}return{status:"ready",section:a4e(t,o,s,c),overlay:{kind:"none"}}}function u4e(e){const{data:t,isError:n,error:r,held:o,now:s}=e,a=t?.run??null;if(TW(r)&&!o)return{surface:{status:"absent"},releaseHeld:!0};if(o){const c=c4e(o,t,a,n,s);return c||{surface:B8(e),releaseHeld:!0}}return{surface:B8(e),releaseHeld:!1}}const d4e=3e4,f4e=5e3,h4e=aR,p4e={...aR,...Iie},m4e=3e4,g4e="The updater did not answer. Run `remit logs updater` to see why.";function v4e(e,t,n,r){if(TW(e)&&!n)return!1;const o=t!==null&&t.outcome===null;return n||o||r?f4e:d4e}function y4e(){const e=ia(),[t,n]=_.useState(null),[r,o]=_.useState(null),[s,a]=_.useState(null),[c,u]=_.useState(null),[f,h]=_.useState(null),m=_.useRef(t);m.current=t;const g=_.useRef(s);g.current=s;const v=e.getQueryData(hA()),C=t!==null||_A(v,r)!==null,b=fl({...J2e(),retry:!1,meta:C?p4e:h4e,refetchInterval:F=>v4e(F.state.error,F.state.data?.run??null,m.current!==null,g.current!==null)}),E=_.useRef(b.data);E.current=b.data;const x=u4e({data:b.data,isError:b.isError,error:b.error,held:t,dismissedRunId:r,checkPress:s,checkFailure:c,sighting:f,now:Date.now()}),I=_A(b.data,r);_.useEffect(()=>{if(I===null){h(F=>F===null?F:null);return}h(F=>F!==null&&F.runId===I.runId?F:{runId:I.runId,observedAt:Date.now()})},[I]);const R=_.useRef(null);R.current=x.surface.status==="ready"&&"runId"in x.surface.section?x.surface.section.runId:null;const{releaseHeld:M}=x;_.useEffect(()=>{M&&n(F=>F===null?F:null)},[M]),_.useEffect(()=>{s!==null&&RW(s,b.data)&&a(null)},[s,b.data]),_.useEffect(()=>{if(s===null)return;const F=s.pressedAt+m4e-Date.now(),q=setTimeout(()=>{a(null),u(g4e)},Math.max(0,F));return()=>clearTimeout(q)},[s]);const{refetch:D}=b,N=_.useCallback(()=>{u(null),a({pressedAt:Date.now(),since:E.current?.check.lastCheckedAt}),aq({query:{refresh:!0},throwOnError:!0}).then(()=>{D()}).catch(F=>{fb(F,aR),a(null),u(r4e(F))})},[D]),T=_.useCallback(()=>{D()},[D]),L=cT({...eOe(),meta:{softError:!0},onSuccess:F=>{const q=F.run;q!==null&&(n({runId:q.runId,attemptedVersion:q.targetVersion,previousVersion:q.fromVersion,phase:P2(q.phase),startedAt:Date.now()}),o(null)),e.setQueryData(hA(),F)},onError:()=>{D()}}),{mutate:$}=L,G=_.useCallback(F=>{$({body:{targetVersion:F}})},[$]),z=_.useCallback(()=>{R.current!==null&&o(R.current),n(null),a(null),u(null)},[]);return{surface:x.surface,appliesSchemaMigration:s4e(b.data),currentVersion:b.data?.currentVersion,release:OW(b.data,Date.now()),onCheck:N,install:G,onDismissResult:z,onRetryConnection:T}}const N2=_.createContext(null);function b4e({children:e}){const t=y4e();return _.createElement(N2.Provider,{value:t},e)}function S4e(){const e=_.useContext(N2);if(e===null)throw new Error("useSelfUpdate must be used within a SelfUpdateProvider");return e}function C4e(){return _.useContext(N2)}function w4e(){const{surface:e,onRetryConnection:t}=S4e();if(e.status!=="ready")return null;const{overlay:n}=e;return n.kind==="applying"?O.jsx(cie,{target:n.target,phase:n.phase,elapsedSeconds:n.elapsedSeconds}):n.kind==="neverCameBack"?O.jsx(uie,{attemptedVersion:n.attemptedVersion,previousVersion:n.previousVersion,elapsedSeconds:n.elapsedSeconds,logsCommand:n.logsCommand,onRetryConnection:t}):null}const E4e=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,x4e=({children:e})=>{const[t,n]=_.useState([]),r=_.useCallback(c=>{if(c.error!=null&&$z(c.error))return iu(c.error).correlationId;const u=gLe({...c,action:dLe(c)},E4e(),Date.now());return n(f=>pLe(f,u)),u.id},[]),o=_.useCallback(c=>{n(u=>mLe(u,c))},[]),s=_.useCallback(()=>{n([])},[]),a=_.useMemo(()=>({errors:t,pushError:r,dismissError:o,clearAll:s}),[t,r,o,s]);return O.jsxs(vW.Provider,{value:a,children:[e,O.jsx(ase,{errors:t,onDismiss:o})]})},H8="mt-6 inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-md bg-accent px-4 text-sm font-medium text-accent-fg hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring";function kW(){const[e,t]=_.useState(i1e),{Account:n}=s1e(),r=_.useRef(null);return _.useEffect(()=>a1e(t),[]),wy({id:"signed-out",open:e}),Ey(r,e),e?O.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-canvas/80 p-4 backdrop-blur-sm",children:O.jsxs("div",{ref:r,role:"alertdialog","aria-modal":"true","aria-labelledby":"signed-out-title","aria-describedby":"signed-out-text",tabIndex:-1,className:"w-full max-w-sm rounded-lg border border-line bg-surface p-6 shadow-xl outline-none",children:[O.jsx("h2",{id:"signed-out-title",className:"text-lg font-semibold text-fg",children:"You're signed out"}),O.jsx("p",{id:"signed-out-text",className:"mt-2 text-sm text-fg-muted",children:"The server no longer accepts this session. Sign in again to carry on here; you will come back to this screen."}),O.jsx(n,{fallback:O.jsxs("button",{type:"button",onClick:()=>{gU(),window.location.reload()},className:H8,children:[O.jsx(a3,{className:"size-4","aria-hidden":"true"}),"Sign in"]}),children:({signOut:o})=>O.jsxs("button",{type:"button",onClick:()=>{gU(),o()},className:H8,children:[O.jsx(a3,{className:"size-4","aria-hidden":"true"}),"Sign in"]})})]})}):null}const _4e=({error:e,reset:t,info:n})=>{if(My(e))return db(),O.jsx(kW,{});const r=Ry(e),o=iu(e,{recoverable:r,componentStack:n?.componentStack});return O.jsx(Gz,{fatal:o,onRetry:r?t:void 0})},da=hSe()({component:R4e,errorComponent:_4e}),I4e=()=>{const{t:e}=iq("common",{useSuspense:!1});return O.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-canvas focus:text-fg focus:rounded-md",children:e("accessibility.skipToContent","Skip to main content")})},A4e=({children:e})=>Pu().updateMode==="managed"?e:O.jsxs(b4e,{children:[e,O.jsx(w4e,{})]});function R4e(){return O.jsxs(x4e,{children:[O.jsx(BLe,{children:O.jsx(qLe,{children:O.jsx(JLe,{children:O.jsx(A4e,{children:O.jsxs(iOe,{children:[O.jsx(I4e,{}),O.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:O.jsx(_.Suspense,{fallback:O.jsx(Iy,{}),children:O.jsx(gj,{})})})]})})})})}),O.jsx(Wz,{}),O.jsx(kW,{})]})}const T4e=_e("/")({beforeLoad:()=>{throw _l({to:"/mail/brief"})}}),O4e=Pu().apiUrl;he.setConfig({baseUrl:O4e,fetch:O$});he.interceptors.error.use((e,t)=>e instanceof Ah||!t?e:yie(e,t.status));const M4e=()=>Pe(()=>import("./calendar-CCfPHKaQ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),P4e=_e("/calendar")({loader:({context:{queryClient:e}})=>{e.prefetchQuery(s2())},component:Me(M4e,"component")}),N4e=()=>Pe(()=>import("./import-BRAmXjIS.js"),__vite__mapDeps([14,15,16,17,18,19,20,21,22])),k4e=_e("/import")({component:Me(N4e,"component")}),D4e=de(["match","properties","folder","rule","name","review","run"]),L4e=me("search"),U4e=L4e.optional().catch(void 0),F4e=()=>cb({from:"/mail",select:e=>e.wizardFrom}),$4e=D4e.optional().catch(void 0),z4e=(e,t)=>Nz(e,t)+1,DW=()=>cb({from:"/mail",select:e=>e.wizard}),j4e=()=>{const e=kh();return _.useCallback((t,n)=>{e({to:".",search:r=>({...r,wizard:t,wizardFrom:n})})},[e])},cBe=()=>{const e=DW(),t=j4e(),[n,r]=_.useState("organize"),o=_.useCallback(a=>{r(a),t("match")},[t]),s=_.useCallback(()=>{t("properties","search")},[t]);return{verb:n,start:o,startFromSearch:s,isOpen:e!==void 0}},uBe=e=>{const t=_r(),n=kh(),r=DW(),o=F4e(),s=_.useRef(r!==void 0),a=_.useRef(o),c=_.useRef(void 0);_.useEffect(()=>{c.current=void 0},[r]),_.useEffect(()=>{if(!s.current)return;s.current=!1;const m=a.current;(async()=>(await n({to:".",search:g=>({...g,wizard:void 0,wizardFrom:void 0}),replace:!0}),await n({to:".",search:g=>({...g,wizard:e,wizardFrom:m})})))()},[e,n]);const u=_.useCallback(m=>{m===r||c.current===m||(c.current=m,n({to:".",search:g=>({...g,wizard:m})}))},[n,r]),f=_.useCallback(()=>{t.history.back()},[t]),h=_.useCallback((m,g)=>{t.history.go(-z4e(m,g))},[t]);return{step:r,goToStep:u,goBack:f,closeWizard:h}},qu=U({q:w().optional()}),k2=qu.extend({}),LW=qu.extend({}),UW=qu.extend({}),B4e=qu.extend({}),FW=qu.extend({}),$W=k2,H4e=qu.extend({wizard:$4e,wizardFrom:U4e}),wg=U({body:w().optional()}),dBe=e=>{const{body:t,...n}=e;return n},t0={brief:k2.extend(wg.shape),flagged:LW.extend(wg.shape),mailbox:FW.extend(wg.shape),label:UW.extend(wg.shape)},q4e=new Map;function fBe(e){const t=new Map;for(const n of e){const r=e0(n.folderAppointments);for(const[o,s]of r)t.set(o,{role:s});for(const o of n.mailboxes){const s=r.get(o.mailboxId),a={providerPath:o.fullPath,hierarchyDelimiter:o.hierarchyDelimiter};t.set(o.mailboxId,s?{role:s,...a}:a)}}return t}function hBe(e){const t=[];for(const[n,r]of e)r.role==="junk"&&t.push(n);return t}function pBe(e,t){const n=t[0];if(!e)return n?{mailboxId:n}:{};for(const o of t){const s=e.get(o);if(s&&Lse(s)!==void 0)return{mailboxId:o,folder:s}}if(!n)return{};const r=e.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const V4e=_.createContext(null),mBe=()=>_.useContext(V4e)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:q4e,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onRaiseIntelligence:()=>{}},W4e=()=>Pe(()=>import("./mail-D2zTFQj4.js"),__vite__mapDeps([23,5,4,3,1,2,6,7,8,9,10,11,24,25,26,27,28,29,30,31,32,17,13,33,34,35,36,37,38,39,40,41,42,43,44,45,46])),G4e=_e("/mail")({loader:({context:{queryClient:e}})=>{e.prefetchQuery(s2()),e.prefetchQuery({...tOe(),staleTime:6e4})},component:Me(W4e,"component"),validateSearch:H4e}),K4e=()=>Pe(()=>import("./onboarding-CE1GqVAK.js"),__vite__mapDeps([47,48,15,16,17,18,19,30,10,21,46,49,22])),Z4e=_e("/onboarding")({component:Me(K4e,"component")});function Y4e(){const e=C4e(),t=e?.surface.status==="ready"&&e.surface.section.status==="available";return O.jsx(Cz,{label:t?"Update available":void 0,children:O.jsx(Lre,{className:"size-4"})})}function Q4e(){return fl({...H2e()})}const p_={listed:"Sync warnings",unread:"Warnings could not be read",signedOut:"Session ended"};function X4e(e,t){if(My(t))return p_.signedOut;if(t)return p_.unread;if(e&&((e.entries?.length??0)>0||(e.warnings?.length??0)>0))return p_.listed}function J4e(){const e=Q4e();return X4e(e.data,e.error)}function eUe(){const e=J4e();return O.jsx(Cz,{label:e,children:O.jsx(eR,{className:"size-4"})})}const tUe=Py(403,404),gBe={...Py(403,404,409,429),...Aie},nUe=new Set([Va.SignInDisabled,Va.CallerDisabled]),zW=e=>{if(wn(e)!==403)return!1;const t=Sl(e)?.code;return t!==void 0&&nUe.has(t)},rUe=e=>{if(Oy(e))return"The server could not be reached. Nothing changed. Try again.";const t=Sl(e)?.code;return t===Va.CannotDisableSelf?"You cannot disable your own account, so one account always stays on.":t===Va.StepUpRequired?"The password check did not carry over to the action. Nothing changed. Try again.":t===Va.ForeignOrigin?"The server refused a request from this address. Nothing changed. Open this page from the server's own address.":wn(e)===404?"That account is gone, or this server no longer has a People page. Reload the page.":"Something went wrong on the server. Nothing changed. Try again."},vBe=e=>Oy(e)?"The server could not be reached. Check your connection and try again.":"The server did not answer as expected. Try again.",yBe=e=>{if(wn(e)===401||zW(e))return{kind:"signedOut"};const t=Sl(e)?.code;return t===Va.WrongPassword?{kind:"wrongPassword"}:t===Va.StepUpLocked?{kind:"locked"}:{kind:"failed",reason:rUe(e)}},bBe=(e,t)=>e==="Disable"?{title:`Disable ${t}?`,body:"They are signed out everywhere within 15 minutes and cannot sign in until you enable them again. Their calendar feed links stop working. Their mail stays.",confirmLabel:"Disable",failedTitle:`${t} was not disabled`,destructive:!0}:e==="Enable"?{title:`Enable ${t}?`,body:"They can sign in again with their password. Calendar feed links they shared before stay off; they make new ones in Settings.",confirmLabel:"Enable",failedTitle:`${t} was not enabled`,destructive:!1}:e==="SignOut"?{title:`Sign ${t} out everywhere?`,body:"Every session and connected app of theirs ends within 15 minutes. They can sign in again with their password.",confirmLabel:"Sign out everywhere",failedTitle:`${t} was not signed out`,destructive:!0}:{title:`Reset the password of ${t}?`,body:"Their password stops working at once and they are signed out everywhere. You get a link to give them, which works once, for 24 hours.",confirmLabel:"Make a reset link",failedTitle:`No reset link was made for ${t}`,destructive:!0},SBe=(e,t)=>{const n=wn(t),r=Sl(t)?.code,o=t instanceof Error?t.message:String(t),s=[n??"no response",r,o].filter(a=>a!==void 0&&a!=="").join(" ");return ku(ol({title:`People: ${e}`,errorMessage:`${e}. The server answered: ${s}`}))},oUe=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),CBe=(e,t)=>oUe(new Date(e),t)?"Today":dW(e,"medium"),wBe=(e,t)=>e.map(n=>n.userId===t.userId?t:n),sUe=()=>({...Q2e(),meta:tUe,retry:!1}),iUe=()=>{const e=fl(sUe()),t=e.isError&&zW(e.error);return _.useEffect(()=>{t&&db()},[t]),{...e,unavailable:e.isError&&zz(e.error)}},jW=_.createContext([]),aUe=jW.Provider,lUe=()=>_.useContext(jW),cUe=()=>Pe(()=>import("./settings-CxT_7aK9.js"),[]),uUe=[{id:"accounts",label:"Accounts",icon:O.jsx(G$,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:O.jsx(Dre,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:O.jsx(wre,{className:"size-4"})},{id:"filters",label:"Filters",icon:O.jsx(Ere,{className:"size-4"})},{id:"labels",label:"Labels",icon:O.jsx(Pre,{className:"size-4"})},{id:"classification",label:"Mail classification",icon:O.jsx(Ore,{className:"size-4"})},{id:"spam",label:"Spam & phishing",icon:O.jsx(Tre,{className:"size-4"})},{id:"calendars",label:"Calendars",icon:O.jsx(mre,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:O.jsx(Ire,{className:"size-4"})},{id:"warnings",label:"Warnings",icon:O.jsx(eUe,{})},{id:"advanced",label:"Advanced",icon:O.jsx(Y4e,{})}],dUe={id:"people",label:"People",icon:O.jsx(kre,{className:"size-4"})},EBe=()=>{const e=iUe(),t=lUe(),n=[...uUe];if(n.splice(1,0,...t.map(({id:o,label:s,icon:a})=>({id:o,label:s,icon:a}))),!e.isSuccess)return n;const r=n.findIndex(o=>o.id==="advanced");return[...n.slice(0,r),dUe,...n.slice(r)]},fUe=_e("/settings")({component:Me(cUe,"component")}),hUe=["year","month","week","day","agenda"],pUe=de(hUe),BW="week",xBe=e=>e==="agenda";function mUe(e){const t=pUe.safeParse(e);return t.success?t.data:void 0}const gUe=/^\d{4}-\d{2}-\d{2}$/;function vUe(e){if(!gUe.test(e))return;const[t,n,r]=e.split("-").map(Number),o=Date.UTC(t,n-1,r),s=new Date(o);if(s.getUTCFullYear()===t&&s.getUTCMonth()===n-1&&s.getUTCDate()===r)return e}const wu=e=>String(e).padStart(2,"0");function HW(e){return`${e.getFullYear()}-${wu(e.getMonth()+1)}-${wu(e.getDate())}`}function yUe(e,t){return{view:mUe(e.view)??BW,date:vUe(e.date)??t}}function _Be(e,t,n){const[r,o,s]=e.split("-").map(Number);if(t==="year")return q8(r+n,o,s);if(t==="month")return q8(r,o+n,s);const a=t==="day"?1:7,c=new Date(Date.UTC(r,o-1,s+a*n));return bUe(c)}const bUe=e=>`${e.getUTCFullYear()}-${wu(e.getUTCMonth()+1)}-${wu(e.getUTCDate())}`;function q8(e,t,n){const r=e+Math.floor((t-1)/12),o=((t-1)%12+12)%12+1,s=new Date(Date.UTC(r,o,0)).getUTCDate();return`${r}-${wu(o)}-${wu(Math.min(n,s))}`}const SUe=w().min(1);function CUe(e){const t=e==null?[]:[e].flat(),n=new Set;for(const r of t){if(typeof r!="string"&&typeof r!="number")continue;const o=SUe.safeParse(String(r));o.success&&n.add(o.data)}return[...n].sort()}const D2=U({calendarId:ml().transform(CUe).transform(e=>e.length===0?void 0:e).optional()});function IBe(e,t){return t?e==="week"?"day":e==="year"?"month":e:e}const wUe=_e("/calendar/")({validateSearch:D2,beforeLoad:({search:e,location:t})=>{throw _l({to:"/calendar/$view/$date",params:{view:BW,date:HW(new Date)},search:e,hash:t.hash,replace:!0})}}),EUe=_e("/mail/")({validateSearch:$W,beforeLoad:({search:e,location:t})=>{throw _l({to:"/mail/brief",search:e,hash:t.hash,replace:!0})}}),xUe=()=>Pe(()=>import("./_mailboxId-DXY2xie_.js"),__vite__mapDeps([50,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,51,52,39,38,40,9,53,54,46,55,18,56,57,37,8,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,71,72,35,36,73,74,75,76,77,78])),_Ue=_e("/mail/$mailboxId")({component:Me(xUe,"component"),validateSearch:FW}),IUe=()=>Pe(()=>import("./brief-2yNYS3wf.js"),__vite__mapDeps([79,13])),AUe=()=>Pe(()=>import("./brief-TvSyJ0Hh.js"),__vite__mapDeps([80,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,81,53,54,46,9,39,38,40,55,18,56,57,37,8,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,71,72,73,35,36,82,78])),RUe=_e("/mail/brief")({component:Me(AUe,"component"),validateSearch:k2,errorComponent:Me(IUe,"errorComponent")}),TUe=()=>Pe(()=>import("./flagged-DlXuJV7_.js"),__vite__mapDeps([83,13])),OUe=()=>Pe(()=>import("./flagged-UlACOt4x.js"),__vite__mapDeps([84,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,85,52,39,38,40,9,53,54,46,55,18,56,57,37,8,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,71,72,82,78])),MUe=_e("/mail/flagged")({component:Me(OUe,"component"),validateSearch:LW,errorComponent:Me(TUe,"errorComponent")}),PUe=()=>Pe(()=>import("./outbox-BjrTttbX.js"),__vite__mapDeps([86,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,87,54,46,44,74,41,9,36,68,88,89,78])),NUe=_e("/mail/outbox")({component:Me(PUe,"component"),validateSearch:B4e}),kUe=_e("/reset-password/$token")({beforeLoad:()=>{throw _l({to:"/"})}}),DUe=()=>Pe(()=>import("./index-BNnZBbIV.js"),[]),LUe=_e("/settings/")({component:Me(DUe,"component")}),UUe=()=>Pe(()=>import("./_slotId-DSoyw2sm.js"),__vite__mapDeps([90,4,3,6,91,7,18,92,41,60])),FUe=_e("/settings/$slotId")({component:Me(UUe,"component")}),$Ue=()=>Pe(()=>import("./accounts-C97z1Pd0.js"),__vite__mapDeps([93,48,15,16,17,18,19,30,10,21,46,49,29,94,33,13,58,6,95,91,7,92,41,60,62,88])),zUe=U({editAccountId:w().optional(),focusSmtp:ce().optional(),connected:w().optional(),oauthError:w().optional(),oauthEmail:w().optional(),missingServices:w().optional()}),jUe=_e("/settings/accounts")({component:Me($Ue,"component"),validateSearch:zUe}),BUe=()=>Pe(()=>import("./advanced--29ZYfrn.js"),__vite__mapDeps([96,20,4,3,5,6,19,58,18,21,89,77,97,72,68,75,95,46,91,7,92,41,60])),HUe=_e("/settings/advanced")({component:Me(BUe,"component")}),qUe=()=>Pe(()=>import("./appearance-ZXFz5lao.js"),__vite__mapDeps([98,6,95,46,91,7,18,92,41,60,69])),VUe=_e("/settings/appearance")({component:Me(qUe,"component")}),WUe=()=>Pe(()=>import("./calendars-BFDTOhwb.js"),__vite__mapDeps([99,64,13,38,16,17,19,62,100,31,101,102,25,60,33,18,37,103,6,91,7,92,41])),GUe=_e("/settings/calendars")({component:Me(WUe,"component")}),KUe=()=>Pe(()=>import("./classification-M7vyyYc0.js"),__vite__mapDeps([104,105,13,106,16,17,33,94,18,6,91,7,92,41,60])),ZUe=_e("/settings/classification")({component:Me(KUe,"component")}),YUe=()=>Pe(()=>import("./filters-BixikXOX.js"),__vite__mapDeps([107,13,3,40,61,32,16,17,62,71,69,77,76,18,6,91,7,92,41,60])),QUe=U({filterId:w().optional()}),XUe=_e("/settings/filters")({component:Me(YUe,"component"),validateSearch:QUe}),JUe=()=>Pe(()=>import("./folders-tN5ItNP7.js"),__vite__mapDeps([108,70,43,6,91,7,18,92,41,60,13,16,17,25])),e6e=_e("/settings/folders")({component:Me(JUe,"component")}),t6e=()=>Pe(()=>import("./labels-BHUDM5JS.js"),__vite__mapDeps([109,71,40,16,17,6,91,7,18,92,41,60,13,33])),n6e=_e("/settings/labels")({component:Me(t6e,"component")}),r6e=()=>Pe(()=>import("./people-lwS7SzAR.js"),__vite__mapDeps([110,106,103,57,6,91,7,18,92,41,60])),o6e=_e("/settings/people")({component:Me(r6e,"component")}),s6e=["vip","muted","blocked","neverSpam"],i6e=()=>Pe(()=>import("./senders-BPxxJ0j1.js"),__vite__mapDeps([111,31,6,95,46,13,91,7,18,92,41,60])),a6e=U({group:de(s6e).optional()}),l6e=_e("/settings/senders")({component:Me(i6e,"component"),validateSearch:a6e}),c6e=()=>Pe(()=>import("./spam-ZsXuaYs-.js"),__vite__mapDeps([112,105,55,40,4,3,5,71,13,69,6,91,7,18,92,41,60])),u6e=_e("/settings/spam")({component:Me(c6e,"component")}),d6e=()=>Pe(()=>import("./suggested-vips-CSjON5_8.js"),[]),f6e=_e("/settings/suggested-vips")({component:Me(d6e,"component")}),h6e=()=>Pe(()=>import("./warnings-BaDRsN2r.js"),__vite__mapDeps([113,42,38,18,77,103,97,13,6,95,46,91,7,92,41,60])),p6e=_e("/settings/warnings")({component:Me(h6e,"component")}),m6e=()=>Pe(()=>import("./_view._date-hcmgBm1_.js"),__vite__mapDeps([114,64,13,38,100,31,115,116,4,3,5,12,63,65,10,62,66,68,117,45,17,92,118,119,101,102,25,60,120,67,16,41,2,121])),g6e=_e("/calendar/$view/$date")({validateSearch:D2,beforeLoad:({params:e,search:t,location:n})=>{const r=yUe(e,HW(new Date));if(!(r.view===e.view&&r.date===e.date))throw _l({to:"/calendar/$view/$date",params:r,search:t,hash:n.hash,replace:!0})},component:Me(m6e,"component")}),v6e=()=>Pe(()=>import("./index-CUf1A0fN.js"),__vite__mapDeps([122,51,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,35,36,73,74,75,76,77])),y6e=_e("/mail/$mailboxId/")({component:Me(v6e,"component")}),b6e=()=>Pe(()=>import("./_threadId-CWcvebi1.js"),[]),S6e=_e("/mail/$mailboxId/$threadId")({component:Me(b6e,"component")}),C6e=()=>Pe(()=>import("./index-CbjCUjyM.js"),__vite__mapDeps([123,81,53,54,46,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,73,35,36,82])),w6e=_e("/mail/brief/")({component:Me(C6e,"component")}),E6e=()=>Pe(()=>import("./_threadId-DhAQNmCG.js"),[]),x6e=_e("/mail/brief/$threadId")({component:Me(E6e,"component")}),_6e=()=>Pe(()=>import("./index-CisM5xYX.js"),__vite__mapDeps([124,85,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,82])),I6e=_e("/mail/flagged/")({component:Me(_6e,"component")}),A6e=()=>Pe(()=>import("./_threadId-D1KeSzSU.js"),[]),R6e=_e("/mail/flagged/$threadId")({component:Me(A6e,"component")}),T6e=_e("/mail/label/")({validateSearch:$W,beforeLoad:({search:e,location:t})=>{throw _l({to:"/mail/brief",search:e,hash:t.hash,replace:!0})}}),O6e=()=>Pe(()=>import("./_labelId-Cl0mm0aS.js"),__vite__mapDeps([125,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,85,52,39,38,40,9,53,54,46,55,18,56,57,37,8,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,71,72,82,78])),M6e=_e("/mail/label/$labelId")({component:Me(O6e,"component"),validateSearch:UW}),P6e=()=>Pe(()=>import("./index-BhPUwC8f.js"),__vite__mapDeps([126,87,54,46,34,11,4,3,5,24,44,74,41,9,36,68,88,89])),N6e=_e("/mail/outbox/")({component:Me(P6e,"component")}),k6e=()=>Pe(()=>import("./index-DtqBFgK5.js"),[]),D6e=_e("/calendar/$view/$date/")({component:Me(k6e,"component")}),L6e=()=>Pe(()=>import("./_calendarObjectId-D-xdcBhY.js"),[]),U6e=_e("/calendar/$view/$date/$calendarObjectId")({component:Me(L6e,"component")}),Fs=e=>String(e).padStart(2,"0"),qW=e=>`${e.getUTCFullYear()}-${Fs(e.getUTCMonth()+1)}-${Fs(e.getUTCDate())}`,L2=e=>{const t=e<0?"-":"+",n=Math.abs(e);return`${t}${Fs(Math.floor(n/60))}:${Fs(n%60)}`};function VW(e,t){const n=new Date(`${e}T${t}:00`);return`${e}T${t}:00${L2(-n.getTimezoneOffset())}`}const m_=new Map;function F6e(e){if(m_.has(e))return m_.get(e);let t;try{t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{t=void 0}return m_.set(e,t),t}function RA(e,t){const n=F6e(e);if(!n)return Number.NaN;const r=n.formatToParts(new Date(t)),o=c=>Number(r.find(u=>u.type===c)?.value),s=o("hour")%24;return(Date.UTC(o("year"),o("month")-1,o("day"),s,o("minute"),o("second"))-t)/6e4}function V8(e,t,n){if(n==="")return`${e}T${t}:00+00:00`;const r=Date.parse(`${e}T${t}:00Z`),o=RA(n,r);if(Number.isNaN(o))return VW(e,t);const s=RA(n,r-o*6e4);return`${e}T${t}:00${L2(Number.isNaN(s)?o:s)}`}function W8(e,t){const n=Date.parse(e),r=RA(t,n),o=Number.isNaN(r)?-new Date(n).getTimezoneOffset():r,s=new Date(n+o*6e4);return`${qW(s)}T${Fs(s.getUTCHours())}:${Fs(s.getUTCMinutes())}:${Fs(s.getUTCSeconds())}${L2(o)}`}const oy=e=>VW(e,"00:00");function Hi(e,t){const[n,r,o]=e.split("-").map(Number);return qW(new Date(Date.UTC(n,r-1,o+t)))}function g_(e){const[t,n,r]=e.split("-").map(Number),o=new Date(Date.UTC(t,n-1,r));return Hi(e,-((o.getUTCDay()+6)%7))}function $6e(e,t){const[n,r]=t.split("-").map(Number);if(e==="year")return[`${n}-01-01`,`${n+1}-01-01`];if(e==="month"){const s=`${n}-${Fs(r)}-01`,a=r===12?`${n+1}-01-01`:`${n}-${Fs(r+1)}-01`;return[g_(s),Hi(g_(Hi(a,-1)),7)]}if(e==="day")return[t,Hi(t,1)];const o=g_(t);return[o,Hi(o,7)]}function ABe(e,t){const[n,r]=$6e(e,t);return{from:oy(n),to:oy(r)}}function RBe(e,t){return{from:oy(e),to:oy(Hi(e,t))}}const z6e=U3e({offset:!0,local:!1}),WW=F3e(),G8=ml().transform(e=>{const t=Ge([z6e,WW]).safeParse(e);return t.success?t.data:void 0}).optional(),j6e=D2.extend({start:G8,end:G8}),Eg=e=>WW.safeParse(e).success;function xg(e){return{date:e,endDate:e,startTime:"09:00",endTime:"10:00",allDay:!1}}function TBe(e,t,n,r){if(e===void 0||t===void 0)return xg(n);if(Eg(e)&&Eg(t)){const a=Hi(t,-1);return a<e?xg(n):{date:e,endDate:a,startTime:"",endTime:"",allDay:!0}}if(Eg(e)||Eg(t)||Date.parse(t)<=Date.parse(e))return xg(n);const o=W8(e,r),s=W8(t,r);return{date:o.slice(0,10),endDate:s.slice(0,10),startTime:o.slice(11,16),endTime:s.slice(11,16),allDay:!1}}function OBe(e,t){return e.allDay?{start:e.date,end:Hi(e.endDate,1)}:{start:V8(e.date,e.startTime,t),end:V8(e.endDate,e.endTime,t)}}const B6e=()=>Pe(()=>import("./new-UOrJpTbz.js"),__vite__mapDeps([127,128,119,65,101,102,64,13,38,25,60,116,115,100,31,66,4,3,12,5,118,120,129,16,17,33])),H6e=_e("/calendar/$view/$date/new")({validateSearch:j6e,component:Me(B6e,"component")}),q6e=()=>Pe(()=>import("./index-DFaozp7e.js"),__vite__mapDeps([130,51,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,35,36,73,74,75,76,77])),V6e=_e("/mail/$mailboxId/$threadId/")({component:Me(q6e,"component")}),W6e=()=>Pe(()=>import("./_messageId-DM4J2nkn.js"),__vite__mapDeps([131,51,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,35,36,73,74,75,76,77])),G6e=_e("/mail/$mailboxId/$threadId/$messageId")({component:Me(W6e,"component")}),K6e=()=>Pe(()=>import("./compose._-_outboxMessageId_-CUUUaKzp.js"),__vite__mapDeps([132,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),Z6e=_e("/mail/$mailboxId/compose/{-$outboxMessageId}")({component:Me(K6e,"component")}),Y6e=()=>Pe(()=>import("./index-CpLDLwG4.js"),__vite__mapDeps([133,81,53,54,46,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,73,35,36,82])),Q6e=_e("/mail/brief/$threadId/")({component:Me(Y6e,"component")}),X6e=()=>Pe(()=>import("./_messageId-CpLDLwG4.js"),__vite__mapDeps([134,81,53,54,46,34,11,4,3,5,24,9,17,39,38,40,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,73,35,36,82])),J6e=_e("/mail/brief/$threadId/$messageId")({component:Me(X6e,"component")}),e8e=()=>Pe(()=>import("./compose._-_outboxMessageId_-txkeSl3z.js"),__vite__mapDeps([135,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),t8e=_e("/mail/brief/compose/{-$outboxMessageId}")({component:Me(e8e,"component")}),n8e=()=>Pe(()=>import("./index-Chdoahsq.js"),__vite__mapDeps([136,85,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,82])),r8e=_e("/mail/flagged/$threadId/")({component:Me(n8e,"component")}),o8e=()=>Pe(()=>import("./_messageId-C7RYu8D4.js"),__vite__mapDeps([137,85,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,82])),s8e=_e("/mail/flagged/$threadId/$messageId")({component:Me(o8e,"component")}),i8e=()=>Pe(()=>import("./compose._-_outboxMessageId_-C4UqzqsB.js"),__vite__mapDeps([138,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),a8e=_e("/mail/flagged/compose/{-$outboxMessageId}")({component:Me(i8e,"component")}),l8e=()=>Pe(()=>import("./index-0F6D1QL4.js"),__vite__mapDeps([139,85,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,82])),c8e=_e("/mail/label/$labelId/")({component:Me(l8e,"component")}),u8e=()=>Pe(()=>import("./_threadId-rafiyWr7.js"),[]),d8e=_e("/mail/label/$labelId/$threadId")({component:Me(u8e,"component")}),f8e=()=>Pe(()=>import("./compose._-_outboxMessageId_-D3ZrtXb-.js"),__vite__mapDeps([140,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),h8e=_e("/mail/outbox/compose/{-$outboxMessageId}")({component:Me(f8e,"component")}),p8e=()=>Pe(()=>import("./_outboxMessageId-DbphUtGt.js"),__vite__mapDeps([141,87,54,46,34,11,4,3,5,24,44,74,41,9,36,68,88,89])),m8e=_e("/mail/outbox/draft/$outboxMessageId")({component:Me(p8e,"component")}),g8e=()=>Pe(()=>import("./index-UJSPAbyu.js"),__vite__mapDeps([142,143,64,13,38,116,115,66,4,3,12,5,120,102,25,101,60,33])),v8e=_e("/calendar/$view/$date/$calendarObjectId/")({component:Me(g8e,"component")}),y8e=()=>Pe(()=>import("./_recurrenceId-B_wIJyrZ.js"),[]),b8e=_e("/calendar/$view/$date/$calendarObjectId/$recurrenceId")({component:Me(y8e,"component")}),S8e=()=>Pe(()=>import("./edit-AeV5d7Q9.js"),__vite__mapDeps([144,128,119,65,101,102,64,13,38,25,60,116,115,100,31,66,4,3,12,5,118,120,129,16,17,33])),C8e=_e("/calendar/$view/$date/$calendarObjectId/edit")({component:Me(S8e,"component")}),w8e=()=>Pe(()=>import("./suggestion._suggestionId-DuDQGf01.js"),__vite__mapDeps([145,64,13,38,119,65,101,102,25,60,66,120,67,59,129,16,17,4,3,12,5])),E8e=_e("/calendar/$view/$date/suggestion/$suggestionId")({component:Me(w8e,"component")}),x8e=()=>Pe(()=>import("./task._calendarTaskId-Ckwunqac.js"),__vite__mapDeps([146,64,13,38,115,4,3,12,5,117,102,25])),_8e=_e("/calendar/$view/$date/task/$calendarTaskId")({component:Me(x8e,"component")}),I8e=()=>Pe(()=>import("./index-BeKthChA.js"),__vite__mapDeps([147,85,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,82])),A8e=_e("/mail/label/$labelId/$threadId/")({component:Me(I8e,"component")}),R8e=()=>Pe(()=>import("./_messageId-1xfg9JRz.js"),__vite__mapDeps([148,85,52,39,5,4,3,34,11,38,40,9,53,54,46,24,17,28,29,30,31,32,6,55,18,56,57,37,8,13,10,58,7,59,60,61,16,62,63,64,65,66,12,67,49,68,69,2,41,70,33,71,72,82])),T8e=_e("/mail/label/$labelId/$threadId/$messageId")({component:Me(R8e,"component")}),O8e=()=>Pe(()=>import("./compose._-_outboxMessageId_-CSUyyPsf.js"),__vite__mapDeps([149,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),M8e=_e("/mail/label/$labelId/compose/{-$outboxMessageId}")({component:Me(O8e,"component")}),P8e=()=>Pe(()=>import("./index-D-qIc_Ph.js"),__vite__mapDeps([150,143,64,13,38,116,115,66,4,3,12,5,120,102,25,101,60,33])),N8e=_e("/calendar/$view/$date/$calendarObjectId/$recurrenceId/")({component:Me(P8e,"component")}),k8e=()=>Pe(()=>import("./edit-C9IrXIRT.js"),__vite__mapDeps([151,128,119,65,101,102,64,13,38,25,60,116,115,100,31,66,4,3,12,5,118,120,129,16,17,33])),D8e=_e("/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit")({component:Me(k8e,"component")}),L8e=_e("/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:t0.mailbox}),U8e=_e("/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:t0.brief}),F8e=_e("/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:t0.flagged}),$8e=_e("/mail/label/$labelId/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:t0.label}),z8e=T4e.update({id:"/",path:"/",getParentRoute:()=>da}),U2=P4e.update({id:"/calendar",path:"/calendar",getParentRoute:()=>da}),j8e=k4e.update({id:"/import",path:"/import",getParentRoute:()=>da}),fa=G4e.update({id:"/mail",path:"/mail",getParentRoute:()=>da}),B8e=Z4e.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>da}),Jn=fUe.update({id:"/settings",path:"/settings",getParentRoute:()=>da}),H8e=wUe.update({id:"/",path:"/",getParentRoute:()=>U2}),q8e=EUe.update({id:"/",path:"/",getParentRoute:()=>fa}),n0=_Ue.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>fa}),r0=RUe.update({id:"/brief",path:"/brief",getParentRoute:()=>fa}),o0=MUe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>fa}),s0=NUe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>fa}),V8e=kUe.update({id:"/reset-password/$token",path:"/reset-password/$token",getParentRoute:()=>da}),W8e=LUe.update({id:"/",path:"/",getParentRoute:()=>Jn}),G8e=FUe.update({id:"/$slotId",path:"/$slotId",getParentRoute:()=>Jn}),K8e=jUe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Jn}),Z8e=HUe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Jn}),Y8e=VUe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Jn}),Q8e=GUe.update({id:"/calendars",path:"/calendars",getParentRoute:()=>Jn}),X8e=ZUe.update({id:"/classification",path:"/classification",getParentRoute:()=>Jn}),J8e=XUe.update({id:"/filters",path:"/filters",getParentRoute:()=>Jn}),eFe=e6e.update({id:"/folders",path:"/folders",getParentRoute:()=>Jn}),tFe=n6e.update({id:"/labels",path:"/labels",getParentRoute:()=>Jn}),nFe=o6e.update({id:"/people",path:"/people",getParentRoute:()=>Jn}),rFe=l6e.update({id:"/senders",path:"/senders",getParentRoute:()=>Jn}),oFe=u6e.update({id:"/spam",path:"/spam",getParentRoute:()=>Jn}),sFe=f6e.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Jn}),iFe=p6e.update({id:"/warnings",path:"/warnings",getParentRoute:()=>Jn}),Vu=g6e.update({id:"/$view/$date",path:"/$view/$date",getParentRoute:()=>U2}),aFe=y6e.update({id:"/",path:"/",getParentRoute:()=>n0}),F2=S6e.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>n0}),lFe=w6e.update({id:"/",path:"/",getParentRoute:()=>r0}),$2=x6e.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>r0}),cFe=I6e.update({id:"/",path:"/",getParentRoute:()=>o0}),z2=R6e.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>o0}),uFe=T6e.update({id:"/label/",path:"/label/",getParentRoute:()=>fa}),i0=M6e.update({id:"/label/$labelId",path:"/label/$labelId",getParentRoute:()=>fa}),dFe=N6e.update({id:"/",path:"/",getParentRoute:()=>s0}),fFe=D6e.update({id:"/",path:"/",getParentRoute:()=>Vu}),a0=U6e.update({id:"/$calendarObjectId",path:"/$calendarObjectId",getParentRoute:()=>Vu}),hFe=H6e.update({id:"/new",path:"/new",getParentRoute:()=>Vu}),pFe=V6e.update({id:"/",path:"/",getParentRoute:()=>F2}),GW=G6e.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>F2}),mFe=Z6e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>n0}),gFe=Q6e.update({id:"/",path:"/",getParentRoute:()=>$2}),KW=J6e.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>$2}),vFe=t8e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>r0}),yFe=r8e.update({id:"/",path:"/",getParentRoute:()=>z2}),ZW=s8e.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>z2}),bFe=a8e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>o0}),SFe=c8e.update({id:"/",path:"/",getParentRoute:()=>i0}),j2=d8e.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>i0}),CFe=h8e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>s0}),wFe=m8e.update({id:"/draft/$outboxMessageId",path:"/draft/$outboxMessageId",getParentRoute:()=>s0}),EFe=v8e.update({id:"/",path:"/",getParentRoute:()=>a0}),B2=b8e.update({id:"/$recurrenceId",path:"/$recurrenceId",getParentRoute:()=>a0}),xFe=C8e.update({id:"/edit",path:"/edit",getParentRoute:()=>a0}),_Fe=E8e.update({id:"/suggestion/$suggestionId",path:"/suggestion/$suggestionId",getParentRoute:()=>Vu}),IFe=_8e.update({id:"/task/$calendarTaskId",path:"/task/$calendarTaskId",getParentRoute:()=>Vu}),AFe=A8e.update({id:"/",path:"/",getParentRoute:()=>j2}),YW=T8e.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>j2}),RFe=M8e.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>i0}),TFe=N8e.update({id:"/",path:"/",getParentRoute:()=>B2}),OFe=D8e.update({id:"/edit",path:"/edit",getParentRoute:()=>B2}),MFe=L8e.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>GW}),PFe=U8e.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>KW}),NFe=F8e.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>ZW}),kFe=$8e.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>YW}),DFe={CalendarViewDateCalendarObjectIdRecurrenceIdEditRoute:OFe,CalendarViewDateCalendarObjectIdRecurrenceIdIndexRoute:TFe},LFe=B2._addFileChildren(DFe),UFe={CalendarViewDateCalendarObjectIdRecurrenceIdRoute:LFe,CalendarViewDateCalendarObjectIdEditRoute:xFe,CalendarViewDateCalendarObjectIdIndexRoute:EFe},FFe=a0._addFileChildren(UFe),$Fe={CalendarViewDateCalendarObjectIdRoute:FFe,CalendarViewDateNewRoute:hFe,CalendarViewDateIndexRoute:fFe,CalendarViewDateSuggestionSuggestionIdRoute:_Fe,CalendarViewDateTaskCalendarTaskIdRoute:IFe},zFe=Vu._addFileChildren($Fe),jFe={CalendarIndexRoute:H8e,CalendarViewDateRoute:zFe},BFe=U2._addFileChildren(jFe),HFe={MailMailboxIdThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:MFe},qFe=GW._addFileChildren(HFe),VFe={MailMailboxIdThreadIdMessageIdRoute:qFe,MailMailboxIdThreadIdIndexRoute:pFe},WFe=F2._addFileChildren(VFe),GFe={MailMailboxIdThreadIdRoute:WFe,MailMailboxIdIndexRoute:aFe,MailMailboxIdComposeChar123OutboxMessageIdChar125Route:mFe},KFe=n0._addFileChildren(GFe),ZFe={MailBriefThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:PFe},YFe=KW._addFileChildren(ZFe),QFe={MailBriefThreadIdMessageIdRoute:YFe,MailBriefThreadIdIndexRoute:gFe},XFe=$2._addFileChildren(QFe),JFe={MailBriefThreadIdRoute:XFe,MailBriefIndexRoute:lFe,MailBriefComposeChar123OutboxMessageIdChar125Route:vFe},e$e=r0._addFileChildren(JFe),t$e={MailFlaggedThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:NFe},n$e=ZW._addFileChildren(t$e),r$e={MailFlaggedThreadIdMessageIdRoute:n$e,MailFlaggedThreadIdIndexRoute:yFe},o$e=z2._addFileChildren(r$e),s$e={MailFlaggedThreadIdRoute:o$e,MailFlaggedIndexRoute:cFe,MailFlaggedComposeChar123OutboxMessageIdChar125Route:bFe},i$e=o0._addFileChildren(s$e),a$e={MailOutboxIndexRoute:dFe,MailOutboxComposeChar123OutboxMessageIdChar125Route:CFe,MailOutboxDraftOutboxMessageIdRoute:wFe},l$e=s0._addFileChildren(a$e),c$e={MailLabelLabelIdThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:kFe},u$e=YW._addFileChildren(c$e),d$e={MailLabelLabelIdThreadIdMessageIdRoute:u$e,MailLabelLabelIdThreadIdIndexRoute:AFe},f$e=j2._addFileChildren(d$e),h$e={MailLabelLabelIdThreadIdRoute:f$e,MailLabelLabelIdIndexRoute:SFe,MailLabelLabelIdComposeChar123OutboxMessageIdChar125Route:RFe},p$e=i0._addFileChildren(h$e),m$e={MailMailboxIdRoute:KFe,MailBriefRoute:e$e,MailFlaggedRoute:i$e,MailOutboxRoute:l$e,MailIndexRoute:q8e,MailLabelLabelIdRoute:p$e,MailLabelIndexRoute:uFe},g$e=fa._addFileChildren(m$e),v$e={SettingsSlotIdRoute:G8e,SettingsAccountsRoute:K8e,SettingsAdvancedRoute:Z8e,SettingsAppearanceRoute:Y8e,SettingsCalendarsRoute:Q8e,SettingsClassificationRoute:X8e,SettingsFiltersRoute:J8e,SettingsFoldersRoute:eFe,SettingsLabelsRoute:tFe,SettingsPeopleRoute:nFe,SettingsSendersRoute:rFe,SettingsSpamRoute:oFe,SettingsSuggestedVipsRoute:sFe,SettingsWarningsRoute:iFe,SettingsIndexRoute:W8e},y$e=Jn._addFileChildren(v$e),b$e={IndexRoute:z8e,CalendarRoute:BFe,ImportRoute:j8e,MailRoute:g$e,OnboardingRoute:B8e,SettingsRoute:y$e,ResetPasswordTokenRoute:V8e},S$e=da._addFileChildren(b$e)._addFileTypes(),C$e=(e,t,n)=>{const r=TSe({routeTree:S$e,context:{queryClient:e},history:n,stringifySearch:DRe,defaultPreload:"intent",defaultPendingComponent:Iy,defaultPendingMs:200,defaultPendingMinMs:300});return r.subscribe("onResolved",o=>{t.recordPageView(o.toLocation.pathname),Bie(o.toLocation.pathname)}),r},Be=e=>typeof e=="string",uf=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},K8=e=>e==null?"":""+e,w$e=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},E$e=/###/g,Z8=e=>e&&e.indexOf("###")>-1?e.replace(E$e,"."):e,Y8=e=>!e||Be(e),Ff=(e,t,n)=>{const r=Be(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(Y8(e))return{};const s=Z8(r[o]);!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++o}return Y8(e)?{}:{obj:e,k:Z8(r[o])}},Q8=(e,t,n)=>{const{obj:r,k:o}=Ff(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let s=t[t.length-1],a=t.slice(0,t.length-1),c=Ff(e,a,Object);for(;c.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),c=Ff(e,a,Object),c?.obj&&typeof c.obj[`${c.k}.${s}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${s}`]=n},x$e=(e,t,n,r)=>{const{obj:o,k:s}=Ff(e,t,Object);o[s]=o[s]||[],o[s].push(n)},sy=(e,t)=>{const{obj:n,k:r}=Ff(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},_$e=(e,t,n)=>{const r=sy(e,n);return r!==void 0?r:sy(t,n)},QW=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Be(e[r])||e[r]instanceof String||Be(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):QW(e[r],t[r],n):e[r]=t[r]);return e},Rc=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var I$e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const A$e=e=>Be(e)?e.replace(/[&<>"'\/]/g,t=>I$e[t]):e;class R$e{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const T$e=[" ",",","?","!",";"],O$e=new R$e(20),M$e=(e,t,n)=>{t=t||"",n=n||"";const r=T$e.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=O$e.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!o.test(e);if(!s){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(s=!0)}return s},TA=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let s=0;s<r.length;){if(!o||typeof o!="object")return;let a,c="";for(let u=s;u<r.length;++u)if(u!==s&&(c+=n),c+=r[u],a=o[c],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&u<r.length-1)continue;s+=u-s+1;break}o=a}return o},iy=e=>e?.replace("_","-"),P$e={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class ay{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||P$e,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(Be(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new ay(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ay(this.logger,t)}}var Wo=new ay;class l0{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(a=>{let[c,u]=a;for(let f=0;f<u;f++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[c,u]=a;for(let f=0;f<u;f++)c.apply(c,[t,...r])})}}class X8 extends l0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):Be(r)&&s?c.push(...r.split(s)):c.push(r)));const u=sy(this.data,c);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),u||!a||!Be(r)?u:TA(this.data?.[t]?.[n],r,s)}addResource(t,n,r,o){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(c=t.split("."),o=n,n=c[1]),this.addNamespaces(n),Q8(this.data,c,o),s.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in r)(Be(r[s])||Array.isArray(r[s]))&&this.addResource(t,n,s,r[s],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),o=r,r=n,n=c[1]),this.addNamespaces(n);let u=sy(this.data,c)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?QW(u,r,s):u={...u,...r},Q8(this.data,c,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var XW={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(s=>{t=this.processors[s]?.process(t,n,r,o)??t}),t}};const J8={},eF=e=>!Be(e)&&typeof e!="boolean"&&typeof e!="number";class ly extends l0{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),w$e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Wo.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!M$e(t,r,o);if(a&&!c){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:Be(s)?[s]:s};const f=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(f[0])>-1)&&(s=f.shift()),t=f.join(o)}return{key:t,namespaces:Be(s)?[s]:s}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:c}=this.extractFromKey(t[t.length-1],n),u=c[c.length-1],f=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(h){const z=n.nsSeparator||this.options.nsSeparator;return o?{res:`${u}${z}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${z}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const m=this.resolve(t,n);let g=m?.res;const v=m?.usedKey||a,C=m?.exactUsedKey||a,b=["[object Number]","[object Function]","[object RegExp]"],E=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,I=n.count!==void 0&&!Be(n.count),R=ly.hasDefaultValue(n),M=I?this.pluralResolver.getSuffix(f,n.count,n):"",D=n.ordinal&&I?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",N=I&&!n.ordinal&&n.count===0,T=N&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${D}`]||n.defaultValue;let L=g;x&&!g&&R&&(L=T);const $=eF(L),G=Object.prototype.toString.apply(L);if(x&&L&&$&&b.indexOf(G)<0&&!(Be(E)&&Array.isArray(L))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,L,{...n,ns:c}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(m.res=z,m.usedParams=this.getUsedParamsDetails(n),m):z}if(s){const z=Array.isArray(L),F=z?[]:{},q=z?C:v;for(const X in L)if(Object.prototype.hasOwnProperty.call(L,X)){const Se=`${q}${s}${X}`;R&&!g?F[X]=this.translate(Se,{...n,defaultValue:eF(T)?T[X]:void 0,joinArrays:!1,ns:c}):F[X]=this.translate(Se,{...n,joinArrays:!1,ns:c}),F[X]===Se&&(F[X]=L[X])}g=F}}else if(x&&Be(E)&&Array.isArray(g))g=g.join(E),g&&(g=this.extendTranslation(g,t,n,r));else{let z=!1,F=!1;!this.isValidLookup(g)&&R&&(z=!0,g=T),this.isValidLookup(g)||(F=!0,g=a);const X=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:g,Se=R&&T!==g&&this.options.updateMissing;if(F||z||Se){if(this.logger.log(Se?"updateKey":"missingKey",f,u,a,Se?T:g),s){const ge=this.resolve(a,{...n,keySeparator:!1});ge&&ge.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let V=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let ge=0;ge<ee.length;ge++)V.push(ee[ge]);else this.options.saveMissingTo==="all"?V=this.languageUtils.toResolveHierarchy(n.lng||this.language):V.push(n.lng||this.language);const pe=(ge,Te,j)=>{const te=R&&j!==g?j:X;this.options.missingKeyHandler?this.options.missingKeyHandler(ge,u,Te,te,Se,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ge,u,Te,te,Se,n),this.emit("missingKey",ge,u,Te,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?V.forEach(ge=>{const Te=this.pluralResolver.getSuffixes(ge,n);N&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Te.indexOf(`${this.options.pluralSeparator}zero`)<0&&Te.push(`${this.options.pluralSeparator}zero`),Te.forEach(j=>{pe([ge],a+j,n[`defaultValue${j}`]||T)})}):pe(V,a,T))}g=this.extendTranslation(g,t,n,m,r),F&&g===a&&this.options.appendNamespaceToMissingKey&&(g=`${u}:${a}`),(F||z)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,z?g:void 0))}return o?(m.res=g,m.usedParams=this.getUsedParamsDetails(n),m):g}extendTranslation(t,n,r,o,s){var a=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=Be(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(f){const g=t.match(this.interpolator.nestingRegexp);h=g&&g.length}let m=r.replace&&!Be(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,r.lng||this.language||o.usedLng,r),f){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;h<v&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var g=arguments.length,v=new Array(g),C=0;C<g;C++)v[C]=arguments[C];return s?.[0]===v[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):a.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,u=Be(c)?[c]:c;return t!=null&&u?.length&&r.applyPostProcessor!==!1&&(t=XW.handle(u,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,s,a,c;return Be(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(u,n),h=f.key;o=h;let m=f.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const g=n.count!==void 0&&!Be(n.count),v=g&&!n.ordinal&&n.count===0,C=n.context!==void 0&&(Be(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);m.forEach(E=>{this.isValidLookup(r)||(c=E,!J8[`${b[0]}-${E}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(c)&&(J8[`${b[0]}-${E}`]=!0,this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(x=>{if(this.isValidLookup(r))return;a=x;const I=[h];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(I,h,x,E,n);else{let M;g&&(M=this.pluralResolver.getSuffix(x,n.count,n));const D=`${this.options.pluralSeparator}zero`,N=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(I.push(h+M),n.ordinal&&M.indexOf(N)===0&&I.push(h+M.replace(N,this.options.pluralSeparator)),v&&I.push(h+D)),C){const T=`${h}${this.options.contextSeparator}${n.context}`;I.push(T),g&&(I.push(T+M),n.ordinal&&M.indexOf(N)===0&&I.push(T+M.replace(N,this.options.pluralSeparator)),v&&I.push(T+D))}}let R;for(;R=I.pop();)this.isValidLookup(r)||(s=R,r=this.getResource(x,E,R,n))}))})}),{res:r,usedKey:o,exactUsedKey:s,usedLng:a,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Be(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const s of n)delete o[s]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class tF{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wo.create("languageUtils")}getScriptPartFromCode(t){if(t=iy(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=iy(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Be(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(s=>{if(s===o)return s;if(!(s.indexOf("-")<0&&o.indexOf("-")<0)&&(s.indexOf("-")>0&&o.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===o||s.indexOf(o)===0&&o.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Be(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],s=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Be(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):Be(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&s(this.formatLanguageCode(a))}),o}}const nF={zero:0,one:1,two:2,few:3,many:4,other:5},rF={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class N$e{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Wo.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=iy(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:o});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rF;if(!t.match(/-|_/))return rF;const u=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(u,n)}return this.pluralRulesCache[s]=a,a}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,s)=>nF[o]-nF[s]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const oF=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=_$e(e,t,n);return!s&&o&&Be(n)&&(s=TA(e,n,r),s===void 0&&(s=TA(t,n,r))),s},v_=e=>e.replace(/\$/g,"$$$$");class k$e{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wo.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:s,prefixEscaped:a,suffix:c,suffixEscaped:u,formatSeparator:f,unescapeSuffix:h,unescapePrefix:m,nestingPrefix:g,nestingPrefixEscaped:v,nestingSuffix:C,nestingSuffixEscaped:b,nestingOptionsSeparator:E,maxReplaces:x,alwaysFormat:I}=t.interpolation;this.escape=n!==void 0?n:A$e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=s?Rc(s):a||"{{",this.suffix=c?Rc(c):u||"}}",this.formatSeparator=f||",",this.unescapePrefix=h?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=g?Rc(g):v||Rc("$t("),this.nestingSuffix=C?Rc(C):b||Rc(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=x||1e3,this.alwaysFormat=I!==void 0?I:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let s,a,c;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=v=>{if(v.indexOf(this.formatSeparator)<0){const x=oF(n,u,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...o,...n,interpolationkey:v}):x}const C=v.split(this.formatSeparator),b=C.shift().trim(),E=C.join(this.formatSeparator).trim();return this.format(oF(n,u,b,this.options.keySeparator,this.options.ignoreJSONStructure),E,r,{...o,...n,interpolationkey:b})};this.resetRegExp();const h=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,m=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>v_(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?v_(this.escape(v)):v_(v)}].forEach(v=>{for(c=0;s=v.regex.exec(t);){const C=s[1].trim();if(a=f(C),a===void 0)if(typeof h=="function"){const E=h(t,s,o);a=Be(E)?E:""}else if(o&&Object.prototype.hasOwnProperty.call(o,C))a="";else if(m){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${t}`),a="";else!Be(a)&&!this.useRawValueToEscape&&(a=K8(a));const b=v.safeValue(a);if(t=t.replace(s[0],b),m?(v.regex.lastIndex+=a.length,v.regex.lastIndex-=s[0].length):v.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,a;const c=(u,f)=>{const h=this.nestingOptionsSeparator;if(u.indexOf(h)<0)return u;const m=u.split(new RegExp(`${h}[ ]*{`));let g=`{${m[1]}`;u=m[0],g=this.interpolate(g,a);const v=g.match(/'/g),C=g.match(/"/g);((v?.length??0)%2===0&&!C||C.length%2!==0)&&(g=g.replace(/'/g,'"'));try{a=JSON.parse(g),f&&(a={...f,...a})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,b),`${u}${h}${g}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;o=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&!Be(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const h=o[1].split(this.formatSeparator).map(m=>m.trim());o[1]=h.shift(),u=h,f=!0}if(s=n(c.call(this,o[1].trim(),a),a),s&&o[0]===t&&!Be(s))return s;Be(s)||(s=K8(s)),s||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),s=""),f&&(s=u.reduce((h,m)=>this.format(h,m,r.lng,{...r,interpolationkey:o[1].trim()}),s.trim())),t=t.replace(o[0],s),this.regexp.lastIndex=0}return t}}const D$e=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[c,...u]=a.split(":"),f=u.join(":").trim().replace(/^'+|'+$/g,""),h=c.trim();n[h]||(n[h]=f),f==="false"&&(n[h]=!1),f==="true"&&(n[h]=!0),isNaN(f)||(n[h]=parseInt(f,10))}})}return{formatName:t,formatOptions:n}},Tc=e=>{const t={};return(n,r,o)=>{let s=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(s={...s,[o.interpolationkey]:void 0});const a=r+JSON.stringify(s);let c=t[a];return c||(c=e(iy(r),o),t[a]=c),c(n)}};class L$e{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Wo.create("formatter"),this.options=t,this.formats={number:Tc((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return s=>o.format(s)}),currency:Tc((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return s=>o.format(s)}),datetime:Tc((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return s=>o.format(s)}),relativetime:Tc((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return s=>o.format(s,r.range||"day")}),list:Tc((n,r)=>{const o=new Intl.ListFormat(n,{...r});return s=>o.format(s)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Tc(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(c=>c.indexOf(")")>-1)){const c=s.findIndex(u=>u.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,c)].join(this.formatSeparator)}return s.reduce((c,u)=>{const{formatName:f,formatOptions:h}=D$e(u);if(this.formats[f]){let m=c;try{const g=o?.formatParams?.[o.interpolationkey]||{},v=g.locale||g.lng||o.locale||o.lng||r;m=this.formats[f](c,v,{...h,...o,...g})}catch(g){this.logger.warn(g)}return m}else this.logger.warn(`there was no format function for ${f}`);return c},t)}}const U$e=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class F$e extends l0{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Wo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const s={},a={},c={},u={};return t.forEach(f=>{let h=!0;n.forEach(m=>{const g=`${f}|${m}`;!r.reload&&this.store.hasResourceBundle(f,m)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?a[g]===void 0&&(a[g]=!0):(this.state[g]=1,h=!1,a[g]===void 0&&(a[g]=!0),s[g]===void 0&&(s[g]=!0),u[m]===void 0&&(u[m]=!0)))}),h||(c[f]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const o=t.split("|"),s=o[0],a=o[1];n&&this.emit("failedLoading",s,a,n),!n&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const c={};this.queue.forEach(u=>{x$e(u.loaded,[s],a),U$e(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(f=>{c[f]||(c[f]={});const h=u.loaded[f];h.length&&h.forEach(m=>{c[f][m]===void 0&&(c[f][m]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:s,callback:a});return}this.readingCalls++;const c=(f,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(f&&h&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,s*2,a)},s);return}a(f,h)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const f=u(t,n);f&&typeof f.then=="function"?f.then(h=>c(null,h)).catch(c):c(null,f)}catch(f){c(f)}return}return u(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Be(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Be(n)&&(n=[n]);const s=this.queueLoad(t,n,r,o);if(!s.toLoad.length)return s.pending.length||o(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],s=r[1];this.read(o,s,"read",void 0,void 0,(a,c)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${o} failed`,a),!a&&c&&this.logger.log(`${n}loaded namespace ${s} for language ${o}`,c),this.loaded(t,a,c)})}saveMissing(t,n,r,o,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...a,isUpdate:s},f=this.backend.create.bind(this.backend);if(f.length<6)try{let h;f.length===5?h=f(t,n,r,o,u):h=f(t,n,r,o),h&&typeof h.then=="function"?h.then(m=>c(null,m)).catch(c):c(null,h)}catch(h){c(h)}else f(t,n,r,o,c,u)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const sF=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Be(e[1])&&(t.defaultValue=e[1]),Be(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),iF=e=>(Be(e.ns)&&(e.ns=[e.ns]),Be(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Be(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),_g=()=>{},$$e=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class bh extends l0{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=iF(t),this.services={},this.logger=Wo,this.modules={external:[]},$$e(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(Be(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=sF();this.options={...o,...this.options,...iF(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const s=h=>h?typeof h=="function"?new h:h:null;if(!this.options.isClone){this.modules.logger?Wo.init(s(this.modules.logger),this.options):Wo.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:h=L$e;const m=new tF(this.options);this.store=new X8(this.options.resources,this.options);const g=this.services;g.logger=Wo,g.resourceStore=this.store,g.languageUtils=m,g.pluralResolver=new N$e(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(g.formatter=s(h),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new k$e(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new F$e(s(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(v){for(var C=arguments.length,b=new Array(C>1?C-1:0),E=1;E<C;E++)b[E-1]=arguments[E];t.emit(v,...b)}),this.modules.languageDetector&&(g.languageDetector=s(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=s(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new ly(this.services,this.options),this.translator.on("*",function(v){for(var C=arguments.length,b=new Array(C>1?C-1:0),E=1;E<C;E++)b[E-1]=arguments[E];t.emit(v,...b)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=_g),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(h=>{this[h]=function(){return t.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return t.store[h](...arguments),t}});const u=uf(),f=()=>{const h=(m,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(g),r(m,g)};if(this.languages&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_g;const o=Be(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const s=[],a=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(f=>{f!=="cimode"&&s.indexOf(f)<0&&s.push(f)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(c=>a(c)),this.services.backendConnector.load(s,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const o=uf();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=_g),this.services.backendConnector.reload(t,n,s=>{o.resolve(),r(s)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&XW.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=uf();this.emit("languageChanging",t);const s=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,f)=>{f?(s(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},c=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const f=Be(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);f&&(this.language||s(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,h=>{a(h,f)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),o}getFixedT(t,n,r){var o=this;const s=function(a,c){let u;if(typeof c!="object"){for(var f=arguments.length,h=new Array(f>2?f-2:0),m=2;m<f;m++)h[m-2]=arguments[m];u=o.options.overloadTranslationOptionHandler([a,c].concat(h))}else u={...c};u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||s.keyPrefix);const g=o.options.keySeparator||".";let v;return u.keyPrefix&&Array.isArray(a)?v=a.map(C=>`${u.keyPrefix}${g}${C}`):v=u.keyPrefix?`${u.keyPrefix}${g}${a}`:a,o.t(v,u)};return Be(t)?s.lng=t:s.lngs=t,s.ns=n,s.keyPrefix=r,s}t(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.translator?.translate(...n)}exists(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.translator?.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(c,u)=>{const f=this.services.backendConnector.state[`${c}|${u}`];return f===-1||f===0||f===2};if(n.precheck){const c=n.precheck(this,a);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(s,t)))}loadNamespaces(t,n){const r=uf();return this.options.ns?(Be(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=uf();Be(t)&&(t=[t]);const o=this.options.preload||[],s=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=o.concat(s),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new tF(sF());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new bh(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_g;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},s=new bh(o);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(c=>{s[c]=this[c]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){const c=Object.keys(this.store.data).reduce((u,f)=>(u[f]={...this.store.data[f]},Object.keys(u[f]).reduce((h,m)=>(h[m]={...u[f][m]},h),{})),{});s.store=new X8(c,o),s.services.resourceStore=s.store}return s.translator=new ly(s.services,o),s.translator.on("*",function(c){for(var u=arguments.length,f=new Array(u>1?u-1:0),h=1;h<u;h++)f[h-1]=arguments[h];s.emit(c,...f)}),s.init(o,n),s.translator.options=o,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const er=bh.createInstance();er.createInstance=bh.createInstance;er.createInstance;er.dir;er.init;er.loadResources;er.reloadResources;er.use;er.changeLanguage;er.getFixedT;er.t;er.exists;er.setDefaultNamespace;er.hasLoadedNamespace;er.loadNamespaces;er.loadLanguages;const{slice:z$e,forEach:j$e}=[];function B$e(e){return j$e.call(z$e.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function H$e(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const aF=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,q$e=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let s=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!aF.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!aF.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(s+="; Partitioned"),s},lF={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=q$e(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var V$e={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return lF.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:s}=t;n&&typeof document<"u"&&lF.create(n,e,r,o,s)}},W$e={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const s=r.substring(1).split("&");for(let a=0;a<s.length;a++){const c=s[a].indexOf("=");c>0&&s[a].substring(0,c)===t&&(n=s[a].substring(c+1))}}return n}},G$e={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const s=o.substring(1);if(t){const a=s.split("&");for(let c=0;c<a.length;c++){const u=a[c].indexOf("=");u>0&&a[c].substring(0,u)===t&&(r=a[c].substring(u+1))}}if(r)return r;if(!r&&n>-1){const a=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Oc=null;const cF=()=>{if(Oc!==null)return Oc;try{if(Oc=typeof window<"u"&&window.localStorage!==null,!Oc)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Oc=!1}return Oc};var K$e={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&cF())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&cF()&&window.localStorage.setItem(n,e)}};let Mc=null;const uF=()=>{if(Mc!==null)return Mc;try{if(Mc=typeof window<"u"&&window.sessionStorage!==null,!Mc)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Mc=!1}return Mc};var Z$e={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&uF())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&uF()&&window.sessionStorage.setItem(n,e)}},Y$e={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let s=0;s<n.length;s++)t.push(n[s]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},Q$e={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},X$e={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},J$e={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let JW=!1;try{document.cookie,JW=!0}catch{}const eG=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];JW||eG.splice(1,1);const eze=()=>({order:eG,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class tG{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=B$e(n,this.options||{},eze()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(V$e),this.addDetector(W$e),this.addDetector(K$e),this.addDetector(Z$e),this.addDetector(Y$e),this.addDetector(Q$e),this.addDetector(X$e),this.addDetector(J$e),this.addDetector(G$e)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!H$e(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}tG.type="languageDetector";const nG=["__proto__","constructor","prototype"];function rG(e){return!(typeof e!="string"||e.length===0||e.length>128||nG.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%:&=;\s]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function oG(e){return!(!rG(e)||e.indexOf("/")>-1||e.indexOf("@")>-1)}function tze(e){return!(!rG(e)||e.indexOf("//")>-1)}const nze={lng:oG,ns:tze};function Ig(e){return typeof e!="string"?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function rze(e){if(typeof e!="string"||e.length===0)return e;try{const t=new URL(e);return t.username||t.password?(t.username="",t.password="",t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function sG(){return typeof XMLHttpRequest=="function"||typeof XMLHttpRequest=="object"}function oze(e){return!!e&&typeof e.then=="function"}function sze(e){return oze(e)?e:Promise.resolve(e)}const ize=/\{\{(.+?)\}\}/g,dF=/^[/\\]{2}/;function fF(e,t){let n=!1;const r=e.replace(ize,(o,s)=>{const a=s.trim();if(nG.indexOf(a)>-1)return o;const c=t[a];if(c==null)return o;const u=nze[a]||oG,f=String(c).split("+");for(const h of f)if(!u(h))return n=!0,o;return f.join("+")});return n||dF.test(r)&&!dF.test(e)?null:r}const tl=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:void 0;let cy;typeof fetch=="function"?cy=fetch:tl&&typeof tl.fetch=="function"&&(cy=tl.fetch);const hF=sG()&&tl?tl.XMLHttpRequest:void 0,aze=typeof ActiveXObject=="function"&&tl?tl.ActiveXObject:void 0,iG=["__proto__","constructor","prototype"],OA=(e,t)=>{if(t&&typeof t=="object"){let n="";for(const r of Object.keys(t))iG.indexOf(r)>-1||(n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]));if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},pF=(e,t,n,r)=>{const o=s=>{if(!s.ok)return n(s.statusText||"Error",{status:s.status});s.text().then(a=>{n(null,{status:s.status,data:a})}).catch(n)};if(r){const s=r(e,t);if(s instanceof Promise){s.then(o).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(o).catch(n):cy(e,t).then(o).catch(n)},lze=(e,t,n,r)=>{e.queryStringParams&&(t=OA(t,e.queryStringParams));const o={...typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders};typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),n&&(o["Content-Type"]="application/json");const s=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a={method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o,...e._omitFetchOptions?{}:s},c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{pF(t,a,r,c)}catch(u){if(!s||Object.keys(s).length===0||!u.message||u.message.indexOf("not implemented")<0)return r(u);try{Object.keys(s).forEach(f=>{delete a[f]}),pF(t,a,r,c),e._omitFetchOptions=!0}catch(f){r(f)}}},cze=(e,t,n,r)=>{n&&typeof n=="object"&&(n=OA("",n).slice(1)),e.queryStringParams&&(t=OA(t,e.queryStringParams));try{const o=hF?new hF:new aze("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");let s=e.customHeaders;if(s=typeof s=="function"?s():s,s)for(const a of Object.keys(s))iG.indexOf(a)>-1||o.setRequestHeader(a,s[a]);o.onreadystatechange=()=>{o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(o){console&&console.log(o)}},uze=(e,t,n,r)=>{if(typeof n=="function"&&(r=n,n=void 0),r=r||(()=>{}),cy&&t.indexOf("file:")!==0)return lze(e,t,n,r);if(sG()||typeof ActiveXObject=="function")return cze(e,t,n,r);r(new Error("No fetch and no xhr implementation found!"))},dze=()=>({loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||""}),parseLoadPayload:(e,t)=>{},request:uze,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}});var aG=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={...dze(),...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){const r=setInterval(()=>this.reload(),this.options.reloadInterval);typeof r=="object"&&typeof r.unref=="function"&&r.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,o){let s=this.options.loadPath;typeof this.options.loadPath=="function"&&(s=this.options.loadPath(e,n)),s=sze(s),s.then(a=>{if(!a)return o(null,{});const c=fF(a,{lng:e.join("+"),ns:n.join("+")});if(c==null){const u=e.map(Ig).join(", "),f=n.map(Ig).join(", ");return o(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+u+"] namespaces=["+f+"]"),!1)}this.loadUrl(c,o,t,r)})}loadUrl(e,t,n,r){const o=typeof n=="string"?[n]:n,s=typeof r=="string"?[r]:r,a=this.options.parseLoadPayload(o,s),c=Ig(rze(e));this.options.request(this.options,e,a,(u,f)=>{if(f&&(f.status>=500&&f.status<600||!f.status))return t("failed loading "+c+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return t("failed loading "+c+"; status code: "+f.status,!1);if(!f&&u&&u.message){const g=u.message.toLowerCase();if(["failed","fetch","network","load"].find(v=>g.indexOf(v)>-1))return t("failed loading "+c+": "+Ig(u.message),!0)}if(u)return t(u,!1);let h,m;try{typeof f.data=="string"?h=this.options.parse(f.data,n,r):h=f.data}catch{m="failed parsing "+c+" to json"}if(m)return t(m,!1);t(null,h)})}create(e,t,n,r,o){if(!this.options.addPath)return;typeof e=="string"&&(e=[e]);const s=this.options.parsePayload(t,n,r);let a=0;const c=[],u=[];e.forEach(f=>{let h=this.options.addPath;typeof this.options.addPath=="function"&&(h=this.options.addPath(f,t));const m=fF(h,{lng:f,ns:t});if(m==null){a+=1,o&&a===e.length&&o(c,u);return}this.options.request(this.options,m,s,(g,v)=>{a+=1,c.push(g),u.push(v),a===e.length&&typeof o=="function"&&o(c,u)})})}reload(){const{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&r.toLowerCase()==="cimode")return;const o=[],s=a=>{t.toResolveHierarchy(a).forEach(c=>{o.indexOf(c)<0&&o.push(c)})};s(r),this.allOptions.preload&&this.allOptions.preload.forEach(a=>s(a)),o.forEach(a=>{this.allOptions.ns.forEach(c=>{e.read(a,c,"read",null,null,(u,f)=>{u&&n.warn(`loading namespace ${c} for language ${a} failed`,u),!u&&f&&n.log(`loaded namespace ${c} for language ${a}`,f),e.loaded(`${a}|${c}`,u,f)})})})}};aG.type="backend";er.use(aG).use(tG).use(GRe).init({fallbackLng:"en",supportedLngs:["en","nl","de","fr"],ns:["common","mail"],defaultNS:"common",backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["navigator","htmlTag"],caches:[]},interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged loaded"}});const fze=({authProvider:e,settingsSlots:t=[],rootElementId:n="root"})=>{$ie(),NRe(),e.configure(),t1e(e);const r=RRe();Tie(r);const o=new Abe({queryCache:new z7({onError:l1e}),mutationCache:new $7({onError:c1e}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}});MRe();const s=C$e(o,r);for(const u of t)if(Object.hasOwn(s.routesByPath,`/settings/${u.id}`))throw new Error(`Settings slot "${u.id}" collides with a built-in settings section`);r.recordPageView(window.location.pathname);const a=document.getElementById(n);if(!a)throw new Error(`Root element not found: #${n}`);const{Shell:c}=e;USe.createRoot(a).render(O.jsx(_.StrictMode,{children:O.jsx(nq.Provider,{value:r,children:O.jsxs(Rbe,{client:o,children:[O.jsx(o1e,{value:e,children:O.jsx(aUe,{value:t,children:O.jsx(c,{children:O.jsx(PSe,{router:s})})})}),!1]})})}))};fze({authProvider:obe});export{Eu as $,Iy as A,Qn as B,mre as C,zoe as D,Cz as E,Sre as F,fj as G,_r as H,G$ as I,mBe as J,J4e as K,Y$ as L,_re as M,Yie as N,gj as O,gW as P,mW as Q,iq as R,Ore as S,Nre as T,fA as U,gje as V,e0 as W,D_ as X,CW as Y,Kje as Z,j2e as _,fl as a,U2e as a$,yTe as a0,o2 as a1,My as a2,_ie as a3,fb as a4,Pu as a5,V4e as a6,s1e as a7,lUe as a8,_Ue as a9,ije as aA,m3 as aB,jUe as aC,f7e as aD,Nje as aE,R7e as aF,lse as aG,d9e as aH,Doe as aI,u9e as aJ,nje as aK,S4e as aL,gie as aM,pie as aN,hie as aO,wn as aP,Ah as aQ,W6 as aR,J9e as aS,F2e as aT,J7e as aU,X7e as aV,eje as aW,zz as aX,dW as aY,Z7e as aZ,Q7e as a_,m9e as aa,FUe as ab,EBe as ac,eR as ad,Mje as ae,dV as af,B as ag,Tje as ah,Oje as ai,FOe as aj,yW as ak,fLe as al,d7e as am,c7e as an,jf as ao,Mz as ap,D$ as aq,U as ar,ce as as,w as at,Pje as au,Fze as av,ku as aw,ol as ax,aR as ay,sje as az,Et as b,kje as b$,$ze as b0,zze as b1,Mze as b2,mse as b3,Dze as b4,Nze as b5,Oze as b6,Ose as b7,iR as b8,v7e as b9,Gje as bA,gBe as bB,Y2e as bC,wBe as bD,s7e as bE,l7e as bF,a7e as bG,i7e as bH,bBe as bI,yBe as bJ,db as bK,iUe as bL,vBe as bM,SBe as bN,CBe as bO,O7e as bP,M7e as bQ,Ef as bR,l6e as bS,s6e as bT,Are as bU,aje as bV,q2e as bW,tje as bX,xW as bY,WLe as bZ,Sze as b_,y7e as ba,RLe as bb,TLe as bc,jLe as bd,zLe as be,XUe as bf,vse as bg,Lze as bh,Pse as bi,_Le as bj,t7e as bk,dTe as bl,Qje as bm,Jje as bn,o2e as bo,Xje as bp,n7e as bq,Zje as br,nBe as bs,eBe as bt,tBe as bu,I2e as bv,E7e as bw,Yje as bx,h_ as by,SLe as bz,s2 as c,rr as c$,Eje as c0,vze as c1,_W as c2,xm as c3,E2e as c4,Aie as c5,Sl as c6,xje as c7,_je as c8,Ije as c9,Sje as cA,Cje as cB,bje as cC,O$ as cD,vje as cE,Pe as cF,Rje as cG,Z2e as cH,wje as cI,yje as cJ,sOe as cK,Soe as cL,xoe as cM,Coe as cN,Poe as cO,gh as cP,V2e as cQ,Fu as cR,An as cS,vv as cT,M7 as cU,wbe as cV,Tbe as cW,Pbe as cX,Lbe as cY,Nbe as cZ,kbe as c_,Kze as ca,Uze as cb,Q4e as cc,fBe as cd,Dre as ce,voe as cf,D7e as cg,HW as ch,V8 as ci,OBe as cj,xBe as ck,_Be as cl,IBe as cm,Er as cn,tSe as co,de as cp,g9e as cq,cb as cr,yUe as cs,dBe as ct,Pne as cu,WN as cv,hze as cw,pze as cx,gze as cy,bW as cz,so as d,Ize as d$,Fbe as d0,L4 as d1,Dbe as d2,b7e as d3,S7e as d4,w7e as d5,C7e as d6,e7e as d7,HLe as d8,bLe as d9,Ere as dA,F1 as dB,Vse as dC,Nz as dD,Qze as dE,Zze as dF,o9e as dG,iie as dH,i9e as dI,Xze as dJ,s9e as dK,sie as dL,Gse as dM,ro as dN,Pze as dO,c9e as dP,a9e as dQ,l9e as dR,r9e as dS,t9e as dT,Lz as dU,yze as dV,Eze as dW,_ze as dX,xze as dY,Cze as dZ,wze as d_,T7e as da,cq as db,YTe as dc,uq as dd,Lje as de,es as df,GLe as dg,cBe as dh,DW as di,$je as dj,iBe as dk,Y5e as dl,Uje as dm,Fje as dn,aBe as dp,oBe as dq,h9e as dr,f9e as ds,$be as dt,Vze as du,qze as dv,xre as dw,Tre as dx,woe as dy,Lse as dz,ia as e,g7e as e$,Aze as e0,Zoe as e1,bze as e2,Xoe as e3,Yoe as e4,Ez as e5,cje as e6,zje as e7,qje as e8,fq as e9,Dje as eA,rBe as eB,n2e as eC,t2e as eD,oje as eE,dq as eF,lLe as eG,cLe as eH,F4e as eI,uBe as eJ,Yze as eK,e9e as eL,Jze as eM,n9e as eN,lBe as eO,uje as eP,Pre as eQ,dse as eR,Rze as eS,Tze as eT,x7e as eU,I7e as eV,_7e as eW,kze as eX,p7e as eY,m7e as eZ,_2e as e_,jje as ea,Bje as eb,Hje as ec,lje as ed,Ry as ee,dje as ef,Aje as eg,uLe as eh,pje as ei,O2e as ej,iu as ek,jze as el,pBe as em,Hze as en,Bze as eo,fje as ep,o7e as eq,r7e as er,Wze as es,mje as et,Vje as eu,Wje as ev,RBe as ew,Gze as ex,sBe as ey,j4e as ez,cT as f,Hi as f0,ABe as f1,W8 as f2,K7e as f3,N7e as f4,L7e as f5,k7e as f6,Y7e as f7,P7e as f8,U7e as f9,hje as fa,$7e as fb,z7e as fc,j7e as fd,B7e as fe,F7e as ff,TTe as fg,hBe as fh,tOe as fi,O2 as fj,q7e as fk,G7e as fl,V7e as fm,H7e as fn,W7e as fo,M6e as fp,TBe as fq,v8e as fr,C8e as fs,_8e as ft,N8e as fu,D8e as fv,yre as fw,rje as g,h7e as h,A7e as i,O as j,lq as k,X9e as l,u7e as m,wy as n,Ey as o,Jt as p,Mre as q,_ as r,Py as s,gre as t,kh as u,F$ as v,Rre as w,JA as x,pre as y,bre as z};
|