decocms 4.82.19 → 4.83.0
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-fklrqSW5.js → AlertCircle-DPEsW7A8.js} +1 -1
- package/dist/client/assets/{AreaChart-BdmhsxSM.js → AreaChart-BDBkVxFA.js} +1 -1
- package/dist/client/assets/{ArrowUp-Bdy-0gyO.js → ArrowUp-B_VVATf8.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D6zDsrnH.js → ArrowUpRight-DPt871Ex.js} +1 -1
- package/dist/client/assets/{CheckCircle-BYkf45lM.js → CheckCircle-Bhjgrg4k.js} +1 -1
- package/dist/client/assets/{ChevronDown-sgVULpdb.js → ChevronDown-ClEtq8UA.js} +1 -1
- package/dist/client/assets/{ChevronRight-BUKoQxxN.js → ChevronRight-B9DmLAKh.js} +1 -1
- package/dist/client/assets/{ChevronUp-mvRqss9i.js → ChevronUp-Y_qcNB-R.js} +1 -1
- package/dist/client/assets/{Copy01-DLSxZiKr.js → Copy01-tOHQDVdb.js} +1 -1
- package/dist/client/assets/{DotsVertical-DitrZ6w4.js → DotsVertical-CmHvBgAo.js} +1 -1
- package/dist/client/assets/{Eye-DR1QNYLF.js → Eye-DkqzK9v4.js} +1 -1
- package/dist/client/assets/{FilterLines-Y38x0Q7Z.js → FilterLines-Da90Z39y.js} +1 -1
- package/dist/client/assets/{Globe01-CnltMSDk.js → Globe01-BptLpR6D.js} +1 -1
- package/dist/client/assets/{Globe04-X5sxJeUb.js → Globe04-5erCJGew.js} +1 -1
- package/dist/client/assets/{HardDrive-Nu1jIe4l.js → HardDrive-BWMqpfxS.js} +1 -1
- package/dist/client/assets/{Image01-CSEqtjAN.js → Image01-XM4bpaLw.js} +1 -1
- package/dist/client/assets/{Key01-Dh4DUQLF.js → Key01-ByxRAii_.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Dt7rJY-r.js → LayoutLeft-B9Jd6ymK.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CKHslpvH.js → LinkExternal01-CKVW-eEM.js} +1 -1
- package/dist/client/assets/{Monitor01-r0C7odur.js → Monitor01-ClZ2KmM9.js} +1 -1
- package/dist/client/assets/{Package-3dsm96jG.js → Package-CDoMKJ25.js} +1 -1
- package/dist/client/assets/{Palette-DAx6eGU_.js → Palette-Dj74Mlc6.js} +1 -1
- package/dist/client/assets/{Play-CJE2nK0g.js → Play-D5sDqr8I.js} +1 -1
- package/dist/client/assets/{Plus-BwYAFd19.js → Plus-JOcsz2OW.js} +1 -1
- package/dist/client/assets/{SearchLg-Ci76gxPe.js → SearchLg-BHMKxNfO.js} +1 -1
- package/dist/client/assets/{SearchMd-C4E_z5AK.js → SearchMd-C-NJ_45S.js} +1 -1
- package/dist/client/assets/{Settings02-D2iJ0Y_1.js → Settings02-CVFCJqEn.js} +1 -1
- package/dist/client/assets/{Shield01-D52f0rB7.js → Shield01-Bj6HGuxh.js} +1 -1
- package/dist/client/assets/{Star01-nXpwaO4U.js → Star01-QG8pK1yw.js} +1 -1
- package/dist/client/assets/{Stars01-DZkGi0yh.js → Stars01-DqPZujie.js} +1 -1
- package/dist/client/assets/{Stars02-B6BvIKTN.js → Stars02-D1eOi134.js} +1 -1
- package/dist/client/assets/{Sun-DECbKLB_.js → Sun-DHI7Rs1S.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-D4cMfdK_.js → SwitchHorizontal01-D8ShLQwH.js} +1 -1
- package/dist/client/assets/{Tool01-CcxbpsdM.js → Tool01-C6ssLf07.js} +1 -1
- package/dist/client/assets/{Tool02-O3edpLSO.js → Tool02-BHHNM_g4.js} +1 -1
- package/dist/client/assets/{Trash01-Cwer5u_n.js → Trash01-BtophoGC.js} +1 -1
- package/dist/client/assets/{TrendUp01-dtZF5xAg.js → TrendUp01-WOe5Y0pM.js} +1 -1
- package/dist/client/assets/{Upload01-C1yFspcl.js → Upload01-CXhKVCP8.js} +1 -1
- package/dist/client/assets/{User01-DFGTsbFQ.js → User01-uwH1s6Qn.js} +1 -1
- package/dist/client/assets/{Users01-oR_WIF7g.js → Users01-suVU8oKl.js} +1 -1
- package/dist/client/assets/{Users03-BK-DRA0O.js → Users03-Zrh5Q_ci.js} +1 -1
- package/dist/client/assets/{X-JhcLrxaK.js → X-BolYo4iB.js} +1 -1
- package/dist/client/assets/{XCircle-Do7Zx-eD.js → XCircle-CnJ70X3w.js} +1 -1
- package/dist/client/assets/{XClose-C9Ve9LT-.js → XClose-BdaQO-2_.js} +1 -1
- package/dist/client/assets/{Zap-BsJbp079.js → Zap-BzNhtsnx.js} +1 -1
- package/dist/client/assets/{ZapSquare-DVSX_PUJ.js → ZapSquare-DMvgJwuD.js} +1 -1
- package/dist/client/assets/{ZoomOut-DAawwf0t.js → ZoomOut-B5XPtpBa.js} +1 -1
- package/dist/client/assets/{access-gate-B2PcKpQi.js → access-gate-CjWAQSdR.js} +1 -1
- package/dist/client/assets/{add-section-modal-39yDT-Ju.js → add-section-modal-CyW16nLc.js} +1 -1
- package/dist/client/assets/{agent-icon-CGx0_9l5.js → agent-icon-BGgFt2fk.js} +1 -1
- package/dist/client/assets/agents-list-MwwVi6Ba.js +1 -0
- package/dist/client/assets/ai-providers-DAP6QknZ.js +1 -0
- package/dist/client/assets/{alert-DtoAKyyA.js → alert-Beqn0Fvg.js} +1 -1
- package/dist/client/assets/{alert-dialog-CFnkTG10.js → alert-dialog-CwKyb2j-.js} +1 -1
- package/dist/client/assets/app-editor-DseSILWA.js +1 -0
- package/dist/client/assets/{auth-CKKxsAQR.js → auth-D4bTHSVX.js} +1 -1
- package/dist/client/assets/{auth-catchall-xiyz_7s2.js → auth-catchall-BKLc7QKI.js} +1 -1
- package/dist/client/assets/{auth-entry-DXpniWYo.js → auth-entry-1PWVON9e.js} +1 -1
- package/dist/client/assets/{auth-split-layout-022_L0k-.js → auth-split-layout-B6cSVZVN.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BL10FIRd.js → authenticate-and-persist-oauth-Bt8Gm2rH.js} +1 -1
- package/dist/client/assets/{automation-list-row-DTtDcco-.js → automation-list-row-P3Wfaud1.js} +1 -1
- package/dist/client/assets/{automation-runs-BGZr5t8h.js → automation-runs-0Gp5Pl3p.js} +4 -4
- package/dist/client/assets/automations-B1Pch092.js +1 -0
- package/dist/client/assets/{autosend-Bm2lFqoD.js → autosend-kl7RNqnt.js} +1 -1
- package/dist/client/assets/{avatar-BlYuWW7J.js → avatar-BxCDP7Ot.js} +1 -1
- package/dist/client/assets/{badge-BsoTUFnu.js → badge-CJKB36w7.js} +1 -1
- package/dist/client/assets/block-document-BNPa3FEr.js +3 -0
- package/dist/client/assets/{brand-context-DPc68RhH.js → brand-context-D3Rlfh4r.js} +1 -1
- package/dist/client/assets/{buckets-C8gEZDbc.js → buckets-eqtPNxJ7.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Cy58NtQW.js → bulk-category-panel-CzrR4JyW.js} +1 -1
- package/dist/client/assets/{calendar-Do7G6Kxp.js → calendar-DeTvDsBF.js} +2 -2
- package/dist/client/assets/{capability-load-error-DT5FhHrY.js → capability-load-error-DB_oh7IY.js} +1 -1
- package/dist/client/assets/{card-dggHqb7D.js → card-9tKE7GXF.js} +1 -1
- package/dist/client/assets/category-editor-BQbsXApg.js +1 -0
- package/dist/client/assets/{chat-context-CEf5YFvv.js → chat-context-CwNi3A6G.js} +6 -6
- package/dist/client/assets/{checkbox-CvJb_88Z.js → checkbox-Diqx1FoE.js} +1 -1
- package/dist/client/assets/{cli-auth-success-bEJ734L7.js → cli-auth-success-DvYAFC0B.js} +1 -1
- package/dist/client/assets/collection-detail-Cv0k2_GT.js +1 -0
- package/dist/client/assets/{collection-display-button-Dha8xlYb.js → collection-display-button-hHnJ4_g2.js} +1 -1
- package/dist/client/assets/{collection-search-BisIJu80.js → collection-search-kUG_oKbb.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CmbjrcGr.js → collection-table-wrapper-B9yKUfMg.js} +1 -1
- package/dist/client/assets/{collection-tabs-DFm981Kf.js → collection-tabs-BTDZrBXn.js} +1 -1
- package/dist/client/assets/{command-DsH5vUBI.js → command-N0I3WfMj.js} +1 -1
- package/dist/client/assets/commerce-onboarding-BySa1y-W.js +1 -0
- package/dist/client/assets/{companions-core-DqYVV5IY.js → companions-core-CXFBjxtL.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BR3Yayc6.js → connect-desktop-dialog-ChBtls8K.js} +1 -1
- package/dist/client/assets/connection-card-D0_c6gO9.js +1 -0
- package/dist/client/assets/connection-detail-BE-m8wny.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DaqwWAk0.js → connection-form-helpers-BYaB09EC.js} +1 -1
- package/dist/client/assets/connections-BFAOtXPe.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-v3bamRu-.js → decopilot-sse-pool-BLGL0LsS.js} +1 -1
- package/dist/client/assets/{dialog-Dy1IRNfn.js → dialog-BxyVzjQ3.js} +1 -1
- package/dist/client/assets/{domain-settings-DzzFgUkc.js → domain-settings-BK0JpUz3.js} +1 -1
- package/dist/client/assets/{drawer-C_exNDXZ.js → drawer-CQKQzuhR.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DnbYxaX3.js → dropdown-menu-BScjo8--.js} +1 -1
- package/dist/client/assets/{empty-state-CiSz3At1.js → empty-state-es2nRb_j.js} +1 -1
- package/dist/client/assets/extract-connection-data-C2_0wEKz.js +1 -0
- package/dist/client/assets/file-explorer-ipUahnFG.js +2 -0
- package/dist/client/assets/{file-type-icon-C4zp7G8m.js → file-type-icon-L2ARwYHI.js} +1 -1
- package/dist/client/assets/{files-IDnCaOPZ.js → files-CEyq4COK.js} +1 -1
- package/dist/client/assets/{form-BuzHPVCM.js → form-BBrmDTao.js} +1 -1
- package/dist/client/assets/general-mpELEztz.js +1 -0
- package/dist/client/assets/github-repo-picker-ClgZW6LI.js +1 -0
- package/dist/client/assets/{hooks-y59N0gpi.js → hooks-faeU6CoI.js} +4 -4
- package/dist/client/assets/{index-B_7Q0rH0.js → index-8daa3oHu.js} +1 -1
- package/dist/client/assets/index-B7DxR0_h.js +1 -0
- package/dist/client/assets/{index-BoBOH_Zc.js → index-BXoUOnNS.js} +1 -1
- package/dist/client/assets/index-C-1vh7Fd.css +1 -0
- package/dist/client/assets/{index-Qi63FtON.js → index-CesmbZpg.js} +27 -27
- package/dist/client/assets/{index-DZ3hzzf1.js → index-CxWNtx9x.js} +3 -3
- package/dist/client/assets/index-D1EuIdjV.js +1 -0
- package/dist/client/assets/{index-B5G64KtU.js → index-D521UaSg.js} +1 -1
- package/dist/client/assets/{index-thBdMRIF.js → index-DI-ckLEU.js} +2 -2
- package/dist/client/assets/{index-DPfxLsOi.js → index-DIB09EG-.js} +1 -1
- package/dist/client/assets/{index-k49d95pH.js → index-DJmEqij6.js} +1 -1
- package/dist/client/assets/{index-3D1LNWvP.js → index-DNRNEGzF.js} +1 -1
- package/dist/client/assets/{index-BiYdGYPy.js → index-DU67rOKJ.js} +1 -1
- package/dist/client/assets/index-DxY7xoBM.js +2 -0
- package/dist/client/assets/{index-BQGOFLqt.js → index-HF6wstce.js} +2 -2
- package/dist/client/assets/{index-redirect-DooIQ2K8.js → index-redirect-B1CSBKQb.js} +1 -1
- package/dist/client/assets/{input-CK7GAn-2.js → input-C9EhK1Lu.js} +1 -1
- package/dist/client/assets/{integration-icon-BRokQ8N8.js → integration-icon-Bz3MOu79.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DpQoOb2-.js → invite-member-dialog-B4o_u0Yn.js} +1 -1
- package/dist/client/assets/{label-BlLucFOT.js → label-JPT2W8Pg.js} +1 -1
- package/dist/client/assets/{layout-AgvOy3-T.js → layout-DDwESlPa.js} +1 -1
- package/dist/client/assets/{login-DOG0kNP3.js → login-CyRsInne.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DZFKw2wh.js → mcp-oauth-DUn-Fuzj.js} +1 -1
- package/dist/client/assets/{members-B-s3djNS.js → members-C17VYqOT.js} +1 -1
- package/dist/client/assets/{monaco-editor-Dxhxh5om.js → monaco-editor-DYNno9ow.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D1k7iMId.js → monitoring-stats-row-B1B3SvpD.js} +1 -1
- package/dist/client/assets/{multi-select-D_VdhvGn.js → multi-select-CTnDksvV.js} +1 -1
- package/dist/client/assets/{oauth-callback-BQlC45vw.js → oauth-callback-C2RnV8Ra.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B9k6hxgd.js → oauth-callback-ai-provider-qznLDLZZ.js} +1 -1
- package/dist/client/assets/{onboarding-BlB6EXWa.js → onboarding-DUVBk0XQ.js} +1 -1
- package/dist/client/assets/{org-install-CB6tXQXx.js → org-install-DQ2uKUYH.js} +1 -1
- package/dist/client/assets/{org-layout-D5haJNfI.js → org-layout-Bln5VKHy.js} +1 -1
- package/dist/client/assets/{organization-choice-2KhHSbLO.js → organization-choice-BzUmyMzq.js} +1 -1
- package/dist/client/assets/{orgs-5ZmCOdHD.js → orgs-CQnP3RnF.js} +1 -1
- package/dist/client/assets/{page-seo-form-Y0TGppB0.js → page-seo-form-BtLUHPsW.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DG0rFMaK.js +1 -0
- package/dist/client/assets/{popover-BIkriKI7.js → popover-BPf7qyUL.js} +1 -1
- package/dist/client/assets/post-editor-BLwE05et.js +1 -0
- package/dist/client/assets/{primitives-DlQu8ea0.js → primitives-DdZDjvVV.js} +1 -1
- package/dist/client/assets/{profile-D21Io7Ux.js → profile-8a3_1Shi.js} +1 -1
- package/dist/client/assets/project-app-view-C5gaZj3T.js +1 -0
- package/dist/client/assets/record-editor-DvEIA6tV.js +1 -0
- package/dist/client/assets/redirect-editor-BplQQqRM.js +1 -0
- package/dist/client/assets/registry-Bq_80-6l.js +2 -0
- package/dist/client/assets/{registry-layout-DIv4ITtZ.js → registry-layout-DTk5e6HH.js} +2 -2
- package/dist/client/assets/{reports-CRhUJ2qK.js → reports-qdBRQ4pV.js} +1 -1
- package/dist/client/assets/{require-capability-DlBK7Ljx.js → require-capability-Bspi0oGk.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CjAMzDiv.js → required-auth-layout-0AnIaBaR.js} +1 -1
- package/dist/client/assets/{reset-password-5FQKQ0O7.js → reset-password-D0qvkNvH.js} +1 -1
- package/dist/client/assets/roles-BwrRDzH5.js +1 -0
- package/dist/client/assets/{search-input-D20m0IjW.js → search-input-Bdl49Lyd.js} +1 -1
- package/dist/client/assets/{secrets-WBkgPU-G.js → secrets-BGFKYnKe.js} +1 -1
- package/dist/client/assets/sections-editor-BKlLtB36.js +2 -0
- package/dist/client/assets/{select-BesvP7cx.js → select-BjS6pi0R.js} +1 -1
- package/dist/client/assets/{select-model-1OjsUmRd.js → select-model-Bj5d_bo2.js} +1 -1
- package/dist/client/assets/self-tool-result-CzsRIvtg.js +1 -0
- package/dist/client/assets/seo-editor-CMScpL2i.js +1 -0
- package/dist/client/assets/{settings-layout-BRYv6j8B.js → settings-layout-Cbmu_dvI.js} +1 -1
- package/dist/client/assets/{settings-section-CDAkS7s3.js → settings-section-C5ntTZ3s.js} +1 -1
- package/dist/client/assets/{shell-controls-DAVZTycr.js → shell-controls-CZu8nt18.js} +1 -1
- package/dist/client/assets/shell-layout-ElsOHGco.js +1 -0
- package/dist/client/assets/{sidebar-Cc4XVWKB.js → sidebar-Du3GhEXu.js} +1 -1
- package/dist/client/assets/{skeleton-YVFIgHQg.js → skeleton-DYrRZj58.js} +1 -1
- package/dist/client/assets/{sso-D9JBA9_h.js → sso-DwHclfbW.js} +1 -1
- package/dist/client/assets/store-D1pr97wp.js +1 -0
- package/dist/client/assets/store-registry-Q6zoLWY_.js +2 -0
- package/dist/client/assets/{studio-tools-B4JofgO_.js → studio-tools-HHcBk3Yy.js} +1 -1
- package/dist/client/assets/{switch-BZYENsAO.js → switch-Co9VnPF1.js} +1 -1
- package/dist/client/assets/{table-BpC3o1Ua.js → table-7Pa2oc8U.js} +1 -1
- package/dist/client/assets/{tabs-DAIg04aD.js → tabs-DIYXMj-h.js} +1 -1
- package/dist/client/assets/{textarea-DtLXmNNW.js → textarea-azsnX4mp.js} +1 -1
- package/dist/client/assets/{toggle-group-Djz-ljio.js → toggle-group-_FACvaFN.js} +1 -1
- package/dist/client/assets/{toolbar-DuuVbShQ.js → toolbar-WAIhuPvK.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DBJ1Czuj.js → toolbar-icon-button-CFa583yL.js} +1 -1
- package/dist/client/assets/{tooltip-BLkLB4r7.js → tooltip-CTQ3jqyw.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BRga8_lW.js → use-ai-providers-C3gvqXwZ.js} +1 -1
- package/dist/client/assets/use-automations-CV0g4TCD.js +1 -0
- package/dist/client/assets/{use-autosave-BWy5WyvE.js → use-autosave-BUYSmKJl.js} +1 -1
- package/dist/client/assets/{use-capability-BSDyr6zM.js → use-capability-DzMeZG_B.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DJOVC-Ea.js → use-clock-tick-4n-sf8En.js} +1 -1
- package/dist/client/assets/{use-collections-CfZhiJR7.js → use-collections-CR5m--3v.js} +1 -1
- package/dist/client/assets/use-connection-Bja1yNlO.js +1 -0
- package/dist/client/assets/{use-copy-DK3qaoqd.js → use-copy-BV3KPbyw.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DdEqi3Z6.js → use-create-virtual-mcp-Uhf3saYW.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DejInOR3.js → use-debounced-autosave-CrTBH0r8.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B2z6I7X3.js → use-debounced-value-DiZ6agyj.js} +1 -1
- package/dist/client/assets/use-deco-credits-CrWRWg5d.js +1 -0
- package/dist/client/assets/{use-decopilot-events-D8o2yOzI.js → use-decopilot-events-By89abVN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DYh-HBji.js → use-delete-connection-rmpivgwt.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CT7A_R9u.js → use-deployment-admin-Dx9ZkF6I.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cxw_imQw.js → use-file-configs-CKVr-c7q.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BQFpclfv.js → use-infinite-scroll-B1UJmYzB.js} +1 -1
- package/dist/client/assets/{use-join-requests-O1rb1Ly4.js → use-join-requests-C6fMCeHB.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Bm5xkgD0.js → use-mcp-auth-status-wzWeSyhc.js} +1 -1
- package/dist/client/assets/use-mcp-client-CodYj4lk.js +10 -0
- package/dist/client/assets/{use-mcp-tools-CNPoXDXJ.js → use-mcp-tools-DhezZmhh.js} +1 -1
- package/dist/client/assets/{use-members-CLdfd0HT.js → use-members-C5exRENp.js} +1 -1
- package/dist/client/assets/{use-mobile-C0TUGCBw.js → use-mobile-DmC5AwHK.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CPivegDO.js → use-navigate-to-agent-VNxYrStf.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D0LQ152W.js → use-org-auth-client-C-_6T-I_.js} +1 -1
- package/dist/client/assets/{use-org-sso-CjKp2EUT.js → use-org-sso-D9Zrv9Ex.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CaN1N3mQ.js → use-organization-roles-kfhFanV-.js} +1 -1
- package/dist/client/assets/use-organization-settings-C02fN1Pg.js +1 -0
- package/dist/client/assets/use-registry-app-CntYFu2c.js +1 -0
- package/dist/client/assets/use-registry-connections-CSTpfPSI.js +1 -0
- package/dist/client/assets/{use-secrets-BNrIMIKw.js → use-secrets-59JvHtO0.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C9YypyXn.js → use-status-sounds-CrVwkBda.js} +1 -1
- package/dist/client/assets/{use-view-mode-BxC6fcT8.js → use-view-mode-Ba0ZEqUw.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-Bs6Z3XqB.js +1 -0
- package/dist/client/assets/useInfiniteQuery-GqUtQwTk.js +1 -0
- package/dist/client/assets/{useRouterState-TFX2py_c.js → useRouterState-BStHehOf.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-oEtZEsYD.js +1 -0
- package/dist/client/assets/{users-DEUTfPh7.js → users-DXYde7XY.js} +1 -1
- package/dist/client/assets/variant-calendar-BlhvVxku.js +1 -0
- package/dist/client/assets/{view-mode-toggle-D1oVoYUo.js → view-mode-toggle-Behabpts.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +420 -420
- package/dist/server/migrate.js +80 -80
- package/dist/server/server.js +321 -321
- package/package.json +1 -1
- package/dist/client/assets/agents-list-BD9p7x4W.js +0 -1
- package/dist/client/assets/ai-providers-C9hcbmzR.js +0 -1
- package/dist/client/assets/app-editor-NqGdO2ex.js +0 -1
- package/dist/client/assets/automations-BVcJCw_j.js +0 -1
- package/dist/client/assets/block-document--9kID5te.js +0 -3
- package/dist/client/assets/category-editor-oiOftp_V.js +0 -1
- package/dist/client/assets/collection-detail-BSIJs2wo.js +0 -1
- package/dist/client/assets/commerce-onboarding-CYTa6cE_.js +0 -1
- package/dist/client/assets/connection-card-C-QD5wMH.js +0 -1
- package/dist/client/assets/connection-detail-DE_GZwV4.js +0 -1
- package/dist/client/assets/connections-D8jVtSMf.js +0 -1
- package/dist/client/assets/constants-BHDe7bIw.js +0 -1
- package/dist/client/assets/extract-connection-data-DQK5y-ef.js +0 -1
- package/dist/client/assets/file-explorer-DOtLKUBk.js +0 -2
- package/dist/client/assets/general-DFcWTX46.js +0 -1
- package/dist/client/assets/github-repo-picker-xBH3tHfN.js +0 -1
- package/dist/client/assets/index-BLjhZzKI.js +0 -1
- package/dist/client/assets/index-BmGHTOVY.css +0 -1
- package/dist/client/assets/index-DD4eXCXL.js +0 -2
- package/dist/client/assets/index-DpRnZ26Z.js +0 -1
- package/dist/client/assets/page-seo-sheet-CYknmbBc.js +0 -1
- package/dist/client/assets/post-editor-E69m4ehV.js +0 -1
- package/dist/client/assets/project-app-view-Dk5loBX7.js +0 -1
- package/dist/client/assets/record-editor-LvNAa5Nv.js +0 -1
- package/dist/client/assets/redirect-editor-CxNel36Y.js +0 -1
- package/dist/client/assets/registry-DAAMT3Nm.js +0 -2
- package/dist/client/assets/roles-gGoHVKiQ.js +0 -1
- package/dist/client/assets/sections-editor-BcH1P-xX.js +0 -2
- package/dist/client/assets/self-tool-result-CByDOVQW.js +0 -1
- package/dist/client/assets/seo-editor-CdDjsZRI.js +0 -1
- package/dist/client/assets/shell-layout-G6cWtPZY.js +0 -1
- package/dist/client/assets/store-B_VpcGv4.js +0 -1
- package/dist/client/assets/store-registry-DHf-5XTX.js +0 -2
- package/dist/client/assets/use-automations-fFC4EQc3.js +0 -1
- package/dist/client/assets/use-connection-sIYGQRZw.js +0 -1
- package/dist/client/assets/use-deco-credits-8-3yjWlK.js +0 -1
- package/dist/client/assets/use-mcp-client-BIXuHEwh.js +0 -10
- package/dist/client/assets/use-organization-settings-C_QN8e5A.js +0 -1
- package/dist/client/assets/use-registry-app-J1vnPNS0.js +0 -1
- package/dist/client/assets/use-registry-connections-701IXXum.js +0 -1
- package/dist/client/assets/use-virtual-mcp-BLx5NqtM.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D1UM76v9.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-8ID1agn2.js +0 -1
- package/dist/client/assets/variant-calendar-B4ArzUYB.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as O,bN as cs,bO as zl,j as b,at as Ll,aM as lt,bP as jl,c as us,l as et,bQ as Bi}from"./index-DZ3hzzf1.js";import{w as Vl}from"./agent-icon-CGx0_9l5.js";import{i as Wl}from"./ChevronRight-BUKoQxxN.js";function $l(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function nb(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function rb(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function Y(n){this.content=n}Y.prototype={constructor:Y,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new Y(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Y(t)},addToStart:function(n,e){return new Y([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Y(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Y(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Y.from(n),n.size?new Y(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Y.from(n),n.size?new Y(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Y.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Y.from=function(n){if(n instanceof Y)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Y(e)};function ds(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=ds(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function fs(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let c=fs(s.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class v{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new v(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new v(r,i)}cutByIndex(e,t){return e==t?v.empty:e==0&&t==this.content.length?this:new v(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new v(i,o)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ds(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return fs(this,e,t,r)}findIndex(e){if(e==0)return fn(0,e);if(e==this.size)return fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?fn(t+1,o):fn(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return v.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new v(t||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const rr={index:0,offset:0};function fn(n,e){return rr.index=n,rr.offset=e,rr}function Mn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Mn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Mn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Er{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Mn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Er.none;if(e instanceof Er)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class Cn extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ps(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(hs(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(v.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new S(e,r,i)}}S.empty=new S(v.empty,0,0);function hs(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(hs(o.content,e-i-1,t-i-1)))}function ps(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=ps(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function ql(n,e,t){if(t.openStart>n.depth)throw new Cn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Cn("Inconsistent open depths");return ms(n,e,t,0)}function ms(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=ms(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return ot(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Hl(t,n);return ot(o,ys(n,s,a,e,r))}else return ot(o,Nn(n,e,r))}function gs(n,e){if(!e.type.compatibleContent(n.type))throw new Cn("Cannot join "+e.type.name+" onto "+n.type.name)}function Tr(n,e,t){let r=n.node(t);return gs(r,e.node(t)),r}function it(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Wt(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(it(n.nodeAfter,r),o++));for(let a=o;a<s;a++)it(i.child(a),r);e&&e.depth==t&&e.textOffset&&it(e.nodeBefore,r)}function ot(n,e){return n.type.checkContent(e),n.copy(e)}function ys(n,e,t,r,i){let o=n.depth>i&&Tr(n,e,i+1),s=r.depth>i&&Tr(t,r,i+1),a=[];return Wt(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(gs(o,s),it(ot(o,ys(n,e,t,r,i+1)),a)):(o&&it(ot(o,Nn(n,e,i+1)),a),Wt(e,t,i,a),s&&it(ot(s,Nn(t,r,i+1)),a)),Wt(r,null,i,a),new v(a)}function Nn(n,e,t){let r=[];if(Wt(null,n,t,r),n.depth>t){let i=Tr(n,e,t+1);it(ot(i,Nn(n,e,t+1)),r)}return Wt(e,null,t,r),new v(r)}function Hl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(v.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Yt{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Dn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Yt(t,r,o)}static resolveCached(e,t){let r=Fi.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Fi.set(e,r=new Jl);let i=r.elts[r.i]=Yt.resolve(e,t);return r.i=(r.i+1)%Yl,i}}class Jl{constructor(){this.elts=[],this.i=0}}const Yl=12,Fi=new WeakMap;class Dn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Ul=Object.create(null);class ye{constructor(e,t,r,i=j.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||v.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Mn(this.attrs,t||e.defaultAttrs||Ul)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new ye(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ye(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new S(c,i.depth-s,o.depth-s)}replace(e,t,r){return ql(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Yt.resolveCached(this,e)}resolveNoCache(e){return Yt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),bs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=v.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=j.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!j.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=v.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}ye.prototype.text=void 0;class En extends ye{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new En(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new En(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function bs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ct{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Kl(e,t);if(r.next==null)return ct.empty;let i=xs(r);r.next&&r.err("Unexpected trailing text");let o=nc(tc(i));return rc(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return v.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
1
|
+
import{r as O,bN as cs,bO as zl,j as b,at as Ll,aM as lt,bP as jl,c as us,l as et,bQ as Bi}from"./index-CxWNtx9x.js";import{w as Vl}from"./agent-icon-BGgFt2fk.js";import{i as Wl}from"./ChevronRight-B9DmLAKh.js";function $l(n){return n?n.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function nb(n,e){return n==="output-error"||n==="output-denied"?"error":n==="approval-requested"?"approval":n==="input-streaming"||n==="input-available"||n==="output-available"&&e===!0?"loading":"idle"}function rb(n){if(n==null||typeof n!="object")return;const e=n;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return n}function Y(n){this.content=n}Y.prototype={constructor:Y,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new Y(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Y(t)},addToStart:function(n,e){return new Y([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Y(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Y(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Y.from(n),n.size?new Y(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Y.from(n),n.size?new Y(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Y.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};Y.from=function(n){if(n instanceof Y)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Y(e)};function ds(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i==o){t+=i.nodeSize;continue}if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=ds(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}}function fs(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let c=fs(s.content,a.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class v{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new v(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new v(r,i)}cutByIndex(e,t){return e==t?v.empty:e==0&&t==this.content.length?this:new v(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new v(i,o)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ds(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return fs(this,e,t,r)}findIndex(e){if(e==0)return fn(0,e);if(e==this.size)return fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let i=this.child(t),o=r+i.nodeSize;if(o>=e)return o==e?fn(t+1,o):fn(t,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return v.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new v(t||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const rr={index:0,offset:0};function fn(n,e){return rr.index=n,rr.offset=e,rr}function Mn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Mn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Mn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let j=class Er{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Mn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=r.create(t.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Er.none;if(e instanceof Er)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};j.none=[];class Cn extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=ps(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(hs(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(v.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new S(e,r,i)}}S.empty=new S(v.empty,0,0);function hs(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(hs(o.content,e-i-1,t-i-1)))}function ps(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=ps(s.content,e-o-1,t,s);return a&&n.replaceChild(i,s.copy(a))}function ql(n,e,t){if(t.openStart>n.depth)throw new Cn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Cn("Inconsistent open depths");return ms(n,e,t,0)}function ms(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=ms(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let s=n.parent,a=s.content;return ot(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=Hl(t,n);return ot(o,ys(n,s,a,e,r))}else return ot(o,Nn(n,e,r))}function gs(n,e){if(!e.type.compatibleContent(n.type))throw new Cn("Cannot join "+e.type.name+" onto "+n.type.name)}function Tr(n,e,t){let r=n.node(t);return gs(r,e.node(t)),r}function it(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Wt(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(it(n.nodeAfter,r),o++));for(let a=o;a<s;a++)it(i.child(a),r);e&&e.depth==t&&e.textOffset&&it(e.nodeBefore,r)}function ot(n,e){return n.type.checkContent(e),n.copy(e)}function ys(n,e,t,r,i){let o=n.depth>i&&Tr(n,e,i+1),s=r.depth>i&&Tr(t,r,i+1),a=[];return Wt(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(gs(o,s),it(ot(o,ys(n,e,t,r,i+1)),a)):(o&&it(ot(o,Nn(n,e,i+1)),a),Wt(e,t,i,a),s&&it(ot(s,Nn(t,r,i+1)),a)),Wt(r,null,i,a),new v(a)}function Nn(n,e,t){let r=[];if(Wt(null,n,t,r),n.depth>t){let i=Tr(n,e,t+1);it(ot(i,Nn(n,e,t+1)),r)}return Wt(e,null,t,r),new v(r)}function Hl(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)i=e.node(o).copy(v.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Yt{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Dn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Yt(t,r,o)}static resolveCached(e,t){let r=Fi.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==t)return s}else Fi.set(e,r=new Jl);let i=r.elts[r.i]=Yt.resolve(e,t);return r.i=(r.i+1)%Yl,i}}class Jl{constructor(){this.elts=[],this.i=0}}const Yl=12,Fi=new WeakMap;class Dn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Ul=Object.create(null);class ye{constructor(e,t,r,i=j.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||v.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Mn(this.attrs,t||e.defaultAttrs||Ul)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new ye(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new ye(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new S(c,i.depth-s,o.depth-s)}replace(e,t,r){return ql(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Yt.resolveCached(this,e)}resolveNoCache(e){return Yt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),bs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=v.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=j.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!j.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=v.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,i,r);return o.type.checkAttrs(o.attrs),o}}ye.prototype.text=void 0;class En extends ye{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):bs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new En(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new En(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function bs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ct{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Kl(e,t);if(r.next==null)return ct.empty;let i=xs(r);r.next&&r.err("Unexpected trailing text");let o=nc(tc(i));return rc(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return v.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
2
2
|
`)}}ct.empty=new ct(!0);class Kl{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function xs(n){let e=[];do e.push(Gl(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Gl(n){let e=[];do e.push(Xl(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Xl(n){let e=ec(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Ql(n,e);else break;return e}function zi(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Ql(n,e){let t=zi(n),r=t;return n.eat(",")&&(n.next!="}"?r=zi(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function Zl(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let o in t){let s=t[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function ec(n){if(n.eat("(")){let e=xs(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=Zl(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function tc(n){let e=[[]];return i(o(n,0),t()),e;function t(){return e.push([])-1}function r(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=t())}else if(s.type=="star"){let l=t();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=t();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let u=t();i(o(s.expr,l),u),l=u}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let u=t();r(l,u),i(o(s.expr,l),u),l=u}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function vs(n,e){return e-n}function Li(n,e){let t=[];return r(e),t.sort(vs);function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&t.indexOf(l)==-1&&r(l)}}}function nc(n){let e=Object.create(null);return t(Li(n,0));function t(r){let i=[];r.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);Li(n,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[r.join(",")]=new ct(r.indexOf(n.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(vs);o.next.push({type:i[s][0],next:e[a.join(",")]||t(a)})}return o}}function rc(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ks(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function ws(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function Ss(n,e,t,r){for(let i in e)if(!(i in n))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in n){let o=n[i];o.validate&&o.validate(e[i])}}function Ms(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new oc(n,r,e[r]);return t}let ji=class Cs{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ms(e,r.attrs),this.defaultAttrs=ks(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ct.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ws(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ye(this,this.computeAttrs(e),v.from(t),j.setFrom(r))}createChecked(e=null,t,r){return t=v.from(t),this.checkContent(t),new ye(this,this.computeAttrs(e),t,j.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=v.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(v.empty,!0);return o?new ye(this,e,t.append(o),j.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Ss(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:j.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Cs(o,t,s));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function ic(n,e,t){let r=t.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${o}`)}}class oc{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?ic(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class jn{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Ms(e,i.attrs),this.excluded=null;let o=ks(this.attrs);this.instance=o?new j(this,o):null}create(e=null){return!e&&this.instance?this.instance:new j(this,ws(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new jn(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Ss(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Ns{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Y.from(e.nodes),t.marks=Y.from(e.marks||{}),this.nodes=ji.compile(this.spec.nodes,this),this.marks=jn.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=ct.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?Vi(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:Vi(this,s.split(" "))}this.nodeFromJSON=i=>ye.fromJSON(this,i),this.markFromJSON=i=>j.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof ji){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new En(r,r.defaultAttrs,e,j.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Vi(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let a in n.marks){let l=n.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function sc(n){return n.tag!=null}function ac(n){return n.style!=null}class $e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(i=>{if(sc(i))this.tags.push(i);else if(ac(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new $i(this,t,!1);return r.addAll(e,j.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new $i(this,t,!0);return r.addAll(e,j.none,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(uc(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(s.getAttrs){let l=s.getAttrs(t);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let a=t[s];if((a.priority==null?50:a.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qi(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=qi(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $e(e,$e.schemaRules(e)))}}const Ds={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},lc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Es={ol:!0,ul:!0},Ut=1,Or=2,$t=4;function Wi(n,e,t){return e!=null?(e?Ut:0)|(e==="full"?Or:0):n&&n.whitespace=="pre"?Ut|Or:t&~$t}class hn{constructor(e,t,r,i,o,s){this.type=e,this.attrs=t,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=j.none,this.match=o||(s&$t?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(v.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ut)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let t=v.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(v.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Ds.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class $i{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=t.topNode,o,s=Wi(null,t.preserveWhitespace,0)|(r?$t:0);i?o=new hn(i.type,i.attrs,j.none,!0,t.topMatch||i.type.contentMatch,s):r?o=new hn(null,null,j.none,!0,null,s):o=new hn(e.schema.topNodeType,null,j.none,!0,null,s),this.nodes=[o],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,i=this.top,o=i.options&Or?"full":this.localPreserveWS||(i.options&Ut)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),t,!0),a[l]&&this.insertNode(s.text(a[l]),t,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;Es.hasOwnProperty(s)&&this.parser.normalizeLists&&cc(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:lc.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(Ds.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=l&&l.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(c=>!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return t}addElementByRule(e,t,r,i){let o,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,t.attrs||null,r,t.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(a)&&this.open--}addAll(e,t,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,t);this.findAtPoint(e,o)}findPlace(e,t,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+a)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)t=this.enterInner(i[s],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(t=this.enterInner(o,null,t))}let i=this.findPlace(e,t,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=j.none;for(let a of i.concat(e.marks))(o.type?o.type.allowsMarkType(a.type):Hi(a.type,e.type))&&(s=a.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,t,r,i){let o=this.findPlace(e.create(t),r,!1);return o&&(o=this.enterInner(e,t,r,!0,i)),o}enterInner(e,t,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=Wi(e,o,s.options);s.options&$t&&s.content.length==0&&(a|=$t);let l=j.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Hi(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new hn(e,t,l,i,null,a)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Ut)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=t[a];if(c==""){if(a==t.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function cc(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Es.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function uc(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function qi(n){let e={};for(let t in n)e[t]=n[t];return e}function Hi(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class pt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=ir(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,t);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=vn(ir(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&vn(ir(r),i(e,t),null,e.attrs)}static renderSpec(e,t,r=null,i){return vn(e,t,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new pt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ji(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Ji(e.marks)}}function Ji(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function ir(n){return n.document||window.document}const Yi=new WeakMap;function dc(n){let e=Yi.get(n);return e===void 0&&Yi.set(n,e=fc(n)),e}function fc(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)t(r[i]);else for(let i in r)t(r[i])}return t(n),e}function vn(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=dc(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(t=i.slice(0,s),i=i.slice(s+1));let a,l=t?n.createElementNS(t,i):n.createElement(i),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=vn(n,h,t,r);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const Ts=65535,Os=Math.pow(2,16);function hc(n,e){return n+e*Os}function Ui(n){return n&Ts}function pc(n){return(n-(n&Ts))/Os}const As=1,Ps=2,kn=4,Rs=8;class Ar{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Rs)>0}get deletedBefore(){return(this.delInfo&(As|kn))>0}get deletedAfter(){return(this.delInfo&(Ps|kn))>0}get deletedAcross(){return(this.delInfo&kn)>0}}class ae{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ae.empty)return ae.empty}recover(e){let t=0,r=Ui(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+pc(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let h=c?e==l?-1:e==d?1:t:t,f=l+i+(h<0?0:u);if(r)return f;let p=e==(t<0?l:d)?null:hc(a/3,e-l),g=e==l?Ps:e==d?As:kn;return(t<0?e!=l:e!=d)&&(g|=Rs),new Ar(f,g,p)}i+=u-c}return r?e+i:new Ar(e+i,0,null)}touches(e,t){let r=0,i=Ui(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==i*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+t],u=this.ranges[i+r];e(a,a+c,l,l+u),o+=u-c}}invert(){return new ae(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ae.empty:new ae(e<0?[0,-e,0]:[0,0,e])}}ae.empty=new ae([]);class Tn{constructor(e,t,r=0,i=e?e.length:0){this.mirror=t,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Tn(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new Tn;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(e,t);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new Ar(e,i,null)}}const or=Object.create(null);class Z{getMap(){return ae.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=or[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in or)throw new RangeError("Duplicate use of step JSON ID "+e);return or[e]=t,t.prototype.jsonID=e,t}}class ${constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new $(e,null)}static fail(e){return new $(null,e)}static fromReplace(e,t,r,i){try{return $.ok(e.replace(t,r,i))}catch(o){if(o instanceof Cn)return $.fail(o.message);throw o}}}function Kr(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Kr(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return v.fromArray(r)}class je extends Z{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new S(Kr(t.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,o)}invert(){return new me(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new je(t.pos,r.pos,this.mark)}merge(e){return e instanceof je&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new je(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new je(t.from,t.to,e.markFromJSON(t.mark))}}Z.jsonID("addMark",je);class me extends Z{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new S(Kr(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return $.fromReplace(e,this.from,this.to,r)}invert(){return new je(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new me(t.pos,r.pos,this.mark)}merge(e){return e instanceof me&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new me(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new me(t.from,t.to,e.markFromJSON(t.mark))}}Z.jsonID("removeMark",me);class Ve extends Z{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new S(v.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new Ve(this.pos,t.marks[i]);return new Ve(this.pos,this.mark)}}return new ut(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ve(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ve(t.pos,e.markFromJSON(t.mark))}}Z.jsonID("addNodeMark",Ve);class ut extends Z{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return $.fromReplace(e,this.pos,this.pos+1,new S(v.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ve(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ut(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ut(t.pos,e.markFromJSON(t.mark))}}Z.jsonID("removeNodeMark",ut);class W extends Z{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Pr(e,this.from,this.to)?$.fail("Structure replace would overwrite content"):$.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ae([this.from,this.to-this.from,this.slice.size])}invert(e){return new W(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&W.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new W(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof W)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?S.empty:new S(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new W(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?S.empty:new S(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new W(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new W(t.from,t.to,S.fromJSON(e,t.slice),!!t.structure)}}W.MAP_BIAS=1;Z.jsonID("replace",W);class H extends Z{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Pr(e,this.from,this.gapFrom)||Pr(e,this.gapTo,this.to)))return $.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return $.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?$.fromReplace(e,this.from,this.to,r):$.fail("Content does not fit in gap")}getMap(){return new ae([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new H(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new H(t.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new H(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}}Z.jsonID("replaceAround",H);function Pr(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function mc(n,e,t,r){let i=[],o=[],s,a;n.doc.nodesBetween(e,t,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(s&&s.to==h&&s.mark.eq(d[g])?s.to=f:i.push(s=new me(h,f,d[g])));a&&a.to==h?a.to=f:o.push(a=new je(h,f,r))}}),i.forEach(l=>n.step(l)),o.forEach(l=>n.step(l))}function gc(n,e,t,r){let i=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof jn){let c=s.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,t);for(let u=0;u<l.length;u++){let d=l[u],h;for(let f=0;f<i.length;f++){let p=i[f];p.step==o-1&&d.eq(i[f].style)&&(h=p)}h?(h.to=c,h.step=o):i.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(s=>n.step(new me(s.from,s.to,s.style)))}function Gr(n,e,t,r=t.contentMatch,i=!0){let o=n.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)s.push(new W(a,u,S.empty));else{r=d;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new me(a,u,c.marks[h]));if(i&&c.isText&&t.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new S(v.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),s.push(new W(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!r.validEnd){let l=r.fillBefore(v.empty,!0);n.replace(a,a,new S(l,0,0))}for(let l=s.length-1;l>=0;l--)n.step(s[l])}function yc(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Pt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,i=0,o=0;;--r){let s=n.$from.node(r),a=n.$from.index(r)+i,l=n.$to.indexAfter(r)-o;if(r<n.depth&&s.canReplace(a,l,t))return r;if(r==0||s.type.spec.isolating||!yc(s,a,l))break;a&&(i=1),l<s.childCount&&(o=1)}return null}function bc(n,e,t){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),a=i.after(o+1),l=s,c=a,u=v.empty,d=0;for(let p=o,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=v.from(r.node(p).copy(u)),d++):l--;let h=v.empty,f=0;for(let p=o,g=!1;p>t;p--)g||i.after(p+1)<i.end(p)?(g=!0,h=v.from(i.node(p).copy(h)),f++):c++;n.step(new H(l,c,s,a,new S(u.append(h),d,f),u.size-d,!0))}function Xr(n,e,t=null,r=n){let i=xc(n,e),o=i&&vc(r,e);return o?i.map(Ki).concat({type:e,attrs:t}).concat(o.map(Ki)):null}function Ki(n){return{type:n,attrs:null}}function xc(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return t.canReplaceWith(r,i,s)?o:null}function vc(n,e){let{parent:t,startIndex:r,endIndex:i}=n,o=t.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(t.child(c).type);return!l||!l.validEnd?null:s}function kc(n,e,t){let r=v.empty;for(let s=t.length-1;s>=0;s--){if(r.size){let a=t[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=v.from(t[s].type.create(t[s].attrs,r))}let i=e.start,o=e.end;n.step(new H(i,o,i,o,new S(r,0,0),t.length,!0))}function wc(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&Sc(n.doc,n.mapping.slice(o).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&_s(n,s,a,o),Gr(n,n.mapping.slice(o).map(a,1),r,void 0,c===null);let u=n.mapping.slice(o),d=u.map(a,1),h=u.map(a+s.nodeSize,1);return n.step(new H(d,h,d+1,h-1,new S(v.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&Is(n,s,a,o),!1}})}function Is(n,e,t,r){e.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=n.mapping.slice(r).map(t+1+o+s.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function _s(n,e,t,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=n.mapping.slice(r).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(`
|
|
@@ -99,4 +99,4 @@ ${m}
|
|
|
99
99
|
`);l+=c.type==="paragraph"?`
|
|
100
100
|
|
|
101
101
|
${p}`:`
|
|
102
|
-
${p}`}}),l}function Zh(n,e,t={}){const{state:r}=e,{doc:i,tr:o}=r,s=n;i.descendants((a,l)=>{const c=o.mapping.map(l),u=o.mapping.map(l)+a.nodeSize;let d=null;if(a.marks.forEach(f=>{if(f!==s)return!1;d=f}),!d)return;let h=!1;if(Object.keys(t).forEach(f=>{t[f]!==d.attrs[f]&&(h=!0)}),h){const f=n.type.create({...n.attrs,...t});o.removeMark(c,u,n.type),o.addMark(c,u,f)}}),o.docChanged&&e.view.dispatch(o)}var ep=class fl extends xi{constructor(){super(...arguments),this.type="node"}static create(e={}){const t=typeof e=="function"?e():e;return new fl(t)}configure(e){return super.configure(e)}extend(e){const t=typeof e=="function"?e():e;return super.extend(t)}},tp=class{constructor(n,e,t){this.isDragging=!1,this.component=n,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...t},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(n){var e,t,r,i,o,s,a;const{view:l}=this.editor,c=n.target,u=c.nodeType===3?(e=c.parentElement)==null?void 0:e.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(t=this.contentDOM)!=null&&t.contains(c)||!u)return;let d=0,h=0;if(this.dom!==u){const x=this.dom.getBoundingClientRect(),w=u.getBoundingClientRect(),C=(i=n.offsetX)!=null?i:(r=n.nativeEvent)==null?void 0:r.offsetX,k=(s=n.offsetY)!=null?s:(o=n.nativeEvent)==null?void 0:o.offsetY;d=w.x-x.x+C,h=w.y-x.y+k}const f=this.dom.cloneNode(!0);try{const x=this.dom.getBoundingClientRect();f.style.width=`${Math.round(x.width)}px`,f.style.height=`${Math.round(x.height)}px`,f.style.boxSizing="border-box",f.style.pointerEvents="none"}catch{}let p=null;try{p=document.createElement("div"),p.style.position="absolute",p.style.top="-9999px",p.style.left="-9999px",p.style.pointerEvents="none",p.appendChild(f),document.body.appendChild(p),(a=n.dataTransfer)==null||a.setDragImage(f,d,h)}finally{p&&setTimeout(()=>{try{p?.remove()}catch{}},0)}const g=this.getPos();if(typeof g!="number")return;const m=D.create(l.state.doc,g),y=l.state.tr.setSelection(m);l.dispatch(y)}stopEvent(n){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:n});const t=n.target;if(!(this.dom.contains(t)&&!((e=this.contentDOM)!=null&&e.contains(t))))return!1;const i=n.type.startsWith("drag"),o=n.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(t.tagName)||t.isContentEditable)&&!o&&!i)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,c=!!this.node.type.spec.draggable,u=D.isSelectable(this.node),d=n.type==="copy",h=n.type==="paste",f=n.type==="cut",p=n.type==="mousedown";if(!c&&u&&i&&n.target===this.dom&&n.preventDefault(),c&&i&&!l&&n.target===this.dom)return n.preventDefault(),!1;if(c&&a&&!l&&p){const g=t.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||o||d||h||f||p&&u)}ignoreMutation(n){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:n}):this.node.isLeaf||this.node.isAtom?!0:n.type==="selection"||this.dom.contains(n.target)&&n.type==="childList"&&(Zt()||$r())&&this.editor.isFocused&&[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].every(t=>t.isContentEditable)?!1:this.contentDOM===n.target&&n.type==="attributes"?!0:!this.contentDOM.contains(n.target)}updateAttributes(n){this.editor.commands.command(({tr:e})=>{const t=this.getPos();return typeof t!="number"?!1:(e.setNodeMarkup(t,void 0,{...this.node.attrs,...n}),!0)})}deleteNode(){const n=this.getPos();if(typeof n!="number")return;const e=n+this.node.nodeSize;this.editor.commands.deleteRange({from:n,to:e})}};function mb(n){return new _h({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{const o=L(n.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=t.to;if(a){const u=l.search(/\S/),d=t.from+l.indexOf(a),h=d+a.length;if(Ka(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(m=>m===n.type&&m!==p.mark.type)).filter(p=>p.to>d).length)return null;h<t.to&&s.delete(h,t.to),d>t.from&&s.delete(t.from+u,d),c=t.from+u+a.length,s.addMark(t.from+u,c,n.type.create(o||{})),s.removeStoredMark(n.type)}}})}const{getOwnPropertyNames:np,getOwnPropertySymbols:rp}=Object,{hasOwnProperty:ip}=Object.prototype;function vr(n,e){return function(r,i,o){return n(r,i,o)&&e(r,i,o)}}function xn(n){return function(t,r,i){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,i);const{cache:o}=i,s=o.get(t),a=o.get(r);if(s&&a)return s===r&&a===t;o.set(t,r),o.set(r,t);const l=n(t,r,i);return o.delete(t),o.delete(r),l}}function op(n){return n?.[Symbol.toStringTag]}function Jo(n){return np(n).concat(rp(n))}const sp=Object.hasOwn||((n,e)=>ip.call(n,e));function mt(n,e){return n===e||!n&&!e&&n!==n&&e!==e}const ap="__v",lp="__o",cp="_owner",{getOwnPropertyDescriptor:Yo,keys:Uo}=Object;function up(n,e){return n.byteLength===e.byteLength&&Fn(new Uint8Array(n),new Uint8Array(e))}function dp(n,e,t){let r=n.length;if(e.length!==r)return!1;for(;r-- >0;)if(!t.equals(n[r],e[r],r,r,n,e,t))return!1;return!0}function fp(n,e){return n.byteLength===e.byteLength&&Fn(new Uint8Array(n.buffer,n.byteOffset,n.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function hp(n,e){return mt(n.getTime(),e.getTime())}function pp(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function mp(n,e){return n===e}function Ko(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),o=n.entries();let s,a,l=0;for(;(s=o.next())&&!s.done;){const c=e.entries();let u=!1,d=0;for(;(a=c.next())&&!a.done;){if(i[d]){d++;continue}const h=s.value,f=a.value;if(t.equals(h[0],f[0],l,d,n,e,t)&&t.equals(h[1],f[1],h[0],f[0],n,e,t)){u=i[d]=!0;break}d++}if(!u)return!1;l++}return!0}const gp=mt;function yp(n,e,t){const r=Uo(n);let i=r.length;if(Uo(e).length!==i)return!1;for(;i-- >0;)if(!hl(n,e,t,r[i]))return!1;return!0}function _t(n,e,t){const r=Jo(n);let i=r.length;if(Jo(e).length!==i)return!1;let o,s,a;for(;i-- >0;)if(o=r[i],!hl(n,e,t,o)||(s=Yo(n,o),a=Yo(e,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function bp(n,e){return mt(n.valueOf(),e.valueOf())}function xp(n,e){return n.source===e.source&&n.flags===e.flags}function Go(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),o=n.values();let s,a;for(;(s=o.next())&&!s.done;){const l=e.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!i[u]&&t.equals(s.value,a.value,s.value,a.value,n,e,t)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function Fn(n,e){let t=n.byteLength;if(e.byteLength!==t||n.byteOffset!==e.byteOffset)return!1;for(;t-- >0;)if(n[t]!==e[t])return!1;return!0}function vp(n,e){return n.hostname===e.hostname&&n.pathname===e.pathname&&n.protocol===e.protocol&&n.port===e.port&&n.hash===e.hash&&n.username===e.username&&n.password===e.password}function hl(n,e,t,r){return(r===cp||r===lp||r===ap)&&(n.$$typeof||e.$$typeof)?!0:sp(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}const kp="[object ArrayBuffer]",wp="[object Arguments]",Sp="[object Boolean]",Mp="[object DataView]",Cp="[object Date]",Np="[object Error]",Dp="[object Map]",Ep="[object Number]",Tp="[object Object]",Op="[object RegExp]",Ap="[object Set]",Pp="[object String]",Rp={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Ip="[object URL]",_p=Object.prototype.toString;function Bp({areArrayBuffersEqual:n,areArraysEqual:e,areDataViewsEqual:t,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:f,unknownTagComparators:p}){return function(m,y,x){if(m===y)return!0;if(m==null||y==null)return!1;const w=typeof m;if(w!==typeof y)return!1;if(w!=="object")return w==="number"?a(m,y,x):w==="function"?o(m,y,x):!1;const C=m.constructor;if(C!==y.constructor)return!1;if(C===Object)return l(m,y,x);if(Array.isArray(m))return e(m,y,x);if(C===Date)return r(m,y,x);if(C===RegExp)return u(m,y,x);if(C===Map)return s(m,y,x);if(C===Set)return d(m,y,x);const k=_p.call(m);if(k===Cp)return r(m,y,x);if(k===Op)return u(m,y,x);if(k===Dp)return s(m,y,x);if(k===Ap)return d(m,y,x);if(k===Tp)return typeof m.then!="function"&&typeof y.then!="function"&&l(m,y,x);if(k===Ip)return f(m,y,x);if(k===Np)return i(m,y,x);if(k===wp)return l(m,y,x);if(Rp[k])return h(m,y,x);if(k===kp)return n(m,y,x);if(k===Mp)return t(m,y,x);if(k===Sp||k===Ep||k===Pp)return c(m,y,x);if(p){let P=p[k];if(!P){const M=op(m);M&&(P=p[M])}if(P)return P(m,y,x)}return!1}}function Fp({circular:n,createCustomConfig:e,strict:t}){let r={areArrayBuffersEqual:up,areArraysEqual:t?_t:dp,areDataViewsEqual:fp,areDatesEqual:hp,areErrorsEqual:pp,areFunctionsEqual:mp,areMapsEqual:t?vr(Ko,_t):Ko,areNumbersEqual:gp,areObjectsEqual:t?_t:yp,arePrimitiveWrappersEqual:bp,areRegExpsEqual:xp,areSetsEqual:t?vr(Go,_t):Go,areTypedArraysEqual:t?vr(Fn,_t):Fn,areUrlsEqual:vp,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),n){const i=xn(r.areArraysEqual),o=xn(r.areMapsEqual),s=xn(r.areObjectsEqual),a=xn(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:a})}return r}function zp(n){return function(e,t,r,i,o,s,a){return n(e,t,a)}}function Lp({circular:n,comparator:e,createState:t,equals:r,strict:i}){if(t)return function(a,l){const{cache:c=n?new WeakMap:void 0,meta:u}=t();return e(a,l,{cache:c,equals:r,meta:u,strict:i})};if(n)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return e(a,l,o)}}const jp=Xe();Xe({strict:!0});Xe({circular:!0});Xe({circular:!0,strict:!0});Xe({createInternalComparator:()=>mt});Xe({strict:!0,createInternalComparator:()=>mt});Xe({circular:!0,createInternalComparator:()=>mt});Xe({circular:!0,createInternalComparator:()=>mt,strict:!0});function Xe(n={}){const{circular:e=!1,createInternalComparator:t,createState:r,strict:i=!1}=n,o=Fp(n),s=Bp(o),a=t?t(s):zp(s);return Lp({circular:e,comparator:s,createState:r,equals:a,strict:i})}var Vp=(...n)=>e=>{n.forEach(t=>{typeof t=="function"?t(e):t&&(t.current=e)})},Wp=({contentComponent:n})=>{const e=cs.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getServerSnapshot);return b.jsx(b.Fragment,{children:Object.values(e)})};function $p(){const n=new Set;let e={};return{subscribe(t){return n.add(t),()=>{n.delete(t)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(t,r){e={...e,[t]:jl.createPortal(r.reactElement,r.element,t)},n.forEach(i=>i())},removeRenderer(t){const r={...e};delete r[t],e=r,n.forEach(i=>i())}}}var qp=class extends lt.Component{constructor(n){var e;super(n),this.editorContentRef=lt.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=n.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var n;const e=this.props.editor;if(e&&!e.isDestroyed&&((n=e.view.dom)!=null&&n.parentNode)){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=$p(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var n;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((n=e.view.dom)!=null&&n.parentNode))return;const t=document.createElement("div");t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){const{editor:n,innerRef:e,...t}=this.props;return b.jsxs(b.Fragment,{children:[b.jsx("div",{ref:Vp(e,this.editorContentRef),...t}),n?.contentComponent&&b.jsx(Wp,{contentComponent:n.contentComponent})]})}},Hp=O.forwardRef((n,e)=>{const t=lt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[n.editor]);return lt.createElement(qp,{key:t,innerRef:e,...n})}),Jp=lt.memo(Hp),Yp=typeof window<"u"?O.useLayoutEffect:O.useEffect,Up=class{constructor(n){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=n,this.lastSnapshot={editor:n,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(n){return this.subscribers.add(n),()=>{this.subscribers.delete(n)}}watch(n){if(this.editor=n,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}};function Kp(n){var e;const[t]=O.useState(()=>new Up(n.editor)),r=zl.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getServerSnapshot,n.selector,(e=n.equalityFn)!=null?e:jp);return Yp(()=>t.watch(n.editor),[n.editor,t]),O.useDebugValue(r),r}var Gp=!1,Jr=typeof window>"u",Xp=Jr||!!(typeof window<"u"&&window.next),Qp=class pl{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(t=>t())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?Jr||Xp?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)==null?void 0:o.call(i,...r)},onBlur:(...r)=>{var i,o;return(o=(i=this.options.current).onBlur)==null?void 0:o.call(i,...r)},onCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onCreate)==null?void 0:o.call(i,...r)},onDestroy:(...r)=>{var i,o;return(o=(i=this.options.current).onDestroy)==null?void 0:o.call(i,...r)},onFocus:(...r)=>{var i,o;return(o=(i=this.options.current).onFocus)==null?void 0:o.call(i,...r)},onSelectionUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)==null?void 0:o.call(i,...r)},onTransaction:(...r)=>{var i,o;return(o=(i=this.options.current).onTransaction)==null?void 0:o.call(i,...r)},onUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onUpdate)==null?void 0:o.call(i,...r)},onContentError:(...r)=>{var i,o;return(o=(i=this.options.current).onContentError)==null?void 0:o.call(i,...r)},onDrop:(...r)=>{var i,o;return(o=(i=this.options.current).onDrop)==null?void 0:o.call(i,...r)},onPaste:(...r)=>{var i,o;return(o=(i=this.options.current).onPaste)==null?void 0:o.call(i,...r)},onDelete:(...r)=>{var i,o;return(o=(i=this.options.current).onDelete)==null?void 0:o.call(i,...r)}};return new qh(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&t.extensions?e.extensions.length!==t.extensions.length?!1:e.extensions.every((i,o)=>{var s;return i===((s=t.extensions)==null?void 0:s[o])}):e[r]===t[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?pl.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,i)=>r===e[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function gb(n={},e=[]){const t=O.useRef(n);t.current=n;const[r]=O.useState(()=>new Qp(t)),i=cs.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return O.useDebugValue(i),O.useEffect(r.onRender(e)),Kp({editor:i,selector:({transactionNumber:o})=>n.shouldRerenderOnTransaction===!1||n.shouldRerenderOnTransaction===void 0?null:n.immediatelyRender&&o===0?0:o+1}),i}var wi=O.createContext({editor:null});wi.Consumer;var yb=()=>O.useContext(wi),ml=O.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Zp=()=>O.useContext(ml),em=lt.forwardRef((n,e)=>{const{onDragStart:t}=Zp(),r=n.as||"div";return b.jsx(r,{...n,ref:e,"data-node-view-wrapper":"",onDragStart:t,style:{whiteSpace:"normal",...n.style}})});function Xo(n){return!!(typeof n=="function"&&n.prototype&&n.prototype.isReactComponent)}function Qo(n){return!!(typeof n=="object"&&n.$$typeof&&(n.$$typeof.toString()==="Symbol(react.forward_ref)"||n.$$typeof.description==="react.forward_ref"))}function tm(n){return!!(typeof n=="object"&&n.$$typeof&&(n.$$typeof.toString()==="Symbol(react.memo)"||n.$$typeof.description==="react.memo"))}function nm(n){if(Xo(n)||Qo(n))return!0;if(tm(n)){const e=n.type;if(e)return Xo(e)||Qo(e)}return!1}function rm(){try{if(O.version)return parseInt(O.version.split(".")[0],10)>=19}catch{}return!1}var im=class{constructor(n,{editor:e,props:t={},as:r="div",className:i=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=n,this.editor=e,this.props=t,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?Ll.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var n;if(this.destroyed)return;const e=this.component,t=this.props,r=this.editor,i=rm(),o=nm(e),s={...t};s.ref&&!(i||o)&&delete s.ref,!s.ref&&(i||o)&&(s.ref=a=>{this.ref=a}),this.reactElement=b.jsx(e,{...s}),(n=r?.contentComponent)==null||n.setRenderer(this.id,this)}updateProps(n={}){this.destroyed||(this.props={...this.props,...n},this.render())}destroy(){var n;this.destroyed=!0;const e=this.editor;(n=e?.contentComponent)==null||n.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(n){Object.keys(n).forEach(e=>{this.element.setAttribute(e,n[e])})}};lt.createContext({markViewContentRef:()=>{}});var om=class extends tp{constructor(n,e,t){if(super(n,e,t),this.selectionRafId=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const n=this.editor,e=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(e,{get(t,r,i){var o;return r==="storage"?(o=n.storage[e.name])!=null?o:{}:Reflect.get(t,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){const n={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:O.createRef()};if(!this.component.displayName){const l=c=>c.charAt(0).toUpperCase()+c.substring(1);this.component.displayName=l(this.extension.name)}const r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},i=this.component,o=O.memo(l=>b.jsx(ml.Provider,{value:r,children:O.createElement(i,l)}));o.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new im(o,{editor:this.editor,props:n,as:s,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var n;if(this.renderer.element.firstElementChild&&!((n=this.renderer.element.firstElementChild)!=null&&n.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const{from:n,to:e}=this.editor.state.selection,t=this.getPos();if(typeof t=="number")if(n<=t&&e>=t+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(n,e,t){const r=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(n.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=n,this.decorations=e,this.innerDecorations=t,this.options.update({oldNode:i,oldDecorations:o,newNode:n,newDecorations:e,oldInnerDecorations:s,innerDecorations:t,updateProps:()=>r({node:n,decorations:e,innerDecorations:t,extension:this.extensionWithSyncedStorage})})}return n===this.node&&this.decorations===e&&this.innerDecorations===t||(this.node=n,this.decorations=e,this.innerDecorations=t,r({node:n,decorations:e,innerDecorations:t,extension:this.extensionWithSyncedStorage})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let n={};if(typeof this.options.attrs=="function"){const e=this.editor.extensionManager.attributes,t=nn(this.node,e);n=this.options.attrs({node:this.node,HTMLAttributes:t})}else n=this.options.attrs;this.renderer.updateAttributes(n)}}};function sm(n,e){return t=>t.editor.contentComponent?new om(n,t,e):{}}var Si=O.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});Si.displayName="TiptapContext";var am=()=>O.useContext(Si);function gl({editor:n,instance:e,children:t}){const r=n??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const i=O.useMemo(()=>({editor:r}),[r]),o=O.useMemo(()=>({editor:r}),[r]);return b.jsx(wi.Provider,{value:o,children:b.jsx(Si.Provider,{value:i,children:t})})}gl.displayName="Tiptap";function yl({...n}){const{editor:e}=am();return b.jsx(Jp,{editor:e,...n})}yl.displayName="Tiptap.Content";Object.assign(gl,{Content:yl});function lm(n){return n.storage.mention}function bb(n,e,t){n.chain().focus().insertContentAt(e,[cm(t),{type:"text",text:" "}]).run()}function cm(n){return{type:"mention",attrs:n}}function um(n){const e=us.c(21),{node:t,selected:r,view:i,editor:o,getPos:s}=n,{name:a,char:l,kind:c,id:u,args:d}=t.attrs,h=r&&i.editable,f=c==="task",p=l==="@",g=i.editable&&l==="/"&&(c==="prompt"||c==null);let m;e[0]!==d||e[1]!==o||e[2]!==s||e[3]!==u||e[4]!==g||e[5]!==a?(m=re=>{if(!g)return;const De=lm(o)?.onEditChip;if(!De||typeof s!="function")return;const _e=s();typeof _e=="number"&&(re.preventDefault(),re.stopPropagation(),De({promptId:u,promptName:a,args:d??{},pos:_e}))},e[0]=d,e[1]=o,e[2]=s,e[3]=u,e[4]=g,e[5]=a,e[6]=m):m=e[6];const y=m,x=g?"cursor-pointer":"cursor-default",w=p?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",C=h&&"outline-2 outline-blue-300 outline-offset-0",k=g&&"hover:brightness-95",P=!f&&"capitalize";let M;e[7]!==x||e[8]!==w||e[9]!==C||e[10]!==k||e[11]!==P?(M=et("px-1 py-1 rounded","inline-flex items-center gap-1",x,"select-none","text-xs font-light",w,C,k,P),e[7]=x,e[8]=w,e[9]=C,e[10]=k,e[11]=P,e[12]=M):M=e[12];let R;e[13]!==f||e[14]!==a?(R=f?b.jsx("span",{className:"inline-block max-w-[220px] truncate align-bottom",children:a??""}):a?$l(a):"",e[13]=f,e[14]=a,e[15]=R):R=e[15];let _;return e[16]!==l||e[17]!==y||e[18]!==M||e[19]!==R?(_=b.jsxs(em,{onClick:y,className:M,children:[l,R]}),e[16]=l,e[17]=y,e[18]=M,e[19]=R,e[20]=_):_=e[20],_}const xb=ep.create({name:"mention",group:"inline",inline:!0,atom:!0,addStorage(){return{onEditChip:null}},addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id")||null,renderHTML:n=>n.id?{"data-id":n.id}:{}},name:{default:null,parseHTML:n=>n.getAttribute("data-name")||null,renderHTML:n=>n.name?{"data-name":n.name}:{}},char:{default:"/",parseHTML:n=>n.getAttribute("data-char")||"/",renderHTML:n=>n.char?{"data-char":n.char}:{}},metadata:{default:null,parseHTML:n=>{try{return JSON.parse(n.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:n=>n.metadata?{"data-metadata":JSON.stringify(n.metadata)}:{}},kind:{default:null,parseHTML:n=>n.getAttribute("data-kind")||null,renderHTML:n=>n.kind?{"data-kind":n.kind}:{}},args:{default:null,parseHTML:n=>{try{return JSON.parse(n.getAttribute("data-args")||"null")}catch{return null}},renderHTML:n=>n.args?{"data-args":JSON.stringify(n.args)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:n,HTMLAttributes:e}){const t={"data-type":"mention"};return n.attrs.id&&(t["data-id"]=n.attrs.id),n.attrs.name&&(t["data-name"]=n.attrs.name),n.attrs.char&&(t["data-char"]=n.attrs.char),n.attrs.metadata&&(t["data-metadata"]=JSON.stringify(n.attrs.metadata)),n.attrs.kind&&(t["data-kind"]=n.attrs.kind),n.attrs.args&&(t["data-args"]=JSON.stringify(n.attrs.args)),["span",{...e,...t}]},renderText({node:n}){const e=n.attrs.char??"@",t=n.attrs.name??"";return`${e}${t}`},addNodeView(){return sm(um)}});function F(n){const e=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&e==="[object Date]"?new n.constructor(+n):typeof n=="number"||e==="[object Number]"||typeof n=="string"||e==="[object String]"?new Date(n):new Date(NaN)}function ce(n,e){return n instanceof Date?new n.constructor(e):new Date(e)}function ee(n,e){const t=F(n);return isNaN(e)?ce(n,NaN):(e&&t.setDate(t.getDate()+e),t)}function be(n,e){const t=F(n);if(isNaN(e))return ce(n,NaN);if(!e)return t;const r=t.getDate(),i=ce(n,t.getTime());i.setMonth(t.getMonth()+e+1,0);const o=i.getDate();return r>=o?i:(t.setFullYear(i.getFullYear(),i.getMonth(),r),t)}const Mi=6048e5,dm=864e5;let fm={};function ln(){return fm}function Ce(n,e){const t=ln(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,i=F(n),o=i.getDay(),s=(o<r?7:0)+o-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function ht(n){return Ce(n,{weekStartsOn:1})}function bl(n){const e=F(n),t=e.getFullYear(),r=ce(n,0);r.setFullYear(t+1,0,4),r.setHours(0,0,0,0);const i=ht(r),o=ce(n,0);o.setFullYear(t,0,4),o.setHours(0,0,0,0);const s=ht(o);return e.getTime()>=i.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function At(n){const e=F(n);return e.setHours(0,0,0,0),e}function zn(n){const e=F(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function we(n,e){const t=At(n),r=At(e),i=+t-zn(t),o=+r-zn(r);return Math.round((i-o)/dm)}function hm(n){const e=bl(n),t=ce(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),ht(t)}function Yr(n,e){const t=e*7;return ee(n,t)}function pm(n,e){return be(n,e*12)}function mm(n){let e;return n.forEach(function(t){const r=F(t);(e===void 0||e<r||isNaN(Number(r)))&&(e=r)}),e||new Date(NaN)}function gm(n){let e;return n.forEach(t=>{const r=F(t);(!e||e>r||isNaN(+r))&&(e=r)}),e||new Date(NaN)}function ie(n,e){const t=At(n),r=At(e);return+t==+r}function Ci(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ym(n){if(!Ci(n)&&typeof n!="number")return!1;const e=F(n);return!isNaN(Number(e))}function rn(n,e){const t=F(n),r=F(e),i=t.getFullYear()-r.getFullYear(),o=t.getMonth()-r.getMonth();return i*12+o}function bm(n,e,t){const r=Ce(n,t),i=Ce(e,t),o=+r-zn(r),s=+i-zn(i);return Math.round((o-s)/Mi)}function Ni(n){const e=F(n),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function se(n){const e=F(n);return e.setDate(1),e.setHours(0,0,0,0),e}function xl(n){const e=F(n),t=ce(n,0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Di(n,e){const t=ln(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,i=F(n),o=i.getDay(),s=(o<r?-7:0)+6-(o-r);return i.setDate(i.getDate()+s),i.setHours(23,59,59,999),i}function vl(n){return Di(n,{weekStartsOn:1})}const xm={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vm=(n,e,t)=>{let r;const i=xm[n];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function kr(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const km={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wm={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Sm={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mm={date:kr({formats:km,defaultWidth:"full"}),time:kr({formats:wm,defaultWidth:"full"}),dateTime:kr({formats:Sm,defaultWidth:"full"})},Cm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Nm=(n,e,t,r)=>Cm[n];function Bt(n){return(e,t)=>{const r=t?.context?String(t.context):"standalone";let i;if(r==="formatting"&&n.formattingValues){const s=n.defaultFormattingWidth||n.defaultWidth,a=t?.width?String(t.width):s;i=n.formattingValues[a]||n.formattingValues[s]}else{const s=n.defaultWidth,a=t?.width?String(t.width):n.defaultWidth;i=n.values[a]||n.values[s]}const o=n.argumentCallback?n.argumentCallback(e):e;return i[o]}}const Dm={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Em={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Tm={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Om={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Am={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Pm={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Rm=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Im={ordinalNumber:Rm,era:Bt({values:Dm,defaultWidth:"wide"}),quarter:Bt({values:Em,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Bt({values:Tm,defaultWidth:"wide"}),day:Bt({values:Om,defaultWidth:"wide"}),dayPeriod:Bt({values:Am,defaultWidth:"wide",formattingValues:Pm,defaultFormattingWidth:"wide"})};function Ft(n){return(e,t={})=>{const r=t.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],o=e.match(i);if(!o)return null;const s=o[0],a=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(a)?Bm(a,d=>d.test(s)):_m(a,d=>d.test(s));let c;c=n.valueCallback?n.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;const u=e.slice(s.length);return{value:c,rest:u}}}function _m(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function Bm(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function Fm(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const i=r[0],o=e.match(n.parsePattern);if(!o)return null;let s=n.valueCallback?n.valueCallback(o[0]):o[0];s=t.valueCallback?t.valueCallback(s):s;const a=e.slice(i.length);return{value:s,rest:a}}}const zm=/^(\d+)(th|st|nd|rd)?/i,Lm=/\d+/i,jm={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vm={any:[/^b/i,/^(a|c)/i]},Wm={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$m={any:[/1/i,/2/i,/3/i,/4/i]},qm={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Hm={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Jm={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ym={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Um={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Km={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Gm={ordinalNumber:Fm({matchPattern:zm,parsePattern:Lm,valueCallback:n=>parseInt(n,10)}),era:Ft({matchPatterns:jm,defaultMatchWidth:"wide",parsePatterns:Vm,defaultParseWidth:"any"}),quarter:Ft({matchPatterns:Wm,defaultMatchWidth:"wide",parsePatterns:$m,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Ft({matchPatterns:qm,defaultMatchWidth:"wide",parsePatterns:Hm,defaultParseWidth:"any"}),day:Ft({matchPatterns:Jm,defaultMatchWidth:"wide",parsePatterns:Ym,defaultParseWidth:"any"}),dayPeriod:Ft({matchPatterns:Um,defaultMatchWidth:"any",parsePatterns:Km,defaultParseWidth:"any"})},kl={code:"en-US",formatDistance:vm,formatLong:Mm,formatRelative:Nm,localize:Im,match:Gm,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xm(n){const e=F(n);return we(e,xl(e))+1}function wl(n){const e=F(n),t=+ht(e)-+hm(e);return Math.round(t/Mi)+1}function Sl(n,e){const t=F(n),r=t.getFullYear(),i=ln(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=ce(n,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const a=Ce(s,e),l=ce(n,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Ce(l,e);return t.getTime()>=a.getTime()?r+1:t.getTime()>=c.getTime()?r:r-1}function Qm(n,e){const t=ln(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,i=Sl(n,e),o=ce(n,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Ce(o,e)}function Ml(n,e){const t=F(n),r=+Ce(t,e)-+Qm(t,e);return Math.round(r/Mi)+1}function z(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const Be={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return z(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):z(t+1,2)},d(n,e){return z(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];default:return t==="am"?"a.m.":"p.m."}},h(n,e){return z(n.getHours()%12||12,e.length)},H(n,e){return z(n.getHours(),e.length)},m(n,e){return z(n.getMinutes(),e.length)},s(n,e){return z(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),i=Math.trunc(r*Math.pow(10,t-3));return z(i,e.length)}},vt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Zo={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),i=r>0?r:1-r;return t.ordinalNumber(i,{unit:"year"})}return Be.y(n,e)},Y:function(n,e,t,r){const i=Sl(n,r),o=i>0?i:1-i;if(e==="YY"){const s=o%100;return z(s,2)}return e==="Yo"?t.ordinalNumber(o,{unit:"year"}):z(o,e.length)},R:function(n,e){const t=bl(n);return z(t,e.length)},u:function(n,e){const t=n.getFullYear();return z(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return z(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return z(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return Be.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return z(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const i=Ml(n,r);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):z(i,e.length)},I:function(n,e,t){const r=wl(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):z(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Be.d(n,e)},D:function(n,e,t){const r=Xm(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):z(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const i=n.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return z(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const i=n.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return z(o,e.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return z(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const i=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let i;switch(r===12?i=vt.noon:r===0?i=vt.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let i;switch(r>=17?i=vt.evening:r>=12?i=vt.afternoon:r>=4?i=vt.morning:i=vt.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Be.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Be.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):z(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):z(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Be.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Be.s(n,e)},S:function(n,e){return Be.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return ts(r);case"XXXX":case"XX":return Qe(r);default:return Qe(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return ts(r);case"xxxx":case"xx":return Qe(r);default:return Qe(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+es(r,":");default:return"GMT"+Qe(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+es(r,":");default:return"GMT"+Qe(r,":")}},t:function(n,e,t){const r=Math.trunc(n.getTime()/1e3);return z(r,e.length)},T:function(n,e,t){const r=n.getTime();return z(r,e.length)}};function es(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=Math.trunc(r/60),o=r%60;return o===0?t+String(i):t+String(i)+e+z(o,2)}function ts(n,e){return n%60===0?(n>0?"-":"+")+z(Math.abs(n)/60,2):Qe(n,e)}function Qe(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=z(Math.trunc(r/60),2),o=z(r%60,2);return t+i+e+o}const ns=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Cl=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Zm=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],i=t[2];if(!i)return ns(n,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",ns(r,e)).replace("{{time}}",Cl(i,e))},eg={p:Cl,P:Zm},tg=/^D+$/,ng=/^Y+$/,rg=["D","DD","YY","YYYY"];function ig(n){return tg.test(n)}function og(n){return ng.test(n)}function sg(n,e,t){const r=ag(n,e,t);if(console.warn(r),rg.includes(n))throw new RangeError(r)}function ag(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,cg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ug=/^'([^]*?)'?$/,dg=/''/g,fg=/[a-zA-Z]/;function gt(n,e,t){const r=ln(),i=t?.locale??r.locale??kl,o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=F(n);if(!ym(a))throw new RangeError("Invalid time value");let l=e.match(cg).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=eg[d];return h(u,i.formatLong)}return u}).join("").match(lg).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:hg(u)};if(Zo[d])return{isToken:!0,value:u};if(d.match(fg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:i};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!t?.useAdditionalWeekYearTokens&&og(d)||!t?.useAdditionalDayOfYearTokens&&ig(d))&&sg(d,e,String(n));const h=Zo[d[0]];return h(a,d,i.localize,c)}).join("")}function hg(n){const e=n.match(ug);return e?e[1].replace(dg,"'"):n}function pg(n){const e=F(n),t=e.getFullYear(),r=e.getMonth(),i=ce(n,0);return i.setFullYear(t,r+1,0),i.setHours(0,0,0,0),i.getDate()}function mg(n){return Math.trunc(+F(n)/1e3)}function gg(n){const e=F(n),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(0,0,0,0),e}function yg(n,e){return bm(gg(n),se(n),e)+1}function Ur(n,e){const t=F(n),r=F(e);return t.getTime()>r.getTime()}function Nl(n,e){const t=F(n),r=F(e);return+t<+r}function Ei(n,e){const t=F(n),r=F(e);return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()}function bg(n,e){const t=F(n),r=F(e);return t.getFullYear()===r.getFullYear()}function wr(n,e){return ee(n,-e)}function Sr(n,e){const t=F(n),r=t.getFullYear(),i=t.getDate(),o=ce(n,0);o.setFullYear(r,e,15),o.setHours(0,0,0,0);const s=pg(o);return t.setMonth(e,Math.min(i,s)),t}function rs(n,e){const t=F(n);return isNaN(+t)?ce(n,NaN):(t.setFullYear(e),t)}var T=function(){return T=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},T.apply(this,arguments)};function xg(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t}function Dl(n,e,t){for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return n.concat(o||Array.prototype.slice.call(e))}function cn(n){return n.mode==="multiple"}function un(n){return n.mode==="range"}function Zn(n){return n.mode==="single"}var vg={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function kg(n,e){return gt(n,"LLLL y",e)}function wg(n,e){return gt(n,"d",e)}function Sg(n,e){return gt(n,"LLLL",e)}function Mg(n){return"".concat(n)}function Cg(n,e){return gt(n,"cccccc",e)}function Ng(n,e){return gt(n,"yyyy",e)}var Dg=Object.freeze({__proto__:null,formatCaption:kg,formatDay:wg,formatMonthCaption:Sg,formatWeekNumber:Mg,formatWeekdayName:Cg,formatYearCaption:Ng}),Eg=function(n,e,t){return gt(n,"do MMMM (EEEE)",t)},Tg=function(){return"Month: "},Og=function(){return"Go to next month"},Ag=function(){return"Go to previous month"},Pg=function(n,e){return gt(n,"cccc",e)},Rg=function(n){return"Week n. ".concat(n)},Ig=function(){return"Year: "},_g=Object.freeze({__proto__:null,labelDay:Eg,labelMonthDropdown:Tg,labelNext:Og,labelPrevious:Ag,labelWeekNumber:Rg,labelWeekday:Pg,labelYearDropdown:Ig});function Bg(){var n="buttons",e=vg,t=kl,r={},i={},o=1,s={},a=new Date;return{captionLayout:n,classNames:e,formatters:Dg,labels:_g,locale:t,modifiersClassNames:r,modifiers:i,numberOfMonths:o,styles:s,today:a,mode:"default"}}function Fg(n){var e=n.fromYear,t=n.toYear,r=n.fromMonth,i=n.toMonth,o=n.fromDate,s=n.toDate;return r?o=se(r):e&&(o=new Date(e,0,1)),i?s=Ni(i):t&&(s=new Date(t,11,31)),{fromDate:o?At(o):void 0,toDate:s?At(s):void 0}}var El=O.createContext(void 0);function zg(n){var e,t=n.initialProps,r=Bg(),i=Fg(t),o=i.fromDate,s=i.toDate,a=(e=t.captionLayout)!==null&&e!==void 0?e:r.captionLayout;a!=="buttons"&&(!o||!s)&&(a="buttons");var l;(Zn(t)||cn(t)||un(t))&&(l=t.onSelect);var c=T(T(T({},r),t),{captionLayout:a,classNames:T(T({},r.classNames),t.classNames),components:T({},t.components),formatters:T(T({},r.formatters),t.formatters),fromDate:o,labels:T(T({},r.labels),t.labels),mode:t.mode||r.mode,modifiers:T(T({},r.modifiers),t.modifiers),modifiersClassNames:T(T({},r.modifiersClassNames),t.modifiersClassNames),onSelect:l,styles:T(T({},r.styles),t.styles),toDate:s});return b.jsx(El.Provider,{value:c,children:n.children})}function V(){var n=O.useContext(El);if(!n)throw new Error("useDayPicker must be used within a DayPickerProvider.");return n}function Tl(n){var e=V(),t=e.locale,r=e.classNames,i=e.styles,o=e.formatters.formatCaption;return b.jsx("div",{className:r.caption_label,style:i.caption_label,"aria-live":"polite",role:"presentation",id:n.id,children:o(n.displayMonth,{locale:t})})}function Lg(n){return b.jsx("svg",T({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},n,{children:b.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Ol(n){var e,t,r=n.onChange,i=n.value,o=n.children,s=n.caption,a=n.className,l=n.style,c=V(),u=(t=(e=c.components)===null||e===void 0?void 0:e.IconDropdown)!==null&&t!==void 0?t:Lg;return b.jsxs("div",{className:a,style:l,children:[b.jsx("span",{className:c.classNames.vhidden,children:n["aria-label"]}),b.jsx("select",{name:n.name,"aria-label":n["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:i,onChange:r,children:o}),b.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[s,b.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function jg(n){var e,t=V(),r=t.fromDate,i=t.toDate,o=t.styles,s=t.locale,a=t.formatters.formatMonthCaption,l=t.classNames,c=t.components,u=t.labels.labelMonthDropdown;if(!r)return b.jsx(b.Fragment,{});if(!i)return b.jsx(b.Fragment,{});var d=[];if(bg(r,i))for(var h=se(r),f=r.getMonth();f<=i.getMonth();f++)d.push(Sr(h,f));else for(var h=se(new Date),f=0;f<=11;f++)d.push(Sr(h,f));var p=function(m){var y=Number(m.target.value),x=Sr(se(n.displayMonth),y);n.onChange(x)},g=(e=c?.Dropdown)!==null&&e!==void 0?e:Ol;return b.jsx(g,{name:"months","aria-label":u(),className:l.dropdown_month,style:o.dropdown_month,onChange:p,value:n.displayMonth.getMonth(),caption:a(n.displayMonth,{locale:s}),children:d.map(function(m){return b.jsx("option",{value:m.getMonth(),children:a(m,{locale:s})},m.getMonth())})})}function Vg(n){var e,t=n.displayMonth,r=V(),i=r.fromDate,o=r.toDate,s=r.locale,a=r.styles,l=r.classNames,c=r.components,u=r.formatters.formatYearCaption,d=r.labels.labelYearDropdown,h=[];if(!i)return b.jsx(b.Fragment,{});if(!o)return b.jsx(b.Fragment,{});for(var f=i.getFullYear(),p=o.getFullYear(),g=f;g<=p;g++)h.push(rs(xl(new Date),g));var m=function(x){var w=rs(se(t),Number(x.target.value));n.onChange(w)},y=(e=c?.Dropdown)!==null&&e!==void 0?e:Ol;return b.jsx(y,{name:"years","aria-label":d(),className:l.dropdown_year,style:a.dropdown_year,onChange:m,value:t.getFullYear(),caption:u(t,{locale:s}),children:h.map(function(x){return b.jsx("option",{value:x.getFullYear(),children:u(x,{locale:s})},x.getFullYear())})})}function Wg(n,e){var t=O.useState(n),r=t[0],i=t[1],o=e===void 0?r:e;return[o,i]}function $g(n){var e=n.month,t=n.defaultMonth,r=n.today,i=e||t||r||new Date,o=n.toDate,s=n.fromDate,a=n.numberOfMonths,l=a===void 0?1:a;if(o&&rn(o,i)<0){var c=-1*(l-1);i=be(o,c)}return s&&rn(i,s)<0&&(i=s),se(i)}function qg(){var n=V(),e=$g(n),t=Wg(e,n.month),r=t[0],i=t[1],o=function(s){var a;if(!n.disableNavigation){var l=se(s);i(l),(a=n.onMonthChange)===null||a===void 0||a.call(n,l)}};return[r,o]}function Hg(n,e){for(var t=e.reverseMonths,r=e.numberOfMonths,i=se(n),o=se(be(i,r)),s=rn(o,i),a=[],l=0;l<s;l++){var c=be(i,l);a.push(c)}return t&&(a=a.reverse()),a}function Jg(n,e){if(!e.disableNavigation){var t=e.toDate,r=e.pagedNavigation,i=e.numberOfMonths,o=i===void 0?1:i,s=r?o:1,a=se(n);if(!t)return be(a,s);var l=rn(t,n);if(!(l<o))return be(a,s)}}function Yg(n,e){if(!e.disableNavigation){var t=e.fromDate,r=e.pagedNavigation,i=e.numberOfMonths,o=i===void 0?1:i,s=r?o:1,a=se(n);if(!t)return be(a,-s);var l=rn(a,t);if(!(l<=0))return be(a,-s)}}var Al=O.createContext(void 0);function Ug(n){var e=V(),t=qg(),r=t[0],i=t[1],o=Hg(r,e),s=Jg(r,e),a=Yg(r,e),l=function(d){return o.some(function(h){return Ei(d,h)})},c=function(d,h){l(d)||(h&&Nl(d,h)?i(be(d,1+e.numberOfMonths*-1)):i(d))},u={currentMonth:r,displayMonths:o,goToMonth:i,goToDate:c,previousMonth:a,nextMonth:s,isDateDisplayed:l};return b.jsx(Al.Provider,{value:u,children:n.children})}function dn(){var n=O.useContext(Al);if(!n)throw new Error("useNavigation must be used within a NavigationProvider");return n}function is(n){var e,t=V(),r=t.classNames,i=t.styles,o=t.components,s=dn().goToMonth,a=function(u){s(be(u,n.displayIndex?-n.displayIndex:0))},l=(e=o?.CaptionLabel)!==null&&e!==void 0?e:Tl,c=b.jsx(l,{id:n.id,displayMonth:n.displayMonth});return b.jsxs("div",{className:r.caption_dropdowns,style:i.caption_dropdowns,children:[b.jsx("div",{className:r.vhidden,children:c}),b.jsx(jg,{onChange:a,displayMonth:n.displayMonth}),b.jsx(Vg,{onChange:a,displayMonth:n.displayMonth})]})}function Kg(n){return b.jsx("svg",T({width:"16px",height:"16px",viewBox:"0 0 120 120"},n,{children:b.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Gg(n){return b.jsx("svg",T({width:"16px",height:"16px",viewBox:"0 0 120 120"},n,{children:b.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Ln=O.forwardRef(function(n,e){var t=V(),r=t.classNames,i=t.styles,o=[r.button_reset,r.button];n.className&&o.push(n.className);var s=o.join(" "),a=T(T({},i.button_reset),i.button);return n.style&&Object.assign(a,n.style),b.jsx("button",T({},n,{ref:e,type:"button",className:s,style:a}))});function Xg(n){var e,t,r=V(),i=r.dir,o=r.locale,s=r.classNames,a=r.styles,l=r.labels,c=l.labelPrevious,u=l.labelNext,d=r.components;if(!n.nextMonth&&!n.previousMonth)return b.jsx(b.Fragment,{});var h=c(n.previousMonth,{locale:o}),f=[s.nav_button,s.nav_button_previous].join(" "),p=u(n.nextMonth,{locale:o}),g=[s.nav_button,s.nav_button_next].join(" "),m=(e=d?.IconRight)!==null&&e!==void 0?e:Gg,y=(t=d?.IconLeft)!==null&&t!==void 0?t:Kg;return b.jsxs("div",{className:s.nav,style:a.nav,children:[!n.hidePrevious&&b.jsx(Ln,{name:"previous-month","aria-label":h,className:f,style:a.nav_button_previous,disabled:!n.previousMonth,onClick:n.onPreviousClick,children:i==="rtl"?b.jsx(m,{className:s.nav_icon,style:a.nav_icon}):b.jsx(y,{className:s.nav_icon,style:a.nav_icon})}),!n.hideNext&&b.jsx(Ln,{name:"next-month","aria-label":p,className:g,style:a.nav_button_next,disabled:!n.nextMonth,onClick:n.onNextClick,children:i==="rtl"?b.jsx(y,{className:s.nav_icon,style:a.nav_icon}):b.jsx(m,{className:s.nav_icon,style:a.nav_icon})})]})}function ss(n){var e=V().numberOfMonths,t=dn(),r=t.previousMonth,i=t.nextMonth,o=t.goToMonth,s=t.displayMonths,a=s.findIndex(function(p){return Ei(n.displayMonth,p)}),l=a===0,c=a===s.length-1,u=e>1&&(l||!c),d=e>1&&(c||!l),h=function(){r&&o(r)},f=function(){i&&o(i)};return b.jsx(Xg,{displayMonth:n.displayMonth,hideNext:u,hidePrevious:d,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:f})}function Qg(n){var e,t=V(),r=t.classNames,i=t.disableNavigation,o=t.styles,s=t.captionLayout,a=t.components,l=(e=a?.CaptionLabel)!==null&&e!==void 0?e:Tl,c;return i?c=b.jsx(l,{id:n.id,displayMonth:n.displayMonth}):s==="dropdown"?c=b.jsx(is,{displayMonth:n.displayMonth,id:n.id}):s==="dropdown-buttons"?c=b.jsxs(b.Fragment,{children:[b.jsx(is,{displayMonth:n.displayMonth,displayIndex:n.displayIndex,id:n.id}),b.jsx(ss,{displayMonth:n.displayMonth,displayIndex:n.displayIndex,id:n.id})]}):c=b.jsxs(b.Fragment,{children:[b.jsx(l,{id:n.id,displayMonth:n.displayMonth,displayIndex:n.displayIndex}),b.jsx(ss,{displayMonth:n.displayMonth,id:n.id})]}),b.jsx("div",{className:r.caption,style:o.caption,children:c})}function Zg(n){var e=V(),t=e.footer,r=e.styles,i=e.classNames.tfoot;return t?b.jsx("tfoot",{className:i,style:r.tfoot,children:b.jsx("tr",{children:b.jsx("td",{colSpan:8,children:t})})}):b.jsx(b.Fragment,{})}function ey(n,e,t){for(var r=t?ht(new Date):Ce(new Date,{locale:n,weekStartsOn:e}),i=[],o=0;o<7;o++){var s=ee(r,o);i.push(s)}return i}function ty(){var n=V(),e=n.classNames,t=n.styles,r=n.showWeekNumber,i=n.locale,o=n.weekStartsOn,s=n.ISOWeek,a=n.formatters.formatWeekdayName,l=n.labels.labelWeekday,c=ey(i,o,s);return b.jsxs("tr",{style:t.head_row,className:e.head_row,children:[r&&b.jsx("td",{style:t.head_cell,className:e.head_cell}),c.map(function(u,d){return b.jsx("th",{scope:"col",className:e.head_cell,style:t.head_cell,"aria-label":l(u,{locale:i}),children:a(u,{locale:i})},d)})]})}function ny(){var n,e=V(),t=e.classNames,r=e.styles,i=e.components,o=(n=i?.HeadRow)!==null&&n!==void 0?n:ty;return b.jsx("thead",{style:r.head,className:t.head,children:b.jsx(o,{})})}function ry(n){var e=V(),t=e.locale,r=e.formatters.formatDay;return b.jsx(b.Fragment,{children:r(n.date,{locale:t})})}var Ti=O.createContext(void 0);function iy(n){if(!cn(n.initialProps)){var e={selected:void 0,modifiers:{disabled:[]}};return b.jsx(Ti.Provider,{value:e,children:n.children})}return b.jsx(oy,{initialProps:n.initialProps,children:n.children})}function oy(n){var e=n.initialProps,t=n.children,r=e.selected,i=e.min,o=e.max,s=function(c,u,d){var h,f;(h=e.onDayClick)===null||h===void 0||h.call(e,c,u,d);var p=!!(u.selected&&i&&r?.length===i);if(!p){var g=!!(!u.selected&&o&&r?.length===o);if(!g){var m=r?Dl([],r):[];if(u.selected){var y=m.findIndex(function(x){return ie(c,x)});m.splice(y,1)}else m.push(c);(f=e.onSelect)===null||f===void 0||f.call(e,m,c,u,d)}}},a={disabled:[]};r&&a.disabled.push(function(c){var u=o&&r.length>o-1,d=r.some(function(h){return ie(h,c)});return!!(u&&!d)});var l={selected:r,onDayClick:s,modifiers:a};return b.jsx(Ti.Provider,{value:l,children:t})}function Oi(){var n=O.useContext(Ti);if(!n)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return n}function sy(n,e){var t=e||{},r=t.from,i=t.to;return r&&i?ie(i,n)&&ie(r,n)?void 0:ie(i,n)?{from:i,to:void 0}:ie(r,n)?void 0:Ur(r,n)?{from:n,to:i}:{from:r,to:n}:i?Ur(n,i)?{from:i,to:n}:{from:n,to:i}:r?Nl(n,r)?{from:n,to:r}:{from:r,to:n}:{from:n,to:void 0}}var Ai=O.createContext(void 0);function ay(n){if(!un(n.initialProps)){var e={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return b.jsx(Ai.Provider,{value:e,children:n.children})}return b.jsx(ly,{initialProps:n.initialProps,children:n.children})}function ly(n){var e=n.initialProps,t=n.children,r=e.selected,i=r||{},o=i.from,s=i.to,a=e.min,l=e.max,c=function(f,p,g){var m,y;(m=e.onDayClick)===null||m===void 0||m.call(e,f,p,g);var x=sy(f,r);(y=e.onSelect)===null||y===void 0||y.call(e,x,f,p,g)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(u.range_start=[o],s?(u.range_end=[s],ie(o,s)||(u.range_middle=[{after:o,before:s}])):u.range_end=[o]):s&&(u.range_start=[s],u.range_end=[s]),a&&(o&&!s&&u.disabled.push({after:wr(o,a-1),before:ee(o,a-1)}),o&&s&&u.disabled.push({after:o,before:ee(o,a-1)}),!o&&s&&u.disabled.push({after:wr(s,a-1),before:ee(s,a-1)})),l){if(o&&!s&&(u.disabled.push({before:ee(o,-l+1)}),u.disabled.push({after:ee(o,l-1)})),o&&s){var d=we(s,o)+1,h=l-d;u.disabled.push({before:wr(o,h)}),u.disabled.push({after:ee(s,h)})}!o&&s&&(u.disabled.push({before:ee(s,-l+1)}),u.disabled.push({after:ee(s,l-1)}))}return b.jsx(Ai.Provider,{value:{selected:r,onDayClick:c,modifiers:u},children:t})}function Pi(){var n=O.useContext(Ai);if(!n)throw new Error("useSelectRange must be used within a SelectRangeProvider");return n}function Sn(n){return Array.isArray(n)?Dl([],n):n!==void 0?[n]:[]}function cy(n){var e={};return Object.entries(n).forEach(function(t){var r=t[0],i=t[1];e[r]=Sn(i)}),e}var xe;(function(n){n.Outside="outside",n.Disabled="disabled",n.Selected="selected",n.Hidden="hidden",n.Today="today",n.RangeStart="range_start",n.RangeEnd="range_end",n.RangeMiddle="range_middle"})(xe||(xe={}));var uy=xe.Selected,Te=xe.Disabled,dy=xe.Hidden,fy=xe.Today,Mr=xe.RangeEnd,Cr=xe.RangeMiddle,Nr=xe.RangeStart,hy=xe.Outside;function py(n,e,t){var r,i=(r={},r[uy]=Sn(n.selected),r[Te]=Sn(n.disabled),r[dy]=Sn(n.hidden),r[fy]=[n.today],r[Mr]=[],r[Cr]=[],r[Nr]=[],r[hy]=[],r);return n.fromDate&&i[Te].push({before:n.fromDate}),n.toDate&&i[Te].push({after:n.toDate}),cn(n)?i[Te]=i[Te].concat(e.modifiers[Te]):un(n)&&(i[Te]=i[Te].concat(t.modifiers[Te]),i[Nr]=t.modifiers[Nr],i[Cr]=t.modifiers[Cr],i[Mr]=t.modifiers[Mr]),i}var Pl=O.createContext(void 0);function my(n){var e=V(),t=Oi(),r=Pi(),i=py(e,t,r),o=cy(e.modifiers),s=T(T({},i),o);return b.jsx(Pl.Provider,{value:s,children:n.children})}function Rl(){var n=O.useContext(Pl);if(!n)throw new Error("useModifiers must be used within a ModifiersProvider");return n}function gy(n){return!!(n&&typeof n=="object"&&"before"in n&&"after"in n)}function yy(n){return!!(n&&typeof n=="object"&&"from"in n)}function by(n){return!!(n&&typeof n=="object"&&"after"in n)}function xy(n){return!!(n&&typeof n=="object"&&"before"in n)}function vy(n){return!!(n&&typeof n=="object"&&"dayOfWeek"in n)}function ky(n,e){var t,r=e.from,i=e.to;if(r&&i){var o=we(i,r)<0;o&&(t=[i,r],r=t[0],i=t[1]);var s=we(n,r)>=0&&we(i,n)>=0;return s}return i?ie(i,n):r?ie(r,n):!1}function wy(n){return Ci(n)}function Sy(n){return Array.isArray(n)&&n.every(Ci)}function My(n,e){return e.some(function(t){if(typeof t=="boolean")return t;if(wy(t))return ie(n,t);if(Sy(t))return t.includes(n);if(yy(t))return ky(n,t);if(vy(t))return t.dayOfWeek.includes(n.getDay());if(gy(t)){var r=we(t.before,n),i=we(t.after,n),o=r>0,s=i<0,a=Ur(t.before,t.after);return a?s&&o:o||s}return by(t)?we(n,t.after)>0:xy(t)?we(t.before,n)>0:typeof t=="function"?t(n):!1})}function Ri(n,e,t){var r=Object.keys(e).reduce(function(o,s){var a=e[s];return My(n,a)&&o.push(s),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),t&&!Ei(n,t)&&(i.outside=!0),i}function Cy(n,e){for(var t=se(n[0]),r=Ni(n[n.length-1]),i,o,s=t;s<=r;){var a=Ri(s,e),l=!a.disabled&&!a.hidden;if(!l){s=ee(s,1);continue}if(a.selected)return s;a.today&&!o&&(o=s),i||(i=s),s=ee(s,1)}return o||i}var Ny=365;function Il(n,e){var t=e.moveBy,r=e.direction,i=e.context,o=e.modifiers,s=e.retry,a=s===void 0?{count:0,lastFocused:n}:s,l=i.weekStartsOn,c=i.fromDate,u=i.toDate,d=i.locale,h={day:ee,week:Yr,month:be,year:pm,startOfWeek:function(m){return i.ISOWeek?ht(m):Ce(m,{locale:d,weekStartsOn:l})},endOfWeek:function(m){return i.ISOWeek?vl(m):Di(m,{locale:d,weekStartsOn:l})}},f=h[t](n,r==="after"?1:-1);r==="before"&&c?f=mm([c,f]):r==="after"&&u&&(f=gm([u,f]));var p=!0;if(o){var g=Ri(f,o);p=!g.disabled&&!g.hidden}return p?f:a.count>Ny?a.lastFocused:Il(f,{moveBy:t,direction:r,context:i,modifiers:o,retry:T(T({},a),{count:a.count+1})})}var _l=O.createContext(void 0);function Dy(n){var e=dn(),t=Rl(),r=O.useState(),i=r[0],o=r[1],s=O.useState(),a=s[0],l=s[1],c=Cy(e.displayMonths,t),u=i??(a&&e.isDateDisplayed(a))?a:c,d=function(){l(i),o(void 0)},h=function(m){o(m)},f=V(),p=function(m,y){if(i){var x=Il(i,{moveBy:m,direction:y,context:f,modifiers:t});ie(i,x)||(e.goToDate(x,i),h(x))}},g={focusedDay:i,focusTarget:u,blur:d,focus:h,focusDayAfter:function(){return p("day","after")},focusDayBefore:function(){return p("day","before")},focusWeekAfter:function(){return p("week","after")},focusWeekBefore:function(){return p("week","before")},focusMonthBefore:function(){return p("month","before")},focusMonthAfter:function(){return p("month","after")},focusYearBefore:function(){return p("year","before")},focusYearAfter:function(){return p("year","after")},focusStartOfWeek:function(){return p("startOfWeek","before")},focusEndOfWeek:function(){return p("endOfWeek","after")}};return b.jsx(_l.Provider,{value:g,children:n.children})}function Ii(){var n=O.useContext(_l);if(!n)throw new Error("useFocusContext must be used within a FocusProvider");return n}function Ey(n,e){var t=Rl(),r=Ri(n,t,e);return r}var _i=O.createContext(void 0);function Ty(n){if(!Zn(n.initialProps)){var e={selected:void 0};return b.jsx(_i.Provider,{value:e,children:n.children})}return b.jsx(Oy,{initialProps:n.initialProps,children:n.children})}function Oy(n){var e=n.initialProps,t=n.children,r=function(o,s,a){var l,c,u;if((l=e.onDayClick)===null||l===void 0||l.call(e,o,s,a),s.selected&&!e.required){(c=e.onSelect)===null||c===void 0||c.call(e,void 0,o,s,a);return}(u=e.onSelect)===null||u===void 0||u.call(e,o,o,s,a)},i={selected:e.selected,onDayClick:r};return b.jsx(_i.Provider,{value:i,children:t})}function Bl(){var n=O.useContext(_i);if(!n)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return n}function Ay(n,e){var t=V(),r=Bl(),i=Oi(),o=Pi(),s=Ii(),a=s.focusDayAfter,l=s.focusDayBefore,c=s.focusWeekAfter,u=s.focusWeekBefore,d=s.blur,h=s.focus,f=s.focusMonthBefore,p=s.focusMonthAfter,g=s.focusYearBefore,m=s.focusYearAfter,y=s.focusStartOfWeek,x=s.focusEndOfWeek,w=function(A){var E,er,tr,nr;Zn(t)?(E=r.onDayClick)===null||E===void 0||E.call(r,n,e,A):cn(t)?(er=i.onDayClick)===null||er===void 0||er.call(i,n,e,A):un(t)?(tr=o.onDayClick)===null||tr===void 0||tr.call(o,n,e,A):(nr=t.onDayClick)===null||nr===void 0||nr.call(t,n,e,A)},C=function(A){var E;h(n),(E=t.onDayFocus)===null||E===void 0||E.call(t,n,e,A)},k=function(A){var E;d(),(E=t.onDayBlur)===null||E===void 0||E.call(t,n,e,A)},P=function(A){var E;(E=t.onDayMouseEnter)===null||E===void 0||E.call(t,n,e,A)},M=function(A){var E;(E=t.onDayMouseLeave)===null||E===void 0||E.call(t,n,e,A)},R=function(A){var E;(E=t.onDayPointerEnter)===null||E===void 0||E.call(t,n,e,A)},_=function(A){var E;(E=t.onDayPointerLeave)===null||E===void 0||E.call(t,n,e,A)},re=function(A){var E;(E=t.onDayTouchCancel)===null||E===void 0||E.call(t,n,e,A)},yt=function(A){var E;(E=t.onDayTouchEnd)===null||E===void 0||E.call(t,n,e,A)},De=function(A){var E;(E=t.onDayTouchMove)===null||E===void 0||E.call(t,n,e,A)},_e=function(A){var E;(E=t.onDayTouchStart)===null||E===void 0||E.call(t,n,e,A)},ke=function(A){var E;(E=t.onDayKeyUp)===null||E===void 0||E.call(t,n,e,A)},pe=function(A){var E;switch(A.key){case"ArrowLeft":A.preventDefault(),A.stopPropagation(),t.dir==="rtl"?a():l();break;case"ArrowRight":A.preventDefault(),A.stopPropagation(),t.dir==="rtl"?l():a();break;case"ArrowDown":A.preventDefault(),A.stopPropagation(),c();break;case"ArrowUp":A.preventDefault(),A.stopPropagation(),u();break;case"PageUp":A.preventDefault(),A.stopPropagation(),A.shiftKey?g():f();break;case"PageDown":A.preventDefault(),A.stopPropagation(),A.shiftKey?m():p();break;case"Home":A.preventDefault(),A.stopPropagation(),y();break;case"End":A.preventDefault(),A.stopPropagation(),x();break}(E=t.onDayKeyDown)===null||E===void 0||E.call(t,n,e,A)},Fl={onClick:w,onFocus:C,onBlur:k,onKeyDown:pe,onKeyUp:ke,onMouseEnter:P,onMouseLeave:M,onPointerEnter:R,onPointerLeave:_,onTouchCancel:re,onTouchEnd:yt,onTouchMove:De,onTouchStart:_e};return Fl}function Py(){var n=V(),e=Bl(),t=Oi(),r=Pi(),i=Zn(n)?e.selected:cn(n)?t.selected:un(n)?r.selected:void 0;return i}function Ry(n){return Object.values(xe).includes(n)}function Iy(n,e){var t=[n.classNames.day];return Object.keys(e).forEach(function(r){var i=n.modifiersClassNames[r];if(i)t.push(i);else if(Ry(r)){var o=n.classNames["day_".concat(r)];o&&t.push(o)}}),t}function _y(n,e){var t=T({},n.styles.day);return Object.keys(e).forEach(function(r){var i;t=T(T({},t),(i=n.modifiersStyles)===null||i===void 0?void 0:i[r])}),t}function By(n,e,t){var r,i,o,s=V(),a=Ii(),l=Ey(n,e),c=Ay(n,l),u=Py(),d=!!(s.onDayClick||s.mode!=="default");O.useEffect(function(){var P;l.outside||a.focusedDay&&d&&ie(a.focusedDay,n)&&((P=t.current)===null||P===void 0||P.focus())},[a.focusedDay,n,t,d,l.outside]);var h=Iy(s,l).join(" "),f=_y(s,l),p=!!(l.outside&&!s.showOutsideDays||l.hidden),g=(o=(i=s.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:ry,m=b.jsx(g,{date:n,displayMonth:e,activeModifiers:l}),y={style:f,className:h,children:m,role:"gridcell"},x=a.focusTarget&&ie(a.focusTarget,n)&&!l.outside,w=a.focusedDay&&ie(a.focusedDay,n),C=T(T(T({},y),(r={disabled:l.disabled,role:"gridcell"},r["aria-selected"]=l.selected,r.tabIndex=w||x?0:-1,r)),c),k={isButton:d,isHidden:p,activeModifiers:l,selectedDays:u,buttonProps:C,divProps:y};return k}function Fy(n){var e=O.useRef(null),t=By(n.date,n.displayMonth,e);return t.isHidden?b.jsx("div",{role:"gridcell"}):t.isButton?b.jsx(Ln,T({name:"day",ref:e},t.buttonProps)):b.jsx("div",T({},t.divProps))}function zy(n){var e=n.number,t=n.dates,r=V(),i=r.onWeekNumberClick,o=r.styles,s=r.classNames,a=r.locale,l=r.labels.labelWeekNumber,c=r.formatters.formatWeekNumber,u=c(Number(e),{locale:a});if(!i)return b.jsx("span",{className:s.weeknumber,style:o.weeknumber,children:u});var d=l(Number(e),{locale:a}),h=function(f){i(e,t,f)};return b.jsx(Ln,{name:"week-number","aria-label":d,className:s.weeknumber,style:o.weeknumber,onClick:h,children:u})}function Ly(n){var e,t,r=V(),i=r.styles,o=r.classNames,s=r.showWeekNumber,a=r.components,l=(e=a?.Day)!==null&&e!==void 0?e:Fy,c=(t=a?.WeekNumber)!==null&&t!==void 0?t:zy,u;return s&&(u=b.jsx("td",{className:o.cell,style:i.cell,children:b.jsx(c,{number:n.weekNumber,dates:n.dates})})),b.jsxs("tr",{className:o.row,style:i.row,children:[u,n.dates.map(function(d){return b.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:b.jsx(l,{displayMonth:n.displayMonth,date:d})},mg(d))})]})}function as(n,e,t){for(var r=t?.ISOWeek?vl(e):Di(e,t),i=t?.ISOWeek?ht(n):Ce(n,t),o=we(r,i),s=[],a=0;a<=o;a++)s.push(ee(i,a));var l=s.reduce(function(c,u){var d=t?.ISOWeek?wl(u):Ml(u,t),h=c.find(function(f){return f.weekNumber===d});return h?(h.dates.push(u),c):(c.push({weekNumber:d,dates:[u]}),c)},[]);return l}function jy(n,e){var t=as(se(n),Ni(n),e);if(e?.useFixedWeeks){var r=yg(n,e);if(r<6){var i=t[t.length-1],o=i.dates[i.dates.length-1],s=Yr(o,6-r),a=as(Yr(o,1),s,e);t.push.apply(t,a)}}return t}function Vy(n){var e,t,r,i=V(),o=i.locale,s=i.classNames,a=i.styles,l=i.hideHead,c=i.fixedWeeks,u=i.components,d=i.weekStartsOn,h=i.firstWeekContainsDate,f=i.ISOWeek,p=jy(n.displayMonth,{useFixedWeeks:!!c,ISOWeek:f,locale:o,weekStartsOn:d,firstWeekContainsDate:h}),g=(e=u?.Head)!==null&&e!==void 0?e:ny,m=(t=u?.Row)!==null&&t!==void 0?t:Ly,y=(r=u?.Footer)!==null&&r!==void 0?r:Zg;return b.jsxs("table",{id:n.id,className:s.table,style:a.table,role:"grid","aria-labelledby":n["aria-labelledby"],children:[!l&&b.jsx(g,{}),b.jsx("tbody",{className:s.tbody,style:a.tbody,children:p.map(function(x){return b.jsx(m,{displayMonth:n.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),b.jsx(y,{displayMonth:n.displayMonth})]})}function Wy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $y=Wy()?O.useLayoutEffect:O.useEffect,Dr=!1,qy=0;function ls(){return"react-day-picker-".concat(++qy)}function Hy(n){var e,t=n??(Dr?ls():null),r=O.useState(t),i=r[0],o=r[1];return $y(function(){i===null&&o(ls())},[]),O.useEffect(function(){Dr===!1&&(Dr=!0)},[]),(e=n??i)!==null&&e!==void 0?e:void 0}function Jy(n){var e,t,r=V(),i=r.dir,o=r.classNames,s=r.styles,a=r.components,l=dn().displayMonths,c=Hy(r.id?"".concat(r.id,"-").concat(n.displayIndex):void 0),u=r.id?"".concat(r.id,"-grid-").concat(n.displayIndex):void 0,d=[o.month],h=s.month,f=n.displayIndex===0,p=n.displayIndex===l.length-1,g=!f&&!p;i==="rtl"&&(e=[f,p],p=e[0],f=e[1]),f&&(d.push(o.caption_start),h=T(T({},h),s.caption_start)),p&&(d.push(o.caption_end),h=T(T({},h),s.caption_end)),g&&(d.push(o.caption_between),h=T(T({},h),s.caption_between));var m=(t=a?.Caption)!==null&&t!==void 0?t:Qg;return b.jsxs("div",{className:d.join(" "),style:h,children:[b.jsx(m,{id:c,displayMonth:n.displayMonth,displayIndex:n.displayIndex}),b.jsx(Vy,{id:u,"aria-labelledby":c,displayMonth:n.displayMonth})]},n.displayIndex)}function Yy(n){var e=V(),t=e.classNames,r=e.styles;return b.jsx("div",{className:t.months,style:r.months,children:n.children})}function Uy(n){var e,t,r=n.initialProps,i=V(),o=Ii(),s=dn(),a=O.useState(!1),l=a[0],c=a[1];O.useEffect(function(){i.initialFocus&&o.focusTarget&&(l||(o.focus(o.focusTarget),c(!0)))},[i.initialFocus,l,o.focus,o.focusTarget,o]);var u=[i.classNames.root,i.className];i.numberOfMonths>1&&u.push(i.classNames.multiple_months),i.showWeekNumber&&u.push(i.classNames.with_weeknumber);var d=T(T({},i.styles.root),i.style),h=Object.keys(r).filter(function(p){return p.startsWith("data-")}).reduce(function(p,g){var m;return T(T({},p),(m={},m[g]=r[g],m))},{}),f=(t=(e=r.components)===null||e===void 0?void 0:e.Months)!==null&&t!==void 0?t:Yy;return b.jsx("div",T({className:u.join(" "),style:d,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:b.jsx(f,{children:s.displayMonths.map(function(p,g){return b.jsx(Jy,{displayIndex:g,displayMonth:p},g)})})}))}function Ky(n){var e=n.children,t=xg(n,["children"]);return b.jsx(zg,{initialProps:t,children:b.jsx(Ug,{children:b.jsx(Ty,{initialProps:t,children:b.jsx(iy,{initialProps:t,children:b.jsx(ay,{initialProps:t,children:b.jsx(my,{children:b.jsx(Dy,{children:e})})})})})})})}function Gy(n){return b.jsx(Ky,T({},n,{children:b.jsx(Uy,{initialProps:n})}))}function vb(n){const e=us.c(20);let t,r,i,o;e[0]!==n?({className:t,classNames:r,showOutsideDays:o,...i}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o):(t=e[1],r=e[2],i=e[3],o=e[4]);const s=o===void 0?!0:o;let a;e[5]!==t?(a=et("p-3",t),e[5]=t,e[6]=a):a=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=et(Bi({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),e[7]=l):l=e[7];const c=i.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md";let u;e[8]!==c?(u=et("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",c),e[8]=c,e[9]=u):u=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=et(Bi({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),e[10]=d):d=e[10];let h;e[11]!==r||e[12]!==u?(h={months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:l,nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:u,day:d,day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...r},e[11]=r,e[12]=u,e[13]=h):h=e[13];let f;e[14]===Symbol.for("react.memo_cache_sentinel")?(f={IconLeft:Qy,IconRight:Xy},e[14]=f):f=e[14];let p;return e[15]!==i||e[16]!==s||e[17]!==a||e[18]!==h?(p=b.jsx(Gy,{showOutsideDays:s,className:a,classNames:h,components:f,...i}),e[15]=i,e[16]=s,e[17]=a,e[18]=h,e[19]=p):p=e[19],p}function Xy(n){const{className:e,...t}=n;return b.jsx(Wl,{className:et("size-4",e),...t})}function Qy(n){const{className:e,...t}=n;return b.jsx(Vl,{className:et("size-4",e),...t})}export{rb as $,db as A,ub as B,vb as C,q as D,wi as E,v as F,hb as G,$f as H,rh as I,ib as J,Ka as K,eh as L,xb as M,ep as N,Qh as O,Ke as P,tn as Q,sm as R,S,I as T,ab as U,sb as V,J as W,ob as X,nn as Y,Xh as Z,nb as _,ve as a,yb as b,cm as c,Jp as d,Ne as e,ge as f,lm as g,pb as h,bb as i,em as j,Tc as k,Gd as l,D as m,B as n,Tn as o,bi as p,L as q,N as r,lb as s,$l as t,gb as u,Uf as v,fb as w,Rh as x,mb as y,cb as z};
|
|
102
|
+
${p}`}}),l}function Zh(n,e,t={}){const{state:r}=e,{doc:i,tr:o}=r,s=n;i.descendants((a,l)=>{const c=o.mapping.map(l),u=o.mapping.map(l)+a.nodeSize;let d=null;if(a.marks.forEach(f=>{if(f!==s)return!1;d=f}),!d)return;let h=!1;if(Object.keys(t).forEach(f=>{t[f]!==d.attrs[f]&&(h=!0)}),h){const f=n.type.create({...n.attrs,...t});o.removeMark(c,u,n.type),o.addMark(c,u,f)}}),o.docChanged&&e.view.dispatch(o)}var ep=class fl extends xi{constructor(){super(...arguments),this.type="node"}static create(e={}){const t=typeof e=="function"?e():e;return new fl(t)}configure(e){return super.configure(e)}extend(e){const t=typeof e=="function"?e():e;return super.extend(t)}},tp=class{constructor(n,e,t){this.isDragging=!1,this.component=n,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...t},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(n){var e,t,r,i,o,s,a;const{view:l}=this.editor,c=n.target,u=c.nodeType===3?(e=c.parentElement)==null?void 0:e.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(t=this.contentDOM)!=null&&t.contains(c)||!u)return;let d=0,h=0;if(this.dom!==u){const x=this.dom.getBoundingClientRect(),w=u.getBoundingClientRect(),C=(i=n.offsetX)!=null?i:(r=n.nativeEvent)==null?void 0:r.offsetX,k=(s=n.offsetY)!=null?s:(o=n.nativeEvent)==null?void 0:o.offsetY;d=w.x-x.x+C,h=w.y-x.y+k}const f=this.dom.cloneNode(!0);try{const x=this.dom.getBoundingClientRect();f.style.width=`${Math.round(x.width)}px`,f.style.height=`${Math.round(x.height)}px`,f.style.boxSizing="border-box",f.style.pointerEvents="none"}catch{}let p=null;try{p=document.createElement("div"),p.style.position="absolute",p.style.top="-9999px",p.style.left="-9999px",p.style.pointerEvents="none",p.appendChild(f),document.body.appendChild(p),(a=n.dataTransfer)==null||a.setDragImage(f,d,h)}finally{p&&setTimeout(()=>{try{p?.remove()}catch{}},0)}const g=this.getPos();if(typeof g!="number")return;const m=D.create(l.state.doc,g),y=l.state.tr.setSelection(m);l.dispatch(y)}stopEvent(n){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:n});const t=n.target;if(!(this.dom.contains(t)&&!((e=this.contentDOM)!=null&&e.contains(t))))return!1;const i=n.type.startsWith("drag"),o=n.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(t.tagName)||t.isContentEditable)&&!o&&!i)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,c=!!this.node.type.spec.draggable,u=D.isSelectable(this.node),d=n.type==="copy",h=n.type==="paste",f=n.type==="cut",p=n.type==="mousedown";if(!c&&u&&i&&n.target===this.dom&&n.preventDefault(),c&&i&&!l&&n.target===this.dom)return n.preventDefault(),!1;if(c&&a&&!l&&p){const g=t.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||o||d||h||f||p&&u)}ignoreMutation(n){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:n}):this.node.isLeaf||this.node.isAtom?!0:n.type==="selection"||this.dom.contains(n.target)&&n.type==="childList"&&(Zt()||$r())&&this.editor.isFocused&&[...Array.from(n.addedNodes),...Array.from(n.removedNodes)].every(t=>t.isContentEditable)?!1:this.contentDOM===n.target&&n.type==="attributes"?!0:!this.contentDOM.contains(n.target)}updateAttributes(n){this.editor.commands.command(({tr:e})=>{const t=this.getPos();return typeof t!="number"?!1:(e.setNodeMarkup(t,void 0,{...this.node.attrs,...n}),!0)})}deleteNode(){const n=this.getPos();if(typeof n!="number")return;const e=n+this.node.nodeSize;this.editor.commands.deleteRange({from:n,to:e})}};function mb(n){return new _h({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:i})=>{const o=L(n.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=t.to;if(a){const u=l.search(/\S/),d=t.from+l.indexOf(a),h=d+a.length;if(Ka(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(m=>m===n.type&&m!==p.mark.type)).filter(p=>p.to>d).length)return null;h<t.to&&s.delete(h,t.to),d>t.from&&s.delete(t.from+u,d),c=t.from+u+a.length,s.addMark(t.from+u,c,n.type.create(o||{})),s.removeStoredMark(n.type)}}})}const{getOwnPropertyNames:np,getOwnPropertySymbols:rp}=Object,{hasOwnProperty:ip}=Object.prototype;function vr(n,e){return function(r,i,o){return n(r,i,o)&&e(r,i,o)}}function xn(n){return function(t,r,i){if(!t||!r||typeof t!="object"||typeof r!="object")return n(t,r,i);const{cache:o}=i,s=o.get(t),a=o.get(r);if(s&&a)return s===r&&a===t;o.set(t,r),o.set(r,t);const l=n(t,r,i);return o.delete(t),o.delete(r),l}}function op(n){return n?.[Symbol.toStringTag]}function Jo(n){return np(n).concat(rp(n))}const sp=Object.hasOwn||((n,e)=>ip.call(n,e));function mt(n,e){return n===e||!n&&!e&&n!==n&&e!==e}const ap="__v",lp="__o",cp="_owner",{getOwnPropertyDescriptor:Yo,keys:Uo}=Object;function up(n,e){return n.byteLength===e.byteLength&&Fn(new Uint8Array(n),new Uint8Array(e))}function dp(n,e,t){let r=n.length;if(e.length!==r)return!1;for(;r-- >0;)if(!t.equals(n[r],e[r],r,r,n,e,t))return!1;return!0}function fp(n,e){return n.byteLength===e.byteLength&&Fn(new Uint8Array(n.buffer,n.byteOffset,n.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function hp(n,e){return mt(n.getTime(),e.getTime())}function pp(n,e){return n.name===e.name&&n.message===e.message&&n.cause===e.cause&&n.stack===e.stack}function mp(n,e){return n===e}function Ko(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),o=n.entries();let s,a,l=0;for(;(s=o.next())&&!s.done;){const c=e.entries();let u=!1,d=0;for(;(a=c.next())&&!a.done;){if(i[d]){d++;continue}const h=s.value,f=a.value;if(t.equals(h[0],f[0],l,d,n,e,t)&&t.equals(h[1],f[1],h[0],f[0],n,e,t)){u=i[d]=!0;break}d++}if(!u)return!1;l++}return!0}const gp=mt;function yp(n,e,t){const r=Uo(n);let i=r.length;if(Uo(e).length!==i)return!1;for(;i-- >0;)if(!hl(n,e,t,r[i]))return!1;return!0}function _t(n,e,t){const r=Jo(n);let i=r.length;if(Jo(e).length!==i)return!1;let o,s,a;for(;i-- >0;)if(o=r[i],!hl(n,e,t,o)||(s=Yo(n,o),a=Yo(e,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function bp(n,e){return mt(n.valueOf(),e.valueOf())}function xp(n,e){return n.source===e.source&&n.flags===e.flags}function Go(n,e,t){const r=n.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),o=n.values();let s,a;for(;(s=o.next())&&!s.done;){const l=e.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!i[u]&&t.equals(s.value,a.value,s.value,a.value,n,e,t)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function Fn(n,e){let t=n.byteLength;if(e.byteLength!==t||n.byteOffset!==e.byteOffset)return!1;for(;t-- >0;)if(n[t]!==e[t])return!1;return!0}function vp(n,e){return n.hostname===e.hostname&&n.pathname===e.pathname&&n.protocol===e.protocol&&n.port===e.port&&n.hash===e.hash&&n.username===e.username&&n.password===e.password}function hl(n,e,t,r){return(r===cp||r===lp||r===ap)&&(n.$$typeof||e.$$typeof)?!0:sp(e,r)&&t.equals(n[r],e[r],r,r,n,e,t)}const kp="[object ArrayBuffer]",wp="[object Arguments]",Sp="[object Boolean]",Mp="[object DataView]",Cp="[object Date]",Np="[object Error]",Dp="[object Map]",Ep="[object Number]",Tp="[object Object]",Op="[object RegExp]",Ap="[object Set]",Pp="[object String]",Rp={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Ip="[object URL]",_p=Object.prototype.toString;function Bp({areArrayBuffersEqual:n,areArraysEqual:e,areDataViewsEqual:t,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:f,unknownTagComparators:p}){return function(m,y,x){if(m===y)return!0;if(m==null||y==null)return!1;const w=typeof m;if(w!==typeof y)return!1;if(w!=="object")return w==="number"?a(m,y,x):w==="function"?o(m,y,x):!1;const C=m.constructor;if(C!==y.constructor)return!1;if(C===Object)return l(m,y,x);if(Array.isArray(m))return e(m,y,x);if(C===Date)return r(m,y,x);if(C===RegExp)return u(m,y,x);if(C===Map)return s(m,y,x);if(C===Set)return d(m,y,x);const k=_p.call(m);if(k===Cp)return r(m,y,x);if(k===Op)return u(m,y,x);if(k===Dp)return s(m,y,x);if(k===Ap)return d(m,y,x);if(k===Tp)return typeof m.then!="function"&&typeof y.then!="function"&&l(m,y,x);if(k===Ip)return f(m,y,x);if(k===Np)return i(m,y,x);if(k===wp)return l(m,y,x);if(Rp[k])return h(m,y,x);if(k===kp)return n(m,y,x);if(k===Mp)return t(m,y,x);if(k===Sp||k===Ep||k===Pp)return c(m,y,x);if(p){let P=p[k];if(!P){const M=op(m);M&&(P=p[M])}if(P)return P(m,y,x)}return!1}}function Fp({circular:n,createCustomConfig:e,strict:t}){let r={areArrayBuffersEqual:up,areArraysEqual:t?_t:dp,areDataViewsEqual:fp,areDatesEqual:hp,areErrorsEqual:pp,areFunctionsEqual:mp,areMapsEqual:t?vr(Ko,_t):Ko,areNumbersEqual:gp,areObjectsEqual:t?_t:yp,arePrimitiveWrappersEqual:bp,areRegExpsEqual:xp,areSetsEqual:t?vr(Go,_t):Go,areTypedArraysEqual:t?vr(Fn,_t):Fn,areUrlsEqual:vp,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),n){const i=xn(r.areArraysEqual),o=xn(r.areMapsEqual),s=xn(r.areObjectsEqual),a=xn(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:a})}return r}function zp(n){return function(e,t,r,i,o,s,a){return n(e,t,a)}}function Lp({circular:n,comparator:e,createState:t,equals:r,strict:i}){if(t)return function(a,l){const{cache:c=n?new WeakMap:void 0,meta:u}=t();return e(a,l,{cache:c,equals:r,meta:u,strict:i})};if(n)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return e(a,l,o)}}const jp=Xe();Xe({strict:!0});Xe({circular:!0});Xe({circular:!0,strict:!0});Xe({createInternalComparator:()=>mt});Xe({strict:!0,createInternalComparator:()=>mt});Xe({circular:!0,createInternalComparator:()=>mt});Xe({circular:!0,createInternalComparator:()=>mt,strict:!0});function Xe(n={}){const{circular:e=!1,createInternalComparator:t,createState:r,strict:i=!1}=n,o=Fp(n),s=Bp(o),a=t?t(s):zp(s);return Lp({circular:e,comparator:s,createState:r,equals:a,strict:i})}var Vp=(...n)=>e=>{n.forEach(t=>{typeof t=="function"?t(e):t&&(t.current=e)})},Wp=({contentComponent:n})=>{const e=cs.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getServerSnapshot);return b.jsx(b.Fragment,{children:Object.values(e)})};function $p(){const n=new Set;let e={};return{subscribe(t){return n.add(t),()=>{n.delete(t)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(t,r){e={...e,[t]:jl.createPortal(r.reactElement,r.element,t)},n.forEach(i=>i())},removeRenderer(t){const r={...e};delete r[t],e=r,n.forEach(i=>i())}}}var qp=class extends lt.Component{constructor(n){var e;super(n),this.editorContentRef=lt.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=n.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var n;const e=this.props.editor;if(e&&!e.isDestroyed&&((n=e.view.dom)!=null&&n.parentNode)){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=$p(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var n;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((n=e.view.dom)!=null&&n.parentNode))return;const t=document.createElement("div");t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){const{editor:n,innerRef:e,...t}=this.props;return b.jsxs(b.Fragment,{children:[b.jsx("div",{ref:Vp(e,this.editorContentRef),...t}),n?.contentComponent&&b.jsx(Wp,{contentComponent:n.contentComponent})]})}},Hp=O.forwardRef((n,e)=>{const t=lt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[n.editor]);return lt.createElement(qp,{key:t,innerRef:e,...n})}),Jp=lt.memo(Hp),Yp=typeof window<"u"?O.useLayoutEffect:O.useEffect,Up=class{constructor(n){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=n,this.lastSnapshot={editor:n,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(n){return this.subscribers.add(n),()=>{this.subscribers.delete(n)}}watch(n){if(this.editor=n,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}};function Kp(n){var e;const[t]=O.useState(()=>new Up(n.editor)),r=zl.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getServerSnapshot,n.selector,(e=n.equalityFn)!=null?e:jp);return Yp(()=>t.watch(n.editor),[n.editor,t]),O.useDebugValue(r),r}var Gp=!1,Jr=typeof window>"u",Xp=Jr||!!(typeof window<"u"&&window.next),Qp=class pl{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(t=>t())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?Jr||Xp?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)==null?void 0:o.call(i,...r)},onBlur:(...r)=>{var i,o;return(o=(i=this.options.current).onBlur)==null?void 0:o.call(i,...r)},onCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onCreate)==null?void 0:o.call(i,...r)},onDestroy:(...r)=>{var i,o;return(o=(i=this.options.current).onDestroy)==null?void 0:o.call(i,...r)},onFocus:(...r)=>{var i,o;return(o=(i=this.options.current).onFocus)==null?void 0:o.call(i,...r)},onSelectionUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)==null?void 0:o.call(i,...r)},onTransaction:(...r)=>{var i,o;return(o=(i=this.options.current).onTransaction)==null?void 0:o.call(i,...r)},onUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onUpdate)==null?void 0:o.call(i,...r)},onContentError:(...r)=>{var i,o;return(o=(i=this.options.current).onContentError)==null?void 0:o.call(i,...r)},onDrop:(...r)=>{var i,o;return(o=(i=this.options.current).onDrop)==null?void 0:o.call(i,...r)},onPaste:(...r)=>{var i,o;return(o=(i=this.options.current).onPaste)==null?void 0:o.call(i,...r)},onDelete:(...r)=>{var i,o;return(o=(i=this.options.current).onDelete)==null?void 0:o.call(i,...r)}};return new qh(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&t.extensions?e.extensions.length!==t.extensions.length?!1:e.extensions.every((i,o)=>{var s;return i===((s=t.extensions)==null?void 0:s[o])}):e[r]===t[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?pl.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,i)=>r===e[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function gb(n={},e=[]){const t=O.useRef(n);t.current=n;const[r]=O.useState(()=>new Qp(t)),i=cs.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return O.useDebugValue(i),O.useEffect(r.onRender(e)),Kp({editor:i,selector:({transactionNumber:o})=>n.shouldRerenderOnTransaction===!1||n.shouldRerenderOnTransaction===void 0?null:n.immediatelyRender&&o===0?0:o+1}),i}var wi=O.createContext({editor:null});wi.Consumer;var yb=()=>O.useContext(wi),ml=O.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Zp=()=>O.useContext(ml),em=lt.forwardRef((n,e)=>{const{onDragStart:t}=Zp(),r=n.as||"div";return b.jsx(r,{...n,ref:e,"data-node-view-wrapper":"",onDragStart:t,style:{whiteSpace:"normal",...n.style}})});function Xo(n){return!!(typeof n=="function"&&n.prototype&&n.prototype.isReactComponent)}function Qo(n){return!!(typeof n=="object"&&n.$$typeof&&(n.$$typeof.toString()==="Symbol(react.forward_ref)"||n.$$typeof.description==="react.forward_ref"))}function tm(n){return!!(typeof n=="object"&&n.$$typeof&&(n.$$typeof.toString()==="Symbol(react.memo)"||n.$$typeof.description==="react.memo"))}function nm(n){if(Xo(n)||Qo(n))return!0;if(tm(n)){const e=n.type;if(e)return Xo(e)||Qo(e)}return!1}function rm(){try{if(O.version)return parseInt(O.version.split(".")[0],10)>=19}catch{}return!1}var im=class{constructor(n,{editor:e,props:t={},as:r="div",className:i=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=n,this.editor=e,this.props=t,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?Ll.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var n;if(this.destroyed)return;const e=this.component,t=this.props,r=this.editor,i=rm(),o=nm(e),s={...t};s.ref&&!(i||o)&&delete s.ref,!s.ref&&(i||o)&&(s.ref=a=>{this.ref=a}),this.reactElement=b.jsx(e,{...s}),(n=r?.contentComponent)==null||n.setRenderer(this.id,this)}updateProps(n={}){this.destroyed||(this.props={...this.props,...n},this.render())}destroy(){var n;this.destroyed=!0;const e=this.editor;(n=e?.contentComponent)==null||n.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(n){Object.keys(n).forEach(e=>{this.element.setAttribute(e,n[e])})}};lt.createContext({markViewContentRef:()=>{}});var om=class extends tp{constructor(n,e,t){if(super(n,e,t),this.selectionRafId=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const n=this.editor,e=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(e,{get(t,r,i){var o;return r==="storage"?(o=n.storage[e.name])!=null?o:{}:Reflect.get(t,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){const n={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:O.createRef()};if(!this.component.displayName){const l=c=>c.charAt(0).toUpperCase()+c.substring(1);this.component.displayName=l(this.extension.name)}const r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},i=this.component,o=O.memo(l=>b.jsx(ml.Provider,{value:r,children:O.createElement(i,l)}));o.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new im(o,{editor:this.editor,props:n,as:s,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var n;if(this.renderer.element.firstElementChild&&!((n=this.renderer.element.firstElementChild)!=null&&n.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const{from:n,to:e}=this.editor.state.selection,t=this.getPos();if(typeof t=="number")if(n<=t&&e>=t+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(n,e,t){const r=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(n.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=n,this.decorations=e,this.innerDecorations=t,this.options.update({oldNode:i,oldDecorations:o,newNode:n,newDecorations:e,oldInnerDecorations:s,innerDecorations:t,updateProps:()=>r({node:n,decorations:e,innerDecorations:t,extension:this.extensionWithSyncedStorage})})}return n===this.node&&this.decorations===e&&this.innerDecorations===t||(this.node=n,this.decorations=e,this.innerDecorations=t,r({node:n,decorations:e,innerDecorations:t,extension:this.extensionWithSyncedStorage})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let n={};if(typeof this.options.attrs=="function"){const e=this.editor.extensionManager.attributes,t=nn(this.node,e);n=this.options.attrs({node:this.node,HTMLAttributes:t})}else n=this.options.attrs;this.renderer.updateAttributes(n)}}};function sm(n,e){return t=>t.editor.contentComponent?new om(n,t,e):{}}var Si=O.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});Si.displayName="TiptapContext";var am=()=>O.useContext(Si);function gl({editor:n,instance:e,children:t}){const r=n??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const i=O.useMemo(()=>({editor:r}),[r]),o=O.useMemo(()=>({editor:r}),[r]);return b.jsx(wi.Provider,{value:o,children:b.jsx(Si.Provider,{value:i,children:t})})}gl.displayName="Tiptap";function yl({...n}){const{editor:e}=am();return b.jsx(Jp,{editor:e,...n})}yl.displayName="Tiptap.Content";Object.assign(gl,{Content:yl});function lm(n){return n.storage.mention}function bb(n,e,t){n.chain().focus().insertContentAt(e,[cm(t),{type:"text",text:" "}]).run()}function cm(n){return{type:"mention",attrs:n}}function um(n){const e=us.c(21),{node:t,selected:r,view:i,editor:o,getPos:s}=n,{name:a,char:l,kind:c,id:u,args:d}=t.attrs,h=r&&i.editable,f=c==="task",p=l==="@",g=i.editable&&l==="/"&&(c==="prompt"||c==null);let m;e[0]!==d||e[1]!==o||e[2]!==s||e[3]!==u||e[4]!==g||e[5]!==a?(m=re=>{if(!g)return;const De=lm(o)?.onEditChip;if(!De||typeof s!="function")return;const _e=s();typeof _e=="number"&&(re.preventDefault(),re.stopPropagation(),De({promptId:u,promptName:a,args:d??{},pos:_e}))},e[0]=d,e[1]=o,e[2]=s,e[3]=u,e[4]=g,e[5]=a,e[6]=m):m=e[6];const y=m,x=g?"cursor-pointer":"cursor-default",w=p?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",C=h&&"outline-2 outline-blue-300 outline-offset-0",k=g&&"hover:brightness-95",P=!f&&"capitalize";let M;e[7]!==x||e[8]!==w||e[9]!==C||e[10]!==k||e[11]!==P?(M=et("px-1 py-1 rounded","inline-flex items-center gap-1",x,"select-none","text-xs font-light",w,C,k,P),e[7]=x,e[8]=w,e[9]=C,e[10]=k,e[11]=P,e[12]=M):M=e[12];let R;e[13]!==f||e[14]!==a?(R=f?b.jsx("span",{className:"inline-block max-w-[220px] truncate align-bottom",children:a??""}):a?$l(a):"",e[13]=f,e[14]=a,e[15]=R):R=e[15];let _;return e[16]!==l||e[17]!==y||e[18]!==M||e[19]!==R?(_=b.jsxs(em,{onClick:y,className:M,children:[l,R]}),e[16]=l,e[17]=y,e[18]=M,e[19]=R,e[20]=_):_=e[20],_}const xb=ep.create({name:"mention",group:"inline",inline:!0,atom:!0,addStorage(){return{onEditChip:null}},addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id")||null,renderHTML:n=>n.id?{"data-id":n.id}:{}},name:{default:null,parseHTML:n=>n.getAttribute("data-name")||null,renderHTML:n=>n.name?{"data-name":n.name}:{}},char:{default:"/",parseHTML:n=>n.getAttribute("data-char")||"/",renderHTML:n=>n.char?{"data-char":n.char}:{}},metadata:{default:null,parseHTML:n=>{try{return JSON.parse(n.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:n=>n.metadata?{"data-metadata":JSON.stringify(n.metadata)}:{}},kind:{default:null,parseHTML:n=>n.getAttribute("data-kind")||null,renderHTML:n=>n.kind?{"data-kind":n.kind}:{}},args:{default:null,parseHTML:n=>{try{return JSON.parse(n.getAttribute("data-args")||"null")}catch{return null}},renderHTML:n=>n.args?{"data-args":JSON.stringify(n.args)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:n,HTMLAttributes:e}){const t={"data-type":"mention"};return n.attrs.id&&(t["data-id"]=n.attrs.id),n.attrs.name&&(t["data-name"]=n.attrs.name),n.attrs.char&&(t["data-char"]=n.attrs.char),n.attrs.metadata&&(t["data-metadata"]=JSON.stringify(n.attrs.metadata)),n.attrs.kind&&(t["data-kind"]=n.attrs.kind),n.attrs.args&&(t["data-args"]=JSON.stringify(n.attrs.args)),["span",{...e,...t}]},renderText({node:n}){const e=n.attrs.char??"@",t=n.attrs.name??"";return`${e}${t}`},addNodeView(){return sm(um)}});function F(n){const e=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&e==="[object Date]"?new n.constructor(+n):typeof n=="number"||e==="[object Number]"||typeof n=="string"||e==="[object String]"?new Date(n):new Date(NaN)}function ce(n,e){return n instanceof Date?new n.constructor(e):new Date(e)}function ee(n,e){const t=F(n);return isNaN(e)?ce(n,NaN):(e&&t.setDate(t.getDate()+e),t)}function be(n,e){const t=F(n);if(isNaN(e))return ce(n,NaN);if(!e)return t;const r=t.getDate(),i=ce(n,t.getTime());i.setMonth(t.getMonth()+e+1,0);const o=i.getDate();return r>=o?i:(t.setFullYear(i.getFullYear(),i.getMonth(),r),t)}const Mi=6048e5,dm=864e5;let fm={};function ln(){return fm}function Ce(n,e){const t=ln(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,i=F(n),o=i.getDay(),s=(o<r?7:0)+o-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function ht(n){return Ce(n,{weekStartsOn:1})}function bl(n){const e=F(n),t=e.getFullYear(),r=ce(n,0);r.setFullYear(t+1,0,4),r.setHours(0,0,0,0);const i=ht(r),o=ce(n,0);o.setFullYear(t,0,4),o.setHours(0,0,0,0);const s=ht(o);return e.getTime()>=i.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function At(n){const e=F(n);return e.setHours(0,0,0,0),e}function zn(n){const e=F(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function we(n,e){const t=At(n),r=At(e),i=+t-zn(t),o=+r-zn(r);return Math.round((i-o)/dm)}function hm(n){const e=bl(n),t=ce(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),ht(t)}function Yr(n,e){const t=e*7;return ee(n,t)}function pm(n,e){return be(n,e*12)}function mm(n){let e;return n.forEach(function(t){const r=F(t);(e===void 0||e<r||isNaN(Number(r)))&&(e=r)}),e||new Date(NaN)}function gm(n){let e;return n.forEach(t=>{const r=F(t);(!e||e>r||isNaN(+r))&&(e=r)}),e||new Date(NaN)}function ie(n,e){const t=At(n),r=At(e);return+t==+r}function Ci(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ym(n){if(!Ci(n)&&typeof n!="number")return!1;const e=F(n);return!isNaN(Number(e))}function rn(n,e){const t=F(n),r=F(e),i=t.getFullYear()-r.getFullYear(),o=t.getMonth()-r.getMonth();return i*12+o}function bm(n,e,t){const r=Ce(n,t),i=Ce(e,t),o=+r-zn(r),s=+i-zn(i);return Math.round((o-s)/Mi)}function Ni(n){const e=F(n),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function se(n){const e=F(n);return e.setDate(1),e.setHours(0,0,0,0),e}function xl(n){const e=F(n),t=ce(n,0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Di(n,e){const t=ln(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,i=F(n),o=i.getDay(),s=(o<r?-7:0)+6-(o-r);return i.setDate(i.getDate()+s),i.setHours(23,59,59,999),i}function vl(n){return Di(n,{weekStartsOn:1})}const xm={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vm=(n,e,t)=>{let r;const i=xm[n];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function kr(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const km={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wm={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Sm={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mm={date:kr({formats:km,defaultWidth:"full"}),time:kr({formats:wm,defaultWidth:"full"}),dateTime:kr({formats:Sm,defaultWidth:"full"})},Cm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Nm=(n,e,t,r)=>Cm[n];function Bt(n){return(e,t)=>{const r=t?.context?String(t.context):"standalone";let i;if(r==="formatting"&&n.formattingValues){const s=n.defaultFormattingWidth||n.defaultWidth,a=t?.width?String(t.width):s;i=n.formattingValues[a]||n.formattingValues[s]}else{const s=n.defaultWidth,a=t?.width?String(t.width):n.defaultWidth;i=n.values[a]||n.values[s]}const o=n.argumentCallback?n.argumentCallback(e):e;return i[o]}}const Dm={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Em={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Tm={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Om={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Am={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Pm={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Rm=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Im={ordinalNumber:Rm,era:Bt({values:Dm,defaultWidth:"wide"}),quarter:Bt({values:Em,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Bt({values:Tm,defaultWidth:"wide"}),day:Bt({values:Om,defaultWidth:"wide"}),dayPeriod:Bt({values:Am,defaultWidth:"wide",formattingValues:Pm,defaultFormattingWidth:"wide"})};function Ft(n){return(e,t={})=>{const r=t.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],o=e.match(i);if(!o)return null;const s=o[0],a=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(a)?Bm(a,d=>d.test(s)):_m(a,d=>d.test(s));let c;c=n.valueCallback?n.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;const u=e.slice(s.length);return{value:c,rest:u}}}function _m(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function Bm(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function Fm(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const i=r[0],o=e.match(n.parsePattern);if(!o)return null;let s=n.valueCallback?n.valueCallback(o[0]):o[0];s=t.valueCallback?t.valueCallback(s):s;const a=e.slice(i.length);return{value:s,rest:a}}}const zm=/^(\d+)(th|st|nd|rd)?/i,Lm=/\d+/i,jm={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vm={any:[/^b/i,/^(a|c)/i]},Wm={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$m={any:[/1/i,/2/i,/3/i,/4/i]},qm={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Hm={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Jm={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ym={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Um={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Km={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Gm={ordinalNumber:Fm({matchPattern:zm,parsePattern:Lm,valueCallback:n=>parseInt(n,10)}),era:Ft({matchPatterns:jm,defaultMatchWidth:"wide",parsePatterns:Vm,defaultParseWidth:"any"}),quarter:Ft({matchPatterns:Wm,defaultMatchWidth:"wide",parsePatterns:$m,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Ft({matchPatterns:qm,defaultMatchWidth:"wide",parsePatterns:Hm,defaultParseWidth:"any"}),day:Ft({matchPatterns:Jm,defaultMatchWidth:"wide",parsePatterns:Ym,defaultParseWidth:"any"}),dayPeriod:Ft({matchPatterns:Um,defaultMatchWidth:"any",parsePatterns:Km,defaultParseWidth:"any"})},kl={code:"en-US",formatDistance:vm,formatLong:Mm,formatRelative:Nm,localize:Im,match:Gm,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xm(n){const e=F(n);return we(e,xl(e))+1}function wl(n){const e=F(n),t=+ht(e)-+hm(e);return Math.round(t/Mi)+1}function Sl(n,e){const t=F(n),r=t.getFullYear(),i=ln(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,s=ce(n,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const a=Ce(s,e),l=ce(n,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Ce(l,e);return t.getTime()>=a.getTime()?r+1:t.getTime()>=c.getTime()?r:r-1}function Qm(n,e){const t=ln(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,i=Sl(n,e),o=ce(n,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Ce(o,e)}function Ml(n,e){const t=F(n),r=+Ce(t,e)-+Qm(t,e);return Math.round(r/Mi)+1}function z(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const Be={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return z(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):z(t+1,2)},d(n,e){return z(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];default:return t==="am"?"a.m.":"p.m."}},h(n,e){return z(n.getHours()%12||12,e.length)},H(n,e){return z(n.getHours(),e.length)},m(n,e){return z(n.getMinutes(),e.length)},s(n,e){return z(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),i=Math.trunc(r*Math.pow(10,t-3));return z(i,e.length)}},vt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Zo={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),i=r>0?r:1-r;return t.ordinalNumber(i,{unit:"year"})}return Be.y(n,e)},Y:function(n,e,t,r){const i=Sl(n,r),o=i>0?i:1-i;if(e==="YY"){const s=o%100;return z(s,2)}return e==="Yo"?t.ordinalNumber(o,{unit:"year"}):z(o,e.length)},R:function(n,e){const t=bl(n);return z(t,e.length)},u:function(n,e){const t=n.getFullYear();return z(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return z(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return z(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return Be.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return z(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const i=Ml(n,r);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):z(i,e.length)},I:function(n,e,t){const r=wl(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):z(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Be.d(n,e)},D:function(n,e,t){const r=Xm(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):z(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const i=n.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return z(o,2);case"eo":return t.ordinalNumber(o,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const i=n.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return z(o,e.length);case"co":return t.ordinalNumber(o,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return z(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const i=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let i;switch(r===12?i=vt.noon:r===0?i=vt.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let i;switch(r>=17?i=vt.evening:r>=12?i=vt.afternoon:r>=4?i=vt.morning:i=vt.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Be.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Be.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):z(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):z(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Be.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Be.s(n,e)},S:function(n,e){return Be.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return ts(r);case"XXXX":case"XX":return Qe(r);default:return Qe(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return ts(r);case"xxxx":case"xx":return Qe(r);default:return Qe(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+es(r,":");default:return"GMT"+Qe(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+es(r,":");default:return"GMT"+Qe(r,":")}},t:function(n,e,t){const r=Math.trunc(n.getTime()/1e3);return z(r,e.length)},T:function(n,e,t){const r=n.getTime();return z(r,e.length)}};function es(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=Math.trunc(r/60),o=r%60;return o===0?t+String(i):t+String(i)+e+z(o,2)}function ts(n,e){return n%60===0?(n>0?"-":"+")+z(Math.abs(n)/60,2):Qe(n,e)}function Qe(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=z(Math.trunc(r/60),2),o=z(r%60,2);return t+i+e+o}const ns=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Cl=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Zm=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],i=t[2];if(!i)return ns(n,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",ns(r,e)).replace("{{time}}",Cl(i,e))},eg={p:Cl,P:Zm},tg=/^D+$/,ng=/^Y+$/,rg=["D","DD","YY","YYYY"];function ig(n){return tg.test(n)}function og(n){return ng.test(n)}function sg(n,e,t){const r=ag(n,e,t);if(console.warn(r),rg.includes(n))throw new RangeError(r)}function ag(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,cg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ug=/^'([^]*?)'?$/,dg=/''/g,fg=/[a-zA-Z]/;function gt(n,e,t){const r=ln(),i=t?.locale??r.locale??kl,o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=F(n);if(!ym(a))throw new RangeError("Invalid time value");let l=e.match(cg).map(u=>{const d=u[0];if(d==="p"||d==="P"){const h=eg[d];return h(u,i.formatLong)}return u}).join("").match(lg).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:hg(u)};if(Zo[d])return{isToken:!0,value:u};if(d.match(fg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:i};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!t?.useAdditionalWeekYearTokens&&og(d)||!t?.useAdditionalDayOfYearTokens&&ig(d))&&sg(d,e,String(n));const h=Zo[d[0]];return h(a,d,i.localize,c)}).join("")}function hg(n){const e=n.match(ug);return e?e[1].replace(dg,"'"):n}function pg(n){const e=F(n),t=e.getFullYear(),r=e.getMonth(),i=ce(n,0);return i.setFullYear(t,r+1,0),i.setHours(0,0,0,0),i.getDate()}function mg(n){return Math.trunc(+F(n)/1e3)}function gg(n){const e=F(n),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(0,0,0,0),e}function yg(n,e){return bm(gg(n),se(n),e)+1}function Ur(n,e){const t=F(n),r=F(e);return t.getTime()>r.getTime()}function Nl(n,e){const t=F(n),r=F(e);return+t<+r}function Ei(n,e){const t=F(n),r=F(e);return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()}function bg(n,e){const t=F(n),r=F(e);return t.getFullYear()===r.getFullYear()}function wr(n,e){return ee(n,-e)}function Sr(n,e){const t=F(n),r=t.getFullYear(),i=t.getDate(),o=ce(n,0);o.setFullYear(r,e,15),o.setHours(0,0,0,0);const s=pg(o);return t.setMonth(e,Math.min(i,s)),t}function rs(n,e){const t=F(n);return isNaN(+t)?ce(n,NaN):(t.setFullYear(e),t)}var T=function(){return T=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},T.apply(this,arguments)};function xg(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t}function Dl(n,e,t){for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return n.concat(o||Array.prototype.slice.call(e))}function cn(n){return n.mode==="multiple"}function un(n){return n.mode==="range"}function Zn(n){return n.mode==="single"}var vg={root:"rdp",multiple_months:"rdp-multiple_months",with_weeknumber:"rdp-with_weeknumber",vhidden:"rdp-vhidden",button_reset:"rdp-button_reset",button:"rdp-button",caption:"rdp-caption",caption_start:"rdp-caption_start",caption_end:"rdp-caption_end",caption_between:"rdp-caption_between",caption_label:"rdp-caption_label",caption_dropdowns:"rdp-caption_dropdowns",dropdown:"rdp-dropdown",dropdown_month:"rdp-dropdown_month",dropdown_year:"rdp-dropdown_year",dropdown_icon:"rdp-dropdown_icon",months:"rdp-months",month:"rdp-month",table:"rdp-table",tbody:"rdp-tbody",tfoot:"rdp-tfoot",head:"rdp-head",head_row:"rdp-head_row",head_cell:"rdp-head_cell",nav:"rdp-nav",nav_button:"rdp-nav_button",nav_button_previous:"rdp-nav_button_previous",nav_button_next:"rdp-nav_button_next",nav_icon:"rdp-nav_icon",row:"rdp-row",weeknumber:"rdp-weeknumber",cell:"rdp-cell",day:"rdp-day",day_today:"rdp-day_today",day_outside:"rdp-day_outside",day_selected:"rdp-day_selected",day_disabled:"rdp-day_disabled",day_hidden:"rdp-day_hidden",day_range_start:"rdp-day_range_start",day_range_end:"rdp-day_range_end",day_range_middle:"rdp-day_range_middle"};function kg(n,e){return gt(n,"LLLL y",e)}function wg(n,e){return gt(n,"d",e)}function Sg(n,e){return gt(n,"LLLL",e)}function Mg(n){return"".concat(n)}function Cg(n,e){return gt(n,"cccccc",e)}function Ng(n,e){return gt(n,"yyyy",e)}var Dg=Object.freeze({__proto__:null,formatCaption:kg,formatDay:wg,formatMonthCaption:Sg,formatWeekNumber:Mg,formatWeekdayName:Cg,formatYearCaption:Ng}),Eg=function(n,e,t){return gt(n,"do MMMM (EEEE)",t)},Tg=function(){return"Month: "},Og=function(){return"Go to next month"},Ag=function(){return"Go to previous month"},Pg=function(n,e){return gt(n,"cccc",e)},Rg=function(n){return"Week n. ".concat(n)},Ig=function(){return"Year: "},_g=Object.freeze({__proto__:null,labelDay:Eg,labelMonthDropdown:Tg,labelNext:Og,labelPrevious:Ag,labelWeekNumber:Rg,labelWeekday:Pg,labelYearDropdown:Ig});function Bg(){var n="buttons",e=vg,t=kl,r={},i={},o=1,s={},a=new Date;return{captionLayout:n,classNames:e,formatters:Dg,labels:_g,locale:t,modifiersClassNames:r,modifiers:i,numberOfMonths:o,styles:s,today:a,mode:"default"}}function Fg(n){var e=n.fromYear,t=n.toYear,r=n.fromMonth,i=n.toMonth,o=n.fromDate,s=n.toDate;return r?o=se(r):e&&(o=new Date(e,0,1)),i?s=Ni(i):t&&(s=new Date(t,11,31)),{fromDate:o?At(o):void 0,toDate:s?At(s):void 0}}var El=O.createContext(void 0);function zg(n){var e,t=n.initialProps,r=Bg(),i=Fg(t),o=i.fromDate,s=i.toDate,a=(e=t.captionLayout)!==null&&e!==void 0?e:r.captionLayout;a!=="buttons"&&(!o||!s)&&(a="buttons");var l;(Zn(t)||cn(t)||un(t))&&(l=t.onSelect);var c=T(T(T({},r),t),{captionLayout:a,classNames:T(T({},r.classNames),t.classNames),components:T({},t.components),formatters:T(T({},r.formatters),t.formatters),fromDate:o,labels:T(T({},r.labels),t.labels),mode:t.mode||r.mode,modifiers:T(T({},r.modifiers),t.modifiers),modifiersClassNames:T(T({},r.modifiersClassNames),t.modifiersClassNames),onSelect:l,styles:T(T({},r.styles),t.styles),toDate:s});return b.jsx(El.Provider,{value:c,children:n.children})}function V(){var n=O.useContext(El);if(!n)throw new Error("useDayPicker must be used within a DayPickerProvider.");return n}function Tl(n){var e=V(),t=e.locale,r=e.classNames,i=e.styles,o=e.formatters.formatCaption;return b.jsx("div",{className:r.caption_label,style:i.caption_label,"aria-live":"polite",role:"presentation",id:n.id,children:o(n.displayMonth,{locale:t})})}function Lg(n){return b.jsx("svg",T({width:"8px",height:"8px",viewBox:"0 0 120 120","data-testid":"iconDropdown"},n,{children:b.jsx("path",{d:"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Ol(n){var e,t,r=n.onChange,i=n.value,o=n.children,s=n.caption,a=n.className,l=n.style,c=V(),u=(t=(e=c.components)===null||e===void 0?void 0:e.IconDropdown)!==null&&t!==void 0?t:Lg;return b.jsxs("div",{className:a,style:l,children:[b.jsx("span",{className:c.classNames.vhidden,children:n["aria-label"]}),b.jsx("select",{name:n.name,"aria-label":n["aria-label"],className:c.classNames.dropdown,style:c.styles.dropdown,value:i,onChange:r,children:o}),b.jsxs("div",{className:c.classNames.caption_label,style:c.styles.caption_label,"aria-hidden":"true",children:[s,b.jsx(u,{className:c.classNames.dropdown_icon,style:c.styles.dropdown_icon})]})]})}function jg(n){var e,t=V(),r=t.fromDate,i=t.toDate,o=t.styles,s=t.locale,a=t.formatters.formatMonthCaption,l=t.classNames,c=t.components,u=t.labels.labelMonthDropdown;if(!r)return b.jsx(b.Fragment,{});if(!i)return b.jsx(b.Fragment,{});var d=[];if(bg(r,i))for(var h=se(r),f=r.getMonth();f<=i.getMonth();f++)d.push(Sr(h,f));else for(var h=se(new Date),f=0;f<=11;f++)d.push(Sr(h,f));var p=function(m){var y=Number(m.target.value),x=Sr(se(n.displayMonth),y);n.onChange(x)},g=(e=c?.Dropdown)!==null&&e!==void 0?e:Ol;return b.jsx(g,{name:"months","aria-label":u(),className:l.dropdown_month,style:o.dropdown_month,onChange:p,value:n.displayMonth.getMonth(),caption:a(n.displayMonth,{locale:s}),children:d.map(function(m){return b.jsx("option",{value:m.getMonth(),children:a(m,{locale:s})},m.getMonth())})})}function Vg(n){var e,t=n.displayMonth,r=V(),i=r.fromDate,o=r.toDate,s=r.locale,a=r.styles,l=r.classNames,c=r.components,u=r.formatters.formatYearCaption,d=r.labels.labelYearDropdown,h=[];if(!i)return b.jsx(b.Fragment,{});if(!o)return b.jsx(b.Fragment,{});for(var f=i.getFullYear(),p=o.getFullYear(),g=f;g<=p;g++)h.push(rs(xl(new Date),g));var m=function(x){var w=rs(se(t),Number(x.target.value));n.onChange(w)},y=(e=c?.Dropdown)!==null&&e!==void 0?e:Ol;return b.jsx(y,{name:"years","aria-label":d(),className:l.dropdown_year,style:a.dropdown_year,onChange:m,value:t.getFullYear(),caption:u(t,{locale:s}),children:h.map(function(x){return b.jsx("option",{value:x.getFullYear(),children:u(x,{locale:s})},x.getFullYear())})})}function Wg(n,e){var t=O.useState(n),r=t[0],i=t[1],o=e===void 0?r:e;return[o,i]}function $g(n){var e=n.month,t=n.defaultMonth,r=n.today,i=e||t||r||new Date,o=n.toDate,s=n.fromDate,a=n.numberOfMonths,l=a===void 0?1:a;if(o&&rn(o,i)<0){var c=-1*(l-1);i=be(o,c)}return s&&rn(i,s)<0&&(i=s),se(i)}function qg(){var n=V(),e=$g(n),t=Wg(e,n.month),r=t[0],i=t[1],o=function(s){var a;if(!n.disableNavigation){var l=se(s);i(l),(a=n.onMonthChange)===null||a===void 0||a.call(n,l)}};return[r,o]}function Hg(n,e){for(var t=e.reverseMonths,r=e.numberOfMonths,i=se(n),o=se(be(i,r)),s=rn(o,i),a=[],l=0;l<s;l++){var c=be(i,l);a.push(c)}return t&&(a=a.reverse()),a}function Jg(n,e){if(!e.disableNavigation){var t=e.toDate,r=e.pagedNavigation,i=e.numberOfMonths,o=i===void 0?1:i,s=r?o:1,a=se(n);if(!t)return be(a,s);var l=rn(t,n);if(!(l<o))return be(a,s)}}function Yg(n,e){if(!e.disableNavigation){var t=e.fromDate,r=e.pagedNavigation,i=e.numberOfMonths,o=i===void 0?1:i,s=r?o:1,a=se(n);if(!t)return be(a,-s);var l=rn(a,t);if(!(l<=0))return be(a,-s)}}var Al=O.createContext(void 0);function Ug(n){var e=V(),t=qg(),r=t[0],i=t[1],o=Hg(r,e),s=Jg(r,e),a=Yg(r,e),l=function(d){return o.some(function(h){return Ei(d,h)})},c=function(d,h){l(d)||(h&&Nl(d,h)?i(be(d,1+e.numberOfMonths*-1)):i(d))},u={currentMonth:r,displayMonths:o,goToMonth:i,goToDate:c,previousMonth:a,nextMonth:s,isDateDisplayed:l};return b.jsx(Al.Provider,{value:u,children:n.children})}function dn(){var n=O.useContext(Al);if(!n)throw new Error("useNavigation must be used within a NavigationProvider");return n}function is(n){var e,t=V(),r=t.classNames,i=t.styles,o=t.components,s=dn().goToMonth,a=function(u){s(be(u,n.displayIndex?-n.displayIndex:0))},l=(e=o?.CaptionLabel)!==null&&e!==void 0?e:Tl,c=b.jsx(l,{id:n.id,displayMonth:n.displayMonth});return b.jsxs("div",{className:r.caption_dropdowns,style:i.caption_dropdowns,children:[b.jsx("div",{className:r.vhidden,children:c}),b.jsx(jg,{onChange:a,displayMonth:n.displayMonth}),b.jsx(Vg,{onChange:a,displayMonth:n.displayMonth})]})}function Kg(n){return b.jsx("svg",T({width:"16px",height:"16px",viewBox:"0 0 120 120"},n,{children:b.jsx("path",{d:"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z",fill:"currentColor",fillRule:"nonzero"})}))}function Gg(n){return b.jsx("svg",T({width:"16px",height:"16px",viewBox:"0 0 120 120"},n,{children:b.jsx("path",{d:"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z",fill:"currentColor"})}))}var Ln=O.forwardRef(function(n,e){var t=V(),r=t.classNames,i=t.styles,o=[r.button_reset,r.button];n.className&&o.push(n.className);var s=o.join(" "),a=T(T({},i.button_reset),i.button);return n.style&&Object.assign(a,n.style),b.jsx("button",T({},n,{ref:e,type:"button",className:s,style:a}))});function Xg(n){var e,t,r=V(),i=r.dir,o=r.locale,s=r.classNames,a=r.styles,l=r.labels,c=l.labelPrevious,u=l.labelNext,d=r.components;if(!n.nextMonth&&!n.previousMonth)return b.jsx(b.Fragment,{});var h=c(n.previousMonth,{locale:o}),f=[s.nav_button,s.nav_button_previous].join(" "),p=u(n.nextMonth,{locale:o}),g=[s.nav_button,s.nav_button_next].join(" "),m=(e=d?.IconRight)!==null&&e!==void 0?e:Gg,y=(t=d?.IconLeft)!==null&&t!==void 0?t:Kg;return b.jsxs("div",{className:s.nav,style:a.nav,children:[!n.hidePrevious&&b.jsx(Ln,{name:"previous-month","aria-label":h,className:f,style:a.nav_button_previous,disabled:!n.previousMonth,onClick:n.onPreviousClick,children:i==="rtl"?b.jsx(m,{className:s.nav_icon,style:a.nav_icon}):b.jsx(y,{className:s.nav_icon,style:a.nav_icon})}),!n.hideNext&&b.jsx(Ln,{name:"next-month","aria-label":p,className:g,style:a.nav_button_next,disabled:!n.nextMonth,onClick:n.onNextClick,children:i==="rtl"?b.jsx(y,{className:s.nav_icon,style:a.nav_icon}):b.jsx(m,{className:s.nav_icon,style:a.nav_icon})})]})}function ss(n){var e=V().numberOfMonths,t=dn(),r=t.previousMonth,i=t.nextMonth,o=t.goToMonth,s=t.displayMonths,a=s.findIndex(function(p){return Ei(n.displayMonth,p)}),l=a===0,c=a===s.length-1,u=e>1&&(l||!c),d=e>1&&(c||!l),h=function(){r&&o(r)},f=function(){i&&o(i)};return b.jsx(Xg,{displayMonth:n.displayMonth,hideNext:u,hidePrevious:d,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:f})}function Qg(n){var e,t=V(),r=t.classNames,i=t.disableNavigation,o=t.styles,s=t.captionLayout,a=t.components,l=(e=a?.CaptionLabel)!==null&&e!==void 0?e:Tl,c;return i?c=b.jsx(l,{id:n.id,displayMonth:n.displayMonth}):s==="dropdown"?c=b.jsx(is,{displayMonth:n.displayMonth,id:n.id}):s==="dropdown-buttons"?c=b.jsxs(b.Fragment,{children:[b.jsx(is,{displayMonth:n.displayMonth,displayIndex:n.displayIndex,id:n.id}),b.jsx(ss,{displayMonth:n.displayMonth,displayIndex:n.displayIndex,id:n.id})]}):c=b.jsxs(b.Fragment,{children:[b.jsx(l,{id:n.id,displayMonth:n.displayMonth,displayIndex:n.displayIndex}),b.jsx(ss,{displayMonth:n.displayMonth,id:n.id})]}),b.jsx("div",{className:r.caption,style:o.caption,children:c})}function Zg(n){var e=V(),t=e.footer,r=e.styles,i=e.classNames.tfoot;return t?b.jsx("tfoot",{className:i,style:r.tfoot,children:b.jsx("tr",{children:b.jsx("td",{colSpan:8,children:t})})}):b.jsx(b.Fragment,{})}function ey(n,e,t){for(var r=t?ht(new Date):Ce(new Date,{locale:n,weekStartsOn:e}),i=[],o=0;o<7;o++){var s=ee(r,o);i.push(s)}return i}function ty(){var n=V(),e=n.classNames,t=n.styles,r=n.showWeekNumber,i=n.locale,o=n.weekStartsOn,s=n.ISOWeek,a=n.formatters.formatWeekdayName,l=n.labels.labelWeekday,c=ey(i,o,s);return b.jsxs("tr",{style:t.head_row,className:e.head_row,children:[r&&b.jsx("td",{style:t.head_cell,className:e.head_cell}),c.map(function(u,d){return b.jsx("th",{scope:"col",className:e.head_cell,style:t.head_cell,"aria-label":l(u,{locale:i}),children:a(u,{locale:i})},d)})]})}function ny(){var n,e=V(),t=e.classNames,r=e.styles,i=e.components,o=(n=i?.HeadRow)!==null&&n!==void 0?n:ty;return b.jsx("thead",{style:r.head,className:t.head,children:b.jsx(o,{})})}function ry(n){var e=V(),t=e.locale,r=e.formatters.formatDay;return b.jsx(b.Fragment,{children:r(n.date,{locale:t})})}var Ti=O.createContext(void 0);function iy(n){if(!cn(n.initialProps)){var e={selected:void 0,modifiers:{disabled:[]}};return b.jsx(Ti.Provider,{value:e,children:n.children})}return b.jsx(oy,{initialProps:n.initialProps,children:n.children})}function oy(n){var e=n.initialProps,t=n.children,r=e.selected,i=e.min,o=e.max,s=function(c,u,d){var h,f;(h=e.onDayClick)===null||h===void 0||h.call(e,c,u,d);var p=!!(u.selected&&i&&r?.length===i);if(!p){var g=!!(!u.selected&&o&&r?.length===o);if(!g){var m=r?Dl([],r):[];if(u.selected){var y=m.findIndex(function(x){return ie(c,x)});m.splice(y,1)}else m.push(c);(f=e.onSelect)===null||f===void 0||f.call(e,m,c,u,d)}}},a={disabled:[]};r&&a.disabled.push(function(c){var u=o&&r.length>o-1,d=r.some(function(h){return ie(h,c)});return!!(u&&!d)});var l={selected:r,onDayClick:s,modifiers:a};return b.jsx(Ti.Provider,{value:l,children:t})}function Oi(){var n=O.useContext(Ti);if(!n)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return n}function sy(n,e){var t=e||{},r=t.from,i=t.to;return r&&i?ie(i,n)&&ie(r,n)?void 0:ie(i,n)?{from:i,to:void 0}:ie(r,n)?void 0:Ur(r,n)?{from:n,to:i}:{from:r,to:n}:i?Ur(n,i)?{from:i,to:n}:{from:n,to:i}:r?Nl(n,r)?{from:n,to:r}:{from:r,to:n}:{from:n,to:void 0}}var Ai=O.createContext(void 0);function ay(n){if(!un(n.initialProps)){var e={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return b.jsx(Ai.Provider,{value:e,children:n.children})}return b.jsx(ly,{initialProps:n.initialProps,children:n.children})}function ly(n){var e=n.initialProps,t=n.children,r=e.selected,i=r||{},o=i.from,s=i.to,a=e.min,l=e.max,c=function(f,p,g){var m,y;(m=e.onDayClick)===null||m===void 0||m.call(e,f,p,g);var x=sy(f,r);(y=e.onSelect)===null||y===void 0||y.call(e,x,f,p,g)},u={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(u.range_start=[o],s?(u.range_end=[s],ie(o,s)||(u.range_middle=[{after:o,before:s}])):u.range_end=[o]):s&&(u.range_start=[s],u.range_end=[s]),a&&(o&&!s&&u.disabled.push({after:wr(o,a-1),before:ee(o,a-1)}),o&&s&&u.disabled.push({after:o,before:ee(o,a-1)}),!o&&s&&u.disabled.push({after:wr(s,a-1),before:ee(s,a-1)})),l){if(o&&!s&&(u.disabled.push({before:ee(o,-l+1)}),u.disabled.push({after:ee(o,l-1)})),o&&s){var d=we(s,o)+1,h=l-d;u.disabled.push({before:wr(o,h)}),u.disabled.push({after:ee(s,h)})}!o&&s&&(u.disabled.push({before:ee(s,-l+1)}),u.disabled.push({after:ee(s,l-1)}))}return b.jsx(Ai.Provider,{value:{selected:r,onDayClick:c,modifiers:u},children:t})}function Pi(){var n=O.useContext(Ai);if(!n)throw new Error("useSelectRange must be used within a SelectRangeProvider");return n}function Sn(n){return Array.isArray(n)?Dl([],n):n!==void 0?[n]:[]}function cy(n){var e={};return Object.entries(n).forEach(function(t){var r=t[0],i=t[1];e[r]=Sn(i)}),e}var xe;(function(n){n.Outside="outside",n.Disabled="disabled",n.Selected="selected",n.Hidden="hidden",n.Today="today",n.RangeStart="range_start",n.RangeEnd="range_end",n.RangeMiddle="range_middle"})(xe||(xe={}));var uy=xe.Selected,Te=xe.Disabled,dy=xe.Hidden,fy=xe.Today,Mr=xe.RangeEnd,Cr=xe.RangeMiddle,Nr=xe.RangeStart,hy=xe.Outside;function py(n,e,t){var r,i=(r={},r[uy]=Sn(n.selected),r[Te]=Sn(n.disabled),r[dy]=Sn(n.hidden),r[fy]=[n.today],r[Mr]=[],r[Cr]=[],r[Nr]=[],r[hy]=[],r);return n.fromDate&&i[Te].push({before:n.fromDate}),n.toDate&&i[Te].push({after:n.toDate}),cn(n)?i[Te]=i[Te].concat(e.modifiers[Te]):un(n)&&(i[Te]=i[Te].concat(t.modifiers[Te]),i[Nr]=t.modifiers[Nr],i[Cr]=t.modifiers[Cr],i[Mr]=t.modifiers[Mr]),i}var Pl=O.createContext(void 0);function my(n){var e=V(),t=Oi(),r=Pi(),i=py(e,t,r),o=cy(e.modifiers),s=T(T({},i),o);return b.jsx(Pl.Provider,{value:s,children:n.children})}function Rl(){var n=O.useContext(Pl);if(!n)throw new Error("useModifiers must be used within a ModifiersProvider");return n}function gy(n){return!!(n&&typeof n=="object"&&"before"in n&&"after"in n)}function yy(n){return!!(n&&typeof n=="object"&&"from"in n)}function by(n){return!!(n&&typeof n=="object"&&"after"in n)}function xy(n){return!!(n&&typeof n=="object"&&"before"in n)}function vy(n){return!!(n&&typeof n=="object"&&"dayOfWeek"in n)}function ky(n,e){var t,r=e.from,i=e.to;if(r&&i){var o=we(i,r)<0;o&&(t=[i,r],r=t[0],i=t[1]);var s=we(n,r)>=0&&we(i,n)>=0;return s}return i?ie(i,n):r?ie(r,n):!1}function wy(n){return Ci(n)}function Sy(n){return Array.isArray(n)&&n.every(Ci)}function My(n,e){return e.some(function(t){if(typeof t=="boolean")return t;if(wy(t))return ie(n,t);if(Sy(t))return t.includes(n);if(yy(t))return ky(n,t);if(vy(t))return t.dayOfWeek.includes(n.getDay());if(gy(t)){var r=we(t.before,n),i=we(t.after,n),o=r>0,s=i<0,a=Ur(t.before,t.after);return a?s&&o:o||s}return by(t)?we(n,t.after)>0:xy(t)?we(t.before,n)>0:typeof t=="function"?t(n):!1})}function Ri(n,e,t){var r=Object.keys(e).reduce(function(o,s){var a=e[s];return My(n,a)&&o.push(s),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),t&&!Ei(n,t)&&(i.outside=!0),i}function Cy(n,e){for(var t=se(n[0]),r=Ni(n[n.length-1]),i,o,s=t;s<=r;){var a=Ri(s,e),l=!a.disabled&&!a.hidden;if(!l){s=ee(s,1);continue}if(a.selected)return s;a.today&&!o&&(o=s),i||(i=s),s=ee(s,1)}return o||i}var Ny=365;function Il(n,e){var t=e.moveBy,r=e.direction,i=e.context,o=e.modifiers,s=e.retry,a=s===void 0?{count:0,lastFocused:n}:s,l=i.weekStartsOn,c=i.fromDate,u=i.toDate,d=i.locale,h={day:ee,week:Yr,month:be,year:pm,startOfWeek:function(m){return i.ISOWeek?ht(m):Ce(m,{locale:d,weekStartsOn:l})},endOfWeek:function(m){return i.ISOWeek?vl(m):Di(m,{locale:d,weekStartsOn:l})}},f=h[t](n,r==="after"?1:-1);r==="before"&&c?f=mm([c,f]):r==="after"&&u&&(f=gm([u,f]));var p=!0;if(o){var g=Ri(f,o);p=!g.disabled&&!g.hidden}return p?f:a.count>Ny?a.lastFocused:Il(f,{moveBy:t,direction:r,context:i,modifiers:o,retry:T(T({},a),{count:a.count+1})})}var _l=O.createContext(void 0);function Dy(n){var e=dn(),t=Rl(),r=O.useState(),i=r[0],o=r[1],s=O.useState(),a=s[0],l=s[1],c=Cy(e.displayMonths,t),u=i??(a&&e.isDateDisplayed(a))?a:c,d=function(){l(i),o(void 0)},h=function(m){o(m)},f=V(),p=function(m,y){if(i){var x=Il(i,{moveBy:m,direction:y,context:f,modifiers:t});ie(i,x)||(e.goToDate(x,i),h(x))}},g={focusedDay:i,focusTarget:u,blur:d,focus:h,focusDayAfter:function(){return p("day","after")},focusDayBefore:function(){return p("day","before")},focusWeekAfter:function(){return p("week","after")},focusWeekBefore:function(){return p("week","before")},focusMonthBefore:function(){return p("month","before")},focusMonthAfter:function(){return p("month","after")},focusYearBefore:function(){return p("year","before")},focusYearAfter:function(){return p("year","after")},focusStartOfWeek:function(){return p("startOfWeek","before")},focusEndOfWeek:function(){return p("endOfWeek","after")}};return b.jsx(_l.Provider,{value:g,children:n.children})}function Ii(){var n=O.useContext(_l);if(!n)throw new Error("useFocusContext must be used within a FocusProvider");return n}function Ey(n,e){var t=Rl(),r=Ri(n,t,e);return r}var _i=O.createContext(void 0);function Ty(n){if(!Zn(n.initialProps)){var e={selected:void 0};return b.jsx(_i.Provider,{value:e,children:n.children})}return b.jsx(Oy,{initialProps:n.initialProps,children:n.children})}function Oy(n){var e=n.initialProps,t=n.children,r=function(o,s,a){var l,c,u;if((l=e.onDayClick)===null||l===void 0||l.call(e,o,s,a),s.selected&&!e.required){(c=e.onSelect)===null||c===void 0||c.call(e,void 0,o,s,a);return}(u=e.onSelect)===null||u===void 0||u.call(e,o,o,s,a)},i={selected:e.selected,onDayClick:r};return b.jsx(_i.Provider,{value:i,children:t})}function Bl(){var n=O.useContext(_i);if(!n)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return n}function Ay(n,e){var t=V(),r=Bl(),i=Oi(),o=Pi(),s=Ii(),a=s.focusDayAfter,l=s.focusDayBefore,c=s.focusWeekAfter,u=s.focusWeekBefore,d=s.blur,h=s.focus,f=s.focusMonthBefore,p=s.focusMonthAfter,g=s.focusYearBefore,m=s.focusYearAfter,y=s.focusStartOfWeek,x=s.focusEndOfWeek,w=function(A){var E,er,tr,nr;Zn(t)?(E=r.onDayClick)===null||E===void 0||E.call(r,n,e,A):cn(t)?(er=i.onDayClick)===null||er===void 0||er.call(i,n,e,A):un(t)?(tr=o.onDayClick)===null||tr===void 0||tr.call(o,n,e,A):(nr=t.onDayClick)===null||nr===void 0||nr.call(t,n,e,A)},C=function(A){var E;h(n),(E=t.onDayFocus)===null||E===void 0||E.call(t,n,e,A)},k=function(A){var E;d(),(E=t.onDayBlur)===null||E===void 0||E.call(t,n,e,A)},P=function(A){var E;(E=t.onDayMouseEnter)===null||E===void 0||E.call(t,n,e,A)},M=function(A){var E;(E=t.onDayMouseLeave)===null||E===void 0||E.call(t,n,e,A)},R=function(A){var E;(E=t.onDayPointerEnter)===null||E===void 0||E.call(t,n,e,A)},_=function(A){var E;(E=t.onDayPointerLeave)===null||E===void 0||E.call(t,n,e,A)},re=function(A){var E;(E=t.onDayTouchCancel)===null||E===void 0||E.call(t,n,e,A)},yt=function(A){var E;(E=t.onDayTouchEnd)===null||E===void 0||E.call(t,n,e,A)},De=function(A){var E;(E=t.onDayTouchMove)===null||E===void 0||E.call(t,n,e,A)},_e=function(A){var E;(E=t.onDayTouchStart)===null||E===void 0||E.call(t,n,e,A)},ke=function(A){var E;(E=t.onDayKeyUp)===null||E===void 0||E.call(t,n,e,A)},pe=function(A){var E;switch(A.key){case"ArrowLeft":A.preventDefault(),A.stopPropagation(),t.dir==="rtl"?a():l();break;case"ArrowRight":A.preventDefault(),A.stopPropagation(),t.dir==="rtl"?l():a();break;case"ArrowDown":A.preventDefault(),A.stopPropagation(),c();break;case"ArrowUp":A.preventDefault(),A.stopPropagation(),u();break;case"PageUp":A.preventDefault(),A.stopPropagation(),A.shiftKey?g():f();break;case"PageDown":A.preventDefault(),A.stopPropagation(),A.shiftKey?m():p();break;case"Home":A.preventDefault(),A.stopPropagation(),y();break;case"End":A.preventDefault(),A.stopPropagation(),x();break}(E=t.onDayKeyDown)===null||E===void 0||E.call(t,n,e,A)},Fl={onClick:w,onFocus:C,onBlur:k,onKeyDown:pe,onKeyUp:ke,onMouseEnter:P,onMouseLeave:M,onPointerEnter:R,onPointerLeave:_,onTouchCancel:re,onTouchEnd:yt,onTouchMove:De,onTouchStart:_e};return Fl}function Py(){var n=V(),e=Bl(),t=Oi(),r=Pi(),i=Zn(n)?e.selected:cn(n)?t.selected:un(n)?r.selected:void 0;return i}function Ry(n){return Object.values(xe).includes(n)}function Iy(n,e){var t=[n.classNames.day];return Object.keys(e).forEach(function(r){var i=n.modifiersClassNames[r];if(i)t.push(i);else if(Ry(r)){var o=n.classNames["day_".concat(r)];o&&t.push(o)}}),t}function _y(n,e){var t=T({},n.styles.day);return Object.keys(e).forEach(function(r){var i;t=T(T({},t),(i=n.modifiersStyles)===null||i===void 0?void 0:i[r])}),t}function By(n,e,t){var r,i,o,s=V(),a=Ii(),l=Ey(n,e),c=Ay(n,l),u=Py(),d=!!(s.onDayClick||s.mode!=="default");O.useEffect(function(){var P;l.outside||a.focusedDay&&d&&ie(a.focusedDay,n)&&((P=t.current)===null||P===void 0||P.focus())},[a.focusedDay,n,t,d,l.outside]);var h=Iy(s,l).join(" "),f=_y(s,l),p=!!(l.outside&&!s.showOutsideDays||l.hidden),g=(o=(i=s.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:ry,m=b.jsx(g,{date:n,displayMonth:e,activeModifiers:l}),y={style:f,className:h,children:m,role:"gridcell"},x=a.focusTarget&&ie(a.focusTarget,n)&&!l.outside,w=a.focusedDay&&ie(a.focusedDay,n),C=T(T(T({},y),(r={disabled:l.disabled,role:"gridcell"},r["aria-selected"]=l.selected,r.tabIndex=w||x?0:-1,r)),c),k={isButton:d,isHidden:p,activeModifiers:l,selectedDays:u,buttonProps:C,divProps:y};return k}function Fy(n){var e=O.useRef(null),t=By(n.date,n.displayMonth,e);return t.isHidden?b.jsx("div",{role:"gridcell"}):t.isButton?b.jsx(Ln,T({name:"day",ref:e},t.buttonProps)):b.jsx("div",T({},t.divProps))}function zy(n){var e=n.number,t=n.dates,r=V(),i=r.onWeekNumberClick,o=r.styles,s=r.classNames,a=r.locale,l=r.labels.labelWeekNumber,c=r.formatters.formatWeekNumber,u=c(Number(e),{locale:a});if(!i)return b.jsx("span",{className:s.weeknumber,style:o.weeknumber,children:u});var d=l(Number(e),{locale:a}),h=function(f){i(e,t,f)};return b.jsx(Ln,{name:"week-number","aria-label":d,className:s.weeknumber,style:o.weeknumber,onClick:h,children:u})}function Ly(n){var e,t,r=V(),i=r.styles,o=r.classNames,s=r.showWeekNumber,a=r.components,l=(e=a?.Day)!==null&&e!==void 0?e:Fy,c=(t=a?.WeekNumber)!==null&&t!==void 0?t:zy,u;return s&&(u=b.jsx("td",{className:o.cell,style:i.cell,children:b.jsx(c,{number:n.weekNumber,dates:n.dates})})),b.jsxs("tr",{className:o.row,style:i.row,children:[u,n.dates.map(function(d){return b.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:b.jsx(l,{displayMonth:n.displayMonth,date:d})},mg(d))})]})}function as(n,e,t){for(var r=t?.ISOWeek?vl(e):Di(e,t),i=t?.ISOWeek?ht(n):Ce(n,t),o=we(r,i),s=[],a=0;a<=o;a++)s.push(ee(i,a));var l=s.reduce(function(c,u){var d=t?.ISOWeek?wl(u):Ml(u,t),h=c.find(function(f){return f.weekNumber===d});return h?(h.dates.push(u),c):(c.push({weekNumber:d,dates:[u]}),c)},[]);return l}function jy(n,e){var t=as(se(n),Ni(n),e);if(e?.useFixedWeeks){var r=yg(n,e);if(r<6){var i=t[t.length-1],o=i.dates[i.dates.length-1],s=Yr(o,6-r),a=as(Yr(o,1),s,e);t.push.apply(t,a)}}return t}function Vy(n){var e,t,r,i=V(),o=i.locale,s=i.classNames,a=i.styles,l=i.hideHead,c=i.fixedWeeks,u=i.components,d=i.weekStartsOn,h=i.firstWeekContainsDate,f=i.ISOWeek,p=jy(n.displayMonth,{useFixedWeeks:!!c,ISOWeek:f,locale:o,weekStartsOn:d,firstWeekContainsDate:h}),g=(e=u?.Head)!==null&&e!==void 0?e:ny,m=(t=u?.Row)!==null&&t!==void 0?t:Ly,y=(r=u?.Footer)!==null&&r!==void 0?r:Zg;return b.jsxs("table",{id:n.id,className:s.table,style:a.table,role:"grid","aria-labelledby":n["aria-labelledby"],children:[!l&&b.jsx(g,{}),b.jsx("tbody",{className:s.tbody,style:a.tbody,children:p.map(function(x){return b.jsx(m,{displayMonth:n.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),b.jsx(y,{displayMonth:n.displayMonth})]})}function Wy(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var $y=Wy()?O.useLayoutEffect:O.useEffect,Dr=!1,qy=0;function ls(){return"react-day-picker-".concat(++qy)}function Hy(n){var e,t=n??(Dr?ls():null),r=O.useState(t),i=r[0],o=r[1];return $y(function(){i===null&&o(ls())},[]),O.useEffect(function(){Dr===!1&&(Dr=!0)},[]),(e=n??i)!==null&&e!==void 0?e:void 0}function Jy(n){var e,t,r=V(),i=r.dir,o=r.classNames,s=r.styles,a=r.components,l=dn().displayMonths,c=Hy(r.id?"".concat(r.id,"-").concat(n.displayIndex):void 0),u=r.id?"".concat(r.id,"-grid-").concat(n.displayIndex):void 0,d=[o.month],h=s.month,f=n.displayIndex===0,p=n.displayIndex===l.length-1,g=!f&&!p;i==="rtl"&&(e=[f,p],p=e[0],f=e[1]),f&&(d.push(o.caption_start),h=T(T({},h),s.caption_start)),p&&(d.push(o.caption_end),h=T(T({},h),s.caption_end)),g&&(d.push(o.caption_between),h=T(T({},h),s.caption_between));var m=(t=a?.Caption)!==null&&t!==void 0?t:Qg;return b.jsxs("div",{className:d.join(" "),style:h,children:[b.jsx(m,{id:c,displayMonth:n.displayMonth,displayIndex:n.displayIndex}),b.jsx(Vy,{id:u,"aria-labelledby":c,displayMonth:n.displayMonth})]},n.displayIndex)}function Yy(n){var e=V(),t=e.classNames,r=e.styles;return b.jsx("div",{className:t.months,style:r.months,children:n.children})}function Uy(n){var e,t,r=n.initialProps,i=V(),o=Ii(),s=dn(),a=O.useState(!1),l=a[0],c=a[1];O.useEffect(function(){i.initialFocus&&o.focusTarget&&(l||(o.focus(o.focusTarget),c(!0)))},[i.initialFocus,l,o.focus,o.focusTarget,o]);var u=[i.classNames.root,i.className];i.numberOfMonths>1&&u.push(i.classNames.multiple_months),i.showWeekNumber&&u.push(i.classNames.with_weeknumber);var d=T(T({},i.styles.root),i.style),h=Object.keys(r).filter(function(p){return p.startsWith("data-")}).reduce(function(p,g){var m;return T(T({},p),(m={},m[g]=r[g],m))},{}),f=(t=(e=r.components)===null||e===void 0?void 0:e.Months)!==null&&t!==void 0?t:Yy;return b.jsx("div",T({className:u.join(" "),style:d,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:b.jsx(f,{children:s.displayMonths.map(function(p,g){return b.jsx(Jy,{displayIndex:g,displayMonth:p},g)})})}))}function Ky(n){var e=n.children,t=xg(n,["children"]);return b.jsx(zg,{initialProps:t,children:b.jsx(Ug,{children:b.jsx(Ty,{initialProps:t,children:b.jsx(iy,{initialProps:t,children:b.jsx(ay,{initialProps:t,children:b.jsx(my,{children:b.jsx(Dy,{children:e})})})})})})})}function Gy(n){return b.jsx(Ky,T({},n,{children:b.jsx(Uy,{initialProps:n})}))}function vb(n){const e=us.c(20);let t,r,i,o;e[0]!==n?({className:t,classNames:r,showOutsideDays:o,...i}=n,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o):(t=e[1],r=e[2],i=e[3],o=e[4]);const s=o===void 0?!0:o;let a;e[5]!==t?(a=et("p-3",t),e[5]=t,e[6]=a):a=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=et(Bi({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),e[7]=l):l=e[7];const c=i.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md";let u;e[8]!==c?(u=et("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",c),e[8]=c,e[9]=u):u=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=et(Bi({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),e[10]=d):d=e[10];let h;e[11]!==r||e[12]!==u?(h={months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:l,nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:u,day:d,day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...r},e[11]=r,e[12]=u,e[13]=h):h=e[13];let f;e[14]===Symbol.for("react.memo_cache_sentinel")?(f={IconLeft:Qy,IconRight:Xy},e[14]=f):f=e[14];let p;return e[15]!==i||e[16]!==s||e[17]!==a||e[18]!==h?(p=b.jsx(Gy,{showOutsideDays:s,className:a,classNames:h,components:f,...i}),e[15]=i,e[16]=s,e[17]=a,e[18]=h,e[19]=p):p=e[19],p}function Xy(n){const{className:e,...t}=n;return b.jsx(Wl,{className:et("size-4",e),...t})}function Qy(n){const{className:e,...t}=n;return b.jsx(Vl,{className:et("size-4",e),...t})}export{nb as $,cb as A,db as B,vb as C,q as D,wi as E,v as F,ub as G,hb as H,$f as I,rh as J,ib as K,Ka as L,xb as M,ep as N,eh as O,Ke as P,Qh as Q,sm as R,S,I as T,tn as U,ab as V,sb as W,J as X,ob as Y,nn as Z,Xh as _,ve as a,rb as a0,yb as b,cm as c,Jp as d,Ne as e,Kp as f,lm as g,ge as h,bb as i,pb as j,em as k,Tc as l,Gd as m,D as n,B as o,Tn as p,bi as q,L as r,N as s,$l as t,gb as u,lb as v,fb as w,Uf as x,Rh as y,mb as z};
|