decocms 4.593.0 → 4.594.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BPb6lfDc.js → AlertCircle-CngNmW3n.js} +1 -1
- package/dist/client/assets/{AreaChart-Yh5pBNgF.js → AreaChart-w2QCUzTm.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D_px05Ip.js → ArrowLeft-7wIIyF4Y.js} +1 -1
- package/dist/client/assets/{ArrowRight-DYc-7xj5.js → ArrowRight-Dyuh-rXZ.js} +1 -1
- package/dist/client/assets/{ArrowUp-bsUZSt57.js → ArrowUp-C9hRfWJJ.js} +1 -1
- package/dist/client/assets/{BookOpen01-CKzuPfPT.js → BookOpen01-Bov9QL4X.js} +1 -1
- package/dist/client/assets/{CartesianChart-8sA8UDc5.js → CartesianChart-DZFTbe0Q.js} +1 -1
- package/dist/client/assets/{CategoricalChart-D0wEIkFu.js → CategoricalChart-BJA3WMzp.js} +1 -1
- package/dist/client/assets/{CheckCircle-Dvda272I.js → CheckCircle-C0mDI2jO.js} +1 -1
- package/dist/client/assets/{ChevronDown-C0zFtKr8.js → ChevronDown-Cz82ih9S.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BtbkxpS7.js → ChevronSelectorVertical-B_wf9OPd.js} +1 -1
- package/dist/client/assets/{ChevronUp-CHkdbh-i.js → ChevronUp-CLsy4_cr.js} +1 -1
- package/dist/client/assets/{CreditCard01-BnEtKIxX.js → CreditCard01-C7XdJQOf.js} +1 -1
- package/dist/client/assets/{Eye-CE9bd3Ra.js → Eye-BoMcImel.js} +1 -1
- package/dist/client/assets/{File02-OGn6eCfs.js → File02-BmbcQ1JX.js} +1 -1
- package/dist/client/assets/{Fingerprint04-ZnmHU3Kp.js → Fingerprint04-CeWGcIpe.js} +1 -1
- package/dist/client/assets/{Globe04-BK5-p2nj.js → Globe04-_51WnfFJ.js} +1 -1
- package/dist/client/assets/{Image01-Do_f-fPi.js → Image01-nL5rafgN.js} +1 -1
- package/dist/client/assets/{Key01-C2Ozqf6q.js → Key01-DPEcpDw6.js} +1 -1
- package/dist/client/assets/{LayoutLeft-tXOkIxzs.js → LayoutLeft-DFrTynS3.js} +1 -1
- package/dist/client/assets/{LinkBroken01-sFiApfPs.js → LinkBroken01-BPaKcMJ1.js} +1 -1
- package/dist/client/assets/{MessageCircle01-LN8Gr1lL.js → MessageCircle01-DEwhGd-N.js} +1 -1
- package/dist/client/assets/{Minus-vz8sJtmc.js → Minus-CZtTY14n.js} +1 -1
- package/dist/client/assets/{Monitor01-Ctq4Y9xp.js → Monitor01-Dzk9r8YI.js} +1 -1
- package/dist/client/assets/{Play-B5OMs0GO.js → Play-BNkIfSsq.js} +1 -1
- package/dist/client/assets/{Plus-KLH-MPJh.js → Plus-WQeLSh07.js} +1 -1
- package/dist/client/assets/{ReferenceLine-Hl32My8w.js → ReferenceLine-Kl_nxn9t.js} +1 -1
- package/dist/client/assets/{SearchMd-1p8IP99o.js → SearchMd-CrM5HGUz.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BZ5p5Jaw.js → ShoppingBag01-Dvi8noNw.js} +1 -1
- package/dist/client/assets/{Sun-8QBdDNyc.js → Sun-BUSaNVU-.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BRSeU65r.js → SwitchHorizontal01-HaaMuIs0.js} +1 -1
- package/dist/client/assets/{Tool01-CIkfFpNs.js → Tool01-9Nk8XcOI.js} +1 -1
- package/dist/client/assets/{Tooltip-B9ptxG-X.js → Tooltip--i_yceGL.js} +1 -1
- package/dist/client/assets/{Trash01-1e348d5z.js → Trash01-By8obgKt.js} +1 -1
- package/dist/client/assets/{TrendUp01-Sag3n7qI.js → TrendUp01-D-BYwryf.js} +1 -1
- package/dist/client/assets/{Upload01-DQiq1N5L.js → Upload01-BPnZnmHF.js} +1 -1
- package/dist/client/assets/{UserCheck01-Dq2vpnim.js → UserCheck01-CuByTN5F.js} +1 -1
- package/dist/client/assets/{UserSquare-BAlzvt_y.js → UserSquare-T90Jaoc-.js} +1 -1
- package/dist/client/assets/{Users01-CJNRoJXK.js → Users01-D1-vaLa3.js} +1 -1
- package/dist/client/assets/{XClose-CQjSvos9.js → XClose-Bomoew3H.js} +1 -1
- package/dist/client/assets/{Zap-BbT-W69e.js → Zap-lo-lOcPp.js} +1 -1
- package/dist/client/assets/{access-gate-BwaSQQ2b.js → access-gate-D9gT0mCZ.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-b9bCaaJ-.js → add-connection-dialog-Bn6L9Ywx.js} +1 -1
- package/dist/client/assets/agent-app-BBl0rE0n.js +1 -0
- package/dist/client/assets/{agent-assets-epUkCzig.js → agent-assets-BLuZ1J0l.js} +1 -1
- package/dist/client/assets/{agent-automation-DN5QlWy_.js → agent-automation-C0jF6GoO.js} +1 -1
- package/dist/client/assets/{agent-automations-DeGcvAoe.js → agent-automations-CIknlYgn.js} +1 -1
- package/dist/client/assets/agent-blog-Dz0ZGfFq.js +2 -0
- package/dist/client/assets/agent-blog-post-r0FRVJ6G.js +2 -0
- package/dist/client/assets/{agent-calendar-EBTKBv82.js → agent-calendar-eiAtEeXX.js} +1 -1
- package/dist/client/assets/{agent-capabilities-Dsy9OzBC.js → agent-capabilities-DWZ6HVp_.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-B2TM-6qo.js → agent-connect-sources-tGjfqQgF.js} +1 -1
- package/dist/client/assets/agent-deck-Bhm8TGFo.js +1 -0
- package/dist/client/assets/{agent-e2e-DMK6Z36v.js → agent-e2e-ba5rV3St.js} +1 -1
- package/dist/client/assets/agent-experiments-D8dPEPBA.js +1 -0
- package/dist/client/assets/agent-file-n_x6LXzO.js +1 -0
- package/dist/client/assets/{agent-hosting-DOLRQkiF.js → agent-hosting-D6vOkjJV.js} +1 -1
- package/dist/client/assets/{agent-icon-CFsULo4q.js → agent-icon-zvo6Zsex.js} +1 -1
- package/dist/client/assets/agent-library-BM2Fah9h.js +1 -0
- package/dist/client/assets/agent-library-file-BO40iakQ.js +1 -0
- package/dist/client/assets/agent-overview-CJRKK7hh.js +1 -0
- package/dist/client/assets/agent-releases-CjP_903O.js +3 -0
- package/dist/client/assets/agent-settings-CE2XV9z9.js +1 -0
- package/dist/client/assets/{agent-site-editor-BiguEz5z.js → agent-site-editor-CRCOwi7y.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-1w7lcxGQ.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BU4N-bBf.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-D9XYlGea.js +1 -0
- package/dist/client/assets/agent-view-B4jYgL5h.js +1 -0
- package/dist/client/assets/{agent-view-guard-BRen2fDa.js → agent-view-guard-DupPwYUR.js} +1 -1
- package/dist/client/assets/{ai-providers-X4uIftAC.js → ai-providers-P9lSOFin.js} +1 -1
- package/dist/client/assets/{alert-D6c8UL8s.js → alert-QfzOpdUg.js} +1 -1
- package/dist/client/assets/{analytics-sections-BeagNbn2.js → analytics-sections-at8BigEj.js} +1 -1
- package/dist/client/assets/api-keys-BoLbPekZ.js +1 -0
- package/dist/client/assets/{api-keys-Bhaq6l4m.js → api-keys-yj-YvHdL.js} +1 -1
- package/dist/client/assets/app-editor-CALR-Eh0.js +1 -0
- package/dist/client/assets/{asset-utils-DedHJB9N.js → asset-utils-BDYUvtkF.js} +1 -1
- package/dist/client/assets/{auth-WUI0GELm.js → auth--2gxCib9.js} +1 -1
- package/dist/client/assets/{auth-catchall-36sTseza.js → auth-catchall-BwHg1hCN.js} +1 -1
- package/dist/client/assets/{auth-entry-BtvDZBee.js → auth-entry-8MjIvWkA.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DbgIe7Q7.js → auth-split-layout-DP2m0wm-.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D7yFnk3v.js → authenticate-and-persist-oauth-GGQFCWKI.js} +1 -1
- package/dist/client/assets/{automation-list-row-B-bTXdxL.js → automation-list-row-BJoBOS8m.js} +1 -1
- package/dist/client/assets/{automation-runs-DTOCdqSY.js → automation-runs-ComF4nUM.js} +1 -1
- package/dist/client/assets/{automations-BXXmJoq9.js → automations-C5fxNUIr.js} +1 -1
- package/dist/client/assets/{badge-xkOOGTR2.js → badge-Di6qp_17.js} +1 -1
- package/dist/client/assets/{block-document-ClS1Gx3q.js → block-document-D7KablrH.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-BOiyLqjl.js → blocks-preview-workspace-context-JYcUL0TS.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-Dgkd6bcn.js → blocks-tab-states-D8VyxdkW.js} +1 -1
- package/dist/client/assets/blog-preview-url-DwcMPB8a.js +1 -0
- package/dist/client/assets/blog-schema-Dhm1FJA9.js +1 -0
- package/dist/client/assets/blog-source-gate-B93Jk1n3.js +1 -0
- package/dist/client/assets/{blog-view-gate-DYONh8sE.js → blog-view-gate-BDjHkxlS.js} +1 -1
- package/dist/client/assets/{buckets-W8OuOQja.js → buckets-DAeP-NAt.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-7R1He4iw.js → build-improve-prompt-doc-WLZ-Q0Fx.js} +1 -1
- package/dist/client/assets/{calendar-CCy2brqO.js → calendar-CqkLsAo9.js} +1 -1
- package/dist/client/assets/{capability-load-error-74rIpav9.js → capability-load-error-j4JpxktV.js} +1 -1
- package/dist/client/assets/category-editor-BblvA1zP.js +1 -0
- package/dist/client/assets/category-tree-DSsAlLjn.js +18 -0
- package/dist/client/assets/{chart-DVwx0iDS.js → chart-BZy9kWyI.js} +1 -1
- package/dist/client/assets/{chat-context-Dk_Ebz6D.js → chat-context-CxkYg5uT.js} +1 -1
- package/dist/client/assets/{chat-draft-x-F0ZPWu.js → chat-draft-DzaoNZT_.js} +1 -1
- package/dist/client/assets/{checkbox-DR00CmJr.js → checkbox-C-dWRGEo.js} +1 -1
- package/dist/client/assets/{choose-editor-3geZkU-m.js → choose-editor-DS4c61th.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CX_XFx5r.js → cli-auth-success-DV77yJjs.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DaqJeGro.js +1 -0
- package/dist/client/assets/{cms-store-drafts-BdqXOATK.js → cms-store-drafts-5dkWWhlw.js} +1 -1
- package/dist/client/assets/{collapsible-C5AFdLwb.js → collapsible-BSD-rIyq.js} +1 -1
- package/dist/client/assets/{collection-detail-DJYxfZho.js → collection-detail-wkxjhC55.js} +1 -1
- package/dist/client/assets/{collection-display-button-BS2sbab3.js → collection-display-button-JBmYQ-27.js} +1 -1
- package/dist/client/assets/{collection-search-ugxEd4a5.js → collection-search-BpNjeFlC.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-omwG60bs.js → collection-table-wrapper-BmrrNnjL.js} +1 -1
- package/dist/client/assets/{collection-tabs-BsiuG_yk.js → collection-tabs-CmuugrOY.js} +1 -1
- package/dist/client/assets/{combobox-BYBZebi0.js → combobox-D_fSr7_C.js} +1 -1
- package/dist/client/assets/{command-CRJnywSm.js → command-CwP4XJhp.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-C5X6hxKV.js → companion-mcps-section-CG0lncr5.js} +1 -1
- package/dist/client/assets/{config-Br1Io2is.js → config-4NBdyaeh.js} +1 -1
- package/dist/client/assets/{connect-BvcW8HFx.js → connect-ChCcHtpb.js} +1 -1
- package/dist/client/assets/{connect-key-Bng8UgOW.js → connect-key-CJ6TvBP8.js} +1 -1
- package/dist/client/assets/{connect-layout-BK-aWbrg.js → connect-layout-DTpwfpPI.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-D8TZSkBE.js → connect-source-dialog-_ChBZ2Vd.js} +1 -1
- package/dist/client/assets/{connection-C7PBWSJ2.js → connection-DezKWiQc.js} +1 -1
- package/dist/client/assets/{connection-card-DbjUpBUS.js → connection-card-CxiJ1Nzx.js} +1 -1
- package/dist/client/assets/{connection-detail-FZzRV6Ym.js → connection-detail-CYCmhAUL.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-tAcDvyB7.js → connection-form-helpers-UXeTmEmu.js} +1 -1
- package/dist/client/assets/{connection-slug-xMtStNjP.js → connection-slug-DWaKdRBx.js} +1 -1
- package/dist/client/assets/{connections-IQMsafFW.js → connections-Bc9bEkOC.js} +1 -1
- package/dist/client/assets/{content-tab-Dby-qF-f.js → content-tab-ChWZ09d_.js} +4 -4
- package/dist/client/assets/{context-jsYDuqDI.js → context-1XEBvNOV.js} +1 -1
- package/dist/client/assets/{context-menu-Cvn-dR-4.js → context-menu-haKBWhFK.js} +1 -1
- package/dist/client/assets/{context-shell-Bm22btDj.js → context-shell-DApzBqkB.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-CXfqVYbt.js → create-organization-dialog-BXvqxw2I.js} +1 -1
- package/dist/client/assets/{daily-pulse-CxBxkzGT.js → daily-pulse-Dpm7YKyw.js} +1 -1
- package/dist/client/assets/{delete-copy-tGyXeEYr.js → delete-copy-L_pixdww.js} +2 -2
- package/dist/client/assets/{device-hint-D3KIwRP_.js → device-hint-DfNddHqx.js} +1 -1
- package/dist/client/assets/{discover-UPogBeQB.js → discover-CDF3_FOL.js} +1 -1
- package/dist/client/assets/{domain-settings-DarbfYc3.js → domain-settings-SR0-GydA.js} +1 -1
- package/dist/client/assets/{drawer-CQosC7Hh.js → drawer-CmJXwXhP.js} +1 -1
- package/dist/client/assets/{editor-classes-CiUorYg6.js → editor-classes-C_k7lpha.js} +1 -1
- package/dist/client/assets/{editor-DnZdk2c2.js → editor-stZYyxdg.js} +1 -1
- package/dist/client/assets/{empty-state-D4GKvYHp.js → empty-state-BP4JRDLR.js} +1 -1
- package/dist/client/assets/{empty-state-B5kfNSn2.js → empty-state-DlNabApi.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BNwFp10h.js → experiments-tab-choice-DZp7Pnbi.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BwsA-RYq.js → extract-connection-data-CzqnFJl9.js} +1 -1
- package/dist/client/assets/{feature-gate-WGXGW3TJ.js → feature-gate-C_eiJnqB.js} +1 -1
- package/dist/client/assets/{feature-paywall-CXj-cCjT.js → feature-paywall-CBOn7yV2.js} +1 -1
- package/dist/client/assets/{file-explorer-CQ0OZXxU.js → file-explorer-BrZ-CG01.js} +1 -1
- package/dist/client/assets/{file-preview-CimYREH1.js → file-preview-PTP8hmPn.js} +1 -1
- package/dist/client/assets/{file-share-button-BAqDjZ0D.js → file-share-button-BegoNidK.js} +1 -1
- package/dist/client/assets/{file-type-icon-Cst2WgHg.js → file-type-icon-M87xyG0K.js} +1 -1
- package/dist/client/assets/{folder-icon-h8_LtFFJ.js → folder-icon-Dcx7O7hC.js} +1 -1
- package/dist/client/assets/{form-Bmlz7qRb.js → form-CJTkS9yd.js} +1 -1
- package/dist/client/assets/{frame-navigation-DiMr25uz.js → frame-navigation-BZ8W_2dq.js} +1 -1
- package/dist/client/assets/{gateway-client-Dcj5rv8f.js → gateway-client-zPU6BhGI.js} +1 -1
- package/dist/client/assets/{general-BTp6LTq7.js → general-CvWpV1rC.js} +1 -1
- package/dist/client/assets/{github-icon-HoxHOYky.js → github-icon-D3IlXxDN.js} +1 -1
- package/dist/client/assets/{held-block-view-CB9_UtVc.js → held-block-view-CEue5DyE.js} +1 -1
- package/dist/client/assets/{home-CTP0vpaw.js → home-CBhOYnUz.js} +1 -1
- package/dist/client/assets/{home-overview-oJuOP6Jj.js → home-overview-nMDmkNSh.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DipRdTAf.js → hosted-reconcile-CC64pDxA.js} +1 -1
- package/dist/client/assets/{icon-button-CkP-MdlY.js → icon-button-C9InOUgM.js} +1 -1
- package/dist/client/assets/{index-oZBvLpfd.js → index-B6vsr4i3.js} +1 -1
- package/dist/client/assets/{index-CpqnzQ6X.js → index-B8ZkvDME.js} +1 -1
- package/dist/client/assets/{index-ztFBZP-a.js → index-BIBRRoOW.js} +1 -1
- package/dist/client/assets/{index-C4-rqYj_.js → index-BPvzZzln.js} +1 -1
- package/dist/client/assets/{index-D4nZeJZF.js → index-C-bUN66r.js} +1 -1
- package/dist/client/assets/index-CFbcObvG.css +1 -0
- package/dist/client/assets/{index-Dj_uCaww.js → index-CY-w4kYr.js} +1 -1
- package/dist/client/assets/{index-DGcnGUGR.js → index-Cdf0nHrK.js} +1 -1
- package/dist/client/assets/{index-C5wldXHS.js → index-CiG92g6c.js} +1 -1
- package/dist/client/assets/{index-CtgoU6en.js → index-CnFOA69K.js} +1 -1
- package/dist/client/assets/{index-fjBXVTkP.js → index-CyK1A-PV.js} +1 -1
- package/dist/client/assets/{index-Cy5OtK8P.js → index-D2FJssDQ.js} +1 -1
- package/dist/client/assets/{index-B7BDvGS9.js → index-Dy0Aphio.js} +1 -1
- package/dist/client/assets/{index-CrMNCOay.js → index-OaQ5Wven.js} +1 -1
- package/dist/client/assets/{index-DFEtjxfd.js → index-g0fJQ3Ik.js} +1 -1
- package/dist/client/assets/{index-jEofb67j.js → index-hl8iFWLs.js} +1 -1
- package/dist/client/assets/{index-DCNDjBOm.js → index-kPKwu4SB.js} +1 -1
- package/dist/client/assets/{index-BGvfgBXQ.js → index-mb-jxjEy.js} +8 -8
- package/dist/client/assets/{index-redirect-DTMlUMlL.js → index-redirect-Cc2j63PQ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CjHha6VI.js → infiniteQueryObserver-Dfcni9SV.js} +1 -1
- package/dist/client/assets/{infra-billing-R5GG28fc.js → infra-billing-BYZXmRJD.js} +1 -1
- package/dist/client/assets/{input-CIXcgL8B.js → input-BUC-cGry.js} +3 -3
- package/dist/client/assets/{input-CWx7kP2y.js → input-DjfzIqsk.js} +1 -1
- package/dist/client/assets/{integration-icon-nO6TvSsO.js → integration-icon-DRbGJhQo.js} +1 -1
- package/dist/client/assets/item-actions-CDU7n7Cr.js +1 -0
- package/dist/client/assets/{jira-icon-DX-tTt4z.js → jira-icon-DdgjDC_T.js} +1 -1
- package/dist/client/assets/{label-2ri5y0AT.js → label-DFYaZzfV.js} +1 -1
- package/dist/client/assets/{layout-m0ghuzGv.js → layout-C1ShA0A2.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-dJnURvJJ.js → legacy-admin-welcome-dialog-C0rLwEhl.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-JluLJXF7.js → legacy-agents-deep-0KD5AZ-a.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-COiP2ETV.js → legacy-main-redirect-DsJJQAHz.js} +1 -1
- package/dist/client/assets/library-DKYFm9Uv.js +1 -0
- package/dist/client/assets/{library-tab-CAU7uiMF.js → library-tab-BttdbOwT.js} +1 -1
- package/dist/client/assets/{login-DgFE1SmG.js → login-DkrQRBM-.js} +1 -1
- package/dist/client/assets/{markdown-Du_1i_DV.js → markdown-B-EQMrBl.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CHuh8eBE.js → mcp-app-renderer-B8_THT37.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Be_pa5Ik.js → mcp-oauth-Cya-fh0P.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Bppcz_3X.js → mcp-oauth-_iPR8QjI.js} +1 -1
- package/dist/client/assets/{members-CS-oK1Zf.js → members-BVOPoO_W.js} +1 -1
- package/dist/client/assets/{memory-Bl0VJnb1.js → memory-C23hLBrZ.js} +1 -1
- package/dist/client/assets/{mock-board-BQeILTVh.js → mock-board-BcZu24PK.js} +3 -3
- package/dist/client/assets/{monaco-editor-DCzjvWW2.js → monaco-editor-DttATUsj.js} +1 -1
- package/dist/client/assets/{monitoring-B4nvDMf7.js → monitoring-CLDBgSzo.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BK9I1n3g.js → monitoring-stats-row-CRxmylqh.js} +1 -1
- package/dist/client/assets/{multi-select-DLpc9WGW.js → multi-select-CSOG3KaA.js} +1 -1
- package/dist/client/assets/{mustache-fgm1GoLm.js → mustache-clchl4ci.js} +1 -1
- package/dist/client/assets/{named-rule-step-ikHUM8J-.js → named-rule-step-C-_N0SXT.js} +1 -1
- package/dist/client/assets/{named-rule-view-BJLF9MVt.js → named-rule-view-DrUf_Aau.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BfJtWdgg.js → new-project-dialog-KtG8l1yi.js} +1 -1
- package/dist/client/assets/{new-project-store-CUIYzGdu.js → new-project-store-DDZH8miu.js} +1 -1
- package/dist/client/assets/{oauth-callback-DAF-HNU5.js → oauth-callback-B-J4rjBS.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BlZK1cl5.js → oauth-callback-ai-provider-DCheihxt.js} +1 -1
- package/dist/client/assets/{oauth-consent-BjKAsSxp.js → oauth-consent-P6jhSz87.js} +1 -1
- package/dist/client/assets/{onboarding-CStDT_bk.js → onboarding-BoQQb_DJ.js} +1 -1
- package/dist/client/assets/{openai-conversation-DJ7Npc2v.js → openai-conversation-BRIcN7ns.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CaqEFCbi.js → optimistic-project-sidebar-views-BhBXjk9R.js} +1 -1
- package/dist/client/assets/{order-monitor-day-B3sADUCG.js → order-monitor-day-DEr2FQ1w.js} +1 -1
- package/dist/client/assets/{organization-choice-vaH8PRN7.js → organization-choice-NHrCNKHD.js} +1 -1
- package/dist/client/assets/{orgs-C-TKQP3D.js → orgs-oDKfi1NH.js} +1 -1
- package/dist/client/assets/{own-accounts-section-BpgBL9aq.js → own-accounts-section-DfQklfiL.js} +1 -1
- package/dist/client/assets/{pair-M_Ks4KYr.js → pair-CI1Rts6X.js} +1 -1
- package/dist/client/assets/{parse-sections-BuUvGGsv.js → parse-sections-Cv7KSMgB.js} +3 -3
- package/dist/client/assets/{plan-D-khZ7ZC.js → plan-DhBEXV7d.js} +1 -1
- package/dist/client/assets/{plan-ladder-De9sRz_u.js → plan-ladder-Dn1mCpkd.js} +1 -1
- package/dist/client/assets/{plan-usage-card-8gBO_kT7.js → plan-usage-card-CoidaM8B.js} +1 -1
- package/dist/client/assets/{popover-BdGhwX6j.js → popover-D73VbCM5.js} +1 -1
- package/dist/client/assets/post-calendar-bB_dTysf.js +1 -0
- package/dist/client/assets/{post-editor-mxtEx2vX.js → post-editor-DJgKYRYW.js} +2 -2
- package/dist/client/assets/{preview-content-Dxe4XKdO.js → preview-content-g2WEpueQ.js} +1 -1
- package/dist/client/assets/{preview-dialog--RYpR3-k.js → preview-dialog-DEGn7q2O.js} +1 -1
- package/dist/client/assets/{preview-panel-Bk5cvms4.js → preview-panel-BWh6T2ND.js} +1 -1
- package/dist/client/assets/preview-tab-BFrQickY.js +557 -0
- package/dist/client/assets/primitives-BHTaKbue.js +1 -0
- package/dist/client/assets/{product-picker-dialog-CIU4p36P.js → product-picker-dialog-B1FnNY41.js} +1 -1
- package/dist/client/assets/{profile-CA2wDqLs.js → profile-KHrko28l.js} +1 -1
- package/dist/client/assets/{project-app-view-CsobOn93.js → project-app-view-CEsZ7pyQ.js} +1 -1
- package/dist/client/assets/{project-apps-CzXp3RuA.js → project-apps-BFfwYw5p.js} +1 -1
- package/dist/client/assets/{project-icon-BUl2sFaB.js → project-icon-Bl4IAncl.js} +1 -1
- package/dist/client/assets/{project-index-D3eqGaeY.js → project-index-DyqPLhTf.js} +1 -1
- package/dist/client/assets/project-reports-Bo9Tf1zF.js +1 -0
- package/dist/client/assets/project-tasks-t-YvuQ_q.js +1 -0
- package/dist/client/assets/{projects-DSjvBTqn.js → projects-D4oIfDMZ.js} +1 -1
- package/dist/client/assets/{projects-empty-state-C_4sZ19U.js → projects-empty-state-PFeDurZg.js} +1 -1
- package/dist/client/assets/{prompts-JIqJQ8rm.js → prompts-TmqmoJme.js} +1 -1
- package/dist/client/assets/record-editor-WmiU2d6T.js +1 -0
- package/dist/client/assets/redirect-editor-BlBcxP_z.js +1 -0
- package/dist/client/assets/reports-Cb0Mwz-u.js +1 -0
- package/dist/client/assets/{reports-DJZwSZy6.js → reports-DxGhEr3Y.js} +1 -1
- package/dist/client/assets/{reports-onboarding-CSkswBMH.js → reports-onboarding-CM7YPxA7.js} +1 -1
- package/dist/client/assets/{reports-tab-6fV3Jvgl.js → reports-tab-DLrLzkx3.js} +2 -2
- package/dist/client/assets/{repositories-BTuTm0L2.js → repositories-67wiZj2r.js} +1 -1
- package/dist/client/assets/repositories-CDNeFlHK.js +1 -0
- package/dist/client/assets/{repository-binding-DrxBu24C.js → repository-binding-w-FCDYuS.js} +1 -1
- package/dist/client/assets/{repository-picker-Darc81nL.js → repository-picker-DF0-TGsg.js} +1 -1
- package/dist/client/assets/{require-capability-C51SGps0.js → require-capability-7Xn2Fb3C.js} +1 -1
- package/dist/client/assets/{required-auth-layout-pSTI6t_x.js → required-auth-layout-B1owCwtw.js} +1 -1
- package/dist/client/assets/{reset-password-BnNzHLPz.js → reset-password-BvZRYC01.js} +1 -1
- package/dist/client/assets/{resizable-BU7UxgwC.js → resizable-CJbr1Nyi.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-Bd3WwXB0.js → resolve-tab-icon-3aZJM1BR.js} +1 -1
- package/dist/client/assets/{review-settings-D31XkFbq.js → review-settings-CISstknV.js} +1 -1
- package/dist/client/assets/{role-color-CJIemPpG.js → role-color-CW1lGNZj.js} +1 -1
- package/dist/client/assets/{roles-C7hVcM54.js → roles-D7rYnEMh.js} +1 -1
- package/dist/client/assets/route-CFBPrBcw.js +1 -0
- package/dist/client/assets/{route-ajk3Lz1i.js → route-CPaIZZ88.js} +1 -1
- package/dist/client/assets/{route-1boDLy4Y.js → route-CT0-z-8-.js} +1 -1
- package/dist/client/assets/{route-page-header-D3RVWIBC.js → route-page-header-CRzmHOKm.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-lqhbN6-M.js → sandbox-git-api-1xYJwdHB.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-QpFv1h24.js → sandbox-lifecycle-context-CxRkhFod.js} +1 -1
- package/dist/client/assets/{save-status-96Apsuux.js → save-status-Csuo4rYY.js} +1 -1
- package/dist/client/assets/{schema-DIQ-2mII.js → schema-BluyjH2z.js} +1 -1
- package/dist/client/assets/{schema-DklwT0XH.js → schema-DU3GC-Ez.js} +1 -1
- package/dist/client/assets/{scroll-area-CLaLCTf7.js → scroll-area-D9mVov2B.js} +1 -1
- package/dist/client/assets/{search-input-BytjnRYd.js → search-input-D-gp-h4P.js} +1 -1
- package/dist/client/assets/{search-toggle-BEH-S2im.js → search-toggle-C1j-Ki1u.js} +1 -1
- package/dist/client/assets/{secret-picker-k0C3uZq8.js → secret-picker-BoQX39kK.js} +1 -1
- package/dist/client/assets/{secrets-1-DGosfc.js → secrets-BZwPjTxC.js} +1 -1
- package/dist/client/assets/section-array-field-4siTAXTX.js +1 -0
- package/dist/client/assets/{sections-DfnSEAao.js → sections-Cwqt7k6K.js} +1 -1
- package/dist/client/assets/sections-editor-B2wYNbjz.js +1 -0
- package/dist/client/assets/{select-BH6i4t87.js → select-DnlDCB9E.js} +1 -1
- package/dist/client/assets/{select-model-DuodXwbD.js → select-model-Cm1Kbu8h.js} +1 -1
- package/dist/client/assets/seo-editor-DbLTH9Vw.js +1 -0
- package/dist/client/assets/{separator-DE4QJAwp.js → separator-DsSANYB0.js} +1 -1
- package/dist/client/assets/{session-runtime-CnePJMYk.js → session-runtime-D2GKulko.js} +1 -1
- package/dist/client/assets/settings-tab-CSzHYez6.js +1 -0
- package/dist/client/assets/{sheet-CX86ajAE.js → sheet-Ctckoytn.js} +1 -1
- package/dist/client/assets/{shell-layout-MrR8EGxZ.js → shell-layout-BS_Y65pV.js} +1 -1
- package/dist/client/assets/{site-draft-actions-CCPyXgQA.js → site-draft-actions-BZf0yVqo.js} +1 -1
- package/dist/client/assets/{site-draft-view-B3wpg14y.js → site-draft-view-NypTEK1x.js} +1 -1
- package/dist/client/assets/site-editor-BbPLQWC_.js +1 -0
- package/dist/client/assets/{site-editor-toast-DjTYO8yl.js → site-editor-toast-DfzFv4iY.js} +1 -1
- package/dist/client/assets/{skills-CwoSapY8.js → skills-2_Ugx28k.js} +1 -1
- package/dist/client/assets/{slider-B1Q72VZH.js → slider-Bqy5W8RM.js} +1 -1
- package/dist/client/assets/{sortable.esm-CXd3MFy1.js → sortable.esm-Cl-YQgc8.js} +1 -1
- package/dist/client/assets/{sso-DieJGjil.js → sso-CdbJh-Eu.js} +1 -1
- package/dist/client/assets/{suggestion-Cpa996zU.js → suggestion-BoV2NIg6.js} +1 -1
- package/dist/client/assets/{super-agent-icon-Db04o97L.js → super-agent-icon-CDA5EiNS.js} +1 -1
- package/dist/client/assets/{switch-B7uarNO5.js → switch--3C-A5oU.js} +1 -1
- package/dist/client/assets/{synced-repos-aIXgLnBB.js → synced-repos-BpiKoBMD.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-D_VxeQZE.js → tab-icon-glyph-CEoTzCNL.js} +1 -1
- package/dist/client/assets/{table-Bta2Y1CD.js → table-Cy5fo0ER.js} +1 -1
- package/dist/client/assets/{tabs-s8CSecQV.js → tabs-DJ6SkMve.js} +1 -1
- package/dist/client/assets/{task-board-DshmncwN.js → task-board-CShHcm1L.js} +1 -1
- package/dist/client/assets/{task-key-PomUyZRb.js → task-key-BP2--GY6.js} +1 -1
- package/dist/client/assets/{task-route-DIKoinWO.js → task-route-BDNP9yC7.js} +1 -1
- package/dist/client/assets/{task-status-LX7lBTjN.js → task-status-GPS8HLw1.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-DfkqsYeI.js → taskboard-analytics-DPlKE9oq.js} +1 -1
- package/dist/client/assets/tasks-Coh8-0jv.js +1 -0
- package/dist/client/assets/{tasks-BGD-BUHo.js → tasks-DQ5zrDt3.js} +1 -1
- package/dist/client/assets/{textarea-C_mtz3Kv.js → textarea-BCGFjA5F.js} +1 -1
- package/dist/client/assets/{thread-analytics-aGwSdxKv.js → thread-analytics-B5IqH-5A.js} +1 -1
- package/dist/client/assets/{thread-button-Bc5fnhGX.js → thread-button-Dw70OEJl.js} +1 -1
- package/dist/client/assets/{thread-intent-DJ2isQQx.js → thread-intent-BQWCtBA_.js} +1 -1
- package/dist/client/assets/{thread-route-DI1GCHqT.js → thread-route-DRsKlO-E.js} +1 -1
- package/dist/client/assets/{thread-route-C13LdFpr.js → thread-route-Dix8r-rB.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CnbjjV-I.js → thread-sheet-body-iwOtv26B.js} +1 -1
- package/dist/client/assets/{time-range-picker-A0UZNhWR.js → time-range-picker-CUAzqD4s.js} +1 -1
- package/dist/client/assets/{toggle-group-BjeGXB13.js → toggle-group-jkikwCcL.js} +1 -1
- package/dist/client/assets/{tool-set-selector-rXUFKU4u.js → tool-set-selector-Clh56c6v.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BmCu83-X.js → toolbar-icon-button-DcIFSTOI.js} +1 -1
- package/dist/client/assets/{tooltip-D0-ybZJ-.js → tooltip-DCzbfwd7.js} +1 -1
- package/dist/client/assets/{tooltipContext-Dm5XB4Pa.js → tooltipContext-2wUW4UR-.js} +1 -1
- package/dist/client/assets/{track-BI5WxsF3.js → track-D4IkVAbh.js} +1 -1
- package/dist/client/assets/{types-DeHdmC2C.js → types-BQYXFpO6.js} +1 -1
- package/dist/client/assets/{url-slug-Bt323BC1.js → url-slug-E3otz4_J.js} +1 -1
- package/dist/client/assets/{usage-stats-4TwUkhM4.js → usage-stats-CiB8uQLm.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Cykm4Omp.js → use-ai-providers-CTbi7eSd.js} +1 -1
- package/dist/client/assets/{use-api-keys-QqkV0EMu.js → use-api-keys-CuxnpyDB.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-B0v5Nv1Q.js → use-apply-named-rule-BroFciug.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-vlpFfAp7.js +1 -0
- package/dist/client/assets/{use-automations-CIfofZgd.js → use-automations-BdniAcmH.js} +1 -1
- package/dist/client/assets/{use-autosave-phCMBUyD.js → use-autosave-C9MsBAi1.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BloQ91Xb.js +1 -0
- package/dist/client/assets/use-blog-view-Bi3aoju6.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-BWjgOEMc.js → use-chat-layout-state-77HNlix_.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CPyM3m5I.js → use-cms-publish-actions-DGO40mZ2.js} +1 -1
- package/dist/client/assets/{use-connect-companion-eWYXL_LA.js → use-connect-companion-BkEQhdBC.js} +1 -1
- package/dist/client/assets/{use-connection-dER7f5j5.js → use-connection-DxwzNo03.js} +1 -1
- package/dist/client/assets/{use-content-sync-BSudZND-.js → use-content-sync-C9H2kDwl.js} +1 -1
- package/dist/client/assets/{use-copy-CzwPMJY2.js → use-copy-DSNmvH9L.js} +1 -1
- package/dist/client/assets/{use-current-view-BhCzT_on.js → use-current-view-DvszbK0Z.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DbDI1yRa.js → use-date-fns-locale-BSsydU_s.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BUqTz9gI.js → use-debounced-autosave-D6iRm-Vv.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DNV71VAt.js → use-debounced-value-CAOKwJaL.js} +1 -1
- package/dist/client/assets/{use-deco-credits-D1eTXz3B.js → use-deco-credits-DnZKzVHP.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DwV1bANi.js → use-decopilot-events-BhcT5RAV.js} +1 -1
- package/dist/client/assets/{use-delete-block-B3Q8p71v.js → use-delete-block-Bd0Db3-p.js} +1 -1
- package/dist/client/assets/{use-delete-connection-KjVy0n0M.js → use-delete-connection-BMDl_PP-.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-U97at0FL.js → use-deployment-admin-DCWHLNad.js} +1 -1
- package/dist/client/assets/{use-entitlements-BnUu4797.js → use-entitlements-CzwT7L5B.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Cyb7nHOV.js → use-fast-preview-draft-url-DbEjmD3f.js} +1 -1
- package/dist/client/assets/{use-file-configs-D-0GlBYS.js → use-file-configs-yKe4yLHn.js} +1 -1
- package/dist/client/assets/{use-id-selection-lO2dafiF.js → use-id-selection-DmcvY3GI.js} +1 -1
- package/dist/client/assets/{use-in-settings-BZ-N_1GQ.js → use-in-settings-BTBVzmbg.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-adObXP9V.js → use-inbox-feed-BOy7gIMv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DuNc__Oo.js → use-infinite-scroll-DnhPBPks.js} +1 -1
- package/dist/client/assets/{use-join-requests-CGnr0fzd.js → use-join-requests-C0zVtdAh.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-C_KJU7HA.js → use-main-panel-tabs-BCg6GLFm.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CIA9x3GT.js → use-mcp-auth-status-BZRJODR4.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CsG2AAiF.js → use-mcp-client-4k5JKqzF.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DJkMWAp0.js → use-mcp-prompts-pJuJ9yii.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C4sfkkEQ.js → use-mcp-tools-Dh4scI4V.js} +1 -1
- package/dist/client/assets/{use-mobile-B4kazYmP.js → use-mobile-CBwmaBFU.js} +1 -1
- package/dist/client/assets/{use-move-blocks-CQpVSPWP.js → use-move-blocks-D8MFSTf7.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CYt8D-re.js → use-navigate-to-agent-H87rWFYJ.js} +1 -1
- package/dist/client/assets/{use-never-published-Dhj1oB8k.js → use-never-published-Db-SviVk.js} +1 -1
- package/dist/client/assets/{use-org-fs-BQ1-EjeH.js → use-org-fs-CbXrwKDd.js} +1 -1
- package/dist/client/assets/{use-org-notice-FqFlDSJV.js → use-org-notice-BLDWm2ef.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DZJLO1tr.js → use-org-repo-syncs-BLfbsB0Y.js} +1 -1
- package/dist/client/assets/{use-org-sso-CCCXGXRa.js → use-org-sso-Cfy5SkJ5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CcEgBKiR.js → use-organization-settings-UrGbnM2k.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BEVdshk4.js → use-panel-navigate-B5u6ws6M.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BWWCr0OJ.js → use-project-native-view-presence-Cww1Huve.js} +1 -1
- package/dist/client/assets/{use-project-scope-DaSiwM20.js → use-project-scope-Dydp2D08.js} +1 -1
- package/dist/client/assets/{use-recent-apps-DJU0pj25.js → use-recent-apps-B6ojF6fA.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BBFJaws_.js → use-reports-diagnostic-EfyKTU1j.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-Bh6eTl2p.js → use-sandbox-events-DEHux0gs.js} +1 -1
- package/dist/client/assets/{use-secrets-DRWI9snD.js → use-secrets-G3Yo5eAI.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DgxMYdVR.js → use-section-preview-base-C2ASOAPw.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-Cb1DkW28.js → use-sidebar-collapsed-DgMGLJyh.js} +1 -1
- package/dist/client/assets/{use-tags-CY161EKU.js → use-tags-laGjgQqt.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DstP91hQ.js → use-task-board-analytics-Ct6FAXeB.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DENiL_-n.js → use-task-board-item-prs-BbVn1nYd.js} +1 -1
- package/dist/client/assets/{use-task-board-items-BOf8g772.js → use-task-board-items-B_EMxvU9.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-Cy7ux4ZM.js → use-task-board-prompts-CE2PVOHH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CLvpp-M5.js → use-task-metadata-L0GKyc-x.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CBGDKGBc.js → use-thread-outputs-B9502nWa.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-Bm-Nz5rU.js → use-view-draft-kind-CZT4hOaN.js} +1 -1
- package/dist/client/assets/{use-voice-input-l3y10Zzf.js → use-voice-input-Nzha8Za1.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-FxnnBp9W.js +1 -0
- package/dist/client/assets/{useQueries-BADhFyMC.js → useQueries-CQ0xJF7W.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CtWAJlQZ.js +1 -0
- package/dist/client/assets/{users-BlAutU5k.js → users-C_-sgV42.js} +1 -1
- package/dist/client/assets/{utils-D3hrWqhu.js → utils-pe9cqItP.js} +1 -1
- package/dist/client/assets/{variant-calendar-Cf89P2oq.js → variant-calendar-d5m67-k3.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-cabGpziX.js → variant-matcher-override-DoPQRIHU.js} +1 -1
- package/dist/client/assets/{view-header-CqefLZ8T.js → view-header-B0xV_oWh.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BfLRvmz0.js → virtual-mcp-DN6fu9Nf.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-mz6vVQb7.js → watch-sse-pool-7J-tc7Ge.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/agent-app-qi4Zg0Ko.js +0 -1
- package/dist/client/assets/agent-blog-C-T8yJPu.js +0 -2
- package/dist/client/assets/agent-blog-post-spGtFEpJ.js +0 -2
- package/dist/client/assets/agent-deck-8F4Y3xtF.js +0 -1
- package/dist/client/assets/agent-experiments-CxOy1OMh.js +0 -1
- package/dist/client/assets/agent-file-BHPXEsLM.js +0 -1
- package/dist/client/assets/agent-library-BDMtzZv5.js +0 -1
- package/dist/client/assets/agent-library-file-BU6GZbp1.js +0 -1
- package/dist/client/assets/agent-overview-BpZl9px0.js +0 -1
- package/dist/client/assets/agent-releases-BojH--RB.js +0 -2
- package/dist/client/assets/agent-settings-CmejIfdg.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CsUpsDOZ.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DcDYGjSi.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DoYr2JdT.js +0 -1
- package/dist/client/assets/agent-view-5HH2xFah.js +0 -1
- package/dist/client/assets/api-keys-tTCGO1A5.js +0 -1
- package/dist/client/assets/app-editor-BDvMcyIq.js +0 -1
- package/dist/client/assets/blog-preview-url-CQF91dum.js +0 -1
- package/dist/client/assets/blog-schema-B993jmPJ.js +0 -1
- package/dist/client/assets/blog-source-gate-B40koNXU.js +0 -1
- package/dist/client/assets/category-editor-DrOqNXNY.js +0 -1
- package/dist/client/assets/category-tree-B08EozIk.js +0 -4
- package/dist/client/assets/cms-settings-editor-DMhLCkuK.js +0 -1
- package/dist/client/assets/empty-message-CG0mkpBx.js +0 -15
- package/dist/client/assets/index-w9K6scL8.css +0 -1
- package/dist/client/assets/item-actions-DHBqlB8t.js +0 -1
- package/dist/client/assets/library-Wi-0o3Yx.js +0 -1
- package/dist/client/assets/post-calendar-CYarN2j3.js +0 -1
- package/dist/client/assets/preview-tab-BRY7e3Ww.js +0 -557
- package/dist/client/assets/project-reports-DUszwxkV.js +0 -1
- package/dist/client/assets/project-tasks-C9wh-MvK.js +0 -1
- package/dist/client/assets/record-editor-5hDNYEyc.js +0 -1
- package/dist/client/assets/redirect-editor-CIkflDxt.js +0 -1
- package/dist/client/assets/reports-BQo9TgIr.js +0 -1
- package/dist/client/assets/repositories-BT4LP6yW.js +0 -1
- package/dist/client/assets/route-FPh-7Znc.js +0 -1
- package/dist/client/assets/section-array-field-08gf_aaJ.js +0 -1
- package/dist/client/assets/sections-editor-Cm1IpUw4.js +0 -1
- package/dist/client/assets/seo-editor-vJ_3bHov.js +0 -1
- package/dist/client/assets/settings-tab-C97802nQ.js +0 -1
- package/dist/client/assets/site-editor-BiU8V7py.js +0 -1
- package/dist/client/assets/tasks-B2acfxpH.js +0 -1
- package/dist/client/assets/use-ask-in-chat-CJn-8DXz.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BUDjuC95.js +0 -1
- package/dist/client/assets/use-blog-view-CZ2egr0r.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Comohppg.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-XSNjcYue.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aH as Ne,dA as Me,dy as ze,aI as de,bx as Ee,c as U,b as V,j as t,h as Se,B,r as Q,m as ye,a6 as te,am as Re,V as me,K as ee,d as se,C as _e,au as Ce,gG as Ue,e0 as Fe,n as Ve,hA as ue,a5 as Le,I as J,_ as Be,X as Ge,Z as qe,Y as xe,R as He,f as Ke,hS as Xe,q as Qe,hf as We,aG as Ye,aF as Je,o as Ze,t as Y}from"./index-BGvfgBXQ.js";import{g as et}from"./extract-connection-data-BwsA-RYq.js";import{E as we}from"./empty-state-B5kfNSn2.js";import{E as tt,r as st,b as nt,c as it}from"./connection-form-helpers-tAcDvyB7.js";import{c as ot,S as at,D as lt}from"./index-C4-rqYj_.js";import{u as Ie,T as rt}from"./use-mcp-auth-status-CIA9x3GT.js";import{a as ct}from"./mcp-oauth-Be_pa5Ik.js";import{I as ae}from"./integration-icon-nO6TvSsO.js";import{s as dt}from"./Plus-KLH-MPJh.js";import{b5 as mt,a4 as ut,a_ as xt,a5 as ne}from"./agent-icon-CFsULo4q.js";import{a as ke,f as pt,s as ft}from"./Tool01-CIkfFpNs.js";import{s as re}from"./Trash01-1e348d5z.js";import{b as ht,a as gt,c as jt,S as vt,d as bt}from"./sheet-CX86ajAE.js";import{F as q,b as H,c as K,d as L,f as X,e as pe,a as Nt}from"./form-Bmlz7qRb.js";import{u as Te,a as Ae,b as St}from"./use-connection-dER7f5j5.js";import{u as Pe}from"./use-mcp-client-CsG2AAiF.js";import{u as yt}from"./use-mcp-tools-C4sfkkEQ.js";import{a as _t}from"./use-mcp-prompts-DJkMWAp0.js";import{i as Ct}from"./mcp-oauth-Bppcz_3X.js";import{u as wt,D as It}from"./use-delete-connection-KjVy0n0M.js";import{c as kt}from"./monitoring-stats-row-BK9I1n3g.js";import{c as Tt,b as At,C as Pt,a as Dt,B as $t}from"./chart-DVwx0iDS.js";import{C as Ot}from"./tooltipContext-Dm5XB4Pa.js";import{u as Mt}from"./repository-binding-DrxBu24C.js";import{T as ie,a as zt,c as oe,b as Et}from"./tabs-s8CSecQV.js";import{g as De}from"./connection-slug-xMtStNjP.js";import{n as Rt}from"./BookOpen01-CKzuPfPT.js";import{g as ce}from"./types-DeHdmC2C.js";import{M as Ut}from"./mcp-app-renderer-CHuh8eBE.js";import{C as Ft}from"./collection-search-ugxEd4a5.js";import{B as Vt}from"./badge-xkOOGTR2.js";import{S as fe,b as he,a as ge,d as je,c as G}from"./select-BH6i4t87.js";import{i as Lt}from"./CheckCircle-Dvda272I.js";import{t as Bt}from"./ChevronDown-C0zFtKr8.js";import{n as Gt}from"./LinkBroken01-sFiApfPs.js";import{c as qt}from"./UserSquare-BAlzvt_y.js";import{s as Ht}from"./XClose-CQjSvos9.js";import{p as Kt,i as Xt}from"./connection-C7PBWSJ2.js";import{c as Qt}from"./schema-DklwT0XH.js";import"./metadata-D72DunRR.js";import"./Key01-C2Ozqf6q.js";import"./auth-WUI0GELm.js";import"./index-CrMNCOay.js";import"./index-Cy5OtK8P.js";import"./index-DCNDjBOm.js";import"./index-BdQq_4o_.js";import"./index-B7BDvGS9.js";import"./popover-BdGhwX6j.js";import"./tooltip-D0-ybZJ-.js";import"./index-CpqnzQ6X.js";import"./SearchMd-1p8IP99o.js";import"./use-mobile-B4kazYmP.js";import"./use-navigate-to-agent-CYt8D-re.js";import"./thread-intent-DJ2isQQx.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-mz6vVQb7.js";import"./task-board-DshmncwN.js";import"./schema-DIQ-2mII.js";import"./session-runtime-CnePJMYk.js";import"./Eye-CE9bd3Ra.js";import"./AlertCircle-BPb6lfDc.js";import"./UserCheck01-Dq2vpnim.js";import"./ArrowUp-bsUZSt57.js";import"./ArrowLeft-D_px05Ip.js";import"./ArrowRight-DYc-7xj5.js";import"./Globe04-BK5-p2nj.js";import"./TrendUp01-Sag3n7qI.js";import"./ChevronSelectorVertical-BtbkxpS7.js";import"./ChevronUp-CHkdbh-i.js";import"./CreditCard01-BnEtKIxX.js";import"./File02-OGn6eCfs.js";import"./MessageCircle01-LN8Gr1lL.js";import"./SwitchHorizontal01-BRSeU65r.js";import"./Fingerprint04-ZnmHU3Kp.js";import"./Image01-Do_f-fPi.js";import"./LayoutLeft-tXOkIxzs.js";import"./Minus-vz8sJtmc.js";import"./Monitor01-Ctq4Y9xp.js";import"./Sun-8QBdDNyc.js";import"./Play-B5OMs0GO.js";import"./ShoppingBag01-BZ5p5Jaw.js";import"./Upload01-DQiq1N5L.js";import"./Users01-CJNRoJXK.js";import"./Zap-BbT-W69e.js";import"./label-2ri5y0AT.js";import"./CartesianChart-8sA8UDc5.js";import"./CategoricalChart-D0wEIkFu.js";import"./AreaChart-Yh5pBNgF.js";import"./active-indicator-CCMhAsc_.js";import"./url-slug-Bt323BC1.js";const Wt=Ne({scopes:Ee(de()).describe("List of scopes available"),stateSchema:Me(de(),ze()).describe("JSON Schema (draft-07) defining the state structure")}),Yt=[{name:"MCP_CONFIGURATION",inputSchema:Ne({}),outputSchema:Wt}];function Jt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l}=s,a=V();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=Ie(r),x=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,f=n.status!=="active",m=x||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==m?(h=ye("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",m),e[2]=m,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 N;e[9]!==n.status||e[10]!==f||e[11]!==x||e[12]!==a?(N=x?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=x,e[12]=a,e[13]=N):N=e[13];let _;e[14]!==j||e[15]!==N?(_=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,N]}),e[14]=j,e[15]=N,e[16]=_):_=e[16];let y;e[17]!==n||e[18]!==x||e[19]!==o||e[20]!==a?(y=x&&t.jsx(B,{variant:"outline",size:"sm",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=x,e[19]=o,e[20]=a,e[21]=y):y=e[21];let C;e[22]!==n||e[23]!==f||e[24]!==l||e[25]!==a?(C=f?t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(mt,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground",onClick:()=>l(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(ut,{size:13})}),e[22]=n,e[23]=f,e[24]=l,e[25]=a,e[26]=C):C=e[26];let D;e[27]!==n||e[28]!==c?(D=()=>c(n),e[27]=n,e[28]=c,e[29]=D):D=e[29];let w;e[30]!==a?(w=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=w):w=e[31];let $;e[32]!==a?($=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=$):$=e[33];let O;e[34]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ke,{size:13}),e[34]=O):O=e[34];let P;e[35]!==D||e[36]!==w||e[37]!==$?(P=t.jsx(B,{variant:"ghost",size:"icon-sm",onClick:D,title:w,"aria-label":$,children:O}),e[35]=D,e[36]=w,e[37]=$,e[38]=P):P=e[38];let T;e[39]!==n||e[40]!==i?(T=()=>i(n),e[39]=n,e[40]=i,e[41]=T):T=e[41];let S;e[42]!==a?(S=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=S):S=e[43];let v;e[44]!==a?(v=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=v):v=e[45];let z;e[46]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(re,{size:13}),e[46]=z):z=e[46];let E;e[47]!==T||e[48]!==S||e[49]!==v?(E=t.jsx(B,{variant:"ghost-destructive",size:"icon-sm",onClick:T,title:S,"aria-label":v,children:z}),e[47]=T,e[48]=S,e[49]=v,e[50]=E):E=e[50];let M;e[51]!==P||e[52]!==E||e[53]!==y||e[54]!==C?(M=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,C,P,E]}),e[51]=P,e[52]=E,e[53]=y,e[54]=C,e[55]=M):M=e[55];let A;return e[56]!==M||e[57]!==h||e[58]!==g||e[59]!==_?(A=t.jsxs("div",{className:h,children:[g,_,M]}),e[56]=M,e[57]=h,e[58]=g,e[59]=_,e[60]=A):A=e[60],A}function Zt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=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 a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let r;e[8]!==o?(r=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=r):r=e[9];let d;e[10]!==o?(d=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ke,{size:13}),e[12]=u):u=e[12];let x;e[13]!==a||e[14]!==r||e[15]!==d?(x=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon-sm",onClick:a,title:r,"aria-label":d,children:u})}),e[13]=a,e[14]=r,e[15]=d,e[16]=x):x=e[16];let f;return e[17]!==i||e[18]!==l||e[19]!==x?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,x]}),e[17]=i,e[18]=l,e[19]=x,e[20]=f):f=e[20],f}function es(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l,onAdd:a,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 x;e[3]!==u?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=x):x=e[4];let f;e[5]!==r?(f=r?t.jsx(Se,{className:"size-[13px]"}):t.jsx(dt,{size:13}),e[5]=r,e[6]=f):f=e[6];let m;e[7]!==d?(m=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=m):m=e[8];let h;e[9]!==r||e[10]!==a||e[11]!==f||e[12]!==m?(h=t.jsxs(B,{variant:"default",size:"sm",className:"gap-1.5",onClick:a,disabled:r,children:[f,m]}),e[9]=r,e[10]=a,e[11]=f,e[12]=m,e[13]=h):h=e[13];let g;e[14]!==x||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,h]}),e[14]=x,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==l){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==l?(y=C=>t.jsx(Q.Suspense,{fallback:t.jsx(Zt,{instance:C,onConfigure:c}),children:t.jsx(Jt,{instance:C,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l})},C.id),e[23]=o,e[24]=c,e[25]=i,e[26]=l,e[27]=y):y=e[27],j=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=l,e[22]=j}else j=e[22];let N;e[28]!==j?(N=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=N):N=e[29];let _;return e[30]!==g||e[31]!==N?(_=t.jsxs("div",{className:"surface overflow-hidden",children:[g,N]}),e[30]=g,e[31]=N,e[32]=_):_=e[32],_}function ts(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const ss=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ns(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const is={calls:{label:"Tool calls"},errors:{label:"Errors"}};function os(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=V(),l=Re(),a=ns(o),{data:r}=me({queryKey:ee.connectionActivity(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=kt(r?.logs??[],a,void 0,r?.total,d?.total),x=u.data,f=u.totalCalls>0,m=ts(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),f?t.jsxs("div",{children:[t.jsx(Tt,{config:is,className:"h-16 w-full",children:t.jsxs(At,{data:x,barCategoryGap:"4%",children:[t.jsx(Pt,{content:t.jsx(Dt,{labelFormatter:rs}),cursor:{fill:"var(--muted)"}}),t.jsx($t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:x.map(ls)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-2xs text-muted-foreground",children:x[0]?.label}),t.jsx("span",{className:"text-2xs text-muted-foreground",children:x[x.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")})}),m.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:m.map(as)})]})]})}function as(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function ls(s,e){return t.jsx(Ot,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function rs(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function cs(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ds(s){const e=U.c(22),{connectionId:n}=s,c=V(),[o,i]=Q.useState("14d"),{org:l}=te();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let r;e[2]!==a?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,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]!==o?(u=ss.map(j=>t.jsx("button",{type:"button","aria-pressed":o===j.value,onClick:()=>i(j.value),className:ye("px-2.5 py-1 text-xs font-medium rounded-lg transition-colors",o===j.value?"bg-card text-foreground shadow-edge":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=o,e[7]=u):u=e[7];let x;e[8]!==d||e[9]!==u?(x=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]=x):x=e[10];let f;e[11]!==r||e[12]!==x?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,x]}),e[11]=r,e[12]=x,e[13]=f):f=e[13];let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(cs,{}),e[14]=m):m=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==o?(h=t.jsx(Q.Suspense,{fallback:m,children:t.jsx(os,{connectionId:n,orgId:l.id,timeframe:o})}),e[15]=n,e[16]=l.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"surface overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function ms(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=se();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const x=crypto.randomUUID();o({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:x}})},e[0]=o,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(_e,{size:16}),e[4]=l):l=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=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]!==a||e[13]!==r?(u=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-accent transition-colors group text-left w-full",children:[a,r,d]}),e[11]=i,e[12]=a,e[13]=r,e[14]=u):u=e[14],u}function us(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=a=>t.jsx(ms,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=l):l=e[4],o=n.map(l),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function xs(s){const e=U.c(13),{connection:n}=s,c=V(),{org:o}=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=Mt(i);if(!(l.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}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]!==o.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(us,{virtualMcps:l,org:o.slug})}),e[7]=o.slug,e[8]=l,e[9]=u):u=e[9];let x;return e[10]!==d||e[11]!==u?(x=t.jsxs("div",{className:"surface overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=x):x=e[12],x}function ps(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=V(),l=se(),{org:a}=te();let r;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(r={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=r):r=e[3];const d=Pe(r),u=Te(c);let x;e[4]!==u||e[5]!==c?(x=u?De(u):c,e[4]=u,e[5]=c,e[6]=x):x=e[6];const f=x,[m,h]=Q.useState("");let g,j,N,_;if(e[7]!==f||e[8]!==d||e[9]!==l||e[10]!==o||e[11]!==m||e[12]!==i||e[13]!==n){const D=(n??[]).filter(fs),w=m.toLowerCase().trim(),$=w?D.filter(v=>v.name.toLowerCase().includes(w)||v.description&&v.description.toLowerCase().includes(w)):D;let O;e[18]!==f||e[19]!==l||e[20]!==o?(O=v=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(v.name)}})},e[18]=f,e[19]=l,e[20]=o,e[21]=O):O=e[21];const P=O;N="flex flex-col h-full overflow-hidden";let T;e[22]!==i?(T=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=T):T=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=v=>{v.key==="Escape"&&(h(""),v.target.blur())},e[24]=S):S=e[24],e[25]!==m||e[26]!==T?(_=t.jsx(Ft,{value:m,onChange:h,placeholder:T,onKeyDown:S}),e[25]=m,e[26]=T,e[27]=_):_=e[27],g="flex-1 overflow-auto p-5",j=$.length===0?t.jsx(we,{image:null,title:i(m?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(m?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:$.map(v=>{const z=ce(v._meta);return t.jsxs(Ue,{size:"flush",className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>P(v),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Q.Suspense,{fallback:t.jsx(Fe,{className:"h-full w-full"}),children:t.jsx(Ut,{resourceURI:z,toolInfo:{tool:v},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:v.annotations?.title??v.name}),t.jsx(rt,{annotations:v.annotations,_meta:v._meta})]}),v.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:v.description})]})]},v.name)})}),e[7]=f,e[8]=d,e[9]=l,e[10]=o,e[11]=m,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=N,e[17]=_}else g=e[14],j=e[15],N=e[16],_=e[17];let y;e[28]!==g||e[29]!==j?(y=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=y):y=e[30];let C;return e[31]!==N||e[32]!==_||e[33]!==y?(C=t.jsxs("div",{className:N,children:[_,y]}),e[31]=N,e[32]=_,e[33]=y,e[34]=C):C=e[34],C}function fs(s){return!!ce(s._meta)}const ve=[];function $e(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"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=V();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function hs(s){const e=U.c(68),{tools:n,prompts:c,resources:o,connectionId:i,org:l}=s,a=c===void 0?ve:c,r=o===void 0?ve:o,d=V(),u=se(),x=Te(i??"");let f;e[0]!==x||e[1]!==i?(f=x?De(x):i,e[0]=x,e[1]=i,e[2]=f):f=e[2];const m=f;let h;e[3]!==m||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(I){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:m,collectionName:"tools",itemId:encodeURIComponent(I)}})},e[3]=m,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(vs),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const N=j;if(n.length+a.length+r.length===0){let b;e[12]!==d?(b=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=b):b=e[13];let I;e[14]!==b?(I=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:b}),e[14]=b,e[15]=I):I=e[15];let k;e[16]!==d?(k=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=k):k=e[17];let F;e[18]!==k?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:k}),e[18]=k,e[19]=F):F=e[19];let W;return e[20]!==I||e[21]!==F?(W=t.jsxs("div",{className:"surface p-5",children:[I,F]}),e[20]=I,e[21]=F,e[22]=W):W=e[22],W}let y;e[23]!==d||e[24]!==n.length?(y=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=y):y=e[25];let C;e[26]!==y?(C=t.jsx(ie,{value:"tools",variant:"underline",children:y}),e[26]=y,e[27]=C):C=e[27];let D;e[28]!==N||e[29]!==d?(D=N&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=N,e[29]=d,e[30]=D):D=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let $;e[33]!==w?($=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=$):$=e[34];let O;e[35]!==d?(O=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=O):O=e[36];let P;e[37]!==O?(P=t.jsx(ie,{value:"resources",variant:"underline",children:O}),e[37]=O,e[38]=P):P=e[38];let T;e[39]!==$||e[40]!==P||e[41]!==C||e[42]!==D?(T=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(zt,{variant:"underline",className:"gap-1",children:[C,D,$,P]})}),e[39]=$,e[40]=P,e[41]=C,e[42]=D,e[43]=T):T=e[43];let S;e[44]!==g||e[45]!==n?(S=n.length>0?n.map(b=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-accent transition-colors cursor-pointer",onClick:()=>g(b.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(pt,{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:$e(b.name)}),b.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:b.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},b.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=S):S=e[46];let v;e[47]!==S?(v=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:S})}),e[47]=S,e[48]=v):v=e[48];let z;e[49]!==i||e[50]!==N||e[51]!==l||e[52]!==n?(z=N&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ps,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=N,e[51]=l,e[52]=n,e[53]=z):z=e[53];let E;e[54]!==a?(E=a.length>0?a.map(js):t.jsx(le,{label:"prompts"}),e[54]=a,e[55]=E):E=e[55];let M;e[56]!==E?(M=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[56]=E,e[57]=M):M=e[57];let A;e[58]!==r?(A=r.length>0?r.map(gs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let p;return e[62]!==T||e[63]!==v||e[64]!==z||e[65]!==M||e[66]!==R?(p=t.jsx("div",{className:"surface overflow-hidden",children:t.jsxs(Et,{defaultValue:"tools",variant:"underline",children:[T,v,z,M,R]})}),e[62]=T,e[63]=v,e[64]=z,e[65]=M,e[66]=R,e[67]=p):p=e[67],p}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(xt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function js(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Rt,{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:$e(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 vs(s){return ce(s._meta)}function bs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(ae,{icon:n.icon,name:o,size:"md",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let l;e[3]!==o?(l=t.jsx(Ve.Title,{children:o}),e[3]=o,e[4]=l):l=e[4];let a;e[5]!==n.description?(a=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]=a):a=e[6];let r;e[7]!==l||e[8]!==a?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[7]=l,e[8]=a,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 Ns({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=V(),l=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Le(),d=(()=>{if(typeof a!="string"||!a)return!1;try{const m=new URL(a);return m.hostname==="api.githubcopilot.com"&&m.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",f=x?Kt(e.connection_url):null;return x?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(_e,{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")})]}),f&&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:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(q,{control:s.control,name:"ui_type",render:({field:m})=>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(fe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsxs(he,{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(ge,{})]})}),t.jsxs(je,{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(J,{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(fe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsx(he,{className:"h-10",children:t.jsx(ge,{})})}),t.jsxs(je,{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:m})=>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(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...m,value:m.value||"",className:"h-10"})}),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:m})=>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(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...m,value:m.value||"",className:"h-10"})}),t.jsx(X,{})]})}),t.jsx(q,{control:s.control,name:"stdio_args",render:({field:m})=>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(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...m,value:m.value||"",className:"h-10"})}),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:m})=>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(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...m,value:m.value||"",className:"h-10"})}),t.jsx(X,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(q,{control:s.control,name:"env_vars",render:({field:m})=>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(tt,{value:m.value??[],onChange:m.onChange})}),t.jsx(X,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(q,{control:s.control,name:"connection_token",render:({field:m})=>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(Be,{children:[t.jsx(Ge,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Vt,{variant:"success",className:"gap-1.5",children:[t.jsx(Lt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Bt,{size:12})]})})}),t.jsxs(qe,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(ft,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.has_connection_token&&m.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:()=>m.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-accent 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(J,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...m,value:m.value||"",className:"h-10"})}),d?t.jsxs(pe,{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(pe,{children:i("details.connectionSidebar.tokenSchemeHint")})]}),t.jsx(X,{})]})})]})}function Ss(s){return s.command==="npx"}function ys(s){return s.args?.find(e=>!e.startsWith("-"))??""}function _s(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,o=st(c.envVars);if(Ss(c)){const l=ys(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=_s(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:o}}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=!1,o=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=nt(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=it(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&&s.connection_token!==void 0,o=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:o},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ws({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:l,siblings:a}){const r=V(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Qe(),x=Ae(),{org:f}=te(),m=wt({onSuccess:()=>{a.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Q.useState(null),[j,N]=Q.useState(!1),_=Ie({connectionId:e}),{data:y}=We(),C=y?.data?.members??[],D=h??s,w=C.find(p=>p.userId===D.created_by),O=s?.connection_type==="VIRTUAL"||_.isAuthenticated,P={...s,tools:o},T=ot(P,Yt),S=Ye({resolver:Je(Qt),values:be(h??s)}),v=S.formState.isDirty,z=async()=>{if(!await S.trigger())return;const b=S.getValues(),I=Cs(b),k=h?.id??e;await x.update.mutateAsync({id:k,data:I}),S.reset(b)},E=()=>{S.reset(be(h??s))},M=async p=>{const b=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:I,tokenInfo:k,error:F}=await ct({connectionId:p,orgSlug:f.slug,...b?{scope:b}:{}});if(F||!I){Y.error(r("details.connection.authFailed",{error:F??""}));return}if(k)try{const Z=await fetch(`/api/${f.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:k.accessToken,refreshToken:k.refreshToken,expiresIn:k.expiresIn,scope:k.scope,clientId:k.clientId,clientSecret:k.clientSecret,tokenEndpoint:k.tokenEndpoint})});if(!Z.ok)console.error("Failed to save OAuth token:",await Z.text()),await x.update.mutateAsync({id:p,data:{connection_token:I}});else try{await x.update.mutateAsync({id:p,data:{}})}catch(Oe){console.warn("Failed to refresh connection tools after OAuth:",Oe)}}catch(Z){console.error("Error saving OAuth token:",Z),await x.update.mutateAsync({id:p,data:{connection_token:I}})}else await x.update.mutateAsync({id:p,data:{connection_token:I}});const W=new URL(`/api/${f.slug}/mcp/${p}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(W.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),Y.success(r("details.connection.authSuccess"))},A=()=>M(s.id),R=async()=>{try{const p=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!p.ok){const I=await p.text();Y.error(r("details.connection.failedRemoveOAuth",{error:I}));return}const b=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(b.href,null)}),Y.success(r("details.connection.oauthRemoved"))}catch(p){console.error("Error removing OAuth token:",p),Y.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(It,{...m}),t.jsx(ht,{open:h!==null,onOpenChange:p=>{p||g(null)},children:t.jsxs(gt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(jt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(vt,{className:"text-base",children:h?.title??s.title}),t.jsx(bt,{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(Ze,{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(Nt,{...S,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:S.control,name:"title",render:({field:p})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...p})}),t.jsx(X,{})]})}),t.jsx(q,{control:S.control,name:"description",render:({field:p})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(J,{...p,value:p.value||""})}),t.jsx(X,{})]})})]}),t.jsx(Ns,{form:S,connection:h??s,hasOAuthToken:_.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(at,{connection:h??s,form:S,hasMcpBinding:T,isMCPAuthenticated:O,supportsOAuth:_.supportsOAuth,isServerError:_.isServerError,onAuthenticate:A,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:z,disabled:!v||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),v&&t.jsx(B,{variant:"outline",onClick:E,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive",onClick:()=>{const p=h??s;g(null),m.requestDelete(p)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(lt,{children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(bs,{connection:s,displayTitle:(()=>{const p=a[0]??s;return p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ds,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(es,{instances:a,onConfigure:p=>g(p),onAuthenticate:p=>M(p.id),onDelete:p=>m.requestDelete(p),onToggleStatus:async(p,b)=>{try{await x.update.mutateAsync({id:p.id,data:{status:b}}),Y.success(r(b==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{N(!0);try{const p=a[0]??s,b=p.title.replace(/\s*\(\d+\)\s*$/,""),I=a.length+1,k=`${b} (${I})`,F=et("conn");await x.create.mutateAsync({id:F,title:k,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p.created_by,organization_id:p.organization_id,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null,oauth_config:null,configuration_state:p.configuration_state??null,metadata:null,tools:null,bindings:null});const W=new URL(`/api/${f.slug}/mcp/${F}`,window.location.origin),Z=await Ct({url:W.href,token:null,orgId:f.id});Z.supportsOAuth&&!Z.isAuthenticated&&await M(F)}catch(p){console.error("Failed to add connection instance:",p),Y.error(r("details.connection.failedAddInstance"))}finally{N(!1)}}}),t.jsx(xs,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(hs,{tools:o,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Is(){const s=U.c(43),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 o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:l}=Ke(o),{org:a}=te(),r=Ae();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=St(d),[x,f]=Q.useState(null),m=u.find(A=>A.id===x)??u[0]??null;m&&m.id!==x&&f(m.id);const h=m?.id??"",g=Pe({connectionId:h||null,orgId:a.id,orgSlug:a.slug});let j;s[4]!==g?(j={client:g},s[4]=g,s[5]=j):j=s[5];const{data:N}=yt(j),_=N?N.tools.map($s):(m?.tools??[]).map(Ds);let y;e:{if(u.length<=1){y=_;break e}const A=new Set,R=[],p=As;for(const b of u){const I=b.id===h?_:p(b.tools);for(const k of I)A.has(k.name)||(A.add(k.name),R.push(k))}y=R.length>0?R:_}const C=y;let D;s[6]!==g?(D={client:g},s[6]=g,s[7]=D):D=s[7];const{data:w}=_t(D);let $;s[8]!==g?($={client:g},s[8]=g,s[9]=$):$=s[9];const{data:O}=Xe($);let P;s[10]!==w?.prompts?(P=w?.prompts??[],s[10]=w?.prompts,s[11]=P):P=s[11];let T;s[12]!==P?(T=P.map(Ts),s[12]=P,s[13]=T):T=s[13];const S=T;let v;s[14]!==O?.resources?(v=O?.resources??[],s[14]=O?.resources,s[15]=v):v=s[15];let z;s[16]!==v?(z=v.map(ks),s[16]=v,s[17]=z):z=s[17];const E=z;if(!m){let A;s[18]!==e?(A=e("details.connection.notFoundTitle"),s[18]=e,s[19]=A):A=s[19];let R;s[20]!==e?(R=e("details.connection.notFoundDescription"),s[20]=e,s[21]=R):R=s[21];let p;s[22]!==c||s[23]!==l?(p=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[22]=c,s[23]=l,s[24]=p):p=s[24];let b;s[25]!==e?(b=e("details.connection.backButton"),s[25]=e,s[26]=b):b=s[26];let I;s[27]!==p||s[28]!==b?(I=t.jsx(B,{variant:"outline",onClick:p,children:b}),s[27]=p,s[28]=b,s[29]=I):I=s[29];let k;return s[30]!==A||s[31]!==R||s[32]!==I?(k=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(we,{title:A,description:R,actions:I})}),s[30]=A,s[31]=R,s[32]=I,s[33]=k):k=s[33],k}let M;return s[34]!==r.update.isPending||s[35]!==C||s[36]!==m||s[37]!==h||s[38]!==l||s[39]!==S||s[40]!==E||s[41]!==u?(M=t.jsx(ws,{org:l,connection:m,connectionId:h,isUpdating:r.update.isPending,tools:C,prompts:S,resources:E,siblings:u}),s[34]=r.update.isPending,s[35]=C,s[36]=m,s[37]=h,s[38]=l,s[39]=S,s[40]=E,s[41]=u,s[42]=M):M=s[42],M}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Ts(s){return{name:s.name,description:s.description}}function As(s){return(s??[]).map(Ps)}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Os(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(He,{children:t.jsx(Q.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Se,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Is,{})})}),s[0]=e):e=s[0],e}function vi(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Os,{}),s[0]=e):e=s[0],e}export{vi as default};
|
|
1
|
+
import{aH as Ne,dA as Me,dy as ze,aI as de,bC as Ee,c as U,b as V,j as t,h as Se,B,r as Q,m as ye,a6 as te,am as Re,V as me,K as ee,d as se,C as _e,au as Ce,gG as Ue,e0 as Fe,n as Ve,hA as ue,a5 as Le,I as J,_ as Be,X as Ge,Z as qe,Y as xe,R as He,f as Ke,hS as Xe,q as Qe,hf as We,aG as Ye,aF as Je,o as Ze,t as Y}from"./index-mb-jxjEy.js";import{g as et}from"./extract-connection-data-CzqnFJl9.js";import{E as we}from"./empty-state-DlNabApi.js";import{E as tt,r as st,b as nt,c as it}from"./connection-form-helpers-UXeTmEmu.js";import{c as ot,S as at,D as lt}from"./index-BPvzZzln.js";import{u as Ie,T as rt}from"./use-mcp-auth-status-BZRJODR4.js";import{a as ct}from"./mcp-oauth-Cya-fh0P.js";import{I as ae}from"./integration-icon-DRbGJhQo.js";import{s as dt}from"./Plus-WQeLSh07.js";import{b5 as mt,a4 as ut,a_ as xt,a5 as ne}from"./agent-icon-zvo6Zsex.js";import{a as ke,f as pt,s as ft}from"./Tool01-9Nk8XcOI.js";import{s as re}from"./Trash01-By8obgKt.js";import{b as ht,a as gt,c as jt,S as vt,d as bt}from"./sheet-Ctckoytn.js";import{F as q,b as H,c as K,d as L,f as X,e as pe,a as Nt}from"./form-CJTkS9yd.js";import{u as Te,a as Ae,b as St}from"./use-connection-DxwzNo03.js";import{u as Pe}from"./use-mcp-client-4k5JKqzF.js";import{u as yt}from"./use-mcp-tools-Dh4scI4V.js";import{a as _t}from"./use-mcp-prompts-pJuJ9yii.js";import{i as Ct}from"./mcp-oauth-_iPR8QjI.js";import{u as wt,D as It}from"./use-delete-connection-BMDl_PP-.js";import{c as kt}from"./monitoring-stats-row-CRxmylqh.js";import{c as Tt,b as At,C as Pt,a as Dt,B as $t}from"./chart-BZy9kWyI.js";import{C as Ot}from"./tooltipContext-2wUW4UR-.js";import{u as Mt}from"./repository-binding-w-FCDYuS.js";import{T as ie,a as zt,c as oe,b as Et}from"./tabs-DJ6SkMve.js";import{g as De}from"./connection-slug-DWaKdRBx.js";import{n as Rt}from"./BookOpen01-Bov9QL4X.js";import{g as ce}from"./types-BQYXFpO6.js";import{M as Ut}from"./mcp-app-renderer-B8_THT37.js";import{C as Ft}from"./collection-search-BpNjeFlC.js";import{B as Vt}from"./badge-Di6qp_17.js";import{S as fe,b as he,a as ge,d as je,c as G}from"./select-DnlDCB9E.js";import{i as Lt}from"./CheckCircle-C0mDI2jO.js";import{t as Bt}from"./ChevronDown-Cz82ih9S.js";import{n as Gt}from"./LinkBroken01-BPaKcMJ1.js";import{c as qt}from"./UserSquare-T90Jaoc-.js";import{s as Ht}from"./XClose-Bomoew3H.js";import{p as Kt,i as Xt}from"./connection-DezKWiQc.js";import{c as Qt}from"./schema-DU3GC-Ez.js";import"./metadata-D72DunRR.js";import"./Key01-DPEcpDw6.js";import"./auth--2gxCib9.js";import"./index-OaQ5Wven.js";import"./index-D2FJssDQ.js";import"./index-kPKwu4SB.js";import"./index-BdQq_4o_.js";import"./index-Dy0Aphio.js";import"./popover-D73VbCM5.js";import"./tooltip-DCzbfwd7.js";import"./index-B8ZkvDME.js";import"./SearchMd-CrM5HGUz.js";import"./use-mobile-CBwmaBFU.js";import"./use-navigate-to-agent-H87rWFYJ.js";import"./thread-intent-BQWCtBA_.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-7J-tc7Ge.js";import"./task-board-CShHcm1L.js";import"./schema-BluyjH2z.js";import"./session-runtime-D2GKulko.js";import"./Eye-BoMcImel.js";import"./AlertCircle-CngNmW3n.js";import"./UserCheck01-CuByTN5F.js";import"./ArrowUp-C9hRfWJJ.js";import"./ArrowLeft-7wIIyF4Y.js";import"./ArrowRight-Dyuh-rXZ.js";import"./Globe04-_51WnfFJ.js";import"./TrendUp01-D-BYwryf.js";import"./ChevronSelectorVertical-B_wf9OPd.js";import"./ChevronUp-CLsy4_cr.js";import"./CreditCard01-C7XdJQOf.js";import"./File02-BmbcQ1JX.js";import"./MessageCircle01-DEwhGd-N.js";import"./SwitchHorizontal01-HaaMuIs0.js";import"./Fingerprint04-CeWGcIpe.js";import"./Image01-nL5rafgN.js";import"./LayoutLeft-DFrTynS3.js";import"./Minus-CZtTY14n.js";import"./Monitor01-Dzk9r8YI.js";import"./Sun-BUSaNVU-.js";import"./Play-BNkIfSsq.js";import"./ShoppingBag01-Dvi8noNw.js";import"./Upload01-BPnZnmHF.js";import"./Users01-D1-vaLa3.js";import"./Zap-lo-lOcPp.js";import"./label-DFYaZzfV.js";import"./CartesianChart-DZFTbe0Q.js";import"./CategoricalChart-BJA3WMzp.js";import"./AreaChart-w2QCUzTm.js";import"./active-indicator-CCMhAsc_.js";import"./url-slug-E3otz4_J.js";const Wt=Ne({scopes:Ee(de()).describe("List of scopes available"),stateSchema:Me(de(),ze()).describe("JSON Schema (draft-07) defining the state structure")}),Yt=[{name:"MCP_CONFIGURATION",inputSchema:Ne({}),outputSchema:Wt}];function Jt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l}=s,a=V();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=Ie(r),x=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,f=n.status!=="active",m=x||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==m?(h=ye("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",m),e[2]=m,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 N;e[9]!==n.status||e[10]!==f||e[11]!==x||e[12]!==a?(N=x?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=x,e[12]=a,e[13]=N):N=e[13];let _;e[14]!==j||e[15]!==N?(_=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,N]}),e[14]=j,e[15]=N,e[16]=_):_=e[16];let y;e[17]!==n||e[18]!==x||e[19]!==o||e[20]!==a?(y=x&&t.jsx(B,{variant:"outline",size:"sm",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=x,e[19]=o,e[20]=a,e[21]=y):y=e[21];let C;e[22]!==n||e[23]!==f||e[24]!==l||e[25]!==a?(C=f?t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(mt,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground",onClick:()=>l(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(ut,{size:13})}),e[22]=n,e[23]=f,e[24]=l,e[25]=a,e[26]=C):C=e[26];let D;e[27]!==n||e[28]!==c?(D=()=>c(n),e[27]=n,e[28]=c,e[29]=D):D=e[29];let w;e[30]!==a?(w=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=w):w=e[31];let $;e[32]!==a?($=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=$):$=e[33];let O;e[34]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ke,{size:13}),e[34]=O):O=e[34];let P;e[35]!==D||e[36]!==w||e[37]!==$?(P=t.jsx(B,{variant:"ghost",size:"icon-sm",onClick:D,title:w,"aria-label":$,children:O}),e[35]=D,e[36]=w,e[37]=$,e[38]=P):P=e[38];let T;e[39]!==n||e[40]!==i?(T=()=>i(n),e[39]=n,e[40]=i,e[41]=T):T=e[41];let S;e[42]!==a?(S=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=S):S=e[43];let v;e[44]!==a?(v=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=v):v=e[45];let z;e[46]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(re,{size:13}),e[46]=z):z=e[46];let E;e[47]!==T||e[48]!==S||e[49]!==v?(E=t.jsx(B,{variant:"ghost-destructive",size:"icon-sm",onClick:T,title:S,"aria-label":v,children:z}),e[47]=T,e[48]=S,e[49]=v,e[50]=E):E=e[50];let M;e[51]!==P||e[52]!==E||e[53]!==y||e[54]!==C?(M=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,C,P,E]}),e[51]=P,e[52]=E,e[53]=y,e[54]=C,e[55]=M):M=e[55];let A;return e[56]!==M||e[57]!==h||e[58]!==g||e[59]!==_?(A=t.jsxs("div",{className:h,children:[g,_,M]}),e[56]=M,e[57]=h,e[58]=g,e[59]=_,e[60]=A):A=e[60],A}function Zt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=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 a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let r;e[8]!==o?(r=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=r):r=e[9];let d;e[10]!==o?(d=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ke,{size:13}),e[12]=u):u=e[12];let x;e[13]!==a||e[14]!==r||e[15]!==d?(x=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon-sm",onClick:a,title:r,"aria-label":d,children:u})}),e[13]=a,e[14]=r,e[15]=d,e[16]=x):x=e[16];let f;return e[17]!==i||e[18]!==l||e[19]!==x?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,x]}),e[17]=i,e[18]=l,e[19]=x,e[20]=f):f=e[20],f}function es(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l,onAdd:a,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 x;e[3]!==u?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=x):x=e[4];let f;e[5]!==r?(f=r?t.jsx(Se,{className:"size-[13px]"}):t.jsx(dt,{size:13}),e[5]=r,e[6]=f):f=e[6];let m;e[7]!==d?(m=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=m):m=e[8];let h;e[9]!==r||e[10]!==a||e[11]!==f||e[12]!==m?(h=t.jsxs(B,{variant:"default",size:"sm",className:"gap-1.5",onClick:a,disabled:r,children:[f,m]}),e[9]=r,e[10]=a,e[11]=f,e[12]=m,e[13]=h):h=e[13];let g;e[14]!==x||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,h]}),e[14]=x,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==l){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==l?(y=C=>t.jsx(Q.Suspense,{fallback:t.jsx(Zt,{instance:C,onConfigure:c}),children:t.jsx(Jt,{instance:C,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l})},C.id),e[23]=o,e[24]=c,e[25]=i,e[26]=l,e[27]=y):y=e[27],j=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=l,e[22]=j}else j=e[22];let N;e[28]!==j?(N=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=N):N=e[29];let _;return e[30]!==g||e[31]!==N?(_=t.jsxs("div",{className:"surface overflow-hidden",children:[g,N]}),e[30]=g,e[31]=N,e[32]=_):_=e[32],_}function ts(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const ss=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ns(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const is={calls:{label:"Tool calls"},errors:{label:"Errors"}};function os(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=V(),l=Re(),a=ns(o),{data:r}=me({queryKey:ee.connectionActivity(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=kt(r?.logs??[],a,void 0,r?.total,d?.total),x=u.data,f=u.totalCalls>0,m=ts(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),f?t.jsxs("div",{children:[t.jsx(Tt,{config:is,className:"h-16 w-full",children:t.jsxs(At,{data:x,barCategoryGap:"4%",children:[t.jsx(Pt,{content:t.jsx(Dt,{labelFormatter:rs}),cursor:{fill:"var(--muted)"}}),t.jsx($t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:x.map(ls)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-2xs text-muted-foreground",children:x[0]?.label}),t.jsx("span",{className:"text-2xs text-muted-foreground",children:x[x.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")})}),m.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:m.map(as)})]})]})}function as(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function ls(s,e){return t.jsx(Ot,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function rs(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function cs(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ds(s){const e=U.c(22),{connectionId:n}=s,c=V(),[o,i]=Q.useState("14d"),{org:l}=te();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let r;e[2]!==a?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,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]!==o?(u=ss.map(j=>t.jsx("button",{type:"button","aria-pressed":o===j.value,onClick:()=>i(j.value),className:ye("px-2.5 py-1 text-xs font-medium rounded-lg transition-colors",o===j.value?"bg-card text-foreground shadow-edge":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=o,e[7]=u):u=e[7];let x;e[8]!==d||e[9]!==u?(x=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]=x):x=e[10];let f;e[11]!==r||e[12]!==x?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,x]}),e[11]=r,e[12]=x,e[13]=f):f=e[13];let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(cs,{}),e[14]=m):m=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==o?(h=t.jsx(Q.Suspense,{fallback:m,children:t.jsx(os,{connectionId:n,orgId:l.id,timeframe:o})}),e[15]=n,e[16]=l.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"surface overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function ms(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=se();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const x=crypto.randomUUID();o({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:x}})},e[0]=o,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(_e,{size:16}),e[4]=l):l=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=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]!==a||e[13]!==r?(u=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-accent transition-colors group text-left w-full",children:[a,r,d]}),e[11]=i,e[12]=a,e[13]=r,e[14]=u):u=e[14],u}function us(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=a=>t.jsx(ms,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=l):l=e[4],o=n.map(l),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function xs(s){const e=U.c(13),{connection:n}=s,c=V(),{org:o}=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=Mt(i);if(!(l.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}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]!==o.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(us,{virtualMcps:l,org:o.slug})}),e[7]=o.slug,e[8]=l,e[9]=u):u=e[9];let x;return e[10]!==d||e[11]!==u?(x=t.jsxs("div",{className:"surface overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=x):x=e[12],x}function ps(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=V(),l=se(),{org:a}=te();let r;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(r={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=r):r=e[3];const d=Pe(r),u=Te(c);let x;e[4]!==u||e[5]!==c?(x=u?De(u):c,e[4]=u,e[5]=c,e[6]=x):x=e[6];const f=x,[m,h]=Q.useState("");let g,j,N,_;if(e[7]!==f||e[8]!==d||e[9]!==l||e[10]!==o||e[11]!==m||e[12]!==i||e[13]!==n){const D=(n??[]).filter(fs),w=m.toLowerCase().trim(),$=w?D.filter(v=>v.name.toLowerCase().includes(w)||v.description&&v.description.toLowerCase().includes(w)):D;let O;e[18]!==f||e[19]!==l||e[20]!==o?(O=v=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(v.name)}})},e[18]=f,e[19]=l,e[20]=o,e[21]=O):O=e[21];const P=O;N="flex flex-col h-full overflow-hidden";let T;e[22]!==i?(T=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=T):T=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=v=>{v.key==="Escape"&&(h(""),v.target.blur())},e[24]=S):S=e[24],e[25]!==m||e[26]!==T?(_=t.jsx(Ft,{value:m,onChange:h,placeholder:T,onKeyDown:S}),e[25]=m,e[26]=T,e[27]=_):_=e[27],g="flex-1 overflow-auto p-5",j=$.length===0?t.jsx(we,{image:null,title:i(m?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(m?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:$.map(v=>{const z=ce(v._meta);return t.jsxs(Ue,{size:"flush",className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>P(v),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Q.Suspense,{fallback:t.jsx(Fe,{className:"h-full w-full"}),children:t.jsx(Ut,{resourceURI:z,toolInfo:{tool:v},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:v.annotations?.title??v.name}),t.jsx(rt,{annotations:v.annotations,_meta:v._meta})]}),v.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:v.description})]})]},v.name)})}),e[7]=f,e[8]=d,e[9]=l,e[10]=o,e[11]=m,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=N,e[17]=_}else g=e[14],j=e[15],N=e[16],_=e[17];let y;e[28]!==g||e[29]!==j?(y=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=y):y=e[30];let C;return e[31]!==N||e[32]!==_||e[33]!==y?(C=t.jsxs("div",{className:N,children:[_,y]}),e[31]=N,e[32]=_,e[33]=y,e[34]=C):C=e[34],C}function fs(s){return!!ce(s._meta)}const ve=[];function $e(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"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=V();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function hs(s){const e=U.c(68),{tools:n,prompts:c,resources:o,connectionId:i,org:l}=s,a=c===void 0?ve:c,r=o===void 0?ve:o,d=V(),u=se(),x=Te(i??"");let f;e[0]!==x||e[1]!==i?(f=x?De(x):i,e[0]=x,e[1]=i,e[2]=f):f=e[2];const m=f;let h;e[3]!==m||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(I){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:m,collectionName:"tools",itemId:encodeURIComponent(I)}})},e[3]=m,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(vs),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const N=j;if(n.length+a.length+r.length===0){let b;e[12]!==d?(b=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=b):b=e[13];let I;e[14]!==b?(I=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:b}),e[14]=b,e[15]=I):I=e[15];let k;e[16]!==d?(k=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=k):k=e[17];let F;e[18]!==k?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:k}),e[18]=k,e[19]=F):F=e[19];let W;return e[20]!==I||e[21]!==F?(W=t.jsxs("div",{className:"surface p-5",children:[I,F]}),e[20]=I,e[21]=F,e[22]=W):W=e[22],W}let y;e[23]!==d||e[24]!==n.length?(y=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=y):y=e[25];let C;e[26]!==y?(C=t.jsx(ie,{value:"tools",variant:"underline",children:y}),e[26]=y,e[27]=C):C=e[27];let D;e[28]!==N||e[29]!==d?(D=N&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=N,e[29]=d,e[30]=D):D=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let $;e[33]!==w?($=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=$):$=e[34];let O;e[35]!==d?(O=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=O):O=e[36];let P;e[37]!==O?(P=t.jsx(ie,{value:"resources",variant:"underline",children:O}),e[37]=O,e[38]=P):P=e[38];let T;e[39]!==$||e[40]!==P||e[41]!==C||e[42]!==D?(T=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(zt,{variant:"underline",className:"gap-1",children:[C,D,$,P]})}),e[39]=$,e[40]=P,e[41]=C,e[42]=D,e[43]=T):T=e[43];let S;e[44]!==g||e[45]!==n?(S=n.length>0?n.map(b=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-accent transition-colors cursor-pointer",onClick:()=>g(b.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(pt,{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:$e(b.name)}),b.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:b.description})]}),t.jsx(Ce,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},b.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=S):S=e[46];let v;e[47]!==S?(v=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:S})}),e[47]=S,e[48]=v):v=e[48];let z;e[49]!==i||e[50]!==N||e[51]!==l||e[52]!==n?(z=N&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ps,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=N,e[51]=l,e[52]=n,e[53]=z):z=e[53];let E;e[54]!==a?(E=a.length>0?a.map(js):t.jsx(le,{label:"prompts"}),e[54]=a,e[55]=E):E=e[55];let M;e[56]!==E?(M=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[56]=E,e[57]=M):M=e[57];let A;e[58]!==r?(A=r.length>0?r.map(gs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let p;return e[62]!==T||e[63]!==v||e[64]!==z||e[65]!==M||e[66]!==R?(p=t.jsx("div",{className:"surface overflow-hidden",children:t.jsxs(Et,{defaultValue:"tools",variant:"underline",children:[T,v,z,M,R]})}),e[62]=T,e[63]=v,e[64]=z,e[65]=M,e[66]=R,e[67]=p):p=e[67],p}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(xt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function js(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Rt,{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:$e(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 vs(s){return ce(s._meta)}function bs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(ae,{icon:n.icon,name:o,size:"md",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let l;e[3]!==o?(l=t.jsx(Ve.Title,{children:o}),e[3]=o,e[4]=l):l=e[4];let a;e[5]!==n.description?(a=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]=a):a=e[6];let r;e[7]!==l||e[8]!==a?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[7]=l,e[8]=a,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 Ns({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=V(),l=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Le(),d=(()=>{if(typeof a!="string"||!a)return!1;try{const m=new URL(a);return m.hostname==="api.githubcopilot.com"&&m.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",f=x?Kt(e.connection_url):null;return x?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(_e,{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")})]}),f&&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:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(q,{control:s.control,name:"ui_type",render:({field:m})=>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(fe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsxs(he,{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(ge,{})]})}),t.jsxs(je,{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(J,{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(fe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsx(he,{className:"h-10",children:t.jsx(ge,{})})}),t.jsxs(je,{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:m})=>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(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...m,value:m.value||"",className:"h-10"})}),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:m})=>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(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...m,value:m.value||"",className:"h-10"})}),t.jsx(X,{})]})}),t.jsx(q,{control:s.control,name:"stdio_args",render:({field:m})=>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(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...m,value:m.value||"",className:"h-10"})}),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:m})=>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(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...m,value:m.value||"",className:"h-10"})}),t.jsx(X,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(q,{control:s.control,name:"env_vars",render:({field:m})=>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(tt,{value:m.value??[],onChange:m.onChange})}),t.jsx(X,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(q,{control:s.control,name:"connection_token",render:({field:m})=>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(Be,{children:[t.jsx(Ge,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Vt,{variant:"success",className:"gap-1.5",children:[t.jsx(Lt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Bt,{size:12})]})})}),t.jsxs(qe,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(ft,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.has_connection_token&&m.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:()=>m.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-accent 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(J,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...m,value:m.value||"",className:"h-10"})}),d?t.jsxs(pe,{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(pe,{children:i("details.connectionSidebar.tokenSchemeHint")})]}),t.jsx(X,{})]})})]})}function Ss(s){return s.command==="npx"}function ys(s){return s.args?.find(e=>!e.startsWith("-"))??""}function _s(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,o=st(c.envVars);if(Ss(c)){const l=ys(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=_s(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:o}}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=!1,o=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=nt(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=it(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&&s.connection_token!==void 0,o=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:o},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ws({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:l,siblings:a}){const r=V(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Qe(),x=Ae(),{org:f}=te(),m=wt({onSuccess:()=>{a.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Q.useState(null),[j,N]=Q.useState(!1),_=Ie({connectionId:e}),{data:y}=We(),C=y?.data?.members??[],D=h??s,w=C.find(p=>p.userId===D.created_by),O=s?.connection_type==="VIRTUAL"||_.isAuthenticated,P={...s,tools:o},T=ot(P,Yt),S=Ye({resolver:Je(Qt),values:be(h??s)}),v=S.formState.isDirty,z=async()=>{if(!await S.trigger())return;const b=S.getValues(),I=Cs(b),k=h?.id??e;await x.update.mutateAsync({id:k,data:I}),S.reset(b)},E=()=>{S.reset(be(h??s))},M=async p=>{const b=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:I,tokenInfo:k,error:F}=await ct({connectionId:p,orgSlug:f.slug,...b?{scope:b}:{}});if(F||!I){Y.error(r("details.connection.authFailed",{error:F??""}));return}if(k)try{const Z=await fetch(`/api/${f.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:k.accessToken,refreshToken:k.refreshToken,expiresIn:k.expiresIn,scope:k.scope,clientId:k.clientId,clientSecret:k.clientSecret,tokenEndpoint:k.tokenEndpoint})});if(!Z.ok)console.error("Failed to save OAuth token:",await Z.text()),await x.update.mutateAsync({id:p,data:{connection_token:I}});else try{await x.update.mutateAsync({id:p,data:{}})}catch(Oe){console.warn("Failed to refresh connection tools after OAuth:",Oe)}}catch(Z){console.error("Error saving OAuth token:",Z),await x.update.mutateAsync({id:p,data:{connection_token:I}})}else await x.update.mutateAsync({id:p,data:{connection_token:I}});const W=new URL(`/api/${f.slug}/mcp/${p}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(W.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),Y.success(r("details.connection.authSuccess"))},A=()=>M(s.id),R=async()=>{try{const p=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!p.ok){const I=await p.text();Y.error(r("details.connection.failedRemoveOAuth",{error:I}));return}const b=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(b.href,null)}),Y.success(r("details.connection.oauthRemoved"))}catch(p){console.error("Error removing OAuth token:",p),Y.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(It,{...m}),t.jsx(ht,{open:h!==null,onOpenChange:p=>{p||g(null)},children:t.jsxs(gt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(jt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(vt,{className:"text-base",children:h?.title??s.title}),t.jsx(bt,{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(Ze,{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(Nt,{...S,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:S.control,name:"title",render:({field:p})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...p})}),t.jsx(X,{})]})}),t.jsx(q,{control:S.control,name:"description",render:({field:p})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(J,{...p,value:p.value||""})}),t.jsx(X,{})]})})]}),t.jsx(Ns,{form:S,connection:h??s,hasOAuthToken:_.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(at,{connection:h??s,form:S,hasMcpBinding:T,isMCPAuthenticated:O,supportsOAuth:_.supportsOAuth,isServerError:_.isServerError,onAuthenticate:A,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:z,disabled:!v||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),v&&t.jsx(B,{variant:"outline",onClick:E,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive",onClick:()=>{const p=h??s;g(null),m.requestDelete(p)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(lt,{children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(bs,{connection:s,displayTitle:(()=>{const p=a[0]??s;return p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ds,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(es,{instances:a,onConfigure:p=>g(p),onAuthenticate:p=>M(p.id),onDelete:p=>m.requestDelete(p),onToggleStatus:async(p,b)=>{try{await x.update.mutateAsync({id:p.id,data:{status:b}}),Y.success(r(b==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{N(!0);try{const p=a[0]??s,b=p.title.replace(/\s*\(\d+\)\s*$/,""),I=a.length+1,k=`${b} (${I})`,F=et("conn");await x.create.mutateAsync({id:F,title:k,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p.created_by,organization_id:p.organization_id,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null,oauth_config:null,configuration_state:p.configuration_state??null,metadata:null,tools:null,bindings:null});const W=new URL(`/api/${f.slug}/mcp/${F}`,window.location.origin),Z=await Ct({url:W.href,token:null,orgId:f.id});Z.supportsOAuth&&!Z.isAuthenticated&&await M(F)}catch(p){console.error("Failed to add connection instance:",p),Y.error(r("details.connection.failedAddInstance"))}finally{N(!1)}}}),t.jsx(xs,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(hs,{tools:o,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Is(){const s=U.c(43),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 o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:l}=Ke(o),{org:a}=te(),r=Ae();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=St(d),[x,f]=Q.useState(null),m=u.find(A=>A.id===x)??u[0]??null;m&&m.id!==x&&f(m.id);const h=m?.id??"",g=Pe({connectionId:h||null,orgId:a.id,orgSlug:a.slug});let j;s[4]!==g?(j={client:g},s[4]=g,s[5]=j):j=s[5];const{data:N}=yt(j),_=N?N.tools.map($s):(m?.tools??[]).map(Ds);let y;e:{if(u.length<=1){y=_;break e}const A=new Set,R=[],p=As;for(const b of u){const I=b.id===h?_:p(b.tools);for(const k of I)A.has(k.name)||(A.add(k.name),R.push(k))}y=R.length>0?R:_}const C=y;let D;s[6]!==g?(D={client:g},s[6]=g,s[7]=D):D=s[7];const{data:w}=_t(D);let $;s[8]!==g?($={client:g},s[8]=g,s[9]=$):$=s[9];const{data:O}=Xe($);let P;s[10]!==w?.prompts?(P=w?.prompts??[],s[10]=w?.prompts,s[11]=P):P=s[11];let T;s[12]!==P?(T=P.map(Ts),s[12]=P,s[13]=T):T=s[13];const S=T;let v;s[14]!==O?.resources?(v=O?.resources??[],s[14]=O?.resources,s[15]=v):v=s[15];let z;s[16]!==v?(z=v.map(ks),s[16]=v,s[17]=z):z=s[17];const E=z;if(!m){let A;s[18]!==e?(A=e("details.connection.notFoundTitle"),s[18]=e,s[19]=A):A=s[19];let R;s[20]!==e?(R=e("details.connection.notFoundDescription"),s[20]=e,s[21]=R):R=s[21];let p;s[22]!==c||s[23]!==l?(p=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[22]=c,s[23]=l,s[24]=p):p=s[24];let b;s[25]!==e?(b=e("details.connection.backButton"),s[25]=e,s[26]=b):b=s[26];let I;s[27]!==p||s[28]!==b?(I=t.jsx(B,{variant:"outline",onClick:p,children:b}),s[27]=p,s[28]=b,s[29]=I):I=s[29];let k;return s[30]!==A||s[31]!==R||s[32]!==I?(k=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(we,{title:A,description:R,actions:I})}),s[30]=A,s[31]=R,s[32]=I,s[33]=k):k=s[33],k}let M;return s[34]!==r.update.isPending||s[35]!==C||s[36]!==m||s[37]!==h||s[38]!==l||s[39]!==S||s[40]!==E||s[41]!==u?(M=t.jsx(ws,{org:l,connection:m,connectionId:h,isUpdating:r.update.isPending,tools:C,prompts:S,resources:E,siblings:u}),s[34]=r.update.isPending,s[35]=C,s[36]=m,s[37]=h,s[38]=l,s[39]=S,s[40]=E,s[41]=u,s[42]=M):M=s[42],M}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Ts(s){return{name:s.name,description:s.description}}function As(s){return(s??[]).map(Ps)}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Os(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(He,{children:t.jsx(Q.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Se,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Is,{})})}),s[0]=e):e=s[0],e}function vi(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Os,{}),s[0]=e):e=s[0],e}export{vi as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as z,j as c,I as T,B as N}from"./index-
|
|
1
|
+
import{c as z,j as c,I as T,B as N}from"./index-mb-jxjEy.js";import{s as A}from"./Plus-WQeLSh07.js";import{s as H}from"./Trash01-By8obgKt.js";function S(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(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function $(n){const e=z.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:k}=n,p=o===void 0?"VARIABLE_NAME":o,h=s===void 0?"value...":s;let _;e[0]!==r||e[1]!==t?(_=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=_):_=e[2];const C=_;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((u,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let b;e[6]!==r||e[7]!==t?(b=(l,u)=>{const i=[...t],a=i[l];a&&(i[l]={key:u,value:a.value},r(i))},e[6]=r,e[7]=t,e[8]=b):b=e[8];const v=b;let P;e[9]!==r||e[10]!==t?(P=(l,u)=>{const i=[...t],a=i[l];a&&(i[l]={key:a.key,value:u},r(i))},e[9]=r,e[10]=t,e[11]=P):P=e[11];const g=P;let f;if(e[12]!==v||e[13]!==y||e[14]!==g||e[15]!==p||e[16]!==t||e[17]!==h){let l;e[19]!==v||e[20]!==y||e[21]!==g||e[22]!==p||e[23]!==h?(l=(u,i)=>c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx(T,{placeholder:p,value:u.key,onChange:a=>v(i,a.target.value),className:"h-10 flex-1 font-mono"}),c.jsx(T,{type:S(u.key)?"password":"text",placeholder:h,value:u.value,onChange:a=>g(i,a.target.value),className:"h-10 flex-1"}),c.jsx(N,{type:"button",variant:"ghost-destructive",size:"icon",className:"size-10 shrink-0",onClick:()=>y(i),children:c.jsx(H,{size:16})})]},i),e[19]=v,e[20]=y,e[21]=g,e[22]=p,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=v,e[13]=y,e[14]=g,e[15]=p,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=c.jsx(A,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let m;e[26]!==C?(m=c.jsxs(N,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:C,children:[w,"Add Environment Variable"]}),e[26]=C,e[27]=m):m=e[27];let d;e[28]!==f||e[29]!==m?(d=c.jsxs("div",{className:"flex flex-col gap-2",children:[f,m]}),e[28]=f,e[29]=m,e[30]=d):d=e[30];let E;return e[31]!==k||e[32]!==d?(E=c.jsx("div",{className:k,children:d}),e[31]=k,e[32]=d,e[33]=E):E=e[33],E}function R(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function K(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function j(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 W(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 o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function B(n){const{uiType:e}=n,t=j(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===j("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 G(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=j(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(p=>j(p.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function U(n,e){const t={command:"npx",args:["-y",n]},r=R(e);return Object.keys(r).length>0&&(t.envVars=r),t}function M(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=R(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{$ as E,G as a,U as b,M as c,B as i,W as p,K as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e}from"./session-runtime-
|
|
1
|
+
import{e}from"./session-runtime-D2GKulko.js";function s(r){if(r.app_name)return r.app_name;if(r.connection_url)try{const t=new URL(r.connection_url),a=((t.port?`${t.hostname}-${t.port}`:t.hostname)+t.pathname).replace(/\/+$/,"");return e(a)}catch{return e(r.connection_url)}return r.title?e(r.title):r.id??"unknown"}export{s as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as z,c as W,b as ne,j as t,aJ as We,aK as Xe,aL as Ge,aM as Qe,b9 as qe,aN as Je,aO as Ye,aP as Ze,B as L,h as de,m as he,Y as ie,x as Ne,aU as Te,w as Ae,y as we,v as Ie,D as Pe,X as et,_ as tt,Z as nt,R as ot,a6 as Me,d as $e,u as st,a as Oe,a5 as it,as as ye,at as ct,av as lt,aG as rt,aF as at,n as pe,I as oe,E as te,q as dt,am as ut,t as R,cI as gt,K as mt,go as pt}from"./index-BGvfgBXQ.js";import{a as Fe,g as ft,e as ht}from"./extract-connection-data-BwsA-RYq.js";import{C as xt}from"./collection-display-button-BS2sbab3.js";import{S as jt}from"./search-toggle-BEH-S2im.js";import{C as St}from"./collection-tabs-BsiuG_yk.js";import{C as Ce,u as Ue,g as yt}from"./connection-card-DbjUpBUS.js";import{E as Ct}from"./empty-state-B5kfNSn2.js";import{u as vt,D as bt}from"./use-delete-connection-KjVy0n0M.js";import{u as _t}from"./use-infinite-scroll-DuNc__Oo.js";import{u as Ve}from"./use-mobile-B4kazYmP.js";import{g as ae}from"./connection-slug-xMtStNjP.js";import{n as xe}from"./LinkBroken01-sFiApfPs.js";import{g as Dt,a as kt}from"./metadata-D72DunRR.js";import{D as Nt,a as Tt,e as At,b as wt,c as It,f as Pt,g as Mt}from"./drawer-CQosC7Hh.js";import{F as Q,b as q,c as J,d as Y,f as Z,a as De}from"./form-Bmlz7qRb.js";import{S as $t,b as Ot,a as Ft,d as Ut,c as re}from"./select-BH6i4t87.js";import{T as Vt}from"./textarea-C_mtz3Kv.js";import{a as ze,b as zt}from"./use-connection-dER7f5j5.js";import{m as Lt}from"./use-mcp-client-CsG2AAiF.js";import{u as Bt}from"./repository-binding-DrxBu24C.js";import{g as Et}from"./types-DeHdmC2C.js";import{A as Kt,bB as Ht,a4 as Rt,b5 as Wt,a5 as Se}from"./agent-icon-CFsULo4q.js";import{s as Le}from"./Plus-KLH-MPJh.js";import{c as Xt}from"./UserSquare-BAlzvt_y.js";import{s as Be}from"./XClose-CQjSvos9.js";import{s as Gt}from"./use-project-scope-DaSiwM20.js";import{c as Qt}from"./schema-DklwT0XH.js";import{i as fe,a as ke,E as qt,p as Jt,b as Yt,c as Zt}from"./connection-form-helpers-tAcDvyB7.js";import{a as en}from"./authenticate-and-persist-oauth-D7yFnk3v.js";import{I as tn}from"./integration-icon-nO6TvSsO.js";import{C as Ee}from"./checkbox-DR00CmJr.js";import{a as nn}from"./SwitchHorizontal01-BRSeU65r.js";import{s as Ke}from"./Eye-CE9bd3Ra.js";import{s as He}from"./Trash01-1e348d5z.js";import"./connection-C7PBWSJ2.js";import"./url-slug-Bt323BC1.js";import"./ArrowUp-bsUZSt57.js";import"./tooltip-D0-ybZJ-.js";import"./index-CpqnzQ6X.js";import"./toggle-group-BjeGXB13.js";import"./active-indicator-CCMhAsc_.js";import"./badge-xkOOGTR2.js";import"./SearchMd-1p8IP99o.js";import"./icon-button-CkP-MdlY.js";import"./useInfiniteQuery-Comohppg.js";import"./infiniteQueryObserver-CjHha6VI.js";import"./session-runtime-CnePJMYk.js";import"./label-2ri5y0AT.js";import"./index-BdQq_4o_.js";import"./ChevronDown-C0zFtKr8.js";import"./ChevronUp-CHkdbh-i.js";import"./auth-WUI0GELm.js";import"./AlertCircle-BPb6lfDc.js";import"./UserCheck01-Dq2vpnim.js";import"./Tool01-CIkfFpNs.js";import"./ArrowLeft-D_px05Ip.js";import"./ArrowRight-DYc-7xj5.js";import"./BookOpen01-CKzuPfPT.js";import"./Globe04-BK5-p2nj.js";import"./CheckCircle-Dvda272I.js";import"./TrendUp01-Sag3n7qI.js";import"./ChevronSelectorVertical-BtbkxpS7.js";import"./CreditCard01-BnEtKIxX.js";import"./File02-OGn6eCfs.js";import"./MessageCircle01-LN8Gr1lL.js";import"./Fingerprint04-ZnmHU3Kp.js";import"./Image01-Do_f-fPi.js";import"./Key01-C2Ozqf6q.js";import"./LayoutLeft-tXOkIxzs.js";import"./Minus-vz8sJtmc.js";import"./Monitor01-Ctq4Y9xp.js";import"./Sun-8QBdDNyc.js";import"./Play-B5OMs0GO.js";import"./ShoppingBag01-BZ5p5Jaw.js";import"./Upload01-DQiq1N5L.js";import"./Users01-CJNRoJXK.js";import"./Zap-BbT-W69e.js";import"./mcp-oauth-Be_pa5Ik.js";import"./mcp-oauth-Bppcz_3X.js";function on(o){const e=`deco-filters-${o}`,[n,g]=z.useState(()=>{try{const i=globalThis.localStorage?.getItem(e);if(i)return JSON.parse(i)}catch(i){console.error("Failed to parse stored filters:",i)}return[]});return[n,i=>{g(i);try{globalThis.localStorage?.setItem(e,JSON.stringify(i))}catch(l){console.error("Failed to save filters:",l)}}]}function sn(o){const e=W.c(7),[n,g]=z.useState(o),[s,i]=z.useState(o?"desc":null);let l;e[0]!==s||e[1]!==n?(l=p=>{n!==p?(g(p),i("asc")):s==="asc"?i("desc"):s==="desc"&&(g(void 0),i(null))},e[0]=s,e[1]=n,e[2]=l):l=e[2];const r=l;let d;return e[3]!==r||e[4]!==s||e[5]!==n?(d={sortKey:n,sortDirection:s,handleSort:r},e[3]=r,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}function cn(o,e){const n=W.c(12),g=e===void 0?"cards":e,s=Ve(),i=z.useRef(s),l=o?`deco-view-mode-${o}`:"deco-view-mode";let r;n[0]!==g||n[1]!==l?(r=()=>{const S=globalThis.localStorage?.getItem(l);return S==="cards"||S==="table"?S:g},n[0]=g,n[1]=l,n[2]=r):r=n[2];const[d,p]=z.useState(r);let m;n[3]!==l?(m=S=>{p(S),globalThis.localStorage?.setItem(l,S)},n[3]=l,n[4]=m):m=n[4];const u=m;let a,j;n[5]!==s||n[6]!==d?(a=()=>{!i.current&&s&&d==="table"&&p("cards"),i.current=s},j=[s,d],n[5]=s,n[6]=d,n[7]=a,n[8]=j):(a=n[7],j=n[8]),z.useEffect(a,j);let f;return n[9]!==u||n[10]!==d?(f=[d,u],n[9]=u,n[10]=d,n[11]=f):f=n[11],f}function ln(o){const e=W.c(20),{namespace:n,resource:g,defaultSortKey:s,defaultViewMode:i}=o,l=s===void 0?"title":s,r=i===void 0?"table":i,[d,p]=z.useState(""),m=z.useDeferredValue(d),u=`${n}-${g}`,[a,j]=on(u),f=`studio-${g}-filter-visible-${n}`;let S;e[0]!==f?(S=()=>globalThis.localStorage?.getItem(f)==="true",e[0]=f,e[1]=S):S=e[1];const[y,v]=z.useState(S);let C;e[2]!==f?(C=$=>{v($),globalThis.localStorage?.setItem(f,String($))},e[2]=f,e[3]=C):C=e[3];const c=C;let h;e[4]!==y||e[5]!==c?(h=()=>{c(!y)},e[4]=y,e[5]=c,e[6]=h):h=e[6];const w=h,[N,T]=cn(`studio-${g}-${n}`,r),{sortKey:M,sortDirection:I,handleSort:O}=sn(l),P=M;let k;return e[7]!==y||e[8]!==a||e[9]!==O||e[10]!==d||e[11]!==m||e[12]!==c||e[13]!==j||e[14]!==T||e[15]!==I||e[16]!==P||e[17]!==w||e[18]!==N?(k={search:d,searchTerm:m,setSearch:p,filters:a,setFilters:j,filterBarVisible:y,setFilterBarVisible:c,toggleFilterBar:w,viewMode:N,setViewMode:T,sortKey:P,sortDirection:I,handleSort:O},e[7]=y,e[8]=a,e[9]=O,e[10]=d,e[11]=m,e[12]=c,e[13]=j,e[14]=T,e[15]=I,e[16]=P,e[17]=w,e[18]=N,e[19]=k):k=e[19],k}function rn(o){const e=W.c(35),{open:n,onOpenChange:g,count:s,onConfirm:i}=o,l=ne(),r=s===1?"orgs.bulkDeleteDialog.deleteTitleSingular":"orgs.bulkDeleteDialog.deleteTitlePlural";let d;e[0]!==s||e[1]!==l||e[2]!==r?(d=l(r,{count:s}),e[0]=s,e[1]=l,e[2]=r,e[3]=d):d=e[3];let p;e[4]!==d?(p=t.jsx(We,{children:d}),e[4]=d,e[5]=p):p=e[5];const m=s===1?"orgs.bulkDeleteDialog.deleteDescriptionSingular":"orgs.bulkDeleteDialog.deleteDescriptionPlural";let u;e[6]!==l||e[7]!==m?(u=l(m),e[6]=l,e[7]=m,e[8]=u):u=e[8];let a;e[9]!==u?(a=t.jsx(Xe,{children:u}),e[9]=u,e[10]=a):a=e[10];let j;e[11]!==p||e[12]!==a?(j=t.jsxs(Ge,{children:[p,a]}),e[11]=p,e[12]=a,e[13]=j):j=e[13];let f;e[14]!==l?(f=l("orgs.bulkDeleteDialog.cancelButton"),e[14]=l,e[15]=f):f=e[15];let S;e[16]!==f?(S=t.jsx(Qe,{children:f}),e[16]=f,e[17]=S):S=e[17];const y=s===1?"orgs.bulkDeleteDialog.deleteButtonSingular":"orgs.bulkDeleteDialog.deleteButtonPlural";let v;e[18]!==s||e[19]!==l||e[20]!==y?(v=l(y,{count:s}),e[18]=s,e[19]=l,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==i||e[23]!==v?(C=t.jsx(qe,{onClick:i,variant:"destructive",children:v}),e[22]=i,e[23]=v,e[24]=C):C=e[24];let c;e[25]!==C||e[26]!==S?(c=t.jsxs(Je,{children:[S,C]}),e[25]=C,e[26]=S,e[27]=c):c=e[27];let h;e[28]!==c||e[29]!==j?(h=t.jsxs(Ye,{children:[j,c]}),e[28]=c,e[29]=j,e[30]=h):h=e[30];let w;return e[31]!==g||e[32]!==n||e[33]!==h?(w=t.jsx(Ze,{open:n,onOpenChange:g,children:h}),e[31]=g,e[32]=n,e[33]=h,e[34]=w):w=e[34],w}function an(o){const e=W.c(39),{item:n,canManage:g,allConnections:s,connectedAppNames:i,connectingItemId:l,onNavigateConnected:r,onConnect:d}=o,p=ne();let m,u;e[0]!==i||e[1]!==n?(m=Fe(n)??"",u=i.has(m),e[0]=i,e[1]=n,e[2]=m,e[3]=u):(m=e[2],u=e[3]);const a=u;let j;e[4]!==n._meta?(j=Dt(n._meta),e[4]=n._meta,e[5]=j):j=e[5];const f=j,S=f?.friendlyName||f?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",y=n.server?.description||n.description||null;let v;e[6]!==n.server?.icons?.[0]?.src||e[7]!==n.server?.repository?(v=n.server?.icons?.[0]?.src||kt(n.server?.repository)||null,e[6]=n.server?.icons?.[0]?.src,e[7]=n.server?.repository,e[8]=v):v=e[8];const C=v;let c;if(e[9]!==s||e[10]!==m){let U;e[12]!==m?(U=X=>X.connection_type!=="VIRTUAL"&&X.app_name===m,e[12]=m,e[13]=U):U=e[13],c=s.filter(U),e[9]=s,e[10]=m,e[11]=c}else c=e[11];const h=c,w=a||g;let N,T;e[14]!==h||e[15]!==a||e[16]!==n||e[17]!==d||e[18]!==r?(N=()=>{if(a){const U=h[0];U&&r(U);return}T()},T=()=>d(n),e[14]=h,e[15]=a,e[16]=n,e[17]=d,e[18]=r,e[19]=N,e[20]=T):(N=e[19],T=e[20]);let M;e[21]!==y||e[22]!==C||e[23]!==S?(M={title:S,description:y,icon:C},e[21]=y,e[22]=C,e[23]=S,e[24]=M):M=e[24];let I;e[25]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(xe,{}),e[25]=I):I=e[25];const O=w?N:void 0;let P;e[26]!==g||e[27]!==l||e[28]!==T||e[29]!==a||e[30]!==n.id||e[31]!==p?(P=a?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:p("orgs.catalogItemCard.connected")}):g&&t.jsx(L,{variant:"outline",size:"sm",disabled:l!==null,onClick:U=>{U.stopPropagation(),T()},children:l===n.id?t.jsx(de,{className:"size-3.5"}):p("orgs.catalogItemCard.connect")}),e[26]=g,e[27]=l,e[28]=T,e[29]=a,e[30]=n.id,e[31]=p,e[32]=P):P=e[32];let k;e[33]!==P?(k=t.jsx("div",{className:"flex items-center gap-2",children:P}),e[33]=P,e[34]=k):k=e[34];let $;return e[35]!==M||e[36]!==O||e[37]!==k?($=t.jsx(Ce,{connection:M,fallbackIcon:I,onClick:O,headerActionsAlwaysVisible:!0,headerActions:k}),e[35]=M,e[36]=O,e[37]=k,e[38]=$):$=e[38],$}function dn(o){return o?.length?{appToolName:o.find(n=>!!Et(n._meta))?.name??null}:null}const un=3;function gn(o){const e=new Map;for(const n of o)for(const g of n.connections??[]){const s=e.get(g.connection_id)??[];s.push(n),e.set(g.connection_id,s)}return e}function mn(o){const e=W.c(21),{projects:n}=o,g=ne();if(n.length===0){let u;e[0]!==g?(u=g("projects.connections.orgWide"),e[0]=g,e[1]=u):u=e[1];let a;return e[2]!==u?(a=t.jsx("span",{className:"text-xs text-muted-foreground",children:u}),e[2]=u,e[3]=a):a=e[3],a}let s,i,l;if(e[4]!==n){const u=n.slice(0,un);l="flex min-w-0 items-center gap-2",s="flex shrink-0 -space-x-1.5",i=u.map(pn),e[4]=n,e[5]=s,e[6]=i,e[7]=l}else s=e[5],i=e[6],l=e[7];let r;e[8]!==s||e[9]!==i?(r=t.jsx("div",{className:s,children:i}),e[8]=s,e[9]=i,e[10]=r):r=e[10];let d;e[11]!==n[0]?.title||e[12]!==n.length||e[13]!==g?(d=n.length===1?n[0]?.title:g("projects.connections.usedBy",{count:n.length}),e[11]=n[0]?.title,e[12]=n.length,e[13]=g,e[14]=d):d=e[14];let p;e[15]!==d?(p=t.jsx("span",{className:"truncate text-xs text-muted-foreground",children:d}),e[15]=d,e[16]=p):p=e[16];let m;return e[17]!==l||e[18]!==r||e[19]!==p?(m=t.jsxs("div",{className:l,children:[r,p]}),e[17]=l,e[18]=r,e[19]=p,e[20]=m):m=e[20],m}function pn(o){return t.jsx("span",{className:"rounded-md ring-2 ring-card",title:o.title,children:t.jsx(Kt,{icon:o.icon,name:o.title,size:"xs"})},o.id)}function Re(o){const e=W.c(8),{selectionMode:n,children:g}=o,s=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let i;e[0]!==s?(i=he("overflow-hidden transition-all duration-150 ease-out",s),e[0]=s,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(et,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:hn,children:t.jsx(nn,{size:20})})}),e[2]=l):l=e[2];let r;e[3]!==g?(r=t.jsxs(tt,{children:[l,t.jsx(nt,{align:"end",onClick:fn,children:g})]}),e[3]=g,e[4]=r):r=e[4];let d;return e[5]!==i||e[6]!==r?(d=t.jsx("div",{className:i,children:r}),e[5]=i,e[6]=r,e[7]=d):d=e[7],d}function fn(o){return o.stopPropagation()}function hn(o){return o.stopPropagation()}function xn(o){const e=W.c(57),{group:n,onOpen:g,selectionMode:s,selectedIds:i,onToggleSelect:l}=o,r=ne();let d;if(e[0]!==n.connections||e[1]!==i){let x;e[3]!==i?(x=A=>i.has(A.id),e[3]=i,e[4]=x):x=e[4],d=n.connections.every(x),e[0]=n.connections,e[1]=i,e[2]=d}else d=e[2];const p=d;let m;if(e[5]!==n.connections||e[6]!==i){let x;e[8]!==i?(x=A=>i.has(A.id),e[8]=i,e[9]=x):x=e[9],m=n.connections.some(x),e[5]=n.connections,e[6]=i,e[7]=m}else m=e[7];const u=m;let a;e[10]!==p||e[11]!==n.connections||e[12]!==l||e[13]!==i?(a=()=>{for(const x of n.connections)p?i.has(x.id)&&l(x.id):i.has(x.id)||l(x.id)},e[10]=p,e[11]=n.connections,e[12]=l,e[13]=i,e[14]=a):a=e[14];const j=a,f=n.title,S=n.icon;let y;e[15]!==n.connections.length||e[16]!==r?(y=r("orgs.connectionSelectionUi.instancesCount",{count:n.connections.length}),e[15]=n.connections.length,e[16]=r,e[17]=y):y=e[17];let v;e[18]!==n.icon||e[19]!==n.title||e[20]!==y?(v={title:f,icon:S,description:y},e[18]=n.icon,e[19]=n.title,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==g||e[23]!==s||e[24]!==j?(C=()=>s?j():g(),e[22]=g,e[23]=s,e[24]=j,e[25]=C):C=e[25];const c=s&&p&&"ring-2 ring-primary",h=s&&u&&!p&&"ring-1 ring-primary/50";let w;e[26]!==h||e[27]!==c?(w=he(c,h),e[26]=h,e[27]=c,e[28]=w):w=e[28];const N=s?p?!0:u&&"mixed":void 0;let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(xe,{}),e[29]=T):T=e[29];let M;e[30]!==p||e[31]!==n.connections.length||e[32]!==s||e[33]!==u||e[34]!==r||e[35]!==j?(M=s?t.jsx(Ee,{checked:p?!0:u?"indeterminate":!1,onCheckedChange:j}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:r("orgs.connectionSelectionUi.connected")}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[30]=p,e[31]=n.connections.length,e[32]=s,e[33]=u,e[34]=r,e[35]=j,e[36]=M):M=e[36];let I;e[37]!==g?(I=x=>{x.stopPropagation(),g()},e[37]=g,e[38]=I):I=e[38];let O;e[39]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Ke,{size:16}),e[39]=O):O=e[39];let P;e[40]!==r?(P=r("orgs.connectionSelectionUi.open"),e[40]=r,e[41]=P):P=e[41];let k;e[42]!==I||e[43]!==P?(k=t.jsxs(ie,{onClick:I,children:[O,P]}),e[42]=I,e[43]=P,e[44]=k):k=e[44];let $;e[45]!==s||e[46]!==k?($=t.jsx(Re,{selectionMode:s,children:k}),e[45]=s,e[46]=k,e[47]=$):$=e[47];let U;e[48]!==M||e[49]!==$?(U=t.jsxs("div",{className:"flex items-center gap-1",children:[M,$]}),e[48]=M,e[49]=$,e[50]=U):U=e[50];let X;return e[51]!==w||e[52]!==N||e[53]!==U||e[54]!==v||e[55]!==C?(X=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:v,onClick:C,className:w,selected:N,fallbackIcon:T,headerActionsAlwaysVisible:!0,headerActions:U})}),e[51]=w,e[52]=N,e[53]=U,e[54]=v,e[55]=C,e[56]=X):X=e[56],X}function jn(o){const e=W.c(36),{connection:n,isSelected:g,selectionMode:s,canManage:i,canManageAgents:l,onToggleSelect:r,onOpen:d,onToggleStatus:p,onDelete:m}=o,u=ne();let a;e[0]!==g||e[1]!==r||e[2]!==s||e[3]!==u?(a=s?t.jsx(Ee,{checked:g,onCheckedChange:r,onClick:Sn}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:u("orgs.connectionSelectionUi.connected")}),e[0]=g,e[1]=r,e[2]=s,e[3]=u,e[4]=a):a=e[4];let j;e[5]!==d?(j=N=>{N.stopPropagation(),d()},e[5]=d,e[6]=j):j=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Ke,{size:16}),e[7]=f):f=e[7];let S;e[8]!==u?(S=u("orgs.connectionSelectionUi.open"),e[8]=u,e[9]=S):S=e[9];let y;e[10]!==j||e[11]!==S?(y=t.jsxs(ie,{onClick:j,children:[f,S]}),e[10]=j,e[11]=S,e[12]=y):y=e[12];let v;e[13]!==i||e[14]!==l||e[15]!==r||e[16]!==u?(v=(i||l)&&t.jsxs(ie,{onClick:N=>{N.stopPropagation(),r()},children:[t.jsx(Ht,{size:16}),u("orgs.connectionSelectionUi.select")]}),e[13]=i,e[14]=l,e[15]=r,e[16]=u,e[17]=v):v=e[17];let C;e[18]!==i||e[19]!==n||e[20]!==p||e[21]!==u?(C=i&&(n.status==="active"?t.jsxs(ie,{onClick:N=>{N.stopPropagation(),p("inactive")},children:[t.jsx(Rt,{size:16}),u("orgs.connectionSelectionUi.disable")]}):t.jsxs(ie,{onClick:N=>{N.stopPropagation(),p("active")},children:[t.jsx(Wt,{size:16}),u("orgs.connectionSelectionUi.enable")]})),e[18]=i,e[19]=n,e[20]=p,e[21]=u,e[22]=C):C=e[22];let c;e[23]!==i||e[24]!==m||e[25]!==u?(c=i&&t.jsxs(ie,{variant:"destructive",onClick:N=>{N.stopPropagation(),m()},children:[t.jsx(He,{size:16}),u("orgs.connectionSelectionUi.delete")]}),e[23]=i,e[24]=m,e[25]=u,e[26]=c):c=e[26];let h;e[27]!==s||e[28]!==y||e[29]!==v||e[30]!==C||e[31]!==c?(h=t.jsxs(Re,{selectionMode:s,children:[y,v,C,c]}),e[27]=s,e[28]=y,e[29]=v,e[30]=C,e[31]=c,e[32]=h):h=e[32];let w;return e[33]!==a||e[34]!==h?(w=t.jsxs("div",{className:"flex items-center gap-1",children:[a,h]}),e[33]=a,e[34]=h,e[35]=w):w=e[35],w}function Sn(o){return o.stopPropagation()}function yn(o){const e=W.c(29),{count:n,total:g,canManage:s,canManageAgents:i,onSelectAll:l,onDeselectAll:r,onDelete:d,onAddToAgent:p,onToggleStatus:m,onCancel:u}=o,a=ne();if(n===0)return null;let j;e[0]!==n||e[1]!==a?(j=a("orgs.connectionSelectionUi.selectedCount",{count:n}),e[0]=n,e[1]=a,e[2]=j):j=e[2];let f;e[3]!==j?(f=t.jsx("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:j}),e[3]=j,e[4]=f):f=e[4];let S;e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==a||e[9]!==g?(S=n<g?t.jsx(L,{variant:"outline",size:"sm",onClick:l,children:a("orgs.connectionSelectionUi.selectAll",{total:g})}):t.jsx(L,{variant:"outline",size:"sm",onClick:r,children:a("orgs.connectionSelectionUi.clearSelection")}),e[5]=n,e[6]=r,e[7]=l,e[8]=a,e[9]=g,e[10]=S):S=e[10];let y;e[11]!==i||e[12]!==p||e[13]!==a?(y=i&&t.jsxs(L,{variant:"outline",size:"sm",onClick:p,children:[t.jsx(Le,{size:13}),a("orgs.connectionSelectionUi.addToAgent")]}),e[11]=i,e[12]=p,e[13]=a,e[14]=y):y=e[14];let v;e[15]!==s||e[16]!==d||e[17]!==m||e[18]!==a?(v=s&&t.jsxs(t.Fragment,{children:[t.jsx(L,{variant:"outline",size:"sm",onClick:()=>m("active"),children:a("orgs.connectionSelectionUi.enable")}),t.jsx(L,{variant:"outline",size:"sm",onClick:()=>m("inactive"),children:a("orgs.connectionSelectionUi.disable")}),t.jsxs(L,{variant:"destructive",size:"sm",onClick:d,children:[t.jsx(He,{size:13}),a("orgs.connectionSelectionUi.delete")]})]}),e[15]=s,e[16]=d,e[17]=m,e[18]=a,e[19]=v):v=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Be,{size:13}),e[20]=C):C=e[20];let c;e[21]!==u?(c=t.jsx(L,{variant:"ghost",size:"sm",onClick:u,children:C}),e[21]=u,e[22]=c):c=e[22];let h;return e[23]!==f||e[24]!==S||e[25]!==y||e[26]!==v||e[27]!==c?(h=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl glass px-3 py-2 flex items-center gap-2",children:[f,S,y,v,c]})}),e[23]=f,e[24]=S,e[25]=y,e[26]=v,e[27]=c,e[28]=h):h=e[28],h}function Cn(o){const e=W.c(47),{open:n,onOpenChange:g,agents:s,onConfirm:i}=o,l=ne(),[r,d]=z.useState(null);let p;e[0]!==g?(p=k=>{k||d(null),g(k)},e[0]=g,e[1]=p):p=e[1];const m=p;let u;e[2]!==l?(u=l("orgs.connectionSelectionUi.addToAgentTitle"),e[2]=l,e[3]=u):u=e[3];let a;e[4]!==u?(a=t.jsx(Ne,{children:u}),e[4]=u,e[5]=a):a=e[5];let j;e[6]!==l?(j=l("orgs.connectionSelectionUi.addToAgentDescription"),e[6]=l,e[7]=j):j=e[7];let f;e[8]!==j?(f=t.jsx(Te,{children:j}),e[8]=j,e[9]=f):f=e[9];let S;e[10]!==a||e[11]!==f?(S=t.jsxs(Ae,{children:[a,f]}),e[10]=a,e[11]=f,e[12]=S):S=e[12];let y;e[13]!==s||e[14]!==r||e[15]!==l?(y=s.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:l("orgs.connectionSelectionUi.noAgentsFound")}):s.map(k=>t.jsxs("button",{type:"button",onClick:()=>d(k.id),className:he("flex items-center gap-3 w-full rounded-lg px-3 py-2 text-left transition-colors",r===k.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-accent"),children:[t.jsx(tn,{icon:k.icon,name:k.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.title}),k.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.description})]})]},k.id)),e[13]=s,e[14]=r,e[15]=l,e[16]=y):y=e[16];let v;e[17]!==y?(v=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:y}),e[17]=y,e[18]=v):v=e[18];let C;e[19]!==m?(C=()=>m(!1),e[19]=m,e[20]=C):C=e[20];let c;e[21]!==l?(c=l("orgs.connectionSelectionUi.cancel"),e[21]=l,e[22]=c):c=e[22];let h;e[23]!==c||e[24]!==C?(h=t.jsx(L,{variant:"outline",onClick:C,children:c}),e[23]=c,e[24]=C,e[25]=h):h=e[25];const w=!r;let N;e[26]!==m||e[27]!==i||e[28]!==r?(N=()=>{r&&(i(r),m(!1))},e[26]=m,e[27]=i,e[28]=r,e[29]=N):N=e[29];let T;e[30]!==l?(T=l("orgs.connectionSelectionUi.add"),e[30]=l,e[31]=T):T=e[31];let M;e[32]!==w||e[33]!==N||e[34]!==T?(M=t.jsx(L,{disabled:w,onClick:N,children:T}),e[32]=w,e[33]=N,e[34]=T,e[35]=M):M=e[35];let I;e[36]!==h||e[37]!==M?(I=t.jsxs(we,{children:[h,M]}),e[36]=h,e[37]=M,e[38]=I):I=e[38];let O;e[39]!==I||e[40]!==S||e[41]!==v?(O=t.jsxs(Ie,{className:"sm:max-w-[400px]",children:[S,v,I]}),e[39]=I,e[40]=S,e[41]=v,e[42]=O):O=e[42];let P;return e[43]!==m||e[44]!==n||e[45]!==O?(P=t.jsx(Pe,{open:n,onOpenChange:m,children:O}),e[43]=m,e[44]=n,e[45]=O,e[46]=P):P=e[46],P}function vn({listState:o,activeTab:e,typeFilter:n,statusFilter:g}){const s=ne(),{org:i}=Me(),l=dt(),r=$e(),{data:d}=Oe.useSession(),p=ze(),m=zt(o),u=vt(),{granted:a}=ye("connections:manage"),{granted:j}=ye("agents:manage"),[f,S]=z.useState(new Set),y=f.size>0,[v,C]=z.useState(!1),[c,h]=z.useState(!1),[w,N]=z.useState(null),T=Bt(),M=gn(Gt(T)),I=m.filter(b=>!(n!=="ALL"&&b.connection_type!==n||g!=="ALL"&&b.status!==g)),O=yt(I),P=b=>{S(_=>{const B=new Set(_);return B.has(b)?B.delete(b):B.add(b),B})},k=()=>{S(new Set)},$=Ue(o.searchTerm),U=$.items,X=_t($.loadMore,$.hasMore,$.isLoadingMore),x=new Set(m.filter(b=>b.app_name).map(b=>b.app_name)),A=o.search.length>0,E=e==="all"||A?U.filter(b=>{if(A){const _=Fe(b);if(_&&x.has(_))return!1}return!0}):[],ee=e==="connected"||A?O:[],G=async b=>{if(!(!i||!d?.user?.id)){te("connection_add_clicked",{action:"connect_new",registry_item_id:b.id,source:"connections_page"}),N(b.id);try{const _=ht(b,i.id,d.user.id,{remoteIndex:0}),B=_.connection_type==="STDIO",K=!!_.connection_url,H=B&&_.connection_headers&&typeof _.connection_headers=="object"&&"command"in _.connection_headers;if(!K&&!H){R.error(s("orgs.connections.cannotConnectNoMethod")),N(null);return}const ve=await p.create.mutateAsync(_),{id:se}=ve,ce=await en({connectionId:se,orgId:i.id,orgSlug:i.slug,persistFallback:le=>p.update.mutateAsync({id:se,data:{connection_token:le}}).then(()=>{})});if(ce.ran&&!ce.ok){te("connection_oauth_failed",{connection_id:se,flow:"connections_page_connect",error:ce.error??"no_token"}),R.error(s("orgs.connections.authenticationFailed",{error:ce.error??"no token received"}));return}if(ce.ran){te("connection_oauth_succeeded",{connection_id:se,flow:"connections_page_connect"});const le=new URL(`/api/${i.slug}/mcp/${se}`,window.location.origin);await l.invalidateQueries({queryKey:mt.isMCPAuthenticated(le.href,null)}),V(),R.success(s("orgs.connections.authenticationSuccessful"))}let me=null;try{const le=await l.fetchQuery(Lt({connectionId:se,orgId:i.id,orgSlug:i.slug}));me=dn((await le.listTools()).tools)}catch{}const be=ae(ve),_e=me?me.appToolName?{to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:i.slug,appSlug:be,collectionName:"tools",itemId:encodeURIComponent(me.appToolName)}}:{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:be}}:null;R.success(s("orgs.connections.connectedSuccessfully"),_e?{action:{label:s("orgs.connections.openConnection"),onClick:()=>r(_e)}}:void 0)}catch(_){R.error(s("orgs.connections.failedToConnect",{error:_ instanceof Error?_.message:String(_)}))}finally{N(null)}}},D=ut(),V=()=>{pt(l,i.id)},F=async()=>{C(!1);const b=[...f];te("connections_bulk_delete",{count:b.length});const B=(await Promise.allSettled(b.map(K=>D.call("COLLECTION_CONNECTIONS_DELETE",{id:K,force:!0})))).filter(K=>K.status==="fulfilled").length;V(),R.success(s("orgs.connections.deletedConnections",{count:B})),k()},ue=async(b,_)=>{try{await p.update.mutateAsync({id:b,data:{status:_}}),V(),R.success(s(_==="active"?"orgs.connections.connectionEnabled":"orgs.connections.connectionDisabled"))}catch{R.error(s("orgs.connections.failedToUpdateConnection"))}},je=async b=>{const _=[...f];te("connections_bulk_status_toggled",{count:_.length,to_status:b});const K=(await Promise.allSettled(_.map(H=>p.update.mutateAsync({id:H,data:{status:b}})))).filter(H=>H.status==="fulfilled").length;V(),R.success(b==="active"?s("orgs.connections.enabledConnections",{count:K}):s("orgs.connections.disabledConnections",{count:K})),k()},ge=async b=>{const _=T.find(H=>H.id===b);if(!_)return;te("connections_bulk_add_to_agent",{agent_id:b,count:f.size});const B=new Set(_.connections.map(H=>H.connection_id)),K=[...f].filter(H=>!B.has(H)).map(H=>({connection_id:H,selected_tools:null,selected_resources:null,selected_prompts:null}));if(K.length===0){R.info(s("orgs.connections.allConnectionsAlreadyInAgent"));return}try{await D.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:b,data:{connections:[..._.connections,...K]}}),gt(l,i.id),R.success(s("orgs.connections.addedConnectionsToAgent",{count:K.length,agentTitle:_.title})),k()}catch{R.error(s("orgs.connections.failedToAddConnectionsToAgent"))}};return t.jsxs(t.Fragment,{children:[t.jsx(bt,{...u}),t.jsx(rn,{open:v,onOpenChange:C,count:f.size,onConfirm:F}),t.jsx(Cn,{open:c,onOpenChange:h,agents:T,onConfirm:ge}),$.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}):t.jsx("div",{children:(A?E.length===0&&I.length===0:e==="all"?E.length===0:I.length===0)?t.jsx(Ct,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:s("orgs.connections.noConnectionsFound"),description:o.search?s("orgs.connections.noConnectionsMatchSearch",{search:o.search}):s(a?"orgs.connections.createConnectionToGetStarted":"orgs.connections.askAdminToAddConnection")}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[ee.map(b=>{if(b.type==="group")return t.jsx(xn,{group:b,onOpen:()=>{r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:b.key}})},selectionMode:y,selectedIds:f,onToggleSelect:P},b.key);const _=b.connection,B=f.has(_.id);return t.jsx(Ce,{connection:_,fallbackIcon:t.jsx(xe,{}),onClick:()=>y?P(_.id):r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(_)}}),className:he(B&&"ring-2 ring-primary bg-primary/5"),selected:y?B:void 0,footer:t.jsx(mn,{projects:M.get(_.id)??[]}),headerActionsAlwaysVisible:!0,headerActions:t.jsx(jn,{connection:_,isSelected:B,selectionMode:y,canManage:a,canManageAgents:j,onToggleSelect:()=>P(_.id),onOpen:()=>r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(_)}}),onToggleStatus:K=>ue(_.id,K),onDelete:()=>u.requestDelete(_)})},_.id)}),E.map(b=>t.jsx(an,{item:b,canManage:a,allConnections:m,connectedAppNames:x,connectingItemId:w,onNavigateConnected:_=>r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(_)}}),onConnect:G},b.id)),(e==="all"||A)&&t.jsx("div",{ref:X,className:"col-span-full h-4"}),(e==="all"||A)&&$.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(de,{className:"size-6 text-muted-foreground"})})]})}),y&&t.jsx(yn,{count:f.size,total:I.length,canManage:a,canManageAgents:j,onSelectAll:()=>{S(new Set(I.map(b=>b.id)))},onDeselectAll:()=>S(new Set),onDelete:()=>C(!0),onAddToAgent:()=>h(!0),onToggleStatus:je,onCancel:k})]})}function bn(){const o=ne(),{org:e}=Me(),n=$e(),g=st({strict:!1}),{data:s}=Oe.useSession(),{stdioEnabled:i}=it(),l=Ve(),{granted:r}=ye("connections:manage"),d=ln({namespace:e.slug,resource:"connections"}),p=ze(),[m,u]=ct(lt.connectionsTab(e.slug),x=>g.tab==="all"||g.tab==="connected"?g.tab:x??"all"),[a,j]=z.useState("ALL"),[f,S]=z.useState("ALL"),v=Ue(d.searchTerm).items,C=d.search!==d.searchTerm,c=rt({resolver:at(Qt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),h=c.watch("ui_type"),w=c.watch("connection_url"),N=c.watch("npx_package"),T=fe({uiType:h,connectionUrl:w??"",npxPackage:N??""})??ke({uiType:h,connectionUrl:w??"",registryItems:v}),M=r&&g.action==="create",I=()=>{te("connections_custom_dialog_opened",{source:"connections_page"}),n({to:".",search:x=>({...x,action:"create"})})},O=()=>{n({to:".",search:x=>({...x,action:void 0})})},P=async x=>{let A,E=null,ee=null,G=null;x.ui_type==="NPX"?(A="STDIO",E="",G=Yt(x.npx_package||"",x.env_vars||[])):x.ui_type==="STDIO"?(A="STDIO",E="",G=Zt(x.stdio_command||"",x.stdio_args||"",x.stdio_cwd,x.env_vars||[])):(A=x.ui_type,E=x.connection_url||"",ee=x.connection_token||null);const D=ft("conn");te("connection_custom_created",{connection_type:A,ui_type:x.ui_type}),await p.create.mutateAsync({id:D,title:x.title,description:x.description||null,connection_type:A,connection_url:E,connection_token:ee,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:s?.user?.id||"system",organization_id:e.id,icon:x.icon??null,app_name:null,app_id:null,connection_headers:G,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null}),O(),c.reset(),n({to:"/$org/settings/connections/$appSlug",params:{org:e.slug,appSlug:ae({app_name:null,connection_url:E,title:x.title,id:D})}})},k=x=>{x||(M&&O(),c.reset())},$=x=>{const A=x.trim();if(!A)return;const E=!!c.formState.dirtyFields.title,ee=!!c.formState.dirtyFields.description,G=!!c.formState.dirtyFields.env_vars,D=F=>{if(F&&(!E&&!c.getValues("title").trim()&&F.title&&c.setValue("title",F.title,{shouldDirty:!1}),!ee&&!(c.getValues("description")??"").trim()&&F.description&&c.setValue("description",F.description,{shouldDirty:!1}),!G&&F.envVarKeys?.length)){const ue=c.getValues("env_vars")??[],je=new Set(ue.map(b=>b.key)),ge=F.envVarKeys.filter(b=>!je.has(b));ge.length>0&&c.setValue("env_vars",[...ue,...ge.map(b=>({key:b,value:""}))],{shouldDirty:!0})}},V=Jt(A);if(V&&i){c.setValue("ui_type","NPX",{shouldDirty:!0}),c.setValue("npx_package",V.packageName,{shouldDirty:!0}),c.setValue("connection_url","",{shouldDirty:!0}),c.setValue("connection_token",null,{shouldDirty:!0}),D(fe({uiType:"NPX",npxPackage:V.packageName}));return}if(A.startsWith("http://")||A.startsWith("https://")){const F=h==="HTTP"||h==="SSE"||h==="Websocket"?h:"HTTP";c.setValue("ui_type",F,{shouldDirty:!0}),c.setValue("connection_url",A,{shouldDirty:!0}),D(fe({uiType:F,connectionUrl:A})??ke({uiType:F,connectionUrl:A,registryItems:v}));return}h==="NPX"&&D(fe({uiType:"NPX",npxPackage:A}))},U=r?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(L,{size:"sm",variant:"default",onClick:I,children:[t.jsx(Le,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:o("orgs.connections.customConnection")})]})}):null,X=t.jsx(xt,{sortKey:d.sortKey,sortDirection:d.sortDirection,onSort:d.handleSort,sortOptions:[{id:"title",label:o("orgs.connections.sortName")},{id:"description",label:o("orgs.connections.sortDescription")},{id:"connection_type",label:o("orgs.connections.sortType")},{id:"updated_by",label:o("orgs.connections.sortUpdatedBy")},{id:"updated_at",label:o("orgs.connections.sortUpdated")}],filters:[{label:o("orgs.connections.filterType"),value:a,onChange:x=>j(x||"ALL"),options:[{id:"ALL",label:o("orgs.connections.filterAll")},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:o("orgs.connections.filterStatus"),value:f,onChange:x=>S(x||"ALL"),options:[{id:"ALL",label:o("orgs.connections.filterAll")},{id:"active",label:o("orgs.connections.filterActive")},{id:"inactive",label:o("orgs.connections.filterInactive")},{id:"error",label:o("orgs.connections.filterError")}]}]});return t.jsx(t.Fragment,{children:t.jsxs(pe,{children:[(()=>{const x=o("orgs.connections.createConnection"),A=o("orgs.connections.createConnectionDescription"),E=c.formState.isSubmitting?o("orgs.connections.saving"):o("orgs.connections.createConnection"),ee=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:c.control,name:"ui_type",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.type")}),t.jsxs($t,{value:D.value,onValueChange:D.onChange,children:[t.jsx(Y,{children:t.jsx(Ot,{children:t.jsx(Ft,{})})}),t.jsxs(Ut,{children:[t.jsx(re,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(re,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(re,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"Websocket"]})}),i&&t.jsxs(t.Fragment,{children:[t.jsx(re,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(xe,{className:"w-4 h-4"}),o("orgs.connections.npxPackage")]})}),t.jsx(re,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Xt,{className:"w-4 h-4"}),o("orgs.connections.customCommand")]})})]})]})]}),t.jsx(Z,{})]})}),h==="NPX"&&t.jsx(Q,{control:c.control,name:"npx_package",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.npmPackage")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.npmPackagePlaceholder"),...D,value:D.value??"",onPaste:V=>{const F=V.clipboardData.getData("text");F&&(V.preventDefault(),c.setValue("npx_package",F.trim(),{shouldDirty:!0}),$(F))},onBlur:V=>{$(V.target.value),D.onBlur()}})}),t.jsx(Z,{})]})}),h==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:c.control,name:"stdio_command",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.command")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.commandPlaceholder"),...D,value:D.value??""})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"stdio_args",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.arguments")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.argumentsPlaceholder"),...D,value:D.value??""})}),t.jsx(Z,{})]})})]}),t.jsx(Q,{control:c.control,name:"stdio_cwd",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.workingDirectory")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.workingDirectoryPlaceholder"),...D,value:D.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("orgs.connections.directoryExecutionNote")}),t.jsx(Z,{})]})})]}),(h==="NPX"||h==="STDIO")&&t.jsx(Q,{control:c.control,name:"env_vars",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.environmentVariables")}),t.jsx(Y,{children:t.jsx(qt,{value:D.value??[],onChange:D.onChange})}),t.jsx(Z,{})]})}),h!=="NPX"&&h!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:c.control,name:"connection_url",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.url")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.urlPlaceholder"),...D,value:D.value??"",onPaste:V=>{const F=V.clipboardData.getData("text");F&&(V.preventDefault(),c.setValue("connection_url",F.trim(),{shouldDirty:!0}),$(F))},onBlur:V=>{$(V.target.value),D.onBlur()}})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"connection_token",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:T?.token?.label??o("orgs.connections.tokenOptional")}),t.jsx(Y,{children:t.jsx(oe,{type:"password",placeholder:T?.token?.placeholder??o("orgs.connections.tokenPlaceholder"),...D,value:D.value??""})}),T?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.token.helperText,T.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("orgs.connections.openGitHubPatSettings")})]})]}),t.jsx(Z,{})]})})]}),t.jsx(Q,{control:c.control,name:"title",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.name")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.namePlaceholder"),...D})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"description",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.description")}),t.jsx(Y,{children:t.jsx(Vt,{placeholder:o("orgs.connections.descriptionPlaceholder"),rows:3,...D,value:D.value??""})}),t.jsx(Z,{})]})})]}),G=M;return l?t.jsx(Nt,{open:G,onOpenChange:k,children:t.jsxs(Tt,{className:"max-h-[90vh]",children:[t.jsx(At,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(wt,{children:x}),t.jsx(It,{className:"mt-1",children:A})]}),t.jsx(Pt,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":o("orgs.connections.close"),children:t.jsx(Be,{size:16})})})]})}),t.jsx(De,{...c,children:t.jsxs("form",{onSubmit:c.handleSubmit(P),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:ee}),t.jsx(Mt,{children:t.jsx(L,{type:"submit",disabled:c.formState.isSubmitting,className:"w-full",children:E})})]})})]})}):t.jsx(Pe,{open:G,onOpenChange:k,children:t.jsxs(Ie,{className:"sm:max-w-[525px]",children:[t.jsxs(Ae,{children:[t.jsx(Ne,{children:x}),t.jsx(Te,{children:A})]}),t.jsx(De,{...c,children:t.jsxs("form",{onSubmit:c.handleSubmit(P),children:[t.jsx("div",{className:"py-4",children:ee}),t.jsxs(we,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>k(!1),children:o("orgs.connections.cancel")}),t.jsx(L,{type:"submit",disabled:c.formState.isSubmitting,className:"min-w-40",children:E})]})]})})]})})})(),t.jsx(pe.Content,{children:t.jsx(pe.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(pe.Actions,{secondary:t.jsxs(t.Fragment,{children:[t.jsx(jt,{value:d.search,onChange:d.setSearch,label:o("library.context.search"),placeholder:o("orgs.connections.searchPlaceholder"),clearLabel:o("library.library.clearSearch")}),X]}),children:U}),t.jsx(St,{placement:"page",tabs:[{id:"all",label:o("orgs.connections.tabAll")},{id:"connected",label:o("orgs.connections.tabConnected")}],activeTab:m,onTabChange:x=>{const A=x;A!==m&&te("connections_page_tab_changed",{to_tab:A}),u(A)}}),t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:C?.5:1,transition:C?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:C?"none":"auto"},children:t.jsx(vn,{listState:d,activeTab:m,typeFilter:a,statusFilter:f})})})]})})})]})})}function qo(){const o=W.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ot,{children:t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}),children:t.jsx(bn,{})})}),o[0]=e):e=o[0],e}export{qo as default};
|
|
1
|
+
import{r as z,c as W,b as ne,j as t,aJ as We,aK as Xe,aL as Ge,aM as Qe,b9 as qe,aN as Je,aO as Ye,aP as Ze,B as L,h as de,m as he,Y as ie,x as Ne,aU as Te,w as Ae,y as we,v as Ie,D as Pe,X as et,_ as tt,Z as nt,R as ot,a6 as Me,d as $e,u as st,a as Oe,a5 as it,as as ye,at as ct,av as lt,aG as rt,aF as at,n as pe,I as oe,E as te,q as dt,am as ut,t as R,cI as gt,K as mt,go as pt}from"./index-mb-jxjEy.js";import{a as Fe,g as ft,e as ht}from"./extract-connection-data-CzqnFJl9.js";import{C as xt}from"./collection-display-button-JBmYQ-27.js";import{S as jt}from"./search-toggle-C1j-Ki1u.js";import{C as St}from"./collection-tabs-CmuugrOY.js";import{C as Ce,u as Ue,g as yt}from"./connection-card-CxiJ1Nzx.js";import{E as Ct}from"./empty-state-DlNabApi.js";import{u as vt,D as bt}from"./use-delete-connection-BMDl_PP-.js";import{u as _t}from"./use-infinite-scroll-DnhPBPks.js";import{u as Ve}from"./use-mobile-CBwmaBFU.js";import{g as ae}from"./connection-slug-DWaKdRBx.js";import{n as xe}from"./LinkBroken01-BPaKcMJ1.js";import{g as Dt,a as kt}from"./metadata-D72DunRR.js";import{D as Nt,a as Tt,e as At,b as wt,c as It,f as Pt,g as Mt}from"./drawer-CmJXwXhP.js";import{F as Q,b as q,c as J,d as Y,f as Z,a as De}from"./form-CJTkS9yd.js";import{S as $t,b as Ot,a as Ft,d as Ut,c as re}from"./select-DnlDCB9E.js";import{T as Vt}from"./textarea-BCGFjA5F.js";import{a as ze,b as zt}from"./use-connection-DxwzNo03.js";import{m as Lt}from"./use-mcp-client-4k5JKqzF.js";import{u as Bt}from"./repository-binding-w-FCDYuS.js";import{g as Et}from"./types-BQYXFpO6.js";import{A as Kt,bB as Ht,a4 as Rt,b5 as Wt,a5 as Se}from"./agent-icon-zvo6Zsex.js";import{s as Le}from"./Plus-WQeLSh07.js";import{c as Xt}from"./UserSquare-T90Jaoc-.js";import{s as Be}from"./XClose-Bomoew3H.js";import{s as Gt}from"./use-project-scope-Dydp2D08.js";import{c as Qt}from"./schema-DU3GC-Ez.js";import{i as fe,a as ke,E as qt,p as Jt,b as Yt,c as Zt}from"./connection-form-helpers-UXeTmEmu.js";import{a as en}from"./authenticate-and-persist-oauth-GGQFCWKI.js";import{I as tn}from"./integration-icon-DRbGJhQo.js";import{C as Ee}from"./checkbox-C-dWRGEo.js";import{a as nn}from"./SwitchHorizontal01-HaaMuIs0.js";import{s as Ke}from"./Eye-BoMcImel.js";import{s as He}from"./Trash01-By8obgKt.js";import"./connection-DezKWiQc.js";import"./url-slug-E3otz4_J.js";import"./ArrowUp-C9hRfWJJ.js";import"./tooltip-DCzbfwd7.js";import"./index-B8ZkvDME.js";import"./toggle-group-jkikwCcL.js";import"./active-indicator-CCMhAsc_.js";import"./badge-Di6qp_17.js";import"./SearchMd-CrM5HGUz.js";import"./icon-button-C9InOUgM.js";import"./useInfiniteQuery-FxnnBp9W.js";import"./infiniteQueryObserver-Dfcni9SV.js";import"./session-runtime-D2GKulko.js";import"./label-DFYaZzfV.js";import"./index-BdQq_4o_.js";import"./ChevronDown-Cz82ih9S.js";import"./ChevronUp-CLsy4_cr.js";import"./auth--2gxCib9.js";import"./AlertCircle-CngNmW3n.js";import"./UserCheck01-CuByTN5F.js";import"./Tool01-9Nk8XcOI.js";import"./ArrowLeft-7wIIyF4Y.js";import"./ArrowRight-Dyuh-rXZ.js";import"./BookOpen01-Bov9QL4X.js";import"./Globe04-_51WnfFJ.js";import"./CheckCircle-C0mDI2jO.js";import"./TrendUp01-D-BYwryf.js";import"./ChevronSelectorVertical-B_wf9OPd.js";import"./CreditCard01-C7XdJQOf.js";import"./File02-BmbcQ1JX.js";import"./MessageCircle01-DEwhGd-N.js";import"./Fingerprint04-CeWGcIpe.js";import"./Image01-nL5rafgN.js";import"./Key01-DPEcpDw6.js";import"./LayoutLeft-DFrTynS3.js";import"./Minus-CZtTY14n.js";import"./Monitor01-Dzk9r8YI.js";import"./Sun-BUSaNVU-.js";import"./Play-BNkIfSsq.js";import"./ShoppingBag01-Dvi8noNw.js";import"./Upload01-BPnZnmHF.js";import"./Users01-D1-vaLa3.js";import"./Zap-lo-lOcPp.js";import"./mcp-oauth-Cya-fh0P.js";import"./mcp-oauth-_iPR8QjI.js";function on(o){const e=`deco-filters-${o}`,[n,g]=z.useState(()=>{try{const i=globalThis.localStorage?.getItem(e);if(i)return JSON.parse(i)}catch(i){console.error("Failed to parse stored filters:",i)}return[]});return[n,i=>{g(i);try{globalThis.localStorage?.setItem(e,JSON.stringify(i))}catch(l){console.error("Failed to save filters:",l)}}]}function sn(o){const e=W.c(7),[n,g]=z.useState(o),[s,i]=z.useState(o?"desc":null);let l;e[0]!==s||e[1]!==n?(l=p=>{n!==p?(g(p),i("asc")):s==="asc"?i("desc"):s==="desc"&&(g(void 0),i(null))},e[0]=s,e[1]=n,e[2]=l):l=e[2];const r=l;let d;return e[3]!==r||e[4]!==s||e[5]!==n?(d={sortKey:n,sortDirection:s,handleSort:r},e[3]=r,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}function cn(o,e){const n=W.c(12),g=e===void 0?"cards":e,s=Ve(),i=z.useRef(s),l=o?`deco-view-mode-${o}`:"deco-view-mode";let r;n[0]!==g||n[1]!==l?(r=()=>{const S=globalThis.localStorage?.getItem(l);return S==="cards"||S==="table"?S:g},n[0]=g,n[1]=l,n[2]=r):r=n[2];const[d,p]=z.useState(r);let m;n[3]!==l?(m=S=>{p(S),globalThis.localStorage?.setItem(l,S)},n[3]=l,n[4]=m):m=n[4];const u=m;let a,j;n[5]!==s||n[6]!==d?(a=()=>{!i.current&&s&&d==="table"&&p("cards"),i.current=s},j=[s,d],n[5]=s,n[6]=d,n[7]=a,n[8]=j):(a=n[7],j=n[8]),z.useEffect(a,j);let f;return n[9]!==u||n[10]!==d?(f=[d,u],n[9]=u,n[10]=d,n[11]=f):f=n[11],f}function ln(o){const e=W.c(20),{namespace:n,resource:g,defaultSortKey:s,defaultViewMode:i}=o,l=s===void 0?"title":s,r=i===void 0?"table":i,[d,p]=z.useState(""),m=z.useDeferredValue(d),u=`${n}-${g}`,[a,j]=on(u),f=`studio-${g}-filter-visible-${n}`;let S;e[0]!==f?(S=()=>globalThis.localStorage?.getItem(f)==="true",e[0]=f,e[1]=S):S=e[1];const[y,v]=z.useState(S);let C;e[2]!==f?(C=$=>{v($),globalThis.localStorage?.setItem(f,String($))},e[2]=f,e[3]=C):C=e[3];const c=C;let h;e[4]!==y||e[5]!==c?(h=()=>{c(!y)},e[4]=y,e[5]=c,e[6]=h):h=e[6];const w=h,[N,T]=cn(`studio-${g}-${n}`,r),{sortKey:M,sortDirection:I,handleSort:O}=sn(l),P=M;let k;return e[7]!==y||e[8]!==a||e[9]!==O||e[10]!==d||e[11]!==m||e[12]!==c||e[13]!==j||e[14]!==T||e[15]!==I||e[16]!==P||e[17]!==w||e[18]!==N?(k={search:d,searchTerm:m,setSearch:p,filters:a,setFilters:j,filterBarVisible:y,setFilterBarVisible:c,toggleFilterBar:w,viewMode:N,setViewMode:T,sortKey:P,sortDirection:I,handleSort:O},e[7]=y,e[8]=a,e[9]=O,e[10]=d,e[11]=m,e[12]=c,e[13]=j,e[14]=T,e[15]=I,e[16]=P,e[17]=w,e[18]=N,e[19]=k):k=e[19],k}function rn(o){const e=W.c(35),{open:n,onOpenChange:g,count:s,onConfirm:i}=o,l=ne(),r=s===1?"orgs.bulkDeleteDialog.deleteTitleSingular":"orgs.bulkDeleteDialog.deleteTitlePlural";let d;e[0]!==s||e[1]!==l||e[2]!==r?(d=l(r,{count:s}),e[0]=s,e[1]=l,e[2]=r,e[3]=d):d=e[3];let p;e[4]!==d?(p=t.jsx(We,{children:d}),e[4]=d,e[5]=p):p=e[5];const m=s===1?"orgs.bulkDeleteDialog.deleteDescriptionSingular":"orgs.bulkDeleteDialog.deleteDescriptionPlural";let u;e[6]!==l||e[7]!==m?(u=l(m),e[6]=l,e[7]=m,e[8]=u):u=e[8];let a;e[9]!==u?(a=t.jsx(Xe,{children:u}),e[9]=u,e[10]=a):a=e[10];let j;e[11]!==p||e[12]!==a?(j=t.jsxs(Ge,{children:[p,a]}),e[11]=p,e[12]=a,e[13]=j):j=e[13];let f;e[14]!==l?(f=l("orgs.bulkDeleteDialog.cancelButton"),e[14]=l,e[15]=f):f=e[15];let S;e[16]!==f?(S=t.jsx(Qe,{children:f}),e[16]=f,e[17]=S):S=e[17];const y=s===1?"orgs.bulkDeleteDialog.deleteButtonSingular":"orgs.bulkDeleteDialog.deleteButtonPlural";let v;e[18]!==s||e[19]!==l||e[20]!==y?(v=l(y,{count:s}),e[18]=s,e[19]=l,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==i||e[23]!==v?(C=t.jsx(qe,{onClick:i,variant:"destructive",children:v}),e[22]=i,e[23]=v,e[24]=C):C=e[24];let c;e[25]!==C||e[26]!==S?(c=t.jsxs(Je,{children:[S,C]}),e[25]=C,e[26]=S,e[27]=c):c=e[27];let h;e[28]!==c||e[29]!==j?(h=t.jsxs(Ye,{children:[j,c]}),e[28]=c,e[29]=j,e[30]=h):h=e[30];let w;return e[31]!==g||e[32]!==n||e[33]!==h?(w=t.jsx(Ze,{open:n,onOpenChange:g,children:h}),e[31]=g,e[32]=n,e[33]=h,e[34]=w):w=e[34],w}function an(o){const e=W.c(39),{item:n,canManage:g,allConnections:s,connectedAppNames:i,connectingItemId:l,onNavigateConnected:r,onConnect:d}=o,p=ne();let m,u;e[0]!==i||e[1]!==n?(m=Fe(n)??"",u=i.has(m),e[0]=i,e[1]=n,e[2]=m,e[3]=u):(m=e[2],u=e[3]);const a=u;let j;e[4]!==n._meta?(j=Dt(n._meta),e[4]=n._meta,e[5]=j):j=e[5];const f=j,S=f?.friendlyName||f?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",y=n.server?.description||n.description||null;let v;e[6]!==n.server?.icons?.[0]?.src||e[7]!==n.server?.repository?(v=n.server?.icons?.[0]?.src||kt(n.server?.repository)||null,e[6]=n.server?.icons?.[0]?.src,e[7]=n.server?.repository,e[8]=v):v=e[8];const C=v;let c;if(e[9]!==s||e[10]!==m){let U;e[12]!==m?(U=X=>X.connection_type!=="VIRTUAL"&&X.app_name===m,e[12]=m,e[13]=U):U=e[13],c=s.filter(U),e[9]=s,e[10]=m,e[11]=c}else c=e[11];const h=c,w=a||g;let N,T;e[14]!==h||e[15]!==a||e[16]!==n||e[17]!==d||e[18]!==r?(N=()=>{if(a){const U=h[0];U&&r(U);return}T()},T=()=>d(n),e[14]=h,e[15]=a,e[16]=n,e[17]=d,e[18]=r,e[19]=N,e[20]=T):(N=e[19],T=e[20]);let M;e[21]!==y||e[22]!==C||e[23]!==S?(M={title:S,description:y,icon:C},e[21]=y,e[22]=C,e[23]=S,e[24]=M):M=e[24];let I;e[25]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(xe,{}),e[25]=I):I=e[25];const O=w?N:void 0;let P;e[26]!==g||e[27]!==l||e[28]!==T||e[29]!==a||e[30]!==n.id||e[31]!==p?(P=a?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:p("orgs.catalogItemCard.connected")}):g&&t.jsx(L,{variant:"outline",size:"sm",disabled:l!==null,onClick:U=>{U.stopPropagation(),T()},children:l===n.id?t.jsx(de,{className:"size-3.5"}):p("orgs.catalogItemCard.connect")}),e[26]=g,e[27]=l,e[28]=T,e[29]=a,e[30]=n.id,e[31]=p,e[32]=P):P=e[32];let k;e[33]!==P?(k=t.jsx("div",{className:"flex items-center gap-2",children:P}),e[33]=P,e[34]=k):k=e[34];let $;return e[35]!==M||e[36]!==O||e[37]!==k?($=t.jsx(Ce,{connection:M,fallbackIcon:I,onClick:O,headerActionsAlwaysVisible:!0,headerActions:k}),e[35]=M,e[36]=O,e[37]=k,e[38]=$):$=e[38],$}function dn(o){return o?.length?{appToolName:o.find(n=>!!Et(n._meta))?.name??null}:null}const un=3;function gn(o){const e=new Map;for(const n of o)for(const g of n.connections??[]){const s=e.get(g.connection_id)??[];s.push(n),e.set(g.connection_id,s)}return e}function mn(o){const e=W.c(21),{projects:n}=o,g=ne();if(n.length===0){let u;e[0]!==g?(u=g("projects.connections.orgWide"),e[0]=g,e[1]=u):u=e[1];let a;return e[2]!==u?(a=t.jsx("span",{className:"text-xs text-muted-foreground",children:u}),e[2]=u,e[3]=a):a=e[3],a}let s,i,l;if(e[4]!==n){const u=n.slice(0,un);l="flex min-w-0 items-center gap-2",s="flex shrink-0 -space-x-1.5",i=u.map(pn),e[4]=n,e[5]=s,e[6]=i,e[7]=l}else s=e[5],i=e[6],l=e[7];let r;e[8]!==s||e[9]!==i?(r=t.jsx("div",{className:s,children:i}),e[8]=s,e[9]=i,e[10]=r):r=e[10];let d;e[11]!==n[0]?.title||e[12]!==n.length||e[13]!==g?(d=n.length===1?n[0]?.title:g("projects.connections.usedBy",{count:n.length}),e[11]=n[0]?.title,e[12]=n.length,e[13]=g,e[14]=d):d=e[14];let p;e[15]!==d?(p=t.jsx("span",{className:"truncate text-xs text-muted-foreground",children:d}),e[15]=d,e[16]=p):p=e[16];let m;return e[17]!==l||e[18]!==r||e[19]!==p?(m=t.jsxs("div",{className:l,children:[r,p]}),e[17]=l,e[18]=r,e[19]=p,e[20]=m):m=e[20],m}function pn(o){return t.jsx("span",{className:"rounded-md ring-2 ring-card",title:o.title,children:t.jsx(Kt,{icon:o.icon,name:o.title,size:"xs"})},o.id)}function Re(o){const e=W.c(8),{selectionMode:n,children:g}=o,s=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let i;e[0]!==s?(i=he("overflow-hidden transition-all duration-150 ease-out",s),e[0]=s,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(et,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",onClick:hn,children:t.jsx(nn,{size:20})})}),e[2]=l):l=e[2];let r;e[3]!==g?(r=t.jsxs(tt,{children:[l,t.jsx(nt,{align:"end",onClick:fn,children:g})]}),e[3]=g,e[4]=r):r=e[4];let d;return e[5]!==i||e[6]!==r?(d=t.jsx("div",{className:i,children:r}),e[5]=i,e[6]=r,e[7]=d):d=e[7],d}function fn(o){return o.stopPropagation()}function hn(o){return o.stopPropagation()}function xn(o){const e=W.c(57),{group:n,onOpen:g,selectionMode:s,selectedIds:i,onToggleSelect:l}=o,r=ne();let d;if(e[0]!==n.connections||e[1]!==i){let x;e[3]!==i?(x=A=>i.has(A.id),e[3]=i,e[4]=x):x=e[4],d=n.connections.every(x),e[0]=n.connections,e[1]=i,e[2]=d}else d=e[2];const p=d;let m;if(e[5]!==n.connections||e[6]!==i){let x;e[8]!==i?(x=A=>i.has(A.id),e[8]=i,e[9]=x):x=e[9],m=n.connections.some(x),e[5]=n.connections,e[6]=i,e[7]=m}else m=e[7];const u=m;let a;e[10]!==p||e[11]!==n.connections||e[12]!==l||e[13]!==i?(a=()=>{for(const x of n.connections)p?i.has(x.id)&&l(x.id):i.has(x.id)||l(x.id)},e[10]=p,e[11]=n.connections,e[12]=l,e[13]=i,e[14]=a):a=e[14];const j=a,f=n.title,S=n.icon;let y;e[15]!==n.connections.length||e[16]!==r?(y=r("orgs.connectionSelectionUi.instancesCount",{count:n.connections.length}),e[15]=n.connections.length,e[16]=r,e[17]=y):y=e[17];let v;e[18]!==n.icon||e[19]!==n.title||e[20]!==y?(v={title:f,icon:S,description:y},e[18]=n.icon,e[19]=n.title,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==g||e[23]!==s||e[24]!==j?(C=()=>s?j():g(),e[22]=g,e[23]=s,e[24]=j,e[25]=C):C=e[25];const c=s&&p&&"ring-2 ring-primary",h=s&&u&&!p&&"ring-1 ring-primary/50";let w;e[26]!==h||e[27]!==c?(w=he(c,h),e[26]=h,e[27]=c,e[28]=w):w=e[28];const N=s?p?!0:u&&"mixed":void 0;let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(xe,{}),e[29]=T):T=e[29];let M;e[30]!==p||e[31]!==n.connections.length||e[32]!==s||e[33]!==u||e[34]!==r||e[35]!==j?(M=s?t.jsx(Ee,{checked:p?!0:u?"indeterminate":!1,onCheckedChange:j}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:r("orgs.connectionSelectionUi.connected")}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[30]=p,e[31]=n.connections.length,e[32]=s,e[33]=u,e[34]=r,e[35]=j,e[36]=M):M=e[36];let I;e[37]!==g?(I=x=>{x.stopPropagation(),g()},e[37]=g,e[38]=I):I=e[38];let O;e[39]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Ke,{size:16}),e[39]=O):O=e[39];let P;e[40]!==r?(P=r("orgs.connectionSelectionUi.open"),e[40]=r,e[41]=P):P=e[41];let k;e[42]!==I||e[43]!==P?(k=t.jsxs(ie,{onClick:I,children:[O,P]}),e[42]=I,e[43]=P,e[44]=k):k=e[44];let $;e[45]!==s||e[46]!==k?($=t.jsx(Re,{selectionMode:s,children:k}),e[45]=s,e[46]=k,e[47]=$):$=e[47];let U;e[48]!==M||e[49]!==$?(U=t.jsxs("div",{className:"flex items-center gap-1",children:[M,$]}),e[48]=M,e[49]=$,e[50]=U):U=e[50];let X;return e[51]!==w||e[52]!==N||e[53]!==U||e[54]!==v||e[55]!==C?(X=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:v,onClick:C,className:w,selected:N,fallbackIcon:T,headerActionsAlwaysVisible:!0,headerActions:U})}),e[51]=w,e[52]=N,e[53]=U,e[54]=v,e[55]=C,e[56]=X):X=e[56],X}function jn(o){const e=W.c(36),{connection:n,isSelected:g,selectionMode:s,canManage:i,canManageAgents:l,onToggleSelect:r,onOpen:d,onToggleStatus:p,onDelete:m}=o,u=ne();let a;e[0]!==g||e[1]!==r||e[2]!==s||e[3]!==u?(a=s?t.jsx(Ee,{checked:g,onCheckedChange:r,onClick:Sn}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:u("orgs.connectionSelectionUi.connected")}),e[0]=g,e[1]=r,e[2]=s,e[3]=u,e[4]=a):a=e[4];let j;e[5]!==d?(j=N=>{N.stopPropagation(),d()},e[5]=d,e[6]=j):j=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Ke,{size:16}),e[7]=f):f=e[7];let S;e[8]!==u?(S=u("orgs.connectionSelectionUi.open"),e[8]=u,e[9]=S):S=e[9];let y;e[10]!==j||e[11]!==S?(y=t.jsxs(ie,{onClick:j,children:[f,S]}),e[10]=j,e[11]=S,e[12]=y):y=e[12];let v;e[13]!==i||e[14]!==l||e[15]!==r||e[16]!==u?(v=(i||l)&&t.jsxs(ie,{onClick:N=>{N.stopPropagation(),r()},children:[t.jsx(Ht,{size:16}),u("orgs.connectionSelectionUi.select")]}),e[13]=i,e[14]=l,e[15]=r,e[16]=u,e[17]=v):v=e[17];let C;e[18]!==i||e[19]!==n||e[20]!==p||e[21]!==u?(C=i&&(n.status==="active"?t.jsxs(ie,{onClick:N=>{N.stopPropagation(),p("inactive")},children:[t.jsx(Rt,{size:16}),u("orgs.connectionSelectionUi.disable")]}):t.jsxs(ie,{onClick:N=>{N.stopPropagation(),p("active")},children:[t.jsx(Wt,{size:16}),u("orgs.connectionSelectionUi.enable")]})),e[18]=i,e[19]=n,e[20]=p,e[21]=u,e[22]=C):C=e[22];let c;e[23]!==i||e[24]!==m||e[25]!==u?(c=i&&t.jsxs(ie,{variant:"destructive",onClick:N=>{N.stopPropagation(),m()},children:[t.jsx(He,{size:16}),u("orgs.connectionSelectionUi.delete")]}),e[23]=i,e[24]=m,e[25]=u,e[26]=c):c=e[26];let h;e[27]!==s||e[28]!==y||e[29]!==v||e[30]!==C||e[31]!==c?(h=t.jsxs(Re,{selectionMode:s,children:[y,v,C,c]}),e[27]=s,e[28]=y,e[29]=v,e[30]=C,e[31]=c,e[32]=h):h=e[32];let w;return e[33]!==a||e[34]!==h?(w=t.jsxs("div",{className:"flex items-center gap-1",children:[a,h]}),e[33]=a,e[34]=h,e[35]=w):w=e[35],w}function Sn(o){return o.stopPropagation()}function yn(o){const e=W.c(29),{count:n,total:g,canManage:s,canManageAgents:i,onSelectAll:l,onDeselectAll:r,onDelete:d,onAddToAgent:p,onToggleStatus:m,onCancel:u}=o,a=ne();if(n===0)return null;let j;e[0]!==n||e[1]!==a?(j=a("orgs.connectionSelectionUi.selectedCount",{count:n}),e[0]=n,e[1]=a,e[2]=j):j=e[2];let f;e[3]!==j?(f=t.jsx("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:j}),e[3]=j,e[4]=f):f=e[4];let S;e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==a||e[9]!==g?(S=n<g?t.jsx(L,{variant:"outline",size:"sm",onClick:l,children:a("orgs.connectionSelectionUi.selectAll",{total:g})}):t.jsx(L,{variant:"outline",size:"sm",onClick:r,children:a("orgs.connectionSelectionUi.clearSelection")}),e[5]=n,e[6]=r,e[7]=l,e[8]=a,e[9]=g,e[10]=S):S=e[10];let y;e[11]!==i||e[12]!==p||e[13]!==a?(y=i&&t.jsxs(L,{variant:"outline",size:"sm",onClick:p,children:[t.jsx(Le,{size:13}),a("orgs.connectionSelectionUi.addToAgent")]}),e[11]=i,e[12]=p,e[13]=a,e[14]=y):y=e[14];let v;e[15]!==s||e[16]!==d||e[17]!==m||e[18]!==a?(v=s&&t.jsxs(t.Fragment,{children:[t.jsx(L,{variant:"outline",size:"sm",onClick:()=>m("active"),children:a("orgs.connectionSelectionUi.enable")}),t.jsx(L,{variant:"outline",size:"sm",onClick:()=>m("inactive"),children:a("orgs.connectionSelectionUi.disable")}),t.jsxs(L,{variant:"destructive",size:"sm",onClick:d,children:[t.jsx(He,{size:13}),a("orgs.connectionSelectionUi.delete")]})]}),e[15]=s,e[16]=d,e[17]=m,e[18]=a,e[19]=v):v=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Be,{size:13}),e[20]=C):C=e[20];let c;e[21]!==u?(c=t.jsx(L,{variant:"ghost",size:"sm",onClick:u,children:C}),e[21]=u,e[22]=c):c=e[22];let h;return e[23]!==f||e[24]!==S||e[25]!==y||e[26]!==v||e[27]!==c?(h=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl glass px-3 py-2 flex items-center gap-2",children:[f,S,y,v,c]})}),e[23]=f,e[24]=S,e[25]=y,e[26]=v,e[27]=c,e[28]=h):h=e[28],h}function Cn(o){const e=W.c(47),{open:n,onOpenChange:g,agents:s,onConfirm:i}=o,l=ne(),[r,d]=z.useState(null);let p;e[0]!==g?(p=k=>{k||d(null),g(k)},e[0]=g,e[1]=p):p=e[1];const m=p;let u;e[2]!==l?(u=l("orgs.connectionSelectionUi.addToAgentTitle"),e[2]=l,e[3]=u):u=e[3];let a;e[4]!==u?(a=t.jsx(Ne,{children:u}),e[4]=u,e[5]=a):a=e[5];let j;e[6]!==l?(j=l("orgs.connectionSelectionUi.addToAgentDescription"),e[6]=l,e[7]=j):j=e[7];let f;e[8]!==j?(f=t.jsx(Te,{children:j}),e[8]=j,e[9]=f):f=e[9];let S;e[10]!==a||e[11]!==f?(S=t.jsxs(Ae,{children:[a,f]}),e[10]=a,e[11]=f,e[12]=S):S=e[12];let y;e[13]!==s||e[14]!==r||e[15]!==l?(y=s.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:l("orgs.connectionSelectionUi.noAgentsFound")}):s.map(k=>t.jsxs("button",{type:"button",onClick:()=>d(k.id),className:he("flex items-center gap-3 w-full rounded-lg px-3 py-2 text-left transition-colors",r===k.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-accent"),children:[t.jsx(tn,{icon:k.icon,name:k.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.title}),k.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.description})]})]},k.id)),e[13]=s,e[14]=r,e[15]=l,e[16]=y):y=e[16];let v;e[17]!==y?(v=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:y}),e[17]=y,e[18]=v):v=e[18];let C;e[19]!==m?(C=()=>m(!1),e[19]=m,e[20]=C):C=e[20];let c;e[21]!==l?(c=l("orgs.connectionSelectionUi.cancel"),e[21]=l,e[22]=c):c=e[22];let h;e[23]!==c||e[24]!==C?(h=t.jsx(L,{variant:"outline",onClick:C,children:c}),e[23]=c,e[24]=C,e[25]=h):h=e[25];const w=!r;let N;e[26]!==m||e[27]!==i||e[28]!==r?(N=()=>{r&&(i(r),m(!1))},e[26]=m,e[27]=i,e[28]=r,e[29]=N):N=e[29];let T;e[30]!==l?(T=l("orgs.connectionSelectionUi.add"),e[30]=l,e[31]=T):T=e[31];let M;e[32]!==w||e[33]!==N||e[34]!==T?(M=t.jsx(L,{disabled:w,onClick:N,children:T}),e[32]=w,e[33]=N,e[34]=T,e[35]=M):M=e[35];let I;e[36]!==h||e[37]!==M?(I=t.jsxs(we,{children:[h,M]}),e[36]=h,e[37]=M,e[38]=I):I=e[38];let O;e[39]!==I||e[40]!==S||e[41]!==v?(O=t.jsxs(Ie,{className:"sm:max-w-[400px]",children:[S,v,I]}),e[39]=I,e[40]=S,e[41]=v,e[42]=O):O=e[42];let P;return e[43]!==m||e[44]!==n||e[45]!==O?(P=t.jsx(Pe,{open:n,onOpenChange:m,children:O}),e[43]=m,e[44]=n,e[45]=O,e[46]=P):P=e[46],P}function vn({listState:o,activeTab:e,typeFilter:n,statusFilter:g}){const s=ne(),{org:i}=Me(),l=dt(),r=$e(),{data:d}=Oe.useSession(),p=ze(),m=zt(o),u=vt(),{granted:a}=ye("connections:manage"),{granted:j}=ye("agents:manage"),[f,S]=z.useState(new Set),y=f.size>0,[v,C]=z.useState(!1),[c,h]=z.useState(!1),[w,N]=z.useState(null),T=Bt(),M=gn(Gt(T)),I=m.filter(b=>!(n!=="ALL"&&b.connection_type!==n||g!=="ALL"&&b.status!==g)),O=yt(I),P=b=>{S(_=>{const B=new Set(_);return B.has(b)?B.delete(b):B.add(b),B})},k=()=>{S(new Set)},$=Ue(o.searchTerm),U=$.items,X=_t($.loadMore,$.hasMore,$.isLoadingMore),x=new Set(m.filter(b=>b.app_name).map(b=>b.app_name)),A=o.search.length>0,E=e==="all"||A?U.filter(b=>{if(A){const _=Fe(b);if(_&&x.has(_))return!1}return!0}):[],ee=e==="connected"||A?O:[],G=async b=>{if(!(!i||!d?.user?.id)){te("connection_add_clicked",{action:"connect_new",registry_item_id:b.id,source:"connections_page"}),N(b.id);try{const _=ht(b,i.id,d.user.id,{remoteIndex:0}),B=_.connection_type==="STDIO",K=!!_.connection_url,H=B&&_.connection_headers&&typeof _.connection_headers=="object"&&"command"in _.connection_headers;if(!K&&!H){R.error(s("orgs.connections.cannotConnectNoMethod")),N(null);return}const ve=await p.create.mutateAsync(_),{id:se}=ve,ce=await en({connectionId:se,orgId:i.id,orgSlug:i.slug,persistFallback:le=>p.update.mutateAsync({id:se,data:{connection_token:le}}).then(()=>{})});if(ce.ran&&!ce.ok){te("connection_oauth_failed",{connection_id:se,flow:"connections_page_connect",error:ce.error??"no_token"}),R.error(s("orgs.connections.authenticationFailed",{error:ce.error??"no token received"}));return}if(ce.ran){te("connection_oauth_succeeded",{connection_id:se,flow:"connections_page_connect"});const le=new URL(`/api/${i.slug}/mcp/${se}`,window.location.origin);await l.invalidateQueries({queryKey:mt.isMCPAuthenticated(le.href,null)}),V(),R.success(s("orgs.connections.authenticationSuccessful"))}let me=null;try{const le=await l.fetchQuery(Lt({connectionId:se,orgId:i.id,orgSlug:i.slug}));me=dn((await le.listTools()).tools)}catch{}const be=ae(ve),_e=me?me.appToolName?{to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:i.slug,appSlug:be,collectionName:"tools",itemId:encodeURIComponent(me.appToolName)}}:{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:be}}:null;R.success(s("orgs.connections.connectedSuccessfully"),_e?{action:{label:s("orgs.connections.openConnection"),onClick:()=>r(_e)}}:void 0)}catch(_){R.error(s("orgs.connections.failedToConnect",{error:_ instanceof Error?_.message:String(_)}))}finally{N(null)}}},D=ut(),V=()=>{pt(l,i.id)},F=async()=>{C(!1);const b=[...f];te("connections_bulk_delete",{count:b.length});const B=(await Promise.allSettled(b.map(K=>D.call("COLLECTION_CONNECTIONS_DELETE",{id:K,force:!0})))).filter(K=>K.status==="fulfilled").length;V(),R.success(s("orgs.connections.deletedConnections",{count:B})),k()},ue=async(b,_)=>{try{await p.update.mutateAsync({id:b,data:{status:_}}),V(),R.success(s(_==="active"?"orgs.connections.connectionEnabled":"orgs.connections.connectionDisabled"))}catch{R.error(s("orgs.connections.failedToUpdateConnection"))}},je=async b=>{const _=[...f];te("connections_bulk_status_toggled",{count:_.length,to_status:b});const K=(await Promise.allSettled(_.map(H=>p.update.mutateAsync({id:H,data:{status:b}})))).filter(H=>H.status==="fulfilled").length;V(),R.success(b==="active"?s("orgs.connections.enabledConnections",{count:K}):s("orgs.connections.disabledConnections",{count:K})),k()},ge=async b=>{const _=T.find(H=>H.id===b);if(!_)return;te("connections_bulk_add_to_agent",{agent_id:b,count:f.size});const B=new Set(_.connections.map(H=>H.connection_id)),K=[...f].filter(H=>!B.has(H)).map(H=>({connection_id:H,selected_tools:null,selected_resources:null,selected_prompts:null}));if(K.length===0){R.info(s("orgs.connections.allConnectionsAlreadyInAgent"));return}try{await D.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:b,data:{connections:[..._.connections,...K]}}),gt(l,i.id),R.success(s("orgs.connections.addedConnectionsToAgent",{count:K.length,agentTitle:_.title})),k()}catch{R.error(s("orgs.connections.failedToAddConnectionsToAgent"))}};return t.jsxs(t.Fragment,{children:[t.jsx(bt,{...u}),t.jsx(rn,{open:v,onOpenChange:C,count:f.size,onConfirm:F}),t.jsx(Cn,{open:c,onOpenChange:h,agents:T,onConfirm:ge}),$.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}):t.jsx("div",{children:(A?E.length===0&&I.length===0:e==="all"?E.length===0:I.length===0)?t.jsx(Ct,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:s("orgs.connections.noConnectionsFound"),description:o.search?s("orgs.connections.noConnectionsMatchSearch",{search:o.search}):s(a?"orgs.connections.createConnectionToGetStarted":"orgs.connections.askAdminToAddConnection")}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[ee.map(b=>{if(b.type==="group")return t.jsx(xn,{group:b,onOpen:()=>{r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:b.key}})},selectionMode:y,selectedIds:f,onToggleSelect:P},b.key);const _=b.connection,B=f.has(_.id);return t.jsx(Ce,{connection:_,fallbackIcon:t.jsx(xe,{}),onClick:()=>y?P(_.id):r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(_)}}),className:he(B&&"ring-2 ring-primary bg-primary/5"),selected:y?B:void 0,footer:t.jsx(mn,{projects:M.get(_.id)??[]}),headerActionsAlwaysVisible:!0,headerActions:t.jsx(jn,{connection:_,isSelected:B,selectionMode:y,canManage:a,canManageAgents:j,onToggleSelect:()=>P(_.id),onOpen:()=>r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(_)}}),onToggleStatus:K=>ue(_.id,K),onDelete:()=>u.requestDelete(_)})},_.id)}),E.map(b=>t.jsx(an,{item:b,canManage:a,allConnections:m,connectedAppNames:x,connectingItemId:w,onNavigateConnected:_=>r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(_)}}),onConnect:G},b.id)),(e==="all"||A)&&t.jsx("div",{ref:X,className:"col-span-full h-4"}),(e==="all"||A)&&$.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(de,{className:"size-6 text-muted-foreground"})})]})}),y&&t.jsx(yn,{count:f.size,total:I.length,canManage:a,canManageAgents:j,onSelectAll:()=>{S(new Set(I.map(b=>b.id)))},onDeselectAll:()=>S(new Set),onDelete:()=>C(!0),onAddToAgent:()=>h(!0),onToggleStatus:je,onCancel:k})]})}function bn(){const o=ne(),{org:e}=Me(),n=$e(),g=st({strict:!1}),{data:s}=Oe.useSession(),{stdioEnabled:i}=it(),l=Ve(),{granted:r}=ye("connections:manage"),d=ln({namespace:e.slug,resource:"connections"}),p=ze(),[m,u]=ct(lt.connectionsTab(e.slug),x=>g.tab==="all"||g.tab==="connected"?g.tab:x??"all"),[a,j]=z.useState("ALL"),[f,S]=z.useState("ALL"),v=Ue(d.searchTerm).items,C=d.search!==d.searchTerm,c=rt({resolver:at(Qt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),h=c.watch("ui_type"),w=c.watch("connection_url"),N=c.watch("npx_package"),T=fe({uiType:h,connectionUrl:w??"",npxPackage:N??""})??ke({uiType:h,connectionUrl:w??"",registryItems:v}),M=r&&g.action==="create",I=()=>{te("connections_custom_dialog_opened",{source:"connections_page"}),n({to:".",search:x=>({...x,action:"create"})})},O=()=>{n({to:".",search:x=>({...x,action:void 0})})},P=async x=>{let A,E=null,ee=null,G=null;x.ui_type==="NPX"?(A="STDIO",E="",G=Yt(x.npx_package||"",x.env_vars||[])):x.ui_type==="STDIO"?(A="STDIO",E="",G=Zt(x.stdio_command||"",x.stdio_args||"",x.stdio_cwd,x.env_vars||[])):(A=x.ui_type,E=x.connection_url||"",ee=x.connection_token||null);const D=ft("conn");te("connection_custom_created",{connection_type:A,ui_type:x.ui_type}),await p.create.mutateAsync({id:D,title:x.title,description:x.description||null,connection_type:A,connection_url:E,connection_token:ee,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:s?.user?.id||"system",organization_id:e.id,icon:x.icon??null,app_name:null,app_id:null,connection_headers:G,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null}),O(),c.reset(),n({to:"/$org/settings/connections/$appSlug",params:{org:e.slug,appSlug:ae({app_name:null,connection_url:E,title:x.title,id:D})}})},k=x=>{x||(M&&O(),c.reset())},$=x=>{const A=x.trim();if(!A)return;const E=!!c.formState.dirtyFields.title,ee=!!c.formState.dirtyFields.description,G=!!c.formState.dirtyFields.env_vars,D=F=>{if(F&&(!E&&!c.getValues("title").trim()&&F.title&&c.setValue("title",F.title,{shouldDirty:!1}),!ee&&!(c.getValues("description")??"").trim()&&F.description&&c.setValue("description",F.description,{shouldDirty:!1}),!G&&F.envVarKeys?.length)){const ue=c.getValues("env_vars")??[],je=new Set(ue.map(b=>b.key)),ge=F.envVarKeys.filter(b=>!je.has(b));ge.length>0&&c.setValue("env_vars",[...ue,...ge.map(b=>({key:b,value:""}))],{shouldDirty:!0})}},V=Jt(A);if(V&&i){c.setValue("ui_type","NPX",{shouldDirty:!0}),c.setValue("npx_package",V.packageName,{shouldDirty:!0}),c.setValue("connection_url","",{shouldDirty:!0}),c.setValue("connection_token",null,{shouldDirty:!0}),D(fe({uiType:"NPX",npxPackage:V.packageName}));return}if(A.startsWith("http://")||A.startsWith("https://")){const F=h==="HTTP"||h==="SSE"||h==="Websocket"?h:"HTTP";c.setValue("ui_type",F,{shouldDirty:!0}),c.setValue("connection_url",A,{shouldDirty:!0}),D(fe({uiType:F,connectionUrl:A})??ke({uiType:F,connectionUrl:A,registryItems:v}));return}h==="NPX"&&D(fe({uiType:"NPX",npxPackage:A}))},U=r?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(L,{size:"sm",variant:"default",onClick:I,children:[t.jsx(Le,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:o("orgs.connections.customConnection")})]})}):null,X=t.jsx(xt,{sortKey:d.sortKey,sortDirection:d.sortDirection,onSort:d.handleSort,sortOptions:[{id:"title",label:o("orgs.connections.sortName")},{id:"description",label:o("orgs.connections.sortDescription")},{id:"connection_type",label:o("orgs.connections.sortType")},{id:"updated_by",label:o("orgs.connections.sortUpdatedBy")},{id:"updated_at",label:o("orgs.connections.sortUpdated")}],filters:[{label:o("orgs.connections.filterType"),value:a,onChange:x=>j(x||"ALL"),options:[{id:"ALL",label:o("orgs.connections.filterAll")},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:o("orgs.connections.filterStatus"),value:f,onChange:x=>S(x||"ALL"),options:[{id:"ALL",label:o("orgs.connections.filterAll")},{id:"active",label:o("orgs.connections.filterActive")},{id:"inactive",label:o("orgs.connections.filterInactive")},{id:"error",label:o("orgs.connections.filterError")}]}]});return t.jsx(t.Fragment,{children:t.jsxs(pe,{children:[(()=>{const x=o("orgs.connections.createConnection"),A=o("orgs.connections.createConnectionDescription"),E=c.formState.isSubmitting?o("orgs.connections.saving"):o("orgs.connections.createConnection"),ee=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:c.control,name:"ui_type",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.type")}),t.jsxs($t,{value:D.value,onValueChange:D.onChange,children:[t.jsx(Y,{children:t.jsx(Ot,{children:t.jsx(Ft,{})})}),t.jsxs(Ut,{children:[t.jsx(re,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(re,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(re,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"Websocket"]})}),i&&t.jsxs(t.Fragment,{children:[t.jsx(re,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(xe,{className:"w-4 h-4"}),o("orgs.connections.npxPackage")]})}),t.jsx(re,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Xt,{className:"w-4 h-4"}),o("orgs.connections.customCommand")]})})]})]})]}),t.jsx(Z,{})]})}),h==="NPX"&&t.jsx(Q,{control:c.control,name:"npx_package",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.npmPackage")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.npmPackagePlaceholder"),...D,value:D.value??"",onPaste:V=>{const F=V.clipboardData.getData("text");F&&(V.preventDefault(),c.setValue("npx_package",F.trim(),{shouldDirty:!0}),$(F))},onBlur:V=>{$(V.target.value),D.onBlur()}})}),t.jsx(Z,{})]})}),h==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:c.control,name:"stdio_command",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.command")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.commandPlaceholder"),...D,value:D.value??""})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"stdio_args",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.arguments")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.argumentsPlaceholder"),...D,value:D.value??""})}),t.jsx(Z,{})]})})]}),t.jsx(Q,{control:c.control,name:"stdio_cwd",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.workingDirectory")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.workingDirectoryPlaceholder"),...D,value:D.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("orgs.connections.directoryExecutionNote")}),t.jsx(Z,{})]})})]}),(h==="NPX"||h==="STDIO")&&t.jsx(Q,{control:c.control,name:"env_vars",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.environmentVariables")}),t.jsx(Y,{children:t.jsx(qt,{value:D.value??[],onChange:D.onChange})}),t.jsx(Z,{})]})}),h!=="NPX"&&h!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:c.control,name:"connection_url",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.url")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.urlPlaceholder"),...D,value:D.value??"",onPaste:V=>{const F=V.clipboardData.getData("text");F&&(V.preventDefault(),c.setValue("connection_url",F.trim(),{shouldDirty:!0}),$(F))},onBlur:V=>{$(V.target.value),D.onBlur()}})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"connection_token",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:T?.token?.label??o("orgs.connections.tokenOptional")}),t.jsx(Y,{children:t.jsx(oe,{type:"password",placeholder:T?.token?.placeholder??o("orgs.connections.tokenPlaceholder"),...D,value:D.value??""})}),T?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.token.helperText,T.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("orgs.connections.openGitHubPatSettings")})]})]}),t.jsx(Z,{})]})})]}),t.jsx(Q,{control:c.control,name:"title",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.name")}),t.jsx(Y,{children:t.jsx(oe,{placeholder:o("orgs.connections.namePlaceholder"),...D})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"description",render:({field:D})=>t.jsxs(q,{children:[t.jsx(J,{children:o("orgs.connections.description")}),t.jsx(Y,{children:t.jsx(Vt,{placeholder:o("orgs.connections.descriptionPlaceholder"),rows:3,...D,value:D.value??""})}),t.jsx(Z,{})]})})]}),G=M;return l?t.jsx(Nt,{open:G,onOpenChange:k,children:t.jsxs(Tt,{className:"max-h-[90vh]",children:[t.jsx(At,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(wt,{children:x}),t.jsx(It,{className:"mt-1",children:A})]}),t.jsx(Pt,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":o("orgs.connections.close"),children:t.jsx(Be,{size:16})})})]})}),t.jsx(De,{...c,children:t.jsxs("form",{onSubmit:c.handleSubmit(P),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:ee}),t.jsx(Mt,{children:t.jsx(L,{type:"submit",disabled:c.formState.isSubmitting,className:"w-full",children:E})})]})})]})}):t.jsx(Pe,{open:G,onOpenChange:k,children:t.jsxs(Ie,{className:"sm:max-w-[525px]",children:[t.jsxs(Ae,{children:[t.jsx(Ne,{children:x}),t.jsx(Te,{children:A})]}),t.jsx(De,{...c,children:t.jsxs("form",{onSubmit:c.handleSubmit(P),children:[t.jsx("div",{className:"py-4",children:ee}),t.jsxs(we,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>k(!1),children:o("orgs.connections.cancel")}),t.jsx(L,{type:"submit",disabled:c.formState.isSubmitting,className:"min-w-40",children:E})]})]})})]})})})(),t.jsx(pe.Content,{children:t.jsx(pe.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(pe.Actions,{secondary:t.jsxs(t.Fragment,{children:[t.jsx(jt,{value:d.search,onChange:d.setSearch,label:o("library.context.search"),placeholder:o("orgs.connections.searchPlaceholder"),clearLabel:o("library.library.clearSearch")}),X]}),children:U}),t.jsx(St,{placement:"page",tabs:[{id:"all",label:o("orgs.connections.tabAll")},{id:"connected",label:o("orgs.connections.tabConnected")}],activeTab:m,onTabChange:x=>{const A=x;A!==m&&te("connections_page_tab_changed",{to_tab:A}),u(A)}}),t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:C?.5:1,transition:C?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:C?"none":"auto"},children:t.jsx(vn,{listState:d,activeTab:m,typeFilter:a,statusFilter:f})})})]})})})]})})}function qo(){const o=W.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ot,{children:t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}),children:t.jsx(bn,{})})}),o[0]=e):e=o[0],e}export{qo as default};
|