decocms 4.363.0 → 4.363.1
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-Df7Uu4Sr.js → AlertCircle-CgERhdh6.js} +1 -1
- package/dist/client/assets/{AreaChart-BRLjJaJt.js → AreaChart-kU4sTinA.js} +2 -2
- package/dist/client/assets/{ArrowLeft-Ce4LVTaQ.js → ArrowLeft-BVx6AQzq.js} +1 -1
- package/dist/client/assets/{ArrowRight-CuO69upc.js → ArrowRight-DZQert3q.js} +1 -1
- package/dist/client/assets/{ArrowUp-DmWBbOjK.js → ArrowUp-lpfNBlP2.js} +1 -1
- package/dist/client/assets/{Check-C1wq38_E.js → Check-DClZtAIP.js} +1 -1
- package/dist/client/assets/{CheckCircle-DWvslkKl.js → CheckCircle-BGqFZ8sM.js} +1 -1
- package/dist/client/assets/{ChevronRight-B76sbAXC.js → ChevronRight-BNfU55ld.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-C4wJ3zDR.js → ChevronSelectorVertical-ilm76_0p.js} +1 -1
- package/dist/client/assets/{ChevronUp-B0KEDz5f.js → ChevronUp-CbF1Gmeo.js} +1 -1
- package/dist/client/assets/{Copy01-rsN5AnPv.js → Copy01-DiITYBuR.js} +1 -1
- package/dist/client/assets/{CreditCard01-Cqs_Biv7.js → CreditCard01-Zpy-4Wu9.js} +1 -1
- package/dist/client/assets/Database01-zcGUPFsG.js +1 -0
- package/dist/client/assets/{DotsVertical-CBmzJDPB.js → DotsVertical-LmkOTjL4.js} +1 -1
- package/dist/client/assets/{Download01-zZEPtQ0U.js → Download01-C4blLpML.js} +1 -1
- package/dist/client/assets/ErrorBarContext-KbkdtIBU.js +1 -0
- package/dist/client/assets/{Eye-DFgd5114.js → Eye-Cd7v-liN.js} +1 -1
- package/dist/client/assets/File02-CceuR6rF.js +1 -0
- package/dist/client/assets/{GitBranch01-B7iymaqC.js → GitBranch01-Dil6c2wv.js} +1 -1
- package/dist/client/assets/{Globe01-Df6dZmsR.js → Globe01-BVji6jXS.js} +1 -1
- package/dist/client/assets/{HardDrive-CiahcooN.js → HardDrive-B4UY5qYp.js} +1 -1
- package/dist/client/assets/{Image01-CMpSR3RQ.js → Image01-CpXdMb8x.js} +1 -1
- package/dist/client/assets/{Key01-t3bX5YI3.js → Key01-BsAAVoJx.js} +1 -1
- package/dist/client/assets/{Link01-pX5C3rEv.js → Link01-OqB-2yPE.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CzRiacvQ.js → LinkExternal01-DobnLseV.js} +1 -1
- package/dist/client/assets/{Monitor01-jzbehxNG.js → Monitor01-BTqHf-K4.js} +1 -1
- package/dist/client/assets/{Package-CiAH049d.js → Package-CCkk0w5h.js} +1 -1
- package/dist/client/assets/{Palette-CmMvG40G.js → Palette-BBWt8owf.js} +1 -1
- package/dist/client/assets/{Play-k9_JCuZW.js → Play-CPeIBqH_.js} +1 -1
- package/dist/client/assets/{Plus-Bac7Bl-V.js → Plus-DaErdsG1.js} +1 -1
- package/dist/client/assets/Printer-BG6NfeSZ.js +1 -0
- package/dist/client/assets/{SearchLg-iYej-M-S.js → SearchLg-DxQfk550.js} +1 -1
- package/dist/client/assets/{SearchMd-hxPQERkg.js → SearchMd-BNXjQ2BV.js} +1 -1
- package/dist/client/assets/Sector-D2wxgDkd.js +28 -0
- package/dist/client/assets/{Settings02-t15FjJbr.js → Settings02-DL8f5fN1.js} +1 -1
- package/dist/client/assets/{Share07-CJrTonmW.js → Share07-D1Sv14jA.js} +1 -1
- package/dist/client/assets/{Shield01-DS-tpugO.js → Shield01-BsobIEfQ.js} +1 -1
- package/dist/client/assets/{Stars01-ByE0-f1z.js → Stars01-f37Q7vDf.js} +1 -1
- package/dist/client/assets/{Sun-vdviKSpi.js → Sun-DjKz3VjB.js} +1 -1
- package/dist/client/assets/{XClose-DvenHyNp.js → SwitchHorizontal01-BIyO34Jw.js} +1 -1
- package/dist/client/assets/{Tool01-CmpQe3MS.js → Tool01-D6HOM_aJ.js} +1 -1
- package/dist/client/assets/{Tool02-BAA6OFl0.js → Tool02-BrfQeZRx.js} +1 -1
- package/dist/client/assets/{Trash01-C6vCLvEw.js → Trash01-DQjprOwc.js} +1 -1
- package/dist/client/assets/{TrendUp01-fHRYAiew.js → TrendUp01-DIz6JZwT.js} +1 -1
- package/dist/client/assets/{Upload01-lE597uPz.js → Upload01-BDeLrRhf.js} +1 -1
- package/dist/client/assets/{User01-BPodfm7s.js → User01-B8a5ssx2.js} +1 -1
- package/dist/client/assets/{UserSquare-CXhk4rLY.js → UserSquare-yIpHwPSn.js} +1 -1
- package/dist/client/assets/{Users01-Dgbd4CM_.js → Users01-BCRhQsCX.js} +1 -1
- package/dist/client/assets/{Users03-B4Km0_9u.js → Users03-DWh3D2_T.js} +1 -1
- package/dist/client/assets/{XCircle-BK1898xU.js → XCircle-DudPVYQR.js} +1 -1
- package/dist/client/assets/XClose-DpDcHm9Y.js +1 -0
- package/dist/client/assets/{Zap-nPZGKdXf.js → Zap-C5eiFR0N.js} +1 -1
- package/dist/client/assets/ZoomOut-DdupjPFF.js +1 -0
- package/dist/client/assets/access-gate-Dnh0JyKy.js +1 -0
- package/dist/client/assets/add-connection-dialog-BSihy3_s.js +1 -0
- package/dist/client/assets/agent-analytics-C1OAYjbt.js +2 -0
- package/dist/client/assets/agent-app-62cavSHy.js +1 -0
- package/dist/client/assets/agent-assets-vYQq8qui.js +1 -0
- package/dist/client/assets/agent-automation-BPNX454_.js +20 -0
- package/dist/client/assets/agent-automations-BLOXID0N.js +1 -0
- package/dist/client/assets/agent-connect-sources-BzEccd4r.js +1 -0
- package/dist/client/assets/agent-deck-DVW32bsA.js +1 -0
- package/dist/client/assets/agent-e2e-DM8adI3E.js +1 -0
- package/dist/client/assets/agent-file-C7nywZCe.js +1 -0
- package/dist/client/assets/agent-git-DarQSTRH.js +3 -0
- package/dist/client/assets/agent-hosting-Dnr2S-TT.js +1 -0
- package/dist/client/assets/agent-icon-vDfwuZu4.js +1 -0
- package/dist/client/assets/agent-library-file-D4p-8dXS.js +1 -0
- package/dist/client/assets/agent-monitor-DpaaBIhL.js +1 -0
- package/dist/client/assets/agent-overview-D9IrP622.js +1 -0
- package/dist/client/assets/agent-settings-CxGAsqqN.js +1 -0
- package/dist/client/assets/agent-site-editor-DTFbZmEY.js +1 -0
- package/dist/client/assets/agent-site-editor-code-Dcgjtfwk.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BE26aik7.js +2 -0
- package/dist/client/assets/agent-site-editor-preview-ki_D8wtP.js +504 -0
- package/dist/client/assets/agent-view-DYYYDEW_.js +1 -0
- package/dist/client/assets/agent-view-guard-DomQyuot.js +1 -0
- package/dist/client/assets/agents-list-B0vnsITA.js +1 -0
- package/dist/client/assets/ai-providers-CxaMjUP7.js +1 -0
- package/dist/client/assets/{alert-D8igu3TO.js → alert-DcFgIKLk.js} +1 -1
- package/dist/client/assets/{alert-dialog-CFCsKBpN.js → alert-dialog-CiKfgw9r.js} +2 -2
- package/dist/client/assets/{api-keys-BIjM5sVA.js → api-keys-CEPWE1iS.js} +1 -1
- package/dist/client/assets/api-keys-DoGNEUpY.js +1 -0
- package/dist/client/assets/app-editor-CRjlYU-M.js +1 -0
- package/dist/client/assets/asset-utils-DJXdpjr9.js +1 -0
- package/dist/client/assets/{auth-catchall-E5QBtigN.js → auth-catchall-DV5KEwZ2.js} +1 -1
- package/dist/client/assets/{auth-entry-C91RF11H.js → auth-entry-Fe8qT_kq.js} +1 -1
- package/dist/client/assets/{auth-DeD0YpKg.js → auth-ksbj4Esa.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BFF9n_Qv.js → auth-split-layout-CFJK_BXW.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-6UYdTwrd.js → authenticate-and-persist-oauth-DMvGjBUE.js} +1 -1
- package/dist/client/assets/{automation-list-row-Ba1cMA4W.js → automation-list-row-CkrObNhq.js} +1 -1
- package/dist/client/assets/automation-runs-C-5kRp10.js +1 -0
- package/dist/client/assets/automations-CKhgbURI.js +1 -0
- package/dist/client/assets/{autosend-DI1ZpOT0.js → autosend-BzUVLyEq.js} +1 -1
- package/dist/client/assets/{avatar-CfO1mReu.js → avatar-CW4PxBuN.js} +1 -1
- package/dist/client/assets/{badge-GP_pc1i_.js → badge-C5Ilvf_J.js} +1 -1
- package/dist/client/assets/{block-document-B_vPvGLi.js → block-document-Zfk-C1Kp.js} +3 -3
- package/dist/client/assets/breadcrumb-BajFgW5V.js +1 -0
- package/dist/client/assets/{buckets-BeX-azQt.js → buckets-CyNocIPE.js} +1 -1
- package/dist/client/assets/build-improve-prompt-doc-BrRLOIlw.js +2 -0
- package/dist/client/assets/bulk-category-panel-e217-dmm.js +1 -0
- package/dist/client/assets/calendar-DGiOuDgZ.js +1 -0
- package/dist/client/assets/{capability-load-error-BoR9RbMs.js → capability-load-error-DFv8gs5U.js} +1 -1
- package/dist/client/assets/{cards-m7YgOjsz.js → cards-XHNjVWeh.js} +3 -3
- package/dist/client/assets/category-editor-zLRtagcy.js +1 -0
- package/dist/client/assets/{chart-BanyRqbL.js → chart-C7CmtzOp.js} +2 -2
- package/dist/client/assets/chat-context-HB_KOUNM.js +35 -0
- package/dist/client/assets/{checkbox-ZsR1Bced.js → checkbox-Dg_GkeBT.js} +1 -1
- package/dist/client/assets/choose-editor-DO1mGCL1.js +1 -0
- package/dist/client/assets/{cli-auth-success-sB1yOlRg.js → cli-auth-success-e-RADpiN.js} +1 -1
- package/dist/client/assets/{client-icons-DHLFDmNu.js → client-icons-tt6oaVA2.js} +1 -1
- package/dist/client/assets/collapsible-CycyYnXe.js +1 -0
- package/dist/client/assets/collection-detail-DhtfN_Wl.js +1 -0
- package/dist/client/assets/collection-display-button-BRbx9UhH.js +1 -0
- package/dist/client/assets/{collection-search-7NUVJQfN.js → collection-search-j4HjYlys.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-D0kCJcbB.js → collection-table-wrapper-0LZ9BKlr.js} +1 -1
- package/dist/client/assets/{collection-tabs-MvaIz7gt.js → collection-tabs-Bc9QOlJ8.js} +1 -1
- package/dist/client/assets/{command-CF7nzIN2.js → command-BpjWfGyr.js} +1 -1
- package/dist/client/assets/command-palette-store-D19nXDNm.js +1 -0
- package/dist/client/assets/commerce-onboarding-CdG4FfWS.js +1 -0
- package/dist/client/assets/companion-mcps-section-CVcicsr9.js +1 -0
- package/dist/client/assets/companions-core-CZwGf1b1.js +1 -0
- package/dist/client/assets/{connect-G-ytX-wq.js → connect-COU6F3Do.js} +2 -2
- package/dist/client/assets/connect-layout-Bl-ol5HH.js +1 -0
- package/dist/client/assets/{connection-D885aDuM.js → connection-By77bjvj.js} +1 -1
- package/dist/client/assets/{connection-card-Nc1w-XCq.js → connection-card-Br8jDKgZ.js} +1 -1
- package/dist/client/assets/connection-detail-vVdPGlxv.js +1 -0
- package/dist/client/assets/{connection-form-helpers-B4IwDJJQ.js → connection-form-helpers-CFXh6BoJ.js} +1 -1
- package/dist/client/assets/connections-BBNFmXEe.js +1 -0
- package/dist/client/assets/content-blocks-o63cs2vh.js +1 -0
- package/dist/client/assets/{create-organization-dialog-gO5G25gp.js → create-organization-dialog-CRl8hry2.js} +1 -1
- package/dist/client/assets/decode-html-entities-Cf7wUEql.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-Bm_3HC4t.js → decopilot-sse-pool-D2Qtyl-A.js} +1 -1
- package/dist/client/assets/{dialog-CyDGwxcX.js → dialog-DJBpjJnY.js} +1 -1
- package/dist/client/assets/discover-y7BsppSE.js +1 -0
- package/dist/client/assets/{domain-settings-Cx6UibuZ.js → domain-settings-B_cuGCF0.js} +1 -1
- package/dist/client/assets/download-app-dialog-DYhv8XsJ.js +1 -0
- package/dist/client/assets/{drawer-CqSEztKC.js → drawer-B5NRhNfW.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CgwRqOnX.js → dropdown-menu-DzwCPltk.js} +1 -1
- package/dist/client/assets/{editor-D7S6MtwI.js → editor-BHnwprUT.js} +1 -1
- package/dist/client/assets/{empty-state-SN5mEPhX.js → empty-state-CJ95hR0w.js} +1 -1
- package/dist/client/assets/{empty-state-DfBha5W6.js → empty-state-CXolWOTn.js} +1 -1
- package/dist/client/assets/extract-connection-data-B1nPGa4h.js +1 -0
- package/dist/client/assets/{file-explorer-paPAvOUA.js → file-explorer-Dj1zqDxa.js} +2 -2
- package/dist/client/assets/file-preview-kRDXQYfi.js +1 -0
- package/dist/client/assets/file-share-button-P5GnoZYM.js +3 -0
- package/dist/client/assets/{file-type-icon--TvA6C0i.js → file-type-icon-Cg81au_Z.js} +1 -1
- package/dist/client/assets/folder-icon-Bey_C_xd.js +2 -0
- package/dist/client/assets/{form-BnUN8JhF.js → form-EGCuUtdG.js} +1 -1
- package/dist/client/assets/{general-DhiseHhA.js → general-BJ_Ksgnn.js} +1 -1
- package/dist/client/assets/github-D4UJ99TO.js +1 -0
- package/dist/client/assets/{github-icon-7BmoW2Y2.js → github-icon-CiNkodR8.js} +1 -1
- package/dist/client/assets/{github-repo-CTPv5ZM2.js → github-repo-C0igpkr9.js} +1 -1
- package/dist/client/assets/github-repo-scope-C8GSbvaz.js +1 -0
- package/dist/client/assets/home-Cmddezu3.js +1 -0
- package/dist/client/assets/{hooks-Bv30myGB.js → hooks-BSkeWBV7.js} +2 -2
- package/dist/client/assets/hooks-Bb9SArul.js +2 -0
- package/dist/client/assets/{index-y6Z5iMfg.js → index-6GXqHE0w.js} +42 -42
- package/dist/client/assets/{index-C2fs5Fhc.js → index-9FQARZdh.js} +1 -1
- package/dist/client/assets/index-B7ENeoW4.js +4 -0
- package/dist/client/assets/index-B9bOVdMd.js +90 -0
- package/dist/client/assets/index-BVRQ9yUZ.js +1 -0
- package/dist/client/assets/index-BaItIL-_.js +1 -0
- package/dist/client/assets/index-CUa7fAjf.js +24 -0
- package/dist/client/assets/index-CY40-aHW.js +1 -0
- package/dist/client/assets/{index-CnV8Y6tV.js → index-Cu77hgR2.js} +1 -1
- package/dist/client/assets/index-DCQ3taiG.js +1 -0
- package/dist/client/assets/{index-DD_a39Sy.js → index-Dg14Zpi9.js} +2 -2
- package/dist/client/assets/{index-B_j4TgZF.js → index-cEqwHhEg.js} +1 -1
- package/dist/client/assets/{index-Cf5RfBo5.js → index-hC6VOnUm.js} +2 -2
- package/dist/client/assets/index-qEipD_7S.js +1 -0
- package/dist/client/assets/index-redirect-BRL1uQPT.js +1 -0
- package/dist/client/assets/{infiniteQueryObserver-CvFtTJPb.js → infiniteQueryObserver-C7FrFXuf.js} +1 -1
- package/dist/client/assets/infra-billing-B0e93_qz.js +1 -0
- package/dist/client/assets/input-BRqLi1TH.js +8 -0
- package/dist/client/assets/input-D8xrvlz-.js +1 -0
- package/dist/client/assets/{input-DRjCNSPN.js → input-TvernbmY.js} +1 -1
- package/dist/client/assets/{integration-icon-CFGOsRgH.js → integration-icon-B6H5J7sl.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-qtYgFNfF.js → invite-member-dialog-CsolElt3.js} +1 -1
- package/dist/client/assets/{label-DGsSvY2I.js → label-aWEsDmHM.js} +1 -1
- package/dist/client/assets/{layout-C7iOarOb.js → layout-CAwe_kK2.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-DJ_t0QLc.js +1 -0
- package/dist/client/assets/legacy-main-redirect-CySqEohs.js +1 -0
- package/dist/client/assets/library-DRmbr8Ht.js +161 -0
- package/dist/client/assets/{login-B4RHcX-Z.js → login-DQDbHhI7.js} +1 -1
- package/dist/client/assets/{markdown-Y6owwpHy.js → markdown-CBvmi8AF.js} +30 -30
- package/dist/client/assets/match-site-slug-config-D3fUJ6vX.js +1 -0
- package/dist/client/assets/{mcp-app-renderer-Cy31bAY0.js → mcp-app-renderer-BQ7hPzlx.js} +2 -2
- package/dist/client/assets/{mcp-oauth-Bm9ijvfC.js → mcp-oauth-DhRKpyTH.js} +1 -1
- package/dist/client/assets/members-NHaXKGgP.js +1 -0
- package/dist/client/assets/mini-report-page-BcG9QHwQ.js +1 -0
- package/dist/client/assets/monaco-editor-C5zvkMO4.js +9 -0
- package/dist/client/assets/monitoring-stats-row-CWqusnLf.js +1 -0
- package/dist/client/assets/{multi-select-kzt94BG4.js → multi-select-CvACpZbb.js} +1 -1
- package/dist/client/assets/mustache-DQXz9E52.js +4 -0
- package/dist/client/assets/{oauth-callback-CsYpPVhX.js → oauth-callback-BHJTnNxG.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CkroR0wl.js → oauth-callback-ai-provider-wF0_7wc5.js} +1 -1
- package/dist/client/assets/omit-sandbox-map-jj4lCB2U.js +1 -0
- package/dist/client/assets/{onboarding-DN_VeGxV.js → onboarding-20FUHLvO.js} +1 -1
- package/dist/client/assets/optimistic-project-sidebar-views-DKtRXqQ0.js +1 -0
- package/dist/client/assets/org-layout-DRrVivAL.js +1 -0
- package/dist/client/assets/{organization-choice-Bugd-m5W.js → organization-choice-BmSYuBSE.js} +1 -1
- package/dist/client/assets/{orgs-Bv7LuXwC.js → orgs-1ZlqeM-y.js} +1 -1
- package/dist/client/assets/page-seo-form-Cpi2Oike.js +1 -0
- package/dist/client/assets/pair-CD8Vxcvs.js +47 -0
- package/dist/client/assets/{popover-DrJcYe9C.js → popover-Ci-k968-.js} +1 -1
- package/dist/client/assets/post-calendar-CgTLYrrU.js +1 -0
- package/dist/client/assets/post-editor-DyayPm7u.js +1 -0
- package/dist/client/assets/preview-content-DhEgigNG.js +1 -0
- package/dist/client/assets/preview-dialog-CKWnRekk.js +1 -0
- package/dist/client/assets/primitives-1lR28duD.js +1 -0
- package/dist/client/assets/{profile-Bs-irLLH.js → profile-DixSbE4L.js} +1 -1
- package/dist/client/assets/project-app-view-DBHiU3Rg.js +1 -0
- package/dist/client/assets/project-feed-boKgu_TR.js +1 -0
- package/dist/client/assets/project-icon-DIXBuD-A.js +1 -0
- package/dist/client/assets/project-reports-ChLta7_v.js +1 -0
- package/dist/client/assets/project-tasks-nUWazd1g.js +1 -0
- package/dist/client/assets/{prompts-wjQ-EFKj.js → prompts-BROxvafI.js} +1 -1
- package/dist/client/assets/provision-repo-scoped-github-connection-B6zdkC6p.js +1 -0
- package/dist/client/assets/record-editor-FqHaN2k4.js +1 -0
- package/dist/client/assets/redirect-editor-CWYZom_C.js +1 -0
- package/dist/client/assets/registry-C3_EEMj-.js +2 -0
- package/dist/client/assets/{registry-layout-DHYm94rU.js → registry-layout-BUEF9YqP.js} +4 -4
- package/dist/client/assets/{reports-D4elpaqK.js → reports-B1C9NU2m.js} +1 -1
- package/dist/client/assets/reports-BY7Ca1Ey.js +1 -0
- package/dist/client/assets/reports-tab-uLMivl2p.js +2 -0
- package/dist/client/assets/{repositories-3ia_V4sE.js → repositories-BgD13VwL.js} +1 -1
- package/dist/client/assets/repository-import-picker-DVnadPZ8.js +1 -0
- package/dist/client/assets/{repository-picker-s01uE4_E.js → repository-picker-BGpoa_g_.js} +1 -1
- package/dist/client/assets/require-capability-DSFKKTc-.js +1 -0
- package/dist/client/assets/{required-auth-layout-mSUodrzA.js → required-auth-layout-DMNBbcf3.js} +1 -1
- package/dist/client/assets/{reset-password-B_-cD_PK.js → reset-password-GCDcBOjo.js} +1 -1
- package/dist/client/assets/review-settings-VwYzzjCc.js +1 -0
- package/dist/client/assets/rich-text-link-control-C6A8Q9Jd.js +5 -0
- package/dist/client/assets/roles-PgEO9KN-.js +1 -0
- package/dist/client/assets/runnable-block-editor-Db2XbJYi.js +16 -0
- package/dist/client/assets/sandbox-lifecycle-context-DxbfUbxP.js +2 -0
- package/dist/client/assets/sandbox-url-D3mC8qhT.js +1 -0
- package/dist/client/assets/{schema-BDy_4D7A.js → schema-Cnskrzk1.js} +1 -1
- package/dist/client/assets/{scroll-area-C18Y2v3L.js → scroll-area-CaE3a4_T.js} +1 -1
- package/dist/client/assets/{search-input-L0lrukmF.js → search-input-lFP9sD3O.js} +1 -1
- package/dist/client/assets/{secrets-CdpkfmHa.js → secrets-BU_daRxy.js} +1 -1
- package/dist/client/assets/sections-editor-D-W8vM7g.js +2 -0
- package/dist/client/assets/{select-BGnwGqnU.js → select-Ce9NznPv.js} +1 -1
- package/dist/client/assets/select-model-CjTijsS7.js +1 -0
- package/dist/client/assets/self-tool-result-8OxPN9Nm.js +1 -0
- package/dist/client/assets/seo-editor-O94He1NF.js +1 -0
- package/dist/client/assets/serial-task-queue-CGOeQgpr.js +1 -0
- package/dist/client/assets/settings-layout-CWQI71Tg.js +1 -0
- package/dist/client/assets/settings-sidebar-BcAe-WS4.js +1 -0
- package/dist/client/assets/settings-tab-Cg5CqTki.js +5 -0
- package/dist/client/assets/shell-controls-gkZZS07l.js +1 -0
- package/dist/client/assets/shell-layout-C3IRibnI.js +1 -0
- package/dist/client/assets/site-url-en5df9c-.js +1 -0
- package/dist/client/assets/skill-preview-MIddvDZe.js +1 -0
- package/dist/client/assets/skills-hRnVKZ5K.js +1 -0
- package/dist/client/assets/{sso-CVpMpJ2m.js → sso-BePH_NId.js} +1 -1
- package/dist/client/assets/store-CqeIEwHN.js +1 -0
- package/dist/client/assets/store-registry-BCokMLik.js +2 -0
- package/dist/client/assets/switch-D5GcuD9Z.js +1 -0
- package/dist/client/assets/synced-repos-Cnp4m7yg.js +1 -0
- package/dist/client/assets/{table-DSIbUmyY.js → table-O0SpY8ZO.js} +1 -1
- package/dist/client/assets/{tabs-BVFMEVzk.js → tabs-DQoXHeZr.js} +1 -1
- package/dist/client/assets/{task-board-By8eCqZc.js → task-board-DyZE7mH1.js} +1 -1
- package/dist/client/assets/task-route-CayeX6cv.js +1 -0
- package/dist/client/assets/task-status-CyTozLxL.js +1 -0
- package/dist/client/assets/tasks-DGTMeQBa.js +1 -0
- package/dist/client/assets/{tasks-kFCSziTb.js → tasks-Da-h-zLm.js} +1 -1
- package/dist/client/assets/{textarea-CuF3aDTE.js → textarea-BpFOmm9_.js} +1 -1
- package/dist/client/assets/{thread-intent-q_RVjRN0.js → thread-intent-AJKohiRy.js} +1 -1
- package/dist/client/assets/thread-route-CEvVLI2K.js +1 -0
- package/dist/client/assets/thread-sheet-body-Bs4b4fMK.js +1 -0
- package/dist/client/assets/toggle-group-Cs1yIHkK.js +1 -0
- package/dist/client/assets/tool-namespace-ySa3S1AM.js +1 -0
- package/dist/client/assets/{toolbar-B5cewwJb.js → toolbar-DOOz2W24.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BtBUZ8nA.js → toolbar-icon-button-Dp-AbzNZ.js} +1 -1
- package/dist/client/assets/{track-BYunSel2.js → track-Dns1NpdC.js} +1 -1
- package/dist/client/assets/{types-BB_Up-3A.js → types-C1gRrnQe.js} +6 -6
- package/dist/client/assets/usage-stats-D5mXC24B.js +141 -0
- package/dist/client/assets/{use-ai-providers-BMexfNaB.js → use-ai-providers-Bg_y9f3x.js} +1 -1
- package/dist/client/assets/{use-automations-BgzAjzua.js → use-automations-BI_yIok-.js} +1 -1
- package/dist/client/assets/{use-autosave-D70NA0HD.js → use-autosave-BB0U2eiK.js} +1 -1
- package/dist/client/assets/use-commerce-diagnostic-DqKipeip.js +1 -0
- package/dist/client/assets/use-connect-companion-Mci4Y6hu.js +1 -0
- package/dist/client/assets/{use-connection-ClORxmw4.js → use-connection-DCUpGmsb.js} +1 -1
- package/dist/client/assets/{use-copy-DUxpBqXm.js → use-copy-GVBAvo9n.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DBeldBRq.js → use-create-virtual-mcp-CizXpVyQ.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-40K6SzJD.js → use-date-fns-locale-CcPpBz8y.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-kf66WQZj.js → use-debounced-autosave-wCEzYUZh.js} +1 -1
- package/dist/client/assets/{use-debounced-value-v41IOreQ.js → use-debounced-value-D0SYNQsR.js} +1 -1
- package/dist/client/assets/use-deco-credits-DjxZxHMq.js +1 -0
- package/dist/client/assets/{use-decopilot-events-C0NWoSQc.js → use-decopilot-events-zpeu2MCG.js} +1 -1
- package/dist/client/assets/{use-delete-connection-qmqqgsKa.js → use-delete-connection-B-DNpbCU.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C7c9x0vv.js → use-deployment-admin-Dpkh4HgH.js} +1 -1
- package/dist/client/assets/{use-file-configs-Dm3fOdMk.js → use-file-configs-B1FdrMZJ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Bw5rNIGx.js → use-infinite-scroll-BXOEU8Y7.js} +1 -1
- package/dist/client/assets/{use-join-requests-DbtrL0Pl.js → use-join-requests-1Ow065Yq.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-CeyJWpQP.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-kHe3lJRg.js → use-mcp-auth-status-CSQiZCDG.js} +1 -1
- package/dist/client/assets/use-mcp-client-Bq-mjhw3.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-CtjkJFfg.js → use-mcp-prompts-CWmeNLXn.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DRBItGTD.js → use-mcp-tools-DGdyHn8U.js} +1 -1
- package/dist/client/assets/{use-members-C23rfxcZ.js → use-members-Dnee1tF2.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-Drdqs1cr.js +1 -0
- package/dist/client/assets/use-open-billing-url-Cju1isPI.js +1 -0
- package/dist/client/assets/{use-org-auth-client-DvlpnDFO.js → use-org-auth-client-CVFBkaiI.js} +1 -1
- package/dist/client/assets/use-org-fs-DG1oJieK.js +1 -0
- package/dist/client/assets/{use-org-notice-DlsdC1WA.js → use-org-notice-PUfO84YR.js} +1 -1
- package/dist/client/assets/{use-org-sso-xd-5IiLc.js → use-org-sso-uleG21Aq.js} +1 -1
- package/dist/client/assets/{use-organization-roles-B3neE_6D.js → use-organization-roles-yO3kgQbK.js} +1 -1
- package/dist/client/assets/use-organization-settings-DrJN-E78.js +1 -0
- package/dist/client/assets/use-panel-navigate-CCqZdv2O.js +1 -0
- package/dist/client/assets/use-project-native-view-presence-01L5j4lu.js +1 -0
- package/dist/client/assets/use-project-scope-DZ9tacAx.js +1 -0
- package/dist/client/assets/use-registry-connections-cro5WL6A.js +1 -0
- package/dist/client/assets/{use-secrets-PkTonlJ_.js → use-secrets-w6G8jtp4.js} +1 -1
- package/dist/client/assets/use-section-preview-base-lro_p1nx.js +1 -0
- package/dist/client/assets/use-session-runtime-TS34dEJv.js +1 -0
- package/dist/client/assets/{use-status-sounds-C-6LEj0t.js → use-status-sounds-DQ2pMmh0.js} +1 -1
- package/dist/client/assets/{use-tags-BuxETA7b.js → use-tags-B6zE47mm.js} +1 -1
- package/dist/client/assets/use-task-metadata-C4MfiHBQ.js +1 -0
- package/dist/client/assets/use-thread-outputs-CpCqTMOi.js +1 -0
- package/dist/client/assets/{use-view-mode-BGsTNFK8.js → use-view-mode-B9wUn2ad.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-CMlCV8Oj.js +1 -0
- package/dist/client/assets/useInfiniteQuery-CM35R0yt.js +1 -0
- package/dist/client/assets/useQueries-C6OAJOs7.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DWyGwvh9.js +1 -0
- package/dist/client/assets/{users-CuqlxLsH.js → users-CYflDdFv.js} +1 -1
- package/dist/client/assets/utils-B-5U5Z26.js +4 -0
- package/dist/client/assets/utils-CVEq3hMx.js +1 -0
- package/dist/client/assets/variant-calendar-BsFwTl3D.js +1 -0
- package/dist/client/assets/variant-matcher-override-CRlEf4IL.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BlEO3gFJ.js → view-mode-toggle-kY4gR8CN.js} +1 -1
- package/dist/client/assets/virtual-mcp-CKi1xJsO.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ErrorBarContext-CQj5vlL8.js +0 -1
- package/dist/client/assets/Sector-CD1ykt0B.js +0 -28
- package/dist/client/assets/ZoomOut-DhJWoynj.js +0 -1
- package/dist/client/assets/access-gate-OgewzCmd.js +0 -1
- package/dist/client/assets/agent-icon-6EllA70W.js +0 -1
- package/dist/client/assets/agents-list-BY0vT0Wn.js +0 -1
- package/dist/client/assets/ai-providers-vUA1qSht.js +0 -1
- package/dist/client/assets/analytics-tab-Do-IciVD.js +0 -2
- package/dist/client/assets/api-keys-pPtOUmL_.js +0 -1
- package/dist/client/assets/app-editor-CSGywsTY.js +0 -1
- package/dist/client/assets/automation-runs-CoIkXCsB.js +0 -187
- package/dist/client/assets/automations-CJ2EIlox.js +0 -1
- package/dist/client/assets/breadcrumb-CAKgWNOZ.js +0 -1
- package/dist/client/assets/bulk-category-panel-BenSOwl7.js +0 -1
- package/dist/client/assets/category-editor-iK-flfht.js +0 -1
- package/dist/client/assets/cdn-tab-Ck8xjhCA.js +0 -1
- package/dist/client/assets/chat-context-C6UT7ht1.js +0 -35
- package/dist/client/assets/choose-editor-B8v8x2gP.js +0 -1
- package/dist/client/assets/collection-detail-CZicQp0E.js +0 -1
- package/dist/client/assets/collection-display-button-BiBiEJPp.js +0 -1
- package/dist/client/assets/commerce-onboarding-DKWZMrBI.js +0 -1
- package/dist/client/assets/connect-layout-BLwdQBWt.js +0 -1
- package/dist/client/assets/connection-detail-BboxJXTl.js +0 -1
- package/dist/client/assets/connections-H_c0ER6v.js +0 -1
- package/dist/client/assets/e2e-tab-DbA_PByD.js +0 -1
- package/dist/client/assets/extract-connection-data-DkL3Oqhk.js +0 -1
- package/dist/client/assets/folder-icon-C46JPU0-.js +0 -2
- package/dist/client/assets/index-9Wn-1DpE.js +0 -1
- package/dist/client/assets/index-BEyFhSeZ.js +0 -834
- package/dist/client/assets/index-DHHqS3nT.js +0 -1
- package/dist/client/assets/index-DR6uwZdc.js +0 -1
- package/dist/client/assets/index-I7v7d4v2.js +0 -1
- package/dist/client/assets/index-SmsG_b1w.js +0 -1
- package/dist/client/assets/index-redirect-C3gwJ6Fh.js +0 -1
- package/dist/client/assets/infra-billing-Ch_WWq-u.js +0 -1
- package/dist/client/assets/members-ypEfbto9.js +0 -1
- package/dist/client/assets/monaco-editor-D3QSLeam.js +0 -9
- package/dist/client/assets/monitoring-stats-row--wR3KC6f.js +0 -1
- package/dist/client/assets/org-layout-DzsJ720P.js +0 -1
- package/dist/client/assets/page-seo-form-DPrfWQ94.js +0 -1
- package/dist/client/assets/post-calendar-DyncB6BE.js +0 -1
- package/dist/client/assets/post-editor-FfaApBeX.js +0 -1
- package/dist/client/assets/primitives-DZEMS67c.js +0 -1
- package/dist/client/assets/project-app-view-C1W5Uv5V.js +0 -1
- package/dist/client/assets/project-icon-DQTfNALl.js +0 -1
- package/dist/client/assets/provision-repo-scoped-github-connection-WQFARyHG.js +0 -1
- package/dist/client/assets/record-editor-DaGE-E4Q.js +0 -1
- package/dist/client/assets/redirect-editor-BgylW9YL.js +0 -1
- package/dist/client/assets/registry-YIdSAHGV.js +0 -2
- package/dist/client/assets/repository-import-picker-DN9Nn9yd.js +0 -1
- package/dist/client/assets/require-capability-BVMwcBeZ.js +0 -1
- package/dist/client/assets/review-settings-BN9py8rz.js +0 -1
- package/dist/client/assets/roles-CGT8NKA4.js +0 -1
- package/dist/client/assets/sections-editor-BIoyRz1G.js +0 -2
- package/dist/client/assets/select-model-BNDe5FJr.js +0 -4
- package/dist/client/assets/self-tool-result-DM7xixxP.js +0 -1
- package/dist/client/assets/seo-editor-EIeTDSnb.js +0 -1
- package/dist/client/assets/settings-layout-CwJp96nZ.js +0 -1
- package/dist/client/assets/settings-sidebar-BvIIdmkC.js +0 -1
- package/dist/client/assets/shell-controls-nVElTnLJ.js +0 -1
- package/dist/client/assets/shell-layout-CTNVA2t4.js +0 -1
- package/dist/client/assets/skill-preview-BswJw8Eb.js +0 -4
- package/dist/client/assets/skills-DXWVIfB4.js +0 -1
- package/dist/client/assets/store-BUUS-eER.js +0 -1
- package/dist/client/assets/store-registry-DxfEOZiI.js +0 -2
- package/dist/client/assets/switch-CPLM-IZy.js +0 -1
- package/dist/client/assets/synced-repos-Bl-1vG4K.js +0 -1
- package/dist/client/assets/task-route-B8aecmdq.js +0 -1
- package/dist/client/assets/thread-route-jI9qvJe_.js +0 -1
- package/dist/client/assets/toggle-group-WfRpP-dB.js +0 -1
- package/dist/client/assets/use-destination-route-CY15sZqw.js +0 -1
- package/dist/client/assets/use-mcp-client-Cw1fcLqm.js +0 -10
- package/dist/client/assets/use-navigate-to-agent-COVw0ub8.js +0 -1
- package/dist/client/assets/use-organization-settings-DucmPYOE.js +0 -1
- package/dist/client/assets/use-panel-navigate-C6Ga2vR8.js +0 -1
- package/dist/client/assets/use-registry-connections-DBp-MS3e.js +0 -1
- package/dist/client/assets/use-section-preview-base-B4s2_IK6.js +0 -1
- package/dist/client/assets/use-virtual-mcp-Bnfc4yEo.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DThUrotQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dsg0_SX3.js +0 -1
- package/dist/client/assets/variant-calendar-BhJlQ5r6.js +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{cl as ue,cm as de,cn as he,co as fe,cp as pe,cq as _,cr as g,cs as me,ct as _e,cu as we,cv as M,cw as ge,cx as D,cy as Te,cz as q,cA as ye,cB as L,cC as ke,cD as ve,cE as Se,cF as W,cG as Ce,cH as be,cI as Re,cJ as se,cK as Ie,cL as Ee,cM as qe,bt as Pe,cN as $e,cO as Me,cP as A,cQ as Ae,cR as He,cS as Oe,cT as Ue,cU as xe,cV as Ne,cW as je,cX as Fe,cY as De,cZ as Le,c_ as Ve,c$ as Qe,d0 as ze,bp as U,d1 as Je,d2 as N,c as Q,z as re,K as z,m as We,x as Ke}from"./index-6GXqHE0w.js";import{U as P,b as H,c as K}from"./auth-ksbj4Esa.js";function x(a){return!!a._zod}function b(a,e){return x(a)?ue(a,e):a.safeParse(e)}function oe(a){if(!a)return;let e;if(x(a)?e=a._zod?.def?.shape:e=a.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function Ge(a){if(x(a)){const o=a._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}const t=a._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const s=a.value;if(s!==void 0)return s}function R(a){return a==="completed"||a==="failed"||a==="cancelled"}function G(a){const t=oe(a)?.method;if(!t)throw new Error("Schema is missing a method literal");const s=Ge(t);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function B(a,e){const t=b(a,e);if(!t.success)throw t.error;return t.data}const Be=6e4;class Ze{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(de,t=>{this._oncancel(t)}),this.setNotificationHandler(he,t=>{this._onprogress(t)}),this.setRequestHandler(fe,t=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(pe,async(t,s)=>{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new _(g.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(me,async(t,s)=>{const r=async()=>{const o=t.params.taskId;if(this._taskMessageQueue){let i;for(;i=await this._taskMessageQueue.dequeue(o,s.sessionId);){if(i.type==="response"||i.type==="error"){const u=i.message,p=u.id,l=this._requestResolvers.get(p);if(l)if(this._requestResolvers.delete(p),i.type==="response")l(u);else{const d=u,f=new _(d.error.code,d.error.message,d.error.data);l(f)}else{const d=i.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${p}`))}continue}await this._transport?.send(i.message,{relatedRequestId:s.requestId})}}const n=await this._taskStore.getTask(o,s.sessionId);if(!n)throw new _(g.InvalidParams,`Task not found: ${o}`);if(!R(n.status))return await this._waitForTaskUpdate(o,s.signal),await r();if(R(n.status)){const i=await this._taskStore.getTaskResult(o,s.sessionId);return this._clearTaskQueue(o),{...i,_meta:{...i._meta,[q]:{taskId:o}}}}return await r()};return await r()}),this.setRequestHandler(_e,async(t,s)=>{try{const{tasks:r,nextCursor:o}=await this._taskStore.listTasks(t.params?.cursor,s.sessionId);return{tasks:r,nextCursor:o,_meta:{}}}catch(r){throw new _(g.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(we,async(t,s)=>{try{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new _(g.InvalidParams,`Task not found: ${t.params.taskId}`);if(R(r.status))throw new _(g.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(t.params.taskId,"cancelled","Client cancelled task execution.",s.sessionId),this._clearTaskQueue(t.params.taskId);const o=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!o)throw new _(g.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof _?r:new _(g.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,s,r,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:s,resetTimeoutOnProgress:o,onTimeout:r})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const s=Date.now()-t.startTime;if(t.maxTotalTimeout&&s>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),_.fromError(g.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:s});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const s=this.transport?.onerror;this._transport.onerror=o=>{s?.(o),this._onerror(o)};const r=this._transport?.onmessage;this._transport.onmessage=(o,n)=>{r?.(o,n),M(o)||ge(o)?this._onresponse(o):D(o)?this._onrequest(o,n):Te(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const s of this._timeoutInfo.values())clearTimeout(s.timeoutId);this._timeoutInfo.clear();for(const s of this._requestHandlerAbortControllers.values())s.abort();this._requestHandlerAbortControllers.clear();const t=_.fromError(g.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const s of e.values())s(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)))}_onrequest(e,t){const s=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,o=e.params?._meta?.[q]?.taskId;if(s===void 0){const l={jsonrpc:"2.0",id:e.id,error:{code:g.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:l,timestamp:Date.now()},r?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):r?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const i=ye(e.params)?e.params.task:void 0,u=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,p={signal:n.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(n.signal.aborted)return;const d={relatedRequestId:e.id};o&&(d.relatedTask={taskId:o}),await this.notification(l,d)},sendRequest:async(l,d,f)=>{if(n.signal.aborted)throw new _(g.ConnectionClosed,"Request was cancelled");const m={...f,relatedRequestId:e.id};o&&!m.relatedTask&&(m.relatedTask={taskId:o});const T=m.relatedTask?.taskId??o;return T&&u&&await u.updateTaskStatus(T,"input_required"),await this.request(l,d,m)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:o,taskStore:u,taskRequestedTtl:i?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{i&&this.assertTaskHandlerCapability(e.method)}).then(()=>s(e,p)).then(async l=>{if(n.signal.aborted)return;const d={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)},async l=>{if(n.signal.aborted)return;const d={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:g.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},r?.sessionId):await r?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===n&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...s}=e.params,r=Number(t),o=this._progressHandlers.get(r);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const n=this._responseHandlers.get(r),i=this._timeoutInfo.get(r);if(i&&n&&i.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(u){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),n(u);return}o(s)}_onresponse(e){const t=Number(e.id),s=this._requestResolvers.get(t);if(s){if(this._requestResolvers.delete(t),M(e))s(e);else{const n=new _(e.error.code,e.error.message,e.error.data);s(n)}return}const r=this._responseHandlers.get(t);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let o=!1;if(M(e)&&e.result&&typeof e.result=="object"){const n=e.result;if(n.task&&typeof n.task=="object"){const i=n.task;typeof i.taskId=="string"&&(o=!0,this._taskProgressTokens.set(i.taskId,t))}}if(o||this._progressHandlers.delete(t),M(e))r(e);else{const n=_.fromError(e.error.code,e.error.message,e.error.data);r(n)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,s){const{task:r}=s??{};if(!r){try{yield{type:"result",result:await this.request(e,t,s)}}catch(n){yield{type:"error",error:n instanceof _?n:new _(g.InternalError,String(n))}}return}let o;try{const n=await this.request(e,L,s);if(n.task)o=n.task.taskId,yield{type:"taskCreated",task:n.task};else throw new _(g.InternalError,"Task creation did not return a task");for(;;){const i=await this.getTask({taskId:o},s);if(yield{type:"taskStatus",task:i},R(i.status)){i.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)}:i.status==="failed"?yield{type:"error",error:new _(g.InternalError,`Task ${o} failed`)}:i.status==="cancelled"&&(yield{type:"error",error:new _(g.InternalError,`Task ${o} was cancelled`)});return}if(i.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},t,s)};return}const u=i.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(p=>setTimeout(p,u)),s?.signal?.throwIfAborted()}}catch(n){yield{type:"error",error:n instanceof _?n:new _(g.InternalError,String(n))}}}request(e,t,s){const{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n,task:i,relatedTask:u}=s??{};return new Promise((p,l)=>{const d=c=>{l(c)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),i&&this.assertTaskCapability(e.method)}catch(c){d(c);return}s?.signal?.throwIfAborted();const f=this._requestMessageId++,m={...e,jsonrpc:"2.0",id:f};s?.onprogress&&(this._progressHandlers.set(f,s.onprogress),m.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),i&&(m.params={...m.params,task:i}),u&&(m.params={...m.params,_meta:{...m.params?._meta||{},[q]:u}});const T=c=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(c)}},{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(v=>this._onerror(new Error(`Failed to send cancellation: ${v}`)));const w=c instanceof _?c:new _(g.RequestTimeout,String(c));l(w)};this._responseHandlers.set(f,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return l(c);try{const w=b(t,c.result);w.success?p(w.data):l(w.error)}catch(w){l(w)}}}),s?.signal?.addEventListener("abort",()=>{T(s?.signal?.reason)});const y=s?.timeout??Be,k=()=>T(_.fromError(g.RequestTimeout,"Request timed out",{timeout:y}));this._setupTimeout(f,y,s?.maxTotalTimeout,k,s?.resetTimeoutOnProgress??!1);const h=u?.taskId;if(h){const c=w=>{const v=this._responseHandlers.get(f);v?v(w):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,c),this._enqueueTaskMessage(h,{type:"request",message:m,timestamp:Date.now()}).catch(w=>{this._cleanupTimeout(f),l(w)})}else this._transport.send(m,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:n}).catch(c=>{this._cleanupTimeout(f),l(c)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},ke,t)}async getTaskResult(e,t,s){return this.request({method:"tasks/result",params:e},t,s)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},ve,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},Se,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const s=t?.relatedTask?.taskId;if(s){const i={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[q]:t.relatedTask}}};await this._enqueueTaskMessage(s,{type:"notification",message:i,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let i={...e,jsonrpc:"2.0"};t?.relatedTask&&(i={...i,params:{...i.params,_meta:{...i.params?._meta||{},[q]:t.relatedTask}}}),this._transport?.send(i,t).catch(u=>this._onerror(u))});return}let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[q]:t.relatedTask}}}),await this._transport.send(n,t)}setRequestHandler(e,t){const s=G(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(r,o)=>{const n=B(e,r);return Promise.resolve(t(n,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const s=G(e);this._notificationHandlers.set(s,r=>{const o=B(e,r);return Promise.resolve(t(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,s){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,s,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const s=await this._taskMessageQueue.dequeueAll(e,t);for(const r of s)if(r.type==="request"&&D(r.message)){const o=r.message.id,n=this._requestResolvers.get(o);n?(n(new _(g.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let s=this._options?.defaultTaskPollInterval??1e3;try{const r=await this._taskStore?.getTask(e);r?.pollInterval&&(s=r.pollInterval)}catch{}return new Promise((r,o)=>{if(t.aborted){o(new _(g.InvalidRequest,"Request cancelled"));return}const n=setTimeout(r,s);t.addEventListener("abort",()=>{clearTimeout(n),o(new _(g.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const s=this._taskStore;if(!s)throw new Error("No task store configured");return{createTask:async r=>{if(!e)throw new Error("No request provided");return await s.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async r=>{const o=await s.getTask(r,t);if(!o)throw new _(g.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(r,o,n)=>{await s.storeTaskResult(r,o,n,t);const i=await s.getTask(r,t);if(i){const u=W.parse({method:"notifications/tasks/status",params:i});await this.notification(u),R(i.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>s.getTaskResult(r,t),updateTaskStatus:async(r,o,n)=>{const i=await s.getTask(r,t);if(!i)throw new _(g.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(R(i.status))throw new _(g.InvalidParams,`Cannot update task "${r}" from terminal status "${i.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await s.updateTaskStatus(r,o,n,t);const u=await s.getTask(r,t);if(u){const p=W.parse({method:"notifications/tasks/status",params:u});await this.notification(p),R(u.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>s.listTasks(r,t)}}}function Z(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function Ye(a,e){const t={...a};for(const s in e){const r=s,o=e[r];if(o===void 0)continue;const n=t[r];Z(n)&&Z(o)?t[r]={...n,...o}:t[r]=o}return t}var Xe=be();const et=Ce(Xe);function tt(){const a=new et({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Re(a),a}class st{constructor(e){this._ajv=e??tt()}getValidator(e){const t="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return s=>t(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}class rt{constructor(e){this._client=e}async*callToolStream(e,t=se,s){const r=this._client,o={...s,task:s?.task??(r.isToolTask(e.name)?{}:void 0)},n=r.requestStream({method:"tools/call",params:e},t,o),i=r.getToolOutputValidator(e.name);for await(const u of n){if(u.type==="result"&&i){const p=u.result;if(!p.structuredContent&&!p.isError){yield{type:"error",error:new _(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(p.structuredContent)try{const l=i(p.structuredContent);if(!l.valid){yield{type:"error",error:new _(g.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof _){yield{type:"error",error:l};return}yield{type:"error",error:new _(g.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield u}}async getTask(e,t){return this._client.getTask({taskId:e},t)}async getTaskResult(e,t,s){return this._client.getTaskResult({taskId:e},t,s)}async listTasks(e,t){return this._client.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._client.cancelTask({taskId:e},t)}requestStream(e,t,s){return this._client.requestStream(e,t,s)}}function ot(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!a.tools?.call)throw new Error(`${t} does not support task creation for tools/call (required for ${e})`);break}}function at(a,e,t){if(!a)throw new Error(`${t} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!a.sampling?.createMessage)throw new Error(`${t} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!a.elicitation?.create)throw new Error(`${t} does not support task creation for elicitation/create (required for ${e})`);break}}function O(a,e){if(!(!a||e===null||typeof e!="object")){if(a.type==="object"&&a.properties&&typeof a.properties=="object"){const t=e,s=a.properties;for(const r of Object.keys(s)){const o=s[r];t[r]===void 0&&Object.prototype.hasOwnProperty.call(o,"default")&&(t[r]=o.default),t[r]!==void 0&&O(o,t[r])}}if(Array.isArray(a.anyOf))for(const t of a.anyOf)typeof t!="boolean"&&O(t,e);if(Array.isArray(a.oneOf))for(const t of a.oneOf)typeof t!="boolean"&&O(t,e)}}function nt(a){if(!a)return{supportsFormMode:!1,supportsUrlMode:!1};const e=a.form!==void 0,t=a.url!==void 0;return{supportsFormMode:e||!e&&!t,supportsUrlMode:t}}let it=class extends Ze{constructor(e,t){super(t),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=t?.capabilities??{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new st,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",Ie,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Ee,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",qe,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new rt(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ye(this._capabilities,e)}setRequestHandler(e,t){const r=oe(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o;if(x(r)){const i=r;o=i._zod?.def?.value??i.value}else{const i=r;o=i._def?.value??i.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");const n=o;if(n==="elicitation/create"){const i=async(u,p)=>{const l=b(De,u);if(!l.success){const c=l.error instanceof Error?l.error.message:String(l.error);throw new _(g.InvalidParams,`Invalid elicitation request: ${c}`)}const{params:d}=l.data;d.mode=d.mode??"form";const{supportsFormMode:f,supportsUrlMode:m}=nt(this._capabilities.elicitation);if(d.mode==="form"&&!f)throw new _(g.InvalidParams,"Client does not support form-mode elicitation requests");if(d.mode==="url"&&!m)throw new _(g.InvalidParams,"Client does not support URL-mode elicitation requests");const T=await Promise.resolve(t(u,p));if(d.task){const c=b(L,T);if(!c.success){const w=c.error instanceof Error?c.error.message:String(c.error);throw new _(g.InvalidParams,`Invalid task creation result: ${w}`)}return c.data}const y=b(Le,T);if(!y.success){const c=y.error instanceof Error?y.error.message:String(y.error);throw new _(g.InvalidParams,`Invalid elicitation result: ${c}`)}const k=y.data,h=d.mode==="form"?d.requestedSchema:void 0;if(d.mode==="form"&&k.action==="accept"&&k.content&&h&&this._capabilities.elicitation?.form?.applyDefaults)try{O(h,k.content)}catch{}return k};return super.setRequestHandler(e,i)}if(n==="sampling/createMessage"){const i=async(u,p)=>{const l=b(Ve,u);if(!l.success){const k=l.error instanceof Error?l.error.message:String(l.error);throw new _(g.InvalidParams,`Invalid sampling request: ${k}`)}const{params:d}=l.data,f=await Promise.resolve(t(u,p));if(d.task){const k=b(L,f);if(!k.success){const h=k.error instanceof Error?k.error.message:String(k.error);throw new _(g.InvalidParams,`Invalid task creation result: ${h}`)}return k.data}const T=d.tools||d.toolChoice?Qe:ze,y=b(T,f);if(!y.success){const k=y.error instanceof Error?y.error.message:String(y.error);throw new _(g.InvalidParams,`Invalid sampling result: ${k}`)}return y.data};return super.setRequestHandler(e,i)}return super.setRequestHandler(e,t)}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(await super.connect(e),e.sessionId===void 0)try{const s=await this.request({method:"initialize",params:{protocolVersion:Pe,capabilities:this._capabilities,clientInfo:this._clientInfo}},$e,t);if(s===void 0)throw new Error(`Server sent invalid initialize result: ${s}`);if(!Me.includes(s.protocolVersion))throw new Error(`Server's protocol version is not supported: ${s.protocolVersion}`);this._serverCapabilities=s.capabilities,this._serverVersion=s.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(s.protocolVersion),this._instructions=s.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(s){throw this.close(),s}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break}}assertTaskCapability(e){ot(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&at(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},A,e)}async complete(e,t){return this.request({method:"completion/complete",params:e},Ae,t)}async setLoggingLevel(e,t){return this.request({method:"logging/setLevel",params:{level:e}},A,t)}async getPrompt(e,t){return this.request({method:"prompts/get",params:e},He,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},Oe,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},Ue,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},xe,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},Ne,t)}async subscribeResource(e,t){return this.request({method:"resources/subscribe",params:e},A,t)}async unsubscribeResource(e,t){return this.request({method:"resources/unsubscribe",params:e},A,t)}async callTool(e,t=se,s){if(this.isToolTaskRequired(e.name))throw new _(g.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const r=await this.request({method:"tools/call",params:e},t,s),o=this.getToolOutputValidator(e.name);if(o){if(!r.structuredContent&&!r.isError)throw new _(g.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(r.structuredContent)try{const n=o(r.structuredContent);if(!n.valid)throw new _(g.InvalidParams,`Structured content does not match the tool's output schema: ${n.errorMessage}`)}catch(n){throw n instanceof _?n:new _(g.InvalidParams,`Failed to validate structured content: ${n instanceof Error?n.message:String(n)}`)}}return r}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const t of e){if(t.outputSchema){const r=this._jsonSchemaValidator.getValidator(t.outputSchema);this._cachedToolOutputValidators.set(t.name,r)}const s=t.execution?.taskSupport;(s==="required"||s==="optional")&&this._cachedKnownTaskTools.add(t.name),s==="required"&&this._cachedRequiredTaskTools.add(t.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,t){const s=await this.request({method:"tools/list",params:e},je,t);return this.cacheToolMetadata(s.tools),s}_setupListChangedHandler(e,t,s,r){const o=Fe.safeParse(s);if(!o.success)throw new Error(`Invalid ${e} listChanged options: ${o.error.message}`);if(typeof s.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);const{autoRefresh:n,debounceMs:i}=o.data,{onChanged:u}=s,p=async()=>{if(!n){u(null,null);return}try{const d=await r();u(null,d)}catch(d){const f=d instanceof Error?d:new Error(String(d));u(f,null)}},l=()=>{if(i){const d=this._listChangedDebounceTimers.get(e);d&&clearTimeout(d);const f=setTimeout(p,i);this._listChangedDebounceTimers.set(e,f)}else p()};this.setNotificationHandler(t,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};const j=a=>[{type:"text",text:a}];function ct(a){const e=U(a,typeof window<"u"?window.location.origin:void 0);if(!e)throw new Error("RestSelfClient requires either studioUrl or a browser environment.");const t={"Content-Type":"application/json",Accept:"application/json",...a.token?{Authorization:`Bearer ${a.token}`}:{}},s=u=>new URL(`/api/${encodeURIComponent(a.orgSlug)}${u}`,e).href,r=async u=>{let p;try{p=await fetch(s(`/tools/${encodeURIComponent(u.name)}`),{method:"POST",headers:t,credentials:"include",body:JSON.stringify(u.arguments??{})})}catch(d){const f=d instanceof Error?d.message:"Network error";return{content:j(f),isError:!0}}if(!p.ok){let d=`${u.name} failed (${p.status})`;try{const f=await p.json();f?.error&&(d=f.error)}catch{}return{content:j(d),isError:!0}}const l=await p.json().catch(()=>({}));return{content:j(typeof l=="string"?l:JSON.stringify(l)),structuredContent:l}},o=async()=>{const u=await fetch(s("/tools"),{method:"GET",headers:t,credentials:"include"});return u.ok?await u.json():{tools:[]}},n=u=>()=>Promise.reject(new Error(`RestSelfClient: ${u} is not supported over REST for the self connection`));return{callTool:r,listTools:o,listPrompts:n("listPrompts"),getPrompt:n("getPrompt"),listResources:n("listResources"),readResource:n("readResource"),listResourceTemplates:n("listResourceTemplates"),close:()=>Promise.resolve(),toJSON:()=>a.toJSONString}}function V(a){return a?a instanceof Headers?Object.fromEntries(a.entries()):Array.isArray(a)?Object.fromEntries(a):{...a}:{}}function lt(a=fetch,e){return e?async(t,s)=>{const r={...e,...s,headers:s?.headers?{...V(e.headers),...V(s.headers)}:e.headers};return a(t,r)}:a}class Y extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}const X=10,ut=13,I=32;function F(a){}function dt(a){if(typeof a=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=F,onError:t=F,onRetry:s=F,onComment:r}=a,o=[];let n=!0,i,u="",p=0,l;function d(h){if(n&&(n=!1,h.charCodeAt(0)===239&&h.charCodeAt(1)===187&&h.charCodeAt(2)===191&&(h=h.slice(3))),o.length===0){const v=f(h);v!==""&&o.push(v);return}if(h.indexOf(`
|
|
2
|
+
`)===-1&&h.indexOf("\r")===-1){o.push(h);return}o.push(h);const c=o.join("");o.length=0;const w=f(c);w!==""&&o.push(w)}function f(h){let c=0;if(h.indexOf("\r")===-1){let w=h.indexOf(`
|
|
3
|
+
`,c);for(;w!==-1;){if(c===w){p>0&&e({id:i,event:l,data:u}),i=void 0,u="",p=0,l=void 0,c=w+1,w=h.indexOf(`
|
|
4
|
+
`,c);continue}const v=h.charCodeAt(c);if(ee(h,c,v)){const S=h.charCodeAt(c+5)===I?c+6:c+5,C=h.slice(S,w);if(p===0&&h.charCodeAt(w+1)===X){e({id:i,event:l,data:C}),i=void 0,u="",l=void 0,c=w+2,w=h.indexOf(`
|
|
5
|
+
`,c);continue}u=p===0?C:`${u}
|
|
6
|
+
${C}`,p++}else te(h,c,v)?l=h.slice(h.charCodeAt(c+6)===I?c+7:c+6,w)||void 0:m(h,c,w);c=w+1,w=h.indexOf(`
|
|
7
|
+
`,c)}return h.slice(c)}for(;c<h.length;){const w=h.indexOf("\r",c),v=h.indexOf(`
|
|
8
|
+
`,c);let S=-1;if(w!==-1&&v!==-1?S=w<v?w:v:w!==-1?w===h.length-1?S=-1:S=w:v!==-1&&(S=v),S===-1)break;m(h,c,S),c=S+1,h.charCodeAt(c-1)===ut&&h.charCodeAt(c)===X&&c++}return h.slice(c)}function m(h,c,w){if(c===w){y();return}const v=h.charCodeAt(c);if(ee(h,c,v)){const E=h.charCodeAt(c+5)===I?c+6:c+5,J=h.slice(E,w);u=p===0?J:`${u}
|
|
9
|
+
${J}`,p++;return}if(te(h,c,v)){l=h.slice(h.charCodeAt(c+6)===I?c+7:c+6,w)||void 0;return}if(v===105&&h.charCodeAt(c+1)===100&&h.charCodeAt(c+2)===58){const E=h.slice(h.charCodeAt(c+3)===I?c+4:c+3,w);i=E.includes("\0")?void 0:E;return}if(v===58){if(r){const E=h.slice(c,w);r(E.slice(h.charCodeAt(c+1)===I?2:1))}return}const S=h.slice(c,w),C=S.indexOf(":");if(C===-1){T(S,"",S);return}const ie=S.slice(0,C),ce=S.charCodeAt(C+1)===I?2:1,le=S.slice(C+ce);T(ie,le,S)}function T(h,c,w){switch(h){case"event":l=c||void 0;break;case"data":u=p===0?c:`${u}
|
|
10
|
+
${c}`,p++;break;case"id":i=c.includes("\0")?void 0:c;break;case"retry":/^\d+$/.test(c)?s(parseInt(c,10)):t(new Y(`Invalid \`retry\` value: "${c}"`,{type:"invalid-retry",value:c,line:w}));break;default:t(new Y(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:c,line:w}));break}}function y(){p>0&&e({id:i,event:l,data:u}),i=void 0,u="",p=0,l=void 0}function k(h={}){if(h.consume&&o.length>0){const c=o.join("");m(c,0,c.length)}n=!0,i=void 0,u="",p=0,l=void 0,o.length=0}return{feed:d,reset:k}}function ee(a,e,t){return t===100&&a.charCodeAt(e+1)===97&&a.charCodeAt(e+2)===116&&a.charCodeAt(e+3)===97&&a.charCodeAt(e+4)===58}function te(a,e,t){return t===101&&a.charCodeAt(e+1)===118&&a.charCodeAt(e+2)===101&&a.charCodeAt(e+3)===110&&a.charCodeAt(e+4)===116&&a.charCodeAt(e+5)===58}class ht extends TransformStream{constructor({onError:e,onRetry:t,onComment:s}={}){let r;super({start(o){r=dt({onEvent:n=>{o.enqueue(n)},onError(n){e==="terminate"?o.error(n):typeof e=="function"&&e(n)},onRetry:t,onComment:s})},transform(o){r.feed(o)}})}}const ft={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class $ extends Error{constructor(e,t){super(`Streamable HTTP error: ${t}`),this.code=e}}let pt=class{constructor(e,t){this._hasCompletedAuthFlow=!1,this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=t?.requestInit,this._authProvider=t?.authProvider,this._fetch=t?.fetch,this._fetchWithInit=lt(t?.fetch,t?.requestInit),this._sessionId=t?.sessionId,this._reconnectionOptions=t?.reconnectionOptions??ft}async _authThenStart(){if(!this._authProvider)throw new P("No auth provider");let e;try{e=await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(t){throw this.onerror?.(t),t}if(e!=="AUTHORIZED")throw new P;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const e={};if(this._authProvider){const s=await this._authProvider.tokens();s&&(e.Authorization=`Bearer ${s.access_token}`)}this._sessionId&&(e["mcp-session-id"]=this._sessionId),this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const t=V(this._requestInit?.headers);return new Headers({...e,...t})}async _startOrAuthSse(e){const{resumptionToken:t}=e;try{const s=await this._commonHeaders();s.set("Accept","text/event-stream"),t&&s.set("last-event-id",t);const r=await(this._fetch??fetch)(this._url,{method:"GET",headers:s,signal:this._abortController?.signal});if(!r.ok){if(await r.body?.cancel(),r.status===401&&this._authProvider)return await this._authThenStart();if(r.status===405)return;throw new $(r.status,`Failed to open SSE stream: ${r.statusText}`)}this._handleSseStream(r.body,e,!0)}catch(s){throw this.onerror?.(s),s}}_getNextReconnectionDelay(e){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const t=this._reconnectionOptions.initialReconnectionDelay,s=this._reconnectionOptions.reconnectionDelayGrowFactor,r=this._reconnectionOptions.maxReconnectionDelay;return Math.min(t*Math.pow(s,e),r)}_scheduleReconnection(e,t=0){const s=this._reconnectionOptions.maxRetries;if(t>=s){this.onerror?.(new Error(`Maximum reconnection attempts (${s}) exceeded.`));return}const r=this._getNextReconnectionDelay(t);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(e).catch(o=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${o instanceof Error?o.message:String(o)}`)),this._scheduleReconnection(e,t+1)})},r)}_handleSseStream(e,t,s){if(!e)return;const{onresumptiontoken:r,replayMessageId:o}=t;let n,i=!1,u=!1;(async()=>{try{const l=e.pipeThrough(new TextDecoderStream).pipeThrough(new ht({onRetry:m=>{this._serverRetryMs=m}})).getReader();for(;;){const{value:m,done:T}=await l.read();if(T)break;if(m.id&&(n=m.id,i=!0,r?.(m.id)),!!m.data&&(!m.event||m.event==="message"))try{const y=N.parse(JSON.parse(m.data));M(y)&&(u=!0,o!==void 0&&(y.id=o)),this.onmessage?.(y)}catch(y){this.onerror?.(y)}}(s||i)&&!u&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:n,onresumptiontoken:r,replayMessageId:o},0)}catch(l){if(this.onerror?.(new Error(`SSE stream disconnected: ${l}`)),(s||i)&&!u&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:n,onresumptiontoken:r,replayMessageId:o},0)}catch(m){this.onerror?.(new Error(`Failed to reconnect: ${m instanceof Error?m.message:String(m)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(e){if(!this._authProvider)throw new P("No auth provider");if(await H(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new P("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(e,t){try{const{resumptionToken:s,onresumptiontoken:r}=t||{};if(s){this._startOrAuthSse({resumptionToken:s,replayMessageId:D(e)?e.id:void 0}).catch(f=>this.onerror?.(f));return}const o=await this._commonHeaders();o.set("content-type","application/json"),o.set("accept","application/json, text/event-stream");const n={...this._requestInit,method:"POST",headers:o,body:JSON.stringify(e),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._url,n),u=i.headers.get("mcp-session-id");if(u&&(this._sessionId=u),!i.ok){const f=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new $(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:m,scope:T}=K(i);if(this._resourceMetadataUrl=m,this._scope=T,await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new P;return this._hasCompletedAuthFlow=!0,this.send(e)}if(i.status===403&&this._authProvider){const{resourceMetadataUrl:m,scope:T,error:y}=K(i);if(y==="insufficient_scope"){const k=i.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===k)throw new $(403,"Server returned 403 after trying upscoping");if(T&&(this._scope=T),m&&(this._resourceMetadataUrl=m),this._lastUpscopingHeader=k??void 0,await H(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new P;return this.send(e)}}throw new $(i.status,`Error POSTing to endpoint: ${f}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,i.status===202){await i.body?.cancel(),Je(e)&&this._startOrAuthSse({resumptionToken:void 0}).catch(f=>this.onerror?.(f));return}const l=(Array.isArray(e)?e:[e]).filter(f=>"method"in f&&"id"in f&&f.id!==void 0).length>0,d=i.headers.get("content-type");if(l)if(d?.includes("text/event-stream"))this._handleSseStream(i.body,{onresumptiontoken:r},!1);else if(d?.includes("application/json")){const f=await i.json(),m=Array.isArray(f)?f.map(T=>N.parse(T)):[N.parse(f)];for(const T of m)this.onmessage?.(T)}else throw await i.body?.cancel(),new $(-1,`Unexpected content type: ${d}`);else await i.body?.cancel()}catch(s){throw this.onerror?.(s),s}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const e=await this._commonHeaders(),t={...this._requestInit,method:"DELETE",headers:e,signal:this._abortController?.signal},s=await(this._fetch??fetch)(this._url,t);if(await s.body?.cancel(),!s.ok&&s.status!==405)throw new $(s.status,`Failed to terminate session: ${s.statusText}`);this._sessionId=void 0}catch(e){throw this.onerror?.(e),e}}setProtocolVersion(e){this._protocolVersion=e}get protocolVersion(){return this._protocolVersion}async resumeStream(e,t){await this._startOrAuthSse({resumptionToken:e,onresumptiontoken:t?.onresumptiontoken})}};class mt extends pt{constructor(e,t){super(e,t)}send(e,t){const s=_t(e);return s?.type==="emit"?(this.onmessage?.(s.message),Promise.resolve()):s?.type==="suppress"?Promise.resolve():super.send(e,t)}}function _t(a){const e=a;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const t=e?.params?.protocolVersion;return t?{type:"emit",message:{result:{protocolVersion:t,capabilities:{tools:{},resources:{},prompts:{},tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}},serverInfo:{name:"studio-virtual-mcp",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}}const wt={name:"studio-sdk",version:"1.0.0"};function gt(a,e,t){const s=t??(typeof window<"u"?window.location.origin:void 0);if(!s)throw new Error("MCP client requires either studioUrl or a browser environment.");const r=`/api/${encodeURIComponent(e)}`,o=a?`${r}/mcp/${a}`:`${r}/mcp`;return new URL(o,s).href}async function ae({connectionId:a,orgId:e,orgSlug:t,token:s,studioUrl:r,meshUrl:o,mcpUrl:n}){const i=U({studioUrl:r,meshUrl:o}),u=z.mcpClient(e,a??"self",s??"",n??i??"");if(!n&&(!a||a===Ke))return ct({orgSlug:t,token:s,studioUrl:i,toJSONString:`mcp-client:${u.join(":")}`});const p=n??gt(a,t,i),l=new it(wt,{capabilities:{tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}}}),d=new mt(new URL(p),{requestInit:{headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream",...s?{Authorization:`Bearer ${s}`}:{}}}});return await l.connect(d),l.toJSON=()=>`mcp-client:${u.join(":")}`,l}function ne(a){const{connectionId:e,token:t,studioUrl:s,meshUrl:r,mcpUrl:o,orgId:n}=a,i=U({studioUrl:s,meshUrl:r});return{queryKey:z.mcpClient(n,e??"self",t??"",o??i??""),queryFn:()=>ae(a),staleTime:1/0,gcTime:6e4}}function St(a){const e=Q.c(2);let t;e[0]!==a?(t=ne(a),e[0]=a,e[1]=t):t=e[1];const{data:s}=re(t);return s}function Ct(a){const e=Q.c(2);let t;e[0]!==a?(t=ne(a),e[0]=a,e[1]=t):t=e[1];const{data:s}=We(t);return s??null}function bt(a){const e=Q.c(19),{connectionId:t,orgId:s,orgSlug:r,token:o,studioUrl:n,meshUrl:i,mcpUrl:u}=a;let p;e[0]!==i||e[1]!==n?(p=U({studioUrl:n,meshUrl:i}),e[0]=i,e[1]=n,e[2]=p):p=e[2];const l=p;let d;e[3]!==t||e[4]!==u||e[5]!==s||e[6]!==l||e[7]!==o?(d=t!==void 0?z.mcpClient(s,t??"self",o??"",u??l??""):["mcp","client","skip",s],e[3]=t,e[4]=u,e[5]=s,e[6]=l,e[7]=o,e[8]=d):d=e[8];const f=d;let m;e[9]!==t||e[10]!==u||e[11]!==s||e[12]!==r||e[13]!==l||e[14]!==o?(m=async()=>t===void 0?null:ae({connectionId:t,orgId:s,orgSlug:r,token:o,studioUrl:l,mcpUrl:u}),e[9]=t,e[10]=u,e[11]=s,e[12]=r,e[13]=l,e[14]=o,e[15]=m):m=e[15];let T;e[16]!==f||e[17]!==m?(T={queryKey:f,queryFn:m,staleTime:1/0,gcTime:6e4},e[16]=f,e[17]=m,e[18]=T):T=e[18];const{data:y}=re(T);return y??null}export{et as A,it as C,Ze as P,pt as S,bt as a,Ct as b,ae as c,dt as d,lt as e,ne as m,V as n,St as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,m as u,
|
|
1
|
+
import{c as l,m as u,cq as m,cr as f,z as y,K as n}from"./index-6GXqHE0w.js";async function c(r){if(!r.getServerCapabilities()?.prompts)return{prompts:[]};try{return await r.listPrompts()}catch(t){if(t instanceof m&&t.code===f.MethodNotFound)return{prompts:[]};throw t}}async function b(r,e,t){if(!r.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await r.getPrompt({name:e,arguments:t??{}})}function q(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>c(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],y(a)}function g(r){const e=l.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let i;e[3]!==t?(i=n.mcpPromptsList(t),e[3]=t,e[4]=i):i=e[4];let o;e[5]!==t?(o=()=>c(t),e[5]=t,e[6]=o):o=e[6];const p=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==i||e[9]!==o||e[10]!==p?(a={...s,queryKey:i,queryFn:o,staleTime:p,retry:!1},e[7]=s,e[8]=i,e[9]=o,e[10]=p,e[11]=a):a=e[11],u(a)}export{g as a,b as g,c as l,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,
|
|
1
|
+
import{c as m,z as p,m as q,K as T}from"./index-6GXqHE0w.js";function C(n){const e=m.c(12);let t,o;e[0]!==n?({client:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const r=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==r?(i={...o,queryKey:l,queryFn:s,staleTime:r,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=r,e[11]=i):i=e[11],p(i)}function K(n){const e=m.c(12);let t,o;e[0]!==n?({client:t,...o}=n,e[0]=n,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let s;e[5]!==t?(s=async()=>await t.listTools(),e[5]=t,e[6]=s):s=e[6];const r=o.staleTime??3e4;let i;return e[7]!==o||e[8]!==l||e[9]!==s||e[10]!==r?(i={...o,queryKey:l,queryFn:s,staleTime:r,retry:!1},e[7]=o,e[8]=l,e[9]=s,e[10]=r,e[11]=i):i=e[11],q(i)}function O(n){const e=m.c(21);let t,o,l,s;e[0]!==n?({client:t,toolName:s,toolArguments:l,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let r,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=p,r=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=u}else r=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==y?(c={...r,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}function w(n){const e=m.c(21);let t,o,l,s;e[0]!==n?({client:t,toolName:s,toolArguments:l,...o}=n,e[0]=n,e[1]=t,e[2]=o,e[3]=l,e[4]=s):(t=e[1],o=e[2],l=e[3],s=e[4]);let r,i,u;if(e[5]!==t||e[6]!==o||e[7]!==l||e[8]!==s){const f=JSON.stringify(l??{});u=q,r=o,i=T.mcpToolCall(t,s,f),e[5]=t,e[6]=o,e[7]=l,e[8]=s,e[9]=r,e[10]=i,e[11]=u}else r=e[9],i=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==s?(a=async()=>await t.callTool({name:s,arguments:l}),e[12]=t,e[13]=l,e[14]=s,e[15]=a):a=e[15];const y=o.staleTime??3e4;let c;return e[16]!==r||e[17]!==i||e[18]!==a||e[19]!==y?(c={...r,queryKey:i,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=i,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}export{C as a,O as b,w as c,K as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,
|
|
1
|
+
import{c,I as m,z as b,m as M,K as f}from"./index-6GXqHE0w.js";import{u as y}from"./use-org-auth-client-CVFBkaiI.js";const p=300*1e3;function d(){const t=c.c(7),{locator:e}=m(),o=y();let r;t[0]!==e?(r=f.members(e),t[0]=e,t[1]=r):r=t[1];let s;t[2]!==o?(s=()=>o.organization.listMembers(),t[2]=o,t[3]=s):s=t[3];let n;return t[4]!==r||t[5]!==s?(n={queryKey:r,queryFn:s},t[4]=r,t[5]=s,t[6]=n):n=t[6],b(n)}function q(t){const e=c.c(10);let o;e[0]!==t?(o=t===void 0?{}:t,e[0]=t,e[1]=o):o=e[1];const{enabled:r}=o,s=r===void 0?!0:r,{locator:n}=m(),a=y();let u;e[2]!==n?(u=f.members(n),e[2]=n,e[3]=u):u=e[3];let i;e[4]!==a?(i=()=>a.organization.listMembers(),e[4]=a,e[5]=i):i=e[5];let l;return e[6]!==s||e[7]!==u||e[8]!==i?(l={queryKey:u,queryFn:i,staleTime:p,enabled:s},e[6]=s,e[7]=u,e[8]=i,e[9]=l):l=e[9],M(l)}export{d as a,q as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as m,m as b,ay as T,K as E,I as U,d as K,n as $,a as H,de as N,df as k}from"./index-6GXqHE0w.js";import{c as Q,f as D}from"./use-virtual-mcp-CMlCV8Oj.js";import{b as I}from"./hooks-BSkeWBV7.js";import{p as V,d as _,w as j}from"./thread-intent-AJKohiRy.js";import{h as P,b as S,g as B,a as x}from"./github-repo-C0igpkr9.js";function O(t,e){if(!e)return!0;if(t.partial)return!1;const n=V(t.metadata?.runtime);return n===null||n===e}function w(t,e,n,a,s){let o=null;for(const r of t)r.virtual_mcp_id===e&&r.created_by===n&&(r.hidden||O(r,a)&&(s&&r.branch===s||(!o||r.updated_at>o.updated_at)&&(o=r)));return o}function me(t,e,n,a){return t.find(s=>!s.hidden&&s.virtual_mcp_id===e&&s.created_by===n&&s.title==="New chat"&&!s.harness_id&&O(s,a))}function Y(t,e,n,a,s,o){return s?w(t,e,n,a,o?.baseBranch)??void 0:w(t,e,n,a)??void 0}const z=6e4,A=3e4;function C(t){return{number:t.number,title:t.title,body:t.body,state:t.state==="open"?"open":"closed",merged:t.state==="merged",mergedAt:t.mergedAt,base:t.base,head:t.head,headSha:t.headSha,headRepoFullName:t.headRepoPath,htmlUrl:t.url,author:t.author,changedFiles:t.changedFiles}}function J(t){return{id:t.id,name:t.name,status:t.state==="running"?"in_progress":t.state,conclusion:t.conclusion,htmlUrl:t.url??"",durationMs:t.durationMs}}function q(t){const{orgSlug:e,target:n,owner:a,repo:s,branch:o}=t;return{queryKey:E.githubPrState(e,S(n),a,s,o),queryFn:()=>T(e,"CHANGE_REQUEST_STATE",{...n,branch:o}),enabled:!!o&&P(n)&&!!a&&!!s,refetchInterval:z,refetchIntervalInBackground:!1,staleTime:A}}function W(t){const e=m.c(4);let n;e[0]!==t?(n=q(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a={...n,select:X},e[2]=n,e[3]=a):a=e[3],b(a)}function X(t){return t.changeRequest?C(t.changeRequest):null}function ge(t){const e=m.c(4);let n;e[0]!==t?(n=q(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a={...n,select:Z},e[2]=n,e[3]=a):a=e[3],b(a)}function Z(t){return t.changeRequest?.state==="open"?t.changeRequest.checkRuns.map(J):[]}function be(t){const e=m.c(4);let n;e[0]!==t?(n=q(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a={...n,select:M},e[2]=n,e[3]=a):a=e[3],b(a)}function M(t){return(t.changeRequest?.comments??[]).map(ee)}function ee(t){return{id:t.id,author:t.author,body:t.body,createdAt:t.createdAt,htmlUrl:t.url}}const te=5*6e4;function pe(t){const e=m.c(20),{orgSlug:n,target:a,owner:s,repo:o,base:r}=t;let u;e[0]!==r||e[1]!==n||e[2]!==s||e[3]!==o||e[4]!==a?(u=E.githubLastPublishedPr(n,S(a),s,o,r),e[0]=r,e[1]=n,e[2]=s,e[3]=o,e[4]=a,e[5]=u):u=e[5];let i;e[6]!==r||e[7]!==n||e[8]!==a?(i=()=>T(n,"CHANGE_REQUEST_LAST_MERGED",{...a,base:r}),e[6]=r,e[7]=n,e[8]=a,e[9]=i):i=e[9];let l;e[10]!==t.enabled||e[11]!==r||e[12]!==s||e[13]!==o||e[14]!==a?(l=(t.enabled??!0)&&!!r&&P(a)&&!!s&&!!o,e[10]=t.enabled,e[11]=r,e[12]=s,e[13]=o,e[14]=a,e[15]=l):l=e[15];let c;return e[16]!==u||e[17]!==i||e[18]!==l?(c={queryKey:u,queryFn:i,enabled:l,staleTime:te,select:ne},e[16]=u,e[17]=i,e[18]=l,e[19]=c):c=e[19],b(c)}function ne(t){return t.changeRequest?C(t.changeRequest):null}const ae=50;function ye(t){const e=m.c(17),{orgSlug:n,target:a,owner:s,repo:o}=t;let r;e[0]!==n||e[1]!==s||e[2]!==o||e[3]!==a?(r=E.githubOpenPrs(n,S(a),s,o),e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=r):r=e[4];let u;e[5]!==n||e[6]!==a?(u=()=>T(n,"CHANGE_REQUEST_LIST_OPEN",{...a,limit:ae}),e[5]=n,e[6]=a,e[7]=u):u=e[7];let i;e[8]!==t.enabled||e[9]!==s||e[10]!==o||e[11]!==a?(i=(t.enabled??!0)&&P(a)&&!!s&&!!o,e[8]=t.enabled,e[9]=s,e[10]=o,e[11]=a,e[12]=i):i=e[12];let l;return e[13]!==r||e[14]!==u||e[15]!==i?(l={queryKey:r,queryFn:u,enabled:i,staleTime:A,select:se},e[13]=r,e[14]=u,e[15]=i,e[16]=l):l=e[16],b(l)}function se(t){return t.changeRequests.map(C)}function Re(t){const e=m.c(14),{orgSlug:n,target:a,owner:s,repo:o,checkRunId:r}=t;let u;e[0]!==r||e[1]!==n||e[2]!==s||e[3]!==o||e[4]!==a?(u=E.githubCheckRun(n,S(a),s,o,r),e[0]=r,e[1]=n,e[2]=s,e[3]=o,e[4]=a,e[5]=u):u=e[5];let i;e[6]!==r||e[7]!==n||e[8]!==a?(i=()=>T(n,"CHANGE_REQUEST_CHECK_LOG",{...a,checkId:r}),e[6]=r,e[7]=n,e[8]=a,e[9]=i):i=e[9];const l=t.enabled&&!!r;let c;return e[10]!==u||e[11]!==i||e[12]!==l?(c={queryKey:u,queryFn:i,enabled:l,staleTime:A,select:re},e[10]=u,e[11]=i,e[12]=l,e[13]=c):c=e[13],b(c)}function re(t){return{title:null,summary:t.report,text:null}}function oe(t,e){const{org:n}=U(),a=B(t);return W({orgId:n.id,orgSlug:n.slug,target:x(a),owner:a?.owner??"",repo:a?.name??"",branch:e??null}).data?.base??"main"}const ue=[];function Te(){const t=m.c(13),e=K(),{org:n,locator:a}=U(),s=$(),o=Q(),{data:r}=H.useSession(),u=I(),i=oe(void 0,null);let l;t[0]!==i||t[1]!==o||t[2]!==a||t[3]!==u?.threads||t[4]!==e||t[5]!==n.slug||t[6]!==r?.user?.id?(l=(f,d,y)=>{const h=d?.panel??"overview";if(N(h).kind==="org-destination"){k(e,{tabId:h,org:n.slug,agentId:f,replace:!1});return}const g=(o??[]).find(G=>G.id===f),F=!!(g&&B(g)),L=!d?.runtime,v=L?void 0:Y(u?.threads.get()??ue,f,r?.user?.id,y??(g?_(g.metadata):void 0),F,{baseBranch:i}),R=L?void 0:v?.id??crypto.randomUUID();R&&!v&&d?.runtime&&j(sessionStorage,a,R,{runtime:d.runtime}),k(e,{tabId:h,org:n.slug,agentId:f,search:()=>R?{thread:R}:{},replace:!1})},t[0]=i,t[1]=o,t[2]=a,t[3]=u?.threads,t[4]=e,t[5]=n.slug,t[6]=r?.user?.id,t[7]=l):l=t[7];const c=l;let p;return t[8]!==o||t[9]!==c||t[10]!==n||t[11]!==s?(p=(f,d)=>{if(N(d?.panel??"overview").kind==="org-destination")return c(f,d,void 0);const y=o.find(h=>h.id===f);if(d?.runtime)return c(f,d,d.runtime);if(y)return c(f,d,_(y.metadata));D(s,n).then(h=>h.find(g=>g.id===f)).catch(ie).then(h=>c(f,d,h?_(h.metadata):void 0))},t[8]=o,t[9]=c,t[10]=n,t[11]=s,t[12]=p):p=t[12],p}function ie(){}export{W as a,pe as b,ge as c,ye as d,oe as e,me as f,Y as g,Re as h,be as i,q as p,Te as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{U as l,c as p,ac as m,b as d,e as y,t as E}from"./index-6GXqHE0w.js";const _="[SUBSCRIPTION_REQUIRED]";function D(e){return e?.message.startsWith(_)?e.message.includes("used its free task executions")?"trial_exhausted":e.message.includes("used its monthly task executions")?"monthly_exhausted":e.message.includes("reached its execution limit")?"runs_exhausted":null:null}function h(e){return!e||!e.content||e.content.length===0?!0:e.content.every(n=>n.type==="paragraph"?!n.content||n.content.length===0?!0:n.content.every(t=>t.type==="hardBreak"||t.type==="text"&&(!t.text||t.text.trim()==="")):!1)}const I="__home__";function c(e,n){return l.chatDraft(e,n)}function x(e){if(!e)return null;let n;try{n=JSON.parse(e)}catch{return null}if(!n||typeof n!="object"||typeof n.updatedAt!="number")return null;const t=n.tiptapDoc;return!t||typeof t!="object"||t.type!=="doc"||!Array.isArray(t.content)?null:t}function O(e,n,t,s,u){const r=c(n,t);if(h(s)){e.removeItem(r);return}const o={tiptapDoc:s,updatedAt:Date.now()},a=JSON.stringify(o);try{e.setItem(r,a)}catch(i){if(R(i)){const f=new TextEncoder().encode(a).byteLength;u?.onQuotaExceeded?.({docSizeBytes:f});return}throw i}}function w(e,n,t){const s=c(n,t),u=e.getItem(s),r=x(u);return u!==null&&r===null&&e.removeItem(s),r}function A(e,n,t){e.removeItem(c(n,t))}function R(e){if(!e||typeof e!="object")return!1;const n=e.name;return n==="QuotaExceededError"||n==="NS_ERROR_DOM_QUOTA_REACHED"}function T(e,n){const t=p.c(9),s=m(),u=d();let r;t[0]!==s||t[1]!==e?(r=async()=>{const{url:i}=await s.call(e,{});return i},t[0]=s,t[1]=e,t[2]=r):r=t[2];let o;t[3]!==n||t[4]!==u?(o=i=>E.error(u(n,{message:i.message})),t[3]=n,t[4]=u,t[5]=o):o=t[5];let a;return t[6]!==r||t[7]!==o?(a={mutationFn:r,onSuccess:S,onError:o},t[6]=r,t[7]=o,t[8]=a):a=t[8],y(a)}function S(e){return window.open(e,"_blank","noopener,noreferrer")}export{I as H,A as c,h as i,w as r,D as s,T as u,O as w};
|
package/dist/client/assets/{use-org-auth-client-DvlpnDFO.js → use-org-auth-client-CVFBkaiI.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,
|
|
1
|
+
import{c as x,I as j,a as i}from"./index-6GXqHE0w.js";function A(){const e=x.c(32),{org:O}=j(),o=O.id;let z;e[0]!==o?(z=R=>(f=>i.organization[R]({...f??{},organizationId:o})),e[0]=o,e[1]=z):z=e[1];const t=z;let I;e[2]!==o?(I=R=>(f=>{const y={...f??{}},h=y.query??{};return y.query={...h,organizationId:o},i.organization[R](y)}),e[2]=o,e[3]=I):I=e[3];const n=I;let a,r;e[4]!==n?(a=n("listMembers"),r=n("listRoles"),e[4]=n,e[5]=a,e[6]=r):(a=e[5],r=e[6]);let l,s,c,g,u,m,d,v,b;e[7]!==t?(g=t("inviteMember"),u=t("removeMember"),m=t("updateMemberRole"),d=t("addMember"),v=t("createRole"),b=t("updateRole"),l=t("deleteRole"),s=t("cancelInvitation"),c=t("update"),e[7]=t,e[8]=l,e[9]=s,e[10]=c,e[11]=g,e[12]=u,e[13]=m,e[14]=d,e[15]=v,e[16]=b):(l=e[8],s=e[9],c=e[10],g=e[11],u=e[12],m=e[13],d=e[14],v=e[15],b=e[16]);let p;e[17]!==n?(p=n("getActiveMember"),e[17]=n,e[18]=p):p=e[18];let M;return e[19]!==l||e[20]!==s||e[21]!==c||e[22]!==p||e[23]!==a||e[24]!==r||e[25]!==g||e[26]!==u||e[27]!==m||e[28]!==d||e[29]!==v||e[30]!==b?(M={organization:{listMembers:a,listRoles:r,inviteMember:g,removeMember:u,updateMemberRole:m,addMember:d,createRole:v,updateRole:b,deleteRole:l,cancelInvitation:s,update:c,getActiveMember:p,acceptInvitation:i.organization.acceptInvitation,rejectInvitation:i.organization.rejectInvitation,getInvitation:i.organization.getInvitation,list:i.organization.list,create:i.organization.create,getFullOrganization:i.organization.getFullOrganization}},e[19]=l,e[20]=s,e[21]=c,e[22]=p,e[23]=a,e[24]=r,e[25]=g,e[26]=u,e[27]=m,e[28]=d,e[29]=v,e[30]=b,e[31]=M):M=e[31],M}export{A as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as p,I as S,K as y,m as $,n as T,e as K}from"./index-6GXqHE0w.js";function Y(s){return s.contentHash??`${s.size}-${s.updatedAt}`}function F(s,e,t,n){const i=new URLSearchParams(n).toString();return`/api/${encodeURIComponent(s)}/fs/${encodeURIComponent(e)}/${t}${i?`?${i}`:""}`}async function h(s,e,t){const n=await fetch(s,e);if(n.ok||t?.allow404&&n.status===404)return n;let i="";try{i=(await n.json()).error??""}catch{}throw new Error(i||`HTTP ${n.status}`)}function z(s,e){const t=p.c(15),{org:n}=S();let i;t[0]!==n.id||t[1]!==e||t[2]!==s?(i=y.orgFsList(n.id,s,e),t[0]=n.id,t[1]=e,t[2]=s,t[3]=i):i=t[3];let r;t[4]!==n.id||t[5]!==s?(r=(c,o)=>o?.queryKey[1]===n.id&&o.queryKey[2]===s?c:void 0,t[4]=n.id,t[5]=s,t[6]=r):r=t[6];let a;t[7]!==n.slug||t[8]!==e||t[9]!==s?(a=async()=>(await(await h(F(n.slug,s,"list",{path:e}))).json()).entries.toSorted(x),t[7]=n.slug,t[8]=e,t[9]=s,t[10]=a):a=t[10];let l;return t[11]!==i||t[12]!==r||t[13]!==a?(l={queryKey:i,placeholderData:r,queryFn:a},t[11]=i,t[12]=r,t[13]=a,t[14]=l):l=t[14],$(l)}function x(s,e){return s.kind!==e.kind?s.kind==="dir"?-1:1:s.path.localeCompare(e.path)}async function C(s,e,t){const n=await h(F(s,e,"stat",{path:t}),void 0,{allow404:!0});return n.status===404?null:(await n.json()).entry}function B(s,e,t){const n=p.c(15),{org:i}=S();let r;n[0]!==i.id||n[1]!==e||n[2]!==s?(r=y.orgFsStat(i.id,s??"",e),n[0]=i.id,n[1]=e,n[2]=s,n[3]=r):r=n[3];const a=s!==null;let l;n[4]!==t?(l=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,n[4]=t,n[5]=l):l=n[5];let c;n[6]!==i.slug||n[7]!==e||n[8]!==s?(c=()=>C(i.slug,s??"",e),n[6]=i.slug,n[7]=e,n[8]=s,n[9]=c):c=n[9];let o;return n[10]!==r||n[11]!==a||n[12]!==l||n[13]!==c?(o={queryKey:r,enabled:a,refetchInterval:l,queryFn:c},n[10]=r,n[11]=a,n[12]=l,n[13]=c,n[14]=o):o=n[14],$(o)}function J(s){const e=p.c(9),{org:t}=S();let n;e[0]!==t.id||e[1]!==s?(n=y.orgFsUsage(t.id,s),e[0]=t.id,e[1]=s,e[2]=n):n=e[2];let i;e[3]!==t.slug||e[4]!==s?(i=async()=>await(await h(F(t.slug,s,"usage"))).json(),e[3]=t.slug,e[4]=s,e[5]=i):i=e[5];let r;return e[6]!==n||e[7]!==i?(r={queryKey:n,queryFn:i},e[6]=n,e[7]=i,e[8]=r):r=e[8],$(r)}function V(s,e){const t=p.c(9),n=s===void 0?60:s,{org:i}=S();let r;t[0]!==i.id?(r=y.orgFsRecent(i.id),t[0]=i.id,t[1]=r):r=t[1];const a=e?.enabled;let l;t[2]!==n||t[3]!==i.slug?(l=async()=>(await(await h(`/api/${encodeURIComponent(i.slug)}/fs/recent?limit=${n}`)).json()).entries,t[2]=n,t[3]=i.slug,t[4]=l):l=t[4];let c;return t[5]!==r||t[6]!==a||t[7]!==l?(c={queryKey:r,enabled:a,queryFn:l},t[5]=r,t[6]=a,t[7]=l,t[8]=c):c=t[8],$(c)}const _=50;function G(s,e){const t=p.c(16),{org:n}=S();let i;t[0]!==n.id||t[1]!==s||t[2]!==e?.prefix||t[3]!==e?.volume?(i=y.orgFsSearch(n.id,s,e?.volume??"",e?.prefix??""),t[0]=n.id,t[1]=s,t[2]=e?.prefix,t[3]=e?.volume,t[4]=i):i=t[4];const r=s.length>0;let a;t[5]!==n.id?(a=(o,f)=>f?.queryKey[1]===n.id?o:void 0,t[5]=n.id,t[6]=a):a=t[6];let l;t[7]!==n.slug||t[8]!==s||t[9]!==e?(l=async()=>{const o=new URLSearchParams({q:s,limit:String(_)});return e&&(o.set("volume",e.volume),e.prefix&&o.set("prefix",e.prefix)),(await(await h(`/api/${encodeURIComponent(n.slug)}/fs/search?${o}`)).json()).entries},t[7]=n.slug,t[8]=s,t[9]=e,t[10]=l):l=t[10];let c;return t[11]!==i||t[12]!==r||t[13]!==a||t[14]!==l?(c={queryKey:i,enabled:r,placeholderData:a,queryFn:l},t[11]=i,t[12]=r,t[13]=a,t[14]=l,t[15]=c):c=t[15],$(c)}function Z(s){const e=p.c(8),{org:t}=S();let n;e[0]!==t.id?(n=y.orgFsSkills(t.id),e[0]=t.id,e[1]=n):n=e[1];const i=s?.enabled;let r;e[2]!==t.slug?(r=async()=>{const l=await h(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await l.json();return c.map(j)},e[2]=t.slug,e[3]=r):r=e[3];let a;return e[4]!==n||e[5]!==i||e[6]!==r?(a={queryKey:n,enabled:i,queryFn:r},e[4]=n,e[5]=i,e[6]=r,e[7]=a):a=e[7],$(a)}function j(s){return{volume:s.volume,path:s.path}}async function E(s){const e=await h(`/api/${encodeURIComponent(s)}/fs/skills`),{skills:t}=await e.json();return t}function v(){const s=p.c(7),{org:e}=S();let t;s[0]!==e.id?(t=y.slashSkills(e.id),s[0]=e.id,s[1]=t):t=s[1];let n;s[2]!==e.slug?(n=()=>E(e.slug),s[2]=e.slug,s[3]=n):n=s[3];let i;return s[4]!==t||s[5]!==n?(i={queryKey:t,queryFn:n,staleTime:6e4},s[4]=t,s[5]=n,s[6]=i):i=s[6],$(i)}async function R(s,e,t){return(await h(F(s,e,"read",{path:t}))).text()}function ee(s,e){const t=p.c(8);let n;t[0]!==s?(n=y.fileText(s),t[0]=s,t[1]=n):n=t[1];const i=e?.enabled!==!1&&s!=="";let r;t[2]!==s?(r=async()=>{const l=await fetch(s,{credentials:"include"});return l.ok?await l.text():null},t[2]=s,t[3]=r):r=t[3];let a;return t[4]!==n||t[5]!==i||t[6]!==r?(a={queryKey:n,enabled:i,staleTime:6e4,retry:!1,queryFn:r},t[4]=n,t[5]=i,t[6]=r,t[7]=a):a=t[7],$(a)}const U=new Set(["md","mdx","markdown","txt","text"]),Q=25,M=64*1024,A=256*1024,D=4;function N(s){const e=s.lastIndexOf(".");return e===-1?!1:U.has(s.slice(e+1).toLowerCase())}async function te(s,e,t){const n=t?`${t}/`:"",i=u=>u.startsWith(n)?u.slice(n.length):u,r=[],a=[],l=[{path:t,depth:0}];for(;l.length>0;){const u=l.shift();if(!u)break;let g;try{g=(await(await h(F(s,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const d of[...g].sort((I,q)=>I.path.localeCompare(q.path))){if(d.kind==="dir"){u.depth<D&&l.push({path:d.path,depth:u.depth+1});continue}N(d.path)&&d.size<=M&&r.length<Q?r.push(d.path):a.push(i(d.path))}}const c=await Promise.all(r.map(u=>R(s,e,u).catch(()=>null))),o=[];let f=0;return r.forEach((u,g)=>{const d=c[g];if(d==null||f+d.length>A){a.push(i(u));return}f+=d.length,o.push({relPath:i(u),content:d})}),o.sort((u,g)=>u.relPath==="SKILL.md"?-1:g.relPath==="SKILL.md"?1:u.relPath.localeCompare(g.relPath)),a.sort(),{files:o,omittedPaths:a}}function se(){const s=p.c(7),{org:e}=S();let t;s[0]!==e.id?(t=y.orgFsPublicSets(e.id),s[0]=e.id,s[1]=t):t=s[1];let n;s[2]!==e.slug?(n=async()=>(await(await h(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,s[2]=e.slug,s[3]=n):n=s[3];let i;return s[4]!==t||s[5]!==n?(i={queryKey:t,staleTime:3e5,queryFn:n},s[4]=t,s[5]=n,s[6]=i):i=s[6],$(i)}function ne(s){const e=p.c(3),{org:t}=S();let n;return e[0]!==t.slug||e[1]!==s?(n=i=>F(t.slug,s,"read",{path:i}),e[0]=t.slug,e[1]=s,e[2]=n):n=e[2],n}function ie(){const s=p.c(2),{org:e}=S();let t;return s[0]!==e.slug?(t=(n,i)=>F(e.slug,n,"read",{path:i}),s[0]=e.slug,s[1]=t):t=s[1],t}function re(s){const e=p.c(3),{org:t}=S();let n;return e[0]!==t||e[1]!==s?(n={mutationFn:async i=>(await(await h(F(t.slug,s,"file",{path:i.path}),{method:"PUT",headers:{"content-type":i.contentType??"text/html; charset=utf-8"},body:i.body})).json()).entry},e[0]=t,e[1]=s,e[2]=n):n=e[2],K(n)}function ae(s){const e=p.c(18),{org:t}=S(),n=T();let i;e[0]!==t||e[1]!==s?(i=async o=>(await(await h(F(t.slug,s,"public",{path:o.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:o.mode,password:o.password})})).json()).entry,e[0]=t,e[1]=s,e[2]=i):i=e[2];let r;e[3]!==t||e[4]!==n||e[5]!==s?(r=async o=>{const f=y.orgFsStat(t.id,s,o.path);await n.cancelQueries({queryKey:f});const u=n.getQueryData(f),g=o.mode!=="private";return n.setQueryData(f,d=>d&&{...d,readPublic:g,effectivePublic:g,shareMode:o.mode}),{key:f,previous:u}},e[3]=t,e[4]=n,e[5]=s,e[6]=r):r=e[6];let a;e[7]!==n?(a=(o,f,u)=>{u&&n.setQueryData(u.key,u.previous)},e[7]=n,e[8]=a):a=e[8];let l;e[9]!==t||e[10]!==n||e[11]!==s?(l=(o,f,u)=>{n.invalidateQueries({queryKey:y.orgFsStat(t.id,s,u.path)}),n.invalidateQueries({queryKey:y.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=n,e[11]=s,e[12]=l):l=e[12];let c;return e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==l?(c={mutationFn:i,onMutate:r,onError:a,onSettled:l},e[13]=i,e[14]=r,e[15]=a,e[16]=l,e[17]=c):c=e[17],K(c)}function le(s){const e=p.c(33),{org:t}=S(),n=T();let i;e[0]!==t||e[1]!==n||e[2]!==s?(i=()=>{n.invalidateQueries({queryKey:y.orgFsVolume(t.id,s)}),n.invalidateQueries({queryKey:y.orgFsRecent(t.id)}),n.invalidateQueries({queryKey:y.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=n,e[2]=s,e[3]=i):i=e[3];const r=i;let a;e[4]!==t||e[5]!==s?(a=async w=>{const k=(await Promise.allSettled(w.files.map(O=>{const P=w.dir?`${w.dir}/${O.name}`:O.name;return h(F(t.slug,s,"file",{path:P}),{method:"PUT",headers:{"content-type":O.type||"application/octet-stream"},body:O})}))).find(X);if(k)throw k.reason},e[4]=t,e[5]=s,e[6]=a):a=e[6];let l;e[7]!==r||e[8]!==a?(l={mutationFn:a,onSettled:r},e[7]=r,e[8]=a,e[9]=l):l=e[9];const c=K(l);let o;e[10]!==t||e[11]!==s?(o=async w=>{await h(F(t.slug,s,"dir",{path:w}),{method:"POST"})},e[10]=t,e[11]=s,e[12]=o):o=e[12];let f;e[13]!==r||e[14]!==o?(f={mutationFn:o,onSuccess:r},e[13]=r,e[14]=o,e[15]=f):f=e[15];const u=K(f);let g;e[16]!==t||e[17]!==s?(g=async w=>{await h(F(t.slug,s,"file",{path:w}),{method:"DELETE"})},e[16]=t,e[17]=s,e[18]=g):g=e[18];let d;e[19]!==r||e[20]!==g?(d={mutationFn:g,onSuccess:r},e[19]=r,e[20]=g,e[21]=d):d=e[21];const I=K(d);let q;e[22]!==t||e[23]!==s?(q=async w=>{await h(F(t.slug,s,"move"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(w)})},e[22]=t,e[23]=s,e[24]=q):q=e[24];let m;e[25]!==r||e[26]!==q?(m={mutationFn:q,onSuccess:r},e[25]=r,e[26]=q,e[27]=m):m=e[27];const b=K(m);let L;return e[28]!==u||e[29]!==b||e[30]!==I||e[31]!==c?(L={upload:c,mkdir:u,remove:I,move:b},e[28]=u,e[29]=b,e[30]=I,e[31]=c,e[32]=L):L=e[32],L}function X(s){return s.status==="rejected"}export{E as a,ne as b,ee as c,re as d,Y as e,te as f,ae as g,le as h,ie as i,V as j,Z as k,z as l,G as m,se as n,J as o,v as p,C as q,B as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,m as r,K as l}from"./index-
|
|
1
|
+
import{c as a,m as r,K as l}from"./index-6GXqHE0w.js";function y(t){const e=a.c(8);let n;e[0]!==t?(n=l.orgNotice(t??""),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==t?(s=async()=>{const o=await fetch(`/api/${t}/notice`,{credentials:"include"});return o.ok?(await o.json()).notice??null:null},e[2]=t,e[3]=s):s=e[3];const c=!!t;let i;return e[4]!==n||e[5]!==s||e[6]!==c?(i={queryKey:n,queryFn:s,enabled:c,staleTime:6e4},e[4]=n,e[5]=s,e[6]=c,e[7]=i):i=e[7],r(i)}export{y as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,m as S,n as r,e as y,K as c}from"./index-
|
|
1
|
+
import{c as u,m as S,n as r,e as y,K as c}from"./index-6GXqHE0w.js";async function f(i,a,e){const s=await fetch(i,a);if(!s.ok){const t=await s.json().catch(()=>null);throw new Error(t?.error||e)}return s.json()}function m(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoStatus(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/status`,void 0,"Failed to check SSO status"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function q(i,a){const e=u.c(8);let s;e[0]!==i?(s=c.orgSsoConfig(i??""),e[0]=i,e[1]=s):s=e[1];let t;e[2]!==a?(t=()=>f(`/api/${a}/sso/config`,void 0,"Failed to fetch SSO config"),e[2]=a,e[3]=t):t=e[3];const n=!!i&&!!a;let o;return e[4]!==s||e[5]!==t||e[6]!==n?(o={queryKey:s,queryFn:t,enabled:n},e[4]=s,e[5]=t,e[6]=n,e[7]=o):o=e[7],S(o)}function C(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)},"Failed to save SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function O(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=()=>f(`/api/${a}/sso/config`,{method:"DELETE"},"Failed to delete SSO config"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}function h(i,a){const e=u.c(8),s=r();let t;e[0]!==a?(t=l=>f(`/api/${a}/sso/config/enforce`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enforced:l})},"Failed to toggle SSO enforcement"),e[0]=a,e[1]=t):t=e[1];let n;e[2]!==i||e[3]!==s?(n=()=>{s.invalidateQueries({queryKey:c.orgSsoConfig(i)}),s.invalidateQueries({queryKey:c.orgSsoStatus(i)})},e[2]=i,e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==t||e[6]!==n?(o={mutationFn:t,onSuccess:n},e[5]=t,e[6]=n,e[7]=o):o=e[7],y(o)}export{q as a,C as b,O as c,h as d,m as u};
|
package/dist/client/assets/{use-organization-roles-B3neE_6D.js → use-organization-roles-yO3kgQbK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as R}from"./use-org-auth-client-
|
|
1
|
+
import{u as R}from"./use-org-auth-client-CVFBkaiI.js";import{I as b,m as P,K as y}from"./index-6GXqHE0w.js";const w=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function B(t){return t.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function I(t){if(!t)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const n=[];let i=!1;const u=[];let c=!1;const a=new Set;let s=!1,f=0,e=!1;for(const[l,o]of Object.entries(t)){if(l==="self"){o.includes("*")?i=!0:n.push(...o);continue}if(l==="models"){o.includes("*:*")?e=!0:f=o.length;continue}if(l==="*"){if(c=!0,o.includes("*"))s=!0;else for(const r of o)a.add(r);continue}if(u.push(l),o.includes("*"))s=!0;else for(const r of o)a.add(r)}return{staticPermissions:n,allowsAllStaticPermissions:i,connectionIds:u,allowsAllConnections:c,toolNames:Array.from(a),allowsAllTools:s,modelCount:f,allowsAllModels:e}}function v(){const{locator:t}=b(),n=R(),{data:i,isLoading:u,error:c,refetch:a}=P({queryKey:y.organizationRoles(t),queryFn:async()=>{try{const e=await n.organization.listRoles();return e?.error?(console.error("[useOrganizationRoles] API error:",e.error),[]):e?.data??[]}catch(e){return console.error("[useOrganizationRoles] Fetch error:",e),[]}},staleTime:3e4}),s=w.map(e=>({role:e.value,label:e.label,isBuiltin:e.isBuiltin}));if(i&&Array.isArray(i))for(const e of i){const l=e.role;if(!l||w.some(h=>h.value===l))continue;const{staticPermissions:o,allowsAllStaticPermissions:r,connectionIds:g,allowsAllConnections:m,toolNames:p,allowsAllTools:d,modelCount:C,allowsAllModels:A}=I(e.permission);s.push({id:e.id,role:l,label:B(l),isBuiltin:!1,permission:e.permission??void 0,staticPermissionCount:r?-1:o.length,allowsAllStaticPermissions:r,connectionCount:m?-1:g.length,allowsAllConnections:m,toolCount:d?-1:p.length,allowsAllTools:d,modelCount:A?-1:C,allowsAllModels:A})}const f=s.filter(e=>!e.isBuiltin);return{roles:s,customRoles:f,builtinRoles:s.filter(e=>e.isBuiltin),isLoading:u,error:c,refetch:a}}export{v as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as r,a as E,at as M,I as S,m as h,ay as R,K as T,W as w,ac as N,n as F,e as P}from"./index-6GXqHE0w.js";import{D as $,o as z,a as x}from"./schema-Cnskrzk1.js";import{r as D}from"./task-board-DyZE7mH1.js";const A={organizationId:"",sidebar_items:null,enabled_plugins:null,coding_agent_mcp_excluded:null,registry_config:null,simple_mode:null,default_home_agents:null,flags:null},b={tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}};function O(t,e){return{queryKey:T.organizationSettings(e),queryFn:async()=>{try{return await R(t,"ORGANIZATION_SETTINGS_GET",{})}catch{return{...A,organizationId:e}}},staleTime:6e4}}function c(t){const e=r.c(6),{org:n}=S();let s;e[0]!==n.id||e[1]!==n.slug?(s=O(n.slug,n.id),e[0]=n.id,e[1]=n.slug,e[2]=s):s=e[2];const o=t;let i;return e[3]!==s||e[4]!==o?(i={...s,select:o},e[3]=s,e[4]=o,e[5]=i):i=e[5],h(i)}function j(t,e){const n=r.c(3);let s;n[0]!==t||n[1]!==e?(s=O(e,t),n[0]=t,n[1]=e,n[2]=s):s=n[2];const{data:o}=h(s);return o??null}function m(){const t=r.c(9),{org:e}=S(),n=N(),s=F();let o;t[0]!==e||t[1]!==n?(o=async l=>{const u=await n.call("ORGANIZATION_SETTINGS_UPDATE",{organizationId:e.id,...l});if(!u)throw new Error("ORGANIZATION_SETTINGS_UPDATE returned no payload");return u},t[0]=e,t[1]=n,t[2]=o):o=t[2];let i;t[3]!==e||t[4]!==s?(i=l=>{s.setQueryData(T.organizationSettings(e.id),u=>({...u??A,...l}))},t[3]=e,t[4]=s,t[5]=i):i=t[5];let a;return t[6]!==o||t[7]!==i?(a={mutationFn:o,onSuccess:i},t[6]=o,t[7]=i,t[8]=a):a=t[8],P(a)}function U(t){return t?.tiers?{tiers:{fast:t.tiers.fast??null,smart:t.tiers.smart??null,thinking:t.tiers.thinking??null,image:t.tiers.image??null,web_search:t.tiers.web_search??null,deep_research:t.tiers.deep_research??null}}:b}function B(){const{data:t}=c(k);return t??b}function k(t){return U(t.simple_mode)}function V(){const t=r.c(7),e=m();let n,s;t[0]!==e?(n=(i,a)=>e.mutate({simple_mode:i},a),s=(i,a)=>e.mutateAsync({simple_mode:i},a),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function H(){return d("reports_only")}function d(t){const e=r.c(5);let n;e[0]!==t?(n=i=>z(i.flags,t),e[0]=t,e[1]=n):n=e[1];const{data:s}=c(n);let o;return e[2]!==s||e[3]!==t?(o=s??$.has(t),e[2]=s,e[3]=t,e[4]=o):o=e[4],o}function C(t){return!!t&&t.trim().toLowerCase().endsWith("@deco.cx")}function J(){const{data:t}=E.useSession();return C(t?.user?.email)}function X(){const t=r.c(8),{data:e}=E.useSession(),n=M();let s;t[0]!==n.auth.localMode||t[1]!==e?.user?.email?(s=n.auth.localMode===!0||C(e?.user?.email),t[0]=n.auth.localMode,t[1]=e?.user?.email,t[2]=s):s=t[2];const o=s,i=n.hostingControlPlaneGa===!0,a=n.monitorGa===!0,l=d("hosting_enabled"),u=d("deco_analytics_enabled"),I=d("e2e_enabled"),G=d("monitor_enabled"),g=o||i||l,_=o||i||u,p=o||i||I,y=o||a||G;let f;return t[3]!==g||t[4]!==_||t[5]!==p||t[6]!==y?(f={hosting:g,analytics:_,e2e:p,monitor:y},t[3]=g,t[4]=_,t[5]=p,t[6]=y,t[7]=f):f=t[7],f}function tt(){const{data:t}=c(L);return t??!1}function L(t){return x(t.flags)}function et(){const{data:t}=c(v);return t??!0}function v(t){return D(t.flags)}function nt(){const t=r.c(7),e=m();let n,s;t[0]!==e?(n=(i,a,l)=>e.mutate({flags:{[i]:a}},l),s=(i,a,l)=>e.mutateAsync({flags:{[i]:a}},l),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function st(){const t=r.c(2),{data:e}=c(K);let n;return t[0]!==e?(n=e??[],t[0]=e,t[1]=n):n=t[1],n}function K(t){return t.coding_agent_mcp_excluded}function ot(){const t=r.c(5),e=m();let n;t[0]!==e?(n=(o,i)=>e.mutate({coding_agent_mcp_excluded:o},i),t[0]=e,t[1]=n):n=t[1];let s;return t[2]!==e||t[3]!==n?(s={...e,mutate:n},t[2]=e,t[3]=n,t[4]=s):s=t[4],s}function Q(){const{data:t}=c(Y);return t??null}function Y(t){return t.registry_config}function it(){const t=r.c(7),e=m();let n,s;t[0]!==e?(n=(i,a)=>e.mutate({registry_config:i},a),s=(i,a)=>e.mutateAsync({registry_config:i},a),t[0]=e,t[1]=n,t[2]=s):(n=t[1],s=t[2]);let o;return t[3]!==e||t[4]!==n||t[5]!==s?(o={...e,mutate:n,mutateAsync:s},t[3]=e,t[4]=n,t[5]=s,t[6]=o):o=t[6],o}function at(){const t=r.c(5),{org:e}=S(),n=Q();let s;t[0]!==e.id?(s=w.REGISTRY(e.id),t[0]=e.id,t[1]=s):s=t[1];const o=s;let i;return t[2]!==o||t[3]!==n?(i=a=>{if(!n)return a===o;const l=n.registries[a];return l?l.enabled:a===o},t[2]=o,t[3]=n,t[4]=i):i=t[4],i}export{H as a,B as b,j as c,X as d,at as e,Q as f,et as g,tt as h,nt as i,st as j,ot as k,V as l,it as m,J as n,d as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c,k as g,f as _,u as b,dd as y,d as P,de as I,df as T,aS as k}from"./index-6GXqHE0w.js";import{a as R}from"./thread-route-CEvVLI2K.js";import{a as E}from"./use-project-scope-DZ9tacAx.js";function M(){const e=c.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:$},e[0]=t):t=e[0],g(t)}function $(e){for(let t=e.matches.length-1;t>=0;t--){const a=e.matches[t]?.staticData.defaultMain;if(a)return a}return null}function D(e){const t=e.destination==="agent",a={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(a):a,mainpanel:void 0}}function x(){const e=c.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:A},e[0]=t):t=e[0],g(t)}function A(e){for(let t=e.matches.length-1;t>=0;t--){const a=e.matches[t]?.staticData;if(a?.mainView||a?.siteEditorView)return{mainView:a.mainView,siteEditorView:a.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function j(){const e=c.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const a=_(t);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[1]=i):i=e[1];const n=b(i),s={file:"file"in n&&typeof n.file=="string"?n.file:void 0,key:"key"in n&&typeof n.key=="string"?n.key:void 0,path:"path"in n&&typeof n.path=="string"?n.path:void 0},{mainView:o,siteEditorView:r}=x();return y({mainView:o,siteEditorView:r,params:a,search:s})}function O(){const e=c.c(11),t=P();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const i=_(a),n=R(),s=E(),o=i.org??"";let r;e[1]!==t||e[2]!==o||e[3]!==n||e[4]!==s?(r=(d,m)=>{const h=I(d),v=m?.virtualmcpid!==void 0||s!==null?"project":"organization",S=h.kind==="org-destination"||h.kind==="project-destination"&&v==="organization",V=w=>D({previous:w,destination:S?"organization":"agent",update:m?.search});T(t,{org:o,agentId:m?.virtualmcpid??n,tabId:d,destinationScope:v,search:V,replace:m?.replace??!0})},e[1]=t,e[2]=o,e[3]=n,e[4]=s,e[5]=r):r=e[5];const f=r;let l;e[6]!==t?(l=d=>t({to:".",search:z,replace:d?.replace??!0}),e[6]=t,e[7]=l):l=e[7];const p=l;let u;return e[8]!==p||e[9]!==f?(u={openPanel:f,closePanel:p},e[8]=p,e[9]=f,e[10]=u):u=e[10],u}function z(e){return{...e,mainpanel:!1,sidepanel:!0}}function q(e){const t=c.c(6),a=j(),i=M();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const s=b(n);let o;return t[1]!==e||t[2]!==a||t[3]!==i||t[4]!==s.mainpanel?(o=k({panelTabId:a,mainPanelParam:s.mainpanel,routeDefaultMain:i,metadata:e}),t[1]=e,t[2]=a,t[3]=i,t[4]=s.mainpanel,t[5]=o):o=t[5],o.activeTab}export{M as a,O as b,q as c,D as r,j as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as h,I as A,at as I,m as _,K as R}from"./index-6GXqHE0w.js";import{m as v}from"./match-site-slug-config-D3fUJ6vX.js";import{a as C}from"./use-file-configs-B1FdrMZJ.js";import{d as D}from"./use-organization-settings-DrJN-E78.js";import{r as O}from"./site-slug-uya6Wp4-.js";const a=["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations"],T=["overview","reports","board","site-editor"],W=1,x=["assets","hosting","e2e","analytics","cdn"];function k(t,e,s){if(!t)return{project:s??null,resolvedScopeId:null};const n=e?.id===t?e:s?.id===t?s:null;return{project:n,resolvedScopeId:n?t:null}}function L(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function y(t,e){const s=new Set(t??[]);if(e!==W)for(const n of T)s.add(n);return a.filter(n=>s.has(n))}function J(t){return a.some(e=>e===t)}function N(t){return x.some(e=>e===t)}function U(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,automations:!0}}function Y(t,e,s){const n=U(e,s);return t?n:{...n,overview:!0,reports:!0,board:!0}}function z(t,e,s){const n=new Set(y(t,s));return a.filter(o=>e[o]&&n.has(o))}function G(t,e,s){return s||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function H(t){return a.filter(e=>t[e])}function B(t,e,s){return!J(t)||e[t]?!1:N(t)?!(t==="assets"?s.assets:s.siteAccess):!0}function X(t,e,s,n,o){return B(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,s)||t==="content"&&!n.includes("content")||t==="code"&&o&&!n.includes("code")}function Z(t,e,s,n){const o=new Set(y(t,n));return s?o.add(e):o.delete(e),a.filter(i=>o.has(i))}function M(t){const e=h.c(10),{org:s}=A(),n=I(),o=D(),i=C(),c=O(t),u=n.hostingEnabled===!0,V=n.monitorEnabled===!0||n.auth.localMode===!0,w=(u||V)&&!!c,E=_({queryKey:R.hostingAccess(s.slug,c??""),queryFn:async()=>{const j=await fetch(`/api/${s.slug}/hosting/${encodeURIComponent(c??"")}/access`);return j.ok?await j.json():{owned:!1,canWrite:!1}},enabled:w,staleTime:6e4}),l=E.data?.owned===!0,f=!!v(i.data?.configs??[],c),g=u&&l&&o.hosting,p=u&&l&&o.e2e,S=u&&l&&o.analytics,b=V&&l&&o.monitor;let r;e[0]!==f||e[1]!==g||e[2]!==p||e[3]!==S||e[4]!==b?(r={assets:f,hosting:g,e2e:p,analytics:S,cdn:b},e[0]=f,e[1]=g,e[2]=p,e[3]=S,e[4]=b,e[5]=r):r=e[5];const P=!!c&&i.isPending,m=w&&E.isPending;let d;return e[6]!==r||e[7]!==P||e[8]!==m?(d={presence:r,assetsPending:P,siteAccessPending:m},e[6]=r,e[7]=P,e[8]=m,e[9]=d):d=e[9],d}export{x as P,k as a,Y as b,X as c,B as d,y as e,W as f,H as g,G as h,U as p,L as r,z as s,Z as t,M as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as A,f as y,u as R,bn as T,dg as k,dh as C,d as N,af as j,df as E,ae as b}from"./index-6GXqHE0w.js";import{c as w,d as D}from"./use-virtual-mcp-CMlCV8Oj.js";import{r as P,p as H}from"./github-repo-C0igpkr9.js";function F(t){if(typeof t!="object"||t===null)return!1;const n=t.githubRepo?.url;return typeof n=="string"&&n.length>0}function J(t){return P(t).status==="attached"}function K(t){const e=P(t).status;return e==="attached"||e==="detached"}function O(t){const e=new Set;for(const n of t??[]){const s=n.metadata?.liveAgentId;typeof s=="string"&&s&&e.add(n.id)}return e}function L(t,e){if(!t)return null;const n=t.metadata?.liveAgentId;if(typeof n=="string"&&n)return(e??[]).find(a=>a.id===n)?{mode:"dev",targetId:n}:null;const s=(e??[]).find(o=>o.metadata?.liveAgentId===t.id);return s?{mode:"live",targetId:s.id}:null}const G=1;function S(t){const e=t??[],n=O(e);return e.filter(s=>!n.has(s.id)&&!T(s.id)&&!k(s.id)&&!C(s.id))}function M(){const t=A.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=y(e);let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[1]=s):s=t[1];const o=R(s);if(n.agentId)return n.agentId;let a;return t[2]!==o?(a="virtualmcpid"in o&&typeof o.virtualmcpid=="string"?o.virtualmcpid.trim():void 0,t[2]=o,t[3]=a):a=t[3],a||null}function U(){const t=A.c(16),e=N();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const s=y(n),o=j(),a=w(),c=S(a),i=M(),_=c.find(r=>r.id===i)??null;let l;t[1]!==a||t[2]!==i?(l=i&&a.length>0&&!a.some(r=>r.id===i)?i:null,t[1]=a,t[2]=i,t[3]=l):l=t[3];const I=D(l),d=_??S(I?[I]:[])[0]??null;let u;t[4]!==o||t[5]!==e||t[6]!==s||t[7]!==i?(u=r=>{if(r===i&&o!==void 0)return;const v=s.org??"",h=V;if(r){E(e,{org:v,agentId:r,tabId:o==="board"||o==="reports"?o:"overview",search:h,replace:!1});return}if(o==="board"){e({to:b.tasks,params:{org:v,taskKey:void 0},search:h});return}e({to:b.home,params:{org:v},search:h})},t[4]=o,t[5]=e,t[6]=s,t[7]=i,t[8]=u):u=t[8];const m=u,g=H(d),p=c.length>=G;let f;return t[9]!==d||t[10]!==c||t[11]!==i||t[12]!==m||t[13]!==g||t[14]!==p?(f={scopeId:i,project:d,repo:g,projects:c,hasProjects:p,setScope:m},t[9]=d,t[10]=c,t[11]=i,t[12]=m,t[13]=g,t[14]=p,t[15]=f):f=t[15],f}function V(t){return{...t,virtualmcpid:void 0,thread:void 0,mainpanel:void 0}}export{M as a,F as b,K as c,J as d,L as f,O as g,S as s,U as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,I,W as a}from"./index-6GXqHE0w.js";import{u as R}from"./use-connection-DCUpGmsb.js";import{f as y}from"./use-organization-settings-DrJN-E78.js";function E(){const e=C.c(19),{org:i}=I(),o=y();let l;e[0]!==i.id?(l=a.REGISTRY(i.id),e[0]=i.id,e[1]=l):l=e[1];const d=l;let f;e[2]!==i.id?(f=a.COMMUNITY_REGISTRY(i.id),e[2]=i.id,e[3]=f):f=e[3];const g=f;let r;e[4]!==g||e[5]!==d?(r=[d,g],e[4]=g,e[5]=d,e[6]=r):r=e[6];let t;if(e[7]!==o||e[8]!==r){if(t=new Set(r),o?.registries){let s;e[10]!==o.registries?(s=Object.keys(o.registries),e[10]=o.registries,e[11]=s):s=e[11];for(const u of s)t.add(u)}e[7]=o,e[8]=r,e[9]=t}else t=e[9];const m=R();let n;e[12]!==m?(n=m??[],e[12]=m,e[13]=n):n=e[13];let c;if(e[14]!==t||e[15]!==n){let s;e[17]!==t?(s=u=>t.has(u.id),e[17]=t,e[18]=s):s=e[18],c=n.filter(s),e[14]=t,e[15]=n,e[16]=c}else c=e[16];return c}export{E as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as o,I as u,ac as r,K as l,z as d,n as f,e as S}from"./index-6GXqHE0w.js";function C(){const e=o.c(7),{org:n}=u(),a=r();let i;e[0]!==n.id?(i=l.secrets(n.id),e[0]=n.id,e[1]=i):i=e[1];let t;e[2]!==a?(t=async()=>await a.call("SECRET_LIST",{}),e[2]=a,e[3]=t):t=e[3];let s;e[4]!==i||e[5]!==t?(s={queryKey:i,staleTime:6e4,queryFn:t},e[4]=i,e[5]=t,e[6]=s):s=e[6];const{data:c}=d(s);return c.secrets}function m(){const e=o.c(8),{org:n}=u(),a=r(),i=f();let t;e[0]!==a?(t=async y=>await a.call("SECRET_CREATE",{...y}),e[0]=a,e[1]=t):t=e[1];let s;e[2]!==n||e[3]!==i?(s=()=>{i.invalidateQueries({queryKey:l.secrets(n.id)})},e[2]=n,e[3]=i,e[4]=s):s=e[4];let c;return e[5]!==t||e[6]!==s?(c={mutationFn:t,onSuccess:s},e[5]=t,e[6]=s,e[7]=c):c=e[7],S(c)}export{m as a,C as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as z,b as K,r as w,j as s,l as Q}from"./index-6GXqHE0w.js";import{o as q}from"./agent-icon-vDfwuZu4.js";import{i as Y}from"./SearchMd-BNXjQ2BV.js";import{D as Z,b as ee,d as te,c as se}from"./dialog-DJBpjJnY.js";import{I as re}from"./input-TvernbmY.js";import{ad as le,o as oe,ae as ie,af as X,G as ne,d as ce}from"./index-CUa7fAjf.js";import{u as ae}from"./use-session-runtime-TS34dEJv.js";const fe=12,D=new Set,F=new Set;function de(){for(const r of F)r()}function ue(r){return D.has(r)?!0:D.size>=fe?!1:(D.add(r),!0)}function J(r){D.delete(r)&&de()}function me(r){return F.add(r),()=>{F.delete(r)}}function ve(r,e){const t=w.useRef(!1),[u,i]=w.useState(!1),o=w.useRef(null),f=w.useRef(null),c=w.useRef(null),l=w.useRef(r);l.current=r;const[a]=w.useState(()=>{const n=()=>{c.current?.(),c.current=null},d=()=>t.current?!0:ue(e)?(t.current=!0,i(!0),n(),!0):!1;return v=>{if(f.current=v,o.current&&(o.current.disconnect(),o.current=null),n(),!v){t.current&&(J(e),t.current=!1,i(!1));return}queueMicrotask(()=>{if(f.current!==v)return;const x=new IntersectionObserver(m=>{if(m[0]?.isIntersecting??!1){!d()&&!c.current&&(c.current=me(()=>{f.current===v&&d()}));return}n(),t.current&&(J(e),t.current=!1,i(!1))},{root:l.current.current,rootMargin:"160px 0px"});x.observe(v),o.current=x})}});return{ref:a,iframeActive:u}}function pe(r){const e=z.c(8),{previewUrl:t,title:u,scrollRootRef:i,slotId:o}=r,{ref:f,iframeActive:c}=ve(i,o),[l,a]=w.useState(!1);let n;e[0]!==c||e[1]!==l||e[2]!==t||e[3]!==u?(n=c?s.jsxs(s.Fragment,{children:[!l&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/40",children:s.jsx(q,{className:"h-8 w-8 animate-pulse text-muted-foreground/40"})}),s.jsx("iframe",{src:t,title:`Preview ${u}`,sandbox:"allow-scripts allow-same-origin",referrerPolicy:"no-referrer",className:"pointer-events-none h-[200%] w-[200%] origin-top-left scale-50 border-0 bg-white",tabIndex:-1,onLoad:()=>a(!0)})]}):s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(q,{className:"h-8 w-8 text-muted-foreground/30"})}),e[0]=c,e[1]=l,e[2]=t,e[3]=u,e[4]=n):n=e[4];let d;return e[5]!==f||e[6]!==n?(d=s.jsx("div",{ref:f,className:"relative aspect-[16/10] w-full overflow-hidden bg-muted/40",children:n}),e[5]=f,e[6]=n,e[7]=d):d=e[7],d}function xe(r){const e=z.c(26),{entry:t,previewUrl:u,scrollRootRef:i,onSelect:o}=r,f=t.isSavedBlock&&"border-global-section/35 hover:bg-global-section/8";let c;e[0]!==f?(c=Q("group flex flex-col overflow-hidden rounded-lg border bg-card text-left transition-colors","hover:border-primary/40 hover:bg-accent/30",f),e[0]=f,e[1]=c):c=e[1];let l;e[2]!==t.resolveType||e[3]!==t.title||e[4]!==u||e[5]!==i?(l=s.jsx(pe,{previewUrl:u,title:t.title,scrollRootRef:i,slotId:t.resolveType}),e[2]=t.resolveType,e[3]=t.title,e[4]=u,e[5]=i,e[6]=l):l=e[6];let a;e[7]!==t.isSavedBlock?(a=t.isSavedBlock?{color:ne}:void 0,e[7]=t.isSavedBlock,e[8]=a):a=e[8];let n;e[9]!==a?(n=s.jsx(q,{className:"h-4 w-4 shrink-0",style:a}),e[9]=a,e[10]=n):n=e[10];let d;e[11]!==t.title?(d=s.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e[11]=t.title,e[12]=d):d=e[12];let v;e[13]!==t.description?(v=t.description&&s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[13]=t.description,e[14]=v):v=e[14];let x;e[15]!==d||e[16]!==v?(x=s.jsxs("div",{className:"min-w-0 flex-1",children:[d,v]}),e[15]=d,e[16]=v,e[17]=x):x=e[17];let m;e[18]!==n||e[19]!==x?(m=s.jsxs("div",{className:"flex items-center gap-2 border-t px-3 py-2.5",children:[n,x]}),e[18]=n,e[19]=x,e[20]=m):m=e[20];let h;return e[21]!==o||e[22]!==c||e[23]!==l||e[24]!==m?(h=s.jsxs("button",{type:"button",onClick:o,className:c,children:[l,m]}),e[21]=o,e[22]=c,e[23]=l,e[24]=m,e[25]=h):h=e[25],h}function Re(r){const e=z.c(51),{open:t,onOpenChange:u,meta:i,decofile:o,previewBaseUrl:f,onSelect:c}=r,l=K(),[a,n]=w.useState(""),[d,v]=w.useState(t),x=w.useRef(null);t!==d&&(v(t),t&&n(""));let m,h,S,b,j,N,R,y,g,C,T;if(e[0]!==o||e[1]!==i||e[2]!==u||e[3]!==c||e[4]!==t||e[5]!==f||e[6]!==a||e[7]!==l){const W=t&&i&&o?le(i,o):[],_=i?oe(i):"",G=o?ie(o):void 0,H=new Map;if(t&&_)for(const p of W)H.set(p.resolveType,X(f,_,p.previewBlock,G));const O=a.trim().toLowerCase(),V=O?W.filter(p=>p.title.toLowerCase().includes(O)||p.resolveType.toLowerCase().includes(O)||p.description?.toLowerCase().includes(O)):W;h=Z,C=t,T=u,m=ee,R="top-3 right-3",y="flex h-[90vh] max-h-[90vh] w-[96vw] max-w-[96vw] sm:max-w-[96vw] flex-col gap-0 overflow-hidden p-0";let U;e[19]!==l?(U=l("sectionsEditor.addSectionModal.title"),e[19]=l,e[20]=U):U=e[20];let A;e[21]!==U?(A=s.jsx(te,{children:U}),e[21]=U,e[22]=A):A=e[22];let k;e[23]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Y,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[23]=k):k=e[23];let $;e[24]===Symbol.for("react.memo_cache_sentinel")?($=p=>n(p.target.value),e[24]=$):$=e[24];let B;e[25]!==l?(B=l("sectionsEditor.addSectionModal.searchPlaceholder"),e[25]=l,e[26]=B):B=e[26];let E;e[27]!==a||e[28]!==B?(E=s.jsxs("div",{className:"relative pt-2",children:[k,s.jsx(re,{value:a,onChange:$,placeholder:B,className:"h-9 pl-8"})]}),e[27]=a,e[28]=B,e[29]=E):E=e[29],e[30]!==A||e[31]!==E?(g=s.jsxs(se,{className:"shrink-0 border-b px-4 py-3 text-left",children:[A,E]}),e[30]=A,e[31]=E,e[32]=g):g=e[32],j=x,N="min-h-0 flex-1 overflow-y-auto",S="p-4",b=V.length===0?s.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:l("sectionsEditor.addSectionModal.noSectionsFound")}):s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:V.map(p=>s.jsx(xe,{entry:p,scrollRootRef:x,previewUrl:H.get(p.resolveType)??X(f,_,p.previewBlock,G),onSelect:()=>c(p)},p.resolveType))}),e[0]=o,e[1]=i,e[2]=u,e[3]=c,e[4]=t,e[5]=f,e[6]=a,e[7]=l,e[8]=m,e[9]=h,e[10]=S,e[11]=b,e[12]=j,e[13]=N,e[14]=R,e[15]=y,e[16]=g,e[17]=C,e[18]=T}else m=e[8],h=e[9],S=e[10],b=e[11],j=e[12],N=e[13],R=e[14],y=e[15],g=e[16],C=e[17],T=e[18];let P;e[33]!==S||e[34]!==b?(P=s.jsx("div",{className:S,children:b}),e[33]=S,e[34]=b,e[35]=P):P=e[35];let I;e[36]!==P||e[37]!==j||e[38]!==N?(I=s.jsx("div",{ref:j,className:N,children:P}),e[36]=P,e[37]=j,e[38]=N,e[39]=I):I=e[39];let L;e[40]!==m||e[41]!==I||e[42]!==R||e[43]!==y||e[44]!==g?(L=s.jsxs(m,{closeButtonClassName:R,className:y,children:[g,I]}),e[40]=m,e[41]=I,e[42]=R,e[43]=y,e[44]=g,e[45]=L):L=e[45];let M;return e[46]!==h||e[47]!==L||e[48]!==C||e[49]!==T?(M=s.jsx(h,{open:C,onOpenChange:T,children:L}),e[46]=h,e[47]=L,e[48]=C,e[49]=T,e[50]=M):M=e[50],M}function ye(r){const e=z.c(4),{previewServerUrl:t,runtime:u}=ae(r.virtualMcpId),i=u==="cms";let o;return e[0]!==i||e[1]!==r.sandboxUrl||e[2]!==t?(o=ce({sandboxUrl:r.sandboxUrl,previewServerUrl:t,fastPreviewActive:i}),e[0]=i,e[1]=r.sandboxUrl,e[2]=t,e[3]=o):o=e[3],o}export{Re as A,ye as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as h}from"./index-6GXqHE0w.js";import{a as R,d as T,r as k,p as S}from"./thread-intent-AJKohiRy.js";import{b as j}from"./chat-context-HB_KOUNM.js";import{a as w}from"./use-virtual-mcp-CMlCV8Oj.js";function b(d){const t=h.c(14),u=w(d),p=j(),e=u?.metadata,o=p?.activeTask,m=o?.metadata?.runtime;let i;t[0]!==m?(i=S(m),t[0]=m,t[1]=i):i=t[1];const f=i,v=!!o&&!o.partial,l=o?.metadata;let a;t[2]!==e||t[3]!==l?(a=R(l,e),t[2]=e,t[3]=l,t[4]=a):a=t[4];const c=!!f||v&&!!u;let r;t[5]!==e?(r=T(e),t[5]=e,t[6]=r):r=t[6];let s;t[7]!==e?(s=k(e),t[7]=e,t[8]=s):s=t[8];let n;return t[9]!==a||t[10]!==c||t[11]!==r||t[12]!==s?(n={runtime:a,resolved:c,projectDefault:r,previewServerUrl:s},t[9]=a,t[10]=c,t[11]=r,t[12]=s,t[13]=n):n=t[13],n}export{b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,v as u}from"./index-
|
|
1
|
+
import{c as r,v as u}from"./index-6GXqHE0w.js";import{p as i,q as c}from"./question-004-sINsf4GQ.js";import{u as f}from"./use-decopilot-events-zpeu2MCG.js";const p=new Set(["completed","failed","requires_action"]);function q(s){const e=r.c(5),[n]=u();let t;e[0]!==n?(t=o=>{n.enableSounds&&p.has(o.data.status)&&i(c.dataUri).catch(l)},e[0]=n,e[1]=t):t=e[1];let a;e[2]!==s||e[3]!==t?(a={orgSlug:s,onTaskStatus:t},e[2]=s,e[3]=t,e[4]=a):a=e[4],f(a)}function l(s){console.warn("[status-sounds] playback failed:",s)}export{q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,
|
|
1
|
+
import{c as u,I as f,ac as y,m,n as g,e as T,K as l,t as E}from"./index-6GXqHE0w.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as o,ac as c,r as i,z as d,K as m}from"./index-6GXqHE0w.js";import{c as T}from"./hooks-BSkeWBV7.js";function h(e){const{org:n}=o(),r=c(),a=T(),s=i.useSyncExternalStore(a.threads.subscribe,a.threads.get),u=e===null?null:s.find(t=>t.id===e)??null,{data:l}=d({queryKey:m.ensureTask(n.id,e),queryFn:async()=>{if(e===null)return null;try{const{item:t}=await r.call("COLLECTION_THREADS_GET",{id:e});return t??null}catch{return null}},select:t=>t?.metadata??null,staleTime:3e4});return u?.metadata??l??null}export{h as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c,I as i,m as l,K as p}from"./index-6GXqHE0w.js";import{e as m}from"./chat-context-HB_KOUNM.js";async function f(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=m()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>f(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,
|
|
1
|
+
import{c as p,R as w,r as f}from"./index-6GXqHE0w.js";function I(M,b){const e=p.c(12),d=b===void 0?"cards":b,o=w(),g=f.useRef(o),s=M?`deco-view-mode-${M}`:"deco-view-mode";let i;e[0]!==d||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:d},e[0]=d,e[1]=s,e[2]=i):i=e[2];const[t,m]=f.useState(i);let l;e[3]!==s?(l=r=>{m(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const u=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!g.current&&o&&t==="table"&&m("cards"),g.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==u||e[10]!==t?(n=[t,u],e[9]=u,e[10]=t,e[11]=n):n=e[11],n}export{I as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as C,I,x as g,dj as S,dk as _,dl as A,K as y,dm as T,m as P,dn as L,dp as U}from"./index-6GXqHE0w.js";import{u as p,b as V,m as R}from"./use-mcp-client-Bq-mjhw3.js";function $(o){const t=C.c(5);let e;t[0]!==o?(e=o===void 0?{}:o,t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=p(i);return _(s.id,"VIRTUAL_MCP",l,n)}function h(o){const t=C.c(14);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=L(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const d=!!l;let u;t[9]!==c||t[10]!==d?(u={...c,enabled:d},t[9]=c,t[10]=d,t[11]=u):u=t[11];const{data:r}=P(u);let a;return t[12]!==r?(a=r??[],t[12]=r,t[13]=a):a=t[13],a}function O(o){const t=C.c(10),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=V(n),i=o??void 0;let l;t[3]!==s||t[4]!==e.id||t[5]!==i?(l=T(e.id,"VIRTUAL_MCP",i,s),t[3]=s,t[4]=e.id,t[5]=i,t[6]=l):l=t[6];const c=!!s&&!!o;let d;t[7]!==l||t[8]!==c?(d={...l,enabled:c},t[7]=l,t[8]=c,t[9]=d):d=t[9];const{data:u}=P(d);return u?.item??null}async function k(o,t,e={}){const n=await o.fetchQuery(R({connectionId:g,orgId:t.id,orgSlug:t.slug})),s=L(t.id,"VIRTUAL_MCP",n,e);return s.select(await o.fetchQuery(s))}function w(o){const t=C.c(18);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=U(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const d=!!l;let u;t[9]!==c||t[10]!==d?(u={...c,enabled:d},t[9]=c,t[10]=d,t[11]=u):u=t[11];const{data:r}=P(u);let a;t[12]!==r?.items?(a=r?.items??[],t[12]=r?.items,t[13]=a):a=t[13];const M=r?.totalCount,m=r?.hasMore;let f;return t[14]!==a||t[15]!==M||t[16]!==m?(f={items:a,totalCount:M,hasMore:m},t[14]=a,t[15]=M,t[16]=m,t[17]=f):f=t[17],f}function x(o){const t=C.c(3),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);return S(e.id,"VIRTUAL_MCP",o??void 0,s)}function E(o){const t=C.c(15),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);let i,l,c;t[3]!==o||t[4]!==e.id?(i=[...o].sort(),c=P,l=y.virtualMcpLastUsed(e.id,i),t[3]=o,t[4]=e.id,t[5]=i,t[6]=l,t[7]=c):(i=t[5],l=t[6],c=t[7]);const d=i.length>0;let u;t[8]!==s||t[9]!==i?(u=async()=>{const M=(await s.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:i}})).structuredContent??{items:[]},m=new Map;for(const f of M.items)m.set(f.id,f);return m},t[8]=s,t[9]=i,t[10]=u):u=t[10];let r;return t[11]!==l||t[12]!==d||t[13]!==u?(r={queryKey:l,enabled:d,staleTime:3e4,queryFn:u},t[11]=l,t[12]=d,t[13]=u,t[14]=r):r=t[14],c(r)}function v(){const o=C.c(3),{org:t}=I();let e;o[0]!==t.id||o[1]!==t.slug?(e={connectionId:g,orgId:t.id,orgSlug:t.slug},o[0]=t.id,o[1]=t.slug,o[2]=e):e=o[2];const n=p(e);return A(t.id,"VIRTUAL_MCP",n)}export{x as a,v as b,h as c,O as d,w as e,k as f,E as g,$ as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as u}from"./infiniteQueryObserver-C7FrFXuf.js";import{ef as i}from"./index-6GXqHE0w.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dP as E,dQ as y,dR as S,dS as w,dT as Q,n as k,dU as x,dV as M,r as p,dW as q,dX as H,dY as P,dZ as L,d_ as v,d$ as B,e0 as T}from"./index-6GXqHE0w.js";function O(r,s){const e=new Set(s);return r.filter(t=>!e.has(t))}function A(r,s,e){const t=r.slice(0);return t[s]=e,t}var U=class extends E{#i;#s;#n;#r;#e;#t;#o;#u;#h;#a=[];constructor(r,s,e){super(),this.#i=r,this.#r=e,this.#n=[],this.#e=[],this.#s=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(r=>{r.subscribe(s=>{this.#f(r,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(r=>{r.destroy()})}setQueries(r,s){this.#n=r,this.#r=s,y.batch(()=>{const e=this.#e,t=this.#d(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=e.length!==i.length,c=i.some((o,f)=>o!==e[f]),d=u||c,b=d?!0:n.some((o,f)=>{const g=this.#s[f];return!g||!S(o,g)});!d&&!b||(d&&(this.#a=t,this.#e=i),this.#s=n,this.hasListeners()&&(d&&(O(e,i).forEach(o=>{o.destroy()}),O(i,e).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#p()))})}getCurrentResult(){return this.#s}getQueries(){return this.#e.map(r=>r.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(r,s){const e=this.#d(r),t=e.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=e.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,s,i),()=>this.#c(t,e)]}#c(r,s){return s.map((e,t)=>{const i=r[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,n=>{s.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,s,e){if(s){const t=this.#h,i=e!==void 0&&t!==void 0&&(t.length!==e.length||e.some((n,u)=>n!==t[u]));return(!this.#t||this.#s!==this.#u||i||s!==this.#o)&&(this.#o=s,this.#u=this.#s,e!==void 0&&(this.#h=e),this.#t=w(this.#t,s(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#e.some((r,s)=>r.options.suspense&&this.#s[s]?.data===void 0)}#d(r){const s=new Map;this.#e.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=s.get(i);n?n.push(t):s.set(i,[t])});const e=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=s.get(i.queryHash)?.shift()??new Q(this.#i,i);e.push({defaultedQueryOptions:i,observer:u})}),e}#f(r,s){const e=this.#e.indexOf(r);e!==-1&&(this.#s=A(this.#s,e,s),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#s,this.#a),s=this.#b(),e=this.#t,t=s?e:this.#l(r,this.#r?.combine);(s||e!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#s)})})}}};function I({queries:r,...s},e){const t=k(e),i=x(),n=M(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{q(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),P(n);const[c]=p.useState(()=>new U(t,u,s)),[d,b,o]=c.getOptimisticResult(u,s.combine),f=!i&&s.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>f?c.subscribe(y.batchCalls(h)):L,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,s)},[u,s,c]);const m=d.some((h,a)=>v(u[a],h))?d.flatMap((h,a)=>{const l=u[a];if(l&&v(l,h)){const C=new Q(t,l);return B(l,C,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const R=d.find((h,a)=>{const l=u[a];return l&&T({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(R?.error)throw R.error;return b(o())}export{I as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as s}from"./infiniteQueryObserver-C7FrFXuf.js";import{ef as u,dM as n}from"./index-6GXqHE0w.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,P as I,K as J,t as Q,B as W}from"./index-
|
|
1
|
+
import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,P as I,K as J,t as Q,B as W}from"./index-6GXqHE0w.js";import{C as G}from"./collection-table-wrapper-0LZ9BKlr.js";import{E as L}from"./empty-state-CXolWOTn.js";import{S as H}from"./search-input-lFP9sD3O.js";import{A as X}from"./avatar-CW4PxBuN.js";import{B as D}from"./badge-C5Ilvf_J.js";import{u as Z}from"./use-debounced-value-D0SYNQsR.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-BtXRrtv4.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-O0SpY8ZO.js";import"./ArrowUp-lpfNBlP2.js";import"./SearchMd-BNXjQ2BV.js";import"./User01-B8a5ssx2.js";import"./differenceInSeconds-C3x8sHUj.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),P=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let y;e[6]!==n||e[7]!==l?(y={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=y):y=e[8];const{data:k,isLoading:_,isError:A}=Y(y);let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=ie,e[9]=C):C=e[9];let w;e[10]!==s?(w={mutationFn:ae,onSuccess:C,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=w):w=e[11];const E=$(w);let b;e[12]!==k?.users?(b=k?.users??[],e[12]=k?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==P||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===P||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=P,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{i as W,s as E}from"./ZoomOut-DdupjPFF.js";import{i as w}from"./File02-CceuR6rF.js";import{a as j}from"./Image01-CpXdMb8x.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function v(e){return`.deco/blocks/${P(e)}.json`}const z=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function D(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function _(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function M(e,t){return t==="directory"?e:$(e)}function S(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function H(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function q(e,t){return B(e)>=F&&!t.has(e)}function U(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function A(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function X(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function K(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:w,color:"#64748b"}:{Icon:w,color:T}}function V(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function J(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,k=s(l);let p=k.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),k.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function Q(e){const t=[];for(const n of e.split(`
|
|
2
|
+
`)){if(!n)continue;const r=n.indexOf(":");if(r<0)continue;const s=n.indexOf(":",r+1);if(s<0)continue;const o=Number.parseInt(n.slice(r+1,s),10);Number.isFinite(o)&&t.push({path:h(n.slice(0,r)),line:o,text:n.slice(s+1)})}return t}function Y(e,t,n){const r=t.trim().toLowerCase();if(!r)return[];const s=[];for(const o of e)if((o.split("/").pop()??o).toLowerCase().includes(r)&&(s.push(h(o)),s.length>=n))break;return s}const b=24;function Z(e,t){const n=e.replace(/^\s+/,""),r=t.trim().toLowerCase();if(!r)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const s=n.toLowerCase().indexOf(r);if(s<0)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const o=s>b,u=o?n.slice(s-b):n,a=u.toLowerCase(),i=[];let c=0;for(;;){const l=a.indexOf(r,c);if(l<0){c<u.length&&i.push({text:u.slice(c),match:!1});break}l>c&&i.push({text:u.slice(c,l),match:!1}),i.push({text:u.slice(l,l+r.length),match:!0}),c=l+r.length}return{leadingEllipsis:o,segments:i}}function tt(e){const t=[],n=new Map;for(const r of e){let s=n.get(r.path);s||(s={path:r.path,matches:[]},n.set(r.path,s),t.push(s)),s.matches.push(r)}return t}function et(e){return e.split(`
|
|
3
|
+
`).map(t=>t.replace(/^\d+\t/,"")).join(`
|
|
4
|
+
`)}export{F as E,L as a,C as b,z as c,v as d,J as e,N as f,X as g,tt as h,D as i,M as j,h as k,K as l,$ as m,V as n,Z as o,q as p,_ as q,U as r,et as s,x as t,Y as u,S as v,Q as w,A as x,H as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(t){return t?t.replace(/[_-]/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):""}function i(t,r){return t==="output-error"||t==="output-denied"?"error":t==="approval-requested"?"approval":t==="input-streaming"||t==="input-available"||t==="output-available"&&r===!0?"loading":"idle"}function o(t){if(t==null||typeof t!="object")return;const r=t;if(r.structuredContent&&typeof r.structuredContent=="object")return r.structuredContent;if(Array.isArray(r.content)){const e=r.content[0];if(e?.type==="text"&&typeof e.text=="string")try{return JSON.parse(e.text)}catch{return}return}return t}export{i as g,n as t,o as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as K,b as X,r as Z,j as i,l as rt,a6 as ut,a9 as ht,B as tt,a7 as xt}from"./index-6GXqHE0w.js";import{W as gt,C as at,a2 as bt}from"./agent-icon-vDfwuZu4.js";import{i as vt}from"./ChevronRight-BNfU55ld.js";import{L as yt}from"./label-aWEsDmHM.js";import{S as lt}from"./scroll-area-CaE3a4_T.js";import{S as jt}from"./switch-D5GcuD9Z.js";import{V as Tt}from"./view-mode-toggle-kY4gR8CN.js";import{M as ct,q as mt,t as Nt,v as _t,w as kt,x as U,W as wt}from"./agent-site-editor-content-BE26aik7.js";import"./AlertCircle-CgERhdh6.js";import"./Tool01-D6HOM_aJ.js";import"./ArrowUp-lpfNBlP2.js";import"./ArrowLeft-BVx6AQzq.js";import"./Tool02-BrfQeZRx.js";import"./ArrowRight-DZQert3q.js";import"./TrendUp01-DIz6JZwT.js";import"./ZoomOut-DdupjPFF.js";import"./Users03-DWh3D2_T.js";import"./CheckCircle-BGqFZ8sM.js";import"./Check-DClZtAIP.js";import"./ChevronUp-CbF1Gmeo.js";import"./ChevronSelectorVertical-ilm76_0p.js";import"./DotsVertical-LmkOTjL4.js";import"./UserSquare-yIpHwPSn.js";import"./Copy01-DiITYBuR.js";import"./CreditCard01-Zpy-4Wu9.js";import"./Database01-zcGUPFsG.js";import"./Download01-C4blLpML.js";import"./Printer-BG6NfeSZ.js";import"./Settings02-DL8f5fN1.js";import"./Eye-Cd7v-liN.js";import"./File02-CceuR6rF.js";import"./Share07-D1Sv14jA.js";import"./GitBranch01-Dil6c2wv.js";import"./Globe01-BVji6jXS.js";import"./SwitchHorizontal01-BIyO34Jw.js";import"./HardDrive-B4UY5qYp.js";import"./Image01-CpXdMb8x.js";import"./Key01-BsAAVoJx.js";import"./Link01-OqB-2yPE.js";import"./LinkExternal01-DobnLseV.js";import"./Monitor01-BTqHf-K4.js";import"./Sun-DjKz3VjB.js";import"./Package-CCkk0w5h.js";import"./Palette-BBWt8owf.js";import"./Play-CPeIBqH_.js";import"./Plus-DaErdsG1.js";import"./SearchLg-DxQfk550.js";import"./SearchMd-BNXjQ2BV.js";import"./Shield01-BsobIEfQ.js";import"./Stars01-f37Q7vDf.js";import"./Trash01-DQjprOwc.js";import"./Upload01-BDeLrRhf.js";import"./User01-B8a5ssx2.js";import"./Users01-BCRhQsCX.js";import"./XCircle-DudPVYQR.js";import"./XClose-DpDcHm9Y.js";import"./Zap-C5eiFR0N.js";import"./select-Ce9NznPv.js";import"./agent-view-guard-DomQyuot.js";import"./use-main-panel-tabs-CeyJWpQP.js";import"./use-panel-navigate-CCqZdv2O.js";import"./thread-route-CEvVLI2K.js";import"./use-project-scope-DZ9tacAx.js";import"./use-virtual-mcp-CMlCV8Oj.js";import"./use-mcp-client-Bq-mjhw3.js";import"./auth-ksbj4Esa.js";import"./github-repo-C0igpkr9.js";import"./use-connection-DCUpGmsb.js";import"./use-mcp-tools-DGdyHn8U.js";import"./types-C1gRrnQe.js";import"./utils-CVEq3hMx.js";import"./chat-context-HB_KOUNM.js";import"./autosend-BzUVLyEq.js";import"./thread-intent-AJKohiRy.js";import"./slugify-CEUa2lfQ.js";import"./hooks-BSkeWBV7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-D2Qtyl-A.js";import"./task-board-DyZE7mH1.js";import"./schema-Cnskrzk1.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-Bg_y9f3x.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-zpeu2MCG.js";import"./use-organization-settings-DrJN-E78.js";import"./tool-namespace-ySa3S1AM.js";import"./dialog-DJBpjJnY.js";import"./drawer-B5NRhNfW.js";import"./collection-search-j4HjYlys.js";import"./use-mcp-prompts-CWmeNLXn.js";import"./usage-stats-D5mXC24B.js";import"./form-EGCuUtdG.js";import"./input-TvernbmY.js";import"./use-copy-GVBAvo9n.js";import"./markdown-CBvmi8AF.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./input-BRqLi1TH.js";import"./command-palette-store-D19nXDNm.js";import"./use-open-billing-url-Cju1isPI.js";import"./use-session-runtime-TS34dEJv.js";import"./tabs-DQoXHeZr.js";import"./toggle-group-Cs1yIHkK.js";import"./use-deco-credits-DjxZxHMq.js";import"./index-B7ENeoW4.js";import"./checkbox-Dg_GkeBT.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-CW4PxBuN.js";import"./download-app-dialog-DYhv8XsJ.js";import"./popover-Ci-k968-.js";import"./input-D8xrvlz-.js";import"./hooks-Bb9SArul.js";import"./use-org-fs-DG1oJieK.js";import"./dropdown-menu-DzwCPltk.js";import"./question-004-sINsf4GQ.js";import"./use-members-Dnee1tF2.js";import"./use-org-auth-client-CVFBkaiI.js";import"./add-connection-dialog-BSihy3_s.js";import"./extract-connection-data-B1nPGa4h.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-By77bjvj.js";import"./connection-card-Br8jDKgZ.js";import"./use-registry-connections-cro5WL6A.js";import"./useInfiniteQuery-CM35R0yt.js";import"./infiniteQueryObserver-C7FrFXuf.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-B6H5J7sl.js";import"./textarea-BpFOmm9_.js";import"./connection-form-helpers-CFXh6BoJ.js";import"./authenticate-and-persist-oauth-DMvGjBUE.js";import"./mcp-oauth-DhRKpyTH.js";import"./collection-tabs-Bc9QOlJ8.js";import"./badge-C5Ilvf_J.js";import"./use-infinite-scroll-BXOEU8Y7.js";import"./useSuspenseInfiniteQuery-DWyGwvh9.js";import"./pair-CD8Vxcvs.js";import"./collapsible-CycyYnXe.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BQ7hPzlx.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./shell-layout-C3IRibnI.js";import"./anchors-yqDzZN4K.js";import"./source-system-tabs-CnEGUb4r.js";import"./command-BpjWfGyr.js";import"./index-cEqwHhEg.js";import"./project-icon-DIXBuD-A.js";import"./required-auth-layout-DMNBbcf3.js";import"./use-org-sso-uleG21Aq.js";import"./use-org-notice-PUfO84YR.js";import"./use-navigate-to-agent-Drdqs1cr.js";import"./use-thread-outputs-CpCqTMOi.js";import"./file-type-icon-Cg81au_Z.js";import"./sandbox-lifecycle-context-DxbfUbxP.js";import"./sandbox-url-D3mC8qhT.js";import"./use-task-metadata-C4MfiHBQ.js";import"./use-project-native-view-presence-01L5j4lu.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-B1FdrMZJ.js";import"./site-slug-uya6Wp4-.js";import"./virtual-mcp-CKi1xJsO.js";import"./alert-dialog-CiKfgw9r.js";import"./index-CUa7fAjf.js";import"./use-status-sounds-DQ2pMmh0.js";import"./empty-state-CXolWOTn.js";import"./serial-task-queue-CGOeQgpr.js";import"./toolbar-DOOz2W24.js";import"./legacy-main-redirect-CySqEohs.js";import"./preview-dialog-CKWnRekk.js";import"./preview-content-DhEgigNG.js";import"./file-preview-kRDXQYfi.js";import"./utils-B-5U5Z26.js";import"./editor-BHnwprUT.js";import"./file-share-button-P5GnoZYM.js";import"./toolbar-icon-button-Dp-AbzNZ.js";import"./github-icon-CiNkodR8.js";import"./decode-html-entities-Cf7wUEql.js";import"./use-debounced-value-D0SYNQsR.js";import"./task-status-CyTozLxL.js";import"./runnable-block-editor-Db2XbJYi.js";import"./monaco-editor-C5zvkMO4.js";import"./calendar-DGiOuDgZ.js";import"./rich-text-link-control-C6A8Q9Jd.js";import"./safe-image-url-D5z803Ot.js";import"./search-input-lFP9sD3O.js";import"./asset-utils-DJXdpjr9.js";import"./mustache-DQXz9E52.js";import"./repository-import-picker-DVnadPZ8.js";import"./repository-picker-BGpoa_g_.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const n=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(n.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=n.getTime()?null:{start:n,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,n=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of n)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const n=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);n.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<n.length;l++){const m=n[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let n=0;n<e.length;n++)Q(e[n],t,r,[...o,n],s);return}if(e&&typeof e=="object")for(const[n,a]of Object.entries(e))n!=="__resolveType"&&Q(a,t,r,[...o,n],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const n=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${n})`,text:"white",border:`oklch(0.50 0.14 ${n})`})}),r}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Ht}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=i.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let n;t[2]!==r.innerPath?(n=r.innerPath&&i.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=n):n=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&i.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Bt(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=i.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==n||t[15]!==a||t[16]!==l?(m=i.jsx(xt,{children:i.jsxs("div",{className:"text-xs",children:[s,n,a,l]})}),t[13]=s,t[14]=n,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const it=16;function Wt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${it}px, #000 calc(100% - ${it}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:n,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=Wt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==n?(b=i.jsx("span",{className:"truncate",children:n}),t[16]=n,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=i.jsx(ut,{asChild:!0,children:i.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=i.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=i.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function Ri(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,n]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(zt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=i.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=i.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=i.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=i.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=i.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=i.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),i.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=i.jsx(at,{}),t[40]=B):B=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:B,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=i.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let H;t[53]!==P||t[54]!==s?(H=i.jsx(Tt,{value:s,onValueChange:n,options:P}),t[53]=P,t[54]=s,t[55]=H):H=t[55];let W;t[56]!==R||t[57]!==H?(W=i.jsxs("div",{className:"flex items-center gap-4",children:[R,H]}),t[56]=R,t[57]=H,t[58]=W):W=t[58];let z;t[59]!==j||t[60]!==W?(z=i.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,W]}),t[59]=j,t[60]=W,t[61]=z):z=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?i.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?i.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):i.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==z||t[70]!==G?(q=i.jsxs("div",{className:"flex h-full w-full flex-col",children:[z,G]}),t[69]=z,t[70]=G,t[71]=q):q=t[71],q}function zt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=n):n=t[0];let a;return t[1]!==o||t[2]!==s?(a=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[n,o>0?i.jsxs(i.Fragment,{children:[i.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),i.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),i.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,nt=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let n,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);n=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+nt)+8;return i.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return i.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:i.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+nt),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return i.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&i.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=n,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else n=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=i.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==n||t[14]!==m||t[15]!==p?(h=i.jsx(n,{className:m,children:p}),t[13]=n,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return i.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,n=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-n.getTime(),h=w=>(Math.max(n.getTime(),Math.min(a.getTime(),w.getTime()))-n.getTime())/p*100;let f;t[0]!==n?(f=(w,j)=>U(n,j),t[0]=n,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=n.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=i.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=i.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=i.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&i.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:i.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,B=dt(s,j),V=R[0]?.blockLabel??j;return i.jsxs("div",{children:[i.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:i.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,F)=>i.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[i.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),i.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),i.jsxs("div",{className:"relative flex-1 h-full",children:[i.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),n.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),H=h(new Date(O))-P;return i.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=i.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=i.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return i.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return i.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{Ri as VariantCalendar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as f,G as $}from"./runnable-block-editor-Db2XbJYi.js";const l="x-deco-matchers-override";function h({pageKey:a,prefix:r,variants:t,selectedIndex:n,decofile:i,meta:s}){if(!a||n<0||n>=t.length)return[];const o=[];for(let e=0;e<=n;e++){const u=t[e];if(!u)continue;const c=u.rule,v=e===n?"1":"0",d=(f(c,i,s)?$(c,i,s):null)??`${a}@${r}.${e}.rule`;o.push(`${d}=${v}`)}return o}function B(a,r,t,n){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:a,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:n})}function P({pageKey:a,page:r,sectionIndex:t,sectionLazy:n,mvObj:i,selectedVariantIndex:s,decofile:o,meta:e}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value`:"sections"}.${t}${n?".section":""}.variants`,v=Array.isArray(i.variants)?i.variants:[];return h({pageKey:a,prefix:c,variants:v,selectedIndex:s,decofile:o,meta:e})}function x(a,r){if(r.length===0)return a;try{const t=new URL(a,"http://local");t.searchParams.delete(l);for(const n of r)t.searchParams.append(l,n);return a.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return a}}export{P as a,B as b,x as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,r as C,l as f,j as i,
|
|
1
|
+
import{c as $,r as C,l as f,j as i,a9 as k,a6 as I,a7 as P}from"./index-6GXqHE0w.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function A(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:L,fullWidth:R,className:z}=E,_=L===void 0?"sm":L,m=R===void 0?!1:R;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const T=C.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=C.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=T.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),C.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{T.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
|