decocms 4.99.2 → 4.99.4
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-hYag6BbI.js → AlertCircle-C7MslaLR.js} +1 -1
- package/dist/client/assets/{AreaChart-dF42II9e.js → AreaChart-BTuJ9KfA.js} +1 -1
- package/dist/client/assets/{ArrowRight-n-TBn01e.js → ArrowRight-BcxHvBZl.js} +1 -1
- package/dist/client/assets/{ArrowUp-CV_nwp67.js → ArrowUp-Dx5p-RmC.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CUu0poE7.js → ArrowUpRight-DZ3-lzXp.js} +1 -1
- package/dist/client/assets/{Check-BqUfCoBF.js → Check-Btldp1zg.js} +1 -1
- package/dist/client/assets/{CheckCircle-Ci5HXbyi.js → CheckCircle-BuQjG5TK.js} +1 -1
- package/dist/client/assets/{ChevronDown-B5nNx5Dx.js → ChevronDown-l_A3M_wf.js} +1 -1
- package/dist/client/assets/{ChevronRight-BIhvsLci.js → ChevronRight-BIspaBbu.js} +1 -1
- package/dist/client/assets/{ChevronUp-DskNR2pe.js → ChevronUp-CbWj-JPO.js} +1 -1
- package/dist/client/assets/{Copy01-CZUAh9vx.js → Copy01-CaG2A2wm.js} +1 -1
- package/dist/client/assets/{DotsVertical-DH3n__PV.js → DotsVertical-BegrkRAd.js} +1 -1
- package/dist/client/assets/{Eye-CbhCOWW3.js → Eye-n7F3_pH4.js} +1 -1
- package/dist/client/assets/{FilterLines-CjyDVxAQ.js → FilterLines-D74fcuno.js} +1 -1
- package/dist/client/assets/{Globe01-xZl4NLjm.js → Globe01-BUN-6dPc.js} +1 -1
- package/dist/client/assets/{Globe04-DHgs3GZc.js → Globe04-OC3kWxEd.js} +1 -1
- package/dist/client/assets/{HardDrive-BwxUHvE5.js → HardDrive-sPxi9cVE.js} +1 -1
- package/dist/client/assets/{Image01-zzq68Thg.js → Image01-DOKZLS3n.js} +1 -1
- package/dist/client/assets/{Key01-BG2GwAxV.js → Key01-BOkUeTGR.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CJjI1ZVY.js → LayoutLeft-C0Cux1Fk.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DuM-ETL7.js → LinkExternal01-DCsltjSv.js} +1 -1
- package/dist/client/assets/{Monitor01-DCBBoK-Q.js → Monitor01-CDwcd_zn.js} +1 -1
- package/dist/client/assets/{Package-DGdUJKLk.js → Package-ChEjJzRf.js} +1 -1
- package/dist/client/assets/{Palette-B9U3WzWJ.js → Palette-BtxFGIye.js} +1 -1
- package/dist/client/assets/{Play-MPnFN4Ot.js → Play-DCNHEpbv.js} +1 -1
- package/dist/client/assets/{Plus-D8R0whKy.js → Plus-BWpeDIiC.js} +1 -1
- package/dist/client/assets/{SearchLg-DxljGMIS.js → SearchLg-BAFos4ti.js} +1 -1
- package/dist/client/assets/{SearchMd-Cl1wFEaP.js → SearchMd-D5PMm26-.js} +1 -1
- package/dist/client/assets/{Settings02-CHWQ4cze.js → Settings02-CETfKPeQ.js} +1 -1
- package/dist/client/assets/{Shield01-KvnJOfKG.js → Shield01-CaJG0J3f.js} +1 -1
- package/dist/client/assets/{Star01-CFLS8vM8.js → Star01-E3H8ZPcr.js} +1 -1
- package/dist/client/assets/{Stars01-Du90yOKu.js → Stars01-CPSc8KBd.js} +1 -1
- package/dist/client/assets/{Stars02-DNKnMVas.js → Stars02-ai2IOE66.js} +1 -1
- package/dist/client/assets/{Sun-wJrJ62L2.js → Sun-M3urxdUJ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bu9Qz3KN.js → SwitchHorizontal01-Bs5gwvDo.js} +1 -1
- package/dist/client/assets/{Tool01-C2j5CN3o.js → Tool01-D8Lh-5Kv.js} +1 -1
- package/dist/client/assets/{Tool02-M4Cw_hi1.js → Tool02-DWpcCeVk.js} +1 -1
- package/dist/client/assets/{Trash01-BRj8BMoQ.js → Trash01-BunOPvOH.js} +1 -1
- package/dist/client/assets/{TrendUp01-DCszOWxx.js → TrendUp01-DRBQwzJp.js} +1 -1
- package/dist/client/assets/{Upload01-BYmQrCvZ.js → Upload01-BKoh1Eu-.js} +1 -1
- package/dist/client/assets/{User01-xWnqcBX5.js → User01-CfQjQb3O.js} +1 -1
- package/dist/client/assets/{Users01-BCCI59Cd.js → Users01-1qAiw5kv.js} +1 -1
- package/dist/client/assets/{Users03-BhAf1OI0.js → Users03-CFoRyG6w.js} +1 -1
- package/dist/client/assets/{X-D9a7mA7z.js → X-DefYjaiC.js} +1 -1
- package/dist/client/assets/{XCircle-CLqcbEJ5.js → XCircle-CSTEYaFt.js} +1 -1
- package/dist/client/assets/{XClose-B4_aZN-d.js → XClose-dktsudpR.js} +1 -1
- package/dist/client/assets/{Zap-BM4kHy7D.js → Zap-DKyNws_D.js} +1 -1
- package/dist/client/assets/{ZapSquare-CHvbVMtu.js → ZapSquare-uV_3SRZQ.js} +1 -1
- package/dist/client/assets/{ZoomOut-BgBVt7xO.js → ZoomOut-BYn_nuTa.js} +1 -1
- package/dist/client/assets/{access-gate-Blc6kHRZ.js → access-gate-CrIPbIcm.js} +1 -1
- package/dist/client/assets/{add-section-modal-CLgI9snf.js → add-section-modal-mlLl5feN.js} +1 -1
- package/dist/client/assets/{agent-icon-CWafS0z1.js → agent-icon-DPj46qz4.js} +1 -1
- package/dist/client/assets/{agents-list-DARePumV.js → agents-list-BPZ-7q6f.js} +1 -1
- package/dist/client/assets/{ai-providers-CcOvZknr.js → ai-providers-JySJkbSR.js} +1 -1
- package/dist/client/assets/{alert-dialog-Dlf2Maxi.js → alert-dialog-D05um7oC.js} +1 -1
- package/dist/client/assets/{alert-CEbwozBK.js → alert-jjMCqhWY.js} +1 -1
- package/dist/client/assets/{app-editor-CfMliRW7.js → app-editor-DxBJbEVO.js} +1 -1
- package/dist/client/assets/{auth-_luaz7eq.js → auth-BuYROqYP.js} +1 -1
- package/dist/client/assets/{auth-catchall-BIhNL7Oo.js → auth-catchall-DRSSIoFG.js} +1 -1
- package/dist/client/assets/{auth-entry-Bu2S0sSm.js → auth-entry-lkwKiMpv.js} +1 -1
- package/dist/client/assets/{auth-split-layout-jhdl7GwA.js → auth-split-layout-Be2wbR6N.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DuV0O3R6.js → authenticate-and-persist-oauth-CYhnPvSD.js} +1 -1
- package/dist/client/assets/{automation-list-row-BOa-I3b7.js → automation-list-row-CkVMCd1b.js} +1 -1
- package/dist/client/assets/{automation-runs-5NMUIL2C.js → automation-runs-B_KWcbT8.js} +1 -1
- package/dist/client/assets/{automations-BaTgc-lk.js → automations-Bp7YUGVd.js} +1 -1
- package/dist/client/assets/{autosend-BqtYaPyS.js → autosend-C3KvfWIZ.js} +1 -1
- package/dist/client/assets/{avatar-Bm7TRFyI.js → avatar-BZVXAJYd.js} +1 -1
- package/dist/client/assets/{badge-BfKxdp6w.js → badge-BP8obAYN.js} +1 -1
- package/dist/client/assets/{block-document-SAqGRPVB.js → block-document-BIOalMD-.js} +1 -1
- package/dist/client/assets/{brand-context-7QvMVJRB.js → brand-context-Xq1jc6-g.js} +1 -1
- package/dist/client/assets/{buckets-DN160Fe5.js → buckets-B1oIOPxV.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BeU95ijv.js → bulk-category-panel-CX4yequ8.js} +1 -1
- package/dist/client/assets/{calendar-ChM-0ri5.js → calendar-BqryvOsJ.js} +1 -1
- package/dist/client/assets/{capability-load-error-DED97G7U.js → capability-load-error-BKIWgBVB.js} +1 -1
- package/dist/client/assets/{card-_b2At37s.js → card-DsawJB79.js} +1 -1
- package/dist/client/assets/{category-editor-C3tPwo-O.js → category-editor-_9aftiUj.js} +1 -1
- package/dist/client/assets/{chat-context-CWj_5Xjy.js → chat-context-CdcAuDUS.js} +1 -1
- package/dist/client/assets/{checkbox-B8I8ULDM.js → checkbox-1NHA6ags.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BZZJ8ljw.js → cli-auth-success-B52wNL2V.js} +1 -1
- package/dist/client/assets/{collection-detail-CAJRlJNz.js → collection-detail-BfHxFPCW.js} +1 -1
- package/dist/client/assets/{collection-display-button-MK8sJgYK.js → collection-display-button-CARi-X__.js} +1 -1
- package/dist/client/assets/{collection-search-JF6iMFQe.js → collection-search-EZ_TgeOx.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DfpdV9wl.js → collection-table-wrapper-ntW_kap4.js} +1 -1
- package/dist/client/assets/{collection-tabs-DTBgpjpb.js → collection-tabs-DexOABMQ.js} +1 -1
- package/dist/client/assets/{command-X9fO0ToS.js → command-CSe-uHrh.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CKQucrdu.js → commerce-onboarding-ggTPgfmk.js} +1 -1
- package/dist/client/assets/{companions-core-j_0J30PJ.js → companions-core-QrJolxkg.js} +1 -1
- package/dist/client/assets/{connect-BeRtumRu.js → connect-B_xZYpLA.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CUJxiyZC.js → connect-desktop-dialog-S8cCvTaK.js} +1 -1
- package/dist/client/assets/{connection-card-Bxo1rJ_l.js → connection-card-BXqR2l1c.js} +1 -1
- package/dist/client/assets/{connection-detail-VMrYv0bl.js → connection-detail-BR7vqb17.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Dwr0QnsN.js → connection-form-helpers-CfHSjpL2.js} +1 -1
- package/dist/client/assets/{connections-k5M7YhJ5.js → connections-DuBuf_K7.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CsaxjWqo.js → decopilot-sse-pool-SqtdCkZ4.js} +1 -1
- package/dist/client/assets/{dialog-DTERmMdq.js → dialog-dfAy2TTt.js} +1 -1
- package/dist/client/assets/{domain-settings-QEBY_O22.js → domain-settings-CKc4FNZk.js} +1 -1
- package/dist/client/assets/{drawer-D592XSz-.js → drawer-BhtgSPao.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DCVSlDdU.js → dropdown-menu-BxpmNkvj.js} +1 -1
- package/dist/client/assets/{empty-state-DnkxLOwP.js → empty-state-Wdt305BC.js} +1 -1
- package/dist/client/assets/{extract-connection-data-D0xv5f6d.js → extract-connection-data-CUPY4h8x.js} +1 -1
- package/dist/client/assets/{file-explorer-Cc7Fo9Vw.js → file-explorer-DvSJunYy.js} +1 -1
- package/dist/client/assets/{file-type-icon-DKZTktyz.js → file-type-icon-BIP3n6ye.js} +1 -1
- package/dist/client/assets/{files-C52diAtY.js → files-zAd-2EvH.js} +1 -1
- package/dist/client/assets/{form-CTIDjV5U.js → form-CF3RjQBx.js} +1 -1
- package/dist/client/assets/{general-CA388VDO.js → general-DXlHAo7g.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DTwuNdN8.js → github-repo-picker-Cq0j6Fer.js} +1 -1
- package/dist/client/assets/{hooks-CGrRNfgB.js → hooks-yHiQMJ5W.js} +1 -1
- package/dist/client/assets/{index-pOKU1sel.js → index-8CSCdJSN.js} +1 -1
- package/dist/client/assets/{index-CziH8yUr.js → index-BB0l7D8W.js} +1 -1
- package/dist/client/assets/{index-vNH0v8Fd.js → index-BIkMD2a1.js} +1 -1
- package/dist/client/assets/{index-DcuzUaPh.js → index-BMpEXBXM.js} +1 -1
- package/dist/client/assets/{index-zBE2ow0w.js → index-BMv4jCYv.js} +1 -1
- package/dist/client/assets/{index-Dq0Rv4T6.js → index-BitSPwcw.js} +1 -1
- package/dist/client/assets/{index-DExceWv9.js → index-CHOirrNp.js} +1 -1
- package/dist/client/assets/{index-BbVhqZHS.js → index-CPD_qiK-.js} +1 -1
- package/dist/client/assets/{index-fNoeLmyx.js → index-CRaj4we8.js} +1 -1
- package/dist/client/assets/{index-AYpZp1GA.js → index-CYQEaXdg.js} +1 -1
- package/dist/client/assets/{index-pSvo-p7O.js → index-CetUKuua.js} +1 -1
- package/dist/client/assets/{index-BG2iLEXm.js → index-CsnXc5Et.js} +23 -23
- package/dist/client/assets/{index-BndAfnBN.js → index-h2Txlgmb.js} +3 -3
- package/dist/client/assets/{index-redirect-WN2k7pJg.js → index-redirect-CGMmT7Ut.js} +1 -1
- package/dist/client/assets/{index-BFgGPpC8.js → index-xMAThnJ3.js} +29 -29
- package/dist/client/assets/{input-CsC1Diu-.js → input-u9ojR0Jk.js} +1 -1
- package/dist/client/assets/{integration-icon-pm2IQO2U.js → integration-icon-BMvzy0w5.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-D7IRVBXl.js → invite-member-dialog-BT6zttg7.js} +1 -1
- package/dist/client/assets/{label-DqXNZATI.js → label-7U_jcH3x.js} +1 -1
- package/dist/client/assets/{layout-BqTeageM.js → layout-DwuWA2A3.js} +1 -1
- package/dist/client/assets/{login-ClDrj-2f.js → login-DjRzz0_j.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BORbgW4H.js → mcp-oauth-Det9HVTR.js} +1 -1
- package/dist/client/assets/{members-WF-PminE.js → members-Ct31LEsu.js} +1 -1
- package/dist/client/assets/{monaco-editor-B9HyQg7v.js → monaco-editor-GkkiGiO2.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-pvL8qOz4.js → monitoring-stats-row-oSpt-0Nf.js} +1 -1
- package/dist/client/assets/{multi-select-BDaSL9uP.js → multi-select-CQorHX_C.js} +1 -1
- package/dist/client/assets/{oauth-callback-B5QzBUa_.js → oauth-callback-B4eBU_O3.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BDKSQRVP.js → oauth-callback-ai-provider-BcADfU57.js} +1 -1
- package/dist/client/assets/{onboarding-iNKOe8fc.js → onboarding-COoWUwjK.js} +1 -1
- package/dist/client/assets/{org-install-CWBMjUat.js → org-install-DPiHB5gc.js} +1 -1
- package/dist/client/assets/{org-layout-BAP0xFKg.js → org-layout-IDVVMg-8.js} +1 -1
- package/dist/client/assets/{organization-choice-BSm2aJn0.js → organization-choice-CTkHG9wB.js} +1 -1
- package/dist/client/assets/{orgs-DmDVOJNZ.js → orgs-BEVouQN2.js} +1 -1
- package/dist/client/assets/{page-seo-form-D3Q5GmQ_.js → page-seo-form-CgTRO54t.js} +1 -1
- package/dist/client/assets/page-seo-sheet-ZXZqYZeH.js +1 -0
- package/dist/client/assets/{popover-BHJXyBcl.js → popover-DeNJXOxs.js} +1 -1
- package/dist/client/assets/{post-editor-L5eyLvH2.js → post-editor-BC_EqG95.js} +1 -1
- package/dist/client/assets/{primitives-BTXI1UhP.js → primitives-DW_xJ0XY.js} +1 -1
- package/dist/client/assets/{profile-D40D6IbB.js → profile-B6LJKYaV.js} +1 -1
- package/dist/client/assets/project-app-view-CIBx6iGT.js +1 -0
- package/dist/client/assets/record-editor-DDua03Aj.js +1 -0
- package/dist/client/assets/{redirect-editor-DJ1Y_Dqx.js → redirect-editor-BR4k4dU-.js} +1 -1
- package/dist/client/assets/registry-BZHylcQg.js +2 -0
- package/dist/client/assets/{registry-layout-Czee_ui1.js → registry-layout-DdpD2Ry7.js} +1 -1
- package/dist/client/assets/{reports-BvsqcplZ.js → reports-BqaJMLUV.js} +1 -1
- package/dist/client/assets/{require-capability-DmAVYrxg.js → require-capability-c3gGgAdr.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DZtKKGLa.js → required-auth-layout-DreE2Dff.js} +1 -1
- package/dist/client/assets/{reset-password-Bk83Kx_H.js → reset-password-BLNw7U5H.js} +1 -1
- package/dist/client/assets/{roles-DsJ5Ylxf.js → roles-COJ501I0.js} +1 -1
- package/dist/client/assets/{search-input-CwAJ7BWA.js → search-input-mUDoQdXW.js} +1 -1
- package/dist/client/assets/{secrets-B-pJRADZ.js → secrets-B7kBoBlY.js} +1 -1
- package/dist/client/assets/{sections-editor-CJbGysPH.js → sections-editor-CkxSPNTY.js} +1 -1
- package/dist/client/assets/{select-DyDdd0ox.js → select-Dwl6tgyc.js} +1 -1
- package/dist/client/assets/{select-model-J8fBCN0u.js → select-model-5fuU93qG.js} +1 -1
- package/dist/client/assets/{self-tool-result-nnnPnWxT.js → self-tool-result-ClGvUSzE.js} +1 -1
- package/dist/client/assets/{seo-editor-CCzJc2E0.js → seo-editor-4m4pHaJn.js} +1 -1
- package/dist/client/assets/{settings-layout-DwppcUBS.js → settings-layout-CEhhqr5X.js} +1 -1
- package/dist/client/assets/{settings-section-ZQhYRZpE.js → settings-section-8wzuI0e2.js} +1 -1
- package/dist/client/assets/{shell-controls-scS1Rhux.js → shell-controls-QkO6fUAg.js} +1 -1
- package/dist/client/assets/{shell-layout-EXrCt72h.js → shell-layout-D1cDRvrL.js} +1 -1
- package/dist/client/assets/{sidebar-DosOHS89.js → sidebar-B6ruAgp1.js} +1 -1
- package/dist/client/assets/{skeleton-BTs-Tdu0.js → skeleton-AlkG0Gdf.js} +1 -1
- package/dist/client/assets/{sso-BM8eE3tq.js → sso-CXey7xHX.js} +1 -1
- package/dist/client/assets/{store-CRnZmc6Z.js → store-DtsPgCIa.js} +1 -1
- package/dist/client/assets/store-registry-XsXH60Bx.js +2 -0
- package/dist/client/assets/{studio-tools-ukrAmOkD.js → studio-tools-CwZ4ZBgT.js} +1 -1
- package/dist/client/assets/{switch-C9pj46Z6.js → switch-6H8FKWGB.js} +1 -1
- package/dist/client/assets/{table-DWcE-ljO.js → table-CXPm9nhx.js} +1 -1
- package/dist/client/assets/{tabs-CzbcVejC.js → tabs-7TkasHGl.js} +1 -1
- package/dist/client/assets/{textarea-I-beCo8f.js → textarea-DrzR5udY.js} +1 -1
- package/dist/client/assets/{toggle-group-CSett6iF.js → toggle-group-DcCG_z_S.js} +1 -1
- package/dist/client/assets/{toolbar-f60X9WiD.js → toolbar-Dwqw-NGi.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BFnmKkKr.js → toolbar-icon-button-BANxrES2.js} +1 -1
- package/dist/client/assets/{tooltip-BDJ7iYv_.js → tooltip-Cx4iVbBS.js} +1 -1
- package/dist/client/assets/{use-ai-providers-7OtHxRqt.js → use-ai-providers-CNxbdOdh.js} +1 -1
- package/dist/client/assets/{use-api-keys-B-WaFIiT.js → use-api-keys-C_mORge4.js} +1 -1
- package/dist/client/assets/{use-automations-886ySqJq.js → use-automations-CRPUaRnG.js} +1 -1
- package/dist/client/assets/{use-autosave-CXrMNytc.js → use-autosave-C2LdWtX4.js} +1 -1
- package/dist/client/assets/{use-capability-HyvPV9Kc.js → use-capability-DDoizOsm.js} +1 -1
- package/dist/client/assets/{use-clock-tick-ByL-Lh2G.js → use-clock-tick-BXUEdeXU.js} +1 -1
- package/dist/client/assets/{use-connection-C8ytM15b.js → use-connection-CRf-DTB0.js} +1 -1
- package/dist/client/assets/{use-copy-8xFrbNwA.js → use-copy-BIvcisP7.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-vCdnBcqV.js → use-create-virtual-mcp-5RZTzNZt.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Dl0bn9CK.js → use-debounced-autosave-BZzQGoBJ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-KA9O7hhh.js → use-debounced-value-C5_koqkI.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DO8B21gs.js → use-deco-credits-a2tWMbhr.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-ik0j7Idu.js → use-decopilot-events-D4WclKO1.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CB9H-v-Z.js → use-delete-connection-DvDrdj8E.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DmUmcR7f.js → use-deployment-admin-BY9aiNeW.js} +1 -1
- package/dist/client/assets/{use-file-configs-BrCSqQHA.js → use-file-configs-rAeCy2m6.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-0_XM1a-S.js → use-infinite-scroll-5JOaC6HH.js} +1 -1
- package/dist/client/assets/{use-join-requests-DKHalNnE.js → use-join-requests-Dk8eY_ir.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DlBw1ZFI.js → use-mcp-auth-status-Cti2GrcA.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DYOS_8eo.js → use-mcp-client-CxJl6URN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BLQoKB-2.js → use-mcp-tools-CZl6XrZ7.js} +1 -1
- package/dist/client/assets/{use-members-XmfA74-e.js → use-members-BDKlfbtq.js} +1 -1
- package/dist/client/assets/{use-mobile-CLI42gmv.js → use-mobile-CljsORKC.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Cilssw61.js → use-navigate-to-agent-CfNAtLX9.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DOOxheWY.js → use-org-auth-client-WFmIGMAp.js} +1 -1
- package/dist/client/assets/{use-org-sso-ClgxAraI.js → use-org-sso-CdqzH40J.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D9JXEbEX.js → use-organization-roles-snr9TURY.js} +1 -1
- package/dist/client/assets/{use-organization-settings-VgIejHMx.js → use-organization-settings-CPH24cID.js} +1 -1
- package/dist/client/assets/{use-registry-app-DNeAw21p.js → use-registry-app-B5yOQbYF.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bluv6sTk.js → use-registry-connections-DOp_CmU_.js} +1 -1
- package/dist/client/assets/{use-secrets-3k-32-A8.js → use-secrets-BngqMQYW.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D9IFNrZv.js → use-status-sounds-Csty195w.js} +1 -1
- package/dist/client/assets/{use-view-mode-CjB0RzKt.js → use-view-mode--DcXGci1.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B8ePNwQG.js → use-virtual-mcp-C9595_o4.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BUdwW0Ym.js +1 -0
- package/dist/client/assets/{useRouterState-DUsZKnyS.js → useRouterState-B5E07hul.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CPYBdW4F.js +1 -0
- package/dist/client/assets/{users-KkKpy9nz.js → users-B8tx5ZHD.js} +1 -1
- package/dist/client/assets/{variant-calendar-y8BhfKBh.js → variant-calendar-Sp_Pw0W3.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-RIrGcafb.js → view-mode-toggle-DFicmu5N.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +214 -214
- package/dist/server/server.js +166 -166
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-BHz6iSrk.js +0 -1
- package/dist/client/assets/project-app-view-dFDZ7PrH.js +0 -1
- package/dist/client/assets/record-editor-JpnOewHP.js +0 -1
- package/dist/client/assets/registry-US3Gsp4u.js +0 -2
- package/dist/client/assets/store-registry-BWDgwr86.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CzUic10e.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B96CIiaZ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bd as Cu,be as ke,bf as ro,M as R,aX as _e,ah as Ut,bg as as,ae as Se,bh as Tr,bi as qe,af as _u,bj as pn,J as Q,bk as ls,bl as io,bm as Iu,bn as Tu,bo as Ga,bp as Nu,bq as Pu,br as Fu,bs as Ya,bt as $u,b4 as Ja,ag as nr,bu as Du,c as je,r as N,m as Ur,j as m,au as Za,F as cs,a as Ru,t as vr,bv as us,bw as Xa,bx as ku,by as Mu,bz as Uu,bc as Qa,bA as ds,bB as Lu,bC as Bu,bD as Vu,bE as qu,aS as zu,aV as Qt,aP as rr,aT as gn,aQ as Wu,aU as Hu,bF as Ku,aR as Gu,bG as Yu,b as lt,B as Lr,k as fs,d as Ju,E as Zu,aJ as Xu}from"./index-BFgGPpC8.js";import{P as An}from"./index-pSvo-p7O.js";import{E as el}from"./empty-state-DnkxLOwP.js";import{A as tl,k as Qu,l as ed,n as td,o as nd,p as rd,i as id,u as sd}from"./use-mcp-client-DYOS_8eo.js";import{c as od}from"./use-mcp-tools-BLQoKB-2.js";import{i as ad}from"./ZoomOut-BgBVt7xO.js";import{i as ld}from"./Key01-BG2GwAxV.js";import{b as cd,u as ud,a as dd}from"./use-connection-C8ytM15b.js";import{U as Cn,a as ii,e as so}from"./auth-_luaz7eq.js";import{i as fd,c as md,d as hd,e as pd}from"./extract-connection-data-D0xv5f6d.js";import{u as gd}from"./use-registry-connections-Bluv6sTk.js";import{c as yd}from"./use-organization-settings-VgIejHMx.js";import{s as bd}from"./Plus-D8R0whKy.js";import{e as nl,S as xd,a as vd,b as Sd,c as wd,d as jd}from"./select-DyDdd0ox.js";import{R as oo}from"./index-BbVhqZHS.js";import{R as Od,I as Ed,a as Ad}from"./index-fNoeLmyx.js";import{_ as Lt}from"./index-DExceWv9.js";import{A as rl}from"./agent-icon-CWafS0z1.js";import{I as Cd}from"./input-CsC1Diu-.js";import{P as _d,a as Id,b as Td}from"./popover-BHJXyBcl.js";import{a as Nd,T as Pd,c as Fd,b as $d}from"./tooltip-BDJ7iYv_.js";import{u as Dd}from"./use-virtual-mcp-B8ePNwQG.js";import{i as Rd}from"./Check-BqUfCoBF.js";import{i as kd}from"./SearchMd-Cl1wFEaP.js";import{a as Md}from"./Users03-BhAf1OI0.js";import{u as Ud}from"./use-mobile-CLI42gmv.js";import{u as Ld}from"./use-create-virtual-mcp-vCdnBcqV.js";function Bd(){const t=new tl({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return Cu(t),t}class Vd{#e=Bd();#t=new Map;#n=new WeakMap;getValidator(e){const n=this.#n.get(e);if(n)return n;let r;const i=s=>{if(!r){const o=qd(e);let a=this.#t.get(o);a||(a=this.#e.compile(e),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(e,i),i}}function qd(t){return JSON.stringify(t,(e,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const zd=new Vd;var Wd=class{apply(t,e){if(!e.type)return;const n=Array.isArray(e.type)?e.type:[e.type],r=new Set(n);if(r.has("string")||(t.string=!1),!r.has("number")&&!r.has("integer")&&(t.number=!1),r.has("boolean")||(t.boolean=!1),r.has("null")||(t.null=!1),r.has("array")||(t.array=!1),r.has("object")||(t.object=!1),r.has("integer")&&t.number!==!1){const i=t.number||_e();i instanceof pn&&(t.number=i.int())}}},Hd=class{apply(t,e){if(e.const===void 0)return;const n=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof n=="string"?t.string=qe(n):typeof n=="number"?t.number=qe(n):typeof n=="boolean"?t.boolean=qe(n):n===null?t.null=as():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},Kd=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const n={string:e.enum.filter(r=>typeof r=="string"),number:e.enum.filter(r=>typeof r=="number"),boolean:e.enum.filter(r=>typeof r=="boolean"),null:e.enum.filter(r=>r===null),array:e.enum.filter(r=>Array.isArray(r)),object:e.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};t.string=this.createTypeSchema(n.string,"string"),t.number=this.createTypeSchema(n.number,"number"),t.boolean=this.createTypeSchema(n.boolean,"boolean"),t.null=n.null.length>0?as():!1,t.array=n.array.length>0?void 0:!1,t.object=n.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return qe(t[0]);if(e==="string")return _u(t);if(e==="number"){const[n,r,...i]=t;return Tr([qe(n),qe(r),...i.map(s=>qe(s))])}return e==="boolean"?Tr([qe(!0),qe(!1)]):!1}},Gd=class{apply(t,e){const n=e;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=Fu();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)),t.file=r,t.string=!1}}},Yd=class{apply(t,e){const n=e;e.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&t.string===void 0&&(t.string=R())}},Jd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||R();r instanceof ls&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Zd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||R();r instanceof ls&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Xd=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||R();if(r instanceof ls){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},Qd=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.min(n.minimum))}}},ef=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.max(n.maximum))}}},tf=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},nf=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},rf=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.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}`}))}}},sf=class{apply(t,e){const n=e;e.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&t.array===void 0&&(t.array=Se(ke()))}},of=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||Se(ke())).min(n.minItems))}},af=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||Se(ke())).max(n.maxItems))}},lf=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||Se(ke());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=Se(r);if(t.array&&t.array instanceof Iu){const s=t.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))}})}t.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?t.array=t.array||Se(ke()):t.array=Se(ke()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||Se(ke()):n.prefixItems&&(t.array=t.array||Se(ke()))}},cf=class{apply(t,e){if(e.type!=="array")return;const n=e;if(!Array.isArray(n.items)||t.array===!1)return;const r=n.items.map(s=>Ie(s));let i;r.length===0?i=io([]):i=io(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),t.tuple=i,t.array=!1}},uf=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||Q({}).passthrough())}},df=class{apply(t,e){const n=e;e.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&t.object===void 0&&(t.object=Q({}).passthrough())}},ff=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||Q({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},mf=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||Q({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Gn(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,r)=>Gn(n,e[r]));if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Gn(t[i],e[i]))}return!1}function hf(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>Gn(n,i))?!1:(e.push(n),!0))}}function Nr(t,e){return t.safeParse(e).success}var pf=class{apply(t,e){if(!e.not)return t;const n=Ie(e.not);return t.refine(r=>!Nr(n,r),{message:"Value must not match the 'not' schema"})}},gf=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(hf(),{message:"Array items must be unique"})}},yf=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Ie(r)).reduce((r,i)=>Ga(r,i),t)}},bf=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Ie(e.anyOf[0]):Tr([Ie(e.anyOf[0]),Ie(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Ie(r))]);return Ga(t,n)}},xf=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const n=e.oneOf.map(r=>Ie(r));return t.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"})}},vf=class{apply(t,e){const n=e;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ie(s));return t.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Nr(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=Ie(n.items);for(let a=i.length;a<s.length;a++)if(!Nr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},Sf=class{apply(t,e){const n=e;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return t;if(t instanceof Nu||t instanceof Pu){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ie(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?Q(r):Q(r).passthrough()}return t.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&&!Ie(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"})}},wf=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const n=e.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?t:t.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Gn(r,i)),{message:"Value must match one of the enum values"})}},jf=class{apply(t,e){if(e.const===void 0)return t;const n=e.const;return typeof n!="object"||n===null?t:t.refine(r=>Gn(r,n),{message:"Value must equal the const value"})}},Of=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},Ef=class{apply(t,e){var n;const r=e;return!((n=r.required)!=null&&n.includes("__proto__"))||e.type!==void 0?t:ke().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(n=>Object.prototype.hasOwnProperty.call(t,n))}},Af=class{apply(t,e){var n;const r=e;if(r.contains===void 0)return t;const i=Ie(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return t.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const u of a)Nr(i,u)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Cf=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},_f=[new Hd,new Kd,new Wd,new Gd,new Yd,new sf,new df,new Jd,new Zd,new Xd,new Qd,new ef,new tf,new nf,new rf,new cf,new of,new af,new lf,new ff,new mf,new uf],If=[new Ef,new wf,new jf,new yf,new bf,new xf,new vf,new Sf,new Af,new pf,new gf,new Cf,new Of];function Ie(t){if(typeof t=="boolean")return t?ke():ro();const e={};for(const i of _f)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||R()),e.number!==!1&&n.push(e.number||_e()),e.boolean!==!1&&n.push(e.boolean||Ut()),e.null!==!1&&n.push(e.null||as()),e.array!==!1&&n.push(e.array||Se(ke())),e.tuple!==!1&&e.tuple!==void 0&&n.push(e.tuple),e.object!==!1)if(e.object)n.push(e.object);else{const i=Tu(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}e.file!==!1&&e.file!==void 0&&n.push(e.file);let r;n.length===0?r=ro():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=Tr(n):r=ke();for(const i of If)r=i.apply(r,t);return r}class ao extends Event{constructor(e,n){var r,i;super(e),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,n,r){return r(lo(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(lo(this),n)}}function Tf(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function $i(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map($i).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${$i(t.cause)}`:t.message:`${t}`}function lo(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var il=t=>{throw TypeError(t)},ms=(t,e,n)=>e.has(t)||il("Cannot "+n),Z=(t,e,n)=>(ms(t,e,"read from private field"),n?n.call(t):e.get(t)),ve=(t,e,n)=>e.has(t)?il("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),pe=(t,e,n,r)=>(ms(t,e,"write to private field"),e.set(t,n),n),st=(t,e,n)=>(ms(t,e,"access private method"),n),Pe,Pt,Yt,Sr,Pr,Un,en,Ln,bt,Jt,sn,Zt,Fn,Ve,Di,Ri,ki,co,Mi,Ui,$n,Li,Bi;class wr extends EventTarget{constructor(e,n){var r,i;super(),ve(this,Ve),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ve(this,Pe),ve(this,Pt),ve(this,Yt),ve(this,Sr),ve(this,Pr),ve(this,Un),ve(this,en),ve(this,Ln,null),ve(this,bt),ve(this,Jt),ve(this,sn,null),ve(this,Zt,null),ve(this,Fn,null),ve(this,Ri,async s=>{var o;Z(this,Jt).reset();const{body:a,redirected:l,status:u,headers:c}=s;if(u===204){st(this,Ve,$n).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?pe(this,Yt,new URL(s.url)):pe(this,Yt,void 0),u!==200){st(this,Ve,$n).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){st(this,Ve,$n).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.OPEN);const d=new Event("open");if((o=Z(this,Fn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){st(this,Ve,$n).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const h=new TextDecoder,g=a.getReader();let f=!0;do{const{done:p,value:y}=await g.read();y&&Z(this,Jt).feed(h.decode(y,{stream:!p})),p&&(f=!1,Z(this,Jt).reset(),st(this,Ve,Li).call(this))}while(f)}),ve(this,ki,s=>{pe(this,bt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&st(this,Ve,Li).call(this,$i(s))}),ve(this,Mi,s=>{typeof s.id=="string"&&pe(this,Ln,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:Z(this,Yt)?Z(this,Yt).origin:Z(this,Pt).origin,lastEventId:s.id||""});Z(this,Zt)&&(!s.event||s.event==="message")&&Z(this,Zt).call(this,o),this.dispatchEvent(o)}),ve(this,Ui,s=>{pe(this,Un,s)}),ve(this,Bi,()=>{pe(this,en,void 0),Z(this,Pe)===this.CONNECTING&&st(this,Ve,Di).call(this)});try{if(e instanceof URL)pe(this,Pt,e);else if(typeof e=="string")pe(this,Pt,new URL(e,Nf()));else throw new Error("Invalid URL")}catch{throw Tf("An invalid or illegal string was specified")}pe(this,Jt,Qu({onEvent:Z(this,Mi),onRetry:Z(this,Ui)})),pe(this,Pe,this.CONNECTING),pe(this,Un,3e3),pe(this,Pr,(r=n?.fetch)!=null?r:globalThis.fetch),pe(this,Sr,(i=n?.withCredentials)!=null?i:!1),st(this,Ve,Di).call(this)}get readyState(){return Z(this,Pe)}get url(){return Z(this,Pt).href}get withCredentials(){return Z(this,Sr)}get onerror(){return Z(this,sn)}set onerror(e){pe(this,sn,e)}get onmessage(){return Z(this,Zt)}set onmessage(e){pe(this,Zt,e)}get onopen(){return Z(this,Fn)}set onopen(e){pe(this,Fn,e)}addEventListener(e,n,r){const i=n;super.addEventListener(e,i,r)}removeEventListener(e,n,r){const i=n;super.removeEventListener(e,i,r)}close(){Z(this,en)&&clearTimeout(Z(this,en)),Z(this,Pe)!==this.CLOSED&&(Z(this,bt)&&Z(this,bt).abort(),pe(this,Pe,this.CLOSED),pe(this,bt,void 0))}}Pe=new WeakMap,Pt=new WeakMap,Yt=new WeakMap,Sr=new WeakMap,Pr=new WeakMap,Un=new WeakMap,en=new WeakMap,Ln=new WeakMap,bt=new WeakMap,Jt=new WeakMap,sn=new WeakMap,Zt=new WeakMap,Fn=new WeakMap,Ve=new WeakSet,Di=function(){pe(this,Pe,this.CONNECTING),pe(this,bt,new AbortController),Z(this,Pr)(Z(this,Pt),st(this,Ve,co).call(this)).then(Z(this,Ri)).catch(Z(this,ki))},Ri=new WeakMap,ki=new WeakMap,co=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Z(this,Ln)?{"Last-Event-ID":Z(this,Ln)}:void 0},cache:"no-store",signal:(t=Z(this,bt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},Mi=new WeakMap,Ui=new WeakMap,$n=function(t,e){var n;Z(this,Pe)!==this.CLOSED&&pe(this,Pe,this.CLOSED);const r=new ao("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r)},Li=function(t,e){var n;if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.CONNECTING);const r=new ao("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r),pe(this,en,setTimeout(Z(this,Bi),Z(this,Un)))},Bi=new WeakMap,wr.CONNECTING=0,wr.OPEN=1,wr.CLOSED=2;function Nf(){const t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}class Pf extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class Ff{constructor(e,n){this._url=e,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=ed(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Cn("No auth provider");let e;try{e=await ii(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(e!=="AUTHORIZED")throw new Cn;return await this._startOrAuth()}async _commonHeaders(){const e={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(e.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const n=td(this._requestInit?.headers);return new Headers({...e,...n})}_startOrAuth(){const e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new wr(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await e(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:u}=so(a);this._resourceMetadataUrl=l,this._scope=u}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 Pf(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=Ya.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(e){if(!this._authProvider)throw new Cn("No auth provider");if(await ii(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){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(e),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}=so(i);if(this._resourceMetadataUrl=o,this._scope=a,await ii(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(e){this._protocolVersion=e}}const $f="mcp";class Df{constructor(e){this._url=e}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,n)=>{this._socket=new WebSocket(this._url,$f),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=()=>{e()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=Ya.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(e){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(e)),n()})}}class Rf extends nd{constructor(e,n){super(e,n)}send(e,n){const r=kf(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function kf(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const n=e?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Mf extends rd{constructor(e,n){super(e,{jsonSchemaValidator:zd,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},$u,n)}}const Uf=async(t,e,n)=>{const r=Lf(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new Mf({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Lf=(t,e,n)=>{if(t.type==="Websocket")return new Df(new URL(t.url));if(t.type!=="SSE"&&t.type!=="HTTP")return null;const i={...t.token?{authorization:`Bearer ${t.token}`}:{},...n??{},..."headers"in t?t.headers||{}:{}};if(t.type==="SSE"){const s={requestInit:{headers:i,signal:e}};return t.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:e})}),new Ff(new URL(t.url),s)}return new Rf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},uo=t=>{try{return JSON.parse(t)}catch{return t}},hr=new Map,fo=(t,e)=>({...t,id:t.name,inputSchema:t.inputSchema?Ie(t.inputSchema):void 0,outputSchema:t.outputSchema?Ie(t.outputSchema):void 0,execute:n=>e(n.context,t.name)});function Bf(t){const e=n=>"connection"in t?Uf({connection:t.connection},void 0,n):t.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,u=r){const c=t?.debugId?.(),d=c?{"x-trace-debug-id":c}:void 0,{client:h}=await e(d),{structuredContent:g,isError:f,content:p}=await h.callTool({name:String(u),arguments:l});if(f){const x=p?.[0]?.text,S=typeof x=="string"?uo(x):null,E=S?.code&&typeof t?.getErrorByStatusCode=="function"?t.getErrorByStatusCode(S.code,S.message,S.traceId):null;throw E||new Error(`Tool ${String(u)} returned an error: ${JSON.stringify(g??p)}`)}if(g!==void 0)return g;const y=p?.[0]?.text;return typeof y=="string"?uo(y):void 0}async function s(){const{client:l}=await e(),{tools:u}=await l.listTools();return u}async function o(){if(!("connection"in t))return s();const l=t.connection,u=JSON.stringify(l);try{return hr.has(u)||hr.set(u,s()),await hr.get(u)}catch(c){console.error("Failed to list tools",c),hr.delete(u);return}}async function a(){return(await o()??[]).map(u=>fo(u,i))}return i.asTool=async()=>{const u=(await o()??[]).find(c=>c.name===r);if(!u)throw new Error(`Tool ${r} not found`);return fo(u,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>Vf({connection:n}):global[e]}});function Vf(t){return Bf(t)}function qf(t){return{isImplementedBy:e=>{for(const n of t){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=e.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const zf=Q({specversion:qe("1.0").describe("CloudEvents specification version"),id:R().describe("Unique identifier for this event (UUID recommended)"),source:R().describe("Connection ID of the event publisher"),type:R().describe("Event type (e.g., 'order.created', 'user.signup')"),time:R().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:R().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:R().optional().default("application/json").describe("Content type of the data attribute"),dataschema:R().url().optional().describe("URI to the schema for the data attribute"),data:Ja().optional().describe("Event payload (any JSON value)")});Q({events:Se(zf).min(1).describe("Batch of CloudEvents to process")});const Wf=Q({success:Ut().optional().describe("Whether this event was processed successfully"),error:R().optional().describe("Error message for this event"),retryAfter:_e().int().positive().optional().describe("Re-deliver this event after this many ms")});Q({success:Ut().optional().describe("Batch success - applies to events not in results"),error:R().optional().describe("Batch error message - applies to events not in results"),processedCount:_e().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:_e().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:nr(R(),Wf).optional().describe("Per-event results keyed by event ID")});const Hf=Q({type:qe("string"),enum:Se(R()).optional(),description:R().optional()}),Kf=Q({type:R(),description:R(),paramsSchema:nr(R(),Hf)});Q({});Q({triggers:Se(Kf)});Q({type:R(),params:nr(R(),R()),enabled:Ut(),callbackUrl:Du().optional(),callbackToken:R().min(1).optional()});Q({success:Ut()});Q({prefix:R().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:_e().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:R().optional().describe("Token for pagination from previous response"),delimiter:R().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});Q({objects:Se(Q({key:R().describe("Object key/path"),size:_e().describe("Object size in bytes"),lastModified:R().describe("Last modified timestamp"),etag:R().describe("Entity tag for the object")})),nextContinuationToken:R().optional().describe("Token for fetching next page of results"),isTruncated:Ut().describe("Whether there are more results available"),commonPrefixes:Se(R()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});Q({key:R().describe("Object key/path to get metadata for")});Q({contentType:R().optional().describe("MIME type of the object"),contentLength:_e().describe("Size of the object in bytes"),lastModified:R().describe("Last modified timestamp"),etag:R().describe("Entity tag for the object"),metadata:nr(R(),R()).optional().describe("Custom metadata key-value pairs")});Q({key:R().describe("Object key/path to generate URL for"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});Q({url:R().describe("Presigned URL for downloading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});Q({key:R().describe("Object key/path for the upload"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:R().optional().describe("MIME type for the object being uploaded")});Q({url:R().describe("Presigned URL for uploading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});Q({key:R().describe("Object key/path to delete")});Q({success:Ut().describe("Whether the deletion was successful"),key:R().describe("The key that was deleted")});Q({keys:Se(R()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});Q({deleted:Se(R()).describe("Array of successfully deleted keys"),errors:Se(Q({key:R(),message:R()})).describe("Array of errors for failed deletions")});const Gf=Q({primary:R().optional().describe("Primary brand color (hex)"),secondary:R().optional().describe("Secondary brand color (hex)"),accent:R().optional().describe("Accent / highlight color (hex)"),background:R().optional().describe("Background color (hex)"),foreground:R().optional().describe("Foreground / text color (hex)")}),Yf=Q({heading:R().optional().describe("Font family for headings"),body:R().optional().describe("Font family for body text"),code:R().optional().describe("Font family for code / monospace")}),Jf=Q({logo:R().optional().describe("Logo URL"),favicon:R().optional().describe("Favicon URL"),ogImage:R().optional().describe("Open Graph image URL")}),Zf=Q({id:R(),name:R().describe("Brand / company name"),domain:R().optional().describe("Company domain (e.g. example.com)"),colors:Gf.optional().describe("Semantic color palette"),fonts:Yf.optional().describe("Font families by role"),assets:Jf.optional().describe("Visual identity assets"),overview:R().optional().describe("Company overview / description"),tagline:R().optional().describe("Brand tagline"),tone:R().optional().describe("Tone of voice description"),metadata:nr(R(),Ja()).optional().describe("Extra design tokens and metadata")});Q({id:R().optional().describe("Brand ID. Omit to get the default brand.")});Q({});Q({items:Se(Zf)});const Xf={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function Qf(t){if(t)return Xf[t]}function LO(t,e){const n=t.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=e.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return qf(i).isImplementedBy(r)}const hs=N.createContext(null);function BO(t){const e=je.c(3),{children:n}=t,r=N.useContext(hs);if(!r?.tabsEl)return null;let i;return e[0]!==n||e[1]!==r.tabsEl?(i=Za.createPortal(n,r.tabsEl),e[0]=n,e[1]=r.tabsEl,e[2]=i):i=e[2],i}function em(t){const e=je.c(3),{children:n}=t,r=N.useContext(hs);if(!r?.actionsEl)return null;let i;return e[0]!==n||e[1]!==r.actionsEl?(i=Za.createPortal(n,r.actionsEl),e[0]=n,e[1]=r.actionsEl,e[2]=i):i=e[2],i}const VO=em;function qO(t){const e=je.c(21),{children:n,breadcrumb:r,hideHeader:i}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftEl:null,tabsEl:null,actionsEl:null},e[0]=s):s=e[0];const[o,a]=N.useState(s),l=N.useRef(null),u=N.useRef(null),c=N.useRef(null);let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=A=>{l.current=A,A&&a(_=>_.leftEl===A?_:{..._,leftEl:A})},e[1]=d):d=e[1];const h=d;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=A=>{u.current=A,A&&a(_=>_.tabsEl===A?_:{..._,tabsEl:A})},e[2]=g):g=e[2];const f=g;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=A=>{c.current=A,A&&a(_=>_.actionsEl===A?_:{..._,actionsEl:A})},e[3]=p):p=e[3];const y=p,x=i&&"hidden";let S;e[4]!==x?(S=Ur(x),e[4]=x,e[5]=S):S=e[5];let E;e[6]===Symbol.for("react.memo_cache_sentinel")?(E=m.jsx("div",{ref:h,className:"flex items-center gap-2 min-w-0"}),e[6]=E):E=e[6];let j;e[7]!==r?(j=m.jsxs(An.Header.Left,{children:[r,E]}),e[7]=r,e[8]=j):j=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=m.jsxs(An.Header.Right,{children:[m.jsx("div",{ref:f,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),m.jsx("div",{ref:y,className:"flex items-center gap-2 shrink-0"})]}),e[9]=b):b=e[9];let v;e[10]!==S||e[11]!==j?(v=m.jsxs(An.Header,{className:S,children:[j,b]}),e[10]=S,e[11]=j,e[12]=v):v=e[12];let w;e[13]!==n?(w=m.jsx(An.Content,{children:n}),e[13]=n,e[14]=w):w=e[14];let O;e[15]!==v||e[16]!==w?(O=m.jsxs(An,{children:[v,w]}),e[15]=v,e[16]=w,e[17]=O):O=e[17];let C;return e[18]!==o||e[19]!==O?(C=m.jsx(hs,{value:o,children:O}),e[18]=o,e[19]=O,e[20]=C):C=e[20],C}function tm(t){return t.startsWith("@")?t:`@${t}`}function nm(){const{org:t}=cs(),{data:e}=Ru.useSession(),n=cd(),r=gd(),i=yd(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!t||!e?.user?.id){vr.error("Not authenticated");return}const l=tm(a),c=(await Promise.all(s.map(async p=>{const y=fd(p.id,t.id);try{const x=await md(p.id,t.id,t.slug,y,{where:{appName:l}});return hd(x??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!c){vr.error(`MCP Server not found in registry: ${a}`);return}const d=pd(c,t.id,e.user.id),h=d.connection_type==="STDIO",g=!!d.connection_url,f=h&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!g&&!f){vr.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 q(t){return typeof t!="object"||t===null||typeof t.lastModified=="number"&&typeof File<"u"&&t instanceof File||typeof t.getMonth=="function"&&typeof Date<"u"&&t instanceof Date?!1:!Array.isArray(t)}function rm(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),q(t.additionalItems)}function mo(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const ot="__additional_property",tn="additionalProperties",Ot="allOf",ee="anyOf",Ne="const",$t="default",ps="dependencies",im="enum",Ae="__errors",de="$id",gs="if",an="items",sm="_$junk_option_schema_id$_",jr="$name",W="oneOf",Vi="patternProperties",se="properties",si="readonly",sl="required",Fr="submitButtonOptions",ue="$ref",Bn="__rjsf_ref",Dn="$schema",ol="root",al="_",om=["discriminator","propertyName"],ho="formContext",am="layoutGridLookupMap",ys="__rjsf_additionalProperties",ll="__rjsf_rootSchema",lm="ui:field",bs="ui:widget",vt="ui:options",qi="ui:globalOptions",cm="ui:definitions",um="https://json-schema.org/draft/2019-09/schema",Or="https://json-schema.org/draft/2020-12/schema";function B(t={},e={}){return t?Object.keys(t).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=t[r];return r===bs&&q(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===vt&&q(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function cl(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=B(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var ul=typeof global=="object"&&global&&global.Object===Object&&global,dm=typeof self=="object"&&self&&self.Object===Object&&self,nt=ul||dm||Function("return this")(),Me=nt.Symbol,dl=Object.prototype,fm=dl.hasOwnProperty,mm=dl.toString,_n=Me?Me.toStringTag:void 0;function hm(t){var e=fm.call(t,_n),n=t[_n];try{t[_n]=void 0;var r=!0}catch{}var i=mm.call(t);return r&&(e?t[_n]=n:delete t[_n]),i}var pm=Object.prototype,gm=pm.toString;function ym(t){return gm.call(t)}var bm="[object Null]",xm="[object Undefined]",po=Me?Me.toStringTag:void 0;function ct(t){return t==null?t===void 0?xm:bm:po&&po in Object(t)?hm(t):ym(t)}function fl(t,e){return function(n){return t(e(n))}}var Br=fl(Object.getPrototypeOf,Object);function Ue(t){return t!=null&&typeof t=="object"}var vm="[object Object]",Sm=Function.prototype,wm=Object.prototype,ml=Sm.toString,jm=wm.hasOwnProperty,Om=ml.call(Object);function Et(t){if(!Ue(t)||ct(t)!=vm)return!1;var e=Br(t);if(e===null)return!0;var n=jm.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ml.call(n)==Om}function zi(t){const e={[Ae]:[],addError(n){this[Ae].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:zi(r)}),e);if(Et(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:zi(n[i])}),e)}return e}var we=Array.isArray,Em="[object Symbol]";function ir(t){return typeof t=="symbol"||Ue(t)&&ct(t)==Em}var Am=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cm=/^\w*$/;function xs(t,e){if(we(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||ir(t)?!0:Cm.test(t)||!Am.test(t)||e!=null&&t in Object(e)}function ne(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var _m="[object AsyncFunction]",Im="[object Function]",Tm="[object GeneratorFunction]",Nm="[object Proxy]";function sr(t){if(!ne(t))return!1;var e=ct(t);return e==Im||e==Tm||e==_m||e==Nm}var oi=nt["__core-js_shared__"],go=(function(){var t=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Pm(t){return!!go&&go in t}var Fm=Function.prototype,$m=Fm.toString;function Bt(t){if(t!=null){try{return $m.call(t)}catch{}try{return t+""}catch{}}return""}var Dm=/[\\^$.*+?()[\]{}|]/g,Rm=/^\[object .+?Constructor\]$/,km=Function.prototype,Mm=Object.prototype,Um=km.toString,Lm=Mm.hasOwnProperty,Bm=RegExp("^"+Um.call(Lm).replace(Dm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vm(t){if(!ne(t)||Pm(t))return!1;var e=sr(t)?Bm:Rm;return e.test(Bt(t))}function qm(t,e){return t?.[e]}function Vt(t,e){var n=qm(t,e);return Vm(n)?n:void 0}var Yn=Vt(Object,"create");function zm(){this.__data__=Yn?Yn(null):{},this.size=0}function Wm(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Hm="__lodash_hash_undefined__",Km=Object.prototype,Gm=Km.hasOwnProperty;function Ym(t){var e=this.__data__;if(Yn){var n=e[t];return n===Hm?void 0:n}return Gm.call(e,t)?e[t]:void 0}var Jm=Object.prototype,Zm=Jm.hasOwnProperty;function Xm(t){var e=this.__data__;return Yn?e[t]!==void 0:Zm.call(e,t)}var Qm="__lodash_hash_undefined__";function eh(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Yn&&e===void 0?Qm:e,this}function Dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Dt.prototype.clear=zm;Dt.prototype.delete=Wm;Dt.prototype.get=Ym;Dt.prototype.has=Xm;Dt.prototype.set=eh;function th(){this.__data__=[],this.size=0}function or(t,e){return t===e||t!==t&&e!==e}function Vr(t,e){for(var n=t.length;n--;)if(or(t[n][0],e))return n;return-1}var nh=Array.prototype,rh=nh.splice;function ih(t){var e=this.__data__,n=Vr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():rh.call(e,n,1),--this.size,!0}function sh(t){var e=this.__data__,n=Vr(e,t);return n<0?void 0:e[n][1]}function oh(t){return Vr(this.__data__,t)>-1}function ah(t,e){var n=this.__data__,r=Vr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ut(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ut.prototype.clear=th;ut.prototype.delete=ih;ut.prototype.get=sh;ut.prototype.has=oh;ut.prototype.set=ah;var Jn=Vt(nt,"Map");function lh(){this.size=0,this.__data__={hash:new Dt,map:new(Jn||ut),string:new Dt}}function ch(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qr(t,e){var n=t.__data__;return ch(e)?n[typeof e=="string"?"string":"hash"]:n.map}function uh(t){var e=qr(this,t).delete(t);return this.size-=e?1:0,e}function dh(t){return qr(this,t).get(t)}function fh(t){return qr(this,t).has(t)}function mh(t,e){var n=qr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dt.prototype.clear=lh;dt.prototype.delete=uh;dt.prototype.get=dh;dt.prototype.has=fh;dt.prototype.set=mh;var hh="Expected a function";function vs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(hh);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(vs.Cache||dt),n}vs.Cache=dt;var ph=500;function gh(t){var e=vs(t,function(r){return n.size===ph&&n.clear(),r}),n=e.cache;return e}var yh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bh=/\\(\\)?/g,hl=gh(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(yh,function(n,r,i,s){e.push(i?s.replace(bh,"$1"):r||n)}),e});function yn(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var yo=Me?Me.prototype:void 0,bo=yo?yo.toString:void 0;function pl(t){if(typeof t=="string")return t;if(we(t))return yn(t,pl)+"";if(ir(t))return bo?bo.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Ss(t){return t==null?"":pl(t)}function bn(t,e){return we(t)?t:xs(t,e)?[t]:hl(Ss(t))}function At(t){if(typeof t=="string"||ir(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function zr(t,e){e=bn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[At(e[n++])];return n&&n==r?t:void 0}function D(t,e,n){var r=t==null?void 0:zr(t,e);return r===void 0?n:r}const{getOwnPropertyNames:xh,getOwnPropertySymbols:vh}=Object,{hasOwnProperty:Sh}=Object.prototype;function ai(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function pr(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(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=t(n,r,i);return s.delete(n),s.delete(r),l}}function xo(t){return xh(t).concat(vh(t))}const wh=Object.hasOwn||((t,e)=>Sh.call(t,e)),jh="__v",Oh="__o",Eh="_owner",{getOwnPropertyDescriptor:vo,keys:So}=Object,qt=Object.is||function(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n};function Ah(t,e){return t===e}function Ch(t,e){return t.byteLength===e.byteLength&&$r(new Uint8Array(t),new Uint8Array(e))}function _h(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function Ih(t,e){return t.byteLength===e.byteLength&&$r(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Th(t,e){return qt(t.getTime(),e.getTime())}function Nh(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function wo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const u=e.entries();let c=!1,d=0;for(;(a=u.next())&&!a.done;){if(i[d]){d++;continue}const h=o.value,g=a.value;if(n.equals(h[0],g[0],l,d,t,e,n)&&n.equals(h[1],g[1],h[0],g[0],t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}function Ph(t,e,n){const r=So(t);let i=r.length;if(So(e).length!==i)return!1;for(;i-- >0;)if(!gl(t,e,n,r[i]))return!1;return!0}function In(t,e,n){const r=xo(t);let i=r.length;if(xo(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!gl(t,e,n,s)||(o=vo(t,s),a=vo(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function Fh(t,e){return qt(t.valueOf(),e.valueOf())}function $h(t,e){return t.source===e.source&&t.flags===e.flags}function jo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let o,a;for(;(o=s.next())&&!o.done;){const l=e.values();let u=!1,c=0;for(;(a=l.next())&&!a.done;){if(!i[c]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function $r(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Dh(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function gl(t,e,n,r){return(r===Eh||r===Oh||r===jh)&&(t.$$typeof||e.$$typeof)?!0:wh(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const Rh=Object.prototype.toString;function kh(t){const e=Bh(t),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:u,getUnsupportedCustomComparator:c}=t;return function(h,g,f){if(h===g)return!0;if(h==null||g==null)return!1;const p=typeof h;if(p!==typeof g)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(h,g,f):p==="function"?i(h,g,f):!1;const y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return a(h,g,f);if(y===Array)return n(h,g,f);if(y===Date)return r(h,g,f);if(y===RegExp)return l(h,g,f);if(y===Map)return s(h,g,f);if(y===Set)return u(h,g,f);if(y===Promise)return!1;if(Array.isArray(h))return n(h,g,f);const x=Rh.call(h),S=e[x];if(S)return S(h,g,f);const E=c&&c(h,g,f,x);return E?E(h,g,f):!1}}function Mh({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:Ch,areArraysEqual:n?In:_h,areDataViewsEqual:Ih,areDatesEqual:Th,areErrorsEqual:Nh,areFunctionsEqual:Ah,areMapsEqual:n?ai(wo,In):wo,areNumbersEqual:qt,areObjectsEqual:n?In:Ph,arePrimitiveWrappersEqual:Fh,areRegExpsEqual:$h,areSetsEqual:n?ai(jo,In):jo,areTypedArraysEqual:n?ai($r,In):$r,areUrlsEqual:Dh,getUnsupportedCustomComparator:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=pr(r.areArraysEqual),s=pr(r.areMapsEqual),o=pr(r.areObjectsEqual),a=pr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Uh(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Lh({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:u=t?new WeakMap:void 0,meta:c}=n();return e(a,l,{cache:u,equals:r,meta:c,strict:i})};if(t)return function(a,l){return e(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 e(a,l,s)}}function Bh({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:g}){return{"[object Arguments]":l,"[object Array]":e,"[object ArrayBuffer]":t,"[object AsyncGeneratorFunction]":s,"[object BigInt]":a,"[object BigInt64Array]":h,"[object BigUint64Array]":h,"[object Boolean]":u,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":h,"[object Float32Array]":h,"[object Float64Array]":h,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":h,"[object Int16Array]":h,"[object Int32Array]":h,"[object Map]":o,"[object Number]":u,"[object Object]":(f,p,y)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,y),"[object RegExp]":c,"[object Set]":d,"[object String]":u,"[object URL]":g,"[object Uint8Array]":h,"[object Uint8ClampedArray]":h,"[object Uint16Array]":h,"[object Uint32Array]":h}}ft();ft({strict:!0});ft({circular:!0});ft({circular:!0,strict:!0});ft({createInternalComparator:()=>qt});ft({strict:!0,createInternalComparator:()=>qt});ft({circular:!0,createInternalComparator:()=>qt});ft({circular:!0,createInternalComparator:()=>qt,strict:!0});function ft(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=Mh(t),o=kh(s),a=n?n(o):Uh(o);return Lh({circular:e,comparator:o,createState:r,equals:a,strict:i})}const ie=ft({circular:!0,createCustomConfig:()=>({areFunctionsEqual(t,e){return typeof e=="function"}})});var Tn={exports:{}},li,Oo;function yl(){if(Oo)return li;Oo=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=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(b){let v="",w=0,O=0;for(O=0;O<b.length;O++)if(w=b[O].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=b[O];break}for(O+=1;O<b.length;O++){if(w=b[O].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=b[O]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(b){return b.length=0,!0}function l(b,v,w){if(b.length){const O=s(b);if(O!=="")v.push(O);else return w.error=!0,!1;b.length=0}return!0}function u(b){let v=0;const w={error:!1,address:"",zone:""},O=[],C=[];let A=!1,_=!1,I=l;for(let T=0;T<b.length;T++){const P=b[T];if(!(P==="["||P==="]"))if(P===":"){if(A===!0&&(_=!0),!I(C,O,w))break;if(++v>7){w.error=!0;break}T>0&&b[T-1]===":"&&(A=!0),O.push(":");continue}else if(P==="%"){if(!I(C,O,w))break;I=a}else{C.push(P);continue}}return C.length&&(I===a?w.zone=C.join(""):_?O.push(C.join("")):O.push(s(C))),w.address=O.join(""),w}function c(b){if(d(b,":")<2)return{host:b,isIPV6:!1};const v=u(b);if(v.error)return{host:b,isIPV6:!1};{let w=v.address,O=v.address;return v.zone&&(w+="%"+v.zone,O+="%25"+v.zone),{host:w,isIPV6:!0,escapedHost:O}}}function d(b,v){let w=0;for(let O=0;O<b.length;O++)b[O]===v&&w++;return w}function h(b){let v=b;const w=[];let O=-1,C=0;for(;C=v.length;){if(C===1){if(v===".")break;if(v==="/"){w.push("/");break}else{w.push(v);break}}else if(C===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){w.push("/");break}}else if(C===3&&v==="/.."){w.length!==0&&w.pop(),w.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),w.length!==0&&w.pop();continue}}if((O=v.indexOf("/",1))===-1){w.push(v);break}else w.push(v.slice(0,O)),v=v.slice(O)}return w.join("")}const g={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function y(b,v){const w=v?p:f;return w.lastIndex=0,b.replace(w,O=>g[O])}function x(b,v=!1){if(b.indexOf("%")===-1)return b;let w="";for(let O=0;O<b.length;O++){if(b[O]==="%"&&O+2<b.length){const C=b.slice(O+1,O+3);if(n(C)){const A=C.toUpperCase(),_=String.fromCharCode(parseInt(A,16));v&&r(_)?w+=_:w+="%"+A,O+=2;continue}}w+=b[O]}return w}function S(b){let v="";for(let w=0;w<b.length;w++){if(b[w]==="%"&&w+2<b.length){const O=b.slice(w+1,w+3);if(n(O)){const C=O.toUpperCase(),A=String.fromCharCode(parseInt(C,16));A!=="."&&r(A)?v+=A:v+="%"+C,w+=2;continue}}i(b[w])?v+=b[w]:v+=escape(b[w])}return v}function E(b){let v="";for(let w=0;w<b.length;w++){if(b[w]==="%"&&w+2<b.length){const O=b.slice(w+1,w+3);if(n(O)){v+="%"+O.toUpperCase(),w+=2;continue}}v+=escape(b[w])}return v}function j(b){const v=[];if(b.userinfo!==void 0&&(v.push(b.userinfo),v.push("@")),b.host!==void 0){let w=unescape(b.host);if(!e(w)){const O=c(w);O.isIPV6===!0?w=`[${O.escapedHost}]`:w=y(w,!1)}v.push(w)}return(typeof b.port=="number"||typeof b.port=="string")&&(v.push(":"),v.push(String(b.port))),v.length?v.join(""):void 0}return li={nonSimpleDomain:o,recomposeAuthority:j,reescapeHostDelimiters:y,normalizePercentEncoding:x,normalizePathEncoding:S,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:e,isUUID:t,normalizeIPv6:c,stringArrayToHexStripped:s},li}var ci,Eo;function Vh(){if(Eo)return ci;Eo=1;const{isUUID:t}=yl(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(b){return n.indexOf(b)!==-1}function i(b){return b.secure===!0?!0:b.secure===!1?!1:b.scheme?b.scheme.length===3&&(b.scheme[0]==="w"||b.scheme[0]==="W")&&(b.scheme[1]==="s"||b.scheme[1]==="S")&&(b.scheme[2]==="s"||b.scheme[2]==="S"):!1}function s(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function o(b){const v=String(b.scheme).toLowerCase()==="https";return(b.port===(v?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function a(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function l(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){const[v,w]=b.resourceName.split("?");b.path=v&&v!=="/"?v:void 0,b.query=w,b.resourceName=void 0}return b.fragment=void 0,b}function u(b,v){if(!b.path)return b.error="URN can not be parsed",b;const w=b.path.match(e);if(w){const O=v.scheme||b.scheme||"urn";b.nid=w[1].toLowerCase(),b.nss=w[2];const C=`${O}:${v.nid||b.nid}`,A=j(C);b.path=void 0,A&&(b=A.parse(b,v))}else b.error=b.error||"URN can not be parsed.";return b}function c(b,v){if(b.nid===void 0)throw new Error("URN without nid cannot be serialized");const w=v.scheme||b.scheme||"urn",O=b.nid.toLowerCase(),C=`${w}:${v.nid||O}`,A=j(C);A&&(b=A.serialize(b,v));const _=b,I=b.nss;return _.path=`${O||v.nid}:${I}`,v.skipEscape=!0,_}function d(b,v){const w=b;return w.uuid=w.nss,w.nss=void 0,!v.tolerant&&(!w.uuid||!t(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function h(b){const v=b;return v.nss=(b.uuid||"").toLowerCase(),v}const g={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:g.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},y={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},E={http:g,https:f,ws:p,wss:y,urn:{scheme:"urn",parse:u,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(E,null);function j(b){return b&&(E[b]||E[b.toLowerCase()])||void 0}return ci={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:j},ci}var Ao;function qh(){if(Ao)return Tn.exports;Ao=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=yl(),{SCHEMES:u,getSchemeHandler:c}=Vh();function d(O,C){return typeof O=="string"?O=j(O,C):typeof O=="object"&&(O=E(p(O,C),C)),O}function h(O,C,A){const _=A?Object.assign({scheme:"null"},A):{scheme:"null"},I=g(E(O,_),E(C,_),_,!0);return _.skipEscape=!0,p(I,_)}function g(O,C,A,_){const I={};return _||(O=E(p(O,A),A),C=E(p(C,A),A)),A=A||{},!A.tolerant&&C.scheme?(I.scheme=C.scheme,I.userinfo=C.userinfo,I.host=C.host,I.port=C.port,I.path=e(C.path||""),I.query=C.query):(C.userinfo!==void 0||C.host!==void 0||C.port!==void 0?(I.userinfo=C.userinfo,I.host=C.host,I.port=C.port,I.path=e(C.path||""),I.query=C.query):(C.path?(C.path[0]==="/"?I.path=e(C.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?I.path="/"+C.path:O.path?I.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+C.path:I.path=C.path,I.path=e(I.path)),I.query=C.query):(I.path=O.path,C.query!==void 0?I.query=C.query:I.query=O.query),I.userinfo=O.userinfo,I.host=O.host,I.port=O.port),I.scheme=O.scheme),I.fragment=C.fragment,I}function f(O,C,A){const _=v(O,A),I=v(C,A);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(O,C){const A={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},_=Object.assign({},C),I=[],T=c(_.scheme||A.scheme);T&&T.serialize&&T.serialize(A,_),A.path!==void 0&&(_.skipEscape?A.path=r(A.path):(A.path=s(A.path),A.scheme!==void 0&&(A.path=A.path.split("%3A").join(":")))),_.reference!=="suffix"&&A.scheme&&I.push(A.scheme,":");const P=n(A);if(P!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(P),A.path&&A.path[0]!=="/"&&I.push("/")),A.path!==void 0){let F=A.path;!_.absolutePath&&(!T||!T.absolutePath)&&(F=e(F)),P===void 0&&F[0]==="/"&&F[1]==="/"&&(F="/%2F"+F.slice(2)),I.push(F)}return A.query!==void 0&&I.push("?",A.query),A.fragment!==void 0&&I.push("#",A.fragment),I.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function x(O,C){if(C[2]!==void 0&&O.path&&O.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof O.port=="number"&&(O.port<0||O.port>65535))return"URI port is malformed."}function S(O,C){const A=Object.assign({},C),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;A.reference==="suffix"&&(A.scheme?O=A.scheme+":"+O:O="//"+O);const P=O.match(y);if(P){_.scheme=P[1],_.userinfo=P[3],_.host=P[4],_.port=parseInt(P[5],10),_.path=P[6]||"",_.query=P[7],_.fragment=P[8],isNaN(_.port)&&(_.port=P[5]);const F=x(_,P);if(F!==void 0&&(_.error=_.error||F,I=!0),_.host)if(a(_.host)===!1){const M=t(_.host);_.host=M.host.toLowerCase(),T=M.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",A.reference&&A.reference!=="suffix"&&A.reference!==_.reference&&(_.error=_.error||"URI is not a "+A.reference+" reference.");const $=c(A.scheme||_.scheme);if(!A.unicodeSupport&&(!$||!$.unicodeSupport)&&_.host&&(A.domainHost||$&&$.domainHost)&&T===!1&&l(_.host))try{_.host=new URL("http://"+_.host).hostname}catch(k){_.error=_.error||"Host's domain name can not be converted to ASCII: "+k}if((!$||$&&!$.skipNormalize)&&(O.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"}$&&$.parse&&$.parse(_,A)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function E(O,C){return S(O,C).parsed}function j(O,C){return b(O,C).normalized}function b(O,C){const{parsed:A,malformedAuthorityOrPort:_}=S(O,C);return{normalized:_?O:p(A,C),malformedAuthorityOrPort:_}}function v(O,C){if(typeof O=="string"){const{normalized:A,malformedAuthorityOrPort:_}=b(O,C);return _?void 0:A}if(typeof O=="object")return p(O,C)}const w={SCHEMES:u,normalize:d,resolve:h,resolveComponent:g,equal:f,serialize:p,parse:E};return Tn.exports=w,Tn.exports.default=w,Tn.exports.fastUri=w,Tn.exports}var zh=qh();const ws=us(zh);var Nn={},Co;function Wh(){if(Co)return Nn;Co=1;var t=/~/,e=/~[01]/g;function n(u){switch(u){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+u)}function r(u){return t.test(u)?u.replace(e,n):u}function i(u,c,d){for(var h,g,f=1,p=c.length;f<p;){if(c[f]==="constructor"||c[f]==="prototype"||c[f]==="__proto__")return u;if(h=r(c[f++]),g=p>f,typeof u[h]>"u"&&(Array.isArray(u)&&h==="-"&&(h=u.length),g&&(c[f]!==""&&c[f]<1/0||c[f]==="-"?u[h]=[]:u[h]={})),!g)break;u=u[h]}var y=u[h];return d===void 0?delete u[h]:u[h]=d,y}function s(u){if(typeof u=="string"){if(u=u.split("/"),u[0]==="")return u;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(u)){for(const c of u)if(typeof c!="string"&&typeof c!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return u}throw new Error("Invalid JSON pointer.")}function o(u,c){if(typeof u!="object")throw new Error("Invalid input object.");c=s(c);var d=c.length;if(d===1)return u;for(var h=1;h<d;){if(u=u[r(c[h++])],d===h)return u;if(typeof u!="object"||u===null)return}}function a(u,c,d){if(typeof u!="object")throw new Error("Invalid input object.");if(c=s(c),c.length===0)throw new Error("Invalid JSON pointer for set.");return i(u,c,d)}function l(u){var c=s(u);return{get:function(d){return o(d,c)},set:function(d,h){return a(d,c,h)}}}return Nn.get=o,Nn.set=a,Nn.compile=l,Nn}var Hh=Wh();const ui=us(Hh);var Kh=Object.prototype;function Wr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Kh;return t===n}var Gh=fl(Object.keys,Object),Yh=Object.prototype,Jh=Yh.hasOwnProperty;function bl(t){if(!Wr(t))return Gh(t);var e=[];for(var n in Object(t))Jh.call(t,n)&&n!="constructor"&&e.push(n);return e}var Wi=Vt(nt,"DataView"),Hi=Vt(nt,"Promise"),on=Vt(nt,"Set"),Ki=Vt(nt,"WeakMap"),_o="[object Map]",Zh="[object Object]",Io="[object Promise]",To="[object Set]",No="[object WeakMap]",Po="[object DataView]",Xh=Bt(Wi),Qh=Bt(Jn),ep=Bt(Hi),tp=Bt(on),np=Bt(Ki),Re=ct;(Wi&&Re(new Wi(new ArrayBuffer(1)))!=Po||Jn&&Re(new Jn)!=_o||Hi&&Re(Hi.resolve())!=Io||on&&Re(new on)!=To||Ki&&Re(new Ki)!=No)&&(Re=function(t){var e=ct(t),n=e==Zh?t.constructor:void 0,r=n?Bt(n):"";if(r)switch(r){case Xh:return Po;case Qh:return _o;case ep:return Io;case tp:return To;case np:return No}return e});var rp="[object Arguments]";function Fo(t){return Ue(t)&&ct(t)==rp}var xl=Object.prototype,ip=xl.hasOwnProperty,sp=xl.propertyIsEnumerable,ln=Fo((function(){return arguments})())?Fo:function(t){return Ue(t)&&ip.call(t,"callee")&&!sp.call(t,"callee")},op=9007199254740991;function js(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=op}function zt(t){return t!=null&&js(t.length)&&!sr(t)}function ap(){return!1}var vl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$o=vl&&typeof module=="object"&&module&&!module.nodeType&&module,lp=$o&&$o.exports===vl,Do=lp?nt.Buffer:void 0,cp=Do?Do.isBuffer:void 0,Rt=cp||ap,up="[object Arguments]",dp="[object Array]",fp="[object Boolean]",mp="[object Date]",hp="[object Error]",pp="[object Function]",gp="[object Map]",yp="[object Number]",bp="[object Object]",xp="[object RegExp]",vp="[object Set]",Sp="[object String]",wp="[object WeakMap]",jp="[object ArrayBuffer]",Op="[object DataView]",Ep="[object Float32Array]",Ap="[object Float64Array]",Cp="[object Int8Array]",_p="[object Int16Array]",Ip="[object Int32Array]",Tp="[object Uint8Array]",Np="[object Uint8ClampedArray]",Pp="[object Uint16Array]",Fp="[object Uint32Array]",he={};he[Ep]=he[Ap]=he[Cp]=he[_p]=he[Ip]=he[Tp]=he[Np]=he[Pp]=he[Fp]=!0;he[up]=he[dp]=he[jp]=he[fp]=he[Op]=he[mp]=he[hp]=he[pp]=he[gp]=he[yp]=he[bp]=he[xp]=he[vp]=he[Sp]=he[wp]=!1;function $p(t){return Ue(t)&&js(t.length)&&!!he[ct(t)]}function Os(t){return function(e){return t(e)}}var Sl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=Sl&&typeof module=="object"&&module&&!module.nodeType&&module,Dp=Vn&&Vn.exports===Sl,di=Dp&&ul.process,cn=(function(){try{var t=Vn&&Vn.require&&Vn.require("util").types;return t||di&&di.binding&&di.binding("util")}catch{}})(),Ro=cn&&cn.isTypedArray,ar=Ro?Os(Ro):$p,Rp="[object Map]",kp="[object Set]",Mp=Object.prototype,Up=Mp.hasOwnProperty;function ge(t){if(t==null)return!0;if(zt(t)&&(we(t)||typeof t=="string"||typeof t.splice=="function"||Rt(t)||ar(t)||ln(t)))return!t.length;var e=Re(t);if(e==Rp||e==kp)return!t.size;if(Wr(t))return!bl(t).length;for(var n in t)if(Up.call(t,n))return!1;return!0}function Lp(){this.__data__=new ut,this.size=0}function Bp(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Vp(t){return this.__data__.get(t)}function qp(t){return this.__data__.has(t)}var zp=200;function Wp(t,e){var n=this.__data__;if(n instanceof ut){var r=n.__data__;if(!Jn||r.length<zp-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new dt(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new ut(t);this.size=e.size}We.prototype.clear=Lp;We.prototype.delete=Bp;We.prototype.get=Vp;We.prototype.has=qp;We.prototype.set=Wp;function Es(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Dr=(function(){try{var t=Vt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function As(t,e,n){e=="__proto__"&&Dr?Dr(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Hp=Object.prototype,Kp=Hp.hasOwnProperty;function Cs(t,e,n){var r=t[e];(!(Kp.call(t,e)&&or(r,n))||n===void 0&&!(e in t))&&As(t,e,n)}function xn(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?As(n,a,l):Cs(n,a,l)}return n}function wl(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Gp=9007199254740991,Yp=/^(?:0|[1-9]\d*)$/;function Hr(t,e){var n=typeof t;return e=e??Gp,!!e&&(n=="number"||n!="symbol"&&Yp.test(t))&&t>-1&&t%1==0&&t<e}var Jp=Object.prototype,Zp=Jp.hasOwnProperty;function jl(t,e){var n=we(t),r=!n&&ln(t),i=!n&&!r&&Rt(t),s=!n&&!r&&!i&&ar(t),o=n||r||i||s,a=o?wl(t.length,String):[],l=a.length;for(var u in t)(e||Zp.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Hr(u,l)))&&a.push(u);return a}function ze(t){return zt(t)?jl(t):bl(t)}function Xp(t,e){return t&&xn(e,ze(e),t)}function Qp(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var eg=Object.prototype,tg=eg.hasOwnProperty;function ng(t){if(!ne(t))return Qp(t);var e=Wr(t),n=[];for(var r in t)r=="constructor"&&(e||!tg.call(t,r))||n.push(r);return n}function lr(t){return zt(t)?jl(t,!0):ng(t)}function rg(t,e){return t&&xn(e,lr(e),t)}var Ol=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ko=Ol&&typeof module=="object"&&module&&!module.nodeType&&module,ig=ko&&ko.exports===Ol,Mo=ig?nt.Buffer:void 0,Uo=Mo?Mo.allocUnsafe:void 0;function El(t,e){if(e)return t.slice();var n=t.length,r=Uo?Uo(n):new t.constructor(n);return t.copy(r),r}function _s(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function sg(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Al(){return[]}var og=Object.prototype,ag=og.propertyIsEnumerable,Lo=Object.getOwnPropertySymbols,Is=Lo?function(t){return t==null?[]:(t=Object(t),sg(Lo(t),function(e){return ag.call(t,e)}))}:Al;function lg(t,e){return xn(t,Is(t),e)}function Ts(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var cg=Object.getOwnPropertySymbols,Cl=cg?function(t){for(var e=[];t;)Ts(e,Is(t)),t=Br(t);return e}:Al;function ug(t,e){return xn(t,Cl(t),e)}function _l(t,e,n){var r=e(t);return we(t)?r:Ts(r,n(t))}function Gi(t){return _l(t,ze,Is)}function Ns(t){return _l(t,lr,Cl)}var dg=Object.prototype,fg=dg.hasOwnProperty;function mg(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&fg.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Rr=nt.Uint8Array;function Ps(t){var e=new t.constructor(t.byteLength);return new Rr(e).set(new Rr(t)),e}function hg(t,e){var n=e?Ps(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var pg=/\w*$/;function gg(t){var e=new t.constructor(t.source,pg.exec(t));return e.lastIndex=t.lastIndex,e}var Bo=Me?Me.prototype:void 0,Vo=Bo?Bo.valueOf:void 0;function yg(t){return Vo?Object(Vo.call(t)):{}}function Il(t,e){var n=e?Ps(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var bg="[object Boolean]",xg="[object Date]",vg="[object Map]",Sg="[object Number]",wg="[object RegExp]",jg="[object Set]",Og="[object String]",Eg="[object Symbol]",Ag="[object ArrayBuffer]",Cg="[object DataView]",_g="[object Float32Array]",Ig="[object Float64Array]",Tg="[object Int8Array]",Ng="[object Int16Array]",Pg="[object Int32Array]",Fg="[object Uint8Array]",$g="[object Uint8ClampedArray]",Dg="[object Uint16Array]",Rg="[object Uint32Array]";function kg(t,e,n){var r=t.constructor;switch(e){case Ag:return Ps(t);case bg:case xg:return new r(+t);case Cg:return hg(t,n);case _g:case Ig:case Tg:case Ng:case Pg:case Fg:case $g:case Dg:case Rg:return Il(t,n);case vg:return new r;case Sg:case Og:return new r(t);case wg:return gg(t);case jg:return new r;case Eg:return yg(t)}}var qo=Object.create,Tl=(function(){function t(){}return function(e){if(!ne(e))return{};if(qo)return qo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Nl(t){return typeof t.constructor=="function"&&!Wr(t)?Tl(Br(t)):{}}var Mg="[object Map]";function Ug(t){return Ue(t)&&Re(t)==Mg}var zo=cn&&cn.isMap,Lg=zo?Os(zo):Ug,Bg="[object Set]";function Vg(t){return Ue(t)&&Re(t)==Bg}var Wo=cn&&cn.isSet,qg=Wo?Os(Wo):Vg,zg=1,Wg=2,Hg=4,Pl="[object Arguments]",Kg="[object Array]",Gg="[object Boolean]",Yg="[object Date]",Jg="[object Error]",Fl="[object Function]",Zg="[object GeneratorFunction]",Xg="[object Map]",Qg="[object Number]",$l="[object Object]",ey="[object RegExp]",ty="[object Set]",ny="[object String]",ry="[object Symbol]",iy="[object WeakMap]",sy="[object ArrayBuffer]",oy="[object DataView]",ay="[object Float32Array]",ly="[object Float64Array]",cy="[object Int8Array]",uy="[object Int16Array]",dy="[object Int32Array]",fy="[object Uint8Array]",my="[object Uint8ClampedArray]",hy="[object Uint16Array]",py="[object Uint32Array]",me={};me[Pl]=me[Kg]=me[sy]=me[oy]=me[Gg]=me[Yg]=me[ay]=me[ly]=me[cy]=me[uy]=me[dy]=me[Xg]=me[Qg]=me[$l]=me[ey]=me[ty]=me[ny]=me[ry]=me[fy]=me[my]=me[hy]=me[py]=!0;me[Jg]=me[Fl]=me[iy]=!1;function qn(t,e,n,r,i,s){var o,a=e&zg,l=e&Wg,u=e&Hg;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!ne(t))return t;var c=we(t);if(c){if(o=mg(t),!a)return _s(t,o)}else{var d=Re(t),h=d==Fl||d==Zg;if(Rt(t))return El(t,a);if(d==$l||d==Pl||h&&!i){if(o=l||h?{}:Nl(t),!a)return l?ug(t,rg(o,t)):lg(t,Xp(o,t))}else{if(!me[d])return i?t:{};o=kg(t,d,a)}}s||(s=new We);var g=s.get(t);if(g)return g;s.set(t,o),qg(t)?t.forEach(function(y){o.add(qn(y,e,n,y,t,s))}):Lg(t)&&t.forEach(function(y,x){o.set(x,qn(y,e,n,x,t,s))});var f=u?l?Ns:Gi:l?lr:ze,p=c?void 0:f(t);return Es(p||t,function(y,x){p&&(x=y,y=t[x]),Cs(o,x,qn(y,e,n,x,t,s))}),o}function Dl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function gy(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function yy(t,e){return e.length<2?t:zr(t,gy(e,0,-1))}var by=Object.prototype,xy=by.hasOwnProperty;function Rl(t,e){e=bn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=At(e[n]);if(i==="__proto__"&&!xy.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=yy(t,e);return s==null||delete s[At(Dl(e))]}function vy(t){return Et(t)?void 0:t}var Ho=Me?Me.isConcatSpreadable:void 0;function Sy(t){return we(t)||ln(t)||!!(Ho&&t&&t[Ho])}function cr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=Sy),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?cr(a,e-1,n,r,i):Ts(i,a):r||(i[i.length]=a)}return i}function Yi(t){var e=t==null?0:t.length;return e?cr(t,1):[]}function wy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var Ko=Math.max;function kl(t,e,n){return e=Ko(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Ko(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),wy(t,this,a)}}function jy(t){return function(){return t}}function Kr(t){return t}var Oy=Dr?function(t,e){return Dr(t,"toString",{configurable:!0,enumerable:!1,value:jy(e),writable:!0})}:Kr,Ey=800,Ay=16,Cy=Date.now;function _y(t){var e=0,n=0;return function(){var r=Cy(),i=Ay-(r-n);if(n=r,i>0){if(++e>=Ey)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Ml=_y(Oy);function Ul(t){return Ml(kl(t,void 0,Yi),t+"")}var Iy=1,Ty=2,Ny=4,un=Ul(function(t,e){var n={};if(t==null)return n;var r=!1;e=yn(e,function(s){return s=bn(s,t),r||(r=s.length>1),s}),xn(t,Ns(t),n),r&&(n=qn(n,Iy|Ty|Ny,vy));for(var i=e.length;i--;)Rl(n,e[i]);return n});function kr(t,e){if(de in t&&ws.equal(t[de],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(ne(r)){const i=kr(r,e);if(i!==void 0)return i}}else if(ne(n)){const r=kr(n,e);if(r!==void 0)return r}}function Ji(t,e){const n=D(t,de,e);let r=t;ue in r&&(r={...r,[ue]:ws.resolve(n,r[ue])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>ne(o)?Ji(o,n):o)}:ne(s)&&(r={...r,[i]:Ji(s,n)});return r}function Fs(t,e){const n=e[t];return[un(e,[t]),n]}function Ll(t,e={},n=[],r=D(e,[de])){const i=t||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||de in e&&e[de]===o?s=ui.get(e,l):e[Dn]===Or&&(s=kr(e,o.replace(/\/$/,"")),s!==void 0&&(s=ui.get(s,l)))}else if(e[Dn]===Or){const l=o?ws.resolve(o,i):i,[u,...c]=l.replace(/#\/?$/,"").split("#");s=kr(e,u.replace(/\/$/,"")),s!==void 0&&(o=s[de],ge(c)||(s=ui.get(s,decodeURIComponent(c.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const a=s[ue];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...h]=n,g=[...h,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${g}`)}const[l,u]=Fs(ue,s),c=Ll(u,e,[...n,i],o);return Object.keys(l).length>0?e[Dn]===um||e[Dn]===Or?{[Ot]:[l,c]}:{...l,...c}:c}return s}function Zn(t,e={},n=D(e,[de])){return Ll(t,e,[],n)}var Py=Object.prototype,Fy=Py.hasOwnProperty;function $y(t,e){return t!=null&&Fy.call(t,e)}function Bl(t,e,n){e=bn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=At(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&js(i)&&Hr(o,i)&&(we(t)||ln(t)))}function X(t,e){return t!=null&&Bl(t,e,$y)}var Dy="[object String]";function Ct(t){return typeof t=="string"||!we(t)&&Ue(t)&&ct(t)==Dy}function He(t){let e;const n=D(t,om);return Ct(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}var Ry=1/0;function ky(t){var e=t==null?0:t.length;return e?cr(t,Ry):[]}function Zi(t,e,n){(n!==void 0&&!or(t[e],n)||n===void 0&&!(e in t))&&As(t,e,n)}function My(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var Vl=My();function Xn(t){return Ue(t)&&zt(t)}function Xi(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Uy(t){return xn(t,lr(t))}function Ly(t,e,n,r,i,s,o){var a=Xi(t,n),l=Xi(e,n),u=o.get(l);if(u){Zi(t,n,u);return}var c=s?s(a,l,n+"",t,e,o):void 0,d=c===void 0;if(d){var h=we(l),g=!h&&Rt(l),f=!h&&!g&&ar(l);c=l,h||g||f?we(a)?c=a:Xn(a)?c=_s(a):g?(d=!1,c=El(l,!0)):f?(d=!1,c=Il(l,!0)):c=[]:Et(l)||ln(l)?(c=a,ln(a)?c=Uy(a):(!ne(a)||sr(a))&&(c=Nl(l))):d=!1}d&&(o.set(l,c),i(c,l,r,s,o),o.delete(l)),Zi(t,n,c)}function ql(t,e,n,r,i){t!==e&&Vl(e,function(s,o){if(i||(i=new We),ne(s))Ly(t,e,o,n,ql,r,i);else{var a=r?r(Xi(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Zi(t,o,a)}},lr)}function Gr(t,e){return Ml(kl(t,e,Kr),t+"")}function By(t,e,n){if(!ne(n))return!1;var r=typeof e;return(r=="number"?zt(n)&&Hr(e,n.length):r=="string"&&e in n)?or(n[e],t):!1}function Vy(t){return Gr(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&By(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var qy=Vy(function(t,e,n){ql(t,e,n)});function $s(t,e,n,r){if(!ne(t))return t;e=bn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=At(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var c=a[l];u=r?r(c,l,a):void 0,u===void 0&&(u=ne(c)?c:Hr(e[i+1])?[]:{})}Cs(a,l,u),a=a[l]}return t}function ce(t,e,n){return t==null?t:$s(t,e,n)}function zl(t){return typeof t=="function"?t:Kr}var zy=/\s/;function Wy(t){for(var e=t.length;e--&&zy.test(t.charAt(e)););return e}var Hy=/^\s+/;function Ky(t){return t&&t.slice(0,Wy(t)+1).replace(Hy,"")}var Go=NaN,Gy=/^[-+]0x[0-9a-f]+$/i,Yy=/^0b[01]+$/i,Jy=/^0o[0-7]+$/i,Zy=parseInt;function Xy(t){if(typeof t=="number")return t;if(ir(t))return Go;if(ne(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ne(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ky(t);var n=Yy.test(t);return n||Jy.test(t)?Zy(t.slice(2),n?2:8):Gy.test(t)?Go:+t}var Yo=1/0,Qy=17976931348623157e292;function eb(t){if(!t)return t===0?t:0;if(t=Xy(t),t===Yo||t===-Yo){var e=t<0?-1:1;return e*Qy}return t===t?t:0}function Wl(t){var e=eb(t),n=e%1;return e===e?n?e-n:e:0}var tb=9007199254740991,fi=4294967295,nb=Math.min;function Hl(t,e){if(t=Wl(t),t<1||t>tb)return[];var n=fi,r=nb(t,fi);e=zl(e),t-=fi;for(var i=wl(r,e);++n<t;)e(n);return i}function Kl(t,e){return t&&Vl(t,e,ze)}var rb="__lodash_hash_undefined__";function ib(t){return this.__data__.set(t,rb),this}function sb(t){return this.__data__.has(t)}function kt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new dt;++e<n;)this.add(t[e])}kt.prototype.add=kt.prototype.push=ib;kt.prototype.has=sb;function ob(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Qn(t,e){return t.has(e)}var ab=1,lb=2;function Gl(t,e,n,r,i,s){var o=n&ab,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var d=-1,h=!0,g=n&lb?new kt:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var f=t[d],p=e[d];if(r)var y=o?r(p,f,d,e,t,s):r(f,p,d,t,e,s);if(y!==void 0){if(y)continue;h=!1;break}if(g){if(!ob(e,function(x,S){if(!Qn(g,S)&&(f===x||i(f,x,n,r,s)))return g.push(S)})){h=!1;break}}else if(!(f===p||i(f,p,n,r,s))){h=!1;break}}return s.delete(t),s.delete(e),h}function cb(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Ds(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var ub=1,db=2,fb="[object Boolean]",mb="[object Date]",hb="[object Error]",pb="[object Map]",gb="[object Number]",yb="[object RegExp]",bb="[object Set]",xb="[object String]",vb="[object Symbol]",Sb="[object ArrayBuffer]",wb="[object DataView]",Jo=Me?Me.prototype:void 0,mi=Jo?Jo.valueOf:void 0;function jb(t,e,n,r,i,s,o){switch(n){case wb:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Sb:return!(t.byteLength!=e.byteLength||!s(new Rr(t),new Rr(e)));case fb:case mb:case gb:return or(+t,+e);case hb:return t.name==e.name&&t.message==e.message;case yb:case xb:return t==e+"";case pb:var a=cb;case bb:var l=r&ub;if(a||(a=Ds),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=db,o.set(t,e);var c=Gl(a(t),a(e),r,i,s,o);return o.delete(t),c;case vb:if(mi)return mi.call(t)==mi.call(e)}return!1}var Ob=1,Eb=Object.prototype,Ab=Eb.hasOwnProperty;function Cb(t,e,n,r,i,s){var o=n&Ob,a=Gi(t),l=a.length,u=Gi(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:Ab.call(e,h)))return!1}var g=s.get(t),f=s.get(e);if(g&&f)return g==e&&f==t;var p=!0;s.set(t,e),s.set(e,t);for(var y=o;++d<l;){h=a[d];var x=t[h],S=e[h];if(r)var E=o?r(S,x,h,e,t,s):r(x,S,h,t,e,s);if(!(E===void 0?x===S||i(x,S,n,r,s):E)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var j=t.constructor,b=e.constructor;j!=b&&"constructor"in t&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof b=="function"&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(e),p}var _b=1,Zo="[object Arguments]",Xo="[object Array]",gr="[object Object]",Ib=Object.prototype,Qo=Ib.hasOwnProperty;function Tb(t,e,n,r,i,s){var o=we(t),a=we(e),l=o?Xo:Re(t),u=a?Xo:Re(e);l=l==Zo?gr:l,u=u==Zo?gr:u;var c=l==gr,d=u==gr,h=l==u;if(h&&Rt(t)){if(!Rt(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new We),o||ar(t)?Gl(t,e,n,r,i,s):jb(t,e,l,n,r,i,s);if(!(n&_b)){var g=c&&Qo.call(t,"__wrapped__"),f=d&&Qo.call(e,"__wrapped__");if(g||f){var p=g?t.value():t,y=f?e.value():e;return s||(s=new We),i(p,y,n,r,s)}}return h?(s||(s=new We),Cb(t,e,n,r,i,s)):!1}function Yr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ue(t)&&!Ue(e)?t!==t&&e!==e:Tb(t,e,n,r,Yr,i)}var Nb=1,Pb=2;function Fb(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],u=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var c=new We,d;if(!(d===void 0?Yr(u,l,Nb|Pb,r,c):d))return!1}}return!0}function Yl(t){return t===t&&!ne(t)}function $b(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Yl(i)]}return e}function Jl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Db(t){var e=$b(t);return e.length==1&&e[0][2]?Jl(e[0][0],e[0][1]):function(n){return n===t||Fb(n,t,e)}}function Rb(t,e){return t!=null&&e in Object(t)}function Zl(t,e){return t!=null&&Bl(t,e,Rb)}var kb=1,Mb=2;function Ub(t,e){return xs(t)&&Yl(e)?Jl(At(t),e):function(n){var r=D(n,t);return r===void 0&&r===e?Zl(n,t):Yr(e,r,kb|Mb)}}function Lb(t){return function(e){return e?.[t]}}function Bb(t){return function(e){return zr(e,t)}}function Vb(t){return xs(t)?Lb(At(t)):Bb(t)}function Rs(t){return typeof t=="function"?t:t==null?Kr:typeof t=="object"?we(t)?Ub(t[0],t[1]):Db(t):Vb(t)}function qb(t,e,n){var r=we(t),i=r||Rt(t)||ar(t);if(e=Rs(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:ne(t)?n=sr(s)?Tl(Br(t)):{}:n={}}return(i?Es:Kl)(t,function(o,a,l){return e(n,o,a,l)}),n}function zb(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Wb(t){return t!==t}function Hb(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Xl(t,e,n){return e===e?Hb(t,e,n):zb(t,Wb,n)}function ks(t,e){var n=t==null?0:t.length;return!!n&&Xl(t,e,0)>-1}function Er(){}var Kb=1/0,Gb=on&&1/Ds(new on([,-0]))[1]==Kb?function(t){return new on(t)}:Er,Yb=200;function Ql(t,e,n){var r=-1,i=ks,s=t.length,o=!0,a=[],l=a;if(s>=Yb){var u=Gb(t);if(u)return Ds(u);o=!1,i=Qn,l=new kt}else l=a;e:for(;++r<s;){var c=t[r],d=c;if(c=c!==0?c:0,o&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function ec(t){return t&&t.length?Ql(t):[]}function er(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":typeof t=="number"&&!Number.isNaN(t)?"number":typeof t=="object"?"object":"string"}var Jb=Gr(function(t){return Ql(cr(t,1,Xn,!0))});function Le(t){let{type:e}=t;return!e&&t.const?er(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties||t.patternProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(n=>n!=="null"):e=e[0]),e)}function at(t,e){const n={...t};return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];return t&&i in t&&q(o)?r[i]=at(s,o):t&&e&&(Le(t)==="object"||Le(e)==="object")&&i===sl&&Array.isArray(s)&&Array.isArray(o)?r[i]=Jb(s,o):r[i]=o,r},n)}var Zb="[object Number]";function tc(t){return typeof t=="number"||Ue(t)&&ct(t)==Zb}function nc(t,e,n){var r;if(t&&n){const i=D(t,n);if(i===void 0)return;for(let s=0;s<e.length;s+=1){const o=e[s],a=D(o,[se,n],{});if(a.type!=="object"&&a.type!=="array"&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Mr(t,e,n,r,i){if(e===void 0)return 0;const s=nc(e,n,i);if(tc(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&X(a,[se,i])){const l=D(e,i),u=D(a,[se,i],{});if(t.isValid(u,l,r))return o}else if(a[se]){const l={anyOf:Object.keys(a[se]).map(c=>({required:[c]}))};let u;if(a.anyOf){const{...c}=a;c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u={...a,...l};if(delete u.required,t.isValid(u,e,r))return o}else if(t.isValid(a,e,r))return o}return 0}const Xb=Object.prototype;function Rn(t){for(const e in t)if(Xb.hasOwnProperty.call(t,e))return!1;return!0}const Qb=["array","boolean","integer","null","number","object","string"];new Set(Qb);const e0=["$defs","definitions","properties","patternProperties","dependencies"];new Set(e0);const t0=["items","allOf","oneOf","anyOf"];new Set(t0);const n0=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(n0);function Ar(t){return typeof t=="object"}function Ye(t){return Ar(t)?Rn(t):t===!0}function nn(t,e){return t<e?-1:t>e?1:0}function hi(t,e){const n=t.length;if(n===0)return e;let r=e.length;if(r===0)return t;if(n<r){const s=t;t=e,e=s,r=n}const i=new Set(t);for(let s=0;s<r;s++)i.add(e[s]);return Array.from(i)}function r0(t,e){const n=[];if(t.length===0||e.length===0)return n;if(t.length>e.length){const i=t;t=e,e=i}const r=new Set(e);for(let i=0;i<t.length&&r.size>0;i++){const s=t[i];r.delete(s)&&n.push(s)}return n}function ea(t){return t.length===0}function pi(t){return(e,n)=>{const r=e.length-n.length;if(r!==0)return r;for(let i=0;i<e.length;i++)if(e[i]!==n[i]){const s=t(e[i],n[i]);if(s!==0)return s}return 0}}function rc(t,{threshold:e=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=e){const o=[];let a=0;e:for(let l=0;l<r;l++){const u=n[l];for(let c=0;c<a;c++)if(t(u,o[c])===0)continue e;a=o.push(u)}return o}const i=n.slice().sort(t);let s=0;for(let o=1;o<r;o++)t(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function i0(t){return(e,n)=>{const r=[];let i=e.length,s=n.length;if(i===0||s===0)return r;if(i>s){const c=e;e=n,n=c;const d=i;i=s,s=d}const o=[...e].sort(t),a=[...n].sort(t);let l=0,u=0;for(;l<i&&u<s;){const c=t(o[l],a[u]);c===0?((r.length===0||t(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,u++):c<0?l++:u++}return r}}function s0(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const ta=s0,ic=()=>0,o0=t=>t===void 0,a0=t=>typeof t!="object",na={boolean:0,number:1,string:2};function l0(t,e){const n=typeof t,r=typeof e;return n===r?nn(t,e):na[n]-na[r]}function c0(t,e){const n=t.length;if(n===0)return e;const r=e.length;if(r===0)return t;if(r>n){const o=t;t=e,e=o}const i=new Set(t),s=e.length;for(let o=0;o<s;o++){const a=e[o];i.has(a)||t.push(a)}return t}function Jr(t,e,n=ic){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function Xt(t){return Jr(o0,t)}function pt(t,e){return Jr(n=>n===void 0||t(n),e)}function gi(t,e){return Jr(Array.isArray,t,e)}const be=Xt(nn),yi=pt(t=>t===0,(t,e)=>t-e);function u0({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=ta(e,p=>Object.keys(p).sort());function r(p){return(y,x)=>{const S=n(y),E=n(x),j=Math.min(S.length,E.length);for(let b=0;b<j;b++){const v=nn(S[b],E[b]);if(v!==0)return v}if(S.length!==E.length)return S.length-E.length;for(let b=0;b<j;b++){const v=S[b],w=p(y[v],x[v]);if(w!==0)return w}return 0}}function i(p){const y=pi(p),x=ta(t,rc(p,{threshold:0}));return(S,E)=>y(x(S),x(E))}const s=i(nn);function o(p,y){if(Ar(p)){if(Ar(y)){const x=Object.keys(p),S=Object.keys(y),E=c0(x,S),j=E.length;for(let b=0;b<j;b++){const v=E[b];if(p[v]===y[v])continue;const O=(f[v]??a)(p[v],y[v]);if(O!==0)return O}return 0}return y===!0&&Rn(p)?0:1}return Ar(y)?p===!0&&Rn(y)?0:-1:nn(p,y)}const a=Xt(u),l=Jr(a0,gi(r(a),pi(u)),l0);function u(p,y){return p===null?-1:y===null?1:l(p,y)}const c=Xt(o),d=pt(Rn,r(c)),h=Xt(i(o)),g=pt(Ye,o),f={$id:be,$comment:be,$defs:d,$ref:be,$schema:be,const:a,contains:c,contentEncoding:be,contentMediaType:be,default:a,definitions:d,description:be,else:c,examples:a,exclusiveMaximum:be,exclusiveMinimum:be,format:be,if:c,maximum:be,maxItems:be,maxLength:be,maxProperties:be,minimum:be,multipleOf:be,not:c,pattern:be,propertyNames:c,readOnly:be,then:c,title:be,writeOnly:be,uniqueItems:pt(p=>p===!1,ic),minLength:yi,minItems:yi,minProperties:yi,required:pt(ea,s),enum:pt(ea,i(u)),type:Xt((p,y)=>{const x=Array.isArray(p),S=Array.isArray(y);return!x&&!S?nn(p,y):s(x?p:[p],S?y:[y])}),items:pt(p=>!Array.isArray(p)&&Ye(p),gi(o,pi(o))),anyOf:h,allOf:h,oneOf:h,properties:d,patternProperties:d,additionalProperties:g,additionalItems:g,dependencies:pt(Rn,r(Xt(gi(o,s))))};return{compareSchemaValues:u,compareSchemaDefinitions:o}}function ra(t){return t}const sc=(t,e)=>t?sc(e%t,t):e,d0=(t,e)=>Math.abs(t*e)/sc(t,e);function f0(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function bi(t,e,n){const r=t.length,i=e.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=t[s];for(let a=0;a<i;a++)n(o,e[a])}}function xi(t,e){return t||e}function ia(t){return(e,n)=>{const r={...e},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=e[a]===void 0?n[a]:t(e[a],n[a])}return r}}function m0(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function Tt(t,e,n){n===void 0||Ye(n)?delete t[e]:t[e]=n}const h0=["properties","patternProperties","additionalProperties"];function sa(t){const e=Object.keys(t),n=e.length,r=[];for(let i=0;i<n;i++){const s=e[i];r.push({regExp:new RegExp(s),schema:t[s]})}return[r,e]}const oa=[[],[]];function aa(t,e,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(e))continue;const o=s.schema;if(o===!1)return!0;t.push(o)}return!1}const p0=["items","additionalItems"],g0=["if","then","else"];function la(t,e){return e.if!==void 0&&(t.if=e.if),e.then!==void 0&&(t.then=e.then),e.else!==void 0&&(t.else=e.else),t}function vi(t,e){if(t===e)return t;switch(t){case"number":if(e==="integer")return"integer";case"integer":if(e==="number")return"integer";default:return}}function Nt(t,e,n){return[t,e,n]}function y0(t){const e=new Map;for(const[n,r,i]of t){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=e.get(o[0]);a===void 0&&(a=[],e.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return e}const b0=[Nt("minimum","maximum",t=>t.maximum>=t.minimum),Nt("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Nt("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Nt("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Nt("minLength","maxLength",t=>t.maxLength>=t.minLength),Nt("minItems","maxItems",t=>t.maxItems>=t.minItems),Nt("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function x0({mergePatterns:t=f0,isSubRegExp:e=Object.is,intersectJson:n=r0,deduplicateJsonSchemaDef:r=ra,defaultMerger:i=ra,assigners:s=[],checks:o=b0,mergers:a}={}){function l(j){const b=j.length;let v=j[0];for(let w=1;w<b;w++){const O=x(v,j[w]);if(O===!1)return!1;Ye(O)||(v=O)}return v}function u(j,b,v,w,O,C,A){if(j.length=0,v===!1)return!1;if(j.push(v),O!==void 0){if(O===!1)return!1;j.push(O)}if(aa(j,b,C))return!1;const I=j.length<2;if(A===!1){if(I)return;if(aa(j,b,w))return!1}else I&&A!==void 0&&j.push(A);return j.length===1?j[0]:l(j)}function c(j,b,v,w,O,C){const A=v.length;if(A>0&&O!==!1)if(C)Object.assign(j,b);else for(let _=0;_<A;_++){const I=v[_];w.has(I)||(j[I]=x(b[I],O))}return j}const d=(j,{properties:b={},patternProperties:v,additionalProperties:w=!0},{properties:O={},patternProperties:C,additionalProperties:A=!0})=>{const _=Ye(w),I=Ye(A);if(_&&I)return Tt(j,"properties",S(b,O)),Tt(j,"patternProperties",v&&C?S(v,C):v??C),delete j.additionalProperties,j;const T=x(w,A);Tt(j,"additionalProperties",T);const P={},F=Object.keys(b),$=F.length,[k,M]=v?sa(v):oa,[U,J]=C?sa(C):oa,ae=[],fe=new Set,ye=I?void 0:A;for(let z=0;z<$;z++){const re=F[z];fe.add(re);const oe=u(ae,re,b[re],k,O[re],U,ye);oe!==void 0&&(P[re]=oe)}const L=Object.keys(O),le=L.length,te=_?void 0:w;for(let z=0;z<le;z++){const re=L[z];if(fe.has(re))continue;const oe=u(ae,re,O[re],U,void 0,k,te);oe!==void 0&&(P[re]=oe)}Tt(j,"properties",P);let H={};const K=new Set;return M.length>0&&J.length>0&&bi(M,J,(z,re)=>{e(z,re)&&K.add(z),e(re,z)&&K.add(re),H[t(z,re)]=x(v[z],C[re])}),H=c(H,v,M,K,A,I),H=c(H,C,J,K,w,_),Tt(j,"patternProperties",H),j},h=(j,{items:b=[],additionalItems:v},{items:w=[],additionalItems:O})=>{const C=Array.isArray(b),A=Array.isArray(w),_=[];if(j.items=_,C&&A){const[I,T,P]=b.length<w.length?[b.length,v,w]:[w.length,O,b];let F=0;for(;F<I;F++)_.push(x(b[F],w[F]));if(T===!1)j.additionalItems=!1;else{const $=T===void 0||Ye(T);for(;F<P.length;F++)_.push($?P[F]:x(P[F],T));Tt(j,"additionalItems",v!==void 0&&O!==void 0?x(v,O):v??O)}}else if(C||A){const[I,T,P]=C?[b,w,v]:[w,b,O];Tt(j,"additionalItems",P&&x(P,T));for(let F=0;F<I.length;F++)_.push(x(I[F],T))}else delete j.additionalItems,j.items=x(b,w);return j},g=(j,b,v)=>{la(j,b);const w=la({},v);return j.allOf===void 0?j.allOf=[w]:j.allOf=j.allOf.concat(w),j};function f(j,b){const v=[];if(bi(j,b,(w,O)=>{try{v.push(x(w,O))}catch{}}),v.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(j)}" and "${JSON.stringify(b)}"; the merged result is empty`);return r(v)}const p=m0([[h0,d],[p0,h],[g0,g],...s]),y=y0(o);function x(j,b){if(j===!1||b===!1)return!1;if(Ye(j))return Ye(b)?!0:b;if(Ye(b))return j;let v={...j};const w=new Set,O=new Set,C=Object.keys(b),A=C.length;for(let _=0;_<A;_++){const I=C[_],T=b[I];if(T===void 0)continue;const P=y.get(I);if(P!==void 0){const M=P.length;for(let U=0;U<M;U++){const J=P[U];j[J.oppositeKey]!==void 0&&O.add(J.check)}}const F=j[I];if(F===void 0){v[I]=T;continue}const $=p.get(I);if($){w.add($);continue}const k=E[I]??i;v[I]=k(F,T)}for(const _ of w)v=_(v,j,b);for(const _ of O)_(v);return v}const S=ia(x),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(j,b)=>{if(j===b)return j;const v=Array.isArray(j),w=Array.isArray(b);if(!v&&!w){const O=vi(j,b);if(O!==void 0)return O}else if(v||w){const O=new Set;if(v&&w)bi(j,b,(A,_)=>{const I=vi(A,_);I!==void 0&&O.add(I)});else{const A=v?j:b,_=v?b:j,I=A.length;for(let T=0;T<I;T++){const P=vi(_,A[T]);P!==void 0&&O.add(P)}}const C=O.size;if(C===1)return O.values().next().value;if(C>1)return Array.from(O)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${j.toString()}, ${b.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(j,b)=>{const v=r([j,b]);return v.length===1?v[0]:{anyOf:v}},pattern:t,readOnly:xi,writeOnly:xi,enum:(j,b)=>{const v=n(j,b);if(v.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(j)}", "${JSON.stringify(b)}"`);return v},anyOf:f,oneOf:f,allOf:(j,b)=>r(j.concat(b)),propertyNames:x,contains:x,dependencies:ia((j,b)=>Array.isArray(j)?Array.isArray(b)?hi(j,b):x(b,{required:j}):Array.isArray(b)?x(j,{required:b}):x(j,b)),examples:(j,b)=>{if(!Array.isArray(j)||!Array.isArray(b))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(j)}" and "${JSON.stringify(b)}"`);return hi(j,b)},multipleOf:(j,b)=>{let v=1;for(;!Number.isInteger(j)||!Number.isInteger(b);)v*=10,j*=10,b*=10;return d0(j,b)/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:xi,required:hi,...a};return{mergeSchemaDefinitions:x,mergeArrayOfSchemaDefinitions:l}}function v0(t){const e=[],n=[t];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){e.push(r);continue}const{allOf:i,...s}=r;e.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return e}function S0(t){return e=>t(v0(e))}const{compareSchemaDefinitions:w0,compareSchemaValues:j0}=u0(),{mergeArrayOfSchemaDefinitions:O0}=x0({intersectJson:i0(j0),deduplicateJsonSchemaDef:rc(w0)}),oc=S0(O0);function Ce(t,e,n={},r,i,s=!1){return Ze(t,e,n,r,void 0,void 0,i,s)[0]}function E0(t,e,n,r,i,s,o){const{if:a,then:l,else:u,...c}=e,d=t.isValid(a,s||{},n);let h=[c],g=[];if(r)l&&typeof l!="boolean"&&(g=g.concat(Ze(t,l,n,s,r,i,o))),u&&typeof u!="boolean"&&(g=g.concat(Ze(t,u,n,s,r,i,o)));else{const f=d?l:u;f&&typeof f!="boolean"&&(g=g.concat(Ze(t,f,n,s,r,i,o)))}return g.length&&(h=g.map(f=>at(c,f))),h.flatMap(f=>Ze(t,f,n,s,r,i,o))}function ac(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>Hl(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function lc(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ce(n,[r],t.patternProperties[r]),n),{})}function A0(t,e,n,r,i,s,o,a){const l=cc(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(ps in e)return dc(t,e,n,r,i,s,o).flatMap(c=>Ze(t,c,n,s,r,i,o));if(Ot in e&&Array.isArray(e[Ot])){const u=e.allOf.map(d=>Ze(t,d,n,s,r,i,o));return ac(u).map(d=>({...e,allOf:d}))}return[e]}function cc(t,e,n,r,i,s,o,a){const l=St(e,n,i,void 0,a);return l!==e?Ze(t,l,n,s,r,i,o,a):[e]}function St(t,e,n,r,i){if(!q(t))return t;let s=t,o=r;if(ue in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...Zn(a,e,o),...l,[Bn]:a},de in s&&(o=s[de])}if(se in s){const a=[],l=qb(s[se],(u,c,d)=>{const h=[...n];u[d]=St(c,e,h,o,i),a.push(h)},{});qy(n,ec(ky(a))),s={...s,[se]:l}}if(an in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:St(s.items,e,n,o,i)}),i){let a,l;ee in t&&Array.isArray(t[ee])?(a=ee,l=s[ee]):W in t&&Array.isArray(t[W])&&(a=W,l=s[W]),a&&l&&(s={...s,[a]:l.map(u=>St(u,e,n,o,i))})}return ie(t,s)?t:s}function C0(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&q(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(Vi in s){const l=lc(s,a);if(!ge(l)){s.properties[a]=Ce(t,{[Ot]:Object.values(l)},n,D(o,[a]),i),ce(s.properties,[a,ot],!0);return}}if(tn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ue in s.additionalProperties?l=Ce(t,{[ue]:D(s.additionalProperties,[ue])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ee in s.additionalProperties||W in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:er(D(o,[a]))}:l={type:er(D(o,[a]))},s.properties[a]=l,ce(s.properties,[a,ot],!0)}else s.properties[a]={type:"null"},ce(s.properties,[a,ot],!0)}}),s}function _0(t){return oc(t)}function Ze(t,e,n,r,i=!1,s=[],o,a){return q(e)?A0(t,e,n,i,s,r,o,a).flatMap(u=>{var c;let d=u;if(gs in d)return E0(t,d,n,i,s,r,o);if(Ot in d){if(i){const{allOf:g,...f}=d;return[...g,f]}try{const g=[],f=[];(c=d.allOf)===null||c===void 0||c.forEach(p=>{typeof p=="object"&&p.contains?g.push(p):f.push(p)}),g.length&&(d={...d,allOf:f}),d=o?o(d):_0(d),g.length&&(d.allOf=g)}catch(g){console.warn(`could not merge subschemas in allOf:
|
|
1
|
+
import{bd as Cu,be as ke,bf as ro,M as R,aX as _e,ah as Ut,bg as as,ae as Se,bh as Tr,bi as qe,af as _u,bj as pn,J as Q,bk as ls,bl as io,bm as Iu,bn as Tu,bo as Ga,bp as Nu,bq as Pu,br as Fu,bs as Ya,bt as $u,b4 as Ja,ag as nr,bu as Du,c as je,r as N,m as Ur,j as m,au as Za,F as cs,a as Ru,t as vr,bv as us,bw as Xa,bx as ku,by as Mu,bz as Uu,bc as Qa,bA as ds,bB as Lu,bC as Bu,bD as Vu,bE as qu,aS as zu,aV as Qt,aP as rr,aT as gn,aQ as Wu,aU as Hu,bF as Ku,aR as Gu,bG as Yu,b as lt,B as Lr,k as fs,d as Ju,E as Zu,aJ as Xu}from"./index-xMAThnJ3.js";import{P as An}from"./index-CetUKuua.js";import{E as el}from"./empty-state-Wdt305BC.js";import{A as tl,k as Qu,l as ed,n as td,o as nd,p as rd,i as id,u as sd}from"./use-mcp-client-CxJl6URN.js";import{c as od}from"./use-mcp-tools-CZl6XrZ7.js";import{i as ad}from"./ZoomOut-BYn_nuTa.js";import{i as ld}from"./Key01-BOkUeTGR.js";import{b as cd,u as ud,a as dd}from"./use-connection-CRf-DTB0.js";import{U as Cn,a as ii,e as so}from"./auth-BuYROqYP.js";import{i as fd,c as md,d as hd,e as pd}from"./extract-connection-data-CUPY4h8x.js";import{u as gd}from"./use-registry-connections-DOp_CmU_.js";import{c as yd}from"./use-organization-settings-CPH24cID.js";import{s as bd}from"./Plus-BWpeDIiC.js";import{e as nl,S as xd,a as vd,b as Sd,c as wd,d as jd}from"./select-Dwl6tgyc.js";import{R as oo}from"./index-CPD_qiK-.js";import{R as Od,I as Ed,a as Ad}from"./index-CRaj4we8.js";import{_ as Lt}from"./index-CHOirrNp.js";import{A as rl}from"./agent-icon-DPj46qz4.js";import{I as Cd}from"./input-u9ojR0Jk.js";import{P as _d,a as Id,b as Td}from"./popover-DeNJXOxs.js";import{a as Nd,T as Pd,c as Fd,b as $d}from"./tooltip-Cx4iVbBS.js";import{u as Dd}from"./use-virtual-mcp-C9595_o4.js";import{i as Rd}from"./Check-Btldp1zg.js";import{i as kd}from"./SearchMd-D5PMm26-.js";import{a as Md}from"./Users03-CFoRyG6w.js";import{u as Ud}from"./use-mobile-CljsORKC.js";import{u as Ld}from"./use-create-virtual-mcp-5RZTzNZt.js";function Bd(){const t=new tl({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return Cu(t),t}class Vd{#e=Bd();#t=new Map;#n=new WeakMap;getValidator(e){const n=this.#n.get(e);if(n)return n;let r;const i=s=>{if(!r){const o=qd(e);let a=this.#t.get(o);a||(a=this.#e.compile(e),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(e,i),i}}function qd(t){return JSON.stringify(t,(e,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const zd=new Vd;var Wd=class{apply(t,e){if(!e.type)return;const n=Array.isArray(e.type)?e.type:[e.type],r=new Set(n);if(r.has("string")||(t.string=!1),!r.has("number")&&!r.has("integer")&&(t.number=!1),r.has("boolean")||(t.boolean=!1),r.has("null")||(t.null=!1),r.has("array")||(t.array=!1),r.has("object")||(t.object=!1),r.has("integer")&&t.number!==!1){const i=t.number||_e();i instanceof pn&&(t.number=i.int())}}},Hd=class{apply(t,e){if(e.const===void 0)return;const n=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof n=="string"?t.string=qe(n):typeof n=="number"?t.number=qe(n):typeof n=="boolean"?t.boolean=qe(n):n===null?t.null=as():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},Kd=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const n={string:e.enum.filter(r=>typeof r=="string"),number:e.enum.filter(r=>typeof r=="number"),boolean:e.enum.filter(r=>typeof r=="boolean"),null:e.enum.filter(r=>r===null),array:e.enum.filter(r=>Array.isArray(r)),object:e.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};t.string=this.createTypeSchema(n.string,"string"),t.number=this.createTypeSchema(n.number,"number"),t.boolean=this.createTypeSchema(n.boolean,"boolean"),t.null=n.null.length>0?as():!1,t.array=n.array.length>0?void 0:!1,t.object=n.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return qe(t[0]);if(e==="string")return _u(t);if(e==="number"){const[n,r,...i]=t;return Tr([qe(n),qe(r),...i.map(s=>qe(s))])}return e==="boolean"?Tr([qe(!0),qe(!1)]):!1}},Gd=class{apply(t,e){const n=e;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=Fu();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)),t.file=r,t.string=!1}}},Yd=class{apply(t,e){const n=e;e.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&t.string===void 0&&(t.string=R())}},Jd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||R();r instanceof ls&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Zd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||R();r instanceof ls&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Xd=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||R();if(r instanceof ls){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},Qd=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.min(n.minimum))}}},ef=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.number=r.max(n.maximum))}}},tf=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},nf=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},rf=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||_e();r instanceof pn&&(t.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}`}))}}},sf=class{apply(t,e){const n=e;e.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&t.array===void 0&&(t.array=Se(ke()))}},of=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||Se(ke())).min(n.minItems))}},af=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||Se(ke())).max(n.maxItems))}},lf=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||Se(ke());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=Se(r);if(t.array&&t.array instanceof Iu){const s=t.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))}})}t.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?t.array=t.array||Se(ke()):t.array=Se(ke()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||Se(ke()):n.prefixItems&&(t.array=t.array||Se(ke()))}},cf=class{apply(t,e){if(e.type!=="array")return;const n=e;if(!Array.isArray(n.items)||t.array===!1)return;const r=n.items.map(s=>Ie(s));let i;r.length===0?i=io([]):i=io(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),t.tuple=i,t.array=!1}},uf=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||Q({}).passthrough())}},df=class{apply(t,e){const n=e;e.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&t.object===void 0&&(t.object=Q({}).passthrough())}},ff=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||Q({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},mf=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||Q({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Gn(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,r)=>Gn(n,e[r]));if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&Gn(t[i],e[i]))}return!1}function hf(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>Gn(n,i))?!1:(e.push(n),!0))}}function Nr(t,e){return t.safeParse(e).success}var pf=class{apply(t,e){if(!e.not)return t;const n=Ie(e.not);return t.refine(r=>!Nr(n,r),{message:"Value must not match the 'not' schema"})}},gf=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(hf(),{message:"Array items must be unique"})}},yf=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Ie(r)).reduce((r,i)=>Ga(r,i),t)}},bf=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Ie(e.anyOf[0]):Tr([Ie(e.anyOf[0]),Ie(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Ie(r))]);return Ga(t,n)}},xf=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const n=e.oneOf.map(r=>Ie(r));return t.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"})}},vf=class{apply(t,e){const n=e;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Ie(s));return t.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Nr(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=Ie(n.items);for(let a=i.length;a<s.length;a++)if(!Nr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},Sf=class{apply(t,e){const n=e;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return t;if(t instanceof Nu||t instanceof Pu){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Ie(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?Q(r):Q(r).passthrough()}return t.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&&!Ie(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"})}},wf=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const n=e.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?t:t.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>Gn(r,i)),{message:"Value must match one of the enum values"})}},jf=class{apply(t,e){if(e.const===void 0)return t;const n=e.const;return typeof n!="object"||n===null?t:t.refine(r=>Gn(r,n),{message:"Value must equal the const value"})}},Of=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},Ef=class{apply(t,e){var n;const r=e;return!((n=r.required)!=null&&n.includes("__proto__"))||e.type!==void 0?t:ke().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(n=>Object.prototype.hasOwnProperty.call(t,n))}},Af=class{apply(t,e){var n;const r=e;if(r.contains===void 0)return t;const i=Ie(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return t.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const u of a)Nr(i,u)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},Cf=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},_f=[new Hd,new Kd,new Wd,new Gd,new Yd,new sf,new df,new Jd,new Zd,new Xd,new Qd,new ef,new tf,new nf,new rf,new cf,new of,new af,new lf,new ff,new mf,new uf],If=[new Ef,new wf,new jf,new yf,new bf,new xf,new vf,new Sf,new Af,new pf,new gf,new Cf,new Of];function Ie(t){if(typeof t=="boolean")return t?ke():ro();const e={};for(const i of _f)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||R()),e.number!==!1&&n.push(e.number||_e()),e.boolean!==!1&&n.push(e.boolean||Ut()),e.null!==!1&&n.push(e.null||as()),e.array!==!1&&n.push(e.array||Se(ke())),e.tuple!==!1&&e.tuple!==void 0&&n.push(e.tuple),e.object!==!1)if(e.object)n.push(e.object);else{const i=Tu(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}e.file!==!1&&e.file!==void 0&&n.push(e.file);let r;n.length===0?r=ro():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=Tr(n):r=ke();for(const i of If)r=i.apply(r,t);return r}class ao extends Event{constructor(e,n){var r,i;super(e),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,n,r){return r(lo(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(lo(this),n)}}function Tf(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function $i(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map($i).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${$i(t.cause)}`:t.message:`${t}`}function lo(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var il=t=>{throw TypeError(t)},ms=(t,e,n)=>e.has(t)||il("Cannot "+n),Z=(t,e,n)=>(ms(t,e,"read from private field"),n?n.call(t):e.get(t)),ve=(t,e,n)=>e.has(t)?il("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),pe=(t,e,n,r)=>(ms(t,e,"write to private field"),e.set(t,n),n),st=(t,e,n)=>(ms(t,e,"access private method"),n),Pe,Pt,Yt,Sr,Pr,Un,en,Ln,bt,Jt,sn,Zt,Fn,Ve,Di,Ri,ki,co,Mi,Ui,$n,Li,Bi;class wr extends EventTarget{constructor(e,n){var r,i;super(),ve(this,Ve),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,ve(this,Pe),ve(this,Pt),ve(this,Yt),ve(this,Sr),ve(this,Pr),ve(this,Un),ve(this,en),ve(this,Ln,null),ve(this,bt),ve(this,Jt),ve(this,sn,null),ve(this,Zt,null),ve(this,Fn,null),ve(this,Ri,async s=>{var o;Z(this,Jt).reset();const{body:a,redirected:l,status:u,headers:c}=s;if(u===204){st(this,Ve,$n).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?pe(this,Yt,new URL(s.url)):pe(this,Yt,void 0),u!==200){st(this,Ve,$n).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){st(this,Ve,$n).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.OPEN);const d=new Event("open");if((o=Z(this,Fn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){st(this,Ve,$n).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const h=new TextDecoder,g=a.getReader();let f=!0;do{const{done:p,value:y}=await g.read();y&&Z(this,Jt).feed(h.decode(y,{stream:!p})),p&&(f=!1,Z(this,Jt).reset(),st(this,Ve,Li).call(this))}while(f)}),ve(this,ki,s=>{pe(this,bt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&st(this,Ve,Li).call(this,$i(s))}),ve(this,Mi,s=>{typeof s.id=="string"&&pe(this,Ln,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:Z(this,Yt)?Z(this,Yt).origin:Z(this,Pt).origin,lastEventId:s.id||""});Z(this,Zt)&&(!s.event||s.event==="message")&&Z(this,Zt).call(this,o),this.dispatchEvent(o)}),ve(this,Ui,s=>{pe(this,Un,s)}),ve(this,Bi,()=>{pe(this,en,void 0),Z(this,Pe)===this.CONNECTING&&st(this,Ve,Di).call(this)});try{if(e instanceof URL)pe(this,Pt,e);else if(typeof e=="string")pe(this,Pt,new URL(e,Nf()));else throw new Error("Invalid URL")}catch{throw Tf("An invalid or illegal string was specified")}pe(this,Jt,Qu({onEvent:Z(this,Mi),onRetry:Z(this,Ui)})),pe(this,Pe,this.CONNECTING),pe(this,Un,3e3),pe(this,Pr,(r=n?.fetch)!=null?r:globalThis.fetch),pe(this,Sr,(i=n?.withCredentials)!=null?i:!1),st(this,Ve,Di).call(this)}get readyState(){return Z(this,Pe)}get url(){return Z(this,Pt).href}get withCredentials(){return Z(this,Sr)}get onerror(){return Z(this,sn)}set onerror(e){pe(this,sn,e)}get onmessage(){return Z(this,Zt)}set onmessage(e){pe(this,Zt,e)}get onopen(){return Z(this,Fn)}set onopen(e){pe(this,Fn,e)}addEventListener(e,n,r){const i=n;super.addEventListener(e,i,r)}removeEventListener(e,n,r){const i=n;super.removeEventListener(e,i,r)}close(){Z(this,en)&&clearTimeout(Z(this,en)),Z(this,Pe)!==this.CLOSED&&(Z(this,bt)&&Z(this,bt).abort(),pe(this,Pe,this.CLOSED),pe(this,bt,void 0))}}Pe=new WeakMap,Pt=new WeakMap,Yt=new WeakMap,Sr=new WeakMap,Pr=new WeakMap,Un=new WeakMap,en=new WeakMap,Ln=new WeakMap,bt=new WeakMap,Jt=new WeakMap,sn=new WeakMap,Zt=new WeakMap,Fn=new WeakMap,Ve=new WeakSet,Di=function(){pe(this,Pe,this.CONNECTING),pe(this,bt,new AbortController),Z(this,Pr)(Z(this,Pt),st(this,Ve,co).call(this)).then(Z(this,Ri)).catch(Z(this,ki))},Ri=new WeakMap,ki=new WeakMap,co=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Z(this,Ln)?{"Last-Event-ID":Z(this,Ln)}:void 0},cache:"no-store",signal:(t=Z(this,bt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},Mi=new WeakMap,Ui=new WeakMap,$n=function(t,e){var n;Z(this,Pe)!==this.CLOSED&&pe(this,Pe,this.CLOSED);const r=new ao("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r)},Li=function(t,e){var n;if(Z(this,Pe)===this.CLOSED)return;pe(this,Pe,this.CONNECTING);const r=new ao("error",{code:e,message:t});(n=Z(this,sn))==null||n.call(this,r),this.dispatchEvent(r),pe(this,en,setTimeout(Z(this,Bi),Z(this,Un)))},Bi=new WeakMap,wr.CONNECTING=0,wr.OPEN=1,wr.CLOSED=2;function Nf(){const t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}class Pf extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class Ff{constructor(e,n){this._url=e,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=ed(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Cn("No auth provider");let e;try{e=await ii(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(e!=="AUTHORIZED")throw new Cn;return await this._startOrAuth()}async _commonHeaders(){const e={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(e.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const n=td(this._requestInit?.headers);return new Headers({...e,...n})}_startOrAuth(){const e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new wr(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await e(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:u}=so(a);this._resourceMetadataUrl=l,this._scope=u}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 Pf(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=Ya.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(e){if(!this._authProvider)throw new Cn("No auth provider");if(await ii(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){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(e),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}=so(i);if(this._resourceMetadataUrl=o,this._scope=a,await ii(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(e){this._protocolVersion=e}}const $f="mcp";class Df{constructor(e){this._url=e}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,n)=>{this._socket=new WebSocket(this._url,$f),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=()=>{e()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=Ya.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(e){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(e)),n()})}}class Rf extends nd{constructor(e,n){super(e,n)}send(e,n){const r=kf(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function kf(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const n=e?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class Mf extends rd{constructor(e,n){super(e,{jsonSchemaValidator:zd,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},$u,n)}}const Uf=async(t,e,n)=>{const r=Lf(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new Mf({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Lf=(t,e,n)=>{if(t.type==="Websocket")return new Df(new URL(t.url));if(t.type!=="SSE"&&t.type!=="HTTP")return null;const i={...t.token?{authorization:`Bearer ${t.token}`}:{},...n??{},..."headers"in t?t.headers||{}:{}};if(t.type==="SSE"){const s={requestInit:{headers:i,signal:e}};return t.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:e})}),new Ff(new URL(t.url),s)}return new Rf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},uo=t=>{try{return JSON.parse(t)}catch{return t}},hr=new Map,fo=(t,e)=>({...t,id:t.name,inputSchema:t.inputSchema?Ie(t.inputSchema):void 0,outputSchema:t.outputSchema?Ie(t.outputSchema):void 0,execute:n=>e(n.context,t.name)});function Bf(t){const e=n=>"connection"in t?Uf({connection:t.connection},void 0,n):t.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,u=r){const c=t?.debugId?.(),d=c?{"x-trace-debug-id":c}:void 0,{client:h}=await e(d),{structuredContent:g,isError:f,content:p}=await h.callTool({name:String(u),arguments:l});if(f){const x=p?.[0]?.text,S=typeof x=="string"?uo(x):null,E=S?.code&&typeof t?.getErrorByStatusCode=="function"?t.getErrorByStatusCode(S.code,S.message,S.traceId):null;throw E||new Error(`Tool ${String(u)} returned an error: ${JSON.stringify(g??p)}`)}if(g!==void 0)return g;const y=p?.[0]?.text;return typeof y=="string"?uo(y):void 0}async function s(){const{client:l}=await e(),{tools:u}=await l.listTools();return u}async function o(){if(!("connection"in t))return s();const l=t.connection,u=JSON.stringify(l);try{return hr.has(u)||hr.set(u,s()),await hr.get(u)}catch(c){console.error("Failed to list tools",c),hr.delete(u);return}}async function a(){return(await o()??[]).map(u=>fo(u,i))}return i.asTool=async()=>{const u=(await o()??[]).find(c=>c.name===r);if(!u)throw new Error(`Tool ${r} not found`);return fo(u,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>Vf({connection:n}):global[e]}});function Vf(t){return Bf(t)}function qf(t){return{isImplementedBy:e=>{for(const n of t){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=e.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const zf=Q({specversion:qe("1.0").describe("CloudEvents specification version"),id:R().describe("Unique identifier for this event (UUID recommended)"),source:R().describe("Connection ID of the event publisher"),type:R().describe("Event type (e.g., 'order.created', 'user.signup')"),time:R().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:R().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:R().optional().default("application/json").describe("Content type of the data attribute"),dataschema:R().url().optional().describe("URI to the schema for the data attribute"),data:Ja().optional().describe("Event payload (any JSON value)")});Q({events:Se(zf).min(1).describe("Batch of CloudEvents to process")});const Wf=Q({success:Ut().optional().describe("Whether this event was processed successfully"),error:R().optional().describe("Error message for this event"),retryAfter:_e().int().positive().optional().describe("Re-deliver this event after this many ms")});Q({success:Ut().optional().describe("Batch success - applies to events not in results"),error:R().optional().describe("Batch error message - applies to events not in results"),processedCount:_e().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:_e().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:nr(R(),Wf).optional().describe("Per-event results keyed by event ID")});const Hf=Q({type:qe("string"),enum:Se(R()).optional(),description:R().optional()}),Kf=Q({type:R(),description:R(),paramsSchema:nr(R(),Hf)});Q({});Q({triggers:Se(Kf)});Q({type:R(),params:nr(R(),R()),enabled:Ut(),callbackUrl:Du().optional(),callbackToken:R().min(1).optional()});Q({success:Ut()});Q({prefix:R().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:_e().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:R().optional().describe("Token for pagination from previous response"),delimiter:R().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});Q({objects:Se(Q({key:R().describe("Object key/path"),size:_e().describe("Object size in bytes"),lastModified:R().describe("Last modified timestamp"),etag:R().describe("Entity tag for the object")})),nextContinuationToken:R().optional().describe("Token for fetching next page of results"),isTruncated:Ut().describe("Whether there are more results available"),commonPrefixes:Se(R()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});Q({key:R().describe("Object key/path to get metadata for")});Q({contentType:R().optional().describe("MIME type of the object"),contentLength:_e().describe("Size of the object in bytes"),lastModified:R().describe("Last modified timestamp"),etag:R().describe("Entity tag for the object"),metadata:nr(R(),R()).optional().describe("Custom metadata key-value pairs")});Q({key:R().describe("Object key/path to generate URL for"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});Q({url:R().describe("Presigned URL for downloading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});Q({key:R().describe("Object key/path for the upload"),expiresIn:_e().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:R().optional().describe("MIME type for the object being uploaded")});Q({url:R().describe("Presigned URL for uploading the object"),expiresIn:_e().describe("Expiration time in seconds that was used")});Q({key:R().describe("Object key/path to delete")});Q({success:Ut().describe("Whether the deletion was successful"),key:R().describe("The key that was deleted")});Q({keys:Se(R()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});Q({deleted:Se(R()).describe("Array of successfully deleted keys"),errors:Se(Q({key:R(),message:R()})).describe("Array of errors for failed deletions")});const Gf=Q({primary:R().optional().describe("Primary brand color (hex)"),secondary:R().optional().describe("Secondary brand color (hex)"),accent:R().optional().describe("Accent / highlight color (hex)"),background:R().optional().describe("Background color (hex)"),foreground:R().optional().describe("Foreground / text color (hex)")}),Yf=Q({heading:R().optional().describe("Font family for headings"),body:R().optional().describe("Font family for body text"),code:R().optional().describe("Font family for code / monospace")}),Jf=Q({logo:R().optional().describe("Logo URL"),favicon:R().optional().describe("Favicon URL"),ogImage:R().optional().describe("Open Graph image URL")}),Zf=Q({id:R(),name:R().describe("Brand / company name"),domain:R().optional().describe("Company domain (e.g. example.com)"),colors:Gf.optional().describe("Semantic color palette"),fonts:Yf.optional().describe("Font families by role"),assets:Jf.optional().describe("Visual identity assets"),overview:R().optional().describe("Company overview / description"),tagline:R().optional().describe("Brand tagline"),tone:R().optional().describe("Tone of voice description"),metadata:nr(R(),Ja()).optional().describe("Extra design tokens and metadata")});Q({id:R().optional().describe("Brand ID. Omit to get the default brand.")});Q({});Q({items:Se(Zf)});const Xf={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function Qf(t){if(t)return Xf[t]}function LO(t,e){const n=t.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=e.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return qf(i).isImplementedBy(r)}const hs=N.createContext(null);function BO(t){const e=je.c(3),{children:n}=t,r=N.useContext(hs);if(!r?.tabsEl)return null;let i;return e[0]!==n||e[1]!==r.tabsEl?(i=Za.createPortal(n,r.tabsEl),e[0]=n,e[1]=r.tabsEl,e[2]=i):i=e[2],i}function em(t){const e=je.c(3),{children:n}=t,r=N.useContext(hs);if(!r?.actionsEl)return null;let i;return e[0]!==n||e[1]!==r.actionsEl?(i=Za.createPortal(n,r.actionsEl),e[0]=n,e[1]=r.actionsEl,e[2]=i):i=e[2],i}const VO=em;function qO(t){const e=je.c(21),{children:n,breadcrumb:r,hideHeader:i}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftEl:null,tabsEl:null,actionsEl:null},e[0]=s):s=e[0];const[o,a]=N.useState(s),l=N.useRef(null),u=N.useRef(null),c=N.useRef(null);let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=A=>{l.current=A,A&&a(_=>_.leftEl===A?_:{..._,leftEl:A})},e[1]=d):d=e[1];const h=d;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=A=>{u.current=A,A&&a(_=>_.tabsEl===A?_:{..._,tabsEl:A})},e[2]=g):g=e[2];const f=g;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=A=>{c.current=A,A&&a(_=>_.actionsEl===A?_:{..._,actionsEl:A})},e[3]=p):p=e[3];const y=p,x=i&&"hidden";let S;e[4]!==x?(S=Ur(x),e[4]=x,e[5]=S):S=e[5];let E;e[6]===Symbol.for("react.memo_cache_sentinel")?(E=m.jsx("div",{ref:h,className:"flex items-center gap-2 min-w-0"}),e[6]=E):E=e[6];let j;e[7]!==r?(j=m.jsxs(An.Header.Left,{children:[r,E]}),e[7]=r,e[8]=j):j=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=m.jsxs(An.Header.Right,{children:[m.jsx("div",{ref:f,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),m.jsx("div",{ref:y,className:"flex items-center gap-2 shrink-0"})]}),e[9]=b):b=e[9];let v;e[10]!==S||e[11]!==j?(v=m.jsxs(An.Header,{className:S,children:[j,b]}),e[10]=S,e[11]=j,e[12]=v):v=e[12];let w;e[13]!==n?(w=m.jsx(An.Content,{children:n}),e[13]=n,e[14]=w):w=e[14];let O;e[15]!==v||e[16]!==w?(O=m.jsxs(An,{children:[v,w]}),e[15]=v,e[16]=w,e[17]=O):O=e[17];let C;return e[18]!==o||e[19]!==O?(C=m.jsx(hs,{value:o,children:O}),e[18]=o,e[19]=O,e[20]=C):C=e[20],C}function tm(t){return t.startsWith("@")?t:`@${t}`}function nm(){const{org:t}=cs(),{data:e}=Ru.useSession(),n=cd(),r=gd(),i=yd(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!t||!e?.user?.id){vr.error("Not authenticated");return}const l=tm(a),c=(await Promise.all(s.map(async p=>{const y=fd(p.id,t.id);try{const x=await md(p.id,t.id,t.slug,y,{where:{appName:l}});return hd(x??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!c){vr.error(`MCP Server not found in registry: ${a}`);return}const d=pd(c,t.id,e.user.id),h=d.connection_type==="STDIO",g=!!d.connection_url,f=h&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!g&&!f){vr.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 q(t){return typeof t!="object"||t===null||typeof t.lastModified=="number"&&typeof File<"u"&&t instanceof File||typeof t.getMonth=="function"&&typeof Date<"u"&&t instanceof Date?!1:!Array.isArray(t)}function rm(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),q(t.additionalItems)}function mo(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const ot="__additional_property",tn="additionalProperties",Ot="allOf",ee="anyOf",Ne="const",$t="default",ps="dependencies",im="enum",Ae="__errors",de="$id",gs="if",an="items",sm="_$junk_option_schema_id$_",jr="$name",W="oneOf",Vi="patternProperties",se="properties",si="readonly",sl="required",Fr="submitButtonOptions",ue="$ref",Bn="__rjsf_ref",Dn="$schema",ol="root",al="_",om=["discriminator","propertyName"],ho="formContext",am="layoutGridLookupMap",ys="__rjsf_additionalProperties",ll="__rjsf_rootSchema",lm="ui:field",bs="ui:widget",vt="ui:options",qi="ui:globalOptions",cm="ui:definitions",um="https://json-schema.org/draft/2019-09/schema",Or="https://json-schema.org/draft/2020-12/schema";function B(t={},e={}){return t?Object.keys(t).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=t[r];return r===bs&&q(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===vt&&q(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function cl(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=B(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var ul=typeof global=="object"&&global&&global.Object===Object&&global,dm=typeof self=="object"&&self&&self.Object===Object&&self,nt=ul||dm||Function("return this")(),Me=nt.Symbol,dl=Object.prototype,fm=dl.hasOwnProperty,mm=dl.toString,_n=Me?Me.toStringTag:void 0;function hm(t){var e=fm.call(t,_n),n=t[_n];try{t[_n]=void 0;var r=!0}catch{}var i=mm.call(t);return r&&(e?t[_n]=n:delete t[_n]),i}var pm=Object.prototype,gm=pm.toString;function ym(t){return gm.call(t)}var bm="[object Null]",xm="[object Undefined]",po=Me?Me.toStringTag:void 0;function ct(t){return t==null?t===void 0?xm:bm:po&&po in Object(t)?hm(t):ym(t)}function fl(t,e){return function(n){return t(e(n))}}var Br=fl(Object.getPrototypeOf,Object);function Ue(t){return t!=null&&typeof t=="object"}var vm="[object Object]",Sm=Function.prototype,wm=Object.prototype,ml=Sm.toString,jm=wm.hasOwnProperty,Om=ml.call(Object);function Et(t){if(!Ue(t)||ct(t)!=vm)return!1;var e=Br(t);if(e===null)return!0;var n=jm.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ml.call(n)==Om}function zi(t){const e={[Ae]:[],addError(n){this[Ae].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:zi(r)}),e);if(Et(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:zi(n[i])}),e)}return e}var we=Array.isArray,Em="[object Symbol]";function ir(t){return typeof t=="symbol"||Ue(t)&&ct(t)==Em}var Am=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cm=/^\w*$/;function xs(t,e){if(we(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||ir(t)?!0:Cm.test(t)||!Am.test(t)||e!=null&&t in Object(e)}function ne(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var _m="[object AsyncFunction]",Im="[object Function]",Tm="[object GeneratorFunction]",Nm="[object Proxy]";function sr(t){if(!ne(t))return!1;var e=ct(t);return e==Im||e==Tm||e==_m||e==Nm}var oi=nt["__core-js_shared__"],go=(function(){var t=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Pm(t){return!!go&&go in t}var Fm=Function.prototype,$m=Fm.toString;function Bt(t){if(t!=null){try{return $m.call(t)}catch{}try{return t+""}catch{}}return""}var Dm=/[\\^$.*+?()[\]{}|]/g,Rm=/^\[object .+?Constructor\]$/,km=Function.prototype,Mm=Object.prototype,Um=km.toString,Lm=Mm.hasOwnProperty,Bm=RegExp("^"+Um.call(Lm).replace(Dm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vm(t){if(!ne(t)||Pm(t))return!1;var e=sr(t)?Bm:Rm;return e.test(Bt(t))}function qm(t,e){return t?.[e]}function Vt(t,e){var n=qm(t,e);return Vm(n)?n:void 0}var Yn=Vt(Object,"create");function zm(){this.__data__=Yn?Yn(null):{},this.size=0}function Wm(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Hm="__lodash_hash_undefined__",Km=Object.prototype,Gm=Km.hasOwnProperty;function Ym(t){var e=this.__data__;if(Yn){var n=e[t];return n===Hm?void 0:n}return Gm.call(e,t)?e[t]:void 0}var Jm=Object.prototype,Zm=Jm.hasOwnProperty;function Xm(t){var e=this.__data__;return Yn?e[t]!==void 0:Zm.call(e,t)}var Qm="__lodash_hash_undefined__";function eh(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Yn&&e===void 0?Qm:e,this}function Dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Dt.prototype.clear=zm;Dt.prototype.delete=Wm;Dt.prototype.get=Ym;Dt.prototype.has=Xm;Dt.prototype.set=eh;function th(){this.__data__=[],this.size=0}function or(t,e){return t===e||t!==t&&e!==e}function Vr(t,e){for(var n=t.length;n--;)if(or(t[n][0],e))return n;return-1}var nh=Array.prototype,rh=nh.splice;function ih(t){var e=this.__data__,n=Vr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():rh.call(e,n,1),--this.size,!0}function sh(t){var e=this.__data__,n=Vr(e,t);return n<0?void 0:e[n][1]}function oh(t){return Vr(this.__data__,t)>-1}function ah(t,e){var n=this.__data__,r=Vr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ut(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ut.prototype.clear=th;ut.prototype.delete=ih;ut.prototype.get=sh;ut.prototype.has=oh;ut.prototype.set=ah;var Jn=Vt(nt,"Map");function lh(){this.size=0,this.__data__={hash:new Dt,map:new(Jn||ut),string:new Dt}}function ch(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qr(t,e){var n=t.__data__;return ch(e)?n[typeof e=="string"?"string":"hash"]:n.map}function uh(t){var e=qr(this,t).delete(t);return this.size-=e?1:0,e}function dh(t){return qr(this,t).get(t)}function fh(t){return qr(this,t).has(t)}function mh(t,e){var n=qr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dt.prototype.clear=lh;dt.prototype.delete=uh;dt.prototype.get=dh;dt.prototype.has=fh;dt.prototype.set=mh;var hh="Expected a function";function vs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(hh);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(vs.Cache||dt),n}vs.Cache=dt;var ph=500;function gh(t){var e=vs(t,function(r){return n.size===ph&&n.clear(),r}),n=e.cache;return e}var yh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bh=/\\(\\)?/g,hl=gh(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(yh,function(n,r,i,s){e.push(i?s.replace(bh,"$1"):r||n)}),e});function yn(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var yo=Me?Me.prototype:void 0,bo=yo?yo.toString:void 0;function pl(t){if(typeof t=="string")return t;if(we(t))return yn(t,pl)+"";if(ir(t))return bo?bo.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Ss(t){return t==null?"":pl(t)}function bn(t,e){return we(t)?t:xs(t,e)?[t]:hl(Ss(t))}function At(t){if(typeof t=="string"||ir(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function zr(t,e){e=bn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[At(e[n++])];return n&&n==r?t:void 0}function D(t,e,n){var r=t==null?void 0:zr(t,e);return r===void 0?n:r}const{getOwnPropertyNames:xh,getOwnPropertySymbols:vh}=Object,{hasOwnProperty:Sh}=Object.prototype;function ai(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function pr(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(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=t(n,r,i);return s.delete(n),s.delete(r),l}}function xo(t){return xh(t).concat(vh(t))}const wh=Object.hasOwn||((t,e)=>Sh.call(t,e)),jh="__v",Oh="__o",Eh="_owner",{getOwnPropertyDescriptor:vo,keys:So}=Object,qt=Object.is||function(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n};function Ah(t,e){return t===e}function Ch(t,e){return t.byteLength===e.byteLength&&$r(new Uint8Array(t),new Uint8Array(e))}function _h(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function Ih(t,e){return t.byteLength===e.byteLength&&$r(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Th(t,e){return qt(t.getTime(),e.getTime())}function Nh(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function wo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const u=e.entries();let c=!1,d=0;for(;(a=u.next())&&!a.done;){if(i[d]){d++;continue}const h=o.value,g=a.value;if(n.equals(h[0],g[0],l,d,t,e,n)&&n.equals(h[1],g[1],h[0],g[0],t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}function Ph(t,e,n){const r=So(t);let i=r.length;if(So(e).length!==i)return!1;for(;i-- >0;)if(!gl(t,e,n,r[i]))return!1;return!0}function In(t,e,n){const r=xo(t);let i=r.length;if(xo(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!gl(t,e,n,s)||(o=vo(t,s),a=vo(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function Fh(t,e){return qt(t.valueOf(),e.valueOf())}function $h(t,e){return t.source===e.source&&t.flags===e.flags}function jo(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let o,a;for(;(o=s.next())&&!o.done;){const l=e.values();let u=!1,c=0;for(;(a=l.next())&&!a.done;){if(!i[c]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function $r(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function Dh(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function gl(t,e,n,r){return(r===Eh||r===Oh||r===jh)&&(t.$$typeof||e.$$typeof)?!0:wh(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const Rh=Object.prototype.toString;function kh(t){const e=Bh(t),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:u,getUnsupportedCustomComparator:c}=t;return function(h,g,f){if(h===g)return!0;if(h==null||g==null)return!1;const p=typeof h;if(p!==typeof g)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(h,g,f):p==="function"?i(h,g,f):!1;const y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return a(h,g,f);if(y===Array)return n(h,g,f);if(y===Date)return r(h,g,f);if(y===RegExp)return l(h,g,f);if(y===Map)return s(h,g,f);if(y===Set)return u(h,g,f);if(y===Promise)return!1;if(Array.isArray(h))return n(h,g,f);const x=Rh.call(h),S=e[x];if(S)return S(h,g,f);const E=c&&c(h,g,f,x);return E?E(h,g,f):!1}}function Mh({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:Ch,areArraysEqual:n?In:_h,areDataViewsEqual:Ih,areDatesEqual:Th,areErrorsEqual:Nh,areFunctionsEqual:Ah,areMapsEqual:n?ai(wo,In):wo,areNumbersEqual:qt,areObjectsEqual:n?In:Ph,arePrimitiveWrappersEqual:Fh,areRegExpsEqual:$h,areSetsEqual:n?ai(jo,In):jo,areTypedArraysEqual:n?ai($r,In):$r,areUrlsEqual:Dh,getUnsupportedCustomComparator:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=pr(r.areArraysEqual),s=pr(r.areMapsEqual),o=pr(r.areObjectsEqual),a=pr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Uh(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Lh({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:u=t?new WeakMap:void 0,meta:c}=n();return e(a,l,{cache:u,equals:r,meta:c,strict:i})};if(t)return function(a,l){return e(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 e(a,l,s)}}function Bh({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:g}){return{"[object Arguments]":l,"[object Array]":e,"[object ArrayBuffer]":t,"[object AsyncGeneratorFunction]":s,"[object BigInt]":a,"[object BigInt64Array]":h,"[object BigUint64Array]":h,"[object Boolean]":u,"[object DataView]":n,"[object Date]":r,"[object Error]":i,"[object Float16Array]":h,"[object Float32Array]":h,"[object Float64Array]":h,"[object Function]":s,"[object GeneratorFunction]":s,"[object Int8Array]":h,"[object Int16Array]":h,"[object Int32Array]":h,"[object Map]":o,"[object Number]":u,"[object Object]":(f,p,y)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,y),"[object RegExp]":c,"[object Set]":d,"[object String]":u,"[object URL]":g,"[object Uint8Array]":h,"[object Uint8ClampedArray]":h,"[object Uint16Array]":h,"[object Uint32Array]":h}}ft();ft({strict:!0});ft({circular:!0});ft({circular:!0,strict:!0});ft({createInternalComparator:()=>qt});ft({strict:!0,createInternalComparator:()=>qt});ft({circular:!0,createInternalComparator:()=>qt});ft({circular:!0,createInternalComparator:()=>qt,strict:!0});function ft(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=Mh(t),o=kh(s),a=n?n(o):Uh(o);return Lh({circular:e,comparator:o,createState:r,equals:a,strict:i})}const ie=ft({circular:!0,createCustomConfig:()=>({areFunctionsEqual(t,e){return typeof e=="function"}})});var Tn={exports:{}},li,Oo;function yl(){if(Oo)return li;Oo=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=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(b){let v="",w=0,O=0;for(O=0;O<b.length;O++)if(w=b[O].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=b[O];break}for(O+=1;O<b.length;O++){if(w=b[O].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";v+=b[O]}return v}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(b){return b.length=0,!0}function l(b,v,w){if(b.length){const O=s(b);if(O!=="")v.push(O);else return w.error=!0,!1;b.length=0}return!0}function u(b){let v=0;const w={error:!1,address:"",zone:""},O=[],C=[];let A=!1,_=!1,I=l;for(let T=0;T<b.length;T++){const P=b[T];if(!(P==="["||P==="]"))if(P===":"){if(A===!0&&(_=!0),!I(C,O,w))break;if(++v>7){w.error=!0;break}T>0&&b[T-1]===":"&&(A=!0),O.push(":");continue}else if(P==="%"){if(!I(C,O,w))break;I=a}else{C.push(P);continue}}return C.length&&(I===a?w.zone=C.join(""):_?O.push(C.join("")):O.push(s(C))),w.address=O.join(""),w}function c(b){if(d(b,":")<2)return{host:b,isIPV6:!1};const v=u(b);if(v.error)return{host:b,isIPV6:!1};{let w=v.address,O=v.address;return v.zone&&(w+="%"+v.zone,O+="%25"+v.zone),{host:w,isIPV6:!0,escapedHost:O}}}function d(b,v){let w=0;for(let O=0;O<b.length;O++)b[O]===v&&w++;return w}function h(b){let v=b;const w=[];let O=-1,C=0;for(;C=v.length;){if(C===1){if(v===".")break;if(v==="/"){w.push("/");break}else{w.push(v);break}}else if(C===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){w.push("/");break}}else if(C===3&&v==="/.."){w.length!==0&&w.pop(),w.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),w.length!==0&&w.pop();continue}}if((O=v.indexOf("/",1))===-1){w.push(v);break}else w.push(v.slice(0,O)),v=v.slice(O)}return w.join("")}const g={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function y(b,v){const w=v?p:f;return w.lastIndex=0,b.replace(w,O=>g[O])}function x(b,v=!1){if(b.indexOf("%")===-1)return b;let w="";for(let O=0;O<b.length;O++){if(b[O]==="%"&&O+2<b.length){const C=b.slice(O+1,O+3);if(n(C)){const A=C.toUpperCase(),_=String.fromCharCode(parseInt(A,16));v&&r(_)?w+=_:w+="%"+A,O+=2;continue}}w+=b[O]}return w}function S(b){let v="";for(let w=0;w<b.length;w++){if(b[w]==="%"&&w+2<b.length){const O=b.slice(w+1,w+3);if(n(O)){const C=O.toUpperCase(),A=String.fromCharCode(parseInt(C,16));A!=="."&&r(A)?v+=A:v+="%"+C,w+=2;continue}}i(b[w])?v+=b[w]:v+=escape(b[w])}return v}function E(b){let v="";for(let w=0;w<b.length;w++){if(b[w]==="%"&&w+2<b.length){const O=b.slice(w+1,w+3);if(n(O)){v+="%"+O.toUpperCase(),w+=2;continue}}v+=escape(b[w])}return v}function j(b){const v=[];if(b.userinfo!==void 0&&(v.push(b.userinfo),v.push("@")),b.host!==void 0){let w=unescape(b.host);if(!e(w)){const O=c(w);O.isIPV6===!0?w=`[${O.escapedHost}]`:w=y(w,!1)}v.push(w)}return(typeof b.port=="number"||typeof b.port=="string")&&(v.push(":"),v.push(String(b.port))),v.length?v.join(""):void 0}return li={nonSimpleDomain:o,recomposeAuthority:j,reescapeHostDelimiters:y,normalizePercentEncoding:x,normalizePathEncoding:S,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:e,isUUID:t,normalizeIPv6:c,stringArrayToHexStripped:s},li}var ci,Eo;function Vh(){if(Eo)return ci;Eo=1;const{isUUID:t}=yl(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(b){return n.indexOf(b)!==-1}function i(b){return b.secure===!0?!0:b.secure===!1?!1:b.scheme?b.scheme.length===3&&(b.scheme[0]==="w"||b.scheme[0]==="W")&&(b.scheme[1]==="s"||b.scheme[1]==="S")&&(b.scheme[2]==="s"||b.scheme[2]==="S"):!1}function s(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function o(b){const v=String(b.scheme).toLowerCase()==="https";return(b.port===(v?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function a(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function l(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){const[v,w]=b.resourceName.split("?");b.path=v&&v!=="/"?v:void 0,b.query=w,b.resourceName=void 0}return b.fragment=void 0,b}function u(b,v){if(!b.path)return b.error="URN can not be parsed",b;const w=b.path.match(e);if(w){const O=v.scheme||b.scheme||"urn";b.nid=w[1].toLowerCase(),b.nss=w[2];const C=`${O}:${v.nid||b.nid}`,A=j(C);b.path=void 0,A&&(b=A.parse(b,v))}else b.error=b.error||"URN can not be parsed.";return b}function c(b,v){if(b.nid===void 0)throw new Error("URN without nid cannot be serialized");const w=v.scheme||b.scheme||"urn",O=b.nid.toLowerCase(),C=`${w}:${v.nid||O}`,A=j(C);A&&(b=A.serialize(b,v));const _=b,I=b.nss;return _.path=`${O||v.nid}:${I}`,v.skipEscape=!0,_}function d(b,v){const w=b;return w.uuid=w.nss,w.nss=void 0,!v.tolerant&&(!w.uuid||!t(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function h(b){const v=b;return v.nss=(b.uuid||"").toLowerCase(),v}const g={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:g.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},y={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},E={http:g,https:f,ws:p,wss:y,urn:{scheme:"urn",parse:u,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(E,null);function j(b){return b&&(E[b]||E[b.toLowerCase()])||void 0}return ci={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:j},ci}var Ao;function qh(){if(Ao)return Tn.exports;Ao=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=yl(),{SCHEMES:u,getSchemeHandler:c}=Vh();function d(O,C){return typeof O=="string"?O=j(O,C):typeof O=="object"&&(O=E(p(O,C),C)),O}function h(O,C,A){const _=A?Object.assign({scheme:"null"},A):{scheme:"null"},I=g(E(O,_),E(C,_),_,!0);return _.skipEscape=!0,p(I,_)}function g(O,C,A,_){const I={};return _||(O=E(p(O,A),A),C=E(p(C,A),A)),A=A||{},!A.tolerant&&C.scheme?(I.scheme=C.scheme,I.userinfo=C.userinfo,I.host=C.host,I.port=C.port,I.path=e(C.path||""),I.query=C.query):(C.userinfo!==void 0||C.host!==void 0||C.port!==void 0?(I.userinfo=C.userinfo,I.host=C.host,I.port=C.port,I.path=e(C.path||""),I.query=C.query):(C.path?(C.path[0]==="/"?I.path=e(C.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?I.path="/"+C.path:O.path?I.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+C.path:I.path=C.path,I.path=e(I.path)),I.query=C.query):(I.path=O.path,C.query!==void 0?I.query=C.query:I.query=O.query),I.userinfo=O.userinfo,I.host=O.host,I.port=O.port),I.scheme=O.scheme),I.fragment=C.fragment,I}function f(O,C,A){const _=v(O,A),I=v(C,A);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(O,C){const A={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},_=Object.assign({},C),I=[],T=c(_.scheme||A.scheme);T&&T.serialize&&T.serialize(A,_),A.path!==void 0&&(_.skipEscape?A.path=r(A.path):(A.path=s(A.path),A.scheme!==void 0&&(A.path=A.path.split("%3A").join(":")))),_.reference!=="suffix"&&A.scheme&&I.push(A.scheme,":");const P=n(A);if(P!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(P),A.path&&A.path[0]!=="/"&&I.push("/")),A.path!==void 0){let F=A.path;!_.absolutePath&&(!T||!T.absolutePath)&&(F=e(F)),P===void 0&&F[0]==="/"&&F[1]==="/"&&(F="/%2F"+F.slice(2)),I.push(F)}return A.query!==void 0&&I.push("?",A.query),A.fragment!==void 0&&I.push("#",A.fragment),I.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function x(O,C){if(C[2]!==void 0&&O.path&&O.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof O.port=="number"&&(O.port<0||O.port>65535))return"URI port is malformed."}function S(O,C){const A=Object.assign({},C),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;A.reference==="suffix"&&(A.scheme?O=A.scheme+":"+O:O="//"+O);const P=O.match(y);if(P){_.scheme=P[1],_.userinfo=P[3],_.host=P[4],_.port=parseInt(P[5],10),_.path=P[6]||"",_.query=P[7],_.fragment=P[8],isNaN(_.port)&&(_.port=P[5]);const F=x(_,P);if(F!==void 0&&(_.error=_.error||F,I=!0),_.host)if(a(_.host)===!1){const M=t(_.host);_.host=M.host.toLowerCase(),T=M.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",A.reference&&A.reference!=="suffix"&&A.reference!==_.reference&&(_.error=_.error||"URI is not a "+A.reference+" reference.");const $=c(A.scheme||_.scheme);if(!A.unicodeSupport&&(!$||!$.unicodeSupport)&&_.host&&(A.domainHost||$&&$.domainHost)&&T===!1&&l(_.host))try{_.host=new URL("http://"+_.host).hostname}catch(k){_.error=_.error||"Host's domain name can not be converted to ASCII: "+k}if((!$||$&&!$.skipNormalize)&&(O.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"}$&&$.parse&&$.parse(_,A)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function E(O,C){return S(O,C).parsed}function j(O,C){return b(O,C).normalized}function b(O,C){const{parsed:A,malformedAuthorityOrPort:_}=S(O,C);return{normalized:_?O:p(A,C),malformedAuthorityOrPort:_}}function v(O,C){if(typeof O=="string"){const{normalized:A,malformedAuthorityOrPort:_}=b(O,C);return _?void 0:A}if(typeof O=="object")return p(O,C)}const w={SCHEMES:u,normalize:d,resolve:h,resolveComponent:g,equal:f,serialize:p,parse:E};return Tn.exports=w,Tn.exports.default=w,Tn.exports.fastUri=w,Tn.exports}var zh=qh();const ws=us(zh);var Nn={},Co;function Wh(){if(Co)return Nn;Co=1;var t=/~/,e=/~[01]/g;function n(u){switch(u){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+u)}function r(u){return t.test(u)?u.replace(e,n):u}function i(u,c,d){for(var h,g,f=1,p=c.length;f<p;){if(c[f]==="constructor"||c[f]==="prototype"||c[f]==="__proto__")return u;if(h=r(c[f++]),g=p>f,typeof u[h]>"u"&&(Array.isArray(u)&&h==="-"&&(h=u.length),g&&(c[f]!==""&&c[f]<1/0||c[f]==="-"?u[h]=[]:u[h]={})),!g)break;u=u[h]}var y=u[h];return d===void 0?delete u[h]:u[h]=d,y}function s(u){if(typeof u=="string"){if(u=u.split("/"),u[0]==="")return u;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(u)){for(const c of u)if(typeof c!="string"&&typeof c!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return u}throw new Error("Invalid JSON pointer.")}function o(u,c){if(typeof u!="object")throw new Error("Invalid input object.");c=s(c);var d=c.length;if(d===1)return u;for(var h=1;h<d;){if(u=u[r(c[h++])],d===h)return u;if(typeof u!="object"||u===null)return}}function a(u,c,d){if(typeof u!="object")throw new Error("Invalid input object.");if(c=s(c),c.length===0)throw new Error("Invalid JSON pointer for set.");return i(u,c,d)}function l(u){var c=s(u);return{get:function(d){return o(d,c)},set:function(d,h){return a(d,c,h)}}}return Nn.get=o,Nn.set=a,Nn.compile=l,Nn}var Hh=Wh();const ui=us(Hh);var Kh=Object.prototype;function Wr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Kh;return t===n}var Gh=fl(Object.keys,Object),Yh=Object.prototype,Jh=Yh.hasOwnProperty;function bl(t){if(!Wr(t))return Gh(t);var e=[];for(var n in Object(t))Jh.call(t,n)&&n!="constructor"&&e.push(n);return e}var Wi=Vt(nt,"DataView"),Hi=Vt(nt,"Promise"),on=Vt(nt,"Set"),Ki=Vt(nt,"WeakMap"),_o="[object Map]",Zh="[object Object]",Io="[object Promise]",To="[object Set]",No="[object WeakMap]",Po="[object DataView]",Xh=Bt(Wi),Qh=Bt(Jn),ep=Bt(Hi),tp=Bt(on),np=Bt(Ki),Re=ct;(Wi&&Re(new Wi(new ArrayBuffer(1)))!=Po||Jn&&Re(new Jn)!=_o||Hi&&Re(Hi.resolve())!=Io||on&&Re(new on)!=To||Ki&&Re(new Ki)!=No)&&(Re=function(t){var e=ct(t),n=e==Zh?t.constructor:void 0,r=n?Bt(n):"";if(r)switch(r){case Xh:return Po;case Qh:return _o;case ep:return Io;case tp:return To;case np:return No}return e});var rp="[object Arguments]";function Fo(t){return Ue(t)&&ct(t)==rp}var xl=Object.prototype,ip=xl.hasOwnProperty,sp=xl.propertyIsEnumerable,ln=Fo((function(){return arguments})())?Fo:function(t){return Ue(t)&&ip.call(t,"callee")&&!sp.call(t,"callee")},op=9007199254740991;function js(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=op}function zt(t){return t!=null&&js(t.length)&&!sr(t)}function ap(){return!1}var vl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$o=vl&&typeof module=="object"&&module&&!module.nodeType&&module,lp=$o&&$o.exports===vl,Do=lp?nt.Buffer:void 0,cp=Do?Do.isBuffer:void 0,Rt=cp||ap,up="[object Arguments]",dp="[object Array]",fp="[object Boolean]",mp="[object Date]",hp="[object Error]",pp="[object Function]",gp="[object Map]",yp="[object Number]",bp="[object Object]",xp="[object RegExp]",vp="[object Set]",Sp="[object String]",wp="[object WeakMap]",jp="[object ArrayBuffer]",Op="[object DataView]",Ep="[object Float32Array]",Ap="[object Float64Array]",Cp="[object Int8Array]",_p="[object Int16Array]",Ip="[object Int32Array]",Tp="[object Uint8Array]",Np="[object Uint8ClampedArray]",Pp="[object Uint16Array]",Fp="[object Uint32Array]",he={};he[Ep]=he[Ap]=he[Cp]=he[_p]=he[Ip]=he[Tp]=he[Np]=he[Pp]=he[Fp]=!0;he[up]=he[dp]=he[jp]=he[fp]=he[Op]=he[mp]=he[hp]=he[pp]=he[gp]=he[yp]=he[bp]=he[xp]=he[vp]=he[Sp]=he[wp]=!1;function $p(t){return Ue(t)&&js(t.length)&&!!he[ct(t)]}function Os(t){return function(e){return t(e)}}var Sl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=Sl&&typeof module=="object"&&module&&!module.nodeType&&module,Dp=Vn&&Vn.exports===Sl,di=Dp&&ul.process,cn=(function(){try{var t=Vn&&Vn.require&&Vn.require("util").types;return t||di&&di.binding&&di.binding("util")}catch{}})(),Ro=cn&&cn.isTypedArray,ar=Ro?Os(Ro):$p,Rp="[object Map]",kp="[object Set]",Mp=Object.prototype,Up=Mp.hasOwnProperty;function ge(t){if(t==null)return!0;if(zt(t)&&(we(t)||typeof t=="string"||typeof t.splice=="function"||Rt(t)||ar(t)||ln(t)))return!t.length;var e=Re(t);if(e==Rp||e==kp)return!t.size;if(Wr(t))return!bl(t).length;for(var n in t)if(Up.call(t,n))return!1;return!0}function Lp(){this.__data__=new ut,this.size=0}function Bp(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Vp(t){return this.__data__.get(t)}function qp(t){return this.__data__.has(t)}var zp=200;function Wp(t,e){var n=this.__data__;if(n instanceof ut){var r=n.__data__;if(!Jn||r.length<zp-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new dt(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new ut(t);this.size=e.size}We.prototype.clear=Lp;We.prototype.delete=Bp;We.prototype.get=Vp;We.prototype.has=qp;We.prototype.set=Wp;function Es(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Dr=(function(){try{var t=Vt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function As(t,e,n){e=="__proto__"&&Dr?Dr(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Hp=Object.prototype,Kp=Hp.hasOwnProperty;function Cs(t,e,n){var r=t[e];(!(Kp.call(t,e)&&or(r,n))||n===void 0&&!(e in t))&&As(t,e,n)}function xn(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?As(n,a,l):Cs(n,a,l)}return n}function wl(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Gp=9007199254740991,Yp=/^(?:0|[1-9]\d*)$/;function Hr(t,e){var n=typeof t;return e=e??Gp,!!e&&(n=="number"||n!="symbol"&&Yp.test(t))&&t>-1&&t%1==0&&t<e}var Jp=Object.prototype,Zp=Jp.hasOwnProperty;function jl(t,e){var n=we(t),r=!n&&ln(t),i=!n&&!r&&Rt(t),s=!n&&!r&&!i&&ar(t),o=n||r||i||s,a=o?wl(t.length,String):[],l=a.length;for(var u in t)(e||Zp.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Hr(u,l)))&&a.push(u);return a}function ze(t){return zt(t)?jl(t):bl(t)}function Xp(t,e){return t&&xn(e,ze(e),t)}function Qp(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var eg=Object.prototype,tg=eg.hasOwnProperty;function ng(t){if(!ne(t))return Qp(t);var e=Wr(t),n=[];for(var r in t)r=="constructor"&&(e||!tg.call(t,r))||n.push(r);return n}function lr(t){return zt(t)?jl(t,!0):ng(t)}function rg(t,e){return t&&xn(e,lr(e),t)}var Ol=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ko=Ol&&typeof module=="object"&&module&&!module.nodeType&&module,ig=ko&&ko.exports===Ol,Mo=ig?nt.Buffer:void 0,Uo=Mo?Mo.allocUnsafe:void 0;function El(t,e){if(e)return t.slice();var n=t.length,r=Uo?Uo(n):new t.constructor(n);return t.copy(r),r}function _s(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function sg(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Al(){return[]}var og=Object.prototype,ag=og.propertyIsEnumerable,Lo=Object.getOwnPropertySymbols,Is=Lo?function(t){return t==null?[]:(t=Object(t),sg(Lo(t),function(e){return ag.call(t,e)}))}:Al;function lg(t,e){return xn(t,Is(t),e)}function Ts(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var cg=Object.getOwnPropertySymbols,Cl=cg?function(t){for(var e=[];t;)Ts(e,Is(t)),t=Br(t);return e}:Al;function ug(t,e){return xn(t,Cl(t),e)}function _l(t,e,n){var r=e(t);return we(t)?r:Ts(r,n(t))}function Gi(t){return _l(t,ze,Is)}function Ns(t){return _l(t,lr,Cl)}var dg=Object.prototype,fg=dg.hasOwnProperty;function mg(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&fg.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Rr=nt.Uint8Array;function Ps(t){var e=new t.constructor(t.byteLength);return new Rr(e).set(new Rr(t)),e}function hg(t,e){var n=e?Ps(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var pg=/\w*$/;function gg(t){var e=new t.constructor(t.source,pg.exec(t));return e.lastIndex=t.lastIndex,e}var Bo=Me?Me.prototype:void 0,Vo=Bo?Bo.valueOf:void 0;function yg(t){return Vo?Object(Vo.call(t)):{}}function Il(t,e){var n=e?Ps(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var bg="[object Boolean]",xg="[object Date]",vg="[object Map]",Sg="[object Number]",wg="[object RegExp]",jg="[object Set]",Og="[object String]",Eg="[object Symbol]",Ag="[object ArrayBuffer]",Cg="[object DataView]",_g="[object Float32Array]",Ig="[object Float64Array]",Tg="[object Int8Array]",Ng="[object Int16Array]",Pg="[object Int32Array]",Fg="[object Uint8Array]",$g="[object Uint8ClampedArray]",Dg="[object Uint16Array]",Rg="[object Uint32Array]";function kg(t,e,n){var r=t.constructor;switch(e){case Ag:return Ps(t);case bg:case xg:return new r(+t);case Cg:return hg(t,n);case _g:case Ig:case Tg:case Ng:case Pg:case Fg:case $g:case Dg:case Rg:return Il(t,n);case vg:return new r;case Sg:case Og:return new r(t);case wg:return gg(t);case jg:return new r;case Eg:return yg(t)}}var qo=Object.create,Tl=(function(){function t(){}return function(e){if(!ne(e))return{};if(qo)return qo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Nl(t){return typeof t.constructor=="function"&&!Wr(t)?Tl(Br(t)):{}}var Mg="[object Map]";function Ug(t){return Ue(t)&&Re(t)==Mg}var zo=cn&&cn.isMap,Lg=zo?Os(zo):Ug,Bg="[object Set]";function Vg(t){return Ue(t)&&Re(t)==Bg}var Wo=cn&&cn.isSet,qg=Wo?Os(Wo):Vg,zg=1,Wg=2,Hg=4,Pl="[object Arguments]",Kg="[object Array]",Gg="[object Boolean]",Yg="[object Date]",Jg="[object Error]",Fl="[object Function]",Zg="[object GeneratorFunction]",Xg="[object Map]",Qg="[object Number]",$l="[object Object]",ey="[object RegExp]",ty="[object Set]",ny="[object String]",ry="[object Symbol]",iy="[object WeakMap]",sy="[object ArrayBuffer]",oy="[object DataView]",ay="[object Float32Array]",ly="[object Float64Array]",cy="[object Int8Array]",uy="[object Int16Array]",dy="[object Int32Array]",fy="[object Uint8Array]",my="[object Uint8ClampedArray]",hy="[object Uint16Array]",py="[object Uint32Array]",me={};me[Pl]=me[Kg]=me[sy]=me[oy]=me[Gg]=me[Yg]=me[ay]=me[ly]=me[cy]=me[uy]=me[dy]=me[Xg]=me[Qg]=me[$l]=me[ey]=me[ty]=me[ny]=me[ry]=me[fy]=me[my]=me[hy]=me[py]=!0;me[Jg]=me[Fl]=me[iy]=!1;function qn(t,e,n,r,i,s){var o,a=e&zg,l=e&Wg,u=e&Hg;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!ne(t))return t;var c=we(t);if(c){if(o=mg(t),!a)return _s(t,o)}else{var d=Re(t),h=d==Fl||d==Zg;if(Rt(t))return El(t,a);if(d==$l||d==Pl||h&&!i){if(o=l||h?{}:Nl(t),!a)return l?ug(t,rg(o,t)):lg(t,Xp(o,t))}else{if(!me[d])return i?t:{};o=kg(t,d,a)}}s||(s=new We);var g=s.get(t);if(g)return g;s.set(t,o),qg(t)?t.forEach(function(y){o.add(qn(y,e,n,y,t,s))}):Lg(t)&&t.forEach(function(y,x){o.set(x,qn(y,e,n,x,t,s))});var f=u?l?Ns:Gi:l?lr:ze,p=c?void 0:f(t);return Es(p||t,function(y,x){p&&(x=y,y=t[x]),Cs(o,x,qn(y,e,n,x,t,s))}),o}function Dl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function gy(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function yy(t,e){return e.length<2?t:zr(t,gy(e,0,-1))}var by=Object.prototype,xy=by.hasOwnProperty;function Rl(t,e){e=bn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=At(e[n]);if(i==="__proto__"&&!xy.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=yy(t,e);return s==null||delete s[At(Dl(e))]}function vy(t){return Et(t)?void 0:t}var Ho=Me?Me.isConcatSpreadable:void 0;function Sy(t){return we(t)||ln(t)||!!(Ho&&t&&t[Ho])}function cr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=Sy),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?cr(a,e-1,n,r,i):Ts(i,a):r||(i[i.length]=a)}return i}function Yi(t){var e=t==null?0:t.length;return e?cr(t,1):[]}function wy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var Ko=Math.max;function kl(t,e,n){return e=Ko(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Ko(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),wy(t,this,a)}}function jy(t){return function(){return t}}function Kr(t){return t}var Oy=Dr?function(t,e){return Dr(t,"toString",{configurable:!0,enumerable:!1,value:jy(e),writable:!0})}:Kr,Ey=800,Ay=16,Cy=Date.now;function _y(t){var e=0,n=0;return function(){var r=Cy(),i=Ay-(r-n);if(n=r,i>0){if(++e>=Ey)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Ml=_y(Oy);function Ul(t){return Ml(kl(t,void 0,Yi),t+"")}var Iy=1,Ty=2,Ny=4,un=Ul(function(t,e){var n={};if(t==null)return n;var r=!1;e=yn(e,function(s){return s=bn(s,t),r||(r=s.length>1),s}),xn(t,Ns(t),n),r&&(n=qn(n,Iy|Ty|Ny,vy));for(var i=e.length;i--;)Rl(n,e[i]);return n});function kr(t,e){if(de in t&&ws.equal(t[de],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(ne(r)){const i=kr(r,e);if(i!==void 0)return i}}else if(ne(n)){const r=kr(n,e);if(r!==void 0)return r}}function Ji(t,e){const n=D(t,de,e);let r=t;ue in r&&(r={...r,[ue]:ws.resolve(n,r[ue])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>ne(o)?Ji(o,n):o)}:ne(s)&&(r={...r,[i]:Ji(s,n)});return r}function Fs(t,e){const n=e[t];return[un(e,[t]),n]}function Ll(t,e={},n=[],r=D(e,[de])){const i=t||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||de in e&&e[de]===o?s=ui.get(e,l):e[Dn]===Or&&(s=kr(e,o.replace(/\/$/,"")),s!==void 0&&(s=ui.get(s,l)))}else if(e[Dn]===Or){const l=o?ws.resolve(o,i):i,[u,...c]=l.replace(/#\/?$/,"").split("#");s=kr(e,u.replace(/\/$/,"")),s!==void 0&&(o=s[de],ge(c)||(s=ui.get(s,decodeURIComponent(c.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const a=s[ue];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...h]=n,g=[...h,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${g}`)}const[l,u]=Fs(ue,s),c=Ll(u,e,[...n,i],o);return Object.keys(l).length>0?e[Dn]===um||e[Dn]===Or?{[Ot]:[l,c]}:{...l,...c}:c}return s}function Zn(t,e={},n=D(e,[de])){return Ll(t,e,[],n)}var Py=Object.prototype,Fy=Py.hasOwnProperty;function $y(t,e){return t!=null&&Fy.call(t,e)}function Bl(t,e,n){e=bn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=At(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&js(i)&&Hr(o,i)&&(we(t)||ln(t)))}function X(t,e){return t!=null&&Bl(t,e,$y)}var Dy="[object String]";function Ct(t){return typeof t=="string"||!we(t)&&Ue(t)&&ct(t)==Dy}function He(t){let e;const n=D(t,om);return Ct(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}var Ry=1/0;function ky(t){var e=t==null?0:t.length;return e?cr(t,Ry):[]}function Zi(t,e,n){(n!==void 0&&!or(t[e],n)||n===void 0&&!(e in t))&&As(t,e,n)}function My(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var Vl=My();function Xn(t){return Ue(t)&&zt(t)}function Xi(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Uy(t){return xn(t,lr(t))}function Ly(t,e,n,r,i,s,o){var a=Xi(t,n),l=Xi(e,n),u=o.get(l);if(u){Zi(t,n,u);return}var c=s?s(a,l,n+"",t,e,o):void 0,d=c===void 0;if(d){var h=we(l),g=!h&&Rt(l),f=!h&&!g&&ar(l);c=l,h||g||f?we(a)?c=a:Xn(a)?c=_s(a):g?(d=!1,c=El(l,!0)):f?(d=!1,c=Il(l,!0)):c=[]:Et(l)||ln(l)?(c=a,ln(a)?c=Uy(a):(!ne(a)||sr(a))&&(c=Nl(l))):d=!1}d&&(o.set(l,c),i(c,l,r,s,o),o.delete(l)),Zi(t,n,c)}function ql(t,e,n,r,i){t!==e&&Vl(e,function(s,o){if(i||(i=new We),ne(s))Ly(t,e,o,n,ql,r,i);else{var a=r?r(Xi(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Zi(t,o,a)}},lr)}function Gr(t,e){return Ml(kl(t,e,Kr),t+"")}function By(t,e,n){if(!ne(n))return!1;var r=typeof e;return(r=="number"?zt(n)&&Hr(e,n.length):r=="string"&&e in n)?or(n[e],t):!1}function Vy(t){return Gr(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&By(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var qy=Vy(function(t,e,n){ql(t,e,n)});function $s(t,e,n,r){if(!ne(t))return t;e=bn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=At(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var c=a[l];u=r?r(c,l,a):void 0,u===void 0&&(u=ne(c)?c:Hr(e[i+1])?[]:{})}Cs(a,l,u),a=a[l]}return t}function ce(t,e,n){return t==null?t:$s(t,e,n)}function zl(t){return typeof t=="function"?t:Kr}var zy=/\s/;function Wy(t){for(var e=t.length;e--&&zy.test(t.charAt(e)););return e}var Hy=/^\s+/;function Ky(t){return t&&t.slice(0,Wy(t)+1).replace(Hy,"")}var Go=NaN,Gy=/^[-+]0x[0-9a-f]+$/i,Yy=/^0b[01]+$/i,Jy=/^0o[0-7]+$/i,Zy=parseInt;function Xy(t){if(typeof t=="number")return t;if(ir(t))return Go;if(ne(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ne(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ky(t);var n=Yy.test(t);return n||Jy.test(t)?Zy(t.slice(2),n?2:8):Gy.test(t)?Go:+t}var Yo=1/0,Qy=17976931348623157e292;function eb(t){if(!t)return t===0?t:0;if(t=Xy(t),t===Yo||t===-Yo){var e=t<0?-1:1;return e*Qy}return t===t?t:0}function Wl(t){var e=eb(t),n=e%1;return e===e?n?e-n:e:0}var tb=9007199254740991,fi=4294967295,nb=Math.min;function Hl(t,e){if(t=Wl(t),t<1||t>tb)return[];var n=fi,r=nb(t,fi);e=zl(e),t-=fi;for(var i=wl(r,e);++n<t;)e(n);return i}function Kl(t,e){return t&&Vl(t,e,ze)}var rb="__lodash_hash_undefined__";function ib(t){return this.__data__.set(t,rb),this}function sb(t){return this.__data__.has(t)}function kt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new dt;++e<n;)this.add(t[e])}kt.prototype.add=kt.prototype.push=ib;kt.prototype.has=sb;function ob(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Qn(t,e){return t.has(e)}var ab=1,lb=2;function Gl(t,e,n,r,i,s){var o=n&ab,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var d=-1,h=!0,g=n&lb?new kt:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var f=t[d],p=e[d];if(r)var y=o?r(p,f,d,e,t,s):r(f,p,d,t,e,s);if(y!==void 0){if(y)continue;h=!1;break}if(g){if(!ob(e,function(x,S){if(!Qn(g,S)&&(f===x||i(f,x,n,r,s)))return g.push(S)})){h=!1;break}}else if(!(f===p||i(f,p,n,r,s))){h=!1;break}}return s.delete(t),s.delete(e),h}function cb(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Ds(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var ub=1,db=2,fb="[object Boolean]",mb="[object Date]",hb="[object Error]",pb="[object Map]",gb="[object Number]",yb="[object RegExp]",bb="[object Set]",xb="[object String]",vb="[object Symbol]",Sb="[object ArrayBuffer]",wb="[object DataView]",Jo=Me?Me.prototype:void 0,mi=Jo?Jo.valueOf:void 0;function jb(t,e,n,r,i,s,o){switch(n){case wb:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Sb:return!(t.byteLength!=e.byteLength||!s(new Rr(t),new Rr(e)));case fb:case mb:case gb:return or(+t,+e);case hb:return t.name==e.name&&t.message==e.message;case yb:case xb:return t==e+"";case pb:var a=cb;case bb:var l=r&ub;if(a||(a=Ds),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=db,o.set(t,e);var c=Gl(a(t),a(e),r,i,s,o);return o.delete(t),c;case vb:if(mi)return mi.call(t)==mi.call(e)}return!1}var Ob=1,Eb=Object.prototype,Ab=Eb.hasOwnProperty;function Cb(t,e,n,r,i,s){var o=n&Ob,a=Gi(t),l=a.length,u=Gi(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:Ab.call(e,h)))return!1}var g=s.get(t),f=s.get(e);if(g&&f)return g==e&&f==t;var p=!0;s.set(t,e),s.set(e,t);for(var y=o;++d<l;){h=a[d];var x=t[h],S=e[h];if(r)var E=o?r(S,x,h,e,t,s):r(x,S,h,t,e,s);if(!(E===void 0?x===S||i(x,S,n,r,s):E)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var j=t.constructor,b=e.constructor;j!=b&&"constructor"in t&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof b=="function"&&b instanceof b)&&(p=!1)}return s.delete(t),s.delete(e),p}var _b=1,Zo="[object Arguments]",Xo="[object Array]",gr="[object Object]",Ib=Object.prototype,Qo=Ib.hasOwnProperty;function Tb(t,e,n,r,i,s){var o=we(t),a=we(e),l=o?Xo:Re(t),u=a?Xo:Re(e);l=l==Zo?gr:l,u=u==Zo?gr:u;var c=l==gr,d=u==gr,h=l==u;if(h&&Rt(t)){if(!Rt(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new We),o||ar(t)?Gl(t,e,n,r,i,s):jb(t,e,l,n,r,i,s);if(!(n&_b)){var g=c&&Qo.call(t,"__wrapped__"),f=d&&Qo.call(e,"__wrapped__");if(g||f){var p=g?t.value():t,y=f?e.value():e;return s||(s=new We),i(p,y,n,r,s)}}return h?(s||(s=new We),Cb(t,e,n,r,i,s)):!1}function Yr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ue(t)&&!Ue(e)?t!==t&&e!==e:Tb(t,e,n,r,Yr,i)}var Nb=1,Pb=2;function Fb(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],u=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var c=new We,d;if(!(d===void 0?Yr(u,l,Nb|Pb,r,c):d))return!1}}return!0}function Yl(t){return t===t&&!ne(t)}function $b(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Yl(i)]}return e}function Jl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Db(t){var e=$b(t);return e.length==1&&e[0][2]?Jl(e[0][0],e[0][1]):function(n){return n===t||Fb(n,t,e)}}function Rb(t,e){return t!=null&&e in Object(t)}function Zl(t,e){return t!=null&&Bl(t,e,Rb)}var kb=1,Mb=2;function Ub(t,e){return xs(t)&&Yl(e)?Jl(At(t),e):function(n){var r=D(n,t);return r===void 0&&r===e?Zl(n,t):Yr(e,r,kb|Mb)}}function Lb(t){return function(e){return e?.[t]}}function Bb(t){return function(e){return zr(e,t)}}function Vb(t){return xs(t)?Lb(At(t)):Bb(t)}function Rs(t){return typeof t=="function"?t:t==null?Kr:typeof t=="object"?we(t)?Ub(t[0],t[1]):Db(t):Vb(t)}function qb(t,e,n){var r=we(t),i=r||Rt(t)||ar(t);if(e=Rs(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:ne(t)?n=sr(s)?Tl(Br(t)):{}:n={}}return(i?Es:Kl)(t,function(o,a,l){return e(n,o,a,l)}),n}function zb(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Wb(t){return t!==t}function Hb(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Xl(t,e,n){return e===e?Hb(t,e,n):zb(t,Wb,n)}function ks(t,e){var n=t==null?0:t.length;return!!n&&Xl(t,e,0)>-1}function Er(){}var Kb=1/0,Gb=on&&1/Ds(new on([,-0]))[1]==Kb?function(t){return new on(t)}:Er,Yb=200;function Ql(t,e,n){var r=-1,i=ks,s=t.length,o=!0,a=[],l=a;if(s>=Yb){var u=Gb(t);if(u)return Ds(u);o=!1,i=Qn,l=new kt}else l=a;e:for(;++r<s;){var c=t[r],d=c;if(c=c!==0?c:0,o&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function ec(t){return t&&t.length?Ql(t):[]}function er(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":typeof t=="number"&&!Number.isNaN(t)?"number":typeof t=="object"?"object":"string"}var Jb=Gr(function(t){return Ql(cr(t,1,Xn,!0))});function Le(t){let{type:e}=t;return!e&&t.const?er(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties||t.patternProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(n=>n!=="null"):e=e[0]),e)}function at(t,e){const n={...t};return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];return t&&i in t&&q(o)?r[i]=at(s,o):t&&e&&(Le(t)==="object"||Le(e)==="object")&&i===sl&&Array.isArray(s)&&Array.isArray(o)?r[i]=Jb(s,o):r[i]=o,r},n)}var Zb="[object Number]";function tc(t){return typeof t=="number"||Ue(t)&&ct(t)==Zb}function nc(t,e,n){var r;if(t&&n){const i=D(t,n);if(i===void 0)return;for(let s=0;s<e.length;s+=1){const o=e[s],a=D(o,[se,n],{});if(a.type!=="object"&&a.type!=="array"&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function Mr(t,e,n,r,i){if(e===void 0)return 0;const s=nc(e,n,i);if(tc(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&X(a,[se,i])){const l=D(e,i),u=D(a,[se,i],{});if(t.isValid(u,l,r))return o}else if(a[se]){const l={anyOf:Object.keys(a[se]).map(c=>({required:[c]}))};let u;if(a.anyOf){const{...c}=a;c.allOf?c.allOf=c.allOf.slice():c.allOf=[],c.allOf.push(l),u=c}else u={...a,...l};if(delete u.required,t.isValid(u,e,r))return o}else if(t.isValid(a,e,r))return o}return 0}const Xb=Object.prototype;function Rn(t){for(const e in t)if(Xb.hasOwnProperty.call(t,e))return!1;return!0}const Qb=["array","boolean","integer","null","number","object","string"];new Set(Qb);const e0=["$defs","definitions","properties","patternProperties","dependencies"];new Set(e0);const t0=["items","allOf","oneOf","anyOf"];new Set(t0);const n0=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(n0);function Ar(t){return typeof t=="object"}function Ye(t){return Ar(t)?Rn(t):t===!0}function nn(t,e){return t<e?-1:t>e?1:0}function hi(t,e){const n=t.length;if(n===0)return e;let r=e.length;if(r===0)return t;if(n<r){const s=t;t=e,e=s,r=n}const i=new Set(t);for(let s=0;s<r;s++)i.add(e[s]);return Array.from(i)}function r0(t,e){const n=[];if(t.length===0||e.length===0)return n;if(t.length>e.length){const i=t;t=e,e=i}const r=new Set(e);for(let i=0;i<t.length&&r.size>0;i++){const s=t[i];r.delete(s)&&n.push(s)}return n}function ea(t){return t.length===0}function pi(t){return(e,n)=>{const r=e.length-n.length;if(r!==0)return r;for(let i=0;i<e.length;i++)if(e[i]!==n[i]){const s=t(e[i],n[i]);if(s!==0)return s}return 0}}function rc(t,{threshold:e=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=e){const o=[];let a=0;e:for(let l=0;l<r;l++){const u=n[l];for(let c=0;c<a;c++)if(t(u,o[c])===0)continue e;a=o.push(u)}return o}const i=n.slice().sort(t);let s=0;for(let o=1;o<r;o++)t(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function i0(t){return(e,n)=>{const r=[];let i=e.length,s=n.length;if(i===0||s===0)return r;if(i>s){const c=e;e=n,n=c;const d=i;i=s,s=d}const o=[...e].sort(t),a=[...n].sort(t);let l=0,u=0;for(;l<i&&u<s;){const c=t(o[l],a[u]);c===0?((r.length===0||t(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,u++):c<0?l++:u++}return r}}function s0(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const ta=s0,ic=()=>0,o0=t=>t===void 0,a0=t=>typeof t!="object",na={boolean:0,number:1,string:2};function l0(t,e){const n=typeof t,r=typeof e;return n===r?nn(t,e):na[n]-na[r]}function c0(t,e){const n=t.length;if(n===0)return e;const r=e.length;if(r===0)return t;if(r>n){const o=t;t=e,e=o}const i=new Set(t),s=e.length;for(let o=0;o<s;o++){const a=e[o];i.has(a)||t.push(a)}return t}function Jr(t,e,n=ic){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function Xt(t){return Jr(o0,t)}function pt(t,e){return Jr(n=>n===void 0||t(n),e)}function gi(t,e){return Jr(Array.isArray,t,e)}const be=Xt(nn),yi=pt(t=>t===0,(t,e)=>t-e);function u0({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=ta(e,p=>Object.keys(p).sort());function r(p){return(y,x)=>{const S=n(y),E=n(x),j=Math.min(S.length,E.length);for(let b=0;b<j;b++){const v=nn(S[b],E[b]);if(v!==0)return v}if(S.length!==E.length)return S.length-E.length;for(let b=0;b<j;b++){const v=S[b],w=p(y[v],x[v]);if(w!==0)return w}return 0}}function i(p){const y=pi(p),x=ta(t,rc(p,{threshold:0}));return(S,E)=>y(x(S),x(E))}const s=i(nn);function o(p,y){if(Ar(p)){if(Ar(y)){const x=Object.keys(p),S=Object.keys(y),E=c0(x,S),j=E.length;for(let b=0;b<j;b++){const v=E[b];if(p[v]===y[v])continue;const O=(f[v]??a)(p[v],y[v]);if(O!==0)return O}return 0}return y===!0&&Rn(p)?0:1}return Ar(y)?p===!0&&Rn(y)?0:-1:nn(p,y)}const a=Xt(u),l=Jr(a0,gi(r(a),pi(u)),l0);function u(p,y){return p===null?-1:y===null?1:l(p,y)}const c=Xt(o),d=pt(Rn,r(c)),h=Xt(i(o)),g=pt(Ye,o),f={$id:be,$comment:be,$defs:d,$ref:be,$schema:be,const:a,contains:c,contentEncoding:be,contentMediaType:be,default:a,definitions:d,description:be,else:c,examples:a,exclusiveMaximum:be,exclusiveMinimum:be,format:be,if:c,maximum:be,maxItems:be,maxLength:be,maxProperties:be,minimum:be,multipleOf:be,not:c,pattern:be,propertyNames:c,readOnly:be,then:c,title:be,writeOnly:be,uniqueItems:pt(p=>p===!1,ic),minLength:yi,minItems:yi,minProperties:yi,required:pt(ea,s),enum:pt(ea,i(u)),type:Xt((p,y)=>{const x=Array.isArray(p),S=Array.isArray(y);return!x&&!S?nn(p,y):s(x?p:[p],S?y:[y])}),items:pt(p=>!Array.isArray(p)&&Ye(p),gi(o,pi(o))),anyOf:h,allOf:h,oneOf:h,properties:d,patternProperties:d,additionalProperties:g,additionalItems:g,dependencies:pt(Rn,r(Xt(gi(o,s))))};return{compareSchemaValues:u,compareSchemaDefinitions:o}}function ra(t){return t}const sc=(t,e)=>t?sc(e%t,t):e,d0=(t,e)=>Math.abs(t*e)/sc(t,e);function f0(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function bi(t,e,n){const r=t.length,i=e.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=t[s];for(let a=0;a<i;a++)n(o,e[a])}}function xi(t,e){return t||e}function ia(t){return(e,n)=>{const r={...e},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=e[a]===void 0?n[a]:t(e[a],n[a])}return r}}function m0(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function Tt(t,e,n){n===void 0||Ye(n)?delete t[e]:t[e]=n}const h0=["properties","patternProperties","additionalProperties"];function sa(t){const e=Object.keys(t),n=e.length,r=[];for(let i=0;i<n;i++){const s=e[i];r.push({regExp:new RegExp(s),schema:t[s]})}return[r,e]}const oa=[[],[]];function aa(t,e,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(e))continue;const o=s.schema;if(o===!1)return!0;t.push(o)}return!1}const p0=["items","additionalItems"],g0=["if","then","else"];function la(t,e){return e.if!==void 0&&(t.if=e.if),e.then!==void 0&&(t.then=e.then),e.else!==void 0&&(t.else=e.else),t}function vi(t,e){if(t===e)return t;switch(t){case"number":if(e==="integer")return"integer";case"integer":if(e==="number")return"integer";default:return}}function Nt(t,e,n){return[t,e,n]}function y0(t){const e=new Map;for(const[n,r,i]of t){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=e.get(o[0]);a===void 0&&(a=[],e.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return e}const b0=[Nt("minimum","maximum",t=>t.maximum>=t.minimum),Nt("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Nt("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Nt("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Nt("minLength","maxLength",t=>t.maxLength>=t.minLength),Nt("minItems","maxItems",t=>t.maxItems>=t.minItems),Nt("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function x0({mergePatterns:t=f0,isSubRegExp:e=Object.is,intersectJson:n=r0,deduplicateJsonSchemaDef:r=ra,defaultMerger:i=ra,assigners:s=[],checks:o=b0,mergers:a}={}){function l(j){const b=j.length;let v=j[0];for(let w=1;w<b;w++){const O=x(v,j[w]);if(O===!1)return!1;Ye(O)||(v=O)}return v}function u(j,b,v,w,O,C,A){if(j.length=0,v===!1)return!1;if(j.push(v),O!==void 0){if(O===!1)return!1;j.push(O)}if(aa(j,b,C))return!1;const I=j.length<2;if(A===!1){if(I)return;if(aa(j,b,w))return!1}else I&&A!==void 0&&j.push(A);return j.length===1?j[0]:l(j)}function c(j,b,v,w,O,C){const A=v.length;if(A>0&&O!==!1)if(C)Object.assign(j,b);else for(let _=0;_<A;_++){const I=v[_];w.has(I)||(j[I]=x(b[I],O))}return j}const d=(j,{properties:b={},patternProperties:v,additionalProperties:w=!0},{properties:O={},patternProperties:C,additionalProperties:A=!0})=>{const _=Ye(w),I=Ye(A);if(_&&I)return Tt(j,"properties",S(b,O)),Tt(j,"patternProperties",v&&C?S(v,C):v??C),delete j.additionalProperties,j;const T=x(w,A);Tt(j,"additionalProperties",T);const P={},F=Object.keys(b),$=F.length,[k,M]=v?sa(v):oa,[U,J]=C?sa(C):oa,ae=[],fe=new Set,ye=I?void 0:A;for(let z=0;z<$;z++){const re=F[z];fe.add(re);const oe=u(ae,re,b[re],k,O[re],U,ye);oe!==void 0&&(P[re]=oe)}const L=Object.keys(O),le=L.length,te=_?void 0:w;for(let z=0;z<le;z++){const re=L[z];if(fe.has(re))continue;const oe=u(ae,re,O[re],U,void 0,k,te);oe!==void 0&&(P[re]=oe)}Tt(j,"properties",P);let H={};const K=new Set;return M.length>0&&J.length>0&&bi(M,J,(z,re)=>{e(z,re)&&K.add(z),e(re,z)&&K.add(re),H[t(z,re)]=x(v[z],C[re])}),H=c(H,v,M,K,A,I),H=c(H,C,J,K,w,_),Tt(j,"patternProperties",H),j},h=(j,{items:b=[],additionalItems:v},{items:w=[],additionalItems:O})=>{const C=Array.isArray(b),A=Array.isArray(w),_=[];if(j.items=_,C&&A){const[I,T,P]=b.length<w.length?[b.length,v,w]:[w.length,O,b];let F=0;for(;F<I;F++)_.push(x(b[F],w[F]));if(T===!1)j.additionalItems=!1;else{const $=T===void 0||Ye(T);for(;F<P.length;F++)_.push($?P[F]:x(P[F],T));Tt(j,"additionalItems",v!==void 0&&O!==void 0?x(v,O):v??O)}}else if(C||A){const[I,T,P]=C?[b,w,v]:[w,b,O];Tt(j,"additionalItems",P&&x(P,T));for(let F=0;F<I.length;F++)_.push(x(I[F],T))}else delete j.additionalItems,j.items=x(b,w);return j},g=(j,b,v)=>{la(j,b);const w=la({},v);return j.allOf===void 0?j.allOf=[w]:j.allOf=j.allOf.concat(w),j};function f(j,b){const v=[];if(bi(j,b,(w,O)=>{try{v.push(x(w,O))}catch{}}),v.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(j)}" and "${JSON.stringify(b)}"; the merged result is empty`);return r(v)}const p=m0([[h0,d],[p0,h],[g0,g],...s]),y=y0(o);function x(j,b){if(j===!1||b===!1)return!1;if(Ye(j))return Ye(b)?!0:b;if(Ye(b))return j;let v={...j};const w=new Set,O=new Set,C=Object.keys(b),A=C.length;for(let _=0;_<A;_++){const I=C[_],T=b[I];if(T===void 0)continue;const P=y.get(I);if(P!==void 0){const M=P.length;for(let U=0;U<M;U++){const J=P[U];j[J.oppositeKey]!==void 0&&O.add(J.check)}}const F=j[I];if(F===void 0){v[I]=T;continue}const $=p.get(I);if($){w.add($);continue}const k=E[I]??i;v[I]=k(F,T)}for(const _ of w)v=_(v,j,b);for(const _ of O)_(v);return v}const S=ia(x),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(j,b)=>{if(j===b)return j;const v=Array.isArray(j),w=Array.isArray(b);if(!v&&!w){const O=vi(j,b);if(O!==void 0)return O}else if(v||w){const O=new Set;if(v&&w)bi(j,b,(A,_)=>{const I=vi(A,_);I!==void 0&&O.add(I)});else{const A=v?j:b,_=v?b:j,I=A.length;for(let T=0;T<I;T++){const P=vi(_,A[T]);P!==void 0&&O.add(P)}}const C=O.size;if(C===1)return O.values().next().value;if(C>1)return Array.from(O)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${j.toString()}, ${b.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(j,b)=>{const v=r([j,b]);return v.length===1?v[0]:{anyOf:v}},pattern:t,readOnly:xi,writeOnly:xi,enum:(j,b)=>{const v=n(j,b);if(v.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(j)}", "${JSON.stringify(b)}"`);return v},anyOf:f,oneOf:f,allOf:(j,b)=>r(j.concat(b)),propertyNames:x,contains:x,dependencies:ia((j,b)=>Array.isArray(j)?Array.isArray(b)?hi(j,b):x(b,{required:j}):Array.isArray(b)?x(j,{required:b}):x(j,b)),examples:(j,b)=>{if(!Array.isArray(j)||!Array.isArray(b))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(j)}" and "${JSON.stringify(b)}"`);return hi(j,b)},multipleOf:(j,b)=>{let v=1;for(;!Number.isInteger(j)||!Number.isInteger(b);)v*=10,j*=10,b*=10;return d0(j,b)/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:xi,required:hi,...a};return{mergeSchemaDefinitions:x,mergeArrayOfSchemaDefinitions:l}}function v0(t){const e=[],n=[t];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){e.push(r);continue}const{allOf:i,...s}=r;e.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return e}function S0(t){return e=>t(v0(e))}const{compareSchemaDefinitions:w0,compareSchemaValues:j0}=u0(),{mergeArrayOfSchemaDefinitions:O0}=x0({intersectJson:i0(j0),deduplicateJsonSchemaDef:rc(w0)}),oc=S0(O0);function Ce(t,e,n={},r,i,s=!1){return Ze(t,e,n,r,void 0,void 0,i,s)[0]}function E0(t,e,n,r,i,s,o){const{if:a,then:l,else:u,...c}=e,d=t.isValid(a,s||{},n);let h=[c],g=[];if(r)l&&typeof l!="boolean"&&(g=g.concat(Ze(t,l,n,s,r,i,o))),u&&typeof u!="boolean"&&(g=g.concat(Ze(t,u,n,s,r,i,o)));else{const f=d?l:u;f&&typeof f!="boolean"&&(g=g.concat(Ze(t,f,n,s,r,i,o)))}return g.length&&(h=g.map(f=>at(c,f))),h.flatMap(f=>Ze(t,f,n,s,r,i,o))}function ac(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>Hl(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function lc(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ce(n,[r],t.patternProperties[r]),n),{})}function A0(t,e,n,r,i,s,o,a){const l=cc(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(ps in e)return dc(t,e,n,r,i,s,o).flatMap(c=>Ze(t,c,n,s,r,i,o));if(Ot in e&&Array.isArray(e[Ot])){const u=e.allOf.map(d=>Ze(t,d,n,s,r,i,o));return ac(u).map(d=>({...e,allOf:d}))}return[e]}function cc(t,e,n,r,i,s,o,a){const l=St(e,n,i,void 0,a);return l!==e?Ze(t,l,n,s,r,i,o,a):[e]}function St(t,e,n,r,i){if(!q(t))return t;let s=t,o=r;if(ue in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...Zn(a,e,o),...l,[Bn]:a},de in s&&(o=s[de])}if(se in s){const a=[],l=qb(s[se],(u,c,d)=>{const h=[...n];u[d]=St(c,e,h,o,i),a.push(h)},{});qy(n,ec(ky(a))),s={...s,[se]:l}}if(an in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:St(s.items,e,n,o,i)}),i){let a,l;ee in t&&Array.isArray(t[ee])?(a=ee,l=s[ee]):W in t&&Array.isArray(t[W])&&(a=W,l=s[W]),a&&l&&(s={...s,[a]:l.map(u=>St(u,e,n,o,i))})}return ie(t,s)?t:s}function C0(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&q(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(Vi in s){const l=lc(s,a);if(!ge(l)){s.properties[a]=Ce(t,{[Ot]:Object.values(l)},n,D(o,[a]),i),ce(s.properties,[a,ot],!0);return}}if(tn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ue in s.additionalProperties?l=Ce(t,{[ue]:D(s.additionalProperties,[ue])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ee in s.additionalProperties||W in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:er(D(o,[a]))}:l={type:er(D(o,[a]))},s.properties[a]=l,ce(s.properties,[a,ot],!0)}else s.properties[a]={type:"null"},ce(s.properties,[a,ot],!0)}}),s}function _0(t){return oc(t)}function Ze(t,e,n,r,i=!1,s=[],o,a){return q(e)?A0(t,e,n,i,s,r,o,a).flatMap(u=>{var c;let d=u;if(gs in d)return E0(t,d,n,i,s,r,o);if(Ot in d){if(i){const{allOf:g,...f}=d;return[...g,f]}try{const g=[],f=[];(c=d.allOf)===null||c===void 0||c.forEach(p=>{typeof p=="object"&&p.contains?g.push(p):f.push(p)}),g.length&&(d={...d,allOf:f}),d=o?o(d):_0(d),g.length&&(d.allOf=g)}catch(g){console.warn(`could not merge subschemas in allOf:
|
|
2
2
|
`,g);const{allOf:f,...p}=d;return p}}return se in d&&Vi in d&&(d=Object.keys(d.properties).reduce((g,f)=>{const p=lc(g,f);return ge(p)||(g.properties[f]=Ce(t,{allOf:[g.properties[f],...Object.values(p)]},n,D(r,[f]),o)),g},{...d,properties:{...d.properties}})),Vi in d||tn in d&&d.additionalProperties!==!1?C0(t,d,n,r,o):d}):[{}]}function I0(t,e,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=e;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const u=i===void 0&&r?{}:i,c=He(e);s=s.map(h=>St(h,n,[]));const d=Mr(t,u,s,n,c);if(r){const h=uc(s,!1,n);return Mr(t,u,h,n,c),s.map(g=>at(l,g))}return[at(l,s[d])]}return[e]}function uc(t,e=!1,n){return t.map(r=>{if(!q(r))return r?{}:{not:{}};const i=e&&n?St(r,n,[]):r;return i.additionalProperties===!1?{...i,additionalProperties:!0}:i})}function dc(t,e,n,r,i,s,o){const{dependencies:a,...l}=e;return I0(t,l,n,r,s).flatMap(c=>fc(t,a,c,n,r,i,s,o))}function fc(t,e,n,r,i,s,o,a){let l=[n];for(const u in e)if((i||D(o,[u])!==void 0)&&(!n.properties||u in n.properties)){const[c,d]=Fs(u,e);return Array.isArray(d)?l[0]=T0(n,d):q(d)&&(l=N0(t,n,r,u,d,i,s,o,a)),l.flatMap(h=>fc(t,c,h,r,i,s,o,a))}return l}function T0(t,e){if(!e)return t;const n=Array.isArray(t.required)?Array.from(new Set([...t.required,...e])):e;return{...t,required:n}}function N0(t,e,n,r,i,s,o,a,l){return Ze(t,i,n,a,s,o,l).flatMap(c=>{const{oneOf:d,...h}=c,g=at(e,h);if(d===void 0)return g;const f=d.map(y=>typeof y=="boolean"||!(ue in y)?[y]:cc(t,y,n,s,o,a));return ac(f).flatMap(y=>P0(t,g,n,r,y,s,o,a,l))})}function P0(t,e,n,r,i,s,o,a,l){const u=i.filter(c=>{if(typeof c=="boolean"||!c||!c.properties)return!1;const{[r]:d}=c.properties;if(d){const h={type:"object",properties:{[r]:d}};return t.isValid(h,a,n)||s}return!1});return!s&&u.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[e]):u.flatMap(c=>{const d=c,[h]=Fs(r,d.properties),g={...d,properties:h};return Ze(t,g,n,a,s,o,l).map(p=>at(e,p))})}function kn(t,e,n,r,i,s={},o){if(Array.isArray(n[i])){const l=He(n)||r,u=n[i].map(d=>Ce(t,d,e,s,o)),c=D(s,l);if(c!==void 0)return u.find(d=>ie(D(d,[se,l,$t],D(d,[se,l,Ne])),c))}}function mc(t,e,n,r,i){let s=n;if(X(n,ue)&&(s=Ce(t,n,e,void 0,i)),ge(r))return s;const o=Array.isArray(r)?[...r]:r.split("."),[a,...l]=o;if(a!==void 0&&a!==""&&X(s,a))return s=D(s,a),mc(t,e,s,l,i)}function Cr(t,e,n,r,i,s){const o=mc(t,e,n,r,s);return o===void 0?i:o}const ca={title:"!@#$_UNKNOWN_$#@!"};function F0(t,e,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop(),u=String(l);o.length&&o.forEach(g=>{a=Cr(t,e,a,[se,g],{},s),X(a,W)?a=kn(t,e,a,u,W,D(i,g),s):X(a,ee)&&(a=kn(t,e,a,u,ee,D(i,g),s))}),X(a,W)?a=kn(t,e,a,u,W,i,s):X(a,ee)&&(a=kn(t,e,a,u,ee,i,s));let c=Cr(t,e,a,[se,l],ca,s);c===ca&&(c=void 0);const d=Cr(t,e,a,sl,[],s);let h;return c&&Array.isArray(d)&&(h=d.includes(u)),{field:c,isRequired:h}}function $0(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function D0(t,e){return function(n,r){if(n==null)return n;if(!zt(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var hc=D0(Kl);function R0(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function k0(t,e,n){var r=we(t)?$0:R0,i=arguments.length<3;return r(t,Rs(e),n,i,hc)}const M0={type:"object",$id:sm,properties:{__not_really_there__:{type:"number"}}};function Qi(t,e,n,r,i){let s=0;return n&&(ne(n.properties)?s+=k0(n.properties,(o,a,l)=>{const u=D(r,l);if(typeof a=="boolean")return o;if(X(a,ue)){const c=Ce(t,a,e,u,i);return o+Qi(t,e,c,u||{},i)}if((X(a,W)||X(a,ee))&&u){const c=X(a,W)?W:ee,d=He(a);return o+dn(t,e,u,D(a,c),-1,d,i)}if(a.type==="object"){const c=ne(u)?1:0;return o+c+Qi(t,e,a,u,i)}if(a.type===er(u)){let c=o+1;return a.default?c+=u===a.default?1:-1:a.const&&(c+=u===a.const?1:-1),c}return o},0):Ct(n.type)&&n.type===er(r)&&(s+=1)),s}function dn(t,e,n,r,i=-1,s,o){const a=r.map(h=>St(h,e,[])),l=nc(n,r,s);if(tc(l))return l;const u=a.reduce((h,g,f)=>(Mr(t,n,[M0,g],e,s)===1&&h.push(f),h),[]);if(u.length===1)return u[0];u.length||Hl(a.length,h=>u.push(h));const c=new Set,{bestIndex:d}=u.reduce((h,g)=>{const{bestScore:f}=h,p=a[g],y=Qi(t,e,p,n,o);return c.add(y),y>f?{bestIndex:g,bestScore:y}:h},{bestIndex:i,bestScore:0});return c.size===1&&i>=0?i:d}function pc(t){const e=t[Ne],n=Le(t);return q(e)&&Ct(e?.$data)&&n!=="object"&&n!=="array"}function gc(t){return Array.isArray(t.enum)&&t.enum.length===1||Ne in t}function Ms(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>q(e))}function fn(t){return t==null}function tr(t,e,n=!1,r=!1,i=!1){if(Array.isArray(e)){const s=Array.isArray(t)?t:[],o=i?s:e,a=i?e:s,l=o.map((u,c)=>a[c]!==void 0?tr(s[c],e[c],n,r,i):u);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(q(e)){const s=Object.assign({},t);return Object.keys(e).reduce((o,a)=>{var l;const u=D(e,a),c=q(t)&&a in t,d=a in e,h=(l=D(t,a))!==null&&l!==void 0?l:{},g=c&&q(h)&&Object.values(h).some(y=>q(y)),f=c&&q(D(t,a)),p=d&&q(u);return f&&p&&!g?(o[a]={...D(t,a),...u},o):(o[a]=tr(D(t,a),u,n,r,i&&(c||!d)),s)},s)}return r&&(t!==void 0&&fn(e)||typeof e=="number"&&Number.isNaN(e))||i&&!fn(e)?t:e}function Mt(t,e,n=!1){return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];if(t&&i in t&&q(o))r[i]=Mt(s,o,n);else if(n&&Array.isArray(s)&&Array.isArray(o)){let a=o;n==="preventDuplicates"&&(a=o.reduce((l,u)=>(s.includes(u)||l.push(u),l),[])),r[i]=s.concat(a)}else r[i]=o;return r},{...t})}function U0(t){if(im in t&&Array.isArray(t.enum)&&t.enum.length===1)return t.enum[0];if(Ne in t)return t.const;throw new Error("schema cannot be inferred as a constant")}function L0(t,e){const n=new Map(t.map(s=>[String(s.value),s])),r=new Set(e.filter(s=>s!=="*").map(String)),i=t.filter(s=>!r.has(String(s.value)));return e.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function mn(t,e){if(t.enum){let s,o;if(e){const{enumNames:l,enumOrder:u}=B(e);s=l,o=u}let a=t.enum.map((l,u)=>({label:Array.isArray(s)?s[u]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=L0(a,o)),a}let n,r;t.anyOf?(n=t.anyOf,r=e?.anyOf):t.oneOf&&(n=t.oneOf,r=e?.oneOf);let i=He(t);if(e){const{optionsSchemaSelector:s=i}=B(e);i=s}return n&&n.map((s,o)=>{const{title:a}=B(r?.[o]),l=s;let u,c=a;if(i){const d=D(l,[se,i],{});u=D(d,$t,D(d,Ne)),c=c||d?.title||l.title||String(u)}else u=U0(l),c=c||l.title||String(u);return{schema:l,label:c,value:u}})}function Zr(t,e,n={},r){const i=Ce(t,e,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&gc(o)):!1}function Us(t,e,n,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:Zr(t,e.items,n,r)}const B0=["string","number","integer","boolean","null"];var hn;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(hn||(hn={}));function Si(t,e=hn.Ignore,n=-1){if(n>=0){if(Array.isArray(t.items)&&n<t.items.length){const r=t.items[n];if(typeof r!="boolean")return r}}else if(t.items&&!Array.isArray(t.items)&&typeof t.items!="boolean")return t.items;return e!==hn.Ignore&&q(t.additionalItems)?t.additionalItems:{}}function yc(t,e){const{default:n,type:r}=t;return Array.isArray(r)&&r.includes("null")&&ge(e)&&n===null?null:e}function ua(t,e,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:u="populateAllDefaults"}=o;if(r===!0||a)t[e]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!q(n)||!ge(n))&&(t[e]=n);else if(u!=="skipDefaults"){const c=i===void 0?s.includes(e):i;q(n)?u==="skipEmptyDefaults"?ge(n)||(t[e]=n):(!ge(n)||s.includes(e))&&(c||u!=="populateRequiredDefaults")&&(t[e]=n):n!==void 0&&(u==="populateAllDefaults"||u==="skipEmptyDefaults"||c&&s.includes(e))&&(t[e]=n)}}function wt(t,e,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:o=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:u=void 0,required:c,shouldMergeDefaultsIntoFormData:d=!1,initialDefaultsGenerated:h}=n;let g=q(i)?i:{};const f=q(e)?e:{};let p=r,y=null,x=l,S=a;if(f[Ne]!==void 0&&l?.constAsDefaults!=="never"&&!pc(f))p=f[Ne];else if(q(p)&&q(f.default)&&!f[ee]&&!f[W]&&!f[ue])p=Mt(p,f.default);else if($t in f&&!f[ee]&&!f[W]&&!f[ue])p=f.default;else if(ue in f){const b=f[ue];a.includes(b)||(S=a.concat(b),y=Zn(b,s));const v=i===void 0||q(i)&&ge(i);y&&!p&&v&&(p=f.default),d&&y&&!q(i)&&(g=i)}else if(ps in f){const b={...da(t,f,n,p),...g};[y]=dc(t,f,s,!1,[],b,u)}else if(Ms(f))p=f.items.map((b,v)=>wt(t,b,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,parentDefaults:Array.isArray(r)?r[v]:void 0,rawFormData:g,required:c,shouldMergeDefaultsIntoFormData:d}));else if(W in f){const{oneOf:b,...v}=f;if(b.length===0)return;const w=He(f),{type:O="null"}=v;!Array.isArray(O)&&B0.includes(O)&&x?.constAsDefaults==="skipOneOf"&&(x={...x,constAsDefaults:"never"}),y=b[dn(t,s,i??f.default,b,0,w,u)],y=at(v,y)}else if(ee in f){const{anyOf:b,...v}=f;if(b.length===0)return;const w=He(f);y=b[dn(t,s,i??f.default,b,0,w,u)],y=at(v,y)}if(y)return wt(t,y,{rootSchema:s,includeUndefinedValues:o,_recurseList:S,experimental_defaultFormStateBehavior:x,experimental_customMergeAllOf:u,parentDefaults:p,rawFormData:i??g,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});p===void 0&&(p=f.default);const E=da(t,f,n,p);let j=E??p;if(d){const{arrayMinItems:b={}}=l||{},{mergeExtraDefaults:v}=b,w=V0(t,f,s,i,l,u);(!q(i)||Ot in f)&&(j=tr(j,w,v,!0))}return j}function V0(t,e,n,r,i,s){const o=!gc(e)&&Zr(t,e,n,s);let a=r;if(o){const u=mn(e);a=u?.some(d=>ie(d.value,r))?r:void 0}return e[Ne]&&i?.constAsDefaults==="always"&&(a=e.const),a}function q0(t,e,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:a=void 0,required:l,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}={},d){{const h=q(n)?n:{},g=e,p=o?.allOf==="populateDefaults"&&Ot in g||o?.emptyObjectFields!=="skipEmptyDefaults"&&gs in g?Ce(t,g,r,h,a):g,y=p[Ne],x=Object.keys(p.properties||{}).reduce((S,E)=>{var j;const b=D(p,[se,E],{}),v=q(y)&&y[E]!==void 0,w=(q(b)&&Ne in b||v)&&o?.constAsDefaults!=="never"&&!pc(b),O=wt(t,b,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[E]),rawFormData:D(h,[E]),required:(j=p.required)===null||j===void 0?void 0:j.includes(E),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c});return ua(S,E,O,i,l,p.required,o,w,b?.type==="null"),S},{});if(p.additionalProperties&&!c){const S=q(p.additionalProperties)?p.additionalProperties:{},E=new Set,j=[];Object.keys(h).filter(b=>!p.properties||!p.properties[b]).forEach(b=>{E.add(b),j.push(b)}),q(d)&&j.length===0&&Object.keys(d).filter(b=>!p.properties||!p.properties[b]).forEach(b=>E.add(b)),E.forEach(b=>{var v;const w=wt(t,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:D(d,[b]),rawFormData:D(h,[b]),required:(v=p.required)===null||v===void 0?void 0:v.includes(b),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c});ua(x,b,w,i,l,j)})}return yc(e,x)}}function z0(t,e,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:a,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}={},d){var h,g;let f=d;const p=e,y=(h=s?.arrayMinItems)!==null&&h!==void 0?h:{},{populate:x,mergeExtraDefaults:S}=y,E=x==="never",j=x==="requiredOnly",b=x==="all"||!E&&!j,v=(g=y?.computeSkipPopulate)!==null&&g!==void 0?g:(()=>!1),O=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((_,I)=>{const T=Si(p,hn.Fallback,I),P=Array.isArray(n)?n[I]:void 0;return wt(t,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:_,rawFormData:P,required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c})})),Array.isArray(n)){const _=Si(p);if(E)f=n;else{const I=n.map((P,F)=>wt(t,_,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:P,parentDefaults:D(f,[F]),required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}));f=tr(f,I,(j&&a||b)&&S)}}if(E)return f??O;if(j&&!a)return f||void 0;let C;const A=Array.isArray(f)?f.length:0;if(!p.minItems||Us(t,p,r,o)||v(t,p,r)||p.minItems<=A)C=f||!a&&!l?f:O;else{const _=f||[],I=Si(p,hn.Invert),T=I.default,P=Array.from({length:p.minItems-A},()=>wt(t,I,{parentDefaults:T,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:u}));C=_.concat(P)}return yc(e,C)}function da(t,e,n={},r){switch(Le(e)){case"object":return q0(t,e,n,r);case"array":return z0(t,e,n,r);default:return}}function bc(t,e,n,r,i=!1,s,o,a){if(!q(e))throw new Error(`Invalid schema: ${e}`);const l=Ce(t,e,r,n,o),u=wt(t,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&q(l.default))return{...u,...n};if(q(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:c}=s||{};return tr(u,n,!0,c==="useDefaultIfFormDataUndefined",!0)}return u}function xc(t={}){return"widget"in B(t)&&B(t).widget!=="hidden"}function vc(t,e,n={},r,i){if(n[bs]==="files")return!0;if(e.items){const s=Ce(t,e.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function W0(t,e,n={},r,i,s){const o=B(n,i),{label:a=!0}=o;let l=!!a;if(l){const u=Le(e),c=D(e,ot,!1);u==="array"&&(l=c||Us(t,e,r,s)||vc(t,e,n,r,s)||xc(n)),u==="object"&&(l=c),u==="boolean"&&n&&!n[bs]&&(l=!1),n&&n[lm]&&(l=!1)}return l}function Sc(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=zr(t,o);n(a,o)&&$s(s,bn(o,t),a)}return s}function H0(t,e){return Sc(t,e,function(n,r){return Zl(t,r)})}var Ls=Ul(function(t,e){return t==null?{}:H0(t,e)});function K0(t,e){if(e.length===0&&typeof t!="object")return t;const n=Ls(t,e);return Array.isArray(t)?Object.keys(n).map(r=>n[r]):n}function G0(t,e){const n=(i,s)=>typeof i!="object"||ge(i)||s&&!ge(i),r=(i,s=[],o=[[]])=>{const a=Object.keys(i);return a.forEach(l=>{const u=i[l];if(typeof u=="object"){const c=o.map(d=>[...d,l]);u[ys]&&u[jr]!==""?s.push(u[jr]):r(u,s,c)}else l===jr&&u!==""&&o.forEach(c=>{const d=D(e,c),h=a.length===1;(n(d,h)||Array.isArray(d)&&d.every(g=>n(g,h)))&&s.push(c)})}),s};return r(t)}function zn(t){return fn(t)||t===""?!0:Array.isArray(t)?t.length===0:q(t)?Object.values(t).every(zn):!1}function Y0(t,e){return e?e(t):oc(t)}function J0(t,e,n={},r,i){function s(f){return q(f)}function o(f){return q(f)}function a(f,p,y){var x;const{properties:S,additionalProperties:E,patternProperties:j,propertyNames:b}=f,v=new Set((x=f.required)!==null&&x!==void 0?x:[]);function w(C,A,_,I=!1){var T;const P=g(A,_,y[C]);if(!I&&q(P)){let F=o(A)?A:{};F.$ref!==void 0&&(F=Zn(F.$ref,n));const $=new Set((T=F.required)!==null&&T!==void 0?T:[]);if(Object.entries(P).every(([M,U])=>!$.has(M)&&zn(U)))return}P!==void 0&&(y[C]=P)}if(S!==void 0)for(const[C,A]of Object.entries(S))w(C,A,p[C],v.has(C));let O;if(j!==void 0){O=[];const C=Object.entries(j).map(([_,I])=>[new RegExp(_),I]),A=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))if(!A.has(_)){const T=C.find(([P])=>P.test(_));T===void 0?O.push(_):w(_,T[1],I)}}if(E!==void 0&&E!==!1){const C=E;if(O!==void 0)for(const A of O)w(A,C,p[A]);else{const A=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))A.has(_)||w(_,C,I)}}if(b!==void 0)for(const[C,A]of Object.entries(p))y[C]=A;return y}function l(f,p,y){const{items:x,additionalItems:S}=f;if(x!==void 0)if(Array.isArray(x))for(let E=0;E<x.length;E+=1)y.push(g(x[E],p[E]));else for(let E=0;E<p.length;E+=1)y.push(g(x,p[E]));if(S)for(let E=y.length;E<p.length;E+=1)y.push(g(S,p[E]));return y}function u(f,p,y){const{if:x,then:S,else:E}=f;if(x===void 0)return y;const b=(o(x)?t.isValid(x,p,n):x)?S:E;return b===void 0?y:g(b,p,y)}function c(f,p,y,x){if(!Array.isArray(f)||Zr(t,p,n,i))return x;const S=uc(f,!0,n),E=dn(t,n,y,S,0,He(p),i),j=f[E],b=q(j)?St(j,n,[]):S[E];return g(b,y,x)}function d(f,p,y){const{anyOf:x}=f;if(!Array.isArray(x))return y;if(p===void 0||Array.isArray(p)&&p.length===0||q(p)&&Object.keys(p).length===0){let S=y;for(const E of x)S=g(E,p,S);return S}return c(x,f,p,y)}function h(f,p,y){const{dependencies:x}=f;if(x===void 0||!s(p))return y;let S=y;for(const[E,j]of Object.entries(x))E in p&&!Array.isArray(j)&&(S=g(j,p,S));return S}function g(f,p,y){if(p===void 0||f===!1)return;if(f===!0||ge(f))return p;let x=f;const{$ref:S,allOf:E}=x;if(S!==void 0)return g(Zn(S,n),p,y);E&&(x=Y0(x,i));let j=d(x,p,c(x.oneOf,x,p,y));const b=Le(x);if(b==="object"){if(!s(p))return;j=a(x,p,s(j)?j:{})}else if(b==="array"){if(!Array.isArray(p))return;j=l(x,p,Array.isArray(j)?j:[])}else j===void 0&&(j=p);return h(x,p,u(x,p,j))}return g(e,r)}const De=Symbol("no Value");function wc(t){if(Array.isArray(t.enum))return t.enum;const e=t.oneOf||t.anyOf;if(!Array.isArray(e))return;const n=e.map(r=>Ne in r?r[Ne]:Array.isArray(r.enum)&&r.enum.length===1?r.enum[0]:De).filter(r=>r!==De);return n.length>0?n:void 0}function Z0(t,e){const n=wc(t);if(!n||n.some(i=>ie(i,e)))return De;const r=D(t,$t,De);return r!==De&&n.some(i=>ie(i,r))?r:n.length===1?n[0]:void 0}function es(t,e,n,r,i={},s){let o;if(X(n,se)){const a={};if(X(r,se)){const c=D(r,se,{});Object.keys(c).forEach(d=>{X(i,d)&&(a[d]=void 0)})}const l=Object.keys(D(n,se,{})),u={};l.forEach(c=>{const d=D(i,c);let h=D(r,[se,c],{}),g=D(n,[se,c],{});X(h,ue)&&(h=Ce(t,h,e,d,s)),X(g,ue)&&(g=Ce(t,g,e,d,s));const f=D(h,"type"),p=D(g,"type");if(!f||f===p)if(X(a,c)&&delete a[c],p==="object"||p==="array"&&Array.isArray(d)){const y=es(t,e,g,h,d,s);(y!==void 0||p==="array")&&(u[c]=y)}else{const y=D(g,$t,De),x=D(h,$t,De);y!==De&&y!==d&&(x===d?a[c]=y:D(g,"readOnly")===!0&&(a[c]=void 0));const S=D(g,Ne,De),E=D(h,Ne,De);if(S!==De&&S!==d&&(a[c]=E===d?S:void 0),X(i,c)){const j=Z0(g,d);j!==De&&(a[c]=j)}}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...u}}else if(D(r,"type")==="array"&&D(n,"type")==="array"&&Array.isArray(i)){let a=D(r,"items"),l=D(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){X(a,ue)&&(a=Ce(t,a,e,i,s)),X(l,ue)&&(l=Ce(t,l,e,i,s));const u=D(a,"type"),c=D(l,"type");if(!u||u===c){const d=D(n,"maxItems",-1);if(c==="object")o=i.reduce((h,g)=>{const f=es(t,e,l,a,g,s);return f!==void 0&&(d<0||h.length<d)&&h.push(f),h},[]);else{const h=wc(l),g=h?i.filter(f=>h.some(p=>ie(p,f))):i;o=d>0&&g.length>d?g.slice(0,d):g}}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}function gt(t,e,n,r,i,s=[],o){if(ue in e||ps in e||Ot in e||gs in e){const l=Ce(t,e,r,i,o);if(s.findIndex(c=>ie(c,l))===-1)return gt(t,l,n,r,i,s.concat(l),o)}let a={[jr]:n.replace(/^\./,"")};if(W in e||ee in e){const l=W in e?e.oneOf:e.anyOf,u=He(e),c=dn(t,r,i,l,0,u,o),d=l[c];a={...a,...gt(t,d,n,r,i,s,o)}}if(tn in e&&e[tn]!==!1){ce(a,ys,!0);const l=ne(e[tn])?e[tn]:{},u=D(e,se,{});for(const c of Object.keys(i??{}))c in u||(a[c]=gt(t,l,`${n}.${c}`,r,D(i,[c]),s,o))}if(an in e&&Array.isArray(i)){const{items:l,additionalItems:u}=e;Array.isArray(l)?i.forEach((c,d)=>{l[d]?a[d]=gt(t,l[d],`${n}.${d}`,r,c,s,o):u?a[d]=gt(t,u,`${n}.${d}`,r,c,s,o):console.warn(`Unable to generate path schema for "${n}.${d}". No schema defined for it`)}):i.forEach((c,d)=>{a[d]=gt(t,l,`${n}.${d}`,r,c,s,o)})}else if(se in e)for(const l in e.properties){const u=D(e,[se,l],{});a[l]=gt(t,u,`${n}.${l}`,r,D(i,[l]),s,o)}return a}function X0(t,e,n="",r,i,s){return gt(t,e,n,r,i,void 0,s)}class Q0{constructor(e,n,r,i){n&&n[Dn]===Or?this.rootSchema=Ji(n,D(n,de,"#")):this.rootSchema=n,this.validator=e,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,n,r={},i){return!e||!n?!1:this.validator!==e||!ie(this.rootSchema,n)||!ie(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(e,n,r){return F0(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,n,r,i){return kn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(e,n,r=!1,i){return bc(this.validator,e,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(e,n,r){return W0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,n,r,i){return dn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,n,r){return Mr(this.validator,e,n,this.rootSchema,r)}getFromSchema(e,n,r){return Cr(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}isFilesArray(e,n){return vc(this.validator,e,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return Us(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return Zr(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,n){return J0(this.validator,e,this.rootSchema,n)}retrieveSchema(e,n,r){return Ce(this.validator,e,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(e,n,r){return es(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}toPathSchema(e,n,r){return X0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function ex(t,e,n={},r){return new Q0(t,e,n,r)}function tx(t){var e;if(!t.includes("data:"))throw new Error("File is invalid: URI must be a dataURI");const r=t.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||"",u=decodeURI(((e=a.map(c=>c.split("=")).find(([c])=>c==="name"))===null||e===void 0?void 0:e[1])||"unknown");try{const c=atob(s),d=new Array(c.length);for(let g=0;g<c.length;g+=1)d[g]=c.charCodeAt(g);return{blob:new window.Blob([new Uint8Array(d)],{type:l}),name:u}}catch(c){throw new Error(`File is invalid: ${c.message}`)}}function yt(t,e){let n=String(t);for(;n.length<e;)n=`0${n}`;return n}function jc(t,e){const n=t<=0&&e<=0,r=t<0||e<0;if(!n&&r)throw new Error(`Both start (${t}) and stop (${e}) must both be <= 0 or > 0, got one of each`);const i=new Date().getFullYear(),s=n?i+t:t,o=n?i+e:e;if(s>o)return jc(e,t).reverse();const a=[];for(let l=s;l<=o;l+=1)a.push({value:l,label:yt(l,2)});return a}function nx(t,e){let n=t;if(Array.isArray(e)){const r=n.split(/(%\d)/);e.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function rx(t,e){return nx(t,e)}function Xr(t,e=[],n){if(Array.isArray(t))return t.map(s=>Xr(s,e)).filter(s=>s!==void 0);const r=t===""||t===null?-1:Number(t),i=e[r];return i?i.value:n}function Oc(t,e,n=[]){const r=Xr(t,n);return Array.isArray(e)?e.filter(i=>!ie(i,r)):ie(r,e)?void 0:e}function ur(t,e){return Array.isArray(e)?e.some(n=>ie(n,t)):ie(e,t)}function ix(t,e=[],n=!1){const r=e.map((i,s)=>ur(i.value,t)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Ec(t,e,n,r="indexed",i){if(typeof t>"u"||n&&Array.isArray(t)&&t.length<1||!n&&t===i)return i;if(r==="realValue")return n?t.map(String):String(t);const o=ix(t,e,n);return typeof o>"u"?i:o}function Ac(t,e,n=[]){const r=Xr(t,n);if(!fn(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return e.slice(0,i).concat(r,e.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return e}function fa(t,e,n){if(t===""||!Array.isArray(e))return n;const r=e.find(s=>String(s.value)===t);if(r)return r.value;const i=Number(t);return!Number.isNaN(i)&&i>=0&&i<e.length?e[i].value:n}function Te(t,e,n="indexed",r){return n!=="realValue"?Xr(t,e,r):Array.isArray(t)?t.map(i=>fa(i,e,r)):fa(t,e,r)}function dr(t,e,n="indexed"){return n!=="realValue"?String(e):fn(t)?"":String(typeof t=="object"?e:t)}var sx=1,ox=4;function Bs(t){return qn(t,sx|ox)}function ax(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:$s(t,e,n,r)}class Cc{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let r=Array.isArray(e)&&e.length>0||typeof e=="string"?D(this.errorSchema,e):this.errorSchema;return!r&&e&&(r={},ax(this.errorSchema,e,r,Object)),r}resetAllErrors(e){return this.errorSchema=e?Bs(e):{},this}addErrors(e,n){const r=this.getOrCreateErrorBlock(n);let i=D(r,Ae);return Array.isArray(i)||(i=[],r[Ae]=i),Array.isArray(e)?ce(r,Ae,[...new Set([...i,...e])]):ce(r,Ae,[...new Set([...i,e])]),this}setErrors(e,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(e)?[...new Set([...e])]:[e];return ce(r,Ae,i),this}clearErrors(e){const n=this.getOrCreateErrorBlock(e);return ce(n,Ae,[]),this}}var lx=200;function cx(t,e,n,r){var i=-1,s=ks,o=!0,a=t.length,l=[],u=e.length;if(!a)return l;e.length>=lx&&(s=Qn,o=!1,e=new kt(e));e:for(;++i<a;){var c=t[i],d=c;if(c=c!==0?c:0,o&&d===d){for(var h=u;h--;)if(e[h]===d)continue e;l.push(c)}else s(e,d,r)||l.push(c)}return l}var ux=Gr(function(t,e){return Xn(t)?cx(t,cr(e,1,Xn,!0)):[]});function dx(t,e){if(t==null)return{};var n=yn(Ns(t),function(r){return[r]});return e=Rs(e),Sc(t,n,function(r,i){return e(r,i[0])})}function ma(t,e){const n=Et(t),r=Et(e);if(t===e||!n&&!r)return[];if(n&&!r)return ze(t);if(!n&&r)return ze(e);const i=ze(dx(t,(o,a)=>!ie(o,D(e,a)))),s=ux(ze(e),ze(t));return[...i,...s]}function fx(t,e,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:u}=t,c={type:"day",range:[1,31],value:i},d={type:"month",range:[1,12],value:s},h={type:"year",range:n,value:o},g=[];switch(r){case"MDY":g.push(d,c,h);break;case"DMY":g.push(c,d,h);break;default:g.push(h,d,c)}return e&&g.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:u}),g}function _c(t){const e={};return t.multipleOf&&(e.step=t.multipleOf),(t.minimum||t.minimum===0)&&(e.min=t.minimum),(t.maximum||t.maximum===0)&&(e.max=t.maximum),e}function Ic(t,e,n={},r=!0){const i={type:e||"text",..._c(t)};return n.inputType?i.type=n.inputType:e||(t.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):t.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(t.formatMinimum!==void 0&&(i.min=t.formatMinimum),t.formatMaximum!==void 0&&(i.max=t.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function vn(t){var e;return(e=t?.optionValueFormat)!==null&&e!==void 0?e:"indexed"}const ha={props:{disabled:!1},submitText:"Submit",norender:!1};function Tc(t={}){const e=B(t);if(e&&e[Fr]){const n=e[Fr];return{...ha,...n}}return ha}function V(t,e,n={}){const{templates:r}=e;if(t==="ButtonTemplates")return r[t];if(Object.hasOwn(n,t)&&typeof n[t]=="string"&&Object.hasOwn(r,n[t])){const i=n[t];return r[i]}return n[t]||r[t]}var mx=0;function Nc(t){var e=++mx;return Ss(t)+e}function Vs(){if(D(globalThis,"process.env.NODE_ENV")!=="test")return{};const t=new Map;return new Proxy({},{get(e,n){return t.has(n)||t.set(n,Nc("test-id-")),t.get(n)}})}const wi={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 hx(t){let e=D(t,"MergedWidget");if(!e){const n=t.defaultProps&&t.defaultProps.options||{};e=({options:r,...i})=>m.jsx(t,{options:{...n,...r},...i}),ce(t,"MergedWidget",e)}return e}function tt(t,e,n={}){const r=Le(t);if(typeof e=="function"||e&&oo.isForwardRef(N.createElement(e))||oo.isMemo(e))return hx(e);if(typeof e!="string")throw new Error(`Unsupported widget definition: ${typeof e} in schema: ${JSON.stringify(t)}`);if(e in n){const i=n[e];return tt(t,i,n)}if(typeof r=="string"){if(!(r in wi))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(t)}`);if(e in wi[r]){const i=n[wi[r][e]];return tt(t,i,n)}}throw new Error(`No widget '${e}' for type '${r}' in schema: ${JSON.stringify(t)}`)}function px(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e&=e}return e.toString(16)}function gx(t){const e=new Set;return JSON.stringify(t,(n,r)=>(e.add(n),r)),JSON.stringify(t,Array.from(e).sort())}function Xe(t){return px(gx(t))}function yx(t){return Xe(t)}function bx(t,e,n={}){try{return tt(t,e,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 Wt(t,e){return`${Ct(t)?t:t[de]}__${e}`}function Ht(t){return Wt(t,"description")}function qs(t){return Wt(t,"error")}function Qr(t){return Wt(t,"examples")}function zs(t){return Wt(t,"help")}function ei(t){return Wt(t,"title")}function Fe(t,e=!1){const n=e?` ${Qr(t)}`:"";return`${qs(t)} ${Ht(t)} ${zs(t)}${n}`}function Ft(t,e){return`${t}-${e}`}function Qe(t,e){return Wt(t,e)}function ji(t,e){return Wt(t,`optional${e}`)}function Sn(t){return!fn(t)&&(!ne(t)||Array.isArray(t)||!ge(t))}function xx(t,e){const{rootSchema:n,schemaUtils:r}=t;if(ie(e,n))return!0;if(ue in n){const i=r.retrieveSchema(n);return ie(e,un(i,Bn))}return!1}function Pc(t,e,n){return e?n:t}function vx(t){return t?new Date(t).toJSON():void 0}function Ws(t,e,n){const r=[am];return X(t,ho)&&r.unshift(ho),D(t,[...r,e],n)}function Sx(t,e){if(!Array.isArray(e))return t;const n=c=>c.reduce((d,h)=>(d[h]=!0,d),{}),r=c=>c.length>1?`properties '${c.join("', '")}'`:`property '${c[0]}'`,i=n(t),s=e.filter(c=>c==="*"||i[c]),o=n(s),a=t.filter(c=>!o[c]),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 u=[...s];return u.splice(l,1,...a),u}function Oi(t,e=!0){if(!t)return{year:-1,month:-1,day:-1,hour:e?-1:0,minute:e?-1:0,second:e?-1:0};const n=new Date(t);if(Number.isNaN(n.getTime()))throw new Error(`Unable to parse date ${t}`);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:e?n.getUTCHours():0,minute:e?n.getUTCMinutes():0,second:e?n.getUTCSeconds():0}}function rn(t,e,n,r){if(!q(e))return r;const i=Ce(t,e,n,r);if(Array.isArray(r)){const c=i.items;if(!c)return r;let d=!1;const h=r.map((g,f)=>{let p=c;Array.isArray(c)&&(p=c[f]||i.additionalItems||{});const y=rn(t,p,n,g);return y!==g&&(d=!0),y===void 0?{}:y});return d?h:r}const{properties:s,required:o=[]}=i;if(!q(r)||!s)return r;const a={},l=r;let u=!1;for(const c of Object.keys(l)){const d=l[c],h=s[c]||{},g=o.includes(c),f=q(d),p=Array.isArray(d);if((f||p)&&s[c]){const y=rn(t,h,n,d);(g||!zn(y))&&(a[c]=y,u=!0)}else(g||!zn(d)||!s[c])&&(a[c]=d,zn(d)||(u=!0))}if(!(!u&&Object.keys(a).length===0))return a}function wx(t,e,n){var r,i;const s=(r=t[Bn])!==null&&r!==void 0?r:t[ue],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!e||ge(e)?l={...a}:l=Mt(a,e):l=e||{},o){let u=t;if(s&&t[ue]&&!t[Bn])try{u=Zn(s,n.rootSchema)}catch(c){return console.warn(`could not resolve $ref in resolveUiSchema:
|
|
3
3
|
`,c),l}for(const c of[W,ee]){const d=u[c];if(Array.isArray(d)&&d.length>0){const h=l[c],g=Array.isArray(h)?[...h]:[];let f=!1;for(let p=0;p<d.length;p++){const y=d[p],x=(i=y?.[Bn])!==null&&i!==void 0?i:y?.[ue];if(x&&x in o){const S=g[p]||{};g[p]=Mt(o[x],S),f=!0}}f&&(l[c]=g)}}}return l}function Wn(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return Wn(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return Wn(t.oneOf[0]);if(t.allOf){const e=n=>Wn(n);return t.allOf.some(e)}return!1}function pa(t,e){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){const s=n[i];if(!Object.hasOwn(e,s)||!Object.is(t[s],e[s]))return!1}return!0}function Fc(t,e,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=t;return!pa(o,e)||!pa(a,n)}const{props:i,state:s}=t;return!ie(i,e)||!ie(s,n)}function ga(t){const e=ec(t.map(n=>ne(n)?Le(n):void 0).flat().filter(n=>n!==void 0));return e.length===1?e[0]:e}function fr(t,e,n,r){const{enableOptionalDataFieldForType:i=[]}=B(r,t.globalUiOptions);let s;return ee in e&&Array.isArray(e[ee])?s=ga(e[ee]):W in e&&Array.isArray(e[W])?s=ga(e[W]):s=Le(e),!xx(t,e)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function ya(t,e=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=t,l=Date.UTC(n,r-1,i,s,o,a),u=new Date(l).toJSON();return e?u:u.slice(0,10)}function Hs(t,e=[]){if(!t)return[];let n=[];return Ae in t&&(n=n.concat(t[Ae].map(r=>{const i=`.${e.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(t).reduce((r,i)=>{if(i!==Ae){const s=t[i];if(Et(s))return r.concat(Hs(s,[...e,i]))}return r},n)}function $c(t){return we(t)?yn(t,At):ir(t)?[t]:_s(hl(Ss(t)))}function jx(t){const e=new Cc;return t.length&&t.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:$c(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&e.addErrors(i,s)}),e.ErrorSchema}function Be(t,e,n,r){const i=Array.isArray(n)?n:n?.path,s=t===""?[]:[t],o=i?i.concat(...s):s,a=[e.idPrefix,...o].join(e.idSeparator);let l;return e.nameGenerator&&o.length>0&&(l=e.nameGenerator(o,e.idPrefix,r)),{path:o,[de]:a,...l!==void 0&&{name:l}}}function Dc(t){return Object.keys(t).reduce((e,n)=>{if(n==="addError")return e;const r=t[n];return Et(r)?{...e,[n]:Dc(r)}:{...e,[n]:r}},{})}function Ox(t){return Object.values(t).every(e=>e!==-1)}function Ex(t){const{className:e="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:u,autofocus:c,registry:d,onBlur:h,onFocus:g}=t,f=`${o}_${n}`,{SelectWidget:p}=d.widgets,y=N.useCallback(x=>s(n,x),[s,n]);return m.jsx(p,{schema:{type:"integer"},id:f,name:a,className:e,options:{enumOptions:jc(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:u,autofocus:c,onChange:y,onBlur:h,onFocus:g,registry:d,label:"","aria-describedby":Fe(o)})}function Ax(t){const{time:e=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=t,[a,l]=N.useState(Oi(o,e));N.useEffect(()=>{l(Oi(o,e))},[e,o]);const u=N.useCallback((g,f)=>{const p={...a,[g]:typeof f>"u"?-1:f};Ox(p)?s(ya(p,e)):l(p)},[a,s,e]),c=N.useCallback(g=>{g.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),d=N.useCallback(g=>{if(g.preventDefault(),n||r)return;const f=Oi(new Date().toJSON(),e);s(ya(f,e))},[n,r,e,s]);return{elements:N.useMemo(()=>fx(a,e,i.yearsRange,i.format),[a,e,i.yearsRange,i.format]),handleChange:u,handleClear:c,handleSetNow:d}}function Kt(t){const e=N.useRef(t);return ie(t,e.current)||(e.current=t),e.current}function Cx(t,e){return t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function _x(t){const{name:e,size:n,type:r}=t;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:Cx(a.target.result,e),name:e,size:n,type:r}):i({dataURL:null,name:e,size:n,type:r})},o.readAsDataURL(t)})}function Ix(t){return Promise.all(Array.from(t).map(_x))}function ba(t){return t.reduce((e,n)=>{if(!n)return e;try{const{blob:r,name:i}=tx(n);return[...e,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return e}},[])}function Tx(t,e,n=!1){const r=N.useMemo(()=>n&&t?Array.isArray(t)?t:[t]:[],[t,n]),i=N.useMemo(()=>Array.isArray(t)?ba(t):ba([t||""]),[t]),s=N.useCallback(async a=>{const u=(await Ix(a)).map(c=>c.dataURL||null);e(n?r.concat(...u):u[0])},[r,n,e]),o=N.useCallback(a=>{if(n){const l=r.filter((u,c)=>c!==a);e(l)}else e(void 0)},[r,n,e]);return{filesInfo:i,handleChange:s,handleRemove:o}}function Nx(t){if(!t)return"";const e=new Date(t),n=yt(e.getFullYear(),4),r=yt(e.getMonth()+1,2),i=yt(e.getDate(),2),s=yt(e.getHours(),2),o=yt(e.getMinutes(),2),a=yt(e.getSeconds(),2),l=yt(e.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Mn(t,e,n=!1){if(!e)return t;const{errors:r,errorSchema:i}=t;let s=Hs(e),o=e;return ge(i)||(o=Mt(i,e,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function Px(t){const e=t;for(const n in e)if(Object.hasOwn(e,n)){const r=e[n];n===ue&&typeof r=="string"&&r.startsWith("#")?e[n]=ll+r:e[n]=Ks(r)}return t}function Fx(t){return t.map(e=>Ks(e))}function Ks(t){return Array.isArray(t)?Fx([...t]):ne(t)?Px({...t}):t}var G;(function(t){t.ArrayItemTitle="Item",t.MissingItems="Missing items definition",t.EmptyArray="No items yet. Use the button below to add some.",t.YesLabel="Yes",t.NoLabel="No",t.CloseLabel="Close",t.ErrorsLabel="Errors",t.NewStringDefault="New Value",t.AddButton="Add",t.AddItemButton="Add Item",t.CopyButton="Copy",t.MoveDownButton="Move down",t.MoveUpButton="Move up",t.RemoveButton="Remove",t.NowLabel="Now",t.ClearLabel="Clear",t.AriaDateLabel="Select a date",t.PreviewLabel="Preview",t.DecrementAriaLabel="Decrease value by 1",t.IncrementAriaLabel="Increase value by 1",t.OptionalObjectAdd="Add data for optional field",t.OptionalObjectRemove="Remove data for optional field",t.OptionalObjectEmptyMsg="No data for optional field",t.Type="Type",t.Value="Value",t.ClearButton="clear input",t.UnknownFieldType="Unknown field type %1",t.OptionPrefix="Option %1",t.TitleOptionPrefix="%1 option %2",t.KeyLabel="%1 Key",t.DeprecatedLabel="%1 (deprecated)",t.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',t.UnsupportedField="Unsupported field schema.",t.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",t.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",t.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",t.FilesInfo="**%1** (%2, %3 bytes)"})(G||(G={}));function $x(t,e){var n=we(t)?Es:hc;return n(t,zl(e))}function Dx(t,e){return t==null?!0:Rl(t,e)}function ts(){return Nc("rjsf-array-item-")}function xa(t){return Array.isArray(t)?t.map(e=>({key:ts(),item:e})):[]}function Rc(t){return Array.isArray(t)?t.map(e=>e.item):[]}function Rx(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}function kc(t,e,n,r){let{addable:i}=B(r,t.globalUiOptions);return i!==!1&&(e.maxItems!==void 0?i=n.length<e.maxItems:i=!0),i}function Mc(t,e,n,r){if(typeof t.items=="function")try{return t.items(e,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return t.items}function kx(t,e){const{schemaUtils:n,globalFormOptions:r}=t;let i=e.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:Ms(e)&&rm(e)&&(i=e.additionalItems),n.getDefaultFormState(i)}function Mx(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:u,onBlur:c,onFocus:d,registry:h,rawErrors:g,name:f,onSelectChange:p}=t,{widgets:y,schemaUtils:x,globalFormOptions:S,globalUiOptions:E}=h,j=x.retrieveSchema(e.items,i),b=r?.items??r,v=mn(j,b),{widget:w="select",title:O,...C}=B(r,E),A=tt(e,w,y),_=O??e.title??f,I=x.getDisplayLabel(e,r,E),T=Kt(Be("",S,n,!0));return m.jsx(A,{id:T[de],name:f,multiple:!0,onChange:p,onBlur:c,onFocus:d,options:{...C,enumOptions:v},schema:e,uiSchema:r,registry:h,value:i,disabled:s,readonly:o,required:l,label:_,hideLabel:!I,placeholder:u,autofocus:a,rawErrors:g,htmlName:T.name})}function Ux(t){const{schema:e,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:u,onBlur:c,onFocus:d,formData:h=[],registry:g,rawErrors:f,name:p,onSelectChange:y}=t,{widgets:x,schemaUtils:S,globalFormOptions:E,globalUiOptions:j}=g,{widget:b,title:v,...w}=B(r,j),O=tt(e,b,x),C=v??e.title??p,A=S.getDisplayLabel(e,r,j),_=Kt(Be("",E,n,!0));return m.jsx(O,{id:_[de],name:p,multiple:!0,onChange:y,onBlur:c,onFocus:d,options:w,schema:e,uiSchema:r,registry:g,value:h,disabled:i,readonly:s,hideError:l,required:a,label:C,hideLabel:!A,placeholder:u,autofocus:o,rawErrors:f,htmlName:_.name})}function Lx(t){const{schema:e,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:u,onFocus:c,registry:d,formData:h=[],rawErrors:g,onSelectChange:f}=t,{widgets:p,schemaUtils:y,globalFormOptions:x,globalUiOptions:S}=d,{widget:E="files",title:j,...b}=B(n,S),v=tt(e,E,p),w=j??e.title??i,O=y.getDisplayLabel(e,n,S),C=Kt(Be("",x,r,!0));return m.jsx(v,{options:b,id:C[de],name:i,multiple:!0,onChange:f,onBlur:u,onFocus:c,schema:e,uiSchema:n,value:h,disabled:s,readonly:o,required:l,registry:d,autofocus:a,rawErrors:g,label:w,hideLabel:!O,htmlName:C.name})}function Uc(t){const{itemKey:e,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:u,canAdd:c,canRemove:d=!0,canMoveUp:h,canMoveDown:g,itemSchema:f,itemData:p,itemUiSchema:y,itemFieldPathId:x,itemErrorSchema:S,autofocus:E,onBlur:j,onFocus:b,onChange:v,rawErrors:w,totalItems:O,title:C,handleAddItem:A,handleCopyItem:_,handleRemoveItem:I,handleReorderItems:T}=t,{schemaUtils:P,fields:{ArraySchemaField:F,SchemaField:$},globalUiOptions:k}=a,M=Kt(x),U=F||$,J=V("ArrayFieldItemTemplate",a,l),ae=P.getDisplayLabel(f,y,k),{description:fe}=B(y),ye=!!fe||!!f.description,{orderable:L=!0,removable:le=!0,copyable:te=!1}=l,H={moveUp:L&&h,moveDown:L&&g,copy:te&&c,remove:le&&d,toolbar:!1};H.toolbar=Object.keys(H).some(xe=>H[xe]);const K=N.useCallback(xe=>{A(xe,n+1)},[A,n]),z=N.useCallback(xe=>{_(xe,n)},[_,n]),re=N.useCallback(xe=>{I(xe,n)},[I,n]),oe=N.useCallback(xe=>{T(xe,n,n-1)},[T,n]),Oe=N.useCallback(xe=>{T(xe,n,n+1)},[T,n]),Ee={children:m.jsx(U,{name:r,title:C,index:n,schema:f,uiSchema:y,formData:p,errorSchema:S,fieldPathId:M,required:Rx(f),onChange:v,onBlur:j,onFocus:b,registry:a,disabled:i,readonly:o,hideError:s,autofocus:E,rawErrors:w}),buttonsProps:{fieldPathId:M,disabled:i,readonly:o,canAdd:c,hasCopy:H.copy,hasMoveUp:H.moveUp,hasMoveDown:H.moveDown,hasRemove:H.remove,index:n,totalItems:O,onAddItem:K,onCopyItem:z,onRemoveItem:re,onMoveUpItem:oe,onMoveDownItem:Oe,registry:a,schema:f,uiSchema:y},itemKey:e,className:"rjsf-array-item",disabled:i,hasToolbar:H.toolbar,index:n,totalItems:O,readonly:o,registry:a,schema:f,uiSchema:y,parentUiSchema:u,displayLabel:ae,hasDescription:ye};return m.jsx(J,{...Ee})}function Bx(t){const{schema:e,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:u=!1,autofocus:c=!1,required:d=!1,hideError:h=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,onChange:x,keyedFormData:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v}=t,w=e.title||a||o,{schemaUtils:O,fields:C,formContext:A,globalFormOptions:_,globalUiOptions:I}=g,{OptionalDataControlsField:T}=C,P=B(n,I),F=ne(e.items)?e.items:{},$=O.retrieveSchema(F),k=Rc(S),M=fr(g,e,d,n),U=Sn(s),J=kc(g,e,k,n)&&(!M||U),ae=U?S:[],fe=M?" rjsf-optional-array-field":"",ye=t.childFieldPathId??i,L=M?m.jsx(T,{...t,fieldPathId:ye}):void 0,le={canAdd:J,items:ae.map((H,K)=>{const{key:z,item:re}=H,oe=re,Oe=O.retrieveSchema(F,oe),Ee=r?r[K]:void 0,xe=Be(K,_,ye),$e=Mc(n,re,K,A),mt={itemKey:z,index:K,name:o&&`${o}-${K}`,registry:g,uiOptions:P,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:d,title:w?`${w}-${K+1}`:void 0,canAdd:J,canMoveUp:K>0,canMoveDown:K<k.length-1,itemSchema:Oe,itemFieldPathId:xe,itemErrorSchema:Ee,itemData:oe,itemUiSchema:$e,autofocus:c&&K===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:S.length,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v,onChange:x};return m.jsx(Uc,{...mt},z)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${$.type}${fe}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:u,required:d,schema:e,title:w,formData:k,rawErrors:y,registry:g,optionalDataControl:L},te=V("ArrayFieldTemplate",g,P);return m.jsx(te,{...le})}function Vx(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:u=!1,autofocus:c=!1,required:d=!1,hideError:h=!1,registry:g,onBlur:f,onFocus:p,rawErrors:y,keyedFormData:x,onChange:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v}=t;let{formData:w=[]}=t;const O=e.title||a||o,{schemaUtils:C,fields:A,formContext:_,globalFormOptions:I,globalUiOptions:T}=g,P=B(n,T),{OptionalDataControlsField:F}=A,$=fr(g,e,d,n),k=Sn(r),U=(ne(e.items)?e.items:[]).map((K,z)=>C.retrieveSchema(K,w[z])),J=ne(e.additionalItems)?C.retrieveSchema(e.additionalItems,r):null,ae=t.childFieldPathId??s;w.length<U.length&&(w=w.concat(new Array(U.length-w.length)));const fe=k?x:[],ye=$?" rjsf-optional-array-field":"",L=$?m.jsx(F,{...t,fieldPathId:ae}):void 0,le=kc(g,e,w,n)&&!!J&&(!$||k),te={canAdd:le,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${ye}`,disabled:l,fieldPathId:s,formData:r,items:fe.map((K,z)=>{const{key:re,item:oe}=K,Oe=oe,Ee=z>=U.length,xe=(Ee&&ne(e.additionalItems)?C.retrieveSchema(e.additionalItems,Oe):U[z])||{},$e=Be(z,I,ae);let mt;Ee?mt=n.additionalItems:Array.isArray(n.items)?mt=n.items[z]:mt=Mc(n,oe,z,_);const On=i?i[z]:void 0,En={index:z,itemKey:re,name:o&&`${o}-${z}`,registry:g,uiOptions:P,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:d,title:O?`${O}-${z+1}`:void 0,canAdd:le,canRemove:Ee,canMoveUp:z>=U.length+1,canMoveDown:Ee&&z<w.length-1,itemSchema:xe,itemData:Oe,itemUiSchema:mt,itemFieldPathId:$e,itemErrorSchema:On,autofocus:c&&z===0,onBlur:f,onFocus:p,rawErrors:y,totalItems:x.length,onChange:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:b,handleReorderItems:v};return m.jsx(Uc,{...En},re)}),onAddClick:E,readonly:u,required:d,registry:g,schema:e,uiSchema:n,title:O,errorSchema:i,rawErrors:y,optionalDataControl:L},H=V("ArrayFieldTemplate",g,P);return m.jsx(H,{...te})}function qx(t=[]){const e=N.useMemo(()=>Xe(t),[t]),[n,r]=N.useState(()=>({formDataHash:e,keyedFormData:xa(t)}));let{keyedFormData:i,formDataHash:s}=n;if(e!==s){const a=Array.isArray(t)?t:[],l=i||[];i=a.length===l.length?l.map((u,c)=>({key:u.key,item:a[c]})):xa(a),s=e,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=Rc(a),u=Xe(l);return r({formDataHash:u,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function zx(t){const{schema:e,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=t,{globalFormOptions:l,schemaUtils:u,translateString:c}=s,{keyedFormData:d,updateKeyedFormData:h}=qx(o),g=t.childFieldPathId??i,f=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const _ in r){const I=parseInt(_);w===void 0||I<w?ce(O,[I],r[_]):I>=w&&ce(O,[I+1],r[_])}}const C={key:ts(),item:kx(s,e)},A=[...d];w!==void 0?A.splice(w,0,C):A.push(C),a(h(A),g.path,O)},[d,s,e,a,h,r,g]),p=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const _ in r){const I=parseInt(_);I<=w?ce(O,[I],r[_]):I>w&&ce(O,[I+1],r[_])}}const C={key:ts(),item:Bs(d[w].item)},A=[...d];w!==void 0?A.splice(w+1,0,C):A.push(C),a(h(A),g.path,O)},[d,a,h,r,g]),y=N.useCallback((v,w)=>{v&&v.preventDefault();let O;if(r){O={};for(const A in r){const _=parseInt(A);_<w?ce(O,[_],r[A]):_>w&&ce(O,[_-1],r[A])}}const C=d.filter((A,_)=>_!==w);a(h(C),g.path,O)},[d,a,h,r,g]),x=N.useCallback((v,w,O)=>{v&&(v.preventDefault(),v.currentTarget.blur());let C;if(r){C={};for(const I in r){const T=parseInt(I);T==w?ce(C,[O],r[w]):T==O?ce(C,[w],r[O]):ce(C,[I],r[T])}}function A(){const I=d.slice();return I.splice(w,1),I.splice(O,0,d[w]),I}const _=A();a(h(_),g.path,C)},[d,a,h,r,g]),S=N.useCallback((v,w,O,C)=>{a(v===void 0?null:v,w,O,C)},[a]),E=N.useCallback(v=>{a(v,g.path,void 0,g?.[de])},[a,g]),j={...t,formData:o,fieldPathId:g,onSelectChange:E},b={...t,handleAddItem:f,handleCopyItem:p,handleRemoveItem:y,handleReorderItems:x,keyedFormData:d,onChange:S};if(!(an in e)){if(!l.useFallbackUiForUnsupportedType){const w=B(n),O=V("UnsupportedFieldTemplate",s,w);return m.jsx(O,{schema:e,fieldPathId:i,reason:c(G.MissingItems),registry:s})}const v={...e,[an]:{type:void 0}};j.schema=v,b.schema=v}return u.isMultiSelect(j.schema)?m.jsx(Mx,{...j}):xc(n)?m.jsx(Ux,{...j}):Ms(j.schema)?m.jsx(Vx,{...b}):u.isFilesArray(j.schema,n)?m.jsx(Lx,{...j}):m.jsx(Bx,{...b})}function Wx(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:u,hideError:c,autofocus:d,title:h,onChange:g,onFocus:f,onBlur:p,rawErrors:y}=t,{title:x}=e,{widgets:S,translateString:E,globalUiOptions:j}=o,{widget:b="checkbox",title:v,label:w=!0,enumNames:O,...C}=B(r,j),A=tt(e,b,S),_=E(G.YesLabel),I=E(G.NoLabel);let T;const P=v??x??h??n;if(Array.isArray(e.oneOf))T=mn({oneOf:e.oneOf.map($=>{if(ne($))return{...$,title:$.title||($.const===!0?_:I)}}).filter($=>$)},r);else{const $=e.enum??[!0,!1];!O&&$.length===2&&$.every(k=>typeof k=="boolean")?T=[{value:$[0],label:$[0]?_:I},{value:$[1],label:$[1]?_:I}]:T=mn({enum:$},r)}const F=N.useCallback(($,k,M)=>g($,i.path,k,M),[g,i]);return m.jsx(A,{options:{...C,enumOptions:T},schema:e,uiSchema:r,id:i.$id,name:n,onChange:F,onFocus:f,onBlur:p,label:P,hideLabel:!w,value:s,required:a,disabled:l,readonly:u,hideError:c,registry:o,autofocus:d,rawErrors:y,htmlName:i.name})}function Hx(t){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:t}}function Kx(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"?e:e==="object"?Array.isArray(t)?"array":"object":"string"}function Gx(t,e){switch(e){case"string":return String(t);case"number":{const n=Number(t);return isNaN(n)?0:n}case"boolean":return!!t;default:return t}}function Yx(t){const{id:e,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:u=!1,onBlur:c,onFocus:d,registry:h,fieldPathId:g,onChange:f,errorSchema:p}=t,{translateString:y,fields:x,globalFormOptions:S}=h,[E,j]=N.useState(Kx(n)),b=B(o),v=Kt(Be("__internal_type_selector",S,g)),w=y(G.Type),O=N.useMemo(()=>Hx(w),[w]),C=I=>{I!=null&&(j(I),f(Gx(n,I),g.path,p,e))};if(!S.useFallbackUiForUnsupportedType){const{reason:I=y(G.UnknownFieldType,[String(i.type)])}=t,T=V("UnsupportedFieldTemplate",h,b);return m.jsx(T,{schema:i,fieldPathId:g,reason:I,registry:h})}const A=V("FallbackFieldTemplate",h,b),{SchemaField:_}=x;return m.jsx(A,{schema:i,registry:h,typeSelector:m.jsx(_,{fieldPathId:v,name:`${s}__fallback_type`,schema:O,formData:E,onChange:C,onBlur:c,onFocus:d,registry:h,hideLabel:!r,disabled:l,readonly:u,required:a},n?Xe(n):"__empty__"),schemaField:m.jsx(_,{...t,schema:{type:E,title:y(G.Value),...E==="object"&&{additionalProperties:!0}}})})}function Jx(t,e){return yn(e,function(n){return t[n]})}function Zx(t){return t==null?[]:Jx(t,ze(t))}var Xx=Math.max;function Qx(t,e,n,r){t=zt(t)?t:Zx(t),n=n?Wl(n):0;var i=t.length;return n<0&&(n=Xx(i+n,0)),Ct(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Xl(t,e,n)>-1}var ev=Math.min;function tv(t,e,n){for(var r=ks,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,u=[];o--;){var c=t[o];l=ev(c.length,l),a[o]=i>=120&&c.length>=120?new kt(o&&c):void 0}c=t[0];var d=-1,h=a[0];e:for(;++d<i&&u.length<l;){var g=c[d],f=g;if(g=g!==0?g:0,!(h?Qn(h,f):r(u,f))){for(o=s;--o;){var p=a[o];if(!(p?Qn(p,f):r(t[o],f)))continue e}h&&h.push(f),u.push(g)}}return u}function nv(t){return Xn(t)?t:[]}var va=Gr(function(t){var e=yn(t,nv);return e.length&&e[0]===t[0]?tv(e):[]});function _r(t,e){return Yr(t,e)}function Lc(t){return t===void 0}var et;(function(t){t.ROW="ui:row",t.COLUMN="ui:col",t.COLUMNS="ui:columns",t.CONDITION="ui:condition"})(et||(et={}));var Hn;(function(t){t.ALL="all",t.SOME="some",t.NONE="none"})(Hn||(Hn={}));const rv=/^\$lookup=(.+)/,Ei="layoutGrid";function Sa(t,e){return t??e}function iv(t){return/^\d+?$/.test(t)}const jt=Vs();function sv(t,e,n,r,i){const s=D(n,[qi],{}),o=D(n,t),a={...D(o,[vt],{}),...e,...s},l={...o};ge(a)||ce(l,[vt],a),ge(s)||ce(l,[qi],s);let{readonly:u}=B(l);return(i===!0||Lc(u)&&r===!0)&&(u=!0,X(a,si)?ce(l,[vt,si],!0):ce(l,`ui:${si}`,!0)),{fieldUiSchema:l,uiReadonly:u}}function ov(t,e,n="$0m3tH1nG Un3xP3cT3d"){const r=Yi([e]).sort(),i=Yi([n]).sort();switch(t){case Hn.ALL:return _r(r,i);case Hn.SOME:return va(r,i).length>0;case Hn.NONE:return va(r,i).length===0;default:return!1}}function ti(t,e,n){let r={},i=t[e];if(Et(i)){const{children:s,className:o,...a}=i;if(i=s,o){const u=o.split(" ").map(c=>Ws(n,c,c)).join(" ");r={...a,className:u}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${e}" in ${JSON.stringify(t)}`);return{children:i,gridProps:r}}function wa(t,e,n){let r;if(iv(n)&&t&&t?.type==="array"&&X(t,an)){const i=Number(n),s=t[an];Array.isArray(s)?i>s.length?r=Dl(s):r=s[i]:r=s,e={[de]:e[de],path:[...e.path.slice(0,e.path.length-1),i]}}return{rawSchema:r,fieldPathId:e}}function av(t,e,n,r,i){const{schemaUtils:s,globalFormOptions:o}=t;let a=n,l=i;const u=e.split("."),c=u.pop();let d=s.retrieveSchema(a,r),h=r,g=d.readOnly;u.forEach(y=>{if(l=Be(y,o,l),X(d,se))a=D(d,[se,y],{});else if(d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee,S=s.findSelectedOptionInXxxOf(d,y,x,h);a=D(S,[se,y],{})}else{const x=wa(d,l,y);a=x.rawSchema??{},l=x.fieldPathId}h=D(h,y,{}),d=s.retrieveSchema(a,h),g=Sa(d.readOnly,g)});let f,p=!1;if(ge(d)&&(d=void 0),d&&c){if(d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee;d=s.findSelectedOptionInXxxOf(d,c,x,h)}l=Be(c,o,l),p=d!==void 0&&Array.isArray(d.required)&&Qx(d.required,c);const y=wa(d,l,c);if(y.rawSchema?(d=y.rawSchema,l=y.fieldPathId):(d=D(d,[se,c]),d=d&&s.retrieveSchema(d)),g=Sa(d?.readOnly,g),d&&(X(d,W)||X(d,ee))){const x=X(d,W)?W:ee,S=He(d);f={options:d[x],hasDiscriminator:!!S}}}return{schema:d,isRequired:p,isReadonly:g,optionsInfo:f,fieldPathId:l}}function lv(t,e){let n=t;return Ct(n)&&(n=Ws(e,n)),sr(n)?n:null}function cv(t,e){let n,r=null,i={},s;if(Ct(e)||Lc(e))n=e??"";else{const{name:o="",render:a,...l}=e;n=o,i=l,ge(i)||$x(i,(u,c)=>{if(Ct(u)){const d=rv.exec(u);if(Array.isArray(d)&&d.length>1){const h=d[1];i[c]=Ws(t,h,h)}}}),r=lv(a,t),!o&&r&&(s=m.jsx(r,{...l,"data-testid":jt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function ni(t){const{childrenLayoutGridSchemaId:e,...n}=t,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return e.map(l=>N.createElement(Gs,{...n,key:`layoutGrid-${Xe(l)}`,schema:a,layoutGridSchema:l}))}function uv(t){const{layoutGridSchema:e,...n}=t,{formData:r,registry:i}=n,{children:s,gridProps:o}=ti(e,et.CONDITION,i),{operator:a,field:l="",value:u}=o,c=D(r,l,null);return ov(a,c,u)?m.jsx(ni,{...n,childrenLayoutGridSchemaId:s}):null}function dv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.COLUMN,r),a=B(i),l=V("GridTemplate",r,a);return m.jsx(l,{column:!0,"data-testid":jt.col,...o,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:s})})}function fv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.COLUMNS,r),a=B(i),l=V("GridTemplate",r,a);return s.map(u=>m.jsx(l,{column:!0,"data-testid":jt.col,...o,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:[u]})},`column-${Xe(u)}`))}function mv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ti(e,et.ROW,r),a=B(i),l=V("GridTemplate",r,a);return m.jsx(l,{...o,"data-testid":jt.row,children:m.jsx(ni,{...n,childrenLayoutGridSchemaId:s})})}function hv(t){const{gridSchema:e,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:u,registry:c,layoutGridSchema:d,...h}=t,{onChange:g}=h,{fields:f}=c,{SchemaField:p,LayoutMultiSchemaField:y}=f,x=cv(c,e),{name:S,UIComponent:E,uiProps:j}=x,{schema:b,isRequired:v,isReadonly:w,optionsInfo:O,fieldPathId:C}=av(c,S,n,l,s),A=Kt(C);if(x.rendered)return x.rendered;if(b){const _=O?.hasDiscriminator?y:p,{fieldUiSchema:I,uiReadonly:T}=sv(S,j,r,w,u);return m.jsx(_,{"data-testid":O?.hasDiscriminator?jt.layoutMultiSchemaField:jt.field,...h,name:S,required:v,readonly:T,schema:b,uiSchema:I,errorSchema:D(i,S),fieldPathId:A,formData:D(l,S),onChange:g,onBlur:o,onFocus:a,options:O?.options,registry:c})}return E?m.jsx(E,{"data-testid":jt.uiComponent,...h,name:S,required:v,formData:l,readOnly:!!w||u,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:c,...j}):null}function Gs(t){const{uiSchema:e}=t;let{layoutGridSchema:n}=t;const r=B(e);if(!n&&Ei in r&&ne(r[Ei])&&(n=r[Ei]),ne(n)){if(et.ROW in n)return m.jsx(mv,{...t,layoutGridSchema:n});if(et.COLUMN in n)return m.jsx(dv,{...t,layoutGridSchema:n});if(et.COLUMNS in n)return m.jsx(fv,{...t,layoutGridSchema:n});if(et.CONDITION in n)return m.jsx(uv,{...t,layoutGridSchema:n})}return m.jsx(hv,{...t,gridSchema:n})}Gs.TEST_IDS=jt;function pv(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=t,l=B(i,o.globalUiOptions),{title:u}=l,{title:c}=r,d=u||n||c||a;if(!d)return null;const h=V("TitleFieldTemplate",o,l);return m.jsx(h,{id:ei(e),title:d,required:s,schema:r,uiSchema:i,registry:o})}function Ai(t,e,n){const r="!@#!@$@#$!@$#";return t.map(({schema:s})=>s).find(s=>{const o=D(s,[se,e]);return D(o,$t,D(o,Ne,r))===n})}function ja(t,e,n,r,i){const s=e.map(l=>n.retrieveSchema(l,i));let o=t;X(t,W)?o={...t,[W]:s}:X(t,ee)&&(o={...t,[ee]:s});const a=mn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function gv(t){const{name:e,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:u,registry:c,uiSchema:d,schema:h,autofocus:g,readonly:f,required:p,errorSchema:y,hideError:x=!1}=t,{widgets:S,schemaUtils:E,globalUiOptions:j}=c,[b,v]=N.useState(ja(h,l,E,d,i)),w=D(s,de),O=He(h),C=V("FieldErrorTemplate",c,l),A=V("FieldTemplate",c,l),_=Xe(h),I=Xe(l),T=d?Xe(d):"",P=i?Xe(i):"";N.useEffect(()=>{v(ja(h,l,E,d,i))},[_,I,E,T,P]);const{widget:F=O?"radio":"select",title:$="",placeholder:k="",optionsSchemaSelector:M=O,hideError:U,...J}=B(d);if(!M)throw new Error("No selector field provided for the LayoutMultiSchemaField");const ae=D(i,M);let fe=D(b[0]?.schema,[se,M],{});const ye=Ai(b,M,ae);fe=fe?.type?fe:{...fe,type:ye?.type||n};const L=tt(fe,F,S),le=U===void 0?x:!!U,te=D(y,[Ae],[]),H=un(y,[Ae]),K=E.getDisplayLabel(h,d,j),z=Oe=>{const Ee=Ai(b,M,Oe),xe=Ai(b,M,ae);let $e=E.sanitizeDataForNewSchema(Ee,xe,i);$e&&Ee&&($e=E.getDefaultFormState(Ee,$e,"excludeObjectChildren")),$e&&ce($e,M,Oe),a($e,s.path,void 0,w)},re={enumOptions:b,...J},oe=!le&&te.length>0?m.jsx(C,{fieldPathId:s,schema:h,errors:te,registry:c}):void 0;return m.jsx(A,{fieldPathId:s,id:w,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,required:p,readonly:!!f,registry:c,displayLabel:K,errors:oe,onChange:a,onKeyRename:Er,onKeyRenameBlur:Er,onRemoveProperty:Er,children:m.jsx(L,{id:w,name:e,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(b)&&ge(b),uiSchema:d,autofocus:g,readonly:f,required:p,registry:c,multiple:!1,rawErrors:te,hideError:le,hideLabel:!K,errorSchema:H,placeholder:k,onChange:z,onBlur:o,onFocus:u,value:ae,options:re,htmlName:s.name})})}class Oa extends N.Component{constructor(e){super(e);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(e,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!ie(e.options,i)){const{registry:{schemaUtils:l}}=this.props,u=i.map(c=>l.retrieveSchema(c,r));a={selectedOption:o,retrievedOptions:u}}if(!ie(r,e.formData)&&s.$id===e.fieldPathId.$id){const{retrievedOptions:l}=a,u=this.getMatchingOption(o,r,l);n&&u!==o&&(a={selectedOption:u,retrievedOptions:l})}a!==this.state&&this.setState(a)}getMatchingOption(e,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=He(i);return s.getClosestMatchingOption(n,r,e,o)}onOptionChange=e=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,u=e!==void 0?parseInt(e,10):-1;if(u===n)return;const c=u>=0?r[u]:void 0,d=n>=0?r[n]:void 0;let h=l.sanitizeDataForNewSchema(c,d,i);c&&(h=l.getDefaultFormState(c,h,"excludeObjectChildren")),this.setState({selectedOption:u},()=>{s(h,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:e,schema:n}=this.props;return`${e.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:u,schema:c,uiSchema:d}=this.props,{widgets:h,fields:g,translateString:f,globalUiOptions:p,schemaUtils:y}=u,{SchemaField:x}=g,S=V("MultiSchemaFieldTemplate",u,p),E=fr(u,c,l,d),j=Sn(i),{selectedOption:b,retrievedOptions:v}=this.state,{widget:w="select",placeholder:O,autofocus:C,autocomplete:A,title:_=c.title,...I}=B(d,p),T=tt({type:"number"},w,h),P=D(r,Ae,[]),F=un(r,[Ae]),$=y.getDisplayLabel(c,d,p),k=b>=0&&v[b]||null;let M;if(k){const{required:te}=c;M=te?at({required:te},k):k}let U=[];W in c&&d&&W in d?Array.isArray(d[W])?U=d[W]:console.warn(`uiSchema.oneOf is not an array for "${_||e}"`):ee in c&&d&&ee in d&&(Array.isArray(d[ee])?U=d[ee]:console.warn(`uiSchema.anyOf is not an array for "${_||e}"`));let J=d;b>=0&&U.length>b&&(J=U[b]);const ae=_?G.TitleOptionPrefix:G.OptionPrefix,fe=_?[_]:[],ye=v.map((te,H)=>{const{title:K=te.title}=B(U[H]);return{label:K||f(ae,fe.concat(String(H+1))),value:H}}),L=!E||j?m.jsx(T,{id:this.getFieldId(),name:`${e}${c.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||ge(ye),multiple:!1,rawErrors:P,errorSchema:F,value:b>=0?b:void 0,options:{enumOptions:ye,...I},registry:u,placeholder:O,autocomplete:A,autofocus:C,label:_??e,hideLabel:!$,readonly:a}):void 0,le=M&&M.type!=="null"&&m.jsx(x,{...this.props,schema:M,uiSchema:J})||null;return m.jsx(S,{schema:c,registry:u,uiSchema:d,selector:L,optionSchemaField:le})}}const yv=/\.([0-9]*0)*$/,bv=/[0.]0*$/;function xv(t){const{registry:e,onChange:n,formData:r,value:i}=t,[s,o]=N.useState(i),{StringField:a}=e.fields;let l=r;const u=N.useCallback((c,d,h,g)=>{o(c),`${c}`.charAt(0)==="."&&(c=`0${c}`);const f=typeof c=="string"&&c.match(yv)?mo(c.replace(bv,"")):mo(c);n(f,d,h,g)},[n]);if(typeof s=="string"&&typeof l=="number"){const c=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(c)&&(l=s)}return m.jsx(a,{...t,formData:l,onChange:u})}function Je(){return Je=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Je.apply(null,arguments)}const yr=["strong","em","del","mark"],Ea=[["**",yr[0]],["__",yr[0]],["~~",yr[2]],["==",yr[3]],["*","em"],["_","em"]];function vv(t,e){for(var n=1,r=e+1;r<t.length&&n>0;)t[r]!=="\\"?(t[r]==="["&&n++,t[r]==="]"&&n--,r++):r+=2;if(n===0&&r<t.length&&(t[r]==="("||t[r]==="[")){var i=t[r]==="("?")":"]",s=1;for(r++;r<t.length&&s>0;)t[r]!=="\\"?(t[r]==="("&&i===")"&&s++,t[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function Sv(t,e){if(!e||!e.inline&&!e.simple)return null;var n=t[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=Ea[o][0];if(t.startsWith(a)&&t.length>=2*a.length){r=a,i=a.length,s=Ea[o][1];break}}if(!r)return null;for(var l=i,u=!1,c=!1,d="",h=0,g="",f=!1,p="";l<t.length;){var y=t[l];if(f)g+=y,f=!1,p=y,l++;else if(y!=="\\")if(y!=="`"||h!==0){if(y==="["&&!u&&h===0){var x=vv(t,l);if(x!==-1){g+=t.slice(l,x),l=x,p=t[x-1];continue}}if(c)g+=y,d?y===d&&(d=""):y==='"'||y==="'"?d=y:y===">"&&(c=!1),p=y,l++;else if(y!=="<"||u){if(y===`
|
|
4
4
|
`&&p===`
|