decocms 4.423.0 → 4.424.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-D0TICR09.js → AlertCircle-W5I8YW4R.js} +1 -1
- package/dist/client/assets/{AreaChart-CUuPNxtW.js → AreaChart-DGWCvfZx.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Dv3ikfi_.js → ArrowLeft-CoetlmPD.js} +1 -1
- package/dist/client/assets/{ArrowRight-BQg5v3sE.js → ArrowRight-B6-T90AD.js} +1 -1
- package/dist/client/assets/{ArrowUp-C_r8kJvP.js → ArrowUp-Bd_AtNgp.js} +1 -1
- package/dist/client/assets/{CartesianChart-B5NKYnaV.js → CartesianChart-uPbdCEcC.js} +1 -1
- package/dist/client/assets/{Check-DDyUnfea.js → Check-0QivlcNy.js} +1 -1
- package/dist/client/assets/{CheckCircle-BZhzC-Lq.js → CheckCircle-D_bJsyQG.js} +1 -1
- package/dist/client/assets/{ChevronUp-BmwN74sN.js → ChevronUp-CzhJ7suW.js} +1 -1
- package/dist/client/assets/{Copy01-Bi7e8qbR.js → Copy01-Dqk5v2W3.js} +1 -1
- package/dist/client/assets/{CreditCard01-BlzZxZGz.js → CreditCard01-HKMBsj25.js} +1 -1
- package/dist/client/assets/{DotsVertical-CRH2eH5L.js → DotsVertical-Dt97OOeo.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-VP9i5poF.js → ErrorBarContext-CBQsrfDW.js} +1 -1
- package/dist/client/assets/{Image01-DsgyycUs.js → Image01-H-e_GJje.js} +1 -1
- package/dist/client/assets/{Key01-t8EGrvYD.js → Key01-DS1cuydn.js} +1 -1
- package/dist/client/assets/{Line-DkJ87hSW.js → Line-BC5yC-2J.js} +1 -1
- package/dist/client/assets/{Link01-DzFHL2_V.js → Link01-Dgt626sr.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DBlSGtF-.js → LinkExternal01-Dlk0nKfP.js} +1 -1
- package/dist/client/assets/{Monitor01-Dvmyu6xs.js → Monitor01-DHA0hU52.js} +1 -1
- package/dist/client/assets/{Palette-DM4OkfOP.js → Palette-Cz5AUPN9.js} +1 -1
- package/dist/client/assets/{Plus-D-aW7BG5.js → Plus-G6ow2MLm.js} +1 -1
- package/dist/client/assets/{SearchMd-DevJYZC1.js → SearchMd-BVf9Tbqw.js} +1 -1
- package/dist/client/assets/{Sector-CKl2jljC.js → Sector-CCB9pQmC.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CuixQdYE.js → ShoppingBag01-B8MyeZ-e.js} +1 -1
- package/dist/client/assets/{Sun-BWHbsIL3.js → Sun-C4sxcfO_.js} +1 -1
- package/dist/client/assets/{Tool01-C5pi_vGi.js → Tool01-DcMZ63HP.js} +1 -1
- package/dist/client/assets/{Trash01-DrcSVy6P.js → Trash01-BO0o39cY.js} +1 -1
- package/dist/client/assets/{Upload01-pJceAyOc.js → Upload01-CefHvaCG.js} +1 -1
- package/dist/client/assets/{User01-D8tGA0Jb.js → User01-DU_G2Tq0.js} +1 -1
- package/dist/client/assets/{UserSquare-DgkWkJkZ.js → UserSquare-Bu4-Qdjg.js} +1 -1
- package/dist/client/assets/{Users01-BSBGKa20.js → Users01-CJcsigwj.js} +1 -1
- package/dist/client/assets/{X-A-UL58H4.js → X-h03RFcZk.js} +1 -1
- package/dist/client/assets/{XAxis-D89vWOWA.js → XAxis-Bf0SUwAM.js} +1 -1
- package/dist/client/assets/{XClose-Dn0gx7Na.js → XClose-ZLANuUvR.js} +1 -1
- package/dist/client/assets/{ZoomOut-B4sCUtCp.js → ZoomOut-CXHZqqpc.js} +1 -1
- package/dist/client/assets/{access-gate-DlGPo8aX.js → access-gate-BLDo8Aw2.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-CTh7cHEg.js → add-connection-dialog-DjSYjFta.js} +1 -1
- package/dist/client/assets/{agent-analytics-B58hQWNu.js → agent-analytics-70k3BSgX.js} +1 -1
- package/dist/client/assets/agent-app-BB46jwce.js +1 -0
- package/dist/client/assets/agent-assets-C9j1IDga.js +1 -0
- package/dist/client/assets/{agent-automation-BdSzFJj6.js → agent-automation-CHEUWrV_.js} +1 -1
- package/dist/client/assets/{agent-automations-B6FFvd5m.js → agent-automations-DwZxOrYF.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BnHiJmOd.js → agent-connect-sources-BoEc8W_Z.js} +1 -1
- package/dist/client/assets/agent-deck-BCdndO00.js +1 -0
- package/dist/client/assets/{agent-e2e-CKNT90cg.js → agent-e2e-JVy9xPHj.js} +1 -1
- package/dist/client/assets/{agent-experiments-B8Yc7kgq.js → agent-experiments-DLGXfsdx.js} +1 -1
- package/dist/client/assets/{agent-file-DhlyKJJM.js → agent-file-BuuborHb.js} +1 -1
- package/dist/client/assets/{agent-git-CyEYfBlL.js → agent-git-CG5kj-J1.js} +2 -2
- package/dist/client/assets/{agent-hosting-DnSGlh2l.js → agent-hosting-CNdcuotN.js} +1 -1
- package/dist/client/assets/{agent-icon-GDusCEJg.js → agent-icon-DDAJOUrn.js} +1 -1
- package/dist/client/assets/agent-library-CcQpvJEl.js +1 -0
- package/dist/client/assets/agent-library-file-Be4fArBD.js +1 -0
- package/dist/client/assets/{agent-monitor-Bf2Zgfl3.js → agent-monitor-cEwREPy0.js} +1 -1
- package/dist/client/assets/agent-overview-cW8UrQF-.js +1 -0
- package/dist/client/assets/agent-settings-kfmE-2zX.js +1 -0
- package/dist/client/assets/{agent-site-editor-Cmi2iC7F.js → agent-site-editor-BuNbNXkv.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-CkwJqiLb.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-CgN2Bl5z.js → agent-site-editor-content-oPYgPIfi.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-DVtIxaHO.js → agent-site-editor-preview-Bxl_-tPb.js} +3 -3
- package/dist/client/assets/agent-view-DT8sSuJX.js +1 -0
- package/dist/client/assets/{agent-view-guard-3BeMVm55.js → agent-view-guard-D4EnQ5d7.js} +1 -1
- package/dist/client/assets/{agents-list-DdTFqub_.js → agents-list-R6iiUOej.js} +1 -1
- package/dist/client/assets/{ai-providers-Bi7kgm6O.js → ai-providers-DVMyBDdf.js} +1 -1
- package/dist/client/assets/{alert-BbDy7NFP.js → alert-BVj25ral.js} +1 -1
- package/dist/client/assets/{alert-dialog-HLOSkZOB.js → alert-dialog-DXkQ7Ca0.js} +1 -1
- package/dist/client/assets/{analytics-sections-BnLt9P-W.js → analytics-sections-CEwi2MoN.js} +1 -1
- package/dist/client/assets/api-keys-AMpiS3-n.js +1 -0
- package/dist/client/assets/{api-keys-Bk80HITt.js → api-keys-DPDO886h.js} +1 -1
- package/dist/client/assets/app-editor-CIRWkgt2.js +1 -0
- package/dist/client/assets/{asset-utils-DDVlLbj_.js → asset-utils-C56r94ca.js} +1 -1
- package/dist/client/assets/{auth-CALutWht.js → auth-DuH2btxq.js} +1 -1
- package/dist/client/assets/{auth-catchall-C_BAbNn3.js → auth-catchall-r6Y7hrlb.js} +1 -1
- package/dist/client/assets/{auth-entry-aofXC5nA.js → auth-entry-COrrSbBo.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CuREcF4n.js → auth-split-layout-C0oZmhWD.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DfKlt3xD.js → authenticate-and-persist-oauth-BZiJV3dt.js} +1 -1
- package/dist/client/assets/{automation-list-row-D8CVaUdf.js → automation-list-row-oFre_e8d.js} +1 -1
- package/dist/client/assets/{automation-runs-DUukTG2T.js → automation-runs-BSPiyJjC.js} +1 -1
- package/dist/client/assets/{automations-bQGjEBPE.js → automations-zO3RBGsC.js} +1 -1
- package/dist/client/assets/{autosend-DBBJpuZK.js → autosend-BiXCJJ84.js} +1 -1
- package/dist/client/assets/{avatar-0ovcLe8b.js → avatar-DmQG-hQB.js} +1 -1
- package/dist/client/assets/{badge-BGrZM0So.js → badge-D1Fgp4NK.js} +1 -1
- package/dist/client/assets/{block-document-sk39HpuP.js → block-document-CrAEa19g.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-nXmBmkTH.js → blocks-preview-workspace-context-LbzgW_1a.js} +1 -1
- package/dist/client/assets/{buckets-DLj2exnW.js → buckets-CH-hYTCu.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-B_lvpn4v.js → build-improve-prompt-doc-oWqRrUfD.js} +1 -1
- package/dist/client/assets/{calendar-DA3gfeRa.js → calendar-CvykGNfM.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dm1P3T-o.js → capability-load-error-CuhfXfl5.js} +1 -1
- package/dist/client/assets/category-editor-DvRcX5Gw.js +1 -0
- package/dist/client/assets/{chart-z9wY0-_H.js → chart-C0rHs96w.js} +1 -1
- package/dist/client/assets/{chat-context-CUwGD452.js → chat-context-BMOjz7_x.js} +1 -1
- package/dist/client/assets/{chat-draft-DIgJNtqC.js → chat-draft-zI7t52AM.js} +1 -1
- package/dist/client/assets/{checkbox-BLKiy7C5.js → checkbox-Ds1JdOtW.js} +1 -1
- package/dist/client/assets/{choose-editor-CJlnqjac.js → choose-editor-BHEehicM.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-TfGEQkwA.js → claim-phase-copy-CASFunLC.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DHNia8-l.js → cli-auth-success-D1KoZWdX.js} +1 -1
- package/dist/client/assets/{client-icons-Dwd-oboA.js → client-icons-arblMDWm.js} +1 -1
- package/dist/client/assets/{collapsible-BgmBB7Gz.js → collapsible-r5oFTjOB.js} +1 -1
- package/dist/client/assets/{collection-detail-DJCSYhwi.js → collection-detail-DIs6KPm0.js} +1 -1
- package/dist/client/assets/{collection-display-button-BPKqpQBE.js → collection-display-button-BwXsY4DM.js} +1 -1
- package/dist/client/assets/{collection-search-BdTXFJja.js → collection-search-BR1v6pag.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BN0O4w0C.js → collection-table-wrapper-CwlBRmeg.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cmv8XuYL.js → collection-tabs-BSnxiqyy.js} +1 -1
- package/dist/client/assets/{combobox-BZSLHRWD.js → combobox-BENbjv3g.js} +1 -1
- package/dist/client/assets/{command-Cl75qfzh.js → command-CbmtoCAJ.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Udx3tCqA.js → companion-mcps-section-D9meIYfU.js} +1 -1
- package/dist/client/assets/{companions-core-BnuxEm_5.js → companions-core-DzyeM-yJ.js} +1 -1
- package/dist/client/assets/config-Dfwg9rbN.js +1 -0
- package/dist/client/assets/{connect-Cj8AtpGm.js → connect-D1gy-Ek_.js} +1 -1
- package/dist/client/assets/{connect-layout-CVg-QJiz.js → connect-layout-j9llzw1P.js} +1 -1
- package/dist/client/assets/{connection-Cd7KAC3j.js → connection-BPXrZQ_h.js} +1 -1
- package/dist/client/assets/{connection-card-CZd-8cKO.js → connection-card-B8synrRX.js} +1 -1
- package/dist/client/assets/{connection-detail-ChNYmubK.js → connection-detail-CdxYZLjB.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BnHkbPOO.js → connection-form-helpers-BzQl_S_0.js} +1 -1
- package/dist/client/assets/{connections-5bsit95q.js → connections-BMQ-xp8s.js} +1 -1
- package/dist/client/assets/context-aGmXQddL.js +1 -0
- package/dist/client/assets/{create-organization-dialog-BJI-syVb.js → create-organization-dialog-D7L0MOtY.js} +1 -1
- package/dist/client/assets/{decopilot-CwpEPcBM.js → decopilot-ebwmRraL.js} +1 -1
- package/dist/client/assets/{dialog-T1cF4Isz.js → dialog-BlQDNCRy.js} +1 -1
- package/dist/client/assets/{discover-B8Vb6QFe.js → discover-C5OhZJdS.js} +1 -1
- package/dist/client/assets/{domain-settings-ZoMDZWb-.js → domain-settings-G76mSgbT.js} +1 -1
- package/dist/client/assets/{download-app-dialog-CX5J4JHu.js → download-app-dialog-CQqbCbsr.js} +1 -1
- package/dist/client/assets/{drawer-CS9toniF.js → drawer-BFdQcz5_.js} +1 -1
- package/dist/client/assets/{editor-C1P2LdDc.js → editor-DGMJNrc9.js} +1 -1
- package/dist/client/assets/{empty-state-DwT2yPBl.js → empty-state-B_enrvzQ.js} +1 -1
- package/dist/client/assets/{empty-state-C1TaDB8L.js → empty-state-D06HpvIU.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bf1KweVH.js → extract-connection-data-Dl3xTxEv.js} +1 -1
- package/dist/client/assets/{feature-gate-BRt8aqDb.js → feature-gate-BQjczuAb.js} +1 -1
- package/dist/client/assets/{feature-paywall-C3Zu8182.js → feature-paywall-XjonqNQ8.js} +1 -1
- package/dist/client/assets/{file-explorer-Bwhswy6L.js → file-explorer-Co6ouRcg.js} +1 -1
- package/dist/client/assets/{file-preview-YmeS7nib.js → file-preview-BxZRIdap.js} +1 -1
- package/dist/client/assets/{file-share-button-CuDoLSJI.js → file-share-button-Bzftjj6b.js} +1 -1
- package/dist/client/assets/{file-type-icon-Cq8DL7tW.js → file-type-icon-BhoTKsUI.js} +1 -1
- package/dist/client/assets/flat-project-D8ikNxfo.js +1 -0
- package/dist/client/assets/{folder-icon-DLVYyJvv.js → folder-icon-BY0UCKLo.js} +1 -1
- package/dist/client/assets/{form-CJazv5A2.js → form-UBiksyOk.js} +1 -1
- package/dist/client/assets/{gateway-client-BsTCs10O.js → gateway-client-C3vqmG_f.js} +1 -1
- package/dist/client/assets/{general-DQGhVKwN.js → general-Cf-Vk2t0.js} +1 -1
- package/dist/client/assets/github-repo-scope-ByTYKy_L.js +1 -0
- package/dist/client/assets/home-Dk-H-Rgh.js +1 -0
- package/dist/client/assets/{index-Cw3vmSDe.js → index-B2gHFpgf.js} +1 -1
- package/dist/client/assets/{index-BTXUwB17.js → index-B4tV0XER.js} +1 -1
- package/dist/client/assets/{index-CLDjs018.js → index-BSjhOv-9.js} +1 -1
- package/dist/client/assets/{index-BCc2phaK.js → index-BVU6INgi.js} +1 -1
- package/dist/client/assets/{index-CvbzlKcn.js → index-ChG1bJU2.js} +3 -3
- package/dist/client/assets/{index-BUsd5vyL.js → index-D3nJxkUH.js} +2 -2
- package/dist/client/assets/{index-C2eJS_b3.js → index-D7rY859O.js} +1 -1
- package/dist/client/assets/{index-C3Jv2iyx.js → index-DdFsa5v8.js} +1 -1
- package/dist/client/assets/{index-CSZksa1l.js → index-DeLPC3i4.js} +1 -1
- package/dist/client/assets/{index-DzvXOJ5M.js → index-DoX5CV5K.js} +1 -1
- package/dist/client/assets/{index-CaV75E0f.js → index-I6oftDSE.js} +1 -1
- package/dist/client/assets/{index-DQKHdsJz.js → index-MerUDJD5.js} +1 -1
- package/dist/client/assets/{index-CbcOwDLn.js → index-U5GEJv8d.js} +1 -1
- package/dist/client/assets/{index-CLaPEdI0.js → index-nY5F47m3.js} +1 -1
- package/dist/client/assets/{index-redirect-Drj4S5CT.js → index-redirect-DlxdGFcS.js} +1 -1
- package/dist/client/assets/{index-k5I82W0k.js → index-xblBxAa1.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-8G_eafwS.js → infiniteQueryObserver-Pwh-FfBK.js} +1 -1
- package/dist/client/assets/{infra-billing-BqpkpOgg.js → infra-billing-Bi-_75B4.js} +1 -1
- package/dist/client/assets/input-CDSjYLmI.js +17 -0
- package/dist/client/assets/{input-hVeLxGkN.js → input-DooV2Ahl.js} +1 -1
- package/dist/client/assets/{input-CamhPcKT.js → input-HiahbJv4.js} +1 -1
- package/dist/client/assets/{integration-icon-CE3zgH2m.js → integration-icon-_VlEmGlM.js} +1 -1
- package/dist/client/assets/{label-Dt_HMVkI.js → label-E-Ho38zd.js} +1 -1
- package/dist/client/assets/{last-preview-page-CvAhJevo.js → last-preview-page-0TGtdrIv.js} +1 -1
- package/dist/client/assets/{layout-61ZcFPNp.js → layout-CQsFF7KX.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Bet9Cb1f.js → legacy-agents-deep-Ch9eIyOV.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-mHxj8mDt.js → legacy-main-redirect-BJLgPBDm.js} +1 -1
- package/dist/client/assets/library-DO_7On4W.js +1 -0
- package/dist/client/assets/{library-tab-Drb2tX_t.js → library-tab-BgrUBzhp.js} +1 -1
- package/dist/client/assets/{login-axDhhx7c.js → login-DlP_p-JF.js} +1 -1
- package/dist/client/assets/{markdown-Yd6HeyVW.js → markdown-DkTG3TBB.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Diq_XjH6.js → mcp-app-renderer-BFl5mLWM.js} +1 -1
- package/dist/client/assets/{mcp-oauth-pCVJlh0m.js → mcp-oauth-DyAthDLR.js} +1 -1
- package/dist/client/assets/{members-C8hfs5Al.js → members-P3seQhum.js} +1 -1
- package/dist/client/assets/{message-templates-GGyzkY4C.js → message-templates-C2kkzy11.js} +1 -1
- package/dist/client/assets/{mini-report-page-B-HFlq8d.js → mini-report-page-D1BdHCur.js} +1 -1
- package/dist/client/assets/{mock-board-B_x1Ufog.js → mock-board-P8FZ2bOw.js} +1 -1
- package/dist/client/assets/{monaco-editor-BdMniITa.js → monaco-editor-BUUz_0FG.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CM0eJ-oE.js → monitoring-stats-row-1HHAYUXJ.js} +1 -1
- package/dist/client/assets/{multi-select-hFwt4PUr.js → multi-select-BDELP8fE.js} +1 -1
- package/dist/client/assets/{mustache-DA_4QKEE.js → mustache-CHNfIA4V.js} +1 -1
- package/dist/client/assets/{new-project-dialog-D-m_RFrz.js → new-project-dialog-N9VofWxP.js} +1 -1
- package/dist/client/assets/{oauth-callback-DpKdha_b.js → oauth-callback-BD3H-bPv.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DWIKA2IO.js → oauth-callback-ai-provider-BbtxCuYl.js} +1 -1
- package/dist/client/assets/{onboarding-qTe6hbgS.js → onboarding-DMvoy6kf.js} +1 -1
- package/dist/client/assets/openai-conversation-DdYcY-b3.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-DoVsicr5.js → optimistic-project-sidebar-views-B-4bxO4K.js} +1 -1
- package/dist/client/assets/{org-file-open-context-cFWij3_W.js → org-file-open-context-BDq_L8L7.js} +1 -1
- package/dist/client/assets/{organization-choice-Dy2jD1J4.js → organization-choice-LLnKA7aE.js} +1 -1
- package/dist/client/assets/{orgs-vqrI07jL.js → orgs-DZrtLRMd.js} +1 -1
- package/dist/client/assets/{page-seo-form-BtLDzg2b.js → page-seo-form-B40KntW2.js} +1 -1
- package/dist/client/assets/{pair-CSM2Yjvs.js → pair-DyRvnZ7H.js} +1 -1
- package/dist/client/assets/{plan-ladder-CQAXX8Ai.js → plan-ladder-owjkPam2.js} +1 -1
- package/dist/client/assets/{popover-Dw-ACWw4.js → popover-D5x-U1ly.js} +1 -1
- package/dist/client/assets/post-calendar-BS93P3AR.js +1 -0
- package/dist/client/assets/{post-editor-DiKHksYc.js → post-editor-CI-v3BtQ.js} +2 -2
- package/dist/client/assets/{preview-content-CvBZhQMI.js → preview-content-DZ1s59io.js} +1 -1
- package/dist/client/assets/{preview-dialog-BS7EG0jc.js → preview-dialog-BvBDQ6-F.js} +1 -1
- package/dist/client/assets/{profile-C2BRrQgV.js → profile-zJAbFxBo.js} +1 -1
- package/dist/client/assets/{project-app-view-CC9NS9Th.js → project-app-view-Tr091BAq.js} +1 -1
- package/dist/client/assets/{project-feed-DVhU-WLA.js → project-feed-T6AOqdke.js} +1 -1
- package/dist/client/assets/{project-icon-BPFnqDzO.js → project-icon-CrY94bRz.js} +1 -1
- package/dist/client/assets/project-reports--aiovqKr.js +1 -0
- package/dist/client/assets/project-tasks-D4mpTO-l.js +1 -0
- package/dist/client/assets/{projects-C5gwXosm.js → projects-6zOOaYlg.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DoFaZFIV.js → projects-empty-state-CHr6cea0.js} +1 -1
- package/dist/client/assets/{prompts-BvjsTd2s.js → prompts-DTj5RRPQ.js} +1 -1
- package/dist/client/assets/{provision-repo-scoped-github-connection-B6zdkC6p.js → provision-repo-scoped-github-connection-lckxpDHD.js} +1 -1
- package/dist/client/assets/record-editor-C4EAuYpF.js +1 -0
- package/dist/client/assets/{redirect-editor-QrYJHohG.js → redirect-editor-f_vC2I6T.js} +1 -1
- package/dist/client/assets/reports-BxpzxB2a.js +1 -0
- package/dist/client/assets/{reports-Yq4JQd7h.js → reports-CPa8K8oW.js} +1 -1
- package/dist/client/assets/{reports-onboarding-Di_Ko0hL.js → reports-onboarding-Xlvqj4mR.js} +1 -1
- package/dist/client/assets/{reports-tab-izCMVgfu.js → reports-tab-XCfr2YZx.js} +2 -2
- package/dist/client/assets/{repositories-BxbLvx84.js → repositories-u36u5fvZ.js} +1 -1
- package/dist/client/assets/{repository-binding-B13LVmY3.js → repository-binding-DFSnpl0R.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BSeU92PL.js → repository-import-picker-CxV4PkyQ.js} +1 -1
- package/dist/client/assets/{repository-picker-C8wpFdxo.js → repository-picker-BlqOm-MJ.js} +1 -1
- package/dist/client/assets/{require-capability-D4pjnW4a.js → require-capability-aOpAWwSZ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CHVCu6-R.js → required-auth-layout-DRvuCpsR.js} +1 -1
- package/dist/client/assets/{reset-password-T8CFnkkw.js → reset-password-OZJEyJoO.js} +1 -1
- package/dist/client/assets/{resizable-BTDafq5j.js → resizable-BcGXSTm5.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CgQIt8gp.js → resolve-tab-icon-3pvjCLcw.js} +1 -1
- package/dist/client/assets/{review-settings-BrQnQcu4.js → review-settings-BnUb27bw.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CE19fL3t.js → rich-text-link-control-NyqSQM2C.js} +1 -1
- package/dist/client/assets/{roles-8Ckwq0zE.js → roles-DTTAdaz-.js} +1 -1
- package/dist/client/assets/route-DDBWMUh7.js +1 -0
- package/dist/client/assets/route-NvLIaPVf.js +1 -0
- package/dist/client/assets/route-mNBWRJSg.js +1 -0
- package/dist/client/assets/{runnable-block-editor-C2YwpBp2.js → runnable-block-editor-DB7algvI.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BBPjPwnO.js → sandbox-lifecycle-context-CHzoAJUW.js} +1 -1
- package/dist/client/assets/{schema-DCW8VMPg.js → schema-B6UkojL_.js} +1 -1
- package/dist/client/assets/{scroll-area-DoIL-J7_.js → scroll-area-ogl0f4_L.js} +1 -1
- package/dist/client/assets/{search-input-BY0KMdVO.js → search-input-CDUTIy-8.js} +1 -1
- package/dist/client/assets/{search-toggle-C7qdc90f.js → search-toggle-BR54cRkc.js} +1 -1
- package/dist/client/assets/{secret-picker-B7Q7bjk-.js → secret-picker-Ts_Mwr3P.js} +1 -1
- package/dist/client/assets/{secrets-BfwTP-o8.js → secrets-DbCSDEef.js} +1 -1
- package/dist/client/assets/{sections-editor-Dpw1cpoD.js → sections-editor-Jh5n4hi9.js} +1 -1
- package/dist/client/assets/{select-BmdOxcpM.js → select-Cm7yNA4g.js} +1 -1
- package/dist/client/assets/{select-model-Bs5l1Uxo.js → select-model-uQ9U5iwI.js} +1 -1
- package/dist/client/assets/{seo-editor-_DZGDn5m.js → seo-editor-BpIuxylh.js} +1 -1
- package/dist/client/assets/{separator-DAHx7BVp.js → separator-Cy2PS5xR.js} +1 -1
- package/dist/client/assets/{settings-tab-BZ2PypA4.js → settings-tab-DiBpt4oT.js} +1 -1
- package/dist/client/assets/{sheet-CZBVpfdy.js → sheet-Cl5ZHtDF.js} +1 -1
- package/dist/client/assets/{shell-layout-Bfgq6G4r.js → shell-layout-DhbvX157.js} +1 -1
- package/dist/client/assets/{skills-OhHrOnPe.js → skills-6QdP0zY0.js} +1 -1
- package/dist/client/assets/{sso-DoJQIF4-.js → sso-DFRimBF2.js} +1 -1
- package/dist/client/assets/{suggestion-Com9RJW5.js → suggestion-Cqv2HV7s.js} +1 -1
- package/dist/client/assets/{switch-yidpNHeO.js → switch-Dpy0BGGT.js} +1 -1
- package/dist/client/assets/{synced-repos-fC7R2k2e.js → synced-repos-DYAkVU2g.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-C3vU34Uf.js → tab-icon-glyph-K-cyMNmt.js} +1 -1
- package/dist/client/assets/{table-CFDX0POV.js → table-CpzSd0oU.js} +1 -1
- package/dist/client/assets/{tabs-DNrA3FC_.js → tabs-0Iyv-61_.js} +1 -1
- package/dist/client/assets/{task-board-j2guF3qd.js → task-board-DH3h4Dr1.js} +1 -1
- package/dist/client/assets/{task-route-DrBYdKfz.js → task-route-BMfCybOO.js} +1 -1
- package/dist/client/assets/{task-status-BcuvoR6R.js → task-status-BOy5az7q.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DntKh4ie.js → taskboard-analytics-U1rpV7E1.js} +1 -1
- package/dist/client/assets/tasks-CLq4vM6Z.js +1 -0
- package/dist/client/assets/{tasks-BIyUZ5os.js → tasks-DGOCLVZE.js} +1 -1
- package/dist/client/assets/{textarea-B93EqQC1.js → textarea-Cs-kg39J.js} +1 -1
- package/dist/client/assets/{thread-analytics-DElSqS0X.js → thread-analytics-speufZIm.js} +1 -1
- package/dist/client/assets/{thread-button-CFfrQX-Q.js → thread-button-DEB6CyTi.js} +1 -1
- package/dist/client/assets/{thread-intent-CpofUpw9.js → thread-intent-BE88qyQp.js} +1 -1
- package/dist/client/assets/{thread-route-BKCVVcFy.js → thread-route-BE5sprLz.js} +1 -1
- package/dist/client/assets/{thread-route-3dqbM9EF.js → thread-route-C05ythGW.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-B61ODskP.js → thread-sheet-body-DGSNqAOF.js} +1 -1
- package/dist/client/assets/{toggle-group-CFSVnMSk.js → toggle-group-CKSuaauJ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DyrDd5vW.js → toolbar-icon-button-Ddj8hi06.js} +1 -1
- package/dist/client/assets/{tooltip-BYRrMdTU.js → tooltip-DNXq5NQC.js} +1 -1
- package/dist/client/assets/{track-CUAOEDdq.js → track-CI_8TlzP.js} +1 -1
- package/dist/client/assets/{types-DxHf7m50.js → types-Ulhrp9MO.js} +1 -1
- package/dist/client/assets/{usage-stats-BjDhXobA.js → usage-stats-B7tcUIq5.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BdefOf99.js → use-ai-providers-JF8SqOOF.js} +1 -1
- package/dist/client/assets/{use-automations-CNSCOWtp.js → use-automations-DncSznpz.js} +1 -1
- package/dist/client/assets/{use-autosave-DqxE3Iz-.js → use-autosave-szR_Fq5G.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CH5zZDy9.js → use-chat-layout-state-DCpMMZxe.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BVItJgjz.js → use-connect-companion-BwqO7EA3.js} +1 -1
- package/dist/client/assets/{use-connection-CKRpxkSv.js → use-connection-CTvqDLuq.js} +1 -1
- package/dist/client/assets/{use-copy-Dmaq1WUu.js → use-copy-dcKlKJsJ.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CxAkX5Jw.js → use-create-virtual-mcp-BN2MIpEF.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CeT5Twer.js → use-date-fns-locale-4HWrSHoc.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-QZ1AhMoL.js → use-debounced-autosave-B7fupUso.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BiZFIMbE.js → use-debounced-value-CKP9u9KG.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BCSC-uQL.js → use-deco-credits-CPG4hYFb.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CkPqvJsK.js → use-decopilot-events-qHiW0p1_.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CSRsZdqa.js → use-delete-connection-Dikm5L9q.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BF_XVx3H.js → use-deployment-admin-Uie2dm_n.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-B__gsqLe.js → use-fast-preview-draft-url-BVSZda3a.js} +1 -1
- package/dist/client/assets/{use-file-configs-wcjoasdo.js → use-file-configs-CmJk79gx.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DjT8c39O.js → use-infinite-scroll-M4Ifk0Id.js} +1 -1
- package/dist/client/assets/{use-join-requests-BW5Nj6aD.js → use-join-requests-Cr5OMhWY.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DMgSUsdq.js → use-main-panel-tabs-7sM45K_r.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BfVlKEEO.js → use-mcp-auth-status-B7Q0d1M3.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CG8sd7Ov.js → use-mcp-client-D1zolVZP.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D6GxlnK6.js → use-mcp-prompts-CXqK-JUB.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-rUvRF73D.js → use-mcp-tools-ULbfd_2A.js} +1 -1
- package/dist/client/assets/{use-members-CnAdIXEN.js → use-members-DjceQbih.js} +1 -1
- package/dist/client/assets/{use-mobile-D4eGDsYT.js → use-mobile-C1Sz5IA3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bi-jClYv.js → use-navigate-to-agent-B9IjIXwZ.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-CHpkRyd-.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CX2irC1Y.js → use-open-billing-url-BSxg2hZU.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DOudeu1v.js → use-org-auth-client-BV5jhMTD.js} +1 -1
- package/dist/client/assets/{use-org-fs-BDJuIwsC.js → use-org-fs-DHsvLMfF.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DjYSYWYF.js → use-org-repo-syncs-SMTrpIVP.js} +1 -1
- package/dist/client/assets/{use-org-sso-D9HEs20Y.js → use-org-sso-BGCHYImg.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DiB9rEkA.js → use-organization-roles-D7ha2DPC.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BfWZAwmL.js → use-organization-settings-BGBvwg83.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DxarUOIX.js → use-panel-navigate-Bq9qA6eC.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-Bo8f4TNZ.js → use-project-native-view-presence-CeFV8LVU.js} +1 -1
- package/dist/client/assets/{use-project-scope-SYyMWNQi.js → use-project-scope-ehoEOmYH.js} +1 -1
- package/dist/client/assets/{use-releases-CGYl1Jwh.js → use-releases-B9YGzuro.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DLQDomu6.js → use-reports-diagnostic-DtaZsId7.js} +1 -1
- package/dist/client/assets/{use-secrets-BZlkv3Wi.js → use-secrets-BqFBRaqm.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CfFKe_kR.js → use-section-preview-base-FXPbqdPo.js} +1 -1
- package/dist/client/assets/{use-session-runtime-DDkOQbaJ.js → use-session-runtime-1Gf3T1af.js} +1 -1
- package/dist/client/assets/{use-tags-4xKtOqYb.js → use-tags-4YottFB8.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CFDXveTE.js → use-task-board-analytics-CIlckJwW.js} +1 -1
- package/dist/client/assets/use-task-board-events-CELlAVyW.js +1 -0
- package/dist/client/assets/{use-task-metadata-r6lrI9oV.js → use-task-metadata-Cg7nHx5b.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-kDUcKJx0.js → use-thread-analytics-Bx20tJ_r.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-Bs1NtIov.js → use-thread-outputs-DObw1ANa.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BESYkBal.js +1 -0
- package/dist/client/assets/{useQueries-mGoGxNFu.js → useQueries-DxOGLKaK.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DyzaeZcm.js +1 -0
- package/dist/client/assets/{users-CfBwz20x.js → users-BACPtv5c.js} +1 -1
- package/dist/client/assets/{utils-Cxj5BVDm.js → utils-C0CULGC9.js} +1 -1
- package/dist/client/assets/variant-calendar-CrJlfHFb.js +1 -0
- package/dist/client/assets/{variant-matcher-override-hQHWeiZz.js → variant-matcher-override-BisIppm1.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DuBDAhYw.js → view-mode-toggle-CWajLBUH.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BWnYwTvo.js → virtual-mcp-C8NRJMm1.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +8 -6
- package/dist/server/server.js +8 -6
- package/package.json +1 -1
- package/dist/client/assets/agent-app-L3JRjTa3.js +0 -1
- package/dist/client/assets/agent-assets-CkVVtUw_.js +0 -1
- package/dist/client/assets/agent-deck-CBt0aaNZ.js +0 -1
- package/dist/client/assets/agent-library-CUC9c6dQ.js +0 -1
- package/dist/client/assets/agent-library-file-ECX-lgwB.js +0 -1
- package/dist/client/assets/agent-overview-hgwqj49s.js +0 -1
- package/dist/client/assets/agent-settings-BYVNZq5L.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CxT-Xy8m.js +0 -2
- package/dist/client/assets/agent-view-DDfsOy9P.js +0 -1
- package/dist/client/assets/api-keys-7bI6CAoW.js +0 -1
- package/dist/client/assets/app-editor-DEiWnBTk.js +0 -1
- package/dist/client/assets/category-editor-DW03sNpU.js +0 -1
- package/dist/client/assets/config-RxJhwfwr.js +0 -1
- package/dist/client/assets/context-CY0-OS_-.js +0 -1
- package/dist/client/assets/flat-project-Re8UW3fv.js +0 -1
- package/dist/client/assets/github-repo-scope-C8GSbvaz.js +0 -1
- package/dist/client/assets/home-B3L6MzZI.js +0 -1
- package/dist/client/assets/input-CGJ8ukKo.js +0 -16
- package/dist/client/assets/library-DbQhbhR2.js +0 -1
- package/dist/client/assets/openai-conversation-BSgfgZST.js +0 -3
- package/dist/client/assets/post-calendar-zrpJaqcn.js +0 -1
- package/dist/client/assets/project-reports-DOmhSvz5.js +0 -1
- package/dist/client/assets/project-tasks-DB5k90HT.js +0 -1
- package/dist/client/assets/record-editor-Dg8aDtzh.js +0 -1
- package/dist/client/assets/reports-Cto_AfP7.js +0 -1
- package/dist/client/assets/route-7yEUIeSq.js +0 -1
- package/dist/client/assets/route-DAU0wrAb.js +0 -1
- package/dist/client/assets/route-DgHD04wl.js +0 -1
- package/dist/client/assets/tasks-DDFIbaZ6.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-BYIZFokZ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CiSINUTR.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DzB7QwWs.js +0 -1
- package/dist/client/assets/variant-calendar-D4HFAHxI.js +0 -1
package/dist/client/assets/{companion-mcps-section-Udx3tCqA.js → companion-mcps-section-D9meIYfU.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-D3nJxkUH.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-D1zolVZP.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-BwqO7EA3.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 +1 @@
|
|
|
1
|
-
import{g,a as b}from"./metadata-D72DunRR.js";import{g as h}from"./github-repo-scope-
|
|
1
|
+
import{g,a as b}from"./metadata-D72DunRR.js";import{g as h}from"./github-repo-scope-ByTYKy_L.js";const C=new Set([]);function _(n){if(n.boundVia==="sa")return!0;const{companionConfig:e,cdConfig:t}=n;switch(n.bindingType){case"vtex":return c(e?.accountName);case"shopify":return c(e?.storeDomain);case"google-analytics":return c(e?.propertyId);case"google-search-console":return c(e?.siteUrl);case"github":return c(t?.github_repo);default:return!0}}function T(n){const{companionConfig:e,cdConfig:t}=n;switch(n.bindingType){case"vtex":return typeof e?.accountName=="string"?e.accountName:null;case"shopify":return typeof e?.storeDomain=="string"?e.storeDomain:null;case"google-analytics":return typeof e?.propertyId=="string"?e.propertyId:null;case"google-search-console":return typeof e?.siteUrl=="string"?e.siteUrl:null;case"github":return typeof t?.github_repo=="string"?t.github_repo:null;default:return null}}function U(n){const e=n.properties;if(!e)return[];const t=[];for(const[o,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:o,bindingType:a})}return t}const B=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"shopify",bindingType:"shopify"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function A(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function F(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function D(n,e,t,o){return{...n??{},[e]:{__type:t,value:o}}}function c(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(c):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&c(t)):!1}const I={accountName:"reportsOnboarding.companionCard.configField.accountName",appKey:"reportsOnboarding.companionCard.configField.appKey",appToken:"reportsOnboarding.companionCard.configField.appToken",propertyId:"reportsOnboarding.companionCard.configField.propertyId",siteUrl:"reportsOnboarding.companionCard.configField.siteUrl"};function N(n,e){const t=I[n];return t?e(t):n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,o=>o.toUpperCase())}function K(n){return c(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function x(n,e){return n?Object.entries(n).flatMap(([t,o])=>{if(t.startsWith("__"))return[];const i=K(o);return i?[{key:t,label:N(t,e),value:i}]:[]}):[]}function M({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function S(n,e,t){const o=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t||t==="deco/github-mcp"&&i.app_id==="deco/mcp-github")&&h(i)===null);return o.length===0?null:(o.sort((i,r)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(r)?s(i)-s(r):(r.updated_at??"").localeCompare(i.updated_at??"")}),o[0].id)}function O(n){return n.server?.icons?.[0]?.src??b(n.server?.repository)??null}function w(n,e){const t=g(n._meta);return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function v(n){const e=[],t=new Map(n.connections.map(o=>[o.id,o]));for(const o of n.requirements){const i=n.curated[o.bindingType],r=i?n.itemsById[i.registryAppId]:n.itemsByName[o.bindingType];if(!r)continue;const s=n.configurationState?.[o.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,y=u?n.connectionReadiness?.[u]!==!1:!1,p=!!u&&y,f=p?void 0:n.saBindings?.[o.bindingType],l=p||!!f,d=p?"oauth":f?"sa":null,m=l&&_({bindingType:o.bindingType,boundVia:d,companionConfig:a?.configuration_state??null,cdConfig:n.configurationState??null});e.push({fieldKey:o.fieldKey,bindingType:o.bindingType,registryItem:r,title:w(r,o.bindingType),icon:O(r),headline:i?.headline??g(r._meta)?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:l,configured:m,required:C.has(o.bindingType),candidateConnectionId:l?null:u||S(n.connections,o.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:d,boundResource:f?.resource??null,connectedDetail:l?T({bindingType:o.bindingType,companionConfig:a?.configuration_state??null,cdConfig:n.configurationState??null}):null})}return e}function L(n,e){if(!n)return null;const t=i=>{const r=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return r===null?i:r.startsWith("www.")?r.substring(4):r},o=t(n);for(const i of e)if(t(i.siteUrl)===o)return i.siteUrl;return null}function V(n){return(n?.response?.accountSummaries??[]).map(o=>({account:o.account,options:(o.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${o.displayName})`}))}))}export{B as F,v as a,A as b,D as c,x as g,L as m,U as p,M as s,V as t,F as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aL as se,c as F,l as ae,j as ne,dF as oe,X as Y,o as W,K as I,a2 as X,m as re,b as ie,e as K,q as le,t as j,au as ce,d2 as J,$ as ue}from"./index-D3nJxkUH.js";import{u as de}from"./use-task-board-events-CELlAVyW.js";import{b as fe}from"./use-decopilot-events-qHiW0p1_.js";import{i as me}from"./AlertCircle-W5I8YW4R.js";import{aB as ge,aC as ye,aD as V,aE as ke,t as pe,aF as Ne,$ as _e,aG as he,W as Se,aH as Be}from"./agent-icon-DDAJOUrn.js";import{i as Ce}from"./CheckCircle-D_bJsyQG.js";import{s as Ee}from"./Image01-H-e_GJje.js";import{h as Te}from"./UserSquare-Bu4-Qdjg.js";import{C as G,c as Ae,d as be}from"./task-board-DH3h4Dr1.js";const xe=se("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function Ve(e){const t=F.c(8),{size:a,className:s}=e,n=a===void 0?16:a;let o;t[0]!==n?(o={width:n,height:n},t[0]=n,t[1]=o):o=t[1];let r;t[2]!==s?(r=ae("shrink-0 rounded-full object-cover",s),t[2]=s,t[3]=r):r=t[3];let c;return t[4]!==n||t[5]!==o||t[6]!==r?(c=ne.jsx("img",{src:oe,alt:"Super Agent",width:n,height:n,style:o,className:r}),t[4]=n,t[5]=o,t[6]=r,t[7]=c):c=t[7],c}function Ke(e,t){return{queryKey:I.taskBoardItems(e),refetchInterval:6e4,queryFn:async()=>{const{items:a}=await t.call("TASK_BOARD_ITEM_LIST",{});return{items:a}}}}function Ie(){const e=F.c(21),{org:t,locator:a}=Y(),s=W();let n;e[0]!==a?(n=I.taskBoardItems(a),e[0]=a,e[1]=n):n=e[1];const o=n;let r;e[2]!==a||e[3]!==s||e[4]!==o?(r=y=>{s.cancelQueries({queryKey:o}),s.setQueryData(o,u=>u&&{...u,items:u.items.some(g=>g.id===y.id)?u.items.map(g=>g.id===y.id?y:g):[y,...u.items]}),s.invalidateQueries({queryKey:I.taskBoardActivity(a,y.id)})},e[2]=a,e[3]=s,e[4]=o,e[5]=r):r=e[5];let c,f;e[6]!==s||e[7]!==o?(c=()=>{s.invalidateQueries({queryKey:o})},f=y=>{s.cancelQueries({queryKey:o}),s.setQueryData(o,u=>u&&{...u,items:u.items.filter(g=>g.id!==y)})},e[6]=s,e[7]=o,e[8]=c,e[9]=f):(c=e[8],f=e[9]);let i;e[10]!==t.slug||e[11]!==r||e[12]!==c||e[13]!==f?(i={orgSlug:t.slug,onUpdate:r,onResync:c,onDelete:f},e[10]=t.slug,e[11]=r,e[12]=c,e[13]=f,e[14]=i):i=e[14],de(i);let d;e[15]!==s||e[16]!==o?(d=y=>{const u=y.subject,g=y.data.status;s.cancelQueries({queryKey:o}),s.setQueryData(o,p=>p&&{...p,items:p.items.map(N=>N.threads.some(k=>k.threadId===u)?{...N,threads:N.threads.map(k=>k.threadId===u?{...k,status:g}:k)}:N)})},e[15]=s,e[16]=o,e[17]=d):d=e[17];let h;e[18]!==t.slug||e[19]!==d?(h={orgSlug:t.slug,onTaskStatus:d},e[18]=t.slug,e[19]=d,e[20]=h):h=e[20],fe(h)}function ze(){const e=F.c(9),{locator:t}=Y(),a=X();let s;e[0]!==t||e[1]!==a?(s=Ke(t,a),e[0]=t,e[1]=a,e[2]=s):s=e[2];const n=re(s);Ie();let o;e[3]!==n.data?.items?(o=n.data?.items??[],e[3]=n.data?.items,e[4]=o):o=e[4];let r;return e[5]!==n.error||e[6]!==n.isLoading||e[7]!==o?(r={items:o,isLoading:n.isLoading,error:n.error},e[5]=n.error,e[6]=n.isLoading,e[7]=o,e[8]=r):r=e[8],r}function We(){const e=F.c(70),{org:t,locator:a}=Y(),s=X(),n=W(),o=ie();let r;e[0]!==a?(r=I.taskBoardItems(a),e[0]=a,e[1]=r):r=e[1];const c=r;let f;e[2]!==n||e[3]!==c?(f=()=>n.invalidateQueries({queryKey:c}),e[2]=n,e[3]=c,e[4]=f):f=e[4];const i=f;let d;e[5]!==s?(d=l=>s.call("TASK_BOARD_ITEM_CREATE",l),e[5]=s,e[6]=d):d=e[6];let h;e[7]!==i||e[8]!==d?(h={mutationFn:d,onSuccess:i},e[7]=i,e[8]=d,e[9]=h):h=e[9];const y=K(h);let u;e[10]!==s?(u=l=>s.call("TASK_BOARD_ITEM_UPDATE",l),e[10]=s,e[11]=u):u=e[11];let g;e[12]!==n||e[13]!==c?(g=async l=>{await n.cancelQueries({queryKey:c});const _=n.getQueryData(c);return n.setQueryData(c,m=>m&&{...m,items:m.items.map(M=>M.id===l.id?{...M,...l,...l.status!==void 0&&l.status!==M.status&&{statusSince:new Date().toISOString()}}:M)}),{previous:_}},e[12]=n,e[13]=c,e[14]=g):g=e[14];let p;e[15]!==t?(p=(l,_)=>{_.status==="done"&&le("task_marked_done",{organization_id:t.id,task_board_item_id:_.id})},e[15]=t,e[16]=p):p=e[16];let N;e[17]!==n||e[18]!==c?(N=(l,_,m)=>{m?.previous&&n.setQueryData(c,m.previous)},e[17]=n,e[18]=c,e[19]=N):N=e[19];let k;e[20]!==i||e[21]!==a||e[22]!==n?(k=(l,_,m)=>{i(),n.invalidateQueries({queryKey:I.taskBoardActivity(a,m.id)})},e[20]=i,e[21]=a,e[22]=n,e[23]=k):k=e[23];let D;e[24]!==u||e[25]!==g||e[26]!==p||e[27]!==N||e[28]!==k?(D={mutationFn:u,onMutate:g,onSuccess:p,onError:N,onSettled:k},e[24]=u,e[25]=g,e[26]=p,e[27]=N,e[28]=k,e[29]=D):D=e[29];const Q=K(D);let S;e[30]!==s?(S=l=>s.call("TASK_BOARD_ITEM_DELETE",{id:l}),e[30]=s,e[31]=S):S=e[31];let B;e[32]!==i||e[33]!==o?(B=l=>{j.error(l instanceof Error&&l.message?l.message:o("taskBoard.taskBoard.deleteError")),i()},e[32]=i,e[33]=o,e[34]=B):B=e[34];let v;e[35]!==i||e[36]!==S||e[37]!==B?(v={mutationFn:S,onSuccess:i,onError:B},e[35]=i,e[36]=S,e[37]=B,e[38]=v):v=e[38];const $=K(v);let C;e[39]!==s?(C=async l=>{const _=await Promise.allSettled(l.map(m=>s.call("TASK_BOARD_ITEM_DELETE",{id:m})));return{total:l.length,failed:_.filter(De).length}},e[39]=s,e[40]=C):C=e[40];let E,T;e[41]!==o?(E=l=>{const{total:_,failed:m}=l;m!==0&&j.error(o("taskBoard.taskBoard.deleteBulkError",{failed:String(m),total:String(_)}))},T=()=>j.error(o("taskBoard.taskBoard.deleteError")),e[41]=o,e[42]=E,e[43]=T):(E=e[42],T=e[43]);let O;e[44]!==i||e[45]!==C||e[46]!==E||e[47]!==T?(O={mutationFn:C,onSuccess:E,onError:T,onSettled:i},e[44]=i,e[45]=C,e[46]=E,e[47]=T,e[48]=O):O=e[48];const U=K(O);let A;e[49]!==s?(A=l=>s.call("TASK_BOARD_ITEM_UPDATE",l),e[49]=s,e[50]=A):A=e[50];let R;e[51]!==i||e[52]!==A?(R={mutationFn:A,onSuccess:i},e[51]=i,e[52]=A,e[53]=R):R=e[53];const q=K(R);let b;e[54]!==s?(b=l=>s.call("TASK_BOARD_ITEM_RERUN",l),e[54]=s,e[55]=b):b=e[55];let x;e[56]!==i||e[57]!==a||e[58]!==n?(x=(l,_,m)=>{i(),n.invalidateQueries({queryKey:I.taskBoardActivity(a,m.id)})},e[56]=i,e[57]=a,e[58]=n,e[59]=x):x=e[59];let L;e[60]!==b||e[61]!==x?(L={mutationFn:b,onSettled:x},e[60]=b,e[61]=x,e[62]=L):L=e[62];const P=K(L);let w;return e[63]!==y||e[64]!==q||e[65]!==$||e[66]!==U||e[67]!==P||e[68]!==Q?(w={create:y,update:Q,remove:$,removeMany:U,link:q,rerun:P},e[63]=y,e[64]=q,e[65]=$,e[66]=U,e[67]=P,e[68]=Q,e[69]=w):w=e[69],w}function De(e){return e.status==="rejected"}const ve=["ended_after_delivery","superseded"];function Oe(e){return!!e&&ve.includes(e)}function Xe(e){return!(e.action==="status_changed"&&typeof e.data?.retry=="number")}function Je(e){return e.failureKind!=="superseded"}function Z(e){return e.threads.some(t=>t.status==="requires_action")}function Ze(e){return e.status==="in_review"&&!e.assigneeId}function et(e){return Z(e)}function tt(e){return e.status==="in_progress"&&Z(e)?"text-warning animate-pulse":te(e.status).iconClassName}function st(e){return e.threads.some(a=>a.status==="in_progress")?"running":e.threads.some(a=>a.status==="failed"&&!Oe(a.failureKind))?"failed":null}function at(e,t,a){const s=e.findIndex(d=>d.id===a),n=t===a?e[s+1]?.id??null:t,o=e.filter(d=>d.id!==a),r=n?o.findIndex(d=>d.id===n):-1,c=r===-1?o.length:r,f=o[c-1],i=o[c];return f&&i?(f.sortOrder+i.sortOrder)/2:f?f.sortOrder+1:i?i.sortOrder-1:0}function nt(e,t){return Array.from({length:t},(a,s)=>e-(t-1-s)*1e-4)}const Re=["archived"],ee={triage:{labelKey:"taskBoard.config.statusBacklog",icon:me,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:J,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:_e,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:Ee,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:Ne,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:Te,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:pe,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:Ce,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:ce,iconClassName:"text-muted-foreground"}},Le={icon:J,iconClassName:"text-muted-foreground"},we=ee;function te(e){return we[e]??Le}function ot(e,t){const a=ee[e];return{label:a?t(a.labelKey):e,visual:te(e)}}const rt=["bug","feature","chore","spike","security"],it={bug:{labelKey:"taskBoard.config.typeBug",icon:xe,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:Be,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:Se,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:he,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:ue,iconClassName:"text-purple-500"}};function H(e){return be.includes(e)}function lt(e){return G.filter(t=>e||!H(t))}function ct({deliveryEnabled:e,shownLanes:t,occupied:a}){const s=G.filter(r=>e||!H(r)||a.includes(r)),n=s.filter(r=>Re.includes(r)||!e&&H(r)),o=n.filter(r=>!t.includes(r));return{lanes:s.filter(r=>!o.includes(r)),hidden:o,hideable:n}}const z="lane:";function Me(e){return G.includes(e)}function ut({overId:e,statusOf:t}){if(e===void 0)return null;const a=String(e),s=a.startsWith(z)?a.slice(z.length):t(a);return s!==void 0&&Me(s)?s:null}function dt(e,t){return Math.max(0,Math.floor((t-Date.parse(e))/864e5))}const ft=["none","low","medium","high","urgent"],mt={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:V,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:ke,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:V,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:ye,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:ge,iconClassName:"text-destructive"}};function gt(e,t=Date.now()){const a=new Date(e).getTime();return Number.isNaN(a)?null:a<t?"overdue":a-t<=Fe*864e5?"soon":null}const Fe=3;function yt(e){return`color-mix(in oklab, ${e??Ae} var(--user-color-strength), transparent)`}export{Re as H,z as L,ft as P,Ve as S,rt as T,Ze as a,We as b,mt as c,it as d,yt as e,te as f,Xe as g,Je as h,Z as i,Oe as j,ee as k,ot as l,lt as m,st as n,ze as o,ct as p,et as q,nt as r,tt as s,Ke as t,Ie as u,at as v,ut as w,gt as x,dt as y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _,b as D,r as G,l as ee,j as s,fq as te,X as se,ad as ne,Z as ie,B as V,t as J,eJ as oe,dV as le,af as ae}from"./index-
|
|
1
|
+
import{c as _,b as D,r as G,l as ee,j as s,fq as te,X as se,ad as ne,Z as ie,B as V,t as J,eJ as oe,dV as le,af as ae}from"./index-D3nJxkUH.js";import{a as re,A as ce}from"./alert-BVj25ral.js";import{a as de,b as ue,c as F,d as fe,S as pe}from"./select-Cm7yNA4g.js";import{T as me,c as xe,a as ge,b as he}from"./tabs-0Iyv-61_.js";import{u as X}from"./use-copy-dcKlKJsJ.js";import{i as Y}from"./Check-0QivlcNy.js";import{a as Z}from"./Copy01-Dqk5v2W3.js";import{i as ye}from"./Key01-DS1cuydn.js";import{i as Ce}from"./Link01-Dgt626sr.js";import{C as je,a as be,b as ve}from"./client-icons-arblMDWm.js";import{u as we,a as Ne,A as $e}from"./api-keys-DPDO886h.js";import{R as ke}from"./require-capability-aOpAWwSZ.js";import"./index-DoX5CV5K.js";import"./ChevronUp-CzhJ7suW.js";import"./AlertCircle-W5I8YW4R.js";import"./Plus-G6ow2MLm.js";import"./Trash01-BO0o39cY.js";import"./alert-dialog-DXkQ7Ca0.js";import"./dialog-BlQDNCRy.js";import"./X-h03RFcZk.js";import"./input-DooV2Ahl.js";import"./label-E-Ho38zd.js";import"./use-mcp-client-D1zolVZP.js";import"./auth-DuH2btxq.js";import"./access-gate-BLDo8Aw2.js";import"./capability-load-error-CuhfXfl5.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,a6 as w,af as k,B as y}from"./index-
|
|
1
|
+
import{c as v,b as N,j as s,a6 as w,af as k,B as y}from"./index-D3nJxkUH.js";import{i as z}from"./X-h03RFcZk.js";import{aI as _,au as C}from"./agent-icon-DDAJOUrn.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 c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=c):c=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:[c,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let a;return t[10]!==o||t[11]!==i?(a=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=a):a=t[12],a}function M(){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 c;t[6]!==o?(c={Icon:w,label:o},t[6]=o,t[7]=c):c=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 a;t[12]!==n||t[13]!==c||t[14]!==i?(a=[n,c,i],t[12]=n,t[13]=c,t[14]=i,t[15]=a):a=t[15];const m=a;let d;t[16]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=d):d=t[16];let f;return t[17]!==m?(f=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[d,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(q)})]}),t[17]=m,t[18]=f):f=t[18],f}function q(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 R(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:c}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let a;e[0]!==o||e[1]!==r?(a=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]=a):a=e[2];let m,d;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"}),d=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=d):(m=e[3],d=e[4]);let f;e[5]!==i||e[6]!==l?(f=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]=f):f=e[7];let x;e[8]!==f?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,d,f]}),e[8]=f,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]!==c||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,c,g]}),e[12]=c,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(M,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==a||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[a,h,p]}),e[19]=a,e[20]=h,e[21]=j):j=e[21],j}function A(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:c,children:r}=t,i=n||!l,a=l&&!n?r:null;let m;return e[0]!==o||e[1]!==c||e[2]!==i||e[3]!==a?(m=s.jsxs(y,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal py-3 text-center text-base font-medium leading-tight",onClick:c,disabled:i,children:[o,a]}),e[0]=o,e[1]=c,e[2]=i,e[3]=a,e[4]=m):m=e[4],m}export{R as C,A as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as o,bL as a,bM as t,ap as e,bN as i,bO as r,cU as p,dC as b,cQ as m}from"./index-
|
|
1
|
+
import{ao as o,bL as a,bM as t,ap as e,bN as i,bO as r,cU as p,dC as b,cQ as m}from"./index-D3nJxkUH.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 M,X as S,a2 as $,K as F,a7 as R,b as K,l as A,j as c,eJ as q}from"./index-
|
|
1
|
+
import{c as M,X as S,a2 as $,K as F,a7 as R,b as K,l as A,j as c,eJ as q}from"./index-D3nJxkUH.js";import{u as O}from"./useInfiniteQuery-BESYkBal.js";import{g as D}from"./connection-slug-CITJ0kGN.js";import{I as V}from"./integration-icon-_VlEmGlM.js";function W(t){const e=M.c(21),{org:s}=S(),o=$();let l;e[0]!==t?(l=t?.trim().split(/\s+/).filter(Boolean)??[],e[0]=t,e[1]=l):l=e[1];const r=l;let n;e[2]!==s.id||e[3]!==t?(n=F.storeDiscovery(s.id,`deco-json:${t??""}`),e[2]=s.id,e[3]=t,e[4]=n):n=e[4];let a;e[5]!==o||e[6]!==r?(a=I=>{const{pageParam:_}=I;return o.call("COLLECTION_REGISTRY_APP_LIST",{limit:24,cursor:_,where:r.length?{operator:"or",conditions:r.flatMap(B)}:void 0})},e[5]=o,e[6]=r,e[7]=a):a=e[7];let u;e[8]!==n||e[9]!==a?(u={queryKey:n,queryFn:a,initialPageParam:void 0,getNextPageParam:z,staleTime:3e5,placeholderData:R,throwOnError:!0},e[8]=n,e[9]=a,e[10]=u):u=e[10];const i=O(u);let p;e[11]!==i.data?.pages?(p=i.data?.pages.flatMap(Y)??[],e[11]=i.data?.pages,e[12]=p):p=e[12];const m=p;let f;e[13]!==i?(f=()=>{i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},e[13]=i,e[14]=f):f=e[14];let d;return e[15]!==m||e[16]!==i.hasNextPage||e[17]!==i.isFetchingNextPage||e[18]!==i.isLoading||e[19]!==f?(d={items:m,hasMore:i.hasNextPage,isLoadingMore:i.isFetchingNextPage,isInitialLoading:i.isLoading,loadMore:f},e[15]=m,e[16]=i.hasNextPage,e[17]=i.isFetchingNextPage,e[18]=i.isLoading,e[19]=f,e[20]=d):d=e[20],d}function Y(t){return t.items}function z(t){return t.nextCursor}function B(t){return[["title"],["description"],["id"],["server","name"]].map(e=>({field:e,operator:"contains",value:t}))}function Z(t){const e=new Map;for(const l of t){const r=D(l),n=e.get(r);n?n.push(l):e.set(r,[l])}const s=[],o=new Set;for(const l of t){const r=D(l);if(o.has(r))continue;o.add(r);const n=e.get(r),a=n[0];n.length===1?s.push({type:"single",connection:a}):s.push({type:"group",key:r,icon:a.icon,title:a.app_name?a.title.replace(/\s*\(\d+\)\s*$/,""):a.title,connections:n})}return s}function ee(t){const e=M.c(43),{connection:s,onClick:o,headerActions:l,headerActionsAlwaysVisible:r,footer:n,className:a,fallbackIcon:u,selected:i}=t,p=r===void 0?!1:r,m=K(),f=o&&"cursor-pointer hover:bg-muted/50";let d;e[0]!==a||e[1]!==f?(d=A("transition-colors group overflow-hidden flex flex-col h-full",f,a),e[0]=a,e[1]=f,e[2]=d):d=e[2];const I=o?"button":void 0,_=o?0:void 0,T=o&&i!==void 0?i:void 0;let g;e[3]!==o?(g=o?L=>{L.target===L.currentTarget&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),o())}:void 0,e[3]=o,e[4]=g):g=e[4];let x;e[5]!==s.icon||e[6]!==s.title||e[7]!==u?(x=c.jsx(V,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:u}),e[5]=s.icon,e[6]=s.title,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==p?(h=l&&c.jsx("div",{className:A("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:J,children:l}),e[9]=l,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==h?(v=c.jsx("div",{className:"relative",children:h}),e[12]=h,e[13]=v):v=e[13];let N;e[14]!==v||e[15]!==x?(N=c.jsxs("div",{className:"flex items-start justify-between",children:[x,v]}),e[14]=v,e[15]=x,e[16]=N):N=e[16];let y;e[17]!==s.title?(y=c.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[17]=s.title,e[18]=y):y=e[18];let P;e[19]!==s.description||e[20]!==m?(P=s.description||m("connections.connectionCard.noDescription"),e[19]=s.description,e[20]=m,e[21]=P):P=e[21];let j;e[22]!==P?(j=c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=j):j=e[23];let C;e[24]!==y||e[25]!==j?(C=c.jsxs("div",{className:"flex flex-col gap-1",children:[y,j]}),e[24]=y,e[25]=j,e[26]=C):C=e[26];let b;e[27]!==N||e[28]!==C?(b=c.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,C]}),e[27]=N,e[28]=C,e[29]=b):b=e[29];let k;e[30]!==n?(k=n&&c.jsx("div",{className:"border-t border-border mt-auto",children:c.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:G,children:n})}),e[30]=n,e[31]=k):k=e[31];let w;e[32]!==b||e[33]!==k?(w=c.jsxs("div",{className:"flex flex-col flex-1",children:[b,k]}),e[32]=b,e[33]=k,e[34]=w):w=e[34];let E;return e[35]!==o||e[36]!==w||e[37]!==d||e[38]!==I||e[39]!==_||e[40]!==T||e[41]!==g?(E=c.jsx(q,{className:d,onClick:o,role:I,tabIndex:_,"aria-pressed":T,onKeyDown:g,children:w}),e[35]=o,e[36]=w,e[37]=d,e[38]=I,e[39]=_,e[40]=T,e[41]=g,e[42]=E):E=e[42],E}function G(t){return t.stopPropagation()}function J(t){return t.stopPropagation()}export{ee as C,Z as g,W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as ve,bN as Oe,bO as Me,ap as de,bM as ze,c as U,b as V,j as t,h as Ne,B,r as Z,l as Se,X as te,a2 as Ee,D as me,K as ee,d as se,p as ye,af as Ce,eJ as Re,n as Ue,f4 as ue,R as Fe,I as Ve,F as Le,H as Be,G as xe,E as Ge,f as qe,fd as He,o as Ke,an as Xe,am as Qe,t as J}from"./index-BUsd5vyL.js";import{g as We}from"./extract-connection-data-Bf1KweVH.js";import{E as _e}from"./empty-state-DwT2yPBl.js";import{E as Ye,c as Je,r as Ze,b as et,d as tt}from"./connection-form-helpers-BnHkbPOO.js";import{c as st,S as nt,D as it}from"./index-Cw3vmSDe.js";import{u as we,T as ot}from"./use-mcp-auth-status-BfVlKEEO.js";import{a as at}from"./use-members-CnAdIXEN.js";import{A as lt}from"./avatar-0ovcLe8b.js";import{a as Ie,b as ke,u as rt}from"./use-connection-CKRpxkSv.js";import{u as Te}from"./use-mcp-client-CG8sd7Ov.js";import{u as ct}from"./use-mcp-tools-rUvRF73D.js";import{a as dt}from"./use-mcp-prompts-D6GxlnK6.js";import{i as mt,a as ut}from"./mcp-oauth-pCVJlh0m.js";import{I as ae}from"./integration-icon-CE3zgH2m.js";import{s as xt}from"./Plus-D-aW7BG5.js";import{ba as pt,au as ft,bu as ht,p as ne,at as gt}from"./agent-icon-GDusCEJg.js";import{a as Ae,f as jt,s as bt}from"./Tool01-C5pi_vGi.js";import{s as re}from"./Trash01-DrcSVy6P.js";import{b as vt,a as Nt,c as St,S as yt,d as Ct}from"./sheet-CZBVpfdy.js";import{F as q,b as H,c as K,d as L,f as X,e as _t,a as wt}from"./form-CJazv5A2.js";import{I as W}from"./input-hVeLxGkN.js";import{u as It,D as kt}from"./use-delete-connection-CSRsZdqa.js";import{c as Tt,B as At,a as Pt,C as Dt}from"./monitoring-stats-row-CM0eJ-oE.js";import{d as $t,C as Ot,a as Mt}from"./chart-z9wY0-_H.js";import{b as zt}from"./repository-binding-B13LVmY3.js";import{T as ie,a as Et,c as oe,b as Rt}from"./tabs-DNrA3FC_.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{n as Ut}from"./ShoppingBag01-CuixQdYE.js";import{g as ce}from"./types-DxHf7m50.js";import{M as Ft}from"./mcp-app-renderer-Diq_XjH6.js";import{C as Vt}from"./collection-search-BdTXFJja.js";import{B as Lt}from"./badge-BGrZM0So.js";import{S as pe,b as fe,a as he,d as ge,c as G}from"./select-BmdOxcpM.js";import{i as Bt}from"./CheckCircle-BZhzC-Lq.js";import{t as Gt}from"./ChevronUp-BmwN74sN.js";import{c as qt}from"./UserSquare-DgkWkJkZ.js";import{s as Ht}from"./XClose-Dn0gx7Na.js";import{p as Kt,i as Xt}from"./connection-Cd7KAC3j.js";import"./metadata-D72DunRR.js";import"./Key01-t8EGrvYD.js";import"./auth-CALutWht.js";import"./index-CSZksa1l.js";import"./index-BCc2phaK.js";import"./index-CaV75E0f.js";import"./popover-Dw-ACWw4.js";import"./tooltip-BYRrMdTU.js";import"./index-DzvXOJ5M.js";import"./Check-DDyUnfea.js";import"./SearchMd-DevJYZC1.js";import"./use-mobile-D4eGDsYT.js";import"./use-create-virtual-mcp-CxAkX5Jw.js";import"./use-navigate-to-agent-Bi-jClYv.js";import"./thread-intent-CpofUpw9.js";import"./backoff-8mStPHYB.js";import"./task-board-j2guF3qd.js";import"./schema-DCW8VMPg.js";import"./slugify-CEUa2lfQ.js";import"./Image01-DsgyycUs.js";import"./use-org-auth-client-DOudeu1v.js";import"./User01-D8tGA0Jb.js";import"./AlertCircle-D0TICR09.js";import"./ArrowUp-C_r8kJvP.js";import"./ArrowLeft-Dv3ikfi_.js";import"./ArrowRight-BQg5v3sE.js";import"./ZoomOut-B4sCUtCp.js";import"./Palette-DM4OkfOP.js";import"./Copy01-Bi7e8qbR.js";import"./CreditCard01-BlzZxZGz.js";import"./DotsVertical-CRH2eH5L.js";import"./Link01-DzFHL2_V.js";import"./LinkExternal01-DBlSGtF-.js";import"./Monitor01-Dvmyu6xs.js";import"./Sun-BWHbsIL3.js";import"./Upload01-pJceAyOc.js";import"./Users01-BSBGKa20.js";import"./X-A-UL58H4.js";import"./label-Dt_HMVkI.js";import"./alert-dialog-HLOSkZOB.js";import"./CartesianChart-B5NKYnaV.js";import"./XAxis-D89vWOWA.js";import"./AreaChart-CUuPNxtW.js";import"./ErrorBarContext-VP9i5poF.js";import"./Sector-CKl2jljC.js";const Qt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Wt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Qt}];function Yt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=V();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(pt,{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(ft,{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 Jt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,a=V();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 Zt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,d=V();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(xt,{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(Jt,{instance:_,onConfigure:c}),children:t.jsx(Yt,{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 es(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 ts=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ss(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 ns={calls:{label:"Tool calls"},errors:{label:"Errors"}};function is(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=V(),l=Ee(),o=ss(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=es(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:ns,className:"h-16 w-full",children:t.jsxs(At,{data:m,barCategoryGap:"4%",children:[t.jsx(Ot,{content:t.jsx(Mt,{labelFormatter:ls}),cursor:{fill:"var(--muted)"}}),t.jsx(Pt,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:m.map(as)})]})}),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(os)})]})]})}function os(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 as(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 ls(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function rs(){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 cs(s){const e=U.c(22),{connectionId:n}=s,c=V(),[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=ts.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 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(rs,{}),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(is,{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 ds(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 ms(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(ds,{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 us(s){const e=U.c(13),{connection:n}=s,c=V(),{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(ms,{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 xs(s){const e=U.c(35),{tools:n,connectionId:c,org:a}=s,i=V(),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(ps),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(Vt,{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(ot,{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 ps(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=V();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 fs(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=V(),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(js),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 Q;return e[20]!==T||e[21]!==F?(Q=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[T,F]}),e[20]=T,e[21]=F,e[22]=Q):Q=e[22],Q}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(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: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(xs,{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(gs):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(hs):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 hs(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(ht,{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 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(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(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 js(s){return ce(s._meta)}function bs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,a=c??n.title;let i;e[0]!==n.icon||e[1]!==a?(i=t.jsx(ae,{icon:n.icon,name:a,size:"md",className:"shrink-0"}),e[0]=n.icon,e[1]=a,e[2]=i):i=e[2];let l;e[3]!==a?(l=t.jsx(Ue.Title,{children:a}),e[3]=a,e[4]=l):l=e[4];let o;e[5]!==n.description?(o=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=o):o=e[6];let r;e[7]!==l||e[8]!==o?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,o]}),e[7]=l,e[8]=o,e[9]=r):r=e[9];let d;return e[10]!==i||e[11]!==r?(d=t.jsxs("div",{className:"flex items-center px-4 md:px-8 bg-background border-b border-border shrink-0 gap-3 py-4",children:[i,r]}),e[10]=i,e[11]=r,e[12]=d):d=e[12],d}function vs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=V(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Fe(),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?Kt(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(q,{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(L,{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(G,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(G,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(G,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(G,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(q,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(L,{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(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(G,{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(G,{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(G,{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(G,{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(G,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),l==="NPX"&&t.jsx(q,{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(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(q,{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(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(q,{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(L,{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(X,{})]})})]}),t.jsx(q,{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(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(q,{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(L,{children:t.jsx(Ye,{value:x.value??[],onChange:x.onChange})}),t.jsx(X,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(q,{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(Le,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Lt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Gt,{size:12})]})})}),t.jsxs(Be,{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 hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{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(X,{})]})})]})}function Ns(s){return s.command==="npx"}function Ss(s){return s.args?.find(e=>!e.startsWith("-"))??""}function ys(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=Ze(c.envVars);if(Ns(c)){const l=Ss(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=ys(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 Cs(s){let e,n=null,c=null,a=null;return s.ui_type==="NPX"?(e="STDIO",n="",a=et(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",a=tt(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 _s({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=V(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Ke(),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}=at(),_=C?.data?.members??[],$=h??s,w=_.find(f=>f.userId===$.created_by),A=s?.connection_type==="VIRTUAL"||y.isAuthenticated,O={...s,tools:a},k=st(O,Wt),v=Xe({resolver:Qe(Je),values:be(h??s)}),b=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const N=v.getValues(),T=Cs(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 ut({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 Q=new URL(`/api/${p.slug}/mcp/${f}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(Q.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(lt,{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(q,{control:v.control,name:"title",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(W,{...f})}),t.jsx(X,{})]})}),t.jsx(q,{control:v.control,name:"description",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(W,{...f,value:f.value||""})}),t.jsx(X,{})]})})]}),t.jsx(vs,{form:v,connection:h??s,hasOAuthToken:y.hasOAuthToken,onReauthenticate:P,onRemoveOAuth:R}),t.jsx(nt,{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(it,{children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(bs,{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(cs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Zt,{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=We("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 Q=new URL(`/api/${p.slug}/mcp/${F}`,window.location.origin),Y=await mt({url:Q.href,token:null,orgId:p.id});Y.supportsOAuth&&!Y.isAuthenticated&&await I(F)}finally{S(!1)}}}),t.jsx(us,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(fs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function ws(){const s=U.c(52),e=V();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}=qe(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=rt(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}=ct(j);let y;if(s[10]!==m?.tools||s[11]!==p||s[12]!==u||s[13]!==S){const I=S?S.tools.map(Ds):(m?.tools??[]).map(Ps);e:{if(u.length<=1){y=I;break e}const P=new Set,R=[],f=Ts;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:$}=dt(_);let w;s[17]!==g?(w={client:g},s[17]=g,s[18]=w):w=s[18];const{data:M}=He(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(ks),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(Is),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(_s,{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 Is(s){return{name:s.name,description:s.description,uri:s.uri}}function ks(s){return{name:s.name,description:s.description}}function Ts(s){return(s??[]).map(As)}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}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(){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(ws,{})})}),s[0]=e):e=s[0],e}function di(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx($s,{}),s[0]=e):e=s[0],e}export{di as default};
|
|
1
|
+
import{ao as ve,bN as Oe,bO as Me,ap as de,bM as ze,c as U,b as V,j as t,h as Ne,B,r as Z,l as Se,X as te,a2 as Ee,D as me,K as ee,d as se,p as ye,af as Ce,eJ as Re,n as Ue,f4 as ue,R as Fe,I as Ve,F as Le,H as Be,G as xe,E as Ge,f as qe,fd as He,o as Ke,an as Xe,am as Qe,t as J}from"./index-D3nJxkUH.js";import{g as We}from"./extract-connection-data-Dl3xTxEv.js";import{E as _e}from"./empty-state-B_enrvzQ.js";import{E as Ye,c as Je,r as Ze,b as et,d as tt}from"./connection-form-helpers-BzQl_S_0.js";import{c as st,S as nt,D as it}from"./index-B2gHFpgf.js";import{u as we,T as ot}from"./use-mcp-auth-status-B7Q0d1M3.js";import{a as at}from"./use-members-DjceQbih.js";import{A as lt}from"./avatar-DmQG-hQB.js";import{a as Ie,b as ke,u as rt}from"./use-connection-CTvqDLuq.js";import{u as Te}from"./use-mcp-client-D1zolVZP.js";import{u as ct}from"./use-mcp-tools-ULbfd_2A.js";import{a as dt}from"./use-mcp-prompts-CXqK-JUB.js";import{i as mt,a as ut}from"./mcp-oauth-DyAthDLR.js";import{I as ae}from"./integration-icon-_VlEmGlM.js";import{s as xt}from"./Plus-G6ow2MLm.js";import{ba as pt,au as ft,bu as ht,p as ne,at as gt}from"./agent-icon-DDAJOUrn.js";import{a as Ae,f as jt,s as bt}from"./Tool01-DcMZ63HP.js";import{s as re}from"./Trash01-BO0o39cY.js";import{b as vt,a as Nt,c as St,S as yt,d as Ct}from"./sheet-Cl5ZHtDF.js";import{F as q,b as H,c as K,d as L,f as X,e as _t,a as wt}from"./form-UBiksyOk.js";import{I as W}from"./input-DooV2Ahl.js";import{u as It,D as kt}from"./use-delete-connection-Dikm5L9q.js";import{c as Tt,B as At,a as Pt,C as Dt}from"./monitoring-stats-row-1HHAYUXJ.js";import{d as $t,C as Ot,a as Mt}from"./chart-C0rHs96w.js";import{b as zt}from"./repository-binding-DFSnpl0R.js";import{T as ie,a as Et,c as oe,b as Rt}from"./tabs-0Iyv-61_.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{n as Ut}from"./ShoppingBag01-B8MyeZ-e.js";import{g as ce}from"./types-Ulhrp9MO.js";import{M as Ft}from"./mcp-app-renderer-BFl5mLWM.js";import{C as Vt}from"./collection-search-BR1v6pag.js";import{B as Lt}from"./badge-D1Fgp4NK.js";import{S as pe,b as fe,a as he,d as ge,c as G}from"./select-Cm7yNA4g.js";import{i as Bt}from"./CheckCircle-D_bJsyQG.js";import{t as Gt}from"./ChevronUp-CzhJ7suW.js";import{c as qt}from"./UserSquare-Bu4-Qdjg.js";import{s as Ht}from"./XClose-ZLANuUvR.js";import{p as Kt,i as Xt}from"./connection-BPXrZQ_h.js";import"./metadata-D72DunRR.js";import"./Key01-DS1cuydn.js";import"./auth-DuH2btxq.js";import"./index-DeLPC3i4.js";import"./index-BVU6INgi.js";import"./index-I6oftDSE.js";import"./popover-D5x-U1ly.js";import"./tooltip-DNXq5NQC.js";import"./index-DoX5CV5K.js";import"./Check-0QivlcNy.js";import"./SearchMd-BVf9Tbqw.js";import"./use-mobile-C1Sz5IA3.js";import"./use-create-virtual-mcp-BN2MIpEF.js";import"./use-navigate-to-agent-B9IjIXwZ.js";import"./thread-intent-BE88qyQp.js";import"./backoff-8mStPHYB.js";import"./task-board-DH3h4Dr1.js";import"./schema-B6UkojL_.js";import"./slugify-CEUa2lfQ.js";import"./Image01-H-e_GJje.js";import"./use-org-auth-client-BV5jhMTD.js";import"./User01-DU_G2Tq0.js";import"./AlertCircle-W5I8YW4R.js";import"./ArrowUp-Bd_AtNgp.js";import"./ArrowLeft-CoetlmPD.js";import"./ArrowRight-B6-T90AD.js";import"./ZoomOut-CXHZqqpc.js";import"./Palette-Cz5AUPN9.js";import"./Copy01-Dqk5v2W3.js";import"./CreditCard01-HKMBsj25.js";import"./DotsVertical-Dt97OOeo.js";import"./Link01-Dgt626sr.js";import"./LinkExternal01-Dlk0nKfP.js";import"./Monitor01-DHA0hU52.js";import"./Sun-C4sxcfO_.js";import"./Upload01-CefHvaCG.js";import"./Users01-CJcsigwj.js";import"./X-h03RFcZk.js";import"./label-E-Ho38zd.js";import"./alert-dialog-DXkQ7Ca0.js";import"./CartesianChart-uPbdCEcC.js";import"./XAxis-Bf0SUwAM.js";import"./AreaChart-DGWCvfZx.js";import"./ErrorBarContext-CBQsrfDW.js";import"./Sector-CCB9pQmC.js";const Qt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Wt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Qt}];function Yt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=V();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(pt,{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(ft,{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 Jt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,a=V();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 Zt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,d=V();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(xt,{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(Jt,{instance:_,onConfigure:c}),children:t.jsx(Yt,{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 es(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 ts=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ss(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 ns={calls:{label:"Tool calls"},errors:{label:"Errors"}};function is(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=V(),l=Ee(),o=ss(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=es(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:ns,className:"h-16 w-full",children:t.jsxs(At,{data:m,barCategoryGap:"4%",children:[t.jsx(Ot,{content:t.jsx(Mt,{labelFormatter:ls}),cursor:{fill:"var(--muted)"}}),t.jsx(Pt,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:m.map(as)})]})}),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(os)})]})]})}function os(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 as(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 ls(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function rs(){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 cs(s){const e=U.c(22),{connectionId:n}=s,c=V(),[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=ts.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 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(rs,{}),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(is,{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 ds(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 ms(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(ds,{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 us(s){const e=U.c(13),{connection:n}=s,c=V(),{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(ms,{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 xs(s){const e=U.c(35),{tools:n,connectionId:c,org:a}=s,i=V(),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(ps),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(Vt,{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(ot,{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 ps(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=V();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 fs(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=V(),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(js),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 Q;return e[20]!==T||e[21]!==F?(Q=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[T,F]}),e[20]=T,e[21]=F,e[22]=Q):Q=e[22],Q}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(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: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(xs,{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(gs):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(hs):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 hs(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(ht,{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 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(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(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 js(s){return ce(s._meta)}function bs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,a=c??n.title;let i;e[0]!==n.icon||e[1]!==a?(i=t.jsx(ae,{icon:n.icon,name:a,size:"md",className:"shrink-0"}),e[0]=n.icon,e[1]=a,e[2]=i):i=e[2];let l;e[3]!==a?(l=t.jsx(Ue.Title,{children:a}),e[3]=a,e[4]=l):l=e[4];let o;e[5]!==n.description?(o=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=o):o=e[6];let r;e[7]!==l||e[8]!==o?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,o]}),e[7]=l,e[8]=o,e[9]=r):r=e[9];let d;return e[10]!==i||e[11]!==r?(d=t.jsxs("div",{className:"flex items-center px-4 md:px-8 bg-background border-b border-border shrink-0 gap-3 py-4",children:[i,r]}),e[10]=i,e[11]=r,e[12]=d):d=e[12],d}function vs({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=V(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Fe(),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?Kt(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(q,{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(L,{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(G,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(G,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(G,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(G,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(q,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(L,{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(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(G,{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(G,{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(G,{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(G,{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(G,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),l==="NPX"&&t.jsx(q,{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(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(q,{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(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(q,{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(L,{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(X,{})]})})]}),t.jsx(q,{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(L,{children:t.jsx(W,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...x,value:x.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(q,{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(L,{children:t.jsx(Ye,{value:x.value??[],onChange:x.onChange})}),t.jsx(X,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(q,{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(Le,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Lt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Gt,{size:12})]})})}),t.jsxs(Be,{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 hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{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(X,{})]})})]})}function Ns(s){return s.command==="npx"}function Ss(s){return s.args?.find(e=>!e.startsWith("-"))??""}function ys(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=Ze(c.envVars);if(Ns(c)){const l=Ss(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=ys(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 Cs(s){let e,n=null,c=null,a=null;return s.ui_type==="NPX"?(e="STDIO",n="",a=et(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",a=tt(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 _s({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=V(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Ke(),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}=at(),_=C?.data?.members??[],$=h??s,w=_.find(f=>f.userId===$.created_by),A=s?.connection_type==="VIRTUAL"||y.isAuthenticated,O={...s,tools:a},k=st(O,Wt),v=Xe({resolver:Qe(Je),values:be(h??s)}),b=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const N=v.getValues(),T=Cs(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 ut({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 Q=new URL(`/api/${p.slug}/mcp/${f}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(Q.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(lt,{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(q,{control:v.control,name:"title",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(W,{...f})}),t.jsx(X,{})]})}),t.jsx(q,{control:v.control,name:"description",render:({field:f})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(W,{...f,value:f.value||""})}),t.jsx(X,{})]})})]}),t.jsx(vs,{form:v,connection:h??s,hasOAuthToken:y.hasOAuthToken,onReauthenticate:P,onRemoveOAuth:R}),t.jsx(nt,{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(it,{children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(bs,{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(cs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Zt,{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=We("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 Q=new URL(`/api/${p.slug}/mcp/${F}`,window.location.origin),Y=await mt({url:Q.href,token:null,orgId:p.id});Y.supportsOAuth&&!Y.isAuthenticated&&await I(F)}finally{S(!1)}}}),t.jsx(us,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(fs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function ws(){const s=U.c(52),e=V();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}=qe(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=rt(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}=ct(j);let y;if(s[10]!==m?.tools||s[11]!==p||s[12]!==u||s[13]!==S){const I=S?S.tools.map(Ds):(m?.tools??[]).map(Ps);e:{if(u.length<=1){y=I;break e}const P=new Set,R=[],f=Ts;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:$}=dt(_);let w;s[17]!==g?(w={client:g},s[17]=g,s[18]=w):w=s[18];const{data:M}=He(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(ks),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(Is),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(_s,{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 Is(s){return{name:s.name,description:s.description,uri:s.uri}}function ks(s){return{name:s.name,description:s.description}}function Ts(s){return(s??[]).map(As)}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}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(){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(ws,{})})}),s[0]=e):e=s[0],e}function di(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx($s,{}),s[0]=e):e=s[0],e}export{di as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ao as R,bN as A,bO as I,ap as o,bM as j,bL as L,c as z,j as u,B as C}from"./index-
|
|
1
|
+
import{ao as R,bN as A,bO as I,ap as o,bM as j,bL as L,c as z,j as u,B as C}from"./index-D3nJxkUH.js";import{I as H}from"./input-DooV2Ahl.js";import{s as W}from"./Plus-G6ow2MLm.js";import{s as q}from"./Trash01-BO0o39cY.js";const K=R({key:o().min(1,"Key is required"),value:o()}),G=R({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:L(["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=z.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 J(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 Q(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,J as a,Q as b,G as c,Z as d,Y as i,F as p,D as r};
|