decocms 3.90.1 → 3.91.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-BFW82Glo.js → AlertCircle-CJRvjf9E.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B8NHPBEV.js → ArrowUpRight-C-ASyyy7.js} +1 -1
- package/dist/client/assets/{CheckCircle-DNGMJpxK.js → CheckCircle-DHlN5aNG.js} +1 -1
- package/dist/client/assets/{ChevronDown-CIJ7-0w6.js → ChevronDown-siikX1CB.js} +1 -1
- package/dist/client/assets/{ChevronLeft-DwrsIjn7.js → ChevronLeft-BMBu9Rmw.js} +1 -1
- package/dist/client/assets/{ChevronRight-CFrkN22M.js → ChevronRight-bS8zu0mE.js} +1 -1
- package/dist/client/assets/{ChevronUp-5yVty_-J.js → ChevronUp-CazSoL4d.js} +1 -1
- package/dist/client/assets/{DotsVertical-B_6X1vi7.js → DotsVertical--w5kUeSe.js} +1 -1
- package/dist/client/assets/{Eye-CVnhloDi.js → Eye-evykl5te.js} +1 -1
- package/dist/client/assets/{FilterLines-aCF-EO8Z.js → FilterLines-CbmfI3qe.js} +1 -1
- package/dist/client/assets/{Globe01-CThKgW6h.js → Globe01-C5qUvOk3.js} +1 -1
- package/dist/client/assets/{Globe04-BM8I7PlJ.js → Globe04-ayhcWvo6.js} +1 -1
- package/dist/client/assets/{HardDrive-CnFxYfXA.js → HardDrive-BZnTfRN9.js} +1 -1
- package/dist/client/assets/{Key01-NlklfK2W.js → Key01-BHQPeab7.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DeMAAMUQ.js → LayoutLeft-eB33hZq-.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BQAshidh.js → LinkExternal01-C9BK0yA_.js} +1 -1
- package/dist/client/assets/{Monitor01-Dvufl23t.js → Monitor01-CuUeTTqr.js} +1 -1
- package/dist/client/assets/{Palette-BpmN1_H8.js → Palette-B-wglEVr.js} +1 -1
- package/dist/client/assets/{Play-BLi-TNw8.js → Play-eP0tvaLl.js} +1 -1
- package/dist/client/assets/{Plus-DiPCnPyI.js → Plus-DYuvLVJp.js} +1 -1
- package/dist/client/assets/{SearchMd-CKZEESAy.js → SearchMd-BqOCkx90.js} +1 -1
- package/dist/client/assets/{Settings02-xJ3tiWNi.js → Settings02-Ca71UgHw.js} +1 -1
- package/dist/client/assets/{Shield01-CJTqMoEC.js → Shield01-DY339kBm.js} +1 -1
- package/dist/client/assets/{Star01-BO7uFQpG.js → Star01-Cdx4KR4U.js} +1 -1
- package/dist/client/assets/{Stars01-BXxzvxO4.js → Stars01-DPz6mq_I.js} +1 -1
- package/dist/client/assets/{Stars02-CjJwnXFf.js → Stars02-CGjIjk8V.js} +1 -1
- package/dist/client/assets/{Sun-O-ShYNtI.js → Sun-C4MaHaW6.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bw76z7hc.js → SwitchHorizontal01-DqWROiIl.js} +1 -1
- package/dist/client/assets/{Tool01-D2a8I_Gf.js → Tool01-CLVT6zPR.js} +1 -1
- package/dist/client/assets/{Trash01-DmRbdJUk.js → Trash01-D3NdLyIt.js} +1 -1
- package/dist/client/assets/{Upload01-Ccj_plFg.js → Upload01-CwAL7vx3.js} +1 -1
- package/dist/client/assets/{User01-BzP8oKZ3.js → User01-CPYMutV0.js} +1 -1
- package/dist/client/assets/{Users01-CdAaoMtW.js → Users01-Ih8cqcDu.js} +1 -1
- package/dist/client/assets/{Users03-fR0V8I72.js → Users03-zuYH9zmO.js} +1 -1
- package/dist/client/assets/{X-BAIghubv.js → X-DFZG0D7q.js} +1 -1
- package/dist/client/assets/{XCircle-CdCz4npr.js → XCircle-C4Okg4wT.js} +1 -1
- package/dist/client/assets/{XClose-vwNqWD2m.js → XClose-CsMYL6lC.js} +1 -1
- package/dist/client/assets/{Zap-BJK90vlv.js → Zap-0-1HsH9l.js} +1 -1
- package/dist/client/assets/{ZapSquare-DuHMAFt7.js → ZapSquare-CSwYwLqC.js} +1 -1
- package/dist/client/assets/{ZoomOut-Bpyue_Zw.js → ZoomOut-DZZylEjW.js} +1 -1
- package/dist/client/assets/{access-gate-DcWgdeR9.js → access-gate-BKEoJm4_.js} +1 -1
- package/dist/client/assets/{add-section-modal-DT5a2xfl.js → add-section-modal-DcqHegyG.js} +1 -1
- package/dist/client/assets/{agent-icon-Dh6cDydc.js → agent-icon-DyIO38tc.js} +1 -1
- package/dist/client/assets/{agents-list-DTju_D-G.js → agents-list-CTPBFG-U.js} +1 -1
- package/dist/client/assets/{ai-providers-lyzQuhAE.js → ai-providers-BdFdksO5.js} +1 -1
- package/dist/client/assets/{alert-BPkaPX8i.js → alert-bxo3sfvI.js} +1 -1
- package/dist/client/assets/{alert-dialog-szhg9nbv.js → alert-dialog-CvkQwL5h.js} +1 -1
- package/dist/client/assets/{app-editor-C-GJQzq3.js → app-editor-B_pm__vT.js} +1 -1
- package/dist/client/assets/{auth-ylAHlhew.js → auth-Duwx_iL2.js} +1 -1
- package/dist/client/assets/{auth-catchall-C5WYUBq2.js → auth-catchall-CSy0uKFp.js} +1 -1
- package/dist/client/assets/{auth-entry-v4IJxk9p.js → auth-entry-C20r1MAB.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D6VmaiAh.js → auth-split-layout-BAnr4RmX.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-v9BhfxwO.js → authenticate-and-persist-oauth-C_sfC4y1.js} +1 -1
- package/dist/client/assets/{automation-list-row-BDQR6lip.js → automation-list-row-CSGFQlGB.js} +1 -1
- package/dist/client/assets/{automation-runs-CE9uyAtN.js → automation-runs-Cg17Xjs9.js} +1 -1
- package/dist/client/assets/{automations-YJ5Px3_a.js → automations-DzcGR2GP.js} +1 -1
- package/dist/client/assets/{avatar-C54BAvwV.js → avatar-DK4P1R5g.js} +1 -1
- package/dist/client/assets/{badge-WRzJoL2O.js → badge-BKEWn2TK.js} +1 -1
- package/dist/client/assets/{block-document-DUdX-3AH.js → block-document-NIWGLeAt.js} +1 -1
- package/dist/client/assets/{brand-context-BZ1-31a8.js → brand-context-CJDKvZr6.js} +1 -1
- package/dist/client/assets/{buckets-DsHDoGzh.js → buckets-diJYBJDb.js} +1 -1
- package/dist/client/assets/{capability-load-error-BhBYuN70.js → capability-load-error-CvoDXWMK.js} +1 -1
- package/dist/client/assets/{card-CZbszR9z.js → card-CAloKMup.js} +1 -1
- package/dist/client/assets/{category-editor-BSjmmy8p.js → category-editor-OJRcsrxS.js} +1 -1
- package/dist/client/assets/{chat-context-2a9Unx31.js → chat-context-B8Pf9_Ws.js} +1 -1
- package/dist/client/assets/{checkbox-BbXVn_YC.js → checkbox-BQjinmyU.js} +1 -1
- package/dist/client/assets/{cli-auth-success-UyrL3uNf.js → cli-auth-success-BUzt6pk1.js} +1 -1
- package/dist/client/assets/{collection-detail-BEFyIol2.js → collection-detail-BaUmzKIC.js} +1 -1
- package/dist/client/assets/{collection-display-button-CZL1yZYo.js → collection-display-button-DQ41t2NW.js} +1 -1
- package/dist/client/assets/{collection-search-DBIvyJJc.js → collection-search-oL_WM4rt.js} +1 -1
- package/dist/client/assets/{collection-tabs-C7lBi7ts.js → collection-tabs-BmqFW71W.js} +1 -1
- package/dist/client/assets/{command-yaXImYX7.js → command-D3tx4Z-o.js} +1 -1
- package/dist/client/assets/commerce-onboarding-BdejwHzi.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-8X7uGHQP.js → connect-desktop-dialog-cYgK2XT4.js} +1 -1
- package/dist/client/assets/{connection-card-B9W_RY27.js → connection-card-DS-KJfkn.js} +1 -1
- package/dist/client/assets/{connection-detail-q-5qcjda.js → connection-detail-DS2TWtDQ.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BzU7xnbX.js → connection-form-helpers-D6xKQSqh.js} +1 -1
- package/dist/client/assets/{connections-DZXZfK8S.js → connections-C20eJoml.js} +1 -1
- package/dist/client/assets/{context-menu-C5FEV_by.js → context-menu-Bv_k6cm6.js} +1 -1
- package/dist/client/assets/{decopilot-BJ5FU5R8.js → decopilot-7gVBBoRg.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CjP6zAlU.js → decopilot-sse-pool-85Pin_5c.js} +1 -1
- package/dist/client/assets/{dialog-lbyUpqPt.js → dialog-C2ETGOlj.js} +1 -1
- package/dist/client/assets/{domain-settings-Bxo_fvwt.js → domain-settings-DYnLYvkm.js} +1 -1
- package/dist/client/assets/{drawer-BZYAwdgw.js → drawer-CliHEmeh.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DF3B7I1K.js → dropdown-menu-DpexHxwz.js} +1 -1
- package/dist/client/assets/{empty-state-BAyVSC9K.js → empty-state-Bttcdn67.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C4TpBkxN.js → extract-connection-data-CdrxJbbw.js} +1 -1
- package/dist/client/assets/{file-explorer-BQgJH40A.js → file-explorer-KrE43sZb.js} +1 -1
- package/dist/client/assets/{file-type-icon-D7nzXwZZ.js → file-type-icon-BqeQzn3H.js} +1 -1
- package/dist/client/assets/{files-mQKfk-tg.js → files-YqKKAUmX.js} +1 -1
- package/dist/client/assets/{form-BGbfy77_.js → form-Bbk-lY-7.js} +1 -1
- package/dist/client/assets/{general-3ck_txNd.js → general-fC_qvwJN.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Dt_KVpAO.js → github-repo-picker-Cr4ZW67O.js} +1 -1
- package/dist/client/assets/{hooks-BdAROdrZ.js → hooks-BPl3QtCR.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-l8ENbsJP.js → import-from-deco-dialog-CPuC0ABC.js} +1 -1
- package/dist/client/assets/{index-n4Vo7V4h.js → index-B3I-Kacs.js} +1 -1
- package/dist/client/assets/{index-BKAnigFO.js → index-BHkcyC9T.js} +1 -1
- package/dist/client/assets/{index-D0fvhtT3.js → index-BONY-938.js} +1 -1
- package/dist/client/assets/{index-CInyex9M.js → index-BUBP8yoe.js} +1 -1
- package/dist/client/assets/{index-C6PDcnUv.js → index-BZ2bAvBZ.js} +5 -5
- package/dist/client/assets/{index-C0eVGhHT.js → index-C9HI3IQT.js} +1 -1
- package/dist/client/assets/{index-DOaXG0Oi.js → index-CF2fOu8a.js} +1 -1
- package/dist/client/assets/{index-Dg5jx7eC.js → index-CUkKcI0t.js} +1 -1
- package/dist/client/assets/{index-BUS-a-tW.js → index-CpYfLdbh.js} +3 -3
- package/dist/client/assets/{index-DlWRWOod.js → index-DUQAYjfP.js} +1 -1
- package/dist/client/assets/{index-waTLikGH.js → index-DiDBx4Jd.js} +1 -1
- package/dist/client/assets/{index-CuICTOkh.js → index-DkuCmq2i.js} +1 -1
- package/dist/client/assets/{index-Cj5OqjXz.js → index-Dnojhzzx.js} +1 -1
- package/dist/client/assets/{index-CqqoV_UO.js → index-JxN6NNcb.js} +1 -1
- package/dist/client/assets/{index-redirect-ChD654T3.js → index-redirect-DUmXObtL.js} +1 -1
- package/dist/client/assets/{input-D8TXMXM-.js → input-CIRD_tZz.js} +1 -1
- package/dist/client/assets/{integration-icon-D2yZ6MPG.js → integration-icon-DR2sJls0.js} +1 -1
- package/dist/client/assets/{label-CFlYbKnz.js → label-B97xU05r.js} +1 -1
- package/dist/client/assets/{login-CnaQyAhS.js → login-aqSvs4xu.js} +1 -1
- package/dist/client/assets/{mcp-oauth-oXYSrL8I.js → mcp-oauth-Djb0mwKI.js} +1 -1
- package/dist/client/assets/{members-BQ3iSjR0.js → members-LIiEPwh_.js} +1 -1
- package/dist/client/assets/{monaco-editor-D82OjyDd.js → monaco-editor-chBKXgor.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BuPr-4zl.js → monitoring-stats-row-B2OtnWGL.js} +1 -1
- package/dist/client/assets/{oauth-callback-DtstK2kL.js → oauth-callback-CPjT2KBB.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BgnPPSol.js → oauth-callback-ai-provider-CNvn3MnX.js} +1 -1
- package/dist/client/assets/{onboarding-CJH0Leuw.js → onboarding-Doy2esp8.js} +1 -1
- package/dist/client/assets/{org-install-D67sKYgq.js → org-install-DMtmX55L.js} +1 -1
- package/dist/client/assets/{org-layout-BLUbiGyn.js → org-layout-DBS5Dl9D.js} +1 -1
- package/dist/client/assets/{organization-choice-CHjmYj3j.js → organization-choice-BmyyAVCI.js} +1 -1
- package/dist/client/assets/{page-seo-form-C4I7m4Df.js → page-seo-form-Cq4dpyUr.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BchgKYRp.js +1 -0
- package/dist/client/assets/{popover-D2Q2Eswn.js → popover-Dg4e80gp.js} +1 -1
- package/dist/client/assets/{post-editor-Bv1F9MYX.js → post-editor-5nP4PxmA.js} +1 -1
- package/dist/client/assets/{preview-dialog-Bc2VzAN-.js → preview-dialog-CDJVefgZ.js} +1 -1
- package/dist/client/assets/{primitives-DHTHNxUS.js → primitives-DUdU_mJX.js} +1 -1
- package/dist/client/assets/{profile-B6N3yux5.js → profile-kBSMawrR.js} +1 -1
- package/dist/client/assets/project-app-view-BNdGMa0O.js +1 -0
- package/dist/client/assets/record-editor-BWfKPgxQ.js +1 -0
- package/dist/client/assets/registry-Bj4YS8KM.js +2 -0
- package/dist/client/assets/{registry-layout-Cy_01Sh1.js → registry-layout-CulqOQUe.js} +1 -1
- package/dist/client/assets/{require-capability-ClWn_lpQ.js → require-capability-BmO-FXvQ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-wwcnSe6F.js → required-auth-layout-k-s2E1Qb.js} +1 -1
- package/dist/client/assets/{reset-password-DaGLhf4o.js → reset-password-zxigX-0y.js} +1 -1
- package/dist/client/assets/roles-CnqkorpG.js +1 -0
- package/dist/client/assets/{save-status-CTER4gWs.js → save-status-BHYmpruK.js} +1 -1
- package/dist/client/assets/{scroll-area-CryCPcTg.js → scroll-area-D2_mdzGg.js} +1 -1
- package/dist/client/assets/{search-input-CeZYeezj.js → search-input-CIf1Vg9y.js} +1 -1
- package/dist/client/assets/{secrets-BrjgXM97.js → secrets-Chc4G-P7.js} +1 -1
- package/dist/client/assets/{sections-editor-F-BnnENl.js → sections-editor-JadmVfEe.js} +1 -1
- package/dist/client/assets/{select-BumbnE5Z.js → select-BVI-5ZuA.js} +1 -1
- package/dist/client/assets/{select-model-CTcIByf-.js → select-model-xkUMgIU9.js} +1 -1
- package/dist/client/assets/{seo-editor-ClI_EAvi.js → seo-editor-CI81KXn7.js} +1 -1
- package/dist/client/assets/{settings-layout-DXkAusB2.js → settings-layout-BhTO_Kmx.js} +1 -1
- package/dist/client/assets/{settings-section-C5bkQp2g.js → settings-section-Cjt1BmIe.js} +1 -1
- package/dist/client/assets/{sheet-BbFKIkah.js → sheet-BRZ8PIrM.js} +1 -1
- package/dist/client/assets/{shell-controls-DGWPxiPv.js → shell-controls-pLFf4RJ7.js} +1 -1
- package/dist/client/assets/{shell-layout-C9OrPrc4.js → shell-layout-DRb4EqiB.js} +1 -1
- package/dist/client/assets/{shell-route-loading-DaawUhrG.js → shell-route-loading-DuHKXv9P.js} +1 -1
- package/dist/client/assets/{sidebar-DaurSYcm.js → sidebar-Bnk9mrkf.js} +1 -1
- package/dist/client/assets/{skeleton-C0NWZPiq.js → skeleton-DHujU9w_.js} +1 -1
- package/dist/client/assets/{sortable.esm-BqlsxZdn.js → sortable.esm-Cxy3zG7_.js} +1 -1
- package/dist/client/assets/{sso-9s_kUvCN.js → sso-Bx7AxsDg.js} +1 -1
- package/dist/client/assets/{store-Ba8mcjDx.js → store-B8dfBRZv.js} +1 -1
- package/dist/client/assets/store-registry-Dw6Kxeid.js +2 -0
- package/dist/client/assets/{studio-tools-BO3QwsEE.js → studio-tools-DgyOaysE.js} +1 -1
- package/dist/client/assets/{switch-B87bQp16.js → switch-Bkziulms.js} +1 -1
- package/dist/client/assets/{table-N4-giWdo.js → table-KIotO0Kc.js} +1 -1
- package/dist/client/assets/{tabs-CRPtX_rJ.js → tabs-DHLQ27WW.js} +1 -1
- package/dist/client/assets/{task-status-2UEXnm8o.js → task-status-f5DTkB-J.js} +1 -1
- package/dist/client/assets/{textarea-Du6Le5sO.js → textarea-B3tIZUed.js} +1 -1
- package/dist/client/assets/{toggle-group-CBnuvlgo.js → toggle-group-CRyR0oMn.js} +1 -1
- package/dist/client/assets/{toolbar-DdFuWthq.js → toolbar-C_VPmr7n.js} +1 -1
- package/dist/client/assets/{tooltip-xmkm89yV.js → tooltip-CJMltTIZ.js} +1 -1
- package/dist/client/assets/{types-D8C9oPp4.js → types-COD2S7bi.js} +1 -1
- package/dist/client/assets/{use-ai-providers-9J9bNHdx.js → use-ai-providers-C9TDMEuy.js} +1 -1
- package/dist/client/assets/{use-automations-D_7wf0xL.js → use-automations-DJZ5x0Zc.js} +1 -1
- package/dist/client/assets/{use-capability-DNSU4SSH.js → use-capability-B1kzuPXs.js} +1 -1
- package/dist/client/assets/{use-clock-tick-6wGCr9QA.js → use-clock-tick-CMT1YGdo.js} +1 -1
- package/dist/client/assets/{use-collections-FvPggnCf.js → use-collections-BLUmcReO.js} +1 -1
- package/dist/client/assets/{use-connection-C3KlVqRc.js → use-connection-w2D8E4uB.js} +1 -1
- package/dist/client/assets/{use-copy-DvqrWhoO.js → use-copy-B3D09Hxq.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CTi94rag.js → use-create-virtual-mcp-Ct9eNtwu.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BtHhY3kf.js → use-debounced-autosave-6krVFdTN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Ba_GRKCM.js → use-delete-connection-DFc5oU0M.js} +1 -1
- package/dist/client/assets/{use-file-configs-Pe4NRgWE.js → use-file-configs-2PCi1klw.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DL5hyVmQ.js → use-infinite-scroll-_XAuQc_I.js} +1 -1
- package/dist/client/assets/{use-join-requests-D_Gq_19N.js → use-join-requests-DYWv9410.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CLcTwBS1.js → use-mcp-client-DN-NMZV3.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DC-bHnlV.js → use-mcp-prompts-C617vkSu.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DHra8uvX.js → use-mcp-tools-HiR2aat0.js} +1 -1
- package/dist/client/assets/{use-members-DARPXJlK.js → use-members-C2aOC6i6.js} +1 -1
- package/dist/client/assets/{use-mobile-DFs3QJqY.js → use-mobile-Dl3xzohk.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-rF0GaXHe.js → use-navigate-to-agent-Cv7a1gGO.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C7qnan75.js → use-org-auth-client-DuB9kXBr.js} +1 -1
- package/dist/client/assets/{use-org-sso-Bo9vUunv.js → use-org-sso-DqXQdm0q.js} +1 -1
- package/dist/client/assets/{use-organization-roles-De8oePVP.js → use-organization-roles-8bKwxyLc.js} +1 -1
- package/dist/client/assets/{use-organization-settings-57SGXats.js → use-organization-settings-CQ99RcOM.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Ii3j5xH_.js → use-registry-connections-O8z8zBrP.js} +1 -1
- package/dist/client/assets/{use-secrets-C4ru1qie.js → use-secrets-B2tL3Eiw.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BP_ijgUo.js → use-status-sounds-ChxrQq8Q.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bl_CH29I.js → use-view-mode-D4efzYWD.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DgKfTExI.js → use-virtual-mcp-BZBO6fTt.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D1y00mLl.js +1 -0
- package/dist/client/assets/{useQueries-CgTem5R4.js → useQueries-BUNJnzbM.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BiCq230f.js +1 -0
- package/dist/client/assets/{variant-calendar-CyMRGA_z.js → variant-calendar-BRzmbMAw.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DNw1iw_b.js → view-mode-toggle-FA5jZlaq.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +464 -465
- package/dist/server/server.js +299 -299
- package/package.json +1 -1
- package/dist/client/assets/commerce-onboarding-DrBs9RF7.js +0 -1
- package/dist/client/assets/page-seo-sheet-YKiIzrJb.js +0 -1
- package/dist/client/assets/project-app-view-BELIYBcW.js +0 -1
- package/dist/client/assets/record-editor-DaT6c7WV.js +0 -1
- package/dist/client/assets/registry-DCDFj_rf.js +0 -2
- package/dist/client/assets/roles-CaiOtbXD.js +0 -1
- package/dist/client/assets/store-registry-DEktUT3r.js +0 -2
- package/dist/client/assets/useInfiniteQuery-uhUmaTO5.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DjACAiSm.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bg as fd,bh as Be,bi as jo,s as $,ak as Ae,aF as gt,bj as Os,aC as me,bk as ar,bl as Ge,aD as Wt,bm as Cn,o as W,bn as Es,bo as Oo,bp as md,bq as hd,br as xl,bs as pd,bt as gd,bu as yd,bv as vl,bw as bd,b6 as ft,bx as xd,aE as ht,by as vd,c as Te,r as P,l as ei,j as h,aP as Sl,C as As,a as Sd,t as $r,bz as Cs,bA as wl,bB as wd,bC as jd,bf as jl,bD as _s,R as Od,bE as Ed,bF as Ad,bG as Cd,a2 as _d,V as fn,U as gr,Z as _n,ah as Id,ai as Td,bH as Pd,X as Nd,bI as kd,B as ti,i as Is,b as Fd,E as $d,aa as Rd}from"./index-BUS-a-tW.js";import{P as Mn}from"./index-waTLikGH.js";import{E as Ol}from"./empty-state-BAyVSC9K.js";import{A as El,f as Dd,h as Md,n as Ud,j as Ld,k as Bd,i as zd,u as Vd}from"./use-mcp-client-CLcTwBS1.js";import{c as qd}from"./use-mcp-tools-DHra8uvX.js";import{c as Wd}from"./ZoomOut-Bpyue_Zw.js";import{i as Hd}from"./Key01-NlklfK2W.js";import{b as Gd,u as Kd,a as Yd}from"./use-connection-C3KlVqRc.js";import{U as Un,a as xi,e as Eo}from"./auth-ylAHlhew.js";import{i as Jd,c as Zd,d as Xd,e as Qd}from"./extract-connection-data-C4TpBkxN.js";import{u as ef}from"./use-registry-connections-Ii3j5xH_.js";import{b as tf}from"./use-organization-settings-57SGXats.js";import{s as nf}from"./Plus-DiPCnPyI.js";import{e as Al,S as rf,a as sf,b as of,c as af,d as lf}from"./select-BumbnE5Z.js";import{R as Ao}from"./index-Dg5jx7eC.js";import{R as cf,I as uf,a as df}from"./index-C0eVGhHT.js";import{_ as Zt}from"./index-n4Vo7V4h.js";import{A as Cl}from"./agent-icon-Dh6cDydc.js";import{I as ff}from"./input-D8TXMXM-.js";import{a as mf,b as hf,P as pf}from"./popover-D2Q2Eswn.js";import{b as gf,a as yf,c as bf,T as xf}from"./tooltip-xmkm89yV.js";import{u as vf}from"./use-virtual-mcp-DgKfTExI.js";import{i as Sf}from"./ChevronUp-5yVty_-J.js";import{i as wf}from"./SearchMd-CKZEESAy.js";import{a as jf}from"./Users03-fR0V8I72.js";import{u as Of}from"./use-mobile-DFs3QJqY.js";import{u as Ef}from"./use-create-virtual-mcp-CTi94rag.js";function Af(){const e=new El({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return fd(e),e}class Cf{#e=Af();#t=new Map;#n=new WeakMap;getValidator(t){const n=this.#n.get(t);if(n)return n;let r;const i=s=>{if(!r){const o=_f(t);let a=this.#t.get(o);a||(a=this.#e.compile(t),this.#t.set(o,a)),r=a}return r(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this.#e.errorsText(r.errors)}};return this.#n.set(t,i),i}}function _f(e){return JSON.stringify(e,(t,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const If=new Cf;var Tf=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||Ae();i instanceof Cn&&(e.number=i.int())}}},Pf=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=Ge(n):typeof n=="number"?e.number=Ge(n):typeof n=="boolean"?e.boolean=Ge(n):n===null?e.null=Os():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},Nf=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?Os():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return Ge(e[0]);if(t==="string")return Wt(e);if(t==="number"){const[n,r,...i]=e;return ar([Ge(n),Ge(r),...i.map(s=>Ge(s))])}return t==="boolean"?ar([Ge(!0),Ge(!1)]):!1}},kf=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=yd();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Ff=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=$())}},$f=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||$();r instanceof Es&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Rf=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||$();r instanceof Es&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Df=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||$();if(r instanceof Es){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},Mf=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(e.number=r.min(n.minimum))}}},Uf=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(e.number=r.max(n.maximum))}}},Lf=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},Bf=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},zf=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Vf=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=me(Be()))}},qf=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||me(Be())).min(n.minItems))}},Wf=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||me(Be())).max(n.maxItems))}},Hf=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||me(Be());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=ke(n.items);let i=me(r);if(e.array&&e.array instanceof md){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||me(Be()):e.array=me(Be()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||me(Be()):n.prefixItems&&(e.array=e.array||me(Be()))}},Gf=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>ke(s));let i;r.length===0?i=Oo([]):i=Oo(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},Kf=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||W({}).passthrough())}},Yf=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=W({}).passthrough())}},Jf=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||W({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Zf=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||W({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function lr(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>lr(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&lr(e[i],t[i]))}return!1}function Xf(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>lr(n,i))?!1:(t.push(n),!0))}}function Wr(e,t){return e.safeParse(t).success}var Qf=class{apply(e,t){if(!t.not)return e;const n=ke(t.not);return e.refine(r=>!Wr(n,r),{message:"Value must not match the 'not' schema"})}},em=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Xf(),{message:"Array items must be unique"})}},tm=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>ke(r)).reduce((r,i)=>xl(r,i),e)}},nm=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?ke(t.anyOf[0]):ar([ke(t.anyOf[0]),ke(t.anyOf[1]),...t.anyOf.slice(2).map(r=>ke(r))]);return xl(e,n)}},rm=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>ke(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},im=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>ke(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Wr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=ke(n.items);for(let a=i.length;a<s.length;a++)if(!Wr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},sm=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof pd||e instanceof gd){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=ke(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?W(r):W(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!ke(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},om=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>lr(r,i)),{message:"Value must match one of the enum values"})}},am=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>lr(r,n),{message:"Value must equal the const value"})}},lm=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},cm=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Be().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},um=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=ke(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)Wr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},dm=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},fm=[new Pf,new Nf,new Tf,new kf,new Ff,new Vf,new Yf,new $f,new Rf,new Df,new Mf,new Uf,new Lf,new Bf,new zf,new Gf,new qf,new Wf,new Hf,new Jf,new Zf,new Kf],mm=[new cm,new om,new am,new tm,new nm,new rm,new im,new sm,new um,new Qf,new em,new dm,new lm];function ke(e){if(typeof e=="boolean")return e?Be():jo();const t={};for(const i of fm)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||$()),t.number!==!1&&n.push(t.number||Ae()),t.boolean!==!1&&n.push(t.boolean||gt()),t.null!==!1&&n.push(t.null||Os()),t.array!==!1&&n.push(t.array||me(Be())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=hd(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=jo():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=ar(n):r=Be();for(const i of mm)r=i.apply(r,e);return r}class Co extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_o(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_o(this),n)}}function hm(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Ji(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Ji).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Ji(e.cause)}`:e.message:`${e}`}function _o(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var _l=e=>{throw TypeError(e)},Ts=(e,t,n)=>t.has(e)||_l("Cannot "+n),re=(e,t,n)=>(Ts(e,t,"read from private field"),n?n.call(e):t.get(e)),Ce=(e,t,n)=>t.has(e)?_l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ve=(e,t,n,r)=>(Ts(e,t,"write to private field"),t.set(e,n),n),dt=(e,t,n)=>(Ts(e,t,"access private method"),n),Re,Vt,ln,Rr,Hr,Xn,mn,Qn,Ct,cn,yn,un,Hn,He,Zi,Xi,Qi,Io,es,ts,Gn,ns,rs;class Dr extends EventTarget{constructor(t,n){var r,i;super(),Ce(this,He),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Ce(this,Re),Ce(this,Vt),Ce(this,ln),Ce(this,Rr),Ce(this,Hr),Ce(this,Xn),Ce(this,mn),Ce(this,Qn,null),Ce(this,Ct),Ce(this,cn),Ce(this,yn,null),Ce(this,un,null),Ce(this,Hn,null),Ce(this,Xi,async s=>{var o;re(this,cn).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){dt(this,He,Gn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?ve(this,ln,new URL(s.url)):ve(this,ln,void 0),c!==200){dt(this,He,Gn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){dt(this,He,Gn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(re(this,Re)===this.CLOSED)return;ve(this,Re,this.OPEN);const d=new Event("open");if((o=re(this,Hn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){dt(this,He,Gn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const m=new TextDecoder,y=a.getReader();let f=!0;do{const{done:p,value:b}=await y.read();b&&re(this,cn).feed(m.decode(b,{stream:!p})),p&&(f=!1,re(this,cn).reset(),dt(this,He,ns).call(this))}while(f)}),Ce(this,Qi,s=>{ve(this,Ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&dt(this,He,ns).call(this,Ji(s))}),Ce(this,es,s=>{typeof s.id=="string"&&ve(this,Qn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:re(this,ln)?re(this,ln).origin:re(this,Vt).origin,lastEventId:s.id||""});re(this,un)&&(!s.event||s.event==="message")&&re(this,un).call(this,o),this.dispatchEvent(o)}),Ce(this,ts,s=>{ve(this,Xn,s)}),Ce(this,rs,()=>{ve(this,mn,void 0),re(this,Re)===this.CONNECTING&&dt(this,He,Zi).call(this)});try{if(t instanceof URL)ve(this,Vt,t);else if(typeof t=="string")ve(this,Vt,new URL(t,pm()));else throw new Error("Invalid URL")}catch{throw hm("An invalid or illegal string was specified")}ve(this,cn,Dd({onEvent:re(this,es),onRetry:re(this,ts)})),ve(this,Re,this.CONNECTING),ve(this,Xn,3e3),ve(this,Hr,(r=n?.fetch)!=null?r:globalThis.fetch),ve(this,Rr,(i=n?.withCredentials)!=null?i:!1),dt(this,He,Zi).call(this)}get readyState(){return re(this,Re)}get url(){return re(this,Vt).href}get withCredentials(){return re(this,Rr)}get onerror(){return re(this,yn)}set onerror(t){ve(this,yn,t)}get onmessage(){return re(this,un)}set onmessage(t){ve(this,un,t)}get onopen(){return re(this,Hn)}set onopen(t){ve(this,Hn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){re(this,mn)&&clearTimeout(re(this,mn)),re(this,Re)!==this.CLOSED&&(re(this,Ct)&&re(this,Ct).abort(),ve(this,Re,this.CLOSED),ve(this,Ct,void 0))}}Re=new WeakMap,Vt=new WeakMap,ln=new WeakMap,Rr=new WeakMap,Hr=new WeakMap,Xn=new WeakMap,mn=new WeakMap,Qn=new WeakMap,Ct=new WeakMap,cn=new WeakMap,yn=new WeakMap,un=new WeakMap,Hn=new WeakMap,He=new WeakSet,Zi=function(){ve(this,Re,this.CONNECTING),ve(this,Ct,new AbortController),re(this,Hr)(re(this,Vt),dt(this,He,Io).call(this)).then(re(this,Xi)).catch(re(this,Qi))},Xi=new WeakMap,Qi=new WeakMap,Io=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...re(this,Qn)?{"Last-Event-ID":re(this,Qn)}:void 0},cache:"no-store",signal:(e=re(this,Ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},es=new WeakMap,ts=new WeakMap,Gn=function(e,t){var n;re(this,Re)!==this.CLOSED&&ve(this,Re,this.CLOSED);const r=new Co("error",{code:t,message:e});(n=re(this,yn))==null||n.call(this,r),this.dispatchEvent(r)},ns=function(e,t){var n;if(re(this,Re)===this.CLOSED)return;ve(this,Re,this.CONNECTING);const r=new Co("error",{code:t,message:e});(n=re(this,yn))==null||n.call(this,r),this.dispatchEvent(r),ve(this,mn,setTimeout(re(this,rs),re(this,Xn)))},rs=new WeakMap,Dr.CONNECTING=0,Dr.OPEN=1,Dr.CLOSED=2;function pm(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class gm extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class ym{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=Md(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Un("No auth provider");let t;try{t=await xi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new Un;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=Ud(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new Dr(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=Eo(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new gm(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=vl.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new Un("No auth provider");if(await xi(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Un("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=Eo(i);if(this._resourceMetadataUrl=o,this._scope=a,await xi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Un;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const bm="mcp";class xm{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,bm),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=vl.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class vm extends Ld{constructor(t,n){super(t,n)}send(t,n){const r=Sm(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function Sm(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class wm extends Bd{constructor(t,n){super(t,{jsonSchemaValidator:If,...n})}async listTools(t,n){return await this.request({method:"tools/list",params:t},bd,n)}}const jm=async(e,t,n)=>{const r=Om(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new wm({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Om=(e,t,n)=>{if(e.type==="Websocket")return new xm(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new ym(new URL(e.url),s)}return new vm(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},To=e=>{try{return JSON.parse(e)}catch{return e}},Cr=new Map,Po=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?ke(e.inputSchema):void 0,outputSchema:e.outputSchema?ke(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function Em(e){const t=n=>"connection"in e?jm({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),d=u?{"x-trace-debug-id":u}:void 0,{client:m}=await t(d),{structuredContent:y,isError:f,content:p}=await m.callTool({name:String(c),arguments:l});if(f){const w=p?.[0]?.text,S=typeof w=="string"?To(w):null,E=S?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(S.code,S.message,S.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(y??p)}`)}if(y!==void 0)return y;const b=p?.[0]?.text;return typeof b=="string"?To(b):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return Cr.has(c)||Cr.set(c,s()),await Cr.get(c)}catch(u){console.error("Failed to list tools",u),Cr.delete(c);return}}async function a(){return(await o()??[]).map(c=>Po(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Po(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Am({connection:n}):global[t]}});function Am(e){return Em(e)}function Cm(e){return{isImplementedBy:t=>{for(const n of e){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=t.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const _m=W({id:$().describe("Unique identifier for the entity"),title:$().describe("Human-readable title for the entity"),description:$().nullish().describe("Description of the entity"),created_at:$().datetime(),updated_at:$().datetime(),created_by:$().optional(),updated_by:$().optional()}),Im=W({field:me($()),operator:Wt(["eq","gt","gte","lt","lte","in","like","contains"]),value:ft()}),Il=xd(()=>ar([Im,W({operator:Wt(["and","or","not"]),conditions:me(Il)})])),Tm=W({field:me($()),direction:Wt(["asc","desc"]),nulls:Wt(["first","last"]).optional()}),Pm=W({where:Il.optional().describe("Filter expression"),orderBy:me(Tm).optional().describe("Sort expressions"),limit:Ae().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Ae().int().min(0).optional().describe("Number of items to skip")});function Nm(e){return W({items:me(e).describe("Array of collection items"),totalCount:Ae().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:gt().optional().describe("Whether there are more items available")})}const km=W({id:$().describe("ID of the entity to retrieve")});function Fm(e){return W({item:e.nullable().describe("The retrieved item, or null if not found")})}W({id:$().describe("ID of the entity to delete")});function $m(e,t,n){const r=e.toUpperCase();return[{name:`COLLECTION_${r}_LIST`,inputSchema:Pm,outputSchema:Nm(t)},{name:`COLLECTION_${r}_GET`,inputSchema:km,outputSchema:Fm(t)}]}const Rm=W({id:$(),name:$(),description:$().optional(),inputSchema:ht($(),ft()),outputSchema:ht($(),ft()).optional()}),Dm=_m.extend({_meta:W({"io.decocms":W({id:$(),verified:gt(),scopeName:$(),appName:$(),friendlyName:$().nullable().optional(),metadata:ht($(),ft()).nullable().optional(),publishedAt:$().datetime().optional(),updatedAt:$().datetime().optional(),tools:me(Rm).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:W({$schema:$().optional(),_meta:ht($(),ft()).optional(),name:$().describe("The server name (scope/app)"),title:$().optional().describe("User-friendly title"),description:$().optional().describe("Server description"),icons:me(W({src:$(),mimeType:$().optional(),sizes:me($()).optional(),theme:Wt(["light","dark"]).optional()})).optional(),remotes:me(W({type:Wt(["http","stdio","sse"]),url:$().optional(),headers:me(ft()).optional()})).optional(),packages:me(ft()).optional(),repository:W({url:$(),source:$().optional(),subfolder:$().optional()}).optional(),version:$().optional(),websiteUrl:$().optional()})});$m("registry_app",Dm);const Mm=W({specversion:Ge("1.0").describe("CloudEvents specification version"),id:$().describe("Unique identifier for this event (UUID recommended)"),source:$().describe("Connection ID of the event publisher"),type:$().describe("Event type (e.g., 'order.created', 'user.signup')"),time:$().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:$().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:$().optional().default("application/json").describe("Content type of the data attribute"),dataschema:$().url().optional().describe("URI to the schema for the data attribute"),data:ft().optional().describe("Event payload (any JSON value)")});W({events:me(Mm).min(1).describe("Batch of CloudEvents to process")});const Um=W({success:gt().optional().describe("Whether this event was processed successfully"),error:$().optional().describe("Error message for this event"),retryAfter:Ae().int().positive().optional().describe("Re-deliver this event after this many ms")});W({success:gt().optional().describe("Batch success - applies to events not in results"),error:$().optional().describe("Batch error message - applies to events not in results"),processedCount:Ae().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Ae().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:ht($(),Um).optional().describe("Per-event results keyed by event ID")});const Lm=W({type:Ge("string"),enum:me($()).optional(),description:$().optional()}),Bm=W({type:$(),description:$(),paramsSchema:ht($(),Lm)});W({});W({triggers:me(Bm)});W({type:$(),params:ht($(),$()),enabled:gt(),callbackUrl:vd().optional(),callbackToken:$().min(1).optional()});W({success:gt()});W({prefix:$().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Ae().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:$().optional().describe("Token for pagination from previous response"),delimiter:$().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});W({objects:me(W({key:$().describe("Object key/path"),size:Ae().describe("Object size in bytes"),lastModified:$().describe("Last modified timestamp"),etag:$().describe("Entity tag for the object")})),nextContinuationToken:$().optional().describe("Token for fetching next page of results"),isTruncated:gt().describe("Whether there are more results available"),commonPrefixes:me($()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});W({key:$().describe("Object key/path to get metadata for")});W({contentType:$().optional().describe("MIME type of the object"),contentLength:Ae().describe("Size of the object in bytes"),lastModified:$().describe("Last modified timestamp"),etag:$().describe("Entity tag for the object"),metadata:ht($(),$()).optional().describe("Custom metadata key-value pairs")});W({key:$().describe("Object key/path to generate URL for"),expiresIn:Ae().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});W({url:$().describe("Presigned URL for downloading the object"),expiresIn:Ae().describe("Expiration time in seconds that was used")});W({key:$().describe("Object key/path for the upload"),expiresIn:Ae().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:$().optional().describe("MIME type for the object being uploaded")});W({url:$().describe("Presigned URL for uploading the object"),expiresIn:Ae().describe("Expiration time in seconds that was used")});W({key:$().describe("Object key/path to delete")});W({success:gt().describe("Whether the deletion was successful"),key:$().describe("The key that was deleted")});W({keys:me($()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});W({deleted:me($()).describe("Array of successfully deleted keys"),errors:me(W({key:$(),message:$()})).describe("Array of errors for failed deletions")});const zm=W({primary:$().optional().describe("Primary brand color (hex)"),secondary:$().optional().describe("Secondary brand color (hex)"),accent:$().optional().describe("Accent / highlight color (hex)"),background:$().optional().describe("Background color (hex)"),foreground:$().optional().describe("Foreground / text color (hex)")}),Vm=W({heading:$().optional().describe("Font family for headings"),body:$().optional().describe("Font family for body text"),code:$().optional().describe("Font family for code / monospace")}),qm=W({logo:$().optional().describe("Logo URL"),favicon:$().optional().describe("Favicon URL"),ogImage:$().optional().describe("Open Graph image URL")}),Wm=W({id:$(),name:$().describe("Brand / company name"),domain:$().optional().describe("Company domain (e.g. example.com)"),colors:zm.optional().describe("Semantic color palette"),fonts:Vm.optional().describe("Font families by role"),assets:qm.optional().describe("Visual identity assets"),overview:$().optional().describe("Company overview / description"),tagline:$().optional().describe("Brand tagline"),tone:$().optional().describe("Tone of voice description"),metadata:ht($(),ft()).optional().describe("Extra design tokens and metadata")});W({id:$().optional().describe("Brand ID. Omit to get the default brand.")});W({});W({items:me(Wm)});const Hm={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function Gm(e){if(e)return Hm[e]}function EA(e,t){const n=e.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=t.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return Cm(i).isImplementedBy(r)}const Ps=P.createContext(null);function AA(e){const t=Te.c(3),{children:n}=e,r=P.useContext(Ps);if(!r?.tabsEl)return null;let i;return t[0]!==n||t[1]!==r.tabsEl?(i=Sl.createPortal(n,r.tabsEl),t[0]=n,t[1]=r.tabsEl,t[2]=i):i=t[2],i}function Km(e){const t=Te.c(3),{children:n}=e,r=P.useContext(Ps);if(!r?.actionsEl)return null;let i;return t[0]!==n||t[1]!==r.actionsEl?(i=Sl.createPortal(n,r.actionsEl),t[0]=n,t[1]=r.actionsEl,t[2]=i):i=t[2],i}const CA=Km;function _A(e){const t=Te.c(21),{children:n,breadcrumb:r,hideHeader:i}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftEl:null,tabsEl:null,actionsEl:null},t[0]=s):s=t[0];const[o,a]=P.useState(s),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null);let d;t[1]===Symbol.for("react.memo_cache_sentinel")?(d=C=>{l.current=C,C&&a(_=>_.leftEl===C?_:{..._,leftEl:C})},t[1]=d):d=t[1];const m=d;let y;t[2]===Symbol.for("react.memo_cache_sentinel")?(y=C=>{c.current=C,C&&a(_=>_.tabsEl===C?_:{..._,tabsEl:C})},t[2]=y):y=t[2];const f=y;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=C=>{u.current=C,C&&a(_=>_.actionsEl===C?_:{..._,actionsEl:C})},t[3]=p):p=t[3];const b=p,w=i&&"hidden";let S;t[4]!==w?(S=ei(w),t[4]=w,t[5]=S):S=t[5];let E;t[6]===Symbol.for("react.memo_cache_sentinel")?(E=h.jsx("div",{ref:m,className:"flex items-center gap-2 min-w-0"}),t[6]=E):E=t[6];let O;t[7]!==r?(O=h.jsxs(Mn.Header.Left,{children:[r,E]}),t[7]=r,t[8]=O):O=t[8];let g;t[9]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsxs(Mn.Header.Right,{children:[h.jsx("div",{ref:f,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),h.jsx("div",{ref:b,className:"flex items-center gap-2 shrink-0"})]}),t[9]=g):g=t[9];let v;t[10]!==S||t[11]!==O?(v=h.jsxs(Mn.Header,{className:S,children:[O,g]}),t[10]=S,t[11]=O,t[12]=v):v=t[12];let j;t[13]!==n?(j=h.jsx(Mn.Content,{children:n}),t[13]=n,t[14]=j):j=t[14];let x;t[15]!==v||t[16]!==j?(x=h.jsxs(Mn,{children:[v,j]}),t[15]=v,t[16]=j,t[17]=x):x=t[17];let A;return t[18]!==o||t[19]!==x?(A=h.jsx(Ps,{value:o,children:x}),t[18]=o,t[19]=x,t[20]=A):A=t[20],A}function Ym(e){return e.startsWith("@")?e:`@${e}`}function Jm(){const{org:e}=As(),{data:t}=Sd.useSession(),n=Gd(),r=ef(),i=tf(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!e||!t?.user?.id){$r.error("Not authenticated");return}const l=Ym(a),u=(await Promise.all(s.map(async p=>{const b=Jd(p.id,e.id);try{const w=await Zd(p.id,e.id,e.slug,b,{where:{appName:l}});return Xd(w??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!u){$r.error(`MCP Server not found in registry: ${a}`);return}const d=Qd(u,e.id,t.user.id),m=d.connection_type==="STDIO",y=!!d.connection_url,f=m&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!y&&!f){$r.error("This MCP Server cannot be connected: no connection method available");return}return await n.create.mutateAsync(d),{id:d.id,connection:d}},isInstalling:n.create.isPending}}function Y(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Zm(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Y(e.additionalItems)}function No(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const mt="__additional_property",hn="additionalProperties",kt="allOf",ae="anyOf",$e="const",Ht="default",Ns="dependencies",Xm="enum",Pe="__errors",ge="$id",ks="if",xn="items",Qm="_$junk_option_schema_id$_",Mr="$name",Q="oneOf",is="patternProperties",ue="properties",vi="readonly",Tl="required",Gr="submitButtonOptions",pe="$ref",er="__rjsf_ref",Kn="$schema",Pl="root",Nl="_",eh=["discriminator","propertyName"],ko="formContext",th="layoutGridLookupMap",Fs="__rjsf_additionalProperties",kl="__rjsf_rootSchema",nh="ui:field",$s="ui:widget",It="ui:options",ss="ui:globalOptions",rh="ui:definitions",ih="https://json-schema.org/draft/2019-09/schema",Ur="https://json-schema.org/draft/2020-12/schema";function H(e={},t={}){return e?Object.keys(e).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=e[r];return r===$s&&Y(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===It&&Y(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t}):{...t}}function Fl(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=H(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var $l=typeof global=="object"&&global&&global.Object===Object&&global,sh=typeof self=="object"&&self&&self.Object===Object&&self,at=$l||sh||Function("return this")(),ze=at.Symbol,Rl=Object.prototype,oh=Rl.hasOwnProperty,ah=Rl.toString,Ln=ze?ze.toStringTag:void 0;function lh(e){var t=oh.call(e,Ln),n=e[Ln];try{e[Ln]=void 0;var r=!0}catch{}var i=ah.call(e);return r&&(t?e[Ln]=n:delete e[Ln]),i}var ch=Object.prototype,uh=ch.toString;function dh(e){return uh.call(e)}var fh="[object Null]",mh="[object Undefined]",Fo=ze?ze.toStringTag:void 0;function yt(e){return e==null?e===void 0?mh:fh:Fo&&Fo in Object(e)?lh(e):dh(e)}function Dl(e,t){return function(n){return e(t(n))}}var ni=Dl(Object.getPrototypeOf,Object);function Ve(e){return e!=null&&typeof e=="object"}var hh="[object Object]",ph=Function.prototype,gh=Object.prototype,Ml=ph.toString,yh=gh.hasOwnProperty,bh=Ml.call(Object);function Ft(e){if(!Ve(e)||yt(e)!=hh)return!1;var t=ni(e);if(t===null)return!0;var n=yh.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ml.call(n)==bh}function os(e){const t={[Pe]:[],addError(n){this[Pe].push(n)}};if(Array.isArray(e))return e.reduce((n,r,i)=>({...n,[i]:os(r)}),t);if(Ft(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:os(n[i])}),t)}return t}var Ie=Array.isArray,xh="[object Symbol]";function yr(e){return typeof e=="symbol"||Ve(e)&&yt(e)==xh}var vh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sh=/^\w*$/;function Rs(e,t){if(Ie(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||yr(e)?!0:Sh.test(e)||!vh.test(e)||t!=null&&e in Object(t)}function le(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var wh="[object AsyncFunction]",jh="[object Function]",Oh="[object GeneratorFunction]",Eh="[object Proxy]";function br(e){if(!le(e))return!1;var t=yt(e);return t==jh||t==Oh||t==wh||t==Eh}var Si=at["__core-js_shared__"],$o=(function(){var e=/[^.]+$/.exec(Si&&Si.keys&&Si.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Ah(e){return!!$o&&$o in e}var Ch=Function.prototype,_h=Ch.toString;function Xt(e){if(e!=null){try{return _h.call(e)}catch{}try{return e+""}catch{}}return""}var Ih=/[\\^$.*+?()[\]{}|]/g,Th=/^\[object .+?Constructor\]$/,Ph=Function.prototype,Nh=Object.prototype,kh=Ph.toString,Fh=Nh.hasOwnProperty,$h=RegExp("^"+kh.call(Fh).replace(Ih,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Rh(e){if(!le(e)||Ah(e))return!1;var t=br(e)?$h:Th;return t.test(Xt(e))}function Dh(e,t){return e?.[t]}function Qt(e,t){var n=Dh(e,t);return Rh(n)?n:void 0}var cr=Qt(Object,"create");function Mh(){this.__data__=cr?cr(null):{},this.size=0}function Uh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lh="__lodash_hash_undefined__",Bh=Object.prototype,zh=Bh.hasOwnProperty;function Vh(e){var t=this.__data__;if(cr){var n=t[e];return n===Lh?void 0:n}return zh.call(t,e)?t[e]:void 0}var qh=Object.prototype,Wh=qh.hasOwnProperty;function Hh(e){var t=this.__data__;return cr?t[e]!==void 0:Wh.call(t,e)}var Gh="__lodash_hash_undefined__";function Kh(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=cr&&t===void 0?Gh:t,this}function Gt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gt.prototype.clear=Mh;Gt.prototype.delete=Uh;Gt.prototype.get=Vh;Gt.prototype.has=Hh;Gt.prototype.set=Kh;function Yh(){this.__data__=[],this.size=0}function xr(e,t){return e===t||e!==e&&t!==t}function ri(e,t){for(var n=e.length;n--;)if(xr(e[n][0],t))return n;return-1}var Jh=Array.prototype,Zh=Jh.splice;function Xh(e){var t=this.__data__,n=ri(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Zh.call(t,n,1),--this.size,!0}function Qh(e){var t=this.__data__,n=ri(t,e);return n<0?void 0:t[n][1]}function ep(e){return ri(this.__data__,e)>-1}function tp(e,t){var n=this.__data__,r=ri(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function bt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bt.prototype.clear=Yh;bt.prototype.delete=Xh;bt.prototype.get=Qh;bt.prototype.has=ep;bt.prototype.set=tp;var ur=Qt(at,"Map");function np(){this.size=0,this.__data__={hash:new Gt,map:new(ur||bt),string:new Gt}}function rp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ii(e,t){var n=e.__data__;return rp(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ip(e){var t=ii(this,e).delete(e);return this.size-=t?1:0,t}function sp(e){return ii(this,e).get(e)}function op(e){return ii(this,e).has(e)}function ap(e,t){var n=ii(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function xt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xt.prototype.clear=np;xt.prototype.delete=ip;xt.prototype.get=sp;xt.prototype.has=op;xt.prototype.set=ap;var lp="Expected a function";function Ds(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lp);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Ds.Cache||xt),n}Ds.Cache=xt;var cp=500;function up(e){var t=Ds(e,function(r){return n.size===cp&&n.clear(),r}),n=t.cache;return t}var dp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fp=/\\(\\)?/g,Ul=up(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dp,function(n,r,i,s){t.push(i?s.replace(fp,"$1"):r||n)}),t});function In(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Ro=ze?ze.prototype:void 0,Do=Ro?Ro.toString:void 0;function Ll(e){if(typeof e=="string")return e;if(Ie(e))return In(e,Ll)+"";if(yr(e))return Do?Do.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ms(e){return e==null?"":Ll(e)}function Tn(e,t){return Ie(e)?e:Rs(e,t)?[e]:Ul(Ms(e))}function $t(e){if(typeof e=="string"||yr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function si(e,t){t=Tn(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[$t(t[n++])];return n&&n==r?e:void 0}function R(e,t,n){var r=e==null?void 0:si(e,t);return r===void 0?n:r}const{getOwnPropertyNames:mp,getOwnPropertySymbols:hp}=Object,{hasOwnProperty:pp}=Object.prototype;function wi(e,t){return function(r,i,s){return e(r,i,s)&&t(r,i,s)}}function _r(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:s}=i,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);const l=e(n,r,i);return s.delete(n),s.delete(r),l}}function Mo(e){return mp(e).concat(hp(e))}const gp=Object.hasOwn||((e,t)=>pp.call(e,t)),yp="__v",bp="__o",xp="_owner",{getOwnPropertyDescriptor:Uo,keys:Lo}=Object,en=Object.is||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n};function vp(e,t){return e===t}function Sp(e,t){return e.byteLength===t.byteLength&&Kr(new Uint8Array(e),new Uint8Array(t))}function wp(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function jp(e,t){return e.byteLength===t.byteLength&&Kr(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Op(e,t){return en(e.getTime(),t.getTime())}function Ep(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Bo(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),s=e.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const c=t.entries();let u=!1,d=0;for(;(a=c.next())&&!a.done;){if(i[d]){d++;continue}const m=o.value,y=a.value;if(n.equals(m[0],y[0],l,d,e,t,n)&&n.equals(m[1],y[1],m[0],y[0],e,t,n)){u=i[d]=!0;break}d++}if(!u)return!1;l++}return!0}function Ap(e,t,n){const r=Lo(e);let i=r.length;if(Lo(t).length!==i)return!1;for(;i-- >0;)if(!Bl(e,t,n,r[i]))return!1;return!0}function Bn(e,t,n){const r=Mo(e);let i=r.length;if(Mo(t).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!Bl(e,t,n,s)||(o=Uo(e,s),a=Uo(t,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function Cp(e,t){return en(e.valueOf(),t.valueOf())}function _p(e,t){return e.source===t.source&&e.flags===t.flags}function zo(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),s=e.values();let o,a;for(;(o=s.next())&&!o.done;){const l=t.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!i[u]&&n.equals(o.value,a.value,o.value,a.value,e,t,n)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function Kr(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Ip(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Bl(e,t,n,r){return(r===xp||r===bp||r===yp)&&(e.$$typeof||t.$$typeof)?!0:gp(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Tp=Object.prototype.toString;function Pp(e){const t=$p(e),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:c,getUnsupportedCustomComparator:u}=e;return function(m,y,f){if(m===y)return!0;if(m==null||y==null)return!1;const p=typeof m;if(p!==typeof y)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(m,y,f):p==="function"?i(m,y,f):!1;const b=m.constructor;if(b!==y.constructor)return!1;if(b===Object)return a(m,y,f);if(b===Array)return n(m,y,f);if(b===Date)return r(m,y,f);if(b===RegExp)return l(m,y,f);if(b===Map)return s(m,y,f);if(b===Set)return c(m,y,f);if(b===Promise)return!1;if(Array.isArray(m))return n(m,y,f);const w=Tp.call(m),S=t[w];if(S)return S(m,y,f);const E=u&&u(m,y,f,w);return E?E(m,y,f):!1}}function Np({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Sp,areArraysEqual:n?Bn:wp,areDataViewsEqual:jp,areDatesEqual:Op,areErrorsEqual:Ep,areFunctionsEqual:vp,areMapsEqual:n?wi(Bo,Bn):Bo,areNumbersEqual:en,areObjectsEqual:n?Bn:Ap,arePrimitiveWrappersEqual:Cp,areRegExpsEqual:_p,areSetsEqual:n?wi(zo,Bn):zo,areTypedArraysEqual:n?wi(Kr,Bn):Kr,areUrlsEqual:Ip,getUnsupportedCustomComparator:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=_r(r.areArraysEqual),s=_r(r.areMapsEqual),o=_r(r.areObjectsEqual),a=_r(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function kp(e){return function(t,n,r,i,s,o,a){return e(t,n,a)}}function Fp({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:c=e?new WeakMap:void 0,meta:u}=n();return t(a,l,{cache:c,equals:r,meta:u,strict:i})};if(e)return function(a,l){return t(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return t(a,l,s)}}function $p({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:m,areUrlsEqual:y}){return{"[object Arguments]":l,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":s,"[object BigInt]":a,"[object BigInt64Array]":m,"[object BigUint64Array]":m,"[object Boolean]":c,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":m,"[object Float32Array]":m,"[object Float64Array]":m,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":m,"[object Int16Array]":m,"[object Int32Array]":m,"[object Map]":o,"[object Number]":c,"[object Object]":(f,p,b)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,b),"[object RegExp]":u,"[object Set]":d,"[object String]":c,"[object URL]":y,"[object Uint8Array]":m,"[object Uint8ClampedArray]":m,"[object Uint16Array]":m,"[object Uint32Array]":m}}vt();vt({strict:!0});vt({circular:!0});vt({circular:!0,strict:!0});vt({createInternalComparator:()=>en});vt({strict:!0,createInternalComparator:()=>en});vt({circular:!0,createInternalComparator:()=>en});vt({circular:!0,createInternalComparator:()=>en,strict:!0});function vt(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=Np(e),o=Pp(s),a=n?n(o):kp(o);return Fp({circular:t,comparator:o,createState:r,equals:a,strict:i})}const ce=vt({circular:!0,createCustomConfig:()=>({areFunctionsEqual(e,t){return typeof t=="function"}})});var zn={exports:{}},ji,Vo;function zl(){if(Vo)return ji;Vo=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),r=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(g){let v="",j=0,x=0;for(x=0;x<g.length;x++)if(j=g[x].charCodeAt(0),j!==48){if(!(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102))return"";v+=g[x];break}for(x+=1;x<g.length;x++){if(j=g[x].charCodeAt(0),!(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102))return"";v+=g[x]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(g){return g.length=0,!0}function l(g,v,j){if(g.length){const x=s(g);if(x!=="")v.push(x);else return j.error=!0,!1;g.length=0}return!0}function c(g){let v=0;const j={error:!1,address:"",zone:""},x=[],A=[];let C=!1,_=!1,I=l;for(let T=0;T<g.length;T++){const k=g[T];if(!(k==="["||k==="]"))if(k===":"){if(C===!0&&(_=!0),!I(A,x,j))break;if(++v>7){j.error=!0;break}T>0&&g[T-1]===":"&&(C=!0),x.push(":");continue}else if(k==="%"){if(!I(A,x,j))break;I=a}else{A.push(k);continue}}return A.length&&(I===a?j.zone=A.join(""):_?x.push(A.join("")):x.push(s(A))),j.address=x.join(""),j}function u(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const v=c(g);if(v.error)return{host:g,isIPV6:!1};{let j=v.address,x=v.address;return v.zone&&(j+="%"+v.zone,x+="%25"+v.zone),{host:j,isIPV6:!0,escapedHost:x}}}function d(g,v){let j=0;for(let x=0;x<g.length;x++)g[x]===v&&j++;return j}function m(g){let v=g;const j=[];let x=-1,A=0;for(;A=v.length;){if(A===1){if(v===".")break;if(v==="/"){j.push("/");break}else{j.push(v);break}}else if(A===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){j.push("/");break}}else if(A===3&&v==="/.."){j.length!==0&&j.pop(),j.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),j.length!==0&&j.pop();continue}}if((x=v.indexOf("/",1))===-1){j.push(v);break}else j.push(v.slice(0,x)),v=v.slice(x)}return j.join("")}const y={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function b(g,v){const j=v?p:f;return j.lastIndex=0,g.replace(j,x=>y[x])}function w(g,v=!1){if(g.indexOf("%")===-1)return g;let j="";for(let x=0;x<g.length;x++){if(g[x]==="%"&&x+2<g.length){const A=g.slice(x+1,x+3);if(n(A)){const C=A.toUpperCase(),_=String.fromCharCode(parseInt(C,16));v&&r(_)?j+=_:j+="%"+C,x+=2;continue}}j+=g[x]}return j}function S(g){let v="";for(let j=0;j<g.length;j++){if(g[j]==="%"&&j+2<g.length){const x=g.slice(j+1,j+3);if(n(x)){const A=x.toUpperCase(),C=String.fromCharCode(parseInt(A,16));C!=="."&&r(C)?v+=C:v+="%"+A,j+=2;continue}}i(g[j])?v+=g[j]:v+=escape(g[j])}return v}function E(g){let v="";for(let j=0;j<g.length;j++){if(g[j]==="%"&&j+2<g.length){const x=g.slice(j+1,j+3);if(n(x)){v+="%"+x.toUpperCase(),j+=2;continue}}v+=escape(g[j])}return v}function O(g){const v=[];if(g.userinfo!==void 0&&(v.push(g.userinfo),v.push("@")),g.host!==void 0){let j=unescape(g.host);if(!t(j)){const x=u(j);x.isIPV6===!0?j=`[${x.escapedHost}]`:j=b(j,!1)}v.push(j)}return(typeof g.port=="number"||typeof g.port=="string")&&(v.push(":"),v.push(String(g.port))),v.length?v.join(""):void 0}return ji={nonSimpleDomain:o,recomposeAuthority:O,reescapeHostDelimiters:b,normalizePercentEncoding:w,normalizePathEncoding:S,escapePreservingEscapes:E,removeDotSegments:m,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:s},ji}var Oi,qo;function Rp(){if(qo)return Oi;qo=1;const{isUUID:e}=zl(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(g){return n.indexOf(g)!==-1}function i(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function s(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function o(g){const v=String(g.scheme).toLowerCase()==="https";return(g.port===(v?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function a(g){return g.secure=i(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function l(g){if((g.port===(i(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[v,j]=g.resourceName.split("?");g.path=v&&v!=="/"?v:void 0,g.query=j,g.resourceName=void 0}return g.fragment=void 0,g}function c(g,v){if(!g.path)return g.error="URN can not be parsed",g;const j=g.path.match(t);if(j){const x=v.scheme||g.scheme||"urn";g.nid=j[1].toLowerCase(),g.nss=j[2];const A=`${x}:${v.nid||g.nid}`,C=O(A);g.path=void 0,C&&(g=C.parse(g,v))}else g.error=g.error||"URN can not be parsed.";return g}function u(g,v){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const j=v.scheme||g.scheme||"urn",x=g.nid.toLowerCase(),A=`${j}:${v.nid||x}`,C=O(A);C&&(g=C.serialize(g,v));const _=g,I=g.nss;return _.path=`${x||v.nid}:${I}`,v.skipEscape=!0,_}function d(g,v){const j=g;return j.uuid=j.nss,j.nss=void 0,!v.tolerant&&(!j.uuid||!e(j.uuid))&&(j.error=j.error||"UUID is not valid."),j}function m(g){const v=g;return v.nss=(g.uuid||"").toLowerCase(),v}const y={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:y.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},b={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},E={http:y,https:f,ws:p,wss:b,urn:{scheme:"urn",parse:c,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(E,null);function O(g){return g&&(E[g]||E[g.toLowerCase()])||void 0}return Oi={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:O},Oi}var Wo;function Dp(){if(Wo)return zn.exports;Wo=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=zl(),{SCHEMES:c,getSchemeHandler:u}=Rp();function d(x,A){return typeof x=="string"?x=O(x,A):typeof x=="object"&&(x=E(p(x,A),A)),x}function m(x,A,C){const _=C?Object.assign({scheme:"null"},C):{scheme:"null"},I=y(E(x,_),E(A,_),_,!0);return _.skipEscape=!0,p(I,_)}function y(x,A,C,_){const I={};return _||(x=E(p(x,C),C),A=E(p(A,C),C)),C=C||{},!C.tolerant&&A.scheme?(I.scheme=A.scheme,I.userinfo=A.userinfo,I.host=A.host,I.port=A.port,I.path=t(A.path||""),I.query=A.query):(A.userinfo!==void 0||A.host!==void 0||A.port!==void 0?(I.userinfo=A.userinfo,I.host=A.host,I.port=A.port,I.path=t(A.path||""),I.query=A.query):(A.path?(A.path[0]==="/"?I.path=t(A.path):((x.userinfo!==void 0||x.host!==void 0||x.port!==void 0)&&!x.path?I.path="/"+A.path:x.path?I.path=x.path.slice(0,x.path.lastIndexOf("/")+1)+A.path:I.path=A.path,I.path=t(I.path)),I.query=A.query):(I.path=x.path,A.query!==void 0?I.query=A.query:I.query=x.query),I.userinfo=x.userinfo,I.host=x.host,I.port=x.port),I.scheme=x.scheme),I.fragment=A.fragment,I}function f(x,A,C){const _=v(x,C),I=v(A,C);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(x,A){const C={host:x.host,scheme:x.scheme,userinfo:x.userinfo,port:x.port,path:x.path,query:x.query,nid:x.nid,nss:x.nss,uuid:x.uuid,fragment:x.fragment,reference:x.reference,resourceName:x.resourceName,secure:x.secure,error:""},_=Object.assign({},A),I=[],T=u(_.scheme||C.scheme);T&&T.serialize&&T.serialize(C,_),C.path!==void 0&&(_.skipEscape?C.path=r(C.path):(C.path=s(C.path),C.scheme!==void 0&&(C.path=C.path.split("%3A").join(":")))),_.reference!=="suffix"&&C.scheme&&I.push(C.scheme,":");const k=n(C);if(k!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(k),C.path&&C.path[0]!=="/"&&I.push("/")),C.path!==void 0){let N=C.path;!_.absolutePath&&(!T||!T.absolutePath)&&(N=t(N)),k===void 0&&N[0]==="/"&&N[1]==="/"&&(N="/%2F"+N.slice(2)),I.push(N)}return C.query!==void 0&&I.push("?",C.query),C.fragment!==void 0&&I.push("#",C.fragment),I.join("")}const b=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(x,A){if(A[2]!==void 0&&x.path&&x.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof x.port=="number"&&(x.port<0||x.port>65535))return"URI port is malformed."}function S(x,A){const C=Object.assign({},A),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;C.reference==="suffix"&&(C.scheme?x=C.scheme+":"+x:x="//"+x);const k=x.match(b);if(k){_.scheme=k[1],_.userinfo=k[3],_.host=k[4],_.port=parseInt(k[5],10),_.path=k[6]||"",_.query=k[7],_.fragment=k[8],isNaN(_.port)&&(_.port=k[5]);const N=w(_,k);if(N!==void 0&&(_.error=_.error||N,I=!0),_.host)if(a(_.host)===!1){const z=e(_.host);_.host=z.host.toLowerCase(),T=z.isIPV6}else T=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",C.reference&&C.reference!=="suffix"&&C.reference!==_.reference&&(_.error=_.error||"URI is not a "+C.reference+" reference.");const F=u(C.scheme||_.scheme);if(!C.unicodeSupport&&(!F||!F.unicodeSupport)&&_.host&&(C.domainHost||F&&F.domainHost)&&T===!1&&l(_.host))try{_.host=new URL("http://"+_.host).hostname}catch(M){_.error=_.error||"Host's domain name can not be converted to ASCII: "+M}if((!F||F&&!F.skipNormalize)&&(x.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=o(unescape(_.host),T))),_.path&&(_.path=i(_.path)),_.fragment))try{_.fragment=encodeURI(decodeURIComponent(_.fragment))}catch{_.error=_.error||"URI malformed"}F&&F.parse&&F.parse(_,C)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function E(x,A){return S(x,A).parsed}function O(x,A){return g(x,A).normalized}function g(x,A){const{parsed:C,malformedAuthorityOrPort:_}=S(x,A);return{normalized:_?x:p(C,A),malformedAuthorityOrPort:_}}function v(x,A){if(typeof x=="string"){const{normalized:C,malformedAuthorityOrPort:_}=g(x,A);return _?void 0:C}if(typeof x=="object")return p(x,A)}const j={SCHEMES:c,normalize:d,resolve:m,resolveComponent:y,equal:f,serialize:p,parse:E};return zn.exports=j,zn.exports.default=j,zn.exports.fastUri=j,zn.exports}var Mp=Dp();const Us=Cs(Mp);var Vn={},Ho;function Up(){if(Ho)return Vn;Ho=1;var e=/~/,t=/~[01]/g;function n(c){switch(c){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+c)}function r(c){return e.test(c)?c.replace(t,n):c}function i(c,u,d){for(var m,y,f=1,p=u.length;f<p;){if(u[f]==="constructor"||u[f]==="prototype"||u[f]==="__proto__")return c;if(m=r(u[f++]),y=p>f,typeof c[m]>"u"&&(Array.isArray(c)&&m==="-"&&(m=c.length),y&&(u[f]!==""&&u[f]<1/0||u[f]==="-"?c[m]=[]:c[m]={})),!y)break;c=c[m]}var b=c[m];return d===void 0?delete c[m]:c[m]=d,b}function s(c){if(typeof c=="string"){if(c=c.split("/"),c[0]==="")return c;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(c)){for(const u of c)if(typeof u!="string"&&typeof u!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return c}throw new Error("Invalid JSON pointer.")}function o(c,u){if(typeof c!="object")throw new Error("Invalid input object.");u=s(u);var d=u.length;if(d===1)return c;for(var m=1;m<d;){if(c=c[r(u[m++])],d===m)return c;if(typeof c!="object"||c===null)return}}function a(c,u,d){if(typeof c!="object")throw new Error("Invalid input object.");if(u=s(u),u.length===0)throw new Error("Invalid JSON pointer for set.");return i(c,u,d)}function l(c){var u=s(c);return{get:function(d){return o(d,u)},set:function(d,m){return a(d,u,m)}}}return Vn.get=o,Vn.set=a,Vn.compile=l,Vn}var Lp=Up();const Ei=Cs(Lp);var Bp=Object.prototype;function oi(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Bp;return e===n}var zp=Dl(Object.keys,Object),Vp=Object.prototype,qp=Vp.hasOwnProperty;function Vl(e){if(!oi(e))return zp(e);var t=[];for(var n in Object(e))qp.call(e,n)&&n!="constructor"&&t.push(n);return t}var as=Qt(at,"DataView"),ls=Qt(at,"Promise"),bn=Qt(at,"Set"),cs=Qt(at,"WeakMap"),Go="[object Map]",Wp="[object Object]",Ko="[object Promise]",Yo="[object Set]",Jo="[object WeakMap]",Zo="[object DataView]",Hp=Xt(as),Gp=Xt(ur),Kp=Xt(ls),Yp=Xt(bn),Jp=Xt(cs),Le=yt;(as&&Le(new as(new ArrayBuffer(1)))!=Zo||ur&&Le(new ur)!=Go||ls&&Le(ls.resolve())!=Ko||bn&&Le(new bn)!=Yo||cs&&Le(new cs)!=Jo)&&(Le=function(e){var t=yt(e),n=t==Wp?e.constructor:void 0,r=n?Xt(n):"";if(r)switch(r){case Hp:return Zo;case Gp:return Go;case Kp:return Ko;case Yp:return Yo;case Jp:return Jo}return t});var Zp="[object Arguments]";function Xo(e){return Ve(e)&&yt(e)==Zp}var ql=Object.prototype,Xp=ql.hasOwnProperty,Qp=ql.propertyIsEnumerable,vn=Xo((function(){return arguments})())?Xo:function(e){return Ve(e)&&Xp.call(e,"callee")&&!Qp.call(e,"callee")},eg=9007199254740991;function Ls(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=eg}function tn(e){return e!=null&&Ls(e.length)&&!br(e)}function tg(){return!1}var Wl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qo=Wl&&typeof module=="object"&&module&&!module.nodeType&&module,ng=Qo&&Qo.exports===Wl,ea=ng?at.Buffer:void 0,rg=ea?ea.isBuffer:void 0,Kt=rg||tg,ig="[object Arguments]",sg="[object Array]",og="[object Boolean]",ag="[object Date]",lg="[object Error]",cg="[object Function]",ug="[object Map]",dg="[object Number]",fg="[object Object]",mg="[object RegExp]",hg="[object Set]",pg="[object String]",gg="[object WeakMap]",yg="[object ArrayBuffer]",bg="[object DataView]",xg="[object Float32Array]",vg="[object Float64Array]",Sg="[object Int8Array]",wg="[object Int16Array]",jg="[object Int32Array]",Og="[object Uint8Array]",Eg="[object Uint8ClampedArray]",Ag="[object Uint16Array]",Cg="[object Uint32Array]",be={};be[xg]=be[vg]=be[Sg]=be[wg]=be[jg]=be[Og]=be[Eg]=be[Ag]=be[Cg]=!0;be[ig]=be[sg]=be[yg]=be[og]=be[bg]=be[ag]=be[lg]=be[cg]=be[ug]=be[dg]=be[fg]=be[mg]=be[hg]=be[pg]=be[gg]=!1;function _g(e){return Ve(e)&&Ls(e.length)&&!!be[yt(e)]}function Bs(e){return function(t){return e(t)}}var Hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tr=Hl&&typeof module=="object"&&module&&!module.nodeType&&module,Ig=tr&&tr.exports===Hl,Ai=Ig&&$l.process,Sn=(function(){try{var e=tr&&tr.require&&tr.require("util").types;return e||Ai&&Ai.binding&&Ai.binding("util")}catch{}})(),ta=Sn&&Sn.isTypedArray,vr=ta?Bs(ta):_g,Tg="[object Map]",Pg="[object Set]",Ng=Object.prototype,kg=Ng.hasOwnProperty;function we(e){if(e==null)return!0;if(tn(e)&&(Ie(e)||typeof e=="string"||typeof e.splice=="function"||Kt(e)||vr(e)||vn(e)))return!e.length;var t=Le(e);if(t==Tg||t==Pg)return!e.size;if(oi(e))return!Vl(e).length;for(var n in e)if(kg.call(e,n))return!1;return!0}function Fg(){this.__data__=new bt,this.size=0}function $g(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Rg(e){return this.__data__.get(e)}function Dg(e){return this.__data__.has(e)}var Mg=200;function Ug(e,t){var n=this.__data__;if(n instanceof bt){var r=n.__data__;if(!ur||r.length<Mg-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xt(r)}return n.set(e,t),this.size=n.size,this}function Ye(e){var t=this.__data__=new bt(e);this.size=t.size}Ye.prototype.clear=Fg;Ye.prototype.delete=$g;Ye.prototype.get=Rg;Ye.prototype.has=Dg;Ye.prototype.set=Ug;function zs(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Yr=(function(){try{var e=Qt(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Vs(e,t,n){t=="__proto__"&&Yr?Yr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Lg=Object.prototype,Bg=Lg.hasOwnProperty;function qs(e,t,n){var r=e[t];(!(Bg.call(e,t)&&xr(r,n))||n===void 0&&!(t in e))&&Vs(e,t,n)}function Pn(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?Vs(n,a,l):qs(n,a,l)}return n}function Gl(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zg=9007199254740991,Vg=/^(?:0|[1-9]\d*)$/;function ai(e,t){var n=typeof e;return t=t??zg,!!t&&(n=="number"||n!="symbol"&&Vg.test(e))&&e>-1&&e%1==0&&e<t}var qg=Object.prototype,Wg=qg.hasOwnProperty;function Kl(e,t){var n=Ie(e),r=!n&&vn(e),i=!n&&!r&&Kt(e),s=!n&&!r&&!i&&vr(e),o=n||r||i||s,a=o?Gl(e.length,String):[],l=a.length;for(var c in e)(t||Wg.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ai(c,l)))&&a.push(c);return a}function Ke(e){return tn(e)?Kl(e):Vl(e)}function Hg(e,t){return e&&Pn(t,Ke(t),e)}function Gg(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Kg=Object.prototype,Yg=Kg.hasOwnProperty;function Jg(e){if(!le(e))return Gg(e);var t=oi(e),n=[];for(var r in e)r=="constructor"&&(t||!Yg.call(e,r))||n.push(r);return n}function Sr(e){return tn(e)?Kl(e,!0):Jg(e)}function Zg(e,t){return e&&Pn(t,Sr(t),e)}var Yl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,na=Yl&&typeof module=="object"&&module&&!module.nodeType&&module,Xg=na&&na.exports===Yl,ra=Xg?at.Buffer:void 0,ia=ra?ra.allocUnsafe:void 0;function Jl(e,t){if(t)return e.slice();var n=e.length,r=ia?ia(n):new e.constructor(n);return e.copy(r),r}function Ws(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Qg(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Zl(){return[]}var ey=Object.prototype,ty=ey.propertyIsEnumerable,sa=Object.getOwnPropertySymbols,Hs=sa?function(e){return e==null?[]:(e=Object(e),Qg(sa(e),function(t){return ty.call(e,t)}))}:Zl;function ny(e,t){return Pn(e,Hs(e),t)}function Gs(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ry=Object.getOwnPropertySymbols,Xl=ry?function(e){for(var t=[];e;)Gs(t,Hs(e)),e=ni(e);return t}:Zl;function iy(e,t){return Pn(e,Xl(e),t)}function Ql(e,t,n){var r=t(e);return Ie(e)?r:Gs(r,n(e))}function us(e){return Ql(e,Ke,Hs)}function Ks(e){return Ql(e,Sr,Xl)}var sy=Object.prototype,oy=sy.hasOwnProperty;function ay(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&oy.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Jr=at.Uint8Array;function Ys(e){var t=new e.constructor(e.byteLength);return new Jr(t).set(new Jr(e)),t}function ly(e,t){var n=t?Ys(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var cy=/\w*$/;function uy(e){var t=new e.constructor(e.source,cy.exec(e));return t.lastIndex=e.lastIndex,t}var oa=ze?ze.prototype:void 0,aa=oa?oa.valueOf:void 0;function dy(e){return aa?Object(aa.call(e)):{}}function ec(e,t){var n=t?Ys(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var fy="[object Boolean]",my="[object Date]",hy="[object Map]",py="[object Number]",gy="[object RegExp]",yy="[object Set]",by="[object String]",xy="[object Symbol]",vy="[object ArrayBuffer]",Sy="[object DataView]",wy="[object Float32Array]",jy="[object Float64Array]",Oy="[object Int8Array]",Ey="[object Int16Array]",Ay="[object Int32Array]",Cy="[object Uint8Array]",_y="[object Uint8ClampedArray]",Iy="[object Uint16Array]",Ty="[object Uint32Array]";function Py(e,t,n){var r=e.constructor;switch(t){case vy:return Ys(e);case fy:case my:return new r(+e);case Sy:return ly(e,n);case wy:case jy:case Oy:case Ey:case Ay:case Cy:case _y:case Iy:case Ty:return ec(e,n);case hy:return new r;case py:case by:return new r(e);case gy:return uy(e);case yy:return new r;case xy:return dy(e)}}var la=Object.create,tc=(function(){function e(){}return function(t){if(!le(t))return{};if(la)return la(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function nc(e){return typeof e.constructor=="function"&&!oi(e)?tc(ni(e)):{}}var Ny="[object Map]";function ky(e){return Ve(e)&&Le(e)==Ny}var ca=Sn&&Sn.isMap,Fy=ca?Bs(ca):ky,$y="[object Set]";function Ry(e){return Ve(e)&&Le(e)==$y}var ua=Sn&&Sn.isSet,Dy=ua?Bs(ua):Ry,My=1,Uy=2,Ly=4,rc="[object Arguments]",By="[object Array]",zy="[object Boolean]",Vy="[object Date]",qy="[object Error]",ic="[object Function]",Wy="[object GeneratorFunction]",Hy="[object Map]",Gy="[object Number]",sc="[object Object]",Ky="[object RegExp]",Yy="[object Set]",Jy="[object String]",Zy="[object Symbol]",Xy="[object WeakMap]",Qy="[object ArrayBuffer]",eb="[object DataView]",tb="[object Float32Array]",nb="[object Float64Array]",rb="[object Int8Array]",ib="[object Int16Array]",sb="[object Int32Array]",ob="[object Uint8Array]",ab="[object Uint8ClampedArray]",lb="[object Uint16Array]",cb="[object Uint32Array]",ye={};ye[rc]=ye[By]=ye[Qy]=ye[eb]=ye[zy]=ye[Vy]=ye[tb]=ye[nb]=ye[rb]=ye[ib]=ye[sb]=ye[Hy]=ye[Gy]=ye[sc]=ye[Ky]=ye[Yy]=ye[Jy]=ye[Zy]=ye[ob]=ye[ab]=ye[lb]=ye[cb]=!0;ye[qy]=ye[ic]=ye[Xy]=!1;function nr(e,t,n,r,i,s){var o,a=t&My,l=t&Uy,c=t&Ly;if(n&&(o=i?n(e,r,i,s):n(e)),o!==void 0)return o;if(!le(e))return e;var u=Ie(e);if(u){if(o=ay(e),!a)return Ws(e,o)}else{var d=Le(e),m=d==ic||d==Wy;if(Kt(e))return Jl(e,a);if(d==sc||d==rc||m&&!i){if(o=l||m?{}:nc(e),!a)return l?iy(e,Zg(o,e)):ny(e,Hg(o,e))}else{if(!ye[d])return i?e:{};o=Py(e,d,a)}}s||(s=new Ye);var y=s.get(e);if(y)return y;s.set(e,o),Dy(e)?e.forEach(function(b){o.add(nr(b,t,n,b,e,s))}):Fy(e)&&e.forEach(function(b,w){o.set(w,nr(b,t,n,w,e,s))});var f=c?l?Ks:us:l?Sr:Ke,p=u?void 0:f(e);return zs(p||e,function(b,w){p&&(w=b,b=e[w]),qs(o,w,nr(b,t,n,w,e,s))}),o}function oc(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function ub(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function db(e,t){return t.length<2?e:si(e,ub(t,0,-1))}var fb=Object.prototype,mb=fb.hasOwnProperty;function ac(e,t){t=Tn(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=$t(t[n]);if(i==="__proto__"&&!mb.call(e,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=db(e,t);return s==null||delete s[$t(oc(t))]}function hb(e){return Ft(e)?void 0:e}var da=ze?ze.isConcatSpreadable:void 0;function pb(e){return Ie(e)||vn(e)||!!(da&&e&&e[da])}function wr(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=pb),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?wr(a,t-1,n,r,i):Gs(i,a):r||(i[i.length]=a)}return i}function ds(e){var t=e==null?0:e.length;return t?wr(e,1):[]}function gb(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var fa=Math.max;function lc(e,t,n){return t=fa(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=fa(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),gb(e,this,a)}}function yb(e){return function(){return e}}function li(e){return e}var bb=Yr?function(e,t){return Yr(e,"toString",{configurable:!0,enumerable:!1,value:yb(t),writable:!0})}:li,xb=800,vb=16,Sb=Date.now;function wb(e){var t=0,n=0;return function(){var r=Sb(),i=vb-(r-n);if(n=r,i>0){if(++t>=xb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var cc=wb(bb);function uc(e){return cc(lc(e,void 0,ds),e+"")}var jb=1,Ob=2,Eb=4,wn=uc(function(e,t){var n={};if(e==null)return n;var r=!1;t=In(t,function(s){return s=Tn(s,e),r||(r=s.length>1),s}),Pn(e,Ks(e),n),r&&(n=nr(n,jb|Ob|Eb,hb));for(var i=t.length;i--;)ac(n,t[i]);return n});function Zr(e,t){if(ge in e&&Us.equal(e[ge],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(le(r)){const i=Zr(r,t);if(i!==void 0)return i}}else if(le(n)){const r=Zr(n,t);if(r!==void 0)return r}}function fs(e,t){const n=R(e,ge,t);let r=e;pe in r&&(r={...r,[pe]:Us.resolve(n,r[pe])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>le(o)?fs(o,n):o)}:le(s)&&(r={...r,[i]:fs(s,n)});return r}function Js(e,t){const n=t[e];return[wn(t,[e]),n]}function dc(e,t={},n=[],r=R(t,[ge])){const i=e||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||ge in t&&t[ge]===o?s=Ei.get(t,l):t[Kn]===Ur&&(s=Zr(t,o.replace(/\/$/,"")),s!==void 0&&(s=Ei.get(s,l)))}else if(t[Kn]===Ur){const l=o?Us.resolve(o,i):i,[c,...u]=l.replace(/#\/?$/,"").split("#");s=Zr(t,c.replace(/\/$/,"")),s!==void 0&&(o=s[ge],we(u)||(s=Ei.get(s,decodeURIComponent(u.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const a=s[pe];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[d,...m]=n,y=[...m,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${y}`)}const[l,c]=Js(pe,s),u=dc(c,t,[...n,i],o);return Object.keys(l).length>0?t[Kn]===ih||t[Kn]===Ur?{[kt]:[l,u]}:{...l,...u}:u}return s}function dr(e,t={},n=R(t,[ge])){return dc(e,t,[],n)}var Ab=Object.prototype,Cb=Ab.hasOwnProperty;function _b(e,t){return e!=null&&Cb.call(e,t)}function fc(e,t,n){t=Tn(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=$t(t[r]);if(!(s=e!=null&&n(e,o)))break;e=e[o]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&Ls(i)&&ai(o,i)&&(Ie(e)||vn(e)))}function ie(e,t){return e!=null&&fc(e,t,_b)}var Ib="[object String]";function Rt(e){return typeof e=="string"||!Ie(e)&&Ve(e)&&yt(e)==Ib}function Je(e){let t;const n=R(e,eh);return Rt(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}var Tb=1/0;function Pb(e){var t=e==null?0:e.length;return t?wr(e,Tb):[]}function ms(e,t,n){(n!==void 0&&!xr(e[t],n)||n===void 0&&!(t in e))&&Vs(e,t,n)}function Nb(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return t}}var mc=Nb();function fr(e){return Ve(e)&&tn(e)}function hs(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function kb(e){return Pn(e,Sr(e))}function Fb(e,t,n,r,i,s,o){var a=hs(e,n),l=hs(t,n),c=o.get(l);if(c){ms(e,n,c);return}var u=s?s(a,l,n+"",e,t,o):void 0,d=u===void 0;if(d){var m=Ie(l),y=!m&&Kt(l),f=!m&&!y&&vr(l);u=l,m||y||f?Ie(a)?u=a:fr(a)?u=Ws(a):y?(d=!1,u=Jl(l,!0)):f?(d=!1,u=ec(l,!0)):u=[]:Ft(l)||vn(l)?(u=a,vn(a)?u=kb(a):(!le(a)||br(a))&&(u=nc(l))):d=!1}d&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),ms(e,n,u)}function hc(e,t,n,r,i){e!==t&&mc(t,function(s,o){if(i||(i=new Ye),le(s))Fb(e,t,o,n,hc,r,i);else{var a=r?r(hs(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),ms(e,o,a)}},Sr)}function ci(e,t){return cc(lc(e,t,li),e+"")}function $b(e,t,n){if(!le(n))return!1;var r=typeof t;return(r=="number"?tn(n)&&ai(t,n.length):r=="string"&&t in n)?xr(n[t],e):!1}function Rb(e){return ci(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&$b(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var Db=Rb(function(e,t,n){hc(e,t,n)});function Zs(e,t,n,r){if(!le(e))return e;t=Tn(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var l=$t(t[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=o){var u=a[l];c=r?r(u,l,a):void 0,c===void 0&&(c=le(u)?u:ai(t[i+1])?[]:{})}qs(a,l,c),a=a[l]}return e}function he(e,t,n){return e==null?e:Zs(e,t,n)}function pc(e){return typeof e=="function"?e:li}var Mb=/\s/;function Ub(e){for(var t=e.length;t--&&Mb.test(e.charAt(t)););return t}var Lb=/^\s+/;function Bb(e){return e&&e.slice(0,Ub(e)+1).replace(Lb,"")}var ma=NaN,zb=/^[-+]0x[0-9a-f]+$/i,Vb=/^0b[01]+$/i,qb=/^0o[0-7]+$/i,Wb=parseInt;function Hb(e){if(typeof e=="number")return e;if(yr(e))return ma;if(le(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=le(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Bb(e);var n=Vb.test(e);return n||qb.test(e)?Wb(e.slice(2),n?2:8):zb.test(e)?ma:+e}var ha=1/0,Gb=17976931348623157e292;function Kb(e){if(!e)return e===0?e:0;if(e=Hb(e),e===ha||e===-ha){var t=e<0?-1:1;return t*Gb}return e===e?e:0}function gc(e){var t=Kb(e),n=t%1;return t===t?n?t-n:t:0}var Yb=9007199254740991,Ci=4294967295,Jb=Math.min;function yc(e,t){if(e=gc(e),e<1||e>Yb)return[];var n=Ci,r=Jb(e,Ci);t=pc(t),e-=Ci;for(var i=Gl(r,t);++n<e;)t(n);return i}function bc(e,t){return e&&mc(e,t,Ke)}var Zb="__lodash_hash_undefined__";function Xb(e){return this.__data__.set(e,Zb),this}function Qb(e){return this.__data__.has(e)}function Yt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new xt;++t<n;)this.add(e[t])}Yt.prototype.add=Yt.prototype.push=Xb;Yt.prototype.has=Qb;function ex(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function mr(e,t){return e.has(t)}var tx=1,nx=2;function xc(e,t,n,r,i,s){var o=n&tx,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,m=!0,y=n&nx?new Yt:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var f=e[d],p=t[d];if(r)var b=o?r(p,f,d,t,e,s):r(f,p,d,e,t,s);if(b!==void 0){if(b)continue;m=!1;break}if(y){if(!ex(t,function(w,S){if(!mr(y,S)&&(f===w||i(f,w,n,r,s)))return y.push(S)})){m=!1;break}}else if(!(f===p||i(f,p,n,r,s))){m=!1;break}}return s.delete(e),s.delete(t),m}function rx(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Xs(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var ix=1,sx=2,ox="[object Boolean]",ax="[object Date]",lx="[object Error]",cx="[object Map]",ux="[object Number]",dx="[object RegExp]",fx="[object Set]",mx="[object String]",hx="[object Symbol]",px="[object ArrayBuffer]",gx="[object DataView]",pa=ze?ze.prototype:void 0,_i=pa?pa.valueOf:void 0;function yx(e,t,n,r,i,s,o){switch(n){case gx:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case px:return!(e.byteLength!=t.byteLength||!s(new Jr(e),new Jr(t)));case ox:case ax:case ux:return xr(+e,+t);case lx:return e.name==t.name&&e.message==t.message;case dx:case mx:return e==t+"";case cx:var a=rx;case fx:var l=r&ix;if(a||(a=Xs),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=sx,o.set(e,t);var u=xc(a(e),a(t),r,i,s,o);return o.delete(e),u;case hx:if(_i)return _i.call(e)==_i.call(t)}return!1}var bx=1,xx=Object.prototype,vx=xx.hasOwnProperty;function Sx(e,t,n,r,i,s){var o=n&bx,a=us(e),l=a.length,c=us(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var m=a[d];if(!(o?m in t:vx.call(t,m)))return!1}var y=s.get(e),f=s.get(t);if(y&&f)return y==t&&f==e;var p=!0;s.set(e,t),s.set(t,e);for(var b=o;++d<l;){m=a[d];var w=e[m],S=t[m];if(r)var E=o?r(S,w,m,t,e,s):r(w,S,m,e,t,s);if(!(E===void 0?w===S||i(w,S,n,r,s):E)){p=!1;break}b||(b=m=="constructor")}if(p&&!b){var O=e.constructor,g=t.constructor;O!=g&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof g=="function"&&g instanceof g)&&(p=!1)}return s.delete(e),s.delete(t),p}var wx=1,ga="[object Arguments]",ya="[object Array]",Ir="[object Object]",jx=Object.prototype,ba=jx.hasOwnProperty;function Ox(e,t,n,r,i,s){var o=Ie(e),a=Ie(t),l=o?ya:Le(e),c=a?ya:Le(t);l=l==ga?Ir:l,c=c==ga?Ir:c;var u=l==Ir,d=c==Ir,m=l==c;if(m&&Kt(e)){if(!Kt(t))return!1;o=!0,u=!1}if(m&&!u)return s||(s=new Ye),o||vr(e)?xc(e,t,n,r,i,s):yx(e,t,l,n,r,i,s);if(!(n&wx)){var y=u&&ba.call(e,"__wrapped__"),f=d&&ba.call(t,"__wrapped__");if(y||f){var p=y?e.value():e,b=f?t.value():t;return s||(s=new Ye),i(p,b,n,r,s)}}return m?(s||(s=new Ye),Sx(e,t,n,r,i,s)):!1}function ui(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ve(e)&&!Ve(t)?e!==e&&t!==t:Ox(e,t,n,r,ui,i)}var Ex=1,Ax=2;function Cx(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var a=o[0],l=e[a],c=o[1];if(o[2]){if(l===void 0&&!(a in e))return!1}else{var u=new Ye,d;if(!(d===void 0?ui(c,l,Ex|Ax,r,u):d))return!1}}return!0}function vc(e){return e===e&&!le(e)}function _x(e){for(var t=Ke(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,vc(i)]}return t}function Sc(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Ix(e){var t=_x(e);return t.length==1&&t[0][2]?Sc(t[0][0],t[0][1]):function(n){return n===e||Cx(n,e,t)}}function Tx(e,t){return e!=null&&t in Object(e)}function wc(e,t){return e!=null&&fc(e,t,Tx)}var Px=1,Nx=2;function kx(e,t){return Rs(e)&&vc(t)?Sc($t(e),t):function(n){var r=R(n,e);return r===void 0&&r===t?wc(n,e):ui(t,r,Px|Nx)}}function Fx(e){return function(t){return t?.[e]}}function $x(e){return function(t){return si(t,e)}}function Rx(e){return Rs(e)?Fx($t(e)):$x(e)}function Qs(e){return typeof e=="function"?e:e==null?li:typeof e=="object"?Ie(e)?kx(e[0],e[1]):Ix(e):Rx(e)}function Dx(e,t,n){var r=Ie(e),i=r||Kt(e)||vr(e);if(t=Qs(t),n==null){var s=e&&e.constructor;i?n=r?new s:[]:le(e)?n=br(s)?tc(ni(e)):{}:n={}}return(i?zs:bc)(e,function(o,a,l){return t(n,o,a,l)}),n}function Mx(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function Ux(e){return e!==e}function Lx(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function jc(e,t,n){return t===t?Lx(e,t,n):Mx(e,Ux,n)}function eo(e,t){var n=e==null?0:e.length;return!!n&&jc(e,t,0)>-1}function Lr(){}var Bx=1/0,zx=bn&&1/Xs(new bn([,-0]))[1]==Bx?function(e){return new bn(e)}:Lr,Vx=200;function Oc(e,t,n){var r=-1,i=eo,s=e.length,o=!0,a=[],l=a;if(s>=Vx){var c=zx(e);if(c)return Xs(c);o=!1,i=mr,l=new Yt}else l=a;e:for(;++r<s;){var u=e[r],d=u;if(u=u!==0?u:0,o&&d===d){for(var m=l.length;m--;)if(l[m]===d)continue e;a.push(u)}else i(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}function Ec(e){return e&&e.length?Oc(e):[]}function hr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?"number":typeof e=="object"?"object":"string"}var qx=ci(function(e){return Oc(wr(e,1,fr,!0))});function qe(e){let{type:t}=e;return!t&&e.const?hr(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function pt(e,t){const n={...e};return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},o=t[i];return e&&i in e&&Y(o)?r[i]=pt(s,o):e&&t&&(qe(e)==="object"||qe(t)==="object")&&i===Tl&&Array.isArray(s)&&Array.isArray(o)?r[i]=qx(s,o):r[i]=o,r},n)}var Wx="[object Number]";function Ac(e){return typeof e=="number"||Ve(e)&&yt(e)==Wx}function Cc(e,t,n){var r;if(e&&n){const i=R(e,n);if(i===void 0)return;for(let s=0;s<t.length;s+=1){const o=t[s],a=R(o,[ue,n],{});if(a.type!=="object"&&a.type!=="array"&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Xr(e,t,n,r,i){if(t===void 0)return 0;const s=Cc(t,n,i);if(Ac(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&ie(a,[ue,i])){const l=R(t,i),c=R(a,[ue,i],{});if(e.isValid(c,l,r))return o}else if(a[ue]){const l={anyOf:Object.keys(a[ue]).map(u=>({required:[u]}))};let c;if(a.anyOf){const{...u}=a;u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c={...a,...l};if(delete c.required,e.isValid(c,t,r))return o}else if(e.isValid(a,t,r))return o}return 0}const Hx=Object.prototype;function Yn(e){for(const t in e)if(Hx.hasOwnProperty.call(e,t))return!1;return!0}const Gx=["array","boolean","integer","null","number","object","string"];new Set(Gx);const Kx=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Kx);const Yx=["items","allOf","oneOf","anyOf"];new Set(Yx);const Jx=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Jx);function Br(e){return typeof e=="object"}function et(e){return Br(e)?Yn(e):e===!0}function pn(e,t){return e<t?-1:e>t?1:0}function Ii(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const s=e;e=t,t=s,r=n}const i=new Set(e);for(let s=0;s<r;s++)i.add(t[s]);return Array.from(i)}function Zx(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const i=e;e=t,t=i}const r=new Set(t);for(let i=0;i<e.length&&r.size>0;i++){const s=e[i];r.delete(s)&&n.push(s)}return n}function xa(e){return e.length===0}function Ti(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let i=0;i<t.length;i++)if(t[i]!==n[i]){const s=e(t[i],n[i]);if(s!==0)return s}return 0}}function _c(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const o=[];let a=0;e:for(let l=0;l<r;l++){const c=n[l];for(let u=0;u<a;u++)if(e(c,o[u])===0)continue e;a=o.push(c)}return o}const i=n.slice().sort(e);let s=0;for(let o=1;o<r;o++)e(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function Xx(e){return(t,n)=>{const r=[];let i=t.length,s=n.length;if(i===0||s===0)return r;if(i>s){const u=t;t=n,n=u;const d=i;i=s,s=d}const o=[...t].sort(e),a=[...n].sort(e);let l=0,c=0;for(;l<i&&c<s;){const u=e(o[l],a[c]);u===0?((r.length===0||e(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,c++):u<0?l++:c++}return r}}function Qx(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const va=Qx,Ic=()=>0,e0=e=>e===void 0,t0=e=>typeof e!="object",Sa={boolean:0,number:1,string:2};function n0(e,t){const n=typeof e,r=typeof t;return n===r?pn(e,t):Sa[n]-Sa[r]}function r0(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const o=e;e=t,t=o}const i=new Set(e),s=t.length;for(let o=0;o<s;o++){const a=t[o];i.has(a)||e.push(a)}return e}function di(e,t,n=Ic){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function dn(e){return di(e0,e)}function Ot(e,t){return di(n=>n===void 0||e(n),t)}function Pi(e,t){return di(Array.isArray,e,t)}const Ee=dn(pn),Ni=Ot(e=>e===0,(e,t)=>e-t);function i0({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=va(t,p=>Object.keys(p).sort());function r(p){return(b,w)=>{const S=n(b),E=n(w),O=Math.min(S.length,E.length);for(let g=0;g<O;g++){const v=pn(S[g],E[g]);if(v!==0)return v}if(S.length!==E.length)return S.length-E.length;for(let g=0;g<O;g++){const v=S[g],j=p(b[v],w[v]);if(j!==0)return j}return 0}}function i(p){const b=Ti(p),w=va(e,_c(p,{threshold:0}));return(S,E)=>b(w(S),w(E))}const s=i(pn);function o(p,b){if(Br(p)){if(Br(b)){const w=Object.keys(p),S=Object.keys(b),E=r0(w,S),O=E.length;for(let g=0;g<O;g++){const v=E[g];if(p[v]===b[v])continue;const x=(f[v]??a)(p[v],b[v]);if(x!==0)return x}return 0}return b===!0&&Yn(p)?0:1}return Br(b)?p===!0&&Yn(b)?0:-1:pn(p,b)}const a=dn(c),l=di(t0,Pi(r(a),Ti(c)),n0);function c(p,b){return p===null?-1:b===null?1:l(p,b)}const u=dn(o),d=Ot(Yn,r(u)),m=dn(i(o)),y=Ot(et,o),f={$id:Ee,$comment:Ee,$defs:d,$ref:Ee,$schema:Ee,const:a,contains:u,contentEncoding:Ee,contentMediaType:Ee,default:a,definitions:d,description:Ee,else:u,examples:a,exclusiveMaximum:Ee,exclusiveMinimum:Ee,format:Ee,if:u,maximum:Ee,maxItems:Ee,maxLength:Ee,maxProperties:Ee,minimum:Ee,multipleOf:Ee,not:u,pattern:Ee,propertyNames:u,readOnly:Ee,then:u,title:Ee,writeOnly:Ee,uniqueItems:Ot(p=>p===!1,Ic),minLength:Ni,minItems:Ni,minProperties:Ni,required:Ot(xa,s),enum:Ot(xa,i(c)),type:dn((p,b)=>{const w=Array.isArray(p),S=Array.isArray(b);return!w&&!S?pn(p,b):s(w?p:[p],S?b:[b])}),items:Ot(p=>!Array.isArray(p)&&et(p),Pi(o,Ti(o))),anyOf:m,allOf:m,oneOf:m,properties:d,patternProperties:d,additionalProperties:y,additionalItems:y,dependencies:Ot(Yn,r(dn(Pi(o,s))))};return{compareSchemaValues:c,compareSchemaDefinitions:o}}function wa(e){return e}const Tc=(e,t)=>e?Tc(t%e,e):t,s0=(e,t)=>Math.abs(e*t)/Tc(e,t);function o0(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function ki(e,t,n){const r=e.length,i=t.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=e[s];for(let a=0;a<i;a++)n(o,t[a])}}function Fi(e,t){return e||t}function ja(e){return(t,n)=>{const r={...t},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function a0(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function Lt(e,t,n){n===void 0||et(n)?delete e[t]:e[t]=n}const l0=["properties","patternProperties","additionalProperties"];function Oa(e){const t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){const s=t[i];r.push({regExp:new RegExp(s),schema:e[s]})}return[r,t]}const Ea=[[],[]];function Aa(e,t,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(t))continue;const o=s.schema;if(o===!1)return!0;e.push(o)}return!1}const c0=["items","additionalItems"],u0=["if","then","else"];function Ca(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function $i(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function Bt(e,t,n){return[e,t,n]}function d0(e){const t=new Map;for(const[n,r,i]of e){const s=o=>{if(!i(o))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(o[n])}, ${r}: ${JSON.stringify(o[r])})`)};for(const o of[[n,r],[r,n]]){let a=t.get(o[0]);a===void 0&&(a=[],t.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return t}const f0=[Bt("minimum","maximum",e=>e.maximum>=e.minimum),Bt("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Bt("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Bt("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Bt("minLength","maxLength",e=>e.maxLength>=e.minLength),Bt("minItems","maxItems",e=>e.maxItems>=e.minItems),Bt("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function m0({mergePatterns:e=o0,isSubRegExp:t=Object.is,intersectJson:n=Zx,deduplicateJsonSchemaDef:r=wa,defaultMerger:i=wa,assigners:s=[],checks:o=f0,mergers:a}={}){function l(O){const g=O.length;let v=O[0];for(let j=1;j<g;j++){const x=w(v,O[j]);if(x===!1)return!1;et(x)||(v=x)}return v}function c(O,g,v,j,x,A,C){if(O.length=0,v===!1)return!1;if(O.push(v),x!==void 0){if(x===!1)return!1;O.push(x)}if(Aa(O,g,A))return!1;const I=O.length<2;if(C===!1){if(I)return;if(Aa(O,g,j))return!1}else I&&C!==void 0&&O.push(C);return O.length===1?O[0]:l(O)}function u(O,g,v,j,x,A){const C=v.length;if(C>0&&x!==!1)if(A)Object.assign(O,g);else for(let _=0;_<C;_++){const I=v[_];j.has(I)||(O[I]=w(g[I],x))}return O}const d=(O,{properties:g={},patternProperties:v,additionalProperties:j=!0},{properties:x={},patternProperties:A,additionalProperties:C=!0})=>{const _=et(j),I=et(C);if(_&&I)return Lt(O,"properties",S(g,x)),Lt(O,"patternProperties",v&&A?S(v,A):v??A),delete O.additionalProperties,O;const T=w(j,C);Lt(O,"additionalProperties",T);const k={},N=Object.keys(g),F=N.length,[M,z]=v?Oa(v):Ea,[V,D]=A?Oa(A):Ea,de=[],fe=new Set,Se=I?void 0:C;for(let B=0;B<F;B++){const se=N[B];fe.add(se);const oe=c(de,se,g[se],M,x[se],V,Se);oe!==void 0&&(k[se]=oe)}const q=Object.keys(x),J=q.length,G=_?void 0:j;for(let B=0;B<J;B++){const se=q[B];if(fe.has(se))continue;const oe=c(de,se,x[se],V,void 0,M,G);oe!==void 0&&(k[se]=oe)}Lt(O,"properties",k);let Z={};const X=new Set;return z.length>0&&D.length>0&&ki(z,D,(B,se)=>{t(B,se)&&X.add(B),t(se,B)&&X.add(se),Z[e(B,se)]=w(v[B],A[se])}),Z=u(Z,v,z,X,C,I),Z=u(Z,A,D,X,j,_),Lt(O,"patternProperties",Z),O},m=(O,{items:g=[],additionalItems:v},{items:j=[],additionalItems:x})=>{const A=Array.isArray(g),C=Array.isArray(j),_=[];if(O.items=_,A&&C){const[I,T,k]=g.length<j.length?[g.length,v,j]:[j.length,x,g];let N=0;for(;N<I;N++)_.push(w(g[N],j[N]));if(T===!1)O.additionalItems=!1;else{const F=T===void 0||et(T);for(;N<k.length;N++)_.push(F?k[N]:w(k[N],T));Lt(O,"additionalItems",v!==void 0&&x!==void 0?w(v,x):v??x)}}else if(A||C){const[I,T,k]=A?[g,j,v]:[j,g,x];Lt(O,"additionalItems",k&&w(k,T));for(let N=0;N<I.length;N++)_.push(w(I[N],T))}else delete O.additionalItems,O.items=w(g,j);return O},y=(O,g,v)=>{Ca(O,g);const j=Ca({},v);return O.allOf===void 0?O.allOf=[j]:O.allOf=O.allOf.concat(j),O};function f(O,g){const v=[];if(ki(O,g,(j,x)=>{try{v.push(w(j,x))}catch{}}),v.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(O)}" and "${JSON.stringify(g)}"; the merged result is empty`);return r(v)}const p=a0([[l0,d],[c0,m],[u0,y],...s]),b=d0(o);function w(O,g){if(O===!1||g===!1)return!1;if(et(O))return et(g)?!0:g;if(et(g))return O;let v={...O};const j=new Set,x=new Set,A=Object.keys(g),C=A.length;for(let _=0;_<C;_++){const I=A[_],T=g[I];if(T===void 0)continue;const k=b.get(I);if(k!==void 0){const z=k.length;for(let V=0;V<z;V++){const D=k[V];O[D.oppositeKey]!==void 0&&x.add(D.check)}}const N=O[I];if(N===void 0){v[I]=T;continue}const F=p.get(I);if(F){j.add(F);continue}const M=E[I]??i;v[I]=M(N,T)}for(const _ of j)v=_(v,O,g);for(const _ of x)_(v);return v}const S=ja(w),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(O,g)=>{if(O===g)return O;const v=Array.isArray(O),j=Array.isArray(g);if(!v&&!j){const x=$i(O,g);if(x!==void 0)return x}else if(v||j){const x=new Set;if(v&&j)ki(O,g,(C,_)=>{const I=$i(C,_);I!==void 0&&x.add(I)});else{const C=v?O:g,_=v?g:O,I=C.length;for(let T=0;T<I;T++){const k=$i(_,C[T]);k!==void 0&&x.add(k)}}const A=x.size;if(A===1)return x.values().next().value;if(A>1)return Array.from(x)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${O.toString()}, ${g.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(O,g)=>{const v=r([O,g]);return v.length===1?v[0]:{anyOf:v}},pattern:e,readOnly:Fi,writeOnly:Fi,enum:(O,g)=>{const v=n(O,g);if(v.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(O)}", "${JSON.stringify(g)}"`);return v},anyOf:f,oneOf:f,allOf:(O,g)=>r(O.concat(g)),propertyNames:w,contains:w,dependencies:ja((O,g)=>Array.isArray(O)?Array.isArray(g)?Ii(O,g):w(g,{required:O}):Array.isArray(g)?w(O,{required:g}):w(O,g)),examples:(O,g)=>{if(!Array.isArray(O)||!Array.isArray(g))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(O)}" and "${JSON.stringify(g)}"`);return Ii(O,g)},multipleOf:(O,g)=>{let v=1;for(;!Number.isInteger(O)||!Number.isInteger(g);)v*=10,O*=10,g*=10;return s0(O,g)/v},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Fi,required:Ii,...a};return{mergeSchemaDefinitions:w,mergeArrayOfSchemaDefinitions:l}}function h0(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:i,...s}=r;t.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return t}function p0(e){return t=>e(h0(t))}const{compareSchemaDefinitions:g0,compareSchemaValues:y0}=i0(),{mergeArrayOfSchemaDefinitions:b0}=m0({intersectJson:Xx(y0),deduplicateJsonSchemaDef:_c(g0)}),Pc=p0(b0);function Ne(e,t,n={},r,i,s=!1){return nt(e,t,n,r,void 0,void 0,i,s)[0]}function x0(e,t,n,r,i,s,o){const{if:a,then:l,else:c,...u}=t,d=e.isValid(a,s||{},n);let m=[u],y=[];if(r)l&&typeof l!="boolean"&&(y=y.concat(nt(e,l,n,s,r,i,o))),c&&typeof c!="boolean"&&(y=y.concat(nt(e,c,n,s,r,i,o)));else{const f=d?l:c;f&&typeof f!="boolean"&&(y=y.concat(nt(e,f,n,s,r,i,o)))}return y.length&&(m=y.map(f=>pt(u,f))),m.flatMap(f=>nt(e,f,n,s,r,i,o))}function Nc(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>yc(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function kc(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(he(n,[r],e.patternProperties[r]),n),{})}function v0(e,t,n,r,i,s,o,a){const l=Fc(e,t,n,r,i,s,o,a);if(l.length>1||l[0]!==t)return l;if(Ns in t)return Rc(e,t,n,r,i,s,o).flatMap(u=>nt(e,u,n,s,r,i,o));if(kt in t&&Array.isArray(t[kt])){const c=t.allOf.map(d=>nt(e,d,n,s,r,i,o));return Nc(c).map(d=>({...t,allOf:d}))}return[t]}function Fc(e,t,n,r,i,s,o,a){const l=Tt(t,n,i,void 0,a);return l!==t?nt(e,l,n,s,r,i,o,a):[t]}function Tt(e,t,n,r,i){if(!Y(e))return e;let s=e,o=r;if(pe in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...dr(a,t,o),...l,[er]:a},ge in s&&(o=s[ge])}if(ue in s){const a=[],l=Dx(s[ue],(c,u,d)=>{const m=[...n];c[d]=Tt(u,t,m,o,i),a.push(m)},{});Db(n,Ec(Pb(a))),s={...s,[ue]:l}}if(xn in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Tt(s.items,t,n,o,i)}),i){let a,l;ae in e&&Array.isArray(e[ae])?(a=ae,l=s[ae]):Q in e&&Array.isArray(e[Q])&&(a=Q,l=s[Q]),a&&l&&(s={...s,[a]:l.map(c=>Tt(c,t,n,o,i))})}return ce(e,s)?e:s}function S0(e,t,n,r,i){const s={...t,properties:{...t.properties}},o=r&&Y(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(is in s){const l=kc(s,a);if(!we(l)){s.properties[a]=Ne(e,{[kt]:Object.values(l)},n,R(o,[a]),i),he(s.properties,[a,mt],!0);return}}if(hn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?pe in s.additionalProperties?l=Ne(e,{[pe]:R(s.additionalProperties,[pe])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ae in s.additionalProperties||Q in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:hr(R(o,[a]))}:l={type:hr(R(o,[a]))},s.properties[a]=l,he(s.properties,[a,mt],!0)}else s.properties[a]={type:"null"},he(s.properties,[a,mt],!0)}}),s}function w0(e){return Pc(e)}function nt(e,t,n,r,i=!1,s=[],o,a){return Y(t)?v0(e,t,n,i,s,r,o,a).flatMap(c=>{var u;let d=c;if(ks in d)return x0(e,d,n,i,s,r,o);if(kt in d){if(i){const{allOf:y,...f}=d;return[...y,f]}try{const y=[],f=[];(u=d.allOf)===null||u===void 0||u.forEach(p=>{typeof p=="object"&&p.contains?y.push(p):f.push(p)}),y.length&&(d={...d,allOf:f}),d=o?o(d):w0(d),y.length&&(d.allOf=y)}catch(y){console.warn(`could not merge subschemas in allOf:
|
|
1
|
+
import{bg as fd,bh as Be,bi as jo,s as $,ak as Ae,aF as gt,bj as Os,aC as me,bk as ar,bl as Ge,aD as Wt,bm as Cn,o as W,bn as Es,bo as Oo,bp as md,bq as hd,br as xl,bs as pd,bt as gd,bu as yd,bv as vl,bw as bd,b6 as ft,bx as xd,aE as ht,by as vd,c as Te,r as P,l as ei,j as h,aP as Sl,C as As,a as Sd,t as $r,bz as Cs,bA as wl,bB as wd,bC as jd,bf as jl,bD as _s,R as Od,bE as Ed,bF as Ad,bG as Cd,a2 as _d,V as fn,U as gr,Z as _n,ah as Id,ai as Td,bH as Pd,X as Nd,bI as kd,B as ti,i as Is,b as Fd,E as $d,aa as Rd}from"./index-CpYfLdbh.js";import{P as Mn}from"./index-DiDBx4Jd.js";import{E as Ol}from"./empty-state-Bttcdn67.js";import{A as El,f as Dd,h as Md,n as Ud,j as Ld,k as Bd,i as zd,u as Vd}from"./use-mcp-client-DN-NMZV3.js";import{c as qd}from"./use-mcp-tools-HiR2aat0.js";import{c as Wd}from"./ZoomOut-DZZylEjW.js";import{i as Hd}from"./Key01-BHQPeab7.js";import{b as Gd,u as Kd,a as Yd}from"./use-connection-w2D8E4uB.js";import{U as Un,a as xi,e as Eo}from"./auth-Duwx_iL2.js";import{i as Jd,c as Zd,d as Xd,e as Qd}from"./extract-connection-data-CdrxJbbw.js";import{u as ef}from"./use-registry-connections-O8z8zBrP.js";import{b as tf}from"./use-organization-settings-CQ99RcOM.js";import{s as nf}from"./Plus-DYuvLVJp.js";import{e as Al,S as rf,a as sf,b as of,c as af,d as lf}from"./select-BVI-5ZuA.js";import{R as Ao}from"./index-CUkKcI0t.js";import{R as cf,I as uf,a as df}from"./index-C9HI3IQT.js";import{_ as Zt}from"./index-B3I-Kacs.js";import{A as Cl}from"./agent-icon-DyIO38tc.js";import{I as ff}from"./input-CIRD_tZz.js";import{a as mf,b as hf,P as pf}from"./popover-Dg4e80gp.js";import{b as gf,a as yf,c as bf,T as xf}from"./tooltip-CJMltTIZ.js";import{u as vf}from"./use-virtual-mcp-BZBO6fTt.js";import{i as Sf}from"./ChevronUp-CazSoL4d.js";import{i as wf}from"./SearchMd-BqOCkx90.js";import{a as jf}from"./Users03-zuYH9zmO.js";import{u as Of}from"./use-mobile-Dl3xzohk.js";import{u as Ef}from"./use-create-virtual-mcp-Ct9eNtwu.js";function Af(){const e=new El({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return fd(e),e}class Cf{#e=Af();#t=new Map;#n=new WeakMap;getValidator(t){const n=this.#n.get(t);if(n)return n;let r;const i=s=>{if(!r){const o=_f(t);let a=this.#t.get(o);a||(a=this.#e.compile(t),this.#t.set(o,a)),r=a}return r(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this.#e.errorsText(r.errors)}};return this.#n.set(t,i),i}}function _f(e){return JSON.stringify(e,(t,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const If=new Cf;var Tf=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const i=e.number||Ae();i instanceof Cn&&(e.number=i.int())}}},Pf=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=Ge(n):typeof n=="number"?e.number=Ge(n):typeof n=="boolean"?e.boolean=Ge(n):n===null?e.null=Os():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},Nf=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?Os():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return Ge(e[0]);if(t==="string")return Wt(e);if(t==="number"){const[n,r,...i]=e;return ar([Ge(n),Ge(r),...i.map(s=>Ge(s))])}return t==="boolean"?ar([Ge(!0),Ge(!1)]):!1}},kf=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=yd();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Ff=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=$())}},$f=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||$();r instanceof Es&&(e.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Rf=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||$();r instanceof Es&&(e.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Df=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||$();if(r instanceof Es){const i=new RegExp(n.pattern);e.string=r.regex(i)}}}},Mf=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(e.number=r.min(n.minimum))}}},Uf=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(e.number=r.max(n.maximum))}}},Lf=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},Bf=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},zf=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||Ae();r instanceof Cn&&(e.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Vf=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=me(Be()))}},qf=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||me(Be())).min(n.minItems))}},Wf=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||me(Be())).max(n.maxItems))}},Hf=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||me(Be());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=ke(n.items);let i=me(r);if(e.array&&e.array instanceof md){const s=e.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}e.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||me(Be()):e.array=me(Be()).max(0):typeof n.items=="boolean"&&n.items===!0?e.array=e.array||me(Be()):n.prefixItems&&(e.array=e.array||me(Be()))}},Gf=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(s=>ke(s));let i;r.length===0?i=Oo([]):i=Oo(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),e.tuple=i,e.array=!1}},Kf=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||W({}).passthrough())}},Yf=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=W({}).passthrough())}},Jf=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||W({}).passthrough();e.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Zf=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||W({}).passthrough();e.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function lr(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>lr(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&lr(e[i],t[i]))}return!1}function Xf(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(i=>lr(n,i))?!1:(t.push(n),!0))}}function Wr(e,t){return e.safeParse(t).success}var Qf=class{apply(e,t){if(!t.not)return e;const n=ke(t.not);return e.refine(r=>!Wr(n,r),{message:"Value must not match the 'not' schema"})}},em=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Xf(),{message:"Array items must be unique"})}},tm=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>ke(r)).reduce((r,i)=>xl(r,i),e)}},nm=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?ke(t.anyOf[0]):ar([ke(t.anyOf[0]),ke(t.anyOf[1]),...t.anyOf.slice(2).map(r=>ke(r))]);return xl(e,n)}},rm=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>ke(r));return e.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},im=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>ke(s));return e.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Wr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=ke(n.items);for(let a=i.length;a<s.length;a++)if(!Wr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},sm=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof pd||e instanceof gd){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=ke(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?W(r):W(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!ke(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},om=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>lr(r,i)),{message:"Value must match one of the enum values"})}},am=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>lr(r,n),{message:"Value must equal the const value"})}},lm=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},cm=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Be().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},um=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const i=ke(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return e.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const c of a)Wr(i,c)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},dm=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},fm=[new Pf,new Nf,new Tf,new kf,new Ff,new Vf,new Yf,new $f,new Rf,new Df,new Mf,new Uf,new Lf,new Bf,new zf,new Gf,new qf,new Wf,new Hf,new Jf,new Zf,new Kf],mm=[new cm,new om,new am,new tm,new nm,new rm,new im,new sm,new um,new Qf,new em,new dm,new lm];function ke(e){if(typeof e=="boolean")return e?Be():jo();const t={};for(const i of fm)i.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||$()),t.number!==!1&&n.push(t.number||Ae()),t.boolean!==!1&&n.push(t.boolean||gt()),t.null!==!1&&n.push(t.null||Os()),t.array!==!1&&n.push(t.array||me(Be())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const i=hd(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=jo():n.length===1?r=n[0]:Object.keys(e).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=ar(n):r=Be();for(const i of mm)r=i.apply(r,e);return r}class Co extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(_o(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(_o(this),n)}}function hm(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Ji(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Ji).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Ji(e.cause)}`:e.message:`${e}`}function _o(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var _l=e=>{throw TypeError(e)},Ts=(e,t,n)=>t.has(e)||_l("Cannot "+n),re=(e,t,n)=>(Ts(e,t,"read from private field"),n?n.call(e):t.get(e)),Ce=(e,t,n)=>t.has(e)?_l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ve=(e,t,n,r)=>(Ts(e,t,"write to private field"),t.set(e,n),n),dt=(e,t,n)=>(Ts(e,t,"access private method"),n),Re,Vt,ln,Rr,Hr,Xn,mn,Qn,Ct,cn,yn,un,Hn,He,Zi,Xi,Qi,Io,es,ts,Gn,ns,rs;class Dr extends EventTarget{constructor(t,n){var r,i;super(),Ce(this,He),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Ce(this,Re),Ce(this,Vt),Ce(this,ln),Ce(this,Rr),Ce(this,Hr),Ce(this,Xn),Ce(this,mn),Ce(this,Qn,null),Ce(this,Ct),Ce(this,cn),Ce(this,yn,null),Ce(this,un,null),Ce(this,Hn,null),Ce(this,Xi,async s=>{var o;re(this,cn).reset();const{body:a,redirected:l,status:c,headers:u}=s;if(c===204){dt(this,He,Gn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?ve(this,ln,new URL(s.url)):ve(this,ln,void 0),c!==200){dt(this,He,Gn).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){dt(this,He,Gn).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(re(this,Re)===this.CLOSED)return;ve(this,Re,this.OPEN);const d=new Event("open");if((o=re(this,Hn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){dt(this,He,Gn).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const m=new TextDecoder,y=a.getReader();let f=!0;do{const{done:p,value:b}=await y.read();b&&re(this,cn).feed(m.decode(b,{stream:!p})),p&&(f=!1,re(this,cn).reset(),dt(this,He,ns).call(this))}while(f)}),Ce(this,Qi,s=>{ve(this,Ct,void 0),!(s.name==="AbortError"||s.type==="aborted")&&dt(this,He,ns).call(this,Ji(s))}),Ce(this,es,s=>{typeof s.id=="string"&&ve(this,Qn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:re(this,ln)?re(this,ln).origin:re(this,Vt).origin,lastEventId:s.id||""});re(this,un)&&(!s.event||s.event==="message")&&re(this,un).call(this,o),this.dispatchEvent(o)}),Ce(this,ts,s=>{ve(this,Xn,s)}),Ce(this,rs,()=>{ve(this,mn,void 0),re(this,Re)===this.CONNECTING&&dt(this,He,Zi).call(this)});try{if(t instanceof URL)ve(this,Vt,t);else if(typeof t=="string")ve(this,Vt,new URL(t,pm()));else throw new Error("Invalid URL")}catch{throw hm("An invalid or illegal string was specified")}ve(this,cn,Dd({onEvent:re(this,es),onRetry:re(this,ts)})),ve(this,Re,this.CONNECTING),ve(this,Xn,3e3),ve(this,Hr,(r=n?.fetch)!=null?r:globalThis.fetch),ve(this,Rr,(i=n?.withCredentials)!=null?i:!1),dt(this,He,Zi).call(this)}get readyState(){return re(this,Re)}get url(){return re(this,Vt).href}get withCredentials(){return re(this,Rr)}get onerror(){return re(this,yn)}set onerror(t){ve(this,yn,t)}get onmessage(){return re(this,un)}set onmessage(t){ve(this,un,t)}get onopen(){return re(this,Hn)}set onopen(t){ve(this,Hn,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){re(this,mn)&&clearTimeout(re(this,mn)),re(this,Re)!==this.CLOSED&&(re(this,Ct)&&re(this,Ct).abort(),ve(this,Re,this.CLOSED),ve(this,Ct,void 0))}}Re=new WeakMap,Vt=new WeakMap,ln=new WeakMap,Rr=new WeakMap,Hr=new WeakMap,Xn=new WeakMap,mn=new WeakMap,Qn=new WeakMap,Ct=new WeakMap,cn=new WeakMap,yn=new WeakMap,un=new WeakMap,Hn=new WeakMap,He=new WeakSet,Zi=function(){ve(this,Re,this.CONNECTING),ve(this,Ct,new AbortController),re(this,Hr)(re(this,Vt),dt(this,He,Io).call(this)).then(re(this,Xi)).catch(re(this,Qi))},Xi=new WeakMap,Qi=new WeakMap,Io=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...re(this,Qn)?{"Last-Event-ID":re(this,Qn)}:void 0},cache:"no-store",signal:(e=re(this,Ct))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},es=new WeakMap,ts=new WeakMap,Gn=function(e,t){var n;re(this,Re)!==this.CLOSED&&ve(this,Re,this.CLOSED);const r=new Co("error",{code:t,message:e});(n=re(this,yn))==null||n.call(this,r),this.dispatchEvent(r)},ns=function(e,t){var n;if(re(this,Re)===this.CLOSED)return;ve(this,Re,this.CONNECTING);const r=new Co("error",{code:t,message:e});(n=re(this,yn))==null||n.call(this,r),this.dispatchEvent(r),ve(this,mn,setTimeout(re(this,rs),re(this,Xn)))},rs=new WeakMap,Dr.CONNECTING=0,Dr.OPEN=1,Dr.CLOSED=2;function pm(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class gm extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class ym{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=Md(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Un("No auth provider");let t;try{t=await xi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new Un;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=Ud(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new Dr(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await t(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:c}=Eo(a);this._resourceMetadataUrl=l,this._scope=c}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new gm(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=vl.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new Un("No auth provider");if(await xi(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Un("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=Eo(i);if(this._resourceMetadataUrl=o,this._scope=a,await xi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Un;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const bm="mcp";class xm{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,bm),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=vl.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class vm extends Ld{constructor(t,n){super(t,n)}send(t,n){const r=Sm(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function Sm(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class wm extends Bd{constructor(t,n){super(t,{jsonSchemaValidator:If,...n})}async listTools(t,n){return await this.request({method:"tools/list",params:t},bd,n)}}const jm=async(e,t,n)=>{const r=Om(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const i=new wm({name:e?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Om=(e,t,n)=>{if(e.type==="Websocket")return new xm(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const i={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const s={requestInit:{headers:i,signal:t}};return e.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:t})}),new ym(new URL(e.url),s)}return new vm(new URL(e.url),{requestInit:{headers:i,signal:t,credentials:"include"}})},To=e=>{try{return JSON.parse(e)}catch{return e}},Cr=new Map,Po=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?ke(e.inputSchema):void 0,outputSchema:e.outputSchema?ke(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function Em(e){const t=n=>"connection"in e?jm({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,c=r){const u=e?.debugId?.(),d=u?{"x-trace-debug-id":u}:void 0,{client:m}=await t(d),{structuredContent:y,isError:f,content:p}=await m.callTool({name:String(c),arguments:l});if(f){const w=p?.[0]?.text,S=typeof w=="string"?To(w):null,E=S?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(S.code,S.message,S.traceId):null;throw E||new Error(`Tool ${String(c)} returned an error: ${JSON.stringify(y??p)}`)}if(y!==void 0)return y;const b=p?.[0]?.text;return typeof b=="string"?To(b):void 0}async function s(){const{client:l}=await t(),{tools:c}=await l.listTools();return c}async function o(){if(!("connection"in e))return s();const l=e.connection,c=JSON.stringify(l);try{return Cr.has(c)||Cr.set(c,s()),await Cr.get(c)}catch(u){console.error("Failed to list tools",u),Cr.delete(c);return}}async function a(){return(await o()??[]).map(c=>Po(c,i))}return i.asTool=async()=>{const c=(await o()??[]).find(u=>u.name===r);if(!c)throw new Error(`Tool ${r} not found`);return Po(c,i)},i}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Am({connection:n}):global[t]}});function Am(e){return Em(e)}function Cm(e){return{isImplementedBy:t=>{for(const n of e){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=t.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const _m=W({id:$().describe("Unique identifier for the entity"),title:$().describe("Human-readable title for the entity"),description:$().nullish().describe("Description of the entity"),created_at:$().datetime(),updated_at:$().datetime(),created_by:$().optional(),updated_by:$().optional()}),Im=W({field:me($()),operator:Wt(["eq","gt","gte","lt","lte","in","like","contains"]),value:ft()}),Il=xd(()=>ar([Im,W({operator:Wt(["and","or","not"]),conditions:me(Il)})])),Tm=W({field:me($()),direction:Wt(["asc","desc"]),nulls:Wt(["first","last"]).optional()}),Pm=W({where:Il.optional().describe("Filter expression"),orderBy:me(Tm).optional().describe("Sort expressions"),limit:Ae().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Ae().int().min(0).optional().describe("Number of items to skip")});function Nm(e){return W({items:me(e).describe("Array of collection items"),totalCount:Ae().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:gt().optional().describe("Whether there are more items available")})}const km=W({id:$().describe("ID of the entity to retrieve")});function Fm(e){return W({item:e.nullable().describe("The retrieved item, or null if not found")})}W({id:$().describe("ID of the entity to delete")});function $m(e,t,n){const r=e.toUpperCase();return[{name:`COLLECTION_${r}_LIST`,inputSchema:Pm,outputSchema:Nm(t)},{name:`COLLECTION_${r}_GET`,inputSchema:km,outputSchema:Fm(t)}]}const Rm=W({id:$(),name:$(),description:$().optional(),inputSchema:ht($(),ft()),outputSchema:ht($(),ft()).optional()}),Dm=_m.extend({_meta:W({"io.decocms":W({id:$(),verified:gt(),scopeName:$(),appName:$(),friendlyName:$().nullable().optional(),metadata:ht($(),ft()).nullable().optional(),publishedAt:$().datetime().optional(),updatedAt:$().datetime().optional(),tools:me(Rm).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:W({$schema:$().optional(),_meta:ht($(),ft()).optional(),name:$().describe("The server name (scope/app)"),title:$().optional().describe("User-friendly title"),description:$().optional().describe("Server description"),icons:me(W({src:$(),mimeType:$().optional(),sizes:me($()).optional(),theme:Wt(["light","dark"]).optional()})).optional(),remotes:me(W({type:Wt(["http","stdio","sse"]),url:$().optional(),headers:me(ft()).optional()})).optional(),packages:me(ft()).optional(),repository:W({url:$(),source:$().optional(),subfolder:$().optional()}).optional(),version:$().optional(),websiteUrl:$().optional()})});$m("registry_app",Dm);const Mm=W({specversion:Ge("1.0").describe("CloudEvents specification version"),id:$().describe("Unique identifier for this event (UUID recommended)"),source:$().describe("Connection ID of the event publisher"),type:$().describe("Event type (e.g., 'order.created', 'user.signup')"),time:$().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:$().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:$().optional().default("application/json").describe("Content type of the data attribute"),dataschema:$().url().optional().describe("URI to the schema for the data attribute"),data:ft().optional().describe("Event payload (any JSON value)")});W({events:me(Mm).min(1).describe("Batch of CloudEvents to process")});const Um=W({success:gt().optional().describe("Whether this event was processed successfully"),error:$().optional().describe("Error message for this event"),retryAfter:Ae().int().positive().optional().describe("Re-deliver this event after this many ms")});W({success:gt().optional().describe("Batch success - applies to events not in results"),error:$().optional().describe("Batch error message - applies to events not in results"),processedCount:Ae().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Ae().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:ht($(),Um).optional().describe("Per-event results keyed by event ID")});const Lm=W({type:Ge("string"),enum:me($()).optional(),description:$().optional()}),Bm=W({type:$(),description:$(),paramsSchema:ht($(),Lm)});W({});W({triggers:me(Bm)});W({type:$(),params:ht($(),$()),enabled:gt(),callbackUrl:vd().optional(),callbackToken:$().min(1).optional()});W({success:gt()});W({prefix:$().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Ae().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:$().optional().describe("Token for pagination from previous response"),delimiter:$().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});W({objects:me(W({key:$().describe("Object key/path"),size:Ae().describe("Object size in bytes"),lastModified:$().describe("Last modified timestamp"),etag:$().describe("Entity tag for the object")})),nextContinuationToken:$().optional().describe("Token for fetching next page of results"),isTruncated:gt().describe("Whether there are more results available"),commonPrefixes:me($()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});W({key:$().describe("Object key/path to get metadata for")});W({contentType:$().optional().describe("MIME type of the object"),contentLength:Ae().describe("Size of the object in bytes"),lastModified:$().describe("Last modified timestamp"),etag:$().describe("Entity tag for the object"),metadata:ht($(),$()).optional().describe("Custom metadata key-value pairs")});W({key:$().describe("Object key/path to generate URL for"),expiresIn:Ae().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});W({url:$().describe("Presigned URL for downloading the object"),expiresIn:Ae().describe("Expiration time in seconds that was used")});W({key:$().describe("Object key/path for the upload"),expiresIn:Ae().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:$().optional().describe("MIME type for the object being uploaded")});W({url:$().describe("Presigned URL for uploading the object"),expiresIn:Ae().describe("Expiration time in seconds that was used")});W({key:$().describe("Object key/path to delete")});W({success:gt().describe("Whether the deletion was successful"),key:$().describe("The key that was deleted")});W({keys:me($()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});W({deleted:me($()).describe("Array of successfully deleted keys"),errors:me(W({key:$(),message:$()})).describe("Array of errors for failed deletions")});const zm=W({primary:$().optional().describe("Primary brand color (hex)"),secondary:$().optional().describe("Secondary brand color (hex)"),accent:$().optional().describe("Accent / highlight color (hex)"),background:$().optional().describe("Background color (hex)"),foreground:$().optional().describe("Foreground / text color (hex)")}),Vm=W({heading:$().optional().describe("Font family for headings"),body:$().optional().describe("Font family for body text"),code:$().optional().describe("Font family for code / monospace")}),qm=W({logo:$().optional().describe("Logo URL"),favicon:$().optional().describe("Favicon URL"),ogImage:$().optional().describe("Open Graph image URL")}),Wm=W({id:$(),name:$().describe("Brand / company name"),domain:$().optional().describe("Company domain (e.g. example.com)"),colors:zm.optional().describe("Semantic color palette"),fonts:Vm.optional().describe("Font families by role"),assets:qm.optional().describe("Visual identity assets"),overview:$().optional().describe("Company overview / description"),tagline:$().optional().describe("Brand tagline"),tone:$().optional().describe("Tone of voice description"),metadata:ht($(),ft()).optional().describe("Extra design tokens and metadata")});W({id:$().optional().describe("Brand ID. Omit to get the default brand.")});W({});W({items:me(Wm)});const Hm={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function Gm(e){if(e)return Hm[e]}function EA(e,t){const n=e.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=t.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return Cm(i).isImplementedBy(r)}const Ps=P.createContext(null);function AA(e){const t=Te.c(3),{children:n}=e,r=P.useContext(Ps);if(!r?.tabsEl)return null;let i;return t[0]!==n||t[1]!==r.tabsEl?(i=Sl.createPortal(n,r.tabsEl),t[0]=n,t[1]=r.tabsEl,t[2]=i):i=t[2],i}function Km(e){const t=Te.c(3),{children:n}=e,r=P.useContext(Ps);if(!r?.actionsEl)return null;let i;return t[0]!==n||t[1]!==r.actionsEl?(i=Sl.createPortal(n,r.actionsEl),t[0]=n,t[1]=r.actionsEl,t[2]=i):i=t[2],i}const CA=Km;function _A(e){const t=Te.c(21),{children:n,breadcrumb:r,hideHeader:i}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftEl:null,tabsEl:null,actionsEl:null},t[0]=s):s=t[0];const[o,a]=P.useState(s),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null);let d;t[1]===Symbol.for("react.memo_cache_sentinel")?(d=C=>{l.current=C,C&&a(_=>_.leftEl===C?_:{..._,leftEl:C})},t[1]=d):d=t[1];const m=d;let y;t[2]===Symbol.for("react.memo_cache_sentinel")?(y=C=>{c.current=C,C&&a(_=>_.tabsEl===C?_:{..._,tabsEl:C})},t[2]=y):y=t[2];const f=y;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=C=>{u.current=C,C&&a(_=>_.actionsEl===C?_:{..._,actionsEl:C})},t[3]=p):p=t[3];const b=p,w=i&&"hidden";let S;t[4]!==w?(S=ei(w),t[4]=w,t[5]=S):S=t[5];let E;t[6]===Symbol.for("react.memo_cache_sentinel")?(E=h.jsx("div",{ref:m,className:"flex items-center gap-2 min-w-0"}),t[6]=E):E=t[6];let O;t[7]!==r?(O=h.jsxs(Mn.Header.Left,{children:[r,E]}),t[7]=r,t[8]=O):O=t[8];let g;t[9]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsxs(Mn.Header.Right,{children:[h.jsx("div",{ref:f,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),h.jsx("div",{ref:b,className:"flex items-center gap-2 shrink-0"})]}),t[9]=g):g=t[9];let v;t[10]!==S||t[11]!==O?(v=h.jsxs(Mn.Header,{className:S,children:[O,g]}),t[10]=S,t[11]=O,t[12]=v):v=t[12];let j;t[13]!==n?(j=h.jsx(Mn.Content,{children:n}),t[13]=n,t[14]=j):j=t[14];let x;t[15]!==v||t[16]!==j?(x=h.jsxs(Mn,{children:[v,j]}),t[15]=v,t[16]=j,t[17]=x):x=t[17];let A;return t[18]!==o||t[19]!==x?(A=h.jsx(Ps,{value:o,children:x}),t[18]=o,t[19]=x,t[20]=A):A=t[20],A}function Ym(e){return e.startsWith("@")?e:`@${e}`}function Jm(){const{org:e}=As(),{data:t}=Sd.useSession(),n=Gd(),r=ef(),i=tf(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!e||!t?.user?.id){$r.error("Not authenticated");return}const l=Ym(a),u=(await Promise.all(s.map(async p=>{const b=Jd(p.id,e.id);try{const w=await Zd(p.id,e.id,e.slug,b,{where:{appName:l}});return Xd(w??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!u){$r.error(`MCP Server not found in registry: ${a}`);return}const d=Qd(u,e.id,t.user.id),m=d.connection_type==="STDIO",y=!!d.connection_url,f=m&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!y&&!f){$r.error("This MCP Server cannot be connected: no connection method available");return}return await n.create.mutateAsync(d),{id:d.id,connection:d}},isInstalling:n.create.isPending}}function Y(e){return typeof e!="object"||e===null||typeof e.lastModified=="number"&&typeof File<"u"&&e instanceof File||typeof e.getMonth=="function"&&typeof Date<"u"&&e instanceof Date?!1:!Array.isArray(e)}function Zm(e){return e.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),Y(e.additionalItems)}function No(e){if(e==="")return;if(e===null)return null;if(/\.$/.test(e)||/\.0$/.test(e)||/\.\d*0$/.test(e))return e;const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)?t:e}const mt="__additional_property",hn="additionalProperties",kt="allOf",ae="anyOf",$e="const",Ht="default",Ns="dependencies",Xm="enum",Pe="__errors",ge="$id",ks="if",xn="items",Qm="_$junk_option_schema_id$_",Mr="$name",Q="oneOf",is="patternProperties",ue="properties",vi="readonly",Tl="required",Gr="submitButtonOptions",pe="$ref",er="__rjsf_ref",Kn="$schema",Pl="root",Nl="_",eh=["discriminator","propertyName"],ko="formContext",th="layoutGridLookupMap",Fs="__rjsf_additionalProperties",kl="__rjsf_rootSchema",nh="ui:field",$s="ui:widget",It="ui:options",ss="ui:globalOptions",rh="ui:definitions",ih="https://json-schema.org/draft/2019-09/schema",Ur="https://json-schema.org/draft/2020-12/schema";function H(e={},t={}){return e?Object.keys(e).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=e[r];return r===$s&&Y(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===It&&Y(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...t}):{...t}}function Fl(e,t={},n){if(!(e.additionalProperties||e.patternProperties))return!1;const{expandable:r=!0}=H(t);return r===!1?r:e.maxProperties!==void 0&&n?Object.keys(n).length<e.maxProperties:!0}var $l=typeof global=="object"&&global&&global.Object===Object&&global,sh=typeof self=="object"&&self&&self.Object===Object&&self,at=$l||sh||Function("return this")(),ze=at.Symbol,Rl=Object.prototype,oh=Rl.hasOwnProperty,ah=Rl.toString,Ln=ze?ze.toStringTag:void 0;function lh(e){var t=oh.call(e,Ln),n=e[Ln];try{e[Ln]=void 0;var r=!0}catch{}var i=ah.call(e);return r&&(t?e[Ln]=n:delete e[Ln]),i}var ch=Object.prototype,uh=ch.toString;function dh(e){return uh.call(e)}var fh="[object Null]",mh="[object Undefined]",Fo=ze?ze.toStringTag:void 0;function yt(e){return e==null?e===void 0?mh:fh:Fo&&Fo in Object(e)?lh(e):dh(e)}function Dl(e,t){return function(n){return e(t(n))}}var ni=Dl(Object.getPrototypeOf,Object);function Ve(e){return e!=null&&typeof e=="object"}var hh="[object Object]",ph=Function.prototype,gh=Object.prototype,Ml=ph.toString,yh=gh.hasOwnProperty,bh=Ml.call(Object);function Ft(e){if(!Ve(e)||yt(e)!=hh)return!1;var t=ni(e);if(t===null)return!0;var n=yh.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ml.call(n)==bh}function os(e){const t={[Pe]:[],addError(n){this[Pe].push(n)}};if(Array.isArray(e))return e.reduce((n,r,i)=>({...n,[i]:os(r)}),t);if(Ft(e)){const n=e;return Object.keys(n).reduce((r,i)=>({...r,[i]:os(n[i])}),t)}return t}var Ie=Array.isArray,xh="[object Symbol]";function yr(e){return typeof e=="symbol"||Ve(e)&&yt(e)==xh}var vh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sh=/^\w*$/;function Rs(e,t){if(Ie(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||yr(e)?!0:Sh.test(e)||!vh.test(e)||t!=null&&e in Object(t)}function le(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var wh="[object AsyncFunction]",jh="[object Function]",Oh="[object GeneratorFunction]",Eh="[object Proxy]";function br(e){if(!le(e))return!1;var t=yt(e);return t==jh||t==Oh||t==wh||t==Eh}var Si=at["__core-js_shared__"],$o=(function(){var e=/[^.]+$/.exec(Si&&Si.keys&&Si.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Ah(e){return!!$o&&$o in e}var Ch=Function.prototype,_h=Ch.toString;function Xt(e){if(e!=null){try{return _h.call(e)}catch{}try{return e+""}catch{}}return""}var Ih=/[\\^$.*+?()[\]{}|]/g,Th=/^\[object .+?Constructor\]$/,Ph=Function.prototype,Nh=Object.prototype,kh=Ph.toString,Fh=Nh.hasOwnProperty,$h=RegExp("^"+kh.call(Fh).replace(Ih,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Rh(e){if(!le(e)||Ah(e))return!1;var t=br(e)?$h:Th;return t.test(Xt(e))}function Dh(e,t){return e?.[t]}function Qt(e,t){var n=Dh(e,t);return Rh(n)?n:void 0}var cr=Qt(Object,"create");function Mh(){this.__data__=cr?cr(null):{},this.size=0}function Uh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lh="__lodash_hash_undefined__",Bh=Object.prototype,zh=Bh.hasOwnProperty;function Vh(e){var t=this.__data__;if(cr){var n=t[e];return n===Lh?void 0:n}return zh.call(t,e)?t[e]:void 0}var qh=Object.prototype,Wh=qh.hasOwnProperty;function Hh(e){var t=this.__data__;return cr?t[e]!==void 0:Wh.call(t,e)}var Gh="__lodash_hash_undefined__";function Kh(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=cr&&t===void 0?Gh:t,this}function Gt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gt.prototype.clear=Mh;Gt.prototype.delete=Uh;Gt.prototype.get=Vh;Gt.prototype.has=Hh;Gt.prototype.set=Kh;function Yh(){this.__data__=[],this.size=0}function xr(e,t){return e===t||e!==e&&t!==t}function ri(e,t){for(var n=e.length;n--;)if(xr(e[n][0],t))return n;return-1}var Jh=Array.prototype,Zh=Jh.splice;function Xh(e){var t=this.__data__,n=ri(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Zh.call(t,n,1),--this.size,!0}function Qh(e){var t=this.__data__,n=ri(t,e);return n<0?void 0:t[n][1]}function ep(e){return ri(this.__data__,e)>-1}function tp(e,t){var n=this.__data__,r=ri(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function bt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bt.prototype.clear=Yh;bt.prototype.delete=Xh;bt.prototype.get=Qh;bt.prototype.has=ep;bt.prototype.set=tp;var ur=Qt(at,"Map");function np(){this.size=0,this.__data__={hash:new Gt,map:new(ur||bt),string:new Gt}}function rp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ii(e,t){var n=e.__data__;return rp(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ip(e){var t=ii(this,e).delete(e);return this.size-=t?1:0,t}function sp(e){return ii(this,e).get(e)}function op(e){return ii(this,e).has(e)}function ap(e,t){var n=ii(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function xt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xt.prototype.clear=np;xt.prototype.delete=ip;xt.prototype.get=sp;xt.prototype.has=op;xt.prototype.set=ap;var lp="Expected a function";function Ds(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lp);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(Ds.Cache||xt),n}Ds.Cache=xt;var cp=500;function up(e){var t=Ds(e,function(r){return n.size===cp&&n.clear(),r}),n=t.cache;return t}var dp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fp=/\\(\\)?/g,Ul=up(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dp,function(n,r,i,s){t.push(i?s.replace(fp,"$1"):r||n)}),t});function In(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Ro=ze?ze.prototype:void 0,Do=Ro?Ro.toString:void 0;function Ll(e){if(typeof e=="string")return e;if(Ie(e))return In(e,Ll)+"";if(yr(e))return Do?Do.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ms(e){return e==null?"":Ll(e)}function Tn(e,t){return Ie(e)?e:Rs(e,t)?[e]:Ul(Ms(e))}function $t(e){if(typeof e=="string"||yr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function si(e,t){t=Tn(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[$t(t[n++])];return n&&n==r?e:void 0}function R(e,t,n){var r=e==null?void 0:si(e,t);return r===void 0?n:r}const{getOwnPropertyNames:mp,getOwnPropertySymbols:hp}=Object,{hasOwnProperty:pp}=Object.prototype;function wi(e,t){return function(r,i,s){return e(r,i,s)&&t(r,i,s)}}function _r(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:s}=i,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);const l=e(n,r,i);return s.delete(n),s.delete(r),l}}function Mo(e){return mp(e).concat(hp(e))}const gp=Object.hasOwn||((e,t)=>pp.call(e,t)),yp="__v",bp="__o",xp="_owner",{getOwnPropertyDescriptor:Uo,keys:Lo}=Object,en=Object.is||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n};function vp(e,t){return e===t}function Sp(e,t){return e.byteLength===t.byteLength&&Kr(new Uint8Array(e),new Uint8Array(t))}function wp(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function jp(e,t){return e.byteLength===t.byteLength&&Kr(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Op(e,t){return en(e.getTime(),t.getTime())}function Ep(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Bo(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),s=e.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const c=t.entries();let u=!1,d=0;for(;(a=c.next())&&!a.done;){if(i[d]){d++;continue}const m=o.value,y=a.value;if(n.equals(m[0],y[0],l,d,e,t,n)&&n.equals(m[1],y[1],m[0],y[0],e,t,n)){u=i[d]=!0;break}d++}if(!u)return!1;l++}return!0}function Ap(e,t,n){const r=Lo(e);let i=r.length;if(Lo(t).length!==i)return!1;for(;i-- >0;)if(!Bl(e,t,n,r[i]))return!1;return!0}function Bn(e,t,n){const r=Mo(e);let i=r.length;if(Mo(t).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!Bl(e,t,n,s)||(o=Uo(e,s),a=Uo(t,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function Cp(e,t){return en(e.valueOf(),t.valueOf())}function _p(e,t){return e.source===t.source&&e.flags===t.flags}function zo(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),s=e.values();let o,a;for(;(o=s.next())&&!o.done;){const l=t.values();let c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!i[u]&&n.equals(o.value,a.value,o.value,a.value,e,t,n)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function Kr(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Ip(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Bl(e,t,n,r){return(r===xp||r===bp||r===yp)&&(e.$$typeof||t.$$typeof)?!0:gp(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const Tp=Object.prototype.toString;function Pp(e){const t=$p(e),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:c,getUnsupportedCustomComparator:u}=e;return function(m,y,f){if(m===y)return!0;if(m==null||y==null)return!1;const p=typeof m;if(p!==typeof y)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(m,y,f):p==="function"?i(m,y,f):!1;const b=m.constructor;if(b!==y.constructor)return!1;if(b===Object)return a(m,y,f);if(b===Array)return n(m,y,f);if(b===Date)return r(m,y,f);if(b===RegExp)return l(m,y,f);if(b===Map)return s(m,y,f);if(b===Set)return c(m,y,f);if(b===Promise)return!1;if(Array.isArray(m))return n(m,y,f);const w=Tp.call(m),S=t[w];if(S)return S(m,y,f);const E=u&&u(m,y,f,w);return E?E(m,y,f):!1}}function Np({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Sp,areArraysEqual:n?Bn:wp,areDataViewsEqual:jp,areDatesEqual:Op,areErrorsEqual:Ep,areFunctionsEqual:vp,areMapsEqual:n?wi(Bo,Bn):Bo,areNumbersEqual:en,areObjectsEqual:n?Bn:Ap,arePrimitiveWrappersEqual:Cp,areRegExpsEqual:_p,areSetsEqual:n?wi(zo,Bn):zo,areTypedArraysEqual:n?wi(Kr,Bn):Kr,areUrlsEqual:Ip,getUnsupportedCustomComparator:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=_r(r.areArraysEqual),s=_r(r.areMapsEqual),o=_r(r.areObjectsEqual),a=_r(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function kp(e){return function(t,n,r,i,s,o,a){return e(t,n,a)}}function Fp({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:c=e?new WeakMap:void 0,meta:u}=n();return t(a,l,{cache:c,equals:r,meta:u,strict:i})};if(e)return function(a,l){return t(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return t(a,l,s)}}function $p({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:m,areUrlsEqual:y}){return{"[object Arguments]":l,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":s,"[object BigInt]":a,"[object BigInt64Array]":m,"[object BigUint64Array]":m,"[object Boolean]":c,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":m,"[object Float32Array]":m,"[object Float64Array]":m,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":m,"[object Int16Array]":m,"[object Int32Array]":m,"[object Map]":o,"[object Number]":c,"[object Object]":(f,p,b)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,b),"[object RegExp]":u,"[object Set]":d,"[object String]":c,"[object URL]":y,"[object Uint8Array]":m,"[object Uint8ClampedArray]":m,"[object Uint16Array]":m,"[object Uint32Array]":m}}vt();vt({strict:!0});vt({circular:!0});vt({circular:!0,strict:!0});vt({createInternalComparator:()=>en});vt({strict:!0,createInternalComparator:()=>en});vt({circular:!0,createInternalComparator:()=>en});vt({circular:!0,createInternalComparator:()=>en,strict:!0});function vt(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=Np(e),o=Pp(s),a=n?n(o):kp(o);return Fp({circular:t,comparator:o,createState:r,equals:a,strict:i})}const ce=vt({circular:!0,createCustomConfig:()=>({areFunctionsEqual(e,t){return typeof t=="function"}})});var zn={exports:{}},ji,Vo;function zl(){if(Vo)return ji;Vo=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),r=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),i=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function s(g){let v="",j=0,x=0;for(x=0;x<g.length;x++)if(j=g[x].charCodeAt(0),j!==48){if(!(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102))return"";v+=g[x];break}for(x+=1;x<g.length;x++){if(j=g[x].charCodeAt(0),!(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102))return"";v+=g[x]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(g){return g.length=0,!0}function l(g,v,j){if(g.length){const x=s(g);if(x!=="")v.push(x);else return j.error=!0,!1;g.length=0}return!0}function c(g){let v=0;const j={error:!1,address:"",zone:""},x=[],A=[];let C=!1,_=!1,I=l;for(let T=0;T<g.length;T++){const k=g[T];if(!(k==="["||k==="]"))if(k===":"){if(C===!0&&(_=!0),!I(A,x,j))break;if(++v>7){j.error=!0;break}T>0&&g[T-1]===":"&&(C=!0),x.push(":");continue}else if(k==="%"){if(!I(A,x,j))break;I=a}else{A.push(k);continue}}return A.length&&(I===a?j.zone=A.join(""):_?x.push(A.join("")):x.push(s(A))),j.address=x.join(""),j}function u(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const v=c(g);if(v.error)return{host:g,isIPV6:!1};{let j=v.address,x=v.address;return v.zone&&(j+="%"+v.zone,x+="%25"+v.zone),{host:j,isIPV6:!0,escapedHost:x}}}function d(g,v){let j=0;for(let x=0;x<g.length;x++)g[x]===v&&j++;return j}function m(g){let v=g;const j=[];let x=-1,A=0;for(;A=v.length;){if(A===1){if(v===".")break;if(v==="/"){j.push("/");break}else{j.push(v);break}}else if(A===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){j.push("/");break}}else if(A===3&&v==="/.."){j.length!==0&&j.pop(),j.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),j.length!==0&&j.pop();continue}}if((x=v.indexOf("/",1))===-1){j.push(v);break}else j.push(v.slice(0,x)),v=v.slice(x)}return j.join("")}const y={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function b(g,v){const j=v?p:f;return j.lastIndex=0,g.replace(j,x=>y[x])}function w(g,v=!1){if(g.indexOf("%")===-1)return g;let j="";for(let x=0;x<g.length;x++){if(g[x]==="%"&&x+2<g.length){const A=g.slice(x+1,x+3);if(n(A)){const C=A.toUpperCase(),_=String.fromCharCode(parseInt(C,16));v&&r(_)?j+=_:j+="%"+C,x+=2;continue}}j+=g[x]}return j}function S(g){let v="";for(let j=0;j<g.length;j++){if(g[j]==="%"&&j+2<g.length){const x=g.slice(j+1,j+3);if(n(x)){const A=x.toUpperCase(),C=String.fromCharCode(parseInt(A,16));C!=="."&&r(C)?v+=C:v+="%"+A,j+=2;continue}}i(g[j])?v+=g[j]:v+=escape(g[j])}return v}function E(g){let v="";for(let j=0;j<g.length;j++){if(g[j]==="%"&&j+2<g.length){const x=g.slice(j+1,j+3);if(n(x)){v+="%"+x.toUpperCase(),j+=2;continue}}v+=escape(g[j])}return v}function O(g){const v=[];if(g.userinfo!==void 0&&(v.push(g.userinfo),v.push("@")),g.host!==void 0){let j=unescape(g.host);if(!t(j)){const x=u(j);x.isIPV6===!0?j=`[${x.escapedHost}]`:j=b(j,!1)}v.push(j)}return(typeof g.port=="number"||typeof g.port=="string")&&(v.push(":"),v.push(String(g.port))),v.length?v.join(""):void 0}return ji={nonSimpleDomain:o,recomposeAuthority:O,reescapeHostDelimiters:b,normalizePercentEncoding:w,normalizePathEncoding:S,escapePreservingEscapes:E,removeDotSegments:m,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:s},ji}var Oi,qo;function Rp(){if(qo)return Oi;qo=1;const{isUUID:e}=zl(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(g){return n.indexOf(g)!==-1}function i(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function s(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function o(g){const v=String(g.scheme).toLowerCase()==="https";return(g.port===(v?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function a(g){return g.secure=i(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function l(g){if((g.port===(i(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[v,j]=g.resourceName.split("?");g.path=v&&v!=="/"?v:void 0,g.query=j,g.resourceName=void 0}return g.fragment=void 0,g}function c(g,v){if(!g.path)return g.error="URN can not be parsed",g;const j=g.path.match(t);if(j){const x=v.scheme||g.scheme||"urn";g.nid=j[1].toLowerCase(),g.nss=j[2];const A=`${x}:${v.nid||g.nid}`,C=O(A);g.path=void 0,C&&(g=C.parse(g,v))}else g.error=g.error||"URN can not be parsed.";return g}function u(g,v){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const j=v.scheme||g.scheme||"urn",x=g.nid.toLowerCase(),A=`${j}:${v.nid||x}`,C=O(A);C&&(g=C.serialize(g,v));const _=g,I=g.nss;return _.path=`${x||v.nid}:${I}`,v.skipEscape=!0,_}function d(g,v){const j=g;return j.uuid=j.nss,j.nss=void 0,!v.tolerant&&(!j.uuid||!e(j.uuid))&&(j.error=j.error||"UUID is not valid."),j}function m(g){const v=g;return v.nss=(g.uuid||"").toLowerCase(),v}const y={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:y.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},b={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},E={http:y,https:f,ws:p,wss:b,urn:{scheme:"urn",parse:c,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(E,null);function O(g){return g&&(E[g]||E[g.toLowerCase()])||void 0}return Oi={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:O},Oi}var Wo;function Dp(){if(Wo)return zn.exports;Wo=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=zl(),{SCHEMES:c,getSchemeHandler:u}=Rp();function d(x,A){return typeof x=="string"?x=O(x,A):typeof x=="object"&&(x=E(p(x,A),A)),x}function m(x,A,C){const _=C?Object.assign({scheme:"null"},C):{scheme:"null"},I=y(E(x,_),E(A,_),_,!0);return _.skipEscape=!0,p(I,_)}function y(x,A,C,_){const I={};return _||(x=E(p(x,C),C),A=E(p(A,C),C)),C=C||{},!C.tolerant&&A.scheme?(I.scheme=A.scheme,I.userinfo=A.userinfo,I.host=A.host,I.port=A.port,I.path=t(A.path||""),I.query=A.query):(A.userinfo!==void 0||A.host!==void 0||A.port!==void 0?(I.userinfo=A.userinfo,I.host=A.host,I.port=A.port,I.path=t(A.path||""),I.query=A.query):(A.path?(A.path[0]==="/"?I.path=t(A.path):((x.userinfo!==void 0||x.host!==void 0||x.port!==void 0)&&!x.path?I.path="/"+A.path:x.path?I.path=x.path.slice(0,x.path.lastIndexOf("/")+1)+A.path:I.path=A.path,I.path=t(I.path)),I.query=A.query):(I.path=x.path,A.query!==void 0?I.query=A.query:I.query=x.query),I.userinfo=x.userinfo,I.host=x.host,I.port=x.port),I.scheme=x.scheme),I.fragment=A.fragment,I}function f(x,A,C){const _=v(x,C),I=v(A,C);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(x,A){const C={host:x.host,scheme:x.scheme,userinfo:x.userinfo,port:x.port,path:x.path,query:x.query,nid:x.nid,nss:x.nss,uuid:x.uuid,fragment:x.fragment,reference:x.reference,resourceName:x.resourceName,secure:x.secure,error:""},_=Object.assign({},A),I=[],T=u(_.scheme||C.scheme);T&&T.serialize&&T.serialize(C,_),C.path!==void 0&&(_.skipEscape?C.path=r(C.path):(C.path=s(C.path),C.scheme!==void 0&&(C.path=C.path.split("%3A").join(":")))),_.reference!=="suffix"&&C.scheme&&I.push(C.scheme,":");const k=n(C);if(k!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(k),C.path&&C.path[0]!=="/"&&I.push("/")),C.path!==void 0){let N=C.path;!_.absolutePath&&(!T||!T.absolutePath)&&(N=t(N)),k===void 0&&N[0]==="/"&&N[1]==="/"&&(N="/%2F"+N.slice(2)),I.push(N)}return C.query!==void 0&&I.push("?",C.query),C.fragment!==void 0&&I.push("#",C.fragment),I.join("")}const b=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(x,A){if(A[2]!==void 0&&x.path&&x.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof x.port=="number"&&(x.port<0||x.port>65535))return"URI port is malformed."}function S(x,A){const C=Object.assign({},A),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;C.reference==="suffix"&&(C.scheme?x=C.scheme+":"+x:x="//"+x);const k=x.match(b);if(k){_.scheme=k[1],_.userinfo=k[3],_.host=k[4],_.port=parseInt(k[5],10),_.path=k[6]||"",_.query=k[7],_.fragment=k[8],isNaN(_.port)&&(_.port=k[5]);const N=w(_,k);if(N!==void 0&&(_.error=_.error||N,I=!0),_.host)if(a(_.host)===!1){const z=e(_.host);_.host=z.host.toLowerCase(),T=z.isIPV6}else T=!0;_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&_.query===void 0&&!_.path?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",C.reference&&C.reference!=="suffix"&&C.reference!==_.reference&&(_.error=_.error||"URI is not a "+C.reference+" reference.");const F=u(C.scheme||_.scheme);if(!C.unicodeSupport&&(!F||!F.unicodeSupport)&&_.host&&(C.domainHost||F&&F.domainHost)&&T===!1&&l(_.host))try{_.host=new URL("http://"+_.host).hostname}catch(M){_.error=_.error||"Host's domain name can not be converted to ASCII: "+M}if((!F||F&&!F.skipNormalize)&&(x.indexOf("%")!==-1&&(_.scheme!==void 0&&(_.scheme=unescape(_.scheme)),_.host!==void 0&&(_.host=o(unescape(_.host),T))),_.path&&(_.path=i(_.path)),_.fragment))try{_.fragment=encodeURI(decodeURIComponent(_.fragment))}catch{_.error=_.error||"URI malformed"}F&&F.parse&&F.parse(_,C)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function E(x,A){return S(x,A).parsed}function O(x,A){return g(x,A).normalized}function g(x,A){const{parsed:C,malformedAuthorityOrPort:_}=S(x,A);return{normalized:_?x:p(C,A),malformedAuthorityOrPort:_}}function v(x,A){if(typeof x=="string"){const{normalized:C,malformedAuthorityOrPort:_}=g(x,A);return _?void 0:C}if(typeof x=="object")return p(x,A)}const j={SCHEMES:c,normalize:d,resolve:m,resolveComponent:y,equal:f,serialize:p,parse:E};return zn.exports=j,zn.exports.default=j,zn.exports.fastUri=j,zn.exports}var Mp=Dp();const Us=Cs(Mp);var Vn={},Ho;function Up(){if(Ho)return Vn;Ho=1;var e=/~/,t=/~[01]/g;function n(c){switch(c){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+c)}function r(c){return e.test(c)?c.replace(t,n):c}function i(c,u,d){for(var m,y,f=1,p=u.length;f<p;){if(u[f]==="constructor"||u[f]==="prototype"||u[f]==="__proto__")return c;if(m=r(u[f++]),y=p>f,typeof c[m]>"u"&&(Array.isArray(c)&&m==="-"&&(m=c.length),y&&(u[f]!==""&&u[f]<1/0||u[f]==="-"?c[m]=[]:c[m]={})),!y)break;c=c[m]}var b=c[m];return d===void 0?delete c[m]:c[m]=d,b}function s(c){if(typeof c=="string"){if(c=c.split("/"),c[0]==="")return c;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(c)){for(const u of c)if(typeof u!="string"&&typeof u!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return c}throw new Error("Invalid JSON pointer.")}function o(c,u){if(typeof c!="object")throw new Error("Invalid input object.");u=s(u);var d=u.length;if(d===1)return c;for(var m=1;m<d;){if(c=c[r(u[m++])],d===m)return c;if(typeof c!="object"||c===null)return}}function a(c,u,d){if(typeof c!="object")throw new Error("Invalid input object.");if(u=s(u),u.length===0)throw new Error("Invalid JSON pointer for set.");return i(c,u,d)}function l(c){var u=s(c);return{get:function(d){return o(d,u)},set:function(d,m){return a(d,u,m)}}}return Vn.get=o,Vn.set=a,Vn.compile=l,Vn}var Lp=Up();const Ei=Cs(Lp);var Bp=Object.prototype;function oi(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Bp;return e===n}var zp=Dl(Object.keys,Object),Vp=Object.prototype,qp=Vp.hasOwnProperty;function Vl(e){if(!oi(e))return zp(e);var t=[];for(var n in Object(e))qp.call(e,n)&&n!="constructor"&&t.push(n);return t}var as=Qt(at,"DataView"),ls=Qt(at,"Promise"),bn=Qt(at,"Set"),cs=Qt(at,"WeakMap"),Go="[object Map]",Wp="[object Object]",Ko="[object Promise]",Yo="[object Set]",Jo="[object WeakMap]",Zo="[object DataView]",Hp=Xt(as),Gp=Xt(ur),Kp=Xt(ls),Yp=Xt(bn),Jp=Xt(cs),Le=yt;(as&&Le(new as(new ArrayBuffer(1)))!=Zo||ur&&Le(new ur)!=Go||ls&&Le(ls.resolve())!=Ko||bn&&Le(new bn)!=Yo||cs&&Le(new cs)!=Jo)&&(Le=function(e){var t=yt(e),n=t==Wp?e.constructor:void 0,r=n?Xt(n):"";if(r)switch(r){case Hp:return Zo;case Gp:return Go;case Kp:return Ko;case Yp:return Yo;case Jp:return Jo}return t});var Zp="[object Arguments]";function Xo(e){return Ve(e)&&yt(e)==Zp}var ql=Object.prototype,Xp=ql.hasOwnProperty,Qp=ql.propertyIsEnumerable,vn=Xo((function(){return arguments})())?Xo:function(e){return Ve(e)&&Xp.call(e,"callee")&&!Qp.call(e,"callee")},eg=9007199254740991;function Ls(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=eg}function tn(e){return e!=null&&Ls(e.length)&&!br(e)}function tg(){return!1}var Wl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qo=Wl&&typeof module=="object"&&module&&!module.nodeType&&module,ng=Qo&&Qo.exports===Wl,ea=ng?at.Buffer:void 0,rg=ea?ea.isBuffer:void 0,Kt=rg||tg,ig="[object Arguments]",sg="[object Array]",og="[object Boolean]",ag="[object Date]",lg="[object Error]",cg="[object Function]",ug="[object Map]",dg="[object Number]",fg="[object Object]",mg="[object RegExp]",hg="[object Set]",pg="[object String]",gg="[object WeakMap]",yg="[object ArrayBuffer]",bg="[object DataView]",xg="[object Float32Array]",vg="[object Float64Array]",Sg="[object Int8Array]",wg="[object Int16Array]",jg="[object Int32Array]",Og="[object Uint8Array]",Eg="[object Uint8ClampedArray]",Ag="[object Uint16Array]",Cg="[object Uint32Array]",be={};be[xg]=be[vg]=be[Sg]=be[wg]=be[jg]=be[Og]=be[Eg]=be[Ag]=be[Cg]=!0;be[ig]=be[sg]=be[yg]=be[og]=be[bg]=be[ag]=be[lg]=be[cg]=be[ug]=be[dg]=be[fg]=be[mg]=be[hg]=be[pg]=be[gg]=!1;function _g(e){return Ve(e)&&Ls(e.length)&&!!be[yt(e)]}function Bs(e){return function(t){return e(t)}}var Hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tr=Hl&&typeof module=="object"&&module&&!module.nodeType&&module,Ig=tr&&tr.exports===Hl,Ai=Ig&&$l.process,Sn=(function(){try{var e=tr&&tr.require&&tr.require("util").types;return e||Ai&&Ai.binding&&Ai.binding("util")}catch{}})(),ta=Sn&&Sn.isTypedArray,vr=ta?Bs(ta):_g,Tg="[object Map]",Pg="[object Set]",Ng=Object.prototype,kg=Ng.hasOwnProperty;function we(e){if(e==null)return!0;if(tn(e)&&(Ie(e)||typeof e=="string"||typeof e.splice=="function"||Kt(e)||vr(e)||vn(e)))return!e.length;var t=Le(e);if(t==Tg||t==Pg)return!e.size;if(oi(e))return!Vl(e).length;for(var n in e)if(kg.call(e,n))return!1;return!0}function Fg(){this.__data__=new bt,this.size=0}function $g(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Rg(e){return this.__data__.get(e)}function Dg(e){return this.__data__.has(e)}var Mg=200;function Ug(e,t){var n=this.__data__;if(n instanceof bt){var r=n.__data__;if(!ur||r.length<Mg-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new xt(r)}return n.set(e,t),this.size=n.size,this}function Ye(e){var t=this.__data__=new bt(e);this.size=t.size}Ye.prototype.clear=Fg;Ye.prototype.delete=$g;Ye.prototype.get=Rg;Ye.prototype.has=Dg;Ye.prototype.set=Ug;function zs(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Yr=(function(){try{var e=Qt(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Vs(e,t,n){t=="__proto__"&&Yr?Yr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Lg=Object.prototype,Bg=Lg.hasOwnProperty;function qs(e,t,n){var r=e[t];(!(Bg.call(e,t)&&xr(r,n))||n===void 0&&!(t in e))&&Vs(e,t,n)}function Pn(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?Vs(n,a,l):qs(n,a,l)}return n}function Gl(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zg=9007199254740991,Vg=/^(?:0|[1-9]\d*)$/;function ai(e,t){var n=typeof e;return t=t??zg,!!t&&(n=="number"||n!="symbol"&&Vg.test(e))&&e>-1&&e%1==0&&e<t}var qg=Object.prototype,Wg=qg.hasOwnProperty;function Kl(e,t){var n=Ie(e),r=!n&&vn(e),i=!n&&!r&&Kt(e),s=!n&&!r&&!i&&vr(e),o=n||r||i||s,a=o?Gl(e.length,String):[],l=a.length;for(var c in e)(t||Wg.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||ai(c,l)))&&a.push(c);return a}function Ke(e){return tn(e)?Kl(e):Vl(e)}function Hg(e,t){return e&&Pn(t,Ke(t),e)}function Gg(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Kg=Object.prototype,Yg=Kg.hasOwnProperty;function Jg(e){if(!le(e))return Gg(e);var t=oi(e),n=[];for(var r in e)r=="constructor"&&(t||!Yg.call(e,r))||n.push(r);return n}function Sr(e){return tn(e)?Kl(e,!0):Jg(e)}function Zg(e,t){return e&&Pn(t,Sr(t),e)}var Yl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,na=Yl&&typeof module=="object"&&module&&!module.nodeType&&module,Xg=na&&na.exports===Yl,ra=Xg?at.Buffer:void 0,ia=ra?ra.allocUnsafe:void 0;function Jl(e,t){if(t)return e.slice();var n=e.length,r=ia?ia(n):new e.constructor(n);return e.copy(r),r}function Ws(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Qg(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var o=e[n];t(o,n,e)&&(s[i++]=o)}return s}function Zl(){return[]}var ey=Object.prototype,ty=ey.propertyIsEnumerable,sa=Object.getOwnPropertySymbols,Hs=sa?function(e){return e==null?[]:(e=Object(e),Qg(sa(e),function(t){return ty.call(e,t)}))}:Zl;function ny(e,t){return Pn(e,Hs(e),t)}function Gs(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ry=Object.getOwnPropertySymbols,Xl=ry?function(e){for(var t=[];e;)Gs(t,Hs(e)),e=ni(e);return t}:Zl;function iy(e,t){return Pn(e,Xl(e),t)}function Ql(e,t,n){var r=t(e);return Ie(e)?r:Gs(r,n(e))}function us(e){return Ql(e,Ke,Hs)}function Ks(e){return Ql(e,Sr,Xl)}var sy=Object.prototype,oy=sy.hasOwnProperty;function ay(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&oy.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Jr=at.Uint8Array;function Ys(e){var t=new e.constructor(e.byteLength);return new Jr(t).set(new Jr(e)),t}function ly(e,t){var n=t?Ys(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var cy=/\w*$/;function uy(e){var t=new e.constructor(e.source,cy.exec(e));return t.lastIndex=e.lastIndex,t}var oa=ze?ze.prototype:void 0,aa=oa?oa.valueOf:void 0;function dy(e){return aa?Object(aa.call(e)):{}}function ec(e,t){var n=t?Ys(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var fy="[object Boolean]",my="[object Date]",hy="[object Map]",py="[object Number]",gy="[object RegExp]",yy="[object Set]",by="[object String]",xy="[object Symbol]",vy="[object ArrayBuffer]",Sy="[object DataView]",wy="[object Float32Array]",jy="[object Float64Array]",Oy="[object Int8Array]",Ey="[object Int16Array]",Ay="[object Int32Array]",Cy="[object Uint8Array]",_y="[object Uint8ClampedArray]",Iy="[object Uint16Array]",Ty="[object Uint32Array]";function Py(e,t,n){var r=e.constructor;switch(t){case vy:return Ys(e);case fy:case my:return new r(+e);case Sy:return ly(e,n);case wy:case jy:case Oy:case Ey:case Ay:case Cy:case _y:case Iy:case Ty:return ec(e,n);case hy:return new r;case py:case by:return new r(e);case gy:return uy(e);case yy:return new r;case xy:return dy(e)}}var la=Object.create,tc=(function(){function e(){}return function(t){if(!le(t))return{};if(la)return la(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function nc(e){return typeof e.constructor=="function"&&!oi(e)?tc(ni(e)):{}}var Ny="[object Map]";function ky(e){return Ve(e)&&Le(e)==Ny}var ca=Sn&&Sn.isMap,Fy=ca?Bs(ca):ky,$y="[object Set]";function Ry(e){return Ve(e)&&Le(e)==$y}var ua=Sn&&Sn.isSet,Dy=ua?Bs(ua):Ry,My=1,Uy=2,Ly=4,rc="[object Arguments]",By="[object Array]",zy="[object Boolean]",Vy="[object Date]",qy="[object Error]",ic="[object Function]",Wy="[object GeneratorFunction]",Hy="[object Map]",Gy="[object Number]",sc="[object Object]",Ky="[object RegExp]",Yy="[object Set]",Jy="[object String]",Zy="[object Symbol]",Xy="[object WeakMap]",Qy="[object ArrayBuffer]",eb="[object DataView]",tb="[object Float32Array]",nb="[object Float64Array]",rb="[object Int8Array]",ib="[object Int16Array]",sb="[object Int32Array]",ob="[object Uint8Array]",ab="[object Uint8ClampedArray]",lb="[object Uint16Array]",cb="[object Uint32Array]",ye={};ye[rc]=ye[By]=ye[Qy]=ye[eb]=ye[zy]=ye[Vy]=ye[tb]=ye[nb]=ye[rb]=ye[ib]=ye[sb]=ye[Hy]=ye[Gy]=ye[sc]=ye[Ky]=ye[Yy]=ye[Jy]=ye[Zy]=ye[ob]=ye[ab]=ye[lb]=ye[cb]=!0;ye[qy]=ye[ic]=ye[Xy]=!1;function nr(e,t,n,r,i,s){var o,a=t&My,l=t&Uy,c=t&Ly;if(n&&(o=i?n(e,r,i,s):n(e)),o!==void 0)return o;if(!le(e))return e;var u=Ie(e);if(u){if(o=ay(e),!a)return Ws(e,o)}else{var d=Le(e),m=d==ic||d==Wy;if(Kt(e))return Jl(e,a);if(d==sc||d==rc||m&&!i){if(o=l||m?{}:nc(e),!a)return l?iy(e,Zg(o,e)):ny(e,Hg(o,e))}else{if(!ye[d])return i?e:{};o=Py(e,d,a)}}s||(s=new Ye);var y=s.get(e);if(y)return y;s.set(e,o),Dy(e)?e.forEach(function(b){o.add(nr(b,t,n,b,e,s))}):Fy(e)&&e.forEach(function(b,w){o.set(w,nr(b,t,n,w,e,s))});var f=c?l?Ks:us:l?Sr:Ke,p=u?void 0:f(e);return zs(p||e,function(b,w){p&&(w=b,b=e[w]),qs(o,w,nr(b,t,n,w,e,s))}),o}function oc(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function ub(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function db(e,t){return t.length<2?e:si(e,ub(t,0,-1))}var fb=Object.prototype,mb=fb.hasOwnProperty;function ac(e,t){t=Tn(t,e);var n=-1,r=t.length;if(!r)return!0;for(;++n<r;){var i=$t(t[n]);if(i==="__proto__"&&!mb.call(e,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=db(e,t);return s==null||delete s[$t(oc(t))]}function hb(e){return Ft(e)?void 0:e}var da=ze?ze.isConcatSpreadable:void 0;function pb(e){return Ie(e)||vn(e)||!!(da&&e&&e[da])}function wr(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=pb),i||(i=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?wr(a,t-1,n,r,i):Gs(i,a):r||(i[i.length]=a)}return i}function ds(e){var t=e==null?0:e.length;return t?wr(e,1):[]}function gb(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var fa=Math.max;function lc(e,t,n){return t=fa(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=fa(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),gb(e,this,a)}}function yb(e){return function(){return e}}function li(e){return e}var bb=Yr?function(e,t){return Yr(e,"toString",{configurable:!0,enumerable:!1,value:yb(t),writable:!0})}:li,xb=800,vb=16,Sb=Date.now;function wb(e){var t=0,n=0;return function(){var r=Sb(),i=vb-(r-n);if(n=r,i>0){if(++t>=xb)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var cc=wb(bb);function uc(e){return cc(lc(e,void 0,ds),e+"")}var jb=1,Ob=2,Eb=4,wn=uc(function(e,t){var n={};if(e==null)return n;var r=!1;t=In(t,function(s){return s=Tn(s,e),r||(r=s.length>1),s}),Pn(e,Ks(e),n),r&&(n=nr(n,jb|Ob|Eb,hb));for(var i=t.length;i--;)ac(n,t[i]);return n});function Zr(e,t){if(ge in e&&Us.equal(e[ge],t))return e;for(const n of Object.values(e))if(Array.isArray(n)){for(const r of n)if(le(r)){const i=Zr(r,t);if(i!==void 0)return i}}else if(le(n)){const r=Zr(n,t);if(r!==void 0)return r}}function fs(e,t){const n=R(e,ge,t);let r=e;pe in r&&(r={...r,[pe]:Us.resolve(n,r[pe])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>le(o)?fs(o,n):o)}:le(s)&&(r={...r,[i]:fs(s,n)});return r}function Js(e,t){const n=t[e];return[wn(t,[e]),n]}function dc(e,t={},n=[],r=R(t,[ge])){const i=e||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||ge in t&&t[ge]===o?s=Ei.get(t,l):t[Kn]===Ur&&(s=Zr(t,o.replace(/\/$/,"")),s!==void 0&&(s=Ei.get(s,l)))}else if(t[Kn]===Ur){const l=o?Us.resolve(o,i):i,[c,...u]=l.replace(/#\/?$/,"").split("#");s=Zr(t,c.replace(/\/$/,"")),s!==void 0&&(o=s[ge],we(u)||(s=Ei.get(s,decodeURIComponent(u.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${e}.`);const a=s[pe];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${e} is a circular reference`);const[d,...m]=n,y=[...m,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${y}`)}const[l,c]=Js(pe,s),u=dc(c,t,[...n,i],o);return Object.keys(l).length>0?t[Kn]===ih||t[Kn]===Ur?{[kt]:[l,u]}:{...l,...u}:u}return s}function dr(e,t={},n=R(t,[ge])){return dc(e,t,[],n)}var Ab=Object.prototype,Cb=Ab.hasOwnProperty;function _b(e,t){return e!=null&&Cb.call(e,t)}function fc(e,t,n){t=Tn(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=$t(t[r]);if(!(s=e!=null&&n(e,o)))break;e=e[o]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&Ls(i)&&ai(o,i)&&(Ie(e)||vn(e)))}function ie(e,t){return e!=null&&fc(e,t,_b)}var Ib="[object String]";function Rt(e){return typeof e=="string"||!Ie(e)&&Ve(e)&&yt(e)==Ib}function Je(e){let t;const n=R(e,eh);return Rt(n)?t=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),t}var Tb=1/0;function Pb(e){var t=e==null?0:e.length;return t?wr(e,Tb):[]}function ms(e,t,n){(n!==void 0&&!xr(e[t],n)||n===void 0&&!(t in e))&&Vs(e,t,n)}function Nb(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return t}}var mc=Nb();function fr(e){return Ve(e)&&tn(e)}function hs(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function kb(e){return Pn(e,Sr(e))}function Fb(e,t,n,r,i,s,o){var a=hs(e,n),l=hs(t,n),c=o.get(l);if(c){ms(e,n,c);return}var u=s?s(a,l,n+"",e,t,o):void 0,d=u===void 0;if(d){var m=Ie(l),y=!m&&Kt(l),f=!m&&!y&&vr(l);u=l,m||y||f?Ie(a)?u=a:fr(a)?u=Ws(a):y?(d=!1,u=Jl(l,!0)):f?(d=!1,u=ec(l,!0)):u=[]:Ft(l)||vn(l)?(u=a,vn(a)?u=kb(a):(!le(a)||br(a))&&(u=nc(l))):d=!1}d&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),ms(e,n,u)}function hc(e,t,n,r,i){e!==t&&mc(t,function(s,o){if(i||(i=new Ye),le(s))Fb(e,t,o,n,hc,r,i);else{var a=r?r(hs(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),ms(e,o,a)}},Sr)}function ci(e,t){return cc(lc(e,t,li),e+"")}function $b(e,t,n){if(!le(n))return!1;var r=typeof t;return(r=="number"?tn(n)&&ai(t,n.length):r=="string"&&t in n)?xr(n[t],e):!1}function Rb(e){return ci(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&$b(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var Db=Rb(function(e,t,n){hc(e,t,n)});function Zs(e,t,n,r){if(!le(e))return e;t=Tn(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var l=$t(t[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=o){var u=a[l];c=r?r(u,l,a):void 0,c===void 0&&(c=le(u)?u:ai(t[i+1])?[]:{})}qs(a,l,c),a=a[l]}return e}function he(e,t,n){return e==null?e:Zs(e,t,n)}function pc(e){return typeof e=="function"?e:li}var Mb=/\s/;function Ub(e){for(var t=e.length;t--&&Mb.test(e.charAt(t)););return t}var Lb=/^\s+/;function Bb(e){return e&&e.slice(0,Ub(e)+1).replace(Lb,"")}var ma=NaN,zb=/^[-+]0x[0-9a-f]+$/i,Vb=/^0b[01]+$/i,qb=/^0o[0-7]+$/i,Wb=parseInt;function Hb(e){if(typeof e=="number")return e;if(yr(e))return ma;if(le(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=le(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Bb(e);var n=Vb.test(e);return n||qb.test(e)?Wb(e.slice(2),n?2:8):zb.test(e)?ma:+e}var ha=1/0,Gb=17976931348623157e292;function Kb(e){if(!e)return e===0?e:0;if(e=Hb(e),e===ha||e===-ha){var t=e<0?-1:1;return t*Gb}return e===e?e:0}function gc(e){var t=Kb(e),n=t%1;return t===t?n?t-n:t:0}var Yb=9007199254740991,Ci=4294967295,Jb=Math.min;function yc(e,t){if(e=gc(e),e<1||e>Yb)return[];var n=Ci,r=Jb(e,Ci);t=pc(t),e-=Ci;for(var i=Gl(r,t);++n<e;)t(n);return i}function bc(e,t){return e&&mc(e,t,Ke)}var Zb="__lodash_hash_undefined__";function Xb(e){return this.__data__.set(e,Zb),this}function Qb(e){return this.__data__.has(e)}function Yt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new xt;++t<n;)this.add(e[t])}Yt.prototype.add=Yt.prototype.push=Xb;Yt.prototype.has=Qb;function ex(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function mr(e,t){return e.has(t)}var tx=1,nx=2;function xc(e,t,n,r,i,s){var o=n&tx,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,m=!0,y=n&nx?new Yt:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var f=e[d],p=t[d];if(r)var b=o?r(p,f,d,t,e,s):r(f,p,d,e,t,s);if(b!==void 0){if(b)continue;m=!1;break}if(y){if(!ex(t,function(w,S){if(!mr(y,S)&&(f===w||i(f,w,n,r,s)))return y.push(S)})){m=!1;break}}else if(!(f===p||i(f,p,n,r,s))){m=!1;break}}return s.delete(e),s.delete(t),m}function rx(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Xs(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var ix=1,sx=2,ox="[object Boolean]",ax="[object Date]",lx="[object Error]",cx="[object Map]",ux="[object Number]",dx="[object RegExp]",fx="[object Set]",mx="[object String]",hx="[object Symbol]",px="[object ArrayBuffer]",gx="[object DataView]",pa=ze?ze.prototype:void 0,_i=pa?pa.valueOf:void 0;function yx(e,t,n,r,i,s,o){switch(n){case gx:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case px:return!(e.byteLength!=t.byteLength||!s(new Jr(e),new Jr(t)));case ox:case ax:case ux:return xr(+e,+t);case lx:return e.name==t.name&&e.message==t.message;case dx:case mx:return e==t+"";case cx:var a=rx;case fx:var l=r&ix;if(a||(a=Xs),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;r|=sx,o.set(e,t);var u=xc(a(e),a(t),r,i,s,o);return o.delete(e),u;case hx:if(_i)return _i.call(e)==_i.call(t)}return!1}var bx=1,xx=Object.prototype,vx=xx.hasOwnProperty;function Sx(e,t,n,r,i,s){var o=n&bx,a=us(e),l=a.length,c=us(t),u=c.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var m=a[d];if(!(o?m in t:vx.call(t,m)))return!1}var y=s.get(e),f=s.get(t);if(y&&f)return y==t&&f==e;var p=!0;s.set(e,t),s.set(t,e);for(var b=o;++d<l;){m=a[d];var w=e[m],S=t[m];if(r)var E=o?r(S,w,m,t,e,s):r(w,S,m,e,t,s);if(!(E===void 0?w===S||i(w,S,n,r,s):E)){p=!1;break}b||(b=m=="constructor")}if(p&&!b){var O=e.constructor,g=t.constructor;O!=g&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof g=="function"&&g instanceof g)&&(p=!1)}return s.delete(e),s.delete(t),p}var wx=1,ga="[object Arguments]",ya="[object Array]",Ir="[object Object]",jx=Object.prototype,ba=jx.hasOwnProperty;function Ox(e,t,n,r,i,s){var o=Ie(e),a=Ie(t),l=o?ya:Le(e),c=a?ya:Le(t);l=l==ga?Ir:l,c=c==ga?Ir:c;var u=l==Ir,d=c==Ir,m=l==c;if(m&&Kt(e)){if(!Kt(t))return!1;o=!0,u=!1}if(m&&!u)return s||(s=new Ye),o||vr(e)?xc(e,t,n,r,i,s):yx(e,t,l,n,r,i,s);if(!(n&wx)){var y=u&&ba.call(e,"__wrapped__"),f=d&&ba.call(t,"__wrapped__");if(y||f){var p=y?e.value():e,b=f?t.value():t;return s||(s=new Ye),i(p,b,n,r,s)}}return m?(s||(s=new Ye),Sx(e,t,n,r,i,s)):!1}function ui(e,t,n,r,i){return e===t?!0:e==null||t==null||!Ve(e)&&!Ve(t)?e!==e&&t!==t:Ox(e,t,n,r,ui,i)}var Ex=1,Ax=2;function Cx(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var a=o[0],l=e[a],c=o[1];if(o[2]){if(l===void 0&&!(a in e))return!1}else{var u=new Ye,d;if(!(d===void 0?ui(c,l,Ex|Ax,r,u):d))return!1}}return!0}function vc(e){return e===e&&!le(e)}function _x(e){for(var t=Ke(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,vc(i)]}return t}function Sc(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Ix(e){var t=_x(e);return t.length==1&&t[0][2]?Sc(t[0][0],t[0][1]):function(n){return n===e||Cx(n,e,t)}}function Tx(e,t){return e!=null&&t in Object(e)}function wc(e,t){return e!=null&&fc(e,t,Tx)}var Px=1,Nx=2;function kx(e,t){return Rs(e)&&vc(t)?Sc($t(e),t):function(n){var r=R(n,e);return r===void 0&&r===t?wc(n,e):ui(t,r,Px|Nx)}}function Fx(e){return function(t){return t?.[e]}}function $x(e){return function(t){return si(t,e)}}function Rx(e){return Rs(e)?Fx($t(e)):$x(e)}function Qs(e){return typeof e=="function"?e:e==null?li:typeof e=="object"?Ie(e)?kx(e[0],e[1]):Ix(e):Rx(e)}function Dx(e,t,n){var r=Ie(e),i=r||Kt(e)||vr(e);if(t=Qs(t),n==null){var s=e&&e.constructor;i?n=r?new s:[]:le(e)?n=br(s)?tc(ni(e)):{}:n={}}return(i?zs:bc)(e,function(o,a,l){return t(n,o,a,l)}),n}function Mx(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function Ux(e){return e!==e}function Lx(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function jc(e,t,n){return t===t?Lx(e,t,n):Mx(e,Ux,n)}function eo(e,t){var n=e==null?0:e.length;return!!n&&jc(e,t,0)>-1}function Lr(){}var Bx=1/0,zx=bn&&1/Xs(new bn([,-0]))[1]==Bx?function(e){return new bn(e)}:Lr,Vx=200;function Oc(e,t,n){var r=-1,i=eo,s=e.length,o=!0,a=[],l=a;if(s>=Vx){var c=zx(e);if(c)return Xs(c);o=!1,i=mr,l=new Yt}else l=a;e:for(;++r<s;){var u=e[r],d=u;if(u=u!==0?u:0,o&&d===d){for(var m=l.length;m--;)if(l[m]===d)continue e;a.push(u)}else i(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}function Ec(e){return e&&e.length?Oc(e):[]}function hr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":e==null?"null":typeof e=="boolean"?"boolean":typeof e=="number"&&!Number.isNaN(e)?"number":typeof e=="object"?"object":"string"}var qx=ci(function(e){return Oc(wr(e,1,fr,!0))});function qe(e){let{type:t}=e;return!t&&e.const?hr(e.const):!t&&e.enum?"string":!t&&(e.properties||e.additionalProperties||e.patternProperties)?"object":(Array.isArray(t)&&(t.length===2&&t.includes("null")?t=t.find(n=>n!=="null"):t=t[0]),t)}function pt(e,t){const n={...e};return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},o=t[i];return e&&i in e&&Y(o)?r[i]=pt(s,o):e&&t&&(qe(e)==="object"||qe(t)==="object")&&i===Tl&&Array.isArray(s)&&Array.isArray(o)?r[i]=qx(s,o):r[i]=o,r},n)}var Wx="[object Number]";function Ac(e){return typeof e=="number"||Ve(e)&&yt(e)==Wx}function Cc(e,t,n){var r;if(e&&n){const i=R(e,n);if(i===void 0)return;for(let s=0;s<t.length;s+=1){const o=t[s],a=R(o,[ue,n],{});if(a.type!=="object"&&a.type!=="array"&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Xr(e,t,n,r,i){if(t===void 0)return 0;const s=Cc(t,n,i);if(Ac(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&ie(a,[ue,i])){const l=R(t,i),c=R(a,[ue,i],{});if(e.isValid(c,l,r))return o}else if(a[ue]){const l={anyOf:Object.keys(a[ue]).map(u=>({required:[u]}))};let c;if(a.anyOf){const{...u}=a;u.allOf?u.allOf=u.allOf.slice():u.allOf=[],u.allOf.push(l),c=u}else c={...a,...l};if(delete c.required,e.isValid(c,t,r))return o}else if(e.isValid(a,t,r))return o}return 0}const Hx=Object.prototype;function Yn(e){for(const t in e)if(Hx.hasOwnProperty.call(e,t))return!1;return!0}const Gx=["array","boolean","integer","null","number","object","string"];new Set(Gx);const Kx=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Kx);const Yx=["items","allOf","oneOf","anyOf"];new Set(Yx);const Jx=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(Jx);function Br(e){return typeof e=="object"}function et(e){return Br(e)?Yn(e):e===!0}function pn(e,t){return e<t?-1:e>t?1:0}function Ii(e,t){const n=e.length;if(n===0)return t;let r=t.length;if(r===0)return e;if(n<r){const s=e;e=t,t=s,r=n}const i=new Set(e);for(let s=0;s<r;s++)i.add(t[s]);return Array.from(i)}function Zx(e,t){const n=[];if(e.length===0||t.length===0)return n;if(e.length>t.length){const i=e;e=t,t=i}const r=new Set(t);for(let i=0;i<e.length&&r.size>0;i++){const s=e[i];r.delete(s)&&n.push(s)}return n}function xa(e){return e.length===0}function Ti(e){return(t,n)=>{const r=t.length-n.length;if(r!==0)return r;for(let i=0;i<t.length;i++)if(t[i]!==n[i]){const s=e(t[i],n[i]);if(s!==0)return s}return 0}}function _c(e,{threshold:t=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=t){const o=[];let a=0;e:for(let l=0;l<r;l++){const c=n[l];for(let u=0;u<a;u++)if(e(c,o[u])===0)continue e;a=o.push(c)}return o}const i=n.slice().sort(e);let s=0;for(let o=1;o<r;o++)e(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function Xx(e){return(t,n)=>{const r=[];let i=t.length,s=n.length;if(i===0||s===0)return r;if(i>s){const u=t;t=n,n=u;const d=i;i=s,s=d}const o=[...t].sort(e),a=[...n].sort(e);let l=0,c=0;for(;l<i&&c<s;){const u=e(o[l],a[c]);u===0?((r.length===0||e(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,c++):u<0?l++:c++}return r}}function Qx(e,t){return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}const va=Qx,Ic=()=>0,e0=e=>e===void 0,t0=e=>typeof e!="object",Sa={boolean:0,number:1,string:2};function n0(e,t){const n=typeof e,r=typeof t;return n===r?pn(e,t):Sa[n]-Sa[r]}function r0(e,t){const n=e.length;if(n===0)return t;const r=t.length;if(r===0)return e;if(r>n){const o=e;e=t,t=o}const i=new Set(e),s=t.length;for(let o=0;o<s;o++){const a=t[o];i.has(a)||e.push(a)}return e}function di(e,t,n=Ic){return(r,i)=>e(r)?e(i)?n(r,i):-1:e(i)?1:t(r,i)}function dn(e){return di(e0,e)}function Ot(e,t){return di(n=>n===void 0||e(n),t)}function Pi(e,t){return di(Array.isArray,e,t)}const Ee=dn(pn),Ni=Ot(e=>e===0,(e,t)=>e-t);function i0({deduplicationCache:e=new WeakMap,sortedKeysCache:t=new WeakMap}={}){const n=va(t,p=>Object.keys(p).sort());function r(p){return(b,w)=>{const S=n(b),E=n(w),O=Math.min(S.length,E.length);for(let g=0;g<O;g++){const v=pn(S[g],E[g]);if(v!==0)return v}if(S.length!==E.length)return S.length-E.length;for(let g=0;g<O;g++){const v=S[g],j=p(b[v],w[v]);if(j!==0)return j}return 0}}function i(p){const b=Ti(p),w=va(e,_c(p,{threshold:0}));return(S,E)=>b(w(S),w(E))}const s=i(pn);function o(p,b){if(Br(p)){if(Br(b)){const w=Object.keys(p),S=Object.keys(b),E=r0(w,S),O=E.length;for(let g=0;g<O;g++){const v=E[g];if(p[v]===b[v])continue;const x=(f[v]??a)(p[v],b[v]);if(x!==0)return x}return 0}return b===!0&&Yn(p)?0:1}return Br(b)?p===!0&&Yn(b)?0:-1:pn(p,b)}const a=dn(c),l=di(t0,Pi(r(a),Ti(c)),n0);function c(p,b){return p===null?-1:b===null?1:l(p,b)}const u=dn(o),d=Ot(Yn,r(u)),m=dn(i(o)),y=Ot(et,o),f={$id:Ee,$comment:Ee,$defs:d,$ref:Ee,$schema:Ee,const:a,contains:u,contentEncoding:Ee,contentMediaType:Ee,default:a,definitions:d,description:Ee,else:u,examples:a,exclusiveMaximum:Ee,exclusiveMinimum:Ee,format:Ee,if:u,maximum:Ee,maxItems:Ee,maxLength:Ee,maxProperties:Ee,minimum:Ee,multipleOf:Ee,not:u,pattern:Ee,propertyNames:u,readOnly:Ee,then:u,title:Ee,writeOnly:Ee,uniqueItems:Ot(p=>p===!1,Ic),minLength:Ni,minItems:Ni,minProperties:Ni,required:Ot(xa,s),enum:Ot(xa,i(c)),type:dn((p,b)=>{const w=Array.isArray(p),S=Array.isArray(b);return!w&&!S?pn(p,b):s(w?p:[p],S?b:[b])}),items:Ot(p=>!Array.isArray(p)&&et(p),Pi(o,Ti(o))),anyOf:m,allOf:m,oneOf:m,properties:d,patternProperties:d,additionalProperties:y,additionalItems:y,dependencies:Ot(Yn,r(dn(Pi(o,s))))};return{compareSchemaValues:c,compareSchemaDefinitions:o}}function wa(e){return e}const Tc=(e,t)=>e?Tc(t%e,e):t,s0=(e,t)=>Math.abs(e*t)/Tc(e,t);function o0(e,t){return e===t?e:`^(?=.*(?:${e}))(?=.*(?:${t})).*$`}function ki(e,t,n){const r=e.length,i=t.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=e[s];for(let a=0;a<i;a++)n(o,t[a])}}function Fi(e,t){return e||t}function ja(e){return(t,n)=>{const r={...t},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=t[a]===void 0?n[a]:e(t[a],n[a])}return r}}function a0(e){const t=new Map;for(const n of e)for(const r of n[0])t.set(r,n[1]);return t}function Lt(e,t,n){n===void 0||et(n)?delete e[t]:e[t]=n}const l0=["properties","patternProperties","additionalProperties"];function Oa(e){const t=Object.keys(e),n=t.length,r=[];for(let i=0;i<n;i++){const s=t[i];r.push({regExp:new RegExp(s),schema:e[s]})}return[r,t]}const Ea=[[],[]];function Aa(e,t,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(t))continue;const o=s.schema;if(o===!1)return!0;e.push(o)}return!1}const c0=["items","additionalItems"],u0=["if","then","else"];function Ca(e,t){return t.if!==void 0&&(e.if=t.if),t.then!==void 0&&(e.then=t.then),t.else!==void 0&&(e.else=t.else),e}function $i(e,t){if(e===t)return e;switch(e){case"number":if(t==="integer")return"integer";case"integer":if(t==="number")return"integer";default:return}}function Bt(e,t,n){return[e,t,n]}function d0(e){const t=new Map;for(const[n,r,i]of e){const s=o=>{if(!i(o))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(o[n])}, ${r}: ${JSON.stringify(o[r])})`)};for(const o of[[n,r],[r,n]]){let a=t.get(o[0]);a===void 0&&(a=[],t.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return t}const f0=[Bt("minimum","maximum",e=>e.maximum>=e.minimum),Bt("exclusiveMinimum","maximum",e=>e.maximum>e.exclusiveMinimum),Bt("minimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.minimum),Bt("exclusiveMinimum","exclusiveMaximum",e=>e.exclusiveMaximum>e.exclusiveMinimum),Bt("minLength","maxLength",e=>e.maxLength>=e.minLength),Bt("minItems","maxItems",e=>e.maxItems>=e.minItems),Bt("minProperties","maxProperties",e=>e.maxProperties>=e.minProperties)];function m0({mergePatterns:e=o0,isSubRegExp:t=Object.is,intersectJson:n=Zx,deduplicateJsonSchemaDef:r=wa,defaultMerger:i=wa,assigners:s=[],checks:o=f0,mergers:a}={}){function l(O){const g=O.length;let v=O[0];for(let j=1;j<g;j++){const x=w(v,O[j]);if(x===!1)return!1;et(x)||(v=x)}return v}function c(O,g,v,j,x,A,C){if(O.length=0,v===!1)return!1;if(O.push(v),x!==void 0){if(x===!1)return!1;O.push(x)}if(Aa(O,g,A))return!1;const I=O.length<2;if(C===!1){if(I)return;if(Aa(O,g,j))return!1}else I&&C!==void 0&&O.push(C);return O.length===1?O[0]:l(O)}function u(O,g,v,j,x,A){const C=v.length;if(C>0&&x!==!1)if(A)Object.assign(O,g);else for(let _=0;_<C;_++){const I=v[_];j.has(I)||(O[I]=w(g[I],x))}return O}const d=(O,{properties:g={},patternProperties:v,additionalProperties:j=!0},{properties:x={},patternProperties:A,additionalProperties:C=!0})=>{const _=et(j),I=et(C);if(_&&I)return Lt(O,"properties",S(g,x)),Lt(O,"patternProperties",v&&A?S(v,A):v??A),delete O.additionalProperties,O;const T=w(j,C);Lt(O,"additionalProperties",T);const k={},N=Object.keys(g),F=N.length,[M,z]=v?Oa(v):Ea,[V,D]=A?Oa(A):Ea,de=[],fe=new Set,Se=I?void 0:C;for(let B=0;B<F;B++){const se=N[B];fe.add(se);const oe=c(de,se,g[se],M,x[se],V,Se);oe!==void 0&&(k[se]=oe)}const q=Object.keys(x),J=q.length,G=_?void 0:j;for(let B=0;B<J;B++){const se=q[B];if(fe.has(se))continue;const oe=c(de,se,x[se],V,void 0,M,G);oe!==void 0&&(k[se]=oe)}Lt(O,"properties",k);let Z={};const X=new Set;return z.length>0&&D.length>0&&ki(z,D,(B,se)=>{t(B,se)&&X.add(B),t(se,B)&&X.add(se),Z[e(B,se)]=w(v[B],A[se])}),Z=u(Z,v,z,X,C,I),Z=u(Z,A,D,X,j,_),Lt(O,"patternProperties",Z),O},m=(O,{items:g=[],additionalItems:v},{items:j=[],additionalItems:x})=>{const A=Array.isArray(g),C=Array.isArray(j),_=[];if(O.items=_,A&&C){const[I,T,k]=g.length<j.length?[g.length,v,j]:[j.length,x,g];let N=0;for(;N<I;N++)_.push(w(g[N],j[N]));if(T===!1)O.additionalItems=!1;else{const F=T===void 0||et(T);for(;N<k.length;N++)_.push(F?k[N]:w(k[N],T));Lt(O,"additionalItems",v!==void 0&&x!==void 0?w(v,x):v??x)}}else if(A||C){const[I,T,k]=A?[g,j,v]:[j,g,x];Lt(O,"additionalItems",k&&w(k,T));for(let N=0;N<I.length;N++)_.push(w(I[N],T))}else delete O.additionalItems,O.items=w(g,j);return O},y=(O,g,v)=>{Ca(O,g);const j=Ca({},v);return O.allOf===void 0?O.allOf=[j]:O.allOf=O.allOf.concat(j),O};function f(O,g){const v=[];if(ki(O,g,(j,x)=>{try{v.push(w(j,x))}catch{}}),v.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(O)}" and "${JSON.stringify(g)}"; the merged result is empty`);return r(v)}const p=a0([[l0,d],[c0,m],[u0,y],...s]),b=d0(o);function w(O,g){if(O===!1||g===!1)return!1;if(et(O))return et(g)?!0:g;if(et(g))return O;let v={...O};const j=new Set,x=new Set,A=Object.keys(g),C=A.length;for(let _=0;_<C;_++){const I=A[_],T=g[I];if(T===void 0)continue;const k=b.get(I);if(k!==void 0){const z=k.length;for(let V=0;V<z;V++){const D=k[V];O[D.oppositeKey]!==void 0&&x.add(D.check)}}const N=O[I];if(N===void 0){v[I]=T;continue}const F=p.get(I);if(F){j.add(F);continue}const M=E[I]??i;v[I]=M(N,T)}for(const _ of j)v=_(v,O,g);for(const _ of x)_(v);return v}const S=ja(w),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(O,g)=>{if(O===g)return O;const v=Array.isArray(O),j=Array.isArray(g);if(!v&&!j){const x=$i(O,g);if(x!==void 0)return x}else if(v||j){const x=new Set;if(v&&j)ki(O,g,(C,_)=>{const I=$i(C,_);I!==void 0&&x.add(I)});else{const C=v?O:g,_=v?g:O,I=C.length;for(let T=0;T<I;T++){const k=$i(_,C[T]);k!==void 0&&x.add(k)}}const A=x.size;if(A===1)return x.values().next().value;if(A>1)return Array.from(x)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${O.toString()}, ${g.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(O,g)=>{const v=r([O,g]);return v.length===1?v[0]:{anyOf:v}},pattern:e,readOnly:Fi,writeOnly:Fi,enum:(O,g)=>{const v=n(O,g);if(v.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(O)}", "${JSON.stringify(g)}"`);return v},anyOf:f,oneOf:f,allOf:(O,g)=>r(O.concat(g)),propertyNames:w,contains:w,dependencies:ja((O,g)=>Array.isArray(O)?Array.isArray(g)?Ii(O,g):w(g,{required:O}):Array.isArray(g)?w(O,{required:g}):w(O,g)),examples:(O,g)=>{if(!Array.isArray(O)||!Array.isArray(g))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(O)}" and "${JSON.stringify(g)}"`);return Ii(O,g)},multipleOf:(O,g)=>{let v=1;for(;!Number.isInteger(O)||!Number.isInteger(g);)v*=10,O*=10,g*=10;return s0(O,g)/v},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:Fi,required:Ii,...a};return{mergeSchemaDefinitions:w,mergeArrayOfSchemaDefinitions:l}}function h0(e){const t=[],n=[e];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){t.push(r);continue}const{allOf:i,...s}=r;t.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return t}function p0(e){return t=>e(h0(t))}const{compareSchemaDefinitions:g0,compareSchemaValues:y0}=i0(),{mergeArrayOfSchemaDefinitions:b0}=m0({intersectJson:Xx(y0),deduplicateJsonSchemaDef:_c(g0)}),Pc=p0(b0);function Ne(e,t,n={},r,i,s=!1){return nt(e,t,n,r,void 0,void 0,i,s)[0]}function x0(e,t,n,r,i,s,o){const{if:a,then:l,else:c,...u}=t,d=e.isValid(a,s||{},n);let m=[u],y=[];if(r)l&&typeof l!="boolean"&&(y=y.concat(nt(e,l,n,s,r,i,o))),c&&typeof c!="boolean"&&(y=y.concat(nt(e,c,n,s,r,i,o)));else{const f=d?l:c;f&&typeof f!="boolean"&&(y=y.concat(nt(e,f,n,s,r,i,o)))}return y.length&&(m=y.map(f=>pt(u,f))),m.flatMap(f=>nt(e,f,n,s,r,i,o))}function Nc(e){return e.reduce((n,r)=>r.length>1?r.flatMap(i=>yc(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function kc(e,t){return Object.keys(e.patternProperties).filter(n=>RegExp(n).test(t)).reduce((n,r)=>(he(n,[r],e.patternProperties[r]),n),{})}function v0(e,t,n,r,i,s,o,a){const l=Fc(e,t,n,r,i,s,o,a);if(l.length>1||l[0]!==t)return l;if(Ns in t)return Rc(e,t,n,r,i,s,o).flatMap(u=>nt(e,u,n,s,r,i,o));if(kt in t&&Array.isArray(t[kt])){const c=t.allOf.map(d=>nt(e,d,n,s,r,i,o));return Nc(c).map(d=>({...t,allOf:d}))}return[t]}function Fc(e,t,n,r,i,s,o,a){const l=Tt(t,n,i,void 0,a);return l!==t?nt(e,l,n,s,r,i,o,a):[t]}function Tt(e,t,n,r,i){if(!Y(e))return e;let s=e,o=r;if(pe in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...dr(a,t,o),...l,[er]:a},ge in s&&(o=s[ge])}if(ue in s){const a=[],l=Dx(s[ue],(c,u,d)=>{const m=[...n];c[d]=Tt(u,t,m,o,i),a.push(m)},{});Db(n,Ec(Pb(a))),s={...s,[ue]:l}}if(xn in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:Tt(s.items,t,n,o,i)}),i){let a,l;ae in e&&Array.isArray(e[ae])?(a=ae,l=s[ae]):Q in e&&Array.isArray(e[Q])&&(a=Q,l=s[Q]),a&&l&&(s={...s,[a]:l.map(c=>Tt(c,t,n,o,i))})}return ce(e,s)?e:s}function S0(e,t,n,r,i){const s={...t,properties:{...t.properties}},o=r&&Y(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(is in s){const l=kc(s,a);if(!we(l)){s.properties[a]=Ne(e,{[kt]:Object.values(l)},n,R(o,[a]),i),he(s.properties,[a,mt],!0);return}}if(hn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?pe in s.additionalProperties?l=Ne(e,{[pe]:R(s.additionalProperties,[pe])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ae in s.additionalProperties||Q in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:hr(R(o,[a]))}:l={type:hr(R(o,[a]))},s.properties[a]=l,he(s.properties,[a,mt],!0)}else s.properties[a]={type:"null"},he(s.properties,[a,mt],!0)}}),s}function w0(e){return Pc(e)}function nt(e,t,n,r,i=!1,s=[],o,a){return Y(t)?v0(e,t,n,i,s,r,o,a).flatMap(c=>{var u;let d=c;if(ks in d)return x0(e,d,n,i,s,r,o);if(kt in d){if(i){const{allOf:y,...f}=d;return[...y,f]}try{const y=[],f=[];(u=d.allOf)===null||u===void 0||u.forEach(p=>{typeof p=="object"&&p.contains?y.push(p):f.push(p)}),y.length&&(d={...d,allOf:f}),d=o?o(d):w0(d),y.length&&(d.allOf=y)}catch(y){console.warn(`could not merge subschemas in allOf:
|
|
2
2
|
`,y);const{allOf:f,...p}=d;return p}}return ue in d&&is in d&&(d=Object.keys(d.properties).reduce((y,f)=>{const p=kc(y,f);return we(p)||(y.properties[f]=Ne(e,{allOf:[y.properties[f],...Object.values(p)]},n,R(r,[f]),o)),y},{...d,properties:{...d.properties}})),is in d||hn in d&&d.additionalProperties!==!1?S0(e,d,n,r,o):d}):[{}]}function j0(e,t,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=t;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const c=i===void 0&&r?{}:i,u=Je(t);s=s.map(m=>Tt(m,n,[]));const d=Xr(e,c,s,n,u);if(r){const m=$c(s,!1,n);return Xr(e,c,m,n,u),s.map(y=>pt(l,y))}return[pt(l,s[d])]}return[t]}function $c(e,t=!1,n){return e.map(r=>{if(!Y(r))return r?{}:{not:{}};const i=t&&n?Tt(r,n,[]):r;return i.additionalProperties===!1?{...i,additionalProperties:!0}:i})}function Rc(e,t,n,r,i,s,o){const{dependencies:a,...l}=t;return j0(e,l,n,r,s).flatMap(u=>Dc(e,a,u,n,r,i,s,o))}function Dc(e,t,n,r,i,s,o,a){let l=[n];for(const c in t)if((i||R(o,[c])!==void 0)&&(!n.properties||c in n.properties)){const[u,d]=Js(c,t);return Array.isArray(d)?l[0]=O0(n,d):Y(d)&&(l=E0(e,n,r,c,d,i,s,o,a)),l.flatMap(m=>Dc(e,u,m,r,i,s,o,a))}return l}function O0(e,t){if(!t)return e;const n=Array.isArray(e.required)?Array.from(new Set([...e.required,...t])):t;return{...e,required:n}}function E0(e,t,n,r,i,s,o,a,l){return nt(e,i,n,a,s,o,l).flatMap(u=>{const{oneOf:d,...m}=u,y=pt(t,m);if(d===void 0)return y;const f=d.map(b=>typeof b=="boolean"||!(pe in b)?[b]:Fc(e,b,n,s,o,a));return Nc(f).flatMap(b=>A0(e,y,n,r,b,s,o,a,l))})}function A0(e,t,n,r,i,s,o,a,l){const c=i.filter(u=>{if(typeof u=="boolean"||!u||!u.properties)return!1;const{[r]:d}=u.properties;if(d){const m={type:"object",properties:{[r]:d}};return e.isValid(m,a,n)||s}return!1});return!s&&c.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[t]):c.flatMap(u=>{const d=u,[m]=Js(r,d.properties),y={...d,properties:m};return nt(e,y,n,a,s,o,l).map(p=>pt(t,p))})}function Jn(e,t,n,r,i,s={},o){if(Array.isArray(n[i])){const l=Je(n)||r,c=n[i].map(d=>Ne(e,d,t,s,o)),u=R(s,l);if(u!==void 0)return c.find(d=>ce(R(d,[ue,l,Ht],R(d,[ue,l,$e])),u))}}function Mc(e,t,n,r,i){let s=n;if(ie(n,pe)&&(s=Ne(e,n,t,void 0,i)),we(r))return s;const o=Array.isArray(r)?[...r]:r.split("."),[a,...l]=o;if(a!==void 0&&a!==""&&ie(s,a))return s=R(s,a),Mc(e,t,s,l,i)}function zr(e,t,n,r,i,s){const o=Mc(e,t,n,r,s);return o===void 0?i:o}const _a={title:"!@#$_UNKNOWN_$#@!"};function C0(e,t,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop(),c=String(l);o.length&&o.forEach(y=>{a=zr(e,t,a,[ue,y],{},s),ie(a,Q)?a=Jn(e,t,a,c,Q,R(i,y),s):ie(a,ae)&&(a=Jn(e,t,a,c,ae,R(i,y),s))}),ie(a,Q)?a=Jn(e,t,a,c,Q,i,s):ie(a,ae)&&(a=Jn(e,t,a,c,ae,i,s));let u=zr(e,t,a,[ue,l],_a,s);u===_a&&(u=void 0);const d=zr(e,t,a,Tl,[],s);let m;return u&&Array.isArray(d)&&(m=d.includes(c)),{field:u,isRequired:m}}function _0(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function I0(e,t){return function(n,r){if(n==null)return n;if(!tn(n))return e(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var Uc=I0(bc);function T0(e,t,n,r,i){return i(e,function(s,o,a){n=r?(r=!1,s):t(n,s,o,a)}),n}function P0(e,t,n){var r=Ie(e)?_0:T0,i=arguments.length<3;return r(e,Qs(t),n,i,Uc)}const N0={type:"object",$id:Qm,properties:{__not_really_there__:{type:"number"}}};function ps(e,t,n,r,i){let s=0;return n&&(le(n.properties)?s+=P0(n.properties,(o,a,l)=>{const c=R(r,l);if(typeof a=="boolean")return o;if(ie(a,pe)){const u=Ne(e,a,t,c,i);return o+ps(e,t,u,c||{},i)}if((ie(a,Q)||ie(a,ae))&&c){const u=ie(a,Q)?Q:ae,d=Je(a);return o+jn(e,t,c,R(a,u),-1,d,i)}if(a.type==="object"){const u=le(c)?1:0;return o+u+ps(e,t,a,c,i)}if(a.type===hr(c)){let u=o+1;return a.default?u+=c===a.default?1:-1:a.const&&(u+=c===a.const?1:-1),u}return o},0):Rt(n.type)&&n.type===hr(r)&&(s+=1)),s}function jn(e,t,n,r,i=-1,s,o){const a=r.map(m=>Tt(m,t,[])),l=Cc(n,r,s);if(Ac(l))return l;const c=a.reduce((m,y,f)=>(Xr(e,n,[N0,y],t,s)===1&&m.push(f),m),[]);if(c.length===1)return c[0];c.length||yc(a.length,m=>c.push(m));const u=new Set,{bestIndex:d}=c.reduce((m,y)=>{const{bestScore:f}=m,p=a[y],b=ps(e,t,p,n,o);return u.add(b),b>f?{bestIndex:y,bestScore:b}:m},{bestIndex:i,bestScore:0});return u.size===1&&i>=0?i:d}function Lc(e){const t=e[$e],n=qe(e);return Y(t)&&Rt(t?.$data)&&n!=="object"&&n!=="array"}function Bc(e){return Array.isArray(e.enum)&&e.enum.length===1||$e in e}function to(e){return Array.isArray(e.items)&&e.items.length>0&&e.items.every(t=>Y(t))}function On(e){return e==null}function pr(e,t,n=!1,r=!1,i=!1){if(Array.isArray(t)){const s=Array.isArray(e)?e:[],o=i?s:t,a=i?t:s,l=o.map((c,u)=>a[u]!==void 0?pr(s[u],t[u],n,r,i):c);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(Y(t)){const s=Object.assign({},e);return Object.keys(t).reduce((o,a)=>{var l;const c=R(t,a),u=Y(e)&&a in e,d=a in t,m=(l=R(e,a))!==null&&l!==void 0?l:{},y=u&&Y(m)&&Object.values(m).some(b=>Y(b)),f=u&&Y(R(e,a)),p=d&&Y(c);return f&&p&&!y?(o[a]={...R(e,a),...c},o):(o[a]=pr(R(e,a),c,n,r,i&&(u||!d)),s)},s)}return r&&(e!==void 0&&On(t)||typeof t=="number"&&Number.isNaN(t))||i&&!On(t)?e:t}function Jt(e,t,n=!1){return Object.keys(t).reduce((r,i)=>{const s=e?e[i]:{},o=t[i];if(e&&i in e&&Y(o))r[i]=Jt(s,o,n);else if(n&&Array.isArray(s)&&Array.isArray(o)){let a=o;n==="preventDuplicates"&&(a=o.reduce((l,c)=>(s.includes(c)||l.push(c),l),[])),r[i]=s.concat(a)}else r[i]=o;return r},{...e})}function k0(e){if(Xm in e&&Array.isArray(e.enum)&&e.enum.length===1)return e.enum[0];if($e in e)return e.const;throw new Error("schema cannot be inferred as a constant")}function F0(e,t){const n=new Map(e.map(s=>[String(s.value),s])),r=new Set(t.filter(s=>s!=="*").map(String)),i=e.filter(s=>!r.has(String(s.value)));return t.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function En(e,t){if(e.enum){let s,o;if(t){const{enumNames:l,enumOrder:c}=H(t);s=l,o=c}let a=e.enum.map((l,c)=>({label:Array.isArray(s)?s[c]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=F0(a,o)),a}let n,r;e.anyOf?(n=e.anyOf,r=t?.anyOf):e.oneOf&&(n=e.oneOf,r=t?.oneOf);let i=Je(e);if(t){const{optionsSchemaSelector:s=i}=H(t);i=s}return n&&n.map((s,o)=>{const{title:a}=H(r?.[o]),l=s;let c,u=a;if(i){const d=R(l,[ue,i],{});c=R(d,Ht,R(d,$e)),u=u||d?.title||l.title||String(c)}else c=k0(l),u=u||l.title||String(c);return{schema:l,label:u,value:c}})}function fi(e,t,n={},r){const i=Ne(e,t,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&Bc(o)):!1}function no(e,t,n,r){return!t.uniqueItems||!t.items||typeof t.items=="boolean"?!1:fi(e,t.items,n,r)}const $0=["string","number","integer","boolean","null"];var An;(function(e){e[e.Ignore=0]="Ignore",e[e.Invert=1]="Invert",e[e.Fallback=2]="Fallback"})(An||(An={}));function Ri(e,t=An.Ignore,n=-1){if(n>=0){if(Array.isArray(e.items)&&n<e.items.length){const r=e.items[n];if(typeof r!="boolean")return r}}else if(e.items&&!Array.isArray(e.items)&&typeof e.items!="boolean")return e.items;return t!==An.Ignore&&Y(e.additionalItems)?e.additionalItems:{}}function zc(e,t){const{default:n,type:r}=e;return Array.isArray(r)&&r.includes("null")&&we(t)&&n===null?null:t}function Ia(e,t,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:c="populateAllDefaults"}=o;if(r===!0||a)e[t]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!Y(n)||!we(n))&&(e[t]=n);else if(c!=="skipDefaults"){const u=i===void 0?s.includes(t):i;Y(n)?c==="skipEmptyDefaults"?we(n)||(e[t]=n):(!we(n)||s.includes(t))&&(u||c!=="populateRequiredDefaults")&&(e[t]=n):n!==void 0&&(c==="populateAllDefaults"||c==="skipEmptyDefaults"||u&&s.includes(t))&&(e[t]=n)}}function Pt(e,t,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:o=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:c=void 0,required:u,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:m}=n;let y=Y(i)?i:{};const f=Y(t)?t:{};let p=r,b=null,w=l,S=a;if(f[$e]!==void 0&&l?.constAsDefaults!=="never"&&!Lc(f))p=f[$e];else if(Y(p)&&Y(f.default)&&!f[ae]&&!f[Q]&&!f[pe])p=Jt(p,f.default);else if(Ht in f&&!f[ae]&&!f[Q]&&!f[pe])p=f.default;else if(pe in f){const g=f[pe];a.includes(g)||(S=a.concat(g),b=dr(g,s));const v=i===void 0||Y(i)&&we(i);b&&!p&&v&&(p=f.default),d&&b&&!Y(i)&&(y=i)}else if(Ns in f){const g={...Ta(e,f,n,p),...y};[b]=Rc(e,f,s,!1,[],g,c)}else if(to(f))p=f.items.map((g,v)=>Pt(e,g,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:c,parentDefaults:Array.isArray(r)?r[v]:void 0,rawFormData:y,required:u,shouldMergeDefaultsIntoFormData:d}));else if(Q in f){const{oneOf:g,...v}=f;if(g.length===0)return;const j=Je(f),{type:x="null"}=v;!Array.isArray(x)&&$0.includes(x)&&w?.constAsDefaults==="skipOneOf"&&(w={...w,constAsDefaults:"never"}),b=g[jn(e,s,i??f.default,g,0,j,c)],b=pt(v,b)}else if(ae in f){const{anyOf:g,...v}=f;if(g.length===0)return;const j=Je(f);b=g[jn(e,s,i??f.default,g,0,j,c)],b=pt(v,b)}if(b)return Pt(e,b,{rootSchema:s,includeUndefinedValues:o,_recurseList:S,experimental_defaultFormStateBehavior:w,experimental_customMergeAllOf:c,parentDefaults:p,rawFormData:i??y,required:u,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:m});p===void 0&&(p=f.default);const E=Ta(e,f,n,p);let O=E??p;if(d){const{arrayMinItems:g={}}=l||{},{mergeExtraDefaults:v}=g,j=R0(e,f,s,i,l,c);(!Y(i)||kt in f)&&(O=pr(O,j,v,!0))}return O}function R0(e,t,n,r,i,s){const o=!Bc(t)&&fi(e,t,n,s);let a=r;if(o){const c=En(t);a=c?.some(d=>ce(d.value,r))?r:void 0}return t[$e]&&i?.constAsDefaults==="always"&&(a=t.const),a}function D0(e,t,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:a=void 0,required:l,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}={},d){{const m=Y(n)?n:{},y=t,p=o?.allOf==="populateDefaults"&&kt in y||o?.emptyObjectFields!=="skipEmptyDefaults"&&ks in y?Ne(e,y,r,m,a):y,b=p[$e],w=Object.keys(p.properties||{}).reduce((S,E)=>{var O;const g=R(p,[ue,E],{}),v=Y(b)&&b[E]!==void 0,j=(Y(g)&&$e in g||v)&&o?.constAsDefaults!=="never"&&!Lc(g),x=Pt(e,g,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:R(d,[E]),rawFormData:R(m,[E]),required:(O=p.required)===null||O===void 0?void 0:O.includes(E),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});return Ia(S,E,x,i,l,p.required,o,j,g?.type==="null"),S},{});if(p.additionalProperties&&!u){const S=Y(p.additionalProperties)?p.additionalProperties:{},E=new Set,O=[];Object.keys(m).filter(g=>!p.properties||!p.properties[g]).forEach(g=>{E.add(g),O.push(g)}),Y(d)&&O.length===0&&Object.keys(d).filter(g=>!p.properties||!p.properties[g]).forEach(g=>E.add(g)),E.forEach(g=>{var v;const j=Pt(e,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:R(d,[g]),rawFormData:R(m,[g]),required:(v=p.required)===null||v===void 0?void 0:v.includes(g),shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u});Ia(w,g,j,i,l,O)})}return zc(t,w)}}function M0(e,t,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:a,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}={},d){var m,y;let f=d;const p=t,b=(m=s?.arrayMinItems)!==null&&m!==void 0?m:{},{populate:w,mergeExtraDefaults:S}=b,E=w==="never",O=w==="requiredOnly",g=w==="all"||!E&&!O,v=(y=b?.computeSkipPopulate)!==null&&y!==void 0?y:(()=>!1),x=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((_,I)=>{const T=Ri(p,An.Fallback,I),k=Array.isArray(n)?n[I]:void 0;return Pt(e,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:_,rawFormData:k,required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u})})),Array.isArray(n)){const _=Ri(p);if(E)f=n;else{const I=n.map((k,N)=>Pt(e,_,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:k,parentDefaults:R(f,[N]),required:a,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:u}));f=pr(f,I,(O&&a||g)&&S)}}if(E)return f??x;if(O&&!a)return f||void 0;let A;const C=Array.isArray(f)?f.length:0;if(!p.minItems||no(e,p,r,o)||v(e,p,r)||p.minItems<=C)A=f||!a&&!l?f:x;else{const _=f||[],I=Ri(p,An.Invert),T=I.default,k=Array.from({length:p.minItems-C},()=>Pt(e,I,{parentDefaults:T,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:c}));A=_.concat(k)}return zc(t,A)}function Ta(e,t,n={},r){switch(qe(t)){case"object":return D0(e,t,n,r);case"array":return M0(e,t,n,r);default:return}}function Vc(e,t,n,r,i=!1,s,o,a){if(!Y(t))throw new Error(`Invalid schema: ${t}`);const l=Ne(e,t,r,n,o),c=Pt(e,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&Y(l.default))return{...c,...n};if(Y(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:u}=s||{};return pr(c,n,!0,u==="useDefaultIfFormDataUndefined",!0)}return c}function qc(e={}){return"widget"in H(e)&&H(e).widget!=="hidden"}function Wc(e,t,n={},r,i){if(n[$s]==="files")return!0;if(t.items){const s=Ne(e,t.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function U0(e,t,n={},r,i,s){const o=H(n,i),{label:a=!0}=o;let l=!!a;if(l){const c=qe(t),u=R(t,mt,!1);c==="array"&&(l=u||no(e,t,r,s)||Wc(e,t,n,r,s)||qc(n)),c==="object"&&(l=u),c==="boolean"&&n&&!n[$s]&&(l=!1),n&&n[nh]&&(l=!1)}return l}function Hc(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],a=si(e,o);n(a,o)&&Zs(s,Tn(o,e),a)}return s}function L0(e,t){return Hc(e,t,function(n,r){return wc(e,r)})}var ro=uc(function(e,t){return e==null?{}:L0(e,t)});function B0(e,t){if(t.length===0&&typeof e!="object")return e;const n=ro(e,t);return Array.isArray(e)?Object.keys(n).map(r=>n[r]):n}function z0(e,t){const n=(i,s)=>typeof i!="object"||we(i)||s&&!we(i),r=(i,s=[],o=[[]])=>{const a=Object.keys(i);return a.forEach(l=>{const c=i[l];if(typeof c=="object"){const u=o.map(d=>[...d,l]);c[Fs]&&c[Mr]!==""?s.push(c[Mr]):r(c,s,u)}else l===Mr&&c!==""&&o.forEach(u=>{const d=R(t,u),m=a.length===1;(n(d,m)||Array.isArray(d)&&d.every(y=>n(y,m)))&&s.push(u)})}),s};return r(e)}function rr(e){return On(e)||e===""?!0:Array.isArray(e)?e.length===0:Y(e)?Object.values(e).every(rr):!1}function V0(e,t){return t?t(e):Pc(e)}function q0(e,t,n={},r,i){function s(f){return Y(f)}function o(f){return Y(f)}function a(f,p,b){var w;const{properties:S,additionalProperties:E,patternProperties:O,propertyNames:g}=f,v=new Set((w=f.required)!==null&&w!==void 0?w:[]);function j(A,C,_,I=!1){var T;const k=y(C,_,b[A]);if(!I&&Y(k)){let N=o(C)?C:{};N.$ref!==void 0&&(N=dr(N.$ref,n));const F=new Set((T=N.required)!==null&&T!==void 0?T:[]);if(Object.entries(k).every(([z,V])=>!F.has(z)&&rr(V)))return}k!==void 0&&(b[A]=k)}if(S!==void 0)for(const[A,C]of Object.entries(S))j(A,C,p[A],v.has(A));let x;if(O!==void 0){x=[];const A=Object.entries(O).map(([_,I])=>[new RegExp(_),I]),C=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))if(!C.has(_)){const T=A.find(([k])=>k.test(_));T===void 0?x.push(_):j(_,T[1],I)}}if(E!==void 0&&E!==!1){const A=E;if(x!==void 0)for(const C of x)j(C,A,p[C]);else{const C=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))C.has(_)||j(_,A,I)}}if(g!==void 0)for(const[A,C]of Object.entries(p))b[A]=C;return b}function l(f,p,b){const{items:w,additionalItems:S}=f;if(w!==void 0)if(Array.isArray(w))for(let E=0;E<w.length;E+=1)b.push(y(w[E],p[E]));else for(let E=0;E<p.length;E+=1)b.push(y(w,p[E]));if(S)for(let E=b.length;E<p.length;E+=1)b.push(y(S,p[E]));return b}function c(f,p,b){const{if:w,then:S,else:E}=f;if(w===void 0)return b;const g=(o(w)?e.isValid(w,p,n):w)?S:E;return g===void 0?b:y(g,p,b)}function u(f,p,b,w){if(!Array.isArray(f)||fi(e,p,n,i))return w;const S=$c(f,!0,n),E=jn(e,n,b,S,0,Je(p),i),O=f[E],g=Y(O)?Tt(O,n,[]):S[E];return y(g,b,w)}function d(f,p,b){const{anyOf:w}=f;if(!Array.isArray(w))return b;if(p===void 0||Array.isArray(p)&&p.length===0||Y(p)&&Object.keys(p).length===0){let S=b;for(const E of w)S=y(E,p,S);return S}return u(w,f,p,b)}function m(f,p,b){const{dependencies:w}=f;if(w===void 0||!s(p))return b;let S=b;for(const[E,O]of Object.entries(w))E in p&&!Array.isArray(O)&&(S=y(O,p,S));return S}function y(f,p,b){if(p===void 0||f===!1)return;if(f===!0||we(f))return p;let w=f;const{$ref:S,allOf:E}=w;if(S!==void 0)return y(dr(S,n),p,b);E&&(w=V0(w,i));let O=d(w,p,u(w.oneOf,w,p,b));const g=qe(w);if(g==="object"){if(!s(p))return;O=a(w,p,s(O)?O:{})}else if(g==="array"){if(!Array.isArray(p))return;O=l(w,p,Array.isArray(O)?O:[])}else O===void 0&&(O=p);return m(w,p,c(w,p,O))}return y(t,r)}const Ue=Symbol("no Value");function Gc(e){if(Array.isArray(e.enum))return e.enum;const t=e.oneOf||e.anyOf;if(!Array.isArray(t))return;const n=t.map(r=>$e in r?r[$e]:Array.isArray(r.enum)&&r.enum.length===1?r.enum[0]:Ue).filter(r=>r!==Ue);return n.length>0?n:void 0}function W0(e,t){const n=Gc(e);if(!n||n.some(i=>ce(i,t)))return Ue;const r=R(e,Ht,Ue);return r!==Ue&&n.some(i=>ce(i,r))?r:n.length===1?n[0]:void 0}function gs(e,t,n,r,i={},s){let o;if(ie(n,ue)){const a={};if(ie(r,ue)){const u=R(r,ue,{});Object.keys(u).forEach(d=>{ie(i,d)&&(a[d]=void 0)})}const l=Object.keys(R(n,ue,{})),c={};l.forEach(u=>{const d=R(i,u);let m=R(r,[ue,u],{}),y=R(n,[ue,u],{});ie(m,pe)&&(m=Ne(e,m,t,d,s)),ie(y,pe)&&(y=Ne(e,y,t,d,s));const f=R(m,"type"),p=R(y,"type");if(!f||f===p)if(ie(a,u)&&delete a[u],p==="object"||p==="array"&&Array.isArray(d)){const b=gs(e,t,y,m,d,s);(b!==void 0||p==="array")&&(c[u]=b)}else{const b=R(y,Ht,Ue),w=R(m,Ht,Ue);b!==Ue&&b!==d&&(w===d?a[u]=b:R(y,"readOnly")===!0&&(a[u]=void 0));const S=R(y,$e,Ue),E=R(m,$e,Ue);if(S!==Ue&&S!==d&&(a[u]=E===d?S:void 0),ie(i,u)){const O=W0(y,d);O!==Ue&&(a[u]=O)}}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...c}}else if(R(r,"type")==="array"&&R(n,"type")==="array"&&Array.isArray(i)){let a=R(r,"items"),l=R(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){ie(a,pe)&&(a=Ne(e,a,t,i,s)),ie(l,pe)&&(l=Ne(e,l,t,i,s));const c=R(a,"type"),u=R(l,"type");if(!c||c===u){const d=R(n,"maxItems",-1);if(u==="object")o=i.reduce((m,y)=>{const f=gs(e,t,l,a,y,s);return f!==void 0&&(d<0||m.length<d)&&m.push(f),m},[]);else{const m=Gc(l),y=m?i.filter(f=>m.some(p=>ce(p,f))):i;o=d>0&&y.length>d?y.slice(0,d):y}}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}function Et(e,t,n,r,i,s=[],o){if(pe in t||Ns in t||kt in t||ks in t){const l=Ne(e,t,r,i,o);if(s.findIndex(u=>ce(u,l))===-1)return Et(e,l,n,r,i,s.concat(l),o)}let a={[Mr]:n.replace(/^\./,"")};if(Q in t||ae in t){const l=Q in t?t.oneOf:t.anyOf,c=Je(t),u=jn(e,r,i,l,0,c,o),d=l[u];a={...a,...Et(e,d,n,r,i,s,o)}}if(hn in t&&t[hn]!==!1){he(a,Fs,!0);const l=le(t[hn])?t[hn]:{},c=R(t,ue,{});for(const u of Object.keys(i??{}))u in c||(a[u]=Et(e,l,`${n}.${u}`,r,R(i,[u]),s,o))}if(xn in t&&Array.isArray(i)){const{items:l,additionalItems:c}=t;Array.isArray(l)?i.forEach((u,d)=>{l[d]?a[d]=Et(e,l[d],`${n}.${d}`,r,u,s,o):c?a[d]=Et(e,c,`${n}.${d}`,r,u,s,o):console.warn(`Unable to generate path schema for "${n}.${d}". No schema defined for it`)}):i.forEach((u,d)=>{a[d]=Et(e,l,`${n}.${d}`,r,u,s,o)})}else if(ue in t)for(const l in t.properties){const c=R(t,[ue,l],{});a[l]=Et(e,c,`${n}.${l}`,r,R(i,[l]),s,o)}return a}function H0(e,t,n="",r,i,s){return Et(e,t,n,r,i,void 0,s)}class G0{constructor(t,n,r,i){n&&n[Kn]===Ur?this.rootSchema=fs(n,R(n,ge,"#")):this.rootSchema=n,this.validator=t,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(t,n,r={},i){return!t||!n?!1:this.validator!==t||!ce(this.rootSchema,n)||!ce(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(t,n,r){return C0(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(t,n,r,i){return Jn(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(t,n,r=!1,i){return Vc(this.validator,t,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(t,n,r){return U0(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(t,n,r,i){return jn(this.validator,this.rootSchema,t,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(t,n,r){return Xr(this.validator,t,n,this.rootSchema,r)}getFromSchema(t,n,r){return zr(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}isFilesArray(t,n){return Wc(this.validator,t,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(t){return no(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(t){return fi(this.validator,t,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(t,n){return q0(this.validator,t,this.rootSchema,n)}retrieveSchema(t,n,r){return Ne(this.validator,t,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(t,n,r){return gs(this.validator,this.rootSchema,t,n,r,this.experimental_customMergeAllOf)}toPathSchema(t,n,r){return H0(this.validator,t,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function K0(e,t,n={},r){return new G0(e,t,n,r)}function Y0(e){var t;if(!e.includes("data:"))throw new Error("File is invalid: URI must be a dataURI");const r=e.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,s]=r,[o,...a]=i.split(";"),l=o||"",c=decodeURI(((t=a.map(u=>u.split("=")).find(([u])=>u==="name"))===null||t===void 0?void 0:t[1])||"unknown");try{const u=atob(s),d=new Array(u.length);for(let y=0;y<u.length;y+=1)d[y]=u.charCodeAt(y);return{blob:new window.Blob([new Uint8Array(d)],{type:l}),name:c}}catch(u){throw new Error(`File is invalid: ${u.message}`)}}function At(e,t){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}function Kc(e,t){const n=e<=0&&t<=0,r=e<0||t<0;if(!n&&r)throw new Error(`Both start (${e}) and stop (${t}) must both be <= 0 or > 0, got one of each`);const i=new Date().getFullYear(),s=n?i+e:e,o=n?i+t:t;if(s>o)return Kc(t,e).reverse();const a=[];for(let l=s;l<=o;l+=1)a.push({value:l,label:At(l,2)});return a}function J0(e,t){let n=e;if(Array.isArray(t)){const r=n.split(/(%\d)/);t.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function Z0(e,t){return J0(e,t)}function mi(e,t=[],n){if(Array.isArray(e))return e.map(s=>mi(s,t)).filter(s=>s!==void 0);const r=e===""||e===null?-1:Number(e),i=t[r];return i?i.value:n}function Yc(e,t,n=[]){const r=mi(e,n);return Array.isArray(t)?t.filter(i=>!ce(i,r)):ce(r,t)?void 0:t}function jr(e,t){return Array.isArray(t)?t.some(n=>ce(n,e)):ce(t,e)}function X0(e,t=[],n=!1){const r=t.map((i,s)=>jr(i.value,e)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Jc(e,t,n,r="indexed",i){if(typeof e>"u"||n&&Array.isArray(e)&&e.length<1||!n&&e===i)return i;if(r==="realValue")return n?e.map(String):String(e);const o=X0(e,t,n);return typeof o>"u"?i:o}function Zc(e,t,n=[]){const r=mi(e,n);if(!On(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return t.slice(0,i).concat(r,t.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return t}function Pa(e,t,n){if(e===""||!Array.isArray(t))return n;const r=t.find(s=>String(s.value)===e);if(r)return r.value;const i=Number(e);return!Number.isNaN(i)&&i>=0&&i<t.length?t[i].value:n}function Fe(e,t,n="indexed",r){return n!=="realValue"?mi(e,t,r):Array.isArray(e)?e.map(i=>Pa(i,t,r)):Pa(e,t,r)}function Or(e,t,n="indexed"){return n!=="realValue"?String(t):On(e)?"":String(typeof e=="object"?t:e)}var Q0=1,ev=4;function io(e){return nr(e,Q0|ev)}function tv(e,t,n,r){return r=typeof r=="function"?r:void 0,e==null?e:Zs(e,t,n,r)}class Xc{constructor(t){this.errorSchema={},this.resetAllErrors(t)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(t){let r=Array.isArray(t)&&t.length>0||typeof t=="string"?R(this.errorSchema,t):this.errorSchema;return!r&&t&&(r={},tv(this.errorSchema,t,r,Object)),r}resetAllErrors(t){return this.errorSchema=t?io(t):{},this}addErrors(t,n){const r=this.getOrCreateErrorBlock(n);let i=R(r,Pe);return Array.isArray(i)||(i=[],r[Pe]=i),Array.isArray(t)?he(r,Pe,[...new Set([...i,...t])]):he(r,Pe,[...new Set([...i,t])]),this}setErrors(t,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(t)?[...new Set([...t])]:[t];return he(r,Pe,i),this}clearErrors(t){const n=this.getOrCreateErrorBlock(t);return he(n,Pe,[]),this}}var nv=200;function rv(e,t,n,r){var i=-1,s=eo,o=!0,a=e.length,l=[],c=t.length;if(!a)return l;t.length>=nv&&(s=mr,o=!1,t=new Yt(t));e:for(;++i<a;){var u=e[i],d=u;if(u=u!==0?u:0,o&&d===d){for(var m=c;m--;)if(t[m]===d)continue e;l.push(u)}else s(t,d,r)||l.push(u)}return l}var iv=ci(function(e,t){return fr(e)?rv(e,wr(t,1,fr,!0)):[]});function sv(e,t){if(e==null)return{};var n=In(Ks(e),function(r){return[r]});return t=Qs(t),Hc(e,n,function(r,i){return t(r,i[0])})}function Na(e,t){const n=Ft(e),r=Ft(t);if(e===t||!n&&!r)return[];if(n&&!r)return Ke(e);if(!n&&r)return Ke(t);const i=Ke(sv(e,(o,a)=>!ce(o,R(t,a)))),s=iv(Ke(t),Ke(e));return[...i,...s]}function ov(e,t,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:c}=e,u={type:"day",range:[1,31],value:i},d={type:"month",range:[1,12],value:s},m={type:"year",range:n,value:o},y=[];switch(r){case"MDY":y.push(d,u,m);break;case"DMY":y.push(u,d,m);break;default:y.push(m,d,u)}return t&&y.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:c}),y}function Qc(e){const t={};return e.multipleOf&&(t.step=e.multipleOf),(e.minimum||e.minimum===0)&&(t.min=e.minimum),(e.maximum||e.maximum===0)&&(t.max=e.maximum),t}function eu(e,t,n={},r=!0){const i={type:t||"text",...Qc(e)};return n.inputType?i.type=n.inputType:t||(e.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):e.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(e.formatMinimum!==void 0&&(i.min=e.formatMinimum),e.formatMaximum!==void 0&&(i.max=e.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function Nn(e){var t;return(t=e?.optionValueFormat)!==null&&t!==void 0?t:"indexed"}const ka={props:{disabled:!1},submitText:"Submit",norender:!1};function tu(e={}){const t=H(e);if(t&&t[Gr]){const n=t[Gr];return{...ka,...n}}return ka}function K(e,t,n={}){const{templates:r}=t;if(e==="ButtonTemplates")return r[e];if(Object.hasOwn(n,e)&&typeof n[e]=="string"&&Object.hasOwn(r,n[e])){const i=n[e];return r[i]}return n[e]||r[e]}var av=0;function nu(e){var t=++av;return Ms(e)+t}function so(){if(R(globalThis,"process.env.NODE_ENV")!=="test")return{};const e=new Map;return new Proxy({},{get(t,n){return e.has(n)||e.set(n,nu("test-id-")),e.get(n)}})}const Di={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function lv(e){let t=R(e,"MergedWidget");if(!t){const n=e.defaultProps&&e.defaultProps.options||{};t=({options:r,...i})=>h.jsx(e,{options:{...n,...r},...i}),he(e,"MergedWidget",t)}return t}function ot(e,t,n={}){const r=qe(e);if(typeof t=="function"||t&&Ao.isForwardRef(P.createElement(t))||Ao.isMemo(t))return lv(t);if(typeof t!="string")throw new Error(`Unsupported widget definition: ${typeof t} in schema: ${JSON.stringify(e)}`);if(t in n){const i=n[t];return ot(e,i,n)}if(typeof r=="string"){if(!(r in Di))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(e)}`);if(t in Di[r]){const i=n[Di[r][t]];return ot(e,i,n)}}throw new Error(`No widget '${t}' for type '${r}' in schema: ${JSON.stringify(e)}`)}function cv(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t.toString(16)}function uv(e){const t=new Set;return JSON.stringify(e,(n,r)=>(t.add(n),r)),JSON.stringify(e,Array.from(t).sort())}function rt(e){return cv(uv(e))}function dv(e){return rt(e)}function fv(e,t,n={}){try{return ot(e,t,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function nn(e,t){return`${Rt(e)?e:e[ge]}__${t}`}function rn(e){return nn(e,"description")}function oo(e){return nn(e,"error")}function hi(e){return nn(e,"examples")}function ao(e){return nn(e,"help")}function pi(e){return nn(e,"title")}function De(e,t=!1){const n=t?` ${hi(e)}`:"";return`${oo(e)} ${rn(e)} ${ao(e)}${n}`}function qt(e,t){return`${e}-${t}`}function it(e,t){return nn(e,t)}function Mi(e,t){return nn(e,`optional${t}`)}function kn(e){return!On(e)&&(!le(e)||Array.isArray(e)||!we(e))}function mv(e,t){const{rootSchema:n,schemaUtils:r}=e;if(ce(t,n))return!0;if(pe in n){const i=r.retrieveSchema(n);return ce(t,wn(i,er))}return!1}function ru(e,t,n){return t?n:e}function hv(e){return e?new Date(e).toJSON():void 0}function lo(e,t,n){const r=[th];return ie(e,ko)&&r.unshift(ko),R(e,[...r,t],n)}function pv(e,t){if(!Array.isArray(t))return e;const n=u=>u.reduce((d,m)=>(d[m]=!0,d),{}),r=u=>u.length>1?`properties '${u.join("', '")}'`:`property '${u[0]}'`,i=n(e),s=t.filter(u=>u==="*"||i[u]),o=n(s),a=e.filter(u=>!o[u]),l=s.indexOf("*");if(l===-1){if(a.length)throw new Error(`uiSchema order list does not contain ${r(a)}`);return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const c=[...s];return c.splice(l,1,...a),c}function Ui(e,t=!0){if(!e)return{year:-1,month:-1,day:-1,hour:t?-1:0,minute:t?-1:0,second:t?-1:0};const n=new Date(e);if(Number.isNaN(n.getTime()))throw new Error(`Unable to parse date ${e}`);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:t?n.getUTCHours():0,minute:t?n.getUTCMinutes():0,second:t?n.getUTCSeconds():0}}function gn(e,t,n,r){if(!Y(t))return r;const i=Ne(e,t,n,r);if(Array.isArray(r)){const u=i.items;if(!u)return r;let d=!1;const m=r.map((y,f)=>{let p=u;Array.isArray(u)&&(p=u[f]||i.additionalItems||{});const b=gn(e,p,n,y);return b!==y&&(d=!0),b===void 0?{}:b});return d?m:r}const{properties:s,required:o=[]}=i;if(!Y(r)||!s)return r;const a={},l=r;let c=!1;for(const u of Object.keys(l)){const d=l[u],m=s[u]||{},y=o.includes(u),f=Y(d),p=Array.isArray(d);if((f||p)&&s[u]){const b=gn(e,m,n,d);(y||!rr(b))&&(a[u]=b,c=!0)}else(y||!rr(d)||!s[u])&&(a[u]=d,rr(d)||(c=!0))}if(!(!c&&Object.keys(a).length===0))return a}function gv(e,t,n){var r,i;const s=(r=e[er])!==null&&r!==void 0?r:e[pe],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!t||we(t)?l={...a}:l=Jt(a,t):l=t||{},o){let c=e;if(s&&e[pe]&&!e[er])try{c=dr(s,n.rootSchema)}catch(u){return console.warn(`could not resolve $ref in resolveUiSchema:
|
|
3
3
|
`,u),l}for(const u of[Q,ae]){const d=c[u];if(Array.isArray(d)&&d.length>0){const m=l[u],y=Array.isArray(m)?[...m]:[];let f=!1;for(let p=0;p<d.length;p++){const b=d[p],w=(i=b?.[er])!==null&&i!==void 0?i:b?.[pe];if(w&&w in o){const S=y[p]||{};y[p]=Jt(o[w],S),f=!0}}f&&(l[u]=y)}}}return l}function ir(e){if(e.const||e.enum&&e.enum.length===1&&e.enum[0]===!0)return!0;if(e.anyOf&&e.anyOf.length===1)return ir(e.anyOf[0]);if(e.oneOf&&e.oneOf.length===1)return ir(e.oneOf[0]);if(e.allOf){const t=n=>ir(n);return e.allOf.some(t)}return!1}function Fa(e,t){if(Object.is(e,t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){const s=n[i];if(!Object.hasOwn(t,s)||!Object.is(e[s],t[s]))return!1}return!0}function iu(e,t,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=e;return!Fa(o,t)||!Fa(a,n)}const{props:i,state:s}=e;return!ce(i,t)||!ce(s,n)}function $a(e){const t=Ec(e.map(n=>le(n)?qe(n):void 0).flat().filter(n=>n!==void 0));return t.length===1?t[0]:t}function Er(e,t,n,r){const{enableOptionalDataFieldForType:i=[]}=H(r,e.globalUiOptions);let s;return ae in t&&Array.isArray(t[ae])?s=$a(t[ae]):Q in t&&Array.isArray(t[Q])?s=$a(t[Q]):s=qe(t),!mv(e,t)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function Ra(e,t=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=e,l=Date.UTC(n,r-1,i,s,o,a),c=new Date(l).toJSON();return t?c:c.slice(0,10)}function co(e,t=[]){if(!e)return[];let n=[];return Pe in e&&(n=n.concat(e[Pe].map(r=>{const i=`.${t.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(e).reduce((r,i)=>{if(i!==Pe){const s=e[i];if(Ft(s))return r.concat(co(s,[...t,i]))}return r},n)}function su(e){return Ie(e)?In(e,$t):yr(e)?[e]:Ws(Ul(Ms(e)))}function yv(e){const t=new Xc;return e.length&&e.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:su(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&t.addErrors(i,s)}),t.ErrorSchema}function We(e,t,n,r){const i=Array.isArray(n)?n:n?.path,s=e===""?[]:[e],o=i?i.concat(...s):s,a=[t.idPrefix,...o].join(t.idSeparator);let l;return t.nameGenerator&&o.length>0&&(l=t.nameGenerator(o,t.idPrefix,r)),{path:o,[ge]:a,...l!==void 0&&{name:l}}}function ou(e){return Object.keys(e).reduce((t,n)=>{if(n==="addError")return t;const r=e[n];return Ft(r)?{...t,[n]:ou(r)}:{...t,[n]:r}},{})}function bv(e){return Object.values(e).every(t=>t!==-1)}function xv(e){const{className:t="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:c,autofocus:u,registry:d,onBlur:m,onFocus:y}=e,f=`${o}_${n}`,{SelectWidget:p}=d.widgets,b=P.useCallback(w=>s(n,w),[s,n]);return h.jsx(p,{schema:{type:"integer"},id:f,name:a,className:t,options:{enumOptions:Kc(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:c,autofocus:u,onChange:b,onBlur:m,onFocus:y,registry:d,label:"","aria-describedby":De(o)})}function vv(e){const{time:t=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=e,[a,l]=P.useState(Ui(o,t));P.useEffect(()=>{l(Ui(o,t))},[t,o]);const c=P.useCallback((y,f)=>{const p={...a,[y]:typeof f>"u"?-1:f};bv(p)?s(Ra(p,t)):l(p)},[a,s,t]),u=P.useCallback(y=>{y.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),d=P.useCallback(y=>{if(y.preventDefault(),n||r)return;const f=Ui(new Date().toJSON(),t);s(Ra(f,t))},[n,r,t,s]);return{elements:P.useMemo(()=>ov(a,t,i.yearsRange,i.format),[a,t,i.yearsRange,i.format]),handleChange:c,handleClear:u,handleSetNow:d}}function sn(e){const t=P.useRef(e);return ce(e,t.current)||(t.current=e),t.current}function Sv(e,t){return e.replace(";base64",`;name=${encodeURIComponent(t)};base64`)}function wv(e){const{name:t,size:n,type:r}=e;return new Promise((i,s)=>{const o=new window.FileReader;o.onerror=s,o.onload=a=>{var l;typeof((l=a.target)===null||l===void 0?void 0:l.result)=="string"?i({dataURL:Sv(a.target.result,t),name:t,size:n,type:r}):i({dataURL:null,name:t,size:n,type:r})},o.readAsDataURL(e)})}function jv(e){return Promise.all(Array.from(e).map(wv))}function Da(e){return e.reduce((t,n)=>{if(!n)return t;try{const{blob:r,name:i}=Y0(n);return[...t,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return t}},[])}function Ov(e,t,n=!1){const r=P.useMemo(()=>n&&e?Array.isArray(e)?e:[e]:[],[e,n]),i=P.useMemo(()=>Array.isArray(e)?Da(e):Da([e||""]),[e]),s=P.useCallback(async a=>{const c=(await jv(a)).map(u=>u.dataURL||null);t(n?r.concat(...c):c[0])},[r,n,t]),o=P.useCallback(a=>{if(n){const l=r.filter((c,u)=>u!==a);t(l)}else t(void 0)},[r,n,t]);return{filesInfo:i,handleChange:s,handleRemove:o}}function Ev(e){if(!e)return"";const t=new Date(e),n=At(t.getFullYear(),4),r=At(t.getMonth()+1,2),i=At(t.getDate(),2),s=At(t.getHours(),2),o=At(t.getMinutes(),2),a=At(t.getSeconds(),2),l=At(t.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Zn(e,t,n=!1){if(!t)return e;const{errors:r,errorSchema:i}=e;let s=co(t),o=t;return we(i)||(o=Jt(i,t,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function Av(e){const t=e;for(const n in t)if(Object.hasOwn(t,n)){const r=t[n];n===pe&&typeof r=="string"&&r.startsWith("#")?t[n]=kl+r:t[n]=uo(r)}return e}function Cv(e){return e.map(t=>uo(t))}function uo(e){return Array.isArray(e)?Cv([...e]):le(e)?Av({...e}):e}var ee;(function(e){e.ArrayItemTitle="Item",e.MissingItems="Missing items definition",e.EmptyArray="No items yet. Use the button below to add some.",e.YesLabel="Yes",e.NoLabel="No",e.CloseLabel="Close",e.ErrorsLabel="Errors",e.NewStringDefault="New Value",e.AddButton="Add",e.AddItemButton="Add Item",e.CopyButton="Copy",e.MoveDownButton="Move down",e.MoveUpButton="Move up",e.RemoveButton="Remove",e.NowLabel="Now",e.ClearLabel="Clear",e.AriaDateLabel="Select a date",e.PreviewLabel="Preview",e.DecrementAriaLabel="Decrease value by 1",e.IncrementAriaLabel="Increase value by 1",e.OptionalObjectAdd="Add data for optional field",e.OptionalObjectRemove="Remove data for optional field",e.OptionalObjectEmptyMsg="No data for optional field",e.Type="Type",e.Value="Value",e.ClearButton="clear input",e.UnknownFieldType="Unknown field type %1",e.OptionPrefix="Option %1",e.TitleOptionPrefix="%1 option %2",e.KeyLabel="%1 Key",e.DeprecatedLabel="%1 (deprecated)",e.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',e.UnsupportedField="Unsupported field schema.",e.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",e.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",e.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",e.FilesInfo="**%1** (%2, %3 bytes)"})(ee||(ee={}));function _v(e,t){var n=Ie(e)?zs:Uc;return n(e,pc(t))}function Iv(e,t){return e==null?!0:ac(e,t)}function ys(){return nu("rjsf-array-item-")}function Ma(e){return Array.isArray(e)?e.map(t=>({key:ys(),item:t})):[]}function au(e){return Array.isArray(e)?e.map(t=>t.item):[]}function Tv(e){return Array.isArray(e.type)?!e.type.includes("null"):e.type!=="null"}function lu(e,t,n,r){let{addable:i}=H(r,e.globalUiOptions);return i!==!1&&(t.maxItems!==void 0?i=n.length<t.maxItems:i=!0),i}function cu(e,t,n,r){if(typeof e.items=="function")try{return e.items(t,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return e.items}function Pv(e,t){const{schemaUtils:n,globalFormOptions:r}=e;let i=t.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:to(t)&&Zm(t)&&(i=t.additionalItems),n.getDefaultFormState(i)}function Nv(e){const{schema:t,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:c,onBlur:u,onFocus:d,registry:m,rawErrors:y,name:f,onSelectChange:p}=e,{widgets:b,schemaUtils:w,globalFormOptions:S,globalUiOptions:E}=m,O=w.retrieveSchema(t.items,i),g=r?.items??r,v=En(O,g),{widget:j="select",title:x,...A}=H(r,E),C=ot(t,j,b),_=x??t.title??f,I=w.getDisplayLabel(t,r,E),T=sn(We("",S,n,!0));return h.jsx(C,{id:T[ge],name:f,multiple:!0,onChange:p,onBlur:u,onFocus:d,options:{...A,enumOptions:v},schema:t,uiSchema:r,registry:m,value:i,disabled:s,readonly:o,required:l,label:_,hideLabel:!I,placeholder:c,autofocus:a,rawErrors:y,htmlName:T.name})}function kv(e){const{schema:t,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:c,onBlur:u,onFocus:d,formData:m=[],registry:y,rawErrors:f,name:p,onSelectChange:b}=e,{widgets:w,schemaUtils:S,globalFormOptions:E,globalUiOptions:O}=y,{widget:g,title:v,...j}=H(r,O),x=ot(t,g,w),A=v??t.title??p,C=S.getDisplayLabel(t,r,O),_=sn(We("",E,n,!0));return h.jsx(x,{id:_[ge],name:p,multiple:!0,onChange:b,onBlur:u,onFocus:d,options:j,schema:t,uiSchema:r,registry:y,value:m,disabled:i,readonly:s,hideError:l,required:a,label:A,hideLabel:!C,placeholder:c,autofocus:o,rawErrors:f,htmlName:_.name})}function Fv(e){const{schema:t,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:c,onFocus:u,registry:d,formData:m=[],rawErrors:y,onSelectChange:f}=e,{widgets:p,schemaUtils:b,globalFormOptions:w,globalUiOptions:S}=d,{widget:E="files",title:O,...g}=H(n,S),v=ot(t,E,p),j=O??t.title??i,x=b.getDisplayLabel(t,n,S),A=sn(We("",w,r,!0));return h.jsx(v,{options:g,id:A[ge],name:i,multiple:!0,onChange:f,onBlur:c,onFocus:u,schema:t,uiSchema:n,value:m,disabled:s,readonly:o,required:l,registry:d,autofocus:a,rawErrors:y,label:j,hideLabel:!x,htmlName:A.name})}function uu(e){const{itemKey:t,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:c,canAdd:u,canRemove:d=!0,canMoveUp:m,canMoveDown:y,itemSchema:f,itemData:p,itemUiSchema:b,itemFieldPathId:w,itemErrorSchema:S,autofocus:E,onBlur:O,onFocus:g,onChange:v,rawErrors:j,totalItems:x,title:A,handleAddItem:C,handleCopyItem:_,handleRemoveItem:I,handleReorderItems:T}=e,{schemaUtils:k,fields:{ArraySchemaField:N,SchemaField:F},globalUiOptions:M}=a,z=sn(w),V=N||F,D=K("ArrayFieldItemTemplate",a,l),de=k.getDisplayLabel(f,b,M),{description:fe}=H(b),Se=!!fe||!!f.description,{orderable:q=!0,removable:J=!0,copyable:G=!1}=l,Z={moveUp:q&&m,moveDown:q&&y,copy:G&&u,remove:J&&d,toolbar:!1};Z.toolbar=Object.keys(Z).some(xe=>Z[xe]);const X=P.useCallback(xe=>{C(xe,n+1)},[C,n]),B=P.useCallback(xe=>{_(xe,n)},[_,n]),se=P.useCallback(xe=>{I(xe,n)},[I,n]),oe=P.useCallback(xe=>{T(xe,n,n-1)},[T,n]),je=P.useCallback(xe=>{T(xe,n,n+1)},[T,n]),Oe={children:h.jsx(V,{name:r,title:A,index:n,schema:f,uiSchema:b,formData:p,errorSchema:S,fieldPathId:z,required:Tv(f),onChange:v,onBlur:O,onFocus:g,registry:a,disabled:i,readonly:o,hideError:s,autofocus:E,rawErrors:j}),buttonsProps:{fieldPathId:z,disabled:i,readonly:o,canAdd:u,hasCopy:Z.copy,hasMoveUp:Z.moveUp,hasMoveDown:Z.moveDown,hasRemove:Z.remove,index:n,totalItems:x,onAddItem:X,onCopyItem:B,onRemoveItem:se,onMoveUpItem:oe,onMoveDownItem:je,registry:a,schema:f,uiSchema:b},itemKey:t,className:"rjsf-array-item",disabled:i,hasToolbar:Z.toolbar,index:n,totalItems:x,readonly:o,registry:a,schema:f,uiSchema:b,parentUiSchema:c,displayLabel:de,hasDescription:Se};return h.jsx(D,{...Oe})}function $v(e){const{schema:t,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:d=!1,hideError:m=!1,registry:y,onBlur:f,onFocus:p,rawErrors:b,onChange:w,keyedFormData:S,handleAddItem:E,handleCopyItem:O,handleRemoveItem:g,handleReorderItems:v}=e,j=t.title||a||o,{schemaUtils:x,fields:A,formContext:C,globalFormOptions:_,globalUiOptions:I}=y,{OptionalDataControlsField:T}=A,k=H(n,I),N=le(t.items)?t.items:{},F=x.retrieveSchema(N),M=au(S),z=Er(y,t,d,n),V=kn(s),D=lu(y,t,M,n)&&(!z||V),de=V?S:[],fe=z?" rjsf-optional-array-field":"",Se=e.childFieldPathId??i,q=z?h.jsx(T,{...e,fieldPathId:Se}):void 0,J={canAdd:D,items:de.map((Z,X)=>{const{key:B,item:se}=Z,oe=se,je=x.retrieveSchema(N,oe),Oe=r?r[X]:void 0,xe=We(X,_,Se),Me=cu(n,se,X,C),St={itemKey:B,index:X,name:o&&`${o}-${X}`,registry:y,uiOptions:k,parentUiSchema:n,hideError:m,readonly:c,disabled:l,required:d,title:j?`${j}-${X+1}`:void 0,canAdd:D,canMoveUp:X>0,canMoveDown:X<M.length-1,itemSchema:je,itemFieldPathId:xe,itemErrorSchema:Oe,itemData:oe,itemUiSchema:Me,autofocus:u&&X===0,onBlur:f,onFocus:p,rawErrors:b,totalItems:S.length,handleAddItem:E,handleCopyItem:O,handleRemoveItem:g,handleReorderItems:v,onChange:w};return h.jsx(uu,{...St},B)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${F.type}${fe}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:c,required:d,schema:t,title:j,formData:M,rawErrors:b,registry:y,optionalDataControl:q},G=K("ArrayFieldTemplate",y,k);return h.jsx(G,{...J})}function Rv(e){const{schema:t,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:c=!1,autofocus:u=!1,required:d=!1,hideError:m=!1,registry:y,onBlur:f,onFocus:p,rawErrors:b,keyedFormData:w,onChange:S,handleAddItem:E,handleCopyItem:O,handleRemoveItem:g,handleReorderItems:v}=e;let{formData:j=[]}=e;const x=t.title||a||o,{schemaUtils:A,fields:C,formContext:_,globalFormOptions:I,globalUiOptions:T}=y,k=H(n,T),{OptionalDataControlsField:N}=C,F=Er(y,t,d,n),M=kn(r),V=(le(t.items)?t.items:[]).map((X,B)=>A.retrieveSchema(X,j[B])),D=le(t.additionalItems)?A.retrieveSchema(t.additionalItems,r):null,de=e.childFieldPathId??s;j.length<V.length&&(j=j.concat(new Array(V.length-j.length)));const fe=M?w:[],Se=F?" rjsf-optional-array-field":"",q=F?h.jsx(N,{...e,fieldPathId:de}):void 0,J=lu(y,t,j,n)&&!!D&&(!F||M),G={canAdd:J,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${Se}`,disabled:l,fieldPathId:s,formData:r,items:fe.map((X,B)=>{const{key:se,item:oe}=X,je=oe,Oe=B>=V.length,xe=(Oe&&le(t.additionalItems)?A.retrieveSchema(t.additionalItems,je):V[B])||{},Me=We(B,I,de);let St;Oe?St=n.additionalItems:Array.isArray(n.items)?St=n.items[B]:St=cu(n,oe,B,_);const Rn=i?i[B]:void 0,Dn={index:B,itemKey:se,name:o&&`${o}-${B}`,registry:y,uiOptions:k,parentUiSchema:n,hideError:m,readonly:c,disabled:l,required:d,title:x?`${x}-${B+1}`:void 0,canAdd:J,canRemove:Oe,canMoveUp:B>=V.length+1,canMoveDown:Oe&&B<j.length-1,itemSchema:xe,itemData:je,itemUiSchema:St,itemFieldPathId:Me,itemErrorSchema:Rn,autofocus:u&&B===0,onBlur:f,onFocus:p,rawErrors:b,totalItems:w.length,onChange:S,handleAddItem:E,handleCopyItem:O,handleRemoveItem:g,handleReorderItems:v};return h.jsx(uu,{...Dn},se)}),onAddClick:E,readonly:c,required:d,registry:y,schema:t,uiSchema:n,title:x,errorSchema:i,rawErrors:b,optionalDataControl:q},Z=K("ArrayFieldTemplate",y,k);return h.jsx(Z,{...G})}function Dv(e=[]){const t=P.useMemo(()=>rt(e),[e]),[n,r]=P.useState(()=>({formDataHash:t,keyedFormData:Ma(e)}));let{keyedFormData:i,formDataHash:s}=n;if(t!==s){const a=Array.isArray(e)?e:[],l=i||[];i=a.length===l.length?l.map((c,u)=>({key:c.key,item:a[u]})):Ma(a),s=t,r({formDataHash:s,keyedFormData:i})}const o=P.useCallback(a=>{const l=au(a),c=rt(l);return r({formDataHash:c,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function Mv(e){const{schema:t,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=e,{globalFormOptions:l,schemaUtils:c,translateString:u}=s,{keyedFormData:d,updateKeyedFormData:m}=Dv(o),y=e.childFieldPathId??i,f=P.useCallback((v,j)=>{v&&v.preventDefault();let x;if(r){x={};for(const _ in r){const I=parseInt(_);j===void 0||I<j?he(x,[I],r[_]):I>=j&&he(x,[I+1],r[_])}}const A={key:ys(),item:Pv(s,t)},C=[...d];j!==void 0?C.splice(j,0,A):C.push(A),a(m(C),y.path,x)},[d,s,t,a,m,r,y]),p=P.useCallback((v,j)=>{v&&v.preventDefault();let x;if(r){x={};for(const _ in r){const I=parseInt(_);I<=j?he(x,[I],r[_]):I>j&&he(x,[I+1],r[_])}}const A={key:ys(),item:io(d[j].item)},C=[...d];j!==void 0?C.splice(j+1,0,A):C.push(A),a(m(C),y.path,x)},[d,a,m,r,y]),b=P.useCallback((v,j)=>{v&&v.preventDefault();let x;if(r){x={};for(const C in r){const _=parseInt(C);_<j?he(x,[_],r[C]):_>j&&he(x,[_-1],r[C])}}const A=d.filter((C,_)=>_!==j);a(m(A),y.path,x)},[d,a,m,r,y]),w=P.useCallback((v,j,x)=>{v&&(v.preventDefault(),v.currentTarget.blur());let A;if(r){A={};for(const I in r){const T=parseInt(I);T==j?he(A,[x],r[j]):T==x?he(A,[j],r[x]):he(A,[I],r[T])}}function C(){const I=d.slice();return I.splice(j,1),I.splice(x,0,d[j]),I}const _=C();a(m(_),y.path,A)},[d,a,m,r,y]),S=P.useCallback((v,j,x,A)=>{a(v===void 0?null:v,j,x,A)},[a]),E=P.useCallback(v=>{a(v,y.path,void 0,y?.[ge])},[a,y]),O={...e,formData:o,fieldPathId:y,onSelectChange:E},g={...e,handleAddItem:f,handleCopyItem:p,handleRemoveItem:b,handleReorderItems:w,keyedFormData:d,onChange:S};if(!(xn in t)){if(!l.useFallbackUiForUnsupportedType){const j=H(n),x=K("UnsupportedFieldTemplate",s,j);return h.jsx(x,{schema:t,fieldPathId:i,reason:u(ee.MissingItems),registry:s})}const v={...t,[xn]:{type:void 0}};O.schema=v,g.schema=v}return c.isMultiSelect(O.schema)?h.jsx(Nv,{...O}):qc(n)?h.jsx(kv,{...O}):to(O.schema)?h.jsx(Rv,{...g}):c.isFilesArray(O.schema,n)?h.jsx(Fv,{...O}):h.jsx($v,{...g})}function Uv(e){const{schema:t,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:c,hideError:u,autofocus:d,title:m,onChange:y,onFocus:f,onBlur:p,rawErrors:b}=e,{title:w}=t,{widgets:S,translateString:E,globalUiOptions:O}=o,{widget:g="checkbox",title:v,label:j=!0,enumNames:x,...A}=H(r,O),C=ot(t,g,S),_=E(ee.YesLabel),I=E(ee.NoLabel);let T;const k=v??w??m??n;if(Array.isArray(t.oneOf))T=En({oneOf:t.oneOf.map(F=>{if(le(F))return{...F,title:F.title||(F.const===!0?_:I)}}).filter(F=>F)},r);else{const F=t.enum??[!0,!1];!x&&F.length===2&&F.every(M=>typeof M=="boolean")?T=[{value:F[0],label:F[0]?_:I},{value:F[1],label:F[1]?_:I}]:T=En({enum:F},r)}const N=P.useCallback((F,M,z)=>y(F,i.path,M,z),[y,i]);return h.jsx(C,{options:{...A,enumOptions:T},schema:t,uiSchema:r,id:i.$id,name:n,onChange:N,onFocus:f,onBlur:p,label:k,hideLabel:!j,value:s,required:a,disabled:l,readonly:c,hideError:u,registry:o,autofocus:d,rawErrors:b,htmlName:i.name})}function Lv(e){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:e}}function Bv(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"?t:t==="object"?Array.isArray(e)?"array":"object":"string"}function zv(e,t){switch(t){case"string":return String(e);case"number":{const n=Number(e);return isNaN(n)?0:n}case"boolean":return!!e;default:return e}}function Vv(e){const{id:t,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:c=!1,onBlur:u,onFocus:d,registry:m,fieldPathId:y,onChange:f,errorSchema:p}=e,{translateString:b,fields:w,globalFormOptions:S}=m,[E,O]=P.useState(Bv(n)),g=H(o),v=sn(We("__internal_type_selector",S,y)),j=b(ee.Type),x=P.useMemo(()=>Lv(j),[j]),A=I=>{I!=null&&(O(I),f(zv(n,I),y.path,p,t))};if(!S.useFallbackUiForUnsupportedType){const{reason:I=b(ee.UnknownFieldType,[String(i.type)])}=e,T=K("UnsupportedFieldTemplate",m,g);return h.jsx(T,{schema:i,fieldPathId:y,reason:I,registry:m})}const C=K("FallbackFieldTemplate",m,g),{SchemaField:_}=w;return h.jsx(C,{schema:i,registry:m,typeSelector:h.jsx(_,{fieldPathId:v,name:`${s}__fallback_type`,schema:x,formData:E,onChange:A,onBlur:u,onFocus:d,registry:m,hideLabel:!r,disabled:l,readonly:c,required:a},n?rt(n):"__empty__"),schemaField:h.jsx(_,{...e,schema:{type:E,title:b(ee.Value),...E==="object"&&{additionalProperties:!0}}})})}function qv(e,t){return In(t,function(n){return e[n]})}function Wv(e){return e==null?[]:qv(e,Ke(e))}var Hv=Math.max;function Gv(e,t,n,r){e=tn(e)?e:Wv(e),n=n?gc(n):0;var i=e.length;return n<0&&(n=Hv(i+n,0)),Rt(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&jc(e,t,n)>-1}var Kv=Math.min;function Yv(e,t,n){for(var r=eo,i=e[0].length,s=e.length,o=s,a=Array(s),l=1/0,c=[];o--;){var u=e[o];l=Kv(u.length,l),a[o]=i>=120&&u.length>=120?new Yt(o&&u):void 0}u=e[0];var d=-1,m=a[0];e:for(;++d<i&&c.length<l;){var y=u[d],f=y;if(y=y!==0?y:0,!(m?mr(m,f):r(c,f))){for(o=s;--o;){var p=a[o];if(!(p?mr(p,f):r(e[o],f)))continue e}m&&m.push(f),c.push(y)}}return c}function Jv(e){return fr(e)?e:[]}var Ua=ci(function(e){var t=In(e,Jv);return t.length&&t[0]===e[0]?Yv(t):[]});function Vr(e,t){return ui(e,t)}function du(e){return e===void 0}var st;(function(e){e.ROW="ui:row",e.COLUMN="ui:col",e.COLUMNS="ui:columns",e.CONDITION="ui:condition"})(st||(st={}));var sr;(function(e){e.ALL="all",e.SOME="some",e.NONE="none"})(sr||(sr={}));const Zv=/^\$lookup=(.+)/,Li="layoutGrid";function La(e,t){return e??t}function Xv(e){return/^\d+?$/.test(e)}const Nt=so();function Qv(e,t,n,r,i){const s=R(n,[ss],{}),o=R(n,e),a={...R(o,[It],{}),...t,...s},l={...o};we(a)||he(l,[It],a),we(s)||he(l,[ss],s);let{readonly:c}=H(l);return(i===!0||du(c)&&r===!0)&&(c=!0,ie(a,vi)?he(l,[It,vi],!0):he(l,`ui:${vi}`,!0)),{fieldUiSchema:l,uiReadonly:c}}function e1(e,t,n="$0m3tH1nG Un3xP3cT3d"){const r=ds([t]).sort(),i=ds([n]).sort();switch(e){case sr.ALL:return Vr(r,i);case sr.SOME:return Ua(r,i).length>0;case sr.NONE:return Ua(r,i).length===0;default:return!1}}function gi(e,t,n){let r={},i=e[t];if(Ft(i)){const{children:s,className:o,...a}=i;if(i=s,o){const c=o.split(" ").map(u=>lo(n,u,u)).join(" ");r={...a,className:c}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${t}" in ${JSON.stringify(e)}`);return{children:i,gridProps:r}}function Ba(e,t,n){let r;if(Xv(n)&&e&&e?.type==="array"&&ie(e,xn)){const i=Number(n),s=e[xn];Array.isArray(s)?i>s.length?r=oc(s):r=s[i]:r=s,t={[ge]:t[ge],path:[...t.path.slice(0,t.path.length-1),i]}}return{rawSchema:r,fieldPathId:t}}function t1(e,t,n,r,i){const{schemaUtils:s,globalFormOptions:o}=e;let a=n,l=i;const c=t.split("."),u=c.pop();let d=s.retrieveSchema(a,r),m=r,y=d.readOnly;c.forEach(b=>{if(l=We(b,o,l),ie(d,ue))a=R(d,[ue,b],{});else if(d&&(ie(d,Q)||ie(d,ae))){const w=ie(d,Q)?Q:ae,S=s.findSelectedOptionInXxxOf(d,b,w,m);a=R(S,[ue,b],{})}else{const w=Ba(d,l,b);a=w.rawSchema??{},l=w.fieldPathId}m=R(m,b,{}),d=s.retrieveSchema(a,m),y=La(d.readOnly,y)});let f,p=!1;if(we(d)&&(d=void 0),d&&u){if(d&&(ie(d,Q)||ie(d,ae))){const w=ie(d,Q)?Q:ae;d=s.findSelectedOptionInXxxOf(d,u,w,m)}l=We(u,o,l),p=d!==void 0&&Array.isArray(d.required)&&Gv(d.required,u);const b=Ba(d,l,u);if(b.rawSchema?(d=b.rawSchema,l=b.fieldPathId):(d=R(d,[ue,u]),d=d&&s.retrieveSchema(d)),y=La(d?.readOnly,y),d&&(ie(d,Q)||ie(d,ae))){const w=ie(d,Q)?Q:ae,S=Je(d);f={options:d[w],hasDiscriminator:!!S}}}return{schema:d,isRequired:p,isReadonly:y,optionsInfo:f,fieldPathId:l}}function n1(e,t){let n=e;return Rt(n)&&(n=lo(t,n)),br(n)?n:null}function r1(e,t){let n,r=null,i={},s;if(Rt(t)||du(t))n=t??"";else{const{name:o="",render:a,...l}=t;n=o,i=l,we(i)||_v(i,(c,u)=>{if(Rt(c)){const d=Zv.exec(c);if(Array.isArray(d)&&d.length>1){const m=d[1];i[u]=lo(e,m,m)}}}),r=n1(a,e),!o&&r&&(s=h.jsx(r,{...l,"data-testid":Nt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function yi(e){const{childrenLayoutGridSchemaId:t,...n}=e,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return t.map(l=>P.createElement(fo,{...n,key:`layoutGrid-${rt(l)}`,schema:a,layoutGridSchema:l}))}function i1(e){const{layoutGridSchema:t,...n}=e,{formData:r,registry:i}=n,{children:s,gridProps:o}=gi(t,st.CONDITION,i),{operator:a,field:l="",value:c}=o,u=R(r,l,null);return e1(a,u,c)?h.jsx(yi,{...n,childrenLayoutGridSchemaId:s}):null}function s1(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=gi(t,st.COLUMN,r),a=H(i),l=K("GridTemplate",r,a);return h.jsx(l,{column:!0,"data-testid":Nt.col,...o,children:h.jsx(yi,{...n,childrenLayoutGridSchemaId:s})})}function o1(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=gi(t,st.COLUMNS,r),a=H(i),l=K("GridTemplate",r,a);return s.map(c=>h.jsx(l,{column:!0,"data-testid":Nt.col,...o,children:h.jsx(yi,{...n,childrenLayoutGridSchemaId:[c]})},`column-${rt(c)}`))}function a1(e){const{layoutGridSchema:t,...n}=e,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=gi(t,st.ROW,r),a=H(i),l=K("GridTemplate",r,a);return h.jsx(l,{...o,"data-testid":Nt.row,children:h.jsx(yi,{...n,childrenLayoutGridSchemaId:s})})}function l1(e){const{gridSchema:t,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:c,registry:u,layoutGridSchema:d,...m}=e,{onChange:y}=m,{fields:f}=u,{SchemaField:p,LayoutMultiSchemaField:b}=f,w=r1(u,t),{name:S,UIComponent:E,uiProps:O}=w,{schema:g,isRequired:v,isReadonly:j,optionsInfo:x,fieldPathId:A}=t1(u,S,n,l,s),C=sn(A);if(w.rendered)return w.rendered;if(g){const _=x?.hasDiscriminator?b:p,{fieldUiSchema:I,uiReadonly:T}=Qv(S,O,r,j,c);return h.jsx(_,{"data-testid":x?.hasDiscriminator?Nt.layoutMultiSchemaField:Nt.field,...m,name:S,required:v,readonly:T,schema:g,uiSchema:I,errorSchema:R(i,S),fieldPathId:C,formData:R(l,S),onChange:y,onBlur:o,onFocus:a,options:x?.options,registry:u})}return E?h.jsx(E,{"data-testid":Nt.uiComponent,...m,name:S,required:v,formData:l,readOnly:!!j||c,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:u,...O}):null}function fo(e){const{uiSchema:t}=e;let{layoutGridSchema:n}=e;const r=H(t);if(!n&&Li in r&&le(r[Li])&&(n=r[Li]),le(n)){if(st.ROW in n)return h.jsx(a1,{...e,layoutGridSchema:n});if(st.COLUMN in n)return h.jsx(s1,{...e,layoutGridSchema:n});if(st.COLUMNS in n)return h.jsx(o1,{...e,layoutGridSchema:n});if(st.CONDITION in n)return h.jsx(i1,{...e,layoutGridSchema:n})}return h.jsx(l1,{...e,gridSchema:n})}fo.TEST_IDS=Nt;function c1(e){const{fieldPathId:t,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=e,l=H(i,o.globalUiOptions),{title:c}=l,{title:u}=r,d=c||n||u||a;if(!d)return null;const m=K("TitleFieldTemplate",o,l);return h.jsx(m,{id:pi(t),title:d,required:s,schema:r,uiSchema:i,registry:o})}function Bi(e,t,n){const r="!@#!@$@#$!@$#";return e.map(({schema:s})=>s).find(s=>{const o=R(s,[ue,t]);return R(o,Ht,R(o,$e,r))===n})}function za(e,t,n,r,i){const s=t.map(l=>n.retrieveSchema(l,i));let o=e;ie(e,Q)?o={...e,[Q]:s}:ie(e,ae)&&(o={...e,[ae]:s});const a=En(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function u1(e){const{name:t,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:c,registry:u,uiSchema:d,schema:m,autofocus:y,readonly:f,required:p,errorSchema:b,hideError:w=!1}=e,{widgets:S,schemaUtils:E,globalUiOptions:O}=u,[g,v]=P.useState(za(m,l,E,d,i)),j=R(s,ge),x=Je(m),A=K("FieldErrorTemplate",u,l),C=K("FieldTemplate",u,l),_=rt(m),I=rt(l),T=d?rt(d):"",k=i?rt(i):"";P.useEffect(()=>{v(za(m,l,E,d,i))},[_,I,E,T,k]);const{widget:N=x?"radio":"select",title:F="",placeholder:M="",optionsSchemaSelector:z=x,hideError:V,...D}=H(d);if(!z)throw new Error("No selector field provided for the LayoutMultiSchemaField");const de=R(i,z);let fe=R(g[0]?.schema,[ue,z],{});const Se=Bi(g,z,de);fe=fe?.type?fe:{...fe,type:Se?.type||n};const q=ot(fe,N,S),J=V===void 0?w:!!V,G=R(b,[Pe],[]),Z=wn(b,[Pe]),X=E.getDisplayLabel(m,d,O),B=je=>{const Oe=Bi(g,z,je),xe=Bi(g,z,de);let Me=E.sanitizeDataForNewSchema(Oe,xe,i);Me&&Oe&&(Me=E.getDefaultFormState(Oe,Me,"excludeObjectChildren")),Me&&he(Me,z,je),a(Me,s.path,void 0,j)},se={enumOptions:g,...D},oe=!J&&G.length>0?h.jsx(A,{fieldPathId:s,schema:m,errors:G,registry:u}):void 0;return h.jsx(C,{fieldPathId:s,id:j,schema:m,label:(F||m.title)??"",disabled:r||Array.isArray(g)&&we(g),uiSchema:d,required:p,readonly:!!f,registry:u,displayLabel:X,errors:oe,onChange:a,onKeyRename:Lr,onKeyRenameBlur:Lr,onRemoveProperty:Lr,children:h.jsx(q,{id:j,name:t,schema:m,label:(F||m.title)??"",disabled:r||Array.isArray(g)&&we(g),uiSchema:d,autofocus:y,readonly:f,required:p,registry:u,multiple:!1,rawErrors:G,hideError:J,hideLabel:!X,errorSchema:Z,placeholder:M,onChange:B,onBlur:o,onFocus:c,value:de,options:se,htmlName:s.name})})}class Va extends P.Component{constructor(t){super(t);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,s=r.map(o=>i.retrieveSchema(o,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(t,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!ce(t.options,i)){const{registry:{schemaUtils:l}}=this.props,c=i.map(u=>l.retrieveSchema(u,r));a={selectedOption:o,retrievedOptions:c}}if(!ce(r,t.formData)&&s.$id===t.fieldPathId.$id){const{retrievedOptions:l}=a,c=this.getMatchingOption(o,r,l);n&&c!==o&&(a={selectedOption:c,retrievedOptions:l})}a!==this.state&&this.setState(a)}getMatchingOption(t,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=Je(i);return s.getClosestMatchingOption(n,r,t,o)}onOptionChange=t=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,c=t!==void 0?parseInt(t,10):-1;if(c===n)return;const u=c>=0?r[c]:void 0,d=n>=0?r[n]:void 0;let m=l.sanitizeDataForNewSchema(u,d,i);u&&(m=l.getDefaultFormState(u,m,"excludeObjectChildren")),this.setState({selectedOption:c},()=>{s(m,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:t,schema:n}=this.props;return`${t.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:t,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:c,schema:u,uiSchema:d}=this.props,{widgets:m,fields:y,translateString:f,globalUiOptions:p,schemaUtils:b}=c,{SchemaField:w}=y,S=K("MultiSchemaFieldTemplate",c,p),E=Er(c,u,l,d),O=kn(i),{selectedOption:g,retrievedOptions:v}=this.state,{widget:j="select",placeholder:x,autofocus:A,autocomplete:C,title:_=u.title,...I}=H(d,p),T=ot({type:"number"},j,m),k=R(r,Pe,[]),N=wn(r,[Pe]),F=b.getDisplayLabel(u,d,p),M=g>=0&&v[g]||null;let z;if(M){const{required:G}=u;z=G?pt({required:G},M):M}let V=[];Q in u&&d&&Q in d?Array.isArray(d[Q])?V=d[Q]:console.warn(`uiSchema.oneOf is not an array for "${_||t}"`):ae in u&&d&&ae in d&&(Array.isArray(d[ae])?V=d[ae]:console.warn(`uiSchema.anyOf is not an array for "${_||t}"`));let D=d;g>=0&&V.length>g&&(D=V[g]);const de=_?ee.TitleOptionPrefix:ee.OptionPrefix,fe=_?[_]:[],Se=v.map((G,Z)=>{const{title:X=G.title}=H(V[Z]);return{label:X||f(de,fe.concat(String(Z+1))),value:Z}}),q=!E||O?h.jsx(T,{id:this.getFieldId(),name:`${t}${u.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||we(Se),multiple:!1,rawErrors:k,errorSchema:N,value:g>=0?g:void 0,options:{enumOptions:Se,...I},registry:c,placeholder:x,autocomplete:C,autofocus:A,label:_??t,hideLabel:!F,readonly:a}):void 0,J=z&&z.type!=="null"&&h.jsx(w,{...this.props,schema:z,uiSchema:D})||null;return h.jsx(S,{schema:u,registry:c,uiSchema:d,selector:q,optionSchemaField:J})}}const d1=/\.([0-9]*0)*$/,f1=/[0.]0*$/;function m1(e){const{registry:t,onChange:n,formData:r,value:i}=e,[s,o]=P.useState(i),{StringField:a}=t.fields;let l=r;const c=P.useCallback((u,d,m,y)=>{o(u),`${u}`.charAt(0)==="."&&(u=`0${u}`);const f=typeof u=="string"&&u.match(d1)?No(u.replace(f1,"")):No(u);n(f,d,m,y)},[n]);if(typeof s=="string"&&typeof l=="number"){const u=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(u)&&(l=s)}return h.jsx(a,{...e,formData:l,onChange:c})}function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(null,arguments)}const Tr=["strong","em","del","mark"],qa=[["**",Tr[0]],["__",Tr[0]],["~~",Tr[2]],["==",Tr[3]],["*","em"],["_","em"]];function h1(e,t){for(var n=1,r=t+1;r<e.length&&n>0;)e[r]!=="\\"?(e[r]==="["&&n++,e[r]==="]"&&n--,r++):r+=2;if(n===0&&r<e.length&&(e[r]==="("||e[r]==="[")){var i=e[r]==="("?")":"]",s=1;for(r++;r<e.length&&s>0;)e[r]!=="\\"?(e[r]==="("&&i===")"&&s++,e[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function p1(e,t){if(!t||!t.inline&&!t.simple)return null;var n=e[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=qa[o][0];if(e.startsWith(a)&&e.length>=2*a.length){r=a,i=a.length,s=qa[o][1];break}}if(!r)return null;for(var l=i,c=!1,u=!1,d="",m=0,y="",f=!1,p="";l<e.length;){var b=e[l];if(f)y+=b,f=!1,p=b,l++;else if(b!=="\\")if(b!=="`"||m!==0){if(b==="["&&!c&&m===0){var w=h1(e,l);if(w!==-1){y+=e.slice(l,w),l=w,p=e[w-1];continue}}if(u)y+=b,d?b===d&&(d=""):b==='"'||b==="'"?d=b:b===">"&&(u=!1),p=b,l++;else if(b!=="<"||c){if(b===`
|
|
4
4
|
`&&p===`
|