decocms 4.501.0 → 4.502.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-D-fL_h7g.js → ActiveShapeUtils-DlOtwjEF.js} +1 -1
- package/dist/client/assets/{AlertCircle-D3bAofoi.js → AlertCircle-BYpi54SP.js} +1 -1
- package/dist/client/assets/{AreaChart-BkD3ldvt.js → AreaChart-kTgagvS-.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Cdobx1UV.js → ArrowLeft-B3Mf4oiE.js} +1 -1
- package/dist/client/assets/{ArrowUp-D_3dn5Sd.js → ArrowUp-Dm1tTcjd.js} +1 -1
- package/dist/client/assets/{BarChart-DdPh9tNP.js → BarChart-DwQypsuH.js} +1 -1
- package/dist/client/assets/{Building02-Bh6iwr2R.js → Building02-BHmYKmWU.js} +1 -1
- package/dist/client/assets/{CategoricalChart-tLM_K2Lc.js → CategoricalChart-CeTDsFRk.js} +1 -1
- package/dist/client/assets/{CheckCircle-BQiYUYV1.js → CheckCircle-4P58PW4U.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CpMmf6o-.js → ChevronSelectorVertical-Cojq1UR5.js} +1 -1
- package/dist/client/assets/{ChevronUp-CfnfCq3M.js → ChevronUp-DVssCggl.js} +1 -1
- package/dist/client/assets/{Copy01-CKF8jrEa.js → Copy01-DBnXKsvD.js} +1 -1
- package/dist/client/assets/{CreditCard01-B4jz404y.js → CreditCard01-Ku1gLnux.js} +1 -1
- package/dist/client/assets/{DotsVertical-BVuRRGqu.js → DotsVertical-DUEyJX4K.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-D3QRg5_X.js → ErrorBarContext-CsU8-ggF.js} +1 -1
- package/dist/client/assets/{Globe04-CfnS-Tur.js → Globe04-BCy_UIpz.js} +1 -1
- package/dist/client/assets/{Image01-C6EZAhw4.js → Image01-C9QzuJaK.js} +1 -1
- package/dist/client/assets/{Key01-C3bTgL7y.js → Key01-CV3Kr-e4.js} +1 -1
- package/dist/client/assets/{Link01-Bb9ZHTO8.js → Link01-CnwGlGLA.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BbLhCJ9C.js → LinkBroken01-Dt2Tn6rT.js} +1 -1
- package/dist/client/assets/{Monitor01-BT48-O3V.js → Monitor01-CtZrNe_q.js} +1 -1
- package/dist/client/assets/{Play-DlM8u9Zn.js → Play-Bi58F4_E.js} +1 -1
- package/dist/client/assets/{Plus-h-7fG8-i.js → Plus-jTILaZAS.js} +1 -1
- package/dist/client/assets/{SearchMd-DdAgg3kt.js → SearchMd-DIriOluN.js} +1 -1
- package/dist/client/assets/{Sector-udGfVqY9.js → Sector-e1E9Tkoe.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-gtt6oc_g.js → ShoppingBag01-DPhSrshS.js} +1 -1
- package/dist/client/assets/{Sun-D0bMmBqD.js → Sun-Bhq3Un93.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-mzV8h1Yb.js → SwitchHorizontal01-CZeYSoIE.js} +1 -1
- package/dist/client/assets/{Tool01-BOGFE1PW.js → Tool01-DSx5JxKN.js} +1 -1
- package/dist/client/assets/{Trash01-BKZKll81.js → Trash01-BcDxgAC3.js} +1 -1
- package/dist/client/assets/{Upload01-ClJbirSb.js → Upload01-DRNp2B9A.js} +1 -1
- package/dist/client/assets/{User01-jcmfLZ4a.js → User01-DmuhzlMa.js} +1 -1
- package/dist/client/assets/{UserSquare-Dnl3alN_.js → UserSquare-pQAburWh.js} +1 -1
- package/dist/client/assets/{Users01-DBt3BOu-.js → Users01-DXRV-L-2.js} +1 -1
- package/dist/client/assets/{XAxis-DWTEKRSO.js → XAxis-BpuR06LI.js} +1 -1
- package/dist/client/assets/{XClose-DtCD4hEo.js → XClose-B3D-rkas.js} +1 -1
- package/dist/client/assets/{ZoomOut-C-oiWFtM.js → ZoomOut-BfTCLHO9.js} +1 -1
- package/dist/client/assets/{access-gate-Bs83GnN9.js → access-gate-Dvk_zKis.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CkfM8RAE.js → add-connection-dialog-eAWC7UBo.js} +1 -1
- package/dist/client/assets/{agent-analytics-PkbYclRB.js → agent-analytics-BRzAe8IU.js} +1 -1
- package/dist/client/assets/agent-app-BP2SkO_l.js +1 -0
- package/dist/client/assets/{agent-assets-BSNQs1Q4.js → agent-assets-Cx-MRIu9.js} +1 -1
- package/dist/client/assets/{agent-automation-CYLhaLQV.js → agent-automation-B2wvqOTH.js} +1 -1
- package/dist/client/assets/{agent-automations-CylXZmQz.js → agent-automations-DjKZAWU3.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-gehkSGol.js → agent-connect-sources-DKjnLshK.js} +1 -1
- package/dist/client/assets/agent-deck-BelO6wIS.js +1 -0
- package/dist/client/assets/{agent-e2e-gcrRg7hM.js → agent-e2e-U1F_m9II.js} +1 -1
- package/dist/client/assets/{agent-experiments-CMJUnUoe.js → agent-experiments-DxRsWkSH.js} +1 -1
- package/dist/client/assets/{agent-file-JLVKcoj6.js → agent-file-DZx5Nuux.js} +1 -1
- package/dist/client/assets/{agent-hosting-AV1ldWsd.js → agent-hosting-qjQUC-UB.js} +1 -1
- package/dist/client/assets/{agent-icon-D1bIPwJ9.js → agent-icon-DEc9IKAh.js} +1 -1
- package/dist/client/assets/agent-library-DUzFXJHg.js +1 -0
- package/dist/client/assets/agent-library-file-4G0ZOr1s.js +1 -0
- package/dist/client/assets/{agent-monitor-DCEK-_YE.js → agent-monitor-BkFStz1l.js} +1 -1
- package/dist/client/assets/{agent-overview-Bq6iylVc.js → agent-overview-ByhU8NOU.js} +1 -1
- package/dist/client/assets/{agent-releases-0JQ-pNIw.js → agent-releases-B-ko0Nvk.js} +1 -1
- package/dist/client/assets/agent-settings-B8L7H8CP.js +1 -0
- package/dist/client/assets/{agent-site-editor-DUVPLgUJ.js → agent-site-editor-D9PPo_EX.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-B3p3URSd.js +2 -0
- package/dist/client/assets/agent-site-editor-content-AFppcDyU.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-BFOEKEAQ.js +1 -0
- package/dist/client/assets/agent-view-B2h35tj1.js +1 -0
- package/dist/client/assets/{agent-view-guard-B0ssprgS.js → agent-view-guard-BOJlnRyE.js} +1 -1
- package/dist/client/assets/{agents-list-CL_HbBRx.js → agents-list-BGrLBpdy.js} +1 -1
- package/dist/client/assets/{ai-providers-mazNpep3.js → ai-providers-BqDb2FvJ.js} +1 -1
- package/dist/client/assets/{alert-Bo4bO9Yj.js → alert-B48lGwya.js} +1 -1
- package/dist/client/assets/{alert-dialog-BEUBWKqO.js → alert-dialog-RwCjHRuJ.js} +1 -1
- package/dist/client/assets/{analytics-sections-DM3YuBYq.js → analytics-sections-BRfIYYnq.js} +1 -1
- package/dist/client/assets/{api-keys-DVwB6mPs.js → api-keys-DXmpQOqA.js} +1 -1
- package/dist/client/assets/api-keys-UTO_EG2B.js +1 -0
- package/dist/client/assets/{app-editor-6HFiMwKn.js → app-editor-D3DBnTc6.js} +1 -1
- package/dist/client/assets/{asset-utils-f7af-ti1.js → asset-utils-Bh07kRZG.js} +1 -1
- package/dist/client/assets/{auth-CpMllKKy.js → auth-D_LAZR_h.js} +1 -1
- package/dist/client/assets/{auth-catchall-s5AR8jnh.js → auth-catchall-BGEsffT3.js} +1 -1
- package/dist/client/assets/{auth-entry-DhhGCuwo.js → auth-entry-ClVx4xRq.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CVNIUCsf.js → auth-split-layout-ClyU5qbZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B45I3cgI.js → authenticate-and-persist-oauth-BNqERXi0.js} +1 -1
- package/dist/client/assets/{automation-list-row-sOJZ4uwa.js → automation-list-row-GdOWNpc6.js} +1 -1
- package/dist/client/assets/{automation-runs-CR9XH4Bt.js → automation-runs-BSFUiqcj.js} +1 -1
- package/dist/client/assets/{automations-KO9N3LUU.js → automations-6AzDTyLN.js} +1 -1
- package/dist/client/assets/{autosend-BPCdEy8S.js → autosend-BrkIZMg2.js} +1 -1
- package/dist/client/assets/{avatar-BwGV1yBo.js → avatar-jtTGOflQ.js} +1 -1
- package/dist/client/assets/{badge-DZi2puxG.js → badge-BPJdS_zE.js} +1 -1
- package/dist/client/assets/{block-document-DKS5cj35.js → block-document-D3moBjLJ.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CDjfxqPx.js → blocks-preview-workspace-context-BJF4y2_I.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CdRfYXjG.js → blocks-tab-states-Lfh7PvBk.js} +3 -3
- package/dist/client/assets/{blog-schema-DQu9FHji.js → blog-schema-Bhl0EC0x.js} +1 -1
- package/dist/client/assets/{board-analytics-Br92I9NK.js → board-analytics-v6GjK5j7.js} +1 -1
- package/dist/client/assets/{buckets-BJOMOAgi.js → buckets-BIZMjhec.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DrFz7LF_.js → build-improve-prompt-doc-H9GaTf8V.js} +1 -1
- package/dist/client/assets/{calendar-evfJy3uJ.js → calendar-C3D37oJb.js} +1 -1
- package/dist/client/assets/{capability-load-error-vW3f0aqj.js → capability-load-error-DeivFmvd.js} +1 -1
- package/dist/client/assets/{category-editor-QytvoXKo.js → category-editor-Cp2l4Ien.js} +1 -1
- package/dist/client/assets/{chart-yXoVtu1q.js → chart-CEsCnWQW.js} +1 -1
- package/dist/client/assets/{chat-context-lAP9vX1C.js → chat-context-Ek-8IxEX.js} +1 -1
- package/dist/client/assets/{chat-draft-DVJc17WV.js → chat-draft-CZGFUdc4.js} +1 -1
- package/dist/client/assets/{checkbox-DcDvQwKW.js → checkbox-BjVWCI8i.js} +1 -1
- package/dist/client/assets/{choose-editor-B0ViIXN7.js → choose-editor-DVpPw8Dk.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CKu92ul9.js → cli-auth-success-Dhq78KDh.js} +1 -1
- package/dist/client/assets/{client-icons-DV_DZLb3.js → client-icons-Bat5IWU-.js} +1 -1
- package/dist/client/assets/cms-settings-editor-ozxOescf.js +1 -0
- package/dist/client/assets/{collapsible-BvvJbkUN.js → collapsible-CCU11SRh.js} +1 -1
- package/dist/client/assets/{collection-detail-gDWElNf6.js → collection-detail-BKRzsUUf.js} +1 -1
- package/dist/client/assets/{collection-display-button-CX9hkCzp.js → collection-display-button-BPa0Hjel.js} +1 -1
- package/dist/client/assets/{collection-search-ChJFrp7I.js → collection-search-B3CigRnD.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-S14li0ck.js → collection-table-wrapper-BjP-CvVc.js} +1 -1
- package/dist/client/assets/{collection-tabs-CSxs3D41.js → collection-tabs-CoyfUlqO.js} +1 -1
- package/dist/client/assets/{column-rules-GXfmm3XY.js → column-rules-NvgDnt2S.js} +1 -1
- package/dist/client/assets/{combobox-C7I8ANxO.js → combobox-CrQDuIN4.js} +1 -1
- package/dist/client/assets/{command-3UFu4XzT.js → command-qX8D3Lb4.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-B4r6rXjT.js → companion-mcps-section-CFLiTWod.js} +1 -1
- package/dist/client/assets/{config-CXc91so8.js → config-BNYxxHSE.js} +1 -1
- package/dist/client/assets/{connect-CyItQRMN.js → connect-CtT1H68E.js} +1 -1
- package/dist/client/assets/{connect-layout-C_C_fSz7.js → connect-layout-ffkt2Ns9.js} +1 -1
- package/dist/client/assets/{connection-C37KtOpn.js → connection-B23WvhUe.js} +1 -1
- package/dist/client/assets/{connection-card-BZTmMkIC.js → connection-card-BBtu2Up1.js} +1 -1
- package/dist/client/assets/{connection-detail-D0FXWtUX.js → connection-detail-m7BHtws6.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DxBwDmAB.js → connection-form-helpers-DdClVTZn.js} +1 -1
- package/dist/client/assets/{connections-D-s5sSvb.js → connections-CiS8isT9.js} +1 -1
- package/dist/client/assets/{content-tab-zP6Y355z.js → content-tab-Dbn7dHL_.js} +3 -3
- package/dist/client/assets/{context-CXih-hDd.js → context-Nrq6BYeV.js} +1 -1
- package/dist/client/assets/{context-menu-BVwispbr.js → context-menu-CXHPom5V.js} +1 -1
- package/dist/client/assets/{core.esm-CmRvLUZs.js → core.esm-DaFx0nps.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-MkYGLytC.js → create-organization-dialog-CxI99S6f.js} +1 -1
- package/dist/client/assets/{daily-pulse-C5ZpC1Ja.js → daily-pulse-VFqkAbiP.js} +1 -1
- package/dist/client/assets/{discover-CnNtsI6p.js → discover-BM7hRKue.js} +1 -1
- package/dist/client/assets/{domain-settings-C-ul_GpW.js → domain-settings-DfqKqfG1.js} +1 -1
- package/dist/client/assets/{drawer-BnxsVk9h.js → drawer-CI9x8oi9.js} +1 -1
- package/dist/client/assets/{editor-BcMzCvWI.js → editor-HwnFKTc1.js} +1 -1
- package/dist/client/assets/{editor-classes-qOc25VDM.js → editor-classes-10XEtqAC.js} +1 -1
- package/dist/client/assets/{empty-state-Csd3ZQCl.js → empty-state-BxgUQvsY.js} +1 -1
- package/dist/client/assets/{empty-state-CLULH17h.js → empty-state-Dd0b73U2.js} +1 -1
- package/dist/client/assets/{extract-connection-data-QezQYJtA.js → extract-connection-data-CbabpvQM.js} +1 -1
- package/dist/client/assets/{feature-gate-X9j31WTs.js → feature-gate-CpZYoyZ3.js} +1 -1
- package/dist/client/assets/{feature-paywall-CVHEJqfB.js → feature-paywall-CWg9LcNZ.js} +1 -1
- package/dist/client/assets/{file-explorer-CzlgH02W.js → file-explorer-BiZ29Vvs.js} +1 -1
- package/dist/client/assets/{file-preview-Ddg0WJAM.js → file-preview-CX-aag8f.js} +1 -1
- package/dist/client/assets/{file-share-button-D2qOTxL8.js → file-share-button-Do0yFYDl.js} +1 -1
- package/dist/client/assets/{file-type-icon-Bqf9C4DT.js → file-type-icon-Cp93tNz3.js} +1 -1
- package/dist/client/assets/flat-project-C_90Ow-C.js +1 -0
- package/dist/client/assets/{folder-icon-CktDjbyx.js → folder-icon-DzMf4BF9.js} +1 -1
- package/dist/client/assets/{form-BLRuutWX.js → form-C5lLpfxV.js} +1 -1
- package/dist/client/assets/{general-DAKv-uYe.js → general-Ddy1VvME.js} +1 -1
- package/dist/client/assets/{home-BtntFMXr.js → home-BCnTxZyF.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-DnbP_2C-.js → hosted-publish-feedback-hkJangOF.js} +1 -1
- package/dist/client/assets/{icon-button-08xWmNqW.js → icon-button-BnCc2mV5.js} +1 -1
- package/dist/client/assets/{index-9WXzzgOS.js → index-5z0cgady.js} +1 -1
- package/dist/client/assets/{index-BOjNGNvg.js → index-BC7XYozu.js} +1 -1
- package/dist/client/assets/{index-3yvbELIe.js → index-BbqhjhNr.js} +1 -1
- package/dist/client/assets/{index-BiU97Vx4.js → index-Bdcb7KFh.js} +1 -1
- package/dist/client/assets/{index-BvCsVc8L.js → index-Bh2O5PEv.js} +1 -1
- package/dist/client/assets/{index-BgxfZN5I.js → index-CmhfcT17.js} +2 -2
- package/dist/client/assets/{index-DyeE93ho.js → index-CnTaM5_w.js} +1 -1
- package/dist/client/assets/{index-3um-0YWE.js → index-CpYsIAO7.js} +1 -1
- package/dist/client/assets/{index-Dhveikge.js → index-Cq7eResI.js} +1 -1
- package/dist/client/assets/{index-DT37BMIF.js → index-Cx38FQ3N.js} +3 -3
- package/dist/client/assets/{index-lUChgCue.js → index-DMVF6sM5.js} +1 -1
- package/dist/client/assets/{index-Ct9bVcsr.js → index-DMjmBf92.js} +1 -1
- package/dist/client/assets/{index-Dss8yn2Y.js → index-DfOROPCW.js} +1 -1
- package/dist/client/assets/{index-DIK8YZFn.js → index-DkW_Ruuk.js} +1 -1
- package/dist/client/assets/{index-DJTmuPQQ.js → index-o0uzmEcY.js} +1 -1
- package/dist/client/assets/{index-redirect-CHE6u4Cv.js → index-redirect-lAkX0zfM.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-ClCiPTXN.js → infiniteQueryObserver-DPyz6bSI.js} +1 -1
- package/dist/client/assets/{infra-billing-ChfVikin.js → infra-billing-Bn7qwXfY.js} +1 -1
- package/dist/client/assets/{input-BSxNJ_GL.js → input-C5uMiH8T.js} +3 -3
- package/dist/client/assets/{input-BwymrIPS.js → input-DC-8DfMd.js} +1 -1
- package/dist/client/assets/{integration-icon-DmnIXoLv.js → integration-icon-DfWASVi0.js} +1 -1
- package/dist/client/assets/{jira-icon-BLL3j9jm.js → jira-icon-DzQdm_-x.js} +1 -1
- package/dist/client/assets/{label-CXUY_vfR.js → label-BIjDuic6.js} +1 -1
- package/dist/client/assets/{layout-DIeTUTU5.js → layout-DqgRMTH3.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BKyQMU33.js → legacy-agents-deep-DV0_5V89.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BsoX6iN0.js → legacy-main-redirect-Djl3Gt7m.js} +1 -1
- package/dist/client/assets/library-CeUtWN8B.js +1 -0
- package/dist/client/assets/{library-tab-D2qgQui6.js → library-tab-Bs0wzK29.js} +1 -1
- package/dist/client/assets/{login-E4QHNGwe.js → login-3Otd9Wlo.js} +1 -1
- package/dist/client/assets/{markdown-b3WNjA4d.js → markdown-BCZ7Si7p.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Cn4aCsu6.js → mcp-app-renderer-DECw4bL7.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C3NWluK_.js → mcp-oauth-DK0EZ7_R.js} +1 -1
- package/dist/client/assets/{mcp-oauth-RicpD0nY.js → mcp-oauth-DPp6A0NQ.js} +1 -1
- package/dist/client/assets/{members-BxD5PzHF.js → members-CtZngT65.js} +1 -1
- package/dist/client/assets/{memory-C9XODnnD.js → memory-CYiv9NJT.js} +1 -1
- package/dist/client/assets/{mini-report-page-BIc8DpQB.js → mini-report-page-DOW-8ACI.js} +1 -1
- package/dist/client/assets/{mock-board-ohQUjnsi.js → mock-board-CgfiA9cZ.js} +1 -1
- package/dist/client/assets/{monaco-editor-sh4I5RUd.js → monaco-editor-BBw2sDH2.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DV6G65vc.js → monitoring-stats-row-D4k9Gkic.js} +1 -1
- package/dist/client/assets/{multi-select-B-4k-Bqg.js → multi-select-CUZbVevW.js} +1 -1
- package/dist/client/assets/{mustache-Ds0VW1db.js → mustache-Ca--Xhvx.js} +1 -1
- package/dist/client/assets/{new-project-dialog-B1YWyUQY.js → new-project-dialog-MyUIikPS.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dk0amXzl.js → oauth-callback-B8K9Pe1n.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-yxTXgHsL.js → oauth-callback-ai-provider-BWL5p0R4.js} +1 -1
- package/dist/client/assets/{onboarding-WAcQlT34.js → onboarding-DV2onL6W.js} +1 -1
- package/dist/client/assets/{openai-conversation-DdRGYa72.js → openai-conversation-D_cdhmrX.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CX9xIBGl.js → optimistic-project-sidebar-views-J9vXb1-5.js} +1 -1
- package/dist/client/assets/{organization-choice-ByF9jLiX.js → organization-choice-dn5-Ng0u.js} +1 -1
- package/dist/client/assets/{orgs-BQHW_eGH.js → orgs-CwC34Qrv.js} +1 -1
- package/dist/client/assets/{page-seo-form-CHn8Xad5.js → page-seo-form-BoOu9GbW.js} +1 -1
- package/dist/client/assets/{pair-CUEfObr7.js → pair-DC9cMyfj.js} +1 -1
- package/dist/client/assets/{plan-ladder-DCjrzFrn.js → plan-ladder-DhN7mzVE.js} +1 -1
- package/dist/client/assets/{popover-C7Cokk1g.js → popover-D2V0GZfj.js} +1 -1
- package/dist/client/assets/{post-calendar-8u0J9Dxw.js → post-calendar-DXzf3Yut.js} +1 -1
- package/dist/client/assets/{post-editor-BzyUnSeO.js → post-editor-NG32mys6.js} +1 -1
- package/dist/client/assets/{preview-content-DvIKkdby.js → preview-content-DUbzeS7I.js} +1 -1
- package/dist/client/assets/{preview-dialog-l7y7EMMl.js → preview-dialog-2P1PJxEF.js} +1 -1
- package/dist/client/assets/{preview-panel-BVF8JvLU.js → preview-panel-D3qbeO5A.js} +1 -1
- package/dist/client/assets/{preview-tab-DSXQiNWB.js → preview-tab-faQ50twa.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-D1HSCZY-.js → product-picker-dialog-D24ruXmx.js} +1 -1
- package/dist/client/assets/{profile-DLHHp5WU.js → profile-B_J_CZKE.js} +1 -1
- package/dist/client/assets/{project-app-view-BwoWS8NM.js → project-app-view-BlRpizu5.js} +1 -1
- package/dist/client/assets/{project-feed-Bb_IIsXz.js → project-feed-Beh_V-oC.js} +1 -1
- package/dist/client/assets/{project-icon-Dgrl5qpw.js → project-icon-3uE6pYf-.js} +1 -1
- package/dist/client/assets/project-reports-ClNthL44.js +1 -0
- package/dist/client/assets/project-tasks-CI9jMkDu.js +1 -0
- package/dist/client/assets/{projects-DRVKv_2I.js → projects-CzV6A7h3.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CtZ_2AQk.js → projects-empty-state-DnKeX8eY.js} +1 -1
- package/dist/client/assets/{prompts-BeeaQU8h.js → prompts-NBvK8C7O.js} +1 -1
- package/dist/client/assets/record-editor-CZMJvJ37.js +1 -0
- package/dist/client/assets/{redirect-editor-B1Nkj9GS.js → redirect-editor-CBD5SXg0.js} +1 -1
- package/dist/client/assets/{reports-C5l1V9UL.js → reports-CMexiDYO.js} +1 -1
- package/dist/client/assets/reports-S61PwEoP.js +1 -0
- package/dist/client/assets/{reports-onboarding-DP7Vd0T2.js → reports-onboarding-D6lseVrR.js} +1 -1
- package/dist/client/assets/{reports-tab-CtVbVcib.js → reports-tab-CkPkAd2_.js} +2 -2
- package/dist/client/assets/{repositories-CbAg-Btm.js → repositories-DtyuRQ8E.js} +1 -1
- package/dist/client/assets/{repository-binding-BFm9AVly.js → repository-binding-DMbjGWw3.js} +1 -1
- package/dist/client/assets/{repository-import-picker-EyjACjb3.js → repository-import-picker-GIgpyQ8V.js} +1 -1
- package/dist/client/assets/{repository-picker-CIkU8AaT.js → repository-picker-CGWfbl3i.js} +1 -1
- package/dist/client/assets/{require-capability-BHXvQx1F.js → require-capability-C7Dxrm_C.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BWy4wi63.js → required-auth-layout-DgGjxHOD.js} +1 -1
- package/dist/client/assets/{reset-password-BmnWobO1.js → reset-password-B8StDavS.js} +1 -1
- package/dist/client/assets/{resizable-ojZdlQ3J.js → resizable-DjAVX_KV.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CQA14gzS.js → resolve-tab-icon-ChFmZL6X.js} +1 -1
- package/dist/client/assets/{review-settings-HBrPojjW.js → review-settings-BGTWCvjH.js} +1 -1
- package/dist/client/assets/roles-qa60Znm-.js +1 -0
- package/dist/client/assets/{route-BnPcnvQE.js → route-BUCd6xE1.js} +1 -1
- package/dist/client/assets/{route-FIzJ_P0a.js → route-BbjzfRwc.js} +1 -1
- package/dist/client/assets/route-rs6-PjAV.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-BiADnqP0.js → sandbox-lifecycle-context-BPryhCAI.js} +1 -1
- package/dist/client/assets/{schema-C2wKusx1.js → schema-BCaSsjn6.js} +1 -1
- package/dist/client/assets/{schema-CP7YDlC2.js → schema-BrJvJRY5.js} +1 -1
- package/dist/client/assets/{scroll-area-eDDZTCNn.js → scroll-area-CyRrjPr-.js} +1 -1
- package/dist/client/assets/{search-input-Uw0JKwfe.js → search-input-CflNU9yi.js} +1 -1
- package/dist/client/assets/{search-toggle-sm1qzFKh.js → search-toggle-B30h-Mtc.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-CONJpmu9.js → secret-ciphertext-CZ1toUgb.js} +1 -1
- package/dist/client/assets/{secret-picker-60Shu074.js → secret-picker-HaRgmqbR.js} +1 -1
- package/dist/client/assets/{secrets-BoqLiEya.js → secrets-KUrWlAXl.js} +1 -1
- package/dist/client/assets/{sections-editor-vaJsT4Ye.js → sections-editor-CQ9DIV9u.js} +1 -1
- package/dist/client/assets/{select-BFEZcGSl.js → select-D56vy0cS.js} +1 -1
- package/dist/client/assets/{select-model-DqlWeDem.js → select-model-BQeGMdXQ.js} +1 -1
- package/dist/client/assets/{seo-editor-CH8U1dHr.js → seo-editor-DIXGLI4z.js} +1 -1
- package/dist/client/assets/{separator-B8-QmvpR.js → separator-Kf2aUq3g.js} +1 -1
- package/dist/client/assets/{settings-tab-CKwbS1hi.js → settings-tab-DS_aRKZh.js} +1 -1
- package/dist/client/assets/{sheet-Nq7jp8TZ.js → sheet-CKDqk2Xi.js} +1 -1
- package/dist/client/assets/{shell-layout-D6cRROrP.js → shell-layout-BdBSZR6C.js} +1 -1
- package/dist/client/assets/site-editor-CRE5wbgy.js +1 -0
- package/dist/client/assets/{site-editor-toast-DKv6_ydN.js → site-editor-toast-CaZH_Uob.js} +1 -1
- package/dist/client/assets/{skills-D12rIMUM.js → skills-BfSIFsq0.js} +1 -1
- package/dist/client/assets/{slider-DDXbeLEV.js → slider-Dxef6Thk.js} +1 -1
- package/dist/client/assets/{sortable.esm-B6I_GSlr.js → sortable.esm-wzYNtVNS.js} +1 -1
- package/dist/client/assets/{sso-BlG3mIxu.js → sso-Xjbva5ag.js} +1 -1
- package/dist/client/assets/{suggestion-BDdps7f5.js → suggestion-rl-OY42q.js} +1 -1
- package/dist/client/assets/{switch-fTPKFxtt.js → switch-C8MNBXcu.js} +1 -1
- package/dist/client/assets/{symbol-DzslO63t.js → symbol-wL8hZJTI.js} +1 -1
- package/dist/client/assets/{synced-repos-BoksOfkS.js → synced-repos-B_VSvpp7.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B_Nx9b90.js → tab-icon-glyph-DlPGivr6.js} +1 -1
- package/dist/client/assets/{table-DM6c5ztx.js → table-C_1aW9HL.js} +1 -1
- package/dist/client/assets/{tabs-_ffnq5EI.js → tabs-C0kKyybj.js} +1 -1
- package/dist/client/assets/{task-board-3mxTKXc4.js → task-board-BvUZ8lZX.js} +1 -1
- package/dist/client/assets/{task-route-Bd7_oRze.js → task-route-ChX2gHyG.js} +1 -1
- package/dist/client/assets/{task-status-DobFUFUP.js → task-status-5Qj_YIVL.js} +1 -1
- package/dist/client/assets/taskboard-analytics-v6jV-I8l.js +1 -0
- package/dist/client/assets/{tasks-8erS0IrD.js → tasks-B1ovkqRE.js} +1 -1
- package/dist/client/assets/tasks-BvmGOWZ2.js +1 -0
- package/dist/client/assets/{textarea-DuXoEX68.js → textarea-BOwupY9k.js} +1 -1
- package/dist/client/assets/{thread-analytics-DRN0lWXv.js → thread-analytics-BBdAY352.js} +1 -1
- package/dist/client/assets/{thread-intent-CNERxhpd.js → thread-intent-BxpIEOHD.js} +1 -1
- package/dist/client/assets/{thread-route-Ctf783T8.js → thread-route-YTx0gXdE.js} +1 -1
- package/dist/client/assets/{thread-route-B1yKR26I.js → thread-route-zNwiBPHs.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BOzE-wDr.js → thread-sheet-body-BSfQhy8y.js} +1 -1
- package/dist/client/assets/{time-range-picker-CTRRThMq.js → time-range-picker-DhCebJsY.js} +1 -1
- package/dist/client/assets/{toggle-group-Cfs_-SSG.js → toggle-group-BJNg7a6_.js} +1 -1
- package/dist/client/assets/{tool-namespace-D2ik4cAJ.js → tool-namespace-hcrPHByv.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CPspdKt4.js → toolbar-icon-button-BRrBVu2U.js} +1 -1
- package/dist/client/assets/{tooltip-IZurjemL.js → tooltip-4UW874b4.js} +1 -1
- package/dist/client/assets/{tooltipContext-D100ISAz.js → tooltipContext-ph0B5aEk.js} +1 -1
- package/dist/client/assets/{track-Dgx71QRR.js → track-Bs37Vb-v.js} +1 -1
- package/dist/client/assets/{types-BE1SardL.js → types-scp_0M_s.js} +1 -1
- package/dist/client/assets/{url-slug-CwNPw3b4.js → url-slug-BOI9R_Hf.js} +1 -1
- package/dist/client/assets/{usage-stats-CG9oV0kb.js → usage-stats-DGAEuGyH.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CPzOGdQy.js → use-ai-providers-Bujn21Dz.js} +1 -1
- package/dist/client/assets/{use-app-takeover-l9YncUZ0.js → use-app-takeover-BBfqeF1-.js} +1 -1
- package/dist/client/assets/{use-automations-B6o4Nbzc.js → use-automations-Z_kBCKLA.js} +1 -1
- package/dist/client/assets/{use-autosave-DPNBZc_p.js → use-autosave-ndhVJCpx.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-Do_KkN8I.js → use-chat-navigation-PVB9XYCZ.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BnfclhFE.js → use-clock-tick-CCLGBtLn.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BPMXolOl.js → use-connect-companion-DimWqtFp.js} +1 -1
- package/dist/client/assets/{use-connection-DS1VAR5N.js → use-connection-Dwi0oczT.js} +1 -1
- package/dist/client/assets/{use-copy-C8TWXH-H.js → use-copy-_JqQfoTc.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CeEuYNMP.js → use-create-virtual-mcp-ZOhkyNoT.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D3qFWxxv.js → use-date-fns-locale-CYNRVF1I.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DsoI68di.js → use-debounced-autosave-3qWJs1sA.js} +1 -1
- package/dist/client/assets/{use-debounced-value-KpwtUdsd.js → use-debounced-value-CvHHa5zM.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DscUzXq9.js → use-deco-credits-iWDhmKz8.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D8UIooCs.js → use-decopilot-events-BFFoNVdS.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Dnzv3Wbz.js → use-delete-connection-BIID_AaA.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-P_SogPj1.js → use-deployment-admin-DeUv9b4N.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-Dom2nmkC.js → use-ensure-project-folder-B_MNPQsb.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DnHFw81T.js → use-fast-preview-draft-url-CNiIoQU_.js} +1 -1
- package/dist/client/assets/{use-file-configs-Cv2mXUdp.js → use-file-configs-DN9_HbK7.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CuKgvt7b.js → use-infinite-scroll-CP5MaPJA.js} +1 -1
- package/dist/client/assets/{use-join-requests-cLAvpRra.js → use-join-requests-DmyW8n9L.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-B0dFgvCE.js → use-main-panel-tabs-DpP9vHof.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DaPeILTX.js → use-mcp-auth-status-C5UkoCc-.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CU2kDBXP.js → use-mcp-client-Ck2YNhED.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CdDXQMlf.js → use-mcp-prompts-DG1X-Jua.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CyHq-JFp.js → use-mcp-tools-DpjJofSD.js} +1 -1
- package/dist/client/assets/{use-members-CkpNHwM6.js → use-members-B1T5bMJ8.js} +1 -1
- package/dist/client/assets/{use-mobile-DNDEd3kt.js → use-mobile-C_h5-Lrd.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-JTDphVE0.js → use-navigate-to-agent-B5O37hfl.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-2Iqpie3T.js → use-open-billing-url-B_ppok7s.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bwzj9WuC.js → use-org-auth-client-CeU98DnY.js} +1 -1
- package/dist/client/assets/{use-org-fs-Cg7EJCYS.js → use-org-fs-BTgLNJoN.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-D4j72pCa.js → use-org-repo-syncs-Bnf4MUmf.js} +1 -1
- package/dist/client/assets/{use-org-sso-CMfwXvs9.js → use-org-sso-CiSoCbsi.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DPDTJ01F.js → use-organization-roles-ENGApVEO.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BMIqQlbM.js → use-organization-settings-DsiL1E35.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CL5hztR3.js → use-panel-navigate-DSEJRbyH.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CBbSdoTE.js → use-project-native-view-presence-CHwdqgjD.js} +1 -1
- package/dist/client/assets/{use-project-scope-DqbIN7fa.js → use-project-scope-DGWdW_3w.js} +1 -1
- package/dist/client/assets/{use-recent-apps-Beu6vFHw.js → use-recent-apps-MWmnEI3B.js} +1 -1
- package/dist/client/assets/{use-releases-Bfs5MNEe.js → use-releases-BPZ1Sql5.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-QSfTgm94.js → use-reports-diagnostic-tpNRt1KV.js} +1 -1
- package/dist/client/assets/{use-secrets-BaG_Hkwz.js → use-secrets-CPf3c3Lp.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DUXeQAGw.js → use-section-preview-base-J4BHoe5i.js} +1 -1
- package/dist/client/assets/{use-tags-BWRD1El7.js → use-tags-Cpi6wwHR.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Bkf73btp.js → use-task-board-analytics-CqArCe2L.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CLNIzDoN.js → use-task-board-events-B7HlzAAo.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-Bh5krZjb.js → use-task-board-item-prs-DjDyyhsG.js} +1 -1
- package/dist/client/assets/{use-task-board-items-zobNU9xE.js → use-task-board-items-CwavMUzx.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Bsl_Cezz.js → use-task-metadata-B3kpFQ2d.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CdWNwDDd.js → use-thread-analytics-W6uH9m6t.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BkgKa2EX.js → use-thread-outputs-DMthmyl4.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CNEF6i6u.js +1 -0
- package/dist/client/assets/{useQueries-E-2AGLRt.js → useQueries-C0TyeWIY.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DQhsrGc-.js +1 -0
- package/dist/client/assets/{users-L9Rh2Jo7.js → users-KocJqAUG.js} +1 -1
- package/dist/client/assets/{utils-Dx9iFvKJ.js → utils-cJIltehY.js} +1 -1
- package/dist/client/assets/{variant-calendar-CkKYqTGY.js → variant-calendar-BHrspRPP.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-CSAndyah.js → variant-draft-pointer-CTpYDfJi.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DxuIXC_C.js → view-mode-toggle-C2xIjQMc.js} +1 -1
- package/dist/client/assets/{virtual-mcp-D7evpUlE.js → virtual-mcp-B3puFk7u.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-Bs34dRKl.js → watch-sse-pool-zJ3qp_pj.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate-dbos.js +1 -1
- package/dist/server/migrate.js +1 -1
- package/dist/server/server.js +608 -601
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Dq_KNzND.js +0 -1
- package/dist/client/assets/agent-deck-CB0RXEGe.js +0 -1
- package/dist/client/assets/agent-library-ChYqVk94.js +0 -1
- package/dist/client/assets/agent-library-file-5NiMKcJU.js +0 -1
- package/dist/client/assets/agent-settings-DutqpeLT.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Bs5iWgah.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DG0PHKu_.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-IbSFpbgz.js +0 -1
- package/dist/client/assets/agent-view-BMSjk6sE.js +0 -1
- package/dist/client/assets/api-keys-BfQZh5eV.js +0 -1
- package/dist/client/assets/cms-settings-editor-Cz5yTS8J.js +0 -1
- package/dist/client/assets/flat-project-EkkB9kye.js +0 -1
- package/dist/client/assets/library-j3CGQ36X.js +0 -1
- package/dist/client/assets/project-reports-C-bRcSvJ.js +0 -1
- package/dist/client/assets/project-tasks-DDJFKuGl.js +0 -1
- package/dist/client/assets/record-editor-5RvQSHc4.js +0 -1
- package/dist/client/assets/reports-BGfmbbJs.js +0 -1
- package/dist/client/assets/roles-Dtyn_BZq.js +0 -1
- package/dist/client/assets/route-tGmKNjFY.js +0 -1
- package/dist/client/assets/site-editor-BZvWDg3I.js +0 -1
- package/dist/client/assets/taskboard-analytics-BqoskKtI.js +0 -1
- package/dist/client/assets/tasks-SfkUPw6i.js +0 -1
- package/dist/client/assets/useInfiniteQuery-pEq0vd9s.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BQsEFgzv.js +0 -1
package/dist/client/assets/{use-date-fns-locale-D3qFWxxv.js → use-date-fns-locale-CYNRVF1I.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as y,c as S,d as j,b as D,e as M}from"./differenceInSeconds-C3x8sHUj.js";import{F as x}from"./index-BgxfZN5I.js";let F={};function T(){return F}function W(e){const a=y(e),t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return t.setUTCFullYear(a.getFullYear()),+e-+t}function P(e,...a){const t=S.bind(null,e||a.find(o=>typeof o=="object"));return a.map(t)}function v(e,a){const t=+y(e)-+y(a);return t<0?-1:t>0?1:t}function $(e){return S(e,Date.now())}function C(e,a,t){const[o,n]=P(t?.in,e,a),s=o.getFullYear()-n.getFullYear(),i=o.getMonth()-n.getMonth();return s*12+i}function X(e,a){const t=y(e,a?.in);return t.setHours(23,59,59,999),t}function q(e,a){const t=y(e,a?.in),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function z(e,a){const t=y(e,a?.in);return+X(t,a)==+q(t,a)}function A(e,a,t){const[o,n,s]=P(t?.in,e,e,a),i=v(n,s),r=Math.abs(C(n,s));if(r<1)return 0;n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*r);let l=v(n,s)===-i;z(o)&&r===1&&v(o,s)===1&&(l=!1);const u=i*(r-+l);return u===0?0:u}const O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},N=(e,a,t)=>{let o;const n=O[e];return typeof n=="string"?o=n:a===1?o=n.one:o=n.other.replace("{{count}}",a.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+o:o+" ago":o};function b(e){return(a={})=>{const t=a.width?String(a.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const V={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Y={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_={date:b({formats:V,defaultWidth:"full"}),time:b({formats:Y,defaultWidth:"full"}),dateTime:b({formats:H,defaultWidth:"full"})},L={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},E=(e,a,t,o)=>L[e];function m(e){return(a,t)=>{const o=t?.context?String(t.context):"standalone";let n;if(o==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,r=t?.width?String(t.width):i;n=e.formattingValues[r]||e.formattingValues[i]}else{const i=e.defaultWidth,r=t?.width?String(t.width):e.defaultWidth;n=e.values[r]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(a):a;return n[s]}}const R={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},I={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},J={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},B={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},U={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K=(e,a)=>{const t=Number(e),o=t%100;if(o>20||o<10)switch(o%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},G={ordinalNumber:K,era:m({values:R,defaultWidth:"wide"}),quarter:m({values:I,defaultWidth:"wide",argumentCallback:e=>e-1}),month:m({values:Q,defaultWidth:"wide"}),day:m({values:J,defaultWidth:"wide"}),dayPeriod:m({values:B,defaultWidth:"wide",formattingValues:U,defaultFormattingWidth:"wide"})};function c(e){return(a,t={})=>{const o=t.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],s=a.match(n);if(!s)return null;const i=s[0],r=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?ee(r,w=>w.test(i)):Z(r,w=>w.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=t.valueCallback?t.valueCallback(u):u;const h=a.slice(i.length);return{value:u,rest:h}}}function Z(e,a){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&a(e[t]))return t}function ee(e,a){for(let t=0;t<e.length;t++)if(a(e[t]))return t}function k(e){return(a,t={})=>{const o=a.match(e.matchPattern);if(!o)return null;const n=o[0],s=a.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const r=a.slice(n.length);return{value:i,rest:r}}}const te=/^(\d+)(th|st|nd|rd)?/i,ae=/\d+/i,ne={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},oe={any:[/^b/i,/^(a|c)/i]},re={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ie={any:[/1/i,/2/i,/3/i,/4/i]},se={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},de={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ue={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},me={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ce={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},le={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},he={ordinalNumber:k({matchPattern:te,parsePattern:ae,valueCallback:e=>parseInt(e,10)}),era:c({matchPatterns:ne,defaultMatchWidth:"wide",parsePatterns:oe,defaultParseWidth:"any"}),quarter:c({matchPatterns:re,defaultMatchWidth:"wide",parsePatterns:ie,defaultParseWidth:"any",valueCallback:e=>e+1}),month:c({matchPatterns:se,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),day:c({matchPatterns:ue,defaultMatchWidth:"wide",parsePatterns:me,defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:ce,defaultMatchWidth:"any",parsePatterns:le,defaultParseWidth:"any"})},fe={code:"en-US",formatDistance:N,formatLong:_,formatRelative:E,localize:G,match:he,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ge(e,a,t){const o=T(),n=t?.locale??o.locale??fe,s=2520,i=v(e,a);if(isNaN(i))throw new RangeError("Invalid time value");const r=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:i}),[l,u]=P(t?.in,...i>0?[a,e]:[e,a]),h=j(u,l),w=(W(u)-W(l))/1e3,d=Math.round((h-w)/60);let g;if(d<2)return t?.includeSeconds?h<5?n.formatDistance("lessThanXSeconds",5,r):h<10?n.formatDistance("lessThanXSeconds",10,r):h<20?n.formatDistance("lessThanXSeconds",20,r):h<40?n.formatDistance("halfAMinute",0,r):h<60?n.formatDistance("lessThanXMinutes",1,r):n.formatDistance("xMinutes",1,r):d===0?n.formatDistance("lessThanXMinutes",1,r):n.formatDistance("xMinutes",d,r);if(d<45)return n.formatDistance("xMinutes",d,r);if(d<90)return n.formatDistance("aboutXHours",1,r);if(d<D){const f=Math.round(d/60);return n.formatDistance("aboutXHours",f,r)}else{if(d<s)return n.formatDistance("xDays",1,r);if(d<M){const f=Math.round(d/D);return n.formatDistance("xDays",f,r)}else if(d<M*2)return g=Math.round(d/M),n.formatDistance("aboutXMonths",g,r)}if(g=A(u,l),g<12){const f=Math.round(d/M);return n.formatDistance("xMonths",f,r)}else{const f=g%12,p=Math.trunc(g/12);return f<3?n.formatDistance("aboutXYears",p,r):f<9?n.formatDistance("overXYears",p,r):n.formatDistance("almostXYears",p+1,r)}}function Je(e,a){return ge(e,$(e),a)}const be={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},ye=(e,a,t)=>{let o;const n=be[e];return typeof n=="string"?o=n:a===1?o=n.one:o=n.other.replace("{{count}}",String(a)),t?.addSuffix?t.comparison&&t.comparison>0?"em "+o:"há "+o:o},we={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Me={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ve={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pe={date:b({formats:we,defaultWidth:"full"}),time:b({formats:Me,defaultWidth:"full"}),dateTime:b({formats:ve,defaultWidth:"full"})},Pe={lastWeek:e=>{const a=e.getDay();return"'"+(a===0||a===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},De=(e,a,t,o)=>{const n=Pe[e];return typeof n=="function"?n(a):n},We={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},Se={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},ke={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},je={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},xe={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},Fe={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},Te=(e,a)=>{const t=Number(e);return a?.unit==="week"?t+"ª":t+"º"},$e={ordinalNumber:Te,era:m({values:We,defaultWidth:"wide"}),quarter:m({values:Se,defaultWidth:"wide",argumentCallback:e=>e-1}),month:m({values:ke,defaultWidth:"wide"}),day:m({values:je,defaultWidth:"wide"}),dayPeriod:m({values:xe,defaultWidth:"wide",formattingValues:Fe,defaultFormattingWidth:"wide"})},Ce=/^(\d+)[ºªo]?/i,Xe=/\d+/i,qe={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},ze={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Ae={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Oe={any:[/1/i,/2/i,/3/i,/4/i]},Ne={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Ve={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},Ye={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},He={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},_e={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},Le={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},Ee={ordinalNumber:k({matchPattern:Ce,parsePattern:Xe,valueCallback:e=>parseInt(e,10)}),era:c({matchPatterns:qe,defaultMatchWidth:"wide",parsePatterns:ze,defaultParseWidth:"any"}),quarter:c({matchPatterns:Ae,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:c({matchPatterns:Ne,defaultMatchWidth:"wide",parsePatterns:Ve,defaultParseWidth:"any"}),day:c({matchPatterns:Ye,defaultMatchWidth:"wide",parsePatterns:He,defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:_e,defaultMatchWidth:"any",parsePatterns:Le,defaultParseWidth:"any"})},Re={code:"pt-BR",formatDistance:ye,formatLong:pe,formatRelative:De,localize:$e,match:Ee,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Be(){const[e]=x();return e.language==="pt-BR"?Re:void 0}export{W as a,fe as e,Je as f,T as g,P as n,Be as u};
|
|
1
|
+
import{t as y,c as S,d as j,b as D,e as M}from"./differenceInSeconds-C3x8sHUj.js";import{F as x}from"./index-CmhfcT17.js";let F={};function T(){return F}function W(e){const a=y(e),t=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return t.setUTCFullYear(a.getFullYear()),+e-+t}function P(e,...a){const t=S.bind(null,e||a.find(o=>typeof o=="object"));return a.map(t)}function v(e,a){const t=+y(e)-+y(a);return t<0?-1:t>0?1:t}function $(e){return S(e,Date.now())}function C(e,a,t){const[o,n]=P(t?.in,e,a),s=o.getFullYear()-n.getFullYear(),i=o.getMonth()-n.getMonth();return s*12+i}function X(e,a){const t=y(e,a?.in);return t.setHours(23,59,59,999),t}function q(e,a){const t=y(e,a?.in),o=t.getMonth();return t.setFullYear(t.getFullYear(),o+1,0),t.setHours(23,59,59,999),t}function z(e,a){const t=y(e,a?.in);return+X(t,a)==+q(t,a)}function A(e,a,t){const[o,n,s]=P(t?.in,e,e,a),i=v(n,s),r=Math.abs(C(n,s));if(r<1)return 0;n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*r);let l=v(n,s)===-i;z(o)&&r===1&&v(o,s)===1&&(l=!1);const u=i*(r-+l);return u===0?0:u}const O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},N=(e,a,t)=>{let o;const n=O[e];return typeof n=="string"?o=n:a===1?o=n.one:o=n.other.replace("{{count}}",a.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+o:o+" ago":o};function b(e){return(a={})=>{const t=a.width?String(a.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const V={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Y={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},H={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_={date:b({formats:V,defaultWidth:"full"}),time:b({formats:Y,defaultWidth:"full"}),dateTime:b({formats:H,defaultWidth:"full"})},L={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},E=(e,a,t,o)=>L[e];function m(e){return(a,t)=>{const o=t?.context?String(t.context):"standalone";let n;if(o==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,r=t?.width?String(t.width):i;n=e.formattingValues[r]||e.formattingValues[i]}else{const i=e.defaultWidth,r=t?.width?String(t.width):e.defaultWidth;n=e.values[r]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(a):a;return n[s]}}const R={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},I={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Q={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},J={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},B={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},U={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},K=(e,a)=>{const t=Number(e),o=t%100;if(o>20||o<10)switch(o%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},G={ordinalNumber:K,era:m({values:R,defaultWidth:"wide"}),quarter:m({values:I,defaultWidth:"wide",argumentCallback:e=>e-1}),month:m({values:Q,defaultWidth:"wide"}),day:m({values:J,defaultWidth:"wide"}),dayPeriod:m({values:B,defaultWidth:"wide",formattingValues:U,defaultFormattingWidth:"wide"})};function c(e){return(a,t={})=>{const o=t.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],s=a.match(n);if(!s)return null;const i=s[0],r=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?ee(r,w=>w.test(i)):Z(r,w=>w.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=t.valueCallback?t.valueCallback(u):u;const h=a.slice(i.length);return{value:u,rest:h}}}function Z(e,a){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&a(e[t]))return t}function ee(e,a){for(let t=0;t<e.length;t++)if(a(e[t]))return t}function k(e){return(a,t={})=>{const o=a.match(e.matchPattern);if(!o)return null;const n=o[0],s=a.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=t.valueCallback?t.valueCallback(i):i;const r=a.slice(n.length);return{value:i,rest:r}}}const te=/^(\d+)(th|st|nd|rd)?/i,ae=/\d+/i,ne={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},oe={any:[/^b/i,/^(a|c)/i]},re={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ie={any:[/1/i,/2/i,/3/i,/4/i]},se={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},de={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ue={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},me={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ce={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},le={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},he={ordinalNumber:k({matchPattern:te,parsePattern:ae,valueCallback:e=>parseInt(e,10)}),era:c({matchPatterns:ne,defaultMatchWidth:"wide",parsePatterns:oe,defaultParseWidth:"any"}),quarter:c({matchPatterns:re,defaultMatchWidth:"wide",parsePatterns:ie,defaultParseWidth:"any",valueCallback:e=>e+1}),month:c({matchPatterns:se,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),day:c({matchPatterns:ue,defaultMatchWidth:"wide",parsePatterns:me,defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:ce,defaultMatchWidth:"any",parsePatterns:le,defaultParseWidth:"any"})},fe={code:"en-US",formatDistance:N,formatLong:_,formatRelative:E,localize:G,match:he,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ge(e,a,t){const o=T(),n=t?.locale??o.locale??fe,s=2520,i=v(e,a);if(isNaN(i))throw new RangeError("Invalid time value");const r=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:i}),[l,u]=P(t?.in,...i>0?[a,e]:[e,a]),h=j(u,l),w=(W(u)-W(l))/1e3,d=Math.round((h-w)/60);let g;if(d<2)return t?.includeSeconds?h<5?n.formatDistance("lessThanXSeconds",5,r):h<10?n.formatDistance("lessThanXSeconds",10,r):h<20?n.formatDistance("lessThanXSeconds",20,r):h<40?n.formatDistance("halfAMinute",0,r):h<60?n.formatDistance("lessThanXMinutes",1,r):n.formatDistance("xMinutes",1,r):d===0?n.formatDistance("lessThanXMinutes",1,r):n.formatDistance("xMinutes",d,r);if(d<45)return n.formatDistance("xMinutes",d,r);if(d<90)return n.formatDistance("aboutXHours",1,r);if(d<D){const f=Math.round(d/60);return n.formatDistance("aboutXHours",f,r)}else{if(d<s)return n.formatDistance("xDays",1,r);if(d<M){const f=Math.round(d/D);return n.formatDistance("xDays",f,r)}else if(d<M*2)return g=Math.round(d/M),n.formatDistance("aboutXMonths",g,r)}if(g=A(u,l),g<12){const f=Math.round(d/M);return n.formatDistance("xMonths",f,r)}else{const f=g%12,p=Math.trunc(g/12);return f<3?n.formatDistance("aboutXYears",p,r):f<9?n.formatDistance("overXYears",p,r):n.formatDistance("almostXYears",p+1,r)}}function Je(e,a){return ge(e,$(e),a)}const be={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},ye=(e,a,t)=>{let o;const n=be[e];return typeof n=="string"?o=n:a===1?o=n.one:o=n.other.replace("{{count}}",String(a)),t?.addSuffix?t.comparison&&t.comparison>0?"em "+o:"há "+o:o},we={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},Me={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ve={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pe={date:b({formats:we,defaultWidth:"full"}),time:b({formats:Me,defaultWidth:"full"}),dateTime:b({formats:ve,defaultWidth:"full"})},Pe={lastWeek:e=>{const a=e.getDay();return"'"+(a===0||a===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},De=(e,a,t,o)=>{const n=Pe[e];return typeof n=="function"?n(a):n},We={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},Se={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},ke={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},je={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},xe={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},Fe={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},Te=(e,a)=>{const t=Number(e);return a?.unit==="week"?t+"ª":t+"º"},$e={ordinalNumber:Te,era:m({values:We,defaultWidth:"wide"}),quarter:m({values:Se,defaultWidth:"wide",argumentCallback:e=>e-1}),month:m({values:ke,defaultWidth:"wide"}),day:m({values:je,defaultWidth:"wide"}),dayPeriod:m({values:xe,defaultWidth:"wide",formattingValues:Fe,defaultFormattingWidth:"wide"})},Ce=/^(\d+)[ºªo]?/i,Xe=/\d+/i,qe={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},ze={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},Ae={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Oe={any:[/1/i,/2/i,/3/i,/4/i]},Ne={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Ve={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},Ye={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},He={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},_e={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},Le={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},Ee={ordinalNumber:k({matchPattern:Ce,parsePattern:Xe,valueCallback:e=>parseInt(e,10)}),era:c({matchPatterns:qe,defaultMatchWidth:"wide",parsePatterns:ze,defaultParseWidth:"any"}),quarter:c({matchPatterns:Ae,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:c({matchPatterns:Ne,defaultMatchWidth:"wide",parsePatterns:Ve,defaultParseWidth:"any"}),day:c({matchPatterns:Ye,defaultMatchWidth:"wide",parsePatterns:He,defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:_e,defaultMatchWidth:"any",parsePatterns:Le,defaultParseWidth:"any"})},Re={code:"pt-BR",formatDistance:ye,formatLong:pe,formatRelative:De,localize:$e,match:Ee,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Be(){const[e]=x();return e.language==="pt-BR"?Re:void 0}export{W as a,fe as e,Je as f,T as g,P as n,Be as u};
|
package/dist/client/assets/{use-debounced-autosave-DsoI68di.js → use-debounced-autosave-3qWJs1sA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t}from"./index-
|
|
1
|
+
import{r as t}from"./index-CmhfcT17.js";function f({save:u,delayMs:n=1e3}){const r=t.useRef(u);r.current=u;const e=t.useRef(null),c=()=>{r.current().catch(()=>{})},o=()=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,c()},n)},s=()=>(e.current&&(clearTimeout(e.current),e.current=null),r.current());return t.useEffect(()=>()=>{e.current&&(clearTimeout(e.current),e.current=null,c())},[]),{schedule:o,flush:s}}export{f as u};
|
package/dist/client/assets/{use-debounced-value-KpwtUdsd.js → use-debounced-value-CvHHa5zM.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,r as n}from"./index-
|
|
1
|
+
import{c as m,r as n}from"./index-CmhfcT17.js";function p(e,o){const t=m.c(4),[s,u]=n.useState(e);let c,r;return t[0]!==o||t[1]!==e?(c=()=>{const i=setTimeout(()=>u(e),o);return()=>clearTimeout(i)},r=[e,o],t[0]=o,t[1]=e,t[2]=c,t[3]=r):(c=t[2],r=t[3]),n.useEffect(c,r),s}export{p as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a2 as C,a9 as I,m as g,K,r as S,y as b}from"./index-
|
|
1
|
+
import{a2 as C,a9 as I,m as g,K,r as S,y as b}from"./index-CmhfcT17.js";import{u as m}from"./use-ai-providers-Bujn21Dz.js";const a=new Map;function w(){const{org:n}=C(),c=I(),s=m(),o=s.find(t=>t.providerId==="deco"),{data:i,isLoading:d,refetch:l,isFetching:u}=g({queryKey:K.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await c.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),e=i?.balanceCents??null,p=e!=null?e/100:null,r=S.useRef(new Map);if(e!=null){const t=a.get(n.id);r.current.get(n.id)&&t!=null&&e>t&&b("credits_topped_up_detected",{organization_id:n.id,delta_cents:e-t,previous_balance_cents:t,new_balance_cents:e}),a.set(n.id,e),r.current.set(n.id,!0)}const y=!!o,f=e!=null&&e>0,_=e!=null&&e===0,h=e!=null&&e===200,v=s.length>0&&s.every(t=>t.providerId==="deco");return{hasDecoKey:y,decoKeyId:o?.id??null,balanceCents:e,balanceDollars:p,hasCredits:f,isZeroBalance:_,isInitialFreeCredit:h,hasOnlyDecoProvider:v,isLoading:d,isFetching:u,refetch:l}}export{w as u};
|
package/dist/client/assets/{use-decopilot-events-D8UIooCs.js → use-decopilot-events-BFFoNVdS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as T,dT as I,K as h,m as P,dU as x,ao as M,r as l}from"./index-
|
|
1
|
+
import{c as T,dT as I,K as h,m as P,dU as x,ao as M,r as l}from"./index-CmhfcT17.js";import{m as D}from"./thread-intent-BxpIEOHD.js";import{D as E}from"./watch-sse-pool-zJ3qp_pj.js";const O=1e6;function C(e,t,n){n>0&&e.setQueryData(h.aiPlanEntitlements(t),r=>{if(!r?.usage)return r;const s=r.usage;if(!s.limitMicros||s.usedMicros===null)return r;const u=s.usedMicros+n*O,o=Math.min(1,u/s.limitMicros);return{...r,usage:{...s,usedMicros:u,percent:o,state:o>=1?"exhausted":o>=.8?"warn":"ok"}}})}function g(){return x()?.plansEnabled===!0}function d(){const e=T.c(8),t=I(),n=t?.org.slug,r=g();let s;e[0]!==t?.org.id?(s=h.aiPlanEntitlements(t?.org.id??"none"),e[0]=t?.org.id,e[1]=s):s=e[1];const u=!!n&&r;let o;e[2]!==n?(o=()=>M(n,"AI_PLAN_ENTITLEMENTS",{providerId:"deco"}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==s||e[5]!==u||e[6]!==o?(a={queryKey:s,enabled:u,staleTime:6e4,retry:1,queryFn:o},e[4]=s,e[5]=u,e[6]=o,e[7]=a):a=e[7],P(a)}function U(e){const{data:t}=d();return!e||!t?!0:t.features[e]===!0}function w(){const e=g(),{isPending:t,fetchStatus:n}=d();return!e||n==="idle"||n==="paused"?!0:!t}function K(){const e=T.c(4),t=g(),{isSuccess:n,data:r}=d(),s=r?.features?.model_choice;let u;return e[0]!==n||e[1]!==t||e[2]!==s?(u=_({plansEnabled:t,isSuccess:n,modelChoice:s}),e[0]=n,e[1]=t,e[2]=s,e[3]=u):u=e[3],u}function _({plansEnabled:e,isSuccess:t,modelChoice:n}){return e?t&&n===!0:!0}function L(){const{data:e}=d();if(e?.usage?.state!=="exhausted")return!1;const t=e.credits?.remainingUsd??null;return!(t!==null&&t>0)}const b=()=>0;function j(e){const{orgSlug:t,taskId:n,enabled:r=!0,onStep:s,onFinish:u,onTaskStatus:o,onReconnect:a}=e,f=l.useRef({taskId:n,onStep:s,onFinish:u,onTaskStatus:o,onReconnect:a});f.current={taskId:n,onStep:s,onFinish:u,onTaskStatus:o,onReconnect:a};const S=l.useRef(null),m=l.useRef(r),p=l.useRef(t);(!S.current||m.current!==r||p.current!==t)&&(m.current=r,p.current=t,S.current=R=>{if(!r||!t)return()=>{};const k=y=>{let c;try{c=JSON.parse(y.data)}catch{return}const i=f.current;if(!(i.taskId&&c.subject!==i.taskId)){switch(c.type){case E.STEP:i.onStep?.(c);break;case E.FINISH:i.onFinish?.(c);break;case E.THREAD_STATUS:i.onTaskStatus?.(c);break}R()}};return D.subscribe(t,k,()=>f.current.onReconnect?.())}),l.useSyncExternalStore(S.current,b,b)}export{d as a,j as b,K as c,C as d,U as e,w as f,L as g,g as u};
|
package/dist/client/assets/{use-delete-connection-Dnzv3Wbz.js → use-delete-connection-BIID_AaA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as oe,b as le,j as n,a2 as se,o as ie,a9 as ce,r as re,t as Y,fM as ae,fN as de}from"./index-
|
|
1
|
+
import{c as oe,b as le,j as n,a2 as se,o as ie,a9 as ce,r as re,t as Y,fM as ae,fN as de}from"./index-CmhfcT17.js";import{A as z,a as G,b as V,c as X,g as Z,d as ee,e as te,f as ne}from"./alert-dialog-RwCjHRuJ.js";function ge(M){const e=oe.c(86),{deleteState:s,cancelDelete:a,confirmDelete:d,confirmForceDelete:c}=M,t=le(),w=s.mode==="deleting";let f;e[0]!==a?(f=W=>{W||a()},e[0]=a,e[1]=f):f=e[1];let u;e[2]!==t?(u=t("common.deleteConnectionDialogs.title"),e[2]=t,e[3]=u):u=e[3];let D;e[4]!==u?(D=n.jsx(z,{children:u}),e[4]=u,e[5]=D):D=e[5];let C;e[6]!==t?(C=t("common.deleteConnectionDialogs.description"),e[6]=t,e[7]=C):C=e[7];const H=s.mode==="deleting"&&s.connection.title;let o;e[8]!==H?(o=n.jsx("span",{className:"font-medium text-foreground",children:H}),e[8]=H,e[9]=o):o=e[9];let l;e[10]!==C||e[11]!==o?(l=n.jsxs(G,{children:[C," ",o,"."]}),e[10]=C,e[11]=o,e[12]=l):l=e[12];let i;e[13]!==D||e[14]!==l?(i=n.jsxs(V,{children:[D,l]}),e[13]=D,e[14]=l,e[15]=i):i=e[15];let m;e[16]!==t?(m=t("common.deleteConnectionDialogs.cancel"),e[16]=t,e[17]=m):m=e[17];let r;e[18]!==m?(r=n.jsx(X,{children:m}),e[18]=m,e[19]=r):r=e[19];let g;e[20]!==t?(g=t("common.deleteConnectionDialogs.delete"),e[20]=t,e[21]=g):g=e[21];let x;e[22]!==d||e[23]!==g?(x=n.jsx(Z,{onClick:d,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g}),e[22]=d,e[23]=g,e[24]=x):x=e[24];let h;e[25]!==r||e[26]!==x?(h=n.jsxs(ee,{children:[r,x]}),e[25]=r,e[26]=x,e[27]=h):h=e[27];let j;e[28]!==h||e[29]!==i?(j=n.jsxs(te,{children:[i,h]}),e[28]=h,e[29]=i,e[30]=j):j=e[30];let N;e[31]!==w||e[32]!==j||e[33]!==f?(N=n.jsx(ne,{open:w,onOpenChange:f,children:j}),e[31]=w,e[32]=j,e[33]=f,e[34]=N):N=e[34];const B=s.mode==="force-deleting";let p;e[35]!==a?(p=W=>{W||a()},e[35]=a,e[36]=p):p=e[36];let E;e[37]!==t?(E=t("common.deleteConnectionDialogs.forceDeleteTitle"),e[37]=t,e[38]=E):E=e[38];let y;e[39]!==E?(y=n.jsx(z,{children:E}),e[39]=E,e[40]=y):y=e[40];let O;e[41]!==t?(O=t("common.deleteConnectionDialogs.forceDeleteDescription"),e[41]=t,e[42]=O):O=e[42];const J=s.mode==="force-deleting"&&s.connection.title;let v;e[43]!==J?(v=n.jsx("span",{className:"font-medium text-foreground",children:J}),e[43]=J,e[44]=v):v=e[44];let S;e[45]!==t?(S=t("common.deleteConnectionDialogs.isUsedByAgents"),e[45]=t,e[46]=S):S=e[46];const P=s.mode==="force-deleting"&&s.agentNames;let T;e[47]!==P?(T=n.jsx("span",{className:"font-medium text-foreground",children:P}),e[47]=P,e[48]=T):T=e[48];let A;e[49]!==O||e[50]!==v||e[51]!==S||e[52]!==T?(A=n.jsxs("p",{children:[O," ",v," ",S," ",T,"."]}),e[49]=O,e[50]=v,e[51]=S,e[52]=T,e[53]=A):A=e[53];let _;e[54]!==t?(_=t("common.deleteConnectionDialogs.forceDeleteWarning"),e[54]=t,e[55]=_):_=e[55];let F;e[56]!==_?(F=n.jsx("p",{className:"mt-2",children:_}),e[56]=_,e[57]=F):F=e[57];let I;e[58]!==A||e[59]!==F?(I=n.jsx(G,{asChild:!0,children:n.jsxs("div",{children:[A,F]})}),e[58]=A,e[59]=F,e[60]=I):I=e[60];let L;e[61]!==y||e[62]!==I?(L=n.jsxs(V,{children:[y,I]}),e[61]=y,e[62]=I,e[63]=L):L=e[63];let b;e[64]!==t?(b=t("common.deleteConnectionDialogs.cancel"),e[64]=t,e[65]=b):b=e[65];let R;e[66]!==b?(R=n.jsx(X,{children:b}),e[66]=b,e[67]=R):R=e[67];let q;e[68]!==t?(q=t("common.deleteConnectionDialogs.deleteAnyway"),e[68]=t,e[69]=q):q=e[69];let U;e[70]!==c||e[71]!==q?(U=n.jsx(Z,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:q}),e[70]=c,e[71]=q,e[72]=U):U=e[72];let K;e[73]!==R||e[74]!==U?(K=n.jsxs(ee,{children:[R,U]}),e[73]=R,e[74]=U,e[75]=K):K=e[75];let $;e[76]!==L||e[77]!==K?($=n.jsxs(te,{children:[L,K]}),e[76]=L,e[77]=K,e[78]=$):$=e[78];let k;e[79]!==B||e[80]!==p||e[81]!==$?(k=n.jsx(ne,{open:B,onOpenChange:p,children:$}),e[79]=B,e[80]=p,e[81]=$,e[82]=k):k=e[82];let Q;return e[83]!==N||e[84]!==k?(Q=n.jsxs(n.Fragment,{children:[N,k]}),e[83]=N,e[84]=k,e[85]=Q):Q=e[85],Q}function ue({onSuccess:M}={}){const{org:e}=se(),s=ie(),a=ce(),[d,c]=re.useState({mode:"idle"}),t=()=>{s.invalidateQueries({predicate:o=>{const l=o.queryKey;return l[1]===e.id&&l[3]==="collection"&&l[4]==="CONNECTIONS"}})},w=o=>{ae(o),s.invalidateQueries({predicate:l=>l.queryKey[1]===de&&l.queryKey[3]===o})},f=o=>{t(),w(o),Y.success("Connection deleted successfully"),c({mode:"idle"}),M?.()};return{deleteState:d,requestDelete:o=>{c({mode:"deleting",connection:o})},cancelDelete:()=>{c({mode:"idle"})},confirmDelete:async()=>{if(d.mode!=="deleting")return;const o=d.connection;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o.id}),f(o.id)}catch(l){const i=l instanceof Error?l.message:String(l),m=i.replace(/^Error:\s*/,"");try{const r=JSON.parse(m);if(r.code==="CONNECTION_IN_USE"&&r.agentNames){c({mode:"force-deleting",connection:o,agentNames:r.agentNames.map(g=>`"${g}"`).join(", ")});return}}catch{}Y.error(`Failed to delete connection: ${i}`)}},confirmForceDelete:async()=>{if(d.mode!=="force-deleting")return;const o=d.connection.id;c({mode:"idle"});try{await a.call("COLLECTION_CONNECTIONS_DELETE",{id:o,force:!0}),f(o)}catch(l){const i=l instanceof Error?l.message:String(l);Y.error(`Failed to delete connection: ${i}`)}}}}export{ge as D,ue as u};
|
package/dist/client/assets/{use-deployment-admin-P_SogPj1.js → use-deployment-admin-DeUv9b4N.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s,m,K as c}from"./index-
|
|
1
|
+
import{c as s,m,K as c}from"./index-CmhfcT17.js";function l(){const e=s.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:c.deploymentAdminMe(),queryFn:d,staleTime:1/0,retry:2},e[0]=t):t=e[0];const{data:a,isLoading:i}=m(t),r=a==="admin",o=a==="unverified";let n;return e[1]!==i||e[2]!==r||e[3]!==o?(n={isAdmin:r,loading:i,needsEmailVerification:o},e[1]=i,e[2]=r,e[3]=o,e[4]=n):n=e[4],n}async function d(){const e=await fetch("/api/_admin/me",{credentials:"include"});if(e.status>=500)throw new Error(`admin/me request failed: ${e.status}`);return e.ok?"admin":(await e.json().catch(u)).error==="email_not_verified"?"unverified":"denied"}function u(){return{}}export{l as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,a2 as n,o as m,K as E,m as I,ao as T,dW as f}from"./index-
|
|
1
|
+
import{c as o,a2 as n,o as m,K as E,m as I,ao as T,dW as f}from"./index-CmhfcT17.js";import{k as F,m as N,H as y}from"./location-BjlyegC2.js";import{o as P}from"./use-org-fs-BTgLNJoN.js";function g(i){const e=o.c(14),{org:s}=n(),r=m();let l;e[0]!==s.id||e[1]!==i?(l=E.projectFolderEnsure(s.id,i?.id??"",i?F(i):""),e[0]=s.id,e[1]=i,e[2]=l):l=e[2];let t;e[3]!==s.id||e[4]!==s.slug||e[5]!==i?.id||e[6]!==r?(t=async()=>{const u=await T(s.slug,"PROJECT_FOLDER_ENSURE",{id:i?.id??""});return u.created&&(P(r,s.id,y),f(r,s.id,"VIRTUAL_MCP")),u},e[3]=s.id,e[4]=s.slug,e[5]=i?.id,e[6]=r,e[7]=t):t=e[7];let a;e[8]!==i?(a=!!i&&!N(i),e[8]=i,e[9]=a):a=e[9];let d;e[10]!==l||e[11]!==t||e[12]!==a?(d={queryKey:l,queryFn:t,enabled:a,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY,retry:!1},e[10]=l,e[11]=t,e[12]=a,e[13]=d):d=e[13],I(d)}export{g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as s}from"./index-
|
|
1
|
+
import{c as s}from"./index-CmhfcT17.js";import{w as v,c as d}from"./section-preview-url-7zfngvgW.js";import{u as h,aj as w,ak as P}from"./site-editor-toast-CaZH_Uob.js";import{a as b}from"./input-C5uMiH8T.js";function g(e){const t=s.c(3),i=b(e?.virtualMcpId).runtime==="cms",r=h(e?.virtualMcpId,e?.branch),n=r.kind==="protocol"&&r.source==="github",o=w(e),u=P(n?e:null);if(!e||!i)return null;if(n)return u;let l;return t[0]!==o||t[1]!==e?(l=o?d({...e,...o}):null,t[0]=o,t[1]=e,t[2]=l):l=t[2],l}function I(e){const t=s.c(11);let i;t[0]!==e?(i=e?{orgSlug:e.orgSlug,virtualMcpId:e.virtualMcpId,branch:e.branch}:null,t[0]=e,t[1]=i):i=t[1];const r=g(i),n=e?.previewServerUrl??null;let o=null;if(n)try{let f;t[2]!==n?(f=new URL(n),t[2]=n,t[3]=f):f=t[3],o=f.host}catch{o=null}let u;t[4]!==r||t[5]!==e||t[6]!==n?(u=e&&n&&r?v(new URL(e.path,n).toString(),r):null,t[4]=r,t[5]=e,t[6]=n,t[7]=u):u=t[7];const l=u;let c;return t[8]!==o||t[9]!==l?(c={url:l,host:o},t[8]=o,t[9]=l,t[10]=c):c=t[10],c}export{g as a,I as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,a2 as f,a9 as d,K as C,m as E,R as I,o as F,e as g}from"./index-
|
|
1
|
+
import{c as r,a2 as f,a9 as d,K as C,m as E,R as I,o as F,e as g}from"./index-CmhfcT17.js";function q(){const e=r.c(7),{org:t}=f(),o=d();let n;e[0]!==t.id?(n=C.fileConfigs(t.id),e[0]=t.id,e[1]=n):n=e[1];let i;e[2]!==o?(i=()=>o.call("FILE_CONFIG_LIST",{}),e[2]=o,e[3]=i):i=e[3];let s;e[4]!==n||e[5]!==i?(s={queryKey:n,staleTime:6e4,queryFn:i},e[4]=n,e[5]=i,e[6]=s):s=e[6];const{data:l}=I(s);return l.configs}function _(e){const t=r.c(10);let o;t[0]!==e?(o=e===void 0?{}:e,t[0]=e,t[1]=o):o=t[1];const{enabled:n}=o,i=n===void 0?!0:n,{org:s}=f(),l=d();let u;t[2]!==s.id?(u=C.fileConfigs(s.id),t[2]=s.id,t[3]=u):u=t[3];const y=i&&!!s.id;let c;t[4]!==l?(c=()=>l.call("FILE_CONFIG_LIST",{}),t[4]=l,t[5]=c):c=t[5];let a;return t[6]!==u||t[7]!==y||t[8]!==c?(a={queryKey:u,enabled:y,staleTime:6e4,queryFn:c},t[6]=u,t[7]=y,t[8]=c,t[9]=a):a=t[9],E(a)}function L(){const e=r.c(8),{org:t}=f(),o=d(),n=F();let i;e[0]!==o?(i=u=>o.call("FILE_CONFIG_CREATE",{...u}),e[0]=o,e[1]=i):i=e[1];let s;e[2]!==t||e[3]!==n?(s=()=>{n.invalidateQueries({queryKey:C.fileConfigs(t.id)})},e[2]=t,e[3]=n,e[4]=s):s=e[4];let l;return e[5]!==i||e[6]!==s?(l={mutationFn:i,onSuccess:s},e[5]=i,e[6]=s,e[7]=l):l=e[7],g(l)}function S(){const e=r.c(8),{org:t}=f(),o=d(),n=F();let i;e[0]!==o?(i=u=>o.call("FILE_CONFIG_DELETE",{id:u}),e[0]=o,e[1]=i):i=e[1];let s;e[2]!==t||e[3]!==n?(s=()=>{n.invalidateQueries({queryKey:C.fileConfigs(t.id)})},e[2]=t,e[3]=n,e[4]=s):s=e[4];let l;return e[5]!==i||e[6]!==s?(l={mutationFn:i,onSuccess:s},e[5]=i,e[6]=s,e[7]=l):l=e[7],g(l)}export{q as a,L as b,S as c,_ as u};
|
package/dist/client/assets/{use-infinite-scroll-CuKgvt7b.js → use-infinite-scroll-CP5MaPJA.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-CmhfcT17.js";function v(n,u,c=!1,s){const r=e.useRef(null),o=e.useRef(null),f=e.useRef(n),i=e.useRef(u),R=e.useRef(c),l=e.useRef(s);f.current=n,i.current=u,R.current=c,l.current=s;const[p]=e.useState(()=>t=>{o.current=t,r.current&&(r.current.disconnect(),r.current=null),t&&queueMicrotask(()=>{if(o.current!==t)return;const a=new IntersectionObserver(x=>{x[0]?.isIntersecting&&i.current&&!R.current&&f.current()},{root:l.current?.current??null,rootMargin:"0px 0px 200px 0px"});a.observe(t),r.current=a})});return p}export{v as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as L,a2 as q,o as Q,a as V,aE as z,b as B,e as T,y as F,t as S,K as M,j as t,D as G,p as U,q as Z,s as k,v as Y,w as $,B as P,aG as H,c as J,a9 as K,ax as W,m as X}from"./index-
|
|
1
|
+
import{r as L,a2 as q,o as Q,a as V,aE as z,b as B,e as T,y as F,t as S,K as M,j as t,D as G,p as U,q as Z,s as k,v as Y,w as $,B as P,aG as H,c as J,a9 as K,ax as W,m as X}from"./index-CmhfcT17.js";import{a as _,F as A,b as N,c as ee,d as I,f as O}from"./form-C5lLpfxV.js";import{S as se,b as te,a as ie,d as ne,c as oe}from"./select-D56vy0cS.js";import{T as re}from"./textarea-BOwupY9k.js";import{u as ae}from"./use-org-auth-client-CeU98DnY.js";import{u as le}from"./use-organization-roles-ENGApVEO.js";const ce=H().email("Invalid email address");function me(e){if(!e.trim())return[];const d=e.split(/[,;\n]/).map(c=>c.trim().toLowerCase()).filter(c=>c.length>0);return Array.from(new Set(d))}function ve({trigger:e}){const[d,c]=L.useState(!1),{locator:h}=q(),b=ae(),r=Q(),{data:m}=V.useSession(),l=m?.user?.email,{roles:g,isLoading:u}=le(),f=g.filter(n=>n.role!=="owner"),o=z({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),E=o.watch("emailsText"),j=o.watch("role"),p=me(E).filter(n=>{const s=ce.safeParse(n).success,a=!l||n!==l.toLowerCase();return s&&a}),i=B(),x=T({mutationFn:async({emails:n,role:s})=>{if(!s)throw new Error(i("common.inviteMemberDialog.errorSelectRole"));const a=await Promise.allSettled(n.map(async y=>{const R=await b.organization.inviteMember({email:y,role:s});if(R.error)throw new Error(R.error.message);return R.data})),w=a.filter(y=>y.status==="rejected");if(w.length>0)throw new Error(i("common.inviteMemberDialog.errorFailedInvite",{count:w.length}));return a},onSuccess:(n,{emails:s,role:a})=>{F("member_invited",{count:s.length,role:a}),r.invalidateQueries({queryKey:M.members(h)}),r.invalidateQueries({queryKey:M.invitations(h)}),S.success(s.length===1?i("common.inviteMemberDialog.successSingle"):i("common.inviteMemberDialog.successMultiple",{count:s.length})),o.reset({emailsText:"",role:"user"}),c(!1)},onError:(n,{emails:s,role:a})=>{F("member_invite_failed",{count:s.length,role:a,error:n instanceof Error?n.message:String(n)}),S.error(n instanceof Error?n.message:i("common.inviteMemberDialog.errorGeneric"))}}),D=n=>{if(p.length===0){S.error(i("common.inviteMemberDialog.errorNoValidEmail"));return}if(!n.role){S.error(i("common.inviteMemberDialog.errorSelectRole"));return}x.mutate({emails:p,role:n.role})},v=p.length>0&&!!j;return t.jsxs(G,{open:d,onOpenChange:c,children:[t.jsx(U,{asChild:!0,children:e}),t.jsxs(Z,{className:"sm:max-w-lg",children:[t.jsx(k,{children:t.jsx(Y,{children:i("common.inviteMemberDialog.title")})}),t.jsx(_,{...o,children:t.jsxs("form",{onSubmit:o.handleSubmit(D),className:"space-y-4",children:[t.jsx(A,{control:o.control,name:"emailsText",render:({field:n})=>t.jsxs(N,{children:[t.jsx(ee,{children:i("common.inviteMemberDialog.emailLabel")}),t.jsx(I,{children:t.jsx(re,{...n,disabled:x.isPending,placeholder:i("common.inviteMemberDialog.emailPlaceholder"),className:"min-h-[120px] resize-none"})}),t.jsx(O,{})]})}),t.jsx(A,{control:o.control,name:"role",render:({field:n})=>t.jsxs(N,{children:[t.jsx(I,{children:t.jsxs(se,{value:n.value,onValueChange:n.onChange,disabled:x.isPending||u,children:[t.jsx(te,{className:"w-full",children:t.jsx(ie,{placeholder:i("common.inviteMemberDialog.roleSelectPlaceholder")})}),t.jsx(ne,{children:f.map(s=>{const a=[];return s.isBuiltin||(s.allowsAllStaticPermissions?a.push(i("common.inviteMemberDialog.permFullOrgAccess")):s.staticPermissionCount&&s.staticPermissionCount>0&&a.push(i("common.inviteMemberDialog.permOrgPerms",{count:s.staticPermissionCount})),s.allowsAllConnections?a.push(i("common.inviteMemberDialog.permAllConnections")):s.connectionCount&&s.connectionCount>0&&a.push(i("common.inviteMemberDialog.permConnections",{count:s.connectionCount})),(s.connectionCount!==0||s.allowsAllConnections)&&(s.allowsAllTools?a.push(i("common.inviteMemberDialog.permAllTools")):s.toolCount&&s.toolCount>0&&a.push(i("common.inviteMemberDialog.permTools",{count:s.toolCount})))),t.jsx(oe,{value:s.role,children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{children:s.label}),!s.isBuiltin&&a.length>0&&t.jsx("span",{className:"text-xs text-muted-foreground",children:a.join(", ")})]})},s.role)})})]})}),t.jsx(O,{})]})}),t.jsxs($,{children:[t.jsx(P,{variant:"outline",onClick:()=>{o.reset({emailsText:"",role:"user"}),c(!1)},type:"button",disabled:x.isPending,children:i("common.inviteMemberDialog.cancelButton")}),t.jsx(P,{type:"submit",disabled:x.isPending||!v,children:x.isPending?i("common.inviteMemberDialog.invitingButton"):i("common.inviteMemberDialog.inviteButton",{count:p.length||0})})]})]})})]})]})}function xe(){const e=J.c(10),{org:d}=q(),c=K(),{capabilities:h,isPrivileged:b}=W(),r=b||!!h["members:manage"];let m;e[0]!==d.id?(m=M.organizationJoinRequests(d.id),e[0]=d.id,e[1]=m):m=e[1];let l;e[2]!==c?(l=()=>c.call("ORGANIZATION_JOIN_REQUEST_LIST",{}),e[2]=c,e[3]=l):l=e[3];const g=!!d.id&&r;let u;e[4]!==m||e[5]!==l||e[6]!==g?(u={queryKey:m,queryFn:l,enabled:g},e[4]=m,e[5]=l,e[6]=g,e[7]=u):u=e[7];const{data:f}=X(u);let o;return e[8]!==f?.requests?(o=f?.requests??[],e[8]=f?.requests,e[9]=o):o=e[9],o}function be(){const e=J.c(29),{org:d,locator:c}=q(),h=K(),b=Q(),r=B();let m;e[0]!==c||e[1]!==d||e[2]!==b?(m=()=>{b.invalidateQueries({queryKey:M.organizationJoinRequests(d.id)}),b.invalidateQueries({queryKey:M.members(c)})},e[0]=c,e[1]=d,e[2]=b,e[3]=m):m=e[3];const l=m;let g;e[4]!==h?(g=v=>h.call("ORGANIZATION_JOIN_REQUEST_APPROVE",{requestId:v}),e[4]=h,e[5]=g):g=e[5];let u;e[6]!==l||e[7]!==r?(u=()=>{l(),S.success(r("settings.joinRequestsSection.approved"))},e[6]=l,e[7]=r,e[8]=u):u=e[8];let f;e[9]!==r?(f=v=>S.error(v instanceof Error?v.message:r("settings.joinRequestsSection.approveFailed")),e[9]=r,e[10]=f):f=e[10];let o;e[11]!==g||e[12]!==u||e[13]!==f?(o={mutationFn:g,onSuccess:u,onError:f},e[11]=g,e[12]=u,e[13]=f,e[14]=o):o=e[14];const E=T(o);let j;e[15]!==h?(j=v=>h.call("ORGANIZATION_JOIN_REQUEST_DENY",{requestId:v}),e[15]=h,e[16]=j):j=e[16];let C;e[17]!==l||e[18]!==r?(C=()=>{l(),S.success(r("settings.joinRequestsSection.denied"))},e[17]=l,e[18]=r,e[19]=C):C=e[19];let p;e[20]!==r?(p=v=>S.error(v instanceof Error?v.message:r("settings.joinRequestsSection.denyFailed")),e[20]=r,e[21]=p):p=e[21];let i;e[22]!==j||e[23]!==C||e[24]!==p?(i={mutationFn:j,onSuccess:C,onError:p},e[22]=j,e[23]=C,e[24]=p,e[25]=i):i=e[25];const x=T(i);let D;return e[26]!==E||e[27]!==x?(D={approve:E,deny:x},e[26]=E,e[27]=x,e[28]=D):D=e[28],D}export{ve as I,be as a,xe as u};
|
package/dist/client/assets/{use-main-panel-tabs-B0dFgvCE.js → use-main-panel-tabs-DpP9vHof.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Ue,b as He,u as Le,a2 as Oe,fd as Be,fe as Ke,ff as le,fg as de,al as $e,aj as me,fh as qe,fi as Qe,r as Y,dV as We,M as pe,fj as _e,fk as ze}from"./index-
|
|
1
|
+
import{c as Ue,b as He,u as Le,a2 as Oe,fd as Be,fe as Ke,ff as le,fg as de,al as $e,aj as me,fh as qe,fi as Qe,r as Y,dV as We,M as pe,fj as _e,fk as ze}from"./index-CmhfcT17.js";import{o as Ge,q as Je,u as Xe,c as Ye,v as Ze,a as x,w as et,x as tt}from"./use-project-native-view-presence-CHwdqgjD.js";import{b as at}from"./agent-icon-DEc9IKAh.js";import{i as ot}from"./Monitor01-CtZrNe_q.js";import{u as nt}from"./use-connection-Dwi0oczT.js";import{a as st}from"./use-mcp-client-Ck2YNhED.js";import{u as it}from"./use-mcp-tools-DpjJofSD.js";import{a as ct}from"./repository-binding-DMbjGWw3.js";import{g as rt}from"./types-scp_0M_s.js";import{t as lt}from"./utils-CVEq3hMx.js";import{u as dt}from"./index-Bh2O5PEv.js";import{F as ue}from"./file-type-icon-Cp93tNz3.js";import{a as mt,u as pt}from"./use-panel-navigate-DSEJRbyH.js";import{r as Z}from"./resolve-tab-icon-ChFmZL6X.js";import{u as ut}from"./use-task-metadata-B3kpFQ2d.js";import{r as ft}from"./preview-source-BsRLGWUP.js";import{i as bt,r as Tt,s as vt}from"./shell-layout-BdBSZR6C.js";import{a as It}from"./input-C5uMiH8T.js";import{u as Pt}from"./use-organization-settings-DsiL1E35.js";import{u as kt}from"./use-project-scope-DGWdW_3w.js";import{c as wt}from"./chat-context-Ek-8IxEX.js";import{r as yt}from"./virtual-mcp-B3puFk7u.js";function Gt(o){const e=Ue.c(35),d=He(),{openPanel:f,closePanel:F}=mt();let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={strict:!1},e[0]=b):b=e[0];const fe=Le(b),ee=pt(),te=Ge(),i=ct(o.virtualMcpId),T=ut(o.taskId),{org:n}=Oe(),{currentBranch:be,activeTask:v}=wt(),m=i?.metadata.ui?.layout??null,c=m?.tabs??[],r=i?.id?Be(i.id):null,I=T?.expanded_tools??[],P=Pt(),{scopeId:Te,project:ve}=kt(),k=Je(Te,ve,i),w=Xe(k.project);Ye(k.project?.id);const ae=Ze(k.resolvedScopeId,x(k.project?.metadata),w.presence);let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y={includeVirtual:!0},e[1]=y):y=e[1];const p=nt(y),Ie=dt(),E=v?.branch??be;let g;e[2]!==v?.metadata||e[3]!==o.taskId||e[4]!==i?.metadata||e[5]!==T||e[6]!==E?(g=ft({threadId:o.taskId,sandboxBranch:E,agentHasRepo:x(i?.metadata),threadHasRepo:x(T)||x(v?.metadata)}),e[2]=v?.metadata,e[3]=o.taskId,e[4]=i?.metadata,e[5]=T,e[6]=E,e[7]=g):g=e[7];const Pe=g,U=Ie.lifecycle.phase==="running",{runtime:ke,resolved:oe}=It(o.virtualMcpId),H=!!r&&U;let h;e[8]!==H?(h={enabled:H},e[8]=H,e[9]=h):h=e[9];const ne=st({connectionId:r,orgId:n.id,orgSlug:n.slug},h),L=ne,O=!!ne&&U;let V;e[10]!==L||e[11]!==O?(V={client:L,enabled:O},e[10]=L,e[11]=O,e[12]=V):V=e[12];const{data:we}=it(V),se=r&&U?(we?.tools??[]).filter(Mt).map(t=>({connectionId:r,toolName:t.name,label:lt(t.name),icon:null})):[],B=se[0],ye=B?se:[],u=B&&r?{type:"ext-apps",id:r,toolName:B.toolName}:m?.defaultMainView??null,ge=yt(m),ie={assets:w.assetsPending,siteAccess:w.siteAccessPending,releases:w.releasesPending},{activeTab:M,mainOpen:l}=Ke({panelTabId:ee,mainPanelParam:fe.mainpanel,routeDefaultMain:te,metadata:u||m?{defaultMainView:u,tabs:c.map(Vt)}:null}),he=u||m?{defaultMainView:u,tabs:c.map(ht)}:null,C=Tt({hasSource:Pe==="repo"||P,runtime:ke,cmsMode:ge}),Ve=C.includes("content"),Me=le(he),Ce=u?.type,ce=et(Ce,ae,ie,C,oe),K=ce?le(null):Me,Se=tt(M,ae,ie),je=!C.includes("code")&&oe&&de(M)!==null,a=!ee&&!te&&ce||M==="content"&&!Ve||je||Se?K:M,$=$e(a);let S;e[13]!==d?(S=t=>d(t==="site-editor"?"common.mainPanelTabs.preview":t==="content"?"common.mainPanelTabs.content":"common.mainPanelTabs.code"),e[13]=d,e[14]=S):S=e[14];const Ne=S,q=new Map;for(const t of I){const s=me(t.appId,t.toolName);q.set(s,{id:s,title:t.toolName,appId:t.appId,iconKey:t.toolName})}for(const t of ye){if(t.toolName==="fetch_assets")continue;const s=me(t.connectionId,t.toolName);q.set(s,{id:s,title:t.label||t.toolName,appId:t.connectionId,iconKey:t.toolName,iconUrl:t.icon??null})}const Q=qe(a),W=Q?Q.key.split("/").pop()??Q.key:null,Ae=W?[{id:a,title:W,kind:"file",icon:{kind:"component",Component:t=>Y.createElement(ue,{filename:W,...t})}}]:[],j=Qe(a),De=j?[{id:a,title:(j.path.split("/").pop()??j.path).replace(/\.html$/i,""),kind:"file",icon:{kind:"component",Component:t=>Y.createElement(j.path.startsWith("pages/")?at:ot,t)}}]:[],_=We(a),z=_?_.path.split("/").pop()??_.path:null,Re=z?[{id:a,title:z,kind:"file",icon:{kind:"component",Component:t=>Y.createElement(ue,{filename:z,...t})}}]:[],xe=bt(a)?C.map(t=>({id:t==="code"&&de(a)?a:t,title:Ne(t),kind:"system",icon:Z({tabId:t,kind:"system",connections:p})})):[];let N;e[15]!==p?(N=t=>({id:_e(t.id),title:t.title,kind:"agent",icon:Z({tabId:t.id,kind:"agent",appId:t.view.appId,connections:p})}),e[15]=p,e[16]=N):N=e[16];const Fe=[...xe,...Ae,...De,...Re,...c.map(N),...Array.from(q.values()).map(t=>({id:t.id,title:t.title,kind:"expanded",icon:Z({tabId:t.iconKey,kind:"expanded",appId:t.appId,iconUrl:t.iconUrl,connections:p})}))],re=new Set,G=Fe.filter(t=>re.has(t.id)?!1:(re.add(t.id),!0)),Ee=o.virtualMcpId;let A;e[17]!==n.id?(A=pe(n.id),e[17]=n.id,e[18]=A):A=e[18];const J=Ee===A;let D;e[19]!==a||e[20]!==F||e[21]!==l||e[22]!==J||e[23]!==f||e[24]!==n.id||e[25]!==P?(D=t=>{if(vt({reportsOnly:P,onReportAgent:J,tabId:t})){f(t,{virtualmcpid:pe(n.id),search:gt});return}const s=ze({clickedId:t,activeTab:a,mainOpen:l});"close"in s?F():f(s.tabId)},e[19]=a,e[20]=F,e[21]=l,e[22]=J,e[23]=f,e[24]=n.id,e[25]=P,e[26]=D):D=e[26];const X=D;let R;return e[27]!==a||e[28]!==$||e[29]!==I||e[30]!==c||e[31]!==l||e[32]!==X||e[33]!==G?(R={activeTab:a,mainOpen:l,setActiveTab:X,layoutTabs:c,expandedTools:I,automationTabParsed:$,tabs:G},e[27]=a,e[28]=$,e[29]=I,e[30]=c,e[31]=l,e[32]=X,e[33]=G,e[34]=R):R=e[34],R}function gt(o){return{...o,thread:void 0}}function ht(o){return{id:o.id}}function Vt(o){return{id:o.id}}function Mt(o){return!!rt(o._meta)}export{Gt as u};
|
package/dist/client/assets/{use-mcp-auth-status-DaPeILTX.js → use-mcp-auth-status-C5UkoCc-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,b as k,a3 as N,aW as S,j as o,a2 as $,K as A,R as L}from"./index-
|
|
1
|
+
import{c as b,b as k,a3 as N,aW as S,j as o,a2 as $,K as A,R as L}from"./index-CmhfcT17.js";import{B as g}from"./badge-BPJdS_zE.js";import{c as v,T,a as I,b as R}from"./tooltip-4UW874b4.js";import{g as _}from"./types-scp_0M_s.js";import{s as H}from"./Image01-C9QzuJaK.js";import{q as P,aR as U}from"./agent-icon-DEc9IKAh.js";import{i as w}from"./mcp-oauth-DPp6A0NQ.js";const O=[{key:"readOnlyHint",labelKey:"tools.toolsList.readOnly",Icon:H,variant:"secondary"},{key:"destructiveHint",labelKey:"tools.toolsList.destructive",Icon:N,variant:"destructive"},{key:"idempotentHint",labelKey:"tools.toolsList.idempotent",Icon:S,variant:"secondary"},{key:"openWorldHint",labelKey:"tools.toolsList.openWorld",Icon:P,variant:"outline"}];function Q(y){const e=b.c(22),{annotations:c,_meta:r}=y,t=k();let l;e[0]!==r?(l=_(r),e[0]=r,e[1]=l):l=e[1];const i=!!l;let s,n,a,u,d;if(e[2]!==c||e[3]!==i||e[4]!==t){d=Symbol.for("react.early_return_sentinel");e:{const x=c?O.filter(h=>c[h.key]===!0):[];if(x.length===0&&!i){d=null;break e}s=R,n="flex gap-1 flex-nowrap",e[10]!==i||e[11]!==t?(a=i&&o.jsxs(v,{children:[o.jsx(T,{asChild:!0,children:o.jsx(g,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(U,{})})}),o.jsx(I,{children:t("tools.toolsList.interactive")})]}),e[10]=i,e[11]=t,e[12]=a):a=e[12];let f;e[13]!==t?(f=h=>{const{labelKey:j,Icon:C,variant:K}=h;return o.jsxs(v,{children:[o.jsx(T,{asChild:!0,children:o.jsx(g,{asChild:!0,variant:K,className:"size-6 p-1",children:o.jsx(C,{})})}),o.jsx(I,{children:t(j)})]},j)},e[13]=t,e[14]=f):f=e[14],u=x.map(f)}e[2]=c,e[3]=i,e[4]=t,e[5]=s,e[6]=n,e[7]=a,e[8]=u,e[9]=d}else s=e[5],n=e[6],a=e[7],u=e[8],d=e[9];if(d!==Symbol.for("react.early_return_sentinel"))return d;let m;e[15]!==n||e[16]!==a||e[17]!==u?(m=o.jsxs("div",{className:n,children:[a,u]}),e[15]=n,e[16]=a,e[17]=u,e[18]=m):m=e[18];let p;return e[19]!==s||e[20]!==m?(p=o.jsx(s,{children:m}),e[19]=s,e[20]=m,e[21]=p):p=e[21],p}function Y(y){const e=b.c(11),{connectionId:c}=y,{org:r}=$();let t,l,i;e[0]!==c||e[1]!==r.slug?(t=new URL(`/api/${r.slug}/mcp/${c}`,window.location.origin),i=L,l=A.isMCPAuthenticated(t.href,null),e[0]=c,e[1]=r.slug,e[2]=t,e[3]=l,e[4]=i):(t=e[2],l=e[3],i=e[4]);let s;e[5]!==t||e[6]!==r.id?(s=()=>w({url:t.href,token:null,orgId:r.id}),e[5]=t,e[6]=r.id,e[7]=s):s=e[7];let n;e[8]!==l||e[9]!==s?(n={queryKey:l,queryFn:s},e[8]=l,e[9]=s,e[10]=n):n=e[10];const{data:a}=i(n);return a}export{Q as T,Y as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c9 as ce,ca as le,cb as ue,cc as de,cd as he,ce as m,cf as g,cg as fe,ch as pe,ci as me,cj as M,ck as _e,cl as F,cm as we,cn as q,co as ge,cp as D,cq as Te,cr as ye,cs as ke,ct as z,cu as ve,cv as Se,cw as Ce,cx as ee,cy as be,cz as Re,cA as Ie,bk as Ee,cB as qe,cC as Pe,cD as A,cE as $e,cF as Me,cG as Ae,cH as He,cI as Oe,cJ as xe,cK as Ne,cL as Ue,cM as je,cN as Fe,cO as De,cP as Le,cQ as Ve,bb as V,cR as Qe,cS as N,K as te,J as ze,c as se,R as Je,m as We}from"./index-BgxfZN5I.js";import{U as P,b as H,c as J}from"./auth-CpMllKKy.js";function x(a){return!!a._zod}function b(a,e){return x(a)?ce(a,e):a.safeParse(e)}function re(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 Ke(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 W(a){const t=re(a)?.method;if(!t)throw new Error("Schema is missing a method literal");const s=Ke(t);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function K(a,e){const t=b(a,e);if(!t.success)throw t.error;return t.data}const Ge=6e4;class Be{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(le,t=>{this._oncancel(t)}),this.setNotificationHandler(ue,t=>{this._onprogress(t)}),this.setRequestHandler(de,t=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(he,async(t,s)=>{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new m(g.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(fe,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 h=u,f=new m(h.error.code,h.error.message,h.error.data);l(f)}else{const h=i.type==="response"?"Response":"Error";this._onerror(new Error(`${h} 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 m(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(pe,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 m(g.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(me,async(t,s)=>{try{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new m(g.InvalidParams,`Task not found: ${t.params.taskId}`);if(R(r.status))throw new m(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 m(g.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof m?r:new m(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),m.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)||_e(o)?this._onresponse(o):F(o)?this._onrequest(o,n):we(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=m.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(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):r?.send(l).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const i=ge(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 h={relatedRequestId:e.id};o&&(h.relatedTask={taskId:o}),await this.notification(l,h)},sendRequest:async(l,h,f)=>{if(n.signal.aborted)throw new m(g.ConnectionClosed,"Request was cancelled");const w={...f,relatedRequestId:e.id};o&&!w.relatedTask&&(w.relatedTask={taskId:o});const y=w.relatedTask?.taskId??o;return y&&u&&await u.updateTaskStatus(y,"input_required"),await this.request(l,h,w)},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 h={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)},async l=>{if(n.signal.aborted)return;const h={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:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)}).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 m(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=m.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 m?n:new m(g.InternalError,String(n))}}return}let o;try{const n=await this.request(e,D,s);if(n.task)o=n.task.taskId,yield{type:"taskCreated",task:n.task};else throw new m(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 m(g.InternalError,`Task ${o} failed`)}:i.status==="cancelled"&&(yield{type:"error",error:new m(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 m?n:new m(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 h=c=>{l(c)};if(!this._transport){h(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),i&&this.assertTaskCapability(e.method)}catch(c){h(c);return}s?.signal?.throwIfAborted();const f=this._requestMessageId++,w={...e,jsonrpc:"2.0",id:f};s?.onprogress&&(this._progressHandlers.set(f,s.onprogress),w.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),i&&(w.params={...w.params,task:i}),u&&(w.params={...w.params,_meta:{...w.params?._meta||{},[q]:u}});const y=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 _=c instanceof m?c:new m(g.RequestTimeout,String(c));l(_)};this._responseHandlers.set(f,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return l(c);try{const _=b(t,c.result);_.success?p(_.data):l(_.error)}catch(_){l(_)}}}),s?.signal?.addEventListener("abort",()=>{y(s?.signal?.reason)});const T=s?.timeout??Ge,k=()=>y(m.fromError(g.RequestTimeout,"Request timed out",{timeout:T}));this._setupTimeout(f,T,s?.maxTotalTimeout,k,s?.resetTimeoutOnProgress??!1);const d=u?.taskId;if(d){const c=_=>{const v=this._responseHandlers.get(f);v?v(_):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,c),this._enqueueTaskMessage(d,{type:"request",message:w,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(f),l(_)})}else this._transport.send(w,{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},Te,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},ye,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},ke,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=W(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(r,o)=>{const n=K(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=W(e);this._notificationHandlers.set(s,r=>{const o=K(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"&&F(r.message)){const o=r.message.id,n=this._requestResolvers.get(o);n?(n(new m(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 m(g.InvalidRequest,"Request cancelled"));return}const n=setTimeout(r,s);t.addEventListener("abort",()=>{clearTimeout(n),o(new m(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 m(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=z.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 m(g.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(R(i.status))throw new m(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=z.parse({method:"notifications/tasks/status",params:u});await this.notification(p),R(u.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>s.listTasks(r,t)}}}function G(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function Ze(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];G(n)&&G(o)?t[r]={...n,...o}:t[r]=o}return t}var Ye=Se();const Xe=ve(Ye);function et(){const a=new Xe({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Ce(a),a}class tt{constructor(e){this._ajv=e??et()}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 st{constructor(e){this._client=e}async*callToolStream(e,t=ee,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 m(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 m(g.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof m){yield{type:"error",error:l};return}yield{type:"error",error:new m(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 rt(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 ot(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 at(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 nt=class extends Be{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 tt,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",be,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Re,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",Ie,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new st(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ze(this._capabilities,e)}setRequestHandler(e,t){const r=re(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(je,u);if(!l.success){const c=l.error instanceof Error?l.error.message:String(l.error);throw new m(g.InvalidParams,`Invalid elicitation request: ${c}`)}const{params:h}=l.data;h.mode=h.mode??"form";const{supportsFormMode:f,supportsUrlMode:w}=at(this._capabilities.elicitation);if(h.mode==="form"&&!f)throw new m(g.InvalidParams,"Client does not support form-mode elicitation requests");if(h.mode==="url"&&!w)throw new m(g.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(t(u,p));if(h.task){const c=b(D,y);if(!c.success){const _=c.error instanceof Error?c.error.message:String(c.error);throw new m(g.InvalidParams,`Invalid task creation result: ${_}`)}return c.data}const T=b(Fe,y);if(!T.success){const c=T.error instanceof Error?T.error.message:String(T.error);throw new m(g.InvalidParams,`Invalid elicitation result: ${c}`)}const k=T.data,d=h.mode==="form"?h.requestedSchema:void 0;if(h.mode==="form"&&k.action==="accept"&&k.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{O(d,k.content)}catch{}return k};return super.setRequestHandler(e,i)}if(n==="sampling/createMessage"){const i=async(u,p)=>{const l=b(De,u);if(!l.success){const k=l.error instanceof Error?l.error.message:String(l.error);throw new m(g.InvalidParams,`Invalid sampling request: ${k}`)}const{params:h}=l.data,f=await Promise.resolve(t(u,p));if(h.task){const k=b(D,f);if(!k.success){const d=k.error instanceof Error?k.error.message:String(k.error);throw new m(g.InvalidParams,`Invalid task creation result: ${d}`)}return k.data}const y=h.tools||h.toolChoice?Le:Ve,T=b(y,f);if(!T.success){const k=T.error instanceof Error?T.error.message:String(T.error);throw new m(g.InvalidParams,`Invalid sampling result: ${k}`)}return T.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:Ee,capabilities:this._capabilities,clientInfo:this._clientInfo}},qe,t);if(s===void 0)throw new Error(`Server sent invalid initialize result: ${s}`);if(!Pe.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){rt(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&ot(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},$e,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},Me,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},Ae,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},He,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},Oe,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},xe,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=ee,s){if(this.isToolTaskRequired(e.name))throw new m(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 m(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 m(g.InvalidParams,`Structured content does not match the tool's output schema: ${n.errorMessage}`)}catch(n){throw n instanceof m?n:new m(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},Ne,t);return this.cacheToolMetadata(s.tools),s}_setupListChangedHandler(e,t,s,r){const o=Ue.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 h=await r();u(null,h)}catch(h){const f=h instanceof Error?h:new Error(String(h));u(f,null)}},l=()=>{if(i){const h=this._listChangedDebounceTimers.get(e);h&&clearTimeout(h);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 U=a=>[{type:"text",text:a}];function it(a){const e=V(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(h){const f=h instanceof Error?h.message:"Network error";return{content:U(f),isError:!0}}if(!p.ok){let h=`${u.name} failed (${p.status})`;try{const f=await p.json();f?.error&&(h=f.error)}catch{}return{content:U(h),isError:!0}}const l=await p.json().catch(()=>({}));return{content:U(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 L(a){return a?a instanceof Headers?Object.fromEntries(a.entries()):Array.isArray(a)?Object.fromEntries(a):{...a}:{}}function ct(a=fetch,e){return e?async(t,s)=>{const r={...e,...s,headers:s?.headers?{...L(e.headers),...L(s.headers)}:e.headers};return a(t,r)}:a}class B 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 Z=10,lt=13,I=32;function j(a){}function ut(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=j,onError:t=j,onRetry:s=j,onComment:r}=a,o=[];let n=!0,i,u="",p=0,l;function h(d){if(n&&(n=!1,d.charCodeAt(0)===239&&d.charCodeAt(1)===187&&d.charCodeAt(2)===191&&(d=d.slice(3))),o.length===0){const v=f(d);v!==""&&o.push(v);return}if(d.indexOf(`
|
|
1
|
+
import{c9 as ce,ca as le,cb as ue,cc as de,cd as he,ce as m,cf as g,cg as fe,ch as pe,ci as me,cj as M,ck as _e,cl as F,cm as we,cn as q,co as ge,cp as D,cq as Te,cr as ye,cs as ke,ct as z,cu as ve,cv as Se,cw as Ce,cx as ee,cy as be,cz as Re,cA as Ie,bk as Ee,cB as qe,cC as Pe,cD as A,cE as $e,cF as Me,cG as Ae,cH as He,cI as Oe,cJ as xe,cK as Ne,cL as Ue,cM as je,cN as Fe,cO as De,cP as Le,cQ as Ve,bb as V,cR as Qe,cS as N,K as te,J as ze,c as se,R as Je,m as We}from"./index-CmhfcT17.js";import{U as P,b as H,c as J}from"./auth-D_LAZR_h.js";function x(a){return!!a._zod}function b(a,e){return x(a)?ce(a,e):a.safeParse(e)}function re(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 Ke(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 W(a){const t=re(a)?.method;if(!t)throw new Error("Schema is missing a method literal");const s=Ke(t);if(typeof s!="string")throw new Error("Schema method literal must be a string");return s}function K(a,e){const t=b(a,e);if(!t.success)throw t.error;return t.data}const Ge=6e4;class Be{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(le,t=>{this._oncancel(t)}),this.setNotificationHandler(ue,t=>{this._onprogress(t)}),this.setRequestHandler(de,t=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(he,async(t,s)=>{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new m(g.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(fe,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 h=u,f=new m(h.error.code,h.error.message,h.error.data);l(f)}else{const h=i.type==="response"?"Response":"Error";this._onerror(new Error(`${h} 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 m(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(pe,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 m(g.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(me,async(t,s)=>{try{const r=await this._taskStore.getTask(t.params.taskId,s.sessionId);if(!r)throw new m(g.InvalidParams,`Task not found: ${t.params.taskId}`);if(R(r.status))throw new m(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 m(g.InvalidParams,`Task not found after cancellation: ${t.params.taskId}`);return{_meta:{},...o}}catch(r){throw r instanceof m?r:new m(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),m.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)||_e(o)?this._onresponse(o):F(o)?this._onrequest(o,n):we(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=m.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(h=>this._onerror(new Error(`Failed to enqueue error response: ${h}`))):r?.send(l).catch(h=>this._onerror(new Error(`Failed to send an error response: ${h}`)));return}const n=new AbortController;this._requestHandlerAbortControllers.set(e.id,n);const i=ge(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 h={relatedRequestId:e.id};o&&(h.relatedTask={taskId:o}),await this.notification(l,h)},sendRequest:async(l,h,f)=>{if(n.signal.aborted)throw new m(g.ConnectionClosed,"Request was cancelled");const w={...f,relatedRequestId:e.id};o&&!w.relatedTask&&(w.relatedTask={taskId:o});const y=w.relatedTask?.taskId??o;return y&&u&&await u.updateTaskStatus(y,"input_required"),await this.request(l,h,w)},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 h={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)},async l=>{if(n.signal.aborted)return;const h={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:h,timestamp:Date.now()},r?.sessionId):await r?.send(h)}).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 m(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=m.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 m?n:new m(g.InternalError,String(n))}}return}let o;try{const n=await this.request(e,D,s);if(n.task)o=n.task.taskId,yield{type:"taskCreated",task:n.task};else throw new m(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 m(g.InternalError,`Task ${o} failed`)}:i.status==="cancelled"&&(yield{type:"error",error:new m(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 m?n:new m(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 h=c=>{l(c)};if(!this._transport){h(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),i&&this.assertTaskCapability(e.method)}catch(c){h(c);return}s?.signal?.throwIfAborted();const f=this._requestMessageId++,w={...e,jsonrpc:"2.0",id:f};s?.onprogress&&(this._progressHandlers.set(f,s.onprogress),w.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),i&&(w.params={...w.params,task:i}),u&&(w.params={...w.params,_meta:{...w.params?._meta||{},[q]:u}});const y=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 _=c instanceof m?c:new m(g.RequestTimeout,String(c));l(_)};this._responseHandlers.set(f,c=>{if(!s?.signal?.aborted){if(c instanceof Error)return l(c);try{const _=b(t,c.result);_.success?p(_.data):l(_.error)}catch(_){l(_)}}}),s?.signal?.addEventListener("abort",()=>{y(s?.signal?.reason)});const T=s?.timeout??Ge,k=()=>y(m.fromError(g.RequestTimeout,"Request timed out",{timeout:T}));this._setupTimeout(f,T,s?.maxTotalTimeout,k,s?.resetTimeoutOnProgress??!1);const d=u?.taskId;if(d){const c=_=>{const v=this._responseHandlers.get(f);v?v(_):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,c),this._enqueueTaskMessage(d,{type:"request",message:w,timestamp:Date.now()}).catch(_=>{this._cleanupTimeout(f),l(_)})}else this._transport.send(w,{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},Te,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},ye,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},ke,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=W(e);this.assertRequestHandlerCapability(s),this._requestHandlers.set(s,(r,o)=>{const n=K(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=W(e);this._notificationHandlers.set(s,r=>{const o=K(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"&&F(r.message)){const o=r.message.id,n=this._requestResolvers.get(o);n?(n(new m(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 m(g.InvalidRequest,"Request cancelled"));return}const n=setTimeout(r,s);t.addEventListener("abort",()=>{clearTimeout(n),o(new m(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 m(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=z.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 m(g.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(R(i.status))throw new m(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=z.parse({method:"notifications/tasks/status",params:u});await this.notification(p),R(u.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>s.listTasks(r,t)}}}function G(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)}function Ze(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];G(n)&&G(o)?t[r]={...n,...o}:t[r]=o}return t}var Ye=Se();const Xe=ve(Ye);function et(){const a=new Xe({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return Ce(a),a}class tt{constructor(e){this._ajv=e??et()}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 st{constructor(e){this._client=e}async*callToolStream(e,t=ee,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 m(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 m(g.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof m){yield{type:"error",error:l};return}yield{type:"error",error:new m(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 rt(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 ot(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 at(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 nt=class extends Be{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 tt,t?.listChanged&&(this._pendingListChangedConfig=t.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",be,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",Re,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",Ie,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new st(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Ze(this._capabilities,e)}setRequestHandler(e,t){const r=re(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(je,u);if(!l.success){const c=l.error instanceof Error?l.error.message:String(l.error);throw new m(g.InvalidParams,`Invalid elicitation request: ${c}`)}const{params:h}=l.data;h.mode=h.mode??"form";const{supportsFormMode:f,supportsUrlMode:w}=at(this._capabilities.elicitation);if(h.mode==="form"&&!f)throw new m(g.InvalidParams,"Client does not support form-mode elicitation requests");if(h.mode==="url"&&!w)throw new m(g.InvalidParams,"Client does not support URL-mode elicitation requests");const y=await Promise.resolve(t(u,p));if(h.task){const c=b(D,y);if(!c.success){const _=c.error instanceof Error?c.error.message:String(c.error);throw new m(g.InvalidParams,`Invalid task creation result: ${_}`)}return c.data}const T=b(Fe,y);if(!T.success){const c=T.error instanceof Error?T.error.message:String(T.error);throw new m(g.InvalidParams,`Invalid elicitation result: ${c}`)}const k=T.data,d=h.mode==="form"?h.requestedSchema:void 0;if(h.mode==="form"&&k.action==="accept"&&k.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{O(d,k.content)}catch{}return k};return super.setRequestHandler(e,i)}if(n==="sampling/createMessage"){const i=async(u,p)=>{const l=b(De,u);if(!l.success){const k=l.error instanceof Error?l.error.message:String(l.error);throw new m(g.InvalidParams,`Invalid sampling request: ${k}`)}const{params:h}=l.data,f=await Promise.resolve(t(u,p));if(h.task){const k=b(D,f);if(!k.success){const d=k.error instanceof Error?k.error.message:String(k.error);throw new m(g.InvalidParams,`Invalid task creation result: ${d}`)}return k.data}const y=h.tools||h.toolChoice?Le:Ve,T=b(y,f);if(!T.success){const k=T.error instanceof Error?T.error.message:String(T.error);throw new m(g.InvalidParams,`Invalid sampling result: ${k}`)}return T.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:Ee,capabilities:this._capabilities,clientInfo:this._clientInfo}},qe,t);if(s===void 0)throw new Error(`Server sent invalid initialize result: ${s}`);if(!Pe.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){rt(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&ot(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},$e,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},Me,t)}async listPrompts(e,t){return this.request({method:"prompts/list",params:e},Ae,t)}async listResources(e,t){return this.request({method:"resources/list",params:e},He,t)}async listResourceTemplates(e,t){return this.request({method:"resources/templates/list",params:e},Oe,t)}async readResource(e,t){return this.request({method:"resources/read",params:e},xe,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=ee,s){if(this.isToolTaskRequired(e.name))throw new m(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 m(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 m(g.InvalidParams,`Structured content does not match the tool's output schema: ${n.errorMessage}`)}catch(n){throw n instanceof m?n:new m(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},Ne,t);return this.cacheToolMetadata(s.tools),s}_setupListChangedHandler(e,t,s,r){const o=Ue.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 h=await r();u(null,h)}catch(h){const f=h instanceof Error?h:new Error(String(h));u(f,null)}},l=()=>{if(i){const h=this._listChangedDebounceTimers.get(e);h&&clearTimeout(h);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 U=a=>[{type:"text",text:a}];function it(a){const e=V(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(h){const f=h instanceof Error?h.message:"Network error";return{content:U(f),isError:!0}}if(!p.ok){let h=`${u.name} failed (${p.status})`;try{const f=await p.json();f?.error&&(h=f.error)}catch{}return{content:U(h),isError:!0}}const l=await p.json().catch(()=>({}));return{content:U(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 L(a){return a?a instanceof Headers?Object.fromEntries(a.entries()):Array.isArray(a)?Object.fromEntries(a):{...a}:{}}function ct(a=fetch,e){return e?async(t,s)=>{const r={...e,...s,headers:s?.headers?{...L(e.headers),...L(s.headers)}:e.headers};return a(t,r)}:a}class B 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 Z=10,lt=13,I=32;function j(a){}function ut(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=j,onError:t=j,onRetry:s=j,onComment:r}=a,o=[];let n=!0,i,u="",p=0,l;function h(d){if(n&&(n=!1,d.charCodeAt(0)===239&&d.charCodeAt(1)===187&&d.charCodeAt(2)===191&&(d=d.slice(3))),o.length===0){const v=f(d);v!==""&&o.push(v);return}if(d.indexOf(`
|
|
2
2
|
`)===-1&&d.indexOf("\r")===-1){o.push(d);return}o.push(d);const c=o.join("");o.length=0;const _=f(c);_!==""&&o.push(_)}function f(d){let c=0;if(d.indexOf("\r")===-1){let _=d.indexOf(`
|
|
3
3
|
`,c);for(;_!==-1;){if(c===_){p>0&&e({id:i,event:l,data:u}),i=void 0,u="",p=0,l=void 0,c=_+1,_=d.indexOf(`
|
|
4
4
|
`,c);continue}const v=d.charCodeAt(c);if(Y(d,c,v)){const S=d.charCodeAt(c+5)===I?c+6:c+5,C=d.slice(S,_);if(p===0&&d.charCodeAt(_+1)===Z){e({id:i,event:l,data:C}),i=void 0,u="",l=void 0,c=_+2,_=d.indexOf(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,m as u,ce as m,cf as f,R as y,K as n}from"./index-
|
|
1
|
+
import{c as l,m as u,ce as m,cf as f,R as y,K as n}from"./index-CmhfcT17.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 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],y(a)}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],u(a)}export{q as a,b as g,c as l,g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,R as p,m as q,K as m}from"./index-
|
|
1
|
+
import{c as f,R as p,m as q,K as m}from"./index-CmhfcT17.js";function C(n){const e=f.c(12);let t,s;e[0]!==n?({client:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=m.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let i;e[5]!==t?(i=async()=>await t.listTools(),e[5]=t,e[6]=i):i=e[6];const r=s.staleTime??3e4;let o;return e[7]!==s||e[8]!==l||e[9]!==i||e[10]!==r?(o={...s,queryKey:l,queryFn:i,staleTime:r,retry:!1},e[7]=s,e[8]=l,e[9]=i,e[10]=r,e[11]=o):o=e[11],p(o)}function g(n){const e=f.c(12);let t,s;e[0]!==n?({client:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=m.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let i;e[5]!==t?(i=async()=>await t.listTools(),e[5]=t,e[6]=i):i=e[6];const r=s.staleTime??3e4;let o;return e[7]!==s||e[8]!==l||e[9]!==i||e[10]!==r?(o={...s,queryKey:l,queryFn:i,staleTime:r,retry:!1},e[7]=s,e[8]=l,e[9]=i,e[10]=r,e[11]=o):o=e[11],q(o)}function L(n){const e=f.c(21);let t,s,l,i;e[0]!==n?({client:t,toolName:i,toolArguments:l,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=l,e[4]=i):(t=e[1],s=e[2],l=e[3],i=e[4]);let r,o,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==i){const T=JSON.stringify(l??{});u=p,r=s,o=m.mcpToolCall(t,i,T),e[5]=t,e[6]=s,e[7]=l,e[8]=i,e[9]=r,e[10]=o,e[11]=u}else r=e[9],o=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==i?(a=async()=>await t.callTool({name:i,arguments:l}),e[12]=t,e[13]=l,e[14]=i,e[15]=a):a=e[15];const y=s.staleTime??3e4;let c;return e[16]!==r||e[17]!==o||e[18]!==a||e[19]!==y?(c={...r,queryKey:o,queryFn:a,staleTime:y,retry:!1},e[16]=r,e[17]=o,e[18]=a,e[19]=y,e[20]=c):c=e[20],u(c)}export{C as a,L as b,g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,a2 as m,m as b,R as M,K as f}from"./index-
|
|
1
|
+
import{c,a2 as m,m as b,R as M,K as f}from"./index-CmhfcT17.js";import{u as y}from"./use-org-auth-client-CeU98DnY.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],M(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],b(l)}export{d as a,q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-CmhfcT17.js";const n=768,r=`(max-width: ${n-1}px)`;function o(e){const t=globalThis.matchMedia(r);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}const a=()=>globalThis.innerWidth<n,c=()=>!1;function h(){return s.useSyncExternalStore(o,a,c)}export{h as u};
|
package/dist/client/assets/{use-navigate-to-agent-JTDphVE0.js → use-navigate-to-agent-B5O37hfl.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,m as S,K as E,ao as P,a2 as A,d as Q,o as G,a as H,ab as B,d5 as C,d6 as k,da as D}from"./index-
|
|
1
|
+
import{c as b,m as S,K as E,ao as P,a2 as A,d as Q,o as G,a as H,ab as B,d5 as C,d6 as k,da as D}from"./index-CmhfcT17.js";import{r as _,h as N,g as $,d as I,i as V,k as Y}from"./repository-binding-DMbjGWw3.js";import{h as x,u as z,d as v,w as J}from"./thread-intent-BxpIEOHD.js";function j(t,e){if(!e)return!0;if(t.partial)return!1;const n=x(t.metadata?.runtime);return n===null||n===e}function F(t,e,n,a,s){let r=null;for(const o of t)o.virtual_mcp_id===e&&o.created_by===n&&(o.hidden||j(o,a)&&(s&&o.branch===s||(!r||o.updated_at>r.updated_at)&&(r=o)));return r}function he(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&&j(s,a))}function W(t,e,n,a,s,r){return s?F(t,e,n,a,r?.baseBranch)??void 0:F(t,e,n,a)??void 0}const X=6e4,O=3e4;function q(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 Z(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 U(t){const{orgSlug:e,target:n,owner:a,repo:s,branch:r}=t;return{queryKey:E.githubPrState(e,_(n),a,s,r),queryFn:()=>P(e,"CHANGE_REQUEST_STATE",{...n,branch:r}),enabled:!!r&&N(n)&&!!a&&!!s,refetchInterval:X,refetchIntervalInBackground:!1,staleTime:O}}function M(t){const e=b.c(4);let n;e[0]!==t?(n=U(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a={...n,select:ee},e[2]=n,e[3]=a):a=e[3],S(a)}function ee(t){return t.changeRequest?q(t.changeRequest):null}function fe(t){const e=b.c(4);let n;e[0]!==t?(n=U(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a={...n,select:te},e[2]=n,e[3]=a):a=e[3],S(a)}function te(t){return t.changeRequest?.state==="open"?t.changeRequest.checkRuns.map(Z):[]}const ne=5*6e4;function ge(t){const e=b.c(20),{orgSlug:n,target:a,owner:s,repo:r,base:o}=t;let i;e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==r||e[4]!==a?(i=E.githubLastPublishedPr(n,_(a),s,r,o),e[0]=o,e[1]=n,e[2]=s,e[3]=r,e[4]=a,e[5]=i):i=e[5];let u;e[6]!==o||e[7]!==n||e[8]!==a?(u=()=>P(n,"CHANGE_REQUEST_LAST_MERGED",{...a,base:o}),e[6]=o,e[7]=n,e[8]=a,e[9]=u):u=e[9];let l;e[10]!==t.enabled||e[11]!==o||e[12]!==s||e[13]!==r||e[14]!==a?(l=(t.enabled??!0)&&!!o&&N(a)&&!!s&&!!r,e[10]=t.enabled,e[11]=o,e[12]=s,e[13]=r,e[14]=a,e[15]=l):l=e[15];let f;return e[16]!==i||e[17]!==u||e[18]!==l?(f={queryKey:i,queryFn:u,enabled:l,staleTime:ne,select:ae},e[16]=i,e[17]=u,e[18]=l,e[19]=f):f=e[19],S(f)}function ae(t){return t.changeRequest?q(t.changeRequest):null}const se=50;function me(t){const e=b.c(17),{orgSlug:n,target:a,owner:s,repo:r}=t;let o;e[0]!==n||e[1]!==s||e[2]!==r||e[3]!==a?(o=E.githubOpenPrs(n,_(a),s,r),e[0]=n,e[1]=s,e[2]=r,e[3]=a,e[4]=o):o=e[4];let i;e[5]!==n||e[6]!==a?(i=()=>P(n,"CHANGE_REQUEST_LIST_OPEN",{...a,limit:se}),e[5]=n,e[6]=a,e[7]=i):i=e[7];let u;e[8]!==t.enabled||e[9]!==s||e[10]!==r||e[11]!==a?(u=(t.enabled??!0)&&N(a)&&!!s&&!!r,e[8]=t.enabled,e[9]=s,e[10]=r,e[11]=a,e[12]=u):u=e[12];let l;return e[13]!==o||e[14]!==i||e[15]!==u?(l={queryKey:o,queryFn:i,enabled:u,staleTime:O,select:re},e[13]=o,e[14]=i,e[15]=u,e[16]=l):l=e[16],S(l)}function re(t){return t.changeRequests.map(q)}function oe(t,e){const{org:n}=A(),a=$(t);return M({orgId:n.id,orgSlug:n.slug,target:I(a),owner:a?.owner??"",repo:a?.name??"",branch:e??null}).data?.base??"main"}const ie=[];function be(){const t=b.c(14),e=Q(),{org:n,locator:a}=A(),s=G(),r=V(),{data:o}=H.useSession(),i=z(),u=oe(void 0,null),l=B();let f;t[0]!==u||t[1]!==r||t[2]!==a||t[3]!==i?.threads||t[4]!==e||t[5]!==n.slug||t[6]!==l||t[7]!==o?.user?.id?(f=(d,c,T)=>{if(l&&!c?.panel){e({to:"/$org/projects",params:{org:n.slug},search:y=>({...y,project:d,virtualmcpid:void 0,view:void 0})});return}const h=c?.panel??"overview";if(C(h).kind==="org-destination"){k(e,{tabId:h,org:n.slug,agentId:d,replace:!1});return}const m=(r??[]).find(y=>y.id===d),K=!!(m&&$(m)),w=!c?.runtime,L=w?void 0:W(i?.threads.get()??ie,d,o?.user?.id,T??(m?v(m.metadata):void 0),K,{baseBranch:u}),R=w?void 0:L?.id??crypto.randomUUID();R&&!L&&c?.runtime&&J(sessionStorage,a,R,{runtime:c.runtime}),k(e,{tabId:h,org:n.slug,agentId:d,search:()=>R?{thread:R}:{},replace:!1})},t[0]=u,t[1]=r,t[2]=a,t[3]=i?.threads,t[4]=e,t[5]=n.slug,t[6]=l,t[7]=o?.user?.id,t[8]=f):f=t[8];const g=f;let p;return t[9]!==r||t[10]!==g||t[11]!==n||t[12]!==s?(p=(d,c)=>{if(C(c?.panel??"overview").kind==="org-destination")return g(d,c,void 0);const T=r.find(h=>h.id===d);if(c?.runtime)return g(d,c,c.runtime);if(T)return g(d,c,v(T.metadata));Y(s,n).then(h=>h.find(m=>m.id===d)).catch(ue).then(h=>g(d,c,h?v(h.metadata):void 0))},t[9]=r,t[10]=g,t[11]=n,t[12]=s,t[13]=p):p=t[13],p}function ue(){}function pe(){const t=b.c(3),{org:e}=A(),n=B();let a;return t[0]!==e.slug||t[1]!==n?(a=(s,r)=>{if(n&&!r)return{to:"/$org/projects",params:{org:e.slug},search:i=>({...i,project:s,virtualmcpid:void 0,view:void 0})};const o=D({tabId:r??"overview",org:e.slug,agentId:s});return{to:o.to,params:o.params,search:o.search}},t[0]=e.slug,t[1]=n,t[2]=a):a=t[2],a}export{pe as a,oe as b,W as c,me as d,M as e,he as f,ge as g,fe as h,U as p,be as u};
|
package/dist/client/assets/{use-open-billing-url-2Iqpie3T.js → use-open-billing-url-B_ppok7s.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as l,a9 as f,b as p,e as T,t as m}from"./index-
|
|
1
|
+
import{c as l,a9 as f,b as p,e as T,t as m}from"./index-CmhfcT17.js";function g(t,u){const s=l.c(9),i=f(),a=p();let e;s[0]!==i||s[1]!==t?(e=async r=>{const{url:c}=await i.call(t,t==="ORGANIZATION_BILLING_CHECKOUT_START"&&r?{planId:r}:{});return c},s[0]=i,s[1]=t,s[2]=e):e=s[2];let n;s[3]!==u||s[4]!==a?(n=r=>m.error(a(u,{message:r.message})),s[3]=u,s[4]=a,s[5]=n):n=s[5];let o;return s[6]!==e||s[7]!==n?(o={mutationFn:e,onSuccess:_,onError:n},s[6]=e,s[7]=n,s[8]=o):o=s[8],T(o)}function _(t){return window.open(t,"_blank","noopener,noreferrer")}export{g as u};
|
package/dist/client/assets/{use-org-auth-client-Bwzj9WuC.js → use-org-auth-client-CeU98DnY.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,a2 as j,a as i}from"./index-
|
|
1
|
+
import{c as x,a2 as j,a as i}from"./index-CmhfcT17.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 M;e[2]!==o?(M=R=>(f=>{const y={...f??{}},h=y.query??{};return y.query={...h,organizationId:o},i.organization[R](y)}),e[2]=o,e[3]=M):M=e[3];const n=M;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 I;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?(I={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]=I):I=e[31],I}export{A as u};
|