decocms 3.97.7 → 3.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BbWDb4P3.js → AlertCircle-B2tKCnm8.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Cpa1HdMK.js → ArrowUpRight-C-ZXCXeN.js} +1 -1
- package/dist/client/assets/{CheckCircle-B5Cs3cJn.js → CheckCircle-BcI3T1tO.js} +1 -1
- package/dist/client/assets/{ChevronDown-Bdmn9wxy.js → ChevronDown-DKlpkOB2.js} +1 -1
- package/dist/client/assets/{ChevronLeft-E01n7Kl2.js → ChevronLeft-vu3jmJdt.js} +1 -1
- package/dist/client/assets/{ChevronRight-BwHVl1Gx.js → ChevronRight-CdRT7LjU.js} +1 -1
- package/dist/client/assets/{ChevronUp-DTAXKGQ5.js → ChevronUp-B0N31Im_.js} +1 -1
- package/dist/client/assets/{DotsVertical-BX0mUqDP.js → DotsVertical-wEiyEk6D.js} +1 -1
- package/dist/client/assets/{Eye-DpOHfPKV.js → Eye-5boS9nIv.js} +1 -1
- package/dist/client/assets/{FilterLines-DNJHlTjF.js → FilterLines-OqKdZVKs.js} +1 -1
- package/dist/client/assets/{Globe01-CzN1edxV.js → Globe01-CRm2mh-P.js} +1 -1
- package/dist/client/assets/{Globe04-CmTV4j_6.js → Globe04-BtSgO3H5.js} +1 -1
- package/dist/client/assets/{HardDrive-CZQneyxc.js → HardDrive-DxtF-IY8.js} +1 -1
- package/dist/client/assets/{Key01-CBdkPJJY.js → Key01-LrqIifxa.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BBIkUylk.js → LayoutLeft-BFka2GeR.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BCUpwug1.js → LinkExternal01-DgECMeuC.js} +1 -1
- package/dist/client/assets/{Monitor01-BukoJELB.js → Monitor01-TMDQZq46.js} +1 -1
- package/dist/client/assets/{Palette-StdAZEDj.js → Palette-D-5q-DfS.js} +1 -1
- package/dist/client/assets/{Play-B9ziq0DG.js → Play-Mf5cQSsU.js} +1 -1
- package/dist/client/assets/{Plus-CzEd_7C2.js → Plus-CpiYI_4d.js} +1 -1
- package/dist/client/assets/{SearchMd-B5oXD3je.js → SearchMd-Dj_Z4iwH.js} +1 -1
- package/dist/client/assets/{Settings02-YfBGKTKi.js → Settings02-C_rkmGxP.js} +1 -1
- package/dist/client/assets/{Shield01-D1SLus1-.js → Shield01-DputbTqH.js} +1 -1
- package/dist/client/assets/{Star01-Blw95h5T.js → Star01-DTKqRt_Y.js} +1 -1
- package/dist/client/assets/{Stars01-C8qwraWO.js → Stars01-CmPmyHdC.js} +1 -1
- package/dist/client/assets/{Stars02-CBmeuYJq.js → Stars02-C3IQpZYm.js} +1 -1
- package/dist/client/assets/{Sun-ffimMdFe.js → Sun-CY-48C0Q.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CWvc9zWe.js → SwitchHorizontal01-Bt5waFYC.js} +1 -1
- package/dist/client/assets/{Tool01-Co8bLuOG.js → Tool01-DIyxkJuF.js} +1 -1
- package/dist/client/assets/{Trash01-BDZ5N1so.js → Trash01-B4wYspRk.js} +1 -1
- package/dist/client/assets/{Upload01-BcQbyRUH.js → Upload01-Cx3iHgDj.js} +1 -1
- package/dist/client/assets/{User01-BmjG1Rsr.js → User01-bHHH-hCd.js} +1 -1
- package/dist/client/assets/{Users01-DaRZooOq.js → Users01-CUJ27ws5.js} +1 -1
- package/dist/client/assets/{Users03-BE5xe78Y.js → Users03-BwME7x2o.js} +1 -1
- package/dist/client/assets/{X-DN8Tc-8X.js → X-CyEH-HLB.js} +1 -1
- package/dist/client/assets/{XCircle-CbLW5tD6.js → XCircle-1yG7DJUE.js} +1 -1
- package/dist/client/assets/{XClose-CQmwzAVh.js → XClose-DrdWWhVa.js} +1 -1
- package/dist/client/assets/{Zap-Cf0CiCn8.js → Zap-BcROp_Sw.js} +1 -1
- package/dist/client/assets/{ZapSquare-BJwoqAGp.js → ZapSquare-CQGn3oRj.js} +1 -1
- package/dist/client/assets/{ZoomOut-BpayHaSz.js → ZoomOut-CP848i3T.js} +1 -1
- package/dist/client/assets/{access-gate-7TuRzUIC.js → access-gate-UYvjesC4.js} +1 -1
- package/dist/client/assets/{add-section-modal-S5GAD2Yv.js → add-section-modal-DjiKr-mG.js} +1 -1
- package/dist/client/assets/{agent-icon-CNuTyxJf.js → agent-icon-D4izi-0m.js} +1 -1
- package/dist/client/assets/{agents-list-Cw_hhlo7.js → agents-list-Bo4o9py9.js} +1 -1
- package/dist/client/assets/{ai-providers-BEQEsSMi.js → ai-providers-BeO7EK0W.js} +1 -1
- package/dist/client/assets/{alert-DS064q_2.js → alert-LYCfBUZh.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bi8YxknI.js → alert-dialog-CPIOFM7U.js} +1 -1
- package/dist/client/assets/{app-editor-D4EFBUDJ.js → app-editor-BIHJ9_p3.js} +1 -1
- package/dist/client/assets/{auth-DyAYzXhN.js → auth-BQJ4901M.js} +1 -1
- package/dist/client/assets/{auth-catchall-DPS4cXaM.js → auth-catchall-CvyCi0R5.js} +1 -1
- package/dist/client/assets/{auth-entry-CWk3k_C0.js → auth-entry-DkeNnDdz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-72PoTt3E.js → auth-split-layout-CsPWd72V.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-3kYKrfE-.js → authenticate-and-persist-oauth-DxcPuu6b.js} +1 -1
- package/dist/client/assets/{automation-list-row-W4J4D1Fl.js → automation-list-row-DJWQr3ii.js} +1 -1
- package/dist/client/assets/{automation-runs-DrUx0_JN.js → automation-runs-CBbmdd2g.js} +1 -1
- package/dist/client/assets/{automations-x4thNlJ4.js → automations-OwxtB2xV.js} +1 -1
- package/dist/client/assets/{avatar-ZBal56C9.js → avatar-6LwZYACh.js} +1 -1
- package/dist/client/assets/{badge-D0AzPgAt.js → badge-ClC_mVXH.js} +1 -1
- package/dist/client/assets/{block-document-CjUb2Jhk.js → block-document-BDP5bqaW.js} +1 -1
- package/dist/client/assets/{brand-context-DSRz4la_.js → brand-context-BPI754XR.js} +1 -1
- package/dist/client/assets/{buckets-qiUs41xV.js → buckets-lxivknwg.js} +1 -1
- package/dist/client/assets/{capability-load-error-By_-eER2.js → capability-load-error-BZ3C4jEm.js} +1 -1
- package/dist/client/assets/{card-MXiCFjBP.js → card-QhB5x9Lx.js} +1 -1
- package/dist/client/assets/{category-editor-DYJwtrMA.js → category-editor-Dh3xmOe5.js} +1 -1
- package/dist/client/assets/{chat-context-DiBX9-Ov.js → chat-context-B0mmOd9g.js} +1 -1
- package/dist/client/assets/{checkbox-CstNHCWX.js → checkbox-N0X_3WAx.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CbEuLxQe.js → cli-auth-success-CXFyuCJj.js} +1 -1
- package/dist/client/assets/{collection-detail-CngrY_hE.js → collection-detail-BvUolk38.js} +1 -1
- package/dist/client/assets/{collection-display-button-Cw0Rs8aH.js → collection-display-button-Dm0u8Icp.js} +1 -1
- package/dist/client/assets/{collection-search-DSBtDMrO.js → collection-search-CCJeZtSC.js} +1 -1
- package/dist/client/assets/{collection-tabs-HvCY1XOD.js → collection-tabs-CIbS_aRk.js} +1 -1
- package/dist/client/assets/{command-CZ7zKXxJ.js → command-CyTNhGQi.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-C_iLtzOc.js → commerce-onboarding-CEaL1-82.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CR3IauEw.js → connect-desktop-dialog-BXO2k7fs.js} +1 -1
- package/dist/client/assets/{connection-card-CTIqzaKu.js → connection-card-CS3v7rYN.js} +1 -1
- package/dist/client/assets/{connection-detail-C_6J-SPE.js → connection-detail-BI4w3NxZ.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Bm9rH8r-.js → connection-form-helpers-DhabLQU7.js} +1 -1
- package/dist/client/assets/{connections-D5tqJTyw.js → connections-BYrLijy4.js} +1 -1
- package/dist/client/assets/{context-menu-D9umYpZZ.js → context-menu-Q1Owjt7Z.js} +1 -1
- package/dist/client/assets/decopilot-Cw641gWp.js +4 -0
- package/dist/client/assets/{decopilot-sse-pool-BVQiWKqJ.js → decopilot-sse-pool-DGROjFUX.js} +1 -1
- package/dist/client/assets/{dialog-Cflfh_Tw.js → dialog-Cg3rcVr2.js} +1 -1
- package/dist/client/assets/{domain-settings-DCa9Ocnq.js → domain-settings-HOF2Zwde.js} +1 -1
- package/dist/client/assets/{drawer-0UiugAj3.js → drawer-CAJEFb6a.js} +1 -1
- package/dist/client/assets/{dropdown-menu-AY92Z-dd.js → dropdown-menu-DwkP3R-M.js} +1 -1
- package/dist/client/assets/{empty-state-Dx0oWv9I.js → empty-state-BA-8VXvV.js} +1 -1
- package/dist/client/assets/{extract-connection-data-OXojd7qP.js → extract-connection-data-CtVNT5JS.js} +1 -1
- package/dist/client/assets/{file-explorer-DFB16XEX.js → file-explorer-Dh4ucUbU.js} +1 -1
- package/dist/client/assets/{file-type-icon-6zbFot2C.js → file-type-icon-Dtw8pMpt.js} +1 -1
- package/dist/client/assets/{files-CV61ORwb.js → files-BrIfSgdo.js} +1 -1
- package/dist/client/assets/{form-kI1-d2Ap.js → form-r_9hbLn7.js} +1 -1
- package/dist/client/assets/{general-1Be5WBPJ.js → general-Dsili3D1.js} +1 -1
- package/dist/client/assets/{github-repo-picker-B6lDEWtg.js → github-repo-picker-BlOw6wWo.js} +1 -1
- package/dist/client/assets/{hooks-DSw61L3q.js → hooks-BZmjB2Y3.js} +1 -1
- package/dist/client/assets/{import-from-deco-dialog-DVF2YKW-.js → import-from-deco-dialog-CllLsuxG.js} +1 -1
- package/dist/client/assets/{index-DnVkFYRm.js → index-B6RuHW2d.js} +1 -1
- package/dist/client/assets/{index-BeCmcioi.js → index-BBDWvYlB.js} +1 -1
- package/dist/client/assets/{index-CeeMvg3X.js → index-BES1tco7.js} +1 -1
- package/dist/client/assets/{index-DQiUFldO.js → index-Bzybgde3.js} +1 -1
- package/dist/client/assets/{index-GuH7_k30.js → index-C-Ms0LlR.js} +1 -1
- package/dist/client/assets/{index-CbZvNsMe.js → index-CcEQJ9TP.js} +1 -1
- package/dist/client/assets/{index-DO84G1Ma.js → index-Cx-rmUTX.js} +1 -1
- package/dist/client/assets/{index-DRlZtDVf.js → index-D5VRKG0h.js} +1 -1
- package/dist/client/assets/{index-DqDkObQs.js → index-DDmZcB2_.js} +26 -26
- package/dist/client/assets/{index-DodzLX-5.js → index-DGQR8QX-.js} +1 -1
- package/dist/client/assets/{index-B5aMoJd5.js → index-DKxonbsE.js} +1 -1
- package/dist/client/assets/{index-smTHcnUA.js → index-MpjPxskG.js} +4 -4
- package/dist/client/assets/{index-C4RqHqQ-.js → index-V7Ke-ddW.js} +1 -1
- package/dist/client/assets/{index-C3lBPlh5.js → index-cEjDb0yt.js} +1 -1
- package/dist/client/assets/{index-redirect-CT2MUfLH.js → index-redirect-DNBN6D1L.js} +1 -1
- package/dist/client/assets/{input-3jBb-uLt.js → input-Cr9jBfB7.js} +1 -1
- package/dist/client/assets/{integration-icon-Bn0wvmtz.js → integration-icon-CcZDYv2E.js} +1 -1
- package/dist/client/assets/{label-DYbtyKk_.js → label-DE6yKu0U.js} +1 -1
- package/dist/client/assets/{login-Cs72_6kj.js → login-C3viYTk8.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BDYi7sDB.js → mcp-oauth-DpS4HNDv.js} +1 -1
- package/dist/client/assets/{members-DDUmE_tS.js → members-B_6V5QSG.js} +1 -1
- package/dist/client/assets/{monaco-editor-uPlGLArC.js → monaco-editor-riosOl5g.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Cx1pSXL3.js → monitoring-stats-row-Btsxp-Ss.js} +1 -1
- package/dist/client/assets/{oauth-callback-B1PoSivY.js → oauth-callback-D4zeeUFW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BHR_VU_e.js → oauth-callback-ai-provider-DGPhZiOX.js} +1 -1
- package/dist/client/assets/{onboarding-CuBcXom9.js → onboarding-De6fLW8h.js} +1 -1
- package/dist/client/assets/{org-install-Ce4Nl2nf.js → org-install-CUEkUiAv.js} +1 -1
- package/dist/client/assets/{org-layout-CywML7Tg.js → org-layout-QBJAyIrm.js} +1 -1
- package/dist/client/assets/{organization-choice-Dm4HbuQ0.js → organization-choice-Dv2OwI-t.js} +1 -1
- package/dist/client/assets/{page-seo-form-oeCi9CFa.js → page-seo-form-BOzWRvsQ.js} +1 -1
- package/dist/client/assets/page-seo-sheet-nyf66LRp.js +1 -0
- package/dist/client/assets/{popover-DG4qK6ZG.js → popover-CJe04WOy.js} +1 -1
- package/dist/client/assets/{post-editor-BHqMx9wf.js → post-editor-Rp79NJZ3.js} +1 -1
- package/dist/client/assets/{preview-dialog-D5QAlFg9.js → preview-dialog-BJCgRVN3.js} +1 -1
- package/dist/client/assets/{primitives-BjDrMu1e.js → primitives-r_FHuESN.js} +1 -1
- package/dist/client/assets/{profile-DPSRl9oD.js → profile-5-dOYDST.js} +1 -1
- package/dist/client/assets/project-app-view-DOzoLGgs.js +1 -0
- package/dist/client/assets/record-editor-DGsVK72Y.js +1 -0
- package/dist/client/assets/registry-BtQv7iAE.js +2 -0
- package/dist/client/assets/{registry-layout-B04NCkil.js → registry-layout-BqS7mSoz.js} +1 -1
- package/dist/client/assets/{require-capability-BBor_4EA.js → require-capability-a44oc3tu.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CnBiGFWB.js → required-auth-layout-QkAj4QVN.js} +1 -1
- package/dist/client/assets/{reset-password-DXYp8lVw.js → reset-password-CvATWsJB.js} +1 -1
- package/dist/client/assets/{roles-CoSM2yC_.js → roles-B37QLVHE.js} +1 -1
- package/dist/client/assets/{save-status-ce87Zgi0.js → save-status-xtYw_K9n.js} +1 -1
- package/dist/client/assets/{scroll-area-B42MPIw3.js → scroll-area-BPQwtIHi.js} +1 -1
- package/dist/client/assets/{search-input-CC_aa0Gt.js → search-input-BzADBDiR.js} +1 -1
- package/dist/client/assets/{secrets-Bys8E3nN.js → secrets-s5veILtZ.js} +1 -1
- package/dist/client/assets/{sections-editor-Ck_gejiB.js → sections-editor-Dihe2f7L.js} +1 -1
- package/dist/client/assets/{select-DieoiSYl.js → select-CP2O-MPr.js} +1 -1
- package/dist/client/assets/{select-model-CV7D1CvA.js → select-model-Bt5mshkF.js} +1 -1
- package/dist/client/assets/{seo-editor-aTRXaVxH.js → seo-editor-D-p1HMD9.js} +1 -1
- package/dist/client/assets/{settings-layout-BcLFii5a.js → settings-layout-CLYXRsYz.js} +1 -1
- package/dist/client/assets/{settings-section-VnNyBtnl.js → settings-section-C91STDXl.js} +1 -1
- package/dist/client/assets/{sheet-Pqbb_nLq.js → sheet-qUAd_2vk.js} +1 -1
- package/dist/client/assets/{shell-controls-DKdbxI5l.js → shell-controls-TBi4Bs6a.js} +1 -1
- package/dist/client/assets/{shell-layout-DQydNkht.js → shell-layout-D2QUbgoY.js} +1 -1
- package/dist/client/assets/{shell-route-loading-CMccwwVE.js → shell-route-loading-CZ7PjWkH.js} +1 -1
- package/dist/client/assets/{sidebar-BLOsSoN_.js → sidebar-BHss58rk.js} +1 -1
- package/dist/client/assets/{skeleton-CLfhTXx-.js → skeleton-BxYVo1ej.js} +1 -1
- package/dist/client/assets/{sortable.esm-Cc0x-CQz.js → sortable.esm-CxO66Aqu.js} +1 -1
- package/dist/client/assets/{sso--kjp7-8f.js → sso-CQXCda0c.js} +1 -1
- package/dist/client/assets/{store-BIZZek5w.js → store-f9SUFb27.js} +1 -1
- package/dist/client/assets/store-registry-CzotbzeO.js +2 -0
- package/dist/client/assets/{studio-tools-FklJDanw.js → studio-tools-DVojvDEr.js} +1 -1
- package/dist/client/assets/{switch-CHco2opq.js → switch-C86XM8Lb.js} +1 -1
- package/dist/client/assets/{table-BPRYh1TO.js → table-CNjcUwhh.js} +1 -1
- package/dist/client/assets/{tabs-Ca-c7EUe.js → tabs-Bq1ZowRE.js} +1 -1
- package/dist/client/assets/{task-status-Cekf3ZU9.js → task-status-DXwOekTG.js} +1 -1
- package/dist/client/assets/{textarea-BAEhJXU5.js → textarea-CixyZRlq.js} +1 -1
- package/dist/client/assets/{toggle-group-OTavjf1W.js → toggle-group-BdCNGWln.js} +1 -1
- package/dist/client/assets/{toolbar-DDBdnwsl.js → toolbar-DbGfvfdI.js} +1 -1
- package/dist/client/assets/{tooltip-C8EAE8WH.js → tooltip-CEM9S4pg.js} +1 -1
- package/dist/client/assets/{types-BqGw3gnw.js → types-DDQhAUH9.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BUofhQwM.js → use-ai-providers-CpTKYZRn.js} +1 -1
- package/dist/client/assets/{use-automations-E5-3gLDv.js → use-automations-D5oUll8g.js} +1 -1
- package/dist/client/assets/{use-capability-BbL91qJb.js → use-capability-t-9WULPE.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CytvSUpz.js → use-clock-tick-BySyJdAG.js} +1 -1
- package/dist/client/assets/{use-collections-Dh2p4suc.js → use-collections-CVlcIFcl.js} +1 -1
- package/dist/client/assets/{use-connection-h3hvIRkK.js → use-connection-B7hehSBo.js} +1 -1
- package/dist/client/assets/{use-copy-DFWhQKHC.js → use-copy-T1Xud-C6.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DXsZDQcc.js → use-create-virtual-mcp-CI7JmXUA.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DbY-cSB7.js → use-debounced-autosave-BJyLUAIB.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BOJATnTh.js → use-delete-connection-BkhqKngp.js} +1 -1
- package/dist/client/assets/{use-file-configs-DG6KTQKj.js → use-file-configs-zP_QQ_ZA.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-zQ1y1b1L.js → use-infinite-scroll-Bzqu-Hgc.js} +1 -1
- package/dist/client/assets/{use-join-requests-CFs0Vp2p.js → use-join-requests-DaCmnTl9.js} +1 -1
- package/dist/client/assets/{use-mcp-client-SQJoN-V8.js → use-mcp-client-D0CDCf2C.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BsdifcZC.js → use-mcp-prompts-CFOe4FP5.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Cle5Kd84.js → use-mcp-tools-oAYlV_rV.js} +1 -1
- package/dist/client/assets/{use-members-Ch1XITTN.js → use-members-uzLM9gLc.js} +1 -1
- package/dist/client/assets/{use-mobile-CvCMlflA.js → use-mobile-taJ6Byue.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DQghLhaf.js → use-navigate-to-agent-NCPMRSC-.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CVxnVAwj.js → use-org-auth-client-BI60dBQ8.js} +1 -1
- package/dist/client/assets/{use-org-sso-CWXefYPz.js → use-org-sso-DRd1kOa9.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DBbnxQm7.js → use-organization-roles-DHLS6-m5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-0OKnMPr2.js → use-organization-settings-BCL7l3Gq.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bw564Fn1.js → use-registry-connections-C1tYRr1m.js} +1 -1
- package/dist/client/assets/{use-secrets-Cox1bfg5.js → use-secrets-CrkSMWB9.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Dxz86iWd.js → use-status-sounds-DEhsbseD.js} +1 -1
- package/dist/client/assets/{use-view-mode-BTmAO-eH.js → use-view-mode-CXKeWsQW.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-nCKsVOOs.js → use-virtual-mcp-q2Cm2W65.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B5tA5pfi.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DtIVyYSY.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-CKsQYhMg.js → useSuspenseQueries-DvUMI2b6.js} +1 -1
- package/dist/client/assets/{variant-calendar-D4xtrF_C.js → variant-calendar-DNxbSxzY.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-qPa51MgO.js → view-mode-toggle-DfJxMNM0.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +437 -437
- package/dist/server/server.js +300 -300
- package/package.json +1 -1
- package/dist/client/assets/decopilot-DeMlzLYJ.js +0 -4
- package/dist/client/assets/page-seo-sheet-REU1FYqG.js +0 -1
- package/dist/client/assets/project-app-view-DIuhFpla.js +0 -1
- package/dist/client/assets/record-editor-DVsbJOpA.js +0 -1
- package/dist/client/assets/registry-BFYHD6vu.js +0 -2
- package/dist/client/assets/store-registry-BU7RcCrC.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DaeGOmGx.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DOQWnPwU.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bh as _u,bi as ke,bj as io,s as D,al as ve,aG as ut,bk as ls,aD as ae,bl as Jn,bm as qe,aE as Rt,bn as yn,o as B,bo as cs,bp as so,bq as Iu,br as Tu,bs as Ya,bt as Nu,bu as Pu,bv as Fu,bw as Ja,bx as $u,b7 as ot,by as Du,aF as lt,bz as Ru,c as Oe,r as N,l as Lr,j as m,aQ as Za,D as us,a as ku,t as wr,bA as ds,bB as Xa,bC as Mu,bD as Uu,bE as Lu,bg as Qa,bF as fs,R as Bu,bG as Vu,bH as qu,bI as zu,a3 as Wu,W as tn,V as sr,_ as bn,ai as Hu,aj as Ku,bJ as Gu,Y as Yu,bK as Ju,B as Br,i as ms,b as Zu,E as Xu,ab as Qu}from"./index-smTHcnUA.js";import{P as _n}from"./index-DO84G1Ma.js";import{E as el}from"./empty-state-Dx0oWv9I.js";import{A as tl,f as ed,h as td,n as nd,j as rd,k as id,i as sd,u as od}from"./use-mcp-client-SQJoN-V8.js";import{c as ad}from"./use-mcp-tools-Cle5Kd84.js";import{c as ld}from"./ZoomOut-BpayHaSz.js";import{i as cd}from"./Key01-CBdkPJJY.js";import{b as ud,u as dd,a as fd}from"./use-connection-h3hvIRkK.js";import{U as In,a as si,e as oo}from"./auth-DyAYzXhN.js";import{i as md,c as hd,d as pd,e as gd}from"./extract-connection-data-OXojd7qP.js";import{u as yd}from"./use-registry-connections-Bw564Fn1.js";import{b as bd}from"./use-organization-settings-0OKnMPr2.js";import{s as xd}from"./Plus-CzEd_7C2.js";import{e as nl,d as vd,b as Sd,c as wd,S as jd,a as Od}from"./select-DieoiSYl.js";import{R as ao}from"./index-DQiUFldO.js";import{R as Ed,I as Ad,a as Cd}from"./index-BeCmcioi.js";import{_ as Vt}from"./index-B5aMoJd5.js";import{A as rl}from"./agent-icon-CNuTyxJf.js";import{I as _d}from"./input-3jBb-uLt.js";import{a as Id,b as Td,P as Nd}from"./popover-DG4qK6ZG.js";import{b as Pd,a as Fd,c as $d,T as Dd}from"./tooltip-C8EAE8WH.js";import{u as Rd}from"./use-virtual-mcp-nCKsVOOs.js";import{i as kd}from"./ChevronUp-DTAXKGQ5.js";import{i as Md}from"./SearchMd-B5oXD3je.js";import{a as Ud}from"./Users03-BE5xe78Y.js";import{u as Ld}from"./use-mobile-CvCMlflA.js";import{u as Bd}from"./use-create-virtual-mcp-DXsZDQcc.js";function Vd(){const t=new tl({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return _u(t),t}class qd{#e=Vd();#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=zd(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 zd(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 Wd=new qd;var Hd=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||ve();i instanceof yn&&(t.number=i.int())}}},Kd=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=ls():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},Gd=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?ls():!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 Rt(t);if(e==="number"){const[n,r,...i]=t;return Jn([qe(n),qe(r),...i.map(s=>qe(s))])}return e==="boolean"?Jn([qe(!0),qe(!1)]):!1}},Yd=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}}},Jd=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=D())}},Zd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||D();r instanceof cs&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Xd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||D();r instanceof cs&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Qd=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||D();if(r instanceof cs){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},ef=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(t.number=r.min(n.minimum))}}},tf=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(t.number=r.max(n.maximum))}}},nf=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},rf=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},sf=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(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}`}))}}},of=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=ae(ke()))}},af=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||ae(ke())).min(n.minItems))}},lf=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||ae(ke())).max(n.maxItems))}},cf=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||ae(ke());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=ae(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||ae(ke()):t.array=ae(ke()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||ae(ke()):n.prefixItems&&(t.array=t.array||ae(ke()))}},uf=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=so([]):i=so(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}},df=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||B({}).passthrough())}},ff=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=B({}).passthrough())}},mf=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||B({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},hf=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||B({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Zn(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)=>Zn(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)&&Zn(t[i],e[i]))}return!1}function pf(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>Zn(n,i))?!1:(e.push(n),!0))}}function Pr(t,e){return t.safeParse(e).success}var gf=class{apply(t,e){if(!e.not)return t;const n=Ie(e.not);return t.refine(r=>!Pr(n,r),{message:"Value must not match the 'not' schema"})}},yf=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(pf(),{message:"Array items must be unique"})}},bf=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Ie(r)).reduce((r,i)=>Ya(r,i),t)}},xf=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Ie(e.anyOf[0]):Jn([Ie(e.anyOf[0]),Ie(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Ie(r))]);return Ya(t,n)}},vf=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"})}},Sf=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(!Pr(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(!Pr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},wf=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?B(r):B(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"})}},jf=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=>Zn(r,i)),{message:"Value must match one of the enum values"})}},Of=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=>Zn(r,n),{message:"Value must equal the const value"})}},Ef=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},Af=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))}},Cf=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)Pr(i,u)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},_f=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},If=[new Kd,new Gd,new Hd,new Yd,new Jd,new of,new ff,new Zd,new Xd,new Qd,new ef,new tf,new nf,new rf,new sf,new uf,new af,new lf,new cf,new mf,new hf,new df],Tf=[new Af,new jf,new Of,new bf,new xf,new vf,new Sf,new wf,new Cf,new gf,new yf,new _f,new Ef];function Ie(t){if(typeof t=="boolean")return t?ke():io();const e={};for(const i of If)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||D()),e.number!==!1&&n.push(e.number||ve()),e.boolean!==!1&&n.push(e.boolean||ut()),e.null!==!1&&n.push(e.null||ls()),e.array!==!1&&n.push(e.array||ae(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=io():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=Jn(n):r=ke();for(const i of Tf)r=i.apply(r,t);return r}class lo 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(co(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(co(this),n)}}function Nf(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function Di(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(Di).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${Di(t.cause)}`:t.message:`${t}`}function co(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)},hs=(t,e,n)=>e.has(t)||il("Cannot "+n),X=(t,e,n)=>(hs(t,e,"read from private field"),n?n.call(t):e.get(t)),we=(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),ge=(t,e,n,r)=>(hs(t,e,"write to private field"),e.set(t,n),n),st=(t,e,n)=>(hs(t,e,"access private method"),n),Pe,$t,Zt,jr,Fr,Bn,nn,Vn,vt,Xt,an,Qt,Dn,Ve,Ri,ki,Mi,uo,Ui,Li,Rn,Bi,Vi;class Or extends EventTarget{constructor(e,n){var r,i;super(),we(this,Ve),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,we(this,Pe),we(this,$t),we(this,Zt),we(this,jr),we(this,Fr),we(this,Bn),we(this,nn),we(this,Vn,null),we(this,vt),we(this,Xt),we(this,an,null),we(this,Qt,null),we(this,Dn,null),we(this,ki,async s=>{var o;X(this,Xt).reset();const{body:a,redirected:l,status:u,headers:c}=s;if(u===204){st(this,Ve,Rn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?ge(this,Zt,new URL(s.url)):ge(this,Zt,void 0),u!==200){st(this,Ve,Rn).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){st(this,Ve,Rn).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(X(this,Pe)===this.CLOSED)return;ge(this,Pe,this.OPEN);const d=new Event("open");if((o=X(this,Dn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){st(this,Ve,Rn).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const h=new TextDecoder,y=a.getReader();let f=!0;do{const{done:p,value:b}=await y.read();b&&X(this,Xt).feed(h.decode(b,{stream:!p})),p&&(f=!1,X(this,Xt).reset(),st(this,Ve,Bi).call(this))}while(f)}),we(this,Mi,s=>{ge(this,vt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&st(this,Ve,Bi).call(this,Di(s))}),we(this,Ui,s=>{typeof s.id=="string"&&ge(this,Vn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:X(this,Zt)?X(this,Zt).origin:X(this,$t).origin,lastEventId:s.id||""});X(this,Qt)&&(!s.event||s.event==="message")&&X(this,Qt).call(this,o),this.dispatchEvent(o)}),we(this,Li,s=>{ge(this,Bn,s)}),we(this,Vi,()=>{ge(this,nn,void 0),X(this,Pe)===this.CONNECTING&&st(this,Ve,Ri).call(this)});try{if(e instanceof URL)ge(this,$t,e);else if(typeof e=="string")ge(this,$t,new URL(e,Pf()));else throw new Error("Invalid URL")}catch{throw Nf("An invalid or illegal string was specified")}ge(this,Xt,ed({onEvent:X(this,Ui),onRetry:X(this,Li)})),ge(this,Pe,this.CONNECTING),ge(this,Bn,3e3),ge(this,Fr,(r=n?.fetch)!=null?r:globalThis.fetch),ge(this,jr,(i=n?.withCredentials)!=null?i:!1),st(this,Ve,Ri).call(this)}get readyState(){return X(this,Pe)}get url(){return X(this,$t).href}get withCredentials(){return X(this,jr)}get onerror(){return X(this,an)}set onerror(e){ge(this,an,e)}get onmessage(){return X(this,Qt)}set onmessage(e){ge(this,Qt,e)}get onopen(){return X(this,Dn)}set onopen(e){ge(this,Dn,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(){X(this,nn)&&clearTimeout(X(this,nn)),X(this,Pe)!==this.CLOSED&&(X(this,vt)&&X(this,vt).abort(),ge(this,Pe,this.CLOSED),ge(this,vt,void 0))}}Pe=new WeakMap,$t=new WeakMap,Zt=new WeakMap,jr=new WeakMap,Fr=new WeakMap,Bn=new WeakMap,nn=new WeakMap,Vn=new WeakMap,vt=new WeakMap,Xt=new WeakMap,an=new WeakMap,Qt=new WeakMap,Dn=new WeakMap,Ve=new WeakSet,Ri=function(){ge(this,Pe,this.CONNECTING),ge(this,vt,new AbortController),X(this,Fr)(X(this,$t),st(this,Ve,uo).call(this)).then(X(this,ki)).catch(X(this,Mi))},ki=new WeakMap,Mi=new WeakMap,uo=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...X(this,Vn)?{"Last-Event-ID":X(this,Vn)}:void 0},cache:"no-store",signal:(t=X(this,vt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},Ui=new WeakMap,Li=new WeakMap,Rn=function(t,e){var n;X(this,Pe)!==this.CLOSED&&ge(this,Pe,this.CLOSED);const r=new lo("error",{code:e,message:t});(n=X(this,an))==null||n.call(this,r),this.dispatchEvent(r)},Bi=function(t,e){var n;if(X(this,Pe)===this.CLOSED)return;ge(this,Pe,this.CONNECTING);const r=new lo("error",{code:e,message:t});(n=X(this,an))==null||n.call(this,r),this.dispatchEvent(r),ge(this,nn,setTimeout(X(this,Vi),X(this,Bn)))},Vi=new WeakMap,Or.CONNECTING=0,Or.OPEN=1,Or.CLOSED=2;function Pf(){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 Ff extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class $f{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=td(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new In("No auth provider");let e;try{e=await si(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 In;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=nd(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 Or(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}=oo(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 Ff(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=Ja.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 In("No auth provider");if(await si(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new In("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}=oo(i);if(this._resourceMetadataUrl=o,this._scope=a,await si(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new In;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 Df="mcp";class Rf{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,Df),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=Ja.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 kf extends rd{constructor(e,n){super(e,n)}send(e,n){const r=Mf(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function Mf(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 Uf extends id{constructor(e,n){super(e,{jsonSchemaValidator:Wd,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},$u,n)}}const Lf=async(t,e,n)=>{const r=Bf(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new Uf({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Bf=(t,e,n)=>{if(t.type==="Websocket")return new Rf(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 $f(new URL(t.url),s)}return new kf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},fo=t=>{try{return JSON.parse(t)}catch{return t}},gr=new Map,mo=(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 Vf(t){const e=n=>"connection"in t?Lf({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:y,isError:f,content:p}=await h.callTool({name:String(u),arguments:l});if(f){const v=p?.[0]?.text,S=typeof v=="string"?fo(v):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(y??p)}`)}if(y!==void 0)return y;const b=p?.[0]?.text;return typeof b=="string"?fo(b):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 gr.has(u)||gr.set(u,s()),await gr.get(u)}catch(c){console.error("Failed to list tools",c),gr.delete(u);return}}async function a(){return(await o()??[]).map(u=>mo(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 mo(u,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>qf({connection:n}):global[e]}});function qf(t){return Vf(t)}function zf(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 Wf=B({id:D().describe("Unique identifier for the entity"),title:D().describe("Human-readable title for the entity"),description:D().nullish().describe("Description of the entity"),created_at:D().datetime(),updated_at:D().datetime(),created_by:D().optional(),updated_by:D().optional()}),Hf=B({field:ae(D()),operator:Rt(["eq","gt","gte","lt","lte","in","like","contains"]),value:ot()}),sl=Du(()=>Jn([Hf,B({operator:Rt(["and","or","not"]),conditions:ae(sl)})])),Kf=B({field:ae(D()),direction:Rt(["asc","desc"]),nulls:Rt(["first","last"]).optional()}),Gf=B({where:sl.optional().describe("Filter expression"),orderBy:ae(Kf).optional().describe("Sort expressions"),limit:ve().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:ve().int().min(0).optional().describe("Number of items to skip")});function Yf(t){return B({items:ae(t).describe("Array of collection items"),totalCount:ve().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:ut().optional().describe("Whether there are more items available")})}const Jf=B({id:D().describe("ID of the entity to retrieve")});function Zf(t){return B({item:t.nullable().describe("The retrieved item, or null if not found")})}B({id:D().describe("ID of the entity to delete")});function Xf(t,e,n){const r=t.toUpperCase();return[{name:`COLLECTION_${r}_LIST`,inputSchema:Gf,outputSchema:Yf(e)},{name:`COLLECTION_${r}_GET`,inputSchema:Jf,outputSchema:Zf(e)}]}const Qf=B({id:D(),name:D(),description:D().optional(),inputSchema:lt(D(),ot()),outputSchema:lt(D(),ot()).optional()}),em=Wf.extend({_meta:B({"io.decocms":B({id:D(),verified:ut(),scopeName:D(),appName:D(),friendlyName:D().nullable().optional(),metadata:lt(D(),ot()).nullable().optional(),publishedAt:D().datetime().optional(),updatedAt:D().datetime().optional(),tools:ae(Qf).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:B({$schema:D().optional(),_meta:lt(D(),ot()).optional(),name:D().describe("The server name (scope/app)"),title:D().optional().describe("User-friendly title"),description:D().optional().describe("Server description"),icons:ae(B({src:D(),mimeType:D().optional(),sizes:ae(D()).optional(),theme:Rt(["light","dark"]).optional()})).optional(),remotes:ae(B({type:Rt(["http","stdio","sse"]),url:D().optional(),headers:ae(ot()).optional()})).optional(),packages:ae(ot()).optional(),repository:B({url:D(),source:D().optional(),subfolder:D().optional()}).optional(),version:D().optional(),websiteUrl:D().optional()})});Xf("registry_app",em);const tm=B({specversion:qe("1.0").describe("CloudEvents specification version"),id:D().describe("Unique identifier for this event (UUID recommended)"),source:D().describe("Connection ID of the event publisher"),type:D().describe("Event type (e.g., 'order.created', 'user.signup')"),time:D().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:D().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:D().optional().default("application/json").describe("Content type of the data attribute"),dataschema:D().url().optional().describe("URI to the schema for the data attribute"),data:ot().optional().describe("Event payload (any JSON value)")});B({events:ae(tm).min(1).describe("Batch of CloudEvents to process")});const nm=B({success:ut().optional().describe("Whether this event was processed successfully"),error:D().optional().describe("Error message for this event"),retryAfter:ve().int().positive().optional().describe("Re-deliver this event after this many ms")});B({success:ut().optional().describe("Batch success - applies to events not in results"),error:D().optional().describe("Batch error message - applies to events not in results"),processedCount:ve().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:ve().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:lt(D(),nm).optional().describe("Per-event results keyed by event ID")});const rm=B({type:qe("string"),enum:ae(D()).optional(),description:D().optional()}),im=B({type:D(),description:D(),paramsSchema:lt(D(),rm)});B({});B({triggers:ae(im)});B({type:D(),params:lt(D(),D()),enabled:ut(),callbackUrl:Ru().optional(),callbackToken:D().min(1).optional()});B({success:ut()});B({prefix:D().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:ve().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:D().optional().describe("Token for pagination from previous response"),delimiter:D().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});B({objects:ae(B({key:D().describe("Object key/path"),size:ve().describe("Object size in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object")})),nextContinuationToken:D().optional().describe("Token for fetching next page of results"),isTruncated:ut().describe("Whether there are more results available"),commonPrefixes:ae(D()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});B({key:D().describe("Object key/path to get metadata for")});B({contentType:D().optional().describe("MIME type of the object"),contentLength:ve().describe("Size of the object in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object"),metadata:lt(D(),D()).optional().describe("Custom metadata key-value pairs")});B({key:D().describe("Object key/path to generate URL for"),expiresIn:ve().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});B({url:D().describe("Presigned URL for downloading the object"),expiresIn:ve().describe("Expiration time in seconds that was used")});B({key:D().describe("Object key/path for the upload"),expiresIn:ve().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:D().optional().describe("MIME type for the object being uploaded")});B({url:D().describe("Presigned URL for uploading the object"),expiresIn:ve().describe("Expiration time in seconds that was used")});B({key:D().describe("Object key/path to delete")});B({success:ut().describe("Whether the deletion was successful"),key:D().describe("The key that was deleted")});B({keys:ae(D()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});B({deleted:ae(D()).describe("Array of successfully deleted keys"),errors:ae(B({key:D(),message:D()})).describe("Array of errors for failed deletions")});const sm=B({primary:D().optional().describe("Primary brand color (hex)"),secondary:D().optional().describe("Secondary brand color (hex)"),accent:D().optional().describe("Accent / highlight color (hex)"),background:D().optional().describe("Background color (hex)"),foreground:D().optional().describe("Foreground / text color (hex)")}),om=B({heading:D().optional().describe("Font family for headings"),body:D().optional().describe("Font family for body text"),code:D().optional().describe("Font family for code / monospace")}),am=B({logo:D().optional().describe("Logo URL"),favicon:D().optional().describe("Favicon URL"),ogImage:D().optional().describe("Open Graph image URL")}),lm=B({id:D(),name:D().describe("Brand / company name"),domain:D().optional().describe("Company domain (e.g. example.com)"),colors:sm.optional().describe("Semantic color palette"),fonts:om.optional().describe("Font families by role"),assets:am.optional().describe("Visual identity assets"),overview:D().optional().describe("Company overview / description"),tagline:D().optional().describe("Brand tagline"),tone:D().optional().describe("Tone of voice description"),metadata:lt(D(),ot()).optional().describe("Extra design tokens and metadata")});B({id:D().optional().describe("Brand ID. Omit to get the default brand.")});B({});B({items:ae(lm)});const cm={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function um(t){if(t)return cm[t]}function ZO(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 zf(i).isImplementedBy(r)}const ps=N.createContext(null);function XO(t){const e=Oe.c(3),{children:n}=t,r=N.useContext(ps);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 dm(t){const e=Oe.c(3),{children:n}=t,r=N.useContext(ps);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 QO=dm;function eE(t){const e=Oe.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=C=>{l.current=C,C&&a(_=>_.leftEl===C?_:{..._,leftEl:C})},e[1]=d):d=e[1];const h=d;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=C=>{u.current=C,C&&a(_=>_.tabsEl===C?_:{..._,tabsEl:C})},e[2]=y):y=e[2];const f=y;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=C=>{c.current=C,C&&a(_=>_.actionsEl===C?_:{..._,actionsEl:C})},e[3]=p):p=e[3];const b=p,v=i&&"hidden";let S;e[4]!==v?(S=Lr(v),e[4]=v,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(_n.Header.Left,{children:[r,E]}),e[7]=r,e[8]=j):j=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsxs(_n.Header.Right,{children:[m.jsx("div",{ref:f,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),m.jsx("div",{ref:b,className:"flex items-center gap-2 shrink-0"})]}),e[9]=g):g=e[9];let x;e[10]!==S||e[11]!==j?(x=m.jsxs(_n.Header,{className:S,children:[j,g]}),e[10]=S,e[11]=j,e[12]=x):x=e[12];let w;e[13]!==n?(w=m.jsx(_n.Content,{children:n}),e[13]=n,e[14]=w):w=e[14];let O;e[15]!==x||e[16]!==w?(O=m.jsxs(_n,{children:[x,w]}),e[15]=x,e[16]=w,e[17]=O):O=e[17];let A;return e[18]!==o||e[19]!==O?(A=m.jsx(ps,{value:o,children:O}),e[18]=o,e[19]=O,e[20]=A):A=e[20],A}function fm(t){return t.startsWith("@")?t:`@${t}`}function mm(){const{org:t}=us(),{data:e}=ku.useSession(),n=ud(),r=yd(),i=bd(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!t||!e?.user?.id){wr.error("Not authenticated");return}const l=fm(a),c=(await Promise.all(s.map(async p=>{const b=md(p.id,t.id);try{const v=await hd(p.id,t.id,t.slug,b,{where:{appName:l}});return pd(v??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!c){wr.error(`MCP Server not found in registry: ${a}`);return}const d=gd(c,t.id,e.user.id),h=d.connection_type==="STDIO",y=!!d.connection_url,f=h&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!y&&!f){wr.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 z(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 hm(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),z(t.additionalItems)}function ho(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 at="__additional_property",rn="additionalProperties",At="allOf",ee="anyOf",Ne="const",kt="default",gs="dependencies",pm="enum",Ce="__errors",fe="$id",ys="if",cn="items",gm="_$junk_option_schema_id$_",Er="$name",H="oneOf",qi="patternProperties",se="properties",oi="readonly",ol="required",$r="submitButtonOptions",de="$ref",qn="__rjsf_ref",kn="$schema",al="root",ll="_",ym=["discriminator","propertyName"],po="formContext",bm="layoutGridLookupMap",bs="__rjsf_additionalProperties",cl="__rjsf_rootSchema",xm="ui:field",xs="ui:widget",wt="ui:options",zi="ui:globalOptions",vm="ui:definitions",Sm="https://json-schema.org/draft/2019-09/schema",Ar="https://json-schema.org/draft/2020-12/schema";function V(t={},e={}){return t?Object.keys(t).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=t[r];return r===xs&&z(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===wt&&z(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function ul(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=V(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var dl=typeof global=="object"&&global&&global.Object===Object&&global,wm=typeof self=="object"&&self&&self.Object===Object&&self,nt=dl||wm||Function("return this")(),Me=nt.Symbol,fl=Object.prototype,jm=fl.hasOwnProperty,Om=fl.toString,Tn=Me?Me.toStringTag:void 0;function Em(t){var e=jm.call(t,Tn),n=t[Tn];try{t[Tn]=void 0;var r=!0}catch{}var i=Om.call(t);return r&&(e?t[Tn]=n:delete t[Tn]),i}var Am=Object.prototype,Cm=Am.toString;function _m(t){return Cm.call(t)}var Im="[object Null]",Tm="[object Undefined]",go=Me?Me.toStringTag:void 0;function dt(t){return t==null?t===void 0?Tm:Im:go&&go in Object(t)?Em(t):_m(t)}function ml(t,e){return function(n){return t(e(n))}}var Vr=ml(Object.getPrototypeOf,Object);function Ue(t){return t!=null&&typeof t=="object"}var Nm="[object Object]",Pm=Function.prototype,Fm=Object.prototype,hl=Pm.toString,$m=Fm.hasOwnProperty,Dm=hl.call(Object);function Ct(t){if(!Ue(t)||dt(t)!=Nm)return!1;var e=Vr(t);if(e===null)return!0;var n=$m.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&hl.call(n)==Dm}function Wi(t){const e={[Ce]:[],addError(n){this[Ce].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:Wi(r)}),e);if(Ct(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:Wi(n[i])}),e)}return e}var je=Array.isArray,Rm="[object Symbol]";function or(t){return typeof t=="symbol"||Ue(t)&&dt(t)==Rm}var km=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mm=/^\w*$/;function vs(t,e){if(je(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||or(t)?!0:Mm.test(t)||!km.test(t)||e!=null&&t in Object(e)}function ne(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Um="[object AsyncFunction]",Lm="[object Function]",Bm="[object GeneratorFunction]",Vm="[object Proxy]";function ar(t){if(!ne(t))return!1;var e=dt(t);return e==Lm||e==Bm||e==Um||e==Vm}var ai=nt["__core-js_shared__"],yo=(function(){var t=/[^.]+$/.exec(ai&&ai.keys&&ai.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function qm(t){return!!yo&&yo in t}var zm=Function.prototype,Wm=zm.toString;function qt(t){if(t!=null){try{return Wm.call(t)}catch{}try{return t+""}catch{}}return""}var Hm=/[\\^$.*+?()[\]{}|]/g,Km=/^\[object .+?Constructor\]$/,Gm=Function.prototype,Ym=Object.prototype,Jm=Gm.toString,Zm=Ym.hasOwnProperty,Xm=RegExp("^"+Jm.call(Zm).replace(Hm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qm(t){if(!ne(t)||qm(t))return!1;var e=ar(t)?Xm:Km;return e.test(qt(t))}function eh(t,e){return t?.[e]}function zt(t,e){var n=eh(t,e);return Qm(n)?n:void 0}var Xn=zt(Object,"create");function th(){this.__data__=Xn?Xn(null):{},this.size=0}function nh(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var rh="__lodash_hash_undefined__",ih=Object.prototype,sh=ih.hasOwnProperty;function oh(t){var e=this.__data__;if(Xn){var n=e[t];return n===rh?void 0:n}return sh.call(e,t)?e[t]:void 0}var ah=Object.prototype,lh=ah.hasOwnProperty;function ch(t){var e=this.__data__;return Xn?e[t]!==void 0:lh.call(e,t)}var uh="__lodash_hash_undefined__";function dh(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Xn&&e===void 0?uh:e,this}function Mt(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])}}Mt.prototype.clear=th;Mt.prototype.delete=nh;Mt.prototype.get=oh;Mt.prototype.has=ch;Mt.prototype.set=dh;function fh(){this.__data__=[],this.size=0}function lr(t,e){return t===e||t!==t&&e!==e}function qr(t,e){for(var n=t.length;n--;)if(lr(t[n][0],e))return n;return-1}var mh=Array.prototype,hh=mh.splice;function ph(t){var e=this.__data__,n=qr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():hh.call(e,n,1),--this.size,!0}function gh(t){var e=this.__data__,n=qr(e,t);return n<0?void 0:e[n][1]}function yh(t){return qr(this.__data__,t)>-1}function bh(t,e){var n=this.__data__,r=qr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ft(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])}}ft.prototype.clear=fh;ft.prototype.delete=ph;ft.prototype.get=gh;ft.prototype.has=yh;ft.prototype.set=bh;var Qn=zt(nt,"Map");function xh(){this.size=0,this.__data__={hash:new Mt,map:new(Qn||ft),string:new Mt}}function vh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function zr(t,e){var n=t.__data__;return vh(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Sh(t){var e=zr(this,t).delete(t);return this.size-=e?1:0,e}function wh(t){return zr(this,t).get(t)}function jh(t){return zr(this,t).has(t)}function Oh(t,e){var n=zr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function mt(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])}}mt.prototype.clear=xh;mt.prototype.delete=Sh;mt.prototype.get=wh;mt.prototype.has=jh;mt.prototype.set=Oh;var Eh="Expected a function";function Ss(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Eh);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(Ss.Cache||mt),n}Ss.Cache=mt;var Ah=500;function Ch(t){var e=Ss(t,function(r){return n.size===Ah&&n.clear(),r}),n=e.cache;return e}var _h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ih=/\\(\\)?/g,pl=Ch(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(_h,function(n,r,i,s){e.push(i?s.replace(Ih,"$1"):r||n)}),e});function xn(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 bo=Me?Me.prototype:void 0,xo=bo?bo.toString:void 0;function gl(t){if(typeof t=="string")return t;if(je(t))return xn(t,gl)+"";if(or(t))return xo?xo.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ws(t){return t==null?"":gl(t)}function vn(t,e){return je(t)?t:vs(t,e)?[t]:pl(ws(t))}function _t(t){if(typeof t=="string"||or(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Wr(t,e){e=vn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[_t(e[n++])];return n&&n==r?t:void 0}function R(t,e,n){var r=t==null?void 0:Wr(t,e);return r===void 0?n:r}const{getOwnPropertyNames:Th,getOwnPropertySymbols:Nh}=Object,{hasOwnProperty:Ph}=Object.prototype;function li(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function yr(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 vo(t){return Th(t).concat(Nh(t))}const Fh=Object.hasOwn||((t,e)=>Ph.call(t,e)),$h="__v",Dh="__o",Rh="_owner",{getOwnPropertyDescriptor:So,keys:wo}=Object,Wt=Object.is||function(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n};function kh(t,e){return t===e}function Mh(t,e){return t.byteLength===e.byteLength&&Dr(new Uint8Array(t),new Uint8Array(e))}function Uh(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 Lh(t,e){return t.byteLength===e.byteLength&&Dr(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Bh(t,e){return Wt(t.getTime(),e.getTime())}function Vh(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}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.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,y=a.value;if(n.equals(h[0],y[0],l,d,t,e,n)&&n.equals(h[1],y[1],h[0],y[0],t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}function qh(t,e,n){const r=wo(t);let i=r.length;if(wo(e).length!==i)return!1;for(;i-- >0;)if(!yl(t,e,n,r[i]))return!1;return!0}function Nn(t,e,n){const r=vo(t);let i=r.length;if(vo(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!yl(t,e,n,s)||(o=So(t,s),a=So(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function zh(t,e){return Wt(t.valueOf(),e.valueOf())}function Wh(t,e){return t.source===e.source&&t.flags===e.flags}function Oo(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 Dr(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 Hh(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 yl(t,e,n,r){return(r===Rh||r===Dh||r===$h)&&(t.$$typeof||e.$$typeof)?!0:Fh(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const Kh=Object.prototype.toString;function Gh(t){const e=Xh(t),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:u,getUnsupportedCustomComparator:c}=t;return function(h,y,f){if(h===y)return!0;if(h==null||y==null)return!1;const p=typeof h;if(p!==typeof y)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(h,y,f):p==="function"?i(h,y,f):!1;const b=h.constructor;if(b!==y.constructor)return!1;if(b===Object)return a(h,y,f);if(b===Array)return n(h,y,f);if(b===Date)return r(h,y,f);if(b===RegExp)return l(h,y,f);if(b===Map)return s(h,y,f);if(b===Set)return u(h,y,f);if(b===Promise)return!1;if(Array.isArray(h))return n(h,y,f);const v=Kh.call(h),S=e[v];if(S)return S(h,y,f);const E=c&&c(h,y,f,v);return E?E(h,y,f):!1}}function Yh({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:Mh,areArraysEqual:n?Nn:Uh,areDataViewsEqual:Lh,areDatesEqual:Bh,areErrorsEqual:Vh,areFunctionsEqual:kh,areMapsEqual:n?li(jo,Nn):jo,areNumbersEqual:Wt,areObjectsEqual:n?Nn:qh,arePrimitiveWrappersEqual:zh,areRegExpsEqual:Wh,areSetsEqual:n?li(Oo,Nn):Oo,areTypedArraysEqual:n?li(Dr,Nn):Dr,areUrlsEqual:Hh,getUnsupportedCustomComparator:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=yr(r.areArraysEqual),s=yr(r.areMapsEqual),o=yr(r.areObjectsEqual),a=yr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Jh(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Zh({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 Xh({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:y}){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,b)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,b),"[object RegExp]":c,"[object Set]":d,"[object String]":u,"[object URL]":y,"[object Uint8Array]":h,"[object Uint8ClampedArray]":h,"[object Uint16Array]":h,"[object Uint32Array]":h}}ht();ht({strict:!0});ht({circular:!0});ht({circular:!0,strict:!0});ht({createInternalComparator:()=>Wt});ht({strict:!0,createInternalComparator:()=>Wt});ht({circular:!0,createInternalComparator:()=>Wt});ht({circular:!0,createInternalComparator:()=>Wt,strict:!0});function ht(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=Yh(t),o=Gh(s),a=n?n(o):Jh(o);return Zh({circular:e,comparator:o,createState:r,equals:a,strict:i})}const ie=ht({circular:!0,createCustomConfig:()=>({areFunctionsEqual(t,e){return typeof e=="function"}})});var Pn={exports:{}},ci,Eo;function bl(){if(Eo)return ci;Eo=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(g){let x="",w=0,O=0;for(O=0;O<g.length;O++)if(w=g[O].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";x+=g[O];break}for(O+=1;O<g.length;O++){if(w=g[O].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";x+=g[O]}return x}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(g){return g.length=0,!0}function l(g,x,w){if(g.length){const O=s(g);if(O!=="")x.push(O);else return w.error=!0,!1;g.length=0}return!0}function u(g){let x=0;const w={error:!1,address:"",zone:""},O=[],A=[];let C=!1,_=!1,I=l;for(let T=0;T<g.length;T++){const F=g[T];if(!(F==="["||F==="]"))if(F===":"){if(C===!0&&(_=!0),!I(A,O,w))break;if(++x>7){w.error=!0;break}T>0&&g[T-1]===":"&&(C=!0),O.push(":");continue}else if(F==="%"){if(!I(A,O,w))break;I=a}else{A.push(F);continue}}return A.length&&(I===a?w.zone=A.join(""):_?O.push(A.join("")):O.push(s(A))),w.address=O.join(""),w}function c(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const x=u(g);if(x.error)return{host:g,isIPV6:!1};{let w=x.address,O=x.address;return x.zone&&(w+="%"+x.zone,O+="%25"+x.zone),{host:w,isIPV6:!0,escapedHost:O}}}function d(g,x){let w=0;for(let O=0;O<g.length;O++)g[O]===x&&w++;return w}function h(g){let x=g;const w=[];let O=-1,A=0;for(;A=x.length;){if(A===1){if(x===".")break;if(x==="/"){w.push("/");break}else{w.push(x);break}}else if(A===2){if(x[0]==="."){if(x[1]===".")break;if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&(x[1]==="."||x[1]==="/")){w.push("/");break}}else if(A===3&&x==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(x[0]==="."){if(x[1]==="."){if(x[2]==="/"){x=x.slice(3);continue}}else if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&x[1]==="."){if(x[2]==="/"){x=x.slice(2);continue}else if(x[2]==="."&&x[3]==="/"){x=x.slice(3),w.length!==0&&w.pop();continue}}if((O=x.indexOf("/",1))===-1){w.push(x);break}else w.push(x.slice(0,O)),x=x.slice(O)}return w.join("")}const y={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function b(g,x){const w=x?p:f;return w.lastIndex=0,g.replace(w,O=>y[O])}function v(g,x=!1){if(g.indexOf("%")===-1)return g;let w="";for(let O=0;O<g.length;O++){if(g[O]==="%"&&O+2<g.length){const A=g.slice(O+1,O+3);if(n(A)){const C=A.toUpperCase(),_=String.fromCharCode(parseInt(C,16));x&&r(_)?w+=_:w+="%"+C,O+=2;continue}}w+=g[O]}return w}function S(g){let x="";for(let w=0;w<g.length;w++){if(g[w]==="%"&&w+2<g.length){const O=g.slice(w+1,w+3);if(n(O)){const A=O.toUpperCase(),C=String.fromCharCode(parseInt(A,16));C!=="."&&r(C)?x+=C:x+="%"+A,w+=2;continue}}i(g[w])?x+=g[w]:x+=escape(g[w])}return x}function E(g){let x="";for(let w=0;w<g.length;w++){if(g[w]==="%"&&w+2<g.length){const O=g.slice(w+1,w+3);if(n(O)){x+="%"+O.toUpperCase(),w+=2;continue}}x+=escape(g[w])}return x}function j(g){const x=[];if(g.userinfo!==void 0&&(x.push(g.userinfo),x.push("@")),g.host!==void 0){let w=unescape(g.host);if(!e(w)){const O=c(w);O.isIPV6===!0?w=`[${O.escapedHost}]`:w=b(w,!1)}x.push(w)}return(typeof g.port=="number"||typeof g.port=="string")&&(x.push(":"),x.push(String(g.port))),x.length?x.join(""):void 0}return ci={nonSimpleDomain:o,recomposeAuthority:j,reescapeHostDelimiters:b,normalizePercentEncoding:v,normalizePathEncoding:S,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:e,isUUID:t,normalizeIPv6:c,stringArrayToHexStripped:s},ci}var ui,Ao;function Qh(){if(Ao)return ui;Ao=1;const{isUUID:t}=bl(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(g){return n.indexOf(g)!==-1}function i(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function s(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function o(g){const x=String(g.scheme).toLowerCase()==="https";return(g.port===(x?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function a(g){return g.secure=i(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function l(g){if((g.port===(i(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[x,w]=g.resourceName.split("?");g.path=x&&x!=="/"?x:void 0,g.query=w,g.resourceName=void 0}return g.fragment=void 0,g}function u(g,x){if(!g.path)return g.error="URN can not be parsed",g;const w=g.path.match(e);if(w){const O=x.scheme||g.scheme||"urn";g.nid=w[1].toLowerCase(),g.nss=w[2];const A=`${O}:${x.nid||g.nid}`,C=j(A);g.path=void 0,C&&(g=C.parse(g,x))}else g.error=g.error||"URN can not be parsed.";return g}function c(g,x){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const w=x.scheme||g.scheme||"urn",O=g.nid.toLowerCase(),A=`${w}:${x.nid||O}`,C=j(A);C&&(g=C.serialize(g,x));const _=g,I=g.nss;return _.path=`${O||x.nid}:${I}`,x.skipEscape=!0,_}function d(g,x){const w=g;return w.uuid=w.nss,w.nss=void 0,!x.tolerant&&(!w.uuid||!t(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function h(g){const x=g;return x.nss=(g.uuid||"").toLowerCase(),x}const y={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:y.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},b={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},E={http:y,https:f,ws:p,wss:b,urn:{scheme:"urn",parse:u,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(E,null);function j(g){return g&&(E[g]||E[g.toLowerCase()])||void 0}return ui={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:j},ui}var Co;function ep(){if(Co)return Pn.exports;Co=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=bl(),{SCHEMES:u,getSchemeHandler:c}=Qh();function d(O,A){return typeof O=="string"?O=j(O,A):typeof O=="object"&&(O=E(p(O,A),A)),O}function h(O,A,C){const _=C?Object.assign({scheme:"null"},C):{scheme:"null"},I=y(E(O,_),E(A,_),_,!0);return _.skipEscape=!0,p(I,_)}function y(O,A,C,_){const I={};return _||(O=E(p(O,C),C),A=E(p(A,C),C)),C=C||{},!C.tolerant&&A.scheme?(I.scheme=A.scheme,I.userinfo=A.userinfo,I.host=A.host,I.port=A.port,I.path=e(A.path||""),I.query=A.query):(A.userinfo!==void 0||A.host!==void 0||A.port!==void 0?(I.userinfo=A.userinfo,I.host=A.host,I.port=A.port,I.path=e(A.path||""),I.query=A.query):(A.path?(A.path[0]==="/"?I.path=e(A.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?I.path="/"+A.path:O.path?I.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+A.path:I.path=A.path,I.path=e(I.path)),I.query=A.query):(I.path=O.path,A.query!==void 0?I.query=A.query:I.query=O.query),I.userinfo=O.userinfo,I.host=O.host,I.port=O.port),I.scheme=O.scheme),I.fragment=A.fragment,I}function f(O,A,C){const _=x(O,C),I=x(A,C);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(O,A){const C={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({},A),I=[],T=c(_.scheme||C.scheme);T&&T.serialize&&T.serialize(C,_),C.path!==void 0&&(_.skipEscape?C.path=r(C.path):(C.path=s(C.path),C.scheme!==void 0&&(C.path=C.path.split("%3A").join(":")))),_.reference!=="suffix"&&C.scheme&&I.push(C.scheme,":");const F=n(C);if(F!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(F),C.path&&C.path[0]!=="/"&&I.push("/")),C.path!==void 0){let P=C.path;!_.absolutePath&&(!T||!T.absolutePath)&&(P=e(P)),F===void 0&&P[0]==="/"&&P[1]==="/"&&(P="/%2F"+P.slice(2)),I.push(P)}return C.query!==void 0&&I.push("?",C.query),C.fragment!==void 0&&I.push("#",C.fragment),I.join("")}const b=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function v(O,A){if(A[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,A){const C=Object.assign({},A),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;C.reference==="suffix"&&(C.scheme?O=C.scheme+":"+O:O="//"+O);const F=O.match(b);if(F){_.scheme=F[1],_.userinfo=F[3],_.host=F[4],_.port=parseInt(F[5],10),_.path=F[6]||"",_.query=F[7],_.fragment=F[8],isNaN(_.port)&&(_.port=F[5]);const P=v(_,F);if(P!==void 0&&(_.error=_.error||P,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",C.reference&&C.reference!=="suffix"&&C.reference!==_.reference&&(_.error=_.error||"URI is not a "+C.reference+" reference.");const $=c(C.scheme||_.scheme);if(!C.unicodeSupport&&(!$||!$.unicodeSupport)&&_.host&&(C.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(_,C)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function E(O,A){return S(O,A).parsed}function j(O,A){return g(O,A).normalized}function g(O,A){const{parsed:C,malformedAuthorityOrPort:_}=S(O,A);return{normalized:_?O:p(C,A),malformedAuthorityOrPort:_}}function x(O,A){if(typeof O=="string"){const{normalized:C,malformedAuthorityOrPort:_}=g(O,A);return _?void 0:C}if(typeof O=="object")return p(O,A)}const w={SCHEMES:u,normalize:d,resolve:h,resolveComponent:y,equal:f,serialize:p,parse:E};return Pn.exports=w,Pn.exports.default=w,Pn.exports.fastUri=w,Pn.exports}var tp=ep();const js=ds(tp);var Fn={},_o;function np(){if(_o)return Fn;_o=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,y,f=1,p=c.length;f<p;){if(c[f]==="constructor"||c[f]==="prototype"||c[f]==="__proto__")return u;if(h=r(c[f++]),y=p>f,typeof u[h]>"u"&&(Array.isArray(u)&&h==="-"&&(h=u.length),y&&(c[f]!==""&&c[f]<1/0||c[f]==="-"?u[h]=[]:u[h]={})),!y)break;u=u[h]}var b=u[h];return d===void 0?delete u[h]:u[h]=d,b}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 Fn.get=o,Fn.set=a,Fn.compile=l,Fn}var rp=np();const di=ds(rp);var ip=Object.prototype;function Hr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ip;return t===n}var sp=ml(Object.keys,Object),op=Object.prototype,ap=op.hasOwnProperty;function xl(t){if(!Hr(t))return sp(t);var e=[];for(var n in Object(t))ap.call(t,n)&&n!="constructor"&&e.push(n);return e}var Hi=zt(nt,"DataView"),Ki=zt(nt,"Promise"),ln=zt(nt,"Set"),Gi=zt(nt,"WeakMap"),Io="[object Map]",lp="[object Object]",To="[object Promise]",No="[object Set]",Po="[object WeakMap]",Fo="[object DataView]",cp=qt(Hi),up=qt(Qn),dp=qt(Ki),fp=qt(ln),mp=qt(Gi),Re=dt;(Hi&&Re(new Hi(new ArrayBuffer(1)))!=Fo||Qn&&Re(new Qn)!=Io||Ki&&Re(Ki.resolve())!=To||ln&&Re(new ln)!=No||Gi&&Re(new Gi)!=Po)&&(Re=function(t){var e=dt(t),n=e==lp?t.constructor:void 0,r=n?qt(n):"";if(r)switch(r){case cp:return Fo;case up:return Io;case dp:return To;case fp:return No;case mp:return Po}return e});var hp="[object Arguments]";function $o(t){return Ue(t)&&dt(t)==hp}var vl=Object.prototype,pp=vl.hasOwnProperty,gp=vl.propertyIsEnumerable,un=$o((function(){return arguments})())?$o:function(t){return Ue(t)&&pp.call(t,"callee")&&!gp.call(t,"callee")},yp=9007199254740991;function Os(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=yp}function Ht(t){return t!=null&&Os(t.length)&&!ar(t)}function bp(){return!1}var Sl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Do=Sl&&typeof module=="object"&&module&&!module.nodeType&&module,xp=Do&&Do.exports===Sl,Ro=xp?nt.Buffer:void 0,vp=Ro?Ro.isBuffer:void 0,Ut=vp||bp,Sp="[object Arguments]",wp="[object Array]",jp="[object Boolean]",Op="[object Date]",Ep="[object Error]",Ap="[object Function]",Cp="[object Map]",_p="[object Number]",Ip="[object Object]",Tp="[object RegExp]",Np="[object Set]",Pp="[object String]",Fp="[object WeakMap]",$p="[object ArrayBuffer]",Dp="[object DataView]",Rp="[object Float32Array]",kp="[object Float64Array]",Mp="[object Int8Array]",Up="[object Int16Array]",Lp="[object Int32Array]",Bp="[object Uint8Array]",Vp="[object Uint8ClampedArray]",qp="[object Uint16Array]",zp="[object Uint32Array]",pe={};pe[Rp]=pe[kp]=pe[Mp]=pe[Up]=pe[Lp]=pe[Bp]=pe[Vp]=pe[qp]=pe[zp]=!0;pe[Sp]=pe[wp]=pe[$p]=pe[jp]=pe[Dp]=pe[Op]=pe[Ep]=pe[Ap]=pe[Cp]=pe[_p]=pe[Ip]=pe[Tp]=pe[Np]=pe[Pp]=pe[Fp]=!1;function Wp(t){return Ue(t)&&Os(t.length)&&!!pe[dt(t)]}function Es(t){return function(e){return t(e)}}var wl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zn=wl&&typeof module=="object"&&module&&!module.nodeType&&module,Hp=zn&&zn.exports===wl,fi=Hp&&dl.process,dn=(function(){try{var t=zn&&zn.require&&zn.require("util").types;return t||fi&&fi.binding&&fi.binding("util")}catch{}})(),ko=dn&&dn.isTypedArray,cr=ko?Es(ko):Wp,Kp="[object Map]",Gp="[object Set]",Yp=Object.prototype,Jp=Yp.hasOwnProperty;function ye(t){if(t==null)return!0;if(Ht(t)&&(je(t)||typeof t=="string"||typeof t.splice=="function"||Ut(t)||cr(t)||un(t)))return!t.length;var e=Re(t);if(e==Kp||e==Gp)return!t.size;if(Hr(t))return!xl(t).length;for(var n in t)if(Jp.call(t,n))return!1;return!0}function Zp(){this.__data__=new ft,this.size=0}function Xp(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Qp(t){return this.__data__.get(t)}function eg(t){return this.__data__.has(t)}var tg=200;function ng(t,e){var n=this.__data__;if(n instanceof ft){var r=n.__data__;if(!Qn||r.length<tg-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new mt(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new ft(t);this.size=e.size}We.prototype.clear=Zp;We.prototype.delete=Xp;We.prototype.get=Qp;We.prototype.has=eg;We.prototype.set=ng;function As(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Rr=(function(){try{var t=zt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function Cs(t,e,n){e=="__proto__"&&Rr?Rr(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var rg=Object.prototype,ig=rg.hasOwnProperty;function _s(t,e,n){var r=t[e];(!(ig.call(t,e)&&lr(r,n))||n===void 0&&!(e in t))&&Cs(t,e,n)}function Sn(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?Cs(n,a,l):_s(n,a,l)}return n}function jl(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var sg=9007199254740991,og=/^(?:0|[1-9]\d*)$/;function Kr(t,e){var n=typeof t;return e=e??sg,!!e&&(n=="number"||n!="symbol"&&og.test(t))&&t>-1&&t%1==0&&t<e}var ag=Object.prototype,lg=ag.hasOwnProperty;function Ol(t,e){var n=je(t),r=!n&&un(t),i=!n&&!r&&Ut(t),s=!n&&!r&&!i&&cr(t),o=n||r||i||s,a=o?jl(t.length,String):[],l=a.length;for(var u in t)(e||lg.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Kr(u,l)))&&a.push(u);return a}function ze(t){return Ht(t)?Ol(t):xl(t)}function cg(t,e){return t&&Sn(e,ze(e),t)}function ug(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var dg=Object.prototype,fg=dg.hasOwnProperty;function mg(t){if(!ne(t))return ug(t);var e=Hr(t),n=[];for(var r in t)r=="constructor"&&(e||!fg.call(t,r))||n.push(r);return n}function ur(t){return Ht(t)?Ol(t,!0):mg(t)}function hg(t,e){return t&&Sn(e,ur(e),t)}var El=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mo=El&&typeof module=="object"&&module&&!module.nodeType&&module,pg=Mo&&Mo.exports===El,Uo=pg?nt.Buffer:void 0,Lo=Uo?Uo.allocUnsafe:void 0;function Al(t,e){if(e)return t.slice();var n=t.length,r=Lo?Lo(n):new t.constructor(n);return t.copy(r),r}function Is(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function gg(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 Cl(){return[]}var yg=Object.prototype,bg=yg.propertyIsEnumerable,Bo=Object.getOwnPropertySymbols,Ts=Bo?function(t){return t==null?[]:(t=Object(t),gg(Bo(t),function(e){return bg.call(t,e)}))}:Cl;function xg(t,e){return Sn(t,Ts(t),e)}function Ns(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var vg=Object.getOwnPropertySymbols,_l=vg?function(t){for(var e=[];t;)Ns(e,Ts(t)),t=Vr(t);return e}:Cl;function Sg(t,e){return Sn(t,_l(t),e)}function Il(t,e,n){var r=e(t);return je(t)?r:Ns(r,n(t))}function Yi(t){return Il(t,ze,Ts)}function Ps(t){return Il(t,ur,_l)}var wg=Object.prototype,jg=wg.hasOwnProperty;function Og(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&jg.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var kr=nt.Uint8Array;function Fs(t){var e=new t.constructor(t.byteLength);return new kr(e).set(new kr(t)),e}function Eg(t,e){var n=e?Fs(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Ag=/\w*$/;function Cg(t){var e=new t.constructor(t.source,Ag.exec(t));return e.lastIndex=t.lastIndex,e}var Vo=Me?Me.prototype:void 0,qo=Vo?Vo.valueOf:void 0;function _g(t){return qo?Object(qo.call(t)):{}}function Tl(t,e){var n=e?Fs(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Ig="[object Boolean]",Tg="[object Date]",Ng="[object Map]",Pg="[object Number]",Fg="[object RegExp]",$g="[object Set]",Dg="[object String]",Rg="[object Symbol]",kg="[object ArrayBuffer]",Mg="[object DataView]",Ug="[object Float32Array]",Lg="[object Float64Array]",Bg="[object Int8Array]",Vg="[object Int16Array]",qg="[object Int32Array]",zg="[object Uint8Array]",Wg="[object Uint8ClampedArray]",Hg="[object Uint16Array]",Kg="[object Uint32Array]";function Gg(t,e,n){var r=t.constructor;switch(e){case kg:return Fs(t);case Ig:case Tg:return new r(+t);case Mg:return Eg(t,n);case Ug:case Lg:case Bg:case Vg:case qg:case zg:case Wg:case Hg:case Kg:return Tl(t,n);case Ng:return new r;case Pg:case Dg:return new r(t);case Fg:return Cg(t);case $g:return new r;case Rg:return _g(t)}}var zo=Object.create,Nl=(function(){function t(){}return function(e){if(!ne(e))return{};if(zo)return zo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Pl(t){return typeof t.constructor=="function"&&!Hr(t)?Nl(Vr(t)):{}}var Yg="[object Map]";function Jg(t){return Ue(t)&&Re(t)==Yg}var Wo=dn&&dn.isMap,Zg=Wo?Es(Wo):Jg,Xg="[object Set]";function Qg(t){return Ue(t)&&Re(t)==Xg}var Ho=dn&&dn.isSet,ey=Ho?Es(Ho):Qg,ty=1,ny=2,ry=4,Fl="[object Arguments]",iy="[object Array]",sy="[object Boolean]",oy="[object Date]",ay="[object Error]",$l="[object Function]",ly="[object GeneratorFunction]",cy="[object Map]",uy="[object Number]",Dl="[object Object]",dy="[object RegExp]",fy="[object Set]",my="[object String]",hy="[object Symbol]",py="[object WeakMap]",gy="[object ArrayBuffer]",yy="[object DataView]",by="[object Float32Array]",xy="[object Float64Array]",vy="[object Int8Array]",Sy="[object Int16Array]",wy="[object Int32Array]",jy="[object Uint8Array]",Oy="[object Uint8ClampedArray]",Ey="[object Uint16Array]",Ay="[object Uint32Array]",he={};he[Fl]=he[iy]=he[gy]=he[yy]=he[sy]=he[oy]=he[by]=he[xy]=he[vy]=he[Sy]=he[wy]=he[cy]=he[uy]=he[Dl]=he[dy]=he[fy]=he[my]=he[hy]=he[jy]=he[Oy]=he[Ey]=he[Ay]=!0;he[ay]=he[$l]=he[py]=!1;function Wn(t,e,n,r,i,s){var o,a=e&ty,l=e&ny,u=e&ry;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!ne(t))return t;var c=je(t);if(c){if(o=Og(t),!a)return Is(t,o)}else{var d=Re(t),h=d==$l||d==ly;if(Ut(t))return Al(t,a);if(d==Dl||d==Fl||h&&!i){if(o=l||h?{}:Pl(t),!a)return l?Sg(t,hg(o,t)):xg(t,cg(o,t))}else{if(!he[d])return i?t:{};o=Gg(t,d,a)}}s||(s=new We);var y=s.get(t);if(y)return y;s.set(t,o),ey(t)?t.forEach(function(b){o.add(Wn(b,e,n,b,t,s))}):Zg(t)&&t.forEach(function(b,v){o.set(v,Wn(b,e,n,v,t,s))});var f=u?l?Ps:Yi:l?ur:ze,p=c?void 0:f(t);return As(p||t,function(b,v){p&&(v=b,b=t[v]),_s(o,v,Wn(b,e,n,v,t,s))}),o}function Rl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Cy(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 _y(t,e){return e.length<2?t:Wr(t,Cy(e,0,-1))}var Iy=Object.prototype,Ty=Iy.hasOwnProperty;function kl(t,e){e=vn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=_t(e[n]);if(i==="__proto__"&&!Ty.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=_y(t,e);return s==null||delete s[_t(Rl(e))]}function Ny(t){return Ct(t)?void 0:t}var Ko=Me?Me.isConcatSpreadable:void 0;function Py(t){return je(t)||un(t)||!!(Ko&&t&&t[Ko])}function dr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=Py),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?dr(a,e-1,n,r,i):Ns(i,a):r||(i[i.length]=a)}return i}function Ji(t){var e=t==null?0:t.length;return e?dr(t,1):[]}function Fy(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 Go=Math.max;function Ml(t,e,n){return e=Go(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Go(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),Fy(t,this,a)}}function $y(t){return function(){return t}}function Gr(t){return t}var Dy=Rr?function(t,e){return Rr(t,"toString",{configurable:!0,enumerable:!1,value:$y(e),writable:!0})}:Gr,Ry=800,ky=16,My=Date.now;function Uy(t){var e=0,n=0;return function(){var r=My(),i=ky-(r-n);if(n=r,i>0){if(++e>=Ry)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Ul=Uy(Dy);function Ll(t){return Ul(Ml(t,void 0,Ji),t+"")}var Ly=1,By=2,Vy=4,fn=Ll(function(t,e){var n={};if(t==null)return n;var r=!1;e=xn(e,function(s){return s=vn(s,t),r||(r=s.length>1),s}),Sn(t,Ps(t),n),r&&(n=Wn(n,Ly|By|Vy,Ny));for(var i=e.length;i--;)kl(n,e[i]);return n});function Mr(t,e){if(fe in t&&js.equal(t[fe],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(ne(r)){const i=Mr(r,e);if(i!==void 0)return i}}else if(ne(n)){const r=Mr(n,e);if(r!==void 0)return r}}function Zi(t,e){const n=R(t,fe,e);let r=t;de in r&&(r={...r,[de]:js.resolve(n,r[de])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>ne(o)?Zi(o,n):o)}:ne(s)&&(r={...r,[i]:Zi(s,n)});return r}function $s(t,e){const n=e[t];return[fn(e,[t]),n]}function Bl(t,e={},n=[],r=R(e,[fe])){const i=t||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||fe in e&&e[fe]===o?s=di.get(e,l):e[kn]===Ar&&(s=Mr(e,o.replace(/\/$/,"")),s!==void 0&&(s=di.get(s,l)))}else if(e[kn]===Ar){const l=o?js.resolve(o,i):i,[u,...c]=l.replace(/#\/?$/,"").split("#");s=Mr(e,u.replace(/\/$/,"")),s!==void 0&&(o=s[fe],ye(c)||(s=di.get(s,decodeURIComponent(c.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const a=s[de];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...h]=n,y=[...h,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${y}`)}const[l,u]=$s(de,s),c=Bl(u,e,[...n,i],o);return Object.keys(l).length>0?e[kn]===Sm||e[kn]===Ar?{[At]:[l,c]}:{...l,...c}:c}return s}function er(t,e={},n=R(e,[fe])){return Bl(t,e,[],n)}var qy=Object.prototype,zy=qy.hasOwnProperty;function Wy(t,e){return t!=null&&zy.call(t,e)}function Vl(t,e,n){e=vn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=_t(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&&Os(i)&&Kr(o,i)&&(je(t)||un(t)))}function Q(t,e){return t!=null&&Vl(t,e,Wy)}var Hy="[object String]";function It(t){return typeof t=="string"||!je(t)&&Ue(t)&&dt(t)==Hy}function He(t){let e;const n=R(t,ym);return It(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}var Ky=1/0;function Gy(t){var e=t==null?0:t.length;return e?dr(t,Ky):[]}function Xi(t,e,n){(n!==void 0&&!lr(t[e],n)||n===void 0&&!(e in t))&&Cs(t,e,n)}function Yy(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 ql=Yy();function tr(t){return Ue(t)&&Ht(t)}function Qi(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Jy(t){return Sn(t,ur(t))}function Zy(t,e,n,r,i,s,o){var a=Qi(t,n),l=Qi(e,n),u=o.get(l);if(u){Xi(t,n,u);return}var c=s?s(a,l,n+"",t,e,o):void 0,d=c===void 0;if(d){var h=je(l),y=!h&&Ut(l),f=!h&&!y&&cr(l);c=l,h||y||f?je(a)?c=a:tr(a)?c=Is(a):y?(d=!1,c=Al(l,!0)):f?(d=!1,c=Tl(l,!0)):c=[]:Ct(l)||un(l)?(c=a,un(a)?c=Jy(a):(!ne(a)||ar(a))&&(c=Pl(l))):d=!1}d&&(o.set(l,c),i(c,l,r,s,o),o.delete(l)),Xi(t,n,c)}function zl(t,e,n,r,i){t!==e&&ql(e,function(s,o){if(i||(i=new We),ne(s))Zy(t,e,o,n,zl,r,i);else{var a=r?r(Qi(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Xi(t,o,a)}},ur)}function Yr(t,e){return Ul(Ml(t,e,Gr),t+"")}function Xy(t,e,n){if(!ne(n))return!1;var r=typeof e;return(r=="number"?Ht(n)&&Kr(e,n.length):r=="string"&&e in n)?lr(n[e],t):!1}function Qy(t){return Yr(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&&Xy(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 eb=Qy(function(t,e,n){zl(t,e,n)});function Ds(t,e,n,r){if(!ne(t))return t;e=vn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=_t(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:Kr(e[i+1])?[]:{})}_s(a,l,u),a=a[l]}return t}function ue(t,e,n){return t==null?t:Ds(t,e,n)}function Wl(t){return typeof t=="function"?t:Gr}var tb=/\s/;function nb(t){for(var e=t.length;e--&&tb.test(t.charAt(e)););return e}var rb=/^\s+/;function ib(t){return t&&t.slice(0,nb(t)+1).replace(rb,"")}var Yo=NaN,sb=/^[-+]0x[0-9a-f]+$/i,ob=/^0b[01]+$/i,ab=/^0o[0-7]+$/i,lb=parseInt;function cb(t){if(typeof t=="number")return t;if(or(t))return Yo;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=ib(t);var n=ob.test(t);return n||ab.test(t)?lb(t.slice(2),n?2:8):sb.test(t)?Yo:+t}var Jo=1/0,ub=17976931348623157e292;function db(t){if(!t)return t===0?t:0;if(t=cb(t),t===Jo||t===-Jo){var e=t<0?-1:1;return e*ub}return t===t?t:0}function Hl(t){var e=db(t),n=e%1;return e===e?n?e-n:e:0}var fb=9007199254740991,mi=4294967295,mb=Math.min;function Kl(t,e){if(t=Hl(t),t<1||t>fb)return[];var n=mi,r=mb(t,mi);e=Wl(e),t-=mi;for(var i=jl(r,e);++n<t;)e(n);return i}function Gl(t,e){return t&&ql(t,e,ze)}var hb="__lodash_hash_undefined__";function pb(t){return this.__data__.set(t,hb),this}function gb(t){return this.__data__.has(t)}function Lt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new mt;++e<n;)this.add(t[e])}Lt.prototype.add=Lt.prototype.push=pb;Lt.prototype.has=gb;function yb(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 nr(t,e){return t.has(e)}var bb=1,xb=2;function Yl(t,e,n,r,i,s){var o=n&bb,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,y=n&xb?new Lt:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var f=t[d],p=e[d];if(r)var b=o?r(p,f,d,e,t,s):r(f,p,d,t,e,s);if(b!==void 0){if(b)continue;h=!1;break}if(y){if(!yb(e,function(v,S){if(!nr(y,S)&&(f===v||i(f,v,n,r,s)))return y.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 vb(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Rs(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Sb=1,wb=2,jb="[object Boolean]",Ob="[object Date]",Eb="[object Error]",Ab="[object Map]",Cb="[object Number]",_b="[object RegExp]",Ib="[object Set]",Tb="[object String]",Nb="[object Symbol]",Pb="[object ArrayBuffer]",Fb="[object DataView]",Zo=Me?Me.prototype:void 0,hi=Zo?Zo.valueOf:void 0;function $b(t,e,n,r,i,s,o){switch(n){case Fb:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Pb:return!(t.byteLength!=e.byteLength||!s(new kr(t),new kr(e)));case jb:case Ob:case Cb:return lr(+t,+e);case Eb:return t.name==e.name&&t.message==e.message;case _b:case Tb:return t==e+"";case Ab:var a=vb;case Ib:var l=r&Sb;if(a||(a=Rs),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=wb,o.set(t,e);var c=Yl(a(t),a(e),r,i,s,o);return o.delete(t),c;case Nb:if(hi)return hi.call(t)==hi.call(e)}return!1}var Db=1,Rb=Object.prototype,kb=Rb.hasOwnProperty;function Mb(t,e,n,r,i,s){var o=n&Db,a=Yi(t),l=a.length,u=Yi(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:kb.call(e,h)))return!1}var y=s.get(t),f=s.get(e);if(y&&f)return y==e&&f==t;var p=!0;s.set(t,e),s.set(e,t);for(var b=o;++d<l;){h=a[d];var v=t[h],S=e[h];if(r)var E=o?r(S,v,h,e,t,s):r(v,S,h,t,e,s);if(!(E===void 0?v===S||i(v,S,n,r,s):E)){p=!1;break}b||(b=h=="constructor")}if(p&&!b){var j=t.constructor,g=e.constructor;j!=g&&"constructor"in t&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof g=="function"&&g instanceof g)&&(p=!1)}return s.delete(t),s.delete(e),p}var Ub=1,Xo="[object Arguments]",Qo="[object Array]",br="[object Object]",Lb=Object.prototype,ea=Lb.hasOwnProperty;function Bb(t,e,n,r,i,s){var o=je(t),a=je(e),l=o?Qo:Re(t),u=a?Qo:Re(e);l=l==Xo?br:l,u=u==Xo?br:u;var c=l==br,d=u==br,h=l==u;if(h&&Ut(t)){if(!Ut(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new We),o||cr(t)?Yl(t,e,n,r,i,s):$b(t,e,l,n,r,i,s);if(!(n&Ub)){var y=c&&ea.call(t,"__wrapped__"),f=d&&ea.call(e,"__wrapped__");if(y||f){var p=y?t.value():t,b=f?e.value():e;return s||(s=new We),i(p,b,n,r,s)}}return h?(s||(s=new We),Mb(t,e,n,r,i,s)):!1}function Jr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ue(t)&&!Ue(e)?t!==t&&e!==e:Bb(t,e,n,r,Jr,i)}var Vb=1,qb=2;function zb(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?Jr(u,l,Vb|qb,r,c):d))return!1}}return!0}function Jl(t){return t===t&&!ne(t)}function Wb(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Jl(i)]}return e}function Zl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Hb(t){var e=Wb(t);return e.length==1&&e[0][2]?Zl(e[0][0],e[0][1]):function(n){return n===t||zb(n,t,e)}}function Kb(t,e){return t!=null&&e in Object(t)}function Xl(t,e){return t!=null&&Vl(t,e,Kb)}var Gb=1,Yb=2;function Jb(t,e){return vs(t)&&Jl(e)?Zl(_t(t),e):function(n){var r=R(n,t);return r===void 0&&r===e?Xl(n,t):Jr(e,r,Gb|Yb)}}function Zb(t){return function(e){return e?.[t]}}function Xb(t){return function(e){return Wr(e,t)}}function Qb(t){return vs(t)?Zb(_t(t)):Xb(t)}function ks(t){return typeof t=="function"?t:t==null?Gr:typeof t=="object"?je(t)?Jb(t[0],t[1]):Hb(t):Qb(t)}function e0(t,e,n){var r=je(t),i=r||Ut(t)||cr(t);if(e=ks(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:ne(t)?n=ar(s)?Nl(Vr(t)):{}:n={}}return(i?As:Gl)(t,function(o,a,l){return e(n,o,a,l)}),n}function t0(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 n0(t){return t!==t}function r0(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Ql(t,e,n){return e===e?r0(t,e,n):t0(t,n0,n)}function Ms(t,e){var n=t==null?0:t.length;return!!n&&Ql(t,e,0)>-1}function Cr(){}var i0=1/0,s0=ln&&1/Rs(new ln([,-0]))[1]==i0?function(t){return new ln(t)}:Cr,o0=200;function ec(t,e,n){var r=-1,i=Ms,s=t.length,o=!0,a=[],l=a;if(s>=o0){var u=s0(t);if(u)return Rs(u);o=!1,i=nr,l=new Lt}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 tc(t){return t&&t.length?ec(t):[]}function rr(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 a0=Yr(function(t){return ec(dr(t,1,tr,!0))});function Le(t){let{type:e}=t;return!e&&t.const?rr(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 ct(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&&z(o)?r[i]=ct(s,o):t&&e&&(Le(t)==="object"||Le(e)==="object")&&i===ol&&Array.isArray(s)&&Array.isArray(o)?r[i]=a0(s,o):r[i]=o,r},n)}var l0="[object Number]";function nc(t){return typeof t=="number"||Ue(t)&&dt(t)==l0}function rc(t,e,n){var r;if(t&&n){const i=R(t,n);if(i===void 0)return;for(let s=0;s<e.length;s+=1){const o=e[s],a=R(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 Ur(t,e,n,r,i){if(e===void 0)return 0;const s=rc(e,n,i);if(nc(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&Q(a,[se,i])){const l=R(e,i),u=R(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 c0=Object.prototype;function Mn(t){for(const e in t)if(c0.hasOwnProperty.call(t,e))return!1;return!0}const u0=["array","boolean","integer","null","number","object","string"];new Set(u0);const d0=["$defs","definitions","properties","patternProperties","dependencies"];new Set(d0);const f0=["items","allOf","oneOf","anyOf"];new Set(f0);const m0=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(m0);function _r(t){return typeof t=="object"}function Ye(t){return _r(t)?Mn(t):t===!0}function sn(t,e){return t<e?-1:t>e?1:0}function pi(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 h0(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 ta(t){return t.length===0}function gi(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 ic(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 p0(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 g0(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const na=g0,sc=()=>0,y0=t=>t===void 0,b0=t=>typeof t!="object",ra={boolean:0,number:1,string:2};function x0(t,e){const n=typeof t,r=typeof e;return n===r?sn(t,e):ra[n]-ra[r]}function v0(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 Zr(t,e,n=sc){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function en(t){return Zr(y0,t)}function yt(t,e){return Zr(n=>n===void 0||t(n),e)}function yi(t,e){return Zr(Array.isArray,t,e)}const xe=en(sn),bi=yt(t=>t===0,(t,e)=>t-e);function S0({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=na(e,p=>Object.keys(p).sort());function r(p){return(b,v)=>{const S=n(b),E=n(v),j=Math.min(S.length,E.length);for(let g=0;g<j;g++){const x=sn(S[g],E[g]);if(x!==0)return x}if(S.length!==E.length)return S.length-E.length;for(let g=0;g<j;g++){const x=S[g],w=p(b[x],v[x]);if(w!==0)return w}return 0}}function i(p){const b=gi(p),v=na(t,ic(p,{threshold:0}));return(S,E)=>b(v(S),v(E))}const s=i(sn);function o(p,b){if(_r(p)){if(_r(b)){const v=Object.keys(p),S=Object.keys(b),E=v0(v,S),j=E.length;for(let g=0;g<j;g++){const x=E[g];if(p[x]===b[x])continue;const O=(f[x]??a)(p[x],b[x]);if(O!==0)return O}return 0}return b===!0&&Mn(p)?0:1}return _r(b)?p===!0&&Mn(b)?0:-1:sn(p,b)}const a=en(u),l=Zr(b0,yi(r(a),gi(u)),x0);function u(p,b){return p===null?-1:b===null?1:l(p,b)}const c=en(o),d=yt(Mn,r(c)),h=en(i(o)),y=yt(Ye,o),f={$id:xe,$comment:xe,$defs:d,$ref:xe,$schema:xe,const:a,contains:c,contentEncoding:xe,contentMediaType:xe,default:a,definitions:d,description:xe,else:c,examples:a,exclusiveMaximum:xe,exclusiveMinimum:xe,format:xe,if:c,maximum:xe,maxItems:xe,maxLength:xe,maxProperties:xe,minimum:xe,multipleOf:xe,not:c,pattern:xe,propertyNames:c,readOnly:xe,then:c,title:xe,writeOnly:xe,uniqueItems:yt(p=>p===!1,sc),minLength:bi,minItems:bi,minProperties:bi,required:yt(ta,s),enum:yt(ta,i(u)),type:en((p,b)=>{const v=Array.isArray(p),S=Array.isArray(b);return!v&&!S?sn(p,b):s(v?p:[p],S?b:[b])}),items:yt(p=>!Array.isArray(p)&&Ye(p),yi(o,gi(o))),anyOf:h,allOf:h,oneOf:h,properties:d,patternProperties:d,additionalProperties:y,additionalItems:y,dependencies:yt(Mn,r(en(yi(o,s))))};return{compareSchemaValues:u,compareSchemaDefinitions:o}}function ia(t){return t}const oc=(t,e)=>t?oc(e%t,t):e,w0=(t,e)=>Math.abs(t*e)/oc(t,e);function j0(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function xi(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 vi(t,e){return t||e}function sa(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 O0(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function Pt(t,e,n){n===void 0||Ye(n)?delete t[e]:t[e]=n}const E0=["properties","patternProperties","additionalProperties"];function oa(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 aa=[[],[]];function la(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 A0=["items","additionalItems"],C0=["if","then","else"];function ca(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 Si(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 Ft(t,e,n){return[t,e,n]}function _0(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 I0=[Ft("minimum","maximum",t=>t.maximum>=t.minimum),Ft("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Ft("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Ft("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Ft("minLength","maxLength",t=>t.maxLength>=t.minLength),Ft("minItems","maxItems",t=>t.maxItems>=t.minItems),Ft("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function T0({mergePatterns:t=j0,isSubRegExp:e=Object.is,intersectJson:n=h0,deduplicateJsonSchemaDef:r=ia,defaultMerger:i=ia,assigners:s=[],checks:o=I0,mergers:a}={}){function l(j){const g=j.length;let x=j[0];for(let w=1;w<g;w++){const O=v(x,j[w]);if(O===!1)return!1;Ye(O)||(x=O)}return x}function u(j,g,x,w,O,A,C){if(j.length=0,x===!1)return!1;if(j.push(x),O!==void 0){if(O===!1)return!1;j.push(O)}if(la(j,g,A))return!1;const I=j.length<2;if(C===!1){if(I)return;if(la(j,g,w))return!1}else I&&C!==void 0&&j.push(C);return j.length===1?j[0]:l(j)}function c(j,g,x,w,O,A){const C=x.length;if(C>0&&O!==!1)if(A)Object.assign(j,g);else for(let _=0;_<C;_++){const I=x[_];w.has(I)||(j[I]=v(g[I],O))}return j}const d=(j,{properties:g={},patternProperties:x,additionalProperties:w=!0},{properties:O={},patternProperties:A,additionalProperties:C=!0})=>{const _=Ye(w),I=Ye(C);if(_&&I)return Pt(j,"properties",S(g,O)),Pt(j,"patternProperties",x&&A?S(x,A):x??A),delete j.additionalProperties,j;const T=v(w,C);Pt(j,"additionalProperties",T);const F={},P=Object.keys(g),$=P.length,[k,M]=x?oa(x):aa,[U,Z]=A?oa(A):aa,le=[],me=new Set,be=I?void 0:C;for(let W=0;W<$;W++){const re=P[W];me.add(re);const oe=u(le,re,g[re],k,O[re],U,be);oe!==void 0&&(F[re]=oe)}const L=Object.keys(O),ce=L.length,te=_?void 0:w;for(let W=0;W<ce;W++){const re=L[W];if(me.has(re))continue;const oe=u(le,re,O[re],U,void 0,k,te);oe!==void 0&&(F[re]=oe)}Pt(j,"properties",F);let K={};const G=new Set;return M.length>0&&Z.length>0&&xi(M,Z,(W,re)=>{e(W,re)&&G.add(W),e(re,W)&&G.add(re),K[t(W,re)]=v(x[W],A[re])}),K=c(K,x,M,G,C,I),K=c(K,A,Z,G,w,_),Pt(j,"patternProperties",K),j},h=(j,{items:g=[],additionalItems:x},{items:w=[],additionalItems:O})=>{const A=Array.isArray(g),C=Array.isArray(w),_=[];if(j.items=_,A&&C){const[I,T,F]=g.length<w.length?[g.length,x,w]:[w.length,O,g];let P=0;for(;P<I;P++)_.push(v(g[P],w[P]));if(T===!1)j.additionalItems=!1;else{const $=T===void 0||Ye(T);for(;P<F.length;P++)_.push($?F[P]:v(F[P],T));Pt(j,"additionalItems",x!==void 0&&O!==void 0?v(x,O):x??O)}}else if(A||C){const[I,T,F]=A?[g,w,x]:[w,g,O];Pt(j,"additionalItems",F&&v(F,T));for(let P=0;P<I.length;P++)_.push(v(I[P],T))}else delete j.additionalItems,j.items=v(g,w);return j},y=(j,g,x)=>{ca(j,g);const w=ca({},x);return j.allOf===void 0?j.allOf=[w]:j.allOf=j.allOf.concat(w),j};function f(j,g){const x=[];if(xi(j,g,(w,O)=>{try{x.push(v(w,O))}catch{}}),x.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(j)}" and "${JSON.stringify(g)}"; the merged result is empty`);return r(x)}const p=O0([[E0,d],[A0,h],[C0,y],...s]),b=_0(o);function v(j,g){if(j===!1||g===!1)return!1;if(Ye(j))return Ye(g)?!0:g;if(Ye(g))return j;let x={...j};const w=new Set,O=new Set,A=Object.keys(g),C=A.length;for(let _=0;_<C;_++){const I=A[_],T=g[I];if(T===void 0)continue;const F=b.get(I);if(F!==void 0){const M=F.length;for(let U=0;U<M;U++){const Z=F[U];j[Z.oppositeKey]!==void 0&&O.add(Z.check)}}const P=j[I];if(P===void 0){x[I]=T;continue}const $=p.get(I);if($){w.add($);continue}const k=E[I]??i;x[I]=k(P,T)}for(const _ of w)x=_(x,j,g);for(const _ of O)_(x);return x}const S=sa(v),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(j,g)=>{if(j===g)return j;const x=Array.isArray(j),w=Array.isArray(g);if(!x&&!w){const O=Si(j,g);if(O!==void 0)return O}else if(x||w){const O=new Set;if(x&&w)xi(j,g,(C,_)=>{const I=Si(C,_);I!==void 0&&O.add(I)});else{const C=x?j:g,_=x?g:j,I=C.length;for(let T=0;T<I;T++){const F=Si(_,C[T]);F!==void 0&&O.add(F)}}const A=O.size;if(A===1)return O.values().next().value;if(A>1)return Array.from(O)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${j.toString()}, ${g.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(j,g)=>{const x=r([j,g]);return x.length===1?x[0]:{anyOf:x}},pattern:t,readOnly:vi,writeOnly:vi,enum:(j,g)=>{const x=n(j,g);if(x.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(j)}", "${JSON.stringify(g)}"`);return x},anyOf:f,oneOf:f,allOf:(j,g)=>r(j.concat(g)),propertyNames:v,contains:v,dependencies:sa((j,g)=>Array.isArray(j)?Array.isArray(g)?pi(j,g):v(g,{required:j}):Array.isArray(g)?v(j,{required:g}):v(j,g)),examples:(j,g)=>{if(!Array.isArray(j)||!Array.isArray(g))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(j)}" and "${JSON.stringify(g)}"`);return pi(j,g)},multipleOf:(j,g)=>{let x=1;for(;!Number.isInteger(j)||!Number.isInteger(g);)x*=10,j*=10,g*=10;return w0(j,g)/x},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:vi,required:pi,...a};return{mergeSchemaDefinitions:v,mergeArrayOfSchemaDefinitions:l}}function N0(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 P0(t){return e=>t(N0(e))}const{compareSchemaDefinitions:F0,compareSchemaValues:$0}=S0(),{mergeArrayOfSchemaDefinitions:D0}=T0({intersectJson:p0($0),deduplicateJsonSchemaDef:ic(F0)}),ac=P0(D0);function _e(t,e,n={},r,i,s=!1){return Ze(t,e,n,r,void 0,void 0,i,s)[0]}function R0(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],y=[];if(r)l&&typeof l!="boolean"&&(y=y.concat(Ze(t,l,n,s,r,i,o))),u&&typeof u!="boolean"&&(y=y.concat(Ze(t,u,n,s,r,i,o)));else{const f=d?l:u;f&&typeof f!="boolean"&&(y=y.concat(Ze(t,f,n,s,r,i,o)))}return y.length&&(h=y.map(f=>ct(c,f))),h.flatMap(f=>Ze(t,f,n,s,r,i,o))}function lc(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>Kl(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function cc(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ue(n,[r],t.patternProperties[r]),n),{})}function k0(t,e,n,r,i,s,o,a){const l=uc(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(gs in e)return fc(t,e,n,r,i,s,o).flatMap(c=>Ze(t,c,n,s,r,i,o));if(At in e&&Array.isArray(e[At])){const u=e.allOf.map(d=>Ze(t,d,n,s,r,i,o));return lc(u).map(d=>({...e,allOf:d}))}return[e]}function uc(t,e,n,r,i,s,o,a){const l=jt(e,n,i,void 0,a);return l!==e?Ze(t,l,n,s,r,i,o,a):[e]}function jt(t,e,n,r,i){if(!z(t))return t;let s=t,o=r;if(de in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...er(a,e,o),...l,[qn]:a},fe in s&&(o=s[fe])}if(se in s){const a=[],l=e0(s[se],(u,c,d)=>{const h=[...n];u[d]=jt(c,e,h,o,i),a.push(h)},{});eb(n,tc(Gy(a))),s={...s,[se]:l}}if(cn in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:jt(s.items,e,n,o,i)}),i){let a,l;ee in t&&Array.isArray(t[ee])?(a=ee,l=s[ee]):H in t&&Array.isArray(t[H])&&(a=H,l=s[H]),a&&l&&(s={...s,[a]:l.map(u=>jt(u,e,n,o,i))})}return ie(t,s)?t:s}function M0(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&z(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(qi in s){const l=cc(s,a);if(!ye(l)){s.properties[a]=_e(t,{[At]:Object.values(l)},n,R(o,[a]),i),ue(s.properties,[a,at],!0);return}}if(rn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?de in s.additionalProperties?l=_e(t,{[de]:R(s.additionalProperties,[de])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ee in s.additionalProperties||H in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:rr(R(o,[a]))}:l={type:rr(R(o,[a]))},s.properties[a]=l,ue(s.properties,[a,at],!0)}else s.properties[a]={type:"null"},ue(s.properties,[a,at],!0)}}),s}function U0(t){return ac(t)}function Ze(t,e,n,r,i=!1,s=[],o,a){return z(e)?k0(t,e,n,i,s,r,o,a).flatMap(u=>{var c;let d=u;if(ys in d)return R0(t,d,n,i,s,r,o);if(At in d){if(i){const{allOf:y,...f}=d;return[...y,f]}try{const y=[],f=[];(c=d.allOf)===null||c===void 0||c.forEach(p=>{typeof p=="object"&&p.contains?y.push(p):f.push(p)}),y.length&&(d={...d,allOf:f}),d=o?o(d):U0(d),y.length&&(d.allOf=y)}catch(y){console.warn(`could not merge subschemas in allOf:
|
|
1
|
+
import{bh as _u,bi as ke,bj as io,s as D,al as ve,aG as ut,bk as ls,aD as ae,bl as Jn,bm as qe,aE as Rt,bn as yn,o as B,bo as cs,bp as so,bq as Iu,br as Tu,bs as Ya,bt as Nu,bu as Pu,bv as Fu,bw as Ja,bx as $u,b7 as ot,by as Du,aF as lt,bz as Ru,c as Oe,r as N,l as Lr,j as m,aQ as Za,D as us,a as ku,t as wr,bA as ds,bB as Xa,bC as Mu,bD as Uu,bE as Lu,bg as Qa,bF as fs,R as Bu,bG as Vu,bH as qu,bI as zu,a3 as Wu,W as tn,V as sr,_ as bn,ai as Hu,aj as Ku,bJ as Gu,Y as Yu,bK as Ju,B as Br,i as ms,b as Zu,E as Xu,ab as Qu}from"./index-MpjPxskG.js";import{P as _n}from"./index-Cx-rmUTX.js";import{E as el}from"./empty-state-BA-8VXvV.js";import{A as tl,f as ed,h as td,n as nd,j as rd,k as id,i as sd,u as od}from"./use-mcp-client-D0CDCf2C.js";import{c as ad}from"./use-mcp-tools-oAYlV_rV.js";import{c as ld}from"./ZoomOut-CP848i3T.js";import{i as cd}from"./Key01-LrqIifxa.js";import{b as ud,u as dd,a as fd}from"./use-connection-B7hehSBo.js";import{U as In,a as si,e as oo}from"./auth-BQJ4901M.js";import{i as md,c as hd,d as pd,e as gd}from"./extract-connection-data-CtVNT5JS.js";import{u as yd}from"./use-registry-connections-C1tYRr1m.js";import{b as bd}from"./use-organization-settings-BCL7l3Gq.js";import{s as xd}from"./Plus-CpiYI_4d.js";import{e as nl,d as vd,b as Sd,c as wd,S as jd,a as Od}from"./select-CP2O-MPr.js";import{R as ao}from"./index-Bzybgde3.js";import{R as Ed,I as Ad,a as Cd}from"./index-BBDWvYlB.js";import{_ as Vt}from"./index-DKxonbsE.js";import{A as rl}from"./agent-icon-D4izi-0m.js";import{I as _d}from"./input-Cr9jBfB7.js";import{a as Id,b as Td,P as Nd}from"./popover-CJe04WOy.js";import{b as Pd,a as Fd,c as $d,T as Dd}from"./tooltip-CEM9S4pg.js";import{u as Rd}from"./use-virtual-mcp-q2Cm2W65.js";import{i as kd}from"./ChevronUp-B0N31Im_.js";import{i as Md}from"./SearchMd-Dj_Z4iwH.js";import{a as Ud}from"./Users03-BwME7x2o.js";import{u as Ld}from"./use-mobile-taJ6Byue.js";import{u as Bd}from"./use-create-virtual-mcp-CI7JmXUA.js";function Vd(){const t=new tl({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return _u(t),t}class qd{#e=Vd();#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=zd(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 zd(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 Wd=new qd;var Hd=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||ve();i instanceof yn&&(t.number=i.int())}}},Kd=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=ls():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},Gd=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?ls():!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 Rt(t);if(e==="number"){const[n,r,...i]=t;return Jn([qe(n),qe(r),...i.map(s=>qe(s))])}return e==="boolean"?Jn([qe(!0),qe(!1)]):!1}},Yd=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}}},Jd=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=D())}},Zd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||D();r instanceof cs&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Xd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||D();r instanceof cs&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Qd=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||D();if(r instanceof cs){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},ef=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(t.number=r.min(n.minimum))}}},tf=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(t.number=r.max(n.maximum))}}},nf=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},rf=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},sf=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof yn&&(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}`}))}}},of=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=ae(ke()))}},af=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||ae(ke())).min(n.minItems))}},lf=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||ae(ke())).max(n.maxItems))}},cf=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||ae(ke());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Ie(n.items);let i=ae(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||ae(ke()):t.array=ae(ke()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||ae(ke()):n.prefixItems&&(t.array=t.array||ae(ke()))}},uf=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=so([]):i=so(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}},df=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||B({}).passthrough())}},ff=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=B({}).passthrough())}},mf=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||B({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},hf=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||B({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function Zn(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)=>Zn(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)&&Zn(t[i],e[i]))}return!1}function pf(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>Zn(n,i))?!1:(e.push(n),!0))}}function Pr(t,e){return t.safeParse(e).success}var gf=class{apply(t,e){if(!e.not)return t;const n=Ie(e.not);return t.refine(r=>!Pr(n,r),{message:"Value must not match the 'not' schema"})}},yf=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(pf(),{message:"Array items must be unique"})}},bf=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Ie(r)).reduce((r,i)=>Ya(r,i),t)}},xf=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Ie(e.anyOf[0]):Jn([Ie(e.anyOf[0]),Ie(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Ie(r))]);return Ya(t,n)}},vf=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"})}},Sf=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(!Pr(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(!Pr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},wf=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?B(r):B(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"})}},jf=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=>Zn(r,i)),{message:"Value must match one of the enum values"})}},Of=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=>Zn(r,n),{message:"Value must equal the const value"})}},Ef=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},Af=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))}},Cf=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)Pr(i,u)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},_f=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},If=[new Kd,new Gd,new Hd,new Yd,new Jd,new of,new ff,new Zd,new Xd,new Qd,new ef,new tf,new nf,new rf,new sf,new uf,new af,new lf,new cf,new mf,new hf,new df],Tf=[new Af,new jf,new Of,new bf,new xf,new vf,new Sf,new wf,new Cf,new gf,new yf,new _f,new Ef];function Ie(t){if(typeof t=="boolean")return t?ke():io();const e={};for(const i of If)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||D()),e.number!==!1&&n.push(e.number||ve()),e.boolean!==!1&&n.push(e.boolean||ut()),e.null!==!1&&n.push(e.null||ls()),e.array!==!1&&n.push(e.array||ae(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=io():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=Jn(n):r=ke();for(const i of Tf)r=i.apply(r,t);return r}class lo 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(co(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(co(this),n)}}function Nf(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function Di(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(Di).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${Di(t.cause)}`:t.message:`${t}`}function co(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)},hs=(t,e,n)=>e.has(t)||il("Cannot "+n),X=(t,e,n)=>(hs(t,e,"read from private field"),n?n.call(t):e.get(t)),we=(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),ge=(t,e,n,r)=>(hs(t,e,"write to private field"),e.set(t,n),n),st=(t,e,n)=>(hs(t,e,"access private method"),n),Pe,$t,Zt,jr,Fr,Bn,nn,Vn,vt,Xt,an,Qt,Dn,Ve,Ri,ki,Mi,uo,Ui,Li,Rn,Bi,Vi;class Or extends EventTarget{constructor(e,n){var r,i;super(),we(this,Ve),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,we(this,Pe),we(this,$t),we(this,Zt),we(this,jr),we(this,Fr),we(this,Bn),we(this,nn),we(this,Vn,null),we(this,vt),we(this,Xt),we(this,an,null),we(this,Qt,null),we(this,Dn,null),we(this,ki,async s=>{var o;X(this,Xt).reset();const{body:a,redirected:l,status:u,headers:c}=s;if(u===204){st(this,Ve,Rn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?ge(this,Zt,new URL(s.url)):ge(this,Zt,void 0),u!==200){st(this,Ve,Rn).call(this,`Non-200 status code (${u})`,u);return}if(!(c.get("content-type")||"").startsWith("text/event-stream")){st(this,Ve,Rn).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(X(this,Pe)===this.CLOSED)return;ge(this,Pe,this.OPEN);const d=new Event("open");if((o=X(this,Dn))==null||o.call(this,d),this.dispatchEvent(d),typeof a!="object"||!a||!("getReader"in a)){st(this,Ve,Rn).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const h=new TextDecoder,y=a.getReader();let f=!0;do{const{done:p,value:b}=await y.read();b&&X(this,Xt).feed(h.decode(b,{stream:!p})),p&&(f=!1,X(this,Xt).reset(),st(this,Ve,Bi).call(this))}while(f)}),we(this,Mi,s=>{ge(this,vt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&st(this,Ve,Bi).call(this,Di(s))}),we(this,Ui,s=>{typeof s.id=="string"&&ge(this,Vn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:X(this,Zt)?X(this,Zt).origin:X(this,$t).origin,lastEventId:s.id||""});X(this,Qt)&&(!s.event||s.event==="message")&&X(this,Qt).call(this,o),this.dispatchEvent(o)}),we(this,Li,s=>{ge(this,Bn,s)}),we(this,Vi,()=>{ge(this,nn,void 0),X(this,Pe)===this.CONNECTING&&st(this,Ve,Ri).call(this)});try{if(e instanceof URL)ge(this,$t,e);else if(typeof e=="string")ge(this,$t,new URL(e,Pf()));else throw new Error("Invalid URL")}catch{throw Nf("An invalid or illegal string was specified")}ge(this,Xt,ed({onEvent:X(this,Ui),onRetry:X(this,Li)})),ge(this,Pe,this.CONNECTING),ge(this,Bn,3e3),ge(this,Fr,(r=n?.fetch)!=null?r:globalThis.fetch),ge(this,jr,(i=n?.withCredentials)!=null?i:!1),st(this,Ve,Ri).call(this)}get readyState(){return X(this,Pe)}get url(){return X(this,$t).href}get withCredentials(){return X(this,jr)}get onerror(){return X(this,an)}set onerror(e){ge(this,an,e)}get onmessage(){return X(this,Qt)}set onmessage(e){ge(this,Qt,e)}get onopen(){return X(this,Dn)}set onopen(e){ge(this,Dn,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(){X(this,nn)&&clearTimeout(X(this,nn)),X(this,Pe)!==this.CLOSED&&(X(this,vt)&&X(this,vt).abort(),ge(this,Pe,this.CLOSED),ge(this,vt,void 0))}}Pe=new WeakMap,$t=new WeakMap,Zt=new WeakMap,jr=new WeakMap,Fr=new WeakMap,Bn=new WeakMap,nn=new WeakMap,Vn=new WeakMap,vt=new WeakMap,Xt=new WeakMap,an=new WeakMap,Qt=new WeakMap,Dn=new WeakMap,Ve=new WeakSet,Ri=function(){ge(this,Pe,this.CONNECTING),ge(this,vt,new AbortController),X(this,Fr)(X(this,$t),st(this,Ve,uo).call(this)).then(X(this,ki)).catch(X(this,Mi))},ki=new WeakMap,Mi=new WeakMap,uo=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...X(this,Vn)?{"Last-Event-ID":X(this,Vn)}:void 0},cache:"no-store",signal:(t=X(this,vt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},Ui=new WeakMap,Li=new WeakMap,Rn=function(t,e){var n;X(this,Pe)!==this.CLOSED&&ge(this,Pe,this.CLOSED);const r=new lo("error",{code:e,message:t});(n=X(this,an))==null||n.call(this,r),this.dispatchEvent(r)},Bi=function(t,e){var n;if(X(this,Pe)===this.CLOSED)return;ge(this,Pe,this.CONNECTING);const r=new lo("error",{code:e,message:t});(n=X(this,an))==null||n.call(this,r),this.dispatchEvent(r),ge(this,nn,setTimeout(X(this,Vi),X(this,Bn)))},Vi=new WeakMap,Or.CONNECTING=0,Or.OPEN=1,Or.CLOSED=2;function Pf(){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 Ff extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class $f{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=td(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new In("No auth provider");let e;try{e=await si(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 In;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=nd(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 Or(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}=oo(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 Ff(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=Ja.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 In("No auth provider");if(await si(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new In("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}=oo(i);if(this._resourceMetadataUrl=o,this._scope=a,await si(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new In;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 Df="mcp";class Rf{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,Df),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=Ja.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 kf extends rd{constructor(e,n){super(e,n)}send(e,n){const r=Mf(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function Mf(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 Uf extends id{constructor(e,n){super(e,{jsonSchemaValidator:Wd,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},$u,n)}}const Lf=async(t,e,n)=>{const r=Bf(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new Uf({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},Bf=(t,e,n)=>{if(t.type==="Websocket")return new Rf(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 $f(new URL(t.url),s)}return new kf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},fo=t=>{try{return JSON.parse(t)}catch{return t}},gr=new Map,mo=(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 Vf(t){const e=n=>"connection"in t?Lf({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:y,isError:f,content:p}=await h.callTool({name:String(u),arguments:l});if(f){const v=p?.[0]?.text,S=typeof v=="string"?fo(v):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(y??p)}`)}if(y!==void 0)return y;const b=p?.[0]?.text;return typeof b=="string"?fo(b):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 gr.has(u)||gr.set(u,s()),await gr.get(u)}catch(c){console.error("Failed to list tools",c),gr.delete(u);return}}async function a(){return(await o()??[]).map(u=>mo(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 mo(u,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>qf({connection:n}):global[e]}});function qf(t){return Vf(t)}function zf(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 Wf=B({id:D().describe("Unique identifier for the entity"),title:D().describe("Human-readable title for the entity"),description:D().nullish().describe("Description of the entity"),created_at:D().datetime(),updated_at:D().datetime(),created_by:D().optional(),updated_by:D().optional()}),Hf=B({field:ae(D()),operator:Rt(["eq","gt","gte","lt","lte","in","like","contains"]),value:ot()}),sl=Du(()=>Jn([Hf,B({operator:Rt(["and","or","not"]),conditions:ae(sl)})])),Kf=B({field:ae(D()),direction:Rt(["asc","desc"]),nulls:Rt(["first","last"]).optional()}),Gf=B({where:sl.optional().describe("Filter expression"),orderBy:ae(Kf).optional().describe("Sort expressions"),limit:ve().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:ve().int().min(0).optional().describe("Number of items to skip")});function Yf(t){return B({items:ae(t).describe("Array of collection items"),totalCount:ve().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:ut().optional().describe("Whether there are more items available")})}const Jf=B({id:D().describe("ID of the entity to retrieve")});function Zf(t){return B({item:t.nullable().describe("The retrieved item, or null if not found")})}B({id:D().describe("ID of the entity to delete")});function Xf(t,e,n){const r=t.toUpperCase();return[{name:`COLLECTION_${r}_LIST`,inputSchema:Gf,outputSchema:Yf(e)},{name:`COLLECTION_${r}_GET`,inputSchema:Jf,outputSchema:Zf(e)}]}const Qf=B({id:D(),name:D(),description:D().optional(),inputSchema:lt(D(),ot()),outputSchema:lt(D(),ot()).optional()}),em=Wf.extend({_meta:B({"io.decocms":B({id:D(),verified:ut(),scopeName:D(),appName:D(),friendlyName:D().nullable().optional(),metadata:lt(D(),ot()).nullable().optional(),publishedAt:D().datetime().optional(),updatedAt:D().datetime().optional(),tools:ae(Qf).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:B({$schema:D().optional(),_meta:lt(D(),ot()).optional(),name:D().describe("The server name (scope/app)"),title:D().optional().describe("User-friendly title"),description:D().optional().describe("Server description"),icons:ae(B({src:D(),mimeType:D().optional(),sizes:ae(D()).optional(),theme:Rt(["light","dark"]).optional()})).optional(),remotes:ae(B({type:Rt(["http","stdio","sse"]),url:D().optional(),headers:ae(ot()).optional()})).optional(),packages:ae(ot()).optional(),repository:B({url:D(),source:D().optional(),subfolder:D().optional()}).optional(),version:D().optional(),websiteUrl:D().optional()})});Xf("registry_app",em);const tm=B({specversion:qe("1.0").describe("CloudEvents specification version"),id:D().describe("Unique identifier for this event (UUID recommended)"),source:D().describe("Connection ID of the event publisher"),type:D().describe("Event type (e.g., 'order.created', 'user.signup')"),time:D().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:D().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:D().optional().default("application/json").describe("Content type of the data attribute"),dataschema:D().url().optional().describe("URI to the schema for the data attribute"),data:ot().optional().describe("Event payload (any JSON value)")});B({events:ae(tm).min(1).describe("Batch of CloudEvents to process")});const nm=B({success:ut().optional().describe("Whether this event was processed successfully"),error:D().optional().describe("Error message for this event"),retryAfter:ve().int().positive().optional().describe("Re-deliver this event after this many ms")});B({success:ut().optional().describe("Batch success - applies to events not in results"),error:D().optional().describe("Batch error message - applies to events not in results"),processedCount:ve().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:ve().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:lt(D(),nm).optional().describe("Per-event results keyed by event ID")});const rm=B({type:qe("string"),enum:ae(D()).optional(),description:D().optional()}),im=B({type:D(),description:D(),paramsSchema:lt(D(),rm)});B({});B({triggers:ae(im)});B({type:D(),params:lt(D(),D()),enabled:ut(),callbackUrl:Ru().optional(),callbackToken:D().min(1).optional()});B({success:ut()});B({prefix:D().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:ve().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:D().optional().describe("Token for pagination from previous response"),delimiter:D().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});B({objects:ae(B({key:D().describe("Object key/path"),size:ve().describe("Object size in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object")})),nextContinuationToken:D().optional().describe("Token for fetching next page of results"),isTruncated:ut().describe("Whether there are more results available"),commonPrefixes:ae(D()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});B({key:D().describe("Object key/path to get metadata for")});B({contentType:D().optional().describe("MIME type of the object"),contentLength:ve().describe("Size of the object in bytes"),lastModified:D().describe("Last modified timestamp"),etag:D().describe("Entity tag for the object"),metadata:lt(D(),D()).optional().describe("Custom metadata key-value pairs")});B({key:D().describe("Object key/path to generate URL for"),expiresIn:ve().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});B({url:D().describe("Presigned URL for downloading the object"),expiresIn:ve().describe("Expiration time in seconds that was used")});B({key:D().describe("Object key/path for the upload"),expiresIn:ve().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:D().optional().describe("MIME type for the object being uploaded")});B({url:D().describe("Presigned URL for uploading the object"),expiresIn:ve().describe("Expiration time in seconds that was used")});B({key:D().describe("Object key/path to delete")});B({success:ut().describe("Whether the deletion was successful"),key:D().describe("The key that was deleted")});B({keys:ae(D()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});B({deleted:ae(D()).describe("Array of successfully deleted keys"),errors:ae(B({key:D(),message:D()})).describe("Array of errors for failed deletions")});const sm=B({primary:D().optional().describe("Primary brand color (hex)"),secondary:D().optional().describe("Secondary brand color (hex)"),accent:D().optional().describe("Accent / highlight color (hex)"),background:D().optional().describe("Background color (hex)"),foreground:D().optional().describe("Foreground / text color (hex)")}),om=B({heading:D().optional().describe("Font family for headings"),body:D().optional().describe("Font family for body text"),code:D().optional().describe("Font family for code / monospace")}),am=B({logo:D().optional().describe("Logo URL"),favicon:D().optional().describe("Favicon URL"),ogImage:D().optional().describe("Open Graph image URL")}),lm=B({id:D(),name:D().describe("Brand / company name"),domain:D().optional().describe("Company domain (e.g. example.com)"),colors:sm.optional().describe("Semantic color palette"),fonts:om.optional().describe("Font families by role"),assets:am.optional().describe("Visual identity assets"),overview:D().optional().describe("Company overview / description"),tagline:D().optional().describe("Brand tagline"),tone:D().optional().describe("Tone of voice description"),metadata:lt(D(),ot()).optional().describe("Extra design tokens and metadata")});B({id:D().optional().describe("Brand ID. Omit to get the default brand.")});B({});B({items:ae(lm)});const cm={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function um(t){if(t)return cm[t]}function ZO(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 zf(i).isImplementedBy(r)}const ps=N.createContext(null);function XO(t){const e=Oe.c(3),{children:n}=t,r=N.useContext(ps);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 dm(t){const e=Oe.c(3),{children:n}=t,r=N.useContext(ps);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 QO=dm;function eE(t){const e=Oe.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=C=>{l.current=C,C&&a(_=>_.leftEl===C?_:{..._,leftEl:C})},e[1]=d):d=e[1];const h=d;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=C=>{u.current=C,C&&a(_=>_.tabsEl===C?_:{..._,tabsEl:C})},e[2]=y):y=e[2];const f=y;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=C=>{c.current=C,C&&a(_=>_.actionsEl===C?_:{..._,actionsEl:C})},e[3]=p):p=e[3];const b=p,v=i&&"hidden";let S;e[4]!==v?(S=Lr(v),e[4]=v,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(_n.Header.Left,{children:[r,E]}),e[7]=r,e[8]=j):j=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsxs(_n.Header.Right,{children:[m.jsx("div",{ref:f,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),m.jsx("div",{ref:b,className:"flex items-center gap-2 shrink-0"})]}),e[9]=g):g=e[9];let x;e[10]!==S||e[11]!==j?(x=m.jsxs(_n.Header,{className:S,children:[j,g]}),e[10]=S,e[11]=j,e[12]=x):x=e[12];let w;e[13]!==n?(w=m.jsx(_n.Content,{children:n}),e[13]=n,e[14]=w):w=e[14];let O;e[15]!==x||e[16]!==w?(O=m.jsxs(_n,{children:[x,w]}),e[15]=x,e[16]=w,e[17]=O):O=e[17];let A;return e[18]!==o||e[19]!==O?(A=m.jsx(ps,{value:o,children:O}),e[18]=o,e[19]=O,e[20]=A):A=e[20],A}function fm(t){return t.startsWith("@")?t:`@${t}`}function mm(){const{org:t}=us(),{data:e}=ku.useSession(),n=ud(),r=yd(),i=bd(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!t||!e?.user?.id){wr.error("Not authenticated");return}const l=fm(a),c=(await Promise.all(s.map(async p=>{const b=md(p.id,t.id);try{const v=await hd(p.id,t.id,t.slug,b,{where:{appName:l}});return pd(v??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!c){wr.error(`MCP Server not found in registry: ${a}`);return}const d=gd(c,t.id,e.user.id),h=d.connection_type==="STDIO",y=!!d.connection_url,f=h&&d.connection_headers&&typeof d.connection_headers=="object"&&"command"in d.connection_headers;if(!y&&!f){wr.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 z(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 hm(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),z(t.additionalItems)}function ho(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 at="__additional_property",rn="additionalProperties",At="allOf",ee="anyOf",Ne="const",kt="default",gs="dependencies",pm="enum",Ce="__errors",fe="$id",ys="if",cn="items",gm="_$junk_option_schema_id$_",Er="$name",H="oneOf",qi="patternProperties",se="properties",oi="readonly",ol="required",$r="submitButtonOptions",de="$ref",qn="__rjsf_ref",kn="$schema",al="root",ll="_",ym=["discriminator","propertyName"],po="formContext",bm="layoutGridLookupMap",bs="__rjsf_additionalProperties",cl="__rjsf_rootSchema",xm="ui:field",xs="ui:widget",wt="ui:options",zi="ui:globalOptions",vm="ui:definitions",Sm="https://json-schema.org/draft/2019-09/schema",Ar="https://json-schema.org/draft/2020-12/schema";function V(t={},e={}){return t?Object.keys(t).filter(n=>n.startsWith("ui:")).reduce((n,r)=>{const i=t[r];return r===xs&&z(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===wt&&z(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function ul(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=V(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var dl=typeof global=="object"&&global&&global.Object===Object&&global,wm=typeof self=="object"&&self&&self.Object===Object&&self,nt=dl||wm||Function("return this")(),Me=nt.Symbol,fl=Object.prototype,jm=fl.hasOwnProperty,Om=fl.toString,Tn=Me?Me.toStringTag:void 0;function Em(t){var e=jm.call(t,Tn),n=t[Tn];try{t[Tn]=void 0;var r=!0}catch{}var i=Om.call(t);return r&&(e?t[Tn]=n:delete t[Tn]),i}var Am=Object.prototype,Cm=Am.toString;function _m(t){return Cm.call(t)}var Im="[object Null]",Tm="[object Undefined]",go=Me?Me.toStringTag:void 0;function dt(t){return t==null?t===void 0?Tm:Im:go&&go in Object(t)?Em(t):_m(t)}function ml(t,e){return function(n){return t(e(n))}}var Vr=ml(Object.getPrototypeOf,Object);function Ue(t){return t!=null&&typeof t=="object"}var Nm="[object Object]",Pm=Function.prototype,Fm=Object.prototype,hl=Pm.toString,$m=Fm.hasOwnProperty,Dm=hl.call(Object);function Ct(t){if(!Ue(t)||dt(t)!=Nm)return!1;var e=Vr(t);if(e===null)return!0;var n=$m.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&hl.call(n)==Dm}function Wi(t){const e={[Ce]:[],addError(n){this[Ce].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:Wi(r)}),e);if(Ct(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:Wi(n[i])}),e)}return e}var je=Array.isArray,Rm="[object Symbol]";function or(t){return typeof t=="symbol"||Ue(t)&&dt(t)==Rm}var km=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mm=/^\w*$/;function vs(t,e){if(je(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||or(t)?!0:Mm.test(t)||!km.test(t)||e!=null&&t in Object(e)}function ne(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Um="[object AsyncFunction]",Lm="[object Function]",Bm="[object GeneratorFunction]",Vm="[object Proxy]";function ar(t){if(!ne(t))return!1;var e=dt(t);return e==Lm||e==Bm||e==Um||e==Vm}var ai=nt["__core-js_shared__"],yo=(function(){var t=/[^.]+$/.exec(ai&&ai.keys&&ai.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function qm(t){return!!yo&&yo in t}var zm=Function.prototype,Wm=zm.toString;function qt(t){if(t!=null){try{return Wm.call(t)}catch{}try{return t+""}catch{}}return""}var Hm=/[\\^$.*+?()[\]{}|]/g,Km=/^\[object .+?Constructor\]$/,Gm=Function.prototype,Ym=Object.prototype,Jm=Gm.toString,Zm=Ym.hasOwnProperty,Xm=RegExp("^"+Jm.call(Zm).replace(Hm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qm(t){if(!ne(t)||qm(t))return!1;var e=ar(t)?Xm:Km;return e.test(qt(t))}function eh(t,e){return t?.[e]}function zt(t,e){var n=eh(t,e);return Qm(n)?n:void 0}var Xn=zt(Object,"create");function th(){this.__data__=Xn?Xn(null):{},this.size=0}function nh(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var rh="__lodash_hash_undefined__",ih=Object.prototype,sh=ih.hasOwnProperty;function oh(t){var e=this.__data__;if(Xn){var n=e[t];return n===rh?void 0:n}return sh.call(e,t)?e[t]:void 0}var ah=Object.prototype,lh=ah.hasOwnProperty;function ch(t){var e=this.__data__;return Xn?e[t]!==void 0:lh.call(e,t)}var uh="__lodash_hash_undefined__";function dh(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Xn&&e===void 0?uh:e,this}function Mt(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])}}Mt.prototype.clear=th;Mt.prototype.delete=nh;Mt.prototype.get=oh;Mt.prototype.has=ch;Mt.prototype.set=dh;function fh(){this.__data__=[],this.size=0}function lr(t,e){return t===e||t!==t&&e!==e}function qr(t,e){for(var n=t.length;n--;)if(lr(t[n][0],e))return n;return-1}var mh=Array.prototype,hh=mh.splice;function ph(t){var e=this.__data__,n=qr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():hh.call(e,n,1),--this.size,!0}function gh(t){var e=this.__data__,n=qr(e,t);return n<0?void 0:e[n][1]}function yh(t){return qr(this.__data__,t)>-1}function bh(t,e){var n=this.__data__,r=qr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ft(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])}}ft.prototype.clear=fh;ft.prototype.delete=ph;ft.prototype.get=gh;ft.prototype.has=yh;ft.prototype.set=bh;var Qn=zt(nt,"Map");function xh(){this.size=0,this.__data__={hash:new Mt,map:new(Qn||ft),string:new Mt}}function vh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function zr(t,e){var n=t.__data__;return vh(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Sh(t){var e=zr(this,t).delete(t);return this.size-=e?1:0,e}function wh(t){return zr(this,t).get(t)}function jh(t){return zr(this,t).has(t)}function Oh(t,e){var n=zr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function mt(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])}}mt.prototype.clear=xh;mt.prototype.delete=Sh;mt.prototype.get=wh;mt.prototype.has=jh;mt.prototype.set=Oh;var Eh="Expected a function";function Ss(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Eh);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(Ss.Cache||mt),n}Ss.Cache=mt;var Ah=500;function Ch(t){var e=Ss(t,function(r){return n.size===Ah&&n.clear(),r}),n=e.cache;return e}var _h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ih=/\\(\\)?/g,pl=Ch(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(_h,function(n,r,i,s){e.push(i?s.replace(Ih,"$1"):r||n)}),e});function xn(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 bo=Me?Me.prototype:void 0,xo=bo?bo.toString:void 0;function gl(t){if(typeof t=="string")return t;if(je(t))return xn(t,gl)+"";if(or(t))return xo?xo.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ws(t){return t==null?"":gl(t)}function vn(t,e){return je(t)?t:vs(t,e)?[t]:pl(ws(t))}function _t(t){if(typeof t=="string"||or(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Wr(t,e){e=vn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[_t(e[n++])];return n&&n==r?t:void 0}function R(t,e,n){var r=t==null?void 0:Wr(t,e);return r===void 0?n:r}const{getOwnPropertyNames:Th,getOwnPropertySymbols:Nh}=Object,{hasOwnProperty:Ph}=Object.prototype;function li(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function yr(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 vo(t){return Th(t).concat(Nh(t))}const Fh=Object.hasOwn||((t,e)=>Ph.call(t,e)),$h="__v",Dh="__o",Rh="_owner",{getOwnPropertyDescriptor:So,keys:wo}=Object,Wt=Object.is||function(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n};function kh(t,e){return t===e}function Mh(t,e){return t.byteLength===e.byteLength&&Dr(new Uint8Array(t),new Uint8Array(e))}function Uh(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 Lh(t,e){return t.byteLength===e.byteLength&&Dr(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function Bh(t,e){return Wt(t.getTime(),e.getTime())}function Vh(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}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.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,y=a.value;if(n.equals(h[0],y[0],l,d,t,e,n)&&n.equals(h[1],y[1],h[0],y[0],t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}function qh(t,e,n){const r=wo(t);let i=r.length;if(wo(e).length!==i)return!1;for(;i-- >0;)if(!yl(t,e,n,r[i]))return!1;return!0}function Nn(t,e,n){const r=vo(t);let i=r.length;if(vo(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!yl(t,e,n,s)||(o=So(t,s),a=So(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function zh(t,e){return Wt(t.valueOf(),e.valueOf())}function Wh(t,e){return t.source===e.source&&t.flags===e.flags}function Oo(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 Dr(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 Hh(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 yl(t,e,n,r){return(r===Rh||r===Dh||r===$h)&&(t.$$typeof||e.$$typeof)?!0:Fh(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const Kh=Object.prototype.toString;function Gh(t){const e=Xh(t),{areArraysEqual:n,areDatesEqual:r,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:a,areRegExpsEqual:l,areSetsEqual:u,getUnsupportedCustomComparator:c}=t;return function(h,y,f){if(h===y)return!0;if(h==null||y==null)return!1;const p=typeof h;if(p!==typeof y)return!1;if(p!=="object")return p==="number"||p==="bigint"?o(h,y,f):p==="function"?i(h,y,f):!1;const b=h.constructor;if(b!==y.constructor)return!1;if(b===Object)return a(h,y,f);if(b===Array)return n(h,y,f);if(b===Date)return r(h,y,f);if(b===RegExp)return l(h,y,f);if(b===Map)return s(h,y,f);if(b===Set)return u(h,y,f);if(b===Promise)return!1;if(Array.isArray(h))return n(h,y,f);const v=Kh.call(h),S=e[v];if(S)return S(h,y,f);const E=c&&c(h,y,f,v);return E?E(h,y,f):!1}}function Yh({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:Mh,areArraysEqual:n?Nn:Uh,areDataViewsEqual:Lh,areDatesEqual:Bh,areErrorsEqual:Vh,areFunctionsEqual:kh,areMapsEqual:n?li(jo,Nn):jo,areNumbersEqual:Wt,areObjectsEqual:n?Nn:qh,arePrimitiveWrappersEqual:zh,areRegExpsEqual:Wh,areSetsEqual:n?li(Oo,Nn):Oo,areTypedArraysEqual:n?li(Dr,Nn):Dr,areUrlsEqual:Hh,getUnsupportedCustomComparator:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=yr(r.areArraysEqual),s=yr(r.areMapsEqual),o=yr(r.areObjectsEqual),a=yr(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Jh(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function Zh({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 Xh({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:y}){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,b)=>typeof f.then!="function"&&typeof p.then!="function"&&l(f,p,b),"[object RegExp]":c,"[object Set]":d,"[object String]":u,"[object URL]":y,"[object Uint8Array]":h,"[object Uint8ClampedArray]":h,"[object Uint16Array]":h,"[object Uint32Array]":h}}ht();ht({strict:!0});ht({circular:!0});ht({circular:!0,strict:!0});ht({createInternalComparator:()=>Wt});ht({strict:!0,createInternalComparator:()=>Wt});ht({circular:!0,createInternalComparator:()=>Wt});ht({circular:!0,createInternalComparator:()=>Wt,strict:!0});function ht(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=Yh(t),o=Gh(s),a=n?n(o):Jh(o);return Zh({circular:e,comparator:o,createState:r,equals:a,strict:i})}const ie=ht({circular:!0,createCustomConfig:()=>({areFunctionsEqual(t,e){return typeof e=="function"}})});var Pn={exports:{}},ci,Eo;function bl(){if(Eo)return ci;Eo=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(g){let x="",w=0,O=0;for(O=0;O<g.length;O++)if(w=g[O].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";x+=g[O];break}for(O+=1;O<g.length;O++){if(w=g[O].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";x+=g[O]}return x}const o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(g){return g.length=0,!0}function l(g,x,w){if(g.length){const O=s(g);if(O!=="")x.push(O);else return w.error=!0,!1;g.length=0}return!0}function u(g){let x=0;const w={error:!1,address:"",zone:""},O=[],A=[];let C=!1,_=!1,I=l;for(let T=0;T<g.length;T++){const F=g[T];if(!(F==="["||F==="]"))if(F===":"){if(C===!0&&(_=!0),!I(A,O,w))break;if(++x>7){w.error=!0;break}T>0&&g[T-1]===":"&&(C=!0),O.push(":");continue}else if(F==="%"){if(!I(A,O,w))break;I=a}else{A.push(F);continue}}return A.length&&(I===a?w.zone=A.join(""):_?O.push(A.join("")):O.push(s(A))),w.address=O.join(""),w}function c(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const x=u(g);if(x.error)return{host:g,isIPV6:!1};{let w=x.address,O=x.address;return x.zone&&(w+="%"+x.zone,O+="%25"+x.zone),{host:w,isIPV6:!0,escapedHost:O}}}function d(g,x){let w=0;for(let O=0;O<g.length;O++)g[O]===x&&w++;return w}function h(g){let x=g;const w=[];let O=-1,A=0;for(;A=x.length;){if(A===1){if(x===".")break;if(x==="/"){w.push("/");break}else{w.push(x);break}}else if(A===2){if(x[0]==="."){if(x[1]===".")break;if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&(x[1]==="."||x[1]==="/")){w.push("/");break}}else if(A===3&&x==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(x[0]==="."){if(x[1]==="."){if(x[2]==="/"){x=x.slice(3);continue}}else if(x[1]==="/"){x=x.slice(2);continue}}else if(x[0]==="/"&&x[1]==="."){if(x[2]==="/"){x=x.slice(2);continue}else if(x[2]==="."&&x[3]==="/"){x=x.slice(3),w.length!==0&&w.pop();continue}}if((O=x.indexOf("/",1))===-1){w.push(x);break}else w.push(x.slice(0,O)),x=x.slice(O)}return w.join("")}const y={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},f=/[@/?#:]/g,p=/[@/?#]/g;function b(g,x){const w=x?p:f;return w.lastIndex=0,g.replace(w,O=>y[O])}function v(g,x=!1){if(g.indexOf("%")===-1)return g;let w="";for(let O=0;O<g.length;O++){if(g[O]==="%"&&O+2<g.length){const A=g.slice(O+1,O+3);if(n(A)){const C=A.toUpperCase(),_=String.fromCharCode(parseInt(C,16));x&&r(_)?w+=_:w+="%"+C,O+=2;continue}}w+=g[O]}return w}function S(g){let x="";for(let w=0;w<g.length;w++){if(g[w]==="%"&&w+2<g.length){const O=g.slice(w+1,w+3);if(n(O)){const A=O.toUpperCase(),C=String.fromCharCode(parseInt(A,16));C!=="."&&r(C)?x+=C:x+="%"+A,w+=2;continue}}i(g[w])?x+=g[w]:x+=escape(g[w])}return x}function E(g){let x="";for(let w=0;w<g.length;w++){if(g[w]==="%"&&w+2<g.length){const O=g.slice(w+1,w+3);if(n(O)){x+="%"+O.toUpperCase(),w+=2;continue}}x+=escape(g[w])}return x}function j(g){const x=[];if(g.userinfo!==void 0&&(x.push(g.userinfo),x.push("@")),g.host!==void 0){let w=unescape(g.host);if(!e(w)){const O=c(w);O.isIPV6===!0?w=`[${O.escapedHost}]`:w=b(w,!1)}x.push(w)}return(typeof g.port=="number"||typeof g.port=="string")&&(x.push(":"),x.push(String(g.port))),x.length?x.join(""):void 0}return ci={nonSimpleDomain:o,recomposeAuthority:j,reescapeHostDelimiters:b,normalizePercentEncoding:v,normalizePathEncoding:S,escapePreservingEscapes:E,removeDotSegments:h,isIPv4:e,isUUID:t,normalizeIPv6:c,stringArrayToHexStripped:s},ci}var ui,Ao;function Qh(){if(Ao)return ui;Ao=1;const{isUUID:t}=bl(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(g){return n.indexOf(g)!==-1}function i(g){return g.secure===!0?!0:g.secure===!1?!1:g.scheme?g.scheme.length===3&&(g.scheme[0]==="w"||g.scheme[0]==="W")&&(g.scheme[1]==="s"||g.scheme[1]==="S")&&(g.scheme[2]==="s"||g.scheme[2]==="S"):!1}function s(g){return g.host||(g.error=g.error||"HTTP URIs must have a host."),g}function o(g){const x=String(g.scheme).toLowerCase()==="https";return(g.port===(x?443:80)||g.port==="")&&(g.port=void 0),g.path||(g.path="/"),g}function a(g){return g.secure=i(g),g.resourceName=(g.path||"/")+(g.query?"?"+g.query:""),g.path=void 0,g.query=void 0,g}function l(g){if((g.port===(i(g)?443:80)||g.port==="")&&(g.port=void 0),typeof g.secure=="boolean"&&(g.scheme=g.secure?"wss":"ws",g.secure=void 0),g.resourceName){const[x,w]=g.resourceName.split("?");g.path=x&&x!=="/"?x:void 0,g.query=w,g.resourceName=void 0}return g.fragment=void 0,g}function u(g,x){if(!g.path)return g.error="URN can not be parsed",g;const w=g.path.match(e);if(w){const O=x.scheme||g.scheme||"urn";g.nid=w[1].toLowerCase(),g.nss=w[2];const A=`${O}:${x.nid||g.nid}`,C=j(A);g.path=void 0,C&&(g=C.parse(g,x))}else g.error=g.error||"URN can not be parsed.";return g}function c(g,x){if(g.nid===void 0)throw new Error("URN without nid cannot be serialized");const w=x.scheme||g.scheme||"urn",O=g.nid.toLowerCase(),A=`${w}:${x.nid||O}`,C=j(A);C&&(g=C.serialize(g,x));const _=g,I=g.nss;return _.path=`${O||x.nid}:${I}`,x.skipEscape=!0,_}function d(g,x){const w=g;return w.uuid=w.nss,w.nss=void 0,!x.tolerant&&(!w.uuid||!t(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function h(g){const x=g;return x.nss=(g.uuid||"").toLowerCase(),x}const y={scheme:"http",domainHost:!0,parse:s,serialize:o},f={scheme:"https",domainHost:y.domainHost,parse:s,serialize:o},p={scheme:"ws",domainHost:!0,parse:a,serialize:l},b={scheme:"wss",domainHost:p.domainHost,parse:p.parse,serialize:p.serialize},E={http:y,https:f,ws:p,wss:b,urn:{scheme:"urn",parse:u,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:h,skipNormalize:!0}};Object.setPrototypeOf(E,null);function j(g){return g&&(E[g]||E[g.toLowerCase()])||void 0}return ui={wsIsSecure:i,SCHEMES:E,isValidSchemeName:r,getSchemeHandler:j},ui}var Co;function ep(){if(Co)return Pn.exports;Co=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:n,normalizePercentEncoding:r,normalizePathEncoding:i,escapePreservingEscapes:s,reescapeHostDelimiters:o,isIPv4:a,nonSimpleDomain:l}=bl(),{SCHEMES:u,getSchemeHandler:c}=Qh();function d(O,A){return typeof O=="string"?O=j(O,A):typeof O=="object"&&(O=E(p(O,A),A)),O}function h(O,A,C){const _=C?Object.assign({scheme:"null"},C):{scheme:"null"},I=y(E(O,_),E(A,_),_,!0);return _.skipEscape=!0,p(I,_)}function y(O,A,C,_){const I={};return _||(O=E(p(O,C),C),A=E(p(A,C),C)),C=C||{},!C.tolerant&&A.scheme?(I.scheme=A.scheme,I.userinfo=A.userinfo,I.host=A.host,I.port=A.port,I.path=e(A.path||""),I.query=A.query):(A.userinfo!==void 0||A.host!==void 0||A.port!==void 0?(I.userinfo=A.userinfo,I.host=A.host,I.port=A.port,I.path=e(A.path||""),I.query=A.query):(A.path?(A.path[0]==="/"?I.path=e(A.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?I.path="/"+A.path:O.path?I.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+A.path:I.path=A.path,I.path=e(I.path)),I.query=A.query):(I.path=O.path,A.query!==void 0?I.query=A.query:I.query=O.query),I.userinfo=O.userinfo,I.host=O.host,I.port=O.port),I.scheme=O.scheme),I.fragment=A.fragment,I}function f(O,A,C){const _=x(O,C),I=x(A,C);return _!==void 0&&I!==void 0&&_.toLowerCase()===I.toLowerCase()}function p(O,A){const C={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({},A),I=[],T=c(_.scheme||C.scheme);T&&T.serialize&&T.serialize(C,_),C.path!==void 0&&(_.skipEscape?C.path=r(C.path):(C.path=s(C.path),C.scheme!==void 0&&(C.path=C.path.split("%3A").join(":")))),_.reference!=="suffix"&&C.scheme&&I.push(C.scheme,":");const F=n(C);if(F!==void 0&&(_.reference!=="suffix"&&I.push("//"),I.push(F),C.path&&C.path[0]!=="/"&&I.push("/")),C.path!==void 0){let P=C.path;!_.absolutePath&&(!T||!T.absolutePath)&&(P=e(P)),F===void 0&&P[0]==="/"&&P[1]==="/"&&(P="/%2F"+P.slice(2)),I.push(P)}return C.query!==void 0&&I.push("?",C.query),C.fragment!==void 0&&I.push("#",C.fragment),I.join("")}const b=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function v(O,A){if(A[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,A){const C=Object.assign({},A),_={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let I=!1,T=!1;C.reference==="suffix"&&(C.scheme?O=C.scheme+":"+O:O="//"+O);const F=O.match(b);if(F){_.scheme=F[1],_.userinfo=F[3],_.host=F[4],_.port=parseInt(F[5],10),_.path=F[6]||"",_.query=F[7],_.fragment=F[8],isNaN(_.port)&&(_.port=F[5]);const P=v(_,F);if(P!==void 0&&(_.error=_.error||P,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",C.reference&&C.reference!=="suffix"&&C.reference!==_.reference&&(_.error=_.error||"URI is not a "+C.reference+" reference.");const $=c(C.scheme||_.scheme);if(!C.unicodeSupport&&(!$||!$.unicodeSupport)&&_.host&&(C.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(_,C)}else _.error=_.error||"URI can not be parsed.";return{parsed:_,malformedAuthorityOrPort:I}}function E(O,A){return S(O,A).parsed}function j(O,A){return g(O,A).normalized}function g(O,A){const{parsed:C,malformedAuthorityOrPort:_}=S(O,A);return{normalized:_?O:p(C,A),malformedAuthorityOrPort:_}}function x(O,A){if(typeof O=="string"){const{normalized:C,malformedAuthorityOrPort:_}=g(O,A);return _?void 0:C}if(typeof O=="object")return p(O,A)}const w={SCHEMES:u,normalize:d,resolve:h,resolveComponent:y,equal:f,serialize:p,parse:E};return Pn.exports=w,Pn.exports.default=w,Pn.exports.fastUri=w,Pn.exports}var tp=ep();const js=ds(tp);var Fn={},_o;function np(){if(_o)return Fn;_o=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,y,f=1,p=c.length;f<p;){if(c[f]==="constructor"||c[f]==="prototype"||c[f]==="__proto__")return u;if(h=r(c[f++]),y=p>f,typeof u[h]>"u"&&(Array.isArray(u)&&h==="-"&&(h=u.length),y&&(c[f]!==""&&c[f]<1/0||c[f]==="-"?u[h]=[]:u[h]={})),!y)break;u=u[h]}var b=u[h];return d===void 0?delete u[h]:u[h]=d,b}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 Fn.get=o,Fn.set=a,Fn.compile=l,Fn}var rp=np();const di=ds(rp);var ip=Object.prototype;function Hr(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ip;return t===n}var sp=ml(Object.keys,Object),op=Object.prototype,ap=op.hasOwnProperty;function xl(t){if(!Hr(t))return sp(t);var e=[];for(var n in Object(t))ap.call(t,n)&&n!="constructor"&&e.push(n);return e}var Hi=zt(nt,"DataView"),Ki=zt(nt,"Promise"),ln=zt(nt,"Set"),Gi=zt(nt,"WeakMap"),Io="[object Map]",lp="[object Object]",To="[object Promise]",No="[object Set]",Po="[object WeakMap]",Fo="[object DataView]",cp=qt(Hi),up=qt(Qn),dp=qt(Ki),fp=qt(ln),mp=qt(Gi),Re=dt;(Hi&&Re(new Hi(new ArrayBuffer(1)))!=Fo||Qn&&Re(new Qn)!=Io||Ki&&Re(Ki.resolve())!=To||ln&&Re(new ln)!=No||Gi&&Re(new Gi)!=Po)&&(Re=function(t){var e=dt(t),n=e==lp?t.constructor:void 0,r=n?qt(n):"";if(r)switch(r){case cp:return Fo;case up:return Io;case dp:return To;case fp:return No;case mp:return Po}return e});var hp="[object Arguments]";function $o(t){return Ue(t)&&dt(t)==hp}var vl=Object.prototype,pp=vl.hasOwnProperty,gp=vl.propertyIsEnumerable,un=$o((function(){return arguments})())?$o:function(t){return Ue(t)&&pp.call(t,"callee")&&!gp.call(t,"callee")},yp=9007199254740991;function Os(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=yp}function Ht(t){return t!=null&&Os(t.length)&&!ar(t)}function bp(){return!1}var Sl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Do=Sl&&typeof module=="object"&&module&&!module.nodeType&&module,xp=Do&&Do.exports===Sl,Ro=xp?nt.Buffer:void 0,vp=Ro?Ro.isBuffer:void 0,Ut=vp||bp,Sp="[object Arguments]",wp="[object Array]",jp="[object Boolean]",Op="[object Date]",Ep="[object Error]",Ap="[object Function]",Cp="[object Map]",_p="[object Number]",Ip="[object Object]",Tp="[object RegExp]",Np="[object Set]",Pp="[object String]",Fp="[object WeakMap]",$p="[object ArrayBuffer]",Dp="[object DataView]",Rp="[object Float32Array]",kp="[object Float64Array]",Mp="[object Int8Array]",Up="[object Int16Array]",Lp="[object Int32Array]",Bp="[object Uint8Array]",Vp="[object Uint8ClampedArray]",qp="[object Uint16Array]",zp="[object Uint32Array]",pe={};pe[Rp]=pe[kp]=pe[Mp]=pe[Up]=pe[Lp]=pe[Bp]=pe[Vp]=pe[qp]=pe[zp]=!0;pe[Sp]=pe[wp]=pe[$p]=pe[jp]=pe[Dp]=pe[Op]=pe[Ep]=pe[Ap]=pe[Cp]=pe[_p]=pe[Ip]=pe[Tp]=pe[Np]=pe[Pp]=pe[Fp]=!1;function Wp(t){return Ue(t)&&Os(t.length)&&!!pe[dt(t)]}function Es(t){return function(e){return t(e)}}var wl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zn=wl&&typeof module=="object"&&module&&!module.nodeType&&module,Hp=zn&&zn.exports===wl,fi=Hp&&dl.process,dn=(function(){try{var t=zn&&zn.require&&zn.require("util").types;return t||fi&&fi.binding&&fi.binding("util")}catch{}})(),ko=dn&&dn.isTypedArray,cr=ko?Es(ko):Wp,Kp="[object Map]",Gp="[object Set]",Yp=Object.prototype,Jp=Yp.hasOwnProperty;function ye(t){if(t==null)return!0;if(Ht(t)&&(je(t)||typeof t=="string"||typeof t.splice=="function"||Ut(t)||cr(t)||un(t)))return!t.length;var e=Re(t);if(e==Kp||e==Gp)return!t.size;if(Hr(t))return!xl(t).length;for(var n in t)if(Jp.call(t,n))return!1;return!0}function Zp(){this.__data__=new ft,this.size=0}function Xp(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Qp(t){return this.__data__.get(t)}function eg(t){return this.__data__.has(t)}var tg=200;function ng(t,e){var n=this.__data__;if(n instanceof ft){var r=n.__data__;if(!Qn||r.length<tg-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new mt(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new ft(t);this.size=e.size}We.prototype.clear=Zp;We.prototype.delete=Xp;We.prototype.get=Qp;We.prototype.has=eg;We.prototype.set=ng;function As(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Rr=(function(){try{var t=zt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function Cs(t,e,n){e=="__proto__"&&Rr?Rr(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var rg=Object.prototype,ig=rg.hasOwnProperty;function _s(t,e,n){var r=t[e];(!(ig.call(t,e)&&lr(r,n))||n===void 0&&!(e in t))&&Cs(t,e,n)}function Sn(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?Cs(n,a,l):_s(n,a,l)}return n}function jl(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var sg=9007199254740991,og=/^(?:0|[1-9]\d*)$/;function Kr(t,e){var n=typeof t;return e=e??sg,!!e&&(n=="number"||n!="symbol"&&og.test(t))&&t>-1&&t%1==0&&t<e}var ag=Object.prototype,lg=ag.hasOwnProperty;function Ol(t,e){var n=je(t),r=!n&&un(t),i=!n&&!r&&Ut(t),s=!n&&!r&&!i&&cr(t),o=n||r||i||s,a=o?jl(t.length,String):[],l=a.length;for(var u in t)(e||lg.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Kr(u,l)))&&a.push(u);return a}function ze(t){return Ht(t)?Ol(t):xl(t)}function cg(t,e){return t&&Sn(e,ze(e),t)}function ug(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var dg=Object.prototype,fg=dg.hasOwnProperty;function mg(t){if(!ne(t))return ug(t);var e=Hr(t),n=[];for(var r in t)r=="constructor"&&(e||!fg.call(t,r))||n.push(r);return n}function ur(t){return Ht(t)?Ol(t,!0):mg(t)}function hg(t,e){return t&&Sn(e,ur(e),t)}var El=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mo=El&&typeof module=="object"&&module&&!module.nodeType&&module,pg=Mo&&Mo.exports===El,Uo=pg?nt.Buffer:void 0,Lo=Uo?Uo.allocUnsafe:void 0;function Al(t,e){if(e)return t.slice();var n=t.length,r=Lo?Lo(n):new t.constructor(n);return t.copy(r),r}function Is(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function gg(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 Cl(){return[]}var yg=Object.prototype,bg=yg.propertyIsEnumerable,Bo=Object.getOwnPropertySymbols,Ts=Bo?function(t){return t==null?[]:(t=Object(t),gg(Bo(t),function(e){return bg.call(t,e)}))}:Cl;function xg(t,e){return Sn(t,Ts(t),e)}function Ns(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var vg=Object.getOwnPropertySymbols,_l=vg?function(t){for(var e=[];t;)Ns(e,Ts(t)),t=Vr(t);return e}:Cl;function Sg(t,e){return Sn(t,_l(t),e)}function Il(t,e,n){var r=e(t);return je(t)?r:Ns(r,n(t))}function Yi(t){return Il(t,ze,Ts)}function Ps(t){return Il(t,ur,_l)}var wg=Object.prototype,jg=wg.hasOwnProperty;function Og(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&jg.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var kr=nt.Uint8Array;function Fs(t){var e=new t.constructor(t.byteLength);return new kr(e).set(new kr(t)),e}function Eg(t,e){var n=e?Fs(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Ag=/\w*$/;function Cg(t){var e=new t.constructor(t.source,Ag.exec(t));return e.lastIndex=t.lastIndex,e}var Vo=Me?Me.prototype:void 0,qo=Vo?Vo.valueOf:void 0;function _g(t){return qo?Object(qo.call(t)):{}}function Tl(t,e){var n=e?Fs(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Ig="[object Boolean]",Tg="[object Date]",Ng="[object Map]",Pg="[object Number]",Fg="[object RegExp]",$g="[object Set]",Dg="[object String]",Rg="[object Symbol]",kg="[object ArrayBuffer]",Mg="[object DataView]",Ug="[object Float32Array]",Lg="[object Float64Array]",Bg="[object Int8Array]",Vg="[object Int16Array]",qg="[object Int32Array]",zg="[object Uint8Array]",Wg="[object Uint8ClampedArray]",Hg="[object Uint16Array]",Kg="[object Uint32Array]";function Gg(t,e,n){var r=t.constructor;switch(e){case kg:return Fs(t);case Ig:case Tg:return new r(+t);case Mg:return Eg(t,n);case Ug:case Lg:case Bg:case Vg:case qg:case zg:case Wg:case Hg:case Kg:return Tl(t,n);case Ng:return new r;case Pg:case Dg:return new r(t);case Fg:return Cg(t);case $g:return new r;case Rg:return _g(t)}}var zo=Object.create,Nl=(function(){function t(){}return function(e){if(!ne(e))return{};if(zo)return zo(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function Pl(t){return typeof t.constructor=="function"&&!Hr(t)?Nl(Vr(t)):{}}var Yg="[object Map]";function Jg(t){return Ue(t)&&Re(t)==Yg}var Wo=dn&&dn.isMap,Zg=Wo?Es(Wo):Jg,Xg="[object Set]";function Qg(t){return Ue(t)&&Re(t)==Xg}var Ho=dn&&dn.isSet,ey=Ho?Es(Ho):Qg,ty=1,ny=2,ry=4,Fl="[object Arguments]",iy="[object Array]",sy="[object Boolean]",oy="[object Date]",ay="[object Error]",$l="[object Function]",ly="[object GeneratorFunction]",cy="[object Map]",uy="[object Number]",Dl="[object Object]",dy="[object RegExp]",fy="[object Set]",my="[object String]",hy="[object Symbol]",py="[object WeakMap]",gy="[object ArrayBuffer]",yy="[object DataView]",by="[object Float32Array]",xy="[object Float64Array]",vy="[object Int8Array]",Sy="[object Int16Array]",wy="[object Int32Array]",jy="[object Uint8Array]",Oy="[object Uint8ClampedArray]",Ey="[object Uint16Array]",Ay="[object Uint32Array]",he={};he[Fl]=he[iy]=he[gy]=he[yy]=he[sy]=he[oy]=he[by]=he[xy]=he[vy]=he[Sy]=he[wy]=he[cy]=he[uy]=he[Dl]=he[dy]=he[fy]=he[my]=he[hy]=he[jy]=he[Oy]=he[Ey]=he[Ay]=!0;he[ay]=he[$l]=he[py]=!1;function Wn(t,e,n,r,i,s){var o,a=e&ty,l=e&ny,u=e&ry;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!ne(t))return t;var c=je(t);if(c){if(o=Og(t),!a)return Is(t,o)}else{var d=Re(t),h=d==$l||d==ly;if(Ut(t))return Al(t,a);if(d==Dl||d==Fl||h&&!i){if(o=l||h?{}:Pl(t),!a)return l?Sg(t,hg(o,t)):xg(t,cg(o,t))}else{if(!he[d])return i?t:{};o=Gg(t,d,a)}}s||(s=new We);var y=s.get(t);if(y)return y;s.set(t,o),ey(t)?t.forEach(function(b){o.add(Wn(b,e,n,b,t,s))}):Zg(t)&&t.forEach(function(b,v){o.set(v,Wn(b,e,n,v,t,s))});var f=u?l?Ps:Yi:l?ur:ze,p=c?void 0:f(t);return As(p||t,function(b,v){p&&(v=b,b=t[v]),_s(o,v,Wn(b,e,n,v,t,s))}),o}function Rl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Cy(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 _y(t,e){return e.length<2?t:Wr(t,Cy(e,0,-1))}var Iy=Object.prototype,Ty=Iy.hasOwnProperty;function kl(t,e){e=vn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=_t(e[n]);if(i==="__proto__"&&!Ty.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=_y(t,e);return s==null||delete s[_t(Rl(e))]}function Ny(t){return Ct(t)?void 0:t}var Ko=Me?Me.isConcatSpreadable:void 0;function Py(t){return je(t)||un(t)||!!(Ko&&t&&t[Ko])}function dr(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=Py),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?dr(a,e-1,n,r,i):Ns(i,a):r||(i[i.length]=a)}return i}function Ji(t){var e=t==null?0:t.length;return e?dr(t,1):[]}function Fy(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 Go=Math.max;function Ml(t,e,n){return e=Go(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Go(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),Fy(t,this,a)}}function $y(t){return function(){return t}}function Gr(t){return t}var Dy=Rr?function(t,e){return Rr(t,"toString",{configurable:!0,enumerable:!1,value:$y(e),writable:!0})}:Gr,Ry=800,ky=16,My=Date.now;function Uy(t){var e=0,n=0;return function(){var r=My(),i=ky-(r-n);if(n=r,i>0){if(++e>=Ry)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Ul=Uy(Dy);function Ll(t){return Ul(Ml(t,void 0,Ji),t+"")}var Ly=1,By=2,Vy=4,fn=Ll(function(t,e){var n={};if(t==null)return n;var r=!1;e=xn(e,function(s){return s=vn(s,t),r||(r=s.length>1),s}),Sn(t,Ps(t),n),r&&(n=Wn(n,Ly|By|Vy,Ny));for(var i=e.length;i--;)kl(n,e[i]);return n});function Mr(t,e){if(fe in t&&js.equal(t[fe],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(ne(r)){const i=Mr(r,e);if(i!==void 0)return i}}else if(ne(n)){const r=Mr(n,e);if(r!==void 0)return r}}function Zi(t,e){const n=R(t,fe,e);let r=t;de in r&&(r={...r,[de]:js.resolve(n,r[de])});for(const[i,s]of Object.entries(r))Array.isArray(s)?r={...r,[i]:s.map(o=>ne(o)?Zi(o,n):o)}:ne(s)&&(r={...r,[i]:Zi(s,n)});return r}function $s(t,e){const n=e[t];return[fn(e,[t]),n]}function Bl(t,e={},n=[],r=R(e,[fe])){const i=t||"";let s,o=r;if(i.startsWith("#")){const l=decodeURIComponent(i.substring(1));o===void 0||fe in e&&e[fe]===o?s=di.get(e,l):e[kn]===Ar&&(s=Mr(e,o.replace(/\/$/,"")),s!==void 0&&(s=di.get(s,l)))}else if(e[kn]===Ar){const l=o?js.resolve(o,i):i,[u,...c]=l.replace(/#\/?$/,"").split("#");s=Mr(e,u.replace(/\/$/,"")),s!==void 0&&(o=s[fe],ye(c)||(s=di.get(s,decodeURIComponent(c.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const a=s[de];if(a){if(n.includes(a)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...h]=n,y=[...h,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${y}`)}const[l,u]=$s(de,s),c=Bl(u,e,[...n,i],o);return Object.keys(l).length>0?e[kn]===Sm||e[kn]===Ar?{[At]:[l,c]}:{...l,...c}:c}return s}function er(t,e={},n=R(e,[fe])){return Bl(t,e,[],n)}var qy=Object.prototype,zy=qy.hasOwnProperty;function Wy(t,e){return t!=null&&zy.call(t,e)}function Vl(t,e,n){e=vn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=_t(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&&Os(i)&&Kr(o,i)&&(je(t)||un(t)))}function Q(t,e){return t!=null&&Vl(t,e,Wy)}var Hy="[object String]";function It(t){return typeof t=="string"||!je(t)&&Ue(t)&&dt(t)==Hy}function He(t){let e;const n=R(t,ym);return It(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}var Ky=1/0;function Gy(t){var e=t==null?0:t.length;return e?dr(t,Ky):[]}function Xi(t,e,n){(n!==void 0&&!lr(t[e],n)||n===void 0&&!(e in t))&&Cs(t,e,n)}function Yy(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 ql=Yy();function tr(t){return Ue(t)&&Ht(t)}function Qi(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Jy(t){return Sn(t,ur(t))}function Zy(t,e,n,r,i,s,o){var a=Qi(t,n),l=Qi(e,n),u=o.get(l);if(u){Xi(t,n,u);return}var c=s?s(a,l,n+"",t,e,o):void 0,d=c===void 0;if(d){var h=je(l),y=!h&&Ut(l),f=!h&&!y&&cr(l);c=l,h||y||f?je(a)?c=a:tr(a)?c=Is(a):y?(d=!1,c=Al(l,!0)):f?(d=!1,c=Tl(l,!0)):c=[]:Ct(l)||un(l)?(c=a,un(a)?c=Jy(a):(!ne(a)||ar(a))&&(c=Pl(l))):d=!1}d&&(o.set(l,c),i(c,l,r,s,o),o.delete(l)),Xi(t,n,c)}function zl(t,e,n,r,i){t!==e&&ql(e,function(s,o){if(i||(i=new We),ne(s))Zy(t,e,o,n,zl,r,i);else{var a=r?r(Qi(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Xi(t,o,a)}},ur)}function Yr(t,e){return Ul(Ml(t,e,Gr),t+"")}function Xy(t,e,n){if(!ne(n))return!1;var r=typeof e;return(r=="number"?Ht(n)&&Kr(e,n.length):r=="string"&&e in n)?lr(n[e],t):!1}function Qy(t){return Yr(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&&Xy(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 eb=Qy(function(t,e,n){zl(t,e,n)});function Ds(t,e,n,r){if(!ne(t))return t;e=vn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=_t(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:Kr(e[i+1])?[]:{})}_s(a,l,u),a=a[l]}return t}function ue(t,e,n){return t==null?t:Ds(t,e,n)}function Wl(t){return typeof t=="function"?t:Gr}var tb=/\s/;function nb(t){for(var e=t.length;e--&&tb.test(t.charAt(e)););return e}var rb=/^\s+/;function ib(t){return t&&t.slice(0,nb(t)+1).replace(rb,"")}var Yo=NaN,sb=/^[-+]0x[0-9a-f]+$/i,ob=/^0b[01]+$/i,ab=/^0o[0-7]+$/i,lb=parseInt;function cb(t){if(typeof t=="number")return t;if(or(t))return Yo;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=ib(t);var n=ob.test(t);return n||ab.test(t)?lb(t.slice(2),n?2:8):sb.test(t)?Yo:+t}var Jo=1/0,ub=17976931348623157e292;function db(t){if(!t)return t===0?t:0;if(t=cb(t),t===Jo||t===-Jo){var e=t<0?-1:1;return e*ub}return t===t?t:0}function Hl(t){var e=db(t),n=e%1;return e===e?n?e-n:e:0}var fb=9007199254740991,mi=4294967295,mb=Math.min;function Kl(t,e){if(t=Hl(t),t<1||t>fb)return[];var n=mi,r=mb(t,mi);e=Wl(e),t-=mi;for(var i=jl(r,e);++n<t;)e(n);return i}function Gl(t,e){return t&&ql(t,e,ze)}var hb="__lodash_hash_undefined__";function pb(t){return this.__data__.set(t,hb),this}function gb(t){return this.__data__.has(t)}function Lt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new mt;++e<n;)this.add(t[e])}Lt.prototype.add=Lt.prototype.push=pb;Lt.prototype.has=gb;function yb(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 nr(t,e){return t.has(e)}var bb=1,xb=2;function Yl(t,e,n,r,i,s){var o=n&bb,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,y=n&xb?new Lt:void 0;for(s.set(t,e),s.set(e,t);++d<a;){var f=t[d],p=e[d];if(r)var b=o?r(p,f,d,e,t,s):r(f,p,d,t,e,s);if(b!==void 0){if(b)continue;h=!1;break}if(y){if(!yb(e,function(v,S){if(!nr(y,S)&&(f===v||i(f,v,n,r,s)))return y.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 vb(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Rs(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Sb=1,wb=2,jb="[object Boolean]",Ob="[object Date]",Eb="[object Error]",Ab="[object Map]",Cb="[object Number]",_b="[object RegExp]",Ib="[object Set]",Tb="[object String]",Nb="[object Symbol]",Pb="[object ArrayBuffer]",Fb="[object DataView]",Zo=Me?Me.prototype:void 0,hi=Zo?Zo.valueOf:void 0;function $b(t,e,n,r,i,s,o){switch(n){case Fb:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Pb:return!(t.byteLength!=e.byteLength||!s(new kr(t),new kr(e)));case jb:case Ob:case Cb:return lr(+t,+e);case Eb:return t.name==e.name&&t.message==e.message;case _b:case Tb:return t==e+"";case Ab:var a=vb;case Ib:var l=r&Sb;if(a||(a=Rs),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=wb,o.set(t,e);var c=Yl(a(t),a(e),r,i,s,o);return o.delete(t),c;case Nb:if(hi)return hi.call(t)==hi.call(e)}return!1}var Db=1,Rb=Object.prototype,kb=Rb.hasOwnProperty;function Mb(t,e,n,r,i,s){var o=n&Db,a=Yi(t),l=a.length,u=Yi(e),c=u.length;if(l!=c&&!o)return!1;for(var d=l;d--;){var h=a[d];if(!(o?h in e:kb.call(e,h)))return!1}var y=s.get(t),f=s.get(e);if(y&&f)return y==e&&f==t;var p=!0;s.set(t,e),s.set(e,t);for(var b=o;++d<l;){h=a[d];var v=t[h],S=e[h];if(r)var E=o?r(S,v,h,e,t,s):r(v,S,h,t,e,s);if(!(E===void 0?v===S||i(v,S,n,r,s):E)){p=!1;break}b||(b=h=="constructor")}if(p&&!b){var j=t.constructor,g=e.constructor;j!=g&&"constructor"in t&&"constructor"in e&&!(typeof j=="function"&&j instanceof j&&typeof g=="function"&&g instanceof g)&&(p=!1)}return s.delete(t),s.delete(e),p}var Ub=1,Xo="[object Arguments]",Qo="[object Array]",br="[object Object]",Lb=Object.prototype,ea=Lb.hasOwnProperty;function Bb(t,e,n,r,i,s){var o=je(t),a=je(e),l=o?Qo:Re(t),u=a?Qo:Re(e);l=l==Xo?br:l,u=u==Xo?br:u;var c=l==br,d=u==br,h=l==u;if(h&&Ut(t)){if(!Ut(e))return!1;o=!0,c=!1}if(h&&!c)return s||(s=new We),o||cr(t)?Yl(t,e,n,r,i,s):$b(t,e,l,n,r,i,s);if(!(n&Ub)){var y=c&&ea.call(t,"__wrapped__"),f=d&&ea.call(e,"__wrapped__");if(y||f){var p=y?t.value():t,b=f?e.value():e;return s||(s=new We),i(p,b,n,r,s)}}return h?(s||(s=new We),Mb(t,e,n,r,i,s)):!1}function Jr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ue(t)&&!Ue(e)?t!==t&&e!==e:Bb(t,e,n,r,Jr,i)}var Vb=1,qb=2;function zb(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?Jr(u,l,Vb|qb,r,c):d))return!1}}return!0}function Jl(t){return t===t&&!ne(t)}function Wb(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Jl(i)]}return e}function Zl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Hb(t){var e=Wb(t);return e.length==1&&e[0][2]?Zl(e[0][0],e[0][1]):function(n){return n===t||zb(n,t,e)}}function Kb(t,e){return t!=null&&e in Object(t)}function Xl(t,e){return t!=null&&Vl(t,e,Kb)}var Gb=1,Yb=2;function Jb(t,e){return vs(t)&&Jl(e)?Zl(_t(t),e):function(n){var r=R(n,t);return r===void 0&&r===e?Xl(n,t):Jr(e,r,Gb|Yb)}}function Zb(t){return function(e){return e?.[t]}}function Xb(t){return function(e){return Wr(e,t)}}function Qb(t){return vs(t)?Zb(_t(t)):Xb(t)}function ks(t){return typeof t=="function"?t:t==null?Gr:typeof t=="object"?je(t)?Jb(t[0],t[1]):Hb(t):Qb(t)}function e0(t,e,n){var r=je(t),i=r||Ut(t)||cr(t);if(e=ks(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:ne(t)?n=ar(s)?Nl(Vr(t)):{}:n={}}return(i?As:Gl)(t,function(o,a,l){return e(n,o,a,l)}),n}function t0(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 n0(t){return t!==t}function r0(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Ql(t,e,n){return e===e?r0(t,e,n):t0(t,n0,n)}function Ms(t,e){var n=t==null?0:t.length;return!!n&&Ql(t,e,0)>-1}function Cr(){}var i0=1/0,s0=ln&&1/Rs(new ln([,-0]))[1]==i0?function(t){return new ln(t)}:Cr,o0=200;function ec(t,e,n){var r=-1,i=Ms,s=t.length,o=!0,a=[],l=a;if(s>=o0){var u=s0(t);if(u)return Rs(u);o=!1,i=nr,l=new Lt}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 tc(t){return t&&t.length?ec(t):[]}function rr(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 a0=Yr(function(t){return ec(dr(t,1,tr,!0))});function Le(t){let{type:e}=t;return!e&&t.const?rr(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 ct(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&&z(o)?r[i]=ct(s,o):t&&e&&(Le(t)==="object"||Le(e)==="object")&&i===ol&&Array.isArray(s)&&Array.isArray(o)?r[i]=a0(s,o):r[i]=o,r},n)}var l0="[object Number]";function nc(t){return typeof t=="number"||Ue(t)&&dt(t)==l0}function rc(t,e,n){var r;if(t&&n){const i=R(t,n);if(i===void 0)return;for(let s=0;s<e.length;s+=1){const o=e[s],a=R(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 Ur(t,e,n,r,i){if(e===void 0)return 0;const s=rc(e,n,i);if(nc(s))return s;for(let o=0;o<n.length;o+=1){const a=n[o];if(i&&Q(a,[se,i])){const l=R(e,i),u=R(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 c0=Object.prototype;function Mn(t){for(const e in t)if(c0.hasOwnProperty.call(t,e))return!1;return!0}const u0=["array","boolean","integer","null","number","object","string"];new Set(u0);const d0=["$defs","definitions","properties","patternProperties","dependencies"];new Set(d0);const f0=["items","allOf","oneOf","anyOf"];new Set(f0);const m0=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(m0);function _r(t){return typeof t=="object"}function Ye(t){return _r(t)?Mn(t):t===!0}function sn(t,e){return t<e?-1:t>e?1:0}function pi(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 h0(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 ta(t){return t.length===0}function gi(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 ic(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 p0(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 g0(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const na=g0,sc=()=>0,y0=t=>t===void 0,b0=t=>typeof t!="object",ra={boolean:0,number:1,string:2};function x0(t,e){const n=typeof t,r=typeof e;return n===r?sn(t,e):ra[n]-ra[r]}function v0(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 Zr(t,e,n=sc){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function en(t){return Zr(y0,t)}function yt(t,e){return Zr(n=>n===void 0||t(n),e)}function yi(t,e){return Zr(Array.isArray,t,e)}const xe=en(sn),bi=yt(t=>t===0,(t,e)=>t-e);function S0({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=na(e,p=>Object.keys(p).sort());function r(p){return(b,v)=>{const S=n(b),E=n(v),j=Math.min(S.length,E.length);for(let g=0;g<j;g++){const x=sn(S[g],E[g]);if(x!==0)return x}if(S.length!==E.length)return S.length-E.length;for(let g=0;g<j;g++){const x=S[g],w=p(b[x],v[x]);if(w!==0)return w}return 0}}function i(p){const b=gi(p),v=na(t,ic(p,{threshold:0}));return(S,E)=>b(v(S),v(E))}const s=i(sn);function o(p,b){if(_r(p)){if(_r(b)){const v=Object.keys(p),S=Object.keys(b),E=v0(v,S),j=E.length;for(let g=0;g<j;g++){const x=E[g];if(p[x]===b[x])continue;const O=(f[x]??a)(p[x],b[x]);if(O!==0)return O}return 0}return b===!0&&Mn(p)?0:1}return _r(b)?p===!0&&Mn(b)?0:-1:sn(p,b)}const a=en(u),l=Zr(b0,yi(r(a),gi(u)),x0);function u(p,b){return p===null?-1:b===null?1:l(p,b)}const c=en(o),d=yt(Mn,r(c)),h=en(i(o)),y=yt(Ye,o),f={$id:xe,$comment:xe,$defs:d,$ref:xe,$schema:xe,const:a,contains:c,contentEncoding:xe,contentMediaType:xe,default:a,definitions:d,description:xe,else:c,examples:a,exclusiveMaximum:xe,exclusiveMinimum:xe,format:xe,if:c,maximum:xe,maxItems:xe,maxLength:xe,maxProperties:xe,minimum:xe,multipleOf:xe,not:c,pattern:xe,propertyNames:c,readOnly:xe,then:c,title:xe,writeOnly:xe,uniqueItems:yt(p=>p===!1,sc),minLength:bi,minItems:bi,minProperties:bi,required:yt(ta,s),enum:yt(ta,i(u)),type:en((p,b)=>{const v=Array.isArray(p),S=Array.isArray(b);return!v&&!S?sn(p,b):s(v?p:[p],S?b:[b])}),items:yt(p=>!Array.isArray(p)&&Ye(p),yi(o,gi(o))),anyOf:h,allOf:h,oneOf:h,properties:d,patternProperties:d,additionalProperties:y,additionalItems:y,dependencies:yt(Mn,r(en(yi(o,s))))};return{compareSchemaValues:u,compareSchemaDefinitions:o}}function ia(t){return t}const oc=(t,e)=>t?oc(e%t,t):e,w0=(t,e)=>Math.abs(t*e)/oc(t,e);function j0(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function xi(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 vi(t,e){return t||e}function sa(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 O0(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function Pt(t,e,n){n===void 0||Ye(n)?delete t[e]:t[e]=n}const E0=["properties","patternProperties","additionalProperties"];function oa(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 aa=[[],[]];function la(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 A0=["items","additionalItems"],C0=["if","then","else"];function ca(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 Si(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 Ft(t,e,n){return[t,e,n]}function _0(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 I0=[Ft("minimum","maximum",t=>t.maximum>=t.minimum),Ft("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Ft("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Ft("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Ft("minLength","maxLength",t=>t.maxLength>=t.minLength),Ft("minItems","maxItems",t=>t.maxItems>=t.minItems),Ft("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function T0({mergePatterns:t=j0,isSubRegExp:e=Object.is,intersectJson:n=h0,deduplicateJsonSchemaDef:r=ia,defaultMerger:i=ia,assigners:s=[],checks:o=I0,mergers:a}={}){function l(j){const g=j.length;let x=j[0];for(let w=1;w<g;w++){const O=v(x,j[w]);if(O===!1)return!1;Ye(O)||(x=O)}return x}function u(j,g,x,w,O,A,C){if(j.length=0,x===!1)return!1;if(j.push(x),O!==void 0){if(O===!1)return!1;j.push(O)}if(la(j,g,A))return!1;const I=j.length<2;if(C===!1){if(I)return;if(la(j,g,w))return!1}else I&&C!==void 0&&j.push(C);return j.length===1?j[0]:l(j)}function c(j,g,x,w,O,A){const C=x.length;if(C>0&&O!==!1)if(A)Object.assign(j,g);else for(let _=0;_<C;_++){const I=x[_];w.has(I)||(j[I]=v(g[I],O))}return j}const d=(j,{properties:g={},patternProperties:x,additionalProperties:w=!0},{properties:O={},patternProperties:A,additionalProperties:C=!0})=>{const _=Ye(w),I=Ye(C);if(_&&I)return Pt(j,"properties",S(g,O)),Pt(j,"patternProperties",x&&A?S(x,A):x??A),delete j.additionalProperties,j;const T=v(w,C);Pt(j,"additionalProperties",T);const F={},P=Object.keys(g),$=P.length,[k,M]=x?oa(x):aa,[U,Z]=A?oa(A):aa,le=[],me=new Set,be=I?void 0:C;for(let W=0;W<$;W++){const re=P[W];me.add(re);const oe=u(le,re,g[re],k,O[re],U,be);oe!==void 0&&(F[re]=oe)}const L=Object.keys(O),ce=L.length,te=_?void 0:w;for(let W=0;W<ce;W++){const re=L[W];if(me.has(re))continue;const oe=u(le,re,O[re],U,void 0,k,te);oe!==void 0&&(F[re]=oe)}Pt(j,"properties",F);let K={};const G=new Set;return M.length>0&&Z.length>0&&xi(M,Z,(W,re)=>{e(W,re)&&G.add(W),e(re,W)&&G.add(re),K[t(W,re)]=v(x[W],A[re])}),K=c(K,x,M,G,C,I),K=c(K,A,Z,G,w,_),Pt(j,"patternProperties",K),j},h=(j,{items:g=[],additionalItems:x},{items:w=[],additionalItems:O})=>{const A=Array.isArray(g),C=Array.isArray(w),_=[];if(j.items=_,A&&C){const[I,T,F]=g.length<w.length?[g.length,x,w]:[w.length,O,g];let P=0;for(;P<I;P++)_.push(v(g[P],w[P]));if(T===!1)j.additionalItems=!1;else{const $=T===void 0||Ye(T);for(;P<F.length;P++)_.push($?F[P]:v(F[P],T));Pt(j,"additionalItems",x!==void 0&&O!==void 0?v(x,O):x??O)}}else if(A||C){const[I,T,F]=A?[g,w,x]:[w,g,O];Pt(j,"additionalItems",F&&v(F,T));for(let P=0;P<I.length;P++)_.push(v(I[P],T))}else delete j.additionalItems,j.items=v(g,w);return j},y=(j,g,x)=>{ca(j,g);const w=ca({},x);return j.allOf===void 0?j.allOf=[w]:j.allOf=j.allOf.concat(w),j};function f(j,g){const x=[];if(xi(j,g,(w,O)=>{try{x.push(v(w,O))}catch{}}),x.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(j)}" and "${JSON.stringify(g)}"; the merged result is empty`);return r(x)}const p=O0([[E0,d],[A0,h],[C0,y],...s]),b=_0(o);function v(j,g){if(j===!1||g===!1)return!1;if(Ye(j))return Ye(g)?!0:g;if(Ye(g))return j;let x={...j};const w=new Set,O=new Set,A=Object.keys(g),C=A.length;for(let _=0;_<C;_++){const I=A[_],T=g[I];if(T===void 0)continue;const F=b.get(I);if(F!==void 0){const M=F.length;for(let U=0;U<M;U++){const Z=F[U];j[Z.oppositeKey]!==void 0&&O.add(Z.check)}}const P=j[I];if(P===void 0){x[I]=T;continue}const $=p.get(I);if($){w.add($);continue}const k=E[I]??i;x[I]=k(P,T)}for(const _ of w)x=_(x,j,g);for(const _ of O)_(x);return x}const S=sa(v),E={$id:i,$ref:i,$schema:i,$comment:i,$defs:S,definitions:S,type:(j,g)=>{if(j===g)return j;const x=Array.isArray(j),w=Array.isArray(g);if(!x&&!w){const O=Si(j,g);if(O!==void 0)return O}else if(x||w){const O=new Set;if(x&&w)xi(j,g,(C,_)=>{const I=Si(C,_);I!==void 0&&O.add(I)});else{const C=x?j:g,_=x?g:j,I=C.length;for(let T=0;T<I;T++){const F=Si(_,C[T]);F!==void 0&&O.add(F)}}const A=O.size;if(A===1)return O.values().next().value;if(A>1)return Array.from(O)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${j.toString()}, ${g.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(j,g)=>{const x=r([j,g]);return x.length===1?x[0]:{anyOf:x}},pattern:t,readOnly:vi,writeOnly:vi,enum:(j,g)=>{const x=n(j,g);if(x.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(j)}", "${JSON.stringify(g)}"`);return x},anyOf:f,oneOf:f,allOf:(j,g)=>r(j.concat(g)),propertyNames:v,contains:v,dependencies:sa((j,g)=>Array.isArray(j)?Array.isArray(g)?pi(j,g):v(g,{required:j}):Array.isArray(g)?v(j,{required:g}):v(j,g)),examples:(j,g)=>{if(!Array.isArray(j)||!Array.isArray(g))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(j)}" and "${JSON.stringify(g)}"`);return pi(j,g)},multipleOf:(j,g)=>{let x=1;for(;!Number.isInteger(j)||!Number.isInteger(g);)x*=10,j*=10,g*=10;return w0(j,g)/x},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:vi,required:pi,...a};return{mergeSchemaDefinitions:v,mergeArrayOfSchemaDefinitions:l}}function N0(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 P0(t){return e=>t(N0(e))}const{compareSchemaDefinitions:F0,compareSchemaValues:$0}=S0(),{mergeArrayOfSchemaDefinitions:D0}=T0({intersectJson:p0($0),deduplicateJsonSchemaDef:ic(F0)}),ac=P0(D0);function _e(t,e,n={},r,i,s=!1){return Ze(t,e,n,r,void 0,void 0,i,s)[0]}function R0(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],y=[];if(r)l&&typeof l!="boolean"&&(y=y.concat(Ze(t,l,n,s,r,i,o))),u&&typeof u!="boolean"&&(y=y.concat(Ze(t,u,n,s,r,i,o)));else{const f=d?l:u;f&&typeof f!="boolean"&&(y=y.concat(Ze(t,f,n,s,r,i,o)))}return y.length&&(h=y.map(f=>ct(c,f))),h.flatMap(f=>Ze(t,f,n,s,r,i,o))}function lc(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>Kl(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function cc(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ue(n,[r],t.patternProperties[r]),n),{})}function k0(t,e,n,r,i,s,o,a){const l=uc(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(gs in e)return fc(t,e,n,r,i,s,o).flatMap(c=>Ze(t,c,n,s,r,i,o));if(At in e&&Array.isArray(e[At])){const u=e.allOf.map(d=>Ze(t,d,n,s,r,i,o));return lc(u).map(d=>({...e,allOf:d}))}return[e]}function uc(t,e,n,r,i,s,o,a){const l=jt(e,n,i,void 0,a);return l!==e?Ze(t,l,n,s,r,i,o,a):[e]}function jt(t,e,n,r,i){if(!z(t))return t;let s=t,o=r;if(de in s){const{$ref:a,...l}=s;if(n.includes(a))return s;n.push(a),s={...er(a,e,o),...l,[qn]:a},fe in s&&(o=s[fe])}if(se in s){const a=[],l=e0(s[se],(u,c,d)=>{const h=[...n];u[d]=jt(c,e,h,o,i),a.push(h)},{});eb(n,tc(Gy(a))),s={...s,[se]:l}}if(cn in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:jt(s.items,e,n,o,i)}),i){let a,l;ee in t&&Array.isArray(t[ee])?(a=ee,l=s[ee]):H in t&&Array.isArray(t[H])&&(a=H,l=s[H]),a&&l&&(s={...s,[a]:l.map(u=>jt(u,e,n,o,i))})}return ie(t,s)?t:s}function M0(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&z(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(qi in s){const l=cc(s,a);if(!ye(l)){s.properties[a]=_e(t,{[At]:Object.values(l)},n,R(o,[a]),i),ue(s.properties,[a,at],!0);return}}if(rn in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?de in s.additionalProperties?l=_e(t,{[de]:R(s.additionalProperties,[de])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ee in s.additionalProperties||H in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:rr(R(o,[a]))}:l={type:rr(R(o,[a]))},s.properties[a]=l,ue(s.properties,[a,at],!0)}else s.properties[a]={type:"null"},ue(s.properties,[a,at],!0)}}),s}function U0(t){return ac(t)}function Ze(t,e,n,r,i=!1,s=[],o,a){return z(e)?k0(t,e,n,i,s,r,o,a).flatMap(u=>{var c;let d=u;if(ys in d)return R0(t,d,n,i,s,r,o);if(At in d){if(i){const{allOf:y,...f}=d;return[...y,f]}try{const y=[],f=[];(c=d.allOf)===null||c===void 0||c.forEach(p=>{typeof p=="object"&&p.contains?y.push(p):f.push(p)}),y.length&&(d={...d,allOf:f}),d=o?o(d):U0(d),y.length&&(d.allOf=y)}catch(y){console.warn(`could not merge subschemas in allOf:
|
|
2
2
|
`,y);const{allOf:f,...p}=d;return p}}return se in d&&qi in d&&(d=Object.keys(d.properties).reduce((y,f)=>{const p=cc(y,f);return ye(p)||(y.properties[f]=_e(t,{allOf:[y.properties[f],...Object.values(p)]},n,R(r,[f]),o)),y},{...d,properties:{...d.properties}})),qi in d||rn in d&&d.additionalProperties!==!1?M0(t,d,n,r,o):d}):[{}]}function L0(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=>jt(h,n,[]));const d=Ur(t,u,s,n,c);if(r){const h=dc(s,!1,n);return Ur(t,u,h,n,c),s.map(y=>ct(l,y))}return[ct(l,s[d])]}return[e]}function dc(t,e=!1,n){return t.map(r=>{if(!z(r))return r?{}:{not:{}};const i=e&&n?jt(r,n,[]):r;return i.additionalProperties===!1?{...i,additionalProperties:!0}:i})}function fc(t,e,n,r,i,s,o){const{dependencies:a,...l}=e;return L0(t,l,n,r,s).flatMap(c=>mc(t,a,c,n,r,i,s,o))}function mc(t,e,n,r,i,s,o,a){let l=[n];for(const u in e)if((i||R(o,[u])!==void 0)&&(!n.properties||u in n.properties)){const[c,d]=$s(u,e);return Array.isArray(d)?l[0]=B0(n,d):z(d)&&(l=V0(t,n,r,u,d,i,s,o,a)),l.flatMap(h=>mc(t,c,h,r,i,s,o,a))}return l}function B0(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 V0(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,y=ct(e,h);if(d===void 0)return y;const f=d.map(b=>typeof b=="boolean"||!(de in b)?[b]:uc(t,b,n,s,o,a));return lc(f).flatMap(b=>q0(t,y,n,r,b,s,o,a,l))})}function q0(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]=$s(r,d.properties),y={...d,properties:h};return Ze(t,y,n,a,s,o,l).map(p=>ct(e,p))})}function Un(t,e,n,r,i,s={},o){if(Array.isArray(n[i])){const l=He(n)||r,u=n[i].map(d=>_e(t,d,e,s,o)),c=R(s,l);if(c!==void 0)return u.find(d=>ie(R(d,[se,l,kt],R(d,[se,l,Ne])),c))}}function hc(t,e,n,r,i){let s=n;if(Q(n,de)&&(s=_e(t,n,e,void 0,i)),ye(r))return s;const o=Array.isArray(r)?[...r]:r.split("."),[a,...l]=o;if(a!==void 0&&a!==""&&Q(s,a))return s=R(s,a),hc(t,e,s,l,i)}function Ir(t,e,n,r,i,s){const o=hc(t,e,n,r,s);return o===void 0?i:o}const ua={title:"!@#$_UNKNOWN_$#@!"};function z0(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(y=>{a=Ir(t,e,a,[se,y],{},s),Q(a,H)?a=Un(t,e,a,u,H,R(i,y),s):Q(a,ee)&&(a=Un(t,e,a,u,ee,R(i,y),s))}),Q(a,H)?a=Un(t,e,a,u,H,i,s):Q(a,ee)&&(a=Un(t,e,a,u,ee,i,s));let c=Ir(t,e,a,[se,l],ua,s);c===ua&&(c=void 0);const d=Ir(t,e,a,ol,[],s);let h;return c&&Array.isArray(d)&&(h=d.includes(u)),{field:c,isRequired:h}}function W0(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 H0(t,e){return function(n,r){if(n==null)return n;if(!Ht(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 pc=H0(Gl);function K0(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function G0(t,e,n){var r=je(t)?W0:K0,i=arguments.length<3;return r(t,ks(e),n,i,pc)}const Y0={type:"object",$id:gm,properties:{__not_really_there__:{type:"number"}}};function es(t,e,n,r,i){let s=0;return n&&(ne(n.properties)?s+=G0(n.properties,(o,a,l)=>{const u=R(r,l);if(typeof a=="boolean")return o;if(Q(a,de)){const c=_e(t,a,e,u,i);return o+es(t,e,c,u||{},i)}if((Q(a,H)||Q(a,ee))&&u){const c=Q(a,H)?H:ee,d=He(a);return o+mn(t,e,u,R(a,c),-1,d,i)}if(a.type==="object"){const c=ne(u)?1:0;return o+c+es(t,e,a,u,i)}if(a.type===rr(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):It(n.type)&&n.type===rr(r)&&(s+=1)),s}function mn(t,e,n,r,i=-1,s,o){const a=r.map(h=>jt(h,e,[])),l=rc(n,r,s);if(nc(l))return l;const u=a.reduce((h,y,f)=>(Ur(t,n,[Y0,y],e,s)===1&&h.push(f),h),[]);if(u.length===1)return u[0];u.length||Kl(a.length,h=>u.push(h));const c=new Set,{bestIndex:d}=u.reduce((h,y)=>{const{bestScore:f}=h,p=a[y],b=es(t,e,p,n,o);return c.add(b),b>f?{bestIndex:y,bestScore:b}:h},{bestIndex:i,bestScore:0});return c.size===1&&i>=0?i:d}function gc(t){const e=t[Ne],n=Le(t);return z(e)&&It(e?.$data)&&n!=="object"&&n!=="array"}function yc(t){return Array.isArray(t.enum)&&t.enum.length===1||Ne in t}function Us(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>z(e))}function hn(t){return t==null}function ir(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?ir(s[c],e[c],n,r,i):u);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(z(e)){const s=Object.assign({},t);return Object.keys(e).reduce((o,a)=>{var l;const u=R(e,a),c=z(t)&&a in t,d=a in e,h=(l=R(t,a))!==null&&l!==void 0?l:{},y=c&&z(h)&&Object.values(h).some(b=>z(b)),f=c&&z(R(t,a)),p=d&&z(u);return f&&p&&!y?(o[a]={...R(t,a),...u},o):(o[a]=ir(R(t,a),u,n,r,i&&(c||!d)),s)},s)}return r&&(t!==void 0&&hn(e)||typeof e=="number"&&Number.isNaN(e))||i&&!hn(e)?t:e}function Bt(t,e,n=!1){return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];if(t&&i in t&&z(o))r[i]=Bt(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 J0(t){if(pm 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 Z0(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 pn(t,e){if(t.enum){let s,o;if(e){const{enumNames:l,enumOrder:u}=V(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=Z0(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}=V(e);i=s}return n&&n.map((s,o)=>{const{title:a}=V(r?.[o]),l=s;let u,c=a;if(i){const d=R(l,[se,i],{});u=R(d,kt,R(d,Ne)),c=c||d?.title||l.title||String(u)}else u=J0(l),c=c||l.title||String(u);return{schema:l,label:c,value:u}})}function Xr(t,e,n={},r){const i=_e(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"&&yc(o)):!1}function Ls(t,e,n,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:Xr(t,e.items,n,r)}const X0=["string","number","integer","boolean","null"];var gn;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(gn||(gn={}));function wi(t,e=gn.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!==gn.Ignore&&z(t.additionalItems)?t.additionalItems:{}}function bc(t,e){const{default:n,type:r}=t;return Array.isArray(r)&&r.includes("null")&&ye(e)&&n===null?null:e}function da(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||!z(n)||!ye(n))&&(t[e]=n);else if(u!=="skipDefaults"){const c=i===void 0?s.includes(e):i;z(n)?u==="skipEmptyDefaults"?ye(n)||(t[e]=n):(!ye(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 Ot(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 y=z(i)?i:{};const f=z(e)?e:{};let p=r,b=null,v=l,S=a;if(f[Ne]!==void 0&&l?.constAsDefaults!=="never"&&!gc(f))p=f[Ne];else if(z(p)&&z(f.default)&&!f[ee]&&!f[H]&&!f[de])p=Bt(p,f.default);else if(kt in f&&!f[ee]&&!f[H]&&!f[de])p=f.default;else if(de in f){const g=f[de];a.includes(g)||(S=a.concat(g),b=er(g,s));const x=i===void 0||z(i)&&ye(i);b&&!p&&x&&(p=f.default),d&&b&&!z(i)&&(y=i)}else if(gs in f){const g={...fa(t,f,n,p),...y};[b]=fc(t,f,s,!1,[],g,u)}else if(Us(f))p=f.items.map((g,x)=>Ot(t,g,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,parentDefaults:Array.isArray(r)?r[x]:void 0,rawFormData:y,required:c,shouldMergeDefaultsIntoFormData:d}));else if(H in f){const{oneOf:g,...x}=f;if(g.length===0)return;const w=He(f),{type:O="null"}=x;!Array.isArray(O)&&X0.includes(O)&&v?.constAsDefaults==="skipOneOf"&&(v={...v,constAsDefaults:"never"}),b=g[mn(t,s,i??f.default,g,0,w,u)],b=ct(x,b)}else if(ee in f){const{anyOf:g,...x}=f;if(g.length===0)return;const w=He(f);b=g[mn(t,s,i??f.default,g,0,w,u)],b=ct(x,b)}if(b)return Ot(t,b,{rootSchema:s,includeUndefinedValues:o,_recurseList:S,experimental_defaultFormStateBehavior:v,experimental_customMergeAllOf:u,parentDefaults:p,rawFormData:i??y,required:c,shouldMergeDefaultsIntoFormData:d,initialDefaultsGenerated:h});p===void 0&&(p=f.default);const E=fa(t,f,n,p);let j=E??p;if(d){const{arrayMinItems:g={}}=l||{},{mergeExtraDefaults:x}=g,w=Q0(t,f,s,i,l,u);(!z(i)||At in f)&&(j=ir(j,w,x,!0))}return j}function Q0(t,e,n,r,i,s){const o=!yc(e)&&Xr(t,e,n,s);let a=r;if(o){const u=pn(e);a=u?.some(d=>ie(d.value,r))?r:void 0}return e[Ne]&&i?.constAsDefaults==="always"&&(a=e.const),a}function ex(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=z(n)?n:{},y=e,p=o?.allOf==="populateDefaults"&&At in y||o?.emptyObjectFields!=="skipEmptyDefaults"&&ys in y?_e(t,y,r,h,a):y,b=p[Ne],v=Object.keys(p.properties||{}).reduce((S,E)=>{var j;const g=R(p,[se,E],{}),x=z(b)&&b[E]!==void 0,w=(z(g)&&Ne in g||x)&&o?.constAsDefaults!=="never"&&!gc(g),O=Ot(t,g,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:R(d,[E]),rawFormData:R(h,[E]),required:(j=p.required)===null||j===void 0?void 0:j.includes(E),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c});return da(S,E,O,i,l,p.required,o,w,g?.type==="null"),S},{});if(p.additionalProperties&&!c){const S=z(p.additionalProperties)?p.additionalProperties:{},E=new Set,j=[];Object.keys(h).filter(g=>!p.properties||!p.properties[g]).forEach(g=>{E.add(g),j.push(g)}),z(d)&&j.length===0&&Object.keys(d).filter(g=>!p.properties||!p.properties[g]).forEach(g=>E.add(g)),E.forEach(g=>{var x;const w=Ot(t,S,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:R(d,[g]),rawFormData:R(h,[g]),required:(x=p.required)===null||x===void 0?void 0:x.includes(g),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c});da(v,g,w,i,l,j)})}return bc(e,v)}}function tx(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,y;let f=d;const p=e,b=(h=s?.arrayMinItems)!==null&&h!==void 0?h:{},{populate:v,mergeExtraDefaults:S}=b,E=v==="never",j=v==="requiredOnly",g=v==="all"||!E&&!j,x=(y=b?.computeSkipPopulate)!==null&&y!==void 0?y:(()=>!1),O=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(f)&&(f=f.map((_,I)=>{const T=wi(p,gn.Fallback,I),F=Array.isArray(n)?n[I]:void 0;return Ot(t,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:_,rawFormData:F,required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c})})),Array.isArray(n)){const _=wi(p);if(E)f=n;else{const I=n.map((F,P)=>Ot(t,_,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:F,parentDefaults:R(f,[P]),required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:c}));f=ir(f,I,(j&&a||g)&&S)}}if(E)return f??O;if(j&&!a)return f||void 0;let A;const C=Array.isArray(f)?f.length:0;if(!p.minItems||Ls(t,p,r,o)||x(t,p,r)||p.minItems<=C)A=f||!a&&!l?f:O;else{const _=f||[],I=wi(p,gn.Invert),T=I.default,F=Array.from({length:p.minItems-C},()=>Ot(t,I,{parentDefaults:T,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:u}));A=_.concat(F)}return bc(e,A)}function fa(t,e,n={},r){switch(Le(e)){case"object":return ex(t,e,n,r);case"array":return tx(t,e,n,r);default:return}}function xc(t,e,n,r,i=!1,s,o,a){if(!z(e))throw new Error(`Invalid schema: ${e}`);const l=_e(t,e,r,n,o),u=Ot(t,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&z(l.default))return{...u,...n};if(z(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:c}=s||{};return ir(u,n,!0,c==="useDefaultIfFormDataUndefined",!0)}return u}function vc(t={}){return"widget"in V(t)&&V(t).widget!=="hidden"}function Sc(t,e,n={},r,i){if(n[xs]==="files")return!0;if(e.items){const s=_e(t,e.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function nx(t,e,n={},r,i,s){const o=V(n,i),{label:a=!0}=o;let l=!!a;if(l){const u=Le(e),c=R(e,at,!1);u==="array"&&(l=c||Ls(t,e,r,s)||Sc(t,e,n,r,s)||vc(n)),u==="object"&&(l=c),u==="boolean"&&n&&!n[xs]&&(l=!1),n&&n[xm]&&(l=!1)}return l}function wc(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=Wr(t,o);n(a,o)&&Ds(s,vn(o,t),a)}return s}function rx(t,e){return wc(t,e,function(n,r){return Xl(t,r)})}var Bs=Ll(function(t,e){return t==null?{}:rx(t,e)});function ix(t,e){if(e.length===0&&typeof t!="object")return t;const n=Bs(t,e);return Array.isArray(t)?Object.keys(n).map(r=>n[r]):n}function sx(t,e){const n=(i,s)=>typeof i!="object"||ye(i)||s&&!ye(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[bs]&&u[Er]!==""?s.push(u[Er]):r(u,s,c)}else l===Er&&u!==""&&o.forEach(c=>{const d=R(e,c),h=a.length===1;(n(d,h)||Array.isArray(d)&&d.every(y=>n(y,h)))&&s.push(c)})}),s};return r(t)}function Hn(t){return hn(t)||t===""?!0:Array.isArray(t)?t.length===0:z(t)?Object.values(t).every(Hn):!1}function ox(t,e){return e?e(t):ac(t)}function ax(t,e,n={},r,i){function s(f){return z(f)}function o(f){return z(f)}function a(f,p,b){var v;const{properties:S,additionalProperties:E,patternProperties:j,propertyNames:g}=f,x=new Set((v=f.required)!==null&&v!==void 0?v:[]);function w(A,C,_,I=!1){var T;const F=y(C,_,b[A]);if(!I&&z(F)){let P=o(C)?C:{};P.$ref!==void 0&&(P=er(P.$ref,n));const $=new Set((T=P.required)!==null&&T!==void 0?T:[]);if(Object.entries(F).every(([M,U])=>!$.has(M)&&Hn(U)))return}F!==void 0&&(b[A]=F)}if(S!==void 0)for(const[A,C]of Object.entries(S))w(A,C,p[A],x.has(A));let O;if(j!==void 0){O=[];const A=Object.entries(j).map(([_,I])=>[new RegExp(_),I]),C=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))if(!C.has(_)){const T=A.find(([F])=>F.test(_));T===void 0?O.push(_):w(_,T[1],I)}}if(E!==void 0&&E!==!1){const A=E;if(O!==void 0)for(const C of O)w(C,A,p[C]);else{const C=new Set(Object.keys(S??{}));for(const[_,I]of Object.entries(p))C.has(_)||w(_,A,I)}}if(g!==void 0)for(const[A,C]of Object.entries(p))b[A]=C;return b}function l(f,p,b){const{items:v,additionalItems:S}=f;if(v!==void 0)if(Array.isArray(v))for(let E=0;E<v.length;E+=1)b.push(y(v[E],p[E]));else for(let E=0;E<p.length;E+=1)b.push(y(v,p[E]));if(S)for(let E=b.length;E<p.length;E+=1)b.push(y(S,p[E]));return b}function u(f,p,b){const{if:v,then:S,else:E}=f;if(v===void 0)return b;const g=(o(v)?t.isValid(v,p,n):v)?S:E;return g===void 0?b:y(g,p,b)}function c(f,p,b,v){if(!Array.isArray(f)||Xr(t,p,n,i))return v;const S=dc(f,!0,n),E=mn(t,n,b,S,0,He(p),i),j=f[E],g=z(j)?jt(j,n,[]):S[E];return y(g,b,v)}function d(f,p,b){const{anyOf:v}=f;if(!Array.isArray(v))return b;if(p===void 0||Array.isArray(p)&&p.length===0||z(p)&&Object.keys(p).length===0){let S=b;for(const E of v)S=y(E,p,S);return S}return c(v,f,p,b)}function h(f,p,b){const{dependencies:v}=f;if(v===void 0||!s(p))return b;let S=b;for(const[E,j]of Object.entries(v))E in p&&!Array.isArray(j)&&(S=y(j,p,S));return S}function y(f,p,b){if(p===void 0||f===!1)return;if(f===!0||ye(f))return p;let v=f;const{$ref:S,allOf:E}=v;if(S!==void 0)return y(er(S,n),p,b);E&&(v=ox(v,i));let j=d(v,p,c(v.oneOf,v,p,b));const g=Le(v);if(g==="object"){if(!s(p))return;j=a(v,p,s(j)?j:{})}else if(g==="array"){if(!Array.isArray(p))return;j=l(v,p,Array.isArray(j)?j:[])}else j===void 0&&(j=p);return h(v,p,u(v,p,j))}return y(e,r)}const De=Symbol("no Value");function jc(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 lx(t,e){const n=jc(t);if(!n||n.some(i=>ie(i,e)))return De;const r=R(t,kt,De);return r!==De&&n.some(i=>ie(i,r))?r:n.length===1?n[0]:void 0}function ts(t,e,n,r,i={},s){let o;if(Q(n,se)){const a={};if(Q(r,se)){const c=R(r,se,{});Object.keys(c).forEach(d=>{Q(i,d)&&(a[d]=void 0)})}const l=Object.keys(R(n,se,{})),u={};l.forEach(c=>{const d=R(i,c);let h=R(r,[se,c],{}),y=R(n,[se,c],{});Q(h,de)&&(h=_e(t,h,e,d,s)),Q(y,de)&&(y=_e(t,y,e,d,s));const f=R(h,"type"),p=R(y,"type");if(!f||f===p)if(Q(a,c)&&delete a[c],p==="object"||p==="array"&&Array.isArray(d)){const b=ts(t,e,y,h,d,s);(b!==void 0||p==="array")&&(u[c]=b)}else{const b=R(y,kt,De),v=R(h,kt,De);b!==De&&b!==d&&(v===d?a[c]=b:R(y,"readOnly")===!0&&(a[c]=void 0));const S=R(y,Ne,De),E=R(h,Ne,De);if(S!==De&&S!==d&&(a[c]=E===d?S:void 0),Q(i,c)){const j=lx(y,d);j!==De&&(a[c]=j)}}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...u}}else if(R(r,"type")==="array"&&R(n,"type")==="array"&&Array.isArray(i)){let a=R(r,"items"),l=R(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){Q(a,de)&&(a=_e(t,a,e,i,s)),Q(l,de)&&(l=_e(t,l,e,i,s));const u=R(a,"type"),c=R(l,"type");if(!u||u===c){const d=R(n,"maxItems",-1);if(c==="object")o=i.reduce((h,y)=>{const f=ts(t,e,l,a,y,s);return f!==void 0&&(d<0||h.length<d)&&h.push(f),h},[]);else{const h=jc(l),y=h?i.filter(f=>h.some(p=>ie(p,f))):i;o=d>0&&y.length>d?y.slice(0,d):y}}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}function bt(t,e,n,r,i,s=[],o){if(de in e||gs in e||At in e||ys in e){const l=_e(t,e,r,i,o);if(s.findIndex(c=>ie(c,l))===-1)return bt(t,l,n,r,i,s.concat(l),o)}let a={[Er]:n.replace(/^\./,"")};if(H in e||ee in e){const l=H in e?e.oneOf:e.anyOf,u=He(e),c=mn(t,r,i,l,0,u,o),d=l[c];a={...a,...bt(t,d,n,r,i,s,o)}}if(rn in e&&e[rn]!==!1){ue(a,bs,!0);const l=ne(e[rn])?e[rn]:{},u=R(e,se,{});for(const c of Object.keys(i??{}))c in u||(a[c]=bt(t,l,`${n}.${c}`,r,R(i,[c]),s,o))}if(cn in e&&Array.isArray(i)){const{items:l,additionalItems:u}=e;Array.isArray(l)?i.forEach((c,d)=>{l[d]?a[d]=bt(t,l[d],`${n}.${d}`,r,c,s,o):u?a[d]=bt(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]=bt(t,l,`${n}.${d}`,r,c,s,o)})}else if(se in e)for(const l in e.properties){const u=R(e,[se,l],{});a[l]=bt(t,u,`${n}.${l}`,r,R(i,[l]),s,o)}return a}function cx(t,e,n="",r,i,s){return bt(t,e,n,r,i,void 0,s)}class ux{constructor(e,n,r,i){n&&n[kn]===Ar?this.rootSchema=Zi(n,R(n,fe,"#")):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 z0(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,n,r,i){return Un(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(e,n,r=!1,i){return xc(this.validator,e,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(e,n,r){return nx(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,n,r,i){return mn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,n,r){return Ur(this.validator,e,n,this.rootSchema,r)}getFromSchema(e,n,r){return Ir(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}isFilesArray(e,n){return Sc(this.validator,e,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return Ls(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return Xr(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,n){return ax(this.validator,e,this.rootSchema,n)}retrieveSchema(e,n,r){return _e(this.validator,e,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(e,n,r){return ts(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}toPathSchema(e,n,r){return cx(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function dx(t,e,n={},r){return new ux(t,e,n,r)}function fx(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 y=0;y<c.length;y+=1)d[y]=c.charCodeAt(y);return{blob:new window.Blob([new Uint8Array(d)],{type:l}),name:u}}catch(c){throw new Error(`File is invalid: ${c.message}`)}}function xt(t,e){let n=String(t);for(;n.length<e;)n=`0${n}`;return n}function Oc(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 Oc(e,t).reverse();const a=[];for(let l=s;l<=o;l+=1)a.push({value:l,label:xt(l,2)});return a}function mx(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 hx(t,e){return mx(t,e)}function Qr(t,e=[],n){if(Array.isArray(t))return t.map(s=>Qr(s,e)).filter(s=>s!==void 0);const r=t===""||t===null?-1:Number(t),i=e[r];return i?i.value:n}function Ec(t,e,n=[]){const r=Qr(t,n);return Array.isArray(e)?e.filter(i=>!ie(i,r)):ie(r,e)?void 0:e}function fr(t,e){return Array.isArray(e)?e.some(n=>ie(n,t)):ie(e,t)}function px(t,e=[],n=!1){const r=e.map((i,s)=>fr(i.value,t)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function Ac(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=px(t,e,n);return typeof o>"u"?i:o}function Cc(t,e,n=[]){const r=Qr(t,n);if(!hn(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 ma(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"?Qr(t,e,r):Array.isArray(t)?t.map(i=>ma(i,e,r)):ma(t,e,r)}function mr(t,e,n="indexed"){return n!=="realValue"?String(e):hn(t)?"":String(typeof t=="object"?e:t)}var gx=1,yx=4;function Vs(t){return Wn(t,gx|yx)}function bx(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:Ds(t,e,n,r)}class _c{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"?R(this.errorSchema,e):this.errorSchema;return!r&&e&&(r={},bx(this.errorSchema,e,r,Object)),r}resetAllErrors(e){return this.errorSchema=e?Vs(e):{},this}addErrors(e,n){const r=this.getOrCreateErrorBlock(n);let i=R(r,Ce);return Array.isArray(i)||(i=[],r[Ce]=i),Array.isArray(e)?ue(r,Ce,[...new Set([...i,...e])]):ue(r,Ce,[...new Set([...i,e])]),this}setErrors(e,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(e)?[...new Set([...e])]:[e];return ue(r,Ce,i),this}clearErrors(e){const n=this.getOrCreateErrorBlock(e);return ue(n,Ce,[]),this}}var xx=200;function vx(t,e,n,r){var i=-1,s=Ms,o=!0,a=t.length,l=[],u=e.length;if(!a)return l;e.length>=xx&&(s=nr,o=!1,e=new Lt(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 Sx=Yr(function(t,e){return tr(t)?vx(t,dr(e,1,tr,!0)):[]});function wx(t,e){if(t==null)return{};var n=xn(Ps(t),function(r){return[r]});return e=ks(e),wc(t,n,function(r,i){return e(r,i[0])})}function ha(t,e){const n=Ct(t),r=Ct(e);if(t===e||!n&&!r)return[];if(n&&!r)return ze(t);if(!n&&r)return ze(e);const i=ze(wx(t,(o,a)=>!ie(o,R(e,a)))),s=Sx(ze(e),ze(t));return[...i,...s]}function jx(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},y=[];switch(r){case"MDY":y.push(d,c,h);break;case"DMY":y.push(c,d,h);break;default:y.push(h,d,c)}return e&&y.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:u}),y}function Ic(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 Tc(t,e,n={},r=!0){const i={type:e||"text",...Ic(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 wn(t){var e;return(e=t?.optionValueFormat)!==null&&e!==void 0?e:"indexed"}const pa={props:{disabled:!1},submitText:"Submit",norender:!1};function Nc(t={}){const e=V(t);if(e&&e[$r]){const n=e[$r];return{...pa,...n}}return pa}function q(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 Ox=0;function Pc(t){var e=++Ox;return ws(t)+e}function qs(){if(R(globalThis,"process.env.NODE_ENV")!=="test")return{};const t=new Map;return new Proxy({},{get(e,n){return t.has(n)||t.set(n,Pc("test-id-")),t.get(n)}})}const ji={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 Ex(t){let e=R(t,"MergedWidget");if(!e){const n=t.defaultProps&&t.defaultProps.options||{};e=({options:r,...i})=>m.jsx(t,{options:{...n,...r},...i}),ue(t,"MergedWidget",e)}return e}function tt(t,e,n={}){const r=Le(t);if(typeof e=="function"||e&&ao.isForwardRef(N.createElement(e))||ao.isMemo(e))return Ex(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 ji))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(t)}`);if(e in ji[r]){const i=n[ji[r][e]];return tt(t,i,n)}}throw new Error(`No widget '${e}' for type '${r}' in schema: ${JSON.stringify(t)}`)}function Ax(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 Cx(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 Ax(Cx(t))}function _x(t){return Xe(t)}function Ix(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 Kt(t,e){return`${It(t)?t:t[fe]}__${e}`}function Gt(t){return Kt(t,"description")}function zs(t){return Kt(t,"error")}function ei(t){return Kt(t,"examples")}function Ws(t){return Kt(t,"help")}function ti(t){return Kt(t,"title")}function Fe(t,e=!1){const n=e?` ${ei(t)}`:"";return`${zs(t)} ${Gt(t)} ${Ws(t)}${n}`}function Dt(t,e){return`${t}-${e}`}function Qe(t,e){return Kt(t,e)}function Oi(t,e){return Kt(t,`optional${e}`)}function jn(t){return!hn(t)&&(!ne(t)||Array.isArray(t)||!ye(t))}function Tx(t,e){const{rootSchema:n,schemaUtils:r}=t;if(ie(e,n))return!0;if(de in n){const i=r.retrieveSchema(n);return ie(e,fn(i,qn))}return!1}function Fc(t,e,n){return e?n:t}function Nx(t){return t?new Date(t).toJSON():void 0}function Hs(t,e,n){const r=[bm];return Q(t,po)&&r.unshift(po),R(t,[...r,e],n)}function Px(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 Ei(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 on(t,e,n,r){if(!z(e))return r;const i=_e(t,e,n,r);if(Array.isArray(r)){const c=i.items;if(!c)return r;let d=!1;const h=r.map((y,f)=>{let p=c;Array.isArray(c)&&(p=c[f]||i.additionalItems||{});const b=on(t,p,n,y);return b!==y&&(d=!0),b===void 0?{}:b});return d?h:r}const{properties:s,required:o=[]}=i;if(!z(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]||{},y=o.includes(c),f=z(d),p=Array.isArray(d);if((f||p)&&s[c]){const b=on(t,h,n,d);(y||!Hn(b))&&(a[c]=b,u=!0)}else(y||!Hn(d)||!s[c])&&(a[c]=d,Hn(d)||(u=!0))}if(!(!u&&Object.keys(a).length===0))return a}function Fx(t,e,n){var r,i;const s=(r=t[qn])!==null&&r!==void 0?r:t[de],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!e||ye(e)?l={...a}:l=Bt(a,e):l=e||{},o){let u=t;if(s&&t[de]&&!t[qn])try{u=er(s,n.rootSchema)}catch(c){return console.warn(`could not resolve $ref in resolveUiSchema:
|
|
3
3
|
`,c),l}for(const c of[H,ee]){const d=u[c];if(Array.isArray(d)&&d.length>0){const h=l[c],y=Array.isArray(h)?[...h]:[];let f=!1;for(let p=0;p<d.length;p++){const b=d[p],v=(i=b?.[qn])!==null&&i!==void 0?i:b?.[de];if(v&&v in o){const S=y[p]||{};y[p]=Bt(o[v],S),f=!0}}f&&(l[c]=y)}}}return l}function Kn(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return Kn(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return Kn(t.oneOf[0]);if(t.allOf){const e=n=>Kn(n);return t.allOf.some(e)}return!1}function ga(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 $c(t,e,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=t;return!ga(o,e)||!ga(a,n)}const{props:i,state:s}=t;return!ie(i,e)||!ie(s,n)}function ya(t){const e=tc(t.map(n=>ne(n)?Le(n):void 0).flat().filter(n=>n!==void 0));return e.length===1?e[0]:e}function hr(t,e,n,r){const{enableOptionalDataFieldForType:i=[]}=V(r,t.globalUiOptions);let s;return ee in e&&Array.isArray(e[ee])?s=ya(e[ee]):H in e&&Array.isArray(e[H])?s=ya(e[H]):s=Le(e),!Tx(t,e)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function ba(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 Ks(t,e=[]){if(!t)return[];let n=[];return Ce in t&&(n=n.concat(t[Ce].map(r=>{const i=`.${e.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(t).reduce((r,i)=>{if(i!==Ce){const s=t[i];if(Ct(s))return r.concat(Ks(s,[...e,i]))}return r},n)}function Dc(t){return je(t)?xn(t,_t):or(t)?[t]:Is(pl(ws(t)))}function $x(t){const e=new _c;return t.length&&t.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:Dc(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,[fe]:a,...l!==void 0&&{name:l}}}function Rc(t){return Object.keys(t).reduce((e,n)=>{if(n==="addError")return e;const r=t[n];return Ct(r)?{...e,[n]:Rc(r)}:{...e,[n]:r}},{})}function Dx(t){return Object.values(t).every(e=>e!==-1)}function Rx(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:y}=t,f=`${o}_${n}`,{SelectWidget:p}=d.widgets,b=N.useCallback(v=>s(n,v),[s,n]);return m.jsx(p,{schema:{type:"integer"},id:f,name:a,className:e,options:{enumOptions:Oc(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:u,autofocus:c,onChange:b,onBlur:h,onFocus:y,registry:d,label:"","aria-describedby":Fe(o)})}function kx(t){const{time:e=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=t,[a,l]=N.useState(Ei(o,e));N.useEffect(()=>{l(Ei(o,e))},[e,o]);const u=N.useCallback((y,f)=>{const p={...a,[y]:typeof f>"u"?-1:f};Dx(p)?s(ba(p,e)):l(p)},[a,s,e]),c=N.useCallback(y=>{y.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),d=N.useCallback(y=>{if(y.preventDefault(),n||r)return;const f=Ei(new Date().toJSON(),e);s(ba(f,e))},[n,r,e,s]);return{elements:N.useMemo(()=>jx(a,e,i.yearsRange,i.format),[a,e,i.yearsRange,i.format]),handleChange:u,handleClear:c,handleSetNow:d}}function Yt(t){const e=N.useRef(t);return ie(t,e.current)||(e.current=t),e.current}function Mx(t,e){return t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function Ux(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:Mx(a.target.result,e),name:e,size:n,type:r}):i({dataURL:null,name:e,size:n,type:r})},o.readAsDataURL(t)})}function Lx(t){return Promise.all(Array.from(t).map(Ux))}function xa(t){return t.reduce((e,n)=>{if(!n)return e;try{const{blob:r,name:i}=fx(n);return[...e,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return e}},[])}function Bx(t,e,n=!1){const r=N.useMemo(()=>n&&t?Array.isArray(t)?t:[t]:[],[t,n]),i=N.useMemo(()=>Array.isArray(t)?xa(t):xa([t||""]),[t]),s=N.useCallback(async a=>{const u=(await Lx(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 Vx(t){if(!t)return"";const e=new Date(t),n=xt(e.getFullYear(),4),r=xt(e.getMonth()+1,2),i=xt(e.getDate(),2),s=xt(e.getHours(),2),o=xt(e.getMinutes(),2),a=xt(e.getSeconds(),2),l=xt(e.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Ln(t,e,n=!1){if(!e)return t;const{errors:r,errorSchema:i}=t;let s=Ks(e),o=e;return ye(i)||(o=Bt(i,e,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function qx(t){const e=t;for(const n in e)if(Object.hasOwn(e,n)){const r=e[n];n===de&&typeof r=="string"&&r.startsWith("#")?e[n]=cl+r:e[n]=Gs(r)}return t}function zx(t){return t.map(e=>Gs(e))}function Gs(t){return Array.isArray(t)?zx([...t]):ne(t)?qx({...t}):t}var Y;(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)"})(Y||(Y={}));function Wx(t,e){var n=je(t)?As:pc;return n(t,Wl(e))}function Hx(t,e){return t==null?!0:kl(t,e)}function ns(){return Pc("rjsf-array-item-")}function va(t){return Array.isArray(t)?t.map(e=>({key:ns(),item:e})):[]}function kc(t){return Array.isArray(t)?t.map(e=>e.item):[]}function Kx(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}function Mc(t,e,n,r){let{addable:i}=V(r,t.globalUiOptions);return i!==!1&&(e.maxItems!==void 0?i=n.length<e.maxItems:i=!0),i}function Uc(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 Gx(t,e){const{schemaUtils:n,globalFormOptions:r}=t;let i=e.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:Us(e)&&hm(e)&&(i=e.additionalItems),n.getDefaultFormState(i)}function Yx(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:y,name:f,onSelectChange:p}=t,{widgets:b,schemaUtils:v,globalFormOptions:S,globalUiOptions:E}=h,j=v.retrieveSchema(e.items,i),g=r?.items??r,x=pn(j,g),{widget:w="select",title:O,...A}=V(r,E),C=tt(e,w,b),_=O??e.title??f,I=v.getDisplayLabel(e,r,E),T=Yt(Be("",S,n,!0));return m.jsx(C,{id:T[fe],name:f,multiple:!0,onChange:p,onBlur:c,onFocus:d,options:{...A,enumOptions:x},schema:e,uiSchema:r,registry:h,value:i,disabled:s,readonly:o,required:l,label:_,hideLabel:!I,placeholder:u,autofocus:a,rawErrors:y,htmlName:T.name})}function Jx(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:y,rawErrors:f,name:p,onSelectChange:b}=t,{widgets:v,schemaUtils:S,globalFormOptions:E,globalUiOptions:j}=y,{widget:g,title:x,...w}=V(r,j),O=tt(e,g,v),A=x??e.title??p,C=S.getDisplayLabel(e,r,j),_=Yt(Be("",E,n,!0));return m.jsx(O,{id:_[fe],name:p,multiple:!0,onChange:b,onBlur:c,onFocus:d,options:w,schema:e,uiSchema:r,registry:y,value:h,disabled:i,readonly:s,hideError:l,required:a,label:A,hideLabel:!C,placeholder:u,autofocus:o,rawErrors:f,htmlName:_.name})}function Zx(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:y,onSelectChange:f}=t,{widgets:p,schemaUtils:b,globalFormOptions:v,globalUiOptions:S}=d,{widget:E="files",title:j,...g}=V(n,S),x=tt(e,E,p),w=j??e.title??i,O=b.getDisplayLabel(e,n,S),A=Yt(Be("",v,r,!0));return m.jsx(x,{options:g,id:A[fe],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:y,label:w,hideLabel:!O,htmlName:A.name})}function Lc(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:y,itemSchema:f,itemData:p,itemUiSchema:b,itemFieldPathId:v,itemErrorSchema:S,autofocus:E,onBlur:j,onFocus:g,onChange:x,rawErrors:w,totalItems:O,title:A,handleAddItem:C,handleCopyItem:_,handleRemoveItem:I,handleReorderItems:T}=t,{schemaUtils:F,fields:{ArraySchemaField:P,SchemaField:$},globalUiOptions:k}=a,M=Yt(v),U=P||$,Z=q("ArrayFieldItemTemplate",a,l),le=F.getDisplayLabel(f,b,k),{description:me}=V(b),be=!!me||!!f.description,{orderable:L=!0,removable:ce=!0,copyable:te=!1}=l,K={moveUp:L&&h,moveDown:L&&y,copy:te&&c,remove:ce&&d,toolbar:!1};K.toolbar=Object.keys(K).some(Se=>K[Se]);const G=N.useCallback(Se=>{C(Se,n+1)},[C,n]),W=N.useCallback(Se=>{_(Se,n)},[_,n]),re=N.useCallback(Se=>{I(Se,n)},[I,n]),oe=N.useCallback(Se=>{T(Se,n,n-1)},[T,n]),Ee=N.useCallback(Se=>{T(Se,n,n+1)},[T,n]),Ae={children:m.jsx(U,{name:r,title:A,index:n,schema:f,uiSchema:b,formData:p,errorSchema:S,fieldPathId:M,required:Kx(f),onChange:x,onBlur:j,onFocus:g,registry:a,disabled:i,readonly:o,hideError:s,autofocus:E,rawErrors:w}),buttonsProps:{fieldPathId:M,disabled:i,readonly:o,canAdd:c,hasCopy:K.copy,hasMoveUp:K.moveUp,hasMoveDown:K.moveDown,hasRemove:K.remove,index:n,totalItems:O,onAddItem:G,onCopyItem:W,onRemoveItem:re,onMoveUpItem:oe,onMoveDownItem:Ee,registry:a,schema:f,uiSchema:b},itemKey:e,className:"rjsf-array-item",disabled:i,hasToolbar:K.toolbar,index:n,totalItems:O,readonly:o,registry:a,schema:f,uiSchema:b,parentUiSchema:u,displayLabel:le,hasDescription:be};return m.jsx(Z,{...Ae})}function Xx(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:y,onBlur:f,onFocus:p,rawErrors:b,onChange:v,keyedFormData:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:g,handleReorderItems:x}=t,w=e.title||a||o,{schemaUtils:O,fields:A,formContext:C,globalFormOptions:_,globalUiOptions:I}=y,{OptionalDataControlsField:T}=A,F=V(n,I),P=ne(e.items)?e.items:{},$=O.retrieveSchema(P),k=kc(S),M=hr(y,e,d,n),U=jn(s),Z=Mc(y,e,k,n)&&(!M||U),le=U?S:[],me=M?" rjsf-optional-array-field":"",be=t.childFieldPathId??i,L=M?m.jsx(T,{...t,fieldPathId:be}):void 0,ce={canAdd:Z,items:le.map((K,G)=>{const{key:W,item:re}=K,oe=re,Ee=O.retrieveSchema(P,oe),Ae=r?r[G]:void 0,Se=Be(G,_,be),$e=Uc(n,re,G,C),pt={itemKey:W,index:G,name:o&&`${o}-${G}`,registry:y,uiOptions:F,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:d,title:w?`${w}-${G+1}`:void 0,canAdd:Z,canMoveUp:G>0,canMoveDown:G<k.length-1,itemSchema:Ee,itemFieldPathId:Se,itemErrorSchema:Ae,itemData:oe,itemUiSchema:$e,autofocus:c&&G===0,onBlur:f,onFocus:p,rawErrors:b,totalItems:S.length,handleAddItem:E,handleCopyItem:j,handleRemoveItem:g,handleReorderItems:x,onChange:v};return m.jsx(Lc,{...pt},W)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${$.type}${me}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:E,readonly:u,required:d,schema:e,title:w,formData:k,rawErrors:b,registry:y,optionalDataControl:L},te=q("ArrayFieldTemplate",y,F);return m.jsx(te,{...ce})}function Qx(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:y,onBlur:f,onFocus:p,rawErrors:b,keyedFormData:v,onChange:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:g,handleReorderItems:x}=t;let{formData:w=[]}=t;const O=e.title||a||o,{schemaUtils:A,fields:C,formContext:_,globalFormOptions:I,globalUiOptions:T}=y,F=V(n,T),{OptionalDataControlsField:P}=C,$=hr(y,e,d,n),k=jn(r),U=(ne(e.items)?e.items:[]).map((G,W)=>A.retrieveSchema(G,w[W])),Z=ne(e.additionalItems)?A.retrieveSchema(e.additionalItems,r):null,le=t.childFieldPathId??s;w.length<U.length&&(w=w.concat(new Array(U.length-w.length)));const me=k?v:[],be=$?" rjsf-optional-array-field":"",L=$?m.jsx(P,{...t,fieldPathId:le}):void 0,ce=Mc(y,e,w,n)&&!!Z&&(!$||k),te={canAdd:ce,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${be}`,disabled:l,fieldPathId:s,formData:r,items:me.map((G,W)=>{const{key:re,item:oe}=G,Ee=oe,Ae=W>=U.length,Se=(Ae&&ne(e.additionalItems)?A.retrieveSchema(e.additionalItems,Ee):U[W])||{},$e=Be(W,I,le);let pt;Ae?pt=n.additionalItems:Array.isArray(n.items)?pt=n.items[W]:pt=Uc(n,oe,W,_);const An=i?i[W]:void 0,Cn={index:W,itemKey:re,name:o&&`${o}-${W}`,registry:y,uiOptions:F,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:d,title:O?`${O}-${W+1}`:void 0,canAdd:ce,canRemove:Ae,canMoveUp:W>=U.length+1,canMoveDown:Ae&&W<w.length-1,itemSchema:Se,itemData:Ee,itemUiSchema:pt,itemFieldPathId:$e,itemErrorSchema:An,autofocus:c&&W===0,onBlur:f,onFocus:p,rawErrors:b,totalItems:v.length,onChange:S,handleAddItem:E,handleCopyItem:j,handleRemoveItem:g,handleReorderItems:x};return m.jsx(Lc,{...Cn},re)}),onAddClick:E,readonly:u,required:d,registry:y,schema:e,uiSchema:n,title:O,errorSchema:i,rawErrors:b,optionalDataControl:L},K=q("ArrayFieldTemplate",y,F);return m.jsx(K,{...te})}function ev(t=[]){const e=N.useMemo(()=>Xe(t),[t]),[n,r]=N.useState(()=>({formDataHash:e,keyedFormData:va(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]})):va(a),s=e,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=kc(a),u=Xe(l);return r({formDataHash:u,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function tv(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}=ev(o),y=t.childFieldPathId??i,f=N.useCallback((x,w)=>{x&&x.preventDefault();let O;if(r){O={};for(const _ in r){const I=parseInt(_);w===void 0||I<w?ue(O,[I],r[_]):I>=w&&ue(O,[I+1],r[_])}}const A={key:ns(),item:Gx(s,e)},C=[...d];w!==void 0?C.splice(w,0,A):C.push(A),a(h(C),y.path,O)},[d,s,e,a,h,r,y]),p=N.useCallback((x,w)=>{x&&x.preventDefault();let O;if(r){O={};for(const _ in r){const I=parseInt(_);I<=w?ue(O,[I],r[_]):I>w&&ue(O,[I+1],r[_])}}const A={key:ns(),item:Vs(d[w].item)},C=[...d];w!==void 0?C.splice(w+1,0,A):C.push(A),a(h(C),y.path,O)},[d,a,h,r,y]),b=N.useCallback((x,w)=>{x&&x.preventDefault();let O;if(r){O={};for(const C in r){const _=parseInt(C);_<w?ue(O,[_],r[C]):_>w&&ue(O,[_-1],r[C])}}const A=d.filter((C,_)=>_!==w);a(h(A),y.path,O)},[d,a,h,r,y]),v=N.useCallback((x,w,O)=>{x&&(x.preventDefault(),x.currentTarget.blur());let A;if(r){A={};for(const I in r){const T=parseInt(I);T==w?ue(A,[O],r[w]):T==O?ue(A,[w],r[O]):ue(A,[I],r[T])}}function C(){const I=d.slice();return I.splice(w,1),I.splice(O,0,d[w]),I}const _=C();a(h(_),y.path,A)},[d,a,h,r,y]),S=N.useCallback((x,w,O,A)=>{a(x===void 0?null:x,w,O,A)},[a]),E=N.useCallback(x=>{a(x,y.path,void 0,y?.[fe])},[a,y]),j={...t,formData:o,fieldPathId:y,onSelectChange:E},g={...t,handleAddItem:f,handleCopyItem:p,handleRemoveItem:b,handleReorderItems:v,keyedFormData:d,onChange:S};if(!(cn in e)){if(!l.useFallbackUiForUnsupportedType){const w=V(n),O=q("UnsupportedFieldTemplate",s,w);return m.jsx(O,{schema:e,fieldPathId:i,reason:c(Y.MissingItems),registry:s})}const x={...e,[cn]:{type:void 0}};j.schema=x,g.schema=x}return u.isMultiSelect(j.schema)?m.jsx(Yx,{...j}):vc(n)?m.jsx(Jx,{...j}):Us(j.schema)?m.jsx(Qx,{...g}):u.isFilesArray(j.schema,n)?m.jsx(Zx,{...j}):m.jsx(Xx,{...g})}function nv(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:y,onFocus:f,onBlur:p,rawErrors:b}=t,{title:v}=e,{widgets:S,translateString:E,globalUiOptions:j}=o,{widget:g="checkbox",title:x,label:w=!0,enumNames:O,...A}=V(r,j),C=tt(e,g,S),_=E(Y.YesLabel),I=E(Y.NoLabel);let T;const F=x??v??h??n;if(Array.isArray(e.oneOf))T=pn({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=pn({enum:$},r)}const P=N.useCallback(($,k,M)=>y($,i.path,k,M),[y,i]);return m.jsx(C,{options:{...A,enumOptions:T},schema:e,uiSchema:r,id:i.$id,name:n,onChange:P,onFocus:f,onBlur:p,label:F,hideLabel:!w,value:s,required:a,disabled:l,readonly:u,hideError:c,registry:o,autofocus:d,rawErrors:b,htmlName:i.name})}function rv(t){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:t}}function iv(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"?e:e==="object"?Array.isArray(t)?"array":"object":"string"}function sv(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 ov(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:y,onChange:f,errorSchema:p}=t,{translateString:b,fields:v,globalFormOptions:S}=h,[E,j]=N.useState(iv(n)),g=V(o),x=Yt(Be("__internal_type_selector",S,y)),w=b(Y.Type),O=N.useMemo(()=>rv(w),[w]),A=I=>{I!=null&&(j(I),f(sv(n,I),y.path,p,e))};if(!S.useFallbackUiForUnsupportedType){const{reason:I=b(Y.UnknownFieldType,[String(i.type)])}=t,T=q("UnsupportedFieldTemplate",h,g);return m.jsx(T,{schema:i,fieldPathId:y,reason:I,registry:h})}const C=q("FallbackFieldTemplate",h,g),{SchemaField:_}=v;return m.jsx(C,{schema:i,registry:h,typeSelector:m.jsx(_,{fieldPathId:x,name:`${s}__fallback_type`,schema:O,formData:E,onChange:A,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:b(Y.Value),...E==="object"&&{additionalProperties:!0}}})})}function av(t,e){return xn(e,function(n){return t[n]})}function lv(t){return t==null?[]:av(t,ze(t))}var cv=Math.max;function uv(t,e,n,r){t=Ht(t)?t:lv(t),n=n?Hl(n):0;var i=t.length;return n<0&&(n=cv(i+n,0)),It(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ql(t,e,n)>-1}var dv=Math.min;function fv(t,e,n){for(var r=Ms,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,u=[];o--;){var c=t[o];l=dv(c.length,l),a[o]=i>=120&&c.length>=120?new Lt(o&&c):void 0}c=t[0];var d=-1,h=a[0];e:for(;++d<i&&u.length<l;){var y=c[d],f=y;if(y=y!==0?y:0,!(h?nr(h,f):r(u,f))){for(o=s;--o;){var p=a[o];if(!(p?nr(p,f):r(t[o],f)))continue e}h&&h.push(f),u.push(y)}}return u}function mv(t){return tr(t)?t:[]}var Sa=Yr(function(t){var e=xn(t,mv);return e.length&&e[0]===t[0]?fv(e):[]});function Tr(t,e){return Jr(t,e)}function Bc(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 Gn;(function(t){t.ALL="all",t.SOME="some",t.NONE="none"})(Gn||(Gn={}));const hv=/^\$lookup=(.+)/,Ai="layoutGrid";function wa(t,e){return t??e}function pv(t){return/^\d+?$/.test(t)}const Et=qs();function gv(t,e,n,r,i){const s=R(n,[zi],{}),o=R(n,t),a={...R(o,[wt],{}),...e,...s},l={...o};ye(a)||ue(l,[wt],a),ye(s)||ue(l,[zi],s);let{readonly:u}=V(l);return(i===!0||Bc(u)&&r===!0)&&(u=!0,Q(a,oi)?ue(l,[wt,oi],!0):ue(l,`ui:${oi}`,!0)),{fieldUiSchema:l,uiReadonly:u}}function yv(t,e,n="$0m3tH1nG Un3xP3cT3d"){const r=Ji([e]).sort(),i=Ji([n]).sort();switch(t){case Gn.ALL:return Tr(r,i);case Gn.SOME:return Sa(r,i).length>0;case Gn.NONE:return Sa(r,i).length===0;default:return!1}}function ni(t,e,n){let r={},i=t[e];if(Ct(i)){const{children:s,className:o,...a}=i;if(i=s,o){const u=o.split(" ").map(c=>Hs(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 ja(t,e,n){let r;if(pv(n)&&t&&t?.type==="array"&&Q(t,cn)){const i=Number(n),s=t[cn];Array.isArray(s)?i>s.length?r=Rl(s):r=s[i]:r=s,e={[fe]:e[fe],path:[...e.path.slice(0,e.path.length-1),i]}}return{rawSchema:r,fieldPathId:e}}function bv(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,y=d.readOnly;u.forEach(b=>{if(l=Be(b,o,l),Q(d,se))a=R(d,[se,b],{});else if(d&&(Q(d,H)||Q(d,ee))){const v=Q(d,H)?H:ee,S=s.findSelectedOptionInXxxOf(d,b,v,h);a=R(S,[se,b],{})}else{const v=ja(d,l,b);a=v.rawSchema??{},l=v.fieldPathId}h=R(h,b,{}),d=s.retrieveSchema(a,h),y=wa(d.readOnly,y)});let f,p=!1;if(ye(d)&&(d=void 0),d&&c){if(d&&(Q(d,H)||Q(d,ee))){const v=Q(d,H)?H:ee;d=s.findSelectedOptionInXxxOf(d,c,v,h)}l=Be(c,o,l),p=d!==void 0&&Array.isArray(d.required)&&uv(d.required,c);const b=ja(d,l,c);if(b.rawSchema?(d=b.rawSchema,l=b.fieldPathId):(d=R(d,[se,c]),d=d&&s.retrieveSchema(d)),y=wa(d?.readOnly,y),d&&(Q(d,H)||Q(d,ee))){const v=Q(d,H)?H:ee,S=He(d);f={options:d[v],hasDiscriminator:!!S}}}return{schema:d,isRequired:p,isReadonly:y,optionsInfo:f,fieldPathId:l}}function xv(t,e){let n=t;return It(n)&&(n=Hs(e,n)),ar(n)?n:null}function vv(t,e){let n,r=null,i={},s;if(It(e)||Bc(e))n=e??"";else{const{name:o="",render:a,...l}=e;n=o,i=l,ye(i)||Wx(i,(u,c)=>{if(It(u)){const d=hv.exec(u);if(Array.isArray(d)&&d.length>1){const h=d[1];i[c]=Hs(t,h,h)}}}),r=xv(a,t),!o&&r&&(s=m.jsx(r,{...l,"data-testid":Et.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function ri(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(Ys,{...n,key:`layoutGrid-${Xe(l)}`,schema:a,layoutGridSchema:l}))}function Sv(t){const{layoutGridSchema:e,...n}=t,{formData:r,registry:i}=n,{children:s,gridProps:o}=ni(e,et.CONDITION,i),{operator:a,field:l="",value:u}=o,c=R(r,l,null);return yv(a,c,u)?m.jsx(ri,{...n,childrenLayoutGridSchemaId:s}):null}function wv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ni(e,et.COLUMN,r),a=V(i),l=q("GridTemplate",r,a);return m.jsx(l,{column:!0,"data-testid":Et.col,...o,children:m.jsx(ri,{...n,childrenLayoutGridSchemaId:s})})}function jv(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ni(e,et.COLUMNS,r),a=V(i),l=q("GridTemplate",r,a);return s.map(u=>m.jsx(l,{column:!0,"data-testid":Et.col,...o,children:m.jsx(ri,{...n,childrenLayoutGridSchemaId:[u]})},`column-${Xe(u)}`))}function Ov(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=ni(e,et.ROW,r),a=V(i),l=q("GridTemplate",r,a);return m.jsx(l,{...o,"data-testid":Et.row,children:m.jsx(ri,{...n,childrenLayoutGridSchemaId:s})})}function Ev(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:y}=h,{fields:f}=c,{SchemaField:p,LayoutMultiSchemaField:b}=f,v=vv(c,e),{name:S,UIComponent:E,uiProps:j}=v,{schema:g,isRequired:x,isReadonly:w,optionsInfo:O,fieldPathId:A}=bv(c,S,n,l,s),C=Yt(A);if(v.rendered)return v.rendered;if(g){const _=O?.hasDiscriminator?b:p,{fieldUiSchema:I,uiReadonly:T}=gv(S,j,r,w,u);return m.jsx(_,{"data-testid":O?.hasDiscriminator?Et.layoutMultiSchemaField:Et.field,...h,name:S,required:x,readonly:T,schema:g,uiSchema:I,errorSchema:R(i,S),fieldPathId:C,formData:R(l,S),onChange:y,onBlur:o,onFocus:a,options:O?.options,registry:c})}return E?m.jsx(E,{"data-testid":Et.uiComponent,...h,name:S,required:x,formData:l,readOnly:!!w||u,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:c,...j}):null}function Ys(t){const{uiSchema:e}=t;let{layoutGridSchema:n}=t;const r=V(e);if(!n&&Ai in r&&ne(r[Ai])&&(n=r[Ai]),ne(n)){if(et.ROW in n)return m.jsx(Ov,{...t,layoutGridSchema:n});if(et.COLUMN in n)return m.jsx(wv,{...t,layoutGridSchema:n});if(et.COLUMNS in n)return m.jsx(jv,{...t,layoutGridSchema:n});if(et.CONDITION in n)return m.jsx(Sv,{...t,layoutGridSchema:n})}return m.jsx(Ev,{...t,gridSchema:n})}Ys.TEST_IDS=Et;function Av(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=t,l=V(i,o.globalUiOptions),{title:u}=l,{title:c}=r,d=u||n||c||a;if(!d)return null;const h=q("TitleFieldTemplate",o,l);return m.jsx(h,{id:ti(e),title:d,required:s,schema:r,uiSchema:i,registry:o})}function Ci(t,e,n){const r="!@#!@$@#$!@$#";return t.map(({schema:s})=>s).find(s=>{const o=R(s,[se,e]);return R(o,kt,R(o,Ne,r))===n})}function Oa(t,e,n,r,i){const s=e.map(l=>n.retrieveSchema(l,i));let o=t;Q(t,H)?o={...t,[H]:s}:Q(t,ee)&&(o={...t,[ee]:s});const a=pn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function Cv(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:y,readonly:f,required:p,errorSchema:b,hideError:v=!1}=t,{widgets:S,schemaUtils:E,globalUiOptions:j}=c,[g,x]=N.useState(Oa(h,l,E,d,i)),w=R(s,fe),O=He(h),A=q("FieldErrorTemplate",c,l),C=q("FieldTemplate",c,l),_=Xe(h),I=Xe(l),T=d?Xe(d):"",F=i?Xe(i):"";N.useEffect(()=>{x(Oa(h,l,E,d,i))},[_,I,E,T,F]);const{widget:P=O?"radio":"select",title:$="",placeholder:k="",optionsSchemaSelector:M=O,hideError:U,...Z}=V(d);if(!M)throw new Error("No selector field provided for the LayoutMultiSchemaField");const le=R(i,M);let me=R(g[0]?.schema,[se,M],{});const be=Ci(g,M,le);me=me?.type?me:{...me,type:be?.type||n};const L=tt(me,P,S),ce=U===void 0?v:!!U,te=R(b,[Ce],[]),K=fn(b,[Ce]),G=E.getDisplayLabel(h,d,j),W=Ee=>{const Ae=Ci(g,M,Ee),Se=Ci(g,M,le);let $e=E.sanitizeDataForNewSchema(Ae,Se,i);$e&&Ae&&($e=E.getDefaultFormState(Ae,$e,"excludeObjectChildren")),$e&&ue($e,M,Ee),a($e,s.path,void 0,w)},re={enumOptions:g,...Z},oe=!ce&&te.length>0?m.jsx(A,{fieldPathId:s,schema:h,errors:te,registry:c}):void 0;return m.jsx(C,{fieldPathId:s,id:w,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(g)&&ye(g),uiSchema:d,required:p,readonly:!!f,registry:c,displayLabel:G,errors:oe,onChange:a,onKeyRename:Cr,onKeyRenameBlur:Cr,onRemoveProperty:Cr,children:m.jsx(L,{id:w,name:e,schema:h,label:($||h.title)??"",disabled:r||Array.isArray(g)&&ye(g),uiSchema:d,autofocus:y,readonly:f,required:p,registry:c,multiple:!1,rawErrors:te,hideError:ce,hideLabel:!G,errorSchema:K,placeholder:k,onChange:W,onBlur:o,onFocus:u,value:le,options:re,htmlName:s.name})})}class Ea 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:y,translateString:f,globalUiOptions:p,schemaUtils:b}=u,{SchemaField:v}=y,S=q("MultiSchemaFieldTemplate",u,p),E=hr(u,c,l,d),j=jn(i),{selectedOption:g,retrievedOptions:x}=this.state,{widget:w="select",placeholder:O,autofocus:A,autocomplete:C,title:_=c.title,...I}=V(d,p),T=tt({type:"number"},w,h),F=R(r,Ce,[]),P=fn(r,[Ce]),$=b.getDisplayLabel(c,d,p),k=g>=0&&x[g]||null;let M;if(k){const{required:te}=c;M=te?ct({required:te},k):k}let U=[];H in c&&d&&H in d?Array.isArray(d[H])?U=d[H]: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 Z=d;g>=0&&U.length>g&&(Z=U[g]);const le=_?Y.TitleOptionPrefix:Y.OptionPrefix,me=_?[_]:[],be=x.map((te,K)=>{const{title:G=te.title}=V(U[K]);return{label:G||f(le,me.concat(String(K+1))),value:K}}),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||ye(be),multiple:!1,rawErrors:F,errorSchema:P,value:g>=0?g:void 0,options:{enumOptions:be,...I},registry:u,placeholder:O,autocomplete:C,autofocus:A,label:_??e,hideLabel:!$,readonly:a}):void 0,ce=M&&M.type!=="null"&&m.jsx(v,{...this.props,schema:M,uiSchema:Z})||null;return m.jsx(S,{schema:c,registry:u,uiSchema:d,selector:L,optionSchemaField:ce})}}const _v=/\.([0-9]*0)*$/,Iv=/[0.]0*$/;function Tv(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,y)=>{o(c),`${c}`.charAt(0)==="."&&(c=`0${c}`);const f=typeof c=="string"&&c.match(_v)?ho(c.replace(Iv,"")):ho(c);n(f,d,h,y)},[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 xr=["strong","em","del","mark"],Aa=[["**",xr[0]],["__",xr[0]],["~~",xr[2]],["==",xr[3]],["*","em"],["_","em"]];function Nv(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 Pv(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=Aa[o][0];if(t.startsWith(a)&&t.length>=2*a.length){r=a,i=a.length,s=Aa[o][1];break}}if(!r)return null;for(var l=i,u=!1,c=!1,d="",h=0,y="",f=!1,p="";l<t.length;){var b=t[l];if(f)y+=b,f=!1,p=b,l++;else if(b!=="\\")if(b!=="`"||h!==0){if(b==="["&&!u&&h===0){var v=Nv(t,l);if(v!==-1){y+=t.slice(l,v),l=v,p=t[v-1];continue}}if(c)y+=b,d?b===d&&(d=""):b==='"'||b==="'"?d=b:b===">"&&(c=!1),p=b,l++;else if(b!=="<"||u){if(b===`
|
|
4
4
|
`&&p===`
|