decocms 2.179.2 → 2.179.3
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-QngH9BVd.js → AlertCircle-DcuzO-dN.js} +1 -1
- package/dist/client/assets/{AlignLeft-BUW8XsMa.js → AlignLeft-DH6vJ97u.js} +1 -1
- package/dist/client/assets/{ArrowDown-Ba2t7m6d.js → ArrowDown-DrJY3Wf3.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DX2ldnBo.js → ArrowLeft-B0zQkfl0.js} +1 -1
- package/dist/client/assets/{ArrowUp-Wy3Qa9X3.js → ArrowUp-B4DKDJey.js} +1 -1
- package/dist/client/assets/{Building02-DW6RLSwU.js → Building02-B5vUKe4K.js} +1 -1
- package/dist/client/assets/{Check-CLxUgI8Z.js → Check-5nIJP_0B.js} +1 -1
- package/dist/client/assets/{CheckCircle-DDKCxiAn.js → CheckCircle-CPfAK_ok.js} +1 -1
- package/dist/client/assets/{CheckSquare-IgZnioYh.js → CheckSquare-Bd5OlGNx.js} +1 -1
- package/dist/client/assets/{CheckVerified02-Brnp4Z-Q.js → CheckVerified02-BImD45AM.js} +1 -1
- package/dist/client/assets/{ChevronDown-D0b1rvAp.js → ChevronDown-t60R5l2B.js} +1 -1
- package/dist/client/assets/{ChevronLeft-BOF7bp9d.js → ChevronLeft-lVdUD9SW.js} +1 -1
- package/dist/client/assets/{ChevronRight-BEUO8jhU.js → ChevronRight-3uKoJ2yX.js} +1 -1
- package/dist/client/assets/{ChevronUp-BWhuIqS7.js → ChevronUp-l7iXrppT.js} +1 -1
- package/dist/client/assets/{Clock-Aquumu5W.js → Clock-Cu62NiMl.js} +1 -1
- package/dist/client/assets/{Code01-_in0gxFd.js → Code01-DA4cXrzu.js} +1 -1
- package/dist/client/assets/{Container-b65PFshp.js → Container-Cvd3ILsk.js} +1 -1
- package/dist/client/assets/{Copy01-Ds0OKZs5.js → Copy01-DCmX2pvi.js} +1 -1
- package/dist/client/assets/{Dataflow03-CE4IJeUz.js → Dataflow03-SvWKmU9-.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-EK1-V4Yv.js → DotsHorizontal-DE3Ptwny.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bo0fAyx-.js → DotsVertical-CZep1rYf.js} +1 -1
- package/dist/client/assets/{Download01-CN3AkzFm.js → Download01-DOZIvPhC.js} +1 -1
- package/dist/client/assets/{Edit01-BeW3IgwV.js → Edit01-Bh7u1xp-.js} +1 -1
- package/dist/client/assets/{Edit05-DDQmnS5O.js → Edit05-DwDDlBNQ.js} +1 -1
- package/dist/client/assets/{Eye-Cqad01Et.js → Eye-D3Q7o9JY.js} +1 -1
- package/dist/client/assets/{EyeOff-rTYDCZUH.js → EyeOff--TPuyP7J.js} +1 -1
- package/dist/client/assets/{File02-k_9AZvHT.js → File02-6xeEPCuC.js} +1 -1
- package/dist/client/assets/{File06-BAp2UeVQ.js → File06-BocZAjHf.js} +1 -1
- package/dist/client/assets/{FilterLines-BQVg1PzI.js → FilterLines-CUdG83Ae.js} +1 -1
- package/dist/client/assets/{Globe01-sBw0ReRO.js → Globe01-BTdgnOS2.js} +1 -1
- package/dist/client/assets/{Globe02-DlxZmkSI.js → Globe02-X8fGWI0t.js} +1 -1
- package/dist/client/assets/{Grid01-B9zEjFyx.js → Grid01-NkSMXhQ7.js} +1 -1
- package/dist/client/assets/{Home02-DsMimBHw.js → Home02-BmcJp5G2.js} +1 -1
- package/dist/client/assets/{Image01-zSA25K9S.js → Image01-RwxwuRZg.js} +1 -1
- package/dist/client/assets/{Inbox01-Bcon6dDK.js → Inbox01-B7dU6IpS.js} +1 -1
- package/dist/client/assets/{InfoCircle-CA8mfcG6.js → InfoCircle-BO2XWy7v.js} +1 -1
- package/dist/client/assets/{Key01-V3zgT2bk.js → Key01-CjhxaGrC.js} +1 -1
- package/dist/client/assets/{LayersTwo01-D3otbQFN.js → LayersTwo01-DEwkReGL.js} +1 -1
- package/dist/client/assets/{Link01-VlHez4tu.js → Link01-h9aUM7NA.js} +1 -1
- package/dist/client/assets/{LinkExternal01-vs3DKlfq.js → LinkExternal01-CmkQ0Pr-.js} +1 -1
- package/dist/client/assets/{List-D6xZGoxJ.js → List-BbeB05v1.js} +1 -1
- package/dist/client/assets/{Loading01-DQphO9Su.js → Loading01-D0sCOwf7.js} +1 -1
- package/dist/client/assets/{Lock01-Cbqd9PVH.js → Lock01-DFfVnVtc.js} +1 -1
- package/dist/client/assets/{Play-jCDYHrdu.js → Play-hGa2UcUZ.js} +1 -1
- package/dist/client/assets/{Plus-CURSuoDd.js → Plus-Dcf0Y3wA.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-oV1XFIRn.js → RefreshCcw01-BOXuamrY.js} +1 -1
- package/dist/client/assets/{Save01-CpNh-fPw.js → Save01-CA0I32a6.js} +1 -1
- package/dist/client/assets/{SearchMd-C8ADHGFY.js → SearchMd-BSRGE1t4.js} +1 -1
- package/dist/client/assets/{Settings01-B76KnDHb.js → Settings01-CCUkMwLj.js} +1 -1
- package/dist/client/assets/{Shield01-BodC6YjW.js → Shield01-BYpsgCVA.js} +1 -1
- package/dist/client/assets/{Terminal-BHkLJhoR.js → Terminal-ZymOmGb9.js} +1 -1
- package/dist/client/assets/{Tool01-DlbILfZg.js → Tool01-Doogi-IK.js} +1 -1
- package/dist/client/assets/{Trash01-CYMRq_nY.js → Trash01-Cs72bTP6.js} +1 -1
- package/dist/client/assets/{Upload01-BQ7z5iC5.js → Upload01-ByUvmqDm.js} +1 -1
- package/dist/client/assets/{Users03-DEpvReeu.js → Users03-CGvJARf5.js} +1 -1
- package/dist/client/assets/{X-BT_y3J3a.js → X-CD9ZB6hw.js} +1 -1
- package/dist/client/assets/{XClose-C-H07PEn.js → XClose-BxUlnJUs.js} +1 -1
- package/dist/client/assets/{Zap-BY3Hn1l9.js → Zap-0WHKFRes.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-DbwllQSw.js → agent-connections-preview-BEmLqtx5.js} +1 -1
- package/dist/client/assets/agent-detail-jg81y7ZA.js +2 -0
- package/dist/client/assets/agents-PmHD6Xb_.js +1 -0
- package/dist/client/assets/{ai-providers-logos-DGTpC_MW.js → ai-providers-logos-C_voEDmL.js} +1 -1
- package/dist/client/assets/{alert-dialog-BqCiJDa8.js → alert-dialog-qmvoIx9J.js} +3 -3
- package/dist/client/assets/{auth-catchall-DPwCqyhO.js → auth-catchall-ByYcT8WN.js} +1 -1
- package/dist/client/assets/automation-detail-C1-q2EzY.js +1 -0
- package/dist/client/assets/automations-C9eao1B2.js +1 -0
- package/dist/client/assets/avatar-DeGeJRAR.js +1 -0
- package/dist/client/assets/badge-Cjjl_FHP.js +1 -0
- package/dist/client/assets/{binder-CuBUxi11.js → binder-C1eSZFT4.js} +1 -1
- package/dist/client/assets/{breadcrumb-BWfepeob.js → breadcrumb-C8hDXS86.js} +1 -1
- package/dist/client/assets/{card-gfMzoGpr.js → card-CoyaoT6W.js} +1 -1
- package/dist/client/assets/{checkbox-DygphnIU.js → checkbox-D5DFx9da.js} +1 -1
- package/dist/client/assets/{collapsible-BJo6q_NJ.js → collapsible-DcaWkNTt.js} +1 -1
- package/dist/client/assets/{collection-detail-fTigPh-V.js → collection-detail-Dsgpohom.js} +3 -3
- package/dist/client/assets/{collection-display-button-C42ZnuS7.js → collection-display-button-BcIJp1SX.js} +1 -1
- package/dist/client/assets/{collection-search-Dzoe9W56.js → collection-search-nKZEJ_r3.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bka5CUqj.js → collection-table-wrapper-Bq15EL3p.js} +1 -1
- package/dist/client/assets/{collection-tabs-D9qLvNTu.js → collection-tabs-qLP6ozkD.js} +1 -1
- package/dist/client/assets/{command-D_HBfmpj.js → command-Bk-fXiVb.js} +1 -1
- package/dist/client/assets/connection-card-BYUbg7iO.js +1 -0
- package/dist/client/assets/connection-detail-Zdtj4TKi.js +1 -0
- package/dist/client/assets/connections-CMaQr-QY.js +1 -0
- package/dist/client/assets/{constants-D5QZg84_.js → constants-DclZTqHf.js} +1 -1
- package/dist/client/assets/{context-CGMT963w.js → context-BFi-zuf6.js} +12 -12
- package/dist/client/assets/{create-organization-dialog-CeMf7qju.js → create-organization-dialog-pXQ89_sr.js} +1 -1
- package/dist/client/assets/{create-project-dialog-Bs_mS8aj.js → create-project-dialog-M-dgrV_c.js} +1 -1
- package/dist/client/assets/{danger-gTdMMqBl.js → danger-DqsrtWLB.js} +1 -1
- package/dist/client/assets/{danger-zone-BE94J4G-.js → danger-zone-BhDM5wIc.js} +1 -1
- package/dist/client/assets/{dependencies-DQ9gMDrw.js → dependencies-CPYZFhhf.js} +1 -1
- package/dist/client/assets/dialog-DzGwvQ_K.js +1 -0
- package/dist/client/assets/drawer-CAX2URBi.js +1 -0
- package/dist/client/assets/{dropdown-menu-DE2pKopg.js → dropdown-menu-BcNYk9_F.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-D0dkPO22.js +1 -0
- package/dist/client/assets/editable-task-title-BR-xQ-UT.js +16 -0
- package/dist/client/assets/{empty-state-BjCXvoyS.js → empty-state-BuGXY27l.js} +1 -1
- package/dist/client/assets/{empty-state-Bk9Z7Q-U.js → empty-state-CGSu9IQ9.js} +1 -1
- package/dist/client/assets/{env-vars-editor-BjeFjhEe.js → env-vars-editor-VoVbIy9n.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CZxT3XNH.js → extract-connection-data-DhU56Zd0.js} +1 -1
- package/dist/client/assets/{file-browser-C4MCCicp.js → file-browser-DIaRK0us.js} +2 -2
- package/dist/client/assets/{form-tOTNzCZe.js → form-DBjkdSps.js} +1 -1
- package/dist/client/assets/{general-DOjbT8YE.js → general-DCfBGmuh.js} +1 -1
- package/dist/client/assets/{generate-id-kfQDJb0K.js → generate-id-DRuK_WRM.js} +1 -1
- package/dist/client/assets/{grid-view-CM2kDBxz.js → grid-view-DsY2qZrB.js} +1 -1
- package/dist/client/assets/{home-rO4pkzPH.js → home-C52P_wmy.js} +1 -1
- package/dist/client/assets/{index-BLtI6TU9.js → index-BLNBD7Tl.js} +1 -1
- package/dist/client/assets/index-BObCXgKJ.js +1 -0
- package/dist/client/assets/{index-DyL93sTY.js → index-BzPzEjOV.js} +1 -1
- package/dist/client/assets/index-COFAW4F5.js +1 -0
- package/dist/client/assets/index-CubWD7-P.css +1 -0
- package/dist/client/assets/index-DMmNh7jR.js +218 -0
- package/dist/client/assets/index-DYAF-Vgt.js +1 -0
- package/dist/client/assets/index-DiczHAor.js +1 -0
- package/dist/client/assets/{index-DjVQ8cwy.js → index-Dumm3WtY.js} +2 -2
- package/dist/client/assets/{index-Bwlq4qOs.js → index-PFtbLrE4.js} +1 -1
- package/dist/client/assets/{index-DiHcYCxZ.js → index-bHgla3gL.js} +1 -1
- package/dist/client/assets/index-hmkE8HuP.js +1 -0
- package/dist/client/assets/{infiniteQueryObserver-XS4LWR6q.js → infiniteQueryObserver-CZ8w6Ao-.js} +1 -1
- package/dist/client/assets/input-Bt_nejZh.js +1 -0
- package/dist/client/assets/{integration-icon-C9GR_8Ea.js → integration-icon-Dyr7fOYU.js} +1 -1
- package/dist/client/assets/{label-DJvdRQ2A.js → label-DTNkd20e.js} +1 -1
- package/dist/client/assets/layout-Ck4QNb1R.js +1 -0
- package/dist/client/assets/{layout-10Sxtyop.js → layout-VG2uM_nk.js} +1 -1
- package/dist/client/assets/login-x4JJuKeA.js +1 -0
- package/dist/client/assets/{logo-upload-iqCQyRXD.js → logo-upload-7WcycT9q.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-C3qFwvPf.js → mcp-app-renderer-hLmmzHl_.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DCDS8v4f.js → mcp-server-card-CwYAe4vO.js} +1 -1
- package/dist/client/assets/mcp-server-detail-CjZvaa-f.js +2 -0
- package/dist/client/assets/{members-CykhAYWe.js → members-Sgl6kVS6.js} +1 -1
- package/dist/client/assets/{monaco-editor-DQf5JSy_.js → monaco-editor-BS1-hh4n.js} +4 -4
- package/dist/client/assets/monitoring-DWB-fw7M.js +4 -0
- package/dist/client/assets/monitoring-dashboard-edit-DdNrWKBz.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-CXCG5P_H.js → monitoring-dashboard-view-BUxqPLpn.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-BfoeteQX.js → monitoring-stats-row-CiWvBCYV.js} +2 -2
- package/dist/client/assets/{oauth-callback-CXrwzvh_.js → oauth-callback-7ed5Z9Xs.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-bQZvbhnr.js → oauth-callback-ai-provider-qEm-Q5-E.js} +1 -1
- package/dist/client/assets/{org-ai-providers-4gYTufEL.js → org-ai-providers-CUAlOa9f.js} +1 -1
- package/dist/client/assets/page-BQl7Ie3w.js +1 -0
- package/dist/client/assets/page-DfQnSuW1.js +1 -0
- package/dist/client/assets/{plugin-empty-state-cb7GbeKy.js → plugin-empty-state-DUosCqGd.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CEvZCNFj.js → plugin-empty-state-qFDP0Nr2.js} +1 -1
- package/dist/client/assets/{plugin-header-C4ZfQdcs.js → plugin-header-BeGFVTX4.js} +1 -1
- package/dist/client/assets/{plugin-header-Do_HgCfI.js → plugin-header-CJlxZY-i.js} +1 -1
- package/dist/client/assets/plugins-CzL725OF.js +1 -0
- package/dist/client/assets/popover-CF2iI6mL.js +1 -0
- package/dist/client/assets/project-app-view-lqZ02NJN.js +1 -0
- package/dist/client/assets/project-layout-CBbKmowd.js +1 -0
- package/dist/client/assets/{project-plugins-C18qk0lc.js → project-plugins-DqmH9sWQ.js} +1 -1
- package/dist/client/assets/{projects-list-CtvT2y9h.js → projects-list-Bz_1RhAg.js} +1 -1
- package/dist/client/assets/{registry-layout-Cvu5zKVR.js → registry-layout-6H7s-msc.js} +2 -2
- package/dist/client/assets/{registry-utils-Bx7--rIH.js → registry-utils-DZHZD5gP.js} +1 -1
- package/dist/client/assets/{reset-password-CSswd9M3.js → reset-password-3HgT81EI.js} +1 -1
- package/dist/client/assets/{resizable-B0HQ1vuq.js → resizable-BwEPpKFX.js} +1 -1
- package/dist/client/assets/{save-actions-BxTuQTa4.js → save-actions-Z-_7bu1u.js} +1 -1
- package/dist/client/assets/scroll-area-CwrVaRUF.js +1 -0
- package/dist/client/assets/select-hHfKwVbN.js +1 -0
- package/dist/client/assets/select-virtual-mcp-DsImheli.js +1 -0
- package/dist/client/assets/shell-layout-Bh0wZbL8.js +3 -0
- package/dist/client/assets/{sidebar-settings-pZmI7pGH.js → sidebar-settings-U5rAu7py.js} +1 -1
- package/dist/client/assets/{skeleton-NLo71_Sb.js → skeleton-BvrwcS3X.js} +1 -1
- package/dist/client/assets/spinner-CSLYV8gq.js +1 -0
- package/dist/client/assets/{store-invite-CP9PWG-2.js → store-invite-z_eVOBRF.js} +1 -1
- package/dist/client/assets/switch-CoYIum7D.js +1 -0
- package/dist/client/assets/{table-BK1bAac3.js → table-BSLV9H8I.js} +1 -1
- package/dist/client/assets/tabs-sTqc1_U2.js +1 -0
- package/dist/client/assets/{task-status-DCsPkppQ.js → task-status-CrO2oj_v.js} +37 -37
- package/dist/client/assets/tasks-CazLoC59.js +1 -0
- package/dist/client/assets/tasks-panel-DBJx0hs6.js +1 -0
- package/dist/client/assets/textarea-CgJ5x-hs.js +1 -0
- package/dist/client/assets/{time-range-picker-CEhZhu7c.js → time-range-picker-BCm8UHQI.js} +1 -1
- package/dist/client/assets/toggle-group-C20N8vss.js +1 -0
- package/dist/client/assets/{tools-list-DGVVcYEB.js → tools-list-JehNbMf9.js} +1 -1
- package/dist/client/assets/tooltip-DHJtaI_Z.js +1 -0
- package/dist/client/assets/{topbar-portal-DLbOrsQP.js → topbar-portal-jewy4fLu.js} +1 -1
- package/dist/client/assets/{types-BOmhR0hZ.js → types-BtTmvTe4.js} +1 -1
- package/dist/client/assets/{use-automations-CPlNdxed.js → use-automations-D-X6Oij9.js} +1 -1
- package/dist/client/assets/{use-collections-Le9CzDbY.js → use-collections-DhavVshD.js} +1 -1
- package/dist/client/assets/{use-connection-CNeKPAtP.js → use-connection-CVlyXslk.js} +1 -1
- package/dist/client/assets/{use-copy-CR_0d0zs.js → use-copy-DkDz3lds.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BOxl7MdZ.js → use-create-virtual-mcp-DZAv89rZ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CbBHKCjw.js → use-infinite-scroll-j2WybGGN.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-Ckutd61H.js → use-install-from-registry-Ch6GOwHv.js} +1 -1
- package/dist/client/assets/{use-list-state-DrSbpG8C.js → use-list-state-Baq-X1EV.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D4XXlnov.js → use-mcp-prompts-BDRKUj7D.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-BueR0w1E.js → use-mcp-resources-BxIahbOo.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CFyULGGP.js → use-mcp-tools-kv4r4Zvn.js} +1 -1
- package/dist/client/assets/{use-members-Bgz9FSqE.js → use-members-Coq2XO1k.js} +1 -1
- package/dist/client/assets/{use-project-RpN1fut9.js → use-project-XBmxO4XX.js} +1 -1
- package/dist/client/assets/{use-store-discovery-BS96E_Li.js → use-store-discovery-D-xa6Q86.js} +1 -1
- package/dist/client/assets/use-view-mode-CdGajc1j.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-DGT5zflo.js → use-virtual-mcp-DCxXK_bv.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-H-W7n7En.js +1 -0
- package/dist/client/assets/{useMutation-Betr8yis.js → useMutation-DrLoVqQ7.js} +1 -1
- package/dist/client/assets/useQuery-B-AaJTeZ.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Czq4y4BP.js +1 -0
- package/dist/client/assets/{user-ChA79mrb.js → user-8V0wpye0.js} +1 -1
- package/dist/client/assets/workflow-Bb3JE-XH.js +1 -0
- package/dist/client/index.html +3 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/pg-cloudflare/README.md +112 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.js +6 -0
- package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.js +152 -0
- package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +3 -0
- package/dist/server/node_modules/pg-cloudflare/package.json +39 -0
- package/dist/server/node_modules/pg-cloudflare/src/empty.ts +3 -0
- package/dist/server/node_modules/pg-cloudflare/src/index.ts +166 -0
- package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +25 -0
- package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
- package/dist/server/node_modules/pg-connection-string/README.md +105 -0
- package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
- package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
- package/dist/server/node_modules/pg-connection-string/index.js +231 -0
- package/dist/server/node_modules/pg-connection-string/package.json +52 -0
- package/dist/server/node_modules/pg-pool/LICENSE +21 -0
- package/dist/server/node_modules/pg-pool/README.md +357 -0
- package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
- package/dist/server/node_modules/pg-pool/index.js +517 -0
- package/dist/server/node_modules/pg-pool/package.json +51 -0
- package/dist/server/node_modules/pg-protocol/LICENSE +21 -0
- package/dist/server/node_modules/pg-protocol/README.md +3 -0
- package/dist/server/node_modules/pg-protocol/dist/b.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js +23 -0
- package/dist/server/node_modules/pg-protocol/dist/b.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +15 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +16 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
- package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +530 -0
- package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/index.d.ts +6 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js +15 -0
- package/dist/server/node_modules/pg-protocol/dist/index.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +162 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js +160 -0
- package/dist/server/node_modules/pg-protocol/dist/messages.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +252 -0
- package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +24 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js +324 -0
- package/dist/server/node_modules/pg-protocol/dist/parser.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js +189 -0
- package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +1 -0
- package/dist/server/node_modules/pg-protocol/esm/index.js +11 -0
- package/dist/server/node_modules/pg-protocol/package.json +45 -0
- package/dist/server/node_modules/pg-protocol/src/b.ts +25 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
- package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +85 -0
- package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +575 -0
- package/dist/server/node_modules/pg-protocol/src/index.ts +11 -0
- package/dist/server/node_modules/pg-protocol/src/messages.ts +262 -0
- package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +276 -0
- package/dist/server/node_modules/pg-protocol/src/parser.ts +413 -0
- package/dist/server/node_modules/pg-protocol/src/serializer.ts +274 -0
- package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
- package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
- package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +1 -0
- package/dist/server/node_modules/pg-types/.travis.yml +7 -0
- package/dist/server/node_modules/pg-types/Makefile +14 -0
- package/dist/server/node_modules/pg-types/README.md +75 -0
- package/dist/server/node_modules/pg-types/index.d.ts +137 -0
- package/dist/server/node_modules/pg-types/index.js +47 -0
- package/dist/server/node_modules/pg-types/index.test-d.ts +21 -0
- package/dist/server/node_modules/pg-types/lib/arrayParser.js +11 -0
- package/dist/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
- package/dist/server/node_modules/pg-types/lib/builtins.js +73 -0
- package/dist/server/node_modules/pg-types/lib/textParsers.js +215 -0
- package/dist/server/node_modules/pg-types/package.json +42 -0
- package/dist/server/node_modules/pg-types/test/index.js +24 -0
- package/dist/server/node_modules/pg-types/test/types.js +597 -0
- package/dist/server/node_modules/pgpass/README.md +74 -0
- package/dist/server/node_modules/pgpass/lib/helper.js +233 -0
- package/dist/server/node_modules/pgpass/lib/index.js +23 -0
- package/dist/server/node_modules/pgpass/package.json +41 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/xtend/LICENSE +20 -0
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/LayoutLeft-CbUmiI7I.js +0 -1
- package/dist/client/assets/agent-detail-DqMa-yjy.js +0 -2
- package/dist/client/assets/agents-DXD0J3OW.js +0 -1
- package/dist/client/assets/automation-detail-bmoX3GK-.js +0 -1
- package/dist/client/assets/automations-Dp1WjxxK.js +0 -1
- package/dist/client/assets/avatar-BoRF-Me1.js +0 -1
- package/dist/client/assets/badge-DIWKuwVU.js +0 -1
- package/dist/client/assets/connection-card-DuHVLZ35.js +0 -1
- package/dist/client/assets/connection-detail-vcbLbssZ.js +0 -1
- package/dist/client/assets/connections-14pDMsUe.js +0 -1
- package/dist/client/assets/dialog-B8WS5FOh.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-yMvA298P.js +0 -1
- package/dist/client/assets/editable-task-title-oggBOZ_d.js +0 -16
- package/dist/client/assets/index-B09Yemt1.js +0 -1
- package/dist/client/assets/index-CAsAeYNN.css +0 -1
- package/dist/client/assets/index-CMImT9Gt.js +0 -1
- package/dist/client/assets/index-D-6rbOIG.js +0 -1
- package/dist/client/assets/index-DnJ6a24w.js +0 -218
- package/dist/client/assets/index-hCeFdkUk.js +0 -1
- package/dist/client/assets/index-qrpgIqks.js +0 -1
- package/dist/client/assets/input-BBKBJVKe.js +0 -1
- package/dist/client/assets/layout-BjyFY_1R.js +0 -1
- package/dist/client/assets/login-ClPbfjlJ.js +0 -1
- package/dist/client/assets/mcp-server-detail-lOR_wUNJ.js +0 -2
- package/dist/client/assets/monitoring-BPuhRE0m.js +0 -4
- package/dist/client/assets/monitoring-dashboard-edit-BVtLOBNe.js +0 -1
- package/dist/client/assets/page-CCXJyUyN.js +0 -1
- package/dist/client/assets/page-DB3QLlpA.js +0 -1
- package/dist/client/assets/plugins-pEgOY1Nz.js +0 -1
- package/dist/client/assets/popover-vDURg2rv.js +0 -1
- package/dist/client/assets/project-app-view-DfCIvrF7.js +0 -1
- package/dist/client/assets/project-layout-CkMdq05b.js +0 -1
- package/dist/client/assets/scroll-area-dsTSFUPi.js +0 -1
- package/dist/client/assets/select-Bbaj2HCW.js +0 -1
- package/dist/client/assets/select-virtual-mcp-CZJoA7HG.js +0 -1
- package/dist/client/assets/sheet-B_-2ygzJ.js +0 -1
- package/dist/client/assets/shell-layout-Ca5Bbhzi.js +0 -3
- package/dist/client/assets/spinner-EdHFCjIL.js +0 -1
- package/dist/client/assets/switch-bfk4EFAk.js +0 -1
- package/dist/client/assets/tabs-aIY_aIUV.js +0 -1
- package/dist/client/assets/tasks-Dw1i-69W.js +0 -1
- package/dist/client/assets/tasks-panel-CEAgXi7r.js +0 -1
- package/dist/client/assets/textarea-lF0m7xkk.js +0 -1
- package/dist/client/assets/toggle-group-Dak-s1p3.js +0 -1
- package/dist/client/assets/tooltip-Csc3oeTz.js +0 -1
- package/dist/client/assets/use-mobile-Y3tADOOl.js +0 -1
- package/dist/client/assets/use-view-mode-BeRbE5Df.js +0 -1
- package/dist/client/assets/useInfiniteQuery-ChOuKh6v.js +0 -1
- package/dist/client/assets/useQuery-mzOsnjYJ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DFs2FFlW.js +0 -1
- package/dist/client/assets/workflow-CBDfcQFP.js +0 -1
- package/dist/server/node_modules/pg/README.md +0 -95
- package/dist/server/node_modules/pg/esm/index.mjs +0 -20
- package/dist/server/node_modules/pg/lib/client.js +0 -743
- package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
- package/dist/server/node_modules/pg/lib/connection.js +0 -221
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
- package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
- package/dist/server/node_modules/pg/lib/defaults.js +0 -91
- package/dist/server/node_modules/pg/lib/index.js +0 -73
- package/dist/server/node_modules/pg/lib/native/client.js +0 -323
- package/dist/server/node_modules/pg/lib/native/index.js +0 -2
- package/dist/server/node_modules/pg/lib/native/query.js +0 -165
- package/dist/server/node_modules/pg/lib/query.js +0 -252
- package/dist/server/node_modules/pg/lib/result.js +0 -109
- package/dist/server/node_modules/pg/lib/stream.js +0 -83
- package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
- package/dist/server/node_modules/pg/lib/utils.js +0 -217
- package/dist/server/node_modules/pg/package.json +0 -76
- /package/dist/server/node_modules/{pg → pg-cloudflare}/LICENSE +0 -0
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-C4MCCicp.js","assets/topbar-portal-DLbOrsQP.js","assets/useInfiniteQuery-ChOuKh6v.js","assets/infiniteQueryObserver-XS4LWR6q.js","assets/checkbox-DygphnIU.js","assets/Check-CLxUgI8Z.js","assets/AlertCircle-QngH9BVd.js","assets/ChevronRight-BEUO8jhU.js","assets/Download01-CN3AkzFm.js","assets/File02-k_9AZvHT.js","assets/Grid01-B9zEjFyx.js","assets/Home02-DsMimBHw.js","assets/List-D6xZGoxJ.js","assets/Loading01-DQphO9Su.js","assets/Trash01-CYMRq_nY.js","assets/Upload01-BQ7z5iC5.js","assets/useMutation-Betr8yis.js","assets/plugin-header-Do_HgCfI.js","assets/ChevronDown-D0b1rvAp.js","assets/registry-layout-Cvu5zKVR.js","assets/CheckCircle-DDKCxiAn.js","assets/Container-b65PFshp.js","assets/Settings01-B76KnDHb.js","assets/useQuery-mzOsnjYJ.js","assets/constants-D5QZg84_.js","assets/badge-DIWKuwVU.js","assets/input-BBKBJVKe.js","assets/dropdown-menu-DE2pKopg.js","assets/table-BK1bAac3.js","assets/toggle-group-Dak-s1p3.js","assets/use-view-mode-BeRbE5Df.js","assets/use-mobile-Y3tADOOl.js","assets/DotsVertical-Bo0fAyx-.js","assets/FilterLines-BQVg1PzI.js","assets/Globe01-sBw0ReRO.js","assets/SearchMd-C8ADHGFY.js","assets/dialog-B8WS5FOh.js","assets/X-BT_y3J3a.js","assets/alert-dialog-BqCiJDa8.js","assets/card-gfMzoGpr.js","assets/CheckVerified02-Brnp4Z-Q.js","assets/label-DJvdRQ2A.js","assets/select-Bbaj2HCW.js","assets/ChevronUp-BWhuIqS7.js","assets/index-hCeFdkUk.js","assets/switch-bfk4EFAk.js","assets/textarea-lF0m7xkk.js","assets/ArrowLeft-DX2ldnBo.js","assets/use-copy-CR_0d0zs.js","assets/RefreshCcw01-oV1XFIRn.js","assets/Link01-VlHez4tu.js","assets/Eye-Cqad01Et.js","assets/LinkExternal01-vs3DKlfq.js","assets/use-collections-Le9CzDbY.js","assets/use-connection-CNeKPAtP.js","assets/popover-vDURg2rv.js","assets/Copy01-Ds0OKZs5.js","assets/EyeOff-rTYDCZUH.js","assets/Save01-CpNh-fPw.js","assets/Key01-V3zgT2bk.js","assets/Plus-CURSuoDd.js","assets/tooltip-Csc3oeTz.js","assets/Play-jCDYHrdu.js","assets/plugin-header-C4ZfQdcs.js","assets/Dataflow03-CE4IJeUz.js","assets/plugin-empty-state-CEvZCNFj.js","assets/login-ClPbfjlJ.js","assets/reset-password-CSswd9M3.js","assets/oauth-callback-CXrwzvh_.js","assets/oauth-callback-ai-provider-bQZvbhnr.js","assets/shell-layout-Ca5Bbhzi.js","assets/task-status-DCsPkppQ.js","assets/context-CGMT963w.js","assets/decopilot-events-Brt4gAR6.js","assets/index-Bwlq4qOs.js","assets/skeleton-NLo71_Sb.js","assets/spinner-EdHFCjIL.js","assets/use-mcp-prompts-D4XXlnov.js","assets/form-tOTNzCZe.js","assets/index-BLtI6TU9.js","assets/usage-BW6ztpN6.js","assets/ArrowUp-Wy3Qa9X3.js","assets/Edit01-BeW3IgwV.js","assets/Lock01-Cbqd9PVH.js","assets/Users03-DEpvReeu.js","assets/org-ai-providers-4gYTufEL.js","assets/index-B09Yemt1.js","assets/avatar-BoRF-Me1.js","assets/ai-providers-logos-DGTpC_MW.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/tabs-aIY_aIUV.js","assets/AlignLeft-BUW8XsMa.js","assets/Image01-zSA25K9S.js","assets/Tool01-DlbILfZg.js","assets/select-virtual-mcp-CZJoA7HG.js","assets/integration-icon-C9GR_8Ea.js","assets/use-virtual-mcp-DGT5zflo.js","assets/use-create-virtual-mcp-BOxl7MdZ.js","assets/use-mcp-resources-BueR0w1E.js","assets/collapsible-BJo6q_NJ.js","assets/index-CMImT9Gt.js","assets/marked.esm-BaswSlok.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-C3qFwvPf.js","assets/types-BOmhR0hZ.js","assets/Globe02-DlxZmkSI.js","assets/LayersTwo01-D3otbQFN.js","assets/XClose-C-H07PEn.js","assets/Clock-Aquumu5W.js","assets/useSuspenseInfiniteQuery-DFs2FFlW.js","assets/ChevronLeft-BOF7bp9d.js","assets/editable-task-title-oggBOZ_d.js","assets/tasks-panel-CEAgXi7r.js","assets/collection-search-Dzoe9W56.js","assets/user-ChA79mrb.js","assets/format-time-CMKyl-GC.js","assets/empty-state-BjCXvoyS.js","assets/create-project-dialog-Bs_mS8aj.js","assets/LayoutLeft-CbUmiI7I.js","assets/use-project-RpN1fut9.js","assets/sheet-B_-2ygzJ.js","assets/Building02-DW6RLSwU.js","assets/create-organization-dialog-CeMf7qju.js","assets/File06-BAp2UeVQ.js","assets/Shield01-BodC6YjW.js","assets/Inbox01-Bcon6dDK.js","assets/use-mcp-tools-CFyULGGP.js","assets/resizable-B0HQ1vuq.js","assets/home-rO4pkzPH.js","assets/project-layout-CkMdq05b.js","assets/Zap-BY3Hn1l9.js","assets/Code01-_in0gxFd.js","assets/logo-upload-iqCQyRXD.js","assets/project-plugins-C18qk0lc.js","assets/registry-utils-Bx7--rIH.js","assets/binder-CuBUxi11.js","assets/use-install-from-registry-Ckutd61H.js","assets/extract-connection-data-CZxT3XNH.js","assets/generate-id-kfQDJb0K.js","assets/members-CykhAYWe.js","assets/collection-display-button-C42ZnuS7.js","assets/ArrowDown-Ba2t7m6d.js","assets/breadcrumb-BWfepeob.js","assets/collection-table-wrapper-Bka5CUqj.js","assets/use-members-Bgz9FSqE.js","assets/DotsHorizontal-EK1-V4Yv.js","assets/command-D_HBfmpj.js","assets/index-qrpgIqks.js","assets/page-DB3QLlpA.js","assets/tasks-Dw1i-69W.js","assets/layout-BjyFY_1R.js","assets/general-DOjbT8YE.js","assets/danger-zone-BE94J4G-.js","assets/dependencies-DQ9gMDrw.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/sidebar-settings-pZmI7pGH.js","assets/plugins-pEgOY1Nz.js","assets/danger-gTdMMqBl.js","assets/projects-list-CtvT2y9h.js","assets/connections-14pDMsUe.js","assets/collection-tabs-D9qLvNTu.js","assets/connection-card-DuHVLZ35.js","assets/use-infinite-scroll-CbBHKCjw.js","assets/use-list-state-DrSbpG8C.js","assets/use-store-discovery-BS96E_Li.js","assets/connection-slug-Bw8dtz1U.js","assets/slugify-CEUa2lfQ.js","assets/CheckSquare-IgZnioYh.js","assets/Terminal-BHkLJhoR.js","assets/env-vars-editor-BjeFjhEe.js","assets/connection-detail-vcbLbssZ.js","assets/index-DjVQ8cwy.js","assets/index-DyL93sTY.js","assets/index-D-6rbOIG.js","assets/layout-10Sxtyop.js","assets/monitoring-stats-row-BfoeteQX.js","assets/tools-list-DGVVcYEB.js","assets/collection-detail-fTigPh-V.js","assets/save-actions-BxTuQTa4.js","assets/monaco-editor-DQf5JSy_.js","assets/empty-state-Bk9Z7Q-U.js","assets/scroll-area-dsTSFUPi.js","assets/monitoring-BPuhRE0m.js","assets/time-range-picker-CEhZhu7c.js","assets/Edit05-DDQmnS5O.js","assets/monitoring-dashboard-view-CXCG5P_H.js","assets/monitoring-dashboard-edit-BVtLOBNe.js","assets/page-CCXJyUyN.js","assets/mcp-server-card-DCDS8v4f.js","assets/mcp-server-detail-lOR_wUNJ.js","assets/InfoCircle-CA8mfcG6.js","assets/mcp-server-detail-DWnTz46N.css","assets/automations-Dp1WjxxK.js","assets/use-automations-CPlNdxed.js","assets/automation-detail-bmoX3GK-.js","assets/agents-DXD0J3OW.js","assets/agent-connections-preview-DbwllQSw.js","assets/agent-detail-DqMa-yjy.js","assets/project-app-view-DfCIvrF7.js","assets/workflow-CBDfcQFP.js","assets/dynamic-plugin-layout-yMvA298P.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function K5(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const W5="modulepreload",Y5=function(e){return"/"+e},ZR={},ut=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");a=c(n.map(f=>{if(f=Y5(f),f in ZR)return;ZR[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":W5,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((y,b)=>{g.addEventListener("load",y),g.addEventListener("error",()=>b(Error(`Unable to preload CSS for ${f}`)))})}))}function i(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return a.then(c=>{for(const u of c||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var woe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vy={exports:{}},mu={};var KR;function Q5(){if(KR)return mu;KR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:c,ref:a!==void 0?a:null,props:i}}return mu.Fragment=t,mu.jsx=n,mu.jsxs=n,mu}var WR;function X5(){return WR||(WR=1,vy.exports=Q5()),vy.exports}var R=X5(),yy={exports:{}},gu={},_y={exports:{}},by={};var YR;function J5(){return YR||(YR=1,(function(e){function t(F,X){var ae=F.length;F.push(X);e:for(;0<ae;){var fe=ae-1>>>1,K=F[fe];if(0<a(K,X))F[fe]=X,F[ae]=K,ae=fe;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var X=F[0],ae=F.pop();if(ae!==X){F[0]=ae;e:for(var fe=0,K=F.length,P=K>>>1;fe<P;){var q=2*(fe+1)-1,B=F[q],L=q+1,$=F[L];if(0>a(B,ae))L<K&&0>a($,B)?(F[fe]=$,F[L]=ae,fe=L):(F[fe]=B,F[q]=ae,fe=q);else if(L<K&&0>a($,ae))F[fe]=$,F[L]=ae,fe=L;else break e}}return X}function a(F,X){var ae=F.sortIndex-X.sortIndex;return ae!==0?ae:F.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var d=[],f=[],m=1,p=null,g=3,y=!1,b=!1,S=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(F){for(var X=n(f);X!==null;){if(X.callback===null)r(f);else if(X.startTime<=F)r(f),X.sortIndex=X.expirationTime,t(d,X);else break;X=n(f)}}function C(F){if(S=!1,O(F),!b)if(n(d)!==null)b=!0,I||(I=!0,G());else{var X=n(f);X!==null&&ie(C,X.startTime-F)}}var I=!1,N=-1,D=5,z=-1;function W(){return w?!0:!(e.unstable_now()-z<D)}function V(){if(w=!1,I){var F=e.unstable_now();z=F;var X=!0;try{e:{b=!1,S&&(S=!1,E(N),N=-1),y=!0;var ae=g;try{t:{for(O(F),p=n(d);p!==null&&!(p.expirationTime>F&&W());){var fe=p.callback;if(typeof fe=="function"){p.callback=null,g=p.priorityLevel;var K=fe(p.expirationTime<=F);if(F=e.unstable_now(),typeof K=="function"){p.callback=K,O(F),X=!0;break t}p===n(d)&&r(d),O(F)}else r(d);p=n(d)}if(p!==null)X=!0;else{var P=n(f);P!==null&&ie(C,P.startTime-F),X=!1}}break e}finally{p=null,g=ae,y=!1}X=void 0}}finally{X?G():I=!1}}}var G;if(typeof T=="function")G=function(){T(V)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,J=U.port2;U.port1.onmessage=V,G=function(){J.postMessage(null)}}else G=function(){x(V,0)};function ie(F,X){N=x(function(){F(e.unstable_now())},X)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var X=3;break;default:X=g}var ae=g;g=X;try{return F()}finally{g=ae}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(F,X){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var ae=g;g=F;try{return X()}finally{g=ae}},e.unstable_scheduleCallback=function(F,X,ae){var fe=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?fe+ae:fe):ae=fe,F){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=ae+K,F={id:m++,callback:X,priorityLevel:F,startTime:ae,expirationTime:K,sortIndex:-1},ae>fe?(F.sortIndex=ae,t(f,F),n(d)===null&&F===n(f)&&(S?(E(N),N=-1):S=!0,ie(C,ae-fe))):(F.sortIndex=K,t(d,F),b||y||(b=!0,I||(I=!0,G()))),F},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(F){var X=g;return function(){var ae=g;g=X;try{return F.apply(this,arguments)}finally{g=ae}}}})(by)),by}var QR;function eD(){return QR||(QR=1,_y.exports=J5()),_y.exports}var wy={exports:{}},et={};var XR;function tD(){if(XR)return et;XR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function x(P,q,B){this.props=P,this.context=q,this.refs=w,this.updater=B||b}x.prototype.isReactComponent={},x.prototype.setState=function(P,q){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,q,"setState")},x.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=x.prototype;function T(P,q,B){this.props=P,this.context=q,this.refs=w,this.updater=B||b}var O=T.prototype=new E;O.constructor=T,S(O,x.prototype),O.isPureReactComponent=!0;var C=Array.isArray;function I(){}var N={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function z(P,q,B){var L=B.ref;return{$$typeof:e,type:P,key:q,ref:L!==void 0?L:null,props:B}}function W(P,q){return z(P.type,q,P.props)}function V(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function G(P){var q={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(B){return q[B]})}var U=/\/+/g;function J(P,q){return typeof P=="object"&&P!==null&&P.key!=null?G(""+P.key):q.toString(36)}function ie(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(I,I):(P.status="pending",P.then(function(q){P.status==="pending"&&(P.status="fulfilled",P.value=q)},function(q){P.status==="pending"&&(P.status="rejected",P.reason=q)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function F(P,q,B,L,$){var Q=typeof P;(Q==="undefined"||Q==="boolean")&&(P=null);var me=!1;if(P===null)me=!0;else switch(Q){case"bigint":case"string":case"number":me=!0;break;case"object":switch(P.$$typeof){case e:case t:me=!0;break;case m:return me=P._init,F(me(P._payload),q,B,L,$)}}if(me)return $=$(P),me=L===""?"."+J(P,0):L,C($)?(B="",me!=null&&(B=me.replace(U,"$&/")+"/"),F($,q,B,"",function(ke){return ke})):$!=null&&(V($)&&($=W($,B+($.key==null||P&&P.key===$.key?"":(""+$.key).replace(U,"$&/")+"/")+me)),q.push($)),1;me=0;var ye=L===""?".":L+":";if(C(P))for(var Ae=0;Ae<P.length;Ae++)L=P[Ae],Q=ye+J(L,Ae),me+=F(L,q,B,Q,$);else if(Ae=y(P),typeof Ae=="function")for(P=Ae.call(P),Ae=0;!(L=P.next()).done;)L=L.value,Q=ye+J(L,Ae++),me+=F(L,q,B,Q,$);else if(Q==="object"){if(typeof P.then=="function")return F(ie(P),q,B,L,$);throw q=String(P),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return me}function X(P,q,B){if(P==null)return P;var L=[],$=0;return F(P,L,"","",function(Q){return q.call(B,Q,$++)}),L}function ae(P){if(P._status===-1){var q=P._result;q=q(),q.then(function(B){(P._status===0||P._status===-1)&&(P._status=1,P._result=B)},function(B){(P._status===0||P._status===-1)&&(P._status=2,P._result=B)}),P._status===-1&&(P._status=0,P._result=q)}if(P._status===1)return P._result.default;throw P._result}var fe=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},K={map:X,forEach:function(P,q,B){X(P,function(){q.apply(this,arguments)},B)},count:function(P){var q=0;return X(P,function(){q++}),q},toArray:function(P){return X(P,function(q){return q})||[]},only:function(P){if(!V(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return et.Activity=p,et.Children=K,et.Component=x,et.Fragment=n,et.Profiler=a,et.PureComponent=T,et.StrictMode=r,et.Suspense=d,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,et.__COMPILER_RUNTIME={__proto__:null,c:function(P){return N.H.useMemoCache(P)}},et.cache=function(P){return function(){return P.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(P,q,B){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var L=S({},P.props),$=P.key;if(q!=null)for(Q in q.key!==void 0&&($=""+q.key),q)!D.call(q,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&q.ref===void 0||(L[Q]=q[Q]);var Q=arguments.length-2;if(Q===1)L.children=B;else if(1<Q){for(var me=Array(Q),ye=0;ye<Q;ye++)me[ye]=arguments[ye+2];L.children=me}return z(P.type,$,L)},et.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:i,_context:P},P},et.createElement=function(P,q,B){var L,$={},Q=null;if(q!=null)for(L in q.key!==void 0&&(Q=""+q.key),q)D.call(q,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&($[L]=q[L]);var me=arguments.length-2;if(me===1)$.children=B;else if(1<me){for(var ye=Array(me),Ae=0;Ae<me;Ae++)ye[Ae]=arguments[Ae+2];$.children=ye}if(P&&P.defaultProps)for(L in me=P.defaultProps,me)$[L]===void 0&&($[L]=me[L]);return z(P,Q,$)},et.createRef=function(){return{current:null}},et.forwardRef=function(P){return{$$typeof:u,render:P}},et.isValidElement=V,et.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:ae}},et.memo=function(P,q){return{$$typeof:f,type:P,compare:q===void 0?null:q}},et.startTransition=function(P){var q=N.T,B={};N.T=B;try{var L=P(),$=N.S;$!==null&&$(B,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(I,fe)}catch(Q){fe(Q)}finally{q!==null&&B.types!==null&&(q.types=B.types),N.T=q}},et.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},et.use=function(P){return N.H.use(P)},et.useActionState=function(P,q,B){return N.H.useActionState(P,q,B)},et.useCallback=function(P,q){return N.H.useCallback(P,q)},et.useContext=function(P){return N.H.useContext(P)},et.useDebugValue=function(){},et.useDeferredValue=function(P,q){return N.H.useDeferredValue(P,q)},et.useEffect=function(P,q){return N.H.useEffect(P,q)},et.useEffectEvent=function(P){return N.H.useEffectEvent(P)},et.useId=function(){return N.H.useId()},et.useImperativeHandle=function(P,q,B){return N.H.useImperativeHandle(P,q,B)},et.useInsertionEffect=function(P,q){return N.H.useInsertionEffect(P,q)},et.useLayoutEffect=function(P,q){return N.H.useLayoutEffect(P,q)},et.useMemo=function(P,q){return N.H.useMemo(P,q)},et.useOptimistic=function(P,q){return N.H.useOptimistic(P,q)},et.useReducer=function(P,q,B){return N.H.useReducer(P,q,B)},et.useRef=function(P){return N.H.useRef(P)},et.useState=function(P){return N.H.useState(P)},et.useSyncExternalStore=function(P,q,B){return N.H.useSyncExternalStore(P,q,B)},et.useTransition=function(){return N.H.useTransition()},et.version="19.2.4",et}var JR;function zs(){return JR||(JR=1,wy.exports=tD()),wy.exports}var Sy={exports:{}},tr={};var ex;function nD(){if(ex)return tr;ex=1;var e=zs();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}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},a=Symbol.for("react.portal");function i(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return tr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,tr.createPortal=function(d,f){var m=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 i(d,f,null,m)},tr.flushSync=function(d){var f=c.T,m=r.p;try{if(c.T=null,r.p=2,d)return d()}finally{c.T=f,r.p=m,r.d.f()}},tr.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))},tr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},tr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:y}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},tr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,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)},tr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,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})}},tr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},tr.requestFormReset=function(d){r.d.r(d)},tr.unstable_batchedUpdates=function(d,f){return d(f)},tr.useFormState=function(d,f,m){return c.H.useFormState(d,f,m)},tr.useFormStatus=function(){return c.H.useHostTransitionStatus()},tr.version="19.2.4",tr}var tx;function KC(){if(tx)return Sy.exports;tx=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(),Sy.exports=nD(),Sy.exports}var nx;function rD(){if(nx)return gu;nx=1;var e=eD(),t=zs(),n=KC();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var s=o,l=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(l=s.return),o=s.return;while(o)}return s.tag===3?l:null}function c(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function u(o){if(o.tag===31){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function d(o){if(i(o)!==o)throw Error(r(188))}function f(o){var s=o.alternate;if(!s){if(s=i(o),s===null)throw Error(r(188));return s!==o?null:o}for(var l=o,h=s;;){var v=l.return;if(v===null)break;var _=v.alternate;if(_===null){if(h=v.return,h!==null){l=h;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===l)return d(v),o;if(_===h)return d(v),s;_=_.sibling}throw Error(r(188))}if(l.return!==h.return)l=v,h=_;else{for(var k=!1,j=v.child;j;){if(j===l){k=!0,l=v,h=_;break}if(j===h){k=!0,h=v,l=_;break}j=j.sibling}if(!k){for(j=_.child;j;){if(j===l){k=!0,l=_,h=v;break}if(j===h){k=!0,h=_,l=v;break}j=j.sibling}if(!k)throw Error(r(189))}}if(l.alternate!==h)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?o:s}function m(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o;for(o=o.child;o!==null;){if(s=m(o),s!==null)return s;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function G(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function J(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case S:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case I:return"SuspenseList";case z:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case T:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case O:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return s=o.displayName||null,s!==null?s:J(o.type)||"Memo";case D:s=o._payload,o=o._init;try{return J(o(s))}catch{}}return null}var ie=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},fe=[],K=-1;function P(o){return{current:o}}function q(o){0>K||(o.current=fe[K],fe[K]=null,K--)}function B(o,s){K++,fe[K]=o.current,o.current=s}var L=P(null),$=P(null),Q=P(null),me=P(null);function ye(o,s){switch(B(Q,s),B($,o),B(L,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?gR(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=gR(s),o=vR(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}q(L),B(L,o)}function Ae(){q(L),q($),q(Q)}function ke(o){o.memoizedState!==null&&B(me,o);var s=L.current,l=vR(s,o.type);s!==l&&(B($,o),B(L,l))}function H(o){$.current===o&&(q(L),q($)),me.current===o&&(q(me),du._currentValue=ae)}var ne,_e;function pe(o){if(ne===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);ne=s&&s[1]||"",_e=-1<l.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+ne+o+_e}var ce=!1;function Oe(o,s){if(!o||ce)return"";ce=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ge){var he=ge}Reflect.construct(o,[],xe)}else{try{xe.call()}catch(ge){he=ge}o.call(xe.prototype)}}else{try{throw Error()}catch(ge){he=ge}(xe=o())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=h.DetermineComponentFrameRoot(),k=_[0],j=_[1];if(k&&j){var Y=k.split(`
|
|
5
|
-
`),de=j.split(`
|
|
6
|
-
`);for(v=h=0;h<Y.length&&!Y[h].includes("DetermineComponentFrameRoot");)h++;for(;v<de.length&&!de[v].includes("DetermineComponentFrameRoot");)v++;if(h===Y.length||v===de.length)for(h=Y.length-1,v=de.length-1;1<=h&&0<=v&&Y[h]!==de[v];)v--;for(;1<=h&&0<=v;h--,v--)if(Y[h]!==de[v]){if(h!==1||v!==1)do if(h--,v--,0>v||Y[h]!==de[v]){var be=`
|
|
7
|
-
`+Y[h].replace(" at new "," at ");return o.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",o.displayName)),be}while(1<=h&&0<=v);break}}}finally{ce=!1,Error.prepareStackTrace=l}return(l=o?o.displayName||o.name:"")?pe(l):""}function je(o,s){switch(o.tag){case 26:case 27:case 5:return pe(o.type);case 16:return pe("Lazy");case 13:return o.child!==s&&s!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return Oe(o.type,!1);case 11:return Oe(o.type.render,!1);case 1:return Oe(o.type,!0);case 31:return pe("Activity");default:return""}}function Ye(o){try{var s="",l=null;do s+=je(o,l),l=o,o=o.return;while(o);return s}catch(h){return`
|
|
8
|
-
Error generating stack: `+h.message+`
|
|
9
|
-
`+h.stack}}var He=Object.prototype.hasOwnProperty,Xe=e.unstable_scheduleCallback,Z=e.unstable_cancelCallback,te=e.unstable_shouldYield,re=e.unstable_requestPaint,Se=e.unstable_now,Te=e.unstable_getCurrentPriorityLevel,Re=e.unstable_ImmediatePriority,Ne=e.unstable_UserBlockingPriority,ot=e.unstable_NormalPriority,it=e.unstable_LowPriority,Dt=e.unstable_IdlePriority,hr=e.log,xn=e.unstable_setDisableYieldValue,Un=null,en=null;function zn(o){if(typeof hr=="function"&&xn(o),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(Un,o)}catch{}}var kn=Math.clz32?Math.clz32:kr,Hi=Math.log,Zs=Math.LN2;function kr(o){return o>>>=0,o===0?32:31-(Hi(o)/Zs|0)|0}var Gi=256,Zi=262144,Ks=4194304;function Fo(o){var s=o&42;if(s!==0)return s;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Qe(o,s,l){var h=o.pendingLanes;if(h===0)return 0;var v=0,_=o.suspendedLanes,k=o.pingedLanes;o=o.warmLanes;var j=h&134217727;return j!==0?(h=j&~_,h!==0?v=Fo(h):(k&=j,k!==0?v=Fo(k):l||(l=j&~o,l!==0&&(v=Fo(l))))):(j=h&~_,j!==0?v=Fo(j):k!==0?v=Fo(k):l||(l=h&~o,l!==0&&(v=Fo(l)))),v===0?0:s!==0&&s!==v&&(s&_)===0&&(_=v&-v,l=s&-s,_>=l||_===32&&(l&4194048)!==0)?s:v}function Wt(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function Nn(o,s){switch(o){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 er(){var o=Ks;return Ks<<=1,(Ks&62914560)===0&&(Ks=4194304),o}function Fa(o){for(var s=[],l=0;31>l;l++)s.push(o);return s}function tn(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function pr(o,s,l,h,v,_){var k=o.pendingLanes;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=l,o.entangledLanes&=l,o.errorRecoveryDisabledLanes&=l,o.shellSuspendCounter=0;var j=o.entanglements,Y=o.expirationTimes,de=o.hiddenUpdates;for(l=k&~l;0<l;){var be=31-kn(l),xe=1<<be;j[be]=0,Y[be]=-1;var he=de[be];if(he!==null)for(de[be]=null,be=0;be<he.length;be++){var ge=he[be];ge!==null&&(ge.lane&=-536870913)}l&=~xe}h!==0&&Ws(o,h,0),_!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=_&~(k&~s))}function Ws(o,s,l){o.pendingLanes|=s,o.suspendedLanes&=~s;var h=31-kn(s);o.entangledLanes|=s,o.entanglements[h]=o.entanglements[h]|1073741824|l&261930}function mr(o,s){var l=o.entangledLanes|=s;for(o=o.entanglements;l;){var h=31-kn(l),v=1<<h;v&s|o[h]&s&&(o[h]|=s),l&=~v}}function gr(o,s){var l=s&-s;return l=(l&42)!==0?1:Ki(l),(l&(o.suspendedLanes|s))!==0?0:l}function Ki(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function wo(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function ig(){var o=X.p;return o!==0?o:(o=window.event,o===void 0?32:zR(o.type))}function nw(o,s){var l=X.p;try{return X.p=o,s()}finally{X.p=l}}var Ba=Math.random().toString(36).slice(2),Vn="__reactFiber$"+Ba,vr="__reactProps$"+Ba,Wi="__reactContainer$"+Ba,cg="__reactEvents$"+Ba,jP="__reactListeners$"+Ba,$P="__reactHandles$"+Ba,rw="__reactResources$"+Ba,Tl="__reactMarker$"+Ba;function lg(o){delete o[Vn],delete o[vr],delete o[cg],delete o[jP],delete o[$P]}function Yi(o){var s=o[Vn];if(s)return s;for(var l=o.parentNode;l;){if(s=l[Wi]||l[Vn]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(o=RR(o);o!==null;){if(l=o[Vn])return l;o=RR(o)}return s}o=l,l=o.parentNode}return null}function Qi(o){if(o=o[Vn]||o[Wi]){var s=o.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return o}return null}function Ol(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function Xi(o){var s=o[rw];return s||(s=o[rw]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Mn(o){o[Tl]=!0}var ow=new Set,aw={};function Ys(o,s){Ji(o,s),Ji(o+"Capture",s)}function Ji(o,s){for(aw[o]=s,o=0;o<s.length;o++)ow.add(s[o])}var UP=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]*$"),sw={},iw={};function zP(o){return He.call(iw,o)?!0:He.call(sw,o)?!1:UP.test(o)?iw[o]=!0:(sw[o]=!0,!1)}function Ld(o,s,l){if(zP(s))if(l===null)o.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":o.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){o.removeAttribute(s);return}}o.setAttribute(s,""+l)}}function jd(o,s,l){if(l===null)o.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+l)}}function ca(o,s,l,h){if(h===null)o.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttributeNS(s,l,""+h)}}function Jr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function cw(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function VP(o,s,l){var h=Object.getOwnPropertyDescriptor(o.constructor.prototype,s);if(!o.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,_=h.set;return Object.defineProperty(o,s,{configurable:!0,get:function(){return v.call(this)},set:function(k){l=""+k,_.call(this,k)}}),Object.defineProperty(o,s,{enumerable:h.enumerable}),{getValue:function(){return l},setValue:function(k){l=""+k},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function ug(o){if(!o._valueTracker){var s=cw(o)?"checked":"value";o._valueTracker=VP(o,s,""+o[s])}}function lw(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return o&&(h=cw(o)?o.checked?"true":"false":o.value),o=h,o!==l?(s.setValue(o),!0):!1}function $d(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var FP=/[\n"\\]/g;function eo(o){return o.replace(FP,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function dg(o,s,l,h,v,_,k,j){o.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?o.type=k:o.removeAttribute("type"),s!=null?k==="number"?(s===0&&o.value===""||o.value!=s)&&(o.value=""+Jr(s)):o.value!==""+Jr(s)&&(o.value=""+Jr(s)):k!=="submit"&&k!=="reset"||o.removeAttribute("value"),s!=null?fg(o,k,Jr(s)):l!=null?fg(o,k,Jr(l)):h!=null&&o.removeAttribute("value"),v==null&&_!=null&&(o.defaultChecked=!!_),v!=null&&(o.checked=v&&typeof v!="function"&&typeof v!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?o.name=""+Jr(j):o.removeAttribute("name")}function uw(o,s,l,h,v,_,k,j){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(o.type=_),s!=null||l!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){ug(o);return}l=l!=null?""+Jr(l):"",s=s!=null?""+Jr(s):l,j||s===o.value||(o.value=s),o.defaultValue=s}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,o.checked=j?o.checked:!!h,o.defaultChecked=!!h,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(o.name=k),ug(o)}function fg(o,s,l){s==="number"&&$d(o.ownerDocument)===o||o.defaultValue===""+l||(o.defaultValue=""+l)}function ec(o,s,l,h){if(o=o.options,s){s={};for(var v=0;v<l.length;v++)s["$"+l[v]]=!0;for(l=0;l<o.length;l++)v=s.hasOwnProperty("$"+o[l].value),o[l].selected!==v&&(o[l].selected=v),v&&h&&(o[l].defaultSelected=!0)}else{for(l=""+Jr(l),s=null,v=0;v<o.length;v++){if(o[v].value===l){o[v].selected=!0,h&&(o[v].defaultSelected=!0);return}s!==null||o[v].disabled||(s=o[v])}s!==null&&(s.selected=!0)}}function dw(o,s,l){if(s!=null&&(s=""+Jr(s),s!==o.value&&(o.value=s),l==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=l!=null?""+Jr(l):""}function fw(o,s,l,h){if(s==null){if(h!=null){if(l!=null)throw Error(r(92));if(ie(h)){if(1<h.length)throw Error(r(93));h=h[0]}l=h}l==null&&(l=""),s=l}l=Jr(s),o.defaultValue=l,h=o.textContent,h===l&&h!==""&&h!==null&&(o.value=h),ug(o)}function tc(o,s){if(s){var l=o.firstChild;if(l&&l===o.lastChild&&l.nodeType===3){l.nodeValue=s;return}}o.textContent=s}var BP=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 hw(o,s,l){var h=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?h?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":h?o.setProperty(s,l):typeof l!="number"||l===0||BP.has(s)?s==="float"?o.cssFloat=l:o[s]=(""+l).trim():o[s]=l+"px"}function pw(o,s,l){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,l!=null){for(var h in l)!l.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?o.setProperty(h,""):h==="float"?o.cssFloat="":o[h]="");for(var v in s)h=s[v],s.hasOwnProperty(v)&&l[v]!==h&&hw(o,v,h)}else for(var _ in s)s.hasOwnProperty(_)&&hw(o,_,s[_])}function hg(o){if(o.indexOf("-")===-1)return!1;switch(o){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 qP=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"]]),HP=/^[\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 Ud(o){return HP.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function la(){}var pg=null;function mg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var nc=null,rc=null;function mw(o){var s=Qi(o);if(s&&(o=s.stateNode)){var l=o[vr]||null;e:switch(o=s.stateNode,s.type){case"input":if(dg(o,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=o;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+eo(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==o&&h.form===o.form){var v=h[vr]||null;if(!v)throw Error(r(90));dg(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<l.length;s++)h=l[s],h.form===o.form&&lw(h)}break e;case"textarea":dw(o,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&ec(o,!!l.multiple,s,!1)}}}var gg=!1;function gw(o,s,l){if(gg)return o(s,l);gg=!0;try{var h=o(s);return h}finally{if(gg=!1,(nc!==null||rc!==null)&&(Of(),nc&&(s=nc,o=rc,rc=nc=null,mw(s),o)))for(s=0;s<o.length;s++)mw(o[s])}}function Cl(o,s){var l=o.stateNode;if(l===null)return null;var h=l[vr]||null;if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(o=o.type,h=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!h;break e;default:o=!1}if(o)return null;if(l&&typeof l!="function")throw Error(r(231,s,typeof l));return l}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vg=!1;if(ua)try{var Al={};Object.defineProperty(Al,"passive",{get:function(){vg=!0}}),window.addEventListener("test",Al,Al),window.removeEventListener("test",Al,Al)}catch{vg=!1}var qa=null,yg=null,zd=null;function vw(){if(zd)return zd;var o,s=yg,l=s.length,h,v="value"in qa?qa.value:qa.textContent,_=v.length;for(o=0;o<l&&s[o]===v[o];o++);var k=l-o;for(h=1;h<=k&&s[l-h]===v[_-h];h++);return zd=v.slice(o,1<h?1-h:void 0)}function Vd(o){var s=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&s===13&&(o=13)):o=s,o===10&&(o=13),32<=o||o===13?o:0}function Fd(){return!0}function yw(){return!1}function yr(o){function s(l,h,v,_,k){this._reactName=l,this._targetInst=v,this.type=h,this.nativeEvent=_,this.target=k,this.currentTarget=null;for(var j in o)o.hasOwnProperty(j)&&(l=o[j],this[j]=l?l(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Fd:yw,this.isPropagationStopped=yw,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Fd)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Fd)},persist:function(){},isPersistent:Fd}),s}var Qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bd=yr(Qs),Il=p({},Qs,{view:0,detail:0}),GP=yr(Il),_g,bg,kl,qd=p({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sg,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==kl&&(kl&&o.type==="mousemove"?(_g=o.screenX-kl.screenX,bg=o.screenY-kl.screenY):bg=_g=0,kl=o),_g)},movementY:function(o){return"movementY"in o?o.movementY:bg}}),_w=yr(qd),ZP=p({},qd,{dataTransfer:0}),KP=yr(ZP),WP=p({},Il,{relatedTarget:0}),wg=yr(WP),YP=p({},Qs,{animationName:0,elapsedTime:0,pseudoElement:0}),QP=yr(YP),XP=p({},Qs,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),JP=yr(XP),e3=p({},Qs,{data:0}),bw=yr(e3),t3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},n3={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"},r3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o3(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=r3[o])?!!s[o]:!1}function Sg(){return o3}var a3=p({},Il,{key:function(o){if(o.key){var s=t3[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=Vd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?n3[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sg,charCode:function(o){return o.type==="keypress"?Vd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Vd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),s3=yr(a3),i3=p({},qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ww=yr(i3),c3=p({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sg}),l3=yr(c3),u3=p({},Qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),d3=yr(u3),f3=p({},qd,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),h3=yr(f3),p3=p({},Qs,{newState:0,oldState:0}),m3=yr(p3),g3=[9,13,27,32],Eg=ua&&"CompositionEvent"in window,Nl=null;ua&&"documentMode"in document&&(Nl=document.documentMode);var v3=ua&&"TextEvent"in window&&!Nl,Sw=ua&&(!Eg||Nl&&8<Nl&&11>=Nl),Ew=" ",Rw=!1;function xw(o,s){switch(o){case"keyup":return g3.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tw(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var oc=!1;function y3(o,s){switch(o){case"compositionend":return Tw(s);case"keypress":return s.which!==32?null:(Rw=!0,Ew);case"textInput":return o=s.data,o===Ew&&Rw?null:o;default:return null}}function _3(o,s){if(oc)return o==="compositionend"||!Eg&&xw(o,s)?(o=vw(),zd=yg=qa=null,oc=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Sw&&s.locale!=="ko"?null:s.data;default:return null}}var b3={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 Ow(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!b3[o.type]:s==="textarea"}function Cw(o,s,l,h){nc?rc?rc.push(h):rc=[h]:nc=h,s=Pf(s,"onChange"),0<s.length&&(l=new Bd("onChange","change",null,l,h),o.push({event:l,listeners:s}))}var Ml=null,Pl=null;function w3(o){uR(o,0)}function Hd(o){var s=Ol(o);if(lw(s))return o}function Aw(o,s){if(o==="change")return s}var Iw=!1;if(ua){var Rg;if(ua){var xg="oninput"in document;if(!xg){var kw=document.createElement("div");kw.setAttribute("oninput","return;"),xg=typeof kw.oninput=="function"}Rg=xg}else Rg=!1;Iw=Rg&&(!document.documentMode||9<document.documentMode)}function Nw(){Ml&&(Ml.detachEvent("onpropertychange",Mw),Pl=Ml=null)}function Mw(o){if(o.propertyName==="value"&&Hd(Pl)){var s=[];Cw(s,Pl,o,mg(o)),gw(w3,s)}}function S3(o,s,l){o==="focusin"?(Nw(),Ml=s,Pl=l,Ml.attachEvent("onpropertychange",Mw)):o==="focusout"&&Nw()}function E3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Hd(Pl)}function R3(o,s){if(o==="click")return Hd(s)}function x3(o,s){if(o==="input"||o==="change")return Hd(s)}function T3(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var Nr=typeof Object.is=="function"?Object.is:T3;function Dl(o,s){if(Nr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var l=Object.keys(o),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var v=l[h];if(!He.call(s,v)||!Nr(o[v],s[v]))return!1}return!0}function Pw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Dw(o,s){var l=Pw(o);o=0;for(var h;l;){if(l.nodeType===3){if(h=o+l.textContent.length,o<=s&&h>=s)return{node:l,offset:s-o};o=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Pw(l)}}function Lw(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?Lw(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function jw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=$d(o.document);s instanceof o.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)o=s.contentWindow;else break;s=$d(o.document)}return s}function Tg(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s&&(s==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||s==="textarea"||o.contentEditable==="true")}var O3=ua&&"documentMode"in document&&11>=document.documentMode,ac=null,Og=null,Ll=null,Cg=!1;function $w(o,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cg||ac==null||ac!==$d(h)||(h=ac,"selectionStart"in h&&Tg(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ll&&Dl(Ll,h)||(Ll=h,h=Pf(Og,"onSelect"),0<h.length&&(s=new Bd("onSelect","select",null,s,l),o.push({event:s,listeners:h}),s.target=ac)))}function Xs(o,s){var l={};return l[o.toLowerCase()]=s.toLowerCase(),l["Webkit"+o]="webkit"+s,l["Moz"+o]="moz"+s,l}var sc={animationend:Xs("Animation","AnimationEnd"),animationiteration:Xs("Animation","AnimationIteration"),animationstart:Xs("Animation","AnimationStart"),transitionrun:Xs("Transition","TransitionRun"),transitionstart:Xs("Transition","TransitionStart"),transitioncancel:Xs("Transition","TransitionCancel"),transitionend:Xs("Transition","TransitionEnd")},Ag={},Uw={};ua&&(Uw=document.createElement("div").style,"AnimationEvent"in window||(delete sc.animationend.animation,delete sc.animationiteration.animation,delete sc.animationstart.animation),"TransitionEvent"in window||delete sc.transitionend.transition);function Js(o){if(Ag[o])return Ag[o];if(!sc[o])return o;var s=sc[o],l;for(l in s)if(s.hasOwnProperty(l)&&l in Uw)return Ag[o]=s[l];return o}var zw=Js("animationend"),Vw=Js("animationiteration"),Fw=Js("animationstart"),C3=Js("transitionrun"),A3=Js("transitionstart"),I3=Js("transitioncancel"),Bw=Js("transitionend"),qw=new Map,Ig="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(" ");Ig.push("scrollEnd");function So(o,s){qw.set(o,s),Ys(s,[o])}var Gd=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},to=[],ic=0,kg=0;function Zd(){for(var o=ic,s=kg=ic=0;s<o;){var l=to[s];to[s++]=null;var h=to[s];to[s++]=null;var v=to[s];to[s++]=null;var _=to[s];if(to[s++]=null,h!==null&&v!==null){var k=h.pending;k===null?v.next=v:(v.next=k.next,k.next=v),h.pending=v}_!==0&&Hw(l,v,_)}}function Kd(o,s,l,h){to[ic++]=o,to[ic++]=s,to[ic++]=l,to[ic++]=h,kg|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function Ng(o,s,l,h){return Kd(o,s,l,h),Wd(o)}function ei(o,s){return Kd(o,null,null,s),Wd(o)}function Hw(o,s,l){o.lanes|=l;var h=o.alternate;h!==null&&(h.lanes|=l);for(var v=!1,_=o.return;_!==null;)_.childLanes|=l,h=_.alternate,h!==null&&(h.childLanes|=l),_.tag===22&&(o=_.stateNode,o===null||o._visibility&1||(v=!0)),o=_,_=_.return;return o.tag===3?(_=o.stateNode,v&&s!==null&&(v=31-kn(l),o=_.hiddenUpdates,h=o[v],h===null?o[v]=[s]:h.push(s),s.lane=l|536870912),_):null}function Wd(o){if(50<ou)throw ou=0,Vv=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var cc={};function k3(o,s,l,h){this.tag=o,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mr(o,s,l,h){return new k3(o,s,l,h)}function Mg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function da(o,s){var l=o.alternate;return l===null?(l=Mr(o.tag,s,o.key,o.mode),l.elementType=o.elementType,l.type=o.type,l.stateNode=o.stateNode,l.alternate=o,o.alternate=l):(l.pendingProps=s,l.type=o.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=o.flags&65011712,l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,s=o.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=o.sibling,l.index=o.index,l.ref=o.ref,l.refCleanup=o.refCleanup,l}function Gw(o,s){o.flags&=65011714;var l=o.alternate;return l===null?(o.childLanes=0,o.lanes=s,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,s=l.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function Yd(o,s,l,h,v,_){var k=0;if(h=o,typeof o=="function")Mg(o)&&(k=1);else if(typeof o=="string")k=L5(o,l,L.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case z:return o=Mr(31,l,s,v),o.elementType=z,o.lanes=_,o;case S:return ti(l.children,v,_,s);case w:k=8,v|=24;break;case x:return o=Mr(12,l,s,v|2),o.elementType=x,o.lanes=_,o;case C:return o=Mr(13,l,s,v),o.elementType=C,o.lanes=_,o;case I:return o=Mr(19,l,s,v),o.elementType=I,o.lanes=_,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case T:k=10;break e;case E:k=9;break e;case O:k=11;break e;case N:k=14;break e;case D:k=16,h=null;break e}k=29,l=Error(r(130,o===null?"null":typeof o,"")),h=null}return s=Mr(k,l,s,v),s.elementType=o,s.type=h,s.lanes=_,s}function ti(o,s,l,h){return o=Mr(7,o,h,s),o.lanes=l,o}function Pg(o,s,l){return o=Mr(6,o,null,s),o.lanes=l,o}function Zw(o){var s=Mr(18,null,null,0);return s.stateNode=o,s}function Dg(o,s,l){return s=Mr(4,o.children!==null?o.children:[],o.key,s),s.lanes=l,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var Kw=new WeakMap;function no(o,s){if(typeof o=="object"&&o!==null){var l=Kw.get(o);return l!==void 0?l:(s={value:o,source:s,stack:Ye(s)},Kw.set(o,s),s)}return{value:o,source:s,stack:Ye(s)}}var lc=[],uc=0,Qd=null,jl=0,ro=[],oo=0,Ha=null,Bo=1,qo="";function fa(o,s){lc[uc++]=jl,lc[uc++]=Qd,Qd=o,jl=s}function Ww(o,s,l){ro[oo++]=Bo,ro[oo++]=qo,ro[oo++]=Ha,Ha=o;var h=Bo;o=qo;var v=32-kn(h)-1;h&=~(1<<v),l+=1;var _=32-kn(s)+v;if(30<_){var k=v-v%5;_=(h&(1<<k)-1).toString(32),h>>=k,v-=k,Bo=1<<32-kn(s)+v|l<<v|h,qo=_+o}else Bo=1<<_|l<<v|h,qo=o}function Lg(o){o.return!==null&&(fa(o,1),Ww(o,1,0))}function jg(o){for(;o===Qd;)Qd=lc[--uc],lc[uc]=null,jl=lc[--uc],lc[uc]=null;for(;o===Ha;)Ha=ro[--oo],ro[oo]=null,qo=ro[--oo],ro[oo]=null,Bo=ro[--oo],ro[oo]=null}function Yw(o,s){ro[oo++]=Bo,ro[oo++]=qo,ro[oo++]=Ha,Bo=s.id,qo=s.overflow,Ha=o}var Fn=null,Zt=null,St=!1,Ga=null,ao=!1,$g=Error(r(519));function Za(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $l(no(s,o)),$g}function Qw(o){var s=o.stateNode,l=o.type,h=o.memoizedProps;switch(s[Vn]=o,s[vr]=h,l){case"dialog":yt("cancel",s),yt("close",s);break;case"iframe":case"object":case"embed":yt("load",s);break;case"video":case"audio":for(l=0;l<su.length;l++)yt(su[l],s);break;case"source":yt("error",s);break;case"img":case"image":case"link":yt("error",s),yt("load",s);break;case"details":yt("toggle",s);break;case"input":yt("invalid",s),uw(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":yt("invalid",s);break;case"textarea":yt("invalid",s),fw(s,h.value,h.defaultValue,h.children)}l=h.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||h.suppressHydrationWarning===!0||pR(s.textContent,l)?(h.popover!=null&&(yt("beforetoggle",s),yt("toggle",s)),h.onScroll!=null&&yt("scroll",s),h.onScrollEnd!=null&&yt("scrollend",s),h.onClick!=null&&(s.onclick=la),s=!0):s=!1,s||Za(o,!0)}function Xw(o){for(Fn=o.return;Fn;)switch(Fn.tag){case 5:case 31:case 13:ao=!1;return;case 27:case 3:ao=!0;return;default:Fn=Fn.return}}function dc(o){if(o!==Fn)return!1;if(!St)return Xw(o),St=!0,!1;var s=o.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=o.type,l=!(l!=="form"&&l!=="button")||ny(o.type,o.memoizedProps)),l=!l),l&&Zt&&Za(o),Xw(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Zt=ER(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Zt=ER(o)}else s===27?(s=Zt,is(o.type)?(o=iy,iy=null,Zt=o):Zt=s):Zt=Fn?io(o.stateNode.nextSibling):null;return!0}function ni(){Zt=Fn=null,St=!1}function Ug(){var o=Ga;return o!==null&&(Sr===null?Sr=o:Sr.push.apply(Sr,o),Ga=null),o}function $l(o){Ga===null?Ga=[o]:Ga.push(o)}var zg=P(null),ri=null,ha=null;function Ka(o,s,l){B(zg,s._currentValue),s._currentValue=l}function pa(o){o._currentValue=zg.current,q(zg)}function Vg(o,s,l){for(;o!==null;){var h=o.alternate;if((o.childLanes&s)!==s?(o.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),o===l)break;o=o.return}}function Fg(o,s,l,h){var v=o.child;for(v!==null&&(v.return=o);v!==null;){var _=v.dependencies;if(_!==null){var k=v.child;_=_.firstContext;e:for(;_!==null;){var j=_;_=v;for(var Y=0;Y<s.length;Y++)if(j.context===s[Y]){_.lanes|=l,j=_.alternate,j!==null&&(j.lanes|=l),Vg(_.return,l,o),h||(k=null);break e}_=j.next}}else if(v.tag===18){if(k=v.return,k===null)throw Error(r(341));k.lanes|=l,_=k.alternate,_!==null&&(_.lanes|=l),Vg(k,l,o),k=null}else k=v.child;if(k!==null)k.return=v;else for(k=v;k!==null;){if(k===o){k=null;break}if(v=k.sibling,v!==null){v.return=k.return,k=v;break}k=k.return}v=k}}function fc(o,s,l,h){o=null;for(var v=s,_=!1;v!==null;){if(!_){if((v.flags&524288)!==0)_=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var k=v.alternate;if(k===null)throw Error(r(387));if(k=k.memoizedProps,k!==null){var j=v.type;Nr(v.pendingProps.value,k.value)||(o!==null?o.push(j):o=[j])}}else if(v===me.current){if(k=v.alternate,k===null)throw Error(r(387));k.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(du):o=[du])}v=v.return}o!==null&&Fg(s,o,l,h),s.flags|=262144}function Xd(o){for(o=o.firstContext;o!==null;){if(!Nr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function oi(o){ri=o,ha=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Bn(o){return Jw(ri,o)}function Jd(o,s){return ri===null&&oi(o),Jw(o,s)}function Jw(o,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},ha===null){if(o===null)throw Error(r(308));ha=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else ha=ha.next=s;return l}var N3=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(l,h){o.push(h)}};this.abort=function(){s.aborted=!0,o.forEach(function(l){return l()})}},M3=e.unstable_scheduleCallback,P3=e.unstable_NormalPriority,pn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bg(){return{controller:new N3,data:new Map,refCount:0}}function Ul(o){o.refCount--,o.refCount===0&&M3(P3,function(){o.controller.abort()})}var zl=null,qg=0,hc=0,pc=null;function D3(o,s){if(zl===null){var l=zl=[];qg=0,hc=Zv(),pc={status:"pending",value:void 0,then:function(h){l.push(h)}}}return qg++,s.then(eS,eS),s}function eS(){if(--qg===0&&zl!==null){pc!==null&&(pc.status="fulfilled");var o=zl;zl=null,hc=0,pc=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function L3(o,s){var l=[],h={status:"pending",value:null,reason:null,then:function(v){l.push(v)}};return o.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<l.length;v++)(0,l[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<l.length;v++)(0,l[v])(void 0)}),h}var tS=F.S;F.S=function(o,s){$E=Se(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&D3(o,s),tS!==null&&tS(o,s)};var ai=P(null);function Hg(){var o=ai.current;return o!==null?o:qt.pooledCache}function ef(o,s){s===null?B(ai,ai.current):B(ai,s.pool)}function nS(){var o=Hg();return o===null?null:{parent:pn._currentValue,pool:o}}var mc=Error(r(460)),Gg=Error(r(474)),tf=Error(r(542)),nf={then:function(){}};function rS(o){return o=o.status,o==="fulfilled"||o==="rejected"}function oS(o,s,l){switch(l=o[l],l===void 0?o.push(s):l!==s&&(s.then(la,la),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,sS(o),o;default:if(typeof s.status=="string")s.then(la,la);else{if(o=qt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=s,o.status="pending",o.then(function(h){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=h}},function(h){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,sS(o),o}throw ii=s,mc}}function si(o){try{var s=o._init;return s(o._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ii=l,mc):l}}var ii=null;function aS(){if(ii===null)throw Error(r(459));var o=ii;return ii=null,o}function sS(o){if(o===mc||o===tf)throw Error(r(483))}var gc=null,Vl=0;function rf(o){var s=Vl;return Vl+=1,gc===null&&(gc=[]),oS(gc,o,s)}function Fl(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function of(o,s){throw s.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(s),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o)))}function iS(o){function s(se,ee){if(o){var ue=se.deletions;ue===null?(se.deletions=[ee],se.flags|=16):ue.push(ee)}}function l(se,ee){if(!o)return null;for(;ee!==null;)s(se,ee),ee=ee.sibling;return null}function h(se){for(var ee=new Map;se!==null;)se.key!==null?ee.set(se.key,se):ee.set(se.index,se),se=se.sibling;return ee}function v(se,ee){return se=da(se,ee),se.index=0,se.sibling=null,se}function _(se,ee,ue){return se.index=ue,o?(ue=se.alternate,ue!==null?(ue=ue.index,ue<ee?(se.flags|=67108866,ee):ue):(se.flags|=67108866,ee)):(se.flags|=1048576,ee)}function k(se){return o&&se.alternate===null&&(se.flags|=67108866),se}function j(se,ee,ue,Ee){return ee===null||ee.tag!==6?(ee=Pg(ue,se.mode,Ee),ee.return=se,ee):(ee=v(ee,ue),ee.return=se,ee)}function Y(se,ee,ue,Ee){var Ge=ue.type;return Ge===S?be(se,ee,ue.props.children,Ee,ue.key):ee!==null&&(ee.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===D&&si(Ge)===ee.type)?(ee=v(ee,ue.props),Fl(ee,ue),ee.return=se,ee):(ee=Yd(ue.type,ue.key,ue.props,null,se.mode,Ee),Fl(ee,ue),ee.return=se,ee)}function de(se,ee,ue,Ee){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==ue.containerInfo||ee.stateNode.implementation!==ue.implementation?(ee=Dg(ue,se.mode,Ee),ee.return=se,ee):(ee=v(ee,ue.children||[]),ee.return=se,ee)}function be(se,ee,ue,Ee,Ge){return ee===null||ee.tag!==7?(ee=ti(ue,se.mode,Ee,Ge),ee.return=se,ee):(ee=v(ee,ue),ee.return=se,ee)}function xe(se,ee,ue){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Pg(""+ee,se.mode,ue),ee.return=se,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case y:return ue=Yd(ee.type,ee.key,ee.props,null,se.mode,ue),Fl(ue,ee),ue.return=se,ue;case b:return ee=Dg(ee,se.mode,ue),ee.return=se,ee;case D:return ee=si(ee),xe(se,ee,ue)}if(ie(ee)||G(ee))return ee=ti(ee,se.mode,ue,null),ee.return=se,ee;if(typeof ee.then=="function")return xe(se,rf(ee),ue);if(ee.$$typeof===T)return xe(se,Jd(se,ee),ue);of(se,ee)}return null}function he(se,ee,ue,Ee){var Ge=ee!==null?ee.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Ge!==null?null:j(se,ee,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:return ue.key===Ge?Y(se,ee,ue,Ee):null;case b:return ue.key===Ge?de(se,ee,ue,Ee):null;case D:return ue=si(ue),he(se,ee,ue,Ee)}if(ie(ue)||G(ue))return Ge!==null?null:be(se,ee,ue,Ee,null);if(typeof ue.then=="function")return he(se,ee,rf(ue),Ee);if(ue.$$typeof===T)return he(se,ee,Jd(se,ue),Ee);of(se,ue)}return null}function ge(se,ee,ue,Ee,Ge){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return se=se.get(ue)||null,j(ee,se,""+Ee,Ge);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case y:return se=se.get(Ee.key===null?ue:Ee.key)||null,Y(ee,se,Ee,Ge);case b:return se=se.get(Ee.key===null?ue:Ee.key)||null,de(ee,se,Ee,Ge);case D:return Ee=si(Ee),ge(se,ee,ue,Ee,Ge)}if(ie(Ee)||G(Ee))return se=se.get(ue)||null,be(ee,se,Ee,Ge,null);if(typeof Ee.then=="function")return ge(se,ee,ue,rf(Ee),Ge);if(Ee.$$typeof===T)return ge(se,ee,ue,Jd(ee,Ee),Ge);of(ee,Ee)}return null}function Ue(se,ee,ue,Ee){for(var Ge=null,At=null,Be=ee,ct=ee=0,wt=null;Be!==null&&ct<ue.length;ct++){Be.index>ct?(wt=Be,Be=null):wt=Be.sibling;var It=he(se,Be,ue[ct],Ee);if(It===null){Be===null&&(Be=wt);break}o&&Be&&It.alternate===null&&s(se,Be),ee=_(It,ee,ct),At===null?Ge=It:At.sibling=It,At=It,Be=wt}if(ct===ue.length)return l(se,Be),St&&fa(se,ct),Ge;if(Be===null){for(;ct<ue.length;ct++)Be=xe(se,ue[ct],Ee),Be!==null&&(ee=_(Be,ee,ct),At===null?Ge=Be:At.sibling=Be,At=Be);return St&&fa(se,ct),Ge}for(Be=h(Be);ct<ue.length;ct++)wt=ge(Be,se,ct,ue[ct],Ee),wt!==null&&(o&&wt.alternate!==null&&Be.delete(wt.key===null?ct:wt.key),ee=_(wt,ee,ct),At===null?Ge=wt:At.sibling=wt,At=wt);return o&&Be.forEach(function(fs){return s(se,fs)}),St&&fa(se,ct),Ge}function Ze(se,ee,ue,Ee){if(ue==null)throw Error(r(151));for(var Ge=null,At=null,Be=ee,ct=ee=0,wt=null,It=ue.next();Be!==null&&!It.done;ct++,It=ue.next()){Be.index>ct?(wt=Be,Be=null):wt=Be.sibling;var fs=he(se,Be,It.value,Ee);if(fs===null){Be===null&&(Be=wt);break}o&&Be&&fs.alternate===null&&s(se,Be),ee=_(fs,ee,ct),At===null?Ge=fs:At.sibling=fs,At=fs,Be=wt}if(It.done)return l(se,Be),St&&fa(se,ct),Ge;if(Be===null){for(;!It.done;ct++,It=ue.next())It=xe(se,It.value,Ee),It!==null&&(ee=_(It,ee,ct),At===null?Ge=It:At.sibling=It,At=It);return St&&fa(se,ct),Ge}for(Be=h(Be);!It.done;ct++,It=ue.next())It=ge(Be,se,ct,It.value,Ee),It!==null&&(o&&It.alternate!==null&&Be.delete(It.key===null?ct:It.key),ee=_(It,ee,ct),At===null?Ge=It:At.sibling=It,At=It);return o&&Be.forEach(function(Z5){return s(se,Z5)}),St&&fa(se,ct),Ge}function Bt(se,ee,ue,Ee){if(typeof ue=="object"&&ue!==null&&ue.type===S&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:e:{for(var Ge=ue.key;ee!==null;){if(ee.key===Ge){if(Ge=ue.type,Ge===S){if(ee.tag===7){l(se,ee.sibling),Ee=v(ee,ue.props.children),Ee.return=se,se=Ee;break e}}else if(ee.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===D&&si(Ge)===ee.type){l(se,ee.sibling),Ee=v(ee,ue.props),Fl(Ee,ue),Ee.return=se,se=Ee;break e}l(se,ee);break}else s(se,ee);ee=ee.sibling}ue.type===S?(Ee=ti(ue.props.children,se.mode,Ee,ue.key),Ee.return=se,se=Ee):(Ee=Yd(ue.type,ue.key,ue.props,null,se.mode,Ee),Fl(Ee,ue),Ee.return=se,se=Ee)}return k(se);case b:e:{for(Ge=ue.key;ee!==null;){if(ee.key===Ge)if(ee.tag===4&&ee.stateNode.containerInfo===ue.containerInfo&&ee.stateNode.implementation===ue.implementation){l(se,ee.sibling),Ee=v(ee,ue.children||[]),Ee.return=se,se=Ee;break e}else{l(se,ee);break}else s(se,ee);ee=ee.sibling}Ee=Dg(ue,se.mode,Ee),Ee.return=se,se=Ee}return k(se);case D:return ue=si(ue),Bt(se,ee,ue,Ee)}if(ie(ue))return Ue(se,ee,ue,Ee);if(G(ue)){if(Ge=G(ue),typeof Ge!="function")throw Error(r(150));return ue=Ge.call(ue),Ze(se,ee,ue,Ee)}if(typeof ue.then=="function")return Bt(se,ee,rf(ue),Ee);if(ue.$$typeof===T)return Bt(se,ee,Jd(se,ue),Ee);of(se,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,ee!==null&&ee.tag===6?(l(se,ee.sibling),Ee=v(ee,ue),Ee.return=se,se=Ee):(l(se,ee),Ee=Pg(ue,se.mode,Ee),Ee.return=se,se=Ee),k(se)):l(se,ee)}return function(se,ee,ue,Ee){try{Vl=0;var Ge=Bt(se,ee,ue,Ee);return gc=null,Ge}catch(Be){if(Be===mc||Be===tf)throw Be;var At=Mr(29,Be,null,se.mode);return At.lanes=Ee,At.return=se,At}}}var ci=iS(!0),cS=iS(!1),Wa=!1;function Zg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kg(o,s){o=o.updateQueue,s.updateQueue===o&&(s.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Ya(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Qa(o,s,l){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,(Nt&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=Wd(o),Hw(o,null,l),s}return Kd(o,h,s,l),Wd(o)}function Bl(o,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var h=s.lanes;h&=o.pendingLanes,l|=h,s.lanes=l,mr(o,l)}}function Wg(o,s){var l=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var v=null,_=null;if(l=l.firstBaseUpdate,l!==null){do{var k={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};_===null?v=_=k:_=_.next=k,l=l.next}while(l!==null);_===null?v=_=s:_=_.next=s}else v=_=s;l={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},o.updateQueue=l;return}o=l.lastBaseUpdate,o===null?l.firstBaseUpdate=s:o.next=s,l.lastBaseUpdate=s}var Yg=!1;function ql(){if(Yg){var o=pc;if(o!==null)throw o}}function Hl(o,s,l,h){Yg=!1;var v=o.updateQueue;Wa=!1;var _=v.firstBaseUpdate,k=v.lastBaseUpdate,j=v.shared.pending;if(j!==null){v.shared.pending=null;var Y=j,de=Y.next;Y.next=null,k===null?_=de:k.next=de,k=Y;var be=o.alternate;be!==null&&(be=be.updateQueue,j=be.lastBaseUpdate,j!==k&&(j===null?be.firstBaseUpdate=de:j.next=de,be.lastBaseUpdate=Y))}if(_!==null){var xe=v.baseState;k=0,be=de=Y=null,j=_;do{var he=j.lane&-536870913,ge=he!==j.lane;if(ge?(bt&he)===he:(h&he)===he){he!==0&&he===hc&&(Yg=!0),be!==null&&(be=be.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Ue=o,Ze=j;he=s;var Bt=l;switch(Ze.tag){case 1:if(Ue=Ze.payload,typeof Ue=="function"){xe=Ue.call(Bt,xe,he);break e}xe=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=Ze.payload,he=typeof Ue=="function"?Ue.call(Bt,xe,he):Ue,he==null)break e;xe=p({},xe,he);break e;case 2:Wa=!0}}he=j.callback,he!==null&&(o.flags|=64,ge&&(o.flags|=8192),ge=v.callbacks,ge===null?v.callbacks=[he]:ge.push(he))}else ge={lane:he,tag:j.tag,payload:j.payload,callback:j.callback,next:null},be===null?(de=be=ge,Y=xe):be=be.next=ge,k|=he;if(j=j.next,j===null){if(j=v.shared.pending,j===null)break;ge=j,j=ge.next,ge.next=null,v.lastBaseUpdate=ge,v.shared.pending=null}}while(!0);be===null&&(Y=xe),v.baseState=Y,v.firstBaseUpdate=de,v.lastBaseUpdate=be,_===null&&(v.shared.lanes=0),ns|=k,o.lanes=k,o.memoizedState=xe}}function lS(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function uS(o,s){var l=o.callbacks;if(l!==null)for(o.callbacks=null,o=0;o<l.length;o++)lS(l[o],s)}var vc=P(null),af=P(0);function dS(o,s){o=Ea,B(af,o),B(vc,s),Ea=o|s.baseLanes}function Qg(){B(af,Ea),B(vc,vc.current)}function Xg(){Ea=af.current,q(vc),q(af)}var Pr=P(null),so=null;function Xa(o){var s=o.alternate;B(cn,cn.current&1),B(Pr,o),so===null&&(s===null||vc.current!==null||s.memoizedState!==null)&&(so=o)}function Jg(o){B(cn,cn.current),B(Pr,o),so===null&&(so=o)}function fS(o){o.tag===22?(B(cn,cn.current),B(Pr,o),so===null&&(so=o)):Ja()}function Ja(){B(cn,cn.current),B(Pr,Pr.current)}function Dr(o){q(Pr),so===o&&(so=null),q(cn)}var cn=P(0);function sf(o){for(var s=o;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ay(l)||sy(l)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ma=0,st=null,Vt=null,mn=null,cf=!1,yc=!1,li=!1,lf=0,Gl=0,_c=null,j3=0;function on(){throw Error(r(321))}function ev(o,s){if(s===null)return!1;for(var l=0;l<s.length&&l<o.length;l++)if(!Nr(o[l],s[l]))return!1;return!0}function tv(o,s,l,h,v,_){return ma=_,st=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,F.H=o===null||o.memoizedState===null?WS:gv,li=!1,_=l(h,v),li=!1,yc&&(_=pS(s,l,h,v)),hS(o),_}function hS(o){F.H=Wl;var s=Vt!==null&&Vt.next!==null;if(ma=0,mn=Vt=st=null,cf=!1,Gl=0,_c=null,s)throw Error(r(300));o===null||gn||(o=o.dependencies,o!==null&&Xd(o)&&(gn=!0))}function pS(o,s,l,h){st=o;var v=0;do{if(yc&&(_c=null),Gl=0,yc=!1,25<=v)throw Error(r(301));if(v+=1,mn=Vt=null,o.updateQueue!=null){var _=o.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}F.H=YS,_=s(l,h)}while(yc);return _}function $3(){var o=F.H,s=o.useState()[0];return s=typeof s.then=="function"?Zl(s):s,o=o.useState()[0],(Vt!==null?Vt.memoizedState:null)!==o&&(st.flags|=1024),s}function nv(){var o=lf!==0;return lf=0,o}function rv(o,s,l){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~l}function ov(o){if(cf){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}cf=!1}ma=0,mn=Vt=st=null,yc=!1,Gl=lf=0,_c=null}function ir(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mn===null?st.memoizedState=mn=o:mn=mn.next=o,mn}function ln(){if(Vt===null){var o=st.alternate;o=o!==null?o.memoizedState:null}else o=Vt.next;var s=mn===null?st.memoizedState:mn.next;if(s!==null)mn=s,Vt=o;else{if(o===null)throw st.alternate===null?Error(r(467)):Error(r(310));Vt=o,o={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},mn===null?st.memoizedState=mn=o:mn=mn.next=o}return mn}function uf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zl(o){var s=Gl;return Gl+=1,_c===null&&(_c=[]),o=oS(_c,o,s),s=st,(mn===null?s.memoizedState:mn.next)===null&&(s=s.alternate,F.H=s===null||s.memoizedState===null?WS:gv),o}function df(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Zl(o);if(o.$$typeof===T)return Bn(o)}throw Error(r(438,String(o)))}function av(o){var s=null,l=st.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var h=st.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=uf(),st.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(o),h=0;h<o;h++)l[h]=W;return s.index++,l}function ga(o,s){return typeof s=="function"?s(o):s}function ff(o){var s=ln();return sv(s,Vt,o)}function sv(o,s,l){var h=o.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=l;var v=o.baseQueue,_=h.pending;if(_!==null){if(v!==null){var k=v.next;v.next=_.next,_.next=k}s.baseQueue=v=_,h.pending=null}if(_=o.baseState,v===null)o.memoizedState=_;else{s=v.next;var j=k=null,Y=null,de=s,be=!1;do{var xe=de.lane&-536870913;if(xe!==de.lane?(bt&xe)===xe:(ma&xe)===xe){var he=de.revertLane;if(he===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),xe===hc&&(be=!0);else if((ma&he)===he){de=de.next,he===hc&&(be=!0);continue}else xe={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Y===null?(j=Y=xe,k=_):Y=Y.next=xe,st.lanes|=he,ns|=he;xe=de.action,li&&l(_,xe),_=de.hasEagerState?de.eagerState:l(_,xe)}else he={lane:xe,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Y===null?(j=Y=he,k=_):Y=Y.next=he,st.lanes|=xe,ns|=xe;de=de.next}while(de!==null&&de!==s);if(Y===null?k=_:Y.next=j,!Nr(_,o.memoizedState)&&(gn=!0,be&&(l=pc,l!==null)))throw l;o.memoizedState=_,o.baseState=k,o.baseQueue=Y,h.lastRenderedState=_}return v===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function iv(o){var s=ln(),l=s.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=o;var h=l.dispatch,v=l.pending,_=s.memoizedState;if(v!==null){l.pending=null;var k=v=v.next;do _=o(_,k.action),k=k.next;while(k!==v);Nr(_,s.memoizedState)||(gn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),l.lastRenderedState=_}return[_,h]}function mS(o,s,l){var h=st,v=ln(),_=St;if(_){if(l===void 0)throw Error(r(407));l=l()}else l=s();var k=!Nr((Vt||v).memoizedState,l);if(k&&(v.memoizedState=l,gn=!0),v=v.queue,uv(yS.bind(null,h,v,o),[o]),v.getSnapshot!==s||k||mn!==null&&mn.memoizedState.tag&1){if(h.flags|=2048,bc(9,{destroy:void 0},vS.bind(null,h,v,l,s),null),qt===null)throw Error(r(349));_||(ma&127)!==0||gS(h,s,l)}return l}function gS(o,s,l){o.flags|=16384,o={getSnapshot:s,value:l},s=st.updateQueue,s===null?(s=uf(),st.updateQueue=s,s.stores=[o]):(l=s.stores,l===null?s.stores=[o]:l.push(o))}function vS(o,s,l,h){s.value=l,s.getSnapshot=h,_S(s)&&bS(o)}function yS(o,s,l){return l(function(){_S(s)&&bS(o)})}function _S(o){var s=o.getSnapshot;o=o.value;try{var l=s();return!Nr(o,l)}catch{return!0}}function bS(o){var s=ei(o,2);s!==null&&Er(s,o,2)}function cv(o){var s=ir();if(typeof o=="function"){var l=o;if(o=l(),li){zn(!0);try{l()}finally{zn(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:o},s}function wS(o,s,l,h){return o.baseState=l,sv(o,Vt,typeof h=="function"?h:ga)}function U3(o,s,l,h,v){if(mf(o))throw Error(r(485));if(o=s.action,o!==null){var _={payload:v,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){_.listeners.push(k)}};F.T!==null?l(!0):_.isTransition=!1,h(_),l=s.pending,l===null?(_.next=s.pending=_,SS(s,_)):(_.next=l.next,s.pending=l.next=_)}}function SS(o,s){var l=s.action,h=s.payload,v=o.state;if(s.isTransition){var _=F.T,k={};F.T=k;try{var j=l(v,h),Y=F.S;Y!==null&&Y(k,j),ES(o,s,j)}catch(de){lv(o,s,de)}finally{_!==null&&k.types!==null&&(_.types=k.types),F.T=_}}else try{_=l(v,h),ES(o,s,_)}catch(de){lv(o,s,de)}}function ES(o,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(h){RS(o,s,h)},function(h){return lv(o,s,h)}):RS(o,s,l)}function RS(o,s,l){s.status="fulfilled",s.value=l,xS(s),o.state=l,s=o.pending,s!==null&&(l=s.next,l===s?o.pending=null:(l=l.next,s.next=l,SS(o,l)))}function lv(o,s,l){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=l,xS(s),s=s.next;while(s!==h)}o.action=null}function xS(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function TS(o,s){return s}function OS(o,s){if(St){var l=qt.formState;if(l!==null){e:{var h=st;if(St){if(Zt){t:{for(var v=Zt,_=ao;v.nodeType!==8;){if(!_){v=null;break t}if(v=io(v.nextSibling),v===null){v=null;break t}}_=v.data,v=_==="F!"||_==="F"?v:null}if(v){Zt=io(v.nextSibling),h=v.data==="F!";break e}}Za(h)}h=!1}h&&(s=l[0])}}return l=ir(),l.memoizedState=l.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:TS,lastRenderedState:s},l.queue=h,l=GS.bind(null,st,h),h.dispatch=l,h=cv(!1),_=mv.bind(null,st,!1,h.queue),h=ir(),v={state:s,dispatch:null,action:o,pending:null},h.queue=v,l=U3.bind(null,st,v,_,l),v.dispatch=l,h.memoizedState=o,[s,l,!1]}function CS(o){var s=ln();return AS(s,Vt,o)}function AS(o,s,l){if(s=sv(o,s,TS)[0],o=ff(ga)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Zl(s)}catch(k){throw k===mc?tf:k}else h=s;s=ln();var v=s.queue,_=v.dispatch;return l!==s.memoizedState&&(st.flags|=2048,bc(9,{destroy:void 0},z3.bind(null,v,l),null)),[h,_,o]}function z3(o,s){o.action=s}function IS(o){var s=ln(),l=Vt;if(l!==null)return AS(s,l,o);ln(),s=s.memoizedState,l=ln();var h=l.queue.dispatch;return l.memoizedState=o,[s,h,!1]}function bc(o,s,l,h){return o={tag:o,create:l,deps:h,inst:s,next:null},s=st.updateQueue,s===null&&(s=uf(),st.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=o.next=o:(h=l.next,l.next=o,o.next=h,s.lastEffect=o),o}function kS(){return ln().memoizedState}function hf(o,s,l,h){var v=ir();st.flags|=o,v.memoizedState=bc(1|s,{destroy:void 0},l,h===void 0?null:h)}function pf(o,s,l,h){var v=ln();h=h===void 0?null:h;var _=v.memoizedState.inst;Vt!==null&&h!==null&&ev(h,Vt.memoizedState.deps)?v.memoizedState=bc(s,_,l,h):(st.flags|=o,v.memoizedState=bc(1|s,_,l,h))}function NS(o,s){hf(8390656,8,o,s)}function uv(o,s){pf(2048,8,o,s)}function V3(o){st.flags|=4;var s=st.updateQueue;if(s===null)s=uf(),st.updateQueue=s,s.events=[o];else{var l=s.events;l===null?s.events=[o]:l.push(o)}}function MS(o){var s=ln().memoizedState;return V3({ref:s,nextImpl:o}),function(){if((Nt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function PS(o,s){return pf(4,2,o,s)}function DS(o,s){return pf(4,4,o,s)}function LS(o,s){if(typeof s=="function"){o=o();var l=s(o);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function jS(o,s,l){l=l!=null?l.concat([o]):null,pf(4,4,LS.bind(null,s,o),l)}function dv(){}function $S(o,s){var l=ln();s=s===void 0?null:s;var h=l.memoizedState;return s!==null&&ev(s,h[1])?h[0]:(l.memoizedState=[o,s],o)}function US(o,s){var l=ln();s=s===void 0?null:s;var h=l.memoizedState;if(s!==null&&ev(s,h[1]))return h[0];if(h=o(),li){zn(!0);try{o()}finally{zn(!1)}}return l.memoizedState=[h,s],h}function fv(o,s,l){return l===void 0||(ma&1073741824)!==0&&(bt&261930)===0?o.memoizedState=s:(o.memoizedState=l,o=zE(),st.lanes|=o,ns|=o,l)}function zS(o,s,l,h){return Nr(l,s)?l:vc.current!==null?(o=fv(o,l,h),Nr(o,s)||(gn=!0),o):(ma&42)===0||(ma&1073741824)!==0&&(bt&261930)===0?(gn=!0,o.memoizedState=l):(o=zE(),st.lanes|=o,ns|=o,s)}function VS(o,s,l,h,v){var _=X.p;X.p=_!==0&&8>_?_:8;var k=F.T,j={};F.T=j,mv(o,!1,s,l);try{var Y=v(),de=F.S;if(de!==null&&de(j,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var be=L3(Y,h);Kl(o,s,be,$r(o))}else Kl(o,s,h,$r(o))}catch(xe){Kl(o,s,{then:function(){},status:"rejected",reason:xe},$r())}finally{X.p=_,k!==null&&j.types!==null&&(k.types=j.types),F.T=k}}function F3(){}function hv(o,s,l,h){if(o.tag!==5)throw Error(r(476));var v=FS(o).queue;VS(o,v,s,ae,l===null?F3:function(){return BS(o),l(h)})}function FS(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:ae},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:l},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function BS(o){var s=FS(o);s.next===null&&(s=o.alternate.memoizedState),Kl(o,s.next.queue,{},$r())}function pv(){return Bn(du)}function qS(){return ln().memoizedState}function HS(){return ln().memoizedState}function B3(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var l=$r();o=Ya(l);var h=Qa(s,o,l);h!==null&&(Er(h,s,l),Bl(h,s,l)),s={cache:Bg()},o.payload=s;return}s=s.return}}function q3(o,s,l){var h=$r();l={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},mf(o)?ZS(s,l):(l=Ng(o,s,l,h),l!==null&&(Er(l,o,h),KS(l,s,h)))}function GS(o,s,l){var h=$r();Kl(o,s,l,h)}function Kl(o,s,l,h){var v={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(mf(o))ZS(s,v);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var k=s.lastRenderedState,j=_(k,l);if(v.hasEagerState=!0,v.eagerState=j,Nr(j,k))return Kd(o,s,v,0),qt===null&&Zd(),!1}catch{}if(l=Ng(o,s,v,h),l!==null)return Er(l,o,h),KS(l,s,h),!0}return!1}function mv(o,s,l,h){if(h={lane:2,revertLane:Zv(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},mf(o)){if(s)throw Error(r(479))}else s=Ng(o,l,h,2),s!==null&&Er(s,o,2)}function mf(o){var s=o.alternate;return o===st||s!==null&&s===st}function ZS(o,s){yc=cf=!0;var l=o.pending;l===null?s.next=s:(s.next=l.next,l.next=s),o.pending=s}function KS(o,s,l){if((l&4194048)!==0){var h=s.lanes;h&=o.pendingLanes,l|=h,s.lanes=l,mr(o,l)}}var Wl={readContext:Bn,use:df,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useLayoutEffect:on,useInsertionEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useSyncExternalStore:on,useId:on,useHostTransitionStatus:on,useFormState:on,useActionState:on,useOptimistic:on,useMemoCache:on,useCacheRefresh:on};Wl.useEffectEvent=on;var WS={readContext:Bn,use:df,useCallback:function(o,s){return ir().memoizedState=[o,s===void 0?null:s],o},useContext:Bn,useEffect:NS,useImperativeHandle:function(o,s,l){l=l!=null?l.concat([o]):null,hf(4194308,4,LS.bind(null,s,o),l)},useLayoutEffect:function(o,s){return hf(4194308,4,o,s)},useInsertionEffect:function(o,s){hf(4,2,o,s)},useMemo:function(o,s){var l=ir();s=s===void 0?null:s;var h=o();if(li){zn(!0);try{o()}finally{zn(!1)}}return l.memoizedState=[h,s],h},useReducer:function(o,s,l){var h=ir();if(l!==void 0){var v=l(s);if(li){zn(!0);try{l(s)}finally{zn(!1)}}}else v=s;return h.memoizedState=h.baseState=v,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:v},h.queue=o,o=o.dispatch=q3.bind(null,st,o),[h.memoizedState,o]},useRef:function(o){var s=ir();return o={current:o},s.memoizedState=o},useState:function(o){o=cv(o);var s=o.queue,l=GS.bind(null,st,s);return s.dispatch=l,[o.memoizedState,l]},useDebugValue:dv,useDeferredValue:function(o,s){var l=ir();return fv(l,o,s)},useTransition:function(){var o=cv(!1);return o=VS.bind(null,st,o.queue,!0,!1),ir().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,l){var h=st,v=ir();if(St){if(l===void 0)throw Error(r(407));l=l()}else{if(l=s(),qt===null)throw Error(r(349));(bt&127)!==0||gS(h,s,l)}v.memoizedState=l;var _={value:l,getSnapshot:s};return v.queue=_,NS(yS.bind(null,h,_,o),[o]),h.flags|=2048,bc(9,{destroy:void 0},vS.bind(null,h,_,l,s),null),l},useId:function(){var o=ir(),s=qt.identifierPrefix;if(St){var l=qo,h=Bo;l=(h&~(1<<32-kn(h)-1)).toString(32)+l,s="_"+s+"R_"+l,l=lf++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=j3++,s="_"+s+"r_"+l.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:pv,useFormState:OS,useActionState:OS,useOptimistic:function(o){var s=ir();s.memoizedState=s.baseState=o;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=mv.bind(null,st,!0,l),l.dispatch=s,[o,s]},useMemoCache:av,useCacheRefresh:function(){return ir().memoizedState=B3.bind(null,st)},useEffectEvent:function(o){var s=ir(),l={impl:o};return s.memoizedState=l,function(){if((Nt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},gv={readContext:Bn,use:df,useCallback:$S,useContext:Bn,useEffect:uv,useImperativeHandle:jS,useInsertionEffect:PS,useLayoutEffect:DS,useMemo:US,useReducer:ff,useRef:kS,useState:function(){return ff(ga)},useDebugValue:dv,useDeferredValue:function(o,s){var l=ln();return zS(l,Vt.memoizedState,o,s)},useTransition:function(){var o=ff(ga)[0],s=ln().memoizedState;return[typeof o=="boolean"?o:Zl(o),s]},useSyncExternalStore:mS,useId:qS,useHostTransitionStatus:pv,useFormState:CS,useActionState:CS,useOptimistic:function(o,s){var l=ln();return wS(l,Vt,o,s)},useMemoCache:av,useCacheRefresh:HS};gv.useEffectEvent=MS;var YS={readContext:Bn,use:df,useCallback:$S,useContext:Bn,useEffect:uv,useImperativeHandle:jS,useInsertionEffect:PS,useLayoutEffect:DS,useMemo:US,useReducer:iv,useRef:kS,useState:function(){return iv(ga)},useDebugValue:dv,useDeferredValue:function(o,s){var l=ln();return Vt===null?fv(l,o,s):zS(l,Vt.memoizedState,o,s)},useTransition:function(){var o=iv(ga)[0],s=ln().memoizedState;return[typeof o=="boolean"?o:Zl(o),s]},useSyncExternalStore:mS,useId:qS,useHostTransitionStatus:pv,useFormState:IS,useActionState:IS,useOptimistic:function(o,s){var l=ln();return Vt!==null?wS(l,Vt,o,s):(l.baseState=o,[o,l.queue.dispatch])},useMemoCache:av,useCacheRefresh:HS};YS.useEffectEvent=MS;function vv(o,s,l,h){s=o.memoizedState,l=l(h,s),l=l==null?s:p({},s,l),o.memoizedState=l,o.lanes===0&&(o.updateQueue.baseState=l)}var yv={enqueueSetState:function(o,s,l){o=o._reactInternals;var h=$r(),v=Ya(h);v.payload=s,l!=null&&(v.callback=l),s=Qa(o,v,h),s!==null&&(Er(s,o,h),Bl(s,o,h))},enqueueReplaceState:function(o,s,l){o=o._reactInternals;var h=$r(),v=Ya(h);v.tag=1,v.payload=s,l!=null&&(v.callback=l),s=Qa(o,v,h),s!==null&&(Er(s,o,h),Bl(s,o,h))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var l=$r(),h=Ya(l);h.tag=2,s!=null&&(h.callback=s),s=Qa(o,h,l),s!==null&&(Er(s,o,l),Bl(s,o,l))}};function QS(o,s,l,h,v,_,k){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,_,k):s.prototype&&s.prototype.isPureReactComponent?!Dl(l,h)||!Dl(v,_):!0}function XS(o,s,l,h){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==o&&yv.enqueueReplaceState(s,s.state,null)}function ui(o,s){var l=s;if("ref"in s){l={};for(var h in s)h!=="ref"&&(l[h]=s[h])}if(o=o.defaultProps){l===s&&(l=p({},l));for(var v in o)l[v]===void 0&&(l[v]=o[v])}return l}function JS(o){Gd(o)}function eE(o){console.error(o)}function tE(o){Gd(o)}function gf(o,s){try{var l=o.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function nE(o,s,l){try{var h=o.onCaughtError;h(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function _v(o,s,l){return l=Ya(l),l.tag=3,l.payload={element:null},l.callback=function(){gf(o,s)},l}function rE(o){return o=Ya(o),o.tag=3,o}function oE(o,s,l,h){var v=l.type.getDerivedStateFromError;if(typeof v=="function"){var _=h.value;o.payload=function(){return v(_)},o.callback=function(){nE(s,l,h)}}var k=l.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(o.callback=function(){nE(s,l,h),typeof v!="function"&&(rs===null?rs=new Set([this]):rs.add(this));var j=h.stack;this.componentDidCatch(h.value,{componentStack:j!==null?j:""})})}function H3(o,s,l,h,v){if(l.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=l.alternate,s!==null&&fc(s,l,v,!0),l=Pr.current,l!==null){switch(l.tag){case 31:case 13:return so===null?Cf():l.alternate===null&&an===0&&(an=3),l.flags&=-257,l.flags|=65536,l.lanes=v,h===nf?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([h]):s.add(h),qv(o,h,v)),!1;case 22:return l.flags|=65536,h===nf?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([h]):l.add(h)),qv(o,h,v)),!1}throw Error(r(435,l.tag))}return qv(o,h,v),Cf(),!1}if(St)return s=Pr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==$g&&(o=Error(r(422),{cause:h}),$l(no(o,l)))):(h!==$g&&(s=Error(r(423),{cause:h}),$l(no(s,l))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,h=no(h,l),v=_v(o.stateNode,h,v),Wg(o,v),an!==4&&(an=2)),!1;var _=Error(r(520),{cause:h});if(_=no(_,l),ru===null?ru=[_]:ru.push(_),an!==4&&(an=2),s===null)return!0;h=no(h,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,o=v&-v,l.lanes|=o,o=_v(l.stateNode,h,o),Wg(l,o),!1;case 1:if(s=l.type,_=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(rs===null||!rs.has(_))))return l.flags|=65536,v&=-v,l.lanes|=v,v=rE(v),oE(v,o,l,h),Wg(l,v),!1}l=l.return}while(l!==null);return!1}var bv=Error(r(461)),gn=!1;function qn(o,s,l,h){s.child=o===null?cS(s,null,l,h):ci(s,o.child,l,h)}function aE(o,s,l,h,v){l=l.render;var _=s.ref;if("ref"in h){var k={};for(var j in h)j!=="ref"&&(k[j]=h[j])}else k=h;return oi(s),h=tv(o,s,l,k,_,v),j=nv(),o!==null&&!gn?(rv(o,s,v),va(o,s,v)):(St&&j&&Lg(s),s.flags|=1,qn(o,s,h,v),s.child)}function sE(o,s,l,h,v){if(o===null){var _=l.type;return typeof _=="function"&&!Mg(_)&&_.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=_,iE(o,s,_,h,v)):(o=Yd(l.type,null,h,s,s.mode,v),o.ref=s.ref,o.return=s,s.child=o)}if(_=o.child,!Cv(o,v)){var k=_.memoizedProps;if(l=l.compare,l=l!==null?l:Dl,l(k,h)&&o.ref===s.ref)return va(o,s,v)}return s.flags|=1,o=da(_,h),o.ref=s.ref,o.return=s,s.child=o}function iE(o,s,l,h,v){if(o!==null){var _=o.memoizedProps;if(Dl(_,h)&&o.ref===s.ref)if(gn=!1,s.pendingProps=h=_,Cv(o,v))(o.flags&131072)!==0&&(gn=!0);else return s.lanes=o.lanes,va(o,s,v)}return wv(o,s,l,h,v)}function cE(o,s,l,h){var v=h.children,_=o!==null?o.memoizedState:null;if(o===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|l:l,o!==null){for(h=s.child=o.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~_}else h=0,s.child=null;return lE(o,s,_,l,h)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&ef(s,_!==null?_.cachePool:null),_!==null?dS(s,_):Qg(),fS(s);else return h=s.lanes=536870912,lE(o,s,_!==null?_.baseLanes|l:l,l,h)}else _!==null?(ef(s,_.cachePool),dS(s,_),Ja(),s.memoizedState=null):(o!==null&&ef(s,null),Qg(),Ja());return qn(o,s,v,l),s.child}function Yl(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function lE(o,s,l,h,v){var _=Hg();return _=_===null?null:{parent:pn._currentValue,pool:_},s.memoizedState={baseLanes:l,cachePool:_},o!==null&&ef(s,null),Qg(),fS(s),o!==null&&fc(o,s,h,!0),s.childLanes=v,null}function vf(o,s){return s=_f({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function uE(o,s,l){return ci(s,o.child,null,l),o=vf(s,s.pendingProps),o.flags|=2,Dr(s),s.memoizedState=null,o}function G3(o,s,l){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(St){if(h.mode==="hidden")return o=vf(s,h),s.lanes=536870912,Yl(null,o);if(Jg(s),(o=Zt)?(o=SR(o,ao),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:Ha!==null?{id:Bo,overflow:qo}:null,retryLane:536870912,hydrationErrors:null},l=Zw(o),l.return=s,s.child=l,Fn=s,Zt=null)):o=null,o===null)throw Za(s);return s.lanes=536870912,null}return vf(s,h)}var _=o.memoizedState;if(_!==null){var k=_.dehydrated;if(Jg(s),v)if(s.flags&256)s.flags&=-257,s=uE(o,s,l);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(gn||fc(o,s,l,!1),v=(l&o.childLanes)!==0,gn||v){if(h=qt,h!==null&&(k=gr(h,l),k!==0&&k!==_.retryLane))throw _.retryLane=k,ei(o,k),Er(h,o,k),bv;Cf(),s=uE(o,s,l)}else o=_.treeContext,Zt=io(k.nextSibling),Fn=s,St=!0,Ga=null,ao=!1,o!==null&&Yw(s,o),s=vf(s,h),s.flags|=4096;return s}return o=da(o.child,{mode:h.mode,children:h.children}),o.ref=s.ref,s.child=o,o.return=s,o}function yf(o,s){var l=s.ref;if(l===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(o===null||o.ref!==l)&&(s.flags|=4194816)}}function wv(o,s,l,h,v){return oi(s),l=tv(o,s,l,h,void 0,v),h=nv(),o!==null&&!gn?(rv(o,s,v),va(o,s,v)):(St&&h&&Lg(s),s.flags|=1,qn(o,s,l,v),s.child)}function dE(o,s,l,h,v,_){return oi(s),s.updateQueue=null,l=pS(s,h,l,v),hS(o),h=nv(),o!==null&&!gn?(rv(o,s,_),va(o,s,_)):(St&&h&&Lg(s),s.flags|=1,qn(o,s,l,_),s.child)}function fE(o,s,l,h,v){if(oi(s),s.stateNode===null){var _=cc,k=l.contextType;typeof k=="object"&&k!==null&&(_=Bn(k)),_=new l(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=yv,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},Zg(s),k=l.contextType,_.context=typeof k=="object"&&k!==null?Bn(k):cc,_.state=s.memoizedState,k=l.getDerivedStateFromProps,typeof k=="function"&&(vv(s,l,k,h),_.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(k=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),k!==_.state&&yv.enqueueReplaceState(_,_.state,null),Hl(s,h,_,v),ql(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(o===null){_=s.stateNode;var j=s.memoizedProps,Y=ui(l,j);_.props=Y;var de=_.context,be=l.contextType;k=cc,typeof be=="object"&&be!==null&&(k=Bn(be));var xe=l.getDerivedStateFromProps;be=typeof xe=="function"||typeof _.getSnapshotBeforeUpdate=="function",j=s.pendingProps!==j,be||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j||de!==k)&&XS(s,_,h,k),Wa=!1;var he=s.memoizedState;_.state=he,Hl(s,h,_,v),ql(),de=s.memoizedState,j||he!==de||Wa?(typeof xe=="function"&&(vv(s,l,xe,h),de=s.memoizedState),(Y=Wa||QS(s,l,Y,h,he,de,k))?(be||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=de),_.props=h,_.state=de,_.context=k,h=Y):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,Kg(o,s),k=s.memoizedProps,be=ui(l,k),_.props=be,xe=s.pendingProps,he=_.context,de=l.contextType,Y=cc,typeof de=="object"&&de!==null&&(Y=Bn(de)),j=l.getDerivedStateFromProps,(de=typeof j=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k!==xe||he!==Y)&&XS(s,_,h,Y),Wa=!1,he=s.memoizedState,_.state=he,Hl(s,h,_,v),ql();var ge=s.memoizedState;k!==xe||he!==ge||Wa||o!==null&&o.dependencies!==null&&Xd(o.dependencies)?(typeof j=="function"&&(vv(s,l,j,h),ge=s.memoizedState),(be=Wa||QS(s,l,be,h,he,ge,Y)||o!==null&&o.dependencies!==null&&Xd(o.dependencies))?(de||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ge,Y),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ge,Y)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&he===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&he===o.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ge),_.props=h,_.state=ge,_.context=Y,h=be):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&he===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&he===o.memoizedState||(s.flags|=1024),h=!1)}return _=h,yf(o,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,l=h&&typeof l.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,o!==null&&h?(s.child=ci(s,o.child,null,v),s.child=ci(s,null,l,v)):qn(o,s,l,v),s.memoizedState=_.state,o=s.child):o=va(o,s,v),o}function hE(o,s,l,h){return ni(),s.flags|=256,qn(o,s,l,h),s.child}var Sv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ev(o){return{baseLanes:o,cachePool:nS()}}function Rv(o,s,l){return o=o!==null?o.childLanes&~l:0,s&&(o|=jr),o}function pE(o,s,l){var h=s.pendingProps,v=!1,_=(s.flags&128)!==0,k;if((k=_)||(k=o!==null&&o.memoizedState===null?!1:(cn.current&2)!==0),k&&(v=!0,s.flags&=-129),k=(s.flags&32)!==0,s.flags&=-33,o===null){if(St){if(v?Xa(s):Ja(),(o=Zt)?(o=SR(o,ao),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:Ha!==null?{id:Bo,overflow:qo}:null,retryLane:536870912,hydrationErrors:null},l=Zw(o),l.return=s,s.child=l,Fn=s,Zt=null)):o=null,o===null)throw Za(s);return sy(o)?s.lanes=32:s.lanes=536870912,null}var j=h.children;return h=h.fallback,v?(Ja(),v=s.mode,j=_f({mode:"hidden",children:j},v),h=ti(h,v,l,null),j.return=s,h.return=s,j.sibling=h,s.child=j,h=s.child,h.memoizedState=Ev(l),h.childLanes=Rv(o,k,l),s.memoizedState=Sv,Yl(null,h)):(Xa(s),xv(s,j))}var Y=o.memoizedState;if(Y!==null&&(j=Y.dehydrated,j!==null)){if(_)s.flags&256?(Xa(s),s.flags&=-257,s=Tv(o,s,l)):s.memoizedState!==null?(Ja(),s.child=o.child,s.flags|=128,s=null):(Ja(),j=h.fallback,v=s.mode,h=_f({mode:"visible",children:h.children},v),j=ti(j,v,l,null),j.flags|=2,h.return=s,j.return=s,h.sibling=j,s.child=h,ci(s,o.child,null,l),h=s.child,h.memoizedState=Ev(l),h.childLanes=Rv(o,k,l),s.memoizedState=Sv,s=Yl(null,h));else if(Xa(s),sy(j)){if(k=j.nextSibling&&j.nextSibling.dataset,k)var de=k.dgst;k=de,h=Error(r(419)),h.stack="",h.digest=k,$l({value:h,source:null,stack:null}),s=Tv(o,s,l)}else if(gn||fc(o,s,l,!1),k=(l&o.childLanes)!==0,gn||k){if(k=qt,k!==null&&(h=gr(k,l),h!==0&&h!==Y.retryLane))throw Y.retryLane=h,ei(o,h),Er(k,o,h),bv;ay(j)||Cf(),s=Tv(o,s,l)}else ay(j)?(s.flags|=192,s.child=o.child,s=null):(o=Y.treeContext,Zt=io(j.nextSibling),Fn=s,St=!0,Ga=null,ao=!1,o!==null&&Yw(s,o),s=xv(s,h.children),s.flags|=4096);return s}return v?(Ja(),j=h.fallback,v=s.mode,Y=o.child,de=Y.sibling,h=da(Y,{mode:"hidden",children:h.children}),h.subtreeFlags=Y.subtreeFlags&65011712,de!==null?j=da(de,j):(j=ti(j,v,l,null),j.flags|=2),j.return=s,h.return=s,h.sibling=j,s.child=h,Yl(null,h),h=s.child,j=o.child.memoizedState,j===null?j=Ev(l):(v=j.cachePool,v!==null?(Y=pn._currentValue,v=v.parent!==Y?{parent:Y,pool:Y}:v):v=nS(),j={baseLanes:j.baseLanes|l,cachePool:v}),h.memoizedState=j,h.childLanes=Rv(o,k,l),s.memoizedState=Sv,Yl(o.child,h)):(Xa(s),l=o.child,o=l.sibling,l=da(l,{mode:"visible",children:h.children}),l.return=s,l.sibling=null,o!==null&&(k=s.deletions,k===null?(s.deletions=[o],s.flags|=16):k.push(o)),s.child=l,s.memoizedState=null,l)}function xv(o,s){return s=_f({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function _f(o,s){return o=Mr(22,o,null,s),o.lanes=0,o}function Tv(o,s,l){return ci(s,o.child,null,l),o=xv(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function mE(o,s,l){o.lanes|=s;var h=o.alternate;h!==null&&(h.lanes|=s),Vg(o.return,s,l)}function Ov(o,s,l,h,v,_){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:v,treeForkCount:_}:(k.isBackwards=s,k.rendering=null,k.renderingStartTime=0,k.last=h,k.tail=l,k.tailMode=v,k.treeForkCount=_)}function gE(o,s,l){var h=s.pendingProps,v=h.revealOrder,_=h.tail;h=h.children;var k=cn.current,j=(k&2)!==0;if(j?(k=k&1|2,s.flags|=128):k&=1,B(cn,k),qn(o,s,h,l),h=St?jl:0,!j&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&mE(o,l,s);else if(o.tag===19)mE(o,l,s);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(v){case"forwards":for(l=s.child,v=null;l!==null;)o=l.alternate,o!==null&&sf(o)===null&&(v=l),l=l.sibling;l=v,l===null?(v=s.child,s.child=null):(v=l.sibling,l.sibling=null),Ov(s,!1,v,l,_,h);break;case"backwards":case"unstable_legacy-backwards":for(l=null,v=s.child,s.child=null;v!==null;){if(o=v.alternate,o!==null&&sf(o)===null){s.child=v;break}o=v.sibling,v.sibling=l,l=v,v=o}Ov(s,!0,l,null,_,h);break;case"together":Ov(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function va(o,s,l){if(o!==null&&(s.dependencies=o.dependencies),ns|=s.lanes,(l&s.childLanes)===0)if(o!==null){if(fc(o,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(o!==null&&s.child!==o.child)throw Error(r(153));if(s.child!==null){for(o=s.child,l=da(o,o.pendingProps),s.child=l,l.return=s;o.sibling!==null;)o=o.sibling,l=l.sibling=da(o,o.pendingProps),l.return=s;l.sibling=null}return s.child}function Cv(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&Xd(o)))}function Z3(o,s,l){switch(s.tag){case 3:ye(s,s.stateNode.containerInfo),Ka(s,pn,o.memoizedState.cache),ni();break;case 27:case 5:ke(s);break;case 4:ye(s,s.stateNode.containerInfo);break;case 10:Ka(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Jg(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(Xa(s),s.flags|=128,null):(l&s.child.childLanes)!==0?pE(o,s,l):(Xa(s),o=va(o,s,l),o!==null?o.sibling:null);Xa(s);break;case 19:var v=(o.flags&128)!==0;if(h=(l&s.childLanes)!==0,h||(fc(o,s,l,!1),h=(l&s.childLanes)!==0),v){if(h)return gE(o,s,l);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),B(cn,cn.current),h)break;return null;case 22:return s.lanes=0,cE(o,s,l,s.pendingProps);case 24:Ka(s,pn,o.memoizedState.cache)}return va(o,s,l)}function vE(o,s,l){if(o!==null)if(o.memoizedProps!==s.pendingProps)gn=!0;else{if(!Cv(o,l)&&(s.flags&128)===0)return gn=!1,Z3(o,s,l);gn=(o.flags&131072)!==0}else gn=!1,St&&(s.flags&1048576)!==0&&Ww(s,jl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(o=si(s.elementType),s.type=o,typeof o=="function")Mg(o)?(h=ui(o,h),s.tag=1,s=fE(null,s,o,h,l)):(s.tag=0,s=wv(null,s,o,h,l));else{if(o!=null){var v=o.$$typeof;if(v===O){s.tag=11,s=aE(null,s,o,h,l);break e}else if(v===N){s.tag=14,s=sE(null,s,o,h,l);break e}}throw s=J(o)||o,Error(r(306,s,""))}}return s;case 0:return wv(o,s,s.type,s.pendingProps,l);case 1:return h=s.type,v=ui(h,s.pendingProps),fE(o,s,h,v,l);case 3:e:{if(ye(s,s.stateNode.containerInfo),o===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;v=_.element,Kg(o,s),Hl(s,h,null,l);var k=s.memoizedState;if(h=k.cache,Ka(s,pn,h),h!==_.cache&&Fg(s,[pn],l,!0),ql(),h=k.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:k.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=hE(o,s,h,l);break e}else if(h!==v){v=no(Error(r(424)),s),$l(v),s=hE(o,s,h,l);break e}else for(o=s.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,Zt=io(o.firstChild),Fn=s,St=!0,Ga=null,ao=!0,l=cS(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ni(),h===v){s=va(o,s,l);break e}qn(o,s,h,l)}s=s.child}return s;case 26:return yf(o,s),o===null?(l=CR(s.type,null,s.pendingProps,null))?s.memoizedState=l:St||(l=s.type,o=s.pendingProps,h=Df(Q.current).createElement(l),h[Vn]=s,h[vr]=o,Hn(h,l,o),Mn(h),s.stateNode=h):s.memoizedState=CR(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return ke(s),o===null&&St&&(h=s.stateNode=xR(s.type,s.pendingProps,Q.current),Fn=s,ao=!0,v=Zt,is(s.type)?(iy=v,Zt=io(h.firstChild)):Zt=v),qn(o,s,s.pendingProps.children,l),yf(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&St&&((v=h=Zt)&&(h=E5(h,s.type,s.pendingProps,ao),h!==null?(s.stateNode=h,Fn=s,Zt=io(h.firstChild),ao=!1,v=!0):v=!1),v||Za(s)),ke(s),v=s.type,_=s.pendingProps,k=o!==null?o.memoizedProps:null,h=_.children,ny(v,_)?h=null:k!==null&&ny(v,k)&&(s.flags|=32),s.memoizedState!==null&&(v=tv(o,s,$3,null,null,l),du._currentValue=v),yf(o,s),qn(o,s,h,l),s.child;case 6:return o===null&&St&&((o=l=Zt)&&(l=R5(l,s.pendingProps,ao),l!==null?(s.stateNode=l,Fn=s,Zt=null,o=!0):o=!1),o||Za(s)),null;case 13:return pE(o,s,l);case 4:return ye(s,s.stateNode.containerInfo),h=s.pendingProps,o===null?s.child=ci(s,null,h,l):qn(o,s,h,l),s.child;case 11:return aE(o,s,s.type,s.pendingProps,l);case 7:return qn(o,s,s.pendingProps,l),s.child;case 8:return qn(o,s,s.pendingProps.children,l),s.child;case 12:return qn(o,s,s.pendingProps.children,l),s.child;case 10:return h=s.pendingProps,Ka(s,s.type,h.value),qn(o,s,h.children,l),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,oi(s),v=Bn(v),h=h(v),s.flags|=1,qn(o,s,h,l),s.child;case 14:return sE(o,s,s.type,s.pendingProps,l);case 15:return iE(o,s,s.type,s.pendingProps,l);case 19:return gE(o,s,l);case 31:return G3(o,s,l);case 22:return cE(o,s,l,s.pendingProps);case 24:return oi(s),h=Bn(pn),o===null?(v=Hg(),v===null&&(v=qt,_=Bg(),v.pooledCache=_,_.refCount++,_!==null&&(v.pooledCacheLanes|=l),v=_),s.memoizedState={parent:h,cache:v},Zg(s),Ka(s,pn,v)):((o.lanes&l)!==0&&(Kg(o,s),Hl(s,null,null,l),ql()),v=o.memoizedState,_=s.memoizedState,v.parent!==h?(v={parent:h,cache:h},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),Ka(s,pn,h)):(h=_.cache,Ka(s,pn,h),h!==v.cache&&Fg(s,[pn],l,!0))),qn(o,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function ya(o){o.flags|=4}function Av(o,s,l,h,v){if((s=(o.mode&32)!==0)&&(s=!1),s){if(o.flags|=16777216,(v&335544128)===v)if(o.stateNode.complete)o.flags|=8192;else if(qE())o.flags|=8192;else throw ii=nf,Gg}else o.flags&=-16777217}function yE(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!MR(s))if(qE())o.flags|=8192;else throw ii=nf,Gg}function bf(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?er():536870912,o.lanes|=s,Rc|=s)}function Ql(o,s){if(!St)switch(o.tailMode){case"hidden":s=o.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?o.tail=null:l.sibling=null;break;case"collapsed":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function Kt(o){var s=o.alternate!==null&&o.alternate.child===o.child,l=0,h=0;if(s)for(var v=o.child;v!==null;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=o,v=v.sibling;else for(v=o.child;v!==null;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=h,o.childLanes=l,s}function K3(o,s,l){var h=s.pendingProps;switch(jg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(s),null;case 1:return Kt(s),null;case 3:return l=s.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),pa(pn),Ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(o===null||o.child===null)&&(dc(s)?ya(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ug())),Kt(s),null;case 26:var v=s.type,_=s.memoizedState;return o===null?(ya(s),_!==null?(Kt(s),yE(s,_)):(Kt(s),Av(s,v,null,h,l))):_?_!==o.memoizedState?(ya(s),Kt(s),yE(s,_)):(Kt(s),s.flags&=-16777217):(o=o.memoizedProps,o!==h&&ya(s),Kt(s),Av(s,v,o,h,l)),null;case 27:if(H(s),l=Q.current,v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&ya(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return Kt(s),null}o=L.current,dc(s)?Qw(s):(o=xR(v,h,l),s.stateNode=o,ya(s))}return Kt(s),null;case 5:if(H(s),v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&ya(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return Kt(s),null}if(_=L.current,dc(s))Qw(s);else{var k=Df(Q.current);switch(_){case 1:_=k.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:_=k.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":_=k.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":_=k.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":_=k.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof h.is=="string"?k.createElement("select",{is:h.is}):k.createElement("select"),h.multiple?_.multiple=!0:h.size&&(_.size=h.size);break;default:_=typeof h.is=="string"?k.createElement(v,{is:h.is}):k.createElement(v)}}_[Vn]=s,_[vr]=h;e:for(k=s.child;k!==null;){if(k.tag===5||k.tag===6)_.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===s)break e;for(;k.sibling===null;){if(k.return===null||k.return===s)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}s.stateNode=_;e:switch(Hn(_,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&ya(s)}}return Kt(s),Av(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,l),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==h&&ya(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(o=Q.current,dc(s)){if(o=s.stateNode,l=s.memoizedProps,h=null,v=Fn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}o[Vn]=s,o=!!(o.nodeValue===l||h!==null&&h.suppressHydrationWarning===!0||pR(o.nodeValue,l)),o||Za(s,!0)}else o=Df(o).createTextNode(h),o[Vn]=s,s.stateNode=o}return Kt(s),null;case 31:if(l=s.memoizedState,o===null||o.memoizedState!==null){if(h=dc(s),l!==null){if(o===null){if(!h)throw Error(r(318));if(o=s.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Vn]=s}else ni(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Kt(s),o=!1}else l=Ug(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=l),o=!0;if(!o)return s.flags&256?(Dr(s),s):(Dr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Kt(s),null;case 13:if(h=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=dc(s),h!==null&&h.dehydrated!==null){if(o===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Vn]=s}else ni(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Kt(s),v=!1}else v=Ug(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Dr(s),s):(Dr(s),null)}return Dr(s),(s.flags&128)!==0?(s.lanes=l,s):(l=h!==null,o=o!==null&&o.memoizedState!==null,l&&(h=s.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),_=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==v&&(h.flags|=2048)),l!==o&&l&&(s.child.flags|=8192),bf(s,s.updateQueue),Kt(s),null);case 4:return Ae(),o===null&&Qv(s.stateNode.containerInfo),Kt(s),null;case 10:return pa(s.type),Kt(s),null;case 19:if(q(cn),h=s.memoizedState,h===null)return Kt(s),null;if(v=(s.flags&128)!==0,_=h.rendering,_===null)if(v)Ql(h,!1);else{if(an!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(_=sf(o),_!==null){for(s.flags|=128,Ql(h,!1),o=_.updateQueue,s.updateQueue=o,bf(s,o),s.subtreeFlags=0,o=l,l=s.child;l!==null;)Gw(l,o),l=l.sibling;return B(cn,cn.current&1|2),St&&fa(s,h.treeForkCount),s.child}o=o.sibling}h.tail!==null&&Se()>xf&&(s.flags|=128,v=!0,Ql(h,!1),s.lanes=4194304)}else{if(!v)if(o=sf(_),o!==null){if(s.flags|=128,v=!0,o=o.updateQueue,s.updateQueue=o,bf(s,o),Ql(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!St)return Kt(s),null}else 2*Se()-h.renderingStartTime>xf&&l!==536870912&&(s.flags|=128,v=!0,Ql(h,!1),s.lanes=4194304);h.isBackwards?(_.sibling=s.child,s.child=_):(o=h.last,o!==null?o.sibling=_:s.child=_,h.last=_)}return h.tail!==null?(o=h.tail,h.rendering=o,h.tail=o.sibling,h.renderingStartTime=Se(),o.sibling=null,l=cn.current,B(cn,v?l&1|2:l&1),St&&fa(s,h.treeForkCount),o):(Kt(s),null);case 22:case 23:return Dr(s),Xg(),h=s.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(l&536870912)!==0&&(s.flags&128)===0&&(Kt(s),s.subtreeFlags&6&&(s.flags|=8192)):Kt(s),l=s.updateQueue,l!==null&&bf(s,l.retryQueue),l=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==l&&(s.flags|=2048),o!==null&&q(ai),null;case 24:return l=null,o!==null&&(l=o.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),pa(pn),Kt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function W3(o,s){switch(jg(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return pa(pn),Ae(),o=s.flags,(o&65536)!==0&&(o&128)===0?(s.flags=o&-65537|128,s):null;case 26:case 27:case 5:return H(s),null;case 31:if(s.memoizedState!==null){if(Dr(s),s.alternate===null)throw Error(r(340));ni()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 13:if(Dr(s),o=s.memoizedState,o!==null&&o.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ni()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return q(cn),null;case 4:return Ae(),null;case 10:return pa(s.type),null;case 22:case 23:return Dr(s),Xg(),o!==null&&q(ai),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return pa(pn),null;case 25:return null;default:return null}}function _E(o,s){switch(jg(s),s.tag){case 3:pa(pn),Ae();break;case 26:case 27:case 5:H(s);break;case 4:Ae();break;case 31:s.memoizedState!==null&&Dr(s);break;case 13:Dr(s);break;case 19:q(cn);break;case 10:pa(s.type);break;case 22:case 23:Dr(s),Xg(),o!==null&&q(ai);break;case 24:pa(pn)}}function Xl(o,s){try{var l=s.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var v=h.next;l=v;do{if((l.tag&o)===o){h=void 0;var _=l.create,k=l.inst;h=_(),k.destroy=h}l=l.next}while(l!==v)}}catch(j){jt(s,s.return,j)}}function es(o,s,l){try{var h=s.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var _=v.next;h=_;do{if((h.tag&o)===o){var k=h.inst,j=k.destroy;if(j!==void 0){k.destroy=void 0,v=s;var Y=l,de=j;try{de()}catch(be){jt(v,Y,be)}}}h=h.next}while(h!==_)}}catch(be){jt(s,s.return,be)}}function bE(o){var s=o.updateQueue;if(s!==null){var l=o.stateNode;try{uS(s,l)}catch(h){jt(o,o.return,h)}}}function wE(o,s,l){l.props=ui(o.type,o.memoizedProps),l.state=o.memoizedState;try{l.componentWillUnmount()}catch(h){jt(o,s,h)}}function Jl(o,s){try{var l=o.ref;if(l!==null){switch(o.tag){case 26:case 27:case 5:var h=o.stateNode;break;case 30:h=o.stateNode;break;default:h=o.stateNode}typeof l=="function"?o.refCleanup=l(h):l.current=h}}catch(v){jt(o,s,v)}}function Ho(o,s){var l=o.ref,h=o.refCleanup;if(l!==null)if(typeof h=="function")try{h()}catch(v){jt(o,s,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(v){jt(o,s,v)}else l.current=null}function SE(o){var s=o.type,l=o.memoizedProps,h=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&h.focus();break e;case"img":l.src?h.src=l.src:l.srcSet&&(h.srcset=l.srcSet)}}catch(v){jt(o,o.return,v)}}function Iv(o,s,l){try{var h=o.stateNode;v5(h,o.type,l,s),h[vr]=s}catch(v){jt(o,o.return,v)}}function EE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&is(o.type)||o.tag===4}function kv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||EE(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&is(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Nv(o,s,l){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(o),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=la));else if(h!==4&&(h===27&&is(o.type)&&(l=o.stateNode,s=null),o=o.child,o!==null))for(Nv(o,s,l),o=o.sibling;o!==null;)Nv(o,s,l),o=o.sibling}function wf(o,s,l){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?l.insertBefore(o,s):l.appendChild(o);else if(h!==4&&(h===27&&is(o.type)&&(l=o.stateNode),o=o.child,o!==null))for(wf(o,s,l),o=o.sibling;o!==null;)wf(o,s,l),o=o.sibling}function RE(o){var s=o.stateNode,l=o.memoizedProps;try{for(var h=o.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);Hn(s,h,l),s[Vn]=o,s[vr]=l}catch(_){jt(o,o.return,_)}}var _a=!1,vn=!1,Mv=!1,xE=typeof WeakSet=="function"?WeakSet:Set,Pn=null;function Y3(o,s){if(o=o.containerInfo,ey=Ff,o=jw(o),Tg(o)){if("selectionStart"in o)var l={start:o.selectionStart,end:o.selectionEnd};else e:{l=(l=o.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var v=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{l.nodeType,_.nodeType}catch{l=null;break e}var k=0,j=-1,Y=-1,de=0,be=0,xe=o,he=null;t:for(;;){for(var ge;xe!==l||v!==0&&xe.nodeType!==3||(j=k+v),xe!==_||h!==0&&xe.nodeType!==3||(Y=k+h),xe.nodeType===3&&(k+=xe.nodeValue.length),(ge=xe.firstChild)!==null;)he=xe,xe=ge;for(;;){if(xe===o)break t;if(he===l&&++de===v&&(j=k),he===_&&++be===h&&(Y=k),(ge=xe.nextSibling)!==null)break;xe=he,he=xe.parentNode}xe=ge}l=j===-1||Y===-1?null:{start:j,end:Y}}else l=null}l=l||{start:0,end:0}}else l=null;for(ty={focusedElem:o,selectionRange:l},Ff=!1,Pn=s;Pn!==null;)if(s=Pn,o=s.child,(s.subtreeFlags&1028)!==0&&o!==null)o.return=s,Pn=o;else for(;Pn!==null;){switch(s=Pn,_=s.alternate,o=s.flags,s.tag){case 0:if((o&4)!==0&&(o=s.updateQueue,o=o!==null?o.events:null,o!==null))for(l=0;l<o.length;l++)v=o[l],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&_!==null){o=void 0,l=s,v=_.memoizedProps,_=_.memoizedState,h=l.stateNode;try{var Ue=ui(l.type,v);o=h.getSnapshotBeforeUpdate(Ue,_),h.__reactInternalSnapshotBeforeUpdate=o}catch(Ze){jt(l,l.return,Ze)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,l=o.nodeType,l===9)oy(o);else if(l===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":oy(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=s.sibling,o!==null){o.return=s.return,Pn=o;break}Pn=s.return}}function TE(o,s,l){var h=l.flags;switch(l.tag){case 0:case 11:case 15:wa(o,l),h&4&&Xl(5,l);break;case 1:if(wa(o,l),h&4)if(o=l.stateNode,s===null)try{o.componentDidMount()}catch(k){jt(l,l.return,k)}else{var v=ui(l.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(v,s,o.__reactInternalSnapshotBeforeUpdate)}catch(k){jt(l,l.return,k)}}h&64&&bE(l),h&512&&Jl(l,l.return);break;case 3:if(wa(o,l),h&64&&(o=l.updateQueue,o!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{uS(o,s)}catch(k){jt(l,l.return,k)}}break;case 27:s===null&&h&4&&RE(l);case 26:case 5:wa(o,l),s===null&&h&4&&SE(l),h&512&&Jl(l,l.return);break;case 12:wa(o,l);break;case 31:wa(o,l),h&4&&AE(o,l);break;case 13:wa(o,l),h&4&&IE(o,l),h&64&&(o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(l=a5.bind(null,l),x5(o,l))));break;case 22:if(h=l.memoizedState!==null||_a,!h){s=s!==null&&s.memoizedState!==null||vn,v=_a;var _=vn;_a=h,(vn=s)&&!_?Sa(o,l,(l.subtreeFlags&8772)!==0):wa(o,l),_a=v,vn=_}break;case 30:break;default:wa(o,l)}}function OE(o){var s=o.alternate;s!==null&&(o.alternate=null,OE(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&lg(s)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var Yt=null,_r=!1;function ba(o,s,l){for(l=l.child;l!==null;)CE(o,s,l),l=l.sibling}function CE(o,s,l){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(Un,l)}catch{}switch(l.tag){case 26:vn||Ho(l,s),ba(o,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:vn||Ho(l,s);var h=Yt,v=_r;is(l.type)&&(Yt=l.stateNode,_r=!1),ba(o,s,l),cu(l.stateNode),Yt=h,_r=v;break;case 5:vn||Ho(l,s);case 6:if(h=Yt,v=_r,Yt=null,ba(o,s,l),Yt=h,_r=v,Yt!==null)if(_r)try{(Yt.nodeType===9?Yt.body:Yt.nodeName==="HTML"?Yt.ownerDocument.body:Yt).removeChild(l.stateNode)}catch(_){jt(l,s,_)}else try{Yt.removeChild(l.stateNode)}catch(_){jt(l,s,_)}break;case 18:Yt!==null&&(_r?(o=Yt,bR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,l.stateNode),Nc(o)):bR(Yt,l.stateNode));break;case 4:h=Yt,v=_r,Yt=l.stateNode.containerInfo,_r=!0,ba(o,s,l),Yt=h,_r=v;break;case 0:case 11:case 14:case 15:es(2,l,s),vn||es(4,l,s),ba(o,s,l);break;case 1:vn||(Ho(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"&&wE(l,s,h)),ba(o,s,l);break;case 21:ba(o,s,l);break;case 22:vn=(h=vn)||l.memoizedState!==null,ba(o,s,l),vn=h;break;default:ba(o,s,l)}}function AE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Nc(o)}catch(l){jt(s,s.return,l)}}}function IE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Nc(o)}catch(l){jt(s,s.return,l)}}function Q3(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new xE),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new xE),s;default:throw Error(r(435,o.tag))}}function Sf(o,s){var l=Q3(o);s.forEach(function(h){if(!l.has(h)){l.add(h);var v=s5.bind(null,o,h);h.then(v,v)}})}function br(o,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var v=l[h],_=o,k=s,j=k;e:for(;j!==null;){switch(j.tag){case 27:if(is(j.type)){Yt=j.stateNode,_r=!1;break e}break;case 5:Yt=j.stateNode,_r=!1;break e;case 3:case 4:Yt=j.stateNode.containerInfo,_r=!0;break e}j=j.return}if(Yt===null)throw Error(r(160));CE(_,k,v),Yt=null,_r=!1,_=v.alternate,_!==null&&(_.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)kE(s,o),s=s.sibling}var Eo=null;function kE(o,s){var l=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:br(s,o),wr(o),h&4&&(es(3,o,o.return),Xl(3,o),es(5,o,o.return));break;case 1:br(s,o),wr(o),h&512&&(vn||l===null||Ho(l,l.return)),h&64&&_a&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(l=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=l===null?h:l.concat(h))));break;case 26:var v=Eo;if(br(s,o),wr(o),h&512&&(vn||l===null||Ho(l,l.return)),h&4){var _=l!==null?l.memoizedState:null;if(h=o.memoizedState,l===null)if(h===null)if(o.stateNode===null){e:{h=o.type,l=o.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":_=v.getElementsByTagName("title")[0],(!_||_[Tl]||_[Vn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=v.createElement(h),v.head.insertBefore(_,v.querySelector("head > title"))),Hn(_,h,l),_[Vn]=o,Mn(_),h=_;break e;case"link":var k=kR("link","href",v).get(h+(l.href||""));if(k){for(var j=0;j<k.length;j++)if(_=k[j],_.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&_.getAttribute("rel")===(l.rel==null?null:l.rel)&&_.getAttribute("title")===(l.title==null?null:l.title)&&_.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){k.splice(j,1);break t}}_=v.createElement(h),Hn(_,h,l),v.head.appendChild(_);break;case"meta":if(k=kR("meta","content",v).get(h+(l.content||""))){for(j=0;j<k.length;j++)if(_=k[j],_.getAttribute("content")===(l.content==null?null:""+l.content)&&_.getAttribute("name")===(l.name==null?null:l.name)&&_.getAttribute("property")===(l.property==null?null:l.property)&&_.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&_.getAttribute("charset")===(l.charSet==null?null:l.charSet)){k.splice(j,1);break t}}_=v.createElement(h),Hn(_,h,l),v.head.appendChild(_);break;default:throw Error(r(468,h))}_[Vn]=o,Mn(_),h=_}o.stateNode=h}else NR(v,o.type,o.stateNode);else o.stateNode=IR(v,h,o.memoizedProps);else _!==h?(_===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):_.count--,h===null?NR(v,o.type,o.stateNode):IR(v,h,o.memoizedProps)):h===null&&o.stateNode!==null&&Iv(o,o.memoizedProps,l.memoizedProps)}break;case 27:br(s,o),wr(o),h&512&&(vn||l===null||Ho(l,l.return)),l!==null&&h&4&&Iv(o,o.memoizedProps,l.memoizedProps);break;case 5:if(br(s,o),wr(o),h&512&&(vn||l===null||Ho(l,l.return)),o.flags&32){v=o.stateNode;try{tc(v,"")}catch(Ue){jt(o,o.return,Ue)}}h&4&&o.stateNode!=null&&(v=o.memoizedProps,Iv(o,v,l!==null?l.memoizedProps:v)),h&1024&&(Mv=!0);break;case 6:if(br(s,o),wr(o),h&4){if(o.stateNode===null)throw Error(r(162));h=o.memoizedProps,l=o.stateNode;try{l.nodeValue=h}catch(Ue){jt(o,o.return,Ue)}}break;case 3:if($f=null,v=Eo,Eo=Lf(s.containerInfo),br(s,o),Eo=v,wr(o),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Nc(s.containerInfo)}catch(Ue){jt(o,o.return,Ue)}Mv&&(Mv=!1,NE(o));break;case 4:h=Eo,Eo=Lf(o.stateNode.containerInfo),br(s,o),wr(o),Eo=h;break;case 12:br(s,o),wr(o);break;case 31:br(s,o),wr(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 13:br(s,o),wr(o),o.child.flags&8192&&o.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Rf=Se()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 22:v=o.memoizedState!==null;var Y=l!==null&&l.memoizedState!==null,de=_a,be=vn;if(_a=de||v,vn=be||Y,br(s,o),vn=be,_a=de,wr(o),h&8192)e:for(s=o.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(l===null||Y||_a||vn||di(o)),l=null,s=o;;){if(s.tag===5||s.tag===26){if(l===null){Y=l=s;try{if(_=Y.stateNode,v)k=_.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{j=Y.stateNode;var xe=Y.memoizedProps.style,he=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;j.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Ue){jt(Y,Y.return,Ue)}}}else if(s.tag===6){if(l===null){Y=s;try{Y.stateNode.nodeValue=v?"":Y.memoizedProps}catch(Ue){jt(Y,Y.return,Ue)}}}else if(s.tag===18){if(l===null){Y=s;try{var ge=Y.stateNode;v?wR(ge,!0):wR(Y.stateNode,!1)}catch(Ue){jt(Y,Y.return,Ue)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===o)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=o.updateQueue,h!==null&&(l=h.retryQueue,l!==null&&(h.retryQueue=null,Sf(o,l))));break;case 19:br(s,o),wr(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 30:break;case 21:break;default:br(s,o),wr(o)}}function wr(o){var s=o.flags;if(s&2){try{for(var l,h=o.return;h!==null;){if(EE(h)){l=h;break}h=h.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var v=l.stateNode,_=kv(o);wf(o,_,v);break;case 5:var k=l.stateNode;l.flags&32&&(tc(k,""),l.flags&=-33);var j=kv(o);wf(o,j,k);break;case 3:case 4:var Y=l.stateNode.containerInfo,de=kv(o);Nv(o,de,Y);break;default:throw Error(r(161))}}catch(be){jt(o,o.return,be)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function NE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;NE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function wa(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)TE(o,s.alternate,s),s=s.sibling}function di(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:es(4,s,s.return),di(s);break;case 1:Ho(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&wE(s,s.return,l),di(s);break;case 27:cu(s.stateNode);case 26:case 5:Ho(s,s.return),di(s);break;case 22:s.memoizedState===null&&di(s);break;case 30:di(s);break;default:di(s)}o=o.sibling}}function Sa(o,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,v=o,_=s,k=_.flags;switch(_.tag){case 0:case 11:case 15:Sa(v,_,l),Xl(4,_);break;case 1:if(Sa(v,_,l),h=_,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(de){jt(h,h.return,de)}if(h=_,v=h.updateQueue,v!==null){var j=h.stateNode;try{var Y=v.shared.hiddenCallbacks;if(Y!==null)for(v.shared.hiddenCallbacks=null,v=0;v<Y.length;v++)lS(Y[v],j)}catch(de){jt(h,h.return,de)}}l&&k&64&&bE(_),Jl(_,_.return);break;case 27:RE(_);case 26:case 5:Sa(v,_,l),l&&h===null&&k&4&&SE(_),Jl(_,_.return);break;case 12:Sa(v,_,l);break;case 31:Sa(v,_,l),l&&k&4&&AE(v,_);break;case 13:Sa(v,_,l),l&&k&4&&IE(v,_);break;case 22:_.memoizedState===null&&Sa(v,_,l),Jl(_,_.return);break;case 30:break;default:Sa(v,_,l)}s=s.sibling}}function Pv(o,s){var l=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==l&&(o!=null&&o.refCount++,l!=null&&Ul(l))}function Dv(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Ul(o))}function Ro(o,s,l,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)ME(o,s,l,h),s=s.sibling}function ME(o,s,l,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Ro(o,s,l,h),v&2048&&Xl(9,s);break;case 1:Ro(o,s,l,h);break;case 3:Ro(o,s,l,h),v&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Ul(o)));break;case 12:if(v&2048){Ro(o,s,l,h),o=s.stateNode;try{var _=s.memoizedProps,k=_.id,j=_.onPostCommit;typeof j=="function"&&j(k,s.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Y){jt(s,s.return,Y)}}else Ro(o,s,l,h);break;case 31:Ro(o,s,l,h);break;case 13:Ro(o,s,l,h);break;case 23:break;case 22:_=s.stateNode,k=s.alternate,s.memoizedState!==null?_._visibility&2?Ro(o,s,l,h):eu(o,s):_._visibility&2?Ro(o,s,l,h):(_._visibility|=2,wc(o,s,l,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Pv(k,s);break;case 24:Ro(o,s,l,h),v&2048&&Dv(s.alternate,s);break;default:Ro(o,s,l,h)}}function wc(o,s,l,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=o,k=s,j=l,Y=h,de=k.flags;switch(k.tag){case 0:case 11:case 15:wc(_,k,j,Y,v),Xl(8,k);break;case 23:break;case 22:var be=k.stateNode;k.memoizedState!==null?be._visibility&2?wc(_,k,j,Y,v):eu(_,k):(be._visibility|=2,wc(_,k,j,Y,v)),v&&de&2048&&Pv(k.alternate,k);break;case 24:wc(_,k,j,Y,v),v&&de&2048&&Dv(k.alternate,k);break;default:wc(_,k,j,Y,v)}s=s.sibling}}function eu(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=o,h=s,v=h.flags;switch(h.tag){case 22:eu(l,h),v&2048&&Pv(h.alternate,h);break;case 24:eu(l,h),v&2048&&Dv(h.alternate,h);break;default:eu(l,h)}s=s.sibling}}var tu=8192;function Sc(o,s,l){if(o.subtreeFlags&tu)for(o=o.child;o!==null;)PE(o,s,l),o=o.sibling}function PE(o,s,l){switch(o.tag){case 26:Sc(o,s,l),o.flags&tu&&o.memoizedState!==null&&j5(l,Eo,o.memoizedState,o.memoizedProps);break;case 5:Sc(o,s,l);break;case 3:case 4:var h=Eo;Eo=Lf(o.stateNode.containerInfo),Sc(o,s,l),Eo=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=tu,tu=16777216,Sc(o,s,l),tu=h):Sc(o,s,l));break;default:Sc(o,s,l)}}function DE(o){var s=o.alternate;if(s!==null&&(o=s.child,o!==null)){s.child=null;do s=o.sibling,o.sibling=null,o=s;while(o!==null)}}function nu(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Pn=h,jE(h,o)}DE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)LE(o),o=o.sibling}function LE(o){switch(o.tag){case 0:case 11:case 15:nu(o),o.flags&2048&&es(9,o,o.return);break;case 3:nu(o);break;case 12:nu(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,Ef(o)):nu(o);break;default:nu(o)}}function Ef(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Pn=h,jE(h,o)}DE(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:es(8,s,s.return),Ef(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,Ef(s));break;default:Ef(s)}o=o.sibling}}function jE(o,s){for(;Pn!==null;){var l=Pn;switch(l.tag){case 0:case 11:case 15:es(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var h=l.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Ul(l.memoizedState.cache)}if(h=l.child,h!==null)h.return=l,Pn=h;else e:for(l=o;Pn!==null;){h=Pn;var v=h.sibling,_=h.return;if(OE(h),h===l){Pn=null;break e}if(v!==null){v.return=_,Pn=v;break e}Pn=_}}}var X3={getCacheForType:function(o){var s=Bn(pn),l=s.data.get(o);return l===void 0&&(l=o(),s.data.set(o,l)),l},cacheSignal:function(){return Bn(pn).controller.signal}},J3=typeof WeakMap=="function"?WeakMap:Map,Nt=0,qt=null,vt=null,bt=0,Lt=0,Lr=null,ts=!1,Ec=!1,Lv=!1,Ea=0,an=0,ns=0,fi=0,jv=0,jr=0,Rc=0,ru=null,Sr=null,$v=!1,Rf=0,$E=0,xf=1/0,Tf=null,rs=null,Tn=0,os=null,xc=null,Ra=0,Uv=0,zv=null,UE=null,ou=0,Vv=null;function $r(){return(Nt&2)!==0&&bt!==0?bt&-bt:F.T!==null?Zv():ig()}function zE(){if(jr===0)if((bt&536870912)===0||St){var o=Zi;Zi<<=1,(Zi&3932160)===0&&(Zi=262144),jr=o}else jr=536870912;return o=Pr.current,o!==null&&(o.flags|=32),jr}function Er(o,s,l){(o===qt&&(Lt===2||Lt===9)||o.cancelPendingCommit!==null)&&(Tc(o,0),as(o,bt,jr,!1)),tn(o,l),((Nt&2)===0||o!==qt)&&(o===qt&&((Nt&2)===0&&(fi|=l),an===4&&as(o,bt,jr,!1)),Go(o))}function VE(o,s,l){if((Nt&6)!==0)throw Error(r(327));var h=!l&&(s&127)===0&&(s&o.expiredLanes)===0||Wt(o,s),v=h?n5(o,s):Bv(o,s,!0),_=h;do{if(v===0){Ec&&!h&&as(o,s,0,!1);break}else{if(l=o.current.alternate,_&&!e5(l)){v=Bv(o,s,!1),_=!1;continue}if(v===2){if(_=s,o.errorRecoveryDisabledLanes&_)var k=0;else k=o.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){s=k;e:{var j=o;v=ru;var Y=j.current.memoizedState.isDehydrated;if(Y&&(Tc(j,k).flags|=256),k=Bv(j,k,!1),k!==2){if(Lv&&!Y){j.errorRecoveryDisabledLanes|=_,fi|=_,v=4;break e}_=Sr,Sr=v,_!==null&&(Sr===null?Sr=_:Sr.push.apply(Sr,_))}v=k}if(_=!1,v!==2)continue}}if(v===1){Tc(o,0),as(o,s,0,!0);break}e:{switch(h=o,_=v,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:as(h,s,jr,!ts);break e;case 2:Sr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=Rf+300-Se(),10<v)){if(as(h,s,jr,!ts),Qe(h,0,!0)!==0)break e;Ra=s,h.timeoutHandle=yR(FE.bind(null,h,l,Sr,Tf,$v,s,jr,fi,Rc,ts,_,"Throttled",-0,0),v);break e}FE(h,l,Sr,Tf,$v,s,jr,fi,Rc,ts,_,null,-0,0)}}break}while(!0);Go(o)}function FE(o,s,l,h,v,_,k,j,Y,de,be,xe,he,ge){if(o.timeoutHandle=-1,xe=s.subtreeFlags,xe&8192||(xe&16785408)===16785408){xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:la},PE(s,_,xe);var Ue=(_&62914560)===_?Rf-Se():(_&4194048)===_?$E-Se():0;if(Ue=$5(xe,Ue),Ue!==null){Ra=_,o.cancelPendingCommit=Ue(YE.bind(null,o,s,_,l,h,v,k,j,Y,be,xe,null,he,ge)),as(o,_,k,!de);return}}YE(o,s,_,l,h,v,k,j,Y)}function e5(o){for(var s=o;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var h=0;h<l.length;h++){var v=l[h],_=v.getSnapshot;v=v.value;try{if(!Nr(_(),v))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function as(o,s,l,h){s&=~jv,s&=~fi,o.suspendedLanes|=s,o.pingedLanes&=~s,h&&(o.warmLanes|=s),h=o.expirationTimes;for(var v=s;0<v;){var _=31-kn(v),k=1<<_;h[_]=-1,v&=~k}l!==0&&Ws(o,l,s)}function Of(){return(Nt&6)===0?(au(0),!1):!0}function Fv(){if(vt!==null){if(Lt===0)var o=vt.return;else o=vt,ha=ri=null,ov(o),gc=null,Vl=0,o=vt;for(;o!==null;)_E(o.alternate,o),o=o.return;vt=null}}function Tc(o,s){var l=o.timeoutHandle;l!==-1&&(o.timeoutHandle=-1,b5(l)),l=o.cancelPendingCommit,l!==null&&(o.cancelPendingCommit=null,l()),Ra=0,Fv(),qt=o,vt=l=da(o.current,null),bt=s,Lt=0,Lr=null,ts=!1,Ec=Wt(o,s),Lv=!1,Rc=jr=jv=fi=ns=an=0,Sr=ru=null,$v=!1,(s&8)!==0&&(s|=s&32);var h=o.entangledLanes;if(h!==0)for(o=o.entanglements,h&=s;0<h;){var v=31-kn(h),_=1<<v;s|=o[v],h&=~_}return Ea=s,Zd(),l}function BE(o,s){st=null,F.H=Wl,s===mc||s===tf?(s=aS(),Lt=3):s===Gg?(s=aS(),Lt=4):Lt=s===bv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Lr=s,vt===null&&(an=1,gf(o,no(s,o.current)))}function qE(){var o=Pr.current;return o===null?!0:(bt&4194048)===bt?so===null:(bt&62914560)===bt||(bt&536870912)!==0?o===so:!1}function HE(){var o=F.H;return F.H=Wl,o===null?Wl:o}function GE(){var o=F.A;return F.A=X3,o}function Cf(){an=4,ts||(bt&4194048)!==bt&&Pr.current!==null||(Ec=!0),(ns&134217727)===0&&(fi&134217727)===0||qt===null||as(qt,bt,jr,!1)}function Bv(o,s,l){var h=Nt;Nt|=2;var v=HE(),_=GE();(qt!==o||bt!==s)&&(Tf=null,Tc(o,s)),s=!1;var k=an;e:do try{if(Lt!==0&&vt!==null){var j=vt,Y=Lr;switch(Lt){case 8:Fv(),k=6;break e;case 3:case 2:case 9:case 6:Pr.current===null&&(s=!0);var de=Lt;if(Lt=0,Lr=null,Oc(o,j,Y,de),l&&Ec){k=0;break e}break;default:de=Lt,Lt=0,Lr=null,Oc(o,j,Y,de)}}t5(),k=an;break}catch(be){BE(o,be)}while(!0);return s&&o.shellSuspendCounter++,ha=ri=null,Nt=h,F.H=v,F.A=_,vt===null&&(qt=null,bt=0,Zd()),k}function t5(){for(;vt!==null;)ZE(vt)}function n5(o,s){var l=Nt;Nt|=2;var h=HE(),v=GE();qt!==o||bt!==s?(Tf=null,xf=Se()+500,Tc(o,s)):Ec=Wt(o,s);e:do try{if(Lt!==0&&vt!==null){s=vt;var _=Lr;t:switch(Lt){case 1:Lt=0,Lr=null,Oc(o,s,_,1);break;case 2:case 9:if(rS(_)){Lt=0,Lr=null,KE(s);break}s=function(){Lt!==2&&Lt!==9||qt!==o||(Lt=7),Go(o)},_.then(s,s);break e;case 3:Lt=7;break e;case 4:Lt=5;break e;case 7:rS(_)?(Lt=0,Lr=null,KE(s)):(Lt=0,Lr=null,Oc(o,s,_,7));break;case 5:var k=null;switch(vt.tag){case 26:k=vt.memoizedState;case 5:case 27:var j=vt;if(k?MR(k):j.stateNode.complete){Lt=0,Lr=null;var Y=j.sibling;if(Y!==null)vt=Y;else{var de=j.return;de!==null?(vt=de,Af(de)):vt=null}break t}}Lt=0,Lr=null,Oc(o,s,_,5);break;case 6:Lt=0,Lr=null,Oc(o,s,_,6);break;case 8:Fv(),an=6;break e;default:throw Error(r(462))}}r5();break}catch(be){BE(o,be)}while(!0);return ha=ri=null,F.H=h,F.A=v,Nt=l,vt!==null?0:(qt=null,bt=0,Zd(),an)}function r5(){for(;vt!==null&&!te();)ZE(vt)}function ZE(o){var s=vE(o.alternate,o,Ea);o.memoizedProps=o.pendingProps,s===null?Af(o):vt=s}function KE(o){var s=o,l=s.alternate;switch(s.tag){case 15:case 0:s=dE(l,s,s.pendingProps,s.type,void 0,bt);break;case 11:s=dE(l,s,s.pendingProps,s.type.render,s.ref,bt);break;case 5:ov(s);default:_E(l,s),s=vt=Gw(s,Ea),s=vE(l,s,Ea)}o.memoizedProps=o.pendingProps,s===null?Af(o):vt=s}function Oc(o,s,l,h){ha=ri=null,ov(s),gc=null,Vl=0;var v=s.return;try{if(H3(o,v,s,l,bt)){an=1,gf(o,no(l,o.current)),vt=null;return}}catch(_){if(v!==null)throw vt=v,_;an=1,gf(o,no(l,o.current)),vt=null;return}s.flags&32768?(St||h===1?o=!0:Ec||(bt&536870912)!==0?o=!1:(ts=o=!0,(h===2||h===9||h===3||h===6)&&(h=Pr.current,h!==null&&h.tag===13&&(h.flags|=16384))),WE(s,o)):Af(s)}function Af(o){var s=o;do{if((s.flags&32768)!==0){WE(s,ts);return}o=s.return;var l=K3(s.alternate,s,Ea);if(l!==null){vt=l;return}if(s=s.sibling,s!==null){vt=s;return}vt=s=o}while(s!==null);an===0&&(an=5)}function WE(o,s){do{var l=W3(o.alternate,o);if(l!==null){l.flags&=32767,vt=l;return}if(l=o.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(o=o.sibling,o!==null)){vt=o;return}vt=o=l}while(o!==null);an=6,vt=null}function YE(o,s,l,h,v,_,k,j,Y){o.cancelPendingCommit=null;do If();while(Tn!==0);if((Nt&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=kg,pr(o,l,_,k,j,Y),o===qt&&(vt=qt=null,bt=0),xc=s,os=o,Ra=l,Uv=_,zv=v,UE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,i5(ot,function(){return tR(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=F.T,F.T=null,v=X.p,X.p=2,k=Nt,Nt|=4;try{Y3(o,s,l)}finally{Nt=k,X.p=v,F.T=h}}Tn=1,QE(),XE(),JE()}}function QE(){if(Tn===1){Tn=0;var o=os,s=xc,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=F.T,F.T=null;var h=X.p;X.p=2;var v=Nt;Nt|=4;try{kE(s,o);var _=ty,k=jw(o.containerInfo),j=_.focusedElem,Y=_.selectionRange;if(k!==j&&j&&j.ownerDocument&&Lw(j.ownerDocument.documentElement,j)){if(Y!==null&&Tg(j)){var de=Y.start,be=Y.end;if(be===void 0&&(be=de),"selectionStart"in j)j.selectionStart=de,j.selectionEnd=Math.min(be,j.value.length);else{var xe=j.ownerDocument||document,he=xe&&xe.defaultView||window;if(he.getSelection){var ge=he.getSelection(),Ue=j.textContent.length,Ze=Math.min(Y.start,Ue),Bt=Y.end===void 0?Ze:Math.min(Y.end,Ue);!ge.extend&&Ze>Bt&&(k=Bt,Bt=Ze,Ze=k);var se=Dw(j,Ze),ee=Dw(j,Bt);if(se&&ee&&(ge.rangeCount!==1||ge.anchorNode!==se.node||ge.anchorOffset!==se.offset||ge.focusNode!==ee.node||ge.focusOffset!==ee.offset)){var ue=xe.createRange();ue.setStart(se.node,se.offset),ge.removeAllRanges(),Ze>Bt?(ge.addRange(ue),ge.extend(ee.node,ee.offset)):(ue.setEnd(ee.node,ee.offset),ge.addRange(ue))}}}}for(xe=[],ge=j;ge=ge.parentNode;)ge.nodeType===1&&xe.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<xe.length;j++){var Ee=xe[j];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}Ff=!!ey,ty=ey=null}finally{Nt=v,X.p=h,F.T=l}}o.current=s,Tn=2}}function XE(){if(Tn===2){Tn=0;var o=os,s=xc,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=F.T,F.T=null;var h=X.p;X.p=2;var v=Nt;Nt|=4;try{TE(o,s.alternate,s)}finally{Nt=v,X.p=h,F.T=l}}Tn=3}}function JE(){if(Tn===4||Tn===3){Tn=0,re();var o=os,s=xc,l=Ra,h=UE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Tn=5:(Tn=0,xc=os=null,eR(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(rs=null),wo(l),s=s.stateNode,en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(Un,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=F.T,v=X.p,X.p=2,F.T=null;try{for(var _=o.onRecoverableError,k=0;k<h.length;k++){var j=h[k];_(j.value,{componentStack:j.stack})}}finally{F.T=s,X.p=v}}(Ra&3)!==0&&If(),Go(o),v=o.pendingLanes,(l&261930)!==0&&(v&42)!==0?o===Vv?ou++:(ou=0,Vv=o):ou=0,au(0)}}function eR(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,Ul(s)))}function If(){return QE(),XE(),JE(),tR()}function tR(){if(Tn!==5)return!1;var o=os,s=Uv;Uv=0;var l=wo(Ra),h=F.T,v=X.p;try{X.p=32>l?32:l,F.T=null,l=zv,zv=null;var _=os,k=Ra;if(Tn=0,xc=os=null,Ra=0,(Nt&6)!==0)throw Error(r(331));var j=Nt;if(Nt|=4,LE(_.current),ME(_,_.current,k,l),Nt=j,au(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(Un,_)}catch{}return!0}finally{X.p=v,F.T=h,eR(o,s)}}function nR(o,s,l){s=no(l,s),s=_v(o.stateNode,s,2),o=Qa(o,s,2),o!==null&&(tn(o,2),Go(o))}function jt(o,s,l){if(o.tag===3)nR(o,o,l);else for(;s!==null;){if(s.tag===3){nR(s,o,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(rs===null||!rs.has(h))){o=no(l,o),l=rE(2),h=Qa(s,l,2),h!==null&&(oE(l,h,s,o),tn(h,2),Go(h));break}}s=s.return}}function qv(o,s,l){var h=o.pingCache;if(h===null){h=o.pingCache=new J3;var v=new Set;h.set(s,v)}else v=h.get(s),v===void 0&&(v=new Set,h.set(s,v));v.has(l)||(Lv=!0,v.add(l),o=o5.bind(null,o,s,l),s.then(o,o))}function o5(o,s,l){var h=o.pingCache;h!==null&&h.delete(s),o.pingedLanes|=o.suspendedLanes&l,o.warmLanes&=~l,qt===o&&(bt&l)===l&&(an===4||an===3&&(bt&62914560)===bt&&300>Se()-Rf?(Nt&2)===0&&Tc(o,0):jv|=l,Rc===bt&&(Rc=0)),Go(o)}function rR(o,s){s===0&&(s=er()),o=ei(o,s),o!==null&&(tn(o,s),Go(o))}function a5(o){var s=o.memoizedState,l=0;s!==null&&(l=s.retryLane),rR(o,l)}function s5(o,s){var l=0;switch(o.tag){case 31:case 13:var h=o.stateNode,v=o.memoizedState;v!==null&&(l=v.retryLane);break;case 19:h=o.stateNode;break;case 22:h=o.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),rR(o,l)}function i5(o,s){return Xe(o,s)}var kf=null,Cc=null,Hv=!1,Nf=!1,Gv=!1,ss=0;function Go(o){o!==Cc&&o.next===null&&(Cc===null?kf=Cc=o:Cc=Cc.next=o),Nf=!0,Hv||(Hv=!0,l5())}function au(o,s){if(!Gv&&Nf){Gv=!0;do for(var l=!1,h=kf;h!==null;){if(o!==0){var v=h.pendingLanes;if(v===0)var _=0;else{var k=h.suspendedLanes,j=h.pingedLanes;_=(1<<31-kn(42|o)+1)-1,_&=v&~(k&~j),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(l=!0,iR(h,_))}else _=bt,_=Qe(h,h===qt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||Wt(h,_)||(l=!0,iR(h,_));h=h.next}while(l);Gv=!1}}function c5(){oR()}function oR(){Nf=Hv=!1;var o=0;ss!==0&&_5()&&(o=ss);for(var s=Se(),l=null,h=kf;h!==null;){var v=h.next,_=aR(h,s);_===0?(h.next=null,l===null?kf=v:l.next=v,v===null&&(Cc=l)):(l=h,(o!==0||(_&3)!==0)&&(Nf=!0)),h=v}Tn!==0&&Tn!==5||au(o),ss!==0&&(ss=0)}function aR(o,s){for(var l=o.suspendedLanes,h=o.pingedLanes,v=o.expirationTimes,_=o.pendingLanes&-62914561;0<_;){var k=31-kn(_),j=1<<k,Y=v[k];Y===-1?((j&l)===0||(j&h)!==0)&&(v[k]=Nn(j,s)):Y<=s&&(o.expiredLanes|=j),_&=~j}if(s=qt,l=bt,l=Qe(o,o===s?l:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,l===0||o===s&&(Lt===2||Lt===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&Z(h),o.callbackNode=null,o.callbackPriority=0;if((l&3)===0||Wt(o,l)){if(s=l&-l,s===o.callbackPriority)return s;switch(h!==null&&Z(h),wo(l)){case 2:case 8:l=Ne;break;case 32:l=ot;break;case 268435456:l=Dt;break;default:l=ot}return h=sR.bind(null,o),l=Xe(l,h),o.callbackPriority=s,o.callbackNode=l,s}return h!==null&&h!==null&&Z(h),o.callbackPriority=2,o.callbackNode=null,2}function sR(o,s){if(Tn!==0&&Tn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var l=o.callbackNode;if(If()&&o.callbackNode!==l)return null;var h=bt;return h=Qe(o,o===qt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:(VE(o,h,s),aR(o,Se()),o.callbackNode!=null&&o.callbackNode===l?sR.bind(null,o):null)}function iR(o,s){if(If())return null;VE(o,s,!0)}function l5(){w5(function(){(Nt&6)!==0?Xe(Re,c5):oR()})}function Zv(){if(ss===0){var o=hc;o===0&&(o=Gi,Gi<<=1,(Gi&261888)===0&&(Gi=256)),ss=o}return ss}function cR(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Ud(""+o)}function lR(o,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,o.id&&l.setAttribute("form",o.id),s.parentNode.insertBefore(l,s),o=new FormData(o),l.parentNode.removeChild(l),o}function u5(o,s,l,h,v){if(s==="submit"&&l&&l.stateNode===v){var _=cR((v[vr]||null).action),k=h.submitter;k&&(s=(s=k[vr]||null)?cR(s.formAction):k.getAttribute("formAction"),s!==null&&(_=s,k=null));var j=new Bd("action","action",null,h,v);o.push({event:j,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ss!==0){var Y=k?lR(v,k):new FormData(v);hv(l,{pending:!0,data:Y,method:v.method,action:_},null,Y)}}else typeof _=="function"&&(j.preventDefault(),Y=k?lR(v,k):new FormData(v),hv(l,{pending:!0,data:Y,method:v.method,action:_},_,Y))},currentTarget:v}]})}}for(var Kv=0;Kv<Ig.length;Kv++){var Wv=Ig[Kv],d5=Wv.toLowerCase(),f5=Wv[0].toUpperCase()+Wv.slice(1);So(d5,"on"+f5)}So(zw,"onAnimationEnd"),So(Vw,"onAnimationIteration"),So(Fw,"onAnimationStart"),So("dblclick","onDoubleClick"),So("focusin","onFocus"),So("focusout","onBlur"),So(C3,"onTransitionRun"),So(A3,"onTransitionStart"),So(I3,"onTransitionCancel"),So(Bw,"onTransitionEnd"),Ji("onMouseEnter",["mouseout","mouseover"]),Ji("onMouseLeave",["mouseout","mouseover"]),Ji("onPointerEnter",["pointerout","pointerover"]),Ji("onPointerLeave",["pointerout","pointerover"]),Ys("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ys("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ys("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ys("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ys("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ys("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var su="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(" "),h5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(su));function uR(o,s){s=(s&4)!==0;for(var l=0;l<o.length;l++){var h=o[l],v=h.event;h=h.listeners;e:{var _=void 0;if(s)for(var k=h.length-1;0<=k;k--){var j=h[k],Y=j.instance,de=j.currentTarget;if(j=j.listener,Y!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=de;try{_(v)}catch(be){Gd(be)}v.currentTarget=null,_=Y}else for(k=0;k<h.length;k++){if(j=h[k],Y=j.instance,de=j.currentTarget,j=j.listener,Y!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=de;try{_(v)}catch(be){Gd(be)}v.currentTarget=null,_=Y}}}}function yt(o,s){var l=s[cg];l===void 0&&(l=s[cg]=new Set);var h=o+"__bubble";l.has(h)||(dR(s,o,2,!1),l.add(h))}function Yv(o,s,l){var h=0;s&&(h|=4),dR(l,o,h,s)}var Mf="_reactListening"+Math.random().toString(36).slice(2);function Qv(o){if(!o[Mf]){o[Mf]=!0,ow.forEach(function(l){l!=="selectionchange"&&(h5.has(l)||Yv(l,!1,o),Yv(l,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[Mf]||(s[Mf]=!0,Yv("selectionchange",!1,s))}}function dR(o,s,l,h){switch(zR(s)){case 2:var v=V5;break;case 8:v=F5;break;default:v=fy}l=v.bind(null,s,l,o),v=void 0,!vg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?o.addEventListener(s,l,{capture:!0,passive:v}):o.addEventListener(s,l,!0):v!==void 0?o.addEventListener(s,l,{passive:v}):o.addEventListener(s,l,!1)}function Xv(o,s,l,h,v){var _=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var k=h.tag;if(k===3||k===4){var j=h.stateNode.containerInfo;if(j===v)break;if(k===4)for(k=h.return;k!==null;){var Y=k.tag;if((Y===3||Y===4)&&k.stateNode.containerInfo===v)return;k=k.return}for(;j!==null;){if(k=Yi(j),k===null)return;if(Y=k.tag,Y===5||Y===6||Y===26||Y===27){h=_=k;continue e}j=j.parentNode}}h=h.return}gw(function(){var de=_,be=mg(l),xe=[];e:{var he=qw.get(o);if(he!==void 0){var ge=Bd,Ue=o;switch(o){case"keypress":if(Vd(l)===0)break e;case"keydown":case"keyup":ge=s3;break;case"focusin":Ue="focus",ge=wg;break;case"focusout":Ue="blur",ge=wg;break;case"beforeblur":case"afterblur":ge=wg;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=_w;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=KP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=l3;break;case zw:case Vw:case Fw:ge=QP;break;case Bw:ge=d3;break;case"scroll":case"scrollend":ge=GP;break;case"wheel":ge=h3;break;case"copy":case"cut":case"paste":ge=JP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=ww;break;case"toggle":case"beforetoggle":ge=m3}var Ze=(s&4)!==0,Bt=!Ze&&(o==="scroll"||o==="scrollend"),se=Ze?he!==null?he+"Capture":null:he;Ze=[];for(var ee=de,ue;ee!==null;){var Ee=ee;if(ue=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||ue===null||se===null||(Ee=Cl(ee,se),Ee!=null&&Ze.push(iu(ee,Ee,ue))),Bt)break;ee=ee.return}0<Ze.length&&(he=new ge(he,Ue,null,l,be),xe.push({event:he,listeners:Ze}))}}if((s&7)===0){e:{if(he=o==="mouseover"||o==="pointerover",ge=o==="mouseout"||o==="pointerout",he&&l!==pg&&(Ue=l.relatedTarget||l.fromElement)&&(Yi(Ue)||Ue[Wi]))break e;if((ge||he)&&(he=be.window===be?be:(he=be.ownerDocument)?he.defaultView||he.parentWindow:window,ge?(Ue=l.relatedTarget||l.toElement,ge=de,Ue=Ue?Yi(Ue):null,Ue!==null&&(Bt=i(Ue),Ze=Ue.tag,Ue!==Bt||Ze!==5&&Ze!==27&&Ze!==6)&&(Ue=null)):(ge=null,Ue=de),ge!==Ue)){if(Ze=_w,Ee="onMouseLeave",se="onMouseEnter",ee="mouse",(o==="pointerout"||o==="pointerover")&&(Ze=ww,Ee="onPointerLeave",se="onPointerEnter",ee="pointer"),Bt=ge==null?he:Ol(ge),ue=Ue==null?he:Ol(Ue),he=new Ze(Ee,ee+"leave",ge,l,be),he.target=Bt,he.relatedTarget=ue,Ee=null,Yi(be)===de&&(Ze=new Ze(se,ee+"enter",Ue,l,be),Ze.target=ue,Ze.relatedTarget=Bt,Ee=Ze),Bt=Ee,ge&&Ue)t:{for(Ze=p5,se=ge,ee=Ue,ue=0,Ee=se;Ee;Ee=Ze(Ee))ue++;Ee=0;for(var Ge=ee;Ge;Ge=Ze(Ge))Ee++;for(;0<ue-Ee;)se=Ze(se),ue--;for(;0<Ee-ue;)ee=Ze(ee),Ee--;for(;ue--;){if(se===ee||ee!==null&&se===ee.alternate){Ze=se;break t}se=Ze(se),ee=Ze(ee)}Ze=null}else Ze=null;ge!==null&&fR(xe,he,ge,Ze,!1),Ue!==null&&Bt!==null&&fR(xe,Bt,Ue,Ze,!0)}}e:{if(he=de?Ol(de):window,ge=he.nodeName&&he.nodeName.toLowerCase(),ge==="select"||ge==="input"&&he.type==="file")var At=Aw;else if(Ow(he))if(Iw)At=x3;else{At=E3;var Be=S3}else ge=he.nodeName,!ge||ge.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?de&&hg(de.elementType)&&(At=Aw):At=R3;if(At&&(At=At(o,de))){Cw(xe,At,l,be);break e}Be&&Be(o,he,de),o==="focusout"&&de&&he.type==="number"&&de.memoizedProps.value!=null&&fg(he,"number",he.value)}switch(Be=de?Ol(de):window,o){case"focusin":(Ow(Be)||Be.contentEditable==="true")&&(ac=Be,Og=de,Ll=null);break;case"focusout":Ll=Og=ac=null;break;case"mousedown":Cg=!0;break;case"contextmenu":case"mouseup":case"dragend":Cg=!1,$w(xe,l,be);break;case"selectionchange":if(O3)break;case"keydown":case"keyup":$w(xe,l,be)}var ct;if(Eg)e:{switch(o){case"compositionstart":var wt="onCompositionStart";break e;case"compositionend":wt="onCompositionEnd";break e;case"compositionupdate":wt="onCompositionUpdate";break e}wt=void 0}else oc?xw(o,l)&&(wt="onCompositionEnd"):o==="keydown"&&l.keyCode===229&&(wt="onCompositionStart");wt&&(Sw&&l.locale!=="ko"&&(oc||wt!=="onCompositionStart"?wt==="onCompositionEnd"&&oc&&(ct=vw()):(qa=be,yg="value"in qa?qa.value:qa.textContent,oc=!0)),Be=Pf(de,wt),0<Be.length&&(wt=new bw(wt,o,null,l,be),xe.push({event:wt,listeners:Be}),ct?wt.data=ct:(ct=Tw(l),ct!==null&&(wt.data=ct)))),(ct=v3?y3(o,l):_3(o,l))&&(wt=Pf(de,"onBeforeInput"),0<wt.length&&(Be=new bw("onBeforeInput","beforeinput",null,l,be),xe.push({event:Be,listeners:wt}),Be.data=ct)),u5(xe,o,de,l,be)}uR(xe,s)})}function iu(o,s,l){return{instance:o,listener:s,currentTarget:l}}function Pf(o,s){for(var l=s+"Capture",h=[];o!==null;){var v=o,_=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||_===null||(v=Cl(o,l),v!=null&&h.unshift(iu(o,v,_)),v=Cl(o,s),v!=null&&h.push(iu(o,v,_))),o.tag===3)return h;o=o.return}return[]}function p5(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function fR(o,s,l,h,v){for(var _=s._reactName,k=[];l!==null&&l!==h;){var j=l,Y=j.alternate,de=j.stateNode;if(j=j.tag,Y!==null&&Y===h)break;j!==5&&j!==26&&j!==27||de===null||(Y=de,v?(de=Cl(l,_),de!=null&&k.unshift(iu(l,de,Y))):v||(de=Cl(l,_),de!=null&&k.push(iu(l,de,Y)))),l=l.return}k.length!==0&&o.push({event:s,listeners:k})}var m5=/\r\n?/g,g5=/\u0000|\uFFFD/g;function hR(o){return(typeof o=="string"?o:""+o).replace(m5,`
|
|
10
|
-
`).replace(g5,"")}function pR(o,s){return s=hR(s),hR(o)===s}function Ft(o,s,l,h,v,_){switch(l){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||tc(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&tc(o,""+h);break;case"className":jd(o,"class",h);break;case"tabIndex":jd(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":jd(o,l,h);break;case"style":pw(o,h,_);break;case"data":if(s!=="object"){jd(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||l!=="href")){o.removeAttribute(l);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(l);break}h=Ud(""+h),o.setAttribute(l,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(l,"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 _=="function"&&(l==="formAction"?(s!=="input"&&Ft(o,s,"name",v.name,v,null),Ft(o,s,"formEncType",v.formEncType,v,null),Ft(o,s,"formMethod",v.formMethod,v,null),Ft(o,s,"formTarget",v.formTarget,v,null)):(Ft(o,s,"encType",v.encType,v,null),Ft(o,s,"method",v.method,v,null),Ft(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(l);break}h=Ud(""+h),o.setAttribute(l,h);break;case"onClick":h!=null&&(o.onclick=la);break;case"onScroll":h!=null&&yt("scroll",o);break;case"onScrollEnd":h!=null&&yt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=l}}break;case"multiple":o.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":o.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){o.removeAttribute("xlink:href");break}l=Ud(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,""+h):o.removeAttribute(l);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":h&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,""):o.removeAttribute(l);break;case"capture":case"download":h===!0?o.setAttribute(l,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,h):o.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(l,h):o.removeAttribute(l);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(l):o.setAttribute(l,h);break;case"popover":yt("beforetoggle",o),yt("toggle",o),Ld(o,"popover",h);break;case"xlinkActuate":ca(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ca(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ca(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ca(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ca(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ca(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ca(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ca(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ca(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Ld(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=qP.get(l)||l,Ld(o,l,h))}}function Jv(o,s,l,h,v,_){switch(l){case"style":pw(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=l}}break;case"children":typeof h=="string"?tc(o,h):(typeof h=="number"||typeof h=="bigint")&&tc(o,""+h);break;case"onScroll":h!=null&&yt("scroll",o);break;case"onScrollEnd":h!=null&&yt("scrollend",o);break;case"onClick":h!=null&&(o.onclick=la);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!aw.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(v=l.endsWith("Capture"),s=l.slice(2,v?l.length-7:void 0),_=o[vr]||null,_=_!=null?_[l]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(l in o?o[l]=null:o.hasAttribute(l)&&o.removeAttribute(l)),o.addEventListener(s,h,v);break e}l in o?o[l]=h:h===!0?o.setAttribute(l,""):Ld(o,l,h)}}}function Hn(o,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":yt("error",o),yt("load",o);var h=!1,v=!1,_;for(_ in l)if(l.hasOwnProperty(_)){var k=l[_];if(k!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Ft(o,s,_,k,l,null)}}v&&Ft(o,s,"srcSet",l.srcSet,l,null),h&&Ft(o,s,"src",l.src,l,null);return;case"input":yt("invalid",o);var j=_=k=v=null,Y=null,de=null;for(h in l)if(l.hasOwnProperty(h)){var be=l[h];if(be!=null)switch(h){case"name":v=be;break;case"type":k=be;break;case"checked":Y=be;break;case"defaultChecked":de=be;break;case"value":_=be;break;case"defaultValue":j=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,s));break;default:Ft(o,s,h,be,l,null)}}uw(o,_,j,Y,de,k,v,!1);return;case"select":yt("invalid",o),h=k=_=null;for(v in l)if(l.hasOwnProperty(v)&&(j=l[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":k=j;break;case"multiple":h=j;default:Ft(o,s,v,j,l,null)}s=_,l=k,o.multiple=!!h,s!=null?ec(o,!!h,s,!1):l!=null&&ec(o,!!h,l,!0);return;case"textarea":yt("invalid",o),_=v=h=null;for(k in l)if(l.hasOwnProperty(k)&&(j=l[k],j!=null))switch(k){case"value":h=j;break;case"defaultValue":v=j;break;case"children":_=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:Ft(o,s,k,j,l,null)}fw(o,h,v,_);return;case"option":for(Y in l)l.hasOwnProperty(Y)&&(h=l[Y],h!=null)&&(Y==="selected"?o.selected=h&&typeof h!="function"&&typeof h!="symbol":Ft(o,s,Y,h,l,null));return;case"dialog":yt("beforetoggle",o),yt("toggle",o),yt("cancel",o),yt("close",o);break;case"iframe":case"object":yt("load",o);break;case"video":case"audio":for(h=0;h<su.length;h++)yt(su[h],o);break;case"image":yt("error",o),yt("load",o);break;case"details":yt("toggle",o);break;case"embed":case"source":case"link":yt("error",o),yt("load",o);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 l)if(l.hasOwnProperty(de)&&(h=l[de],h!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Ft(o,s,de,h,l,null)}return;default:if(hg(s)){for(be in l)l.hasOwnProperty(be)&&(h=l[be],h!==void 0&&Jv(o,s,be,h,l,void 0));return}}for(j in l)l.hasOwnProperty(j)&&(h=l[j],h!=null&&Ft(o,s,j,h,l,null))}function v5(o,s,l,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,_=null,k=null,j=null,Y=null,de=null,be=null;for(ge in l){var xe=l[ge];if(l.hasOwnProperty(ge)&&xe!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":Y=xe;default:h.hasOwnProperty(ge)||Ft(o,s,ge,null,h,xe)}}for(var he in h){var ge=h[he];if(xe=l[he],h.hasOwnProperty(he)&&(ge!=null||xe!=null))switch(he){case"type":_=ge;break;case"name":v=ge;break;case"checked":de=ge;break;case"defaultChecked":be=ge;break;case"value":k=ge;break;case"defaultValue":j=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,s));break;default:ge!==xe&&Ft(o,s,he,ge,h,xe)}}dg(o,k,j,Y,de,be,_,v);return;case"select":ge=k=j=he=null;for(_ in l)if(Y=l[_],l.hasOwnProperty(_)&&Y!=null)switch(_){case"value":break;case"multiple":ge=Y;default:h.hasOwnProperty(_)||Ft(o,s,_,null,h,Y)}for(v in h)if(_=h[v],Y=l[v],h.hasOwnProperty(v)&&(_!=null||Y!=null))switch(v){case"value":he=_;break;case"defaultValue":j=_;break;case"multiple":k=_;default:_!==Y&&Ft(o,s,v,_,h,Y)}s=j,l=k,h=ge,he!=null?ec(o,!!l,he,!1):!!h!=!!l&&(s!=null?ec(o,!!l,s,!0):ec(o,!!l,l?[]:"",!1));return;case"textarea":ge=he=null;for(j in l)if(v=l[j],l.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Ft(o,s,j,null,h,v)}for(k in h)if(v=h[k],_=l[k],h.hasOwnProperty(k)&&(v!=null||_!=null))switch(k){case"value":he=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&Ft(o,s,k,v,h,_)}dw(o,he,ge);return;case"option":for(var Ue in l)he=l[Ue],l.hasOwnProperty(Ue)&&he!=null&&!h.hasOwnProperty(Ue)&&(Ue==="selected"?o.selected=!1:Ft(o,s,Ue,null,h,he));for(Y in h)he=h[Y],ge=l[Y],h.hasOwnProperty(Y)&&he!==ge&&(he!=null||ge!=null)&&(Y==="selected"?o.selected=he&&typeof he!="function"&&typeof he!="symbol":Ft(o,s,Y,he,h,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 Ze in l)he=l[Ze],l.hasOwnProperty(Ze)&&he!=null&&!h.hasOwnProperty(Ze)&&Ft(o,s,Ze,null,h,he);for(de in h)if(he=h[de],ge=l[de],h.hasOwnProperty(de)&&he!==ge&&(he!=null||ge!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,s));break;default:Ft(o,s,de,he,h,ge)}return;default:if(hg(s)){for(var Bt in l)he=l[Bt],l.hasOwnProperty(Bt)&&he!==void 0&&!h.hasOwnProperty(Bt)&&Jv(o,s,Bt,void 0,h,he);for(be in h)he=h[be],ge=l[be],!h.hasOwnProperty(be)||he===ge||he===void 0&&ge===void 0||Jv(o,s,be,he,h,ge);return}}for(var se in l)he=l[se],l.hasOwnProperty(se)&&he!=null&&!h.hasOwnProperty(se)&&Ft(o,s,se,null,h,he);for(xe in h)he=h[xe],ge=l[xe],!h.hasOwnProperty(xe)||he===ge||he==null&&ge==null||Ft(o,s,xe,he,h,ge)}function mR(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function y5(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,l=performance.getEntriesByType("resource"),h=0;h<l.length;h++){var v=l[h],_=v.transferSize,k=v.initiatorType,j=v.duration;if(_&&j&&mR(k)){for(k=0,j=v.responseEnd,h+=1;h<l.length;h++){var Y=l[h],de=Y.startTime;if(de>j)break;var be=Y.transferSize,xe=Y.initiatorType;be&&mR(xe)&&(Y=Y.responseEnd,k+=be*(Y<j?1:(j-de)/(Y-de)))}if(--h,s+=8*(_+k)/(v.duration/1e3),o++,10<o)break}}if(0<o)return s/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var ey=null,ty=null;function Df(o){return o.nodeType===9?o:o.ownerDocument}function gR(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vR(o,s){if(o===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&s==="foreignObject"?0:o}function ny(o,s){return o==="textarea"||o==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ry=null;function _5(){var o=window.event;return o&&o.type==="popstate"?o===ry?!1:(ry=o,!0):(ry=null,!1)}var yR=typeof setTimeout=="function"?setTimeout:void 0,b5=typeof clearTimeout=="function"?clearTimeout:void 0,_R=typeof Promise=="function"?Promise:void 0,w5=typeof queueMicrotask=="function"?queueMicrotask:typeof _R<"u"?function(o){return _R.resolve(null).then(o).catch(S5)}:yR;function S5(o){setTimeout(function(){throw o})}function is(o){return o==="head"}function bR(o,s){var l=s,h=0;do{var v=l.nextSibling;if(o.removeChild(l),v&&v.nodeType===8)if(l=v.data,l==="/$"||l==="/&"){if(h===0){o.removeChild(v),Nc(s);return}h--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")h++;else if(l==="html")cu(o.ownerDocument.documentElement);else if(l==="head"){l=o.ownerDocument.head,cu(l);for(var _=l.firstChild;_;){var k=_.nextSibling,j=_.nodeName;_[Tl]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||l.removeChild(_),_=k}}else l==="body"&&cu(o.ownerDocument.body);l=v}while(l);Nc(s)}function wR(o,s){var l=o;o=0;do{var h=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),h&&h.nodeType===8)if(l=h.data,l==="/$"){if(o===0)break;o--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||o++;l=h}while(l)}function oy(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":oy(l),lg(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}o.removeChild(l)}}function E5(o,s,l,h){for(;o.nodeType===1;){var v=l;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[Tl])switch(s){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(_=o.getAttribute("rel"),_==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(_!==v.rel||o.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||o.getAttribute("title")!==(v.title==null?null:v.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(_=o.getAttribute("src"),(_!==(v.src==null?null:v.src)||o.getAttribute("type")!==(v.type==null?null:v.type)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&_&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(s==="input"&&o.type==="hidden"){var _=v.name==null?null:""+v.name;if(v.type==="hidden"&&o.getAttribute("name")===_)return o}else return o;if(o=io(o.nextSibling),o===null)break}return null}function R5(o,s,l){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=io(o.nextSibling),o===null))return null;return o}function SR(o,s){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!s||(o=io(o.nextSibling),o===null))return null;return o}function ay(o){return o.data==="$?"||o.data==="$~"}function sy(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function x5(o,s){var l=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||l.readyState!=="loading")s();else{var h=function(){s(),l.removeEventListener("DOMContentLoaded",h)};l.addEventListener("DOMContentLoaded",h),o._reactRetry=h}}function io(o){for(;o!=null;o=o.nextSibling){var s=o.nodeType;if(s===1||s===3)break;if(s===8){if(s=o.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return o}var iy=null;function ER(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var l=o.data;if(l==="/$"||l==="/&"){if(s===0)return io(o.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}o=o.nextSibling}return null}function RR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var l=o.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return o;s--}else l!=="/$"&&l!=="/&"||s++}o=o.previousSibling}return null}function xR(o,s,l){switch(s=Df(l),o){case"html":if(o=s.documentElement,!o)throw Error(r(452));return o;case"head":if(o=s.head,!o)throw Error(r(453));return o;case"body":if(o=s.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function cu(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);lg(o)}var co=new Map,TR=new Set;function Lf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var xa=X.d;X.d={f:T5,r:O5,D:C5,C:A5,L:I5,m:k5,X:M5,S:N5,M:P5};function T5(){var o=xa.f(),s=Of();return o||s}function O5(o){var s=Qi(o);s!==null&&s.tag===5&&s.type==="form"?BS(s):xa.r(o)}var Ac=typeof document>"u"?null:document;function OR(o,s,l){var h=Ac;if(h&&typeof s=="string"&&s){var v=eo(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof l=="string"&&(v+='[crossorigin="'+l+'"]'),TR.has(v)||(TR.add(v),o={rel:o,crossOrigin:l,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),Hn(s,"link",o),Mn(s),h.head.appendChild(s)))}}function C5(o){xa.D(o),OR("dns-prefetch",o,null)}function A5(o,s){xa.C(o,s),OR("preconnect",o,s)}function I5(o,s,l){xa.L(o,s,l);var h=Ac;if(h&&o&&s){var v='link[rel="preload"][as="'+eo(s)+'"]';s==="image"&&l&&l.imageSrcSet?(v+='[imagesrcset="'+eo(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(v+='[imagesizes="'+eo(l.imageSizes)+'"]')):v+='[href="'+eo(o)+'"]';var _=v;switch(s){case"style":_=Ic(o);break;case"script":_=kc(o)}co.has(_)||(o=p({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:o,as:s},l),co.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(lu(_))||s==="script"&&h.querySelector(uu(_))||(s=h.createElement("link"),Hn(s,"link",o),Mn(s),h.head.appendChild(s)))}}function k5(o,s){xa.m(o,s);var l=Ac;if(l&&o){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+eo(h)+'"][href="'+eo(o)+'"]',_=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=kc(o)}if(!co.has(_)&&(o=p({rel:"modulepreload",href:o},s),co.set(_,o),l.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(uu(_)))return}h=l.createElement("link"),Hn(h,"link",o),Mn(h),l.head.appendChild(h)}}}function N5(o,s,l){xa.S(o,s,l);var h=Ac;if(h&&o){var v=Xi(h).hoistableStyles,_=Ic(o);s=s||"default";var k=v.get(_);if(!k){var j={loading:0,preload:null};if(k=h.querySelector(lu(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},l),(l=co.get(_))&&cy(o,l);var Y=k=h.createElement("link");Mn(Y),Hn(Y,"link",o),Y._p=new Promise(function(de,be){Y.onload=de,Y.onerror=be}),Y.addEventListener("load",function(){j.loading|=1}),Y.addEventListener("error",function(){j.loading|=2}),j.loading|=4,jf(k,s,h)}k={type:"stylesheet",instance:k,count:1,state:j},v.set(_,k)}}}function M5(o,s){xa.X(o,s);var l=Ac;if(l&&o){var h=Xi(l).hoistableScripts,v=kc(o),_=h.get(v);_||(_=l.querySelector(uu(v)),_||(o=p({src:o,async:!0},s),(s=co.get(v))&&ly(o,s),_=l.createElement("script"),Mn(_),Hn(_,"link",o),l.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function P5(o,s){xa.M(o,s);var l=Ac;if(l&&o){var h=Xi(l).hoistableScripts,v=kc(o),_=h.get(v);_||(_=l.querySelector(uu(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=co.get(v))&&ly(o,s),_=l.createElement("script"),Mn(_),Hn(_,"link",o),l.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function CR(o,s,l,h){var v=(v=Q.current)?Lf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=Ic(l.href),l=Xi(v).hoistableStyles,h=l.get(s),h||(h={type:"style",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){o=Ic(l.href);var _=Xi(v).hoistableStyles,k=_.get(o);if(k||(v=v.ownerDocument||v,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(o,k),(_=v.querySelector(lu(o)))&&!_._p&&(k.instance=_,k.state.loading=5),co.has(o)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},co.set(o,l),_||D5(v,o,l,k.state))),s&&h===null)throw Error(r(528,""));return k}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=kc(l),l=Xi(v).hoistableScripts,h=l.get(s),h||(h={type:"script",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Ic(o){return'href="'+eo(o)+'"'}function lu(o){return'link[rel="stylesheet"]['+o+"]"}function AR(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function D5(o,s,l,h){o.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=o.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),Hn(s,"link",l),Mn(s),o.head.appendChild(s))}function kc(o){return'[src="'+eo(o)+'"]'}function uu(o){return"script[async]"+o}function IR(o,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+eo(l.href)+'"]');if(h)return s.instance=h,Mn(h),h;var v=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),Mn(h),Hn(h,"style",v),jf(h,l.precedence,o),s.instance=h;case"stylesheet":v=Ic(l.href);var _=o.querySelector(lu(v));if(_)return s.state.loading|=4,s.instance=_,Mn(_),_;h=AR(l),(v=co.get(v))&&cy(h,v),_=(o.ownerDocument||o).createElement("link"),Mn(_);var k=_;return k._p=new Promise(function(j,Y){k.onload=j,k.onerror=Y}),Hn(_,"link",h),s.state.loading|=4,jf(_,l.precedence,o),s.instance=_;case"script":return _=kc(l.src),(v=o.querySelector(uu(_)))?(s.instance=v,Mn(v),v):(h=l,(v=co.get(_))&&(h=p({},l),ly(h,v)),o=o.ownerDocument||o,v=o.createElement("script"),Mn(v),Hn(v,"link",h),o.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,jf(h,l.precedence,o));return s.instance}function jf(o,s,l){for(var h=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,_=v,k=0;k<h.length;k++){var j=h[k];if(j.dataset.precedence===s)_=j;else if(_!==v)break}_?_.parentNode.insertBefore(o,_.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(o,s.firstChild))}function cy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function ly(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var $f=null;function kR(o,s,l){if($f===null){var h=new Map,v=$f=new Map;v.set(l,h)}else v=$f,h=v.get(l),h||(h=new Map,v.set(l,h));if(h.has(o))return h;for(h.set(o,null),l=l.getElementsByTagName(o),v=0;v<l.length;v++){var _=l[v];if(!(_[Tl]||_[Vn]||o==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var k=_.getAttribute(s)||"";k=o+k;var j=h.get(k);j?j.push(_):h.set(k,[_])}}return h}function NR(o,s,l){o=o.ownerDocument||o,o.head.insertBefore(l,s==="title"?o.querySelector("head > title"):null)}function L5(o,s,l){if(l===1||s.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(o=s.disabled,typeof s.precedence=="string"&&o==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function MR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function j5(o,s,l,h){if(l.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var v=Ic(h.href),_=s.querySelector(lu(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=Uf.bind(o),s.then(o,o)),l.state.loading|=4,l.instance=_,Mn(_);return}_=s.ownerDocument||s,h=AR(h),(v=co.get(v))&&cy(h,v),_=_.createElement("link"),Mn(_);var k=_;k._p=new Promise(function(j,Y){k.onload=j,k.onerror=Y}),Hn(_,"link",h),l.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(o.count++,l=Uf.bind(o),s.addEventListener("load",l),s.addEventListener("error",l))}}var uy=0;function $5(o,s){return o.stylesheets&&o.count===0&&Vf(o,o.stylesheets),0<o.count||0<o.imgCount?function(l){var h=setTimeout(function(){if(o.stylesheets&&Vf(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&uy===0&&(uy=62500*y5());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Vf(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>uy?50:800)+s);return o.unsuspend=l,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Uf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vf(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var zf=null;function Vf(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,zf=new Map,s.forEach(U5,o),zf=null,Uf.call(o))}function U5(o,s){if(!(s.state.loading&4)){var l=zf.get(o);if(l)var h=l.get(null);else{l=new Map,zf.set(o,l);for(var v=o.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<v.length;_++){var k=v[_];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(l.set(k.dataset.precedence,k),h=k)}h&&l.set(null,h)}v=s.instance,k=v.getAttribute("data-precedence"),_=l.get(k)||h,_===h&&l.set(null,v),l.set(k,v),this.count++,h=Uf.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),_?_.parentNode.insertBefore(v,_.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(v,o.firstChild)),s.state.loading|=4}}var du={$$typeof:T,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function z5(o,s,l,h,v,_,k,j,Y){this.tag=1,this.containerInfo=o,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=Fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.hiddenUpdates=Fa(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function PR(o,s,l,h,v,_,k,j,Y,de,be,xe){return o=new z5(o,s,l,k,Y,de,be,xe,j),s=1,_===!0&&(s|=24),_=Mr(3,null,null,s),o.current=_,_.stateNode=o,s=Bg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:l,cache:s},Zg(_),o}function DR(o){return o?(o=cc,o):cc}function LR(o,s,l,h,v,_){v=DR(v),h.context===null?h.context=v:h.pendingContext=v,h=Ya(s),h.payload={element:l},_=_===void 0?null:_,_!==null&&(h.callback=_),l=Qa(o,h,s),l!==null&&(Er(l,o,s),Bl(l,o,s))}function jR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var l=o.retryLane;o.retryLane=l!==0&&l<s?l:s}}function dy(o,s){jR(o,s),(o=o.alternate)&&jR(o,s)}function $R(o){if(o.tag===13||o.tag===31){var s=ei(o,67108864);s!==null&&Er(s,o,67108864),dy(o,67108864)}}function UR(o){if(o.tag===13||o.tag===31){var s=$r();s=Ki(s);var l=ei(o,s);l!==null&&Er(l,o,s),dy(o,s)}}var Ff=!0;function V5(o,s,l,h){var v=F.T;F.T=null;var _=X.p;try{X.p=2,fy(o,s,l,h)}finally{X.p=_,F.T=v}}function F5(o,s,l,h){var v=F.T;F.T=null;var _=X.p;try{X.p=8,fy(o,s,l,h)}finally{X.p=_,F.T=v}}function fy(o,s,l,h){if(Ff){var v=hy(h);if(v===null)Xv(o,s,h,Bf,l),VR(o,h);else if(q5(v,o,s,l,h))h.stopPropagation();else if(VR(o,h),s&4&&-1<B5.indexOf(o)){for(;v!==null;){var _=Qi(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var k=Fo(_.pendingLanes);if(k!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;k;){var Y=1<<31-kn(k);j.entanglements[1]|=Y,k&=~Y}Go(_),(Nt&6)===0&&(xf=Se()+500,au(0))}}break;case 31:case 13:j=ei(_,2),j!==null&&Er(j,_,2),Of(),dy(_,2)}if(_=hy(h),_===null&&Xv(o,s,h,Bf,l),_===v)break;v=_}v!==null&&h.stopPropagation()}else Xv(o,s,h,null,l)}}function hy(o){return o=mg(o),py(o)}var Bf=null;function py(o){if(Bf=null,o=Yi(o),o!==null){var s=i(o);if(s===null)o=null;else{var l=s.tag;if(l===13){if(o=c(s),o!==null)return o;o=null}else if(l===31){if(o=u(s),o!==null)return o;o=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return Bf=o,null}function zR(o){switch(o){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(Te()){case Re:return 2;case Ne:return 8;case ot:case it:return 32;case Dt:return 268435456;default:return 32}default:return 32}}var my=!1,cs=null,ls=null,us=null,fu=new Map,hu=new Map,ds=[],B5="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 VR(o,s){switch(o){case"focusin":case"focusout":cs=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":us=null;break;case"pointerover":case"pointerout":fu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hu.delete(s.pointerId)}}function pu(o,s,l,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=Qi(s),s!==null&&$R(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function q5(o,s,l,h,v){switch(s){case"focusin":return cs=pu(cs,o,s,l,h,v),!0;case"dragenter":return ls=pu(ls,o,s,l,h,v),!0;case"mouseover":return us=pu(us,o,s,l,h,v),!0;case"pointerover":var _=v.pointerId;return fu.set(_,pu(fu.get(_)||null,o,s,l,h,v)),!0;case"gotpointercapture":return _=v.pointerId,hu.set(_,pu(hu.get(_)||null,o,s,l,h,v)),!0}return!1}function FR(o){var s=Yi(o.target);if(s!==null){var l=i(s);if(l!==null){if(s=l.tag,s===13){if(s=c(l),s!==null){o.blockedOn=s,nw(o.priority,function(){UR(l)});return}}else if(s===31){if(s=u(l),s!==null){o.blockedOn=s,nw(o.priority,function(){UR(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){o.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}o.blockedOn=null}function qf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var l=hy(o.nativeEvent);if(l===null){l=o.nativeEvent;var h=new l.constructor(l.type,l);pg=h,l.target.dispatchEvent(h),pg=null}else return s=Qi(l),s!==null&&$R(s),o.blockedOn=l,!1;s.shift()}return!0}function BR(o,s,l){qf(o)&&l.delete(s)}function H5(){my=!1,cs!==null&&qf(cs)&&(cs=null),ls!==null&&qf(ls)&&(ls=null),us!==null&&qf(us)&&(us=null),fu.forEach(BR),hu.forEach(BR)}function Hf(o,s){o.blockedOn===s&&(o.blockedOn=null,my||(my=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,H5)))}var Gf=null;function qR(o){Gf!==o&&(Gf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Gf===o&&(Gf=null);for(var s=0;s<o.length;s+=3){var l=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(py(h||l)===null)continue;break}var _=Qi(l);_!==null&&(o.splice(s,3),s-=3,hv(_,{pending:!0,data:v,method:l.method,action:h},h,v))}}))}function Nc(o){function s(Y){return Hf(Y,o)}cs!==null&&Hf(cs,o),ls!==null&&Hf(ls,o),us!==null&&Hf(us,o),fu.forEach(s),hu.forEach(s);for(var l=0;l<ds.length;l++){var h=ds[l];h.blockedOn===o&&(h.blockedOn=null)}for(;0<ds.length&&(l=ds[0],l.blockedOn===null);)FR(l),l.blockedOn===null&&ds.shift();if(l=(o.ownerDocument||o).$$reactFormReplay,l!=null)for(h=0;h<l.length;h+=3){var v=l[h],_=l[h+1],k=v[vr]||null;if(typeof _=="function")k||qR(l);else if(k){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,k=_[vr]||null)j=k.formAction;else if(py(v)!==null)continue}else j=k.action;typeof j=="function"?l[h+1]=j:(l.splice(h,3),h-=3),qR(l)}}}function HR(){function o(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(k){return v=k})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),h||setTimeout(l,20)}function l(){if(!h&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function gy(o){this._internalRoot=o}Zf.prototype.render=gy.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var l=s.current,h=$r();LR(l,h,o,s,null,null)},Zf.prototype.unmount=gy.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;LR(o.current,2,null,o,null,null),Of(),s[Wi]=null}};function Zf(o){this._internalRoot=o}Zf.prototype.unstable_scheduleHydration=function(o){if(o){var s=ig();o={blockedOn:null,target:o,priority:s};for(var l=0;l<ds.length&&s!==0&&s<ds[l].priority;l++);ds.splice(l,0,o),l===0&&FR(o)}};var GR=t.version;if(GR!=="19.2.4")throw Error(r(527,GR,"19.2.4"));X.findDOMNode=function(o){var s=o._reactInternals;if(s===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(s),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var G5={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kf.isDisabled&&Kf.supportsFiber)try{Un=Kf.inject(G5),en=Kf}catch{}}return gu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var l=!1,h="",v=JS,_=eE,k=tE;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(k=s.onRecoverableError)),s=PR(o,1,!1,null,null,l,h,null,v,_,k,HR),o[Wi]=s.current,Qv(o),new gy(s)},gu.hydrateRoot=function(o,s,l){if(!a(o))throw Error(r(299));var h=!1,v="",_=JS,k=eE,j=tE,Y=null;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onUncaughtError!==void 0&&(_=l.onUncaughtError),l.onCaughtError!==void 0&&(k=l.onCaughtError),l.onRecoverableError!==void 0&&(j=l.onRecoverableError),l.formState!==void 0&&(Y=l.formState)),s=PR(o,1,!0,s,l??null,h,v,Y,_,k,j,HR),s.context=DR(null),l=s.current,h=$r(),h=Ki(h),v=Ya(h),v.callback=null,Qa(l,v,h),l=h,s.current.lanes=l,tn(s,l),Go(s),o[Wi]=s.current,Qv(o),new Zf(s)},gu.version="19.2.4",gu}var rx;function oD(){if(rx)return yy.exports;rx=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(),yy.exports=rD(),yy.exports}var aD=oD(),A=zs();const le=ja(A),lb=K5({__proto__:null,default:le},[A]);var Ey={exports:{}},Ry={};var ox;function sD(){if(ox)return Ry;ox=1;var e=zs().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Ry.c=function(t){return e.H.useMemoCache(t)},Ry}var ax;function iD(){return ax||(ax=1,Ey.exports=sD()),Ey.exports}var $i=iD(),md=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(){}},cD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},lD=class{#e=cD;#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)}},Ei=new lD;function uD(e){setTimeout(e,0)}var Ii=typeof window>"u"||"Deno"in globalThis;function Or(){}function dD(e,t){return typeof e=="function"?e(t):e}function H0(e){return typeof e=="number"&&e>=0&&e!==1/0}function WC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Cs(e,t){return typeof e=="function"?e(t):e}function ho(e,t){return typeof e=="function"?e(t):e}function sx(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:c,stale:u}=e;if(c){if(r){if(t.queryHash!==ub(c,t.options))return!1}else if(!Qu(t.queryKey,c))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||i&&!i(t))}function ix(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Yu(t.options.mutationKey)!==Yu(i))return!1}else if(!Qu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function ub(e,t){return(t?.queryKeyHashFn||Yu)(e)}function Yu(e){return JSON.stringify(e,(t,n)=>Z0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Qu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Qu(e[n],t[n])):!1}var fD=Object.prototype.hasOwnProperty;function YC(e,t){if(e===t)return e;const n=cx(e)&&cx(t);if(!n&&!(Z0(e)&&Z0(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),c=i.length,u=n?new Array(c):{};let d=0;for(let f=0;f<c;f++){const m=n?f:i[f],p=e[m],g=t[m];if(p===g){u[m]=p,(n?f<a:fD.call(e,m))&&d++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[m]=g;continue}const y=YC(p,g);u[m]=y,y===p&&d++}return a===c&&d===a?e:u}function G0(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 cx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Z0(e){if(!lx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!lx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function lx(e){return Object.prototype.toString.call(e)==="[object Object]"}function hD(e){return new Promise(t=>{Ei.setTimeout(t,e)})}function K0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?YC(e,t):t}function Soe(e){return e}function pD(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function mD(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var db=Symbol();function QC(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===db?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gD(e,t){return typeof e=="function"?e(...t):!!e}var vD=class extends md{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ii&&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"}},fb=new vD;function W0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var yD=uD;function _D(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=yD;const i=u=>{t?e.push(u):a(()=>{n(u)})},c=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||c()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var Kn=_D(),bD=class extends md{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ii&&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}},Ep=new bD;function wD(e){return Math.min(1e3*2**e,3e4)}function XC(e){return(e??"online")==="online"?Ep.isOnline():!0}var Y0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function JC(e){let t=!1,n=0,r;const a=W0(),i=()=>a.status!=="pending",c=S=>{if(!i()){const w=new Y0(S);g(w),e.onCancel?.(w)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>fb.isFocused()&&(e.networkMode==="always"||Ep.isOnline())&&e.canRun(),m=()=>XC(e.networkMode)&&e.canRun(),p=S=>{i()||(r?.(),a.resolve(S))},g=S=>{i()||(r?.(),a.reject(S))},y=()=>new Promise(S=>{r=w=>{(i()||f())&&S(w)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),b=()=>{if(i())return;let S;const w=n===0?e.initialPromise:void 0;try{S=w??e.fn()}catch(x){S=Promise.reject(x)}Promise.resolve(S).then(p).catch(x=>{if(i())return;const E=e.retry??(Ii?0:3),T=e.retryDelay??wD,O=typeof T=="function"?T(n,x):T,C=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,x);if(t||!C){g(x);return}n++,e.onFail?.(n,x),hD(O).then(()=>f()?void 0:y()).then(()=>{t?g(x):b()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?b():y().then(b),a)}}var eA=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),H0(this.gcTime)&&(this.#e=Ei.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ii?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ei.clearTimeout(this.#e),this.#e=void 0)}},SD=class extends eA{#e;#t;#n;#o;#r;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=dx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=dx(this.options);t.data!==void 0&&(this.setState(ux(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=K0(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Or).catch(Or):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ho(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===db||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Cs(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:!WC(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.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.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},a=()=>{const u=QC(this.options,t),f=(()=>{const m={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(u,f,this):u(f)},c=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:a};return r(u),u})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=JC({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:u=>{u instanceof Y0&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,d)=>{this.#a({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof Y0){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#a({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#a(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,...tA(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...ux(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Kn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function tA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ux(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dx(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 ED=class extends md{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=W0(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#l;#u;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),fx(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q0(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 ho(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&&!G0(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&hx(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||ho(this.options.enabled,this.#t)!==ho(t.enabled,this.#t)||Cs(this.options.staleTime,this.#t)!==Cs(t.staleTime,this.#t))&&this.#g();const a=this.#v();r&&(this.#t!==n||ho(this.options.enabled,this.#t)!==ho(t.enabled,this.#t)||a!==this.#c)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return xD(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}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.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.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.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Or)),t}#g(){this.#b();const e=Cs(this.options.staleTime,this.#t);if(Ii||this.#o.isStale||!H0(e))return;const n=WC(this.#o.dataUpdatedAt,e)+1;this.#l=Ei.setTimeout(()=>{this.#o.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,!(Ii||ho(this.options.enabled,this.#t)===!1||!H0(this.#c)||this.#c===0)&&(this.#u=Ei.setInterval(()=>{(this.options.refetchIntervalInBackground||fb.isFocused())&&this.#d()},this.#c))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#l&&(Ei.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(Ei.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,c=this.#i,d=e!==n?e.state:this.#n,{state:f}=e;let m={...f},p=!1,g;if(t._optimisticResults){const D=this.hasListeners(),z=!D&&fx(e,t),W=D&&hx(e,n,t,r);(z||W)&&(m={...m,...tA(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:S}=m;g=m.data;let w=!1;if(t.placeholderData!==void 0&&g===void 0&&S==="pending"){let D;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(D=a.data,w=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(S="success",g=K0(a?.data,D,t),p=!0)}if(t.select&&g!==void 0&&!w)if(a&&g===i?.data&&t.select===this.#m)g=this.#f;else try{this.#m=t.select,g=t.select(g),g=K0(a?.data,g,t),this.#f=g,this.#a=null}catch(D){this.#a=D}this.#a&&(y=this.#a,g=this.#f,b=Date.now(),S="error");const x=m.fetchStatus==="fetching",E=S==="pending",T=S==="error",O=E&&x,C=g!==void 0,N={status:S,fetchStatus:m.fetchStatus,isPending:E,isSuccess:S==="success",isError:T,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:x,isRefetching:x&&!E,isLoadingError:T&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:T&&C,isStale:hb(e,t),refetch:this.refetch,promise:this.#s,isEnabled:ho(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=V=>{N.status==="error"?V.reject(N.error):N.data!==void 0&&V.resolve(N.data)},z=()=>{const V=this.#s=N.promise=W0();D(V)},W=this.#s;switch(W.status){case"pending":e.queryHash===n.queryHash&&D(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&z();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&z();break}}return N}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),G0(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,a=typeof r=="function"?r():r;if(a==="all"||!a&&!this.#p.size)return!0;const i=new Set(a??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(c=>{const u=c;return this.#o[u]!==e[u]&&i.has(u)})};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){Kn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function RD(e,t){return ho(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function fx(e,t){return RD(e,t)||e.state.data!==void 0&&Q0(e,t,t.refetchOnMount)}function Q0(e,t,n){if(ho(t.enabled,e)!==!1&&Cs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hb(e,t)}return!1}function hx(e,t,n,r){return(e!==t||ho(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&hb(e,n)}function hb(e,t){return ho(t.enabled,e)!==!1&&e.isStaleByTime(Cs(t.staleTime,e))}function xD(e,t){return!G0(e.getCurrentResult(),t)}function px(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let m=!1;const p=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=QC(t.options,t.fetchOptions),y=async(b,S,w)=>{if(m)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return p(I),I})(),T=await g(E),{maxPages:O}=t.options,C=w?mD:pD;return{pages:C(b.pages,T,O),pageParams:C(b.pageParams,S,O)}};if(a&&i.length){const b=a==="backward",S=b?nA:X0,w={pages:i,pageParams:c},x=S(r,w);u=await y(w,x,b)}else{const b=e??i.length;do{const S=d===0?c[0]??r.initialPageParam:X0(r,u);if(d>0&&S==null)break;u=await y(u,S),d++}while(d<b)}return u};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 X0(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 nA(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Eoe(e,t){return t?X0(e,t)!=null:!1}function Roe(e,t){return!t||!e.getPreviousPageParam?!1:nA(e,t)!=null}var TD=class extends eA{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||OD(),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.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=JC({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,c)=>{this.#r({type:"failed",failureCount:i,error:c})},onPause:()=>{this.#r({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",a=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:a}),await this.#n.config.onMutate?.(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:a})}const i=await this.#o.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{throw await this.#n.config.onError?.(i,e,this.state.context,this,n),await this.options.onError?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,i,e,this.state.context,n),i}finally{this.#r({type:"error",error:i})}}finally{this.#n.runNext(this)}}#r(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),Kn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function OD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var CD=class extends md{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 TD({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=Wf(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=Wf(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=Wf(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(a=>a.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Wf(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Kn.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=>ix(t,n))}findAll(e={}){return this.getAll().filter(t=>ix(e,t))}notify(e){Kn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Kn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Or))))}};function Wf(e){return e.options.scope?.id}var AD=class extends md{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??ub(r,t);let i=this.get(a);return i||(i=new SD({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}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(){Kn.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=>sx(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>sx(e,n)):t}notify(e){Kn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Kn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Kn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ID=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new AD,this.#t=e.mutationCache||new CD,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=fb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=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(Cs(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}),i=this.#e.get(r.queryHash)?.state.data,c=dD(t,i);if(c!==void 0)return this.#e.build(this,r).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return Kn.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;Kn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Kn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Kn.batch(()=>this.#e.findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Or).catch(Or)}invalidateQueries(e,t={}){return Kn.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=Kn.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Or)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Or)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Cs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Or).catch(Or)}fetchInfiniteQuery(e){return e.behavior=px(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Or).catch(Or)}ensureInfiniteQueryData(e){return e.behavior=px(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ep.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.#o.set(Yu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Qu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Yu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Qu(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=ub(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===db&&(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()}},rA=A.createContext(void 0),kD=e=>{const t=A.useContext(rA);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ND=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),R.jsx(rA.Provider,{value:e,children:t})),oA=A.createContext(!1),MD=()=>A.useContext(oA);oA.Provider;function PD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var DD=A.createContext(PD()),LD=()=>A.useContext(DD),jD=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},$D=e=>{A.useEffect(()=>{e.clearReset()},[e])},UD=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||gD(n,[e.error,r])),zD=(e,t)=>t.state.data===void 0,VD=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},FD=(e,t)=>e.isLoading&&e.isFetching&&!t,BD=(e,t)=>e?.suspense&&t.isPending,mx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qD(e,t,n){const r=MD(),a=LD(),i=kD(n),c=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(c),c._optimisticResults=r?"isRestoring":"optimistic",VD(c),jD(c,a),$D(a);const u=!i.getQueryCache().get(c.queryHash),[d]=A.useState(()=>new t(i,c)),f=d.getOptimisticResult(c),m=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(p=>{const g=m?d.subscribe(Kn.batchCalls(p)):Or;return d.updateResult(),g},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),A.useEffect(()=>{d.setOptions(c)},[c,d]),BD(c,f))throw mx(c,d,a);if(UD({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:i.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw f.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(c,f),c.experimental_prefetchInRender&&!Ii&&FD(f,r)&&(u?mx(c,d,a):i.getQueryCache().get(c.queryHash)?.promise)?.catch(Or).finally(()=>{d.updateResult()}),c.notifyOnChangeProps?f:d.trackResult(f)}function aA(e,t){return qD({...e,enabled:!0,suspense:!0,throwOnError:zD,placeholderData:void 0},ED,t)}const sA={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],tasks:(e,t,n)=>{const r=["tasks",e];return t!==void 0&&r.push(t),t==="me"&&r.push(n??null),r},messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",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],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],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,a)=>[e,t,n,"collection",r,a],collectionList:(e,t,n,r,a)=>[e,t,n,"collection",r,"list",a],collectionListInfinite:(e,t,n,r,a)=>[e,t,n,"collection",r,"list-infinite",a],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringDashboards:e=>["monitoring","dashboards",e],monitoringDashboardDetails:(e,t)=>["monitoring","dashboard",e,t],monitoringDashboardQuery:(e,t,n,r,a)=>["monitoringDashboardQuery",e,t,n,r,a??""],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],automations:e=>["automations",e],automation:(e,t)=>["automation",e,t],automationRuns:(e,t,n)=>["automation-runs",e,t,...[...n??[]].sort()],projects:e=>["projects",e],project:(e,t)=>["project",e,t],projectById:e=>["project","byId",e],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],aiProviderCredits:(e,t)=>["ai-provider-credits",e,t]},iA=A.createContext(void 0);async function HD(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function GD(e){const t=$i.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:sA.authConfig(),queryFn:HD,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=aA(r);let i;return t[1]!==a||t[2]!==n?(i=R.jsx(iA.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function xoe(){const e=A.useContext(iA);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const el=new WeakMap,lp=new WeakMap,Rp={current:[]};let xy=!1,Uu=0;const Au=new Set,Yf=new Map;function cA(e){const t=Array.from(e).sort((n,r)=>n instanceof tl&&n.options.deps.includes(r)?1:r instanceof tl&&r.options.deps.includes(n)?-1:0);for(const n of t){if(Rp.current.includes(n))continue;Rp.current.push(n),n.recompute();const r=lp.get(n);if(r)for(const a of r){const i=el.get(a);i&&cA(i)}}}function ZD(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function KD(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function lA(e){if(Uu>0&&!Yf.has(e)&&Yf.set(e,e.prevState),Au.add(e),!(Uu>0)&&!xy)try{for(xy=!0;Au.size>0;){const t=Array.from(Au);Au.clear();for(const n of t){const r=Yf.get(n)??n.prevState;n.prevState=r,ZD(n)}for(const n of t){const r=el.get(n);r&&(Rp.current.push(n),cA(r))}for(const n of t){const r=el.get(n);if(r)for(const a of r)KD(a)}}}finally{xy=!1,Rp.current=[],Yf.clear()}}function zu(e){Uu++;try{e()}finally{if(Uu--,Uu===0){const t=Au.values().next().value;t&&lA(t)}}}function WD(e){return typeof e=="function"}class J0{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const c=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),c?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,a;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):WD(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),lA(this)}}class tl{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),a=new Array(n);for(let i=0;i<n;i++){const c=this.options.deps[i];r[i]=c.prevState,a[i]=c.state}return this.lastSeenDepValues=a,{prevDepVals:r,currDepVals:a,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,r;this.prevState=this.state;const a=this.getDepVals();this.state=this.options.fn(a),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof tl&&i.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:a}=this.getDepVals();for(let i=0;i<a.length;i++)if(a[i]!==r[i]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,a;this.listeners.add(n);const i=(a=(r=this.options).onSubscribe)==null?void 0:a.call(r,n,this);return()=>{this.listeners.delete(n),i?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof tl)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof J0){let r=el.get(n);r||(r=new Set,el.set(n,r)),r.add(this);let a=lp.get(this);a||(a=new Set,lp.set(this,a)),a.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof tl)this.unregisterFromGraph(n.options.deps);else if(n instanceof J0){const r=el.get(n);r&&r.delete(this);const a=lp.get(this);a&&a.delete(n)}}}const As="__TSR_index",gx="popstate",vx="beforeunload";function YD(e){let t=e.getLocation();const n=new Set,r=c=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:c}))},a=c=>{e.notifyOnIndexChange??!0?r(c):t=e.getLocation()},i=async({task:c,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){c();return}const m=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&m.length&&p)for(const g of m){const y=xp(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,u,d)=>{const f=t.state[As];u=yx(f+1,u),i({task:()=>{e.pushState(c,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:c,state:u})},replace:(c,u,d)=>{const f=t.state[As];u=yx(f,u),i({task:()=>{e.replaceState(c,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:c,state:u})},go:(c,u)=>{i({task:()=>{e.go(c),a({type:"GO",index:c})},navigateOpts:u,type:"GO"})},back:c=>{i({task:()=>{e.back(c?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{i({task:()=>{e.forward(c?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[As]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,c]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function yx(e,t){t||(t={});const n=pb();return{...t,key:n,__TSR_key:n,[As]:e}}function QD(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,c=D=>a=D,u=(D=>D),d=(()=>xp(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=pb();t.history.replaceState({[As]:0,key:D,__TSR_key:D},"")}let f=d(),m,p=!1,g=!1,y=!1,b=!1;const S=()=>f;let w,x;const E=()=>{w&&(N._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),N._ignoreSubscribers=!1,w=void 0,x=void 0,m=void 0)},T=(D,z,W)=>{const V=u(z);x||(m=f),f=xp(z,W),w={href:V,state:W,isPush:w?.isPush||D==="push"},x||(x=Promise.resolve().then(()=>E()))},O=D=>{f=d(),N.notify({type:D})},C=async()=>{if(g){g=!1;return}const D=d(),z=D.state[As]-f.state[As],W=z===1,V=z===-1,G=!W&&!V||p;p=!1;const U=G?"GO":V?"BACK":"FORWARD",J=G?{type:"GO",index:z}:{type:V?"BACK":"FORWARD"};if(y)y=!1;else{const ie=i();if(typeof document<"u"&&ie.length){for(const F of ie)if(await F.blockerFn({currentLocation:f,nextLocation:D,action:U})){g=!0,t.history.go(1),N.notify(J);return}}}f=d(),N.notify(J)},I=D=>{if(b){b=!1;return}let z=!1;const W=i();if(typeof document<"u"&&W.length)for(const V of W){const G=V.enableBeforeUnload??!0;if(G===!0){z=!0;break}if(typeof G=="function"&&G()===!0){z=!0;break}}if(z)return D.preventDefault(),D.returnValue=""},N=YD({getLocation:S,getLength:()=>t.history.length,pushState:(D,z)=>T("push",D,z),replaceState:(D,z)=>T("replace",D,z),back:D=>(D&&(y=!0),b=!0,t.history.back()),forward:D=>{D&&(y=!0),b=!0,t.history.forward()},go:D=>{p=!0,t.history.go(D)},createHref:D=>u(D),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(vx,I,{capture:!0}),t.removeEventListener(gx,C)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(vx,I,{capture:!0}),t.addEventListener(gx,C),t.history.pushState=function(...D){const z=n.apply(t.history,D);return N._ignoreSubscribers||O("PUSH"),z},t.history.replaceState=function(...D){const z=r.apply(t.history,D);return N._ignoreSubscribers||O("REPLACE"),z},N}function xp(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=pb();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[As]:0,key:a,__TSR_key:a}}}function pb(){return(Math.random()+1).toString(36).substring(7)}function Tp(e){return e[e.length-1]}function XD(e){return typeof e=="function"}function Ti(e,t){return XD(e)?e(t):e}const JD=Object.prototype.hasOwnProperty;function fo(e,t){if(e===t)return e;const n=t,r=wx(e)&&wx(n);if(!r&&!(Op(e)&&Op(n)))return n;const a=r?e:_x(e);if(!a)return n;const i=r?n:_x(n);if(!i)return n;const c=a.length,u=i.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:i[m],g=e[p],y=n[p];if(g===y){d[p]=g,(r?m<c:JD.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const b=fo(g,y);d[p]=b,b===g&&f++}return c===u&&f===c?e:d}function _x(e){const t=[],n=Object.getOwnPropertyNames(e);for(const a of n){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}const r=Object.getOwnPropertySymbols(e);for(const a of r){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}return t}function Op(e){if(!bx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!bx(n)||!n.hasOwnProperty("isPrototypeOf"))}function bx(e){return Object.prototype.toString.call(e)==="[object Object]"}function wx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Oi(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,a=e.length;r<a;r++)if(!Oi(e[r],t[r],n))return!1;return!0}if(Op(e)&&Op(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!r||t[c]!==void 0)&&!Oi(e[c],t[c],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&a++;let i=0;for(const c in t)if((!r||t[c]!==void 0)&&(i++,i>a||!Oi(e[c],t[c],n)))return!1;return a===i}return!1}function ll(e){let t,n;const r=new Promise((a,i)=>{t=a,n=i});return r.status="pending",r.resolve=a=>{r.status="resolved",r.value=a,t(a),e?.(a)},r.reject=a=>{r.status="rejected",n(a)},r}function e6(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 Is(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Sx(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function Ex(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=Sx(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+Sx(r?e.slice(r):e)}var t6="Invariant failed";function Ma(e,t){if(!e)throw new Error(t6)}function Cp(e){const t=new Map;let n,r;const a=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const c=t.get(i);if(c)return a(c),c.value},set(i,c){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 u=t.get(i);if(u)u.value=c,a(u);else{const d={key:i,value:c,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(i,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const ul=0,ki=1,Ni=2,Xu=3,n6=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,r6=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,o6=/^([^{]*)\{\$\}([^}]*)$/;function mb(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),a=r===-1?e.length:r,i=e.substring(t,a);if(!i||!i.includes("$"))return n[0]=ul,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n;if(i==="$"){const f=e.length;return n[0]=Ni,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=ki,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const c=i.match(o6);if(c){const m=c[1].length;return n[0]=Ni,n[1]=t+m,n[2]=t+m+1,n[3]=t+m+2,n[4]=t+m+3,n[5]=e.length,n}const u=i.match(r6);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=Xu,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+m.length,n[4]=a-p.length,n[5]=a,n}const d=i.match(n6);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=ki,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+m.length,n[4]=a-p.length,n[5]=a,n}return n[0]=ul,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function bm(e,t,n,r,a,i,c){c?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=mb(d,u,t);let g;const y=u,b=p[5];switch(u=b+1,i++,p[0]){case ul:{const w=d.substring(p[2],p[3]);if(m){const x=a.static?.get(w);if(x)g=x;else{a.static??=new Map;const E=Ju(n.fullPath??n.from);E.parent=a,E.depth=i,g=E,a.static.set(w,E)}}else{const x=w.toLowerCase(),E=a.staticInsensitive?.get(x);if(E)g=E;else{a.staticInsensitive??=new Map;const T=Ju(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(x,T)}}break}case ki:{const w=d.substring(y,p[1]),x=d.substring(p[4],b),E=m&&!!(w||x),T=w?E?w:w.toLowerCase():void 0,O=x?E?x:x.toLowerCase():void 0,C=a.dynamic?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Oy(ki,n.fullPath??n.from,E,T,O);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case Xu:{const w=d.substring(y,p[1]),x=d.substring(p[4],b),E=m&&!!(w||x),T=w?E?w:w.toLowerCase():void 0,O=x?E?x:x.toLowerCase():void 0,C=a.optional?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Oy(Xu,n.fullPath??n.from,E,T,O);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case Ni:{const w=d.substring(y,p[1]),x=d.substring(p[4],b),E=m&&!!(w||x),T=w?E?w:w.toLowerCase():void 0,O=x?E?x:x.toLowerCase():void 0,C=Oy(Ni,n.fullPath??n.from,E,T,O);g=C,C.parent=a,C.depth=i,a.wildcard??=[],a.wildcard.push(C)}}a=g}if((n.path||!n.children)&&!n.isRoot){const p=d.endsWith("/");p||(a.notFound=n),(!a.route||!a.isIndex&&p)&&(a.route=n),a.isIndex||=p}}if(n.children)for(const d of n.children)bm(e,t,d,u,a,i,c)}function Ty(e,t){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 wi(e){if(e.static)for(const t of e.static.values())wi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())wi(t);if(e.dynamic?.length){e.dynamic.sort(Ty);for(const t of e.dynamic)wi(t)}if(e.optional?.length){e.optional.sort(Ty);for(const t of e.optional)wi(t)}if(e.wildcard?.length){e.wildcard.sort(Ty);for(const t of e.wildcard)wi(t)}}function Ju(e){return{kind:ul,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Oy(e,t,n,r,a){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:a}}function a6(e,t){const n=Ju("/"),r=new Uint16Array(6);for(const a of e)bm(!1,r,a,1,n,0);wi(n),t.masksTree=n,t.flatCache=Cp(1e3)}function s6(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=gb(e,t.masksTree);return t.flatCache.set(e,r),r}function i6(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let c=a.singleCache.get(i);if(!c){c=Ju("/");const u=new Uint16Array(6);bm(t,u,{from:e},1,c,0),a.singleCache.set(i,c)}return gb(r,c,n)}function c6(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,a=t.matchCache.get(r);if(a!==void 0)return a;e||="/";const i=gb(e,t.segmentTree,n);return i&&(i.branch=f6(i.route)),t.matchCache.set(r,i),i}function l6(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function u6(e,t=!1,n){const r=Ju(e.fullPath),a=new Uint16Array(6),i={},c={};let u=0;return bm(t,a,e,1,r,0,f=>{if(n?.(f,u),Ma(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=l6(f.fullPath);(!c[m]||f.fullPath.endsWith("/"))&&(c[m]=f)}u++}),wi(r),{processedTree:{segmentTree:r,singleCache:Cp(1e3),matchCache:Cp(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:c}}function gb(e,t,n=!1){const r=e.split("/"),a=p6(e,r,t,n);if(!a)return null;const i=d6(e,r,a),c="**"in a;return c&&(i["**"]=a["**"]),{route:c?a.node.notFound??a.node.route:a.node.route,params:i}}function d6(e,t,n){const r=h6(n.node);let a=null;const i={};for(let c=0,u=0,d=0;u<r.length;c++,u++,d++){const f=r[u],m=t[c],p=d;if(m&&(d+=m.length),f.kind===ki){a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0;if(g.charCodeAt(y)===123){const S=f.suffix?.length??0,w=g.substring(y+2,g.length-S-1),x=m.substring(y,m.length-S);i[w]=decodeURIComponent(x)}else{const S=g.substring(1);i[S]=decodeURIComponent(m)}}else if(f.kind===Xu){if(n.skipped&1<<u){c--;continue}a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0,b=f.suffix?.length??0,S=g.substring(y+3,g.length-b-1),w=f.suffix||f.prefix?m.substring(y,m.length-b):m;w&&(i[S]=decodeURIComponent(w))}else if(f.kind===Ni){const g=f,y=e.substring(p+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),b=decodeURIComponent(y);i["*"]=b,i._splat=b;break}}return i}function f6(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function h6(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function p6(e,t,n,r){const a=!Tp(t),i=a&&e!=="/",c=t.length-(a?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,f=null,m=null;for(;u.length;){const p=u.pop();let{node:g,index:y,skipped:b,depth:S,statics:w,dynamics:x,optionals:E}=p;r&&g.notFound&&Qf(f,p)&&(f=p);const T=y===c;if(T){if(g.route&&(!i||g.isIndex)&&(Qf(m,p)&&(m=p),w===c&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const O=T?void 0:t[y];let C;if(g.wildcard&&Qf(d,p))for(const I of g.wildcard){const{prefix:N,suffix:D}=I;if(!(N&&(T||!(I.caseSensitive?O:C??=O.toLowerCase()).startsWith(N)))){if(D){if(T)continue;const z=t.slice(y).join("/").slice(-D.length);if((I.caseSensitive?z:z.toLowerCase())!==D)continue}d={node:I,index:y,skipped:b,depth:S,statics:w,dynamics:x,optionals:E};break}}if(g.optional){const I=b|1<<S,N=S+1;for(let D=g.optional.length-1;D>=0;D--){const z=g.optional[D];u.push({node:z,index:y,skipped:I,depth:N,statics:w,dynamics:x,optionals:E})}if(!T)for(let D=g.optional.length-1;D>=0;D--){const z=g.optional[D],{prefix:W,suffix:V}=z;if(W||V){const G=z.caseSensitive?O:C??=O.toLowerCase();if(W&&!G.startsWith(W)||V&&!G.endsWith(V))continue}u.push({node:z,index:y+1,skipped:b,depth:N,statics:w,dynamics:x,optionals:E+1})}}if(!T&&g.dynamic&&O)for(let I=g.dynamic.length-1;I>=0;I--){const N=g.dynamic[I],{prefix:D,suffix:z}=N;if(D||z){const W=N.caseSensitive?O:C??=O.toLowerCase();if(D&&!W.startsWith(D)||z&&!W.endsWith(z))continue}u.push({node:N,index:y+1,skipped:b,depth:S+1,statics:w,dynamics:x+1,optionals:E})}if(!T&&g.staticInsensitive){const I=g.staticInsensitive.get(C??=O.toLowerCase());I&&u.push({node:I,index:y+1,skipped:b,depth:S+1,statics:w+1,dynamics:x,optionals:E})}if(!T&&g.static){const I=g.static.get(O);I&&u.push({node:I,index:y+1,skipped:b,depth:S+1,statics:w+1,dynamics:x,optionals:E})}}if(m&&d)return Qf(d,m)?m:d;if(m)return m;if(d)return d;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const g=p===e.length?"/":e.slice(p);return{node:f.node,skipped:f.skipped,"**":decodeURIComponent(g)}}return null}function Qf(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.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function up(e){return vb(e.filter(t=>t!==void 0).join("/"))}function vb(e){return e.replace(/\/{2,}/g,"/")}function uA(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ci(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function dp(e){return Ci(uA(e))}function Ap(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function m6(e,t,n){return Ap(e,n)===Ap(t,n)}function g6({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let c;if(r){c=a?t:i?e:e+"\0"+t;const p=r.get(c);if(p)return p}let u;if(i)u=e.split("/");else if(a)u=t.split("/");else{for(u=e.split("/");u.length>1&&Tp(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const b=p[g];b===""?g?g===y-1&&u.push(b):u=[b]:b===".."?u.pop():b==="."||u.push(b)}}u.length>1&&(Tp(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let d,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const g=u[p];if(!g)continue;d=mb(g,0,d);const y=d[0];if(y===ul){f+=g;continue}const b=d[5],S=g.substring(0,d[1]),w=g.substring(d[4],b),x=g.substring(d[2],d[3]);y===ki?f+=S||w?`${S}{$${x}}${w}`:`$${x}`:y===Ni?f+=S||w?`${S}{$}${w}`:"$":f+=`${S}{-$${x}}${w}`}f=vb(f);const m=f||"/";return c&&r&&r.set(c,m),m}function Cy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):v6(r,n)}function Ay({path:e,params:t,decodeCharMap:n}){let r=!1;const a={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:r};const i=e.length;let c=0,u,d="";for(;c<i;){const m=c;u=mb(e,m,u);const p=u[5];if(c=p+1,m===p)continue;const g=u[0];if(g===ul){d+="/"+e.substring(m,p);continue}if(g===Ni){const y=t._splat;a._splat=y,a["*"]=y;const b=e.substring(m,u[1]),S=e.substring(u[4],p);if(!y){r=!0,(b||S)&&(d+="/"+b+S);continue}const w=Cy("_splat",t,n);d+="/"+b+w+S;continue}if(g===ki){const y=e.substring(u[2],u[3]);!r&&!(y in t)&&(r=!0),a[y]=t[y];const b=e.substring(m,u[1]),S=e.substring(u[4],p),w=Cy(y,t,n)??"undefined";d+="/"+b+w+S;continue}if(g===Xu){const y=e.substring(u[2],u[3]),b=t[y];if(b==null)continue;a[y]=b;const S=e.substring(m,u[1]),w=e.substring(u[4],p),x=Cy(y,t,n)??"";d+="/"+S+x+w;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:a,interpolatedPath:d||"/",isMissingParams:r}}function v6(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function mo(e){return!!e?.isNotFound}function y6(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Ip="tsr-scroll-restoration-v1_3",_6=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function b6(){const e=y6();if(!e)return null;const t=e.getItem(Ip);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Ti(r,n)||n,e.setItem(Ip,JSON.stringify(n)))}}const Xf=b6(),e_=e=>e.state.__TSR_key||e.href;function w6(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 kp=!1;function dA({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=c[u];kp=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const p in d){const g=d[p];if(p==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(p){const y=document.querySelector(p);y&&(y.scrollLeft=g.scrollX,y.scrollTop=g.scrollY)}}break e}const f=(i??window.location).hash.split("#",2)[1];if(f){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const g=document.getElementById(f);g&&g.scrollIntoView(p)}break e}const m={top:0,left:0,behavior:n};if(window.scrollTo(m),a)for(const p of a){if(p==="window")continue;const g=typeof p=="function"?p():document.querySelector(p);g&&g.scrollTo(m)}}kp=!1}function S6(e,t){if(!Xf&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Xf))return;e.isScrollRestorationSetup=!0,kp=!1;const r=e.options.getScrollRestorationKey||e_;window.history.scrollRestoration="manual";const a=i=>{if(kp||!e.isScrollRestoring)return;let c="";if(i.target===document||i.target===window)c="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?c=`[data-scroll-restoration-id="${d}"]`:c=w6(i.target)}const u=r(e.state.location);Xf.set(d=>{const f=d[u]||={},m=f[c]||={};if(c==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(c){const p=document.querySelector(c);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",_6(a,100),!0),e.subscribe("onRendered",i=>{const c=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(dA({storageKey:Ip,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Xf.set(u=>(u[c]||={},u)))})}function E6(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function R6(e,t=String){const n=new URLSearchParams;for(const r in e){const a=e[r];a!==void 0&&n.set(r,t(a))}return n.toString()}function Iy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function x6(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=Iy(a):Array.isArray(i)?i.push(Iy(a)):n[r]=[i,Iy(a)]}return n}const T6=C6(JSON.parse),O6=A6(JSON.stringify,JSON.parse);function C6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=x6(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function A6(e,t){const n=typeof t=="function";function r(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(n&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const i=R6(a,r);return i?`?${i}`:""}}const Fr="__root__";function Mi(e){if(e.statusCode=e.statusCode||e.code||307,!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 Do(e){return e instanceof Response&&!!e.options}const fp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},wm=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),fA=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Ma(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Ma(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,a=>({...a,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,fA(e,t))},xs=(e,t,n)=>{if(!(!Do(n)&&!mo(n))){if(Do(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=Do(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),mo(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Do(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(fA(e,n),n)}},hA=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},vu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],c=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,xs(e,e.router.getMatch(a),n);try{c.options.onError?.(n)}catch(u){n=u,xs(e,e.router.getMatch(a),n)}e.updateMatch(a,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},I6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,c=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Fr;return}if(c?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&c?.ssr==="data-only"?"data-only":y,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){a.ssr=u(d);return}if(typeof r.options.ssr!="function"){a.ssr=u(r.options.ssr);return}const{search:f,params:m}=a,p={search:Jf(f,a.searchError),params:Jf(m,a.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:Jf(y.search,y.searchError),params:Jf(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if(Is(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},pA=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const a=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!wm(e,t)&&(n.options.loader||n.options.beforeLoad||vA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{fp(e)},a);r._nonReactive.pendingTimeout=c}},k6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;pA(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&xs(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},N6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=ll(()=>{i?.resolve()});const{paramsError:c,searchError:u}=a;c&&vu(e,n,c,"PARSE_PARAMS"),u&&vu(e,n,u,"VALIDATE_SEARCH"),pA(e,t,r,a);const d=new AbortController,f=e.matches[n-1]?.id,g={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...a.__routeContext};let y=!1;const b=()=>{y||(y=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:d,context:g})))},S=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!r.options.beforeLoad){zu(()=>{b(),S()});return}a._nonReactive.beforeLoadPromise=ll();const{search:w,params:x,cause:E}=a,T=wm(e,t),O={search:w,abortController:d,params:x,preload:T,context:g,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:T?"preload":E,matches:e.matches,...e.router.options.additionalContext},C=N=>{if(N===void 0){zu(()=>{b(),S()});return}(Do(N)||mo(N))&&(b(),vu(e,n,N,"BEFORE_LOAD")),zu(()=>{b(),e.updateMatch(t,D=>({...D,__beforeLoadContext:N,context:{...D.context,...N}})),S()})};let I;try{if(I=r.options.beforeLoad(O),Is(I))return b(),I.catch(N=>{vu(e,n,N,"BEFORE_LOAD")}).then(C)}catch(N){b(),vu(e,n,N,"BEFORE_LOAD")}C(I)},M6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=I6(e,n,t,a);if(Is(d))return d.then(u)}return u()},c=()=>N6(e,n,t,a),u=()=>{if(hA(e,n))return;const d=k6(e,n,a);return Is(d)?d.then(c):c()};return i()},Vu=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const a={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(a),n.options.scripts?.(a),n.options.headers?.(a)]).then(([i,c,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:c,styles:p}})},mA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:c,abortController:u,cause:d}=e.router.getMatch(t);let f=e.router.options.context??{};for(let p=0;p<=n;p++){const g=e.matches[p];if(!g)continue;const y=e.router.getMatch(g.id);y&&(f={...f,...y.__routeContext??{},...y.__beforeLoadContext??{}})}const m=wm(e,t);return{params:i,deps:c,preload:!!m,parentMatchPromise:a,abortController:u,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:m?"preload":d,route:r,...e.router.options.additionalContext}},Rx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&gA(r);const i=r.options.loader?.(mA(e,t,n,r)),c=r.options.loader&&Is(i);if((c||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(t,p=>({...p,isFetching:"loader"})),r.options.loader){const p=c?await i:i;xs(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=Vu(e,t,r),f=d?await d:void 0,m=a._nonReactive.minPendingPromise;m&&await m,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,p=>({...p,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(i){let c=i;const u=a._nonReactive.minPendingPromise;u&&await u,mo(i)&&await r.options.notFoundComponent?.preload?.(),xs(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){c=m,xs(e,e.router.getMatch(t),m)}const d=Vu(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:c,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const c=Vu(e,t,r);if(c){const u=await c;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}xs(e,i,a)}},P6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const c=e.router.looseRoutesById[r];if(hA(e,n)){if(e.router.isServer){const f=Vu(e,n,c);if(f){const m=await f;e.updateMatch(n,p=>({...p,...m}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&xs(e,m,p)}else{const m=Date.now()-f.updatedAt,p=wm(e,n),g=p?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,y=c.options.shouldReload,b=typeof y=="function"?y(mA(e,n,t,c)):y,S=!!p&&!e.router.state.matches.some(T=>T.id===n),w=e.router.getMatch(n);w._nonReactive.loaderPromise=ll(),S!==w.preload&&e.updateMatch(n,T=>({...T,preload:S}));const{status:x,invalid:E}=w;if(a=x==="success"&&(E||(b??m>g)),!(p&&c.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await Rx(e,n,t,c);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){Do(T)&&await e.router.navigate(T.options)}})();else if(x!=="success"||a&&e.sync)await Rx(e,n,t,c);else{const T=Vu(e,n,c);if(T){const O=await T;e.updateMatch(n,C=>({...C,...O}))}}}}const u=e.router.getMatch(n);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const d=i?u.isFetching:!1;return d!==u.isFetching||u.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):u};async function xx(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&fp(t);try{for(let a=0;a<t.matches.length;a++){const i=M6(t,a);Is(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(P6(t,a));await Promise.all(t.matchPromises);const r=fp(t);Is(r)&&await r}catch(n){if(mo(n)&&!t.preload){const r=fp(t);throw Is(r)&&await r,n}if(Do(n))throw n}return t.matches}async function gA(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of yA){const a=e.options[r]?.preload;a&&n.push(a())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Jf(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function vA(e){for(const t of yA)if(e.options[t]?.preload)return!0;return!1}const yA=["component","errorComponent","pendingComponent","notFoundComponent"];function D6(e){return{input:({url:t})=>{for(const n of e)t=_A(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=bA(e[n],t);return t}}}function L6(e){const t=dp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:c})=>{const u=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return u===a?c.pathname="/":u.startsWith(i)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=up(["/",t,c.pathname]),c)}}function _A(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 bA(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 Ai(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,a=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:a,hashChanged:i}}class j6{constructor(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.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,a=this.basepath??r?.basepath??"/",i=this.basepath===void 0,c=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=QD())),this.origin=this.options.origin,this.origin||(!this.isServer&&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,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new J0(U6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),S6(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||c!==f){this.basepath=d;const g=[];dp(d)!==""&&g.push(L6({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:D6(g),this.history&&this.updateLatestLocation(),u=!0}u&&this.__store&&(this.__store.state={...this.state,location: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{routesById:n,routesByPath:r,processedTree:a}=u6(this.routeTree,this.options.caseSensitive,(c,u)=>{c.init({originalIndex:u})});this.options.routeMasks&&a6(this.options.routeMasks,a),this.routesById=n,this.routesByPath=r,this.processedTree=a;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const a={eventType:n,fn:r};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const a=({href:d,state:f})=>{const m=new URL(d,this.origin),p=_A(this.rewrite,m),g=this.options.parseSearch(p.search),y=this.options.stringifySearch(g);p.search=y;const b=p.href.replace(p.origin,""),{pathname:S,hash:w}=p;return{href:b,publicHref:d,url:p.href,pathname:Ex(S),searchStr:y,search:fo(r?.search,g),hash:w.split("#").reverse()[0]??"",state:fo(r?.state,f)}},i=a(n),{__tempLocation:c,__tempKey:u}=i.state;if(c&&(!u||u===this.tempLocationKey)){const d=a(c);return d.state.key=i.state.key,d.state.__TSR_key=i.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:i}}return i},this.resolvePathCache=Cp(1e3),this.resolvePathWithBase=(n,r)=>g6({base:n,to:vb(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,a)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},a):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>z6({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=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const c=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(c,{_buildLocation:!0}),d=Tp(u);i.from;const f=i.unsafeRelative==="path"?c.pathname:i.from??d.fullPath,m=this.resolvePathWithBase(f,"."),p=d.search,g={...d.params},y=i.to?this.resolvePathWithBase(m,`${i.to}`):this.resolvePathWithBase(m,"."),b=i.params===!1||i.params===null?{}:(i.params??!0)===!0?g:Object.assign(g,Ti(i.params,g)),S=Ay({path:y,params:b}).interpolatedPath,w=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(b).length>0)for(const W of w){const V=W.options.params?.stringify??W.options.stringifyParams;V&&Object.assign(b,V(b))}const x=n.leaveParams?y:Ex(Ay({path:y,params:b,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const W={};w.forEach(V=>{if(V.options.validateSearch)try{Object.assign(W,t_(V.options.validateSearch,{...W,...E}))}catch{}}),E=W}E=V6({search:E,dest:i,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),E=fo(p,E);const T=this.options.stringifySearch(E),O=i.hash===!0?c.hash:i.hash?Ti(i.hash,c.hash):void 0,C=O?`#${O}`:"";let I=i.state===!0?c.state:i.state?Ti(i.state,c.state):{};I=fo(c.state,I);const N=`${x}${T}${C}`,D=new URL(N,this.origin),z=bA(this.rewrite,D);return{publicHref:z.pathname+z.search+z.hash,href:N,url:z.href,pathname:x,search:E,searchStr:T,state:I,hash:O??"",unmaskOnReload:i.unmaskOnReload}},a=(i={},c)=>{const u=r(i);let d=c?r(c):void 0;if(!d){const f={};if(this.options.routeMasks){const m=s6(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;c={from:n.from,...g,params:f},d=r(c)}}}return d&&(u.maskedLocation=d),u};return n.mask?a(n,{from:n.from,...n.mask}):a(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...a})=>{const i=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const f=Oi(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},c=Ci(this.latestLocation.href)===Ci(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=ll(()=>{u?.resolve()}),c&&i())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...m}=a;d&&(m={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[a.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:a,viewTransition:i,ignoreBlocker:c,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=xp(u,{__TSR_index:n?p:p+1});d.to=g.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 m=this.commitLocation({...f,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:a,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:n,reloadDocument:r,href:a,...i})=>{if(!r&&a)try{new URL(`${a}`),r=!0}catch{}if(r){if(a||(a=this.buildLocation({to:n,...i}).url),!i.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const d of u)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(a):window.location.href=a,Promise.resolve()}return this.buildAndCommitLocation({...i,href:a,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),a=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(dp(a(this.latestLocation.href))!==dp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),Mi({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(a=>!n.some(i=>i.id===a.id))}))},this.load=async n=>{let r,a,i;for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Ai({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Ai({resolvedLocation:f,location:d})}),await xx({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=[],p=[],g=[];zu(()=>{this.__store.setState(y=>{const b=y.matches,S=y.pendingMatches||y.matches;return m=b.filter(w=>!S.some(x=>x.id===w.id)),p=S.filter(w=>!b.some(x=>x.id===w.id)),g=S.filter(w=>b.some(x=>x.id===w.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:S,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...m.filter(w=>w.status!=="error"&&w.status!=="notFound")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[p,"onEnter"],[g,"onStay"]].forEach(([y,b])=>{y.forEach(S=>{this.looseRoutesById[S.routeId].options[b]?.(S)})})})})}})}catch(d){Do(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):mo(d)&&(a=d),this.__store.setState(f=>({...f,statusCode:r?r.status:a?404:f.matches.some(m=>m.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(u=>u.status==="error")&&(c=500),c!==void 0&&this.__store.setState(u=>({...u,statusCode:c}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,c=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Ai({resolvedLocation:c,location:i})):r.types;if(u===!1){n();return}a={update:n,types:u}}else a=n;document.startViewTransition(a)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const a=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";a&&this.__store.setState(i=>({...i,[a]:i[a]?.map(c=>c.id===n?r(c):c)}))})},this.getMatch=n=>{const r=a=>a.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=a=>n?.filter?.(a)??!0?{...a,invalid:!0,...n?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.__store.setState(a=>({...a,matches:a.matches.map(r),cachedMatches:a.cachedMatches.map(r),pendingMatches:a.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let a=r.url;this.origin&&a.startsWith(this.origin)&&(a=a.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",a)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(a=>({...a,cachedMatches:a.cachedMatches.filter(i=>!r(i))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const a=this.looseRoutesById[r.routeId];if(!a.options.loader)return!0;const i=(r.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=gA,this.preloadRoute=async n=>{const r=this.buildLocation(n);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(u=>u.id)),c=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);zu(()=>{a.forEach(u=>{c.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await xx({router:this,matches:a,location:r,preload:!0,updateMatch:(u,d)=>{i.has(u)?a=a.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)}}),a}catch(u){if(Do(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});mo(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const a={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(a);if(r?.pending&&this.state.status!=="pending")return!1;const u=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=i6(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Oi(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Oi(u.search,i.search,{partial:!0})?d.params:!1:d.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??O6,parseSearch:t.parseSearch??T6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:i}=r;let{matchedRoutes:c}=r,u=!1;(a?a.path!=="/"&&i["**"]:Ci(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=c.length-1;p>=0;p--){const g=c[p];if(g.children)return g.id}return Fr}})(),f=[],m=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return c.forEach((p,g)=>{const y=f[g-1],[b,S,w]=(()=>{const U=y?.search??t.search,J=y?._strictSearch??void 0;try{const ie=t_(p.options.validateSearch,{...U})??void 0;return[{...U,...ie},{...J,...ie},void 0]}catch(ie){let F=ie;if(ie instanceof Np||(F=new Np(ie.message,{cause:ie})),n?.throwOnError)throw F;return[U,{},F]}})(),x=p.options.loaderDeps?.({search:b})??"",E=x?JSON.stringify(x):"",{interpolatedPath:T,usedParams:O}=Ay({path:p.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),C=p.id+T+E,I=this.getMatch(C),N=this.state.matches.find(U=>U.routeId===p.id),D=I?._strictParams??O;let z;if(!I){const U=p.options.params?.parse??p.options.parseParams;if(U)try{Object.assign(D,U(D))}catch(J){if(mo(J)||Do(J)?z=J:z=new $6(J.message,{cause:J}),n?.throwOnError)throw z}}Object.assign(i,D);const W=N?"stay":"enter";let V;if(I)V={...I,cause:W,params:N?fo(N.params,i):i,_strictParams:D,search:fo(N?N.search:I.search,b),_strictSearch:S};else{const U=p.options.loader||p.options.beforeLoad||p.lazyFn||vA(p)?"pending":"success";V={id:C,ssr:this.isServer?void 0:p.options.ssr,index:g,routeId:p.id,params:N?fo(N.params,i):i,_strictParams:D,pathname:T,updatedAt:Date.now(),search:N?fo(N.search,b):b,_strictSearch:S,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:z,__routeContext:void 0,_nonReactive:{loadPromise:ll()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:N?fo(N.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(V.globalNotFound=d===p.id),V.searchError=w;const G=m(y);V.context={...G,...V.__routeContext,...V.__beforeLoadContext},f.push(V)}),f.forEach((p,g)=>{const y=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const S=f[g-1],w=m(S);if(y.options.context){const x={deps:p.loaderDeps,params:p.params,context:w??{},location:t,navigate:E=>this.navigate({...E,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:f};p.__routeContext=y.options.context(x)??void 0}p.context={...w,...p.__routeContext,...p.__beforeLoadContext}}}),f}}class Np extends Error{}class $6 extends Error{}function U6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function t_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Np("Async validation not supported");if(n.issues)throw new Np(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 z6({pathname:e,routesById:t,processedTree:n}){const r={},a=Ci(e);let i;const c=c6(a,n,!0);return c&&(i=c.route,Object.assign(r,c.params)),{matchedRoutes:c?.branch||[t[Fr]],routeParams:r,foundRoute:i}}function V6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const a=n.reduce((u,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const m=({search:p,next:g})=>{let y=p;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(y=d.options.preSearchFilters.reduce((S,w)=>w(S),p));const b=g(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((S,w)=>w(S),b):b};f.push(m)}if(r&&d.options.validateSearch){const m=({search:p,next:g})=>{const y=g(p);try{return{...y,...t_(d.options.validateSearch,y)??void 0}}catch{return y}};f.push(m)}return u.concat(f)},[])??[],i=({search:u})=>t.search?t.search===!0?u:Ti(t.search,u):{};a.push(i);const c=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>c(u+1,p)})};return c(0,e)}const F6="Error preloading route! ☝️";class wA{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Fr:this.parentRoute||Ma(!1);let i=a?Fr:r?.path;i&&i!=="/"&&(i=uA(i));const c=r?.id||i;let u=a?Fr:up([this.parentRoute.id===Fr?"":this.parentRoute.id,c]);i===Fr&&(i="/"),u!==Fr&&(u=up(["/",u]));const d=u===Fr?"/":up([this.parentRoute.fullPath,i]);this._path=i,this._id=u,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class B6 extends wA{constructor(t){super(t)}}function yb(e){const t=e.errorComponent??Sm;return R.jsx(q6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class q6 extends A.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Sm({error:e}){const[t,n]=A.useState(!1);return R.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[R.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),R.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"})]}),R.jsx("div",{style:{height:".25rem"}}),t?R.jsx("div",{children:R.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?R.jsx("code",{children:e.message}):null})}):null]})}function H6({children:e,fallback:t=null}){return G6()?R.jsx(le.Fragment,{children:e}):R.jsx(le.Fragment,{children:t})}function G6(){return le.useSyncExternalStore(Z6,()=>!0,()=>!1)}function Z6(){return()=>{}}var ky={exports:{}},Ny={},My={exports:{}},Py={};var Tx;function K6(){if(Tx)return Py;Tx=1;var e=zs();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,c=e.useDebugValue;function u(p,g){var y=g(),b=r({inst:{value:y,getSnapshot:g}}),S=b[0].inst,w=b[1];return i(function(){S.value=y,S.getSnapshot=g,d(S)&&w({inst:S})},[p,y,g]),a(function(){return d(S)&&w({inst:S}),p(function(){d(S)&&w({inst:S})})},[p]),c(y),y}function d(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Py.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Py}var Ox;function SA(){return Ox||(Ox=1,My.exports=K6()),My.exports}var Cx;function W6(){if(Cx)return Ny;Cx=1;var e=zs(),t=SA();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,c=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Ny.useSyncExternalStoreWithSelector=function(f,m,p,g,y){var b=i(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=u(function(){function x(I){if(!E){if(E=!0,T=I,I=g(I),y!==void 0&&S.hasValue){var N=S.value;if(y(N,I))return O=N}return O=I}if(N=O,r(T,I))return N;var D=g(I);return y!==void 0&&y(N,D)?(T=I,N):(T=I,O=D)}var E=!1,T,O,C=p===void 0?null:p;return[function(){return x(m())},C===null?void 0:function(){return x(C())}]},[m,p,g,y]);var w=a(f,b[0],b[1]);return c(function(){S.hasValue=!0,S.value=w},[w]),d(w),w},Ny}var Ax;function Y6(){return Ax||(Ax=1,ky.exports=W6()),ky.exports}var EA=Y6();const Toe=ja(EA);function Q6(e,t=r=>r,n={}){const r=n.equal??X6;return EA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function X6(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!t.has(r)||!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Ix(e);if(n.length!==Ix(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Ix(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Dy=A.createContext(null);function RA(){return typeof document>"u"?Dy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Dy,Dy)}function Ir(e){const t=A.useContext(RA());return e?.warn,t}function fr(e){const t=Ir({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return Q6(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=fo(r.current,e.select(a));return r.current=i,i}return e.select(a)}return a})}const Em=A.createContext(void 0),J6=A.createContext(void 0);function na(e){const t=A.useContext(e.from?J6:Em);return fr({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Ma(!((e.shouldThrow??!0)&&!a),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),a!==void 0)return e.select?e.select(a):a},structuralSharing:e.structuralSharing})}function _b(e){return na({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function bb(e){const{select:t,...n}=e;return na({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function nl(e){return na({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 Rm(e){return na({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Iu=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Ly(e){const t=A.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function eL(e,t,n={},r={}){A.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([i])=>{t(i)},n);return a.observe(e.current),()=>{a.disconnect()}},[t,n,r.disabled,e])}function tL(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function wl(e){const t=Ir();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ooe(e){const t=Ir(),n=wl(),r=A.useRef(null);return Iu(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var xm=KC();const xA=ja(xm);function nL(e,t){const n=Ir(),[r,a]=A.useState(!1),i=A.useRef(!1),c=tL(t),{activeProps:u,inactiveProps:d,activeOptions:f,to:m,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:b,startTransition:S,resetScroll:w,viewTransition:x,children:E,target:T,disabled:O,style:C,className:I,onClick:N,onFocus:D,onMouseEnter:z,onMouseLeave:W,onTouchStart:V,ignoreBlocker:G,params:U,search:J,hash:ie,state:F,mask:X,reloadDocument:ae,unsafeRelative:fe,from:K,_fromLocation:P,...q}=e,B=fr({select:re=>re.location.search,structuralSharing:!0}),L=e.from,$=A.useMemo(()=>({...e,from:L}),[n,B,L,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=A.useMemo(()=>n.buildLocation({...$}),[n,$]),me=A.useMemo(()=>{if(O)return;let re=Q.maskedLocation?Q.maskedLocation.url:Q.url,Se=!1;return n.origin&&(re.startsWith(n.origin)?re=n.history.createHref(re.replace(n.origin,""))||"/":Se=!0),{href:re,external:Se}},[O,Q.maskedLocation,Q.url,n.origin,n.history]),ye=A.useMemo(()=>{if(me?.external)return me.href;try{return new URL(m),m}catch{}},[m,me]),Ae=e.reloadDocument||ye?!1:p??n.options.defaultPreload,ke=g??n.options.defaultPreloadDelay??0,H=fr({select:re=>{if(ye)return!1;if(f?.exact){if(!m6(re.location.pathname,Q.pathname,n.basepath))return!1}else{const Se=Ap(re.location.pathname,n.basepath),Te=Ap(Q.pathname,n.basepath);if(!(Se.startsWith(Te)&&(Se.length===Te.length||Se[Te.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Oi(re.location.search,Q.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?re.location.hash===Q.hash:!0}}),ne=A.useCallback(()=>{n.preloadRoute({...$}).catch(re=>{console.warn(re),console.warn(F6)})},[n,$]),_e=A.useCallback(re=>{re?.isIntersecting&&ne()},[ne]);eL(c,_e,iL,{disabled:!!O||Ae!=="viewport"}),A.useEffect(()=>{i.current||!O&&Ae==="render"&&(ne(),i.current=!0)},[O,ne,Ae]);const pe=re=>{const Se=re.currentTarget.getAttribute("target"),Te=T!==void 0?T:Se;if(!O&&!cL(re)&&!re.defaultPrevented&&(!Te||Te==="_self")&&re.button===0){re.preventDefault(),xm.flushSync(()=>{a(!0)});const Re=n.subscribe("onResolved",()=>{Re(),a(!1)});n.navigate({...$,replace:b,resetScroll:w,hashScrollIntoView:y,startTransition:S,viewTransition:x,ignoreBlocker:G})}};if(ye)return{...q,ref:c,href:ye,...E&&{children:E},...T&&{target:T},...O&&{disabled:O},...C&&{style:C},...I&&{className:I},...N&&{onClick:N},...D&&{onFocus:D},...z&&{onMouseEnter:z},...W&&{onMouseLeave:W},...V&&{onTouchStart:V}};const ce=re=>{O||Ae&&ne()},Oe=ce,je=re=>{if(!(O||!Ae))if(!ke)ne();else{const Se=re.target;if(yu.has(Se))return;const Te=setTimeout(()=>{yu.delete(Se),ne()},ke);yu.set(Se,Te)}},Ye=re=>{if(O||!Ae||!ke)return;const Se=re.target,Te=yu.get(Se);Te&&(clearTimeout(Te),yu.delete(Se))},He=H?Ti(u,{})??rL:jy,Xe=H?jy:Ti(d,{})??jy,Z=[I,He.className,Xe.className].filter(Boolean).join(" "),te=(C||He.style||Xe.style)&&{...C,...He.style,...Xe.style};return{...q,...He,...Xe,href:me?.href,ref:c,onClick:_u([N,pe]),onFocus:_u([D,ce]),onMouseEnter:_u([z,je]),onMouseLeave:_u([W,Ye]),onTouchStart:_u([V,Oe]),disabled:!!O,target:T,...te&&{style:te},...Z&&{className:Z},...O&&oL,...H&&aL,...r&&sL}}const jy={},rL={className:"active"},oL={role:"link","aria-disabled":!0},aL={"data-status":"active","aria-current":"page"},sL={"data-transitioning":"transitioning"},yu=new WeakMap,iL={rootMargin:"100px"},_u=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Tm=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...c}=nL(r,t),u=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;return n===void 0&&delete c.disabled,A.createElement(n||"a",{...c,ref:i},u)});function cL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class lL extends wA{constructor(t){super(t),this.useMatch=n=>na({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>na({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Rm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>nl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>bb({...n,from:this.id}),this.useLoaderData=n=>_b({...n,from:this.id}),this.useNavigate=()=>wl({from:this.fullPath}),this.Link=le.forwardRef((n,r)=>R.jsx(Tm,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function gt(e){return new lL(e)}class uL extends B6{constructor(t){super(t),this.useMatch=n=>na({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>na({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Rm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>nl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>bb({...n,from:this.id}),this.useLoaderData=n=>_b({...n,from:this.id}),this.useNavigate=()=>wl({from:this.fullPath}),this.Link=le.forwardRef((n,r)=>R.jsx(Tm,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function dL(e){return new uL(e)}function kx(e){return typeof e=="object"?new Nx(e,{silent:!0}).createRoute(e):new Nx(e,{silent:!0}).createRoute}class Nx{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=gt(r);return a.isRoot=!1,a},this.silent=n?.silent}}class Mx{constructor(t){this.useMatch=n=>na({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>na({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Rm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>nl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>bb({...n,from:this.options.id}),this.useLoaderData=n=>_b({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ir();return wl({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Px(e){return typeof e=="object"?new Mx(e):t=>new Mx({id:e,...t})}function Rt(e,t){let n,r,a,i;const c=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,e6(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),i=!0)}})),n),u=function(f){if(i)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!r)throw c();return A.createElement(r,f)};return u.preload=c,u}function fL(){const e=Ir(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=fr({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),c=Ly(i),u=i||n||a,d=Ly(u),f=i||a,m=Ly(f);return e.startTransition=p=>{r(!0),A.startTransition(()=>{p(),r(!1)})},A.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ci(e.latestLocation.href)!==Ci(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Iu(()=>{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]),Iu(()=>{c&&!i&&e.emit({type:"onLoad",...Ai(e.state)})},[c,e,i]),Iu(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Ai(e.state)})},[f,m,e]),Iu(()=>{if(d&&!u){const p=Ai(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&E6(e)}},[u,d,e]),null}function hL(e){const t=fr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return R.jsx(yb,{getResetKey:()=>t,onCatch:(n,r)=>{if(mo(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(mo(n))return e.fallback?.(n);throw n},children:e.children})}function pL(){return R.jsx("p",{children:"Not Found"})}function qc(e){return R.jsx(R.Fragment,{children:e.children})}function TA(e,t,n){return t.options.notFoundComponent?R.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?R.jsx(e.options.defaultNotFoundComponent,{...n}):R.jsx(pL,{})}function mL({children:e}){const t=Ir();return t.isServer?R.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function gL(){const e=Ir();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||e_)(e.latestLocation),r=n!==e_(e.latestLocation)?n:void 0,a={storageKey:Ip,shouldScrollRestoration:!0};return r&&(a.key=r),R.jsx(mL,{children:`(${dA.toString()})(${JSON.stringify(a)})`})}const OA=A.memo(function({matchId:t}){const n=Ir(),r=fr({select:x=>{const E=x.matches.find(T=>T.id===t);return Ma(E),{routeId:E.routeId,ssr:E.ssr,_displayPending:E._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,c=i?R.jsx(i,{}):null,u=a.options.errorComponent??n.options.defaultErrorComponent,d=a.options.onCatch??n.options.defaultOnCatch,f=a.isRoot?a.options.notFoundComponent??n.options.notFoundRoute?.options.component:a.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",p=(!a.isRoot||a.options.wrapInSuspense||m)&&(a.options.wrapInSuspense??i??(a.options.errorComponent?.preload||m))?A.Suspense:qc,g=u?yb:qc,y=f?hL:qc,b=fr({select:x=>x.loadedAt}),S=fr({select:x=>{const E=x.matches.findIndex(T=>T.id===t);return x.matches[E-1]?.routeId}}),w=a.isRoot?a.options.shellComponent??qc:qc;return R.jsxs(w,{children:[R.jsx(Em.Provider,{value:t,children:R.jsx(p,{fallback:c,children:R.jsx(g,{getResetKey:()=>b,errorComponent:u||Sm,onCatch:(x,E)=>{if(mo(x))throw x;d?.(x,E)},children:R.jsx(y,{fallback:x=>{if(!f||x.routeId&&x.routeId!==r.routeId||!x.routeId&&!a.isRoot)throw x;return A.createElement(f,x)},children:m||r._displayPending?R.jsx(H6,{fallback:c,children:R.jsx(Dx,{matchId:t})}):R.jsx(Dx,{matchId:t})})})})}),S===Fr&&n.options.scrollRestoration?R.jsxs(R.Fragment,{children:[R.jsx(vL,{}),R.jsx(gL,{})]}):null]})});function vL(){const e=Ir(),t=A.useRef(void 0);return R.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ai(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Dx=A.memo(function({matchId:t}){const n=Ir(),{match:r,key:a,routeId:i}=fr({select:d=>{const f=d.matches.find(b=>b.id===t),m=f.routeId,g=(n.routesById[m].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:m,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:m,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),c=n.routesById[i],u=A.useMemo(()=>{const d=c.options.component??n.options.defaultComponent;return d?R.jsx(d,{},a):R.jsx(CA,{})},[a,c.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=ll();f._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Ma(mo(r.error)),TA(n,c,r.error);if(r.status==="redirected")throw Ma(Do(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(c.options.errorComponent??n.options.defaultErrorComponent)||Sm;return R.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),CA=A.memo(function(){const t=Ir(),n=A.useContext(Em),r=fr({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=fr({select:f=>{const p=f.matches.find(g=>g.id===n);return Ma(p),p.globalNotFound}}),c=fr({select:f=>{const m=f.matches,p=m.findIndex(g=>g.id===n);return m[p+1]?.id}}),u=t.options.defaultPendingComponent?R.jsx(t.options.defaultPendingComponent,{}):null;if(i)return TA(t,a,void 0);if(!c)return null;const d=R.jsx(OA,{matchId:c});return r===Fr?R.jsx(A.Suspense,{fallback:u,children:d}):d});function yL(){const e=Ir(),n=e.routesById[Fr].options.pendingComponent??e.options.defaultPendingComponent,r=n?R.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?qc:A.Suspense,i=R.jsxs(a,{fallback:r,children:[!e.isServer&&R.jsx(fL,{}),R.jsx(_L,{})]});return e.options.InnerWrap?R.jsx(e.options.InnerWrap,{children:i}):i}function _L(){const e=Ir(),t=fr({select:a=>a.matches[0]?.id}),n=fr({select:a=>a.loadedAt}),r=t?R.jsx(OA,{matchId:t}):null;return R.jsx(Em.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:R.jsx(yb,{getResetKey:()=>n,errorComponent:Sm,onCatch:a=>{a.message||a.toString()},children:r})})}const bL=e=>new wL(e);class wL extends j6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=kx,globalThis.createLazyFileRoute=Px):typeof window<"u"&&(window.createFileRoute=kx,window.createLazyFileRoute=Px);function SL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=RA(),a=R.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?R.jsx(e.options.Wrap,{children:a}):a}function EL({router:e,...t}){return R.jsx(SL,{router:e,...t,children:R.jsx(yL,{})})}function RL(e){return fr({select:t=>t.location})}var xL={},Lx={};const hp=Object.create(null),bu=e=>xL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?hp:globalThis),po=new Proxy(hp,{get(e,t){return bu()[t]??hp[t]},has(e,t){return t in bu()||t in hp},set(e,t,n){const r=bu(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=bu(!0);return delete n[t],!0},ownKeys(){const e=bu(!0);return Object.keys(e)}});function yn(e,t){return typeof process<"u"&&Lx?Lx[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const wu=1,Ln=4,Yo=8,qr=24,jx={eterm:Ln,cons25:Ln,console:Ln,cygwin:Ln,dtterm:Ln,gnome:Ln,hurd:Ln,jfbterm:Ln,konsole:Ln,kterm:Ln,mlterm:Ln,mosh:qr,putty:Ln,st:Ln,"rxvt-unicode-24bit":qr,terminator:qr,"xterm-kitty":qr},TL=new Map(Object.entries({APPVEYOR:Yo,BUILDKITE:Yo,CIRCLECI:qr,DRONE:Yo,GITEA_ACTIONS:qr,GITHUB_ACTIONS:qr,GITLAB_CI:Yo,TRAVIS:Yo})),OL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function CL(){if(yn("FORCE_COLOR")!==void 0)switch(yn("FORCE_COLOR")){case"":case"1":case"true":return Ln;case"2":return Yo;case"3":return qr;default:return wu}if(yn("NODE_DISABLE_COLORS")!==void 0&&yn("NODE_DISABLE_COLORS")!==""||yn("NO_COLOR")!==void 0&&yn("NO_COLOR")!==""||yn("TERM")==="dumb")return wu;if(yn("TMUX"))return qr;if("TF_BUILD"in po&&"AGENT_NAME"in po)return Ln;if("CI"in po){for(const{0:e,1:t}of TL)if(e in po)return t;return yn("CI_NAME")==="codeship"?Yo:wu}if("TEAMCITY_VERSION"in po)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(yn("TEAMCITY_VERSION"))!==null?Ln:wu;switch(yn("TERM_PROGRAM")){case"iTerm.app":return!yn("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(yn("TERM_PROGRAM_VERSION"))!==null?Yo:qr;case"HyperTerm":case"MacTerm":return qr;case"Apple_Terminal":return Yo}if(yn("COLORTERM")==="truecolor"||yn("COLORTERM")==="24bit")return qr;if(yn("TERM")){if(/truecolor/.exec(yn("TERM"))!==null)return qr;if(/^xterm-256/.exec(yn("TERM"))!==null)return Yo;const e=yn("TERM").toLowerCase();if(jx[e])return jx[e];if(OL.some(t=>t.exec(e)!==null))return Ln}return yn("COLORTERM")?Ln:wu}const Qo={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"}},n_=["debug","info","success","warn","error"];function AL(e,t){return n_.indexOf(t)>=n_.indexOf(e)}const IL={info:Qo.fg.blue,success:Qo.fg.green,warn:Qo.fg.yellow,error:Qo.fg.red,debug:Qo.fg.magenta},kL=(e,t,n)=>{const r=new Date().toISOString();return n?`${Qo.dim}${r}${Qo.reset} ${IL[e]}${e.toUpperCase()}${Qo.reset} ${Qo.bright}[Better Auth]:${Qo.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},NL=e=>{const t="error",n=CL()!==1,r=(a,i,c=[])=>{if(!AL(t,a))return;const u=kL(a,i,n);{a==="error"?console.error(u,...c):a==="warn"?console.warn(u,...c):console.log(u,...c);return}};return{...Object.fromEntries(n_.map(a=>[a,(...[i,...c])=>r(a,i,c)])),get level(){return t}}};NL();var Fu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function ML(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Fu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function PL(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Fu(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Fu?t:new Fu(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function $y(e,t="/api/auth"){if(PL(e),ML(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function DL(e,t,n,r,a){if(e)return $y(e,t);{const i=po.BETTER_AUTH_URL||po.NEXT_PUBLIC_BETTER_AUTH_URL||po.PUBLIC_BETTER_AUTH_URL||po.NUXT_PUBLIC_BETTER_AUTH_URL||po.NUXT_PUBLIC_AUTH_URL||(po.BASE_URL!=="/"?po.BASE_URL:void 0);if(i)return $y(i,t)}if(typeof window<"u"&&window.location)return $y(window.location.origin,t)}const LL={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*:/},jL=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,$x={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},$L=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function UL(e){return e instanceof Date&&!isNaN(e.getTime())}function zL(e){const t=$L.exec(e);if(!t)return null;const[,n,r,a,i,c,u,d,f,m,p]=t;let g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(a,10),parseInt(i,10),parseInt(c,10),parseInt(u,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const y=(parseInt(m,10)*60+parseInt(p,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+y)}return UL(g)?g:null}function VL(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const c=e.trim();if(c.length>0&&c[0]==='"'&&c.endsWith('"')&&!c.slice(1,-1).includes('"'))return c.slice(1,-1);const u=c.toLowerCase();if(u.length<=9&&u in $x)return $x[u];if(!jL.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(LL).some(([d,f])=>{const m=f.test(c);return m&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),m})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(c,(f,m)=>{if(f==="__proto__"||f==="constructor"&&m&&typeof m=="object"&&"prototype"in m){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(i&&typeof m=="string"){const p=zL(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function FL(e,t={strict:!0}){return VL(e,t)}let xo=[],hs=0;const eh=4,Yc=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(r){return n.lc=t.push(r),()=>{for(let i=hs+eh;i<xo.length;)xo[i]===r?xo.splice(i,eh):i+=eh;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!xo.length;for(let c of t)xo.push(c,n.value,r,a);if(i){for(hs=0;hs<xo.length;hs+=eh)xo[hs](xo[hs+1],xo[hs+2],xo[hs+3]);xo.length=0}},off(){},set(r){let a=n.value;a!==r&&(n.value=r,n.notify(a))},subscribe(r){let a=n.listen(r);return r(n.value),a},value:e};return n},BL=5,th=6,nh=10;let qL=(e,t,n,r)=>(e.events=e.events||{},e.events[n+nh]||(e.events[n+nh]=r(a=>{e.events[n].reduceRight((i,c)=>(c(i),i),{shared:{},...a})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let a=e.events[n],i=a.indexOf(t);a.splice(i,1),a.length||(delete e.events[n],e.events[n+nh](),delete e.events[n+nh])}),HL=1e3,AA=(e,t)=>qL(e,r=>{let a=t(r);a&&e.events[th].push(a)},BL,r=>{let a=e.listen;e.listen=(...c)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...c));let i=e.off;return e.events[th]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let c of e.events[th])c();e.events[th]=[]}},HL)},()=>{e.listen=a,e.off=i}});function GL(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,c)=>{r.has(c)&&n(a,i,c)})}var ZL=Object.defineProperty,KL=Object.defineProperties,WL=Object.getOwnPropertyDescriptors,Ux=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,QL=Object.prototype.propertyIsEnumerable,zx=(e,t,n)=>t in e?ZL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Io=(e,t)=>{for(var n in t||(t={}))YL.call(t,n)&&zx(e,n,t[n]);if(Ux)for(var n of Ux(t))QL.call(t,n)&&zx(e,n,t[n]);return e},Wo=(e,t)=>KL(e,WL(t)),XL=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},JL=async(e,t)=>{var n,r,a,i,c,u;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 m of t?.plugins||[]){if(m.init){const p=await((n=m.init)==null?void 0:n.call(m,e.toString(),t));d=p.options||d,e=p.url}f.onRequest.push((r=m.hooks)==null?void 0:r.onRequest),f.onResponse.push((a=m.hooks)==null?void 0:a.onResponse),f.onSuccess.push((i=m.hooks)==null?void 0:i.onSuccess),f.onError.push((c=m.hooks)==null?void 0:c.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},Vx=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}},ej=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 tj(e){if(typeof e=="number")return new Vx({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Vx(e);case"exponential":return new ej(e);default:throw new Error("Invalid retry strategy")}}var nj=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=n(e.auth.username),a=n(e.auth.password);if(!r||!a)return t;t.authorization=`Basic ${btoa(`${r}:${a}`)}`}else if(e.auth.type==="Custom"){const r=n(e.auth.value);if(!r)return t;t.authorization=`${n(e.auth.prefix)} ${r}`}}return t},rj=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function oj(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 rj.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function aj(e){try{return JSON.parse(e),!0}catch{return!1}}function IA(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 Fx(e){try{return JSON.parse(e)}catch{return e}}function Bx(e){return typeof e=="function"}function sj(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&Bx(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Bx(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function ij(e){const t=new Headers(e?.headers),n=await nj(e);for(const[r,a]of Object.entries(n||{}))t.set(r,a);if(!t.has("content-type")){const r=cj(e?.body);r&&t.set("content-type",r)}return t}function cj(e){return IA(e)?"application/json":null}function lj(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(IA(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 e.body}function uj(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 NA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function dj(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var fj=class kA extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,kA.prototype)}};async function pp(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new fj(n.issues);return n.value}var NA=["get","post","put","patch","delete"],hj=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,c;const u=((a=(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:a.schema)||e.schema;if(u){let d=t;(i=u.config)!=null&&i.prefix&&d.startsWith(u.config.prefix)&&(d=d.replace(u.config.prefix,""),u.config.baseURL&&(t=t.replace(u.config.prefix,u.config.baseURL))),(c=u.config)!=null&&c.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=Wo(Io({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=Wo(Io({},m),{body:f.input?await pp(f.input,n?.body):n?.body,params:f.params?await pp(f.params,n?.params):n?.params,query:f.query?await pp(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),pj=e=>{async function t(n,r){const a=Wo(Io(Io({},e),r),{plugins:[...e?.plugins||[],hj(e||{})]});if(e?.catchAllError)try{return await r_(n,a)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await r_(n,a)}return t};function mj(e,t){let{baseURL:n,params:r,query:a}=t||{query:{},params:{},baseURL:""},i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];NA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[c,u]=e.replace(i,"").split("?");const d=new URLSearchParams(u);for(const[p,g]of Object.entries(a||{}))g!=null&&d.set(p,String(g));if(r)if(Array.isArray(r)){const p=c.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const b=r[g];c=c.replace(y,b)}}else for(const[p,g]of Object.entries(r))c=c.replace(`:${p}`,String(g));c=c.split("/").map(encodeURIComponent).join("/"),c.startsWith("/")&&(c=c.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${c}${f}`,i):`${i}${c}${f}`}var r_=async(e,t)=>{var n,r,a,i,c,u,d,f;const{hooks:m,url:p,options:g}=await JL(e,t),y=sj(g),b=new AbortController,S=(n=g.signal)!=null?n:b.signal,w=mj(p,g),x=lj(g),E=await ij(g),T=uj(p,g);let O=Wo(Io({},g),{url:w,headers:E,body:x,method:T,signal:S});for(const U of m.onRequest)if(U){const J=await U(O);J instanceof Object&&(O=J)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:C}=dj(g,b);let I=await y(O.url,O);C();const N={response:I,request:O};for(const U of m.onResponse)if(U){const J=await U(Wo(Io({},N),{response:(a=t?.hookOptions)!=null&&a.cloneResponse?I.clone():I}));J instanceof Response?I=J:J instanceof Object&&(I=J.response)}if(I.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const J=oj(I),ie={data:"",response:I,request:O};if(J==="json"||J==="text"){const F=await I.text(),ae=await((i=O.jsonParser)!=null?i:Fx)(F);ie.data=ae}else ie.data=await I[J]();O?.output&&O.output&&!O.disableValidation&&(ie.data=await pp(O.output,ie.data));for(const F of m.onSuccess)F&&await F(Wo(Io({},ie),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?I.clone():I}));return t?.throw?ie.data:{data:ie.data,error:null}}const D=(u=t?.jsonParser)!=null?u:Fx,z=await I.text(),W=aj(z),V=W?await D(z):null,G={response:I,responseText:z,request:O,error:Wo(Io({},V),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(Wo(Io({},G),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=tj(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const F of m.onRetry)F&&await F(N);const ie=U.getDelay(J);return await new Promise(F=>setTimeout(F,ie)),await r_(e,Wo(Io({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new XL(I.status,I.statusText,W?V:z);return{data:null,error:Wo(Io({},V),{status:I.status,statusText:I.statusText})}};const Uy=Symbol.for("better-auth:broadcast-channel"),gj=()=>Math.floor(Date.now()/1e3);var vj=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:gj()}))}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 zy(e="better-auth.message"){return globalThis[Uy]||(globalThis[Uy]=new vj(e)),globalThis[Uy]}const Vy=Symbol.for("better-auth:focus-manager");var yj=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 qx(){return globalThis[Vy]||(globalThis[Vy]=new yj),globalThis[Vy]}const Fy=Symbol.for("better-auth:online-manager");var _j=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 By(){return globalThis[Fy]||(globalThis[Fy]=new _j),globalThis[Fy]}const bj=()=>typeof window>"u",ku=(e,t,n,r)=>{const a=Yc({data:null,error:null,isPending:!0,isRefetching:!1,refetch:u=>i(u)}),i=async u=>new Promise(d=>{const f=typeof r=="function"?r({data:a.get().data,error:a.get().error,isPending:a.get().isPending}):r;n(t,{...f,query:{...f?.query,...u?.query},async onSuccess(m){a.set({data:m.data,error:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onSuccess?.(m)},async onError(m){const{request:p}=m,g=typeof p.retry=="number"?p.retry:p.retry?.attempts,y=p.retryAttempt||0;g&&y<g||(a.set({error:m.error,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onError?.(m))},async onRequest(m){const p=a.get();a.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:a.value.refetch}),await f?.onRequest?.(m)}}).catch(m=>{a.set({error:m,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch})}).finally(()=>{d(void 0)})});e=Array.isArray(e)?e:[e];let c=!1;for(const u of e)u.subscribe(async()=>{bj()||(c?await i():AA(a,()=>{const d=setTimeout(async()=>{c||(await i(),c=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},Mc=()=>Math.floor(Date.now()/1e3),wj=5;function Sj(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,c=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||By().isOnline,m=E=>{if(!f())return;if(E?.event==="storage"){d.lastSync=Mc(),n.set(!n.get());return}const T=t.get();if(E?.event==="poll"){d.lastSessionRequest=Mc(),r("/get-session").then(O=>{t.set({...T,data:O.data,error:O.error||null}),d.lastSync=Mc(),n.set(!n.get())}).catch(()=>{});return}E?.event==="visibilitychange"&&Mc()-d.lastSessionRequest<wj&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||E?.event==="visibilitychange")&&(E?.event==="visibilitychange"&&(d.lastSessionRequest=Mc()),d.lastSync=Mc(),n.set(!n.get()))},p=E=>{zy().post({event:"session",data:{trigger:E},clientId:Math.random().toString(36).substring(7)})},g=()=>{i&&i>0&&(d.pollInterval=setInterval(()=>{t.get()?.data&&m({event:"poll"})},i*1e3))},y=()=>{d.unsubscribeBroadcast=zy().subscribe(()=>{m({event:"storage"})})},b=()=>{c&&(d.unsubscribeFocus=qx().subscribe(()=>{m({event:"visibilitychange"})}))},S=()=>{d.unsubscribeOnline=By().subscribe(E=>{E&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),b(),S(),zy().setup(),qx().setup(),By().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:m,broadcastSessionUpdate:p}}const Ej={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{}}}};function Rj(e,t){const n=Yc(!1),r=ku(n,"/get-session",e,{method:"GET"});return AA(r,()=>{const a=Sj({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const xj=(e,t)=>{const n="credentials"in Request.prototype,r=DL(e?.baseURL,e?.basePath)??"/api/auth",a=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:c,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=pj({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?FL(O,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Ej],...a]}),{$sessionSignal:g,session:y}=Rj(p,e),b=e?.plugins||[];let S={},w={$sessionSignal:g,session:y},x={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const E=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of b)O.getAtoms&&Object.assign(w,O.getAtoms?.(p)),O.pathMethods&&Object.assign(x,O.pathMethods),O.atomListeners&&E.push(...O.atomListeners);const T={notify:O=>{w[O].set(!w[O].get())},listen:(O,C)=>{w[O].subscribe(C)},atoms:w};for(const O of b)O.getActions&&Object.assign(S,O.getActions?.(p,T,e));return{get baseURL(){return r},pluginsActions:S,pluginsAtoms:w,pluginPathMethods:x,atomListeners:E,$fetch:p,$store:T}};function Tj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Oj(e,t,n){const r=t[e],{fetchOptions:a,query:i,...c}=n||{};return r||(a?.method?a.method:c&&Object.keys(c).length>0?"POST":"GET")}function Cj(e,t,n,r,a){function i(c=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...c,d];let m=e;for(const p of f)if(m&&typeof m=="object"&&p in m)m=m[p];else{m=void 0;break}return typeof m=="function"||Tj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+c.map(E=>E.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),p=f[0]||{},g=f[1]||{},{query:y,fetchOptions:b,...S}=p,w={...g,...b},x=Oj(m,n,p);return await t(m,{...w,body:x==="GET"?void 0:{...S,...w?.body||{}},query:y||w?.query,method:x,async onSuccess(E){if(await w?.onSuccess?.(E),!a||w.disableSignal)return;const T=a.filter(O=>O.matcher(m));if(T.length)for(const O of T){const C=r[O.signal];if(!C)return;const I=C.get();setTimeout(()=>{C.set(!I)},10)}}})}})}return i()}function Aj(e,t={}){let n=A.useRef(e.get());const{keys:r,deps:a=[e,r]}=t;let i=A.useCallback(u=>{const d=f=>{n.current!==f&&(n.current=f,u())};return d(e.value),r?.length?GL(e,r,d):e.listen(d)},a),c=()=>n.current;return A.useSyncExternalStore(i,c,c)}function Ij(e){return`use${kj(e)}`}function kj(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Nj(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:c}=xj(e);let u={};for(const[d,f]of Object.entries(r))u[Ij(d)]=()=>Aj(f);return Cj({...n,...u,$fetch:a,$store:i},a,t,r,c)}function Mj(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const c=e[a];if(!c)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>c.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>c.includes(d)):r=u.actions.every(d=>c.includes(d))}else throw new Fu("Invalid access control request");if(r&&n==="OR")return{success:r};if(!r&&n==="AND")return{success:!1,error:`unauthorized to access resource "${a}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:e}}function MA(e){return{newRole(t){return Mj(t)},statements:e}}const Pj={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},PA=MA(Pj),DA=PA.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),LA=PA.newRole({user:[],session:[]}),Dj={admin:DA,user:LA},Lj=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||Dj;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},jj={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},wb=MA(jj),jA=wb.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),$A=wb.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),UA=wb.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),$j={admin:jA,owner:$A,member:UA},Uj=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",a=n.includes(r),i=e.allowCreatorAllPermissions||!1;if(a&&i)return!0;for(const c of n)if(t[c]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},zj=e=>{const t={admin:DA,user:LA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>Lj({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},Vj=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),Fj=()=>({id:"magic-link",$InferServerPlugin:{}}),Bj=e=>Uj(e,e.options.roles||$j),qj=e=>{const t=Yc(!1),n=Yc(!1),r=Yc(!1),a=Yc(!1),i={admin:jA,member:UA,owner:$A,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>Bj({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:c=>{const u=ku(t,"/organization/list",c,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:ku([n],"/organization/get-full-organization",c,()=>({method:"GET"})),listOrganizations:u,activeMember:ku([r],"/organization/get-active-member",c,{method:"GET"}),activeMemberRole:ku([a],"/organization/get-active-member-role",c,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(c){return c==="/organization/create"||c==="/organization/delete"||c==="/organization/update"},signal:"$listOrg"},{matcher(c){return c.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(c){return c.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},Hj=e=>({id:"sso-client",$InferServerPlugin:{}}),zA=Nj({plugins:[qj({}),zj(),Hj(),Fj(),Vj()]});function VA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=VA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Sb(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=VA(e))&&(r&&(r+=" "),r+=t);return r}const Gj=(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},Zj=(e,t)=>({classGroupId:e,validator:t}),FA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Mp="-",Hx=[],Kj="arbitrary..",Wj=e=>{const t=Qj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Yj(c);const u=c.split(Mp),d=u[0]===""&&u.length>1?1:0;return BA(u,d,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const d=r[c],f=n[c];return d?f?Gj(f,d):d:f||Hx}return n[c]||Hx}}},BA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=BA(e,t+1,i);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join(Mp):e.slice(t).join(Mp),d=c.length;for(let f=0;f<d;f++){const m=c[f];if(m.validator(u))return m.classGroupId}},Yj=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?Kj+r:void 0})(),Qj=e=>{const{theme:t,classGroups:n}=e;return Xj(n,t)},Xj=(e,t)=>{const n=FA();for(const r in e){const a=e[r];Eb(a,n,r,t)}return n},Eb=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const c=e[i];Jj(c,t,n,r)}},Jj=(e,t,n,r)=>{if(typeof e=="string"){e$(e,t,n);return}if(typeof e=="function"){t$(e,t,n,r);return}n$(e,t,n,r)},e$=(e,t,n)=>{const r=e===""?t:qA(t,e);r.classGroupId=n},t$=(e,t,n,r)=>{if(r$(e)){Eb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Zj(n,e))},n$=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let c=0;c<i;c++){const[u,d]=a[c];Eb(d,qA(t,u),n,r)}},qA=(e,t)=>{let n=e;const r=t.split(Mp),a=r.length;for(let i=0;i<a;i++){const c=r[i];let u=n.nextPart.get(c);u||(u=FA(),n.nextPart.set(c,u)),n=u}return n},r$=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,o$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,c)=>{n[i]=c,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let c=n[i];if(c!==void 0)return c;if((c=r[i])!==void 0)return a(i,c),c},set(i,c){i in n?n[i]=c:a(i,c)}}},o_="!",Gx=":",a$=[],Zx=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),s$=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let c=0,u=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const w=a[S];if(c===0&&u===0){if(w===Gx){i.push(a.slice(d,S)),d=S+1;continue}if(w==="/"){f=S;continue}}w==="["?c++:w==="]"?c--:w==="("?u++:w===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(o_)?(g=p.slice(0,-1),y=!0):p.startsWith(o_)&&(g=p.slice(1),y=!0);const b=f&&f>d?f-d:void 0;return Zx(i,y,g,b)};if(t){const a=t+Gx,i=r;r=c=>c.startsWith(a)?i(c.slice(a.length)):Zx(a$,!1,c,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},i$=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const c=n[i],u=c[0]==="[",d=t.has(c);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(c)):a.push(c)}return a.length>0&&(a.sort(),r.push(...a)),r}},c$=e=>({cache:o$(e.cacheSize),parseClassName:s$(e),sortModifiers:i$(e),...Wj(e)}),l$=/\s+/,u$=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,c=[],u=e.trim().split(l$);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:S}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let w=!!S,x=r(w?b.substring(0,S):b);if(!x){if(!w){d=m+(d.length>0?" "+d:d);continue}if(x=r(b),!x){d=m+(d.length>0?" "+d:d);continue}w=!1}const E=g.length===0?"":g.length===1?g[0]:i(g).join(":"),T=y?E+o_:E,O=T+x;if(c.indexOf(O)>-1)continue;c.push(O);const C=a(x,w);for(let I=0;I<C.length;++I){const N=C[I];c.push(T+N)}d=m+(d.length>0?" "+d:d)}return d},d$=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=HA(n))&&(a&&(a+=" "),a+=r);return a},HA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=HA(e[r]))&&(n&&(n+=" "),n+=t);return n},f$=(e,...t)=>{let n,r,a,i;const c=d=>{const f=t.reduce((m,p)=>p(m),e());return n=c$(f),r=n.cache.get,a=n.cache.set,i=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=u$(d,n);return a(d,m),m};return i=c,(...d)=>i(d$(...d))},h$=[],On=e=>{const t=n=>n[e]||h$;return t.isThemeGetter=!0,t},GA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ZA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,p$=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,m$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,g$=/\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$/,v$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,y$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ps=e=>p$.test(e),ft=e=>!!e&&!Number.isNaN(Number(e)),ms=e=>!!e&&Number.isInteger(Number(e)),qy=e=>e.endsWith("%")&&ft(e.slice(0,-1)),Ta=e=>m$.test(e),KA=()=>!0,b$=e=>g$.test(e)&&!v$.test(e),Rb=()=>!1,w$=e=>y$.test(e),S$=e=>_$.test(e),E$=e=>!ze(e)&&!Ve(e),R$=e=>Vs(e,QA,Rb),ze=e=>GA.test(e),hi=e=>Vs(e,XA,b$),Kx=e=>Vs(e,N$,ft),x$=e=>Vs(e,eI,KA),T$=e=>Vs(e,JA,Rb),Wx=e=>Vs(e,WA,Rb),O$=e=>Vs(e,YA,S$),rh=e=>Vs(e,tI,w$),Ve=e=>ZA.test(e),Su=e=>Ui(e,XA),C$=e=>Ui(e,JA),Yx=e=>Ui(e,WA),A$=e=>Ui(e,QA),I$=e=>Ui(e,YA),oh=e=>Ui(e,tI,!0),k$=e=>Ui(e,eI,!0),Vs=(e,t,n)=>{const r=GA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ui=(e,t,n=!1)=>{const r=ZA.exec(e);return r?r[1]?t(r[1]):n:!1},WA=e=>e==="position"||e==="percentage",YA=e=>e==="image"||e==="url",QA=e=>e==="length"||e==="size"||e==="bg-size",XA=e=>e==="length",N$=e=>e==="number",JA=e=>e==="family-name",eI=e=>e==="number"||e==="weight",tI=e=>e==="shadow",M$=()=>{const e=On("color"),t=On("font"),n=On("text"),r=On("font-weight"),a=On("tracking"),i=On("leading"),c=On("breakpoint"),u=On("container"),d=On("spacing"),f=On("radius"),m=On("shadow"),p=On("inset-shadow"),g=On("text-shadow"),y=On("drop-shadow"),b=On("blur"),S=On("perspective"),w=On("aspect"),x=On("ease"),E=On("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...O(),Ve,ze],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],D=()=>[Ve,ze,d],z=()=>[ps,"full","auto",...D()],W=()=>[ms,"none","subgrid",Ve,ze],V=()=>["auto",{span:["full",ms,Ve,ze]},ms,Ve,ze],G=()=>[ms,"auto",Ve,ze],U=()=>["auto","min","max","fr",Ve,ze],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...D()],X=()=>[ps,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],ae=()=>[ps,"screen","full","dvw","lvw","svw","min","max","fit",...D()],fe=()=>[ps,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],K=()=>[e,Ve,ze],P=()=>[...O(),Yx,Wx,{position:[Ve,ze]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",A$,R$,{size:[Ve,ze]}],L=()=>[qy,Su,hi],$=()=>["","none","full",f,Ve,ze],Q=()=>["",ft,Su,hi],me=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ae=()=>[ft,qy,Yx,Wx],ke=()=>["","none",b,Ve,ze],H=()=>["none",ft,Ve,ze],ne=()=>["none",ft,Ve,ze],_e=()=>[ft,Ve,ze],pe=()=>[ps,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ta],breakpoint:[Ta],color:[KA],container:[Ta],"drop-shadow":[Ta],ease:["in","out","in-out"],font:[E$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ta],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ta],shadow:[Ta],spacing:["px",ft],text:[Ta],"text-shadow":[Ta],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ps,ze,Ve,w]}],container:["container"],columns:[{columns:[ft,ze,Ve,u]}],"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:C()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[ms,"auto",Ve,ze]}],basis:[{basis:[ps,"full","auto",u,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ft,ps,"auto","initial","none",ze]}],grow:[{grow:["",ft,Ve,ze]}],shrink:[{shrink:["",ft,Ve,ze]}],order:[{order:[ms,"first","last","none",Ve,ze]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,Su,hi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,k$,x$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qy,ze]}],"font-family":[{font:[C$,T$,t]}],"font-features":[{"font-features":[ze]}],"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:[a,Ve,ze]}],"line-clamp":[{"line-clamp":[ft,"none",Ve,Kx]}],leading:[{leading:[i,...D()]}],"list-image":[{"list-image":["none",Ve,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ve,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[ft,"from-font","auto",Ve,hi]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[ft,"auto",Ve,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ve,ze]}],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",Ve,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ms,Ve,ze],radial:["",Ve,ze],conic:[ms,Ve,ze]},I$,O$]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ft,Ve,ze]}],"outline-w":[{outline:["",ft,Su,hi]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",m,oh,rh]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",p,oh,rh]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[ft,hi]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,oh,rh]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[ft,Ve,ze]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"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":[ft]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ae()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":Ae()}],"mask-image-t-to-pos":[{"mask-t-to":Ae()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":Ae()}],"mask-image-r-to-pos":[{"mask-r-to":Ae()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":Ae()}],"mask-image-b-to-pos":[{"mask-b-to":Ae()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":Ae()}],"mask-image-l-to-pos":[{"mask-l-to":Ae()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":Ae()}],"mask-image-x-to-pos":[{"mask-x-to":Ae()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":Ae()}],"mask-image-y-to-pos":[{"mask-y-to":Ae()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Ve,ze]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ae()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[ft]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ae()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ve,ze]}],filter:[{filter:["","none",Ve,ze]}],blur:[{blur:ke()}],brightness:[{brightness:[ft,Ve,ze]}],contrast:[{contrast:[ft,Ve,ze]}],"drop-shadow":[{"drop-shadow":["","none",y,oh,rh]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",ft,Ve,ze]}],"hue-rotate":[{"hue-rotate":[ft,Ve,ze]}],invert:[{invert:["",ft,Ve,ze]}],saturate:[{saturate:[ft,Ve,ze]}],sepia:[{sepia:["",ft,Ve,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",Ve,ze]}],"backdrop-blur":[{"backdrop-blur":ke()}],"backdrop-brightness":[{"backdrop-brightness":[ft,Ve,ze]}],"backdrop-contrast":[{"backdrop-contrast":[ft,Ve,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ft,Ve,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ft,Ve,ze]}],"backdrop-invert":[{"backdrop-invert":["",ft,Ve,ze]}],"backdrop-opacity":[{"backdrop-opacity":[ft,Ve,ze]}],"backdrop-saturate":[{"backdrop-saturate":[ft,Ve,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",ft,Ve,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ve,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ft,"initial",Ve,ze]}],ease:[{ease:["linear","initial",x,Ve,ze]}],delay:[{delay:[ft,Ve,ze]}],animate:[{animate:["none",E,Ve,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ve,ze]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:H()}],"rotate-x":[{"rotate-x":H()}],"rotate-y":[{"rotate-y":H()}],"rotate-z":[{"rotate-z":H()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[Ve,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",Ve,ze]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",Ve,ze]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[ft,Su,hi,Kx]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},nI=f$(M$),P$=Object.freeze({status:"aborted"});function ve(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:c,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=c.prototype,m=Object.keys(f);for(let p=0;p<m.length;p++){const g=m[p];g in u||(u[g]=f[g].bind(u))}}const a=n?.Parent??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function c(u){var d;const f=n?.Parent?new i:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const m of f._zod.deferred)m();return f}return Object.defineProperty(c,"init",{value:r}),Object.defineProperty(c,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class rl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class rI extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const oI={};function Ps(e){return oI}function aI(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function a_(e,t){return typeof t=="bigint"?t.toString():t}function Om(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function gd(e){return e==null}function xb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function D$(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let a=(r.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(a=Number.parseInt(d[1]))}const i=n>a?n:a,c=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return c%u/10**i}const Qx=Symbol("evaluating");function Et(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Qx)return r===void 0&&(r=Qx,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function zi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Fs(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Xx(e){return JSON.stringify(e)}function L$(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const sI="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ed(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const j$=Om(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function dl(e){if(ed(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(ed(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function iI(e){return dl(e)?{...e}:Array.isArray(e)?[...e]:e}const $$=new Set(["string","number","symbol"]);function fl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bs(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function De(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 U$(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const z$={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 V$(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 i=Fs(e._zod.def,{get shape(){const c={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(c[u]=n.shape[u])}return zi(this,"shape",c),c},checks:[]});return Bs(e,i)}function F$(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 i=Fs(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete c[u]}return zi(this,"shape",c),c},checks:[]});return Bs(e,i)}function B$(e,t){if(!dl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(i,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Fs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return zi(this,"shape",i),i}});return Bs(e,a)}function q$(e,t){if(!dl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Fs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return zi(this,"shape",r),r}});return Bs(e,n)}function H$(e,t){const n=Fs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return zi(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Bs(e,n)}function G$(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=Fs(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return zi(this,"shape",d),d},checks:[]});return Bs(t,c)}function Z$(e,t,n){const r=Fs(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const c in n){if(!(c in i))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(i[c]=new e({type:"nonoptional",innerType:a[c]}))}else for(const c in a)i[c]=new e({type:"nonoptional",innerType:a[c]});return zi(this,"shape",i),i}});return Bs(t,r)}function Qc(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 Ri(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ah(e){return typeof e=="string"?e:e?.message}function Ds(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=ah(e.inst?._zod.def?.error?.(e))??ah(t?.error?.(e))??ah(n.customError?.(e))??ah(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function cI(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Tb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function td(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const lI=(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,a_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ob=ve("$ZodError",lI),Cm=ve("$ZodError",lI,{Parent:Error});function K$(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function W$(e,t=n=>n.message){const n={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(c=>r({issues:c}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let c=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(i))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}};return r(e),n}const Am=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new rl;if(c.issues.length){const u=new(a?.Err??e)(c.issues.map(d=>Ds(d,i,Ps())));throw sI(u,a?.callee),u}return c.value},Y$=Am(Cm),Im=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise&&(c=await c),c.issues.length){const u=new(a?.Err??e)(c.issues.map(d=>Ds(d,i,Ps())));throw sI(u,a?.callee),u}return c.value},Q$=Im(Cm),km=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new rl;return i.issues.length?{success:!1,error:new(e??Ob)(i.issues.map(c=>Ds(c,a,Ps())))}:{success:!0,data:i.value}},uI=km(Cm),Nm=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(c=>Ds(c,a,Ps())))}:{success:!0,data:i.value}},X$=Nm(Cm),J$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Am(e)(t,n,a)},e8=e=>(t,n,r)=>Am(e)(t,n,r),t8=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Im(e)(t,n,a)},n8=e=>async(t,n,r)=>Im(e)(t,n,r),r8=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return km(e)(t,n,a)},o8=e=>(t,n,r)=>km(e)(t,n,r),a8=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nm(e)(t,n,a)},s8=e=>async(t,n,r)=>Nm(e)(t,n,r),i8=/^[cC][^\s-]{8,}$/,c8=/^[0-9a-z]+$/,l8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,u8=/^[0-9a-vA-V]{20}$/,d8=/^[A-Za-z0-9]{27}$/,f8=/^[a-zA-Z0-9_-]{21}$/,h8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,p8=/^([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})$/,Jx=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)$/,m8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,g8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function v8(){return new RegExp(g8,"u")}const y8=/^(?:(?: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])$/,_8=/^(([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}|:))$/,b8=/^((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])$/,w8=/^(([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])$/,S8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dI=/^[A-Za-z0-9_-]*$/,E8=/^\+[1-9]\d{6,14}$/,fI="(?:(?:\\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])))",R8=new RegExp(`^${fI}$`);function hI(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 x8(e){return new RegExp(`^${hI(e)}$`)}function T8(e){const t=hI({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(`^${fI}T(?:${r})$`)}const O8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},C8=/^-?\d+$/,pI=/^-?\d+(?:\.\d+)?$/,A8=/^(?:true|false)$/i,I8=/^null$/i,k8=/^undefined$/i,N8=/^[^A-Z]*$/,M8=/^[^a-z]*$/,Qn=ve("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),mI={number:"number",bigint:"bigint",object:"date"},gI=ve("$ZodCheckLessThan",(e,t)=>{Qn.init(e,t);const n=mI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.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})}}),vI=ve("$ZodCheckGreaterThan",(e,t)=>{Qn.init(e,t);const n=mI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.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})}}),P8=ve("$ZodCheckMultipleOf",(e,t)=>{Qn.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):D$(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})}}),D8=ve("$ZodCheckNumberFormat",(e,t)=>{Qn.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,i]=z$[t.format];e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=C8)}),e._zod.check=c=>{const u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,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}):c.issues.push({input:u,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}}u<a&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),L8=ve("$ZodCheckMaxSize",(e,t)=>{var n;Qn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;a.size<=t.maximum||r.issues.push({origin:cI(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),j8=ve("$ZodCheckMinSize",(e,t)=>{var n;Qn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;a.size>=t.minimum||r.issues.push({origin:cI(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),$8=ve("$ZodCheckMaxLength",(e,t)=>{var n;Qn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const c=Tb(a);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),U8=ve("$ZodCheckMinLength",(e,t)=>{var n;Qn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const c=Tb(a);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),z8=ve("$ZodCheckLengthEquals",(e,t)=>{var n;Qn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!gd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,i=a.length;if(i===t.length)return;const c=Tb(a),u=i>t.length;r.issues.push({origin:c,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Mm=ve("$ZodCheckStringFormat",(e,t)=>{var n,r;Qn.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),V8=ve("$ZodCheckRegex",(e,t)=>{Mm.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})}}),F8=ve("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=N8),Mm.init(e,t)}),B8=ve("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=M8),Mm.init(e,t)}),q8=ve("$ZodCheckIncludes",(e,t)=>{Qn.init(e,t);const n=fl(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),H8=ve("$ZodCheckStartsWith",(e,t)=>{Qn.init(e,t);const n=new RegExp(`^${fl(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),G8=ve("$ZodCheckEndsWith",(e,t)=>{Qn.init(e,t);const n=new RegExp(`.*${fl(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),Z8=ve("$ZodCheckMimeType",(e,t)=>{Qn.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})}}),K8=ve("$ZodCheckOverwrite",(e,t)=>{Qn.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class W8{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
|
-
`).filter(c=>c),a=Math.min(...r.map(c=>c.length-c.trimStart().length)),i=r.map(c=>c.slice(a)).map(c=>" ".repeat(this.indent*2)+c);for(const c of i)this.content.push(c)}compile(){const t=Function,n=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,a.join(`
|
|
12
|
-
`))}}const Y8={major:4,minor:3,patch:6},Pt=ve("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Y8;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const i of a._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(c,u,d)=>{let f=Qc(c),m;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(c))continue}else if(f)continue;const g=c.issues.length,y=p._zod.check(c);if(y instanceof Promise&&d?.async===!1)throw new rl;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,c.issues.length!==g&&(f||(f=Qc(c,g)))});else{if(c.issues.length===g)continue;f||(f=Qc(c,g))}}return m?m.then(()=>c):c},i=(c,u,d)=>{if(Qc(c))return c.aborted=!0,c;const f=a(u,r,d);if(f instanceof Promise){if(d.async===!1)throw new rl;return f.then(m=>e._zod.parse(m,d))}return e._zod.parse(f,d)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const f=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(m=>i(m,c,u)):i(f,c,u)}const d=e._zod.parse(c,u);if(d instanceof Promise){if(u.async===!1)throw new rl;return d.then(f=>a(f,r,u))}return a(d,r,u)}}Et(e,"~standard",()=>({validate:a=>{try{const i=uI(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return X$(e,a).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Cb=ve("$ZodString",(e,t)=>{Pt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??O8(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}}),Jt=ve("$ZodStringFormat",(e,t)=>{Mm.init(e,t),Cb.init(e,t)}),Q8=ve("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=p8),Jt.init(e,t)}),X8=ve("$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=Jx(r))}else t.pattern??(t.pattern=Jx());Jt.init(e,t)}),J8=ve("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=m8),Jt.init(e,t)}),e9=ve("$ZodURL",(e,t)=>{Jt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),a=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.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(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.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=a.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),t9=ve("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=v8()),Jt.init(e,t)}),n9=ve("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=f8),Jt.init(e,t)}),r9=ve("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=i8),Jt.init(e,t)}),o9=ve("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=c8),Jt.init(e,t)}),a9=ve("$ZodULID",(e,t)=>{t.pattern??(t.pattern=l8),Jt.init(e,t)}),s9=ve("$ZodXID",(e,t)=>{t.pattern??(t.pattern=u8),Jt.init(e,t)}),i9=ve("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=d8),Jt.init(e,t)}),c9=ve("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=T8(t)),Jt.init(e,t)}),l9=ve("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=R8),Jt.init(e,t)}),u9=ve("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=x8(t)),Jt.init(e,t)}),d9=ve("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=h8),Jt.init(e,t)}),f9=ve("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=y8),Jt.init(e,t),e._zod.bag.format="ipv4"}),h9=ve("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=_8),Jt.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})}}}),p9=ve("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=b8),Jt.init(e,t)}),m9=ve("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=w8),Jt.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,i]=r;if(!i)throw new Error;const c=Number(i);if(`${c}`!==i)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function yI(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const g9=ve("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=S8),Jt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{yI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function v9(e){if(!dI.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return yI(n)}const y9=ve("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=dI),Jt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{v9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_9=ve("$ZodE164",(e,t)=>{t.pattern??(t.pattern=E8),Jt.init(e,t)});function b9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const w9=ve("$ZodJWT",(e,t)=>{Jt.init(e,t),e._zod.check=n=>{b9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),_I=ve("$ZodNumber",(e,t)=>{Pt.init(e,t),e._zod.pattern=e._zod.bag.pattern??pI,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const a=n.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return n;const i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...i?{received:i}:{}}),n}}),S9=ve("$ZodNumberFormat",(e,t)=>{D8.init(e,t),_I.init(e,t)}),E9=ve("$ZodBoolean",(e,t)=>{Pt.init(e,t),e._zod.pattern=A8,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),R9=ve("$ZodUndefined",(e,t)=>{Pt.init(e,t),e._zod.pattern=k8,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{const a=n.value;return typeof a>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:a,inst:e}),n}}),x9=ve("$ZodNull",(e,t)=>{Pt.init(e,t),e._zod.pattern=I8,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const a=n.value;return a===null||n.issues.push({expected:"null",code:"invalid_type",input:a,inst:e}),n}}),T9=ve("$ZodAny",(e,t)=>{Pt.init(e,t),e._zod.parse=n=>n}),O9=ve("$ZodUnknown",(e,t)=>{Pt.init(e,t),e._zod.parse=n=>n}),C9=ve("$ZodNever",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function eT(e,t,n){e.issues.length&&t.issues.push(...Ri(n,e.issues)),t.value[n]=e.value}const A9=ve("$ZodArray",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const i=[];for(let c=0;c<a.length;c++){const u=a[c],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?i.push(d.then(f=>eT(f,n,c))):eT(d,n,c)}return i.length?Promise.all(i).then(()=>n):n}});function Pp(e,t,n,r,a){if(e.issues.length){if(a&&!(n in r))return;t.issues.push(...Ri(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function bI(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=U$(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function wI(e,t,n,r,a,i){const c=[],u=a.keySet,d=a.catchall._zod,f=d.def.type,m=d.optout==="optional";for(const p in t){if(u.has(p))continue;if(f==="never"){c.push(p);continue}const g=d.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(y=>Pp(y,n,p,t,m))):Pp(g,n,p,t,m)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const I9=ve("$ZodObject",(e,t)=>{if(Pt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Om(()=>bI(t));Et(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const m=u[f]._zod;if(m.values){d[f]??(d[f]=new Set);for(const p of m.values)d[f].add(p)}}return d});const a=ed,i=t.catchall;let c;e._zod.parse=(u,d)=>{c??(c=r.value);const f=u.value;if(!a(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const m=[],p=c.shape;for(const g of c.keys){const y=p[g],b=y._zod.optout==="optional",S=y._zod.run({value:f[g],issues:[]},d);S instanceof Promise?m.push(S.then(w=>Pp(w,u,g,f,b))):Pp(S,u,g,f,b)}return i?wI(m,f,u,d,r.value,e):m.length?Promise.all(m).then(()=>u):u}}),k9=ve("$ZodObjectJIT",(e,t)=>{I9.init(e,t);const n=e._zod.parse,r=Om(()=>bI(t)),a=g=>{const y=new W8(["shape","payload","ctx"]),b=r.value,S=T=>{const O=Xx(T);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};y.write("const input = payload.value;");const w=Object.create(null);let x=0;for(const T of b.keys)w[T]=`key_${x++}`;y.write("const newResult = {};");for(const T of b.keys){const O=w[T],C=Xx(T),N=g[T]?._zod?.optout==="optional";y.write(`const ${O} = ${S(T)};`),N?y.write(`
|
|
13
|
-
if (${O}.issues.length) {
|
|
14
|
-
if (${C} in input) {
|
|
15
|
-
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
16
|
-
...iss,
|
|
17
|
-
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
18
|
-
})));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (${O}.value === undefined) {
|
|
23
|
-
if (${C} in input) {
|
|
24
|
-
newResult[${C}] = undefined;
|
|
25
|
-
}
|
|
26
|
-
} else {
|
|
27
|
-
newResult[${C}] = ${O}.value;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
`):y.write(`
|
|
31
|
-
if (${O}.issues.length) {
|
|
32
|
-
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
33
|
-
...iss,
|
|
34
|
-
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
35
|
-
})));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (${O}.value === undefined) {
|
|
39
|
-
if (${C} in input) {
|
|
40
|
-
newResult[${C}] = undefined;
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
newResult[${C}] = ${O}.value;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
`)}y.write("payload.value = newResult;"),y.write("return payload;");const E=y.compile();return(T,O)=>E(g,T,O)};let i;const c=ed,u=!oI.jitless,f=u&&j$.value,m=t.catchall;let p;e._zod.parse=(g,y)=>{p??(p=r.value);const b=g.value;return c(b)?u&&f&&y?.async===!1&&y.jitless!==!0?(i||(i=a(t.shape)),g=i(g,y),m?wI([],b,g,y,p,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),g)}});function tT(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const a=e.filter(i=>!Qc(i));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(c=>Ds(c,r,Ps())))}),t)}const SI=ve("$ZodUnion",(e,t)=>{Pt.init(e,t),Et(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Et(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Et(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),Et(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${a.map(i=>xb(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(a,i)=>{if(n)return r(a,i);let c=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:a.value,issues:[]},i);if(f instanceof Promise)u.push(f),c=!0;else{if(f.issues.length===0)return f;u.push(f)}}return c?Promise.all(u).then(d=>tT(d,a,e,i)):tT(u,a,e,i)}}),N9=ve("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,SI.init(e,t);const n=e._zod.parse;Et(e._zod,"propValues",()=>{const a={};for(const i of t.options){const c=i._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,d]of Object.entries(c)){a[u]||(a[u]=new Set);for(const f of d)a[u].add(f)}}return a});const r=Om(()=>{const a=t.options,i=new Map;for(const c of a){const u=c._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,c)}}return i});e._zod.parse=(a,i)=>{const c=a.value;if(!ed(c))return a.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),a;const u=r.value.get(c?.[t.discriminator]);return u?u._zod.run(a,i):t.unionFallback?n(a,i):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),a)}}),M9=ve("$ZodIntersection",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},r),c=t.right._zod.run({value:a,issues:[]},r);return i instanceof Promise||c instanceof Promise?Promise.all([i,c]).then(([d,f])=>nT(n,d,f)):nT(n,i,c)}});function s_(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(dl(e)&&dl(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),a={...e,...t};for(const i of r){const c=s_(e[i],t[i]);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};a[i]=c.data}return{valid:!0,data:a}}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 a=e[r],i=t[r],c=s_(a,i);if(!c.valid)return{valid:!1,mergeErrorPath:[r,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function nT(e,t,n){const r=new Map;let a;for(const u of t.issues)if(u.code==="unrecognized_keys"){a??(a=u);for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(u);const i=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&a&&e.issues.push({...a,keys:i}),Qc(e))return e;const c=s_(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const P9=ve("$ZodTuple",(e,t)=>{Pt.init(e,t);const n=t.items;e._zod.parse=(r,a)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const c=[],u=[...n].reverse().findIndex(m=>m._zod.optin!=="optional"),d=u===-1?0:n.length-u;if(!t.rest){const m=i.length>n.length,p=i.length<d-1;if(m||p)return r.issues.push({...m?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),r}let f=-1;for(const m of n){if(f++,f>=i.length&&f>=d)continue;const p=m._zod.run({value:i[f],issues:[]},a);p instanceof Promise?c.push(p.then(g=>sh(g,r,f))):sh(p,r,f)}if(t.rest){const m=i.slice(n.length);for(const p of m){f++;const g=t.rest._zod.run({value:p,issues:[]},a);g instanceof Promise?c.push(g.then(y=>sh(y,r,f))):sh(g,r,f)}}return c.length?Promise.all(c).then(()=>r):r}});function sh(e,t,n){e.issues.length&&t.issues.push(...Ri(n,e.issues)),t.value[n]=e.value}const D9=ve("$ZodRecord",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!dl(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;const i=[],c=t.keyType._zod.values;if(c){n.value={};const u=new Set;for(const f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);const m=t.valueType._zod.run({value:a[f],issues:[]},r);m instanceof Promise?i.push(m.then(p=>{p.issues.length&&n.issues.push(...Ri(f,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Ri(f,m.issues)),n.value[f]=m.value)}let d;for(const f in a)u.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:d})}else{n.value={};for(const u of Reflect.ownKeys(a)){if(u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&pI.test(u)&&d.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?n.value[u]=a[u]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>Ds(p,r,Ps())),input:u,path:[u],inst:e});continue}const m=t.valueType._zod.run({value:a[u],issues:[]},r);m instanceof Promise?i.push(m.then(p=>{p.issues.length&&n.issues.push(...Ri(u,p.issues)),n.value[d.value]=p.value})):(m.issues.length&&n.issues.push(...Ri(u,m.issues)),n.value[d.value]=m.value)}}return i.length?Promise.all(i).then(()=>n):n}}),L9=ve("$ZodEnum",(e,t)=>{Pt.init(e,t);const n=aI(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>$$.has(typeof a)).map(a=>typeof a=="string"?fl(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const c=a.value;return r.has(c)||a.issues.push({code:"invalid_value",values:n,input:c,inst:e}),a}}),j9=ve("$ZodLiteral",(e,t)=>{if(Pt.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"?fl(r):r?fl(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,a)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),$9=ve("$ZodFile",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;return a instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:a,inst:e}),n}}),U9=ve("$ZodTransform",(e,t)=>{Pt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new rI(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(c=>(n.value=c,n));if(a instanceof Promise)throw new rl;return n.value=a,n}});function rT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const EI=ve("$ZodOptional",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Et(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Et(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>rT(i,n.value)):rT(a,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),z9=ve("$ZodExactOptional",(e,t)=>{EI.init(e,t),Et(e._zod,"values",()=>t.innerType._zod.values),Et(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),V9=ve("$ZodNullable",(e,t)=>{Pt.init(e,t),Et(e._zod,"optin",()=>t.innerType._zod.optin),Et(e._zod,"optout",()=>t.innerType._zod.optout),Et(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xb(n.source)}|null)$`):void 0}),Et(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)}),F9=ve("$ZodDefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",Et(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 a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>oT(i,t)):oT(a,t)}});function oT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const B9=ve("$ZodPrefault",(e,t)=>{Pt.init(e,t),e._zod.optin="optional",Et(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))}),q9=ve("$ZodNonOptional",(e,t)=>{Pt.init(e,t),Et(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 a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>aT(i,e)):aT(a,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 H9=ve("$ZodCatch",(e,t)=>{Pt.init(e,t),Et(e._zod,"optin",()=>t.innerType._zod.optin),Et(e._zod,"optout",()=>t.innerType._zod.optout),Et(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>Ds(c,r,Ps()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>Ds(i,r,Ps()))},input:n.value}),n.issues=[]),n)}}),G9=ve("$ZodPipe",(e,t)=>{Pt.init(e,t),Et(e._zod,"values",()=>t.in._zod.values),Et(e._zod,"optin",()=>t.in._zod.optin),Et(e._zod,"optout",()=>t.out._zod.optout),Et(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(c=>ih(c,t.in,r)):ih(i,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(i=>ih(i,t.out,r)):ih(a,t.out,r)}});function ih(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Z9=ve("$ZodReadonly",(e,t)=>{Pt.init(e,t),Et(e._zod,"propValues",()=>t.innerType._zod.propValues),Et(e._zod,"values",()=>t.innerType._zod.values),Et(e._zod,"optin",()=>t.innerType?._zod?.optin),Et(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(sT):sT(a)}});function sT(e){return e.value=Object.freeze(e.value),e}const K9=ve("$ZodLazy",(e,t)=>{Pt.init(e,t),Et(e._zod,"innerType",()=>t.getter()),Et(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Et(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Et(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Et(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),W9=ve("$ZodCustom",(e,t)=>{Qn.init(e,t),Pt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(i=>iT(i,n,r,e));iT(a,n,r,e)}});function iT(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(td(a))}}var cT;class Y9{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 a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Q9(){return new Y9}(cT=globalThis).__zod_globalRegistry??(cT.__zod_globalRegistry=Q9());const Nu=globalThis.__zod_globalRegistry;function X9(e,t){return new e({type:"string",...De(t)})}function J9(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...De(t)})}function lT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...De(t)})}function eU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...De(t)})}function tU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...De(t)})}function nU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...De(t)})}function rU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...De(t)})}function RI(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...De(t)})}function oU(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...De(t)})}function aU(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...De(t)})}function sU(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...De(t)})}function iU(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...De(t)})}function cU(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...De(t)})}function lU(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...De(t)})}function uU(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...De(t)})}function dU(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...De(t)})}function fU(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...De(t)})}function hU(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...De(t)})}function pU(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...De(t)})}function mU(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...De(t)})}function gU(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...De(t)})}function vU(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...De(t)})}function yU(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...De(t)})}function _U(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...De(t)})}function bU(e,t){return new e({type:"string",format:"date",check:"string_format",...De(t)})}function wU(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...De(t)})}function SU(e,t){return new e({type:"string",format:"duration",check:"string_format",...De(t)})}function EU(e,t){return new e({type:"number",checks:[],...De(t)})}function RU(e,t){return new e({type:"number",coerce:!0,checks:[],...De(t)})}function xU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...De(t)})}function TU(e,t){return new e({type:"boolean",...De(t)})}function OU(e,t){return new e({type:"boolean",coerce:!0,...De(t)})}function CU(e,t){return new e({type:"undefined",...De(t)})}function AU(e,t){return new e({type:"null",...De(t)})}function IU(e){return new e({type:"any"})}function kU(e){return new e({type:"unknown"})}function NU(e,t){return new e({type:"never",...De(t)})}function uT(e,t){return new gI({check:"less_than",...De(t),value:e,inclusive:!1})}function Hy(e,t){return new gI({check:"less_than",...De(t),value:e,inclusive:!0})}function dT(e,t){return new vI({check:"greater_than",...De(t),value:e,inclusive:!1})}function Gy(e,t){return new vI({check:"greater_than",...De(t),value:e,inclusive:!0})}function fT(e,t){return new P8({check:"multiple_of",...De(t),value:e})}function MU(e,t){return new L8({check:"max_size",...De(t),maximum:e})}function PU(e,t){return new j8({check:"min_size",...De(t),minimum:e})}function xI(e,t){return new $8({check:"max_length",...De(t),maximum:e})}function Dp(e,t){return new U8({check:"min_length",...De(t),minimum:e})}function TI(e,t){return new z8({check:"length_equals",...De(t),length:e})}function DU(e,t){return new V8({check:"string_format",format:"regex",...De(t),pattern:e})}function LU(e){return new F8({check:"string_format",format:"lowercase",...De(e)})}function jU(e){return new B8({check:"string_format",format:"uppercase",...De(e)})}function $U(e,t){return new q8({check:"string_format",format:"includes",...De(t),includes:e})}function UU(e,t){return new H8({check:"string_format",format:"starts_with",...De(t),prefix:e})}function zU(e,t){return new G8({check:"string_format",format:"ends_with",...De(t),suffix:e})}function VU(e,t){return new Z8({check:"mime_type",mime:e,...De(t)})}function Sl(e){return new K8({check:"overwrite",tx:e})}function FU(e){return Sl(t=>t.normalize(e))}function BU(){return Sl(e=>e.trim())}function qU(){return Sl(e=>e.toLowerCase())}function HU(){return Sl(e=>e.toUpperCase())}function GU(){return Sl(e=>L$(e))}function ZU(e,t,n){return new e({type:"array",element:t,...De(n)})}function KU(e,t){return new e({type:"file",...De(t)})}function WU(e,t,n){const r=De(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function YU(e,t,n){return new e({type:"custom",check:"custom",fn:t,...De(n)})}function QU(e){const t=XU(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(td(r,n.value,t._zod.def));else{const a=r;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),n.issues.push(td(a))}},e(n.value,n)));return t}function XU(e,t){const n=new Qn({check:"custom",...De(t)});return n._zod.check=e,n}function Lp(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??Nu,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 Gt(e,t,n={path:[],schemaPath:[]}){var r;const a=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);const u=e._zod.toJSONSchema?.();if(u)c.schema=u;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const g=c.schema,y=t.processors[a.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);y(e,t,g,m)}const p=e._zod.parent;p&&(c.ref||(c.ref=p),Gt(p,t,m),t.seen.get(p).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(c.schema,d),t.io==="input"&&lr(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((r=c.schema).default??(r.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function jp(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 c of e.seen.entries()){const u=e.metadataRegistry.get(c[0])?.id;if(u){const d=r.get(u);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,c[0])}}const a=c=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(c[0])?.id,g=e.external.uri??(b=>b);if(p)return{ref:g(p)};const y=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=y,{defId:y,ref:`${g("__shared")}#/${u}/${y}`}}if(c[1]===n)return{ref:"#"};const f=`#/${u}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},i=c=>{if(c[1].schema.$ref)return;const u=c[1],{ref:d,defId:f}=a(c);u.def={...u.schema},f&&(u.defId=f);const m=u.schema;for(const p in m)delete m[p];m.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const u=c[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
47
|
-
|
|
48
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const u=c[1];if(t===c[0]){i(c);continue}if(e.external){const f=e.external.registry.get(c[0])?.id;if(t!==c[0]&&f){i(c);continue}}if(e.metadataRegistry.get(c[0])?.id){i(c);continue}if(u.cycle){i(c);continue}if(u.count>1&&e.reused==="ref"){i(c);continue}}}function $p(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const u=e.seen.get(c);if(u.ref===null)return;const d=u.def??u.schema,f={...d},m=u.ref;if(u.ref=null,m){r(m);const g=e.seen.get(m),y=g.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(y)):Object.assign(d,y),Object.assign(d,f),c._zod.parent===m)for(const S in d)S==="$ref"||S==="allOf"||S in f||delete d[S];if(y.$ref&&g.def)for(const S in d)S==="$ref"||S==="allOf"||S in g.def&&JSON.stringify(d[S])===JSON.stringify(g.def[S])&&delete d[S]}const p=c._zod.parent;if(p&&p!==m){r(p);const g=e.seen.get(p);if(g?.schema.$ref&&(d.$ref=g.schema.$ref,g.def))for(const y in d)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(d[y])===JSON.stringify(g.def[y])&&delete d[y]}e.override({zodSchema:c,jsonSchema:d,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(c)}Object.assign(a,n.def??n.schema);const i=e.external?.defs??{};for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{const c=JSON.parse(JSON.stringify(a));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Up(t,"input",e.processors),output:Up(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function lr(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 lr(r.element,n);if(r.type==="set")return lr(r.valueType,n);if(r.type==="lazy")return lr(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 lr(r.innerType,n);if(r.type==="intersection")return lr(r.left,n)||lr(r.right,n);if(r.type==="record"||r.type==="map")return lr(r.keyType,n)||lr(r.valueType,n);if(r.type==="pipe")return lr(r.in,n)||lr(r.out,n);if(r.type==="object"){for(const a in r.shape)if(lr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(lr(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(lr(a,n))return!0;return!!(r.rest&&lr(r.rest,n))}return!1}const JU=(e,t={})=>n=>{const r=Lp({...n,processors:t});return Gt(e,r),jp(r,e),$p(r,e)},Up=(e,t,n={})=>r=>{const{libraryOptions:a,target:i}=r??{},c=Lp({...a??{},target:i,io:t,processors:n});return Gt(e,c),jp(c,e),$p(c,e)},e7={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},OI=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:i,maximum:c,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof c=="number"&&(a.maxLength=c),u&&(a.format=e7[u]??u,a.format===""&&delete a.format,u==="time"&&delete a.format),f&&(a.contentEncoding=f),d&&d.size>0){const m=[...d];m.length===1?a.pattern=m[0].source:m.length>1&&(a.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},CI=(e,t,n,r)=>{const a=n,{minimum:i,maximum:c,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:m}=e._zod.bag;typeof u=="string"&&u.includes("int")?a.type="integer":a.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.minimum=m,a.exclusiveMinimum=!0):a.exclusiveMinimum=m),typeof i=="number"&&(a.minimum=i,typeof m=="number"&&t.target!=="draft-04"&&(m>=i?delete a.minimum:delete a.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.maximum=f,a.exclusiveMaximum=!0):a.exclusiveMaximum=f),typeof c=="number"&&(a.maximum=c,typeof f=="number"&&t.target!=="draft-04"&&(f<=c?delete a.maximum:delete a.exclusiveMaximum)),typeof d=="number"&&(a.multipleOf=d)},AI=(e,t,n,r)=>{n.type="boolean"},t7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},n7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},II=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},kI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},r7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},NI=(e,t,n,r)=>{n.not={}},MI=(e,t,n,r)=>{},PI=(e,t,n,r)=>{},o7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},DI=(e,t,n,r)=>{const a=e._zod.def,i=aI(a.entries);i.every(c=>typeof c=="number")&&(n.type="number"),i.every(c=>typeof c=="string")&&(n.type="string"),n.enum=i},LI=(e,t,n,r)=>{const a=e._zod.def,i=[];for(const c of a.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(c))}else i.push(c);if(i.length!==0)if(i.length===1){const c=i[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else i.every(c=>typeof c=="number")&&(n.type="number"),i.every(c=>typeof c=="string")&&(n.type="string"),i.every(c=>typeof c=="boolean")&&(n.type="boolean"),i.every(c=>c===null)&&(n.type="null"),n.enum=i},a7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},s7=(e,t,n,r)=>{const a=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");a.type="string",a.pattern=i.source},jI=(e,t,n,r)=>{const a=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:u,mime:d}=e._zod.bag;c!==void 0&&(i.minLength=c),u!==void 0&&(i.maxLength=u),d?d.length===1?(i.contentMediaType=d[0],Object.assign(a,i)):(Object.assign(a,i),a.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(a,i)},i7=(e,t,n,r)=>{n.type="boolean"},$I=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},c7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},UI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},l7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},u7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},zI=(e,t,n,r)=>{const a=n,i=e._zod.def,{minimum:c,maximum:u}=e._zod.bag;typeof c=="number"&&(a.minItems=c),typeof u=="number"&&(a.maxItems=u),a.type="array",a.items=Gt(i.element,t,{...r,path:[...r.path,"items"]})},VI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object",a.properties={};const c=i.shape;for(const f in c)a.properties[f]=Gt(c[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(c)),d=new Set([...u].filter(f=>{const m=i.shape[f]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(a.required=Array.from(d)),i.catchall?._zod.def.type==="never"?a.additionalProperties=!1:i.catchall?i.catchall&&(a.additionalProperties=Gt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},FI=(e,t,n,r)=>{const a=e._zod.def,i=a.inclusive===!1,c=a.options.map((u,d)=>Gt(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=c:n.anyOf=c},BI=(e,t,n,r)=>{const a=e._zod.def,i=Gt(a.left,t,{...r,path:[...r.path,"allOf",0]}),c=Gt(a.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(i)?i.allOf:[i],...u(c)?c.allOf:[c]];n.allOf=d},qI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="array";const c=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((g,y)=>Gt(g,t,{...r,path:[...r.path,c,y]})),f=i.rest?Gt(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(a.prefixItems=d,f&&(a.items=f)):t.target==="openapi-3.0"?(a.items={anyOf:d},f&&a.items.anyOf.push(f),a.minItems=d.length,f||(a.maxItems=d.length)):(a.items=d,f&&(a.additionalItems=f));const{minimum:m,maximum:p}=e._zod.bag;typeof m=="number"&&(a.minItems=m),typeof p=="number"&&(a.maxItems=p)},HI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object";const c=i.keyType,d=c._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){const m=Gt(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});a.patternProperties={};for(const p of d)a.patternProperties[p.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(a.propertyNames=Gt(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),a.additionalProperties=Gt(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=c._zod.values;if(f){const m=[...f].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(a.required=m)}},GI=(e,t,n,r)=>{const a=e._zod.def,i=Gt(a.innerType,t,r),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},ZI=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},KI=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},WI=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},YI=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType;let c;try{c=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},QI=(e,t,n,r)=>{const a=e._zod.def,i=t.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;Gt(i,t,r);const c=t.seen.get(e);c.ref=i},XI=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},d7=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},Ab=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},JI=(e,t,n,r)=>{const a=e._zod.innerType;Gt(a,t,r);const i=t.seen.get(e);i.ref=a},hT={string:OI,number:CI,boolean:AI,bigint:t7,symbol:n7,null:II,undefined:kI,void:r7,never:NI,any:MI,unknown:PI,date:o7,enum:DI,literal:LI,nan:a7,template_literal:s7,file:jI,success:i7,custom:$I,function:c7,transform:UI,map:l7,set:u7,array:zI,object:VI,union:FI,intersection:BI,tuple:qI,record:HI,nullable:GI,nonoptional:ZI,default:KI,prefault:WI,catch:YI,pipe:QI,readonly:XI,promise:d7,optional:Ab,lazy:JI};function Coe(e,t){if("_idmap"in e){const r=e,a=Lp({...t,processors:hT}),i={};for(const d of r._idmap.entries()){const[f,m]=d;Gt(m,a)}const c={},u={registry:r,uri:t?.uri,defs:i};a.external=u;for(const d of r._idmap.entries()){const[f,m]=d;jp(a,m),c[f]=$p(a,m)}if(Object.keys(i).length>0){const d=a.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[d]:i}}return{schemas:c}}const n=Lp({...t,processors:hT});return Gt(e,n),jp(n,e),$p(n,e)}const f7=ve("ZodISODateTime",(e,t)=>{c9.init(e,t),nn.init(e,t)});function ek(e){return _U(f7,e)}const h7=ve("ZodISODate",(e,t)=>{l9.init(e,t),nn.init(e,t)});function p7(e){return bU(h7,e)}const m7=ve("ZodISOTime",(e,t)=>{u9.init(e,t),nn.init(e,t)});function g7(e){return wU(m7,e)}const v7=ve("ZodISODuration",(e,t)=>{d9.init(e,t),nn.init(e,t)});function y7(e){return SU(v7,e)}const _7=(e,t)=>{Ob.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>W$(e,n)},flatten:{value:n=>K$(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,a_,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,a_,2)}},isEmpty:{get(){return e.issues.length===0}}})},vo=ve("ZodError",_7,{Parent:Error}),b7=Am(vo),w7=Im(vo),S7=km(vo),E7=Nm(vo),R7=J$(vo),x7=e8(vo),T7=t8(vo),O7=n8(vo),C7=r8(vo),A7=o8(vo),I7=a8(vo),k7=s8(vo),zt=ve("ZodType",(e,t)=>(Pt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Up(e,"input"),output:Up(e,"output")}}),e.toJSONSchema=JU(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Fs(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)=>Bs(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>b7(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>S7(e,n,r),e.parseAsync=async(n,r)=>w7(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>E7(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>R7(e,n,r),e.decode=(n,r)=>x7(e,n,r),e.encodeAsync=async(n,r)=>T7(e,n,r),e.decodeAsync=async(n,r)=>O7(e,n,r),e.safeEncode=(n,r)=>C7(e,n,r),e.safeDecode=(n,r)=>A7(e,n,r),e.safeEncodeAsync=async(n,r)=>I7(e,n,r),e.safeDecodeAsync=async(n,r)=>k7(e,n,r),e.refine=(n,r)=>e.check(Sz(n,r)),e.superRefine=n=>e.check(Ez(n)),e.overwrite=n=>e.check(Sl(n)),e.optional=()=>sn(e),e.exactOptional=()=>lz(e),e.nullable=()=>vT(e),e.nullish=()=>sn(vT(e)),e.nonoptional=n=>mz(e,n),e.array=()=>we(e),e.or=n=>xt([e,n]),e.and=n=>yd(e,n),e.transform=n=>c_(e,ck(n)),e.default=n=>fz(e,n),e.prefault=n=>pz(e,n),e.catch=n=>vz(e,n),e.pipe=n=>c_(e,n),e.readonly=()=>bz(e),e.describe=n=>{const r=e.clone();return Nu.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Nu.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Nu.get(e);const r=e.clone();return Nu.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),tk=ve("_ZodString",(e,t)=>{Cb.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>OI(e,r,a);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(DU(...r)),e.includes=(...r)=>e.check($U(...r)),e.startsWith=(...r)=>e.check(UU(...r)),e.endsWith=(...r)=>e.check(zU(...r)),e.min=(...r)=>e.check(Dp(...r)),e.max=(...r)=>e.check(xI(...r)),e.length=(...r)=>e.check(TI(...r)),e.nonempty=(...r)=>e.check(Dp(1,...r)),e.lowercase=r=>e.check(LU(r)),e.uppercase=r=>e.check(jU(r)),e.trim=()=>e.check(BU()),e.normalize=(...r)=>e.check(FU(...r)),e.toLowerCase=()=>e.check(qU()),e.toUpperCase=()=>e.check(HU()),e.slugify=()=>e.check(GU())}),Pm=ve("ZodString",(e,t)=>{Cb.init(e,t),tk.init(e,t),e.email=n=>e.check(J9(N7,n)),e.url=n=>e.check(RI(nk,n)),e.jwt=n=>e.check(yU(K7,n)),e.emoji=n=>e.check(oU(P7,n)),e.guid=n=>e.check(lT(pT,n)),e.uuid=n=>e.check(eU(ch,n)),e.uuidv4=n=>e.check(tU(ch,n)),e.uuidv6=n=>e.check(nU(ch,n)),e.uuidv7=n=>e.check(rU(ch,n)),e.nanoid=n=>e.check(aU(D7,n)),e.guid=n=>e.check(lT(pT,n)),e.cuid=n=>e.check(sU(L7,n)),e.cuid2=n=>e.check(iU(j7,n)),e.ulid=n=>e.check(cU($7,n)),e.base64=n=>e.check(mU(H7,n)),e.base64url=n=>e.check(gU(G7,n)),e.xid=n=>e.check(lU(U7,n)),e.ksuid=n=>e.check(uU(z7,n)),e.ipv4=n=>e.check(dU(V7,n)),e.ipv6=n=>e.check(fU(F7,n)),e.cidrv4=n=>e.check(hU(B7,n)),e.cidrv6=n=>e.check(pU(q7,n)),e.e164=n=>e.check(vU(Z7,n)),e.datetime=n=>e.check(ek(n)),e.date=n=>e.check(p7(n)),e.time=n=>e.check(g7(n)),e.duration=n=>e.check(y7(n))});function M(e){return X9(Pm,e)}const nn=ve("ZodStringFormat",(e,t)=>{Jt.init(e,t),tk.init(e,t)}),N7=ve("ZodEmail",(e,t)=>{J8.init(e,t),nn.init(e,t)}),pT=ve("ZodGUID",(e,t)=>{Q8.init(e,t),nn.init(e,t)}),ch=ve("ZodUUID",(e,t)=>{X8.init(e,t),nn.init(e,t)}),nk=ve("ZodURL",(e,t)=>{e9.init(e,t),nn.init(e,t)});function M7(e){return RI(nk,e)}const P7=ve("ZodEmoji",(e,t)=>{t9.init(e,t),nn.init(e,t)}),D7=ve("ZodNanoID",(e,t)=>{n9.init(e,t),nn.init(e,t)}),L7=ve("ZodCUID",(e,t)=>{r9.init(e,t),nn.init(e,t)}),j7=ve("ZodCUID2",(e,t)=>{o9.init(e,t),nn.init(e,t)}),$7=ve("ZodULID",(e,t)=>{a9.init(e,t),nn.init(e,t)}),U7=ve("ZodXID",(e,t)=>{s9.init(e,t),nn.init(e,t)}),z7=ve("ZodKSUID",(e,t)=>{i9.init(e,t),nn.init(e,t)}),V7=ve("ZodIPv4",(e,t)=>{f9.init(e,t),nn.init(e,t)}),F7=ve("ZodIPv6",(e,t)=>{h9.init(e,t),nn.init(e,t)}),B7=ve("ZodCIDRv4",(e,t)=>{p9.init(e,t),nn.init(e,t)}),q7=ve("ZodCIDRv6",(e,t)=>{m9.init(e,t),nn.init(e,t)}),H7=ve("ZodBase64",(e,t)=>{g9.init(e,t),nn.init(e,t)}),G7=ve("ZodBase64URL",(e,t)=>{y9.init(e,t),nn.init(e,t)}),Z7=ve("ZodE164",(e,t)=>{_9.init(e,t),nn.init(e,t)}),K7=ve("ZodJWT",(e,t)=>{w9.init(e,t),nn.init(e,t)}),$a=ve("ZodNumber",(e,t)=>{_I.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>CI(e,r,a),e.gt=(r,a)=>e.check(dT(r,a)),e.gte=(r,a)=>e.check(Gy(r,a)),e.min=(r,a)=>e.check(Gy(r,a)),e.lt=(r,a)=>e.check(uT(r,a)),e.lte=(r,a)=>e.check(Hy(r,a)),e.max=(r,a)=>e.check(Hy(r,a)),e.int=r=>e.check(mT(r)),e.safe=r=>e.check(mT(r)),e.positive=r=>e.check(dT(0,r)),e.nonnegative=r=>e.check(Gy(0,r)),e.negative=r=>e.check(uT(0,r)),e.nonpositive=r=>e.check(Hy(0,r)),e.multipleOf=(r,a)=>e.check(fT(r,a)),e.step=(r,a)=>e.check(fT(r,a)),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 $e(e){return EU($a,e)}const W7=ve("ZodNumberFormat",(e,t)=>{S9.init(e,t),$a.init(e,t)});function mT(e){return xU(W7,e)}const rk=ve("ZodBoolean",(e,t)=>{E9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AI(e,n,r)});function We(e){return TU(rk,e)}const Y7=ve("ZodUndefined",(e,t)=>{R9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kI(e,n)});function Aoe(e){return CU(Y7,e)}const Q7=ve("ZodNull",(e,t)=>{x9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>II(e,n,r)});function vd(e){return AU(Q7,e)}const X7=ve("ZodAny",(e,t)=>{T9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>MI()});function Gr(){return IU(X7)}const J7=ve("ZodUnknown",(e,t)=>{O9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>PI()});function Je(){return kU(J7)}const ez=ve("ZodNever",(e,t)=>{C9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>NI(e,n,r)});function zp(e){return NU(ez,e)}const ok=ve("ZodArray",(e,t)=>{A9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>zI(e,n,r,a),e.element=t.element,e.min=(n,r)=>e.check(Dp(n,r)),e.nonempty=n=>e.check(Dp(1,n)),e.max=(n,r)=>e.check(xI(n,r)),e.length=(n,r)=>e.check(TI(n,r)),e.unwrap=()=>e.element});function we(e,t){return ZU(ok,e,t)}const Dm=ve("ZodObject",(e,t)=>{k9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>VI(e,n,r,a),Et(e,"shape",()=>t.shape),e.keyof=()=>Tt(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Je()}),e.loose=()=>e.clone({...e._zod.def,catchall:Je()}),e.strict=()=>e.clone({...e._zod.def,catchall:zp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>B$(e,n),e.safeExtend=n=>q$(e,n),e.merge=n=>H$(e,n),e.pick=n=>V$(e,n),e.omit=n=>F$(e,n),e.partial=(...n)=>G$(lk,e,n[0]),e.required=(...n)=>Z$(uk,e,n[0])});function oe(e,t){const n={type:"object",shape:e??{},...De(t)};return new Dm(n)}function Ioe(e,t){return new Dm({type:"object",shape:e,catchall:zp(),...De(t)})}function Wn(e,t){return new Dm({type:"object",shape:e,catchall:Je(),...De(t)})}const ak=ve("ZodUnion",(e,t)=>{SI.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>FI(e,n,r,a),e.options=t.options});function xt(e,t){return new ak({type:"union",options:e,...De(t)})}const tz=ve("ZodDiscriminatedUnion",(e,t)=>{ak.init(e,t),N9.init(e,t)});function sk(e,t,n){return new tz({type:"union",options:t,discriminator:e,...De(n)})}const nz=ve("ZodIntersection",(e,t)=>{M9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>BI(e,n,r,a)});function yd(e,t){return new nz({type:"intersection",left:e,right:t})}const rz=ve("ZodTuple",(e,t)=>{P9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>qI(e,n,r,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function gT(e,t,n){const r=t instanceof Pt,a=r?n:t,i=r?t:null;return new rz({type:"tuple",items:e,rest:i,...De(a)})}const ik=ve("ZodRecord",(e,t)=>{D9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>HI(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function at(e,t,n){return new ik({type:"record",keyType:e,valueType:t,...De(n)})}const i_=ve("ZodEnum",(e,t)=>{L9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>DI(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const i={};for(const c of r)if(n.has(c))i[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new i_({...t,checks:[],...De(a),entries:i})},e.exclude=(r,a)=>{const i={...t.entries};for(const c of r)if(n.has(c))delete i[c];else throw new Error(`Key ${c} not found in enum`);return new i_({...t,checks:[],...De(a),entries:i})}});function Tt(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new i_({type:"enum",entries:n,...De(t)})}const oz=ve("ZodLiteral",(e,t)=>{j9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>LI(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 Le(e,t){return new oz({type:"literal",values:Array.isArray(e)?e:[e],...De(t)})}const az=ve("ZodFile",(e,t)=>{$9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>jI(e,n,r),e.min=(n,r)=>e.check(PU(n,r)),e.max=(n,r)=>e.check(MU(n,r)),e.mime=(n,r)=>e.check(VU(Array.isArray(n)?n:[n],r))});function sz(e){return KU(az,e)}const iz=ve("ZodTransform",(e,t)=>{U9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>UI(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new rI(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(td(i,n.value,t));else{const c=i;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(td(c))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n)):(n.value=a,n)}});function ck(e){return new iz({type:"transform",transform:e})}const lk=ve("ZodOptional",(e,t)=>{EI.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Ab(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function sn(e){return new lk({type:"optional",innerType:e})}const cz=ve("ZodExactOptional",(e,t)=>{z9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Ab(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function lz(e){return new cz({type:"optional",innerType:e})}const uz=ve("ZodNullable",(e,t)=>{V9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>GI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vT(e){return new uz({type:"nullable",innerType:e})}const dz=ve("ZodDefault",(e,t)=>{F9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>KI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fz(e,t){return new dz({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():iI(t)}})}const hz=ve("ZodPrefault",(e,t)=>{B9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>WI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function pz(e,t){return new hz({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():iI(t)}})}const uk=ve("ZodNonOptional",(e,t)=>{q9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ZI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function mz(e,t){return new uk({type:"nonoptional",innerType:e,...De(t)})}const gz=ve("ZodCatch",(e,t)=>{H9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>YI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vz(e,t){return new gz({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const yz=ve("ZodPipe",(e,t)=>{G9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>QI(e,n,r,a),e.in=t.in,e.out=t.out});function c_(e,t){return new yz({type:"pipe",in:e,out:t})}const _z=ve("ZodReadonly",(e,t)=>{Z9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>XI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function bz(e){return new _z({type:"readonly",innerType:e})}const wz=ve("ZodLazy",(e,t)=>{K9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>JI(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function Yr(e){return new wz({type:"lazy",getter:e})}const Ib=ve("ZodCustom",(e,t)=>{W9.init(e,t),zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$I(e,n)});function dk(e,t){return WU(Ib,e??(()=>!0),t)}function Sz(e,t={}){return YU(Ib,e,t)}function Ez(e){return QU(e)}function koe(e,t={}){const n=new Ib({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...De(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 kb(e,t){return c_(ck(e),t)}const Rz={custom:"custom"};function fk(e){return RU($a,e)}function yT(e){return OU(rk,e)}function Ce(...e){return nI(Sb(e))}function xz(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function hn({error:e,localization:t,localizeErrors:n=!0}){var r;const a="Request failed";if(!n)return e?.message?e.message:(r=e?.error)!=null&&r.message?e.error.message:a;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const i=e.error.code;if(t?.[i])return t[i]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||a}function Vi(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function l_(e,t){for(const n in e)if(e[n]===t)return n}function nd(e,t){let n=M().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 Tz={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"},Oz={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"},Cz={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."},Az={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."},Iz={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},kz={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},Nz={...Iz,...kz},Mz={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},Pz={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},Dz={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Lz={INVALID_SESSION_TOKEN:"Invalid session token"},jz={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"},$z={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"},Uz={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"},zz={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"},Vz={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"},Fz={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"},Bz={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"},qz={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",...Az,...Tz,...Oz,...Cz,...Nz,...Mz,...Pz,...Dz,...Lz,...jz,...$z,...Uz,...zz,...Vz,...Fz,...Bz},Hz={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"},_T={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},bT={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function Gz(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 Zz=e=>{switch(e){case"success":return Yz;case"info":return Xz;case"warning":return Qz;case"error":return Jz;default:return null}},Kz=Array(12).fill(0),Wz=({visible:e,className:t})=>le.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},le.createElement("div",{className:"sonner-spinner"},Kz.map((n,r)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Yz=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),Qz=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.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"})),Xz=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),Jz=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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"})),eV=le.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"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),tV=()=>{const[e,t]=le.useState(document.hidden);return le.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let u_=1;class nV{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,...a}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:u_++,c=this.toasts.find(d=>d.id===i),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),c?this.toasts=this.toasts.map(d=>d.id===i?(this.publish({...d,...t,id:i,title:r}),{...d,...t,id:i,dismissible:u,title:r}):d):this.addToast({title:r,...a,dismissible:u,id:i}),i},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 a=Promise.resolve(t instanceof Function?t():t);let i=r!==void 0,c;const u=a.then(async f=>{if(c=["resolve",f],le.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(oV(f)&&!f.ok){i=!1;const p=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,b=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...b})}else if(f instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,b=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...b})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,b=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:g,...b})}}).catch(async f=>{if(c=["reject",f],n.error!==void 0){i=!1;const m=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,y=typeof m=="object"&&!le.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:p,...y})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,m)=>u.then(()=>c[0]==="reject"?m(c[1]):f(c[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||u_++;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 Tr=new nV,rV=(e,t)=>{const n=t?.id||u_++;return Tr.addToast({title:e,...t,id:n}),n},oV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",aV=rV,sV=()=>Tr.toasts,iV=()=>Tr.getActiveToasts(),wT=Object.assign(aV,{success:Tr.success,info:Tr.info,warning:Tr.warning,error:Tr.error,custom:Tr.custom,message:Tr.message,promise:Tr.promise,dismiss:Tr.dismiss,loading:Tr.loading},{getHistory:sV,getToasts:iV});Gz("[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 lh(e){return e.label!==void 0}const cV=3,lV="24px",uV="16px",ST=4e3,dV=356,fV=14,hV=45,pV=200;function Zo(...e){return e.filter(Boolean).join(" ")}function mV(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const gV=e=>{var t,n,r,a,i,c,u,d,f;const{invert:m,toast:p,unstyled:g,interacting:y,setHeights:b,visibleToasts:S,heights:w,index:x,toasts:E,expanded:T,removeToast:O,defaultRichColors:C,closeButton:I,style:N,cancelButtonStyle:D,actionButtonStyle:z,className:W="",descriptionClassName:V="",duration:G,position:U,gap:J,expandByDefault:ie,classNames:F,icons:X,closeButtonAriaLabel:ae="Close toast"}=e,[fe,K]=le.useState(null),[P,q]=le.useState(null),[B,L]=le.useState(!1),[$,Q]=le.useState(!1),[me,ye]=le.useState(!1),[Ae,ke]=le.useState(!1),[H,ne]=le.useState(!1),[_e,pe]=le.useState(0),[ce,Oe]=le.useState(0),je=le.useRef(p.duration||G||ST),Ye=le.useRef(null),He=le.useRef(null),Xe=x===0,Z=x+1<=S,te=p.type,re=p.dismissible!==!1,Se=p.className||"",Te=p.descriptionClassName||"",Re=le.useMemo(()=>w.findIndex(Qe=>Qe.toastId===p.id)||0,[w,p.id]),Ne=le.useMemo(()=>{var Qe;return(Qe=p.closeButton)!=null?Qe:I},[p.closeButton,I]),ot=le.useMemo(()=>p.duration||G||ST,[p.duration,G]),it=le.useRef(0),Dt=le.useRef(0),hr=le.useRef(0),xn=le.useRef(null),[Un,en]=U.split("-"),zn=le.useMemo(()=>w.reduce((Qe,Wt,Nn)=>Nn>=Re?Qe:Qe+Wt.height,0),[w,Re]),kn=tV(),Hi=p.invert||m,Zs=te==="loading";Dt.current=le.useMemo(()=>Re*J+zn,[Re,zn]),le.useEffect(()=>{je.current=ot},[ot]),le.useEffect(()=>{L(!0)},[]),le.useEffect(()=>{const Qe=He.current;if(Qe){const Wt=Qe.getBoundingClientRect().height;return Oe(Wt),b(Nn=>[{toastId:p.id,height:Wt,position:p.position},...Nn]),()=>b(Nn=>Nn.filter(er=>er.toastId!==p.id))}},[b,p.id]),le.useLayoutEffect(()=>{if(!B)return;const Qe=He.current,Wt=Qe.style.height;Qe.style.height="auto";const Nn=Qe.getBoundingClientRect().height;Qe.style.height=Wt,Oe(Nn),b(er=>er.find(tn=>tn.toastId===p.id)?er.map(tn=>tn.toastId===p.id?{...tn,height:Nn}:tn):[{toastId:p.id,height:Nn,position:p.position},...er])},[B,p.title,p.description,b,p.id,p.jsx,p.action,p.cancel]);const kr=le.useCallback(()=>{Q(!0),pe(Dt.current),b(Qe=>Qe.filter(Wt=>Wt.toastId!==p.id)),setTimeout(()=>{O(p)},pV)},[p,O,b,Dt]);le.useEffect(()=>{if(p.promise&&te==="loading"||p.duration===1/0||p.type==="loading")return;let Qe;return T||y||kn?(()=>{if(hr.current<it.current){const er=new Date().getTime()-it.current;je.current=je.current-er}hr.current=new Date().getTime()})():je.current!==1/0&&(it.current=new Date().getTime(),Qe=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),kr()},je.current)),()=>clearTimeout(Qe)},[T,y,p,te,kn,kr]),le.useEffect(()=>{p.delete&&(kr(),p.onDismiss==null||p.onDismiss.call(p,p))},[kr,p.delete]);function Gi(){var Qe;if(X?.loading){var Wt;return le.createElement("div",{className:Zo(F?.loader,p==null||(Wt=p.classNames)==null?void 0:Wt.loader,"sonner-loader"),"data-visible":te==="loading"},X.loading)}return le.createElement(Wz,{className:Zo(F?.loader,p==null||(Qe=p.classNames)==null?void 0:Qe.loader),visible:te==="loading"})}const Zi=p.icon||X?.[te]||Zz(te);var Ks,Fo;return le.createElement("li",{tabIndex:0,ref:He,className:Zo(W,Se,F?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,F?.default,F?.[te],p==null||(n=p.classNames)==null?void 0:n[te]),"data-sonner-toast":"","data-rich-colors":(Ks=p.richColors)!=null?Ks:C,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":B,"data-promise":!!p.promise,"data-swiped":H,"data-removed":$,"data-visible":Z,"data-y-position":Un,"data-x-position":en,"data-index":x,"data-front":Xe,"data-swiping":me,"data-dismissible":re,"data-type":te,"data-invert":Hi,"data-swipe-out":Ae,"data-swipe-direction":P,"data-expanded":!!(T||ie&&B),"data-testid":p.testId,style:{"--index":x,"--toasts-before":x,"--z-index":E.length-x,"--offset":`${$?_e:Dt.current}px`,"--initial-height":ie?"auto":`${ce}px`,...N,...p.style},onDragEnd:()=>{ye(!1),K(null),xn.current=null},onPointerDown:Qe=>{Qe.button!==2&&(Zs||!re||(Ye.current=new Date,pe(Dt.current),Qe.target.setPointerCapture(Qe.pointerId),Qe.target.tagName!=="BUTTON"&&(ye(!0),xn.current={x:Qe.clientX,y:Qe.clientY})))},onPointerUp:()=>{var Qe,Wt,Nn;if(Ae||!re)return;xn.current=null;const er=Number(((Qe=He.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fa=Number(((Wt=He.current)==null?void 0:Wt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tn=new Date().getTime()-((Nn=Ye.current)==null?void 0:Nn.getTime()),pr=fe==="x"?er:Fa,Ws=Math.abs(pr)/tn;if(Math.abs(pr)>=hV||Ws>.11){pe(Dt.current),p.onDismiss==null||p.onDismiss.call(p,p),q(fe==="x"?er>0?"right":"left":Fa>0?"down":"up"),kr(),ke(!0);return}else{var mr,gr;(mr=He.current)==null||mr.style.setProperty("--swipe-amount-x","0px"),(gr=He.current)==null||gr.style.setProperty("--swipe-amount-y","0px")}ne(!1),ye(!1),K(null)},onPointerMove:Qe=>{var Wt,Nn,er;if(!xn.current||!re||((Wt=window.getSelection())==null?void 0:Wt.toString().length)>0)return;const tn=Qe.clientY-xn.current.y,pr=Qe.clientX-xn.current.x;var Ws;const mr=(Ws=e.swipeDirections)!=null?Ws:mV(U);!fe&&(Math.abs(pr)>1||Math.abs(tn)>1)&&K(Math.abs(pr)>Math.abs(tn)?"x":"y");let gr={x:0,y:0};const Ki=wo=>1/(1.5+Math.abs(wo)/20);if(fe==="y"){if(mr.includes("top")||mr.includes("bottom"))if(mr.includes("top")&&tn<0||mr.includes("bottom")&&tn>0)gr.y=tn;else{const wo=tn*Ki(tn);gr.y=Math.abs(wo)<Math.abs(tn)?wo:tn}}else if(fe==="x"&&(mr.includes("left")||mr.includes("right")))if(mr.includes("left")&&pr<0||mr.includes("right")&&pr>0)gr.x=pr;else{const wo=pr*Ki(pr);gr.x=Math.abs(wo)<Math.abs(pr)?wo:pr}(Math.abs(gr.x)>0||Math.abs(gr.y)>0)&&ne(!0),(Nn=He.current)==null||Nn.style.setProperty("--swipe-amount-x",`${gr.x}px`),(er=He.current)==null||er.style.setProperty("--swipe-amount-y",`${gr.y}px`)}},Ne&&!p.jsx&&te!=="loading"?le.createElement("button",{"aria-label":ae,"data-disabled":Zs,"data-close-button":!0,onClick:Zs||!re?()=>{}:()=>{kr(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Zo(F?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Fo=X?.close)!=null?Fo:eV):null,(te||p.icon||p.promise)&&p.icon!==null&&(X?.[te]!==null||p.icon)?le.createElement("div",{"data-icon":"",className:Zo(F?.icon,p==null||(a=p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Gi():null,p.type!=="loading"?Zi:null):null,le.createElement("div",{"data-content":"",className:Zo(F?.content,p==null||(i=p.classNames)==null?void 0:i.content)},le.createElement("div",{"data-title":"",className:Zo(F?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?le.createElement("div",{"data-description":"",className:Zo(V,Te,F?.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),le.isValidElement(p.cancel)?p.cancel:p.cancel&&lh(p.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:Qe=>{lh(p.cancel)&&re&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Qe),kr())},className:Zo(F?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,le.isValidElement(p.action)?p.action:p.action&&lh(p.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:Qe=>{lh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Qe),!Qe.defaultPrevented&&kr())},className:Zo(F?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function ET(){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 vV(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,c=i?"--mobile-offset":"--offset",u=i?uV:lV;function d(f){["top","right","bottom","left"].forEach(m=>{n[`${c}-${m}`]=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[`${c}-${f}`]=u:n[`${c}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}const yV=le.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:c=["altKey","KeyT"],expand:u,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:y,duration:b,style:S,visibleToasts:w=cV,toastOptions:x,dir:E=ET(),gap:T=fV,icons:O,containerAriaLabel:C="Notifications"}=t,[I,N]=le.useState([]),D=le.useMemo(()=>r?I.filter(B=>B.toasterId===r):I.filter(B=>!B.toasterId),[I,r]),z=le.useMemo(()=>Array.from(new Set([i].concat(D.filter(B=>B.position).map(B=>B.position)))),[D,i]),[W,V]=le.useState([]),[G,U]=le.useState(!1),[J,ie]=le.useState(!1),[F,X]=le.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ae=le.useRef(null),fe=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=le.useRef(null),P=le.useRef(!1),q=le.useCallback(B=>{N(L=>{var $;return($=L.find(Q=>Q.id===B.id))!=null&&$.delete||Tr.dismiss(B.id),L.filter(({id:Q})=>Q!==B.id)})},[]);return le.useEffect(()=>Tr.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{N(L=>L.map($=>$.id===B.id?{...$,delete:!0}:$))});return}setTimeout(()=>{xA.flushSync(()=>{N(L=>{const $=L.findIndex(Q=>Q.id===B.id);return $!==-1?[...L.slice(0,$),{...L[$],...B},...L.slice($+1)]:[B,...L]})})})}),[I]),le.useEffect(()=>{if(g!=="system"){X(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:L})=>{X(L?"dark":"light")})}catch{B.addListener(({matches:$})=>{try{X($?"dark":"light")}catch(Q){console.error(Q)}})}},[g]),le.useEffect(()=>{I.length<=1&&U(!1)},[I]),le.useEffect(()=>{const B=L=>{var $;if(c.every(ye=>L[ye]||L.code===ye)){var me;U(!0),(me=ae.current)==null||me.focus()}L.code==="Escape"&&(document.activeElement===ae.current||($=ae.current)!=null&&$.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[c]),le.useEffect(()=>{if(ae.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,P.current=!1)}},[ae.current]),le.createElement("section",{ref:n,"aria-label":`${C} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((B,L)=>{var $;const[Q,me]=B.split("-");return D.length?le.createElement("ol",{key:B,dir:E==="auto"?ET():E,tabIndex:-1,ref:ae,className:f,"data-sonner-toaster":!0,"data-sonner-theme":F,"data-y-position":Q,"data-x-position":me,style:{"--front-toast-height":`${(($=W[0])==null?void 0:$.height)||0}px`,"--width":`${dV}px`,"--gap":`${T}px`,...S,...vV(m,p)},onBlur:ye=>{P.current&&!ye.currentTarget.contains(ye.relatedTarget)&&(P.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||P.current||(P.current=!0,K.current=ye.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{J||U(!1)},onDragEnd:()=>U(!1),onPointerDown:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},D.filter(ye=>!ye.position&&L===0||ye.position===B).map((ye,Ae)=>{var ke,H;return le.createElement(gV,{key:ye.id,icons:O,index:Ae,toast:ye,defaultRichColors:y,duration:(ke=x?.duration)!=null?ke:b,className:x?.className,descriptionClassName:x?.descriptionClassName,invert:a,visibleToasts:w,closeButton:(H=x?.closeButton)!=null?H:d,interacting:J,position:B,style:x?.style,unstyled:x?.unstyled,classNames:x?.classNames,cancelButtonStyle:x?.cancelButtonStyle,actionButtonStyle:x?.actionButtonStyle,closeButtonAriaLabel:x?.closeButtonAriaLabel,removeToast:q,toasts:D.filter(ne=>ne.position==ye.position),heights:W.filter(ne=>ne.position==ye.position),setHeights:V,expandByDefault:u,gap:T,expanded:G,swipeDirections:t.swipeDirections})})):null}))}),hk=A.createContext({});function pk(){return A.useContext(hk)}var Zy,RT;function _V(){if(RT)return Zy;RT=1;var e=function(){};return Zy=e,Zy}var bV=_V();const wV=ja(bV);function SV({async:e,appendTo:t,defer:n,id:r,nonce:a,src:i}){const c=document.createElement("script");e!==void 0&&(c.async=e),n!==void 0&&(c.defer=n),r&&(c.id=r),a&&c.setAttribute("nonce",a),c.src=i,(t==="head"?document.head:document.body).appendChild(c)}var EV=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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};let Bu=null,rd=!1;const Vp=new Set,Fp=new Set,RV=typeof window<"u",ol="___grecaptcha_cfg",mk=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function xV(){if(!RV)return;function e(n){if(rd)n();else{window[ol]||(window[ol]={});const r=window[ol];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(){rd=!0;for(const n of Fp)n();Fp.clear()}window[mk]=t}function TV({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:a=!1}){const i=a?"recaptcha.net":"google.com",c=r?"enterprise.js":"api.js",u=new URLSearchParams({render:n});return t&&u.set("onload",t),e&&u.set("hl",e),`https://www.${i}/recaptcha/${c}?${u.toString()}`}function OV({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:a}){const i={id:"google-recaptcha-v3"},c=TV({language:e,onLoadCallbackName:mk,render:t,useEnterprise:r,useRecaptchaNet:a});if(Bu){if(Bu!==c)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Bu=c,SV(Object.assign(Object.assign(Object.assign({},i),n),{src:c}))}function CV(e){if(!window[ol])return;const t=window[ol];t.clients&&delete t.clients[e]}function AV(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,a=EV(t,["onLoadCallback","onLoadCallbackName"]);if(Vp.size===0&&xV(),OV(a),Vp.add(e),n&&(rd?n():Fp.add(n)),r){let i=function(){if(!r)return;const c=window[r];typeof c=="function"&&c()};rd?i():Fp.add(i)}}function IV(e){var t,n,r;Vp.delete(e),Vp.size===0&&(window.grecaptcha=void 0,window[ol]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Bu}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Bu=null,rd=!1)}let xT=!1;function kV({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:a,useEnterprise:i,useRecaptchaNet:c}){var u,d,f,m,p,g,y;const b=A.useId(),[S,w]=A.useState(null),[x,E]=A.useState(null),T=A.useRef(!1);A.useEffect(()=>{function N(){var D;const z=i?(D=window.grecaptcha)===null||D===void 0?void 0:D.enterprise:window.grecaptcha;if(!z)throw new Error("reCAPTCHA not found");if(!z.ready)throw new Error("reCAPTCHA ready callback not found");z.ready(()=>{w(z)})}return AV(b,{language:n,onLoadCallback:N,onLoadCallbackName:a?.onLoadCallbackName,render:e?.element?"explicit":r,scriptProps:{appendTo:a?.appendTo,async:a?.async,defer:a?.defer,id:a?.id,nonce:a?.nonce},useEnterprise:i,useRecaptchaNet:c}),()=>{IV(b),w(null)}},[e?.element,b,n,r,a?.appendTo,a?.async,a?.defer,a?.id,a?.nonce,a?.onLoadCallbackName,i,c]),A.useEffect(()=>{var N,D,z;if(!e?.element||!S?.render)return;const W={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((N=e.parameters)===null||N===void 0?void 0:N.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},V=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!V)throw new Error("reCAPTCHA container element not found");const G=S.render(V,W);return!((D=e?.parameters)===null||D===void 0)&&D.hidden&&(xT||(wV(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),xT=!0),(z=V.querySelector(".grecaptcha-badge"))===null||z===void 0||z.style.setProperty("display","none")),E(G),T.current=!0,()=>{E(null),T.current=!1,CV(G),V.innerHTML=""}},[e?.element,(u=e?.parameters)===null||u===void 0?void 0:u.badge,(d=e?.parameters)===null||d===void 0?void 0:d.hidden,(f=e?.parameters)===null||f===void 0?void 0:f.callback,(m=e?.parameters)===null||m===void 0?void 0:m.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(g=e?.parameters)===null||g===void 0?void 0:g.tabindex,(y=e?.parameters)===null||y===void 0?void 0:y.theme,S,r]);const O=!!e?.element,C=O?x:r,I=A.useMemo(()=>C!==null&&S?.execute?N=>{if(C===null||!S?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!T.current?(console.warn("Client ID not mounted"),null):S.execute(C,{action:N})}:void 0,[C,S,O]);return R.jsx(hk.Provider,{value:{container:e?.element,executeRecaptcha:I,reCaptchaInstance:S},children:t})}var NV=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()}}},lo=new NV;function MV(){return()=>{}}function Ua(){return A.useSyncExternalStore(MV,()=>!0,()=>!1)}function gk(){const[e,t]=A.useState();return A.useEffect(()=>{const n=()=>{const a=document.documentElement.getAttribute("lang");t(a??void 0)};n();const r=new MutationObserver(a=>{for(const i of a)i.attributeName==="lang"&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{lang:e}}function Nb(){const[e,t]=A.useState("light");return A.useEffect(()=>{const n=()=>{var a;const i=document.documentElement.classList.contains("dark")||((a=document.documentElement.getAttribute("style"))==null?void 0:a.includes("color-scheme: dark"));t(i?"dark":"light")};n();const r=new MutationObserver(a=>{for(const i of a)(i.attributeName==="style"||i.attributeName==="class")&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{theme:e}}function PV({children:e}){const t=Ua(),{captcha:n}=A.useContext(ht);return n?.provider!=="google-recaptcha-v3"?e:R.jsxs(kV,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&R.jsx("style",{children:`
|
|
49
|
-
.grecaptcha-badge {
|
|
50
|
-
visibility: hidden;
|
|
51
|
-
border-radius: var(--radius) !important;
|
|
52
|
-
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
53
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
54
|
-
border-style: var(--tw-border-style) !important;
|
|
55
|
-
border-width: 1px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.dark .grecaptcha-badge {
|
|
59
|
-
border-color: var(--input) !important;
|
|
60
|
-
}
|
|
61
|
-
`}),R.jsx(DV,{}),e]})}function DV(){const{executeRecaptcha:e}=pk(),{theme:t}=Nb(),{lang:n}=gk();return A.useEffect(()=>{if(!e)return;(async()=>{const a=document.querySelector("iframe[title='reCAPTCHA']");if(a){const i=new URL(a.src);i.searchParams.set("theme",t),n&&i.searchParams.set("hl",n),a.src=i.toString()}})()},[e,t,n]),null}function LV({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=A.useContext(ht),{pathMode:a,slug:i}=t||{};let c,u,d,f;const{data:m,isPending:p,isRefetching:g}=r();if(a==="slug"){const y=e||i;c=m?.find(b=>b.slug===y),u=p,d=g}else{const{data:y,isPending:b,isRefetching:S,refetch:w}=n();f=w,c=y,u=b,d=S}return A.useMemo(()=>({data:c,isPending:u,isRefetching:d,refetch:f}),[c,u,d,f])}var jV=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:a}=A.useContext(ht),{slug:i,pathMode:c,personalPath:u}=n||{},{data:d}=t(),{data:f,isPending:m,isRefetching:p,refetch:g}=LV(),{refetch:y}=e(),{data:b}=e();return A.useEffect(()=>{d?.user.id&&(f||b)&&(g?.(),y?.())},[d?.user.id]),A.useEffect(()=>{p||m||i&&c==="slug"&&!f&&r(u||a)},[f,p,m,i,c,u,r,a]),null},$V=({href:e,className:t,children:n})=>R.jsx("a",{className:t,href:e,children:n}),UV=e=>{window.location.href=e},zV=e=>{window.location.replace(e)},VV=({variant:e="default",message:t})=>{e==="default"?wT(t):wT[e](t)},ht=A.createContext({}),FV=({children:e,authClient:t,account:n,avatar:r,deleteUser:a,social:i,genericOAuth:c,basePath:u="/auth",baseURL:d="",captcha:f,redirectTo:m="/",credentials:p,changeEmail:g=!0,freshAge:y=3600*24,hooks:b,mutators:S,localization:w,localizeErrors:x=!0,nameRequired:E=!0,organization:T,teams:O,signUp:C=!0,toast:I=VV,viewPaths:N,navigate:D,replace:z,Link:W=$V,emailVerification:V,...G})=>{const U=t,J=A.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=A.useMemo(()=>{if(V)return V===!0?{otp:!1}:{otp:V.otp??!1}},[V]),F=A.useMemo(()=>{var H;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:_T}:{basePath:((H=n.basePath)!=null&&H.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{..._T,...n.viewPaths}}},[n]),X=A.useMemo(()=>{if(a)return a===!0?{}:a},[a]),ae=A.useMemo(()=>{if(i)return i},[i]),fe=A.useMemo(()=>{if(c)return c},[c]),K=A.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),P=A.useMemo(()=>{if(C!==!1)return C===!0||C===void 0?{fields:["name"]}:{fields:C.fields||["name"]}},[C]),q=A.useMemo(()=>{var H;if(!T)return;if(T===!0)return{basePath:"/organization",viewPaths:bT,customRoles:[]};let ne;T.logo===!0?ne={extension:"png",size:128}:T.logo&&(ne={upload:T.logo.upload,delete:T.logo.delete,extension:T.logo.extension||"png",size:T.logo.size||(T.logo.upload?256:128)});const _e=(H=T.basePath)!=null&&H.endsWith("/")?T.basePath.slice(0,-1):T.basePath;return{...T,logo:ne,basePath:_e??"/organization",customRoles:T.customRoles||[],viewPaths:{...bT,...T.viewPaths}}},[T]),B=A.useMemo(()=>{var H,ne;if(!(!O||!q))return O===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:O.enabled??!0,customRoles:O.customRoles||[],colors:{count:((H=O.colors)==null?void 0:H.count)??5,prefix:((ne=O.colors)==null?void 0:ne.prefix)??"team"}}},[O,q]),L=A.useMemo(()=>({deleteApiKey:H=>U.apiKey.delete({...H,fetchOptions:{throw:!0}}),deletePasskey:H=>U.passkey.deletePasskey({...H,fetchOptions:{throw:!0}}),revokeDeviceSession:H=>U.multiSession.revoke({...H,fetchOptions:{throw:!0}}),revokeSession:H=>U.revokeSession({...H,fetchOptions:{throw:!0}}),setActiveSession:H=>U.multiSession.setActive({...H,fetchOptions:{throw:!0}}),updateOrganization:H=>U.organization.update({...H,fetchOptions:{throw:!0}}),updateTeam:H=>U.$fetch("/organization/update-team",{method:"POST",body:H,throw:!0}),updateUser:H=>U.updateUser({...H,fetchOptions:{throw:!0}}),unlinkAccount:H=>U.unlinkAccount({...H,fetchOptions:{throw:!0}})}),[U]),$=A.useMemo(()=>({useSession:U.useSession,useListAccounts:()=>Ur({queryFn:U.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:H=>Ur({queryFn:()=>U.accountInfo(H),cacheKey:`accountInfo:${JSON.stringify(H)}`}),useListDeviceSessions:()=>Ur({queryFn:U.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>Ur({queryFn:U.listSessions,cacheKey:"listSessions"}),useListPasskeys:U.useListPasskeys,useListApiKeys:()=>Ur({queryFn:U.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:U.useActiveOrganization,useListOrganizations:U.useListOrganizations,useHasPermission:H=>Ur({queryFn:()=>U.$fetch("/organization/has-permission",{method:"POST",body:H}),cacheKey:`hasPermission:${JSON.stringify(H)}`}),useInvitation:H=>Ur({queryFn:()=>U.organization.getInvitation(H),cacheKey:`invitation:${JSON.stringify(H)}`}),useListInvitations:H=>Ur({queryFn:()=>{var ne;return U.$fetch(`/organization/list-invitations?organizationId=${((ne=H?.query)==null?void 0:ne.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(H)}`}),useListUserInvitations:()=>Ur({queryFn:()=>U.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:H=>Ur({queryFn:()=>{var ne;return U.$fetch(`/organization/list-members?organizationId=${((ne=H?.query)==null?void 0:ne.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(H)}`}),useListTeams:H=>Ur({queryFn:()=>U.$fetch(`/organization/list-teams?organizationId=${H?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(H)}`}),useListTeamMembers:H=>Ur({queryFn:()=>U.$fetch("/organization/list-team-members",{method:"POST",body:H?.teamId?{query:{teamId:H.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(H)}`}),useListUserTeams:()=>Ur({queryFn:()=>U.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[U]),Q=A.useMemo(()=>({...Hz,...N}),[N]),me=A.useMemo(()=>({...qz,...w}),[w]),ye=A.useMemo(()=>({...$,...b}),[$,b]),Ae=A.useMemo(()=>({...L,...S}),[L,S]);d=d.endsWith("/")?d.slice(0,-1):d,u=u.endsWith("/")?u.slice(0,-1):u;const{data:ke}=ye.useSession();return R.jsxs(ht.Provider,{value:{authClient:U,avatar:J,basePath:u==="/"?"":u,baseURL:d,captcha:f,redirectTo:m,changeEmail:g,credentials:K,deleteUser:X,emailVerification:ie,freshAge:y,genericOAuth:fe,hooks:ye,mutators:Ae,localization:me,localizeErrors:x,nameRequired:E,organization:q,teams:B,account:F,signUp:P,social:ae,toast:I,navigate:D||UV,replace:z||D||zV,viewPaths:Q,Link:W,...G},children:[ke&&q&&R.jsx(jV,{}),f?.provider==="google-recaptcha-v3"?R.jsx(PV,{children:e}):e]})};function Ur({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:a},toast:i,localization:c,localizeErrors:u}=A.useContext(ht),{data:d,isPending:f}=a(),m=A.useRef(e);m.current=e;const p=t||e.toString(),g=A.useSyncExternalStore(A.useCallback(T=>lo.subscribe(p,T),[p]),A.useCallback(()=>lo.get(p),[p]),A.useCallback(()=>lo.get(p),[p])),y=A.useRef(!1),b=A.useRef(void 0),[S,w]=A.useState(null),x=A.useCallback(async()=>{const T=lo.getInFlightRequest(p);if(T){try{const C=await T;C.error?w(C.error):w(null)}catch(C){w(C)}return}g?.data!==void 0&&lo.setRefetching(p,!0);const O=m.current();lo.setInFlightRequest(p,O);try{const{data:C,error:I}=await O;I?(w(I),i({variant:"error",message:hn({error:I,localization:c,localizeErrors:u})})):w(null),lo.set(p,C)}catch(C){const I=C;w(I),i({variant:"error",message:hn({error:I,localization:c,localizeErrors:u})})}finally{lo.setRefetching(p,!1),lo.removeInFlightRequest(p)}},[p,i,c,u,g]);A.useEffect(()=>{var T;const O=(T=d?.user)==null?void 0:T.id;if(!d){lo.setRefetching(p,!1),lo.clear(p),y.current=!1,b.current=void 0;return}const C=b.current!==void 0&&b.current!==O;C&&lo.clear(p);const I=g?.data!==void 0,N=!g||Date.now()-g.timestamp>n;(!y.current||!I||C||I&&N)&&(!I||N)&&(y.current=!0,x()),b.current=O},[d,(r=d?.user)==null?void 0:r.id,p,x,g,n]);const E=f||g?.data===void 0&&!S;return{data:g?.data??null,isPending:E,isRefetching:g?.isRefetching??!1,error:S,refetch:x}}const BV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var qV={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 HV=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:c,...u},d)=>A.createElement("svg",{ref:d,...qV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vk("lucide",a),...u},[...c.map(([f,m])=>A.createElement(f,m)),...Array.isArray(i)?i:[i]]));const ar=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(HV,{ref:i,iconNode:t,className:vk(`lucide-${BV(e)}`,r),...a}));return n.displayName=`${e}`,n};const GV=ar("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const ZV=ar("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 yk=ar("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const KV=ar("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 WV=ar("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 YV=ar("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 QV=ar("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 or=ar("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const _k=ar("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 bk=ar("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 XV=ar("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const JV=ar("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 TT=ar("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 eF=ar("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 tF=ar("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const nF=ar("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var _d=e=>e.type==="checkbox",xi=e=>e instanceof Date,Cr=e=>e==null;const wk=e=>typeof e=="object";var En=e=>!Cr(e)&&!Array.isArray(e)&&wk(e)&&!xi(e),Sk=e=>En(e)&&e.target?_d(e.target)?e.target.checked:e.target.value:e,rF=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Ek=(e,t)=>e.has(rF(t)),oF=e=>{const t=e.constructor&&e.constructor.prototype;return En(t)&&t.hasOwnProperty("isPrototypeOf")},Mb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _n(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Mb&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(En(e)&&oF(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=_n(e[a]));return r}var Lm=e=>/^\w*$/.test(e),Xt=e=>e===void 0,Pb=e=>Array.isArray(e)?e.filter(Boolean):[],Db=e=>Pb(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Me=(e,t,n)=>{if(!t||!En(e))return n;const r=(Lm(t)?[t]:Db(t)).reduce((a,i)=>Cr(a)?a:a[i],e);return Xt(r)||r===e?Xt(e[t])?n:e[t]:r},Br=e=>typeof e=="boolean",dr=e=>typeof e=="function",Ut=(e,t,n)=>{let r=-1;const a=Lm(t)?[t]:Db(t),i=a.length,c=i-1;for(;++r<i;){const u=a[r];let d=n;if(r!==c){const f=e[u];d=En(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Bp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},No={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Oa={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Lb=le.createContext(null);Lb.displayName="HookFormControlContext";const jb=()=>le.useContext(Lb);var Rk=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const c=i;return t._proxyFormState[c]!==No.all&&(t._proxyFormState[c]=!r||No.all),n&&(n[c]=!0),e[c]}});return a};const $b=typeof window<"u"?le.useLayoutEffect:le.useEffect;function xk(e){const t=jb(),{control:n=t,disabled:r,name:a,exact:i}=e||{},[c,u]=le.useState(n._formState),d=le.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return $b(()=>n._subscribe({name:a,formState:d.current,exact:i,callback:f=>{!r&&u({...n._formState,...f})}}),[a,r,i]),le.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),le.useMemo(()=>Rk(c,n,d.current,!1),[c,n])}var Zr=e=>typeof e=="string",d_=(e,t,n,r,a)=>Zr(e)?(r&&t.watch.add(e),Me(n,e,a)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Me(n,i))):(r&&(t.watchAll=!0),n),f_=e=>Cr(e)||!wk(e);function Mo(e,t,n=new WeakSet){if(f_(e)||f_(t))return Object.is(e,t);if(xi(e)&&xi(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const c=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const u=t[i];if(xi(c)&&xi(u)||En(c)&&En(u)||Array.isArray(c)&&Array.isArray(u)?!Mo(c,u,n):!Object.is(c,u))return!1}}return!0}function aF(e){const t=jb(),{control:n=t,name:r,defaultValue:a,disabled:i,exact:c,compute:u}=e||{},d=le.useRef(a),f=le.useRef(u),m=le.useRef(void 0),p=le.useRef(n),g=le.useRef(r);f.current=u;const[y,b]=le.useState(()=>{const O=n._getWatch(r,d.current);return f.current?f.current(O):O}),S=le.useCallback(O=>{const C=d_(r,n._names,O||n._formValues,!1,d.current);return f.current?f.current(C):C},[n._formValues,n._names,r]),w=le.useCallback(O=>{if(!i){const C=d_(r,n._names,O||n._formValues,!1,d.current);if(f.current){const I=f.current(C);Mo(I,m.current)||(b(I),m.current=I)}else b(C)}},[n._formValues,n._names,i,r]);$b(()=>((p.current!==n||!Mo(g.current,r))&&(p.current=n,g.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:c,callback:O=>{w(O.values)}})),[n,c,r,w]),le.useEffect(()=>n._removeUnmounted());const x=p.current!==n,E=g.current,T=le.useMemo(()=>{if(i)return null;const O=!x&&!Mo(E,r);return x||O?S():null},[i,x,r,E,S]);return T!==null?T:y}function sF(e){const t=jb(),{name:n,disabled:r,control:a=t,shouldUnregister:i,defaultValue:c,exact:u=!0}=e,d=Ek(a._names.array,n),f=le.useMemo(()=>Me(a._formValues,n,Me(a._defaultValues,n,c)),[a,n,c]),m=aF({control:a,name:n,defaultValue:f,exact:u}),p=xk({control:a,name:n,exact:u}),g=le.useRef(e),y=le.useRef(void 0),b=le.useRef(a.register(n,{...e.rules,value:m,...Br(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const S=le.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Me(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Me(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Me(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Me(p.validatingFields,n)},error:{enumerable:!0,get:()=>Me(p.errors,n)}}),[p,n]),w=le.useCallback(O=>b.current.onChange({target:{value:Sk(O),name:n},type:Bp.CHANGE}),[n]),x=le.useCallback(()=>b.current.onBlur({target:{value:Me(a._formValues,n),name:n},type:Bp.BLUR}),[n,a._formValues]),E=le.useCallback(O=>{const C=Me(a._fields,n);C&&C._f&&O&&(C._f.ref={focus:()=>dr(O.focus)&&O.focus(),select:()=>dr(O.select)&&O.select(),setCustomValidity:I=>dr(O.setCustomValidity)&&O.setCustomValidity(I),reportValidity:()=>dr(O.reportValidity)&&O.reportValidity()})},[a._fields,n]),T=le.useMemo(()=>({name:n,value:m,...Br(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:w,onBlur:x,ref:E}),[n,r,p.disabled,w,x,E,m]);return le.useEffect(()=>{const O=a._options.shouldUnregister||i,C=y.current;C&&C!==n&&!d&&a.unregister(C),a.register(n,{...g.current.rules,...Br(g.current.disabled)?{disabled:g.current.disabled}:{}});const I=(N,D)=>{const z=Me(a._fields,N);z&&z._f&&(z._f.mount=D)};if(I(n,!0),O){const N=_n(Me(a._options.defaultValues,n,g.current.defaultValue));Ut(a._defaultValues,n,N),Xt(Me(a._formValues,n))&&Ut(a._formValues,n,N)}return!d&&a.register(n),y.current=n,()=>{(d?O&&!a._state.action:O)?a.unregister(n):I(n,!1)}},[n,a,d,i]),le.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),le.useMemo(()=>({field:T,formState:p,fieldState:S}),[T,p,S])}const iF=e=>e.render(sF(e)),Ub=le.createContext(null);Ub.displayName="HookFormContext";const cF=()=>le.useContext(Ub),lF=e=>{const{children:t,watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:c,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:b,register:S,setFocus:w,subscribe:x}=e;return le.createElement(Ub.Provider,{value:le.useMemo(()=>({watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:c,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:b,register:S,setFocus:w,subscribe:x}),[c,b,f,a,r,g,S,p,m,i,w,u,x,d,y,n])},le.createElement(Lb.Provider,{value:b},t))};var zb=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},qu=e=>Array.isArray(e)?e:[e],OT=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function Tk(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],i=t[r];if(a&&En(a)&&i){const c=Tk(a,i);En(c)&&(n[r]=c)}else e[r]&&(n[r]=i)}return n}var ur=e=>En(e)&&!Object.keys(e).length,Vb=e=>e.type==="file",qp=e=>{if(!Mb)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ok=e=>e.type==="select-multiple",Fb=e=>e.type==="radio",uF=e=>Fb(e)||_d(e),Ky=e=>qp(e)&&e.isConnected;function dF(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Xt(e)?r++:e[t[r++]];return e}function fF(e){for(const t in e)if(e.hasOwnProperty(t)&&!Xt(e[t]))return!1;return!0}function bn(e,t){const n=Array.isArray(t)?t:Lm(t)?[t]:Db(t),r=n.length===1?e:dF(e,n),a=n.length-1,i=n[a];return r&&delete r[i],a!==0&&(En(r)&&ur(r)||Array.isArray(r)&&fF(r))&&bn(e,n.slice(0,-1)),e}var hF=e=>{for(const t in e)if(dr(e[t]))return!0;return!1};function Ck(e){return Array.isArray(e)||En(e)&&!hF(e)}function h_(e,t={}){for(const n in e){const r=e[n];Ck(r)?(t[n]=Array.isArray(r)?[]:{},h_(r,t[n])):Xt(r)||(t[n]=!0)}return t}function Hc(e,t,n){n||(n=h_(t));for(const r in e){const a=e[r];if(Ck(a))Xt(t)||f_(n[r])?n[r]=h_(a,Array.isArray(a)?[]:{}):Hc(a,Cr(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!Mo(a,i)}}return n}const CT={value:!1,isValid:!1},AT={value:!0,isValid:!0};var Ak=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&&!Xt(e[0].attributes.value)?Xt(e[0].value)||e[0].value===""?AT:{value:e[0].value,isValid:!0}:AT:CT}return CT},Ik=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Xt(e)?e:t?e===""?NaN:e&&+e:n&&Zr(e)?new Date(e):r?r(e):e;const IT={isValid:!1,value:null};var kk=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,IT):IT;function kT(e){const t=e.ref;return Vb(t)?t.files:Fb(t)?kk(e.refs).value:Ok(t)?[...t.selectedOptions].map(({value:n})=>n):_d(t)?Ak(e.refs).value:Ik(Xt(t.value)?e.ref.value:t.value,e)}var pF=(e,t,n,r)=>{const a={};for(const i of e){const c=Me(t,i);c&&Ut(a,i,c._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Hp=e=>e instanceof RegExp,Eu=e=>Xt(e)?e:Hp(e)?e.source:En(e)?Hp(e.value)?e.value.source:e.value:e,NT=e=>({isOnSubmit:!e||e===No.onSubmit,isOnBlur:e===No.onBlur,isOnChange:e===No.onChange,isOnAll:e===No.all,isOnTouch:e===No.onTouched});const MT="AsyncFunction";var mF=e=>!!e&&!!e.validate&&!!(dr(e.validate)&&e.validate.constructor.name===MT||En(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===MT)),gF=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),PT=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Hu=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const i=Me(e,a);if(i){const{_f:c,...u}=i;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],a)&&!r)return!0;if(c.ref&&t(c.ref,c.name)&&!r)return!0;if(Hu(u,t))break}else if(En(u)&&Hu(u,t))break}}};function DT(e,t,n){const r=Me(e,n);if(r||Lm(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const i=a.join("."),c=Me(t,i),u=Me(e,i);if(c&&!Array.isArray(c)&&n!==i)return{name:n};if(u&&u.type)return{name:i,error:u};if(u&&u.root&&u.root.type)return{name:`${i}.root`,error:u.root};a.pop()}return{name:n}}var vF=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return ur(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(c=>t[c]===(!r||No.all))},yF=(e,t,n)=>!e||!t||e===t||qu(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),_F=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,bF=(e,t)=>!Pb(Me(e,t)).length&&bn(e,t),wF=(e,t,n)=>{const r=qu(Me(e,n));return Ut(r,"root",t[n]),Ut(e,n,r),e};function LT(e,t,n="validate"){if(Zr(e)||Array.isArray(e)&&e.every(Zr)||Br(e)&&!e)return{type:n,message:Zr(e)?e:"",ref:t}}var Pc=e=>En(e)&&!Hp(e)?e:{value:e,message:""},jT=async(e,t,n,r,a,i)=>{const{ref:c,refs:u,required:d,maxLength:f,minLength:m,min:p,max:g,pattern:y,validate:b,name:S,valueAsNumber:w,mount:x}=e._f,E=Me(n,S);if(!x||t.has(S))return{};const T=u?u[0]:c,O=G=>{a&&T.reportValidity&&(T.setCustomValidity(Br(G)?"":G||""),T.reportValidity())},C={},I=Fb(c),N=_d(c),D=I||N,z=(w||Vb(c))&&Xt(c.value)&&Xt(E)||qp(c)&&c.value===""||E===""||Array.isArray(E)&&!E.length,W=zb.bind(null,S,r,C),V=(G,U,J,ie=Oa.maxLength,F=Oa.minLength)=>{const X=G?U:J;C[S]={type:G?ie:F,message:X,ref:c,...W(G?ie:F,X)}};if(i?!Array.isArray(E)||!E.length:d&&(!D&&(z||Cr(E))||Br(E)&&!E||N&&!Ak(u).isValid||I&&!kk(u).isValid)){const{value:G,message:U}=Zr(d)?{value:!!d,message:d}:Pc(d);if(G&&(C[S]={type:Oa.required,message:U,ref:T,...W(Oa.required,U)},!r))return O(U),C}if(!z&&(!Cr(p)||!Cr(g))){let G,U;const J=Pc(g),ie=Pc(p);if(!Cr(E)&&!isNaN(E)){const F=c.valueAsNumber||E&&+E;Cr(J.value)||(G=F>J.value),Cr(ie.value)||(U=F<ie.value)}else{const F=c.valueAsDate||new Date(E),X=K=>new Date(new Date().toDateString()+" "+K),ae=c.type=="time",fe=c.type=="week";Zr(J.value)&&E&&(G=ae?X(E)>X(J.value):fe?E>J.value:F>new Date(J.value)),Zr(ie.value)&&E&&(U=ae?X(E)<X(ie.value):fe?E<ie.value:F<new Date(ie.value))}if((G||U)&&(V(!!G,J.message,ie.message,Oa.max,Oa.min),!r))return O(C[S].message),C}if((f||m)&&!z&&(Zr(E)||i&&Array.isArray(E))){const G=Pc(f),U=Pc(m),J=!Cr(G.value)&&E.length>+G.value,ie=!Cr(U.value)&&E.length<+U.value;if((J||ie)&&(V(J,G.message,U.message),!r))return O(C[S].message),C}if(y&&!z&&Zr(E)){const{value:G,message:U}=Pc(y);if(Hp(G)&&!E.match(G)&&(C[S]={type:Oa.pattern,message:U,ref:c,...W(Oa.pattern,U)},!r))return O(U),C}if(b){if(dr(b)){const G=await b(E,n),U=LT(G,T);if(U&&(C[S]={...U,...W(Oa.validate,U.message)},!r))return O(U.message),C}else if(En(b)){let G={};for(const U in b){if(!ur(G)&&!r)break;const J=LT(await b[U](E,n),T,U);J&&(G={...J,...W(U,J.message)},O(J.message),r&&(C[S]=G))}if(!ur(G)&&(C[S]={ref:T,...G},!r))return C}}return O(!0),C};const SF={mode:No.onSubmit,reValidateMode:No.onChange,shouldFocusError:!0};function EF(e={}){let t={...SF,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:dr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},a=En(t.defaultValues)||En(t.values)?_n(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:_n(a),c={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...m};let g={...p};const y={array:OT(),state:OT()},b=t.criteriaMode===No.all,S=Z=>te=>{clearTimeout(f),f=setTimeout(Z,te)},w=async Z=>{if(!c.keepIsValid&&!t.disabled&&(p.isValid||g.isValid||Z)){let te;t.resolver?(te=ur((await D()).errors),x()):te=await W(r,!0),te!==n.isValid&&y.state.next({isValid:te})}},x=(Z,te)=>{!t.disabled&&(p.isValidating||p.validatingFields||g.isValidating||g.validatingFields)&&((Z||Array.from(u.mount)).forEach(re=>{re&&(te?Ut(n.validatingFields,re,te):bn(n.validatingFields,re))}),y.state.next({validatingFields:n.validatingFields,isValidating:!ur(n.validatingFields)}))},E=(Z,te=[],re,Se,Te=!0,Re=!0)=>{if(Se&&re&&!t.disabled){if(c.action=!0,Re&&Array.isArray(Me(r,Z))){const Ne=re(Me(r,Z),Se.argA,Se.argB);Te&&Ut(r,Z,Ne)}if(Re&&Array.isArray(Me(n.errors,Z))){const Ne=re(Me(n.errors,Z),Se.argA,Se.argB);Te&&Ut(n.errors,Z,Ne),bF(n.errors,Z)}if((p.touchedFields||g.touchedFields)&&Re&&Array.isArray(Me(n.touchedFields,Z))){const Ne=re(Me(n.touchedFields,Z),Se.argA,Se.argB);Te&&Ut(n.touchedFields,Z,Ne)}(p.dirtyFields||g.dirtyFields)&&(n.dirtyFields=Hc(a,i)),y.state.next({name:Z,isDirty:G(Z,te),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ut(i,Z,te)},T=(Z,te)=>{Ut(n.errors,Z,te),y.state.next({errors:n.errors})},O=Z=>{n.errors=Z,y.state.next({errors:n.errors,isValid:!1})},C=(Z,te,re,Se)=>{const Te=Me(r,Z);if(Te){const Re=Me(i,Z,Xt(re)?Me(a,Z):re);Xt(Re)||Se&&Se.defaultChecked||te?Ut(i,Z,te?Re:kT(Te._f)):ie(Z,Re),c.mount&&!c.action&&w()}},I=(Z,te,re,Se,Te)=>{let Re=!1,Ne=!1;const ot={name:Z};if(!t.disabled){if(!re||Se){(p.isDirty||g.isDirty)&&(Ne=n.isDirty,n.isDirty=ot.isDirty=G(),Re=Ne!==ot.isDirty);const it=Mo(Me(a,Z),te);Ne=!!Me(n.dirtyFields,Z),it?bn(n.dirtyFields,Z):Ut(n.dirtyFields,Z,!0),ot.dirtyFields=n.dirtyFields,Re=Re||(p.dirtyFields||g.dirtyFields)&&Ne!==!it}if(re){const it=Me(n.touchedFields,Z);it||(Ut(n.touchedFields,Z,re),ot.touchedFields=n.touchedFields,Re=Re||(p.touchedFields||g.touchedFields)&&it!==re)}Re&&Te&&y.state.next(ot)}return Re?ot:{}},N=(Z,te,re,Se)=>{const Te=Me(n.errors,Z),Re=(p.isValid||g.isValid)&&Br(te)&&n.isValid!==te;if(t.delayError&&re?(d=S(()=>T(Z,re)),d(t.delayError)):(clearTimeout(f),d=null,re?Ut(n.errors,Z,re):bn(n.errors,Z)),(re?!Mo(Te,re):Te)||!ur(Se)||Re){const Ne={...Se,...Re&&Br(te)?{isValid:te}:{},errors:n.errors,name:Z};n={...n,...Ne},y.state.next(Ne)}},D=async Z=>(x(Z,!0),await t.resolver(i,t.context,pF(Z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),z=async Z=>{const{errors:te}=await D(Z);if(x(Z),Z)for(const re of Z){const Se=Me(te,re);Se?Ut(n.errors,re,Se):bn(n.errors,re)}else n.errors=te;return te},W=async(Z,te,re={valid:!0})=>{for(const Se in Z){const Te=Z[Se];if(Te){const{_f:Re,...Ne}=Te;if(Re){const ot=u.array.has(Re.name),it=Te._f&&mF(Te._f);it&&p.validatingFields&&x([Re.name],!0);const Dt=await jT(Te,u.disabled,i,b,t.shouldUseNativeValidation&&!te,ot);if(it&&p.validatingFields&&x([Re.name]),Dt[Re.name]&&(re.valid=!1,te||e.shouldUseNativeValidation))break;!te&&(Me(Dt,Re.name)?ot?wF(n.errors,Dt,Re.name):Ut(n.errors,Re.name,Dt[Re.name]):bn(n.errors,Re.name))}!ur(Ne)&&await W(Ne,te,re)}}return re.valid},V=()=>{for(const Z of u.unMount){const te=Me(r,Z);te&&(te._f.refs?te._f.refs.every(re=>!Ky(re)):!Ky(te._f.ref))&&ye(Z)}u.unMount=new Set},G=(Z,te)=>!t.disabled&&(Z&&te&&Ut(i,Z,te),!Mo(P(),a)),U=(Z,te,re)=>d_(Z,u,{...c.mount?i:Xt(te)?a:Zr(Z)?{[Z]:te}:te},re,te),J=Z=>Pb(Me(c.mount?i:a,Z,t.shouldUnregister?Me(a,Z,[]):[])),ie=(Z,te,re={})=>{const Se=Me(r,Z);let Te=te;if(Se){const Re=Se._f;Re&&(!Re.disabled&&Ut(i,Z,Ik(te,Re)),Te=qp(Re.ref)&&Cr(te)?"":te,Ok(Re.ref)?[...Re.ref.options].forEach(Ne=>Ne.selected=Te.includes(Ne.value)):Re.refs?_d(Re.ref)?Re.refs.forEach(Ne=>{(!Ne.defaultChecked||!Ne.disabled)&&(Array.isArray(Te)?Ne.checked=!!Te.find(ot=>ot===Ne.value):Ne.checked=Te===Ne.value||!!Te)}):Re.refs.forEach(Ne=>Ne.checked=Ne.value===Te):Vb(Re.ref)?Re.ref.value="":(Re.ref.value=Te,Re.ref.type||y.state.next({name:Z,values:_n(i)})))}(re.shouldDirty||re.shouldTouch)&&I(Z,Te,re.shouldTouch,re.shouldDirty,!0),re.shouldValidate&&K(Z)},F=(Z,te,re)=>{for(const Se in te){if(!te.hasOwnProperty(Se))return;const Te=te[Se],Re=Z+"."+Se,Ne=Me(r,Re);(u.array.has(Z)||En(Te)||Ne&&!Ne._f)&&!xi(Te)?F(Re,Te,re):ie(Re,Te,re)}},X=(Z,te,re={})=>{const Se=Me(r,Z),Te=u.array.has(Z),Re=_n(te);Ut(i,Z,Re),Te?(y.array.next({name:Z,values:_n(i)}),(p.isDirty||p.dirtyFields||g.isDirty||g.dirtyFields)&&re.shouldDirty&&y.state.next({name:Z,dirtyFields:Hc(a,i),isDirty:G(Z,Re)})):Se&&!Se._f&&!Cr(Re)?F(Z,Re,re):ie(Z,Re,re),PT(Z,u)?y.state.next({...n,name:Z,values:_n(i)}):y.state.next({name:c.mount?Z:void 0,values:_n(i)})},ae=async Z=>{c.mount=!0;const te=Z.target;let re=te.name,Se=!0;const Te=Me(r,re),Re=it=>{Se=Number.isNaN(it)||xi(it)&&isNaN(it.getTime())||Mo(it,Me(i,re,it))},Ne=NT(t.mode),ot=NT(t.reValidateMode);if(Te){let it,Dt;const hr=te.type?kT(Te._f):Sk(Z),xn=Z.type===Bp.BLUR||Z.type===Bp.FOCUS_OUT,Un=!gF(Te._f)&&!t.resolver&&!Me(n.errors,re)&&!Te._f.deps||_F(xn,Me(n.touchedFields,re),n.isSubmitted,ot,Ne),en=PT(re,u,xn);Ut(i,re,hr),xn?(!te||!te.readOnly)&&(Te._f.onBlur&&Te._f.onBlur(Z),d&&d(0)):Te._f.onChange&&Te._f.onChange(Z);const zn=I(re,hr,xn),kn=!ur(zn)||en;if(!xn&&y.state.next({name:re,type:Z.type,values:_n(i)}),Un)return(p.isValid||g.isValid)&&(t.mode==="onBlur"?xn&&w():xn||w()),kn&&y.state.next({name:re,...en?{}:zn});if(!xn&&en&&y.state.next({...n}),t.resolver){const{errors:Hi}=await D([re]);if(x([re]),Re(hr),Se){const Zs=DT(n.errors,r,re),kr=DT(Hi,r,Zs.name||re);it=kr.error,re=kr.name,Dt=ur(Hi)}}else x([re],!0),it=(await jT(Te,u.disabled,i,b,t.shouldUseNativeValidation))[re],x([re]),Re(hr),Se&&(it?Dt=!1:(p.isValid||g.isValid)&&(Dt=await W(r,!0)));Se&&(Te._f.deps&&(!Array.isArray(Te._f.deps)||Te._f.deps.length>0)&&K(Te._f.deps),N(re,Dt,it,zn))}},fe=(Z,te)=>{if(Me(n.errors,te)&&Z.focus)return Z.focus(),1},K=async(Z,te={})=>{let re,Se;const Te=qu(Z);if(t.resolver){const Re=await z(Xt(Z)?Z:Te);re=ur(Re),Se=Z?!Te.some(Ne=>Me(Re,Ne)):re}else Z?(Se=(await Promise.all(Te.map(async Re=>{const Ne=Me(r,Re);return await W(Ne&&Ne._f?{[Re]:Ne}:Ne)}))).every(Boolean),!(!Se&&!n.isValid)&&w()):Se=re=await W(r);return y.state.next({...!Zr(Z)||(p.isValid||g.isValid)&&re!==n.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:re}:{},errors:n.errors}),te.shouldFocus&&!Se&&Hu(r,fe,Z?Te:u.mount),Se},P=(Z,te)=>{let re={...c.mount?i:a};return te&&(re=Tk(te.dirtyFields?n.dirtyFields:n.touchedFields,re)),Xt(Z)?re:Zr(Z)?Me(re,Z):Z.map(Se=>Me(re,Se))},q=(Z,te)=>({invalid:!!Me((te||n).errors,Z),isDirty:!!Me((te||n).dirtyFields,Z),error:Me((te||n).errors,Z),isValidating:!!Me(n.validatingFields,Z),isTouched:!!Me((te||n).touchedFields,Z)}),B=Z=>{const te=Z?qu(Z):void 0;te?.forEach(re=>bn(n.errors,re)),te?te.forEach(re=>{y.state.next({name:re,errors:n.errors})}):y.state.next({errors:{}})},L=(Z,te,re)=>{const Se=(Me(r,Z,{_f:{}})._f||{}).ref,Te=Me(n.errors,Z)||{},{ref:Re,message:Ne,type:ot,...it}=Te;Ut(n.errors,Z,{...it,...te,ref:Se}),y.state.next({name:Z,errors:n.errors,isValid:!1}),re&&re.shouldFocus&&Se&&Se.focus&&Se.focus()},$=(Z,te)=>dr(Z)?y.state.subscribe({next:re=>"values"in re&&Z(U(void 0,te),re)}):U(Z,te,!0),Q=Z=>y.state.subscribe({next:te=>{yF(Z.name,te.name,Z.exact)&&vF(te,Z.formState||p,Ye,Z.reRenderRoot)&&Z.callback({values:{...i},...n,...te,defaultValues:a})}}).unsubscribe,me=Z=>(c.mount=!0,g={...g,...Z.formState},Q({...Z,formState:{...m,...Z.formState}})),ye=(Z,te={})=>{for(const re of Z?qu(Z):u.mount)u.mount.delete(re),u.array.delete(re),te.keepValue||(bn(r,re),bn(i,re)),!te.keepError&&bn(n.errors,re),!te.keepDirty&&bn(n.dirtyFields,re),!te.keepTouched&&bn(n.touchedFields,re),!te.keepIsValidating&&bn(n.validatingFields,re),!t.shouldUnregister&&!te.keepDefaultValue&&bn(a,re);y.state.next({values:_n(i)}),y.state.next({...n,...te.keepDirty?{isDirty:G()}:{}}),!te.keepIsValid&&w()},Ae=({disabled:Z,name:te})=>{if(Br(Z)&&c.mount||Z||u.disabled.has(te)){const Te=u.disabled.has(te)!==!!Z;Z?u.disabled.add(te):u.disabled.delete(te),Te&&c.mount&&!c.action&&w()}},ke=(Z,te={})=>{let re=Me(r,Z);const Se=Br(te.disabled)||Br(t.disabled);return Ut(r,Z,{...re||{},_f:{...re&&re._f?re._f:{ref:{name:Z}},name:Z,mount:!0,...te}}),u.mount.add(Z),re?Ae({disabled:Br(te.disabled)?te.disabled:t.disabled,name:Z}):C(Z,!0,te.value),{...Se?{disabled:te.disabled||t.disabled}:{},...t.progressive?{required:!!te.required,min:Eu(te.min),max:Eu(te.max),minLength:Eu(te.minLength),maxLength:Eu(te.maxLength),pattern:Eu(te.pattern)}:{},name:Z,onChange:ae,onBlur:ae,ref:Te=>{if(Te){ke(Z,te),re=Me(r,Z);const Re=Xt(Te.value)&&Te.querySelectorAll&&Te.querySelectorAll("input,select,textarea")[0]||Te,Ne=uF(Re),ot=re._f.refs||[];if(Ne?ot.find(it=>it===Re):Re===re._f.ref)return;Ut(r,Z,{_f:{...re._f,...Ne?{refs:[...ot.filter(Ky),Re,...Array.isArray(Me(a,Z))?[{}]:[]],ref:{type:Re.type,name:Z}}:{ref:Re}}}),C(Z,!1,void 0,Re)}else re=Me(r,Z,{}),re._f&&(re._f.mount=!1),(t.shouldUnregister||te.shouldUnregister)&&!(Ek(u.array,Z)&&c.action)&&u.unMount.add(Z)}}},H=()=>t.shouldFocusError&&Hu(r,fe,u.mount),ne=Z=>{Br(Z)&&(y.state.next({disabled:Z}),Hu(r,(te,re)=>{const Se=Me(r,re);Se&&(te.disabled=Se._f.disabled||Z,Array.isArray(Se._f.refs)&&Se._f.refs.forEach(Te=>{Te.disabled=Se._f.disabled||Z}))},0,!1))},_e=(Z,te)=>async re=>{let Se;re&&(re.preventDefault&&re.preventDefault(),re.persist&&re.persist());let Te=_n(i);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:Re,values:Ne}=await D();x(),n.errors=Re,Te=_n(Ne)}else await W(r);if(u.disabled.size)for(const Re of u.disabled)bn(Te,Re);if(bn(n.errors,"root"),ur(n.errors)){y.state.next({errors:{}});try{await Z(Te,re)}catch(Re){Se=Re}}else te&&await te({...n.errors},re),H(),setTimeout(H);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ur(n.errors)&&!Se,submitCount:n.submitCount+1,errors:n.errors}),Se)throw Se},pe=(Z,te={})=>{Me(r,Z)&&(Xt(te.defaultValue)?X(Z,_n(Me(a,Z))):(X(Z,te.defaultValue),Ut(a,Z,_n(te.defaultValue))),te.keepTouched||bn(n.touchedFields,Z),te.keepDirty||(bn(n.dirtyFields,Z),n.isDirty=te.defaultValue?G(Z,_n(Me(a,Z))):G()),te.keepError||(bn(n.errors,Z),p.isValid&&w()),y.state.next({...n}))},ce=(Z,te={})=>{const re=Z?_n(Z):a,Se=_n(re),Te=ur(Z),Re=Te?a:Se;if(te.keepDefaultValues||(a=re),!te.keepValues){if(te.keepDirtyValues){const Ne=new Set([...u.mount,...Object.keys(Hc(a,i))]);for(const ot of Array.from(Ne)){const it=Me(n.dirtyFields,ot),Dt=Me(i,ot),hr=Me(Re,ot);it&&!Xt(Dt)?Ut(Re,ot,Dt):!it&&!Xt(hr)&&X(ot,hr)}}else{if(Mb&&Xt(Z))for(const Ne of u.mount){const ot=Me(r,Ne);if(ot&&ot._f){const it=Array.isArray(ot._f.refs)?ot._f.refs[0]:ot._f.ref;if(qp(it)){const Dt=it.closest("form");if(Dt){Dt.reset();break}}}}if(te.keepFieldsRef)for(const Ne of u.mount)X(Ne,Me(Re,Ne));else r={}}i=t.shouldUnregister?te.keepDefaultValues?_n(a):{}:_n(Re),y.array.next({values:{...Re}}),y.state.next({values:{...Re}})}u={mount:te.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!p.isValid||!!te.keepIsValid||!!te.keepDirtyValues||!t.shouldUnregister&&!ur(Re),c.watch=!!t.shouldUnregister,c.keepIsValid=!!te.keepIsValid,c.action=!1,te.keepErrors||(n.errors={}),y.state.next({submitCount:te.keepSubmitCount?n.submitCount:0,isDirty:Te?!1:te.keepDirty?n.isDirty:!!(te.keepDefaultValues&&!Mo(Z,a)),isSubmitted:te.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Te?{}:te.keepDirtyValues?te.keepDefaultValues&&i?Hc(a,i):n.dirtyFields:te.keepDefaultValues&&Z?Hc(a,Z):te.keepDirty?n.dirtyFields:{},touchedFields:te.keepTouched?n.touchedFields:{},errors:te.keepErrors?n.errors:{},isSubmitSuccessful:te.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Oe=(Z,te)=>ce(dr(Z)?Z(i):Z,{...t.resetOptions,...te}),je=(Z,te={})=>{const re=Me(r,Z),Se=re&&re._f;if(Se){const Te=Se.refs?Se.refs[0]:Se.ref;Te.focus&&setTimeout(()=>{Te.focus(),te.shouldSelect&&dr(Te.select)&&Te.select()})}},Ye=Z=>{n={...n,...Z}},Xe={control:{register:ke,unregister:ye,getFieldState:q,handleSubmit:_e,setError:L,_subscribe:Q,_runSchema:D,_updateIsValidating:x,_focusError:H,_getWatch:U,_getDirty:G,_setValid:w,_setFieldArray:E,_setDisabledField:Ae,_setErrors:O,_getFieldArray:J,_reset:ce,_resetDefaultValues:()=>dr(t.defaultValues)&&t.defaultValues().then(Z=>{Oe(Z,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:ne,_subjects:y,_proxyFormState:p,get _fields(){return r},get _formValues(){return i},get _state(){return c},set _state(Z){c=Z},get _defaultValues(){return a},get _names(){return u},set _names(Z){u=Z},get _formState(){return n},get _options(){return t},set _options(Z){t={...t,...Z}}},subscribe:me,trigger:K,register:ke,handleSubmit:_e,watch:$,setValue:X,getValues:P,reset:Oe,resetField:pe,clearErrors:B,unregister:ye,setError:L,setFocus:je,getFieldState:q};return{...Xe,formControl:Xe}}function ra(e={}){const t=le.useRef(void 0),n=le.useRef(void 0),[r,a]=le.useState({isDirty:!1,isValidating:!1,isLoading:dr(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:dr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!dr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...u}=EF(e);t.current={...u,formState:r}}const i=t.current.control;return i._options=e,$b(()=>{const c=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),i._formState.isReady=!0,c},[i]),le.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),le.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),le.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),le.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),le.useEffect(()=>{if(i._proxyFormState.isDirty){const c=i._getDirty();c!==r.isDirty&&i._subjects.state.next({isDirty:c})}},[i,r.isDirty]),le.useEffect(()=>{var c;e.values&&!Mo(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((c=i._options.resetOptions)===null||c===void 0)&&c.keepIsValid||i._setValid(),n.current=e.values,a(u=>({...u}))):i._resetDefaultValues()},[i,e.values]),le.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=le.useMemo(()=>Rk(r,i),[i,r]),t.current}function $T(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bd(...e){return t=>{let n=!1;const r=e.map(a=>{const i=$T(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():$T(e[a],null)}}}}function In(...e){return A.useCallback(bd(...e),e)}var RF=Symbol.for("react.lazy"),Gp=lb[" use ".trim().toString()];function xF(e){return typeof e=="object"&&e!==null&&"then"in e}function Nk(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RF&&"_payload"in e&&xF(e._payload)}function Mk(e){const t=TF(e),n=A.forwardRef((r,a)=>{let{children:i,...c}=r;Nk(i)&&typeof Gp=="function"&&(i=Gp(i._payload));const u=A.Children.toArray(i),d=u.find(CF);if(d){const f=d.props.children,m=u.map(p=>p===d?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return R.jsx(t,{...c,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return R.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var Bb=Mk("Slot");function TF(e){const t=A.forwardRef((n,r)=>{let{children:a,...i}=n;if(Nk(a)&&typeof Gp=="function"&&(a=Gp(a._payload)),A.isValidElement(a)){const c=IF(a),u=AF(i,a.props);return a.type!==A.Fragment&&(u.ref=r?bd(r,c):c),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var OF=Symbol("radix.slottable");function CF(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===OF}function AF(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function IF(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 UT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,zT=Sb,Pk=(e,t)=>n=>{var r;if(t?.variants==null)return zT(e,n?.class,n?.className);const{variants:a,defaultVariants:i}=t,c=Object.keys(a).map(f=>{const m=n?.[f],p=i?.[f];if(m===null)return null;const g=UT(m)||UT(p);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...y}=m;return Object.entries(y).every(b=>{let[S,w]=b;return Array.isArray(w)?w.includes({...i,...u}[S]):{...i,...u}[S]===w})?[...f,p,g]:f},[]);return zT(e,c,d,n?.class,n?.className)},VT=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Me(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},p_=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?VT(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>VT(a,n,e))}},FT=(e,t)=>{t.shouldUseNativeValidation&&p_(e,t);const n={};for(const r in e){const a=Me(t.fields,r),i=Object.assign(e[r]||{},{ref:a&&a.ref});if(kF(t.names||Object.keys(e),r)){const c=Object.assign({},Me(n,r));Ut(c,"root",i),Ut(n,r,c)}else Ut(n,r,i)}return n},kF=(e,t)=>{const n=BT(t);return e.some(r=>BT(r).match(`^${n}\\.\\d+`))};function BT(e){return e.replace(/\]|\[/g,"")}function qT(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function NF(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,c=r.path.join(".");if(!n[c])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[c]={message:u.message,type:u.code}}else n[c]={message:i,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(p){return e.push(p)})}),t){var d=n[c].types,f=d&&d[r.code];n[c]=zb(c,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function MF(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,c=r.path.join(".");if(!n[c])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[c]={message:u.message,type:u.code}}else n[c]={message:i,type:a};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(p){return e.push(p)})}),t){var d=n[c].types,f=d&&d[r.code];n[c]=zb(c,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function oa(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,a,i){try{return Promise.resolve(qT(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return i.shouldUseNativeValidation&&p_({},i),{errors:{},values:n.raw?Object.assign({},r):c}})},function(c){if((function(u){return Array.isArray(u?.issues)})(c))return{values:{},errors:FT(NF(c.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw c}))}catch(c){return Promise.reject(c)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,a,i){try{return Promise.resolve(qT(function(){return Promise.resolve((n.mode==="sync"?Y$:Q$)(e,r,t)).then(function(c){return i.shouldUseNativeValidation&&p_({},i),{errors:{},values:n.raw?Object.assign({},r):c}})},function(c){if((function(u){return u instanceof Ob})(c))return{values:{},errors:FT(MF(c.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw c}))}catch(c){return Promise.reject(c)}};throw new Error("Invalid input: not a Zod schema")}function lt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function PF(e,t){const n=A.createContext(t),r=i=>{const{children:c,...u}=i,d=A.useMemo(()=>u,Object.values(u));return R.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function a(i){const c=A.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function Fi(e,t=[]){let n=[];function r(i,c){const u=A.createContext(c),d=n.length;n=[...n,c];const f=p=>{const{scope:g,children:y,...b}=p,S=g?.[e]?.[d]||u,w=A.useMemo(()=>b,Object.values(b));return R.jsx(S.Provider,{value:w,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,b=A.useContext(y);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(c=>A.createContext(c));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,DF(a,...t)]}function DF(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const c=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Lo=globalThis?.document?A.useLayoutEffect:()=>{},LF=lb[" useId ".trim().toString()]||(()=>{}),jF=0;function ks(e){const[t,n]=A.useState(LF());return Lo(()=>{n(r=>r??String(jF++))},[e]),e||(t?`radix-${t}`:"")}var $F=lb[" useInsertionEffect ".trim().toString()]||Lo;function wd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,c]=UF({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=A.useRef(e!==void 0);A.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"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.`),m.current=u},[u,r])}const f=A.useCallback(m=>{if(u){const p=zF(m)?m(e):m;p!==e&&c.current?.(p)}else i(m)},[u,e,i,c]);return[d,f]}function UF({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),a=A.useRef(n),i=A.useRef(t);return $F(()=>{i.current=t},[t]),A.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,r,i]}function zF(e){return typeof e=="function"}function od(e){const t=VF(e),n=A.forwardRef((r,a)=>{const{children:i,...c}=r,u=A.Children.toArray(i),d=u.find(FF);if(d){const f=d.props.children,m=u.map(p=>p===d?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return R.jsx(t,{...c,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return R.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function VF(e){const t=A.forwardRef((n,r)=>{const{children:a,...i}=n;if(A.isValidElement(a)){const c=qF(a),u=BF(i,a.props);return a.type!==A.Fragment&&(u.ref=r?bd(r,c):c),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Dk=Symbol("radix.slottable");function Noe(e){const t=({children:n})=>R.jsx(R.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Dk,t}function FF(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Dk}function BF(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function qF(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 HF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rn=HF.reduce((e,t)=>{const n=od(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:c,...u}=a,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),R.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Lk(e,t){e&&xm.flushSync(()=>e.dispatchEvent(t))}function jo(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>t.current?.(...n),[])}function GF(e,t=globalThis?.document){const n=jo(e);A.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var ZF="DismissableLayer",m_="dismissableLayer.update",KF="dismissableLayer.pointerDownOutside",WF="dismissableLayer.focusOutside",HT,jk=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qb=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:c,onDismiss:u,...d}=e,f=A.useContext(jk),[m,p]=A.useState(null),g=m?.ownerDocument??globalThis?.document,[,y]=A.useState({}),b=In(t,N=>p(N)),S=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=S.indexOf(w),E=m?S.indexOf(m):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,O=E>=x,C=XF(N=>{const D=N.target,z=[...f.branches].some(W=>W.contains(D));!O||z||(a?.(N),c?.(N),N.defaultPrevented||u?.())},g),I=JF(N=>{const D=N.target;[...f.branches].some(W=>W.contains(D))||(i?.(N),c?.(N),N.defaultPrevented||u?.())},g);return GF(N=>{E===f.layers.size-1&&(r?.(N),!N.defaultPrevented&&u&&(N.preventDefault(),u()))},g),A.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(HT=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),GT(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=HT)}},[m,g,n,f]),A.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),GT())},[m,f]),A.useEffect(()=>{const N=()=>y({});return document.addEventListener(m_,N),()=>document.removeEventListener(m_,N)},[]),R.jsx(rn.div,{...d,ref:b,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,I.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,C.onPointerDownCapture)})});qb.displayName=ZF;var YF="DismissableLayerBranch",QF=A.forwardRef((e,t)=>{const n=A.useContext(jk),r=A.useRef(null),a=In(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),R.jsx(rn.div,{...e,ref:a})});QF.displayName=YF;function XF(e,t=globalThis?.document){const n=jo(e),r=A.useRef(!1),a=A.useRef(()=>{});return A.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let d=function(){$k(KF,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function JF(e,t=globalThis?.document){const n=jo(e),r=A.useRef(!1);return A.useEffect(()=>{const a=i=>{i.target&&!r.current&&$k(WF,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function GT(){const e=new CustomEvent(m_);document.dispatchEvent(e)}function $k(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Lk(a,i):a.dispatchEvent(i)}var Wy="focusScope.autoFocusOnMount",Yy="focusScope.autoFocusOnUnmount",ZT={bubbles:!1,cancelable:!0},eB="FocusScope",Hb=A.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[u,d]=A.useState(null),f=jo(a),m=jo(i),p=A.useRef(null),g=In(t,S=>d(S)),y=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(r){let S=function(T){if(y.paused||!u)return;const O=T.target;u.contains(O)?p.current=O:_s(p.current,{select:!0})},w=function(T){if(y.paused||!u)return;const O=T.relatedTarget;O!==null&&(u.contains(O)||_s(p.current,{select:!0}))},x=function(T){if(document.activeElement===document.body)for(const C of T)C.removedNodes.length>0&&_s(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const E=new MutationObserver(x);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),E.disconnect()}}},[r,u,y.paused]),A.useEffect(()=>{if(u){WT.add(y);const S=document.activeElement;if(!u.contains(S)){const x=new CustomEvent(Wy,ZT);u.addEventListener(Wy,f),u.dispatchEvent(x),x.defaultPrevented||(tB(sB(Uk(u)),{select:!0}),document.activeElement===S&&_s(u))}return()=>{u.removeEventListener(Wy,f),setTimeout(()=>{const x=new CustomEvent(Yy,ZT);u.addEventListener(Yy,m),u.dispatchEvent(x),x.defaultPrevented||_s(S??document.body,{select:!0}),u.removeEventListener(Yy,m),WT.remove(y)},0)}}},[u,f,m,y]);const b=A.useCallback(S=>{if(!n&&!r||y.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,x=document.activeElement;if(w&&x){const E=S.currentTarget,[T,O]=nB(E);T&&O?!S.shiftKey&&x===O?(S.preventDefault(),n&&_s(T,{select:!0})):S.shiftKey&&x===T&&(S.preventDefault(),n&&_s(O,{select:!0})):x===E&&S.preventDefault()}},[n,r,y.paused]);return R.jsx(rn.div,{tabIndex:-1,...c,ref:g,onKeyDown:b})});Hb.displayName=eB;function tB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_s(r,{select:t}),document.activeElement!==n)return}function nB(e){const t=Uk(e),n=KT(t,e),r=KT(t.reverse(),e);return[n,r]}function Uk(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function KT(e,t){for(const n of e)if(!rB(n,{upTo:t}))return n}function rB(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 oB(e){return e instanceof HTMLInputElement&&"select"in e}function _s(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&oB(e)&&t&&e.select()}}var WT=aB();function aB(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=YT(e,t),e.unshift(t)},remove(t){e=YT(e,t),e[0]?.resume()}}}function YT(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sB(e){return e.filter(t=>t.tagName!=="A")}var iB="Portal",Gb=A.forwardRef((e,t)=>{const{container:n,...r}=e,[a,i]=A.useState(!1);Lo(()=>i(!0),[]);const c=n||a&&globalThis?.document?.body;return c?xA.createPortal(R.jsx(rn.div,{...r,ref:t}),c):null});Gb.displayName=iB;function cB(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var za=e=>{const{present:t,children:n}=e,r=lB(t),a=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=In(r.ref,uB(a));return typeof n=="function"||r.isPresent?A.cloneElement(a,{ref:i}):null};za.displayName="Presence";function lB(e){const[t,n]=A.useState(),r=A.useRef(null),a=A.useRef(e),i=A.useRef("none"),c=e?"mounted":"unmounted",[u,d]=cB(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const f=uh(r.current);i.current=u==="mounted"?f:"none"},[u]),Lo(()=>{const f=r.current,m=a.current;if(m!==e){const g=i.current,y=uh(f);e?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),Lo(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=y=>{const S=uh(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(d("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=y=>{y.target===t&&(i.current=uh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:A.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function uh(e){return e?.animationName||"none"}function uB(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 Qy=0;function zk(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??QT()),document.body.insertAdjacentElement("beforeend",e[1]??QT()),Qy++,()=>{Qy===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qy--}},[])}function QT(){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 Xo=function(){return Xo=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Xo.apply(this,arguments)};function Vk(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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function dB(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var mp="right-scroll-bar-position",gp="width-before-scroll-bar",fB="with-scroll-bars-hidden",hB="--removed-body-scroll-bar-size";function Xy(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pB(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var mB=typeof window<"u"?A.useLayoutEffect:A.useEffect,XT=new WeakMap;function gB(e,t){var n=pB(null,function(r){return e.forEach(function(a){return Xy(a,r)})});return mB(function(){var r=XT.get(n);if(r){var a=new Set(r),i=new Set(e),c=n.current;a.forEach(function(u){i.has(u)||Xy(u,null)}),i.forEach(function(u){a.has(u)||Xy(u,c)})}XT.set(n,e)},[e]),n}function vB(e){return e}function yB(e,t){t===void 0&&(t=vB);var n=[],r=!1,a={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(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(i),c=n}var d=function(){var m=c;c=[],m.forEach(i)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){c.push(m),f()},filter:function(m){return c=c.filter(m),n}}}};return a}function _B(e){e===void 0&&(e={});var t=yB(null);return t.options=Xo({async:!0,ssr:!1},e),t}var Fk=function(e){var t=e.sideCar,n=Vk(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 A.createElement(r,Xo({},n))};Fk.isSideCarExport=!0;function bB(e,t){return e.useMedium(t),Fk}var Bk=_B(),Jy=function(){},jm=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:Jy,onWheelCapture:Jy,onTouchMoveCapture:Jy}),a=r[0],i=r[1],c=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,y=e.noRelative,b=e.noIsolation,S=e.inert,w=e.allowPinchZoom,x=e.as,E=x===void 0?"div":x,T=e.gapMode,O=Vk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,I=gB([n,t]),N=Xo(Xo({},O),a);return A.createElement(A.Fragment,null,m&&A.createElement(C,{sideCar:Bk,removeScrollBar:f,shards:p,noRelative:y,noIsolation:b,inert:S,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:T}),c?A.cloneElement(A.Children.only(u),Xo(Xo({},N),{ref:I})):A.createElement(E,Xo({},N,{className:d,ref:I}),u))});jm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jm.classNames={fullWidth:gp,zeroRight:mp};var wB=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function SB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wB();return t&&e.setAttribute("nonce",t),e}function EB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function RB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=SB())&&(EB(t,n),RB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},TB=function(){var e=xB();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},qk=function(){var e=TB(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},OB={left:0,top:0,right:0,gap:0},e0=function(e){return parseInt(e||"",10)||0},CB=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[e0(n),e0(r),e0(a)]},AB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return OB;var t=CB(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])}},IB=qk(),al="data-scroll-locked",kB=function(e,t,n,r){var a=e.left,i=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
62
|
-
.`.concat(fB,` {
|
|
63
|
-
overflow: hidden `).concat(r,`;
|
|
64
|
-
padding-right: `).concat(u,"px ").concat(r,`;
|
|
65
|
-
}
|
|
66
|
-
body[`).concat(al,`] {
|
|
67
|
-
overflow: hidden `).concat(r,`;
|
|
68
|
-
overscroll-behavior: contain;
|
|
69
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
70
|
-
padding-left: `.concat(a,`px;
|
|
71
|
-
padding-top: `).concat(i,`px;
|
|
72
|
-
padding-right: `).concat(c,`px;
|
|
73
|
-
margin-left:0;
|
|
74
|
-
margin-top:0;
|
|
75
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
76
|
-
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.`).concat(mp,` {
|
|
80
|
-
right: `).concat(u,"px ").concat(r,`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.`).concat(gp,` {
|
|
84
|
-
margin-right: `).concat(u,"px ").concat(r,`;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.`).concat(mp," .").concat(mp,` {
|
|
88
|
-
right: 0 `).concat(r,`;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.`).concat(gp," .").concat(gp,` {
|
|
92
|
-
margin-right: 0 `).concat(r,`;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
body[`).concat(al,`] {
|
|
96
|
-
`).concat(hB,": ").concat(u,`px;
|
|
97
|
-
}
|
|
98
|
-
`)},JT=function(){var e=parseInt(document.body.getAttribute(al)||"0",10);return isFinite(e)?e:0},NB=function(){A.useEffect(function(){return document.body.setAttribute(al,(JT()+1).toString()),function(){var e=JT()-1;e<=0?document.body.removeAttribute(al):document.body.setAttribute(al,e.toString())}},[])},MB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;NB();var i=A.useMemo(function(){return AB(a)},[a]);return A.createElement(IB,{styles:kB(i,!t,a,n?"":"!important")})},g_=!1;if(typeof window<"u")try{var dh=Object.defineProperty({},"passive",{get:function(){return g_=!0,!0}});window.addEventListener("test",dh,dh),window.removeEventListener("test",dh,dh)}catch{g_=!1}var Dc=g_?{passive:!1}:!1,PB=function(e){return e.tagName==="TEXTAREA"},Hk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!PB(e)&&n[t]==="visible")},DB=function(e){return Hk(e,"overflowY")},LB=function(e){return Hk(e,"overflowX")},eO=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=Gk(e,r);if(a){var i=Zk(e,r),c=i[1],u=i[2];if(c>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$B=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Gk=function(e,t){return e==="v"?DB(t):LB(t)},Zk=function(e,t){return e==="v"?jB(t):$B(t)},UB=function(e,t){return e==="h"&&t==="rtl"?-1:1},zB=function(e,t,n,r,a){var i=UB(e,window.getComputedStyle(t).direction),c=i*r,u=n.target,d=t.contains(u),f=!1,m=c>0,p=0,g=0;do{if(!u)break;var y=Zk(e,u),b=y[0],S=y[1],w=y[2],x=S-w-i*b;(b||x)&&Gk(e,u)&&(p+=x,g+=b);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(f=!0),f},fh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},tO=function(e){return[e.deltaX,e.deltaY]},nO=function(e){return e&&"current"in e?e.current:e},VB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},FB=function(e){return`
|
|
99
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
100
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
101
|
-
`)},BB=0,Lc=[];function qB(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),a=A.useState(BB++)[0],i=A.useState(qk)[0],c=A.useRef(e);A.useEffect(function(){c.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=dB([e.lockRef.current],(e.shards||[]).map(nO),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=A.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!c.current.allowPinchZoom;var x=fh(S),E=n.current,T="deltaX"in S?S.deltaX:E[0]-x[0],O="deltaY"in S?S.deltaY:E[1]-x[1],C,I=S.target,N=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in S&&N==="h"&&I.type==="range")return!1;var D=window.getSelection(),z=D&&D.anchorNode,W=z?z===I||z.contains(I):!1;if(W)return!1;var V=eO(N,I);if(!V)return!0;if(V?C=N:(C=N==="v"?"h":"v",V=eO(N,I)),!V)return!1;if(!r.current&&"changedTouches"in S&&(T||O)&&(r.current=C),!C)return!0;var G=r.current||C;return zB(G,w,S,G==="h"?T:O)},[]),d=A.useCallback(function(S){var w=S;if(!(!Lc.length||Lc[Lc.length-1]!==i)){var x="deltaY"in w?tO(w):fh(w),E=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&VB(C.delta,x)})[0];if(E&&E.should){w.cancelable&&w.preventDefault();return}if(!E){var T=(c.current.shards||[]).map(nO).filter(Boolean).filter(function(C){return C.contains(w.target)}),O=T.length>0?u(w,T[0]):!c.current.noIsolation;O&&w.cancelable&&w.preventDefault()}}},[]),f=A.useCallback(function(S,w,x,E){var T={name:S,delta:w,target:x,should:E,shadowParent:HB(x)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),m=A.useCallback(function(S){n.current=fh(S),r.current=void 0},[]),p=A.useCallback(function(S){f(S.type,tO(S),S.target,u(S,e.lockRef.current))},[]),g=A.useCallback(function(S){f(S.type,fh(S),S.target,u(S,e.lockRef.current))},[]);A.useEffect(function(){return Lc.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Dc),document.addEventListener("touchmove",d,Dc),document.addEventListener("touchstart",m,Dc),function(){Lc=Lc.filter(function(S){return S!==i}),document.removeEventListener("wheel",d,Dc),document.removeEventListener("touchmove",d,Dc),document.removeEventListener("touchstart",m,Dc)}},[]);var y=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(i,{styles:FB(a)}):null,y?A.createElement(MB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const GB=bB(Bk,qB);var Zb=A.forwardRef(function(e,t){return A.createElement(jm,Xo({},e,{ref:t,sideCar:GB}))});Zb.classNames=jm.classNames;var ZB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jc=new WeakMap,hh=new WeakMap,ph={},t0=0,Kk=function(e){return e&&(e.host||Kk(e.parentNode))},KB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Kk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},WB=function(e,t,n,r){var a=KB(t,Array.isArray(e)?e:[e]);ph[n]||(ph[n]=new WeakMap);var i=ph[n],c=[],u=new Set,d=new Set(a),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};a.forEach(f);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(u.has(g))m(g);else try{var y=g.getAttribute(r),b=y!==null&&y!=="false",S=(jc.get(g)||0)+1,w=(i.get(g)||0)+1;jc.set(g,S),i.set(g,w),c.push(g),S===1&&b&&hh.set(g,!0),w===1&&g.setAttribute(n,"true"),b||g.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",g,x)}})};return m(t),u.clear(),t0++,function(){c.forEach(function(p){var g=jc.get(p)-1,y=i.get(p)-1;jc.set(p,g),i.set(p,y),g||(hh.has(p)||p.removeAttribute(r),hh.delete(p)),y||p.removeAttribute(n)}),t0--,t0||(jc=new WeakMap,jc=new WeakMap,hh=new WeakMap,ph={})}},Wk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=ZB(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),WB(r,a,n,"aria-hidden")):function(){return null}},$m="Dialog",[Yk,Moe]=Fi($m),[YB,zo]=Yk($m),Qk=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=A.useRef(null),d=A.useRef(null),[f,m]=wd({prop:r,defaultProp:a??!1,onChange:i,caller:$m});return R.jsx(YB,{scope:t,triggerRef:u,contentRef:d,contentId:ks(),titleId:ks(),descriptionId:ks(),open:f,onOpenChange:m,onOpenToggle:A.useCallback(()=>m(p=>!p),[m]),modal:c,children:n})};Qk.displayName=$m;var Xk="DialogTrigger",Jk=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zo(Xk,n),i=In(t,a.triggerRef);return R.jsx(rn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Yb(a.open),...r,ref:i,onClick:lt(e.onClick,a.onOpenToggle)})});Jk.displayName=Xk;var Kb="DialogPortal",[QB,eN]=Yk(Kb,{forceMount:void 0}),tN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=zo(Kb,t);return R.jsx(QB,{scope:t,forceMount:n,children:A.Children.map(r,c=>R.jsx(za,{present:n||i.open,children:R.jsx(Gb,{asChild:!0,container:a,children:c})}))})};tN.displayName=Kb;var Zp="DialogOverlay",nN=A.forwardRef((e,t)=>{const n=eN(Zp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=zo(Zp,e.__scopeDialog);return i.modal?R.jsx(za,{present:r||i.open,children:R.jsx(JB,{...a,ref:t})}):null});nN.displayName=Zp;var XB=od("DialogOverlay.RemoveScroll"),JB=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zo(Zp,n);return R.jsx(Zb,{as:XB,allowPinchZoom:!0,shards:[a.contentRef],children:R.jsx(rn.div,{"data-state":Yb(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Pi="DialogContent",rN=A.forwardRef((e,t)=>{const n=eN(Pi,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=zo(Pi,e.__scopeDialog);return R.jsx(za,{present:r||i.open,children:i.modal?R.jsx(eq,{...a,ref:t}):R.jsx(tq,{...a,ref:t})})});rN.displayName=Pi;var eq=A.forwardRef((e,t)=>{const n=zo(Pi,e.__scopeDialog),r=A.useRef(null),a=In(t,n.contentRef,r);return A.useEffect(()=>{const i=r.current;if(i)return Wk(i)},[]),R.jsx(oN,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:lt(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:lt(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&i.preventDefault()}),onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault())})}),tq=A.forwardRef((e,t)=>{const n=zo(Pi,e.__scopeDialog),r=A.useRef(!1),a=A.useRef(!1);return R.jsx(oN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=i.target;n.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),oN=A.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...c}=e,u=zo(Pi,n),d=A.useRef(null),f=In(t,d);return zk(),R.jsxs(R.Fragment,{children:[R.jsx(Hb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:R.jsx(qb,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Yb(u.open),...c,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),R.jsxs(R.Fragment,{children:[R.jsx(nq,{titleId:u.titleId}),R.jsx(oq,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Wb="DialogTitle",aN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zo(Wb,n);return R.jsx(rn.h2,{id:a.titleId,...r,ref:t})});aN.displayName=Wb;var sN="DialogDescription",iN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zo(sN,n);return R.jsx(rn.p,{id:a.descriptionId,...r,ref:t})});iN.displayName=sN;var cN="DialogClose",lN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=zo(cN,n);return R.jsx(rn.button,{type:"button",...r,ref:t,onClick:lt(e.onClick,()=>a.onOpenChange(!1))})});lN.displayName=cN;function Yb(e){return e?"open":"closed"}var uN="DialogTitleWarning",[Poe,dN]=PF(uN,{contentName:Pi,titleName:Wb,docsSlug:"dialog"}),nq=({titleId:e})=>{const t=dN(uN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
102
|
-
|
|
103
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
104
|
-
|
|
105
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},rq="DialogDescriptionWarning",oq=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dN(rq).contentName}}.`;return A.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Doe=Qk,Loe=Jk,joe=tN,aq=nN,sq=rN,$oe=aN,Uoe=iN,zoe=lN;function fN(e){const t=e+"CollectionProvider",[n,r]=Fi(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=S=>{const{scope:w,children:x}=S,E=le.useRef(null),T=le.useRef(new Map).current;return R.jsx(a,{scope:w,itemMap:T,collectionRef:E,children:x})};c.displayName=t;const u=e+"CollectionSlot",d=od(u),f=le.forwardRef((S,w)=>{const{scope:x,children:E}=S,T=i(u,x),O=In(w,T.collectionRef);return R.jsx(d,{ref:O,children:E})});f.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=od(m),y=le.forwardRef((S,w)=>{const{scope:x,children:E,...T}=S,O=le.useRef(null),C=In(w,O),I=i(m,x);return le.useEffect(()=>(I.itemMap.set(O,{ref:O,...T}),()=>{I.itemMap.delete(O)})),R.jsx(g,{[p]:"",ref:C,children:E})});y.displayName=m;function b(S){const w=i(e+"CollectionConsumer",S);return le.useCallback(()=>{const E=w.collectionRef.current;if(!E)return[];const T=Array.from(E.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((I,N)=>T.indexOf(I.ref.current)-T.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:c,Slot:f,ItemSlot:y},b,r]}var iq=A.createContext(void 0);function hN(e){const t=A.useContext(iq);return e||t||"ltr"}const cq=["top","right","bottom","left"],Ls=Math.min,Hr=Math.max,Kp=Math.round,mh=Math.floor,ea=e=>({x:e,y:e}),lq={left:"right",right:"left",bottom:"top",top:"bottom"};function v_(e,t,n){return Hr(e,Ls(t,n))}function Pa(e,t){return typeof e=="function"?e(t):e}function Da(e){return e.split("-")[0]}function El(e){return e.split("-")[1]}function Qb(e){return e==="x"?"y":"x"}function Xb(e){return e==="y"?"height":"width"}function Jo(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Jb(e){return Qb(Jo(e))}function uq(e,t,n){n===void 0&&(n=!1);const r=El(e),a=Jb(e),i=Xb(a);let c=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=Wp(c)),[c,Wp(c)]}function dq(e){const t=Wp(e);return[y_(e),t,y_(t)]}function y_(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const rO=["left","right"],oO=["right","left"],fq=["top","bottom"],hq=["bottom","top"];function pq(e,t,n){switch(e){case"top":case"bottom":return n?t?oO:rO:t?rO:oO;case"left":case"right":return t?fq:hq;default:return[]}}function mq(e,t,n,r){const a=El(e);let i=pq(Da(e),n==="start",r);return a&&(i=i.map(c=>c+"-"+a),t&&(i=i.concat(i.map(y_)))),i}function Wp(e){const t=Da(e);return lq[t]+e.slice(t.length)}function gq(e){return{top:0,right:0,bottom:0,left:0,...e}}function pN(e){return typeof e!="number"?gq(e):{top:e,right:e,bottom:e,left:e}}function Yp(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function aO(e,t,n){let{reference:r,floating:a}=e;const i=Jo(t),c=Jb(t),u=Xb(c),d=Da(t),f=i==="y",m=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let y;switch(d){case"top":y={x:m,y:r.y-a.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-a.width,y:p};break;default:y={x:r.x,y:r.y}}switch(El(t)){case"start":y[c]-=g*(n&&f?-1:1);break;case"end":y[c]+=g*(n&&f?-1:1);break}return y}async function vq(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:c,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Pa(t,e),b=pN(y),w=u[g?p==="floating"?"reference":"floating":p],x=Yp(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),E=p==="floating"?{x:r,y:a,width:c.floating.width,height:c.floating.height}:c.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),O=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},C=Yp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:E,offsetParent:T,strategy:d}):E);return{top:(x.top-C.top+b.top)/O.y,bottom:(C.bottom-x.bottom+b.bottom)/O.y,left:(x.left-C.left+b.left)/O.x,right:(C.right-x.right+b.right)/O.x}}const yq=50,_q=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:c}=n,u=c.detectOverflow?c:{...c,detectOverflow:vq},d=await(c.isRTL==null?void 0:c.isRTL(t));let f=await c.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=aO(f,r,d),g=r,y=0;const b={};for(let S=0;S<i.length;S++){const w=i[S];if(!w)continue;const{name:x,fn:E}=w,{x:T,y:O,data:C,reset:I}=await E({x:m,y:p,initialPlacement:r,placement:g,strategy:a,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});m=T??m,p=O??p,b[x]={...b[x],...C},I&&y<yq&&(y++,typeof I=="object"&&(I.placement&&(g=I.placement),I.rects&&(f=I.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:a}):I.rects),{x:m,y:p}=aO(f,g,d)),S=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:b}},bq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:c,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Pa(e,t)||{};if(f==null)return{};const p=pN(m),g={x:n,y:r},y=Jb(a),b=Xb(y),S=await c.getDimensions(f),w=y==="y",x=w?"top":"left",E=w?"bottom":"right",T=w?"clientHeight":"clientWidth",O=i.reference[b]+i.reference[y]-g[y]-i.floating[b],C=g[y]-i.reference[y],I=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let N=I?I[T]:0;(!N||!await(c.isElement==null?void 0:c.isElement(I)))&&(N=u.floating[T]||i.floating[b]);const D=O/2-C/2,z=N/2-S[b]/2-1,W=Ls(p[x],z),V=Ls(p[E],z),G=W,U=N-S[b]-V,J=N/2-S[b]/2+D,ie=v_(G,J,U),F=!d.arrow&&El(a)!=null&&J!==ie&&i.reference[b]/2-(J<G?W:V)-S[b]/2<0,X=F?J<G?J-G:J-U:0;return{[y]:g[y]+X,data:{[y]:ie,centerOffset:J-ie-X,...F&&{alignmentOffset:X}},reset:F}}}),wq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:c,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:S=!0,...w}=Pa(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Da(a),E=Jo(u),T=Da(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),C=g||(T||!S?[Wp(u)]:dq(u)),I=b!=="none";!g&&I&&C.push(...mq(u,S,b,O));const N=[u,...C],D=await d.detectOverflow(t,w),z=[];let W=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&z.push(D[x]),p){const J=uq(a,c,O);z.push(D[J[0]],D[J[1]])}if(W=[...W,{placement:a,overflows:z}],!z.every(J=>J<=0)){var V,G;const J=(((V=i.flip)==null?void 0:V.index)||0)+1,ie=N[J];if(ie&&(!(p==="alignment"?E!==Jo(ie):!1)||W.every(ae=>Jo(ae.placement)===E?ae.overflows[0]>0:!0)))return{data:{index:J,overflows:W},reset:{placement:ie}};let F=(G=W.filter(X=>X.overflows[0]<=0).sort((X,ae)=>X.overflows[1]-ae.overflows[1])[0])==null?void 0:G.placement;if(!F)switch(y){case"bestFit":{var U;const X=(U=W.filter(ae=>{if(I){const fe=Jo(ae.placement);return fe===E||fe==="y"}return!0}).map(ae=>[ae.placement,ae.overflows.filter(fe=>fe>0).reduce((fe,K)=>fe+K,0)]).sort((ae,fe)=>ae[1]-fe[1])[0])==null?void 0:U[0];X&&(F=X);break}case"initialPlacement":F=u;break}if(a!==F)return{reset:{placement:F}}}return{}}}};function sO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iO(e){return cq.some(t=>e[t]>=0)}const Sq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=Pa(e,t);switch(a){case"referenceHidden":{const c=await r.detectOverflow(t,{...i,elementContext:"reference"}),u=sO(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:iO(u)}}}case"escaped":{const c=await r.detectOverflow(t,{...i,altBoundary:!0}),u=sO(c,n.floating);return{data:{escapedOffsets:u,escaped:iO(u)}}}default:return{}}}}},mN=new Set(["left","top"]);async function Eq(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),c=Da(n),u=El(n),d=Jo(n)==="y",f=mN.has(c)?-1:1,m=i&&d?-1:1,p=Pa(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),d?{x:y*m,y:g*f}:{x:g*f,y:y*m}}const Rq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:c,middlewareData:u}=t,d=await Eq(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:i+d.y,data:{...d,placement:c}}}}},xq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:i}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:x=>{let{x:E,y:T}=x;return{x:E,y:T}}},...f}=Pa(e,t),m={x:n,y:r},p=await i.detectOverflow(t,f),g=Jo(Da(a)),y=Qb(g);let b=m[y],S=m[g];if(c){const x=y==="y"?"top":"left",E=y==="y"?"bottom":"right",T=b+p[x],O=b-p[E];b=v_(T,b,O)}if(u){const x=g==="y"?"top":"left",E=g==="y"?"bottom":"right",T=S+p[x],O=S-p[E];S=v_(T,S,O)}const w=d.fn({...t,[y]:b,[g]:S});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[y]:c,[g]:u}}}}}},Tq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:c}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Pa(e,t),m={x:n,y:r},p=Jo(a),g=Qb(p);let y=m[g],b=m[p];const S=Pa(u,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const T=g==="y"?"height":"width",O=i.reference[g]-i.floating[T]+w.mainAxis,C=i.reference[g]+i.reference[T]-w.mainAxis;y<O?y=O:y>C&&(y=C)}if(f){var x,E;const T=g==="y"?"width":"height",O=mN.has(Da(a)),C=i.reference[p]-i.floating[T]+(O&&((x=c.offset)==null?void 0:x[p])||0)+(O?0:w.crossAxis),I=i.reference[p]+i.reference[T]+(O?0:((E=c.offset)==null?void 0:E[p])||0)-(O?w.crossAxis:0);b<C?b=C:b>I&&(b=I)}return{[g]:y,[p]:b}}}},Oq=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:c,elements:u}=t,{apply:d=()=>{},...f}=Pa(e,t),m=await c.detectOverflow(t,f),p=Da(a),g=El(a),y=Jo(a)==="y",{width:b,height:S}=i.floating;let w,x;p==="top"||p==="bottom"?(w=p,x=g===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,w=g==="end"?"top":"bottom");const E=S-m.top-m.bottom,T=b-m.left-m.right,O=Ls(S-m[w],E),C=Ls(b-m[x],T),I=!t.middlewareData.shift;let N=O,D=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),I&&!g){const W=Hr(m.left,0),V=Hr(m.right,0),G=Hr(m.top,0),U=Hr(m.bottom,0);y?D=b-2*(W!==0||V!==0?W+V:Hr(m.left,m.right)):N=S-2*(G!==0||U!==0?G+U:Hr(m.top,m.bottom))}await d({...t,availableWidth:D,availableHeight:N});const z=await c.getDimensions(u.floating);return b!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function Um(){return typeof window<"u"}function Rl(e){return gN(e)?(e.nodeName||"").toLowerCase():"#document"}function Kr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function aa(e){var t;return(t=(gN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gN(e){return Um()?e instanceof Node||e instanceof Kr(e).Node:!1}function $o(e){return Um()?e instanceof Element||e instanceof Kr(e).Element:!1}function Va(e){return Um()?e instanceof HTMLElement||e instanceof Kr(e).HTMLElement:!1}function cO(e){return!Um()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kr(e).ShadowRoot}function Sd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Uo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function Cq(e){return/^(table|td|th)$/.test(Rl(e))}function zm(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Aq=/transform|translate|scale|rotate|perspective|filter/,Iq=/paint|layout|strict|content/,pi=e=>!!e&&e!=="none";let n0;function e1(e){const t=$o(e)?Uo(e):e;return pi(t.transform)||pi(t.translate)||pi(t.scale)||pi(t.rotate)||pi(t.perspective)||!t1()&&(pi(t.backdropFilter)||pi(t.filter))||Aq.test(t.willChange||"")||Iq.test(t.contain||"")}function kq(e){let t=js(e);for(;Va(t)&&!hl(t);){if(e1(t))return t;if(zm(t))return null;t=js(t)}return null}function t1(){return n0==null&&(n0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),n0}function hl(e){return/^(html|body|#document)$/.test(Rl(e))}function Uo(e){return Kr(e).getComputedStyle(e)}function Vm(e){return $o(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function js(e){if(Rl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cO(e)&&e.host||aa(e);return cO(t)?t.host:t}function vN(e){const t=js(e);return hl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Va(t)&&Sd(t)?t:vN(t)}function ad(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=vN(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),c=Kr(a);if(i){const u=__(c);return t.concat(c,c.visualViewport||[],Sd(a)?a:[],u&&n?ad(u):[])}else return t.concat(a,ad(a,[],n))}function __(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yN(e){const t=Uo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Va(e),i=a?e.offsetWidth:n,c=a?e.offsetHeight:r,u=Kp(n)!==i||Kp(r)!==c;return u&&(n=i,r=c),{width:n,height:r,$:u}}function n1(e){return $o(e)?e:e.contextElement}function sl(e){const t=n1(e);if(!Va(t))return ea(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=yN(t);let c=(i?Kp(n.width):n.width)/r,u=(i?Kp(n.height):n.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const Nq=ea(0);function _N(e){const t=Kr(e);return!t1()||!t.visualViewport?Nq:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Mq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kr(e)?!1:t}function Di(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=n1(e);let c=ea(1);t&&(r?$o(r)&&(c=sl(r)):c=sl(e));const u=Mq(i,n,r)?_N(i):ea(0);let d=(a.left+u.x)/c.x,f=(a.top+u.y)/c.y,m=a.width/c.x,p=a.height/c.y;if(i){const g=Kr(i),y=r&&$o(r)?Kr(r):r;let b=g,S=__(b);for(;S&&r&&y!==b;){const w=sl(S),x=S.getBoundingClientRect(),E=Uo(S),T=x.left+(S.clientLeft+parseFloat(E.paddingLeft))*w.x,O=x.top+(S.clientTop+parseFloat(E.paddingTop))*w.y;d*=w.x,f*=w.y,m*=w.x,p*=w.y,d+=T,f+=O,b=Kr(S),S=__(b)}}return Yp({width:m,height:p,x:d,y:f})}function Fm(e,t){const n=Vm(e).scrollLeft;return t?t.left+n:Di(aa(e)).left+n}function bN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Fm(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function Pq(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",c=aa(r),u=t?zm(t.floating):!1;if(r===c||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=ea(1);const m=ea(0),p=Va(r);if((p||!p&&!i)&&((Rl(r)!=="body"||Sd(c))&&(d=Vm(r)),p)){const y=Di(r);f=sl(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const g=c&&!p&&!i?bN(c,d):ea(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+g.x,y:n.y*f.y-d.scrollTop*f.y+m.y+g.y}}function Dq(e){return Array.from(e.getClientRects())}function Lq(e){const t=aa(e),n=Vm(e),r=e.ownerDocument.body,a=Hr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Hr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+Fm(e);const u=-n.scrollTop;return Uo(r).direction==="rtl"&&(c+=Hr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:c,y:u}}const lO=25;function jq(e,t){const n=Kr(e),r=aa(e),a=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,u=0,d=0;if(a){i=a.width,c=a.height;const m=t1();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=Fm(r);if(f<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),y=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=lO&&(i-=b)}else f<=lO&&(i+=f);return{width:i,height:c,x:u,y:d}}function $q(e,t){const n=Di(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=Va(e)?sl(e):ea(1),c=e.clientWidth*i.x,u=e.clientHeight*i.y,d=a*i.x,f=r*i.y;return{width:c,height:u,x:d,y:f}}function uO(e,t,n){let r;if(t==="viewport")r=jq(e,n);else if(t==="document")r=Lq(aa(e));else if($o(t))r=$q(t,n);else{const a=_N(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Yp(r)}function wN(e,t){const n=js(e);return n===t||!$o(n)||hl(n)?!1:Uo(n).position==="fixed"||wN(n,t)}function Uq(e,t){const n=t.get(e);if(n)return n;let r=ad(e,[],!1).filter(u=>$o(u)&&Rl(u)!=="body"),a=null;const i=Uo(e).position==="fixed";let c=i?js(e):e;for(;$o(c)&&!hl(c);){const u=Uo(c),d=e1(c);!d&&u.position==="fixed"&&(a=null),(i?!d&&!a:!d&&u.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Sd(c)&&!d&&wN(e,c))?r=r.filter(m=>m!==c):a=u,c=js(c)}return t.set(e,r),r}function zq(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const c=[...n==="clippingAncestors"?zm(t)?[]:Uq(t,this._c):[].concat(n),r],u=uO(t,c[0],a);let d=u.top,f=u.right,m=u.bottom,p=u.left;for(let g=1;g<c.length;g++){const y=uO(t,c[g],a);d=Hr(y.top,d),f=Ls(y.right,f),m=Ls(y.bottom,m),p=Hr(y.left,p)}return{width:f-p,height:m-d,x:p,y:d}}function Vq(e){const{width:t,height:n}=yN(e);return{width:t,height:n}}function Fq(e,t,n){const r=Va(t),a=aa(t),i=n==="fixed",c=Di(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=ea(0);function f(){d.x=Fm(a)}if(r||!r&&!i)if((Rl(t)!=="body"||Sd(a))&&(u=Vm(t)),r){const y=Di(t,!0,i,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else a&&f();i&&!r&&a&&f();const m=a&&!r&&!i?bN(a,u):ea(0),p=c.left+u.scrollLeft-d.x-m.x,g=c.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:c.width,height:c.height}}function r0(e){return Uo(e).position==="static"}function dO(e,t){if(!Va(e)||Uo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return aa(e)===n&&(n=n.ownerDocument.body),n}function SN(e,t){const n=Kr(e);if(zm(e))return n;if(!Va(e)){let a=js(e);for(;a&&!hl(a);){if($o(a)&&!r0(a))return a;a=js(a)}return n}let r=dO(e,t);for(;r&&Cq(r)&&r0(r);)r=dO(r,t);return r&&hl(r)&&r0(r)&&!e1(r)?n:r||kq(e)||n}const Bq=async function(e){const t=this.getOffsetParent||SN,n=this.getDimensions,r=await n(e.floating);return{reference:Fq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qq(e){return Uo(e).direction==="rtl"}const Hq={convertOffsetParentRelativeRectToViewportRelativeRect:Pq,getDocumentElement:aa,getClippingRect:zq,getOffsetParent:SN,getElementRects:Bq,getClientRects:Dq,getDimensions:Vq,getScale:sl,isElement:$o,isRTL:qq};function EN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gq(e,t){let n=null,r;const a=aa(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function c(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),i();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:y}=f;if(u||t(),!g||!y)return;const b=mh(p),S=mh(a.clientWidth-(m+g)),w=mh(a.clientHeight-(p+y)),x=mh(m),T={rootMargin:-b+"px "+-S+"px "+-w+"px "+-x+"px",threshold:Hr(0,Ls(1,d))||1};let O=!0;function C(I){const N=I[0].intersectionRatio;if(N!==d){if(!O)return c();N?c(!1,N):r=setTimeout(()=>{c(!1,1e-7)},1e3)}N===1&&!EN(f,e.getBoundingClientRect())&&c(),O=!1}try{n=new IntersectionObserver(C,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,T)}n.observe(e)}return c(!0),i}function Zq(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=n1(e),m=a||i?[...f?ad(f):[],...t?ad(t):[]]:[];m.forEach(x=>{a&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const p=f&&u?Gq(f,n):null;let g=-1,y=null;c&&(y=new ResizeObserver(x=>{let[E]=x;E&&E.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(t)})),n()}),f&&!d&&y.observe(f),t&&y.observe(t));let b,S=d?Di(e):null;d&&w();function w(){const x=Di(e);S&&!EN(S,x)&&n(),S=x,b=requestAnimationFrame(w)}return n(),()=>{var x;m.forEach(E=>{a&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),p?.(),(x=y)==null||x.disconnect(),y=null,d&&cancelAnimationFrame(b)}}const Kq=Rq,Wq=xq,Yq=wq,Qq=Oq,Xq=Sq,fO=bq,Jq=Tq,eH=(e,t,n)=>{const r=new Map,a={platform:Hq,...n},i={...a.platform,_c:r};return _q(e,t,{...a,platform:i})};var tH=typeof document<"u",nH=function(){},vp=tH?A.useLayoutEffect:nH;function Qp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Qp(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!Qp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function RN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hO(e,t){const n=RN(e);return Math.round(t*n)/n}function o0(e){const t=A.useRef(e);return vp(()=>{t.current=e}),t}function rH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:c}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,p]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=A.useState(r);Qp(g,r)||y(r);const[b,S]=A.useState(null),[w,x]=A.useState(null),E=A.useCallback(ae=>{ae!==I.current&&(I.current=ae,S(ae))},[]),T=A.useCallback(ae=>{ae!==N.current&&(N.current=ae,x(ae))},[]),O=i||b,C=c||w,I=A.useRef(null),N=A.useRef(null),D=A.useRef(m),z=d!=null,W=o0(d),V=o0(a),G=o0(f),U=A.useCallback(()=>{if(!I.current||!N.current)return;const ae={placement:t,strategy:n,middleware:g};V.current&&(ae.platform=V.current),eH(I.current,N.current,ae).then(fe=>{const K={...fe,isPositioned:G.current!==!1};J.current&&!Qp(D.current,K)&&(D.current=K,xm.flushSync(()=>{p(K)}))})},[g,t,n,V,G]);vp(()=>{f===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(ae=>({...ae,isPositioned:!1})))},[f]);const J=A.useRef(!1);vp(()=>(J.current=!0,()=>{J.current=!1}),[]),vp(()=>{if(O&&(I.current=O),C&&(N.current=C),O&&C){if(W.current)return W.current(O,C,U);U()}},[O,C,U,W,z]);const ie=A.useMemo(()=>({reference:I,floating:N,setReference:E,setFloating:T}),[E,T]),F=A.useMemo(()=>({reference:O,floating:C}),[O,C]),X=A.useMemo(()=>{const ae={position:n,left:0,top:0};if(!F.floating)return ae;const fe=hO(F.floating,m.x),K=hO(F.floating,m.y);return u?{...ae,transform:"translate("+fe+"px, "+K+"px)",...RN(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:fe,top:K}},[n,u,F.floating,m.x,m.y]);return A.useMemo(()=>({...m,update:U,refs:ie,elements:F,floatingStyles:X}),[m,U,ie,F,X])}const oH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?fO({element:r.current,padding:a}).fn(n):{}:r?fO({element:r,padding:a}).fn(n):{}}}},aH=(e,t)=>{const n=Kq(e);return{name:n.name,fn:n.fn,options:[e,t]}},sH=(e,t)=>{const n=Wq(e);return{name:n.name,fn:n.fn,options:[e,t]}},iH=(e,t)=>({fn:Jq(e).fn,options:[e,t]}),cH=(e,t)=>{const n=Yq(e);return{name:n.name,fn:n.fn,options:[e,t]}},lH=(e,t)=>{const n=Qq(e);return{name:n.name,fn:n.fn,options:[e,t]}},uH=(e,t)=>{const n=Xq(e);return{name:n.name,fn:n.fn,options:[e,t]}},dH=(e,t)=>{const n=oH(e);return{name:n.name,fn:n.fn,options:[e,t]}};var fH="Arrow",xN=A.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return R.jsx(rn.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:R.jsx("polygon",{points:"0,0 30,0 15,10"})})});xN.displayName=fH;var hH=xN;function TN(e){const[t,n]=A.useState(void 0);return Lo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let c,u;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;c=f.inlineSize,u=f.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var r1="Popper",[ON,CN]=Fi(r1),[pH,AN]=ON(r1),IN=e=>{const{__scopePopper:t,children:n}=e,[r,a]=A.useState(null);return R.jsx(pH,{scope:t,anchor:r,onAnchorChange:a,children:n})};IN.displayName=r1;var kN="PopperAnchor",NN=A.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=AN(kN,n),c=A.useRef(null),u=In(t,c),d=A.useRef(null);return A.useEffect(()=>{const f=d.current;d.current=r?.current||c.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:R.jsx(rn.div,{...a,ref:u})});NN.displayName=kN;var o1="PopperContent",[mH,gH]=ON(o1),MN=A.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:b,...S}=e,w=AN(o1,n),[x,E]=A.useState(null),T=In(t,me=>E(me)),[O,C]=A.useState(null),I=TN(O),N=I?.width??0,D=I?.height??0,z=r+(i!=="center"?"-"+i:""),W=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},V=Array.isArray(f)?f:[f],G=V.length>0,U={padding:W,boundary:V.filter(yH),altBoundary:G},{refs:J,floatingStyles:ie,placement:F,isPositioned:X,middlewareData:ae}=rH({strategy:"fixed",placement:z,whileElementsMounted:(...me)=>Zq(...me,{animationFrame:y==="always"}),elements:{reference:w.anchor},middleware:[aH({mainAxis:a+D,alignmentAxis:c}),d&&sH({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?iH():void 0,...U}),d&&cH({...U}),lH({...U,apply:({elements:me,rects:ye,availableWidth:Ae,availableHeight:ke})=>{const{width:H,height:ne}=ye.reference,_e=me.floating.style;_e.setProperty("--radix-popper-available-width",`${Ae}px`),_e.setProperty("--radix-popper-available-height",`${ke}px`),_e.setProperty("--radix-popper-anchor-width",`${H}px`),_e.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),O&&dH({element:O,padding:u}),_H({arrowWidth:N,arrowHeight:D}),g&&uH({strategy:"referenceHidden",...U})]}),[fe,K]=LN(F),P=jo(b);Lo(()=>{X&&P?.()},[X,P]);const q=ae.arrow?.x,B=ae.arrow?.y,L=ae.arrow?.centerOffset!==0,[$,Q]=A.useState();return Lo(()=>{x&&Q(window.getComputedStyle(x).zIndex)},[x]),R.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:X?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$,"--radix-popper-transform-origin":[ae.transformOrigin?.x,ae.transformOrigin?.y].join(" "),...ae.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:R.jsx(mH,{scope:n,placedSide:fe,onArrowChange:C,arrowX:q,arrowY:B,shouldHideArrow:L,children:R.jsx(rn.div,{"data-side":fe,"data-align":K,...S,ref:T,style:{...S.style,animation:X?void 0:"none"}})})})});MN.displayName=o1;var PN="PopperArrow",vH={top:"bottom",right:"left",bottom:"top",left:"right"},DN=A.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=gH(PN,r),c=vH[i.placedSide];return R.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:R.jsx(hH,{...a,ref:n,style:{...a.style,display:"block"}})})});DN.displayName=PN;function yH(e){return e!==null}var _H=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,c=a.arrow?.centerOffset!==0,u=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[f,m]=LN(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(a.arrow?.x??0)+u/2,y=(a.arrow?.y??0)+d/2;let b="",S="";return f==="bottom"?(b=c?p:`${g}px`,S=`${-d}px`):f==="top"?(b=c?p:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(b=`${-d}px`,S=c?p:`${y}px`):f==="left"&&(b=`${r.floating.width+d}px`,S=c?p:`${y}px`),{data:{x:b,y:S}}}});function LN(e){const[t,n="center"]=e.split("-");return[t,n]}var jN=IN,bH=NN,wH=MN,SH=DN,a0="rovingFocusGroup.onEntryFocus",EH={bubbles:!1,cancelable:!0},Ed="RovingFocusGroup",[b_,$N,RH]=fN(Ed),[xH,UN]=Fi(Ed,[RH]),[TH,OH]=xH(Ed),zN=A.forwardRef((e,t)=>R.jsx(b_.Provider,{scope:e.__scopeRovingFocusGroup,children:R.jsx(b_.Slot,{scope:e.__scopeRovingFocusGroup,children:R.jsx(CH,{...e,ref:t})})}));zN.displayName=Ed;var CH=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=A.useRef(null),y=In(t,g),b=hN(i),[S,w]=wd({prop:c,defaultProp:u??null,onChange:d,caller:Ed}),[x,E]=A.useState(!1),T=jo(f),O=$N(n),C=A.useRef(!1),[I,N]=A.useState(0);return A.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(a0,T),()=>D.removeEventListener(a0,T)},[T]),R.jsx(TH,{scope:n,orientation:r,dir:b,loop:a,currentTabStopId:S,onItemFocus:A.useCallback(D=>w(D),[w]),onItemShiftTab:A.useCallback(()=>E(!0),[]),onFocusableItemAdd:A.useCallback(()=>N(D=>D+1),[]),onFocusableItemRemove:A.useCallback(()=>N(D=>D-1),[]),children:R.jsx(rn.div,{tabIndex:x||I===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,()=>{C.current=!0}),onFocus:lt(e.onFocus,D=>{const z=!C.current;if(D.target===D.currentTarget&&z&&!x){const W=new CustomEvent(a0,EH);if(D.currentTarget.dispatchEvent(W),!W.defaultPrevented){const V=O().filter(F=>F.focusable),G=V.find(F=>F.active),U=V.find(F=>F.id===S),ie=[G,U,...V].filter(Boolean).map(F=>F.ref.current);BN(ie,m)}}C.current=!1}),onBlur:lt(e.onBlur,()=>E(!1))})})}),VN="RovingFocusGroupItem",FN=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:c,...u}=e,d=ks(),f=i||d,m=OH(VN,n),p=m.currentTabStopId===f,g=$N(n),{onFocusableItemAdd:y,onFocusableItemRemove:b,currentTabStopId:S}=m;return A.useEffect(()=>{if(r)return y(),()=>b()},[r,y,b]),R.jsx(b_.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:R.jsx(rn.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:lt(e.onMouseDown,w=>{r?m.onItemFocus(f):w.preventDefault()}),onFocus:lt(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:lt(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=kH(w,m.orientation,m.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let T=g().filter(O=>O.focusable).map(O=>O.ref.current);if(x==="last")T.reverse();else if(x==="prev"||x==="next"){x==="prev"&&T.reverse();const O=T.indexOf(w.currentTarget);T=m.loop?NH(T,O+1):T.slice(O+1)}setTimeout(()=>BN(T))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:S!=null}):c})})});FN.displayName=VN;var AH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function IH(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kH(e,t,n){const r=IH(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return AH[r]}function BN(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function NH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var MH=zN,PH=FN,w_=["Enter"," "],DH=["ArrowDown","PageUp","Home"],qN=["ArrowUp","PageDown","End"],LH=[...DH,...qN],jH={ltr:[...w_,"ArrowRight"],rtl:[...w_,"ArrowLeft"]},$H={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rd="Menu",[sd,UH,zH]=fN(Rd),[Bi,HN]=Fi(Rd,[zH,CN,UN]),xd=CN(),GN=UN(),[ZN,qs]=Bi(Rd),[VH,Td]=Bi(Rd),KN=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:c=!0}=e,u=xd(t),[d,f]=A.useState(null),m=A.useRef(!1),p=jo(i),g=hN(a);return A.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),R.jsx(jN,{...u,children:R.jsx(ZN,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:R.jsx(VH,{scope:t,onClose:A.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:c,children:r})})})};KN.displayName=Rd;var FH="MenuAnchor",a1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=xd(n);return R.jsx(bH,{...a,...r,ref:t})});a1.displayName=FH;var s1="MenuPortal",[BH,WN]=Bi(s1,{forceMount:void 0}),YN=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=qs(s1,t);return R.jsx(BH,{scope:t,forceMount:n,children:R.jsx(za,{present:n||i.open,children:R.jsx(Gb,{asChild:!0,container:a,children:r})})})};YN.displayName=s1;var go="MenuContent",[qH,i1]=Bi(go),QN=A.forwardRef((e,t)=>{const n=WN(go,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=qs(go,e.__scopeMenu),c=Td(go,e.__scopeMenu);return R.jsx(sd.Provider,{scope:e.__scopeMenu,children:R.jsx(za,{present:r||i.open,children:R.jsx(sd.Slot,{scope:e.__scopeMenu,children:c.modal?R.jsx(HH,{...a,ref:t}):R.jsx(GH,{...a,ref:t})})})})}),HH=A.forwardRef((e,t)=>{const n=qs(go,e.__scopeMenu),r=A.useRef(null),a=In(t,r);return A.useEffect(()=>{const i=r.current;if(i)return Wk(i)},[]),R.jsx(c1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),GH=A.forwardRef((e,t)=>{const n=qs(go,e.__scopeMenu);return R.jsx(c1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ZH=od("MenuContent.ScrollLock"),c1=A.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:b,...S}=e,w=qs(go,n),x=Td(go,n),E=xd(n),T=GN(n),O=UH(n),[C,I]=A.useState(null),N=A.useRef(null),D=In(t,N,w.onContentChange),z=A.useRef(0),W=A.useRef(""),V=A.useRef(0),G=A.useRef(null),U=A.useRef("right"),J=A.useRef(0),ie=b?Zb:A.Fragment,F=b?{as:ZH,allowPinchZoom:!0}:void 0,X=fe=>{const K=W.current+fe,P=O().filter(me=>!me.disabled),q=document.activeElement,B=P.find(me=>me.ref.current===q)?.textValue,L=P.map(me=>me.textValue),$=aG(L,K,B),Q=P.find(me=>me.textValue===$)?.ref.current;(function me(ye){W.current=ye,window.clearTimeout(z.current),ye!==""&&(z.current=window.setTimeout(()=>me(""),1e3))})(K),Q&&setTimeout(()=>Q.focus())};A.useEffect(()=>()=>window.clearTimeout(z.current),[]),zk();const ae=A.useCallback(fe=>U.current===G.current?.side&&iG(fe,G.current?.area),[]);return R.jsx(qH,{scope:n,searchRef:W,onItemEnter:A.useCallback(fe=>{ae(fe)&&fe.preventDefault()},[ae]),onItemLeave:A.useCallback(fe=>{ae(fe)||(N.current?.focus(),I(null))},[ae]),onTriggerLeave:A.useCallback(fe=>{ae(fe)&&fe.preventDefault()},[ae]),pointerGraceTimerRef:V,onPointerGraceIntentChange:A.useCallback(fe=>{G.current=fe},[]),children:R.jsx(ie,{...F,children:R.jsx(Hb,{asChild:!0,trapped:a,onMountAutoFocus:lt(i,fe=>{fe.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:R.jsx(qb,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:R.jsx(MH,{asChild:!0,...T,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:I,onEntryFocus:lt(d,fe=>{x.isUsingKeyboardRef.current||fe.preventDefault()}),preventScrollOnEntryFocus:!0,children:R.jsx(wH,{role:"menu","aria-orientation":"vertical","data-state":p4(w.open),"data-radix-menu-content":"",dir:x.dir,...E,...S,ref:D,style:{outline:"none",...S.style},onKeyDown:lt(S.onKeyDown,fe=>{const P=fe.target.closest("[data-radix-menu-content]")===fe.currentTarget,q=fe.ctrlKey||fe.altKey||fe.metaKey,B=fe.key.length===1;P&&(fe.key==="Tab"&&fe.preventDefault(),!q&&B&&X(fe.key));const L=N.current;if(fe.target!==L||!LH.includes(fe.key))return;fe.preventDefault();const Q=O().filter(me=>!me.disabled).map(me=>me.ref.current);qN.includes(fe.key)&&Q.reverse(),rG(Q)}),onBlur:lt(e.onBlur,fe=>{fe.currentTarget.contains(fe.target)||(window.clearTimeout(z.current),W.current="")}),onPointerMove:lt(e.onPointerMove,id(fe=>{const K=fe.target,P=J.current!==fe.clientX;if(fe.currentTarget.contains(K)&&P){const q=fe.clientX>J.current?"right":"left";U.current=q,J.current=fe.clientX}}))})})})})})})});QN.displayName=go;var KH="MenuGroup",l1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return R.jsx(rn.div,{role:"group",...r,ref:t})});l1.displayName=KH;var WH="MenuLabel",XN=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return R.jsx(rn.div,{...r,ref:t})});XN.displayName=WH;var Xp="MenuItem",pO="menu.itemSelect",Bm=A.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=A.useRef(null),c=Td(Xp,e.__scopeMenu),u=i1(Xp,e.__scopeMenu),d=In(t,i),f=A.useRef(!1),m=()=>{const p=i.current;if(!n&&p){const g=new CustomEvent(pO,{bubbles:!0,cancelable:!0});p.addEventListener(pO,y=>r?.(y),{once:!0}),Lk(p,g),g.defaultPrevented?f.current=!1:c.onClose()}};return R.jsx(JN,{...a,ref:d,disabled:n,onClick:lt(e.onClick,m),onPointerDown:p=>{e.onPointerDown?.(p),f.current=!0},onPointerUp:lt(e.onPointerUp,p=>{f.current||p.currentTarget?.click()}),onKeyDown:lt(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||w_.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Bm.displayName=Xp;var JN=A.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,c=i1(Xp,n),u=GN(n),d=A.useRef(null),f=In(t,d),[m,p]=A.useState(!1),[g,y]=A.useState("");return A.useEffect(()=>{const b=d.current;b&&y((b.textContent??"").trim())},[i.children]),R.jsx(sd.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:R.jsx(PH,{asChild:!0,...u,focusable:!r,children:R.jsx(rn.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:lt(e.onPointerMove,id(b=>{r?c.onItemLeave(b):(c.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:lt(e.onPointerLeave,id(b=>c.onItemLeave(b))),onFocus:lt(e.onFocus,()=>p(!0)),onBlur:lt(e.onBlur,()=>p(!1))})})})}),YH="MenuCheckboxItem",e4=A.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return R.jsx(a4,{scope:e.__scopeMenu,checked:n,children:R.jsx(Bm,{role:"menuitemcheckbox","aria-checked":Jp(n)?"mixed":n,...a,ref:t,"data-state":f1(n),onSelect:lt(a.onSelect,()=>r?.(Jp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});e4.displayName=YH;var t4="MenuRadioGroup",[QH,XH]=Bi(t4,{value:void 0,onValueChange:()=>{}}),n4=A.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=jo(r);return R.jsx(QH,{scope:e.__scopeMenu,value:n,onValueChange:i,children:R.jsx(l1,{...a,ref:t})})});n4.displayName=t4;var r4="MenuRadioItem",o4=A.forwardRef((e,t)=>{const{value:n,...r}=e,a=XH(r4,e.__scopeMenu),i=n===a.value;return R.jsx(a4,{scope:e.__scopeMenu,checked:i,children:R.jsx(Bm,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":f1(i),onSelect:lt(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});o4.displayName=r4;var u1="MenuItemIndicator",[a4,JH]=Bi(u1,{checked:!1}),s4=A.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=JH(u1,n);return R.jsx(za,{present:r||Jp(i.checked)||i.checked===!0,children:R.jsx(rn.span,{...a,ref:t,"data-state":f1(i.checked)})})});s4.displayName=u1;var eG="MenuSeparator",i4=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return R.jsx(rn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});i4.displayName=eG;var tG="MenuArrow",c4=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=xd(n);return R.jsx(SH,{...a,...r,ref:t})});c4.displayName=tG;var d1="MenuSub",[nG,l4]=Bi(d1),u4=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,i=qs(d1,t),c=xd(t),[u,d]=A.useState(null),[f,m]=A.useState(null),p=jo(a);return A.useEffect(()=>(i.open===!1&&p(!1),()=>p(!1)),[i.open,p]),R.jsx(jN,{...c,children:R.jsx(ZN,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:R.jsx(nG,{scope:t,contentId:ks(),triggerId:ks(),trigger:u,onTriggerChange:d,children:n})})})};u4.displayName=d1;var Mu="MenuSubTrigger",d4=A.forwardRef((e,t)=>{const n=qs(Mu,e.__scopeMenu),r=Td(Mu,e.__scopeMenu),a=l4(Mu,e.__scopeMenu),i=i1(Mu,e.__scopeMenu),c=A.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},m=A.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return A.useEffect(()=>m,[m]),A.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),R.jsx(a1,{asChild:!0,...f,children:R.jsx(JN,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":p4(n.open),...e,ref:bd(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:lt(e.onPointerMove,id(p=>{i.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(i.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:lt(e.onPointerLeave,id(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const y=n.content?.dataset.side,b=y==="right",S=b?-5:5,w=g[b?"left":"right"],x=g[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+S,y:p.clientY},{x:w,y:g.top},{x,y:g.top},{x,y:g.bottom},{x:w,y:g.bottom}],side:y}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(p),p.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:lt(e.onKeyDown,p=>{const g=i.searchRef.current!=="";e.disabled||g&&p.key===" "||jH[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});d4.displayName=Mu;var f4="MenuSubContent",h4=A.forwardRef((e,t)=>{const n=WN(go,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=qs(go,e.__scopeMenu),c=Td(go,e.__scopeMenu),u=l4(f4,e.__scopeMenu),d=A.useRef(null),f=In(t,d);return R.jsx(sd.Provider,{scope:e.__scopeMenu,children:R.jsx(za,{present:r||i.open,children:R.jsx(sd.Slot,{scope:e.__scopeMenu,children:R.jsx(c1,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{c.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:lt(e.onFocusOutside,m=>{m.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:lt(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:lt(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=$H[c.dir].includes(m.key);p&&g&&(i.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});h4.displayName=f4;function p4(e){return e?"open":"closed"}function Jp(e){return e==="indeterminate"}function f1(e){return Jp(e)?"indeterminate":e?"checked":"unchecked"}function rG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function oG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function aG(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=oG(e,Math.max(i,0));a.length===1&&(c=c.filter(f=>f!==n));const d=c.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function sG(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const u=t[i],d=t[c],f=u.x,m=u.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(a=!a)}return a}function iG(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return sG(n,t)}function id(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cG=KN,lG=a1,uG=YN,dG=QN,fG=l1,hG=XN,pG=Bm,mG=e4,gG=n4,vG=o4,yG=s4,_G=i4,bG=c4,wG=u4,SG=d4,EG=h4,qm="DropdownMenu",[RG]=Fi(qm,[HN]),sr=HN(),[xG,m4]=RG(qm),g4=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,d=sr(t),f=A.useRef(null),[m,p]=wd({prop:a,defaultProp:i??!1,onChange:c,caller:qm});return R.jsx(xG,{scope:t,triggerId:ks(),triggerRef:f,contentId:ks(),open:m,onOpenChange:p,onOpenToggle:A.useCallback(()=>p(g=>!g),[p]),modal:u,children:R.jsx(cG,{...d,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};g4.displayName=qm;var v4="DropdownMenuTrigger",y4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=m4(v4,n),c=sr(n);return R.jsx(lG,{asChild:!0,...c,children:R.jsx(rn.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:bd(t,i.triggerRef),onPointerDown:lt(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:lt(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});y4.displayName=v4;var TG="DropdownMenuPortal",_4=e=>{const{__scopeDropdownMenu:t,...n}=e,r=sr(t);return R.jsx(uG,{...r,...n})};_4.displayName=TG;var b4="DropdownMenuContent",w4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=m4(b4,n),i=sr(n),c=A.useRef(!1);return R.jsx(dG,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,u=>{c.current||a.triggerRef.current?.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:lt(e.onInteractOutside,u=>{const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!a.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});w4.displayName=b4;var OG="DropdownMenuGroup",CG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(fG,{...a,...r,ref:t})});CG.displayName=OG;var AG="DropdownMenuLabel",S4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(hG,{...a,...r,ref:t})});S4.displayName=AG;var IG="DropdownMenuItem",E4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(pG,{...a,...r,ref:t})});E4.displayName=IG;var kG="DropdownMenuCheckboxItem",R4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(mG,{...a,...r,ref:t})});R4.displayName=kG;var NG="DropdownMenuRadioGroup",x4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(gG,{...a,...r,ref:t})});x4.displayName=NG;var MG="DropdownMenuRadioItem",T4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(vG,{...a,...r,ref:t})});T4.displayName=MG;var PG="DropdownMenuItemIndicator",O4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(yG,{...a,...r,ref:t})});O4.displayName=PG;var DG="DropdownMenuSeparator",C4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(_G,{...a,...r,ref:t})});C4.displayName=DG;var LG="DropdownMenuArrow",jG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(bG,{...a,...r,ref:t})});jG.displayName=LG;var $G=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:i}=e,c=sr(t),[u,d]=wd({prop:r,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return R.jsx(wG,{...c,open:u,onOpenChange:d,children:n})},UG="DropdownMenuSubTrigger",A4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(SG,{...a,...r,ref:t})});A4.displayName=UG;var zG="DropdownMenuSubContent",I4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return R.jsx(EG,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});I4.displayName=zG;var VG=g4,FG=y4,BG=_4,qG=w4,Voe=S4,HG=E4,Foe=R4,Boe=x4,qoe=T4,Hoe=O4,Goe=C4,Zoe=$G,Koe=A4,Woe=I4,GG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Od=GG.reduce((e,t)=>{const n=Mk(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:c,...u}=a,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),R.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ZG="Label",k4=A.forwardRef((e,t)=>R.jsx(Od.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));k4.displayName=ZG;var KG=k4;function WG(e,t=[]){let n=[];function r(i,c){const u=A.createContext(c);u.displayName=i+"Context";const d=n.length;n=[...n,c];const f=p=>{const{scope:g,children:y,...b}=p,S=g?.[e]?.[d]||u,w=A.useMemo(()=>b,Object.values(b));return R.jsx(S.Provider,{value:w,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,b=A.useContext(y);if(b)return b;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(c=>A.createContext(c));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,YG(a,...t)]}function YG(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const c=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var QG=SA();function XG(){return QG.useSyncExternalStore(JG,()=>!0,()=>!1)}function JG(){return()=>{}}var h1="Avatar",[eZ]=WG(h1),[tZ,N4]=eZ(h1),M4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=A.useState("idle");return R.jsx(tZ,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:R.jsx(Od.span,{...r,ref:t})})});M4.displayName=h1;var P4="AvatarImage",D4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,c=N4(P4,n),u=nZ(r,i),d=jo(f=>{a(f),c.onImageLoadingStatusChange(f)});return Lo(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?R.jsx(Od.img,{...i,ref:t,src:r}):null});D4.displayName=P4;var L4="AvatarFallback",j4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=N4(L4,n),[c,u]=A.useState(r===void 0);return A.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(d)}},[r]),c&&i.imageLoadingStatus!=="loaded"?R.jsx(Od.span,{...a,ref:t}):null});j4.displayName=L4;function mO(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function nZ(e,{referrerPolicy:t,crossOrigin:n}){const r=XG(),a=A.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[c,u]=A.useState(()=>mO(i,e));return Lo(()=>{u(mO(i,e))},[i,e]),Lo(()=>{const d=p=>()=>{u(p)};if(!i)return;const f=d("loaded"),m=d("error");return i.addEventListener("load",f),i.addEventListener("error",m),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",f),i.removeEventListener("error",m)}},[i,n,t]),c}var rZ=M4,oZ=D4,aZ=j4;function sZ(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function p1(e,t,n=""){const r=sZ(e),a=e?.length;if(!r||t!==void 0){const c=n&&`"${n}" `,u="",d=r?`length=${a}`:`type=${typeof e}`;throw new Error(c+"expected Uint8Array"+u+", got "+d)}return e}function gO(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function iZ(e,t){p1(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function S_(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function s0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ko(e,t){return e<<32-t|e>>>t}const cZ=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",lZ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function uZ(e){if(p1(e),cZ)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=lZ[e[n]];return t}function dZ(e,t={}){const n=(a,i)=>e(i).update(a).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=a=>e(a),Object.assign(n,t),Object.freeze(n)}const fZ=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function hZ(e,t,n){return e&t^~e&n}function pZ(e,t,n){return e&t^e&n^t&n}class mZ{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,a){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=a,this.buffer=new Uint8Array(t),this.view=s0(this.buffer)}update(t){gO(this),p1(t);const{view:n,buffer:r,blockLen:a}=this,i=t.length;for(let c=0;c<i;){const u=Math.min(a-this.pos,i-c);if(u===a){const d=s0(t);for(;a<=i-c;c+=a)this.process(d,c);continue}r.set(t.subarray(c,c+u),this.pos),this.pos+=u,c+=u,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){gO(this),iZ(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:a,isLE:i}=this;let{pos:c}=this;n[c++]=128,S_(this.buffer.subarray(c)),this.padOffset>a-c&&(this.process(r,0),c=0);for(let p=c;p<a;p++)n[p]=0;r.setBigUint64(a-8,BigInt(this.length*8),i),this.process(r,0);const u=s0(t),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const f=d/4,m=this.get();if(f>m.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<f;p++)u.setUint32(4*p,m[p],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:r,length:a,finished:i,destroyed:c,pos:u}=this;return t.destroyed=c,t.finished=i,t.length=a,t.pos=u,a%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const gs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),gZ=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),vs=new Uint32Array(64);class vZ extends mZ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:a,E:i,F:c,G:u,H:d}=this;return[t,n,r,a,i,c,u,d]}set(t,n,r,a,i,c,u,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=i|0,this.F=c|0,this.G=u|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)vs[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=vs[p-15],y=vs[p-2],b=Ko(g,7)^Ko(g,18)^g>>>3,S=Ko(y,17)^Ko(y,19)^y>>>10;vs[p]=S+vs[p-7]+b+vs[p-16]|0}let{A:r,B:a,C:i,D:c,E:u,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=Ko(u,6)^Ko(u,11)^Ko(u,25),y=m+g+hZ(u,d,f)+gZ[p]+vs[p]|0,S=(Ko(r,2)^Ko(r,13)^Ko(r,22))+pZ(r,a,i)|0;m=f,f=d,d=u,u=c+y|0,c=i,i=a,a=r,r=y+S|0}r=r+this.A|0,a=a+this.B|0,i=i+this.C|0,c=c+this.D|0,u=u+this.E|0,d=d+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(r,a,i,c,u,d,f,m)}roundClean(){S_(vs)}destroy(){this.set(0,0,0,0,0,0,0,0),S_(this.buffer)}}class yZ extends vZ{A=gs[0]|0;B=gs[1]|0;C=gs[2]|0;D=gs[3]|0;E=gs[4]|0;F=gs[5]|0;G=gs[6]|0;H=gs[7]|0;constructor(){super(32)}}const _Z=dZ(()=>new yZ,fZ(1));function bZ(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Hm="Checkbox",[wZ]=Fi(Hm),[SZ,m1]=wZ(Hm);function EZ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:c,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,y]=wd({prop:n,defaultProp:a??!1,onChange:d,caller:Hm}),[b,S]=A.useState(null),[w,x]=A.useState(null),E=A.useRef(!1),T=b?!!c||!!b.closest("form"):!0,O={checked:g,disabled:i,setChecked:y,control:b,setControl:S,name:u,form:c,value:m,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:Ns(a)?!1:a,isFormControl:T,bubbleInput:w,setBubbleInput:x};return R.jsx(SZ,{scope:t,...O,children:RZ(p)?p(O):r})}var $4="CheckboxTrigger",U4=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:c,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:b}=m1($4,e),S=In(a,m),w=A.useRef(d);return A.useEffect(()=>{const x=i?.form;if(x){const E=()=>p(w.current);return x.addEventListener("reset",E),()=>x.removeEventListener("reset",E)}},[i,p]),R.jsx(rn.button,{type:"button",role:"checkbox","aria-checked":Ns(d)?"mixed":d,"aria-required":f,"data-state":H4(d),"data-disabled":u?"":void 0,disabled:u,value:c,...r,ref:S,onKeyDown:lt(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:lt(n,x=>{p(E=>Ns(E)?!0:!E),b&&y&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})})});U4.displayName=$4;var z4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:c,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return R.jsx(EZ,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:u,required:c,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>R.jsxs(R.Fragment,{children:[R.jsx(U4,{...p,ref:t,__scopeCheckbox:n}),g&&R.jsx(q4,{__scopeCheckbox:n})]})})});z4.displayName=Hm;var V4="CheckboxIndicator",F4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=m1(V4,n);return R.jsx(za,{present:r||Ns(i.checked)||i.checked===!0,children:R.jsx(rn.span,{"data-state":H4(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});F4.displayName=V4;var B4="CheckboxBubbleInput",q4=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:c,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:y}=m1(B4,e),b=In(n,y),S=bZ(i),w=TN(r);A.useEffect(()=>{const E=g;if(!E)return;const T=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(T,"checked").set,I=!a.current;if(S!==i&&C){const N=new Event("click",{bubbles:I});E.indeterminate=Ns(i),C.call(E,Ns(i)?!1:i),E.dispatchEvent(N)}},[g,S,i,a]);const x=A.useRef(Ns(i)?!1:i);return R.jsx(rn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??x.current,required:u,disabled:d,name:f,value:m,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});q4.displayName=B4;function RZ(e){return typeof e=="function"}function Ns(e){return e==="indeterminate"}function H4(e){return Ns(e)?"indeterminate":e?"checked":"unchecked"}var G4={OBJECT:"object",UNDEFINED:"undefined"},gh="browser",vO="cpu",yO="device",i0="engine",vh="os",bs="name",em="type",E_="vendor",Co="version",R_="architecture",x_="major",T_="model",xZ="console",TZ="mobile",OZ="tablet",CZ="smarttv",AZ="wearable",IZ="embedded",kZ=typeof window!==G4.UNDEFINED,c0=kZ&&window.navigator?window.navigator:void 0;c0&&c0.userAgentData&&c0.userAgentData;var Gm=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},yh=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==G4.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return yh.call(e.init,[[gh,[bs,Co,x_,em]],[vO,[R_]],[yO,[em,T_,E_]],[i0,[bs,Co]],[vh,[bs,Co]]]),yh.call(e.isIgnore,[[gh,[Co,x_]],[i0,[Co]],[vh,[Co]]]),yh.call(e.isIgnoreRgx,[[gh,/ ?browser$/i],[vh,/ ?os$/i]]),yh.call(e.toString,[[gh,[bs,Co]],[vO,[R_]],[yO,[E_,T_]],[i0,[bs,Co]],[vh,[bs,Co]]]),e})();Gm([bs,Co,x_,em]);Gm([R_]);Gm([T_,E_,em,xZ,TZ,CZ,OZ,AZ,IZ]);Gm([bs,Co]);function NZ(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 MZ=le.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Zm=()=>{const e=le.useContext(MZ);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};NZ(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
106
|
-
[data-state=closed]
|
|
107
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function PZ(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function DZ(...e){return t=>e.forEach(n=>PZ(n,t))}function Z4(...e){return A.useCallback(DZ(...e),e)}const _O=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function l0(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function LZ(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const u0={DURATION:.5,EASE:[.32,.72,0,1]},jZ=8,$Z=26,UZ=()=>()=>{};function zZ(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=Zm(),i=le.useRef(null),c=A.useMemo(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-$Z)/window.innerWidth}le.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const d=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!d)return;LZ(r&&!a?l0(document.body,{background:"black"}):UZ,l0(d,{transformOrigin:_O(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${u0.DURATION}s`,transitionTimingFunction:`cubic-bezier(${u0.EASE.join(",")})`}));const f=l0(d,{borderRadius:`${jZ}px`,overflow:"hidden",..._O(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{f(),i.current=window.setTimeout(()=>{c?document.body.style.background=c:document.body.style.removeProperty("background")},u0.DURATION*1e3)}}},[t,n,c])}const VZ=le.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:c,modal:u,shouldAnimate:d}=Zm(),f=Z4(t,n),m=r&&r.length>0;if(!u)return null;const p=le.useCallback(g=>a(g),[a]);return le.createElement(aq,{onMouseUp:p,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":c&&m?"true":"false","data-vaul-snap-points-overlay":c&&i?"true":"false","data-vaul-animate":d?.current?"true":"false",...e})});VZ.displayName="Drawer.Overlay";const FZ=le.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:c,onRelease:u,onDrag:d,keyboardIsOpen:f,snapPointsOffset:m,activeSnapPointIndex:p,modal:g,isOpen:y,direction:b,snapPoints:S,container:w,handleOnly:x,shouldAnimate:E,autoFocus:T}=Zm(),[O,C]=le.useState(!1),I=Z4(a,i),N=le.useRef(null),D=le.useRef(null),z=le.useRef(!1),W=S&&S.length>0;zZ();const V=(U,J,ie=0)=>{if(z.current)return!0;const F=Math.abs(U.y),X=Math.abs(U.x),ae=X>F,fe=["bottom","right"].includes(J)?1:-1;if(J==="left"||J==="right"){if(!(U.x*fe<0)&&X>=0&&X<=ie)return ae}else if(!(U.y*fe<0)&&F>=0&&F<=ie)return!ae;return z.current=!0,!0};le.useEffect(()=>{W&&window.requestAnimationFrame(()=>{C(!0)})},[]);function G(U){N.current=null,z.current=!1,u(U)}return le.createElement(sq,{"data-vaul-drawer-direction":b,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":y&&W?"true":"false","data-vaul-custom-container":w?"true":"false","data-vaul-animate":E?.current?"true":"false",...r,ref:I,style:m&&m.length>0?{"--snap-point-height":`${m[p??0]}px`,...t}:t,onPointerDown:U=>{x||(r.onPointerDown==null||r.onPointerDown.call(r,U),N.current={x:U.pageX,y:U.pageY},c(U))},onOpenAutoFocus:U=>{n?.(U),T||U.preventDefault()},onPointerDownOutside:U=>{if(e?.(U),!g||U.defaultPrevented){U.preventDefault();return}f.current&&(f.current=!1)},onFocusOutside:U=>{if(!g){U.preventDefault();return}},onPointerMove:U=>{if(D.current=U,x||(r.onPointerMove==null||r.onPointerMove.call(r,U),!N.current))return;const J=U.pageY-N.current.y,ie=U.pageX-N.current.x,F=U.pointerType==="touch"?10:2;V({x:ie,y:J},b,F)?d(U):(Math.abs(ie)>F||Math.abs(J)>F)&&(N.current=null)},onPointerUp:U=>{r.onPointerUp==null||r.onPointerUp.call(r,U),N.current=null,z.current=!1,u(U)},onPointerOut:U=>{r.onPointerOut==null||r.onPointerOut.call(r,U),G(D.current)},onContextMenu:U=>{r.onContextMenu==null||r.onContextMenu.call(r,U),D.current&&G(D.current)}})});FZ.displayName="Drawer.Content";const BZ=250,qZ=120,HZ=le.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:c,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:f,handleOnly:m,isOpen:p,onPress:g,onDrag:y}=Zm(),b=le.useRef(null),S=le.useRef(!1);function w(){if(S.current){T();return}window.setTimeout(()=>{x()},qZ)}function x(){if(i||e||S.current){T();return}if(T(),!c||c.length===0){f||a();return}if(u===c[c.length-1]&&f){a();return}const C=c.findIndex(N=>N===u);if(C===-1)return;const I=c[C+1];d(I)}function E(){b.current=window.setTimeout(()=>{S.current=!0},BZ)}function T(){b.current&&window.clearTimeout(b.current),S.current=!1}return le.createElement("div",{onClick:w,onPointerCancel:T,onPointerDown:O=>{m&&g(O),E()},onPointerMove:O=>{m&&y(O)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},le.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});HZ.displayName="Drawer.Handle";var il=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},c=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,c);u((n=n.apply(e,t)).next())}),yp=class extends Error{},GZ=class extends Error{},ZZ=e=>Math.exp(e)*150,KZ=(e,...t)=>il(void 0,[e,...t],function*(n,{attempts:r=4}={}){var a;let i;for(let c=0;c<r;c++)try{return yield n()}catch(u){i=u,yield new Promise(d=>setTimeout(d,ZZ(c)))}throw new yp((a=i?.message)!=null?a:"Exhausted all retries")}),Ru,K4="captchaFoxOnLoad",bO=`https://cdn.captchafox.com/api.js?render=explicit&onload=${K4}`;function WZ(){return il(this,arguments,function*({nonce:e}={}){return Ru&&document.querySelector(`script[src="${bO}"]`)||(Ru=new Promise((t,n)=>{window[K4]=t;const r=document.createElement("script");r.src=bO,r.async=!0,r.defer=!0,r.onerror=a=>{r.remove(),Ru=void 0,n(a)},e&&(r.nonce=e),document.body.appendChild(r)})),Ru})}function YZ(){return il(this,arguments,function*(e={}){return KZ(()=>WZ(e))})}var QZ=e=>{window._tsdk={n:e,v:"1.11.0"}},$c=()=>typeof window?.captchafox<"u",W4=A.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:r,theme:a,className:i,nonce:c,i18n:u,onError:d,onVerify:f,onLoad:m,onFail:p,onClose:g,onChallengeChange:y,onChallengeOpen:b},S)=>{const[w,x]=A.useState(),[E,T]=A.useState(),O=A.useRef(!1),C=A.useRef(),I=A.useRef(),N=A.useRef(),D=A.useRef(!1);A.useImperativeHandle(S,()=>({getResponse(){return!$c()||!E?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(E)},reset(){if(!$c()||!E){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(E)},remove(){if(!$c()||!E){console.warn("[CaptchaFox] Widget has not been loaded");return}T(void 0),window.captchafox.remove(E)},execute:()=>il(void 0,null,function*(){if(D.current)return Promise.reject(new yp);if(!$c()||!E)return W();try{return yield window.captchafox.execute(E)}catch(U){const J=V(U);return Promise.reject(J)}})}),[E]),A.useEffect(()=>{E&&m?.()},[E]),A.useEffect(()=>(QZ("rj"),()=>{z()}),[]),A.useEffect(()=>{w&&(O.current?$c()&&G():YZ({nonce:c}).then(()=>il(void 0,null,function*(){$c()&&(O.current=!0,yield G())})).catch(U=>{var J;d?.(U),D.current=!0,(J=N.current)==null||J.call(N),console.error("[CaptchaFox] Could not load script:",U)}))},[w,t,n,r]);const z=()=>{clearTimeout(I.current)},W=()=>new Promise((U,J)=>{N.current=()=>{z(),J(new yp)},I.current=setTimeout(()=>{J(new GZ("Execute timed out"))},e*1e3),C.current=ie=>{z(),window.captchafox.execute(ie).then(U).catch(F=>{const X=V(F);J(X)})}}),V=U=>U!=="challenge-aborted"&&U!=="rate-limited"?new yp:U,G=()=>il(void 0,null,function*(){var U,J,ie;if((U=window.captchafox)==null||U.remove(E),!w||((J=w?.children)==null?void 0:J.length)===1)return;const F=yield(ie=window.captchafox)==null?void 0:ie.render(w,{lang:n,sitekey:t,mode:r,theme:a,i18n:u,onError:d,onFail:p,onClose:g,onVerify:f,onChallengeChange:y,onChallengeOpen:b});F&&(T(F),C.current&&(C.current(F),C.current=void 0))});return le.createElement("div",{ref:x,id:E,className:i})});W4.displayName="CaptchaFox";function uo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O_(e,t){return O_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},O_(e,t)}function XZ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,O_(e,t)}var JZ=Object.defineProperty,eK=Object.defineProperties,tK=Object.getOwnPropertyDescriptors,tm=Object.getOwnPropertySymbols,Y4=Object.prototype.hasOwnProperty,Q4=Object.prototype.propertyIsEnumerable,C_=(e,t,n)=>t in e?JZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vr=(e,t)=>{for(var n in t||(t={}))Y4.call(t,n)&&C_(e,n,t[n]);if(tm)for(var n of tm(t))Q4.call(t,n)&&C_(e,n,t[n]);return e},X4=(e,t)=>eK(e,tK(t)),nK=(e,t)=>{var n={};for(var r in e)Y4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&tm)for(var r of tm(e))t.indexOf(r)<0&&Q4.call(e,r)&&(n[r]=e[r]);return n},jn=(e,t,n)=>(C_(e,typeof t!="symbol"?t+"":t,n),n),pl=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},c=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,c);u((n=n.apply(e,t)).next())}),rK="hCaptcha-script",_p="hCaptchaOnLoad",wO="script-error",Es="@hCaptcha/loader";function oK(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function J4(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function eM(e){return e||document.head}function aK(e){var t;e.setTag("source",Es),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",Vr({},sK())),e.setContext("device",X4(Vr({},cK()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function sK(){var e,t,n,r,a,i;let c=navigator.userAgent,u,d;return c.indexOf("Firefox")!==-1?(u="Firefox",d=(e=c.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):c.indexOf("Edg")!==-1?(u="Microsoft Edge",d=(t=c.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):c.indexOf("Chrome")!==-1&&c.indexOf("Safari")!==-1?(u="Chrome",d=(n=c.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):c.indexOf("Safari")!==-1&&c.indexOf("Chrome")===-1?(u="Safari",d=(r=c.match(/Version\/([\d.]+)/))==null?void 0:r[1]):c.indexOf("Opera")!==-1||c.indexOf("OPR")!==-1?(u="Opera",d=(a=c.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:a[2]):c.indexOf("MSIE")!==-1||c.indexOf("Trident")!==-1?(u="Internet Explorer",d=(i=c.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:i[2]):(u="Unknown",d="Unknown"),{name:u,version:d}}function iK(e){return new Promise(t=>setTimeout(t,e))}function cK(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var lK=class tM{constructor(t){jn(this,"_parent"),jn(this,"breadcrumbs",[]),jn(this,"context",{}),jn(this,"extra",{}),jn(this,"tags",{}),jn(this,"request"),jn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new tM(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=Vr(Vr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((r,a)=>{var i;return r.breadcrumbs=[...(i=r.breadcrumbs)!=null?i:[],...a.breadcrumbs],r.extra=Vr(Vr({},r.extra),a.extra),r.contexts=Vr(Vr({},r.contexts),a.context),r.tags=Vr(Vr({},r.tags),a.tags),a.user&&(r.user=a.user),a.request&&(r.request=a.request),r},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},uK=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,dK=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,fK=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,hK=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,_h="?",SO="An unknown error occurred",pK="0.0.4";function mK(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function nr(e){return(e+256).toString(16).substring(1)}function gK(){let e=mK(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,nr(e[0])+nr(e[1])+nr(e[2])+nr(e[3])+"-"+nr(e[4])+nr(e[5])+"-"+nr(e[6])+nr(e[7])+"-"+nr(e[8])+nr(e[9])+"-"+nr(e[10])+nr(e[11])+nr(e[12])+nr(e[13])+nr(e[14])+nr(e[15])}var vK=[[uK,"chrome"],[fK,"winjs"],[dK,"gecko"]];function yK(e){var t,n,r,a;if(!e.stack)return null;let i=[],c=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
108
|
-
`))!=null?r:[];for(let u=0;u<c.length;++u){let d=null,f=null,m=null;for(let[p,g]of vK)if(f=p.exec(c[u]),f){m=g;break}if(!(!f||!m)){if(m==="chrome")d={filename:(a=f[2])!=null&&a.startsWith("address at ")?f[2].substring(11):f[2],function:f[1]||_h,lineno:f[3]?+f[3]:null,colno:f[4]?+f[4]:null};else if(m==="winjs")d={filename:f[2],function:f[1]||_h,lineno:+f[3],colno:f[4]?+f[4]:null};else if(m==="gecko")u===0&&!f[5]&&e.columnNumber!==void 0&&i.length>0&&(i[0].column=e.columnNumber+1),d={filename:f[3],function:f[1]||_h,lineno:f[4]?+f[4]:null,colno:f[5]?+f[5]:null};else continue;!d.function&&d.lineno&&(d.function=_h),i.push(d)}}return i.length?i.reverse():null}function _K(e){let t=yK(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function bK(e){let t=hK.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let r=n[5].split("/"),a=r.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function wK(e,t,n){var r,a;let i=Vr({event_id:gK().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:pK},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){i.message=(a=(r=e.error)==null?void 0:r.message)!=null?a:"Unknown error",i.fingerprint=[i.message];let c=[],u=e.error;for(let d=0;d<5&&u&&(c.push(_K(u)),!(!u.cause||!(u.cause instanceof Error)));d++)u=u.cause;i.exception={values:c.reverse()}}return e.type==="message"&&(i.message=e.message,i.level=e.level),i}function SK(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:r}=n,a=nK(n,["message"]),i=new Error(typeof r=="string"?r:SO);return Object.assign(i,a)}let t=new Error(SO);return Object.assign(t,{cause:e})}function EK(e,t,n){return pl(this,null,function*(){var r,a;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let i;if(n){let d=new AbortController;i=d.signal,setTimeout(()=>d.abort(),n)}let c=yield fetch(e,X4(Vr({},t),{signal:i})),u=yield c.text();return{status:c.status,body:u}}return yield new Promise((i,c)=>{var u,d;let f=new XMLHttpRequest;if(f.open((u=t?.method)!=null?u:"GET",e),f.onload=()=>i({status:f.status,body:f.responseText}),f.onerror=()=>c(new Error("XHR Network Error")),t?.headers)for(let[m,p]of Object.entries(t.headers))f.setRequestHeader(m,p);if(n){let m=setTimeout(()=>{f.abort(),c(new Error("Request timed out"))},n);f.onloadend=()=>{clearTimeout(m)}}f.send((d=t?.body)==null?void 0:d.toString())})}catch(i){return{status:0,body:(a=(r=i?.toString)==null?void 0:r.call(i))!=null?a:"Unknown error"}}})}var Rr,A_=(Rr=class{constructor(e){jn(this,"apiURL"),jn(this,"dsn"),jn(this,"environment"),jn(this,"release"),jn(this,"sampleRate"),jn(this,"debug"),jn(this,"_scope"),jn(this,"shouldBuffer",!1),jn(this,"bufferlimit",20),jn(this,"buffer",[]);var t,n,r,a,i;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(r=e.scope)!=null?r:new lK,this.apiURL=bK(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(a=e.buffer)!=null?a:!1,this.bufferlimit=(i=e.bufferLimit)!=null?i:20}static init(e){Rr._instance||(Rr._instance=new Rr(e))}static get instance(){if(!Rr._instance)throw new Error("Sentry has not been initialized");return Rr._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Rr.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Rr.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:SK(e),scope:t??this._scope})}static captureException(e,t){Rr.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){Rr.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return pl(this,null,function*(){try{this.log("Sending sentry event",e);let n=wK(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},a={type:"event"},i=JSON.stringify(r)+`
|
|
109
|
-
`+JSON.stringify(a)+`
|
|
110
|
-
`+JSON.stringify(n),c=yield EK(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:i},t);this.log("Sentry response",c.status),c.status!==200&&(console.log(c.body),console.error("Failed to send event to Sentry",c))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return pl(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Rr.instance.flush(e)}static reset(){Rr._instance=void 0}},jn(Rr,"_instance"),Rr),RK="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",xK="2.3.0",TK="production";function OK(e=!0){if(!e)return EO();A_.init({dsn:RK,release:xK,environment:TK});let t=A_.scope;return aK(t),EO(t)}function EO(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&A_.captureException(t,e)}}}function CK({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r="anonymous",apihost:a="https://js.hcaptcha.com",cleanup:i=!1,secureApi:c=!1,scriptSource:u=""}={},d){let f=eM(e),m=J4(f);return new Promise((p,g)=>{let y=m.document.createElement("script");y.id=rK,u?y.src=`${u}?onload=${_p}`:c?y.src=`${a}/1/secure-api.js?onload=${_p}`:y.src=`${a}/1/api.js?onload=${_p}`,y.crossOrigin=r,y.async=n;let b=(S,w)=>{try{!c&&i&&f.removeChild(y),w(S)}catch(x){g(x)}};y.onload=S=>b(S,p),y.onerror=S=>{d&&d(y.src),b(S,g)},y.src+=t!==""?`&${t}`:"",f.appendChild(y)})}var bh=[];function AK(e={cleanup:!1},t){try{t.addBreadcrumb({category:Es,message:"hCaptcha loader params",data:e});let n=eM(e.scriptLocation),r=J4(n),a=bh.find(({scope:c})=>c===r.window);if(a)return t.addBreadcrumb({category:Es,message:"hCaptcha already loaded"}),a.promise;let i=new Promise((c,u)=>pl(this,null,function*(){try{r.window[_p]=()=>{t.addBreadcrumb({category:Es,message:"hCaptcha script called onload function"}),c(r.window.hcaptcha)};let d=oK({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield CK(Vr({query:d},e),f=>{t.captureRequest({url:f,method:"GET"})}),t.addBreadcrumb({category:Es,message:"hCaptcha loaded",data:a})}catch{t.addBreadcrumb({category:Es,message:"hCaptcha failed to load"});let f=bh.findIndex(m=>m.scope===r.window);f!==-1&&bh.splice(f,1),u(new Error(wO))}}));return bh.push({promise:i,scope:r.window}),i}catch(n){return t.captureException(n),Promise.reject(new Error(wO))}}function nM(e,t,n=0){return pl(this,null,function*(){var r,a;let i=(r=e.maxRetries)!=null?r:2,c=(a=e.retryDelay)!=null?a:1e3,u=n<i?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield AK(e,t)}catch(d){return t.addBreadcrumb({category:Es,message:u}),n>=i?(t.captureException(d),Promise.reject(d)):(t.addBreadcrumb({category:Es,message:`Waiting ${c}ms before retry attempt ${n+1}`}),yield iK(c),n+=1,nM(e,t,n))}})}function IK(){return pl(this,arguments,function*(e={}){let t=OK(e.sentry);return yield nM(e,t)})}function RO(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function xO(e){return e||document.head}var kK=(function(e){XZ(t,e);function t(r){var a;return a=e.call(this,r)||this,a._hcaptcha=void 0,a.renderCaptcha=a.renderCaptcha.bind(uo(a)),a.resetCaptcha=a.resetCaptcha.bind(uo(a)),a.removeCaptcha=a.removeCaptcha.bind(uo(a)),a.isReady=a.isReady.bind(uo(a)),a._onReady=null,a.loadCaptcha=a.loadCaptcha.bind(uo(a)),a.handleOnLoad=a.handleOnLoad.bind(uo(a)),a.handleSubmit=a.handleSubmit.bind(uo(a)),a.handleExpire=a.handleExpire.bind(uo(a)),a.handleError=a.handleError.bind(uo(a)),a.handleOpen=a.handleOpen.bind(uo(a)),a.handleClose=a.handleClose.bind(uo(a)),a.handleChallengeExpired=a.handleChallengeExpired.bind(uo(a)),a.ref=A.createRef(),a.apiScriptRequested=!1,a.sentryHub=null,a.captchaId="",a._pendingExecute=null,a.state={isApiReady:!1,isRemoved:!1,elementId:r.id},a}var n=t.prototype;return n.componentDidMount=function(){var a=this,i=xO(this.props.scriptLocation),c=RO(i);this._hcaptcha=c.window.hcaptcha||void 0;var u=typeof this._hcaptcha<"u";if(u){this.setState({isApiReady:!0},function(){a.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var a=this._hcaptcha,i=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(a.reset(i),a.remove(i))},n.shouldComponentUpdate=function(a,i){return!(this.state.isApiReady!==i.isApiReady||this.state.isRemoved!==i.isRemoved)},n.componentDidUpdate=function(a){var i=this,c=["sitekey","size","theme","tabindex","languageOverride","endpoint"],u=c.every(function(d){return a[d]===i.props[d]});u||this.removeCaptcha(function(){i.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var a=this.props,i=a.apihost,c=a.assethost,u=a.endpoint,d=a.host,f=a.imghost,m=a.languageOverride,p=a.reCaptchaCompat,g=a.reportapi,y=a.sentry,b=a.custom,S=a.loadAsync,w=a.scriptLocation,x=a.scriptSource,E=a.secureApi,T=a.cleanup,O=T===void 0?!0:T,C=a.userJourneys,I={render:"explicit",apihost:i,assethost:c,endpoint:u,hl:m,host:d,imghost:f,recaptchacompat:p===!1?"off":null,reportapi:g,sentry:y,custom:b,loadAsync:S,scriptLocation:w,scriptSource:x,secureApi:E,cleanup:O,uj:C!==void 0?C:!1};IK(I).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(a){var i=this,c=this.props.onReady,u=this.state.isApiReady,d=this.captchaId;if(!(!u||d)){var f=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),m=this._hcaptcha,p=m.render(this.ref.current,f);this.captchaId=p,this.setState({isRemoved:!1},function(){a&&a(),c&&c(),i._onReady&&i._onReady(p)})}},n.resetCaptcha=function(){var a=this._hcaptcha,i=this.captchaId;this.isReady()&&(a.reset(i),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(a){var i=this,c=this._hcaptcha,u=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){i.captchaId="",c.remove(u),a&&a()})},n.handleOnLoad=function(){var a=this;this.setState({isApiReady:!0},function(){var i=xO(a.props.scriptLocation),c=RO(i);a._hcaptcha=c.window.hcaptcha,a.renderCaptcha(function(){var u=a.props.onLoad;u&&u()})})},n.handleSubmit=function(a){var i=this.props.onVerify,c=this.state.isRemoved,u=this._hcaptcha,d=this.captchaId;if(!(typeof u>"u"||c)){var f=u.getResponse(d),m=u.getRespKey(d);i&&i(f,m)}},n.handleExpire=function(){var a=this.props.onExpire,i=this._hcaptcha,c=this.captchaId;this.isReady()&&(i.reset(c),a&&a())},n.handleError=function(a){var i=this.props.onError,c=this._hcaptcha,u=this.captchaId;this.isReady()&&c.reset(u),i&&i(a)},n.isReady=function(){var a=this.state,i=a.isApiReady,c=a.isRemoved;return i&&!c},n._cancelPendingExecute=function(a){if(this._pendingExecute){var i=this._pendingExecute;this._pendingExecute=null;var c=new Error(a);i.reject(c)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(a){var i=this;a===void 0&&(a=null),a=typeof a=="object"?a:null;try{var c=this._hcaptcha,u=this.captchaId;if(a&&a.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return a&&a.async?new Promise(function(f,m){i._pendingExecute={resolve:f,reject:m},i._onReady=function(p){if(i._pendingExecute)try{var g=c.execute(p,a);g&&typeof g.then=="function"?g.then(function(y){i._pendingExecute=null,f(y)}).catch(function(y){i._pendingExecute=null,m(y)}):(i._pendingExecute=null,m(new Error("hcaptcha-execute-no-promise")))}catch(y){i._pendingExecute=null,m(y)}}}):(this._onReady=function(f){c.execute(f,a)},null);var d=c.execute(u,a);return a&&a.async&&d&&typeof d.then=="function"?new Promise(function(f,m){i._pendingExecute={resolve:f,reject:m},d.then(function(p){i._pendingExecute=null,f(p)}).catch(function(p){i._pendingExecute=null,m(p)})}):d}catch(f){return a&&a.async?Promise.reject(f):null}},n.close=function(){var a=this._hcaptcha,i=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return a.close(i)},n.setData=function(a){var i=this._hcaptcha,c=this.captchaId;this.isReady()&&(a&&typeof a!="object"&&(a=null),i.setData(c,a))},n.getResponse=function(){var a=this._hcaptcha;return a.getResponse(this.captchaId)},n.getRespKey=function(){var a=this._hcaptcha;return a.getRespKey(this.captchaId)},n.render=function(){var a=this.state.elementId;return A.createElement("div",{ref:this.ref,id:a})},t})(A.Component),NK=({as:e="div",...t},n)=>R.jsx(e,{...t,ref:n}),MK=A.forwardRef(NK),PK="https://challenges.cloudflare.com/turnstile/v0/api.js",g1="cf-turnstile-script",DK="cf-turnstile",v1="onloadTurnstileCallback",rM=e=>!!document.getElementById(e),LK=({render:e="explicit",onLoadCallbackName:t=v1,scriptOptions:{nonce:n="",defer:r=!0,async:a=!0,id:i="",appendTo:c,onError:u,crossOrigin:d=""}={}})=>{let f=i||g1;if(rM(f))return;let m=document.createElement("script");m.id=f,m.src=`${PK}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${m.src}"]`)&&(m.defer=!!r,m.async=!!a,n&&(m.nonce=n),d&&(m.crossOrigin=d),u&&(m.onerror=u,delete window[t]),(c==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(m))},mi={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function jK(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function $K(e=g1){let[t,n]=A.useState(!1);return A.useEffect(()=>{let r=()=>{rM(e)&&n(!0)},a=new MutationObserver(r);return a.observe(document,{childList:!0,subtree:!0}),r(),()=>{a.disconnect()}},[e]),t}var Gu="unloaded",oM,UK=new Promise((e,t)=>{oM={resolve:e,reject:t},Gu==="ready"&&e(void 0)}),TO=(e=v1)=>(Gu==="unloaded"&&(Gu="loading",window[e]=()=>{oM.resolve(),Gu="ready",delete window[e]}),UK),aM=A.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:a,onWidgetLoad:i,onSuccess:c,onExpire:u,onError:d,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g,onLoadScript:y,id:b,style:S,as:w="div",injectScript:x=!0,rerenderOnCallbackChange:E=!1,...T}=e,O=r.size,C=A.useCallback(()=>typeof O>"u"?{}:r.execution==="execute"?mi.invisible:r.appearance==="interaction-only"?mi.interactionOnly:mi[O],[r.execution,O,r.appearance]),[I,N]=A.useState(C()),D=A.useRef(null),[z,W]=A.useState(!1),V=A.useRef(void 0),G=A.useRef(!1),U=b||DK,J=A.useRef({onSuccess:c,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g});A.useEffect(()=>{E||(J.current={onSuccess:c,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g})});let ie=n?.id||g1,F=$K(ie),X=n?.onLoadCallbackName||v1,ae=r.appearance||"always",fe=A.useMemo(()=>({sitekey:a,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:jK(O),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled??!0,callback:P=>{G.current=!0,E?c?.(P):J.current.onSuccess?.(P)},"error-callback":E?d:(...P)=>J.current.onError?.(...P),"expired-callback":E?u:(...P)=>J.current.onExpire?.(...P),"before-interactive-callback":E?f:(...P)=>J.current.onBeforeInteractive?.(...P),"after-interactive-callback":E?m:(...P)=>J.current.onAfterInteractive?.(...P),"unsupported-callback":E?p:(...P)=>J.current.onUnsupported?.(...P),"timeout-callback":E?g:(...P)=>J.current.onTimeout?.(...P)}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,a,O,E,E?c:null,E?d:null,E?u:null,E?f:null,E?m:null,E?p:null,E?g:null]),K=A.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return A.useEffect(function(){x&&!z&&(TO(X),LK({onLoadCallbackName:X,scriptOptions:{...n,id:ie}}))},[x,z,n,ie,X]),A.useEffect(function(){Gu!=="ready"&&TO(X).then(()=>W(!0)).catch(console.error)},[X]),A.useEffect(function(){if(!D.current||!z)return;let P=!1;return(async()=>{if(P||!D.current)return;let q=window.turnstile.render(D.current,fe);V.current=q,V.current&&i?.(V.current)})(),()=>{P=!0,V.current&&(window.turnstile.remove(V.current),G.current=!1)}},[U,z,fe]),A.useImperativeHandle(t,()=>{let{turnstile:P}=window;return{getResponse(){if(!P?.getResponse||!V.current||!K()){console.warn("Turnstile has not been loaded");return}return P.getResponse(V.current)},async getResponsePromise(q=3e4,B=100){return new Promise((L,$)=>{let Q,me=async()=>{if(G.current&&window.turnstile&&V.current)try{let ye=window.turnstile.getResponse(V.current);return Q&&clearTimeout(Q),ye?L(ye):$(new Error("No response received"))}catch(ye){return Q&&clearTimeout(Q),console.warn("Failed to get response",ye),$(new Error("Failed to get response"))}Q||(Q=setTimeout(()=>{Q&&clearTimeout(Q),$(new Error("Timeout"))},q)),await new Promise(ye=>setTimeout(ye,B)),await me()};me()})},reset(){if(!P?.reset||!V.current||!K()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&N(mi.invisible);try{G.current=!1,P.reset(V.current)}catch(q){console.warn(`Failed to reset Turnstile widget ${V}`,q)}},remove(){if(!P?.remove||!V.current||!K()){console.warn("Turnstile has not been loaded");return}N(mi.invisible),G.current=!1,P.remove(V.current),V.current=null},render(){if(!P?.render||!D.current||!K()||V.current){console.warn("Turnstile has not been loaded or container not found");return}let q=P.render(D.current,fe);return V.current=q,V.current&&i?.(V.current),r.execution!=="execute"&&N(O?mi[O]:{}),q},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!P?.execute||!D.current||!V.current||!K()){console.warn("Turnstile has not been loaded or container not found");return}P.execute(D.current,fe),N(O?mi[O]:{})},isExpired(){return!P?.isExpired||!V.current||!K()?(console.warn("Turnstile has not been loaded"),!1):P.isExpired(V.current)}}},[V,r.execution,O,fe,D,K,z,i]),A.useEffect(()=>{if(z||!F)return;if(window.turnstile){W(!0);return}let P=setInterval(()=>{window.turnstile&&(W(!0),clearInterval(P))},50);return()=>{clearInterval(P)}},[z,F]),A.useEffect(()=>{N(C())},[r.execution,O,ae]),A.useEffect(()=>{!F||typeof y!="function"||y()},[F]),R.jsx(MK,{ref:D,as:w,id:U,style:{...I,...S},...T})});aM.displayName="Turnstile";var d0={exports:{}},f0,OO;function zK(){if(OO)return f0;OO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return f0=e,f0}var h0,CO;function VK(){if(CO)return h0;CO=1;var e=zK();function t(){}function n(){}return n.resetWarningCache=t,h0=function(){function r(c,u,d,f,m,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},h0}var AO;function y1(){return AO||(AO=1,d0.exports=VK()()),d0.exports}var FK=y1();const xr=ja(FK);var BK=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function I_(){return I_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I_.apply(this,arguments)}function qK(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function wh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,k_(e,t)}function k_(e,t){return k_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},k_(e,t)}var Km=(function(e){HK(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(wh(r)),r.handleErrored=r.handleErrored.bind(wh(r)),r.handleChange=r.handleChange.bind(wh(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(wh(r)),r}var n=t.prototype;return n.getCaptchaFunction=function(a){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[a]:this.props.grecaptcha[a]:null},n.getValue=function(){var a=this.getCaptchaFunction("getResponse");return a&&this._widgetId!==void 0?a(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var a=this.getCaptchaFunction("execute");if(a&&this._widgetId!==void 0)return a(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var a=this;return new Promise(function(i,c){a.executionResolve=i,a.executionReject=c,a.execute()})},n.reset=function(){var a=this.getCaptchaFunction("reset");a&&this._widgetId!==void 0&&a(this._widgetId)},n.forceReset=function(){var a=this.getCaptchaFunction("reset");a&&a()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(a){this.props.onChange&&this.props.onChange(a),this.executionResolve&&(this.executionResolve(a),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var a=this.getCaptchaFunction("render");if(a&&this._widgetId===void 0){var i=document.createElement("div");this._widgetId=a(i,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(i)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(a){this.captcha=a},n.render=function(){var a=this.props;a.sitekey,a.onChange,a.theme,a.type,a.tabindex,a.onExpired,a.onErrored,a.size,a.stoken,a.grecaptcha,a.badge,a.hl,a.isolated;var i=qK(a,BK);return A.createElement("div",I_({},i,{ref:this.handleRecaptchaRef}))},t})(A.Component);Km.displayName="ReCAPTCHA";Km.propTypes={sitekey:xr.string.isRequired,onChange:xr.func,grecaptcha:xr.object,theme:xr.oneOf(["dark","light"]),type:xr.oneOf(["image","audio"]),tabindex:xr.number,onExpired:xr.func,onErrored:xr.func,size:xr.oneOf(["compact","normal","invisible"]),stoken:xr.string,hl:xr.string,badge:xr.oneOf(["bottomright","bottomleft","inline"]),isolated:xr.bool};Km.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var p0={exports:{}},Mt={};var IO;function GK(){if(IO)return Mt;IO=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function T(C){if(typeof C=="object"&&C!==null){var I=C.$$typeof;switch(I){case t:switch(C=C.type,C){case d:case f:case r:case i:case a:case p:return C;default:switch(C=C&&C.$$typeof,C){case u:case m:case b:case y:case c:return C;default:return I}}case n:return I}}}function O(C){return T(C)===f}return Mt.AsyncMode=d,Mt.ConcurrentMode=f,Mt.ContextConsumer=u,Mt.ContextProvider=c,Mt.Element=t,Mt.ForwardRef=m,Mt.Fragment=r,Mt.Lazy=b,Mt.Memo=y,Mt.Portal=n,Mt.Profiler=i,Mt.StrictMode=a,Mt.Suspense=p,Mt.isAsyncMode=function(C){return O(C)||T(C)===d},Mt.isConcurrentMode=O,Mt.isContextConsumer=function(C){return T(C)===u},Mt.isContextProvider=function(C){return T(C)===c},Mt.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},Mt.isForwardRef=function(C){return T(C)===m},Mt.isFragment=function(C){return T(C)===r},Mt.isLazy=function(C){return T(C)===b},Mt.isMemo=function(C){return T(C)===y},Mt.isPortal=function(C){return T(C)===n},Mt.isProfiler=function(C){return T(C)===i},Mt.isStrictMode=function(C){return T(C)===a},Mt.isSuspense=function(C){return T(C)===p},Mt.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===f||C===i||C===a||C===p||C===g||typeof C=="object"&&C!==null&&(C.$$typeof===b||C.$$typeof===y||C.$$typeof===c||C.$$typeof===u||C.$$typeof===m||C.$$typeof===w||C.$$typeof===x||C.$$typeof===E||C.$$typeof===S)},Mt.typeOf=T,Mt}var kO;function ZK(){return kO||(kO=1,p0.exports=GK()),p0.exports}var m0,NO;function KK(){if(NO)return m0;NO=1;var e=ZK(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=a;function c(b){return e.isMemo(b)?a:i[b.$$typeof]||t}var u=Object.defineProperty,d=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;function y(b,S,w){if(typeof S!="string"){if(g){var x=p(S);x&&x!==g&&y(b,x,w)}var E=d(S);f&&(E=E.concat(f(S)));for(var T=c(b),O=c(S),C=0;C<E.length;++C){var I=E[C];if(!n[I]&&!(w&&w[I])&&!(O&&O[I])&&!(T&&T[I])){var N=m(S,I);try{u(b,I,N)}catch{}}}}return b}return m0=y,m0}var WK=KK();const YK=ja(WK);function N_(){return N_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N_.apply(this,arguments)}function QK(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function XK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var To={},JK=0;function eW(e,t){return t=t||{},function(r){var a=r.displayName||r.name||"Component",i=(function(u){XK(d,u);function d(m,p){var g;return g=u.call(this,m,p)||this,g.state={},g.__scriptURL="",g}var f=d.prototype;return f.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+JK++),this.__scriptLoaderID},f.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},f.asyncScriptLoaderHandleLoad=function(p){var g=this;this.setState(p,function(){return g.props.asyncScriptOnLoad&&g.props.asyncScriptOnLoad(g.state)})},f.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=To[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var g in p.observers)p.observers[g](p);delete window[t.callbackName]},f.componentDidMount=function(){var p=this,g=this.setupScriptURL(),y=this.asyncScriptLoaderGetScriptLoaderID(),b=t,S=b.globalName,w=b.callbackName,x=b.scriptId;if(S&&typeof window[S]<"u"&&(To[g]={loaded:!0,observers:{}}),To[g]){var E=To[g];if(E&&(E.loaded||E.errored)){this.asyncScriptLoaderHandleLoad(E);return}E.observers[y]=function(N){return p.asyncScriptLoaderHandleLoad(N)};return}var T={};T[y]=function(N){return p.asyncScriptLoaderHandleLoad(N)},To[g]={loaded:!1,observers:T};var O=document.createElement("script");O.src=g,O.async=!0;for(var C in t.attributes)O.setAttribute(C,t.attributes[C]);x&&(O.id=x);var I=function(D){if(To[g]){var z=To[g],W=z.observers;for(var V in W)D(W[V])&&delete W[V]}};w&&typeof window<"u"&&(window[w]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var N=To[g];N&&(N.loaded=!0,I(function(D){return w?!1:(D(N),!0)}))},O.onerror=function(){var N=To[g];N&&(N.errored=!0,I(function(D){return D(N),!0}))},document.body.appendChild(O)},f.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var g=document.getElementsByTagName("script"),y=0;y<g.length;y+=1)g[y].src.indexOf(p)>-1&&g[y].parentNode&&g[y].parentNode.removeChild(g[y]);var b=To[p];b&&(delete b.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete To[p])},f.render=function(){var p=t.globalName,g=this.props;g.asyncScriptOnLoad;var y=g.forwardedRef,b=QK(g,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(b[p]=typeof window[p]<"u"?window[p]:void 0),b.ref=y,A.createElement(r,b)},d})(A.Component),c=A.forwardRef(function(u,d){return A.createElement(i,N_({},u,{forwardedRef:d}))});return c.displayName="AsyncScriptLoader("+a+")",c.propTypes={asyncScriptOnLoad:xr.func},YK(c,r)}}var M_="onloadcallback",tW="grecaptcha";function P_(){return typeof window<"u"&&window.recaptchaOptions||{}}function nW(){var e=P_(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+M_+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+M_+"&render=explicit"}const rW=eW(nW,{callbackName:M_,globalName:tW,attributes:P_().nonce?{nonce:P_().nonce}:{}})(Km);var oW=Object.defineProperty,aW=Object.defineProperties,sW=Object.getOwnPropertyDescriptors,nm=Object.getOwnPropertySymbols,sM=Object.prototype.hasOwnProperty,iM=Object.prototype.propertyIsEnumerable,MO=(e,t,n)=>t in e?oW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iW=(e,t)=>{for(var n in t||(t={}))sM.call(t,n)&&MO(e,n,t[n]);if(nm)for(var n of nm(t))iM.call(t,n)&&MO(e,n,t[n]);return e},cW=(e,t)=>aW(e,sW(t)),lW=(e,t)=>{var n={};for(var r in e)sM.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&nm)for(var r of nm(e))t.indexOf(r)<0&&iM.call(e,r)&&(n[r]=e[r]);return n};function uW(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function dW(e){let t=A.useRef();return A.useEffect(()=>{t.current=e}),t.current}var fW=18,cM=40,hW=`${cM}px`,pW=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function mW({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[a,i]=A.useState(!1),[c,u]=A.useState(!1),[d,f]=A.useState(!1),m=A.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&a&&c,[a,c,n]),p=A.useCallback(()=>{let g=e.current,y=t.current;if(!g||!y||d||n==="none")return;let b=g,S=b.getBoundingClientRect().left+b.offsetWidth,w=b.getBoundingClientRect().top+b.offsetHeight/2,x=S-fW,E=w;document.querySelectorAll(pW).length===0&&document.elementFromPoint(x,E)===g||(i(!0),f(!0))},[e,t,d,n]);return A.useEffect(()=>{let g=e.current;if(!g||n==="none")return;function y(){let S=window.innerWidth-g.getBoundingClientRect().right;u(S>=cM)}y();let b=setInterval(y,1e3);return()=>{clearInterval(b)}},[e,n]),A.useEffect(()=>{let g=r||document.activeElement===t.current;if(n==="none"||!g)return;let y=setTimeout(p,0),b=setTimeout(p,2e3),S=setTimeout(p,5e3),w=setTimeout(()=>{f(!0)},6e3);return()=>{clearTimeout(y),clearTimeout(b),clearTimeout(S),clearTimeout(w)}},[t,r,n,p]),{hasPWMBadge:a,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:hW}}var lM=A.createContext({}),uM=A.forwardRef((e,t)=>{var n=e,{value:r,onChange:a,maxLength:i,textAlign:c="left",pattern:u,placeholder:d,inputMode:f="numeric",onComplete:m,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:g,containerClassName:y,noScriptCSSFallback:b=gW,render:S,children:w}=n,x=lW(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),E,T,O,C,I;let[N,D]=A.useState(typeof x.defaultValue=="string"?x.defaultValue:""),z=r??N,W=dW(z),V=A.useCallback(pe=>{a?.(pe),D(pe)},[a]),G=A.useMemo(()=>u?typeof u=="string"?new RegExp(u):u:null,[u]),U=A.useRef(null),J=A.useRef(null),ie=A.useRef({value:z,onChange:V,isIOS:typeof window<"u"&&((T=(E=window?.CSS)==null?void 0:E.supports)==null?void 0:T.call(E,"-webkit-touch-callout","none"))}),F=A.useRef({prev:[(O=U.current)==null?void 0:O.selectionStart,(C=U.current)==null?void 0:C.selectionEnd,(I=U.current)==null?void 0:I.selectionDirection]});A.useImperativeHandle(t,()=>U.current,[]),A.useEffect(()=>{let pe=U.current,ce=J.current;if(!pe||!ce)return;ie.current.value!==pe.value&&ie.current.onChange(pe.value),F.current.prev=[pe.selectionStart,pe.selectionEnd,pe.selectionDirection];function Oe(){if(document.activeElement!==pe){q(null),L(null);return}let He=pe.selectionStart,Xe=pe.selectionEnd,Z=pe.selectionDirection,te=pe.maxLength,re=pe.value,Se=F.current.prev,Te=-1,Re=-1,Ne;if(re.length!==0&&He!==null&&Xe!==null){let hr=He===Xe,xn=He===re.length&&re.length<te;if(hr&&!xn){let Un=He;if(Un===0)Te=0,Re=1,Ne="forward";else if(Un===te)Te=Un-1,Re=Un,Ne="backward";else if(te>1&&re.length>1){let en=0;if(Se[0]!==null&&Se[1]!==null){Ne=Un<Se[1]?"backward":"forward";let zn=Se[0]===Se[1]&&Se[0]<te;Ne==="backward"&&!zn&&(en=-1)}Te=en+Un,Re=en+Un+1}}Te!==-1&&Re!==-1&&Te!==Re&&U.current.setSelectionRange(Te,Re,Ne)}let ot=Te!==-1?Te:He,it=Re!==-1?Re:Xe,Dt=Ne??Z;q(ot),L(it),F.current.prev=[ot,it,Dt]}if(document.addEventListener("selectionchange",Oe,{capture:!0}),Oe(),document.activeElement===pe&&K(!0),!document.getElementById("input-otp-style")){let He=document.createElement("style");if(He.id="input-otp-style",document.head.appendChild(He),He.sheet){let Xe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";xu(He.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),xu(He.sheet,`[data-input-otp]:autofill { ${Xe} }`),xu(He.sheet,`[data-input-otp]:-webkit-autofill { ${Xe} }`),xu(He.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),xu(He.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let je=()=>{ce&&ce.style.setProperty("--root-height",`${pe.clientHeight}px`)};je();let Ye=new ResizeObserver(je);return Ye.observe(pe),()=>{document.removeEventListener("selectionchange",Oe,{capture:!0}),Ye.disconnect()}},[]);let[X,ae]=A.useState(!1),[fe,K]=A.useState(!1),[P,q]=A.useState(null),[B,L]=A.useState(null);A.useEffect(()=>{uW(()=>{var pe,ce,Oe,je;(pe=U.current)==null||pe.dispatchEvent(new Event("input"));let Ye=(ce=U.current)==null?void 0:ce.selectionStart,He=(Oe=U.current)==null?void 0:Oe.selectionEnd,Xe=(je=U.current)==null?void 0:je.selectionDirection;Ye!==null&&He!==null&&(q(Ye),L(He),F.current.prev=[Ye,He,Xe])})},[z,fe]),A.useEffect(()=>{W!==void 0&&z!==W&&W.length<i&&z.length===i&&m?.(z)},[i,m,W,z]);let $=mW({containerRef:J,inputRef:U,pushPasswordManagerStrategy:p,isFocused:fe}),Q=A.useCallback(pe=>{let ce=pe.currentTarget.value.slice(0,i);if(ce.length>0&&G&&!G.test(ce)){pe.preventDefault();return}typeof W=="string"&&ce.length<W.length&&document.dispatchEvent(new Event("selectionchange")),V(ce)},[i,V,W,G]),me=A.useCallback(()=>{var pe;if(U.current){let ce=Math.min(U.current.value.length,i-1),Oe=U.current.value.length;(pe=U.current)==null||pe.setSelectionRange(ce,Oe),q(ce),L(Oe)}K(!0)},[i]),ye=A.useCallback(pe=>{var ce,Oe;let je=U.current;if(!g&&(!ie.current.isIOS||!pe.clipboardData||!je))return;let Ye=pe.clipboardData.getData("text/plain"),He=g?g(Ye):Ye;pe.preventDefault();let Xe=(ce=U.current)==null?void 0:ce.selectionStart,Z=(Oe=U.current)==null?void 0:Oe.selectionEnd,te=(Xe!==Z?z.slice(0,Xe)+He+z.slice(Z):z.slice(0,Xe)+He+z.slice(Xe)).slice(0,i);if(te.length>0&&G&&!G.test(te))return;je.value=te,V(te);let re=Math.min(te.length,i-1),Se=te.length;je.setSelectionRange(re,Se),q(re),L(Se)},[i,V,G,z]),Ae=A.useMemo(()=>({position:"relative",cursor:x.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[x.disabled]),ke=A.useMemo(()=>({position:"absolute",inset:0,width:$.willPushPWMBadge?`calc(100% + ${$.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:$.willPushPWMBadge?`inset(0 ${$.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:c,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[$.PWM_BADGE_SPACE_WIDTH,$.willPushPWMBadge,c]),H=A.useMemo(()=>A.createElement("input",cW(iW({autoComplete:x.autoComplete||"one-time-code"},x),{"data-input-otp":!0,"data-input-otp-placeholder-shown":z.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":B,inputMode:f,pattern:G?.source,"aria-placeholder":d,style:ke,maxLength:i,value:z,ref:U,onPaste:pe=>{var ce;ye(pe),(ce=x.onPaste)==null||ce.call(x,pe)},onChange:Q,onMouseOver:pe=>{var ce;ae(!0),(ce=x.onMouseOver)==null||ce.call(x,pe)},onMouseLeave:pe=>{var ce;ae(!1),(ce=x.onMouseLeave)==null||ce.call(x,pe)},onFocus:pe=>{var ce;me(),(ce=x.onFocus)==null||ce.call(x,pe)},onBlur:pe=>{var ce;K(!1),(ce=x.onBlur)==null||ce.call(x,pe)}})),[Q,me,ye,f,ke,i,B,P,x,G?.source,z]),ne=A.useMemo(()=>({slots:Array.from({length:i}).map((pe,ce)=>{var Oe;let je=fe&&P!==null&&B!==null&&(P===B&&ce===P||ce>=P&&ce<B),Ye=z[ce]!==void 0?z[ce]:null,He=z[0]!==void 0?null:(Oe=d?.[ce])!=null?Oe:null;return{char:Ye,placeholderChar:He,isActive:je,hasFakeCaret:je&&Ye===null}}),isFocused:fe,isHovering:!x.disabled&&X}),[fe,X,i,B,P,x.disabled,z]),_e=A.useMemo(()=>S?S(ne):A.createElement(lM.Provider,{value:ne},w),[w,ne,S]);return A.createElement(A.Fragment,null,b!==null&&A.createElement("noscript",null,A.createElement("style",null,b)),A.createElement("div",{ref:J,"data-input-otp-container":!0,style:Ae,className:y},_e,A.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},H)))});uM.displayName="Input";function xu(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var gW=`
|
|
111
|
-
[data-input-otp] {
|
|
112
|
-
--nojs-bg: white !important;
|
|
113
|
-
--nojs-fg: black !important;
|
|
114
|
-
|
|
115
|
-
background-color: var(--nojs-bg) !important;
|
|
116
|
-
color: var(--nojs-fg) !important;
|
|
117
|
-
caret-color: var(--nojs-fg) !important;
|
|
118
|
-
letter-spacing: .25em !important;
|
|
119
|
-
text-align: center !important;
|
|
120
|
-
border: 1px solid var(--nojs-fg) !important;
|
|
121
|
-
border-radius: 4px !important;
|
|
122
|
-
width: 100% !important;
|
|
123
|
-
}
|
|
124
|
-
@media (prefers-color-scheme: dark) {
|
|
125
|
-
[data-input-otp] {
|
|
126
|
-
--nojs-bg: black !important;
|
|
127
|
-
--nojs-fg: white !important;
|
|
128
|
-
}
|
|
129
|
-
}`,Uc={},g0,PO;function dM(){return PO||(PO=1,g0={L:1,M:0,Q:3,H:2}),g0}var v0,DO;function fM(){return DO||(DO=1,v0={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),v0}var y0,LO;function vW(){if(LO)return y0;LO=1;var e=fM();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},y0=t,y0}var _0,jO;function yW(){if(jO)return _0;jO=1;var e=dM();function t(n,r){this.totalCount=n,this.dataCount=r}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,r){var a=t.getRsBlockTable(n,r);if(a==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var i=a.length/3,c=new Array,u=0;u<i;u++)for(var d=a[u*3+0],f=a[u*3+1],m=a[u*3+2],p=0;p<d;p++)c.push(new t(f,m));return c},t.getRsBlockTable=function(n,r){switch(r){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},_0=t,_0}var b0,$O;function _W(){if($O)return b0;$O=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var r=0;r<n;r++)this.putBit((t>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},b0=e,b0}var w0,UO;function hM(){if(UO)return w0;UO=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return w0=e,w0}var S0,zO;function pM(){if(zO)return S0;zO=1;var e=hM();function t(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var a=0;a<n.length&&n[a]==0;)a++;this.num=new Array(n.length-a+r);for(var i=0;i<n.length-a;i++)this.num[i]=n[i+a]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),a=0;a<this.getLength();a++)for(var i=0;i<n.getLength();i++)r[a+i]^=e.gexp(e.glog(this.get(a))+e.glog(n.get(i)));return new t(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=e.glog(this.get(0))-e.glog(n.get(0)),a=new Array(this.getLength()),i=0;i<this.getLength();i++)a[i]=this.get(i);for(var i=0;i<n.getLength();i++)a[i]^=e.gexp(e.glog(n.get(i))+r);return new t(a,0).mod(n)}},S0=t,S0}var E0,VO;function bW(){if(VO)return E0;VO=1;var e=fM(),t=pM(),n=hM(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},a={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(i){for(var c=i<<10;a.getBCHDigit(c)-a.getBCHDigit(a.G15)>=0;)c^=a.G15<<a.getBCHDigit(c)-a.getBCHDigit(a.G15);return(i<<10|c)^a.G15_MASK},getBCHTypeNumber:function(i){for(var c=i<<12;a.getBCHDigit(c)-a.getBCHDigit(a.G18)>=0;)c^=a.G18<<a.getBCHDigit(c)-a.getBCHDigit(a.G18);return i<<12|c},getBCHDigit:function(i){for(var c=0;i!=0;)c++,i>>>=1;return c},getPatternPosition:function(i){return a.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,c,u){switch(i){case r.PATTERN000:return(c+u)%2==0;case r.PATTERN001:return c%2==0;case r.PATTERN010:return u%3==0;case r.PATTERN011:return(c+u)%3==0;case r.PATTERN100:return(Math.floor(c/2)+Math.floor(u/3))%2==0;case r.PATTERN101:return c*u%2+c*u%3==0;case r.PATTERN110:return(c*u%2+c*u%3)%2==0;case r.PATTERN111:return(c*u%3+(c+u)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){for(var c=new t([1],0),u=0;u<i;u++)c=c.multiply(new t([1,n.gexp(u)],0));return c},getLengthInBits:function(i,c){if(1<=c&&c<10)switch(i){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(c<27)switch(i){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(c<41)switch(i){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+i)}else throw new Error("type:"+c)},getLostPoint:function(i){for(var c=i.getModuleCount(),u=0,d=0;d<c;d++)for(var f=0;f<c;f++){for(var m=0,p=i.isDark(d,f),g=-1;g<=1;g++)if(!(d+g<0||c<=d+g))for(var y=-1;y<=1;y++)f+y<0||c<=f+y||g==0&&y==0||p==i.isDark(d+g,f+y)&&m++;m>5&&(u+=3+m-5)}for(var d=0;d<c-1;d++)for(var f=0;f<c-1;f++){var b=0;i.isDark(d,f)&&b++,i.isDark(d+1,f)&&b++,i.isDark(d,f+1)&&b++,i.isDark(d+1,f+1)&&b++,(b==0||b==4)&&(u+=3)}for(var d=0;d<c;d++)for(var f=0;f<c-6;f++)i.isDark(d,f)&&!i.isDark(d,f+1)&&i.isDark(d,f+2)&&i.isDark(d,f+3)&&i.isDark(d,f+4)&&!i.isDark(d,f+5)&&i.isDark(d,f+6)&&(u+=40);for(var f=0;f<c;f++)for(var d=0;d<c-6;d++)i.isDark(d,f)&&!i.isDark(d+1,f)&&i.isDark(d+2,f)&&i.isDark(d+3,f)&&i.isDark(d+4,f)&&!i.isDark(d+5,f)&&i.isDark(d+6,f)&&(u+=40);for(var S=0,f=0;f<c;f++)for(var d=0;d<c;d++)i.isDark(d,f)&&S++;var w=Math.abs(100*S/c/c-50)/5;return u+=w*10,u}};return E0=a,E0}var R0,FO;function wW(){if(FO)return R0;FO=1;var e=vW(),t=yW(),n=_W(),r=bW(),a=pM();function i(u,d){this.typeNumber=u,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=i.prototype;return c.addData=function(u){var d=new e(u);this.dataList.push(d),this.dataCache=null},c.isDark=function(u,d){if(u<0||this.moduleCount<=u||d<0||this.moduleCount<=d)throw new Error(u+","+d);return this.modules[u][d]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var u=1;for(u=1;u<40;u++){for(var d=t.getRSBlocks(u,this.errorCorrectLevel),f=new n,m=0,p=0;p<d.length;p++)m+=d[p].dataCount;for(var p=0;p<this.dataList.length;p++){var g=this.dataList[p];f.put(g.mode,4),f.put(g.getLength(),r.getLengthInBits(g.mode,u)),g.write(f)}if(f.getLengthInBits()<=m*8)break}this.typeNumber=u}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(u,d){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[f][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,d),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,d)},c.setupPositionProbePattern=function(u,d){for(var f=-1;f<=7;f++)if(!(u+f<=-1||this.moduleCount<=u+f))for(var m=-1;m<=7;m++)d+m<=-1||this.moduleCount<=d+m||(0<=f&&f<=6&&(m==0||m==6)||0<=m&&m<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=m&&m<=4?this.modules[u+f][d+m]=!0:this.modules[u+f][d+m]=!1)},c.getBestMaskPattern=function(){for(var u=0,d=0,f=0;f<8;f++){this.makeImpl(!0,f);var m=r.getLostPoint(this);(f==0||u>m)&&(u=m,d=f)}return d},c.createMovieClip=function(u,d,f){var m=u.createEmptyMovieClip(d,f),p=1;this.make();for(var g=0;g<this.modules.length;g++)for(var y=g*p,b=0;b<this.modules[g].length;b++){var S=b*p,w=this.modules[g][b];w&&(m.beginFill(0,100),m.moveTo(S,y),m.lineTo(S+p,y),m.lineTo(S+p,y+p),m.lineTo(S,y+p),m.endFill())}return m},c.setupTimingPattern=function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var d=8;d<this.moduleCount-8;d++)this.modules[6][d]==null&&(this.modules[6][d]=d%2==0)},c.setupPositionAdjustPattern=function(){for(var u=r.getPatternPosition(this.typeNumber),d=0;d<u.length;d++)for(var f=0;f<u.length;f++){var m=u[d],p=u[f];if(this.modules[m][p]==null)for(var g=-2;g<=2;g++)for(var y=-2;y<=2;y++)g==-2||g==2||y==-2||y==2||g==0&&y==0?this.modules[m+g][p+y]=!0:this.modules[m+g][p+y]=!1}},c.setupTypeNumber=function(u){for(var d=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=m}for(var f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=m}},c.setupTypeInfo=function(u,d){for(var f=this.errorCorrectLevel<<3|d,m=r.getBCHTypeInfo(f),p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<6?this.modules[p][8]=g:p<8?this.modules[p+1][8]=g:this.modules[this.moduleCount-15+p][8]=g}for(var p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=g:p<9?this.modules[8][15-p-1+1]=g:this.modules[8][15-p-1]=g}this.modules[this.moduleCount-8][8]=!u},c.mapData=function(u,d){for(var f=-1,m=this.moduleCount-1,p=7,g=0,y=this.moduleCount-1;y>0;y-=2)for(y==6&&y--;;){for(var b=0;b<2;b++)if(this.modules[m][y-b]==null){var S=!1;g<u.length&&(S=(u[g]>>>p&1)==1);var w=r.getMask(d,m,y-b);w&&(S=!S),this.modules[m][y-b]=S,p--,p==-1&&(g++,p=7)}if(m+=f,m<0||this.moduleCount<=m){m-=f,f=-f;break}}},i.PAD0=236,i.PAD1=17,i.createData=function(u,d,f){for(var m=t.getRSBlocks(u,d),p=new n,g=0;g<f.length;g++){var y=f[g];p.put(y.mode,4),p.put(y.getLength(),r.getLengthInBits(y.mode,u)),y.write(p)}for(var b=0,g=0;g<m.length;g++)b+=m[g].dataCount;if(p.getLengthInBits()>b*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+b*8+")");for(p.getLengthInBits()+4<=b*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=b*8||(p.put(i.PAD0,8),p.getLengthInBits()>=b*8));)p.put(i.PAD1,8);return i.createBytes(p,m)},i.createBytes=function(u,d){for(var f=0,m=0,p=0,g=new Array(d.length),y=new Array(d.length),b=0;b<d.length;b++){var S=d[b].dataCount,w=d[b].totalCount-S;m=Math.max(m,S),p=Math.max(p,w),g[b]=new Array(S);for(var x=0;x<g[b].length;x++)g[b][x]=255&u.buffer[x+f];f+=S;var E=r.getErrorCorrectPolynomial(w),T=new a(g[b],E.getLength()-1),O=T.mod(E);y[b]=new Array(E.getLength()-1);for(var x=0;x<y[b].length;x++){var C=x+O.getLength()-y[b].length;y[b][x]=C>=0?O.get(C):0}}for(var I=0,x=0;x<d.length;x++)I+=d[x].totalCount;for(var N=new Array(I),D=0,x=0;x<m;x++)for(var b=0;b<d.length;b++)x<g[b].length&&(N[D++]=g[b][x]);for(var x=0;x<p;x++)for(var b=0;b<d.length;b++)x<y[b].length&&(N[D++]=y[b][x]);return N},R0=i,R0}var Sh={},BO;function SW(){if(BO)return Sh;BO=1,Object.defineProperty(Sh,"__esModule",{value:!0});var e=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])}return f},t=y1(),n=i(t),r=zs(),a=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function c(f,m){var p={};for(var g in f)m.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(f,g)&&(p[g]=f[g]);return p}var u={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},d=(0,r.forwardRef)(function(f,m){var p=f.bgColor,g=f.bgD,y=f.fgD,b=f.fgColor,S=f.size,w=f.title,x=f.viewBoxSize,E=f.xmlns,T=E===void 0?"http://www.w3.org/2000/svg":E,O=c(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return a.default.createElement("svg",e({},O,{height:S,ref:m,viewBox:"0 0 "+x+" "+x,width:S,xmlns:T}),w?a.default.createElement("title",null,w):null,a.default.createElement("path",{d:g,fill:p}),a.default.createElement("path",{d:y,fill:b}))});return d.displayName="QRCodeSvg",d.propTypes=u,Sh.default=d,Sh}var qO;function EW(){if(qO)return Uc;qO=1,Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.QRCode=void 0;var e=Object.assign||function(S){for(var w=1;w<arguments.length;w++){var x=arguments[w];for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&(S[E]=x[E])}return S},t=y1(),n=p(t),r=dM(),a=p(r),i=wW(),c=p(i),u=zs(),d=p(u),f=SW(),m=p(f);function p(S){return S&&S.__esModule?S:{default:S}}function g(S,w){var x={};for(var E in S)w.indexOf(E)>=0||Object.prototype.hasOwnProperty.call(S,E)&&(x[E]=S[E]);return x}var y={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},b=(0,u.forwardRef)(function(S,w){var x=S.bgColor,E=x===void 0?"#FFFFFF":x,T=S.fgColor,O=T===void 0?"#000000":T,C=S.level,I=C===void 0?"L":C,N=S.size,D=N===void 0?256:N,z=S.value,W=g(S,["bgColor","fgColor","level","size","value"]),V=new c.default(-1,a.default[I]);V.addData(z),V.make();var G=V.modules;return d.default.createElement(m.default,e({},W,{bgColor:E,bgD:G.map(function(U,J){return U.map(function(ie,F){return ie?"":"M "+F+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:O,fgD:G.map(function(U,J){return U.map(function(ie,F){return ie?"M "+F+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:w,size:D,viewBoxSize:G.length}))});return Uc.QRCode=b,b.displayName="QRCode",b.propTypes=y,Uc.default=b,Uc}var RW=EW();const xW=ja(RW);var TW="Separator",HO="horizontal",OW=["horizontal","vertical"],mM=A.forwardRef((e,t)=>{const{decorative:n,orientation:r=HO,...a}=e,i=CW(r)?r:HO,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return R.jsx(Od.div,{"data-orientation":i,...u,...a,ref:t})});mM.displayName=TW;function CW(e){return OW.includes(e)}var AW=mM;function IW(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:r},basePath:a,viewPaths:i,replace:c}=A.useContext(ht),{data:u,isPending:d,error:f,refetch:m}=r(),p=u;return A.useEffect(()=>{if(!n||d||p)return;const y=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;c(`${a}/${i[t]}?redirectTo=${encodeURIComponent(y)}`)},[d,p,a,i,c,t,n]),{data:p,user:p?.user,isPending:d,error:f,refetch:m}}function cd({className:e,...t}){return R.jsx("div",{"data-slot":"card",className:Ce("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function _1({className:e,...t}){return R.jsx("div",{"data-slot":"card-header",className:Ce("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function gM({className:e,...t}){return R.jsx("div",{"data-slot":"card-title",className:Ce("leading-none font-semibold",e),...t})}function vM({className:e,...t}){return R.jsx("div",{"data-slot":"card-description",className:Ce("text-muted-foreground text-sm",e),...t})}function b1({className:e,...t}){return R.jsx("div",{"data-slot":"card-content",className:Ce("px-6",e),...t})}function GO({className:e,...t}){return R.jsx("div",{"data-slot":"card-footer",className:Ce("flex items-center px-6 [.border-t]:pt-6",e),...t})}function Na({className:e,...t}){return R.jsx("div",{"data-slot":"skeleton",className:Ce("bg-accent animate-pulse rounded-md",e),...t})}var kW=Pk("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium 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/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ht({className:e,variant:t,size:n,asChild:r=!1,...a}){const i=r?Bb:"button";return R.jsx(i,{"data-slot":"button",className:Ce(kW({variant:t,size:n,className:e})),...a})}async function NW(e,t,n,r){const a=await MW(e),i=document.createElement("canvas");i.width=i.height=n;const c=i.getContext("2d"),u=Math.min(a.width,a.height),d=(a.width-u)/2,f=(a.height-u)/2,m=u,p=u;c?.drawImage(a,d,f,m,p,0,0,n,n);const g=await new Promise(y=>i.toBlob(y,`image/${r}`));return new File([g],`${t}.${r}`,{type:`image/${r}`})}async function MW(e){return new Promise((t,n)=>{const r=new Image,a=new FileReader;a.onload=i=>{var c;r.src=(c=i.target)==null?void 0:c.result},r.onload=()=>t(r),r.onerror=i=>n(i),a.readAsDataURL(e)})}async function PW(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)})}function DW({...e}){return R.jsx(VG,{"data-slot":"dropdown-menu",...e})}function LW({...e}){return R.jsx(FG,{"data-slot":"dropdown-menu-trigger",...e})}function jW({className:e,sideOffset:t=4,...n}){return R.jsx(BG,{children:R.jsx(qG,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ce("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function ZO({className:e,inset:t,variant:n="default",...r}){return R.jsx(HG,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Ce("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function yM({className:e,...t}){return R.jsx(KG,{"data-slot":"label",className:Ce("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var sa=lF,_M=A.createContext({}),un=({...e})=>R.jsx(_M.Provider,{value:{name:e.name},children:R.jsx(iF,{...e})}),w1=()=>{const e=A.useContext(_M),t=A.useContext(bM),{getFieldState:n}=cF(),r=xk({name:e.name}),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},bM=A.createContext({});function dn({className:e,...t}){const n=A.useId();return R.jsx(bM.Provider,{value:{id:n},children:R.jsx("div",{"data-slot":"form-item",className:Ce("grid gap-2",e),...t})})}function fn({className:e,...t}){const{error:n,formItemId:r}=w1();return R.jsx(yM,{"data-slot":"form-label","data-error":!!n,className:Ce("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function Sn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=w1();return R.jsx(Bb,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})}function An({className:e,...t}){const{error:n,formMessageId:r}=w1(),a=n?String(n?.message??""):t.children;return a?R.jsx("p",{"data-slot":"form-message",id:r,className:Ce("text-destructive text-sm",e),...t,children:a}):null}function Po({className:e,type:t,...n}){return R.jsx("input",{type:t,"data-slot":"input",className:Ce("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function wM({className:e,...t}){return R.jsx(rZ,{"data-slot":"avatar",className:Ce("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function SM({className:e,...t}){return R.jsx(oZ,{"data-slot":"avatar-image",className:Ce("aspect-square size-full",e),...t})}function EM({className:e,...t}){return R.jsx(aZ,{"data-slot":"avatar-fallback",className:Ce("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function $W({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i,...c}){const{localization:u,avatar:d}=A.useContext(ht),f=A.useMemo(()=>({...u,...i}),[u,i]),m=a?.name,p=a?.logo;return n?R.jsx(Na,{className:Ce("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):R.jsxs(wM,{className:Ce("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...c,children:[d?.Image?R.jsx(d.Image,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||""}):R.jsx(SM,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||void 0}),R.jsx(EM,{className:Ce("text-foreground",t?.fallback),delayMs:p?600:void 0,children:R.jsx(ZV,{className:Ce("size-[50%]",t?.fallbackIcon)})})]})}function RM({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i}){const{localization:c}=A.useContext(ht),u={...c,...i};return R.jsxs("div",{className:Ce("flex items-center gap-2 truncate",e,t?.base),children:[R.jsx($W,{className:Ce(r!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:u,organization:a,size:r}),R.jsx("div",{className:Ce("flex flex-col truncate text-left leading-tight",t?.content),children:n?R.jsxs(R.Fragment,{children:[R.jsx(Na,{className:Ce("max-w-full",r==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),r!=="sm"&&R.jsx(Na,{className:Ce("mt-1.5 max-w-full",r==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):R.jsxs(R.Fragment,{children:[R.jsx("span",{className:Ce("truncate font-semibold",r==="lg"?"text-base":"text-sm",t?.title),children:a?.name||u?.ORGANIZATION}),r!=="sm"&&a?.slug&&R.jsx("span",{className:Ce("truncate opacity-70",r==="lg"?"text-sm":"text-xs",t?.subtitle),children:a.slug})]})})]})}function UW(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),a=new TextEncoder().encode(n),i=uZ(_Z(a)),c=t?.jpg?".jpg":"";let u=`https://gravatar.com/avatar/${i}${c}`;const d=new URLSearchParams;t?.size&&d.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&d.append("d",t.d),t?.forceDefault&&d.append("f","y");const f=d.toString();return f&&(u+=`?${f}`),u}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function zW({className:e,classNames:t,isPending:n,size:r,user:a,localization:i,...c}){const{localization:u,gravatar:d,avatar:f}=A.useContext(ht),m={...u,...i},p=a?.displayName||a?.name||a?.fullName||a?.firstName||a?.displayUsername||a?.username||a?.email,g=a?.image||a?.avatar||a?.avatarUrl,y=d&&a?.email?UW(a.email,d===!0?void 0:d):null,b=d?y:g;return n?R.jsx(Na,{className:Ce("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):R.jsxs(wM,{className:Ce("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...c,children:[f?.Image?R.jsx(f.Image,{alt:p||m?.USER,className:t?.image,src:b||""}):R.jsx(SM,{alt:p||m?.USER,className:t?.image,src:b||void 0}),R.jsx(EM,{className:Ce("text-foreground uppercase",t?.fallback),delayMs:b?600:void 0,children:VW(p)||R.jsx(tF,{className:Ce("size-[50%]",t?.fallbackIcon)})})]})}var VW=e=>e?.slice(0,2);function S1({className:e,...t}){return R.jsx(z4,{"data-slot":"checkbox",className:Ce("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:R.jsx(F4,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:R.jsx(yk,{className:"size-3.5"})})})}function FW({className:e,...t}){return R.jsx("textarea",{"data-slot":"textarea",className:Ce("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var BW=({className:e})=>R.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),qW=({className:e})=>R.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),HW=({className:e})=>R.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),GW=({className:e})=>R.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),R.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),ZW=({className:e})=>R.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),KW=({className:e})=>R.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),R.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),R.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),R.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),R.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),R.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),R.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),WW=({className:e})=>R.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),R.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),R.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),R.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),YW=({className:e})=>R.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:R.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),QW=({className:e})=>R.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:R.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),XW=({className:e})=>R.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:R.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),JW=({className:e})=>R.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),R.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),eY=({className:e})=>R.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),R.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),R.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),R.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),tY=({className:e})=>R.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:R.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),nY=({className:e})=>R.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),R.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),rY=({className:e})=>R.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),oY=({className:e})=>R.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:R.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),aY=({className:e})=>R.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),sY=({className:e})=>R.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[R.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),R.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),R.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),iY=({className:e})=>R.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[R.jsx("style",{type:"text/css",children:`
|
|
130
|
-
.st0{fill:#FFFFFF}
|
|
131
|
-
.st1{fill:#9146FF}
|
|
132
|
-
`}),R.jsx("title",{children:"Asset 2"}),R.jsxs("g",{children:[R.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),R.jsx("g",{children:R.jsxs("g",{children:[R.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),R.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),R.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),cY=({className:e})=>R.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:R.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),lY=({className:e})=>R.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),uY=({className:e})=>R.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:R.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),dY=({className:e})=>R.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:R.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),fY=[{provider:"apple",name:"Apple",icon:BW},{provider:"discord",name:"Discord",icon:qW},{provider:"dropbox",name:"Dropbox",icon:HW},{provider:"facebook",name:"Facebook",icon:GW},{provider:"github",name:"GitHub",icon:ZW},{provider:"gitlab",name:"GitLab",icon:KW},{provider:"google",name:"Google",icon:WW},{provider:"huggingface",name:"Hugging Face",icon:YW},{provider:"kick",name:"Kick",icon:QW},{provider:"linear",name:"Linear",icon:XW},{provider:"linkedin",name:"LinkedIn",icon:JW},{provider:"microsoft",name:"Microsoft",icon:eY},{provider:"notion",name:"Notion",icon:tY},{provider:"reddit",name:"Reddit",icon:nY},{provider:"roblox",name:"Roblox",icon:rY},{provider:"slack",name:"Slack",icon:oY},{provider:"spotify",name:"Spotify",icon:aY},{provider:"tiktok",name:"TikTok",icon:sY},{provider:"twitch",name:"Twitch",icon:iY},{provider:"vercel",name:"Vercel",icon:cY},{provider:"vk",name:"VK",icon:lY},{provider:"twitter",name:"X",icon:uY},{provider:"zoom",name:"Zoom",icon:dY}];function ld({className:e,enableToggle:t,onChange:n,...r}){const[a,i]=A.useState(!0),[c,u]=A.useState(!1);return R.jsxs("div",{className:"relative",children:[R.jsx(Po,{className:Ce(t&&"pr-10",e),...r,type:c&&t?"text":"password",onChange:d=>{i(!d.target.value),n?.(d)}}),t&&R.jsxs(R.Fragment,{children:[R.jsx(Ht,{className:"!bg-transparent absolute top-0 right-0",disabled:a,size:"icon",type:"button",variant:"ghost",onClick:()=>u(!c),children:c?R.jsx(YV,{}):R.jsx(WV,{})}),R.jsx("style",{children:`
|
|
133
|
-
.hide-password-toggle::-ms-reveal,
|
|
134
|
-
.hide-password-toggle::-ms-clear {
|
|
135
|
-
visibility: hidden;
|
|
136
|
-
pointer-events: none;
|
|
137
|
-
display: none;
|
|
138
|
-
}
|
|
139
|
-
`})]})]})}function ia({redirectTo:e}){const{redirectTo:t}=A.useContext(ht),n=A.useCallback(()=>e||Vi("redirectTo")||t,[e,t]),[r,a]=A.useState(!1),{navigate:i,hooks:{useSession:c},onSessionChange:u}=A.useContext(ht),{refetch:d}=c();return{onSuccess:A.useCallback(async()=>{a(!0),await d?.(),u&&await u(),a(!1),i(n())},[d,u,i,n]),isPending:r}}function xM({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=A.useContext(ht),r=t?.(),a=A.useRef(!1),{onSuccess:i}=ia({redirectTo:e});return A.useEffect(()=>{if(!a.current){if(!n){a.current=!0,i();return}r||(a.current=!0,i())}},[r,n,i]),R.jsx(or,{className:"animate-spin"})}var hY=["/sign-up/email","/sign-in/email","/forget-password"],pY=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\/([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function Cd({localization:e}){const{captcha:t,localization:n}=A.useContext(ht);e={...n,...e};const r=A.useRef(null),{executeRecaptcha:a}=pk(),i=async d=>{if(!t)throw new Error(e.MISSING_RESPONSE);let f;switch(t.provider){case"google-recaptcha-v3":{const m=pY(d);f=await a?.(m);break}case"google-recaptcha-v2-checkbox":{f=r.current.getValue();break}case"google-recaptcha-v2-invisible":{f=await r.current.executeAsync();break}case"cloudflare-turnstile":{f=r.current.getResponse();break}case"hcaptcha":{f=r.current.getResponse();break}case"captchafox":{f=r.current.getResponse();break}}if(!f)throw new Error(e.MISSING_RESPONSE);return f};return{captchaRef:r,getCaptchaHeaders:async d=>{if(!t)return;if((t.endpoints||hY).includes(d))return{"x-captcha-response":await i(d)}},resetCaptcha:()=>{var d,f,m,p,g,y,b,S;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(f=(d=r.current)==null?void 0:d.reset)==null||f.call(d);break}case"cloudflare-turnstile":{(p=(m=r.current)==null?void 0:m.reset)==null||p.call(m);break}case"hcaptcha":{(y=(g=r.current)==null?void 0:g.resetCaptcha)==null||y.call(g);break}case"captchafox":{(S=(b=r.current)==null?void 0:b.reset)==null||S.call(b);break}}}}}function mY({className:e,localization:t}){const n=Ua(),{captcha:r,localization:a}=A.useContext(ht),i={...a,...t};return r?r.hideBadge?R.jsxs(R.Fragment,{children:[R.jsx("style",{children:`
|
|
140
|
-
.grecaptcha-badge { visibility: hidden; }
|
|
141
|
-
`}),R.jsxs("p",{className:Ce("text-muted-foreground text-xs",e),children:[i.PROTECTED_BY_RECAPTCHA," ",i.BY_CONTINUING_YOU_AGREE," Google"," ",R.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:i.PRIVACY_POLICY})," ","&"," ",R.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:i.TERMS_OF_SERVICE}),"."]})]}):n?R.jsx("style",{children:`
|
|
142
|
-
.grecaptcha-badge { visibility: visible !important; }
|
|
143
|
-
`}):null:null}function gY({ref:e}){const{captcha:t}=A.useContext(ht),{theme:n}=Nb(),{lang:r}=gk();return A.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?R.jsxs(R.Fragment,{children:[R.jsx("style",{children:`
|
|
144
|
-
.grecaptcha-badge {
|
|
145
|
-
border-radius: var(--radius) !important;
|
|
146
|
-
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
147
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
148
|
-
border-style: var(--tw-border-style) !important;
|
|
149
|
-
border-width: 1px;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.dark .grecaptcha-badge {
|
|
153
|
-
border-color: var(--input) !important;
|
|
154
|
-
}
|
|
155
|
-
`}),R.jsx(rW,{ref:e,sitekey:t.siteKey,theme:n,hl:r,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:Ce(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${r}-${t.provider}`)]}):null}var vY=["/sign-up/email","/sign-in/email","/forget-password"];function Ad({ref:e,localization:t,action:n}){const{captcha:r}=A.useContext(ht);if(!r||n&&!(r.endpoints||vY).includes(n))return null;const{theme:a}=Nb(),i=r.provider==="google-recaptcha-v2-checkbox"||r.provider==="google-recaptcha-v2-invisible",c=r.provider==="google-recaptcha-v3"||r.provider==="google-recaptcha-v2-invisible",u=r.provider==="cloudflare-turnstile",d=r.provider==="hcaptcha",f=r.provider==="captchafox";return R.jsxs(R.Fragment,{children:[i&&R.jsx(gY,{ref:e}),c&&R.jsx(mY,{localization:t}),u&&R.jsx(aM,{className:"mx-auto",ref:e,siteKey:r.siteKey,options:{theme:a,size:"flexible"}}),d&&R.jsx("div",{className:"mx-auto",children:R.jsx(kK,{ref:e,sitekey:r.siteKey,theme:a})}),f&&R.jsx("div",{className:"mx-auto",children:R.jsx(W4,{ref:e,sitekey:r.siteKey,theme:a})})]})}function E1({className:e,containerClassName:t,...n}){return R.jsx(uM,{"data-slot":"input-otp",containerClassName:Ce("flex items-center gap-2 has-disabled:opacity-50",t),className:Ce("disabled:cursor-not-allowed",e),...n})}function zc({className:e,...t}){return R.jsx("div",{"data-slot":"input-otp-group",className:Ce("flex items-center",e),...t})}function Dn({index:e,className:t,...n}){const r=A.useContext(lM),{char:a,hasFakeCaret:i,isActive:c}=r?.slots[e]??{};return R.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,className:Ce("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[a,i&&R.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:R.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function x0({...e}){return R.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:R.jsx(XV,{})})}function R1({otpSeparators:e=0}){return e===0?R.jsxs(zc,{children:[R.jsx(Dn,{index:0}),R.jsx(Dn,{index:1}),R.jsx(Dn,{index:2}),R.jsx(Dn,{index:3}),R.jsx(Dn,{index:4}),R.jsx(Dn,{index:5})]}):e===1?R.jsxs(R.Fragment,{children:[R.jsxs(zc,{children:[R.jsx(Dn,{index:0}),R.jsx(Dn,{index:1}),R.jsx(Dn,{index:2})]}),R.jsx(x0,{}),R.jsxs(zc,{children:[R.jsx(Dn,{index:3}),R.jsx(Dn,{index:4}),R.jsx(Dn,{index:5})]})]}):R.jsxs(R.Fragment,{children:[R.jsxs(zc,{children:[R.jsx(Dn,{index:0}),R.jsx(Dn,{index:1})]}),R.jsx(x0,{}),R.jsxs(zc,{children:[R.jsx(Dn,{index:2}),R.jsx(Dn,{index:3})]}),R.jsx(x0,{}),R.jsxs(zc,{children:[R.jsx(Dn,{index:4}),R.jsx(Dn,{index:5})]})]})}function KO(e){const[t,n]=A.useState();return t?R.jsx(_Y,{...e,email:t}):R.jsx(yY,{...e,setEmail:n})}function yY({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a,setEmail:i}){const c=Ua(),{captchaRef:u,getCaptchaHeaders:d}=Cd({localization:r}),{authClient:f,localization:m,toast:p,localizeErrors:g}=A.useContext(ht);r={...m,...r};const y=oe({email:M().email({message:`${r.EMAIL} ${r.IS_INVALID}`})}),b=ra({resolver:oa(y),defaultValues:{email:""}});n=n||b.formState.isSubmitting,A.useEffect(()=>{a?.(b.formState.isSubmitting)},[b.formState.isSubmitting,a]);async function S({email:w}){const x={throw:!0,headers:await d("/email-otp/send-verification-otp")};try{await f.emailOtp.sendVerificationOtp({email:w,type:"sign-in",fetchOptions:x}),p({variant:"success",message:r.EMAIL_OTP_VERIFICATION_SENT}),i(w)}catch(E){p({variant:"error",message:hn({error:E,localization:r,localizeErrors:g})})}}return R.jsx(sa,{...b,children:R.jsxs("form",{onSubmit:b.handleSubmit(S),noValidate:c,className:Ce("grid w-full gap-6",e,t?.base),children:[R.jsx(un,{control:b.control,name:"email",render:({field:w})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:r.EMAIL}),R.jsx(Sn,{children:R.jsx(Po,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...w})}),R.jsx(An,{className:t?.error})]})}),R.jsx(Ad,{ref:u,localization:r,action:"/email-otp/send-verification-otp"}),R.jsx(Ht,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?R.jsx(or,{className:"animate-spin"}):r.EMAIL_OTP_SEND_ACTION})]})})}function _Y({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:c,email:u}){const{authClient:d,localization:f,toast:m,localizeErrors:p}=A.useContext(ht);r={...f,...r};const{onSuccess:g,isPending:y}=ia({redirectTo:i}),b=oe({code:M().min(1,{message:`${r.EMAIL_OTP} ${r.IS_REQUIRED}`}).min(6,{message:`${r.EMAIL_OTP} ${r.IS_INVALID}`})}),S=ra({resolver:oa(b),defaultValues:{code:""}});n=n||S.formState.isSubmitting||y,A.useEffect(()=>{c?.(S.formState.isSubmitting||y)},[S.formState.isSubmitting,y,c]);async function w({code:x}){try{await d.signIn.emailOtp({email:u,otp:x,fetchOptions:{throw:!0}}),await g()}catch(E){m({variant:"error",message:hn({error:E,localization:r,localizeErrors:p})}),S.reset()}}return R.jsx(sa,{...S,children:R.jsxs("form",{onSubmit:S.handleSubmit(w),className:Ce("grid w-full gap-6",e,t?.base),children:[R.jsx(un,{control:S.control,name:"code",render:({field:x})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:r.EMAIL_OTP}),R.jsx(Sn,{children:R.jsx(E1,{...x,maxLength:6,onChange:E=>{x.onChange(E),E.length===6&&S.handleSubmit(w)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:R.jsx(R1,{otpSeparators:a})})}),R.jsx(An,{className:t?.error})]})}),R.jsx("div",{className:"grid gap-4",children:R.jsxs(Ht,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:[n&&R.jsx(or,{className:"animate-spin"}),r.EMAIL_OTP_VERIFY_ACTION]})})]})})}function bY({onCancel:e,localization:t,className:n,classNames:r,otpSeparators:a,callbackURL:i,isSubmitting:c,redirectTo:u,setIsSubmitting:d}){const[f,m]=A.useState(!0),[p,g]=A.useState(30),{authClient:y,localization:b,toast:S,localizeErrors:w,navigate:x,basePath:E,viewPaths:T}=A.useContext(ht);t={...b,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:C,isPending:I}=ia({redirectTo:u}),N=oe({code:M().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=ra({resolver:oa(N),defaultValues:{code:""}}),z=c||D.formState.isSubmitting||I;A.useEffect(()=>{d?.(D.formState.isSubmitting||I)},[D.formState.isSubmitting,I,d]),A.useEffect(()=>{if(p>0){const G=setTimeout(()=>g(p-1),1e3);return()=>clearTimeout(G)}else m(!1)},[p]);async function W({code:G}){try{const U=await y.emailOtp.verifyEmail({email:O,otp:G,fetchOptions:{throw:!0}});"token"in U&&U.token?await C():(x(`${E}/${T.SIGN_IN}${window.location.search}`),S({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(U){S({variant:"error",message:hn({error:U,localization:t,localizeErrors:w})}),D.reset()}}async function V(){if(!f){m(!0),g(30);try{await y.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),S({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(G){S({variant:"error",message:hn({error:G,localization:t,localizeErrors:w})}),m(!1),g(0)}}}return O?R.jsx(sa,{...D,children:R.jsxs("form",{onSubmit:D.handleSubmit(W),className:Ce("grid w-full gap-6",n,r?.base),children:[R.jsx(un,{control:D.control,name:"code",render:({field:G})=>R.jsxs(dn,{children:[R.jsx(fn,{className:r?.label,children:t.EMAIL_OTP}),R.jsx(Sn,{children:R.jsx(E1,{...G,maxLength:6,onChange:U=>{G.onChange(U),U.length===6&&D.handleSubmit(W)()},containerClassName:r?.otpInputContainer,className:r?.otpInput,disabled:z,children:R.jsx(R1,{otpSeparators:a})})}),R.jsx(An,{className:r?.error})]})}),R.jsxs("div",{className:"grid gap-4",children:[R.jsxs(Ht,{type:"submit",disabled:z,className:Ce(r?.button,r?.primaryButton),children:[z&&R.jsx(or,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),R.jsx(Ht,{type:"button",variant:"outline",onClick:V,disabled:f||z,className:Ce("w-full",r?.button),children:f?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&R.jsx(Ht,{type:"button",variant:"ghost",onClick:e,disabled:z,className:"w-full",children:t.CANCEL})]})]})}):R.jsx("div",{className:Ce("grid w-full gap-6",n),children:R.jsxs("div",{className:"text-center",children:[R.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),R.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function wY({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a}){const i=Ua(),{captchaRef:c,getCaptchaHeaders:u,resetCaptcha:d}=Cd({localization:r}),{authClient:f,basePath:m,baseURL:p,localization:g,navigate:y,toast:b,viewPaths:S,localizeErrors:w}=A.useContext(ht);r={...g,...r};const x=oe({email:M().email({message:`${r.EMAIL} ${r.IS_INVALID}`}).min(1,{message:`${r.EMAIL} ${r.IS_REQUIRED}`})}),E=ra({resolver:oa(x),defaultValues:{email:""}});n=n||E.formState.isSubmitting,A.useEffect(()=>{a?.(E.formState.isSubmitting)},[E.formState.isSubmitting,a]);async function T({email:O}){try{const C={throw:!0,headers:await u("/forget-password")};await f.requestPasswordReset({email:O,redirectTo:`${p}${m}/${S.RESET_PASSWORD}`,fetchOptions:C}),b({variant:"success",message:r.FORGOT_PASSWORD_EMAIL}),y(`${m}/${S.SIGN_IN}${window.location.search}`)}catch(C){b({variant:"error",message:hn({error:C,localization:r,localizeErrors:w})}),d()}}return R.jsx(sa,{...E,children:R.jsxs("form",{onSubmit:E.handleSubmit(T),noValidate:i,className:Ce("grid w-full gap-6",e,t?.base),children:[R.jsx(un,{control:E.control,name:"email",render:({field:O})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:r.EMAIL}),R.jsx(Sn,{children:R.jsx(Po,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...O})}),R.jsx(An,{className:t?.error})]})}),R.jsx(Ad,{ref:c,localization:r,action:"/forget-password"}),R.jsx(Ht,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?R.jsx(or,{className:"animate-spin"}):r.FORGOT_PASSWORD_ACTION})]})})}function WO({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:c}){const u=Ua(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Cd({localization:a}),{authClient:p,basePath:g,baseURL:y,persistClient:b,localization:S,redirectTo:w,viewPaths:x,toast:E,localizeErrors:T}=A.useContext(ht);a={...S,...a};const O=A.useCallback(()=>i||Vi("redirectTo")||w,[i,w]),C=A.useCallback(()=>`${y}${n||(b?`${g}/${x.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,b,g,x,y,O]),I=oe({email:M().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),N=ra({resolver:oa(I),defaultValues:{email:""}});r=r||N.formState.isSubmitting,A.useEffect(()=>{c?.(N.formState.isSubmitting)},[N.formState.isSubmitting,c]);async function D({email:z}){try{const W={throw:!0,headers:await f("/sign-in/magic-link")};await p.signIn.magicLink({email:z,callbackURL:C(),fetchOptions:W}),E({variant:"success",message:a.MAGIC_LINK_EMAIL}),N.reset()}catch(W){E({variant:"error",message:hn({error:W,localization:a,localizeErrors:T})}),m()}}return R.jsx(sa,{...N,children:R.jsxs("form",{onSubmit:N.handleSubmit(D),noValidate:u,className:Ce("grid w-full gap-6",e,t?.base),children:[R.jsx(un,{control:N.control,name:"email",render:({field:z})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:a.EMAIL}),R.jsx(Sn,{children:R.jsx(Po,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...z})}),R.jsx(An,{className:t?.error})]})}),R.jsx(Ad,{ref:d,localization:a,action:"/sign-in/magic-link"}),R.jsx(Ht,{type:"submit",disabled:r,className:Ce("w-full",t?.button,t?.primaryButton),children:r?R.jsx(or,{className:"animate-spin"}):a.MAGIC_LINK_ACTION})]})})}function SY({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i}){const{authClient:c,localization:u,toast:d,localizeErrors:f}=A.useContext(ht);r={...u,...r};const{onSuccess:m,isPending:p}=ia({redirectTo:a}),g=oe({code:M().min(1,{message:r.BACKUP_CODE_REQUIRED})}),y=ra({resolver:oa(g),defaultValues:{code:""}});n=n||y.formState.isSubmitting||p,A.useEffect(()=>{i?.(y.formState.isSubmitting||p)},[y.formState.isSubmitting,p,i]);async function b({code:S}){try{await c.twoFactor.verifyBackupCode({code:S,fetchOptions:{throw:!0}}),await m()}catch(w){d({variant:"error",message:hn({error:w,localization:r,localizeErrors:f})}),y.reset()}}return R.jsx(sa,{...y,children:R.jsxs("form",{onSubmit:y.handleSubmit(b),className:Ce("grid gap-6",e,t?.base),children:[R.jsx(un,{control:y.control,name:"code",render:({field:S})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:r.BACKUP_CODE}),R.jsx(Sn,{children:R.jsx(Po,{placeholder:r.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...S})}),R.jsx(An,{className:t?.error})]})}),R.jsx(Ht,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:n?R.jsx(or,{className:"animate-spin"}):r.RECOVER_ACCOUNT_ACTION})]})})}function EY({className:e,classNames:t,localization:n,passwordValidation:r}){const a=A.useRef(!1),{authClient:i,basePath:c,credentials:u,localization:d,viewPaths:f,navigate:m,toast:p,localizeErrors:g}=A.useContext(ht),y=u?.confirmPassword,b=u?.passwordValidation;n={...d,...n},r={...b,...r};const S=oe({newPassword:nd(r,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:y?nd(r,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):M().optional()}).refine(T=>!y||T.newPassword===T.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),w=ra({resolver:oa(S),defaultValues:{newPassword:"",confirmPassword:""}}),x=w.formState.isSubmitting;A.useEffect(()=>{if(a.current)return;a.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(m(`${c}/${f.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[c,m,p,f,n]);async function E({newPassword:T}){try{const C=new URLSearchParams(window.location.search).get("token");await i.resetPassword({newPassword:T,token:C,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),m(`${c}/${f.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:hn({error:O,localization:n,localizeErrors:g})}),w.reset()}}return R.jsx(sa,{...w,children:R.jsxs("form",{onSubmit:w.handleSubmit(E),className:Ce("grid w-full gap-6",e,t?.base),children:[R.jsx(un,{control:w.control,name:"newPassword",render:({field:T})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:n.NEW_PASSWORD}),R.jsx(Sn,{children:R.jsx(ld,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:x,...T})}),R.jsx(An,{className:t?.error})]})}),y&&R.jsx(un,{control:w.control,name:"confirmPassword",render:({field:T})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:n.CONFIRM_PASSWORD}),R.jsx(Sn,{children:R.jsx(ld,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:x,...T})}),R.jsx(An,{className:t?.error})]})}),R.jsx(Ht,{type:"submit",disabled:x,className:Ce("w-full",t?.button,t?.primaryButton),children:x?R.jsx(or,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function RY({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i,passwordValidation:c}){const u=Ua(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Cd({localization:r}),{authClient:p,basePath:g,credentials:y,localization:b,viewPaths:S,navigate:w,toast:x,Link:E,localizeErrors:T,emailVerification:O}=A.useContext(ht),C=y?.rememberMe,I=y?.username,N=y?.passwordValidation;r={...b,...r},c={...N,...c};const{onSuccess:D,isPending:z}=ia({redirectTo:a}),W=oe({email:I?M().min(1,{message:`${r.USERNAME} ${r.IS_REQUIRED}`}):M().email({message:`${r.EMAIL} ${r.IS_INVALID}`}),password:nd(c,r),rememberMe:We().optional()}),V=ra({resolver:oa(W),defaultValues:{email:"",password:"",rememberMe:!C}});n=n||V.formState.isSubmitting||z,A.useEffect(()=>{i?.(V.formState.isSubmitting||z)},[V.formState.isSubmitting,z,i]);async function G({email:U,password:J,rememberMe:ie}){var F;try{let X={};if(I&&!xz(U)){const ae={throw:!0,headers:await f("/sign-in/username")};X=await p.signIn.username({username:U,password:J,rememberMe:ie,fetchOptions:ae})}else{const ae={throw:!0,headers:await f("/sign-in/email")};X=await p.signIn.email({email:U,password:J,rememberMe:ie,fetchOptions:ae})}X.twoFactorRedirect?w(`${g}/${S.TWO_FACTOR}${window.location.search}`):await D()}catch(X){V.resetField("password"),m(),x({variant:"error",message:hn({error:X,localization:r,localizeErrors:T})}),O?.otp&&((F=X?.error)==null?void 0:F.code)==="EMAIL_NOT_VERIFIED"&&w(`${g}/${S.EMAIL_VERIFICATION}?email=${encodeURIComponent(U)}`)}}return R.jsx(sa,{...V,children:R.jsxs("form",{onSubmit:V.handleSubmit(G),noValidate:u,className:Ce("grid w-full gap-6",e,t?.base),children:[R.jsx(un,{control:V.control,name:"email",render:({field:U})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:I?r.USERNAME:r.EMAIL}),R.jsx(Sn,{children:R.jsx(Po,{autoComplete:I?"username":"email",className:t?.input,type:I?"text":"email",placeholder:I?r.SIGN_IN_USERNAME_PLACEHOLDER:r.EMAIL_PLACEHOLDER,disabled:n,...U})}),R.jsx(An,{className:t?.error})]})}),R.jsx(un,{control:V.control,name:"password",render:({field:U})=>R.jsxs(dn,{children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx(fn,{className:t?.label,children:r.PASSWORD}),y?.forgotPassword&&R.jsx(E,{className:Ce("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${S.FORGOT_PASSWORD}${u?window.location.search:""}`,children:r.FORGOT_PASSWORD_LINK})]}),R.jsx(Sn,{children:R.jsx(ld,{autoComplete:"current-password",className:t?.input,placeholder:r.PASSWORD_PLACEHOLDER,disabled:n,...U})}),R.jsx(An,{className:t?.error})]})}),C&&R.jsx(un,{control:V.control,name:"rememberMe",render:({field:U})=>R.jsxs(dn,{className:"flex",children:[R.jsx(Sn,{children:R.jsx(S1,{checked:U.value,onCheckedChange:U.onChange,disabled:n})}),R.jsx(fn,{children:r.REMEMBER_ME})]})}),R.jsx(Ad,{ref:d,localization:r,action:"/sign-in/email"}),R.jsx(Ht,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?R.jsx(or,{className:"animate-spin"}):r.SIGN_IN_ACTION})]})})}function xY({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:c,passwordValidation:u}){const d=Ua(),{captchaRef:f,getCaptchaHeaders:m,resetCaptcha:p}=Cd({localization:a}),{additionalFields:g,authClient:y,basePath:b,baseURL:S,credentials:w,localization:x,nameRequired:E,persistClient:T,redirectTo:O,signUp:C,viewPaths:I,navigate:N,toast:D,avatar:z,localizeErrors:W,emailVerification:V}=A.useContext(ht),G=w?.confirmPassword,U=w?.username,J=w?.usernameRequired??!0,ie=w?.passwordValidation,F=C?.fields;a={...x,...a},u={...ie,...u};const X=A.useRef(null),[ae,fe]=A.useState(null),[K,P]=A.useState(!1),q=A.useCallback(()=>i||Vi("redirectTo")||O,[i,O]),B=A.useCallback(()=>`${S}${n||(T?`${b}/${I.CALLBACK}?redirectTo=${encodeURIComponent(q())}`:q())}`,[n,T,b,I,S,q]),{onSuccess:L,isPending:$}=ia({redirectTo:i}),Q={email:M().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:nd(u,a),name:F?.includes("name")&&E?M().min(1,{message:`${a.NAME} ${a.IS_REQUIRED}`}):M().optional(),image:M().optional(),username:U&&J?M().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):M().optional(),confirmPassword:G?nd(u,{PASSWORD_REQUIRED:a.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:a.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:a.PASSWORD_TOO_LONG,INVALID_PASSWORD:a.INVALID_PASSWORD}):M().optional()},me={};if(F)for(const ce of F){if(ce==="name"||ce==="image")continue;const Oe=g?.[ce];if(!Oe)continue;let je;Oe.type==="number"?je=Oe.required?kb(Ye=>Ye?Number(Ye):void 0,$e({message:`${Oe.label} ${a.IS_INVALID}`})):fk({message:`${Oe.label} ${a.IS_INVALID}`}).optional():Oe.type==="boolean"?je=Oe.required?yT({message:`${Oe.label} ${a.IS_INVALID}`}).refine(Ye=>Ye===!0,{message:`${Oe.label} ${a.IS_REQUIRED}`}):yT({message:`${Oe.label} ${a.IS_INVALID}`}).optional():je=Oe.required?M().min(1,`${Oe.label} ${a.IS_REQUIRED}`):M().optional(),me[ce]=je}const ye=oe(Q).extend(me).refine(ce=>G?ce.password===ce.confirmPassword:!0,{message:a.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Ae={email:"",password:"",...G&&{confirmPassword:""},...F?.includes("name")?{name:""}:{},...U?{username:""}:{},...F?.includes("image")&&z?{image:""}:{}};if(F)for(const ce of F){if(ce==="name"||ce==="image")continue;const Oe=g?.[ce];Oe&&(Ae[ce]=Oe.type==="boolean"?!1:"")}const ke=ra({resolver:oa(ye),defaultValues:Ae});r=r||ke.formState.isSubmitting||$,A.useEffect(()=>{c?.(ke.formState.isSubmitting||$)},[ke.formState.isSubmitting,$,c]);const H=async ce=>{if(z){P(!0);try{const Oe=await NW(ce,crypto.randomUUID(),z.size,z.extension);let je;z.upload?je=await z.upload(Oe):je=await PW(Oe),je?(fe(je),ke.setValue("image",je)):(fe(null),ke.setValue("image",""))}catch(Oe){console.error(Oe),D({variant:"error",message:hn({error:Oe,localization:a,localizeErrors:W})})}P(!1)}},ne=()=>{fe(null),ke.setValue("image","")},_e=()=>{var ce;return(ce=X.current)==null?void 0:ce.click()};async function pe({email:ce,password:Oe,name:je,username:Ye,confirmPassword:He,image:Xe,...Z}){try{for(const[Te,Re]of Object.entries(Z)){const Ne=g?.[Te];if(Ne?.validate&&typeof Re=="string"&&!await Ne.validate(Re)){ke.setError(Te,{message:`${Ne.label} ${a.IS_INVALID}`});return}}const te={throw:!0,headers:await m("/sign-up/email")},re={};Ye!==void 0&&(!J&&(Ye===null||Ye===""||typeof Ye=="string"&&Ye.trim()==="")||(re.username=Ye)),Xe!==void 0&&(re.image=Xe);const Se=await y.signUp.email({email:ce,password:Oe,name:je||"",...re,...Z,callbackURL:B(),fetchOptions:te});"token"in Se&&Se.token?await L():V?.otp?N(`${b}/${I.EMAIL_VERIFICATION}?email=${encodeURIComponent(ce)}`):(N(`${b}/${I.SIGN_IN}${window.location.search}`),D({variant:"success",message:a.SIGN_UP_EMAIL}))}catch(te){D({variant:"error",message:hn({error:te,localization:a,localizeErrors:W})}),ke.resetField("password"),ke.resetField("confirmPassword"),p()}}return R.jsx(sa,{...ke,children:R.jsxs("form",{onSubmit:ke.handleSubmit(pe),noValidate:d,className:Ce("grid w-full gap-6",e,t?.base),children:[F?.includes("image")&&z&&R.jsxs(R.Fragment,{children:[R.jsx("input",{ref:X,accept:"image/*",disabled:K,hidden:!0,type:"file",onChange:ce=>{var Oe;const je=(Oe=ce.target.files)==null?void 0:Oe.item(0);je&&H(je),ce.target.value=""}}),R.jsx(un,{control:ke.control,name:"image",render:()=>R.jsxs(dn,{children:[R.jsx(fn,{children:a.AVATAR}),R.jsxs("div",{className:"flex items-center gap-4",children:[R.jsxs(DW,{children:[R.jsx(LW,{asChild:!0,children:R.jsx(Ht,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:R.jsx(zW,{isPending:K,className:"size-16",user:ae?{name:ke.watch("name"),email:ke.watch("email"),image:ae}:null,localization:a})})}),R.jsxs(jW,{align:"start",onCloseAutoFocus:ce=>ce.preventDefault(),children:[R.jsxs(ZO,{onClick:_e,disabled:K,children:[R.jsx(KV,{}),a.UPLOAD_AVATAR]}),ae&&R.jsxs(ZO,{onClick:ne,disabled:K,variant:"destructive",children:[R.jsx(eF,{}),a.DELETE_AVATAR]})]})]}),R.jsxs(Ht,{type:"button",variant:"outline",onClick:_e,disabled:K,children:[K&&R.jsx(or,{className:"animate-spin"}),a.UPLOAD]})]}),R.jsx(An,{})]})})]}),F?.includes("name")&&R.jsx(un,{control:ke.control,name:"name",render:({field:ce})=>R.jsxs(dn,{children:[R.jsxs(fn,{className:t?.label,children:[a.NAME,!E&&R.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),R.jsx(Sn,{children:R.jsx(Po,{autoComplete:"name",className:t?.input,placeholder:a.NAME_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),R.jsx(An,{className:t?.error})]})}),U&&R.jsx(un,{control:ke.control,name:"username",render:({field:ce})=>R.jsxs(dn,{children:[R.jsxs(fn,{className:t?.label,children:[a.USERNAME,!J&&R.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),R.jsx(Sn,{children:R.jsx(Po,{autoComplete:"username",className:t?.input,placeholder:a.USERNAME_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),R.jsx(An,{className:t?.error})]})}),R.jsx(un,{control:ke.control,name:"email",render:({field:ce})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:a.EMAIL}),R.jsx(Sn,{children:R.jsx(Po,{autoComplete:"email",className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),R.jsx(An,{className:t?.error})]})}),R.jsx(un,{control:ke.control,name:"password",render:({field:ce})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:a.PASSWORD}),R.jsx(Sn,{children:R.jsx(ld,{autoComplete:"new-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ce,value:ce.value})}),R.jsx(An,{className:t?.error})]})}),G&&R.jsx(un,{control:ke.control,name:"confirmPassword",render:({field:ce})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:a.CONFIRM_PASSWORD}),R.jsx(Sn,{children:R.jsx(ld,{autoComplete:"new-password",className:t?.input,placeholder:a.CONFIRM_PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ce,value:ce.value})}),R.jsx(An,{className:t?.error})]})}),F?.filter(ce=>ce!=="name"&&ce!=="image").map(ce=>{const Oe=g?.[ce];return Oe?Oe.type==="boolean"?R.jsx(un,{control:ke.control,name:ce,render:({field:je})=>R.jsxs(dn,{className:"flex",children:[R.jsx(Sn,{children:R.jsx(S1,{checked:je.value,onCheckedChange:je.onChange,disabled:r})}),R.jsx(fn,{className:t?.label,children:Oe.label}),R.jsx(An,{className:t?.error})]})},ce):R.jsx(un,{control:ke.control,name:ce,render:({field:je})=>R.jsxs(dn,{children:[R.jsx(fn,{className:t?.label,children:Oe.label}),R.jsx(Sn,{children:Oe.type==="number"?R.jsx(Po,{className:t?.input,type:"number",placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...je,value:je.value}):Oe.multiline?R.jsx(FW,{className:t?.input,placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...je,value:je.value}):R.jsx(Po,{className:t?.input,type:"text",placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...je,value:je.value})}),R.jsx(An,{className:t?.error})]})},ce):(console.error(`Additional field ${ce} not found`),null)}),R.jsx(Ad,{ref:f,localization:a,action:"/sign-up/email"}),R.jsx(Ht,{type:"submit",disabled:r,className:Ce("w-full",t?.button,t?.primaryButton),children:r?R.jsx(or,{className:"animate-spin"}):a.SIGN_UP_ACTION})]})})}function TY({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:c}){var u;const d=Ua(),f=d?Vi("totpURI"):null,m=A.useRef(!1),{authClient:p,basePath:g,hooks:{useSession:y},localization:b,twoFactor:S,viewPaths:w,toast:x,Link:E,localizeErrors:T}=A.useContext(ht);r={...b,...r};const{onSuccess:O,isPending:C}=ia({redirectTo:i}),{data:I}=y(),N=(u=I?.user)==null?void 0:u.twoFactorEnabled,[D,z]=A.useState(S?.length===1?S[0]:null),[W,V]=A.useState(!1),[G,U]=A.useState(0),J=oe({code:M().min(1,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_REQUIRED}`}).min(6,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_INVALID}`}),trustDevice:We().optional()}),ie=ra({resolver:oa(J),defaultValues:{code:""}});n=n||ie.formState.isSubmitting||C,A.useEffect(()=>{c?.(ie.formState.isSubmitting||C)},[ie.formState.isSubmitting,C,c]),A.useEffect(()=>{D==="otp"&&G<=0&&!m.current&&(m.current=!0,F())},[D]),A.useEffect(()=>{if(G<=0)return;const ae=setTimeout(()=>{U(fe=>fe-1)},1e3);return()=>clearTimeout(ae)},[G]);const F=async()=>{if(!(W||G>0)){try{V(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),U(60)}catch(ae){x({variant:"error",message:hn({error:ae,localization:r,localizeErrors:T})}),ae.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}m.current=!1,V(!1)}};async function X({code:ae,trustDevice:fe}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:ae,trustDevice:fe,fetchOptions:{throw:!0}}),await O(),I&&!N&&x({variant:"success",message:r?.TWO_FACTOR_ENABLED})}catch(K){x({variant:"error",message:hn({error:K,localization:r,localizeErrors:T})}),ie.reset()}}return R.jsx(sa,{...ie,children:R.jsxs("form",{onSubmit:ie.handleSubmit(X),className:Ce("grid w-full gap-6",e,t?.base),children:[S?.includes("totp")&&f&&D==="totp"&&R.jsxs("div",{className:"space-y-3",children:[R.jsx(yM,{className:t?.label,children:r.TWO_FACTOR_TOTP_LABEL}),R.jsx(xW,{className:Ce("border shadow-xs",t?.qrCode),value:f})]}),D!==null&&R.jsxs(R.Fragment,{children:[R.jsx(un,{control:ie.control,name:"code",render:({field:ae})=>R.jsxs(dn,{children:[R.jsxs("div",{className:"flex items-center justify-between",children:[R.jsx(fn,{className:t?.label,children:r.ONE_TIME_PASSWORD}),R.jsx(E,{className:Ce("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${w.RECOVER_ACCOUNT}${d?window.location.search:""}`,children:r.FORGOT_AUTHENTICATOR})]}),R.jsx(Sn,{children:R.jsx(E1,{...ae,maxLength:6,onChange:fe=>{ae.onChange(fe),fe.length===6&&ie.handleSubmit(X)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:R.jsx(R1,{otpSeparators:a})})}),R.jsx(An,{className:t?.error})]})}),R.jsx(un,{control:ie.control,name:"trustDevice",render:({field:ae})=>R.jsxs(dn,{className:"flex",children:[R.jsx(Sn,{children:R.jsx(S1,{checked:ae.value,onCheckedChange:ae.onChange,disabled:n,className:t?.checkbox})}),R.jsx(fn,{className:t?.label,children:r.TRUST_DEVICE})]})})]}),R.jsxs("div",{className:"grid gap-4",children:[D!==null&&R.jsxs(Ht,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:[n&&R.jsx(or,{className:"animate-spin"}),r.TWO_FACTOR_ACTION]}),D==="otp"&&S?.includes("otp")&&R.jsxs(Ht,{type:"button",variant:"outline",onClick:F,disabled:G>0||W||n,className:Ce(t?.button,t?.outlineButton),children:[W?R.jsx(or,{className:"animate-spin"}):R.jsx(TT,{className:t?.icon}),r.RESEND_CODE,G>0&&` (${G})`]}),D!=="otp"&&S?.includes("otp")&&R.jsxs(Ht,{type:"button",variant:"secondary",className:Ce(t?.button,t?.secondaryButton),onClick:()=>z("otp"),disabled:n,children:[R.jsx(TT,{className:t?.icon}),r.SEND_VERIFICATION_CODE]}),D!=="totp"&&S?.includes("totp")&&R.jsxs(Ht,{type:"button",variant:"secondary",className:Ce(t?.button,t?.secondaryButton),onClick:()=>z("totp"),disabled:n,children:[R.jsx(JV,{className:t?.icon}),r.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function TM({redirectTo:e}){const t=A.useRef(!1),{authClient:n,basePath:r,viewPaths:a}=A.useContext(ht),{onSuccess:i}=ia({redirectTo:e||`${r}/${a.SIGN_IN}`});return A.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(i))},[n,i]),R.jsx(or,{className:"animate-spin"})}function OY({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,pathname:i,redirectTo:c,view:u,otpSeparators:d=0,setIsSubmitting:f}){const{basePath:m,credentials:p,localization:g,magicLink:y,emailOTP:b,signUp:S,twoFactor:w,viewPaths:x,replace:E}=A.useContext(ht),T=!!S;if(a={...g,...a},A.useEffect(()=>{i&&!l_(x,i)&&(console.error(`Invalid auth view: ${i}`),E(`${m}/${x.SIGN_IN}${window.location.search}`))},[i,x,m,E]),u=u||l_(x,i)||"SIGN_IN",A.useEffect(()=>{let O=!1;u==="MAGIC_LINK"&&(!y||!p&&!b)&&(O=!0),u==="EMAIL_OTP"&&(!b||!p&&!y)&&(O=!0),u==="SIGN_UP"&&!T&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&!w&&(O=!0),O&&E(`${m}/${x.SIGN_IN}${window.location.search}`)},[m,u,x,p,E,b,T,y,w]),u==="SIGN_OUT")return R.jsx(TM,{redirectTo:c});if(u==="CALLBACK")return R.jsx(xM,{redirectTo:c});if(u==="SIGN_IN")return p?R.jsx(RY,{className:e,classNames:t,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):y?R.jsx(WO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):b?R.jsx(KO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):null;if(u==="TWO_FACTOR")return R.jsx(TY,{className:e,classNames:t,localization:a,otpSeparators:d,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="RECOVER_ACCOUNT")return R.jsx(SY,{className:e,classNames:t,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="MAGIC_LINK")return R.jsx(WO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_OTP")return R.jsx(KO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_VERIFICATION")return R.jsx(bY,{className:e,classNames:t,callbackURL:n,localization:a,otpSeparators:d,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="FORGOT_PASSWORD")return R.jsx(wY,{className:e,classNames:t,localization:a,isSubmitting:r,setIsSubmitting:f});if(u==="RESET_PASSWORD")return R.jsx(EY,{className:e,classNames:t,localization:a});if(u==="SIGN_UP")return T&&R.jsx(xY,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f})}function CY({className:e,classNames:t,localization:n}){const{localization:r,redirectTo:a,replace:i,toast:c}=A.useContext(ht),u=A.useMemo(()=>({...r,...n}),[r,n]),{data:d}=IW(),[f,m]=A.useState(null);return A.useEffect(()=>{const p=Vi("invitationId");if(!p){c({variant:"error",message:u.INVITATION_NOT_FOUND}),i(a);return}m(p)},[u.INVITATION_NOT_FOUND,c,i,a]),!d||!f?R.jsx(OM,{className:e,classNames:t}):R.jsx(AY,{className:e,classNames:t,localization:u,invitationId:f})}function AY({className:e,classNames:t,localization:n,invitationId:r}){var a;const{authClient:i,hooks:{useInvitation:c},localization:u,organization:d,redirectTo:f,replace:m,toast:p,localizeErrors:g}=A.useContext(ht),y=A.useMemo(()=>({...u,...n}),[u,n]),[b,S]=A.useState(!1),[w,x]=A.useState(!1),E=b||w,{data:T,isPending:O}=c({query:{id:r}}),C=A.useCallback(()=>Vi("redirectTo")||f,[f]);A.useEffect(()=>{if(!(O||!r)){if(!T){p({variant:"error",message:y.INVITATION_NOT_FOUND}),m(f);return}(T.status!=="pending"||new Date(T.expiresAt)<new Date)&&(p({variant:"error",message:new Date(T.expiresAt)<new Date?y.INVITATION_EXPIRED:y.INVITATION_NOT_FOUND}),m(f))}},[T,O,r,y,p,m,f]);const I=async()=>{x(!0);try{await i.organization.acceptInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_ACCEPTED||"Invitation accepted"}),m(C())}catch(V){p({variant:"error",message:hn({error:V,localization:y,localizeErrors:g})}),x(!1)}},N=async()=>{S(!0);try{await i.organization.rejectInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_REJECTED}),m(f)}catch(V){p({variant:"error",message:hn({error:V,localization:y,localizeErrors:g})}),S(!1)}},W=((a=[...[{role:"owner",label:y.OWNER},{role:"admin",label:y.ADMIN},{role:"member",label:y.MEMBER}],...d?.customRoles||[]].find(V=>V.role===T?.role))==null?void 0:a.label)||T?.role;return T?R.jsxs(cd,{className:Ce("w-full max-w-sm",e,t?.base),children:[R.jsxs(_1,{className:Ce("justify-items-center text-center",t?.header),children:[R.jsx(gM,{className:Ce("text-lg md:text-xl",t?.title),children:y.ACCEPT_INVITATION}),R.jsx(vM,{className:Ce("text-xs md:text-sm",t?.description),children:y.ACCEPT_INVITATION_DESCRIPTION})]}),R.jsxs(b1,{className:Ce("flex flex-col gap-6 truncate",t?.content),children:[R.jsxs(cd,{className:Ce("flex-row items-center p-4"),children:[R.jsx(RM,{organization:{id:T.organizationId,name:T.organizationName,slug:T.organizationSlug,logo:T.organizationLogo,createdAt:new Date},localization:y}),R.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:W})]}),R.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[R.jsxs(Ht,{variant:"outline",className:Ce(t?.button,t?.outlineButton),onClick:N,disabled:E,children:[b?R.jsx(or,{className:"animate-spin"}):R.jsx(nF,{}),y.REJECT]}),R.jsxs(Ht,{className:Ce(t?.button,t?.primaryButton),onClick:I,disabled:E,children:[w?R.jsx(or,{className:"animate-spin"}):R.jsx(yk,{}),y.ACCEPT]})]})]})]}):R.jsx(OM,{className:e,classNames:t})}var OM=({className:e,classNames:t,localization:n})=>R.jsxs(cd,{className:Ce("w-full max-w-sm",e,t?.base),children:[R.jsxs(_1,{className:Ce("justify-items-center",t?.header),children:[R.jsx(Na,{className:Ce("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),R.jsx(Na,{className:Ce("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),R.jsxs(b1,{className:Ce("flex flex-col gap-6 truncate",t?.content),children:[R.jsxs(cd,{className:Ce("flex-row items-center p-4"),children:[R.jsx(RM,{isPending:!0,localization:n}),R.jsx(Na,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),R.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[R.jsx(Na,{className:"h-9 w-full"}),R.jsx(Na,{className:"h-9 w-full"})]})]})]});function YO({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return R.jsx(AW,{"data-slot":"separator",decorative:n,orientation:t,className:Ce("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function IY({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,c,u;const{viewPaths:d,navigate:f,basePath:m}=A.useContext(ht);return R.jsxs(Ht,{className:Ce("w-full",(a=e?.form)==null?void 0:a.button,(i=e?.form)==null?void 0:i.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="EMAIL_OTP"?d.SIGN_IN:d.EMAIL_OTP}${window.location.search}`),children:[r==="EMAIL_OTP"?R.jsx(_k,{className:(c=e?.form)==null?void 0:c.icon}):R.jsx(bk,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function kY({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,c,u;const{viewPaths:d,navigate:f,basePath:m,credentials:p}=A.useContext(ht);return R.jsxs(Ht,{className:Ce("w-full",(a=e?.form)==null?void 0:a.button,(i=e?.form)==null?void 0:i.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="MAGIC_LINK"||!p?d.SIGN_IN:d.MAGIC_LINK}${window.location.search}`),children:[r==="MAGIC_LINK"?R.jsx(_k,{className:(c=e?.form)==null?void 0:c.icon}):R.jsx(bk,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function NY({localization:e,redirectTo:t}){const{authClient:n,localization:r,toast:a,localizeErrors:i}=A.useContext(ht),c=A.useRef(!1);e=A.useMemo(()=>({...r,...e}),[r,e]);const{onSuccess:u}=ia({redirectTo:t});return A.useEffect(()=>{if(!c.current){c.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:u}})}catch(d){a({variant:"error",message:hn({error:d,localization:e,localizeErrors:i})})}}},[n,e,i,u,a]),null}function MY({classNames:e,isSubmitting:t,localization:n,redirectTo:r,setIsSubmitting:a}){var i,c;const{authClient:u,localization:d,toast:f,localizeErrors:m}=A.useContext(ht);n={...d,...n};const{onSuccess:p}=ia({redirectTo:r}),g=async()=>{a?.(!0);try{const y=await u.signIn.passkey({fetchOptions:{throw:!0}});y?.error?(f({variant:"error",message:hn({error:y.error,localization:n,localizeErrors:m})}),a?.(!1)):p()}catch(y){f({variant:"error",message:hn({error:y,localization:n,localizeErrors:m})}),a?.(!1)}};return R.jsxs(Ht,{className:Ce("w-full",(i=e?.form)==null?void 0:i.button,(c=e?.form)==null?void 0:c.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:g,children:[R.jsx(QV,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function QO({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,other:i,provider:c,redirectTo:u,socialLayout:d,setIsSubmitting:f}){var m,p,g,y;const{authClient:b,basePath:S,baseURL:w,persistClient:x,redirectTo:E,viewPaths:T,social:O,genericOAuth:C,toast:I,localizeErrors:N}=A.useContext(ht),D=A.useCallback(()=>u||Vi("redirectTo")||E,[u,E]),z=A.useCallback(()=>`${w}${n||(x?`${S}/${T.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,x,S,T,w,D]),W=async()=>{f(!0);try{if(i){const V={providerId:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};C?.signIn?(await C.signIn(V),setTimeout(()=>{f(!1)},1e4)):await b.signIn.oauth2(V)}else{const V={provider:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(V),setTimeout(()=>{f(!1)},1e4)):await b.signIn.social(V)}}catch(V){I({variant:"error",message:hn({error:V,localization:a,localizeErrors:N})}),f(!1)}};return R.jsxs(Ht,{className:Ce(d==="vertical"?"w-full":"grow",e,(m=t?.form)==null?void 0:m.button,(p=t?.form)==null?void 0:p.outlineButton,(g=t?.form)==null?void 0:g.providerButton),disabled:r,variant:"outline",onClick:W,children:[c.icon&&R.jsx(c.icon,{className:(y=t?.form)==null?void 0:y.icon}),d==="grid"&&c.name,d==="vertical"&&`${a.SIGN_IN_WITH} ${c.name}`]})}function Yoe({className:e,classNames:t,callbackURL:n,cardHeader:r,cardFooter:a,localization:i,path:c,pathname:u,redirectTo:d,socialLayout:f="auto",view:m,otpSeparators:p=0}){var g,y,b,S,w,x;const E=Ua(),{basePath:T,credentials:O,localization:C,magicLink:I,emailOTP:N,oneTap:D,passkey:z,signUp:W,social:V,genericOAuth:G,viewPaths:U,Link:J}=A.useContext(ht);i={...C,...i};let ie=f;ie==="auto"&&(ie=O&&V?.providers&&V.providers.length>2?"horizontal":"vertical");const F=c??u?.split("/").pop(),X=m||l_(U,F)||"SIGN_IN",[ae,fe]=A.useState(!1);if(A.useEffect(()=>{const P=()=>fe(!1);return window.addEventListener("pagehide",P),()=>{fe(!1),window.removeEventListener("pagehide",P)}},[]),X==="CALLBACK")return R.jsx(xM,{redirectTo:d});if(X==="SIGN_OUT")return R.jsx(TM,{redirectTo:d});if(X==="ACCEPT_INVITATION")return R.jsx(CY,{className:e,classNames:t});const K=!O&&!I&&!N?i.DISABLED_CREDENTIALS_DESCRIPTION:i[`${X}_DESCRIPTION`];return R.jsxs(cd,{className:Ce("w-full max-w-sm",e,t?.base),children:[R.jsx(_1,{className:t?.header,children:r||R.jsxs(R.Fragment,{children:[R.jsx(gM,{className:Ce("text-lg md:text-xl",t?.title),children:i[X]}),K&&R.jsx(vM,{className:Ce("text-xs md:text-sm",t?.description),children:K})]})}),R.jsxs(b1,{className:Ce("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(X)&&R.jsx(NY,{localization:i,redirectTo:d}),(O||I||N)&&R.jsxs("div",{className:"grid gap-4",children:[R.jsx(OY,{classNames:t?.form,callbackURL:n,isSubmitting:ae,localization:i,otpSeparators:p,view:X,redirectTo:d,setIsSubmitting:fe}),I&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(X)||N&&X==="EMAIL_OTP")&&R.jsx(kY,{classNames:t,localization:i,view:X,isSubmitting:ae}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(X)||I&&["SIGN_IN","MAGIC_LINK"].includes(X))&&R.jsx(IY,{classNames:t,localization:i,view:X,isSubmitting:ae})]}),X!=="RESET_PASSWORD"&&X!=="EMAIL_VERIFICATION"&&(((g=V?.providers)==null?void 0:g.length)||((y=G?.providers)==null?void 0:y.length)||X==="SIGN_IN"&&z)&&R.jsxs(R.Fragment,{children:[(O||I||N)&&R.jsxs("div",{className:Ce("flex items-center gap-2",t?.continueWith),children:[R.jsx(YO,{className:Ce("!w-auto grow",t?.separator)}),R.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:i.OR_CONTINUE_WITH}),R.jsx(YO,{className:Ce("!w-auto grow",t?.separator)})]}),R.jsxs("div",{className:"grid gap-4",children:[(((b=V?.providers)==null?void 0:b.length)||((S=G?.providers)==null?void 0:S.length))&&R.jsxs("div",{className:Ce("flex w-full items-center justify-between gap-4",ie==="horizontal"&&"flex-wrap",ie==="vertical"&&"flex-col",ie==="grid"&&"grid grid-cols-2"),children:[(w=V?.providers)==null?void 0:w.map(P=>{const q=fY.find(B=>B.provider===P);return q?R.jsx(QO,{classNames:t,callbackURL:n,isSubmitting:ae,localization:i,provider:q,redirectTo:d,setIsSubmitting:fe,socialLayout:ie},P):null}),(x=G?.providers)==null?void 0:x.map(P=>R.jsx(QO,{classNames:t,callbackURL:n,isSubmitting:ae,localization:i,provider:P,redirectTo:d,setIsSubmitting:fe,socialLayout:ie,other:!0},P.provider))]}),z&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(X)&&R.jsx(MY,{classNames:t,isSubmitting:ae,localization:i,redirectTo:d,setIsSubmitting:fe})]})]})]}),a&&R.jsx(GO,{className:t?.footer,children:a}),O&&W&&R.jsxs(GO,{className:Ce("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[X==="SIGN_IN"||X==="MAGIC_LINK"||X==="EMAIL_OTP"?i.DONT_HAVE_AN_ACCOUNT:X==="SIGN_UP"?i.ALREADY_HAVE_AN_ACCOUNT:R.jsx(GV,{className:"size-3"}),X==="SIGN_IN"||X==="MAGIC_LINK"||X==="EMAIL_OTP"||X==="SIGN_UP"?R.jsx(J,{className:Ce("text-foreground underline",t?.footerLink),href:`${T}/${U[X==="SIGN_IN"||X==="MAGIC_LINK"||X==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${E?window.location.search:""}`,children:R.jsx(Ht,{variant:"link",size:"sm",className:Ce("px-0 text-foreground underline",t?.footerLink),children:X==="SIGN_IN"||X==="MAGIC_LINK"||X==="EMAIL_OTP"?i.SIGN_UP:i.SIGN_IN})}):R.jsx(Ht,{variant:"link",size:"sm",className:Ce("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:i.GO_BACK})]})]})}function Qoe({children:e}){const{hooks:{useSession:t}}=A.useContext(ht),{isPending:n}=t();return n?e:null}function Xoe({children:e}){const{hooks:{useSession:t}}=A.useContext(ht),{data:n}=t();return n?e:null}function Joe({children:e}){const{hooks:{useSession:t}}=A.useContext(ht),{data:n,isPending:r}=t();return!n&&!r?e:null}function PY(e){const t=$i.c(8),{children:n}=e,r=wl();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={basePath:"/",pathMode:"slug"},t[0]=a):a=t[0];let i,c;t[1]!==r?(i=d=>r({to:d}),c=d=>r({to:d,replace:!0}),t[1]=r,t[2]=i,t[3]=c):(i=t[2],c=t[3]);let u;return t[4]!==n||t[5]!==i||t[6]!==c?(u=R.jsx(FV,{authClient:zA,redirectTo:"/",organization:a,navigate:i,replace:c,Link:DY,children:n}),t[4]=n,t[5]=i,t[6]=c,t[7]=u):u=t[7],u}function DY(e){const{href:t,className:n,children:r,...a}=e;return R.jsx(Tm,{to:t,className:n,...a,children:r})}const Li="org-admin",LY={from({org:e,project:t}){if(e?.includes("/")||t.includes("/"))throw new Error("Org or project cannot contain slashes");return`${e}/${t}`},parse(e){e.startsWith("/")&&(e=e.slice(1));const[t,n]=e.split("/");if(!t||!n)throw new Error("Invalid locator");return{org:t,project:n}},isOrgAdminProject(e){return e.split("/")[1]===Li},adminProject(e){return`${e}/${Li}`}},CM=A.createContext(void 0),eae=()=>{const e=A.useContext(CM);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},tae=e=>{const t=$i.c(10),{children:n,org:r,project:a}=e;let i;t[0]!==r.slug||t[1]!==a.slug?(i=LY.from({org:r.slug,project:a.slug}),t[0]=r.slug,t[1]=a.slug,t[2]=i):i=t[2];const c=i;let u;t[3]!==c||t[4]!==r||t[5]!==a?(u={org:r,project:a,locator:c},t[3]=c,t[4]=r,t[5]=a,t[6]=u):u=t[6];const d=u;let f;return t[7]!==n||t[8]!==d?(f=R.jsx(CM.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f};function Wm(e){return!!e._zod}function ws(e,t){return Wm(e)?uI(e,t):e.safeParse(t)}function AM(e){if(!e)return;let t;if(Wm(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function jY(e){if(Wm(e)){const i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}const n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const r=e.value;if(r!==void 0)return r}const Ym="2025-11-25",$Y=[Ym,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],bi="io.modelcontextprotocol/related-task",Qm="2.0",Yn=dk(e=>e!==null&&(typeof e=="object"||typeof e=="function")),IM=xt([M(),$e().int()]),kM=M();Wn({ttl:xt([$e(),vd()]).optional(),pollInterval:$e().optional()});const UY=oe({ttl:$e().optional()}),zY=oe({taskId:M()}),x1=Wn({progressToken:IM.optional(),[bi]:zY.optional()}),Qr=oe({_meta:x1.optional()}),Id=Qr.extend({task:UY.optional()}),VY=e=>Id.safeParse(e).success,Xn=oe({method:M(),params:Qr.loose().optional()}),yo=oe({_meta:x1.optional()}),_o=oe({method:M(),params:yo.loose().optional()}),Jn=Wn({_meta:x1.optional()}),Xm=xt([M(),$e().int()]),NM=oe({jsonrpc:Le(Qm),id:Xm,...Xn.shape}).strict(),D_=e=>NM.safeParse(e).success,MM=oe({jsonrpc:Le(Qm),..._o.shape}).strict(),FY=e=>MM.safeParse(e).success,T1=oe({jsonrpc:Le(Qm),id:Xm,result:Jn}).strict(),Pu=e=>T1.safeParse(e).success;var tt;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(tt||(tt={}));const O1=oe({jsonrpc:Le(Qm),id:Xm.optional(),error:oe({code:$e().int(),message:M(),data:Je().optional()})}).strict(),BY=e=>O1.safeParse(e).success,Zu=xt([NM,MM,T1,O1]);xt([T1,O1]);const Xc=Jn.strict(),qY=yo.extend({requestId:Xm.optional(),reason:M().optional()}),C1=_o.extend({method:Le("notifications/cancelled"),params:qY}),HY=oe({src:M(),mimeType:M().optional(),sizes:we(M()).optional(),theme:Tt(["light","dark"]).optional()}),kd=oe({icons:we(HY).optional()}),ml=oe({name:M(),title:M().optional()}),PM=ml.extend({...ml.shape,...kd.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),GY=yd(oe({applyDefaults:We().optional()}),at(M(),Je())),ZY=kb(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,yd(oe({form:GY.optional(),url:Yn.optional()}),at(M(),Je()).optional())),KY=Wn({list:Yn.optional(),cancel:Yn.optional(),requests:Wn({sampling:Wn({createMessage:Yn.optional()}).optional(),elicitation:Wn({create:Yn.optional()}).optional()}).optional()}),WY=Wn({list:Yn.optional(),cancel:Yn.optional(),requests:Wn({tools:Wn({call:Yn.optional()}).optional()}).optional()}),YY=oe({experimental:at(M(),Yn).optional(),sampling:oe({context:Yn.optional(),tools:Yn.optional()}).optional(),elicitation:ZY.optional(),roots:oe({listChanged:We().optional()}).optional(),tasks:KY.optional()}),QY=Qr.extend({protocolVersion:M(),capabilities:YY,clientInfo:PM}),XY=Xn.extend({method:Le("initialize"),params:QY}),JY=oe({experimental:at(M(),Yn).optional(),logging:Yn.optional(),completions:Yn.optional(),prompts:oe({listChanged:We().optional()}).optional(),resources:oe({subscribe:We().optional(),listChanged:We().optional()}).optional(),tools:oe({listChanged:We().optional()}).optional(),tasks:WY.optional()}),DM=Jn.extend({protocolVersion:M(),capabilities:JY,serverInfo:PM,instructions:M().optional()}),LM=_o.extend({method:Le("notifications/initialized"),params:yo.optional()}),eQ=e=>LM.safeParse(e).success,A1=Xn.extend({method:Le("ping"),params:Qr.optional()}),tQ=oe({progress:$e(),total:sn($e()),message:sn(M())}),nQ=oe({...yo.shape,...tQ.shape,progressToken:IM}),I1=_o.extend({method:Le("notifications/progress"),params:nQ}),rQ=Qr.extend({cursor:kM.optional()}),Nd=Xn.extend({params:rQ.optional()}),Md=Jn.extend({nextCursor:kM.optional()}),oQ=Tt(["working","input_required","completed","failed","cancelled"]),Pd=oe({taskId:M(),status:oQ,ttl:xt([$e(),vd()]),createdAt:M(),lastUpdatedAt:M(),pollInterval:sn($e()),statusMessage:sn(M())}),ud=Jn.extend({task:Pd}),aQ=yo.merge(Pd),rm=_o.extend({method:Le("notifications/tasks/status"),params:aQ}),k1=Xn.extend({method:Le("tasks/get"),params:Qr.extend({taskId:M()})}),N1=Jn.merge(Pd),M1=Xn.extend({method:Le("tasks/result"),params:Qr.extend({taskId:M()})});Jn.loose();const P1=Nd.extend({method:Le("tasks/list")}),D1=Md.extend({tasks:we(Pd)}),L1=Xn.extend({method:Le("tasks/cancel"),params:Qr.extend({taskId:M()})}),sQ=Jn.merge(Pd),jM=oe({uri:M(),mimeType:sn(M()),_meta:at(M(),Je()).optional()}),$M=jM.extend({text:M()}),j1=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),UM=jM.extend({blob:j1}),Dd=Tt(["user","assistant"]),xl=oe({audience:we(Dd).optional(),priority:$e().min(0).max(1).optional(),lastModified:ek({offset:!0}).optional()}),zM=oe({...ml.shape,...kd.shape,uri:M(),description:sn(M()),mimeType:sn(M()),annotations:xl.optional(),_meta:sn(Wn({}))}),iQ=oe({...ml.shape,...kd.shape,uriTemplate:M(),description:sn(M()),mimeType:sn(M()),annotations:xl.optional(),_meta:sn(Wn({}))}),cQ=Nd.extend({method:Le("resources/list")}),VM=Md.extend({resources:we(zM)}),lQ=Nd.extend({method:Le("resources/templates/list")}),FM=Md.extend({resourceTemplates:we(iQ)}),$1=Qr.extend({uri:M()}),uQ=$1,dQ=Xn.extend({method:Le("resources/read"),params:uQ}),BM=Jn.extend({contents:we(xt([$M,UM]))}),qM=_o.extend({method:Le("notifications/resources/list_changed"),params:yo.optional()}),fQ=$1,hQ=Xn.extend({method:Le("resources/subscribe"),params:fQ}),pQ=$1,mQ=Xn.extend({method:Le("resources/unsubscribe"),params:pQ}),gQ=yo.extend({uri:M()}),vQ=_o.extend({method:Le("notifications/resources/updated"),params:gQ}),yQ=oe({name:M(),description:sn(M()),required:sn(We())}),_Q=oe({...ml.shape,...kd.shape,description:sn(M()),arguments:sn(we(yQ)),_meta:sn(Wn({}))}),bQ=Nd.extend({method:Le("prompts/list")}),HM=Md.extend({prompts:we(_Q)}),wQ=Qr.extend({name:M(),arguments:at(M(),M()).optional()}),SQ=Xn.extend({method:Le("prompts/get"),params:wQ}),U1=oe({type:Le("text"),text:M(),annotations:xl.optional(),_meta:at(M(),Je()).optional()}),z1=oe({type:Le("image"),data:j1,mimeType:M(),annotations:xl.optional(),_meta:at(M(),Je()).optional()}),V1=oe({type:Le("audio"),data:j1,mimeType:M(),annotations:xl.optional(),_meta:at(M(),Je()).optional()}),EQ=oe({type:Le("tool_use"),name:M(),id:M(),input:at(M(),Je()),_meta:at(M(),Je()).optional()}),RQ=oe({type:Le("resource"),resource:xt([$M,UM]),annotations:xl.optional(),_meta:at(M(),Je()).optional()}),xQ=zM.extend({type:Le("resource_link")}),F1=xt([U1,z1,V1,xQ,RQ]),TQ=oe({role:Dd,content:F1}),GM=Jn.extend({description:M().optional(),messages:we(TQ)}),ZM=_o.extend({method:Le("notifications/prompts/list_changed"),params:yo.optional()}),OQ=oe({title:M().optional(),readOnlyHint:We().optional(),destructiveHint:We().optional(),idempotentHint:We().optional(),openWorldHint:We().optional()}),CQ=oe({taskSupport:Tt(["required","optional","forbidden"]).optional()}),KM=oe({...ml.shape,...kd.shape,description:M().optional(),inputSchema:oe({type:Le("object"),properties:at(M(),Yn).optional(),required:we(M()).optional()}).catchall(Je()),outputSchema:oe({type:Le("object"),properties:at(M(),Yn).optional(),required:we(M()).optional()}).catchall(Je()).optional(),annotations:OQ.optional(),execution:CQ.optional(),_meta:at(M(),Je()).optional()}),AQ=Nd.extend({method:Le("tools/list")}),B1=Md.extend({tools:we(KM)}),Jm=Jn.extend({content:we(F1).default([]),structuredContent:at(M(),Je()).optional(),isError:We().optional()});Jm.or(Jn.extend({toolResult:Je()}));const IQ=Id.extend({name:M(),arguments:at(M(),Je()).optional()}),kQ=Xn.extend({method:Le("tools/call"),params:IQ}),WM=_o.extend({method:Le("notifications/tools/list_changed"),params:yo.optional()}),NQ=oe({autoRefresh:We().default(!0),debounceMs:$e().int().nonnegative().default(300)}),YM=Tt(["debug","info","notice","warning","error","critical","alert","emergency"]),MQ=Qr.extend({level:YM}),PQ=Xn.extend({method:Le("logging/setLevel"),params:MQ}),DQ=yo.extend({level:YM,logger:M().optional(),data:Je()}),LQ=_o.extend({method:Le("notifications/message"),params:DQ}),jQ=oe({name:M().optional()}),$Q=oe({hints:we(jQ).optional(),costPriority:$e().min(0).max(1).optional(),speedPriority:$e().min(0).max(1).optional(),intelligencePriority:$e().min(0).max(1).optional()}),UQ=oe({mode:Tt(["auto","required","none"]).optional()}),zQ=oe({type:Le("tool_result"),toolUseId:M().describe("The unique identifier for the corresponding tool call."),content:we(F1).default([]),structuredContent:oe({}).loose().optional(),isError:We().optional(),_meta:at(M(),Je()).optional()}),VQ=sk("type",[U1,z1,V1]),om=sk("type",[U1,z1,V1,EQ,zQ]),FQ=oe({role:Dd,content:xt([om,we(om)]),_meta:at(M(),Je()).optional()}),BQ=Id.extend({messages:we(FQ),modelPreferences:$Q.optional(),systemPrompt:M().optional(),includeContext:Tt(["none","thisServer","allServers"]).optional(),temperature:$e().optional(),maxTokens:$e().int(),stopSequences:we(M()).optional(),metadata:Yn.optional(),tools:we(KM).optional(),toolChoice:UQ.optional()}),QM=Xn.extend({method:Le("sampling/createMessage"),params:BQ}),XM=Jn.extend({model:M(),stopReason:sn(Tt(["endTurn","stopSequence","maxTokens"]).or(M())),role:Dd,content:VQ}),JM=Jn.extend({model:M(),stopReason:sn(Tt(["endTurn","stopSequence","maxTokens","toolUse"]).or(M())),role:Dd,content:xt([om,we(om)])}),qQ=oe({type:Le("boolean"),title:M().optional(),description:M().optional(),default:We().optional()}),HQ=oe({type:Le("string"),title:M().optional(),description:M().optional(),minLength:$e().optional(),maxLength:$e().optional(),format:Tt(["email","uri","date","date-time"]).optional(),default:M().optional()}),GQ=oe({type:Tt(["number","integer"]),title:M().optional(),description:M().optional(),minimum:$e().optional(),maximum:$e().optional(),default:$e().optional()}),ZQ=oe({type:Le("string"),title:M().optional(),description:M().optional(),enum:we(M()),default:M().optional()}),KQ=oe({type:Le("string"),title:M().optional(),description:M().optional(),oneOf:we(oe({const:M(),title:M()})),default:M().optional()}),WQ=oe({type:Le("string"),title:M().optional(),description:M().optional(),enum:we(M()),enumNames:we(M()).optional(),default:M().optional()}),YQ=xt([ZQ,KQ]),QQ=oe({type:Le("array"),title:M().optional(),description:M().optional(),minItems:$e().optional(),maxItems:$e().optional(),items:oe({type:Le("string"),enum:we(M())}),default:we(M()).optional()}),XQ=oe({type:Le("array"),title:M().optional(),description:M().optional(),minItems:$e().optional(),maxItems:$e().optional(),items:oe({anyOf:we(oe({const:M(),title:M()}))}),default:we(M()).optional()}),JQ=xt([QQ,XQ]),eX=xt([WQ,YQ,JQ]),tX=xt([eX,qQ,HQ,GQ]),nX=Id.extend({mode:Le("form").optional(),message:M(),requestedSchema:oe({type:Le("object"),properties:at(M(),tX),required:we(M()).optional()})}),rX=Id.extend({mode:Le("url"),message:M(),elicitationId:M(),url:M().url()}),oX=xt([nX,rX]),eP=Xn.extend({method:Le("elicitation/create"),params:oX}),aX=yo.extend({elicitationId:M()}),sX=_o.extend({method:Le("notifications/elicitation/complete"),params:aX}),tP=Jn.extend({action:Tt(["accept","decline","cancel"]),content:kb(e=>e===null?void 0:e,at(M(),xt([M(),$e(),We(),we(M())])).optional())}),iX=oe({type:Le("ref/resource"),uri:M()}),cX=oe({type:Le("ref/prompt"),name:M()}),lX=Qr.extend({ref:xt([cX,iX]),argument:oe({name:M(),value:M()}),context:oe({arguments:at(M(),M()).optional()}).optional()}),uX=Xn.extend({method:Le("completion/complete"),params:lX}),nP=Jn.extend({completion:Wn({values:we(M()).max(100),total:sn($e().int()),hasMore:sn(We())})}),dX=oe({uri:M().startsWith("file://"),name:M().optional(),_meta:at(M(),Je()).optional()}),fX=Xn.extend({method:Le("roots/list"),params:Qr.optional()}),hX=Jn.extend({roots:we(dX)}),pX=_o.extend({method:Le("notifications/roots/list_changed"),params:yo.optional()});xt([A1,XY,uX,PQ,SQ,bQ,cQ,lQ,dQ,hQ,mQ,kQ,AQ,k1,M1,P1,L1]);xt([C1,I1,LM,pX,rm]);xt([Xc,XM,JM,tP,hX,N1,D1,ud]);xt([A1,QM,eP,fX,k1,M1,P1,L1]);xt([C1,I1,LQ,vQ,qM,WM,ZM,rm,sX]);xt([Xc,DM,nP,GM,HM,VM,FM,BM,Jm,B1,N1,D1,ud]);class Ke extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r,this.name="McpError"}static fromError(t,n,r){if(t===tt.UrlElicitationRequired&&r){const a=r;if(a.elicitations)return new mX(a.elicitations,n)}return new Ke(t,n,r)}}class mX extends Ke{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(tt.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function gi(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function XO(e){const n=AM(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=jY(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function JO(e,t){const n=ws(e,t);if(!n.success)throw n.error;return n.data}const gX=6e4;class vX{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(C1,n=>{this._oncancel(n)}),this.setNotificationHandler(I1,n=>{this._onprogress(n)}),this.setRequestHandler(A1,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(k1,async(n,r)=>{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Ke(tt.InvalidParams,"Failed to retrieve task: Task not found");return{...a}}),this.setRequestHandler(M1,async(n,r)=>{const a=async()=>{const i=n.params.taskId;if(this._taskMessageQueue){let u;for(;u=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(u.type==="response"||u.type==="error"){const d=u.message,f=d.id,m=this._requestResolvers.get(f);if(m)if(this._requestResolvers.delete(f),u.type==="response")m(d);else{const p=d,g=new Ke(p.error.code,p.error.message,p.error.data);m(g)}else{const p=u.type==="response"?"Response":"Error";this._onerror(new Error(`${p} handler missing for request ${f}`))}continue}await this._transport?.send(u.message,{relatedRequestId:r.requestId})}}const c=await this._taskStore.getTask(i,r.sessionId);if(!c)throw new Ke(tt.InvalidParams,`Task not found: ${i}`);if(!gi(c.status))return await this._waitForTaskUpdate(i,r.signal),await a();if(gi(c.status)){const u=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...u,_meta:{...u._meta,[bi]:{taskId:i}}}}return await a()};return await a()}),this.setRequestHandler(P1,async(n,r)=>{try{const{tasks:a,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,r.sessionId);return{tasks:a,nextCursor:i,_meta:{}}}catch(a){throw new Ke(tt.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(L1,async(n,r)=>{try{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Ke(tt.InvalidParams,`Task not found: ${n.params.taskId}`);if(gi(a.status))throw new Ke(tt.InvalidParams,`Cannot cancel task in terminal status: ${a.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new Ke(tt.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(a){throw a instanceof Ke?a:new Ke(tt.InvalidRequest,`Failed to cancel task: ${a instanceof Error?a.message:String(a)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,r,a,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(a,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:a})}_resetTimeout(t){const n=this._timeoutInfo.get(t);if(!n)return!1;const r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),Ke.fromError(tt.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){const n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;const n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};const r=this.transport?.onerror;this._transport.onerror=i=>{r?.(i),this._onerror(i)};const a=this._transport?.onmessage;this._transport.onmessage=(i,c)=>{a?.(i,c),Pu(i)||BY(i)?this._onresponse(i):D_(i)?this._onrequest(i,c):FY(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const r of this._requestHandlerAbortControllers.values())r.abort();this._requestHandlerAbortControllers.clear();const n=Ke.fromError(tt.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const r of t.values())r(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){const n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(t,n){const r=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,a=this._transport,i=t.params?._meta?.[bi]?.taskId;if(r===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:tt.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:m,timestamp:Date.now()},a?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):a?.send(m).catch(p=>this._onerror(new Error(`Failed to send an error response: ${p}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);const u=VY(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,a?.sessionId):void 0,f={signal:c.signal,sessionId:a?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{if(c.signal.aborted)return;const p={relatedRequestId:t.id};i&&(p.relatedTask={taskId:i}),await this.notification(m,p)},sendRequest:async(m,p,g)=>{if(c.signal.aborted)throw new Ke(tt.ConnectionClosed,"Request was cancelled");const y={...g,relatedRequestId:t.id};i&&!y.relatedTask&&(y.relatedTask={taskId:i});const b=y.relatedTask?.taskId??i;return b&&d&&await d.updateTaskStatus(b,"input_required"),await this.request(m,p,y)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:d,taskRequestedTtl:u?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{u&&this.assertTaskHandlerCapability(t.method)}).then(()=>r(t,f)).then(async m=>{if(c.signal.aborted)return;const p={result:m,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:p,timestamp:Date.now()},a?.sessionId):await a?.send(p)},async m=>{if(c.signal.aborted)return;const p={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:tt.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},a?.sessionId):await a?.send(p)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:n,...r}=t.params,a=Number(n),i=this._progressHandlers.get(a);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const c=this._responseHandlers.get(a),u=this._timeoutInfo.get(a);if(u&&c&&u.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){this._responseHandlers.delete(a),this._progressHandlers.delete(a),this._cleanupTimeout(a),c(d);return}i(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),Pu(t))r(t);else{const c=new Ke(t.error.code,t.error.message,t.error.data);r(c)}return}const a=this._responseHandlers.get(n);if(a===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(Pu(t)&&t.result&&typeof t.result=="object"){const c=t.result;if(c.task&&typeof c.task=="object"){const u=c.task;typeof u.taskId=="string"&&(i=!0,this._taskProgressTokens.set(u.taskId,n))}}if(i||this._progressHandlers.delete(n),Pu(t))a(t);else{const c=Ke.fromError(t.error.code,t.error.message,t.error.data);a(c)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,r){const{task:a}=r??{};if(!a){try{yield{type:"result",result:await this.request(t,n,r)}}catch(c){yield{type:"error",error:c instanceof Ke?c:new Ke(tt.InternalError,String(c))}}return}let i;try{const c=await this.request(t,ud,r);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new Ke(tt.InternalError,"Task creation did not return a task");for(;;){const u=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:u},gi(u.status)){u.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:u.status==="failed"?yield{type:"error",error:new Ke(tt.InternalError,`Task ${i} failed`)}:u.status==="cancelled"&&(yield{type:"error",error:new Ke(tt.InternalError,`Task ${i} was cancelled`)});return}if(u.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)};return}const d=u.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(f=>setTimeout(f,d)),r?.signal?.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof Ke?c:new Ke(tt.InternalError,String(c))}}}request(t,n,r){const{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c,task:u,relatedTask:d}=r??{};return new Promise((f,m)=>{const p=E=>{m(E)};if(!this._transport){p(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),u&&this.assertTaskCapability(t.method)}catch(E){p(E);return}r?.signal?.throwIfAborted();const g=this._requestMessageId++,y={...t,jsonrpc:"2.0",id:g};r?.onprogress&&(this._progressHandlers.set(g,r.onprogress),y.params={...t.params,_meta:{...t.params?._meta||{},progressToken:g}}),u&&(y.params={...y.params,task:u}),d&&(y.params={...y.params,_meta:{...y.params?._meta||{},[bi]:d}});const b=E=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(E)}},{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c}).catch(O=>this._onerror(new Error(`Failed to send cancellation: ${O}`)));const T=E instanceof Ke?E:new Ke(tt.RequestTimeout,String(E));m(T)};this._responseHandlers.set(g,E=>{if(!r?.signal?.aborted){if(E instanceof Error)return m(E);try{const T=ws(n,E.result);T.success?f(T.data):m(T.error)}catch(T){m(T)}}}),r?.signal?.addEventListener("abort",()=>{b(r?.signal?.reason)});const S=r?.timeout??gX,w=()=>b(Ke.fromError(tt.RequestTimeout,"Request timed out",{timeout:S}));this._setupTimeout(g,S,r?.maxTotalTimeout,w,r?.resetTimeoutOnProgress??!1);const x=d?.taskId;if(x){const E=T=>{const O=this._responseHandlers.get(g);O?O(T):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,E),this._enqueueTaskMessage(x,{type:"request",message:y,timestamp:Date.now()}).catch(T=>{this._cleanupTimeout(g),m(T)})}else this._transport.send(y,{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c}).catch(E=>{this._cleanupTimeout(g),m(E)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},N1,n)}async getTaskResult(t,n,r){return this.request({method:"tasks/result",params:t},n,r)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},D1,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},sQ,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const r=n?.relatedTask?.taskId;if(r){const u={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[bi]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:u,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let u={...t,jsonrpc:"2.0"};n?.relatedTask&&(u={...u,params:{...u.params,_meta:{...u.params?._meta||{},[bi]:n.relatedTask}}}),this._transport?.send(u,n).catch(d=>this._onerror(d))});return}let c={...t,jsonrpc:"2.0"};n?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[bi]:n.relatedTask}}}),await this._transport.send(c,n)}setRequestHandler(t,n){const r=XO(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(a,i)=>{const c=JO(t,a);return Promise.resolve(n(c,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){const r=XO(t);this._notificationHandlers.set(r,a=>{const i=JO(t,a);return Promise.resolve(n(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,r){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const a=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,r,a)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(t,n);for(const a of r)if(a.type==="request"&&D_(a.message)){const i=a.message.id,c=this._requestResolvers.get(i);c?(c(new Ke(tt.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{const a=await this._taskStore?.getTask(t);a?.pollInterval&&(r=a.pollInterval)}catch{}return new Promise((a,i)=>{if(n.aborted){i(new Ke(tt.InvalidRequest,"Request cancelled"));return}const c=setTimeout(a,r);n.addEventListener("abort",()=>{clearTimeout(c),i(new Ke(tt.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async a=>{if(!t)throw new Error("No request provided");return await r.createTask(a,t.id,{method:t.method,params:t.params},n)},getTask:async a=>{const i=await r.getTask(a,n);if(!i)throw new Ke(tt.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(a,i,c)=>{await r.storeTaskResult(a,i,c,n);const u=await r.getTask(a,n);if(u){const d=rm.parse({method:"notifications/tasks/status",params:u});await this.notification(d),gi(u.status)&&this._cleanupTaskProgressHandler(a)}},getTaskResult:a=>r.getTaskResult(a,n),updateTaskStatus:async(a,i,c)=>{const u=await r.getTask(a,n);if(!u)throw new Ke(tt.InvalidParams,`Task "${a}" not found - it may have been cleaned up`);if(gi(u.status))throw new Ke(tt.InvalidParams,`Cannot update task "${a}" from terminal status "${u.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(a,i,c,n);const d=await r.getTask(a,n);if(d){const f=rm.parse({method:"notifications/tasks/status",params:d});await this.notification(f),gi(d.status)&&this._cleanupTaskProgressHandler(a)}},listTasks:a=>r.listTasks(a,n)}}}function e2(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function yX(e,t){const n={...e};for(const r in t){const a=r,i=t[a];if(i===void 0)continue;const c=n[a];e2(c)&&e2(i)?n[a]={...c,...i}:n[a]=i}return n}var Eh={exports:{}},T0={},Ca={},vi={},O0={},C0={},A0={},t2;function am(){return t2||(t2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(E){if(super(),!e.IDENTIFIER.test(E))throw new Error("CodeGen: name must be a valid identifier");this.str=E}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(E){super(),this._items=typeof E=="string"?[E]:E}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const E=this._items[0];return E===""||E==='""'}get str(){var E;return(E=this._str)!==null&&E!==void 0?E:this._str=this._items.reduce((T,O)=>`${T}${O}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((T,O)=>(O instanceof n&&(T[O.str]=(T[O.str]||0)+1),T),{})}}e._Code=r,e.nil=new r("");function a(x,...E){const T=[x[0]];let O=0;for(;O<E.length;)u(T,E[O]),T.push(x[++O]);return new r(T)}e._=a;const i=new r("+");function c(x,...E){const T=[y(x[0])];let O=0;for(;O<E.length;)T.push(i),u(T,E[O]),T.push(i,y(x[++O]));return d(T),new r(T)}e.str=c;function u(x,E){E instanceof r?x.push(...E._items):E instanceof n?x.push(E):x.push(p(E))}e.addCodeArg=u;function d(x){let E=1;for(;E<x.length-1;){if(x[E]===i){const T=f(x[E-1],x[E+1]);if(T!==void 0){x.splice(E-1,3,T);continue}x[E++]="+"}E++}}function f(x,E){if(E==='""')return x;if(x==='""')return E;if(typeof x=="string")return E instanceof n||x[x.length-1]!=='"'?void 0:typeof E!="string"?`${x.slice(0,-1)}${E}"`:E[0]==='"'?x.slice(0,-1)+E.slice(1):void 0;if(typeof E=="string"&&E[0]==='"'&&!(x instanceof n))return`"${x}${E.slice(1)}`}function m(x,E){return E.emptyStr()?x:x.emptyStr()?E:c`${x}${E}`}e.strConcat=m;function p(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:y(Array.isArray(x)?x.join(","):x)}function g(x){return new r(y(x))}e.stringify=g;function y(x){return JSON.stringify(x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function b(x){return typeof x=="string"&&e.IDENTIFIER.test(x)?new r(`.${x}`):a`[${x}]`}e.getProperty=b;function S(x){if(typeof x=="string"&&e.IDENTIFIER.test(x))return new r(`${x}`);throw new Error(`CodeGen: invalid export name: ${x}, use explicit $id name mapping`)}e.getEsmExportName=S;function w(x){return new r(x.toString())}e.regexpCode=w})(A0)),A0}var I0={},n2;function r2(){return n2||(n2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=am();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:f,parent:m}={}){this._names={},this._prefixes=f,this._parent=m}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const m=this._names[f]||this._nameGroup(f);return`${f}${m.index++}`}_nameGroup(f){var m,p;if(!((p=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=a;class i extends t.Name{constructor(f,m){super(m),this.prefix=f}setValue(f,{property:m,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(m)}[${p}]`}}e.ValueScopeName=i;const c=(0,t._)`\n`;class u extends a{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?c:t.nil}}get(){return this._scope}name(f){return new i(f,this._newName(f))}value(f,m){var p;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(f),{prefix:y}=g,b=(p=m.key)!==null&&p!==void 0?p:m.ref;let S=this._values[y];if(S){const E=S.get(b);if(E)return E}else S=this._values[y]=new Map;S.set(b,g);const w=this._scope[y]||(this._scope[y]=[]),x=w.length;return w[x]=m.ref,g.setValue(m,{property:y,itemIndex:x}),g}getValue(f,m){const p=this._values[f];if(p)return p.get(m)}scopeRefs(f,m=this._values){return this._reduceValues(m,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,m,p){return this._reduceValues(f,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},m,p)}_reduceValues(f,m,p={},g){let y=t.nil;for(const b in f){const S=f[b];if(!S)continue;const w=p[b]=p[b]||new Map;S.forEach(x=>{if(w.has(x))return;w.set(x,r.Started);let E=m(x);if(E){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;y=(0,t._)`${y}${T} ${x} = ${E};${this.opts._n}`}else if(E=g?.(x))y=(0,t._)`${y}${E}${this.opts._n}`;else throw new n(x);w.set(x,r.Completed)})}return y}}e.ValueScope=u})(I0)),I0}var o2;function pt(){return o2||(o2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=am(),n=r2();var r=am();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var a=r2();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(L,$){return this}}class c extends i{constructor(L,$,Q){super(),this.varKind=L,this.name=$,this.rhs=Q}render({es5:L,_n:$}){const Q=L?n.varKinds.var:this.varKind,me=this.rhs===void 0?"":` = ${this.rhs}`;return`${Q} ${this.name}${me};`+$}optimizeNames(L,$){if(L[this.name.str])return this.rhs&&(this.rhs=J(this.rhs,L,$)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends i{constructor(L,$,Q){super(),this.lhs=L,this.rhs=$,this.sideEffects=Q}render({_n:L}){return`${this.lhs} = ${this.rhs};`+L}optimizeNames(L,$){if(!(this.lhs instanceof t.Name&&!L[this.lhs.str]&&!this.sideEffects))return this.rhs=J(this.rhs,L,$),this}get names(){const L=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(L,this.rhs)}}class d extends u{constructor(L,$,Q,me){super(L,Q,me),this.op=$}render({_n:L}){return`${this.lhs} ${this.op}= ${this.rhs};`+L}}class f extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`${this.label}:`+L}}class m extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`break${this.label?` ${this.label}`:""};`+L}}class p extends i{constructor(L){super(),this.error=L}render({_n:L}){return`throw ${this.error};`+L}get names(){return this.error.names}}class g extends i{constructor(L){super(),this.code=L}render({_n:L}){return`${this.code};`+L}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(L,$){return this.code=J(this.code,L,$),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends i{constructor(L=[]){super(),this.nodes=L}render(L){return this.nodes.reduce(($,Q)=>$+Q.render(L),"")}optimizeNodes(){const{nodes:L}=this;let $=L.length;for(;$--;){const Q=L[$].optimizeNodes();Array.isArray(Q)?L.splice($,1,...Q):Q?L[$]=Q:L.splice($,1)}return L.length>0?this:void 0}optimizeNames(L,$){const{nodes:Q}=this;let me=Q.length;for(;me--;){const ye=Q[me];ye.optimizeNames(L,$)||(ie(L,ye.names),Q.splice(me,1))}return Q.length>0?this:void 0}get names(){return this.nodes.reduce((L,$)=>G(L,$.names),{})}}class b extends y{render(L){return"{"+L._n+super.render(L)+"}"+L._n}}class S extends y{}class w extends b{}w.kind="else";class x extends b{constructor(L,$){super($),this.condition=L}render(L){let $=`if(${this.condition})`+super.render(L);return this.else&&($+="else "+this.else.render(L)),$}optimizeNodes(){super.optimizeNodes();const L=this.condition;if(L===!0)return this.nodes;let $=this.else;if($){const Q=$.optimizeNodes();$=this.else=Array.isArray(Q)?new w(Q):Q}if($)return L===!1?$ instanceof x?$:$.nodes:this.nodes.length?this:new x(F(L),$ instanceof x?[$]:$.nodes);if(!(L===!1||!this.nodes.length))return this}optimizeNames(L,$){var Q;if(this.else=(Q=this.else)===null||Q===void 0?void 0:Q.optimizeNames(L,$),!!(super.optimizeNames(L,$)||this.else))return this.condition=J(this.condition,L,$),this}get names(){const L=super.names;return U(L,this.condition),this.else&&G(L,this.else.names),L}}x.kind="if";class E extends b{}E.kind="for";class T extends E{constructor(L){super(),this.iteration=L}render(L){return`for(${this.iteration})`+super.render(L)}optimizeNames(L,$){if(super.optimizeNames(L,$))return this.iteration=J(this.iteration,L,$),this}get names(){return G(super.names,this.iteration.names)}}class O extends E{constructor(L,$,Q,me){super(),this.varKind=L,this.name=$,this.from=Q,this.to=me}render(L){const $=L.es5?n.varKinds.var:this.varKind,{name:Q,from:me,to:ye}=this;return`for(${$} ${Q}=${me}; ${Q}<${ye}; ${Q}++)`+super.render(L)}get names(){const L=U(super.names,this.from);return U(L,this.to)}}class C extends E{constructor(L,$,Q,me){super(),this.loop=L,this.varKind=$,this.name=Q,this.iterable=me}render(L){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(L)}optimizeNames(L,$){if(super.optimizeNames(L,$))return this.iterable=J(this.iterable,L,$),this}get names(){return G(super.names,this.iterable.names)}}class I extends b{constructor(L,$,Q){super(),this.name=L,this.args=$,this.async=Q}render(L){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(L)}}I.kind="func";class N extends y{render(L){return"return "+super.render(L)}}N.kind="return";class D extends b{render(L){let $="try"+super.render(L);return this.catch&&($+=this.catch.render(L)),this.finally&&($+=this.finally.render(L)),$}optimizeNodes(){var L,$;return super.optimizeNodes(),(L=this.catch)===null||L===void 0||L.optimizeNodes(),($=this.finally)===null||$===void 0||$.optimizeNodes(),this}optimizeNames(L,$){var Q,me;return super.optimizeNames(L,$),(Q=this.catch)===null||Q===void 0||Q.optimizeNames(L,$),(me=this.finally)===null||me===void 0||me.optimizeNames(L,$),this}get names(){const L=super.names;return this.catch&&G(L,this.catch.names),this.finally&&G(L,this.finally.names),L}}class z extends b{constructor(L){super(),this.error=L}render(L){return`catch(${this.error})`+super.render(L)}}z.kind="catch";class W extends b{render(L){return"finally"+super.render(L)}}W.kind="finally";class V{constructor(L,$={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...$,_n:$.lines?`
|
|
156
|
-
`:""},this._extScope=L,this._scope=new n.Scope({parent:L}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(L){return this._scope.name(L)}scopeName(L){return this._extScope.name(L)}scopeValue(L,$){const Q=this._extScope.value(L,$);return(this._values[Q.prefix]||(this._values[Q.prefix]=new Set)).add(Q),Q}getScopeValue(L,$){return this._extScope.getValue(L,$)}scopeRefs(L){return this._extScope.scopeRefs(L,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(L,$,Q,me){const ye=this._scope.toName($);return Q!==void 0&&me&&(this._constants[ye.str]=Q),this._leafNode(new c(L,ye,Q)),ye}const(L,$,Q){return this._def(n.varKinds.const,L,$,Q)}let(L,$,Q){return this._def(n.varKinds.let,L,$,Q)}var(L,$,Q){return this._def(n.varKinds.var,L,$,Q)}assign(L,$,Q){return this._leafNode(new u(L,$,Q))}add(L,$){return this._leafNode(new d(L,e.operators.ADD,$))}code(L){return typeof L=="function"?L():L!==t.nil&&this._leafNode(new g(L)),this}object(...L){const $=["{"];for(const[Q,me]of L)$.length>1&&$.push(","),$.push(Q),(Q!==me||this.opts.es5)&&($.push(":"),(0,t.addCodeArg)($,me));return $.push("}"),new t._Code($)}if(L,$,Q){if(this._blockNode(new x(L)),$&&Q)this.code($).else().code(Q).endIf();else if($)this.code($).endIf();else if(Q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(L){return this._elseNode(new x(L))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(x,w)}_for(L,$){return this._blockNode(L),$&&this.code($).endFor(),this}for(L,$){return this._for(new T(L),$)}forRange(L,$,Q,me,ye=this.opts.es5?n.varKinds.var:n.varKinds.let){const Ae=this._scope.toName(L);return this._for(new O(ye,Ae,$,Q),()=>me(Ae))}forOf(L,$,Q,me=n.varKinds.const){const ye=this._scope.toName(L);if(this.opts.es5){const Ae=$ instanceof t.Name?$:this.var("_arr",$);return this.forRange("_i",0,(0,t._)`${Ae}.length`,ke=>{this.var(ye,(0,t._)`${Ae}[${ke}]`),Q(ye)})}return this._for(new C("of",me,ye,$),()=>Q(ye))}forIn(L,$,Q,me=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(L,(0,t._)`Object.keys(${$})`,Q);const ye=this._scope.toName(L);return this._for(new C("in",me,ye,$),()=>Q(ye))}endFor(){return this._endBlockNode(E)}label(L){return this._leafNode(new f(L))}break(L){return this._leafNode(new m(L))}return(L){const $=new N;if(this._blockNode($),this.code(L),$.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(L,$,Q){if(!$&&!Q)throw new Error('CodeGen: "try" without "catch" and "finally"');const me=new D;if(this._blockNode(me),this.code(L),$){const ye=this.name("e");this._currNode=me.catch=new z(ye),$(ye)}return Q&&(this._currNode=me.finally=new W,this.code(Q)),this._endBlockNode(z,W)}throw(L){return this._leafNode(new p(L))}block(L,$){return this._blockStarts.push(this._nodes.length),L&&this.code(L).endBlock($),this}endBlock(L){const $=this._blockStarts.pop();if($===void 0)throw new Error("CodeGen: not in self-balancing block");const Q=this._nodes.length-$;if(Q<0||L!==void 0&&Q!==L)throw new Error(`CodeGen: wrong number of nodes: ${Q} vs ${L} expected`);return this._nodes.length=$,this}func(L,$=t.nil,Q,me){return this._blockNode(new I(L,$,Q)),me&&this.code(me).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(L=1){for(;L-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(L){return this._currNode.nodes.push(L),this}_blockNode(L){this._currNode.nodes.push(L),this._nodes.push(L)}_endBlockNode(L,$){const Q=this._currNode;if(Q instanceof L||$&&Q instanceof $)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${$?`${L.kind}/${$.kind}`:L.kind}"`)}_elseNode(L){const $=this._currNode;if(!($ instanceof x))throw new Error('CodeGen: "else" without "if"');return this._currNode=$.else=L,this}get _root(){return this._nodes[0]}get _currNode(){const L=this._nodes;return L[L.length-1]}set _currNode(L){const $=this._nodes;$[$.length-1]=L}}e.CodeGen=V;function G(B,L){for(const $ in L)B[$]=(B[$]||0)+(L[$]||0);return B}function U(B,L){return L instanceof t._CodeOrName?G(B,L.names):B}function J(B,L,$){if(B instanceof t.Name)return Q(B);if(!me(B))return B;return new t._Code(B._items.reduce((ye,Ae)=>(Ae instanceof t.Name&&(Ae=Q(Ae)),Ae instanceof t._Code?ye.push(...Ae._items):ye.push(Ae),ye),[]));function Q(ye){const Ae=$[ye.str];return Ae===void 0||L[ye.str]!==1?ye:(delete L[ye.str],Ae)}function me(ye){return ye instanceof t._Code&&ye._items.some(Ae=>Ae instanceof t.Name&&L[Ae.str]===1&&$[Ae.str]!==void 0)}}function ie(B,L){for(const $ in L)B[$]=(B[$]||0)-(L[$]||0)}function F(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,t._)`!${q(B)}`}e.not=F;const X=P(e.operators.AND);function ae(...B){return B.reduce(X)}e.and=ae;const fe=P(e.operators.OR);function K(...B){return B.reduce(fe)}e.or=K;function P(B){return(L,$)=>L===t.nil?$:$===t.nil?L:(0,t._)`${q(L)} ${B} ${q($)}`}function q(B){return B instanceof t.Name?B:(0,t._)`(${B})`}})(C0)),C0}var dt={},a2;function Ot(){if(a2)return dt;a2=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.checkStrictMode=dt.getErrorPath=dt.Type=dt.useFunc=dt.setEvaluated=dt.evaluatedPropsToName=dt.mergeEvaluated=dt.eachItem=dt.unescapeJsonPointer=dt.escapeJsonPointer=dt.escapeFragment=dt.unescapeFragment=dt.schemaRefOrVal=dt.schemaHasRulesButRef=dt.schemaHasRules=dt.checkUnknownRules=dt.alwaysValidSchema=dt.toHash=void 0;const e=pt(),t=am();function n(C){const I={};for(const N of C)I[N]=!0;return I}dt.toHash=n;function r(C,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(a(C,I),!i(I,C.self.RULES.all))}dt.alwaysValidSchema=r;function a(C,I=C.schema){const{opts:N,self:D}=C;if(!N.strictSchema||typeof I=="boolean")return;const z=D.RULES.keywords;for(const W in I)z[W]||O(C,`unknown keyword: "${W}"`)}dt.checkUnknownRules=a;function i(C,I){if(typeof C=="boolean")return!C;for(const N in C)if(I[N])return!0;return!1}dt.schemaHasRules=i;function c(C,I){if(typeof C=="boolean")return!C;for(const N in C)if(N!=="$ref"&&I.all[N])return!0;return!1}dt.schemaHasRulesButRef=c;function u({topSchemaRef:C,schemaPath:I},N,D,z){if(!z){if(typeof N=="number"||typeof N=="boolean")return N;if(typeof N=="string")return(0,e._)`${N}`}return(0,e._)`${C}${I}${(0,e.getProperty)(D)}`}dt.schemaRefOrVal=u;function d(C){return p(decodeURIComponent(C))}dt.unescapeFragment=d;function f(C){return encodeURIComponent(m(C))}dt.escapeFragment=f;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}dt.escapeJsonPointer=m;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}dt.unescapeJsonPointer=p;function g(C,I){if(Array.isArray(C))for(const N of C)I(N);else I(C)}dt.eachItem=g;function y({mergeNames:C,mergeToName:I,mergeValues:N,resultToName:D}){return(z,W,V,G)=>{const U=V===void 0?W:V instanceof e.Name?(W instanceof e.Name?C(z,W,V):I(z,W,V),V):W instanceof e.Name?(I(z,V,W),W):N(W,V);return G===e.Name&&!(U instanceof e.Name)?D(z,U):U}}dt.mergeEvaluated={props:y({mergeNames:(C,I,N)=>C.if((0,e._)`${N} !== true && ${I} !== undefined`,()=>{C.if((0,e._)`${I} === true`,()=>C.assign(N,!0),()=>C.assign(N,(0,e._)`${N} || {}`).code((0,e._)`Object.assign(${N}, ${I})`))}),mergeToName:(C,I,N)=>C.if((0,e._)`${N} !== true`,()=>{I===!0?C.assign(N,!0):(C.assign(N,(0,e._)`${N} || {}`),S(C,N,I))}),mergeValues:(C,I)=>C===!0?!0:{...C,...I},resultToName:b}),items:y({mergeNames:(C,I,N)=>C.if((0,e._)`${N} !== true && ${I} !== undefined`,()=>C.assign(N,(0,e._)`${I} === true ? true : ${N} > ${I} ? ${N} : ${I}`)),mergeToName:(C,I,N)=>C.if((0,e._)`${N} !== true`,()=>C.assign(N,I===!0?!0:(0,e._)`${N} > ${I} ? ${N} : ${I}`)),mergeValues:(C,I)=>C===!0?!0:Math.max(C,I),resultToName:(C,I)=>C.var("items",I)})};function b(C,I){if(I===!0)return C.var("props",!0);const N=C.var("props",(0,e._)`{}`);return I!==void 0&&S(C,N,I),N}dt.evaluatedPropsToName=b;function S(C,I,N){Object.keys(N).forEach(D=>C.assign((0,e._)`${I}${(0,e.getProperty)(D)}`,!0))}dt.setEvaluated=S;const w={};function x(C,I){return C.scopeValue("func",{ref:I,code:w[I.code]||(w[I.code]=new t._Code(I.code))})}dt.useFunc=x;var E;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(E||(dt.Type=E={}));function T(C,I,N){if(C instanceof e.Name){const D=I===E.Num;return N?D?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:D?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return N?(0,e.getProperty)(C).toString():"/"+m(C)}dt.getErrorPath=T;function O(C,I,N=C.opts.strictSchema){if(N){if(I=`strict mode: ${I}`,N===!0)throw new Error(I);C.self.logger.warn(I)}}return dt.checkStrictMode=O,dt}var Rh={},s2;function Hs(){if(s2)return Rh;s2=1,Object.defineProperty(Rh,"__esModule",{value:!0});const e=pt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Rh.default=t,Rh}var i2;function eg(){return i2||(i2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=pt(),n=Ot(),r=Hs();e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:x})=>x?(0,t.str)`"${w}" keyword must be ${x} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function a(w,x=e.keywordError,E,T){const{it:O}=w,{gen:C,compositeRule:I,allErrors:N}=O,D=p(w,x,E);T??(I||N)?d(C,D):f(O,(0,t._)`[${D}]`)}e.reportError=a;function i(w,x=e.keywordError,E){const{it:T}=w,{gen:O,compositeRule:C,allErrors:I}=T,N=p(w,x,E);d(O,N),C||I||f(T,r.default.vErrors)}e.reportExtraError=i;function c(w,x){w.assign(r.default.errors,x),w.if((0,t._)`${r.default.vErrors} !== null`,()=>w.if(x,()=>w.assign((0,t._)`${r.default.vErrors}.length`,x),()=>w.assign(r.default.vErrors,null)))}e.resetErrorsCount=c;function u({gen:w,keyword:x,schemaValue:E,data:T,errsCount:O,it:C}){if(O===void 0)throw new Error("ajv implementation error");const I=w.name("err");w.forRange("i",O,r.default.errors,N=>{w.const(I,(0,t._)`${r.default.vErrors}[${N}]`),w.if((0,t._)`${I}.instancePath === undefined`,()=>w.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(r.default.instancePath,C.errorPath))),w.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${x}`),C.opts.verbose&&(w.assign((0,t._)`${I}.schema`,E),w.assign((0,t._)`${I}.data`,T))})}e.extendErrors=u;function d(w,x){const E=w.const("err",x);w.if((0,t._)`${r.default.vErrors} === null`,()=>w.assign(r.default.vErrors,(0,t._)`[${E}]`),(0,t._)`${r.default.vErrors}.push(${E})`),w.code((0,t._)`${r.default.errors}++`)}function f(w,x){const{gen:E,validateName:T,schemaEnv:O}=w;O.$async?E.throw((0,t._)`new ${w.ValidationError}(${x})`):(E.assign((0,t._)`${T}.errors`,x),E.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(w,x,E){const{createErrors:T}=w.it;return T===!1?(0,t._)`{}`:g(w,x,E)}function g(w,x,E={}){const{gen:T,it:O}=w,C=[y(O,E),b(w,E)];return S(w,x,C),T.object(...C)}function y({errorPath:w},{instancePath:x}){const E=x?(0,t.str)`${w}${(0,n.getErrorPath)(x,n.Type.Str)}`:w;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,E)]}function b({keyword:w,it:{errSchemaPath:x}},{schemaPath:E,parentSchema:T}){let O=T?x:(0,t.str)`${x}/${w}`;return E&&(O=(0,t.str)`${O}${(0,n.getErrorPath)(E,n.Type.Str)}`),[m.schemaPath,O]}function S(w,{params:x,message:E},T){const{keyword:O,data:C,schemaValue:I,it:N}=w,{opts:D,propertyName:z,topSchemaRef:W,schemaPath:V}=N;T.push([m.keyword,O],[m.params,typeof x=="function"?x(w):x||(0,t._)`{}`]),D.messages&&T.push([m.message,typeof E=="function"?E(w):E]),D.verbose&&T.push([m.schema,I],[m.parentSchema,(0,t._)`${W}${V}`],[r.default.data,C]),z&&T.push([m.propertyName,z])}})(O0)),O0}var c2;function _X(){if(c2)return vi;c2=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.boolOrEmptySchema=vi.topBoolOrEmptySchema=void 0;const e=eg(),t=pt(),n=Hs(),r={message:"boolean schema is false"};function a(u){const{gen:d,schema:f,validateName:m}=u;f===!1?c(u,!1):typeof f=="object"&&f.$async===!0?d.return(n.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}vi.topBoolOrEmptySchema=a;function i(u,d){const{gen:f,schema:m}=u;m===!1?(f.var(d,!1),c(u)):f.var(d,!0)}vi.boolOrEmptySchema=i;function c(u,d){const{gen:f,data:m}=u,p={gen:f,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,e.reportError)(p,r,void 0,d)}return vi}var Gn={},yi={},l2;function rP(){if(l2)return yi;l2=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.getRules=yi.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(a){return typeof a=="string"&&t.has(a)}yi.isJSONType=n;function r(){const a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}return yi.getRules=r,yi}var Aa={},u2;function oP(){if(u2)return Aa;u2=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.shouldUseRule=Aa.shouldUseGroup=Aa.schemaHasRulesForType=void 0;function e({schema:r,self:a},i){const c=a.RULES.types[i];return c&&c!==!0&&t(r,c)}Aa.schemaHasRulesForType=e;function t(r,a){return a.rules.some(i=>n(r,i))}Aa.shouldUseGroup=t;function n(r,a){var i;return r[a.keyword]!==void 0||((i=a.definition.implements)===null||i===void 0?void 0:i.some(c=>r[c]!==void 0))}return Aa.shouldUseRule=n,Aa}var d2;function sm(){if(d2)return Gn;d2=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.reportTypeError=Gn.checkDataTypes=Gn.checkDataType=Gn.coerceAndCheckDataType=Gn.getJSONTypes=Gn.getSchemaTypes=Gn.DataType=void 0;const e=rP(),t=oP(),n=eg(),r=pt(),a=Ot();var i;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(i||(Gn.DataType=i={}));function c(E){const T=u(E.type);if(T.includes("null")){if(E.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!T.length&&E.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');E.nullable===!0&&T.push("null")}return T}Gn.getSchemaTypes=c;function u(E){const T=Array.isArray(E)?E:E?[E]:[];if(T.every(e.isJSONType))return T;throw new Error("type must be JSONType or JSONType[]: "+T.join(","))}Gn.getJSONTypes=u;function d(E,T){const{gen:O,data:C,opts:I}=E,N=m(T,I.coerceTypes),D=T.length>0&&!(N.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(E,T[0]));if(D){const z=b(T,C,I.strictNumbers,i.Wrong);O.if(z,()=>{N.length?p(E,T,N):w(E)})}return D}Gn.coerceAndCheckDataType=d;const f=new Set(["string","number","integer","boolean","null"]);function m(E,T){return T?E.filter(O=>f.has(O)||T==="array"&&O==="array"):[]}function p(E,T,O){const{gen:C,data:I,opts:N}=E,D=C.let("dataType",(0,r._)`typeof ${I}`),z=C.let("coerced",(0,r._)`undefined`);N.coerceTypes==="array"&&C.if((0,r._)`${D} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>C.assign(I,(0,r._)`${I}[0]`).assign(D,(0,r._)`typeof ${I}`).if(b(T,I,N.strictNumbers),()=>C.assign(z,I))),C.if((0,r._)`${z} !== undefined`);for(const V of O)(f.has(V)||V==="array"&&N.coerceTypes==="array")&&W(V);C.else(),w(E),C.endIf(),C.if((0,r._)`${z} !== undefined`,()=>{C.assign(I,z),g(E,z)});function W(V){switch(V){case"string":C.elseIf((0,r._)`${D} == "number" || ${D} == "boolean"`).assign(z,(0,r._)`"" + ${I}`).elseIf((0,r._)`${I} === null`).assign(z,(0,r._)`""`);return;case"number":C.elseIf((0,r._)`${D} == "boolean" || ${I} === null
|
|
157
|
-
|| (${D} == "string" && ${I} && ${I} == +${I})`).assign(z,(0,r._)`+${I}`);return;case"integer":C.elseIf((0,r._)`${D} === "boolean" || ${I} === null
|
|
158
|
-
|| (${D} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign(z,(0,r._)`+${I}`);return;case"boolean":C.elseIf((0,r._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign(z,!1).elseIf((0,r._)`${I} === "true" || ${I} === 1`).assign(z,!0);return;case"null":C.elseIf((0,r._)`${I} === "" || ${I} === 0 || ${I} === false`),C.assign(z,null);return;case"array":C.elseIf((0,r._)`${D} === "string" || ${D} === "number"
|
|
159
|
-
|| ${D} === "boolean" || ${I} === null`).assign(z,(0,r._)`[${I}]`)}}}function g({gen:E,parentData:T,parentDataProperty:O},C){E.if((0,r._)`${T} !== undefined`,()=>E.assign((0,r._)`${T}[${O}]`,C))}function y(E,T,O,C=i.Correct){const I=C===i.Correct?r.operators.EQ:r.operators.NEQ;let N;switch(E){case"null":return(0,r._)`${T} ${I} null`;case"array":N=(0,r._)`Array.isArray(${T})`;break;case"object":N=(0,r._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":N=D((0,r._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":N=D();break;default:return(0,r._)`typeof ${T} ${I} ${E}`}return C===i.Correct?N:(0,r.not)(N);function D(z=r.nil){return(0,r.and)((0,r._)`typeof ${T} == "number"`,z,O?(0,r._)`isFinite(${T})`:r.nil)}}Gn.checkDataType=y;function b(E,T,O,C){if(E.length===1)return y(E[0],T,O,C);let I;const N=(0,a.toHash)(E);if(N.array&&N.object){const D=(0,r._)`typeof ${T} != "object"`;I=N.null?D:(0,r._)`!${T} || ${D}`,delete N.null,delete N.array,delete N.object}else I=r.nil;N.number&&delete N.integer;for(const D in N)I=(0,r.and)(I,y(D,T,O,C));return I}Gn.checkDataTypes=b;const S={message:({schema:E})=>`must be ${E}`,params:({schema:E,schemaValue:T})=>typeof E=="string"?(0,r._)`{type: ${E}}`:(0,r._)`{type: ${T}}`};function w(E){const T=x(E);(0,n.reportError)(T,S)}Gn.reportTypeError=w;function x(E){const{gen:T,data:O,schema:C}=E,I=(0,a.schemaRefOrVal)(E,C,"type");return{gen:T,keyword:"type",data:O,schema:C.type,schemaCode:I,schemaValue:I,parentSchema:C,params:{},it:E}}return Gn}var Tu={},f2;function bX(){if(f2)return Tu;f2=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.assignDefaults=void 0;const e=pt(),t=Ot();function n(a,i){const{properties:c,items:u}=a.schema;if(i==="object"&&c)for(const d in c)r(a,d,c[d].default);else i==="array"&&Array.isArray(u)&&u.forEach((d,f)=>r(a,f,d.default))}Tu.assignDefaults=n;function r(a,i,c){const{gen:u,compositeRule:d,data:f,opts:m}=a;if(c===void 0)return;const p=(0,e._)`${f}${(0,e.getProperty)(i)}`;if(d){(0,t.checkStrictMode)(a,`default is ignored for: ${p}`);return}let g=(0,e._)`${p} === undefined`;m.useDefaults==="empty"&&(g=(0,e._)`${g} || ${p} === null || ${p} === ""`),u.if(g,(0,e._)`${p} = ${(0,e.stringify)(c)}`)}return Tu}var Oo={},$t={},h2;function Vo(){if(h2)return $t;h2=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.validateUnion=$t.validateArray=$t.usePattern=$t.callValidateCode=$t.schemaProperties=$t.allSchemaProperties=$t.noPropertyInData=$t.propertyInData=$t.isOwnProperty=$t.hasPropFunc=$t.reportMissingProp=$t.checkMissingProp=$t.checkReportMissingProp=void 0;const e=pt(),t=Ot(),n=Hs(),r=Ot();function a(E,T){const{gen:O,data:C,it:I}=E;O.if(m(O,C,T,I.opts.ownProperties),()=>{E.setParams({missingProperty:(0,e._)`${T}`},!0),E.error()})}$t.checkReportMissingProp=a;function i({gen:E,data:T,it:{opts:O}},C,I){return(0,e.or)(...C.map(N=>(0,e.and)(m(E,T,N,O.ownProperties),(0,e._)`${I} = ${N}`)))}$t.checkMissingProp=i;function c(E,T){E.setParams({missingProperty:T},!0),E.error()}$t.reportMissingProp=c;function u(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}$t.hasPropFunc=u;function d(E,T,O){return(0,e._)`${u(E)}.call(${T}, ${O})`}$t.isOwnProperty=d;function f(E,T,O,C){const I=(0,e._)`${T}${(0,e.getProperty)(O)} !== undefined`;return C?(0,e._)`${I} && ${d(E,T,O)}`:I}$t.propertyInData=f;function m(E,T,O,C){const I=(0,e._)`${T}${(0,e.getProperty)(O)} === undefined`;return C?(0,e.or)(I,(0,e.not)(d(E,T,O))):I}$t.noPropertyInData=m;function p(E){return E?Object.keys(E).filter(T=>T!=="__proto__"):[]}$t.allSchemaProperties=p;function g(E,T){return p(T).filter(O=>!(0,t.alwaysValidSchema)(E,T[O]))}$t.schemaProperties=g;function y({schemaCode:E,data:T,it:{gen:O,topSchemaRef:C,schemaPath:I,errorPath:N},it:D},z,W,V){const G=V?(0,e._)`${E}, ${T}, ${C}${I}`:T,U=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,N)],[n.default.parentData,D.parentData],[n.default.parentDataProperty,D.parentDataProperty],[n.default.rootData,n.default.rootData]];D.opts.dynamicRef&&U.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const J=(0,e._)`${G}, ${O.object(...U)}`;return W!==e.nil?(0,e._)`${z}.call(${W}, ${J})`:(0,e._)`${z}(${J})`}$t.callValidateCode=y;const b=(0,e._)`new RegExp`;function S({gen:E,it:{opts:T}},O){const C=T.unicodeRegExp?"u":"",{regExp:I}=T.code,N=I(O,C);return E.scopeValue("pattern",{key:N.toString(),ref:N,code:(0,e._)`${I.code==="new RegExp"?b:(0,r.useFunc)(E,I)}(${O}, ${C})`})}$t.usePattern=S;function w(E){const{gen:T,data:O,keyword:C,it:I}=E,N=T.name("valid");if(I.allErrors){const z=T.let("valid",!0);return D(()=>T.assign(z,!1)),z}return T.var(N,!0),D(()=>T.break()),N;function D(z){const W=T.const("len",(0,e._)`${O}.length`);T.forRange("i",0,W,V=>{E.subschema({keyword:C,dataProp:V,dataPropType:t.Type.Num},N),T.if((0,e.not)(N),z)})}}$t.validateArray=w;function x(E){const{gen:T,schema:O,keyword:C,it:I}=E;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(W=>(0,t.alwaysValidSchema)(I,W))&&!I.opts.unevaluated)return;const D=T.let("valid",!1),z=T.name("_valid");T.block(()=>O.forEach((W,V)=>{const G=E.subschema({keyword:C,schemaProp:V,compositeRule:!0},z);T.assign(D,(0,e._)`${D} || ${z}`),E.mergeValidEvaluated(G,z)||T.if((0,e.not)(D))})),E.result(D,()=>E.reset(),()=>E.error(!0))}return $t.validateUnion=x,$t}var p2;function wX(){if(p2)return Oo;p2=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.validateKeywordUsage=Oo.validSchemaType=Oo.funcKeywordCode=Oo.macroKeywordCode=void 0;const e=pt(),t=Hs(),n=Vo(),r=eg();function a(g,y){const{gen:b,keyword:S,schema:w,parentSchema:x,it:E}=g,T=y.macro.call(E.self,w,x,E),O=f(b,S,T);E.opts.validateSchema!==!1&&E.self.validateSchema(T,!0);const C=b.name("valid");g.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${E.errSchemaPath}/${S}`,topSchemaRef:O,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}Oo.macroKeywordCode=a;function i(g,y){var b;const{gen:S,keyword:w,schema:x,parentSchema:E,$data:T,it:O}=g;d(O,y);const C=!T&&y.compile?y.compile.call(O.self,x,E,O):y.validate,I=f(S,w,C),N=S.let("valid");g.block$data(N,D),g.ok((b=y.valid)!==null&&b!==void 0?b:N);function D(){if(y.errors===!1)V(),y.modifying&&c(g),G(()=>g.error());else{const U=y.async?z():W();y.modifying&&c(g),G(()=>u(g,U))}}function z(){const U=S.let("ruleErrs",null);return S.try(()=>V((0,e._)`await `),J=>S.assign(N,!1).if((0,e._)`${J} instanceof ${O.ValidationError}`,()=>S.assign(U,(0,e._)`${J}.errors`),()=>S.throw(J))),U}function W(){const U=(0,e._)`${I}.errors`;return S.assign(U,null),V(e.nil),U}function V(U=y.async?(0,e._)`await `:e.nil){const J=O.opts.passContext?t.default.this:t.default.self,ie=!("compile"in y&&!T||y.schema===!1);S.assign(N,(0,e._)`${U}${(0,n.callValidateCode)(g,I,J,ie)}`,y.modifying)}function G(U){var J;S.if((0,e.not)((J=y.valid)!==null&&J!==void 0?J:N),U)}}Oo.funcKeywordCode=i;function c(g){const{gen:y,data:b,it:S}=g;y.if(S.parentData,()=>y.assign(b,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function u(g,y){const{gen:b}=g;b.if((0,e._)`Array.isArray(${y})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${y} : ${t.default.vErrors}.concat(${y})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function d({schemaEnv:g},y){if(y.async&&!g.$async)throw new Error("async keyword in sync schema")}function f(g,y,b){if(b===void 0)throw new Error(`keyword "${y}" failed to compile`);return g.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function m(g,y,b=!1){return!y.length||y.some(S=>S==="array"?Array.isArray(g):S==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==S||b&&typeof g>"u")}Oo.validSchemaType=m;function p({schema:g,opts:y,self:b,errSchemaPath:S},w,x){if(Array.isArray(w.keyword)?!w.keyword.includes(x):w.keyword!==x)throw new Error("ajv implementation error");const E=w.dependencies;if(E?.some(T=>!Object.prototype.hasOwnProperty.call(g,T)))throw new Error(`parent schema must have dependencies of ${x}: ${E.join(",")}`);if(w.validateSchema&&!w.validateSchema(g[x])){const O=`keyword "${x}" value is invalid at path "${S}": `+b.errorsText(w.validateSchema.errors);if(y.validateSchema==="log")b.logger.error(O);else throw new Error(O)}}return Oo.validateKeywordUsage=p,Oo}var Ia={},m2;function SX(){if(m2)return Ia;m2=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.extendSubschemaMode=Ia.extendSubschemaData=Ia.getSubschema=void 0;const e=pt(),t=Ot();function n(i,{keyword:c,schemaProp:u,schema:d,schemaPath:f,errSchemaPath:m,topSchemaRef:p}){if(c!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const g=i.schema[c];return u===void 0?{schema:g,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${i.errSchemaPath}/${c}`}:{schema:g[u],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${c}/${(0,t.escapeFragment)(u)}`}}if(d!==void 0){if(f===void 0||m===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:f,topSchemaRef:p,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}Ia.getSubschema=n;function r(i,c,{dataProp:u,dataPropType:d,data:f,dataTypes:m,propertyName:p}){if(f!==void 0&&u!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=c;if(u!==void 0){const{errorPath:b,dataPathArr:S,opts:w}=c,x=g.let("data",(0,e._)`${c.data}${(0,e.getProperty)(u)}`,!0);y(x),i.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(u,d,w.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${u}`,i.dataPathArr=[...S,i.parentDataProperty]}if(f!==void 0){const b=f instanceof e.Name?f:g.let("data",f,!0);y(b),p!==void 0&&(i.propertyName=p)}m&&(i.dataTypes=m);function y(b){i.data=b,i.dataLevel=c.dataLevel+1,i.dataTypes=[],c.definedProperties=new Set,i.parentData=c.data,i.dataNames=[...c.dataNames,b]}}Ia.extendSubschemaData=r;function a(i,{jtdDiscriminator:c,jtdMetadata:u,compositeRule:d,createErrors:f,allErrors:m}){d!==void 0&&(i.compositeRule=d),f!==void 0&&(i.createErrors=f),m!==void 0&&(i.allErrors=m),i.jtdDiscriminator=c,i.jtdMetadata=u}return Ia.extendSubschemaMode=a,Ia}var cr={},k0,g2;function aP(){return g2||(g2=1,k0=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,a,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!e(t[a],n[a]))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(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;a--!==0;){var c=i[a];if(!e(t[c],n[c]))return!1}return!0}return t!==t&&n!==n}),k0}var N0={exports:{}},v2;function EX(){if(v2)return N0.exports;v2=1;var e=N0.exports=function(r,a,i){typeof a=="function"&&(i=a,a={}),i=a.cb||i;var c=typeof i=="function"?i:i.pre||function(){},u=i.post||function(){};t(a,c,u,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,a,i,c,u,d,f,m,p,g){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,u,d,f,m,p,g);for(var y in c){var b=c[y];if(Array.isArray(b)){if(y in e.arrayKeywords)for(var S=0;S<b.length;S++)t(r,a,i,b[S],u+"/"+y+"/"+S,d,u,y,c,S)}else if(y in e.propsKeywords){if(b&&typeof b=="object")for(var w in b)t(r,a,i,b[w],u+"/"+y+"/"+n(w),d,u,y,c,w)}else(y in e.keywords||r.allKeys&&!(y in e.skipKeywords))&&t(r,a,i,b,u+"/"+y,d,u,y,c)}i(c,u,d,f,m,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return N0.exports}var y2;function tg(){if(y2)return cr;y2=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.getSchemaRefs=cr.resolveUrl=cr.normalizeId=cr._getFullPath=cr.getFullPath=cr.inlineRef=void 0;const e=Ot(),t=aP(),n=EX(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(S,w=!0){return typeof S=="boolean"?!0:w===!0?!c(S):w?u(S)<=w:!1}cr.inlineRef=a;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(S){for(const w in S){if(i.has(w))return!0;const x=S[w];if(Array.isArray(x)&&x.some(c)||typeof x=="object"&&c(x))return!0}return!1}function u(S){let w=0;for(const x in S){if(x==="$ref")return 1/0;if(w++,!r.has(x)&&(typeof S[x]=="object"&&(0,e.eachItem)(S[x],E=>w+=u(E)),w===1/0))return 1/0}return w}function d(S,w="",x){x!==!1&&(w=p(w));const E=S.parse(w);return f(S,E)}cr.getFullPath=d;function f(S,w){return S.serialize(w).split("#")[0]+"#"}cr._getFullPath=f;const m=/#\/?$/;function p(S){return S?S.replace(m,""):""}cr.normalizeId=p;function g(S,w,x){return x=p(x),S.resolve(w,x)}cr.resolveUrl=g;const y=/^[a-z_][-a-z0-9._]*$/i;function b(S,w){if(typeof S=="boolean")return{};const{schemaId:x,uriResolver:E}=this.opts,T=p(S[x]||w),O={"":T},C=d(E,T,!1),I={},N=new Set;return n(S,{allKeys:!0},(W,V,G,U)=>{if(U===void 0)return;const J=C+V;let ie=O[U];typeof W[x]=="string"&&(ie=F.call(this,W[x])),X.call(this,W.$anchor),X.call(this,W.$dynamicAnchor),O[V]=ie;function F(ae){const fe=this.opts.uriResolver.resolve;if(ae=p(ie?fe(ie,ae):ae),N.has(ae))throw z(ae);N.add(ae);let K=this.refs[ae];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?D(W,K.schema,ae):ae!==p(J)&&(ae[0]==="#"?(D(W,I[ae],ae),I[ae]=W):this.refs[ae]=J),ae}function X(ae){if(typeof ae=="string"){if(!y.test(ae))throw new Error(`invalid anchor "${ae}"`);F.call(this,`#${ae}`)}}}),I;function D(W,V,G){if(V!==void 0&&!t(W,V))throw z(G)}function z(W){return new Error(`reference "${W}" resolves to more than one schema`)}}return cr.getSchemaRefs=b,cr}var _2;function ng(){if(_2)return Ca;_2=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.getData=Ca.KeywordCxt=Ca.validateFunctionCode=void 0;const e=_X(),t=sm(),n=oP(),r=sm(),a=bX(),i=wX(),c=SX(),u=pt(),d=Hs(),f=tg(),m=Ot(),p=eg();function g(H){if(C(H)&&(N(H),O(H))){w(H);return}y(H,()=>(0,e.topBoolOrEmptySchema)(H))}Ca.validateFunctionCode=g;function y({gen:H,validateName:ne,schema:_e,schemaEnv:pe,opts:ce},Oe){ce.code.es5?H.func(ne,(0,u._)`${d.default.data}, ${d.default.valCxt}`,pe.$async,()=>{H.code((0,u._)`"use strict"; ${E(_e,ce)}`),S(H,ce),H.code(Oe)}):H.func(ne,(0,u._)`${d.default.data}, ${b(ce)}`,pe.$async,()=>H.code(E(_e,ce)).code(Oe))}function b(H){return(0,u._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${H.dynamicRef?(0,u._)`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}function S(H,ne){H.if(d.default.valCxt,()=>{H.var(d.default.instancePath,(0,u._)`${d.default.valCxt}.${d.default.instancePath}`),H.var(d.default.parentData,(0,u._)`${d.default.valCxt}.${d.default.parentData}`),H.var(d.default.parentDataProperty,(0,u._)`${d.default.valCxt}.${d.default.parentDataProperty}`),H.var(d.default.rootData,(0,u._)`${d.default.valCxt}.${d.default.rootData}`),ne.dynamicRef&&H.var(d.default.dynamicAnchors,(0,u._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{H.var(d.default.instancePath,(0,u._)`""`),H.var(d.default.parentData,(0,u._)`undefined`),H.var(d.default.parentDataProperty,(0,u._)`undefined`),H.var(d.default.rootData,d.default.data),ne.dynamicRef&&H.var(d.default.dynamicAnchors,(0,u._)`{}`)})}function w(H){const{schema:ne,opts:_e,gen:pe}=H;y(H,()=>{_e.$comment&&ne.$comment&&U(H),W(H),pe.let(d.default.vErrors,null),pe.let(d.default.errors,0),_e.unevaluated&&x(H),D(H),J(H)})}function x(H){const{gen:ne,validateName:_e}=H;H.evaluated=ne.const("evaluated",(0,u._)`${_e}.evaluated`),ne.if((0,u._)`${H.evaluated}.dynamicProps`,()=>ne.assign((0,u._)`${H.evaluated}.props`,(0,u._)`undefined`)),ne.if((0,u._)`${H.evaluated}.dynamicItems`,()=>ne.assign((0,u._)`${H.evaluated}.items`,(0,u._)`undefined`))}function E(H,ne){const _e=typeof H=="object"&&H[ne.schemaId];return _e&&(ne.code.source||ne.code.process)?(0,u._)`/*# sourceURL=${_e} */`:u.nil}function T(H,ne){if(C(H)&&(N(H),O(H))){I(H,ne);return}(0,e.boolOrEmptySchema)(H,ne)}function O({schema:H,self:ne}){if(typeof H=="boolean")return!H;for(const _e in H)if(ne.RULES.all[_e])return!0;return!1}function C(H){return typeof H.schema!="boolean"}function I(H,ne){const{schema:_e,gen:pe,opts:ce}=H;ce.$comment&&_e.$comment&&U(H),V(H),G(H);const Oe=pe.const("_errs",d.default.errors);D(H,Oe),pe.var(ne,(0,u._)`${Oe} === ${d.default.errors}`)}function N(H){(0,m.checkUnknownRules)(H),z(H)}function D(H,ne){if(H.opts.jtd)return F(H,[],!1,ne);const _e=(0,t.getSchemaTypes)(H.schema),pe=(0,t.coerceAndCheckDataType)(H,_e);F(H,_e,!pe,ne)}function z(H){const{schema:ne,errSchemaPath:_e,opts:pe,self:ce}=H;ne.$ref&&pe.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(ne,ce.RULES)&&ce.logger.warn(`$ref: keywords ignored in schema at path "${_e}"`)}function W(H){const{schema:ne,opts:_e}=H;ne.default!==void 0&&_e.useDefaults&&_e.strictSchema&&(0,m.checkStrictMode)(H,"default is ignored in the schema root")}function V(H){const ne=H.schema[H.opts.schemaId];ne&&(H.baseId=(0,f.resolveUrl)(H.opts.uriResolver,H.baseId,ne))}function G(H){if(H.schema.$async&&!H.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:H,schemaEnv:ne,schema:_e,errSchemaPath:pe,opts:ce}){const Oe=_e.$comment;if(ce.$comment===!0)H.code((0,u._)`${d.default.self}.logger.log(${Oe})`);else if(typeof ce.$comment=="function"){const je=(0,u.str)`${pe}/$comment`,Ye=H.scopeValue("root",{ref:ne.root});H.code((0,u._)`${d.default.self}.opts.$comment(${Oe}, ${je}, ${Ye}.schema)`)}}function J(H){const{gen:ne,schemaEnv:_e,validateName:pe,ValidationError:ce,opts:Oe}=H;_e.$async?ne.if((0,u._)`${d.default.errors} === 0`,()=>ne.return(d.default.data),()=>ne.throw((0,u._)`new ${ce}(${d.default.vErrors})`)):(ne.assign((0,u._)`${pe}.errors`,d.default.vErrors),Oe.unevaluated&&ie(H),ne.return((0,u._)`${d.default.errors} === 0`))}function ie({gen:H,evaluated:ne,props:_e,items:pe}){_e instanceof u.Name&&H.assign((0,u._)`${ne}.props`,_e),pe instanceof u.Name&&H.assign((0,u._)`${ne}.items`,pe)}function F(H,ne,_e,pe){const{gen:ce,schema:Oe,data:je,allErrors:Ye,opts:He,self:Xe}=H,{RULES:Z}=Xe;if(Oe.$ref&&(He.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Oe,Z))){ce.block(()=>me(H,"$ref",Z.all.$ref.definition));return}He.jtd||ae(H,ne),ce.block(()=>{for(const re of Z.rules)te(re);te(Z.post)});function te(re){(0,n.shouldUseGroup)(Oe,re)&&(re.type?(ce.if((0,r.checkDataType)(re.type,je,He.strictNumbers)),X(H,re),ne.length===1&&ne[0]===re.type&&_e&&(ce.else(),(0,r.reportTypeError)(H)),ce.endIf()):X(H,re),Ye||ce.if((0,u._)`${d.default.errors} === ${pe||0}`))}}function X(H,ne){const{gen:_e,schema:pe,opts:{useDefaults:ce}}=H;ce&&(0,a.assignDefaults)(H,ne.type),_e.block(()=>{for(const Oe of ne.rules)(0,n.shouldUseRule)(pe,Oe)&&me(H,Oe.keyword,Oe.definition,ne.type)})}function ae(H,ne){H.schemaEnv.meta||!H.opts.strictTypes||(fe(H,ne),H.opts.allowUnionTypes||K(H,ne),P(H,H.dataTypes))}function fe(H,ne){if(ne.length){if(!H.dataTypes.length){H.dataTypes=ne;return}ne.forEach(_e=>{B(H.dataTypes,_e)||$(H,`type "${_e}" not allowed by context "${H.dataTypes.join(",")}"`)}),L(H,ne)}}function K(H,ne){ne.length>1&&!(ne.length===2&&ne.includes("null"))&&$(H,"use allowUnionTypes to allow union type keyword")}function P(H,ne){const _e=H.self.RULES.all;for(const pe in _e){const ce=_e[pe];if(typeof ce=="object"&&(0,n.shouldUseRule)(H.schema,ce)){const{type:Oe}=ce.definition;Oe.length&&!Oe.some(je=>q(ne,je))&&$(H,`missing type "${Oe.join(",")}" for keyword "${pe}"`)}}}function q(H,ne){return H.includes(ne)||ne==="number"&&H.includes("integer")}function B(H,ne){return H.includes(ne)||ne==="integer"&&H.includes("number")}function L(H,ne){const _e=[];for(const pe of H.dataTypes)B(ne,pe)?_e.push(pe):ne.includes("integer")&&pe==="number"&&_e.push("integer");H.dataTypes=_e}function $(H,ne){const _e=H.schemaEnv.baseId+H.errSchemaPath;ne+=` at "${_e}" (strictTypes)`,(0,m.checkStrictMode)(H,ne,H.opts.strictTypes)}class Q{constructor(ne,_e,pe){if((0,i.validateKeywordUsage)(ne,_e,pe),this.gen=ne.gen,this.allErrors=ne.allErrors,this.keyword=pe,this.data=ne.data,this.schema=ne.schema[pe],this.$data=_e.$data&&ne.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(ne,this.schema,pe,this.$data),this.schemaType=_e.schemaType,this.parentSchema=ne.schema,this.params={},this.it=ne,this.def=_e,this.$data)this.schemaCode=ne.gen.const("vSchema",ke(this.$data,ne));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,_e.schemaType,_e.allowUndefined))throw new Error(`${pe} value must be ${JSON.stringify(_e.schemaType)}`);("code"in _e?_e.trackErrors:_e.errors!==!1)&&(this.errsCount=ne.gen.const("_errs",d.default.errors))}result(ne,_e,pe){this.failResult((0,u.not)(ne),_e,pe)}failResult(ne,_e,pe){this.gen.if(ne),pe?pe():this.error(),_e?(this.gen.else(),_e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ne,_e){this.failResult((0,u.not)(ne),void 0,_e)}fail(ne){if(ne===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(ne),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ne){if(!this.$data)return this.fail(ne);const{schemaCode:_e}=this;this.fail((0,u._)`${_e} !== undefined && (${(0,u.or)(this.invalid$data(),ne)})`)}error(ne,_e,pe){if(_e){this.setParams(_e),this._error(ne,pe),this.setParams({});return}this._error(ne,pe)}_error(ne,_e){(ne?p.reportExtraError:p.reportError)(this,this.def.error,_e)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(ne){this.allErrors||this.gen.if(ne)}setParams(ne,_e){_e?Object.assign(this.params,ne):this.params=ne}block$data(ne,_e,pe=u.nil){this.gen.block(()=>{this.check$data(ne,pe),_e()})}check$data(ne=u.nil,_e=u.nil){if(!this.$data)return;const{gen:pe,schemaCode:ce,schemaType:Oe,def:je}=this;pe.if((0,u.or)((0,u._)`${ce} === undefined`,_e)),ne!==u.nil&&pe.assign(ne,!0),(Oe.length||je.validateSchema)&&(pe.elseIf(this.invalid$data()),this.$dataError(),ne!==u.nil&&pe.assign(ne,!1)),pe.else()}invalid$data(){const{gen:ne,schemaCode:_e,schemaType:pe,def:ce,it:Oe}=this;return(0,u.or)(je(),Ye());function je(){if(pe.length){if(!(_e instanceof u.Name))throw new Error("ajv implementation error");const He=Array.isArray(pe)?pe:[pe];return(0,u._)`${(0,r.checkDataTypes)(He,_e,Oe.opts.strictNumbers,r.DataType.Wrong)}`}return u.nil}function Ye(){if(ce.validateSchema){const He=ne.scopeValue("validate$data",{ref:ce.validateSchema});return(0,u._)`!${He}(${_e})`}return u.nil}}subschema(ne,_e){const pe=(0,c.getSubschema)(this.it,ne);(0,c.extendSubschemaData)(pe,this.it,ne),(0,c.extendSubschemaMode)(pe,ne);const ce={...this.it,...pe,items:void 0,props:void 0};return T(ce,_e),ce}mergeEvaluated(ne,_e){const{it:pe,gen:ce}=this;pe.opts.unevaluated&&(pe.props!==!0&&ne.props!==void 0&&(pe.props=m.mergeEvaluated.props(ce,ne.props,pe.props,_e)),pe.items!==!0&&ne.items!==void 0&&(pe.items=m.mergeEvaluated.items(ce,ne.items,pe.items,_e)))}mergeValidEvaluated(ne,_e){const{it:pe,gen:ce}=this;if(pe.opts.unevaluated&&(pe.props!==!0||pe.items!==!0))return ce.if(_e,()=>this.mergeEvaluated(ne,u.Name)),!0}}Ca.KeywordCxt=Q;function me(H,ne,_e,pe){const ce=new Q(H,_e,ne);"code"in _e?_e.code(ce,pe):ce.$data&&_e.validate?(0,i.funcKeywordCode)(ce,_e):"macro"in _e?(0,i.macroKeywordCode)(ce,_e):(_e.compile||_e.validate)&&(0,i.funcKeywordCode)(ce,_e)}const ye=/^\/(?:[^~]|~0|~1)*$/,Ae=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ke(H,{dataLevel:ne,dataNames:_e,dataPathArr:pe}){let ce,Oe;if(H==="")return d.default.rootData;if(H[0]==="/"){if(!ye.test(H))throw new Error(`Invalid JSON-pointer: ${H}`);ce=H,Oe=d.default.rootData}else{const Xe=Ae.exec(H);if(!Xe)throw new Error(`Invalid JSON-pointer: ${H}`);const Z=+Xe[1];if(ce=Xe[2],ce==="#"){if(Z>=ne)throw new Error(He("property/index",Z));return pe[ne-Z]}if(Z>ne)throw new Error(He("data",Z));if(Oe=_e[ne-Z],!ce)return Oe}let je=Oe;const Ye=ce.split("/");for(const Xe of Ye)Xe&&(Oe=(0,u._)`${Oe}${(0,u.getProperty)((0,m.unescapeJsonPointer)(Xe))}`,je=(0,u._)`${je} && ${Oe}`);return je;function He(Xe,Z){return`Cannot access ${Xe} ${Z} levels up, current level is ${ne}`}}return Ca.getData=ke,Ca}var xh={},b2;function q1(){if(b2)return xh;b2=1,Object.defineProperty(xh,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return xh.default=e,xh}var Th={},w2;function rg(){if(w2)return Th;w2=1,Object.defineProperty(Th,"__esModule",{value:!0});const e=tg();class t extends Error{constructor(r,a,i,c){super(c||`can't resolve reference ${i} from id ${a}`),this.missingRef=(0,e.resolveUrl)(r,a,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Th.default=t,Th}var zr={},S2;function H1(){if(S2)return zr;S2=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.resolveSchema=zr.getCompilingSchema=zr.resolveRef=zr.compileSchema=zr.SchemaEnv=void 0;const e=pt(),t=q1(),n=Hs(),r=tg(),a=Ot(),i=ng();class c{constructor(x){var E;this.refs={},this.dynamicAnchors={};let T;typeof x.schema=="object"&&(T=x.schema),this.schema=x.schema,this.schemaId=x.schemaId,this.root=x.root||this,this.baseId=(E=x.baseId)!==null&&E!==void 0?E:(0,r.normalizeId)(T?.[x.schemaId||"$id"]),this.schemaPath=x.schemaPath,this.localRefs=x.localRefs,this.meta=x.meta,this.$async=T?.$async,this.refs={}}}zr.SchemaEnv=c;function u(w){const x=m.call(this,w);if(x)return x;const E=(0,r.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:T,lines:O}=this.opts.code,{ownProperties:C}=this.opts,I=new e.CodeGen(this.scope,{es5:T,lines:O,ownProperties:C});let N;w.$async&&(N=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const D=I.scopeName("validate");w.validateName=D;const z={gen:I,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:I.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:D,ValidationError:N,schema:w.schema,schemaEnv:w,rootId:E,baseId:w.baseId||E,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let W;try{this._compilations.add(w),(0,i.validateFunctionCode)(z),I.optimize(this.opts.code.optimize);const V=I.toString();W=`${I.scopeRefs(n.default.scope)}return ${V}`,this.opts.code.process&&(W=this.opts.code.process(W,w));const U=new Function(`${n.default.self}`,`${n.default.scope}`,W)(this,this.scope.get());if(this.scope.value(D,{ref:U}),U.errors=null,U.schema=w.schema,U.schemaEnv=w,w.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:D,validateCode:V,scopeValues:I._values}),this.opts.unevaluated){const{props:J,items:ie}=z;U.evaluated={props:J instanceof e.Name?void 0:J,items:ie instanceof e.Name?void 0:ie,dynamicProps:J instanceof e.Name,dynamicItems:ie instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return w.validate=U,w}catch(V){throw delete w.validate,delete w.validateName,W&&this.logger.error("Error compiling schema, function code:",W),V}finally{this._compilations.delete(w)}}zr.compileSchema=u;function d(w,x,E){var T;E=(0,r.resolveUrl)(this.opts.uriResolver,x,E);const O=w.refs[E];if(O)return O;let C=g.call(this,w,E);if(C===void 0){const I=(T=w.localRefs)===null||T===void 0?void 0:T[E],{schemaId:N}=this.opts;I&&(C=new c({schema:I,schemaId:N,root:w,baseId:x}))}if(C!==void 0)return w.refs[E]=f.call(this,C)}zr.resolveRef=d;function f(w){return(0,r.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:u.call(this,w)}function m(w){for(const x of this._compilations)if(p(x,w))return x}zr.getCompilingSchema=m;function p(w,x){return w.schema===x.schema&&w.root===x.root&&w.baseId===x.baseId}function g(w,x){let E;for(;typeof(E=this.refs[x])=="string";)x=E;return E||this.schemas[x]||y.call(this,w,x)}function y(w,x){const E=this.opts.uriResolver.parse(x),T=(0,r._getFullPath)(this.opts.uriResolver,E);let O=(0,r.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&T===O)return S.call(this,E,w);const C=(0,r.normalizeId)(T),I=this.refs[C]||this.schemas[C];if(typeof I=="string"){const N=y.call(this,w,I);return typeof N?.schema!="object"?void 0:S.call(this,E,N)}if(typeof I?.schema=="object"){if(I.validate||u.call(this,I),C===(0,r.normalizeId)(x)){const{schema:N}=I,{schemaId:D}=this.opts,z=N[D];return z&&(O=(0,r.resolveUrl)(this.opts.uriResolver,O,z)),new c({schema:N,schemaId:D,root:w,baseId:O})}return S.call(this,E,I)}}zr.resolveSchema=y;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(w,{baseId:x,schema:E,root:T}){var O;if(((O=w.fragment)===null||O===void 0?void 0:O[0])!=="/")return;for(const N of w.fragment.slice(1).split("/")){if(typeof E=="boolean")return;const D=E[(0,a.unescapeFragment)(N)];if(D===void 0)return;E=D;const z=typeof E=="object"&&E[this.opts.schemaId];!b.has(N)&&z&&(x=(0,r.resolveUrl)(this.opts.uriResolver,x,z))}let C;if(typeof E!="boolean"&&E.$ref&&!(0,a.schemaHasRulesButRef)(E,this.RULES)){const N=(0,r.resolveUrl)(this.opts.uriResolver,x,E.$ref);C=y.call(this,T,N)}const{schemaId:I}=this.opts;if(C=C||new c({schema:E,schemaId:I,root:T,baseId:x}),C.schema!==C.root.schema)return C}return zr}const RX="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",xX="Meta-schema for $data reference (JSON AnySchema extension proposal)",TX="object",OX=["$data"],CX={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},AX=!1,IX={$id:RX,description:xX,type:TX,required:OX,properties:CX,additionalProperties:AX};var Oh={},Ou={exports:{}},M0,E2;function sP(){if(E2)return M0;E2=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 y="",b=0,S=0;for(S=0;S<g.length;S++)if(b=g[S].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";y+=g[S];break}for(S+=1;S<g.length;S++){if(b=g[S].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";y+=g[S]}return y}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(g){return g.length=0,!0}function i(g,y,b){if(g.length){const S=n(g);if(S!=="")y.push(S);else return b.error=!0,!1;g.length=0}return!0}function c(g){let y=0;const b={error:!1,address:"",zone:""},S=[],w=[];let x=!1,E=!1,T=i;for(let O=0;O<g.length;O++){const C=g[O];if(!(C==="["||C==="]"))if(C===":"){if(x===!0&&(E=!0),!T(w,S,b))break;if(++y>7){b.error=!0;break}O>0&&g[O-1]===":"&&(x=!0),S.push(":");continue}else if(C==="%"){if(!T(w,S,b))break;T=a}else{w.push(C);continue}}return w.length&&(T===a?b.zone=w.join(""):E?S.push(w.join("")):S.push(n(w))),b.address=S.join(""),b}function u(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const y=c(g);if(y.error)return{host:g,isIPV6:!1};{let b=y.address,S=y.address;return y.zone&&(b+="%"+y.zone,S+="%25"+y.zone),{host:b,isIPV6:!0,escapedHost:S}}}function d(g,y){let b=0;for(let S=0;S<g.length;S++)g[S]===y&&b++;return b}function f(g){let y=g;const b=[];let S=-1,w=0;for(;w=y.length;){if(w===1){if(y===".")break;if(y==="/"){b.push("/");break}else{b.push(y);break}}else if(w===2){if(y[0]==="."){if(y[1]===".")break;if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&(y[1]==="."||y[1]==="/")){b.push("/");break}}else if(w===3&&y==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(y[0]==="."){if(y[1]==="."){if(y[2]==="/"){y=y.slice(3);continue}}else if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&y[1]==="."){if(y[2]==="/"){y=y.slice(2);continue}else if(y[2]==="."&&y[3]==="/"){y=y.slice(3),b.length!==0&&b.pop();continue}}if((S=y.indexOf("/",1))===-1){b.push(y);break}else b.push(y.slice(0,S)),y=y.slice(S)}return b.join("")}function m(g,y){const b=y!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=b(g.scheme)),g.userinfo!==void 0&&(g.userinfo=b(g.userinfo)),g.host!==void 0&&(g.host=b(g.host)),g.path!==void 0&&(g.path=b(g.path)),g.query!==void 0&&(g.query=b(g.query)),g.fragment!==void 0&&(g.fragment=b(g.fragment)),g}function p(g){const y=[];if(g.userinfo!==void 0&&(y.push(g.userinfo),y.push("@")),g.host!==void 0){let b=unescape(g.host);if(!t(b)){const S=u(b);S.isIPV6===!0?b=`[${S.escapedHost}]`:b=g.host}y.push(b)}return(typeof g.port=="number"||typeof g.port=="string")&&(y.push(":"),y.push(String(g.port))),y.length?y.join(""):void 0}return M0={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:m,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:n},M0}var P0,R2;function kX(){if(R2)return P0;R2=1;const{isUUID:e}=sP(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(C){return n.indexOf(C)!==-1}function a(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function i(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function c(C){const I=String(C.scheme).toLowerCase()==="https";return(C.port===(I?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function u(C){return C.secure=a(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function d(C){if((C.port===(a(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[I,N]=C.resourceName.split("?");C.path=I&&I!=="/"?I:void 0,C.query=N,C.resourceName=void 0}return C.fragment=void 0,C}function f(C,I){if(!C.path)return C.error="URN can not be parsed",C;const N=C.path.match(t);if(N){const D=I.scheme||C.scheme||"urn";C.nid=N[1].toLowerCase(),C.nss=N[2];const z=`${D}:${I.nid||C.nid}`,W=O(z);C.path=void 0,W&&(C=W.parse(C,I))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,I){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const N=I.scheme||C.scheme||"urn",D=C.nid.toLowerCase(),z=`${N}:${I.nid||D}`,W=O(z);W&&(C=W.serialize(C,I));const V=C,G=C.nss;return V.path=`${D||I.nid}:${G}`,I.skipEscape=!0,V}function p(C,I){const N=C;return N.uuid=N.nss,N.nss=void 0,!I.tolerant&&(!N.uuid||!e(N.uuid))&&(N.error=N.error||"UUID is not valid."),N}function g(C){const I=C;return I.nss=(C.uuid||"").toLowerCase(),I}const y={scheme:"http",domainHost:!0,parse:i,serialize:c},b={scheme:"https",domainHost:y.domainHost,parse:i,serialize:c},S={scheme:"ws",domainHost:!0,parse:u,serialize:d},w={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},T={http:y,https:b,ws:S,wss:w,urn:{scheme:"urn",parse:f,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(T,null);function O(C){return C&&(T[C]||T[C.toLowerCase()])||void 0}return P0={wsIsSecure:a,SCHEMES:T,isValidSchemeName:r,getSchemeHandler:O},P0}var x2;function NX(){if(x2)return Ou.exports;x2=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:a,nonSimpleDomain:i}=sP(),{SCHEMES:c,getSchemeHandler:u}=kX();function d(w,x){return typeof w=="string"?w=g(b(w,x),x):typeof w=="object"&&(w=b(g(w,x),x)),w}function f(w,x,E){const T=E?Object.assign({scheme:"null"},E):{scheme:"null"},O=m(b(w,T),b(x,T),T,!0);return T.skipEscape=!0,g(O,T)}function m(w,x,E,T){const O={};return T||(w=b(g(w,E),E),x=b(g(x,E),E)),E=E||{},!E.tolerant&&x.scheme?(O.scheme=x.scheme,O.userinfo=x.userinfo,O.host=x.host,O.port=x.port,O.path=t(x.path||""),O.query=x.query):(x.userinfo!==void 0||x.host!==void 0||x.port!==void 0?(O.userinfo=x.userinfo,O.host=x.host,O.port=x.port,O.path=t(x.path||""),O.query=x.query):(x.path?(x.path[0]==="/"?O.path=t(x.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?O.path="/"+x.path:w.path?O.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+x.path:O.path=x.path,O.path=t(O.path)),O.query=x.query):(O.path=w.path,x.query!==void 0?O.query=x.query:O.query=w.query),O.userinfo=w.userinfo,O.host=w.host,O.port=w.port),O.scheme=w.scheme),O.fragment=x.fragment,O}function p(w,x,E){return typeof w=="string"?(w=unescape(w),w=g(r(b(w,E),!0),{...E,skipEscape:!0})):typeof w=="object"&&(w=g(r(w,!0),{...E,skipEscape:!0})),typeof x=="string"?(x=unescape(x),x=g(r(b(x,E),!0),{...E,skipEscape:!0})):typeof x=="object"&&(x=g(r(x,!0),{...E,skipEscape:!0})),w.toLowerCase()===x.toLowerCase()}function g(w,x){const E={host:w.host,scheme:w.scheme,userinfo:w.userinfo,port:w.port,path:w.path,query:w.query,nid:w.nid,nss:w.nss,uuid:w.uuid,fragment:w.fragment,reference:w.reference,resourceName:w.resourceName,secure:w.secure,error:""},T=Object.assign({},x),O=[],C=u(T.scheme||E.scheme);C&&C.serialize&&C.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&&O.push(E.scheme,":");const I=n(E);if(I!==void 0&&(T.reference!=="suffix"&&O.push("//"),O.push(I),E.path&&E.path[0]!=="/"&&O.push("/")),E.path!==void 0){let N=E.path;!T.absolutePath&&(!C||!C.absolutePath)&&(N=t(N)),I===void 0&&N[0]==="/"&&N[1]==="/"&&(N="/%2F"+N.slice(2)),O.push(N)}return E.query!==void 0&&O.push("?",E.query),E.fragment!==void 0&&O.push("#",E.fragment),O.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(w,x){const E=Object.assign({},x),T={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let O=!1;E.reference==="suffix"&&(E.scheme?w=E.scheme+":"+w:w="//"+w);const C=w.match(y);if(C){if(T.scheme=C[1],T.userinfo=C[3],T.host=C[4],T.port=parseInt(C[5],10),T.path=C[6]||"",T.query=C[7],T.fragment=C[8],isNaN(T.port)&&(T.port=C[5]),T.host)if(a(T.host)===!1){const D=e(T.host);T.host=D.host.toLowerCase(),O=D.isIPV6}else O=!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 I=u(E.scheme||T.scheme);if(!E.unicodeSupport&&(!I||!I.unicodeSupport)&&T.host&&(E.domainHost||I&&I.domainHost)&&O===!1&&i(T.host))try{T.host=URL.domainToASCII(T.host.toLowerCase())}catch(N){T.error=T.error||"Host's domain name can not be converted to ASCII: "+N}(!I||I&&!I.skipNormalize)&&(w.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)))),I&&I.parse&&I.parse(T,E)}else T.error=T.error||"URI can not be parsed.";return T}const S={SCHEMES:c,normalize:d,resolve:f,resolveComponent:m,equal:p,serialize:g,parse:b};return Ou.exports=S,Ou.exports.default=S,Ou.exports.fastUri=S,Ou.exports}var T2;function MX(){if(T2)return Oh;T2=1,Object.defineProperty(Oh,"__esModule",{value:!0});const e=NX();return e.code='require("ajv/dist/runtime/uri").default',Oh.default=e,Oh}var O2;function PX(){return O2||(O2=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=ng();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=pt();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=q1(),a=rg(),i=rP(),c=H1(),u=pt(),d=tg(),f=sm(),m=Ot(),p=IX,g=MX(),y=(K,P)=>new RegExp(K,P);y.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={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."},x={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},E=200;function T(K){var P,q,B,L,$,Q,me,ye,Ae,ke,H,ne,_e,pe,ce,Oe,je,Ye,He,Xe,Z,te,re,Se,Te;const Re=K.strict,Ne=(P=K.code)===null||P===void 0?void 0:P.optimize,ot=Ne===!0||Ne===void 0?1:Ne||0,it=(B=(q=K.code)===null||q===void 0?void 0:q.regExp)!==null&&B!==void 0?B:y,Dt=(L=K.uriResolver)!==null&&L!==void 0?L:g.default;return{strictSchema:(Q=($=K.strictSchema)!==null&&$!==void 0?$:Re)!==null&&Q!==void 0?Q:!0,strictNumbers:(ye=(me=K.strictNumbers)!==null&&me!==void 0?me:Re)!==null&&ye!==void 0?ye:!0,strictTypes:(ke=(Ae=K.strictTypes)!==null&&Ae!==void 0?Ae:Re)!==null&&ke!==void 0?ke:"log",strictTuples:(ne=(H=K.strictTuples)!==null&&H!==void 0?H:Re)!==null&&ne!==void 0?ne:"log",strictRequired:(pe=(_e=K.strictRequired)!==null&&_e!==void 0?_e:Re)!==null&&pe!==void 0?pe:!1,code:K.code?{...K.code,optimize:ot,regExp:it}:{optimize:ot,regExp:it},loopRequired:(ce=K.loopRequired)!==null&&ce!==void 0?ce:E,loopEnum:(Oe=K.loopEnum)!==null&&Oe!==void 0?Oe:E,meta:(je=K.meta)!==null&&je!==void 0?je:!0,messages:(Ye=K.messages)!==null&&Ye!==void 0?Ye:!0,inlineRefs:(He=K.inlineRefs)!==null&&He!==void 0?He:!0,schemaId:(Xe=K.schemaId)!==null&&Xe!==void 0?Xe:"$id",addUsedSchema:(Z=K.addUsedSchema)!==null&&Z!==void 0?Z:!0,validateSchema:(te=K.validateSchema)!==null&&te!==void 0?te:!0,validateFormats:(re=K.validateFormats)!==null&&re!==void 0?re:!0,unicodeRegExp:(Se=K.unicodeRegExp)!==null&&Se!==void 0?Se:!0,int32range:(Te=K.int32range)!==null&&Te!==void 0?Te:!0,uriResolver:Dt}}class O{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...T(P)};const{es5:q,lines:B}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:S,es5:q,lines:B}),this.logger=G(P.logger);const L=P.validateFormats;P.validateFormats=!1,this.RULES=(0,i.getRules)(),C.call(this,w,P,"NOT SUPPORTED"),C.call(this,x,P,"DEPRECATED","warn"),this._metaOpts=W.call(this),P.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&z.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),N.call(this),P.validateFormats=L}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:q,schemaId:B}=this.opts;let L=p;B==="id"&&(L={...p},L.id=L.$id,delete L.$id),q&&P&&this.addMetaSchema(L,L[B],!1)}defaultMeta(){const{meta:P,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[q]||P:void 0}validate(P,q){let B;if(typeof P=="string"){if(B=this.getSchema(P),!B)throw new Error(`no schema with key or ref "${P}"`)}else B=this.compile(P);const L=B(q);return"$async"in B||(this.errors=B.errors),L}compile(P,q){const B=this._addSchema(P,q);return B.validate||this._compileSchemaEnv(B)}compileAsync(P,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:B}=this.opts;return L.call(this,P,q);async function L(ke,H){await $.call(this,ke.$schema);const ne=this._addSchema(ke,H);return ne.validate||Q.call(this,ne)}async function $(ke){ke&&!this.getSchema(ke)&&await L.call(this,{$ref:ke},!0)}async function Q(ke){try{return this._compileSchemaEnv(ke)}catch(H){if(!(H instanceof a.default))throw H;return me.call(this,H),await ye.call(this,H.missingSchema),Q.call(this,ke)}}function me({missingSchema:ke,missingRef:H}){if(this.refs[ke])throw new Error(`AnySchema ${ke} is loaded but ${H} cannot be resolved`)}async function ye(ke){const H=await Ae.call(this,ke);this.refs[ke]||await $.call(this,H.$schema),this.refs[ke]||this.addSchema(H,ke,q)}async function Ae(ke){const H=this._loading[ke];if(H)return H;try{return await(this._loading[ke]=B(ke))}finally{delete this._loading[ke]}}}addSchema(P,q,B,L=this.opts.validateSchema){if(Array.isArray(P)){for(const Q of P)this.addSchema(Q,void 0,B,L);return this}let $;if(typeof P=="object"){const{schemaId:Q}=this.opts;if($=P[Q],$!==void 0&&typeof $!="string")throw new Error(`schema ${Q} must be string`)}return q=(0,d.normalizeId)(q||$),this._checkUnique(q),this.schemas[q]=this._addSchema(P,B,q,L,!0),this}addMetaSchema(P,q,B=this.opts.validateSchema){return this.addSchema(P,q,!0,B),this}validateSchema(P,q){if(typeof P=="boolean")return!0;let B;if(B=P.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const L=this.validate(B,P);if(!L&&q){const $="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error($);else throw new Error($)}return L}getSchema(P){let q;for(;typeof(q=I.call(this,P))=="string";)P=q;if(q===void 0){const{schemaId:B}=this.opts,L=new c.SchemaEnv({schema:{},schemaId:B});if(q=c.resolveSchema.call(this,L,P),!q)return;this.refs[P]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=I.call(this,P);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const q=P;this._cache.delete(q);let B=P[this.opts.schemaId];return B&&(B=(0,d.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const q of P)this.addKeyword(q);return this}addKeyword(P,q){let B;if(typeof P=="string")B=P,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=B);else if(typeof P=="object"&&q===void 0){if(q=P,B=q.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(J.call(this,B,q),!q)return(0,m.eachItem)(B,$=>ie.call(this,$)),this;X.call(this,q);const L={...q,type:(0,f.getJSONTypes)(q.type),schemaType:(0,f.getJSONTypes)(q.schemaType)};return(0,m.eachItem)(B,L.type.length===0?$=>ie.call(this,$,L):$=>L.type.forEach(Q=>ie.call(this,$,L,Q))),this}getKeyword(P){const q=this.RULES.all[P];return typeof q=="object"?q.definition:!!q}removeKeyword(P){const{RULES:q}=this;delete q.keywords[P],delete q.all[P];for(const B of q.rules){const L=B.rules.findIndex($=>$.keyword===P);L>=0&&B.rules.splice(L,1)}return this}addFormat(P,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[P]=q,this}errorsText(P=this.errors,{separator:q=", ",dataVar:B="data"}={}){return!P||P.length===0?"No errors":P.map(L=>`${B}${L.instancePath} ${L.message}`).reduce((L,$)=>L+q+$)}$dataMetaSchema(P,q){const B=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const L of q){const $=L.split("/").slice(1);let Q=P;for(const me of $)Q=Q[me];for(const me in B){const ye=B[me];if(typeof ye!="object")continue;const{$data:Ae}=ye.definition,ke=Q[me];Ae&&ke&&(Q[me]=fe(ke))}}return P}_removeAllSchemas(P,q){for(const B in P){const L=P[B];(!q||q.test(B))&&(typeof L=="string"?delete P[B]:L&&!L.meta&&(this._cache.delete(L.schema),delete P[B]))}}_addSchema(P,q,B,L=this.opts.validateSchema,$=this.opts.addUsedSchema){let Q;const{schemaId:me}=this.opts;if(typeof P=="object")Q=P[me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let ye=this._cache.get(P);if(ye!==void 0)return ye;B=(0,d.normalizeId)(Q||B);const Ae=d.getSchemaRefs.call(this,P,B);return ye=new c.SchemaEnv({schema:P,schemaId:me,meta:q,baseId:B,localRefs:Ae}),this._cache.set(ye.schema,ye),$&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=ye),L&&this.validateSchema(P,!0),ye}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):c.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const q=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,P)}finally{this.opts=q}}}O.ValidationError=r.default,O.MissingRefError=a.default,e.default=O;function C(K,P,q,B="error"){for(const L in K){const $=L;$ in P&&this.logger[B](`${q}: option ${L}. ${K[$]}`)}}function I(K){return K=(0,d.normalizeId)(K),this.schemas[K]||this.refs[K]}function N(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const P in K)this.addSchema(K[P],P)}function D(){for(const K in this.opts.formats){const P=this.opts.formats[K];P&&this.addFormat(K,P)}}function z(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in K){const q=K[P];q.keyword||(q.keyword=P),this.addKeyword(q)}}function W(){const K={...this.opts};for(const P of b)delete K[P];return K}const V={log(){},warn(){},error(){}};function G(K){if(K===!1)return V;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function J(K,P){const{RULES:q}=this;if((0,m.eachItem)(K,B=>{if(q.keywords[B])throw new Error(`Keyword ${B} is already defined`);if(!U.test(B))throw new Error(`Keyword ${B} has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function ie(K,P,q){var B;const L=P?.post;if(q&&L)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:$}=this;let Q=L?$.post:$.rules.find(({type:ye})=>ye===q);if(Q||(Q={type:q,rules:[]},$.rules.push(Q)),$.keywords[K]=!0,!P)return;const me={keyword:K,definition:{...P,type:(0,f.getJSONTypes)(P.type),schemaType:(0,f.getJSONTypes)(P.schemaType)}};P.before?F.call(this,Q,me,P.before):Q.rules.push(me),$.all[K]=me,(B=P.implements)===null||B===void 0||B.forEach(ye=>this.addKeyword(ye))}function F(K,P,q){const B=K.rules.findIndex(L=>L.keyword===q);B>=0?K.rules.splice(B,0,P):(K.rules.push(P),this.logger.warn(`rule ${q} is not defined`))}function X(K){let{metaSchema:P}=K;P!==void 0&&(K.$data&&this.opts.$data&&(P=fe(P)),K.validateSchema=this.compile(P,!0))}const ae={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(K){return{anyOf:[K,ae]}}})(T0)),T0}var Ch={},Ah={},Ih={},C2;function DX(){if(C2)return Ih;C2=1,Object.defineProperty(Ih,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Ih.default=e,Ih}var ys={},A2;function LX(){if(A2)return ys;A2=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.callRef=ys.getValidate=void 0;const e=rg(),t=Vo(),n=pt(),r=Hs(),a=H1(),i=Ot(),c={keyword:"$ref",schemaType:"string",code(f){const{gen:m,schema:p,it:g}=f,{baseId:y,schemaEnv:b,validateName:S,opts:w,self:x}=g,{root:E}=b;if((p==="#"||p==="#/")&&y===E.baseId)return O();const T=a.resolveRef.call(x,E,y,p);if(T===void 0)throw new e.default(g.opts.uriResolver,y,p);if(T instanceof a.SchemaEnv)return C(T);return I(T);function O(){if(b===E)return d(f,S,b,b.$async);const N=m.scopeValue("root",{ref:E});return d(f,(0,n._)`${N}.validate`,E,E.$async)}function C(N){const D=u(f,N);d(f,D,N,N.$async)}function I(N){const D=m.scopeValue("schema",w.code.source===!0?{ref:N,code:(0,n.stringify)(N)}:{ref:N}),z=m.name("valid"),W=f.subschema({schema:N,dataTypes:[],schemaPath:n.nil,topSchemaRef:D,errSchemaPath:p},z);f.mergeEvaluated(W),f.ok(z)}}};function u(f,m){const{gen:p}=f;return m.validate?p.scopeValue("validate",{ref:m.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:m})}.validate`}ys.getValidate=u;function d(f,m,p,g){const{gen:y,it:b}=f,{allErrors:S,schemaEnv:w,opts:x}=b,E=x.passContext?r.default.this:n.nil;g?T():O();function T(){if(!w.$async)throw new Error("async schema referenced by sync schema");const N=y.let("valid");y.try(()=>{y.code((0,n._)`await ${(0,t.callValidateCode)(f,m,E)}`),I(m),S||y.assign(N,!0)},D=>{y.if((0,n._)`!(${D} instanceof ${b.ValidationError})`,()=>y.throw(D)),C(D),S||y.assign(N,!1)}),f.ok(N)}function O(){f.result((0,t.callValidateCode)(f,m,E),()=>I(m),()=>C(m))}function C(N){const D=(0,n._)`${N}.errors`;y.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${D} : ${r.default.vErrors}.concat(${D})`),y.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function I(N){var D;if(!b.opts.unevaluated)return;const z=(D=p?.validate)===null||D===void 0?void 0:D.evaluated;if(b.props!==!0)if(z&&!z.dynamicProps)z.props!==void 0&&(b.props=i.mergeEvaluated.props(y,z.props,b.props));else{const W=y.var("props",(0,n._)`${N}.evaluated.props`);b.props=i.mergeEvaluated.props(y,W,b.props,n.Name)}if(b.items!==!0)if(z&&!z.dynamicItems)z.items!==void 0&&(b.items=i.mergeEvaluated.items(y,z.items,b.items));else{const W=y.var("items",(0,n._)`${N}.evaluated.items`);b.items=i.mergeEvaluated.items(y,W,b.items,n.Name)}}}return ys.callRef=d,ys.default=c,ys}var I2;function jX(){if(I2)return Ah;I2=1,Object.defineProperty(Ah,"__esModule",{value:!0});const e=DX(),t=LX(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ah.default=n,Ah}var kh={},Nh={},k2;function $X(){if(k2)return Nh;k2=1,Object.defineProperty(Nh,"__esModule",{value:!0});const e=pt(),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:i,schemaCode:c})=>(0,e.str)`must be ${n[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${c}}`},a={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:c,data:u,schemaCode:d}=i;i.fail$data((0,e._)`${u} ${n[c].fail} ${d} || isNaN(${u})`)}};return Nh.default=a,Nh}var Mh={},N2;function UX(){if(N2)return Mh;N2=1,Object.defineProperty(Mh,"__esModule",{value:!0});const e=pt(),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:a,data:i,schemaCode:c,it:u}=r,d=u.opts.multipleOfPrecision,f=a.let("res"),m=d?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${d}`:(0,e._)`${f} !== parseInt(${f})`;r.fail$data((0,e._)`(${c} === 0 || (${f} = ${i}/${c}, ${m}))`)}};return Mh.default=n,Mh}var Ph={},Dh={},M2;function zX(){if(M2)return Dh;M2=1,Object.defineProperty(Dh,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,a=0,i;for(;a<n;)r++,i=t.charCodeAt(a++),i>=55296&&i<=56319&&a<n&&(i=t.charCodeAt(a),(i&64512)===56320&&a++);return r}return Dh.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Dh}var P2;function VX(){if(P2)return Ph;P2=1,Object.defineProperty(Ph,"__esModule",{value:!0});const e=pt(),t=Ot(),n=zX(),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:c}){const u=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:c,data:u,schemaCode:d,it:f}=i,m=c==="maxLength"?e.operators.GT:e.operators.LT,p=f.opts.unicode===!1?(0,e._)`${u}.length`:(0,e._)`${(0,t.useFunc)(i.gen,n.default)}(${u})`;i.fail$data((0,e._)`${p} ${m} ${d}`)}};return Ph.default=a,Ph}var Lh={},D2;function FX(){if(D2)return Lh;D2=1,Object.defineProperty(Lh,"__esModule",{value:!0});const e=Vo(),t=Ot(),n=pt(),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},code(i){const{gen:c,data:u,$data:d,schema:f,schemaCode:m,it:p}=i,g=p.opts.unicodeRegExp?"u":"";if(d){const{regExp:y}=p.opts.code,b=y.code==="new RegExp"?(0,n._)`new RegExp`:(0,t.useFunc)(c,y),S=c.let("valid");c.try(()=>c.assign(S,(0,n._)`${b}(${m}, ${g}).test(${u})`),()=>c.assign(S,!1)),i.fail$data((0,n._)`!${S}`)}else{const y=(0,e.usePattern)(i,f);i.fail$data((0,n._)`!${y}.test(${u})`)}}};return Lh.default=a,Lh}var jh={},L2;function BX(){if(L2)return jh;L2=1,Object.defineProperty(jh,"__esModule",{value:!0});const e=pt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:a}){const i=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:a,data:i,schemaCode:c}=r,u=a==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${i}).length ${u} ${c}`)}};return jh.default=n,jh}var $h={},j2;function qX(){if(j2)return $h;j2=1,Object.defineProperty($h,"__esModule",{value:!0});const e=Vo(),t=pt(),n=Ot(),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:c,schema:u,schemaCode:d,data:f,$data:m,it:p}=i,{opts:g}=p;if(!m&&u.length===0)return;const y=u.length>=g.loopRequired;if(p.allErrors?b():S(),g.strictRequired){const E=i.parentSchema.properties,{definedProperties:T}=i.it;for(const O of u)if(E?.[O]===void 0&&!T.has(O)){const C=p.schemaEnv.baseId+p.errSchemaPath,I=`required property "${O}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,I,p.opts.strictRequired)}}function b(){if(y||m)i.block$data(t.nil,w);else for(const E of u)(0,e.checkReportMissingProp)(i,E)}function S(){const E=c.let("missing");if(y||m){const T=c.let("valid",!0);i.block$data(T,()=>x(E,T)),i.ok(T)}else c.if((0,e.checkMissingProp)(i,u,E)),(0,e.reportMissingProp)(i,E),c.else()}function w(){c.forOf("prop",d,E=>{i.setParams({missingProperty:E}),c.if((0,e.noPropertyInData)(c,f,E,g.ownProperties),()=>i.error())})}function x(E,T){i.setParams({missingProperty:E}),c.forOf(E,d,()=>{c.assign(T,(0,e.propertyInData)(c,f,E,g.ownProperties)),c.if((0,t.not)(T),()=>{i.error(),c.break()})},t.nil)}}};return $h.default=a,$h}var Uh={},$2;function HX(){if($2)return Uh;$2=1,Object.defineProperty(Uh,"__esModule",{value:!0});const e=pt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:a}){const i=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:a,data:i,schemaCode:c}=r,u=a==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${i}.length ${u} ${c}`)}};return Uh.default=n,Uh}var zh={},Vh={},U2;function G1(){if(U2)return Vh;U2=1,Object.defineProperty(Vh,"__esModule",{value:!0});const e=aP();return e.code='require("ajv/dist/runtime/equal").default',Vh.default=e,Vh}var z2;function GX(){if(z2)return zh;z2=1,Object.defineProperty(zh,"__esModule",{value:!0});const e=sm(),t=pt(),n=Ot(),r=G1(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:u}})=>(0,t.str)`must NOT have duplicate items (items ## ${u} and ${c} are identical)`,params:({params:{i:c,j:u}})=>(0,t._)`{i: ${c}, j: ${u}}`},code(c){const{gen:u,data:d,$data:f,schema:m,parentSchema:p,schemaCode:g,it:y}=c;if(!f&&!m)return;const b=u.let("valid"),S=p.items?(0,e.getSchemaTypes)(p.items):[];c.block$data(b,w,(0,t._)`${g} === false`),c.ok(b);function w(){const O=u.let("i",(0,t._)`${d}.length`),C=u.let("j");c.setParams({i:O,j:C}),u.assign(b,!0),u.if((0,t._)`${O} > 1`,()=>(x()?E:T)(O,C))}function x(){return S.length>0&&!S.some(O=>O==="object"||O==="array")}function E(O,C){const I=u.name("item"),N=(0,e.checkDataTypes)(S,I,y.opts.strictNumbers,e.DataType.Wrong),D=u.const("indices",(0,t._)`{}`);u.for((0,t._)`;${O}--;`,()=>{u.let(I,(0,t._)`${d}[${O}]`),u.if(N,(0,t._)`continue`),S.length>1&&u.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),u.if((0,t._)`typeof ${D}[${I}] == "number"`,()=>{u.assign(C,(0,t._)`${D}[${I}]`),c.error(),u.assign(b,!1).break()}).code((0,t._)`${D}[${I}] = ${O}`)})}function T(O,C){const I=(0,n.useFunc)(u,r.default),N=u.name("outer");u.label(N).for((0,t._)`;${O}--;`,()=>u.for((0,t._)`${C} = ${O}; ${C}--;`,()=>u.if((0,t._)`${I}(${d}[${O}], ${d}[${C}])`,()=>{c.error(),u.assign(b,!1).break(N)})))}}};return zh.default=i,zh}var Fh={},V2;function ZX(){if(V2)return Fh;V2=1,Object.defineProperty(Fh,"__esModule",{value:!0});const e=pt(),t=Ot(),n=G1(),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:c,data:u,$data:d,schemaCode:f,schema:m}=i;d||m&&typeof m=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(c,n.default)}(${u}, ${f})`):i.fail((0,e._)`${m} !== ${u}`)}};return Fh.default=a,Fh}var Bh={},F2;function KX(){if(F2)return Bh;F2=1,Object.defineProperty(Bh,"__esModule",{value:!0});const e=pt(),t=Ot(),n=G1(),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:c,data:u,$data:d,schema:f,schemaCode:m,it:p}=i;if(!d&&f.length===0)throw new Error("enum must have non-empty array");const g=f.length>=p.opts.loopEnum;let y;const b=()=>y??(y=(0,t.useFunc)(c,n.default));let S;if(g||d)S=c.let("valid"),i.block$data(S,w);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const E=c.const("vSchema",m);S=(0,e.or)(...f.map((T,O)=>x(E,O)))}i.pass(S);function w(){c.assign(S,!1),c.forOf("v",m,E=>c.if((0,e._)`${b()}(${u}, ${E})`,()=>c.assign(S,!0).break()))}function x(E,T){const O=f[T];return typeof O=="object"&&O!==null?(0,e._)`${b()}(${u}, ${E}[${T}])`:(0,e._)`${u} === ${O}`}}};return Bh.default=a,Bh}var B2;function WX(){if(B2)return kh;B2=1,Object.defineProperty(kh,"__esModule",{value:!0});const e=$X(),t=UX(),n=VX(),r=FX(),a=BX(),i=qX(),c=HX(),u=GX(),d=ZX(),f=KX(),m=[e.default,t.default,n.default,r.default,a.default,i.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];return kh.default=m,kh}var qh={},Vc={},q2;function iP(){if(q2)return Vc;q2=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.validateAdditionalItems=void 0;const e=pt(),t=Ot(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:c,it:u}=i,{items:d}=c;if(!Array.isArray(d)){(0,t.checkStrictMode)(u,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(i,d)}};function a(i,c){const{gen:u,schema:d,data:f,keyword:m,it:p}=i;p.items=!0;const g=u.const("len",(0,e._)`${f}.length`);if(d===!1)i.setParams({len:c.length}),i.pass((0,e._)`${g} <= ${c.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(p,d)){const b=u.var("valid",(0,e._)`${g} <= ${c.length}`);u.if((0,e.not)(b),()=>y(b)),i.ok(b)}function y(b){u.forRange("i",c.length,g,S=>{i.subschema({keyword:m,dataProp:S,dataPropType:t.Type.Num},b),p.allErrors||u.if((0,e.not)(b),()=>u.break())})}}return Vc.validateAdditionalItems=a,Vc.default=r,Vc}var Hh={},Fc={},H2;function cP(){if(H2)return Fc;H2=1,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.validateTuple=void 0;const e=pt(),t=Ot(),n=Vo(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:c,it:u}=i;if(Array.isArray(c))return a(i,"additionalItems",c);u.items=!0,!(0,t.alwaysValidSchema)(u,c)&&i.ok((0,n.validateArray)(i))}};function a(i,c,u=i.schema){const{gen:d,parentSchema:f,data:m,keyword:p,it:g}=i;S(f),g.opts.unevaluated&&u.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(d,u.length,g.items));const y=d.name("valid"),b=d.const("len",(0,e._)`${m}.length`);u.forEach((w,x)=>{(0,t.alwaysValidSchema)(g,w)||(d.if((0,e._)`${b} > ${x}`,()=>i.subschema({keyword:p,schemaProp:x,dataProp:x},y)),i.ok(y))});function S(w){const{opts:x,errSchemaPath:E}=g,T=u.length,O=T===w.minItems&&(T===w.maxItems||w[c]===!1);if(x.strictTuples&&!O){const C=`"${p}" is ${T}-tuple, but minItems or maxItems/${c} are not specified or different at path "${E}"`;(0,t.checkStrictMode)(g,C,x.strictTuples)}}}return Fc.validateTuple=a,Fc.default=r,Fc}var G2;function YX(){if(G2)return Hh;G2=1,Object.defineProperty(Hh,"__esModule",{value:!0});const e=cP(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Hh.default=t,Hh}var Gh={},Z2;function QX(){if(Z2)return Gh;Z2=1,Object.defineProperty(Gh,"__esModule",{value:!0});const e=pt(),t=Ot(),n=Vo(),r=iP(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:u,parentSchema:d,it:f}=c,{prefixItems:m}=d;f.items=!0,!(0,t.alwaysValidSchema)(f,u)&&(m?(0,r.validateAdditionalItems)(c,m):c.ok((0,n.validateArray)(c)))}};return Gh.default=i,Gh}var Zh={},K2;function XX(){if(K2)return Zh;K2=1,Object.defineProperty(Zh,"__esModule",{value:!0});const e=pt(),t=Ot(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:a,max:i}})=>i===void 0?(0,e.str)`must contain at least ${a} valid item(s)`:(0,e.str)`must contain at least ${a} and no more than ${i} valid item(s)`,params:({params:{min:a,max:i}})=>i===void 0?(0,e._)`{minContains: ${a}}`:(0,e._)`{minContains: ${a}, maxContains: ${i}}`},code(a){const{gen:i,schema:c,parentSchema:u,data:d,it:f}=a;let m,p;const{minContains:g,maxContains:y}=u;f.opts.next?(m=g===void 0?1:g,p=y):m=1;const b=i.const("len",(0,e._)`${d}.length`);if(a.setParams({min:m,max:p}),p===void 0&&m===0){(0,t.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&m>p){(0,t.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,t.alwaysValidSchema)(f,c)){let T=(0,e._)`${b} >= ${m}`;p!==void 0&&(T=(0,e._)`${T} && ${b} <= ${p}`),a.pass(T);return}f.items=!0;const S=i.name("valid");p===void 0&&m===1?x(S,()=>i.if(S,()=>i.break())):m===0?(i.let(S,!0),p!==void 0&&i.if((0,e._)`${d}.length > 0`,w)):(i.let(S,!1),w()),a.result(S,()=>a.reset());function w(){const T=i.name("_valid"),O=i.let("count",0);x(T,()=>i.if(T,()=>E(O)))}function x(T,O){i.forRange("i",0,b,C=>{a.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},T),O()})}function E(T){i.code((0,e._)`${T}++`),p===void 0?i.if((0,e._)`${T} >= ${m}`,()=>i.assign(S,!0).break()):(i.if((0,e._)`${T} > ${p}`,()=>i.assign(S,!1).break()),m===1?i.assign(S,!0):i.if((0,e._)`${T} >= ${m}`,()=>i.assign(S,!0)))}}};return Zh.default=r,Zh}var D0={},W2;function JX(){return W2||(W2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=pt(),n=Ot(),r=Vo();e.error={message:({params:{property:d,depsCount:f,deps:m}})=>{const p=f===1?"property":"properties";return(0,t.str)`must have ${p} ${m} when property ${d} is present`},params:({params:{property:d,depsCount:f,deps:m,missingProperty:p}})=>(0,t._)`{property: ${d},
|
|
160
|
-
missingProperty: ${p},
|
|
161
|
-
depsCount: ${f},
|
|
162
|
-
deps: ${m}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[f,m]=i(d);c(d,f),u(d,m)}};function i({schema:d}){const f={},m={};for(const p in d){if(p==="__proto__")continue;const g=Array.isArray(d[p])?f:m;g[p]=d[p]}return[f,m]}function c(d,f=d.schema){const{gen:m,data:p,it:g}=d;if(Object.keys(f).length===0)return;const y=m.let("missing");for(const b in f){const S=f[b];if(S.length===0)continue;const w=(0,r.propertyInData)(m,p,b,g.opts.ownProperties);d.setParams({property:b,depsCount:S.length,deps:S.join(", ")}),g.allErrors?m.if(w,()=>{for(const x of S)(0,r.checkReportMissingProp)(d,x)}):(m.if((0,t._)`${w} && (${(0,r.checkMissingProp)(d,S,y)})`),(0,r.reportMissingProp)(d,y),m.else())}}e.validatePropertyDeps=c;function u(d,f=d.schema){const{gen:m,data:p,keyword:g,it:y}=d,b=m.name("valid");for(const S in f)(0,n.alwaysValidSchema)(y,f[S])||(m.if((0,r.propertyInData)(m,p,S,y.opts.ownProperties),()=>{const w=d.subschema({keyword:g,schemaProp:S},b);d.mergeValidEvaluated(w,b)},()=>m.var(b,!0)),d.ok(b))}e.validateSchemaDeps=u,e.default=a})(D0)),D0}var Kh={},Y2;function eJ(){if(Y2)return Kh;Y2=1,Object.defineProperty(Kh,"__esModule",{value:!0});const e=pt(),t=Ot(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,e._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:i,schema:c,data:u,it:d}=a;if((0,t.alwaysValidSchema)(d,c))return;const f=i.name("valid");i.forIn("key",u,m=>{a.setParams({propertyName:m}),a.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},f),i.if((0,e.not)(f),()=>{a.error(!0),d.allErrors||i.break()})}),a.ok(f)}};return Kh.default=r,Kh}var Wh={},Q2;function lP(){if(Q2)return Wh;Q2=1,Object.defineProperty(Wh,"__esModule",{value:!0});const e=Vo(),t=pt(),n=Hs(),r=Ot(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:u,schema:d,parentSchema:f,data:m,errsCount:p,it:g}=c;if(!p)throw new Error("ajv implementation error");const{allErrors:y,opts:b}=g;if(g.props=!0,b.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,d))return;const S=(0,e.allSchemaProperties)(f.properties),w=(0,e.allSchemaProperties)(f.patternProperties);x(),c.ok((0,t._)`${p} === ${n.default.errors}`);function x(){u.forIn("key",m,I=>{!S.length&&!w.length?O(I):u.if(E(I),()=>O(I))})}function E(I){let N;if(S.length>8){const D=(0,r.schemaRefOrVal)(g,f.properties,"properties");N=(0,e.isOwnProperty)(u,D,I)}else S.length?N=(0,t.or)(...S.map(D=>(0,t._)`${I} === ${D}`)):N=t.nil;return w.length&&(N=(0,t.or)(N,...w.map(D=>(0,t._)`${(0,e.usePattern)(c,D)}.test(${I})`))),(0,t.not)(N)}function T(I){u.code((0,t._)`delete ${m}[${I}]`)}function O(I){if(b.removeAdditional==="all"||b.removeAdditional&&d===!1){T(I);return}if(d===!1){c.setParams({additionalProperty:I}),c.error(),y||u.break();return}if(typeof d=="object"&&!(0,r.alwaysValidSchema)(g,d)){const N=u.name("valid");b.removeAdditional==="failing"?(C(I,N,!1),u.if((0,t.not)(N),()=>{c.reset(),T(I)})):(C(I,N),y||u.if((0,t.not)(N),()=>u.break()))}}function C(I,N,D){const z={keyword:"additionalProperties",dataProp:I,dataPropType:r.Type.Str};D===!1&&Object.assign(z,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(z,N)}}};return Wh.default=i,Wh}var Yh={},X2;function tJ(){if(X2)return Yh;X2=1,Object.defineProperty(Yh,"__esModule",{value:!0});const e=ng(),t=Vo(),n=Ot(),r=lP(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:c,schema:u,parentSchema:d,data:f,it:m}=i;m.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(m,r.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(u);for(const w of p)m.definedProperties.add(w);m.opts.unevaluated&&p.length&&m.props!==!0&&(m.props=n.mergeEvaluated.props(c,(0,n.toHash)(p),m.props));const g=p.filter(w=>!(0,n.alwaysValidSchema)(m,u[w]));if(g.length===0)return;const y=c.name("valid");for(const w of g)b(w)?S(w):(c.if((0,t.propertyInData)(c,f,w,m.opts.ownProperties)),S(w),m.allErrors||c.else().var(y,!0),c.endIf()),i.it.definedProperties.add(w),i.ok(y);function b(w){return m.opts.useDefaults&&!m.compositeRule&&u[w].default!==void 0}function S(w){i.subschema({keyword:"properties",schemaProp:w,dataProp:w},y)}}};return Yh.default=a,Yh}var Qh={},J2;function nJ(){if(J2)return Qh;J2=1,Object.defineProperty(Qh,"__esModule",{value:!0});const e=Vo(),t=pt(),n=Ot(),r=Ot(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:c,schema:u,data:d,parentSchema:f,it:m}=i,{opts:p}=m,g=(0,e.allSchemaProperties)(u),y=g.filter(O=>(0,n.alwaysValidSchema)(m,u[O]));if(g.length===0||y.length===g.length&&(!m.opts.unevaluated||m.props===!0))return;const b=p.strictSchema&&!p.allowMatchingProperties&&f.properties,S=c.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,r.evaluatedPropsToName)(c,m.props));const{props:w}=m;x();function x(){for(const O of g)b&&E(O),m.allErrors?T(O):(c.var(S,!0),T(O),c.if(S))}function E(O){for(const C in b)new RegExp(O).test(C)&&(0,n.checkStrictMode)(m,`property ${C} matches pattern ${O} (use allowMatchingProperties)`)}function T(O){c.forIn("key",d,C=>{c.if((0,t._)`${(0,e.usePattern)(i,O)}.test(${C})`,()=>{const I=y.includes(O);I||i.subschema({keyword:"patternProperties",schemaProp:O,dataProp:C,dataPropType:r.Type.Str},S),m.opts.unevaluated&&w!==!0?c.assign((0,t._)`${w}[${C}]`,!0):!I&&!m.allErrors&&c.if((0,t.not)(S),()=>c.break())})})}}};return Qh.default=a,Qh}var Xh={},eC;function rJ(){if(eC)return Xh;eC=1,Object.defineProperty(Xh,"__esModule",{value:!0});const e=Ot(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:a,it:i}=n;if((0,e.alwaysValidSchema)(i,a)){n.fail();return}const c=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),n.failResult(c,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return Xh.default=t,Xh}var Jh={},tC;function oJ(){if(tC)return Jh;tC=1,Object.defineProperty(Jh,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Vo().validateUnion,error:{message:"must match a schema in anyOf"}};return Jh.default=t,Jh}var ep={},nC;function aJ(){if(nC)return ep;nC=1,Object.defineProperty(ep,"__esModule",{value:!0});const e=pt(),t=Ot(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>(0,e._)`{passingSchemas: ${a.passing}}`},code(a){const{gen:i,schema:c,parentSchema:u,it:d}=a;if(!Array.isArray(c))throw new Error("ajv implementation error");if(d.opts.discriminator&&u.discriminator)return;const f=c,m=i.let("valid",!1),p=i.let("passing",null),g=i.name("_valid");a.setParams({passing:p}),i.block(y),a.result(m,()=>a.reset(),()=>a.error(!0));function y(){f.forEach((b,S)=>{let w;(0,t.alwaysValidSchema)(d,b)?i.var(g,!0):w=a.subschema({keyword:"oneOf",schemaProp:S,compositeRule:!0},g),S>0&&i.if((0,e._)`${g} && ${m}`).assign(m,!1).assign(p,(0,e._)`[${p}, ${S}]`).else(),i.if(g,()=>{i.assign(m,!0),i.assign(p,S),w&&a.mergeEvaluated(w,e.Name)})})}}};return ep.default=r,ep}var tp={},rC;function sJ(){if(rC)return tp;rC=1,Object.defineProperty(tp,"__esModule",{value:!0});const e=Ot(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:a,it:i}=n;if(!Array.isArray(a))throw new Error("ajv implementation error");const c=r.name("valid");a.forEach((u,d)=>{if((0,e.alwaysValidSchema)(i,u))return;const f=n.subschema({keyword:"allOf",schemaProp:d},c);n.ok(c),n.mergeEvaluated(f)})}};return tp.default=t,tp}var np={},oC;function iJ(){if(oC)return np;oC=1,Object.defineProperty(np,"__esModule",{value:!0});const e=pt(),t=Ot(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:c,parentSchema:u,it:d}=i;u.then===void 0&&u.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const f=a(d,"then"),m=a(d,"else");if(!f&&!m)return;const p=c.let("valid",!0),g=c.name("_valid");if(y(),i.reset(),f&&m){const S=c.let("ifClause");i.setParams({ifClause:S}),c.if(g,b("then",S),b("else",S))}else f?c.if(g,b("then")):c.if((0,e.not)(g),b("else"));i.pass(p,()=>i.error(!0));function y(){const S=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);i.mergeEvaluated(S)}function b(S,w){return()=>{const x=i.subschema({keyword:S},g);c.assign(p,g),i.mergeValidEvaluated(x,p),w?c.assign(w,(0,e._)`${S}`):i.setParams({ifClause:S})}}}};function a(i,c){const u=i.schema[c];return u!==void 0&&!(0,t.alwaysValidSchema)(i,u)}return np.default=r,np}var rp={},aC;function cJ(){if(aC)return rp;aC=1,Object.defineProperty(rp,"__esModule",{value:!0});const e=Ot(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:a}){r.if===void 0&&(0,e.checkStrictMode)(a,`"${n}" without "if" is ignored`)}};return rp.default=t,rp}var sC;function lJ(){if(sC)return qh;sC=1,Object.defineProperty(qh,"__esModule",{value:!0});const e=iP(),t=YX(),n=cP(),r=QX(),a=XX(),i=JX(),c=eJ(),u=lP(),d=tJ(),f=nJ(),m=rJ(),p=oJ(),g=aJ(),y=sJ(),b=iJ(),S=cJ();function w(x=!1){const E=[m.default,p.default,g.default,y.default,b.default,S.default,c.default,u.default,i.default,d.default,f.default];return x?E.push(t.default,r.default):E.push(e.default,n.default),E.push(a.default),E}return qh.default=w,qh}var op={},ap={},iC;function uJ(){if(iC)return ap;iC=1,Object.defineProperty(ap,"__esModule",{value:!0});const e=pt(),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,a){const{gen:i,data:c,$data:u,schema:d,schemaCode:f,it:m}=r,{opts:p,errSchemaPath:g,schemaEnv:y,self:b}=m;if(!p.validateFormats)return;u?S():w();function S(){const x=i.scopeValue("formats",{ref:b.formats,code:p.code.formats}),E=i.const("fDef",(0,e._)`${x}[${f}]`),T=i.let("fType"),O=i.let("format");i.if((0,e._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>i.assign(T,(0,e._)`${E}.type || "string"`).assign(O,(0,e._)`${E}.validate`),()=>i.assign(T,(0,e._)`"string"`).assign(O,E)),r.fail$data((0,e.or)(C(),I()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${f} && !${O}`}function I(){const N=y.$async?(0,e._)`(${E}.async ? await ${O}(${c}) : ${O}(${c}))`:(0,e._)`${O}(${c})`,D=(0,e._)`(typeof ${O} == "function" ? ${N} : ${O}.test(${c}))`;return(0,e._)`${O} && ${O} !== true && ${T} === ${a} && !${D}`}}function w(){const x=b.formats[d];if(!x){C();return}if(x===!0)return;const[E,T,O]=I(x);E===a&&r.pass(N());function C(){if(p.strictSchema===!1){b.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${d}" ignored in schema at path "${g}"`}}function I(D){const z=D instanceof RegExp?(0,e.regexpCode)(D):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(d)}`:void 0,W=i.scopeValue("formats",{key:d,ref:D,code:z});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,e._)`${W}.validate`]:["string",D,W]}function N(){if(typeof x=="object"&&!(x instanceof RegExp)&&x.async){if(!y.$async)throw new Error("async format in sync schema");return(0,e._)`await ${O}(${c})`}return typeof T=="function"?(0,e._)`${O}(${c})`:(0,e._)`${O}.test(${c})`}}}};return ap.default=n,ap}var cC;function dJ(){if(cC)return op;cC=1,Object.defineProperty(op,"__esModule",{value:!0});const t=[uJ().default];return op.default=t,op}var _i={},lC;function fJ(){return lC||(lC=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.contentVocabulary=_i.metadataVocabulary=void 0,_i.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],_i.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),_i}var uC;function hJ(){if(uC)return Ch;uC=1,Object.defineProperty(Ch,"__esModule",{value:!0});const e=jX(),t=WX(),n=lJ(),r=dJ(),a=fJ(),i=[e.default,t.default,(0,n.default)(),r.default,a.metadataVocabulary,a.contentVocabulary];return Ch.default=i,Ch}var sp={},Cu={},dC;function pJ(){if(dC)return Cu;dC=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Cu.DiscrError=e={})),Cu}var fC;function mJ(){if(fC)return sp;fC=1,Object.defineProperty(sp,"__esModule",{value:!0});const e=pt(),t=pJ(),n=H1(),r=rg(),a=Ot(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:u,tagName:d}})=>u===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:u,tag:d,tagName:f}})=>(0,e._)`{error: ${u}, tag: ${f}, tagValue: ${d}}`},code(u){const{gen:d,data:f,schema:m,parentSchema:p,it:g}=u,{oneOf:y}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=m.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");const S=d.let("valid",!1),w=d.const("tag",(0,e._)`${f}${(0,e.getProperty)(b)}`);d.if((0,e._)`typeof ${w} == "string"`,()=>x(),()=>u.error(!1,{discrError:t.DiscrError.Tag,tag:w,tagName:b})),u.ok(S);function x(){const O=T();d.if(!1);for(const C in O)d.elseIf((0,e._)`${w} === ${C}`),d.assign(S,E(O[C]));d.else(),u.error(!1,{discrError:t.DiscrError.Mapping,tag:w,tagName:b}),d.endIf()}function E(O){const C=d.name("valid"),I=u.subschema({keyword:"oneOf",schemaProp:O},C);return u.mergeEvaluated(I,e.Name),C}function T(){var O;const C={},I=D(p);let N=!0;for(let V=0;V<y.length;V++){let G=y[V];if(G?.$ref&&!(0,a.schemaHasRulesButRef)(G,g.self.RULES)){const J=G.$ref;if(G=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,J),G instanceof n.SchemaEnv&&(G=G.schema),G===void 0)throw new r.default(g.opts.uriResolver,g.baseId,J)}const U=(O=G?.properties)===null||O===void 0?void 0:O[b];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);N=N&&(I||D(G)),z(U,V)}if(!N)throw new Error(`discriminator: "${b}" must be required`);return C;function D({required:V}){return Array.isArray(V)&&V.includes(b)}function z(V,G){if(V.const)W(V.const,G);else if(V.enum)for(const U of V.enum)W(U,G);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function W(V,G){if(typeof V!="string"||V in C)throw new Error(`discriminator: "${b}" values must be unique strings`);C[V]=G}}}};return sp.default=c,sp}const gJ="http://json-schema.org/draft-07/schema#",vJ="http://json-schema.org/draft-07/schema#",yJ="Core schema meta-schema",_J={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:[]}},bJ=["object","boolean"],wJ={$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:"#"}},SJ={$schema:gJ,$id:vJ,title:yJ,definitions:_J,type:bJ,properties:wJ,default:!0};var hC;function uP(){return hC||(hC=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=PX(),r=hJ(),a=mJ(),i=SJ,c=["/properties"],u="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(i,c):i;this.addMetaSchema(b,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var f=ng();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var m=pt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var p=q1();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=rg();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(Eh,Eh.exports)),Eh.exports}var EJ=uP();const RJ=ja(EJ);var ip={exports:{}},L0={},pC;function xJ(){return pC||(pC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(V,G){return{validate:V,compare:G}}e.fullFormats={date:t(i,c),time:t(d(!0),f),"date-time":t(g(!0),y),"iso-time":t(d(),m),"iso-date-time":t(g(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:x,"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:W,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:I},int64:{type:"number",validate:N},float:{type:"number",validate:D},double:{type:"number",validate:D},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),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,y),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"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,b),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(V){return V%4===0&&(V%100!==0||V%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(V){const G=r.exec(V);if(!G)return!1;const U=+G[1],J=+G[2],ie=+G[3];return J>=1&&J<=12&&ie>=1&&ie<=(J===2&&n(U)?29:a[J])}function c(V,G){if(V&&G)return V>G?1:V<G?-1:0}const u=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(V){return function(U){const J=u.exec(U);if(!J)return!1;const ie=+J[1],F=+J[2],X=+J[3],ae=J[4],fe=J[5]==="-"?-1:1,K=+(J[6]||0),P=+(J[7]||0);if(K>23||P>59||V&&!ae)return!1;if(ie<=23&&F<=59&&X<60)return!0;const q=F-P*fe,B=ie-K*fe-(q<0?1:0);return(B===23||B===-1)&&(q===59||q===-1)&&X<61}}function f(V,G){if(!(V&&G))return;const U=new Date("2020-01-01T"+V).valueOf(),J=new Date("2020-01-01T"+G).valueOf();if(U&&J)return U-J}function m(V,G){if(!(V&&G))return;const U=u.exec(V),J=u.exec(G);if(U&&J)return V=U[1]+U[2]+U[3],G=J[1]+J[2]+J[3],V>G?1:V<G?-1:0}const p=/t|\s/i;function g(V){const G=d(V);return function(J){const ie=J.split(p);return ie.length===2&&i(ie[0])&&G(ie[1])}}function y(V,G){if(!(V&&G))return;const U=new Date(V).valueOf(),J=new Date(G).valueOf();if(U&&J)return U-J}function b(V,G){if(!(V&&G))return;const[U,J]=V.split(p),[ie,F]=G.split(p),X=c(U,ie);if(X!==void 0)return X||f(J,F)}const S=/\/|:/,w=/^(?:[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 x(V){return S.test(V)&&w.test(V)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(V){return E.lastIndex=0,E.test(V)}const O=-2147483648,C=2**31-1;function I(V){return Number.isInteger(V)&&V<=C&&V>=O}function N(V){return Number.isInteger(V)}function D(){return!0}const z=/[^\\]\\Z/;function W(V){if(z.test(V))return!1;try{return new RegExp(V),!0}catch{return!1}}})(L0)),L0}var j0={},mC;function TJ(){return mC||(mC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=uP(),n=pt(),r=n.operators,a={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}},i={message:({keyword:u,schemaCode:d})=>(0,n.str)`should be ${a[u].okStr} ${d}`,params:({keyword:u,schemaCode:d})=>(0,n._)`{comparison: ${a[u].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:i,code(u){const{gen:d,data:f,schemaCode:m,keyword:p,it:g}=u,{opts:y,self:b}=g;if(!y.validateFormats)return;const S=new t.KeywordCxt(g,b.RULES.all.format.definition,"format");S.$data?w():x();function w(){const T=d.scopeValue("formats",{ref:b.formats,code:y.code.formats}),O=d.const("fmt",(0,n._)`${T}[${S.schemaCode}]`);u.fail$data((0,n.or)((0,n._)`typeof ${O} != "object"`,(0,n._)`${O} instanceof RegExp`,(0,n._)`typeof ${O}.compare != "function"`,E(O)))}function x(){const T=S.schema,O=b.formats[T];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${p}": format "${T}" does not define "compare" function`);const C=d.scopeValue("formats",{key:T,ref:O,code:y.code.formats?(0,n._)`${y.code.formats}${(0,n.getProperty)(T)}`:void 0});u.fail$data(E(C))}function E(T){return(0,n._)`${T}.compare(${f}, ${m}) ${a[p].fail} 0`}},dependencies:["format"]};const c=u=>(u.addKeyword(e.formatLimitDefinition),u);e.default=c})(j0)),j0}var gC;function OJ(){return gC||(gC=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=xJ(),r=TJ(),a=pt(),i=new a.Name("fullFormats"),c=new a.Name("fastFormats"),u=(f,m={keywords:!0})=>{if(Array.isArray(m))return d(f,m,n.fullFormats,i),f;const[p,g]=m.mode==="fast"?[n.fastFormats,c]:[n.fullFormats,i],y=m.formats||n.formatNames;return d(f,y,p,g),m.keywords&&(0,r.default)(f),f};u.get=(f,m="full")=>{const g=(m==="fast"?n.fastFormats:n.fullFormats)[f];if(!g)throw new Error(`Unknown format "${f}"`);return g};function d(f,m,p,g){var y,b;(y=(b=f.opts.code).formats)!==null&&y!==void 0||(b.formats=(0,a._)`require("ajv-formats/dist/formats").${g}`);for(const S of m)f.addFormat(S,p[S])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u})(ip,ip.exports)),ip.exports}var CJ=OJ();const AJ=ja(CJ);function IJ(){const e=new RJ({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return AJ(e),e}class kJ{constructor(t){this._ajv=t??IJ()}getValidator(t){const n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}}class NJ{constructor(t){this._client=t}async*callToolStream(t,n=Jm,r){const a=this._client,i={...r,task:r?.task??(a.isToolTask(t.name)?{}:void 0)},c=a.requestStream({method:"tools/call",params:t},n,i),u=a.getToolOutputValidator(t.name);for await(const d of c){if(d.type==="result"&&u){const f=d.result;if(!f.structuredContent&&!f.isError){yield{type:"error",error:new Ke(tt.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(f.structuredContent)try{const m=u(f.structuredContent);if(!m.valid){yield{type:"error",error:new Ke(tt.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof Ke){yield{type:"error",error:m};return}yield{type:"error",error:new Ke(tt.InvalidParams,`Failed to validate structured content: ${m instanceof Error?m.message:String(m)}`)};return}}yield d}}async getTask(t,n){return this._client.getTask({taskId:t},n)}async getTaskResult(t,n,r){return this._client.getTaskResult({taskId:t},n,r)}async listTasks(t,n){return this._client.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._client.cancelTask({taskId:t},n)}requestStream(t,n,r){return this._client.requestStream(t,n,r)}}function MJ(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break}}function PJ(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break}}function bp(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const n=t,r=e.properties;for(const a of Object.keys(r)){const i=r[a];n[a]===void 0&&Object.prototype.hasOwnProperty.call(i,"default")&&(n[a]=i.default),n[a]!==void 0&&bp(i,n[a])}}if(Array.isArray(e.anyOf))for(const n of e.anyOf)typeof n!="boolean"&&bp(n,t);if(Array.isArray(e.oneOf))for(const n of e.oneOf)typeof n!="boolean"&&bp(n,t)}}function dP(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}let fP=class extends vX{constructor(t,n){super(n),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=n?.capabilities??{},this._jsonSchemaValidator=n?.jsonSchemaValidator??new kJ,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",WM,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",ZM,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",qM,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new NJ(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=yX(this._capabilities,t)}setRequestHandler(t,n){const a=AM(t)?.method;if(!a)throw new Error("Schema is missing a method literal");let i;if(Wm(a)){const u=a;i=u._zod?.def?.value??u.value}else{const u=a;i=u._def?.value??u.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");const c=i;if(c==="elicitation/create"){const u=async(d,f)=>{const m=ws(eP,d);if(!m.success){const E=m.error instanceof Error?m.error.message:String(m.error);throw new Ke(tt.InvalidParams,`Invalid elicitation request: ${E}`)}const{params:p}=m.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:y}=dP(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new Ke(tt.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!y)throw new Ke(tt.InvalidParams,"Client does not support URL-mode elicitation requests");const b=await Promise.resolve(n(d,f));if(p.task){const E=ws(ud,b);if(!E.success){const T=E.error instanceof Error?E.error.message:String(E.error);throw new Ke(tt.InvalidParams,`Invalid task creation result: ${T}`)}return E.data}const S=ws(tP,b);if(!S.success){const E=S.error instanceof Error?S.error.message:String(S.error);throw new Ke(tt.InvalidParams,`Invalid elicitation result: ${E}`)}const w=S.data,x=p.mode==="form"?p.requestedSchema:void 0;if(p.mode==="form"&&w.action==="accept"&&w.content&&x&&this._capabilities.elicitation?.form?.applyDefaults)try{bp(x,w.content)}catch{}return w};return super.setRequestHandler(t,u)}if(c==="sampling/createMessage"){const u=async(d,f)=>{const m=ws(QM,d);if(!m.success){const w=m.error instanceof Error?m.error.message:String(m.error);throw new Ke(tt.InvalidParams,`Invalid sampling request: ${w}`)}const{params:p}=m.data,g=await Promise.resolve(n(d,f));if(p.task){const w=ws(ud,g);if(!w.success){const x=w.error instanceof Error?w.error.message:String(w.error);throw new Ke(tt.InvalidParams,`Invalid task creation result: ${x}`)}return w.data}const b=p.tools||p.toolChoice?JM:XM,S=ws(b,g);if(!S.success){const w=S.error instanceof Error?S.error.message:String(S.error);throw new Ke(tt.InvalidParams,`Invalid sampling result: ${w}`)}return S.data};return super.setRequestHandler(t,u)}return super.setRequestHandler(t,n)}assertCapability(t,n){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t,n){if(await super.connect(t),t.sessionId===void 0)try{const r=await this.request({method:"initialize",params:{protocolVersion:Ym,capabilities:this._capabilities,clientInfo:this._clientInfo}},DM,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!$Y.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){MJ(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&PJ(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Xc,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},nP,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},Xc,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},GM,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},HM,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},VM,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},FM,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},BM,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},Xc,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},Xc,n)}async callTool(t,n=Jm,r){if(this.isToolTaskRequired(t.name))throw new Ke(tt.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const a=await this.request({method:"tools/call",params:t},n,r),i=this.getToolOutputValidator(t.name);if(i){if(!a.structuredContent&&!a.isError)throw new Ke(tt.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(a.structuredContent)try{const c=i(a.structuredContent);if(!c.valid)throw new Ke(tt.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof Ke?c:new Ke(tt.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return a}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const n of t){if(n.outputSchema){const a=this._jsonSchemaValidator.getValidator(n.outputSchema);this._cachedToolOutputValidators.set(n.name,a)}const r=n.execution?.taskSupport;(r==="required"||r==="optional")&&this._cachedKnownTaskTools.add(n.name),r==="required"&&this._cachedRequiredTaskTools.add(n.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,n){const r=await this.request({method:"tools/list",params:t},B1,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,a){const i=NQ.safeParse(r);if(!i.success)throw new Error(`Invalid ${t} listChanged options: ${i.error.message}`);if(typeof r.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:c,debounceMs:u}=i.data,{onChanged:d}=r,f=async()=>{if(!c){d(null,null);return}try{const p=await a();d(null,p)}catch(p){const g=p instanceof Error?p:new Error(String(p));d(g,null)}},m=()=>{if(u){const p=this._listChangedDebounceTimers.get(t);p&&clearTimeout(p);const g=setTimeout(f,u);this._listChangedDebounceTimers.set(t,g)}else f()};this.setNotificationHandler(n,m)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};const rae=Object.freeze(Object.defineProperty({__proto__:null,Client:fP,getSupportedElicitationModes:dP},Symbol.toStringTag,{value:"Module"}));function im(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function hP(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...im(t.headers),...im(r.headers)}:t.headers};return e(n,a)}:e}let Z1;Z1=globalThis.crypto;async function DJ(e){return(await Z1).getRandomValues(new Uint8Array(e))}async function LJ(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await DJ(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function jJ(e){return await LJ(e)}async function $J(e){const t=await(await Z1).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function UJ(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await jJ(e),n=await $J(t);return{code_verifier:t,code_challenge:n}}const Zn=M7().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Rz.custom,message:"URL must be parseable",fatal:!0}),P$}).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"}),zJ=Wn({resource:M().url(),authorization_servers:we(Zn).optional(),jwks_uri:M().url().optional(),scopes_supported:we(M()).optional(),bearer_methods_supported:we(M()).optional(),resource_signing_alg_values_supported:we(M()).optional(),resource_name:M().optional(),resource_documentation:M().optional(),resource_policy_uri:M().url().optional(),resource_tos_uri:M().url().optional(),tls_client_certificate_bound_access_tokens:We().optional(),authorization_details_types_supported:we(M()).optional(),dpop_signing_alg_values_supported:we(M()).optional(),dpop_bound_access_tokens_required:We().optional()}),pP=Wn({issuer:M(),authorization_endpoint:Zn,token_endpoint:Zn,registration_endpoint:Zn.optional(),scopes_supported:we(M()).optional(),response_types_supported:we(M()),response_modes_supported:we(M()).optional(),grant_types_supported:we(M()).optional(),token_endpoint_auth_methods_supported:we(M()).optional(),token_endpoint_auth_signing_alg_values_supported:we(M()).optional(),service_documentation:Zn.optional(),revocation_endpoint:Zn.optional(),revocation_endpoint_auth_methods_supported:we(M()).optional(),revocation_endpoint_auth_signing_alg_values_supported:we(M()).optional(),introspection_endpoint:M().optional(),introspection_endpoint_auth_methods_supported:we(M()).optional(),introspection_endpoint_auth_signing_alg_values_supported:we(M()).optional(),code_challenge_methods_supported:we(M()).optional(),client_id_metadata_document_supported:We().optional()}),VJ=Wn({issuer:M(),authorization_endpoint:Zn,token_endpoint:Zn,userinfo_endpoint:Zn.optional(),jwks_uri:Zn,registration_endpoint:Zn.optional(),scopes_supported:we(M()).optional(),response_types_supported:we(M()),response_modes_supported:we(M()).optional(),grant_types_supported:we(M()).optional(),acr_values_supported:we(M()).optional(),subject_types_supported:we(M()),id_token_signing_alg_values_supported:we(M()),id_token_encryption_alg_values_supported:we(M()).optional(),id_token_encryption_enc_values_supported:we(M()).optional(),userinfo_signing_alg_values_supported:we(M()).optional(),userinfo_encryption_alg_values_supported:we(M()).optional(),userinfo_encryption_enc_values_supported:we(M()).optional(),request_object_signing_alg_values_supported:we(M()).optional(),request_object_encryption_alg_values_supported:we(M()).optional(),request_object_encryption_enc_values_supported:we(M()).optional(),token_endpoint_auth_methods_supported:we(M()).optional(),token_endpoint_auth_signing_alg_values_supported:we(M()).optional(),display_values_supported:we(M()).optional(),claim_types_supported:we(M()).optional(),claims_supported:we(M()).optional(),service_documentation:M().optional(),claims_locales_supported:we(M()).optional(),ui_locales_supported:we(M()).optional(),claims_parameter_supported:We().optional(),request_parameter_supported:We().optional(),request_uri_parameter_supported:We().optional(),require_request_uri_registration:We().optional(),op_policy_uri:Zn.optional(),op_tos_uri:Zn.optional(),client_id_metadata_document_supported:We().optional()}),FJ=oe({...VJ.shape,...pP.pick({code_challenge_methods_supported:!0}).shape}),BJ=oe({access_token:M(),id_token:M().optional(),token_type:M(),expires_in:fk().optional(),scope:M().optional(),refresh_token:M().optional()}).strip(),qJ=oe({error:M(),error_description:M().optional(),error_uri:M().optional()}),vC=Zn.optional().or(Le("").transform(()=>{})),HJ=oe({redirect_uris:we(Zn),token_endpoint_auth_method:M().optional(),grant_types:we(M()).optional(),response_types:we(M()).optional(),client_name:M().optional(),client_uri:Zn.optional(),logo_uri:vC,scope:M().optional(),contacts:we(M()).optional(),tos_uri:vC,policy_uri:M().optional(),jwks_uri:Zn.optional(),jwks:Gr().optional(),software_id:M().optional(),software_version:M().optional(),software_statement:M().optional()}).strip(),GJ=oe({client_id:M(),client_secret:M().optional(),client_id_issued_at:$e().optional(),client_secret_expires_at:$e().optional()}).strip(),ZJ=HJ.merge(GJ);oe({error:M(),error_description:M().optional()}).strip();oe({token:M(),token_type_hint:M().optional()}).strip();function KJ(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function WJ({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class $n 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 L_ extends $n{}L_.errorCode="invalid_request";class cm extends $n{}cm.errorCode="invalid_client";class lm extends $n{}lm.errorCode="invalid_grant";class um extends $n{}um.errorCode="unauthorized_client";class j_ extends $n{}j_.errorCode="unsupported_grant_type";class $_ extends $n{}$_.errorCode="invalid_scope";class U_ extends $n{}U_.errorCode="access_denied";class gl extends $n{}gl.errorCode="server_error";class z_ extends $n{}z_.errorCode="temporarily_unavailable";class V_ extends $n{}V_.errorCode="unsupported_response_type";class F_ extends $n{}F_.errorCode="unsupported_token_type";class B_ extends $n{}B_.errorCode="invalid_token";class q_ extends $n{}q_.errorCode="method_not_allowed";class H_ extends $n{}H_.errorCode="too_many_requests";class dm extends $n{}dm.errorCode="invalid_client_metadata";class G_ extends $n{}G_.errorCode="insufficient_scope";class Z_ extends $n{}Z_.errorCode="invalid_target";const YJ={[L_.errorCode]:L_,[cm.errorCode]:cm,[lm.errorCode]:lm,[um.errorCode]:um,[j_.errorCode]:j_,[$_.errorCode]:$_,[U_.errorCode]:U_,[gl.errorCode]:gl,[z_.errorCode]:z_,[V_.errorCode]:V_,[F_.errorCode]:F_,[B_.errorCode]:B_,[q_.errorCode]:q_,[H_.errorCode]:H_,[dm.errorCode]:dm,[G_.errorCode]:G_,[Z_.errorCode]:Z_};class ko extends Error{constructor(t){super(t??"Unauthorized")}}function QJ(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const $0="code",U0="S256";function XJ(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&QJ(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function JJ(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":eee(a,i,n);return;case"client_secret_post":tee(a,i,r);return;case"none":nee(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function eee(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function tee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function nee(e,t){t.set("client_id",e)}async function mP(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=qJ.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:c}=r,u=YJ[a]||gl;return new u(i||"",c)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new gl(a)}}async function Ts(e,t){try{return await z0(e,t)}catch(n){if(n instanceof cm||n instanceof um)return await e.invalidateCredentials?.("all"),await z0(e,t);if(n instanceof lm)return await e.invalidateCredentials?.("tokens"),await z0(e,t);throw n}}async function z0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const c=await e.discoveryState?.();let u,d,f,m=a;if(!m&&c?.resourceMetadataUrl&&(m=new URL(c.resourceMetadataUrl)),c?.authorizationServerUrl){if(d=c.authorizationServerUrl,u=c.resourceMetadata,f=c.authorizationServerMetadata??await Y1(d,{fetchFn:i}),!u)try{u=await K1(t,{resourceMetadataUrl:m},i)}catch{}(f!==c.authorizationServerMetadata||u!==c.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(d),resourceMetadataUrl:m?.toString(),resourceMetadata:u,authorizationServerMetadata:f})}else{const E=await lee(t,{resourceMetadataUrl:m,fetchFn:i});d=E.authorizationServerUrl,f=E.authorizationServerMetadata,u=E.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(d),resourceMetadataUrl:m?.toString(),resourceMetadata:u,authorizationServerMetadata:f})}const p=await oee(t,e,u);let g=await Promise.resolve(e.clientInformation());if(!g){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const E=f?.client_id_metadata_document_supported===!0,T=e.clientMetadataUrl;if(T&&!ree(T))throw new dm(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${T}`);if(E&&T)g={client_id:T},await e.saveClientInformation?.(g);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const C=await pee(d,{metadata:f,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(C),g=C}}const y=!e.redirectUrl;if(n!==void 0||y){const E=await hee(e,d,{metadata:f,resource:p,authorizationCode:n,fetchFn:i});return await e.saveTokens(E),"AUTHORIZED"}const b=await e.tokens();if(b?.refresh_token)try{const E=await fee(d,{metadata:f,clientInformation:g,refreshToken:b.refresh_token,resource:p,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(E),"AUTHORIZED"}catch(E){if(!(!(E instanceof $n)||E instanceof gl))throw E}const S=e.state?await e.state():void 0,{authorizationUrl:w,codeVerifier:x}=await uee(d,{metadata:f,clientInformation:g,state:S,redirectUrl:e.redirectUrl,scope:r||u?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:p});return await e.saveCodeVerifier(x),await e.redirectToAuthorization(w),"REDIRECT"}function ree(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function oee(e,t,n){const r=KJ(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!WJ({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function fm(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=V0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const c=V0(e,"scope")||void 0,u=V0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:c,error:u}}function V0(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function K1(e,t,n=fetch){const r=await iee(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return zJ.parse(await r.json())}async function W1(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?W1(e,void 0,n):void 0;throw r}}function aee(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function yC(e,t,n=fetch){return await W1(e,{"MCP-Protocol-Version":t},n)}function see(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function iee(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??Ym;let c;if(r?.metadataUrl)c=new URL(r.metadataUrl);else{const d=aee(t,a.pathname);c=new URL(d,r?.metadataServerUrl??a),c.search=a.search}let u=await yC(c,i,n);if(!r?.metadataUrl&&see(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await yC(d,i,n)}return u}function cee(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function Y1(e,{fetchFn:t=fetch,protocolVersion:n=Ym}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=cee(e);for(const{url:i,type:c}of a){const u=await W1(i,r,t);if(u){if(!u.ok){if(await u.body?.cancel(),u.status>=400&&u.status<500)continue;throw new Error(`HTTP ${u.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return c==="oauth"?pP.parse(await u.json()):FJ.parse(await u.json())}}}async function lee(e,t){let n,r;try{n=await K1(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await Y1(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function uee(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:c}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes($0))throw new Error(`Incompatible auth server: does not support response type ${$0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(U0))throw new Error(`Incompatible auth server: does not support code challenge method ${U0}`)}else u=new URL("/authorize",e);const d=await UJ(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",$0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",U0),u.searchParams.set("redirect_uri",String(r)),i&&u.searchParams.set("state",i),a&&u.searchParams.set("scope",a),a?.includes("offline_access")&&u.searchParams.append("prompt","consent"),c&&u.searchParams.set("resource",c.href),{authorizationUrl:u,codeVerifier:f}}function gP(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function Q1(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:c}){const u=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(d,n,u,t);else if(r){const m=t?.token_endpoint_auth_methods_supported??[],p=XJ(r,m);JJ(p,r,d,n)}const f=await(c??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await mP(f);return BJ.parse(await f.json())}async function dee(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:c,addClientAuthentication:u,fetchFn:d}){const f=gP(r,a,i);return Q1(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:c,fetchFn:d})}async function fee(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:c}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await Q1(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:c});return{refresh_token:r,...d}}async function hee(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const c=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(c)),!u){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const f=await e.codeVerifier();u=gP(a,f,e.redirectUrl)}const d=await e.clientInformation();return Q1(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function pee(e,{metadata:t,clientMetadata:n,fetchFn:r}){let a;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(t.registration_endpoint)}else a=new URL("/register",e);const i=await(r??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw await mP(i);return ZJ.parse(await i.json())}class _C extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}function F0(e){}function vP(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=F0,onError:n=F0,onRetry:r=F0,onComment:a}=e;let i="",c=!0,u,d="",f="";function m(S){const w=c?S.replace(/^\xEF\xBB\xBF/,""):S,[x,E]=mee(`${i}${w}`);for(const T of x)p(T);i=E,c=!1}function p(S){if(S===""){y();return}if(S.startsWith(":")){a&&a(S.slice(S.startsWith(": ")?2:1));return}const w=S.indexOf(":");if(w!==-1){const x=S.slice(0,w),E=S[w+1]===" "?2:1,T=S.slice(w+E);g(x,T,S);return}g(S,"",S)}function g(S,w,x){switch(S){case"event":f=w;break;case"data":d=`${d}${w}
|
|
163
|
-
`;break;case"id":u=w.includes("\0")?void 0:w;break;case"retry":/^\d+$/.test(w)?r(parseInt(w,10)):n(new _C(`Invalid \`retry\` value: "${w}"`,{type:"invalid-retry",value:w,line:x}));break;default:n(new _C(`Unknown field "${S.length>20?`${S.slice(0,20)}…`:S}"`,{type:"unknown-field",field:S,value:w,line:x}));break}}function y(){d.length>0&&t({id:u,event:f||void 0,data:d.endsWith(`
|
|
164
|
-
`)?d.slice(0,-1):d}),u=void 0,d="",f=""}function b(S={}){i&&S.consume&&p(i),c=!0,u=void 0,d="",f="",i=""}return{feed:m,reset:b}}function mee(e){const t=[];let n="",r=0;for(;r<e.length;){const a=e.indexOf("\r",r),i=e.indexOf(`
|
|
165
|
-
`,r);let c=-1;if(a!==-1&&i!==-1?c=Math.min(a,i):a!==-1?a===e.length-1?c=-1:c=a:i!==-1&&(c=i),c===-1){n=e.slice(r);break}else{const u=e.slice(r,c);t.push(u),r=c+1,e[r-1]==="\r"&&e[r]===`
|
|
166
|
-
`&&r++}}return[t,n]}class gee extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=vP({onEvent:c=>{i.enqueue(c)},onError(c){t==="terminate"?i.error(c):typeof t=="function"&&t(c)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const vee={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class Bc extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}let yee=class{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=hP(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??vee}async _authThenStart(){if(!this._authProvider)throw new ko("No auth provider");let t;try{t=await Ts(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new ko;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=im(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const a=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!a.ok){if(await a.body?.cancel(),a.status===401&&this._authProvider)return await this._authThenStart();if(a.status===405)return;throw new Bc(a.status,`Failed to open SSE stream: ${a.statusText}`)}this._handleSseStream(a.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,a=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),a)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const a=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},a)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:a,replayMessageId:i}=n;let c,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new gee({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:b}=await m.read();if(b)break;if(y.id&&(c=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const S=Zu.parse(JSON.parse(y.data));Pu(S)&&(d=!0,i!==void 0&&(S.id=i)),this.onmessage?.(S)}catch(S){this.onerror?.(S)}}(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:a,replayMessageId:i},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:a,replayMessageId:i},0)}catch(y){this.onerror?.(new Error(`Failed to reconnect: ${y instanceof Error?y.message:String(y)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new ko("No auth provider");if(await Ts(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ko("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:a}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:D_(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,c),d=u.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!u.ok){const g=await u.text().catch(()=>null);if(u.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new Bc(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:b}=fm(u);if(this._resourceMetadataUrl=y,this._scope=b,await Ts(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ko;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:b,error:S}=fm(u);if(S==="insufficient_scope"){const w=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===w)throw new Bc(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=w??void 0,await Ts(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new ko;return this.send(t)}}throw new Bc(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),eQ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const m=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=u.headers.get("content-type");if(m)if(p?.includes("text/event-stream"))this._handleSseStream(u.body,{onresumptiontoken:a},!1);else if(p?.includes("application/json")){const g=await u.json(),y=Array.isArray(g)?g.map(b=>Zu.parse(b)):[Zu.parse(g)];for(const b of y)this.onmessage?.(b)}else throw await u.body?.cancel(),new Bc(-1,`Unexpected content type: ${p}`);else await u.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new Bc(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}};const _ee=oe({authorizationEndpoint:M().url(),tokenEndpoint:M().url(),introspectionEndpoint:M().url().optional(),clientId:M(),clientSecret:M().optional(),scopes:we(M()),grantType:Tt(["authorization_code","client_credentials"])}),bee=oe({title:M().optional(),readOnlyHint:We().optional(),destructiveHint:We().optional(),idempotentHint:We().optional(),openWorldHint:We().optional()}),wee=oe({name:M(),description:M().optional(),inputSchema:at(M(),Je()),outputSchema:at(M(),Je()).optional(),annotations:bee.optional(),_meta:at(M(),Je()).optional()}),See=oe({headers:at(M(),M()).optional()}),Eee=oe({command:M().describe("Command to run (e.g., 'npx', 'node')"),args:we(M()).optional().describe("Command arguments"),cwd:M().optional().describe("Working directory"),envVars:at(M(),M()).optional().describe("Environment variables (encrypted in storage)")}),yP=oe({id:M().describe("Unique identifier for the connection"),title:M().describe("Human-readable name for the connection"),created_at:M().describe("When the connection was created"),updated_at:M().describe("When the connection was last updated"),created_by:M().describe("User ID who created the connection"),updated_by:M().optional().describe("User ID who last updated the connection"),organization_id:M().describe("Organization ID this connection belongs to"),description:M().nullable().describe("Description of the connection"),icon:M().nullable().describe("Icon URL for the connection"),app_name:M().nullable().describe("Associated app name"),app_id:M().nullable().describe("Associated app ID"),connection_type:Tt(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:M().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:M().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:xt([Eee,See]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:_ee.nullable().describe("OAuth configuration"),configuration_state:at(M(),Je()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:we(M()).nullable().optional().describe("Configuration scopes"),metadata:at(M(),Je()).nullable().describe("Additional metadata (includes repository info)"),tools:we(wee).nullable().describe("Discovered tools from MCP"),bindings:we(M()).nullable().describe("Detected bindings"),status:Tt(["active","inactive","error"]).describe("Current status")});yP.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:M().nullish()});yP.partial();function aae(e){return e!=null&&"command"in e}function sae(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const Du=oe({connection_id:M().describe("Connection ID"),selected_tools:we(M()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:we(M()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:we(M()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),_P=Du.extend({selected_tools:Du.shape.selected_tools.optional(),selected_resources:Du.shape.selected_resources.optional(),selected_prompts:Du.shape.selected_prompts.optional()}),iae=oe({id:M().describe("Unique identifier"),title:M().describe("Human-readable name"),description:M().nullable().describe("Description"),icon:M().nullable().describe("Icon URL"),created_at:M().describe("Creation timestamp"),updated_at:M().describe("Last update timestamp"),created_by:M().describe("User ID who created this item"),updated_by:M().optional().describe("User ID who last updated this item"),organization_id:M().describe("Organization ID this item belongs to"),status:Tt(["active","inactive"]).describe("Current status"),metadata:oe({instructions:M().nullable().describe("Instructions also used as system prompt")}).loose().describe("Metadata"),connections:we(Du).describe("Connections with their selected tools, resources, and prompts")});oe({title:M().min(1).max(255).describe("Name for the virtual MCP"),description:M().nullable().optional().describe("Optional description"),icon:M().nullish().describe("Optional icon URL"),status:Tt(["active","inactive"]).optional().default("active").describe("Initial status"),metadata:oe({instructions:M().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(_P).describe("Connections to include/exclude (can be empty for exclusion mode)")});oe({title:M().min(1).max(255).optional().describe("New name"),description:M().nullable().optional().describe("New description (null to clear)"),icon:M().nullish().describe("New icon URL"),status:Tt(["active","inactive"]).optional().describe("New status"),metadata:oe({instructions:M().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(_P).optional().describe("New connections (replaces existing)")});var bC;(function(e){e.Completable="McpCompletable"})(bC||(bC={}));function wC(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16)}let bP=null;function Ree(e){bP=e}function xee(){return bP??window.location.origin}function wP(){try{const e=window.location.hostname;return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}const SC=new Map,SP="mcp:oauth:callback:";class Tee{serverUrl;_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(t){this.serverUrl=t.serverUrl,this._redirectUrl=t.callbackUrl??`${xee()}/oauth/callback`,this._windowMode=t.windowMode??"popup";const n=t.scope?Array.isArray(t.scope)?t.scope.join(" "):t.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:t.clientName??"@decocms/mesh MCP client",...n&&{scope:n}},SC.set(wC(this.serverUrl),this)}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(t){this._clientInfo=t}tokens(){return this._tokens??void 0}saveTokens(t){this._tokens=t}redirectToAuthorization(t){if(this._windowMode==="tab"){if(!window.open(t.toString(),"_blank"))throw new Error("Tab was blocked")}else{const a=window.screenX+(window.outerWidth-600)/2,i=window.screenY+(window.outerHeight-700)/2;if(!window.open(t.toString(),"mcp-oauth",`width=600,height=700,left=${a},top=${i},popup=yes`)&&!window.open(t.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(t){this._codeVerifier=t}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}getServerUrl(){return this.serverUrl}cleanup(){SC.delete(wC(this.serverUrl))}}async function cae(e){const t=e.meshUrl??window.location.origin,n=new URL(`/mcp/${e.connectionId}`,t),r=new Tee({serverUrl:n.href,clientName:e.clientName,clientUri:e.clientUri,callbackUrl:e.callbackUrl,scope:e.scope,windowMode:e.windowMode}),a={fn:null};try{const i=new Promise((f,m)=>{const p=e.timeout||12e4;let g,y=!1;const b=r.state(),S=`${SP}${b}`,w=()=>{window.removeEventListener("message",E),window.removeEventListener("storage",T),clearTimeout(g);try{localStorage.removeItem(S)}catch{}};a.fn=O=>{y||(y=!0,w(),m(O))};const x=async O=>{if(y)return;if(y=!0,!O.success){w(),m(new Error(O.error||"OAuth authentication failed"));return}const{code:C,state:I}=O;if(!C){w(),m(new Error("Missing authorization code"));return}if(r.getStoredState()!==I){w(),m(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const z=(await K1(n))?.authorization_servers?.[0]||n,W=await Y1(z),V=r.clientInformation();if(!V){w(),m(new Error("Client information not found"));return}const G=r.codeVerifier(),U=await dee(z,{metadata:W,clientInformation:V,authorizationCode:C,codeVerifier:G,redirectUri:r.redirectUrl,resource:new URL(n)});w(),f({tokens:U,clientId:V.client_id??null,clientSecret:"client_secret"in V?V.client_secret:null,tokenEndpoint:W?.token_endpoint??null})}catch(D){w(),m(D)}},E=async O=>{!wP()&&O.origin!==window.location.origin||O.data?.type==="mcp:oauth:callback"&&await x(O.data)},T=async O=>{if(!(O.key!==S||!O.newValue))try{const C=JSON.parse(O.newValue);await x(C)}catch{}};window.addEventListener("message",E),window.addEventListener("storage",T),g=setTimeout(()=>{y||(y=!0,w(),m(new Error("OAuth authentication timeout")))},p)});if(i.catch(()=>{}),await Ts(r,{serverUrl:n})==="REDIRECT"){const f=await i;return{token:f.tokens.access_token,tokenInfo:{accessToken:f.tokens.access_token,refreshToken:f.tokens.refresh_token??null,expiresIn:f.tokens.expires_in??null,scope:f.tokens.scope??null,clientId:f.clientId,clientSecret:f.clientSecret,tokenEndpoint:f.tokenEndpoint},error:null}}const u=r.tokens(),d=r.clientInformation();return{token:u?.access_token||null,tokenInfo:u?{accessToken:u.access_token,refreshToken:u.refresh_token??null,expiresIn:u.expires_in??null,scope:u.scope??null,clientId:d?.client_id??null,clientSecret:d&&"client_secret"in d?d.client_secret:null,tokenEndpoint:null}:null,error:null}}catch(i){return a.fn&&a.fn(i instanceof Error?i:new Error(String(i))),{token:null,tokenInfo:null,error:i instanceof Error?i.message:String(i)}}finally{r.cleanup()}}function B0(e,t){if(window.opener&&!window.opener.closed){const n=wP()?"*":window.location.origin;return window.opener.postMessage(e,n),!0}if(t)try{const n=`${SP}${t}`;return localStorage.setItem(n,JSON.stringify(e)),!0}catch{}return!1}async function lae(){const e=new URLSearchParams(window.location.search),t=e.get("code");let n=e.get("state");const r=e.get("error"),a=e.get("error_description");let i=n;if(n)try{const u=atob(n),d=JSON.parse(u);d.clientState&&(i=d.clientState)}catch{}if(r){const u=a||r;return B0({type:"mcp:oauth:callback",success:!1,error:u},i),{success:!1,error:u}}if(!t||!n){const u="Missing code or state parameter";return B0({type:"mcp:oauth:callback",success:!1,error:u},i),{success:!1,error:u}}return n=i||n,B0({type:"mcp:oauth:callback",success:!0,code:t,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function X1(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function Oee(e){try{const t=X1();return(t?new URL(e,t):new URL(e)).pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}async function Cee(e,t){try{const n=`/api/connections/${e}/oauth-token/status`,r=t?new URL(n,t).href:n,a=X1(),i=!t||new URL(t).origin===a,c=await fetch(r,{credentials:i?"include":"omit"});return c.ok?{hasToken:(await c.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function uae({url:e,token:t,meshUrl:n}){try{const r=new Headers;r.set("Content-Type","application/json"),r.set("Accept","application/json, text/event-stream");const a=await fetch(e,{method:"POST",headers:r,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/mesh MCP client",version:"1.0.0"}}})}),i=Oee(e),c=X1(),u=n??(c?new URL(e,c).origin:new URL(e).origin);if(a.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(i?await Cee(i,u):{hasToken:!1}).hasToken};let d;try{const p=await a.json();d=p.error||p.message}catch{}return a.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:d||`HTTP ${a.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!a.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:d||`HTTP ${a.status}`}}catch(r){return console.error("[isConnectionAuthenticated] Error:",r),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:r.message}}}async function Aee(){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}function Iee(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(([a,i])=>` ${a}: ${i};`).join(`
|
|
167
|
-
`);n.push(`:root {
|
|
168
|
-
${r}
|
|
169
|
-
}`)}if(e.dark&&Object.keys(e.dark).length>0){const r=Object.entries(e.dark).map(([a,i])=>` ${a}: ${i};`).join(`
|
|
170
|
-
`);n.push(`.dark {
|
|
171
|
-
${r}
|
|
172
|
-
}`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
|
|
173
|
-
|
|
174
|
-
`),document.head.appendChild(r)}}function kee(e){const t=$i.c(6),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:sA.publicConfig(),queryFn:Aee,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=aA(r);a.internalUrl&&Ree(a.internalUrl);let i,c;t[1]!==a.theme?(i=()=>{Iee(a.theme)},c=[a.theme],t[1]=a.theme,t[2]=i,t[3]=c):(i=t[2],c=t[3]),A.useLayoutEffect(i,c);let u;return t[4]!==n?(u=R.jsx(R.Fragment,{children:n}),t[4]=n,t[5]=u):u=t[5],u}function EP(){const e=$i.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=R.jsx("div",{className:"flex items-center justify-center min-h-screen",children:R.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const Nee=new ID({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function Mee(e){const t=$i.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=R.jsx(yV,{}),t[0]=r):r=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=R.jsx(EP,{}),t[1]=a):a=t[1];let i;return t[2]!==n?(i=R.jsxs(ND,{client:Nee,children:[r,R.jsx(A.Suspense,{fallback:a,children:R.jsx(kee,{children:R.jsx(GD,{children:R.jsx(PY,{children:n})})})})]}),t[2]=n,t[3]=i):i=t[3],i}function Pee(...e){return nI(Sb(e))}const Dee=Pk("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/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{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:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function K_(e){const t=$i.c(14);let n,r,a,i,c;t[0]!==e?({className:n,variant:c,size:a,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=i,t[5]=c):(n=t[1],r=t[2],a=t[3],i=t[4],c=t[5]);const d=(i===void 0?!1:i)?Bb:"button";let f;t[6]!==n||t[7]!==a||t[8]!==c?(f=Pee(Dee({variant:c,size:a,className:n})),t[6]=n,t[7]=a,t[8]=c,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=R.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const J1=({size:e=24,color:t="currentColor",...n})=>A.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},A.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"}));J1.displayName="AlertTriangle";const RP=({size:e=24,color:t="currentColor",...n})=>A.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},A.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Z"}));RP.displayName="Folder";const xP=({size:e=24,color:t="currentColor",...n})=>A.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},A.createElement("path",{d:"M20.5 7.278 12 12m0 0L3.5 7.278M12 12v9.5m9-5.441V7.942c0-.343 0-.514-.05-.667a1 1 0 0 0-.215-.364c-.109-.119-.258-.202-.558-.368l-7.4-4.111c-.284-.158-.425-.237-.575-.267a1 1 0 0 0-.403 0c-.15.03-.292.11-.576.267l-7.4 4.11c-.3.167-.45.25-.558.369a1 1 0 0 0-.215.364C3 7.428 3 7.599 3 7.942v8.117c0 .342 0 .514.05.666a1 1 0 0 0 .215.364c.109.119.258.202.558.368l7.4 4.111c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l7.4-4.11c.3-.167.45-.25.558-.369a.999.999 0 0 0 .215-.364c.05-.152.05-.324.05-.666ZM16.5 9.5l-9-5"}));xP.displayName="Package";const TP=({size:e=24,color:t="currentColor",...n})=>A.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},A.createElement("path",{d:"M21 10s-2.005-2.732-3.634-4.362a9 9 0 1 0 2.282 8.862M21 10V4m0 6h-6"}));TP.displayName="RefreshCw01";const EC="__mesh_chunk_reload_ts";function RC(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 dae extends A.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}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:R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[R.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:R.jsx(J1,{className:"h-6 w-6 text-destructive"})}),R.jsxs("div",{className:"space-y-2",children:[R.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),R.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),R.jsx(K_,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class Lee extends A.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){if(console.error("Uncaught error:",t,n),!RC(t))return;const r=sessionStorage.getItem(EC),a=Date.now();(!r||a-Number(r)>1e4)&&(sessionStorage.setItem(EC,String(a)),window.location.reload())}render(){return this.state.hasError&&RC(this.state.error)?R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[R.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:R.jsx(TP,{className:"h-6 w-6 text-primary"})}),R.jsxs("div",{className:"space-y-2",children:[R.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),R.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),R.jsx(K_,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?R.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[R.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:R.jsx(J1,{className:"h-6 w-6 text-destructive"})}),R.jsxs("div",{className:"space-y-2",children:[R.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),R.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),R.jsx(K_,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const xC={assistantChatTasks:e=>`mesh:assistant-chat:tasks:${e}`,messages:(e,t)=>`mesh:messages:${e}:${t}`,decoChatOpen:()=>"mesh:decochat:open",chatSelectedModel:e=>`mesh:chat:selectedModel:${e}`,chatSelectedMode:e=>`mesh:chat:selectedMode:${e}`,chatSelectedKeyId:e=>`mesh:chat:selectedKeyId:${e}`,assistantChatActiveTask:e=>`mesh:assistant-chat:active-task:${e}`,decoChatPanelWidth:()=>"mesh:decochat:panel-width",sidebarOpen:()=>"mesh:sidebar-open",selectedRegistry:e=>`mesh:store:selected-registry:${e}`,orgHomeQuickstart:e=>`mesh:org-home:quickstart:${e}`,storeShowStdio:()=>"mesh:store:show-stdio",preferences:()=>"mesh:user:preferences",pluginConnection:(e,t)=>`mesh:plugin:connection:${e}:${t}`,chatTaskOwnerFilter:e=>`mesh:chat:task-owner-filter:${e}`,lastOrgSlug:()=>"mesh:last-org-slug",connectionsTab:e=>`mesh:connections:tab:${e}`};var jee=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const a=e.number||$e();a instanceof $a&&(e.number=a.int())}}},$ee=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=Le(n):typeof n=="number"?e.number=Le(n):typeof n=="boolean"?e.boolean=Le(n):n===null?e.null=vd():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},Uee=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?vd():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return Le(e[0]);if(t==="string")return Tt(e);if(t==="number"){const[n,r,...a]=e;return xt([Le(n),Le(r),...a.map(i=>Le(i))])}return t==="boolean"?xt([Le(!0),Le(!1)]):!1}},zee=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=sz();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Vee=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=M())}},Fee=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||M();r instanceof Pm&&(e.string=r.refine(a=>Array.from(a).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Bee=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||M();r instanceof Pm&&(e.string=r.refine(a=>Array.from(a).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},qee=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||M();if(r instanceof Pm){const a=new RegExp(n.pattern);e.string=r.regex(a)}}}},Hee=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof $a&&(e.number=r.min(n.minimum))}}},Gee=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof $a&&(e.number=r.max(n.maximum))}}},Zee=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof $a&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},Kee=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof $a&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Wee=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof $a&&(e.number=r.refine(a=>{if(n.multipleOf===0)return!1;const i=a/n.multipleOf,c=Math.round(i),u=Math.min(Math.abs(a)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(i-c)<=u/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Yee=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=we(Gr()))}},Qee=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||we(Gr())).min(n.minItems))}},Xee=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||we(Gr())).max(n.maxItems))}},Jee=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||we(Gr());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=rr(n.items);let a=we(r);if(e.array&&e.array instanceof ok){const i=e.array._def;i.checks&&i.checks.forEach(c=>{if(c._zod&&c._zod.def){const u=c._zod.def;u.check==="min_length"&&u.minimum!==void 0?a=a.min(u.minimum):u.check==="max_length"&&u.maximum!==void 0&&(a=a.max(u.maximum))}})}e.array=a}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||we(Gr()):e.array=we(Gr()).max(0):(typeof n.items=="boolean"&&n.items===!0||n.prefixItems)&&(e.array=e.array||we(Gr()))}},ete=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(i=>rr(i));let a;r.length===0?a=gT([]):a=gT(r),n.minItems!==void 0&&n.minItems>r.length&&(a=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(a=!1),e.tuple=a,e.array=!1}},tte=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||oe({}).passthrough())}},nte=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=oe({}).passthrough())}},rte=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||oe({}).passthrough();e.object=r.refine(a=>Object.keys(a).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},ote=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||oe({}).passthrough();e.object=r.refine(a=>Object.keys(a).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function dd(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>dd(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(a=>r.includes(a)&&dd(e[a],t[a]))}return!1}function ate(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(a=>dd(n,a))?!1:(t.push(n),!0))}}function hm(e,t){return e.safeParse(t).success}var ste=class{apply(e,t){if(!t.not)return e;const n=rr(t.not);return e.refine(r=>!hm(n,r),{message:"Value must not match the 'not' schema"})}},ite=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(ate(),{message:"Array items must be unique"})}},cte=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>rr(r)).reduce((r,a)=>yd(r,a),e)}},lte=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?rr(t.anyOf[0]):xt([rr(t.anyOf[0]),rr(t.anyOf[1]),...t.anyOf.slice(2).map(r=>rr(r))]);return yd(e,n)}},ute=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>rr(r));return e.refine(r=>{let a=0;for(const i of n)if(i.safeParse(r).success&&(a++,a>1))return!1;return a===1},{message:"Value must match exactly one of the oneOf schemas"})}},dte=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const a=n.prefixItems.map(i=>rr(i));return e.refine(i=>{if(!Array.isArray(i))return!0;for(let c=0;c<Math.min(i.length,a.length);c++)if(!hm(a[c],i[c]))return!1;if(i.length>a.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const c=rr(n.items);for(let u=a.length;u<i.length;u++)if(!hm(c,i[u]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},fte=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof Dm||e instanceof ik){const r={};if(n.properties)for(const[a,i]of Object.entries(n.properties))i!==void 0&&(r[a]=rr(i));if(n.required&&Array.isArray(n.required)){const a=new Set(n.required);for(const i of Object.keys(r))a.has(i)||(r[i]=r[i].optional())}else for(const a of Object.keys(r))r[a]=r[a].optional();return n.additionalProperties===!1?oe(r):oe(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[a,i]of Object.entries(n.properties))if(i!==void 0&&Object.getOwnPropertyDescriptor(r,a)!==void 0&&!rr(i).safeParse(r[a]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const a of n.required)if(!(Object.getOwnPropertyDescriptor(r,a)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const a=new Set(Object.keys(n.properties));for(const i in r)if(!a.has(i))return!1}return!0},{message:"Object constraints validation failed"})}},hte=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(a=>dd(r,a)),{message:"Value must match one of the enum values"})}},pte=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>dd(r,n),{message:"Value must equal the const value"})}},mte=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},gte=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Gr().refine(a=>this.validateRequired(a,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},vte=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const a=rr(r.contains),i=(n=r.minContains)!=null?n:1,c=r.maxContains;return e.refine(u=>{if(!Array.isArray(u))return!0;let d=0;for(const f of u)hm(a,f)&&d++;return!(d<i||c!==void 0&&d>c)},{message:"Array must contain required items matching the schema"})}},yte=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},_te=[new $ee,new Uee,new jee,new zee,new Vee,new Yee,new nte,new Fee,new Bee,new qee,new Hee,new Gee,new Zee,new Kee,new Wee,new ete,new Qee,new Xee,new Jee,new rte,new ote,new tte],bte=[new gte,new hte,new pte,new cte,new lte,new ute,new dte,new fte,new vte,new ste,new ite,new yte,new mte];function rr(e){if(typeof e=="boolean")return e?Gr():zp();const t={};for(const a of _te)a.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||M()),t.number!==!1&&n.push(t.number||$e()),t.boolean!==!1&&n.push(t.boolean||We()),t.null!==!1&&n.push(t.null||vd()),t.array!==!1&&n.push(t.array||we(Gr())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const a=dk(i=>typeof i=="object"&&i!==null&&!Array.isArray(i),"Must be an object, not an array");n.push(a)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=zp():n.length===1?r=n[0]:Object.keys(e).some(i=>i!=="$schema"&&i!=="title"&&i!=="description")?r=xt(n):r=Gr();for(const a of bte)r=a.apply(r,e);return r}class TC extends Event{constructor(t,n){var r,a;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(a=n?.message)!=null?a:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(OC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(OC(this),n)}}function wte(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function W_(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(W_).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${W_(e.cause)}`:e.message:`${e}`}function OC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var OP=e=>{throw TypeError(e)},ew=(e,t,n)=>t.has(e)||OP("Cannot "+n),_t=(e,t,n)=>(ew(e,t,"read from private field"),n?n.call(e):t.get(e)),Cn=(e,t,n)=>t.has(e)?OP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Qt=(e,t,n,r)=>(ew(e,t,"write to private field"),t.set(e,n),n),ka=(e,t,n)=>(ew(e,t,"access private method"),n),Ar,Si,Gc,wp,pm,Ku,Jc,Wu,Rs,Zc,cl,Kc,Lu,Ao,Y_,Q_,X_,CC,J_,eb,ju,tb,nb;class Sp extends EventTarget{constructor(t,n){var r,a;super(),Cn(this,Ao),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Cn(this,Ar),Cn(this,Si),Cn(this,Gc),Cn(this,wp),Cn(this,pm),Cn(this,Ku),Cn(this,Jc),Cn(this,Wu,null),Cn(this,Rs),Cn(this,Zc),Cn(this,cl,null),Cn(this,Kc,null),Cn(this,Lu,null),Cn(this,Q_,async i=>{var c;_t(this,Zc).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){ka(this,Ao,ju).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?Qt(this,Gc,new URL(i.url)):Qt(this,Gc,void 0),f!==200){ka(this,Ao,ju).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){ka(this,Ao,ju).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(_t(this,Ar)===this.CLOSED)return;Qt(this,Ar,this.OPEN);const p=new Event("open");if((c=_t(this,Lu))==null||c.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){ka(this,Ao,ju).call(this,"Invalid response body, expected a web ReadableStream",f),this.close();return}const g=new TextDecoder,y=u.getReader();let b=!0;do{const{done:S,value:w}=await y.read();w&&_t(this,Zc).feed(g.decode(w,{stream:!S})),S&&(b=!1,_t(this,Zc).reset(),ka(this,Ao,tb).call(this))}while(b)}),Cn(this,X_,i=>{Qt(this,Rs,void 0),!(i.name==="AbortError"||i.type==="aborted")&&ka(this,Ao,tb).call(this,W_(i))}),Cn(this,J_,i=>{typeof i.id=="string"&&Qt(this,Wu,i.id);const c=new MessageEvent(i.event||"message",{data:i.data,origin:_t(this,Gc)?_t(this,Gc).origin:_t(this,Si).origin,lastEventId:i.id||""});_t(this,Kc)&&(!i.event||i.event==="message")&&_t(this,Kc).call(this,c),this.dispatchEvent(c)}),Cn(this,eb,i=>{Qt(this,Ku,i)}),Cn(this,nb,()=>{Qt(this,Jc,void 0),_t(this,Ar)===this.CONNECTING&&ka(this,Ao,Y_).call(this)});try{if(t instanceof URL)Qt(this,Si,t);else if(typeof t=="string")Qt(this,Si,new URL(t,Ste()));else throw new Error("Invalid URL")}catch{throw wte("An invalid or illegal string was specified")}Qt(this,Zc,vP({onEvent:_t(this,J_),onRetry:_t(this,eb)})),Qt(this,Ar,this.CONNECTING),Qt(this,Ku,3e3),Qt(this,pm,(r=n?.fetch)!=null?r:globalThis.fetch),Qt(this,wp,(a=n?.withCredentials)!=null?a:!1),ka(this,Ao,Y_).call(this)}get readyState(){return _t(this,Ar)}get url(){return _t(this,Si).href}get withCredentials(){return _t(this,wp)}get onerror(){return _t(this,cl)}set onerror(t){Qt(this,cl,t)}get onmessage(){return _t(this,Kc)}set onmessage(t){Qt(this,Kc,t)}get onopen(){return _t(this,Lu)}set onopen(t){Qt(this,Lu,t)}addEventListener(t,n,r){const a=n;super.addEventListener(t,a,r)}removeEventListener(t,n,r){const a=n;super.removeEventListener(t,a,r)}close(){_t(this,Jc)&&clearTimeout(_t(this,Jc)),_t(this,Ar)!==this.CLOSED&&(_t(this,Rs)&&_t(this,Rs).abort(),Qt(this,Ar,this.CLOSED),Qt(this,Rs,void 0))}}Ar=new WeakMap,Si=new WeakMap,Gc=new WeakMap,wp=new WeakMap,pm=new WeakMap,Ku=new WeakMap,Jc=new WeakMap,Wu=new WeakMap,Rs=new WeakMap,Zc=new WeakMap,cl=new WeakMap,Kc=new WeakMap,Lu=new WeakMap,Ao=new WeakSet,Y_=function(){Qt(this,Ar,this.CONNECTING),Qt(this,Rs,new AbortController),_t(this,pm)(_t(this,Si),ka(this,Ao,CC).call(this)).then(_t(this,Q_)).catch(_t(this,X_))},Q_=new WeakMap,X_=new WeakMap,CC=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",..._t(this,Wu)?{"Last-Event-ID":_t(this,Wu)}:void 0},cache:"no-store",signal:(e=_t(this,Rs))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},J_=new WeakMap,eb=new WeakMap,ju=function(e,t){var n;_t(this,Ar)!==this.CLOSED&&Qt(this,Ar,this.CLOSED);const r=new TC("error",{code:t,message:e});(n=_t(this,cl))==null||n.call(this,r),this.dispatchEvent(r)},tb=function(e,t){var n;if(_t(this,Ar)===this.CLOSED)return;Qt(this,Ar,this.CONNECTING);const r=new TC("error",{code:t,message:e});(n=_t(this,cl))==null||n.call(this,r),this.dispatchEvent(r),Qt(this,Jc,setTimeout(_t(this,nb),_t(this,Ku)))},nb=new WeakMap,Sp.CONNECTING=0,Sp.OPEN=1,Sp.CLOSED=2;function Ste(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class Ete extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class Rte{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=hP(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new ko("No auth provider");let t;try{t=await Ts(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new ko;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=im(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new Sp(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const c=await this._commonHeaders();c.set("Accept","text/event-stream");const u=await t(a,{...i,headers:c});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=fm(u);this._resourceMetadataUrl=d,this._scope=f}return u}}),this._abortController=new AbortController,this._eventSource.onerror=a=>{if(a.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const i=new Ete(a.code,a.message,a);r(i),this.onerror?.(i)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",a=>{const i=a;try{if(this._endpoint=new URL(i.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(c){r(c),this.onerror?.(c),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let c;try{c=Zu.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(c)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new ko("No auth provider");if(await Ts(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ko("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},a=await(this._fetch??fetch)(this._endpoint,r);if(!a.ok){const i=await a.text().catch(()=>null);if(a.status===401&&this._authProvider){const{resourceMetadataUrl:c,scope:u}=fm(a);if(this._resourceMetadataUrl=c,this._scope=u,await Ts(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new ko;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${a.status}): ${i}`)}await a.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const xte="mcp";class Tte{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,xte),this._socket.onerror=r=>{const a="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(a),this.onerror?.(a)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let a;try{a=Zu.parse(JSON.parse(r.data))}catch(i){this.onerror?.(i);return}this.onmessage?.(a)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class Ote extends yee{constructor(t,n){super(t,n)}send(t,n){const r=Cte(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function Cte(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Ate extends fP{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},B1,n)}}const Ite=async(e,t,n)=>{const r=kte(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new Ate({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,c,u)=>{if(e.connection.type!=="HTTP")throw new Error("HTTP connection required");const d=new Headers(n);d.has("Authorization")||d.set("Authorization",`Bearer ${e.connection.token}`);for(const[p,g]of Object.entries(e.connection.headers??{}))d.set(p,g);const f=new URL(e.connection.url),m=f.pathname.replace(/\/+$/,"")||"/";return f.pathname=`${m}/call-tool/${encodeURIComponent(i)}`,fetch(f.href,{method:"POST",redirect:"manual",body:JSON.stringify(c),headers:d,signal:u})}}},kte=(e,t,n)=>{if(e.type==="Websocket")return new Tte(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const a={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const i={requestInit:{headers:a,signal:t}};return e.token&&(i.eventSourceInit={fetch:(c,u)=>fetch(c,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new Rte(new URL(e.url),i)}return new Ote(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},AC=e=>{try{return JSON.parse(e)}catch{return e}},cp=new Map,IC=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?rr(e.inputSchema):void 0,outputSchema:e.outputSchema?rr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function Nte(e){const t=n=>"connection"in e?Ite({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return u;async function a(d,f=r){const m=e?.debugId?.(),p=m?{"x-trace-debug-id":m}:void 0,{client:g,callStreamableTool:y}=await t(p);if(e?.streamable?.[String(f)]){if(!y)throw new Error(`Tool ${String(f)} requires streaming support but client doesn't provide callStreamableTool`);return await y(String(f),d)}const{structuredContent:b,isError:S,content:w}=await g.callTool({name:String(f),arguments:d});if(S){const E=w?.[0]?.text,T=typeof E=="string"?AC(E):null,O=T?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(T.code,T.message,T.traceId):null;throw O||new Error(`Tool ${String(f)} returned an error: ${JSON.stringify(b??w)}`)}if(b!==void 0)return b;const x=w?.[0]?.text;return typeof x=="string"?AC(x):void 0}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function c(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return cp.has(f)||cp.set(f,i()),await cp.get(f)}catch(m){console.error("Failed to list tools",m),cp.delete(f);return}}async function u(){return(await c()??[]).map(f=>IC(f,a))}return a.asTool=async()=>{const f=(await c()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return IC(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Mte({connection:n}):global[t]}});function Mte(e){return Nte(e)}const og=oe({id:M().describe("Unique identifier for the entity"),title:M().describe("Human-readable title for the entity"),description:M().nullish().describe("Description of the entity"),created_at:M().datetime(),updated_at:M().datetime(),created_by:M().optional(),updated_by:M().optional()}),Pte=oe({field:we(M()),operator:Tt(["eq","gt","gte","lt","lte","in","like","contains"]),value:Je()}),CP=Yr(()=>xt([Pte,oe({operator:Tt(["and","or","not"]),conditions:we(CP)})])),Dte=oe({field:we(M()),direction:Tt(["asc","desc"]),nulls:Tt(["first","last"]).optional()}),Lte=oe({where:CP.optional().describe("Filter expression"),orderBy:we(Dte).optional().describe("Sort expressions"),limit:$e().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:$e().int().min(0).optional().describe("Number of items to skip")});function jte(e){return oe({items:we(e).describe("Array of collection items"),totalCount:$e().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:We().optional().describe("Whether there are more items available")})}const $te=oe({id:M().describe("ID of the entity to retrieve")});function Ute(e){return oe({item:e.nullable().describe("The retrieved item, or null if not found")})}function zte(e){return oe({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function Vte(e){return oe({item:e.describe("The created entity with generated id")})}function Fte(e){return oe({id:M().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function Bte(e){return oe({item:e.describe("The updated entity")})}const qte=oe({id:M().describe("ID of the entity to delete")});function Hte(e){return oe({item:e.describe("The deleted entity")})}function ag(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:Lte,outputSchema:jte(t)},{name:`COLLECTION_${r}_GET`,inputSchema:$te,outputSchema:Ute(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:zte(t),outputSchema:Vte(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:Fte(t),outputSchema:Bte(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:qte,outputSchema:Hte(t),opt:!0}),i}const Gte=oe({id:M(),name:M(),description:M().optional(),inputSchema:at(M(),Je()),outputSchema:at(M(),Je()).optional()}),Zte=og.extend({_meta:oe({"io.decocms":oe({id:M(),verified:We(),scopeName:M(),appName:M(),friendlyName:M().nullable().optional(),metadata:at(M(),Je()).nullable().optional(),publishedAt:M().datetime().optional(),updatedAt:M().datetime().optional(),tools:we(Gte).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:oe({$schema:M().optional(),_meta:at(M(),Je()).optional(),name:M().describe("The server name (scope/app)"),title:M().optional().describe("User-friendly title"),description:M().optional().describe("Server description"),icons:we(oe({src:M(),mimeType:M().optional(),sizes:we(M()).optional(),theme:Tt(["light","dark"]).optional()})).optional(),remotes:we(oe({type:Tt(["http","stdio","sse"]),url:M().optional(),headers:we(Je()).optional()})).optional(),packages:we(Je()).optional(),repository:oe({url:M(),source:M().optional(),subfolder:M().optional()}).optional(),version:M().optional(),websiteUrl:M().optional()})});ag("registry_app",Zte,{readOnly:!0});const Kte=oe({specversion:Le("1.0").describe("CloudEvents specification version"),id:M().describe("Unique identifier for this event (UUID recommended)"),source:M().describe("Connection ID of the event publisher"),type:M().describe("Event type (e.g., 'order.created', 'user.signup')"),time:M().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:M().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:M().optional().default("application/json").describe("Content type of the data attribute"),dataschema:M().url().optional().describe("URI to the schema for the data attribute"),data:Je().optional().describe("Event payload (any JSON value)")});oe({events:we(Kte).min(1).describe("Batch of CloudEvents to process")});const Wte=oe({success:We().optional().describe("Whether this event was processed successfully"),error:M().optional().describe("Error message for this event"),retryAfter:$e().int().positive().optional().describe("Re-deliver this event after this many ms")});oe({success:We().optional().describe("Batch success - applies to events not in results"),error:M().optional().describe("Batch error message - applies to events not in results"),processedCount:$e().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:$e().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:at(M(),Wte).optional().describe("Per-event results keyed by event ID")});const Yte=oe({type:M().min(1).max(255).describe("Event type identifier"),subject:M().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:Je().optional().describe("Event payload"),deliverAt:M().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:M().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")}),Qte=oe({id:M().describe("Unique event ID"),type:M().describe("Event type"),source:M().describe("Source connection ID"),time:M().describe("Event timestamp")}),Xte=oe({eventType:M().min(1).max(255).describe("Event type to subscribe to"),publisher:M().optional().describe("Filter events by publisher connection ID"),filter:M().max(1e3).optional().describe("JSONPath filter expression on event data")}),Jte=oe({subscription:oe({id:M().describe("Subscription ID"),connectionId:M().describe("Subscriber connection ID"),eventType:M().describe("Event type pattern"),publisher:M().nullable().describe("Publisher connection filter"),filter:M().nullable().describe("JSONPath filter expression"),enabled:We().describe("Whether subscription is enabled"),createdAt:M().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:M().datetime().describe("Updated timestamp (ISO 8601)")})}),ene=oe({eventType:M().min(1).max(255).describe("Event type to subscribe to"),publisher:M().optional().describe("Filter events by publisher connection ID"),filter:M().max(1e3).optional().describe("JSONPath filter expression on event data")}),tne=oe({id:M().describe("Subscription ID"),connectionId:M().describe("Subscriber connection ID"),eventType:M().describe("Event type pattern"),publisher:M().nullable().describe("Publisher connection filter"),filter:M().nullable().describe("JSONPath filter expression"),enabled:We().describe("Whether subscription is enabled"),createdAt:M().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:M().datetime().describe("Updated timestamp (ISO 8601)")}),nne=oe({subscriptions:we(ene).describe("Desired subscriptions - system will create/update/delete to match")}),rne=oe({created:$e().int().min(0).describe("Number of subscriptions created"),updated:$e().int().min(0).describe("Number of subscriptions with filter updated"),deleted:$e().int().min(0).describe("Number of subscriptions removed"),unchanged:$e().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:we(tne).describe("Current subscriptions after sync")}),one=oe({subscriptionId:M().describe("Subscription ID to remove")}),ane=oe({success:We().describe("Whether unsubscribe was successful"),subscriptionId:M().describe("Subscription ID that was removed")}),sne=oe({eventId:M().describe("Event ID to cancel")}),ine=oe({success:We().describe("Whether cancellation was successful"),eventId:M().describe("Event ID that was cancelled")}),cne=oe({eventId:M().describe("Event ID to acknowledge")}),lne=oe({success:We().describe("Whether ACK was successful"),eventId:M().describe("Event ID that was acknowledged")}),fae=[{name:"EVENT_PUBLISH",inputSchema:Yte,outputSchema:Qte},{name:"EVENT_SUBSCRIBE",inputSchema:Xte,outputSchema:Jte},{name:"EVENT_UNSUBSCRIBE",inputSchema:one,outputSchema:ane},{name:"EVENT_CANCEL",inputSchema:sne,outputSchema:ine},{name:"EVENT_ACK",inputSchema:cne,outputSchema:lne},{name:"EVENT_SYNC_SUBSCRIPTIONS",inputSchema:nne,outputSchema:rne}],une=oe({type:Le("string"),enum:we(M()).optional(),description:M().optional()}),dne=oe({type:M(),description:M(),paramsSchema:at(M(),une)}),fne=oe({}),hne=oe({triggers:we(dne)}),pne=oe({type:M(),params:at(M(),M()),enabled:We()}),mne=oe({success:We()}),hae=[{name:"TRIGGER_LIST",inputSchema:fne,outputSchema:hne},{name:"TRIGGER_CONFIGURE",inputSchema:pne,outputSchema:mne}],gne=oe({prefix:M().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:$e().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:M().optional().describe("Token for pagination from previous response"),delimiter:M().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),vne=oe({objects:we(oe({key:M().describe("Object key/path"),size:$e().describe("Object size in bytes"),lastModified:M().describe("Last modified timestamp"),etag:M().describe("Entity tag for the object")})),nextContinuationToken:M().optional().describe("Token for fetching next page of results"),isTruncated:We().describe("Whether there are more results available"),commonPrefixes:we(M()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),yne=oe({key:M().describe("Object key/path to get metadata for")}),_ne=oe({contentType:M().optional().describe("MIME type of the object"),contentLength:$e().describe("Size of the object in bytes"),lastModified:M().describe("Last modified timestamp"),etag:M().describe("Entity tag for the object"),metadata:at(M(),M()).optional().describe("Custom metadata key-value pairs")}),bne=oe({key:M().describe("Object key/path to generate URL for"),expiresIn:$e().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),wne=oe({url:M().describe("Presigned URL for downloading the object"),expiresIn:$e().describe("Expiration time in seconds that was used")}),Sne=oe({key:M().describe("Object key/path for the upload"),expiresIn:$e().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:M().optional().describe("MIME type for the object being uploaded")}),Ene=oe({url:M().describe("Presigned URL for uploading the object"),expiresIn:$e().describe("Expiration time in seconds that was used")}),Rne=oe({key:M().describe("Object key/path to delete")}),xne=oe({success:We().describe("Whether the deletion was successful"),key:M().describe("The key that was deleted")}),Tne=oe({keys:we(M()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),One=oe({deleted:we(M()).describe("Array of successfully deleted keys"),errors:we(oe({key:M(),message:M()})).describe("Array of errors for failed deletions")}),Cne=[{name:"LIST_OBJECTS",inputSchema:gne,outputSchema:vne},{name:"GET_OBJECT_METADATA",inputSchema:yne,outputSchema:_ne},{name:"GET_PRESIGNED_URL",inputSchema:bne,outputSchema:wne},{name:"PUT_PRESIGNED_URL",inputSchema:Sne,outputSchema:Ene},{name:"DELETE_OBJECT",inputSchema:Rne,outputSchema:xne},{name:"DELETE_OBJECTS",inputSchema:Tne,outputSchema:One}],Ane=oe({toolName:M().describe("Name of the tool to invoke on that connection"),transformCode:M().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),Ine=oe({code:M().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
|
|
175
|
-
The input is the resolved value of the references in the input field. Example:
|
|
176
|
-
{
|
|
177
|
-
"input": {
|
|
178
|
-
"name": "@Step_1.name",
|
|
179
|
-
"age": "@Step_2.age"
|
|
180
|
-
},
|
|
181
|
-
"code": "export default function(input): Output { return { result: \`\${input.name} is \${input.age} years old.\` } }"
|
|
182
|
-
}
|
|
183
|
-
`)});oe({signalName:M().describe("Signal name to wait for (e.g., 'approval'). Execution pauses until SEND_SIGNAL is called with this name.")});const kne=xt([Ane.describe("Call an external tool via MCP connection. "),Ine.describe("Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.")]),Nne=oe({maxAttempts:$e().optional().describe("Max retry attempts on failure (default: 1, no retries)"),backoffMs:$e().optional().describe("Initial delay between retries in ms (doubles each attempt)"),timeoutMs:$e().optional().describe("Max execution time in ms before step fails (default: 30000)"),onError:Tt(["fail","continue"]).optional().describe("What to do when this step fails: 'fail' aborts the workflow, 'continue' skips the error and proceeds")}),AP=Yr(()=>oe({type:M().optional(),properties:at(M(),Je()).optional(),required:we(M()).optional(),description:M().optional(),additionalProperties:xt([We(),at(M(),Je())]).optional(),additionalItems:xt([We(),at(M(),Je())]).optional(),items:AP.optional()}).passthrough()),kC=["input","item","index","ctx"],Mne=oe({name:M().min(1).refine(e=>!kC.includes(e),{message:`Step name is reserved. Reserved names: ${kC.join(", ")}`}).describe("Unique identifier for this step. Other steps reference its output as @name.field"),description:M().optional().describe("What this step does"),action:kne,input:at(M(),Je()).optional().describe("Data passed to the action. Use @ref for dynamic values: @input.field (workflow input), @stepName.field (previous step output), @item/@index (loop context), @ctx.execution_id (current execution ID). Example: { 'userId': '@input.user_id', 'data': '@fetch.result', 'executionId': '@ctx.execution_id' }"),outputSchema:AP.optional().describe("Optional JSON Schema describing the expected output of the step."),config:Nne.optional().describe("Retry and timeout settings"),forEach:oe({ref:M().describe("@ ref to the step to iterate over"),concurrency:$e().optional().default(1).describe("max parallel iterations. default is 1 (sequential)")}).optional()}),Pne=Tt(["enqueued","running","success","error","failed","cancelled"]).default("enqueued"),IP=og.extend({virtual_mcp_id:M().describe("ID of the virtual MCP (agent) that will be used to execute the workflow"),status:Pne.describe("Current status of the workflow execution"),input:at(M(),Je()).optional().describe("Input data for the workflow execution"),output:Je().optional().describe("Output data for the workflow execution"),completed_at_epoch_ms:$e().nullish().describe("Timestamp of when the workflow execution completed"),start_at_epoch_ms:$e().nullish().describe("Timestamp of when the workflow execution started or will start"),timeout_ms:$e().nullish().describe("Timeout in milliseconds for the workflow execution"),deadline_at_epoch_ms:$e().nullish().describe("Deadline for the workflow execution - when the workflow execution will be cancelled if it is not completed. This is read-only and is set by the workflow engine when an execution is created."),error:Je().nullish().describe("Error that occurred during the workflow execution"),completed_steps:oe({success:we(oe({name:M(),completed_at_epoch_ms:$e()})).describe("Names of the steps that were completed successfully"),error:we(M()).describe("Names of the steps that errored")}).optional().describe("Names of the steps that were completed and their status"),running_steps:we(M()).optional().describe("Names of the steps that are currently running")}),Dne=Tt(["signal","timer","message","output","step_started","step_completed","workflow_started","workflow_completed"]);og.extend({execution_id:M(),type:Dne,name:M().nullish(),payload:Je().optional(),visible_at:$e().nullish(),consumed_at:$e().nullish(),source_execution_id:M().nullish()});const Lne=og.extend({description:M().optional().describe("Human-readable summary of what this workflow does"),steps:we(Mne).describe("Ordered list of steps. Execution order is auto-determined by @ref dependencies: steps with no @ref dependencies run in parallel; steps referencing @stepName wait for that step to complete.")}),jne=ag("workflow",Lne),$ne={maxAttempts:1,timeoutMs:3e4},pae={name:"Initial Step",action:{code:`
|
|
184
|
-
interface Input {
|
|
185
|
-
example: string;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
interface Output {
|
|
189
|
-
result: unknown;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export default async function(input: Input): Promise<Output> {
|
|
193
|
-
return {
|
|
194
|
-
result: input.example
|
|
195
|
-
}
|
|
196
|
-
}`},config:$ne,outputSchema:{type:"object",properties:{result:{type:"string",description:"The result of the step"}},required:["result"],description:"The output of the step. This is a JSON Schema describing the expected output of the step."}},Une=ag("workflow_execution",IP),zne=[...jne,...Une],mae=[...zne],gae=ag("workflow_execution",IP);function NC(e,t,n,r){return e?e.startsWith("/")?`/${t}/${n}/${r}${e}`:e:`/${t}/${n}/${r}`}function Vne(e){return{createRoutes:e,useParams:t=>nl({strict:!1}),useSearch:t=>Rm({strict:!1}),useNavigate:()=>{const t=wl(),{org:n,project:r,pluginId:a}=nl({strict:!1});return i=>{const c=NC(i.to,n,r,a);return t({...i,to:c,params:{org:n,project:r,pluginId:a,...i.params}})}},useLocation:()=>RL(),Link:function(n){const{org:r,project:a,pluginId:i}=nl({strict:!1}),c=NC(n.to,r,a,i);return R.jsx(Tm,{...n,to:c,params:{org:r,project:a,pluginId:i,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var kt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const c of a)i[c]=c;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),c={};for(const u of i)c[u]=a[u];return e.objectValues(c)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&i.push(c);return i},e.find=(a,i)=>{for(const c of a)if(i(c))return c},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(c=>typeof c=="string"?`'${c}'`:c).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(kt||(kt={}));var MC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(MC||(MC={}));const Fe=kt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ss=e=>{switch(typeof e){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return Number.isNaN(e)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(e)?Fe.array:e===null?Fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Fe.promise:typeof Map<"u"&&e instanceof Map?Fe.map:typeof Set<"u"&&e instanceof Set?Fe.set:typeof Date<"u"&&e instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}},Ie=kt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class La extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const c of i.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)r._errors.push(n(c));else{let u=r,d=0;for(;d<c.path.length;){const f=c.path[d];d===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof La))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,kt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}La.create=e=>new La(e);const rb=(e,t)=>{let n;switch(e.code){case Ie.invalid_type:e.received===Fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,kt.jsonStringifyReplacer)}`;break;case Ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${kt.joinValues(e.keys,", ")}`;break;case Ie.invalid_union:n="Invalid input";break;case Ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${kt.joinValues(e.options)}`;break;case Ie.invalid_enum_value:n=`Invalid enum value. Expected ${kt.joinValues(e.options)}, received '${e.received}'`;break;case Ie.invalid_arguments:n="Invalid function arguments";break;case Ie.invalid_return_type:n="Invalid function return type";break;case Ie.invalid_date:n="Invalid date";break;case Ie.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:kt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ie.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ie.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ie.custom:n="Invalid input";break;case Ie.invalid_intersection_types:n="Intersection results could not be merged";break;case Ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,kt.assertNever(e)}return{message:n}};let Fne=rb;function Bne(){return Fne}const qne=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],c={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(c,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function Pe(e,t){const n=Bne(),r=qne({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===rb?void 0:rb].filter(a=>!!a)});e.common.issues.push(r)}class Wr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return nt;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,c=await a.value;r.push({key:i,value:c})}return Wr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:c}=a;if(i.status==="aborted"||c.status==="aborted")return nt;i.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(r[i.value]=c.value)}return{status:t.value,value:r}}}const nt=Object.freeze({status:"aborted"}),$u=e=>({status:"dirty",value:e}),bo=e=>({status:"valid",value:e}),PC=e=>e.status==="aborted",DC=e=>e.status==="dirty",vl=e=>e.status==="valid",mm=e=>typeof Promise<"u"&&e instanceof Promise;var qe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(qe||(qe={}));class $s{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const LC=(e,t)=>{if(vl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new La(e.common.issues);return this._error=n,this._error}}};function mt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(c,u)=>{const{message:d}=e;return c.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class Ct{get description(){return this._def.description}_getType(t){return Ss(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ss(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Wr,ctx:{common:t.parent.common,data:t.data,parsedType:Ss(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(mm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ss(t)},a=this._parseSync({data:t,path:r.path,parent:r});return LC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ss(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return vl(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>vl(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ss(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(mm(a)?a:Promise.resolve(a));return LC(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const c=t(a),u=()=>i.addIssue({code:Ie.custom,...r(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(d=>d?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new _l({schema:this,typeName:rt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ms.create(this,this._def)}nullable(){return bl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ta.create(this)}promise(){return _m.create(this,this._def)}or(t){return vm.create([this,t],this._def)}and(t){return ym.create(this,t,this._def)}transform(t){return new _l({...mt(this._def),schema:this,typeName:rt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new sb({...mt(this._def),innerType:this,defaultValue:n,typeName:rt.ZodDefault})}brand(){return new hre({typeName:rt.ZodBranded,type:this,...mt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ib({...mt(this._def),innerType:this,catchValue:n,typeName:rt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tw.create(this,t)}readonly(){return cb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hne=/^c[^\s-]{8,}$/i,Gne=/^[0-9a-z]+$/,Zne=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Kne=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Wne=/^[a-z0-9_-]{21}$/i,Yne=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Qne=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Xne=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Jne="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q0;const ere=/^(?:(?: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])$/,tre=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,nre=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,rre=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ore=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,are=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,kP="((\\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])))",sre=new RegExp(`^${kP}$`);function NP(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ire(e){return new RegExp(`^${NP(e)}$`)}function cre(e){let t=`${kP}T${NP(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function lre(e,t){return!!((t==="v4"||!t)&&ere.test(e)||(t==="v6"||!t)&&nre.test(e))}function ure(e,t){if(!Yne.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function dre(e,t){return!!((t==="v4"||!t)&&tre.test(e)||(t==="v6"||!t)&&rre.test(e))}class Os extends Ct{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Fe.string){const i=this._getOrReturnCtx(t);return Pe(i,{code:Ie.invalid_type,expected:Fe.string,received:i.parsedType}),nt}const r=new Wr;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const c=t.data.length>i.value,u=t.data.length<i.value;(c||u)&&(a=this._getOrReturnCtx(t,a),c?Pe(a,{code:Ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&Pe(a,{code:Ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Xne.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"email",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")q0||(q0=new RegExp(Jne,"u")),q0.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"emoji",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Kne.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"uuid",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Wne.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"nanoid",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Hne.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"cuid",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Gne.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"cuid2",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Zne.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"ulid",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Pe(a,{validation:"url",code:Ie.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"regex",code:Ie.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?cre(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?sre.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?ire(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Qne.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"duration",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?lre(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"ip",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?ure(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"jwt",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?dre(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"cidr",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?ore.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"base64",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?are.test(t.data)||(a=this._getOrReturnCtx(t,a),Pe(a,{validation:"base64url",code:Ie.invalid_string,message:i.message}),r.dirty()):kt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:Ie.invalid_string,...qe.errToObj(r)})}_addCheck(t){return new Os({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...qe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...qe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...qe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...qe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...qe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...qe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...qe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...qe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...qe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...qe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...qe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...qe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...qe.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...qe.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...qe.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...qe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...qe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...qe.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...qe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...qe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...qe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...qe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...qe.errToObj(n)})}nonempty(t){return this.min(1,qe.errToObj(t))}trim(){return new Os({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Os({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Os({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Os.create=e=>new Os({checks:[],typeName:rt.ZodString,coerce:e?.coerce??!1,...mt(e)});function fre(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=Number.parseInt(e.toFixed(a).replace(".","")),c=Number.parseInt(t.toFixed(a).replace(".",""));return i%c/10**a}class fd extends Ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Fe.number){const i=this._getOrReturnCtx(t);return Pe(i,{code:Ie.invalid_type,expected:Fe.number,received:i.parsedType}),nt}let r;const a=new Wr;for(const i of this._def.checks)i.kind==="int"?kt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Pe(r,{code:Ie.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:Ie.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:Ie.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?fre(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:Ie.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Pe(r,{code:Ie.not_finite,message:i.message}),a.dirty()):kt.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,qe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,qe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,qe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,qe.toString(n))}setLimit(t,n,r,a){return new fd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:qe.toString(a)}]})}_addCheck(t){return new fd({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:qe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:qe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:qe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:qe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:qe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:qe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:qe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:qe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:qe.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&kt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}fd.create=e=>new fd({checks:[],typeName:rt.ZodNumber,coerce:e?.coerce||!1,...mt(e)});class hd extends Ct{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Fe.bigint)return this._getInvalidInput(t);let r;const a=new Wr;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:Ie.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:Ie.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Pe(r,{code:Ie.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):kt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Pe(n,{code:Ie.invalid_type,expected:Fe.bigint,received:n.parsedType}),nt}gte(t,n){return this.setLimit("min",t,!0,qe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,qe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,qe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,qe.toString(n))}setLimit(t,n,r,a){return new hd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:qe.toString(a)}]})}_addCheck(t){return new hd({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:qe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:qe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:qe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:qe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:qe.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}hd.create=e=>new hd({checks:[],typeName:rt.ZodBigInt,coerce:e?.coerce??!1,...mt(e)});class ob extends Ct{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Fe.boolean){const r=this._getOrReturnCtx(t);return Pe(r,{code:Ie.invalid_type,expected:Fe.boolean,received:r.parsedType}),nt}return bo(t.data)}}ob.create=e=>new ob({typeName:rt.ZodBoolean,coerce:e?.coerce||!1,...mt(e)});class gm extends Ct{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Fe.date){const i=this._getOrReturnCtx(t);return Pe(i,{code:Ie.invalid_type,expected:Fe.date,received:i.parsedType}),nt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Pe(i,{code:Ie.invalid_date}),nt}const r=new Wr;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),Pe(a,{code:Ie.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):kt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new gm({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:qe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:qe.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}gm.create=e=>new gm({checks:[],coerce:e?.coerce||!1,typeName:rt.ZodDate,...mt(e)});class jC extends Ct{_parse(t){if(this._getType(t)!==Fe.symbol){const r=this._getOrReturnCtx(t);return Pe(r,{code:Ie.invalid_type,expected:Fe.symbol,received:r.parsedType}),nt}return bo(t.data)}}jC.create=e=>new jC({typeName:rt.ZodSymbol,...mt(e)});class $C extends Ct{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return Pe(r,{code:Ie.invalid_type,expected:Fe.undefined,received:r.parsedType}),nt}return bo(t.data)}}$C.create=e=>new $C({typeName:rt.ZodUndefined,...mt(e)});class UC extends Ct{_parse(t){if(this._getType(t)!==Fe.null){const r=this._getOrReturnCtx(t);return Pe(r,{code:Ie.invalid_type,expected:Fe.null,received:r.parsedType}),nt}return bo(t.data)}}UC.create=e=>new UC({typeName:rt.ZodNull,...mt(e)});class zC extends Ct{constructor(){super(...arguments),this._any=!0}_parse(t){return bo(t.data)}}zC.create=e=>new zC({typeName:rt.ZodAny,...mt(e)});class VC extends Ct{constructor(){super(...arguments),this._unknown=!0}_parse(t){return bo(t.data)}}VC.create=e=>new VC({typeName:rt.ZodUnknown,...mt(e)});class Us extends Ct{_parse(t){const n=this._getOrReturnCtx(t);return Pe(n,{code:Ie.invalid_type,expected:Fe.never,received:n.parsedType}),nt}}Us.create=e=>new Us({typeName:rt.ZodNever,...mt(e)});class FC extends Ct{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return Pe(r,{code:Ie.invalid_type,expected:Fe.void,received:r.parsedType}),nt}return bo(t.data)}}FC.create=e=>new FC({typeName:rt.ZodVoid,...mt(e)});class ta extends Ct{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Fe.array)return Pe(n,{code:Ie.invalid_type,expected:Fe.array,received:n.parsedType}),nt;if(a.exactLength!==null){const c=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(c||u)&&(Pe(n,{code:c?Ie.too_big:Ie.too_small,minimum:u?a.exactLength.value:void 0,maximum:c?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Pe(n,{code:Ie.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Pe(n,{code:Ie.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>a.type._parseAsync(new $s(n,c,n.path,u)))).then(c=>Wr.mergeArray(r,c));const i=[...n.data].map((c,u)=>a.type._parseSync(new $s(n,c,n.path,u)));return Wr.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ta({...this._def,minLength:{value:t,message:qe.toString(n)}})}max(t,n){return new ta({...this._def,maxLength:{value:t,message:qe.toString(n)}})}length(t,n){return new ta({...this._def,exactLength:{value:t,message:qe.toString(n)}})}nonempty(t){return this.min(1,t)}}ta.create=(e,t)=>new ta({type:e,minLength:null,maxLength:null,exactLength:null,typeName:rt.ZodArray,...mt(t)});function Wc(e){if(e instanceof wn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ms.create(Wc(r))}return new wn({...e._def,shape:()=>t})}else return e instanceof ta?new ta({...e._def,type:Wc(e.element)}):e instanceof Ms?Ms.create(Wc(e.unwrap())):e instanceof bl?bl.create(Wc(e.unwrap())):e instanceof ji?ji.create(e.items.map(t=>Wc(t))):e}class wn extends Ct{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=kt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Fe.object){const f=this._getOrReturnCtx(t);return Pe(f,{code:Ie.invalid_type,expected:Fe.object,received:f.parsedType}),nt}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof Us&&this._def.unknownKeys==="strip"))for(const f in a.data)c.includes(f)||u.push(f);const d=[];for(const f of c){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new $s(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Us){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(Pe(a,{code:Ie.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const p=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new $s(a,p,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const p=await m.key,g=await m.value;f.push({key:p,value:g,alwaysSet:m.alwaysSet})}return f}).then(f=>Wr.mergeObjectSync(r,f)):Wr.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return qe.errToObj,new wn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:qe.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new wn({...this._def,unknownKeys:"strip"})}passthrough(){return new wn({...this._def,unknownKeys:"passthrough"})}extend(t){return new wn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:rt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new wn({...this._def,catchall:t})}pick(t){const n={};for(const r of kt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new wn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of kt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new wn({...this._def,shape:()=>n})}deepPartial(){return Wc(this)}partial(t){const n={};for(const r of kt.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new wn({...this._def,shape:()=>n})}required(t){const n={};for(const r of kt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ms;)i=i._def.innerType;n[r]=i}return new wn({...this._def,shape:()=>n})}keyof(){return MP(kt.objectKeys(this.shape))}}wn.create=(e,t)=>new wn({shape:()=>e,unknownKeys:"strip",catchall:Us.create(),typeName:rt.ZodObject,...mt(t)});wn.strictCreate=(e,t)=>new wn({shape:()=>e,unknownKeys:"strict",catchall:Us.create(),typeName:rt.ZodObject,...mt(t)});wn.lazycreate=(e,t)=>new wn({shape:e,unknownKeys:"strip",catchall:Us.create(),typeName:rt.ZodObject,...mt(t)});class vm extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const u of i)if(u.result.status==="valid")return u.result;for(const u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=i.map(u=>new La(u.ctx.common.issues));return Pe(n,{code:Ie.invalid_union,unionErrors:c}),nt}if(n.common.async)return Promise.all(r.map(async i=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(a);{let i;const c=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=c.map(d=>new La(d));return Pe(n,{code:Ie.invalid_union,unionErrors:u}),nt}}get options(){return this._def.options}}vm.create=(e,t)=>new vm({options:e,typeName:rt.ZodUnion,...mt(t)});function ab(e,t){const n=Ss(e),r=Ss(t);if(e===t)return{valid:!0,data:e};if(n===Fe.object&&r===Fe.object){const a=kt.objectKeys(t),i=kt.objectKeys(e).filter(u=>a.indexOf(u)!==-1),c={...e,...t};for(const u of i){const d=ab(e[u],t[u]);if(!d.valid)return{valid:!1};c[u]=d.data}return{valid:!0,data:c}}else if(n===Fe.array&&r===Fe.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const c=e[i],u=t[i],d=ab(c,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Fe.date&&r===Fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ym extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,c)=>{if(PC(i)||PC(c))return nt;const u=ab(i.value,c.value);return u.valid?((DC(i)||DC(c))&&n.dirty(),{status:n.value,value:u.data}):(Pe(r,{code:Ie.invalid_intersection_types}),nt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,c])=>a(i,c)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ym.create=(e,t,n)=>new ym({left:e,right:t,typeName:rt.ZodIntersection,...mt(n)});class ji extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.array)return Pe(r,{code:Ie.invalid_type,expected:Fe.array,received:r.parsedType}),nt;if(r.data.length<this._def.items.length)return Pe(r,{code:Ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),nt;!this._def.rest&&r.data.length>this._def.items.length&&(Pe(r,{code:Ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((c,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new $s(r,c,r.path,u)):null}).filter(c=>!!c);return r.common.async?Promise.all(i).then(c=>Wr.mergeArray(n,c)):Wr.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ji({...this._def,rest:t})}}ji.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ji({items:e,typeName:rt.ZodTuple,rest:null,...mt(t)})};class BC extends Ct{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.map)return Pe(r,{code:Ie.invalid_type,expected:Fe.map,received:r.parsedType}),nt;const a=this._def.keyType,i=this._def.valueType,c=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new $s(r,u,r.path,[f,"key"])),value:i._parse(new $s(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of c){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of c){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return nt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}BC.create=(e,t,n)=>new BC({valueType:t,keyType:e,typeName:rt.ZodMap,...mt(n)});class pd extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.set)return Pe(r,{code:Ie.invalid_type,expected:Fe.set,received:r.parsedType}),nt;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Pe(r,{code:Ie.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(Pe(r,{code:Ie.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function c(d){const f=new Set;for(const m of d){if(m.status==="aborted")return nt;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>i._parse(new $s(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>c(d)):c(u)}min(t,n){return new pd({...this._def,minSize:{value:t,message:qe.toString(n)}})}max(t,n){return new pd({...this._def,maxSize:{value:t,message:qe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}pd.create=(e,t)=>new pd({valueType:e,minSize:null,maxSize:null,typeName:rt.ZodSet,...mt(t)});class qC extends Ct{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}qC.create=(e,t)=>new qC({getter:e,typeName:rt.ZodLazy,...mt(t)});class HC extends Ct{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Pe(n,{received:n.data,code:Ie.invalid_literal,expected:this._def.value}),nt}return{status:"valid",value:t.data}}get value(){return this._def.value}}HC.create=(e,t)=>new HC({value:e,typeName:rt.ZodLiteral,...mt(t)});function MP(e,t){return new yl({values:e,typeName:rt.ZodEnum,...mt(t)})}class yl extends Ct{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Pe(n,{expected:kt.joinValues(r),received:n.parsedType,code:Ie.invalid_type}),nt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Pe(n,{received:n.data,code:Ie.invalid_enum_value,options:r}),nt}return bo(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return yl.create(t,{...this._def,...n})}exclude(t,n=this._def){return yl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}yl.create=MP;class GC extends Ct{_parse(t){const n=kt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Fe.string&&r.parsedType!==Fe.number){const a=kt.objectValues(n);return Pe(r,{expected:kt.joinValues(a),received:r.parsedType,code:Ie.invalid_type}),nt}if(this._cache||(this._cache=new Set(kt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=kt.objectValues(n);return Pe(r,{received:r.data,code:Ie.invalid_enum_value,options:a}),nt}return bo(t.data)}get enum(){return this._def.values}}GC.create=(e,t)=>new GC({values:e,typeName:rt.ZodNativeEnum,...mt(t)});class _m extends Ct{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.promise&&n.common.async===!1)return Pe(n,{code:Ie.invalid_type,expected:Fe.promise,received:n.parsedType}),nt;const r=n.parsedType===Fe.promise?n.data:Promise.resolve(n.data);return bo(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}_m.create=(e,t)=>new _m({type:e,typeName:rt.ZodPromise,...mt(t)});class _l extends Ct{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===rt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:c=>{Pe(r,c),c.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const c=a.transform(r.data,i);if(r.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return nt;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?nt:d.status==="dirty"||n.value==="dirty"?$u(d.value):d});{if(n.value==="aborted")return nt;const u=this._def.schema._parseSync({data:c,path:r.path,parent:r});return u.status==="aborted"?nt:u.status==="dirty"||n.value==="dirty"?$u(u.value):u}}if(a.type==="refinement"){const c=u=>{const d=a.refinement(u,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?nt:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?nt:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!vl(c))return nt;const u=a.transform(c.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>vl(c)?Promise.resolve(a.transform(c.value,i)).then(u=>({status:n.value,value:u})):nt);kt.assertNever(a)}}_l.create=(e,t,n)=>new _l({schema:e,typeName:rt.ZodEffects,effect:t,...mt(n)});_l.createWithPreprocess=(e,t,n)=>new _l({schema:t,effect:{type:"preprocess",transform:e},typeName:rt.ZodEffects,...mt(n)});class Ms extends Ct{_parse(t){return this._getType(t)===Fe.undefined?bo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ms.create=(e,t)=>new Ms({innerType:e,typeName:rt.ZodOptional,...mt(t)});class bl extends Ct{_parse(t){return this._getType(t)===Fe.null?bo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}bl.create=(e,t)=>new bl({innerType:e,typeName:rt.ZodNullable,...mt(t)});class sb extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}sb.create=(e,t)=>new sb({innerType:e,typeName:rt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...mt(t)});class ib extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return mm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new La(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new La(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ib.create=(e,t)=>new ib({innerType:e,typeName:rt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...mt(t)});class ZC extends Ct{_parse(t){if(this._getType(t)!==Fe.nan){const r=this._getOrReturnCtx(t);return Pe(r,{code:Ie.invalid_type,expected:Fe.nan,received:r.parsedType}),nt}return{status:"valid",value:t.data}}}ZC.create=e=>new ZC({typeName:rt.ZodNaN,...mt(e)});class hre extends Ct{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tw extends Ct{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?nt:i.status==="dirty"?(n.dirty(),$u(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?nt:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new tw({in:t,out:n,typeName:rt.ZodPipeline})}}class cb extends Ct{_parse(t){const n=this._def.innerType._parse(t),r=a=>(vl(a)&&(a.value=Object.freeze(a.value)),a);return mm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}cb.create=(e,t)=>new cb({innerType:e,typeName:rt.ZodReadonly,...mt(t)});var rt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(rt||(rt={}));const pre=Os.create,mre=ob.create;Us.create;ta.create;const gre=wn.create;vm.create;ym.create;ji.create;const vre=yl.create;_m.create;Ms.create;bl.create;const yre=gre({path:pre().optional().default(""),flat:mre().optional().default(!1),view:vre(["table","grid"]).optional().default("grid")}),_re=Vne(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>ut(()=>import("./file-browser-C4MCCicp.js").then(a=>a.b),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]))),validateSearch:yre})]}),bre=A.lazy(()=>ut(()=>import("./plugin-header-Do_HgCfI.js"),__vite__mapDeps([17,5,18]))),wre=A.lazy(()=>ut(()=>import("./plugin-empty-state-cb7GbeKy.js"),[])),Sre={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:Cne,renderHeader:e=>R.jsx(bre,{...e}),renderEmptyState:()=>R.jsx(wre,{}),setup:e=>{const{registerSidebarGroup:t,registerPluginRoutes:n}=e;t({id:"object-storage",label:"Object Storage",items:[{icon:R.jsx(RP,{size:16}),label:"File browser"}],defaultExpanded:!0});const r=_re.createRoutes(e);n(r)}},Ere="private-registry",Rre="Organization private MCP registry with CRUD and Store integration",vae=`
|
|
197
|
-
You are an MCP tool tester running automated integration checks.
|
|
198
|
-
|
|
199
|
-
Goal:
|
|
200
|
-
- Validate that this MCP and its tools work end-to-end.
|
|
201
|
-
- Prefer realistic sequences where one tool output feeds the next tool input.
|
|
202
|
-
- Example chain: list -> pick id -> get/update/delete.
|
|
203
|
-
|
|
204
|
-
Rules:
|
|
205
|
-
- Try to execute as many tools as possible.
|
|
206
|
-
- If a tool requires context, first call discovery/list tools to obtain valid IDs.
|
|
207
|
-
- If you create test data, clean it up when possible.
|
|
208
|
-
- If one tool fails, continue testing the remaining tools.
|
|
209
|
-
- If a tool returns input validation errors, fix the arguments and retry that tool.
|
|
210
|
-
- For tools that require identifiers (fileId, folderId, etc), always get IDs from previous list/get calls.
|
|
211
|
-
- Keep calls focused and safe.
|
|
212
|
-
|
|
213
|
-
At the end, provide a concise summary of:
|
|
214
|
-
- What passed
|
|
215
|
-
- What failed
|
|
216
|
-
- What could not be tested and why
|
|
217
|
-
- If some tool needs user-specific context (email/account/tenant), explicitly output a "CONTEXT_REQUIRED" note with what is needed.
|
|
218
|
-
`.trim(),xre=A.lazy(()=>ut(()=>import("./registry-layout-Cvu5zKVR.js"),__vite__mapDeps([19,20,21,22,23,16,24,2,3,25,26,27,5,7,28,29,30,31,32,33,34,13,35,36,37,6,8,15,38,39,40,14,41,42,43,44,18,45,46,47,48,49,50,4,51,52,53,54,55,56,57,58,59,60,61,62]))),Tre={id:Ere,description:Rre,LayoutComponent:xre,setup:e=>{e.registerSidebarGroup({id:"private-registry",label:"Private Registry",items:[{icon:R.jsx(xP,{size:16}),label:"Registry"}],defaultExpanded:!0})}},Ore="workflows",Cre="Create workflows for platform end-users",Are=A.lazy(()=>ut(()=>import("./plugin-header-C4ZfQdcs.js"),__vite__mapDeps([63,5,18,64]))),Ire=A.lazy(()=>ut(()=>import("./plugin-empty-state-CEvZCNFj.js"),__vite__mapDeps([65,64]))),kre={id:Ore,description:Cre,binding:[],renderHeader:e=>R.jsx(Are,{...e}),renderEmptyState:()=>R.jsx(Ire,{})},Nre=[Sre,Tre,kre],Gs=dL({component:()=>R.jsx(Lee,{children:R.jsx(Mee,{children:R.jsx(A.Suspense,{fallback:R.jsx(EP,{}),children:R.jsx(CA,{})})})})}),Mre=gt({getParentRoute:()=>Gs,path:"/login",component:Rt(()=>ut(()=>import("./login-ClPbfjlJ.js"),__vite__mapDeps([66,16,26]))),validateSearch:Yr(()=>oe({next:M().optional(),client_id:M().optional(),redirect_uri:M().optional(),response_type:M().optional(),state:M().optional(),scope:M().optional(),code_challenge:M().optional(),code_challenge_method:M().optional()}))}),Pre=gt({getParentRoute:()=>Gs,path:"/reset-password",component:Rt(()=>ut(()=>import("./reset-password-CSswd9M3.js"),__vite__mapDeps([67,16,26]))),validateSearch:Yr(()=>oe({token:M().optional(),error:M().optional()}))}),Dre=gt({getParentRoute:()=>Gs,path:"/auth/$pathname",component:Rt(()=>ut(()=>import("./auth-catchall-DPwCqyhO.js"),[]))}),Lre=gt({getParentRoute:()=>Gs,path:"/store/$appName",component:Rt(()=>ut(()=>import("./store-invite-CP9PWG-2.js"),[])),validateSearch:Yr(()=>oe({serverName:M().optional()}))}),jre=gt({getParentRoute:()=>Gs,path:"/oauth/callback",component:Rt(()=>ut(()=>import("./oauth-callback-CXrwzvh_.js"),__vite__mapDeps([68,13])))}),$re=gt({getParentRoute:()=>Gs,path:"/oauth/callback/ai-provider",component:Rt(()=>ut(()=>import("./oauth-callback-ai-provider-bQZvbhnr.js"),__vite__mapDeps([69,13])))}),sg=gt({getParentRoute:()=>Gs,id:"shell",component:Rt(()=>ut(()=>import("./shell-layout-Ca5Bbhzi.js"),__vite__mapDeps([70,71,72,24,73,74,55,75,76,61,44,77,23,36,37,78,41,26,79,80,81,18,82,83,84,48,6,42,43,5,85,86,16,57,51,59,14,39,29,87,88,89,90,47,91,4,92,93,49,35,22,94,95,96,21,97,53,98,99,7,56,100,101,102,103,104,105,106,107,108,109,110,3,20,13,111,60,112,113,114,115,116,117,27,118,46,64,11,119,120,31,121,52,122,123,38,124,34,125,126,127,128])))}),Ure=gt({getParentRoute:()=>sg,path:"/",component:Rt(()=>ut(()=>import("./home-rO4pkzPH.js"),__vite__mapDeps([129,39,87,6,5,60,35,108,26,123,38,78,41,76,16]))),beforeLoad:async()=>{const{data:e}=await zA.organization.list();if(!e)return;const t=localStorage.getItem(xC.lastOrgSlug());if(t){if(e.some(a=>a.slug===t))throw Mi({to:"/$org/$project",params:{org:t,project:Li}});localStorage.removeItem(xC.lastOrgSlug())}const n=e.length===1?e[0]:void 0;if(n)throw Mi({to:"/$org/$project",params:{org:n.slug,project:Li}})}}),zre=gt({getParentRoute:()=>sg,path:"/$org",beforeLoad:({params:e})=>{throw Mi({to:"/$org/$project",params:{org:e.org,project:Li}})}}),Rn=gt({getParentRoute:()=>sg,path:"/$org/$project",component:Rt(()=>ut(()=>import("./project-layout-CkMdq05b.js"),__vite__mapDeps([130,120,23,24,36,37,75,85,86,16,61,44,6,57,51,59,14,39,26,29,87,55,88,89,90,122,22,84,131,5,56,45,42,43,18,132,49,125,74,78,41,133,15,134,21,54,53,135,136,137,138,139,13,60,140,141,27,7,142,81,10,12,25,114,35,143,144,28,96,4,47,145,38,146,83,117,46,32,108,147,148]))),validateSearch:oe({settings:M().optional()})}),Vre=gt({getParentRoute:()=>Rn,path:"/",component:Rt(()=>ut(()=>import("./page-DB3QLlpA.js"),__vite__mapDeps([149,71,72,24,73,74,55,75,76,61,44,77,23,36,37,78,41,26,79,80,81,18,82,83,84,48,6,42,43,5,85,86,16,57,51,59,14,39,29,87,88,89,90,47,91,4,92,93,49,35,22,94,95,96,21,97,53,98,99,7,56,100,101,102,103,104,105,106,107,108,109,110,3,20,13,112,111,113,114,115,116,60,117,27,128])))}),Fre=gt({getParentRoute:()=>Rn,path:"/tasks",component:Rt(()=>ut(()=>import("./tasks-Dw1i-69W.js"),__vite__mapDeps([150,113,71,72,24,73,74,55,75,76,61,44,77,23,36,37,78,41,26,79,80,81,18,82,83,84,48,6,42,43,5,85,86,16,57,51,59,14,39,29,87,88,89,90,47,91,4,92,93,49,35,22,94,95,96,21,97,53,98,99,7,56,100,101,102,103,104,105,106,107,108,109,110,3,20,13,114,115,116,60,117,27,143])))}),qi=gt({getParentRoute:()=>Rn,path:"/settings",beforeLoad:({params:e})=>{if(e.project===Li)throw Mi({to:"/$org/$project",params:e,search:{settings:"org.general"}})},component:Rt(()=>ut(()=>import("./layout-BjyFY_1R.js"),__vite__mapDeps([151,75,120,23,24,86,16,61,44,143,7,21,119,22,131])))}),Bre=gt({getParentRoute:()=>qi,path:"/",beforeLoad:({params:e})=>{throw Mi({to:"/$org/$project/settings/general",params:{org:e.org,project:e.project}})},component:()=>null}),qre=gt({getParentRoute:()=>qi,path:"/general",component:Rt(()=>ut(()=>import("./general-DOjbT8YE.js"),__vite__mapDeps([152,16,24,26,46,78,41,133,15,37,153,38])))}),Hre=gt({getParentRoute:()=>qi,path:"/dependencies",component:Rt(()=>ut(()=>import("./dependencies-DQ9gMDrw.js"),__vite__mapDeps([154,23,16,55,147,148,35,60,37,54,53,24,155])))}),Gre=gt({getParentRoute:()=>qi,path:"/sidebar",component:Rt(()=>ut(()=>import("./sidebar-settings-pZmI7pGH.js"),__vite__mapDeps([156,23,16,45,26,24,105,155])))}),Zre=gt({getParentRoute:()=>qi,path:"/plugins",component:Rt(()=>ut(()=>import("./plugins-pEgOY1Nz.js"),__vite__mapDeps([157,134,23,16,24,45,41,21,54,53,135,136,137,138,139,13,60,42,43,44,5,18])))}),Kre=gt({getParentRoute:()=>qi,path:"/danger",component:Rt(()=>ut(()=>import("./danger-gTdMMqBl.js"),__vite__mapDeps([158,153,16,24,26,38])))}),Xr=({params:e})=>{if(e.project!==Li)throw Mi({to:"/$org/$project",params:{org:e.org,project:e.project}})},Wre=gt({getParentRoute:()=>Rn,path:"/projects",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./projects-list-CtvT2y9h.js"),__vite__mapDeps([159,120,23,24,86,16,61,44,114,13,35,26,87,89,90,117,118,36,37,78,41,46,5,60,143,7])))}),Yre=gt({getParentRoute:()=>Rn,path:"/members",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./members-CykhAYWe.js"),__vite__mapDeps([140,141,27,5,7,142,81,10,12,61,44,25,114,13,35,26,86,23,16,143,144,28,88,24,96,21,4,47,54,53,145,87,38,36,37,146,83,60,14,45,117,78,41,42,43,18,46,39,32,59,125,108,147,148,55])))}),Qre=gt({getParentRoute:()=>Rn,path:"/mcps",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./connections-14pDMsUe.js"),__vite__mapDeps([160,139,141,27,5,7,142,81,10,12,61,44,25,114,13,35,26,161,162,39,96,21,117,86,23,16,135,136,24,163,164,30,31,165,2,3,166,167,38,143,4,36,37,78,41,42,43,18,46,54,53,97,168,40,32,51,106,60,169,14,108,170,138]))),validateSearch:Yr(()=>oe({action:Tt(["create"]).optional(),tab:Tt(["all","connected"]).optional()}))}),Xre=gt({getParentRoute:()=>Rn,path:"/mcps/$appSlug",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./connection-detail-vcbLbssZ.js"),__vite__mapDeps([171,139,117,170,26,60,14,135,136,24,172,127,23,16,124,59,13,54,53,138,137,42,43,44,5,18,173,174,148,95,96,21,55,61,97,35,84,98,145,87,99,77,143,7,22,38,121,37,78,41,166,167,175,86,176,91,94,105,104,114,177,141,27,142,81,10,12,25,144,28,39,51,106,107,20,49,169,108]))),validateSearch:Yr(()=>oe({tab:M().optional()}))}),Jre=gt({getParentRoute:()=>Rn,path:"/mcps/$appSlug/$collectionName/$itemId",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./collection-detail-fTigPh-V.js"),__vite__mapDeps([178,117,53,16,24,78,41,26,46,175,86,23,61,44,179,58,13,104,99,105,42,43,5,18,6,109,132,56,107,62,143,7,172,127,124,59,54,135,136,139,138,137,60,173,174,148,95,96,21,55,97,35,84,98,166,167,103,177,141,27,142,81,10,12,25,114,144,28,39,51,106,72,73,74,180,76,181,128,79,36,37,146,94,108,101,182]))),validateSearch:Yr(()=>oe({replayId:M().optional()}))}),eoe=gt({getParentRoute:()=>Rn,path:"/monitoring",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./monitoring-BPuhRE0m.js"),__vite__mapDeps([183,114,13,35,26,86,23,16,61,44,143,7,117,184,25,55,5,56,8,33,59,62,180,76,182,43,18,109,111,96,21,28,176,173,24,127,32,185,60,14,162,39,27,38,163,145,110,3,54,53,97,132,10,4,147,148,42,46,161,45,41]))),validateSearch:Yr(()=>oe({tab:Tt(["overview","audit","dashboards"]).default("overview"),from:M().default("now-30m"),to:M().default("now"),connectionId:we(M()).optional().default([]),virtualMcpId:we(M()).optional().default([]),tool:M().default(""),status:Tt(["all","success","errors"]).default("all"),search:M().default(""),page:$e().optional(),streaming:We().default(!0),propertyFilters:M().default(""),hideSystem:We().default(!1)}))}),toe=gt({getParentRoute:()=>Rn,path:"/monitoring/dashboards/$dashboardId",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./monitoring-dashboard-view-CXCG5P_H.js"),__vite__mapDeps([186,24,184,25,55,61,44,5,56,8,33,59,62,180,76,182,43,18,109,111,7,26,185,175,86,23,16,143,42,46,132,10,60,14,108])))}),noe=gt({getParentRoute:()=>Rn,path:"/monitoring/dashboards/$dashboardId/edit",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./monitoring-dashboard-edit-BVtLOBNe.js"),__vite__mapDeps([187,54,53,16,24,26,96,21,4,5,55,92,18,43,62,60,14,42,44,29,175,86,23,61,179,58,13,143,7])))}),PP=gt({getParentRoute:()=>Rn,path:"/store",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./page-CCXJyUyN.js"),__vite__mapDeps([188,86,23,16,61,44,143,7,33,126,13,35,165,2,3,135,136,24,54,53,167,114,26,189,40,106,83,60,169,39,96,21,55,5,18,108,117])))}),roe=gt({getParentRoute:()=>PP,path:"/$appName",component:Rt(()=>ut(()=>import("./mcp-server-detail-lOR_wUNJ.js"),__vite__mapDeps([190,6,13,86,23,16,61,44,5,56,96,21,20,18,60,27,7,52,117,124,135,136,24,102,177,141,142,81,10,12,25,114,35,26,144,28,39,105,51,106,107,175,161,189,40,83,169,143,54,53,127,138,139,167,191,192]))),validateSearch:Yr(()=>oe({registryId:M().optional(),serverName:M().optional(),itemId:M().optional()}))}),ooe=gt({getParentRoute:()=>Rn,path:"/automations",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./automations-Dp1WjxxK.js"),__vite__mapDeps([193,114,13,35,26,117,86,23,16,61,44,194,24,164,30,31,115,87,38,25,143,7,27,5,28,142,81,32,51,60,49,14])))}),aoe=gt({getParentRoute:()=>Rn,path:"/automations/$automationId",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./automation-detail-bmoX3GK-.js"),__vite__mapDeps([195,117,175,86,23,16,61,44,179,58,13,88,24,71,72,73,74,55,75,76,77,36,37,78,41,26,79,80,81,18,82,83,84,48,6,42,43,5,85,57,51,59,14,39,29,87,89,90,47,91,4,92,93,49,35,22,94,95,96,21,97,53,98,99,7,56,100,101,102,103,104,105,106,107,108,109,110,3,20,115,194,38,143,27,45,60]))),validateSearch:Yr(()=>oe({tab:M().optional()}))}),soe=gt({getParentRoute:()=>Rn,path:"/agents",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./agents-DXD0J3OW.js"),__vite__mapDeps([196,141,27,5,7,142,81,10,12,61,44,25,114,13,35,26,86,23,16,143,162,39,96,21,6,20,117,164,30,31,98,97,53,24,38,4,36,37,28,168,18,32,51,60,14,84,108,115,87,197,54,116,90]))),validateSearch:Yr(()=>oe({action:Tt(["create"]).optional()}))}),ioe=gt({getParentRoute:()=>Rn,path:"/agents/$agentId",beforeLoad:Xr,component:Rt(()=>ut(()=>import("./agent-detail-DqMa-yjy.js"),__vite__mapDeps([198,72,24,73,74,117,26,55,182,43,21,185,50,108,96,86,23,16,61,44,25,100,101,45,46,54,53,97,7,9,13,62,60,94,84,143,175,179,58,114,35,177,141,27,5,142,81,10,12,144,28,39,105,51,106,107,4,36,37,91,127,99,77,167,174,132,56,191,59,197]))),validateSearch:Yr(()=>oe({tab:M().optional()}))}),coe=gt({getParentRoute:()=>Rn,path:"/apps/$connectionId/$toolName",component:Rt(()=>ut(()=>import("./project-app-view-DfCIvrF7.js"),__vite__mapDeps([199,54,53,16,24,127,23,103,104,99,105,72,73,74,86,61,44])))}),loe=gt({getParentRoute:()=>Rn,path:"/workflows",component:Rt(()=>ut(()=>import("./workflow-CBDfcQFP.js"),__vite__mapDeps([200,24,139,141,27,5,7,142,81,10,12,61,44,25,114,13,35,26,39,96,21,56,32,82,51,14,144,28,181,126,115,87,23,117,164,30,31,166,167,38,53,16,54,60,175,86,143,64])))}),DP=gt({getParentRoute:()=>Rn,path:"/$pluginId",component:Rt(()=>ut(()=>import("./dynamic-plugin-layout-yMvA298P.js"),__vite__mapDeps([201,13,136,1,23,54,53,16,24,22,86,61,44])))}),uoe=[],doe=[],LP=[];Nre.forEach(e=>{if(!e.setup)return;const t={parentRoute:DP,routing:{createRoute:gt,lazyRouteComponent:Rt},registerRootSidebarItem:n=>uoe.push({pluginId:e.id,...n}),registerSidebarGroup:n=>doe.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{LP.push(...n)}};e.setup(t)});const foe=DP.addChildren(LP),hoe=PP.addChildren([roe]),poe=qi.addChildren([Bre,qre,Hre,Gre,Zre,Kre]),moe=[Vre,Fre,poe,Wre,Yre,Qre,Xre,Jre,eoe,toe,noe,hoe,ooe,aoe,soe,ioe,loe,coe,foe],goe=Rn.addChildren(moe),voe=sg.addChildren([Ure,zre,goe]),yoe=Gs.addChildren([voe,Mre,Pre,Dre,jre,$re,Lre]),_oe=bL({routeTree:yoe}),boe=document.getElementById("root");aD.createRoot(boe).render(R.jsx(A.StrictMode,{children:R.jsx(EL,{router:_oe})}));export{zD as $,Qoe as A,K_ as B,yP as C,Pee as D,dae as E,sq as F,Uoe as G,joe as H,zoe as I,aq as J,sA as K,LY as L,Soe as M,Ooe as N,Li as O,tae as P,Tm as Q,Doe as R,EP as S,$oe as T,iF as U,iae as V,lF as W,Bb as X,cF as Y,xk as Z,qD as _,cae as a,Gb as a$,Pk as a0,hN as a1,wd as a2,MH as a3,rn as a4,In as a5,PH as a6,lt as a7,UN as a8,za as a9,bd as aA,jo as aB,md as aC,G0 as aD,Yu as aE,OD as aF,Kn as aG,Or as aH,gD as aI,VG as aJ,FG as aK,BG as aL,qG as aM,Voe as aN,Foe as aO,HG as aP,Goe as aQ,Hoe as aR,Zoe as aS,Koe as aT,Woe as aU,qoe as aV,Boe as aW,oZ as aX,aZ as aY,rZ as aZ,bH as a_,Fi as aa,bZ as ab,TN as ac,J1 as ad,TP as ae,ks as af,Lo as ag,Loe as ah,KG as ai,ED as aj,Ke as ak,tt as al,z4 as am,F4 as an,px as ao,Roe as ap,Eoe as aq,xm as ar,RP as as,fr as at,CA as au,at as av,Je as aw,we as ax,Tt as ay,Od as az,aae as b,hae as b$,jN as b0,CN as b1,qb as b2,wH as b3,Noe as b4,SH as b5,Wk as b6,Zb as b7,od as b8,zk as b9,dQ as bA,bQ as bB,WM as bC,VM as bD,FM as bE,BM as bF,qM as bG,HM as bH,ZM as bI,Zu as bJ,ht as bK,ar as bL,yee as bM,fP as bN,le as bO,Coe as bP,og as bQ,ja as bR,_re as bS,ut as bT,Ere as bU,ag as bV,Gr as bW,ek as bX,Wn as bY,Yr as bZ,vd as b_,Hb as ba,fN as bb,Poe as bc,Moe as bd,Dee as be,Nre as bf,doe as bg,lb as bh,xt as bi,Le as bj,Aoe as bk,We as bl,$e as bm,RQ as bn,xQ as bo,F1 as bp,Jm as bq,KM as br,Xm as bs,PM as bt,vX as bu,A1 as bv,LQ as bw,kQ as bx,cQ as by,lQ as bz,$i as c,fae as c0,gae as c1,mae as c2,rr as c3,aF as c4,gee as c5,E7 as c6,koe as c7,dk as c8,sk as c9,pt as cA,uP as cB,RJ as cC,nI as cD,AW as cE,woe as cF,zs as cG,Ma as cH,cO as cI,rH as cJ,$o as cK,ad as cL,t1 as cM,hl as cN,js as cO,Va as cP,Uo as cQ,gN as cR,aH as cS,cH as cT,sH as cU,Zq as cV,rae as cW,Ioe as ca,uoe as cb,ZW as cc,Sb as cd,vae as ce,QG as cf,EA as cg,xA as ch,Toe as ci,pae as cj,nF as ck,eF as cl,YV as cm,yk as cn,Ir as co,YC as cp,MD as cq,LD as cr,VD as cs,jD as ct,$D as cu,BD as cv,mx as cw,FD as cx,UD as cy,NX as cz,Rm as d,wl as e,zA as f,nl as g,lae as h,uae as i,R as j,Xoe as k,Yoe as l,Joe as m,M as n,oe as o,sae as p,oa as q,A as r,Ree as s,ra as t,eae as u,wT as v,kD as w,aA as x,xoe as y,xC as z};
|