decocms 4.383.2 → 4.384.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-3NjmS2Me.js → AlertCircle-CN63l28E.js} +1 -1
- package/dist/client/assets/{AreaChart-BK98ay_e.js → AreaChart-C6F8FeW1.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BDJocc-E.js → ArrowLeft-gXpdVjjZ.js} +1 -1
- package/dist/client/assets/{ArrowRight-7HllOSKn.js → ArrowRight-DwJbToqY.js} +1 -1
- package/dist/client/assets/{ArrowUp-hZF6_Dg8.js → ArrowUp-DYxdR5t4.js} +1 -1
- package/dist/client/assets/{CartesianChart-B3ONOnv3.js → CartesianChart-BSC303jI.js} +1 -1
- package/dist/client/assets/{CheckCircle-CHH7PvQv.js → CheckCircle-DwE2PFQ4.js} +1 -1
- package/dist/client/assets/{ChevronUp-K_DSezIa.js → ChevronUp-CWbL6T1G.js} +1 -1
- package/dist/client/assets/{Copy01-BD66Qy1p.js → Copy01-txk4D2dp.js} +1 -1
- package/dist/client/assets/{CreditCard01-Bh3w7Hgk.js → CreditCard01-CjsiyuM0.js} +1 -1
- package/dist/client/assets/{DotsVertical-DMXzeMxu.js → DotsVertical-Chx4AR6B.js} +1 -1
- package/dist/client/assets/{Download01-CZiiid2z.js → Download01-C_uRJg-E.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-BzVNZ25-.js → ErrorBarContext-DttuIWbP.js} +1 -1
- package/dist/client/assets/{Eye-oxb_RsMQ.js → Eye-PUFPRogI.js} +1 -1
- package/dist/client/assets/{Globe01-BGyzTJzS.js → Globe01-cK-boe1F.js} +1 -1
- package/dist/client/assets/{Globe04-BKLGp0-t.js → Globe04-DZ4La14w.js} +1 -1
- package/dist/client/assets/{Image01-CABBJzvK.js → Image01-Cu23ajxK.js} +1 -1
- package/dist/client/assets/{Key01-DP1rdVgR.js → Key01-C4vmDBWq.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DlOBiWF7.js → LayoutLeft-B6FExgE9.js} +1 -1
- package/dist/client/assets/{Line-BoY-_HRo.js → Line-BMTH13Bf.js} +1 -1
- package/dist/client/assets/{Link01-IxSW8a5k.js → Link01-CCMhgKQC.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BJ0NvAtL.js → LinkExternal01-BvYYsTzi.js} +1 -1
- package/dist/client/assets/{Monitor01-C8HMQtDc.js → Monitor01-D4NGGSSY.js} +1 -1
- package/dist/client/assets/{Package-DbqCrAqt.js → Package-BHKlCKgA.js} +1 -1
- package/dist/client/assets/{Palette-D2CzWakp.js → Palette-D4pYAcww.js} +1 -1
- package/dist/client/assets/{Play-C375qAFd.js → Play-DWkCdYVe.js} +1 -1
- package/dist/client/assets/{Plus-KuC07360.js → Plus-B5qlUYQA.js} +1 -1
- package/dist/client/assets/{SearchLg-CnAwayoV.js → SearchLg-DgVGxGAk.js} +1 -1
- package/dist/client/assets/{SearchMd-Db_7ZS_U.js → SearchMd-Ds8nq6dr.js} +1 -1
- package/dist/client/assets/{Sector-C1hdz8Rd.js → Sector-5UqJism-.js} +1 -1
- package/dist/client/assets/{Settings02-2SBOLpFQ.js → Settings02-DuHT9CDs.js} +1 -1
- package/dist/client/assets/{Share07-BE4JtC9a.js → Share07-Gti5eVBm.js} +1 -1
- package/dist/client/assets/{Stars01-DLpAYXhL.js → Stars01-NMjfS8aT.js} +1 -1
- package/dist/client/assets/{Sun-CwUe69CG.js → Sun-bZ7LINy-.js} +1 -1
- package/dist/client/assets/{Tool01-C8yYoxGr.js → Tool01-D-kKamzo.js} +1 -1
- package/dist/client/assets/{Tool02-B6NEJ959.js → Tool02-C3PJKwXL.js} +1 -1
- package/dist/client/assets/{Trash01-sdbYLhwG.js → Trash01-BOgDvBV9.js} +1 -1
- package/dist/client/assets/{TrendUp01-C0ETH40N.js → TrendUp01-Cz4fAV8R.js} +1 -1
- package/dist/client/assets/{Upload01-B4XZygwf.js → Upload01-bRtRcrf0.js} +1 -1
- package/dist/client/assets/{User01-BUAGbw_8.js → User01-A5yQ_wrz.js} +1 -1
- package/dist/client/assets/{UserSquare-CI-Lmxvt.js → UserSquare-DGrBwjoh.js} +1 -1
- package/dist/client/assets/{Users01-DFi4f9KY.js → Users01-BxbX_-HF.js} +1 -1
- package/dist/client/assets/{X-ByVEErG0.js → X-DNbfDZJ4.js} +1 -1
- package/dist/client/assets/{XCircle-CNDaDHqM.js → XCircle-yvuIGIaV.js} +1 -1
- package/dist/client/assets/{XClose-fZr02TyX.js → XClose-BI_rRQ4C.js} +1 -1
- package/dist/client/assets/{Zap-CcN1LA-b.js → Zap-D3w7YXbH.js} +1 -1
- package/dist/client/assets/{ZoomOut-Cm9QeblW.js → ZoomOut-CkMxedob.js} +1 -1
- package/dist/client/assets/{access-gate-B7Hr_Vyu.js → access-gate-BN4Zc3yN.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B8LN3H0I.js → add-connection-dialog-DOiBCAyA.js} +1 -1
- package/dist/client/assets/{agent-analytics-DjxFq_6k.js → agent-analytics-Dxw3ggkt.js} +1 -1
- package/dist/client/assets/agent-app-0eg1eiqf.js +1 -0
- package/dist/client/assets/{agent-assets-B-5Linet.js → agent-assets-CHD2rYMH.js} +1 -1
- package/dist/client/assets/{agent-automation-DjCegdGk.js → agent-automation-Bdv69h7i.js} +1 -1
- package/dist/client/assets/{agent-automations-BYFtuh6D.js → agent-automations-CJGxlGqZ.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-fzMxZVXi.js → agent-connect-sources-DLHNDr12.js} +1 -1
- package/dist/client/assets/agent-deck-DrMV80HV.js +1 -0
- package/dist/client/assets/{agent-e2e-BVjNlxp7.js → agent-e2e-D0O0eUvD.js} +1 -1
- package/dist/client/assets/{agent-experiments-bIaPEubL.js → agent-experiments-B4o3u-RO.js} +1 -1
- package/dist/client/assets/agent-file-CCj7uKuF.js +1 -0
- package/dist/client/assets/{agent-git-xlLroAsu.js → agent-git-B-nOTC62.js} +1 -1
- package/dist/client/assets/{agent-hosting-CpBNlKk6.js → agent-hosting-B4i2QTPU.js} +1 -1
- package/dist/client/assets/{agent-icon-Db2N7oq5.js → agent-icon-syzsjQqD.js} +1 -1
- package/dist/client/assets/agent-library-file-Cxy49C5n.js +1 -0
- package/dist/client/assets/{agent-monitor-DwSdgE9U.js → agent-monitor-DafBtLIq.js} +1 -1
- package/dist/client/assets/{agent-overview--PnZQbiS.js → agent-overview-Cp3ca_fT.js} +1 -1
- package/dist/client/assets/agent-settings-BOzUFehK.js +1 -0
- package/dist/client/assets/{agent-site-editor-Dzbd_nwj.js → agent-site-editor-DaLvvkPd.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-B3uudymh.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-I4ul7yAQ.js → agent-site-editor-content-COPyMtYx.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-ChZS3PJI.js → agent-site-editor-preview-DyyES80c.js} +3 -3
- package/dist/client/assets/{agent-view-guard-w0jt9Xeo.js → agent-view-guard-CNoCeQGV.js} +1 -1
- package/dist/client/assets/agent-view-ioWkT_97.js +1 -0
- package/dist/client/assets/{agents-list-Br_biSiG.js → agents-list-A3SdSmbi.js} +1 -1
- package/dist/client/assets/{ai-providers-D_cdmhC4.js → ai-providers-Bc22cj0K.js} +1 -1
- package/dist/client/assets/{alert-yBQ4R7_-.js → alert-DVLI8Gfp.js} +1 -1
- package/dist/client/assets/{alert-dialog-C3aY_yJw.js → alert-dialog-C-7JcYKm.js} +1 -1
- package/dist/client/assets/api-keys-BbSb9ZS5.js +1 -0
- package/dist/client/assets/{api-keys-CPtf4pK1.js → api-keys-C1TQNBQk.js} +1 -1
- package/dist/client/assets/app-editor-CE2cAIcD.js +1 -0
- package/dist/client/assets/{asset-utils-aI3pZanR.js → asset-utils-CEYQNtbb.js} +1 -1
- package/dist/client/assets/{auth-DJ59GovO.js → auth-CqLAsH9H.js} +1 -1
- package/dist/client/assets/{auth-catchall-gaeaQgzD.js → auth-catchall-xsnAyDMl.js} +1 -1
- package/dist/client/assets/{auth-entry-BBtIvObS.js → auth-entry-Bk-PmUnC.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CUD4rmtG.js → auth-split-layout-BNlJlV-x.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DZROLLbx.js → authenticate-and-persist-oauth-qEErHC5o.js} +1 -1
- package/dist/client/assets/{automation-list-row-1hBZHliW.js → automation-list-row-CWqPcVwI.js} +1 -1
- package/dist/client/assets/{automation-runs-evvol08d.js → automation-runs-BIqjehHs.js} +1 -1
- package/dist/client/assets/{automations-BgspSKqV.js → automations-CQ7q-IQU.js} +1 -1
- package/dist/client/assets/{autosend-0RKjkzJ3.js → autosend-D2vNE1-H.js} +1 -1
- package/dist/client/assets/{avatar-TzyTAv0e.js → avatar-BktXtsSk.js} +1 -1
- package/dist/client/assets/{badge-CBvHT4W2.js → badge-Dz02OelF.js} +1 -1
- package/dist/client/assets/{block-document-BxYHh7_L.js → block-document-Br8yab_f.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context--TaVDJ6X.js → blocks-preview-workspace-context-EBiaJPDj.js} +1 -1
- package/dist/client/assets/{breadcrumb-DxgRqy9o.js → breadcrumb-B30eHojr.js} +1 -1
- package/dist/client/assets/{buckets-BuCbJiAZ.js → buckets-nUGpOo92.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-B3Yght0d.js → build-improve-prompt-doc-Jy7pCRLD.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BYEmvtdM.js → bulk-category-panel-PV5rGUwP.js} +1 -1
- package/dist/client/assets/{calendar-DhHcogG2.js → calendar-CKLBRofA.js} +1 -1
- package/dist/client/assets/{capability-load-error-D24jurVu.js → capability-load-error-BW7ikFrl.js} +1 -1
- package/dist/client/assets/category-editor-DAcmMuqa.js +1 -0
- package/dist/client/assets/{chart-CKJrzaz-.js → chart-0_Bs5-by.js} +1 -1
- package/dist/client/assets/{chat-context-CDFEG_L-.js → chat-context-Xotq8Uwe.js} +1 -1
- package/dist/client/assets/{chat-draft-bNjBsvCn.js → chat-draft-CgEPV7Kr.js} +1 -1
- package/dist/client/assets/{checkbox-CFNy5ggI.js → checkbox-_kcJEWes.js} +1 -1
- package/dist/client/assets/{choose-editor-BCMBTGxZ.js → choose-editor-3QcFGZgT.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CLVV3kIA.js → cli-auth-success-Dy4pnXjF.js} +1 -1
- package/dist/client/assets/{client-icons-CEwmj9O8.js → client-icons-D4aBzuCX.js} +1 -1
- package/dist/client/assets/{collapsible-BNufaH68.js → collapsible-BnDH8Aa2.js} +1 -1
- package/dist/client/assets/{collection-detail-BTb2x4MW.js → collection-detail-C2TsNF7h.js} +1 -1
- package/dist/client/assets/{collection-display-button-tz9JsEZx.js → collection-display-button-Dqa4y3X3.js} +1 -1
- package/dist/client/assets/{collection-search-C2RG2e5J.js → collection-search-BoAOwaNc.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-yV9vdeMr.js → collection-table-wrapper-DSralND5.js} +1 -1
- package/dist/client/assets/{collection-tabs-CA-gB6LT.js → collection-tabs-B2xcnwza.js} +1 -1
- package/dist/client/assets/{combobox-BNKKrbgQ.js → combobox-CxhEXJ11.js} +1 -1
- package/dist/client/assets/{command-CBz2JIJh.js → command-CtXsvJo3.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-ARCn5F6_.js → companion-mcps-section-jQI_30D-.js} +1 -1
- package/dist/client/assets/{connect-LIoq5BO0.js → connect-OcFK-UU3.js} +1 -1
- package/dist/client/assets/{connect-layout-D-vfRaoG.js → connect-layout-U0rq3TX1.js} +1 -1
- package/dist/client/assets/{connection-BJjKfm3v.js → connection-DIKevzcK.js} +1 -1
- package/dist/client/assets/{connection-card-TT_MwfFx.js → connection-card-D0KKFdD5.js} +1 -1
- package/dist/client/assets/{connection-detail-GtAfvYCe.js → connection-detail-DW2ymG-9.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Bg70Jvku.js → connection-form-helpers-KqoUSQKE.js} +1 -1
- package/dist/client/assets/{connections-CEA8JdbO.js → connections-B3q3OLOE.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BMknOnpY.js → create-organization-dialog-B4VxevwN.js} +1 -1
- package/dist/client/assets/{decofile-api-C_AZXr3X.js → decofile-api-BlHdyJaj.js} +1 -1
- package/dist/client/assets/{decopilot-DZ3ibpY_.js → decopilot-ONeLQXU1.js} +1 -1
- package/dist/client/assets/{dialog-lfdH0lhI.js → dialog-DAOqbLTM.js} +1 -1
- package/dist/client/assets/{discover-DJv1U60H.js → discover-CdRUWZaC.js} +1 -1
- package/dist/client/assets/{domain-settings-DNjlHce_.js → domain-settings-C-l-SMd_.js} +1 -1
- package/dist/client/assets/{download-app-dialog-Cpkyx2ph.js → download-app-dialog-DD-_m3bO.js} +1 -1
- package/dist/client/assets/{drawer-CDjyI_Jg.js → drawer-CzplXqA6.js} +1 -1
- package/dist/client/assets/{editor-CxCZwxPG.js → editor-CPbQohDU.js} +1 -1
- package/dist/client/assets/{empty-state-CRwclXBM.js → empty-state-SJDm-O9f.js} +1 -1
- package/dist/client/assets/{empty-state-CnzoHD25.js → empty-state-XAuNoiCZ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B5VokLhW.js → extract-connection-data-_3oz07QW.js} +1 -1
- package/dist/client/assets/{feature-gate--43iJYr4.js → feature-gate-CnfEirBt.js} +1 -1
- package/dist/client/assets/{feature-paywall-BpCcxWM5.js → feature-paywall-CWFruHaV.js} +1 -1
- package/dist/client/assets/{file-explorer-gOjI5bwl.js → file-explorer-BrCg5koI.js} +1 -1
- package/dist/client/assets/{file-preview-Do5Q3f1c.js → file-preview-D8QMa9_e.js} +1 -1
- package/dist/client/assets/{file-share-button-DIj22Ecz.js → file-share-button-Dk166-Ll.js} +1 -1
- package/dist/client/assets/{file-type-icon-BSsIsHaI.js → file-type-icon-PokUk1QC.js} +1 -1
- package/dist/client/assets/{folder-icon-BA4vqw44.js → folder-icon-C-XUtXaj.js} +1 -1
- package/dist/client/assets/{form-Dx6ZBu4I.js → form-Pq1VF9SG.js} +1 -1
- package/dist/client/assets/{gateway-client-CRExBxKg.js → gateway-client-p26Hg4rs.js} +1 -1
- package/dist/client/assets/{general-_6WM8Zra.js → general-IhDXIEo3.js} +1 -1
- package/dist/client/assets/{github-icon-BJK5yOYO.js → github-icon-BeOhZWX3.js} +1 -1
- package/dist/client/assets/{home-C2oIZ78H.js → home-DXPP6fCY.js} +1 -1
- package/dist/client/assets/{hooks-BwYFpgJq.js → hooks-B7Nkkny2.js} +1 -1
- package/dist/client/assets/{hooks-mgPEmVyE.js → hooks-BRj1KGH0.js} +1 -1
- package/dist/client/assets/{icon-button-70-sYY4G.js → icon-button-BCUJR5XB.js} +1 -1
- package/dist/client/assets/{index-BepxzUTL.js → index-BEFYd_l9.js} +1 -1
- package/dist/client/assets/{index-BuXlZ7Xk.js → index-BMb1lZlu.js} +1 -1
- package/dist/client/assets/{index-CWNSMfD0.js → index-BlCAijlc.js} +1 -1
- package/dist/client/assets/{index-D5GfY9ep.js → index-Br65nWs8.js} +2 -2
- package/dist/client/assets/{index-B3ftKcNC.js → index-BswfQfWK.js} +1 -1
- package/dist/client/assets/{index-CJdWCH17.js → index-C3hYf8V4.js} +1 -1
- package/dist/client/assets/{index-CBwjcqc7.js → index-COmcBRgq.js} +1 -1
- package/dist/client/assets/{index-BfRdTBn9.js → index-CbVh1pWL.js} +1 -1
- package/dist/client/assets/{index-Dfk55oii.js → index-CkGUYH_5.js} +1 -1
- package/dist/client/assets/{index-pVhbfkhf.js → index-CvuZZryV.js} +1 -1
- package/dist/client/assets/{index-B0zSNJbI.js → index-D7t4sF_N.js} +1 -1
- package/dist/client/assets/{index-BD2EmVnh.js → index-De7ClK0R.js} +1 -1
- package/dist/client/assets/{index-redirect-Dc85XyrD.js → index-redirect-wevBIvJf.js} +1 -1
- package/dist/client/assets/{index-K7AY71Ty.js → index-tVpE3SFA.js} +1 -1
- package/dist/client/assets/{index-C7OHOxwl.js → index-zwdcUZFQ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-8LFHG5jD.js → infiniteQueryObserver-C6uoSRRm.js} +1 -1
- package/dist/client/assets/{infra-billing-md-WcFQk.js → infra-billing-PAbb5Jwh.js} +1 -1
- package/dist/client/assets/{input-i_Y4EUYe.js → input-CpHc9Ccz.js} +1 -1
- package/dist/client/assets/{input-BFIZ4TYm.js → input-DYvahrt0.js} +1 -1
- package/dist/client/assets/{input--eOKSICy.js → input-WrUCYwPA.js} +1 -1
- package/dist/client/assets/{integration-icon-BKsmKoE7.js → integration-icon-CHq-tZ5S.js} +1 -1
- package/dist/client/assets/{label-DwreXpUN.js → label-VZgjitSh.js} +1 -1
- package/dist/client/assets/{last-preview-page-i7VIjFLQ.js → last-preview-page-CAw6q3Ni.js} +1 -1
- package/dist/client/assets/{layout-MShO-PcN.js → layout-VdZFOaDn.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DEkE_Ifm.js → legacy-agents-deep-Ddr-P5lf.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-5YTSB2tk.js → legacy-main-redirect-Com2O168.js} +1 -1
- package/dist/client/assets/{library-CdCM9J8p.js → library-Cy4C1Xe7.js} +1 -1
- package/dist/client/assets/{login-Bwh4jMgb.js → login-BZlQTdnW.js} +1 -1
- package/dist/client/assets/{markdown-WJDeiHFM.js → markdown-nDkdLMAq.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DY6yKadW.js → mcp-app-renderer-C-t-oEUy.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C6Sgd7FV.js → mcp-oauth-D4qjjzCr.js} +1 -1
- package/dist/client/assets/{members-Bmk2EDKN.js → members-D2oftmvt.js} +1 -1
- package/dist/client/assets/{message-templates-CrgEJOAj.js → message-templates-DDyZkBWQ.js} +1 -1
- package/dist/client/assets/{mini-report-page-LtzYPO_i.js → mini-report-page-CLLCqBB-.js} +1 -1
- package/dist/client/assets/{mock-board-zZsRfmrF.js → mock-board-CIGfY1Fn.js} +3 -3
- package/dist/client/assets/{monaco-editor-Do8S48ks.js → monaco-editor-6DU5W3RO.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Bx4cWgra.js → monitoring-stats-row-DLZFqB6Y.js} +1 -1
- package/dist/client/assets/{multi-select-D469W8sD.js → multi-select-0ZkYWy-8.js} +1 -1
- package/dist/client/assets/{mustache-CmNRGKWY.js → mustache-DqsxB6HM.js} +1 -1
- package/dist/client/assets/{oauth-callback-CxtrbO-9.js → oauth-callback-2hEPVX2K.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DcCeNsRI.js → oauth-callback-ai-provider-DD44XS1M.js} +1 -1
- package/dist/client/assets/{onboarding-DRSUQvyY.js → onboarding-BleSgTXv.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DFzGWNsL.js → optimistic-project-sidebar-views-CGxbWunL.js} +1 -1
- package/dist/client/assets/{org-file-open-context-CVN97RZc.js → org-file-open-context-fmLHly5t.js} +1 -1
- package/dist/client/assets/{organization-choice-wdWQxrHa.js → organization-choice-CpTHVweM.js} +1 -1
- package/dist/client/assets/{orgs-QoXHYZri.js → orgs-D-8Omyac.js} +1 -1
- package/dist/client/assets/{page-seo-form-cedG3AU7.js → page-seo-form-CtYPF938.js} +1 -1
- package/dist/client/assets/{pair-CniwTMo1.js → pair-DFnpHOLp.js} +1 -1
- package/dist/client/assets/{plan-ladder-B8UbPvkZ.js → plan-ladder-BFxdIlaH.js} +1 -1
- package/dist/client/assets/{popover-B9xJOTEM.js → popover-jThH4hZX.js} +1 -1
- package/dist/client/assets/{post-calendar-CFNb_x36.js → post-calendar-CT_N8Two.js} +1 -1
- package/dist/client/assets/{post-editor-DJPJ_7wF.js → post-editor-DUpUdKcd.js} +1 -1
- package/dist/client/assets/{preview-content-Djz6zUXX.js → preview-content-B-oFa1GP.js} +1 -1
- package/dist/client/assets/{preview-dialog-BhpyTFJl.js → preview-dialog-Cj6rXYeM.js} +1 -1
- package/dist/client/assets/{primitives-Jinax-v_.js → primitives-sDubWs3n.js} +1 -1
- package/dist/client/assets/{profile-CgTpTnu4.js → profile-CclDeU6M.js} +1 -1
- package/dist/client/assets/{project-app-view-DVhZbG_O.js → project-app-view-DZzrNxcj.js} +1 -1
- package/dist/client/assets/{project-feed-BtJsqM4V.js → project-feed-CYKHLYLc.js} +1 -1
- package/dist/client/assets/{project-icon-9U2WquDG.js → project-icon-Dz0CHIad.js} +1 -1
- package/dist/client/assets/project-reports-Bl6rgqCX.js +1 -0
- package/dist/client/assets/project-tasks-CRRYn93K.js +1 -0
- package/dist/client/assets/{prompts-B6m8lARO.js → prompts-0IkmmZYs.js} +1 -1
- package/dist/client/assets/record-editor-iEZkEBOS.js +1 -0
- package/dist/client/assets/{redirect-editor-CH8vgP-f.js → redirect-editor-12sH-dI_.js} +1 -1
- package/dist/client/assets/registry-Cm3vYfs6.js +2 -0
- package/dist/client/assets/{registry-layout-DsDx2i4p.js → registry-layout-CtJukSU3.js} +1 -1
- package/dist/client/assets/reports-Bg_ERdf3.js +1 -0
- package/dist/client/assets/{reports-DoC4qpNt.js → reports-C0cRDU9Z.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BmQpXMqt.js → reports-onboarding-pFT3c7OK.js} +1 -1
- package/dist/client/assets/{reports-tab-CurzU_Px.js → reports-tab-BQJ56vGJ.js} +2 -2
- package/dist/client/assets/{repositories-hx9ULw-X.js → repositories-DxlK1sZm.js} +1 -1
- package/dist/client/assets/{repository-import-picker-D6aVqpVy.js → repository-import-picker-B-0buJzG.js} +1 -1
- package/dist/client/assets/{repository-picker-DnXw9RPW.js → repository-picker-CvOapNuA.js} +1 -1
- package/dist/client/assets/{require-capability-Me9T92M_.js → require-capability-D8-cLH0O.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CQKtej-F.js → required-auth-layout-nAeHro2C.js} +1 -1
- package/dist/client/assets/{reset-password-Csx-qFuK.js → reset-password-KPmVfZLN.js} +1 -1
- package/dist/client/assets/{resizable-SGt69Yx0.js → resizable-CaD_7NrF.js} +1 -1
- package/dist/client/assets/{review-settings-qJuTO7en.js → review-settings-Dv9oD1xX.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-BcTvBRHf.js → rich-text-link-control-Cq9RUtOT.js} +1 -1
- package/dist/client/assets/{roles-By0QS5jD.js → roles-CVdqwi42.js} +1 -1
- package/dist/client/assets/{route-ChYtCcTU.js → route-BUMOvuH4.js} +1 -1
- package/dist/client/assets/{route-ArFb8NKa.js → route-DN7wZbNA.js} +1 -1
- package/dist/client/assets/{route-page-header-BYdDlPxf.js → route-page-header-Tsd-6Cn8.js} +1 -1
- package/dist/client/assets/{route-DRvCh4mQ.js → route-y3ZDxqyP.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-DXLcjI9M.js → runnable-block-editor-DGtY1Zv9.js} +3 -3
- package/dist/client/assets/{sandbox-lifecycle-context-KqllpPFh.js → sandbox-lifecycle-context-CfWOVVqS.js} +1 -1
- package/dist/client/assets/{schema-B8zTDh4T.js → schema-DUqJejhF.js} +1 -1
- package/dist/client/assets/{scroll-area-CLDYN-1F.js → scroll-area-CIgEcLya.js} +1 -1
- package/dist/client/assets/{search-input-Jjxs_ylZ.js → search-input-B3-es9gF.js} +1 -1
- package/dist/client/assets/{search-toggle-BMo4jYM9.js → search-toggle-CWeFY_dj.js} +1 -1
- package/dist/client/assets/{secrets-hLdRHQSc.js → secrets-Brvsggyp.js} +1 -1
- package/dist/client/assets/sections-editor-B-05AQOj.js +2 -0
- package/dist/client/assets/{select-rsdXMOmu.js → select-DfsEKJbm.js} +1 -1
- package/dist/client/assets/{select-model-CHXHQ2_o.js → select-model-CleoV9x2.js} +1 -1
- package/dist/client/assets/seo-editor-AfoTf_sl.js +1 -0
- package/dist/client/assets/{separator-BOJFx7BB.js → separator-BCH1SSgW.js} +1 -1
- package/dist/client/assets/{settings-tab-D3sm6hYV.js → settings-tab-DBXW5_vQ.js} +1 -1
- package/dist/client/assets/{sheet-B6sXHBfO.js → sheet-Qh31aIRZ.js} +1 -1
- package/dist/client/assets/{shell-layout-CPue6FpY.js → shell-layout-DYX27G-z.js} +1 -1
- package/dist/client/assets/{sidebar-BY7OkUYu.js → sidebar-BAkTFwFo.js} +1 -1
- package/dist/client/assets/{skill-preview-Ca4rmhYB.js → skill-preview-Nll1AtTk.js} +1 -1
- package/dist/client/assets/{skills-IyoOyuaB.js → skills-DTPrbPu0.js} +1 -1
- package/dist/client/assets/{sso-BAwCy2Jc.js → sso-Czivj0x0.js} +1 -1
- package/dist/client/assets/{store-DOxioaPl.js → store-UzV50FV7.js} +1 -1
- package/dist/client/assets/store-registry-B1kPOdQI.js +2 -0
- package/dist/client/assets/{switch-3_30Hq56.js → switch-DWqIDJ3O.js} +1 -1
- package/dist/client/assets/{synced-repos-CNR5qFdz.js → synced-repos-kO5pdppG.js} +1 -1
- package/dist/client/assets/{table-BcLHZANQ.js → table-DgqVpAo1.js} +1 -1
- package/dist/client/assets/{tabs-Bj4_8GUh.js → tabs-BEx3OU7l.js} +1 -1
- package/dist/client/assets/{task-board-CslA-FwT.js → task-board-DLfMOW_8.js} +1 -1
- package/dist/client/assets/{task-route-BNtI9f6O.js → task-route-CkGfsxNk.js} +1 -1
- package/dist/client/assets/{task-status-Drhs7Fwh.js → task-status-21xCC61j.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D5zjpsdj.js → taskboard-analytics-DOuMPLlN.js} +1 -1
- package/dist/client/assets/tasks-DxsffEKe.js +1 -0
- package/dist/client/assets/{tasks-DdqceGp0.js → tasks-LkJTvBu2.js} +1 -1
- package/dist/client/assets/{textarea-D8cpAa8h.js → textarea-Cwtz-yOm.js} +1 -1
- package/dist/client/assets/{thread-button-DGZyQ1E_.js → thread-button-D3zUMivq.js} +1 -1
- package/dist/client/assets/{thread-intent-CwhSEEGz.js → thread-intent-wwkArE2X.js} +1 -1
- package/dist/client/assets/{thread-route-BiPK2LUJ.js → thread-route-COWJ_7fp.js} +1 -1
- package/dist/client/assets/{thread-route-i4MDHqFd.js → thread-route-DznAT7wl.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-b02tBO2e.js → thread-sheet-body-snZ9Iybc.js} +1 -1
- package/dist/client/assets/{toggle-group-DPMwuwMR.js → toggle-group-Bo2cSsBt.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DvBSEsXy.js → toolbar-icon-button-BzblaI4I.js} +1 -1
- package/dist/client/assets/{tooltip-OTJWd5I_.js → tooltip-BEf6aTZO.js} +1 -1
- package/dist/client/assets/{track-CVuEE-Ja.js → track-DApuAK3u.js} +1 -1
- package/dist/client/assets/{types-D_sN4rB-.js → types-BzVAUbhh.js} +1 -1
- package/dist/client/assets/{usage-stats-Dg30HMJj.js → usage-stats-BSt2dDR8.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BPI8963x.js → use-ai-providers-DVYwWTyn.js} +1 -1
- package/dist/client/assets/{use-automations-CRWusD_x.js → use-automations-BqtxbVm_.js} +1 -1
- package/dist/client/assets/{use-autosave-j39rI6vk.js → use-autosave-CXYg5RsP.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B5z-NExP.js → use-connect-companion-Bs3Z_qGO.js} +1 -1
- package/dist/client/assets/{use-connection-uV-VP0gX.js → use-connection-CzmGzELP.js} +1 -1
- package/dist/client/assets/{use-copy-FLJ5XV9J.js → use-copy-CQrsne9w.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-P1B33NrF.js → use-create-virtual-mcp-CGCnGQc7.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BuofAadj.js → use-date-fns-locale-CRKOtAZ4.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CF81qzvu.js → use-debounced-autosave-yvR2QU7b.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CrGSRGNy.js → use-debounced-value-C-a_puXS.js} +1 -1
- package/dist/client/assets/{use-deco-credits-z8utUejJ.js → use-deco-credits-BIQjMMrw.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DjboVZiO.js → use-decopilot-events-DRhD2Cc7.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B_xNjAKC.js → use-delete-connection-2vJ2zjf1.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Co5-jiSO.js → use-deployment-admin-GWym07lx.js} +1 -1
- package/dist/client/assets/{use-entitlements-BqqEvjPg.js → use-entitlements-dBRqAbFm.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-B_fFA7zf.js → use-fast-preview-draft-url-B7Qgsa-v.js} +1 -1
- package/dist/client/assets/{use-file-configs-B1pr8ET8.js → use-file-configs-B6uZyC72.js} +1 -1
- package/dist/client/assets/{use-in-settings-C-Qktb6a.js → use-in-settings-DyAVjDbV.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-D7ftQyZ1.js → use-infinite-scroll-CcgsC5jf.js} +1 -1
- package/dist/client/assets/{use-join-requests-UXS5L54E.js → use-join-requests-DoYX1y9p.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Q8s4YRRz.js → use-main-panel-tabs-B9Pup-Q4.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DsC-McEq.js → use-mcp-auth-status-CSFSJQJ9.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DucDZTqc.js → use-mcp-client-BwDqIa-x.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C7O_WXgf.js → use-mcp-prompts-D2CngFU9.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Dar25Qt8.js → use-mcp-tools-K86rDboN.js} +1 -1
- package/dist/client/assets/{use-members-Cz23u8UI.js → use-members-B2TxxXOD.js} +1 -1
- package/dist/client/assets/{use-mobile-CLWKkyXU.js → use-mobile-CLWwR5Aq.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DkyDtkl9.js → use-navigate-to-agent-BIcgvM34.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CwIiL2GE.js → use-open-billing-url-c9fzPVJm.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BlcnnSM0.js → use-org-auth-client-CmCV5i0j.js} +1 -1
- package/dist/client/assets/{use-org-fs-UwG8j-Jn.js → use-org-fs-D0pDtmA_.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CGumLqpP.js → use-org-repo-syncs-BW8kPlcG.js} +1 -1
- package/dist/client/assets/{use-org-sso-Z0-UYTzJ.js → use-org-sso-NlJ03wR7.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DIOxh3px.js → use-organization-roles-B6-izWAc.js} +1 -1
- package/dist/client/assets/{use-organization-settings-8Qf5CO0q.js → use-organization-settings-BTHpppJM.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-JtzJfijF.js → use-panel-navigate-BenzejcY.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-zLKQQ3F3.js → use-project-native-view-presence-CyTXliV7.js} +1 -1
- package/dist/client/assets/{use-project-scope-ooe9AxCw.js → use-project-scope-D7-wTJxZ.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BfqOdrxb.js → use-registry-connections-CUAAz7MM.js} +1 -1
- package/dist/client/assets/{use-releases-BmxVYWob.js → use-releases-k9mlHhXd.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Ctc-6YjU.js → use-reports-diagnostic-Bo5UPpHF.js} +1 -1
- package/dist/client/assets/{use-route-default-main-BSPrYjfJ.js → use-route-default-main-fCKVwPih.js} +1 -1
- package/dist/client/assets/{use-secrets-xjZ491Gh.js → use-secrets-Baw7IrPl.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-B8wYavun.js → use-section-preview-base-O63Lf73f.js} +1 -1
- package/dist/client/assets/{use-session-runtime-CmBpc3xW.js → use-session-runtime-Dnm0gd3b.js} +1 -1
- package/dist/client/assets/{use-tags-BGbYsMTn.js → use-tags-Cj8a5sQE.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-K0YzQxvj.js → use-task-board-analytics-DQqMnWvr.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BLKvYi7z.js → use-task-metadata-Boljq1dV.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BiZSgJdo.js → use-thread-outputs-7L7th-tQ.js} +1 -1
- package/dist/client/assets/{use-view-mode-BcKnCYw2.js → use-view-mode-C8ke4I9f.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DtPQZrM3.js → use-virtual-mcp-uu9PNGR2.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-gUtcvvm4.js +1 -0
- package/dist/client/assets/{useQueries-BZJlFP8l.js → useQueries-CRgHMvR6.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dv7yjDB_.js +1 -0
- package/dist/client/assets/{users-CJ2f925J.js → users-DT2Xesmp.js} +1 -1
- package/dist/client/assets/{utils-C9aDXnK4.js → utils-CveRowcI.js} +1 -1
- package/dist/client/assets/{variant-calendar-MSXSWdKs.js → variant-calendar-fW6dt4KX.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-ChtiN8zH.js → variant-matcher-override-BROprMl9.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Dcb2ZdjF.js → view-mode-toggle-DlG1QZ85.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BEHAGFsi.js → virtual-mcp-_6SDLM9f.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Be-jZ6Z_.js +0 -1
- package/dist/client/assets/agent-deck-CttdAsKv.js +0 -1
- package/dist/client/assets/agent-file-Cg7gDgXE.js +0 -1
- package/dist/client/assets/agent-library-file-iYf02uq5.js +0 -1
- package/dist/client/assets/agent-settings-AuePgxNE.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BQ2qIFBp.js +0 -2
- package/dist/client/assets/agent-view-BHHzTuyV.js +0 -1
- package/dist/client/assets/api-keys-DduoJLke.js +0 -1
- package/dist/client/assets/app-editor-hUN-DTW_.js +0 -1
- package/dist/client/assets/category-editor-RYWEbSCN.js +0 -1
- package/dist/client/assets/project-reports-CxHRzGXg.js +0 -1
- package/dist/client/assets/project-tasks-BbRhvRR0.js +0 -1
- package/dist/client/assets/record-editor-BdXa2XHA.js +0 -1
- package/dist/client/assets/registry-D9E3wLoC.js +0 -2
- package/dist/client/assets/reports-qsBAApcr.js +0 -1
- package/dist/client/assets/sections-editor-C4Zrjgg_.js +0 -2
- package/dist/client/assets/seo-editor-D8h7PsFd.js +0 -1
- package/dist/client/assets/store-registry-PuCzRjMU.js +0 -2
- package/dist/client/assets/tasks-D2FpMcF2.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Ukl_Kss8.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BHNhmGMF.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,j as n,l as y,b as D}from"./index-
|
|
1
|
+
import{c as S,j as n,l as y,b as D}from"./index-Br65nWs8.js";import{T as I,a as R,b as T,c as E,d as H,e as K}from"./table-DgqVpAo1.js";import{i as W,n as z}from"./ArrowUp-DYxdR5t4.js";function L(C){const e=S.c(31),{columns:o,data:u,sortKey:x,sortDirection:i,onSort:c,onRowClick:l,rowClassName:m}=C;let p;e[0]!==i?(p=function(t,b){return n.jsx("div",{className:"w-4 flex items-center justify-center",children:b&&i&&(i==="asc"?n.jsx(W,{size:16,className:"text-muted-foreground transition-colors"}):n.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=i,e[1]=p):p=e[1];const h=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,b){let g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===b-1&&(g="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),g},e[2]=d):d=e[2];const v=d;let s;if(e[3]!==o||e[4]!==c||e[5]!==h||e[6]!==i||e[7]!==x){let f;e[9]!==o.length||e[10]!==c||e[11]!==h||e[12]!==i||e[13]!==x?(f=(t,b)=>{const g=x===t.id,r=t.sortable&&c;return n.jsx(I,{className:y(v(b,o.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),"aria-sort":g&&i?i==="asc"?"ascending":"descending":t.sortable?"none":void 0,role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r?()=>c(t.id):void 0,onKeyDown:r?k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),c(t.id))}:void 0,children:n.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&h(t.id,g)]})},t.id)},e[9]=o.length,e[10]=c,e[11]=h,e[12]=i,e[13]=x,e[14]=f):f=e[14],s=o.map(f),e[3]=o,e[4]=c,e[5]=h,e[6]=i,e[7]=x,e[8]=s}else s=e[8];let a;e[15]!==s?(a=n.jsx(R,{className:"border-b-0",children:n.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:s})}),e[15]=s,e[16]=a):a=e[16];let j;if(e[17]!==o||e[18]!==u||e[19]!==l||e[20]!==m){let f;e[22]!==o||e[23]!==l||e[24]!==m?(f=(t,b)=>{const g=m?.(t);return n.jsx(T,{"data-row-index":b,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",l?"cursor-pointer":"",g),role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l?()=>l(t):void 0,onKeyDown:l?r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),l(t))}:void 0,children:o.map(r=>n.jsx(E,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",r.cellClassName,r.wrap?"whitespace-normal wrap-break-word":""),children:n.jsx("div",{className:y(r.wrap?"w-full":"min-w-0 w-full",!r.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:r.render?r.render(t):r.accessor?r.accessor(t):null})},r.id))},b)},e[22]=o,e[23]=l,e[24]=m,e[25]=f):f=e[25],j=u.map(f),e[17]=o,e[18]=u,e[19]=l,e[20]=m,e[21]=j}else j=e[21];let w;e[26]!==j?(w=n.jsx(H,{children:j}),e[26]=j,e[27]=w):w=e[27];let N;return e[28]!==a||e[29]!==w?(N=n.jsxs(K,{className:"w-full border-collapse",children:[a,w]}),e[28]=a,e[29]=w,e[30]=N):N=e[30],N}function F(C){const e=S.c(16),{columns:o,data:u,isLoading:x,sortKey:i,sortDirection:c,onSort:l,onRowClick:m,emptyState:p}=C,h=x===void 0?!1:x,d=D();if(h){let s;e[0]!==d?(s=d("collections.collectionTableWrapper.loading"),e[0]=d,e[1]=s):s=e[1];let a;return e[2]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-muted-foreground",children:s})}),e[2]=s,e[3]=a):a=e[3],a}if(u.length===0){let s;e[4]!==p||e[5]!==d?(s=p||n.jsx("div",{className:"text-center py-12 text-muted-foreground",children:d("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=d,e[6]=s):s=e[6];let a;return e[7]!==s?(a=n.jsx("div",{className:"flex items-center justify-center h-full",children:s}),e[7]=s,e[8]=a):a=e[8],a}let v;return e[9]!==o||e[10]!==u||e[11]!==m||e[12]!==l||e[13]!==c||e[14]!==i?(v=n.jsx("div",{className:"flex-1",children:n.jsx(L,{columns:o,data:u,sortKey:i,sortDirection:c,onSort:l,onRowClick:m})}),e[9]=o,e[10]=u,e[11]=m,e[12]=l,e[13]=c,e[14]=i,e[15]=v):v=e[15],v}export{F as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,Z as j,j as u,n as h,P as T,b as C,l as b}from"./index-
|
|
1
|
+
import{c as g,Z as j,j as u,n as h,P as T,b as C,l as b}from"./index-Br65nWs8.js";import{B as v}from"./badge-Dz02OelF.js";function y(f){const e=g.c(13),{tabs:o,activeTab:t,onTabChange:s,className:m,placement:x}=f,i=x===void 0?"inline":x;let n;if(e[0]!==t||e[1]!==s||e[2]!==o){let l;e[4]!==t||e[5]!==s?(l=c=>{const p=t===c.id;return u.jsxs(h.Tab,{active:p,onClick:()=>s(c.id),children:[c.label,c.count!==void 0&&u.jsx(v,{variant:"secondary",className:b("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",p?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:c.count})]},c.id)},e[4]=t,e[5]=s,e[6]=l):l=e[6],n=o.map(l),e[0]=t,e[1]=s,e[2]=o,e[3]=n}else n=e[3];let r;e[7]!==m||e[8]!==n?(r=u.jsx(h.Tabs,{className:m,children:n}),e[7]=m,e[8]=n,e[9]=r):r=e[9];const a=r;let d;return e[10]!==a||e[11]!==i?(d=i==="page"?u.jsx(T.Toolbar.Left.Portal,{fallback:a,children:a}):a,e[10]=a,e[11]=i,e[12]=d):d=e[12],d}function N(f){const e=g.c(15),{tabs:o,activeTab:t,onTabChange:s,className:m}=f,x=C();let i;e[0]!==x?(i=x("collections.collectionTabs.tabList"),e[0]=x,e[1]=i):i=e[1];let n;e[2]!==m?(n=b("flex items-center gap-2 overflow-x-auto no-scrollbar",m),e[2]=m,e[3]=n):n=e[3];let r;if(e[4]!==t||e[5]!==s||e[6]!==o){let d;e[8]!==t||e[9]!==s?(d=l=>{const c=t===l.id;return u.jsxs("button",{type:"button","aria-pressed":c,onClick:()=>s(l.id),className:b("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",c&&"bg-accent border-border text-foreground",!c&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[l.label,l.count!==void 0&&u.jsx(v,{variant:"secondary",className:b("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",c?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:l.count})]},l.id)},e[8]=t,e[9]=s,e[10]=d):d=e[10],r=o.map(d),e[4]=t,e[5]=s,e[6]=o,e[7]=r}else r=e[7];let a;return e[11]!==i||e[12]!==n||e[13]!==r?(a=u.jsx("nav",{"aria-label":i,className:n,children:r}),e[11]=i,e[12]=n,e[13]=r,e[14]=a):a=e[14],a}function w(f){const e=g.c(3),o=j();let t;return e[0]!==o||e[1]!==f?(t=o?u.jsx(y,{...f}):u.jsx(N,{...f}),e[0]=o,e[1]=f,e[2]=t):t=e[2],t}export{w as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,r as H,j as s,l as b,B as J,a9 as K}from"./index-
|
|
1
|
+
import{c as D,r as H,j as s,l as b,B as J,a9 as K}from"./index-Br65nWs8.js";import{i as Q}from"./Tool01-D-kKamzo.js";import{e as U,C as V,b as W,a as X,c as Y,d as Z}from"./command-CtXsvJo3.js";import{a as _,P as ee,b as se}from"./popover-jThH4hZX.js";function re(k){const e=D.c(41),{options:v,value:t,onChange:x,placeholder:B,triggerClassName:M,contentClassName:y,width:R,renderTrigger:$,renderItem:o,emptyMessage:F,searchPlaceholder:G,filter:N}=k,q=B===void 0?"Select...":B,z=R===void 0?"w-[200px]":R,w=F===void 0?"No results found.":F,P=G===void 0?"Search...":G;let j;e[0]!==t?(j=u=>u.value===t,e[0]=t,e[1]=j):j=e[1];const S=v.find(j),[E,l]=H.useState(!1),T=ee,I=_,A=!0,O=$?s.jsx("div",{className:b("cursor-pointer",M),children:$(S)}):s.jsxs(J,{variant:"outline",role:"combobox",className:b("justify-between",z,M),children:[S?S.label:q,s.jsx(Q,{className:"opacity-50"})]});let r;e[2]!==I||e[3]!==O?(r=s.jsx(I,{asChild:A,children:O}),e[2]=I,e[3]=O,e[4]=r):r=e[4];let c;e[5]!==y?(c=b("p-0",y),e[5]=y,e[6]=c):c=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C={width:"var(--radix-popover-trigger-width)"},e[7]=C):C=e[7];let n;e[8]!==P?(n=s.jsx(U,{placeholder:P,className:"h-9"}),e[8]=P,e[9]=n):n=e[9];let i;e[10]!==w?(i=s.jsx(V,{children:w}),e[10]=w,e[11]=i):i=e[11];let m;if(e[12]!==x||e[13]!==v||e[14]!==o||e[15]!==l||e[16]!==t){let u;e[18]!==x||e[19]!==o||e[20]!==l||e[21]!==t?(u=a=>{const L=t===a.value;return s.jsx(W,{value:a.label,onSelect:()=>{x(a.value===t?"":a.value),l(!1)},children:o?o(a,L):s.jsxs(s.Fragment,{children:[a.label,s.jsx(K,{className:b("ml-auto",L?"opacity-100":"opacity-0")})]})},a.value)},e[18]=x,e[19]=o,e[20]=l,e[21]=t,e[22]=u):u=e[22],m=v.map(u),e[12]=x,e[13]=v,e[14]=o,e[15]=l,e[16]=t,e[17]=m}else m=e[17];let d;e[23]!==m?(d=s.jsx(X,{children:m}),e[23]=m,e[24]=d):d=e[24];let h;e[25]!==i||e[26]!==d?(h=s.jsxs(Y,{children:[i,d]}),e[25]=i,e[26]=d,e[27]=h):h=e[27];let p;e[28]!==N||e[29]!==n||e[30]!==h?(p=s.jsxs(Z,{filter:N,children:[n,h]}),e[28]=N,e[29]=n,e[30]=h,e[31]=p):p=e[31];let f;e[32]!==p||e[33]!==c?(f=s.jsx(se,{className:c,style:C,children:p}),e[32]=p,e[33]=c,e[34]=f):f=e[34];let g;return e[35]!==T||e[36]!==E||e[37]!==l||e[38]!==f||e[39]!==r?(g=s.jsxs(T,{open:E,onOpenChange:l,children:[r,f]}),e[35]=T,e[36]=E,e[37]=l,e[38]=f,e[39]=r,e[40]=g):g=e[40],g}export{re as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as n,aF as j}from"./index-
|
|
1
|
+
import{c as f,l as u,j as n,aF as j}from"./index-Br65nWs8.js";import{_ as g}from"./index-BMb1lZlu.js";import{D as b,d as w,h as y,c as C,b as z}from"./dialog-DAOqbLTM.js";import{i as D}from"./SearchMd-Ds8nq6dr.js";function $(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g,{"data-slot":"command",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function L(a){const e=f.c(28);let t,s,l,o,r,i,c;e[0]!==a?({title:i,description:c,children:t,className:s,filter:l,shouldFilter:r,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l,e[4]=o,e[5]=r,e[6]=i,e[7]=c):(t=e[1],s=e[2],l=e[3],o=e[4],r=e[5],i=e[6],c=e[7]);const m=i===void 0?"Command Palette":i,p=c===void 0?"Search for a command to run...":c;let d;e[8]!==m?(d=n.jsx(w,{children:m}),e[8]=m,e[9]=d):d=e[9];let x;e[10]!==p?(x=n.jsx(y,{children:p}),e[10]=p,e[11]=x):x=e[11];let h;e[12]!==d||e[13]!==x?(h=n.jsxs(C,{className:"sr-only",children:[d,x]}),e[12]=d,e[13]=x,e[14]=h):h=e[14];let _;e[15]!==s?(_=u("overflow-hidden p-0",s),e[15]=s,e[16]=_):_=e[16];let v;e[17]!==t||e[18]!==l||e[19]!==r?(v=n.jsx($,{filter:l,shouldFilter:r,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=l,e[19]=r,e[20]=v):v=e[20];let k;e[21]!==_||e[22]!==v?(k=n.jsx(z,{className:_,closeButtonClassName:"hidden",children:v}),e[21]=_,e[22]=v,e[23]=k):k=e[23];let N;return e[24]!==o||e[25]!==h||e[26]!==k?(N=n.jsxs(b,{...o,children:[h,k]}),e[24]=o,e[25]=h,e[26]=k,e[27]=N):N=e[27],N}function R(a){const e=f.c(16);let t,s,l;e[0]!==a?({className:t,size:l,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=l):(t=e[1],s=e[2],l=e[3]);const r=(l===void 0?"default":l)==="sm"?"h-9":"h-10";let i;e[4]!==r?(i=u("flex items-center gap-2 border-b px-3",r),e[4]=r,e[5]=i):i=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[6]=c):c=e[6];let m;e[7]!==t||e[8]!==r?(m=u("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent classic:py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",r,t),e[7]=t,e[8]=r,e[9]=m):m=e[9];let p;e[10]!==s||e[11]!==m?(p=n.jsx(g.Input,{"data-slot":"command-input",className:m,...s}),e[10]=s,e[11]=m,e[12]=p):p=e[12];let d;return e[13]!==i||e[14]!==p?(d=n.jsxs("div",{"data-slot":"command-input-wrapper",className:i,children:[c,p]}),e[13]=i,e[14]=p,e[15]=d):d=e[15],d}function V(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.List,{"data-slot":"command-list",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function B(a){const e=f.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(g.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function H(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Group,{"data-slot":"command-group",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}function P(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u("bg-border -mx-1 h-px",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Separator,{"data-slot":"command-separator",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}const I=j("[&_svg:not([class*='text-'])]:text-muted-foreground relative flex compact:min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{highlight:{selected:"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",hover:"w-full hover:bg-accent hover:text-accent-foreground"}},defaultVariants:{highlight:"selected"}});function T(a){const e=f.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=u(I(),t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o=n.jsx(g.Item,{"data-slot":"command-item",className:l,...s}),e[5]=s,e[6]=l,e[7]=o):o=e[7],o}export{B as C,H as a,T as b,V as c,$ as d,R as e,L as f,I as g,P as h};
|
package/dist/client/assets/{companion-mcps-section-ARCn5F6_.js → companion-mcps-section-jQI_30D-.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as _,r as T,l as Q,j as s,Q as Y,E as Z,b as U,a as ee,z as te,B as ne}from"./index-
|
|
1
|
+
import{c as _,r as T,l as Q,j as s,Q as Y,E as Z,b as U,a as ee,z as te,B as ne}from"./index-Br65nWs8.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-BwDqIa-x.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-Bs3Z_qGO.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=T.useState(!0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=u=>{if(!u)return;const y=()=>{const j=u.scrollHeight-u.scrollTop-u.clientHeight<8;c(j)};y(),u.addEventListener("scroll",y,{passive:!0});const b=new ResizeObserver(y);b.observe(u);for(const j of Array.from(u.children))b.observe(j);return()=>{u.removeEventListener("scroll",y),b.disconnect()}},e[0]=f):f=e[0];const p=f;let l;e[1]!==r?(l=Q("relative",r),e[1]=r,e[2]=l):l=e[2];let i;e[3]!==n||e[4]!==o?(i=s.jsx("div",{ref:p,className:o,children:n}),e[3]=n,e[4]=o,e[5]=i):i=e[5];const a=d?"opacity-0":"opacity-100";let x;e[6]!==a?(x=Q("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",a),e[6]=a,e[7]=x):x=e[7];let m;e[8]!==x?(m=s.jsx("div",{"aria-hidden":!0,className:x}),e[8]=x,e[9]=m):m=e[9];let g;return e[10]!==l||e[11]!==i||e[12]!==m?(g=s.jsxs("div",{className:l,children:[i,m]}),e[10]=l,e[11]=i,e[12]=m,e[13]=g):g=e[13],g}const H="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-6";function q(){const t=_.c(4),e=U();let n;t[0]!==e?(n=e("routes.reportsOnboarding.companionSection.title"),t[0]=e,t[1]=n):n=t[1];let o;return t[2]!==n?(o=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-xl lg:leading-7",children:n}),t[2]=n,t[3]=o):o=t[3],o}function de(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2,3].map(me)}),t[0]=e):e=t[0],e}function me(t){return s.jsx(ae,{},t)}function fe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:H,children:[s.jsx(q,{}),s.jsx(de,{})]}),t[0]=e):e=t[0],e}function ue(t){const e=_.c(18),{onRetry:n}=t,o=U();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{}),e[0]=r):r=e[0];let d;e[1]!==o?(d=o("routes.reportsOnboarding.companionSection.loadError"),e[1]=o,e[2]=d):d=e[2];let c;e[3]!==d?(c=s.jsx("p",{className:"text-sm text-foreground",children:d}),e[3]=d,e[4]=c):c=e[4];let f;e[5]!==o?(f=o("routes.reportsOnboarding.companionSection.loadErrorDescription"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),e[7]=f,e[8]=p):p=e[8];let l;e[9]!==o?(l=o("routes.reportsOnboarding.companionSection.retry"),e[9]=o,e[10]=l):l=e[10];let i;e[11]!==n||e[12]!==l?(i=s.jsx(ne,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:l}),e[11]=n,e[12]=l,e[13]=i):i=e[13];let a;return e[14]!==c||e[15]!==p||e[16]!==i?(a=s.jsxs("div",{className:H,children:[r,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[c,p,i]})]}),e[14]=c,e[15]=p,e[16]=i,e[17]=a):a=e[17],a}function ve(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Y,{children:o=>{const{reset:r}=o;return s.jsx(Z,{fallback:d=>{const{resetError:c}=d;return s.jsx(ue,{onRetry:()=>{r(),c()}})},children:s.jsx(T.Suspense,{fallback:s.jsx(fe,{}),children:s.jsx(pe,{...t})})})}}),e[0]=t,e[1]=n):n=e[1],n}function pe(t){const e=_.c(60),{org:n,cdConnectionId:o,siteUrl:r,onReadinessChange:d}=t,c=U(),{data:f}=ee.useSession(),p=f?.user?.id??"";let l;if(e[0]!==r){const $=r?se(r):null;if($?.ok)try{l=new URL($.value).hostname}catch{l=void 0}e[0]=r,e[1]=l}else l=e[1];let i;e[2]!==n.id||e[3]!==n.slug?(i={connectionId:te,orgId:n.id,orgSlug:n.slug},e[2]=n.id,e[3]=n.slug,e[4]=i):i=e[4];const a=oe(i);let x;e[5]!==o||e[6]!==n||e[7]!==a||e[8]!==r?(x={selfClient:a,org:n,cdConnectionId:o,siteUrl:r},e[5]=o,e[6]=n,e[7]=a,e[8]=r,e[9]=x):x=e[9];const{cards:m,saStatusUnavailable:g}=re(x);let u;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==r||e[15]!==p?(u={selfClient:a,org:n,userId:p,cdConnectionId:o,domain:l,siteUrl:r},e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=r,e[15]=p,e[16]=u):u=e[16];const{connect:y,connectingFieldKey:b,disconnect:j,disconnectingFieldKey:L,error:N}=le(u),[z,D]=T.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==z||e[18]!==m||e[19]!==y||e[20]!==N||e[21]!==b||e[22]!==j||e[23]!==L||e[24]!==d||e[25]!==n||e[26]!==g||e[27]!==a||e[28]!==r||e[29]!==c){k=Symbol.for("react.early_return_sentinel");e:{const $=m.filter(ge),G=m.filter(xe),J=g||($.length>0?$.every(P):m.length===0||m.some(P));if(d?.(J),m.length===0){k=null;break e}const V=b!==null||L!==null,W=h=>{const X=async()=>{await y(h)&&D(h.fieldKey)};return s.jsx(ie,{card:h,connecting:b===h.fieldKey,disconnecting:L===h.fieldKey,disabled:V&&b!==h.fieldKey&&L!==h.fieldKey,org:n,selfClient:a,siteUrl:r,autoOpenConfigFieldKey:z,onAutoOpenConfigHandled:()=>D(F=>F===h.fieldKey?null:F),onConnect:()=>{X()},onDisconnect:()=>{j(h)}},h.fieldKey)};R=H,e[40]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(q,{}),e[40]=C):C=e[40],E=ce,I="flex min-h-0 flex-1 flex-col md:block",w="-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",e[41]!==N?(S=N&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:N}),e[41]=N,e[42]=S):S=e[42],e[43]!==g||e[44]!==c?(v=g&&s.jsx("p",{role:"status",className:"mb-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-foreground",children:c("routes.reportsOnboarding.companionSection.statusUnavailable")}),e[43]=g,e[44]=c,e[45]=v):v=e[45],K="flex flex-col gap-4 pt-3",O=[...$,...G].map(W)}e[17]=z,e[18]=m,e[19]=y,e[20]=N,e[21]=b,e[22]=j,e[23]=L,e[24]=d,e[25]=n,e[26]=g,e[27]=a,e[28]=r,e[29]=c,e[30]=E,e[31]=R,e[32]=C,e[33]=k,e[34]=K,e[35]=O,e[36]=I,e[37]=w,e[38]=S,e[39]=v}else E=e[30],R=e[31],C=e[32],k=e[33],K=e[34],O=e[35],I=e[36],w=e[37],S=e[38],v=e[39];if(k!==Symbol.for("react.early_return_sentinel"))return k;let A;e[46]!==K||e[47]!==O?(A=s.jsx("div",{className:K,children:O}),e[46]=K,e[47]=O,e[48]=A):A=e[48];let B;e[49]!==E||e[50]!==A||e[51]!==I||e[52]!==w||e[53]!==S||e[54]!==v?(B=s.jsxs(E,{wrapperClassName:I,className:w,children:[S,v,A]}),e[49]=E,e[50]=A,e[51]=I,e[52]=w,e[53]=S,e[54]=v,e[55]=B):B=e[55];let M;return e[56]!==R||e[57]!==C||e[58]!==B?(M=s.jsxs("div",{className:R,children:[C,B]}),e[56]=R,e[57]=C,e[58]=B,e[59]=M):M=e[59],M}function xe(t){return!t.required}function ge(t){return t.required}function he(t){return t.satisfied&&t.configured}export{fe as C,ce as S,ve as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _,b as D,r as G,l as ee,j as s,a9 as q,fs as te,a0 as se,af as ne,T as ie,B as F,t as J,eM as oe,dX as le,an as ae}from"./index-
|
|
1
|
+
import{c as _,b as D,r as G,l as ee,j as s,a9 as q,fs as te,a0 as se,af as ne,T as ie,B as F,t as J,eM as oe,dX as le,an as ae}from"./index-Br65nWs8.js";import{a as re,A as ce}from"./alert-DVLI8Gfp.js";import{a as de,b as ue,c as V,d as fe,S as pe}from"./select-DfsEKJbm.js";import{T as me,c as xe,a as ge,b as he}from"./tabs-BEx3OU7l.js";import{u as Y}from"./use-copy-CQrsne9w.js";import{a as Q}from"./Copy01-txk4D2dp.js";import{i as ye}from"./Key01-C4vmDBWq.js";import{i as Ce}from"./Link01-CCMhgKQC.js";import{C as je,a as be,b as ve}from"./client-icons-D4aBzuCX.js";import{u as we,a as Ne,A as $e}from"./api-keys-C1TQNBQk.js";import{R as ke}from"./require-capability-D8-cLH0O.js";import"./index-CvuZZryV.js";import"./ChevronUp-CWbL6T1G.js";import"./AlertCircle-CN63l28E.js";import"./Plus-B5qlUYQA.js";import"./Trash01-BOgDvBV9.js";import"./alert-dialog-C-7JcYKm.js";import"./dialog-DAOqbLTM.js";import"./X-DNbfDZJ4.js";import"./input-WrUCYwPA.js";import"./label-VZgjitSh.js";import"./use-mcp-client-BwDqIa-x.js";import"./auth-CqLAsH9H.js";import"./access-gate-BN4Zc3yN.js";import"./capability-load-error-BW7ikFrl.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
|
|
2
2
|
--header "Authorization: Bearer ${i}"`};if(t==="cursor"){const n={url:r};return e==="api-key"&&(n.headers={Authorization:`Bearer ${i}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[a]:n}},null,2)}}if(t==="codex"){const n=[`[mcp_servers.${a}]`,`url = "${r}"`];return e==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${i}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
|
|
3
3
|
`)}}return e==="oauth"?{language:"text",code:`${r}
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,b as N,j as s,R as w,an as k,B as y}from"./index-
|
|
1
|
+
import{c as v,b as N,j as s,R as w,an as k,B as y}from"./index-Br65nWs8.js";import{i as z}from"./X-DNbfDZJ4.js";import{aq as _,ah as C}from"./agent-icon-syzsjQqD.js";const S="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function $(){const t=v.c(13),e=N();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.reportsOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("routes.reportsOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let i;t[8]!==r?(i=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[a,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let c;return t[10]!==o||t[11]!==i?(c=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=c):c=t[12],c}function q(){const t=v.c(19),e=N();let l;t[0]!==e?(l=e("routes.reportsOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:_,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.reportsOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let a;t[6]!==o?(a={Icon:w,label:o},t[6]=o,t[7]=a):a=t[7];let r;t[8]!==e?(r=e("routes.reportsOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=r):r=t[9];let i;t[10]!==r?(i={Icon:C,label:r},t[10]=r,t[11]=i):i=t[11];let c;t[12]!==n||t[13]!==a||t[14]!==i?(c=[n,a,i],t[12]=n,t[13]=a,t[14]=i,t[15]=c):c=t[15];const m=c;let f;t[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=f):f=t[16];let d;return t[17]!==m?(d=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(M)})]}),t[17]=m,t[18]=d):d=t[18],d}function M(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function A(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:a}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let c;e[0]!==o||e[1]!==r?(c=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.reportsOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(z,{size:18})}),e[0]=o,e[1]=r,e[2]=c):c=e[2];let m,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=f):(m=e[3],f=e[4]);let d;e[5]!==i||e[6]!==l?(d=l&&s.jsxs(s.Fragment,{children:[s.jsx(k,{size:16,className:"shrink-0 text-foreground/25"}),i&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:i,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let x;e[8]!==d?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,f,d]}),e[8]=d,e[9]=x):x=e[9];let g;e[10]!==n?(g=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=g):g=e[11];let h;e[12]!==a||e[13]!==x||e[14]!==g?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[x,a,g]}),e[12]=a,e[13]=x,e[14]=g,e[15]=h):h=e[15];let u,b;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),b=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=u,e[17]=b):(u=e[16],b=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[u,b,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx($,{}),s.jsx("div",{className:"flex-1"}),s.jsx(q,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==c||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,h,p]}),e[19]=c,e[20]=h,e[21]=j):j=e[21],j}function I(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:a,children:r}=t,i=n||!l,c=l&&!n?r:null;let m;return e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==c?(m=s.jsxs(y,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal classic:rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:a,disabled:i,children:[o,c]}),e[0]=o,e[1]=a,e[2]=i,e[3]=c,e[4]=m):m=e[4],m}export{A as C,I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as o,bP as a,bN as t,ap as e,bO as i,bQ as r,cW as p,dA as b,cR as m}from"./index-
|
|
1
|
+
import{ao as o,bP as a,bN as t,ap as e,bO as i,bQ as r,cW as p,dA as b,cR as m}from"./index-Br65nWs8.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:p("object"),properties:i(e(),r()).optional(),required:t(e()).optional()}).catchall(r()),_=b.extend({inputSchema:s,outputSchema:s.optional()}),f=o({headers:i(e(),e()).optional()}),g=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),d=256*1024;function l(n){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${n} must serialize to at most ${d} bytes`})}const u=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([g,f]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:h.nullable().describe("OAuth configuration"),configuration_state:l("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:t(_).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});u.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});u.partial();function T(n){return n!=null&&"command"in n}function y(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{h as O,T as i,y as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,a0 as K,z as k,a8 as F,K as H,b as q,l as A,j as x,eM as z}from"./index-
|
|
1
|
+
import{c as $,a0 as K,z as k,a8 as F,K as H,b as q,l as A,j as x,eM as z}from"./index-Br65nWs8.js";import{u as G}from"./use-registry-connections-CUAAz7MM.js";import{e as U}from"./use-organization-settings-BTHpppJM.js";import{u as V}from"./useInfiniteQuery-gUtcvvm4.js";import{c as X}from"./use-mcp-client-BwDqIa-x.js";import{i as Y,f as B}from"./extract-connection-data-_3oz07QW.js";import{r as W,R as Z}from"./retry-i8LvYSZg.js";import{g as S}from"./connection-slug-CITJ0kGN.js";import{I as J}from"./integration-icon-CHq-tZ5S.js";function ge(){const s=$.c(6),e=G(),t=U(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,L=3;function Q(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function D(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:N}=V({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=Y(i.id,e);try{return await W(async()=>{let u=null;try{u=await X({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const b=await u.callTool({name:C,arguments:h}),v=b.structuredContent??b,P=v.nextCursor||v.cursor||void 0,M=B(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:M,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:L,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${L} attempts:`,u instanceof Z?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:F,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{d&&!g&&f()}}}function ye(s,e){const t=$.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=D(a,o.id,o.slug,!0,e),d=D(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const N=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==N||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:N,loadMore:m},t[10]=l,t[11]=N,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return Q(s)}function ie(s){return!Q(s)}function he(s){const e=new Map;for(const n of s){const a=S(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=S(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function xe(s){const e=$.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,N=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=A("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:A("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let b;e[14]!==h||e[15]!==C?(b=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=b):b=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==N?(P=t.description||N("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=N,e[21]=P):P=e[21];let M;e[22]!==P?(M=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=M):M=e[23];let R;e[24]!==v||e[25]!==M?(R=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,M]}),e[24]=v,e[25]=M,e[26]=R):R=e[26];let j;e[27]!==b||e[28]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[b,R]}),e[27]=b,e[28]=R,e[29]=j):j=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==j||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[j,w]}),e[32]=j,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(z,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{xe as C,ye as a,he as g,ge as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as ve,bO as Oe,bQ as Me,ap as de,bN as ze,c as U,b as L,j as t,h as Ne,B,r as Z,l as Se,a0 as te,a6 as Ee,D as me,K as ee,d as se,p as ye,an as Ce,eM as Re,Z as Ue,n as Fe,f6 as ue,Y as Le,I as Ve,F as Be,H as qe,G as xe,E as Ge,f as He,ff as Ke,o as Qe,ar as Xe,aq as We,t as J}from"./index-D5GfY9ep.js";import{g as Ye}from"./extract-connection-data-B5VokLhW.js";import{E as _e}from"./empty-state-CnzoHD25.js";import{E as Je,c as Ze,r as et,b as tt,d as st}from"./connection-form-helpers-Bg70Jvku.js";import{c as nt,S as it,D as ot}from"./index-C7OHOxwl.js";import{u as we,T as at}from"./use-mcp-auth-status-DsC-McEq.js";import{a as lt}from"./use-members-Cz23u8UI.js";import{A as rt}from"./avatar-TzyTAv0e.js";import{a as Ie,b as ke,u as ct}from"./use-connection-uV-VP0gX.js";import{u as Te}from"./use-mcp-client-DucDZTqc.js";import{u as dt}from"./use-mcp-tools-Dar25Qt8.js";import{a as mt}from"./use-mcp-prompts-C7O_WXgf.js";import{i as ut,a as xt}from"./mcp-oauth-C6Sgd7FV.js";import{I as ae}from"./integration-icon-BKsmKoE7.js";import{s as pt}from"./Plus-KuC07360.js";import{b1 as ft,ah as ht,L as gt,bf as jt,j as ne}from"./agent-icon-Db2N7oq5.js";import{a as Ae,s as bt}from"./Settings02-2SBOLpFQ.js";import{s as re}from"./Trash01-sdbYLhwG.js";import{b as vt,a as Nt,c as St,S as yt,d as Ct}from"./sheet-B6sXHBfO.js";import{F as G,b as H,c as K,d as V,f as Q,e as _t,a as wt}from"./form-Dx6ZBu4I.js";import{I as W}from"./input--eOKSICy.js";import{u as It,D as kt}from"./use-delete-connection-B_xNjAKC.js";import{c as Tt,B as At,a as Pt,C as Dt}from"./monitoring-stats-row-Bx4cWgra.js";import{b as $t,c as Ot,d as Mt}from"./chart-CKJrzaz-.js";import{b as zt}from"./use-virtual-mcp-DtPQZrM3.js";import{T as ie,a as Et,c as oe,b as Rt}from"./tabs-Bj4_8GUh.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{d as Ut}from"./Tool01-C8yYoxGr.js";import{g as ce}from"./types-D_sN4rB-.js";import{M as Ft}from"./mcp-app-renderer-DY6yKadW.js";import{C as Lt}from"./collection-search-C2RG2e5J.js";import{B as Vt}from"./badge-CBvHT4W2.js";import{S as pe,b as fe,a as he,d as ge,c as q}from"./select-rsdXMOmu.js";import{i as Bt}from"./CheckCircle-CHH7PvQv.js";import{t as qt}from"./ChevronUp-K_DSezIa.js";import{n as Gt}from"./Tool02-B6NEJ959.js";import{a as Ht}from"./UserSquare-CI-Lmxvt.js";import{s as Kt}from"./XClose-fZr02TyX.js";import{p as Qt,i as Xt}from"./connection-BJjKfm3v.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./sidebar-BY7OkUYu.js";import"./LayoutLeft-DlOBiWF7.js";import"./use-mobile-CLWKkyXU.js";import"./tooltip-OTJWd5I_.js";import"./index-pVhbfkhf.js";import"./Key01-DP1rdVgR.js";import"./auth-DJ59GovO.js";import"./use-registry-connections-BfqOdrxb.js";import"./use-organization-settings-8Qf5CO0q.js";import"./schema-B8zTDh4T.js";import"./task-board-CslA-FwT.js";import"./index-B3ftKcNC.js";import"./index-BepxzUTL.js";import"./index-Dfk55oii.js";import"./index-BuXlZ7Xk.js";import"./popover-B9xJOTEM.js";import"./SearchMd-Db_7ZS_U.js";import"./use-create-virtual-mcp-P1B33NrF.js";import"./use-navigate-to-agent-DkyDtkl9.js";import"./hooks-mgPEmVyE.js";import"./backoff-8mStPHYB.js";import"./thread-intent-CwhSEEGz.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Eye-oxb_RsMQ.js";import"./use-org-auth-client-BlcnnSM0.js";import"./User01-BUAGbw_8.js";import"./AlertCircle-3NjmS2Me.js";import"./ArrowUp-hZF6_Dg8.js";import"./ArrowLeft-BDJocc-E.js";import"./ArrowRight-7HllOSKn.js";import"./TrendUp01-C0ETH40N.js";import"./ZoomOut-Cm9QeblW.js";import"./Globe04-BKLGp0-t.js";import"./Copy01-BD66Qy1p.js";import"./CreditCard01-Bh3w7Hgk.js";import"./DotsVertical-DMXzeMxu.js";import"./Download01-CZiiid2z.js";import"./Share07-BE4JtC9a.js";import"./Globe01-BGyzTJzS.js";import"./Image01-CABBJzvK.js";import"./Link01-IxSW8a5k.js";import"./LinkExternal01-BJ0NvAtL.js";import"./Monitor01-C8HMQtDc.js";import"./Sun-CwUe69CG.js";import"./Package-DbqCrAqt.js";import"./Palette-D2CzWakp.js";import"./Play-C375qAFd.js";import"./SearchLg-CnAwayoV.js";import"./Stars01-DLpAYXhL.js";import"./Upload01-B4XZygwf.js";import"./Users01-DFi4f9KY.js";import"./XCircle-CNDaDHqM.js";import"./X-ByVEErG0.js";import"./Zap-CcN1LA-b.js";import"./label-DwreXpUN.js";import"./alert-dialog-C3aY_yJw.js";import"./CartesianChart-B3ONOnv3.js";import"./AreaChart-BK98ay_e.js";import"./ErrorBarContext-BzVNZ25-.js";import"./Sector-C1hdz8Rd.js";const Wt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Yt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Wt}];function Jt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=L();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=we(r),m=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,p=n.status!=="active",x=m||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==x?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",x),e[2]=x,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let S;e[9]!==n.status||e[10]!==p||e[11]!==m||e[12]!==o?(S=m?t.jsx("span",{className:"text-xs text-destructive font-medium",children:o("details.connectionInstancesPanel.needsAuthorization")}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?o("details.connectionInstancesPanel.disabledError"):o("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=p,e[11]=m,e[12]=o,e[13]=S):S=e[13];let y;e[14]!==j||e[15]!==S?(y=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=y):y=e[16];let C;e[17]!==n||e[18]!==m||e[19]!==a||e[20]!==o?(C=m&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>a(n),children:o("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=m,e[19]=a,e[20]=o,e[21]=C):C=e[21];let _;e[22]!==n||e[23]!==p||e[24]!==l||e[25]!==o?(_=p?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(ft,{size:13}),o("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:o("details.connectionInstancesPanel.disable"),"aria-label":o("details.connectionInstancesPanel.disable"),children:t.jsx(ht,{size:13})}),e[22]=n,e[23]=p,e[24]=l,e[25]=o,e[26]=_):_=e[26];let $;e[27]!==n||e[28]!==c?($=()=>c(n),e[27]=n,e[28]=c,e[29]=$):$=e[29];let w;e[30]!==o?(w=o("details.connectionInstancesPanel.configure"),e[30]=o,e[31]=w):w=e[31];let M;e[32]!==o?(M=o("details.connectionInstancesPanel.configure"),e[32]=o,e[33]=M):M=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Ae,{size:13}),e[34]=A):A=e[34];let O;e[35]!==$||e[36]!==w||e[37]!==M?(O=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:w,"aria-label":M,children:A}),e[35]=$,e[36]=w,e[37]=M,e[38]=O):O=e[38];let k;e[39]!==n||e[40]!==i?(k=()=>i(n),e[39]=n,e[40]=i,e[41]=k):k=e[41];let v;e[42]!==o?(v=o("details.connectionInstancesPanel.delete"),e[42]=o,e[43]=v):v=e[43];let b;e[44]!==o?(b=o("details.connectionInstancesPanel.delete"),e[44]=o,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(re,{size:13}),e[46]=E):E=e[46];let z;e[47]!==k||e[48]!==v||e[49]!==b?(z=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:k,title:v,"aria-label":b,children:E}),e[47]=k,e[48]=v,e[49]=b,e[50]=z):z=e[50];let I;e[51]!==O||e[52]!==z||e[53]!==C||e[54]!==_?(I=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[C,_,O,z]}),e[51]=O,e[52]=z,e[53]=C,e[54]=_,e[55]=I):I=e[55];let P;return e[56]!==I||e[57]!==h||e[58]!==g||e[59]!==y?(P=t.jsxs("div",{className:h,children:[g,y,I]}),e[56]=I,e[57]=h,e[58]=g,e[59]=y,e[60]=P):P=e[60],P}function Zt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,a=L();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let l;e[3]!==n.title?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=l):l=e[4];let o;e[5]!==n||e[6]!==c?(o=()=>c(n),e[5]=n,e[6]=c,e[7]=o):o=e[7];let r;e[8]!==a?(r=a("details.connectionInstancesPanel.configure"),e[8]=a,e[9]=r):r=e[9];let d;e[10]!==a?(d=a("details.connectionInstancesPanel.configure"),e[10]=a,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ae,{size:13}),e[12]=u):u=e[12];let m;e[13]!==o||e[14]!==r||e[15]!==d?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:o,title:r,"aria-label":d,children:u})}),e[13]=o,e[14]=r,e[15]=d,e[16]=m):m=e[16];let p;return e[17]!==i||e[18]!==l||e[19]!==m?(p=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,m]}),e[17]=i,e[18]=l,e[19]=m,e[20]=p):p=e[20],p}function es(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,d=L();if(n.length===0)return null;let u;e[0]!==n.length||e[1]!==d?(u=n.length===1?d("details.connectionInstancesPanel.instance"):d("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=d,e[2]=u):u=e[2];let m;e[3]!==u?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(pt,{size:13}),e[5]=r,e[6]=p):p=e[6];let x;e[7]!==d?(x=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=x):x=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==p||e[12]!==x?(h=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:o,disabled:r,children:[p,x]}),e[9]=r,e[10]=o,e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;e[14]!==m||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[m,h]}),e[14]=m,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==a||e[19]!==c||e[20]!==i||e[21]!==l){let C;e[23]!==a||e[24]!==c||e[25]!==i||e[26]!==l?(C=_=>t.jsx(Z.Suspense,{fallback:t.jsx(Zt,{instance:_,onConfigure:c}),children:t.jsx(Jt,{instance:_,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l})},_.id),e[23]=a,e[24]=c,e[25]=i,e[26]=l,e[27]=C):C=e[27],j=n.map(C),e[17]=n,e[18]=a,e[19]=c,e[20]=i,e[21]=l,e[22]=j}else j=e[22];let S;e[28]!==j?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=S):S=e[29];let y;return e[30]!==g||e[31]!==S?(y=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=y):y=e[32],y}function ts(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const a=(c.errorMessage??"").trim()||"Unknown error";n.set(a,(n.get(a)??0)+1)}return[...n.entries()].map(([c,a])=>({message:c,count:a})).sort((c,a)=>a.count-c.count).slice(0,e)}const ss=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ns(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const is={calls:{label:"Tool calls"},errors:{label:"Errors"}};function os(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=L(),l=Ee(),o=ns(a),{data:r}=me({queryKey:ee.connectionActivity(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=Tt(r?.logs??[],o,void 0,r?.total,d?.total),m=u.data,p=u.totalCalls>0,x=ts(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),p?t.jsxs("div",{children:[t.jsx($t,{config:is,className:"h-16 w-full",children:t.jsxs(At,{data:m,barCategoryGap:"4%",children:[t.jsx(Ot,{content:t.jsx(Mt,{labelFormatter:rs}),cursor:{fill:"var(--muted)"}}),t.jsx(Pt,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:m.map(ls)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[m.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),x.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:x.map(as)})]})]})}function as(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function ls(s,e){return t.jsx(Dt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function rs(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function cs(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ds(s){const e=U.c(22),{connectionId:n}=s,c=L(),[a,i]=Z.useState("14d"),{org:l}=te();let o;e[0]!==c?(o=c("details.connectionActivity.activity"),e[0]=c,e[1]=o):o=e[1];let r;e[2]!==o?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o})}),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==c?(d=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==a?(u=ss.map(j=>t.jsx("button",{type:"button","aria-pressed":a===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium classic:rounded-md compact:rounded-lg transition-colors",a===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=a,e[7]=u):u=e[7];let m;e[8]!==d||e[9]!==u?(m=t.jsx("div",{role:"group","aria-label":d,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[8]=d,e[9]=u,e[10]=m):m=e[10];let p;e[11]!==r||e[12]!==m?(p=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,m]}),e[11]=r,e[12]=m,e[13]=p):p=e[13];let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(cs,{}),e[14]=x):x=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==a?(h=t.jsx(Z.Suspense,{fallback:x,children:t.jsx(os,{connectionId:n,orgId:l.id,timeframe:a})}),e[15]=n,e[16]=l.id,e[17]=a,e[18]=h):h=e[18];let g;return e[19]!==p||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,h]}),e[19]=p,e[20]=h,e[21]=g):g=e[21],g}function ms(s){const e=U.c(15),{virtualMcp:n,org:c}=s,a=se();let i;e[0]!==a||e[1]!==c||e[2]!==n.id?(i=()=>{const m=crypto.randomUUID();a({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:m}})},e[0]=a,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ye,{size:16}),e[4]=l):l=e[4];let o;e[5]!==n.icon||e[6]!==n.title?(o=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=o):o=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=d):d=e[10];let u;return e[11]!==i||e[12]!==o||e[13]!==r?(u=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[o,r,d]}),e[11]=i,e[12]=o,e[13]=r,e[14]=u):u=e[14],u}function us(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let a;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=o=>t.jsx(ms,{virtualMcp:o,org:c},o.id),e[3]=c,e[4]=l):l=e[4],a=n.map(l),e[0]=c,e[1]=n,e[2]=a}else a=e[2];let i;return e[5]!==a?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:a})}),e[5]=a,e[6]=i):i=e[6],i}function xs(s){const e=U.c(13),{connection:n}=s,c=L(),{org:a}=te();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const l=zt(i);if(!(l.length>0)){let p;return e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(t.Fragment,{}),e[2]=p):p=e[2],p}let r;e[3]!==c?(r=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=r):r=e[4];let d;e[5]!==r?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==a.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(us,{virtualMcps:l,org:a.slug})}),e[7]=a.slug,e[8]=l,e[9]=u):u=e[9];let m;return e[10]!==d||e[11]!==u?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=m):m=e[12],m}function ps(s){const e=U.c(35),{tools:n,connectionId:c,org:a}=s,i=L(),l=se(),{org:o}=te();let r;e[0]!==c||e[1]!==o.id||e[2]!==o.slug?(r={connectionId:c,orgId:o.id,orgSlug:o.slug},e[0]=c,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const d=Te(r),u=Ie(c);let m;e[4]!==u||e[5]!==c?(m=u?Pe(u):c,e[4]=u,e[5]=c,e[6]=m):m=e[6];const p=m,[x,h]=Z.useState("");let g,j,S,y;if(e[7]!==p||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==x||e[12]!==i||e[13]!==n){const $=(n??[]).filter(fs),w=x.toLowerCase().trim(),M=w?$.filter(b=>b.name.toLowerCase().includes(w)||b.description&&b.description.toLowerCase().includes(w)):$;let A;e[18]!==p||e[19]!==l||e[20]!==a?(A=b=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=p,e[19]=l,e[20]=a,e[21]=A):A=e[21];const O=A;S="flex flex-col h-full overflow-hidden";let k;e[22]!==i?(k=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=k):k=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=v):v=e[24],e[25]!==x||e[26]!==k?(y=t.jsx(Lt,{value:x,onChange:h,placeholder:k,onKeyDown:v}),e[25]=x,e[26]=k,e[27]=y):y=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(_e,{image:null,title:i(x?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(x?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(b=>{const E=ce(b._meta);return t.jsxs(Re,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>O(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ft,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:d})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.annotations?.title??b.name}),t.jsx(at,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=p,e[8]=d,e[9]=l,e[10]=a,e[11]=x,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=y}else g=e[14],j=e[15],S=e[16],y=e[17];let C;e[28]!==g||e[29]!==j?(C=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=C):C=e[30];let _;return e[31]!==S||e[32]!==y||e[33]!==C?(_=t.jsxs("div",{className:S,children:[y,C]}),e[31]=S,e[32]=y,e[33]=C,e[34]=_):_=e[34],_}function fs(s){return!!ce(s._meta)}const je=[];function De(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),a=e.map(n),i=e[e.length-1];return a.length>=2&&i&&c.has(i)?[a.pop(),...a].join(" "):a.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=L();let a;e[0]!==n||e[1]!==c?(a=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=a):a=e[2];let i;return e[3]!==a?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:a})}),e[3]=a,e[4]=i):i=e[4],i}function hs(s){const e=U.c(68),{tools:n,prompts:c,resources:a,connectionId:i,org:l}=s,o=c===void 0?je:c,r=a===void 0?je:a,d=L(),u=se(),m=Ie(i??"");let p;e[0]!==m||e[1]!==i?(p=m?Pe(m):i,e[0]=m,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==x||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(T){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:x,collectionName:"tools",itemId:encodeURIComponent(T)}})},e[3]=x,e[4]=i,e[5]=u,e[6]=l,e[7]=h):h=e[7];const g=h;let j;e[8]!==i||e[9]!==l||e[10]!==n?(j=i&&l&&n.some(bs),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const S=j;if(n.length+o.length+r.length===0){let N;e[12]!==d?(N=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=N):N=e[13];let T;e[14]!==N?(T=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:N}),e[14]=N,e[15]=T):T=e[15];let D;e[16]!==d?(D=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=D):D=e[17];let F;e[18]!==D?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:D}),e[18]=D,e[19]=F):F=e[19];let X;return e[20]!==T||e[21]!==F?(X=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[T,F]}),e[20]=T,e[21]=F,e[22]=X):X=e[22],X}let C;e[23]!==d||e[24]!==n.length?(C=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=C):C=e[25];let _;e[26]!==C?(_=t.jsx(ie,{value:"tools",variant:"underline",children:C}),e[26]=C,e[27]=_):_=e[27];let $;e[28]!==S||e[29]!==d?($=S&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=S,e[29]=d,e[30]=$):$=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let M;e[33]!==w?(M=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=M):M=e[34];let A;e[35]!==d?(A=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=A):A=e[36];let O;e[37]!==A?(O=t.jsx(ie,{value:"resources",variant:"underline",children:A}),e[37]=A,e[38]=O):O=e[38];let k;e[39]!==M||e[40]!==O||e[41]!==_||e[42]!==$?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Et,{variant:"underline",className:"gap-1",children:[_,$,M,O]})}),e[39]=M,e[40]=O,e[41]=_,e[42]=$,e[43]=k):k=e[43];let v;e[44]!==g||e[45]!==n?(v=n.length>0?n.map(N=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>g(N.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Ut,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(N.name)}),N.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:N.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},N.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=v):v=e[46];let b;e[47]!==v?(b=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:v})}),e[47]=v,e[48]=b):b=e[48];let E;e[49]!==i||e[50]!==S||e[51]!==l||e[52]!==n?(E=S&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ps,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=S,e[51]=l,e[52]=n,e[53]=E):E=e[53];let z;e[54]!==o?(z=o.length>0?o.map(js):t.jsx(le,{label:"prompts"}),e[54]=o,e[55]=z):z=e[55];let I;e[56]!==z?(I=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[56]=z,e[57]=I):I=e[57];let P;e[58]!==r?(P=r.length>0?r.map(gs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=P):P=e[59];let R;e[60]!==P?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:P})}),e[60]=P,e[61]=R):R=e[61];let f;return e[62]!==k||e[63]!==b||e[64]!==E||e[65]!==I||e[66]!==R?(f=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Rt,{defaultValue:"tools",variant:"underline",children:[k,b,E,I,R]})}),e[62]=k,e[63]=b,e[64]=E,e[65]=I,e[66]=R,e[67]=f):f=e[67],f}function gs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(jt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function js(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(gt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function bs(s){return ce(s._meta)}function vs(s){const e=U.c(15),{connection:n,displayTitle:c}=s,a=Ue(),i=c??n.title,l=a?"md":"xl";let o;e[0]!==n.icon||e[1]!==l||e[2]!==i?(o=t.jsx(ae,{icon:n.icon,name:i,size:l,className:"shrink-0"}),e[0]=n.icon,e[1]=l,e[2]=i,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==i?(r=a?t.jsx(Fe.Title,{children:i}):t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:i})}),e[4]=a,e[5]=i,e[6]=r):r=e[6];let d;e[7]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[7]=n.description,e[8]=d):d=e[8];let u;e[9]!==r||e[10]!==d?(u=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,d]}),e[9]=r,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==o||e[13]!==u?(m=t.jsxs("div",{className:"flex items-center classic:gap-4 classic:md:gap-6 classic:py-5 classic:md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0 compact:gap-3 compact:py-4",children:[o,u]}),e[12]=o,e[13]=u,e[14]=m):m=e[14],m}function Ns({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=L(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Le(),d=(()=>{if(typeof o!="string"||!o)return!1;try{const x=new URL(o);return x.hostname==="api.githubcopilot.com"&&x.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",m=e.connection_type==="VIRTUAL",p=m?Qt(e.connection_url):null;return m?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(ye,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(G,{control:s.control,name:"ui_type",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(V,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(G,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(V,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Gt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ht,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(Q,{})]})}),l==="NPX"&&t.jsx(G,{control:s.control,name:"npx_package",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(G,{control:s.control,name:"stdio_command",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),t.jsx(G,{control:s.control,name:"stdio_args",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(Q,{})]})})]}),t.jsx(G,{control:s.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(G,{control:s.control,name:"env_vars",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(V,{children:t.jsx(Je,{value:x.value??[],onChange:x.onChange})}),t.jsx(Q,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(G,{control:s.control,name:"connection_token",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i(d?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Ve,{children:[t.jsx(Be,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Vt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(qt,{size:12})]})})}),t.jsxs(qe,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(bt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:a,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&x.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>x.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 classic:rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity compact:rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Kt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(W,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),d&&t.jsxs(_t,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(Q,{})]})})]})}function Ss(s){return s.command==="npx"}function ys(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Cs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Xt(s.connection_headers)){const c=s.connection_headers,a=et(c.envVars);if(Ss(c)){const l=ys(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:a}}const i=Cs(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:a}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function _s(s){let e,n=null,c=null,a=null;return s.ui_type==="NPX"?(e="STDIO",n="",a=tt(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",a=st(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...a&&{connection_headers:a},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ws({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=L(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Qe(),m=ke(),{org:p}=te(),x=It({onSuccess:()=>{o.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),y=we({connectionId:e}),{data:C}=lt(),_=C?.data?.members??[],$=h??s,w=_.find(f=>f.userId===$.created_by),A=s?.connection_type==="VIRTUAL"||y.isAuthenticated,O={...s,tools:a},k=nt(O,Yt),v=Xe({resolver:We(Ze),values:be(h??s)}),b=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const N=v.getValues(),T=_s(N),D=h?.id??e;await m.update.mutateAsync({id:D,data:T}),v.reset(N)},z=()=>{v.reset(be(h??s))},I=async f=>{const N=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:T,tokenInfo:D,error:F}=await xt({connectionId:f,orgSlug:p.slug,...N?{scope:N}:{}});if(F||!T){J.error(r("details.connection.authFailed",{error:F??""}));return}if(D)try{const Y=await fetch(`/api/${p.slug}/connections/${f}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!Y.ok)console.error("Failed to save OAuth token:",await Y.text()),await m.update.mutateAsync({id:f,data:{connection_token:T}});else try{await m.update.mutateAsync({id:f,data:{}})}catch($e){console.warn("Failed to refresh connection tools after OAuth:",$e)}}catch(Y){console.error("Error saving OAuth token:",Y),await m.update.mutateAsync({id:f,data:{connection_token:T}})}else await m.update.mutateAsync({id:f,data:{connection_token:T}});const X=new URL(`/api/${p.slug}/mcp/${f}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(X.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),J.success(r("details.connection.authSuccess"))},P=()=>I(s.id),R=async()=>{try{const f=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!f.ok){const T=await f.text();J.error(r("details.connection.failedRemoveOAuth",{error:T}));return}const N=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(N.href,null)}),J.success(r("details.connection.oauthRemoved"))}catch(f){console.error("Error removing OAuth token:",f),J.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(kt,{...x}),t.jsx(vt,{open:h!==null,onOpenChange:f=>{f||g(null)},children:t.jsxs(Nt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(St,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(yt,{className:"text-base",children:h?.title??s.title}),t.jsx(Ct,{className:"text-xs",children:r("details.connection.settingsDescription")}),w&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(rt,{url:w.user?.image??void 0,fallback:w.user?.name??w.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:w.user?.name||w.user?.email})]})]}),t.jsxs(wt,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(G,{control:v.control,name:"title",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(V,{children:t.jsx(W,{...f})}),t.jsx(Q,{})]})}),t.jsx(G,{control:v.control,name:"description",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(V,{children:t.jsx(W,{...f,value:f.value||""})}),t.jsx(Q,{})]})})]}),t.jsx(Ns,{form:v,connection:h??s,hasOAuthToken:y.hasOAuthToken,onReauthenticate:P,onRemoveOAuth:R}),t.jsx(it,{connection:h??s,form:v,hasMcpBinding:k,isMCPAuthenticated:A,supportsOAuth:y.supportsOAuth,isServerError:y.isServerError,onAuthenticate:P,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:E,disabled:!b||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(B,{variant:"outline",onClick:z,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const f=h??s;g(null),x.requestDelete(f)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(ot,{hideTopbar:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(vs,{connection:s,displayTitle:(()=>{const f=o[0]??s;return f.app_name?f.title.replace(/\s*\(\d+\)\s*$/,""):f.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ds,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(es,{instances:o,onConfigure:f=>g(f),onAuthenticate:f=>I(f.id),onDelete:f=>x.requestDelete(f),onToggleStatus:async(f,N)=>{try{await m.update.mutateAsync({id:f.id,data:{status:N}}),J.success(r(N==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const f=o[0]??s,N=f.title.replace(/\s*\(\d+\)\s*$/,""),T=o.length+1,D=`${N} (${T})`,F=Ye("conn");await m.create.mutateAsync({id:F,title:D,description:f.description??null,connection_type:f.connection_type,connection_url:f.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:f.created_by,organization_id:f.organization_id,icon:f.icon??null,app_name:f.app_name??null,app_id:f.app_id??null,connection_headers:f.connection_headers??null,oauth_config:null,configuration_state:f.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const X=new URL(`/api/${p.slug}/mcp/${F}`,window.location.origin),Y=await ut({url:X.href,token:null,orgId:p.id});Y.supportsOAuth&&!Y.isAuthenticated&&await I(F)}finally{S(!1)}}}),t.jsx(xs,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(hs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Is(){const s=U.c(52),e=L();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:i,org:l}=He(a),{org:o}=te(),r=ke();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=ct(d),m=u[0]??null,p=m?.id??"",x=p||null;let h;s[4]!==o.id||s[5]!==o.slug||s[6]!==x?(h={connectionId:x,orgId:o.id,orgSlug:o.slug},s[4]=o.id,s[5]=o.slug,s[6]=x,s[7]=h):h=s[7];const g=Te(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=dt(j);let y;if(s[10]!==m?.tools||s[11]!==p||s[12]!==u||s[13]!==S){const I=S?S.tools.map($s):(m?.tools??[]).map(Ds);e:{if(u.length<=1){y=I;break e}const P=new Set,R=[],f=As;for(const N of u){const T=N.id===p?I:f(N.tools);for(const D of T)P.has(D.name)||(P.add(D.name),R.push(D))}y=R.length>0?R:I}s[10]=m?.tools,s[11]=p,s[12]=u,s[13]=S,s[14]=y}else y=s[14];const C=y;let _;s[15]!==g?(_={client:g},s[15]=g,s[16]=_):_=s[16];const{data:$}=mt(_);let w;s[17]!==g?(w={client:g},s[17]=g,s[18]=w):w=s[18];const{data:M}=Ke(w);let A;s[19]!==$?.prompts?(A=$?.prompts??[],s[19]=$?.prompts,s[20]=A):A=s[20];let O;s[21]!==A?(O=A.map(Ts),s[21]=A,s[22]=O):O=s[22];const k=O;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let b;s[25]!==v?(b=v.map(ks),s[25]=v,s[26]=b):b=s[26];const E=b;if(!m){let I;s[27]!==e?(I=e("details.connection.notFoundTitle"),s[27]=e,s[28]=I):I=s[28];let P;s[29]!==e?(P=e("details.connection.notFoundDescription"),s[29]=e,s[30]=P):P=s[30];let R;s[31]!==c||s[32]!==l?(R=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[31]=c,s[32]=l,s[33]=R):R=s[33];let f;s[34]!==e?(f=e("details.connection.backButton"),s[34]=e,s[35]=f):f=s[35];let N;s[36]!==R||s[37]!==f?(N=t.jsx(B,{variant:"outline",onClick:R,children:f}),s[36]=R,s[37]=f,s[38]=N):N=s[38];let T;return s[39]!==I||s[40]!==P||s[41]!==N?(T=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(_e,{title:I,description:P,actions:N})}),s[39]=I,s[40]=P,s[41]=N,s[42]=T):T=s[42],T}let z;return s[43]!==r.update.isPending||s[44]!==C||s[45]!==m||s[46]!==p||s[47]!==l||s[48]!==k||s[49]!==E||s[50]!==u?(z=t.jsx(ws,{org:l,connection:m,connectionId:p,isUpdating:r.update.isPending,tools:C,prompts:k,resources:E,siblings:u}),s[43]=r.update.isPending,s[44]=C,s[45]=m,s[46]=p,s[47]=l,s[48]=k,s[49]=E,s[50]=u,s[51]=z):z=s[51],z}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Ts(s){return{name:s.name,description:s.description}}function As(s){return(s??[]).map(Ps)}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Os(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ge,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Is,{})})}),s[0]=e):e=s[0],e}function Ai(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Os,{}),s[0]=e):e=s[0],e}export{Ai as default};
|
|
1
|
+
import{ao as ve,bO as Oe,bQ as Me,ap as de,bN as ze,c as U,b as L,j as t,h as Ne,B,r as Z,l as Se,a0 as te,a6 as Ee,D as me,K as ee,d as se,p as ye,an as Ce,eM as Re,Z as Ue,n as Fe,f6 as ue,Y as Le,I as Ve,F as Be,H as qe,G as xe,E as Ge,f as He,ff as Ke,o as Qe,ar as Xe,aq as We,t as J}from"./index-Br65nWs8.js";import{g as Ye}from"./extract-connection-data-_3oz07QW.js";import{E as _e}from"./empty-state-XAuNoiCZ.js";import{E as Je,c as Ze,r as et,b as tt,d as st}from"./connection-form-helpers-KqoUSQKE.js";import{c as nt,S as it,D as ot}from"./index-zwdcUZFQ.js";import{u as we,T as at}from"./use-mcp-auth-status-CSFSJQJ9.js";import{a as lt}from"./use-members-B2TxxXOD.js";import{A as rt}from"./avatar-BktXtsSk.js";import{a as Ie,b as ke,u as ct}from"./use-connection-CzmGzELP.js";import{u as Te}from"./use-mcp-client-BwDqIa-x.js";import{u as dt}from"./use-mcp-tools-K86rDboN.js";import{a as mt}from"./use-mcp-prompts-D2CngFU9.js";import{i as ut,a as xt}from"./mcp-oauth-D4qjjzCr.js";import{I as ae}from"./integration-icon-CHq-tZ5S.js";import{s as pt}from"./Plus-B5qlUYQA.js";import{b1 as ft,ah as ht,L as gt,bf as jt,j as ne}from"./agent-icon-syzsjQqD.js";import{a as Ae,s as bt}from"./Settings02-DuHT9CDs.js";import{s as re}from"./Trash01-BOgDvBV9.js";import{b as vt,a as Nt,c as St,S as yt,d as Ct}from"./sheet-Qh31aIRZ.js";import{F as G,b as H,c as K,d as V,f as Q,e as _t,a as wt}from"./form-Pq1VF9SG.js";import{I as W}from"./input-WrUCYwPA.js";import{u as It,D as kt}from"./use-delete-connection-2vJ2zjf1.js";import{c as Tt,B as At,a as Pt,C as Dt}from"./monitoring-stats-row-DLZFqB6Y.js";import{b as $t,c as Ot,d as Mt}from"./chart-0_Bs5-by.js";import{b as zt}from"./use-virtual-mcp-uu9PNGR2.js";import{T as ie,a as Et,c as oe,b as Rt}from"./tabs-BEx3OU7l.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{d as Ut}from"./Tool01-D-kKamzo.js";import{g as ce}from"./types-BzVAUbhh.js";import{M as Ft}from"./mcp-app-renderer-C-t-oEUy.js";import{C as Lt}from"./collection-search-BoAOwaNc.js";import{B as Vt}from"./badge-Dz02OelF.js";import{S as pe,b as fe,a as he,d as ge,c as q}from"./select-DfsEKJbm.js";import{i as Bt}from"./CheckCircle-DwE2PFQ4.js";import{t as qt}from"./ChevronUp-CWbL6T1G.js";import{n as Gt}from"./Tool02-C3PJKwXL.js";import{a as Ht}from"./UserSquare-DGrBwjoh.js";import{s as Kt}from"./XClose-BI_rRQ4C.js";import{p as Qt,i as Xt}from"./connection-DIKevzcK.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./sidebar-BAkTFwFo.js";import"./LayoutLeft-B6FExgE9.js";import"./use-mobile-CLWwR5Aq.js";import"./tooltip-BEf6aTZO.js";import"./index-CvuZZryV.js";import"./Key01-C4vmDBWq.js";import"./auth-CqLAsH9H.js";import"./use-registry-connections-CUAAz7MM.js";import"./use-organization-settings-BTHpppJM.js";import"./schema-DUqJejhF.js";import"./task-board-DLfMOW_8.js";import"./index-BswfQfWK.js";import"./index-BEFYd_l9.js";import"./index-CkGUYH_5.js";import"./index-BMb1lZlu.js";import"./popover-jThH4hZX.js";import"./SearchMd-Ds8nq6dr.js";import"./use-create-virtual-mcp-CGCnGQc7.js";import"./use-navigate-to-agent-BIcgvM34.js";import"./hooks-BRj1KGH0.js";import"./backoff-8mStPHYB.js";import"./thread-intent-wwkArE2X.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Eye-PUFPRogI.js";import"./use-org-auth-client-CmCV5i0j.js";import"./User01-A5yQ_wrz.js";import"./AlertCircle-CN63l28E.js";import"./ArrowUp-DYxdR5t4.js";import"./ArrowLeft-gXpdVjjZ.js";import"./ArrowRight-DwJbToqY.js";import"./TrendUp01-Cz4fAV8R.js";import"./ZoomOut-CkMxedob.js";import"./Globe04-DZ4La14w.js";import"./Copy01-txk4D2dp.js";import"./CreditCard01-CjsiyuM0.js";import"./DotsVertical-Chx4AR6B.js";import"./Download01-C_uRJg-E.js";import"./Share07-Gti5eVBm.js";import"./Globe01-cK-boe1F.js";import"./Image01-Cu23ajxK.js";import"./Link01-CCMhgKQC.js";import"./LinkExternal01-BvYYsTzi.js";import"./Monitor01-D4NGGSSY.js";import"./Sun-bZ7LINy-.js";import"./Package-BHKlCKgA.js";import"./Palette-D4pYAcww.js";import"./Play-DWkCdYVe.js";import"./SearchLg-DgVGxGAk.js";import"./Stars01-NMjfS8aT.js";import"./Upload01-bRtRcrf0.js";import"./Users01-BxbX_-HF.js";import"./XCircle-yvuIGIaV.js";import"./X-DNbfDZJ4.js";import"./Zap-D3w7YXbH.js";import"./label-VZgjitSh.js";import"./alert-dialog-C-7JcYKm.js";import"./CartesianChart-BSC303jI.js";import"./AreaChart-C6F8FeW1.js";import"./ErrorBarContext-DttuIWbP.js";import"./Sector-5UqJism-.js";const Wt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Yt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Wt}];function Jt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=L();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=we(r),m=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,p=n.status!=="active",x=m||p?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==x?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",x),e[2]=x,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let S;e[9]!==n.status||e[10]!==p||e[11]!==m||e[12]!==o?(S=m?t.jsx("span",{className:"text-xs text-destructive font-medium",children:o("details.connectionInstancesPanel.needsAuthorization")}):p?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?o("details.connectionInstancesPanel.disabledError"):o("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=p,e[11]=m,e[12]=o,e[13]=S):S=e[13];let y;e[14]!==j||e[15]!==S?(y=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=y):y=e[16];let C;e[17]!==n||e[18]!==m||e[19]!==a||e[20]!==o?(C=m&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>a(n),children:o("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=m,e[19]=a,e[20]=o,e[21]=C):C=e[21];let _;e[22]!==n||e[23]!==p||e[24]!==l||e[25]!==o?(_=p?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(ft,{size:13}),o("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:o("details.connectionInstancesPanel.disable"),"aria-label":o("details.connectionInstancesPanel.disable"),children:t.jsx(ht,{size:13})}),e[22]=n,e[23]=p,e[24]=l,e[25]=o,e[26]=_):_=e[26];let $;e[27]!==n||e[28]!==c?($=()=>c(n),e[27]=n,e[28]=c,e[29]=$):$=e[29];let w;e[30]!==o?(w=o("details.connectionInstancesPanel.configure"),e[30]=o,e[31]=w):w=e[31];let M;e[32]!==o?(M=o("details.connectionInstancesPanel.configure"),e[32]=o,e[33]=M):M=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Ae,{size:13}),e[34]=A):A=e[34];let O;e[35]!==$||e[36]!==w||e[37]!==M?(O=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:w,"aria-label":M,children:A}),e[35]=$,e[36]=w,e[37]=M,e[38]=O):O=e[38];let k;e[39]!==n||e[40]!==i?(k=()=>i(n),e[39]=n,e[40]=i,e[41]=k):k=e[41];let v;e[42]!==o?(v=o("details.connectionInstancesPanel.delete"),e[42]=o,e[43]=v):v=e[43];let b;e[44]!==o?(b=o("details.connectionInstancesPanel.delete"),e[44]=o,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(re,{size:13}),e[46]=E):E=e[46];let z;e[47]!==k||e[48]!==v||e[49]!==b?(z=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:k,title:v,"aria-label":b,children:E}),e[47]=k,e[48]=v,e[49]=b,e[50]=z):z=e[50];let I;e[51]!==O||e[52]!==z||e[53]!==C||e[54]!==_?(I=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[C,_,O,z]}),e[51]=O,e[52]=z,e[53]=C,e[54]=_,e[55]=I):I=e[55];let P;return e[56]!==I||e[57]!==h||e[58]!==g||e[59]!==y?(P=t.jsxs("div",{className:h,children:[g,y,I]}),e[56]=I,e[57]=h,e[58]=g,e[59]=y,e[60]=P):P=e[60],P}function Zt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,a=L();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let l;e[3]!==n.title?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=l):l=e[4];let o;e[5]!==n||e[6]!==c?(o=()=>c(n),e[5]=n,e[6]=c,e[7]=o):o=e[7];let r;e[8]!==a?(r=a("details.connectionInstancesPanel.configure"),e[8]=a,e[9]=r):r=e[9];let d;e[10]!==a?(d=a("details.connectionInstancesPanel.configure"),e[10]=a,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ae,{size:13}),e[12]=u):u=e[12];let m;e[13]!==o||e[14]!==r||e[15]!==d?(m=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:o,title:r,"aria-label":d,children:u})}),e[13]=o,e[14]=r,e[15]=d,e[16]=m):m=e[16];let p;return e[17]!==i||e[18]!==l||e[19]!==m?(p=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,m]}),e[17]=i,e[18]=l,e[19]=m,e[20]=p):p=e[20],p}function es(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,d=L();if(n.length===0)return null;let u;e[0]!==n.length||e[1]!==d?(u=n.length===1?d("details.connectionInstancesPanel.instance"):d("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=d,e[2]=u):u=e[2];let m;e[3]!==u?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(pt,{size:13}),e[5]=r,e[6]=p):p=e[6];let x;e[7]!==d?(x=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=x):x=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==p||e[12]!==x?(h=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:o,disabled:r,children:[p,x]}),e[9]=r,e[10]=o,e[11]=p,e[12]=x,e[13]=h):h=e[13];let g;e[14]!==m||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[m,h]}),e[14]=m,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==a||e[19]!==c||e[20]!==i||e[21]!==l){let C;e[23]!==a||e[24]!==c||e[25]!==i||e[26]!==l?(C=_=>t.jsx(Z.Suspense,{fallback:t.jsx(Zt,{instance:_,onConfigure:c}),children:t.jsx(Jt,{instance:_,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l})},_.id),e[23]=a,e[24]=c,e[25]=i,e[26]=l,e[27]=C):C=e[27],j=n.map(C),e[17]=n,e[18]=a,e[19]=c,e[20]=i,e[21]=l,e[22]=j}else j=e[22];let S;e[28]!==j?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=S):S=e[29];let y;return e[30]!==g||e[31]!==S?(y=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=y):y=e[32],y}function ts(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const a=(c.errorMessage??"").trim()||"Unknown error";n.set(a,(n.get(a)??0)+1)}return[...n.entries()].map(([c,a])=>({message:c,count:a})).sort((c,a)=>a.count-c.count).slice(0,e)}const ss=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ns(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const is={calls:{label:"Tool calls"},errors:{label:"Errors"}};function os(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=L(),l=Ee(),o=ns(a),{data:r}=me({queryKey:ee.connectionActivity(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=Tt(r?.logs??[],o,void 0,r?.total,d?.total),m=u.data,p=u.totalCalls>0,x=ts(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),p?t.jsxs("div",{children:[t.jsx($t,{config:is,className:"h-16 w-full",children:t.jsxs(At,{data:m,barCategoryGap:"4%",children:[t.jsx(Ot,{content:t.jsx(Mt,{labelFormatter:rs}),cursor:{fill:"var(--muted)"}}),t.jsx(Pt,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:m.map(ls)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:m[m.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),x.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:x.map(as)})]})]})}function as(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function ls(s,e){return t.jsx(Dt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function rs(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function cs(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ds(s){const e=U.c(22),{connectionId:n}=s,c=L(),[a,i]=Z.useState("14d"),{org:l}=te();let o;e[0]!==c?(o=c("details.connectionActivity.activity"),e[0]=c,e[1]=o):o=e[1];let r;e[2]!==o?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o})}),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==c?(d=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==a?(u=ss.map(j=>t.jsx("button",{type:"button","aria-pressed":a===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium classic:rounded-md compact:rounded-lg transition-colors",a===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=a,e[7]=u):u=e[7];let m;e[8]!==d||e[9]!==u?(m=t.jsx("div",{role:"group","aria-label":d,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[8]=d,e[9]=u,e[10]=m):m=e[10];let p;e[11]!==r||e[12]!==m?(p=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,m]}),e[11]=r,e[12]=m,e[13]=p):p=e[13];let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(cs,{}),e[14]=x):x=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==a?(h=t.jsx(Z.Suspense,{fallback:x,children:t.jsx(os,{connectionId:n,orgId:l.id,timeframe:a})}),e[15]=n,e[16]=l.id,e[17]=a,e[18]=h):h=e[18];let g;return e[19]!==p||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,h]}),e[19]=p,e[20]=h,e[21]=g):g=e[21],g}function ms(s){const e=U.c(15),{virtualMcp:n,org:c}=s,a=se();let i;e[0]!==a||e[1]!==c||e[2]!==n.id?(i=()=>{const m=crypto.randomUUID();a({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:m}})},e[0]=a,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ye,{size:16}),e[4]=l):l=e[4];let o;e[5]!==n.icon||e[6]!==n.title?(o=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=o):o=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ce,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=d):d=e[10];let u;return e[11]!==i||e[12]!==o||e[13]!==r?(u=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[o,r,d]}),e[11]=i,e[12]=o,e[13]=r,e[14]=u):u=e[14],u}function us(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let a;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=o=>t.jsx(ms,{virtualMcp:o,org:c},o.id),e[3]=c,e[4]=l):l=e[4],a=n.map(l),e[0]=c,e[1]=n,e[2]=a}else a=e[2];let i;return e[5]!==a?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:a})}),e[5]=a,e[6]=i):i=e[6],i}function xs(s){const e=U.c(13),{connection:n}=s,c=L(),{org:a}=te();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const l=zt(i);if(!(l.length>0)){let p;return e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(t.Fragment,{}),e[2]=p):p=e[2],p}let r;e[3]!==c?(r=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=r):r=e[4];let d;e[5]!==r?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==a.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(us,{virtualMcps:l,org:a.slug})}),e[7]=a.slug,e[8]=l,e[9]=u):u=e[9];let m;return e[10]!==d||e[11]!==u?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=m):m=e[12],m}function ps(s){const e=U.c(35),{tools:n,connectionId:c,org:a}=s,i=L(),l=se(),{org:o}=te();let r;e[0]!==c||e[1]!==o.id||e[2]!==o.slug?(r={connectionId:c,orgId:o.id,orgSlug:o.slug},e[0]=c,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const d=Te(r),u=Ie(c);let m;e[4]!==u||e[5]!==c?(m=u?Pe(u):c,e[4]=u,e[5]=c,e[6]=m):m=e[6];const p=m,[x,h]=Z.useState("");let g,j,S,y;if(e[7]!==p||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==x||e[12]!==i||e[13]!==n){const $=(n??[]).filter(fs),w=x.toLowerCase().trim(),M=w?$.filter(b=>b.name.toLowerCase().includes(w)||b.description&&b.description.toLowerCase().includes(w)):$;let A;e[18]!==p||e[19]!==l||e[20]!==a?(A=b=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:p,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=p,e[19]=l,e[20]=a,e[21]=A):A=e[21];const O=A;S="flex flex-col h-full overflow-hidden";let k;e[22]!==i?(k=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=k):k=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=v):v=e[24],e[25]!==x||e[26]!==k?(y=t.jsx(Lt,{value:x,onChange:h,placeholder:k,onKeyDown:v}),e[25]=x,e[26]=k,e[27]=y):y=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(_e,{image:null,title:i(x?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(x?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(b=>{const E=ce(b._meta);return t.jsxs(Re,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>O(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ft,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:d})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.annotations?.title??b.name}),t.jsx(at,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=p,e[8]=d,e[9]=l,e[10]=a,e[11]=x,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=y}else g=e[14],j=e[15],S=e[16],y=e[17];let C;e[28]!==g||e[29]!==j?(C=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=C):C=e[30];let _;return e[31]!==S||e[32]!==y||e[33]!==C?(_=t.jsxs("div",{className:S,children:[y,C]}),e[31]=S,e[32]=y,e[33]=C,e[34]=_):_=e[34],_}function fs(s){return!!ce(s._meta)}const je=[];function De(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),a=e.map(n),i=e[e.length-1];return a.length>=2&&i&&c.has(i)?[a.pop(),...a].join(" "):a.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=L();let a;e[0]!==n||e[1]!==c?(a=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=a):a=e[2];let i;return e[3]!==a?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:a})}),e[3]=a,e[4]=i):i=e[4],i}function hs(s){const e=U.c(68),{tools:n,prompts:c,resources:a,connectionId:i,org:l}=s,o=c===void 0?je:c,r=a===void 0?je:a,d=L(),u=se(),m=Ie(i??"");let p;e[0]!==m||e[1]!==i?(p=m?Pe(m):i,e[0]=m,e[1]=i,e[2]=p):p=e[2];const x=p;let h;e[3]!==x||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(T){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:x,collectionName:"tools",itemId:encodeURIComponent(T)}})},e[3]=x,e[4]=i,e[5]=u,e[6]=l,e[7]=h):h=e[7];const g=h;let j;e[8]!==i||e[9]!==l||e[10]!==n?(j=i&&l&&n.some(bs),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const S=j;if(n.length+o.length+r.length===0){let N;e[12]!==d?(N=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=N):N=e[13];let T;e[14]!==N?(T=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:N}),e[14]=N,e[15]=T):T=e[15];let D;e[16]!==d?(D=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=D):D=e[17];let F;e[18]!==D?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:D}),e[18]=D,e[19]=F):F=e[19];let X;return e[20]!==T||e[21]!==F?(X=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[T,F]}),e[20]=T,e[21]=F,e[22]=X):X=e[22],X}let C;e[23]!==d||e[24]!==n.length?(C=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=C):C=e[25];let _;e[26]!==C?(_=t.jsx(ie,{value:"tools",variant:"underline",children:C}),e[26]=C,e[27]=_):_=e[27];let $;e[28]!==S||e[29]!==d?($=S&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=S,e[29]=d,e[30]=$):$=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let M;e[33]!==w?(M=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=M):M=e[34];let A;e[35]!==d?(A=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=A):A=e[36];let O;e[37]!==A?(O=t.jsx(ie,{value:"resources",variant:"underline",children:A}),e[37]=A,e[38]=O):O=e[38];let k;e[39]!==M||e[40]!==O||e[41]!==_||e[42]!==$?(k=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Et,{variant:"underline",className:"gap-1",children:[_,$,M,O]})}),e[39]=M,e[40]=O,e[41]=_,e[42]=$,e[43]=k):k=e[43];let v;e[44]!==g||e[45]!==n?(v=n.length>0?n.map(N=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>g(N.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Ut,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(N.name)}),N.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:N.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},N.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=v):v=e[46];let b;e[47]!==v?(b=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:v})}),e[47]=v,e[48]=b):b=e[48];let E;e[49]!==i||e[50]!==S||e[51]!==l||e[52]!==n?(E=S&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ps,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=S,e[51]=l,e[52]=n,e[53]=E):E=e[53];let z;e[54]!==o?(z=o.length>0?o.map(js):t.jsx(le,{label:"prompts"}),e[54]=o,e[55]=z):z=e[55];let I;e[56]!==z?(I=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:z})}),e[56]=z,e[57]=I):I=e[57];let P;e[58]!==r?(P=r.length>0?r.map(gs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=P):P=e[59];let R;e[60]!==P?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:P})}),e[60]=P,e[61]=R):R=e[61];let f;return e[62]!==k||e[63]!==b||e[64]!==E||e[65]!==I||e[66]!==R?(f=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Rt,{defaultValue:"tools",variant:"underline",children:[k,b,E,I,R]})}),e[62]=k,e[63]=b,e[64]=E,e[65]=I,e[66]=R,e[67]=f):f=e[67],f}function gs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(jt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function js(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(gt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function bs(s){return ce(s._meta)}function vs(s){const e=U.c(15),{connection:n,displayTitle:c}=s,a=Ue(),i=c??n.title,l=a?"md":"xl";let o;e[0]!==n.icon||e[1]!==l||e[2]!==i?(o=t.jsx(ae,{icon:n.icon,name:i,size:l,className:"shrink-0"}),e[0]=n.icon,e[1]=l,e[2]=i,e[3]=o):o=e[3];let r;e[4]!==a||e[5]!==i?(r=a?t.jsx(Fe.Title,{children:i}):t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:i})}),e[4]=a,e[5]=i,e[6]=r):r=e[6];let d;e[7]!==n.description?(d=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[7]=n.description,e[8]=d):d=e[8];let u;e[9]!==r||e[10]!==d?(u=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,d]}),e[9]=r,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==o||e[13]!==u?(m=t.jsxs("div",{className:"flex items-center classic:gap-4 classic:md:gap-6 classic:py-5 classic:md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0 compact:gap-3 compact:py-4",children:[o,u]}),e[12]=o,e[13]=u,e[14]=m):m=e[14],m}function Ns({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=L(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Le(),d=(()=>{if(typeof o!="string"||!o)return!1;try{const x=new URL(o);return x.hostname==="api.githubcopilot.com"&&x.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",m=e.connection_type==="VIRTUAL",p=m?Qt(e.connection_url):null;return m?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(ye,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),p&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:p})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(G,{control:s.control,name:"ui_type",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(V,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(G,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:x.value,onValueChange:x.onChange,children:[t.jsx(V,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Gt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ht,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(Q,{})]})}),l==="NPX"&&t.jsx(G,{control:s.control,name:"npx_package",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(G,{control:s.control,name:"stdio_command",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),t.jsx(G,{control:s.control,name:"stdio_args",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(Q,{})]})})]}),t.jsx(G,{control:s.control,name:"stdio_cwd",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(V,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(G,{control:s.control,name:"env_vars",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(V,{children:t.jsx(Je,{value:x.value??[],onChange:x.onChange})}),t.jsx(Q,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(G,{control:s.control,name:"connection_token",render:({field:x})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i(d?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Ve,{children:[t.jsx(Be,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Vt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(qt,{size:12})]})})}),t.jsxs(qe,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(bt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:a,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&x.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>x.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 classic:rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity compact:rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Kt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(V,{children:t.jsx(W,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),d&&t.jsxs(_t,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(Q,{})]})})]})}function Ss(s){return s.command==="npx"}function ys(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Cs(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Xt(s.connection_headers)){const c=s.connection_headers,a=et(c.envVars);if(Ss(c)){const l=ys(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:a}}const i=Cs(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:a}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function _s(s){let e,n=null,c=null,a=null;return s.ui_type==="NPX"?(e="STDIO",n="",a=tt(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",a=st(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...a&&{connection_headers:a},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ws({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=L(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Qe(),m=ke(),{org:p}=te(),x=It({onSuccess:()=>{o.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),y=we({connectionId:e}),{data:C}=lt(),_=C?.data?.members??[],$=h??s,w=_.find(f=>f.userId===$.created_by),A=s?.connection_type==="VIRTUAL"||y.isAuthenticated,O={...s,tools:a},k=nt(O,Yt),v=Xe({resolver:We(Ze),values:be(h??s)}),b=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const N=v.getValues(),T=_s(N),D=h?.id??e;await m.update.mutateAsync({id:D,data:T}),v.reset(N)},z=()=>{v.reset(be(h??s))},I=async f=>{const N=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:T,tokenInfo:D,error:F}=await xt({connectionId:f,orgSlug:p.slug,...N?{scope:N}:{}});if(F||!T){J.error(r("details.connection.authFailed",{error:F??""}));return}if(D)try{const Y=await fetch(`/api/${p.slug}/connections/${f}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:D.accessToken,refreshToken:D.refreshToken,expiresIn:D.expiresIn,scope:D.scope,clientId:D.clientId,clientSecret:D.clientSecret,tokenEndpoint:D.tokenEndpoint})});if(!Y.ok)console.error("Failed to save OAuth token:",await Y.text()),await m.update.mutateAsync({id:f,data:{connection_token:T}});else try{await m.update.mutateAsync({id:f,data:{}})}catch($e){console.warn("Failed to refresh connection tools after OAuth:",$e)}}catch(Y){console.error("Error saving OAuth token:",Y),await m.update.mutateAsync({id:f,data:{connection_token:T}})}else await m.update.mutateAsync({id:f,data:{connection_token:T}});const X=new URL(`/api/${p.slug}/mcp/${f}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(X.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),J.success(r("details.connection.authSuccess"))},P=()=>I(s.id),R=async()=>{try{const f=await fetch(`/api/${p.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!f.ok){const T=await f.text();J.error(r("details.connection.failedRemoveOAuth",{error:T}));return}const N=new URL(`/api/${p.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(N.href,null)}),J.success(r("details.connection.oauthRemoved"))}catch(f){console.error("Error removing OAuth token:",f),J.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(kt,{...x}),t.jsx(vt,{open:h!==null,onOpenChange:f=>{f||g(null)},children:t.jsxs(Nt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(St,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(yt,{className:"text-base",children:h?.title??s.title}),t.jsx(Ct,{className:"text-xs",children:r("details.connection.settingsDescription")}),w&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(rt,{url:w.user?.image??void 0,fallback:w.user?.name??w.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:w.user?.name||w.user?.email})]})]}),t.jsxs(wt,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(G,{control:v.control,name:"title",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(V,{children:t.jsx(W,{...f})}),t.jsx(Q,{})]})}),t.jsx(G,{control:v.control,name:"description",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(V,{children:t.jsx(W,{...f,value:f.value||""})}),t.jsx(Q,{})]})})]}),t.jsx(Ns,{form:v,connection:h??s,hasOAuthToken:y.hasOAuthToken,onReauthenticate:P,onRemoveOAuth:R}),t.jsx(it,{connection:h??s,form:v,hasMcpBinding:k,isMCPAuthenticated:A,supportsOAuth:y.supportsOAuth,isServerError:y.isServerError,onAuthenticate:P,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:E,disabled:!b||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(B,{variant:"outline",onClick:z,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const f=h??s;g(null),x.requestDelete(f)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(ot,{hideTopbar:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(vs,{connection:s,displayTitle:(()=>{const f=o[0]??s;return f.app_name?f.title.replace(/\s*\(\d+\)\s*$/,""):f.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ds,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(es,{instances:o,onConfigure:f=>g(f),onAuthenticate:f=>I(f.id),onDelete:f=>x.requestDelete(f),onToggleStatus:async(f,N)=>{try{await m.update.mutateAsync({id:f.id,data:{status:N}}),J.success(r(N==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const f=o[0]??s,N=f.title.replace(/\s*\(\d+\)\s*$/,""),T=o.length+1,D=`${N} (${T})`,F=Ye("conn");await m.create.mutateAsync({id:F,title:D,description:f.description??null,connection_type:f.connection_type,connection_url:f.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:f.created_by,organization_id:f.organization_id,icon:f.icon??null,app_name:f.app_name??null,app_id:f.app_id??null,connection_headers:f.connection_headers??null,oauth_config:null,configuration_state:f.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const X=new URL(`/api/${p.slug}/mcp/${F}`,window.location.origin),Y=await ut({url:X.href,token:null,orgId:p.id});Y.supportsOAuth&&!Y.isAuthenticated&&await I(F)}finally{S(!1)}}}),t.jsx(xs,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(hs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Is(){const s=U.c(52),e=L();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:i,org:l}=He(a),{org:o}=te(),r=ke();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=ct(d),m=u[0]??null,p=m?.id??"",x=p||null;let h;s[4]!==o.id||s[5]!==o.slug||s[6]!==x?(h={connectionId:x,orgId:o.id,orgSlug:o.slug},s[4]=o.id,s[5]=o.slug,s[6]=x,s[7]=h):h=s[7];const g=Te(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=dt(j);let y;if(s[10]!==m?.tools||s[11]!==p||s[12]!==u||s[13]!==S){const I=S?S.tools.map($s):(m?.tools??[]).map(Ds);e:{if(u.length<=1){y=I;break e}const P=new Set,R=[],f=As;for(const N of u){const T=N.id===p?I:f(N.tools);for(const D of T)P.has(D.name)||(P.add(D.name),R.push(D))}y=R.length>0?R:I}s[10]=m?.tools,s[11]=p,s[12]=u,s[13]=S,s[14]=y}else y=s[14];const C=y;let _;s[15]!==g?(_={client:g},s[15]=g,s[16]=_):_=s[16];const{data:$}=mt(_);let w;s[17]!==g?(w={client:g},s[17]=g,s[18]=w):w=s[18];const{data:M}=Ke(w);let A;s[19]!==$?.prompts?(A=$?.prompts??[],s[19]=$?.prompts,s[20]=A):A=s[20];let O;s[21]!==A?(O=A.map(Ts),s[21]=A,s[22]=O):O=s[22];const k=O;let v;s[23]!==M?.resources?(v=M?.resources??[],s[23]=M?.resources,s[24]=v):v=s[24];let b;s[25]!==v?(b=v.map(ks),s[25]=v,s[26]=b):b=s[26];const E=b;if(!m){let I;s[27]!==e?(I=e("details.connection.notFoundTitle"),s[27]=e,s[28]=I):I=s[28];let P;s[29]!==e?(P=e("details.connection.notFoundDescription"),s[29]=e,s[30]=P):P=s[30];let R;s[31]!==c||s[32]!==l?(R=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[31]=c,s[32]=l,s[33]=R):R=s[33];let f;s[34]!==e?(f=e("details.connection.backButton"),s[34]=e,s[35]=f):f=s[35];let N;s[36]!==R||s[37]!==f?(N=t.jsx(B,{variant:"outline",onClick:R,children:f}),s[36]=R,s[37]=f,s[38]=N):N=s[38];let T;return s[39]!==I||s[40]!==P||s[41]!==N?(T=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(_e,{title:I,description:P,actions:N})}),s[39]=I,s[40]=P,s[41]=N,s[42]=T):T=s[42],T}let z;return s[43]!==r.update.isPending||s[44]!==C||s[45]!==m||s[46]!==p||s[47]!==l||s[48]!==k||s[49]!==E||s[50]!==u?(z=t.jsx(ws,{org:l,connection:m,connectionId:p,isUpdating:r.update.isPending,tools:C,prompts:k,resources:E,siblings:u}),s[43]=r.update.isPending,s[44]=C,s[45]=m,s[46]=p,s[47]=l,s[48]=k,s[49]=E,s[50]=u,s[51]=z):z=s[51],z}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Ts(s){return{name:s.name,description:s.description}}function As(s){return(s??[]).map(Ps)}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Os(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ge,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Is,{})})}),s[0]=e):e=s[0],e}function Ai(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Os,{}),s[0]=e):e=s[0],e}export{Ai as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as R,bO as A,bQ as I,ap as o,bN as j,bP as z,c as L,j as u,B as C}from"./index-
|
|
1
|
+
import{ao as R,bO as A,bQ as I,ap as o,bN as j,bP as z,c as L,j as u,B as C}from"./index-Br65nWs8.js";import{I as H}from"./input-WrUCYwPA.js";import{s as W}from"./Plus-B5qlUYQA.js";import{s as q}from"./Trash01-BOgDvBV9.js";const K=R({key:o().min(1,"Key is required"),value:o()}),M=R({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:j(K).optional(),configuration_scopes:j(o()).nullable().optional(),configuration_state:A(o(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(n=>(n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket")&&n.connection_url?.trim()?o().url().safeParse(n.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function O(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(i=>e.includes(i))||["sk_","rk_","whsec_","pk_live","sk_live"].some(i=>e.startsWith(i))||["_key","_secret","_token","_password","_auth","_pat"].some(i=>e.endsWith(i)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:a,valuePlaceholder:i,className:v}=n,m=a===void 0?"VARIABLE_NAME":a,h=i===void 0?"value...":i;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,s)=>s!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:p,value:c.value},r(s))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const g=P;let T;e[9]!==r||e[10]!==t?(T=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:c.key,value:p},r(s))},e[9]=r,e[10]=t,e[11]=T):T=e[11];const k=T;let f;if(e[12]!==g||e[13]!==y||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==h){let l;e[19]!==g||e[20]!==y||e[21]!==k||e[22]!==m||e[23]!==h?(l=(p,s)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>g(s,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:O(p.key)?"password":"text",placeholder:h,value:p.value,onChange:c=>k(s,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>y(s),children:u.jsx(q,{size:16})})]},s),e[19]=g,e[20]=y,e[21]=k,e[22]=m,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=g,e[13]=y,e[14]=k,e[15]=m,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=u.jsx(W,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let d;e[26]!==S?(d=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[w,"Add Environment Variable"]}),e[26]=S,e[27]=d):d=e[27];let _;e[28]!==f||e[29]!==d?(_=u.jsxs("div",{className:"flex flex-col gap-2",children:[f,d]}),e[28]=f,e[29]=d,e[30]=_):_=e[30];let E;return e[31]!==v||e[32]!==_?(E=u.jsx("div",{className:v,children:_}),e[31]=v,e[32]=_,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const a=e.slice(1).find(i=>!i.startsWith("-"));return a?{packageName:a}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function Q(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(i=>(i.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",a=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:a}:null}function J(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const a={command:n};e.trim()&&(a.args=e.trim().split(/\s+/)),t?.trim()&&(a.cwd=t.trim());const i=V(r);return Object.keys(i).length>0&&(a.envVars=i),a}export{X as E,Q as a,J as b,M as c,Z as d,Y as i,F as p,D as r};
|