decocms 4.91.7 → 4.91.9
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/dist/client/assets/{AlertCircle-B6Dxj8s8.js → AlertCircle-DQkyZPkM.js} +1 -1
- package/dist/client/assets/{AreaChart-D4kpjzB2.js → AreaChart-BoPBXpQh.js} +1 -1
- package/dist/client/assets/{ArrowUp-B3zksSbH.js → ArrowUp-1eyms-W6.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-C_E31W-5.js → ArrowUpRight-BWBfIqOE.js} +1 -1
- package/dist/client/assets/{CheckCircle-C5szEWBP.js → CheckCircle-BotS6_2J.js} +1 -1
- package/dist/client/assets/{ChevronDown-4WTCrEzN.js → ChevronDown-C_zJY6h3.js} +1 -1
- package/dist/client/assets/{ChevronRight-CGQBhuhC.js → ChevronRight-BKMuwTeX.js} +1 -1
- package/dist/client/assets/{ChevronUp-Cq3TOOsL.js → ChevronUp-Oiv21hbj.js} +1 -1
- package/dist/client/assets/{Copy01-B_OWpi1h.js → Copy01-DLy2IECm.js} +1 -1
- package/dist/client/assets/{DotsVertical-S7H-USoF.js → DotsVertical-8I9Vrhhx.js} +1 -1
- package/dist/client/assets/{Eye-Cln-kZXT.js → Eye-YxwysDYV.js} +1 -1
- package/dist/client/assets/{FilterLines-CTwB0V7-.js → FilterLines-DbG7lWLi.js} +1 -1
- package/dist/client/assets/{Globe01-Bb_eF-F4.js → Globe01-Bhytxdfk.js} +1 -1
- package/dist/client/assets/{Globe04-DFWyqqEQ.js → Globe04-Czw8KC88.js} +1 -1
- package/dist/client/assets/{HardDrive-BUKK8hd-.js → HardDrive-C91EaPUL.js} +1 -1
- package/dist/client/assets/{Image01-BfQlF6VO.js → Image01-BOgSXZ7b.js} +1 -1
- package/dist/client/assets/{Key01-rmdQ0NBu.js → Key01-BjeELhvw.js} +1 -1
- package/dist/client/assets/{LayoutLeft-D1z3j5Mb.js → LayoutLeft-CjoYHqKJ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Dzjzd3tj.js → LinkExternal01-DYnWOjEr.js} +1 -1
- package/dist/client/assets/{Monitor01-COO1uicM.js → Monitor01-D9DUJw9b.js} +1 -1
- package/dist/client/assets/{Package-BGqkfwv6.js → Package-C3ajKu1J.js} +1 -1
- package/dist/client/assets/{Palette-Bqs5qO3D.js → Palette-sWaX88jT.js} +1 -1
- package/dist/client/assets/{Play-DzQ1mEgX.js → Play-fpHQwKuW.js} +1 -1
- package/dist/client/assets/{Plus-tgNrL4nN.js → Plus-CGJ5GRwK.js} +1 -1
- package/dist/client/assets/{SearchLg-5I6PArOL.js → SearchLg-CSECHP27.js} +1 -1
- package/dist/client/assets/{SearchMd-D9xgj67F.js → SearchMd-CC5d4vOH.js} +1 -1
- package/dist/client/assets/{Settings02-BNhIfida.js → Settings02-DQuL5b-n.js} +1 -1
- package/dist/client/assets/{Shield01-C6OrvfWS.js → Shield01-BnUznbjB.js} +1 -1
- package/dist/client/assets/{Star01-wRSCIw0S.js → Star01-BQDPdlkP.js} +1 -1
- package/dist/client/assets/{Stars01-COscKVQ3.js → Stars01-BiqbUn3O.js} +1 -1
- package/dist/client/assets/{Stars02-Cf0PZsx_.js → Stars02-CUsMl7D_.js} +1 -1
- package/dist/client/assets/{Sun-CaLL090a.js → Sun-CvPuoJa7.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BasoUHYn.js → SwitchHorizontal01-CB6H-axP.js} +1 -1
- package/dist/client/assets/{Tool01-CMdUOGbU.js → Tool01-BoU9iMpN.js} +1 -1
- package/dist/client/assets/{Tool02-DS5q1K30.js → Tool02-bGnWJ-d9.js} +1 -1
- package/dist/client/assets/{Trash01-D4Y-gpVA.js → Trash01-DSRYCkid.js} +1 -1
- package/dist/client/assets/{TrendUp01-C6BiPqdW.js → TrendUp01-BkoROJWD.js} +1 -1
- package/dist/client/assets/{Upload01-BIph5cgr.js → Upload01-BI3kM4PZ.js} +1 -1
- package/dist/client/assets/{User01-BIf_QHgW.js → User01-CkJ2pXv_.js} +1 -1
- package/dist/client/assets/{Users01-DN1LxRJ5.js → Users01-B4YjQ0nM.js} +1 -1
- package/dist/client/assets/{Users03-Bu0Hc-Zo.js → Users03-RM36UPcU.js} +1 -1
- package/dist/client/assets/{X-DG6CSoOp.js → X-CbhCy8Mo.js} +1 -1
- package/dist/client/assets/{XCircle-DfyyzWId.js → XCircle-Caa3OuLn.js} +1 -1
- package/dist/client/assets/{XClose-BFJznRv1.js → XClose-BYrQfw_B.js} +1 -1
- package/dist/client/assets/{Zap-QIARLpTH.js → Zap-BWa6_Qzx.js} +1 -1
- package/dist/client/assets/{ZapSquare-ClUynjmV.js → ZapSquare-ZGCRBIp6.js} +1 -1
- package/dist/client/assets/{ZoomOut-DUOebsW2.js → ZoomOut-DrHG2xPT.js} +1 -1
- package/dist/client/assets/{access-gate-DBuHBoB9.js → access-gate-B7rcAQOR.js} +1 -1
- package/dist/client/assets/{add-section-modal-D_RLWXj8.js → add-section-modal-DM29tUJp.js} +1 -1
- package/dist/client/assets/{agent-icon-BuFtK4zZ.js → agent-icon-DAAo3oB_.js} +1 -1
- package/dist/client/assets/{agents-list-TZ0Kqfeo.js → agents-list-C5gYxxiG.js} +1 -1
- package/dist/client/assets/{ai-providers-CKZBOpZY.js → ai-providers-jfZcI2HF.js} +1 -1
- package/dist/client/assets/{alert-D1t4zaK4.js → alert-NHNJ9RhR.js} +1 -1
- package/dist/client/assets/{alert-dialog-DUMGYvZ1.js → alert-dialog-npzaR4uz.js} +1 -1
- package/dist/client/assets/{app-editor-D99nVgjq.js → app-editor-8S1aCGoH.js} +1 -1
- package/dist/client/assets/{auth-CaQZvVdy.js → auth-CQrb__XG.js} +1 -1
- package/dist/client/assets/{auth-catchall-TfMww9uU.js → auth-catchall-CYFsjRqv.js} +1 -1
- package/dist/client/assets/{auth-entry-CdUn1oKM.js → auth-entry-xpZlCNrX.js} +1 -1
- package/dist/client/assets/{auth-split-layout-ky36FLsN.js → auth-split-layout-BPW4bt9C.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CKcCgazw.js → authenticate-and-persist-oauth-B-7Jlcee.js} +1 -1
- package/dist/client/assets/{automation-list-row-CbTZ4s5X.js → automation-list-row-DvQVx0rD.js} +1 -1
- package/dist/client/assets/{automation-runs-BTAgsyNj.js → automation-runs-B-bzuqnz.js} +1 -1
- package/dist/client/assets/{automations-h0Nuw91X.js → automations-BfEcG7-7.js} +1 -1
- package/dist/client/assets/{autosend-sUJQO_rq.js → autosend-DbjOvQo2.js} +1 -1
- package/dist/client/assets/{avatar-BoGKIxjB.js → avatar-lvjvIUo3.js} +1 -1
- package/dist/client/assets/{badge-BrhAsozR.js → badge-JndFUZsS.js} +1 -1
- package/dist/client/assets/{block-document-B5UmVZO-.js → block-document-DxHnOdVe.js} +1 -1
- package/dist/client/assets/{brand-context-BIyP8xYy.js → brand-context-DYCHu24t.js} +1 -1
- package/dist/client/assets/{buckets-QGKbgl-N.js → buckets-C8qYIfjG.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DWA4Zc3L.js → bulk-category-panel-Dv7U77ru.js} +1 -1
- package/dist/client/assets/{calendar-m2SRMSYb.js → calendar-D4uPDRzj.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dhw1ay9f.js → capability-load-error-DRGbES7P.js} +1 -1
- package/dist/client/assets/{card-C4jjtTS0.js → card-BAfgvx-F.js} +1 -1
- package/dist/client/assets/{category-editor-SfEvY6uy.js → category-editor-C0vkZot8.js} +1 -1
- package/dist/client/assets/{chat-context-CEtn8UNh.js → chat-context-BzplOHu0.js} +1 -1
- package/dist/client/assets/{checkbox-DR6Sq2n4.js → checkbox-BlC04c-K.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CTMG4H1f.js → cli-auth-success-BlwxLly-.js} +1 -1
- package/dist/client/assets/{collection-detail-D0NZfJGN.js → collection-detail-E6u4e-px.js} +1 -1
- package/dist/client/assets/{collection-display-button-pvjj0pWK.js → collection-display-button-BFdGB3aQ.js} +1 -1
- package/dist/client/assets/{collection-search-DaCfbY0a.js → collection-search-BkGkKAJn.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D7kzkxwR.js → collection-table-wrapper-CGjeeRRn.js} +1 -1
- package/dist/client/assets/{collection-tabs-BPxarwgr.js → collection-tabs-C3JmM6iM.js} +1 -1
- package/dist/client/assets/{command-BZFi99z-.js → command-CpH0rUss.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-C6VsjPTp.js → commerce-onboarding-Lsv0oOsQ.js} +1 -1
- package/dist/client/assets/{companions-core-CydJnvjB.js → companions-core-fLcUTqpg.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-Cd2fLUNG.js → connect-desktop-dialog-CVVh9cb3.js} +1 -1
- package/dist/client/assets/{connection-card-BCawelpp.js → connection-card-DdfPZnU-.js} +1 -1
- package/dist/client/assets/{connection-detail-BWWiaQfL.js → connection-detail-DHycA4fS.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CR7QcVb8.js → connection-form-helpers-9SoxU_8N.js} +1 -1
- package/dist/client/assets/{connections-DjOWA5lE.js → connections-BUT4xtlh.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CahJPG3U.js → decopilot-sse-pool-DkbX89gY.js} +1 -1
- package/dist/client/assets/{dialog-CypJM4NS.js → dialog-Dzs4Fh0g.js} +1 -1
- package/dist/client/assets/{domain-settings-Cs3fKQT6.js → domain-settings-BwB7x1X9.js} +1 -1
- package/dist/client/assets/{drawer-BAoCPOHn.js → drawer-rdDU5EWU.js} +1 -1
- package/dist/client/assets/{dropdown-menu-auLHt6sS.js → dropdown-menu-gw2Ee99q.js} +1 -1
- package/dist/client/assets/{empty-state-BTN3EbxW.js → empty-state-B7NTS5AI.js} +1 -1
- package/dist/client/assets/{extract-connection-data-bQlBNmB6.js → extract-connection-data-Dzfyxxnx.js} +1 -1
- package/dist/client/assets/{file-explorer-ByaiDnLr.js → file-explorer-BVSj3p0z.js} +1 -1
- package/dist/client/assets/{file-type-icon-NQLDJmVS.js → file-type-icon-COxuwNw6.js} +1 -1
- package/dist/client/assets/{files-bcXp7_-0.js → files-DV7TRQAK.js} +1 -1
- package/dist/client/assets/{form-Dk01AeXf.js → form-DeLeLEUt.js} +1 -1
- package/dist/client/assets/{general-B9f_o-xC.js → general-CPeMOsd5.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BYKTpyYN.js → github-repo-picker-B89oQ8nC.js} +1 -1
- package/dist/client/assets/{hooks-D_wAeR4G.js → hooks-BaTTMyRs.js} +1 -1
- package/dist/client/assets/{index-DRPk1PX9.js → index-BIGDsKN-.js} +2 -2
- package/dist/client/assets/{index-Co1X_X1z.js → index-BWTZGxH5.js} +1 -1
- package/dist/client/assets/{index-CDsIDDZy.js → index-C2OvYnDQ.js} +1 -1
- package/dist/client/assets/{index-C4Kl4JCu.js → index-CGhWyM71.js} +1 -1
- package/dist/client/assets/{index-DWSZy_X3.js → index-CNSuLu5S.js} +1 -1
- package/dist/client/assets/{index-rMDxTyYZ.js → index-CSXVQ6B-.js} +1 -1
- package/dist/client/assets/{index-C5YbJK8s.js → index-CUB1pa70.js} +1 -1
- package/dist/client/assets/{index-BEZV54MY.js → index-Cg8MvLOr.js} +1 -1
- package/dist/client/assets/{index-BjAPhLvs.js → index-ChhV-Pk_.js} +8 -8
- package/dist/client/assets/{index-blvL9dL-.js → index-DmcZHBu4.js} +1 -1
- package/dist/client/assets/{index-CLJMiUTu.js → index-DoojYIRI.js} +1 -1
- package/dist/client/assets/{index-DLW3irxF.js → index-J0-zdiVG.js} +5 -5
- package/dist/client/assets/{index-CT_zUqWv.js → index-TOHs7gY4.js} +1 -1
- package/dist/client/assets/{index-redirect-B6UR7kjq.js → index-redirect-BDCF1ed3.js} +1 -1
- package/dist/client/assets/{index-CsEQ1NUp.js → index-tm56IEST.js} +1 -1
- package/dist/client/assets/{input-Dg4dAIRZ.js → input-xsJ0D7QS.js} +1 -1
- package/dist/client/assets/{integration-icon-CbGODYPX.js → integration-icon-Bdl3-9dS.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C7EcKUCO.js → invite-member-dialog-c0_XmQat.js} +1 -1
- package/dist/client/assets/{label-CqZ4jpSh.js → label-DINUe_U6.js} +1 -1
- package/dist/client/assets/{layout-Dt6m6-0O.js → layout-BrOOamwF.js} +1 -1
- package/dist/client/assets/{login-Do6TgRIo.js → login-DadqwX1v.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BYXloqKY.js → mcp-oauth-3sSagXIB.js} +1 -1
- package/dist/client/assets/{members-CJyGLnx5.js → members-DrOH6Fqm.js} +1 -1
- package/dist/client/assets/{monaco-editor-CeucfbOl.js → monaco-editor-BTH_ZKL3.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-AMnp1MeX.js → monitoring-stats-row-CGsUZmOm.js} +1 -1
- package/dist/client/assets/{multi-select-CPgVGAM4.js → multi-select-CjDS7mjZ.js} +1 -1
- package/dist/client/assets/{oauth-callback-BZF3sDi_.js → oauth-callback-DEy6hh8y.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-_pj0nd1a.js → oauth-callback-ai-provider-DytbYlOt.js} +1 -1
- package/dist/client/assets/{onboarding-Czdprpvz.js → onboarding-CDE8VR3t.js} +1 -1
- package/dist/client/assets/{org-install-Bx1yNGFY.js → org-install-B9RKA-K5.js} +1 -1
- package/dist/client/assets/{org-layout-BVqi37tr.js → org-layout-D60GrLo7.js} +1 -1
- package/dist/client/assets/{organization-choice--qlKtkMR.js → organization-choice-BTNn4JOm.js} +1 -1
- package/dist/client/assets/{orgs-Du0NBZyd.js → orgs-qf3_u6-D.js} +1 -1
- package/dist/client/assets/{page-seo-form-DFCtFPHP.js → page-seo-form-D7MaX2RG.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CRI9b_Si.js +1 -0
- package/dist/client/assets/{popover-D54INCmx.js → popover-v1E4Fhm0.js} +1 -1
- package/dist/client/assets/{post-editor-BZn1o_gH.js → post-editor--mrhmc2r.js} +1 -1
- package/dist/client/assets/{primitives-Diqycic5.js → primitives-DivRorD7.js} +1 -1
- package/dist/client/assets/{profile-p8uH-A7p.js → profile-DGsdccyo.js} +1 -1
- package/dist/client/assets/project-app-view-BG1R2cig.js +1 -0
- package/dist/client/assets/record-editor-DHqurW8d.js +1 -0
- package/dist/client/assets/redirect-editor-DfcXxiPE.js +1 -0
- package/dist/client/assets/registry-Cuy31Gle.js +2 -0
- package/dist/client/assets/{registry-layout-DafKOUWR.js → registry-layout-BkJZMmzC.js} +1 -1
- package/dist/client/assets/{reports-CXz9lYL5.js → reports-8lm2jYlA.js} +1 -1
- package/dist/client/assets/{require-capability-Bm1hzgLi.js → require-capability-BO9IoRE5.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C_AeOtPZ.js → required-auth-layout-Dxn3k4iE.js} +1 -1
- package/dist/client/assets/{reset-password-CaOCmfjG.js → reset-password-DMlVHYx8.js} +1 -1
- package/dist/client/assets/{roles-DSYJH4-L.js → roles-GP7WhHNE.js} +1 -1
- package/dist/client/assets/{search-input-DRJh9hCP.js → search-input-D2xAWqQr.js} +1 -1
- package/dist/client/assets/{secrets-B7yOPqqi.js → secrets-BsBqN8Ek.js} +1 -1
- package/dist/client/assets/{sections-editor-hrDsY_nu.js → sections-editor-DceWAU3m.js} +1 -1
- package/dist/client/assets/{select-Ccwny0Hc.js → select-6iTMeDbP.js} +1 -1
- package/dist/client/assets/{select-model-BDDwn5DX.js → select-model-DW3lL7sI.js} +1 -1
- package/dist/client/assets/{self-tool-result-DV2W1x08.js → self-tool-result-D6rWHHjD.js} +1 -1
- package/dist/client/assets/{seo-editor-9p7kvQgJ.js → seo-editor-CGHGIyVs.js} +1 -1
- package/dist/client/assets/{settings-layout-tx09mNx7.js → settings-layout-BKgo0OhA.js} +1 -1
- package/dist/client/assets/{settings-section-DYOEqOk7.js → settings-section-ydnyKt4i.js} +1 -1
- package/dist/client/assets/{shell-controls-TK5g6ibg.js → shell-controls-lnwVjHGS.js} +1 -1
- package/dist/client/assets/{shell-layout--OzmrVJL.js → shell-layout-BgxszLda.js} +1 -1
- package/dist/client/assets/{sidebar-CqnK1dyZ.js → sidebar-ClgWST96.js} +1 -1
- package/dist/client/assets/{skeleton-DCUnnnlw.js → skeleton-Ct3kygS6.js} +1 -1
- package/dist/client/assets/{sso-BJu5HqPY.js → sso-C_M1ftWf.js} +1 -1
- package/dist/client/assets/{store-94QzW1Nj.js → store-CLgxTkh8.js} +1 -1
- package/dist/client/assets/store-registry-gtan6bSq.js +2 -0
- package/dist/client/assets/{studio-tools-BsEwwTbm.js → studio-tools-CCswSbCZ.js} +1 -1
- package/dist/client/assets/{switch-6bI0cy4y.js → switch-jCyFEUwx.js} +1 -1
- package/dist/client/assets/{table-C_akpF1N.js → table-mC7JPRDO.js} +1 -1
- package/dist/client/assets/{tabs-DCwzihen.js → tabs-CCmBSzzX.js} +1 -1
- package/dist/client/assets/{textarea-C88lZgby.js → textarea-CW8gt2nr.js} +1 -1
- package/dist/client/assets/{toggle-group-BhM_FP9H.js → toggle-group-DRPlWWaY.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Du3t6HpS.js → toolbar-icon-button-CpYGlHSb.js} +1 -1
- package/dist/client/assets/{toolbar-DKMwe5xJ.js → toolbar-xTEmd8-2.js} +1 -1
- package/dist/client/assets/{tooltip-Cq5_8kA7.js → tooltip-DbFmaoPO.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CTdUSj_U.js → use-ai-providers-CMeS6-3M.js} +1 -1
- package/dist/client/assets/{use-automations-BgjHlZQ5.js → use-automations-DBWzH_gR.js} +1 -1
- package/dist/client/assets/{use-autosave-DQSnu7q0.js → use-autosave-CKz-DOxx.js} +1 -1
- package/dist/client/assets/{use-capability-CXwZYsxT.js → use-capability-DHFB9W7L.js} +1 -1
- package/dist/client/assets/{use-clock-tick-jdVDfM-t.js → use-clock-tick-BqvxGF_N.js} +1 -1
- package/dist/client/assets/{use-collections-XvepkqT5.js → use-collections-p8O3FNK5.js} +1 -1
- package/dist/client/assets/{use-connection-C2HK_Fv2.js → use-connection-BqA3UiQY.js} +1 -1
- package/dist/client/assets/{use-copy-CWG84yP4.js → use-copy-DM4U1-7s.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DzSvbUap.js → use-create-virtual-mcp-bSyfhPfQ.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Cc0GqU7N.js → use-debounced-autosave-D9X_vXvM.js} +1 -1
- package/dist/client/assets/{use-debounced-value-7ySFsnM6.js → use-debounced-value-BO8CbkTJ.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BQvE3ow0.js → use-deco-credits-D5R06WkK.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CWBUSd-0.js → use-decopilot-events-CKWZHtTT.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DFvN_RrX.js → use-delete-connection-Wo0RaRmN.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-1cEHLXu2.js → use-deployment-admin-Bmi-kdVG.js} +1 -1
- package/dist/client/assets/{use-file-configs-CklaqQGw.js → use-file-configs-C5n4X6pK.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-ptyScFaf.js → use-infinite-scroll-Btz9oc8t.js} +1 -1
- package/dist/client/assets/{use-join-requests-pydJhPpk.js → use-join-requests-yOuLIjH4.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CXj1VxE-.js → use-mcp-auth-status-J8OBK7rq.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BaVh1Z2s.js → use-mcp-client-B6pyaFnV.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DNNVGu1-.js → use-mcp-tools-YtJb7q1J.js} +1 -1
- package/dist/client/assets/{use-members-WuKvxZh0.js → use-members-Ca5xyvsD.js} +1 -1
- package/dist/client/assets/{use-mobile-Abfbosmg.js → use-mobile-CEfYZOEn.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BltVKvGP.js → use-navigate-to-agent-D-CScWkM.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B44JCGOQ.js → use-org-auth-client-CDWbXTY-.js} +1 -1
- package/dist/client/assets/{use-org-sso-BjGFaXro.js → use-org-sso-C8DxKIs-.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BmDwGZfJ.js → use-organization-roles-C3uDf6ef.js} +1 -1
- package/dist/client/assets/{use-organization-settings-8hp3FGtf.js → use-organization-settings-B0eas1J3.js} +1 -1
- package/dist/client/assets/{use-registry-app-BHVrMuWT.js → use-registry-app-wpYe0Yei.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DJ0wGXu5.js → use-registry-connections-BUp1bCP9.js} +1 -1
- package/dist/client/assets/{use-secrets-CF821mDn.js → use-secrets-CU1MOqtl.js} +1 -1
- package/dist/client/assets/{use-status-sounds-xWPD5wEl.js → use-status-sounds-nptUXCJn.js} +1 -1
- package/dist/client/assets/{use-t-BkGzgzGP.js → use-t-C0vToFEy.js} +1 -1
- package/dist/client/assets/{use-view-mode-CVkP5Xxo.js → use-view-mode-Ov1lbWyD.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-uGraPkbp.js → use-virtual-mcp-CQeK_cMY.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DE-HeWYQ.js +1 -0
- package/dist/client/assets/{useRouterState-Dzs5_1de.js → useRouterState-DHEqnwQV.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DReNjGkM.js +1 -0
- package/dist/client/assets/{users-DdsOhIus.js → users-DvGWbjGS.js} +1 -1
- package/dist/client/assets/{variant-calendar-BUp6akMS.js → variant-calendar-B03nC3uP.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DhQC3Zu_.js → view-mode-toggle-CgUnoYsD.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-DRkhGYDW.js +0 -1
- package/dist/client/assets/project-app-view-c_FUesv-.js +0 -1
- package/dist/client/assets/record-editor-BNnOtOEb.js +0 -1
- package/dist/client/assets/redirect-editor-C8aZSw-u.js +0 -1
- package/dist/client/assets/registry-qxkLULpu.js +0 -2
- package/dist/client/assets/store-registry-DBqS-hVl.js +0 -2
- package/dist/client/assets/useInfiniteQuery-XxBgnfUA.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BRpH7NIu.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-DadqwX1v.js","assets/auth-entry-xpZlCNrX.js","assets/input-xsJ0D7QS.js","assets/retry-CErkP7V6.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/auth-split-layout-BPW4bt9C.js","assets/cli-auth-success-BlwxLly-.js","assets/reset-password-DMlVHYx8.js","assets/oauth-callback-DEy6hh8y.js","assets/mcp-oauth-3sSagXIB.js","assets/auth-CQrb__XG.js","assets/layout-BrOOamwF.js","assets/useRouterState-DHEqnwQV.js","assets/required-auth-layout-Dxn3k4iE.js","assets/use-deployment-admin-Bmi-kdVG.js","assets/users-DvGWbjGS.js","assets/index-TOHs7gY4.js","assets/sidebar-ClgWST96.js","assets/LayoutLeft-CjoYHqKJ.js","assets/use-mobile-CEfYZOEn.js","assets/X-CbhCy8Mo.js","assets/tooltip-DbFmaoPO.js","assets/collection-table-wrapper-CGjeeRRn.js","assets/table-mC7JPRDO.js","assets/ArrowUp-1eyms-W6.js","assets/empty-state-B7NTS5AI.js","assets/search-input-D2xAWqQr.js","assets/SearchMd-CC5d4vOH.js","assets/avatar-lvjvIUo3.js","assets/User01-CkJ2pXv_.js","assets/badge-JndFUZsS.js","assets/use-debounced-value-BO8CbkTJ.js","assets/admin-fetch-CCSvjTk1.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/get-initials-D-f_fDFw.js","assets/orgs-qf3_u6-D.js","assets/label-DINUe_U6.js","assets/dialog-Dzs4Fh0g.js","assets/select-6iTMeDbP.js","assets/ChevronUp-Oiv21hbj.js","assets/ChevronDown-C_zJY6h3.js","assets/shell-layout-BgxszLda.js","assets/Users03-RM36UPcU.js","assets/SearchLg-CSECHP27.js","assets/Stars02-CUsMl7D_.js","assets/XClose-BYrQfw_B.js","assets/CheckCircle-BotS6_2J.js","assets/FilterLines-DbG7lWLi.js","assets/Zap-BWa6_Qzx.js","assets/use-t-C0vToFEy.js","assets/autosend-DbjOvQo2.js","assets/use-mcp-client-B6pyaFnV.js","assets/hooks-BaTTMyRs.js","assets/decopilot-sse-pool-DkbX89gY.js","assets/tab-id-BijBBRwE.js","assets/use-organization-settings-B0eas1J3.js","assets/studio-tools-CCswSbCZ.js","assets/use-org-sso-C8DxKIs-.js","assets/onboarding-CDE8VR3t.js","assets/organization-choice-BTNn4JOm.js","assets/switch-jCyFEUwx.js","assets/Globe04-Czw8KC88.js","assets/Palette-sWaX88jT.js","assets/Upload01-BI3kM4PZ.js","assets/commerce-onboarding-Lsv0oOsQ.js","assets/self-tool-result-D6rWHHjD.js","assets/integration-icon-Bdl3-9dS.js","assets/Tool02-bGnWJ-d9.js","assets/agent-icon-DAAo3oB_.js","assets/AlertCircle-DQkyZPkM.js","assets/Tool01-BoU9iMpN.js","assets/Settings02-DQuL5b-n.js","assets/XCircle-Caa3OuLn.js","assets/ArrowUpRight-BWBfIqOE.js","assets/TrendUp01-BkoROJWD.js","assets/ZapSquare-ZGCRBIp6.js","assets/ZoomOut-DrHG2xPT.js","assets/ChevronRight-BKMuwTeX.js","assets/DotsVertical-8I9Vrhhx.js","assets/Copy01-DLy2IECm.js","assets/Globe01-Bhytxdfk.js","assets/Eye-YxwysDYV.js","assets/Star01-BQDPdlkP.js","assets/SwitchHorizontal01-CB6H-axP.js","assets/HardDrive-C91EaPUL.js","assets/Image01-BOgSXZ7b.js","assets/Key01-BjeELhvw.js","assets/LinkExternal01-DYnWOjEr.js","assets/Monitor01-D9DUJw9b.js","assets/Sun-CvPuoJa7.js","assets/Package-C3ajKu1J.js","assets/Play-fpHQwKuW.js","assets/Plus-CGJ5GRwK.js","assets/Shield01-BnUznbjB.js","assets/Stars01-BiqbUn3O.js","assets/Trash01-DSRYCkid.js","assets/Users01-B4YjQ0nM.js","assets/companions-core-fLcUTqpg.js","assets/extract-connection-data-Dzfyxxnx.js","assets/github-repo-scope-DjMZbiKa.js","assets/form-DeLeLEUt.js","assets/provision-repo-scoped-github-connection-2iDn-wQ1.js","assets/authenticate-and-persist-oauth-B-7Jlcee.js","assets/reports-8lm2jYlA.js","assets/reports-BWI6IDQq.css","assets/index-tm56IEST.js","assets/skeleton-Ct3kygS6.js","assets/use-virtual-mcp-CQeK_cMY.js","assets/use-collections-p8O3FNK5.js","assets/popover-v1E4Fhm0.js","assets/alert-dialog-npzaR4uz.js","assets/chat-context-BzplOHu0.js","assets/use-ai-providers-CMeS6-3M.js","assets/location-BpLtHjTZ.js","assets/use-decopilot-events-CKWZHtTT.js","assets/toolbar-icon-button-CpYGlHSb.js","assets/drawer-rdDU5EWU.js","assets/use-registry-app-wpYe0Yei.js","assets/use-mcp-tools-YtJb7q1J.js","assets/github-repo-picker-B89oQ8nC.js","assets/collection-search-BkGkKAJn.js","assets/use-connection-BqA3UiQY.js","assets/use-navigate-to-agent-D-CScWkM.js","assets/reusable-new-chat-CouMjkYR.js","assets/use-deco-credits-D5R06WkK.js","assets/connection-card-DdfPZnU-.js","assets/use-registry-connections-BUp1bCP9.js","assets/useInfiniteQuery-DE-HeWYQ.js","assets/use-infinite-scroll-Btz9oc8t.js","assets/connection-slug-eyAPH6o3.js","assets/card-BAfgvx-F.js","assets/textarea-CW8gt2nr.js","assets/connection-form-helpers-9SoxU_8N.js","assets/collection-tabs-C3JmM6iM.js","assets/useSuspenseInfiniteQuery-DReNjGkM.js","assets/index-CSXVQ6B-.js","assets/invite-member-dialog-c0_XmQat.js","assets/use-org-auth-client-CDWbXTY-.js","assets/use-organization-roles-C3uDf6ef.js","assets/connect-desktop-dialog-CVVh9cb3.js","assets/toggle-group-DRPlWWaY.js","assets/command-CpH0rUss.js","assets/index-C2OvYnDQ.js","assets/shell-controls-lnwVjHGS.js","assets/use-clock-tick-BqvxGF_N.js","assets/toolbar-xTEmd8-2.js","assets/index-J0-zdiVG.js","assets/automation-runs-B-bzuqnz.js","assets/use-members-Ca5xyvsD.js","assets/use-automations-DBWzH_gR.js","assets/use-copy-DM4U1-7s.js","assets/file-type-icon-COxuwNw6.js","assets/monaco-editor-BTH_ZKL3.js","assets/index-CGhWyM71.js","assets/index-DmcZHBu4.js","assets/calendar-D4uPDRzj.js","assets/AreaChart-BoPBXpQh.js","assets/index-BIGDsKN-.js","assets/dropdown-menu-gw2Ee99q.js","assets/tabs-CCmBSzzX.js","assets/select-model-DW3lL7sI.js","assets/checkbox-BlC04c-K.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-ydnyKt4i.js","assets/index-DoojYIRI.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-nptUXCJn.js","assets/use-capability-DHFB9W7L.js","assets/use-debounced-autosave-D9X_vXvM.js","assets/use-mcp-auth-status-J8OBK7rq.js","assets/use-secrets-CU1MOqtl.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/use-file-configs-C5n4X6pK.js","assets/automation-list-row-DvQVx0rD.js","assets/index-DDGTF8rc.css","assets/index-CUB1pa70.js","assets/settings-layout-BKgo0OhA.js","assets/use-join-requests-yOuLIjH4.js","assets/index-redirect-BDCF1ed3.js","assets/capability-load-error-DRGbES7P.js","assets/connections-BUT4xtlh.js","assets/collection-display-button-BFdGB3aQ.js","assets/view-mode-toggle-CgUnoYsD.js","assets/use-delete-connection-Wo0RaRmN.js","assets/use-view-mode-Ov1lbWyD.js","assets/connection-detail-DHycA4fS.js","assets/index-BWTZGxH5.js","assets/index-Cg8MvLOr.js","assets/use-create-virtual-mcp-bSyfhPfQ.js","assets/monitoring-stats-row-CGsUZmOm.js","assets/collection-detail-E6u4e-px.js","assets/alert-NHNJ9RhR.js","assets/index-CNSuLu5S.js","assets/require-capability-BO9IoRE5.js","assets/access-gate-B7rcAQOR.js","assets/multi-select-CjDS7mjZ.js","assets/general-CPeMOsd5.js","assets/domain-settings-BwB7x1X9.js","assets/brand-context-DYCHu24t.js","assets/ai-providers-jfZcI2HF.js","assets/secrets-BsBqN8Ek.js","assets/buckets-C8qYIfjG.js","assets/members-DrOH6Fqm.js","assets/role-color-Dn2tXDDF.js","assets/roles-GP7WhHNE.js","assets/sso-C_M1ftWf.js","assets/profile-DGsdccyo.js","assets/store-CLgxTkh8.js","assets/registry-Cuy31Gle.js","assets/store-registry-gtan6bSq.js","assets/agents-list-C5gYxxiG.js","assets/automations-BfEcG7-7.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function kj(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 l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).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)}})();const Dj="modulepreload",Lj=function(e){return"/"+e},E2={},ut=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");o=l(n.map(f=>{if(f=Lj(f),f in E2)return;E2[f]=!0;const p=f.endsWith(".css"),h=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":Dj,p||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),p)return new Promise((v,_)=>{g.addEventListener("load",v),g.addEventListener("error",()=>_(Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var Lce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Py={exports:{}},Wu={};var x2;function $j(){if(x2)return Wu;x2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var l=null;if(s!==void 0&&(l=""+s),o.key!==void 0&&(l=""+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:l,ref:o!==void 0?o:null,props:s}}return Wu.Fragment=t,Wu.jsx=n,Wu.jsxs=n,Wu}var R2;function jj(){return R2||(R2=1,Py.exports=$j()),Py.exports}var C=jj(),My={exports:{}},Qu={},Ny={exports:{}},ky={};var O2;function zj(){return O2||(O2=1,(function(e){function t(q,W){var te=q.length;q.push(W);e:for(;0<te;){var le=te-1>>>1,Q=q[le];if(0<o(Q,W))q[le]=W,q[te]=Q,te=le;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],te=q.pop();if(te!==W){q[0]=te;e:for(var le=0,Q=q.length,k=Q>>>1;le<k;){var G=2*(le+1)-1,V=q[G],D=G+1,U=q[D];if(0>o(V,te))D<Q&&0>o(U,V)?(q[le]=U,q[D]=te,le=D):(q[le]=V,q[G]=te,le=G);else if(D<Q&&0>o(U,te))q[le]=U,q[D]=te,le=D;else break e}}return W}function o(q,W){var te=q.sortIndex-W.sortIndex;return te!==0?te:q.id-W.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 l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],p=1,h=null,g=3,v=!1,_=!1,b=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function O(q){if(b=!1,R(q),!_)if(n(d)!==null)_=!0,A||(A=!0,B());else{var W=n(f);W!==null&&ie(O,W.startTime-q)}}var A=!1,I=-1,M=5,L=-1;function H(){return x?!0:!(e.unstable_now()-L<M)}function j(){if(x=!1,A){var q=e.unstable_now();L=q;var W=!0;try{e:{_=!1,b&&(b=!1,E(I),I=-1),v=!0;var te=g;try{t:{for(R(q),h=n(d);h!==null&&!(h.expirationTime>q&&H());){var le=h.callback;if(typeof le=="function"){h.callback=null,g=h.priorityLevel;var Q=le(h.expirationTime<=q);if(q=e.unstable_now(),typeof Q=="function"){h.callback=Q,R(q),W=!0;break t}h===n(d)&&r(d),R(q)}else r(d);h=n(d)}if(h!==null)W=!0;else{var k=n(f);k!==null&&ie(O,k.startTime-q),W=!1}}break e}finally{h=null,g=te,v=!1}W=void 0}}finally{W?B():A=!1}}}var B;if(typeof T=="function")B=function(){T(j)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Z=F.port2;F.port1.onmessage=j,B=function(){Z.postMessage(null)}}else B=function(){S(j,0)};function ie(q,W){I=S(function(){q(e.unstable_now())},W)}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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var te=g;g=W;try{return q()}finally{g=te}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var te=g;g=q;try{return W()}finally{g=te}},e.unstable_scheduleCallback=function(q,W,te){var le=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?le+te:le):te=le,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=te+Q,q={id:p++,callback:W,priorityLevel:q,startTime:te,expirationTime:Q,sortIndex:-1},te>le?(q.sortIndex=te,t(f,q),n(d)===null&&q===n(f)&&(b?(E(I),I=-1):b=!0,ie(O,te-le))):(q.sortIndex=Q,t(d,q),_||v||(_=!0,A||(A=!0,B()))),q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(q){var W=g;return function(){var te=g;g=W;try{return q.apply(this,arguments)}finally{g=te}}}})(ky)),ky}var T2;function Uj(){return T2||(T2=1,Ny.exports=zj()),Ny.exports}var Dy={exports:{}},ot={};var C2;function Fj(){if(C2)return ot;C2=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"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=g&&k[g]||k["@@iterator"],typeof k=="function"?k:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function S(k,G,V){this.props=k,this.context=G,this.refs=x,this.updater=V||_}S.prototype.isReactComponent={},S.prototype.setState=function(k,G){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,G,"setState")},S.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=S.prototype;function T(k,G,V){this.props=k,this.context=G,this.refs=x,this.updater=V||_}var R=T.prototype=new E;R.constructor=T,b(R,S.prototype),R.isPureReactComponent=!0;var O=Array.isArray;function A(){}var I={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function L(k,G,V){var D=V.ref;return{$$typeof:e,type:k,key:G,ref:D!==void 0?D:null,props:V}}function H(k,G){return L(k.type,G,k.props)}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function B(k){var G={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(V){return G[V]})}var F=/\/+/g;function Z(k,G){return typeof k=="object"&&k!==null&&k.key!=null?B(""+k.key):G.toString(36)}function ie(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(A,A):(k.status="pending",k.then(function(G){k.status==="pending"&&(k.status="fulfilled",k.value=G)},function(G){k.status==="pending"&&(k.status="rejected",k.reason=G)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function q(k,G,V,D,U){var X=typeof k;(X==="undefined"||X==="boolean")&&(k=null);var fe=!1;if(k===null)fe=!0;else switch(X){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(k.$$typeof){case e:case t:fe=!0;break;case p:return fe=k._init,q(fe(k._payload),G,V,D,U)}}if(fe)return U=U(k),fe=D===""?"."+Z(k,0):D,O(U)?(V="",fe!=null&&(V=fe.replace(F,"$&/")+"/"),q(U,G,V,"",function(je){return je})):U!=null&&(j(U)&&(U=H(U,V+(U.key==null||k&&k.key===U.key?"":(""+U.key).replace(F,"$&/")+"/")+fe)),G.push(U)),1;fe=0;var pe=D===""?".":D+":";if(O(k))for(var xe=0;xe<k.length;xe++)D=k[xe],X=pe+Z(D,xe),fe+=q(D,G,V,X,U);else if(xe=v(k),typeof xe=="function")for(k=xe.call(k),xe=0;!(D=k.next()).done;)D=D.value,X=pe+Z(D,xe++),fe+=q(D,G,V,X,U);else if(X==="object"){if(typeof k.then=="function")return q(ie(k),G,V,D,U);throw G=String(k),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return fe}function W(k,G,V){if(k==null)return k;var D=[],U=0;return q(k,D,"","",function(X){return G.call(V,X,U++)}),D}function te(k){if(k._status===-1){var G=k._result;G=G(),G.then(function(V){(k._status===0||k._status===-1)&&(k._status=1,k._result=V)},function(V){(k._status===0||k._status===-1)&&(k._status=2,k._result=V)}),k._status===-1&&(k._status=0,k._result=G)}if(k._status===1)return k._result.default;throw k._result}var le=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Q={map:W,forEach:function(k,G,V){W(k,function(){G.apply(this,arguments)},V)},count:function(k){var G=0;return W(k,function(){G++}),G},toArray:function(k){return W(k,function(G){return G})||[]},only:function(k){if(!j(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return ot.Activity=h,ot.Children=Q,ot.Component=S,ot.Fragment=n,ot.Profiler=o,ot.PureComponent=T,ot.StrictMode=r,ot.Suspense=d,ot.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ot.__COMPILER_RUNTIME={__proto__:null,c:function(k){return I.H.useMemoCache(k)}},ot.cache=function(k){return function(){return k.apply(null,arguments)}},ot.cacheSignal=function(){return null},ot.cloneElement=function(k,G,V){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var D=b({},k.props),U=k.key;if(G!=null)for(X in G.key!==void 0&&(U=""+G.key),G)!M.call(G,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&G.ref===void 0||(D[X]=G[X]);var X=arguments.length-2;if(X===1)D.children=V;else if(1<X){for(var fe=Array(X),pe=0;pe<X;pe++)fe[pe]=arguments[pe+2];D.children=fe}return L(k.type,U,D)},ot.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},ot.createElement=function(k,G,V){var D,U={},X=null;if(G!=null)for(D in G.key!==void 0&&(X=""+G.key),G)M.call(G,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(U[D]=G[D]);var fe=arguments.length-2;if(fe===1)U.children=V;else if(1<fe){for(var pe=Array(fe),xe=0;xe<fe;xe++)pe[xe]=arguments[xe+2];U.children=pe}if(k&&k.defaultProps)for(D in fe=k.defaultProps,fe)U[D]===void 0&&(U[D]=fe[D]);return L(k,X,U)},ot.createRef=function(){return{current:null}},ot.forwardRef=function(k){return{$$typeof:c,render:k}},ot.isValidElement=j,ot.lazy=function(k){return{$$typeof:p,_payload:{_status:-1,_result:k},_init:te}},ot.memo=function(k,G){return{$$typeof:f,type:k,compare:G===void 0?null:G}},ot.startTransition=function(k){var G=I.T,V={};I.T=V;try{var D=k(),U=I.S;U!==null&&U(V,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(A,le)}catch(X){le(X)}finally{G!==null&&V.types!==null&&(G.types=V.types),I.T=G}},ot.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ot.use=function(k){return I.H.use(k)},ot.useActionState=function(k,G,V){return I.H.useActionState(k,G,V)},ot.useCallback=function(k,G){return I.H.useCallback(k,G)},ot.useContext=function(k){return I.H.useContext(k)},ot.useDebugValue=function(){},ot.useDeferredValue=function(k,G){return I.H.useDeferredValue(k,G)},ot.useEffect=function(k,G){return I.H.useEffect(k,G)},ot.useEffectEvent=function(k){return I.H.useEffectEvent(k)},ot.useId=function(){return I.H.useId()},ot.useImperativeHandle=function(k,G,V){return I.H.useImperativeHandle(k,G,V)},ot.useInsertionEffect=function(k,G){return I.H.useInsertionEffect(k,G)},ot.useLayoutEffect=function(k,G){return I.H.useLayoutEffect(k,G)},ot.useMemo=function(k,G){return I.H.useMemo(k,G)},ot.useOptimistic=function(k,G){return I.H.useOptimistic(k,G)},ot.useReducer=function(k,G,V){return I.H.useReducer(k,G,V)},ot.useRef=function(k){return I.H.useRef(k)},ot.useState=function(k){return I.H.useState(k)},ot.useSyncExternalStore=function(k,G,V){return I.H.useSyncExternalStore(k,G,V)},ot.useTransition=function(){return I.H.useTransition()},ot.version="19.2.6",ot}var A2;function va(){return A2||(A2=1,Dy.exports=Fj()),Dy.exports}var Ly={exports:{}},Er={};var I2;function Bj(){if(I2)return Er;I2=1;var e=va();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; 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(d,f,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:h==null?null:""+h,children:d,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Er.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Er.createPortal=function(d,f){var p=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(d,f,null,p)},Er.flushSync=function(d){var f=l.T,p=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=p,r.d.f()}},Er.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},Er.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Er.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,h=c(p,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:g,fetchPriority:v}):p==="script"&&r.d.X(d,{crossOrigin:h,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Er.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},Er.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,h=c(p,f.crossOrigin);r.d.L(d,p,{crossOrigin:h,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})}},Er.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},Er.requestFormReset=function(d){r.d.r(d)},Er.unstable_batchedUpdates=function(d,f){return d(f)},Er.useFormState=function(d,f,p){return l.H.useFormState(d,f,p)},Er.useFormStatus=function(){return l.H.useHostTransitionStatus()},Er.version="19.2.6",Er}var P2;function aM(){if(P2)return Ly.exports;P2=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(),Ly.exports=Bj(),Ly.exports}var M2;function Vj(){if(M2)return Qu;M2=1;var e=Uj(),t=va(),n=aM();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+a+" 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 a=i,u=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(u=a.return),i=a.return;while(i)}return a.tag===3?u:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function c(i){if(i.tag===31){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function d(i){if(s(i)!==i)throw Error(r(188))}function f(i){var a=i.alternate;if(!a){if(a=s(i),a===null)throw Error(r(188));return a!==i?null:i}for(var u=i,m=a;;){var y=u.return;if(y===null)break;var w=y.alternate;if(w===null){if(m=y.return,m!==null){u=m;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===u)return d(y),i;if(w===m)return d(y),a;w=w.sibling}throw Error(r(188))}if(u.return!==m.return)u=y,m=w;else{for(var N=!1,z=y.child;z;){if(z===u){N=!0,u=y,m=w;break}if(z===m){N=!0,m=y,u=w;break}z=z.sibling}if(!N){for(z=w.child;z;){if(z===u){N=!0,u=w,m=y;break}if(z===m){N=!0,m=w,u=y;break}z=z.sibling}if(!N)throw Error(r(189))}}if(u.alternate!==m)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:a}function p(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=p(i),a!==null)return a;i=i.sibling}return null}var h=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function B(i){return i===null||typeof i!="object"?null:(i=j&&i[j]||i["@@iterator"],typeof i=="function"?i:null)}var F=Symbol.for("react.client.reference");function Z(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===F?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case b:return"Fragment";case S:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case _:return"Portal";case T:return i.displayName||"Context";case E:return(i._context.displayName||"Context")+".Consumer";case R:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return a=i.displayName||null,a!==null?a:Z(i.type)||"Memo";case M:a=i._payload,i=i._init;try{return Z(i(a))}catch{}}return null}var ie=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},le=[],Q=-1;function k(i){return{current:i}}function G(i){0>Q||(i.current=le[Q],le[Q]=null,Q--)}function V(i,a){Q++,le[Q]=i.current,i.current=a}var D=k(null),U=k(null),X=k(null),fe=k(null);function pe(i,a){switch(V(X,a),V(U,i),V(D,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?GO(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=GO(a),i=KO(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}G(D),V(D,i)}function xe(){G(D),G(U),G(X)}function je(i){i.memoizedState!==null&&V(fe,i);var a=D.current,u=KO(a,i.type);a!==u&&(V(U,i),V(D,u))}function Y(i){U.current===i&&(G(D),G(U)),fe.current===i&&(G(fe),Gu._currentValue=te)}var re,ve;function se(i){if(re===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);re=a&&a[1]||"",ve=-1<u.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+re+i+ve}var Se=!1;function Te(i,a){if(!i||Se)return"";Se=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(a){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(ge){var he=ge}Reflect.construct(i,[],Ee)}else{try{Ee.call()}catch(ge){he=ge}i.call(Ee.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Ee=i())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=m.DetermineComponentFrameRoot(),N=w[0],z=w[1];if(N&&z){var J=N.split(`
|
|
@@ -7,9 +7,9 @@ function kj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
|
|
|
7
7
|
`+J[m].replace(" at new "," at ");return i.displayName&&_e.includes("<anonymous>")&&(_e=_e.replace("<anonymous>",i.displayName)),_e}while(1<=m&&0<=y);break}}}finally{Se=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?se(u):""}function tt(i,a){switch(i.tag){case 26:case 27:case 5:return se(i.type);case 16:return se("Lazy");case 13:return i.child!==a&&a!==null?se("Suspense Fallback"):se("Suspense");case 19:return se("SuspenseList");case 0:case 15:return Te(i.type,!1);case 11:return Te(i.type.render,!1);case 1:return Te(i.type,!0);case 31:return se("Activity");default:return""}}function rt(i){try{var a="",u=null;do a+=tt(i,u),u=i,i=i.return;while(i);return a}catch(m){return`
|
|
8
8
|
Error generating stack: `+m.message+`
|
|
9
9
|
`+m.stack}}var Be=Object.prototype.hasOwnProperty,Qe=e.unstable_scheduleCallback,Me=e.unstable_cancelCallback,Pe=e.unstable_shouldYield,Fe=e.unstable_requestPaint,K=e.unstable_now,ne=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,Oe=e.unstable_UserBlockingPriority,Ae=e.unstable_NormalPriority,Ie=e.unstable_LowPriority,ke=e.unstable_IdlePriority,Je=e.log,et=e.unstable_setDisableYieldValue,_t=null,Tt=null;function bt(i){if(typeof Je=="function"&&et(i),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(_t,i)}catch{}}var Ln=Math.clz32?Math.clz32:Ye,Ni=Math.log,Go=Math.LN2;function Ye(i){return i>>>=0,i===0?32:31-(Ni(i)/Go|0)|0}var pt=256,Ct=262144,st=4194304;function Dt(i){var a=i&42;if(a!==0)return a;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 Ke(i,a,u){var m=i.pendingLanes;if(m===0)return 0;var y=0,w=i.suspendedLanes,N=i.pingedLanes;i=i.warmLanes;var z=m&134217727;return z!==0?(m=z&~w,m!==0?y=Dt(m):(N&=z,N!==0?y=Dt(N):u||(u=z&~i,u!==0&&(y=Dt(u))))):(z=m&~w,z!==0?y=Dt(z):N!==0?y=Dt(N):u||(u=m&~i,u!==0&&(y=Dt(u)))),y===0?0:a!==0&&a!==y&&(a&w)===0&&(w=y&-y,u=a&-a,w>=u||w===32&&(u&4194048)!==0)?a:y}function ft(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function Jt(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Zt(){var i=st;return st<<=1,(st&62914560)===0&&(st=4194304),i}function Sr(i){for(var a=[],u=0;31>u;u++)a.push(i);return a}function Lt(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ln(i,a,u,m,y,w){var N=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var z=i.entanglements,J=i.expirationTimes,de=i.hiddenUpdates;for(u=N&~u;0<u;){var _e=31-Ln(u),Ee=1<<_e;z[_e]=0,J[_e]=-1;var he=de[_e];if(he!==null)for(de[_e]=null,_e=0;_e<he.length;_e++){var ge=he[_e];ge!==null&&(ge.lane&=-536870913)}u&=~Ee}m!==0&&So(i,m,0),w!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=w&~(N&~a))}function So(i,a,u){i.pendingLanes|=a,i.suspendedLanes&=~a;var m=31-Ln(a);i.entangledLanes|=a,i.entanglements[m]=i.entanglements[m]|1073741824|u&261930}function sr(i,a){var u=i.entangledLanes|=a;for(i=i.entanglements;u;){var m=31-Ln(u),y=1<<m;y&a|i[m]&a&&(i[m]|=a),u&=~y}}function Ur(i,a){var u=a&-a;return u=(u&42)!==0?1:bl(u),(u&(i.suspendedLanes|a))!==0?0:u}function bl(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 Ko(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function wv(){var i=W.p;return i!==0?i:(i=window.event,i===void 0?32:g2(i.type))}function ME(i,a){var u=W.p;try{return W.p=i,a()}finally{W.p=u}}var bs=Math.random().toString(36).slice(2),ar="__reactFiber$"+bs,Fr="__reactProps$"+bs,wl="__reactContainer$"+bs,Sv="__reactEvents$"+bs,EL="__reactListeners$"+bs,xL="__reactHandles$"+bs,NE="__reactResources$"+bs,au="__reactMarker$"+bs;function Ev(i){delete i[ar],delete i[Fr],delete i[Sv],delete i[EL],delete i[xL]}function Sl(i){var a=i[ar];if(a)return a;for(var u=i.parentNode;u;){if(a=u[wl]||u[ar]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(i=e2(i);i!==null;){if(u=i[ar])return u;i=e2(i)}return a}i=u,u=i.parentNode}return null}function El(i){if(i=i[ar]||i[wl]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function lu(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function xl(i){var a=i[NE];return a||(a=i[NE]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function tr(i){i[au]=!0}var kE=new Set,DE={};function xa(i,a){Rl(i,a),Rl(i+"Capture",a)}function Rl(i,a){for(DE[i]=a,i=0;i<a.length;i++)kE.add(a[i])}var RL=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]*$"),LE={},$E={};function OL(i){return Be.call($E,i)?!0:Be.call(LE,i)?!1:RL.test(i)?$E[i]=!0:(LE[i]=!0,!1)}function Lf(i,a,u){if(OL(a))if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var m=a.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+u)}}function $f(i,a,u){if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+u)}}function ki(i,a,u,m){if(m===null)i.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(a,u,""+m)}}function Eo(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function jE(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function TL(i,a,u){var m=Object.getOwnPropertyDescriptor(i.constructor.prototype,a);if(!i.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var y=m.get,w=m.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return y.call(this)},set:function(N){u=""+N,w.call(this,N)}}),Object.defineProperty(i,a,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(N){u=""+N},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function xv(i){if(!i._valueTracker){var a=jE(i)?"checked":"value";i._valueTracker=TL(i,a,""+i[a])}}function zE(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var u=a.getValue(),m="";return i&&(m=jE(i)?i.checked?"true":"false":i.value),i=m,i!==u?(a.setValue(i),!0):!1}function jf(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 CL=/[\n"\\]/g;function xo(i){return i.replace(CL,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Rv(i,a,u,m,y,w,N,z){i.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.type=N:i.removeAttribute("type"),a!=null?N==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+Eo(a)):i.value!==""+Eo(a)&&(i.value=""+Eo(a)):N!=="submit"&&N!=="reset"||i.removeAttribute("value"),a!=null?Ov(i,N,Eo(a)):u!=null?Ov(i,N,Eo(u)):m!=null&&i.removeAttribute("value"),y==null&&w!=null&&(i.defaultChecked=!!w),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?i.name=""+Eo(z):i.removeAttribute("name")}function UE(i,a,u,m,y,w,N,z){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),a!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||a!=null)){xv(i);return}u=u!=null?""+Eo(u):"",a=a!=null?""+Eo(a):u,z||a===i.value||(i.value=a),i.defaultValue=a}m=m??y,m=typeof m!="function"&&typeof m!="symbol"&&!!m,i.checked=z?i.checked:!!m,i.defaultChecked=!!m,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(i.name=N),xv(i)}function Ov(i,a,u){a==="number"&&jf(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Ol(i,a,u,m){if(i=i.options,a){a={};for(var y=0;y<u.length;y++)a["$"+u[y]]=!0;for(u=0;u<i.length;u++)y=a.hasOwnProperty("$"+i[u].value),i[u].selected!==y&&(i[u].selected=y),y&&m&&(i[u].defaultSelected=!0)}else{for(u=""+Eo(u),a=null,y=0;y<i.length;y++){if(i[y].value===u){i[y].selected=!0,m&&(i[y].defaultSelected=!0);return}a!==null||i[y].disabled||(a=i[y])}a!==null&&(a.selected=!0)}}function FE(i,a,u){if(a!=null&&(a=""+Eo(a),a!==i.value&&(i.value=a),u==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=u!=null?""+Eo(u):""}function BE(i,a,u,m){if(a==null){if(m!=null){if(u!=null)throw Error(r(92));if(ie(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),a=u}u=Eo(a),i.defaultValue=u,m=i.textContent,m===u&&m!==""&&m!==null&&(i.value=m),xv(i)}function Tl(i,a){if(a){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=a;return}}i.textContent=a}var AL=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 VE(i,a,u){var m=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":m?i.setProperty(a,u):typeof u!="number"||u===0||AL.has(a)?a==="float"?i.cssFloat=u:i[a]=(""+u).trim():i[a]=u+"px"}function HE(i,a,u){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?i.setProperty(m,""):m==="float"?i.cssFloat="":i[m]="");for(var y in a)m=a[y],a.hasOwnProperty(y)&&u[y]!==m&&VE(i,y,m)}else for(var w in a)a.hasOwnProperty(w)&&VE(i,w,a[w])}function Tv(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 IL=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"]]),PL=/^[\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 zf(i){return PL.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Di(){}var Cv=null;function Av(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Cl=null,Al=null;function qE(i){var a=El(i);if(a&&(i=a.stateNode)){var u=i[Fr]||null;e:switch(i=a.stateNode,a.type){case"input":if(Rv(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+xo(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var m=u[a];if(m!==i&&m.form===i.form){var y=m[Fr]||null;if(!y)throw Error(r(90));Rv(m,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<u.length;a++)m=u[a],m.form===i.form&&zE(m)}break e;case"textarea":FE(i,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Ol(i,!!u.multiple,a,!1)}}}var Iv=!1;function GE(i,a,u){if(Iv)return i(a,u);Iv=!0;try{var m=i(a);return m}finally{if(Iv=!1,(Cl!==null||Al!==null)&&(Oh(),Cl&&(a=Cl,i=Al,Al=Cl=null,qE(a),i)))for(a=0;a<i.length;a++)qE(i[a])}}function cu(i,a){var u=i.stateNode;if(u===null)return null;var m=u[Fr]||null;if(m===null)return null;u=m[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,a,typeof u));return u}var Li=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pv=!1;if(Li)try{var uu={};Object.defineProperty(uu,"passive",{get:function(){Pv=!0}}),window.addEventListener("test",uu,uu),window.removeEventListener("test",uu,uu)}catch{Pv=!1}var ws=null,Mv=null,Uf=null;function KE(){if(Uf)return Uf;var i,a=Mv,u=a.length,m,y="value"in ws?ws.value:ws.textContent,w=y.length;for(i=0;i<u&&a[i]===y[i];i++);var N=u-i;for(m=1;m<=N&&a[u-m]===y[w-m];m++);return Uf=y.slice(i,1<m?1-m:void 0)}function Ff(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function Bf(){return!0}function ZE(){return!1}function Br(i){function a(u,m,y,w,N){this._reactName=u,this._targetInst=y,this.type=m,this.nativeEvent=w,this.target=N,this.currentTarget=null;for(var z in i)i.hasOwnProperty(z)&&(u=i[z],this[z]=u?u(w):w[z]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Bf:ZE,this.isPropagationStopped=ZE,this}return h(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Bf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Bf)},persist:function(){},isPersistent:Bf}),a}var Ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vf=Br(Ra),du=h({},Ra,{view:0,detail:0}),ML=Br(du),Nv,kv,fu,Hf=h({},du,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lv,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!==fu&&(fu&&i.type==="mousemove"?(Nv=i.screenX-fu.screenX,kv=i.screenY-fu.screenY):kv=Nv=0,fu=i),Nv)},movementY:function(i){return"movementY"in i?i.movementY:kv}}),YE=Br(Hf),NL=h({},Hf,{dataTransfer:0}),kL=Br(NL),DL=h({},du,{relatedTarget:0}),Dv=Br(DL),LL=h({},Ra,{animationName:0,elapsedTime:0,pseudoElement:0}),$L=Br(LL),jL=h({},Ra,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),zL=Br(jL),UL=h({},Ra,{data:0}),WE=Br(UL),FL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BL={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"},VL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HL(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=VL[i])?!!a[i]:!1}function Lv(){return HL}var qL=h({},du,{key:function(i){if(i.key){var a=FL[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=Ff(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?BL[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lv,charCode:function(i){return i.type==="keypress"?Ff(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ff(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),GL=Br(qL),KL=h({},Hf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),QE=Br(KL),ZL=h({},du,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lv}),YL=Br(ZL),WL=h({},Ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),QL=Br(WL),XL=h({},Hf,{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}),JL=Br(XL),e$=h({},Ra,{newState:0,oldState:0}),t$=Br(e$),n$=[9,13,27,32],$v=Li&&"CompositionEvent"in window,hu=null;Li&&"documentMode"in document&&(hu=document.documentMode);var r$=Li&&"TextEvent"in window&&!hu,XE=Li&&(!$v||hu&&8<hu&&11>=hu),JE=" ",ex=!1;function tx(i,a){switch(i){case"keyup":return n$.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Il=!1;function o$(i,a){switch(i){case"compositionend":return nx(a);case"keypress":return a.which!==32?null:(ex=!0,JE);case"textInput":return i=a.data,i===JE&&ex?null:i;default:return null}}function i$(i,a){if(Il)return i==="compositionend"||!$v&&tx(i,a)?(i=KE(),Uf=Mv=ws=null,Il=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return XE&&a.locale!=="ko"?null:a.data;default:return null}}var s$={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 rx(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!s$[i.type]:a==="textarea"}function ox(i,a,u,m){Cl?Al?Al.push(m):Al=[m]:Cl=m,a=Nh(a,"onChange"),0<a.length&&(u=new Vf("onChange","change",null,u,m),i.push({event:u,listeners:a}))}var pu=null,mu=null;function a$(i){UO(i,0)}function qf(i){var a=lu(i);if(zE(a))return i}function ix(i,a){if(i==="change")return a}var sx=!1;if(Li){var jv;if(Li){var zv="oninput"in document;if(!zv){var ax=document.createElement("div");ax.setAttribute("oninput","return;"),zv=typeof ax.oninput=="function"}jv=zv}else jv=!1;sx=jv&&(!document.documentMode||9<document.documentMode)}function lx(){pu&&(pu.detachEvent("onpropertychange",cx),mu=pu=null)}function cx(i){if(i.propertyName==="value"&&qf(mu)){var a=[];ox(a,mu,i,Av(i)),GE(a$,a)}}function l$(i,a,u){i==="focusin"?(lx(),pu=a,mu=u,pu.attachEvent("onpropertychange",cx)):i==="focusout"&&lx()}function c$(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return qf(mu)}function u$(i,a){if(i==="click")return qf(a)}function d$(i,a){if(i==="input"||i==="change")return qf(a)}function f$(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var to=typeof Object.is=="function"?Object.is:f$;function gu(i,a){if(to(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var u=Object.keys(i),m=Object.keys(a);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var y=u[m];if(!Be.call(a,y)||!to(i[y],a[y]))return!1}return!0}function ux(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function dx(i,a){var u=ux(i);i=0;for(var m;u;){if(u.nodeType===3){if(m=i+u.textContent.length,i<=a&&m>=a)return{node:u,offset:a-i};i=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=ux(u)}}function fx(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?fx(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function hx(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=jf(i.document);a instanceof i.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)i=a.contentWindow;else break;a=jf(i.document)}return a}function Uv(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var h$=Li&&"documentMode"in document&&11>=document.documentMode,Pl=null,Fv=null,vu=null,Bv=!1;function px(i,a,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Bv||Pl==null||Pl!==jf(m)||(m=Pl,"selectionStart"in m&&Uv(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),vu&&gu(vu,m)||(vu=m,m=Nh(Fv,"onSelect"),0<m.length&&(a=new Vf("onSelect","select",null,a,u),i.push({event:a,listeners:m}),a.target=Pl)))}function Oa(i,a){var u={};return u[i.toLowerCase()]=a.toLowerCase(),u["Webkit"+i]="webkit"+a,u["Moz"+i]="moz"+a,u}var Ml={animationend:Oa("Animation","AnimationEnd"),animationiteration:Oa("Animation","AnimationIteration"),animationstart:Oa("Animation","AnimationStart"),transitionrun:Oa("Transition","TransitionRun"),transitionstart:Oa("Transition","TransitionStart"),transitioncancel:Oa("Transition","TransitionCancel"),transitionend:Oa("Transition","TransitionEnd")},Vv={},mx={};Li&&(mx=document.createElement("div").style,"AnimationEvent"in window||(delete Ml.animationend.animation,delete Ml.animationiteration.animation,delete Ml.animationstart.animation),"TransitionEvent"in window||delete Ml.transitionend.transition);function Ta(i){if(Vv[i])return Vv[i];if(!Ml[i])return i;var a=Ml[i],u;for(u in a)if(a.hasOwnProperty(u)&&u in mx)return Vv[i]=a[u];return i}var gx=Ta("animationend"),vx=Ta("animationiteration"),yx=Ta("animationstart"),p$=Ta("transitionrun"),m$=Ta("transitionstart"),g$=Ta("transitioncancel"),_x=Ta("transitionend"),bx=new Map,Hv="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(" ");Hv.push("scrollEnd");function Zo(i,a){bx.set(i,a),xa(a,[i])}var Gf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Ro=[],Nl=0,qv=0;function Kf(){for(var i=Nl,a=qv=Nl=0;a<i;){var u=Ro[a];Ro[a++]=null;var m=Ro[a];Ro[a++]=null;var y=Ro[a];Ro[a++]=null;var w=Ro[a];if(Ro[a++]=null,m!==null&&y!==null){var N=m.pending;N===null?y.next=y:(y.next=N.next,N.next=y),m.pending=y}w!==0&&wx(u,y,w)}}function Zf(i,a,u,m){Ro[Nl++]=i,Ro[Nl++]=a,Ro[Nl++]=u,Ro[Nl++]=m,qv|=m,i.lanes|=m,i=i.alternate,i!==null&&(i.lanes|=m)}function Gv(i,a,u,m){return Zf(i,a,u,m),Yf(i)}function Ca(i,a){return Zf(i,null,null,a),Yf(i)}function wx(i,a,u){i.lanes|=u;var m=i.alternate;m!==null&&(m.lanes|=u);for(var y=!1,w=i.return;w!==null;)w.childLanes|=u,m=w.alternate,m!==null&&(m.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(y=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,y&&a!==null&&(y=31-Ln(u),i=w.hiddenUpdates,m=i[y],m===null?i[y]=[a]:m.push(a),a.lane=u|536870912),w):null}function Yf(i){if(50<zu)throw zu=0,ty=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var kl={};function v$(i,a,u,m){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function no(i,a,u,m){return new v$(i,a,u,m)}function Kv(i){return i=i.prototype,!(!i||!i.isReactComponent)}function $i(i,a){var u=i.alternate;return u===null?(u=no(i.tag,a,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=a,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,a=i.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function Sx(i,a){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,a=u.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function Wf(i,a,u,m,y,w){var N=0;if(m=i,typeof i=="function")Kv(i)&&(N=1);else if(typeof i=="string")N=Sj(i,u,D.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case L:return i=no(31,u,a,y),i.elementType=L,i.lanes=w,i;case b:return Aa(u.children,y,w,a);case x:N=8,y|=24;break;case S:return i=no(12,u,a,y|2),i.elementType=S,i.lanes=w,i;case O:return i=no(13,u,a,y),i.elementType=O,i.lanes=w,i;case A:return i=no(19,u,a,y),i.elementType=A,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:N=10;break e;case E:N=9;break e;case R:N=11;break e;case I:N=14;break e;case M:N=16,m=null;break e}N=29,u=Error(r(130,i===null?"null":typeof i,"")),m=null}return a=no(N,u,a,y),a.elementType=i,a.type=m,a.lanes=w,a}function Aa(i,a,u,m){return i=no(7,i,m,a),i.lanes=u,i}function Zv(i,a,u){return i=no(6,i,null,a),i.lanes=u,i}function Ex(i){var a=no(18,null,null,0);return a.stateNode=i,a}function Yv(i,a,u){return a=no(4,i.children!==null?i.children:[],i.key,a),a.lanes=u,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var xx=new WeakMap;function Oo(i,a){if(typeof i=="object"&&i!==null){var u=xx.get(i);return u!==void 0?u:(a={value:i,source:a,stack:rt(a)},xx.set(i,a),a)}return{value:i,source:a,stack:rt(a)}}var Dl=[],Ll=0,Qf=null,yu=0,To=[],Co=0,Ss=null,ui=1,di="";function ji(i,a){Dl[Ll++]=yu,Dl[Ll++]=Qf,Qf=i,yu=a}function Rx(i,a,u){To[Co++]=ui,To[Co++]=di,To[Co++]=Ss,Ss=i;var m=ui;i=di;var y=32-Ln(m)-1;m&=~(1<<y),u+=1;var w=32-Ln(a)+y;if(30<w){var N=y-y%5;w=(m&(1<<N)-1).toString(32),m>>=N,y-=N,ui=1<<32-Ln(a)+y|u<<y|m,di=w+i}else ui=1<<w|u<<y|m,di=i}function Wv(i){i.return!==null&&(ji(i,1),Rx(i,1,0))}function Qv(i){for(;i===Qf;)Qf=Dl[--Ll],Dl[Ll]=null,yu=Dl[--Ll],Dl[Ll]=null;for(;i===Ss;)Ss=To[--Co],To[Co]=null,di=To[--Co],To[Co]=null,ui=To[--Co],To[Co]=null}function Ox(i,a){To[Co++]=ui,To[Co++]=di,To[Co++]=Ss,ui=a.id,di=a.overflow,Ss=i}var lr=null,cn=null,At=!1,Es=null,Ao=!1,Xv=Error(r(519));function xs(i){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _u(Oo(a,i)),Xv}function Tx(i){var a=i.stateNode,u=i.type,m=i.memoizedProps;switch(a[ar]=i,a[Fr]=m,u){case"dialog":St("cancel",a),St("close",a);break;case"iframe":case"object":case"embed":St("load",a);break;case"video":case"audio":for(u=0;u<Fu.length;u++)St(Fu[u],a);break;case"source":St("error",a);break;case"img":case"image":case"link":St("error",a),St("load",a);break;case"details":St("toggle",a);break;case"input":St("invalid",a),UE(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":St("invalid",a);break;case"textarea":St("invalid",a),BE(a,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||m.suppressHydrationWarning===!0||HO(a.textContent,u)?(m.popover!=null&&(St("beforetoggle",a),St("toggle",a)),m.onScroll!=null&&St("scroll",a),m.onScrollEnd!=null&&St("scrollend",a),m.onClick!=null&&(a.onclick=Di),a=!0):a=!1,a||xs(i,!0)}function Cx(i){for(lr=i.return;lr;)switch(lr.tag){case 5:case 31:case 13:Ao=!1;return;case 27:case 3:Ao=!0;return;default:lr=lr.return}}function $l(i){if(i!==lr)return!1;if(!At)return Cx(i),At=!0,!1;var a=i.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||gy(i.type,i.memoizedProps)),u=!u),u&&cn&&xs(i),Cx(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));cn=JO(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));cn=JO(i)}else a===27?(a=cn,js(i.type)?(i=wy,wy=null,cn=i):cn=a):cn=lr?Po(i.stateNode.nextSibling):null;return!0}function Ia(){cn=lr=null,At=!1}function Jv(){var i=Es;return i!==null&&(Gr===null?Gr=i:Gr.push.apply(Gr,i),Es=null),i}function _u(i){Es===null?Es=[i]:Es.push(i)}var e0=k(null),Pa=null,zi=null;function Rs(i,a,u){V(e0,a._currentValue),a._currentValue=u}function Ui(i){i._currentValue=e0.current,G(e0)}function t0(i,a,u){for(;i!==null;){var m=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),i===u)break;i=i.return}}function n0(i,a,u,m){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var w=y.dependencies;if(w!==null){var N=y.child;w=w.firstContext;e:for(;w!==null;){var z=w;w=y;for(var J=0;J<a.length;J++)if(z.context===a[J]){w.lanes|=u,z=w.alternate,z!==null&&(z.lanes|=u),t0(w.return,u,i),m||(N=null);break e}w=z.next}}else if(y.tag===18){if(N=y.return,N===null)throw Error(r(341));N.lanes|=u,w=N.alternate,w!==null&&(w.lanes|=u),t0(N,u,i),N=null}else N=y.child;if(N!==null)N.return=y;else for(N=y;N!==null;){if(N===i){N=null;break}if(y=N.sibling,y!==null){y.return=N.return,N=y;break}N=N.return}y=N}}function jl(i,a,u,m){i=null;for(var y=a,w=!1;y!==null;){if(!w){if((y.flags&524288)!==0)w=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var N=y.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var z=y.type;to(y.pendingProps.value,N.value)||(i!==null?i.push(z):i=[z])}}else if(y===fe.current){if(N=y.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(Gu):i=[Gu])}y=y.return}i!==null&&n0(a,i,u,m),a.flags|=262144}function Xf(i){for(i=i.firstContext;i!==null;){if(!to(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ma(i){Pa=i,zi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function cr(i){return Ax(Pa,i)}function Jf(i,a){return Pa===null&&Ma(i),Ax(i,a)}function Ax(i,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},zi===null){if(i===null)throw Error(r(308));zi=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else zi=zi.next=a;return u}var y$=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(u,m){i.push(m)}};this.abort=function(){a.aborted=!0,i.forEach(function(u){return u()})}},_$=e.unstable_scheduleCallback,b$=e.unstable_NormalPriority,$n={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function r0(){return{controller:new y$,data:new Map,refCount:0}}function bu(i){i.refCount--,i.refCount===0&&_$(b$,function(){i.controller.abort()})}var wu=null,o0=0,zl=0,Ul=null;function w$(i,a){if(wu===null){var u=wu=[];o0=0,zl=ay(),Ul={status:"pending",value:void 0,then:function(m){u.push(m)}}}return o0++,a.then(Ix,Ix),a}function Ix(){if(--o0===0&&wu!==null){Ul!==null&&(Ul.status="fulfilled");var i=wu;wu=null,zl=0,Ul=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function S$(i,a){var u=[],m={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return i.then(function(){m.status="fulfilled",m.value=a;for(var y=0;y<u.length;y++)(0,u[y])(a)},function(y){for(m.status="rejected",m.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),m}var Px=q.S;q.S=function(i,a){pO=K(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&w$(i,a),Px!==null&&Px(i,a)};var Na=k(null);function i0(){var i=Na.current;return i!==null?i:en.pooledCache}function eh(i,a){a===null?V(Na,Na.current):V(Na,a.pool)}function Mx(){var i=i0();return i===null?null:{parent:$n._currentValue,pool:i}}var Fl=Error(r(460)),s0=Error(r(474)),th=Error(r(542)),nh={then:function(){}};function Nx(i){return i=i.status,i==="fulfilled"||i==="rejected"}function kx(i,a,u){switch(u=i[u],u===void 0?i.push(a):u!==a&&(a.then(Di,Di),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Lx(i),i;default:if(typeof a.status=="string")a.then(Di,Di);else{if(i=en,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(m){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=m}},function(m){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=m}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Lx(i),i}throw Da=a,Fl}}function ka(i){try{var a=i._init;return a(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Da=u,Fl):u}}var Da=null;function Dx(){if(Da===null)throw Error(r(459));var i=Da;return Da=null,i}function Lx(i){if(i===Fl||i===th)throw Error(r(483))}var Bl=null,Su=0;function rh(i){var a=Su;return Su+=1,Bl===null&&(Bl=[]),kx(Bl,i,a)}function Eu(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function oh(i,a){throw a.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function $x(i){function a(ce,oe){if(i){var ue=ce.deletions;ue===null?(ce.deletions=[oe],ce.flags|=16):ue.push(oe)}}function u(ce,oe){if(!i)return null;for(;oe!==null;)a(ce,oe),oe=oe.sibling;return null}function m(ce){for(var oe=new Map;ce!==null;)ce.key!==null?oe.set(ce.key,ce):oe.set(ce.index,ce),ce=ce.sibling;return oe}function y(ce,oe){return ce=$i(ce,oe),ce.index=0,ce.sibling=null,ce}function w(ce,oe,ue){return ce.index=ue,i?(ue=ce.alternate,ue!==null?(ue=ue.index,ue<oe?(ce.flags|=67108866,oe):ue):(ce.flags|=67108866,oe)):(ce.flags|=1048576,oe)}function N(ce){return i&&ce.alternate===null&&(ce.flags|=67108866),ce}function z(ce,oe,ue,we){return oe===null||oe.tag!==6?(oe=Zv(ue,ce.mode,we),oe.return=ce,oe):(oe=y(oe,ue),oe.return=ce,oe)}function J(ce,oe,ue,we){var Xe=ue.type;return Xe===b?_e(ce,oe,ue.props.children,we,ue.key):oe!==null&&(oe.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===M&&ka(Xe)===oe.type)?(oe=y(oe,ue.props),Eu(oe,ue),oe.return=ce,oe):(oe=Wf(ue.type,ue.key,ue.props,null,ce.mode,we),Eu(oe,ue),oe.return=ce,oe)}function de(ce,oe,ue,we){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==ue.containerInfo||oe.stateNode.implementation!==ue.implementation?(oe=Yv(ue,ce.mode,we),oe.return=ce,oe):(oe=y(oe,ue.children||[]),oe.return=ce,oe)}function _e(ce,oe,ue,we,Xe){return oe===null||oe.tag!==7?(oe=Aa(ue,ce.mode,we,Xe),oe.return=ce,oe):(oe=y(oe,ue),oe.return=ce,oe)}function Ee(ce,oe,ue){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return oe=Zv(""+oe,ce.mode,ue),oe.return=ce,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return ue=Wf(oe.type,oe.key,oe.props,null,ce.mode,ue),Eu(ue,oe),ue.return=ce,ue;case _:return oe=Yv(oe,ce.mode,ue),oe.return=ce,oe;case M:return oe=ka(oe),Ee(ce,oe,ue)}if(ie(oe)||B(oe))return oe=Aa(oe,ce.mode,ue,null),oe.return=ce,oe;if(typeof oe.then=="function")return Ee(ce,rh(oe),ue);if(oe.$$typeof===T)return Ee(ce,Jf(ce,oe),ue);oh(ce,oe)}return null}function he(ce,oe,ue,we){var Xe=oe!==null?oe.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Xe!==null?null:z(ce,oe,""+ue,we);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:return ue.key===Xe?J(ce,oe,ue,we):null;case _:return ue.key===Xe?de(ce,oe,ue,we):null;case M:return ue=ka(ue),he(ce,oe,ue,we)}if(ie(ue)||B(ue))return Xe!==null?null:_e(ce,oe,ue,we,null);if(typeof ue.then=="function")return he(ce,oe,rh(ue),we);if(ue.$$typeof===T)return he(ce,oe,Jf(ce,ue),we);oh(ce,ue)}return null}function ge(ce,oe,ue,we,Xe){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return ce=ce.get(ue)||null,z(oe,ce,""+we,Xe);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case v:return ce=ce.get(we.key===null?ue:we.key)||null,J(oe,ce,we,Xe);case _:return ce=ce.get(we.key===null?ue:we.key)||null,de(oe,ce,we,Xe);case M:return we=ka(we),ge(ce,oe,ue,we,Xe)}if(ie(we)||B(we))return ce=ce.get(ue)||null,_e(oe,ce,we,Xe,null);if(typeof we.then=="function")return ge(ce,oe,ue,rh(we),Xe);if(we.$$typeof===T)return ge(ce,oe,ue,Jf(oe,we),Xe);oh(oe,we)}return null}function qe(ce,oe,ue,we){for(var Xe=null,$t=null,Ze=oe,lt=oe=0,Ot=null;Ze!==null&<<ue.length;lt++){Ze.index>lt?(Ot=Ze,Ze=null):Ot=Ze.sibling;var jt=he(ce,Ze,ue[lt],we);if(jt===null){Ze===null&&(Ze=Ot);break}i&&Ze&&jt.alternate===null&&a(ce,Ze),oe=w(jt,oe,lt),$t===null?Xe=jt:$t.sibling=jt,$t=jt,Ze=Ot}if(lt===ue.length)return u(ce,Ze),At&&ji(ce,lt),Xe;if(Ze===null){for(;lt<ue.length;lt++)Ze=Ee(ce,ue[lt],we),Ze!==null&&(oe=w(Ze,oe,lt),$t===null?Xe=Ze:$t.sibling=Ze,$t=Ze);return At&&ji(ce,lt),Xe}for(Ze=m(Ze);lt<ue.length;lt++)Ot=ge(Ze,ce,lt,ue[lt],we),Ot!==null&&(i&&Ot.alternate!==null&&Ze.delete(Ot.key===null?lt:Ot.key),oe=w(Ot,oe,lt),$t===null?Xe=Ot:$t.sibling=Ot,$t=Ot);return i&&Ze.forEach(function(Vs){return a(ce,Vs)}),At&&ji(ce,lt),Xe}function nt(ce,oe,ue,we){if(ue==null)throw Error(r(151));for(var Xe=null,$t=null,Ze=oe,lt=oe=0,Ot=null,jt=ue.next();Ze!==null&&!jt.done;lt++,jt=ue.next()){Ze.index>lt?(Ot=Ze,Ze=null):Ot=Ze.sibling;var Vs=he(ce,Ze,jt.value,we);if(Vs===null){Ze===null&&(Ze=Ot);break}i&&Ze&&Vs.alternate===null&&a(ce,Ze),oe=w(Vs,oe,lt),$t===null?Xe=Vs:$t.sibling=Vs,$t=Vs,Ze=Ot}if(jt.done)return u(ce,Ze),At&&ji(ce,lt),Xe;if(Ze===null){for(;!jt.done;lt++,jt=ue.next())jt=Ee(ce,jt.value,we),jt!==null&&(oe=w(jt,oe,lt),$t===null?Xe=jt:$t.sibling=jt,$t=jt);return At&&ji(ce,lt),Xe}for(Ze=m(Ze);!jt.done;lt++,jt=ue.next())jt=ge(Ze,ce,lt,jt.value,we),jt!==null&&(i&&jt.alternate!==null&&Ze.delete(jt.key===null?lt:jt.key),oe=w(jt,oe,lt),$t===null?Xe=jt:$t.sibling=jt,$t=jt);return i&&Ze.forEach(function(Nj){return a(ce,Nj)}),At&&ji(ce,lt),Xe}function Qt(ce,oe,ue,we){if(typeof ue=="object"&&ue!==null&&ue.type===b&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:e:{for(var Xe=ue.key;oe!==null;){if(oe.key===Xe){if(Xe=ue.type,Xe===b){if(oe.tag===7){u(ce,oe.sibling),we=y(oe,ue.props.children),we.return=ce,ce=we;break e}}else if(oe.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===M&&ka(Xe)===oe.type){u(ce,oe.sibling),we=y(oe,ue.props),Eu(we,ue),we.return=ce,ce=we;break e}u(ce,oe);break}else a(ce,oe);oe=oe.sibling}ue.type===b?(we=Aa(ue.props.children,ce.mode,we,ue.key),we.return=ce,ce=we):(we=Wf(ue.type,ue.key,ue.props,null,ce.mode,we),Eu(we,ue),we.return=ce,ce=we)}return N(ce);case _:e:{for(Xe=ue.key;oe!==null;){if(oe.key===Xe)if(oe.tag===4&&oe.stateNode.containerInfo===ue.containerInfo&&oe.stateNode.implementation===ue.implementation){u(ce,oe.sibling),we=y(oe,ue.children||[]),we.return=ce,ce=we;break e}else{u(ce,oe);break}else a(ce,oe);oe=oe.sibling}we=Yv(ue,ce.mode,we),we.return=ce,ce=we}return N(ce);case M:return ue=ka(ue),Qt(ce,oe,ue,we)}if(ie(ue))return qe(ce,oe,ue,we);if(B(ue)){if(Xe=B(ue),typeof Xe!="function")throw Error(r(150));return ue=Xe.call(ue),nt(ce,oe,ue,we)}if(typeof ue.then=="function")return Qt(ce,oe,rh(ue),we);if(ue.$$typeof===T)return Qt(ce,oe,Jf(ce,ue),we);oh(ce,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,oe!==null&&oe.tag===6?(u(ce,oe.sibling),we=y(oe,ue),we.return=ce,ce=we):(u(ce,oe),we=Zv(ue,ce.mode,we),we.return=ce,ce=we),N(ce)):u(ce,oe)}return function(ce,oe,ue,we){try{Su=0;var Xe=Qt(ce,oe,ue,we);return Bl=null,Xe}catch(Ze){if(Ze===Fl||Ze===th)throw Ze;var $t=no(29,Ze,null,ce.mode);return $t.lanes=we,$t.return=ce,$t}}}var La=$x(!0),jx=$x(!1),Os=!1;function a0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function l0(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ts(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Cs(i,a,u){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(Ut&2)!==0){var y=m.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),m.pending=a,a=Yf(i),wx(i,null,u),a}return Zf(i,m,a,u),Yf(i)}function xu(i,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var m=a.lanes;m&=i.pendingLanes,u|=m,a.lanes=u,sr(i,u)}}function c0(i,a){var u=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var y=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var N={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?y=w=N:w=w.next=N,u=u.next}while(u!==null);w===null?y=w=a:w=w.next=a}else y=w=a;u={baseState:m.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:m.shared,callbacks:m.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=a:i.next=a,u.lastBaseUpdate=a}var u0=!1;function Ru(){if(u0){var i=Ul;if(i!==null)throw i}}function Ou(i,a,u,m){u0=!1;var y=i.updateQueue;Os=!1;var w=y.firstBaseUpdate,N=y.lastBaseUpdate,z=y.shared.pending;if(z!==null){y.shared.pending=null;var J=z,de=J.next;J.next=null,N===null?w=de:N.next=de,N=J;var _e=i.alternate;_e!==null&&(_e=_e.updateQueue,z=_e.lastBaseUpdate,z!==N&&(z===null?_e.firstBaseUpdate=de:z.next=de,_e.lastBaseUpdate=J))}if(w!==null){var Ee=y.baseState;N=0,_e=de=J=null,z=w;do{var he=z.lane&-536870913,ge=he!==z.lane;if(ge?(Rt&he)===he:(m&he)===he){he!==0&&he===zl&&(u0=!0),_e!==null&&(_e=_e.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var qe=i,nt=z;he=a;var Qt=u;switch(nt.tag){case 1:if(qe=nt.payload,typeof qe=="function"){Ee=qe.call(Qt,Ee,he);break e}Ee=qe;break e;case 3:qe.flags=qe.flags&-65537|128;case 0:if(qe=nt.payload,he=typeof qe=="function"?qe.call(Qt,Ee,he):qe,he==null)break e;Ee=h({},Ee,he);break e;case 2:Os=!0}}he=z.callback,he!==null&&(i.flags|=64,ge&&(i.flags|=8192),ge=y.callbacks,ge===null?y.callbacks=[he]:ge.push(he))}else ge={lane:he,tag:z.tag,payload:z.payload,callback:z.callback,next:null},_e===null?(de=_e=ge,J=Ee):_e=_e.next=ge,N|=he;if(z=z.next,z===null){if(z=y.shared.pending,z===null)break;ge=z,z=ge.next,ge.next=null,y.lastBaseUpdate=ge,y.shared.pending=null}}while(!0);_e===null&&(J=Ee),y.baseState=J,y.firstBaseUpdate=de,y.lastBaseUpdate=_e,w===null&&(y.shared.lanes=0),Ns|=N,i.lanes=N,i.memoizedState=Ee}}function zx(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function Ux(i,a){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)zx(u[i],a)}var Vl=k(null),ih=k(0);function Fx(i,a){i=Yi,V(ih,i),V(Vl,a),Yi=i|a.baseLanes}function d0(){V(ih,Yi),V(Vl,Vl.current)}function f0(){Yi=ih.current,G(Vl),G(ih)}var ro=k(null),Io=null;function As(i){var a=i.alternate;V(On,On.current&1),V(ro,i),Io===null&&(a===null||Vl.current!==null||a.memoizedState!==null)&&(Io=i)}function h0(i){V(On,On.current),V(ro,i),Io===null&&(Io=i)}function Bx(i){i.tag===22?(V(On,On.current),V(ro,i),Io===null&&(Io=i)):Is()}function Is(){V(On,On.current),V(ro,ro.current)}function oo(i){G(ro),Io===i&&(Io=null),G(On)}var On=k(0);function sh(i){for(var a=i;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||_y(u)||by(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Fi=0,at=null,Yt=null,jn=null,ah=!1,Hl=!1,$a=!1,lh=0,Tu=0,ql=null,E$=0;function En(){throw Error(r(321))}function p0(i,a){if(a===null)return!1;for(var u=0;u<a.length&&u<i.length;u++)if(!to(i[u],a[u]))return!1;return!0}function m0(i,a,u,m,y,w){return Fi=w,at=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,q.H=i===null||i.memoizedState===null?RR:I0,$a=!1,w=u(m,y),$a=!1,Hl&&(w=Hx(a,u,m,y)),Vx(i),w}function Vx(i){q.H=Iu;var a=Yt!==null&&Yt.next!==null;if(Fi=0,jn=Yt=at=null,ah=!1,Tu=0,ql=null,a)throw Error(r(300));i===null||zn||(i=i.dependencies,i!==null&&Xf(i)&&(zn=!0))}function Hx(i,a,u,m){at=i;var y=0;do{if(Hl&&(ql=null),Tu=0,Hl=!1,25<=y)throw Error(r(301));if(y+=1,jn=Yt=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}q.H=OR,w=a(u,m)}while(Hl);return w}function x$(){var i=q.H,a=i.useState()[0];return a=typeof a.then=="function"?Cu(a):a,i=i.useState()[0],(Yt!==null?Yt.memoizedState:null)!==i&&(at.flags|=1024),a}function g0(){var i=lh!==0;return lh=0,i}function v0(i,a,u){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~u}function y0(i){if(ah){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}ah=!1}Fi=0,jn=Yt=at=null,Hl=!1,Tu=lh=0,ql=null}function Mr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?at.memoizedState=jn=i:jn=jn.next=i,jn}function Tn(){if(Yt===null){var i=at.alternate;i=i!==null?i.memoizedState:null}else i=Yt.next;var a=jn===null?at.memoizedState:jn.next;if(a!==null)jn=a,Yt=i;else{if(i===null)throw at.alternate===null?Error(r(467)):Error(r(310));Yt=i,i={memoizedState:Yt.memoizedState,baseState:Yt.baseState,baseQueue:Yt.baseQueue,queue:Yt.queue,next:null},jn===null?at.memoizedState=jn=i:jn=jn.next=i}return jn}function ch(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cu(i){var a=Tu;return Tu+=1,ql===null&&(ql=[]),i=kx(ql,i,a),a=at,(jn===null?a.memoizedState:jn.next)===null&&(a=a.alternate,q.H=a===null||a.memoizedState===null?RR:I0),i}function uh(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Cu(i);if(i.$$typeof===T)return cr(i)}throw Error(r(438,String(i)))}function _0(i){var a=null,u=at.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var m=at.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(a={data:m.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=ch(),at.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(i),m=0;m<i;m++)u[m]=H;return a.index++,u}function Bi(i,a){return typeof a=="function"?a(i):a}function dh(i){var a=Tn();return b0(a,Yt,i)}function b0(i,a,u){var m=i.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var y=i.baseQueue,w=m.pending;if(w!==null){if(y!==null){var N=y.next;y.next=w.next,w.next=N}a.baseQueue=y=w,m.pending=null}if(w=i.baseState,y===null)i.memoizedState=w;else{a=y.next;var z=N=null,J=null,de=a,_e=!1;do{var Ee=de.lane&-536870913;if(Ee!==de.lane?(Rt&Ee)===Ee:(Fi&Ee)===Ee){var he=de.revertLane;if(he===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Ee===zl&&(_e=!0);else if((Fi&he)===he){de=de.next,he===zl&&(_e=!0);continue}else Ee={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},J===null?(z=J=Ee,N=w):J=J.next=Ee,at.lanes|=he,Ns|=he;Ee=de.action,$a&&u(w,Ee),w=de.hasEagerState?de.eagerState:u(w,Ee)}else he={lane:Ee,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},J===null?(z=J=he,N=w):J=J.next=he,at.lanes|=Ee,Ns|=Ee;de=de.next}while(de!==null&&de!==a);if(J===null?N=w:J.next=z,!to(w,i.memoizedState)&&(zn=!0,_e&&(u=Ul,u!==null)))throw u;i.memoizedState=w,i.baseState=N,i.baseQueue=J,m.lastRenderedState=w}return y===null&&(m.lanes=0),[i.memoizedState,m.dispatch]}function w0(i){var a=Tn(),u=a.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var m=u.dispatch,y=u.pending,w=a.memoizedState;if(y!==null){u.pending=null;var N=y=y.next;do w=i(w,N.action),N=N.next;while(N!==y);to(w,a.memoizedState)||(zn=!0),a.memoizedState=w,a.baseQueue===null&&(a.baseState=w),u.lastRenderedState=w}return[w,m]}function qx(i,a,u){var m=at,y=Tn(),w=At;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=a();var N=!to((Yt||y).memoizedState,u);if(N&&(y.memoizedState=u,zn=!0),y=y.queue,x0(Zx.bind(null,m,y,i),[i]),y.getSnapshot!==a||N||jn!==null&&jn.memoizedState.tag&1){if(m.flags|=2048,Gl(9,{destroy:void 0},Kx.bind(null,m,y,u,a),null),en===null)throw Error(r(349));w||(Fi&127)!==0||Gx(m,a,u)}return u}function Gx(i,a,u){i.flags|=16384,i={getSnapshot:a,value:u},a=at.updateQueue,a===null?(a=ch(),at.updateQueue=a,a.stores=[i]):(u=a.stores,u===null?a.stores=[i]:u.push(i))}function Kx(i,a,u,m){a.value=u,a.getSnapshot=m,Yx(a)&&Wx(i)}function Zx(i,a,u){return u(function(){Yx(a)&&Wx(i)})}function Yx(i){var a=i.getSnapshot;i=i.value;try{var u=a();return!to(i,u)}catch{return!0}}function Wx(i){var a=Ca(i,2);a!==null&&Kr(a,i,2)}function S0(i){var a=Mr();if(typeof i=="function"){var u=i;if(i=u(),$a){bt(!0);try{u()}finally{bt(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:i},a}function Qx(i,a,u,m){return i.baseState=u,b0(i,Yt,typeof m=="function"?m:Bi)}function R$(i,a,u,m,y){if(ph(i))throw Error(r(485));if(i=a.action,i!==null){var w={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){w.listeners.push(N)}};q.T!==null?u(!0):w.isTransition=!1,m(w),u=a.pending,u===null?(w.next=a.pending=w,Xx(a,w)):(w.next=u.next,a.pending=u.next=w)}}function Xx(i,a){var u=a.action,m=a.payload,y=i.state;if(a.isTransition){var w=q.T,N={};q.T=N;try{var z=u(y,m),J=q.S;J!==null&&J(N,z),Jx(i,a,z)}catch(de){E0(i,a,de)}finally{w!==null&&N.types!==null&&(w.types=N.types),q.T=w}}else try{w=u(y,m),Jx(i,a,w)}catch(de){E0(i,a,de)}}function Jx(i,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){eR(i,a,m)},function(m){return E0(i,a,m)}):eR(i,a,u)}function eR(i,a,u){a.status="fulfilled",a.value=u,tR(a),i.state=u,a=i.pending,a!==null&&(u=a.next,u===a?i.pending=null:(u=u.next,a.next=u,Xx(i,u)))}function E0(i,a,u){var m=i.pending;if(i.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=u,tR(a),a=a.next;while(a!==m)}i.action=null}function tR(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function nR(i,a){return a}function rR(i,a){if(At){var u=en.formState;if(u!==null){e:{var m=at;if(At){if(cn){t:{for(var y=cn,w=Ao;y.nodeType!==8;){if(!w){y=null;break t}if(y=Po(y.nextSibling),y===null){y=null;break t}}w=y.data,y=w==="F!"||w==="F"?y:null}if(y){cn=Po(y.nextSibling),m=y.data==="F!";break e}}xs(m)}m=!1}m&&(a=u[0])}}return u=Mr(),u.memoizedState=u.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nR,lastRenderedState:a},u.queue=m,u=SR.bind(null,at,m),m.dispatch=u,m=S0(!1),w=A0.bind(null,at,!1,m.queue),m=Mr(),y={state:a,dispatch:null,action:i,pending:null},m.queue=y,u=R$.bind(null,at,y,w,u),y.dispatch=u,m.memoizedState=i,[a,u,!1]}function oR(i){var a=Tn();return iR(a,Yt,i)}function iR(i,a,u){if(a=b0(i,a,nR)[0],i=dh(Bi)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Cu(a)}catch(N){throw N===Fl?th:N}else m=a;a=Tn();var y=a.queue,w=y.dispatch;return u!==a.memoizedState&&(at.flags|=2048,Gl(9,{destroy:void 0},O$.bind(null,y,u),null)),[m,w,i]}function O$(i,a){i.action=a}function sR(i){var a=Tn(),u=Yt;if(u!==null)return iR(a,u,i);Tn(),a=a.memoizedState,u=Tn();var m=u.queue.dispatch;return u.memoizedState=i,[a,m,!1]}function Gl(i,a,u,m){return i={tag:i,create:u,deps:m,inst:a,next:null},a=at.updateQueue,a===null&&(a=ch(),at.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=i.next=i:(m=u.next,u.next=i,i.next=m,a.lastEffect=i),i}function aR(){return Tn().memoizedState}function fh(i,a,u,m){var y=Mr();at.flags|=i,y.memoizedState=Gl(1|a,{destroy:void 0},u,m===void 0?null:m)}function hh(i,a,u,m){var y=Tn();m=m===void 0?null:m;var w=y.memoizedState.inst;Yt!==null&&m!==null&&p0(m,Yt.memoizedState.deps)?y.memoizedState=Gl(a,w,u,m):(at.flags|=i,y.memoizedState=Gl(1|a,w,u,m))}function lR(i,a){fh(8390656,8,i,a)}function x0(i,a){hh(2048,8,i,a)}function T$(i){at.flags|=4;var a=at.updateQueue;if(a===null)a=ch(),at.updateQueue=a,a.events=[i];else{var u=a.events;u===null?a.events=[i]:u.push(i)}}function cR(i){var a=Tn().memoizedState;return T$({ref:a,nextImpl:i}),function(){if((Ut&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function uR(i,a){return hh(4,2,i,a)}function dR(i,a){return hh(4,4,i,a)}function fR(i,a){if(typeof a=="function"){i=i();var u=a(i);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function hR(i,a,u){u=u!=null?u.concat([i]):null,hh(4,4,fR.bind(null,a,i),u)}function R0(){}function pR(i,a){var u=Tn();a=a===void 0?null:a;var m=u.memoizedState;return a!==null&&p0(a,m[1])?m[0]:(u.memoizedState=[i,a],i)}function mR(i,a){var u=Tn();a=a===void 0?null:a;var m=u.memoizedState;if(a!==null&&p0(a,m[1]))return m[0];if(m=i(),$a){bt(!0);try{i()}finally{bt(!1)}}return u.memoizedState=[m,a],m}function O0(i,a,u){return u===void 0||(Fi&1073741824)!==0&&(Rt&261930)===0?i.memoizedState=a:(i.memoizedState=u,i=gO(),at.lanes|=i,Ns|=i,u)}function gR(i,a,u,m){return to(u,a)?u:Vl.current!==null?(i=O0(i,u,m),to(i,a)||(zn=!0),i):(Fi&42)===0||(Fi&1073741824)!==0&&(Rt&261930)===0?(zn=!0,i.memoizedState=u):(i=gO(),at.lanes|=i,Ns|=i,a)}function vR(i,a,u,m,y){var w=W.p;W.p=w!==0&&8>w?w:8;var N=q.T,z={};q.T=z,A0(i,!1,a,u);try{var J=y(),de=q.S;if(de!==null&&de(z,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var _e=S$(J,m);Au(i,a,_e,ao(i))}else Au(i,a,m,ao(i))}catch(Ee){Au(i,a,{then:function(){},status:"rejected",reason:Ee},ao())}finally{W.p=w,N!==null&&z.types!==null&&(N.types=z.types),q.T=N}}function C$(){}function T0(i,a,u,m){if(i.tag!==5)throw Error(r(476));var y=yR(i).queue;vR(i,y,a,te,u===null?C$:function(){return _R(i),u(m)})}function yR(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:te},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:u},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function _R(i){var a=yR(i);a.next===null&&(a=i.alternate.memoizedState),Au(i,a.next.queue,{},ao())}function C0(){return cr(Gu)}function bR(){return Tn().memoizedState}function wR(){return Tn().memoizedState}function A$(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var u=ao();i=Ts(u);var m=Cs(a,i,u);m!==null&&(Kr(m,a,u),xu(m,a,u)),a={cache:r0()},i.payload=a;return}a=a.return}}function I$(i,a,u){var m=ao();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ph(i)?ER(a,u):(u=Gv(i,a,u,m),u!==null&&(Kr(u,i,m),xR(u,a,m)))}function SR(i,a,u){var m=ao();Au(i,a,u,m)}function Au(i,a,u,m){var y={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(ph(i))ER(a,y);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=a.lastRenderedReducer,w!==null))try{var N=a.lastRenderedState,z=w(N,u);if(y.hasEagerState=!0,y.eagerState=z,to(z,N))return Zf(i,a,y,0),en===null&&Kf(),!1}catch{}if(u=Gv(i,a,y,m),u!==null)return Kr(u,i,m),xR(u,a,m),!0}return!1}function A0(i,a,u,m){if(m={lane:2,revertLane:ay(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},ph(i)){if(a)throw Error(r(479))}else a=Gv(i,u,m,2),a!==null&&Kr(a,i,2)}function ph(i){var a=i.alternate;return i===at||a!==null&&a===at}function ER(i,a){Hl=ah=!0;var u=i.pending;u===null?a.next=a:(a.next=u.next,u.next=a),i.pending=a}function xR(i,a,u){if((u&4194048)!==0){var m=a.lanes;m&=i.pendingLanes,u|=m,a.lanes=u,sr(i,u)}}var Iu={readContext:cr,use:uh,useCallback:En,useContext:En,useEffect:En,useImperativeHandle:En,useLayoutEffect:En,useInsertionEffect:En,useMemo:En,useReducer:En,useRef:En,useState:En,useDebugValue:En,useDeferredValue:En,useTransition:En,useSyncExternalStore:En,useId:En,useHostTransitionStatus:En,useFormState:En,useActionState:En,useOptimistic:En,useMemoCache:En,useCacheRefresh:En};Iu.useEffectEvent=En;var RR={readContext:cr,use:uh,useCallback:function(i,a){return Mr().memoizedState=[i,a===void 0?null:a],i},useContext:cr,useEffect:lR,useImperativeHandle:function(i,a,u){u=u!=null?u.concat([i]):null,fh(4194308,4,fR.bind(null,a,i),u)},useLayoutEffect:function(i,a){return fh(4194308,4,i,a)},useInsertionEffect:function(i,a){fh(4,2,i,a)},useMemo:function(i,a){var u=Mr();a=a===void 0?null:a;var m=i();if($a){bt(!0);try{i()}finally{bt(!1)}}return u.memoizedState=[m,a],m},useReducer:function(i,a,u){var m=Mr();if(u!==void 0){var y=u(a);if($a){bt(!0);try{u(a)}finally{bt(!1)}}}else y=a;return m.memoizedState=m.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},m.queue=i,i=i.dispatch=I$.bind(null,at,i),[m.memoizedState,i]},useRef:function(i){var a=Mr();return i={current:i},a.memoizedState=i},useState:function(i){i=S0(i);var a=i.queue,u=SR.bind(null,at,a);return a.dispatch=u,[i.memoizedState,u]},useDebugValue:R0,useDeferredValue:function(i,a){var u=Mr();return O0(u,i,a)},useTransition:function(){var i=S0(!1);return i=vR.bind(null,at,i.queue,!0,!1),Mr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,u){var m=at,y=Mr();if(At){if(u===void 0)throw Error(r(407));u=u()}else{if(u=a(),en===null)throw Error(r(349));(Rt&127)!==0||Gx(m,a,u)}y.memoizedState=u;var w={value:u,getSnapshot:a};return y.queue=w,lR(Zx.bind(null,m,w,i),[i]),m.flags|=2048,Gl(9,{destroy:void 0},Kx.bind(null,m,w,u,a),null),u},useId:function(){var i=Mr(),a=en.identifierPrefix;if(At){var u=di,m=ui;u=(m&~(1<<32-Ln(m)-1)).toString(32)+u,a="_"+a+"R_"+u,u=lh++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=E$++,a="_"+a+"r_"+u.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:C0,useFormState:rR,useActionState:rR,useOptimistic:function(i){var a=Mr();a.memoizedState=a.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=A0.bind(null,at,!0,u),u.dispatch=a,[i,a]},useMemoCache:_0,useCacheRefresh:function(){return Mr().memoizedState=A$.bind(null,at)},useEffectEvent:function(i){var a=Mr(),u={impl:i};return a.memoizedState=u,function(){if((Ut&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},I0={readContext:cr,use:uh,useCallback:pR,useContext:cr,useEffect:x0,useImperativeHandle:hR,useInsertionEffect:uR,useLayoutEffect:dR,useMemo:mR,useReducer:dh,useRef:aR,useState:function(){return dh(Bi)},useDebugValue:R0,useDeferredValue:function(i,a){var u=Tn();return gR(u,Yt.memoizedState,i,a)},useTransition:function(){var i=dh(Bi)[0],a=Tn().memoizedState;return[typeof i=="boolean"?i:Cu(i),a]},useSyncExternalStore:qx,useId:bR,useHostTransitionStatus:C0,useFormState:oR,useActionState:oR,useOptimistic:function(i,a){var u=Tn();return Qx(u,Yt,i,a)},useMemoCache:_0,useCacheRefresh:wR};I0.useEffectEvent=cR;var OR={readContext:cr,use:uh,useCallback:pR,useContext:cr,useEffect:x0,useImperativeHandle:hR,useInsertionEffect:uR,useLayoutEffect:dR,useMemo:mR,useReducer:w0,useRef:aR,useState:function(){return w0(Bi)},useDebugValue:R0,useDeferredValue:function(i,a){var u=Tn();return Yt===null?O0(u,i,a):gR(u,Yt.memoizedState,i,a)},useTransition:function(){var i=w0(Bi)[0],a=Tn().memoizedState;return[typeof i=="boolean"?i:Cu(i),a]},useSyncExternalStore:qx,useId:bR,useHostTransitionStatus:C0,useFormState:sR,useActionState:sR,useOptimistic:function(i,a){var u=Tn();return Yt!==null?Qx(u,Yt,i,a):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:_0,useCacheRefresh:wR};OR.useEffectEvent=cR;function P0(i,a,u,m){a=i.memoizedState,u=u(m,a),u=u==null?a:h({},a,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var M0={enqueueSetState:function(i,a,u){i=i._reactInternals;var m=ao(),y=Ts(m);y.payload=a,u!=null&&(y.callback=u),a=Cs(i,y,m),a!==null&&(Kr(a,i,m),xu(a,i,m))},enqueueReplaceState:function(i,a,u){i=i._reactInternals;var m=ao(),y=Ts(m);y.tag=1,y.payload=a,u!=null&&(y.callback=u),a=Cs(i,y,m),a!==null&&(Kr(a,i,m),xu(a,i,m))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var u=ao(),m=Ts(u);m.tag=2,a!=null&&(m.callback=a),a=Cs(i,m,u),a!==null&&(Kr(a,i,u),xu(a,i,u))}};function TR(i,a,u,m,y,w,N){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,w,N):a.prototype&&a.prototype.isPureReactComponent?!gu(u,m)||!gu(y,w):!0}function CR(i,a,u,m){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,m),a.state!==i&&M0.enqueueReplaceState(a,a.state,null)}function ja(i,a){var u=a;if("ref"in a){u={};for(var m in a)m!=="ref"&&(u[m]=a[m])}if(i=i.defaultProps){u===a&&(u=h({},u));for(var y in i)u[y]===void 0&&(u[y]=i[y])}return u}function AR(i){Gf(i)}function IR(i){console.error(i)}function PR(i){Gf(i)}function mh(i,a){try{var u=i.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function MR(i,a,u){try{var m=i.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function N0(i,a,u){return u=Ts(u),u.tag=3,u.payload={element:null},u.callback=function(){mh(i,a)},u}function NR(i){return i=Ts(i),i.tag=3,i}function kR(i,a,u,m){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var w=m.value;i.payload=function(){return y(w)},i.callback=function(){MR(a,u,m)}}var N=u.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(i.callback=function(){MR(a,u,m),typeof y!="function"&&(ks===null?ks=new Set([this]):ks.add(this));var z=m.stack;this.componentDidCatch(m.value,{componentStack:z!==null?z:""})})}function P$(i,a,u,m,y){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(a=u.alternate,a!==null&&jl(a,u,y,!0),u=ro.current,u!==null){switch(u.tag){case 31:case 13:return Io===null?Th():u.alternate===null&&xn===0&&(xn=3),u.flags&=-257,u.flags|=65536,u.lanes=y,m===nh?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([m]):a.add(m),oy(i,m,y)),!1;case 22:return u.flags|=65536,m===nh?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([m]):u.add(m)),oy(i,m,y)),!1}throw Error(r(435,u.tag))}return oy(i,m,y),Th(),!1}if(At)return a=ro.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,m!==Xv&&(i=Error(r(422),{cause:m}),_u(Oo(i,u)))):(m!==Xv&&(a=Error(r(423),{cause:m}),_u(Oo(a,u))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,m=Oo(m,u),y=N0(i.stateNode,m,y),c0(i,y),xn!==4&&(xn=2)),!1;var w=Error(r(520),{cause:m});if(w=Oo(w,u),ju===null?ju=[w]:ju.push(w),xn!==4&&(xn=2),a===null)return!0;m=Oo(m,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,i=y&-y,u.lanes|=i,i=N0(u.stateNode,m,i),c0(u,i),!1;case 1:if(a=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ks===null||!ks.has(w))))return u.flags|=65536,y&=-y,u.lanes|=y,y=NR(y),kR(y,i,u,m),c0(u,y),!1}u=u.return}while(u!==null);return!1}var k0=Error(r(461)),zn=!1;function ur(i,a,u,m){a.child=i===null?jx(a,null,u,m):La(a,i.child,u,m)}function DR(i,a,u,m,y){u=u.render;var w=a.ref;if("ref"in m){var N={};for(var z in m)z!=="ref"&&(N[z]=m[z])}else N=m;return Ma(a),m=m0(i,a,u,N,w,y),z=g0(),i!==null&&!zn?(v0(i,a,y),Vi(i,a,y)):(At&&z&&Wv(a),a.flags|=1,ur(i,a,m,y),a.child)}function LR(i,a,u,m,y){if(i===null){var w=u.type;return typeof w=="function"&&!Kv(w)&&w.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=w,$R(i,a,w,m,y)):(i=Wf(u.type,null,m,a,a.mode,y),i.ref=a.ref,i.return=a,a.child=i)}if(w=i.child,!B0(i,y)){var N=w.memoizedProps;if(u=u.compare,u=u!==null?u:gu,u(N,m)&&i.ref===a.ref)return Vi(i,a,y)}return a.flags|=1,i=$i(w,m),i.ref=a.ref,i.return=a,a.child=i}function $R(i,a,u,m,y){if(i!==null){var w=i.memoizedProps;if(gu(w,m)&&i.ref===a.ref)if(zn=!1,a.pendingProps=m=w,B0(i,y))(i.flags&131072)!==0&&(zn=!0);else return a.lanes=i.lanes,Vi(i,a,y)}return D0(i,a,u,m,y)}function jR(i,a,u,m){var y=m.children,w=i!==null?i.memoizedState:null;if(i===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((a.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,i!==null){for(m=a.child=i.child,y=0;m!==null;)y=y|m.lanes|m.childLanes,m=m.sibling;m=y&~w}else m=0,a.child=null;return zR(i,a,w,u,m)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&eh(a,w!==null?w.cachePool:null),w!==null?Fx(a,w):d0(),Bx(a);else return m=a.lanes=536870912,zR(i,a,w!==null?w.baseLanes|u:u,u,m)}else w!==null?(eh(a,w.cachePool),Fx(a,w),Is(),a.memoizedState=null):(i!==null&&eh(a,null),d0(),Is());return ur(i,a,y,u),a.child}function Pu(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function zR(i,a,u,m,y){var w=i0();return w=w===null?null:{parent:$n._currentValue,pool:w},a.memoizedState={baseLanes:u,cachePool:w},i!==null&&eh(a,null),d0(),Bx(a),i!==null&&jl(i,a,m,!0),a.childLanes=y,null}function gh(i,a){return a=yh({mode:a.mode,children:a.children},i.mode),a.ref=i.ref,i.child=a,a.return=i,a}function UR(i,a,u){return La(a,i.child,null,u),i=gh(a,a.pendingProps),i.flags|=2,oo(a),a.memoizedState=null,i}function M$(i,a,u){var m=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(At){if(m.mode==="hidden")return i=gh(a,m),a.lanes=536870912,Pu(null,i);if(h0(a),(i=cn)?(i=XO(i,Ao),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:Ss!==null?{id:ui,overflow:di}:null,retryLane:536870912,hydrationErrors:null},u=Ex(i),u.return=a,a.child=u,lr=a,cn=null)):i=null,i===null)throw xs(a);return a.lanes=536870912,null}return gh(a,m)}var w=i.memoizedState;if(w!==null){var N=w.dehydrated;if(h0(a),y)if(a.flags&256)a.flags&=-257,a=UR(i,a,u);else if(a.memoizedState!==null)a.child=i.child,a.flags|=128,a=null;else throw Error(r(558));else if(zn||jl(i,a,u,!1),y=(u&i.childLanes)!==0,zn||y){if(m=en,m!==null&&(N=Ur(m,u),N!==0&&N!==w.retryLane))throw w.retryLane=N,Ca(i,N),Kr(m,i,N),k0;Th(),a=UR(i,a,u)}else i=w.treeContext,cn=Po(N.nextSibling),lr=a,At=!0,Es=null,Ao=!1,i!==null&&Ox(a,i),a=gh(a,m),a.flags|=4096;return a}return i=$i(i.child,{mode:m.mode,children:m.children}),i.ref=a.ref,a.child=i,i.return=a,i}function vh(i,a){var u=a.ref;if(u===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(a.flags|=4194816)}}function D0(i,a,u,m,y){return Ma(a),u=m0(i,a,u,m,void 0,y),m=g0(),i!==null&&!zn?(v0(i,a,y),Vi(i,a,y)):(At&&m&&Wv(a),a.flags|=1,ur(i,a,u,y),a.child)}function FR(i,a,u,m,y,w){return Ma(a),a.updateQueue=null,u=Hx(a,m,u,y),Vx(i),m=g0(),i!==null&&!zn?(v0(i,a,w),Vi(i,a,w)):(At&&m&&Wv(a),a.flags|=1,ur(i,a,u,w),a.child)}function BR(i,a,u,m,y){if(Ma(a),a.stateNode===null){var w=kl,N=u.contextType;typeof N=="object"&&N!==null&&(w=cr(N)),w=new u(m,w),a.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=M0,a.stateNode=w,w._reactInternals=a,w=a.stateNode,w.props=m,w.state=a.memoizedState,w.refs={},a0(a),N=u.contextType,w.context=typeof N=="object"&&N!==null?cr(N):kl,w.state=a.memoizedState,N=u.getDerivedStateFromProps,typeof N=="function"&&(P0(a,u,N,m),w.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(N=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),N!==w.state&&M0.enqueueReplaceState(w,w.state,null),Ou(a,m,w,y),Ru(),w.state=a.memoizedState),typeof w.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(i===null){w=a.stateNode;var z=a.memoizedProps,J=ja(u,z);w.props=J;var de=w.context,_e=u.contextType;N=kl,typeof _e=="object"&&_e!==null&&(N=cr(_e));var Ee=u.getDerivedStateFromProps;_e=typeof Ee=="function"||typeof w.getSnapshotBeforeUpdate=="function",z=a.pendingProps!==z,_e||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(z||de!==N)&&CR(a,w,m,N),Os=!1;var he=a.memoizedState;w.state=he,Ou(a,m,w,y),Ru(),de=a.memoizedState,z||he!==de||Os?(typeof Ee=="function"&&(P0(a,u,Ee,m),de=a.memoizedState),(J=Os||TR(a,u,J,m,he,de,N))?(_e||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(a.flags|=4194308)):(typeof w.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=de),w.props=m,w.state=de,w.context=N,m=J):(typeof w.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{w=a.stateNode,l0(i,a),N=a.memoizedProps,_e=ja(u,N),w.props=_e,Ee=a.pendingProps,he=w.context,de=u.contextType,J=kl,typeof de=="object"&&de!==null&&(J=cr(de)),z=u.getDerivedStateFromProps,(de=typeof z=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(N!==Ee||he!==J)&&CR(a,w,m,J),Os=!1,he=a.memoizedState,w.state=he,Ou(a,m,w,y),Ru();var ge=a.memoizedState;N!==Ee||he!==ge||Os||i!==null&&i.dependencies!==null&&Xf(i.dependencies)?(typeof z=="function"&&(P0(a,u,z,m),ge=a.memoizedState),(_e=Os||TR(a,u,_e,m,he,ge,J)||i!==null&&i.dependencies!==null&&Xf(i.dependencies))?(de||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(m,ge,J),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(m,ge,J)),typeof w.componentDidUpdate=="function"&&(a.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof w.componentDidUpdate!="function"||N===i.memoizedProps&&he===i.memoizedState||(a.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&he===i.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=ge),w.props=m,w.state=ge,w.context=J,m=_e):(typeof w.componentDidUpdate!="function"||N===i.memoizedProps&&he===i.memoizedState||(a.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&he===i.memoizedState||(a.flags|=1024),m=!1)}return w=m,vh(i,a),m=(a.flags&128)!==0,w||m?(w=a.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:w.render(),a.flags|=1,i!==null&&m?(a.child=La(a,i.child,null,y),a.child=La(a,null,u,y)):ur(i,a,u,y),a.memoizedState=w.state,i=a.child):i=Vi(i,a,y),i}function VR(i,a,u,m){return Ia(),a.flags|=256,ur(i,a,u,m),a.child}var L0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $0(i){return{baseLanes:i,cachePool:Mx()}}function j0(i,a,u){return i=i!==null?i.childLanes&~u:0,a&&(i|=so),i}function HR(i,a,u){var m=a.pendingProps,y=!1,w=(a.flags&128)!==0,N;if((N=w)||(N=i!==null&&i.memoizedState===null?!1:(On.current&2)!==0),N&&(y=!0,a.flags&=-129),N=(a.flags&32)!==0,a.flags&=-33,i===null){if(At){if(y?As(a):Is(),(i=cn)?(i=XO(i,Ao),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:Ss!==null?{id:ui,overflow:di}:null,retryLane:536870912,hydrationErrors:null},u=Ex(i),u.return=a,a.child=u,lr=a,cn=null)):i=null,i===null)throw xs(a);return by(i)?a.lanes=32:a.lanes=536870912,null}var z=m.children;return m=m.fallback,y?(Is(),y=a.mode,z=yh({mode:"hidden",children:z},y),m=Aa(m,y,u,null),z.return=a,m.return=a,z.sibling=m,a.child=z,m=a.child,m.memoizedState=$0(u),m.childLanes=j0(i,N,u),a.memoizedState=L0,Pu(null,m)):(As(a),z0(a,z))}var J=i.memoizedState;if(J!==null&&(z=J.dehydrated,z!==null)){if(w)a.flags&256?(As(a),a.flags&=-257,a=U0(i,a,u)):a.memoizedState!==null?(Is(),a.child=i.child,a.flags|=128,a=null):(Is(),z=m.fallback,y=a.mode,m=yh({mode:"visible",children:m.children},y),z=Aa(z,y,u,null),z.flags|=2,m.return=a,z.return=a,m.sibling=z,a.child=m,La(a,i.child,null,u),m=a.child,m.memoizedState=$0(u),m.childLanes=j0(i,N,u),a.memoizedState=L0,a=Pu(null,m));else if(As(a),by(z)){if(N=z.nextSibling&&z.nextSibling.dataset,N)var de=N.dgst;N=de,m=Error(r(419)),m.stack="",m.digest=N,_u({value:m,source:null,stack:null}),a=U0(i,a,u)}else if(zn||jl(i,a,u,!1),N=(u&i.childLanes)!==0,zn||N){if(N=en,N!==null&&(m=Ur(N,u),m!==0&&m!==J.retryLane))throw J.retryLane=m,Ca(i,m),Kr(N,i,m),k0;_y(z)||Th(),a=U0(i,a,u)}else _y(z)?(a.flags|=192,a.child=i.child,a=null):(i=J.treeContext,cn=Po(z.nextSibling),lr=a,At=!0,Es=null,Ao=!1,i!==null&&Ox(a,i),a=z0(a,m.children),a.flags|=4096);return a}return y?(Is(),z=m.fallback,y=a.mode,J=i.child,de=J.sibling,m=$i(J,{mode:"hidden",children:m.children}),m.subtreeFlags=J.subtreeFlags&65011712,de!==null?z=$i(de,z):(z=Aa(z,y,u,null),z.flags|=2),z.return=a,m.return=a,m.sibling=z,a.child=m,Pu(null,m),m=a.child,z=i.child.memoizedState,z===null?z=$0(u):(y=z.cachePool,y!==null?(J=$n._currentValue,y=y.parent!==J?{parent:J,pool:J}:y):y=Mx(),z={baseLanes:z.baseLanes|u,cachePool:y}),m.memoizedState=z,m.childLanes=j0(i,N,u),a.memoizedState=L0,Pu(i.child,m)):(As(a),u=i.child,i=u.sibling,u=$i(u,{mode:"visible",children:m.children}),u.return=a,u.sibling=null,i!==null&&(N=a.deletions,N===null?(a.deletions=[i],a.flags|=16):N.push(i)),a.child=u,a.memoizedState=null,u)}function z0(i,a){return a=yh({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function yh(i,a){return i=no(22,i,null,a),i.lanes=0,i}function U0(i,a,u){return La(a,i.child,null,u),i=z0(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function qR(i,a,u){i.lanes|=a;var m=i.alternate;m!==null&&(m.lanes|=a),t0(i.return,a,u)}function F0(i,a,u,m,y,w){var N=i.memoizedState;N===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:y,treeForkCount:w}:(N.isBackwards=a,N.rendering=null,N.renderingStartTime=0,N.last=m,N.tail=u,N.tailMode=y,N.treeForkCount=w)}function GR(i,a,u){var m=a.pendingProps,y=m.revealOrder,w=m.tail;m=m.children;var N=On.current,z=(N&2)!==0;if(z?(N=N&1|2,a.flags|=128):N&=1,V(On,N),ur(i,a,m,u),m=At?yu:0,!z&&i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&qR(i,u,a);else if(i.tag===19)qR(i,u,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(y){case"forwards":for(u=a.child,y=null;u!==null;)i=u.alternate,i!==null&&sh(i)===null&&(y=u),u=u.sibling;u=y,u===null?(y=a.child,a.child=null):(y=u.sibling,u.sibling=null),F0(a,!1,y,u,w,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=a.child,a.child=null;y!==null;){if(i=y.alternate,i!==null&&sh(i)===null){a.child=y;break}i=y.sibling,y.sibling=u,u=y,y=i}F0(a,!0,u,null,w,m);break;case"together":F0(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function Vi(i,a,u){if(i!==null&&(a.dependencies=i.dependencies),Ns|=a.lanes,(u&a.childLanes)===0)if(i!==null){if(jl(i,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,u=$i(i,i.pendingProps),a.child=u,u.return=a;i.sibling!==null;)i=i.sibling,u=u.sibling=$i(i,i.pendingProps),u.return=a;u.sibling=null}return a.child}function B0(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&Xf(i)))}function N$(i,a,u){switch(a.tag){case 3:pe(a,a.stateNode.containerInfo),Rs(a,$n,i.memoizedState.cache),Ia();break;case 27:case 5:je(a);break;case 4:pe(a,a.stateNode.containerInfo);break;case 10:Rs(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,h0(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(As(a),a.flags|=128,null):(u&a.child.childLanes)!==0?HR(i,a,u):(As(a),i=Vi(i,a,u),i!==null?i.sibling:null);As(a);break;case 19:var y=(i.flags&128)!==0;if(m=(u&a.childLanes)!==0,m||(jl(i,a,u,!1),m=(u&a.childLanes)!==0),y){if(m)return GR(i,a,u);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),V(On,On.current),m)break;return null;case 22:return a.lanes=0,jR(i,a,u,a.pendingProps);case 24:Rs(a,$n,i.memoizedState.cache)}return Vi(i,a,u)}function KR(i,a,u){if(i!==null)if(i.memoizedProps!==a.pendingProps)zn=!0;else{if(!B0(i,u)&&(a.flags&128)===0)return zn=!1,N$(i,a,u);zn=(i.flags&131072)!==0}else zn=!1,At&&(a.flags&1048576)!==0&&Rx(a,yu,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(i=ka(a.elementType),a.type=i,typeof i=="function")Kv(i)?(m=ja(i,m),a.tag=1,a=BR(null,a,i,m,u)):(a.tag=0,a=D0(null,a,i,m,u));else{if(i!=null){var y=i.$$typeof;if(y===R){a.tag=11,a=DR(null,a,i,m,u);break e}else if(y===I){a.tag=14,a=LR(null,a,i,m,u);break e}}throw a=Z(i)||i,Error(r(306,a,""))}}return a;case 0:return D0(i,a,a.type,a.pendingProps,u);case 1:return m=a.type,y=ja(m,a.pendingProps),BR(i,a,m,y,u);case 3:e:{if(pe(a,a.stateNode.containerInfo),i===null)throw Error(r(387));m=a.pendingProps;var w=a.memoizedState;y=w.element,l0(i,a),Ou(a,m,null,u);var N=a.memoizedState;if(m=N.cache,Rs(a,$n,m),m!==w.cache&&n0(a,[$n],u,!0),Ru(),m=N.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:N.cache},a.updateQueue.baseState=w,a.memoizedState=w,a.flags&256){a=VR(i,a,m,u);break e}else if(m!==y){y=Oo(Error(r(424)),a),_u(y),a=VR(i,a,m,u);break e}else for(i=a.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,cn=Po(i.firstChild),lr=a,At=!0,Es=null,Ao=!0,u=jx(a,null,m,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ia(),m===y){a=Vi(i,a,u);break e}ur(i,a,m,u)}a=a.child}return a;case 26:return vh(i,a),i===null?(u=o2(a.type,null,a.pendingProps,null))?a.memoizedState=u:At||(u=a.type,i=a.pendingProps,m=kh(X.current).createElement(u),m[ar]=a,m[Fr]=i,dr(m,u,i),tr(m),a.stateNode=m):a.memoizedState=o2(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return je(a),i===null&&At&&(m=a.stateNode=t2(a.type,a.pendingProps,X.current),lr=a,Ao=!0,y=cn,js(a.type)?(wy=y,cn=Po(m.firstChild)):cn=y),ur(i,a,a.pendingProps.children,u),vh(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&At&&((y=m=cn)&&(m=cj(m,a.type,a.pendingProps,Ao),m!==null?(a.stateNode=m,lr=a,cn=Po(m.firstChild),Ao=!1,y=!0):y=!1),y||xs(a)),je(a),y=a.type,w=a.pendingProps,N=i!==null?i.memoizedProps:null,m=w.children,gy(y,w)?m=null:N!==null&&gy(y,N)&&(a.flags|=32),a.memoizedState!==null&&(y=m0(i,a,x$,null,null,u),Gu._currentValue=y),vh(i,a),ur(i,a,m,u),a.child;case 6:return i===null&&At&&((i=u=cn)&&(u=uj(u,a.pendingProps,Ao),u!==null?(a.stateNode=u,lr=a,cn=null,i=!0):i=!1),i||xs(a)),null;case 13:return HR(i,a,u);case 4:return pe(a,a.stateNode.containerInfo),m=a.pendingProps,i===null?a.child=La(a,null,m,u):ur(i,a,m,u),a.child;case 11:return DR(i,a,a.type,a.pendingProps,u);case 7:return ur(i,a,a.pendingProps,u),a.child;case 8:return ur(i,a,a.pendingProps.children,u),a.child;case 12:return ur(i,a,a.pendingProps.children,u),a.child;case 10:return m=a.pendingProps,Rs(a,a.type,m.value),ur(i,a,m.children,u),a.child;case 9:return y=a.type._context,m=a.pendingProps.children,Ma(a),y=cr(y),m=m(y),a.flags|=1,ur(i,a,m,u),a.child;case 14:return LR(i,a,a.type,a.pendingProps,u);case 15:return $R(i,a,a.type,a.pendingProps,u);case 19:return GR(i,a,u);case 31:return M$(i,a,u);case 22:return jR(i,a,u,a.pendingProps);case 24:return Ma(a),m=cr($n),i===null?(y=i0(),y===null&&(y=en,w=r0(),y.pooledCache=w,w.refCount++,w!==null&&(y.pooledCacheLanes|=u),y=w),a.memoizedState={parent:m,cache:y},a0(a),Rs(a,$n,y)):((i.lanes&u)!==0&&(l0(i,a),Ou(a,null,null,u),Ru()),y=i.memoizedState,w=a.memoizedState,y.parent!==m?(y={parent:m,cache:m},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Rs(a,$n,m)):(m=w.cache,Rs(a,$n,m),m!==y.cache&&n0(a,[$n],u,!0))),ur(i,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function Hi(i){i.flags|=4}function V0(i,a,u,m,y){if((a=(i.mode&32)!==0)&&(a=!1),a){if(i.flags|=16777216,(y&335544128)===y)if(i.stateNode.complete)i.flags|=8192;else if(bO())i.flags|=8192;else throw Da=nh,s0}else i.flags&=-16777217}function ZR(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!c2(a))if(bO())i.flags|=8192;else throw Da=nh,s0}function _h(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?Zt():536870912,i.lanes|=a,Wl|=a)}function Mu(i,a){if(!At)switch(i.tailMode){case"hidden":a=i.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function un(i){var a=i.alternate!==null&&i.alternate.child===i.child,u=0,m=0;if(a)for(var y=i.child;y!==null;)u|=y.lanes|y.childLanes,m|=y.subtreeFlags&65011712,m|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)u|=y.lanes|y.childLanes,m|=y.subtreeFlags,m|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=m,i.childLanes=u,a}function k$(i,a,u){var m=a.pendingProps;switch(Qv(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return un(a),null;case 1:return un(a),null;case 3:return u=a.stateNode,m=null,i!==null&&(m=i.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),Ui($n),xe(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&($l(a)?Hi(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Jv())),un(a),null;case 26:var y=a.type,w=a.memoizedState;return i===null?(Hi(a),w!==null?(un(a),ZR(a,w)):(un(a),V0(a,y,null,m,u))):w?w!==i.memoizedState?(Hi(a),un(a),ZR(a,w)):(un(a),a.flags&=-16777217):(i=i.memoizedProps,i!==m&&Hi(a),un(a),V0(a,y,i,m,u)),null;case 27:if(Y(a),u=X.current,y=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==m&&Hi(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return un(a),null}i=D.current,$l(a)?Tx(a):(i=t2(y,m,u),a.stateNode=i,Hi(a))}return un(a),null;case 5:if(Y(a),y=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==m&&Hi(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return un(a),null}if(w=D.current,$l(a))Tx(a);else{var N=kh(X.current);switch(w){case 1:w=N.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:w=N.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":w=N.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":w=N.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":w=N.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof m.is=="string"?N.createElement("select",{is:m.is}):N.createElement("select"),m.multiple?w.multiple=!0:m.size&&(w.size=m.size);break;default:w=typeof m.is=="string"?N.createElement(y,{is:m.is}):N.createElement(y)}}w[ar]=a,w[Fr]=m;e:for(N=a.child;N!==null;){if(N.tag===5||N.tag===6)w.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===a)break e;for(;N.sibling===null;){if(N.return===null||N.return===a)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}a.stateNode=w;e:switch(dr(w,y,m),y){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Hi(a)}}return un(a),V0(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,u),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==m&&Hi(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(r(166));if(i=X.current,$l(a)){if(i=a.stateNode,u=a.memoizedProps,m=null,y=lr,y!==null)switch(y.tag){case 27:case 5:m=y.memoizedProps}i[ar]=a,i=!!(i.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||HO(i.nodeValue,u)),i||xs(a,!0)}else i=kh(i).createTextNode(m),i[ar]=a,a.stateNode=i}return un(a),null;case 31:if(u=a.memoizedState,i===null||i.memoizedState!==null){if(m=$l(a),u!==null){if(i===null){if(!m)throw Error(r(318));if(i=a.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[ar]=a}else Ia(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;un(a),i=!1}else u=Jv(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return a.flags&256?(oo(a),a):(oo(a),null);if((a.flags&128)!==0)throw Error(r(558))}return un(a),null;case 13:if(m=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=$l(a),m!==null&&m.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[ar]=a}else Ia(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;un(a),y=!1}else y=Jv(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(oo(a),a):(oo(a),null)}return oo(a),(a.flags&128)!==0?(a.lanes=u,a):(u=m!==null,i=i!==null&&i.memoizedState!==null,u&&(m=a.child,y=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(y=m.alternate.memoizedState.cachePool.pool),w=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(w=m.memoizedState.cachePool.pool),w!==y&&(m.flags|=2048)),u!==i&&u&&(a.child.flags|=8192),_h(a,a.updateQueue),un(a),null);case 4:return xe(),i===null&&dy(a.stateNode.containerInfo),un(a),null;case 10:return Ui(a.type),un(a),null;case 19:if(G(On),m=a.memoizedState,m===null)return un(a),null;if(y=(a.flags&128)!==0,w=m.rendering,w===null)if(y)Mu(m,!1);else{if(xn!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(w=sh(i),w!==null){for(a.flags|=128,Mu(m,!1),i=w.updateQueue,a.updateQueue=i,_h(a,i),a.subtreeFlags=0,i=u,u=a.child;u!==null;)Sx(u,i),u=u.sibling;return V(On,On.current&1|2),At&&ji(a,m.treeForkCount),a.child}i=i.sibling}m.tail!==null&&K()>xh&&(a.flags|=128,y=!0,Mu(m,!1),a.lanes=4194304)}else{if(!y)if(i=sh(w),i!==null){if(a.flags|=128,y=!0,i=i.updateQueue,a.updateQueue=i,_h(a,i),Mu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!w.alternate&&!At)return un(a),null}else 2*K()-m.renderingStartTime>xh&&u!==536870912&&(a.flags|=128,y=!0,Mu(m,!1),a.lanes=4194304);m.isBackwards?(w.sibling=a.child,a.child=w):(i=m.last,i!==null?i.sibling=w:a.child=w,m.last=w)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=K(),i.sibling=null,u=On.current,V(On,y?u&1|2:u&1),At&&ji(a,m.treeForkCount),i):(un(a),null);case 22:case 23:return oo(a),f0(),m=a.memoizedState!==null,i!==null?i.memoizedState!==null!==m&&(a.flags|=8192):m&&(a.flags|=8192),m?(u&536870912)!==0&&(a.flags&128)===0&&(un(a),a.subtreeFlags&6&&(a.flags|=8192)):un(a),u=a.updateQueue,u!==null&&_h(a,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==u&&(a.flags|=2048),i!==null&&G(Na),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Ui($n),un(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function D$(i,a){switch(Qv(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return Ui($n),xe(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return Y(a),null;case 31:if(a.memoizedState!==null){if(oo(a),a.alternate===null)throw Error(r(340));Ia()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 13:if(oo(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));Ia()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return G(On),null;case 4:return xe(),null;case 10:return Ui(a.type),null;case 22:case 23:return oo(a),f0(),i!==null&&G(Na),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return Ui($n),null;case 25:return null;default:return null}}function YR(i,a){switch(Qv(a),a.tag){case 3:Ui($n),xe();break;case 26:case 27:case 5:Y(a);break;case 4:xe();break;case 31:a.memoizedState!==null&&oo(a);break;case 13:oo(a);break;case 19:G(On);break;case 10:Ui(a.type);break;case 22:case 23:oo(a),f0(),i!==null&&G(Na);break;case 24:Ui($n)}}function Nu(i,a){try{var u=a.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var y=m.next;u=y;do{if((u.tag&i)===i){m=void 0;var w=u.create,N=u.inst;m=w(),N.destroy=m}u=u.next}while(u!==y)}}catch(z){Ht(a,a.return,z)}}function Ps(i,a,u){try{var m=a.updateQueue,y=m!==null?m.lastEffect:null;if(y!==null){var w=y.next;m=w;do{if((m.tag&i)===i){var N=m.inst,z=N.destroy;if(z!==void 0){N.destroy=void 0,y=a;var J=u,de=z;try{de()}catch(_e){Ht(y,J,_e)}}}m=m.next}while(m!==w)}}catch(_e){Ht(a,a.return,_e)}}function WR(i){var a=i.updateQueue;if(a!==null){var u=i.stateNode;try{Ux(a,u)}catch(m){Ht(i,i.return,m)}}}function QR(i,a,u){u.props=ja(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(m){Ht(i,a,m)}}function ku(i,a){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var m=i.stateNode;break;case 30:m=i.stateNode;break;default:m=i.stateNode}typeof u=="function"?i.refCleanup=u(m):u.current=m}}catch(y){Ht(i,a,y)}}function fi(i,a){var u=i.ref,m=i.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(y){Ht(i,a,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){Ht(i,a,y)}else u.current=null}function XR(i){var a=i.type,u=i.memoizedProps,m=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(y){Ht(i,i.return,y)}}function H0(i,a,u){try{var m=i.stateNode;rj(m,i.type,u,a),m[Fr]=a}catch(y){Ht(i,i.return,y)}}function JR(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&js(i.type)||i.tag===4}function q0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||JR(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&&js(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 G0(i,a,u){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(i),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Di));else if(m!==4&&(m===27&&js(i.type)&&(u=i.stateNode,a=null),i=i.child,i!==null))for(G0(i,a,u),i=i.sibling;i!==null;)G0(i,a,u),i=i.sibling}function bh(i,a,u){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?u.insertBefore(i,a):u.appendChild(i);else if(m!==4&&(m===27&&js(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(bh(i,a,u),i=i.sibling;i!==null;)bh(i,a,u),i=i.sibling}function eO(i){var a=i.stateNode,u=i.memoizedProps;try{for(var m=i.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);dr(a,m,u),a[ar]=i,a[Fr]=u}catch(w){Ht(i,i.return,w)}}var qi=!1,Un=!1,K0=!1,tO=typeof WeakSet=="function"?WeakSet:Set,nr=null;function L$(i,a){if(i=i.containerInfo,py=Fh,i=hx(i),Uv(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var y=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var N=0,z=-1,J=-1,de=0,_e=0,Ee=i,he=null;t:for(;;){for(var ge;Ee!==u||y!==0&&Ee.nodeType!==3||(z=N+y),Ee!==w||m!==0&&Ee.nodeType!==3||(J=N+m),Ee.nodeType===3&&(N+=Ee.nodeValue.length),(ge=Ee.firstChild)!==null;)he=Ee,Ee=ge;for(;;){if(Ee===i)break t;if(he===u&&++de===y&&(z=N),he===w&&++_e===m&&(J=N),(ge=Ee.nextSibling)!==null)break;Ee=he,he=Ee.parentNode}Ee=ge}u=z===-1||J===-1?null:{start:z,end:J}}else u=null}u=u||{start:0,end:0}}else u=null;for(my={focusedElem:i,selectionRange:u},Fh=!1,nr=a;nr!==null;)if(a=nr,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,nr=i;else for(;nr!==null;){switch(a=nr,w=a.alternate,i=a.flags,a.tag){case 0:if((i&4)!==0&&(i=a.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)y=i[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,u=a,y=w.memoizedProps,w=w.memoizedState,m=u.stateNode;try{var qe=ja(u.type,y);i=m.getSnapshotBeforeUpdate(qe,w),m.__reactInternalSnapshotBeforeUpdate=i}catch(nt){Ht(u,u.return,nt)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,u=i.nodeType,u===9)yy(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":yy(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=a.sibling,i!==null){i.return=a.return,nr=i;break}nr=a.return}}function nO(i,a,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Ki(i,u),m&4&&Nu(5,u);break;case 1:if(Ki(i,u),m&4)if(i=u.stateNode,a===null)try{i.componentDidMount()}catch(N){Ht(u,u.return,N)}else{var y=ja(u.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(y,a,i.__reactInternalSnapshotBeforeUpdate)}catch(N){Ht(u,u.return,N)}}m&64&&WR(u),m&512&&ku(u,u.return);break;case 3:if(Ki(i,u),m&64&&(i=u.updateQueue,i!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{Ux(i,a)}catch(N){Ht(u,u.return,N)}}break;case 27:a===null&&m&4&&eO(u);case 26:case 5:Ki(i,u),a===null&&m&4&&XR(u),m&512&&ku(u,u.return);break;case 12:Ki(i,u);break;case 31:Ki(i,u),m&4&&iO(i,u);break;case 13:Ki(i,u),m&4&&sO(i,u),m&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=q$.bind(null,u),dj(i,u))));break;case 22:if(m=u.memoizedState!==null||qi,!m){a=a!==null&&a.memoizedState!==null||Un,y=qi;var w=Un;qi=m,(Un=a)&&!w?Zi(i,u,(u.subtreeFlags&8772)!==0):Ki(i,u),qi=y,Un=w}break;case 30:break;default:Ki(i,u)}}function rO(i){var a=i.alternate;a!==null&&(i.alternate=null,rO(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&Ev(a)),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 hn=null,Vr=!1;function Gi(i,a,u){for(u=u.child;u!==null;)oO(i,a,u),u=u.sibling}function oO(i,a,u){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(_t,u)}catch{}switch(u.tag){case 26:Un||fi(u,a),Gi(i,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Un||fi(u,a);var m=hn,y=Vr;js(u.type)&&(hn=u.stateNode,Vr=!1),Gi(i,a,u),Vu(u.stateNode),hn=m,Vr=y;break;case 5:Un||fi(u,a);case 6:if(m=hn,y=Vr,hn=null,Gi(i,a,u),hn=m,Vr=y,hn!==null)if(Vr)try{(hn.nodeType===9?hn.body:hn.nodeName==="HTML"?hn.ownerDocument.body:hn).removeChild(u.stateNode)}catch(w){Ht(u,a,w)}else try{hn.removeChild(u.stateNode)}catch(w){Ht(u,a,w)}break;case 18:hn!==null&&(Vr?(i=hn,WO(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),oc(i)):WO(hn,u.stateNode));break;case 4:m=hn,y=Vr,hn=u.stateNode.containerInfo,Vr=!0,Gi(i,a,u),hn=m,Vr=y;break;case 0:case 11:case 14:case 15:Ps(2,u,a),Un||Ps(4,u,a),Gi(i,a,u);break;case 1:Un||(fi(u,a),m=u.stateNode,typeof m.componentWillUnmount=="function"&&QR(u,a,m)),Gi(i,a,u);break;case 21:Gi(i,a,u);break;case 22:Un=(m=Un)||u.memoizedState!==null,Gi(i,a,u),Un=m;break;default:Gi(i,a,u)}}function iO(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{oc(i)}catch(u){Ht(a,a.return,u)}}}function sO(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{oc(i)}catch(u){Ht(a,a.return,u)}}function $$(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new tO),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new tO),a;default:throw Error(r(435,i.tag))}}function wh(i,a){var u=$$(i);a.forEach(function(m){if(!u.has(m)){u.add(m);var y=G$.bind(null,i,m);m.then(y,y)}})}function Hr(i,a){var u=a.deletions;if(u!==null)for(var m=0;m<u.length;m++){var y=u[m],w=i,N=a,z=N;e:for(;z!==null;){switch(z.tag){case 27:if(js(z.type)){hn=z.stateNode,Vr=!1;break e}break;case 5:hn=z.stateNode,Vr=!1;break e;case 3:case 4:hn=z.stateNode.containerInfo,Vr=!0;break e}z=z.return}if(hn===null)throw Error(r(160));oO(w,N,y),hn=null,Vr=!1,w=y.alternate,w!==null&&(w.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)aO(a,i),a=a.sibling}var Yo=null;function aO(i,a){var u=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Hr(a,i),qr(i),m&4&&(Ps(3,i,i.return),Nu(3,i),Ps(5,i,i.return));break;case 1:Hr(a,i),qr(i),m&512&&(Un||u===null||fi(u,u.return)),m&64&&qi&&(i=i.updateQueue,i!==null&&(m=i.callbacks,m!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var y=Yo;if(Hr(a,i),qr(i),m&512&&(Un||u===null||fi(u,u.return)),m&4){var w=u!==null?u.memoizedState:null;if(m=i.memoizedState,u===null)if(m===null)if(i.stateNode===null){e:{m=i.type,u=i.memoizedProps,y=y.ownerDocument||y;t:switch(m){case"title":w=y.getElementsByTagName("title")[0],(!w||w[au]||w[ar]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=y.createElement(m),y.head.insertBefore(w,y.querySelector("head > title"))),dr(w,m,u),w[ar]=i,tr(w),m=w;break e;case"link":var N=a2("link","href",y).get(m+(u.href||""));if(N){for(var z=0;z<N.length;z++)if(w=N[z],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){N.splice(z,1);break t}}w=y.createElement(m),dr(w,m,u),y.head.appendChild(w);break;case"meta":if(N=a2("meta","content",y).get(m+(u.content||""))){for(z=0;z<N.length;z++)if(w=N[z],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){N.splice(z,1);break t}}w=y.createElement(m),dr(w,m,u),y.head.appendChild(w);break;default:throw Error(r(468,m))}w[ar]=i,tr(w),m=w}i.stateNode=m}else l2(y,i.type,i.stateNode);else i.stateNode=s2(y,m,i.memoizedProps);else w!==m?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,m===null?l2(y,i.type,i.stateNode):s2(y,m,i.memoizedProps)):m===null&&i.stateNode!==null&&H0(i,i.memoizedProps,u.memoizedProps)}break;case 27:Hr(a,i),qr(i),m&512&&(Un||u===null||fi(u,u.return)),u!==null&&m&4&&H0(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Hr(a,i),qr(i),m&512&&(Un||u===null||fi(u,u.return)),i.flags&32){y=i.stateNode;try{Tl(y,"")}catch(qe){Ht(i,i.return,qe)}}m&4&&i.stateNode!=null&&(y=i.memoizedProps,H0(i,y,u!==null?u.memoizedProps:y)),m&1024&&(K0=!0);break;case 6:if(Hr(a,i),qr(i),m&4){if(i.stateNode===null)throw Error(r(162));m=i.memoizedProps,u=i.stateNode;try{u.nodeValue=m}catch(qe){Ht(i,i.return,qe)}}break;case 3:if($h=null,y=Yo,Yo=Dh(a.containerInfo),Hr(a,i),Yo=y,qr(i),m&4&&u!==null&&u.memoizedState.isDehydrated)try{oc(a.containerInfo)}catch(qe){Ht(i,i.return,qe)}K0&&(K0=!1,lO(i));break;case 4:m=Yo,Yo=Dh(i.stateNode.containerInfo),Hr(a,i),qr(i),Yo=m;break;case 12:Hr(a,i),qr(i);break;case 31:Hr(a,i),qr(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,wh(i,m)));break;case 13:Hr(a,i),qr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Eh=K()),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,wh(i,m)));break;case 22:y=i.memoizedState!==null;var J=u!==null&&u.memoizedState!==null,de=qi,_e=Un;if(qi=de||y,Un=_e||J,Hr(a,i),Un=_e,qi=de,qr(i),m&8192)e:for(a=i.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(u===null||J||qi||Un||za(i)),u=null,a=i;;){if(a.tag===5||a.tag===26){if(u===null){J=u=a;try{if(w=J.stateNode,y)N=w.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{z=J.stateNode;var Ee=J.memoizedProps.style,he=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;z.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(qe){Ht(J,J.return,qe)}}}else if(a.tag===6){if(u===null){J=a;try{J.stateNode.nodeValue=y?"":J.memoizedProps}catch(qe){Ht(J,J.return,qe)}}}else if(a.tag===18){if(u===null){J=a;try{var ge=J.stateNode;y?QO(ge,!0):QO(J.stateNode,!1)}catch(qe){Ht(J,J.return,qe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=i.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,wh(i,u))));break;case 19:Hr(a,i),qr(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,wh(i,m)));break;case 30:break;case 21:break;default:Hr(a,i),qr(i)}}function qr(i){var a=i.flags;if(a&2){try{for(var u,m=i.return;m!==null;){if(JR(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var y=u.stateNode,w=q0(i);bh(i,w,y);break;case 5:var N=u.stateNode;u.flags&32&&(Tl(N,""),u.flags&=-33);var z=q0(i);bh(i,z,N);break;case 3:case 4:var J=u.stateNode.containerInfo,de=q0(i);G0(i,de,J);break;default:throw Error(r(161))}}catch(_e){Ht(i,i.return,_e)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function lO(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;lO(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function Ki(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)nO(i,a.alternate,a),a=a.sibling}function za(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:Ps(4,a,a.return),za(a);break;case 1:fi(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&QR(a,a.return,u),za(a);break;case 27:Vu(a.stateNode);case 26:case 5:fi(a,a.return),za(a);break;case 22:a.memoizedState===null&&za(a);break;case 30:za(a);break;default:za(a)}i=i.sibling}}function Zi(i,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,y=i,w=a,N=w.flags;switch(w.tag){case 0:case 11:case 15:Zi(y,w,u),Nu(4,w);break;case 1:if(Zi(y,w,u),m=w,y=m.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(de){Ht(m,m.return,de)}if(m=w,y=m.updateQueue,y!==null){var z=m.stateNode;try{var J=y.shared.hiddenCallbacks;if(J!==null)for(y.shared.hiddenCallbacks=null,y=0;y<J.length;y++)zx(J[y],z)}catch(de){Ht(m,m.return,de)}}u&&N&64&&WR(w),ku(w,w.return);break;case 27:eO(w);case 26:case 5:Zi(y,w,u),u&&m===null&&N&4&&XR(w),ku(w,w.return);break;case 12:Zi(y,w,u);break;case 31:Zi(y,w,u),u&&N&4&&iO(y,w);break;case 13:Zi(y,w,u),u&&N&4&&sO(y,w);break;case 22:w.memoizedState===null&&Zi(y,w,u),ku(w,w.return);break;case 30:break;default:Zi(y,w,u)}a=a.sibling}}function Z0(i,a){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&bu(u))}function Y0(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&bu(i))}function Wo(i,a,u,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)cO(i,a,u,m),a=a.sibling}function cO(i,a,u,m){var y=a.flags;switch(a.tag){case 0:case 11:case 15:Wo(i,a,u,m),y&2048&&Nu(9,a);break;case 1:Wo(i,a,u,m);break;case 3:Wo(i,a,u,m),y&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&bu(i)));break;case 12:if(y&2048){Wo(i,a,u,m),i=a.stateNode;try{var w=a.memoizedProps,N=w.id,z=w.onPostCommit;typeof z=="function"&&z(N,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(J){Ht(a,a.return,J)}}else Wo(i,a,u,m);break;case 31:Wo(i,a,u,m);break;case 13:Wo(i,a,u,m);break;case 23:break;case 22:w=a.stateNode,N=a.alternate,a.memoizedState!==null?w._visibility&2?Wo(i,a,u,m):Du(i,a):w._visibility&2?Wo(i,a,u,m):(w._visibility|=2,Kl(i,a,u,m,(a.subtreeFlags&10256)!==0||!1)),y&2048&&Z0(N,a);break;case 24:Wo(i,a,u,m),y&2048&&Y0(a.alternate,a);break;default:Wo(i,a,u,m)}}function Kl(i,a,u,m,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var w=i,N=a,z=u,J=m,de=N.flags;switch(N.tag){case 0:case 11:case 15:Kl(w,N,z,J,y),Nu(8,N);break;case 23:break;case 22:var _e=N.stateNode;N.memoizedState!==null?_e._visibility&2?Kl(w,N,z,J,y):Du(w,N):(_e._visibility|=2,Kl(w,N,z,J,y)),y&&de&2048&&Z0(N.alternate,N);break;case 24:Kl(w,N,z,J,y),y&&de&2048&&Y0(N.alternate,N);break;default:Kl(w,N,z,J,y)}a=a.sibling}}function Du(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=i,m=a,y=m.flags;switch(m.tag){case 22:Du(u,m),y&2048&&Z0(m.alternate,m);break;case 24:Du(u,m),y&2048&&Y0(m.alternate,m);break;default:Du(u,m)}a=a.sibling}}var Lu=8192;function Zl(i,a,u){if(i.subtreeFlags&Lu)for(i=i.child;i!==null;)uO(i,a,u),i=i.sibling}function uO(i,a,u){switch(i.tag){case 26:Zl(i,a,u),i.flags&Lu&&i.memoizedState!==null&&Ej(u,Yo,i.memoizedState,i.memoizedProps);break;case 5:Zl(i,a,u);break;case 3:case 4:var m=Yo;Yo=Dh(i.stateNode.containerInfo),Zl(i,a,u),Yo=m;break;case 22:i.memoizedState===null&&(m=i.alternate,m!==null&&m.memoizedState!==null?(m=Lu,Lu=16777216,Zl(i,a,u),Lu=m):Zl(i,a,u));break;default:Zl(i,a,u)}}function dO(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function $u(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var m=a[u];nr=m,hO(m,i)}dO(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)fO(i),i=i.sibling}function fO(i){switch(i.tag){case 0:case 11:case 15:$u(i),i.flags&2048&&Ps(9,i,i.return);break;case 3:$u(i);break;case 12:$u(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Sh(i)):$u(i);break;default:$u(i)}}function Sh(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var m=a[u];nr=m,hO(m,i)}dO(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:Ps(8,a,a.return),Sh(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Sh(a));break;default:Sh(a)}i=i.sibling}}function hO(i,a){for(;nr!==null;){var u=nr;switch(u.tag){case 0:case 11:case 15:Ps(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:bu(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,nr=m;else e:for(u=i;nr!==null;){m=nr;var y=m.sibling,w=m.return;if(rO(m),m===u){nr=null;break e}if(y!==null){y.return=w,nr=y;break e}nr=w}}}var j$={getCacheForType:function(i){var a=cr($n),u=a.data.get(i);return u===void 0&&(u=i(),a.data.set(i,u)),u},cacheSignal:function(){return cr($n).controller.signal}},z$=typeof WeakMap=="function"?WeakMap:Map,Ut=0,en=null,wt=null,Rt=0,Vt=0,io=null,Ms=!1,Yl=!1,W0=!1,Yi=0,xn=0,Ns=0,Ua=0,Q0=0,so=0,Wl=0,ju=null,Gr=null,X0=!1,Eh=0,pO=0,xh=1/0,Rh=null,ks=null,Gn=0,Ds=null,Ql=null,Wi=0,J0=0,ey=null,mO=null,zu=0,ty=null;function ao(){return(Ut&2)!==0&&Rt!==0?Rt&-Rt:q.T!==null?ay():wv()}function gO(){if(so===0)if((Rt&536870912)===0||At){var i=Ct;Ct<<=1,(Ct&3932160)===0&&(Ct=262144),so=i}else so=536870912;return i=ro.current,i!==null&&(i.flags|=32),so}function Kr(i,a,u){(i===en&&(Vt===2||Vt===9)||i.cancelPendingCommit!==null)&&(Xl(i,0),Ls(i,Rt,so,!1)),Lt(i,u),((Ut&2)===0||i!==en)&&(i===en&&((Ut&2)===0&&(Ua|=u),xn===4&&Ls(i,Rt,so,!1)),hi(i))}function vO(i,a,u){if((Ut&6)!==0)throw Error(r(327));var m=!u&&(a&127)===0&&(a&i.expiredLanes)===0||ft(i,a),y=m?B$(i,a):ry(i,a,!0),w=m;do{if(y===0){Yl&&!m&&Ls(i,a,0,!1);break}else{if(u=i.current.alternate,w&&!U$(u)){y=ry(i,a,!1),w=!1;continue}if(y===2){if(w=a,i.errorRecoveryDisabledLanes&w)var N=0;else N=i.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){a=N;e:{var z=i;y=ju;var J=z.current.memoizedState.isDehydrated;if(J&&(Xl(z,N).flags|=256),N=ry(z,N,!1),N!==2){if(W0&&!J){z.errorRecoveryDisabledLanes|=w,Ua|=w,y=4;break e}w=Gr,Gr=y,w!==null&&(Gr===null?Gr=w:Gr.push.apply(Gr,w))}y=N}if(w=!1,y!==2)continue}}if(y===1){Xl(i,0),Ls(i,a,0,!0);break}e:{switch(m=i,w=y,w){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Ls(m,a,so,!Ms);break e;case 2:Gr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(y=Eh+300-K(),10<y)){if(Ls(m,a,so,!Ms),Ke(m,0,!0)!==0)break e;Wi=a,m.timeoutHandle=ZO(yO.bind(null,m,u,Gr,Rh,X0,a,so,Ua,Wl,Ms,w,"Throttled",-0,0),y);break e}yO(m,u,Gr,Rh,X0,a,so,Ua,Wl,Ms,w,null,-0,0)}}break}while(!0);hi(i)}function yO(i,a,u,m,y,w,N,z,J,de,_e,Ee,he,ge){if(i.timeoutHandle=-1,Ee=a.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Di},uO(a,w,Ee);var qe=(w&62914560)===w?Eh-K():(w&4194048)===w?pO-K():0;if(qe=xj(Ee,qe),qe!==null){Wi=w,i.cancelPendingCommit=qe(OO.bind(null,i,a,w,u,m,y,N,z,J,_e,Ee,null,he,ge)),Ls(i,w,N,!de);return}}OO(i,a,w,u,m,y,N,z,J)}function U$(i){for(var a=i;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var y=u[m],w=y.getSnapshot;y=y.value;try{if(!to(w(),y))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ls(i,a,u,m){a&=~Q0,a&=~Ua,i.suspendedLanes|=a,i.pingedLanes&=~a,m&&(i.warmLanes|=a),m=i.expirationTimes;for(var y=a;0<y;){var w=31-Ln(y),N=1<<w;m[w]=-1,y&=~N}u!==0&&So(i,u,a)}function Oh(){return(Ut&6)===0?(Uu(0),!1):!0}function ny(){if(wt!==null){if(Vt===0)var i=wt.return;else i=wt,zi=Pa=null,y0(i),Bl=null,Su=0,i=wt;for(;i!==null;)YR(i.alternate,i),i=i.return;wt=null}}function Xl(i,a){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,sj(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),Wi=0,ny(),en=i,wt=u=$i(i.current,null),Rt=a,Vt=0,io=null,Ms=!1,Yl=ft(i,a),W0=!1,Wl=so=Q0=Ua=Ns=xn=0,Gr=ju=null,X0=!1,(a&8)!==0&&(a|=a&32);var m=i.entangledLanes;if(m!==0)for(i=i.entanglements,m&=a;0<m;){var y=31-Ln(m),w=1<<y;a|=i[y],m&=~w}return Yi=a,Kf(),u}function _O(i,a){at=null,q.H=Iu,a===Fl||a===th?(a=Dx(),Vt=3):a===s0?(a=Dx(),Vt=4):Vt=a===k0?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,io=a,wt===null&&(xn=1,mh(i,Oo(a,i.current)))}function bO(){var i=ro.current;return i===null?!0:(Rt&4194048)===Rt?Io===null:(Rt&62914560)===Rt||(Rt&536870912)!==0?i===Io:!1}function wO(){var i=q.H;return q.H=Iu,i===null?Iu:i}function SO(){var i=q.A;return q.A=j$,i}function Th(){xn=4,Ms||(Rt&4194048)!==Rt&&ro.current!==null||(Yl=!0),(Ns&134217727)===0&&(Ua&134217727)===0||en===null||Ls(en,Rt,so,!1)}function ry(i,a,u){var m=Ut;Ut|=2;var y=wO(),w=SO();(en!==i||Rt!==a)&&(Rh=null,Xl(i,a)),a=!1;var N=xn;e:do try{if(Vt!==0&&wt!==null){var z=wt,J=io;switch(Vt){case 8:ny(),N=6;break e;case 3:case 2:case 9:case 6:ro.current===null&&(a=!0);var de=Vt;if(Vt=0,io=null,Jl(i,z,J,de),u&&Yl){N=0;break e}break;default:de=Vt,Vt=0,io=null,Jl(i,z,J,de)}}F$(),N=xn;break}catch(_e){_O(i,_e)}while(!0);return a&&i.shellSuspendCounter++,zi=Pa=null,Ut=m,q.H=y,q.A=w,wt===null&&(en=null,Rt=0,Kf()),N}function F$(){for(;wt!==null;)EO(wt)}function B$(i,a){var u=Ut;Ut|=2;var m=wO(),y=SO();en!==i||Rt!==a?(Rh=null,xh=K()+500,Xl(i,a)):Yl=ft(i,a);e:do try{if(Vt!==0&&wt!==null){a=wt;var w=io;t:switch(Vt){case 1:Vt=0,io=null,Jl(i,a,w,1);break;case 2:case 9:if(Nx(w)){Vt=0,io=null,xO(a);break}a=function(){Vt!==2&&Vt!==9||en!==i||(Vt=7),hi(i)},w.then(a,a);break e;case 3:Vt=7;break e;case 4:Vt=5;break e;case 7:Nx(w)?(Vt=0,io=null,xO(a)):(Vt=0,io=null,Jl(i,a,w,7));break;case 5:var N=null;switch(wt.tag){case 26:N=wt.memoizedState;case 5:case 27:var z=wt;if(N?c2(N):z.stateNode.complete){Vt=0,io=null;var J=z.sibling;if(J!==null)wt=J;else{var de=z.return;de!==null?(wt=de,Ch(de)):wt=null}break t}}Vt=0,io=null,Jl(i,a,w,5);break;case 6:Vt=0,io=null,Jl(i,a,w,6);break;case 8:ny(),xn=6;break e;default:throw Error(r(462))}}V$();break}catch(_e){_O(i,_e)}while(!0);return zi=Pa=null,q.H=m,q.A=y,Ut=u,wt!==null?0:(en=null,Rt=0,Kf(),xn)}function V$(){for(;wt!==null&&!Pe();)EO(wt)}function EO(i){var a=KR(i.alternate,i,Yi);i.memoizedProps=i.pendingProps,a===null?Ch(i):wt=a}function xO(i){var a=i,u=a.alternate;switch(a.tag){case 15:case 0:a=FR(u,a,a.pendingProps,a.type,void 0,Rt);break;case 11:a=FR(u,a,a.pendingProps,a.type.render,a.ref,Rt);break;case 5:y0(a);default:YR(u,a),a=wt=Sx(a,Yi),a=KR(u,a,Yi)}i.memoizedProps=i.pendingProps,a===null?Ch(i):wt=a}function Jl(i,a,u,m){zi=Pa=null,y0(a),Bl=null,Su=0;var y=a.return;try{if(P$(i,y,a,u,Rt)){xn=1,mh(i,Oo(u,i.current)),wt=null;return}}catch(w){if(y!==null)throw wt=y,w;xn=1,mh(i,Oo(u,i.current)),wt=null;return}a.flags&32768?(At||m===1?i=!0:Yl||(Rt&536870912)!==0?i=!1:(Ms=i=!0,(m===2||m===9||m===3||m===6)&&(m=ro.current,m!==null&&m.tag===13&&(m.flags|=16384))),RO(a,i)):Ch(a)}function Ch(i){var a=i;do{if((a.flags&32768)!==0){RO(a,Ms);return}i=a.return;var u=k$(a.alternate,a,Yi);if(u!==null){wt=u;return}if(a=a.sibling,a!==null){wt=a;return}wt=a=i}while(a!==null);xn===0&&(xn=5)}function RO(i,a){do{var u=D$(i.alternate,i);if(u!==null){u.flags&=32767,wt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(i=i.sibling,i!==null)){wt=i;return}wt=i=u}while(i!==null);xn=6,wt=null}function OO(i,a,u,m,y,w,N,z,J){i.cancelPendingCommit=null;do Ah();while(Gn!==0);if((Ut&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(w=a.lanes|a.childLanes,w|=qv,ln(i,u,w,N,z,J),i===en&&(wt=en=null,Rt=0),Ql=a,Ds=i,Wi=u,J0=w,ey=y,mO=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,K$(Ae,function(){return PO(),null})):(i.callbackNode=null,i.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=q.T,q.T=null,y=W.p,W.p=2,N=Ut,Ut|=4;try{L$(i,a,u)}finally{Ut=N,W.p=y,q.T=m}}Gn=1,TO(),CO(),AO()}}function TO(){if(Gn===1){Gn=0;var i=Ds,a=Ql,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=q.T,q.T=null;var m=W.p;W.p=2;var y=Ut;Ut|=4;try{aO(a,i);var w=my,N=hx(i.containerInfo),z=w.focusedElem,J=w.selectionRange;if(N!==z&&z&&z.ownerDocument&&fx(z.ownerDocument.documentElement,z)){if(J!==null&&Uv(z)){var de=J.start,_e=J.end;if(_e===void 0&&(_e=de),"selectionStart"in z)z.selectionStart=de,z.selectionEnd=Math.min(_e,z.value.length);else{var Ee=z.ownerDocument||document,he=Ee&&Ee.defaultView||window;if(he.getSelection){var ge=he.getSelection(),qe=z.textContent.length,nt=Math.min(J.start,qe),Qt=J.end===void 0?nt:Math.min(J.end,qe);!ge.extend&&nt>Qt&&(N=Qt,Qt=nt,nt=N);var ce=dx(z,nt),oe=dx(z,Qt);if(ce&&oe&&(ge.rangeCount!==1||ge.anchorNode!==ce.node||ge.anchorOffset!==ce.offset||ge.focusNode!==oe.node||ge.focusOffset!==oe.offset)){var ue=Ee.createRange();ue.setStart(ce.node,ce.offset),ge.removeAllRanges(),nt>Qt?(ge.addRange(ue),ge.extend(oe.node,oe.offset)):(ue.setEnd(oe.node,oe.offset),ge.addRange(ue))}}}}for(Ee=[],ge=z;ge=ge.parentNode;)ge.nodeType===1&&Ee.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<Ee.length;z++){var we=Ee[z];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}Fh=!!py,my=py=null}finally{Ut=y,W.p=m,q.T=u}}i.current=a,Gn=2}}function CO(){if(Gn===2){Gn=0;var i=Ds,a=Ql,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=q.T,q.T=null;var m=W.p;W.p=2;var y=Ut;Ut|=4;try{nO(i,a.alternate,a)}finally{Ut=y,W.p=m,q.T=u}}Gn=3}}function AO(){if(Gn===4||Gn===3){Gn=0,Fe();var i=Ds,a=Ql,u=Wi,m=mO;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Gn=5:(Gn=0,Ql=Ds=null,IO(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(ks=null),Ko(u),a=a.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(_t,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=q.T,y=W.p,W.p=2,q.T=null;try{for(var w=i.onRecoverableError,N=0;N<m.length;N++){var z=m[N];w(z.value,{componentStack:z.stack})}}finally{q.T=a,W.p=y}}(Wi&3)!==0&&Ah(),hi(i),y=i.pendingLanes,(u&261930)!==0&&(y&42)!==0?i===ty?zu++:(zu=0,ty=i):zu=0,Uu(0)}}function IO(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,bu(a)))}function Ah(){return TO(),CO(),AO(),PO()}function PO(){if(Gn!==5)return!1;var i=Ds,a=J0;J0=0;var u=Ko(Wi),m=q.T,y=W.p;try{W.p=32>u?32:u,q.T=null,u=ey,ey=null;var w=Ds,N=Wi;if(Gn=0,Ql=Ds=null,Wi=0,(Ut&6)!==0)throw Error(r(331));var z=Ut;if(Ut|=4,fO(w.current),cO(w,w.current,N,u),Ut=z,Uu(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(_t,w)}catch{}return!0}finally{W.p=y,q.T=m,IO(i,a)}}function MO(i,a,u){a=Oo(u,a),a=N0(i.stateNode,a,2),i=Cs(i,a,2),i!==null&&(Lt(i,2),hi(i))}function Ht(i,a,u){if(i.tag===3)MO(i,i,u);else for(;a!==null;){if(a.tag===3){MO(a,i,u);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ks===null||!ks.has(m))){i=Oo(u,i),u=NR(2),m=Cs(a,u,2),m!==null&&(kR(u,m,a,i),Lt(m,2),hi(m));break}}a=a.return}}function oy(i,a,u){var m=i.pingCache;if(m===null){m=i.pingCache=new z$;var y=new Set;m.set(a,y)}else y=m.get(a),y===void 0&&(y=new Set,m.set(a,y));y.has(u)||(W0=!0,y.add(u),i=H$.bind(null,i,a,u),a.then(i,i))}function H$(i,a,u){var m=i.pingCache;m!==null&&m.delete(a),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,en===i&&(Rt&u)===u&&(xn===4||xn===3&&(Rt&62914560)===Rt&&300>K()-Eh?(Ut&2)===0&&Xl(i,0):Q0|=u,Wl===Rt&&(Wl=0)),hi(i)}function NO(i,a){a===0&&(a=Zt()),i=Ca(i,a),i!==null&&(Lt(i,a),hi(i))}function q$(i){var a=i.memoizedState,u=0;a!==null&&(u=a.retryLane),NO(i,u)}function G$(i,a){var u=0;switch(i.tag){case 31:case 13:var m=i.stateNode,y=i.memoizedState;y!==null&&(u=y.retryLane);break;case 19:m=i.stateNode;break;case 22:m=i.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(a),NO(i,u)}function K$(i,a){return Qe(i,a)}var Ih=null,ec=null,iy=!1,Ph=!1,sy=!1,$s=0;function hi(i){i!==ec&&i.next===null&&(ec===null?Ih=ec=i:ec=ec.next=i),Ph=!0,iy||(iy=!0,Y$())}function Uu(i,a){if(!sy&&Ph){sy=!0;do for(var u=!1,m=Ih;m!==null;){if(i!==0){var y=m.pendingLanes;if(y===0)var w=0;else{var N=m.suspendedLanes,z=m.pingedLanes;w=(1<<31-Ln(42|i)+1)-1,w&=y&~(N&~z),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,$O(m,w))}else w=Rt,w=Ke(m,m===en?w:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(w&3)===0||ft(m,w)||(u=!0,$O(m,w));m=m.next}while(u);sy=!1}}function Z$(){kO()}function kO(){Ph=iy=!1;var i=0;$s!==0&&ij()&&(i=$s);for(var a=K(),u=null,m=Ih;m!==null;){var y=m.next,w=DO(m,a);w===0?(m.next=null,u===null?Ih=y:u.next=y,y===null&&(ec=u)):(u=m,(i!==0||(w&3)!==0)&&(Ph=!0)),m=y}Gn!==0&&Gn!==5||Uu(i),$s!==0&&($s=0)}function DO(i,a){for(var u=i.suspendedLanes,m=i.pingedLanes,y=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var N=31-Ln(w),z=1<<N,J=y[N];J===-1?((z&u)===0||(z&m)!==0)&&(y[N]=Jt(z,a)):J<=a&&(i.expiredLanes|=z),w&=~z}if(a=en,u=Rt,u=Ke(i,i===a?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m=i.callbackNode,u===0||i===a&&(Vt===2||Vt===9)||i.cancelPendingCommit!==null)return m!==null&&m!==null&&Me(m),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||ft(i,u)){if(a=u&-u,a===i.callbackPriority)return a;switch(m!==null&&Me(m),Ko(u)){case 2:case 8:u=Oe;break;case 32:u=Ae;break;case 268435456:u=ke;break;default:u=Ae}return m=LO.bind(null,i),u=Qe(u,m),i.callbackPriority=a,i.callbackNode=u,a}return m!==null&&m!==null&&Me(m),i.callbackPriority=2,i.callbackNode=null,2}function LO(i,a){if(Gn!==0&&Gn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Ah()&&i.callbackNode!==u)return null;var m=Rt;return m=Ke(i,i===en?m:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m===0?null:(vO(i,m,a),DO(i,K()),i.callbackNode!=null&&i.callbackNode===u?LO.bind(null,i):null)}function $O(i,a){if(Ah())return null;vO(i,a,!0)}function Y$(){aj(function(){(Ut&6)!==0?Qe(ae,Z$):kO()})}function ay(){if($s===0){var i=zl;i===0&&(i=pt,pt<<=1,(pt&261888)===0&&(pt=256)),$s=i}return $s}function jO(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:zf(""+i)}function zO(i,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,i.id&&u.setAttribute("form",i.id),a.parentNode.insertBefore(u,a),i=new FormData(i),u.parentNode.removeChild(u),i}function W$(i,a,u,m,y){if(a==="submit"&&u&&u.stateNode===y){var w=jO((y[Fr]||null).action),N=m.submitter;N&&(a=(a=N[Fr]||null)?jO(a.formAction):N.getAttribute("formAction"),a!==null&&(w=a,N=null));var z=new Vf("action","action",null,m,y);i.push({event:z,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if($s!==0){var J=N?zO(y,N):new FormData(y);T0(u,{pending:!0,data:J,method:y.method,action:w},null,J)}}else typeof w=="function"&&(z.preventDefault(),J=N?zO(y,N):new FormData(y),T0(u,{pending:!0,data:J,method:y.method,action:w},w,J))},currentTarget:y}]})}}for(var ly=0;ly<Hv.length;ly++){var cy=Hv[ly],Q$=cy.toLowerCase(),X$=cy[0].toUpperCase()+cy.slice(1);Zo(Q$,"on"+X$)}Zo(gx,"onAnimationEnd"),Zo(vx,"onAnimationIteration"),Zo(yx,"onAnimationStart"),Zo("dblclick","onDoubleClick"),Zo("focusin","onFocus"),Zo("focusout","onBlur"),Zo(p$,"onTransitionRun"),Zo(m$,"onTransitionStart"),Zo(g$,"onTransitionCancel"),Zo(_x,"onTransitionEnd"),Rl("onMouseEnter",["mouseout","mouseover"]),Rl("onMouseLeave",["mouseout","mouseover"]),Rl("onPointerEnter",["pointerout","pointerover"]),Rl("onPointerLeave",["pointerout","pointerover"]),xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fu="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(" "),J$=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fu));function UO(i,a){a=(a&4)!==0;for(var u=0;u<i.length;u++){var m=i[u],y=m.event;m=m.listeners;e:{var w=void 0;if(a)for(var N=m.length-1;0<=N;N--){var z=m[N],J=z.instance,de=z.currentTarget;if(z=z.listener,J!==w&&y.isPropagationStopped())break e;w=z,y.currentTarget=de;try{w(y)}catch(_e){Gf(_e)}y.currentTarget=null,w=J}else for(N=0;N<m.length;N++){if(z=m[N],J=z.instance,de=z.currentTarget,z=z.listener,J!==w&&y.isPropagationStopped())break e;w=z,y.currentTarget=de;try{w(y)}catch(_e){Gf(_e)}y.currentTarget=null,w=J}}}}function St(i,a){var u=a[Sv];u===void 0&&(u=a[Sv]=new Set);var m=i+"__bubble";u.has(m)||(FO(a,i,2,!1),u.add(m))}function uy(i,a,u){var m=0;a&&(m|=4),FO(u,i,m,a)}var Mh="_reactListening"+Math.random().toString(36).slice(2);function dy(i){if(!i[Mh]){i[Mh]=!0,kE.forEach(function(u){u!=="selectionchange"&&(J$.has(u)||uy(u,!1,i),uy(u,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[Mh]||(a[Mh]=!0,uy("selectionchange",!1,a))}}function FO(i,a,u,m){switch(g2(a)){case 2:var y=Tj;break;case 8:y=Cj;break;default:y=Oy}u=y.bind(null,a,u,i),y=void 0,!Pv||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),m?y!==void 0?i.addEventListener(a,u,{capture:!0,passive:y}):i.addEventListener(a,u,!0):y!==void 0?i.addEventListener(a,u,{passive:y}):i.addEventListener(a,u,!1)}function fy(i,a,u,m,y){var w=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var N=m.tag;if(N===3||N===4){var z=m.stateNode.containerInfo;if(z===y)break;if(N===4)for(N=m.return;N!==null;){var J=N.tag;if((J===3||J===4)&&N.stateNode.containerInfo===y)return;N=N.return}for(;z!==null;){if(N=Sl(z),N===null)return;if(J=N.tag,J===5||J===6||J===26||J===27){m=w=N;continue e}z=z.parentNode}}m=m.return}GE(function(){var de=w,_e=Av(u),Ee=[];e:{var he=bx.get(i);if(he!==void 0){var ge=Vf,qe=i;switch(i){case"keypress":if(Ff(u)===0)break e;case"keydown":case"keyup":ge=GL;break;case"focusin":qe="focus",ge=Dv;break;case"focusout":qe="blur",ge=Dv;break;case"beforeblur":case"afterblur":ge=Dv;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=YE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=kL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=YL;break;case gx:case vx:case yx:ge=$L;break;case _x:ge=QL;break;case"scroll":case"scrollend":ge=ML;break;case"wheel":ge=JL;break;case"copy":case"cut":case"paste":ge=zL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=QE;break;case"toggle":case"beforetoggle":ge=t$}var nt=(a&4)!==0,Qt=!nt&&(i==="scroll"||i==="scrollend"),ce=nt?he!==null?he+"Capture":null:he;nt=[];for(var oe=de,ue;oe!==null;){var we=oe;if(ue=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||ue===null||ce===null||(we=cu(oe,ce),we!=null&&nt.push(Bu(oe,we,ue))),Qt)break;oe=oe.return}0<nt.length&&(he=new ge(he,qe,null,u,_e),Ee.push({event:he,listeners:nt}))}}if((a&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",ge=i==="mouseout"||i==="pointerout",he&&u!==Cv&&(qe=u.relatedTarget||u.fromElement)&&(Sl(qe)||qe[wl]))break e;if((ge||he)&&(he=_e.window===_e?_e:(he=_e.ownerDocument)?he.defaultView||he.parentWindow:window,ge?(qe=u.relatedTarget||u.toElement,ge=de,qe=qe?Sl(qe):null,qe!==null&&(Qt=s(qe),nt=qe.tag,qe!==Qt||nt!==5&&nt!==27&&nt!==6)&&(qe=null)):(ge=null,qe=de),ge!==qe)){if(nt=YE,we="onMouseLeave",ce="onMouseEnter",oe="mouse",(i==="pointerout"||i==="pointerover")&&(nt=QE,we="onPointerLeave",ce="onPointerEnter",oe="pointer"),Qt=ge==null?he:lu(ge),ue=qe==null?he:lu(qe),he=new nt(we,oe+"leave",ge,u,_e),he.target=Qt,he.relatedTarget=ue,we=null,Sl(_e)===de&&(nt=new nt(ce,oe+"enter",qe,u,_e),nt.target=ue,nt.relatedTarget=Qt,we=nt),Qt=we,ge&&qe)t:{for(nt=ej,ce=ge,oe=qe,ue=0,we=ce;we;we=nt(we))ue++;we=0;for(var Xe=oe;Xe;Xe=nt(Xe))we++;for(;0<ue-we;)ce=nt(ce),ue--;for(;0<we-ue;)oe=nt(oe),we--;for(;ue--;){if(ce===oe||oe!==null&&ce===oe.alternate){nt=ce;break t}ce=nt(ce),oe=nt(oe)}nt=null}else nt=null;ge!==null&&BO(Ee,he,ge,nt,!1),qe!==null&&Qt!==null&&BO(Ee,Qt,qe,nt,!0)}}e:{if(he=de?lu(de):window,ge=he.nodeName&&he.nodeName.toLowerCase(),ge==="select"||ge==="input"&&he.type==="file")var $t=ix;else if(rx(he))if(sx)$t=d$;else{$t=c$;var Ze=l$}else ge=he.nodeName,!ge||ge.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?de&&Tv(de.elementType)&&($t=ix):$t=u$;if($t&&($t=$t(i,de))){ox(Ee,$t,u,_e);break e}Ze&&Ze(i,he,de),i==="focusout"&&de&&he.type==="number"&&de.memoizedProps.value!=null&&Ov(he,"number",he.value)}switch(Ze=de?lu(de):window,i){case"focusin":(rx(Ze)||Ze.contentEditable==="true")&&(Pl=Ze,Fv=de,vu=null);break;case"focusout":vu=Fv=Pl=null;break;case"mousedown":Bv=!0;break;case"contextmenu":case"mouseup":case"dragend":Bv=!1,px(Ee,u,_e);break;case"selectionchange":if(h$)break;case"keydown":case"keyup":px(Ee,u,_e)}var lt;if($v)e:{switch(i){case"compositionstart":var Ot="onCompositionStart";break e;case"compositionend":Ot="onCompositionEnd";break e;case"compositionupdate":Ot="onCompositionUpdate";break e}Ot=void 0}else Il?tx(i,u)&&(Ot="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Ot="onCompositionStart");Ot&&(XE&&u.locale!=="ko"&&(Il||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&Il&&(lt=KE()):(ws=_e,Mv="value"in ws?ws.value:ws.textContent,Il=!0)),Ze=Nh(de,Ot),0<Ze.length&&(Ot=new WE(Ot,i,null,u,_e),Ee.push({event:Ot,listeners:Ze}),lt?Ot.data=lt:(lt=nx(u),lt!==null&&(Ot.data=lt)))),(lt=r$?o$(i,u):i$(i,u))&&(Ot=Nh(de,"onBeforeInput"),0<Ot.length&&(Ze=new WE("onBeforeInput","beforeinput",null,u,_e),Ee.push({event:Ze,listeners:Ot}),Ze.data=lt)),W$(Ee,i,de,u,_e)}UO(Ee,a)})}function Bu(i,a,u){return{instance:i,listener:a,currentTarget:u}}function Nh(i,a){for(var u=a+"Capture",m=[];i!==null;){var y=i,w=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||w===null||(y=cu(i,u),y!=null&&m.unshift(Bu(i,y,w)),y=cu(i,a),y!=null&&m.push(Bu(i,y,w))),i.tag===3)return m;i=i.return}return[]}function ej(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function BO(i,a,u,m,y){for(var w=a._reactName,N=[];u!==null&&u!==m;){var z=u,J=z.alternate,de=z.stateNode;if(z=z.tag,J!==null&&J===m)break;z!==5&&z!==26&&z!==27||de===null||(J=de,y?(de=cu(u,w),de!=null&&N.unshift(Bu(u,de,J))):y||(de=cu(u,w),de!=null&&N.push(Bu(u,de,J)))),u=u.return}N.length!==0&&i.push({event:a,listeners:N})}var tj=/\r\n?/g,nj=/\u0000|\uFFFD/g;function VO(i){return(typeof i=="string"?i:""+i).replace(tj,`
|
|
10
|
-
`).replace(nj,"")}function HO(i,a){return a=VO(a),VO(i)===a}function Wt(i,a,u,m,y,w){switch(u){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||Tl(i,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&Tl(i,""+m);break;case"className":$f(i,"class",m);break;case"tabIndex":$f(i,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":$f(i,u,m);break;case"style":HE(i,m,w);break;case"data":if(a!=="object"){$f(i,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=zf(""+m),i.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){i.setAttribute(u,"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 w=="function"&&(u==="formAction"?(a!=="input"&&Wt(i,a,"name",y.name,y,null),Wt(i,a,"formEncType",y.formEncType,y,null),Wt(i,a,"formMethod",y.formMethod,y,null),Wt(i,a,"formTarget",y.formTarget,y,null)):(Wt(i,a,"encType",y.encType,y,null),Wt(i,a,"method",y.method,y,null),Wt(i,a,"target",y.target,y,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=zf(""+m),i.setAttribute(u,m);break;case"onClick":m!=null&&(i.onclick=Di);break;case"onScroll":m!=null&&St("scroll",i);break;case"onScrollEnd":m!=null&&St("scrollend",i);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":i.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){i.removeAttribute("xlink:href");break}u=zf(""+m),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""+m):i.removeAttribute(u);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":m&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":m===!0?i.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,m):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?i.setAttribute(u,m):i.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?i.removeAttribute(u):i.setAttribute(u,m);break;case"popover":St("beforetoggle",i),St("toggle",i),Lf(i,"popover",m);break;case"xlinkActuate":ki(i,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ki(i,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ki(i,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ki(i,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ki(i,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ki(i,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ki(i,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ki(i,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ki(i,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Lf(i,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=IL.get(u)||u,Lf(i,u,m))}}function hy(i,a,u,m,y,w){switch(u){case"style":HE(i,m,w);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof m=="string"?Tl(i,m):(typeof m=="number"||typeof m=="bigint")&&Tl(i,""+m);break;case"onScroll":m!=null&&St("scroll",i);break;case"onScrollEnd":m!=null&&St("scrollend",i);break;case"onClick":m!=null&&(i.onclick=Di);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!DE.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),a=u.slice(2,y?u.length-7:void 0),w=i[Fr]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(a,w,y),typeof m=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,m,y);break e}u in i?i[u]=m:m===!0?i.setAttribute(u,""):Lf(i,u,m)}}}function dr(i,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":St("error",i),St("load",i);var m=!1,y=!1,w;for(w in u)if(u.hasOwnProperty(w)){var N=u[w];if(N!=null)switch(w){case"src":m=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Wt(i,a,w,N,u,null)}}y&&Wt(i,a,"srcSet",u.srcSet,u,null),m&&Wt(i,a,"src",u.src,u,null);return;case"input":St("invalid",i);var z=w=N=y=null,J=null,de=null;for(m in u)if(u.hasOwnProperty(m)){var _e=u[m];if(_e!=null)switch(m){case"name":y=_e;break;case"type":N=_e;break;case"checked":J=_e;break;case"defaultChecked":de=_e;break;case"value":w=_e;break;case"defaultValue":z=_e;break;case"children":case"dangerouslySetInnerHTML":if(_e!=null)throw Error(r(137,a));break;default:Wt(i,a,m,_e,u,null)}}UE(i,w,z,J,de,N,y,!1);return;case"select":St("invalid",i),m=N=w=null;for(y in u)if(u.hasOwnProperty(y)&&(z=u[y],z!=null))switch(y){case"value":w=z;break;case"defaultValue":N=z;break;case"multiple":m=z;default:Wt(i,a,y,z,u,null)}a=w,u=N,i.multiple=!!m,a!=null?Ol(i,!!m,a,!1):u!=null&&Ol(i,!!m,u,!0);return;case"textarea":St("invalid",i),w=y=m=null;for(N in u)if(u.hasOwnProperty(N)&&(z=u[N],z!=null))switch(N){case"value":m=z;break;case"defaultValue":y=z;break;case"children":w=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(91));break;default:Wt(i,a,N,z,u,null)}BE(i,m,y,w);return;case"option":for(J in u)u.hasOwnProperty(J)&&(m=u[J],m!=null)&&(J==="selected"?i.selected=m&&typeof m!="function"&&typeof m!="symbol":Wt(i,a,J,m,u,null));return;case"dialog":St("beforetoggle",i),St("toggle",i),St("cancel",i),St("close",i);break;case"iframe":case"object":St("load",i);break;case"video":case"audio":for(m=0;m<Fu.length;m++)St(Fu[m],i);break;case"image":St("error",i),St("load",i);break;case"details":St("toggle",i);break;case"embed":case"source":case"link":St("error",i),St("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(de in u)if(u.hasOwnProperty(de)&&(m=u[de],m!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Wt(i,a,de,m,u,null)}return;default:if(Tv(a)){for(_e in u)u.hasOwnProperty(_e)&&(m=u[_e],m!==void 0&&hy(i,a,_e,m,u,void 0));return}}for(z in u)u.hasOwnProperty(z)&&(m=u[z],m!=null&&Wt(i,a,z,m,u,null))}function rj(i,a,u,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,w=null,N=null,z=null,J=null,de=null,_e=null;for(ge in u){var Ee=u[ge];if(u.hasOwnProperty(ge)&&Ee!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":J=Ee;default:m.hasOwnProperty(ge)||Wt(i,a,ge,null,m,Ee)}}for(var he in m){var ge=m[he];if(Ee=u[he],m.hasOwnProperty(he)&&(ge!=null||Ee!=null))switch(he){case"type":w=ge;break;case"name":y=ge;break;case"checked":de=ge;break;case"defaultChecked":_e=ge;break;case"value":N=ge;break;case"defaultValue":z=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,a));break;default:ge!==Ee&&Wt(i,a,he,ge,m,Ee)}}Rv(i,N,z,J,de,_e,w,y);return;case"select":ge=N=z=he=null;for(w in u)if(J=u[w],u.hasOwnProperty(w)&&J!=null)switch(w){case"value":break;case"multiple":ge=J;default:m.hasOwnProperty(w)||Wt(i,a,w,null,m,J)}for(y in m)if(w=m[y],J=u[y],m.hasOwnProperty(y)&&(w!=null||J!=null))switch(y){case"value":he=w;break;case"defaultValue":z=w;break;case"multiple":N=w;default:w!==J&&Wt(i,a,y,w,m,J)}a=z,u=N,m=ge,he!=null?Ol(i,!!u,he,!1):!!m!=!!u&&(a!=null?Ol(i,!!u,a,!0):Ol(i,!!u,u?[]:"",!1));return;case"textarea":ge=he=null;for(z in u)if(y=u[z],u.hasOwnProperty(z)&&y!=null&&!m.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Wt(i,a,z,null,m,y)}for(N in m)if(y=m[N],w=u[N],m.hasOwnProperty(N)&&(y!=null||w!=null))switch(N){case"value":he=y;break;case"defaultValue":ge=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==w&&Wt(i,a,N,y,m,w)}FE(i,he,ge);return;case"option":for(var qe in u)he=u[qe],u.hasOwnProperty(qe)&&he!=null&&!m.hasOwnProperty(qe)&&(qe==="selected"?i.selected=!1:Wt(i,a,qe,null,m,he));for(J in m)he=m[J],ge=u[J],m.hasOwnProperty(J)&&he!==ge&&(he!=null||ge!=null)&&(J==="selected"?i.selected=he&&typeof he!="function"&&typeof he!="symbol":Wt(i,a,J,he,m,ge));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 nt in u)he=u[nt],u.hasOwnProperty(nt)&&he!=null&&!m.hasOwnProperty(nt)&&Wt(i,a,nt,null,m,he);for(de in m)if(he=m[de],ge=u[de],m.hasOwnProperty(de)&&he!==ge&&(he!=null||ge!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,a));break;default:Wt(i,a,de,he,m,ge)}return;default:if(Tv(a)){for(var Qt in u)he=u[Qt],u.hasOwnProperty(Qt)&&he!==void 0&&!m.hasOwnProperty(Qt)&&hy(i,a,Qt,void 0,m,he);for(_e in m)he=m[_e],ge=u[_e],!m.hasOwnProperty(_e)||he===ge||he===void 0&&ge===void 0||hy(i,a,_e,he,m,ge);return}}for(var ce in u)he=u[ce],u.hasOwnProperty(ce)&&he!=null&&!m.hasOwnProperty(ce)&&Wt(i,a,ce,null,m,he);for(Ee in m)he=m[Ee],ge=u[Ee],!m.hasOwnProperty(Ee)||he===ge||he==null&&ge==null||Wt(i,a,Ee,he,m,ge)}function qO(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function oj(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var y=u[m],w=y.transferSize,N=y.initiatorType,z=y.duration;if(w&&z&&qO(N)){for(N=0,z=y.responseEnd,m+=1;m<u.length;m++){var J=u[m],de=J.startTime;if(de>z)break;var _e=J.transferSize,Ee=J.initiatorType;_e&&qO(Ee)&&(J=J.responseEnd,N+=_e*(J<z?1:(z-de)/(J-de)))}if(--m,a+=8*(w+N)/(y.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var py=null,my=null;function kh(i){return i.nodeType===9?i:i.ownerDocument}function GO(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 KO(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function gy(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var vy=null;function ij(){var i=window.event;return i&&i.type==="popstate"?i===vy?!1:(vy=i,!0):(vy=null,!1)}var ZO=typeof setTimeout=="function"?setTimeout:void 0,sj=typeof clearTimeout=="function"?clearTimeout:void 0,YO=typeof Promise=="function"?Promise:void 0,aj=typeof queueMicrotask=="function"?queueMicrotask:typeof YO<"u"?function(i){return YO.resolve(null).then(i).catch(lj)}:ZO;function lj(i){setTimeout(function(){throw i})}function js(i){return i==="head"}function WO(i,a){var u=a,m=0;do{var y=u.nextSibling;if(i.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(m===0){i.removeChild(y),oc(a);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Vu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Vu(u);for(var w=u.firstChild;w;){var N=w.nextSibling,z=w.nodeName;w[au]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=N}}else u==="body"&&Vu(i.ownerDocument.body);u=y}while(u);oc(a)}function QO(i,a){var u=i;i=0;do{var m=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=m}while(u)}function yy(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":yy(u),Ev(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function cj(i,a,u,m){for(;i.nodeType===1;){var y=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(m){if(!i[au])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==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(w=i.getAttribute("src"),(w!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var w=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=Po(i.nextSibling),i===null)break}return null}function uj(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Po(i.nextSibling),i===null))return null;return i}function XO(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=Po(i.nextSibling),i===null))return null;return i}function _y(i){return i.data==="$?"||i.data==="$~"}function by(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function dj(i,a){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||u.readyState!=="loading")a();else{var m=function(){a(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),i._reactRetry=m}}function Po(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return i}var wy=null;function JO(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(a===0)return Po(i.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}i=i.nextSibling}return null}function e2(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return i;a--}else u!=="/$"&&u!=="/&"||a++}i=i.previousSibling}return null}function t2(i,a,u){switch(a=kh(u),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Vu(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);Ev(i)}var Mo=new Map,n2=new Set;function Dh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Qi=W.d;W.d={f:fj,r:hj,D:pj,C:mj,L:gj,m:vj,X:_j,S:yj,M:bj};function fj(){var i=Qi.f(),a=Oh();return i||a}function hj(i){var a=El(i);a!==null&&a.tag===5&&a.type==="form"?_R(a):Qi.r(i)}var tc=typeof document>"u"?null:document;function r2(i,a,u){var m=tc;if(m&&typeof a=="string"&&a){var y=xo(a);y='link[rel="'+i+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),n2.has(y)||(n2.add(y),i={rel:i,crossOrigin:u,href:a},m.querySelector(y)===null&&(a=m.createElement("link"),dr(a,"link",i),tr(a),m.head.appendChild(a)))}}function pj(i){Qi.D(i),r2("dns-prefetch",i,null)}function mj(i,a){Qi.C(i,a),r2("preconnect",i,a)}function gj(i,a,u){Qi.L(i,a,u);var m=tc;if(m&&i&&a){var y='link[rel="preload"][as="'+xo(a)+'"]';a==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+xo(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+xo(u.imageSizes)+'"]')):y+='[href="'+xo(i)+'"]';var w=y;switch(a){case"style":w=nc(i);break;case"script":w=rc(i)}Mo.has(w)||(i=h({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),Mo.set(w,i),m.querySelector(y)!==null||a==="style"&&m.querySelector(Hu(w))||a==="script"&&m.querySelector(qu(w))||(a=m.createElement("link"),dr(a,"link",i),tr(a),m.head.appendChild(a)))}}function vj(i,a){Qi.m(i,a);var u=tc;if(u&&i){var m=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+xo(m)+'"][href="'+xo(i)+'"]',w=y;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=rc(i)}if(!Mo.has(w)&&(i=h({rel:"modulepreload",href:i},a),Mo.set(w,i),u.querySelector(y)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(qu(w)))return}m=u.createElement("link"),dr(m,"link",i),tr(m),u.head.appendChild(m)}}}function yj(i,a,u){Qi.S(i,a,u);var m=tc;if(m&&i){var y=xl(m).hoistableStyles,w=nc(i);a=a||"default";var N=y.get(w);if(!N){var z={loading:0,preload:null};if(N=m.querySelector(Hu(w)))z.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":a},u),(u=Mo.get(w))&&Sy(i,u);var J=N=m.createElement("link");tr(J),dr(J,"link",i),J._p=new Promise(function(de,_e){J.onload=de,J.onerror=_e}),J.addEventListener("load",function(){z.loading|=1}),J.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Lh(N,a,m)}N={type:"stylesheet",instance:N,count:1,state:z},y.set(w,N)}}}function _j(i,a){Qi.X(i,a);var u=tc;if(u&&i){var m=xl(u).hoistableScripts,y=rc(i),w=m.get(y);w||(w=u.querySelector(qu(y)),w||(i=h({src:i,async:!0},a),(a=Mo.get(y))&&Ey(i,a),w=u.createElement("script"),tr(w),dr(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(y,w))}}function bj(i,a){Qi.M(i,a);var u=tc;if(u&&i){var m=xl(u).hoistableScripts,y=rc(i),w=m.get(y);w||(w=u.querySelector(qu(y)),w||(i=h({src:i,async:!0,type:"module"},a),(a=Mo.get(y))&&Ey(i,a),w=u.createElement("script"),tr(w),dr(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(y,w))}}function o2(i,a,u,m){var y=(y=X.current)?Dh(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=nc(u.href),u=xl(y).hoistableStyles,m=u.get(a),m||(m={type:"style",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=nc(u.href);var w=xl(y).hoistableStyles,N=w.get(i);if(N||(y=y.ownerDocument||y,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,N),(w=y.querySelector(Hu(i)))&&!w._p&&(N.instance=w,N.state.loading=5),Mo.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Mo.set(i,u),w||wj(y,i,u,N.state))),a&&m===null)throw Error(r(528,""));return N}if(a&&m!==null)throw Error(r(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=rc(u),u=xl(y).hoistableScripts,m=u.get(a),m||(m={type:"script",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function nc(i){return'href="'+xo(i)+'"'}function Hu(i){return'link[rel="stylesheet"]['+i+"]"}function i2(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function wj(i,a,u,m){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=i.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),dr(a,"link",u),tr(a),i.head.appendChild(a))}function rc(i){return'[src="'+xo(i)+'"]'}function qu(i){return"script[async]"+i}function s2(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var m=i.querySelector('style[data-href~="'+xo(u.href)+'"]');if(m)return a.instance=m,tr(m),m;var y=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(i.ownerDocument||i).createElement("style"),tr(m),dr(m,"style",y),Lh(m,u.precedence,i),a.instance=m;case"stylesheet":y=nc(u.href);var w=i.querySelector(Hu(y));if(w)return a.state.loading|=4,a.instance=w,tr(w),w;m=i2(u),(y=Mo.get(y))&&Sy(m,y),w=(i.ownerDocument||i).createElement("link"),tr(w);var N=w;return N._p=new Promise(function(z,J){N.onload=z,N.onerror=J}),dr(w,"link",m),a.state.loading|=4,Lh(w,u.precedence,i),a.instance=w;case"script":return w=rc(u.src),(y=i.querySelector(qu(w)))?(a.instance=y,tr(y),y):(m=u,(y=Mo.get(w))&&(m=h({},u),Ey(m,y)),i=i.ownerDocument||i,y=i.createElement("script"),tr(y),dr(y,"link",m),i.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,Lh(m,u.precedence,i));return a.instance}function Lh(i,a,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=m.length?m[m.length-1]:null,w=y,N=0;N<m.length;N++){var z=m[N];if(z.dataset.precedence===a)w=z;else if(w!==y)break}w?w.parentNode.insertBefore(i,w.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function Sy(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function Ey(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var $h=null;function a2(i,a,u){if($h===null){var m=new Map,y=$h=new Map;y.set(u,m)}else y=$h,m=y.get(u),m||(m=new Map,y.set(u,m));if(m.has(i))return m;for(m.set(i,null),u=u.getElementsByTagName(i),y=0;y<u.length;y++){var w=u[y];if(!(w[au]||w[ar]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var N=w.getAttribute(a)||"";N=i+N;var z=m.get(N);z?z.push(w):m.set(N,[w])}}return m}function l2(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function Sj(i,a,u){if(u===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(i=a.disabled,typeof a.precedence=="string"&&i==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function c2(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Ej(i,a,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=nc(m.href),w=a.querySelector(Hu(y));if(w){a=w._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=jh.bind(i),a.then(i,i)),u.state.loading|=4,u.instance=w,tr(w);return}w=a.ownerDocument||a,m=i2(m),(y=Mo.get(y))&&Sy(m,y),w=w.createElement("link"),tr(w);var N=w;N._p=new Promise(function(z,J){N.onload=z,N.onerror=J}),dr(w,"link",m),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=jh.bind(i),a.addEventListener("load",u),a.addEventListener("error",u))}}var xy=0;function xj(i,a){return i.stylesheets&&i.count===0&&Uh(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var m=setTimeout(function(){if(i.stylesheets&&Uh(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+a);0<i.imgBytes&&xy===0&&(xy=62500*oj());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Uh(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>xy?50:800)+a);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(m),clearTimeout(y)}}:null}function jh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var zh=null;function Uh(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,zh=new Map,a.forEach(Rj,i),zh=null,jh.call(i))}function Rj(i,a){if(!(a.state.loading&4)){var u=zh.get(i);if(u)var m=u.get(null);else{u=new Map,zh.set(i,u);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<y.length;w++){var N=y[w];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(u.set(N.dataset.precedence,N),m=N)}m&&u.set(null,m)}y=a.instance,N=y.getAttribute("data-precedence"),w=u.get(N)||m,w===m&&u.set(null,y),u.set(N,y),this.count++,m=jh.bind(this),y.addEventListener("load",m),y.addEventListener("error",m),w?w.parentNode.insertBefore(y,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),a.state.loading|=4}}var Gu={$$typeof:T,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Oj(i,a,u,m,y,w,N,z,J){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=Sr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sr(0),this.hiddenUpdates=Sr(null),this.identifierPrefix=m,this.onUncaughtError=y,this.onCaughtError=w,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function u2(i,a,u,m,y,w,N,z,J,de,_e,Ee){return i=new Oj(i,a,u,N,J,de,_e,Ee,z),a=1,w===!0&&(a|=24),w=no(3,null,null,a),i.current=w,w.stateNode=i,a=r0(),a.refCount++,i.pooledCache=a,a.refCount++,w.memoizedState={element:m,isDehydrated:u,cache:a},a0(w),i}function d2(i){return i?(i=kl,i):kl}function f2(i,a,u,m,y,w){y=d2(y),m.context===null?m.context=y:m.pendingContext=y,m=Ts(a),m.payload={element:u},w=w===void 0?null:w,w!==null&&(m.callback=w),u=Cs(i,m,a),u!==null&&(Kr(u,i,a),xu(u,i,a))}function h2(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function Ry(i,a){h2(i,a),(i=i.alternate)&&h2(i,a)}function p2(i){if(i.tag===13||i.tag===31){var a=Ca(i,67108864);a!==null&&Kr(a,i,67108864),Ry(i,67108864)}}function m2(i){if(i.tag===13||i.tag===31){var a=ao();a=bl(a);var u=Ca(i,a);u!==null&&Kr(u,i,a),Ry(i,a)}}var Fh=!0;function Tj(i,a,u,m){var y=q.T;q.T=null;var w=W.p;try{W.p=2,Oy(i,a,u,m)}finally{W.p=w,q.T=y}}function Cj(i,a,u,m){var y=q.T;q.T=null;var w=W.p;try{W.p=8,Oy(i,a,u,m)}finally{W.p=w,q.T=y}}function Oy(i,a,u,m){if(Fh){var y=Ty(m);if(y===null)fy(i,a,m,Bh,u),v2(i,m);else if(Ij(y,i,a,u,m))m.stopPropagation();else if(v2(i,m),a&4&&-1<Aj.indexOf(i)){for(;y!==null;){var w=El(y);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var N=Dt(w.pendingLanes);if(N!==0){var z=w;for(z.pendingLanes|=2,z.entangledLanes|=2;N;){var J=1<<31-Ln(N);z.entanglements[1]|=J,N&=~J}hi(w),(Ut&6)===0&&(xh=K()+500,Uu(0))}}break;case 31:case 13:z=Ca(w,2),z!==null&&Kr(z,w,2),Oh(),Ry(w,2)}if(w=Ty(m),w===null&&fy(i,a,m,Bh,u),w===y)break;y=w}y!==null&&m.stopPropagation()}else fy(i,a,m,null,u)}}function Ty(i){return i=Av(i),Cy(i)}var Bh=null;function Cy(i){if(Bh=null,i=Sl(i),i!==null){var a=s(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===31){if(i=c(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Bh=i,null}function g2(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(ne()){case ae:return 2;case Oe:return 8;case Ae:case Ie:return 32;case ke:return 268435456;default:return 32}default:return 32}}var Ay=!1,zs=null,Us=null,Fs=null,Ku=new Map,Zu=new Map,Bs=[],Aj="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 v2(i,a){switch(i){case"focusin":case"focusout":zs=null;break;case"dragenter":case"dragleave":Us=null;break;case"mouseover":case"mouseout":Fs=null;break;case"pointerover":case"pointerout":Ku.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zu.delete(a.pointerId)}}function Yu(i,a,u,m,y,w){return i===null||i.nativeEvent!==w?(i={blockedOn:a,domEventName:u,eventSystemFlags:m,nativeEvent:w,targetContainers:[y]},a!==null&&(a=El(a),a!==null&&p2(a)),i):(i.eventSystemFlags|=m,a=i.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),i)}function Ij(i,a,u,m,y){switch(a){case"focusin":return zs=Yu(zs,i,a,u,m,y),!0;case"dragenter":return Us=Yu(Us,i,a,u,m,y),!0;case"mouseover":return Fs=Yu(Fs,i,a,u,m,y),!0;case"pointerover":var w=y.pointerId;return Ku.set(w,Yu(Ku.get(w)||null,i,a,u,m,y)),!0;case"gotpointercapture":return w=y.pointerId,Zu.set(w,Yu(Zu.get(w)||null,i,a,u,m,y)),!0}return!1}function y2(i){var a=Sl(i.target);if(a!==null){var u=s(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,ME(i.priority,function(){m2(u)});return}}else if(a===31){if(a=c(u),a!==null){i.blockedOn=a,ME(i.priority,function(){m2(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Vh(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=Ty(i.nativeEvent);if(u===null){u=i.nativeEvent;var m=new u.constructor(u.type,u);Cv=m,u.target.dispatchEvent(m),Cv=null}else return a=El(u),a!==null&&p2(a),i.blockedOn=u,!1;a.shift()}return!0}function _2(i,a,u){Vh(i)&&u.delete(a)}function Pj(){Ay=!1,zs!==null&&Vh(zs)&&(zs=null),Us!==null&&Vh(Us)&&(Us=null),Fs!==null&&Vh(Fs)&&(Fs=null),Ku.forEach(_2),Zu.forEach(_2)}function Hh(i,a){i.blockedOn===a&&(i.blockedOn=null,Ay||(Ay=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Pj)))}var qh=null;function b2(i){qh!==i&&(qh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qh===i&&(qh=null);for(var a=0;a<i.length;a+=3){var u=i[a],m=i[a+1],y=i[a+2];if(typeof m!="function"){if(Cy(m||u)===null)continue;break}var w=El(u);w!==null&&(i.splice(a,3),a-=3,T0(w,{pending:!0,data:y,method:u.method,action:m},m,y))}}))}function oc(i){function a(J){return Hh(J,i)}zs!==null&&Hh(zs,i),Us!==null&&Hh(Us,i),Fs!==null&&Hh(Fs,i),Ku.forEach(a),Zu.forEach(a);for(var u=0;u<Bs.length;u++){var m=Bs[u];m.blockedOn===i&&(m.blockedOn=null)}for(;0<Bs.length&&(u=Bs[0],u.blockedOn===null);)y2(u),u.blockedOn===null&&Bs.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var y=u[m],w=u[m+1],N=y[Fr]||null;if(typeof w=="function")N||b2(u);else if(N){var z=null;if(w&&w.hasAttribute("formAction")){if(y=w,N=w[Fr]||null)z=N.formAction;else if(Cy(y)!==null)continue}else z=N.action;typeof z=="function"?u[m+1]=z:(u.splice(m,3),m-=3),b2(u)}}}function w2(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(N){return y=N})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function Iy(i){this._internalRoot=i}Gh.prototype.render=Iy.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var u=a.current,m=ao();f2(u,m,i,a,null,null)},Gh.prototype.unmount=Iy.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;f2(i.current,2,null,i,null,null),Oh(),a[wl]=null}};function Gh(i){this._internalRoot=i}Gh.prototype.unstable_scheduleHydration=function(i){if(i){var a=wv();i={blockedOn:null,target:i,priority:a};for(var u=0;u<Bs.length&&a!==0&&a<Bs[u].priority;u++);Bs.splice(u,0,i),u===0&&y2(i)}};var S2=t.version;if(S2!=="19.2.6")throw Error(r(527,S2,"19.2.6"));W.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(a),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var Mj={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kh.isDisabled&&Kh.supportsFiber)try{_t=Kh.inject(Mj),Tt=Kh}catch{}}return Qu.createRoot=function(i,a){if(!o(i))throw Error(r(299));var u=!1,m="",y=AR,w=IR,N=PR;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(w=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError)),a=u2(i,1,!1,null,null,u,m,null,y,w,N,w2),i[wl]=a.current,dy(i),new Iy(a)},Qu.hydrateRoot=function(i,a,u){if(!o(i))throw Error(r(299));var m=!1,y="",w=AR,N=IR,z=PR,J=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(N=u.onCaughtError),u.onRecoverableError!==void 0&&(z=u.onRecoverableError),u.formState!==void 0&&(J=u.formState)),a=u2(i,1,!0,a,u??null,m,y,J,w,N,z,w2),a.context=d2(null),u=a.current,m=ao(),m=bl(m),y=Ts(m),y.callback=null,Cs(u,y,m),u=m,a.current.lanes=u,Lt(a,u),hi(a),i[wl]=a.current,dy(i),new Gh(a)},Qu.version="19.2.6",Qu}var N2;function Hj(){if(N2)return My.exports;N2=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(),My.exports=Vj(),My.exports}var qj=Hj(),P=va();const ee=hl(P),Tw=kj({__proto__:null,default:ee},[P]);var $y={exports:{}},jy={};var k2;function Gj(){if(k2)return jy;k2=1;var e=va().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return jy.c=function(t){return e.H.useMemoCache(t)},jy}var D2;function Kj(){return D2||(D2=1,$y.exports=Gj()),$y.exports}var qn=Kj(),tu=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(){}},Zj=class extends tu{#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"}},Cw=new Zj,Yj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Wj=class{#e=Yj;#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)}},el=new Wj;function Qj(e){setTimeout(e,0)}var Xj=typeof window>"u"||"Deno"in globalThis;function Yn(){}function Jj(e,t){return typeof e=="function"?e(t):e}function Ib(e){return typeof e=="number"&&e>=0&&e!==1/0}function lM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function la(e,t){return typeof e=="function"?e(t):e}function fo(e,t){return typeof e=="function"?e(t):e}function L2(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Aw(l,t.options))return!1}else if(!Bd(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function $2(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(cl(t.options.mutationKey)!==cl(s))return!1}else if(!Bd(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Aw(e,t){return(t?.queryKeyHashFn||cl)(e)}function cl(e){return JSON.stringify(e,(t,n)=>Pb(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Bd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Bd(e[n],t[n])):!1}var e8=Object.prototype.hasOwnProperty;function cM(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=j2(e)&&j2(t);if(!r&&!(Pb(e)&&Pb(t)))return t;const s=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const h=r?p:l[p],g=e[h],v=t[h];if(g===v){d[h]=g,(r?p<s:e8.call(e,h))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){d[h]=v;continue}const _=cM(g,v,n+1);d[h]=_,_===g&&f++}return s===c&&f===s?e:d}function Mm(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 j2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pb(e){if(!z2(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!z2(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function z2(e){return Object.prototype.toString.call(e)==="[object Object]"}function t8(e){return new Promise(t=>{el.setTimeout(t,e)})}function Mb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?cM(e,t):t}function $ce(e){return e}function n8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function r8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Iw=Symbol();function uM(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Iw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pw(e,t){return typeof e=="function"?e(...t):!!e}function o8(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 Vd=(()=>{let e=()=>Xj;return{isServer(){return e()},setIsServer(t){e=t}}})();function Nb(){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}function i8(e){let t;if(e.then(n=>(t=n,n),Yn)?.catch(Yn),t!==void 0)return{data:t}}function dM(e){return e}function s8(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function a8(e,t,n){const r=()=>{const o=e.promise?.then(t).catch(s=>n(s)?Promise.reject(new Error("redacted")):Promise.reject(s));return o?.catch(Yn),o};return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status==="pending"&&{promise:r()},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function l8(e){return e.state.isPaused}function c8(e){return e.state.status==="success"}function u8(e){return!0}function d8(e,t={}){const n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??l8,r=e.getMutationCache().getAll().flatMap(d=>n(d)?[s8(d)]:[]),o=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??c8,s=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??u8,l=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??dM,c=e.getQueryCache().getAll().flatMap(d=>o(d)?[a8(d,l,s)]:[]);return{mutations:r,queries:c}}function f8(e,t,n){if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),o=e.getQueryCache(),s=e.getDefaultOptions().hydrate?.deserializeData??dM,l=t.mutations||[],c=t.queries||[];l.forEach(({state:d,...f})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...f},d)}),c.forEach(({queryKey:d,state:f,queryHash:p,meta:h,promise:g,dehydratedAt:v,queryType:_})=>{const b=g?i8(g):void 0,x=f.data===void 0?b?.data:f.data,S=x===void 0?x:s(x);let E=o.get(p);const T=E?.state.status==="pending",R=E?.state.fetchStatus==="fetching";if(E){const O=b&&v!==void 0&&v>E.state.dataUpdatedAt;if(f.dataUpdatedAt>E.state.dataUpdatedAt||O){const{fetchStatus:A,...I}=f;E.setState({...I,data:S,...f.status==="pending"&&S!==void 0&&{status:"success",...!R&&{fetchStatus:"idle"}}})}}else E=o.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:d,queryHash:p,meta:h,_type:_},{...f,data:S,fetchStatus:"idle",status:f.status==="pending"&&S!==void 0?"success":f.status});g&&!b&&!T&&!R&&(v===void 0||v>E.state.dataUpdatedAt)&&E.fetch(void 0,{initialPromise:Promise.resolve(g).then(s)}).catch(Yn)})}var h8=Qj;function p8(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=h8;const s=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{s(()=>{c(...d)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Qn=p8(),m8=class extends tu{#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}},Nm=new m8;function g8(e){return Math.min(1e3*2**e,3e4)}function fM(e){return(e??"online")==="online"?Nm.isOnline():!0}var kb=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function hM(e){let t=!1,n=0,r;const o=Nb(),s=()=>o.status!=="pending",l=b=>{if(!s()){const x=new kb(b);g(x),e.onCancel?.(x)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>Cw.isFocused()&&(e.networkMode==="always"||Nm.isOnline())&&e.canRun(),p=()=>fM(e.networkMode)&&e.canRun(),h=b=>{s()||(r?.(),o.resolve(b))},g=b=>{s()||(r?.(),o.reject(b))},v=()=>new Promise(b=>{r=x=>{(s()||f())&&b(x)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),_=()=>{if(s())return;let b;const x=n===0?e.initialPromise:void 0;try{b=x??e.fn()}catch(S){b=Promise.reject(S)}Promise.resolve(b).then(h).catch(S=>{if(s())return;const E=e.retry??(Vd.isServer()?0:3),T=e.retryDelay??g8,R=typeof T=="function"?T(n,S):T,O=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,S);if(t||!O){g(S);return}n++,e.onFail?.(n,S),t8(R).then(()=>f()?void 0:v()).then(()=>{t?g(S):_()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?_():v().then(_),o)}}var pM=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ib(this.gcTime)&&(this.#e=el.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vd.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(el.clearTimeout(this.#e),this.#e=void 0)}};function v8(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const h=_=>{o8(_,()=>t.signal,()=>p=!0)},g=uM(t.options,t.fetchOptions),v=async(_,b,x)=>{if(p)return Promise.reject(t.signal.reason);if(b==null&&_.pages.length)return Promise.resolve(_);const E=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:b,direction:x?"backward":"forward",meta:t.options.meta};return h(A),A})(),T=await g(E),{maxPages:R}=t.options,O=x?r8:n8;return{pages:O(_.pages,T,R),pageParams:O(_.pageParams,b,R)}};if(o&&s.length){const _=o==="backward",b=_?mM:Db,x={pages:s,pageParams:l},S=b(r,x);c=await v(x,S,_)}else{const _=e??s.length;do{const b=d===0?l[0]??r.initialPageParam:Db(r,c);if(d>0&&b==null)break;c=await v(c,b),d++}while(d<_)}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 Db(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 mM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function jce(e,t){return t?Db(e,t)!=null:!1}function zce(e,t){return!t||!e.getPreviousPageParam?!1:mM(e,t)!=null}var y8=class extends pM{#e;#t;#n;#r;#i;#o;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=F2(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=F2(this.options);t.data!==void 0&&(this.setState(U2(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=Mb(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(Yn).catch(Yn):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=>fo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Iw||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>la(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:!lM(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.#s||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 d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},o=()=>{const d=uM(this.options,t),p=(()=>{const h={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#s=!1,this.options.persister?this.options.persister(d,p,this):d(p)},l=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(d),d})();(this.#e==="infinite"?v8(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#o=hM({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:d=>{d instanceof kb&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#l({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const d=await this.#o.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#r.config.onSuccess?.(d,this),this.#r.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof kb){if(d.silent)return this.#o.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#r.config.onError?.(d,this),this.#r.config.onSettled?.(this.state.data,d,this),d}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,...gM(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...U2(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),Qn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function gM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fM(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function U2(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function F2(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 vM=class extends tu{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=Nb(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#o;#a;#s;#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),B2(this.#t,this.options)?this.#h():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lb(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lb(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),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 fo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Mm(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&V2(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||fo(this.options.enabled,this.#t)!==fo(t.enabled,this.#t)||la(this.options.staleTime,this.#t)!==la(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||fo(this.options.enabled,this.#t)!==fo(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 b8(this,n)&&(this.#r=n,this.#o=this.options,this.#i=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.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Yn)),t}#g(){this.#b();const e=la(this.options.staleTime,this.#t);if(Vd.isServer()||this.#r.isStale||!Ib(e))return;const n=lM(this.#r.dataUpdatedAt,e)+1;this.#d=el.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.#w(),this.#c=e,!(Vd.isServer()||fo(this.options.enabled,this.#t)===!1||!Ib(this.#c)||this.#c===0)&&(this.#f=el.setInterval(()=>{(this.options.refetchIntervalInBackground||Cw.isFocused())&&this.#h()},this.#c))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#d!==void 0&&(el.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(el.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#r,s=this.#i,l=this.#o,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},h=!1,g;if(t._optimisticResults){const M=this.hasListeners(),L=!M&&B2(e,t),H=M&&V2(e,n,t,r);(L||H)&&(p={...p,...gM(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:_,status:b}=p;g=p.data;let x=!1;if(t.placeholderData!==void 0&&g===void 0&&b==="pending"){let M;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(M=o.data,x=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,M!==void 0&&(b="success",g=Mb(o?.data,M,t),h=!0)}if(t.select&&g!==void 0&&!x)if(o&&g===s?.data&&t.select===this.#u)g=this.#l;else try{this.#u=t.select,g=t.select(g),g=Mb(o?.data,g,t),this.#l=g,this.#s=null}catch(M){this.#s=M}this.#s&&(v=this.#s,g=this.#l,_=Date.now(),b="error");const S=p.fetchStatus==="fetching",E=b==="pending",T=b==="error",R=E&&S,O=g!==void 0,I={status:b,fetchStatus:p.fetchStatus,isPending:E,isSuccess:b==="success",isError:T,isInitialLoading:R,isLoading:R,data:g,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:_,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!E,isLoadingError:T&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:T&&O,isStale:Mw(e,t),refetch:this.refetch,promise:this.#a,isEnabled:fo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=I.data!==void 0,L=I.status==="error"&&!M,H=F=>{L?F.reject(I.error):M&&F.resolve(I.data)},j=()=>{const F=this.#a=I.promise=Nb();H(F)},B=this.#a;switch(B.status){case"pending":e.queryHash===n.queryHash&&H(B);break;case"fulfilled":(L||I.data!==B.value)&&j();break;case"rejected":(!L||I.error!==B.reason)&&j();break}}return I}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#o=this.options,this.#i.data!==void 0&&(this.#p=this.#t),Mm(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(l=>{const c=l;return this.#r[c]!==e[c]&&s.has(c)})};this.#E({listeners:n()})}#S(){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.#_()}#E(e){Qn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function _8(e,t){return fo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&fo(t.retryOnMount,e)===!1)}function B2(e,t){return _8(e,t)||e.state.data!==void 0&&Lb(e,t,t.refetchOnMount)}function Lb(e,t,n){if(fo(t.enabled,e)!==!1&&la(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Mw(e,t)}return!1}function V2(e,t,n,r){return(e!==t||fo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Mw(e,n)}function Mw(e,t){return fo(t.enabled,e)!==!1&&e.isStaleByTime(la(t.staleTime,e))}function b8(e,t){return!Mm(e.getCurrentResult(),t)}var w8=class extends pM{#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||yM(),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.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=hM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{this.#i({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#i({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.#i({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#i({type:"pending",context:l,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.#i({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#i({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#i(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),Qn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function yM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var S8=class extends tu{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 w8({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=Zh(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=Zh(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=Zh(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=Zh(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Qn.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=>$2(t,n))}findAll(e={}){return this.getAll().filter(t=>$2(e,t))}notify(e){Qn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Qn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Yn))))}};function Zh(e){return e.options.scope?.id}var E8=class extends tu{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#i()}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),Mm(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&cl(n.mutationKey)!==cl(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.#i(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),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)}#i(){const t=this.#n?.state??yM();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){Qn.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)})})}},x8=class extends tu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Aw(r,t);let s=this.get(o);return s||(s=new y8({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(){Qn.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=>L2(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>L2(e,n)):t}notify(e){Qn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Qn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},R8=class{#e;#t;#n;#r;#i;#o;#a;#s;constructor(e={}){this.#e=e.queryCache||new x8,this.#t=e.mutationCache||new S8,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=Cw.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Nm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=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(la(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,l=Jj(t,s);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Qn.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;Qn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Qn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Yn).catch(Yn)}invalidateQueries(e,t={}){return Qn.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=Qn.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(Yn)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Yn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(la(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Yn).catch(Yn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Yn).catch(Yn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Nm.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(cl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Bd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(cl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{Bd(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=Aw(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===Iw&&(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()}},_M=P.createContext(void 0),Nw=e=>{const t=P.useContext(_M);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},O8=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(_M.Provider,{value:e,children:t})),bM=P.createContext(!1),T8=()=>P.useContext(bM);bM.Provider;function wM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var SM=P.createContext(wM()),C8=()=>P.useContext(SM),Fce=({children:e})=>{const[t]=P.useState(()=>wM());return C.jsx(SM.Provider,{value:t,children:typeof e=="function"?e(t):e})},A8=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Pw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},I8=e=>{P.useEffect(()=>{e.clearReset()},[e])},P8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Pw(n,[e.error,r])),M8=(e,t)=>t.state.data===void 0,N8=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))}},k8=(e,t)=>e.isLoading&&e.isFetching&&!t,D8=(e,t)=>e?.suspense&&t.isPending,H2=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function EM(e,t,n){const r=T8(),o=C8(),s=Nw(n),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=s.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",N8(l),A8(l,o,c),I8(o);const d=!s.getQueryCache().get(l.queryHash),[f]=P.useState(()=>new t(s,l)),p=f.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(g=>{const v=h?f.subscribe(Qn.batchCalls(g)):Yn;return f.updateResult(),v},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),P.useEffect(()=>{f.setOptions(l)},[l,f]),D8(l,p))throw H2(l,f,o);if(P8({result:p,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!Vd.isServer()&&k8(p,r)&&(d?H2(l,f,o):c?.promise)?.catch(Yn).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?p:f.trackResult(p)}function xM(e,t){return EM(e,vM,t)}function ff(e,t){return EM({...e,enabled:!0,suspense:!0,throwOnError:M8,placeholderData:void 0},vM,t)}function L8(e,t){const n=Nw(t),[r]=P.useState(()=>new E8(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);const o=P.useSyncExternalStore(P.useCallback(l=>r.subscribe(Qn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=P.useCallback((l,c)=>{r.mutate(l,c).catch(Yn)},[r]);if(o.error&&Pw(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const RM={publicConfig:()=>["publicConfig"],appVersionCheck:()=>["appVersionCheck"],session:()=>["session"],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],myCapabilities:e=>[e,"my-capabilities"],taskBoardItems:e=>[e,"task-board-items"],taskBoardItemPrs:(e,t)=>[e,"task-board-item-prs",t],homeGithubRecentPrs:(e,t)=>["home-github-recent-prs",e,t],homeGithubContributions:(e,t)=>["home-github-contributions",e,t],report:(e,t)=>["report",e,t??""],commerceDiscoveryConnection:(e,t)=>["commerce-discovery","connection",e,t],commerceDiscoveryDiagnostic:(e,t)=>["commerce-discovery","diagnostic",e,t],commerceDiscoveryVirtualMcp:(e,t)=>["commerce-discovery","virtual-mcp",e,t],commerceDiscoveryCompanionSchema:(e,t)=>["commerce-discovery","companion-schema",e,t],commerceDiscoveryCompanionConnections:(e,t)=>["commerce-discovery","companion-connections",e,t],commerceDiscoveryCompanionConnectionsPrefix:e=>["commerce-discovery","companion-connections",e],commerceDiscoveryCompanionRegistry:(e,t)=>["commerce-discovery","companion-registry",e,t],commerceDiscoveryCompanionOAuthStatus:(e,t)=>["commerce-discovery","companion-oauth-status",e,t],commerceDiscoveryCompanionGaProperties:(e,t)=>["commerce-discovery","companion-ga-properties",e,t],commerceDiscoveryCompanionGscSites:(e,t)=>["commerce-discovery","companion-gsc-sites",e,t],commerceDiscoveryCompanionGithubRepos:(e,t,n)=>["commerce-discovery","companion-github-repos",e,t,n],commerceDiscoveryCompanionGithubSelected:(e,t)=>["commerce-discovery","companion-github-selected",e,t],commerceDiscoveryConnectionStatus:(e,t)=>["commerce-discovery","connection-status",e,t],connectionActivity:(e,t,n)=>["monitoring","activity",e,t,n],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],mcpClientPrefix:()=>["mcp","client"],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],orgAccessStatus:e=>["org-access-status",e],modelsList:e=>["models-list",e],homeNextActions:e=>["home-next-actions",e],boardLayout:e=>["board-layout",e],agentPrompts:(e,t)=>["agent-prompts",e,t],allowedModels:e=>[e,"allowed-models"],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,r,o)=>[e,t,n,"collection",r,o],collectionList:(e,t,n,r,o)=>[e,t,n,"collection",r,"list",o],collectionListInfinite:(e,t,n,r,o)=>[e,t,n,"collection",r,"list-infinite",o],monitoringStats:()=>["monitoring","stats"],monitoringStatsToolCalls:(e,t)=>["MONITORING_STATS",e,"tool-calls",t],monitoringStatsLlm:(e,t)=>["MONITORING_STATS",e,"llm",t],monitoringThreadUsage:(e,t)=>["MONITORING_THREAD_USAGE",e,t],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringLogDetail:e=>["monitoring","log-detail",e],ensureTask:(e,t)=>["ensure-task",e,t],globalSearch:(e,t)=>["global-search",e,t],threadsInfinite:(e,t)=>["threads","list-infinite",e,t],overviewThreads:e=>["threads","overview",e],threadMessages:(e,t)=>["threads","messages",e,t],threadModelLogs:(e,t)=>["threads","model-logs",e,t],threadSandbox:(e,t)=>["thread-sandbox","v2",e,t],threadOutputs:e=>["thread-outputs",e],fileText:e=>["file-text",e],csvThumb:e=>["csv-thumb",e],virtualMcpTools:(e,t)=>["virtual-mcp",t,e??"default","tools"],toolDefinitionLookup:(e,t,n)=>["virtual-mcp",t,e??"default","tools","lookup",n],virtualMcpAgents:e=>["virtual-mcp",e,"agents"],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,n)=>[...e,t,n],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e],storeReadmeUrl:e=>["store-readme-url",e],remoteMcpTools:e=>["remote-mcp-tools",e],tags:e=>[e,"tags"],memberTags:(e,t)=>[e,"member-tags",t],automationsAll:e=>["automations",e],automations:(e,t)=>["automations",e,t??null],automation:(e,t)=>["automation",e,t],automationRuns:(e,t,n)=>["automation-runs",e,t,...[...n??[]].sort()],automationRunStats:(e,t,n)=>["automation-run-stats",e,t,n],projects:e=>["projects",e],project:(e,t)=>["project",e,t],virtualMcp:(e,t)=>["virtual-mcp",e,t],projectPluginConfigs:e=>["project-plugin-configs",e],projectPluginConfig:(e,t)=>["project-plugin-config",e,t],projectConnections:e=>["project-connections",e],projectConnectionDetails:(e,t)=>["project-connections",e,"details",t],aiProviders:e=>["ai-providers",e],aiProviderModels:(e,t)=>["ai-provider-models",e,t],aiProviderKeys:e=>["ai-provider-keys",e],aiProviderKeyPreview:e=>["ai-provider-key-preview",e],secrets:e=>["secrets",e],fileConfigs:e=>["file-configs",e],orgFsVolume:(e,t)=>["org-fs",e,t],orgFsList:(e,t,n)=>["org-fs",e,t,"list",n],orgFsUsage:(e,t)=>["org-fs",e,t,"usage"],orgFsStat:(e,t,n)=>["org-fs",e,t,"stat",n],orgFsPublicSets:e=>["org-fs-public-sets",e],orgFsRecent:e=>["org-fs-recent",e],orgFsSearchRoot:e=>["org-fs-search",e],orgFsSearch:(e,t)=>["org-fs-search",e,t],orgFsSkills:e=>["org-fs-skills",e],slashSkills:e=>["slash-skills",e],filePickerObjects:(e,t,n,r)=>["file-picker-objects",e,t,n??"",r??!1],aiProviderCredits:(e,t)=>["ai-provider-credits",e,t],orgSsoConfig:e=>["org-sso-config",e],orgSsoStatus:e=>["org-sso-status",e],storeDiscovery:(e,t)=>["store-discovery",e,t],organizationDomains:e=>["organization-domains",e],organizationJoinRequests:e=>["organization-join-requests",e],domainLookup:e=>["domain-lookup",e],deploymentAdminMe:()=>["deployment-admin","me"],deploymentAdminUsers:e=>["deployment-admin","users",e],deploymentAdminOrgs:e=>["deployment-admin","orgs",e],deploymentAdminOrgsList:()=>["deployment-admin","orgs"],brandContext:e=>["brand-context",e],defaultBrand:e=>["brand-context",e,"default"],decoProfile:e=>["deco-profile",e],decoSites:e=>["deco-sites",e],decoApps:()=>["deco-apps"],webSearchBlob:e=>["web-search-blob",e],decofile:e=>["decofile",e],liveMeta:(...e)=>["live-meta",...e],sandboxInvoke:(e,t)=>["sandbox-invoke",e,t],sandboxRepoDir:(e,t,n)=>["sandbox-repo-dir",e,t,n],linkStatus:()=>["link-status"],currentLink:e=>["current-link",e],githubUserOrgs:(e,t)=>["github-user-orgs",e,t],githubOrgRepos:(e,t,n,r)=>["github-org-repos",e,t,n,r],vmEnv:(e,t,n)=>["vm-env",e,t,n]};function Bce(e,t){e.invalidateQueries({predicate:n=>{const r=n.queryKey;return(!t||r[1]===t)&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})}function Vce(e,t){e.invalidateQueries({predicate:n=>{const r=n.queryKey;return(!t||r[1]===t)&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})}function OM(){const e=qn.c(1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:RM.publicConfig(),queryFn:$8,staleTime:1/0},e[0]=t):t=e[0];const{data:n}=ff(t);return n}async function $8(){return(await(await fetch("/api/config")).json()).config}const Hce={light:"/logos/deco logo.svg",dark:"/logos/deco logo negative.svg"},TM=P.createContext(void 0);function j8(e){const t=qn.c(3),{children:n}=e,r=OM();let o;return t[0]!==n||t[1]!==r.auth?(o=C.jsx(TM.Provider,{value:r.auth,children:n}),t[0]=n,t[1]=r.auth,t[2]=o):o=t[2],o}function qce(){const e=P.useContext(TM);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}var q2=P.use,Oc=typeof window<"u"?P.useLayoutEffect:P.useEffect;function zy(e){const t=P.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function z8(e,t,n={},r={}){P.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 U8(e){const t=P.useRef(null);return P.useImperativeHandle(e,()=>t.current,[]),t}const CM=!1;function Hd(e){return e[e.length-1]}function F8(e){return typeof e=="function"}function oa(e,t){return F8(e)?e(t):e}const AM=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable;function IM(e){for(const t in e)if(AM.call(e,t))return!0;return!1}const B8=()=>Object.create(null),Fa=(e,t)=>tl(e,t,B8);function tl(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const o=t,s=Y2(e)&&Y2(o);if(!s&&!(Bc(e)&&Bc(o)))return o;const l=s?e:K2(e);if(!l)return o;const c=s?o:K2(o);if(!c)return o;const d=l.length,f=c.length,p=s?new Array(f):n();let h=0;for(let g=0;g<f;g++){const v=s?g:c[g],_=e[v],b=o[v];if(_===b){p[v]=_,(s?g<d:AM.call(e,v))&&h++;continue}if(_===null||b===null||typeof _!="object"||typeof b!="object"){p[v]=b;continue}const x=tl(_,b,n,r+1);p[v]=x,x===_&&h++}return d===f&&h===d?e:p}function K2(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!G2.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(!G2.call(e,o))return!1;r.push(o)}return r}function Bc(e){if(!Z2(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Z2(n)||!n.hasOwnProperty("isPrototypeOf"))}function Z2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Y2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function il(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(!il(e[r],t[r],n))return!1;return!0}if(Bc(e)&&Bc(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!il(e[l],t[l],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&o++;let s=0;for(const l in t)if((!r||t[l]!==void 0)&&(s++,s>o||!il(e[l],t[l],n)))return!1;return o===s}return!1}function Vc(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 V8(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 qd(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function H8(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function W2(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 H8(t)}const q8=["http:","https:","mailto:","tel:"];function km(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Xu(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+=W2(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+W2(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function G8(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function K8(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 ds(){throw new Error("Invariant failed")}function Gd(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 l=t.get(s);if(l)return o(l),l.value},set(s,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const c=t.get(s);if(c)c.value=l,o(c);else{const d={key:s,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(s,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const ia=4,PM=5;function Z8(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 MM(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 l=Z8(s);if(l){const[c,d]=l,f=s.charCodeAt(c+1);if(f===45){if(c+2<s.length&&s.charCodeAt(c+2)===36){const p=c+3,h=d;if(p<h)return n[0]=3,n[1]=t+c,n[2]=t+p,n[3]=t+h,n[4]=t+d+1,n[5]=o,n}}else if(f===36){const p=c+1,h=c+2;return h===d?(n[0]=2,n[1]=t+c,n[2]=t+p,n[3]=t+h,n[4]=t+d+1,n[5]=e.length,n):(n[0]=1,n[1]=t+c,n[2]=t+h,n[3]=t+d,n[4]=t+d+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 Mg(e,t,n,r,o,s,l){l?.(n);let c=r;{const d=n.fullPath??n.from,f=d.length,p=n.options?.caseSensitive??e,h=n.options?.params?.parse??n.options?.parseParams;for(;c<f;){const v=MM(d,c,t);let _;const b=c,x=v[5];switch(c=x+1,s++,v[0]){case 0:{const S=d.substring(v[2],v[3]);if(p){const E=o.static?.get(S);if(E)_=E;else{o.static??=new Map;const T=nl(n.fullPath??n.from);T.parent=o,T.depth=s,_=T,o.static.set(S,T)}}else{const E=S.toLowerCase(),T=o.staticInsensitive?.get(E);if(T)_=T;else{o.staticInsensitive??=new Map;const R=nl(n.fullPath??n.from);R.parent=o,R.depth=s,_=R,o.staticInsensitive.set(E,R)}}break}case 1:{const S=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(S||E),R=S?T?S:S.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=!h&&o.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===O);if(A)_=A;else{const I=Fy(1,n.fullPath??n.from,T,R,O);_=I,I.depth=s,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case 3:{const S=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(S||E),R=S?T?S:S.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=!h&&o.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===O);if(A)_=A;else{const I=Fy(3,n.fullPath??n.from,T,R,O);_=I,I.parent=o,I.depth=s,o.optional??=[],o.optional.push(I)}break}case 2:{const S=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(S||E),R=S?T?S:S.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=Fy(2,n.fullPath??n.from,T,R,O);_=A,A.parent=o,A.depth=s,o.wildcard??=[],o.wildcard.push(A)}}o=_}if(h&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=nl(n.fullPath??n.from);v.kind=PM,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&&d.endsWith("/")){const v=nl(n.fullPath??n.from);v.kind=ia,v.parent=o,s++,v.depth=s,o.index=v,o=v}o.parse=h??null,g&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Mg(e,t,d,c,o,s,l)}function Uy(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;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 ea(e){if(e.pathless)for(const t of e.pathless)ea(t);if(e.static)for(const t of e.static.values())ea(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ea(t);if(e.dynamic?.length){e.dynamic.sort(Uy);for(const t of e.dynamic)ea(t)}if(e.optional?.length){e.optional.sort(Uy);for(const t of e.optional)ea(t)}if(e.wildcard?.length){e.wildcard.sort(Uy);for(const t of e.wildcard)ea(t)}}function nl(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}}function Fy(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,caseSensitive:n,prefix:r,suffix:o}}function Y8(e,t){const n=nl("/"),r=new Uint16Array(6);for(const o of e)Mg(!1,r,o,1,n,0);ea(n),t.masksTree=n,t.flatCache=Gd(1e3)}function W8(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=kw(e,t.masksTree);return t.flatCache.set(e,r),r}function Q8(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let l=o.singleCache.get(s);return l||(l=nl("/"),Mg(t,new Uint16Array(6),{from:e},1,l,0),o.singleCache.set(s,l)),kw(r,l,n)}function X8(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=kw(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)s=null;else throw l}return s&&(s.branch=kM(s.route)),t.matchCache.set(r,s),s}function J8(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function e7(e,t=!1,n){const r=nl(e.fullPath),o=new Uint16Array(6),s={},l={};let c=0;return Mg(t,o,e,1,r,0,d=>{if(n?.(d,c),d.id in s&&ds(),s[d.id]=d,c!==0&&d.path){const f=J8(d.fullPath);(!l[f]||d.fullPath.endsWith("/"))&&(l[f]=d)}c++}),ea(r),{processedTree:{segmentTree:r,singleCache:Gd(1e3),matchCache:Gd(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:l}}function kw(e,t,n=!1){const r=e.split("/"),o=n7(e,r,t,n);if(!o)return null;const[s]=NM(e,r,o);return{route:o.node.route,rawParams:s}}function NM(e,t,n){const r=t7(n.node);let o=null;const s=Object.create(null);let l=n.extract?.part??0,c=n.extract?.node??0,d=n.extract?.path??0,f=n.extract?.segment??0;for(;c<r.length;l++,c++,d++,f++){const p=r[c];if(p.kind===ia)break;if(p.kind===PM){f--,l--,d--;continue}const h=t[l],g=d;if(h&&(d+=h.length),p.kind===1){o??=n.node.fullPath.split("/");const v=o[f],_=p.prefix?.length??0;if(v.charCodeAt(_)===123){const b=p.suffix?.length??0,x=v.substring(_+2,v.length-b-1),S=h.substring(_,h.length-b);s[x]=decodeURIComponent(S)}else{const b=v.substring(1);s[b]=decodeURIComponent(h)}}else if(p.kind===3){if(n.skipped&1<<c){l--,d=g-1;continue}o??=n.node.fullPath.split("/");const v=o[f],_=p.prefix?.length??0,b=p.suffix?.length??0,x=v.substring(_+3,v.length-b-1),S=p.suffix||p.prefix?h.substring(_,h.length-b):h;S&&(s[x]=decodeURIComponent(S))}else if(p.kind===2){const v=p,_=e.substring(g+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),b=decodeURIComponent(_);s["*"]=b,s._splat=b;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:l,node:c,path:d,segment:f}]}function kM(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function t7(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function n7(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Hd(t),s=o&&e!=="/",l=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let d=null,f=null;for(;c.length;){const p=c.pop(),{node:h,index:g,skipped:v,depth:_,statics:b,dynamics:x,optionals:S}=p;let{extract:E,rawParams:T}=p;if(h.kind===2&&h.route&&!Wh(f,p))continue;if(h.parse){if(!Q2(e,t,p))continue;T=p.rawParams,E=p.extract}r&&h.route&&h.kind!==ia&&Wh(d,p)&&(d=p);const R=g===l;if(R&&(h.route&&(!s||h.kind===ia||h.kind===2)&&Wh(f,p)&&(f=p),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const O=R?void 0:t[g];let A;if(R&&h.index){const I={node:h.index,index:g,skipped:v,depth:_+1,statics:b,dynamics:x,optionals:S,extract:E,rawParams:T};let M=!0;if(h.index.parse&&(Q2(e,t,I)||(M=!1)),M){if(!x&&!S&&!v&&r7(b,l))return I;Wh(f,I)&&(f=I)}}if(h.wildcard)for(let I=h.wildcard.length-1;I>=0;I--){const M=h.wildcard[I],{prefix:L,suffix:H}=M;if(!(L&&(R||!(M.caseSensitive?O:A??=O.toLowerCase()).startsWith(L)))){if(H){if(R)continue;const j=t.slice(g).join("/").slice(-H.length);if((M.caseSensitive?j:j.toLowerCase())!==H)continue}c.push({node:M,index:l,skipped:v,depth:_+1,statics:b,dynamics:x,optionals:S,extract:E,rawParams:T})}}if(h.optional){const I=v|1<<_,M=_+1;for(let L=h.optional.length-1;L>=0;L--){const H=h.optional[L];c.push({node:H,index:g,skipped:I,depth:M,statics:b,dynamics:x,optionals:S,extract:E,rawParams:T})}if(!R)for(let L=h.optional.length-1;L>=0;L--){const H=h.optional[L],{prefix:j,suffix:B}=H;if(j||B){const F=H.caseSensitive?O:A??=O.toLowerCase();if(j&&!F.startsWith(j)||B&&!F.endsWith(B))continue}c.push({node:H,index:g+1,skipped:v,depth:M,statics:b,dynamics:x,optionals:S+Yh(l,g),extract:E,rawParams:T})}}if(!R&&h.dynamic&&O)for(let I=h.dynamic.length-1;I>=0;I--){const M=h.dynamic[I],{prefix:L,suffix:H}=M;if(L||H){const j=M.caseSensitive?O:A??=O.toLowerCase();if(L&&!j.startsWith(L)||H&&!j.endsWith(H))continue}c.push({node:M,index:g+1,skipped:v,depth:_+1,statics:b,dynamics:x+Yh(l,g),optionals:S,extract:E,rawParams:T})}if(!R&&h.staticInsensitive){const I=h.staticInsensitive.get(A??=O.toLowerCase());I&&c.push({node:I,index:g+1,skipped:v,depth:_+1,statics:b+Yh(l,g),dynamics:x,optionals:S,extract:E,rawParams:T})}if(!R&&h.static){const I=h.static.get(O);I&&c.push({node:I,index:g+1,skipped:v,depth:_+1,statics:b+Yh(l,g),dynamics:x,optionals:S,extract:E,rawParams:T})}if(h.pathless){const I=_+1;for(let M=h.pathless.length-1;M>=0;M--){const L=h.pathless[M];c.push({node:L,index:g,skipped:v,depth:I,statics:b,dynamics:x,optionals:S,extract:E,rawParams:T})}}}if(f)return f;if(r&&d){let p=d.index;for(let g=0;g<d.index;g++)p+=t[g].length;const h=p===e.length?"/":e.slice(p);return d.rawParams??=Object.create(null),d.rawParams["**"]=decodeURIComponent(h),d}return null}function Yh(e,t){return 2**(e-t-1)}function r7(e,t){return e===2**(t-1)-1}function Q2(e,t,n){let r,o;try{[r,o]=NM(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 Wh(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===ia)>(e.node.kind===ia)||t.node.kind===ia==(e.node.kind===ia)&&t.depth>e.depth))):!0}function gm(e){return Dw(e.filter(t=>t!==void 0).join("/"))}function Dw(e){return e.replace(/\/{2,}/g,"/")}function DM(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ls(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function LM(e){return ls(DM(e))}function Dm(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function o7(e,t,n){return Dm(e,n)===Dm(t,n)}function i7({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let l;if(r){l=o?t:s?e:e+"\0"+t;const f=r.get(l);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&&Hd(c)==="";)c.pop();const f=t.split("/");for(let p=0,h=f.length;p<h;p++){const g=f[p];g===""?p?p===h-1&&c.push(g):c=[g]:g===".."?c.pop():g==="."||c.push(g)}}c.length>1&&(Hd(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));const d=Dw(c.join("/"))||"/";return l&&r&&r.set(l,d),d}function s7(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 By(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=>J2(o,n)).join("/"):J2(r,n)}function X2({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 l=e.length;let c=0,d,f="";for(;c<l;){const p=c;d=MM(e,p,d);const h=d[5];if(c=h+1,p===h)continue;const g=d[0];if(g===0){f+="/"+e.substring(p,h);continue}if(g===2){const v=t._splat;s._splat=v,s["*"]=v;const _=e.substring(p,d[1]),b=e.substring(d[4],h);if(!v){o=!0,(_||b)&&(f+="/"+_+b);continue}const x=By("_splat",t,n);f+="/"+_+x+b;continue}if(g===1){const v=e.substring(d[2],d[3]);!o&&!(v in t)&&(o=!0),s[v]=t[v];const _=e.substring(p,d[1]),b=e.substring(d[4],h),x=By(v,t,n)??"undefined";f+="/"+_+x+b;continue}if(g===3){const v=e.substring(d[2],d[3]),_=t[v];if(_==null)continue;s[v]=_;const b=e.substring(p,d[1]),x=e.substring(d[4],h),S=By(v,t,n)??"";f+="/"+b+S+x;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:o}}function J2(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function $M(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Cr(e){return e?.isNotFound===!0}function a7(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const l7="tsr-scroll-restoration-v1_3";function c7(){const e=a7();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Bc(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=oa(r,t)||t},persist:()=>{try{e.setItem(l7,JSON.stringify(t))}catch{}}}}const eT=c7(),u7=e=>e.state.__TSR_key||e.href;function d7(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Qh=!1;const Ju="window",tT="data-scroll-restoration-id";function f7(e,t){if(!eT)return;const n=eT;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Qh=!1;const r=e.options.getScrollRestorationKey||u7,o=new Map;window.history.scrollRestoration="manual";const s=c=>{if(!(Qh||!e.isScrollRestoring))if(c.target===document||c.target===window)o.set(Ju,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const d=c.target;o.set(d,{scrollX:d.scrollLeft||0,scrollY:d.scrollTop||0})}},l=c=>{if(!e.isScrollRestoring||!c||o.size===0||!n)return;const d=n.state[c]||={};for(const[f,p]of o){let h;if(f===Ju)h=Ju;else if(f.isConnected){const g=f.getAttribute(tT);h=g?`[${tT}="${g}"]`:d7(f)}h&&(d[h]=p)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?r(c.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{l(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",c=>{const d=r(c.toLocation),f=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Qh=!0;try{const h=e.isScrollRestoring?n.state[d]:void 0;let g=!1;if(h)for(const v in h){const _=h[v];if(!Bc(_))continue;const{scrollX:b,scrollY:x}=_;if(!(!Number.isFinite(b)||!Number.isFinite(x))){if(v===Ju)window.scrollTo({top:x,left:b,behavior:f}),g=!0;else if(v){let S;try{S=document.querySelector(v)}catch{continue}S&&(S.scrollLeft=b,S.scrollTop=x,g=!0)}}}if(!g){const v=e.history.location.hash.slice(1);if(v){const _=window.history.state?.__hashScrollIntoViewOptions??!0;if(_){const b=document.getElementById(v);b&&b.scrollIntoView(_)}}else{const _={top:0,left:0,behavior:f};if(window.scrollTo(_),p)for(const b of p){if(b===Ju)continue;const x=typeof b=="function"?b():document.querySelector(b);x&&x.scrollTo(_)}}}}finally{Qh=!1}e.isScrollRestoring&&n.set(h=>(h[d]||={},h))}})}function h7(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 Vy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function p7(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]=Vy(o):Array.isArray(s)?s.push(Vy(o)):n[r]=[s,Vy(o)]}return n}const m7=v7(JSON.parse),g7=y7(JSON.stringify,JSON.parse);function v7(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=p7(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function y7(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=h7(o,r);return s?`?${s}`:""}}const sl="__root__";function sa(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 Xr(e){return e instanceof Response&&!!e.options}function _7(e){return{input:({url:t})=>{for(const n of e)t=$b(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=jM(e[n],t);return t}}}function b7(e){const t=LM(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===o?l.pathname="/":c.startsWith(s)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=gm(["/",t,l.pathname]),l)}}function $b(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 jM(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 w7(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:o,init:s}=t,l=new Map,c=new Map,d=new Map,f=n(e.status),p=n(e.loadedAt),h=n(e.isLoading),g=n(e.isTransitioning),v=n(e.location),_=n(e.resolvedLocation),b=n(e.statusCode),x=n(e.redirect),S=n([]),E=n([]),T=n([]),R=r(()=>Hy(l,S.get())),O=r(()=>Hy(c,E.get())),A=r(()=>Hy(d,T.get())),I=r(()=>S.get()[0]),M=r(()=>S.get().some(W=>l.get(W)?.get().status==="pending")),L=r(()=>({locationHref:v.get().href,resolvedLocationHref:_.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:h.get(),isTransitioning:g.get(),matches:R.get(),location:v.get(),resolvedLocation:_.get(),statusCode:b.get(),redirect:x.get()})),j=Gd(64);function B(W){let te=j.get(W);return te||(te=r(()=>{const le=S.get();for(const Q of le){const k=l.get(Q);if(k&&k.routeId===W)return k.get()}}),j.set(W,te)),te}const F={status:f,loadedAt:p,isLoading:h,isTransitioning:g,location:v,resolvedLocation:_,statusCode:b,redirect:x,matchesId:S,pendingIds:E,cachedIds:T,matches:R,pendingMatches:O,cachedMatches:A,firstId:I,hasPending:M,matchRouteDeps:L,matchStores:l,pendingMatchStores:c,cachedMatchStores:d,__store:H,getRouteMatchStore:B,setMatches:Z,setPending:ie,setCached:q};Z(e.matches),s?.(F);function Z(W){qy(W,l,S,n,o)}function ie(W){qy(W,c,E,n,o)}function q(W){qy(W,d,T,n,o)}return F}function Hy(e,t){const n=[];for(const r of t){const o=e.get(r);o&&n.push(o.get())}return n}function qy(e,t,n,r,o){const s=e.map(c=>c.id),l=new Set(s);o(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const d=t.get(c.id);if(!d){const f=r(c);f.routeId=c.routeId,t.set(c.id,f);continue}d.routeId=c.routeId,d.get()!==c&&d.set(c)}K8(n.get(),s)||n.set(s)})}const jb=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},S7=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ng=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),al=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const l=e.matches[s];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(r,c.__routeContext,c.__beforeLoadContext)}return r},nT=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(l=>l.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let l=s;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return n?s:o},aa=(e,t,n)=>{if(!(!Xr(n)&&!Cr(n)))throw Xr(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:Xr(n)?"redirected":Cr(n)?"notFound":r.status==="pending"?"success":r.status,context:al(e,t.index),isFetching:!1,error:n})),Cr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Xr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},zM=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},rT=(e,t,n)=>{const r=al(e,n);e.updateMatch(t,o=>({...o,context:r}))},ed=(e,t,n,r)=>{const{id:o,routeId:s}=e.matches[t],l=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,aa(e,e.router.getMatch(o),n);try{l.options.onError?.(n)}catch(c){n=c,aa(e,e.router.getMatch(o),n)}e.updateMatch(o,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Xr(n)&&!Cr(n)&&(e.serialError??=n)},UM=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ng(e,t)&&(n.options.loader||n.options.beforeLoad||BM(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const s=setTimeout(()=>{jb(e)},o);r._nonReactive.pendingTimeout=s}},E7=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;UM(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&aa(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},x7=(e,t,n,r)=>{const o=e.router.getMatch(t);let s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Vc(()=>{s?.resolve(),s=void 0});const{paramsError:l,searchError:c}=o;l&&ed(e,n,l,"PARSE_PARAMS"),c&&ed(e,n,c,"VALIDATE_SEARCH"),UM(e,t,r,o);const d=new AbortController;let f=!1;const p=()=>{f||(f=!0,e.updateMatch(t,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:d})))},h=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,R=>({...R,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{p(),h()});return}o._nonReactive.beforeLoadPromise=Vc();const g={...al(e,n,!1),...o.__routeContext},{search:v,params:_,cause:b}=o,x=Ng(e,t),S={search:v,abortController:d,params:_,preload:x,context:g,location:e.location,navigate:R=>e.router.navigate({...R,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:x?"preload":b,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},E=R=>{if(R===void 0){e.router.batch(()=>{p(),h()});return}(Xr(R)||Cr(R))&&(p(),ed(e,n,R,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,O=>({...O,__beforeLoadContext:R})),h()})};let T;try{if(T=r.options.beforeLoad(S),qd(T))return p(),T.catch(R=>{ed(e,n,R,"BEFORE_LOAD")}).then(E)}catch(R){p(),ed(e,n,R,"BEFORE_LOAD")}E(T)},R7=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>c(),l=()=>x7(e,n,t,o),c=()=>{if(zM(e,n))return;const d=E7(e,n,o);return qd(d)?d.then(l):l()};return s()},O7=(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,l,c])=>({meta:s?.meta,links:s?.links,headScripts:s?.scripts,headers:c,scripts:l,styles:s?.styles}))},FM=(e,t,n,r,o)=>{const s=t[r-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(n),p=al(e,r),h=Ng(e,n);return{params:l,deps:c,preload:!!h,parentMatchPromise:s,abortController:d,context:p,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:h?"preload":f,route:o,...e.router.options.additionalContext}},oT=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(CM??e.router.isServer)||s.ssr===!0)&&Kd(o);const l=o.options.loader,c=typeof l=="function"?l:l?.handler,d=c?.(FM(e,t,n,r,o)),f=!!c&&qd(d);if((f||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,h=>({...h,isFetching:"loader"})),c){const h=f?await d:d;aa(e,e.router.getMatch(n),h),h!==void 0&&e.updateMatch(n,g=>({...g,loaderData:h}))}o._lazyPromise&&await o._lazyPromise;const p=s._nonReactive.minPendingPromise;p&&await p,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,h=>({...h,error:void 0,context:al(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;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:al(e,r)}));return}const d=s._nonReactive.minPendingPromise;d&&await d,Cr(l)&&await o.options.notFoundComponent?.preload?.(),aa(e,e.router.getMatch(n),l);try{o.options.onError?.(l)}catch(f){c=f,aa(e,e.router.getMatch(n),f)}!Xr(c)&&!Cr(c)&&await Kd(o,["errorComponent"]),e.updateMatch(n,f=>({...f,error:c,context:al(e,r),status:"error",isFetching:!1}))}}catch(s){const l=e.router.getMatch(n);l&&(l._nonReactive.loaderPromise=void 0),aa(e,l,s)}},T7=async(e,t,n)=>{async function r(v,_,b,x,S){const E=Date.now()-_.updatedAt,T=v?S.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:S.options.staleTime??e.router.options.defaultStaleTime??0,R=S.options.shouldReload,O=typeof R=="function"?R(FM(e,t,o,n,S)):R,{status:A,invalid:I}=x,M=E>=T&&(!!e.forceStaleReload||x.cause==="enter"||b!==void 0&&b!==x.id);l=A==="success"&&(I||(O??M)),v&&S.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{try{await oT(e,t,o,n,S);const L=e.router.getMatch(o);L._nonReactive.loaderPromise?.resolve(),L._nonReactive.loadPromise?.resolve(),L._nonReactive.loaderPromise=void 0,L._nonReactive.loadPromise=void 0}catch(L){Xr(L)&&await e.router.navigate(L.options)}})()):A!=="success"||l?await oT(e,t,o,n,S):rT(e,o,n))}const{id:o,routeId:s}=e.matches[n];let l=!1,c=!1;const d=e.router.looseRoutesById[s],f=d.options.loader,p=((typeof f=="function"?void 0:f?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(zM(e,o)){if(!e.router.getMatch(o))return e.matches[n];rT(e,o,n)}else{const v=e.router.getMatch(o),_=e.router.stores.matchesId.get()[n],b=(_&&e.router.stores.matchStores.get(_)||null)?.routeId===s?_:e.router.stores.matches.get().find(S=>S.routeId===s)?.id,x=Ng(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&p)return v;await v._nonReactive.loaderPromise;const S=e.router.getMatch(o),E=S._nonReactive.error||S.error;E&&aa(e,S,E),S.status==="pending"&&await r(x,v,b,S,d)}else{const S=x&&!e.router.stores.matchStores.has(o),E=e.router.getMatch(o);E._nonReactive.loaderPromise=Vc(),S!==E.preload&&e.updateMatch(o,T=>({...T,preload:S})),await r(x,v,b,E,d)}}const h=e.router.getMatch(o);c||(h._nonReactive.loaderPromise?.resolve(),h._nonReactive.loadPromise?.resolve(),h._nonReactive.loadPromise=void 0),clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,c||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;const g=c?h.isFetching:!1;return g!==h.isFetching||h.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:g,invalid:!1})),e.router.getMatch(o)):h};async function iT(e){const t=e,n=[];S7(t.router)&&jb(t);let r;for(let g=0;g<t.matches.length;g++){try{const v=R7(t,g);qd(v)&&await v}catch(v){if(Xr(v))throw v;if(Cr(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?nT(t,r):void 0,l=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let c,d;for(let g=0;g<l;g++)n.push(T7(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 _=v.reason;if(Xr(_))throw _;Cr(_)?c??=_:d??=_}if(d!==void 0)throw d}const f=c??(r&&!t.preload?r:void 0);let p=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const g=nT(t,f);g===void 0&&ds();const v=t.matches[g],_=t.router.looseRoutesById[v.routeId],b=t.router.options?.defaultNotFoundComponent;!_.options.notFoundComponent&&b&&(_.options.notFoundComponent=b),f.routeId=v.routeId;const x=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,S=>({...S,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=g,await Kd(_,["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 Kd(g,["errorComponent"])}for(let g=0;g<=p;g++){const{id:v,routeId:_}=t.matches[g],b=t.router.looseRoutesById[_];try{const x=O7(t,v,b);if(x){const S=await x;t.updateMatch(v,E=>({...E,...S}))}}catch(x){console.error(`Error executing head for route ${_}:`,x)}}const h=jb(t);if(qd(h)&&await h,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function sT(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Kd(e,t=vm){!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===vm?(()=>{if(e._componentsPromise===void 0){const r=sT(e,vm);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():sT(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function BM(e){for(const t of vm)if(e.options[t]?.preload)return!0;return!1}const vm=["component","errorComponent","pendingComponent","notFoundComponent"];var ca="__TSR_index",aT="popstate",lT="beforeunload";function C7(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:l}))},o=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},s=async({task:l,navigateOpts:c,...d})=>{if(c?.ignoreBlocker??!1){l();return}const f=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const h of f){const g=Lm(d.path,d.state);if(await h.blockerFn({currentLocation:t,nextLocation:g,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,c,d)=>{const f=t.state[ca];c=cT(f+1,c),s({task:()=>{e.pushState(l,c),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:c})},replace:(l,c,d)=>{const f=t.state[ca];c=cT(f,c),s({task:()=>{e.replaceState(l,c),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:c})},go:(l,c)=>{s({task:()=>{e.go(l),o({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{s({task:()=>{e.back(l?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{s({task:()=>{e.forward(l?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[ca]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function cT(e,t){t||(t={});const n=Lw();return{...t,key:n,__TSR_key:n,[ca]:e}}function A7(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,l=M=>o=M,c=(M=>M),d=(()=>Lm(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const M=Lw();t.history.replaceState({[ca]:0,key:M,__TSR_key:M},"")}let f=d(),p,h=!1,g=!1,v=!1,_=!1;const b=()=>f;let x,S;const E=()=>{x&&(I._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),I._ignoreSubscribers=!1,x=void 0,S=void 0,p=void 0)},T=(M,L,H)=>{const j=c(L);S||(p=f),f=Lm(L,H),x={href:j,state:H,isPush:x?.isPush||M==="push"},S||(S=Promise.resolve().then(()=>E()))},R=M=>{f=d(),I.notify({type:M})},O=async()=>{if(g){g=!1;return}const M=d(),L=M.state[ca]-f.state[ca],H=L===1,j=L===-1,B=!H&&!j||h;h=!1;const F=B?"GO":j?"BACK":"FORWARD",Z=B?{type:"GO",index:L}:{type:j?"BACK":"FORWARD"};if(v)v=!1;else{const ie=s();if(typeof document<"u"&&ie.length){for(const q of ie)if(await q.blockerFn({currentLocation:f,nextLocation:M,action:F})){g=!0,t.history.go(1),I.notify(Z);return}}}f=d(),I.notify(Z)},A=M=>{if(_){_=!1;return}let L=!1;const H=s();if(typeof document<"u"&&H.length)for(const j of H){const B=j.enableBeforeUnload??!0;if(B===!0){L=!0;break}if(typeof B=="function"&&B()===!0){L=!0;break}}if(L)return M.preventDefault(),M.returnValue=""},I=C7({getLocation:b,getLength:()=>t.history.length,pushState:(M,L)=>T("push",M,L),replaceState:(M,L)=>T("replace",M,L),back:M=>(M&&(v=!0),_=!0,t.history.back()),forward:M=>{M&&(v=!0),_=!0,t.history.forward()},go:M=>{h=!0,t.history.go(M)},createHref:M=>c(M),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(lT,A,{capture:!0}),t.removeEventListener(aT,O)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:s,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(lT,A,{capture:!0}),t.addEventListener(aT,O),t.history.pushState=function(...M){const L=n.apply(t.history,M);return I._ignoreSubscribers||R("PUSH"),L},t.history.replaceState=function(...M){const L=r.apply(t.history,M);return I._ignoreSubscribers||R("REPLACE"),L},I}function I7(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Lm(e,t){const n=I7(e),r=n.indexOf("#"),o=n.indexOf("?"),s=Lw();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||{[ca]:0,key:s,__TSR_key:s}}}function Lw(){return(Math.random()+1).toString(36).substring(7)}function Nc(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 P7=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,l=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=s7(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=A7()),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 p;this.resolvePathCache=Gd(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=w7(N7(this.latestLocation),p),f7(this)}let c=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(s||o!==d||l!==f){this.basepath=d;const p=[],h=LM(d);h&&h!=="/"&&p.push(b7({basepath:d})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:_7(p),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=e7(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&Y8(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:d,search:f,hash:p,href:h,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(d)){const S=this.options.parseSearch(f),E=this.options.stringifySearch(S);return{href:d+E+p,publicHref:d+E+p,pathname:Xu(d).path,external:!1,searchStr:E,search:Fa(r?.search,S),hash:Xu(p.slice(1)).path,state:tl(r?.state,g)}}const v=new URL(h,this.origin),_=$b(this.rewrite,v),b=this.options.parseSearch(_.search),x=this.options.stringifySearch(b);return _.search=x,{href:_.href.replace(_.origin,""),publicHref:h,pathname:Xu(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:x,search:Fa(r?.search,b),hash:Xu(_.hash.slice(1)).path,state:tl(r?.state,g)}},s=o(n),{__tempLocation:l,__tempKey:c}=s.state;if(l&&(!c||c===this.tempLocationKey)){const d=o(l);return d.state.key=s.state.key,d.state.__TSR_key=s.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>i7({base:n,to:r.includes("//")?Dw(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=>k7({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 l=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);s.from;const d=s.unsafeRelative==="path"?l.pathname:s.from??c.fullPath,f=s.to?`${s.to}`:void 0,p=c.search,h=Object.assign(Object.create(null),c.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(d,"."),v=f?this.resolvePathWithBase(g,f):g,_=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?h:Object.assign(h,oa(s.params,h)),b=this.routesByPath[ls(v)];let x;if(b)x=this.getRouteBranch(b);else if(v.includes("$"))x=[];else{const j=this.getMatchedRoutes(v);x=j.matchedRoutes,this.options.notFoundRoute&&(!j.foundRoute||j.foundRoute.path!=="/"&&j.routeParams["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&IM(_))for(const j of x){const B=j.options.params?.stringify??j.options.stringifyParams;if(B)try{Object.assign(_,B(_))}catch{}}const S=n.leaveParams?v:Xu(X2({path:v,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const j={};x.forEach(B=>{if(B.options.validateSearch)try{Object.assign(j,ym(B.options.validateSearch,{...j,...E}))}catch{}}),E=j}E=D7({search:E,dest:s,destRoutes:x,_includeValidateSearch:n._includeValidateSearch}),E=Fa(p,E);const T=this.options.stringifySearch(E),R=s.hash===!0?l.hash:s.hash?oa(s.hash,l.hash):void 0,O=R?`#${R}`:"";let A=s.state===!0?l.state:s.state?oa(s.state,l.state):{};A=tl(l.state,A);const I=`${S}${T}${O}`;let M,L,H=!1;if(this.rewrite){const j=new URL(I,this.origin),B=jM(this.rewrite,j);M=j.href.replace(j.origin,""),B.origin!==this.origin?(L=B.href,H=!0):L=B.pathname+B.search+B.hash}else M=G8(I),L=M;return{publicHref:L,href:M,pathname:S,search:E,searchStr:T,state:A,hash:R??"",external:H,unmaskOnReload:s.unmaskOnReload}},o=(s={},l)=>{const c=r(s);let d=l?r(l):void 0;if(!d){const f=Object.create(null);if(this.options.routeMasks){const p=W8(c.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:h,params:g,...v}=p.route,_=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,oa(g,f));l={from:n.from,...v,params:_},d=r(l)}}}return d&&(c.maskedLocation=d),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{const s=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{o.state[p]=this.latestLocation.state[p]});const f=il(o.state,this.latestLocation.state);return d.forEach(p=>{delete o.state[p]}),f},l=ls(this.latestLocation.href)===ls(o.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Vc(()=>{c?.resolve(),c=void 0}),l&&s())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...p}=o;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:l,href:c,...d}={})=>{if(c){const h=this.history.location.state.__TSR_index,g=Lm(c,{__TSR_index:n?h:h+1}),v=new URL(g.pathname,this.origin);d.to=$b(this.rewrite,v).pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const p=this.commitLocation({...f,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...l})=>{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,...l});o=o??f.publicHref,s=s??f.publicHref}const d=!c&&s?s:o;if(km(d,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,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=>{let r,o,s;const l=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,p=Nc(f,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await iT({router:this,sync:n?.sync,forceStaleReload:l.href===f.href,matches:this.stores.pendingMatches.get(),location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let h=null,g=null,v=null,_=null;this.batch(()=>{const b=this.stores.pendingMatches.get(),x=b.length,S=this.stores.matches.get();h=x?S.filter(R=>!this.stores.pendingMatchStores.has(R.id)):null;const E=new Set;for(const R of this.stores.pendingMatchStores.values())R.routeId&&E.add(R.routeId);const T=new Set;for(const R of this.stores.matchStores.values())R.routeId&&T.add(R.routeId);g=x?S.filter(R=>!E.has(R.routeId)):null,v=x?b.filter(R=>!T.has(R.routeId)):null,_=x?b.filter(R=>T.has(R.routeId)):S,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),x&&(this.stores.setMatches(b),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(R=>R.status!=="error"&&R.status!=="notFound"&&R.status!=="redirected")]),this.clearExpiredCache())});for(const[b,x]of[[g,"onLeave"],[v,"onEnter"],[_,"onStay"]])if(b)for(const S of b)this.looseRoutesById[S.routeId].options[x]?.(S)})})}})}catch(f){Xr(f)?(r=f,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Cr(f)&&(o=f);const p=r?r.status:o?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(p),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(d=>d.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},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,l=this.stores.resolvedLocation.get(),c=typeof r.types=="function"?r.types(Nc(s,l)):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 l=this.stores.cachedMatchStores.get(n);if(l){const c=r(l.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(d=>d.filter(f=>f!==n)):l.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&&km(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 l=(o.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=l};this.clearCache({filter:r})},this.loadRouteChunk=Kd,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()]),l=new Set([...s,...this.stores.cachedIds.get()]),c=o.filter(d=>!l.has(d.id));if(c.length){const d=this.stores.cachedMatches.get();this.stores.setCached([...d,...c])}try{return o=await iT({router:this,matches:o,location:r,preload:!0,updateMatch:(d,f)=>{s.has(d)?o=o.map(p=>p.id===d?f(p):p):this.updateMatch(d,f)}}),o}catch(d){if(Xr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:r});Cr(d)||console.error(d);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 l=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=Q8(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,l.pathname,this.processedTree);return!c||n.params&&!il(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?il(l.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??g7,parseSearch:e.parseSearch??m7,protocolAllowlist:e.protocolAllowlist??q8}),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=kM(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,l=!1;(r?r.path!=="/"&&o["**"]:ls(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:l=!0);const c=l?$7(this.options.notFoundMode,s):void 0,d=new Array(s.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<s.length;p++){const h=s[p],g=d[p-1];let v,_,b;{const B=g?.search??e.search,F=g?._strictSearch??void 0;try{const Z=ym(h.options.validateSearch,{...B})??void 0;v={...B,...Z},_={...F,...Z},b=void 0}catch(Z){let ie=Z;if(Z instanceof $m||(ie=new $m(Z.message,{cause:Z})),t?.throwOnError)throw ie;v=B,_={},b=ie}}const x=h.options.loaderDeps?.({search:v})??"",S=x?JSON.stringify(x):"",{interpolatedPath:E,usedParams:T}=X2({path:h.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),R=h.id+E+S,O=this.getMatch(R),A=f.get(h.id),I=O?._strictParams??T;let M;if(!O)try{uT(h,I)}catch(B){if(Cr(B)||Xr(B)?M=B:M=new M7(B.message,{cause:B}),t?.throwOnError)throw M}Object.assign(o,I);const L=A?"stay":"enter";let H;if(O)H={...O,cause:L,params:A?.params??o,_strictParams:I,search:Fa(A?A.search:O.search,v),_strictSearch:_};else{const B=h.options.loader||h.options.beforeLoad||h.lazyFn||BM(h)?"pending":"success";H={id:R,ssr:h.options.ssr,index:p,routeId:h.id,params:A?.params??o,_strictParams:I,pathname:E,updatedAt:Date.now(),search:A?Fa(A.search,v):v,_strictSearch:_,searchError:void 0,status:B,isFetching:!1,error:void 0,paramsError:M,__routeContext:void 0,_nonReactive:{loadPromise:Vc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:A?tl(A.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}t?.preload||(H.globalNotFound=c===h.id),H.searchError=b;const j=this.getParentContext(g);H.context={...j,...H.__routeContext,...H.__beforeLoadContext},d[p]=H}for(let p=0;p<d.length;p++){const h=d[p],g=this.looseRoutesById[h.routeId],v=this.getMatch(h.id),_=f.get(h.routeId);if(h.params=_?Fa(_.params,o):o,!v){const b=d[p-1],x=this.getParentContext(b);if(g.options.context){const S={deps:h.loaderDeps,params:h.params,context:x??{},location:e,navigate:E=>this.navigate({...E,_fromLocation:e}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:d,routeId:g.id};h.__routeContext=g.options.context(S)??void 0}h.context={...x,...h.__routeContext,...h.__beforeLoadContext}}}return d}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=Hd(t),o={...e.search};for(const f of t)try{Object.assign(o,ym(f.options.validateSearch,o))}catch{}const s=Hd(this.stores.matchesId.get()),l=s&&this.stores.matchStores.get(s)?.get(),c=l&&l.routeId===r.id&&l.pathname===e.pathname;let d;if(c)d=l.params;else{const f=Object.assign(Object.create(null),n);for(const p of t)try{uT(p,f)}catch{}d=f}return{matchedRoutes:t,fullPath:r.fullPath,search:o,params:d}}},$m=class extends Error{},M7=class extends Error{};function N7(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function ym(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new $m("Async validation not supported");if(n.issues)throw new $m(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 k7({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),o=ls(e);let s;const l=X8(o,n,!0);return l&&(s=l.route,Object.assign(r,l.rawParams)),{matchedRoutes:l?.branch||[t.__root__],routeParams:r,foundRoute:s}}function D7({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return L7(n)(e,t,r??!1)}function L7(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const s=({search:l,next:c})=>{let d=l;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(d=o.options.preSearchFilters.reduce((p,h)=>h(p),l));const f=c(d);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,h)=>h(p),f):f};t.middlewares.push(s)}if(o.options.validateSearch){const s=({search:l,next:c})=>{const d=c(l);if(!t._includeValidateSearch)return d;try{return{...d,...ym(o.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(s)}}const n=({search:o})=>{const s=t.dest;return s.search?s.search===!0?o:oa(s.search,o):{}};t.middlewares.push(n);const r=(o,s,l)=>{if(o>=l.length)return s;const c=l[o];return c({search:s,next:f=>r(o+1,f,l)})};return function(s,l,c){return t.dest=l,t._includeValidateSearch=c,r(0,s,t.middlewares)}}function $7(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 sl}function uT(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 j7="Error preloading route! ☝️";var VM=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=sl:this.parentRoute||ds();let o=r?sl:n?.path;o&&o!=="/"&&(o=DM(o));const s=n?.id||o;let l=r?sl:gm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);o==="__root__"&&(o="/"),l!=="__root__"&&(l=gm(["/",l]));const c=l==="__root__"?"/":gm([this.parentRoute.fullPath,o]);this._path=o,this._id=l,this._fullPath=c,this._to=ls(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=>sa({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.")}},z7=class{constructor({id:e}){this.notFound=t=>$M({routeId:this.id,...t}),this.redirect=t=>sa({from:this.id,...t}),this.id=e}},U7=class extends VM{constructor(e){super(e)}};function F7(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function $w(e){const t=e.errorComponent??jw;return C.jsx(B7,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?P.createElement(t,{error:n,reset:r}):e.children})}var B7=class extends P.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 jw({error:e}){const[t,n]=P.useState(!1);return C.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[C.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[C.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),C.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"})]}),C.jsx("div",{style:{height:".25rem"}}),t?C.jsx("div",{children:C.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?C.jsx("code",{children:e.message}):null})}):null]})}function V7({children:e,fallback:t=null}){return HM()?C.jsx(ee.Fragment,{children:e}):C.jsx(ee.Fragment,{children:t})}function HM(){return ee.useSyncExternalStore(H7,()=>!0,()=>!1)}function H7(){return()=>{}}var qM=P.createContext(null);function zr(e){return P.useContext(qM)}var kg=P.createContext(void 0),q7=P.createContext(void 0),pn=(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))(pn||{});function G7({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:l,shallowPropagate:c};function r(f,p,h){const g=p.depsTail;if(g!==void 0&&g.dep===f)return;const v=g!==void 0?g.nextDep:p.deps;if(v!==void 0&&v.dep===f){v.version=h,p.depsTail=v;return}const _=f.subsTail;if(_!==void 0&&_.version===h&&_.sub===p)return;const b=p.depsTail=f.subsTail={version:h,dep:f,sub:p,prevDep:g,nextDep:v,prevSub:_,nextSub:void 0};v!==void 0&&(v.prevDep=b),g!==void 0?g.nextDep=b:p.deps=b,_!==void 0?_.nextSub=b:f.subs=b}function o(f,p=f.sub){const h=f.dep,g=f.prevDep,v=f.nextDep,_=f.nextSub,b=f.prevSub;return v!==void 0?v.prevDep=g:p.depsTail=g,g!==void 0?g.nextDep=v:p.deps=v,_!==void 0?_.prevSub=b:h.subsTail=b,b!==void 0?b.nextSub=_:(h.subs=_)===void 0&&n(h),v}function s(f){let p=f.nextSub,h;e:do{const g=f.sub;let v=g.flags;if(v&60?v&12?v&4?!(v&48)&&d(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 _=g.subs;if(_!==void 0){const b=(f=_).nextSub;b!==void 0&&(h={value:p,prev:h},p=b);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;h!==void 0;)if(f=h.value,h=h.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function l(f,p){let h,g=0,v=!1;e:do{const _=f.dep,b=_.flags;if(p.flags&16)v=!0;else if((b&17)===17){if(e(_)){const x=_.subs;x.nextSub!==void 0&&c(x),v=!0}}else if((b&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(h={value:f,prev:h}),f=_.deps,p=_,++g;continue}if(!v){const x=f.nextDep;if(x!==void 0){f=x;continue}}for(;g--;){const x=p.subs,S=x.nextSub!==void 0;if(S?(f=h.value,h=h.prev):f=x,v){if(e(p)){S&&c(x),p=f.sub;continue}v=!1}else p.flags&=-33;p=f.sub;const E=f.nextDep;if(E!==void 0){f=E;continue e}}return v}while(!0)}function c(f){do{const p=f.sub,h=p.flags;(h&48)===32&&(p.flags=h|16,(h&6)===2&&t(p))}while((f=f.nextSub)!==void 0)}function d(f,p){let h=p.depsTail;for(;h!==void 0;){if(h===f)return!0;h=h.prevDep}return!1}}function K7(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 zb=[];let _m=0;const{link:dT,unlink:Z7,propagate:Y7,checkDirty:GM,shallowPropagate:fT}=G7({update(e){return e._update()},notify(e){zb[Ub++]=e,e.flags&=~pn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=pn.Mutable|pn.Dirty,jm(e))}});let Xh=0,Ub=0,vi,Fb=0;function KM(e){try{++Fb,e()}finally{--Fb||ZM()}}function jm(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Z7(n,e)}function ZM(){if(!(Fb>0)){for(;Xh<Ub;){const e=zb[Xh];zb[Xh++]=void 0,e.notify()}Xh=0,Ub=0}}function hT(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?pn.None:pn.Mutable,get(){return vi!==void 0&&dT(o,vi,_m),o._snapshot},subscribe(s){const l=K7(s),c={current:!1},d=W7(()=>{o.get(),c.current?l.next?.(o._snapshot):c.current=!0});return{unsubscribe:()=>{d.stop()}}},_update(s){const l=vi,c=t?.compare??Object.is;if(n)vi=o,++_m,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=pn.Mutable|pn.RecursedCheck);try{const d=o._snapshot,f=typeof s=="function"?s(d):s===void 0&&n?r(d):s;return d===void 0||!c(d,f)?(o._snapshot=f,!0):!1}finally{vi=l,n&&(o.flags&=~pn.RecursedCheck),jm(o)}}};return n?(o.flags=pn.Mutable|pn.Dirty,o.get=function(){const s=o.flags;if(s&pn.Dirty||s&pn.Pending&&GM(o.deps,o)){if(o._update()){const l=o.subs;l!==void 0&&fT(l)}}else s&pn.Pending&&(o.flags=s&~pn.Pending);return vi!==void 0&&dT(o,vi,_m),o._snapshot}):o.set=function(s){if(o._update(s)){const l=o.subs;l!==void 0&&(Y7(l),fT(l),ZM())}},o}function W7(e){const t=()=>{const r=vi;vi=n,++_m,n.depsTail=void 0,n.flags=pn.Watching|pn.RecursedCheck;try{return e()}finally{vi=r,n.flags&=~pn.RecursedCheck,jm(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:pn.Watching|pn.RecursedCheck,notify(){const r=this.flags;r&pn.Dirty||r&pn.Pending&&GM(this.deps,this)?t():this.flags=pn.Watching},stop(){this.flags=pn.None,this.depsTail=void 0,jm(this)}};return t(),n}var Gy={exports:{}},Ky={},Zy={exports:{}},Yy={};var pT;function Q7(){if(pT)return Yy;pT=1;var e=va();function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(h,g){var v=g(),_=r({inst:{value:v,getSnapshot:g}}),b=_[0].inst,x=_[1];return s(function(){b.value=v,b.getSnapshot=g,d(b)&&x({inst:b})},[h,v,g]),o(function(){return d(b)&&x({inst:b}),h(function(){d(b)&&x({inst:b})})},[h]),l(v),v}function d(h){var g=h.getSnapshot;h=h.value;try{var v=g();return!n(h,v)}catch{return!0}}function f(h,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Yy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Yy}var mT;function YM(){return mT||(mT=1,Zy.exports=Q7()),Zy.exports}var gT;function X7(){if(gT)return Ky;gT=1;var e=va(),t=YM();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return Ky.useSyncExternalStoreWithSelector=function(f,p,h,g,v){var _=s(null);if(_.current===null){var b={hasValue:!1,value:null};_.current=b}else b=_.current;_=c(function(){function S(A){if(!E){if(E=!0,T=A,A=g(A),v!==void 0&&b.hasValue){var I=b.value;if(v(I,A))return R=I}return R=A}if(I=R,r(T,A))return I;var M=g(A);return v!==void 0&&v(I,M)?(T=A,I):(T=A,R=M)}var E=!1,T,R,O=h===void 0?null:h;return[function(){return S(p())},O===null?void 0:function(){return S(O())}]},[p,h,g,v]);var x=o(f,_[0],_[1]);return l(function(){b.hasValue=!0,b.value=x},[x]),d(x),x},Ky}var vT;function J7(){return vT||(vT=1,Gy.exports=X7()),Gy.exports}var ez=J7();function tz(e,t){return e===t}function bo(e,t,n=tz){const r=P.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),o=P.useCallback(()=>e?.get(),[e]);return ez.useSyncExternalStoreWithSelector(r,o,o,t,n)}var nz={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ya(e){const t=zr(),n=P.useContext(e.from?q7:kg),r=e.from??n,o=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=P.useRef(void 0);return bo(o??nz,l=>{if((e.shouldThrow??!0)&&!l&&ds(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const d=tl(s.current,c);return s.current=d,d}return c})}function zw(e){return ya({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Uw(e){const{select:t,...n}=e;return ya({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Dg(e){return ya({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 Fw(e){return ya({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function hf(e){const t=zr();return P.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Gce(e){const t=zr(),n=hf(),r=P.useRef(null);return Oc(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function Bw(e){return ya({...e,select:t=>e.select?e.select(t.context):t.context})}var Lg=aM();const WM=hl(Lg);function rz(e,t){const n=zr(),r=U8(t),{activeProps:o,inactiveProps:s,activeOptions:l,to:c,preload:d,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:h,replace:g,startTransition:v,resetScroll:_,viewTransition:b,children:x,target:S,disabled:E,style:T,className:R,onClick:O,onBlur:A,onFocus:I,onMouseEnter:M,onMouseLeave:L,onTouchStart:H,ignoreBlocker:j,params:B,search:F,hash:Z,state:ie,mask:q,reloadDocument:W,unsafeRelative:te,from:le,_fromLocation:Q,...k}=e,G=HM(),V=P.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),D=bo(n.stores.location,ne=>ne,(ne,ae)=>ne.href===ae.href),U=P.useMemo(()=>{const ne={_fromLocation:D,...V};return n.buildLocation(ne)},[n,D,V]),X=U.maskedLocation?U.maskedLocation.publicHref:U.publicHref,fe=U.maskedLocation?U.maskedLocation.external:U.external,pe=P.useMemo(()=>cz(X,fe,n.history,E),[E,fe,X,n.history]),xe=P.useMemo(()=>{if(pe?.external)return km(pe.href,n.protocolAllowlist)?void 0:pe.href;if(!uz(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),km(c,n.protocolAllowlist)?void 0:c}catch{}},[c,pe,n.protocolAllowlist]),je=P.useMemo(()=>{if(xe)return!1;if(l?.exact){if(!o7(D.pathname,U.pathname,n.basepath))return!1}else{const ne=Dm(D.pathname,n.basepath),ae=Dm(U.pathname,n.basepath);if(!(ne.startsWith(ae)&&(ne.length===ae.length||ne[ae.length]==="/")))return!1}return(l?.includeSearch??!0)&&!il(D.search,U.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?G&&D.hash===U.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,D,xe,G,U.hash,U.pathname,U.search,n.basepath]),Y=je?oa(o,{})??oz:Wy,re=je?Wy:oa(s,{})??Wy,ve=[R,Y.className,re.className].filter(Boolean).join(" "),se=(T||Y.style||re.style)&&{...T,...Y.style,...re.style},[Se,Te]=P.useState(!1),tt=P.useRef(!1),rt=e.reloadDocument||xe?!1:d??n.options.defaultPreload,Be=f??n.options.defaultPreloadDelay??0,Qe=P.useCallback(()=>{n.preloadRoute({...V,_builtLocation:U}).catch(ne=>{console.warn(ne),console.warn(j7)})},[n,V,U]);z8(r,P.useCallback(ne=>{ne?.isIntersecting&&Qe()},[Qe]),lz,{disabled:!!E||rt!=="viewport"}),P.useEffect(()=>{tt.current||!E&&rt==="render"&&(Qe(),tt.current=!0)},[E,Qe,rt]);const Me=ne=>{const ae=ne.currentTarget.getAttribute("target"),Oe=S!==void 0?S:ae;if(!E&&!dz(ne)&&!ne.defaultPrevented&&(!Oe||Oe==="_self")&&ne.button===0){ne.preventDefault(),Lg.flushSync(()=>{Te(!0)});const Ae=n.subscribe("onResolved",()=>{Ae(),Te(!1)});n.navigate({...V,replace:g,resetScroll:_,hashScrollIntoView:h,startTransition:v,viewTransition:b,ignoreBlocker:j})}};if(xe)return{...k,ref:r,href:xe,...x&&{children:x},...S&&{target:S},...E&&{disabled:E},...T&&{style:T},...R&&{className:R},...O&&{onClick:O},...A&&{onBlur:A},...I&&{onFocus:I},...M&&{onMouseEnter:M},...L&&{onMouseLeave:L},...H&&{onTouchStart:H}};const Pe=ne=>{if(E||rt!=="intent")return;if(!Be){Qe();return}const ae=ne.currentTarget;if(td.has(ae))return;const Oe=setTimeout(()=>{td.delete(ae),Qe()},Be);td.set(ae,Oe)},Fe=ne=>{E||rt!=="intent"||Qe()},K=ne=>{if(E||!rt||!Be)return;const ae=ne.currentTarget,Oe=td.get(ae);Oe&&(clearTimeout(Oe),td.delete(ae))};return{...k,...Y,...re,href:pe?.href,ref:r,onClick:ic([O,Me]),onBlur:ic([A,K]),onFocus:ic([I,Pe]),onMouseEnter:ic([M,Pe]),onMouseLeave:ic([L,K]),onTouchStart:ic([H,Fe]),disabled:!!E,target:S,...se&&{style:se},...ve&&{className:ve},...E&&iz,...je&&sz,...G&&Se&&az}}var Wy={},oz={className:"active"},iz={role:"link","aria-disabled":!0},sz={"data-status":"active","aria-current":"page"},az={"data-transitioning":"transitioning"},td=new WeakMap,lz={rootMargin:"100px"},ic=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function cz(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function uz(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var pf=P.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=rz(r,t),l=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:c,...d}=s;return P.createElement("a",d,l)}return P.createElement(n,s,l)});function dz(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Kce(e){return new fz({id:e})}var fz=class extends z7{constructor({id:e}){super({id:e}),this.useMatch=t=>ya({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Bw({...t,from:this.id}),this.useSearch=t=>Fw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Dg({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Uw({...t,from:this.id,strict:!1}),this.useLoaderData=t=>zw({...t,from:this.id,strict:!1}),this.useNavigate=()=>hf({from:zr().routesById[this.id].fullPath}),this.notFound=t=>$M({routeId:this.id,...t}),this.Link=ee.forwardRef((t,n)=>{const r=zr().routesById[this.id].fullPath;return C.jsx(pf,{ref:n,from:r,...t})})}},hz=class extends VM{constructor(e){super(e),this.useMatch=t=>ya({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Bw({...t,from:this.id}),this.useSearch=t=>Fw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Dg({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Uw({...t,from:this.id}),this.useLoaderData=t=>zw({...t,from:this.id}),this.useNavigate=()=>hf({from:this.fullPath}),this.Link=ee.forwardRef((t,n)=>C.jsx(pf,{ref:n,from:this.fullPath,...t}))}};function it(e){return new hz(e)}var pz=class extends U7{constructor(e){super(e),this.useMatch=t=>ya({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Bw({...t,from:this.id}),this.useSearch=t=>Fw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Dg({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Uw({...t,from:this.id}),this.useLoaderData=t=>zw({...t,from:this.id}),this.useNavigate=()=>hf({from:this.fullPath}),this.Link=ee.forwardRef((t,n)=>C.jsx(pf,{ref:n,from:this.fullPath,...t}))}};function mz(e){return new pz(e)}function dt(e,t){let n,r,o,s;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d.default}).catch(d=>{if(o=d,V8(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(q2)q2(l());else throw l();return P.createElement(r,f)};return c.preload=l,c}function gz(e){const t=zr(),n=`not-found-${bo(t.stores.location,r=>r.pathname)}-${bo(t.stores.status,r=>r)}`;return C.jsx($w,{getResetKey:()=>n,onCatch:(r,o)=>{if(Cr(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Cr(r))return e.fallback?.(r);throw r},children:e.children})}function vz(){return C.jsx("p",{children:"Not Found"})}function wc(e){return C.jsx(C.Fragment,{children:e.children})}function QM(e,t,n){return t.options.notFoundComponent?C.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?C.jsx(e.options.defaultNotFoundComponent,{...n}):C.jsx(vz,{})}function yz(e){return null}function _z(){return yz(zr()),null}var XM=P.memo(function({matchId:t}){const n=zr(),r=n.stores.matchStores.get(t);r||ds();const o=bo(n.stores.loadedAt,l=>l),s=bo(r,l=>l);return C.jsx(bz,{router:n,matchId:t,resetKey:o,matchState:P.useMemo(()=>{const l=s.routeId,c=n.routesById[l].parentRoute?.id;return{routeId:l,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:c}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function bz({router:e,matchId:t,resetKey:n,matchState:r}){const o=e.routesById[r.routeId],s=o.options.pendingComponent??e.options.defaultPendingComponent,l=s?C.jsx(s,{}):null,c=o.options.errorComponent??e.options.defaultErrorComponent,d=o.options.onCatch??e.options.defaultOnCatch,f=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",h=(!o.isRoot||o.options.wrapInSuspense||p)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||p))?P.Suspense:wc,g=c?$w:wc,v=f?gz:wc;return C.jsxs(o.isRoot?o.options.shellComponent??wc:wc,{children:[C.jsx(kg.Provider,{value:t,children:C.jsx(h,{fallback:l,children:C.jsx(g,{getResetKey:()=>n,errorComponent:c||jw,onCatch:(_,b)=>{if(Cr(_))throw _.routeId??=r.routeId,_;d?.(_,b)},children:C.jsx(v,{fallback:_=>{if(_.routeId??=r.routeId,!f||_.routeId&&_.routeId!==r.routeId||!_.routeId&&!o.isRoot)throw _;return P.createElement(f,_)},children:p||r._displayPending?C.jsx(V7,{fallback:l,children:C.jsx(yT,{matchId:t})}):C.jsx(yT,{matchId:t})})})})}),r.parentRouteId===sl?C.jsxs(C.Fragment,{children:[C.jsx(wz,{resetKey:n}),e.options.scrollRestoration&&CM?C.jsx(_z,{}):null]}):null]})}function wz({resetKey:e}){const t=zr(),n=P.useRef(void 0);return Oc(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Nc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var yT=P.memo(function({matchId:t}){const n=zr(),r=(p,h)=>n.getMatch(p.id)?._nonReactive[h]??p._nonReactive[h],o=n.stores.matchStores.get(t);o||ds();const s=bo(o,p=>p),l=s.routeId,c=n.routesById[l],d=P.useMemo(()=>{const p=(n.routesById[l].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:l,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return p?JSON.stringify(p):void 0},[l,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=P.useMemo(()=>{const p=c.options.component??n.options.defaultComponent;return p?C.jsx(p,{},d):C.jsx(JM,{})},[d,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 p=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const h=n.getMatch(s.id);if(h&&!h._nonReactive.minPendingPromise){const g=Vc();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},p)}}throw r(s,"loadPromise")}if(s.status==="notFound")return Cr(s.error)||ds(),QM(n,c,s.error);if(s.status==="redirected")throw Xr(s.error)||ds(),r(s,"loadPromise");if(s.status==="error")throw s.error;return f}),JM=P.memo(function(){const t=zr(),n=P.useContext(kg);let r,o=!1,s;{const f=n?t.stores.matchStores.get(n):void 0;[r,o]=bo(f,p=>[p?.routeId,p?.globalNotFound??!1]),s=bo(t.stores.matchesId,p=>p[p.findIndex(h=>h===n)+1])}const l=r?t.routesById[r]:void 0,c=t.options.defaultPendingComponent?C.jsx(t.options.defaultPendingComponent,{}):null;if(o)return l||ds(),QM(t,l,void 0);if(!s)return null;const d=C.jsx(XM,{matchId:s});return r===sl?C.jsx(P.Suspense,{fallback:c,children:d}):d});function Sz(){const e=zr(),t=P.useRef({router:e,mounted:!1}),[n,r]=P.useState(!1),o=bo(e.stores.isLoading,h=>h),s=bo(e.stores.hasPending,h=>h),l=zy(o),c=o||n||s,d=zy(c),f=o||s,p=zy(f);return e.startTransition=h=>{r(!0),P.startTransition(()=>{h(),r(!1)})},P.useEffect(()=>{const h=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ls(e.latestLocation.publicHref)!==ls(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{h()}},[e,e.history]),Oc(()=>{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]),Oc(()=>{l&&!o&&e.emit({type:"onLoad",...Nc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,o]),Oc(()=>{p&&!f&&e.emit({type:"onBeforeRouteMount",...Nc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,p,e]),Oc(()=>{if(d&&!c){const h=Nc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...h}),KM(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),h.hrefChanged&&F7(e)}},[c,d,e]),null}function Ez(){const e=zr(),t=e.routesById[sl].options.pendingComponent??e.options.defaultPendingComponent,n=t?C.jsx(t,{}):null,r=C.jsxs(typeof document<"u"&&e.ssr?wc:P.Suspense,{fallback:n,children:[C.jsx(Sz,{}),C.jsx(xz,{})]});return e.options.InnerWrap?C.jsx(e.options.InnerWrap,{children:r}):r}function xz(){const e=zr(),t=bo(e.stores.firstId,o=>o),n=bo(e.stores.loadedAt,o=>o),r=t?C.jsx(XM,{matchId:t}):null;return C.jsx(kg.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:C.jsx($w,{getResetKey:()=>n,errorComponent:jw,onCatch:void 0,children:r})})}var Rz=e=>({createMutableStore:hT,createReadonlyStore:hT,batch:KM}),Oz=e=>new Tz(e),Tz=class extends P7{constructor(e){super(e,Rz)}};function Cz({router:e,children:t,...n}){IM(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=C.jsx(qM.Provider,{value:e,children:t});return e.options.Wrap?C.jsx(e.options.Wrap,{children:r}):r}function Az({router:e,...t}){return C.jsx(Cz,{router:e,...t,children:C.jsx(Ez,{})})}var Iz={},_T={};const bm=Object.create(null),nd=e=>Iz||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?bm:globalThis),Do=new Proxy(bm,{get(e,t){return nd()[t]??bm[t]},has(e,t){return t in nd()||t in bm},set(e,t,n){const r=nd(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=nd(!0);return delete n[t],!0},ownKeys(){const e=nd(!0);return Object.keys(e)}});function Fn(e,t){return typeof process<"u"&&_T?_T[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const rd=1,or=4,bi=8,mo=24,bT={eterm:or,cons25:or,console:or,cygwin:or,dtterm:or,gnome:or,hurd:or,jfbterm:or,konsole:or,kterm:or,mlterm:or,mosh:mo,putty:or,st:or,"rxvt-unicode-24bit":mo,terminator:mo,"xterm-kitty":mo},Pz=new Map(Object.entries({APPVEYOR:bi,BUILDKITE:bi,CIRCLECI:mo,DRONE:bi,GITEA_ACTIONS:mo,GITHUB_ACTIONS:mo,GITLAB_CI:bi,TRAVIS:bi})),Mz=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Nz(){if(Fn("FORCE_COLOR")!==void 0)switch(Fn("FORCE_COLOR")){case"":case"1":case"true":return or;case"2":return bi;case"3":return mo;default:return rd}if(Fn("NODE_DISABLE_COLORS")!==void 0&&Fn("NODE_DISABLE_COLORS")!==""||Fn("NO_COLOR")!==void 0&&Fn("NO_COLOR")!==""||Fn("TERM")==="dumb")return rd;if(Fn("TMUX"))return mo;if("TF_BUILD"in Do&&"AGENT_NAME"in Do)return or;if("CI"in Do){for(const{0:e,1:t}of Pz)if(e in Do)return t;return Fn("CI_NAME")==="codeship"?bi:rd}if("TEAMCITY_VERSION"in Do)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Fn("TEAMCITY_VERSION"))!==null?or:rd;switch(Fn("TERM_PROGRAM")){case"iTerm.app":return!Fn("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Fn("TERM_PROGRAM_VERSION"))!==null?bi:mo;case"HyperTerm":case"MacTerm":return mo;case"Apple_Terminal":return bi}if(Fn("COLORTERM")==="truecolor"||Fn("COLORTERM")==="24bit")return mo;if(Fn("TERM")){if(/truecolor/.exec(Fn("TERM"))!==null)return mo;if(/^xterm-256/.exec(Fn("TERM"))!==null)return bi;const e=Fn("TERM").toLowerCase();if(bT[e])return bT[e];if(Mz.some(t=>t.exec(e)!==null))return or}return Fn("COLORTERM")?or:rd}const wi={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},Bb=["debug","info","success","warn","error"];function kz(e,t){return Bb.indexOf(t)>=Bb.indexOf(e)}const Dz={info:wi.fg.blue,success:wi.fg.green,warn:wi.fg.yellow,error:wi.fg.red,debug:wi.fg.magenta},Lz=(e,t,n)=>{const r=new Date().toISOString();return n?`${wi.dim}${r}${wi.reset} ${Dz[e]}${e.toUpperCase()}${wi.reset} ${wi.bright}[Better Auth]:${wi.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},$z=e=>{const t="warn",n=Nz()!==1,r=(o,s,l=[])=>{if(!kz(t,o))return;const c=Lz(o,s,n);{o==="error"?console.error(c,...l):o==="warn"?console.warn(c,...l):console.log(c,...l);return}};return{...Object.fromEntries(Bb.map(o=>[o,(...[s,...l])=>r(o,s,l)])),get level(){return t}}};$z();const jz=Object.freeze({status:"aborted"});function ye(e,t,n){function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);const f=l.prototype,p=Object.keys(f);for(let h=0;h<p.length;h++){const g=p[h];g in c||(c[g]=f[g].bind(c))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function l(c){var d;const f=n?.Parent?new s:this;r(f,c),(d=f._zod).deferred??(d.deferred=[]);for(const p of f._zod.deferred)p();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class kc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e3 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const t3={};function ha(e){return t3}function n3(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 Vb(e,t){return typeof t=="bigint"?t.toString():t}function $g(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function mf(e){return e==null}function Vw(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zz(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(o=Number.parseInt(d[1]))}const s=n>o?n:o,l=Number.parseInt(e.toFixed(s).replace(".","")),c=Number.parseInt(t.toFixed(s).replace(".",""));return l%c/10**s}const wT=Symbol("evaluating");function It(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==wT)return r===void 0&&(r=wT,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function pl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _a(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function ST(e){return JSON.stringify(e)}function Uz(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const r3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Zd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Fz=$g(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Hc(e){if(Zd(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Zd(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function o3(e){return Hc(e)?{...e}:Array.isArray(e)?[...e]:e}const Bz=new Set(["string","number","symbol"]);function qc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ba(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ue(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 Vz(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Hz={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]};function qz(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=_a(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return pl(this,"shape",l),l},checks:[]});return ba(e,s)}function Gz(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=_a(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return pl(this,"shape",l),l},checks:[]});return ba(e,s)}function Kz(e,t){if(!Hc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(s,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=_a(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return pl(this,"shape",s),s}});return ba(e,o)}function Zz(e,t){if(!Hc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=_a(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return pl(this,"shape",r),r}});return ba(e,n)}function Yz(e,t){const n=_a(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return pl(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return ba(e,n)}function Wz(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=_a(t._zod.def,{get shape(){const c=t._zod.def.shape,d={...c};if(n)for(const f in n){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f in c)d[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return pl(this,"shape",d),d},checks:[]});return ba(t,l)}function Qz(e,t,n){const r=_a(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(s[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)s[l]=new e({type:"nonoptional",innerType:o[l]});return pl(this,"shape",s),s}});return ba(t,r)}function Tc(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 rl(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Jh(e){return typeof e=="string"?e:e?.message}function pa(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Jh(e.inst?._zod.def?.error?.(e))??Jh(t?.error?.(e))??Jh(n.customError?.(e))??Jh(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function i3(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Hw(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Yd(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const s3=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Vb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},qw=ye("$ZodError",s3),jg=ye("$ZodError",s3,{Parent:Error});function Xz(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function Jz(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>r({issues:l}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let l=n,c=0;for(;c<s.path.length;){const d=s.path[c];c===s.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(s))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}};return r(e),n}const zg=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new kc;if(l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>pa(d,s,ha())));throw r3(c,o?.callee),c}return l.value},e9=zg(jg),Ug=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>pa(d,s,ha())));throw r3(c,o?.callee),c}return l.value},t9=Ug(jg),Fg=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 kc;return s.issues.length?{success:!1,error:new(e??qw)(s.issues.map(l=>pa(l,o,ha())))}:{success:!0,data:s.value}},n9=Fg(jg),Bg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>pa(l,o,ha())))}:{success:!0,data:s.value}},r9=Bg(jg),o9=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zg(e)(t,n,o)},i9=e=>(t,n,r)=>zg(e)(t,n,r),s9=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ug(e)(t,n,o)},a9=e=>async(t,n,r)=>Ug(e)(t,n,r),l9=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Fg(e)(t,n,o)},c9=e=>(t,n,r)=>Fg(e)(t,n,r),u9=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Bg(e)(t,n,o)},d9=e=>async(t,n,r)=>Bg(e)(t,n,r),f9=/^[cC][^\s-]{8,}$/,h9=/^[0-9a-z]+$/,p9=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,m9=/^[0-9a-vA-V]{20}$/,g9=/^[A-Za-z0-9]{27}$/,v9=/^[a-zA-Z0-9_-]{21}$/,y9=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_9=/^([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})$/,ET=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)$/,b9=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,w9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function S9(){return new RegExp(w9,"u")}const E9=/^(?:(?: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])$/,x9=/^(([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}|:))$/,R9=/^((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])$/,O9=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,T9=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,a3=/^[A-Za-z0-9_-]*$/,C9=/^\+[1-9]\d{6,14}$/,l3="(?:(?:\\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])))",A9=new RegExp(`^${l3}$`);function c3(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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function I9(e){return new RegExp(`^${c3(e)}$`)}function P9(e){const t=c3({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${l3}T(?:${r})$`)}const M9=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},N9=/^-?\d+$/,u3=/^-?\d+(?:\.\d+)?$/,k9=/^(?:true|false)$/i,D9=/^null$/i,L9=/^undefined$/i,$9=/^[^A-Z]*$/,j9=/^[^a-z]*$/,yr=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),d3={number:"number",bigint:"bigint",object:"date"},f3=ye("$ZodCheckLessThan",(e,t)=>{yr.init(e,t);const n=d3[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin: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})}}),h3=ye("$ZodCheckGreaterThan",(e,t)=>{yr.init(e,t);const n=d3[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin: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})}}),z9=ye("$ZodCheckMultipleOf",(e,t)=>{yr.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),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"?n.value%t.value===BigInt(0):zz(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})}}),U9=ye("$ZodCheckNumberFormat",(e,t)=>{yr.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=Hz[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=o,c.maximum=s,n&&(c.pattern=N9)}),e._zod.check=l=>{const c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.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}):l.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&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),F9=ye("$ZodCheckMaxSize",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;o.size<=t.maximum||r.issues.push({origin:i3(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),B9=ye("$ZodCheckMinSize",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;o.size>=t.minimum||r.issues.push({origin:i3(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),V9=ye("$ZodCheckMaxLength",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=Hw(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),H9=ye("$ZodCheckMinLength",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=Hw(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),q9=ye("$ZodCheckLengthEquals",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const l=Hw(o),c=s>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Vg=ye("$ZodCheckStringFormat",(e,t)=>{var n,r;yr.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),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=()=>{})}),G9=ye("$ZodCheckRegex",(e,t)=>{Vg.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})}}),K9=ye("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=$9),Vg.init(e,t)}),Z9=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=j9),Vg.init(e,t)}),Y9=ye("$ZodCheckIncludes",(e,t)=>{yr.init(e,t);const n=qc(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(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})}}),W9=ye("$ZodCheckStartsWith",(e,t)=>{yr.init(e,t);const n=new RegExp(`^${qc(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(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})}}),Q9=ye("$ZodCheckEndsWith",(e,t)=>{yr.init(e,t);const n=new RegExp(`.*${qc(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(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})}}),X9=ye("$ZodCheckMimeType",(e,t)=>{yr.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),J9=ye("$ZodCheckOverwrite",(e,t)=>{yr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class eU{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
10
|
+
`).replace(nj,"")}function HO(i,a){return a=VO(a),VO(i)===a}function Wt(i,a,u,m,y,w){switch(u){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||Tl(i,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&Tl(i,""+m);break;case"className":$f(i,"class",m);break;case"tabIndex":$f(i,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":$f(i,u,m);break;case"style":HE(i,m,w);break;case"data":if(a!=="object"){$f(i,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=zf(""+m),i.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){i.setAttribute(u,"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 w=="function"&&(u==="formAction"?(a!=="input"&&Wt(i,a,"name",y.name,y,null),Wt(i,a,"formEncType",y.formEncType,y,null),Wt(i,a,"formMethod",y.formMethod,y,null),Wt(i,a,"formTarget",y.formTarget,y,null)):(Wt(i,a,"encType",y.encType,y,null),Wt(i,a,"method",y.method,y,null),Wt(i,a,"target",y.target,y,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=zf(""+m),i.setAttribute(u,m);break;case"onClick":m!=null&&(i.onclick=Di);break;case"onScroll":m!=null&&St("scroll",i);break;case"onScrollEnd":m!=null&&St("scrollend",i);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":i.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){i.removeAttribute("xlink:href");break}u=zf(""+m),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""+m):i.removeAttribute(u);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":m&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":m===!0?i.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,m):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?i.setAttribute(u,m):i.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?i.removeAttribute(u):i.setAttribute(u,m);break;case"popover":St("beforetoggle",i),St("toggle",i),Lf(i,"popover",m);break;case"xlinkActuate":ki(i,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ki(i,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ki(i,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ki(i,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ki(i,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ki(i,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ki(i,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ki(i,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ki(i,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Lf(i,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=IL.get(u)||u,Lf(i,u,m))}}function hy(i,a,u,m,y,w){switch(u){case"style":HE(i,m,w);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof m=="string"?Tl(i,m):(typeof m=="number"||typeof m=="bigint")&&Tl(i,""+m);break;case"onScroll":m!=null&&St("scroll",i);break;case"onScrollEnd":m!=null&&St("scrollend",i);break;case"onClick":m!=null&&(i.onclick=Di);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!DE.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),a=u.slice(2,y?u.length-7:void 0),w=i[Fr]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(a,w,y),typeof m=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,m,y);break e}u in i?i[u]=m:m===!0?i.setAttribute(u,""):Lf(i,u,m)}}}function dr(i,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":St("error",i),St("load",i);var m=!1,y=!1,w;for(w in u)if(u.hasOwnProperty(w)){var N=u[w];if(N!=null)switch(w){case"src":m=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Wt(i,a,w,N,u,null)}}y&&Wt(i,a,"srcSet",u.srcSet,u,null),m&&Wt(i,a,"src",u.src,u,null);return;case"input":St("invalid",i);var z=w=N=y=null,J=null,de=null;for(m in u)if(u.hasOwnProperty(m)){var _e=u[m];if(_e!=null)switch(m){case"name":y=_e;break;case"type":N=_e;break;case"checked":J=_e;break;case"defaultChecked":de=_e;break;case"value":w=_e;break;case"defaultValue":z=_e;break;case"children":case"dangerouslySetInnerHTML":if(_e!=null)throw Error(r(137,a));break;default:Wt(i,a,m,_e,u,null)}}UE(i,w,z,J,de,N,y,!1);return;case"select":St("invalid",i),m=N=w=null;for(y in u)if(u.hasOwnProperty(y)&&(z=u[y],z!=null))switch(y){case"value":w=z;break;case"defaultValue":N=z;break;case"multiple":m=z;default:Wt(i,a,y,z,u,null)}a=w,u=N,i.multiple=!!m,a!=null?Ol(i,!!m,a,!1):u!=null&&Ol(i,!!m,u,!0);return;case"textarea":St("invalid",i),w=y=m=null;for(N in u)if(u.hasOwnProperty(N)&&(z=u[N],z!=null))switch(N){case"value":m=z;break;case"defaultValue":y=z;break;case"children":w=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(91));break;default:Wt(i,a,N,z,u,null)}BE(i,m,y,w);return;case"option":for(J in u)u.hasOwnProperty(J)&&(m=u[J],m!=null)&&(J==="selected"?i.selected=m&&typeof m!="function"&&typeof m!="symbol":Wt(i,a,J,m,u,null));return;case"dialog":St("beforetoggle",i),St("toggle",i),St("cancel",i),St("close",i);break;case"iframe":case"object":St("load",i);break;case"video":case"audio":for(m=0;m<Fu.length;m++)St(Fu[m],i);break;case"image":St("error",i),St("load",i);break;case"details":St("toggle",i);break;case"embed":case"source":case"link":St("error",i),St("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(de in u)if(u.hasOwnProperty(de)&&(m=u[de],m!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Wt(i,a,de,m,u,null)}return;default:if(Tv(a)){for(_e in u)u.hasOwnProperty(_e)&&(m=u[_e],m!==void 0&&hy(i,a,_e,m,u,void 0));return}}for(z in u)u.hasOwnProperty(z)&&(m=u[z],m!=null&&Wt(i,a,z,m,u,null))}function rj(i,a,u,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,w=null,N=null,z=null,J=null,de=null,_e=null;for(ge in u){var Ee=u[ge];if(u.hasOwnProperty(ge)&&Ee!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":J=Ee;default:m.hasOwnProperty(ge)||Wt(i,a,ge,null,m,Ee)}}for(var he in m){var ge=m[he];if(Ee=u[he],m.hasOwnProperty(he)&&(ge!=null||Ee!=null))switch(he){case"type":w=ge;break;case"name":y=ge;break;case"checked":de=ge;break;case"defaultChecked":_e=ge;break;case"value":N=ge;break;case"defaultValue":z=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,a));break;default:ge!==Ee&&Wt(i,a,he,ge,m,Ee)}}Rv(i,N,z,J,de,_e,w,y);return;case"select":ge=N=z=he=null;for(w in u)if(J=u[w],u.hasOwnProperty(w)&&J!=null)switch(w){case"value":break;case"multiple":ge=J;default:m.hasOwnProperty(w)||Wt(i,a,w,null,m,J)}for(y in m)if(w=m[y],J=u[y],m.hasOwnProperty(y)&&(w!=null||J!=null))switch(y){case"value":he=w;break;case"defaultValue":z=w;break;case"multiple":N=w;default:w!==J&&Wt(i,a,y,w,m,J)}a=z,u=N,m=ge,he!=null?Ol(i,!!u,he,!1):!!m!=!!u&&(a!=null?Ol(i,!!u,a,!0):Ol(i,!!u,u?[]:"",!1));return;case"textarea":ge=he=null;for(z in u)if(y=u[z],u.hasOwnProperty(z)&&y!=null&&!m.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:Wt(i,a,z,null,m,y)}for(N in m)if(y=m[N],w=u[N],m.hasOwnProperty(N)&&(y!=null||w!=null))switch(N){case"value":he=y;break;case"defaultValue":ge=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==w&&Wt(i,a,N,y,m,w)}FE(i,he,ge);return;case"option":for(var qe in u)he=u[qe],u.hasOwnProperty(qe)&&he!=null&&!m.hasOwnProperty(qe)&&(qe==="selected"?i.selected=!1:Wt(i,a,qe,null,m,he));for(J in m)he=m[J],ge=u[J],m.hasOwnProperty(J)&&he!==ge&&(he!=null||ge!=null)&&(J==="selected"?i.selected=he&&typeof he!="function"&&typeof he!="symbol":Wt(i,a,J,he,m,ge));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 nt in u)he=u[nt],u.hasOwnProperty(nt)&&he!=null&&!m.hasOwnProperty(nt)&&Wt(i,a,nt,null,m,he);for(de in m)if(he=m[de],ge=u[de],m.hasOwnProperty(de)&&he!==ge&&(he!=null||ge!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,a));break;default:Wt(i,a,de,he,m,ge)}return;default:if(Tv(a)){for(var Qt in u)he=u[Qt],u.hasOwnProperty(Qt)&&he!==void 0&&!m.hasOwnProperty(Qt)&&hy(i,a,Qt,void 0,m,he);for(_e in m)he=m[_e],ge=u[_e],!m.hasOwnProperty(_e)||he===ge||he===void 0&&ge===void 0||hy(i,a,_e,he,m,ge);return}}for(var ce in u)he=u[ce],u.hasOwnProperty(ce)&&he!=null&&!m.hasOwnProperty(ce)&&Wt(i,a,ce,null,m,he);for(Ee in m)he=m[Ee],ge=u[Ee],!m.hasOwnProperty(Ee)||he===ge||he==null&&ge==null||Wt(i,a,Ee,he,m,ge)}function qO(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function oj(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var y=u[m],w=y.transferSize,N=y.initiatorType,z=y.duration;if(w&&z&&qO(N)){for(N=0,z=y.responseEnd,m+=1;m<u.length;m++){var J=u[m],de=J.startTime;if(de>z)break;var _e=J.transferSize,Ee=J.initiatorType;_e&&qO(Ee)&&(J=J.responseEnd,N+=_e*(J<z?1:(z-de)/(J-de)))}if(--m,a+=8*(w+N)/(y.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var py=null,my=null;function kh(i){return i.nodeType===9?i:i.ownerDocument}function GO(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 KO(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function gy(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var vy=null;function ij(){var i=window.event;return i&&i.type==="popstate"?i===vy?!1:(vy=i,!0):(vy=null,!1)}var ZO=typeof setTimeout=="function"?setTimeout:void 0,sj=typeof clearTimeout=="function"?clearTimeout:void 0,YO=typeof Promise=="function"?Promise:void 0,aj=typeof queueMicrotask=="function"?queueMicrotask:typeof YO<"u"?function(i){return YO.resolve(null).then(i).catch(lj)}:ZO;function lj(i){setTimeout(function(){throw i})}function js(i){return i==="head"}function WO(i,a){var u=a,m=0;do{var y=u.nextSibling;if(i.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(m===0){i.removeChild(y),oc(a);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Vu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Vu(u);for(var w=u.firstChild;w;){var N=w.nextSibling,z=w.nodeName;w[au]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=N}}else u==="body"&&Vu(i.ownerDocument.body);u=y}while(u);oc(a)}function QO(i,a){var u=i;i=0;do{var m=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=m}while(u)}function yy(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":yy(u),Ev(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function cj(i,a,u,m){for(;i.nodeType===1;){var y=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(m){if(!i[au])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==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(w=i.getAttribute("src"),(w!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var w=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=Po(i.nextSibling),i===null)break}return null}function uj(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Po(i.nextSibling),i===null))return null;return i}function XO(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=Po(i.nextSibling),i===null))return null;return i}function _y(i){return i.data==="$?"||i.data==="$~"}function by(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function dj(i,a){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||u.readyState!=="loading")a();else{var m=function(){a(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),i._reactRetry=m}}function Po(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return i}var wy=null;function JO(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(a===0)return Po(i.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}i=i.nextSibling}return null}function e2(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return i;a--}else u!=="/$"&&u!=="/&"||a++}i=i.previousSibling}return null}function t2(i,a,u){switch(a=kh(u),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Vu(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);Ev(i)}var Mo=new Map,n2=new Set;function Dh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Qi=W.d;W.d={f:fj,r:hj,D:pj,C:mj,L:gj,m:vj,X:_j,S:yj,M:bj};function fj(){var i=Qi.f(),a=Oh();return i||a}function hj(i){var a=El(i);a!==null&&a.tag===5&&a.type==="form"?_R(a):Qi.r(i)}var tc=typeof document>"u"?null:document;function r2(i,a,u){var m=tc;if(m&&typeof a=="string"&&a){var y=xo(a);y='link[rel="'+i+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),n2.has(y)||(n2.add(y),i={rel:i,crossOrigin:u,href:a},m.querySelector(y)===null&&(a=m.createElement("link"),dr(a,"link",i),tr(a),m.head.appendChild(a)))}}function pj(i){Qi.D(i),r2("dns-prefetch",i,null)}function mj(i,a){Qi.C(i,a),r2("preconnect",i,a)}function gj(i,a,u){Qi.L(i,a,u);var m=tc;if(m&&i&&a){var y='link[rel="preload"][as="'+xo(a)+'"]';a==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+xo(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+xo(u.imageSizes)+'"]')):y+='[href="'+xo(i)+'"]';var w=y;switch(a){case"style":w=nc(i);break;case"script":w=rc(i)}Mo.has(w)||(i=h({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),Mo.set(w,i),m.querySelector(y)!==null||a==="style"&&m.querySelector(Hu(w))||a==="script"&&m.querySelector(qu(w))||(a=m.createElement("link"),dr(a,"link",i),tr(a),m.head.appendChild(a)))}}function vj(i,a){Qi.m(i,a);var u=tc;if(u&&i){var m=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+xo(m)+'"][href="'+xo(i)+'"]',w=y;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=rc(i)}if(!Mo.has(w)&&(i=h({rel:"modulepreload",href:i},a),Mo.set(w,i),u.querySelector(y)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(qu(w)))return}m=u.createElement("link"),dr(m,"link",i),tr(m),u.head.appendChild(m)}}}function yj(i,a,u){Qi.S(i,a,u);var m=tc;if(m&&i){var y=xl(m).hoistableStyles,w=nc(i);a=a||"default";var N=y.get(w);if(!N){var z={loading:0,preload:null};if(N=m.querySelector(Hu(w)))z.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":a},u),(u=Mo.get(w))&&Sy(i,u);var J=N=m.createElement("link");tr(J),dr(J,"link",i),J._p=new Promise(function(de,_e){J.onload=de,J.onerror=_e}),J.addEventListener("load",function(){z.loading|=1}),J.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Lh(N,a,m)}N={type:"stylesheet",instance:N,count:1,state:z},y.set(w,N)}}}function _j(i,a){Qi.X(i,a);var u=tc;if(u&&i){var m=xl(u).hoistableScripts,y=rc(i),w=m.get(y);w||(w=u.querySelector(qu(y)),w||(i=h({src:i,async:!0},a),(a=Mo.get(y))&&Ey(i,a),w=u.createElement("script"),tr(w),dr(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(y,w))}}function bj(i,a){Qi.M(i,a);var u=tc;if(u&&i){var m=xl(u).hoistableScripts,y=rc(i),w=m.get(y);w||(w=u.querySelector(qu(y)),w||(i=h({src:i,async:!0,type:"module"},a),(a=Mo.get(y))&&Ey(i,a),w=u.createElement("script"),tr(w),dr(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(y,w))}}function o2(i,a,u,m){var y=(y=X.current)?Dh(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=nc(u.href),u=xl(y).hoistableStyles,m=u.get(a),m||(m={type:"style",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=nc(u.href);var w=xl(y).hoistableStyles,N=w.get(i);if(N||(y=y.ownerDocument||y,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,N),(w=y.querySelector(Hu(i)))&&!w._p&&(N.instance=w,N.state.loading=5),Mo.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Mo.set(i,u),w||wj(y,i,u,N.state))),a&&m===null)throw Error(r(528,""));return N}if(a&&m!==null)throw Error(r(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=rc(u),u=xl(y).hoistableScripts,m=u.get(a),m||(m={type:"script",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function nc(i){return'href="'+xo(i)+'"'}function Hu(i){return'link[rel="stylesheet"]['+i+"]"}function i2(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function wj(i,a,u,m){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=i.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),dr(a,"link",u),tr(a),i.head.appendChild(a))}function rc(i){return'[src="'+xo(i)+'"]'}function qu(i){return"script[async]"+i}function s2(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var m=i.querySelector('style[data-href~="'+xo(u.href)+'"]');if(m)return a.instance=m,tr(m),m;var y=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(i.ownerDocument||i).createElement("style"),tr(m),dr(m,"style",y),Lh(m,u.precedence,i),a.instance=m;case"stylesheet":y=nc(u.href);var w=i.querySelector(Hu(y));if(w)return a.state.loading|=4,a.instance=w,tr(w),w;m=i2(u),(y=Mo.get(y))&&Sy(m,y),w=(i.ownerDocument||i).createElement("link"),tr(w);var N=w;return N._p=new Promise(function(z,J){N.onload=z,N.onerror=J}),dr(w,"link",m),a.state.loading|=4,Lh(w,u.precedence,i),a.instance=w;case"script":return w=rc(u.src),(y=i.querySelector(qu(w)))?(a.instance=y,tr(y),y):(m=u,(y=Mo.get(w))&&(m=h({},u),Ey(m,y)),i=i.ownerDocument||i,y=i.createElement("script"),tr(y),dr(y,"link",m),i.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,Lh(m,u.precedence,i));return a.instance}function Lh(i,a,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=m.length?m[m.length-1]:null,w=y,N=0;N<m.length;N++){var z=m[N];if(z.dataset.precedence===a)w=z;else if(w!==y)break}w?w.parentNode.insertBefore(i,w.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function Sy(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function Ey(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var $h=null;function a2(i,a,u){if($h===null){var m=new Map,y=$h=new Map;y.set(u,m)}else y=$h,m=y.get(u),m||(m=new Map,y.set(u,m));if(m.has(i))return m;for(m.set(i,null),u=u.getElementsByTagName(i),y=0;y<u.length;y++){var w=u[y];if(!(w[au]||w[ar]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var N=w.getAttribute(a)||"";N=i+N;var z=m.get(N);z?z.push(w):m.set(N,[w])}}return m}function l2(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function Sj(i,a,u){if(u===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(i=a.disabled,typeof a.precedence=="string"&&i==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function c2(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Ej(i,a,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=nc(m.href),w=a.querySelector(Hu(y));if(w){a=w._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=jh.bind(i),a.then(i,i)),u.state.loading|=4,u.instance=w,tr(w);return}w=a.ownerDocument||a,m=i2(m),(y=Mo.get(y))&&Sy(m,y),w=w.createElement("link"),tr(w);var N=w;N._p=new Promise(function(z,J){N.onload=z,N.onerror=J}),dr(w,"link",m),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=jh.bind(i),a.addEventListener("load",u),a.addEventListener("error",u))}}var xy=0;function xj(i,a){return i.stylesheets&&i.count===0&&Uh(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var m=setTimeout(function(){if(i.stylesheets&&Uh(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+a);0<i.imgBytes&&xy===0&&(xy=62500*oj());var y=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Uh(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>xy?50:800)+a);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(m),clearTimeout(y)}}:null}function jh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var zh=null;function Uh(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,zh=new Map,a.forEach(Rj,i),zh=null,jh.call(i))}function Rj(i,a){if(!(a.state.loading&4)){var u=zh.get(i);if(u)var m=u.get(null);else{u=new Map,zh.set(i,u);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<y.length;w++){var N=y[w];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(u.set(N.dataset.precedence,N),m=N)}m&&u.set(null,m)}y=a.instance,N=y.getAttribute("data-precedence"),w=u.get(N)||m,w===m&&u.set(null,y),u.set(N,y),this.count++,m=jh.bind(this),y.addEventListener("load",m),y.addEventListener("error",m),w?w.parentNode.insertBefore(y,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),a.state.loading|=4}}var Gu={$$typeof:T,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Oj(i,a,u,m,y,w,N,z,J){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=Sr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sr(0),this.hiddenUpdates=Sr(null),this.identifierPrefix=m,this.onUncaughtError=y,this.onCaughtError=w,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function u2(i,a,u,m,y,w,N,z,J,de,_e,Ee){return i=new Oj(i,a,u,N,J,de,_e,Ee,z),a=1,w===!0&&(a|=24),w=no(3,null,null,a),i.current=w,w.stateNode=i,a=r0(),a.refCount++,i.pooledCache=a,a.refCount++,w.memoizedState={element:m,isDehydrated:u,cache:a},a0(w),i}function d2(i){return i?(i=kl,i):kl}function f2(i,a,u,m,y,w){y=d2(y),m.context===null?m.context=y:m.pendingContext=y,m=Ts(a),m.payload={element:u},w=w===void 0?null:w,w!==null&&(m.callback=w),u=Cs(i,m,a),u!==null&&(Kr(u,i,a),xu(u,i,a))}function h2(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function Ry(i,a){h2(i,a),(i=i.alternate)&&h2(i,a)}function p2(i){if(i.tag===13||i.tag===31){var a=Ca(i,67108864);a!==null&&Kr(a,i,67108864),Ry(i,67108864)}}function m2(i){if(i.tag===13||i.tag===31){var a=ao();a=bl(a);var u=Ca(i,a);u!==null&&Kr(u,i,a),Ry(i,a)}}var Fh=!0;function Tj(i,a,u,m){var y=q.T;q.T=null;var w=W.p;try{W.p=2,Oy(i,a,u,m)}finally{W.p=w,q.T=y}}function Cj(i,a,u,m){var y=q.T;q.T=null;var w=W.p;try{W.p=8,Oy(i,a,u,m)}finally{W.p=w,q.T=y}}function Oy(i,a,u,m){if(Fh){var y=Ty(m);if(y===null)fy(i,a,m,Bh,u),v2(i,m);else if(Ij(y,i,a,u,m))m.stopPropagation();else if(v2(i,m),a&4&&-1<Aj.indexOf(i)){for(;y!==null;){var w=El(y);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var N=Dt(w.pendingLanes);if(N!==0){var z=w;for(z.pendingLanes|=2,z.entangledLanes|=2;N;){var J=1<<31-Ln(N);z.entanglements[1]|=J,N&=~J}hi(w),(Ut&6)===0&&(xh=K()+500,Uu(0))}}break;case 31:case 13:z=Ca(w,2),z!==null&&Kr(z,w,2),Oh(),Ry(w,2)}if(w=Ty(m),w===null&&fy(i,a,m,Bh,u),w===y)break;y=w}y!==null&&m.stopPropagation()}else fy(i,a,m,null,u)}}function Ty(i){return i=Av(i),Cy(i)}var Bh=null;function Cy(i){if(Bh=null,i=Sl(i),i!==null){var a=s(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===31){if(i=c(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Bh=i,null}function g2(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(ne()){case ae:return 2;case Oe:return 8;case Ae:case Ie:return 32;case ke:return 268435456;default:return 32}default:return 32}}var Ay=!1,zs=null,Us=null,Fs=null,Ku=new Map,Zu=new Map,Bs=[],Aj="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 v2(i,a){switch(i){case"focusin":case"focusout":zs=null;break;case"dragenter":case"dragleave":Us=null;break;case"mouseover":case"mouseout":Fs=null;break;case"pointerover":case"pointerout":Ku.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zu.delete(a.pointerId)}}function Yu(i,a,u,m,y,w){return i===null||i.nativeEvent!==w?(i={blockedOn:a,domEventName:u,eventSystemFlags:m,nativeEvent:w,targetContainers:[y]},a!==null&&(a=El(a),a!==null&&p2(a)),i):(i.eventSystemFlags|=m,a=i.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),i)}function Ij(i,a,u,m,y){switch(a){case"focusin":return zs=Yu(zs,i,a,u,m,y),!0;case"dragenter":return Us=Yu(Us,i,a,u,m,y),!0;case"mouseover":return Fs=Yu(Fs,i,a,u,m,y),!0;case"pointerover":var w=y.pointerId;return Ku.set(w,Yu(Ku.get(w)||null,i,a,u,m,y)),!0;case"gotpointercapture":return w=y.pointerId,Zu.set(w,Yu(Zu.get(w)||null,i,a,u,m,y)),!0}return!1}function y2(i){var a=Sl(i.target);if(a!==null){var u=s(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,ME(i.priority,function(){m2(u)});return}}else if(a===31){if(a=c(u),a!==null){i.blockedOn=a,ME(i.priority,function(){m2(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Vh(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=Ty(i.nativeEvent);if(u===null){u=i.nativeEvent;var m=new u.constructor(u.type,u);Cv=m,u.target.dispatchEvent(m),Cv=null}else return a=El(u),a!==null&&p2(a),i.blockedOn=u,!1;a.shift()}return!0}function _2(i,a,u){Vh(i)&&u.delete(a)}function Pj(){Ay=!1,zs!==null&&Vh(zs)&&(zs=null),Us!==null&&Vh(Us)&&(Us=null),Fs!==null&&Vh(Fs)&&(Fs=null),Ku.forEach(_2),Zu.forEach(_2)}function Hh(i,a){i.blockedOn===a&&(i.blockedOn=null,Ay||(Ay=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Pj)))}var qh=null;function b2(i){qh!==i&&(qh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qh===i&&(qh=null);for(var a=0;a<i.length;a+=3){var u=i[a],m=i[a+1],y=i[a+2];if(typeof m!="function"){if(Cy(m||u)===null)continue;break}var w=El(u);w!==null&&(i.splice(a,3),a-=3,T0(w,{pending:!0,data:y,method:u.method,action:m},m,y))}}))}function oc(i){function a(J){return Hh(J,i)}zs!==null&&Hh(zs,i),Us!==null&&Hh(Us,i),Fs!==null&&Hh(Fs,i),Ku.forEach(a),Zu.forEach(a);for(var u=0;u<Bs.length;u++){var m=Bs[u];m.blockedOn===i&&(m.blockedOn=null)}for(;0<Bs.length&&(u=Bs[0],u.blockedOn===null);)y2(u),u.blockedOn===null&&Bs.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var y=u[m],w=u[m+1],N=y[Fr]||null;if(typeof w=="function")N||b2(u);else if(N){var z=null;if(w&&w.hasAttribute("formAction")){if(y=w,N=w[Fr]||null)z=N.formAction;else if(Cy(y)!==null)continue}else z=N.action;typeof z=="function"?u[m+1]=z:(u.splice(m,3),m-=3),b2(u)}}}function w2(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(N){return y=N})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,y=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function Iy(i){this._internalRoot=i}Gh.prototype.render=Iy.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var u=a.current,m=ao();f2(u,m,i,a,null,null)},Gh.prototype.unmount=Iy.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;f2(i.current,2,null,i,null,null),Oh(),a[wl]=null}};function Gh(i){this._internalRoot=i}Gh.prototype.unstable_scheduleHydration=function(i){if(i){var a=wv();i={blockedOn:null,target:i,priority:a};for(var u=0;u<Bs.length&&a!==0&&a<Bs[u].priority;u++);Bs.splice(u,0,i),u===0&&y2(i)}};var S2=t.version;if(S2!=="19.2.6")throw Error(r(527,S2,"19.2.6"));W.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(a),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var Mj={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kh.isDisabled&&Kh.supportsFiber)try{_t=Kh.inject(Mj),Tt=Kh}catch{}}return Qu.createRoot=function(i,a){if(!o(i))throw Error(r(299));var u=!1,m="",y=AR,w=IR,N=PR;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(w=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError)),a=u2(i,1,!1,null,null,u,m,null,y,w,N,w2),i[wl]=a.current,dy(i),new Iy(a)},Qu.hydrateRoot=function(i,a,u){if(!o(i))throw Error(r(299));var m=!1,y="",w=AR,N=IR,z=PR,J=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(N=u.onCaughtError),u.onRecoverableError!==void 0&&(z=u.onRecoverableError),u.formState!==void 0&&(J=u.formState)),a=u2(i,1,!0,a,u??null,m,y,J,w,N,z,w2),a.context=d2(null),u=a.current,m=ao(),m=bl(m),y=Ts(m),y.callback=null,Cs(u,y,m),u=m,a.current.lanes=u,Lt(a,u),hi(a),i[wl]=a.current,dy(i),new Gh(a)},Qu.version="19.2.6",Qu}var N2;function Hj(){if(N2)return My.exports;N2=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(),My.exports=Vj(),My.exports}var qj=Hj(),P=va();const ee=hl(P),Tw=kj({__proto__:null,default:ee},[P]);var $y={exports:{}},jy={};var k2;function Gj(){if(k2)return jy;k2=1;var e=va().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return jy.c=function(t){return e.H.useMemoCache(t)},jy}var D2;function Kj(){return D2||(D2=1,$y.exports=Gj()),$y.exports}var qn=Kj(),tu=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(){}},Zj=class extends tu{#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"}},Cw=new Zj,Yj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Wj=class{#e=Yj;#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)}},el=new Wj;function Qj(e){setTimeout(e,0)}var Xj=typeof window>"u"||"Deno"in globalThis;function Yn(){}function Jj(e,t){return typeof e=="function"?e(t):e}function Ib(e){return typeof e=="number"&&e>=0&&e!==1/0}function lM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function la(e,t){return typeof e=="function"?e(t):e}function fo(e,t){return typeof e=="function"?e(t):e}function L2(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Aw(l,t.options))return!1}else if(!Bd(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function $2(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(cl(t.options.mutationKey)!==cl(s))return!1}else if(!Bd(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Aw(e,t){return(t?.queryKeyHashFn||cl)(e)}function cl(e){return JSON.stringify(e,(t,n)=>Pb(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Bd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Bd(e[n],t[n])):!1}var e8=Object.prototype.hasOwnProperty;function cM(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=j2(e)&&j2(t);if(!r&&!(Pb(e)&&Pb(t)))return t;const s=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const h=r?p:l[p],g=e[h],v=t[h];if(g===v){d[h]=g,(r?p<s:e8.call(e,h))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){d[h]=v;continue}const _=cM(g,v,n+1);d[h]=_,_===g&&f++}return s===c&&f===s?e:d}function Mm(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 j2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pb(e){if(!z2(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!z2(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function z2(e){return Object.prototype.toString.call(e)==="[object Object]"}function t8(e){return new Promise(t=>{el.setTimeout(t,e)})}function Mb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?cM(e,t):t}function $ce(e){return e}function n8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function r8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Iw=Symbol();function uM(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Iw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pw(e,t){return typeof e=="function"?e(...t):!!e}function o8(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 Vd=(()=>{let e=()=>Xj;return{isServer(){return e()},setIsServer(t){e=t}}})();function Nb(){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}function i8(e){let t;if(e.then(n=>(t=n,n),Yn)?.catch(Yn),t!==void 0)return{data:t}}function dM(e){return e}function s8(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function a8(e,t,n){const r=()=>{const o=e.promise?.then(t).catch(s=>n(s)?Promise.reject(new Error("redacted")):Promise.reject(s));return o?.catch(Yn),o};return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status==="pending"&&{promise:r()},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function l8(e){return e.state.isPaused}function c8(e){return e.state.status==="success"}function u8(e){return!0}function d8(e,t={}){const n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??l8,r=e.getMutationCache().getAll().flatMap(d=>n(d)?[s8(d)]:[]),o=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??c8,s=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??u8,l=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??dM,c=e.getQueryCache().getAll().flatMap(d=>o(d)?[a8(d,l,s)]:[]);return{mutations:r,queries:c}}function f8(e,t,n){if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),o=e.getQueryCache(),s=e.getDefaultOptions().hydrate?.deserializeData??dM,l=t.mutations||[],c=t.queries||[];l.forEach(({state:d,...f})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...f},d)}),c.forEach(({queryKey:d,state:f,queryHash:p,meta:h,promise:g,dehydratedAt:v,queryType:_})=>{const b=g?i8(g):void 0,x=f.data===void 0?b?.data:f.data,S=x===void 0?x:s(x);let E=o.get(p);const T=E?.state.status==="pending",R=E?.state.fetchStatus==="fetching";if(E){const O=b&&v!==void 0&&v>E.state.dataUpdatedAt;if(f.dataUpdatedAt>E.state.dataUpdatedAt||O){const{fetchStatus:A,...I}=f;E.setState({...I,data:S,...f.status==="pending"&&S!==void 0&&{status:"success",...!R&&{fetchStatus:"idle"}}})}}else E=o.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:d,queryHash:p,meta:h,_type:_},{...f,data:S,fetchStatus:"idle",status:f.status==="pending"&&S!==void 0?"success":f.status});g&&!b&&!T&&!R&&(v===void 0||v>E.state.dataUpdatedAt)&&E.fetch(void 0,{initialPromise:Promise.resolve(g).then(s)}).catch(Yn)})}var h8=Qj;function p8(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=h8;const s=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{s(()=>{c(...d)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Qn=p8(),m8=class extends tu{#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}},Nm=new m8;function g8(e){return Math.min(1e3*2**e,3e4)}function fM(e){return(e??"online")==="online"?Nm.isOnline():!0}var kb=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function hM(e){let t=!1,n=0,r;const o=Nb(),s=()=>o.status!=="pending",l=b=>{if(!s()){const x=new kb(b);g(x),e.onCancel?.(x)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>Cw.isFocused()&&(e.networkMode==="always"||Nm.isOnline())&&e.canRun(),p=()=>fM(e.networkMode)&&e.canRun(),h=b=>{s()||(r?.(),o.resolve(b))},g=b=>{s()||(r?.(),o.reject(b))},v=()=>new Promise(b=>{r=x=>{(s()||f())&&b(x)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),_=()=>{if(s())return;let b;const x=n===0?e.initialPromise:void 0;try{b=x??e.fn()}catch(S){b=Promise.reject(S)}Promise.resolve(b).then(h).catch(S=>{if(s())return;const E=e.retry??(Vd.isServer()?0:3),T=e.retryDelay??g8,R=typeof T=="function"?T(n,S):T,O=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,S);if(t||!O){g(S);return}n++,e.onFail?.(n,S),t8(R).then(()=>f()?void 0:v()).then(()=>{t?g(S):_()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?_():v().then(_),o)}}var pM=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ib(this.gcTime)&&(this.#e=el.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vd.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(el.clearTimeout(this.#e),this.#e=void 0)}};function v8(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const h=_=>{o8(_,()=>t.signal,()=>p=!0)},g=uM(t.options,t.fetchOptions),v=async(_,b,x)=>{if(p)return Promise.reject(t.signal.reason);if(b==null&&_.pages.length)return Promise.resolve(_);const E=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:b,direction:x?"backward":"forward",meta:t.options.meta};return h(A),A})(),T=await g(E),{maxPages:R}=t.options,O=x?r8:n8;return{pages:O(_.pages,T,R),pageParams:O(_.pageParams,b,R)}};if(o&&s.length){const _=o==="backward",b=_?mM:Db,x={pages:s,pageParams:l},S=b(r,x);c=await v(x,S,_)}else{const _=e??s.length;do{const b=d===0?l[0]??r.initialPageParam:Db(r,c);if(d>0&&b==null)break;c=await v(c,b),d++}while(d<_)}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 Db(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 mM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function jce(e,t){return t?Db(e,t)!=null:!1}function zce(e,t){return!t||!e.getPreviousPageParam?!1:mM(e,t)!=null}var y8=class extends pM{#e;#t;#n;#r;#i;#o;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=F2(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=F2(this.options);t.data!==void 0&&(this.setState(U2(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=Mb(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(Yn).catch(Yn):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=>fo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Iw||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>la(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:!lM(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.#s||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 d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},o=()=>{const d=uM(this.options,t),p=(()=>{const h={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#s=!1,this.options.persister?this.options.persister(d,p,this):d(p)},l=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(d),d})();(this.#e==="infinite"?v8(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#o=hM({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:d=>{d instanceof kb&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#l({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const d=await this.#o.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#r.config.onSuccess?.(d,this),this.#r.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof kb){if(d.silent)return this.#o.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#r.config.onError?.(d,this),this.#r.config.onSettled?.(this.state.data,d,this),d}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,...gM(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...U2(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),Qn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function gM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fM(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function U2(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function F2(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 vM=class extends tu{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=Nb(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#o;#a;#s;#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),B2(this.#t,this.options)?this.#h():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lb(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lb(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),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 fo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Mm(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&V2(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||fo(this.options.enabled,this.#t)!==fo(t.enabled,this.#t)||la(this.options.staleTime,this.#t)!==la(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||fo(this.options.enabled,this.#t)!==fo(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 b8(this,n)&&(this.#r=n,this.#o=this.options,this.#i=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.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Yn)),t}#g(){this.#b();const e=la(this.options.staleTime,this.#t);if(Vd.isServer()||this.#r.isStale||!Ib(e))return;const n=lM(this.#r.dataUpdatedAt,e)+1;this.#d=el.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.#w(),this.#c=e,!(Vd.isServer()||fo(this.options.enabled,this.#t)===!1||!Ib(this.#c)||this.#c===0)&&(this.#f=el.setInterval(()=>{(this.options.refetchIntervalInBackground||Cw.isFocused())&&this.#h()},this.#c))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#d!==void 0&&(el.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(el.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#r,s=this.#i,l=this.#o,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},h=!1,g;if(t._optimisticResults){const M=this.hasListeners(),L=!M&&B2(e,t),H=M&&V2(e,n,t,r);(L||H)&&(p={...p,...gM(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:_,status:b}=p;g=p.data;let x=!1;if(t.placeholderData!==void 0&&g===void 0&&b==="pending"){let M;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(M=o.data,x=!0):M=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,M!==void 0&&(b="success",g=Mb(o?.data,M,t),h=!0)}if(t.select&&g!==void 0&&!x)if(o&&g===s?.data&&t.select===this.#u)g=this.#l;else try{this.#u=t.select,g=t.select(g),g=Mb(o?.data,g,t),this.#l=g,this.#s=null}catch(M){this.#s=M}this.#s&&(v=this.#s,g=this.#l,_=Date.now(),b="error");const S=p.fetchStatus==="fetching",E=b==="pending",T=b==="error",R=E&&S,O=g!==void 0,I={status:b,fetchStatus:p.fetchStatus,isPending:E,isSuccess:b==="success",isError:T,isInitialLoading:R,isLoading:R,data:g,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:_,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!E,isLoadingError:T&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:T&&O,isStale:Mw(e,t),refetch:this.refetch,promise:this.#a,isEnabled:fo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=I.data!==void 0,L=I.status==="error"&&!M,H=F=>{L?F.reject(I.error):M&&F.resolve(I.data)},j=()=>{const F=this.#a=I.promise=Nb();H(F)},B=this.#a;switch(B.status){case"pending":e.queryHash===n.queryHash&&H(B);break;case"fulfilled":(L||I.data!==B.value)&&j();break;case"rejected":(!L||I.error!==B.reason)&&j();break}}return I}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#o=this.options,this.#i.data!==void 0&&(this.#p=this.#t),Mm(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(l=>{const c=l;return this.#r[c]!==e[c]&&s.has(c)})};this.#E({listeners:n()})}#S(){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.#_()}#E(e){Qn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function _8(e,t){return fo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&fo(t.retryOnMount,e)===!1)}function B2(e,t){return _8(e,t)||e.state.data!==void 0&&Lb(e,t,t.refetchOnMount)}function Lb(e,t,n){if(fo(t.enabled,e)!==!1&&la(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Mw(e,t)}return!1}function V2(e,t,n,r){return(e!==t||fo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Mw(e,n)}function Mw(e,t){return fo(t.enabled,e)!==!1&&e.isStaleByTime(la(t.staleTime,e))}function b8(e,t){return!Mm(e.getCurrentResult(),t)}var w8=class extends pM{#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||yM(),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.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=hM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{this.#i({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#i({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.#i({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#i({type:"pending",context:l,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.#i({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#i({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#i(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),Qn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function yM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var S8=class extends tu{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 w8({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=Zh(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=Zh(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=Zh(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=Zh(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Qn.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=>$2(t,n))}findAll(e={}){return this.getAll().filter(t=>$2(e,t))}notify(e){Qn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Qn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Yn))))}};function Zh(e){return e.options.scope?.id}var E8=class extends tu{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#i()}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),Mm(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&cl(n.mutationKey)!==cl(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.#i(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),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)}#i(){const t=this.#n?.state??yM();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){Qn.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)})})}},x8=class extends tu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Aw(r,t);let s=this.get(o);return s||(s=new y8({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(){Qn.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=>L2(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>L2(e,n)):t}notify(e){Qn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Qn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Qn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},R8=class{#e;#t;#n;#r;#i;#o;#a;#s;constructor(e={}){this.#e=e.queryCache||new x8,this.#t=e.mutationCache||new S8,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=Cw.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Nm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=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(la(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,l=Jj(t,s);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Qn.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;Qn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Qn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Yn).catch(Yn)}invalidateQueries(e,t={}){return Qn.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=Qn.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(Yn)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Yn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(la(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Yn).catch(Yn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Yn).catch(Yn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Nm.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(cl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Bd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(cl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{Bd(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=Aw(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===Iw&&(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()}},_M=P.createContext(void 0),Nw=e=>{const t=P.useContext(_M);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},O8=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(_M.Provider,{value:e,children:t})),bM=P.createContext(!1),T8=()=>P.useContext(bM);bM.Provider;function wM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var SM=P.createContext(wM()),C8=()=>P.useContext(SM),Fce=({children:e})=>{const[t]=P.useState(()=>wM());return C.jsx(SM.Provider,{value:t,children:typeof e=="function"?e(t):e})},A8=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?Pw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},I8=e=>{P.useEffect(()=>{e.clearReset()},[e])},P8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Pw(n,[e.error,r])),M8=(e,t)=>t.state.data===void 0,N8=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))}},k8=(e,t)=>e.isLoading&&e.isFetching&&!t,D8=(e,t)=>e?.suspense&&t.isPending,H2=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function EM(e,t,n){const r=T8(),o=C8(),s=Nw(n),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=s.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",N8(l),A8(l,o,c),I8(o);const d=!s.getQueryCache().get(l.queryHash),[f]=P.useState(()=>new t(s,l)),p=f.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(g=>{const v=h?f.subscribe(Qn.batchCalls(g)):Yn;return f.updateResult(),v},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),P.useEffect(()=>{f.setOptions(l)},[l,f]),D8(l,p))throw H2(l,f,o);if(P8({result:p,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!Vd.isServer()&&k8(p,r)&&(d?H2(l,f,o):c?.promise)?.catch(Yn).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?p:f.trackResult(p)}function xM(e,t){return EM(e,vM,t)}function ff(e,t){return EM({...e,enabled:!0,suspense:!0,throwOnError:M8,placeholderData:void 0},vM,t)}function L8(e,t){const n=Nw(t),[r]=P.useState(()=>new E8(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);const o=P.useSyncExternalStore(P.useCallback(l=>r.subscribe(Qn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=P.useCallback((l,c)=>{r.mutate(l,c).catch(Yn)},[r]);if(o.error&&Pw(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const RM={publicConfig:()=>["publicConfig"],appVersionCheck:()=>["appVersionCheck"],session:()=>["session"],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],myCapabilities:e=>[e,"my-capabilities"],taskBoardItems:e=>[e,"task-board-items"],taskBoardItemPrs:(e,t)=>[e,"task-board-item-prs",t],homeGithubRecentPrs:(e,t)=>["home-github-recent-prs",e,t],homeGithubContributions:(e,t)=>["home-github-contributions",e,t],report:(e,t)=>["report",e,t??""],commerceDiscoveryConnection:(e,t)=>["commerce-discovery","connection",e,t],commerceDiscoveryDiagnostic:(e,t)=>["commerce-discovery","diagnostic",e,t],commerceDiscoveryVirtualMcp:(e,t)=>["commerce-discovery","virtual-mcp",e,t],commerceDiscoveryCompanionSchema:(e,t)=>["commerce-discovery","companion-schema",e,t],commerceDiscoveryCompanionConnections:(e,t)=>["commerce-discovery","companion-connections",e,t],commerceDiscoveryCompanionConnectionsPrefix:e=>["commerce-discovery","companion-connections",e],commerceDiscoveryCompanionRegistry:(e,t)=>["commerce-discovery","companion-registry",e,t],commerceDiscoveryCompanionOAuthStatus:(e,t)=>["commerce-discovery","companion-oauth-status",e,t],commerceDiscoveryCompanionGaProperties:(e,t)=>["commerce-discovery","companion-ga-properties",e,t],commerceDiscoveryCompanionGscSites:(e,t)=>["commerce-discovery","companion-gsc-sites",e,t],commerceDiscoveryCompanionGithubRepos:(e,t,n)=>["commerce-discovery","companion-github-repos",e,t,n],commerceDiscoveryCompanionGithubSelected:(e,t)=>["commerce-discovery","companion-github-selected",e,t],commerceDiscoveryConnectionStatus:(e,t)=>["commerce-discovery","connection-status",e,t],connectionActivity:(e,t,n)=>["monitoring","activity",e,t,n],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],mcpClientPrefix:()=>["mcp","client"],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],orgAccessStatus:e=>["org-access-status",e],modelsList:e=>["models-list",e],homeNextActions:e=>["home-next-actions",e],boardLayout:e=>["board-layout",e],agentPrompts:(e,t)=>["agent-prompts",e,t],allowedModels:e=>[e,"allowed-models"],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,r,o)=>[e,t,n,"collection",r,o],collectionList:(e,t,n,r,o)=>[e,t,n,"collection",r,"list",o],collectionListInfinite:(e,t,n,r,o)=>[e,t,n,"collection",r,"list-infinite",o],monitoringStats:()=>["monitoring","stats"],monitoringStatsToolCalls:(e,t)=>["MONITORING_STATS",e,"tool-calls",t],monitoringStatsLlm:(e,t)=>["MONITORING_STATS",e,"llm",t],monitoringThreadUsage:(e,t)=>["MONITORING_THREAD_USAGE",e,t],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringLogDetail:e=>["monitoring","log-detail",e],ensureTask:(e,t)=>["ensure-task",e,t],globalSearch:(e,t)=>["global-search",e,t],threadsInfinite:(e,t)=>["threads","list-infinite",e,t],overviewThreads:e=>["threads","overview",e],threadMessages:(e,t)=>["threads","messages",e,t],threadModelLogs:(e,t)=>["threads","model-logs",e,t],threadSandbox:(e,t)=>["thread-sandbox","v2",e,t],threadOutputs:e=>["thread-outputs",e],fileText:e=>["file-text",e],csvThumb:e=>["csv-thumb",e],virtualMcpTools:(e,t)=>["virtual-mcp",t,e??"default","tools"],toolDefinitionLookup:(e,t,n)=>["virtual-mcp",t,e??"default","tools","lookup",n],virtualMcpAgents:e=>["virtual-mcp",e,"agents"],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,n)=>[...e,t,n],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e],storeReadmeUrl:e=>["store-readme-url",e],remoteMcpTools:e=>["remote-mcp-tools",e],tags:e=>[e,"tags"],memberTags:(e,t)=>[e,"member-tags",t],automationsAll:e=>["automations",e],automations:(e,t)=>["automations",e,t??null],automation:(e,t)=>["automation",e,t],automationRuns:(e,t,n)=>["automation-runs",e,t,...[...n??[]].sort()],automationRunStats:(e,t,n)=>["automation-run-stats",e,t,n],projects:e=>["projects",e],project:(e,t)=>["project",e,t],virtualMcp:(e,t)=>["virtual-mcp",e,t],projectPluginConfigs:e=>["project-plugin-configs",e],projectPluginConfig:(e,t)=>["project-plugin-config",e,t],projectConnections:e=>["project-connections",e],projectConnectionDetails:(e,t)=>["project-connections",e,"details",t],aiProviders:e=>["ai-providers",e],aiProviderModels:(e,t)=>["ai-provider-models",e,t],aiProviderKeys:e=>["ai-provider-keys",e],aiProviderKeyPreview:e=>["ai-provider-key-preview",e],secrets:e=>["secrets",e],fileConfigs:e=>["file-configs",e],orgFsVolume:(e,t)=>["org-fs",e,t],orgFsList:(e,t,n)=>["org-fs",e,t,"list",n],orgFsUsage:(e,t)=>["org-fs",e,t,"usage"],orgFsStat:(e,t,n)=>["org-fs",e,t,"stat",n],orgFsPublicSets:e=>["org-fs-public-sets",e],orgFsRecent:e=>["org-fs-recent",e],orgFsSearchRoot:e=>["org-fs-search",e],orgFsSearch:(e,t)=>["org-fs-search",e,t],orgFsSkills:e=>["org-fs-skills",e],slashSkills:e=>["slash-skills",e],filePickerObjects:(e,t,n,r)=>["file-picker-objects",e,t,n??"",r??!1],aiProviderCredits:(e,t)=>["ai-provider-credits",e,t],orgSsoConfig:e=>["org-sso-config",e],orgSsoStatus:e=>["org-sso-status",e],storeDiscovery:(e,t)=>["store-discovery",e,t],organizationDomains:e=>["organization-domains",e],organizationJoinRequests:e=>["organization-join-requests",e],domainLookup:e=>["domain-lookup",e],deploymentAdminMe:()=>["deployment-admin","me"],deploymentAdminUsers:e=>["deployment-admin","users",e],deploymentAdminOrgs:e=>["deployment-admin","orgs",e],deploymentAdminOrgsList:()=>["deployment-admin","orgs"],brandContext:e=>["brand-context",e],defaultBrand:e=>["brand-context",e,"default"],decoProfile:e=>["deco-profile",e],decoSites:e=>["deco-sites",e],decoApps:()=>["deco-apps"],webSearchBlob:e=>["web-search-blob",e],decofile:e=>["decofile",e],liveMeta:(...e)=>["live-meta",...e],sandboxInvoke:(e,t)=>["sandbox-invoke",e,t],sandboxRepoDir:(e,t,n)=>["sandbox-repo-dir",e,t,n],linkStatus:()=>["link-status"],currentLink:e=>["current-link",e],githubUserOrgs:(e,t)=>["github-user-orgs",e,t],githubOrgRepos:(e,t,n,r)=>["github-org-repos",e,t,n,r],vmEnv:(e,t,n)=>["vm-env",e,t,n]};function Bce(e,t){e.invalidateQueries({predicate:n=>{const r=n.queryKey;return(!t||r[1]===t)&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})}function Vce(e,t){e.invalidateQueries({predicate:n=>{const r=n.queryKey;return(!t||r[1]===t)&&r[3]==="collection"&&r[4]==="CONNECTIONS"}})}function OM(){const e=qn.c(1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:RM.publicConfig(),queryFn:$8,staleTime:1/0},e[0]=t):t=e[0];const{data:n}=ff(t);return n}async function $8(){return(await(await fetch("/api/config")).json()).config}const Hce={light:"/logos/deco logo.svg",dark:"/logos/deco logo negative.svg"},TM=P.createContext(void 0);function j8(e){const t=qn.c(3),{children:n}=e,r=OM();let o;return t[0]!==n||t[1]!==r.auth?(o=C.jsx(TM.Provider,{value:r.auth,children:n}),t[0]=n,t[1]=r.auth,t[2]=o):o=t[2],o}function qce(){const e=P.useContext(TM);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}var q2=P.use,Oc=typeof window<"u"?P.useLayoutEffect:P.useEffect;function zy(e){const t=P.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function z8(e,t,n={},r={}){P.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 U8(e){const t=P.useRef(null);return P.useImperativeHandle(e,()=>t.current,[]),t}const CM=!1;function Hd(e){return e[e.length-1]}function F8(e){return typeof e=="function"}function oa(e,t){return F8(e)?e(t):e}const AM=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable;function IM(e){for(const t in e)if(AM.call(e,t))return!0;return!1}const B8=()=>Object.create(null),Fa=(e,t)=>tl(e,t,B8);function tl(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const o=t,s=Y2(e)&&Y2(o);if(!s&&!(Bc(e)&&Bc(o)))return o;const l=s?e:K2(e);if(!l)return o;const c=s?o:K2(o);if(!c)return o;const d=l.length,f=c.length,p=s?new Array(f):n();let h=0;for(let g=0;g<f;g++){const v=s?g:c[g],_=e[v],b=o[v];if(_===b){p[v]=_,(s?g<d:AM.call(e,v))&&h++;continue}if(_===null||b===null||typeof _!="object"||typeof b!="object"){p[v]=b;continue}const x=tl(_,b,n,r+1);p[v]=x,x===_&&h++}return d===f&&h===d?e:p}function K2(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!G2.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(!G2.call(e,o))return!1;r.push(o)}return r}function Bc(e){if(!Z2(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Z2(n)||!n.hasOwnProperty("isPrototypeOf"))}function Z2(e){return Object.prototype.toString.call(e)==="[object Object]"}function Y2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function il(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(!il(e[r],t[r],n))return!1;return!0}if(Bc(e)&&Bc(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!il(e[l],t[l],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&o++;let s=0;for(const l in t)if((!r||t[l]!==void 0)&&(s++,s>o||!il(e[l],t[l],n)))return!1;return o===s}return!1}function Vc(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 V8(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 qd(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function H8(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function W2(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 H8(t)}const q8=["http:","https:","mailto:","tel:"];function km(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Xu(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+=W2(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+W2(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function G8(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function K8(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 ds(){throw new Error("Invariant failed")}function Gd(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 l=t.get(s);if(l)return o(l),l.value},set(s,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const c=t.get(s);if(c)c.value=l,o(c);else{const d={key:s,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(s,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const ia=4,PM=5;function Z8(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 MM(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 l=Z8(s);if(l){const[c,d]=l,f=s.charCodeAt(c+1);if(f===45){if(c+2<s.length&&s.charCodeAt(c+2)===36){const p=c+3,h=d;if(p<h)return n[0]=3,n[1]=t+c,n[2]=t+p,n[3]=t+h,n[4]=t+d+1,n[5]=o,n}}else if(f===36){const p=c+1,h=c+2;return h===d?(n[0]=2,n[1]=t+c,n[2]=t+p,n[3]=t+h,n[4]=t+d+1,n[5]=e.length,n):(n[0]=1,n[1]=t+c,n[2]=t+h,n[3]=t+d,n[4]=t+d+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 Mg(e,t,n,r,o,s,l){l?.(n);let c=r;{const d=n.fullPath??n.from,f=d.length,p=n.options?.caseSensitive??e,h=n.options?.params?.parse??n.options?.parseParams;for(;c<f;){const v=MM(d,c,t);let _;const b=c,x=v[5];switch(c=x+1,s++,v[0]){case 0:{const S=d.substring(v[2],v[3]);if(p){const E=o.static?.get(S);if(E)_=E;else{o.static??=new Map;const T=nl(n.fullPath??n.from);T.parent=o,T.depth=s,_=T,o.static.set(S,T)}}else{const E=S.toLowerCase(),T=o.staticInsensitive?.get(E);if(T)_=T;else{o.staticInsensitive??=new Map;const R=nl(n.fullPath??n.from);R.parent=o,R.depth=s,_=R,o.staticInsensitive.set(E,R)}}break}case 1:{const S=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(S||E),R=S?T?S:S.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=!h&&o.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===O);if(A)_=A;else{const I=Fy(1,n.fullPath??n.from,T,R,O);_=I,I.depth=s,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case 3:{const S=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(S||E),R=S?T?S:S.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=!h&&o.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===O);if(A)_=A;else{const I=Fy(3,n.fullPath??n.from,T,R,O);_=I,I.parent=o,I.depth=s,o.optional??=[],o.optional.push(I)}break}case 2:{const S=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(S||E),R=S?T?S:S.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=Fy(2,n.fullPath??n.from,T,R,O);_=A,A.parent=o,A.depth=s,o.wildcard??=[],o.wildcard.push(A)}}o=_}if(h&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=nl(n.fullPath??n.from);v.kind=PM,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&&d.endsWith("/")){const v=nl(n.fullPath??n.from);v.kind=ia,v.parent=o,s++,v.depth=s,o.index=v,o=v}o.parse=h??null,g&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Mg(e,t,d,c,o,s,l)}function Uy(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;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 ea(e){if(e.pathless)for(const t of e.pathless)ea(t);if(e.static)for(const t of e.static.values())ea(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ea(t);if(e.dynamic?.length){e.dynamic.sort(Uy);for(const t of e.dynamic)ea(t)}if(e.optional?.length){e.optional.sort(Uy);for(const t of e.optional)ea(t)}if(e.wildcard?.length){e.wildcard.sort(Uy);for(const t of e.wildcard)ea(t)}}function nl(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}}function Fy(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,caseSensitive:n,prefix:r,suffix:o}}function Y8(e,t){const n=nl("/"),r=new Uint16Array(6);for(const o of e)Mg(!1,r,o,1,n,0);ea(n),t.masksTree=n,t.flatCache=Gd(1e3)}function W8(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=kw(e,t.masksTree);return t.flatCache.set(e,r),r}function Q8(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let l=o.singleCache.get(s);return l||(l=nl("/"),Mg(t,new Uint16Array(6),{from:e},1,l,0),o.singleCache.set(s,l)),kw(r,l,n)}function X8(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=kw(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)s=null;else throw l}return s&&(s.branch=kM(s.route)),t.matchCache.set(r,s),s}function J8(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function e7(e,t=!1,n){const r=nl(e.fullPath),o=new Uint16Array(6),s={},l={};let c=0;return Mg(t,o,e,1,r,0,d=>{if(n?.(d,c),d.id in s&&ds(),s[d.id]=d,c!==0&&d.path){const f=J8(d.fullPath);(!l[f]||d.fullPath.endsWith("/"))&&(l[f]=d)}c++}),ea(r),{processedTree:{segmentTree:r,singleCache:Gd(1e3),matchCache:Gd(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:l}}function kw(e,t,n=!1){const r=e.split("/"),o=n7(e,r,t,n);if(!o)return null;const[s]=NM(e,r,o);return{route:o.node.route,rawParams:s}}function NM(e,t,n){const r=t7(n.node);let o=null;const s=Object.create(null);let l=n.extract?.part??0,c=n.extract?.node??0,d=n.extract?.path??0,f=n.extract?.segment??0;for(;c<r.length;l++,c++,d++,f++){const p=r[c];if(p.kind===ia)break;if(p.kind===PM){f--,l--,d--;continue}const h=t[l],g=d;if(h&&(d+=h.length),p.kind===1){o??=n.node.fullPath.split("/");const v=o[f],_=p.prefix?.length??0;if(v.charCodeAt(_)===123){const b=p.suffix?.length??0,x=v.substring(_+2,v.length-b-1),S=h.substring(_,h.length-b);s[x]=decodeURIComponent(S)}else{const b=v.substring(1);s[b]=decodeURIComponent(h)}}else if(p.kind===3){if(n.skipped&1<<c){l--,d=g-1;continue}o??=n.node.fullPath.split("/");const v=o[f],_=p.prefix?.length??0,b=p.suffix?.length??0,x=v.substring(_+3,v.length-b-1),S=p.suffix||p.prefix?h.substring(_,h.length-b):h;S&&(s[x]=decodeURIComponent(S))}else if(p.kind===2){const v=p,_=e.substring(g+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),b=decodeURIComponent(_);s["*"]=b,s._splat=b;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:l,node:c,path:d,segment:f}]}function kM(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function t7(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function n7(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Hd(t),s=o&&e!=="/",l=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let d=null,f=null;for(;c.length;){const p=c.pop(),{node:h,index:g,skipped:v,depth:_,statics:b,dynamics:x,optionals:S}=p;let{extract:E,rawParams:T}=p;if(h.kind===2&&h.route&&!Wh(f,p))continue;if(h.parse){if(!Q2(e,t,p))continue;T=p.rawParams,E=p.extract}r&&h.route&&h.kind!==ia&&Wh(d,p)&&(d=p);const R=g===l;if(R&&(h.route&&(!s||h.kind===ia||h.kind===2)&&Wh(f,p)&&(f=p),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const O=R?void 0:t[g];let A;if(R&&h.index){const I={node:h.index,index:g,skipped:v,depth:_+1,statics:b,dynamics:x,optionals:S,extract:E,rawParams:T};let M=!0;if(h.index.parse&&(Q2(e,t,I)||(M=!1)),M){if(!x&&!S&&!v&&r7(b,l))return I;Wh(f,I)&&(f=I)}}if(h.wildcard)for(let I=h.wildcard.length-1;I>=0;I--){const M=h.wildcard[I],{prefix:L,suffix:H}=M;if(!(L&&(R||!(M.caseSensitive?O:A??=O.toLowerCase()).startsWith(L)))){if(H){if(R)continue;const j=t.slice(g).join("/").slice(-H.length);if((M.caseSensitive?j:j.toLowerCase())!==H)continue}c.push({node:M,index:l,skipped:v,depth:_+1,statics:b,dynamics:x,optionals:S,extract:E,rawParams:T})}}if(h.optional){const I=v|1<<_,M=_+1;for(let L=h.optional.length-1;L>=0;L--){const H=h.optional[L];c.push({node:H,index:g,skipped:I,depth:M,statics:b,dynamics:x,optionals:S,extract:E,rawParams:T})}if(!R)for(let L=h.optional.length-1;L>=0;L--){const H=h.optional[L],{prefix:j,suffix:B}=H;if(j||B){const F=H.caseSensitive?O:A??=O.toLowerCase();if(j&&!F.startsWith(j)||B&&!F.endsWith(B))continue}c.push({node:H,index:g+1,skipped:v,depth:M,statics:b,dynamics:x,optionals:S+Yh(l,g),extract:E,rawParams:T})}}if(!R&&h.dynamic&&O)for(let I=h.dynamic.length-1;I>=0;I--){const M=h.dynamic[I],{prefix:L,suffix:H}=M;if(L||H){const j=M.caseSensitive?O:A??=O.toLowerCase();if(L&&!j.startsWith(L)||H&&!j.endsWith(H))continue}c.push({node:M,index:g+1,skipped:v,depth:_+1,statics:b,dynamics:x+Yh(l,g),optionals:S,extract:E,rawParams:T})}if(!R&&h.staticInsensitive){const I=h.staticInsensitive.get(A??=O.toLowerCase());I&&c.push({node:I,index:g+1,skipped:v,depth:_+1,statics:b+Yh(l,g),dynamics:x,optionals:S,extract:E,rawParams:T})}if(!R&&h.static){const I=h.static.get(O);I&&c.push({node:I,index:g+1,skipped:v,depth:_+1,statics:b+Yh(l,g),dynamics:x,optionals:S,extract:E,rawParams:T})}if(h.pathless){const I=_+1;for(let M=h.pathless.length-1;M>=0;M--){const L=h.pathless[M];c.push({node:L,index:g,skipped:v,depth:I,statics:b,dynamics:x,optionals:S,extract:E,rawParams:T})}}}if(f)return f;if(r&&d){let p=d.index;for(let g=0;g<d.index;g++)p+=t[g].length;const h=p===e.length?"/":e.slice(p);return d.rawParams??=Object.create(null),d.rawParams["**"]=decodeURIComponent(h),d}return null}function Yh(e,t){return 2**(e-t-1)}function r7(e,t){return e===2**(t-1)-1}function Q2(e,t,n){let r,o;try{[r,o]=NM(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 Wh(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===ia)>(e.node.kind===ia)||t.node.kind===ia==(e.node.kind===ia)&&t.depth>e.depth))):!0}function gm(e){return Dw(e.filter(t=>t!==void 0).join("/"))}function Dw(e){return e.replace(/\/{2,}/g,"/")}function DM(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ls(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function LM(e){return ls(DM(e))}function Dm(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function o7(e,t,n){return Dm(e,n)===Dm(t,n)}function i7({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let l;if(r){l=o?t:s?e:e+"\0"+t;const f=r.get(l);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&&Hd(c)==="";)c.pop();const f=t.split("/");for(let p=0,h=f.length;p<h;p++){const g=f[p];g===""?p?p===h-1&&c.push(g):c=[g]:g===".."?c.pop():g==="."||c.push(g)}}c.length>1&&(Hd(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));const d=Dw(c.join("/"))||"/";return l&&r&&r.set(l,d),d}function s7(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 By(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=>J2(o,n)).join("/"):J2(r,n)}function X2({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 l=e.length;let c=0,d,f="";for(;c<l;){const p=c;d=MM(e,p,d);const h=d[5];if(c=h+1,p===h)continue;const g=d[0];if(g===0){f+="/"+e.substring(p,h);continue}if(g===2){const v=t._splat;s._splat=v,s["*"]=v;const _=e.substring(p,d[1]),b=e.substring(d[4],h);if(!v){o=!0,(_||b)&&(f+="/"+_+b);continue}const x=By("_splat",t,n);f+="/"+_+x+b;continue}if(g===1){const v=e.substring(d[2],d[3]);!o&&!(v in t)&&(o=!0),s[v]=t[v];const _=e.substring(p,d[1]),b=e.substring(d[4],h),x=By(v,t,n)??"undefined";f+="/"+_+x+b;continue}if(g===3){const v=e.substring(d[2],d[3]),_=t[v];if(_==null)continue;s[v]=_;const b=e.substring(p,d[1]),x=e.substring(d[4],h),S=By(v,t,n)??"";f+="/"+b+S+x;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:o}}function J2(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function $M(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Cr(e){return e?.isNotFound===!0}function a7(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const l7="tsr-scroll-restoration-v1_3";function c7(){const e=a7();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Bc(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=oa(r,t)||t},persist:()=>{try{e.setItem(l7,JSON.stringify(t))}catch{}}}}const eT=c7(),u7=e=>e.state.__TSR_key||e.href;function d7(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Qh=!1;const Ju="window",tT="data-scroll-restoration-id";function f7(e,t){if(!eT)return;const n=eT;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Qh=!1;const r=e.options.getScrollRestorationKey||u7,o=new Map;window.history.scrollRestoration="manual";const s=c=>{if(!(Qh||!e.isScrollRestoring))if(c.target===document||c.target===window)o.set(Ju,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const d=c.target;o.set(d,{scrollX:d.scrollLeft||0,scrollY:d.scrollTop||0})}},l=c=>{if(!e.isScrollRestoring||!c||o.size===0||!n)return;const d=n.state[c]||={};for(const[f,p]of o){let h;if(f===Ju)h=Ju;else if(f.isConnected){const g=f.getAttribute(tT);h=g?`[${tT}="${g}"]`:d7(f)}h&&(d[h]=p)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?r(c.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{l(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",c=>{const d=r(c.toLocation),f=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Qh=!0;try{const h=e.isScrollRestoring?n.state[d]:void 0;let g=!1;if(h)for(const v in h){const _=h[v];if(!Bc(_))continue;const{scrollX:b,scrollY:x}=_;if(!(!Number.isFinite(b)||!Number.isFinite(x))){if(v===Ju)window.scrollTo({top:x,left:b,behavior:f}),g=!0;else if(v){let S;try{S=document.querySelector(v)}catch{continue}S&&(S.scrollLeft=b,S.scrollTop=x,g=!0)}}}if(!g){const v=e.history.location.hash.slice(1);if(v){const _=window.history.state?.__hashScrollIntoViewOptions??!0;if(_){const b=document.getElementById(v);b&&b.scrollIntoView(_)}}else{const _={top:0,left:0,behavior:f};if(window.scrollTo(_),p)for(const b of p){if(b===Ju)continue;const x=typeof b=="function"?b():document.querySelector(b);x&&x.scrollTo(_)}}}}finally{Qh=!1}e.isScrollRestoring&&n.set(h=>(h[d]||={},h))}})}function h7(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 Vy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function p7(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]=Vy(o):Array.isArray(s)?s.push(Vy(o)):n[r]=[s,Vy(o)]}return n}const m7=v7(JSON.parse),g7=y7(JSON.stringify,JSON.parse);function v7(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=p7(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function y7(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=h7(o,r);return s?`?${s}`:""}}const sl="__root__";function sa(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 Xr(e){return e instanceof Response&&!!e.options}function _7(e){return{input:({url:t})=>{for(const n of e)t=$b(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=jM(e[n],t);return t}}}function b7(e){const t=LM(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===o?l.pathname="/":c.startsWith(s)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=gm(["/",t,l.pathname]),l)}}function $b(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 jM(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 w7(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:o,init:s}=t,l=new Map,c=new Map,d=new Map,f=n(e.status),p=n(e.loadedAt),h=n(e.isLoading),g=n(e.isTransitioning),v=n(e.location),_=n(e.resolvedLocation),b=n(e.statusCode),x=n(e.redirect),S=n([]),E=n([]),T=n([]),R=r(()=>Hy(l,S.get())),O=r(()=>Hy(c,E.get())),A=r(()=>Hy(d,T.get())),I=r(()=>S.get()[0]),M=r(()=>S.get().some(W=>l.get(W)?.get().status==="pending")),L=r(()=>({locationHref:v.get().href,resolvedLocationHref:_.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:h.get(),isTransitioning:g.get(),matches:R.get(),location:v.get(),resolvedLocation:_.get(),statusCode:b.get(),redirect:x.get()})),j=Gd(64);function B(W){let te=j.get(W);return te||(te=r(()=>{const le=S.get();for(const Q of le){const k=l.get(Q);if(k&&k.routeId===W)return k.get()}}),j.set(W,te)),te}const F={status:f,loadedAt:p,isLoading:h,isTransitioning:g,location:v,resolvedLocation:_,statusCode:b,redirect:x,matchesId:S,pendingIds:E,cachedIds:T,matches:R,pendingMatches:O,cachedMatches:A,firstId:I,hasPending:M,matchRouteDeps:L,matchStores:l,pendingMatchStores:c,cachedMatchStores:d,__store:H,getRouteMatchStore:B,setMatches:Z,setPending:ie,setCached:q};Z(e.matches),s?.(F);function Z(W){qy(W,l,S,n,o)}function ie(W){qy(W,c,E,n,o)}function q(W){qy(W,d,T,n,o)}return F}function Hy(e,t){const n=[];for(const r of t){const o=e.get(r);o&&n.push(o.get())}return n}function qy(e,t,n,r,o){const s=e.map(c=>c.id),l=new Set(s);o(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const d=t.get(c.id);if(!d){const f=r(c);f.routeId=c.routeId,t.set(c.id,f);continue}d.routeId=c.routeId,d.get()!==c&&d.set(c)}K8(n.get(),s)||n.set(s)})}const jb=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},S7=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ng=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),al=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const l=e.matches[s];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(r,c.__routeContext,c.__beforeLoadContext)}return r},nT=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(l=>l.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let l=s;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return n?s:o},aa=(e,t,n)=>{if(!(!Xr(n)&&!Cr(n)))throw Xr(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:Xr(n)?"redirected":Cr(n)?"notFound":r.status==="pending"?"success":r.status,context:al(e,t.index),isFetching:!1,error:n})),Cr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Xr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},zM=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},rT=(e,t,n)=>{const r=al(e,n);e.updateMatch(t,o=>({...o,context:r}))},ed=(e,t,n,r)=>{const{id:o,routeId:s}=e.matches[t],l=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,aa(e,e.router.getMatch(o),n);try{l.options.onError?.(n)}catch(c){n=c,aa(e,e.router.getMatch(o),n)}e.updateMatch(o,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Xr(n)&&!Cr(n)&&(e.serialError??=n)},UM=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ng(e,t)&&(n.options.loader||n.options.beforeLoad||BM(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const s=setTimeout(()=>{jb(e)},o);r._nonReactive.pendingTimeout=s}},E7=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;UM(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&aa(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},x7=(e,t,n,r)=>{const o=e.router.getMatch(t);let s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Vc(()=>{s?.resolve(),s=void 0});const{paramsError:l,searchError:c}=o;l&&ed(e,n,l,"PARSE_PARAMS"),c&&ed(e,n,c,"VALIDATE_SEARCH"),UM(e,t,r,o);const d=new AbortController;let f=!1;const p=()=>{f||(f=!0,e.updateMatch(t,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:d})))},h=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,R=>({...R,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{p(),h()});return}o._nonReactive.beforeLoadPromise=Vc();const g={...al(e,n,!1),...o.__routeContext},{search:v,params:_,cause:b}=o,x=Ng(e,t),S={search:v,abortController:d,params:_,preload:x,context:g,location:e.location,navigate:R=>e.router.navigate({...R,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:x?"preload":b,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},E=R=>{if(R===void 0){e.router.batch(()=>{p(),h()});return}(Xr(R)||Cr(R))&&(p(),ed(e,n,R,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,O=>({...O,__beforeLoadContext:R})),h()})};let T;try{if(T=r.options.beforeLoad(S),qd(T))return p(),T.catch(R=>{ed(e,n,R,"BEFORE_LOAD")}).then(E)}catch(R){p(),ed(e,n,R,"BEFORE_LOAD")}E(T)},R7=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>c(),l=()=>x7(e,n,t,o),c=()=>{if(zM(e,n))return;const d=E7(e,n,o);return qd(d)?d.then(l):l()};return s()},O7=(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,l,c])=>({meta:s?.meta,links:s?.links,headScripts:s?.scripts,headers:c,scripts:l,styles:s?.styles}))},FM=(e,t,n,r,o)=>{const s=t[r-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(n),p=al(e,r),h=Ng(e,n);return{params:l,deps:c,preload:!!h,parentMatchPromise:s,abortController:d,context:p,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:h?"preload":f,route:o,...e.router.options.additionalContext}},oT=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(CM??e.router.isServer)||s.ssr===!0)&&Kd(o);const l=o.options.loader,c=typeof l=="function"?l:l?.handler,d=c?.(FM(e,t,n,r,o)),f=!!c&&qd(d);if((f||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,h=>({...h,isFetching:"loader"})),c){const h=f?await d:d;aa(e,e.router.getMatch(n),h),h!==void 0&&e.updateMatch(n,g=>({...g,loaderData:h}))}o._lazyPromise&&await o._lazyPromise;const p=s._nonReactive.minPendingPromise;p&&await p,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,h=>({...h,error:void 0,context:al(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;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:al(e,r)}));return}const d=s._nonReactive.minPendingPromise;d&&await d,Cr(l)&&await o.options.notFoundComponent?.preload?.(),aa(e,e.router.getMatch(n),l);try{o.options.onError?.(l)}catch(f){c=f,aa(e,e.router.getMatch(n),f)}!Xr(c)&&!Cr(c)&&await Kd(o,["errorComponent"]),e.updateMatch(n,f=>({...f,error:c,context:al(e,r),status:"error",isFetching:!1}))}}catch(s){const l=e.router.getMatch(n);l&&(l._nonReactive.loaderPromise=void 0),aa(e,l,s)}},T7=async(e,t,n)=>{async function r(v,_,b,x,S){const E=Date.now()-_.updatedAt,T=v?S.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:S.options.staleTime??e.router.options.defaultStaleTime??0,R=S.options.shouldReload,O=typeof R=="function"?R(FM(e,t,o,n,S)):R,{status:A,invalid:I}=x,M=E>=T&&(!!e.forceStaleReload||x.cause==="enter"||b!==void 0&&b!==x.id);l=A==="success"&&(I||(O??M)),v&&S.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{try{await oT(e,t,o,n,S);const L=e.router.getMatch(o);L._nonReactive.loaderPromise?.resolve(),L._nonReactive.loadPromise?.resolve(),L._nonReactive.loaderPromise=void 0,L._nonReactive.loadPromise=void 0}catch(L){Xr(L)&&await e.router.navigate(L.options)}})()):A!=="success"||l?await oT(e,t,o,n,S):rT(e,o,n))}const{id:o,routeId:s}=e.matches[n];let l=!1,c=!1;const d=e.router.looseRoutesById[s],f=d.options.loader,p=((typeof f=="function"?void 0:f?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(zM(e,o)){if(!e.router.getMatch(o))return e.matches[n];rT(e,o,n)}else{const v=e.router.getMatch(o),_=e.router.stores.matchesId.get()[n],b=(_&&e.router.stores.matchStores.get(_)||null)?.routeId===s?_:e.router.stores.matches.get().find(S=>S.routeId===s)?.id,x=Ng(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&p)return v;await v._nonReactive.loaderPromise;const S=e.router.getMatch(o),E=S._nonReactive.error||S.error;E&&aa(e,S,E),S.status==="pending"&&await r(x,v,b,S,d)}else{const S=x&&!e.router.stores.matchStores.has(o),E=e.router.getMatch(o);E._nonReactive.loaderPromise=Vc(),S!==E.preload&&e.updateMatch(o,T=>({...T,preload:S})),await r(x,v,b,E,d)}}const h=e.router.getMatch(o);c||(h._nonReactive.loaderPromise?.resolve(),h._nonReactive.loadPromise?.resolve(),h._nonReactive.loadPromise=void 0),clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,c||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;const g=c?h.isFetching:!1;return g!==h.isFetching||h.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:g,invalid:!1})),e.router.getMatch(o)):h};async function iT(e){const t=e,n=[];S7(t.router)&&jb(t);let r;for(let g=0;g<t.matches.length;g++){try{const v=R7(t,g);qd(v)&&await v}catch(v){if(Xr(v))throw v;if(Cr(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?nT(t,r):void 0,l=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let c,d;for(let g=0;g<l;g++)n.push(T7(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 _=v.reason;if(Xr(_))throw _;Cr(_)?c??=_:d??=_}if(d!==void 0)throw d}const f=c??(r&&!t.preload?r:void 0);let p=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const g=nT(t,f);g===void 0&&ds();const v=t.matches[g],_=t.router.looseRoutesById[v.routeId],b=t.router.options?.defaultNotFoundComponent;!_.options.notFoundComponent&&b&&(_.options.notFoundComponent=b),f.routeId=v.routeId;const x=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,S=>({...S,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=g,await Kd(_,["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 Kd(g,["errorComponent"])}for(let g=0;g<=p;g++){const{id:v,routeId:_}=t.matches[g],b=t.router.looseRoutesById[_];try{const x=O7(t,v,b);if(x){const S=await x;t.updateMatch(v,E=>({...E,...S}))}}catch(x){console.error(`Error executing head for route ${_}:`,x)}}const h=jb(t);if(qd(h)&&await h,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function sT(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Kd(e,t=vm){!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===vm?(()=>{if(e._componentsPromise===void 0){const r=sT(e,vm);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():sT(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function BM(e){for(const t of vm)if(e.options[t]?.preload)return!0;return!1}const vm=["component","errorComponent","pendingComponent","notFoundComponent"];var ca="__TSR_index",aT="popstate",lT="beforeunload";function C7(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:l}))},o=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},s=async({task:l,navigateOpts:c,...d})=>{if(c?.ignoreBlocker??!1){l();return}const f=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const h of f){const g=Lm(d.path,d.state);if(await h.blockerFn({currentLocation:t,nextLocation:g,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,c,d)=>{const f=t.state[ca];c=cT(f+1,c),s({task:()=>{e.pushState(l,c),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:c})},replace:(l,c,d)=>{const f=t.state[ca];c=cT(f,c),s({task:()=>{e.replaceState(l,c),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:c})},go:(l,c)=>{s({task:()=>{e.go(l),o({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{s({task:()=>{e.back(l?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{s({task:()=>{e.forward(l?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[ca]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function cT(e,t){t||(t={});const n=Lw();return{...t,key:n,__TSR_key:n,[ca]:e}}function A7(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,l=M=>o=M,c=(M=>M),d=(()=>Lm(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const M=Lw();t.history.replaceState({[ca]:0,key:M,__TSR_key:M},"")}let f=d(),p,h=!1,g=!1,v=!1,_=!1;const b=()=>f;let x,S;const E=()=>{x&&(I._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),I._ignoreSubscribers=!1,x=void 0,S=void 0,p=void 0)},T=(M,L,H)=>{const j=c(L);S||(p=f),f=Lm(L,H),x={href:j,state:H,isPush:x?.isPush||M==="push"},S||(S=Promise.resolve().then(()=>E()))},R=M=>{f=d(),I.notify({type:M})},O=async()=>{if(g){g=!1;return}const M=d(),L=M.state[ca]-f.state[ca],H=L===1,j=L===-1,B=!H&&!j||h;h=!1;const F=B?"GO":j?"BACK":"FORWARD",Z=B?{type:"GO",index:L}:{type:j?"BACK":"FORWARD"};if(v)v=!1;else{const ie=s();if(typeof document<"u"&&ie.length){for(const q of ie)if(await q.blockerFn({currentLocation:f,nextLocation:M,action:F})){g=!0,t.history.go(1),I.notify(Z);return}}}f=d(),I.notify(Z)},A=M=>{if(_){_=!1;return}let L=!1;const H=s();if(typeof document<"u"&&H.length)for(const j of H){const B=j.enableBeforeUnload??!0;if(B===!0){L=!0;break}if(typeof B=="function"&&B()===!0){L=!0;break}}if(L)return M.preventDefault(),M.returnValue=""},I=C7({getLocation:b,getLength:()=>t.history.length,pushState:(M,L)=>T("push",M,L),replaceState:(M,L)=>T("replace",M,L),back:M=>(M&&(v=!0),_=!0,t.history.back()),forward:M=>{M&&(v=!0),_=!0,t.history.forward()},go:M=>{h=!0,t.history.go(M)},createHref:M=>c(M),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(lT,A,{capture:!0}),t.removeEventListener(aT,O)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:s,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(lT,A,{capture:!0}),t.addEventListener(aT,O),t.history.pushState=function(...M){const L=n.apply(t.history,M);return I._ignoreSubscribers||R("PUSH"),L},t.history.replaceState=function(...M){const L=r.apply(t.history,M);return I._ignoreSubscribers||R("REPLACE"),L},I}function I7(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Lm(e,t){const n=I7(e),r=n.indexOf("#"),o=n.indexOf("?"),s=Lw();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||{[ca]:0,key:s,__TSR_key:s}}}function Lw(){return(Math.random()+1).toString(36).substring(7)}function Nc(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 P7=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,l=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=s7(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=A7()),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 p;this.resolvePathCache=Gd(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=w7(N7(this.latestLocation),p),f7(this)}let c=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(s||o!==d||l!==f){this.basepath=d;const p=[],h=LM(d);h&&h!=="/"&&p.push(b7({basepath:d})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:_7(p),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=e7(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&Y8(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:d,search:f,hash:p,href:h,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(d)){const S=this.options.parseSearch(f),E=this.options.stringifySearch(S);return{href:d+E+p,publicHref:d+E+p,pathname:Xu(d).path,external:!1,searchStr:E,search:Fa(r?.search,S),hash:Xu(p.slice(1)).path,state:tl(r?.state,g)}}const v=new URL(h,this.origin),_=$b(this.rewrite,v),b=this.options.parseSearch(_.search),x=this.options.stringifySearch(b);return _.search=x,{href:_.href.replace(_.origin,""),publicHref:h,pathname:Xu(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:x,search:Fa(r?.search,b),hash:Xu(_.hash.slice(1)).path,state:tl(r?.state,g)}},s=o(n),{__tempLocation:l,__tempKey:c}=s.state;if(l&&(!c||c===this.tempLocationKey)){const d=o(l);return d.state.key=s.state.key,d.state.__TSR_key=s.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>i7({base:n,to:r.includes("//")?Dw(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=>k7({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 l=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);s.from;const d=s.unsafeRelative==="path"?l.pathname:s.from??c.fullPath,f=s.to?`${s.to}`:void 0,p=c.search,h=Object.assign(Object.create(null),c.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(d,"."),v=f?this.resolvePathWithBase(g,f):g,_=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?h:Object.assign(h,oa(s.params,h)),b=this.routesByPath[ls(v)];let x;if(b)x=this.getRouteBranch(b);else if(v.includes("$"))x=[];else{const j=this.getMatchedRoutes(v);x=j.matchedRoutes,this.options.notFoundRoute&&(!j.foundRoute||j.foundRoute.path!=="/"&&j.routeParams["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&IM(_))for(const j of x){const B=j.options.params?.stringify??j.options.stringifyParams;if(B)try{Object.assign(_,B(_))}catch{}}const S=n.leaveParams?v:Xu(X2({path:v,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const j={};x.forEach(B=>{if(B.options.validateSearch)try{Object.assign(j,ym(B.options.validateSearch,{...j,...E}))}catch{}}),E=j}E=D7({search:E,dest:s,destRoutes:x,_includeValidateSearch:n._includeValidateSearch}),E=Fa(p,E);const T=this.options.stringifySearch(E),R=s.hash===!0?l.hash:s.hash?oa(s.hash,l.hash):void 0,O=R?`#${R}`:"";let A=s.state===!0?l.state:s.state?oa(s.state,l.state):{};A=tl(l.state,A);const I=`${S}${T}${O}`;let M,L,H=!1;if(this.rewrite){const j=new URL(I,this.origin),B=jM(this.rewrite,j);M=j.href.replace(j.origin,""),B.origin!==this.origin?(L=B.href,H=!0):L=B.pathname+B.search+B.hash}else M=G8(I),L=M;return{publicHref:L,href:M,pathname:S,search:E,searchStr:T,state:A,hash:R??"",external:H,unmaskOnReload:s.unmaskOnReload}},o=(s={},l)=>{const c=r(s);let d=l?r(l):void 0;if(!d){const f=Object.create(null);if(this.options.routeMasks){const p=W8(c.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:h,params:g,...v}=p.route,_=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,oa(g,f));l={from:n.from,...v,params:_},d=r(l)}}}return d&&(c.maskedLocation=d),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{const s=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{o.state[p]=this.latestLocation.state[p]});const f=il(o.state,this.latestLocation.state);return d.forEach(p=>{delete o.state[p]}),f},l=ls(this.latestLocation.href)===ls(o.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Vc(()=>{c?.resolve(),c=void 0}),l&&s())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...p}=o;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:l,href:c,...d}={})=>{if(c){const h=this.history.location.state.__TSR_index,g=Lm(c,{__TSR_index:n?h:h+1}),v=new URL(g.pathname,this.origin);d.to=$b(this.rewrite,v).pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const p=this.commitLocation({...f,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...l})=>{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,...l});o=o??f.publicHref,s=s??f.publicHref}const d=!c&&s?s:o;if(km(d,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,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=>{let r,o,s;const l=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,p=Nc(f,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await iT({router:this,sync:n?.sync,forceStaleReload:l.href===f.href,matches:this.stores.pendingMatches.get(),location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let h=null,g=null,v=null,_=null;this.batch(()=>{const b=this.stores.pendingMatches.get(),x=b.length,S=this.stores.matches.get();h=x?S.filter(R=>!this.stores.pendingMatchStores.has(R.id)):null;const E=new Set;for(const R of this.stores.pendingMatchStores.values())R.routeId&&E.add(R.routeId);const T=new Set;for(const R of this.stores.matchStores.values())R.routeId&&T.add(R.routeId);g=x?S.filter(R=>!E.has(R.routeId)):null,v=x?b.filter(R=>!T.has(R.routeId)):null,_=x?b.filter(R=>T.has(R.routeId)):S,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),x&&(this.stores.setMatches(b),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(R=>R.status!=="error"&&R.status!=="notFound"&&R.status!=="redirected")]),this.clearExpiredCache())});for(const[b,x]of[[g,"onLeave"],[v,"onEnter"],[_,"onStay"]])if(b)for(const S of b)this.looseRoutesById[S.routeId].options[x]?.(S)})})}})}catch(f){Xr(f)?(r=f,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Cr(f)&&(o=f);const p=r?r.status:o?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(p),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(d=>d.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},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,l=this.stores.resolvedLocation.get(),c=typeof r.types=="function"?r.types(Nc(s,l)):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 l=this.stores.cachedMatchStores.get(n);if(l){const c=r(l.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(d=>d.filter(f=>f!==n)):l.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&&km(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 l=(o.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=l};this.clearCache({filter:r})},this.loadRouteChunk=Kd,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()]),l=new Set([...s,...this.stores.cachedIds.get()]),c=o.filter(d=>!l.has(d.id));if(c.length){const d=this.stores.cachedMatches.get();this.stores.setCached([...d,...c])}try{return o=await iT({router:this,matches:o,location:r,preload:!0,updateMatch:(d,f)=>{s.has(d)?o=o.map(p=>p.id===d?f(p):p):this.updateMatch(d,f)}}),o}catch(d){if(Xr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:r});Cr(d)||console.error(d);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 l=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=Q8(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,l.pathname,this.processedTree);return!c||n.params&&!il(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?il(l.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??g7,parseSearch:e.parseSearch??m7,protocolAllowlist:e.protocolAllowlist??q8}),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=kM(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,l=!1;(r?r.path!=="/"&&o["**"]:ls(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:l=!0);const c=l?$7(this.options.notFoundMode,s):void 0,d=new Array(s.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<s.length;p++){const h=s[p],g=d[p-1];let v,_,b;{const B=g?.search??e.search,F=g?._strictSearch??void 0;try{const Z=ym(h.options.validateSearch,{...B})??void 0;v={...B,...Z},_={...F,...Z},b=void 0}catch(Z){let ie=Z;if(Z instanceof $m||(ie=new $m(Z.message,{cause:Z})),t?.throwOnError)throw ie;v=B,_={},b=ie}}const x=h.options.loaderDeps?.({search:v})??"",S=x?JSON.stringify(x):"",{interpolatedPath:E,usedParams:T}=X2({path:h.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),R=h.id+E+S,O=this.getMatch(R),A=f.get(h.id),I=O?._strictParams??T;let M;if(!O)try{uT(h,I)}catch(B){if(Cr(B)||Xr(B)?M=B:M=new M7(B.message,{cause:B}),t?.throwOnError)throw M}Object.assign(o,I);const L=A?"stay":"enter";let H;if(O)H={...O,cause:L,params:A?.params??o,_strictParams:I,search:Fa(A?A.search:O.search,v),_strictSearch:_};else{const B=h.options.loader||h.options.beforeLoad||h.lazyFn||BM(h)?"pending":"success";H={id:R,ssr:h.options.ssr,index:p,routeId:h.id,params:A?.params??o,_strictParams:I,pathname:E,updatedAt:Date.now(),search:A?Fa(A.search,v):v,_strictSearch:_,searchError:void 0,status:B,isFetching:!1,error:void 0,paramsError:M,__routeContext:void 0,_nonReactive:{loadPromise:Vc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:A?tl(A.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}t?.preload||(H.globalNotFound=c===h.id),H.searchError=b;const j=this.getParentContext(g);H.context={...j,...H.__routeContext,...H.__beforeLoadContext},d[p]=H}for(let p=0;p<d.length;p++){const h=d[p],g=this.looseRoutesById[h.routeId],v=this.getMatch(h.id),_=f.get(h.routeId);if(h.params=_?Fa(_.params,o):o,!v){const b=d[p-1],x=this.getParentContext(b);if(g.options.context){const S={deps:h.loaderDeps,params:h.params,context:x??{},location:e,navigate:E=>this.navigate({...E,_fromLocation:e}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:d,routeId:g.id};h.__routeContext=g.options.context(S)??void 0}h.context={...x,...h.__routeContext,...h.__beforeLoadContext}}}return d}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=Hd(t),o={...e.search};for(const f of t)try{Object.assign(o,ym(f.options.validateSearch,o))}catch{}const s=Hd(this.stores.matchesId.get()),l=s&&this.stores.matchStores.get(s)?.get(),c=l&&l.routeId===r.id&&l.pathname===e.pathname;let d;if(c)d=l.params;else{const f=Object.assign(Object.create(null),n);for(const p of t)try{uT(p,f)}catch{}d=f}return{matchedRoutes:t,fullPath:r.fullPath,search:o,params:d}}},$m=class extends Error{},M7=class extends Error{};function N7(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function ym(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new $m("Async validation not supported");if(n.issues)throw new $m(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 k7({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),o=ls(e);let s;const l=X8(o,n,!0);return l&&(s=l.route,Object.assign(r,l.rawParams)),{matchedRoutes:l?.branch||[t.__root__],routeParams:r,foundRoute:s}}function D7({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return L7(n)(e,t,r??!1)}function L7(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const s=({search:l,next:c})=>{let d=l;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(d=o.options.preSearchFilters.reduce((p,h)=>h(p),l));const f=c(d);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,h)=>h(p),f):f};t.middlewares.push(s)}if(o.options.validateSearch){const s=({search:l,next:c})=>{const d=c(l);if(!t._includeValidateSearch)return d;try{return{...d,...ym(o.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(s)}}const n=({search:o})=>{const s=t.dest;return s.search?s.search===!0?o:oa(s.search,o):{}};t.middlewares.push(n);const r=(o,s,l)=>{if(o>=l.length)return s;const c=l[o];return c({search:s,next:f=>r(o+1,f,l)})};return function(s,l,c){return t.dest=l,t._includeValidateSearch=c,r(0,s,t.middlewares)}}function $7(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 sl}function uT(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 j7="Error preloading route! ☝️";var VM=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=sl:this.parentRoute||ds();let o=r?sl:n?.path;o&&o!=="/"&&(o=DM(o));const s=n?.id||o;let l=r?sl:gm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);o==="__root__"&&(o="/"),l!=="__root__"&&(l=gm(["/",l]));const c=l==="__root__"?"/":gm([this.parentRoute.fullPath,o]);this._path=o,this._id=l,this._fullPath=c,this._to=ls(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=>sa({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.")}},z7=class{constructor({id:e}){this.notFound=t=>$M({routeId:this.id,...t}),this.redirect=t=>sa({from:this.id,...t}),this.id=e}},U7=class extends VM{constructor(e){super(e)}};function F7(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function $w(e){const t=e.errorComponent??jw;return C.jsx(B7,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?P.createElement(t,{error:n,reset:r}):e.children})}var B7=class extends P.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 jw({error:e}){const[t,n]=P.useState(!1);return C.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[C.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[C.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),C.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"})]}),C.jsx("div",{style:{height:".25rem"}}),t?C.jsx("div",{children:C.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?C.jsx("code",{children:e.message}):null})}):null]})}function V7({children:e,fallback:t=null}){return HM()?C.jsx(ee.Fragment,{children:e}):C.jsx(ee.Fragment,{children:t})}function HM(){return ee.useSyncExternalStore(H7,()=>!0,()=>!1)}function H7(){return()=>{}}var qM=P.createContext(null);function zr(e){return P.useContext(qM)}var kg=P.createContext(void 0),q7=P.createContext(void 0),pn=(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))(pn||{});function G7({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:l,shallowPropagate:c};function r(f,p,h){const g=p.depsTail;if(g!==void 0&&g.dep===f)return;const v=g!==void 0?g.nextDep:p.deps;if(v!==void 0&&v.dep===f){v.version=h,p.depsTail=v;return}const _=f.subsTail;if(_!==void 0&&_.version===h&&_.sub===p)return;const b=p.depsTail=f.subsTail={version:h,dep:f,sub:p,prevDep:g,nextDep:v,prevSub:_,nextSub:void 0};v!==void 0&&(v.prevDep=b),g!==void 0?g.nextDep=b:p.deps=b,_!==void 0?_.nextSub=b:f.subs=b}function o(f,p=f.sub){const h=f.dep,g=f.prevDep,v=f.nextDep,_=f.nextSub,b=f.prevSub;return v!==void 0?v.prevDep=g:p.depsTail=g,g!==void 0?g.nextDep=v:p.deps=v,_!==void 0?_.prevSub=b:h.subsTail=b,b!==void 0?b.nextSub=_:(h.subs=_)===void 0&&n(h),v}function s(f){let p=f.nextSub,h;e:do{const g=f.sub;let v=g.flags;if(v&60?v&12?v&4?!(v&48)&&d(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 _=g.subs;if(_!==void 0){const b=(f=_).nextSub;b!==void 0&&(h={value:p,prev:h},p=b);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;h!==void 0;)if(f=h.value,h=h.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function l(f,p){let h,g=0,v=!1;e:do{const _=f.dep,b=_.flags;if(p.flags&16)v=!0;else if((b&17)===17){if(e(_)){const x=_.subs;x.nextSub!==void 0&&c(x),v=!0}}else if((b&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(h={value:f,prev:h}),f=_.deps,p=_,++g;continue}if(!v){const x=f.nextDep;if(x!==void 0){f=x;continue}}for(;g--;){const x=p.subs,S=x.nextSub!==void 0;if(S?(f=h.value,h=h.prev):f=x,v){if(e(p)){S&&c(x),p=f.sub;continue}v=!1}else p.flags&=-33;p=f.sub;const E=f.nextDep;if(E!==void 0){f=E;continue e}}return v}while(!0)}function c(f){do{const p=f.sub,h=p.flags;(h&48)===32&&(p.flags=h|16,(h&6)===2&&t(p))}while((f=f.nextSub)!==void 0)}function d(f,p){let h=p.depsTail;for(;h!==void 0;){if(h===f)return!0;h=h.prevDep}return!1}}function K7(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 zb=[];let _m=0;const{link:dT,unlink:Z7,propagate:Y7,checkDirty:GM,shallowPropagate:fT}=G7({update(e){return e._update()},notify(e){zb[Ub++]=e,e.flags&=~pn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=pn.Mutable|pn.Dirty,jm(e))}});let Xh=0,Ub=0,vi,Fb=0;function KM(e){try{++Fb,e()}finally{--Fb||ZM()}}function jm(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Z7(n,e)}function ZM(){if(!(Fb>0)){for(;Xh<Ub;){const e=zb[Xh];zb[Xh++]=void 0,e.notify()}Xh=0,Ub=0}}function hT(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?pn.None:pn.Mutable,get(){return vi!==void 0&&dT(o,vi,_m),o._snapshot},subscribe(s){const l=K7(s),c={current:!1},d=W7(()=>{o.get(),c.current?l.next?.(o._snapshot):c.current=!0});return{unsubscribe:()=>{d.stop()}}},_update(s){const l=vi,c=t?.compare??Object.is;if(n)vi=o,++_m,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=pn.Mutable|pn.RecursedCheck);try{const d=o._snapshot,f=typeof s=="function"?s(d):s===void 0&&n?r(d):s;return d===void 0||!c(d,f)?(o._snapshot=f,!0):!1}finally{vi=l,n&&(o.flags&=~pn.RecursedCheck),jm(o)}}};return n?(o.flags=pn.Mutable|pn.Dirty,o.get=function(){const s=o.flags;if(s&pn.Dirty||s&pn.Pending&&GM(o.deps,o)){if(o._update()){const l=o.subs;l!==void 0&&fT(l)}}else s&pn.Pending&&(o.flags=s&~pn.Pending);return vi!==void 0&&dT(o,vi,_m),o._snapshot}):o.set=function(s){if(o._update(s)){const l=o.subs;l!==void 0&&(Y7(l),fT(l),ZM())}},o}function W7(e){const t=()=>{const r=vi;vi=n,++_m,n.depsTail=void 0,n.flags=pn.Watching|pn.RecursedCheck;try{return e()}finally{vi=r,n.flags&=~pn.RecursedCheck,jm(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:pn.Watching|pn.RecursedCheck,notify(){const r=this.flags;r&pn.Dirty||r&pn.Pending&&GM(this.deps,this)?t():this.flags=pn.Watching},stop(){this.flags=pn.None,this.depsTail=void 0,jm(this)}};return t(),n}var Gy={exports:{}},Ky={},Zy={exports:{}},Yy={};var pT;function Q7(){if(pT)return Yy;pT=1;var e=va();function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(h,g){var v=g(),_=r({inst:{value:v,getSnapshot:g}}),b=_[0].inst,x=_[1];return s(function(){b.value=v,b.getSnapshot=g,d(b)&&x({inst:b})},[h,v,g]),o(function(){return d(b)&&x({inst:b}),h(function(){d(b)&&x({inst:b})})},[h]),l(v),v}function d(h){var g=h.getSnapshot;h=h.value;try{var v=g();return!n(h,v)}catch{return!0}}function f(h,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Yy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Yy}var mT;function YM(){return mT||(mT=1,Zy.exports=Q7()),Zy.exports}var gT;function X7(){if(gT)return Ky;gT=1;var e=va(),t=YM();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return Ky.useSyncExternalStoreWithSelector=function(f,p,h,g,v){var _=s(null);if(_.current===null){var b={hasValue:!1,value:null};_.current=b}else b=_.current;_=c(function(){function S(A){if(!E){if(E=!0,T=A,A=g(A),v!==void 0&&b.hasValue){var I=b.value;if(v(I,A))return R=I}return R=A}if(I=R,r(T,A))return I;var M=g(A);return v!==void 0&&v(I,M)?(T=A,I):(T=A,R=M)}var E=!1,T,R,O=h===void 0?null:h;return[function(){return S(p())},O===null?void 0:function(){return S(O())}]},[p,h,g,v]);var x=o(f,_[0],_[1]);return l(function(){b.hasValue=!0,b.value=x},[x]),d(x),x},Ky}var vT;function J7(){return vT||(vT=1,Gy.exports=X7()),Gy.exports}var e9=J7();function t9(e,t){return e===t}function bo(e,t,n=t9){const r=P.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),o=P.useCallback(()=>e?.get(),[e]);return e9.useSyncExternalStoreWithSelector(r,o,o,t,n)}var n9={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function ya(e){const t=zr(),n=P.useContext(e.from?q7:kg),r=e.from??n,o=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=P.useRef(void 0);return bo(o??n9,l=>{if((e.shouldThrow??!0)&&!l&&ds(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const d=tl(s.current,c);return s.current=d,d}return c})}function zw(e){return ya({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Uw(e){const{select:t,...n}=e;return ya({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Dg(e){return ya({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 Fw(e){return ya({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function hf(e){const t=zr();return P.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Gce(e){const t=zr(),n=hf(),r=P.useRef(null);return Oc(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function Bw(e){return ya({...e,select:t=>e.select?e.select(t.context):t.context})}var Lg=aM();const WM=hl(Lg);function r9(e,t){const n=zr(),r=U8(t),{activeProps:o,inactiveProps:s,activeOptions:l,to:c,preload:d,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:h,replace:g,startTransition:v,resetScroll:_,viewTransition:b,children:x,target:S,disabled:E,style:T,className:R,onClick:O,onBlur:A,onFocus:I,onMouseEnter:M,onMouseLeave:L,onTouchStart:H,ignoreBlocker:j,params:B,search:F,hash:Z,state:ie,mask:q,reloadDocument:W,unsafeRelative:te,from:le,_fromLocation:Q,...k}=e,G=HM(),V=P.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),D=bo(n.stores.location,ne=>ne,(ne,ae)=>ne.href===ae.href),U=P.useMemo(()=>{const ne={_fromLocation:D,...V};return n.buildLocation(ne)},[n,D,V]),X=U.maskedLocation?U.maskedLocation.publicHref:U.publicHref,fe=U.maskedLocation?U.maskedLocation.external:U.external,pe=P.useMemo(()=>c9(X,fe,n.history,E),[E,fe,X,n.history]),xe=P.useMemo(()=>{if(pe?.external)return km(pe.href,n.protocolAllowlist)?void 0:pe.href;if(!u9(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),km(c,n.protocolAllowlist)?void 0:c}catch{}},[c,pe,n.protocolAllowlist]),je=P.useMemo(()=>{if(xe)return!1;if(l?.exact){if(!o7(D.pathname,U.pathname,n.basepath))return!1}else{const ne=Dm(D.pathname,n.basepath),ae=Dm(U.pathname,n.basepath);if(!(ne.startsWith(ae)&&(ne.length===ae.length||ne[ae.length]==="/")))return!1}return(l?.includeSearch??!0)&&!il(D.search,U.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?G&&D.hash===U.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,D,xe,G,U.hash,U.pathname,U.search,n.basepath]),Y=je?oa(o,{})??o9:Wy,re=je?Wy:oa(s,{})??Wy,ve=[R,Y.className,re.className].filter(Boolean).join(" "),se=(T||Y.style||re.style)&&{...T,...Y.style,...re.style},[Se,Te]=P.useState(!1),tt=P.useRef(!1),rt=e.reloadDocument||xe?!1:d??n.options.defaultPreload,Be=f??n.options.defaultPreloadDelay??0,Qe=P.useCallback(()=>{n.preloadRoute({...V,_builtLocation:U}).catch(ne=>{console.warn(ne),console.warn(j7)})},[n,V,U]);z8(r,P.useCallback(ne=>{ne?.isIntersecting&&Qe()},[Qe]),l9,{disabled:!!E||rt!=="viewport"}),P.useEffect(()=>{tt.current||!E&&rt==="render"&&(Qe(),tt.current=!0)},[E,Qe,rt]);const Me=ne=>{const ae=ne.currentTarget.getAttribute("target"),Oe=S!==void 0?S:ae;if(!E&&!d9(ne)&&!ne.defaultPrevented&&(!Oe||Oe==="_self")&&ne.button===0){ne.preventDefault(),Lg.flushSync(()=>{Te(!0)});const Ae=n.subscribe("onResolved",()=>{Ae(),Te(!1)});n.navigate({...V,replace:g,resetScroll:_,hashScrollIntoView:h,startTransition:v,viewTransition:b,ignoreBlocker:j})}};if(xe)return{...k,ref:r,href:xe,...x&&{children:x},...S&&{target:S},...E&&{disabled:E},...T&&{style:T},...R&&{className:R},...O&&{onClick:O},...A&&{onBlur:A},...I&&{onFocus:I},...M&&{onMouseEnter:M},...L&&{onMouseLeave:L},...H&&{onTouchStart:H}};const Pe=ne=>{if(E||rt!=="intent")return;if(!Be){Qe();return}const ae=ne.currentTarget;if(td.has(ae))return;const Oe=setTimeout(()=>{td.delete(ae),Qe()},Be);td.set(ae,Oe)},Fe=ne=>{E||rt!=="intent"||Qe()},K=ne=>{if(E||!rt||!Be)return;const ae=ne.currentTarget,Oe=td.get(ae);Oe&&(clearTimeout(Oe),td.delete(ae))};return{...k,...Y,...re,href:pe?.href,ref:r,onClick:ic([O,Me]),onBlur:ic([A,K]),onFocus:ic([I,Pe]),onMouseEnter:ic([M,Pe]),onMouseLeave:ic([L,K]),onTouchStart:ic([H,Fe]),disabled:!!E,target:S,...se&&{style:se},...ve&&{className:ve},...E&&i9,...je&&s9,...G&&Se&&a9}}var Wy={},o9={className:"active"},i9={role:"link","aria-disabled":!0},s9={"data-status":"active","aria-current":"page"},a9={"data-transitioning":"transitioning"},td=new WeakMap,l9={rootMargin:"100px"},ic=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function c9(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function u9(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var pf=P.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=r9(r,t),l=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:c,...d}=s;return P.createElement("a",d,l)}return P.createElement(n,s,l)});function d9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Kce(e){return new f9({id:e})}var f9=class extends z7{constructor({id:e}){super({id:e}),this.useMatch=t=>ya({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Bw({...t,from:this.id}),this.useSearch=t=>Fw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Dg({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Uw({...t,from:this.id,strict:!1}),this.useLoaderData=t=>zw({...t,from:this.id,strict:!1}),this.useNavigate=()=>hf({from:zr().routesById[this.id].fullPath}),this.notFound=t=>$M({routeId:this.id,...t}),this.Link=ee.forwardRef((t,n)=>{const r=zr().routesById[this.id].fullPath;return C.jsx(pf,{ref:n,from:r,...t})})}},h9=class extends VM{constructor(e){super(e),this.useMatch=t=>ya({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Bw({...t,from:this.id}),this.useSearch=t=>Fw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Dg({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Uw({...t,from:this.id}),this.useLoaderData=t=>zw({...t,from:this.id}),this.useNavigate=()=>hf({from:this.fullPath}),this.Link=ee.forwardRef((t,n)=>C.jsx(pf,{ref:n,from:this.fullPath,...t}))}};function it(e){return new h9(e)}var p9=class extends U7{constructor(e){super(e),this.useMatch=t=>ya({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Bw({...t,from:this.id}),this.useSearch=t=>Fw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Dg({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Uw({...t,from:this.id}),this.useLoaderData=t=>zw({...t,from:this.id}),this.useNavigate=()=>hf({from:this.fullPath}),this.Link=ee.forwardRef((t,n)=>C.jsx(pf,{ref:n,from:this.fullPath,...t}))}};function m9(e){return new p9(e)}function dt(e,t){let n,r,o,s;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d.default}).catch(d=>{if(o=d,V8(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(q2)q2(l());else throw l();return P.createElement(r,f)};return c.preload=l,c}function g9(e){const t=zr(),n=`not-found-${bo(t.stores.location,r=>r.pathname)}-${bo(t.stores.status,r=>r)}`;return C.jsx($w,{getResetKey:()=>n,onCatch:(r,o)=>{if(Cr(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Cr(r))return e.fallback?.(r);throw r},children:e.children})}function v9(){return C.jsx("p",{children:"Not Found"})}function wc(e){return C.jsx(C.Fragment,{children:e.children})}function QM(e,t,n){return t.options.notFoundComponent?C.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?C.jsx(e.options.defaultNotFoundComponent,{...n}):C.jsx(v9,{})}function y9(e){return null}function _9(){return y9(zr()),null}var XM=P.memo(function({matchId:t}){const n=zr(),r=n.stores.matchStores.get(t);r||ds();const o=bo(n.stores.loadedAt,l=>l),s=bo(r,l=>l);return C.jsx(b9,{router:n,matchId:t,resetKey:o,matchState:P.useMemo(()=>{const l=s.routeId,c=n.routesById[l].parentRoute?.id;return{routeId:l,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:c}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function b9({router:e,matchId:t,resetKey:n,matchState:r}){const o=e.routesById[r.routeId],s=o.options.pendingComponent??e.options.defaultPendingComponent,l=s?C.jsx(s,{}):null,c=o.options.errorComponent??e.options.defaultErrorComponent,d=o.options.onCatch??e.options.defaultOnCatch,f=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",h=(!o.isRoot||o.options.wrapInSuspense||p)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||p))?P.Suspense:wc,g=c?$w:wc,v=f?g9:wc;return C.jsxs(o.isRoot?o.options.shellComponent??wc:wc,{children:[C.jsx(kg.Provider,{value:t,children:C.jsx(h,{fallback:l,children:C.jsx(g,{getResetKey:()=>n,errorComponent:c||jw,onCatch:(_,b)=>{if(Cr(_))throw _.routeId??=r.routeId,_;d?.(_,b)},children:C.jsx(v,{fallback:_=>{if(_.routeId??=r.routeId,!f||_.routeId&&_.routeId!==r.routeId||!_.routeId&&!o.isRoot)throw _;return P.createElement(f,_)},children:p||r._displayPending?C.jsx(V7,{fallback:l,children:C.jsx(yT,{matchId:t})}):C.jsx(yT,{matchId:t})})})})}),r.parentRouteId===sl?C.jsxs(C.Fragment,{children:[C.jsx(w9,{resetKey:n}),e.options.scrollRestoration&&CM?C.jsx(_9,{}):null]}):null]})}function w9({resetKey:e}){const t=zr(),n=P.useRef(void 0);return Oc(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Nc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var yT=P.memo(function({matchId:t}){const n=zr(),r=(p,h)=>n.getMatch(p.id)?._nonReactive[h]??p._nonReactive[h],o=n.stores.matchStores.get(t);o||ds();const s=bo(o,p=>p),l=s.routeId,c=n.routesById[l],d=P.useMemo(()=>{const p=(n.routesById[l].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:l,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return p?JSON.stringify(p):void 0},[l,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=P.useMemo(()=>{const p=c.options.component??n.options.defaultComponent;return p?C.jsx(p,{},d):C.jsx(JM,{})},[d,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 p=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const h=n.getMatch(s.id);if(h&&!h._nonReactive.minPendingPromise){const g=Vc();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},p)}}throw r(s,"loadPromise")}if(s.status==="notFound")return Cr(s.error)||ds(),QM(n,c,s.error);if(s.status==="redirected")throw Xr(s.error)||ds(),r(s,"loadPromise");if(s.status==="error")throw s.error;return f}),JM=P.memo(function(){const t=zr(),n=P.useContext(kg);let r,o=!1,s;{const f=n?t.stores.matchStores.get(n):void 0;[r,o]=bo(f,p=>[p?.routeId,p?.globalNotFound??!1]),s=bo(t.stores.matchesId,p=>p[p.findIndex(h=>h===n)+1])}const l=r?t.routesById[r]:void 0,c=t.options.defaultPendingComponent?C.jsx(t.options.defaultPendingComponent,{}):null;if(o)return l||ds(),QM(t,l,void 0);if(!s)return null;const d=C.jsx(XM,{matchId:s});return r===sl?C.jsx(P.Suspense,{fallback:c,children:d}):d});function S9(){const e=zr(),t=P.useRef({router:e,mounted:!1}),[n,r]=P.useState(!1),o=bo(e.stores.isLoading,h=>h),s=bo(e.stores.hasPending,h=>h),l=zy(o),c=o||n||s,d=zy(c),f=o||s,p=zy(f);return e.startTransition=h=>{r(!0),P.startTransition(()=>{h(),r(!1)})},P.useEffect(()=>{const h=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ls(e.latestLocation.publicHref)!==ls(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{h()}},[e,e.history]),Oc(()=>{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]),Oc(()=>{l&&!o&&e.emit({type:"onLoad",...Nc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,o]),Oc(()=>{p&&!f&&e.emit({type:"onBeforeRouteMount",...Nc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,p,e]),Oc(()=>{if(d&&!c){const h=Nc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...h}),KM(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),h.hrefChanged&&F7(e)}},[c,d,e]),null}function E9(){const e=zr(),t=e.routesById[sl].options.pendingComponent??e.options.defaultPendingComponent,n=t?C.jsx(t,{}):null,r=C.jsxs(typeof document<"u"&&e.ssr?wc:P.Suspense,{fallback:n,children:[C.jsx(S9,{}),C.jsx(x9,{})]});return e.options.InnerWrap?C.jsx(e.options.InnerWrap,{children:r}):r}function x9(){const e=zr(),t=bo(e.stores.firstId,o=>o),n=bo(e.stores.loadedAt,o=>o),r=t?C.jsx(XM,{matchId:t}):null;return C.jsx(kg.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:C.jsx($w,{getResetKey:()=>n,errorComponent:jw,onCatch:void 0,children:r})})}var R9=e=>({createMutableStore:hT,createReadonlyStore:hT,batch:KM}),O9=e=>new T9(e),T9=class extends P7{constructor(e){super(e,R9)}};function C9({router:e,children:t,...n}){IM(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=C.jsx(qM.Provider,{value:e,children:t});return e.options.Wrap?C.jsx(e.options.Wrap,{children:r}):r}function A9({router:e,...t}){return C.jsx(C9,{router:e,...t,children:C.jsx(E9,{})})}var I9={},_T={};const bm=Object.create(null),nd=e=>I9||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?bm:globalThis),Do=new Proxy(bm,{get(e,t){return nd()[t]??bm[t]},has(e,t){return t in nd()||t in bm},set(e,t,n){const r=nd(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=nd(!0);return delete n[t],!0},ownKeys(){const e=nd(!0);return Object.keys(e)}});function Fn(e,t){return typeof process<"u"&&_T?_T[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const rd=1,or=4,bi=8,mo=24,bT={eterm:or,cons25:or,console:or,cygwin:or,dtterm:or,gnome:or,hurd:or,jfbterm:or,konsole:or,kterm:or,mlterm:or,mosh:mo,putty:or,st:or,"rxvt-unicode-24bit":mo,terminator:mo,"xterm-kitty":mo},P9=new Map(Object.entries({APPVEYOR:bi,BUILDKITE:bi,CIRCLECI:mo,DRONE:bi,GITEA_ACTIONS:mo,GITHUB_ACTIONS:mo,GITLAB_CI:bi,TRAVIS:bi})),M9=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function N9(){if(Fn("FORCE_COLOR")!==void 0)switch(Fn("FORCE_COLOR")){case"":case"1":case"true":return or;case"2":return bi;case"3":return mo;default:return rd}if(Fn("NODE_DISABLE_COLORS")!==void 0&&Fn("NODE_DISABLE_COLORS")!==""||Fn("NO_COLOR")!==void 0&&Fn("NO_COLOR")!==""||Fn("TERM")==="dumb")return rd;if(Fn("TMUX"))return mo;if("TF_BUILD"in Do&&"AGENT_NAME"in Do)return or;if("CI"in Do){for(const{0:e,1:t}of P9)if(e in Do)return t;return Fn("CI_NAME")==="codeship"?bi:rd}if("TEAMCITY_VERSION"in Do)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Fn("TEAMCITY_VERSION"))!==null?or:rd;switch(Fn("TERM_PROGRAM")){case"iTerm.app":return!Fn("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Fn("TERM_PROGRAM_VERSION"))!==null?bi:mo;case"HyperTerm":case"MacTerm":return mo;case"Apple_Terminal":return bi}if(Fn("COLORTERM")==="truecolor"||Fn("COLORTERM")==="24bit")return mo;if(Fn("TERM")){if(/truecolor/.exec(Fn("TERM"))!==null)return mo;if(/^xterm-256/.exec(Fn("TERM"))!==null)return bi;const e=Fn("TERM").toLowerCase();if(bT[e])return bT[e];if(M9.some(t=>t.exec(e)!==null))return or}return Fn("COLORTERM")?or:rd}const wi={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},Bb=["debug","info","success","warn","error"];function k9(e,t){return Bb.indexOf(t)>=Bb.indexOf(e)}const D9={info:wi.fg.blue,success:wi.fg.green,warn:wi.fg.yellow,error:wi.fg.red,debug:wi.fg.magenta},L9=(e,t,n)=>{const r=new Date().toISOString();return n?`${wi.dim}${r}${wi.reset} ${D9[e]}${e.toUpperCase()}${wi.reset} ${wi.bright}[Better Auth]:${wi.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},$9=e=>{const t="warn",n=N9()!==1,r=(o,s,l=[])=>{if(!k9(t,o))return;const c=L9(o,s,n);{o==="error"?console.error(c,...l):o==="warn"?console.warn(c,...l):console.log(c,...l);return}};return{...Object.fromEntries(Bb.map(o=>[o,(...[s,...l])=>r(o,s,l)])),get level(){return t}}};$9();const j9=Object.freeze({status:"aborted"});function ye(e,t,n){function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);const f=l.prototype,p=Object.keys(f);for(let h=0;h<p.length;h++){const g=p[h];g in c||(c[g]=f[g].bind(c))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function l(c){var d;const f=n?.Parent?new s:this;r(f,c),(d=f._zod).deferred??(d.deferred=[]);for(const p of f._zod.deferred)p();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class kc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e3 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const t3={};function ha(e){return t3}function n3(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 Vb(e,t){return typeof t=="bigint"?t.toString():t}function $g(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function mf(e){return e==null}function Vw(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function z9(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(o=Number.parseInt(d[1]))}const s=n>o?n:o,l=Number.parseInt(e.toFixed(s).replace(".","")),c=Number.parseInt(t.toFixed(s).replace(".",""));return l%c/10**s}const wT=Symbol("evaluating");function It(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==wT)return r===void 0&&(r=wT,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function pl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _a(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function ST(e){return JSON.stringify(e)}function U9(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const r3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Zd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const F9=$g(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Hc(e){if(Zd(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Zd(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function o3(e){return Hc(e)?{...e}:Array.isArray(e)?[...e]:e}const B9=new Set(["string","number","symbol"]);function qc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ba(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Ue(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 V9(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const H9={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]};function q9(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=_a(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return pl(this,"shape",l),l},checks:[]});return ba(e,s)}function G9(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=_a(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return pl(this,"shape",l),l},checks:[]});return ba(e,s)}function K9(e,t){if(!Hc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(s,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=_a(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return pl(this,"shape",s),s}});return ba(e,o)}function Z9(e,t){if(!Hc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=_a(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return pl(this,"shape",r),r}});return ba(e,n)}function Y9(e,t){const n=_a(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return pl(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return ba(e,n)}function W9(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=_a(t._zod.def,{get shape(){const c=t._zod.def.shape,d={...c};if(n)for(const f in n){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f in c)d[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return pl(this,"shape",d),d},checks:[]});return ba(t,l)}function Q9(e,t,n){const r=_a(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(s[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)s[l]=new e({type:"nonoptional",innerType:o[l]});return pl(this,"shape",s),s}});return ba(t,r)}function Tc(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 rl(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Jh(e){return typeof e=="string"?e:e?.message}function pa(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Jh(e.inst?._zod.def?.error?.(e))??Jh(t?.error?.(e))??Jh(n.customError?.(e))??Jh(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function i3(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Hw(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Yd(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const s3=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Vb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},qw=ye("$ZodError",s3),jg=ye("$ZodError",s3,{Parent:Error});function X9(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function J9(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>r({issues:l}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let l=n,c=0;for(;c<s.path.length;){const d=s.path[c];c===s.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(s))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}};return r(e),n}const zg=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new kc;if(l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>pa(d,s,ha())));throw r3(c,o?.callee),c}return l.value},ez=zg(jg),Ug=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>pa(d,s,ha())));throw r3(c,o?.callee),c}return l.value},tz=Ug(jg),Fg=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 kc;return s.issues.length?{success:!1,error:new(e??qw)(s.issues.map(l=>pa(l,o,ha())))}:{success:!0,data:s.value}},nz=Fg(jg),Bg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>pa(l,o,ha())))}:{success:!0,data:s.value}},rz=Bg(jg),oz=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zg(e)(t,n,o)},iz=e=>(t,n,r)=>zg(e)(t,n,r),sz=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ug(e)(t,n,o)},az=e=>async(t,n,r)=>Ug(e)(t,n,r),lz=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Fg(e)(t,n,o)},cz=e=>(t,n,r)=>Fg(e)(t,n,r),uz=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Bg(e)(t,n,o)},dz=e=>async(t,n,r)=>Bg(e)(t,n,r),fz=/^[cC][^\s-]{8,}$/,hz=/^[0-9a-z]+$/,pz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mz=/^[0-9a-vA-V]{20}$/,gz=/^[A-Za-z0-9]{27}$/,vz=/^[a-zA-Z0-9_-]{21}$/,yz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_z=/^([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})$/,ET=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)$/,bz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Sz(){return new RegExp(wz,"u")}const Ez=/^(?:(?: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])$/,xz=/^(([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}|:))$/,Rz=/^((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])$/,Oz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,a3=/^[A-Za-z0-9_-]*$/,Cz=/^\+[1-9]\d{6,14}$/,l3="(?:(?:\\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])))",Az=new RegExp(`^${l3}$`);function c3(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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Iz(e){return new RegExp(`^${c3(e)}$`)}function Pz(e){const t=c3({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${l3}T(?:${r})$`)}const Mz=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Nz=/^-?\d+$/,u3=/^-?\d+(?:\.\d+)?$/,kz=/^(?:true|false)$/i,Dz=/^null$/i,Lz=/^undefined$/i,$z=/^[^A-Z]*$/,jz=/^[^a-z]*$/,yr=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),d3={number:"number",bigint:"bigint",object:"date"},f3=ye("$ZodCheckLessThan",(e,t)=>{yr.init(e,t);const n=d3[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin: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})}}),h3=ye("$ZodCheckGreaterThan",(e,t)=>{yr.init(e,t);const n=d3[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin: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})}}),zz=ye("$ZodCheckMultipleOf",(e,t)=>{yr.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),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"?n.value%t.value===BigInt(0):z9(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})}}),Uz=ye("$ZodCheckNumberFormat",(e,t)=>{yr.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=H9[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=o,c.maximum=s,n&&(c.pattern=Nz)}),e._zod.check=l=>{const c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.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}):l.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&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Fz=ye("$ZodCheckMaxSize",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;o.size<=t.maximum||r.issues.push({origin:i3(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Bz=ye("$ZodCheckMinSize",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;o.size>=t.minimum||r.issues.push({origin:i3(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vz=ye("$ZodCheckMaxLength",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=Hw(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Hz=ye("$ZodCheckMinLength",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=Hw(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qz=ye("$ZodCheckLengthEquals",(e,t)=>{var n;yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!mf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const l=Hw(o),c=s>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Vg=ye("$ZodCheckStringFormat",(e,t)=>{var n,r;yr.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),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=()=>{})}),Gz=ye("$ZodCheckRegex",(e,t)=>{Vg.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})}}),Kz=ye("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=$z),Vg.init(e,t)}),Zz=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=jz),Vg.init(e,t)}),Yz=ye("$ZodCheckIncludes",(e,t)=>{yr.init(e,t);const n=qc(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(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})}}),Wz=ye("$ZodCheckStartsWith",(e,t)=>{yr.init(e,t);const n=new RegExp(`^${qc(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(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})}}),Qz=ye("$ZodCheckEndsWith",(e,t)=>{yr.init(e,t);const n=new RegExp(`.*${qc(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(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})}}),Xz=ye("$ZodCheckMimeType",(e,t)=>{yr.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Jz=ye("$ZodCheckOverwrite",(e,t)=>{yr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class eU{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
11
11
|
`).filter(l=>l),o=Math.min(...r.map(l=>l.length-l.trimStart().length)),s=r.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of s)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
|
|
12
|
-
`))}}const tU={major:4,minor:3,patch:6},Bt=ye("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tU;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,c,d)=>{let f=Tc(l),p;for(const h of c){if(h._zod.def.when){if(!h._zod.def.when(l))continue}else if(f)continue;const g=l.issues.length,v=h._zod.check(l);if(v instanceof Promise&&d?.async===!1)throw new kc;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,l.issues.length!==g&&(f||(f=Tc(l,g)))});else{if(l.issues.length===g)continue;f||(f=Tc(l,g))}}return p?p.then(()=>l):l},s=(l,c,d)=>{if(Tc(l))return l.aborted=!0,l;const f=o(c,r,d);if(f instanceof Promise){if(d.async===!1)throw new kc;return f.then(p=>e._zod.parse(p,d))}return e._zod.parse(f,d)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(p=>s(p,l,c)):s(f,l,c)}const d=e._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new kc;return d.then(f=>o(f,r,c))}return o(d,r,c)}}It(e,"~standard",()=>({validate:o=>{try{const s=
|
|
12
|
+
`))}}const tU={major:4,minor:3,patch:6},Bt=ye("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tU;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,c,d)=>{let f=Tc(l),p;for(const h of c){if(h._zod.def.when){if(!h._zod.def.when(l))continue}else if(f)continue;const g=l.issues.length,v=h._zod.check(l);if(v instanceof Promise&&d?.async===!1)throw new kc;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,l.issues.length!==g&&(f||(f=Tc(l,g)))});else{if(l.issues.length===g)continue;f||(f=Tc(l,g))}}return p?p.then(()=>l):l},s=(l,c,d)=>{if(Tc(l))return l.aborted=!0,l;const f=o(c,r,d);if(f instanceof Promise){if(d.async===!1)throw new kc;return f.then(p=>e._zod.parse(p,d))}return e._zod.parse(f,d)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(p=>s(p,l,c)):s(f,l,c)}const d=e._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new kc;return d.then(f=>o(f,r,c))}return o(d,r,c)}}It(e,"~standard",()=>({validate:o=>{try{const s=nz(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return rz(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Gw=ye("$ZodString",(e,t)=>{Bt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Mz(e._zod.bag),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}}),gn=ye("$ZodStringFormat",(e,t)=>{Vg.init(e,t),Gw.init(e,t)}),nU=ye("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=_z),gn.init(e,t)}),rU=ye("$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=ET(r))}else t.pattern??(t.pattern=ET());gn.init(e,t)}),oU=ye("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=bz),gn.init(e,t)}),iU=ye("$ZodURL",(e,t)=>{gn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.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&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),sU=ye("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Sz()),gn.init(e,t)}),aU=ye("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=vz),gn.init(e,t)}),lU=ye("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=fz),gn.init(e,t)}),cU=ye("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=hz),gn.init(e,t)}),uU=ye("$ZodULID",(e,t)=>{t.pattern??(t.pattern=pz),gn.init(e,t)}),dU=ye("$ZodXID",(e,t)=>{t.pattern??(t.pattern=mz),gn.init(e,t)}),fU=ye("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=gz),gn.init(e,t)}),hU=ye("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Pz(t)),gn.init(e,t)}),pU=ye("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Az),gn.init(e,t)}),mU=ye("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Iz(t)),gn.init(e,t)}),gU=ye("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=yz),gn.init(e,t)}),vU=ye("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ez),gn.init(e,t),e._zod.bag.format="ipv4"}),yU=ye("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=xz),gn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),_U=ye("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Rz),gn.init(e,t)}),bU=ye("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Oz),gn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const l=Number(s);if(`${l}`!==s)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function p3(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const wU=ye("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Tz),gn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{p3(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function SU(e){if(!a3.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return p3(n)}const EU=ye("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=a3),gn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{SU(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),xU=ye("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Cz),gn.init(e,t)});function RU(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 OU=ye("$ZodJWT",(e,t)=>{gn.init(e,t),e._zod.check=n=>{RU(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),m3=ye("$ZodNumber",(e,t)=>{Bt.init(e,t),e._zod.pattern=e._zod.bag.pattern??u3,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:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),TU=ye("$ZodNumberFormat",(e,t)=>{Uz.init(e,t),m3.init(e,t)}),CU=ye("$ZodBoolean",(e,t)=>{Bt.init(e,t),e._zod.pattern=kz,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}}),AU=ye("$ZodUndefined",(e,t)=>{Bt.init(e,t),e._zod.pattern=Lz,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{const o=n.value;return typeof o>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),n}}),IU=ye("$ZodNull",(e,t)=>{Bt.init(e,t),e._zod.pattern=Dz,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}}),PU=ye("$ZodAny",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),MU=ye("$ZodUnknown",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),NU=ye("$ZodNever",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function xT(e,t,n){e.issues.length&&t.issues.push(...rl(n,e.issues)),t.value[n]=e.value}const kU=ye("$ZodArray",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let l=0;l<o.length;l++){const c=o[l],d=t.element._zod.run({value:c,issues:[]},r);d instanceof Promise?s.push(d.then(f=>xT(f,n,l))):xT(d,n,l)}return s.length?Promise.all(s).then(()=>n):n}});function zm(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...rl(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function g3(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=V9(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function v3(e,t,n,r,o,s){const l=[],c=o.keySet,d=o.catchall._zod,f=d.def.type,p=d.optout==="optional";for(const h in t){if(c.has(h))continue;if(f==="never"){l.push(h);continue}const g=d.run({value:t[h],issues:[]},r);g instanceof Promise?e.push(g.then(v=>zm(v,n,h,t,p))):zm(g,n,h,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const DU=ye("$ZodObject",(e,t)=>{if(Bt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...c};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=$g(()=>g3(t));It(e._zod,"propValues",()=>{const c=t.shape,d={};for(const f in c){const p=c[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(const h of p.values)d[f].add(h)}}return d});const o=Zd,s=t.catchall;let l;e._zod.parse=(c,d)=>{l??(l=r.value);const f=c.value;if(!o(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value={};const p=[],h=l.shape;for(const g of l.keys){const v=h[g],_=v._zod.optout==="optional",b=v._zod.run({value:f[g],issues:[]},d);b instanceof Promise?p.push(b.then(x=>zm(x,c,g,f,_))):zm(b,c,g,f,_)}return s?v3(p,f,c,d,r.value,e):p.length?Promise.all(p).then(()=>c):c}}),LU=ye("$ZodObjectJIT",(e,t)=>{DU.init(e,t);const n=e._zod.parse,r=$g(()=>g3(t)),o=g=>{const v=new eU(["shape","payload","ctx"]),_=r.value,b=T=>{const R=ST(T);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};v.write("const input = payload.value;");const x=Object.create(null);let S=0;for(const T of _.keys)x[T]=`key_${S++}`;v.write("const newResult = {};");for(const T of _.keys){const R=x[T],O=ST(T),I=g[T]?._zod?.optout==="optional";v.write(`const ${R} = ${b(T)};`),I?v.write(`
|
|
13
13
|
if (${R}.issues.length) {
|
|
14
14
|
if (${O} in input) {
|
|
15
15
|
payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
|
|
@@ -43,9 +43,9 @@ Error generating stack: `+m.message+`
|
|
|
43
43
|
newResult[${O}] = ${R}.value;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
`)}v.write("payload.value = newResult;"),v.write("return payload;");const E=v.compile();return(T,R)=>E(g,T,R)};let s;const l=Zd,c=!t3.jitless,f=c&&Fz.value,p=t.catchall;let h;e._zod.parse=(g,v)=>{h??(h=r.value);const _=g.value;return l(_)?c&&f&&v?.async===!1&&v.jitless!==!0?(s||(s=o(t.shape)),g=s(g,v),p?v3([],_,g,v,h,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),g)}});function RT(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=>!Tc(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(l=>pa(l,r,ha())))}),t)}const y3=ye("$ZodUnion",(e,t)=>{Bt.init(e,t),It(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),It(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),It(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),It(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Vw(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(n)return r(o,s);let l=!1;const c=[];for(const d of t.options){const f=d._zod.run({value:o.value,issues:[]},s);if(f instanceof Promise)c.push(f),l=!0;else{if(f.issues.length===0)return f;c.push(f)}}return l?Promise.all(c).then(d=>RT(d,o,e,s)):RT(c,o,e,s)}}),$U=ye("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,y3.init(e,t);const n=e._zod.parse;It(e._zod,"propValues",()=>{const o={};for(const s of t.options){const l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const[c,d]of Object.entries(l)){o[c]||(o[c]=new Set);for(const f of d)o[c].add(f)}}return o});const r=$g(()=>{const o=t.options,s=new Map;for(const l of o){const c=l._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of c){if(s.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);s.set(d,l)}}return s});e._zod.parse=(o,s)=>{const l=o.value;if(!Zd(l))return o.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),o;const c=r.value.get(l?.[t.discriminator]);return c?c._zod.run(o,s):t.unionFallback?n(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),o)}}),jU=ye("$ZodIntersection",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([d,f])=>OT(n,d,f)):OT(n,s,l)}});function Hb(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(Hc(e)&&Hc(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const l=Hb(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};o[s]=l.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],l=Hb(o,s);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function OT(e,t,n){const r=new Map;let o;for(const c of t.issues)if(c.code==="unrecognized_keys"){o??(o=c);for(const d of c.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const d of c.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(c);const s=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length&&o&&e.issues.push({...o,keys:s}),Tc(e))return e;const l=Hb(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const zU=ye("$ZodTuple",(e,t)=>{Bt.init(e,t);const n=t.items;e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const l=[],c=[...n].reverse().findIndex(p=>p._zod.optin!=="optional"),d=c===-1?0:n.length-c;if(!t.rest){const p=s.length>n.length,h=s.length<d-1;if(p||h)return r.issues.push({...p?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:s,inst:e,origin:"array"}),r}let f=-1;for(const p of n){if(f++,f>=s.length&&f>=d)continue;const h=p._zod.run({value:s[f],issues:[]},o);h instanceof Promise?l.push(h.then(g=>ep(g,r,f))):ep(h,r,f)}if(t.rest){const p=s.slice(n.length);for(const h of p){f++;const g=t.rest._zod.run({value:h,issues:[]},o);g instanceof Promise?l.push(g.then(v=>ep(v,r,f))):ep(g,r,f)}}return l.length?Promise.all(l).then(()=>r):r}});function ep(e,t,n){e.issues.length&&t.issues.push(...rl(n,e.issues)),t.value[n]=e.value}const UU=ye("$ZodRecord",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Hc(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const s=[],l=t.keyType._zod.values;if(l){n.value={};const c=new Set;for(const f of l)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){c.add(typeof f=="number"?f.toString():f);const p=t.valueType._zod.run({value:o[f],issues:[]},r);p instanceof Promise?s.push(p.then(h=>{h.issues.length&&n.issues.push(...rl(f,h.issues)),n.value[f]=h.value})):(p.issues.length&&n.issues.push(...rl(f,p.issues)),n.value[f]=p.value)}let d;for(const f in o)c.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:d})}else{n.value={};for(const c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let d=t.keyType._zod.run({value:c,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&u3.test(c)&&d.issues.length){const h=t.keyType._zod.run({value:Number(c),issues:[]},r);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(d=h)}if(d.issues.length){t.mode==="loose"?n.value[c]=o[c]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>pa(h,r,ha())),input:c,path:[c],inst:e});continue}const p=t.valueType._zod.run({value:o[c],issues:[]},r);p instanceof Promise?s.push(p.then(h=>{h.issues.length&&n.issues.push(...rl(c,h.issues)),n.value[d.value]=h.value})):(p.issues.length&&n.issues.push(...rl(c,p.issues)),n.value[d.value]=p.value)}}return s.length?Promise.all(s).then(()=>n):n}}),FU=ye("$ZodEnum",(e,t)=>{Bt.init(e,t);const n=n3(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Bz.has(typeof o)).map(o=>typeof o=="string"?qc(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),BU=ye("$ZodLiteral",(e,t)=>{if(Bt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?qc(r):r?qc(r.toString()):String(r)).join("|")})$`),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}}),VU=ye("$ZodFile",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;return o instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),n}}),HU=ye("$ZodTransform",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new e3(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new kc;return n.value=o,n}});function TT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const _3=ye("$ZodOptional",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",It(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),It(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vw(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>TT(s,n.value)):TT(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),qU=ye("$ZodExactOptional",(e,t)=>{_3.init(e,t),It(e._zod,"values",()=>t.innerType._zod.values),It(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),GU=ye("$ZodNullable",(e,t)=>{Bt.init(e,t),It(e._zod,"optin",()=>t.innerType._zod.optin),It(e._zod,"optout",()=>t.innerType._zod.optout),It(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vw(n.source)}|null)$`):void 0}),It(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),KU=ye("$ZodDefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",It(e._zod,"values",()=>t.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=>CT(s,t)):CT(o,t)}});function CT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ZU=ye("$ZodPrefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",It(e._zod,"values",()=>t.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))}),YU=ye("$ZodNonOptional",(e,t)=>{Bt.init(e,t),It(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>AT(s,e)):AT(o,e)}});function AT(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const WU=ye("$ZodCatch",(e,t)=>{Bt.init(e,t),It(e._zod,"optin",()=>t.innerType._zod.optin),It(e._zod,"optout",()=>t.innerType._zod.optout),It(e._zod,"values",()=>t.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(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(l=>pa(l,r,ha()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>pa(s,r,ha()))},input:n.value}),n.issues=[]),n)}}),QU=ye("$ZodPipe",(e,t)=>{Bt.init(e,t),It(e._zod,"values",()=>t.in._zod.values),It(e._zod,"optin",()=>t.in._zod.optin),It(e._zod,"optout",()=>t.out._zod.optout),It(e._zod,"propValues",()=>t.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(l=>tp(l,t.in,r)):tp(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>tp(s,t.out,r)):tp(o,t.out,r)}});function tp(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const XU=ye("$ZodReadonly",(e,t)=>{Bt.init(e,t),It(e._zod,"propValues",()=>t.innerType._zod.propValues),It(e._zod,"values",()=>t.innerType._zod.values),It(e._zod,"optin",()=>t.innerType?._zod?.optin),It(e._zod,"optout",()=>t.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(IT):IT(o)}});function IT(e){return e.value=Object.freeze(e.value),e}const JU=ye("$ZodLazy",(e,t)=>{Bt.init(e,t),It(e._zod,"innerType",()=>t.getter()),It(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),It(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),It(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),It(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),eF=ye("$ZodCustom",(e,t)=>{yr.init(e,t),Bt.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=>PT(s,n,r,e));PT(o,n,r,e)}});function PT(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(Yd(o))}}var MT;class tF{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 nF(){return new tF}(MT=globalThis).__zod_globalRegistry??(MT.__zod_globalRegistry=nF());const wd=globalThis.__zod_globalRegistry;function rF(e,t){return new e({type:"string",...Ue(t)})}function oF(e,t){return new e({type:"string",coerce:!0,...Ue(t)})}function iF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ue(t)})}function NT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ue(t)})}function sF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ue(t)})}function aF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ue(t)})}function lF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ue(t)})}function cF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ue(t)})}function b3(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ue(t)})}function uF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ue(t)})}function dF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ue(t)})}function fF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ue(t)})}function hF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ue(t)})}function pF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ue(t)})}function mF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ue(t)})}function gF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ue(t)})}function vF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ue(t)})}function yF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ue(t)})}function _F(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ue(t)})}function bF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ue(t)})}function wF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ue(t)})}function SF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ue(t)})}function EF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ue(t)})}function xF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ue(t)})}function RF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ue(t)})}function OF(e,t){return new e({type:"string",format:"date",check:"string_format",...Ue(t)})}function TF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ue(t)})}function CF(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ue(t)})}function AF(e,t){return new e({type:"number",checks:[],...Ue(t)})}function IF(e,t){return new e({type:"number",coerce:!0,checks:[],...Ue(t)})}function PF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ue(t)})}function MF(e,t){return new e({type:"boolean",...Ue(t)})}function NF(e,t){return new e({type:"boolean",coerce:!0,...Ue(t)})}function kF(e,t){return new e({type:"undefined",...Ue(t)})}function DF(e,t){return new e({type:"null",...Ue(t)})}function LF(e){return new e({type:"any"})}function $F(e){return new e({type:"unknown"})}function jF(e,t){return new e({type:"never",...Ue(t)})}function kT(e,t){return new f3({check:"less_than",...Ue(t),value:e,inclusive:!1})}function Qy(e,t){return new f3({check:"less_than",...Ue(t),value:e,inclusive:!0})}function DT(e,t){return new h3({check:"greater_than",...Ue(t),value:e,inclusive:!1})}function Xy(e,t){return new h3({check:"greater_than",...Ue(t),value:e,inclusive:!0})}function LT(e,t){return new z9({check:"multiple_of",...Ue(t),value:e})}function zF(e,t){return new F9({check:"max_size",...Ue(t),maximum:e})}function UF(e,t){return new B9({check:"min_size",...Ue(t),minimum:e})}function w3(e,t){return new V9({check:"max_length",...Ue(t),maximum:e})}function Um(e,t){return new H9({check:"min_length",...Ue(t),minimum:e})}function S3(e,t){return new q9({check:"length_equals",...Ue(t),length:e})}function FF(e,t){return new G9({check:"string_format",format:"regex",...Ue(t),pattern:e})}function BF(e){return new K9({check:"string_format",format:"lowercase",...Ue(e)})}function VF(e){return new Z9({check:"string_format",format:"uppercase",...Ue(e)})}function HF(e,t){return new Y9({check:"string_format",format:"includes",...Ue(t),includes:e})}function qF(e,t){return new W9({check:"string_format",format:"starts_with",...Ue(t),prefix:e})}function GF(e,t){return new Q9({check:"string_format",format:"ends_with",...Ue(t),suffix:e})}function KF(e,t){return new X9({check:"mime_type",mime:e,...Ue(t)})}function nu(e){return new J9({check:"overwrite",tx:e})}function ZF(e){return nu(t=>t.normalize(e))}function YF(){return nu(e=>e.trim())}function WF(){return nu(e=>e.toLowerCase())}function QF(){return nu(e=>e.toUpperCase())}function XF(){return nu(e=>Uz(e))}function JF(e,t,n){return new e({type:"array",element:t,...Ue(n)})}function eB(e,t){return new e({type:"file",...Ue(t)})}function tB(e,t,n){const r=Ue(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function nB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ue(n)})}function rB(e){const t=oB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Yd(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Yd(o))}},e(n.value,n)));return t}function oB(e,t){const n=new yr({check:"custom",...Ue(t)});return n._zod.check=e,n}function Fm(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??wd,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function sn(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 l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const c=e._zod.toJSONSchema?.();if(c)l.schema=c;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const g=l.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,g,p)}const h=e._zod.parent;h&&(l.ref||(l.ref=h),sn(h,t,p),t.seen.get(h).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&Dr(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function Bm(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const c=e.metadataRegistry.get(l[0])?.id;if(c){const d=r.get(c);if(d&&d!==l[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,l[0])}}const o=l=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const h=e.external.registry.get(l[0])?.id,g=e.external.uri??(_=>_);if(h)return{ref:g(h)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${v}`}}if(l[1]===n)return{ref:"#"};const f=`#/${c}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:f+p}},s=l=>{if(l[1].schema.$ref)return;const c=l[1],{ref:d,defId:f}=o(l);c.def={...c.schema},f&&(c.defId=f);const p=c.schema;for(const h in p)delete p[h];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const c=l[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
46
|
+
`)}v.write("payload.value = newResult;"),v.write("return payload;");const E=v.compile();return(T,R)=>E(g,T,R)};let s;const l=Zd,c=!t3.jitless,f=c&&F9.value,p=t.catchall;let h;e._zod.parse=(g,v)=>{h??(h=r.value);const _=g.value;return l(_)?c&&f&&v?.async===!1&&v.jitless!==!0?(s||(s=o(t.shape)),g=s(g,v),p?v3([],_,g,v,h,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),g)}});function RT(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=>!Tc(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(l=>pa(l,r,ha())))}),t)}const y3=ye("$ZodUnion",(e,t)=>{Bt.init(e,t),It(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),It(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),It(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),It(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Vw(s.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,s)=>{if(n)return r(o,s);let l=!1;const c=[];for(const d of t.options){const f=d._zod.run({value:o.value,issues:[]},s);if(f instanceof Promise)c.push(f),l=!0;else{if(f.issues.length===0)return f;c.push(f)}}return l?Promise.all(c).then(d=>RT(d,o,e,s)):RT(c,o,e,s)}}),$U=ye("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,y3.init(e,t);const n=e._zod.parse;It(e._zod,"propValues",()=>{const o={};for(const s of t.options){const l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const[c,d]of Object.entries(l)){o[c]||(o[c]=new Set);for(const f of d)o[c].add(f)}}return o});const r=$g(()=>{const o=t.options,s=new Map;for(const l of o){const c=l._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of c){if(s.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);s.set(d,l)}}return s});e._zod.parse=(o,s)=>{const l=o.value;if(!Zd(l))return o.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),o;const c=r.value.get(l?.[t.discriminator]);return c?c._zod.run(o,s):t.unionFallback?n(o,s):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),o)}}),jU=ye("$ZodIntersection",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,s=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||l instanceof Promise?Promise.all([s,l]).then(([d,f])=>OT(n,d,f)):OT(n,s,l)}});function Hb(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(Hc(e)&&Hc(t)){const n=Object.keys(t),r=Object.keys(e).filter(s=>n.indexOf(s)!==-1),o={...e,...t};for(const s of r){const l=Hb(e[s],t[s]);if(!l.valid)return{valid:!1,mergeErrorPath:[s,...l.mergeErrorPath]};o[s]=l.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],l=Hb(o,s);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function OT(e,t,n){const r=new Map;let o;for(const c of t.issues)if(c.code==="unrecognized_keys"){o??(o=c);for(const d of c.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(c);for(const c of n.issues)if(c.code==="unrecognized_keys")for(const d of c.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(c);const s=[...r].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length&&o&&e.issues.push({...o,keys:s}),Tc(e))return e;const l=Hb(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const zU=ye("$ZodTuple",(e,t)=>{Bt.init(e,t);const n=t.items;e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const l=[],c=[...n].reverse().findIndex(p=>p._zod.optin!=="optional"),d=c===-1?0:n.length-c;if(!t.rest){const p=s.length>n.length,h=s.length<d-1;if(p||h)return r.issues.push({...p?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:s,inst:e,origin:"array"}),r}let f=-1;for(const p of n){if(f++,f>=s.length&&f>=d)continue;const h=p._zod.run({value:s[f],issues:[]},o);h instanceof Promise?l.push(h.then(g=>ep(g,r,f))):ep(h,r,f)}if(t.rest){const p=s.slice(n.length);for(const h of p){f++;const g=t.rest._zod.run({value:h,issues:[]},o);g instanceof Promise?l.push(g.then(v=>ep(v,r,f))):ep(g,r,f)}}return l.length?Promise.all(l).then(()=>r):r}});function ep(e,t,n){e.issues.length&&t.issues.push(...rl(n,e.issues)),t.value[n]=e.value}const UU=ye("$ZodRecord",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Hc(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const s=[],l=t.keyType._zod.values;if(l){n.value={};const c=new Set;for(const f of l)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){c.add(typeof f=="number"?f.toString():f);const p=t.valueType._zod.run({value:o[f],issues:[]},r);p instanceof Promise?s.push(p.then(h=>{h.issues.length&&n.issues.push(...rl(f,h.issues)),n.value[f]=h.value})):(p.issues.length&&n.issues.push(...rl(f,p.issues)),n.value[f]=p.value)}let d;for(const f in o)c.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:d})}else{n.value={};for(const c of Reflect.ownKeys(o)){if(c==="__proto__")continue;let d=t.keyType._zod.run({value:c,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&u3.test(c)&&d.issues.length){const h=t.keyType._zod.run({value:Number(c),issues:[]},r);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(d=h)}if(d.issues.length){t.mode==="loose"?n.value[c]=o[c]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>pa(h,r,ha())),input:c,path:[c],inst:e});continue}const p=t.valueType._zod.run({value:o[c],issues:[]},r);p instanceof Promise?s.push(p.then(h=>{h.issues.length&&n.issues.push(...rl(c,h.issues)),n.value[d.value]=h.value})):(p.issues.length&&n.issues.push(...rl(c,p.issues)),n.value[d.value]=p.value)}}return s.length?Promise.all(s).then(()=>n):n}}),FU=ye("$ZodEnum",(e,t)=>{Bt.init(e,t);const n=n3(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>B9.has(typeof o)).map(o=>typeof o=="string"?qc(o):o.toString()).join("|")})$`),e._zod.parse=(o,s)=>{const l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),BU=ye("$ZodLiteral",(e,t)=>{if(Bt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?qc(r):r?qc(r.toString()):String(r)).join("|")})$`),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}}),VU=ye("$ZodFile",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;return o instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),n}}),HU=ye("$ZodTransform",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new e3(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new kc;return n.value=o,n}});function TT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const _3=ye("$ZodOptional",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",It(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),It(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vw(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>TT(s,n.value)):TT(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),qU=ye("$ZodExactOptional",(e,t)=>{_3.init(e,t),It(e._zod,"values",()=>t.innerType._zod.values),It(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),GU=ye("$ZodNullable",(e,t)=>{Bt.init(e,t),It(e._zod,"optin",()=>t.innerType._zod.optin),It(e._zod,"optout",()=>t.innerType._zod.optout),It(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vw(n.source)}|null)$`):void 0}),It(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),KU=ye("$ZodDefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",It(e._zod,"values",()=>t.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=>CT(s,t)):CT(o,t)}});function CT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const ZU=ye("$ZodPrefault",(e,t)=>{Bt.init(e,t),e._zod.optin="optional",It(e._zod,"values",()=>t.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))}),YU=ye("$ZodNonOptional",(e,t)=>{Bt.init(e,t),It(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(s=>AT(s,e)):AT(o,e)}});function AT(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const WU=ye("$ZodCatch",(e,t)=>{Bt.init(e,t),It(e._zod,"optin",()=>t.innerType._zod.optin),It(e._zod,"optout",()=>t.innerType._zod.optout),It(e._zod,"values",()=>t.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(n,r);return o instanceof Promise?o.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(l=>pa(l,r,ha()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>pa(s,r,ha()))},input:n.value}),n.issues=[]),n)}}),QU=ye("$ZodPipe",(e,t)=>{Bt.init(e,t),It(e._zod,"values",()=>t.in._zod.values),It(e._zod,"optin",()=>t.in._zod.optin),It(e._zod,"optout",()=>t.out._zod.optout),It(e._zod,"propValues",()=>t.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(l=>tp(l,t.in,r)):tp(s,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(s=>tp(s,t.out,r)):tp(o,t.out,r)}});function tp(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const XU=ye("$ZodReadonly",(e,t)=>{Bt.init(e,t),It(e._zod,"propValues",()=>t.innerType._zod.propValues),It(e._zod,"values",()=>t.innerType._zod.values),It(e._zod,"optin",()=>t.innerType?._zod?.optin),It(e._zod,"optout",()=>t.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(IT):IT(o)}});function IT(e){return e.value=Object.freeze(e.value),e}const JU=ye("$ZodLazy",(e,t)=>{Bt.init(e,t),It(e._zod,"innerType",()=>t.getter()),It(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),It(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),It(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),It(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),eF=ye("$ZodCustom",(e,t)=>{yr.init(e,t),Bt.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=>PT(s,n,r,e));PT(o,n,r,e)}});function PT(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(Yd(o))}}var MT;class tF{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 nF(){return new tF}(MT=globalThis).__zod_globalRegistry??(MT.__zod_globalRegistry=nF());const wd=globalThis.__zod_globalRegistry;function rF(e,t){return new e({type:"string",...Ue(t)})}function oF(e,t){return new e({type:"string",coerce:!0,...Ue(t)})}function iF(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ue(t)})}function NT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ue(t)})}function sF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ue(t)})}function aF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ue(t)})}function lF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ue(t)})}function cF(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ue(t)})}function b3(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ue(t)})}function uF(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ue(t)})}function dF(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ue(t)})}function fF(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ue(t)})}function hF(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ue(t)})}function pF(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ue(t)})}function mF(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ue(t)})}function gF(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ue(t)})}function vF(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ue(t)})}function yF(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ue(t)})}function _F(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ue(t)})}function bF(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ue(t)})}function wF(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ue(t)})}function SF(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ue(t)})}function EF(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ue(t)})}function xF(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ue(t)})}function RF(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ue(t)})}function OF(e,t){return new e({type:"string",format:"date",check:"string_format",...Ue(t)})}function TF(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ue(t)})}function CF(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ue(t)})}function AF(e,t){return new e({type:"number",checks:[],...Ue(t)})}function IF(e,t){return new e({type:"number",coerce:!0,checks:[],...Ue(t)})}function PF(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ue(t)})}function MF(e,t){return new e({type:"boolean",...Ue(t)})}function NF(e,t){return new e({type:"boolean",coerce:!0,...Ue(t)})}function kF(e,t){return new e({type:"undefined",...Ue(t)})}function DF(e,t){return new e({type:"null",...Ue(t)})}function LF(e){return new e({type:"any"})}function $F(e){return new e({type:"unknown"})}function jF(e,t){return new e({type:"never",...Ue(t)})}function kT(e,t){return new f3({check:"less_than",...Ue(t),value:e,inclusive:!1})}function Qy(e,t){return new f3({check:"less_than",...Ue(t),value:e,inclusive:!0})}function DT(e,t){return new h3({check:"greater_than",...Ue(t),value:e,inclusive:!1})}function Xy(e,t){return new h3({check:"greater_than",...Ue(t),value:e,inclusive:!0})}function LT(e,t){return new zz({check:"multiple_of",...Ue(t),value:e})}function zF(e,t){return new Fz({check:"max_size",...Ue(t),maximum:e})}function UF(e,t){return new Bz({check:"min_size",...Ue(t),minimum:e})}function w3(e,t){return new Vz({check:"max_length",...Ue(t),maximum:e})}function Um(e,t){return new Hz({check:"min_length",...Ue(t),minimum:e})}function S3(e,t){return new qz({check:"length_equals",...Ue(t),length:e})}function FF(e,t){return new Gz({check:"string_format",format:"regex",...Ue(t),pattern:e})}function BF(e){return new Kz({check:"string_format",format:"lowercase",...Ue(e)})}function VF(e){return new Zz({check:"string_format",format:"uppercase",...Ue(e)})}function HF(e,t){return new Yz({check:"string_format",format:"includes",...Ue(t),includes:e})}function qF(e,t){return new Wz({check:"string_format",format:"starts_with",...Ue(t),prefix:e})}function GF(e,t){return new Qz({check:"string_format",format:"ends_with",...Ue(t),suffix:e})}function KF(e,t){return new Xz({check:"mime_type",mime:e,...Ue(t)})}function nu(e){return new Jz({check:"overwrite",tx:e})}function ZF(e){return nu(t=>t.normalize(e))}function YF(){return nu(e=>e.trim())}function WF(){return nu(e=>e.toLowerCase())}function QF(){return nu(e=>e.toUpperCase())}function XF(){return nu(e=>U9(e))}function JF(e,t,n){return new e({type:"array",element:t,...Ue(n)})}function eB(e,t){return new e({type:"file",...Ue(t)})}function tB(e,t,n){const r=Ue(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function nB(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ue(n)})}function rB(e){const t=oB(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Yd(r,n.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(Yd(o))}},e(n.value,n)));return t}function oB(e,t){const n=new yr({check:"custom",...Ue(t)});return n._zod.check=e,n}function Fm(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??wd,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function sn(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 l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const c=e._zod.toJSONSchema?.();if(c)l.schema=c;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const g=l.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,g,p)}const h=e._zod.parent;h&&(l.ref||(l.ref=h),sn(h,t,p),t.seen.get(h).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&Dr(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function Bm(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const c=e.metadataRegistry.get(l[0])?.id;if(c){const d=r.get(c);if(d&&d!==l[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,l[0])}}const o=l=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const h=e.external.registry.get(l[0])?.id,g=e.external.uri??(_=>_);if(h)return{ref:g(h)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${v}`}}if(l[1]===n)return{ref:"#"};const f=`#/${c}/`,p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:f+p}},s=l=>{if(l[1].schema.$ref)return;const c=l[1],{ref:d,defId:f}=o(l);c.def={...c.schema},f&&(c.defId=f);const p=c.schema;for(const h in p)delete p[h];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const c=l[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
47
47
|
|
|
48
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const c=l[1];if(t===l[0]){s(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){s(l);continue}}if(e.metadataRegistry.get(l[0])?.id){s(l);continue}if(c.cycle){s(l);continue}if(c.count>1&&e.reused==="ref"){s(l);continue}}}function Vm(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const c=e.seen.get(l);if(c.ref===null)return;const d=c.def??c.schema,f={...d},p=c.ref;if(c.ref=null,p){r(p);const g=e.seen.get(p),v=g.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),l._zod.parent===p)for(const b in d)b==="$ref"||b==="allOf"||b in f||delete d[b];if(v.$ref&&g.def)for(const b in d)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(d[b])===JSON.stringify(g.def[b])&&delete d[b]}const h=l._zod.parent;if(h&&h!==p){r(h);const g=e.seen.get(h);if(g?.schema.$ref&&(d.$ref=g.schema.$ref,g.def))for(const v in d)v==="$ref"||v==="allOf"||v in g.def&&JSON.stringify(d[v])===JSON.stringify(g.def[v])&&delete d[v]}e.override({zodSchema:l,jsonSchema:d,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);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 l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const s=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Hm(t,"input",e.processors),output:Hm(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Dr(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 Dr(r.element,n);if(r.type==="set")return Dr(r.valueType,n);if(r.type==="lazy")return Dr(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")return Dr(r.innerType,n);if(r.type==="intersection")return Dr(r.left,n)||Dr(r.right,n);if(r.type==="record"||r.type==="map")return Dr(r.keyType,n)||Dr(r.valueType,n);if(r.type==="pipe")return Dr(r.in,n)||Dr(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Dr(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Dr(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Dr(o,n))return!0;return!!(r.rest&&Dr(r.rest,n))}return!1}const iB=(e,t={})=>n=>{const r=Fm({...n,processors:t});return sn(e,r),Bm(r,e),Vm(r,e)},Hm=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},l=Fm({...o??{},target:s,io:t,processors:n});return sn(e,l),Bm(l,e),Vm(l,e)},sB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},E3=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:l,format:c,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof l=="number"&&(o.maxLength=l),c&&(o.format=sB[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),f&&(o.contentEncoding=f),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},x3=(e,t,n,r)=>{const o=n,{minimum:s,maximum:l,format:c,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:p}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number",typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p),typeof s=="number"&&(o.minimum=s,typeof p=="number"&&t.target!=="draft-04"&&(p>=s?delete o.minimum:delete o.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f),typeof l=="number"&&(o.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},R3=(e,t,n,r)=>{n.type="boolean"},aB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},lB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},O3=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},T3=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},cB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},C3=(e,t,n,r)=>{n.not={}},A3=(e,t,n,r)=>{},I3=(e,t,n,r)=>{},uB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},P3=(e,t,n,r)=>{const o=e._zod.def,s=n3(o.entries);s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),n.enum=s},M3=(e,t,n,r)=>{const o=e._zod.def,s=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(l))}else s.push(l);if(s.length!==0)if(s.length===1){const l=s[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),s.every(l=>typeof l=="boolean")&&(n.type="boolean"),s.every(l=>l===null)&&(n.type="null"),n.enum=s},dB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},fB=(e,t,n,r)=>{const o=n,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=s.source},N3=(e,t,n,r)=>{const o=n,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:c,mime:d}=e._zod.bag;l!==void 0&&(s.minLength=l),c!==void 0&&(s.maxLength=c),d?d.length===1?(s.contentMediaType=d[0],Object.assign(o,s)):(Object.assign(o,s),o.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(o,s)},hB=(e,t,n,r)=>{n.type="boolean"},k3=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},pB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},D3=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},mB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},gB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},L3=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=sn(s.element,t,{...r,path:[...r.path,"items"]})},$3=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object",o.properties={};const l=s.shape;for(const f in l)o.properties[f]=sn(l[f],t,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(l)),d=new Set([...c].filter(f=>{const p=s.shape[f]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=sn(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},j3=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,l=o.options.map((c,d)=>sn(c,t,{...r,path:[...r.path,s?"oneOf":"anyOf",d]}));s?n.oneOf=l:n.anyOf=l},z3=(e,t,n,r)=>{const o=e._zod.def,s=sn(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=sn(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,d=[...c(s)?s.allOf:[s],...c(l)?l.allOf:[l]];n.allOf=d},U3=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="array";const l=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=s.items.map((g,v)=>sn(g,t,{...r,path:[...r.path,l,v]})),f=s.rest?sn(s.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=d,f&&(o.items=f)):t.target==="openapi-3.0"?(o.items={anyOf:d},f&&o.items.anyOf.push(f),o.minItems=d.length,f||(o.maxItems=d.length)):(o.items=d,f&&(o.additionalItems=f));const{minimum:p,maximum:h}=e._zod.bag;typeof p=="number"&&(o.minItems=p),typeof h=="number"&&(o.maxItems=h)},F3=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const l=s.keyType,d=l._zod.bag?.patterns;if(s.mode==="loose"&&d&&d.size>0){const p=sn(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const h of d)o.patternProperties[h.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=sn(s.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=sn(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=l._zod.values;if(f){const p=[...f].filter(h=>typeof h=="string"||typeof h=="number");p.length>0&&(o.required=p)}},B3=(e,t,n,r)=>{const o=e._zod.def,s=sn(o.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},V3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},H3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},q3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},G3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},K3=(e,t,n,r)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;sn(s,t,r);const l=t.seen.get(e);l.ref=s},Z3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},vB=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Kw=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Y3=(e,t,n,r)=>{const o=e._zod.innerType;sn(o,t,r);const s=t.seen.get(e);s.ref=o},$T={string:E3,number:x3,boolean:R3,bigint:aB,symbol:lB,null:O3,undefined:T3,void:cB,never:C3,any:A3,unknown:I3,date:uB,enum:P3,literal:M3,nan:dB,template_literal:fB,file:N3,success:hB,custom:k3,function:pB,transform:D3,map:mB,set:gB,array:L3,object:$3,union:j3,intersection:z3,tuple:U3,record:F3,nullable:B3,nonoptional:V3,default:H3,prefault:q3,catch:G3,pipe:K3,readonly:Z3,promise:vB,optional:Kw,lazy:Y3};function Zce(e,t){if("_idmap"in e){const r=e,o=Fm({...t,processors:$T}),s={};for(const d of r._idmap.entries()){const[f,p]=d;sn(p,o)}const l={},c={registry:r,uri:t?.uri,defs:s};o.external=c;for(const d of r._idmap.entries()){const[f,p]=d;Bm(o,p),l[f]=Vm(o,p)}if(Object.keys(s).length>0){const d=o.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[d]:s}}return{schemas:l}}const n=Fm({...t,processors:$T});return sn(e,n),Bm(n,e),Vm(n,e)}const yB=ye("ZodISODateTime",(e,t)=>{hU.init(e,t),wn.init(e,t)});function W3(e){return RF(yB,e)}const _B=ye("ZodISODate",(e,t)=>{pU.init(e,t),wn.init(e,t)});function bB(e){return OF(_B,e)}const wB=ye("ZodISOTime",(e,t)=>{mU.init(e,t),wn.init(e,t)});function SB(e){return TF(wB,e)}const EB=ye("ZodISODuration",(e,t)=>{gU.init(e,t),wn.init(e,t)});function xB(e){return CF(EB,e)}const RB=(e,t)=>{qw.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Jz(e,n)},flatten:{value:n=>Xz(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Vb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Vb,2)}},isEmpty:{get(){return e.issues.length===0}}})},Bo=ye("ZodError",RB,{Parent:Error}),OB=zg(Bo),TB=Ug(Bo),CB=Fg(Bo),AB=Bg(Bo),IB=o9(Bo),PB=i9(Bo),MB=s9(Bo),NB=a9(Bo),kB=l9(Bo),DB=c9(Bo),LB=u9(Bo),$B=d9(Bo),Kt=ye("ZodType",(e,t)=>(Bt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Hm(e,"input"),output:Hm(e,"output")}}),e.toJSONSchema=iB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(_a(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>ba(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>OB(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>CB(e,n,r),e.parseAsync=async(n,r)=>TB(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>AB(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>IB(e,n,r),e.decode=(n,r)=>PB(e,n,r),e.encodeAsync=async(n,r)=>MB(e,n,r),e.decodeAsync=async(n,r)=>NB(e,n,r),e.safeEncode=(n,r)=>kB(e,n,r),e.safeDecode=(n,r)=>DB(e,n,r),e.safeEncodeAsync=async(n,r)=>LB(e,n,r),e.safeDecodeAsync=async(n,r)=>$B(e,n,r),e.refine=(n,r)=>e.check(MV(n,r)),e.superRefine=n=>e.check(NV(n)),e.overwrite=n=>e.check(nu(n)),e.optional=()=>bn(e),e.exactOptional=()=>yV(e),e.nullable=()=>UT(e),e.nullish=()=>bn(UT(e)),e.nonoptional=n=>xV(e,n),e.array=()=>Re(e),e.or=n=>nn([e,n]),e.and=n=>Qw(e,n),e.transform=n=>Gb(e,rN(n)),e.default=n=>wV(e,n),e.prefault=n=>EV(e,n),e.catch=n=>OV(e,n),e.pipe=n=>Gb(e,n),e.readonly=()=>AV(e),e.describe=n=>{const r=e.clone();return wd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return wd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return wd.get(e);const r=e.clone();return wd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Q3=ye("_ZodString",(e,t)=>{Gw.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>E3(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(FF(...r)),e.includes=(...r)=>e.check(HF(...r)),e.startsWith=(...r)=>e.check(qF(...r)),e.endsWith=(...r)=>e.check(GF(...r)),e.min=(...r)=>e.check(Um(...r)),e.max=(...r)=>e.check(w3(...r)),e.length=(...r)=>e.check(S3(...r)),e.nonempty=(...r)=>e.check(Um(1,...r)),e.lowercase=r=>e.check(BF(r)),e.uppercase=r=>e.check(VF(r)),e.trim=()=>e.check(YF()),e.normalize=(...r)=>e.check(ZF(...r)),e.toLowerCase=()=>e.check(WF()),e.toUpperCase=()=>e.check(QF()),e.slugify=()=>e.check(XF())}),X3=ye("ZodString",(e,t)=>{Gw.init(e,t),Q3.init(e,t),e.email=n=>e.check(iF(jB,n)),e.url=n=>e.check(b3(J3,n)),e.jwt=n=>e.check(xF(eV,n)),e.emoji=n=>e.check(uF(UB,n)),e.guid=n=>e.check(NT(jT,n)),e.uuid=n=>e.check(sF(np,n)),e.uuidv4=n=>e.check(aF(np,n)),e.uuidv6=n=>e.check(lF(np,n)),e.uuidv7=n=>e.check(cF(np,n)),e.nanoid=n=>e.check(dF(FB,n)),e.guid=n=>e.check(NT(jT,n)),e.cuid=n=>e.check(fF(BB,n)),e.cuid2=n=>e.check(hF(VB,n)),e.ulid=n=>e.check(pF(HB,n)),e.base64=n=>e.check(wF(QB,n)),e.base64url=n=>e.check(SF(XB,n)),e.xid=n=>e.check(mF(qB,n)),e.ksuid=n=>e.check(gF(GB,n)),e.ipv4=n=>e.check(vF(KB,n)),e.ipv6=n=>e.check(yF(ZB,n)),e.cidrv4=n=>e.check(_F(YB,n)),e.cidrv6=n=>e.check(bF(WB,n)),e.e164=n=>e.check(EF(JB,n)),e.datetime=n=>e.check(W3(n)),e.date=n=>e.check(bB(n)),e.time=n=>e.check(SB(n)),e.duration=n=>e.check(xB(n))});function $(e){return rF(X3,e)}const wn=ye("ZodStringFormat",(e,t)=>{gn.init(e,t),Q3.init(e,t)}),jB=ye("ZodEmail",(e,t)=>{oU.init(e,t),wn.init(e,t)}),jT=ye("ZodGUID",(e,t)=>{nU.init(e,t),wn.init(e,t)}),np=ye("ZodUUID",(e,t)=>{rU.init(e,t),wn.init(e,t)}),J3=ye("ZodURL",(e,t)=>{iU.init(e,t),wn.init(e,t)});function zB(e){return b3(J3,e)}const UB=ye("ZodEmoji",(e,t)=>{sU.init(e,t),wn.init(e,t)}),FB=ye("ZodNanoID",(e,t)=>{aU.init(e,t),wn.init(e,t)}),BB=ye("ZodCUID",(e,t)=>{lU.init(e,t),wn.init(e,t)}),VB=ye("ZodCUID2",(e,t)=>{cU.init(e,t),wn.init(e,t)}),HB=ye("ZodULID",(e,t)=>{uU.init(e,t),wn.init(e,t)}),qB=ye("ZodXID",(e,t)=>{dU.init(e,t),wn.init(e,t)}),GB=ye("ZodKSUID",(e,t)=>{fU.init(e,t),wn.init(e,t)}),KB=ye("ZodIPv4",(e,t)=>{vU.init(e,t),wn.init(e,t)}),ZB=ye("ZodIPv6",(e,t)=>{yU.init(e,t),wn.init(e,t)}),YB=ye("ZodCIDRv4",(e,t)=>{_U.init(e,t),wn.init(e,t)}),WB=ye("ZodCIDRv6",(e,t)=>{bU.init(e,t),wn.init(e,t)}),QB=ye("ZodBase64",(e,t)=>{wU.init(e,t),wn.init(e,t)}),XB=ye("ZodBase64URL",(e,t)=>{EU.init(e,t),wn.init(e,t)}),JB=ye("ZodE164",(e,t)=>{xU.init(e,t),wn.init(e,t)}),eV=ye("ZodJWT",(e,t)=>{OU.init(e,t),wn.init(e,t)}),Zw=ye("ZodNumber",(e,t)=>{m3.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>x3(e,r,o),e.gt=(r,o)=>e.check(DT(r,o)),e.gte=(r,o)=>e.check(Xy(r,o)),e.min=(r,o)=>e.check(Xy(r,o)),e.lt=(r,o)=>e.check(kT(r,o)),e.lte=(r,o)=>e.check(Qy(r,o)),e.max=(r,o)=>e.check(Qy(r,o)),e.int=r=>e.check(zT(r)),e.safe=r=>e.check(zT(r)),e.positive=r=>e.check(DT(0,r)),e.nonnegative=r=>e.check(Xy(0,r)),e.negative=r=>e.check(kT(0,r)),e.nonpositive=r=>e.check(Qy(0,r)),e.multipleOf=(r,o)=>e.check(LT(r,o)),e.step=(r,o)=>e.check(LT(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ht(e){return AF(Zw,e)}const tV=ye("ZodNumberFormat",(e,t)=>{TU.init(e,t),Zw.init(e,t)});function zT(e){return PF(tV,e)}const eN=ye("ZodBoolean",(e,t)=>{CU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>R3(e,n,r)});function Nt(e){return MF(eN,e)}const nV=ye("ZodUndefined",(e,t)=>{AU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>T3(e,n)});function Yce(e){return kF(nV,e)}const rV=ye("ZodNull",(e,t)=>{IU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>O3(e,n,r)});function oV(e){return DF(rV,e)}const iV=ye("ZodAny",(e,t)=>{PU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>A3()});function sV(){return LF(iV)}const aV=ye("ZodUnknown",(e,t)=>{MU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>I3()});function Gt(){return $F(aV)}const lV=ye("ZodNever",(e,t)=>{NU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>C3(e,n,r)});function tN(e){return jF(lV,e)}const cV=ye("ZodArray",(e,t)=>{kU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>L3(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Um(n,r)),e.nonempty=n=>e.check(Um(1,n)),e.max=(n,r)=>e.check(w3(n,r)),e.length=(n,r)=>e.check(S3(n,r)),e.unwrap=()=>e.element});function Re(e,t){return JF(cV,e,t)}const Yw=ye("ZodObject",(e,t)=>{LU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$3(e,n,r,o),It(e,"shape",()=>t.shape),e.keyof=()=>an(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gt()}),e.strict=()=>e.clone({...e._zod.def,catchall:tN()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>Kz(e,n),e.safeExtend=n=>Zz(e,n),e.merge=n=>Yz(e,n),e.pick=n=>qz(e,n),e.omit=n=>Gz(e,n),e.partial=(...n)=>Wz(oN,e,n[0]),e.required=(...n)=>Qz(iN,e,n[0])});function be(e,t){const n={type:"object",shape:e??{},...Ue(t)};return new Yw(n)}function Wce(e,t){return new Yw({type:"object",shape:e,catchall:tN(),...Ue(t)})}function vr(e,t){return new Yw({type:"object",shape:e,catchall:Gt(),...Ue(t)})}const nN=ye("ZodUnion",(e,t)=>{y3.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>j3(e,n,r,o),e.options=t.options});function nn(e,t){return new nN({type:"union",options:e,...Ue(t)})}const uV=ye("ZodDiscriminatedUnion",(e,t)=>{nN.init(e,t),$U.init(e,t)});function Ww(e,t,n){return new uV({type:"union",options:t,discriminator:e,...Ue(n)})}const dV=ye("ZodIntersection",(e,t)=>{jU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>z3(e,n,r,o)});function Qw(e,t){return new dV({type:"intersection",left:e,right:t})}const fV=ye("ZodTuple",(e,t)=>{zU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>U3(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Qce(e,t,n){const r=t instanceof Bt,o=r?n:t,s=r?t:null;return new fV({type:"tuple",items:e,rest:s,...Ue(o)})}const hV=ye("ZodRecord",(e,t)=>{UU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F3(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Pt(e,t,n){return new hV({type:"record",keyType:e,valueType:t,...Ue(n)})}const qb=ye("ZodEnum",(e,t)=>{FU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>P3(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new qb({...t,checks:[],...Ue(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new qb({...t,checks:[],...Ue(o),entries:s})}});function an(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new qb({type:"enum",entries:n,...Ue(t)})}const pV=ye("ZodLiteral",(e,t)=>{BU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>M3(e,n,r),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 Ge(e,t){return new pV({type:"literal",values:Array.isArray(e)?e:[e],...Ue(t)})}const mV=ye("ZodFile",(e,t)=>{VU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>N3(e,n,r),e.min=(n,r)=>e.check(UF(n,r)),e.max=(n,r)=>e.check(zF(n,r)),e.mime=(n,r)=>e.check(KF(Array.isArray(n)?n:[n],r))});function Xce(e){return eB(mV,e)}const gV=ye("ZodTransform",(e,t)=>{HU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>D3(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new e3(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Yd(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Yd(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function rN(e){return new gV({type:"transform",transform:e})}const oN=ye("ZodOptional",(e,t)=>{_3.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kw(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bn(e){return new oN({type:"optional",innerType:e})}const vV=ye("ZodExactOptional",(e,t)=>{qU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kw(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function yV(e){return new vV({type:"optional",innerType:e})}const _V=ye("ZodNullable",(e,t)=>{GU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>B3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function UT(e){return new _V({type:"nullable",innerType:e})}const bV=ye("ZodDefault",(e,t)=>{KU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>H3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wV(e,t){return new bV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():o3(t)}})}const SV=ye("ZodPrefault",(e,t)=>{ZU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>q3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function EV(e,t){return new SV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():o3(t)}})}const iN=ye("ZodNonOptional",(e,t)=>{YU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>V3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function xV(e,t){return new iN({type:"nonoptional",innerType:e,...Ue(t)})}const RV=ye("ZodCatch",(e,t)=>{WU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>G3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function OV(e,t){return new RV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const TV=ye("ZodPipe",(e,t)=>{QU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>K3(e,n,r,o),e.in=t.in,e.out=t.out});function Gb(e,t){return new TV({type:"pipe",in:e,out:t})}const CV=ye("ZodReadonly",(e,t)=>{XU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Z3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function AV(e){return new CV({type:"readonly",innerType:e})}const IV=ye("ZodLazy",(e,t)=>{JU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Y3(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function ms(e){return new IV({type:"lazy",getter:e})}const Xw=ye("ZodCustom",(e,t)=>{eF.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>k3(e,n)});function PV(e,t){return tB(Xw,e??(()=>!0),t)}function MV(e,t={}){return nB(Xw,e,t)}function NV(e){return rB(e)}function Jce(e,t={}){const n=new Xw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ue(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Jw(e,t){return Gb(rN(e),t)}const kV={custom:"custom"};function sN(e){return oF(X3,e)}function aN(e){return IF(Zw,e)}function FT(e){return NF(eN,e)}function DV(e){return e.charAt(0).toUpperCase()+e.slice(1)}var kd=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};function LV(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new kd(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function $V(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new kd(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof kd?t:new kd(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Jy(e,t="/api/auth"){if($V(e),LV(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function jV(e,t,n,r,o){if(e)return Jy(e,t);{const s=Do.BETTER_AUTH_URL||Do.NEXT_PUBLIC_BETTER_AUTH_URL||Do.PUBLIC_BETTER_AUTH_URL||Do.NUXT_PUBLIC_BETTER_AUTH_URL||Do.NUXT_PUBLIC_AUTH_URL||(Do.BASE_URL!=="/"?Do.BASE_URL:void 0);if(s)return Jy(s,t)}if(typeof window<"u"&&window.location)return Jy(window.location.origin,t)}const zV={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},UV={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*:/},FV=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,BT={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},BV=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function VV(e){return e instanceof Date&&!isNaN(e.getTime())}function HV(e){const t=BV.exec(e);if(!t)return null;const[,n,r,o,s,l,c,d,f,p,h]=t,g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(o,10),parseInt(s,10),parseInt(l,10),parseInt(c,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const v=(parseInt(p,10)*60+parseInt(h,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+v)}return VV(g)?g:null}function qV(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:o,parseDates:s=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const c=l.toLowerCase();if(c.length<=9&&c in BT)return BT[c];if(!FV.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(UV).some(([d,f])=>{const p=f.test(l);return p&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),p})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(f,p)=>{if(f==="__proto__"||f==="constructor"&&p&&typeof p=="object"&&"prototype"in p){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(s&&typeof p=="string"){const h=HV(p);if(h)return h}return o?o(f,p):p})}catch(d){if(n)throw d;return e}}function GV(e,t={strict:!0}){return qV(e,t)}let Qo=[],Hs=0;const rp=4,KV=globalThis.nanostoresGlobal||={epoch:0},Cc=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=Hs+rp;s<Qo.length;)Qo[s]===r?Qo.splice(s,rp):s+=rp;let o=t.indexOf(r);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(r,o){KV.epoch++;let s=!Qo.length;for(let l of t)Qo.push(l,n.value,r,o);if(s){for(Hs=0;Hs<Qo.length;Hs+=rp)Qo[Hs](Qo[Hs+1],Qo[Hs+2],Qo[Hs+3]);Qo.length=0}},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},ZV=5,op=6,ip=10;let YV=(e,t,n,r)=>(e.events=e.events||{},e.events[n+ip]||(e.events[n+ip]=r(o=>{e.events[n].reduceRight((s,l)=>(l(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+ip](),delete e.events[n+ip])});const WV=1e3;let lN=(e,t)=>YV(e,r=>{let o=t(r);o&&e.events[op].push(o)},ZV,r=>{let o=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,r()),o(...l));let s=e.off;return e.events[op]=[],e.off=()=>{s(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[op])l();e.events[op]=[]}},WV)},()=>{e.listen=o,e.off=s}});function QV(e,t,n){let r=new Set(t).add(void 0);return e.listen((o,s,l)=>{r.has(l)&&n(o,s,l)})}const XV=()=>typeof window>"u",Sd=(e,t,n,r)=>{const o=Cc({data:null,error:null,isPending:!0,isRefetching:!1,refetch:c=>s(c)}),s=async c=>new Promise(d=>{const f=typeof r=="function"?r({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):r;n(t,{...f,query:{...f?.query,...c?.query},async onSuccess(p){o.set({data:p.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await f?.onSuccess?.(p)},async onError(p){const{request:h}=p,g=typeof h.retry=="number"?h.retry:h.retry?.attempts,v=h.retryAttempt||0;g&&v<g||(o.set({error:p.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await f?.onError?.(p))},async onRequest(p){const h=o.get();o.set({isPending:h.data===null,data:h.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await f?.onRequest?.(p)}}).catch(p=>{o.set({error:p,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{d(void 0)})});e=Array.isArray(e)?e:[e];let l=!1;for(const c of e)c.subscribe(async()=>{XV()||(l?await s():lN(o,()=>{const d=setTimeout(async()=>{l||(await s(),l=!0)},0);return()=>{o.off(),c.off(),clearTimeout(d)}}))});return o},e_=Symbol.for("better-auth:broadcast-channel"),JV=()=>Math.floor(Date.now()/1e3);var eH=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:JV()}))}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 t_(e="better-auth.message"){return globalThis[e_]||(globalThis[e_]=new eH(e)),globalThis[e_]}const n_=Symbol.for("better-auth:focus-manager");var tH=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 VT(){return globalThis[n_]||(globalThis[n_]=new tH),globalThis[n_]}const r_=Symbol.for("better-auth:online-manager");var nH=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 o_(){return globalThis[r_]||(globalThis[r_]=new nH),globalThis[r_]}const sc=()=>Math.floor(Date.now()/1e3),rH=5;function oH(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:o={}}=e,s=o.sessionOptions?.refetchInterval??0,l=o.sessionOptions?.refetchOnWindowFocus??!0,c=o.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>c||o_().isOnline,p=E=>{if(!f())return;if(E?.event==="storage"){d.lastSync=sc(),n.set(!n.get());return}const T=t.get();if(E?.event==="poll"){d.lastSessionRequest=sc(),r("/get-session").then(R=>{R.error?t.set({...T,data:null,error:R.error}):t.set({...T,data:R.data,error:null}),d.lastSync=sc(),n.set(!n.get())}).catch(()=>{});return}if(E?.event==="visibilitychange"){if(sc()-d.lastSessionRequest<rH)return;d.lastSessionRequest=sc()}(T?.data===null||T?.data===void 0||E?.event==="visibilitychange")&&(d.lastSync=sc(),n.set(!n.get()))},h=E=>{t_().post({event:"session",data:{trigger:E},clientId:Math.random().toString(36).substring(7)})},g=()=>{s&&s>0&&(d.pollInterval=setInterval(()=>{t.get()?.data&&p({event:"poll"})},s*1e3))},v=()=>{d.unsubscribeBroadcast=t_().subscribe(()=>{p({event:"storage"})})},_=()=>{l&&(d.unsubscribeFocus=VT().subscribe(()=>{p({event:"visibilitychange"})}))},b=()=>{d.unsubscribeOnline=o_().subscribe(E=>{E&&p({event:"visibilitychange"})})};return{init:()=>{g(),v(),_(),b(),t_().setup(),VT().setup(),o_().setup()},cleanup:()=>{d.pollInterval&&(clearInterval(d.pollInterval),d.pollInterval=void 0),d.unsubscribeBroadcast&&(d.unsubscribeBroadcast(),d.unsubscribeBroadcast=void 0),d.unsubscribeFocus&&(d.unsubscribeFocus(),d.unsubscribeFocus=void 0),d.unsubscribeOnline&&(d.unsubscribeOnline(),d.unsubscribeOnline=void 0),d.lastSync=0,d.lastSessionRequest=0,d.cachedSession=void 0},triggerRefetch:p,broadcastSessionUpdate:h}}function iH(e,t){const n=Cc(!1),r=Sd(n,"/get-session",e,{method:"GET"});return lN(r,()=>{const o=oH({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return o.init(),()=>{o.cleanup()}}),{session:r,$sessionSignal:n}}function i_(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 Kb(e,t,n=".",r){if(!i_(t))return Kb(e,{},n,r);const o={...t};for(const s of Object.keys(e)){if(s==="__proto__"||s==="constructor")continue;const l=e[s];l!=null&&(r&&r(o,s,l,n)||(Array.isArray(l)&&Array.isArray(o[s])?o[s]=[...l,...o[s]]:i_(l)&&i_(o[s])?o[s]=Kb(l,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=l))}return o}function sH(e){return(...t)=>t.reduce((n,r)=>Kb(n,r,"",e),{})}const aH=sH();var lH=Object.defineProperty,cH=Object.defineProperties,uH=Object.getOwnPropertyDescriptors,HT=Object.getOwnPropertySymbols,dH=Object.prototype.hasOwnProperty,fH=Object.prototype.propertyIsEnumerable,qT=(e,t,n)=>t in e?lH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ni=(e,t)=>{for(var n in t||(t={}))dH.call(t,n)&&qT(e,n,t[n]);if(HT)for(var n of HT(t))fH.call(t,n)&&qT(e,n,t[n]);return e},yi=(e,t)=>cH(e,uH(t)),hH=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)}},pH=async(e,t)=>{var n,r,o,s,l,c;let d=t||{};const f={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:d,hooks:f};for(const p of t?.plugins||[]){if(p.init){const h=await((n=p.init)==null?void 0:n.call(p,e.toString(),t));d=h.options||d,e=h.url}f.onRequest.push((r=p.hooks)==null?void 0:r.onRequest),f.onResponse.push((o=p.hooks)==null?void 0:o.onResponse),f.onSuccess.push((s=p.hooks)==null?void 0:s.onSuccess),f.onError.push((l=p.hooks)==null?void 0:l.onError),f.onRetry.push((c=p.hooks)==null?void 0:c.onRetry)}return{url:e,options:d,hooks:f}},GT=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}},mH=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 gH(e){if(typeof e=="number")return new GT({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new GT(e);case"exponential":return new mH(e);default:throw new Error("Invalid retry strategy")}}var vH=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},yH=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function _H(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 yH.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function bH(e){try{return JSON.parse(e),!0}catch{return!1}}function Zb(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 KT(e){try{return JSON.parse(e)}catch{return e}}function ZT(e){return typeof e=="function"}function wH(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&ZT(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&ZT(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function SH(e){const t=new Headers(e?.headers),n=await vH(e);for(const[r,o]of Object.entries(n||{}))t.set(r,o);if(!t.has("content-type")){const r=EH(e?.body);r&&t.set("content-type",r)}return t}function EH(e){return Zb(e)?"application/json":null}function xH(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(Zb(e.body)&&!t.has("content-type")){for(const[n,r]of Object.entries(e?.body))r instanceof Date&&(e.body[n]=r.toISOString());return JSON.stringify(e.body)}return t.has("content-type")&&t.get("content-type")==="application/x-www-form-urlencoded"&&Zb(e.body)?new URLSearchParams(e.body).toString():e.body}function RH(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return uN.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function OH(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var TH=class cN extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,cN.prototype)}};async function wm(e,t){const n=await e["~standard"].validate(t);if(n.issues)throw new TH(n.issues);return n.value}var uN=["get","post","put","patch","delete"],CH=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,o,s,l;const c=((o=(r=e.plugins)==null?void 0:r.find(d=>{var f;return(f=d.schema)!=null&&f.config?t.startsWith(d.schema.config.baseURL||"")||t.startsWith(d.schema.config.prefix||""):!1}))==null?void 0:o.schema)||e.schema;if(c){let d=t;(s=c.config)!=null&&s.prefix&&d.startsWith(c.config.prefix)&&(d=d.replace(c.config.prefix,""),c.config.baseURL&&(t=t.replace(c.config.prefix,c.config.baseURL))),(l=c.config)!=null&&l.baseURL&&d.startsWith(c.config.baseURL)&&(d=d.replace(c.config.baseURL,""));const f=c.schema[d];if(f){let p=yi(ni({},n),{method:f.method,output:f.output});return n?.disableValidation||(p=yi(ni({},p),{body:f.input?await wm(f.input,n?.body):n?.body,params:f.params?await wm(f.params,n?.params):n?.params,query:f.query?await wm(f.query,n?.query):n?.query})),{url:t,options:p}}}return{url:t,options:n}}}),AH=e=>{async function t(n,r){const o=yi(ni(ni({},e),r),{plugins:[...e?.plugins||[],CH(e||{}),...r?.plugins||[]]});if(e?.catchAllError)try{return await Yb(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 Yb(n,o)}return t};function IH(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||"";if(e.startsWith("@")){const h=e.toString().split("@")[1].split("/")[0];uN.includes(h)&&(e=e.replace(`@${h}/`,"/"))}s.endsWith("/")||(s+="/");let[l,c]=e.replace(s,"").split("?");const d=new URLSearchParams(c);for(const[h,g]of Object.entries(o||{})){if(g==null)continue;let v;if(typeof g=="string")v=g;else if(Array.isArray(g)){for(const _ of g)d.append(h,_);continue}else v=JSON.stringify(g);d.set(h,v)}if(r)if(Array.isArray(r)){const h=l.split("/").filter(g=>g.startsWith(":"));for(const[g,v]of h.entries()){const _=r[g];l=l.replace(v,_)}}else for(const[h,g]of Object.entries(r))l=l.replace(`:${h}`,String(g));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",s.startsWith("http")?new URL(`${l}${f}`,s):`${s}${l}${f}`}var Yb=async(e,t)=>{var n,r,o,s,l,c,d,f;const{hooks:p,url:h,options:g}=await pH(e,t),v=wH(g),_=new AbortController,b=(n=g.signal)!=null?n:_.signal,x=IH(h,g),S=xH(g),E=await SH(g),T=RH(h,g);let R=yi(ni({},g),{url:x,headers:E,body:S,method:T,signal:b});for(const F of p.onRequest)if(F){const Z=await F(R);typeof Z=="object"&&Z!==null&&(R=Z)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:O}=OH(g,_);let A=await v(R.url,R);O();const I={response:A,request:R};for(const F of p.onResponse)if(F){const Z=await F(yi(ni({},I),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?A.clone():A}));Z instanceof Response?A=Z:typeof Z=="object"&&Z!==null&&(A=Z.response)}if(A.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const Z=_H(A),ie={data:null,response:A,request:R};if(Z==="json"||Z==="text"){const q=await A.text(),W=(s=R.jsonParser)!=null?s:KT;ie.data=await W(q)}else ie.data=await A[Z]();R?.output&&R.output&&!R.disableValidation&&(ie.data=await wm(R.output,ie.data));for(const q of p.onSuccess)q&&await q(yi(ni({},ie),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?A.clone():A}));return t?.throw?ie.data:{data:ie.data,error:null}}const M=(c=t?.jsonParser)!=null?c:KT,L=await A.text(),H=bH(L),j=H?await M(L):null,B={response:A,responseText:L,request:R,error:yi(ni({},j),{status:A.status,statusText:A.statusText})};for(const F of p.onError)F&&await F(yi(ni({},B),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?A.clone():A}));if(t?.retry){const F=gH(t.retry),Z=(f=t.retryAttempt)!=null?f:0;if(await F.shouldAttemptRetry(Z,A)){for(const q of p.onRetry)q&&await q(I);const ie=F.getDelay(Z);return await new Promise(q=>setTimeout(q,ie)),await Yb(e,yi(ni({},t),{retryAttempt:Z+1}))}}if(t?.throw)throw new hH(A.status,A.statusText,H?j:L);return{data:null,error:yi(ni({},j),{status:A.status,statusText:A.statusText})}};const PH=(e,t)=>{const n="credentials"in Request.prototype,r=jV(e?.baseURL,e?.basePath)??"/api/auth",o=e?.plugins?.flatMap(R=>R.fetchPlugins).filter(R=>R!==void 0)||[],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:l,onError:c,onRequest:d,onResponse:f,...p}=e?.fetchOptions||{},h=AH({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(R){return R?GV(R,{strict:!1}):null},customFetchImpl:fetch,...p,plugins:[s,...p.plugins||[],...e?.disableDefaultFetchPlugins?[]:[zV],...o]}),{$sessionSignal:g,session:v}=iH(h,e),_=e?.plugins||[];let b={};const x={$sessionSignal:g,session:v},S={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},E=[{signal:"$sessionSignal",matcher(R){return R==="/sign-out"||R==="/update-user"||R==="/sign-up/email"||R==="/sign-in/email"||R==="/delete-user"||R==="/verify-email"||R==="/revoke-sessions"||R==="/revoke-session"||R==="/change-email"}}];for(const R of _)R.getAtoms&&Object.assign(x,R.getAtoms?.(h)),R.pathMethods&&Object.assign(S,R.pathMethods),R.atomListeners&&E.push(...R.atomListeners);const T={notify:R=>{x[R].set(!x[R].get())},listen:(R,O)=>{x[R].subscribe(O)},atoms:x};for(const R of _)R.getActions&&(b=aH(R.getActions?.(h,T,e)??{},b));return{get baseURL(){return r},pluginsActions:b,pluginsAtoms:x,pluginPathMethods:S,atomListeners:E,$fetch:h,$store:T}};function MH(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function NH(e,t,n){const r=t[e],{fetchOptions:o,query:s,...l}=n||{};return r||(o?.method?o.method:l&&Object.keys(l).length>0?"POST":"GET")}function kH(e,t,n,r,o){function s(l=[]){return new Proxy(function(){},{get(c,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...l,d];let p=e;for(const h of f)if(p&&typeof p=="object"&&h in p)p=p[h];else{p=void 0;break}return typeof p=="function"||MH(p)?p:s(f)},apply:async(c,d,f)=>{const p="/"+l.map(E=>E.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),h=f[0]||{},g=f[1]||{},{query:v,fetchOptions:_,...b}=h,x={...g,..._},S=NH(p,n,h);return await t(p,{...x,body:S==="GET"?void 0:{...b,...x?.body||{}},query:v||x?.query,method:S,async onSuccess(E){if(await x?.onSuccess?.(E),!o||x.disableSignal)return;const T=o.filter(O=>O.matcher(p));if(!T.length)return;const R=new Set;for(const O of T){const A=r[O.signal];if(!A)return;if(R.has(O.signal))continue;R.add(O.signal);const I=A.get();setTimeout(()=>{A.set(!I)},10)}}})}})}return s()}function DH(e,t={}){const n=P.useRef(e.get()),{keys:r,deps:o=[e,r]}=t,s=P.useCallback(c=>{const d=f=>{n.current!==f&&(n.current=f,c())};return d(e.value),r?.length?QV(e,r,d):e.listen(d)},o),l=()=>n.current;return P.useSyncExternalStore(s,l,l)}function LH(e){return`use${DV(e)}`}function $H(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:o,$store:s,atomListeners:l}=PH(e),c={};for(const[d,f]of Object.entries(r))c[LH(d)]=()=>DH(f);return kH({...n,...c,$fetch:o,$store:s},o,t,r,l)}function jH(e){return{authorize(t,n="AND"){let r=!1;for(const[o,s]of Object.entries(t)){const l=e[o];if(!l)return{success:!1,error:`You are not allowed to access resource: ${o}`};if(Array.isArray(s))r=s.every(c=>l.includes(c));else if(typeof s=="object"){const c=s;c.connector==="OR"?r=c.actions.some(d=>l.includes(d)):r=c.actions.every(d=>l.includes(d))}else throw new kd("Invalid access control request");if(r&&n==="OR")return{success:r};if(!r&&n==="AND")return{success:!1,error:`unauthorized to access resource "${o}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:e}}function dN(e){return{newRole(t){return jH(t)},statements:e}}const zH={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},fN=dN(zH),hN=fN.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),pN=fN.newRole({user:[],session:[]}),UH={admin:hN,user:pN},FH=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||UH;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},BH=e=>{const t={admin:hN,user:pN,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>FH({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},VH=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),HH=()=>({id:"magic-link",$InferServerPlugin:{}}),qH={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},eS=dN(qH),mN=eS.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),gN=eS.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),vN=eS.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),GH={admin:mN,owner:gN,member:vN},KH=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",o=n.includes(r),s=e.allowCreatorAllPermissions||!1;if(o&&s)return!0;for(const l of n)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},ZH=e=>KH(e,e.options.roles||GH),YH=e=>{const t=Cc(!1),n=Cc(!1),r=Cc(!1),o=Cc(!1),s={admin:mN,member:vN,owner:gN,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,c,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>ZH({role:f.role,options:{ac:e?.ac,roles:s},permissions:f.permissions??f.permission})}}),getAtoms:l=>{const c=Sd(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:o,activeOrganization:Sd([n],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:c,activeMember:Sd([r],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Sd([o],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},WH=e=>({id:"sso-client",$InferServerPlugin:{}});function yN(e){const t=e?.metadata;if(!t)return!1;try{return(typeof t=="string"?JSON.parse(t):t).archived===!0}catch{return!1}}const Hg=$H({plugins:[YH({}),BH(),WH(),HH(),VH()]}),QH=3e4;let Ed=null,sp=null;function _N(){if(Ed&&Ed.expiresAt>Date.now())return Promise.resolve(Ed.result);if(sp)return sp;const e=Hg.organization.list().then(t=>{const n=t.data?{...t,data:t.data.filter(r=>!yN(r))}:t;return n.data&&(Ed={result:n,expiresAt:Date.now()+QH}),n}).finally(()=>{sp=null});return sp=e,e}function eue(){const e=Hg.useListOrganizations(),t=e.data?.filter(n=>!yN(n));return{...e,data:t}}function tue(){Ed=null}function bN(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=bN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tS(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bN(e))&&(r&&(r+=" "),r+=t);return r}const XH=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},JH=(e,t)=>({classGroupId:e,validator:t}),wN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qm="-",YT=[],eq="arbitrary..",tq=e=>{const t=rq(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return nq(l);const c=l.split(qm),d=c[0]===""&&c.length>1?1:0;return SN(c,d,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=r[l],f=n[l];return d?f?XH(f,d):d:f||YT}return n[l]||YT}}},SN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=SN(e,t+1,s);if(f)return f}const l=n.validators;if(l===null)return;const c=t===0?e.join(qm):e.slice(t).join(qm),d=l.length;for(let f=0;f<d;f++){const p=l[f];if(p.validator(c))return p.classGroupId}},nq=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?eq+r:void 0})(),rq=e=>{const{theme:t,classGroups:n}=e;return oq(n,t)},oq=(e,t)=>{const n=wN();for(const r in e){const o=e[r];nS(o,n,r,t)}return n},nS=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];iq(l,t,n,r)}},iq=(e,t,n,r)=>{if(typeof e=="string"){sq(e,t,n);return}if(typeof e=="function"){aq(e,t,n,r);return}lq(e,t,n,r)},sq=(e,t,n)=>{const r=e===""?t:EN(t,e);r.classGroupId=n},aq=(e,t,n,r)=>{if(cq(e)){nS(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(JH(n,e))},lq=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,d]=o[l];nS(d,EN(t,c),n,r)}},EN=(e,t)=>{let n=e;const r=t.split(qm),o=r.length;for(let s=0;s<o;s++){const l=r[s];let c=n.nextPart.get(l);c||(c=wN(),n.nextPart.set(l,c)),n=c}return n},cq=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,uq=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},Wb="!",WT=":",dq=[],QT=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),fq=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let l=0,c=0,d=0,f;const p=o.length;for(let b=0;b<p;b++){const x=o[b];if(l===0&&c===0){if(x===WT){s.push(o.slice(d,b)),d=b+1;continue}if(x==="/"){f=b;continue}}x==="["?l++:x==="]"?l--:x==="("?c++:x===")"&&c--}const h=s.length===0?o:o.slice(d);let g=h,v=!1;h.endsWith(Wb)?(g=h.slice(0,-1),v=!0):h.startsWith(Wb)&&(g=h.slice(1),v=!0);const _=f&&f>d?f-d:void 0;return QT(s,v,g,_)};if(t){const o=t+WT,s=r;r=l=>l.startsWith(o)?s(l.slice(o.length)):QT(dq,!1,l,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},hq=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",d=t.has(l);c||d?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},pq=e=>({cache:uq(e.cacheSize),parseClassName:fq(e),sortModifiers:hq(e),postfixLookupClassGroupIds:mq(e),...tq(e)}),mq=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},gq=/\s+/,vq=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:l}=t,c=[],d=e.trim().split(gq);let f="";for(let p=d.length-1;p>=0;p-=1){const h=d[p],{isExternal:g,modifiers:v,hasImportantModifier:_,baseClassName:b,maybePostfixModifierPosition:x}=n(h);if(g){f=h+(f.length>0?" "+f:f);continue}let S=!!x,E;if(S){const I=b.substring(0,x);E=r(I);const M=E&&l[E]?r(b):void 0;M&&M!==E&&(E=M,S=!1)}else E=r(b);if(!E){if(!S){f=h+(f.length>0?" "+f:f);continue}if(E=r(b),!E){f=h+(f.length>0?" "+f:f);continue}S=!1}const T=v.length===0?"":v.length===1?v[0]:s(v).join(":"),R=_?T+Wb:T,O=R+E;if(c.indexOf(O)>-1)continue;c.push(O);const A=o(E,S);for(let I=0;I<A.length;++I){const M=A[I];c.push(R+M)}f=h+(f.length>0?" "+f:f)}return f},yq=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=xN(n))&&(o&&(o+=" "),o+=r);return o},xN=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=xN(e[r]))&&(n&&(n+=" "),n+=t);return n},_q=(e,...t)=>{let n,r,o,s;const l=d=>{const f=t.reduce((p,h)=>h(p),e());return n=pq(f),r=n.cache.get,o=n.cache.set,s=c,c(d)},c=d=>{const f=r(d);if(f)return f;const p=vq(d,n);return o(d,p),p};return s=l,(...d)=>s(yq(...d))},bq=[],Kn=e=>{const t=n=>n[e]||bq;return t.isThemeGetter=!0,t},RN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ON=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wq=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Sq=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Eq=/\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$/,xq=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oq=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qs=e=>wq.test(e),gt=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),s_=e=>e.endsWith("%")&>(e.slice(0,-1)),Xi=e=>Sq.test(e),TN=()=>!0,Tq=e=>Eq.test(e)&&!xq.test(e),rS=()=>!1,Cq=e=>Rq.test(e),Aq=e=>Oq.test(e),Iq=e=>!Ve(e)&&!He(e),Pq=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Mq=e=>wa(e,IN,rS),Ve=e=>RN.test(e),Ba=e=>wa(e,PN,Tq),XT=e=>wa(e,Uq,gt),Nq=e=>wa(e,NN,TN),kq=e=>wa(e,MN,rS),JT=e=>wa(e,CN,rS),Dq=e=>wa(e,AN,Aq),ap=e=>wa(e,kN,Cq),He=e=>ON.test(e),od=e=>ml(e,PN),Lq=e=>ml(e,MN),eC=e=>ml(e,CN),$q=e=>ml(e,IN),jq=e=>ml(e,AN),lp=e=>ml(e,kN,!0),zq=e=>ml(e,NN,!0),wa=(e,t,n)=>{const r=RN.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ml=(e,t,n=!1)=>{const r=ON.exec(e);return r?r[1]?t(r[1]):n:!1},CN=e=>e==="position"||e==="percentage",AN=e=>e==="image"||e==="url",IN=e=>e==="length"||e==="size"||e==="bg-size",PN=e=>e==="length",Uq=e=>e==="number",MN=e=>e==="family-name",NN=e=>e==="number"||e==="weight",kN=e=>e==="shadow",Fq=()=>{const e=Kn("color"),t=Kn("font"),n=Kn("text"),r=Kn("font-weight"),o=Kn("tracking"),s=Kn("leading"),l=Kn("breakpoint"),c=Kn("container"),d=Kn("spacing"),f=Kn("radius"),p=Kn("shadow"),h=Kn("inset-shadow"),g=Kn("text-shadow"),v=Kn("drop-shadow"),_=Kn("blur"),b=Kn("perspective"),x=Kn("aspect"),S=Kn("ease"),E=Kn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...R(),He,Ve],A=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],M=()=>[He,Ve,d],L=()=>[qs,"full","auto",...M()],H=()=>[pi,"none","subgrid",He,Ve],j=()=>["auto",{span:["full",pi,He,Ve]},pi,He,Ve],B=()=>[pi,"auto",He,Ve],F=()=>["auto","min","max","fr",He,Ve],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...M()],W=()=>[qs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],te=()=>[qs,"screen","full","dvw","lvw","svw","min","max","fit",...M()],le=()=>[qs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],Q=()=>[e,He,Ve],k=()=>[...R(),eC,JT,{position:[He,Ve]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",$q,Mq,{size:[He,Ve]}],D=()=>[s_,od,Ba],U=()=>["","none","full",f,He,Ve],X=()=>["",gt,od,Ba],fe=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[gt,s_,eC,JT],je=()=>["","none",_,He,Ve],Y=()=>["none",gt,He,Ve],re=()=>["none",gt,He,Ve],ve=()=>[gt,He,Ve],se=()=>[qs,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xi],breakpoint:[Xi],color:[TN],container:[Xi],"drop-shadow":[Xi],ease:["in","out","in-out"],font:[Iq],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xi],shadow:[Xi],spacing:["px",gt],text:[Xi],"text-shadow":[Xi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qs,Ve,He,x]}],container:["container"],"container-type":[{"@container":["","normal","size",He,Ve]}],"container-named":[Pq],columns:[{columns:[gt,Ve,He,c]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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"],sr:["sr-only","not-sr-only"],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:O()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",He,Ve]}],basis:[{basis:[qs,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[gt,qs,"auto","initial","none",Ve]}],grow:[{grow:["",gt,He,Ve]}],shrink:[{shrink:["",gt,He,Ve]}],order:[{order:[pi,"first","last","none",He,Ve]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[c,"screen",...W()]}],"min-w":[{"min-w":[c,"screen","none",...W()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,od,Ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,zq,Nq]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",s_,Ve]}],"font-family":[{font:[Lq,kq,t]}],"font-features":[{"font-features":[Ve]}],"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:[o,He,Ve]}],"line-clamp":[{"line-clamp":[gt,"none",He,XT]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",He,Ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",He,Ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[gt,"from-font","auto",He,Ba]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[gt,"auto",He,Ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"tab-size":[{tab:[pi,He,Ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He,Ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He,Ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,He,Ve],radial:["",He,Ve],conic:[pi,He,Ve]},jq,Dq]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-bs":[{"border-bs":Q()}],"border-color-be":[{"border-be":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[gt,He,Ve]}],"outline-w":[{outline:["",gt,od,Ba]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",p,lp,ap]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",h,lp,ap]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[gt,Ba]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",g,lp,ap]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[gt,He,Ve]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[gt]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[He,Ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[gt]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",He,Ve]}],filter:[{filter:["","none",He,Ve]}],blur:[{blur:je()}],brightness:[{brightness:[gt,He,Ve]}],contrast:[{contrast:[gt,He,Ve]}],"drop-shadow":[{"drop-shadow":["","none",v,lp,ap]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",gt,He,Ve]}],"hue-rotate":[{"hue-rotate":[gt,He,Ve]}],invert:[{invert:["",gt,He,Ve]}],saturate:[{saturate:[gt,He,Ve]}],sepia:[{sepia:["",gt,He,Ve]}],"backdrop-filter":[{"backdrop-filter":["","none",He,Ve]}],"backdrop-blur":[{"backdrop-blur":je()}],"backdrop-brightness":[{"backdrop-brightness":[gt,He,Ve]}],"backdrop-contrast":[{"backdrop-contrast":[gt,He,Ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",gt,He,Ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[gt,He,Ve]}],"backdrop-invert":[{"backdrop-invert":["",gt,He,Ve]}],"backdrop-opacity":[{"backdrop-opacity":[gt,He,Ve]}],"backdrop-saturate":[{"backdrop-saturate":[gt,He,Ve]}],"backdrop-sepia":[{"backdrop-sepia":["",gt,He,Ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",He,Ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[gt,"initial",He,Ve]}],ease:[{ease:["linear","initial",S,He,Ve]}],delay:[{delay:[gt,He,Ve]}],animate:[{animate:["none",E,He,Ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,He,Ve]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[He,Ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],zoom:[{zoom:[pi,He,Ve]}],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",He,Ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":Q()}],"scrollbar-track-color":[{"scrollbar-track":Q()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",He,Ve]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[gt,od,Ba,XT]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},DN=_q(Fq);function Ce(...e){return DN(tS(e))}function Bq(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function kn({error:e,localization:t,localizeErrors:n=!0}){var r;const o="Request failed";if(!n)return e?.message?e.message:(r=e?.error)!=null&&r.message?e.error.message:o;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const s=e.error.code;if(t?.[s])return t[s]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||o}function gl(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Qb(e,t){for(const n in e)if(e[n]===t)return n}function Wd(e,t){let n=$().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var Vq={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},Hq={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},qq={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},Gq={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},Kq={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},Zq={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},Yq={...Kq,...Zq},Wq={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},Qq={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},Xq={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Jq={INVALID_SESSION_TOKEN:"Invalid session token"},eG={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},tG={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},nG={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},rG={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},oG={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},iG={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},sG={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},aG={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...Gq,...Vq,...Hq,...qq,...Yq,...Wq,...Qq,...Xq,...Jq,...eG,...tG,...nG,...rG,...oG,...iG,...sG},lG={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},tC={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},nC={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function cG(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const uG=e=>{switch(e){case"success":return hG;case"info":return mG;case"warning":return pG;case"error":return gG;default:return null}},dG=Array(12).fill(0),fG=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},dG.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),vG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yG=()=>{const[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Xb=1;class _G{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Xb++,l=this.toasts.find(d=>d.id===s),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...t,id:s,title:r}),{...d,...t,id:s,dismissible:c,title:r}):d):this.addToast({title:r,...o,dismissible:c,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,l;const c=o.then(async f=>{if(l=["resolve",f],ee.isValidElement(f))s=!1,this.create({id:r,type:"default",message:f});else if(wG(f)&&!f.ok){s=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,_=typeof h=="object"&&!ee.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,..._})}else if(f instanceof Error){s=!1;const h=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,_=typeof h=="object"&&!ee.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,..._})}else if(n.success!==void 0){s=!1;const h=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,_=typeof h=="object"&&!ee.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:g,..._})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){s=!1;const p=typeof n.error=="function"?await n.error(f):n.error,h=typeof n.description=="function"?await n.description(f):n.description,v=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:h,...v})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,p)=>c.then(()=>l[0]==="reject"?p(l[1]):f(l[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||Xb++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Qr=new _G,bG=(e,t)=>{const n=t?.id||Xb++;return Qr.addToast({title:e,...t,id:n}),n},wG=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",SG=bG,EG=()=>Qr.toasts,xG=()=>Qr.getActiveToasts(),rC=Object.assign(SG,{success:Qr.success,info:Qr.info,warning:Qr.warning,error:Qr.error,custom:Qr.custom,message:Qr.message,promise:Qr.promise,dismiss:Qr.dismiss,loading:Qr.loading},{getHistory:EG,getToasts:xG});cG("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function cp(e){return e.label!==void 0}const RG=3,OG="24px",TG="16px",oC=4e3,CG=356,AG=14,IG=45,PG=200;function mi(...e){return e.filter(Boolean).join(" ")}function MG(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const NG=e=>{var t,n,r,o,s,l,c,d,f;const{invert:p,toast:h,unstyled:g,interacting:v,setHeights:_,visibleToasts:b,heights:x,index:S,toasts:E,expanded:T,removeToast:R,defaultRichColors:O,closeButton:A,style:I,cancelButtonStyle:M,actionButtonStyle:L,className:H="",descriptionClassName:j="",duration:B,position:F,gap:Z,expandByDefault:ie,classNames:q,icons:W,closeButtonAriaLabel:te="Close toast"}=e,[le,Q]=ee.useState(null),[k,G]=ee.useState(null),[V,D]=ee.useState(!1),[U,X]=ee.useState(!1),[fe,pe]=ee.useState(!1),[xe,je]=ee.useState(!1),[Y,re]=ee.useState(!1),[ve,se]=ee.useState(0),[Se,Te]=ee.useState(0),tt=ee.useRef(h.duration||B||oC),rt=ee.useRef(null),Be=ee.useRef(null),Qe=S===0,Me=S+1<=b,Pe=h.type,Fe=h.dismissible!==!1,K=h.className||"",ne=h.descriptionClassName||"",ae=ee.useMemo(()=>x.findIndex(Ke=>Ke.toastId===h.id)||0,[x,h.id]),Oe=ee.useMemo(()=>{var Ke;return(Ke=h.closeButton)!=null?Ke:A},[h.closeButton,A]),Ae=ee.useMemo(()=>h.duration||B||oC,[h.duration,B]),Ie=ee.useRef(0),ke=ee.useRef(0),Je=ee.useRef(0),et=ee.useRef(null),[_t,Tt]=F.split("-"),bt=ee.useMemo(()=>x.reduce((Ke,ft,Jt)=>Jt>=ae?Ke:Ke+ft.height,0),[x,ae]),Ln=yG(),Ni=h.invert||p,Go=Pe==="loading";ke.current=ee.useMemo(()=>ae*Z+bt,[ae,bt]),ee.useEffect(()=>{tt.current=Ae},[Ae]),ee.useEffect(()=>{D(!0)},[]),ee.useEffect(()=>{const Ke=Be.current;if(Ke){const ft=Ke.getBoundingClientRect().height;return Te(ft),_(Jt=>[{toastId:h.id,height:ft,position:h.position},...Jt]),()=>_(Jt=>Jt.filter(Zt=>Zt.toastId!==h.id))}},[_,h.id]),ee.useLayoutEffect(()=>{if(!V)return;const Ke=Be.current,ft=Ke.style.height;Ke.style.height="auto";const Jt=Ke.getBoundingClientRect().height;Ke.style.height=ft,Te(Jt),_(Zt=>Zt.find(Lt=>Lt.toastId===h.id)?Zt.map(Lt=>Lt.toastId===h.id?{...Lt,height:Jt}:Lt):[{toastId:h.id,height:Jt,position:h.position},...Zt])},[V,h.title,h.description,_,h.id,h.jsx,h.action,h.cancel]);const Ye=ee.useCallback(()=>{X(!0),se(ke.current),_(Ke=>Ke.filter(ft=>ft.toastId!==h.id)),setTimeout(()=>{R(h)},PG)},[h,R,_,ke]);ee.useEffect(()=>{if(h.promise&&Pe==="loading"||h.duration===1/0||h.type==="loading")return;let Ke;return T||v||Ln?(()=>{if(Je.current<Ie.current){const Zt=new Date().getTime()-Ie.current;tt.current=tt.current-Zt}Je.current=new Date().getTime()})():tt.current!==1/0&&(Ie.current=new Date().getTime(),Ke=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Ye()},tt.current)),()=>clearTimeout(Ke)},[T,v,h,Pe,Ln,Ye]),ee.useEffect(()=>{h.delete&&(Ye(),h.onDismiss==null||h.onDismiss.call(h,h))},[Ye,h.delete]);function pt(){var Ke;if(W?.loading){var ft;return ee.createElement("div",{className:mi(q?.loader,h==null||(ft=h.classNames)==null?void 0:ft.loader,"sonner-loader"),"data-visible":Pe==="loading"},W.loading)}return ee.createElement(fG,{className:mi(q?.loader,h==null||(Ke=h.classNames)==null?void 0:Ke.loader),visible:Pe==="loading"})}const Ct=h.icon||W?.[Pe]||uG(Pe);var st,Dt;return ee.createElement("li",{tabIndex:0,ref:Be,className:mi(H,K,q?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,q?.default,q?.[Pe],h==null||(n=h.classNames)==null?void 0:n[Pe]),"data-sonner-toast":"","data-rich-colors":(st=h.richColors)!=null?st:O,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":V,"data-promise":!!h.promise,"data-swiped":Y,"data-removed":U,"data-visible":Me,"data-y-position":_t,"data-x-position":Tt,"data-index":S,"data-front":Qe,"data-swiping":fe,"data-dismissible":Fe,"data-type":Pe,"data-invert":Ni,"data-swipe-out":xe,"data-swipe-direction":k,"data-expanded":!!(T||ie&&V),"data-testid":h.testId,style:{"--index":S,"--toasts-before":S,"--z-index":E.length-S,"--offset":`${U?ve:ke.current}px`,"--initial-height":ie?"auto":`${Se}px`,...I,...h.style},onDragEnd:()=>{pe(!1),Q(null),et.current=null},onPointerDown:Ke=>{Ke.button!==2&&(Go||!Fe||(rt.current=new Date,se(ke.current),Ke.target.setPointerCapture(Ke.pointerId),Ke.target.tagName!=="BUTTON"&&(pe(!0),et.current={x:Ke.clientX,y:Ke.clientY})))},onPointerUp:()=>{var Ke,ft,Jt;if(xe||!Fe)return;et.current=null;const Zt=Number(((Ke=Be.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Sr=Number(((ft=Be.current)==null?void 0:ft.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Lt=new Date().getTime()-((Jt=rt.current)==null?void 0:Jt.getTime()),ln=le==="x"?Zt:Sr,So=Math.abs(ln)/Lt;if(Math.abs(ln)>=IG||So>.11){se(ke.current),h.onDismiss==null||h.onDismiss.call(h,h),G(le==="x"?Zt>0?"right":"left":Sr>0?"down":"up"),Ye(),je(!0);return}else{var sr,Ur;(sr=Be.current)==null||sr.style.setProperty("--swipe-amount-x","0px"),(Ur=Be.current)==null||Ur.style.setProperty("--swipe-amount-y","0px")}re(!1),pe(!1),Q(null)},onPointerMove:Ke=>{var ft,Jt,Zt;if(!et.current||!Fe||((ft=window.getSelection())==null?void 0:ft.toString().length)>0)return;const Lt=Ke.clientY-et.current.y,ln=Ke.clientX-et.current.x;var So;const sr=(So=e.swipeDirections)!=null?So:MG(F);!le&&(Math.abs(ln)>1||Math.abs(Lt)>1)&&Q(Math.abs(ln)>Math.abs(Lt)?"x":"y");let Ur={x:0,y:0};const bl=Ko=>1/(1.5+Math.abs(Ko)/20);if(le==="y"){if(sr.includes("top")||sr.includes("bottom"))if(sr.includes("top")&&Lt<0||sr.includes("bottom")&&Lt>0)Ur.y=Lt;else{const Ko=Lt*bl(Lt);Ur.y=Math.abs(Ko)<Math.abs(Lt)?Ko:Lt}}else if(le==="x"&&(sr.includes("left")||sr.includes("right")))if(sr.includes("left")&&ln<0||sr.includes("right")&&ln>0)Ur.x=ln;else{const Ko=ln*bl(ln);Ur.x=Math.abs(Ko)<Math.abs(ln)?Ko:ln}(Math.abs(Ur.x)>0||Math.abs(Ur.y)>0)&&re(!0),(Jt=Be.current)==null||Jt.style.setProperty("--swipe-amount-x",`${Ur.x}px`),(Zt=Be.current)==null||Zt.style.setProperty("--swipe-amount-y",`${Ur.y}px`)}},Oe&&!h.jsx&&Pe!=="loading"?ee.createElement("button",{"aria-label":te,"data-disabled":Go,"data-close-button":!0,onClick:Go||!Fe?()=>{}:()=>{Ye(),h.onDismiss==null||h.onDismiss.call(h,h)},className:mi(q?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Dt=W?.close)!=null?Dt:vG):null,(Pe||h.icon||h.promise)&&h.icon!==null&&(W?.[Pe]!==null||h.icon)?ee.createElement("div",{"data-icon":"",className:mi(q?.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||pt():null,h.type!=="loading"?Ct:null):null,ee.createElement("div",{"data-content":"",className:mi(q?.content,h==null||(s=h.classNames)==null?void 0:s.content)},ee.createElement("div",{"data-title":"",className:mi(q?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?ee.createElement("div",{"data-description":"",className:mi(j,ne,q?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),ee.isValidElement(h.cancel)?h.cancel:h.cancel&&cp(h.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||M,onClick:Ke=>{cp(h.cancel)&&Fe&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Ke),Ye())},className:mi(q?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,ee.isValidElement(h.action)?h.action:h.action&&cp(h.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:Ke=>{cp(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Ke),!Ke.defaultPrevented&&Ye())},className:mi(q?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function iC(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function kG(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,l=s?"--mobile-offset":"--offset",c=s?TG:OG;function d(f){["top","right","bottom","left"].forEach(p=>{n[`${l}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${l}-${f}`]=c:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(c)}),n}const DG=ee.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:p,mobileOffset:h,theme:g="light",richColors:v,duration:_,style:b,visibleToasts:x=RG,toastOptions:S,dir:E=iC(),gap:T=AG,icons:R,containerAriaLabel:O="Notifications"}=t,[A,I]=ee.useState([]),M=ee.useMemo(()=>r?A.filter(V=>V.toasterId===r):A.filter(V=>!V.toasterId),[A,r]),L=ee.useMemo(()=>Array.from(new Set([s].concat(M.filter(V=>V.position).map(V=>V.position)))),[M,s]),[H,j]=ee.useState([]),[B,F]=ee.useState(!1),[Z,ie]=ee.useState(!1),[q,W]=ee.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),te=ee.useRef(null),le=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=ee.useRef(null),k=ee.useRef(!1),G=ee.useCallback(V=>{I(D=>{var U;return(U=D.find(X=>X.id===V.id))!=null&&U.delete||Qr.dismiss(V.id),D.filter(({id:X})=>X!==V.id)})},[]);return ee.useEffect(()=>Qr.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{I(D=>D.map(U=>U.id===V.id?{...U,delete:!0}:U))});return}setTimeout(()=>{WM.flushSync(()=>{I(D=>{const U=D.findIndex(X=>X.id===V.id);return U!==-1?[...D.slice(0,U),{...D[U],...V},...D.slice(U+1)]:[V,...D]})})})}),[A]),ee.useEffect(()=>{if(g!=="system"){W(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:D})=>{W(D?"dark":"light")})}catch{V.addListener(({matches:U})=>{try{W(U?"dark":"light")}catch(X){console.error(X)}})}},[g]),ee.useEffect(()=>{A.length<=1&&F(!1)},[A]),ee.useEffect(()=>{const V=D=>{var U;if(l.every(pe=>D[pe]||D.code===pe)){var fe;F(!0),(fe=te.current)==null||fe.focus()}D.code==="Escape"&&(document.activeElement===te.current||(U=te.current)!=null&&U.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[l]),ee.useEffect(()=>{if(te.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,k.current=!1)}},[te.current]),ee.createElement("section",{ref:n,"aria-label":`${O} ${le}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((V,D)=>{var U;const[X,fe]=V.split("-");return M.length?ee.createElement("ol",{key:V,dir:E==="auto"?iC():E,tabIndex:-1,ref:te,className:f,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":X,"data-x-position":fe,style:{"--front-toast-height":`${((U=H[0])==null?void 0:U.height)||0}px`,"--width":`${CG}px`,"--gap":`${T}px`,...b,...kG(p,h)},onBlur:pe=>{k.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(k.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||k.current||(k.current=!0,Q.current=pe.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{Z||F(!1)},onDragEnd:()=>F(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},M.filter(pe=>!pe.position&&D===0||pe.position===V).map((pe,xe)=>{var je,Y;return ee.createElement(NG,{key:pe.id,icons:R,index:xe,toast:pe,defaultRichColors:v,duration:(je=S?.duration)!=null?je:_,className:S?.className,descriptionClassName:S?.descriptionClassName,invert:o,visibleToasts:x,closeButton:(Y=S?.closeButton)!=null?Y:d,interacting:Z,position:V,style:S?.style,unstyled:S?.unstyled,classNames:S?.classNames,cancelButtonStyle:S?.cancelButtonStyle,actionButtonStyle:S?.actionButtonStyle,closeButtonAriaLabel:S?.closeButtonAriaLabel,removeToast:G,toasts:M.filter(re=>re.position==pe.position),heights:H.filter(re=>re.position==pe.position),setHeights:j,expandByDefault:c,gap:T,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),LN=P.createContext({});function $N(){return P.useContext(LN)}var a_,sC;function LG(){if(sC)return a_;sC=1;var e=function(){};return a_=e,a_}var $G=LG();const jG=hl($G);function zG({async:e,appendTo:t,defer:n,id:r,nonce:o,src:s}){const l=document.createElement("script");e!==void 0&&(l.async=e),n!==void 0&&(l.defer=n),r&&(l.id=r),o&&l.setAttribute("nonce",o),l.src=s,(t==="head"?document.head:document.body).appendChild(l)}var UG=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};let Dd=null,Qd=!1;const Gm=new Set,Km=new Set,FG=typeof window<"u",Dc="___grecaptcha_cfg",jN=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function BG(){if(!FG)return;function e(n){if(Qd)n();else{window[Dc]||(window[Dc]={});const r=window[Dc];r.fns||(r.fns=[]),r.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){Qd=!0;for(const n of Km)n();Km.clear()}window[jN]=t}function VG({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:o=!1}){const s=o?"recaptcha.net":"google.com",l=r?"enterprise.js":"api.js",c=new URLSearchParams({render:n});return t&&c.set("onload",t),e&&c.set("hl",e),`https://www.${s}/recaptcha/${l}?${c.toString()}`}function HG({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:o}){const s={id:"google-recaptcha-v3"},l=VG({language:e,onLoadCallbackName:jN,render:t,useEnterprise:r,useRecaptchaNet:o});if(Dd){if(Dd!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Dd=l,zG(Object.assign(Object.assign(Object.assign({},s),n),{src:l}))}function qG(e){if(!window[Dc])return;const t=window[Dc];t.clients&&delete t.clients[e]}function GG(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,o=UG(t,["onLoadCallback","onLoadCallbackName"]);if(Gm.size===0&&BG(),HG(o),Gm.add(e),n&&(Qd?n():Km.add(n)),r){let s=function(){if(!r)return;const l=window[r];typeof l=="function"&&l()};Qd?s():Km.add(s)}}function KG(e){var t,n,r;Gm.delete(e),Gm.size===0&&(window.grecaptcha=void 0,window[Dc]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Dd}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Dd=null,Qd=!1)}let aC=!1;function ZG({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:o,useEnterprise:s,useRecaptchaNet:l}){var c,d,f,p,h,g,v;const _=P.useId(),[b,x]=P.useState(null),[S,E]=P.useState(null),T=P.useRef(!1);P.useEffect(()=>{function I(){var M;const L=s?(M=window.grecaptcha)===null||M===void 0?void 0:M.enterprise:window.grecaptcha;if(!L)throw new Error("reCAPTCHA not found");if(!L.ready)throw new Error("reCAPTCHA ready callback not found");L.ready(()=>{x(L)})}return GG(_,{language:n,onLoadCallback:I,onLoadCallbackName:o?.onLoadCallbackName,render:e?.element?"explicit":r,scriptProps:{appendTo:o?.appendTo,async:o?.async,defer:o?.defer,id:o?.id,nonce:o?.nonce},useEnterprise:s,useRecaptchaNet:l}),()=>{KG(_),x(null)}},[e?.element,_,n,r,o?.appendTo,o?.async,o?.defer,o?.id,o?.nonce,o?.onLoadCallbackName,s,l]),P.useEffect(()=>{var I,M,L;if(!e?.element||!b?.render)return;const H={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((I=e.parameters)===null||I===void 0?void 0:I.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},j=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!j)throw new Error("reCAPTCHA container element not found");const B=b.render(j,H);return!((M=e?.parameters)===null||M===void 0)&&M.hidden&&(aC||(jG(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),aC=!0),(L=j.querySelector(".grecaptcha-badge"))===null||L===void 0||L.style.setProperty("display","none")),E(B),T.current=!0,()=>{E(null),T.current=!1,qG(B),j.innerHTML=""}},[e?.element,(c=e?.parameters)===null||c===void 0?void 0:c.badge,(d=e?.parameters)===null||d===void 0?void 0:d.hidden,(f=e?.parameters)===null||f===void 0?void 0:f.callback,(p=e?.parameters)===null||p===void 0?void 0:p.errorCallback,(h=e?.parameters)===null||h===void 0?void 0:h.expiredCallback,(g=e?.parameters)===null||g===void 0?void 0:g.tabindex,(v=e?.parameters)===null||v===void 0?void 0:v.theme,b,r]);const R=!!e?.element,O=R?S:r,A=P.useMemo(()=>O!==null&&b?.execute?I=>{if(O===null||!b?.execute)throw new Error("reCAPTCHA has not been loaded");return R&&!T.current?(console.warn("Client ID not mounted"),null):b.execute(O,{action:I})}:void 0,[O,b,R]);return C.jsx(LN.Provider,{value:{container:e?.element,executeRecaptcha:A,reCaptchaInstance:b},children:t})}var YG=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const r of n)r()}}},No=new YG;function WG(){return()=>{}}function gs(){return P.useSyncExternalStore(WG,()=>!0,()=>!1)}function zN(){const[e,t]=P.useState();return P.useEffect(()=>{const n=()=>{const o=document.documentElement.getAttribute("lang");t(o??void 0)};n();const r=new MutationObserver(o=>{for(const s of o)s.attributeName==="lang"&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{lang:e}}function oS(){const[e,t]=P.useState("light");return P.useEffect(()=>{const n=()=>{var o;const s=document.documentElement.classList.contains("dark")||((o=document.documentElement.getAttribute("style"))==null?void 0:o.includes("color-scheme: dark"));t(s?"dark":"light")};n();const r=new MutationObserver(o=>{for(const s of o)(s.attributeName==="style"||s.attributeName==="class")&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{theme:e}}function QG({children:e}){const t=gs(),{captcha:n}=P.useContext(vt);return n?.provider!=="google-recaptcha-v3"?e:C.jsxs(ZG,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&C.jsx("style",{children:`
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const c=l[1];if(t===l[0]){s(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){s(l);continue}}if(e.metadataRegistry.get(l[0])?.id){s(l);continue}if(c.cycle){s(l);continue}if(c.count>1&&e.reused==="ref"){s(l);continue}}}function Vm(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const c=e.seen.get(l);if(c.ref===null)return;const d=c.def??c.schema,f={...d},p=c.ref;if(c.ref=null,p){r(p);const g=e.seen.get(p),v=g.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(v)):Object.assign(d,v),Object.assign(d,f),l._zod.parent===p)for(const b in d)b==="$ref"||b==="allOf"||b in f||delete d[b];if(v.$ref&&g.def)for(const b in d)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(d[b])===JSON.stringify(g.def[b])&&delete d[b]}const h=l._zod.parent;if(h&&h!==p){r(h);const g=e.seen.get(h);if(g?.schema.$ref&&(d.$ref=g.schema.$ref,g.def))for(const v in d)v==="$ref"||v==="allOf"||v in g.def&&JSON.stringify(d[v])===JSON.stringify(g.def[v])&&delete d[v]}e.override({zodSchema:l,jsonSchema:d,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);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 l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Object.assign(o,n.def??n.schema);const s=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(s[c.defId]=c.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Hm(t,"input",e.processors),output:Hm(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Dr(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 Dr(r.element,n);if(r.type==="set")return Dr(r.valueType,n);if(r.type==="lazy")return Dr(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")return Dr(r.innerType,n);if(r.type==="intersection")return Dr(r.left,n)||Dr(r.right,n);if(r.type==="record"||r.type==="map")return Dr(r.keyType,n)||Dr(r.valueType,n);if(r.type==="pipe")return Dr(r.in,n)||Dr(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Dr(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Dr(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Dr(o,n))return!0;return!!(r.rest&&Dr(r.rest,n))}return!1}const iB=(e,t={})=>n=>{const r=Fm({...n,processors:t});return sn(e,r),Bm(r,e),Vm(r,e)},Hm=(e,t,n={})=>r=>{const{libraryOptions:o,target:s}=r??{},l=Fm({...o??{},target:s,io:t,processors:n});return sn(e,l),Bm(l,e),Vm(l,e)},sB={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},E3=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:s,maximum:l,format:c,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof s=="number"&&(o.minLength=s),typeof l=="number"&&(o.maxLength=l),c&&(o.format=sB[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),f&&(o.contentEncoding=f),d&&d.size>0){const p=[...d];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(h=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:h.source}))])}},x3=(e,t,n,r)=>{const o=n,{minimum:s,maximum:l,format:c,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:p}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number",typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p),typeof s=="number"&&(o.minimum=s,typeof p=="number"&&t.target!=="draft-04"&&(p>=s?delete o.minimum:delete o.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f),typeof l=="number"&&(o.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete o.maximum:delete o.exclusiveMaximum)),typeof d=="number"&&(o.multipleOf=d)},R3=(e,t,n,r)=>{n.type="boolean"},aB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},lB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},O3=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},T3=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},cB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},C3=(e,t,n,r)=>{n.not={}},A3=(e,t,n,r)=>{},I3=(e,t,n,r)=>{},uB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},P3=(e,t,n,r)=>{const o=e._zod.def,s=n3(o.entries);s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),n.enum=s},M3=(e,t,n,r)=>{const o=e._zod.def,s=[];for(const l of o.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(l))}else s.push(l);if(s.length!==0)if(s.length===1){const l=s[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else s.every(l=>typeof l=="number")&&(n.type="number"),s.every(l=>typeof l=="string")&&(n.type="string"),s.every(l=>typeof l=="boolean")&&(n.type="boolean"),s.every(l=>l===null)&&(n.type="null"),n.enum=s},dB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},fB=(e,t,n,r)=>{const o=n,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=s.source},N3=(e,t,n,r)=>{const o=n,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:c,mime:d}=e._zod.bag;l!==void 0&&(s.minLength=l),c!==void 0&&(s.maxLength=c),d?d.length===1?(s.contentMediaType=d[0],Object.assign(o,s)):(Object.assign(o,s),o.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(o,s)},hB=(e,t,n,r)=>{n.type="boolean"},k3=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},pB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},D3=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},mB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},gB=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},L3=(e,t,n,r)=>{const o=n,s=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(o.minItems=l),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=sn(s.element,t,{...r,path:[...r.path,"items"]})},$3=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object",o.properties={};const l=s.shape;for(const f in l)o.properties[f]=sn(l[f],t,{...r,path:[...r.path,"properties",f]});const c=new Set(Object.keys(l)),d=new Set([...c].filter(f=>{const p=s.shape[f]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));d.size>0&&(o.required=Array.from(d)),s.catchall?._zod.def.type==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=sn(s.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},j3=(e,t,n,r)=>{const o=e._zod.def,s=o.inclusive===!1,l=o.options.map((c,d)=>sn(c,t,{...r,path:[...r.path,s?"oneOf":"anyOf",d]}));s?n.oneOf=l:n.anyOf=l},z3=(e,t,n,r)=>{const o=e._zod.def,s=sn(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=sn(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,d=[...c(s)?s.allOf:[s],...c(l)?l.allOf:[l]];n.allOf=d},U3=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="array";const l=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=s.items.map((g,v)=>sn(g,t,{...r,path:[...r.path,l,v]})),f=s.rest?sn(s.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=d,f&&(o.items=f)):t.target==="openapi-3.0"?(o.items={anyOf:d},f&&o.items.anyOf.push(f),o.minItems=d.length,f||(o.maxItems=d.length)):(o.items=d,f&&(o.additionalItems=f));const{minimum:p,maximum:h}=e._zod.bag;typeof p=="number"&&(o.minItems=p),typeof h=="number"&&(o.maxItems=h)},F3=(e,t,n,r)=>{const o=n,s=e._zod.def;o.type="object";const l=s.keyType,d=l._zod.bag?.patterns;if(s.mode==="loose"&&d&&d.size>0){const p=sn(s.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const h of d)o.patternProperties[h.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=sn(s.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=sn(s.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=l._zod.values;if(f){const p=[...f].filter(h=>typeof h=="string"||typeof h=="number");p.length>0&&(o.required=p)}},B3=(e,t,n,r)=>{const o=e._zod.def,s=sn(o.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},V3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},H3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},q3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},G3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},K3=(e,t,n,r)=>{const o=e._zod.def,s=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;sn(s,t,r);const l=t.seen.get(e);l.ref=s},Z3=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType,n.readOnly=!0},vB=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Kw=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const s=t.seen.get(e);s.ref=o.innerType},Y3=(e,t,n,r)=>{const o=e._zod.innerType;sn(o,t,r);const s=t.seen.get(e);s.ref=o},$T={string:E3,number:x3,boolean:R3,bigint:aB,symbol:lB,null:O3,undefined:T3,void:cB,never:C3,any:A3,unknown:I3,date:uB,enum:P3,literal:M3,nan:dB,template_literal:fB,file:N3,success:hB,custom:k3,function:pB,transform:D3,map:mB,set:gB,array:L3,object:$3,union:j3,intersection:z3,tuple:U3,record:F3,nullable:B3,nonoptional:V3,default:H3,prefault:q3,catch:G3,pipe:K3,readonly:Z3,promise:vB,optional:Kw,lazy:Y3};function Zce(e,t){if("_idmap"in e){const r=e,o=Fm({...t,processors:$T}),s={};for(const d of r._idmap.entries()){const[f,p]=d;sn(p,o)}const l={},c={registry:r,uri:t?.uri,defs:s};o.external=c;for(const d of r._idmap.entries()){const[f,p]=d;Bm(o,p),l[f]=Vm(o,p)}if(Object.keys(s).length>0){const d=o.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[d]:s}}return{schemas:l}}const n=Fm({...t,processors:$T});return sn(e,n),Bm(n,e),Vm(n,e)}const yB=ye("ZodISODateTime",(e,t)=>{hU.init(e,t),wn.init(e,t)});function W3(e){return RF(yB,e)}const _B=ye("ZodISODate",(e,t)=>{pU.init(e,t),wn.init(e,t)});function bB(e){return OF(_B,e)}const wB=ye("ZodISOTime",(e,t)=>{mU.init(e,t),wn.init(e,t)});function SB(e){return TF(wB,e)}const EB=ye("ZodISODuration",(e,t)=>{gU.init(e,t),wn.init(e,t)});function xB(e){return CF(EB,e)}const RB=(e,t)=>{qw.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>J9(e,n)},flatten:{value:n=>X9(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Vb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Vb,2)}},isEmpty:{get(){return e.issues.length===0}}})},Bo=ye("ZodError",RB,{Parent:Error}),OB=zg(Bo),TB=Ug(Bo),CB=Fg(Bo),AB=Bg(Bo),IB=oz(Bo),PB=iz(Bo),MB=sz(Bo),NB=az(Bo),kB=lz(Bo),DB=cz(Bo),LB=uz(Bo),$B=dz(Bo),Kt=ye("ZodType",(e,t)=>(Bt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Hm(e,"input"),output:Hm(e,"output")}}),e.toJSONSchema=iB(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(_a(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>ba(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>OB(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>CB(e,n,r),e.parseAsync=async(n,r)=>TB(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>AB(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>IB(e,n,r),e.decode=(n,r)=>PB(e,n,r),e.encodeAsync=async(n,r)=>MB(e,n,r),e.decodeAsync=async(n,r)=>NB(e,n,r),e.safeEncode=(n,r)=>kB(e,n,r),e.safeDecode=(n,r)=>DB(e,n,r),e.safeEncodeAsync=async(n,r)=>LB(e,n,r),e.safeDecodeAsync=async(n,r)=>$B(e,n,r),e.refine=(n,r)=>e.check(MV(n,r)),e.superRefine=n=>e.check(NV(n)),e.overwrite=n=>e.check(nu(n)),e.optional=()=>bn(e),e.exactOptional=()=>yV(e),e.nullable=()=>UT(e),e.nullish=()=>bn(UT(e)),e.nonoptional=n=>xV(e,n),e.array=()=>Re(e),e.or=n=>nn([e,n]),e.and=n=>Qw(e,n),e.transform=n=>Gb(e,rN(n)),e.default=n=>wV(e,n),e.prefault=n=>EV(e,n),e.catch=n=>OV(e,n),e.pipe=n=>Gb(e,n),e.readonly=()=>AV(e),e.describe=n=>{const r=e.clone();return wd.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return wd.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return wd.get(e);const r=e.clone();return wd.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Q3=ye("_ZodString",(e,t)=>{Gw.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>E3(e,r,o);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(FF(...r)),e.includes=(...r)=>e.check(HF(...r)),e.startsWith=(...r)=>e.check(qF(...r)),e.endsWith=(...r)=>e.check(GF(...r)),e.min=(...r)=>e.check(Um(...r)),e.max=(...r)=>e.check(w3(...r)),e.length=(...r)=>e.check(S3(...r)),e.nonempty=(...r)=>e.check(Um(1,...r)),e.lowercase=r=>e.check(BF(r)),e.uppercase=r=>e.check(VF(r)),e.trim=()=>e.check(YF()),e.normalize=(...r)=>e.check(ZF(...r)),e.toLowerCase=()=>e.check(WF()),e.toUpperCase=()=>e.check(QF()),e.slugify=()=>e.check(XF())}),X3=ye("ZodString",(e,t)=>{Gw.init(e,t),Q3.init(e,t),e.email=n=>e.check(iF(jB,n)),e.url=n=>e.check(b3(J3,n)),e.jwt=n=>e.check(xF(eV,n)),e.emoji=n=>e.check(uF(UB,n)),e.guid=n=>e.check(NT(jT,n)),e.uuid=n=>e.check(sF(np,n)),e.uuidv4=n=>e.check(aF(np,n)),e.uuidv6=n=>e.check(lF(np,n)),e.uuidv7=n=>e.check(cF(np,n)),e.nanoid=n=>e.check(dF(FB,n)),e.guid=n=>e.check(NT(jT,n)),e.cuid=n=>e.check(fF(BB,n)),e.cuid2=n=>e.check(hF(VB,n)),e.ulid=n=>e.check(pF(HB,n)),e.base64=n=>e.check(wF(QB,n)),e.base64url=n=>e.check(SF(XB,n)),e.xid=n=>e.check(mF(qB,n)),e.ksuid=n=>e.check(gF(GB,n)),e.ipv4=n=>e.check(vF(KB,n)),e.ipv6=n=>e.check(yF(ZB,n)),e.cidrv4=n=>e.check(_F(YB,n)),e.cidrv6=n=>e.check(bF(WB,n)),e.e164=n=>e.check(EF(JB,n)),e.datetime=n=>e.check(W3(n)),e.date=n=>e.check(bB(n)),e.time=n=>e.check(SB(n)),e.duration=n=>e.check(xB(n))});function $(e){return rF(X3,e)}const wn=ye("ZodStringFormat",(e,t)=>{gn.init(e,t),Q3.init(e,t)}),jB=ye("ZodEmail",(e,t)=>{oU.init(e,t),wn.init(e,t)}),jT=ye("ZodGUID",(e,t)=>{nU.init(e,t),wn.init(e,t)}),np=ye("ZodUUID",(e,t)=>{rU.init(e,t),wn.init(e,t)}),J3=ye("ZodURL",(e,t)=>{iU.init(e,t),wn.init(e,t)});function zB(e){return b3(J3,e)}const UB=ye("ZodEmoji",(e,t)=>{sU.init(e,t),wn.init(e,t)}),FB=ye("ZodNanoID",(e,t)=>{aU.init(e,t),wn.init(e,t)}),BB=ye("ZodCUID",(e,t)=>{lU.init(e,t),wn.init(e,t)}),VB=ye("ZodCUID2",(e,t)=>{cU.init(e,t),wn.init(e,t)}),HB=ye("ZodULID",(e,t)=>{uU.init(e,t),wn.init(e,t)}),qB=ye("ZodXID",(e,t)=>{dU.init(e,t),wn.init(e,t)}),GB=ye("ZodKSUID",(e,t)=>{fU.init(e,t),wn.init(e,t)}),KB=ye("ZodIPv4",(e,t)=>{vU.init(e,t),wn.init(e,t)}),ZB=ye("ZodIPv6",(e,t)=>{yU.init(e,t),wn.init(e,t)}),YB=ye("ZodCIDRv4",(e,t)=>{_U.init(e,t),wn.init(e,t)}),WB=ye("ZodCIDRv6",(e,t)=>{bU.init(e,t),wn.init(e,t)}),QB=ye("ZodBase64",(e,t)=>{wU.init(e,t),wn.init(e,t)}),XB=ye("ZodBase64URL",(e,t)=>{EU.init(e,t),wn.init(e,t)}),JB=ye("ZodE164",(e,t)=>{xU.init(e,t),wn.init(e,t)}),eV=ye("ZodJWT",(e,t)=>{OU.init(e,t),wn.init(e,t)}),Zw=ye("ZodNumber",(e,t)=>{m3.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>x3(e,r,o),e.gt=(r,o)=>e.check(DT(r,o)),e.gte=(r,o)=>e.check(Xy(r,o)),e.min=(r,o)=>e.check(Xy(r,o)),e.lt=(r,o)=>e.check(kT(r,o)),e.lte=(r,o)=>e.check(Qy(r,o)),e.max=(r,o)=>e.check(Qy(r,o)),e.int=r=>e.check(zT(r)),e.safe=r=>e.check(zT(r)),e.positive=r=>e.check(DT(0,r)),e.nonnegative=r=>e.check(Xy(0,r)),e.negative=r=>e.check(kT(0,r)),e.nonpositive=r=>e.check(Qy(0,r)),e.multipleOf=(r,o)=>e.check(LT(r,o)),e.step=(r,o)=>e.check(LT(r,o)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ht(e){return AF(Zw,e)}const tV=ye("ZodNumberFormat",(e,t)=>{TU.init(e,t),Zw.init(e,t)});function zT(e){return PF(tV,e)}const eN=ye("ZodBoolean",(e,t)=>{CU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>R3(e,n,r)});function Nt(e){return MF(eN,e)}const nV=ye("ZodUndefined",(e,t)=>{AU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>T3(e,n)});function Yce(e){return kF(nV,e)}const rV=ye("ZodNull",(e,t)=>{IU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>O3(e,n,r)});function oV(e){return DF(rV,e)}const iV=ye("ZodAny",(e,t)=>{PU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>A3()});function sV(){return LF(iV)}const aV=ye("ZodUnknown",(e,t)=>{MU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>I3()});function Gt(){return $F(aV)}const lV=ye("ZodNever",(e,t)=>{NU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>C3(e,n,r)});function tN(e){return jF(lV,e)}const cV=ye("ZodArray",(e,t)=>{kU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>L3(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Um(n,r)),e.nonempty=n=>e.check(Um(1,n)),e.max=(n,r)=>e.check(w3(n,r)),e.length=(n,r)=>e.check(S3(n,r)),e.unwrap=()=>e.element});function Re(e,t){return JF(cV,e,t)}const Yw=ye("ZodObject",(e,t)=>{LU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$3(e,n,r,o),It(e,"shape",()=>t.shape),e.keyof=()=>an(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gt()}),e.strict=()=>e.clone({...e._zod.def,catchall:tN()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>K9(e,n),e.safeExtend=n=>Z9(e,n),e.merge=n=>Y9(e,n),e.pick=n=>q9(e,n),e.omit=n=>G9(e,n),e.partial=(...n)=>W9(oN,e,n[0]),e.required=(...n)=>Q9(iN,e,n[0])});function be(e,t){const n={type:"object",shape:e??{},...Ue(t)};return new Yw(n)}function Wce(e,t){return new Yw({type:"object",shape:e,catchall:tN(),...Ue(t)})}function vr(e,t){return new Yw({type:"object",shape:e,catchall:Gt(),...Ue(t)})}const nN=ye("ZodUnion",(e,t)=>{y3.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>j3(e,n,r,o),e.options=t.options});function nn(e,t){return new nN({type:"union",options:e,...Ue(t)})}const uV=ye("ZodDiscriminatedUnion",(e,t)=>{nN.init(e,t),$U.init(e,t)});function Ww(e,t,n){return new uV({type:"union",options:t,discriminator:e,...Ue(n)})}const dV=ye("ZodIntersection",(e,t)=>{jU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>z3(e,n,r,o)});function Qw(e,t){return new dV({type:"intersection",left:e,right:t})}const fV=ye("ZodTuple",(e,t)=>{zU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>U3(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Qce(e,t,n){const r=t instanceof Bt,o=r?n:t,s=r?t:null;return new fV({type:"tuple",items:e,rest:s,...Ue(o)})}const hV=ye("ZodRecord",(e,t)=>{UU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F3(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Pt(e,t,n){return new hV({type:"record",keyType:e,valueType:t,...Ue(n)})}const qb=ye("ZodEnum",(e,t)=>{FU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(r,o,s)=>P3(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const s={};for(const l of r)if(n.has(l))s[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new qb({...t,checks:[],...Ue(o),entries:s})},e.exclude=(r,o)=>{const s={...t.entries};for(const l of r)if(n.has(l))delete s[l];else throw new Error(`Key ${l} not found in enum`);return new qb({...t,checks:[],...Ue(o),entries:s})}});function an(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new qb({type:"enum",entries:n,...Ue(t)})}const pV=ye("ZodLiteral",(e,t)=>{BU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>M3(e,n,r),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 Ge(e,t){return new pV({type:"literal",values:Array.isArray(e)?e:[e],...Ue(t)})}const mV=ye("ZodFile",(e,t)=>{VU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>N3(e,n,r),e.min=(n,r)=>e.check(UF(n,r)),e.max=(n,r)=>e.check(zF(n,r)),e.mime=(n,r)=>e.check(KF(Array.isArray(n)?n:[n],r))});function Xce(e){return eB(mV,e)}const gV=ye("ZodTransform",(e,t)=>{HU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>D3(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new e3(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(Yd(s,n.value,t));else{const l=s;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Yd(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(s=>(n.value=s,n)):(n.value=o,n)}});function rN(e){return new gV({type:"transform",transform:e})}const oN=ye("ZodOptional",(e,t)=>{_3.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kw(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bn(e){return new oN({type:"optional",innerType:e})}const vV=ye("ZodExactOptional",(e,t)=>{qU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kw(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function yV(e){return new vV({type:"optional",innerType:e})}const _V=ye("ZodNullable",(e,t)=>{GU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>B3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function UT(e){return new _V({type:"nullable",innerType:e})}const bV=ye("ZodDefault",(e,t)=>{KU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>H3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wV(e,t){return new bV({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():o3(t)}})}const SV=ye("ZodPrefault",(e,t)=>{ZU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>q3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function EV(e,t){return new SV({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():o3(t)}})}const iN=ye("ZodNonOptional",(e,t)=>{YU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>V3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function xV(e,t){return new iN({type:"nonoptional",innerType:e,...Ue(t)})}const RV=ye("ZodCatch",(e,t)=>{WU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>G3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function OV(e,t){return new RV({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const TV=ye("ZodPipe",(e,t)=>{QU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>K3(e,n,r,o),e.in=t.in,e.out=t.out});function Gb(e,t){return new TV({type:"pipe",in:e,out:t})}const CV=ye("ZodReadonly",(e,t)=>{XU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Z3(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function AV(e){return new CV({type:"readonly",innerType:e})}const IV=ye("ZodLazy",(e,t)=>{JU.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Y3(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function ms(e){return new IV({type:"lazy",getter:e})}const Xw=ye("ZodCustom",(e,t)=>{eF.init(e,t),Kt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>k3(e,n)});function PV(e,t){return tB(Xw,e??(()=>!0),t)}function MV(e,t={}){return nB(Xw,e,t)}function NV(e){return rB(e)}function Jce(e,t={}){const n=new Xw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ue(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Jw(e,t){return Gb(rN(e),t)}const kV={custom:"custom"};function sN(e){return oF(X3,e)}function aN(e){return IF(Zw,e)}function FT(e){return NF(eN,e)}function DV(e){return e.charAt(0).toUpperCase()+e.slice(1)}var kd=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};function LV(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new kd(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function $V(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new kd(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof kd?t:new kd(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Jy(e,t="/api/auth"){if($V(e),LV(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function jV(e,t,n,r,o){if(e)return Jy(e,t);{const s=Do.BETTER_AUTH_URL||Do.NEXT_PUBLIC_BETTER_AUTH_URL||Do.PUBLIC_BETTER_AUTH_URL||Do.NUXT_PUBLIC_BETTER_AUTH_URL||Do.NUXT_PUBLIC_AUTH_URL||(Do.BASE_URL!=="/"?Do.BASE_URL:void 0);if(s)return Jy(s,t)}if(typeof window<"u"&&window.location)return Jy(window.location.origin,t)}const zV={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},UV={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*:/},FV=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,BT={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},BV=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function VV(e){return e instanceof Date&&!isNaN(e.getTime())}function HV(e){const t=BV.exec(e);if(!t)return null;const[,n,r,o,s,l,c,d,f,p,h]=t,g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(o,10),parseInt(s,10),parseInt(l,10),parseInt(c,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const v=(parseInt(p,10)*60+parseInt(h,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+v)}return VV(g)?g:null}function qV(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:o,parseDates:s=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const c=l.toLowerCase();if(c.length<=9&&c in BT)return BT[c];if(!FV.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(UV).some(([d,f])=>{const p=f.test(l);return p&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),p})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(f,p)=>{if(f==="__proto__"||f==="constructor"&&p&&typeof p=="object"&&"prototype"in p){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(s&&typeof p=="string"){const h=HV(p);if(h)return h}return o?o(f,p):p})}catch(d){if(n)throw d;return e}}function GV(e,t={strict:!0}){return qV(e,t)}let Qo=[],Hs=0;const rp=4,KV=globalThis.nanostoresGlobal||={epoch:0},Cc=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=Hs+rp;s<Qo.length;)Qo[s]===r?Qo.splice(s,rp):s+=rp;let o=t.indexOf(r);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(r,o){KV.epoch++;let s=!Qo.length;for(let l of t)Qo.push(l,n.value,r,o);if(s){for(Hs=0;Hs<Qo.length;Hs+=rp)Qo[Hs](Qo[Hs+1],Qo[Hs+2],Qo[Hs+3]);Qo.length=0}},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},ZV=5,op=6,ip=10;let YV=(e,t,n,r)=>(e.events=e.events||{},e.events[n+ip]||(e.events[n+ip]=r(o=>{e.events[n].reduceRight((s,l)=>(l(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+ip](),delete e.events[n+ip])});const WV=1e3;let lN=(e,t)=>YV(e,r=>{let o=t(r);o&&e.events[op].push(o)},ZV,r=>{let o=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,r()),o(...l));let s=e.off;return e.events[op]=[],e.off=()=>{s(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[op])l();e.events[op]=[]}},WV)},()=>{e.listen=o,e.off=s}});function QV(e,t,n){let r=new Set(t).add(void 0);return e.listen((o,s,l)=>{r.has(l)&&n(o,s,l)})}const XV=()=>typeof window>"u",Sd=(e,t,n,r)=>{const o=Cc({data:null,error:null,isPending:!0,isRefetching:!1,refetch:c=>s(c)}),s=async c=>new Promise(d=>{const f=typeof r=="function"?r({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):r;n(t,{...f,query:{...f?.query,...c?.query},async onSuccess(p){o.set({data:p.data,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await f?.onSuccess?.(p)},async onError(p){const{request:h}=p,g=typeof h.retry=="number"?h.retry:h.retry?.attempts,v=h.retryAttempt||0;g&&v<g||(o.set({error:p.error,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await f?.onError?.(p))},async onRequest(p){const h=o.get();o.set({isPending:h.data===null,data:h.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await f?.onRequest?.(p)}}).catch(p=>{o.set({error:p,data:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{d(void 0)})});e=Array.isArray(e)?e:[e];let l=!1;for(const c of e)c.subscribe(async()=>{XV()||(l?await s():lN(o,()=>{const d=setTimeout(async()=>{l||(await s(),l=!0)},0);return()=>{o.off(),c.off(),clearTimeout(d)}}))});return o},e_=Symbol.for("better-auth:broadcast-channel"),JV=()=>Math.floor(Date.now()/1e3);var eH=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:JV()}))}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 t_(e="better-auth.message"){return globalThis[e_]||(globalThis[e_]=new eH(e)),globalThis[e_]}const n_=Symbol.for("better-auth:focus-manager");var tH=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 VT(){return globalThis[n_]||(globalThis[n_]=new tH),globalThis[n_]}const r_=Symbol.for("better-auth:online-manager");var nH=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 o_(){return globalThis[r_]||(globalThis[r_]=new nH),globalThis[r_]}const sc=()=>Math.floor(Date.now()/1e3),rH=5;function oH(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:o={}}=e,s=o.sessionOptions?.refetchInterval??0,l=o.sessionOptions?.refetchOnWindowFocus??!0,c=o.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>c||o_().isOnline,p=E=>{if(!f())return;if(E?.event==="storage"){d.lastSync=sc(),n.set(!n.get());return}const T=t.get();if(E?.event==="poll"){d.lastSessionRequest=sc(),r("/get-session").then(R=>{R.error?t.set({...T,data:null,error:R.error}):t.set({...T,data:R.data,error:null}),d.lastSync=sc(),n.set(!n.get())}).catch(()=>{});return}if(E?.event==="visibilitychange"){if(sc()-d.lastSessionRequest<rH)return;d.lastSessionRequest=sc()}(T?.data===null||T?.data===void 0||E?.event==="visibilitychange")&&(d.lastSync=sc(),n.set(!n.get()))},h=E=>{t_().post({event:"session",data:{trigger:E},clientId:Math.random().toString(36).substring(7)})},g=()=>{s&&s>0&&(d.pollInterval=setInterval(()=>{t.get()?.data&&p({event:"poll"})},s*1e3))},v=()=>{d.unsubscribeBroadcast=t_().subscribe(()=>{p({event:"storage"})})},_=()=>{l&&(d.unsubscribeFocus=VT().subscribe(()=>{p({event:"visibilitychange"})}))},b=()=>{d.unsubscribeOnline=o_().subscribe(E=>{E&&p({event:"visibilitychange"})})};return{init:()=>{g(),v(),_(),b(),t_().setup(),VT().setup(),o_().setup()},cleanup:()=>{d.pollInterval&&(clearInterval(d.pollInterval),d.pollInterval=void 0),d.unsubscribeBroadcast&&(d.unsubscribeBroadcast(),d.unsubscribeBroadcast=void 0),d.unsubscribeFocus&&(d.unsubscribeFocus(),d.unsubscribeFocus=void 0),d.unsubscribeOnline&&(d.unsubscribeOnline(),d.unsubscribeOnline=void 0),d.lastSync=0,d.lastSessionRequest=0,d.cachedSession=void 0},triggerRefetch:p,broadcastSessionUpdate:h}}function iH(e,t){const n=Cc(!1),r=Sd(n,"/get-session",e,{method:"GET"});return lN(r,()=>{const o=oH({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return o.init(),()=>{o.cleanup()}}),{session:r,$sessionSignal:n}}function i_(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 Kb(e,t,n=".",r){if(!i_(t))return Kb(e,{},n,r);const o={...t};for(const s of Object.keys(e)){if(s==="__proto__"||s==="constructor")continue;const l=e[s];l!=null&&(r&&r(o,s,l,n)||(Array.isArray(l)&&Array.isArray(o[s])?o[s]=[...l,...o[s]]:i_(l)&&i_(o[s])?o[s]=Kb(l,o[s],(n?`${n}.`:"")+s.toString(),r):o[s]=l))}return o}function sH(e){return(...t)=>t.reduce((n,r)=>Kb(n,r,"",e),{})}const aH=sH();var lH=Object.defineProperty,cH=Object.defineProperties,uH=Object.getOwnPropertyDescriptors,HT=Object.getOwnPropertySymbols,dH=Object.prototype.hasOwnProperty,fH=Object.prototype.propertyIsEnumerable,qT=(e,t,n)=>t in e?lH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ni=(e,t)=>{for(var n in t||(t={}))dH.call(t,n)&&qT(e,n,t[n]);if(HT)for(var n of HT(t))fH.call(t,n)&&qT(e,n,t[n]);return e},yi=(e,t)=>cH(e,uH(t)),hH=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)}},pH=async(e,t)=>{var n,r,o,s,l,c;let d=t||{};const f={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:d,hooks:f};for(const p of t?.plugins||[]){if(p.init){const h=await((n=p.init)==null?void 0:n.call(p,e.toString(),t));d=h.options||d,e=h.url}f.onRequest.push((r=p.hooks)==null?void 0:r.onRequest),f.onResponse.push((o=p.hooks)==null?void 0:o.onResponse),f.onSuccess.push((s=p.hooks)==null?void 0:s.onSuccess),f.onError.push((l=p.hooks)==null?void 0:l.onError),f.onRetry.push((c=p.hooks)==null?void 0:c.onRetry)}return{url:e,options:d,hooks:f}},GT=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}},mH=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 gH(e){if(typeof e=="number")return new GT({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new GT(e);case"exponential":return new mH(e);default:throw new Error("Invalid retry strategy")}}var vH=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},yH=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function _H(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 yH.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function bH(e){try{return JSON.parse(e),!0}catch{return!1}}function Zb(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 KT(e){try{return JSON.parse(e)}catch{return e}}function ZT(e){return typeof e=="function"}function wH(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&ZT(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&ZT(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function SH(e){const t=new Headers(e?.headers),n=await vH(e);for(const[r,o]of Object.entries(n||{}))t.set(r,o);if(!t.has("content-type")){const r=EH(e?.body);r&&t.set("content-type",r)}return t}function EH(e){return Zb(e)?"application/json":null}function xH(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(Zb(e.body)&&!t.has("content-type")){for(const[n,r]of Object.entries(e?.body))r instanceof Date&&(e.body[n]=r.toISOString());return JSON.stringify(e.body)}return t.has("content-type")&&t.get("content-type")==="application/x-www-form-urlencoded"&&Zb(e.body)?new URLSearchParams(e.body).toString():e.body}function RH(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return uN.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function OH(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var TH=class cN extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,cN.prototype)}};async function wm(e,t){const n=await e["~standard"].validate(t);if(n.issues)throw new TH(n.issues);return n.value}var uN=["get","post","put","patch","delete"],CH=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,o,s,l;const c=((o=(r=e.plugins)==null?void 0:r.find(d=>{var f;return(f=d.schema)!=null&&f.config?t.startsWith(d.schema.config.baseURL||"")||t.startsWith(d.schema.config.prefix||""):!1}))==null?void 0:o.schema)||e.schema;if(c){let d=t;(s=c.config)!=null&&s.prefix&&d.startsWith(c.config.prefix)&&(d=d.replace(c.config.prefix,""),c.config.baseURL&&(t=t.replace(c.config.prefix,c.config.baseURL))),(l=c.config)!=null&&l.baseURL&&d.startsWith(c.config.baseURL)&&(d=d.replace(c.config.baseURL,""));const f=c.schema[d];if(f){let p=yi(ni({},n),{method:f.method,output:f.output});return n?.disableValidation||(p=yi(ni({},p),{body:f.input?await wm(f.input,n?.body):n?.body,params:f.params?await wm(f.params,n?.params):n?.params,query:f.query?await wm(f.query,n?.query):n?.query})),{url:t,options:p}}}return{url:t,options:n}}}),AH=e=>{async function t(n,r){const o=yi(ni(ni({},e),r),{plugins:[...e?.plugins||[],CH(e||{}),...r?.plugins||[]]});if(e?.catchAllError)try{return await Yb(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 Yb(n,o)}return t};function IH(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||"";if(e.startsWith("@")){const h=e.toString().split("@")[1].split("/")[0];uN.includes(h)&&(e=e.replace(`@${h}/`,"/"))}s.endsWith("/")||(s+="/");let[l,c]=e.replace(s,"").split("?");const d=new URLSearchParams(c);for(const[h,g]of Object.entries(o||{})){if(g==null)continue;let v;if(typeof g=="string")v=g;else if(Array.isArray(g)){for(const _ of g)d.append(h,_);continue}else v=JSON.stringify(g);d.set(h,v)}if(r)if(Array.isArray(r)){const h=l.split("/").filter(g=>g.startsWith(":"));for(const[g,v]of h.entries()){const _=r[g];l=l.replace(v,_)}}else for(const[h,g]of Object.entries(r))l=l.replace(`:${h}`,String(g));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",s.startsWith("http")?new URL(`${l}${f}`,s):`${s}${l}${f}`}var Yb=async(e,t)=>{var n,r,o,s,l,c,d,f;const{hooks:p,url:h,options:g}=await pH(e,t),v=wH(g),_=new AbortController,b=(n=g.signal)!=null?n:_.signal,x=IH(h,g),S=xH(g),E=await SH(g),T=RH(h,g);let R=yi(ni({},g),{url:x,headers:E,body:S,method:T,signal:b});for(const F of p.onRequest)if(F){const Z=await F(R);typeof Z=="object"&&Z!==null&&(R=Z)}("pipeTo"in R&&typeof R.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in R||(R.duplex="half"));const{clearTimeout:O}=OH(g,_);let A=await v(R.url,R);O();const I={response:A,request:R};for(const F of p.onResponse)if(F){const Z=await F(yi(ni({},I),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?A.clone():A}));Z instanceof Response?A=Z:typeof Z=="object"&&Z!==null&&(A=Z.response)}if(A.ok){if(!(R.method!=="HEAD"))return{data:"",error:null};const Z=_H(A),ie={data:null,response:A,request:R};if(Z==="json"||Z==="text"){const q=await A.text(),W=(s=R.jsonParser)!=null?s:KT;ie.data=await W(q)}else ie.data=await A[Z]();R?.output&&R.output&&!R.disableValidation&&(ie.data=await wm(R.output,ie.data));for(const q of p.onSuccess)q&&await q(yi(ni({},ie),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?A.clone():A}));return t?.throw?ie.data:{data:ie.data,error:null}}const M=(c=t?.jsonParser)!=null?c:KT,L=await A.text(),H=bH(L),j=H?await M(L):null,B={response:A,responseText:L,request:R,error:yi(ni({},j),{status:A.status,statusText:A.statusText})};for(const F of p.onError)F&&await F(yi(ni({},B),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?A.clone():A}));if(t?.retry){const F=gH(t.retry),Z=(f=t.retryAttempt)!=null?f:0;if(await F.shouldAttemptRetry(Z,A)){for(const q of p.onRetry)q&&await q(I);const ie=F.getDelay(Z);return await new Promise(q=>setTimeout(q,ie)),await Yb(e,yi(ni({},t),{retryAttempt:Z+1}))}}if(t?.throw)throw new hH(A.status,A.statusText,H?j:L);return{data:null,error:yi(ni({},j),{status:A.status,statusText:A.statusText})}};const PH=(e,t)=>{const n="credentials"in Request.prototype,r=jV(e?.baseURL,e?.basePath)??"/api/auth",o=e?.plugins?.flatMap(R=>R.fetchPlugins).filter(R=>R!==void 0)||[],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:l,onError:c,onRequest:d,onResponse:f,...p}=e?.fetchOptions||{},h=AH({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(R){return R?GV(R,{strict:!1}):null},customFetchImpl:fetch,...p,plugins:[s,...p.plugins||[],...e?.disableDefaultFetchPlugins?[]:[zV],...o]}),{$sessionSignal:g,session:v}=iH(h,e),_=e?.plugins||[];let b={};const x={$sessionSignal:g,session:v},S={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},E=[{signal:"$sessionSignal",matcher(R){return R==="/sign-out"||R==="/update-user"||R==="/sign-up/email"||R==="/sign-in/email"||R==="/delete-user"||R==="/verify-email"||R==="/revoke-sessions"||R==="/revoke-session"||R==="/change-email"}}];for(const R of _)R.getAtoms&&Object.assign(x,R.getAtoms?.(h)),R.pathMethods&&Object.assign(S,R.pathMethods),R.atomListeners&&E.push(...R.atomListeners);const T={notify:R=>{x[R].set(!x[R].get())},listen:(R,O)=>{x[R].subscribe(O)},atoms:x};for(const R of _)R.getActions&&(b=aH(R.getActions?.(h,T,e)??{},b));return{get baseURL(){return r},pluginsActions:b,pluginsAtoms:x,pluginPathMethods:S,atomListeners:E,$fetch:h,$store:T}};function MH(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function NH(e,t,n){const r=t[e],{fetchOptions:o,query:s,...l}=n||{};return r||(o?.method?o.method:l&&Object.keys(l).length>0?"POST":"GET")}function kH(e,t,n,r,o){function s(l=[]){return new Proxy(function(){},{get(c,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...l,d];let p=e;for(const h of f)if(p&&typeof p=="object"&&h in p)p=p[h];else{p=void 0;break}return typeof p=="function"||MH(p)?p:s(f)},apply:async(c,d,f)=>{const p="/"+l.map(E=>E.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),h=f[0]||{},g=f[1]||{},{query:v,fetchOptions:_,...b}=h,x={...g,..._},S=NH(p,n,h);return await t(p,{...x,body:S==="GET"?void 0:{...b,...x?.body||{}},query:v||x?.query,method:S,async onSuccess(E){if(await x?.onSuccess?.(E),!o||x.disableSignal)return;const T=o.filter(O=>O.matcher(p));if(!T.length)return;const R=new Set;for(const O of T){const A=r[O.signal];if(!A)return;if(R.has(O.signal))continue;R.add(O.signal);const I=A.get();setTimeout(()=>{A.set(!I)},10)}}})}})}return s()}function DH(e,t={}){const n=P.useRef(e.get()),{keys:r,deps:o=[e,r]}=t,s=P.useCallback(c=>{const d=f=>{n.current!==f&&(n.current=f,c())};return d(e.value),r?.length?QV(e,r,d):e.listen(d)},o),l=()=>n.current;return P.useSyncExternalStore(s,l,l)}function LH(e){return`use${DV(e)}`}function $H(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:o,$store:s,atomListeners:l}=PH(e),c={};for(const[d,f]of Object.entries(r))c[LH(d)]=()=>DH(f);return kH({...n,...c,$fetch:o,$store:s},o,t,r,l)}function jH(e){return{authorize(t,n="AND"){let r=!1;for(const[o,s]of Object.entries(t)){const l=e[o];if(!l)return{success:!1,error:`You are not allowed to access resource: ${o}`};if(Array.isArray(s))r=s.every(c=>l.includes(c));else if(typeof s=="object"){const c=s;c.connector==="OR"?r=c.actions.some(d=>l.includes(d)):r=c.actions.every(d=>l.includes(d))}else throw new kd("Invalid access control request");if(r&&n==="OR")return{success:r};if(!r&&n==="AND")return{success:!1,error:`unauthorized to access resource "${o}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:e}}function dN(e){return{newRole(t){return jH(t)},statements:e}}const zH={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},fN=dN(zH),hN=fN.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),pN=fN.newRole({user:[],session:[]}),UH={admin:hN,user:pN},FH=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||UH;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},BH=e=>{const t={admin:hN,user:pN,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>FH({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},VH=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),HH=()=>({id:"magic-link",$InferServerPlugin:{}}),qH={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},eS=dN(qH),mN=eS.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),gN=eS.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),vN=eS.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),GH={admin:mN,owner:gN,member:vN},KH=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",o=n.includes(r),s=e.allowCreatorAllPermissions||!1;if(o&&s)return!0;for(const l of n)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},ZH=e=>KH(e,e.options.roles||GH),YH=e=>{const t=Cc(!1),n=Cc(!1),r=Cc(!1),o=Cc(!1),s={admin:mN,member:vN,owner:gN,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,c,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>ZH({role:f.role,options:{ac:e?.ac,roles:s},permissions:f.permissions??f.permission})}}),getAtoms:l=>{const c=Sd(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:o,activeOrganization:Sd([n],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:c,activeMember:Sd([r],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Sd([o],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},WH=e=>({id:"sso-client",$InferServerPlugin:{}});function yN(e){const t=e?.metadata;if(!t)return!1;try{return(typeof t=="string"?JSON.parse(t):t).archived===!0}catch{return!1}}const Hg=$H({plugins:[YH({}),BH(),WH(),HH(),VH()]}),QH=3e4;let Ed=null,sp=null;function _N(){if(Ed&&Ed.expiresAt>Date.now())return Promise.resolve(Ed.result);if(sp)return sp;const e=Hg.organization.list().then(t=>{const n=t.data?{...t,data:t.data.filter(r=>!yN(r))}:t;return n.data&&(Ed={result:n,expiresAt:Date.now()+QH}),n}).finally(()=>{sp=null});return sp=e,e}function eue(){const e=Hg.useListOrganizations(),t=e.data?.filter(n=>!yN(n));return{...e,data:t}}function tue(){Ed=null}function bN(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=bN(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function tS(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bN(e))&&(r&&(r+=" "),r+=t);return r}const XH=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},JH=(e,t)=>({classGroupId:e,validator:t}),wN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qm="-",YT=[],eq="arbitrary..",tq=e=>{const t=rq(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return nq(l);const c=l.split(qm),d=c[0]===""&&c.length>1?1:0;return SN(c,d,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=r[l],f=n[l];return d?f?XH(f,d):d:f||YT}return n[l]||YT}}},SN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const f=SN(e,t+1,s);if(f)return f}const l=n.validators;if(l===null)return;const c=t===0?e.join(qm):e.slice(t).join(qm),d=l.length;for(let f=0;f<d;f++){const p=l[f];if(p.validator(c))return p.classGroupId}},nq=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?eq+r:void 0})(),rq=e=>{const{theme:t,classGroups:n}=e;return oq(n,t)},oq=(e,t)=>{const n=wN();for(const r in e){const o=e[r];nS(o,n,r,t)}return n},nS=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];iq(l,t,n,r)}},iq=(e,t,n,r)=>{if(typeof e=="string"){sq(e,t,n);return}if(typeof e=="function"){aq(e,t,n,r);return}lq(e,t,n,r)},sq=(e,t,n)=>{const r=e===""?t:EN(t,e);r.classGroupId=n},aq=(e,t,n,r)=>{if(cq(e)){nS(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(JH(n,e))},lq=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,d]=o[l];nS(d,EN(t,c),n,r)}},EN=(e,t)=>{let n=e;const r=t.split(qm),o=r.length;for(let s=0;s<o;s++){const l=r[s];let c=n.nextPart.get(l);c||(c=wN(),n.nextPart.set(l,c)),n=c}return n},cq=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,uq=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},Wb="!",WT=":",dq=[],QT=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),fq=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let l=0,c=0,d=0,f;const p=o.length;for(let b=0;b<p;b++){const x=o[b];if(l===0&&c===0){if(x===WT){s.push(o.slice(d,b)),d=b+1;continue}if(x==="/"){f=b;continue}}x==="["?l++:x==="]"?l--:x==="("?c++:x===")"&&c--}const h=s.length===0?o:o.slice(d);let g=h,v=!1;h.endsWith(Wb)?(g=h.slice(0,-1),v=!0):h.startsWith(Wb)&&(g=h.slice(1),v=!0);const _=f&&f>d?f-d:void 0;return QT(s,v,g,_)};if(t){const o=t+WT,s=r;r=l=>l.startsWith(o)?s(l.slice(o.length)):QT(dq,!1,l,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},hq=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",d=t.has(l);c||d?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},pq=e=>({cache:uq(e.cacheSize),parseClassName:fq(e),sortModifiers:hq(e),postfixLookupClassGroupIds:mq(e),...tq(e)}),mq=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},gq=/\s+/,vq=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s,postfixLookupClassGroupIds:l}=t,c=[],d=e.trim().split(gq);let f="";for(let p=d.length-1;p>=0;p-=1){const h=d[p],{isExternal:g,modifiers:v,hasImportantModifier:_,baseClassName:b,maybePostfixModifierPosition:x}=n(h);if(g){f=h+(f.length>0?" "+f:f);continue}let S=!!x,E;if(S){const I=b.substring(0,x);E=r(I);const M=E&&l[E]?r(b):void 0;M&&M!==E&&(E=M,S=!1)}else E=r(b);if(!E){if(!S){f=h+(f.length>0?" "+f:f);continue}if(E=r(b),!E){f=h+(f.length>0?" "+f:f);continue}S=!1}const T=v.length===0?"":v.length===1?v[0]:s(v).join(":"),R=_?T+Wb:T,O=R+E;if(c.indexOf(O)>-1)continue;c.push(O);const A=o(E,S);for(let I=0;I<A.length;++I){const M=A[I];c.push(R+M)}f=h+(f.length>0?" "+f:f)}return f},yq=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=xN(n))&&(o&&(o+=" "),o+=r);return o},xN=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=xN(e[r]))&&(n&&(n+=" "),n+=t);return n},_q=(e,...t)=>{let n,r,o,s;const l=d=>{const f=t.reduce((p,h)=>h(p),e());return n=pq(f),r=n.cache.get,o=n.cache.set,s=c,c(d)},c=d=>{const f=r(d);if(f)return f;const p=vq(d,n);return o(d,p),p};return s=l,(...d)=>s(yq(...d))},bq=[],Kn=e=>{const t=n=>n[e]||bq;return t.isThemeGetter=!0,t},RN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ON=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wq=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Sq=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Eq=/\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$/,xq=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rq=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oq=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qs=e=>wq.test(e),gt=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),s_=e=>e.endsWith("%")&>(e.slice(0,-1)),Xi=e=>Sq.test(e),TN=()=>!0,Tq=e=>Eq.test(e)&&!xq.test(e),rS=()=>!1,Cq=e=>Rq.test(e),Aq=e=>Oq.test(e),Iq=e=>!Ve(e)&&!He(e),Pq=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Mq=e=>wa(e,IN,rS),Ve=e=>RN.test(e),Ba=e=>wa(e,PN,Tq),XT=e=>wa(e,Uq,gt),Nq=e=>wa(e,NN,TN),kq=e=>wa(e,MN,rS),JT=e=>wa(e,CN,rS),Dq=e=>wa(e,AN,Aq),ap=e=>wa(e,kN,Cq),He=e=>ON.test(e),od=e=>ml(e,PN),Lq=e=>ml(e,MN),eC=e=>ml(e,CN),$q=e=>ml(e,IN),jq=e=>ml(e,AN),lp=e=>ml(e,kN,!0),zq=e=>ml(e,NN,!0),wa=(e,t,n)=>{const r=RN.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ml=(e,t,n=!1)=>{const r=ON.exec(e);return r?r[1]?t(r[1]):n:!1},CN=e=>e==="position"||e==="percentage",AN=e=>e==="image"||e==="url",IN=e=>e==="length"||e==="size"||e==="bg-size",PN=e=>e==="length",Uq=e=>e==="number",MN=e=>e==="family-name",NN=e=>e==="number"||e==="weight",kN=e=>e==="shadow",Fq=()=>{const e=Kn("color"),t=Kn("font"),n=Kn("text"),r=Kn("font-weight"),o=Kn("tracking"),s=Kn("leading"),l=Kn("breakpoint"),c=Kn("container"),d=Kn("spacing"),f=Kn("radius"),p=Kn("shadow"),h=Kn("inset-shadow"),g=Kn("text-shadow"),v=Kn("drop-shadow"),_=Kn("blur"),b=Kn("perspective"),x=Kn("aspect"),S=Kn("ease"),E=Kn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...R(),He,Ve],A=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],M=()=>[He,Ve,d],L=()=>[qs,"full","auto",...M()],H=()=>[pi,"none","subgrid",He,Ve],j=()=>["auto",{span:["full",pi,He,Ve]},pi,He,Ve],B=()=>[pi,"auto",He,Ve],F=()=>["auto","min","max","fr",He,Ve],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...M()],W=()=>[qs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],te=()=>[qs,"screen","full","dvw","lvw","svw","min","max","fit",...M()],le=()=>[qs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],Q=()=>[e,He,Ve],k=()=>[...R(),eC,JT,{position:[He,Ve]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",$q,Mq,{size:[He,Ve]}],D=()=>[s_,od,Ba],U=()=>["","none","full",f,He,Ve],X=()=>["",gt,od,Ba],fe=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[gt,s_,eC,JT],je=()=>["","none",_,He,Ve],Y=()=>["none",gt,He,Ve],re=()=>["none",gt,He,Ve],ve=()=>[gt,He,Ve],se=()=>[qs,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xi],breakpoint:[Xi],color:[TN],container:[Xi],"drop-shadow":[Xi],ease:["in","out","in-out"],font:[Iq],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xi],shadow:[Xi],spacing:["px",gt],text:[Xi],"text-shadow":[Xi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",qs,Ve,He,x]}],container:["container"],"container-type":[{"@container":["","normal","size",He,Ve]}],"container-named":[Pq],columns:[{columns:[gt,Ve,He,c]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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"],sr:["sr-only","not-sr-only"],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:O()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",He,Ve]}],basis:[{basis:[qs,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[gt,qs,"auto","initial","none",Ve]}],grow:[{grow:["",gt,He,Ve]}],shrink:[{shrink:["",gt,He,Ve]}],order:[{order:[pi,"first","last","none",He,Ve]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[c,"screen",...W()]}],"min-w":[{"min-w":[c,"screen","none",...W()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,od,Ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,zq,Nq]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",s_,Ve]}],"font-family":[{font:[Lq,kq,t]}],"font-features":[{"font-features":[Ve]}],"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:[o,He,Ve]}],"line-clamp":[{"line-clamp":[gt,"none",He,XT]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",He,Ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",He,Ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[gt,"from-font","auto",He,Ba]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[gt,"auto",He,Ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"tab-size":[{tab:[pi,He,Ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He,Ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He,Ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,He,Ve],radial:["",He,Ve],conic:[pi,He,Ve]},jq,Dq]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-bs":[{"border-bs":Q()}],"border-color-be":[{"border-be":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[gt,He,Ve]}],"outline-w":[{outline:["",gt,od,Ba]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",p,lp,ap]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",h,lp,ap]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[gt,Ba]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",g,lp,ap]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[gt,He,Ve]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[gt]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[He,Ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[gt]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",He,Ve]}],filter:[{filter:["","none",He,Ve]}],blur:[{blur:je()}],brightness:[{brightness:[gt,He,Ve]}],contrast:[{contrast:[gt,He,Ve]}],"drop-shadow":[{"drop-shadow":["","none",v,lp,ap]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",gt,He,Ve]}],"hue-rotate":[{"hue-rotate":[gt,He,Ve]}],invert:[{invert:["",gt,He,Ve]}],saturate:[{saturate:[gt,He,Ve]}],sepia:[{sepia:["",gt,He,Ve]}],"backdrop-filter":[{"backdrop-filter":["","none",He,Ve]}],"backdrop-blur":[{"backdrop-blur":je()}],"backdrop-brightness":[{"backdrop-brightness":[gt,He,Ve]}],"backdrop-contrast":[{"backdrop-contrast":[gt,He,Ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",gt,He,Ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[gt,He,Ve]}],"backdrop-invert":[{"backdrop-invert":["",gt,He,Ve]}],"backdrop-opacity":[{"backdrop-opacity":[gt,He,Ve]}],"backdrop-saturate":[{"backdrop-saturate":[gt,He,Ve]}],"backdrop-sepia":[{"backdrop-sepia":["",gt,He,Ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",He,Ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[gt,"initial",He,Ve]}],ease:[{ease:["linear","initial",S,He,Ve]}],delay:[{delay:[gt,He,Ve]}],animate:[{animate:["none",E,He,Ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,He,Ve]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[He,Ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],zoom:[{zoom:[pi,He,Ve]}],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",He,Ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":Q()}],"scrollbar-track-color":[{"scrollbar-track":Q()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",He,Ve]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[gt,od,Ba,XT]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},DN=_q(Fq);function Ce(...e){return DN(tS(e))}function Bq(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function kn({error:e,localization:t,localizeErrors:n=!0}){var r;const o="Request failed";if(!n)return e?.message?e.message:(r=e?.error)!=null&&r.message?e.error.message:o;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const s=e.error.code;if(t?.[s])return t[s]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||o}function gl(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Qb(e,t){for(const n in e)if(e[n]===t)return n}function Wd(e,t){let n=$().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var Vq={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},Hq={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},qq={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},Gq={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},Kq={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},Zq={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},Yq={...Kq,...Zq},Wq={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},Qq={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},Xq={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Jq={INVALID_SESSION_TOKEN:"Invalid session token"},eG={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},tG={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},nG={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},rG={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},oG={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},iG={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},sG={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},aG={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...Gq,...Vq,...Hq,...qq,...Yq,...Wq,...Qq,...Xq,...Jq,...eG,...tG,...nG,...rG,...oG,...iG,...sG},lG={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},tC={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},nC={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function cG(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const uG=e=>{switch(e){case"success":return hG;case"info":return mG;case"warning":return pG;case"error":return gG;default:return null}},dG=Array(12).fill(0),fG=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},dG.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),gG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),vG=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yG=()=>{const[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Xb=1;class _G{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Xb++,l=this.toasts.find(d=>d.id===s),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...t,id:s,title:r}),{...d,...t,id:s,dismissible:c,title:r}):d):this.addToast({title:r,...o,dismissible:c,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,l;const c=o.then(async f=>{if(l=["resolve",f],ee.isValidElement(f))s=!1,this.create({id:r,type:"default",message:f});else if(wG(f)&&!f.ok){s=!1;const h=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,_=typeof h=="object"&&!ee.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,..._})}else if(f instanceof Error){s=!1;const h=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,_=typeof h=="object"&&!ee.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:g,..._})}else if(n.success!==void 0){s=!1;const h=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,_=typeof h=="object"&&!ee.isValidElement(h)?h:{message:h};this.create({id:r,type:"success",description:g,..._})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){s=!1;const p=typeof n.error=="function"?await n.error(f):n.error,h=typeof n.description=="function"?await n.description(f):n.description,v=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:h,...v})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,p)=>c.then(()=>l[0]==="reject"?p(l[1]):f(l[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||Xb++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Qr=new _G,bG=(e,t)=>{const n=t?.id||Xb++;return Qr.addToast({title:e,...t,id:n}),n},wG=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",SG=bG,EG=()=>Qr.toasts,xG=()=>Qr.getActiveToasts(),rC=Object.assign(SG,{success:Qr.success,info:Qr.info,warning:Qr.warning,error:Qr.error,custom:Qr.custom,message:Qr.message,promise:Qr.promise,dismiss:Qr.dismiss,loading:Qr.loading},{getHistory:EG,getToasts:xG});cG("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function cp(e){return e.label!==void 0}const RG=3,OG="24px",TG="16px",oC=4e3,CG=356,AG=14,IG=45,PG=200;function mi(...e){return e.filter(Boolean).join(" ")}function MG(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const NG=e=>{var t,n,r,o,s,l,c,d,f;const{invert:p,toast:h,unstyled:g,interacting:v,setHeights:_,visibleToasts:b,heights:x,index:S,toasts:E,expanded:T,removeToast:R,defaultRichColors:O,closeButton:A,style:I,cancelButtonStyle:M,actionButtonStyle:L,className:H="",descriptionClassName:j="",duration:B,position:F,gap:Z,expandByDefault:ie,classNames:q,icons:W,closeButtonAriaLabel:te="Close toast"}=e,[le,Q]=ee.useState(null),[k,G]=ee.useState(null),[V,D]=ee.useState(!1),[U,X]=ee.useState(!1),[fe,pe]=ee.useState(!1),[xe,je]=ee.useState(!1),[Y,re]=ee.useState(!1),[ve,se]=ee.useState(0),[Se,Te]=ee.useState(0),tt=ee.useRef(h.duration||B||oC),rt=ee.useRef(null),Be=ee.useRef(null),Qe=S===0,Me=S+1<=b,Pe=h.type,Fe=h.dismissible!==!1,K=h.className||"",ne=h.descriptionClassName||"",ae=ee.useMemo(()=>x.findIndex(Ke=>Ke.toastId===h.id)||0,[x,h.id]),Oe=ee.useMemo(()=>{var Ke;return(Ke=h.closeButton)!=null?Ke:A},[h.closeButton,A]),Ae=ee.useMemo(()=>h.duration||B||oC,[h.duration,B]),Ie=ee.useRef(0),ke=ee.useRef(0),Je=ee.useRef(0),et=ee.useRef(null),[_t,Tt]=F.split("-"),bt=ee.useMemo(()=>x.reduce((Ke,ft,Jt)=>Jt>=ae?Ke:Ke+ft.height,0),[x,ae]),Ln=yG(),Ni=h.invert||p,Go=Pe==="loading";ke.current=ee.useMemo(()=>ae*Z+bt,[ae,bt]),ee.useEffect(()=>{tt.current=Ae},[Ae]),ee.useEffect(()=>{D(!0)},[]),ee.useEffect(()=>{const Ke=Be.current;if(Ke){const ft=Ke.getBoundingClientRect().height;return Te(ft),_(Jt=>[{toastId:h.id,height:ft,position:h.position},...Jt]),()=>_(Jt=>Jt.filter(Zt=>Zt.toastId!==h.id))}},[_,h.id]),ee.useLayoutEffect(()=>{if(!V)return;const Ke=Be.current,ft=Ke.style.height;Ke.style.height="auto";const Jt=Ke.getBoundingClientRect().height;Ke.style.height=ft,Te(Jt),_(Zt=>Zt.find(Lt=>Lt.toastId===h.id)?Zt.map(Lt=>Lt.toastId===h.id?{...Lt,height:Jt}:Lt):[{toastId:h.id,height:Jt,position:h.position},...Zt])},[V,h.title,h.description,_,h.id,h.jsx,h.action,h.cancel]);const Ye=ee.useCallback(()=>{X(!0),se(ke.current),_(Ke=>Ke.filter(ft=>ft.toastId!==h.id)),setTimeout(()=>{R(h)},PG)},[h,R,_,ke]);ee.useEffect(()=>{if(h.promise&&Pe==="loading"||h.duration===1/0||h.type==="loading")return;let Ke;return T||v||Ln?(()=>{if(Je.current<Ie.current){const Zt=new Date().getTime()-Ie.current;tt.current=tt.current-Zt}Je.current=new Date().getTime()})():tt.current!==1/0&&(Ie.current=new Date().getTime(),Ke=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Ye()},tt.current)),()=>clearTimeout(Ke)},[T,v,h,Pe,Ln,Ye]),ee.useEffect(()=>{h.delete&&(Ye(),h.onDismiss==null||h.onDismiss.call(h,h))},[Ye,h.delete]);function pt(){var Ke;if(W?.loading){var ft;return ee.createElement("div",{className:mi(q?.loader,h==null||(ft=h.classNames)==null?void 0:ft.loader,"sonner-loader"),"data-visible":Pe==="loading"},W.loading)}return ee.createElement(fG,{className:mi(q?.loader,h==null||(Ke=h.classNames)==null?void 0:Ke.loader),visible:Pe==="loading"})}const Ct=h.icon||W?.[Pe]||uG(Pe);var st,Dt;return ee.createElement("li",{tabIndex:0,ref:Be,className:mi(H,K,q?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,q?.default,q?.[Pe],h==null||(n=h.classNames)==null?void 0:n[Pe]),"data-sonner-toast":"","data-rich-colors":(st=h.richColors)!=null?st:O,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":V,"data-promise":!!h.promise,"data-swiped":Y,"data-removed":U,"data-visible":Me,"data-y-position":_t,"data-x-position":Tt,"data-index":S,"data-front":Qe,"data-swiping":fe,"data-dismissible":Fe,"data-type":Pe,"data-invert":Ni,"data-swipe-out":xe,"data-swipe-direction":k,"data-expanded":!!(T||ie&&V),"data-testid":h.testId,style:{"--index":S,"--toasts-before":S,"--z-index":E.length-S,"--offset":`${U?ve:ke.current}px`,"--initial-height":ie?"auto":`${Se}px`,...I,...h.style},onDragEnd:()=>{pe(!1),Q(null),et.current=null},onPointerDown:Ke=>{Ke.button!==2&&(Go||!Fe||(rt.current=new Date,se(ke.current),Ke.target.setPointerCapture(Ke.pointerId),Ke.target.tagName!=="BUTTON"&&(pe(!0),et.current={x:Ke.clientX,y:Ke.clientY})))},onPointerUp:()=>{var Ke,ft,Jt;if(xe||!Fe)return;et.current=null;const Zt=Number(((Ke=Be.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Sr=Number(((ft=Be.current)==null?void 0:ft.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Lt=new Date().getTime()-((Jt=rt.current)==null?void 0:Jt.getTime()),ln=le==="x"?Zt:Sr,So=Math.abs(ln)/Lt;if(Math.abs(ln)>=IG||So>.11){se(ke.current),h.onDismiss==null||h.onDismiss.call(h,h),G(le==="x"?Zt>0?"right":"left":Sr>0?"down":"up"),Ye(),je(!0);return}else{var sr,Ur;(sr=Be.current)==null||sr.style.setProperty("--swipe-amount-x","0px"),(Ur=Be.current)==null||Ur.style.setProperty("--swipe-amount-y","0px")}re(!1),pe(!1),Q(null)},onPointerMove:Ke=>{var ft,Jt,Zt;if(!et.current||!Fe||((ft=window.getSelection())==null?void 0:ft.toString().length)>0)return;const Lt=Ke.clientY-et.current.y,ln=Ke.clientX-et.current.x;var So;const sr=(So=e.swipeDirections)!=null?So:MG(F);!le&&(Math.abs(ln)>1||Math.abs(Lt)>1)&&Q(Math.abs(ln)>Math.abs(Lt)?"x":"y");let Ur={x:0,y:0};const bl=Ko=>1/(1.5+Math.abs(Ko)/20);if(le==="y"){if(sr.includes("top")||sr.includes("bottom"))if(sr.includes("top")&&Lt<0||sr.includes("bottom")&&Lt>0)Ur.y=Lt;else{const Ko=Lt*bl(Lt);Ur.y=Math.abs(Ko)<Math.abs(Lt)?Ko:Lt}}else if(le==="x"&&(sr.includes("left")||sr.includes("right")))if(sr.includes("left")&&ln<0||sr.includes("right")&&ln>0)Ur.x=ln;else{const Ko=ln*bl(ln);Ur.x=Math.abs(Ko)<Math.abs(ln)?Ko:ln}(Math.abs(Ur.x)>0||Math.abs(Ur.y)>0)&&re(!0),(Jt=Be.current)==null||Jt.style.setProperty("--swipe-amount-x",`${Ur.x}px`),(Zt=Be.current)==null||Zt.style.setProperty("--swipe-amount-y",`${Ur.y}px`)}},Oe&&!h.jsx&&Pe!=="loading"?ee.createElement("button",{"aria-label":te,"data-disabled":Go,"data-close-button":!0,onClick:Go||!Fe?()=>{}:()=>{Ye(),h.onDismiss==null||h.onDismiss.call(h,h)},className:mi(q?.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(Dt=W?.close)!=null?Dt:vG):null,(Pe||h.icon||h.promise)&&h.icon!==null&&(W?.[Pe]!==null||h.icon)?ee.createElement("div",{"data-icon":"",className:mi(q?.icon,h==null||(o=h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||pt():null,h.type!=="loading"?Ct:null):null,ee.createElement("div",{"data-content":"",className:mi(q?.content,h==null||(s=h.classNames)==null?void 0:s.content)},ee.createElement("div",{"data-title":"",className:mi(q?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?ee.createElement("div",{"data-description":"",className:mi(j,ne,q?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),ee.isValidElement(h.cancel)?h.cancel:h.cancel&&cp(h.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||M,onClick:Ke=>{cp(h.cancel)&&Fe&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Ke),Ye())},className:mi(q?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,ee.isValidElement(h.action)?h.action:h.action&&cp(h.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||L,onClick:Ke=>{cp(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Ke),!Ke.defaultPrevented&&Ye())},className:mi(q?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function iC(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function kG(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,l=s?"--mobile-offset":"--offset",c=s?TG:OG;function d(f){["top","right","bottom","left"].forEach(p=>{n[`${l}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${l}-${f}`]=c:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(c)}),n}const DG=ee.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:p,mobileOffset:h,theme:g="light",richColors:v,duration:_,style:b,visibleToasts:x=RG,toastOptions:S,dir:E=iC(),gap:T=AG,icons:R,containerAriaLabel:O="Notifications"}=t,[A,I]=ee.useState([]),M=ee.useMemo(()=>r?A.filter(V=>V.toasterId===r):A.filter(V=>!V.toasterId),[A,r]),L=ee.useMemo(()=>Array.from(new Set([s].concat(M.filter(V=>V.position).map(V=>V.position)))),[M,s]),[H,j]=ee.useState([]),[B,F]=ee.useState(!1),[Z,ie]=ee.useState(!1),[q,W]=ee.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),te=ee.useRef(null),le=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=ee.useRef(null),k=ee.useRef(!1),G=ee.useCallback(V=>{I(D=>{var U;return(U=D.find(X=>X.id===V.id))!=null&&U.delete||Qr.dismiss(V.id),D.filter(({id:X})=>X!==V.id)})},[]);return ee.useEffect(()=>Qr.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{I(D=>D.map(U=>U.id===V.id?{...U,delete:!0}:U))});return}setTimeout(()=>{WM.flushSync(()=>{I(D=>{const U=D.findIndex(X=>X.id===V.id);return U!==-1?[...D.slice(0,U),{...D[U],...V},...D.slice(U+1)]:[V,...D]})})})}),[A]),ee.useEffect(()=>{if(g!=="system"){W(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:D})=>{W(D?"dark":"light")})}catch{V.addListener(({matches:U})=>{try{W(U?"dark":"light")}catch(X){console.error(X)}})}},[g]),ee.useEffect(()=>{A.length<=1&&F(!1)},[A]),ee.useEffect(()=>{const V=D=>{var U;if(l.every(pe=>D[pe]||D.code===pe)){var fe;F(!0),(fe=te.current)==null||fe.focus()}D.code==="Escape"&&(document.activeElement===te.current||(U=te.current)!=null&&U.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[l]),ee.useEffect(()=>{if(te.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,k.current=!1)}},[te.current]),ee.createElement("section",{ref:n,"aria-label":`${O} ${le}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},L.map((V,D)=>{var U;const[X,fe]=V.split("-");return M.length?ee.createElement("ol",{key:V,dir:E==="auto"?iC():E,tabIndex:-1,ref:te,className:f,"data-sonner-toaster":!0,"data-sonner-theme":q,"data-y-position":X,"data-x-position":fe,style:{"--front-toast-height":`${((U=H[0])==null?void 0:U.height)||0}px`,"--width":`${CG}px`,"--gap":`${T}px`,...b,...kG(p,h)},onBlur:pe=>{k.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(k.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||k.current||(k.current=!0,Q.current=pe.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{Z||F(!1)},onDragEnd:()=>F(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},M.filter(pe=>!pe.position&&D===0||pe.position===V).map((pe,xe)=>{var je,Y;return ee.createElement(NG,{key:pe.id,icons:R,index:xe,toast:pe,defaultRichColors:v,duration:(je=S?.duration)!=null?je:_,className:S?.className,descriptionClassName:S?.descriptionClassName,invert:o,visibleToasts:x,closeButton:(Y=S?.closeButton)!=null?Y:d,interacting:Z,position:V,style:S?.style,unstyled:S?.unstyled,classNames:S?.classNames,cancelButtonStyle:S?.cancelButtonStyle,actionButtonStyle:S?.actionButtonStyle,closeButtonAriaLabel:S?.closeButtonAriaLabel,removeToast:G,toasts:M.filter(re=>re.position==pe.position),heights:H.filter(re=>re.position==pe.position),setHeights:j,expandByDefault:c,gap:T,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),LN=P.createContext({});function $N(){return P.useContext(LN)}var a_,sC;function LG(){if(sC)return a_;sC=1;var e=function(){};return a_=e,a_}var $G=LG();const jG=hl($G);function zG({async:e,appendTo:t,defer:n,id:r,nonce:o,src:s}){const l=document.createElement("script");e!==void 0&&(l.async=e),n!==void 0&&(l.defer=n),r&&(l.id=r),o&&l.setAttribute("nonce",o),l.src=s,(t==="head"?document.head:document.body).appendChild(l)}var UG=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};let Dd=null,Qd=!1;const Gm=new Set,Km=new Set,FG=typeof window<"u",Dc="___grecaptcha_cfg",jN=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function BG(){if(!FG)return;function e(n){if(Qd)n();else{window[Dc]||(window[Dc]={});const r=window[Dc];r.fns||(r.fns=[]),r.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){Qd=!0;for(const n of Km)n();Km.clear()}window[jN]=t}function VG({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:o=!1}){const s=o?"recaptcha.net":"google.com",l=r?"enterprise.js":"api.js",c=new URLSearchParams({render:n});return t&&c.set("onload",t),e&&c.set("hl",e),`https://www.${s}/recaptcha/${l}?${c.toString()}`}function HG({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:o}){const s={id:"google-recaptcha-v3"},l=VG({language:e,onLoadCallbackName:jN,render:t,useEnterprise:r,useRecaptchaNet:o});if(Dd){if(Dd!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Dd=l,zG(Object.assign(Object.assign(Object.assign({},s),n),{src:l}))}function qG(e){if(!window[Dc])return;const t=window[Dc];t.clients&&delete t.clients[e]}function GG(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,o=UG(t,["onLoadCallback","onLoadCallbackName"]);if(Gm.size===0&&BG(),HG(o),Gm.add(e),n&&(Qd?n():Km.add(n)),r){let s=function(){if(!r)return;const l=window[r];typeof l=="function"&&l()};Qd?s():Km.add(s)}}function KG(e){var t,n,r;Gm.delete(e),Gm.size===0&&(window.grecaptcha=void 0,window[Dc]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Dd}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Dd=null,Qd=!1)}let aC=!1;function ZG({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:o,useEnterprise:s,useRecaptchaNet:l}){var c,d,f,p,h,g,v;const _=P.useId(),[b,x]=P.useState(null),[S,E]=P.useState(null),T=P.useRef(!1);P.useEffect(()=>{function I(){var M;const L=s?(M=window.grecaptcha)===null||M===void 0?void 0:M.enterprise:window.grecaptcha;if(!L)throw new Error("reCAPTCHA not found");if(!L.ready)throw new Error("reCAPTCHA ready callback not found");L.ready(()=>{x(L)})}return GG(_,{language:n,onLoadCallback:I,onLoadCallbackName:o?.onLoadCallbackName,render:e?.element?"explicit":r,scriptProps:{appendTo:o?.appendTo,async:o?.async,defer:o?.defer,id:o?.id,nonce:o?.nonce},useEnterprise:s,useRecaptchaNet:l}),()=>{KG(_),x(null)}},[e?.element,_,n,r,o?.appendTo,o?.async,o?.defer,o?.id,o?.nonce,o?.onLoadCallbackName,s,l]),P.useEffect(()=>{var I,M,L;if(!e?.element||!b?.render)return;const H={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((I=e.parameters)===null||I===void 0?void 0:I.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},j=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!j)throw new Error("reCAPTCHA container element not found");const B=b.render(j,H);return!((M=e?.parameters)===null||M===void 0)&&M.hidden&&(aC||(jG(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),aC=!0),(L=j.querySelector(".grecaptcha-badge"))===null||L===void 0||L.style.setProperty("display","none")),E(B),T.current=!0,()=>{E(null),T.current=!1,qG(B),j.innerHTML=""}},[e?.element,(c=e?.parameters)===null||c===void 0?void 0:c.badge,(d=e?.parameters)===null||d===void 0?void 0:d.hidden,(f=e?.parameters)===null||f===void 0?void 0:f.callback,(p=e?.parameters)===null||p===void 0?void 0:p.errorCallback,(h=e?.parameters)===null||h===void 0?void 0:h.expiredCallback,(g=e?.parameters)===null||g===void 0?void 0:g.tabindex,(v=e?.parameters)===null||v===void 0?void 0:v.theme,b,r]);const R=!!e?.element,O=R?S:r,A=P.useMemo(()=>O!==null&&b?.execute?I=>{if(O===null||!b?.execute)throw new Error("reCAPTCHA has not been loaded");return R&&!T.current?(console.warn("Client ID not mounted"),null):b.execute(O,{action:I})}:void 0,[O,b,R]);return C.jsx(LN.Provider,{value:{container:e?.element,executeRecaptcha:A,reCaptchaInstance:b},children:t})}var YG=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const r of n)r()}}},No=new YG;function WG(){return()=>{}}function gs(){return P.useSyncExternalStore(WG,()=>!0,()=>!1)}function zN(){const[e,t]=P.useState();return P.useEffect(()=>{const n=()=>{const o=document.documentElement.getAttribute("lang");t(o??void 0)};n();const r=new MutationObserver(o=>{for(const s of o)s.attributeName==="lang"&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{lang:e}}function oS(){const[e,t]=P.useState("light");return P.useEffect(()=>{const n=()=>{var o;const s=document.documentElement.classList.contains("dark")||((o=document.documentElement.getAttribute("style"))==null?void 0:o.includes("color-scheme: dark"));t(s?"dark":"light")};n();const r=new MutationObserver(o=>{for(const s of o)(s.attributeName==="style"||s.attributeName==="class")&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{theme:e}}function QG({children:e}){const t=gs(),{captcha:n}=P.useContext(vt);return n?.provider!=="google-recaptcha-v3"?e:C.jsxs(ZG,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&C.jsx("style",{children:`
|
|
49
49
|
.grecaptcha-badge {
|
|
50
50
|
visibility: hidden;
|
|
51
51
|
border-radius: var(--radius) !important;
|
|
@@ -58,7 +58,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
58
58
|
.dark .grecaptcha-badge {
|
|
59
59
|
border-color: var(--input) !important;
|
|
60
60
|
}
|
|
61
|
-
`}),C.jsx(XG,{}),e]})}function XG(){const{executeRecaptcha:e}=$N(),{theme:t}=oS(),{lang:n}=zN();return P.useEffect(()=>{if(!e)return;(async()=>{const o=document.querySelector("iframe[title='reCAPTCHA']");if(o){const s=new URL(o.src);s.searchParams.set("theme",t),n&&s.searchParams.set("hl",n),o.src=s.toString()}})()},[e,t,n]),null}function JG({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=P.useContext(vt),{pathMode:o,slug:s}=t||{};let l,c,d,f;const{data:p,isPending:h,isRefetching:g}=r();if(o==="slug"){const v=e||s;l=p?.find(_=>_.slug===v),c=h,d=g}else{const{data:v,isPending:_,isRefetching:b,refetch:x}=n();f=x,l=v,c=_,d=b}return P.useMemo(()=>({data:l,isPending:c,isRefetching:d,refetch:f}),[l,c,d,f])}var eK=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:o}=P.useContext(vt),{slug:s,pathMode:l,personalPath:c}=n||{},{data:d}=t(),{data:f,isPending:p,isRefetching:h,refetch:g}=JG(),{refetch:v}=e(),{data:_}=e();return P.useEffect(()=>{d?.user.id&&(f||_)&&(g?.(),v?.())},[d?.user.id]),P.useEffect(()=>{h||p||s&&l==="slug"&&!f&&r(c||o)},[f,h,p,s,l,c,r,o]),null},tK=({href:e,className:t,children:n})=>C.jsx("a",{className:t,href:e,children:n}),nK=e=>{window.location.href=e},rK=e=>{window.location.replace(e)},oK=({variant:e="default",message:t})=>{e==="default"?rC(t):rC[e](t)},vt=P.createContext({}),iK=({children:e,authClient:t,account:n,avatar:r,deleteUser:o,social:s,genericOAuth:l,basePath:c="/auth",baseURL:d="",captcha:f,redirectTo:p="/",credentials:h,changeEmail:g=!0,freshAge:v=3600*24,hooks:_,mutators:b,localization:x,localizeErrors:S=!0,nameRequired:E=!0,organization:T,teams:R,signUp:O=!0,toast:A=oK,viewPaths:I,navigate:M,replace:L,Link:H=tK,emailVerification:j,...B})=>{const F=t,Z=P.useMemo(()=>{if(r)return r===!0?{extension:"png",size:128}:{upload:r.upload,delete:r.delete,extension:r.extension||"png",size:r.size||(r.upload?256:128),Image:r.Image}},[r]),ie=P.useMemo(()=>{if(j)return j===!0?{otp:!1}:{otp:j.otp??!1}},[j]),q=P.useMemo(()=>{var Y;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:tC}:{basePath:((Y=n.basePath)!=null&&Y.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...tC,...n.viewPaths}}},[n]),W=P.useMemo(()=>{if(o)return o===!0?{}:o},[o]),te=P.useMemo(()=>{if(s)return s},[s]),le=P.useMemo(()=>{if(l)return l},[l]),Q=P.useMemo(()=>{if(h!==!1)return h===!0?{forgotPassword:!0,usernameRequired:!0}:{...h,forgotPassword:h?.forgotPassword??!0,usernameRequired:h?.usernameRequired??!0}},[h]),k=P.useMemo(()=>{if(O!==!1)return O===!0||O===void 0?{fields:["name"]}:{fields:O.fields||["name"]}},[O]),G=P.useMemo(()=>{var Y;if(!T)return;if(T===!0)return{basePath:"/organization",viewPaths:nC,customRoles:[]};let re;T.logo===!0?re={extension:"png",size:128}:T.logo&&(re={upload:T.logo.upload,delete:T.logo.delete,extension:T.logo.extension||"png",size:T.logo.size||(T.logo.upload?256:128)});const ve=(Y=T.basePath)!=null&&Y.endsWith("/")?T.basePath.slice(0,-1):T.basePath;return{...T,logo:re,basePath:ve??"/organization",customRoles:T.customRoles||[],viewPaths:{...nC,...T.viewPaths}}},[T]),V=P.useMemo(()=>{var Y,re;if(!(!R||!G))return R===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:R.enabled??!0,customRoles:R.customRoles||[],colors:{count:((Y=R.colors)==null?void 0:Y.count)??5,prefix:((re=R.colors)==null?void 0:re.prefix)??"team"}}},[R,G]),D=P.useMemo(()=>({deleteApiKey:Y=>F.apiKey.delete({...Y,fetchOptions:{throw:!0}}),deletePasskey:Y=>F.passkey.deletePasskey({...Y,fetchOptions:{throw:!0}}),revokeDeviceSession:Y=>F.multiSession.revoke({...Y,fetchOptions:{throw:!0}}),revokeSession:Y=>F.revokeSession({...Y,fetchOptions:{throw:!0}}),setActiveSession:Y=>F.multiSession.setActive({...Y,fetchOptions:{throw:!0}}),updateOrganization:Y=>F.organization.update({...Y,fetchOptions:{throw:!0}}),updateTeam:Y=>F.$fetch("/organization/update-team",{method:"POST",body:Y,throw:!0}),updateUser:Y=>F.updateUser({...Y,fetchOptions:{throw:!0}}),unlinkAccount:Y=>F.unlinkAccount({...Y,fetchOptions:{throw:!0}})}),[F]),U=P.useMemo(()=>({useSession:F.useSession,useListAccounts:()=>lo({queryFn:F.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Y=>lo({queryFn:()=>F.accountInfo(Y),cacheKey:`accountInfo:${JSON.stringify(Y)}`}),useListDeviceSessions:()=>lo({queryFn:F.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>lo({queryFn:F.listSessions,cacheKey:"listSessions"}),useListPasskeys:F.useListPasskeys,useListApiKeys:()=>lo({queryFn:F.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:F.useActiveOrganization,useListOrganizations:F.useListOrganizations,useHasPermission:Y=>lo({queryFn:()=>F.$fetch("/organization/has-permission",{method:"POST",body:Y}),cacheKey:`hasPermission:${JSON.stringify(Y)}`}),useInvitation:Y=>lo({queryFn:()=>F.organization.getInvitation(Y),cacheKey:`invitation:${JSON.stringify(Y)}`}),useListInvitations:Y=>lo({queryFn:()=>{var re;return F.$fetch(`/organization/list-invitations?organizationId=${((re=Y?.query)==null?void 0:re.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Y)}`}),useListUserInvitations:()=>lo({queryFn:()=>F.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Y=>lo({queryFn:()=>{var re;return F.$fetch(`/organization/list-members?organizationId=${((re=Y?.query)==null?void 0:re.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Y)}`}),useListTeams:Y=>lo({queryFn:()=>F.$fetch(`/organization/list-teams?organizationId=${Y?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Y)}`}),useListTeamMembers:Y=>lo({queryFn:()=>F.$fetch("/organization/list-team-members",{method:"POST",body:Y?.teamId?{query:{teamId:Y.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Y)}`}),useListUserTeams:()=>lo({queryFn:()=>F.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[F]),X=P.useMemo(()=>({...lG,...I}),[I]),fe=P.useMemo(()=>({...aG,...x}),[x]),pe=P.useMemo(()=>({...U,..._}),[U,_]),xe=P.useMemo(()=>({...D,...b}),[D,b]);d=d.endsWith("/")?d.slice(0,-1):d,c=c.endsWith("/")?c.slice(0,-1):c;const{data:je}=pe.useSession();return C.jsxs(vt.Provider,{value:{authClient:F,avatar:Z,basePath:c==="/"?"":c,baseURL:d,captcha:f,redirectTo:p,changeEmail:g,credentials:Q,deleteUser:W,emailVerification:ie,freshAge:v,genericOAuth:le,hooks:pe,mutators:xe,localization:fe,localizeErrors:S,nameRequired:E,organization:G,teams:V,account:q,signUp:k,social:te,toast:A,navigate:M||nK,replace:L||M||rK,viewPaths:X,Link:H,...B},children:[je&&G&&C.jsx(eK,{}),f?.provider==="google-recaptcha-v3"?C.jsx(QG,{children:e}):e]})};function lo({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:o},toast:s,localization:l,localizeErrors:c}=P.useContext(vt),{data:d,isPending:f}=o(),p=P.useRef(e);p.current=e;const h=t||e.toString(),g=P.useSyncExternalStore(P.useCallback(T=>No.subscribe(h,T),[h]),P.useCallback(()=>No.get(h),[h]),P.useCallback(()=>No.get(h),[h])),v=P.useRef(!1),_=P.useRef(void 0),[b,x]=P.useState(null),S=P.useCallback(async()=>{const T=No.getInFlightRequest(h);if(T){try{const O=await T;O.error?x(O.error):x(null)}catch(O){x(O)}return}g?.data!==void 0&&No.setRefetching(h,!0);const R=p.current();No.setInFlightRequest(h,R);try{const{data:O,error:A}=await R;A?(x(A),s({variant:"error",message:kn({error:A,localization:l,localizeErrors:c})})):x(null),No.set(h,O)}catch(O){const A=O;x(A),s({variant:"error",message:kn({error:A,localization:l,localizeErrors:c})})}finally{No.setRefetching(h,!1),No.removeInFlightRequest(h)}},[h,s,l,c,g]);P.useEffect(()=>{var T;const R=(T=d?.user)==null?void 0:T.id;if(!d){No.setRefetching(h,!1),No.clear(h),v.current=!1,_.current=void 0;return}const O=_.current!==void 0&&_.current!==R;O&&No.clear(h);const A=g?.data!==void 0,I=!g||Date.now()-g.timestamp>n;(!v.current||!A||O||A&&I)&&(!A||I)&&(v.current=!0,S()),_.current=R},[d,(r=d?.user)==null?void 0:r.id,h,S,g,n]);const E=f||g?.data===void 0&&!b;return{data:g?.data??null,isPending:E,isRefetching:g?.isRefetching??!1,error:b,refetch:S}}const sK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),UN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var aK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const lK=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:l,...c},d)=>P.createElement("svg",{ref:d,...aK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:UN("lucide",o),...c},[...l.map(([f,p])=>P.createElement(f,p)),...Array.isArray(s)?s:[s]]));const Ir=(e,t)=>{const n=P.forwardRef(({className:r,...o},s)=>P.createElement(lK,{ref:s,iconNode:t,className:UN(`lucide-${sK(e)}`,r),...o}));return n.displayName=`${e}`,n};const cK=Ir("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const uK=Ir("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const FN=Ir("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const dK=Ir("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const fK=Ir("EyeOff",[["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"}]]);const hK=Ir("Eye",[["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"}]]);const pK=Ir("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const Ar=Ir("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const BN=Ir("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const VN=Ir("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const mK=Ir("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const gK=Ir("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const lC=Ir("Send",[["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"}]]);const vK=Ir("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const yK=Ir("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const _K=Ir("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var gf=e=>e.type==="checkbox",ol=e=>e instanceof Date,jr=e=>e==null;const HN=e=>typeof e=="object";var Nn=e=>!jr(e)&&!Array.isArray(e)&&HN(e)&&!ol(e),qN=e=>Nn(e)&&e.target?gf(e.target)?e.target.checked:e.target.value:e,GN=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),bK=e=>{const t=e.constructor&&e.constructor.prototype;return Nn(t)&&t.hasOwnProperty("isPrototypeOf")},iS=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function rn(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(iS&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Nn(e)&&bK(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=rn(e[o]));return r}var qg=e=>/^\w*$/.test(e),tn=e=>e===void 0,Gg=e=>Array.isArray(e)?e.filter(Boolean):[],sS=e=>Gg(e.replace(/["|']|\]/g,"").split(/\.|\[/)),De=(e,t,n)=>{if(!t||!Nn(e))return n;const o=(qg(t)?[t]:sS(t)).reduce((s,l)=>jr(s)?void 0:s[l],e);return tn(o)||o===e?tn(e[t])?n:e[t]:o},ho=e=>typeof e=="boolean",Or=e=>typeof e=="function",zt=(e,t,n)=>{let r=-1;const o=qg(t)?[t]:sS(t),s=o.length,l=s-1;for(;++r<s;){const c=o[r];let d=n;if(r!==l){const f=e[c];d=Nn(f)||Array.isArray(f)?f:isNaN(+o[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=d,e=e[c]}};const ta={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},jo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ei={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},l_="form",KN="root",aS=ee.createContext(null);aS.displayName="HookFormControlContext";const Kg=()=>ee.useContext(aS);var ZN=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const l=s;return t._proxyFormState[l]!==jo.all&&(t._proxyFormState[l]=!r||jo.all),n&&(n[l]=!0),e[l]}});return o};const Zg=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function YN(e){const t=Kg(),{control:n=t,disabled:r,name:o,exact:s}=e||{},[l,c]=ee.useState(n._formState),d=ee.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Zg(()=>n._subscribe({name:o,formState:d.current,exact:s,callback:f=>{!r&&c({...n._formState,...f})}}),[o,r,s]),ee.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),ee.useMemo(()=>ZN(l,n,d.current,!1),[l,n])}var Tr=e=>typeof e=="string",Jb=(e,t,n,r,o)=>Tr(e)?(r&&t.watch.add(e),De(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),De(n,s))):(r&&(t.watchAll=!0),n),e1=e=>jr(e)||!HN(e);function po(e,t,n=new WeakSet){if(e===t)return!0;if(e1(e)||e1(t))return Object.is(e,t);if(ol(e)&&ol(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const l=e[s];if(!(s in t))return!1;if(s!=="ref"){const c=t[s];if(ol(l)&&ol(c)||(Nn(l)||Array.isArray(l))&&(Nn(c)||Array.isArray(c))?!po(l,c,n):!Object.is(l,c))return!1}}return!0}function wK(e){const t=Kg(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:l,compute:c}=e||{},d=ee.useRef(o),f=ee.useRef(c),p=ee.useRef(void 0),h=ee.useRef(n),g=ee.useRef(r);f.current=c;const[v,_]=ee.useState(()=>{const R=n._getWatch(r,d.current);return f.current?f.current(R):R}),b=ee.useCallback(R=>{const O=Jb(r,n._names,R||n._formValues,!1,d.current);return f.current?f.current(O):O},[n._formValues,n._names,r]),x=ee.useCallback(R=>{if(!s){const O=Jb(r,n._names,R||n._formValues,!1,d.current);if(f.current){const A=f.current(O);po(A,p.current)||(_(A),p.current=A)}else _(O)}},[n._formValues,n._names,s,r]);Zg(()=>((h.current!==n||!po(g.current,r))&&(h.current=n,g.current=r,x()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:R=>{x(R.values)}})),[n,l,r,x]),ee.useEffect(()=>n._removeUnmounted());const S=h.current!==n,E=g.current,T=ee.useMemo(()=>{if(s)return null;const R=!S&&!po(E,r);return S||R?b():null},[s,S,r,E,b]);return T!==null?T:v}function SK(e){const t=Kg(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:l,exact:c=!0}=e,d=GN(o._names.array,n),f=ee.useMemo(()=>De(o._formValues,n,De(o._defaultValues,n,l)),[o,n,l]),p=wK({control:o,name:n,defaultValue:f,exact:c}),h=YN({control:o,name:n,exact:c}),g=ee.useRef(e),v=ee.useRef(o.register(n,{...e.rules,value:p,...ho(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const _=ee.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!De(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!De(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!De(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!De(h.validatingFields,n)},error:{enumerable:!0,get:()=>De(h.errors,n)}}),[h,n]),b=ee.useCallback(T=>v.current.onChange({target:{value:qN(T),name:n},type:ta.CHANGE}),[n]),x=ee.useCallback(()=>v.current.onBlur({target:{value:De(o._formValues,n),name:n},type:ta.BLUR}),[n,o._formValues]),S=ee.useCallback(T=>{const R=De(o._fields,n);R&&R._f&&T&&(R._f.ref={focus:()=>Or(T.focus)&&T.focus(),select:()=>Or(T.select)&&T.select(),setCustomValidity:O=>Or(T.setCustomValidity)&&T.setCustomValidity(O),reportValidity:()=>Or(T.reportValidity)&&T.reportValidity()})},[o._fields,n]),E=ee.useMemo(()=>({name:n,value:p,...ho(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:b,onBlur:x,ref:S}),[n,r,h.disabled,b,x,S,p]);return ee.useEffect(()=>{const T=o._options.shouldUnregister||s;o.register(n,{...g.current.rules,...ho(g.current.disabled)?{disabled:g.current.disabled}:{}});const R=(O,A)=>{const I=De(o._fields,O);I&&I._f&&(I._f.mount=A)};if(R(n,!0),T){const O=rn(De(o._options.defaultValues,n,g.current.defaultValue));zt(o._defaultValues,n,O),tn(De(o._formValues,n))&&zt(o._formValues,n,O)}return!d&&o.register(n),()=>{(d?T&&!o._state.action:T)?o.unregister(n):R(n,!1)}},[n,o,d,s]),ee.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),ee.useMemo(()=>({field:E,formState:h,fieldState:_}),[E,h,_])}const EK=e=>e.render(SK(e)),lS=ee.createContext(null);lS.displayName="HookFormContext";const xK=()=>ee.useContext(lS),RK=e=>{const{children:t,watch:n,getValues:r,getFieldState:o,setError:s,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:p,reset:h,handleSubmit:g,unregister:v,control:_,register:b,setFocus:x,subscribe:S}=e,E=ee.useMemo(()=>({watch:n,getValues:r,getFieldState:o,setError:s,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:p,reset:h,handleSubmit:g,unregister:v,control:_,register:b,setFocus:x,subscribe:S}),[l,_,f,o,r,g,b,h,p,s,x,c,S,d,v,n]);return ee.createElement(lS.Provider,{value:E},ee.createElement(aS.Provider,{value:E.control},t))};var cS=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Jr=e=>Array.isArray(e)?e:[e],cC=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function WN(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=t[r];if(o&&Nn(o)&&s){const l=WN(o,s);Nn(l)&&(n[r]=l)}else e[r]&&(n[r]=s)}return n}var hr=e=>Nn(e)&&!Object.keys(e).length,uS=e=>e.type==="file",Zm=e=>{if(!iS)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},QN=e=>e.type==="select-multiple",dS=e=>e.type==="radio",OK=e=>dS(e)||gf(e),c_=e=>Zm(e)&&e.isConnected;function TK(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(jr(e)){e=void 0;break}e=e[t[r]],r++}return e}function CK(e){for(const t in e)if(e.hasOwnProperty(t)&&!tn(e[t]))return!1;return!0}function Cn(e,t){if(Tr(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:qg(t)?[t]:sS(t),r=n.length===1?e:TK(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(Nn(r)&&hr(r)||Array.isArray(r)&&CK(r))&&Cn(e,n.slice(0,-1)),e}var AK=e=>{for(const t in e)if(Or(e[t]))return!0;return!1};function XN(e){return Array.isArray(e)||Nn(e)&&!AK(e)}function t1(e,t={}){for(const n in e){const r=e[n];XN(r)?(t[n]=Array.isArray(r)?[]:{},t1(r,t[n])):tn(r)||(t[n]=!0)}return t}function xd(e,t,n){n||(n=t1(t));for(const r in e){const o=e[r];if(XN(o))tn(t)||e1(n[r])?n[r]=t1(o,Array.isArray(o)?[]:{}):xd(o,jr(t)?{}:t[r],n[r]);else{const s=t[r];n[r]=!po(o,s)}}return n}const uC={value:!1,isValid:!1},dC={value:!0,isValid:!0};var JN=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!tn(e[0].attributes.value)?tn(e[0].value)||e[0].value===""?dC:{value:e[0].value,isValid:!0}:dC:uC}return uC},e4=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>tn(e)?e:t?e===""?NaN:e&&+e:n&&Tr(e)?new Date(e):r?r(e):e;const fC={isValid:!1,value:null};var t4=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,fC):fC;function hC(e){const t=e.ref;return uS(t)?t.files:dS(t)?t4(e.refs).value:QN(t)?[...t.selectedOptions].map(({value:n})=>n):gf(t)?JN(e.refs).value:e4(tn(t.value)?e.ref.value:t.value,e)}var IK=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,PK=(e,t,n,r)=>{const o={};for(const s of e){const l=De(t,s);l&&zt(o,s,l._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Ym=e=>e instanceof RegExp,id=e=>tn(e)?e:Ym(e)?e.source:Nn(e)?Ym(e.value)?e.value.source:e.value:e,Ac=e=>({isOnSubmit:!e||e===jo.onSubmit,isOnBlur:e===jo.onBlur,isOnChange:e===jo.onChange,isOnAll:e===jo.all,isOnTouch:e===jo.onTouched});const pC="AsyncFunction";var MK=e=>!!e&&!!e.validate&&!!(Or(e.validate)&&e.validate.constructor.name===pC||Nn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===pC)),NK=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),n1=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Lc=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=De(e,o);if(s){const{_f:l,...c}=s;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],o)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Lc(c,t))break}else if(Nn(c)&&Lc(c,t))break}}};function mC(e,t,n){const r=De(e,n);if(r||qg(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),l=De(t,s),c=De(e,s);if(l&&!Array.isArray(l)&&n!==s)return{name:n};if(c&&c.type)return{name:s,error:c};if(c&&c.root&&c.root.type)return{name:`${s}.root`,error:c.root};o.pop()}return{name:n}}var kK=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return hr(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(l=>t[l]===(!r||jo.all))},DK=(e,t,n)=>!e||!t||e===t||Jr(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),LK=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,$K=(e,t)=>!Gg(De(e,t)).length&&Cn(e,t),n4=(e,t,n)=>{const r=Jr(De(e,n));return zt(r,KN,t[n]),zt(e,n,r),e};function gC(e,t,n="validate"){if(Tr(e)||Array.isArray(e)&&e.every(Tr)||ho(e)&&!e)return{type:n,message:Tr(e)?e:"",ref:t}}var ac=e=>Nn(e)&&!Ym(e)?e:{value:e,message:""},r1=async(e,t,n,r,o,s)=>{const{ref:l,refs:c,required:d,maxLength:f,minLength:p,min:h,max:g,pattern:v,validate:_,name:b,valueAsNumber:x,mount:S}=e._f,E=De(n,b);if(!S||t.has(b))return{};const T=c?c[0]:l,R=B=>{o&&T.reportValidity&&(T.setCustomValidity(ho(B)?"":B||""),T.reportValidity())},O={},A=dS(l),I=gf(l),M=A||I,L=(x||uS(l))&&tn(l.value)&&tn(E)||Zm(l)&&l.value===""||E===""||Array.isArray(E)&&!E.length||x&&typeof E=="number"&&isNaN(E),H=cS.bind(null,b,r,O),j=(B,F,Z,ie=ei.maxLength,q=ei.minLength)=>{const W=B?F:Z;O[b]={type:B?ie:q,message:W,ref:l,...H(B?ie:q,W)}};if(s?!Array.isArray(E)||!E.length:d&&(!M&&(L||jr(E))||ho(E)&&!E||I&&!JN(c).isValid||A&&!t4(c).isValid)){const{value:B,message:F}=Tr(d)?{value:!!d,message:d}:ac(d);if(B&&(O[b]={type:ei.required,message:F,ref:T,...H(ei.required,F)},!r))return R(F),O}if(!L&&(!jr(h)||!jr(g))){let B,F;const Z=ac(g),ie=ac(h);if(!jr(E)&&!isNaN(E)){const q=l.valueAsNumber||E&&+E;jr(Z.value)||(B=q>Z.value),jr(ie.value)||(F=q<ie.value)}else{const q=l.valueAsDate||new Date(E),W=Q=>new Date(new Date().toDateString()+" "+Q),te=l.type=="time",le=l.type=="week";Tr(Z.value)&&E&&(B=te?W(E)>W(Z.value):le?E>Z.value:q>new Date(Z.value)),Tr(ie.value)&&E&&(F=te?W(E)<W(ie.value):le?E<ie.value:q<new Date(ie.value))}if((B||F)&&(j(!!B,Z.message,ie.message,ei.max,ei.min),!r))return R(O[b].message),O}if((f||p)&&!L&&(Tr(E)||s&&Array.isArray(E))){const B=ac(f),F=ac(p),Z=!jr(B.value)&&E.length>+B.value,ie=!jr(F.value)&&E.length<+F.value;if((Z||ie)&&(j(Z,B.message,F.message),!r))return R(O[b].message),O}if(v&&!L&&Tr(E)){const{value:B,message:F}=ac(v);if(Ym(B)&&!E.match(B)&&(O[b]={type:ei.pattern,message:F,ref:l,...H(ei.pattern,F)},!r))return R(F),O}if(_){if(Or(_)){const B=await _(E,n),F=gC(B,T);if(F&&(O[b]={...F,...H(ei.validate,F.message)},!r))return R(F.message),O}else if(Nn(_)){let B={};for(const F in _){if(!hr(B)&&!r)break;const Z=gC(await _[F](E,n),T,F);Z&&(B={...Z,...H(F,Z.message)},R(Z.message),r&&(O[b]=B))}if(!hr(B)&&(O[b]={ref:T,...B},!r))return O}}return R(!0),O};const jK={mode:jo.onSubmit,reValidateMode:jo.onChange,shouldFocusError:!0};function zK(e={}){let t={...jK,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Or(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Nn(t.defaultValues)||Nn(t.values)?rn(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:rn(o),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},d,f=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...p};let g={...h};const v={array:cC(),state:cC()},_=t.criteriaMode===jo.all,b=K=>ne=>{clearTimeout(f),f=setTimeout(K,ne)},x=async K=>{if(!l.keepIsValid&&!t.disabled&&(h.isValid||g.isValid||K)){let ne;t.resolver?(ne=hr((await L()).errors),S()):ne=await B({fields:r,onlyCheckValid:!0,eventType:ta.VALID}),ne!==n.isValid&&v.state.next({isValid:ne})}},S=(K,ne)=>{!t.disabled&&(h.isValidating||h.validatingFields||g.isValidating||g.validatingFields)&&((K||Array.from(c.mount)).forEach(ae=>{ae&&(ne?zt(n.validatingFields,ae,ne):Cn(n.validatingFields,ae))}),v.state.next({validatingFields:n.validatingFields,isValidating:!hr(n.validatingFields)}))},E=K=>{const ne=xd(o,s),ae=IK(K);zt(n.dirtyFields,ae,De(ne,ae))},T=(K,ne=[],ae,Oe,Ae=!0,Ie=!0)=>{if(Oe&&ae&&!t.disabled){if(l.action=!0,Ie&&Array.isArray(De(r,K))){const ke=ae(De(r,K),Oe.argA,Oe.argB);Ae&&zt(r,K,ke)}if(Ie&&Array.isArray(De(n.errors,K))){const ke=ae(De(n.errors,K),Oe.argA,Oe.argB);Ae&&zt(n.errors,K,ke),$K(n.errors,K)}if((h.touchedFields||g.touchedFields)&&Ie&&Array.isArray(De(n.touchedFields,K))){const ke=ae(De(n.touchedFields,K),Oe.argA,Oe.argB);Ae&&zt(n.touchedFields,K,ke)}(h.dirtyFields||g.dirtyFields)&&E(K),v.state.next({name:K,isDirty:Z(K,ne),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else zt(s,K,ne)},R=(K,ne)=>{zt(n.errors,K,ne),v.state.next({errors:n.errors})},O=K=>{n.errors=K,v.state.next({errors:n.errors,isValid:!1})},A=(K,ne,ae,Oe)=>{const Ae=De(r,K);if(Ae){const Ie=De(s,K,tn(ae)?De(o,K):ae);tn(Ie)||Oe&&Oe.defaultChecked||ne?zt(s,K,ne?Ie:hC(Ae._f)):W(K,Ie),l.mount&&!l.action&&x()}},I=(K,ne,ae,Oe,Ae)=>{let Ie=!1,ke=!1;const Je={name:K};if(!t.disabled){if(!ae||Oe){(h.isDirty||g.isDirty)&&(ke=n.isDirty,n.isDirty=Je.isDirty=Z(),Ie=ke!==Je.isDirty);const et=po(De(o,K),ne);ke=!!De(n.dirtyFields,K),et?Cn(n.dirtyFields,K):zt(n.dirtyFields,K,!0),Je.dirtyFields=n.dirtyFields,Ie=Ie||(h.dirtyFields||g.dirtyFields)&&ke!==!et}if(ae){const et=De(n.touchedFields,K);et||(zt(n.touchedFields,K,ae),Je.touchedFields=n.touchedFields,Ie=Ie||(h.touchedFields||g.touchedFields)&&et!==ae)}Ie&&Ae&&v.state.next(Je)}return Ie?Je:{}},M=(K,ne,ae,Oe)=>{const Ae=De(n.errors,K),Ie=(h.isValid||g.isValid)&&ho(ne)&&n.isValid!==ne;if(t.delayError&&ae?(d=b(()=>R(K,ae)),d(t.delayError)):(clearTimeout(f),d=null,ae?zt(n.errors,K,ae):Cn(n.errors,K)),(ae?!po(Ae,ae):Ae)||!hr(Oe)||Ie){const ke={...Oe,...Ie&&ho(ne)?{isValid:ne}:{},errors:n.errors,name:K};n={...n,...ke},v.state.next(ke)}},L=async K=>(S(K,!0),await t.resolver(s,t.context,PK(K||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),H=async K=>{const{errors:ne}=await L(K);if(S(K),K)for(const ae of K){const Oe=De(ne,ae);Oe?zt(n.errors,ae,Oe):Cn(n.errors,ae)}else n.errors=ne;return ne},j=async({name:K,eventType:ne})=>{if(e.validate){const ae=await e.validate({formValues:s,formState:n,name:K,eventType:ne});if(Nn(ae))for(const Oe in ae)ae[Oe]&&fe(`${l_}.${Oe}`,{message:Tr(ae.message)?ae.message:"",type:ei.validate});else Tr(ae)||!ae?fe(l_,{message:ae||"",type:ei.validate}):X(l_);return ae}return!0},B=async({fields:K,onlyCheckValid:ne,name:ae,eventType:Oe,context:Ae={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ae.runRootValidation=!0,!await j({name:ae,eventType:Oe})&&(Ae.valid=!1,ne)))return Ae.valid;for(const Ie in K){const ke=K[Ie];if(ke){const{_f:Je,...et}=ke;if(Je){const _t=c.array.has(Je.name),Tt=ke._f&&MK(ke._f);Tt&&h.validatingFields&&S([Je.name],!0);const bt=await r1(ke,c.disabled,s,_,t.shouldUseNativeValidation&&!ne,_t);if(Tt&&h.validatingFields&&S([Je.name]),bt[Je.name]&&(Ae.valid=!1,ne)||(!ne&&(De(bt,Je.name)?_t?n4(n.errors,bt,Je.name):zt(n.errors,Je.name,bt[Je.name]):Cn(n.errors,Je.name)),e.shouldUseNativeValidation&&bt[Je.name]))break}!hr(et)&&await B({context:Ae,onlyCheckValid:ne,fields:et,name:Ie,eventType:Oe})}}return Ae.valid},F=()=>{for(const K of c.unMount){const ne=De(r,K);ne&&(ne._f.refs?ne._f.refs.every(ae=>!c_(ae)):!c_(ne._f.ref))&&Y(K)}c.unMount=new Set},Z=(K,ne)=>!t.disabled&&(K&&ne&&zt(s,K,ne),!po(D(),o)),ie=(K,ne,ae)=>Jb(K,c,{...l.mount?s:tn(ne)?o:Tr(K)?{[K]:ne}:ne},ae,ne),q=K=>Gg(De(l.mount?s:o,K,t.shouldUnregister?De(o,K,[]):[])),W=(K,ne,ae={})=>{const Oe=De(r,K);let Ae=ne;if(Oe){const Ie=Oe._f;Ie&&(!Ie.disabled&&zt(s,K,e4(ne,Ie)),Ae=Zm(Ie.ref)&&jr(ne)?"":ne,QN(Ie.ref)?[...Ie.ref.options].forEach(ke=>ke.selected=Ae.includes(ke.value)):Ie.refs?gf(Ie.ref)?Ie.refs.forEach(ke=>{(!ke.defaultChecked||!ke.disabled)&&(Array.isArray(Ae)?ke.checked=!!Ae.find(Je=>Je===ke.value):ke.checked=Ae===ke.value||!!Ae)}):Ie.refs.forEach(ke=>ke.checked=ke.value===Ae):uS(Ie.ref)?Ie.ref.value="":(Ie.ref.value=Ae,Ie.ref.type||v.state.next({name:K,values:rn(s)})))}(ae.shouldDirty||ae.shouldTouch)&&I(K,Ae,ae.shouldTouch,ae.shouldDirty,!0),ae.shouldValidate&&V(K)},te=(K,ne,ae)=>{for(const Oe in ne){if(!ne.hasOwnProperty(Oe))return;const Ae=ne[Oe],Ie=K+"."+Oe,ke=De(r,Ie);(c.array.has(K)||Nn(Ae)||ke&&!ke._f)&&!ol(Ae)?te(Ie,Ae,ae):W(Ie,Ae,ae)}},le=(K,ne,ae={})=>{const Oe=De(r,K),Ae=c.array.has(K),Ie=rn(ne),ke=De(s,K),Je=po(ke,Ie);if(zt(s,K,Ie),Ae)v.array.next({name:K,values:rn(s)}),ae.shouldDirty&&(E(K),v.state.next({name:K,dirtyFields:n.dirtyFields,isDirty:Z(K,Ie)}));else{const et=Array.isArray(Ie)&&!Ie.length||hr(Ie);!Oe||Oe._f||jr(Ie)||et?W(K,Ie,ae):te(K,Ie,ae)}Je||(n1(K,c)?v.state.next({...n,name:K,values:rn(s)}):v.state.next({name:l.mount?K:void 0,values:rn(s)}))},Q=K=>{const ne=Or(K)?K(s):K;po(s,ne)||(s={...s,...ne},v.state.next({...n,values:s}))},k=async K=>{l.mount=!0;const ne=K.target;let ae=ne.name,Oe=!0;const Ae=De(r,ae),Ie=et=>{Oe=Number.isNaN(et)||ol(et)&&isNaN(et.getTime())||po(et,De(s,ae,et))},ke=Ac(t.mode),Je=Ac(t.reValidateMode);if(Ae){let et,_t;const Tt=ne.type?hC(Ae._f):qN(K),bt=K.type===ta.BLUR||K.type===ta.FOCUS_OUT,Ln=!NK(Ae._f)&&!e.validate&&!t.resolver&&!De(n.errors,ae)&&!Ae._f.deps||LK(bt,De(n.touchedFields,ae),n.isSubmitted,Je,ke),Ni=n1(ae,c,bt);zt(s,ae,Tt),bt?(!ne||!ne.readOnly)&&(Ae._f.onBlur&&Ae._f.onBlur(K),d&&d(0)):Ae._f.onChange&&Ae._f.onChange(K);const Go=I(ae,Tt,bt),Ye=!hr(Go)||Ni;if(!bt&&v.state.next({name:ae,type:K.type,values:rn(s)}),Ln)return(h.isValid||g.isValid)&&(t.mode==="onBlur"?bt&&x():bt||x()),Ye&&v.state.next({name:ae,...Ni?{}:Go});if(!t.resolver&&e.validate&&await j({name:ae,eventType:K.type}),!bt&&Ni&&v.state.next({...n}),t.resolver){const{errors:pt}=await L([ae]);if(S([ae]),Ie(Tt),Oe){const Ct=mC(n.errors,r,ae),st=mC(pt,r,Ct.name||ae);et=st.error,ae=st.name,_t=hr(pt)}}else S([ae],!0),et=(await r1(Ae,c.disabled,s,_,t.shouldUseNativeValidation))[ae],S([ae]),Ie(Tt),Oe&&(et?_t=!1:(h.isValid||g.isValid)&&(_t=await B({fields:r,onlyCheckValid:!0,name:ae,eventType:K.type})));Oe&&(Ae._f.deps&&(!Array.isArray(Ae._f.deps)||Ae._f.deps.length>0)&&V(Ae._f.deps),M(ae,_t,et,Go))}},G=(K,ne)=>{if(De(n.errors,ne)&&K.focus)return K.focus(),1},V=async(K,ne={})=>{let ae,Oe;const Ae=Jr(K);if(t.resolver){const Ie=await H(tn(K)?K:Ae);ae=hr(Ie),Oe=K?!Ae.some(ke=>De(Ie,ke)):ae}else K?(Oe=(await Promise.all(Ae.map(async Ie=>{const ke=De(r,Ie);return await B({fields:ke&&ke._f?{[Ie]:ke}:ke,eventType:ta.TRIGGER})}))).every(Boolean),!(!Oe&&!n.isValid)&&x()):Oe=ae=await B({fields:r,name:K,eventType:ta.TRIGGER});return v.state.next({...!Tr(K)||(h.isValid||g.isValid)&&ae!==n.isValid?{}:{name:K},...t.resolver||!K?{isValid:ae}:{},errors:n.errors}),ne.shouldFocus&&!Oe&&Lc(r,G,K?Ae:c.mount),Oe},D=(K,ne)=>{let ae={...l.mount?s:o};return ne&&(ae=WN(ne.dirtyFields?n.dirtyFields:n.touchedFields,ae)),tn(K)?ae:Tr(K)?De(ae,K):K.map(Oe=>De(ae,Oe))},U=(K,ne)=>({invalid:!!De((ne||n).errors,K),isDirty:!!De((ne||n).dirtyFields,K),error:De((ne||n).errors,K),isValidating:!!De(n.validatingFields,K),isTouched:!!De((ne||n).touchedFields,K)}),X=K=>{const ne=K?Jr(K):void 0;ne?.forEach(ae=>Cn(n.errors,ae)),ne?ne.forEach(ae=>{v.state.next({name:ae,errors:n.errors})}):v.state.next({errors:{}})},fe=(K,ne,ae)=>{const Oe=(De(r,K,{_f:{}})._f||{}).ref,Ae=De(n.errors,K)||{},{ref:Ie,message:ke,type:Je,...et}=Ae;zt(n.errors,K,{...et,...ne,ref:Oe}),v.state.next({name:K,errors:n.errors,isValid:!1}),ae&&ae.shouldFocus&&Oe&&Oe.focus&&Oe.focus()},pe=(K,ne)=>Or(K)?v.state.subscribe({next:ae=>"values"in ae&&K(ae.values||ie(void 0,ne),ae)}):ie(K,ne,!0),xe=K=>v.state.subscribe({next:ne=>{if(DK(K.name,ne.name,K.exact)&&kK(ne,K.formState||h,Me,K.reRenderRoot)){const ae={...s};K.callback({values:ae,...n,...ne,defaultValues:o})}}}).unsubscribe,je=K=>(l.mount=!0,g={...g,...K.formState},xe({...K,formState:{...p,...K.formState}})),Y=(K,ne={})=>{for(const ae of K?Jr(K):c.mount)c.mount.delete(ae),c.array.delete(ae),ne.keepValue||(Cn(r,ae),Cn(s,ae)),!ne.keepError&&Cn(n.errors,ae),!ne.keepDirty&&Cn(n.dirtyFields,ae),!ne.keepTouched&&Cn(n.touchedFields,ae),!ne.keepIsValidating&&Cn(n.validatingFields,ae),!t.shouldUnregister&&!ne.keepDefaultValue&&Cn(o,ae);v.state.next({values:rn(s)}),v.state.next({...n,...ne.keepDirty?{isDirty:Z()}:{}}),!ne.keepIsValid&&x()},re=({disabled:K,name:ne})=>{if(ho(K)&&l.mount||K||c.disabled.has(ne)){const Ae=c.disabled.has(ne)!==!!K;K?c.disabled.add(ne):c.disabled.delete(ne),Ae&&l.mount&&!l.action&&x()}},ve=(K,ne={})=>{let ae=De(r,K);const Oe=ho(ne.disabled)||ho(t.disabled),Ae=!c.registerName.has(K)&&ae&&ae._f&&!ae._f.mount;return zt(r,K,{...ae||{},_f:{...ae&&ae._f?ae._f:{ref:{name:K}},name:K,mount:!0,...ne}}),c.mount.add(K),ae&&!Ae?re({disabled:ho(ne.disabled)?ne.disabled:t.disabled,name:K}):A(K,!0,ne.value),{...Oe?{disabled:ne.disabled||t.disabled}:{},...t.progressive?{required:!!ne.required,min:id(ne.min),max:id(ne.max),minLength:id(ne.minLength),maxLength:id(ne.maxLength),pattern:id(ne.pattern)}:{},name:K,onChange:k,onBlur:k,ref:Ie=>{if(Ie){c.registerName.add(K),ve(K,ne),c.registerName.delete(K),ae=De(r,K);const ke=tn(Ie.value)&&Ie.querySelectorAll&&Ie.querySelectorAll("input,select,textarea")[0]||Ie,Je=OK(ke),et=ae._f.refs||[];if(Je?et.find(_t=>_t===ke):ke===ae._f.ref)return;zt(r,K,{_f:{...ae._f,...Je?{refs:[...et.filter(c_),ke,...Array.isArray(De(o,K))?[{}]:[]],ref:{type:ke.type,name:K}}:{ref:ke}}}),A(K,!1,void 0,ke)}else ae=De(r,K,{}),ae._f&&(ae._f.mount=!1),(t.shouldUnregister||ne.shouldUnregister)&&!(GN(c.array,K)&&l.action)&&c.unMount.add(K)}}},se=()=>t.shouldFocusError&&Lc(r,G,c.mount),Se=K=>{ho(K)&&(v.state.next({disabled:K}),Lc(r,(ne,ae)=>{const Oe=De(r,ae);Oe&&(ne.disabled=Oe._f.disabled||K,Array.isArray(Oe._f.refs)&&Oe._f.refs.forEach(Ae=>{Ae.disabled=Oe._f.disabled||K}))},0,!1))},Te=(K,ne)=>async ae=>{let Oe;ae&&(ae.preventDefault&&ae.preventDefault(),ae.persist&&ae.persist());let Ae=rn(s);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Ie,values:ke}=await L();S(),n.errors=Ie,Ae=rn(ke)}else await B({fields:r,eventType:ta.SUBMIT});if(c.disabled.size)for(const Ie of c.disabled)Cn(Ae,Ie);if(Cn(n.errors,KN),hr(n.errors)){v.state.next({errors:{}});try{await K(Ae,ae)}catch(Ie){Oe=Ie}}else ne&&await ne({...n.errors},ae),se(),setTimeout(se);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:hr(n.errors)&&!Oe,submitCount:n.submitCount+1,errors:n.errors}),Oe)throw Oe},tt=(K,ne={})=>{De(r,K)&&(tn(ne.defaultValue)?le(K,rn(De(o,K))):(le(K,ne.defaultValue),zt(o,K,rn(ne.defaultValue))),ne.keepTouched||Cn(n.touchedFields,K),ne.keepDirty||(Cn(n.dirtyFields,K),n.isDirty=ne.defaultValue?Z(K,rn(De(o,K))):Z()),ne.keepError||(Cn(n.errors,K),h.isValid&&x()),v.state.next({...n}))},rt=(K,ne={})=>{const ae=K?rn(K):o,Oe=rn(ae),Ae=hr(K),Ie=Ae?o:Oe;if(ne.keepDefaultValues||(o=ae),!ne.keepValues){if(ne.keepDirtyValues){const ke=new Set([...c.mount,...Object.keys(xd(o,s))]);for(const Je of Array.from(ke)){const et=De(n.dirtyFields,Je),_t=De(s,Je),Tt=De(Ie,Je);et&&!tn(_t)?zt(Ie,Je,_t):!et&&!tn(Tt)&&le(Je,Tt)}}else{if(iS&&tn(K))for(const ke of c.mount){const Je=De(r,ke);if(Je&&Je._f){const et=Array.isArray(Je._f.refs)?Je._f.refs[0]:Je._f.ref;if(Zm(et)){const _t=et.closest("form");if(_t){_t.reset();break}}}}if(ne.keepFieldsRef)for(const ke of c.mount)le(ke,De(Ie,ke));else r={}}s=t.shouldUnregister?ne.keepDefaultValues?rn(o):{}:rn(Ie),v.array.next({values:{...Ie}}),v.state.next({values:{...Ie}})}c={mount:ne.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!h.isValid||!!ne.keepIsValid||!!ne.keepDirtyValues||!t.shouldUnregister&&!hr(Ie),l.watch=!!t.shouldUnregister,l.keepIsValid=!!ne.keepIsValid,l.action=!1,ne.keepErrors||(n.errors={}),v.state.next({submitCount:ne.keepSubmitCount?n.submitCount:0,isDirty:Ae?!1:ne.keepDirty?n.isDirty:!!(ne.keepDefaultValues&&!po(K,o)),isSubmitted:ne.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ae?{}:ne.keepDirtyValues?ne.keepDefaultValues&&s?xd(o,s):n.dirtyFields:ne.keepDefaultValues&&K?xd(o,K):ne.keepDirty?n.dirtyFields:{},touchedFields:ne.keepTouched?n.touchedFields:{},errors:ne.keepErrors?n.errors:{},isSubmitSuccessful:ne.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Be=(K,ne)=>rt(Or(K)?K(s):K,{...t.resetOptions,...ne}),Qe=(K,ne={})=>{const ae=De(r,K),Oe=ae&&ae._f;if(Oe){const Ae=Oe.refs?Oe.refs[0]:Oe.ref;Ae.focus&&setTimeout(()=>{Ae.focus(),ne.shouldSelect&&Or(Ae.select)&&Ae.select()})}},Me=K=>{n={...n,...K}},Fe={control:{register:ve,unregister:Y,getFieldState:U,handleSubmit:Te,setError:fe,_subscribe:xe,_runSchema:L,_updateIsValidating:S,_focusError:se,_getWatch:ie,_getDirty:Z,_setValid:x,_setFieldArray:T,_setDisabledField:re,_setErrors:O,_getFieldArray:q,_reset:rt,_resetDefaultValues:()=>Or(t.defaultValues)&&t.defaultValues().then(K=>{Be(K,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:F,_disableForm:Se,_subjects:v,_proxyFormState:h,get _fields(){return r},get _formValues(){return s},get _state(){return l},set _state(K){l=K},get _defaultValues(){return o},get _names(){return c},set _names(K){c=K},get _formState(){return n},get _options(){return t},set _options(K){t={...t,...K}}},subscribe:je,trigger:V,register:ve,handleSubmit:Te,watch:pe,setValue:le,setValues:Q,getValues:D,reset:Be,resetField:tt,clearErrors:X,unregister:Y,setError:fe,setFocus:Qe,getFieldState:U};return{...Fe,formControl:Fe}}var Gs=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},u_=(e,t,n={})=>n.shouldFocus||tn(n.shouldFocus)?n.focusName||`${e}.${tn(n.focusIndex)?t:n.focusIndex}.`:"",d_=(e,t)=>[...e,...Jr(t)],f_=e=>Array.isArray(e)?e.map(()=>{}):void 0;function h_(e,t,n){return[...e.slice(0,t),...Jr(n),...e.slice(t)]}var p_=(e,t,n)=>Array.isArray(e)?(tn(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],m_=(e,t)=>[...Jr(t),...Jr(e)];function UK(e,t){let n=0;const r=[...e];for(const o of t)r.splice(o-n,1),n++;return Gg(r).length?r:[]}var g_=(e,t)=>tn(t)?[]:UK(e,Jr(t).sort((n,r)=>n-r)),v_=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},vC=(e,t,n)=>(e[t]=n,e);function nue(e){const t=Kg(),{control:n=t,name:r,keyName:o="id",shouldUnregister:s,rules:l}=e,[c,d]=ee.useState(n._getFieldArray(r)),f=ee.useRef(n._getFieldArray(r).map(Gs)),p=ee.useRef(!1);n._names.array.add(r),ee.useMemo(()=>l&&c.length>=0&&n.register(r,l),[n,r,c.length,l]),Zg(()=>n._subjects.array.subscribe({next:({values:R,name:O})=>{if(O===r||!O){const A=De(R,r);Array.isArray(A)&&(d(A),f.current=A.map(Gs))}}}).unsubscribe,[n,r]);const h=ee.useCallback(R=>{p.current=!0,n._setFieldArray(r,R)},[n,r]),g=(R,O)=>{const A=Jr(rn(R)),I=d_(n._getFieldArray(r),A);n._names.focus=u_(r,I.length-1,O),f.current=d_(f.current,A.map(Gs)),h(I),d(I),n._setFieldArray(r,I,d_,{argA:f_(R)})},v=(R,O)=>{const A=Jr(rn(R)),I=m_(n._getFieldArray(r),A);n._names.focus=u_(r,0,O),f.current=m_(f.current,A.map(Gs)),h(I),d(I),n._setFieldArray(r,I,m_,{argA:f_(R)})},_=R=>{const O=g_(n._getFieldArray(r),R);f.current=g_(f.current,R),h(O),d(O),!Array.isArray(De(n._fields,r))&&zt(n._fields,r,void 0),n._setFieldArray(r,O,g_,{argA:R})},b=(R,O,A)=>{const I=Jr(rn(O)),M=h_(n._getFieldArray(r),R,I);n._names.focus=u_(r,R,A),f.current=h_(f.current,R,I.map(Gs)),h(M),d(M),n._setFieldArray(r,M,h_,{argA:R,argB:f_(O)})},x=(R,O)=>{const A=n._getFieldArray(r);v_(A,R,O),v_(f.current,R,O),h(A),d(A),n._setFieldArray(r,A,v_,{argA:R,argB:O},!1)},S=(R,O)=>{const A=n._getFieldArray(r);p_(A,R,O),p_(f.current,R,O),h(A),d(A),n._setFieldArray(r,A,p_,{argA:R,argB:O},!1)},E=(R,O)=>{const A=rn(O),I=vC(n._getFieldArray(r),R,A);f.current=[...I].map((M,L)=>!M||L===R?Gs():f.current[L]),h(I),d([...I]),n._setFieldArray(r,I,vC,{argA:R,argB:A},!0,!1)},T=R=>{const O=Jr(rn(R));f.current=O.map(Gs),h([...O]),d([...O]),n._setFieldArray(r,[...O],A=>A,{},!0,!1)};return ee.useEffect(()=>{n._state.action=!1,n1(r,n._names)&&n._subjects.state.next({...n._formState});const R=Ac(n._options.mode);if(p.current&&(!R.isOnSubmit||n._formState.isSubmitted)&&!Ac(n._options.reValidateMode).isOnSubmit&&!R.isOnBlur)if(n._options.resolver)n._runSchema([r]).then(O=>{n._updateIsValidating([r]);const A=De(O.errors,r),I=De(n._formState.errors,r);(I?!A&&I.type||A&&(I.type!==A.type||I.message!==A.message):A&&A.type)&&(A?zt(n._formState.errors,r,A):Cn(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const O=De(n._fields,r);O&&O._f&&!(Ac(n._options.reValidateMode).isOnSubmit&&Ac(n._options.mode).isOnSubmit)&&r1(O,n._names.disabled,n._formValues,n._options.criteriaMode===jo.all,n._options.shouldUseNativeValidation,!0).then(A=>!hr(A)&&n._subjects.state.next({errors:n4(n._formState.errors,A,r)}))}n._subjects.state.next({name:r,values:rn(n._formValues)}),n._names.focus&&Lc(n._fields,(O,A)=>{if(n._names.focus&&A.startsWith(n._names.focus)&&O.focus)return O.focus(),1}),n._names.focus="",n._setValid(),p.current=!1},[c,r,n]),ee.useEffect(()=>(!De(n._formValues,r)&&n._setFieldArray(r),()=>{const R=(O,A)=>{const I=De(n._fields,O);I&&I._f&&(I._f.mount=A)};n._options.shouldUnregister||s?n.unregister(r):R(r,!1)}),[r,n,o,s]),{swap:ee.useCallback(x,[h,r,n]),move:ee.useCallback(S,[h,r,n]),prepend:ee.useCallback(v,[h,r,n]),append:ee.useCallback(g,[h,r,n]),remove:ee.useCallback(_,[h,r,n]),insert:ee.useCallback(b,[h,r,n]),update:ee.useCallback(E,[h,r,n]),replace:ee.useCallback(T,[h,r,n]),fields:ee.useMemo(()=>c.map((R,O)=>({...R,[o]:f.current[O]||Gs()})),[c,o])}}function Ci(e={}){const t=ee.useRef(void 0),n=ee.useRef(void 0),[r,o]=ee.useState({isDirty:!1,isValidating:!1,isLoading:Or(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Or(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Or(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=zK(e);t.current={...c,formState:r}}const s=t.current.control;return s._options=e,Zg(()=>{const l=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(c=>({...c,isReady:!0})),s._formState.isReady=!0,l},[s]),ee.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),ee.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),ee.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),ee.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),ee.useEffect(()=>{if(s._proxyFormState.isDirty){const l=s._getDirty();l!==r.isDirty&&s._subjects.state.next({isDirty:l})}},[s,r.isDirty]),ee.useEffect(()=>{var l;e.values&&!po(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((l=s._options.resetOptions)===null||l===void 0)&&l.keepIsValid||s._setValid(),n.current=e.values,o(c=>({...c}))):s._resetDefaultValues()},[s,e.values]),ee.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=ee.useMemo(()=>ZN(r,s),[s,r]),t.current}function yC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vf(...e){return t=>{let n=!1;const r=e.map(o=>{const s=yC(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():yC(e[o],null)}}}}function er(...e){return P.useCallback(vf(...e),e)}var FK=Symbol.for("react.lazy"),Wm=Tw[" use ".trim().toString()];function BK(e){return typeof e=="object"&&e!==null&&"then"in e}function r4(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===FK&&"_payload"in e&&BK(e._payload)}function o4(e){const t=VK(e),n=P.forwardRef((r,o)=>{let{children:s,...l}=r;r4(s)&&typeof Wm=="function"&&(s=Wm(s._payload));const c=P.Children.toArray(s),d=c.find(qK);if(d){const f=d.props.children,p=c.map(h=>h===d?P.Children.count(f)>1?P.Children.only(null):P.isValidElement(f)?f.props.children:null:h);return C.jsx(t,{...l,ref:o,children:P.isValidElement(f)?P.cloneElement(f,void 0,p):null})}return C.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var fS=o4("Slot");function VK(e){const t=P.forwardRef((n,r)=>{let{children:o,...s}=n;if(r4(o)&&typeof Wm=="function"&&(o=Wm(o._payload)),P.isValidElement(o)){const l=KK(o),c=GK(s,o.props);return o.type!==P.Fragment&&(c.ref=r?vf(r,l):l),P.cloneElement(o,c)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var HK=Symbol("radix.slottable");function qK(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HK}function GK(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const d=s(...c);return o(...c),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function KK(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const _C=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bC=tS,i4=(e,t)=>n=>{var r;if(t?.variants==null)return bC(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(f=>{const p=n?.[f],h=s?.[f];if(p===null)return null;const g=_C(p)||_C(h);return o[f][g]}),c=n&&Object.entries(n).reduce((f,p)=>{let[h,g]=p;return g===void 0||(f[h]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:h,className:g,...v}=p;return Object.entries(v).every(_=>{let[b,x]=_;return Array.isArray(x)?x.includes({...s,...c}[b]):{...s,...c}[b]===x})?[...f,h,g]:f},[]);return bC(e,l,d,n?.class,n?.className)},wC=(e,t,n)=>{if(e&&"reportValidity"in e){const r=De(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},o1=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?wC(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>wC(o,n,e))}},SC=(e,t)=>{t.shouldUseNativeValidation&&o1(e,t);const n={};for(const r in e){const o=De(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.ref});if(ZK(t.names||Object.keys(e),r)){const l=Object.assign({},De(n,r));zt(l,"root",s),zt(n,r,l)}else zt(n,r,s)}return n},ZK=(e,t)=>{const n=EC(t);return e.some(r=>EC(r).match(`^${n}\\.\\d+`))};function EC(e){return e.replace(/\]|\[/g,"")}function xC(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function YK(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var c=r.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(h){return e.push(h)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=cS(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function WK(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var c=r.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:s,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(p){return p.forEach(function(h){return e.push(h)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=cS(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function Ai(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,s){try{return Promise.resolve(xC(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return s.shouldUseNativeValidation&&o1({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return Array.isArray(c?.issues)})(l))return{values:{},errors:SC(YK(l.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(xC(function(){return Promise.resolve((n.mode==="sync"?e9:t9)(e,r,t)).then(function(l){return s.shouldUseNativeValidation&&o1({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return c instanceof qw})(l))return{values:{},errors:SC(WK(l.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}function ct(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function QK(e,t){const n=P.createContext(t),r=s=>{const{children:l,...c}=s,d=P.useMemo(()=>c,Object.values(c));return C.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(s){const l=P.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function vl(e,t=[]){let n=[];function r(s,l){const c=P.createContext(l),d=n.length;n=[...n,l];const f=h=>{const{scope:g,children:v,..._}=h,b=g?.[e]?.[d]||c,x=P.useMemo(()=>_,Object.values(_));return C.jsx(b.Provider,{value:x,children:v})};f.displayName=s+"Provider";function p(h,g){const v=g?.[e]?.[d]||c,_=P.useContext(v);if(_)return _;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[f,p]}const o=()=>{const s=n.map(l=>P.createContext(l));return function(c){const d=c?.[e]||s;return P.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return o.scopeName=e,[r,XK(o,...t)]}function XK(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((c,{useScope:d,scopeName:f})=>{const h=d(s)[`__scope${f}`];return{...c,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var oi=globalThis?.document?P.useLayoutEffect:()=>{},JK=Tw[" useId ".trim().toString()]||(()=>{}),eZ=0;function ua(e){const[t,n]=P.useState(JK());return oi(()=>{n(r=>r??String(eZ++))},[e]),e||(t?`radix-${t}`:"")}var tZ=Tw[" useInsertionEffect ".trim().toString()]||oi;function yf({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,l]=nZ({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:o;{const p=P.useRef(e!==void 0);P.useEffect(()=>{const h=p.current;h!==c&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const f=P.useCallback(p=>{if(c){const h=rZ(p)?p(e):p;h!==e&&l.current?.(h)}else s(p)},[c,e,s,l]);return[d,f]}function nZ({defaultProp:e,onChange:t}){const[n,r]=P.useState(e),o=P.useRef(n),s=P.useRef(t);return tZ(()=>{s.current=t},[t]),P.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function rZ(e){return typeof e=="function"}function Xd(e){const t=oZ(e),n=P.forwardRef((r,o)=>{const{children:s,...l}=r,c=P.Children.toArray(s),d=c.find(iZ);if(d){const f=d.props.children,p=c.map(h=>h===d?P.Children.count(f)>1?P.Children.only(null):P.isValidElement(f)?f.props.children:null:h);return C.jsx(t,{...l,ref:o,children:P.isValidElement(f)?P.cloneElement(f,void 0,p):null})}return C.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function oZ(e){const t=P.forwardRef((n,r)=>{const{children:o,...s}=n;if(P.isValidElement(o)){const l=aZ(o),c=sZ(s,o.props);return o.type!==P.Fragment&&(c.ref=r?vf(r,l):l),P.cloneElement(o,c)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var s4=Symbol("radix.slottable");function rue(e){const t=({children:n})=>C.jsx(C.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=s4,t}function iZ(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===s4}function sZ(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const d=s(...c);return o(...c),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function aZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sn=lZ.reduce((e,t)=>{const n=Xd(`Primitive.${t}`),r=P.forwardRef((o,s)=>{const{asChild:l,...c}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function a4(e,t){e&&Lg.flushSync(()=>e.dispatchEvent(t))}function ii(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>t.current?.(...n),[])}function cZ(e,t=globalThis?.document){const n=ii(e);P.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var uZ="DismissableLayer",i1="dismissableLayer.update",dZ="dismissableLayer.pointerDownOutside",fZ="dismissableLayer.focusOutside",RC,l4=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hS=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=e,f=P.useContext(l4),[p,h]=P.useState(null),g=p?.ownerDocument??globalThis?.document,[,v]=P.useState({}),_=er(t,I=>h(I)),b=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(x),E=p?b.indexOf(p):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,R=E>=S,O=mZ(I=>{const M=I.target,L=[...f.branches].some(H=>H.contains(M));!R||L||(o?.(I),l?.(I),I.defaultPrevented||c?.())},g),A=gZ(I=>{const M=I.target;[...f.branches].some(H=>H.contains(M))||(s?.(I),l?.(I),I.defaultPrevented||c?.())},g);return cZ(I=>{E===f.layers.size-1&&(r?.(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},g),P.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(RC=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),OC(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=RC)}},[p,g,n,f]),P.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),OC())},[p,f]),P.useEffect(()=>{const I=()=>v({});return document.addEventListener(i1,I),()=>document.removeEventListener(i1,I)},[]),C.jsx(Sn.div,{...d,ref:_,style:{pointerEvents:T?R?"auto":"none":void 0,...e.style},onFocusCapture:ct(e.onFocusCapture,A.onFocusCapture),onBlurCapture:ct(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:ct(e.onPointerDownCapture,O.onPointerDownCapture)})});hS.displayName=uZ;var hZ="DismissableLayerBranch",pZ=P.forwardRef((e,t)=>{const n=P.useContext(l4),r=P.useRef(null),o=er(t,r);return P.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),C.jsx(Sn.div,{...e,ref:o})});pZ.displayName=hZ;function mZ(e,t=globalThis?.document){const n=ii(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let d=function(){c4(dZ,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gZ(e,t=globalThis?.document){const n=ii(e),r=P.useRef(!1);return P.useEffect(()=>{const o=s=>{s.target&&!r.current&&c4(fZ,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function OC(){const e=new CustomEvent(i1);document.dispatchEvent(e)}function c4(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?a4(o,s):o.dispatchEvent(s)}var y_="focusScope.autoFocusOnMount",__="focusScope.autoFocusOnUnmount",TC={bubbles:!1,cancelable:!0},vZ="FocusScope",pS=P.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[c,d]=P.useState(null),f=ii(o),p=ii(s),h=P.useRef(null),g=er(t,b=>d(b)),v=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(r){let b=function(T){if(v.paused||!c)return;const R=T.target;c.contains(R)?h.current=R:Js(h.current,{select:!0})},x=function(T){if(v.paused||!c)return;const R=T.relatedTarget;R!==null&&(c.contains(R)||Js(h.current,{select:!0}))},S=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&Js(c)};document.addEventListener("focusin",b),document.addEventListener("focusout",x);const E=new MutationObserver(S);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",x),E.disconnect()}}},[r,c,v.paused]),P.useEffect(()=>{if(c){AC.add(v);const b=document.activeElement;if(!c.contains(b)){const S=new CustomEvent(y_,TC);c.addEventListener(y_,f),c.dispatchEvent(S),S.defaultPrevented||(yZ(EZ(u4(c)),{select:!0}),document.activeElement===b&&Js(c))}return()=>{c.removeEventListener(y_,f),setTimeout(()=>{const S=new CustomEvent(__,TC);c.addEventListener(__,p),c.dispatchEvent(S),S.defaultPrevented||Js(b??document.body,{select:!0}),c.removeEventListener(__,p),AC.remove(v)},0)}}},[c,f,p,v]);const _=P.useCallback(b=>{if(!n&&!r||v.paused)return;const x=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,S=document.activeElement;if(x&&S){const E=b.currentTarget,[T,R]=_Z(E);T&&R?!b.shiftKey&&S===R?(b.preventDefault(),n&&Js(T,{select:!0})):b.shiftKey&&S===T&&(b.preventDefault(),n&&Js(R,{select:!0})):S===E&&b.preventDefault()}},[n,r,v.paused]);return C.jsx(Sn.div,{tabIndex:-1,...l,ref:g,onKeyDown:_})});pS.displayName=vZ;function yZ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Js(r,{select:t}),document.activeElement!==n)return}function _Z(e){const t=u4(e),n=CC(t,e),r=CC(t.reverse(),e);return[n,r]}function u4(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function CC(e,t){for(const n of e)if(!bZ(n,{upTo:t}))return n}function bZ(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wZ(e){return e instanceof HTMLInputElement&&"select"in e}function Js(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wZ(e)&&t&&e.select()}}var AC=SZ();function SZ(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=IC(e,t),e.unshift(t)},remove(t){e=IC(e,t),e[0]?.resume()}}}function IC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function EZ(e){return e.filter(t=>t.tagName!=="A")}var xZ="Portal",mS=P.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=P.useState(!1);oi(()=>s(!0),[]);const l=n||o&&globalThis?.document?.body;return l?WM.createPortal(C.jsx(Sn.div,{...r,ref:t}),l):null});mS.displayName=xZ;function RZ(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var vs=e=>{const{present:t,children:n}=e,r=OZ(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),s=er(r.ref,TZ(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:s}):null};vs.displayName="Presence";function OZ(e){const[t,n]=P.useState(),r=P.useRef(null),o=P.useRef(e),s=P.useRef("none"),l=e?"mounted":"unmounted",[c,d]=RZ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const f=up(r.current);s.current=c==="mounted"?f:"none"},[c]),oi(()=>{const f=r.current,p=o.current;if(p!==e){const g=s.current,v=up(f);e?d("MOUNT"):v==="none"||f?.display==="none"?d("UNMOUNT"):d(p&&g!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),oi(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,h=v=>{const b=up(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&b&&(d("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=v=>{v.target===t&&(s.current=up(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:P.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function up(e){return e?.animationName||"none"}function TZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var b_=0;function d4(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??PC()),document.body.insertAdjacentElement("beforeend",e[1]??PC()),b_++,()=>{b_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),b_--}},[])}function PC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Si=function(){return Si=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},Si.apply(this,arguments)};function f4(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 CZ(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 Sm="right-scroll-bar-position",Em="width-before-scroll-bar",AZ="with-scroll-bars-hidden",IZ="--removed-body-scroll-bar-size";function w_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function PZ(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var MZ=typeof window<"u"?P.useLayoutEffect:P.useEffect,MC=new WeakMap;function NZ(e,t){var n=PZ(null,function(r){return e.forEach(function(o){return w_(o,r)})});return MZ(function(){var r=MC.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(c){s.has(c)||w_(c,null)}),s.forEach(function(c){o.has(c)||w_(c,l)})}MC.set(n,e)},[e]),n}function kZ(e){return e}function DZ(e,t){t===void 0&&(t=kZ);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(s),l=n}var d=function(){var p=l;l=[],p.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){l.push(p),f()},filter:function(p){return l=l.filter(p),n}}}};return o}function LZ(e){e===void 0&&(e={});var t=DZ(null);return t.options=Si({async:!0,ssr:!1},e),t}var h4=function(e){var t=e.sideCar,n=f4(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return P.createElement(r,Si({},n))};h4.isSideCarExport=!0;function $Z(e,t){return e.useMedium(t),h4}var p4=LZ(),S_=function(){},Yg=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:S_,onWheelCapture:S_,onTouchMoveCapture:S_}),o=r[0],s=r[1],l=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,g=e.sideCar,v=e.noRelative,_=e.noIsolation,b=e.inert,x=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,T=e.gapMode,R=f4(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,A=NZ([n,t]),I=Si(Si({},R),o);return P.createElement(P.Fragment,null,p&&P.createElement(O,{sideCar:p4,removeScrollBar:f,shards:h,noRelative:v,noIsolation:_,inert:b,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:T}),l?P.cloneElement(P.Children.only(c),Si(Si({},I),{ref:A})):P.createElement(E,Si({},I,{className:d,ref:A}),c))});Yg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yg.classNames={fullWidth:Em,zeroRight:Sm};var jZ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zZ(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jZ();return t&&e.setAttribute("nonce",t),e}function UZ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function FZ(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var BZ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=zZ())&&(UZ(t,n),FZ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VZ=function(){var e=BZ();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},m4=function(){var e=VZ(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},HZ={left:0,top:0,right:0,gap:0},E_=function(e){return parseInt(e||"",10)||0},qZ=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[E_(n),E_(r),E_(o)]},GZ=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return HZ;var t=qZ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},KZ=m4(),$c="data-scroll-locked",ZZ=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
61
|
+
`}),C.jsx(XG,{}),e]})}function XG(){const{executeRecaptcha:e}=$N(),{theme:t}=oS(),{lang:n}=zN();return P.useEffect(()=>{if(!e)return;(async()=>{const o=document.querySelector("iframe[title='reCAPTCHA']");if(o){const s=new URL(o.src);s.searchParams.set("theme",t),n&&s.searchParams.set("hl",n),o.src=s.toString()}})()},[e,t,n]),null}function JG({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=P.useContext(vt),{pathMode:o,slug:s}=t||{};let l,c,d,f;const{data:p,isPending:h,isRefetching:g}=r();if(o==="slug"){const v=e||s;l=p?.find(_=>_.slug===v),c=h,d=g}else{const{data:v,isPending:_,isRefetching:b,refetch:x}=n();f=x,l=v,c=_,d=b}return P.useMemo(()=>({data:l,isPending:c,isRefetching:d,refetch:f}),[l,c,d,f])}var eK=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:o}=P.useContext(vt),{slug:s,pathMode:l,personalPath:c}=n||{},{data:d}=t(),{data:f,isPending:p,isRefetching:h,refetch:g}=JG(),{refetch:v}=e(),{data:_}=e();return P.useEffect(()=>{d?.user.id&&(f||_)&&(g?.(),v?.())},[d?.user.id]),P.useEffect(()=>{h||p||s&&l==="slug"&&!f&&r(c||o)},[f,h,p,s,l,c,r,o]),null},tK=({href:e,className:t,children:n})=>C.jsx("a",{className:t,href:e,children:n}),nK=e=>{window.location.href=e},rK=e=>{window.location.replace(e)},oK=({variant:e="default",message:t})=>{e==="default"?rC(t):rC[e](t)},vt=P.createContext({}),iK=({children:e,authClient:t,account:n,avatar:r,deleteUser:o,social:s,genericOAuth:l,basePath:c="/auth",baseURL:d="",captcha:f,redirectTo:p="/",credentials:h,changeEmail:g=!0,freshAge:v=3600*24,hooks:_,mutators:b,localization:x,localizeErrors:S=!0,nameRequired:E=!0,organization:T,teams:R,signUp:O=!0,toast:A=oK,viewPaths:I,navigate:M,replace:L,Link:H=tK,emailVerification:j,...B})=>{const F=t,Z=P.useMemo(()=>{if(r)return r===!0?{extension:"png",size:128}:{upload:r.upload,delete:r.delete,extension:r.extension||"png",size:r.size||(r.upload?256:128),Image:r.Image}},[r]),ie=P.useMemo(()=>{if(j)return j===!0?{otp:!1}:{otp:j.otp??!1}},[j]),q=P.useMemo(()=>{var Y;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:tC}:{basePath:((Y=n.basePath)!=null&&Y.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...tC,...n.viewPaths}}},[n]),W=P.useMemo(()=>{if(o)return o===!0?{}:o},[o]),te=P.useMemo(()=>{if(s)return s},[s]),le=P.useMemo(()=>{if(l)return l},[l]),Q=P.useMemo(()=>{if(h!==!1)return h===!0?{forgotPassword:!0,usernameRequired:!0}:{...h,forgotPassword:h?.forgotPassword??!0,usernameRequired:h?.usernameRequired??!0}},[h]),k=P.useMemo(()=>{if(O!==!1)return O===!0||O===void 0?{fields:["name"]}:{fields:O.fields||["name"]}},[O]),G=P.useMemo(()=>{var Y;if(!T)return;if(T===!0)return{basePath:"/organization",viewPaths:nC,customRoles:[]};let re;T.logo===!0?re={extension:"png",size:128}:T.logo&&(re={upload:T.logo.upload,delete:T.logo.delete,extension:T.logo.extension||"png",size:T.logo.size||(T.logo.upload?256:128)});const ve=(Y=T.basePath)!=null&&Y.endsWith("/")?T.basePath.slice(0,-1):T.basePath;return{...T,logo:re,basePath:ve??"/organization",customRoles:T.customRoles||[],viewPaths:{...nC,...T.viewPaths}}},[T]),V=P.useMemo(()=>{var Y,re;if(!(!R||!G))return R===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:R.enabled??!0,customRoles:R.customRoles||[],colors:{count:((Y=R.colors)==null?void 0:Y.count)??5,prefix:((re=R.colors)==null?void 0:re.prefix)??"team"}}},[R,G]),D=P.useMemo(()=>({deleteApiKey:Y=>F.apiKey.delete({...Y,fetchOptions:{throw:!0}}),deletePasskey:Y=>F.passkey.deletePasskey({...Y,fetchOptions:{throw:!0}}),revokeDeviceSession:Y=>F.multiSession.revoke({...Y,fetchOptions:{throw:!0}}),revokeSession:Y=>F.revokeSession({...Y,fetchOptions:{throw:!0}}),setActiveSession:Y=>F.multiSession.setActive({...Y,fetchOptions:{throw:!0}}),updateOrganization:Y=>F.organization.update({...Y,fetchOptions:{throw:!0}}),updateTeam:Y=>F.$fetch("/organization/update-team",{method:"POST",body:Y,throw:!0}),updateUser:Y=>F.updateUser({...Y,fetchOptions:{throw:!0}}),unlinkAccount:Y=>F.unlinkAccount({...Y,fetchOptions:{throw:!0}})}),[F]),U=P.useMemo(()=>({useSession:F.useSession,useListAccounts:()=>lo({queryFn:F.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Y=>lo({queryFn:()=>F.accountInfo(Y),cacheKey:`accountInfo:${JSON.stringify(Y)}`}),useListDeviceSessions:()=>lo({queryFn:F.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>lo({queryFn:F.listSessions,cacheKey:"listSessions"}),useListPasskeys:F.useListPasskeys,useListApiKeys:()=>lo({queryFn:F.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:F.useActiveOrganization,useListOrganizations:F.useListOrganizations,useHasPermission:Y=>lo({queryFn:()=>F.$fetch("/organization/has-permission",{method:"POST",body:Y}),cacheKey:`hasPermission:${JSON.stringify(Y)}`}),useInvitation:Y=>lo({queryFn:()=>F.organization.getInvitation(Y),cacheKey:`invitation:${JSON.stringify(Y)}`}),useListInvitations:Y=>lo({queryFn:()=>{var re;return F.$fetch(`/organization/list-invitations?organizationId=${((re=Y?.query)==null?void 0:re.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Y)}`}),useListUserInvitations:()=>lo({queryFn:()=>F.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Y=>lo({queryFn:()=>{var re;return F.$fetch(`/organization/list-members?organizationId=${((re=Y?.query)==null?void 0:re.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Y)}`}),useListTeams:Y=>lo({queryFn:()=>F.$fetch(`/organization/list-teams?organizationId=${Y?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Y)}`}),useListTeamMembers:Y=>lo({queryFn:()=>F.$fetch("/organization/list-team-members",{method:"POST",body:Y?.teamId?{query:{teamId:Y.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Y)}`}),useListUserTeams:()=>lo({queryFn:()=>F.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[F]),X=P.useMemo(()=>({...lG,...I}),[I]),fe=P.useMemo(()=>({...aG,...x}),[x]),pe=P.useMemo(()=>({...U,..._}),[U,_]),xe=P.useMemo(()=>({...D,...b}),[D,b]);d=d.endsWith("/")?d.slice(0,-1):d,c=c.endsWith("/")?c.slice(0,-1):c;const{data:je}=pe.useSession();return C.jsxs(vt.Provider,{value:{authClient:F,avatar:Z,basePath:c==="/"?"":c,baseURL:d,captcha:f,redirectTo:p,changeEmail:g,credentials:Q,deleteUser:W,emailVerification:ie,freshAge:v,genericOAuth:le,hooks:pe,mutators:xe,localization:fe,localizeErrors:S,nameRequired:E,organization:G,teams:V,account:q,signUp:k,social:te,toast:A,navigate:M||nK,replace:L||M||rK,viewPaths:X,Link:H,...B},children:[je&&G&&C.jsx(eK,{}),f?.provider==="google-recaptcha-v3"?C.jsx(QG,{children:e}):e]})};function lo({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:o},toast:s,localization:l,localizeErrors:c}=P.useContext(vt),{data:d,isPending:f}=o(),p=P.useRef(e);p.current=e;const h=t||e.toString(),g=P.useSyncExternalStore(P.useCallback(T=>No.subscribe(h,T),[h]),P.useCallback(()=>No.get(h),[h]),P.useCallback(()=>No.get(h),[h])),v=P.useRef(!1),_=P.useRef(void 0),[b,x]=P.useState(null),S=P.useCallback(async()=>{const T=No.getInFlightRequest(h);if(T){try{const O=await T;O.error?x(O.error):x(null)}catch(O){x(O)}return}g?.data!==void 0&&No.setRefetching(h,!0);const R=p.current();No.setInFlightRequest(h,R);try{const{data:O,error:A}=await R;A?(x(A),s({variant:"error",message:kn({error:A,localization:l,localizeErrors:c})})):x(null),No.set(h,O)}catch(O){const A=O;x(A),s({variant:"error",message:kn({error:A,localization:l,localizeErrors:c})})}finally{No.setRefetching(h,!1),No.removeInFlightRequest(h)}},[h,s,l,c,g]);P.useEffect(()=>{var T;const R=(T=d?.user)==null?void 0:T.id;if(!d){No.setRefetching(h,!1),No.clear(h),v.current=!1,_.current=void 0;return}const O=_.current!==void 0&&_.current!==R;O&&No.clear(h);const A=g?.data!==void 0,I=!g||Date.now()-g.timestamp>n;(!v.current||!A||O||A&&I)&&(!A||I)&&(v.current=!0,S()),_.current=R},[d,(r=d?.user)==null?void 0:r.id,h,S,g,n]);const E=f||g?.data===void 0&&!b;return{data:g?.data??null,isPending:E,isRefetching:g?.isRefetching??!1,error:b,refetch:S}}const sK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),UN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var aK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const lK=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:l,...c},d)=>P.createElement("svg",{ref:d,...aK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:UN("lucide",o),...c},[...l.map(([f,p])=>P.createElement(f,p)),...Array.isArray(s)?s:[s]]));const Ir=(e,t)=>{const n=P.forwardRef(({className:r,...o},s)=>P.createElement(lK,{ref:s,iconNode:t,className:UN(`lucide-${sK(e)}`,r),...o}));return n.displayName=`${e}`,n};const cK=Ir("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const uK=Ir("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const FN=Ir("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const dK=Ir("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const fK=Ir("EyeOff",[["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"}]]);const hK=Ir("Eye",[["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"}]]);const pK=Ir("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const Ar=Ir("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const BN=Ir("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const VN=Ir("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const mK=Ir("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const gK=Ir("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const lC=Ir("Send",[["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"}]]);const vK=Ir("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const yK=Ir("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const _K=Ir("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var gf=e=>e.type==="checkbox",ol=e=>e instanceof Date,jr=e=>e==null;const HN=e=>typeof e=="object";var Nn=e=>!jr(e)&&!Array.isArray(e)&&HN(e)&&!ol(e),qN=e=>Nn(e)&&e.target?gf(e.target)?e.target.checked:e.target.value:e,GN=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),bK=e=>{const t=e.constructor&&e.constructor.prototype;return Nn(t)&&t.hasOwnProperty("isPrototypeOf")},iS=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function rn(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(iS&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Nn(e)&&bK(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=rn(e[o]));return r}var qg=e=>/^\w*$/.test(e),tn=e=>e===void 0,Gg=e=>Array.isArray(e)?e.filter(Boolean):[],sS=e=>Gg(e.replace(/["|']|\]/g,"").split(/\.|\[/)),De=(e,t,n)=>{if(!t||!Nn(e))return n;const o=(qg(t)?[t]:sS(t)).reduce((s,l)=>jr(s)?void 0:s[l],e);return tn(o)||o===e?tn(e[t])?n:e[t]:o},ho=e=>typeof e=="boolean",Or=e=>typeof e=="function",zt=(e,t,n)=>{let r=-1;const o=qg(t)?[t]:sS(t),s=o.length,l=s-1;for(;++r<s;){const c=o[r];let d=n;if(r!==l){const f=e[c];d=Nn(f)||Array.isArray(f)?f:isNaN(+o[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=d,e=e[c]}};const ta={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},jo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ei={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},l_="form",KN="root",aS=ee.createContext(null);aS.displayName="HookFormControlContext";const Kg=()=>ee.useContext(aS);var ZN=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(o,s,{get:()=>{const l=s;return t._proxyFormState[l]!==jo.all&&(t._proxyFormState[l]=!r||jo.all),n&&(n[l]=!0),e[l]}});return o};const Zg=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function YN(e){const t=Kg(),{control:n=t,disabled:r,name:o,exact:s}=e||{},[l,c]=ee.useState(n._formState),d=ee.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Zg(()=>n._subscribe({name:o,formState:d.current,exact:s,callback:f=>{!r&&c({...n._formState,...f})}}),[o,r,s]),ee.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),ee.useMemo(()=>ZN(l,n,d.current,!1),[l,n])}var Tr=e=>typeof e=="string",Jb=(e,t,n,r,o)=>Tr(e)?(r&&t.watch.add(e),De(n,e,o)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),De(n,s))):(r&&(t.watchAll=!0),n),e1=e=>jr(e)||!HN(e);function po(e,t,n=new WeakSet){if(e===t)return!0;if(e1(e)||e1(t))return Object.is(e,t);if(ol(e)&&ol(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const s of r){const l=e[s];if(!(s in t))return!1;if(s!=="ref"){const c=t[s];if(ol(l)&&ol(c)||(Nn(l)||Array.isArray(l))&&(Nn(c)||Array.isArray(c))?!po(l,c,n):!Object.is(l,c))return!1}}return!0}function wK(e){const t=Kg(),{control:n=t,name:r,defaultValue:o,disabled:s,exact:l,compute:c}=e||{},d=ee.useRef(o),f=ee.useRef(c),p=ee.useRef(void 0),h=ee.useRef(n),g=ee.useRef(r);f.current=c;const[v,_]=ee.useState(()=>{const R=n._getWatch(r,d.current);return f.current?f.current(R):R}),b=ee.useCallback(R=>{const O=Jb(r,n._names,R||n._formValues,!1,d.current);return f.current?f.current(O):O},[n._formValues,n._names,r]),x=ee.useCallback(R=>{if(!s){const O=Jb(r,n._names,R||n._formValues,!1,d.current);if(f.current){const A=f.current(O);po(A,p.current)||(_(A),p.current=A)}else _(O)}},[n._formValues,n._names,s,r]);Zg(()=>((h.current!==n||!po(g.current,r))&&(h.current=n,g.current=r,x()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:R=>{x(R.values)}})),[n,l,r,x]),ee.useEffect(()=>n._removeUnmounted());const S=h.current!==n,E=g.current,T=ee.useMemo(()=>{if(s)return null;const R=!S&&!po(E,r);return S||R?b():null},[s,S,r,E,b]);return T!==null?T:v}function SK(e){const t=Kg(),{name:n,disabled:r,control:o=t,shouldUnregister:s,defaultValue:l,exact:c=!0}=e,d=GN(o._names.array,n),f=ee.useMemo(()=>De(o._formValues,n,De(o._defaultValues,n,l)),[o,n,l]),p=wK({control:o,name:n,defaultValue:f,exact:c}),h=YN({control:o,name:n,exact:c}),g=ee.useRef(e),v=ee.useRef(o.register(n,{...e.rules,value:p,...ho(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const _=ee.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!De(h.errors,n)},isDirty:{enumerable:!0,get:()=>!!De(h.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!De(h.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!De(h.validatingFields,n)},error:{enumerable:!0,get:()=>De(h.errors,n)}}),[h,n]),b=ee.useCallback(T=>v.current.onChange({target:{value:qN(T),name:n},type:ta.CHANGE}),[n]),x=ee.useCallback(()=>v.current.onBlur({target:{value:De(o._formValues,n),name:n},type:ta.BLUR}),[n,o._formValues]),S=ee.useCallback(T=>{const R=De(o._fields,n);R&&R._f&&T&&(R._f.ref={focus:()=>Or(T.focus)&&T.focus(),select:()=>Or(T.select)&&T.select(),setCustomValidity:O=>Or(T.setCustomValidity)&&T.setCustomValidity(O),reportValidity:()=>Or(T.reportValidity)&&T.reportValidity()})},[o._fields,n]),E=ee.useMemo(()=>({name:n,value:p,...ho(r)||h.disabled?{disabled:h.disabled||r}:{},onChange:b,onBlur:x,ref:S}),[n,r,h.disabled,b,x,S,p]);return ee.useEffect(()=>{const T=o._options.shouldUnregister||s;o.register(n,{...g.current.rules,...ho(g.current.disabled)?{disabled:g.current.disabled}:{}});const R=(O,A)=>{const I=De(o._fields,O);I&&I._f&&(I._f.mount=A)};if(R(n,!0),T){const O=rn(De(o._options.defaultValues,n,g.current.defaultValue));zt(o._defaultValues,n,O),tn(De(o._formValues,n))&&zt(o._formValues,n,O)}return!d&&o.register(n),()=>{(d?T&&!o._state.action:T)?o.unregister(n):R(n,!1)}},[n,o,d,s]),ee.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),ee.useMemo(()=>({field:E,formState:h,fieldState:_}),[E,h,_])}const EK=e=>e.render(SK(e)),lS=ee.createContext(null);lS.displayName="HookFormContext";const xK=()=>ee.useContext(lS),RK=e=>{const{children:t,watch:n,getValues:r,getFieldState:o,setError:s,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:p,reset:h,handleSubmit:g,unregister:v,control:_,register:b,setFocus:x,subscribe:S}=e,E=ee.useMemo(()=>({watch:n,getValues:r,getFieldState:o,setError:s,clearErrors:l,setValue:c,trigger:d,formState:f,resetField:p,reset:h,handleSubmit:g,unregister:v,control:_,register:b,setFocus:x,subscribe:S}),[l,_,f,o,r,g,b,h,p,s,x,c,S,d,v,n]);return ee.createElement(lS.Provider,{value:E},ee.createElement(aS.Provider,{value:E.control},t))};var cS=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},Jr=e=>Array.isArray(e)?e:[e],cC=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function WN(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=t[r];if(o&&Nn(o)&&s){const l=WN(o,s);Nn(l)&&(n[r]=l)}else e[r]&&(n[r]=s)}return n}var hr=e=>Nn(e)&&!Object.keys(e).length,uS=e=>e.type==="file",Zm=e=>{if(!iS)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},QN=e=>e.type==="select-multiple",dS=e=>e.type==="radio",OK=e=>dS(e)||gf(e),c_=e=>Zm(e)&&e.isConnected;function TK(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;){if(jr(e)){e=void 0;break}e=e[t[r]],r++}return e}function CK(e){for(const t in e)if(e.hasOwnProperty(t)&&!tn(e[t]))return!1;return!0}function Cn(e,t){if(Tr(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const n=Array.isArray(t)?t:qg(t)?[t]:sS(t),r=n.length===1?e:TK(e,n),o=n.length-1,s=n[o];return r&&delete r[s],o!==0&&(Nn(r)&&hr(r)||Array.isArray(r)&&CK(r))&&Cn(e,n.slice(0,-1)),e}var AK=e=>{for(const t in e)if(Or(e[t]))return!0;return!1};function XN(e){return Array.isArray(e)||Nn(e)&&!AK(e)}function t1(e,t={}){for(const n in e){const r=e[n];XN(r)?(t[n]=Array.isArray(r)?[]:{},t1(r,t[n])):tn(r)||(t[n]=!0)}return t}function xd(e,t,n){n||(n=t1(t));for(const r in e){const o=e[r];if(XN(o))tn(t)||e1(n[r])?n[r]=t1(o,Array.isArray(o)?[]:{}):xd(o,jr(t)?{}:t[r],n[r]);else{const s=t[r];n[r]=!po(o,s)}}return n}const uC={value:!1,isValid:!1},dC={value:!0,isValid:!0};var JN=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!tn(e[0].attributes.value)?tn(e[0].value)||e[0].value===""?dC:{value:e[0].value,isValid:!0}:dC:uC}return uC},e4=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>tn(e)?e:t?e===""?NaN:e&&+e:n&&Tr(e)?new Date(e):r?r(e):e;const fC={isValid:!1,value:null};var t4=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,fC):fC;function hC(e){const t=e.ref;return uS(t)?t.files:dS(t)?t4(e.refs).value:QN(t)?[...t.selectedOptions].map(({value:n})=>n):gf(t)?JN(e.refs).value:e4(tn(t.value)?e.ref.value:t.value,e)}var IK=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,PK=(e,t,n,r)=>{const o={};for(const s of e){const l=De(t,s);l&&zt(o,s,l._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}},Ym=e=>e instanceof RegExp,id=e=>tn(e)?e:Ym(e)?e.source:Nn(e)?Ym(e.value)?e.value.source:e.value:e,Ac=e=>({isOnSubmit:!e||e===jo.onSubmit,isOnBlur:e===jo.onBlur,isOnChange:e===jo.onChange,isOnAll:e===jo.all,isOnTouch:e===jo.onTouched});const pC="AsyncFunction";var MK=e=>!!e&&!!e.validate&&!!(Or(e.validate)&&e.validate.constructor.name===pC||Nn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===pC)),NK=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),n1=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Lc=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const s=De(e,o);if(s){const{_f:l,...c}=s;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],o)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Lc(c,t))break}else if(Nn(c)&&Lc(c,t))break}}};function mC(e,t,n){const r=De(e,n);if(r||qg(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const s=o.join("."),l=De(t,s),c=De(e,s);if(l&&!Array.isArray(l)&&n!==s)return{name:n};if(c&&c.type)return{name:s,error:c};if(c&&c.root&&c.root.type)return{name:`${s}.root`,error:c.root};o.pop()}return{name:n}}var kK=(e,t,n,r)=>{n(e);const{name:o,...s}=e;return hr(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(l=>t[l]===(!r||jo.all))},DK=(e,t,n)=>!e||!t||e===t||Jr(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),LK=(e,t,n,r,o)=>o.isOnAll?!1:!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:(n?r.isOnChange:o.isOnChange)?e:!0,$K=(e,t)=>!Gg(De(e,t)).length&&Cn(e,t),n4=(e,t,n)=>{const r=Jr(De(e,n));return zt(r,KN,t[n]),zt(e,n,r),e};function gC(e,t,n="validate"){if(Tr(e)||Array.isArray(e)&&e.every(Tr)||ho(e)&&!e)return{type:n,message:Tr(e)?e:"",ref:t}}var ac=e=>Nn(e)&&!Ym(e)?e:{value:e,message:""},r1=async(e,t,n,r,o,s)=>{const{ref:l,refs:c,required:d,maxLength:f,minLength:p,min:h,max:g,pattern:v,validate:_,name:b,valueAsNumber:x,mount:S}=e._f,E=De(n,b);if(!S||t.has(b))return{};const T=c?c[0]:l,R=B=>{o&&T.reportValidity&&(T.setCustomValidity(ho(B)?"":B||""),T.reportValidity())},O={},A=dS(l),I=gf(l),M=A||I,L=(x||uS(l))&&tn(l.value)&&tn(E)||Zm(l)&&l.value===""||E===""||Array.isArray(E)&&!E.length||x&&typeof E=="number"&&isNaN(E),H=cS.bind(null,b,r,O),j=(B,F,Z,ie=ei.maxLength,q=ei.minLength)=>{const W=B?F:Z;O[b]={type:B?ie:q,message:W,ref:l,...H(B?ie:q,W)}};if(s?!Array.isArray(E)||!E.length:d&&(!M&&(L||jr(E))||ho(E)&&!E||I&&!JN(c).isValid||A&&!t4(c).isValid)){const{value:B,message:F}=Tr(d)?{value:!!d,message:d}:ac(d);if(B&&(O[b]={type:ei.required,message:F,ref:T,...H(ei.required,F)},!r))return R(F),O}if(!L&&(!jr(h)||!jr(g))){let B,F;const Z=ac(g),ie=ac(h);if(!jr(E)&&!isNaN(E)){const q=l.valueAsNumber||E&&+E;jr(Z.value)||(B=q>Z.value),jr(ie.value)||(F=q<ie.value)}else{const q=l.valueAsDate||new Date(E),W=Q=>new Date(new Date().toDateString()+" "+Q),te=l.type=="time",le=l.type=="week";Tr(Z.value)&&E&&(B=te?W(E)>W(Z.value):le?E>Z.value:q>new Date(Z.value)),Tr(ie.value)&&E&&(F=te?W(E)<W(ie.value):le?E<ie.value:q<new Date(ie.value))}if((B||F)&&(j(!!B,Z.message,ie.message,ei.max,ei.min),!r))return R(O[b].message),O}if((f||p)&&!L&&(Tr(E)||s&&Array.isArray(E))){const B=ac(f),F=ac(p),Z=!jr(B.value)&&E.length>+B.value,ie=!jr(F.value)&&E.length<+F.value;if((Z||ie)&&(j(Z,B.message,F.message),!r))return R(O[b].message),O}if(v&&!L&&Tr(E)){const{value:B,message:F}=ac(v);if(Ym(B)&&!E.match(B)&&(O[b]={type:ei.pattern,message:F,ref:l,...H(ei.pattern,F)},!r))return R(F),O}if(_){if(Or(_)){const B=await _(E,n),F=gC(B,T);if(F&&(O[b]={...F,...H(ei.validate,F.message)},!r))return R(F.message),O}else if(Nn(_)){let B={};for(const F in _){if(!hr(B)&&!r)break;const Z=gC(await _[F](E,n),T,F);Z&&(B={...Z,...H(F,Z.message)},R(Z.message),r&&(O[b]=B))}if(!hr(B)&&(O[b]={ref:T,...B},!r))return O}}return R(!0),O};const jK={mode:jo.onSubmit,reValidateMode:jo.onChange,shouldFocusError:!0};function zK(e={}){let t={...jK,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Or(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},o=Nn(t.defaultValues)||Nn(t.values)?rn(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:rn(o),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},d,f=0;const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...p};let g={...h};const v={array:cC(),state:cC()},_=t.criteriaMode===jo.all,b=K=>ne=>{clearTimeout(f),f=setTimeout(K,ne)},x=async K=>{if(!l.keepIsValid&&!t.disabled&&(h.isValid||g.isValid||K)){let ne;t.resolver?(ne=hr((await L()).errors),S()):ne=await B({fields:r,onlyCheckValid:!0,eventType:ta.VALID}),ne!==n.isValid&&v.state.next({isValid:ne})}},S=(K,ne)=>{!t.disabled&&(h.isValidating||h.validatingFields||g.isValidating||g.validatingFields)&&((K||Array.from(c.mount)).forEach(ae=>{ae&&(ne?zt(n.validatingFields,ae,ne):Cn(n.validatingFields,ae))}),v.state.next({validatingFields:n.validatingFields,isValidating:!hr(n.validatingFields)}))},E=K=>{const ne=xd(o,s),ae=IK(K);zt(n.dirtyFields,ae,De(ne,ae))},T=(K,ne=[],ae,Oe,Ae=!0,Ie=!0)=>{if(Oe&&ae&&!t.disabled){if(l.action=!0,Ie&&Array.isArray(De(r,K))){const ke=ae(De(r,K),Oe.argA,Oe.argB);Ae&&zt(r,K,ke)}if(Ie&&Array.isArray(De(n.errors,K))){const ke=ae(De(n.errors,K),Oe.argA,Oe.argB);Ae&&zt(n.errors,K,ke),$K(n.errors,K)}if((h.touchedFields||g.touchedFields)&&Ie&&Array.isArray(De(n.touchedFields,K))){const ke=ae(De(n.touchedFields,K),Oe.argA,Oe.argB);Ae&&zt(n.touchedFields,K,ke)}(h.dirtyFields||g.dirtyFields)&&E(K),v.state.next({name:K,isDirty:Z(K,ne),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else zt(s,K,ne)},R=(K,ne)=>{zt(n.errors,K,ne),v.state.next({errors:n.errors})},O=K=>{n.errors=K,v.state.next({errors:n.errors,isValid:!1})},A=(K,ne,ae,Oe)=>{const Ae=De(r,K);if(Ae){const Ie=De(s,K,tn(ae)?De(o,K):ae);tn(Ie)||Oe&&Oe.defaultChecked||ne?zt(s,K,ne?Ie:hC(Ae._f)):W(K,Ie),l.mount&&!l.action&&x()}},I=(K,ne,ae,Oe,Ae)=>{let Ie=!1,ke=!1;const Je={name:K};if(!t.disabled){if(!ae||Oe){(h.isDirty||g.isDirty)&&(ke=n.isDirty,n.isDirty=Je.isDirty=Z(),Ie=ke!==Je.isDirty);const et=po(De(o,K),ne);ke=!!De(n.dirtyFields,K),et?Cn(n.dirtyFields,K):zt(n.dirtyFields,K,!0),Je.dirtyFields=n.dirtyFields,Ie=Ie||(h.dirtyFields||g.dirtyFields)&&ke!==!et}if(ae){const et=De(n.touchedFields,K);et||(zt(n.touchedFields,K,ae),Je.touchedFields=n.touchedFields,Ie=Ie||(h.touchedFields||g.touchedFields)&&et!==ae)}Ie&&Ae&&v.state.next(Je)}return Ie?Je:{}},M=(K,ne,ae,Oe)=>{const Ae=De(n.errors,K),Ie=(h.isValid||g.isValid)&&ho(ne)&&n.isValid!==ne;if(t.delayError&&ae?(d=b(()=>R(K,ae)),d(t.delayError)):(clearTimeout(f),d=null,ae?zt(n.errors,K,ae):Cn(n.errors,K)),(ae?!po(Ae,ae):Ae)||!hr(Oe)||Ie){const ke={...Oe,...Ie&&ho(ne)?{isValid:ne}:{},errors:n.errors,name:K};n={...n,...ke},v.state.next(ke)}},L=async K=>(S(K,!0),await t.resolver(s,t.context,PK(K||c.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),H=async K=>{const{errors:ne}=await L(K);if(S(K),K)for(const ae of K){const Oe=De(ne,ae);Oe?zt(n.errors,ae,Oe):Cn(n.errors,ae)}else n.errors=ne;return ne},j=async({name:K,eventType:ne})=>{if(e.validate){const ae=await e.validate({formValues:s,formState:n,name:K,eventType:ne});if(Nn(ae))for(const Oe in ae)ae[Oe]&&fe(`${l_}.${Oe}`,{message:Tr(ae.message)?ae.message:"",type:ei.validate});else Tr(ae)||!ae?fe(l_,{message:ae||"",type:ei.validate}):X(l_);return ae}return!0},B=async({fields:K,onlyCheckValid:ne,name:ae,eventType:Oe,context:Ae={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ae.runRootValidation=!0,!await j({name:ae,eventType:Oe})&&(Ae.valid=!1,ne)))return Ae.valid;for(const Ie in K){const ke=K[Ie];if(ke){const{_f:Je,...et}=ke;if(Je){const _t=c.array.has(Je.name),Tt=ke._f&&MK(ke._f);Tt&&h.validatingFields&&S([Je.name],!0);const bt=await r1(ke,c.disabled,s,_,t.shouldUseNativeValidation&&!ne,_t);if(Tt&&h.validatingFields&&S([Je.name]),bt[Je.name]&&(Ae.valid=!1,ne)||(!ne&&(De(bt,Je.name)?_t?n4(n.errors,bt,Je.name):zt(n.errors,Je.name,bt[Je.name]):Cn(n.errors,Je.name)),e.shouldUseNativeValidation&&bt[Je.name]))break}!hr(et)&&await B({context:Ae,onlyCheckValid:ne,fields:et,name:Ie,eventType:Oe})}}return Ae.valid},F=()=>{for(const K of c.unMount){const ne=De(r,K);ne&&(ne._f.refs?ne._f.refs.every(ae=>!c_(ae)):!c_(ne._f.ref))&&Y(K)}c.unMount=new Set},Z=(K,ne)=>!t.disabled&&(K&&ne&&zt(s,K,ne),!po(D(),o)),ie=(K,ne,ae)=>Jb(K,c,{...l.mount?s:tn(ne)?o:Tr(K)?{[K]:ne}:ne},ae,ne),q=K=>Gg(De(l.mount?s:o,K,t.shouldUnregister?De(o,K,[]):[])),W=(K,ne,ae={})=>{const Oe=De(r,K);let Ae=ne;if(Oe){const Ie=Oe._f;Ie&&(!Ie.disabled&&zt(s,K,e4(ne,Ie)),Ae=Zm(Ie.ref)&&jr(ne)?"":ne,QN(Ie.ref)?[...Ie.ref.options].forEach(ke=>ke.selected=Ae.includes(ke.value)):Ie.refs?gf(Ie.ref)?Ie.refs.forEach(ke=>{(!ke.defaultChecked||!ke.disabled)&&(Array.isArray(Ae)?ke.checked=!!Ae.find(Je=>Je===ke.value):ke.checked=Ae===ke.value||!!Ae)}):Ie.refs.forEach(ke=>ke.checked=ke.value===Ae):uS(Ie.ref)?Ie.ref.value="":(Ie.ref.value=Ae,Ie.ref.type||v.state.next({name:K,values:rn(s)})))}(ae.shouldDirty||ae.shouldTouch)&&I(K,Ae,ae.shouldTouch,ae.shouldDirty,!0),ae.shouldValidate&&V(K)},te=(K,ne,ae)=>{for(const Oe in ne){if(!ne.hasOwnProperty(Oe))return;const Ae=ne[Oe],Ie=K+"."+Oe,ke=De(r,Ie);(c.array.has(K)||Nn(Ae)||ke&&!ke._f)&&!ol(Ae)?te(Ie,Ae,ae):W(Ie,Ae,ae)}},le=(K,ne,ae={})=>{const Oe=De(r,K),Ae=c.array.has(K),Ie=rn(ne),ke=De(s,K),Je=po(ke,Ie);if(zt(s,K,Ie),Ae)v.array.next({name:K,values:rn(s)}),ae.shouldDirty&&(E(K),v.state.next({name:K,dirtyFields:n.dirtyFields,isDirty:Z(K,Ie)}));else{const et=Array.isArray(Ie)&&!Ie.length||hr(Ie);!Oe||Oe._f||jr(Ie)||et?W(K,Ie,ae):te(K,Ie,ae)}Je||(n1(K,c)?v.state.next({...n,name:K,values:rn(s)}):v.state.next({name:l.mount?K:void 0,values:rn(s)}))},Q=K=>{const ne=Or(K)?K(s):K;po(s,ne)||(s={...s,...ne},v.state.next({...n,values:s}))},k=async K=>{l.mount=!0;const ne=K.target;let ae=ne.name,Oe=!0;const Ae=De(r,ae),Ie=et=>{Oe=Number.isNaN(et)||ol(et)&&isNaN(et.getTime())||po(et,De(s,ae,et))},ke=Ac(t.mode),Je=Ac(t.reValidateMode);if(Ae){let et,_t;const Tt=ne.type?hC(Ae._f):qN(K),bt=K.type===ta.BLUR||K.type===ta.FOCUS_OUT,Ln=!NK(Ae._f)&&!e.validate&&!t.resolver&&!De(n.errors,ae)&&!Ae._f.deps||LK(bt,De(n.touchedFields,ae),n.isSubmitted,Je,ke),Ni=n1(ae,c,bt);zt(s,ae,Tt),bt?(!ne||!ne.readOnly)&&(Ae._f.onBlur&&Ae._f.onBlur(K),d&&d(0)):Ae._f.onChange&&Ae._f.onChange(K);const Go=I(ae,Tt,bt),Ye=!hr(Go)||Ni;if(!bt&&v.state.next({name:ae,type:K.type,values:rn(s)}),Ln)return(h.isValid||g.isValid)&&(t.mode==="onBlur"?bt&&x():bt||x()),Ye&&v.state.next({name:ae,...Ni?{}:Go});if(!t.resolver&&e.validate&&await j({name:ae,eventType:K.type}),!bt&&Ni&&v.state.next({...n}),t.resolver){const{errors:pt}=await L([ae]);if(S([ae]),Ie(Tt),Oe){const Ct=mC(n.errors,r,ae),st=mC(pt,r,Ct.name||ae);et=st.error,ae=st.name,_t=hr(pt)}}else S([ae],!0),et=(await r1(Ae,c.disabled,s,_,t.shouldUseNativeValidation))[ae],S([ae]),Ie(Tt),Oe&&(et?_t=!1:(h.isValid||g.isValid)&&(_t=await B({fields:r,onlyCheckValid:!0,name:ae,eventType:K.type})));Oe&&(Ae._f.deps&&(!Array.isArray(Ae._f.deps)||Ae._f.deps.length>0)&&V(Ae._f.deps),M(ae,_t,et,Go))}},G=(K,ne)=>{if(De(n.errors,ne)&&K.focus)return K.focus(),1},V=async(K,ne={})=>{let ae,Oe;const Ae=Jr(K);if(t.resolver){const Ie=await H(tn(K)?K:Ae);ae=hr(Ie),Oe=K?!Ae.some(ke=>De(Ie,ke)):ae}else K?(Oe=(await Promise.all(Ae.map(async Ie=>{const ke=De(r,Ie);return await B({fields:ke&&ke._f?{[Ie]:ke}:ke,eventType:ta.TRIGGER})}))).every(Boolean),!(!Oe&&!n.isValid)&&x()):Oe=ae=await B({fields:r,name:K,eventType:ta.TRIGGER});return v.state.next({...!Tr(K)||(h.isValid||g.isValid)&&ae!==n.isValid?{}:{name:K},...t.resolver||!K?{isValid:ae}:{},errors:n.errors}),ne.shouldFocus&&!Oe&&Lc(r,G,K?Ae:c.mount),Oe},D=(K,ne)=>{let ae={...l.mount?s:o};return ne&&(ae=WN(ne.dirtyFields?n.dirtyFields:n.touchedFields,ae)),tn(K)?ae:Tr(K)?De(ae,K):K.map(Oe=>De(ae,Oe))},U=(K,ne)=>({invalid:!!De((ne||n).errors,K),isDirty:!!De((ne||n).dirtyFields,K),error:De((ne||n).errors,K),isValidating:!!De(n.validatingFields,K),isTouched:!!De((ne||n).touchedFields,K)}),X=K=>{const ne=K?Jr(K):void 0;ne?.forEach(ae=>Cn(n.errors,ae)),ne?ne.forEach(ae=>{v.state.next({name:ae,errors:n.errors})}):v.state.next({errors:{}})},fe=(K,ne,ae)=>{const Oe=(De(r,K,{_f:{}})._f||{}).ref,Ae=De(n.errors,K)||{},{ref:Ie,message:ke,type:Je,...et}=Ae;zt(n.errors,K,{...et,...ne,ref:Oe}),v.state.next({name:K,errors:n.errors,isValid:!1}),ae&&ae.shouldFocus&&Oe&&Oe.focus&&Oe.focus()},pe=(K,ne)=>Or(K)?v.state.subscribe({next:ae=>"values"in ae&&K(ae.values||ie(void 0,ne),ae)}):ie(K,ne,!0),xe=K=>v.state.subscribe({next:ne=>{if(DK(K.name,ne.name,K.exact)&&kK(ne,K.formState||h,Me,K.reRenderRoot)){const ae={...s};K.callback({values:ae,...n,...ne,defaultValues:o})}}}).unsubscribe,je=K=>(l.mount=!0,g={...g,...K.formState},xe({...K,formState:{...p,...K.formState}})),Y=(K,ne={})=>{for(const ae of K?Jr(K):c.mount)c.mount.delete(ae),c.array.delete(ae),ne.keepValue||(Cn(r,ae),Cn(s,ae)),!ne.keepError&&Cn(n.errors,ae),!ne.keepDirty&&Cn(n.dirtyFields,ae),!ne.keepTouched&&Cn(n.touchedFields,ae),!ne.keepIsValidating&&Cn(n.validatingFields,ae),!t.shouldUnregister&&!ne.keepDefaultValue&&Cn(o,ae);v.state.next({values:rn(s)}),v.state.next({...n,...ne.keepDirty?{isDirty:Z()}:{}}),!ne.keepIsValid&&x()},re=({disabled:K,name:ne})=>{if(ho(K)&&l.mount||K||c.disabled.has(ne)){const Ae=c.disabled.has(ne)!==!!K;K?c.disabled.add(ne):c.disabled.delete(ne),Ae&&l.mount&&!l.action&&x()}},ve=(K,ne={})=>{let ae=De(r,K);const Oe=ho(ne.disabled)||ho(t.disabled),Ae=!c.registerName.has(K)&&ae&&ae._f&&!ae._f.mount;return zt(r,K,{...ae||{},_f:{...ae&&ae._f?ae._f:{ref:{name:K}},name:K,mount:!0,...ne}}),c.mount.add(K),ae&&!Ae?re({disabled:ho(ne.disabled)?ne.disabled:t.disabled,name:K}):A(K,!0,ne.value),{...Oe?{disabled:ne.disabled||t.disabled}:{},...t.progressive?{required:!!ne.required,min:id(ne.min),max:id(ne.max),minLength:id(ne.minLength),maxLength:id(ne.maxLength),pattern:id(ne.pattern)}:{},name:K,onChange:k,onBlur:k,ref:Ie=>{if(Ie){c.registerName.add(K),ve(K,ne),c.registerName.delete(K),ae=De(r,K);const ke=tn(Ie.value)&&Ie.querySelectorAll&&Ie.querySelectorAll("input,select,textarea")[0]||Ie,Je=OK(ke),et=ae._f.refs||[];if(Je?et.find(_t=>_t===ke):ke===ae._f.ref)return;zt(r,K,{_f:{...ae._f,...Je?{refs:[...et.filter(c_),ke,...Array.isArray(De(o,K))?[{}]:[]],ref:{type:ke.type,name:K}}:{ref:ke}}}),A(K,!1,void 0,ke)}else ae=De(r,K,{}),ae._f&&(ae._f.mount=!1),(t.shouldUnregister||ne.shouldUnregister)&&!(GN(c.array,K)&&l.action)&&c.unMount.add(K)}}},se=()=>t.shouldFocusError&&Lc(r,G,c.mount),Se=K=>{ho(K)&&(v.state.next({disabled:K}),Lc(r,(ne,ae)=>{const Oe=De(r,ae);Oe&&(ne.disabled=Oe._f.disabled||K,Array.isArray(Oe._f.refs)&&Oe._f.refs.forEach(Ae=>{Ae.disabled=Oe._f.disabled||K}))},0,!1))},Te=(K,ne)=>async ae=>{let Oe;ae&&(ae.preventDefault&&ae.preventDefault(),ae.persist&&ae.persist());let Ae=rn(s);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Ie,values:ke}=await L();S(),n.errors=Ie,Ae=rn(ke)}else await B({fields:r,eventType:ta.SUBMIT});if(c.disabled.size)for(const Ie of c.disabled)Cn(Ae,Ie);if(Cn(n.errors,KN),hr(n.errors)){v.state.next({errors:{}});try{await K(Ae,ae)}catch(Ie){Oe=Ie}}else ne&&await ne({...n.errors},ae),se(),setTimeout(se);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:hr(n.errors)&&!Oe,submitCount:n.submitCount+1,errors:n.errors}),Oe)throw Oe},tt=(K,ne={})=>{De(r,K)&&(tn(ne.defaultValue)?le(K,rn(De(o,K))):(le(K,ne.defaultValue),zt(o,K,rn(ne.defaultValue))),ne.keepTouched||Cn(n.touchedFields,K),ne.keepDirty||(Cn(n.dirtyFields,K),n.isDirty=ne.defaultValue?Z(K,rn(De(o,K))):Z()),ne.keepError||(Cn(n.errors,K),h.isValid&&x()),v.state.next({...n}))},rt=(K,ne={})=>{const ae=K?rn(K):o,Oe=rn(ae),Ae=hr(K),Ie=Ae?o:Oe;if(ne.keepDefaultValues||(o=ae),!ne.keepValues){if(ne.keepDirtyValues){const ke=new Set([...c.mount,...Object.keys(xd(o,s))]);for(const Je of Array.from(ke)){const et=De(n.dirtyFields,Je),_t=De(s,Je),Tt=De(Ie,Je);et&&!tn(_t)?zt(Ie,Je,_t):!et&&!tn(Tt)&&le(Je,Tt)}}else{if(iS&&tn(K))for(const ke of c.mount){const Je=De(r,ke);if(Je&&Je._f){const et=Array.isArray(Je._f.refs)?Je._f.refs[0]:Je._f.ref;if(Zm(et)){const _t=et.closest("form");if(_t){_t.reset();break}}}}if(ne.keepFieldsRef)for(const ke of c.mount)le(ke,De(Ie,ke));else r={}}s=t.shouldUnregister?ne.keepDefaultValues?rn(o):{}:rn(Ie),v.array.next({values:{...Ie}}),v.state.next({values:{...Ie}})}c={mount:ne.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!h.isValid||!!ne.keepIsValid||!!ne.keepDirtyValues||!t.shouldUnregister&&!hr(Ie),l.watch=!!t.shouldUnregister,l.keepIsValid=!!ne.keepIsValid,l.action=!1,ne.keepErrors||(n.errors={}),v.state.next({submitCount:ne.keepSubmitCount?n.submitCount:0,isDirty:Ae?!1:ne.keepDirty?n.isDirty:!!(ne.keepDefaultValues&&!po(K,o)),isSubmitted:ne.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ae?{}:ne.keepDirtyValues?ne.keepDefaultValues&&s?xd(o,s):n.dirtyFields:ne.keepDefaultValues&&K?xd(o,K):ne.keepDirty?n.dirtyFields:{},touchedFields:ne.keepTouched?n.touchedFields:{},errors:ne.keepErrors?n.errors:{},isSubmitSuccessful:ne.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Be=(K,ne)=>rt(Or(K)?K(s):K,{...t.resetOptions,...ne}),Qe=(K,ne={})=>{const ae=De(r,K),Oe=ae&&ae._f;if(Oe){const Ae=Oe.refs?Oe.refs[0]:Oe.ref;Ae.focus&&setTimeout(()=>{Ae.focus(),ne.shouldSelect&&Or(Ae.select)&&Ae.select()})}},Me=K=>{n={...n,...K}},Fe={control:{register:ve,unregister:Y,getFieldState:U,handleSubmit:Te,setError:fe,_subscribe:xe,_runSchema:L,_updateIsValidating:S,_focusError:se,_getWatch:ie,_getDirty:Z,_setValid:x,_setFieldArray:T,_setDisabledField:re,_setErrors:O,_getFieldArray:q,_reset:rt,_resetDefaultValues:()=>Or(t.defaultValues)&&t.defaultValues().then(K=>{Be(K,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:F,_disableForm:Se,_subjects:v,_proxyFormState:h,get _fields(){return r},get _formValues(){return s},get _state(){return l},set _state(K){l=K},get _defaultValues(){return o},get _names(){return c},set _names(K){c=K},get _formState(){return n},get _options(){return t},set _options(K){t={...t,...K}}},subscribe:je,trigger:V,register:ve,handleSubmit:Te,watch:pe,setValue:le,setValues:Q,getValues:D,reset:Be,resetField:tt,clearErrors:X,unregister:Y,setError:fe,setFocus:Qe,getFieldState:U};return{...Fe,formControl:Fe}}var Gs=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},u_=(e,t,n={})=>n.shouldFocus||tn(n.shouldFocus)?n.focusName||`${e}.${tn(n.focusIndex)?t:n.focusIndex}.`:"",d_=(e,t)=>[...e,...Jr(t)],f_=e=>Array.isArray(e)?e.map(()=>{}):void 0;function h_(e,t,n){return[...e.slice(0,t),...Jr(n),...e.slice(t)]}var p_=(e,t,n)=>Array.isArray(e)?(tn(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],m_=(e,t)=>[...Jr(t),...Jr(e)];function UK(e,t){let n=0;const r=[...e];for(const o of t)r.splice(o-n,1),n++;return Gg(r).length?r:[]}var g_=(e,t)=>tn(t)?[]:UK(e,Jr(t).sort((n,r)=>n-r)),v_=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},vC=(e,t,n)=>(e[t]=n,e);function nue(e){const t=Kg(),{control:n=t,name:r,keyName:o="id",shouldUnregister:s,rules:l}=e,[c,d]=ee.useState(n._getFieldArray(r)),f=ee.useRef(n._getFieldArray(r).map(Gs)),p=ee.useRef(!1);n._names.array.add(r),ee.useMemo(()=>l&&c.length>=0&&n.register(r,l),[n,r,c.length,l]),Zg(()=>n._subjects.array.subscribe({next:({values:R,name:O})=>{if(O===r||!O){const A=De(R,r);Array.isArray(A)&&(d(A),f.current=A.map(Gs))}}}).unsubscribe,[n,r]);const h=ee.useCallback(R=>{p.current=!0,n._setFieldArray(r,R)},[n,r]),g=(R,O)=>{const A=Jr(rn(R)),I=d_(n._getFieldArray(r),A);n._names.focus=u_(r,I.length-1,O),f.current=d_(f.current,A.map(Gs)),h(I),d(I),n._setFieldArray(r,I,d_,{argA:f_(R)})},v=(R,O)=>{const A=Jr(rn(R)),I=m_(n._getFieldArray(r),A);n._names.focus=u_(r,0,O),f.current=m_(f.current,A.map(Gs)),h(I),d(I),n._setFieldArray(r,I,m_,{argA:f_(R)})},_=R=>{const O=g_(n._getFieldArray(r),R);f.current=g_(f.current,R),h(O),d(O),!Array.isArray(De(n._fields,r))&&zt(n._fields,r,void 0),n._setFieldArray(r,O,g_,{argA:R})},b=(R,O,A)=>{const I=Jr(rn(O)),M=h_(n._getFieldArray(r),R,I);n._names.focus=u_(r,R,A),f.current=h_(f.current,R,I.map(Gs)),h(M),d(M),n._setFieldArray(r,M,h_,{argA:R,argB:f_(O)})},x=(R,O)=>{const A=n._getFieldArray(r);v_(A,R,O),v_(f.current,R,O),h(A),d(A),n._setFieldArray(r,A,v_,{argA:R,argB:O},!1)},S=(R,O)=>{const A=n._getFieldArray(r);p_(A,R,O),p_(f.current,R,O),h(A),d(A),n._setFieldArray(r,A,p_,{argA:R,argB:O},!1)},E=(R,O)=>{const A=rn(O),I=vC(n._getFieldArray(r),R,A);f.current=[...I].map((M,L)=>!M||L===R?Gs():f.current[L]),h(I),d([...I]),n._setFieldArray(r,I,vC,{argA:R,argB:A},!0,!1)},T=R=>{const O=Jr(rn(R));f.current=O.map(Gs),h([...O]),d([...O]),n._setFieldArray(r,[...O],A=>A,{},!0,!1)};return ee.useEffect(()=>{n._state.action=!1,n1(r,n._names)&&n._subjects.state.next({...n._formState});const R=Ac(n._options.mode);if(p.current&&(!R.isOnSubmit||n._formState.isSubmitted)&&!Ac(n._options.reValidateMode).isOnSubmit&&!R.isOnBlur)if(n._options.resolver)n._runSchema([r]).then(O=>{n._updateIsValidating([r]);const A=De(O.errors,r),I=De(n._formState.errors,r);(I?!A&&I.type||A&&(I.type!==A.type||I.message!==A.message):A&&A.type)&&(A?zt(n._formState.errors,r,A):Cn(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const O=De(n._fields,r);O&&O._f&&!(Ac(n._options.reValidateMode).isOnSubmit&&Ac(n._options.mode).isOnSubmit)&&r1(O,n._names.disabled,n._formValues,n._options.criteriaMode===jo.all,n._options.shouldUseNativeValidation,!0).then(A=>!hr(A)&&n._subjects.state.next({errors:n4(n._formState.errors,A,r)}))}n._subjects.state.next({name:r,values:rn(n._formValues)}),n._names.focus&&Lc(n._fields,(O,A)=>{if(n._names.focus&&A.startsWith(n._names.focus)&&O.focus)return O.focus(),1}),n._names.focus="",n._setValid(),p.current=!1},[c,r,n]),ee.useEffect(()=>(!De(n._formValues,r)&&n._setFieldArray(r),()=>{const R=(O,A)=>{const I=De(n._fields,O);I&&I._f&&(I._f.mount=A)};n._options.shouldUnregister||s?n.unregister(r):R(r,!1)}),[r,n,o,s]),{swap:ee.useCallback(x,[h,r,n]),move:ee.useCallback(S,[h,r,n]),prepend:ee.useCallback(v,[h,r,n]),append:ee.useCallback(g,[h,r,n]),remove:ee.useCallback(_,[h,r,n]),insert:ee.useCallback(b,[h,r,n]),update:ee.useCallback(E,[h,r,n]),replace:ee.useCallback(T,[h,r,n]),fields:ee.useMemo(()=>c.map((R,O)=>({...R,[o]:f.current[O]||Gs()})),[c,o])}}function Ci(e={}){const t=ee.useRef(void 0),n=ee.useRef(void 0),[r,o]=ee.useState({isDirty:!1,isValidating:!1,isLoading:Or(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Or(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Or(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=zK(e);t.current={...c,formState:r}}const s=t.current.control;return s._options=e,Zg(()=>{const l=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState}),reRenderRoot:!0});return o(c=>({...c,isReady:!0})),s._formState.isReady=!0,l},[s]),ee.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),ee.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),ee.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),ee.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),ee.useEffect(()=>{if(s._proxyFormState.isDirty){const l=s._getDirty();l!==r.isDirty&&s._subjects.state.next({isDirty:l})}},[s,r.isDirty]),ee.useEffect(()=>{var l;e.values&&!po(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),!((l=s._options.resetOptions)===null||l===void 0)&&l.keepIsValid||s._setValid(),n.current=e.values,o(c=>({...c}))):s._resetDefaultValues()},[s,e.values]),ee.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=ee.useMemo(()=>ZN(r,s),[s,r]),t.current}function yC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vf(...e){return t=>{let n=!1;const r=e.map(o=>{const s=yC(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():yC(e[o],null)}}}}function er(...e){return P.useCallback(vf(...e),e)}var FK=Symbol.for("react.lazy"),Wm=Tw[" use ".trim().toString()];function BK(e){return typeof e=="object"&&e!==null&&"then"in e}function r4(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===FK&&"_payload"in e&&BK(e._payload)}function o4(e){const t=VK(e),n=P.forwardRef((r,o)=>{let{children:s,...l}=r;r4(s)&&typeof Wm=="function"&&(s=Wm(s._payload));const c=P.Children.toArray(s),d=c.find(qK);if(d){const f=d.props.children,p=c.map(h=>h===d?P.Children.count(f)>1?P.Children.only(null):P.isValidElement(f)?f.props.children:null:h);return C.jsx(t,{...l,ref:o,children:P.isValidElement(f)?P.cloneElement(f,void 0,p):null})}return C.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var fS=o4("Slot");function VK(e){const t=P.forwardRef((n,r)=>{let{children:o,...s}=n;if(r4(o)&&typeof Wm=="function"&&(o=Wm(o._payload)),P.isValidElement(o)){const l=KK(o),c=GK(s,o.props);return o.type!==P.Fragment&&(c.ref=r?vf(r,l):l),P.cloneElement(o,c)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var HK=Symbol("radix.slottable");function qK(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HK}function GK(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const d=s(...c);return o(...c),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function KK(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const _C=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bC=tS,i4=(e,t)=>n=>{var r;if(t?.variants==null)return bC(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(f=>{const p=n?.[f],h=s?.[f];if(p===null)return null;const g=_C(p)||_C(h);return o[f][g]}),c=n&&Object.entries(n).reduce((f,p)=>{let[h,g]=p;return g===void 0||(f[h]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:h,className:g,...v}=p;return Object.entries(v).every(_=>{let[b,x]=_;return Array.isArray(x)?x.includes({...s,...c}[b]):{...s,...c}[b]===x})?[...f,h,g]:f},[]);return bC(e,l,d,n?.class,n?.className)},wC=(e,t,n)=>{if(e&&"reportValidity"in e){const r=De(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},o1=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?wC(r.ref,n,e):r&&r.refs&&r.refs.forEach(o=>wC(o,n,e))}},SC=(e,t)=>{t.shouldUseNativeValidation&&o1(e,t);const n={};for(const r in e){const o=De(t.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.ref});if(ZK(t.names||Object.keys(e),r)){const l=Object.assign({},De(n,r));zt(l,"root",s),zt(n,r,l)}else zt(n,r,s)}return n},ZK=(e,t)=>{const n=EC(t);return e.some(r=>EC(r).match(`^${n}\\.\\d+`))};function EC(e){return e.replace(/\]|\[/g,"")}function xC(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function YK(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var c=r.unionErrors[0].errors[0];n[l]={message:c.message,type:c.code}}else n[l]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(p){return p.errors.forEach(function(h){return e.push(h)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=cS(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function WK(e,t){for(var n={};e.length;){var r=e[0],o=r.code,s=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var c=r.errors[0][0];n[l]={message:c.message,type:c.code}}else n[l]={message:s,type:o};if(r.code==="invalid_union"&&r.errors.forEach(function(p){return p.forEach(function(h){return e.push(h)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=cS(l,t,n,o,f?[].concat(f,r.message):r.message)}e.shift()}return n}function Ai(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,o,s){try{return Promise.resolve(xC(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return s.shouldUseNativeValidation&&o1({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return Array.isArray(c?.issues)})(l))return{values:{},errors:SC(YK(l.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(xC(function(){return Promise.resolve((n.mode==="sync"?ez:tz)(e,r,t)).then(function(l){return s.shouldUseNativeValidation&&o1({},s),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(c){return c instanceof qw})(l))return{values:{},errors:SC(WK(l.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}function ct(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function QK(e,t){const n=P.createContext(t),r=s=>{const{children:l,...c}=s,d=P.useMemo(()=>c,Object.values(c));return C.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function o(s){const l=P.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function vl(e,t=[]){let n=[];function r(s,l){const c=P.createContext(l),d=n.length;n=[...n,l];const f=h=>{const{scope:g,children:v,..._}=h,b=g?.[e]?.[d]||c,x=P.useMemo(()=>_,Object.values(_));return C.jsx(b.Provider,{value:x,children:v})};f.displayName=s+"Provider";function p(h,g){const v=g?.[e]?.[d]||c,_=P.useContext(v);if(_)return _;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[f,p]}const o=()=>{const s=n.map(l=>P.createContext(l));return function(c){const d=c?.[e]||s;return P.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])}};return o.scopeName=e,[r,XK(o,...t)]}function XK(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const l=r.reduce((c,{useScope:d,scopeName:f})=>{const h=d(s)[`__scope${f}`];return{...c,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var oi=globalThis?.document?P.useLayoutEffect:()=>{},JK=Tw[" useId ".trim().toString()]||(()=>{}),eZ=0;function ua(e){const[t,n]=P.useState(JK());return oi(()=>{n(r=>r??String(eZ++))},[e]),e||(t?`radix-${t}`:"")}var tZ=Tw[" useInsertionEffect ".trim().toString()]||oi;function yf({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,l]=nZ({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:o;{const p=P.useRef(e!==void 0);P.useEffect(()=>{const h=p.current;h!==c&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const f=P.useCallback(p=>{if(c){const h=rZ(p)?p(e):p;h!==e&&l.current?.(h)}else s(p)},[c,e,s,l]);return[d,f]}function nZ({defaultProp:e,onChange:t}){const[n,r]=P.useState(e),o=P.useRef(n),s=P.useRef(t);return tZ(()=>{s.current=t},[t]),P.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function rZ(e){return typeof e=="function"}function Xd(e){const t=oZ(e),n=P.forwardRef((r,o)=>{const{children:s,...l}=r,c=P.Children.toArray(s),d=c.find(iZ);if(d){const f=d.props.children,p=c.map(h=>h===d?P.Children.count(f)>1?P.Children.only(null):P.isValidElement(f)?f.props.children:null:h);return C.jsx(t,{...l,ref:o,children:P.isValidElement(f)?P.cloneElement(f,void 0,p):null})}return C.jsx(t,{...l,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function oZ(e){const t=P.forwardRef((n,r)=>{const{children:o,...s}=n;if(P.isValidElement(o)){const l=aZ(o),c=sZ(s,o.props);return o.type!==P.Fragment&&(c.ref=r?vf(r,l):l),P.cloneElement(o,c)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var s4=Symbol("radix.slottable");function rue(e){const t=({children:n})=>C.jsx(C.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=s4,t}function iZ(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===s4}function sZ(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{const d=s(...c);return o(...c),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function aZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sn=lZ.reduce((e,t)=>{const n=Xd(`Primitive.${t}`),r=P.forwardRef((o,s)=>{const{asChild:l,...c}=o,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function a4(e,t){e&&Lg.flushSync(()=>e.dispatchEvent(t))}function ii(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>t.current?.(...n),[])}function cZ(e,t=globalThis?.document){const n=ii(e);P.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var uZ="DismissableLayer",i1="dismissableLayer.update",dZ="dismissableLayer.pointerDownOutside",fZ="dismissableLayer.focusOutside",RC,l4=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hS=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=e,f=P.useContext(l4),[p,h]=P.useState(null),g=p?.ownerDocument??globalThis?.document,[,v]=P.useState({}),_=er(t,I=>h(I)),b=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(x),E=p?b.indexOf(p):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,R=E>=S,O=mZ(I=>{const M=I.target,L=[...f.branches].some(H=>H.contains(M));!R||L||(o?.(I),l?.(I),I.defaultPrevented||c?.())},g),A=gZ(I=>{const M=I.target;[...f.branches].some(H=>H.contains(M))||(s?.(I),l?.(I),I.defaultPrevented||c?.())},g);return cZ(I=>{E===f.layers.size-1&&(r?.(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},g),P.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(RC=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),OC(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=RC)}},[p,g,n,f]),P.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),OC())},[p,f]),P.useEffect(()=>{const I=()=>v({});return document.addEventListener(i1,I),()=>document.removeEventListener(i1,I)},[]),C.jsx(Sn.div,{...d,ref:_,style:{pointerEvents:T?R?"auto":"none":void 0,...e.style},onFocusCapture:ct(e.onFocusCapture,A.onFocusCapture),onBlurCapture:ct(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:ct(e.onPointerDownCapture,O.onPointerDownCapture)})});hS.displayName=uZ;var hZ="DismissableLayerBranch",pZ=P.forwardRef((e,t)=>{const n=P.useContext(l4),r=P.useRef(null),o=er(t,r);return P.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),C.jsx(Sn.div,{...e,ref:o})});pZ.displayName=hZ;function mZ(e,t=globalThis?.document){const n=ii(e),r=P.useRef(!1),o=P.useRef(()=>{});return P.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let d=function(){c4(dZ,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function gZ(e,t=globalThis?.document){const n=ii(e),r=P.useRef(!1);return P.useEffect(()=>{const o=s=>{s.target&&!r.current&&c4(fZ,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function OC(){const e=new CustomEvent(i1);document.dispatchEvent(e)}function c4(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?a4(o,s):o.dispatchEvent(s)}var y_="focusScope.autoFocusOnMount",__="focusScope.autoFocusOnUnmount",TC={bubbles:!1,cancelable:!0},vZ="FocusScope",pS=P.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...l}=e,[c,d]=P.useState(null),f=ii(o),p=ii(s),h=P.useRef(null),g=er(t,b=>d(b)),v=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(r){let b=function(T){if(v.paused||!c)return;const R=T.target;c.contains(R)?h.current=R:Js(h.current,{select:!0})},x=function(T){if(v.paused||!c)return;const R=T.relatedTarget;R!==null&&(c.contains(R)||Js(h.current,{select:!0}))},S=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&Js(c)};document.addEventListener("focusin",b),document.addEventListener("focusout",x);const E=new MutationObserver(S);return c&&E.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",x),E.disconnect()}}},[r,c,v.paused]),P.useEffect(()=>{if(c){AC.add(v);const b=document.activeElement;if(!c.contains(b)){const S=new CustomEvent(y_,TC);c.addEventListener(y_,f),c.dispatchEvent(S),S.defaultPrevented||(yZ(EZ(u4(c)),{select:!0}),document.activeElement===b&&Js(c))}return()=>{c.removeEventListener(y_,f),setTimeout(()=>{const S=new CustomEvent(__,TC);c.addEventListener(__,p),c.dispatchEvent(S),S.defaultPrevented||Js(b??document.body,{select:!0}),c.removeEventListener(__,p),AC.remove(v)},0)}}},[c,f,p,v]);const _=P.useCallback(b=>{if(!n&&!r||v.paused)return;const x=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,S=document.activeElement;if(x&&S){const E=b.currentTarget,[T,R]=_Z(E);T&&R?!b.shiftKey&&S===R?(b.preventDefault(),n&&Js(T,{select:!0})):b.shiftKey&&S===T&&(b.preventDefault(),n&&Js(R,{select:!0})):S===E&&b.preventDefault()}},[n,r,v.paused]);return C.jsx(Sn.div,{tabIndex:-1,...l,ref:g,onKeyDown:_})});pS.displayName=vZ;function yZ(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Js(r,{select:t}),document.activeElement!==n)return}function _Z(e){const t=u4(e),n=CC(t,e),r=CC(t.reverse(),e);return[n,r]}function u4(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function CC(e,t){for(const n of e)if(!bZ(n,{upTo:t}))return n}function bZ(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wZ(e){return e instanceof HTMLInputElement&&"select"in e}function Js(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wZ(e)&&t&&e.select()}}var AC=SZ();function SZ(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=IC(e,t),e.unshift(t)},remove(t){e=IC(e,t),e[0]?.resume()}}}function IC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function EZ(e){return e.filter(t=>t.tagName!=="A")}var xZ="Portal",mS=P.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=P.useState(!1);oi(()=>s(!0),[]);const l=n||o&&globalThis?.document?.body;return l?WM.createPortal(C.jsx(Sn.div,{...r,ref:t}),l):null});mS.displayName=xZ;function RZ(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var vs=e=>{const{present:t,children:n}=e,r=OZ(t),o=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),s=er(r.ref,TZ(o));return typeof n=="function"||r.isPresent?P.cloneElement(o,{ref:s}):null};vs.displayName="Presence";function OZ(e){const[t,n]=P.useState(),r=P.useRef(null),o=P.useRef(e),s=P.useRef("none"),l=e?"mounted":"unmounted",[c,d]=RZ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const f=up(r.current);s.current=c==="mounted"?f:"none"},[c]),oi(()=>{const f=r.current,p=o.current;if(p!==e){const g=s.current,v=up(f);e?d("MOUNT"):v==="none"||f?.display==="none"?d("UNMOUNT"):d(p&&g!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),oi(()=>{if(t){let f;const p=t.ownerDocument.defaultView??window,h=v=>{const b=up(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&b&&(d("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",f=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},g=v=>{v.target===t&&(s.current=up(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{p.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:P.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function up(e){return e?.animationName||"none"}function TZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var b_=0;function d4(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??PC()),document.body.insertAdjacentElement("beforeend",e[1]??PC()),b_++,()=>{b_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),b_--}},[])}function PC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Si=function(){return Si=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},Si.apply(this,arguments)};function f4(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 CZ(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 Sm="right-scroll-bar-position",Em="width-before-scroll-bar",AZ="with-scroll-bars-hidden",IZ="--removed-body-scroll-bar-size";function w_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function PZ(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var MZ=typeof window<"u"?P.useLayoutEffect:P.useEffect,MC=new WeakMap;function NZ(e,t){var n=PZ(null,function(r){return e.forEach(function(o){return w_(o,r)})});return MZ(function(){var r=MC.get(n);if(r){var o=new Set(r),s=new Set(e),l=n.current;o.forEach(function(c){s.has(c)||w_(c,null)}),s.forEach(function(c){o.has(c)||w_(c,l)})}MC.set(n,e)},[e]),n}function kZ(e){return e}function DZ(e,t){t===void 0&&(t=kZ);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(s),l=n}var d=function(){var p=l;l=[],p.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(p){l.push(p),f()},filter:function(p){return l=l.filter(p),n}}}};return o}function LZ(e){e===void 0&&(e={});var t=DZ(null);return t.options=Si({async:!0,ssr:!1},e),t}var h4=function(e){var t=e.sideCar,n=f4(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return P.createElement(r,Si({},n))};h4.isSideCarExport=!0;function $Z(e,t){return e.useMedium(t),h4}var p4=LZ(),S_=function(){},Yg=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:S_,onWheelCapture:S_,onTouchMoveCapture:S_}),o=r[0],s=r[1],l=e.forwardProps,c=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,g=e.sideCar,v=e.noRelative,_=e.noIsolation,b=e.inert,x=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,T=e.gapMode,R=f4(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,A=NZ([n,t]),I=Si(Si({},R),o);return P.createElement(P.Fragment,null,p&&P.createElement(O,{sideCar:p4,removeScrollBar:f,shards:h,noRelative:v,noIsolation:_,inert:b,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:T}),l?P.cloneElement(P.Children.only(c),Si(Si({},I),{ref:A})):P.createElement(E,Si({},I,{className:d,ref:A}),c))});Yg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Yg.classNames={fullWidth:Em,zeroRight:Sm};var jZ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zZ(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jZ();return t&&e.setAttribute("nonce",t),e}function UZ(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function FZ(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var BZ=function(){var e=0,t=null;return{add:function(n){e==0&&(t=zZ())&&(UZ(t,n),FZ(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},VZ=function(){var e=BZ();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},m4=function(){var e=VZ(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},HZ={left:0,top:0,right:0,gap:0},E_=function(e){return parseInt(e||"",10)||0},qZ=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[E_(n),E_(r),E_(o)]},GZ=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return HZ;var t=qZ(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},KZ=m4(),$c="data-scroll-locked",ZZ=function(e,t,n,r){var o=e.left,s=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
62
62
|
.`.concat(AZ,` {
|
|
63
63
|
overflow: hidden `).concat(r,`;
|
|
64
64
|
padding-right: `).concat(c,"px ").concat(r,`;
|
|
@@ -160,7 +160,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
160
160
|
|| ${M} === "boolean" || ${A} === null`).assign(L,(0,r._)`[${A}]`)}}}function g({gen:E,parentData:T,parentDataProperty:R},O){E.if((0,r._)`${T} !== undefined`,()=>E.assign((0,r._)`${T}[${R}]`,O))}function v(E,T,R,O=s.Correct){const A=O===s.Correct?r.operators.EQ:r.operators.NEQ;let I;switch(E){case"null":return(0,r._)`${T} ${A} null`;case"array":I=(0,r._)`Array.isArray(${T})`;break;case"object":I=(0,r._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":I=M((0,r._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":I=M();break;default:return(0,r._)`typeof ${T} ${A} ${E}`}return O===s.Correct?I:(0,r.not)(I);function M(L=r.nil){return(0,r.and)((0,r._)`typeof ${T} == "number"`,L,R?(0,r._)`isFinite(${T})`:r.nil)}}fr.checkDataType=v;function _(E,T,R,O){if(E.length===1)return v(E[0],T,R,O);let A;const I=(0,o.toHash)(E);if(I.array&&I.object){const M=(0,r._)`typeof ${T} != "object"`;A=I.null?M:(0,r._)`!${T} || ${M}`,delete I.null,delete I.array,delete I.object}else A=r.nil;I.number&&delete I.integer;for(const M in I)A=(0,r.and)(A,v(M,T,R,O));return A}fr.checkDataTypes=_;const b={message:({schema:E})=>`must be ${E}`,params:({schema:E,schemaValue:T})=>typeof E=="string"?(0,r._)`{type: ${E}}`:(0,r._)`{type: ${T}}`};function x(E){const T=S(E);(0,n.reportError)(T,b)}fr.reportTypeError=x;function S(E){const{gen:T,data:R,schema:O}=E,A=(0,o.schemaRefOrVal)(E,O,"type");return{gen:T,keyword:"type",data:R,schema:O.type,schemaCode:A,schemaValue:A,parentSchema:O,params:{},it:E}}return fr}var yd={},GI;function ase(){if(GI)return yd;GI=1,Object.defineProperty(yd,"__esModule",{value:!0}),yd.assignDefaults=void 0;const e=yt(),t=kt();function n(o,s){const{properties:l,items:c}=o.schema;if(s==="object"&&l)for(const d in l)r(o,d,l[d].default);else s==="array"&&Array.isArray(c)&&c.forEach((d,f)=>r(o,f,d.default))}yd.assignDefaults=n;function r(o,s,l){const{gen:c,compositeRule:d,data:f,opts:p}=o;if(l===void 0)return;const h=(0,e._)`${f}${(0,e.getProperty)(s)}`;if(d){(0,t.checkStrictMode)(o,`default is ignored for: ${h}`);return}let g=(0,e._)`${h} === undefined`;p.useDefaults==="empty"&&(g=(0,e._)`${g} || ${h} === null || ${h} === ""`),c.if(g,(0,e._)`${h} = ${(0,e.stringify)(l)}`)}return yd}var Jo={},qt={},KI;function ci(){if(KI)return qt;KI=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.validateUnion=qt.validateArray=qt.usePattern=qt.callValidateCode=qt.schemaProperties=qt.allSchemaProperties=qt.noPropertyInData=qt.propertyInData=qt.isOwnProperty=qt.hasPropFunc=qt.reportMissingProp=qt.checkMissingProp=qt.checkReportMissingProp=void 0;const e=yt(),t=kt(),n=Ea(),r=kt();function o(E,T){const{gen:R,data:O,it:A}=E;R.if(p(R,O,T,A.opts.ownProperties),()=>{E.setParams({missingProperty:(0,e._)`${T}`},!0),E.error()})}qt.checkReportMissingProp=o;function s({gen:E,data:T,it:{opts:R}},O,A){return(0,e.or)(...O.map(I=>(0,e.and)(p(E,T,I,R.ownProperties),(0,e._)`${A} = ${I}`)))}qt.checkMissingProp=s;function l(E,T){E.setParams({missingProperty:T},!0),E.error()}qt.reportMissingProp=l;function c(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}qt.hasPropFunc=c;function d(E,T,R){return(0,e._)`${c(E)}.call(${T}, ${R})`}qt.isOwnProperty=d;function f(E,T,R,O){const A=(0,e._)`${T}${(0,e.getProperty)(R)} !== undefined`;return O?(0,e._)`${A} && ${d(E,T,R)}`:A}qt.propertyInData=f;function p(E,T,R,O){const A=(0,e._)`${T}${(0,e.getProperty)(R)} === undefined`;return O?(0,e.or)(A,(0,e.not)(d(E,T,R))):A}qt.noPropertyInData=p;function h(E){return E?Object.keys(E).filter(T=>T!=="__proto__"):[]}qt.allSchemaProperties=h;function g(E,T){return h(T).filter(R=>!(0,t.alwaysValidSchema)(E,T[R]))}qt.schemaProperties=g;function v({schemaCode:E,data:T,it:{gen:R,topSchemaRef:O,schemaPath:A,errorPath:I},it:M},L,H,j){const B=j?(0,e._)`${E}, ${T}, ${O}${A}`:T,F=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,I)],[n.default.parentData,M.parentData],[n.default.parentDataProperty,M.parentDataProperty],[n.default.rootData,n.default.rootData]];M.opts.dynamicRef&&F.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const Z=(0,e._)`${B}, ${R.object(...F)}`;return H!==e.nil?(0,e._)`${L}.call(${H}, ${Z})`:(0,e._)`${L}(${Z})`}qt.callValidateCode=v;const _=(0,e._)`new RegExp`;function b({gen:E,it:{opts:T}},R){const O=T.unicodeRegExp?"u":"",{regExp:A}=T.code,I=A(R,O);return E.scopeValue("pattern",{key:I.toString(),ref:I,code:(0,e._)`${A.code==="new RegExp"?_:(0,r.useFunc)(E,A)}(${R}, ${O})`})}qt.usePattern=b;function x(E){const{gen:T,data:R,keyword:O,it:A}=E,I=T.name("valid");if(A.allErrors){const L=T.let("valid",!0);return M(()=>T.assign(L,!1)),L}return T.var(I,!0),M(()=>T.break()),I;function M(L){const H=T.const("len",(0,e._)`${R}.length`);T.forRange("i",0,H,j=>{E.subschema({keyword:O,dataProp:j,dataPropType:t.Type.Num},I),T.if((0,e.not)(I),L)})}}qt.validateArray=x;function S(E){const{gen:T,schema:R,keyword:O,it:A}=E;if(!Array.isArray(R))throw new Error("ajv implementation error");if(R.some(H=>(0,t.alwaysValidSchema)(A,H))&&!A.opts.unevaluated)return;const M=T.let("valid",!1),L=T.name("_valid");T.block(()=>R.forEach((H,j)=>{const B=E.subschema({keyword:O,schemaProp:j,compositeRule:!0},L);T.assign(M,(0,e._)`${M} || ${L}`),E.mergeValidEvaluated(B,L)||T.if((0,e.not)(M))})),E.result(M,()=>E.reset(),()=>E.error(!0))}return qt.validateUnion=S,qt}var ZI;function lse(){if(ZI)return Jo;ZI=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.validateKeywordUsage=Jo.validSchemaType=Jo.funcKeywordCode=Jo.macroKeywordCode=void 0;const e=yt(),t=Ea(),n=ci(),r=pv();function o(g,v){const{gen:_,keyword:b,schema:x,parentSchema:S,it:E}=g,T=v.macro.call(E.self,x,S,E),R=f(_,b,T);E.opts.validateSchema!==!1&&E.self.validateSchema(T,!0);const O=_.name("valid");g.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${E.errSchemaPath}/${b}`,topSchemaRef:R,compositeRule:!0},O),g.pass(O,()=>g.error(!0))}Jo.macroKeywordCode=o;function s(g,v){var _;const{gen:b,keyword:x,schema:S,parentSchema:E,$data:T,it:R}=g;d(R,v);const O=!T&&v.compile?v.compile.call(R.self,S,E,R):v.validate,A=f(b,x,O),I=b.let("valid");g.block$data(I,M),g.ok((_=v.valid)!==null&&_!==void 0?_:I);function M(){if(v.errors===!1)j(),v.modifying&&l(g),B(()=>g.error());else{const F=v.async?L():H();v.modifying&&l(g),B(()=>c(g,F))}}function L(){const F=b.let("ruleErrs",null);return b.try(()=>j((0,e._)`await `),Z=>b.assign(I,!1).if((0,e._)`${Z} instanceof ${R.ValidationError}`,()=>b.assign(F,(0,e._)`${Z}.errors`),()=>b.throw(Z))),F}function H(){const F=(0,e._)`${A}.errors`;return b.assign(F,null),j(e.nil),F}function j(F=v.async?(0,e._)`await `:e.nil){const Z=R.opts.passContext?t.default.this:t.default.self,ie=!("compile"in v&&!T||v.schema===!1);b.assign(I,(0,e._)`${F}${(0,n.callValidateCode)(g,A,Z,ie)}`,v.modifying)}function B(F){var Z;b.if((0,e.not)((Z=v.valid)!==null&&Z!==void 0?Z:I),F)}}Jo.funcKeywordCode=s;function l(g){const{gen:v,data:_,it:b}=g;v.if(b.parentData,()=>v.assign(_,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function c(g,v){const{gen:_}=g;_.if((0,e._)`Array.isArray(${v})`,()=>{_.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function d({schemaEnv:g},v){if(v.async&&!g.$async)throw new Error("async keyword in sync schema")}function f(g,v,_){if(_===void 0)throw new Error(`keyword "${v}" failed to compile`);return g.scopeValue("keyword",typeof _=="function"?{ref:_}:{ref:_,code:(0,e.stringify)(_)})}function p(g,v,_=!1){return!v.length||v.some(b=>b==="array"?Array.isArray(g):b==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==b||_&&typeof g>"u")}Jo.validSchemaType=p;function h({schema:g,opts:v,self:_,errSchemaPath:b},x,S){if(Array.isArray(x.keyword)?!x.keyword.includes(S):x.keyword!==S)throw new Error("ajv implementation error");const E=x.dependencies;if(E?.some(T=>!Object.prototype.hasOwnProperty.call(g,T)))throw new Error(`parent schema must have dependencies of ${S}: ${E.join(",")}`);if(x.validateSchema&&!x.validateSchema(g[S])){const R=`keyword "${S}" value is invalid at path "${b}": `+_.errorsText(x.validateSchema.errors);if(v.validateSchema==="log")_.logger.error(R);else throw new Error(R)}}return Jo.validateKeywordUsage=h,Jo}var rs={},YI;function cse(){if(YI)return rs;YI=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.extendSubschemaMode=rs.extendSubschemaData=rs.getSubschema=void 0;const e=yt(),t=kt();function n(s,{keyword:l,schemaProp:c,schema:d,schemaPath:f,errSchemaPath:p,topSchemaRef:h}){if(l!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const g=s.schema[l];return c===void 0?{schema:g,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${s.errSchemaPath}/${l}`}:{schema:g[c],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${l}/${(0,t.escapeFragment)(c)}`}}if(d!==void 0){if(f===void 0||p===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:f,topSchemaRef:h,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}rs.getSubschema=n;function r(s,l,{dataProp:c,dataPropType:d,data:f,dataTypes:p,propertyName:h}){if(f!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=l;if(c!==void 0){const{errorPath:_,dataPathArr:b,opts:x}=l,S=g.let("data",(0,e._)`${l.data}${(0,e.getProperty)(c)}`,!0);v(S),s.errorPath=(0,e.str)`${_}${(0,t.getErrorPath)(c,d,x.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${c}`,s.dataPathArr=[...b,s.parentDataProperty]}if(f!==void 0){const _=f instanceof e.Name?f:g.let("data",f,!0);v(_),h!==void 0&&(s.propertyName=h)}p&&(s.dataTypes=p);function v(_){s.data=_,s.dataLevel=l.dataLevel+1,s.dataTypes=[],l.definedProperties=new Set,s.parentData=l.data,s.dataNames=[...l.dataNames,_]}}rs.extendSubschemaData=r;function o(s,{jtdDiscriminator:l,jtdMetadata:c,compositeRule:d,createErrors:f,allErrors:p}){d!==void 0&&(s.compositeRule=d),f!==void 0&&(s.createErrors=f),p!==void 0&&(s.allErrors=p),s.jtdDiscriminator=l,s.jtdMetadata=c}return rs.extendSubschemaMode=o,rs}var kr={},wb,WI;function K6(){return WI||(WI=1,wb=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var l=s[o];if(!e(t[l],n[l]))return!1}return!0}return t!==t&&n!==n}),wb}var Sb={exports:{}},QI;function use(){if(QI)return Sb.exports;QI=1;var e=Sb.exports=function(r,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var l=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};t(o,l,c,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,o,s,l,c,d,f,p,h,g){if(l&&typeof l=="object"&&!Array.isArray(l)){o(l,c,d,f,p,h,g);for(var v in l){var _=l[v];if(Array.isArray(_)){if(v in e.arrayKeywords)for(var b=0;b<_.length;b++)t(r,o,s,_[b],c+"/"+v+"/"+b,d,c,v,l,b)}else if(v in e.propsKeywords){if(_&&typeof _=="object")for(var x in _)t(r,o,s,_[x],c+"/"+v+"/"+n(x),d,c,v,l,x)}else(v in e.keywords||r.allKeys&&!(v in e.skipKeywords))&&t(r,o,s,_,c+"/"+v,d,c,v,l)}s(l,c,d,f,p,h,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return Sb.exports}var XI;function mv(){if(XI)return kr;XI=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.getSchemaRefs=kr.resolveUrl=kr.normalizeId=kr._getFullPath=kr.getFullPath=kr.inlineRef=void 0;const e=kt(),t=K6(),n=use(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(b,x=!0){return typeof b=="boolean"?!0:x===!0?!l(b):x?c(b)<=x:!1}kr.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(b){for(const x in b){if(s.has(x))return!0;const S=b[x];if(Array.isArray(S)&&S.some(l)||typeof S=="object"&&l(S))return!0}return!1}function c(b){let x=0;for(const S in b){if(S==="$ref")return 1/0;if(x++,!r.has(S)&&(typeof b[S]=="object"&&(0,e.eachItem)(b[S],E=>x+=c(E)),x===1/0))return 1/0}return x}function d(b,x="",S){S!==!1&&(x=h(x));const E=b.parse(x);return f(b,E)}kr.getFullPath=d;function f(b,x){return b.serialize(x).split("#")[0]+"#"}kr._getFullPath=f;const p=/#\/?$/;function h(b){return b?b.replace(p,""):""}kr.normalizeId=h;function g(b,x,S){return S=h(S),b.resolve(x,S)}kr.resolveUrl=g;const v=/^[a-z_][-a-z0-9._]*$/i;function _(b,x){if(typeof b=="boolean")return{};const{schemaId:S,uriResolver:E}=this.opts,T=h(b[S]||x),R={"":T},O=d(E,T,!1),A={},I=new Set;return n(b,{allKeys:!0},(H,j,B,F)=>{if(F===void 0)return;const Z=O+j;let ie=R[F];typeof H[S]=="string"&&(ie=q.call(this,H[S])),W.call(this,H.$anchor),W.call(this,H.$dynamicAnchor),R[j]=ie;function q(te){const le=this.opts.uriResolver.resolve;if(te=h(ie?le(ie,te):te),I.has(te))throw L(te);I.add(te);let Q=this.refs[te];return typeof Q=="string"&&(Q=this.refs[Q]),typeof Q=="object"?M(H,Q.schema,te):te!==h(Z)&&(te[0]==="#"?(M(H,A[te],te),A[te]=H):this.refs[te]=Z),te}function W(te){if(typeof te=="string"){if(!v.test(te))throw new Error(`invalid anchor "${te}"`);q.call(this,`#${te}`)}}}),A;function M(H,j,B){if(j!==void 0&&!t(H,j))throw L(B)}function L(H){return new Error(`reference "${H}" resolves to more than one schema`)}}return kr.getSchemaRefs=_,kr}var JI;function gv(){if(JI)return ts;JI=1,Object.defineProperty(ts,"__esModule",{value:!0}),ts.getData=ts.KeywordCxt=ts.validateFunctionCode=void 0;const e=sse(),t=Cg(),n=G6(),r=Cg(),o=ase(),s=lse(),l=cse(),c=yt(),d=Ea(),f=mv(),p=kt(),h=pv();function g(Y){if(O(Y)&&(I(Y),R(Y))){x(Y);return}v(Y,()=>(0,e.topBoolOrEmptySchema)(Y))}ts.validateFunctionCode=g;function v({gen:Y,validateName:re,schema:ve,schemaEnv:se,opts:Se},Te){Se.code.es5?Y.func(re,(0,c._)`${d.default.data}, ${d.default.valCxt}`,se.$async,()=>{Y.code((0,c._)`"use strict"; ${E(ve,Se)}`),b(Y,Se),Y.code(Te)}):Y.func(re,(0,c._)`${d.default.data}, ${_(Se)}`,se.$async,()=>Y.code(E(ve,Se)).code(Te))}function _(Y){return(0,c._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${Y.dynamicRef?(0,c._)`, ${d.default.dynamicAnchors}={}`:c.nil}}={}`}function b(Y,re){Y.if(d.default.valCxt,()=>{Y.var(d.default.instancePath,(0,c._)`${d.default.valCxt}.${d.default.instancePath}`),Y.var(d.default.parentData,(0,c._)`${d.default.valCxt}.${d.default.parentData}`),Y.var(d.default.parentDataProperty,(0,c._)`${d.default.valCxt}.${d.default.parentDataProperty}`),Y.var(d.default.rootData,(0,c._)`${d.default.valCxt}.${d.default.rootData}`),re.dynamicRef&&Y.var(d.default.dynamicAnchors,(0,c._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{Y.var(d.default.instancePath,(0,c._)`""`),Y.var(d.default.parentData,(0,c._)`undefined`),Y.var(d.default.parentDataProperty,(0,c._)`undefined`),Y.var(d.default.rootData,d.default.data),re.dynamicRef&&Y.var(d.default.dynamicAnchors,(0,c._)`{}`)})}function x(Y){const{schema:re,opts:ve,gen:se}=Y;v(Y,()=>{ve.$comment&&re.$comment&&F(Y),H(Y),se.let(d.default.vErrors,null),se.let(d.default.errors,0),ve.unevaluated&&S(Y),M(Y),Z(Y)})}function S(Y){const{gen:re,validateName:ve}=Y;Y.evaluated=re.const("evaluated",(0,c._)`${ve}.evaluated`),re.if((0,c._)`${Y.evaluated}.dynamicProps`,()=>re.assign((0,c._)`${Y.evaluated}.props`,(0,c._)`undefined`)),re.if((0,c._)`${Y.evaluated}.dynamicItems`,()=>re.assign((0,c._)`${Y.evaluated}.items`,(0,c._)`undefined`))}function E(Y,re){const ve=typeof Y=="object"&&Y[re.schemaId];return ve&&(re.code.source||re.code.process)?(0,c._)`/*# sourceURL=${ve} */`:c.nil}function T(Y,re){if(O(Y)&&(I(Y),R(Y))){A(Y,re);return}(0,e.boolOrEmptySchema)(Y,re)}function R({schema:Y,self:re}){if(typeof Y=="boolean")return!Y;for(const ve in Y)if(re.RULES.all[ve])return!0;return!1}function O(Y){return typeof Y.schema!="boolean"}function A(Y,re){const{schema:ve,gen:se,opts:Se}=Y;Se.$comment&&ve.$comment&&F(Y),j(Y),B(Y);const Te=se.const("_errs",d.default.errors);M(Y,Te),se.var(re,(0,c._)`${Te} === ${d.default.errors}`)}function I(Y){(0,p.checkUnknownRules)(Y),L(Y)}function M(Y,re){if(Y.opts.jtd)return q(Y,[],!1,re);const ve=(0,t.getSchemaTypes)(Y.schema),se=(0,t.coerceAndCheckDataType)(Y,ve);q(Y,ve,!se,re)}function L(Y){const{schema:re,errSchemaPath:ve,opts:se,self:Se}=Y;re.$ref&&se.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(re,Se.RULES)&&Se.logger.warn(`$ref: keywords ignored in schema at path "${ve}"`)}function H(Y){const{schema:re,opts:ve}=Y;re.default!==void 0&&ve.useDefaults&&ve.strictSchema&&(0,p.checkStrictMode)(Y,"default is ignored in the schema root")}function j(Y){const re=Y.schema[Y.opts.schemaId];re&&(Y.baseId=(0,f.resolveUrl)(Y.opts.uriResolver,Y.baseId,re))}function B(Y){if(Y.schema.$async&&!Y.schemaEnv.$async)throw new Error("async schema in sync schema")}function F({gen:Y,schemaEnv:re,schema:ve,errSchemaPath:se,opts:Se}){const Te=ve.$comment;if(Se.$comment===!0)Y.code((0,c._)`${d.default.self}.logger.log(${Te})`);else if(typeof Se.$comment=="function"){const tt=(0,c.str)`${se}/$comment`,rt=Y.scopeValue("root",{ref:re.root});Y.code((0,c._)`${d.default.self}.opts.$comment(${Te}, ${tt}, ${rt}.schema)`)}}function Z(Y){const{gen:re,schemaEnv:ve,validateName:se,ValidationError:Se,opts:Te}=Y;ve.$async?re.if((0,c._)`${d.default.errors} === 0`,()=>re.return(d.default.data),()=>re.throw((0,c._)`new ${Se}(${d.default.vErrors})`)):(re.assign((0,c._)`${se}.errors`,d.default.vErrors),Te.unevaluated&&ie(Y),re.return((0,c._)`${d.default.errors} === 0`))}function ie({gen:Y,evaluated:re,props:ve,items:se}){ve instanceof c.Name&&Y.assign((0,c._)`${re}.props`,ve),se instanceof c.Name&&Y.assign((0,c._)`${re}.items`,se)}function q(Y,re,ve,se){const{gen:Se,schema:Te,data:tt,allErrors:rt,opts:Be,self:Qe}=Y,{RULES:Me}=Qe;if(Te.$ref&&(Be.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(Te,Me))){Se.block(()=>fe(Y,"$ref",Me.all.$ref.definition));return}Be.jtd||te(Y,re),Se.block(()=>{for(const Fe of Me.rules)Pe(Fe);Pe(Me.post)});function Pe(Fe){(0,n.shouldUseGroup)(Te,Fe)&&(Fe.type?(Se.if((0,r.checkDataType)(Fe.type,tt,Be.strictNumbers)),W(Y,Fe),re.length===1&&re[0]===Fe.type&&ve&&(Se.else(),(0,r.reportTypeError)(Y)),Se.endIf()):W(Y,Fe),rt||Se.if((0,c._)`${d.default.errors} === ${se||0}`))}}function W(Y,re){const{gen:ve,schema:se,opts:{useDefaults:Se}}=Y;Se&&(0,o.assignDefaults)(Y,re.type),ve.block(()=>{for(const Te of re.rules)(0,n.shouldUseRule)(se,Te)&&fe(Y,Te.keyword,Te.definition,re.type)})}function te(Y,re){Y.schemaEnv.meta||!Y.opts.strictTypes||(le(Y,re),Y.opts.allowUnionTypes||Q(Y,re),k(Y,Y.dataTypes))}function le(Y,re){if(re.length){if(!Y.dataTypes.length){Y.dataTypes=re;return}re.forEach(ve=>{V(Y.dataTypes,ve)||U(Y,`type "${ve}" not allowed by context "${Y.dataTypes.join(",")}"`)}),D(Y,re)}}function Q(Y,re){re.length>1&&!(re.length===2&&re.includes("null"))&&U(Y,"use allowUnionTypes to allow union type keyword")}function k(Y,re){const ve=Y.self.RULES.all;for(const se in ve){const Se=ve[se];if(typeof Se=="object"&&(0,n.shouldUseRule)(Y.schema,Se)){const{type:Te}=Se.definition;Te.length&&!Te.some(tt=>G(re,tt))&&U(Y,`missing type "${Te.join(",")}" for keyword "${se}"`)}}}function G(Y,re){return Y.includes(re)||re==="number"&&Y.includes("integer")}function V(Y,re){return Y.includes(re)||re==="integer"&&Y.includes("number")}function D(Y,re){const ve=[];for(const se of Y.dataTypes)V(re,se)?ve.push(se):re.includes("integer")&&se==="number"&&ve.push("integer");Y.dataTypes=ve}function U(Y,re){const ve=Y.schemaEnv.baseId+Y.errSchemaPath;re+=` at "${ve}" (strictTypes)`,(0,p.checkStrictMode)(Y,re,Y.opts.strictTypes)}class X{constructor(re,ve,se){if((0,s.validateKeywordUsage)(re,ve,se),this.gen=re.gen,this.allErrors=re.allErrors,this.keyword=se,this.data=re.data,this.schema=re.schema[se],this.$data=ve.$data&&re.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(re,this.schema,se,this.$data),this.schemaType=ve.schemaType,this.parentSchema=re.schema,this.params={},this.it=re,this.def=ve,this.$data)this.schemaCode=re.gen.const("vSchema",je(this.$data,re));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,ve.schemaType,ve.allowUndefined))throw new Error(`${se} value must be ${JSON.stringify(ve.schemaType)}`);("code"in ve?ve.trackErrors:ve.errors!==!1)&&(this.errsCount=re.gen.const("_errs",d.default.errors))}result(re,ve,se){this.failResult((0,c.not)(re),ve,se)}failResult(re,ve,se){this.gen.if(re),se?se():this.error(),ve?(this.gen.else(),ve(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(re,ve){this.failResult((0,c.not)(re),void 0,ve)}fail(re){if(re===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(re),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(re){if(!this.$data)return this.fail(re);const{schemaCode:ve}=this;this.fail((0,c._)`${ve} !== undefined && (${(0,c.or)(this.invalid$data(),re)})`)}error(re,ve,se){if(ve){this.setParams(ve),this._error(re,se),this.setParams({});return}this._error(re,se)}_error(re,ve){(re?h.reportExtraError:h.reportError)(this,this.def.error,ve)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(re){this.allErrors||this.gen.if(re)}setParams(re,ve){ve?Object.assign(this.params,re):this.params=re}block$data(re,ve,se=c.nil){this.gen.block(()=>{this.check$data(re,se),ve()})}check$data(re=c.nil,ve=c.nil){if(!this.$data)return;const{gen:se,schemaCode:Se,schemaType:Te,def:tt}=this;se.if((0,c.or)((0,c._)`${Se} === undefined`,ve)),re!==c.nil&&se.assign(re,!0),(Te.length||tt.validateSchema)&&(se.elseIf(this.invalid$data()),this.$dataError(),re!==c.nil&&se.assign(re,!1)),se.else()}invalid$data(){const{gen:re,schemaCode:ve,schemaType:se,def:Se,it:Te}=this;return(0,c.or)(tt(),rt());function tt(){if(se.length){if(!(ve instanceof c.Name))throw new Error("ajv implementation error");const Be=Array.isArray(se)?se:[se];return(0,c._)`${(0,r.checkDataTypes)(Be,ve,Te.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function rt(){if(Se.validateSchema){const Be=re.scopeValue("validate$data",{ref:Se.validateSchema});return(0,c._)`!${Be}(${ve})`}return c.nil}}subschema(re,ve){const se=(0,l.getSubschema)(this.it,re);(0,l.extendSubschemaData)(se,this.it,re),(0,l.extendSubschemaMode)(se,re);const Se={...this.it,...se,items:void 0,props:void 0};return T(Se,ve),Se}mergeEvaluated(re,ve){const{it:se,gen:Se}=this;se.opts.unevaluated&&(se.props!==!0&&re.props!==void 0&&(se.props=p.mergeEvaluated.props(Se,re.props,se.props,ve)),se.items!==!0&&re.items!==void 0&&(se.items=p.mergeEvaluated.items(Se,re.items,se.items,ve)))}mergeValidEvaluated(re,ve){const{it:se,gen:Se}=this;if(se.opts.unevaluated&&(se.props!==!0||se.items!==!0))return Se.if(ve,()=>this.mergeEvaluated(re,c.Name)),!0}}ts.KeywordCxt=X;function fe(Y,re,ve,se){const Se=new X(Y,ve,re);"code"in ve?ve.code(Se,se):Se.$data&&ve.validate?(0,s.funcKeywordCode)(Se,ve):"macro"in ve?(0,s.macroKeywordCode)(Se,ve):(ve.compile||ve.validate)&&(0,s.funcKeywordCode)(Se,ve)}const pe=/^\/(?:[^~]|~0|~1)*$/,xe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function je(Y,{dataLevel:re,dataNames:ve,dataPathArr:se}){let Se,Te;if(Y==="")return d.default.rootData;if(Y[0]==="/"){if(!pe.test(Y))throw new Error(`Invalid JSON-pointer: ${Y}`);Se=Y,Te=d.default.rootData}else{const Qe=xe.exec(Y);if(!Qe)throw new Error(`Invalid JSON-pointer: ${Y}`);const Me=+Qe[1];if(Se=Qe[2],Se==="#"){if(Me>=re)throw new Error(Be("property/index",Me));return se[re-Me]}if(Me>re)throw new Error(Be("data",Me));if(Te=ve[re-Me],!Se)return Te}let tt=Te;const rt=Se.split("/");for(const Qe of rt)Qe&&(Te=(0,c._)`${Te}${(0,c.getProperty)((0,p.unescapeJsonPointer)(Qe))}`,tt=(0,c._)`${tt} && ${Te}`);return tt;function Be(Qe,Me){return`Cannot access ${Qe} ${Me} levels up, current level is ${re}`}}return ts.getData=je,ts}var Mp={},eP;function vE(){if(eP)return Mp;eP=1,Object.defineProperty(Mp,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Mp.default=e,Mp}var Np={},tP;function vv(){if(tP)return Np;tP=1,Object.defineProperty(Np,"__esModule",{value:!0});const e=mv();class t extends Error{constructor(r,o,s,l){super(l||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(r,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Np.default=t,Np}var co={},nP;function yE(){if(nP)return co;nP=1,Object.defineProperty(co,"__esModule",{value:!0}),co.resolveSchema=co.getCompilingSchema=co.resolveRef=co.compileSchema=co.SchemaEnv=void 0;const e=yt(),t=vE(),n=Ea(),r=mv(),o=kt(),s=gv();class l{constructor(S){var E;this.refs={},this.dynamicAnchors={};let T;typeof S.schema=="object"&&(T=S.schema),this.schema=S.schema,this.schemaId=S.schemaId,this.root=S.root||this,this.baseId=(E=S.baseId)!==null&&E!==void 0?E:(0,r.normalizeId)(T?.[S.schemaId||"$id"]),this.schemaPath=S.schemaPath,this.localRefs=S.localRefs,this.meta=S.meta,this.$async=T?.$async,this.refs={}}}co.SchemaEnv=l;function c(x){const S=p.call(this,x);if(S)return S;const E=(0,r.getFullPath)(this.opts.uriResolver,x.root.baseId),{es5:T,lines:R}=this.opts.code,{ownProperties:O}=this.opts,A=new e.CodeGen(this.scope,{es5:T,lines:R,ownProperties:O});let I;x.$async&&(I=A.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const M=A.scopeName("validate");x.validateName=M;const L={gen:A,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:A.scopeValue("schema",this.opts.code.source===!0?{ref:x.schema,code:(0,e.stringify)(x.schema)}:{ref:x.schema}),validateName:M,ValidationError:I,schema:x.schema,schemaEnv:x,rootId:E,baseId:x.baseId||E,schemaPath:e.nil,errSchemaPath:x.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let H;try{this._compilations.add(x),(0,s.validateFunctionCode)(L),A.optimize(this.opts.code.optimize);const j=A.toString();H=`${A.scopeRefs(n.default.scope)}return ${j}`,this.opts.code.process&&(H=this.opts.code.process(H,x));const F=new Function(`${n.default.self}`,`${n.default.scope}`,H)(this,this.scope.get());if(this.scope.value(M,{ref:F}),F.errors=null,F.schema=x.schema,F.schemaEnv=x,x.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:M,validateCode:j,scopeValues:A._values}),this.opts.unevaluated){const{props:Z,items:ie}=L;F.evaluated={props:Z instanceof e.Name?void 0:Z,items:ie instanceof e.Name?void 0:ie,dynamicProps:Z instanceof e.Name,dynamicItems:ie instanceof e.Name},F.source&&(F.source.evaluated=(0,e.stringify)(F.evaluated))}return x.validate=F,x}catch(j){throw delete x.validate,delete x.validateName,H&&this.logger.error("Error compiling schema, function code:",H),j}finally{this._compilations.delete(x)}}co.compileSchema=c;function d(x,S,E){var T;E=(0,r.resolveUrl)(this.opts.uriResolver,S,E);const R=x.refs[E];if(R)return R;let O=g.call(this,x,E);if(O===void 0){const A=(T=x.localRefs)===null||T===void 0?void 0:T[E],{schemaId:I}=this.opts;A&&(O=new l({schema:A,schemaId:I,root:x,baseId:S}))}if(O!==void 0)return x.refs[E]=f.call(this,O)}co.resolveRef=d;function f(x){return(0,r.inlineRef)(x.schema,this.opts.inlineRefs)?x.schema:x.validate?x:c.call(this,x)}function p(x){for(const S of this._compilations)if(h(S,x))return S}co.getCompilingSchema=p;function h(x,S){return x.schema===S.schema&&x.root===S.root&&x.baseId===S.baseId}function g(x,S){let E;for(;typeof(E=this.refs[S])=="string";)S=E;return E||this.schemas[S]||v.call(this,x,S)}function v(x,S){const E=this.opts.uriResolver.parse(S),T=(0,r._getFullPath)(this.opts.uriResolver,E);let R=(0,r.getFullPath)(this.opts.uriResolver,x.baseId,void 0);if(Object.keys(x.schema).length>0&&T===R)return b.call(this,E,x);const O=(0,r.normalizeId)(T),A=this.refs[O]||this.schemas[O];if(typeof A=="string"){const I=v.call(this,x,A);return typeof I?.schema!="object"?void 0:b.call(this,E,I)}if(typeof A?.schema=="object"){if(A.validate||c.call(this,A),O===(0,r.normalizeId)(S)){const{schema:I}=A,{schemaId:M}=this.opts,L=I[M];return L&&(R=(0,r.resolveUrl)(this.opts.uriResolver,R,L)),new l({schema:I,schemaId:M,root:x,baseId:R})}return b.call(this,E,A)}}co.resolveSchema=v;const _=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(x,{baseId:S,schema:E,root:T}){var R;if(((R=x.fragment)===null||R===void 0?void 0:R[0])!=="/")return;for(const I of x.fragment.slice(1).split("/")){if(typeof E=="boolean")return;const M=E[(0,o.unescapeFragment)(I)];if(M===void 0)return;E=M;const L=typeof E=="object"&&E[this.opts.schemaId];!_.has(I)&&L&&(S=(0,r.resolveUrl)(this.opts.uriResolver,S,L))}let O;if(typeof E!="boolean"&&E.$ref&&!(0,o.schemaHasRulesButRef)(E,this.RULES)){const I=(0,r.resolveUrl)(this.opts.uriResolver,S,E.$ref);O=v.call(this,T,I)}const{schemaId:A}=this.opts;if(O=O||new l({schema:E,schemaId:A,root:T,baseId:S}),O.schema!==O.root.schema)return O}return co}const dse="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",fse="Meta-schema for $data reference (JSON AnySchema extension proposal)",hse="object",pse=["$data"],mse={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},gse=!1,vse={$id:dse,description:fse,type:hse,required:pse,properties:mse,additionalProperties:gse};var kp={},_d={exports:{}},Eb,rP;function Z6(){if(rP)return Eb;rP=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(g){let v="",_=0,b=0;for(b=0;b<g.length;b++)if(_=g[b].charCodeAt(0),_!==48){if(!(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102))return"";v+=g[b];break}for(b+=1;b<g.length;b++){if(_=g[b].charCodeAt(0),!(_>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102))return"";v+=g[b]}return v}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(g){return g.length=0,!0}function s(g,v,_){if(g.length){const b=n(g);if(b!=="")v.push(b);else return _.error=!0,!1;g.length=0}return!0}function l(g){let v=0;const _={error:!1,address:"",zone:""},b=[],x=[];let S=!1,E=!1,T=s;for(let R=0;R<g.length;R++){const O=g[R];if(!(O==="["||O==="]"))if(O===":"){if(S===!0&&(E=!0),!T(x,b,_))break;if(++v>7){_.error=!0;break}R>0&&g[R-1]===":"&&(S=!0),b.push(":");continue}else if(O==="%"){if(!T(x,b,_))break;T=o}else{x.push(O);continue}}return x.length&&(T===o?_.zone=x.join(""):E?b.push(x.join("")):b.push(n(x))),_.address=b.join(""),_}function c(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const v=l(g);if(v.error)return{host:g,isIPV6:!1};{let _=v.address,b=v.address;return v.zone&&(_+="%"+v.zone,b+="%25"+v.zone),{host:_,isIPV6:!0,escapedHost:b}}}function d(g,v){let _=0;for(let b=0;b<g.length;b++)g[b]===v&&_++;return _}function f(g){let v=g;const _=[];let b=-1,x=0;for(;x=v.length;){if(x===1){if(v===".")break;if(v==="/"){_.push("/");break}else{_.push(v);break}}else if(x===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){_.push("/");break}}else if(x===3&&v==="/.."){_.length!==0&&_.pop(),_.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),_.length!==0&&_.pop();continue}}if((b=v.indexOf("/",1))===-1){_.push(v);break}else _.push(v.slice(0,b)),v=v.slice(b)}return _.join("")}function p(g,v){const _=v!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=_(g.scheme)),g.userinfo!==void 0&&(g.userinfo=_(g.userinfo)),g.host!==void 0&&(g.host=_(g.host)),g.path!==void 0&&(g.path=_(g.path)),g.query!==void 0&&(g.query=_(g.query)),g.fragment!==void 0&&(g.fragment=_(g.fragment)),g}function h(g){const v=[];if(g.userinfo!==void 0&&(v.push(g.userinfo),v.push("@")),g.host!==void 0){let _=unescape(g.host);if(!t(_)){const b=c(_);b.isIPV6===!0?_=`[${b.escapedHost}]`:_=g.host}v.push(_)}return(typeof g.port=="number"||typeof g.port=="string")&&(v.push(":"),v.push(String(g.port))),v.length?v.join(""):void 0}return Eb={nonSimpleDomain:r,recomposeAuthority:h,normalizeComponentEncoding:p,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:n},Eb}var xb,oP;function yse(){if(oP)return xb;oP=1;const{isUUID:e}=Z6(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(O){return n.indexOf(O)!==-1}function o(O){return O.secure===!0?!0:O.secure===!1?!1:O.scheme?O.scheme.length===3&&(O.scheme[0]==="w"||O.scheme[0]==="W")&&(O.scheme[1]==="s"||O.scheme[1]==="S")&&(O.scheme[2]==="s"||O.scheme[2]==="S"):!1}function s(O){return O.host||(O.error=O.error||"HTTP URIs must have a host."),O}function l(O){const A=String(O.scheme).toLowerCase()==="https";return(O.port===(A?443:80)||O.port==="")&&(O.port=void 0),O.path||(O.path="/"),O}function c(O){return O.secure=o(O),O.resourceName=(O.path||"/")+(O.query?"?"+O.query:""),O.path=void 0,O.query=void 0,O}function d(O){if((O.port===(o(O)?443:80)||O.port==="")&&(O.port=void 0),typeof O.secure=="boolean"&&(O.scheme=O.secure?"wss":"ws",O.secure=void 0),O.resourceName){const[A,I]=O.resourceName.split("?");O.path=A&&A!=="/"?A:void 0,O.query=I,O.resourceName=void 0}return O.fragment=void 0,O}function f(O,A){if(!O.path)return O.error="URN can not be parsed",O;const I=O.path.match(t);if(I){const M=A.scheme||O.scheme||"urn";O.nid=I[1].toLowerCase(),O.nss=I[2];const L=`${M}:${A.nid||O.nid}`,H=R(L);O.path=void 0,H&&(O=H.parse(O,A))}else O.error=O.error||"URN can not be parsed.";return O}function p(O,A){if(O.nid===void 0)throw new Error("URN without nid cannot be serialized");const I=A.scheme||O.scheme||"urn",M=O.nid.toLowerCase(),L=`${I}:${A.nid||M}`,H=R(L);H&&(O=H.serialize(O,A));const j=O,B=O.nss;return j.path=`${M||A.nid}:${B}`,A.skipEscape=!0,j}function h(O,A){const I=O;return I.uuid=I.nss,I.nss=void 0,!A.tolerant&&(!I.uuid||!e(I.uuid))&&(I.error=I.error||"UUID is not valid."),I}function g(O){const A=O;return A.nss=(O.uuid||"").toLowerCase(),A}const v={scheme:"http",domainHost:!0,parse:s,serialize:l},_={scheme:"https",domainHost:v.domainHost,parse:s,serialize:l},b={scheme:"ws",domainHost:!0,parse:c,serialize:d},x={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},T={http:v,https:_,ws:b,wss:x,urn:{scheme:"urn",parse:f,serialize:p,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:h,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(T,null);function R(O){return O&&(T[O]||T[O.toLowerCase()])||void 0}return xb={wsIsSecure:o,SCHEMES:T,isValidSchemeName:r,getSchemeHandler:R},xb}var iP;function _se(){if(iP)return _d.exports;iP=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:o,nonSimpleDomain:s}=Z6(),{SCHEMES:l,getSchemeHandler:c}=yse();function d(x,S){return typeof x=="string"?x=g(_(x,S),S):typeof x=="object"&&(x=_(g(x,S),S)),x}function f(x,S,E){const T=E?Object.assign({scheme:"null"},E):{scheme:"null"},R=p(_(x,T),_(S,T),T,!0);return T.skipEscape=!0,g(R,T)}function p(x,S,E,T){const R={};return T||(x=_(g(x,E),E),S=_(g(S,E),E)),E=E||{},!E.tolerant&&S.scheme?(R.scheme=S.scheme,R.userinfo=S.userinfo,R.host=S.host,R.port=S.port,R.path=t(S.path||""),R.query=S.query):(S.userinfo!==void 0||S.host!==void 0||S.port!==void 0?(R.userinfo=S.userinfo,R.host=S.host,R.port=S.port,R.path=t(S.path||""),R.query=S.query):(S.path?(S.path[0]==="/"?R.path=t(S.path):((x.userinfo!==void 0||x.host!==void 0||x.port!==void 0)&&!x.path?R.path="/"+S.path:x.path?R.path=x.path.slice(0,x.path.lastIndexOf("/")+1)+S.path:R.path=S.path,R.path=t(R.path)),R.query=S.query):(R.path=x.path,S.query!==void 0?R.query=S.query:R.query=x.query),R.userinfo=x.userinfo,R.host=x.host,R.port=x.port),R.scheme=x.scheme),R.fragment=S.fragment,R}function h(x,S,E){return typeof x=="string"?(x=unescape(x),x=g(r(_(x,E),!0),{...E,skipEscape:!0})):typeof x=="object"&&(x=g(r(x,!0),{...E,skipEscape:!0})),typeof S=="string"?(S=unescape(S),S=g(r(_(S,E),!0),{...E,skipEscape:!0})):typeof S=="object"&&(S=g(r(S,!0),{...E,skipEscape:!0})),x.toLowerCase()===S.toLowerCase()}function g(x,S){const E={host:x.host,scheme:x.scheme,userinfo:x.userinfo,port:x.port,path:x.path,query:x.query,nid:x.nid,nss:x.nss,uuid:x.uuid,fragment:x.fragment,reference:x.reference,resourceName:x.resourceName,secure:x.secure,error:""},T=Object.assign({},S),R=[],O=c(T.scheme||E.scheme);O&&O.serialize&&O.serialize(E,T),E.path!==void 0&&(T.skipEscape?E.path=unescape(E.path):(E.path=escape(E.path),E.scheme!==void 0&&(E.path=E.path.split("%3A").join(":")))),T.reference!=="suffix"&&E.scheme&&R.push(E.scheme,":");const A=n(E);if(A!==void 0&&(T.reference!=="suffix"&&R.push("//"),R.push(A),E.path&&E.path[0]!=="/"&&R.push("/")),E.path!==void 0){let I=E.path;!T.absolutePath&&(!O||!O.absolutePath)&&(I=t(I)),A===void 0&&I[0]==="/"&&I[1]==="/"&&(I="/%2F"+I.slice(2)),R.push(I)}return E.query!==void 0&&R.push("?",E.query),E.fragment!==void 0&&R.push("#",E.fragment),R.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function _(x,S){const E=Object.assign({},S),T={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let R=!1;E.reference==="suffix"&&(E.scheme?x=E.scheme+":"+x:x="//"+x);const O=x.match(v);if(O){if(T.scheme=O[1],T.userinfo=O[3],T.host=O[4],T.port=parseInt(O[5],10),T.path=O[6]||"",T.query=O[7],T.fragment=O[8],isNaN(T.port)&&(T.port=O[5]),T.host)if(o(T.host)===!1){const M=e(T.host);T.host=M.host.toLowerCase(),R=M.isIPV6}else R=!0;T.scheme===void 0&&T.userinfo===void 0&&T.host===void 0&&T.port===void 0&&T.query===void 0&&!T.path?T.reference="same-document":T.scheme===void 0?T.reference="relative":T.fragment===void 0?T.reference="absolute":T.reference="uri",E.reference&&E.reference!=="suffix"&&E.reference!==T.reference&&(T.error=T.error||"URI is not a "+E.reference+" reference.");const A=c(E.scheme||T.scheme);if(!E.unicodeSupport&&(!A||!A.unicodeSupport)&&T.host&&(E.domainHost||A&&A.domainHost)&&R===!1&&s(T.host))try{T.host=URL.domainToASCII(T.host.toLowerCase())}catch(I){T.error=T.error||"Host's domain name can not be converted to ASCII: "+I}(!A||A&&!A.skipNormalize)&&(x.indexOf("%")!==-1&&(T.scheme!==void 0&&(T.scheme=unescape(T.scheme)),T.host!==void 0&&(T.host=unescape(T.host))),T.path&&(T.path=escape(unescape(T.path))),T.fragment&&(T.fragment=encodeURI(decodeURIComponent(T.fragment)))),A&&A.parse&&A.parse(T,E)}else T.error=T.error||"URI can not be parsed.";return T}const b={SCHEMES:l,normalize:d,resolve:f,resolveComponent:p,equal:h,serialize:g,parse:_};return _d.exports=b,_d.exports.default=b,_d.exports.fastUri=b,_d.exports}var sP;function bse(){if(sP)return kp;sP=1,Object.defineProperty(kp,"__esModule",{value:!0});const e=_se();return e.code='require("ajv/dist/runtime/uri").default',kp.default=e,kp}var aP;function wse(){return aP||(aP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=gv();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=yt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=vE(),o=vv(),s=q6(),l=yE(),c=yt(),d=mv(),f=Cg(),p=kt(),h=vse,g=bse(),v=(Q,k)=>new RegExp(Q,k);v.code="new RegExp";const _=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),x={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},S={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},E=200;function T(Q){var k,G,V,D,U,X,fe,pe,xe,je,Y,re,ve,se,Se,Te,tt,rt,Be,Qe,Me,Pe,Fe,K,ne;const ae=Q.strict,Oe=(k=Q.code)===null||k===void 0?void 0:k.optimize,Ae=Oe===!0||Oe===void 0?1:Oe||0,Ie=(V=(G=Q.code)===null||G===void 0?void 0:G.regExp)!==null&&V!==void 0?V:v,ke=(D=Q.uriResolver)!==null&&D!==void 0?D:g.default;return{strictSchema:(X=(U=Q.strictSchema)!==null&&U!==void 0?U:ae)!==null&&X!==void 0?X:!0,strictNumbers:(pe=(fe=Q.strictNumbers)!==null&&fe!==void 0?fe:ae)!==null&&pe!==void 0?pe:!0,strictTypes:(je=(xe=Q.strictTypes)!==null&&xe!==void 0?xe:ae)!==null&&je!==void 0?je:"log",strictTuples:(re=(Y=Q.strictTuples)!==null&&Y!==void 0?Y:ae)!==null&&re!==void 0?re:"log",strictRequired:(se=(ve=Q.strictRequired)!==null&&ve!==void 0?ve:ae)!==null&&se!==void 0?se:!1,code:Q.code?{...Q.code,optimize:Ae,regExp:Ie}:{optimize:Ae,regExp:Ie},loopRequired:(Se=Q.loopRequired)!==null&&Se!==void 0?Se:E,loopEnum:(Te=Q.loopEnum)!==null&&Te!==void 0?Te:E,meta:(tt=Q.meta)!==null&&tt!==void 0?tt:!0,messages:(rt=Q.messages)!==null&&rt!==void 0?rt:!0,inlineRefs:(Be=Q.inlineRefs)!==null&&Be!==void 0?Be:!0,schemaId:(Qe=Q.schemaId)!==null&&Qe!==void 0?Qe:"$id",addUsedSchema:(Me=Q.addUsedSchema)!==null&&Me!==void 0?Me:!0,validateSchema:(Pe=Q.validateSchema)!==null&&Pe!==void 0?Pe:!0,validateFormats:(Fe=Q.validateFormats)!==null&&Fe!==void 0?Fe:!0,unicodeRegExp:(K=Q.unicodeRegExp)!==null&&K!==void 0?K:!0,int32range:(ne=Q.int32range)!==null&&ne!==void 0?ne:!0,uriResolver:ke}}class R{constructor(k={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,k=this.opts={...k,...T(k)};const{es5:G,lines:V}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:b,es5:G,lines:V}),this.logger=B(k.logger);const D=k.validateFormats;k.validateFormats=!1,this.RULES=(0,s.getRules)(),O.call(this,x,k,"NOT SUPPORTED"),O.call(this,S,k,"DEPRECATED","warn"),this._metaOpts=H.call(this),k.formats&&M.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),k.keywords&&L.call(this,k.keywords),typeof k.meta=="object"&&this.addMetaSchema(k.meta),I.call(this),k.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:k,meta:G,schemaId:V}=this.opts;let D=h;V==="id"&&(D={...h},D.id=D.$id,delete D.$id),G&&k&&this.addMetaSchema(D,D[V],!1)}defaultMeta(){const{meta:k,schemaId:G}=this.opts;return this.opts.defaultMeta=typeof k=="object"?k[G]||k:void 0}validate(k,G){let V;if(typeof k=="string"){if(V=this.getSchema(k),!V)throw new Error(`no schema with key or ref "${k}"`)}else V=this.compile(k);const D=V(G);return"$async"in V||(this.errors=V.errors),D}compile(k,G){const V=this._addSchema(k,G);return V.validate||this._compileSchemaEnv(V)}compileAsync(k,G){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:V}=this.opts;return D.call(this,k,G);async function D(je,Y){await U.call(this,je.$schema);const re=this._addSchema(je,Y);return re.validate||X.call(this,re)}async function U(je){je&&!this.getSchema(je)&&await D.call(this,{$ref:je},!0)}async function X(je){try{return this._compileSchemaEnv(je)}catch(Y){if(!(Y instanceof o.default))throw Y;return fe.call(this,Y),await pe.call(this,Y.missingSchema),X.call(this,je)}}function fe({missingSchema:je,missingRef:Y}){if(this.refs[je])throw new Error(`AnySchema ${je} is loaded but ${Y} cannot be resolved`)}async function pe(je){const Y=await xe.call(this,je);this.refs[je]||await U.call(this,Y.$schema),this.refs[je]||this.addSchema(Y,je,G)}async function xe(je){const Y=this._loading[je];if(Y)return Y;try{return await(this._loading[je]=V(je))}finally{delete this._loading[je]}}}addSchema(k,G,V,D=this.opts.validateSchema){if(Array.isArray(k)){for(const X of k)this.addSchema(X,void 0,V,D);return this}let U;if(typeof k=="object"){const{schemaId:X}=this.opts;if(U=k[X],U!==void 0&&typeof U!="string")throw new Error(`schema ${X} must be string`)}return G=(0,d.normalizeId)(G||U),this._checkUnique(G),this.schemas[G]=this._addSchema(k,V,G,D,!0),this}addMetaSchema(k,G,V=this.opts.validateSchema){return this.addSchema(k,G,!0,V),this}validateSchema(k,G){if(typeof k=="boolean")return!0;let V;if(V=k.$schema,V!==void 0&&typeof V!="string")throw new Error("$schema must be a string");if(V=V||this.opts.defaultMeta||this.defaultMeta(),!V)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(V,k);if(!D&&G){const U="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(U);else throw new Error(U)}return D}getSchema(k){let G;for(;typeof(G=A.call(this,k))=="string";)k=G;if(G===void 0){const{schemaId:V}=this.opts,D=new l.SchemaEnv({schema:{},schemaId:V});if(G=l.resolveSchema.call(this,D,k),!G)return;this.refs[k]=G}return G.validate||this._compileSchemaEnv(G)}removeSchema(k){if(k instanceof RegExp)return this._removeAllSchemas(this.schemas,k),this._removeAllSchemas(this.refs,k),this;switch(typeof k){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const G=A.call(this,k);return typeof G=="object"&&this._cache.delete(G.schema),delete this.schemas[k],delete this.refs[k],this}case"object":{const G=k;this._cache.delete(G);let V=k[this.opts.schemaId];return V&&(V=(0,d.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(k){for(const G of k)this.addKeyword(G);return this}addKeyword(k,G){let V;if(typeof k=="string")V=k,typeof G=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),G.keyword=V);else if(typeof k=="object"&&G===void 0){if(G=k,V=G.keyword,Array.isArray(V)&&!V.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Z.call(this,V,G),!G)return(0,p.eachItem)(V,U=>ie.call(this,U)),this;W.call(this,G);const D={...G,type:(0,f.getJSONTypes)(G.type),schemaType:(0,f.getJSONTypes)(G.schemaType)};return(0,p.eachItem)(V,D.type.length===0?U=>ie.call(this,U,D):U=>D.type.forEach(X=>ie.call(this,U,D,X))),this}getKeyword(k){const G=this.RULES.all[k];return typeof G=="object"?G.definition:!!G}removeKeyword(k){const{RULES:G}=this;delete G.keywords[k],delete G.all[k];for(const V of G.rules){const D=V.rules.findIndex(U=>U.keyword===k);D>=0&&V.rules.splice(D,1)}return this}addFormat(k,G){return typeof G=="string"&&(G=new RegExp(G)),this.formats[k]=G,this}errorsText(k=this.errors,{separator:G=", ",dataVar:V="data"}={}){return!k||k.length===0?"No errors":k.map(D=>`${V}${D.instancePath} ${D.message}`).reduce((D,U)=>D+G+U)}$dataMetaSchema(k,G){const V=this.RULES.all;k=JSON.parse(JSON.stringify(k));for(const D of G){const U=D.split("/").slice(1);let X=k;for(const fe of U)X=X[fe];for(const fe in V){const pe=V[fe];if(typeof pe!="object")continue;const{$data:xe}=pe.definition,je=X[fe];xe&&je&&(X[fe]=le(je))}}return k}_removeAllSchemas(k,G){for(const V in k){const D=k[V];(!G||G.test(V))&&(typeof D=="string"?delete k[V]:D&&!D.meta&&(this._cache.delete(D.schema),delete k[V]))}}_addSchema(k,G,V,D=this.opts.validateSchema,U=this.opts.addUsedSchema){let X;const{schemaId:fe}=this.opts;if(typeof k=="object")X=k[fe];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof k!="boolean")throw new Error("schema must be object or boolean")}let pe=this._cache.get(k);if(pe!==void 0)return pe;V=(0,d.normalizeId)(X||V);const xe=d.getSchemaRefs.call(this,k,V);return pe=new l.SchemaEnv({schema:k,schemaId:fe,meta:G,baseId:V,localRefs:xe}),this._cache.set(pe.schema,pe),U&&!V.startsWith("#")&&(V&&this._checkUnique(V),this.refs[V]=pe),D&&this.validateSchema(k,!0),pe}_checkUnique(k){if(this.schemas[k]||this.refs[k])throw new Error(`schema with key or id "${k}" already exists`)}_compileSchemaEnv(k){if(k.meta?this._compileMetaSchema(k):l.compileSchema.call(this,k),!k.validate)throw new Error("ajv implementation error");return k.validate}_compileMetaSchema(k){const G=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,k)}finally{this.opts=G}}}R.ValidationError=r.default,R.MissingRefError=o.default,e.default=R;function O(Q,k,G,V="error"){for(const D in Q){const U=D;U in k&&this.logger[V](`${G}: option ${D}. ${Q[U]}`)}}function A(Q){return Q=(0,d.normalizeId)(Q),this.schemas[Q]||this.refs[Q]}function I(){const Q=this.opts.schemas;if(Q)if(Array.isArray(Q))this.addSchema(Q);else for(const k in Q)this.addSchema(Q[k],k)}function M(){for(const Q in this.opts.formats){const k=this.opts.formats[Q];k&&this.addFormat(Q,k)}}function L(Q){if(Array.isArray(Q)){this.addVocabulary(Q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const k in Q){const G=Q[k];G.keyword||(G.keyword=k),this.addKeyword(G)}}function H(){const Q={...this.opts};for(const k of _)delete Q[k];return Q}const j={log(){},warn(){},error(){}};function B(Q){if(Q===!1)return j;if(Q===void 0)return console;if(Q.log&&Q.warn&&Q.error)return Q;throw new Error("logger must implement log, warn and error methods")}const F=/^[a-z_$][a-z0-9_$:-]*$/i;function Z(Q,k){const{RULES:G}=this;if((0,p.eachItem)(Q,V=>{if(G.keywords[V])throw new Error(`Keyword ${V} is already defined`);if(!F.test(V))throw new Error(`Keyword ${V} has invalid name`)}),!!k&&k.$data&&!("code"in k||"validate"in k))throw new Error('$data keyword must have "code" or "validate" function')}function ie(Q,k,G){var V;const D=k?.post;if(G&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:U}=this;let X=D?U.post:U.rules.find(({type:pe})=>pe===G);if(X||(X={type:G,rules:[]},U.rules.push(X)),U.keywords[Q]=!0,!k)return;const fe={keyword:Q,definition:{...k,type:(0,f.getJSONTypes)(k.type),schemaType:(0,f.getJSONTypes)(k.schemaType)}};k.before?q.call(this,X,fe,k.before):X.rules.push(fe),U.all[Q]=fe,(V=k.implements)===null||V===void 0||V.forEach(pe=>this.addKeyword(pe))}function q(Q,k,G){const V=Q.rules.findIndex(D=>D.keyword===G);V>=0?Q.rules.splice(V,0,k):(Q.rules.push(k),this.logger.warn(`rule ${G} is not defined`))}function W(Q){let{metaSchema:k}=Q;k!==void 0&&(Q.$data&&this.opts.$data&&(k=le(k)),Q.validateSchema=this.compile(k,!0))}const te={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function le(Q){return{anyOf:[Q,te]}}})(gb)),gb}var Dp={},Lp={},$p={},lP;function Sse(){if(lP)return $p;lP=1,Object.defineProperty($p,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return $p.default=e,$p}var Xs={},cP;function Ese(){if(cP)return Xs;cP=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.callRef=Xs.getValidate=void 0;const e=vv(),t=ci(),n=yt(),r=Ea(),o=yE(),s=kt(),l={keyword:"$ref",schemaType:"string",code(f){const{gen:p,schema:h,it:g}=f,{baseId:v,schemaEnv:_,validateName:b,opts:x,self:S}=g,{root:E}=_;if((h==="#"||h==="#/")&&v===E.baseId)return R();const T=o.resolveRef.call(S,E,v,h);if(T===void 0)throw new e.default(g.opts.uriResolver,v,h);if(T instanceof o.SchemaEnv)return O(T);return A(T);function R(){if(_===E)return d(f,b,_,_.$async);const I=p.scopeValue("root",{ref:E});return d(f,(0,n._)`${I}.validate`,E,E.$async)}function O(I){const M=c(f,I);d(f,M,I,I.$async)}function A(I){const M=p.scopeValue("schema",x.code.source===!0?{ref:I,code:(0,n.stringify)(I)}:{ref:I}),L=p.name("valid"),H=f.subschema({schema:I,dataTypes:[],schemaPath:n.nil,topSchemaRef:M,errSchemaPath:h},L);f.mergeEvaluated(H),f.ok(L)}}};function c(f,p){const{gen:h}=f;return p.validate?h.scopeValue("validate",{ref:p.validate}):(0,n._)`${h.scopeValue("wrapper",{ref:p})}.validate`}Xs.getValidate=c;function d(f,p,h,g){const{gen:v,it:_}=f,{allErrors:b,schemaEnv:x,opts:S}=_,E=S.passContext?r.default.this:n.nil;g?T():R();function T(){if(!x.$async)throw new Error("async schema referenced by sync schema");const I=v.let("valid");v.try(()=>{v.code((0,n._)`await ${(0,t.callValidateCode)(f,p,E)}`),A(p),b||v.assign(I,!0)},M=>{v.if((0,n._)`!(${M} instanceof ${_.ValidationError})`,()=>v.throw(M)),O(M),b||v.assign(I,!1)}),f.ok(I)}function R(){f.result((0,t.callValidateCode)(f,p,E),()=>A(p),()=>O(p))}function O(I){const M=(0,n._)`${I}.errors`;v.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${M} : ${r.default.vErrors}.concat(${M})`),v.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function A(I){var M;if(!_.opts.unevaluated)return;const L=(M=h?.validate)===null||M===void 0?void 0:M.evaluated;if(_.props!==!0)if(L&&!L.dynamicProps)L.props!==void 0&&(_.props=s.mergeEvaluated.props(v,L.props,_.props));else{const H=v.var("props",(0,n._)`${I}.evaluated.props`);_.props=s.mergeEvaluated.props(v,H,_.props,n.Name)}if(_.items!==!0)if(L&&!L.dynamicItems)L.items!==void 0&&(_.items=s.mergeEvaluated.items(v,L.items,_.items));else{const H=v.var("items",(0,n._)`${I}.evaluated.items`);_.items=s.mergeEvaluated.items(v,H,_.items,n.Name)}}}return Xs.callRef=d,Xs.default=l,Xs}var uP;function xse(){if(uP)return Lp;uP=1,Object.defineProperty(Lp,"__esModule",{value:!0});const e=Sse(),t=Ese(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Lp.default=n,Lp}var jp={},zp={},dP;function Rse(){if(dP)return zp;dP=1,Object.defineProperty(zp,"__esModule",{value:!0});const e=yt(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:s,schemaCode:l})=>(0,e.str)`must be ${n[s].okStr} ${l}`,params:({keyword:s,schemaCode:l})=>(0,e._)`{comparison: ${n[s].okStr}, limit: ${l}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:c,schemaCode:d}=s;s.fail$data((0,e._)`${c} ${n[l].fail} ${d} || isNaN(${c})`)}};return zp.default=o,zp}var Up={},fP;function Ose(){if(fP)return Up;fP=1,Object.defineProperty(Up,"__esModule",{value:!0});const e=yt(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:o,data:s,schemaCode:l,it:c}=r,d=c.opts.multipleOfPrecision,f=o.let("res"),p=d?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${d}`:(0,e._)`${f} !== parseInt(${f})`;r.fail$data((0,e._)`(${l} === 0 || (${f} = ${s}/${l}, ${p}))`)}};return Up.default=n,Up}var Fp={},Bp={},hP;function Tse(){if(hP)return Bp;hP=1,Object.defineProperty(Bp,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,o=0,s;for(;o<n;)r++,s=t.charCodeAt(o++),s>=55296&&s<=56319&&o<n&&(s=t.charCodeAt(o),(s&64512)===56320&&o++);return r}return Bp.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Bp}var pP;function Cse(){if(pP)return Fp;pP=1,Object.defineProperty(Fp,"__esModule",{value:!0});const e=yt(),t=kt(),n=Tse(),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:l}){const c=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${l} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:l,data:c,schemaCode:d,it:f}=s,p=l==="maxLength"?e.operators.GT:e.operators.LT,h=f.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,t.useFunc)(s.gen,n.default)}(${c})`;s.fail$data((0,e._)`${h} ${p} ${d}`)}};return Fp.default=o,Fp}var Vp={},mP;function Ase(){if(mP)return Vp;mP=1,Object.defineProperty(Vp,"__esModule",{value:!0});const e=ci(),t=kt(),n=yt(),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>(0,n.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,n._)`{pattern: ${s}}`},code(s){const{gen:l,data:c,$data:d,schema:f,schemaCode:p,it:h}=s,g=h.opts.unicodeRegExp?"u":"";if(d){const{regExp:v}=h.opts.code,_=v.code==="new RegExp"?(0,n._)`new RegExp`:(0,t.useFunc)(l,v),b=l.let("valid");l.try(()=>l.assign(b,(0,n._)`${_}(${p}, ${g}).test(${c})`),()=>l.assign(b,!1)),s.fail$data((0,n._)`!${b}`)}else{const v=(0,e.usePattern)(s,f);s.fail$data((0,n._)`!${v}.test(${c})`)}}};return Vp.default=o,Vp}var Hp={},gP;function Ise(){if(gP)return Hp;gP=1,Object.defineProperty(Hp,"__esModule",{value:!0});const e=yt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:o}){const s=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:o,data:s,schemaCode:l}=r,c=o==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${s}).length ${c} ${l}`)}};return Hp.default=n,Hp}var qp={},vP;function Pse(){if(vP)return qp;vP=1,Object.defineProperty(qp,"__esModule",{value:!0});const e=ci(),t=yt(),n=kt(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:l,schema:c,schemaCode:d,data:f,$data:p,it:h}=s,{opts:g}=h;if(!p&&c.length===0)return;const v=c.length>=g.loopRequired;if(h.allErrors?_():b(),g.strictRequired){const E=s.parentSchema.properties,{definedProperties:T}=s.it;for(const R of c)if(E?.[R]===void 0&&!T.has(R)){const O=h.schemaEnv.baseId+h.errSchemaPath,A=`required property "${R}" is not defined at "${O}" (strictRequired)`;(0,n.checkStrictMode)(h,A,h.opts.strictRequired)}}function _(){if(v||p)s.block$data(t.nil,x);else for(const E of c)(0,e.checkReportMissingProp)(s,E)}function b(){const E=l.let("missing");if(v||p){const T=l.let("valid",!0);s.block$data(T,()=>S(E,T)),s.ok(T)}else l.if((0,e.checkMissingProp)(s,c,E)),(0,e.reportMissingProp)(s,E),l.else()}function x(){l.forOf("prop",d,E=>{s.setParams({missingProperty:E}),l.if((0,e.noPropertyInData)(l,f,E,g.ownProperties),()=>s.error())})}function S(E,T){s.setParams({missingProperty:E}),l.forOf(E,d,()=>{l.assign(T,(0,e.propertyInData)(l,f,E,g.ownProperties)),l.if((0,t.not)(T),()=>{s.error(),l.break()})},t.nil)}}};return qp.default=o,qp}var Gp={},yP;function Mse(){if(yP)return Gp;yP=1,Object.defineProperty(Gp,"__esModule",{value:!0});const e=yt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:o}){const s=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:o,data:s,schemaCode:l}=r,c=o==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${s}.length ${c} ${l}`)}};return Gp.default=n,Gp}var Kp={},Zp={},_P;function _E(){if(_P)return Zp;_P=1,Object.defineProperty(Zp,"__esModule",{value:!0});const e=K6();return e.code='require("ajv/dist/runtime/equal").default',Zp.default=e,Zp}var bP;function Nse(){if(bP)return Kp;bP=1,Object.defineProperty(Kp,"__esModule",{value:!0});const e=Cg(),t=yt(),n=kt(),r=_E(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:c}})=>(0,t.str)`must NOT have duplicate items (items ## ${c} and ${l} are identical)`,params:({params:{i:l,j:c}})=>(0,t._)`{i: ${l}, j: ${c}}`},code(l){const{gen:c,data:d,$data:f,schema:p,parentSchema:h,schemaCode:g,it:v}=l;if(!f&&!p)return;const _=c.let("valid"),b=h.items?(0,e.getSchemaTypes)(h.items):[];l.block$data(_,x,(0,t._)`${g} === false`),l.ok(_);function x(){const R=c.let("i",(0,t._)`${d}.length`),O=c.let("j");l.setParams({i:R,j:O}),c.assign(_,!0),c.if((0,t._)`${R} > 1`,()=>(S()?E:T)(R,O))}function S(){return b.length>0&&!b.some(R=>R==="object"||R==="array")}function E(R,O){const A=c.name("item"),I=(0,e.checkDataTypes)(b,A,v.opts.strictNumbers,e.DataType.Wrong),M=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${R}--;`,()=>{c.let(A,(0,t._)`${d}[${R}]`),c.if(I,(0,t._)`continue`),b.length>1&&c.if((0,t._)`typeof ${A} == "string"`,(0,t._)`${A} += "_"`),c.if((0,t._)`typeof ${M}[${A}] == "number"`,()=>{c.assign(O,(0,t._)`${M}[${A}]`),l.error(),c.assign(_,!1).break()}).code((0,t._)`${M}[${A}] = ${R}`)})}function T(R,O){const A=(0,n.useFunc)(c,r.default),I=c.name("outer");c.label(I).for((0,t._)`;${R}--;`,()=>c.for((0,t._)`${O} = ${R}; ${O}--;`,()=>c.if((0,t._)`${A}(${d}[${R}], ${d}[${O}])`,()=>{l.error(),c.assign(_,!1).break(I)})))}}};return Kp.default=s,Kp}var Yp={},wP;function kse(){if(wP)return Yp;wP=1,Object.defineProperty(Yp,"__esModule",{value:!0});const e=yt(),t=kt(),n=_E(),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:l,data:c,$data:d,schemaCode:f,schema:p}=s;d||p&&typeof p=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(l,n.default)}(${c}, ${f})`):s.fail((0,e._)`${p} !== ${c}`)}};return Yp.default=o,Yp}var Wp={},SP;function Dse(){if(SP)return Wp;SP=1,Object.defineProperty(Wp,"__esModule",{value:!0});const e=yt(),t=kt(),n=_E(),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:l,data:c,$data:d,schema:f,schemaCode:p,it:h}=s;if(!d&&f.length===0)throw new Error("enum must have non-empty array");const g=f.length>=h.opts.loopEnum;let v;const _=()=>v??(v=(0,t.useFunc)(l,n.default));let b;if(g||d)b=l.let("valid"),s.block$data(b,x);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const E=l.const("vSchema",p);b=(0,e.or)(...f.map((T,R)=>S(E,R)))}s.pass(b);function x(){l.assign(b,!1),l.forOf("v",p,E=>l.if((0,e._)`${_()}(${c}, ${E})`,()=>l.assign(b,!0).break()))}function S(E,T){const R=f[T];return typeof R=="object"&&R!==null?(0,e._)`${_()}(${c}, ${E}[${T}])`:(0,e._)`${c} === ${R}`}}};return Wp.default=o,Wp}var EP;function Lse(){if(EP)return jp;EP=1,Object.defineProperty(jp,"__esModule",{value:!0});const e=Rse(),t=Ose(),n=Cse(),r=Ase(),o=Ise(),s=Pse(),l=Mse(),c=Nse(),d=kse(),f=Dse(),p=[e.default,t.default,n.default,r.default,o.default,s.default,l.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];return jp.default=p,jp}var Qp={},_c={},xP;function Y6(){if(xP)return _c;xP=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.validateAdditionalItems=void 0;const e=yt(),t=kt(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:l,it:c}=s,{items:d}=l;if(!Array.isArray(d)){(0,t.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(s,d)}};function o(s,l){const{gen:c,schema:d,data:f,keyword:p,it:h}=s;h.items=!0;const g=c.const("len",(0,e._)`${f}.length`);if(d===!1)s.setParams({len:l.length}),s.pass((0,e._)`${g} <= ${l.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(h,d)){const _=c.var("valid",(0,e._)`${g} <= ${l.length}`);c.if((0,e.not)(_),()=>v(_)),s.ok(_)}function v(_){c.forRange("i",l.length,g,b=>{s.subschema({keyword:p,dataProp:b,dataPropType:t.Type.Num},_),h.allErrors||c.if((0,e.not)(_),()=>c.break())})}}return _c.validateAdditionalItems=o,_c.default=r,_c}var Xp={},bc={},RP;function W6(){if(RP)return bc;RP=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.validateTuple=void 0;const e=yt(),t=kt(),n=ci(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:l,it:c}=s;if(Array.isArray(l))return o(s,"additionalItems",l);c.items=!0,!(0,t.alwaysValidSchema)(c,l)&&s.ok((0,n.validateArray)(s))}};function o(s,l,c=s.schema){const{gen:d,parentSchema:f,data:p,keyword:h,it:g}=s;b(f),g.opts.unevaluated&&c.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(d,c.length,g.items));const v=d.name("valid"),_=d.const("len",(0,e._)`${p}.length`);c.forEach((x,S)=>{(0,t.alwaysValidSchema)(g,x)||(d.if((0,e._)`${_} > ${S}`,()=>s.subschema({keyword:h,schemaProp:S,dataProp:S},v)),s.ok(v))});function b(x){const{opts:S,errSchemaPath:E}=g,T=c.length,R=T===x.minItems&&(T===x.maxItems||x[l]===!1);if(S.strictTuples&&!R){const O=`"${h}" is ${T}-tuple, but minItems or maxItems/${l} are not specified or different at path "${E}"`;(0,t.checkStrictMode)(g,O,S.strictTuples)}}}return bc.validateTuple=o,bc.default=r,bc}var OP;function $se(){if(OP)return Xp;OP=1,Object.defineProperty(Xp,"__esModule",{value:!0});const e=W6(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Xp.default=t,Xp}var Jp={},TP;function jse(){if(TP)return Jp;TP=1,Object.defineProperty(Jp,"__esModule",{value:!0});const e=yt(),t=kt(),n=ci(),r=Y6(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{schema:c,parentSchema:d,it:f}=l,{prefixItems:p}=d;f.items=!0,!(0,t.alwaysValidSchema)(f,c)&&(p?(0,r.validateAdditionalItems)(l,p):l.ok((0,n.validateArray)(l)))}};return Jp.default=s,Jp}var em={},CP;function zse(){if(CP)return em;CP=1,Object.defineProperty(em,"__esModule",{value:!0});const e=yt(),t=kt(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:o,max:s}})=>s===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${s} valid item(s)`,params:({params:{min:o,max:s}})=>s===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${s}}`},code(o){const{gen:s,schema:l,parentSchema:c,data:d,it:f}=o;let p,h;const{minContains:g,maxContains:v}=c;f.opts.next?(p=g===void 0?1:g,h=v):p=1;const _=s.const("len",(0,e._)`${d}.length`);if(o.setParams({min:p,max:h}),h===void 0&&p===0){(0,t.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&p>h){(0,t.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,t.alwaysValidSchema)(f,l)){let T=(0,e._)`${_} >= ${p}`;h!==void 0&&(T=(0,e._)`${T} && ${_} <= ${h}`),o.pass(T);return}f.items=!0;const b=s.name("valid");h===void 0&&p===1?S(b,()=>s.if(b,()=>s.break())):p===0?(s.let(b,!0),h!==void 0&&s.if((0,e._)`${d}.length > 0`,x)):(s.let(b,!1),x()),o.result(b,()=>o.reset());function x(){const T=s.name("_valid"),R=s.let("count",0);S(T,()=>s.if(T,()=>E(R)))}function S(T,R){s.forRange("i",0,_,O=>{o.subschema({keyword:"contains",dataProp:O,dataPropType:t.Type.Num,compositeRule:!0},T),R()})}function E(T){s.code((0,e._)`${T}++`),h===void 0?s.if((0,e._)`${T} >= ${p}`,()=>s.assign(b,!0).break()):(s.if((0,e._)`${T} > ${h}`,()=>s.assign(b,!1).break()),p===1?s.assign(b,!0):s.if((0,e._)`${T} >= ${p}`,()=>s.assign(b,!0)))}}};return em.default=r,em}var Rb={},AP;function Use(){return AP||(AP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=yt(),n=kt(),r=ci();e.error={message:({params:{property:d,depsCount:f,deps:p}})=>{const h=f===1?"property":"properties";return(0,t.str)`must have ${h} ${p} when property ${d} is present`},params:({params:{property:d,depsCount:f,deps:p,missingProperty:h}})=>(0,t._)`{property: ${d},
|
|
161
161
|
missingProperty: ${h},
|
|
162
162
|
depsCount: ${f},
|
|
163
|
-
deps: ${p}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[f,p]=s(d);l(d,f),c(d,p)}};function s({schema:d}){const f={},p={};for(const h in d){if(h==="__proto__")continue;const g=Array.isArray(d[h])?f:p;g[h]=d[h]}return[f,p]}function l(d,f=d.schema){const{gen:p,data:h,it:g}=d;if(Object.keys(f).length===0)return;const v=p.let("missing");for(const _ in f){const b=f[_];if(b.length===0)continue;const x=(0,r.propertyInData)(p,h,_,g.opts.ownProperties);d.setParams({property:_,depsCount:b.length,deps:b.join(", ")}),g.allErrors?p.if(x,()=>{for(const S of b)(0,r.checkReportMissingProp)(d,S)}):(p.if((0,t._)`${x} && (${(0,r.checkMissingProp)(d,b,v)})`),(0,r.reportMissingProp)(d,v),p.else())}}e.validatePropertyDeps=l;function c(d,f=d.schema){const{gen:p,data:h,keyword:g,it:v}=d,_=p.name("valid");for(const b in f)(0,n.alwaysValidSchema)(v,f[b])||(p.if((0,r.propertyInData)(p,h,b,v.opts.ownProperties),()=>{const x=d.subschema({keyword:g,schemaProp:b},_);d.mergeValidEvaluated(x,_)},()=>p.var(_,!0)),d.ok(_))}e.validateSchemaDeps=c,e.default=o})(Rb)),Rb}var tm={},IP;function Fse(){if(IP)return tm;IP=1,Object.defineProperty(tm,"__esModule",{value:!0});const e=yt(),t=kt(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:l,data:c,it:d}=o;if((0,t.alwaysValidSchema)(d,l))return;const f=s.name("valid");s.forIn("key",c,p=>{o.setParams({propertyName:p}),o.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:!0},f),s.if((0,e.not)(f),()=>{o.error(!0),d.allErrors||s.break()})}),o.ok(f)}};return tm.default=r,tm}var nm={},PP;function Q6(){if(PP)return nm;PP=1,Object.defineProperty(nm,"__esModule",{value:!0});const e=ci(),t=yt(),n=Ea(),r=kt(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:c,schema:d,parentSchema:f,data:p,errsCount:h,it:g}=l;if(!h)throw new Error("ajv implementation error");const{allErrors:v,opts:_}=g;if(g.props=!0,_.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,d))return;const b=(0,e.allSchemaProperties)(f.properties),x=(0,e.allSchemaProperties)(f.patternProperties);S(),l.ok((0,t._)`${h} === ${n.default.errors}`);function S(){c.forIn("key",p,A=>{!b.length&&!x.length?R(A):c.if(E(A),()=>R(A))})}function E(A){let I;if(b.length>8){const M=(0,r.schemaRefOrVal)(g,f.properties,"properties");I=(0,e.isOwnProperty)(c,M,A)}else b.length?I=(0,t.or)(...b.map(M=>(0,t._)`${A} === ${M}`)):I=t.nil;return x.length&&(I=(0,t.or)(I,...x.map(M=>(0,t._)`${(0,e.usePattern)(l,M)}.test(${A})`))),(0,t.not)(I)}function T(A){c.code((0,t._)`delete ${p}[${A}]`)}function R(A){if(_.removeAdditional==="all"||_.removeAdditional&&d===!1){T(A);return}if(d===!1){l.setParams({additionalProperty:A}),l.error(),v||c.break();return}if(typeof d=="object"&&!(0,r.alwaysValidSchema)(g,d)){const I=c.name("valid");_.removeAdditional==="failing"?(O(A,I,!1),c.if((0,t.not)(I),()=>{l.reset(),T(A)})):(O(A,I),v||c.if((0,t.not)(I),()=>c.break()))}}function O(A,I,M){const L={keyword:"additionalProperties",dataProp:A,dataPropType:r.Type.Str};M===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(L,I)}}};return nm.default=s,nm}var rm={},MP;function Bse(){if(MP)return rm;MP=1,Object.defineProperty(rm,"__esModule",{value:!0});const e=gv(),t=ci(),n=kt(),r=Q6(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,parentSchema:d,data:f,it:p}=s;p.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(p,r.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(c);for(const x of h)p.definedProperties.add(x);p.opts.unevaluated&&h.length&&p.props!==!0&&(p.props=n.mergeEvaluated.props(l,(0,n.toHash)(h),p.props));const g=h.filter(x=>!(0,n.alwaysValidSchema)(p,c[x]));if(g.length===0)return;const v=l.name("valid");for(const x of g)_(x)?b(x):(l.if((0,t.propertyInData)(l,f,x,p.opts.ownProperties)),b(x),p.allErrors||l.else().var(v,!0),l.endIf()),s.it.definedProperties.add(x),s.ok(v);function _(x){return p.opts.useDefaults&&!p.compositeRule&&c[x].default!==void 0}function b(x){s.subschema({keyword:"properties",schemaProp:x,dataProp:x},v)}}};return rm.default=o,rm}var om={},NP;function Vse(){if(NP)return om;NP=1,Object.defineProperty(om,"__esModule",{value:!0});const e=ci(),t=yt(),n=kt(),r=kt(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,data:d,parentSchema:f,it:p}=s,{opts:h}=p,g=(0,e.allSchemaProperties)(c),v=g.filter(R=>(0,n.alwaysValidSchema)(p,c[R]));if(g.length===0||v.length===g.length&&(!p.opts.unevaluated||p.props===!0))return;const _=h.strictSchema&&!h.allowMatchingProperties&&f.properties,b=l.name("valid");p.props!==!0&&!(p.props instanceof t.Name)&&(p.props=(0,r.evaluatedPropsToName)(l,p.props));const{props:x}=p;S();function S(){for(const R of g)_&&E(R),p.allErrors?T(R):(l.var(b,!0),T(R),l.if(b))}function E(R){for(const O in _)new RegExp(R).test(O)&&(0,n.checkStrictMode)(p,`property ${O} matches pattern ${R} (use allowMatchingProperties)`)}function T(R){l.forIn("key",d,O=>{l.if((0,t._)`${(0,e.usePattern)(s,R)}.test(${O})`,()=>{const A=v.includes(R);A||s.subschema({keyword:"patternProperties",schemaProp:R,dataProp:O,dataPropType:r.Type.Str},b),p.opts.unevaluated&&x!==!0?l.assign((0,t._)`${x}[${O}]`,!0):!A&&!p.allErrors&&l.if((0,t.not)(b),()=>l.break())})})}}};return om.default=o,om}var im={},kP;function Hse(){if(kP)return im;kP=1,Object.defineProperty(im,"__esModule",{value:!0});const e=kt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:o,it:s}=n;if((0,e.alwaysValidSchema)(s,o)){n.fail();return}const l=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),n.failResult(l,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return im.default=t,im}var sm={},DP;function qse(){if(DP)return sm;DP=1,Object.defineProperty(sm,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ci().validateUnion,error:{message:"must match a schema in anyOf"}};return sm.default=t,sm}var am={},LP;function Gse(){if(LP)return am;LP=1,Object.defineProperty(am,"__esModule",{value:!0});const e=yt(),t=kt(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:l,parentSchema:c,it:d}=o;if(!Array.isArray(l))throw new Error("ajv implementation error");if(d.opts.discriminator&&c.discriminator)return;const f=l,p=s.let("valid",!1),h=s.let("passing",null),g=s.name("_valid");o.setParams({passing:h}),s.block(v),o.result(p,()=>o.reset(),()=>o.error(!0));function v(){f.forEach((_,b)=>{let x;(0,t.alwaysValidSchema)(d,_)?s.var(g,!0):x=o.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},g),b>0&&s.if((0,e._)`${g} && ${p}`).assign(p,!1).assign(h,(0,e._)`[${h}, ${b}]`).else(),s.if(g,()=>{s.assign(p,!0),s.assign(h,b),x&&o.mergeEvaluated(x,e.Name)})})}}};return am.default=r,am}var lm={},$P;function Kse(){if($P)return lm;$P=1,Object.defineProperty(lm,"__esModule",{value:!0});const e=kt(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:o,it:s}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const l=r.name("valid");o.forEach((c,d)=>{if((0,e.alwaysValidSchema)(s,c))return;const f=n.subschema({keyword:"allOf",schemaProp:d},l);n.ok(l),n.mergeEvaluated(f)})}};return lm.default=t,lm}var cm={},jP;function Zse(){if(jP)return cm;jP=1,Object.defineProperty(cm,"__esModule",{value:!0});const e=yt(),t=kt(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:c,it:d}=s;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const f=o(d,"then"),p=o(d,"else");if(!f&&!p)return;const h=l.let("valid",!0),g=l.name("_valid");if(v(),s.reset(),f&&p){const b=l.let("ifClause");s.setParams({ifClause:b}),l.if(g,_("then",b),_("else",b))}else f?l.if(g,_("then")):l.if((0,e.not)(g),_("else"));s.pass(h,()=>s.error(!0));function v(){const b=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);s.mergeEvaluated(b)}function _(b,x){return()=>{const S=s.subschema({keyword:b},g);l.assign(h,g),s.mergeValidEvaluated(S,h),x?l.assign(x,(0,e._)`${b}`):s.setParams({ifClause:b})}}}};function o(s,l){const c=s.schema[l];return c!==void 0&&!(0,t.alwaysValidSchema)(s,c)}return cm.default=r,cm}var um={},zP;function Yse(){if(zP)return um;zP=1,Object.defineProperty(um,"__esModule",{value:!0});const e=kt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:o}){r.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};return um.default=t,um}var UP;function Wse(){if(UP)return Qp;UP=1,Object.defineProperty(Qp,"__esModule",{value:!0});const e=Y6(),t=$se(),n=W6(),r=jse(),o=zse(),s=Use(),l=Fse(),c=Q6(),d=Bse(),f=Vse(),p=Hse(),h=qse(),g=Gse(),v=Kse(),_=Zse(),b=Yse();function x(S=!1){const E=[p.default,h.default,g.default,v.default,_.default,b.default,l.default,c.default,s.default,d.default,f.default];return S?E.push(t.default,r.default):E.push(e.default,n.default),E.push(o.default),E}return Qp.default=x,Qp}var dm={},fm={},FP;function Qse(){if(FP)return fm;FP=1,Object.defineProperty(fm,"__esModule",{value:!0});const e=yt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,o){const{gen:s,data:l,$data:c,schema:d,schemaCode:f,it:p}=r,{opts:h,errSchemaPath:g,schemaEnv:v,self:_}=p;if(!h.validateFormats)return;c?b():x();function b(){const S=s.scopeValue("formats",{ref:_.formats,code:h.code.formats}),E=s.const("fDef",(0,e._)`${S}[${f}]`),T=s.let("fType"),R=s.let("format");s.if((0,e._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>s.assign(T,(0,e._)`${E}.type || "string"`).assign(R,(0,e._)`${E}.validate`),()=>s.assign(T,(0,e._)`"string"`).assign(R,E)),r.fail$data((0,e.or)(O(),A()));function O(){return h.strictSchema===!1?e.nil:(0,e._)`${f} && !${R}`}function A(){const I=v.$async?(0,e._)`(${E}.async ? await ${R}(${l}) : ${R}(${l}))`:(0,e._)`${R}(${l})`,M=(0,e._)`(typeof ${R} == "function" ? ${I} : ${R}.test(${l}))`;return(0,e._)`${R} && ${R} !== true && ${T} === ${o} && !${M}`}}function x(){const S=_.formats[d];if(!S){O();return}if(S===!0)return;const[E,T,R]=A(S);E===o&&r.pass(I());function O(){if(h.strictSchema===!1){_.logger.warn(M());return}throw new Error(M());function M(){return`unknown format "${d}" ignored in schema at path "${g}"`}}function A(M){const L=M instanceof RegExp?(0,e.regexpCode)(M):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(d)}`:void 0,H=s.scopeValue("formats",{key:d,ref:M,code:L});return typeof M=="object"&&!(M instanceof RegExp)?[M.type||"string",M.validate,(0,e._)`${H}.validate`]:["string",M,H]}function I(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${R}(${l})`}return typeof T=="function"?(0,e._)`${R}(${l})`:(0,e._)`${R}.test(${l})`}}}};return fm.default=n,fm}var BP;function Xse(){if(BP)return dm;BP=1,Object.defineProperty(dm,"__esModule",{value:!0});const t=[Qse().default];return dm.default=t,dm}var Qa={},VP;function Jse(){return VP||(VP=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.contentVocabulary=Qa.metadataVocabulary=void 0,Qa.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Qa.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Qa}var HP;function eae(){if(HP)return Dp;HP=1,Object.defineProperty(Dp,"__esModule",{value:!0});const e=xse(),t=Lse(),n=Wse(),r=Xse(),o=Jse(),s=[e.default,t.default,(0,n.default)(),r.default,o.metadataVocabulary,o.contentVocabulary];return Dp.default=s,Dp}var hm={},bd={},qP;function tae(){if(qP)return bd;qP=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(bd.DiscrError=e={})),bd}var GP;function nae(){if(GP)return hm;GP=1,Object.defineProperty(hm,"__esModule",{value:!0});const e=yt(),t=tae(),n=yE(),r=vv(),o=kt(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:d}})=>c===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:c,tag:d,tagName:f}})=>(0,e._)`{error: ${c}, tag: ${f}, tagValue: ${d}}`},code(c){const{gen:d,data:f,schema:p,parentSchema:h,it:g}=c,{oneOf:v}=h;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const _=p.propertyName;if(typeof _!="string")throw new Error("discriminator: requires propertyName");if(p.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const b=d.let("valid",!1),x=d.const("tag",(0,e._)`${f}${(0,e.getProperty)(_)}`);d.if((0,e._)`typeof ${x} == "string"`,()=>S(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:x,tagName:_})),c.ok(b);function S(){const R=T();d.if(!1);for(const O in R)d.elseIf((0,e._)`${x} === ${O}`),d.assign(b,E(R[O]));d.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:x,tagName:_}),d.endIf()}function E(R){const O=d.name("valid"),A=c.subschema({keyword:"oneOf",schemaProp:R},O);return c.mergeEvaluated(A,e.Name),O}function T(){var R;const O={},A=M(h);let I=!0;for(let j=0;j<v.length;j++){let B=v[j];if(B?.$ref&&!(0,o.schemaHasRulesButRef)(B,g.self.RULES)){const Z=B.$ref;if(B=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,Z),B instanceof n.SchemaEnv&&(B=B.schema),B===void 0)throw new r.default(g.opts.uriResolver,g.baseId,Z)}const F=(R=B?.properties)===null||R===void 0?void 0:R[_];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${_}"`);I=I&&(A||M(B)),L(F,j)}if(!I)throw new Error(`discriminator: "${_}" must be required`);return O;function M({required:j}){return Array.isArray(j)&&j.includes(_)}function L(j,B){if(j.const)H(j.const,B);else if(j.enum)for(const F of j.enum)H(F,B);else throw new Error(`discriminator: "properties/${_}" must have "const" or "enum"`)}function H(j,B){if(typeof j!="string"||j in O)throw new Error(`discriminator: "${_}" values must be unique strings`);O[j]=B}}}};return hm.default=l,hm}const rae="http://json-schema.org/draft-07/schema#",oae="http://json-schema.org/draft-07/schema#",iae="Core schema meta-schema",sae={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},aae=["object","boolean"],lae={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},cae={$schema:rae,$id:oae,title:iae,definitions:sae,type:aae,properties:lae,default:!0};var KP;function uae(){return KP||(KP=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=wse(),r=eae(),o=nae(),s=cae,l=["/properties"],c="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(s,l):s;this.addMetaSchema(_,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var f=gv();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var p=yt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var h=vE();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var g=vv();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(Ip,Ip.exports)),Ip.exports}var pm={exports:{}},Ob={},ZP;function dae(){return ZP||(ZP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(j,B){return{validate:j,compare:B}}e.fullFormats={date:t(s,l),time:t(d(!0),f),"date-time":t(g(!0),v),"iso-time":t(d(),p),"iso-date-time":t(g(),_),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:S,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:H,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:T,int32:{type:"number",validate:A},int64:{type:"number",validate:I},float:{type:"number",validate:M},double:{type:"number",validate:M},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,p),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,_),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(j){return j%4===0&&(j%100!==0||j%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(j){const B=r.exec(j);if(!B)return!1;const F=+B[1],Z=+B[2],ie=+B[3];return Z>=1&&Z<=12&&ie>=1&&ie<=(Z===2&&n(F)?29:o[Z])}function l(j,B){if(j&&B)return j>B?1:j<B?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(j){return function(F){const Z=c.exec(F);if(!Z)return!1;const ie=+Z[1],q=+Z[2],W=+Z[3],te=Z[4],le=Z[5]==="-"?-1:1,Q=+(Z[6]||0),k=+(Z[7]||0);if(Q>23||k>59||j&&!te)return!1;if(ie<=23&&q<=59&&W<60)return!0;const G=q-k*le,V=ie-Q*le-(G<0?1:0);return(V===23||V===-1)&&(G===59||G===-1)&&W<61}}function f(j,B){if(!(j&&B))return;const F=new Date("2020-01-01T"+j).valueOf(),Z=new Date("2020-01-01T"+B).valueOf();if(F&&Z)return F-Z}function p(j,B){if(!(j&&B))return;const F=c.exec(j),Z=c.exec(B);if(F&&Z)return j=F[1]+F[2]+F[3],B=Z[1]+Z[2]+Z[3],j>B?1:j<B?-1:0}const h=/t|\s/i;function g(j){const B=d(j);return function(Z){const ie=Z.split(h);return ie.length===2&&s(ie[0])&&B(ie[1])}}function v(j,B){if(!(j&&B))return;const F=new Date(j).valueOf(),Z=new Date(B).valueOf();if(F&&Z)return F-Z}function _(j,B){if(!(j&&B))return;const[F,Z]=j.split(h),[ie,q]=B.split(h),W=l(F,ie);if(W!==void 0)return W||f(Z,q)}const b=/\/|:/,x=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function S(j){return b.test(j)&&x.test(j)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(j){return E.lastIndex=0,E.test(j)}const R=-2147483648,O=2**31-1;function A(j){return Number.isInteger(j)&&j<=O&&j>=R}function I(j){return Number.isInteger(j)}function M(){return!0}const L=/[^\\]\\Z/;function H(j){if(L.test(j))return!1;try{return new RegExp(j),!0}catch{return!1}}})(Ob)),Ob}var Tb={},YP;function fae(){return YP||(YP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=uae(),n=yt(),r=n.operators,o={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:c,schemaCode:d})=>(0,n.str)`should be ${o[c].okStr} ${d}`,params:({keyword:c,schemaCode:d})=>(0,n._)`{comparison: ${o[c].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:d,data:f,schemaCode:p,keyword:h,it:g}=c,{opts:v,self:_}=g;if(!v.validateFormats)return;const b=new t.KeywordCxt(g,_.RULES.all.format.definition,"format");b.$data?x():S();function x(){const T=d.scopeValue("formats",{ref:_.formats,code:v.code.formats}),R=d.const("fmt",(0,n._)`${T}[${b.schemaCode}]`);c.fail$data((0,n.or)((0,n._)`typeof ${R} != "object"`,(0,n._)`${R} instanceof RegExp`,(0,n._)`typeof ${R}.compare != "function"`,E(R)))}function S(){const T=b.schema,R=_.formats[T];if(!R||R===!0)return;if(typeof R!="object"||R instanceof RegExp||typeof R.compare!="function")throw new Error(`"${h}": format "${T}" does not define "compare" function`);const O=d.scopeValue("formats",{key:T,ref:R,code:v.code.formats?(0,n._)`${v.code.formats}${(0,n.getProperty)(T)}`:void 0});c.fail$data(E(O))}function E(T){return(0,n._)`${T}.compare(${f}, ${p}) ${o[h].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(Tb)),Tb}var WP;function hae(){return WP||(WP=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=dae(),r=fae(),o=yt(),s=new o.Name("fullFormats"),l=new o.Name("fastFormats"),c=(f,p={keywords:!0})=>{if(Array.isArray(p))return d(f,p,n.fullFormats,s),f;const[h,g]=p.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,s],v=p.formats||n.formatNames;return d(f,v,h,g),p.keywords&&(0,r.default)(f),f};c.get=(f,p="full")=>{const g=(p==="fast"?n.fastFormats:n.fullFormats)[f];if(!g)throw new Error(`Unknown format "${f}"`);return g};function d(f,p,h,g){var v,_;(v=(_=f.opts.code).formats)!==null&&v!==void 0||(_.formats=(0,o._)`require("ajv-formats/dist/formats").${g}`);for(const b of p)f.addFormat(b,h[b])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(pm,pm.exports)),pm.exports}var pae=hae();const Nue=hl(pae);let bE;bE=globalThis.crypto;async function mae(e){return(await bE).getRandomValues(new Uint8Array(e))}async function gae(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const o=await mae(e-r.length);for(const s of o)s<n&&(r+=t[s%t.length])}return r}async function vae(e){return await gae(e)}async function yae(e){const t=await(await bE).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function kue(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await vae(e),n=await yae(t);return{code_verifier:t,code_challenge:n}}const gr=zB().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:kV.custom,message:"URL must be parseable",fatal:!0}),jz}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Due=vr({resource:$().url(),authorization_servers:Re(gr).optional(),jwks_uri:$().url().optional(),scopes_supported:Re($()).optional(),bearer_methods_supported:Re($()).optional(),resource_signing_alg_values_supported:Re($()).optional(),resource_name:$().optional(),resource_documentation:$().optional(),resource_policy_uri:$().url().optional(),resource_tos_uri:$().url().optional(),tls_client_certificate_bound_access_tokens:Nt().optional(),authorization_details_types_supported:Re($()).optional(),dpop_signing_alg_values_supported:Re($()).optional(),dpop_bound_access_tokens_required:Nt().optional()}),_ae=vr({issuer:$(),authorization_endpoint:gr,token_endpoint:gr,registration_endpoint:gr.optional(),scopes_supported:Re($()).optional(),response_types_supported:Re($()),response_modes_supported:Re($()).optional(),grant_types_supported:Re($()).optional(),token_endpoint_auth_methods_supported:Re($()).optional(),token_endpoint_auth_signing_alg_values_supported:Re($()).optional(),service_documentation:gr.optional(),revocation_endpoint:gr.optional(),revocation_endpoint_auth_methods_supported:Re($()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Re($()).optional(),introspection_endpoint:$().optional(),introspection_endpoint_auth_methods_supported:Re($()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Re($()).optional(),code_challenge_methods_supported:Re($()).optional(),client_id_metadata_document_supported:Nt().optional()}),bae=vr({issuer:$(),authorization_endpoint:gr,token_endpoint:gr,userinfo_endpoint:gr.optional(),jwks_uri:gr,registration_endpoint:gr.optional(),scopes_supported:Re($()).optional(),response_types_supported:Re($()),response_modes_supported:Re($()).optional(),grant_types_supported:Re($()).optional(),acr_values_supported:Re($()).optional(),subject_types_supported:Re($()),id_token_signing_alg_values_supported:Re($()),id_token_encryption_alg_values_supported:Re($()).optional(),id_token_encryption_enc_values_supported:Re($()).optional(),userinfo_signing_alg_values_supported:Re($()).optional(),userinfo_encryption_alg_values_supported:Re($()).optional(),userinfo_encryption_enc_values_supported:Re($()).optional(),request_object_signing_alg_values_supported:Re($()).optional(),request_object_encryption_alg_values_supported:Re($()).optional(),request_object_encryption_enc_values_supported:Re($()).optional(),token_endpoint_auth_methods_supported:Re($()).optional(),token_endpoint_auth_signing_alg_values_supported:Re($()).optional(),display_values_supported:Re($()).optional(),claim_types_supported:Re($()).optional(),claims_supported:Re($()).optional(),service_documentation:$().optional(),claims_locales_supported:Re($()).optional(),ui_locales_supported:Re($()).optional(),claims_parameter_supported:Nt().optional(),request_parameter_supported:Nt().optional(),request_uri_parameter_supported:Nt().optional(),require_request_uri_registration:Nt().optional(),op_policy_uri:gr.optional(),op_tos_uri:gr.optional(),client_id_metadata_document_supported:Nt().optional()}),Lue=be({...bae.shape,..._ae.pick({code_challenge_methods_supported:!0}).shape}),$ue=be({access_token:$(),id_token:$().optional(),token_type:$(),expires_in:aN().optional(),scope:$().optional(),refresh_token:$().optional()}).strip(),jue=be({error:$(),error_description:$().optional(),error_uri:$().optional()}),QP=gr.optional().or(Ge("").transform(()=>{})),wae=be({redirect_uris:Re(gr),token_endpoint_auth_method:$().optional(),grant_types:Re($()).optional(),response_types:Re($()).optional(),client_name:$().optional(),client_uri:gr.optional(),logo_uri:QP,scope:$().optional(),contacts:Re($()).optional(),tos_uri:QP,policy_uri:$().optional(),jwks_uri:gr.optional(),jwks:sV().optional(),software_id:$().optional(),software_version:$().optional(),software_statement:$().optional()}).strip(),Sae=be({client_id:$(),client_secret:$().optional(),client_id_issued_at:ht().optional(),client_secret_expires_at:ht().optional()}).strip(),zue=wae.merge(Sae);be({error:$(),error_description:$().optional()}).strip();be({token:$(),token_type_hint:$().optional()}).strip();class wr extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class aw extends wr{}aw.errorCode="invalid_request";class lw extends wr{}lw.errorCode="invalid_client";class cw extends wr{}cw.errorCode="invalid_grant";class uw extends wr{}uw.errorCode="unauthorized_client";class dw extends wr{}dw.errorCode="unsupported_grant_type";class fw extends wr{}fw.errorCode="invalid_scope";class hw extends wr{}hw.errorCode="access_denied";class pw extends wr{}pw.errorCode="server_error";class mw extends wr{}mw.errorCode="temporarily_unavailable";class gw extends wr{}gw.errorCode="unsupported_response_type";class vw extends wr{}vw.errorCode="unsupported_token_type";class yw extends wr{}yw.errorCode="invalid_token";class _w extends wr{}_w.errorCode="method_not_allowed";class bw extends wr{}bw.errorCode="too_many_requests";class ww extends wr{}ww.errorCode="invalid_client_metadata";class Sw extends wr{}Sw.errorCode="insufficient_scope";class Ew extends wr{}Ew.errorCode="invalid_target";const Uue={[aw.errorCode]:aw,[lw.errorCode]:lw,[cw.errorCode]:cw,[uw.errorCode]:uw,[dw.errorCode]:dw,[fw.errorCode]:fw,[hw.errorCode]:hw,[pw.errorCode]:pw,[mw.errorCode]:mw,[gw.errorCode]:gw,[vw.errorCode]:vw,[yw.errorCode]:yw,[_w.errorCode]:_w,[bw.errorCode]:bw,[ww.errorCode]:ww,[Sw.errorCode]:Sw,[Ew.errorCode]:Ew};async function X6(e){if(!e.getServerCapabilities()?.resources)return{resources:[]};try{return await e.listResources()}catch(n){if(n instanceof hv&&n.code===uf.MethodNotFound)return{resources:[]};throw n}}async function Eae(e,t){return await e.readResource({uri:t})}function Fue(e){const t=qn.c(12);let n,r;t[0]!==e?({client:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let o;t[3]!==n?(o=uv.mcpResourcesList(n),t[3]=n,t[4]=o):o=t[4];let s;t[5]!==n?(s=()=>X6(n),t[5]=n,t[6]=s):s=t[6];const l=r.staleTime??3e4;let c;return t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==l?(c={...r,queryKey:o,queryFn:s,staleTime:l,retry:!1},t[7]=r,t[8]=o,t[9]=s,t[10]=l,t[11]=c):c=t[11],ff(c)}function Bue(e){const t=qn.c(12);let n,r;t[0]!==e?({client:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let o;t[3]!==n?(o=uv.mcpResourcesList(n),t[3]=n,t[4]=o):o=t[4];let s;t[5]!==n?(s=()=>X6(n),t[5]=n,t[6]=s):s=t[6];const l=r.staleTime??3e4;let c;return t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==l?(c={...r,queryKey:o,queryFn:s,staleTime:l,retry:!1},t[7]=r,t[8]=o,t[9]=s,t[10]=l,t[11]=c):c=t[11],xM(c)}function Vue(e){const t=qn.c(15);let n,r,o;t[0]!==e?({client:n,uri:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]);let s;t[4]!==n||t[5]!==o?(s=uv.mcpReadResource(n,o),t[4]=n,t[5]=o,t[6]=s):s=t[6];let l;t[7]!==n||t[8]!==o?(l=()=>Eae(n,o),t[7]=n,t[8]=o,t[9]=l):l=t[9];const c=r.staleTime??3e4;let d;return t[10]!==r||t[11]!==s||t[12]!==l||t[13]!==c?(d={...r,queryKey:s,queryFn:l,staleTime:c,retry:!1},t[10]=r,t[11]=s,t[12]=l,t[13]=c,t[14]=d):d=t[14],ff(d)}const J6="ui-resource-html";function Hue(e){const t=qn.c(20);let n,r,o,s,l;t[0]!==e?({orgSlug:o,connectionId:n,uri:l,meshUrl:r,...s}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=l):(n=t[1],r=t[2],o=t[3],s=t[4],l=t[5]);let c;t[6]!==n||t[7]!==o||t[8]!==l?(c=uv.mcpUiResourceHtml(o,n,l),t[6]=n,t[7]=o,t[8]=l,t[9]=c):c=t[9];let d;t[10]!==n||t[11]!==r||t[12]!==o||t[13]!==l?(d=async()=>{const g=`${r??(typeof window<"u"?window.location.origin:"")}/api/${encodeURIComponent(o)}/mcp/${encodeURIComponent(n)}/ui-resource?uri=${encodeURIComponent(l)}`,v=await fetch(g,{credentials:"include"});if(!v.ok)throw new Error(`Failed to read UI resource (${v.status})`);return v.text()},t[10]=n,t[11]=r,t[12]=o,t[13]=l,t[14]=d):d=t[14];const f=s.staleTime??3e4;let p;return t[15]!==s||t[16]!==c||t[17]!==d||t[18]!==f?(p={...s,queryKey:c,queryFn:d,staleTime:f,retry:!1},t[15]=s,t[16]=c,t[17]=d,t[18]=f,t[19]=p):p=t[19],ff(p)}const xae=be({authorizationEndpoint:$().url(),tokenEndpoint:$().url(),introspectionEndpoint:$().url().optional(),clientId:$(),clientSecret:$().optional(),scopes:Re($()),grantType:an(["authorization_code","client_credentials"])}),XP=be({type:Ge("object"),properties:Pt($(),Gt()).optional(),required:Re($()).optional()}).catchall(Gt()),Rae=gE.extend({inputSchema:XP,outputSchema:XP.optional()}),Oae=be({headers:Pt($(),$()).optional()}),Tae=be({command:$().describe("Command to run (e.g., 'npx', 'node')"),args:Re($()).optional().describe("Command arguments"),cwd:$().optional().describe("Working directory"),envVars:Pt($(),$()).optional().describe("Environment variables (encrypted in storage)")}),eL=be({id:$().describe("Unique identifier for the connection"),title:$().describe("Human-readable name for the connection"),created_at:$().describe("When the connection was created"),updated_at:$().describe("When the connection was last updated"),created_by:$().describe("User ID who created the connection"),updated_by:$().optional().describe("User ID who last updated the connection"),organization_id:$().describe("Organization ID this connection belongs to"),description:$().nullable().describe("Description of the connection"),icon:$().nullable().describe("Icon URL for the connection"),app_name:$().nullable().describe("Associated app name"),app_id:$().nullable().describe("Associated app ID"),slug:$().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:an(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:$().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:$().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:nn([Tae,Oae]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:xae.nullable().describe("OAuth configuration"),configuration_state:Pt($(),Gt()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:Re($()).nullable().optional().describe("Configuration scopes"),metadata:Pt($(),Gt()).nullable().describe("Additional metadata (includes repository info)"),tools:Re(Rae).nullable().describe("Discovered tools from MCP"),bindings:Re($()).nullable().describe("Detected bindings"),status:an(["active","inactive","error"]).describe("Current status")});eL.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:$().nullish()});eL.partial();function que(e){return e!=null&&"command"in e}function Gue(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const Nd=be({connection_id:$().describe("Connection ID"),selected_tools:Re($()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:Re($()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:Re($()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),tL=Nd.extend({selected_tools:Nd.shape.selected_tools.optional(),selected_resources:Nd.shape.selected_resources.optional(),selected_prompts:Nd.shape.selected_prompts.optional()}),Cae=be({connectionId:$(),toolName:$(),label:$(),icon:$().nullable().optional()}),Aae=be({id:$().describe("Stable id; used as React key and ?tab= value"),title:$().describe("Tab label"),icon:$().optional().describe("Optional lucide icon name"),view:be({type:Ge("ext-app"),appId:$(),args:Pt($(),Gt()).optional()})}),Iae=be({defaultMainView:be({type:$(),id:$().optional(),toolName:$().optional()}).nullable().optional(),chatDefaultOpen:Nt().nullable().optional(),tabs:Re(Aae).optional()}),JP=be({tileId:$().optional(),connectionId:$().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:$().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:$().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:Pt($(),Gt()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:ht().int().positive().optional(),maxHeight:ht().int().positive().optional()}),wE=be({banner:$().nullable().optional(),bannerColor:$().nullable().optional(),icon:$().nullable().optional(),themeColor:$().nullable().optional(),pinnedViews:Re(Cae).nullable().optional(),layout:Iae.nullable().optional(),homeTile:JP.nullable().optional(),homeTiles:Re(JP).nullable().optional(),homePrompts:Re($()).nullable().optional()});function Kue(e){const t=e?.homeTiles;if(Array.isArray(t)&&t.length>0)return t;const n=e?.homeTile;return n?[n]:[]}const Pae=/^[A-Za-z_][A-Za-z0-9_]*$/,eM=$().min(1).regex(Pae,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),Mae=Ww("kind",[be({key:eM,kind:Ge("literal"),value:$()}),be({key:eM,kind:Ge("secret"),secretId:$().min(1)})]),SE=be({selected:$().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:$().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:$().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:Re(Mae).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that mesh resolves via the credential vault before posting /_sandbox/config.")}),EE=be({url:$().describe("GitHub repository URL"),owner:$().describe("Repository owner"),name:$().describe("Repository name"),installationId:ht().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:$().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),Nae=an(["agent-sandbox","user-desktop"]),kae=an(["agent-sandbox","user-desktop","cluster"]);function nL(e){return e==="cluster"?"agent-sandbox":e}const rL={sandboxHandle:$().describe("Provider-specific handle"),previewUrl:$().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:$().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:Nae.optional(),createdAt:ht().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:be({packageManager:$().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:$().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:$().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},oL=be(rL),Dae=be({...rL,sandboxProviderKind:kae.optional()});function Lae(e){const t=Dae.parse(e);return oL.parse({...t,sandboxProviderKind:t.sandboxProviderKind?nL(t.sandboxProviderKind):void 0})}function Zue(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t=e,n={};for(const[r,o]of Object.entries(t)){if(!o||typeof o!="object"||r!=="cluster"&&r!=="agent-sandbox"&&r!=="user-desktop")continue;const s=nL(r);try{if(r==="cluster"&&n[s])continue;n[s]=Lae(o)}catch{}}return n}const xE=Pt($().describe("userId"),Pt($().describe("branch"),Pt($().describe("sandboxProviderKind"),oL))),$ae=be({id:$().describe("Stable identifier for this knowledge file"),name:$().describe("File name shown in the UI"),kind:an(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:$().describe("Org filesystem (Library) volume the file lives in"),path:$().describe("Path within the volume"),url:$().describe("Same-origin URL to read the file (display/download)"),contentType:$().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:ht().nullable().optional().describe("File size in bytes"),addedAt:$().describe("ISO timestamp when the file was attached")}),RE=Re($ae).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),Yue=be({id:$().describe("Unique identifier"),title:$().describe("Human-readable name"),description:$().nullable().describe("Description"),icon:$().nullable().describe("Icon URL"),created_at:$().describe("Creation timestamp"),updated_at:$().describe("Last update timestamp"),created_by:$().describe("User ID who created this item"),updated_by:$().optional().describe("User ID who last updated this item"),organization_id:$().describe("Organization ID this item belongs to"),status:an(["active","inactive"]).describe("Current status"),pinned:Nt().describe("Whether this space is pinned to the sidebar"),metadata:be({instructions:$().nullable().describe("Instructions also used as system prompt"),enabled_plugins:Re($()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:Re($()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:$().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:wE.nullable().optional().describe("UI customization settings"),githubRepo:EE.nullable().optional().describe("Linked GitHub repository"),runtime:SE.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:xE.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:RE,siteSlug:$().nullable().optional().describe("Linked asset site slug (managed storage tenancy)")}).loose().describe("Metadata"),connections:Re(Nd).describe("Connections with their selected tools, resources, and prompts")}),iL=be({title:$().min(1).max(120).describe("Short label shown on the chip"),description:$().max(280).optional().describe("One-line subtitle shown under the title"),text:$().min(1).describe("The message sent to the agent when the prompt is clicked")});be({title:$().min(1).max(255).describe("Name for the virtual MCP"),description:$().nullable().optional().describe("Optional description"),icon:$().nullish().describe("Optional icon URL"),status:an(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:Nt().optional().default(!1).describe("Pin to sidebar"),metadata:be({instructions:$().nullable().optional().describe("MCP server instructions"),enabled_plugins:Re($()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:Re($()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:$().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:wE.nullable().optional().describe("UI customization settings"),githubRepo:EE.nullable().optional().describe("Linked GitHub repository"),runtime:SE.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:xE.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:RE,siteSlug:$().nullable().optional().describe("Linked asset site slug (managed storage tenancy)")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:Re(tL).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:Re(iL).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});be({title:$().min(1).max(255).optional().describe("New name"),description:$().nullable().optional().describe("New description (null to clear)"),icon:$().nullish().describe("New icon URL"),status:an(["active","inactive"]).optional().describe("New status"),pinned:Nt().optional().describe("Pin/unpin from sidebar"),metadata:be({instructions:$().nullable().optional().describe("MCP server instructions"),enabled_plugins:Re($()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:Re($()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:$().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:wE.nullable().optional().describe("UI customization settings"),githubRepo:EE.nullable().optional().describe("Linked GitHub repository"),runtime:SE.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:xE.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:RE,siteSlug:$().nullable().optional().describe("Linked asset site slug (managed storage tenancy)")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:Re(tL).optional().describe("New connections (replaces existing)"),prompts:Re(iL).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});var tM;(function(e){e.Completable="McpCompletable"})(tM||(tM={}));const jae="mesh-ui-resources",Ag="html",zae=10080*60*1e3,Uae=50,Fae=16*1024*1024;function Bae(e){return e[0]==="mcp"&&e[1]===J6}function yv(){return new Promise((e,t)=>{const n=indexedDB.open(jae,1);n.onupgradeneeded=()=>{n.result.objectStoreNames.contains(Ag)||n.result.createObjectStore(Ag)},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}function eu(e,t){return e.transaction(Ag,t).objectStore(Ag)}function xw(e){return new Promise((t,n)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>n(e.error)})}async function Vae(e){if(!(typeof indexedDB>"u"))try{const t=await yv(),n=eu(t,"readonly"),r=await xw(n.getAllKeys()),o=await xw(n.getAll()),s=Date.now(),l=r.map((f,p)=>({key:f,value:o[p]})).sort((f,p)=>(p.value?.updatedAt??0)-(f.value?.updatedAt??0)),c=[];let d=0;for(const{key:f,value:p}of l){if(!p||s-p.updatedAt>zae||d>=Uae){c.push(f);continue}d++;try{const g=JSON.parse(String(f));e.getQueryData(g)===void 0&&e.setQueryData(g,p.html,{updatedAt:0})}catch{c.push(f)}}if(c.length>0){const f=eu(t,"readwrite");for(const p of c)f.delete(p)}}catch{}}function Hae(e){if(typeof indexedDB>"u")return()=>{};const t=yv().catch(()=>null);return e.getQueryCache().subscribe(n=>{const r=n.query;if(!Array.isArray(r.queryKey)||!Bae(r.queryKey)||r.state.status!=="success")return;const o=r.state.data;typeof o!="string"||o.length>Fae||t.then(s=>{if(s)try{eu(s,"readwrite").put({html:o,updatedAt:Date.now()},JSON.stringify(r.queryKey))}catch{}})})}function qae(){typeof indexedDB>"u"||yv().then(e=>eu(e,"readwrite").clear()).catch(()=>{})}async function Wue(e){if(!(typeof indexedDB>"u"))try{const t=await yv(),n=await xw(eu(t,"readonly").getAllKeys()),r=eu(t,"readwrite");for(const o of n)try{const s=JSON.parse(String(o));s[1]===J6&&s[3]===e&&r.delete(o)}catch{}}catch{}}const Ig="mesh:rq-cache",sL=1440*60*1e3,Gae=1e3,Kae=new Set(["publicConfig","ai-provider-keys","organization-settings","home-next-actions"]),Zae=new Set(["VIRTUAL_MCP","CONNECTIONS"]);let aL=!1,lL=!1;function Yae(e){const t=e[0];return typeof t=="string"&&Kae.has(t)?!0:e[3]==="collection"&&typeof e[4]=="string"&&Zae.has(e[4])}function Wae(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(Ig);if(!t)return;const n=JSON.parse(t),r=!n.timestamp||Date.now()-n.timestamp>sL;if(n.buster!=="4.91.7"||r||!n.state){window.localStorage.removeItem(Ig);return}f8(e,n.state),aL=!0}catch{Xae()}}function Qae(e){if(typeof window>"u")return()=>{};let t=null;const n=()=>{t=null;try{const r=d8(e,{shouldDehydrateQuery:o=>o.state.status==="success"&&Yae(o.queryKey)});window.localStorage.setItem(Ig,JSON.stringify({buster:"4.91.7",timestamp:Date.now(),state:r}))}catch{}};return e.getQueryCache().subscribe(()=>{t==null&&(t=setTimeout(n,Gae))})}const cL="studio:org-cache:";function uL(e){return`${cL}${e}`}function Que(e,t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(uL(e));if(!n)return null;const r=JSON.parse(n)[t];return!r||Date.now()-r.updatedAt>sL?null:(lL=!0,r)}catch{return null}}function Xue(e,t,n){if(!(typeof window>"u"))try{const r=uL(e),o=window.localStorage.getItem(r),s=o?JSON.parse(o):{};s[t]={data:n,updatedAt:Date.now()},window.localStorage.setItem(r,JSON.stringify(s))}catch{}}function Xae(){if(qae(),!(typeof window>"u"))try{window.localStorage.removeItem(Ig);for(let e=window.localStorage.length-1;e>=0;e--){const t=window.localStorage.key(e);t?.startsWith(cL)&&window.localStorage.removeItem(t)}}catch{}}function Jae(){return aL}function ele(){return lL}let ps=!1,Rw=null,nM=!1;const OE="mesh:lp-distinct-id",Cb="/api/_reports/link-token/",tle=1440*60*1e3;function dL(e){const t="https://analytics.invalid",n=/^[a-z][a-z\d+.-]*:\/\//i.test(e),r=e.startsWith("//");try{const o=new URL(e,t);let s=!1;for(const l of["key","d"])o.searchParams.has(l)&&(o.searchParams.delete(l),s=!0);return o.pathname.startsWith(Cb)&&o.pathname!==Cb&&(o.pathname=`${Cb}redacted`,s=!0),s?n?o.toString():r?`//${o.host}${o.pathname}${o.search}${o.hash}`:`${o.pathname}${o.search}${o.hash}`:e}catch{return e}}function Ab(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,typeof n=="string"?dL(n):n]))}const nle=e=>e?(e.properties=Ab(e.properties),e.$set&&(e.$set=Ab(e.$set)),e.$set_once&&(e.$set_once=Ab(e.$set_once)),e):null;function fL(){try{const e=window.localStorage.getItem(OE);if(!e)return;const{id:t,ts:n}=JSON.parse(e);return typeof t!="string"||!t||typeof n!="number"?void 0:Date.now()-n<=tle?t:void 0}catch{return}}function rle(){try{window.localStorage.removeItem(OE)}catch{}}function ole(){try{const e=new URL(window.location.href),t=e.searchParams.get("ph_did");t&&(window.localStorage.setItem(OE,JSON.stringify({id:t,ts:Date.now()})),e.searchParams.delete("ph_did"),window.history.replaceState(window.history.state,"",e.toString()));const n=t??fL();return n?Object.keys(window.localStorage).some(o=>o.startsWith("ph_")&&o.endsWith("_posthog"))?void 0:n:void 0}catch{return}}function ile(e){const t=fL();if(t&&(rle(),t!==e))try{_l.alias(t)}catch{}}function sle(e,t){if(ps||typeof window>"u")return;const n=ole();_l.init(e,{api_host:t,ui_host:"https://us.posthog.com",cross_subdomain_cookie:!0,...n?{bootstrap:{distinctID:n}}:{},capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,before_send:nle,capture_performance:{web_vitals:!0,network_timing:!0},capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture",maskCapturedNetworkRequestFn:r=>({...r,...typeof r.name=="string"?{name:dL(r.name)}:{}})},person_profiles:"identified_only"}),ps=!0}function ale(e,t){ps&&(_l.identify(e,t),ile(e))}function lle(){ps&&(_l.reset(),Rw=null)}function cle(e,t){ps&&_l.capture(e,t)}function Jue(){return ps}function ede(){if(!ps||nM||typeof performance>"u")return;nM=!0;const e=performance.getEntriesByType("navigation")[0],t=n=>{const r=performance.getEntriesByName(n,"measure")[0];return r?Math.round(r.duration):void 0};cle("perf_app_bootstrap",{nav_type:e?.type,ttfb_ms:e?Math.round(e.responseStart):void 0,dom_interactive_ms:e?Math.round(e.domInteractive):void 0,dom_content_loaded_ms:e?Math.round(e.domContentLoadedEventEnd):void 0,config_fetch_ms:t("mesh:config-fetch"),active_org_fetch_ms:t("mesh:active-org-fetch"),time_to_shell_ms:Math.round(performance.now()),cache_restored:Jae(),org_cache_restored:ele()})}function tde(e,t){ps&&e!==Rw&&(_l.group("organization",e,t),Rw=e)}function hL(e,t){if(ps)try{_l.captureException(e,t)}catch{}}let mm=null;function ule({children:e}){const t=OM(),{data:n}=Hg.useSession();if(t.posthog){sle(t.posthog.key,t.posthog.host);const r=n?.user?.id??null;r&&r!==mm?(ale(r,{email:n?.user?.email,name:n?.user?.name}),mm=r):!r&&mm&&(lle(),mm=null)}return C.jsx(C.Fragment,{children:e})}const TE=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M12 9v4m0 4h.01M10.615 3.892 2.39 18.098c-.456.788-.684 1.182-.65 1.506a1 1 0 0 0 .406.705c.263.191.718.191 1.629.191h16.45c.91 0 1.365 0 1.628-.191a1 1 0 0 0 .407-.705c.034-.324-.195-.718-.65-1.506L13.383 3.892c-.454-.785-.681-1.178-.978-1.31a1 1 0 0 0-.813 0c-.296.132-.523.525-.978 1.31Z"}));TE.displayName="AlertTriangle";const pL=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M4 7.997a2.295 2.295 0 0 1-.39-.035A2 2 0 0 1 2.038 6.39C2 6.197 2 5.965 2 5.5s0-.697.038-.89A2 2 0 0 1 3.61 3.038C3.803 3 4.035 3 4.5 3h15c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89s0 .697-.038.89a2 2 0 0 1-1.572 1.572c-.107.02-.226.03-.39.035M10 13h4M4 8h16v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 21 16.88 21 15.2 21H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 18.72 4 17.88 4 16.2V8Z"}));pL.displayName="Archive";const CE=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M12 2.25v2.5M12 18v4M5.75 12h-3.5m19 0h-1.5m-1.293 6.457-.707-.707m.914-12.334L17.25 6.83M4.922 19.078 7.75 16.25M5.129 5.209 7.25 7.33"}));CE.displayName="Loading01";const mL=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M17 10V8A5 5 0 0 0 7 8v2m5 4.5v2M8.8 21h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 18.72 20 17.88 20 16.2v-1.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 10 16.88 10 15.2 10H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 12.28 4 13.12 4 14.8v1.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 21 7.12 21 8.8 21Z"}));mL.displayName="Lock01";const gL=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M21 10s-2.005-2.732-3.634-4.362a9 9 0 1 0 2.282 8.862M21 10V4m0 6h-6"}));gL.displayName="RefreshCw01";function AE(){const e=qn.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=C.jsx("div",{className:"flex items-center justify-center min-h-screen w-full",children:C.jsx(CE,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=t):t=e[0],t}function dle(e){try{return JSON.parse(e)}catch{return}}function rM(e,t){const n=localStorage.getItem(e),r=n?dle(n):void 0,o=typeof t=="function"?t(r):r??t;if(r===void 0||o!==r)try{const s=JSON.stringify(o);localStorage.setItem(e,s)}catch{}return o}function fle(e,t){const n=qn.c(25),r=Nw();let o;n[0]!==e?(o=["localStorage",e],n[0]=e,n[1]=o):o=n[1];const s=o;let l,c;n[2]!==t||n[3]!==e?(l=()=>rM(e,t),c=()=>rM(e,t),n[2]=t,n[3]=e,n[4]=l,n[5]=c):(l=n[4],c=n[5]);let d;n[6]!==s||n[7]!==l||n[8]!==c?(d={queryKey:s,queryFn:l,initialData:c,staleTime:1/0,gcTime:1/0},n[6]=s,n[7]=l,n[8]=c,n[9]=d):d=n[9];const{data:f}=xM(d);let p;n[10]!==e?(p=async E=>{const T=JSON.stringify(E);return localStorage.setItem(e,T),E},n[10]=e,n[11]=p):p=n[11];let h;n[12]!==r||n[13]!==s?(h=E=>{r.setQueryData(s,E)},n[12]=r,n[13]=s,n[14]=h):h=n[14];let g;n[15]!==p||n[16]!==h?(g={mutationFn:p,onSuccess:h},n[15]=p,n[16]=h,n[17]=g):g=n[17];const v=L8(g);let _;n[18]!==v||n[19]!==r||n[20]!==s?(_=E=>{const T=r.getQueryData(s),R=typeof E=="function"?E(T):E;v.mutate(R)},n[18]=v,n[19]=r,n[20]=s,n[21]=_):_=n[21];const b=_,x=f;let S;return n[22]!==b||n[23]!==x?(S=[x,b],n[22]=b,n[23]=x,n[24]=S):S=n[24],S}const su={chatSelectedImageModel:e=>`mesh:chat:selectedImageModel:${e}`,chatSelectedWebSearchModel:e=>`mesh:chat:selectedWebSearchModel:${e}`,chatSelectedDeepResearchModel:e=>`mesh:chat:selectedDeepResearchModel:${e}`,chatSimpleModeTier:e=>`mesh:chat:simpleModeTier:${e}`,chatLastAgentOption:e=>`mesh:chat:lastAgentOption:${e}`,chatAutosend:(e,t)=>`mesh:chat:autosend:${e}:${t}`,chatDraft:(e,t)=>`mesh:chat:draft:${e}:${t}`,sidePanelWidth:()=>"mesh:side-panel:width",sidebarOpen:()=>"mesh:sidebar-open",preferences:()=>"mesh:user:preferences",lastOrgSlug:()=>"mesh:last-org-slug",lastLocation:()=>"mesh:last-location",connectionsTab:e=>`mesh:connections:tab:${e}`,taskLastViewed:e=>`mesh:chat:task-last-viewed:${e}`,sidebarGroupOrder:(e,t)=>`sidebar.group-order.${e}.${t}`},hle=["en","pt-BR"];function vL(){return typeof navigator<"u"&&navigator.language?.toLowerCase().startsWith("pt")?"pt-BR":"en"}const ple={toolApprovalLevel:"auto",enableNotifications:typeof Notification<"u",enableSounds:!1,theme:"system",language:vL()},yL=["auto","readonly"],nde=[{value:"readonly",label:"Ask before edit",short:"Ask"},{value:"auto",label:"Auto approve",short:"Auto"}],mle=["light","dark","system"];function rde(){try{const e=JSON.parse(localStorage.getItem(su.preferences())??"{}");if(yL.includes(e.toolApprovalLevel))return e.toolApprovalLevel}catch{}return"auto"}function gle(){const e=qn.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=su.preferences(),e[0]=t):t=e[0],fle(t,vle)}function vle(e){const t={...ple,...e};return yL.includes(t.toolApprovalLevel)||(t.toolApprovalLevel="auto"),mle.includes(t.theme)||(t.theme="system"),hle.includes(t.language)||(t.language=vL()),t}async function yle(){performance.mark("mesh:config-fetch:start");try{const e=await fetch("/api/config");if(!e.ok)throw new Error("Failed to load public configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load public configuration");return t.config}finally{performance.mark("mesh:config-fetch:end"),performance.measure("mesh:config-fetch","mesh:config-fetch:start","mesh:config-fetch:end")}}function _le(e){if(!e)return;const t=document.getElementById("mesh-theme-overrides");t&&t.remove();const n=[];if(e.light&&Object.keys(e.light).length>0){const r=Object.entries(e.light).map(([o,s])=>` ${o}: ${s};`).join(`
|
|
163
|
+
deps: ${p}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[f,p]=s(d);l(d,f),c(d,p)}};function s({schema:d}){const f={},p={};for(const h in d){if(h==="__proto__")continue;const g=Array.isArray(d[h])?f:p;g[h]=d[h]}return[f,p]}function l(d,f=d.schema){const{gen:p,data:h,it:g}=d;if(Object.keys(f).length===0)return;const v=p.let("missing");for(const _ in f){const b=f[_];if(b.length===0)continue;const x=(0,r.propertyInData)(p,h,_,g.opts.ownProperties);d.setParams({property:_,depsCount:b.length,deps:b.join(", ")}),g.allErrors?p.if(x,()=>{for(const S of b)(0,r.checkReportMissingProp)(d,S)}):(p.if((0,t._)`${x} && (${(0,r.checkMissingProp)(d,b,v)})`),(0,r.reportMissingProp)(d,v),p.else())}}e.validatePropertyDeps=l;function c(d,f=d.schema){const{gen:p,data:h,keyword:g,it:v}=d,_=p.name("valid");for(const b in f)(0,n.alwaysValidSchema)(v,f[b])||(p.if((0,r.propertyInData)(p,h,b,v.opts.ownProperties),()=>{const x=d.subschema({keyword:g,schemaProp:b},_);d.mergeValidEvaluated(x,_)},()=>p.var(_,!0)),d.ok(_))}e.validateSchemaDeps=c,e.default=o})(Rb)),Rb}var tm={},IP;function Fse(){if(IP)return tm;IP=1,Object.defineProperty(tm,"__esModule",{value:!0});const e=yt(),t=kt(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:l,data:c,it:d}=o;if((0,t.alwaysValidSchema)(d,l))return;const f=s.name("valid");s.forIn("key",c,p=>{o.setParams({propertyName:p}),o.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:!0},f),s.if((0,e.not)(f),()=>{o.error(!0),d.allErrors||s.break()})}),o.ok(f)}};return tm.default=r,tm}var nm={},PP;function Q6(){if(PP)return nm;PP=1,Object.defineProperty(nm,"__esModule",{value:!0});const e=ci(),t=yt(),n=Ea(),r=kt(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:c,schema:d,parentSchema:f,data:p,errsCount:h,it:g}=l;if(!h)throw new Error("ajv implementation error");const{allErrors:v,opts:_}=g;if(g.props=!0,_.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,d))return;const b=(0,e.allSchemaProperties)(f.properties),x=(0,e.allSchemaProperties)(f.patternProperties);S(),l.ok((0,t._)`${h} === ${n.default.errors}`);function S(){c.forIn("key",p,A=>{!b.length&&!x.length?R(A):c.if(E(A),()=>R(A))})}function E(A){let I;if(b.length>8){const M=(0,r.schemaRefOrVal)(g,f.properties,"properties");I=(0,e.isOwnProperty)(c,M,A)}else b.length?I=(0,t.or)(...b.map(M=>(0,t._)`${A} === ${M}`)):I=t.nil;return x.length&&(I=(0,t.or)(I,...x.map(M=>(0,t._)`${(0,e.usePattern)(l,M)}.test(${A})`))),(0,t.not)(I)}function T(A){c.code((0,t._)`delete ${p}[${A}]`)}function R(A){if(_.removeAdditional==="all"||_.removeAdditional&&d===!1){T(A);return}if(d===!1){l.setParams({additionalProperty:A}),l.error(),v||c.break();return}if(typeof d=="object"&&!(0,r.alwaysValidSchema)(g,d)){const I=c.name("valid");_.removeAdditional==="failing"?(O(A,I,!1),c.if((0,t.not)(I),()=>{l.reset(),T(A)})):(O(A,I),v||c.if((0,t.not)(I),()=>c.break()))}}function O(A,I,M){const L={keyword:"additionalProperties",dataProp:A,dataPropType:r.Type.Str};M===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(L,I)}}};return nm.default=s,nm}var rm={},MP;function Bse(){if(MP)return rm;MP=1,Object.defineProperty(rm,"__esModule",{value:!0});const e=gv(),t=ci(),n=kt(),r=Q6(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,parentSchema:d,data:f,it:p}=s;p.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(p,r.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(c);for(const x of h)p.definedProperties.add(x);p.opts.unevaluated&&h.length&&p.props!==!0&&(p.props=n.mergeEvaluated.props(l,(0,n.toHash)(h),p.props));const g=h.filter(x=>!(0,n.alwaysValidSchema)(p,c[x]));if(g.length===0)return;const v=l.name("valid");for(const x of g)_(x)?b(x):(l.if((0,t.propertyInData)(l,f,x,p.opts.ownProperties)),b(x),p.allErrors||l.else().var(v,!0),l.endIf()),s.it.definedProperties.add(x),s.ok(v);function _(x){return p.opts.useDefaults&&!p.compositeRule&&c[x].default!==void 0}function b(x){s.subschema({keyword:"properties",schemaProp:x,dataProp:x},v)}}};return rm.default=o,rm}var om={},NP;function Vse(){if(NP)return om;NP=1,Object.defineProperty(om,"__esModule",{value:!0});const e=ci(),t=yt(),n=kt(),r=kt(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,data:d,parentSchema:f,it:p}=s,{opts:h}=p,g=(0,e.allSchemaProperties)(c),v=g.filter(R=>(0,n.alwaysValidSchema)(p,c[R]));if(g.length===0||v.length===g.length&&(!p.opts.unevaluated||p.props===!0))return;const _=h.strictSchema&&!h.allowMatchingProperties&&f.properties,b=l.name("valid");p.props!==!0&&!(p.props instanceof t.Name)&&(p.props=(0,r.evaluatedPropsToName)(l,p.props));const{props:x}=p;S();function S(){for(const R of g)_&&E(R),p.allErrors?T(R):(l.var(b,!0),T(R),l.if(b))}function E(R){for(const O in _)new RegExp(R).test(O)&&(0,n.checkStrictMode)(p,`property ${O} matches pattern ${R} (use allowMatchingProperties)`)}function T(R){l.forIn("key",d,O=>{l.if((0,t._)`${(0,e.usePattern)(s,R)}.test(${O})`,()=>{const A=v.includes(R);A||s.subschema({keyword:"patternProperties",schemaProp:R,dataProp:O,dataPropType:r.Type.Str},b),p.opts.unevaluated&&x!==!0?l.assign((0,t._)`${x}[${O}]`,!0):!A&&!p.allErrors&&l.if((0,t.not)(b),()=>l.break())})})}}};return om.default=o,om}var im={},kP;function Hse(){if(kP)return im;kP=1,Object.defineProperty(im,"__esModule",{value:!0});const e=kt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:o,it:s}=n;if((0,e.alwaysValidSchema)(s,o)){n.fail();return}const l=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),n.failResult(l,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return im.default=t,im}var sm={},DP;function qse(){if(DP)return sm;DP=1,Object.defineProperty(sm,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ci().validateUnion,error:{message:"must match a schema in anyOf"}};return sm.default=t,sm}var am={},LP;function Gse(){if(LP)return am;LP=1,Object.defineProperty(am,"__esModule",{value:!0});const e=yt(),t=kt(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:l,parentSchema:c,it:d}=o;if(!Array.isArray(l))throw new Error("ajv implementation error");if(d.opts.discriminator&&c.discriminator)return;const f=l,p=s.let("valid",!1),h=s.let("passing",null),g=s.name("_valid");o.setParams({passing:h}),s.block(v),o.result(p,()=>o.reset(),()=>o.error(!0));function v(){f.forEach((_,b)=>{let x;(0,t.alwaysValidSchema)(d,_)?s.var(g,!0):x=o.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},g),b>0&&s.if((0,e._)`${g} && ${p}`).assign(p,!1).assign(h,(0,e._)`[${h}, ${b}]`).else(),s.if(g,()=>{s.assign(p,!0),s.assign(h,b),x&&o.mergeEvaluated(x,e.Name)})})}}};return am.default=r,am}var lm={},$P;function Kse(){if($P)return lm;$P=1,Object.defineProperty(lm,"__esModule",{value:!0});const e=kt(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:o,it:s}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const l=r.name("valid");o.forEach((c,d)=>{if((0,e.alwaysValidSchema)(s,c))return;const f=n.subschema({keyword:"allOf",schemaProp:d},l);n.ok(l),n.mergeEvaluated(f)})}};return lm.default=t,lm}var cm={},jP;function Zse(){if(jP)return cm;jP=1,Object.defineProperty(cm,"__esModule",{value:!0});const e=yt(),t=kt(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:c,it:d}=s;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const f=o(d,"then"),p=o(d,"else");if(!f&&!p)return;const h=l.let("valid",!0),g=l.name("_valid");if(v(),s.reset(),f&&p){const b=l.let("ifClause");s.setParams({ifClause:b}),l.if(g,_("then",b),_("else",b))}else f?l.if(g,_("then")):l.if((0,e.not)(g),_("else"));s.pass(h,()=>s.error(!0));function v(){const b=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);s.mergeEvaluated(b)}function _(b,x){return()=>{const S=s.subschema({keyword:b},g);l.assign(h,g),s.mergeValidEvaluated(S,h),x?l.assign(x,(0,e._)`${b}`):s.setParams({ifClause:b})}}}};function o(s,l){const c=s.schema[l];return c!==void 0&&!(0,t.alwaysValidSchema)(s,c)}return cm.default=r,cm}var um={},zP;function Yse(){if(zP)return um;zP=1,Object.defineProperty(um,"__esModule",{value:!0});const e=kt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:o}){r.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};return um.default=t,um}var UP;function Wse(){if(UP)return Qp;UP=1,Object.defineProperty(Qp,"__esModule",{value:!0});const e=Y6(),t=$se(),n=W6(),r=jse(),o=zse(),s=Use(),l=Fse(),c=Q6(),d=Bse(),f=Vse(),p=Hse(),h=qse(),g=Gse(),v=Kse(),_=Zse(),b=Yse();function x(S=!1){const E=[p.default,h.default,g.default,v.default,_.default,b.default,l.default,c.default,s.default,d.default,f.default];return S?E.push(t.default,r.default):E.push(e.default,n.default),E.push(o.default),E}return Qp.default=x,Qp}var dm={},fm={},FP;function Qse(){if(FP)return fm;FP=1,Object.defineProperty(fm,"__esModule",{value:!0});const e=yt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,o){const{gen:s,data:l,$data:c,schema:d,schemaCode:f,it:p}=r,{opts:h,errSchemaPath:g,schemaEnv:v,self:_}=p;if(!h.validateFormats)return;c?b():x();function b(){const S=s.scopeValue("formats",{ref:_.formats,code:h.code.formats}),E=s.const("fDef",(0,e._)`${S}[${f}]`),T=s.let("fType"),R=s.let("format");s.if((0,e._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>s.assign(T,(0,e._)`${E}.type || "string"`).assign(R,(0,e._)`${E}.validate`),()=>s.assign(T,(0,e._)`"string"`).assign(R,E)),r.fail$data((0,e.or)(O(),A()));function O(){return h.strictSchema===!1?e.nil:(0,e._)`${f} && !${R}`}function A(){const I=v.$async?(0,e._)`(${E}.async ? await ${R}(${l}) : ${R}(${l}))`:(0,e._)`${R}(${l})`,M=(0,e._)`(typeof ${R} == "function" ? ${I} : ${R}.test(${l}))`;return(0,e._)`${R} && ${R} !== true && ${T} === ${o} && !${M}`}}function x(){const S=_.formats[d];if(!S){O();return}if(S===!0)return;const[E,T,R]=A(S);E===o&&r.pass(I());function O(){if(h.strictSchema===!1){_.logger.warn(M());return}throw new Error(M());function M(){return`unknown format "${d}" ignored in schema at path "${g}"`}}function A(M){const L=M instanceof RegExp?(0,e.regexpCode)(M):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(d)}`:void 0,H=s.scopeValue("formats",{key:d,ref:M,code:L});return typeof M=="object"&&!(M instanceof RegExp)?[M.type||"string",M.validate,(0,e._)`${H}.validate`]:["string",M,H]}function I(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${R}(${l})`}return typeof T=="function"?(0,e._)`${R}(${l})`:(0,e._)`${R}.test(${l})`}}}};return fm.default=n,fm}var BP;function Xse(){if(BP)return dm;BP=1,Object.defineProperty(dm,"__esModule",{value:!0});const t=[Qse().default];return dm.default=t,dm}var Qa={},VP;function Jse(){return VP||(VP=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.contentVocabulary=Qa.metadataVocabulary=void 0,Qa.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Qa.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Qa}var HP;function eae(){if(HP)return Dp;HP=1,Object.defineProperty(Dp,"__esModule",{value:!0});const e=xse(),t=Lse(),n=Wse(),r=Xse(),o=Jse(),s=[e.default,t.default,(0,n.default)(),r.default,o.metadataVocabulary,o.contentVocabulary];return Dp.default=s,Dp}var hm={},bd={},qP;function tae(){if(qP)return bd;qP=1,Object.defineProperty(bd,"__esModule",{value:!0}),bd.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(bd.DiscrError=e={})),bd}var GP;function nae(){if(GP)return hm;GP=1,Object.defineProperty(hm,"__esModule",{value:!0});const e=yt(),t=tae(),n=yE(),r=vv(),o=kt(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:d}})=>c===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:c,tag:d,tagName:f}})=>(0,e._)`{error: ${c}, tag: ${f}, tagValue: ${d}}`},code(c){const{gen:d,data:f,schema:p,parentSchema:h,it:g}=c,{oneOf:v}=h;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const _=p.propertyName;if(typeof _!="string")throw new Error("discriminator: requires propertyName");if(p.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const b=d.let("valid",!1),x=d.const("tag",(0,e._)`${f}${(0,e.getProperty)(_)}`);d.if((0,e._)`typeof ${x} == "string"`,()=>S(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:x,tagName:_})),c.ok(b);function S(){const R=T();d.if(!1);for(const O in R)d.elseIf((0,e._)`${x} === ${O}`),d.assign(b,E(R[O]));d.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:x,tagName:_}),d.endIf()}function E(R){const O=d.name("valid"),A=c.subschema({keyword:"oneOf",schemaProp:R},O);return c.mergeEvaluated(A,e.Name),O}function T(){var R;const O={},A=M(h);let I=!0;for(let j=0;j<v.length;j++){let B=v[j];if(B?.$ref&&!(0,o.schemaHasRulesButRef)(B,g.self.RULES)){const Z=B.$ref;if(B=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,Z),B instanceof n.SchemaEnv&&(B=B.schema),B===void 0)throw new r.default(g.opts.uriResolver,g.baseId,Z)}const F=(R=B?.properties)===null||R===void 0?void 0:R[_];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${_}"`);I=I&&(A||M(B)),L(F,j)}if(!I)throw new Error(`discriminator: "${_}" must be required`);return O;function M({required:j}){return Array.isArray(j)&&j.includes(_)}function L(j,B){if(j.const)H(j.const,B);else if(j.enum)for(const F of j.enum)H(F,B);else throw new Error(`discriminator: "properties/${_}" must have "const" or "enum"`)}function H(j,B){if(typeof j!="string"||j in O)throw new Error(`discriminator: "${_}" values must be unique strings`);O[j]=B}}}};return hm.default=l,hm}const rae="http://json-schema.org/draft-07/schema#",oae="http://json-schema.org/draft-07/schema#",iae="Core schema meta-schema",sae={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},aae=["object","boolean"],lae={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},cae={$schema:rae,$id:oae,title:iae,definitions:sae,type:aae,properties:lae,default:!0};var KP;function uae(){return KP||(KP=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=wse(),r=eae(),o=nae(),s=cae,l=["/properties"],c="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(s,l):s;this.addMetaSchema(_,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var f=gv();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var p=yt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var h=vE();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var g=vv();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(Ip,Ip.exports)),Ip.exports}var pm={exports:{}},Ob={},ZP;function dae(){return ZP||(ZP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(j,B){return{validate:j,compare:B}}e.fullFormats={date:t(s,l),time:t(d(!0),f),"date-time":t(g(!0),v),"iso-time":t(d(),p),"iso-date-time":t(g(),_),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:S,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:H,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:T,int32:{type:"number",validate:A},int64:{type:"number",validate:I},float:{type:"number",validate:M},double:{type:"number",validate:M},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,p),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,_),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(j){return j%4===0&&(j%100!==0||j%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(j){const B=r.exec(j);if(!B)return!1;const F=+B[1],Z=+B[2],ie=+B[3];return Z>=1&&Z<=12&&ie>=1&&ie<=(Z===2&&n(F)?29:o[Z])}function l(j,B){if(j&&B)return j>B?1:j<B?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(j){return function(F){const Z=c.exec(F);if(!Z)return!1;const ie=+Z[1],q=+Z[2],W=+Z[3],te=Z[4],le=Z[5]==="-"?-1:1,Q=+(Z[6]||0),k=+(Z[7]||0);if(Q>23||k>59||j&&!te)return!1;if(ie<=23&&q<=59&&W<60)return!0;const G=q-k*le,V=ie-Q*le-(G<0?1:0);return(V===23||V===-1)&&(G===59||G===-1)&&W<61}}function f(j,B){if(!(j&&B))return;const F=new Date("2020-01-01T"+j).valueOf(),Z=new Date("2020-01-01T"+B).valueOf();if(F&&Z)return F-Z}function p(j,B){if(!(j&&B))return;const F=c.exec(j),Z=c.exec(B);if(F&&Z)return j=F[1]+F[2]+F[3],B=Z[1]+Z[2]+Z[3],j>B?1:j<B?-1:0}const h=/t|\s/i;function g(j){const B=d(j);return function(Z){const ie=Z.split(h);return ie.length===2&&s(ie[0])&&B(ie[1])}}function v(j,B){if(!(j&&B))return;const F=new Date(j).valueOf(),Z=new Date(B).valueOf();if(F&&Z)return F-Z}function _(j,B){if(!(j&&B))return;const[F,Z]=j.split(h),[ie,q]=B.split(h),W=l(F,ie);if(W!==void 0)return W||f(Z,q)}const b=/\/|:/,x=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function S(j){return b.test(j)&&x.test(j)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(j){return E.lastIndex=0,E.test(j)}const R=-2147483648,O=2**31-1;function A(j){return Number.isInteger(j)&&j<=O&&j>=R}function I(j){return Number.isInteger(j)}function M(){return!0}const L=/[^\\]\\Z/;function H(j){if(L.test(j))return!1;try{return new RegExp(j),!0}catch{return!1}}})(Ob)),Ob}var Tb={},YP;function fae(){return YP||(YP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=uae(),n=yt(),r=n.operators,o={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:c,schemaCode:d})=>(0,n.str)`should be ${o[c].okStr} ${d}`,params:({keyword:c,schemaCode:d})=>(0,n._)`{comparison: ${o[c].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(c){const{gen:d,data:f,schemaCode:p,keyword:h,it:g}=c,{opts:v,self:_}=g;if(!v.validateFormats)return;const b=new t.KeywordCxt(g,_.RULES.all.format.definition,"format");b.$data?x():S();function x(){const T=d.scopeValue("formats",{ref:_.formats,code:v.code.formats}),R=d.const("fmt",(0,n._)`${T}[${b.schemaCode}]`);c.fail$data((0,n.or)((0,n._)`typeof ${R} != "object"`,(0,n._)`${R} instanceof RegExp`,(0,n._)`typeof ${R}.compare != "function"`,E(R)))}function S(){const T=b.schema,R=_.formats[T];if(!R||R===!0)return;if(typeof R!="object"||R instanceof RegExp||typeof R.compare!="function")throw new Error(`"${h}": format "${T}" does not define "compare" function`);const O=d.scopeValue("formats",{key:T,ref:R,code:v.code.formats?(0,n._)`${v.code.formats}${(0,n.getProperty)(T)}`:void 0});c.fail$data(E(O))}function E(T){return(0,n._)`${T}.compare(${f}, ${p}) ${o[h].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(Tb)),Tb}var WP;function hae(){return WP||(WP=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=dae(),r=fae(),o=yt(),s=new o.Name("fullFormats"),l=new o.Name("fastFormats"),c=(f,p={keywords:!0})=>{if(Array.isArray(p))return d(f,p,n.fullFormats,s),f;const[h,g]=p.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,s],v=p.formats||n.formatNames;return d(f,v,h,g),p.keywords&&(0,r.default)(f),f};c.get=(f,p="full")=>{const g=(p==="fast"?n.fastFormats:n.fullFormats)[f];if(!g)throw new Error(`Unknown format "${f}"`);return g};function d(f,p,h,g){var v,_;(v=(_=f.opts.code).formats)!==null&&v!==void 0||(_.formats=(0,o._)`require("ajv-formats/dist/formats").${g}`);for(const b of p)f.addFormat(b,h[b])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(pm,pm.exports)),pm.exports}var pae=hae();const Nue=hl(pae);let bE;bE=globalThis.crypto;async function mae(e){return(await bE).getRandomValues(new Uint8Array(e))}async function gae(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const o=await mae(e-r.length);for(const s of o)s<n&&(r+=t[s%t.length])}return r}async function vae(e){return await gae(e)}async function yae(e){const t=await(await bE).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function kue(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await vae(e),n=await yae(t);return{code_verifier:t,code_challenge:n}}const gr=zB().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:kV.custom,message:"URL must be parseable",fatal:!0}),j9}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Due=vr({resource:$().url(),authorization_servers:Re(gr).optional(),jwks_uri:$().url().optional(),scopes_supported:Re($()).optional(),bearer_methods_supported:Re($()).optional(),resource_signing_alg_values_supported:Re($()).optional(),resource_name:$().optional(),resource_documentation:$().optional(),resource_policy_uri:$().url().optional(),resource_tos_uri:$().url().optional(),tls_client_certificate_bound_access_tokens:Nt().optional(),authorization_details_types_supported:Re($()).optional(),dpop_signing_alg_values_supported:Re($()).optional(),dpop_bound_access_tokens_required:Nt().optional()}),_ae=vr({issuer:$(),authorization_endpoint:gr,token_endpoint:gr,registration_endpoint:gr.optional(),scopes_supported:Re($()).optional(),response_types_supported:Re($()),response_modes_supported:Re($()).optional(),grant_types_supported:Re($()).optional(),token_endpoint_auth_methods_supported:Re($()).optional(),token_endpoint_auth_signing_alg_values_supported:Re($()).optional(),service_documentation:gr.optional(),revocation_endpoint:gr.optional(),revocation_endpoint_auth_methods_supported:Re($()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Re($()).optional(),introspection_endpoint:$().optional(),introspection_endpoint_auth_methods_supported:Re($()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Re($()).optional(),code_challenge_methods_supported:Re($()).optional(),client_id_metadata_document_supported:Nt().optional()}),bae=vr({issuer:$(),authorization_endpoint:gr,token_endpoint:gr,userinfo_endpoint:gr.optional(),jwks_uri:gr,registration_endpoint:gr.optional(),scopes_supported:Re($()).optional(),response_types_supported:Re($()),response_modes_supported:Re($()).optional(),grant_types_supported:Re($()).optional(),acr_values_supported:Re($()).optional(),subject_types_supported:Re($()),id_token_signing_alg_values_supported:Re($()),id_token_encryption_alg_values_supported:Re($()).optional(),id_token_encryption_enc_values_supported:Re($()).optional(),userinfo_signing_alg_values_supported:Re($()).optional(),userinfo_encryption_alg_values_supported:Re($()).optional(),userinfo_encryption_enc_values_supported:Re($()).optional(),request_object_signing_alg_values_supported:Re($()).optional(),request_object_encryption_alg_values_supported:Re($()).optional(),request_object_encryption_enc_values_supported:Re($()).optional(),token_endpoint_auth_methods_supported:Re($()).optional(),token_endpoint_auth_signing_alg_values_supported:Re($()).optional(),display_values_supported:Re($()).optional(),claim_types_supported:Re($()).optional(),claims_supported:Re($()).optional(),service_documentation:$().optional(),claims_locales_supported:Re($()).optional(),ui_locales_supported:Re($()).optional(),claims_parameter_supported:Nt().optional(),request_parameter_supported:Nt().optional(),request_uri_parameter_supported:Nt().optional(),require_request_uri_registration:Nt().optional(),op_policy_uri:gr.optional(),op_tos_uri:gr.optional(),client_id_metadata_document_supported:Nt().optional()}),Lue=be({...bae.shape,..._ae.pick({code_challenge_methods_supported:!0}).shape}),$ue=be({access_token:$(),id_token:$().optional(),token_type:$(),expires_in:aN().optional(),scope:$().optional(),refresh_token:$().optional()}).strip(),jue=be({error:$(),error_description:$().optional(),error_uri:$().optional()}),QP=gr.optional().or(Ge("").transform(()=>{})),wae=be({redirect_uris:Re(gr),token_endpoint_auth_method:$().optional(),grant_types:Re($()).optional(),response_types:Re($()).optional(),client_name:$().optional(),client_uri:gr.optional(),logo_uri:QP,scope:$().optional(),contacts:Re($()).optional(),tos_uri:QP,policy_uri:$().optional(),jwks_uri:gr.optional(),jwks:sV().optional(),software_id:$().optional(),software_version:$().optional(),software_statement:$().optional()}).strip(),Sae=be({client_id:$(),client_secret:$().optional(),client_id_issued_at:ht().optional(),client_secret_expires_at:ht().optional()}).strip(),zue=wae.merge(Sae);be({error:$(),error_description:$().optional()}).strip();be({token:$(),token_type_hint:$().optional()}).strip();class wr extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class aw extends wr{}aw.errorCode="invalid_request";class lw extends wr{}lw.errorCode="invalid_client";class cw extends wr{}cw.errorCode="invalid_grant";class uw extends wr{}uw.errorCode="unauthorized_client";class dw extends wr{}dw.errorCode="unsupported_grant_type";class fw extends wr{}fw.errorCode="invalid_scope";class hw extends wr{}hw.errorCode="access_denied";class pw extends wr{}pw.errorCode="server_error";class mw extends wr{}mw.errorCode="temporarily_unavailable";class gw extends wr{}gw.errorCode="unsupported_response_type";class vw extends wr{}vw.errorCode="unsupported_token_type";class yw extends wr{}yw.errorCode="invalid_token";class _w extends wr{}_w.errorCode="method_not_allowed";class bw extends wr{}bw.errorCode="too_many_requests";class ww extends wr{}ww.errorCode="invalid_client_metadata";class Sw extends wr{}Sw.errorCode="insufficient_scope";class Ew extends wr{}Ew.errorCode="invalid_target";const Uue={[aw.errorCode]:aw,[lw.errorCode]:lw,[cw.errorCode]:cw,[uw.errorCode]:uw,[dw.errorCode]:dw,[fw.errorCode]:fw,[hw.errorCode]:hw,[pw.errorCode]:pw,[mw.errorCode]:mw,[gw.errorCode]:gw,[vw.errorCode]:vw,[yw.errorCode]:yw,[_w.errorCode]:_w,[bw.errorCode]:bw,[ww.errorCode]:ww,[Sw.errorCode]:Sw,[Ew.errorCode]:Ew};async function X6(e){if(!e.getServerCapabilities()?.resources)return{resources:[]};try{return await e.listResources()}catch(n){if(n instanceof hv&&n.code===uf.MethodNotFound)return{resources:[]};throw n}}async function Eae(e,t){return await e.readResource({uri:t})}function Fue(e){const t=qn.c(12);let n,r;t[0]!==e?({client:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let o;t[3]!==n?(o=uv.mcpResourcesList(n),t[3]=n,t[4]=o):o=t[4];let s;t[5]!==n?(s=()=>X6(n),t[5]=n,t[6]=s):s=t[6];const l=r.staleTime??3e4;let c;return t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==l?(c={...r,queryKey:o,queryFn:s,staleTime:l,retry:!1},t[7]=r,t[8]=o,t[9]=s,t[10]=l,t[11]=c):c=t[11],ff(c)}function Bue(e){const t=qn.c(12);let n,r;t[0]!==e?({client:n,...r}=e,t[0]=e,t[1]=n,t[2]=r):(n=t[1],r=t[2]);let o;t[3]!==n?(o=uv.mcpResourcesList(n),t[3]=n,t[4]=o):o=t[4];let s;t[5]!==n?(s=()=>X6(n),t[5]=n,t[6]=s):s=t[6];const l=r.staleTime??3e4;let c;return t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==l?(c={...r,queryKey:o,queryFn:s,staleTime:l,retry:!1},t[7]=r,t[8]=o,t[9]=s,t[10]=l,t[11]=c):c=t[11],xM(c)}function Vue(e){const t=qn.c(15);let n,r,o;t[0]!==e?({client:n,uri:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o):(n=t[1],r=t[2],o=t[3]);let s;t[4]!==n||t[5]!==o?(s=uv.mcpReadResource(n,o),t[4]=n,t[5]=o,t[6]=s):s=t[6];let l;t[7]!==n||t[8]!==o?(l=()=>Eae(n,o),t[7]=n,t[8]=o,t[9]=l):l=t[9];const c=r.staleTime??3e4;let d;return t[10]!==r||t[11]!==s||t[12]!==l||t[13]!==c?(d={...r,queryKey:s,queryFn:l,staleTime:c,retry:!1},t[10]=r,t[11]=s,t[12]=l,t[13]=c,t[14]=d):d=t[14],ff(d)}const J6="ui-resource-html";function Hue(e){const t=qn.c(20);let n,r,o,s,l;t[0]!==e?({orgSlug:o,connectionId:n,uri:l,meshUrl:r,...s}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=l):(n=t[1],r=t[2],o=t[3],s=t[4],l=t[5]);let c;t[6]!==n||t[7]!==o||t[8]!==l?(c=uv.mcpUiResourceHtml(o,n,l),t[6]=n,t[7]=o,t[8]=l,t[9]=c):c=t[9];let d;t[10]!==n||t[11]!==r||t[12]!==o||t[13]!==l?(d=async()=>{const g=`${r??(typeof window<"u"?window.location.origin:"")}/api/${encodeURIComponent(o)}/mcp/${encodeURIComponent(n)}/ui-resource?uri=${encodeURIComponent(l)}`,v=await fetch(g,{credentials:"include"});if(!v.ok)throw new Error(`Failed to read UI resource (${v.status})`);return v.text()},t[10]=n,t[11]=r,t[12]=o,t[13]=l,t[14]=d):d=t[14];const f=s.staleTime??3e4;let p;return t[15]!==s||t[16]!==c||t[17]!==d||t[18]!==f?(p={...s,queryKey:c,queryFn:d,staleTime:f,retry:!1},t[15]=s,t[16]=c,t[17]=d,t[18]=f,t[19]=p):p=t[19],ff(p)}const xae=be({authorizationEndpoint:$().url(),tokenEndpoint:$().url(),introspectionEndpoint:$().url().optional(),clientId:$(),clientSecret:$().optional(),scopes:Re($()),grantType:an(["authorization_code","client_credentials"])}),XP=be({type:Ge("object"),properties:Pt($(),Gt()).optional(),required:Re($()).optional()}).catchall(Gt()),Rae=gE.extend({inputSchema:XP,outputSchema:XP.optional()}),Oae=be({headers:Pt($(),$()).optional()}),Tae=be({command:$().describe("Command to run (e.g., 'npx', 'node')"),args:Re($()).optional().describe("Command arguments"),cwd:$().optional().describe("Working directory"),envVars:Pt($(),$()).optional().describe("Environment variables (encrypted in storage)")}),eL=be({id:$().describe("Unique identifier for the connection"),title:$().describe("Human-readable name for the connection"),created_at:$().describe("When the connection was created"),updated_at:$().describe("When the connection was last updated"),created_by:$().describe("User ID who created the connection"),updated_by:$().optional().describe("User ID who last updated the connection"),organization_id:$().describe("Organization ID this connection belongs to"),description:$().nullable().describe("Description of the connection"),icon:$().nullable().describe("Icon URL for the connection"),app_name:$().nullable().describe("Associated app name"),app_id:$().nullable().describe("Associated app ID"),slug:$().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:an(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:$().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:$().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:nn([Tae,Oae]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:xae.nullable().describe("OAuth configuration"),configuration_state:Pt($(),Gt()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:Re($()).nullable().optional().describe("Configuration scopes"),metadata:Pt($(),Gt()).nullable().describe("Additional metadata (includes repository info)"),tools:Re(Rae).nullable().describe("Discovered tools from MCP"),bindings:Re($()).nullable().describe("Detected bindings"),status:an(["active","inactive","error"]).describe("Current status")});eL.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:$().nullish()});eL.partial();function que(e){return e!=null&&"command"in e}function Gue(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const Nd=be({connection_id:$().describe("Connection ID"),selected_tools:Re($()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:Re($()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:Re($()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),tL=Nd.extend({selected_tools:Nd.shape.selected_tools.optional(),selected_resources:Nd.shape.selected_resources.optional(),selected_prompts:Nd.shape.selected_prompts.optional()}),Cae=be({connectionId:$(),toolName:$(),label:$(),icon:$().nullable().optional()}),Aae=be({id:$().describe("Stable id; used as React key and ?tab= value"),title:$().describe("Tab label"),icon:$().optional().describe("Optional lucide icon name"),view:be({type:Ge("ext-app"),appId:$(),args:Pt($(),Gt()).optional()})}),Iae=be({defaultMainView:be({type:$(),id:$().optional(),toolName:$().optional()}).nullable().optional(),chatDefaultOpen:Nt().nullable().optional(),tabs:Re(Aae).optional()}),JP=be({tileId:$().optional(),connectionId:$().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:$().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:$().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:Pt($(),Gt()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:ht().int().positive().optional(),maxHeight:ht().int().positive().optional()}),wE=be({banner:$().nullable().optional(),bannerColor:$().nullable().optional(),icon:$().nullable().optional(),themeColor:$().nullable().optional(),pinnedViews:Re(Cae).nullable().optional(),layout:Iae.nullable().optional(),homeTile:JP.nullable().optional(),homeTiles:Re(JP).nullable().optional(),homePrompts:Re($()).nullable().optional()});function Kue(e){const t=e?.homeTiles;if(Array.isArray(t)&&t.length>0)return t;const n=e?.homeTile;return n?[n]:[]}const Pae=/^[A-Za-z_][A-Za-z0-9_]*$/,eM=$().min(1).regex(Pae,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),Mae=Ww("kind",[be({key:eM,kind:Ge("literal"),value:$()}),be({key:eM,kind:Ge("secret"),secretId:$().min(1)})]),SE=be({selected:$().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:$().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:$().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:Re(Mae).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that mesh resolves via the credential vault before posting /_sandbox/config.")}),EE=be({url:$().describe("GitHub repository URL"),owner:$().describe("Repository owner"),name:$().describe("Repository name"),installationId:ht().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:$().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials.")}),Nae=an(["agent-sandbox","user-desktop"]),kae=an(["agent-sandbox","user-desktop","cluster"]);function nL(e){return e==="cluster"?"agent-sandbox":e}const rL={sandboxHandle:$().describe("Provider-specific handle"),previewUrl:$().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:$().nullable().optional().describe("Daemon's public URL — what cluster→daemon RPCs target. Equal to previewUrl for user-desktop; null/absent for the agent-sandbox provider (routes through hosted ingress)."),sandboxProviderKind:Nae.optional(),createdAt:ht().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:be({packageManager:$().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:$().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:$().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},oL=be(rL),Dae=be({...rL,sandboxProviderKind:kae.optional()});function Lae(e){const t=Dae.parse(e);return oL.parse({...t,sandboxProviderKind:t.sandboxProviderKind?nL(t.sandboxProviderKind):void 0})}function Zue(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t=e,n={};for(const[r,o]of Object.entries(t)){if(!o||typeof o!="object"||r!=="cluster"&&r!=="agent-sandbox"&&r!=="user-desktop")continue;const s=nL(r);try{if(r==="cluster"&&n[s])continue;n[s]=Lae(o)}catch{}}return n}const xE=Pt($().describe("userId"),Pt($().describe("branch"),Pt($().describe("sandboxProviderKind"),oL))),$ae=be({id:$().describe("Stable identifier for this knowledge file"),name:$().describe("File name shown in the UI"),kind:an(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:$().describe("Org filesystem (Library) volume the file lives in"),path:$().describe("Path within the volume"),url:$().describe("Same-origin URL to read the file (display/download)"),contentType:$().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:ht().nullable().optional().describe("File size in bytes"),addedAt:$().describe("ISO timestamp when the file was attached")}),RE=Re($ae).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),Yue=be({id:$().describe("Unique identifier"),title:$().describe("Human-readable name"),description:$().nullable().describe("Description"),icon:$().nullable().describe("Icon URL"),created_at:$().describe("Creation timestamp"),updated_at:$().describe("Last update timestamp"),created_by:$().describe("User ID who created this item"),updated_by:$().optional().describe("User ID who last updated this item"),organization_id:$().describe("Organization ID this item belongs to"),status:an(["active","inactive"]).describe("Current status"),pinned:Nt().describe("Whether this space is pinned to the sidebar"),metadata:be({instructions:$().nullable().describe("Instructions also used as system prompt"),enabled_plugins:Re($()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:Re($()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:$().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:wE.nullable().optional().describe("UI customization settings"),githubRepo:EE.nullable().optional().describe("Linked GitHub repository"),runtime:SE.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:xE.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:RE,siteSlug:$().nullable().optional().describe("Linked asset site slug (managed storage tenancy)")}).loose().describe("Metadata"),connections:Re(Nd).describe("Connections with their selected tools, resources, and prompts")}),iL=be({title:$().min(1).max(120).describe("Short label shown on the chip"),description:$().max(280).optional().describe("One-line subtitle shown under the title"),text:$().min(1).describe("The message sent to the agent when the prompt is clicked")});be({title:$().min(1).max(255).describe("Name for the virtual MCP"),description:$().nullable().optional().describe("Optional description"),icon:$().nullish().describe("Optional icon URL"),status:an(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:Nt().optional().default(!1).describe("Pin to sidebar"),metadata:be({instructions:$().nullable().optional().describe("MCP server instructions"),enabled_plugins:Re($()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:Re($()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:$().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:wE.nullable().optional().describe("UI customization settings"),githubRepo:EE.nullable().optional().describe("Linked GitHub repository"),runtime:SE.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:xE.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:RE,siteSlug:$().nullable().optional().describe("Linked asset site slug (managed storage tenancy)")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:Re(tL).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:Re(iL).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});be({title:$().min(1).max(255).optional().describe("New name"),description:$().nullable().optional().describe("New description (null to clear)"),icon:$().nullish().describe("New icon URL"),status:an(["active","inactive"]).optional().describe("New status"),pinned:Nt().optional().describe("Pin/unpin from sidebar"),metadata:be({instructions:$().nullable().optional().describe("MCP server instructions"),enabled_plugins:Re($()).nullable().optional().describe("List of enabled plugin IDs"),subAgents:Re($()).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:$().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:wE.nullable().optional().describe("UI customization settings"),githubRepo:EE.nullable().optional().describe("Linked GitHub repository"),runtime:SE.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),sandboxMap:xE.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }"),knowledge:RE,siteSlug:$().nullable().optional().describe("Linked asset site slug (managed storage tenancy)")}).loose().nullable().optional().describe("Additional metadata including MCP server instructions"),connections:Re(tL).optional().describe("New connections (replaces existing)"),prompts:Re(iL).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});var tM;(function(e){e.Completable="McpCompletable"})(tM||(tM={}));const jae="mesh-ui-resources",Ag="html",zae=10080*60*1e3,Uae=50,Fae=16*1024*1024;function Bae(e){return e[0]==="mcp"&&e[1]===J6}function yv(){return new Promise((e,t)=>{const n=indexedDB.open(jae,1);n.onupgradeneeded=()=>{n.result.objectStoreNames.contains(Ag)||n.result.createObjectStore(Ag)},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}function eu(e,t){return e.transaction(Ag,t).objectStore(Ag)}function xw(e){return new Promise((t,n)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>n(e.error)})}async function Vae(e){if(!(typeof indexedDB>"u"))try{const t=await yv(),n=eu(t,"readonly"),r=await xw(n.getAllKeys()),o=await xw(n.getAll()),s=Date.now(),l=r.map((f,p)=>({key:f,value:o[p]})).sort((f,p)=>(p.value?.updatedAt??0)-(f.value?.updatedAt??0)),c=[];let d=0;for(const{key:f,value:p}of l){if(!p||s-p.updatedAt>zae||d>=Uae){c.push(f);continue}d++;try{const g=JSON.parse(String(f));e.getQueryData(g)===void 0&&e.setQueryData(g,p.html,{updatedAt:0})}catch{c.push(f)}}if(c.length>0){const f=eu(t,"readwrite");for(const p of c)f.delete(p)}}catch{}}function Hae(e){if(typeof indexedDB>"u")return()=>{};const t=yv().catch(()=>null);return e.getQueryCache().subscribe(n=>{const r=n.query;if(!Array.isArray(r.queryKey)||!Bae(r.queryKey)||r.state.status!=="success")return;const o=r.state.data;typeof o!="string"||o.length>Fae||t.then(s=>{if(s)try{eu(s,"readwrite").put({html:o,updatedAt:Date.now()},JSON.stringify(r.queryKey))}catch{}})})}function qae(){typeof indexedDB>"u"||yv().then(e=>eu(e,"readwrite").clear()).catch(()=>{})}async function Wue(e){if(!(typeof indexedDB>"u"))try{const t=await yv(),n=await xw(eu(t,"readonly").getAllKeys()),r=eu(t,"readwrite");for(const o of n)try{const s=JSON.parse(String(o));s[1]===J6&&s[3]===e&&r.delete(o)}catch{}}catch{}}const Ig="mesh:rq-cache",sL=1440*60*1e3,Gae=1e3,Kae=new Set(["publicConfig","ai-provider-keys","organization-settings","home-next-actions"]),Zae=new Set(["VIRTUAL_MCP","CONNECTIONS"]);let aL=!1,lL=!1;function Yae(e){const t=e[0];return typeof t=="string"&&Kae.has(t)?!0:e[3]==="collection"&&typeof e[4]=="string"&&Zae.has(e[4])}function Wae(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(Ig);if(!t)return;const n=JSON.parse(t),r=!n.timestamp||Date.now()-n.timestamp>sL;if(n.buster!=="4.91.9"||r||!n.state){window.localStorage.removeItem(Ig);return}f8(e,n.state),aL=!0}catch{Xae()}}function Qae(e){if(typeof window>"u")return()=>{};let t=null;const n=()=>{t=null;try{const r=d8(e,{shouldDehydrateQuery:o=>o.state.status==="success"&&Yae(o.queryKey)});window.localStorage.setItem(Ig,JSON.stringify({buster:"4.91.9",timestamp:Date.now(),state:r}))}catch{}};return e.getQueryCache().subscribe(()=>{t==null&&(t=setTimeout(n,Gae))})}const cL="studio:org-cache:";function uL(e){return`${cL}${e}`}function Que(e,t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(uL(e));if(!n)return null;const r=JSON.parse(n)[t];return!r||Date.now()-r.updatedAt>sL?null:(lL=!0,r)}catch{return null}}function Xue(e,t,n){if(!(typeof window>"u"))try{const r=uL(e),o=window.localStorage.getItem(r),s=o?JSON.parse(o):{};s[t]={data:n,updatedAt:Date.now()},window.localStorage.setItem(r,JSON.stringify(s))}catch{}}function Xae(){if(qae(),!(typeof window>"u"))try{window.localStorage.removeItem(Ig);for(let e=window.localStorage.length-1;e>=0;e--){const t=window.localStorage.key(e);t?.startsWith(cL)&&window.localStorage.removeItem(t)}}catch{}}function Jae(){return aL}function ele(){return lL}let ps=!1,Rw=null,nM=!1;const OE="mesh:lp-distinct-id",Cb="/api/_reports/link-token/",tle=1440*60*1e3;function dL(e){const t="https://analytics.invalid",n=/^[a-z][a-z\d+.-]*:\/\//i.test(e),r=e.startsWith("//");try{const o=new URL(e,t);let s=!1;for(const l of["key","d"])o.searchParams.has(l)&&(o.searchParams.delete(l),s=!0);return o.pathname.startsWith(Cb)&&o.pathname!==Cb&&(o.pathname=`${Cb}redacted`,s=!0),s?n?o.toString():r?`//${o.host}${o.pathname}${o.search}${o.hash}`:`${o.pathname}${o.search}${o.hash}`:e}catch{return e}}function Ab(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,typeof n=="string"?dL(n):n]))}const nle=e=>e?(e.properties=Ab(e.properties),e.$set&&(e.$set=Ab(e.$set)),e.$set_once&&(e.$set_once=Ab(e.$set_once)),e):null;function fL(){try{const e=window.localStorage.getItem(OE);if(!e)return;const{id:t,ts:n}=JSON.parse(e);return typeof t!="string"||!t||typeof n!="number"?void 0:Date.now()-n<=tle?t:void 0}catch{return}}function rle(){try{window.localStorage.removeItem(OE)}catch{}}function ole(){try{const e=new URL(window.location.href),t=e.searchParams.get("ph_did");t&&(window.localStorage.setItem(OE,JSON.stringify({id:t,ts:Date.now()})),e.searchParams.delete("ph_did"),window.history.replaceState(window.history.state,"",e.toString()));const n=t??fL();return n?Object.keys(window.localStorage).some(o=>o.startsWith("ph_")&&o.endsWith("_posthog"))?void 0:n:void 0}catch{return}}function ile(e){const t=fL();if(t&&(rle(),t!==e))try{_l.alias(t)}catch{}}function sle(e,t){if(ps||typeof window>"u")return;const n=ole();_l.init(e,{api_host:t,ui_host:"https://us.posthog.com",cross_subdomain_cookie:!0,...n?{bootstrap:{distinctID:n}}:{},capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,before_send:nle,capture_performance:{web_vitals:!0,network_timing:!0},capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture",maskCapturedNetworkRequestFn:r=>({...r,...typeof r.name=="string"?{name:dL(r.name)}:{}})},person_profiles:"identified_only"}),ps=!0}function ale(e,t){ps&&(_l.identify(e,t),ile(e))}function lle(){ps&&(_l.reset(),Rw=null)}function cle(e,t){ps&&_l.capture(e,t)}function Jue(){return ps}function ede(){if(!ps||nM||typeof performance>"u")return;nM=!0;const e=performance.getEntriesByType("navigation")[0],t=n=>{const r=performance.getEntriesByName(n,"measure")[0];return r?Math.round(r.duration):void 0};cle("perf_app_bootstrap",{nav_type:e?.type,ttfb_ms:e?Math.round(e.responseStart):void 0,dom_interactive_ms:e?Math.round(e.domInteractive):void 0,dom_content_loaded_ms:e?Math.round(e.domContentLoadedEventEnd):void 0,config_fetch_ms:t("mesh:config-fetch"),active_org_fetch_ms:t("mesh:active-org-fetch"),time_to_shell_ms:Math.round(performance.now()),cache_restored:Jae(),org_cache_restored:ele()})}function tde(e,t){ps&&e!==Rw&&(_l.group("organization",e,t),Rw=e)}function hL(e,t){if(ps)try{_l.captureException(e,t)}catch{}}let mm=null;function ule({children:e}){const t=OM(),{data:n}=Hg.useSession();if(t.posthog){sle(t.posthog.key,t.posthog.host);const r=n?.user?.id??null;r&&r!==mm?(ale(r,{email:n?.user?.email,name:n?.user?.name}),mm=r):!r&&mm&&(lle(),mm=null)}return C.jsx(C.Fragment,{children:e})}const TE=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M12 9v4m0 4h.01M10.615 3.892 2.39 18.098c-.456.788-.684 1.182-.65 1.506a1 1 0 0 0 .406.705c.263.191.718.191 1.629.191h16.45c.91 0 1.365 0 1.628-.191a1 1 0 0 0 .407-.705c.034-.324-.195-.718-.65-1.506L13.383 3.892c-.454-.785-.681-1.178-.978-1.31a1 1 0 0 0-.813 0c-.296.132-.523.525-.978 1.31Z"}));TE.displayName="AlertTriangle";const pL=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M4 7.997a2.295 2.295 0 0 1-.39-.035A2 2 0 0 1 2.038 6.39C2 6.197 2 5.965 2 5.5s0-.697.038-.89A2 2 0 0 1 3.61 3.038C3.803 3 4.035 3 4.5 3h15c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89s0 .697-.038.89a2 2 0 0 1-1.572 1.572c-.107.02-.226.03-.39.035M10 13h4M4 8h16v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 21 16.88 21 15.2 21H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 18.72 4 17.88 4 16.2V8Z"}));pL.displayName="Archive";const CE=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M12 2.25v2.5M12 18v4M5.75 12h-3.5m19 0h-1.5m-1.293 6.457-.707-.707m.914-12.334L17.25 6.83M4.922 19.078 7.75 16.25M5.129 5.209 7.25 7.33"}));CE.displayName="Loading01";const mL=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M17 10V8A5 5 0 0 0 7 8v2m5 4.5v2M8.8 21h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 18.72 20 17.88 20 16.2v-1.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 10 16.88 10 15.2 10H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 12.28 4 13.12 4 14.8v1.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 21 7.12 21 8.8 21Z"}));mL.displayName="Lock01";const gL=({size:e=24,color:t="currentColor",...n})=>P.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},P.createElement("path",{d:"M21 10s-2.005-2.732-3.634-4.362a9 9 0 1 0 2.282 8.862M21 10V4m0 6h-6"}));gL.displayName="RefreshCw01";function AE(){const e=qn.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=C.jsx("div",{className:"flex items-center justify-center min-h-screen w-full",children:C.jsx(CE,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=t):t=e[0],t}function dle(e){try{return JSON.parse(e)}catch{return}}function rM(e,t){const n=localStorage.getItem(e),r=n?dle(n):void 0,o=typeof t=="function"?t(r):r??t;if(r===void 0||o!==r)try{const s=JSON.stringify(o);localStorage.setItem(e,s)}catch{}return o}function fle(e,t){const n=qn.c(25),r=Nw();let o;n[0]!==e?(o=["localStorage",e],n[0]=e,n[1]=o):o=n[1];const s=o;let l,c;n[2]!==t||n[3]!==e?(l=()=>rM(e,t),c=()=>rM(e,t),n[2]=t,n[3]=e,n[4]=l,n[5]=c):(l=n[4],c=n[5]);let d;n[6]!==s||n[7]!==l||n[8]!==c?(d={queryKey:s,queryFn:l,initialData:c,staleTime:1/0,gcTime:1/0},n[6]=s,n[7]=l,n[8]=c,n[9]=d):d=n[9];const{data:f}=xM(d);let p;n[10]!==e?(p=async E=>{const T=JSON.stringify(E);return localStorage.setItem(e,T),E},n[10]=e,n[11]=p):p=n[11];let h;n[12]!==r||n[13]!==s?(h=E=>{r.setQueryData(s,E)},n[12]=r,n[13]=s,n[14]=h):h=n[14];let g;n[15]!==p||n[16]!==h?(g={mutationFn:p,onSuccess:h},n[15]=p,n[16]=h,n[17]=g):g=n[17];const v=L8(g);let _;n[18]!==v||n[19]!==r||n[20]!==s?(_=E=>{const T=r.getQueryData(s),R=typeof E=="function"?E(T):E;v.mutate(R)},n[18]=v,n[19]=r,n[20]=s,n[21]=_):_=n[21];const b=_,x=f;let S;return n[22]!==b||n[23]!==x?(S=[x,b],n[22]=b,n[23]=x,n[24]=S):S=n[24],S}const su={chatSelectedImageModel:e=>`mesh:chat:selectedImageModel:${e}`,chatSelectedWebSearchModel:e=>`mesh:chat:selectedWebSearchModel:${e}`,chatSelectedDeepResearchModel:e=>`mesh:chat:selectedDeepResearchModel:${e}`,chatSimpleModeTier:e=>`mesh:chat:simpleModeTier:${e}`,chatLastAgentOption:e=>`mesh:chat:lastAgentOption:${e}`,chatAutosend:(e,t)=>`mesh:chat:autosend:${e}:${t}`,chatDraft:(e,t)=>`mesh:chat:draft:${e}:${t}`,sidePanelWidth:()=>"mesh:side-panel:width",sidebarOpen:()=>"mesh:sidebar-open",preferences:()=>"mesh:user:preferences",lastOrgSlug:()=>"mesh:last-org-slug",lastLocation:()=>"mesh:last-location",connectionsTab:e=>`mesh:connections:tab:${e}`,taskLastViewed:e=>`mesh:chat:task-last-viewed:${e}`,sidebarGroupOrder:(e,t)=>`sidebar.group-order.${e}.${t}`},hle=["en","pt-BR"];function vL(){return typeof navigator<"u"&&navigator.language?.toLowerCase().startsWith("pt")?"pt-BR":"en"}const ple={toolApprovalLevel:"auto",enableNotifications:typeof Notification<"u",enableSounds:!1,theme:"system",language:vL()},yL=["auto","readonly"],nde=[{value:"readonly",label:"Ask before edit",short:"Ask"},{value:"auto",label:"Auto approve",short:"Auto"}],mle=["light","dark","system"];function rde(){try{const e=JSON.parse(localStorage.getItem(su.preferences())??"{}");if(yL.includes(e.toolApprovalLevel))return e.toolApprovalLevel}catch{}return"auto"}function gle(){const e=qn.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=su.preferences(),e[0]=t):t=e[0],fle(t,vle)}function vle(e){const t={...ple,...e};return yL.includes(t.toolApprovalLevel)||(t.toolApprovalLevel="auto"),mle.includes(t.theme)||(t.theme="system"),hle.includes(t.language)||(t.language=vL()),t}async function yle(){performance.mark("mesh:config-fetch:start");try{const e=await fetch("/api/config");if(!e.ok)throw new Error("Failed to load public configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load public configuration");return t.config}finally{performance.mark("mesh:config-fetch:end"),performance.measure("mesh:config-fetch","mesh:config-fetch:start","mesh:config-fetch:end")}}function _le(e){if(!e)return;const t=document.getElementById("mesh-theme-overrides");t&&t.remove();const n=[];if(e.light&&Object.keys(e.light).length>0){const r=Object.entries(e.light).map(([o,s])=>` ${o}: ${s};`).join(`
|
|
164
164
|
`);n.push(`:root {
|
|
165
165
|
${r}
|
|
166
166
|
}`)}if(e.dark&&Object.keys(e.dark).length>0){const r=Object.entries(e.dark).map(([o,s])=>` ${o}: ${s};`).join(`
|
|
@@ -168,4 +168,4 @@ ${r}
|
|
|
168
168
|
${r}
|
|
169
169
|
}`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
|
|
170
170
|
|
|
171
|
-
`),document.head.appendChild(r)}}function ble(e){const t=qn.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:RM.publicConfig(),queryFn:yle,staleTime:1/0},t[0]=r):r=t[0];const{data:o}=ff(r),[s]=gle();let l,c;t[1]!==o.theme?(l=()=>{_le(o.theme)},c=[o.theme],t[1]=o.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),P.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const h=document.documentElement,g=()=>{const x=document.querySelector('meta[name="theme-color"]');if(!x)return;const S=getComputedStyle(h).getPropertyValue("--sidebar").trim();if(!S)return;const E=document.createElement("canvas").getContext("2d");if(!E)return;E.fillStyle="#010203";const T=E.fillStyle;E.fillStyle=S;const R=E.fillStyle;R!==T&&(x.content=R)};if(s.theme==="dark"){h.classList.add("dark"),g();return}if(s.theme==="light"){h.classList.remove("dark"),g();return}const v=window.matchMedia("(prefers-color-scheme: dark)"),_=x=>{h.classList.toggle("dark",x),g()};_(v.matches);const b=x=>_(x.matches);return v.addEventListener("change",b),()=>v.removeEventListener("change",b)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),P.useLayoutEffect(d,f);let p;return t[7]!==n?(p=C.jsx(C.Fragment,{children:n}),t[7]=n,t[8]=p):p=t[8],p}const kf=new R8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});Wae(kf);Qae(kf);Vae(kf);Hae(kf);function wle(e){const t=qn.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=C.jsx(DG,{}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=C.jsx(AE,{}),t[1]=o):o=t[1];let s;return t[2]!==n?(s=C.jsxs(O8,{client:kf,children:[r,C.jsx(P.Suspense,{fallback:o,children:C.jsx(ble,{children:C.jsx(j8,{children:C.jsx(cne,{children:C.jsx(ule,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function IE(){const e=qn.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=C.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 h-full w-full flex items-center justify-center",children:C.jsx(CE,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=t):t=e[0],t}function Sle(...e){return DN(tS(e))}const Ele=i4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",xl:"h-12 px-4 has-[>svg]:px-3.5",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function df(e){const t=qn.c(14);let n,r,o,s,l;t[0]!==e?({className:n,variant:l,size:o,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=l):(n=t[1],r=t[2],o=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?fS:"button";let f;t[6]!==n||t[7]!==o||t[8]!==l?(f=Sle(Ele({variant:l,size:o,className:n})),t[6]=n,t[7]=o,t[8]=l,t[9]=f):f=t[9];let p;return t[10]!==d||t[11]!==r||t[12]!==f?(p=C.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=p):p=t[13],p}const xle=["radial-gradient(ellipse 85% 85% at 0% 0%, rgba(165,149,255,0.6) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 100% 100%, rgba(208,236,26,0.52) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 0% 100%, rgba(255,193,22,0.48) 0%, transparent 72%)"].join(", ");function Rle(e){const t=qn.c(3),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=C.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:xle}}),t[0]=r):r=t[0];let o;return t[1]!==n?(o=C.jsxs("div",{className:"relative flex items-center justify-center min-h-screen bg-background overflow-hidden",children:[r,C.jsx("div",{className:"relative flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:n})]}),t[1]=n,t[2]=o):o=t[2],o}function _L(e){const t=qn.c(9),{orgName:n}=e,r=Ole;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=C.jsx("div",{className:"bg-muted p-3 rounded-full",children:C.jsx(pL,{className:"h-6 w-6 text-muted-foreground"})}),t[0]=o):o=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=C.jsx("h3",{className:"text-lg font-medium",children:"Organization unavailable"}),t[1]=s):s=t[1];let l;t[2]!==n?(l=n?C.jsxs(C.Fragment,{children:[C.jsx("strong",{children:n})," has been deleted or is no longer available."]}):"This organization has been deleted or is no longer available.",t[2]=n,t[3]=l):l=t[3];let c;t[4]!==l?(c=C.jsxs("div",{className:"space-y-2",children:[s,C.jsx("p",{className:"text-sm text-muted-foreground",children:l})]}),t[4]=l,t[5]=c):c=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=C.jsx(df,{onClick:r,children:"Go to home"}),t[6]=d):d=t[6];let f;return t[7]!==c?(f=C.jsxs(Rle,{children:[o,c,d]}),t[7]=c,t[8]=f):f=t[8],f}function Ole(){window.location.href="/"}function Tle(){const e=qn.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:n}=Dg(t);let r;return e[1]!==n?(r=C.jsx(df,{variant:"outline",size:"sm",asChild:!0,children:C.jsx(pf,{to:"/$org/settings/profile",params:{org:n},children:"Go to your profile"})}),e[1]=n,e[2]=r):r=e[2],r}function Cle(e){const t=qn.c(13),{area:n,description:r,action:o}=e,s=n?`No access to ${n}`:"No access",l=r??"Your role doesn't include permission for this section. Ask an organization admin to update your role if you need it.";let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=C.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:C.jsx(mL,{size:28})}),t[0]=c):c=t[0];let d;t[1]!==s?(d=C.jsx("h3",{className:"text-lg font-medium",children:s}),t[1]=s,t[2]=d):d=t[2];let f;t[3]!==l?(f=C.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:l}),t[3]=l,t[4]=f):f=t[4];let p;t[5]!==d||t[6]!==f?(p=C.jsxs("div",{className:"space-y-1",children:[d,f]}),t[5]=d,t[6]=f,t[7]=p):p=t[7];let h;t[8]!==o?(h=o??C.jsx(Tle,{}),t[8]=o,t[9]=h):h=t[9];let g;return t[10]!==p||t[11]!==h?(g=C.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[c,p,h]}),t[10]=p,t[11]=h,t[12]=g):g=t[12],g}const oM="__mesh_chunk_reload_ts";function bL(e){return e?.message==="Organization is archived"}function Ale(e){return!!e?.message?.includes("Access denied")}function iM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class ode extends P.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),hL(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:bL(this.state.error)?C.jsx(_L,{}):Ale(this.state.error)?C.jsx(Cle,{}):C.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:C.jsx(TE,{className:"h-6 w-6 text-destructive"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),C.jsx(df,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class Ile extends P.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=iM(t);if(hL(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const o=sessionStorage.getItem(oM),s=Date.now();(!o||s-Number(o)>1e4)&&(sessionStorage.setItem(oM,String(s)),window.location.reload())}render(){return this.state.hasError&&iM(this.state.error)?C.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:C.jsx(gL,{className:"h-6 w-6 text-primary"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),C.jsx(df,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?bL(this.state.error)?C.jsx(_L,{}):C.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:C.jsx(TE,{className:"h-6 w-6 text-destructive"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),C.jsx(df,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}function wL(e){try{localStorage.setItem(su.lastLocation(),JSON.stringify(e))}catch{}}function Ple(){try{const e=localStorage.getItem(su.lastLocation());if(!e)return null;const t=JSON.parse(e);if(typeof t?.org=="string")return{org:t.org,taskId:typeof t.taskId=="string"?t.taskId:void 0,virtualmcpid:typeof t.virtualmcpid=="string"?t.virtualmcpid:void 0}}catch{}return null}function ide(){try{localStorage.removeItem(su.lastLocation())}catch{}}let us=null,sM=!1;const Ow=new Set;function Pg(){for(const e of Ow)e()}function Mle(){sM||typeof window>"u"||(sM=!0,window.addEventListener("beforeinstallprompt",e=>{e.preventDefault(),us=e,Pg()}),window.addEventListener("appinstalled",()=>{us=null,Pg()}))}function sde(){us!==null&&(us=null,Pg())}function Nle(e){return Ow.add(e),()=>{Ow.delete(e)}}function kle(){return us}function Dle(){return null}function Lle(){if(typeof window>"u")return!1;const e=typeof window.matchMedia=="function"&&["(display-mode: standalone)","(display-mode: window-controls-overlay)"].some(n=>window.matchMedia(n).matches),t=navigator.standalone===!0;return e||t}function $le(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)?!0:e.includes("Macintosh")&&typeof document<"u"&&"ontouchend"in document}function ade(){const e=qn.c(5),t=P.useSyncExternalStore(Nle,kle,Dle);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Lle(),e[0]=n):n=e[0];const r=n,o=t!==null&&!r;let s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=$le(),l=jle,e[1]=s,e[2]=l):(s=e[1],l=e[2]);let c;return e[3]!==o?(c={canPrompt:o,installed:r,ios:s,promptInstall:l},e[3]=o,e[4]=c):c=e[4],c}async function jle(){if(!us)return"unavailable";await us.prompt();const e=await us.userChoice;return us=null,Pg(),e.outcome}const qo=mz({component:()=>C.jsx(Ile,{children:C.jsx(wle,{children:C.jsx(P.Suspense,{fallback:C.jsx(AE,{}),children:C.jsx(JM,{})})})})}),zle=it({getParentRoute:()=>qo,path:"/login",component:dt(()=>ut(()=>import("./login-Do6TgRIo.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),validateSearch:ms(()=>be({next:$().optional(),client_id:$().optional(),redirect_uri:$().optional(),response_type:$().optional(),state:$().optional(),scope:$().optional(),code_challenge:$().optional(),code_challenge_method:$().optional()}))}),Ule=it({getParentRoute:()=>qo,path:"/cli/auth-success",component:dt(()=>ut(()=>import("./cli-auth-success-CTMG4H1f.js"),__vite__mapDeps([7,6])))}),Fle=it({getParentRoute:()=>qo,path:"/reset-password",component:dt(()=>ut(()=>import("./reset-password-CaOCmfjG.js"),__vite__mapDeps([8,2]))),validateSearch:ms(()=>be({token:$().optional(),error:$().optional()}))}),Ble=it({getParentRoute:()=>qo,path:"/auth/$pathname",component:dt(()=>ut(()=>import("./auth-catchall-TfMww9uU.js"),[]))}),Vle=it({getParentRoute:()=>qo,path:"/oauth/callback",component:dt(()=>ut(()=>import("./oauth-callback-BZF3sDi_.js"),__vite__mapDeps([9,10,11])))}),Hle=it({getParentRoute:()=>qo,path:"/oauth/callback/ai-provider",component:dt(()=>ut(()=>import("./oauth-callback-ai-provider-_pj0nd1a.js"),[]))}),_v=it({getParentRoute:()=>qo,path:"/_admin",component:dt(()=>ut(()=>import("./layout-Dt6m6-0O.js"),__vite__mapDeps([12,13,14,15])))}),qle=it({getParentRoute:()=>_v,path:"/",beforeLoad:()=>{throw sa({to:"/_admin/users"})}}),Gle=it({getParentRoute:()=>_v,path:"/users",component:dt(()=>ut(()=>import("./users-DdsOhIus.js"),__vite__mapDeps([16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36])))}),Kle=it({getParentRoute:()=>_v,path:"/orgs",component:dt(()=>ut(()=>import("./orgs-Du0NBZyd.js"),__vite__mapDeps([37,17,18,19,20,21,22,23,24,25,26,27,28,2,38,32,39,40,41,42,33,34,35])))}),Zle=_v.addChildren([qle,Gle,Kle]),PE=it({getParentRoute:()=>qo,id:"shell",component:dt(()=>ut(()=>import("./shell-layout--OzmrVJL.js").then(e=>e.s),__vite__mapDeps([43,29,30,44,45,46,47,48,49,50,51,39,21,14,52,53,11,54,55,4,5,56,57,58,59])))}),Yle=it({getParentRoute:()=>PE,path:"/",beforeLoad:async()=>{const e=Ple();if(e)throw sa({to:"/$org",params:{org:e.org}});const t=localStorage.getItem(su.lastOrgSlug());if(t)throw sa({to:"/$org",params:{org:t}});const{data:n}=await _N();if(!n)return;const r=n[0];throw sa(r?{to:"/$org",params:{org:r.slug}}:{to:"/onboarding"})}}),Wle=it({getParentRoute:()=>qo,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await _N();if(e&&e.length>0)throw sa({to:"/"})},component:dt(()=>ut(()=>import("./onboarding-Czdprpvz.js"),__vite__mapDeps([60,14,6,61,29,30,2,38,62,44,48,63,64,65])))}),Qle=it({getParentRoute:()=>qo,path:"/commerce-onboarding",component:dt(()=>ut(()=>import("./commerce-onboarding-C6VsjPTp.js"),__vite__mapDeps([66,67,53,11,68,69,70,71,72,25,73,74,75,76,77,78,44,48,41,42,79,80,46,81,82,83,49,84,63,85,86,87,88,19,89,90,91,92,64,93,94,45,28,95,96,97,65,30,98,47,21,50,39,22,99,100,101,102,38,2,32,103,104,10,1,3,4,5,6,61,29]))),validateSearch:ms(()=>be({org:$().optional(),siteUrl:$().optional()}))}),Xle=it({getParentRoute:()=>qo,path:"/report/$domain",component:dt(()=>ut(()=>import("./reports-CXz9lYL5.js"),__vite__mapDeps([105,1,2,3,4,5,71,25,74,76,48,83,92,45,95,96,50,106]))),validateSearch:ms(()=>be({key:$().optional()}))}),bv=it({getParentRoute:()=>PE,path:"/$org",beforeLoad:({params:e})=>{wL({org:e.org})},component:dt(()=>ut(()=>import("./org-layout-BVqi37tr.js"),[]))}),Df=it({getParentRoute:()=>bv,id:"org-shell",component:dt(()=>ut(()=>import("./index-CsEQ1NUp.js"),__vite__mapDeps([107,18,19,20,21,22,67,53,11,68,69,70,71,72,25,73,74,75,76,77,78,44,48,41,42,79,80,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,94,45,28,95,96,97,65,30,98,47,50,39,99,100,101,102,38,2,32,103,104,10,56,108,109,110,111,112,113,52,54,55,4,5,58,114,115,116,57,117,118,119,120,121,122,123,124,125,43,29,51,14,59,126,127,128,129,130,3,131,132,40,133,134,135,31,136,15,137,138,139,140,141,142,143,144,145,146,34,35,147])))}),SL=it({getParentRoute:()=>Df,id:"agent-shell",pendingComponent:IE,component:dt(()=>ut(()=>import("./index-DLW3irxF.js").then(e=>e.b1),__vite__mapDeps([148,25,113,52,54,53,11,55,4,5,58,109,110,114,115,56,116,57,149,40,22,41,42,129,130,123,132,18,19,20,21,24,26,150,139,146,71,48,80,70,72,73,69,74,75,76,77,78,44,79,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,94,45,28,95,96,97,65,30,98,47,50,151,136,29,34,35,152,153,39,154,155,156,157,43,51,14,59,68,124,125,158,102,38,2,118,122,159,36,119,120,101,104,10,100,160,111,143,144,99,161,142,126,127,128,3,131,133,134,135,31,141,162,163,108,164,165,166,112,147,32,167,168,169,117,170,17,27,171,62,121,103,172,173,174,175,176])))}),Jle=be({virtualmcpid:$().optional(),tab:$().optional(),sidepanel:nn([Ge("chat"),Ge(0)]).optional(),main:nn([$(),Ge(0)]).optional(),preview:$().optional(),id:$().optional(),toolName:$().optional(),tasks:ht().optional(),mainOpen:ht().optional(),autosend:$().optional(),runLocally:$().optional(),connect:sN().optional(),siteUrl:$().optional()}),ece=it({getParentRoute:()=>SL,path:"/$taskId",validateSearch:Jle,beforeLoad:({params:e,search:t})=>{wL({org:e.org,taskId:e.taskId,virtualmcpid:t.virtualmcpid})},component:()=>null}),tce=be({main:$().optional(),connect:sN().optional(),siteUrl:$().optional()}),nce=it({getParentRoute:()=>Df,path:"/",validateSearch:tce,pendingComponent:IE,component:dt(()=>ut(()=>import("./index-C5YbJK8s.js"),__vite__mapDeps([177,53,11,54,55,4,5,125])))}),rce=be({path:$().optional(),preview:$().optional(),skill:$().optional()}),oce=it({getParentRoute:()=>Df,path:"/files",validateSearch:rce,pendingComponent:IE,component:dt(()=>ut(()=>import("./index-CLJMiUTu.js").then(e=>e.Y),__vite__mapDeps([166,83,64,94,45,65,47,50,20,112,39,21,2,153,41,81,82,78,56,147,92,32,115,108,133,42,111,22,88,89,155,87,160,79,80,19,96,97])))}),ice=be({task:$().optional()}),sce=it({getParentRoute:()=>Df,path:"/board",validateSearch:ice,component:dt(()=>ut(()=>import("./index-DRPk1PX9.js").then(e=>e.n),__vite__mapDeps([159,36,29,30,70,71,72,25,73,69,74,75,76,77,78,44,48,41,42,79,80,46,81,82,83,49,84,63,85,86,87,88,19,89,90,91,92,64,93,94,45,28,95,96,97,65,98,47,21,50,53,11,119,120,39,123,110,101,104,10,100,150,139,58,55,4,116,34,35,160,111,143,144,157,152,118,43,51,14,52,54,5,56,57,59,99])))}),Dn=it({getParentRoute:()=>bv,path:"/settings",component:dt(()=>ut(()=>import("./settings-layout-tx09mNx7.js"),__vite__mapDeps([178,13,18,19,20,21,22,17,77,44,86,88,95,30,50,51,169,179,58,168,167,116,55,4,147,145,117])))}),ace=it({getParentRoute:()=>bv,path:"/install",component:dt(()=>ut(()=>import("./org-install-Bx1yNGFY.js"),[]))}),lce=it({getParentRoute:()=>Dn,path:"/",component:dt(()=>ut(()=>import("./index-redirect-B6UR7kjq.js"),__vite__mapDeps([180,169,181])))}),cce=it({getParentRoute:()=>Dn,path:"/connections",component:dt(()=>ut(()=>import("./connections-DjOWA5lE.js"),__vite__mapDeps([182,100,53,11,183,160,41,79,80,25,85,22,184,31,27,28,135,127,128,123,110,57,58,129,130,3,4,5,131,132,68,69,70,71,72,73,74,75,76,77,78,44,48,42,46,81,82,83,49,84,63,86,87,88,19,89,90,91,92,64,93,94,45,95,96,97,65,30,98,47,21,50,26,17,18,20,185,112,169,186,39,118,102,38,2,40,133,109,134,104,10,163]))),validateSearch:ms(()=>be({action:an(["create"]).optional(),tab:an(["all","connected"]).optional()}))}),uce=it({getParentRoute:()=>Dn,path:"/connections/$appSlug",component:dt(()=>ut(()=>import("./connection-detail-BWWiaQfL.js"),__vite__mapDeps([187,100,53,11,26,134,2,94,97,188,17,18,19,20,21,22,120,78,88,123,110,128,57,58,40,41,42,156,189,144,70,71,72,25,73,69,74,75,76,77,44,48,79,80,46,81,82,83,49,84,63,85,86,87,89,90,91,92,64,93,45,28,95,96,65,30,98,47,50,111,109,190,124,54,55,4,5,125,171,31,10,150,139,29,158,68,102,38,185,112,191,161,131,122,132,160]))),validateSearch:ms(()=>be({tab:$().optional()}))}),dce=it({getParentRoute:()=>Dn,path:"/connections/$appSlug/$collectionName/$itemId",component:dt(()=>ut(()=>import("./collection-detail-D0NZfJGN.js"),__vite__mapDeps([192,26,110,53,11,102,38,2,133,188,17,18,19,20,21,22,120,78,88,123,100,128,57,58,94,40,41,42,156,189,144,70,71,72,25,73,69,74,75,76,77,44,48,79,80,46,81,82,83,49,84,63,85,86,87,89,90,91,92,64,93,45,28,95,96,97,65,30,98,47,50,111,109,190,124,54,55,4,5,125,193,131,171,31,10,154,155,113,52,114,115,56,116,68,43,29,51,39,14,59]))),validateSearch:ms(()=>be({replayId:$().optional()}))}),fce=it({getParentRoute:()=>Dn,path:"/monitor",component:dt(()=>ut(()=>import("./index-DWSZy_X3.js"),__vite__mapDeps([194,27,28,17,18,19,20,21,22,26,195,169,196,181,149,40,41,42,129,130,123,110,53,11,109,132,24,150,139,146,71,48,80,70,72,25,73,69,74,75,76,77,78,44,79,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,94,45,95,96,97,65,30,98,47,50,151,58,136,29,34,35,152,153,39,56,54,55,4,5,113,52,114,115,116,57,154,155,156,157,43,51,14,59,68,124,125,158,102,38,2,131,31,111,197,163,143,144,133,135,62,193,191]))),validateSearch:ms(()=>be({tab:an(["overview","audit","dashboards","threads","automations"]).default("overview"),from:$().default("now-30m"),to:$().default("now"),connectionId:Re($()).optional().default([]),virtualMcpId:Re($()).optional().default([]),tool:$().default(""),status:an(["all","success","errors"]).default("all"),search:$().default(""),page:ht().optional(),streaming:Nt().default(!0),propertyFilters:$().default(""),hideSystem:Nt().default(!1)}))}),hce=it({getParentRoute:()=>Dn,path:"/general",component:dt(()=>ut(()=>import("./general-B9f_o-xC.js"),__vite__mapDeps([198,17,18,19,20,21,22,139,170,51,29,30,2,165,132,75,199,58,31,40,41,42,112,195,169,196,181])))}),pce=it({getParentRoute:()=>Dn,path:"/brand-context",component:dt(()=>ut(()=>import("./brand-context-BIyP8xYy.js"),__vite__mapDeps([200,51,42,79,94,84,97,112,17,18,19,20,21,22,58,170,89,50,2,133,195,169,196,181])))}),mce=it({getParentRoute:()=>Dn,path:"/ai-providers",component:dt(()=>ut(()=>import("./ai-providers-CKZBOpZY.js"),__vite__mapDeps([201,71,17,18,19,20,21,22,108,165,132,75,114,58,48,113,52,54,53,11,55,4,5,109,110,115,56,116,57,162,39,118,163,41,2,40,42,73,72,88,28,164,90,51,79,29,30,83,141,81,87,96,170,142,112,94,97,173,35,195,169,196,181])))}),gce=it({getParentRoute:()=>Dn,path:"/secrets",component:dt(()=>ut(()=>import("./secrets-B7yOPqqi.js"),__vite__mapDeps([202,71,94,30,98,39,21,2,38,40,22,41,42,108,133,17,18,19,20,165,132,75,51,172,58,195,169,196,181])))}),vce=it({getParentRoute:()=>Dn,path:"/files",component:dt(()=>ut(()=>import("./files-bcXp7_-0.js"),[]))}),yce=it({getParentRoute:()=>Dn,path:"/buckets",component:dt(()=>ut(()=>import("./buckets-QGKbgl-N.js"),__vite__mapDeps([203,71,86,94,97,112,39,21,2,38,40,22,41,42,62,108,133,51,17,18,19,20,165,132,75,174,58,195,169,196,181])))}),_ce=it({getParentRoute:()=>Dn,path:"/members",component:dt(()=>ut(()=>import("./members-CJyGLnx5.js"),__vite__mapDeps([204,183,160,41,79,80,25,85,22,184,31,27,28,17,18,19,20,21,23,24,26,138,39,102,38,40,42,133,139,140,165,132,75,179,169,58,51,29,30,34,35,36,150,205,112,88,95,97,47,163,143,144,111,94,195,196,181])))}),bce=it({getParentRoute:()=>Dn,path:"/roles",component:dt(()=>ut(()=>import("./roles-DSYJH4-L.js"),__vite__mapDeps([206,140,139,51,205,31,112,160,41,79,80,94,97,23,24,25,17,18,19,20,21,22,26,27,28,164,68,69,70,71,72,73,74,75,76,77,78,44,48,42,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,45,95,96,65,30,98,47,50,130,163,136,53,11,122,150,36,123,110,114,58,29,62,165,132,169,196,181]))),validateSearch:ms(()=>be({role:$().optional()}))}),wce=it({getParentRoute:()=>Dn,path:"/sso",component:dt(()=>ut(()=>import("./sso-BJu5HqPY.js"),__vite__mapDeps([207,199,58,51,165,132,75,31,2,40,22,41,42,17,18,19,20,21,62,59,97,195,169,196,181])))}),Sce=it({getParentRoute:()=>Dn,path:"/profile",component:dt(()=>ut(()=>import("./profile-p8uH-A7p.js"),__vite__mapDeps([208,17,18,19,20,21,22,29,30,62,40,41,42,142,2,90,91,93,170,51,167,137,165,132,75])))}),Ece=it({getParentRoute:()=>Dn,path:"/store",component:dt(()=>ut(()=>import("./store-94QzW1Nj.js"),__vite__mapDeps([209,71,79,94,97,2,62,108,29,30,111,123,110,53,11,17,18,19,20,21,22,128,57,58,51,165,132,75,195,169,196,181])))}),xce=it({getParentRoute:()=>Dn,path:"/registry",component:dt(()=>ut(()=>import("./registry-qxkLULpu.js"),__vite__mapDeps([210,195,169,196,181])))}),Rce=it({getParentRoute:()=>Dn,path:"/store/registry",component:dt(()=>ut(()=>import("./store-registry-DBqS-hVl.js"),__vite__mapDeps([211,195,169,196,181])))}),Oce=it({getParentRoute:()=>Dn,path:"/agents",component:dt(()=>ut(()=>import("./agents-list-TZ0Kqfeo.js"),__vite__mapDeps([212,160,41,79,80,44,119,53,11,120,109,110,17,18,19,20,21,22,73,97,70,71,72,25,69,74,75,76,77,78,48,42,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,94,45,28,95,96,65,30,98,47,50,124,54,55,4,5,125,132,173,35,169,26,190,123,121,39,122,32,104,10,100,103,101,112,27])))}),Tce=it({getParentRoute:()=>Dn,path:"/automations",component:dt(()=>ut(()=>import("./automations-h0Nuw91X.js"),__vite__mapDeps([213,94,50,27,28,17,18,19,20,21,22,26,151,53,11,58,124,109,110,54,55,4,5,125,175,112,160,41,79,80,46,97,70,71,72,25,73,69,74,75,76,77,78,44,48,42,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,45,95,96,65,30,98,47,195,169,196,181,51])))}),Cce=Dn.addChildren([lce,cce,uce,dce,Oce,Tce,fce,hce,pce,mce,gce,vce,yce,_ce,bce,wce,Sce,Ece,Rce,xce]),Ace=SL.addChildren([ece]),Ice=Df.addChildren([nce,oce,sce,Ace]),Pce=bv.addChildren([Ice,Cce,ace]),Mce=PE.addChildren([Yle,Pce]),Nce=qo.addChildren([Mce,Zle,Wle,Qle,Xle,zle,Ule,Fle,Ble,Vle,Hle]),kce=Oz({routeTree:Nce,defaultPendingComponent:AE,defaultPendingMs:200,defaultNotFoundComponent:()=>C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[C.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),C.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),C.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})});Mle();const Dce=document.getElementById("root");qj.createRoot(Dce).render(C.jsx(P.StrictMode,{children:C.jsx(Az,{router:kce})}));export{Mm as $,yue as A,df as B,goe as C,su as D,ode as E,OY as F,fle as G,be as H,$ as I,Ai as J,RM as K,pf as L,Ci as M,Gce as N,JM as O,vt as P,Fce as Q,ya as R,AE as S,_l as T,gle as U,Ste as V,Xae as W,pL as X,IE as Y,tu as Z,Qn as _,Hg as a,tl as a$,cM as a0,vM as a1,T8 as a2,C8 as a3,N8 as a4,A8 as a5,I8 as a6,Yn as a7,D8 as a8,H2 as a9,CW as aA,PW as aB,AW as aC,gW as aD,Eae as aE,X6 as aF,Fue as aG,Yue as aH,wK as aI,nue as aJ,Pae as aK,gL as aL,ee as aM,Kue as aN,Sn as aO,$4 as aP,vl as aQ,yf as aR,er as aS,j4 as aT,ct as aU,ua as aV,ht as aW,ut as aX,$ce as aY,zr as aZ,bo as a_,P8 as aa,M8 as ab,Bce as ac,Re as ad,an as ae,Pt as af,Nt as ag,EK as ah,nde as ai,SK as aj,rde as ak,uv as al,OM as am,Zue as an,BC as ao,Tw as ap,OW as aq,si as ar,Jd as as,Lg as at,xS as au,Gc as av,ga as aw,ys as ax,ai as ay,F4 as az,hf as b,_L as b$,Hce as b0,sde as b1,ade as b2,Gt as b3,Gue as b4,Bue as b5,que as b6,rQ as b7,uk as b8,nQ as b9,DN as bA,tS as bB,i4 as bC,ote as bD,dD as bE,hD as bF,vX as bG,Q4 as bH,VX as bI,oi as bJ,wue as bK,ii as bL,Lce as bM,bX as bN,ez as bO,WM as bP,Ele as bQ,hv as bR,uf as bS,va as bT,Rle as bU,Ple as bV,ide as bW,tde as bX,ede as bY,Que as bZ,yN as b_,vs as ba,Wue as bb,J6 as bc,fS as bd,Nue as be,sV as bf,tN as bg,oV as bh,nn as bi,Ge as bj,Zw as bk,X3 as bl,Qce as bm,cV as bn,PV as bo,Qw as bp,Yw as bq,hV as br,Xce as bs,Aue as bt,hie as bu,ms as bv,zB as bw,hl as bx,yt as by,uae as bz,qn as c,d4 as c$,Xue as c0,Sue as c1,Yce as c2,iie as c3,sie as c4,mE as c5,V6 as c6,gE as c7,fv as c8,T6 as c9,$ue as cA,ww as cB,wr as cC,pw as cD,jue as cE,Uue as cF,zue as cG,kue as cH,TX as cI,CX as cJ,OX as cK,TY as cL,SY as cM,CY as cN,xY as cO,AY as cP,RY as cQ,lk as cR,VW as cS,mS as cT,J4 as cU,hS as cV,HW as cW,rue as cX,qW as cY,EY as cZ,b4 as c_,bie as ca,A6 as cb,mie as cc,Cie as cd,joe as ce,Uoe as cf,Voe as cg,eie as ch,gie as ci,zoe as cj,Foe as ck,Hoe as cl,qoe as cm,tie as cn,cie as co,Hue as cp,Vue as cq,gue as cr,nL as cs,Due as ct,_ae as cu,Lue as cv,voe as cw,lw as cx,uw as cy,cw as cz,L8 as d,MQ as d$,gS as d0,pS as d1,Xd as d2,n9 as d3,O6 as d4,I6 as d5,N6 as d6,D6 as d7,L6 as d8,j6 as d9,Ww as dA,Wce as dB,RK as dC,xK as dD,YN as dE,Vce as dF,iue as dG,oue as dH,zce as dI,jce as dJ,EM as dK,xf as dL,vf as dM,uX as dN,dX as dO,pX as dP,fX as dQ,hX as dR,sue as dS,aue as dT,due as dU,fue as dV,hue as dW,pue as dX,lue as dY,cue as dZ,uue as d_,Tue as da,Cue as db,Rue as dc,Oue as dd,yoe as de,xue as df,P6 as dg,k6 as dh,$6 as di,Pue as dj,M6 as dk,Poe as dl,Eue as dm,R6 as dn,ese as dp,lie as dq,Mue as dr,Gie as ds,Yie as dt,Iie as du,Aie as dv,Iue as dw,AB as dx,Zce as dy,Jce as dz,Dg as e,$Q as e0,BQ as e1,NQ as e2,kQ as e3,PQ as e4,gk as e5,DQ as e6,LQ as e7,jQ as e8,zQ as e9,UQ as ea,FQ as eb,VQ as ec,qQ as ed,GQ as ee,_ue as f,vue as g,bue as h,CE as i,C as j,Cle as k,Sle as l,xM as m,Nw as n,Jue as o,cle as p,eue as q,P as r,tue as s,rC as t,Fw as u,ff as v,mL as w,TE as x,Kce as y,qce as z};
|
|
171
|
+
`),document.head.appendChild(r)}}function ble(e){const t=qn.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:RM.publicConfig(),queryFn:yle,staleTime:1/0},t[0]=r):r=t[0];const{data:o}=ff(r),[s]=gle();let l,c;t[1]!==o.theme?(l=()=>{_le(o.theme)},c=[o.theme],t[1]=o.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),P.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const h=document.documentElement,g=()=>{const x=document.querySelector('meta[name="theme-color"]');if(!x)return;const S=getComputedStyle(h).getPropertyValue("--sidebar").trim();if(!S)return;const E=document.createElement("canvas").getContext("2d");if(!E)return;E.fillStyle="#010203";const T=E.fillStyle;E.fillStyle=S;const R=E.fillStyle;R!==T&&(x.content=R)};if(s.theme==="dark"){h.classList.add("dark"),g();return}if(s.theme==="light"){h.classList.remove("dark"),g();return}const v=window.matchMedia("(prefers-color-scheme: dark)"),_=x=>{h.classList.toggle("dark",x),g()};_(v.matches);const b=x=>_(x.matches);return v.addEventListener("change",b),()=>v.removeEventListener("change",b)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),P.useLayoutEffect(d,f);let p;return t[7]!==n?(p=C.jsx(C.Fragment,{children:n}),t[7]=n,t[8]=p):p=t[8],p}const kf=new R8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});Wae(kf);Qae(kf);Vae(kf);Hae(kf);function wle(e){const t=qn.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=C.jsx(DG,{}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=C.jsx(AE,{}),t[1]=o):o=t[1];let s;return t[2]!==n?(s=C.jsxs(O8,{client:kf,children:[r,C.jsx(P.Suspense,{fallback:o,children:C.jsx(ble,{children:C.jsx(j8,{children:C.jsx(cne,{children:C.jsx(ule,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function IE(){const e=qn.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=C.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 h-full w-full flex items-center justify-center",children:C.jsx(CE,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=t):t=e[0],t}function Sle(...e){return DN(tS(e))}const Ele=i4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",xl:"h-12 px-4 has-[>svg]:px-3.5",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function df(e){const t=qn.c(14);let n,r,o,s,l;t[0]!==e?({className:n,variant:l,size:o,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=l):(n=t[1],r=t[2],o=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?fS:"button";let f;t[6]!==n||t[7]!==o||t[8]!==l?(f=Sle(Ele({variant:l,size:o,className:n})),t[6]=n,t[7]=o,t[8]=l,t[9]=f):f=t[9];let p;return t[10]!==d||t[11]!==r||t[12]!==f?(p=C.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=p):p=t[13],p}const xle=["radial-gradient(ellipse 85% 85% at 0% 0%, rgba(165,149,255,0.6) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 100% 100%, rgba(208,236,26,0.52) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 0% 100%, rgba(255,193,22,0.48) 0%, transparent 72%)"].join(", ");function Rle(e){const t=qn.c(3),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=C.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:xle}}),t[0]=r):r=t[0];let o;return t[1]!==n?(o=C.jsxs("div",{className:"relative flex items-center justify-center min-h-screen bg-background overflow-hidden",children:[r,C.jsx("div",{className:"relative flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:n})]}),t[1]=n,t[2]=o):o=t[2],o}function _L(e){const t=qn.c(9),{orgName:n}=e,r=Ole;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=C.jsx("div",{className:"bg-muted p-3 rounded-full",children:C.jsx(pL,{className:"h-6 w-6 text-muted-foreground"})}),t[0]=o):o=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=C.jsx("h3",{className:"text-lg font-medium",children:"Organization unavailable"}),t[1]=s):s=t[1];let l;t[2]!==n?(l=n?C.jsxs(C.Fragment,{children:[C.jsx("strong",{children:n})," has been deleted or is no longer available."]}):"This organization has been deleted or is no longer available.",t[2]=n,t[3]=l):l=t[3];let c;t[4]!==l?(c=C.jsxs("div",{className:"space-y-2",children:[s,C.jsx("p",{className:"text-sm text-muted-foreground",children:l})]}),t[4]=l,t[5]=c):c=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=C.jsx(df,{onClick:r,children:"Go to home"}),t[6]=d):d=t[6];let f;return t[7]!==c?(f=C.jsxs(Rle,{children:[o,c,d]}),t[7]=c,t[8]=f):f=t[8],f}function Ole(){window.location.href="/"}function Tle(){const e=qn.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:n}=Dg(t);let r;return e[1]!==n?(r=C.jsx(df,{variant:"outline",size:"sm",asChild:!0,children:C.jsx(pf,{to:"/$org/settings/profile",params:{org:n},children:"Go to your profile"})}),e[1]=n,e[2]=r):r=e[2],r}function Cle(e){const t=qn.c(13),{area:n,description:r,action:o}=e,s=n?`No access to ${n}`:"No access",l=r??"Your role doesn't include permission for this section. Ask an organization admin to update your role if you need it.";let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=C.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:C.jsx(mL,{size:28})}),t[0]=c):c=t[0];let d;t[1]!==s?(d=C.jsx("h3",{className:"text-lg font-medium",children:s}),t[1]=s,t[2]=d):d=t[2];let f;t[3]!==l?(f=C.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:l}),t[3]=l,t[4]=f):f=t[4];let p;t[5]!==d||t[6]!==f?(p=C.jsxs("div",{className:"space-y-1",children:[d,f]}),t[5]=d,t[6]=f,t[7]=p):p=t[7];let h;t[8]!==o?(h=o??C.jsx(Tle,{}),t[8]=o,t[9]=h):h=t[9];let g;return t[10]!==p||t[11]!==h?(g=C.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[c,p,h]}),t[10]=p,t[11]=h,t[12]=g):g=t[12],g}const oM="__mesh_chunk_reload_ts";function bL(e){return e?.message==="Organization is archived"}function Ale(e){return!!e?.message?.includes("Access denied")}function iM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class ode extends P.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),hL(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:bL(this.state.error)?C.jsx(_L,{}):Ale(this.state.error)?C.jsx(Cle,{}):C.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:C.jsx(TE,{className:"h-6 w-6 text-destructive"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),C.jsx(df,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class Ile extends P.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=iM(t);if(hL(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const o=sessionStorage.getItem(oM),s=Date.now();(!o||s-Number(o)>1e4)&&(sessionStorage.setItem(oM,String(s)),window.location.reload())}render(){return this.state.hasError&&iM(this.state.error)?C.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:C.jsx(gL,{className:"h-6 w-6 text-primary"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),C.jsx(df,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?bL(this.state.error)?C.jsx(_L,{}):C.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:C.jsx(TE,{className:"h-6 w-6 text-destructive"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),C.jsx(df,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}function wL(e){try{localStorage.setItem(su.lastLocation(),JSON.stringify(e))}catch{}}function Ple(){try{const e=localStorage.getItem(su.lastLocation());if(!e)return null;const t=JSON.parse(e);if(typeof t?.org=="string")return{org:t.org,taskId:typeof t.taskId=="string"?t.taskId:void 0,virtualmcpid:typeof t.virtualmcpid=="string"?t.virtualmcpid:void 0}}catch{}return null}function ide(){try{localStorage.removeItem(su.lastLocation())}catch{}}let us=null,sM=!1;const Ow=new Set;function Pg(){for(const e of Ow)e()}function Mle(){sM||typeof window>"u"||(sM=!0,window.addEventListener("beforeinstallprompt",e=>{e.preventDefault(),us=e,Pg()}),window.addEventListener("appinstalled",()=>{us=null,Pg()}))}function sde(){us!==null&&(us=null,Pg())}function Nle(e){return Ow.add(e),()=>{Ow.delete(e)}}function kle(){return us}function Dle(){return null}function Lle(){if(typeof window>"u")return!1;const e=typeof window.matchMedia=="function"&&["(display-mode: standalone)","(display-mode: window-controls-overlay)"].some(n=>window.matchMedia(n).matches),t=navigator.standalone===!0;return e||t}function $le(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)?!0:e.includes("Macintosh")&&typeof document<"u"&&"ontouchend"in document}function ade(){const e=qn.c(5),t=P.useSyncExternalStore(Nle,kle,Dle);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Lle(),e[0]=n):n=e[0];const r=n,o=t!==null&&!r;let s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=$le(),l=jle,e[1]=s,e[2]=l):(s=e[1],l=e[2]);let c;return e[3]!==o?(c={canPrompt:o,installed:r,ios:s,promptInstall:l},e[3]=o,e[4]=c):c=e[4],c}async function jle(){if(!us)return"unavailable";await us.prompt();const e=await us.userChoice;return us=null,Pg(),e.outcome}const qo=m9({component:()=>C.jsx(Ile,{children:C.jsx(wle,{children:C.jsx(P.Suspense,{fallback:C.jsx(AE,{}),children:C.jsx(JM,{})})})})}),zle=it({getParentRoute:()=>qo,path:"/login",component:dt(()=>ut(()=>import("./login-DadqwX1v.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),validateSearch:ms(()=>be({next:$().optional(),client_id:$().optional(),redirect_uri:$().optional(),response_type:$().optional(),state:$().optional(),scope:$().optional(),code_challenge:$().optional(),code_challenge_method:$().optional()}))}),Ule=it({getParentRoute:()=>qo,path:"/cli/auth-success",component:dt(()=>ut(()=>import("./cli-auth-success-BlwxLly-.js"),__vite__mapDeps([7,6])))}),Fle=it({getParentRoute:()=>qo,path:"/reset-password",component:dt(()=>ut(()=>import("./reset-password-DMlVHYx8.js"),__vite__mapDeps([8,2]))),validateSearch:ms(()=>be({token:$().optional(),error:$().optional()}))}),Ble=it({getParentRoute:()=>qo,path:"/auth/$pathname",component:dt(()=>ut(()=>import("./auth-catchall-CYFsjRqv.js"),[]))}),Vle=it({getParentRoute:()=>qo,path:"/oauth/callback",component:dt(()=>ut(()=>import("./oauth-callback-DEy6hh8y.js"),__vite__mapDeps([9,10,11])))}),Hle=it({getParentRoute:()=>qo,path:"/oauth/callback/ai-provider",component:dt(()=>ut(()=>import("./oauth-callback-ai-provider-DytbYlOt.js"),[]))}),_v=it({getParentRoute:()=>qo,path:"/_admin",component:dt(()=>ut(()=>import("./layout-BrOOamwF.js"),__vite__mapDeps([12,13,14,15])))}),qle=it({getParentRoute:()=>_v,path:"/",beforeLoad:()=>{throw sa({to:"/_admin/users"})}}),Gle=it({getParentRoute:()=>_v,path:"/users",component:dt(()=>ut(()=>import("./users-DvGWbjGS.js"),__vite__mapDeps([16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36])))}),Kle=it({getParentRoute:()=>_v,path:"/orgs",component:dt(()=>ut(()=>import("./orgs-qf3_u6-D.js"),__vite__mapDeps([37,17,18,19,20,21,22,23,24,25,26,27,28,2,38,32,39,40,41,42,33,34,35])))}),Zle=_v.addChildren([qle,Gle,Kle]),PE=it({getParentRoute:()=>qo,id:"shell",component:dt(()=>ut(()=>import("./shell-layout-BgxszLda.js").then(e=>e.s),__vite__mapDeps([43,29,30,44,45,46,47,48,49,50,51,39,21,14,52,53,11,54,55,4,5,56,57,58,59])))}),Yle=it({getParentRoute:()=>PE,path:"/",beforeLoad:async()=>{const e=Ple();if(e)throw sa({to:"/$org",params:{org:e.org}});const t=localStorage.getItem(su.lastOrgSlug());if(t)throw sa({to:"/$org",params:{org:t}});const{data:n}=await _N();if(!n)return;const r=n[0];throw sa(r?{to:"/$org",params:{org:r.slug}}:{to:"/onboarding"})}}),Wle=it({getParentRoute:()=>qo,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await _N();if(e&&e.length>0)throw sa({to:"/"})},component:dt(()=>ut(()=>import("./onboarding-CDE8VR3t.js"),__vite__mapDeps([60,14,6,61,29,30,2,38,62,44,48,63,64,65])))}),Qle=it({getParentRoute:()=>qo,path:"/commerce-onboarding",component:dt(()=>ut(()=>import("./commerce-onboarding-Lsv0oOsQ.js"),__vite__mapDeps([66,67,53,11,68,69,70,71,72,25,73,74,75,76,77,78,44,48,41,42,79,80,46,81,82,83,49,84,63,85,86,87,88,19,89,90,91,92,64,93,94,45,28,95,96,97,65,30,98,47,21,50,39,22,99,100,101,102,38,2,32,103,104,10,1,3,4,5,6,61,29]))),validateSearch:ms(()=>be({org:$().optional(),siteUrl:$().optional()}))}),Xle=it({getParentRoute:()=>qo,path:"/report/$domain",component:dt(()=>ut(()=>import("./reports-8lm2jYlA.js"),__vite__mapDeps([105,1,2,3,4,5,71,25,74,76,48,83,92,45,95,96,50,106]))),validateSearch:ms(()=>be({key:$().optional()}))}),bv=it({getParentRoute:()=>PE,path:"/$org",beforeLoad:({params:e})=>{wL({org:e.org})},component:dt(()=>ut(()=>import("./org-layout-D60GrLo7.js"),[]))}),Df=it({getParentRoute:()=>bv,id:"org-shell",component:dt(()=>ut(()=>import("./index-tm56IEST.js"),__vite__mapDeps([107,18,19,20,21,22,67,53,11,68,69,70,71,72,25,73,74,75,76,77,78,44,48,41,42,79,80,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,94,45,28,95,96,97,65,30,98,47,50,39,99,100,101,102,38,2,32,103,104,10,56,108,109,110,111,112,113,52,54,55,4,5,58,114,115,116,57,117,118,119,120,121,122,123,124,125,43,29,51,14,59,126,127,128,129,130,3,131,132,40,133,134,135,31,136,15,137,138,139,140,141,142,143,144,145,146,34,35,147])))}),SL=it({getParentRoute:()=>Df,id:"agent-shell",pendingComponent:IE,component:dt(()=>ut(()=>import("./index-J0-zdiVG.js").then(e=>e.b1),__vite__mapDeps([148,25,113,52,54,53,11,55,4,5,58,109,110,114,115,56,116,57,149,40,22,41,42,129,130,123,132,18,19,20,21,24,26,150,139,146,71,48,80,70,72,73,69,74,75,76,77,78,44,79,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,94,45,28,95,96,97,65,30,98,47,50,151,136,29,34,35,152,153,39,154,155,156,157,43,51,14,59,68,124,125,158,102,38,2,118,122,159,36,119,120,101,104,10,100,160,111,143,144,99,161,142,126,127,128,3,131,133,134,135,31,141,162,163,108,164,165,166,112,147,32,167,168,169,117,170,17,27,171,62,121,103,172,173,174,175,176])))}),Jle=be({virtualmcpid:$().optional(),tab:$().optional(),sidepanel:nn([Ge("chat"),Ge(0)]).optional(),main:nn([$(),Ge(0)]).optional(),preview:$().optional(),id:$().optional(),toolName:$().optional(),tasks:ht().optional(),mainOpen:ht().optional(),autosend:$().optional(),runLocally:$().optional(),connect:sN().optional(),siteUrl:$().optional()}),ece=it({getParentRoute:()=>SL,path:"/$taskId",validateSearch:Jle,beforeLoad:({params:e,search:t})=>{wL({org:e.org,taskId:e.taskId,virtualmcpid:t.virtualmcpid})},component:()=>null}),tce=be({main:$().optional(),connect:sN().optional(),siteUrl:$().optional()}),nce=it({getParentRoute:()=>Df,path:"/",validateSearch:tce,pendingComponent:IE,component:dt(()=>ut(()=>import("./index-CUB1pa70.js"),__vite__mapDeps([177,53,11,54,55,4,5,125])))}),rce=be({path:$().optional(),preview:$().optional(),skill:$().optional()}),oce=it({getParentRoute:()=>Df,path:"/files",validateSearch:rce,pendingComponent:IE,component:dt(()=>ut(()=>import("./index-DoojYIRI.js").then(e=>e.Y),__vite__mapDeps([166,83,64,94,45,65,47,50,20,112,39,21,2,153,41,81,82,78,56,147,92,32,115,108,133,42,111,22,88,89,155,87,160,79,80,19,96,97])))}),ice=be({task:$().optional()}),sce=it({getParentRoute:()=>Df,path:"/board",validateSearch:ice,component:dt(()=>ut(()=>import("./index-BIGDsKN-.js").then(e=>e.n),__vite__mapDeps([159,36,29,30,70,71,72,25,73,69,74,75,76,77,78,44,48,41,42,79,80,46,81,82,83,49,84,63,85,86,87,88,19,89,90,91,92,64,93,94,45,28,95,96,97,65,98,47,21,50,53,11,119,120,39,123,110,101,104,10,100,150,139,58,55,4,116,34,35,160,111,143,144,157,152,118,43,51,14,52,54,5,56,57,59,99])))}),Dn=it({getParentRoute:()=>bv,path:"/settings",component:dt(()=>ut(()=>import("./settings-layout-BKgo0OhA.js"),__vite__mapDeps([178,13,18,19,20,21,22,17,77,44,86,88,95,30,50,51,169,179,58,168,167,116,55,4,147,145,117])))}),ace=it({getParentRoute:()=>bv,path:"/install",component:dt(()=>ut(()=>import("./org-install-B9RKA-K5.js"),[]))}),lce=it({getParentRoute:()=>Dn,path:"/",component:dt(()=>ut(()=>import("./index-redirect-BDCF1ed3.js"),__vite__mapDeps([180,169,181])))}),cce=it({getParentRoute:()=>Dn,path:"/connections",component:dt(()=>ut(()=>import("./connections-BUT4xtlh.js"),__vite__mapDeps([182,100,53,11,183,160,41,79,80,25,85,22,184,31,27,28,135,127,128,123,110,57,58,129,130,3,4,5,131,132,68,69,70,71,72,73,74,75,76,77,78,44,48,42,46,81,82,83,49,84,63,86,87,88,19,89,90,91,92,64,93,94,45,95,96,97,65,30,98,47,21,50,26,17,18,20,185,112,169,186,39,118,102,38,2,40,133,109,134,104,10,163]))),validateSearch:ms(()=>be({action:an(["create"]).optional(),tab:an(["all","connected"]).optional()}))}),uce=it({getParentRoute:()=>Dn,path:"/connections/$appSlug",component:dt(()=>ut(()=>import("./connection-detail-DHycA4fS.js"),__vite__mapDeps([187,100,53,11,26,134,2,94,97,188,17,18,19,20,21,22,120,78,88,123,110,128,57,58,40,41,42,156,189,144,70,71,72,25,73,69,74,75,76,77,44,48,79,80,46,81,82,83,49,84,63,85,86,87,89,90,91,92,64,93,45,28,95,96,65,30,98,47,50,111,109,190,124,54,55,4,5,125,171,31,10,150,139,29,158,68,102,38,185,112,191,161,131,122,132,160]))),validateSearch:ms(()=>be({tab:$().optional()}))}),dce=it({getParentRoute:()=>Dn,path:"/connections/$appSlug/$collectionName/$itemId",component:dt(()=>ut(()=>import("./collection-detail-E6u4e-px.js"),__vite__mapDeps([192,26,110,53,11,102,38,2,133,188,17,18,19,20,21,22,120,78,88,123,100,128,57,58,94,40,41,42,156,189,144,70,71,72,25,73,69,74,75,76,77,44,48,79,80,46,81,82,83,49,84,63,85,86,87,89,90,91,92,64,93,45,28,95,96,97,65,30,98,47,50,111,109,190,124,54,55,4,5,125,193,131,171,31,10,154,155,113,52,114,115,56,116,68,43,29,51,39,14,59]))),validateSearch:ms(()=>be({replayId:$().optional()}))}),fce=it({getParentRoute:()=>Dn,path:"/monitor",component:dt(()=>ut(()=>import("./index-CNSuLu5S.js"),__vite__mapDeps([194,27,28,17,18,19,20,21,22,26,195,169,196,181,149,40,41,42,129,130,123,110,53,11,109,132,24,150,139,146,71,48,80,70,72,25,73,69,74,75,76,77,78,44,79,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,94,45,95,96,97,65,30,98,47,50,151,58,136,29,34,35,152,153,39,56,54,55,4,5,113,52,114,115,116,57,154,155,156,157,43,51,14,59,68,124,125,158,102,38,2,131,31,111,197,163,143,144,133,135,62,193,191]))),validateSearch:ms(()=>be({tab:an(["overview","audit","dashboards","threads","automations"]).default("overview"),from:$().default("now-30m"),to:$().default("now"),connectionId:Re($()).optional().default([]),virtualMcpId:Re($()).optional().default([]),tool:$().default(""),status:an(["all","success","errors"]).default("all"),search:$().default(""),page:ht().optional(),streaming:Nt().default(!0),propertyFilters:$().default(""),hideSystem:Nt().default(!1)}))}),hce=it({getParentRoute:()=>Dn,path:"/general",component:dt(()=>ut(()=>import("./general-CPeMOsd5.js"),__vite__mapDeps([198,17,18,19,20,21,22,139,170,51,29,30,2,165,132,75,199,58,31,40,41,42,112,195,169,196,181])))}),pce=it({getParentRoute:()=>Dn,path:"/brand-context",component:dt(()=>ut(()=>import("./brand-context-DYCHu24t.js"),__vite__mapDeps([200,51,42,79,94,84,97,112,17,18,19,20,21,22,58,170,89,50,2,133,195,169,196,181])))}),mce=it({getParentRoute:()=>Dn,path:"/ai-providers",component:dt(()=>ut(()=>import("./ai-providers-jfZcI2HF.js"),__vite__mapDeps([201,71,17,18,19,20,21,22,108,165,132,75,114,58,48,113,52,54,53,11,55,4,5,109,110,115,56,116,57,162,39,118,163,41,2,40,42,73,72,88,28,164,90,51,79,29,30,83,141,81,87,96,170,142,112,94,97,173,35,195,169,196,181])))}),gce=it({getParentRoute:()=>Dn,path:"/secrets",component:dt(()=>ut(()=>import("./secrets-BsBqN8Ek.js"),__vite__mapDeps([202,71,94,30,98,39,21,2,38,40,22,41,42,108,133,17,18,19,20,165,132,75,51,172,58,195,169,196,181])))}),vce=it({getParentRoute:()=>Dn,path:"/files",component:dt(()=>ut(()=>import("./files-DV7TRQAK.js"),[]))}),yce=it({getParentRoute:()=>Dn,path:"/buckets",component:dt(()=>ut(()=>import("./buckets-C8qYIfjG.js"),__vite__mapDeps([203,71,86,94,97,112,39,21,2,38,40,22,41,42,62,108,133,51,17,18,19,20,165,132,75,174,58,195,169,196,181])))}),_ce=it({getParentRoute:()=>Dn,path:"/members",component:dt(()=>ut(()=>import("./members-DrOH6Fqm.js"),__vite__mapDeps([204,183,160,41,79,80,25,85,22,184,31,27,28,17,18,19,20,21,23,24,26,138,39,102,38,40,42,133,139,140,165,132,75,179,169,58,51,29,30,34,35,36,150,205,112,88,95,97,47,163,143,144,111,94,195,196,181])))}),bce=it({getParentRoute:()=>Dn,path:"/roles",component:dt(()=>ut(()=>import("./roles-GP7WhHNE.js"),__vite__mapDeps([206,140,139,51,205,31,112,160,41,79,80,94,97,23,24,25,17,18,19,20,21,22,26,27,28,164,68,69,70,71,72,73,74,75,76,77,78,44,48,42,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,45,95,96,65,30,98,47,50,130,163,136,53,11,122,150,36,123,110,114,58,29,62,165,132,169,196,181]))),validateSearch:ms(()=>be({role:$().optional()}))}),wce=it({getParentRoute:()=>Dn,path:"/sso",component:dt(()=>ut(()=>import("./sso-C_M1ftWf.js"),__vite__mapDeps([207,199,58,51,165,132,75,31,2,40,22,41,42,17,18,19,20,21,62,59,97,195,169,196,181])))}),Sce=it({getParentRoute:()=>Dn,path:"/profile",component:dt(()=>ut(()=>import("./profile-DGsdccyo.js"),__vite__mapDeps([208,17,18,19,20,21,22,29,30,62,40,41,42,142,2,90,91,93,170,51,167,137,165,132,75])))}),Ece=it({getParentRoute:()=>Dn,path:"/store",component:dt(()=>ut(()=>import("./store-CLgxTkh8.js"),__vite__mapDeps([209,71,79,94,97,2,62,108,29,30,111,123,110,53,11,17,18,19,20,21,22,128,57,58,51,165,132,75,195,169,196,181])))}),xce=it({getParentRoute:()=>Dn,path:"/registry",component:dt(()=>ut(()=>import("./registry-Cuy31Gle.js"),__vite__mapDeps([210,195,169,196,181])))}),Rce=it({getParentRoute:()=>Dn,path:"/store/registry",component:dt(()=>ut(()=>import("./store-registry-gtan6bSq.js"),__vite__mapDeps([211,195,169,196,181])))}),Oce=it({getParentRoute:()=>Dn,path:"/agents",component:dt(()=>ut(()=>import("./agents-list-C5gYxxiG.js"),__vite__mapDeps([212,160,41,79,80,44,119,53,11,120,109,110,17,18,19,20,21,22,73,97,70,71,72,25,69,74,75,76,77,78,48,42,46,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,94,45,28,95,96,65,30,98,47,50,124,54,55,4,5,125,132,173,35,169,26,190,123,121,39,122,32,104,10,100,103,101,112,27])))}),Tce=it({getParentRoute:()=>Dn,path:"/automations",component:dt(()=>ut(()=>import("./automations-BfEcG7-7.js"),__vite__mapDeps([213,94,50,27,28,17,18,19,20,21,22,26,151,53,11,58,124,109,110,54,55,4,5,125,175,112,160,41,79,80,46,97,70,71,72,25,73,69,74,75,76,77,78,44,48,42,81,82,83,49,84,63,85,86,87,88,89,90,91,92,64,93,45,95,96,65,30,98,47,195,169,196,181,51])))}),Cce=Dn.addChildren([lce,cce,uce,dce,Oce,Tce,fce,hce,pce,mce,gce,vce,yce,_ce,bce,wce,Sce,Ece,Rce,xce]),Ace=SL.addChildren([ece]),Ice=Df.addChildren([nce,oce,sce,Ace]),Pce=bv.addChildren([Ice,Cce,ace]),Mce=PE.addChildren([Yle,Pce]),Nce=qo.addChildren([Mce,Zle,Wle,Qle,Xle,zle,Ule,Fle,Ble,Vle,Hle]),kce=O9({routeTree:Nce,defaultPendingComponent:AE,defaultPendingMs:200,defaultNotFoundComponent:()=>C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[C.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),C.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),C.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})});Mle();const Dce=document.getElementById("root");qj.createRoot(Dce).render(C.jsx(P.StrictMode,{children:C.jsx(A9,{router:kce})}));export{Mm as $,yue as A,df as B,goe as C,su as D,ode as E,OY as F,fle as G,be as H,$ as I,Ai as J,RM as K,pf as L,Ci as M,Gce as N,JM as O,vt as P,Fce as Q,ya as R,AE as S,_l as T,gle as U,Ste as V,Xae as W,pL as X,IE as Y,tu as Z,Qn as _,Hg as a,tl as a$,cM as a0,vM as a1,T8 as a2,C8 as a3,N8 as a4,A8 as a5,I8 as a6,Yn as a7,D8 as a8,H2 as a9,CW as aA,PW as aB,AW as aC,gW as aD,Eae as aE,X6 as aF,Fue as aG,Yue as aH,wK as aI,nue as aJ,Pae as aK,gL as aL,ee as aM,Kue as aN,Sn as aO,$4 as aP,vl as aQ,yf as aR,er as aS,j4 as aT,ct as aU,ua as aV,ht as aW,ut as aX,$ce as aY,zr as aZ,bo as a_,P8 as aa,M8 as ab,Bce as ac,Re as ad,an as ae,Pt as af,Nt as ag,EK as ah,nde as ai,SK as aj,rde as ak,uv as al,OM as am,Zue as an,BC as ao,Tw as ap,OW as aq,si as ar,Jd as as,Lg as at,xS as au,Gc as av,ga as aw,ys as ax,ai as ay,F4 as az,hf as b,_L as b$,Hce as b0,sde as b1,ade as b2,Gt as b3,Gue as b4,Bue as b5,que as b6,rQ as b7,uk as b8,nQ as b9,DN as bA,tS as bB,i4 as bC,ote as bD,dD as bE,hD as bF,vX as bG,Q4 as bH,VX as bI,oi as bJ,wue as bK,ii as bL,Lce as bM,bX as bN,e9 as bO,WM as bP,Ele as bQ,hv as bR,uf as bS,va as bT,Rle as bU,Ple as bV,ide as bW,tde as bX,ede as bY,Que as bZ,yN as b_,vs as ba,Wue as bb,J6 as bc,fS as bd,Nue as be,sV as bf,tN as bg,oV as bh,nn as bi,Ge as bj,Zw as bk,X3 as bl,Qce as bm,cV as bn,PV as bo,Qw as bp,Yw as bq,hV as br,Xce as bs,Aue as bt,hie as bu,ms as bv,zB as bw,hl as bx,yt as by,uae as bz,qn as c,d4 as c$,Xue as c0,Sue as c1,Yce as c2,iie as c3,sie as c4,mE as c5,V6 as c6,gE as c7,fv as c8,T6 as c9,$ue as cA,ww as cB,wr as cC,pw as cD,jue as cE,Uue as cF,zue as cG,kue as cH,TX as cI,CX as cJ,OX as cK,TY as cL,SY as cM,CY as cN,xY as cO,AY as cP,RY as cQ,lk as cR,VW as cS,mS as cT,J4 as cU,hS as cV,HW as cW,rue as cX,qW as cY,EY as cZ,b4 as c_,bie as ca,A6 as cb,mie as cc,Cie as cd,joe as ce,Uoe as cf,Voe as cg,eie as ch,gie as ci,zoe as cj,Foe as ck,Hoe as cl,qoe as cm,tie as cn,cie as co,Hue as cp,Vue as cq,gue as cr,nL as cs,Due as ct,_ae as cu,Lue as cv,voe as cw,lw as cx,uw as cy,cw as cz,L8 as d,MQ as d$,gS as d0,pS as d1,Xd as d2,nz as d3,O6 as d4,I6 as d5,N6 as d6,D6 as d7,L6 as d8,j6 as d9,Ww as dA,Wce as dB,RK as dC,xK as dD,YN as dE,Vce as dF,iue as dG,oue as dH,zce as dI,jce as dJ,EM as dK,xf as dL,vf as dM,uX as dN,dX as dO,pX as dP,fX as dQ,hX as dR,sue as dS,aue as dT,due as dU,fue as dV,hue as dW,pue as dX,lue as dY,cue as dZ,uue as d_,Tue as da,Cue as db,Rue as dc,Oue as dd,yoe as de,xue as df,P6 as dg,k6 as dh,$6 as di,Pue as dj,M6 as dk,Poe as dl,Eue as dm,R6 as dn,ese as dp,lie as dq,Mue as dr,Gie as ds,Yie as dt,Iie as du,Aie as dv,Iue as dw,AB as dx,Zce as dy,Jce as dz,Dg as e,$Q as e0,BQ as e1,NQ as e2,kQ as e3,PQ as e4,gk as e5,DQ as e6,LQ as e7,jQ as e8,zQ as e9,UQ as ea,FQ as eb,VQ as ec,qQ as ed,GQ as ee,_ue as f,vue as g,bue as h,CE as i,C as j,Cle as k,Sle as l,xM as m,Nw as n,Jue as o,cle as p,eue as q,P as r,tue as s,rC as t,Fw as u,ff as v,mL as w,TE as x,Kce as y,qce as z};
|