decocms 4.618.0 → 4.619.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/dist/client/assets/{AlertCircle-BYyFOifG.js → AlertCircle-CS5y5cdF.js} +1 -1
  2. package/dist/client/assets/{AreaChart-D6tyN032.js → AreaChart-6i9ddKAo.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BQKI9I0k.js → ArrowLeft-CnpYebJt.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-B21E_uc5.js → ArrowRight-CTIzvrRD.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BbdlU24N.js → ArrowUp-B_rPxUl3.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-BUy5CVjC.js → BookOpen01-0vmOJP7K.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-DDuspEUo.js → CartesianChart-BLh4dFJB.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CclXOr_i.js → CategoricalChart-CwzUkCwO.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DtUq_uxu.js → CheckCircle-CVSsEuJs.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-C0rME5fU.js → ChevronDown-BkddO6nk.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-BCjXLDN_.js → ChevronSelectorVertical-B_EPXu-J.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-CIqW-9_W.js → ChevronUp-hmtO7NfN.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-BGMvQi86.js → CreditCard01-CYAMo28t.js} +1 -1
  14. package/dist/client/assets/{Eye-DvysNEeS.js → Eye-NyWbd_Et.js} +1 -1
  15. package/dist/client/assets/{File02-Nky5bxni.js → File02-B0o8Z6Rd.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-DNoiAgrN.js → Fingerprint04-DFly9X11.js} +1 -1
  17. package/dist/client/assets/{Globe04--1ycu_yQ.js → Globe04-Bu51hlDK.js} +1 -1
  18. package/dist/client/assets/{Image01-BGZNkNVE.js → Image01-Xgs_5RZR.js} +1 -1
  19. package/dist/client/assets/{Key01-B7vuN73N.js → Key01-B6wydByr.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-DTjvUEMi.js → LayoutLeft-ww8XIIKY.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-w2HNuUHo.js → LinkBroken01-CothmVOv.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-BUz5eIR5.js → MessageCircle01-BoiiT0Ka.js} +1 -1
  23. package/dist/client/assets/{Minus-DhX2EjkJ.js → Minus-DjGZhteG.js} +1 -1
  24. package/dist/client/assets/{Monitor01-Dv4dKtFe.js → Monitor01-BnNa35fy.js} +1 -1
  25. package/dist/client/assets/{Play-BcRuLGoC.js → Play-DYcX2TsV.js} +1 -1
  26. package/dist/client/assets/{Plus-Bd_Azs6t.js → Plus-BlCDSK3_.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-B5a2JVy9.js → ReferenceLine-ysfQtWpe.js} +1 -1
  28. package/dist/client/assets/{SearchMd-DoUjFKDV.js → SearchMd-B2ZqlWzx.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-DsiPVRC3.js → ShoppingBag01-CO-Ik7_a.js} +1 -1
  30. package/dist/client/assets/{Sun-bgIMzv-s.js → Sun-C31h0XVy.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-BZWsjo2g.js → SwitchHorizontal01-B9krqVlE.js} +1 -1
  32. package/dist/client/assets/{Tool01-JC0jUvnM.js → Tool01-D_bTJJvK.js} +1 -1
  33. package/dist/client/assets/{Tooltip-DmnEut8_.js → Tooltip-BDg85pZn.js} +1 -1
  34. package/dist/client/assets/{Trash01-DUjxO1Dn.js → Trash01-CvVvZjMc.js} +1 -1
  35. package/dist/client/assets/{Upload01-BcZgaIHQ.js → Upload01-DAa882sM.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-CHkzczFI.js → UserCheck01-B7Ux1cXt.js} +1 -1
  37. package/dist/client/assets/{UserSquare-D6ubIo4l.js → UserSquare-fSKR9s5Z.js} +1 -1
  38. package/dist/client/assets/{Users01-DOgFV3e5.js → Users01-CYXQ60-Z.js} +1 -1
  39. package/dist/client/assets/{XClose-CHJIrn3i.js → XClose-BvzwUB-E.js} +1 -1
  40. package/dist/client/assets/{Zap-6gSNYeqn.js → Zap-BALSokOc.js} +1 -1
  41. package/dist/client/assets/{access-gate-B30zL1q2.js → access-gate-JiR82oco.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-DgKMGv-9.js → add-connection-dialog-DYa3N2eg.js} +1 -1
  43. package/dist/client/assets/agent-app-Ccrencfm.js +1 -0
  44. package/dist/client/assets/{agent-assets-CamOcpgT.js → agent-assets-DThFx4M4.js} +1 -1
  45. package/dist/client/assets/{agent-automation-BfbO9Khi.js → agent-automation-BNyRdPpc.js} +1 -1
  46. package/dist/client/assets/{agent-automations-B4IdsMR9.js → agent-automations-DJGo3Vpm.js} +1 -1
  47. package/dist/client/assets/{agent-blog-Cafvmf-h.js → agent-blog-SWKAlIDs.js} +2 -2
  48. package/dist/client/assets/{agent-blog-post-Dqts0p9T.js → agent-blog-post-BMj1nG5H.js} +2 -2
  49. package/dist/client/assets/{agent-business-case-BhUa4Myx.js → agent-business-case-DWa8MdFx.js} +1 -1
  50. package/dist/client/assets/{agent-calendar-yZ-kBQTO.js → agent-calendar-Dc34MYin.js} +1 -1
  51. package/dist/client/assets/{agent-capabilities-CWtYqnIq.js → agent-capabilities-B0JydJjP.js} +1 -1
  52. package/dist/client/assets/{agent-connect-sources-D6NBeEEC.js → agent-connect-sources-BzvV2s_2.js} +1 -1
  53. package/dist/client/assets/agent-deck-t8ah4YL3.js +1 -0
  54. package/dist/client/assets/{agent-e2e-WoNG4ZEl.js → agent-e2e-CVKnE_cq.js} +1 -1
  55. package/dist/client/assets/agent-experiments-B6WL8a55.js +1 -0
  56. package/dist/client/assets/agent-file-DzOVJ5jJ.js +1 -0
  57. package/dist/client/assets/{agent-hosting-nth6pteI.js → agent-hosting-CzWiy0GX.js} +1 -1
  58. package/dist/client/assets/{agent-icon-zKGrqypc.js → agent-icon-qKbICqBE.js} +1 -1
  59. package/dist/client/assets/agent-library-CkWv-QK0.js +1 -0
  60. package/dist/client/assets/agent-library-file-BeuXNSru.js +1 -0
  61. package/dist/client/assets/agent-overview-vn0B99S2.js +1 -0
  62. package/dist/client/assets/{agent-releases-Bf5mW-Cb.js → agent-releases-DVlreX78.js} +1 -1
  63. package/dist/client/assets/agent-settings-C8Vbd4tx.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-Cs2byz0P.js → agent-site-editor-BscJQYUu.js} +1 -1
  65. package/dist/client/assets/agent-site-editor-code-znS9yeFa.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-DFaZauTr.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-Bshkv5l8.js +1 -0
  68. package/dist/client/assets/agent-view-DbsCo68i.js +1 -0
  69. package/dist/client/assets/{agent-view-guard-BlaaF4Tt.js → agent-view-guard-2l72ULUX.js} +1 -1
  70. package/dist/client/assets/ai-providers-BuJXSSAm.js +1 -0
  71. package/dist/client/assets/{alert-Bv1HVos8.js → alert-pq0Y8AC8.js} +1 -1
  72. package/dist/client/assets/{analytics-sections-BszcYb0J.js → analytics-sections-BcskhJEQ.js} +1 -1
  73. package/dist/client/assets/api-keys-C3uBLxjm.js +1 -0
  74. package/dist/client/assets/{api-keys-omOxFywl.js → api-keys-SpdE7FiC.js} +1 -1
  75. package/dist/client/assets/{app-editor-CrhcliiJ.js → app-editor-1yI1PePZ.js} +1 -1
  76. package/dist/client/assets/{asset-utils-C40NGt6S.js → asset-utils-tz_LHKas.js} +1 -1
  77. package/dist/client/assets/{auth-BbyP7Mh4.js → auth-AT-S53oU.js} +1 -1
  78. package/dist/client/assets/{auth-catchall-DC_pvXWR.js → auth-catchall-CFacQ3p_.js} +1 -1
  79. package/dist/client/assets/{auth-entry-DTt6oF6n.js → auth-entry-BuYf9qZf.js} +1 -1
  80. package/dist/client/assets/{auth-split-layout-D6lmqNl3.js → auth-split-layout-Bdnex8hf.js} +1 -1
  81. package/dist/client/assets/{authenticate-and-persist-oauth-Dv5K3sbt.js → authenticate-and-persist-oauth-BOJ6RO7H.js} +1 -1
  82. package/dist/client/assets/{automation-list-row-CVyxW8bA.js → automation-list-row-Du2hwkkk.js} +1 -1
  83. package/dist/client/assets/{automation-runs-DxzIf484.js → automation-runs-Bg2KLqhb.js} +1 -1
  84. package/dist/client/assets/{automations-D6gxCniS.js → automations-BJ-1CA9i.js} +1 -1
  85. package/dist/client/assets/{badge-DhCDyINb.js → badge-CFiK0EOx.js} +1 -1
  86. package/dist/client/assets/{block-document-DhUbHSJu.js → block-document-DUVkY9ea.js} +1 -1
  87. package/dist/client/assets/{blocks-preview-workspace-context-Bmn4QW94.js → blocks-preview-workspace-context-B9duZzas.js} +1 -1
  88. package/dist/client/assets/{blocks-tab-states-CtDx-TXT.js → blocks-tab-states-DC7kOtf6.js} +1 -1
  89. package/dist/client/assets/{blog-preview-url-C8ne1zjD.js → blog-preview-url-sQQ4EaTX.js} +1 -1
  90. package/dist/client/assets/{blog-schema-XbxpqD7n.js → blog-schema-jwHNvUT9.js} +1 -1
  91. package/dist/client/assets/{blog-source-gate--8e6WU5f.js → blog-source-gate-CdJyl3s4.js} +1 -1
  92. package/dist/client/assets/{blog-view-gate-5YPkAPHi.js → blog-view-gate-CH_KIbwu.js} +1 -1
  93. package/dist/client/assets/{buckets-mVuz76PR.js → buckets-B4_-T0ED.js} +1 -1
  94. package/dist/client/assets/{build-improve-prompt-doc-YaUfgVXc.js → build-improve-prompt-doc-BviIkkQs.js} +1 -1
  95. package/dist/client/assets/{calendar-BDRihgLI.js → calendar-C02ezVcS.js} +1 -1
  96. package/dist/client/assets/{capability-load-error-BUXjQvww.js → capability-load-error-C7VfNWgD.js} +1 -1
  97. package/dist/client/assets/{category-editor-DAZ1WajU.js → category-editor-DqRDNx2v.js} +1 -1
  98. package/dist/client/assets/{category-tree-9o5eAqGF.js → category-tree-dngYOFzN.js} +1 -1
  99. package/dist/client/assets/{chart-BD1DM8Vo.js → chart-D2etphpL.js} +1 -1
  100. package/dist/client/assets/chat-context-CvQ-sM5v.js +43 -0
  101. package/dist/client/assets/{chat-draft-BwCJJBjY.js → chat-draft-CPECGWWa.js} +1 -1
  102. package/dist/client/assets/{checkbox-BK5KAA6g.js → checkbox-DR7-Iy_E.js} +1 -1
  103. package/dist/client/assets/{choose-editor-Xa2hczm2.js → choose-editor-C-XxlJ7G.js} +1 -1
  104. package/dist/client/assets/{cli-auth-success-4m_qDet6.js → cli-auth-success-BvJuyvyk.js} +1 -1
  105. package/dist/client/assets/{cms-settings-editor-CT9mj3NU.js → cms-settings-editor-CTMXFNOv.js} +1 -1
  106. package/dist/client/assets/{cms-store-drafts-BZtc347l.js → cms-store-drafts-q3yACtXx.js} +1 -1
  107. package/dist/client/assets/{collapsible-Ff_HBxQZ.js → collapsible-BKxoPjIN.js} +1 -1
  108. package/dist/client/assets/{collection-detail-Da5T5FHc.js → collection-detail-iP9tRfV6.js} +1 -1
  109. package/dist/client/assets/{collection-display-button-Dsc8IsyJ.js → collection-display-button-BVsx6EDz.js} +1 -1
  110. package/dist/client/assets/{collection-search-C3yL3Si4.js → collection-search-CphnxlYD.js} +1 -1
  111. package/dist/client/assets/{collection-table-wrapper-CC70QIiG.js → collection-table-wrapper-BfQjodPV.js} +1 -1
  112. package/dist/client/assets/{collection-tabs-Bw8ZEjbc.js → collection-tabs-C9T1HZQP.js} +1 -1
  113. package/dist/client/assets/{combobox-DhzcDPGN.js → combobox-BTP9T0Pc.js} +1 -1
  114. package/dist/client/assets/{command-C04_rx60.js → command-Cqqhh_W6.js} +1 -1
  115. package/dist/client/assets/{companion-mcps-section-Cyom-mwN.js → companion-mcps-section-SEt2U7bz.js} +1 -1
  116. package/dist/client/assets/{config-CTUwx0E7.js → config-DGvqEncS.js} +1 -1
  117. package/dist/client/assets/{connect-key-x35pzj1P.js → connect-key-DVNtQy7y.js} +1 -1
  118. package/dist/client/assets/{connect-layout-CYxI3Ix2.js → connect-layout-sx7G_FMd.js} +1 -1
  119. package/dist/client/assets/{connect-BFJ96IAv.js → connect-obEE-StP.js} +1 -1
  120. package/dist/client/assets/{connect-source-dialog-DW2Q7-Vc.js → connect-source-dialog-DnCXZ3Bm.js} +1 -1
  121. package/dist/client/assets/{connection-OrxsAVXu.js → connection-BZJlBrLd.js} +1 -1
  122. package/dist/client/assets/{connection-card-JSblTqum.js → connection-card-B8Lj_r0P.js} +1 -1
  123. package/dist/client/assets/{connection-detail-BDZh3nKl.js → connection-detail-CVYzedpa.js} +1 -1
  124. package/dist/client/assets/{connection-form-helpers-D-61dVx3.js → connection-form-helpers-veDVCb9w.js} +1 -1
  125. package/dist/client/assets/{connection-slug-BxAeiVuI.js → connection-slug-DOi8cWyk.js} +1 -1
  126. package/dist/client/assets/{connections-Cm49J0DF.js → connections-k9zhxlcM.js} +1 -1
  127. package/dist/client/assets/{content-changes-Sy14c4Sj.js → content-changes-CFJfbWRJ.js} +1 -1
  128. package/dist/client/assets/{content-tab-B08qF9Ws.js → content-tab-Cq6li-sw.js} +3 -3
  129. package/dist/client/assets/{context-DWbB1_E6.js → context-DCQPaz03.js} +1 -1
  130. package/dist/client/assets/{context-menu-2WNbt8mp.js → context-menu-BfINdeF4.js} +1 -1
  131. package/dist/client/assets/{context-shell-CsxbLyhW.js → context-shell-DkTSiVhx.js} +3 -3
  132. package/dist/client/assets/{create-organization-dialog-Cmj0uZ47.js → create-organization-dialog-pttnLi8P.js} +1 -1
  133. package/dist/client/assets/{daily-pulse-C2a7jj6_.js → daily-pulse-BMeIrOO8.js} +1 -1
  134. package/dist/client/assets/{delete-copy-B_bYyZez.js → delete-copy-BI2Sd04D.js} +1 -1
  135. package/dist/client/assets/{device-hint-BT8_DhB_.js → device-hint-XFntojbN.js} +1 -1
  136. package/dist/client/assets/{discover-DqSkXP2Q.js → discover-DCJNP2ov.js} +1 -1
  137. package/dist/client/assets/{domain-settings-Cyu0iMV3.js → domain-settings-C369ETrU.js} +1 -1
  138. package/dist/client/assets/{drawer-BdL5OKVC.js → drawer-DtT_qu3U.js} +1 -1
  139. package/dist/client/assets/{editor-CUzd1SE7.js → editor-DpPPqPRR.js} +1 -1
  140. package/dist/client/assets/{editor-classes-1dg1pjaK.js → editor-classes-Bw4_cV_9.js} +1 -1
  141. package/dist/client/assets/{empty-state-9tWEtAox.js → empty-state-CWawuVzh.js} +1 -1
  142. package/dist/client/assets/{empty-state-CCe_gxuj.js → empty-state-l9Tatoxd.js} +1 -1
  143. package/dist/client/assets/{experiments-tab-choice-CvZgfB88.js → experiments-tab-choice-DLka__Fj.js} +1 -1
  144. package/dist/client/assets/{extract-connection-data-0MTwkkap.js → extract-connection-data-DjE1yVUY.js} +1 -1
  145. package/dist/client/assets/{feature-gate-BoNGlq-b.js → feature-gate-wF4resWq.js} +1 -1
  146. package/dist/client/assets/{feature-paywall-Bg-PT-Nn.js → feature-paywall-DF7aqMQM.js} +1 -1
  147. package/dist/client/assets/{file-explorer-DQI3RjrR.js → file-explorer-Bm3jEOW7.js} +1 -1
  148. package/dist/client/assets/{file-preview-pAXtoXVY.js → file-preview-p0rGgJtU.js} +1 -1
  149. package/dist/client/assets/{file-share-button-BpR0pG7Z.js → file-share-button-BAJCRraz.js} +1 -1
  150. package/dist/client/assets/{file-type-icon-BINq6pAJ.js → file-type-icon-CEKCIITa.js} +1 -1
  151. package/dist/client/assets/{folder-icon-JauS1zcB.js → folder-icon-DCqfnk5g.js} +1 -1
  152. package/dist/client/assets/{form-DINHcU5h.js → form-eUXxZ5Qg.js} +1 -1
  153. package/dist/client/assets/{frame-navigation-bHiDiNE9.js → frame-navigation-DlTZKvqt.js} +1 -1
  154. package/dist/client/assets/{gateway-client-BXoRIC2f.js → gateway-client-BYWq7W1f.js} +1 -1
  155. package/dist/client/assets/{general-KZQuDKZq.js → general-dOdvSQ1l.js} +1 -1
  156. package/dist/client/assets/{github-icon-DeI0LVM6.js → github-icon-PNZqrJY6.js} +1 -1
  157. package/dist/client/assets/{held-block-view-BplchR69.js → held-block-view-CPPtRU-n.js} +1 -1
  158. package/dist/client/assets/{home-BM2M0ir_.js → home-B2gF0aRT.js} +1 -1
  159. package/dist/client/assets/{home-overview-C7_beN9y.js → home-overview-DkyPJx_z.js} +1 -1
  160. package/dist/client/assets/{hosted-reconcile-zJ_hLbuq.js → hosted-reconcile-DEHcrXPf.js} +1 -1
  161. package/dist/client/assets/{icon-button-DTvCNNgw.js → icon-button-CfgrKbmG.js} +1 -1
  162. package/dist/client/assets/{index-C1HmbFkP.js → index-B1yf8QQv.js} +1 -1
  163. package/dist/client/assets/{index-DkgRE7a8.js → index-BHLuDBD-.js} +1 -1
  164. package/dist/client/assets/{index-cHqyigDN.js → index-BUHQM-fc.js} +1 -1
  165. package/dist/client/assets/{index-gkLejYlX.js → index-Bp_BkLlL.js} +1 -1
  166. package/dist/client/assets/{index-BE5pN4ch.js → index-CEoORQx_.js} +1 -1
  167. package/dist/client/assets/{index-DGzcH4Vq.js → index-CdR9qfQl.js} +1 -1
  168. package/dist/client/assets/{index-DpsRmOqH.js → index-CePbUNpp.js} +1 -1
  169. package/dist/client/assets/{index-Ctcj_Ic4.js → index-CorQG-PM.js} +1 -1
  170. package/dist/client/assets/{index-D4Cq4uu-.js → index-D9pnpNHk.js} +1 -1
  171. package/dist/client/assets/{index-KT7S-wXA.js → index-DQFWZMPO.js} +1 -1
  172. package/dist/client/assets/{index-B7VjCiRT.js → index-DYf9rJn2.js} +1 -1
  173. package/dist/client/assets/{index-DNY1LCEV.js → index-FRxLT_js.js} +5 -5
  174. package/dist/client/assets/{index-CxRoy25G.js → index-K-FtkPVI.js} +1 -1
  175. package/dist/client/assets/{index-BYAVvzAx.js → index-UwOo6lse.js} +1 -1
  176. package/dist/client/assets/{index-DOAcfhWB.js → index-VEcIOiWN.js} +1 -1
  177. package/dist/client/assets/{index-BpSAkv2Q.js → index-oOJhkPK6.js} +1 -1
  178. package/dist/client/assets/{index-redirect-D7g6EvmF.js → index-redirect-DVZANI8q.js} +1 -1
  179. package/dist/client/assets/{index-WY5skHFQ.js → index-xNvvPF5K.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-C58dnOYG.js → infiniteQueryObserver-CZ7GCbwa.js} +1 -1
  181. package/dist/client/assets/{infra-billing-PmBjX27u.js → infra-billing-CBaX0rFG.js} +1 -1
  182. package/dist/client/assets/{input-Biz1-kQq.js → input-B0jMF0e_.js} +1 -1
  183. package/dist/client/assets/{input-DW2VJfvP.js → input-DS1fkrsU.js} +3 -3
  184. package/dist/client/assets/{integration-icon-B7GQGDoQ.js → integration-icon-BTN_yWEk.js} +1 -1
  185. package/dist/client/assets/{item-actions-CigQSqIo.js → item-actions-iEQmPVrr.js} +1 -1
  186. package/dist/client/assets/{jira-icon-CNLkC5R4.js → jira-icon-DXOB8Lmw.js} +1 -1
  187. package/dist/client/assets/{label-BleuytxV.js → label-DKoCaul6.js} +1 -1
  188. package/dist/client/assets/{layout-BCbrxcxs.js → layout-DbhvOsyV.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-B_mFKFt0.js → legacy-admin-welcome-dialog-B3iJcsKr.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-suvWZq4w.js → legacy-agents-deep-em6yOC_F.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-CqfpK3yi.js → legacy-main-redirect-CehX4Bni.js} +1 -1
  192. package/dist/client/assets/library-Dly_OLLg.js +1 -0
  193. package/dist/client/assets/{library-tab-B6-1oo-4.js → library-tab-ekrJ9bue.js} +1 -1
  194. package/dist/client/assets/{login-CIC76liy.js → login-DJDyJ1ju.js} +1 -1
  195. package/dist/client/assets/{markdown-D7s3zZ1r.js → markdown-we-cHxXq.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-xoRmsbxJ.js → mcp-app-renderer-BAfMgB1Z.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-Bm9eowFy.js → mcp-oauth-Ci6yqFTl.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-DdZ5iqUI.js → mcp-oauth-Ds0j31F2.js} +1 -1
  199. package/dist/client/assets/{members-BVDYMl5s.js → members-BcSHOsjX.js} +1 -1
  200. package/dist/client/assets/{memory-OIMax3Mf.js → memory-BowPTmEv.js} +1 -1
  201. package/dist/client/assets/{mock-board-DcJ7MEwz.js → mock-board-CW6QKw2v.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-wJhgDEpd.js → monaco-editor-B5PTOxIz.js} +1 -1
  203. package/dist/client/assets/{monitoring-stats-row-BGw1gEqW.js → monitoring-stats-row-DJXMqCN0.js} +1 -1
  204. package/dist/client/assets/{monitoring-Dhz_4NNt.js → monitoring-xIY_IPi8.js} +1 -1
  205. package/dist/client/assets/{multi-select-j_cBBkSq.js → multi-select-DuNPPMuZ.js} +1 -1
  206. package/dist/client/assets/{mustache-ByNI-hYL.js → mustache-Bwl2DYO1.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-CIgwVXN9.js → named-rule-step-DS5kGuIs.js} +1 -1
  208. package/dist/client/assets/{named-rule-view-QjZFYuFQ.js → named-rule-view-Z5BTjESF.js} +1 -1
  209. package/dist/client/assets/{new-project-dialog-B8SVDcTm.js → new-project-dialog-HgjtDq4l.js} +1 -1
  210. package/dist/client/assets/{new-project-store-rLMUNU2t.js → new-project-store-CKvMs4hG.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-BCJ9lzNV.js → oauth-callback-DmgNmP6n.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-DUTt9OdA.js → oauth-callback-ai-provider-CSpD6uGn.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-aERAtVyD.js → oauth-consent-Cr-15ieV.js} +1 -1
  214. package/dist/client/assets/{onboarding-BEeDAE1n.js → onboarding-Ete3lfiA.js} +1 -1
  215. package/dist/client/assets/{openai-conversation-CalrcjOi.js → openai-conversation-BCGRvpnO.js} +1 -1
  216. package/dist/client/assets/{optimistic-project-sidebar-views-gHKEu9Pp.js → optimistic-project-sidebar-views-B_55Z4kz.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-BMsq7ZVq.js → order-monitor-day-Clbe0SA4.js} +1 -1
  218. package/dist/client/assets/{organization-choice-Dumfb2MT.js → organization-choice-B_iJSsFB.js} +1 -1
  219. package/dist/client/assets/{orgs-BaQBoOtD.js → orgs-BFePKqBY.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-CYaA86cP.js → own-accounts-section-CSwSnoe4.js} +1 -1
  221. package/dist/client/assets/{pair-Bb6oWjIQ.js → pair-DhT-6yBR.js} +1 -1
  222. package/dist/client/assets/{parse-sections-Dru7Bhw3.js → parse-sections-BZeGOsxE.js} +2 -2
  223. package/dist/client/assets/plan-BO0tgjWI.js +1 -0
  224. package/dist/client/assets/{plan-ladder-DCMpCI9t.js → plan-ladder-aYguFL8S.js} +1 -1
  225. package/dist/client/assets/{plan-page-DhlVp1jr.js → plan-page-B07fHd07.js} +1 -1
  226. package/dist/client/assets/{plan-usage-card-b1xfvJA5.js → plan-usage-card-D_4-ZHg-.js} +1 -1
  227. package/dist/client/assets/{popover-O0--zxB3.js → popover-BI-lpUhu.js} +1 -1
  228. package/dist/client/assets/{post-calendar-TZVPBEms.js → post-calendar-Bh8YSwE0.js} +1 -1
  229. package/dist/client/assets/{post-editor-CjdfbpGv.js → post-editor-BbMWUU2h.js} +1 -1
  230. package/dist/client/assets/{preview-content-Cb6-Hnk_.js → preview-content-c-gz2Si_.js} +1 -1
  231. package/dist/client/assets/{preview-dialog-CeEvmRUv.js → preview-dialog-BFH4K3zp.js} +1 -1
  232. package/dist/client/assets/{preview-panel-DLXxpwqH.js → preview-panel-5axMxyLP.js} +1 -1
  233. package/dist/client/assets/{preview-tab-h0moNltj.js → preview-tab-DrWOVhIi.js} +3 -3
  234. package/dist/client/assets/{primitives-B_wOu0KD.js → primitives-phHVGNAI.js} +1 -1
  235. package/dist/client/assets/{product-picker-dialog-BBGqgaUN.js → product-picker-dialog-BJO35u0n.js} +1 -1
  236. package/dist/client/assets/{profile-DXP_cVu3.js → profile-1_I-_x94.js} +1 -1
  237. package/dist/client/assets/{project-app-view-Df72eQDp.js → project-app-view-TcCrX4oT.js} +1 -1
  238. package/dist/client/assets/{project-apps-D0yVssTS.js → project-apps-55s0I8iz.js} +1 -1
  239. package/dist/client/assets/{project-icon-Bys_QVfz.js → project-icon-piFAIvmP.js} +1 -1
  240. package/dist/client/assets/{project-index-D8QhEEmc.js → project-index-C209sCKL.js} +1 -1
  241. package/dist/client/assets/project-reports-_pvoxKuL.js +1 -0
  242. package/dist/client/assets/project-tasks-TZDHHmpj.js +1 -0
  243. package/dist/client/assets/{projects-DLDVeooh.js → projects-DJz5LDl0.js} +1 -1
  244. package/dist/client/assets/{projects-empty-state-BYfzt1p6.js → projects-empty-state-Bjbej4Jx.js} +1 -1
  245. package/dist/client/assets/{prompts-RK2BST5w.js → prompts-C3wMciT-.js} +1 -1
  246. package/dist/client/assets/record-editor-CEpespPR.js +1 -0
  247. package/dist/client/assets/{redirect-editor-CvpFIhP3.js → redirect-editor-CXYG17gC.js} +1 -1
  248. package/dist/client/assets/{reports-DiiYMFp7.js → reports-BAWCIXn8.js} +1 -1
  249. package/dist/client/assets/reports-CPxs2BgN.js +1 -0
  250. package/dist/client/assets/{reports-onboarding-CoRYS8wo.js → reports-onboarding-B3L3kaVX.js} +1 -1
  251. package/dist/client/assets/{reports-tab-BoI6tcUT.js → reports-tab-UTeYJ_79.js} +2 -2
  252. package/dist/client/assets/repositories-Bj1ogpqH.js +1 -0
  253. package/dist/client/assets/{repositories-dckrDwEU.js → repositories-Dj3HbYDX.js} +1 -1
  254. package/dist/client/assets/{repository-binding-0rqv5CYu.js → repository-binding-DjFY5b0y.js} +1 -1
  255. package/dist/client/assets/{repository-picker-8sFtA2jE.js → repository-picker-BHJB5432.js} +1 -1
  256. package/dist/client/assets/{require-capability-GB4QCUSY.js → require-capability-BtI4Tyqp.js} +1 -1
  257. package/dist/client/assets/{required-auth-layout-9Vw9oHyS.js → required-auth-layout-ChAYpVpn.js} +1 -1
  258. package/dist/client/assets/{reset-password-Bkf_fwQB.js → reset-password-CtG7aWDw.js} +1 -1
  259. package/dist/client/assets/{resizable-BycP7e00.js → resizable-BL8CU-aJ.js} +1 -1
  260. package/dist/client/assets/{resolve-tab-icon-B49st38Z.js → resolve-tab-icon-Ds9JNWyg.js} +1 -1
  261. package/dist/client/assets/{review-settings-AaM16RjA.js → review-settings-DNfSW4xg.js} +1 -1
  262. package/dist/client/assets/{role-color-CilFDy12.js → role-color-Kmb8GwCh.js} +1 -1
  263. package/dist/client/assets/{roles-BN919U7y.js → roles-DXacyEKl.js} +1 -1
  264. package/dist/client/assets/route-ChWaxiqL.js +1 -0
  265. package/dist/client/assets/{route-CH_5nuP_.js → route-CvOWJgQ8.js} +1 -1
  266. package/dist/client/assets/{route-BcZK3YCw.js → route-DhGhu9Ec.js} +1 -1
  267. package/dist/client/assets/{route-page-header-DpWJFSUF.js → route-page-header-D4_8Ct3f.js} +1 -1
  268. package/dist/client/assets/{sandbox-git-api-CG9RWp1R.js → sandbox-git-api-CuR5rUpq.js} +1 -1
  269. package/dist/client/assets/{sandbox-lifecycle-context-B2ggxGXu.js → sandbox-lifecycle-context-Bt4OsDeb.js} +1 -1
  270. package/dist/client/assets/{save-status-BQkBpUbv.js → save-status-DbwiLwGt.js} +1 -1
  271. package/dist/client/assets/{schema-JoNeetSU.js → schema-D1mfj_VD.js} +1 -1
  272. package/dist/client/assets/{schema-UfVOE_vK.js → schema-DFMNr5Cf.js} +1 -1
  273. package/dist/client/assets/{scroll-area-vXLoyQQw.js → scroll-area-BBpO5xX_.js} +1 -1
  274. package/dist/client/assets/{search-input-CazoQHCn.js → search-input-Dij8WCfy.js} +1 -1
  275. package/dist/client/assets/{search-toggle-om107pCr.js → search-toggle-BJsu_1mi.js} +1 -1
  276. package/dist/client/assets/{secret-picker-BUV633yj.js → secret-picker-D6eOapYQ.js} +1 -1
  277. package/dist/client/assets/{secrets-DGpgtf7U.js → secrets-ctTTJkDR.js} +1 -1
  278. package/dist/client/assets/{section-array-field-B5wOOl5Q.js → section-array-field-D4XW_wJ4.js} +1 -1
  279. package/dist/client/assets/{sections-BuMIRgN_.js → sections-B5mL2aQs.js} +1 -1
  280. package/dist/client/assets/{sections-editor-JNsgN9Jp.js → sections-editor-Dx_9N0tS.js} +1 -1
  281. package/dist/client/assets/{select-BtuZ1_PE.js → select-D5aPAOxI.js} +1 -1
  282. package/dist/client/assets/{select-model-D2eRzxwR.js → select-model-3J7FOs0F.js} +1 -1
  283. package/dist/client/assets/{seo-editor-CnvOLI1T.js → seo-editor-DP1v2Hug.js} +1 -1
  284. package/dist/client/assets/{separator-CDpQOaDp.js → separator-Dy_gHFOY.js} +1 -1
  285. package/dist/client/assets/{session-runtime-C9K2fhXt.js → session-runtime-CVF2LvNW.js} +1 -1
  286. package/dist/client/assets/settings-tab-BI3y61p6.js +1 -0
  287. package/dist/client/assets/{sheet-BclrNEHN.js → sheet-Dps_OtzY.js} +1 -1
  288. package/dist/client/assets/{shell-layout-B0CrobX4.js → shell-layout-B7ONrK1S.js} +1 -1
  289. package/dist/client/assets/{site-draft-actions-CKyxePcd.js → site-draft-actions-DhANjN0X.js} +1 -1
  290. package/dist/client/assets/{site-draft-view-DITfvlDo.js → site-draft-view-BYqJs7J2.js} +1 -1
  291. package/dist/client/assets/site-editor-0AMhqN9R.js +1 -0
  292. package/dist/client/assets/{site-editor-toast-ByfMLHrL.js → site-editor-toast-D2oMdvIY.js} +1 -1
  293. package/dist/client/assets/{skills-UpHMjGzP.js → skills-DxDybFRs.js} +1 -1
  294. package/dist/client/assets/{slider-BccigXwM.js → slider-w4rF_qju.js} +1 -1
  295. package/dist/client/assets/{sortable.esm-LMzGz7vy.js → sortable.esm-MHH13t78.js} +1 -1
  296. package/dist/client/assets/{sso-BOXfHaVK.js → sso-Dl9I7AOe.js} +1 -1
  297. package/dist/client/assets/{suggestion-6kwzt7Yb.js → suggestion-SjSKJeBU.js} +1 -1
  298. package/dist/client/assets/{super-agent-icon-z6Ee2KPL.js → super-agent-icon-Cc4Ciwsy.js} +1 -1
  299. package/dist/client/assets/{switch-DVmURNlF.js → switch-CEzsWFkp.js} +1 -1
  300. package/dist/client/assets/{synced-repos-J7N806y3.js → synced-repos-CNS7qyVv.js} +1 -1
  301. package/dist/client/assets/{tab-icon-glyph-D6HWUMfv.js → tab-icon-glyph-BJZJf5lc.js} +1 -1
  302. package/dist/client/assets/{table-Dfn_tXRY.js → table-DdZpQzqo.js} +1 -1
  303. package/dist/client/assets/{tabs-DzZuOsBG.js → tabs-JKAPr-O4.js} +1 -1
  304. package/dist/client/assets/{task-board-B6w6sUwb.js → task-board-B_oKjzEP.js} +1 -1
  305. package/dist/client/assets/{task-key-DwKgVgaG.js → task-key-BWDMUi9g.js} +1 -1
  306. package/dist/client/assets/{task-route-DILYUxw7.js → task-route-Cr6uckKl.js} +1 -1
  307. package/dist/client/assets/{task-status-CWjPA6gQ.js → task-status-BkYGOB1i.js} +1 -1
  308. package/dist/client/assets/{taskboard-analytics-D8X9MO7l.js → taskboard-analytics-nugCG6C8.js} +1 -1
  309. package/dist/client/assets/tasks-9sGiiD4G.js +1 -0
  310. package/dist/client/assets/{tasks-BWMxQc4P.js → tasks-DGRvo6F8.js} +1 -1
  311. package/dist/client/assets/{textarea-BS-fwvE3.js → textarea-Cipr2aDL.js} +1 -1
  312. package/dist/client/assets/{thread-analytics-BEFAIWhI.js → thread-analytics-CUyAWSkz.js} +1 -1
  313. package/dist/client/assets/{thread-button-CCXdzpOs.js → thread-button-DEmMau3d.js} +1 -1
  314. package/dist/client/assets/{thread-intent-Dmqjim4G.js → thread-intent-CoFgTbor.js} +1 -1
  315. package/dist/client/assets/{thread-route-DFPY6b9-.js → thread-route-BRmRa2CS.js} +1 -1
  316. package/dist/client/assets/{thread-route-BMQ7FfFy.js → thread-route-TTLcBPLy.js} +1 -1
  317. package/dist/client/assets/{thread-sheet-body-D_58wlnB.js → thread-sheet-body-DU2O97KV.js} +1 -1
  318. package/dist/client/assets/{time-range-picker-DVPzF6pR.js → time-range-picker-CBoxldZD.js} +1 -1
  319. package/dist/client/assets/{toggle-group-BSOB6hW8.js → toggle-group-4Uqc6vzQ.js} +1 -1
  320. package/dist/client/assets/{tool-set-selector-D9iHbEUH.js → tool-set-selector-DoFKwoWc.js} +1 -1
  321. package/dist/client/assets/{toolbar-icon-button-B2FJhjHB.js → toolbar-icon-button-DnvtDhiO.js} +1 -1
  322. package/dist/client/assets/{tooltip-DEqrMv7W.js → tooltip-C6OYlSV-.js} +1 -1
  323. package/dist/client/assets/{tooltipContext-BbljAPKp.js → tooltipContext-D2O58pOO.js} +1 -1
  324. package/dist/client/assets/{track-Bp6zOhD6.js → track-D2uS6dpC.js} +1 -1
  325. package/dist/client/assets/{types-mnHt7RAy.js → types-cOzCnmYI.js} +1 -1
  326. package/dist/client/assets/{url-slug-BNPYObW-.js → url-slug-DgA17VrJ.js} +1 -1
  327. package/dist/client/assets/{usage-stats-PE4G0CeB.js → usage-stats-X4jMwPwX.js} +1 -1
  328. package/dist/client/assets/use-ai-providers-BDyMN-N5.js +1 -0
  329. package/dist/client/assets/{use-api-keys-C3mHEKzm.js → use-api-keys-CsFZ7MWC.js} +1 -1
  330. package/dist/client/assets/{use-apply-named-rule-C6ts9bt2.js → use-apply-named-rule-CnSwu1YP.js} +1 -1
  331. package/dist/client/assets/use-ask-in-chat-C_ce63qF.js +1 -0
  332. package/dist/client/assets/{use-automations-LOYHDjb3.js → use-automations-DGxEZMH1.js} +1 -1
  333. package/dist/client/assets/{use-autosave-CLPruo2u.js → use-autosave-JaDxGSls.js} +1 -1
  334. package/dist/client/assets/use-blocks-v8-project-DA-pr0Uy.js +1 -0
  335. package/dist/client/assets/use-blog-view-DhODFkA8.js +1 -0
  336. package/dist/client/assets/{use-chat-layout-state-Dx_P1Xmx.js → use-chat-layout-state-D4d4l3oL.js} +1 -1
  337. package/dist/client/assets/{use-cms-publish-actions-_ZdSdw_1.js → use-cms-publish-actions-CdubuGTA.js} +1 -1
  338. package/dist/client/assets/{use-connect-companion-DQq6EgX3.js → use-connect-companion-DCQqrJld.js} +1 -1
  339. package/dist/client/assets/{use-connection-DW1VkUDp.js → use-connection-DoUaPNkI.js} +1 -1
  340. package/dist/client/assets/{use-content-sync-DadcVTeN.js → use-content-sync-Cxyhqioh.js} +1 -1
  341. package/dist/client/assets/{use-copy-D1Ps751Y.js → use-copy-nYlH4I4g.js} +1 -1
  342. package/dist/client/assets/{use-current-view-DTeimNo3.js → use-current-view-1HEoI3qR.js} +1 -1
  343. package/dist/client/assets/{use-date-fns-locale-D0UHCWV7.js → use-date-fns-locale-DxgiZ7Lq.js} +1 -1
  344. package/dist/client/assets/{use-debounced-autosave-DYsdj7A1.js → use-debounced-autosave-Bi5JPKsx.js} +1 -1
  345. package/dist/client/assets/{use-debounced-value-Cj3YP2Ju.js → use-debounced-value-ZpPSvQwP.js} +1 -1
  346. package/dist/client/assets/{use-deco-credits-1ccyr4DS.js → use-deco-credits-DcRWtP9o.js} +1 -1
  347. package/dist/client/assets/{use-decopilot-events-qTcqpluN.js → use-decopilot-events-B-T0Hrvx.js} +1 -1
  348. package/dist/client/assets/{use-delete-block-DeCae--m.js → use-delete-block-DP79Au-4.js} +1 -1
  349. package/dist/client/assets/{use-delete-connection-Ddr1KxTc.js → use-delete-connection-4Fx-JLmK.js} +1 -1
  350. package/dist/client/assets/{use-deployment-admin-CmLloBgI.js → use-deployment-admin-BmC0uFFM.js} +1 -1
  351. package/dist/client/assets/{use-entitlements-BaQvjR8x.js → use-entitlements-CmxoG1H2.js} +1 -1
  352. package/dist/client/assets/{use-fast-preview-draft-url-Bx6WUO99.js → use-fast-preview-draft-url-DXFM6T8R.js} +1 -1
  353. package/dist/client/assets/{use-file-configs-J6V_3k5a.js → use-file-configs-Wy-M6u4j.js} +1 -1
  354. package/dist/client/assets/{use-id-selection-DKtNLyFh.js → use-id-selection-65R8Y0Rr.js} +1 -1
  355. package/dist/client/assets/{use-in-settings-WKil-W1U.js → use-in-settings-CG5n8E8Q.js} +1 -1
  356. package/dist/client/assets/{use-inbox-feed-BHASI7cE.js → use-inbox-feed-DxcWHUtc.js} +1 -1
  357. package/dist/client/assets/{use-infinite-scroll-BCAJFUTI.js → use-infinite-scroll-DxkQp5Qv.js} +1 -1
  358. package/dist/client/assets/{use-join-requests-BVkKaLgc.js → use-join-requests-CyJQy1RH.js} +1 -1
  359. package/dist/client/assets/{use-main-panel-tabs-BmS9u6Cm.js → use-main-panel-tabs-DJGu6nFZ.js} +1 -1
  360. package/dist/client/assets/{use-mcp-auth-status-WaulxB9m.js → use-mcp-auth-status-BabDSoXH.js} +1 -1
  361. package/dist/client/assets/{use-mcp-client-XSpKurXu.js → use-mcp-client-rOHZbD3Y.js} +1 -1
  362. package/dist/client/assets/{use-mcp-prompts-Bs2ZYPMm.js → use-mcp-prompts-Cq6mpthN.js} +1 -1
  363. package/dist/client/assets/{use-mcp-tools-C_TsO2I8.js → use-mcp-tools-DfFo5hFt.js} +1 -1
  364. package/dist/client/assets/{use-mobile-BxcOWRrF.js → use-mobile-eRuVOAzy.js} +1 -1
  365. package/dist/client/assets/{use-move-blocks-B_TQedwE.js → use-move-blocks-DWNb-nFG.js} +1 -1
  366. package/dist/client/assets/{use-navigate-to-agent-D9QHHZbU.js → use-navigate-to-agent-CoxxT5G0.js} +1 -1
  367. package/dist/client/assets/{use-never-published-CchQezqP.js → use-never-published-ZzuVsx8k.js} +1 -1
  368. package/dist/client/assets/{use-org-fs-B4WWFHbJ.js → use-org-fs-Bjw5czAm.js} +1 -1
  369. package/dist/client/assets/{use-org-notice-CuExaYhO.js → use-org-notice-QAyxiINx.js} +1 -1
  370. package/dist/client/assets/{use-org-repo-syncs-KiPPmYc8.js → use-org-repo-syncs-CvKMwzFX.js} +1 -1
  371. package/dist/client/assets/{use-org-sso-BU8x_N9w.js → use-org-sso-CFsTaV-A.js} +1 -1
  372. package/dist/client/assets/{use-organization-settings-BCnB7DAB.js → use-organization-settings-BQz13Hmn.js} +1 -1
  373. package/dist/client/assets/{use-panel-navigate-CRTRFR_W.js → use-panel-navigate-DRtgWUMv.js} +1 -1
  374. package/dist/client/assets/{use-project-native-view-presence-DNQAebLP.js → use-project-native-view-presence-BIFke35D.js} +1 -1
  375. package/dist/client/assets/{use-project-scope-AQre_lGB.js → use-project-scope-BEEh5L8P.js} +1 -1
  376. package/dist/client/assets/{use-recent-apps-TNv8uCPr.js → use-recent-apps-DnI5Ea5w.js} +1 -1
  377. package/dist/client/assets/{use-reports-diagnostic-BblOLKh2.js → use-reports-diagnostic-KjDTU46X.js} +1 -1
  378. package/dist/client/assets/{use-sandbox-events-CDzu8MpI.js → use-sandbox-events-B1e4GG__.js} +1 -1
  379. package/dist/client/assets/{use-secrets-BS48xwT8.js → use-secrets-DG4KpaBa.js} +1 -1
  380. package/dist/client/assets/{use-section-preview-base-DKzaRrN2.js → use-section-preview-base-CTUunTIy.js} +1 -1
  381. package/dist/client/assets/{use-sidebar-collapsed-DhXPD56p.js → use-sidebar-collapsed-Cvh_KEOx.js} +1 -1
  382. package/dist/client/assets/{use-tags-DZB3cOG6.js → use-tags-oUXL8Eao.js} +1 -1
  383. package/dist/client/assets/{use-task-board-analytics-BJUgitsX.js → use-task-board-analytics-CY3DJsc5.js} +1 -1
  384. package/dist/client/assets/{use-task-board-item-prs-BRhTw2_C.js → use-task-board-item-prs-DSrWn6bY.js} +1 -1
  385. package/dist/client/assets/{use-task-board-items-ClS47WXt.js → use-task-board-items-BbyDm5G0.js} +1 -1
  386. package/dist/client/assets/{use-task-board-prompts-CLIPLPO_.js → use-task-board-prompts-CqjpsSVo.js} +1 -1
  387. package/dist/client/assets/{use-task-metadata-D_A2WmqA.js → use-task-metadata-BYbicOrw.js} +1 -1
  388. package/dist/client/assets/{use-thread-outputs-DqTcUmJ7.js → use-thread-outputs-OIyH_XWf.js} +1 -1
  389. package/dist/client/assets/{use-view-draft-kind-BtTSFIlo.js → use-view-draft-kind-BaIs6zLO.js} +1 -1
  390. package/dist/client/assets/use-voice-input-IeU241I1.js +1 -0
  391. package/dist/client/assets/useInfiniteQuery-D_gObArx.js +1 -0
  392. package/dist/client/assets/{useQueries-CY78CcHi.js → useQueries-D35FEy3E.js} +1 -1
  393. package/dist/client/assets/useSuspenseInfiniteQuery-DTGymExJ.js +1 -0
  394. package/dist/client/assets/{users-B7RH0HPb.js → users-D7EeASCC.js} +1 -1
  395. package/dist/client/assets/{utils-CeyBwb4E.js → utils-CfyLtUqt.js} +1 -1
  396. package/dist/client/assets/{variant-calendar-CbNvuhgP.js → variant-calendar-C6gDTqNE.js} +1 -1
  397. package/dist/client/assets/{variant-matcher-override-WW9vsYwt.js → variant-matcher-override-BugDO5Is.js} +1 -1
  398. package/dist/client/assets/{view-header-D-W3mMsY.js → view-header-BpDzpk8m.js} +1 -1
  399. package/dist/client/assets/{virtual-mcp-DFMEmmYR.js → virtual-mcp-DFw2lKMC.js} +1 -1
  400. package/dist/client/assets/{watch-sse-pool-CLN8yu6T.js → watch-sse-pool-DGsiEkeQ.js} +1 -1
  401. package/dist/client/index.html +1 -1
  402. package/dist/server/server.js +651 -651
  403. package/package.json +1 -1
  404. package/dist/client/assets/agent-app-BVo-JN5-.js +0 -1
  405. package/dist/client/assets/agent-deck-BV2v1bg2.js +0 -1
  406. package/dist/client/assets/agent-experiments-Dn6ATqm3.js +0 -1
  407. package/dist/client/assets/agent-file-BdlM9DC-.js +0 -1
  408. package/dist/client/assets/agent-library-CRndyLSN.js +0 -1
  409. package/dist/client/assets/agent-library-file-CHMBjLP9.js +0 -1
  410. package/dist/client/assets/agent-overview-0qKuyyc3.js +0 -1
  411. package/dist/client/assets/agent-settings-BhODPzv3.js +0 -1
  412. package/dist/client/assets/agent-site-editor-code-Cf9FJAgn.js +0 -2
  413. package/dist/client/assets/agent-site-editor-content-CBrR-oWD.js +0 -1
  414. package/dist/client/assets/agent-site-editor-preview-DKqXk_Fc.js +0 -1
  415. package/dist/client/assets/agent-view-B6-XGf3q.js +0 -1
  416. package/dist/client/assets/ai-providers-DtnDf2l2.js +0 -1
  417. package/dist/client/assets/api-keys-BWBRmUoJ.js +0 -1
  418. package/dist/client/assets/chat-context-DHSww0cO.js +0 -43
  419. package/dist/client/assets/library-Dp3HrH7T.js +0 -1
  420. package/dist/client/assets/plan-CEsNJEgV.js +0 -1
  421. package/dist/client/assets/project-reports-DF_CqS1r.js +0 -1
  422. package/dist/client/assets/project-tasks-BiRpzten.js +0 -1
  423. package/dist/client/assets/record-editor-D7wKjKze.js +0 -1
  424. package/dist/client/assets/reports-CAZ7fJej.js +0 -1
  425. package/dist/client/assets/repositories-DhWmEVga.js +0 -1
  426. package/dist/client/assets/route-ZfCX71Dd.js +0 -1
  427. package/dist/client/assets/settings-tab-DXCgvlZo.js +0 -1
  428. package/dist/client/assets/site-editor-CRBSEbgW.js +0 -1
  429. package/dist/client/assets/tasks-B5T10R9U.js +0 -1
  430. package/dist/client/assets/use-ai-providers-DuE4C2Wp.js +0 -1
  431. package/dist/client/assets/use-ask-in-chat-ClsOxWIw.js +0 -1
  432. package/dist/client/assets/use-blocks-v8-project-GPjsiHKH.js +0 -1
  433. package/dist/client/assets/use-blog-view-BjBkHa1n.js +0 -1
  434. package/dist/client/assets/use-voice-input-BXFfCREB.js +0 -1
  435. package/dist/client/assets/useInfiniteQuery-jSvPkUAC.js +0 -1
  436. package/dist/client/assets/useSuspenseInfiniteQuery-DQoY99kG.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as k,j as s,b as _,r as Y,m as Ce,a_ as pe,i9 as be,a6 as Ne,at as ve,a7 as ke,B as le,t as ue,gK as fe,gZ as we,av as Se}from"./index-DNY1LCEV.js";import{A as $e,b as _e}from"./alert-Bv1HVos8.js";import{B as Ke}from"./badge-DhCDyINb.js";import{a as Ie,b as Ae,c as de,d as ze,S as Te}from"./select-BtuZ1_PE.js";import{c as se,T as oe,a as xe,b as re}from"./tabs-DzZuOsBG.js";import{u as ge}from"./use-copy-D1Ps751Y.js";import{e as he,aF as Oe}from"./agent-icon-zKGrqypc.js";import{i as Ee}from"./Key01-B7vuN73N.js";import{C as Le,a as De,b as Me,c as Be}from"./connect-key-x35pzj1P.js";import{a as He,u as Pe}from"./use-api-keys-C3mHEKzm.js";import{R as Re}from"./require-capability-GB4QCUSY.js";import{A as Ge}from"./api-keys-omOxFywl.js";import"./index-BdQq_4o_.js";import"./index-D4Cq4uu-.js";import"./ChevronDown-C0rME5fU.js";import"./ChevronUp-CIqW-9_W.js";import"./active-indicator-CCMhAsc_.js";import"./AlertCircle-BYyFOifG.js";import"./UserCheck01-CHkzczFI.js";import"./Tool01-JC0jUvnM.js";import"./ArrowUp-BbdlU24N.js";import"./ArrowLeft-BQKI9I0k.js";import"./ArrowRight-B21E_uc5.js";import"./BookOpen01-BUy5CVjC.js";import"./Globe04--1ycu_yQ.js";import"./CheckCircle-DtUq_uxu.js";import"./ChevronSelectorVertical-BCjXLDN_.js";import"./UserSquare-D6ubIo4l.js";import"./LinkBroken01-w2HNuUHo.js";import"./CreditCard01-BGMvQi86.js";import"./File02-Nky5bxni.js";import"./MessageCircle01-BUz5eIR5.js";import"./SwitchHorizontal01-BZWsjo2g.js";import"./Eye-DvysNEeS.js";import"./Fingerprint04-DNoiAgrN.js";import"./Image01-BGZNkNVE.js";import"./LayoutLeft-DTjvUEMi.js";import"./Minus-DhX2EjkJ.js";import"./Monitor01-Dv4dKtFe.js";import"./Sun-bgIMzv-s.js";import"./Play-BcRuLGoC.js";import"./Plus-Bd_Azs6t.js";import"./SearchMd-DoUjFKDV.js";import"./ShoppingBag01-DsiPVRC3.js";import"./Trash01-DUjxO1Dn.js";import"./Upload01-BcZgaIHQ.js";import"./Users01-DOgFV3e5.js";import"./XClose-CHJIrn3i.js";import"./Zap-6gSNYeqn.js";import"./use-mcp-client-XSpKurXu.js";import"./auth-BbyP7Mh4.js";import"./access-gate-B30zL1q2.js";import"./capability-load-error-BUXjQvww.js";import"./empty-state-9tWEtAox.js";import"./label-BleuytxV.js";import"./index-C1HmbFkP.js";import"./use-mcp-tools-C_TsO2I8.js";import"./checkbox-BK5KAA6g.js";import"./search-input-CazoQHCn.js";import"./integration-icon-B7GQGDoQ.js";import"./tool-set-selector-D9iHbEUH.js";import"./use-infinite-scroll-BCAJFUTI.js";import"./useSuspenseInfiniteQuery-DQoY99kG.js";import"./infiniteQueryObserver-C58dnOYG.js";import"./collection-search-C3yL3Si4.js";import"./connection-OrxsAVXu.js";import"./url-slug-BNPYObW-.js";import"./use-connection-DW1VkUDp.js";function Fe(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ve(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function Ue({client:t,mode:e,url:l,apiKey:o}){const n=o??"<paste-your-api-key>",c=Fe();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${c} ${l}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${c} ${l} \\
1
+ import{c as k,j as s,b as _,r as Y,m as Ce,a_ as pe,i9 as be,a6 as Ne,at as ve,a7 as ke,B as le,t as ue,gK as fe,gZ as we,av as Se}from"./index-FRxLT_js.js";import{A as $e,b as _e}from"./alert-pq0Y8AC8.js";import{B as Ke}from"./badge-CFiK0EOx.js";import{a as Ie,b as Ae,c as de,d as ze,S as Te}from"./select-D5aPAOxI.js";import{c as se,T as oe,a as xe,b as re}from"./tabs-JKAPr-O4.js";import{u as ge}from"./use-copy-nYlH4I4g.js";import{e as he,aF as Oe}from"./agent-icon-qKbICqBE.js";import{i as Ee}from"./Key01-B6wydByr.js";import{C as Le,a as De,b as Me,c as Be}from"./connect-key-DVNtQy7y.js";import{a as He,u as Pe}from"./use-api-keys-CsFZ7MWC.js";import{R as Re}from"./require-capability-BtI4Tyqp.js";import{A as Ge}from"./api-keys-SpdE7FiC.js";import"./index-BdQq_4o_.js";import"./index-D9pnpNHk.js";import"./ChevronDown-BkddO6nk.js";import"./ChevronUp-hmtO7NfN.js";import"./active-indicator-CCMhAsc_.js";import"./AlertCircle-CS5y5cdF.js";import"./UserCheck01-B7Ux1cXt.js";import"./Tool01-D_bTJJvK.js";import"./ArrowUp-B_rPxUl3.js";import"./ArrowLeft-CnpYebJt.js";import"./ArrowRight-CTIzvrRD.js";import"./BookOpen01-0vmOJP7K.js";import"./Globe04-Bu51hlDK.js";import"./CheckCircle-CVSsEuJs.js";import"./ChevronSelectorVertical-B_EPXu-J.js";import"./UserSquare-fSKR9s5Z.js";import"./LinkBroken01-CothmVOv.js";import"./CreditCard01-CYAMo28t.js";import"./File02-B0o8Z6Rd.js";import"./MessageCircle01-BoiiT0Ka.js";import"./SwitchHorizontal01-B9krqVlE.js";import"./Eye-NyWbd_Et.js";import"./Fingerprint04-DFly9X11.js";import"./Image01-Xgs_5RZR.js";import"./LayoutLeft-ww8XIIKY.js";import"./Minus-DjGZhteG.js";import"./Monitor01-BnNa35fy.js";import"./Sun-C31h0XVy.js";import"./Play-DYcX2TsV.js";import"./Plus-BlCDSK3_.js";import"./SearchMd-B2ZqlWzx.js";import"./ShoppingBag01-CO-Ik7_a.js";import"./Trash01-CvVvZjMc.js";import"./Upload01-DAa882sM.js";import"./Users01-CYXQ60-Z.js";import"./XClose-BvzwUB-E.js";import"./Zap-BALSokOc.js";import"./use-mcp-client-rOHZbD3Y.js";import"./auth-AT-S53oU.js";import"./access-gate-JiR82oco.js";import"./capability-load-error-C7VfNWgD.js";import"./empty-state-CWawuVzh.js";import"./label-DKoCaul6.js";import"./index-B1yf8QQv.js";import"./use-mcp-tools-DfFo5hFt.js";import"./checkbox-DR7-Iy_E.js";import"./search-input-Dij8WCfy.js";import"./integration-icon-BTN_yWEk.js";import"./tool-set-selector-DoFKwoWc.js";import"./use-infinite-scroll-DxkQp5Qv.js";import"./useSuspenseInfiniteQuery-DTGymExJ.js";import"./infiniteQueryObserver-CZ7GCbwa.js";import"./collection-search-CphnxlYD.js";import"./connection-BZJlBrLd.js";import"./url-slug-DgA17VrJ.js";import"./use-connection-DoUaPNkI.js";function Fe(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ve(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function Ue({client:t,mode:e,url:l,apiKey:o}){const n=o??"<paste-your-api-key>",c=Fe();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${c} ${l}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${c} ${l} \\
2
2
  --header "Authorization: Bearer ${n}"`};if(t==="cursor"){const i={url:l};return e==="api-key"&&(i.headers={Authorization:`Bearer ${n}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[c]:i}},null,2)}}if(t==="codex"){const i=[`[mcp_servers.${c}]`,`url = "${l}"`];return e==="api-key"&&i.push(`http_headers = { "Authorization" = "Bearer ${n}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:i.join(`
3
3
  `)}}return e==="oauth"?{language:"text",code:`${l}
4
4
 
@@ -1 +1 @@
1
- import{c as y,b as w,j as n,r as M,R as L,a6 as V,W,T as Y,a as q,x as K,B as G,w as U,v as z,D as A,h as J}from"./index-DNY1LCEV.js";import{s as Q}from"./site-url-en5df9c-.js";import{u as X}from"./use-mcp-client-XSpKurXu.js";import{I as Z}from"./integration-icon-B7GQGDoQ.js";import{c as ee,u as te,a as se,P as ne,d as le,S as ie}from"./use-connect-companion-DQq6EgX3.js";function k(b){const e=y.c(12),{onClose:l,children:s}=b,r=w();let t;e[0]!==l?(t=g=>!g&&l(),e[0]=l,e[1]=t):t=e[1];let d;e[2]!==r?(d=r("reportsOnboarding.connectSourceDialog.title"),e[2]=r,e[3]=d):d=e[3];let o;e[4]!==d?(o=n.jsx(U,{children:n.jsx(K,{children:d})}),e[4]=d,e[5]=o):o=e[5];let x;e[6]!==s||e[7]!==o?(x=n.jsxs(z,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[o,s]}),e[6]=s,e[7]=o,e[8]=x):x=e[8];let i;return e[9]!==t||e[10]!==x?(i=n.jsx(A,{open:!0,onOpenChange:t,children:x}),e[9]=t,e[10]=x,e[11]=i):i=e[11],i}function $(b){const e=y.c(3),{label:l}=b;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(J,{className:"size-4"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=n.jsxs("div",{className:"flex items-center gap-2 py-2 text-sm text-muted-foreground",children:[s,n.jsx("span",{children:l})]}),e[1]=l,e[2]=r):r=e[2],r}function xe(b){const e=y.c(19),{field:l,onClose:s}=b,r=w();let t;e[0]!==s||e[1]!==r?(t=()=>n.jsx(k,{onClose:s,children:n.jsx("p",{className:"text-sm text-muted-foreground",children:r("routes.reportsOnboarding.connectModal.loadError")})}),e[0]=s,e[1]=r,e[2]=t):t=e[2];let d;e[3]!==r?(d=r("reportsOnboarding.connectSourceDialog.loading"),e[3]=r,e[4]=d):d=e[4];let o;e[5]!==d?(o=n.jsx($,{label:d}),e[5]=d,e[6]=o):o=e[6];let x;e[7]!==s||e[8]!==o?(x=n.jsx(k,{onClose:s,children:o}),e[7]=s,e[8]=o,e[9]=x):x=e[9];let i;e[10]!==l||e[11]!==s?(i=n.jsx(oe,{field:l,onClose:s}),e[10]=l,e[11]=s,e[12]=i):i=e[12];let g;e[13]!==x||e[14]!==i?(g=n.jsx(M.Suspense,{fallback:x,children:i}),e[13]=x,e[14]=i,e[15]=g):g=e[15];let p;return e[16]!==t||e[17]!==g?(p=n.jsx(L,{fallback:t,children:g}),e[16]=t,e[17]=g,e[18]=p):p=e[18],p}function oe(b){const e=y.c(75),{field:l,onClose:s}=b,r=w(),{org:t}=V();let d;e[0]!==t.id?(d=W.REPORTS(t.id),e[0]=t.id,e[1]=d):d=e[1];const o=d;let x;e[2]!==t.id||e[3]!==t.slug?(x={connectionId:Y,orgId:t.id,orgSlug:t.slug},e[2]=t.id,e[3]=t.slug,e[4]=x):x=e[4];const i=X(x),{data:g}=q.useSession(),p=g?.user?.id??"";let j;e[5]!==o||e[6]!==t||e[7]!==i?(j={selfClient:i,org:t,cdConnectionId:o},e[5]=o,e[6]=t,e[7]=i,e[8]=j):j=e[8];const f=ee(j);let h;e[9]!==o||e[10]!==t||e[11]!==i||e[12]!==f?(h={selfClient:i,org:t,cdConnectionId:o,siteUrl:f},e[9]=o,e[10]=t,e[11]=i,e[12]=f,e[13]=h):h=e[13];const{cards:S}=te(h);let C;e[14]!==f?(C=Q(f)??void 0,e[14]=f,e[15]=C):C=e[15];let I;e[16]!==o||e[17]!==t||e[18]!==i||e[19]!==f||e[20]!==C||e[21]!==p?(I={selfClient:i,org:t,userId:p,cdConnectionId:o,domain:C,siteUrl:f},e[16]=o,e[17]=t,e[18]=i,e[19]=f,e[20]=C,e[21]=p,e[22]=I):I=e[22];const{connect:O,connectingFieldKey:F,error:T}=se(I);let E;if(e[23]!==S||e[24]!==l){let c;e[26]!==l?(c=u=>u.fieldKey===l,e[26]=l,e[27]=c):c=e[27],E=S.find(c),e[23]=S,e[24]=l,e[25]=E}else E=e[25];const a=E;if(!a){let c;e[28]!==r?(c=r("routes.reportsOnboarding.connectModal.loadError"),e[28]=r,e[29]=c):c=e[29];let u;e[30]!==c?(u=n.jsx("p",{className:"text-sm text-muted-foreground",children:c}),e[30]=c,e[31]=u):u=e[31];let m;return e[32]!==s||e[33]!==u?(m=n.jsx(k,{onClose:s,children:u}),e[32]=s,e[33]=u,e[34]=m):m=e[34],m}const R=ne[a.bindingType];if(R&&a.boundVia!=="oauth"){let c;e[35]!==s?(c=D=>!D&&s(),e[35]=s,e[36]=c):c=e[36];let u;e[37]!==a||e[38]!==O?(u=a.satisfied?void 0:()=>{O(a)},e[37]=a,e[38]=O,e[39]=u):u=e[39];let m;return e[40]!==a||e[41]!==t||e[42]!==R||e[43]!==i||e[44]!==f||e[45]!==c||e[46]!==u?(m=n.jsx(ie,{card:a,provider:R,org:t,selfClient:i,siteUrl:f,open:!0,onOpenChange:c,onOAuthInstead:u}),e[40]=a,e[41]=t,e[42]=R,e[43]=i,e[44]=f,e[45]=c,e[46]=u,e[47]=m):m=e[47],m}if(a.satisfied&&a.linkedConnectionId){let c;e[48]!==r?(c=r("reportsOnboarding.connectSourceDialog.loading"),e[48]=r,e[49]=c):c=e[49];let u;e[50]!==c?(u=n.jsx($,{label:c}),e[50]=c,e[51]=u):u=e[51];let m;e[52]!==s||e[53]!==u?(m=n.jsx(k,{onClose:s,children:u}),e[52]=s,e[53]=u,e[54]=m):m=e[54];let D;e[55]!==s?(D=H=>!H&&s(),e[55]=s,e[56]=D):D=e[56];let v;e[57]!==a||e[58]!==t||e[59]!==i||e[60]!==f||e[61]!==D?(v=n.jsx(le,{card:a,org:t,selfClient:i,connectionId:a.linkedConnectionId,contextSiteUrl:f,open:!0,onOpenChange:D}),e[57]=a,e[58]=t,e[59]=i,e[60]=f,e[61]=D,e[62]=v):v=e[62];let _;return e[63]!==m||e[64]!==v?(_=n.jsx(M.Suspense,{fallback:m,children:v}),e[63]=m,e[64]=v,e[65]=_):_=e[65],_}const B=F===a.fieldKey;let N;e[66]!==a||e[67]!==O?(N=()=>{O(a)},e[66]=a,e[67]=O,e[68]=N):N=e[68];let P;return e[69]!==a||e[70]!==T||e[71]!==s||e[72]!==B||e[73]!==N?(P=n.jsx(re,{card:a,connecting:B,error:T,onConnect:N,onClose:s}),e[69]=a,e[70]=T,e[71]=s,e[72]=B,e[73]=N,e[74]=P):P=e[74],P}function re(b){const e=y.c(22),{card:l,connecting:s,error:r,onConnect:t,onClose:d}=b,o=w(),[x,i]=M.useState(!1);x||(i(!0),queueMicrotask(t));let g;e[0]!==s||e[1]!==d?(g=I=>{!I&&s||I||d()},e[0]=s,e[1]=d,e[2]=g):g=e[2];let p;e[3]!==l.icon||e[4]!==l.title?(p=n.jsx(Z,{icon:l.icon,name:l.title,size:"sm",fit:"contain",className:"p-1"}),e[3]=l.icon,e[4]=l.title,e[5]=p):p=e[5];let j;e[6]!==l.title?(j=n.jsx(K,{className:"min-w-0 flex-1",children:l.title}),e[6]=l.title,e[7]=j):j=e[7];let f;e[8]!==p||e[9]!==j?(f=n.jsxs(U,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[p,j]}),e[8]=p,e[9]=j,e[10]=f):f=e[10];let h;e[11]!==l.title||e[12]!==r||e[13]!==t||e[14]!==o?(h=r?n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),n.jsx(G,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:t,children:o("routes.reportsOnboarding.companionSection.retry")})]}):n.jsx($,{label:o("reportsOnboarding.connectSourceDialog.connecting",{title:l.title})}),e[11]=l.title,e[12]=r,e[13]=t,e[14]=o,e[15]=h):h=e[15];let S;e[16]!==f||e[17]!==h?(S=n.jsxs(z,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[f,h]}),e[16]=f,e[17]=h,e[18]=S):S=e[18];let C;return e[19]!==g||e[20]!==S?(C=n.jsx(A,{open:!0,onOpenChange:g,children:S}),e[19]=g,e[20]=S,e[21]=C):C=e[21],C}export{xe as C};
1
+ import{c as y,b as w,j as n,r as M,R as L,a6 as V,W,T as Y,a as q,x as K,B as G,w as U,v as z,D as A,h as J}from"./index-FRxLT_js.js";import{s as Q}from"./site-url-en5df9c-.js";import{u as X}from"./use-mcp-client-rOHZbD3Y.js";import{I as Z}from"./integration-icon-BTN_yWEk.js";import{c as ee,u as te,a as se,P as ne,d as le,S as ie}from"./use-connect-companion-DCQqrJld.js";function k(b){const e=y.c(12),{onClose:l,children:s}=b,r=w();let t;e[0]!==l?(t=g=>!g&&l(),e[0]=l,e[1]=t):t=e[1];let d;e[2]!==r?(d=r("reportsOnboarding.connectSourceDialog.title"),e[2]=r,e[3]=d):d=e[3];let o;e[4]!==d?(o=n.jsx(U,{children:n.jsx(K,{children:d})}),e[4]=d,e[5]=o):o=e[5];let x;e[6]!==s||e[7]!==o?(x=n.jsxs(z,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[o,s]}),e[6]=s,e[7]=o,e[8]=x):x=e[8];let i;return e[9]!==t||e[10]!==x?(i=n.jsx(A,{open:!0,onOpenChange:t,children:x}),e[9]=t,e[10]=x,e[11]=i):i=e[11],i}function $(b){const e=y.c(3),{label:l}=b;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(J,{className:"size-4"}),e[0]=s):s=e[0];let r;return e[1]!==l?(r=n.jsxs("div",{className:"flex items-center gap-2 py-2 text-sm text-muted-foreground",children:[s,n.jsx("span",{children:l})]}),e[1]=l,e[2]=r):r=e[2],r}function xe(b){const e=y.c(19),{field:l,onClose:s}=b,r=w();let t;e[0]!==s||e[1]!==r?(t=()=>n.jsx(k,{onClose:s,children:n.jsx("p",{className:"text-sm text-muted-foreground",children:r("routes.reportsOnboarding.connectModal.loadError")})}),e[0]=s,e[1]=r,e[2]=t):t=e[2];let d;e[3]!==r?(d=r("reportsOnboarding.connectSourceDialog.loading"),e[3]=r,e[4]=d):d=e[4];let o;e[5]!==d?(o=n.jsx($,{label:d}),e[5]=d,e[6]=o):o=e[6];let x;e[7]!==s||e[8]!==o?(x=n.jsx(k,{onClose:s,children:o}),e[7]=s,e[8]=o,e[9]=x):x=e[9];let i;e[10]!==l||e[11]!==s?(i=n.jsx(oe,{field:l,onClose:s}),e[10]=l,e[11]=s,e[12]=i):i=e[12];let g;e[13]!==x||e[14]!==i?(g=n.jsx(M.Suspense,{fallback:x,children:i}),e[13]=x,e[14]=i,e[15]=g):g=e[15];let p;return e[16]!==t||e[17]!==g?(p=n.jsx(L,{fallback:t,children:g}),e[16]=t,e[17]=g,e[18]=p):p=e[18],p}function oe(b){const e=y.c(75),{field:l,onClose:s}=b,r=w(),{org:t}=V();let d;e[0]!==t.id?(d=W.REPORTS(t.id),e[0]=t.id,e[1]=d):d=e[1];const o=d;let x;e[2]!==t.id||e[3]!==t.slug?(x={connectionId:Y,orgId:t.id,orgSlug:t.slug},e[2]=t.id,e[3]=t.slug,e[4]=x):x=e[4];const i=X(x),{data:g}=q.useSession(),p=g?.user?.id??"";let j;e[5]!==o||e[6]!==t||e[7]!==i?(j={selfClient:i,org:t,cdConnectionId:o},e[5]=o,e[6]=t,e[7]=i,e[8]=j):j=e[8];const f=ee(j);let h;e[9]!==o||e[10]!==t||e[11]!==i||e[12]!==f?(h={selfClient:i,org:t,cdConnectionId:o,siteUrl:f},e[9]=o,e[10]=t,e[11]=i,e[12]=f,e[13]=h):h=e[13];const{cards:S}=te(h);let C;e[14]!==f?(C=Q(f)??void 0,e[14]=f,e[15]=C):C=e[15];let I;e[16]!==o||e[17]!==t||e[18]!==i||e[19]!==f||e[20]!==C||e[21]!==p?(I={selfClient:i,org:t,userId:p,cdConnectionId:o,domain:C,siteUrl:f},e[16]=o,e[17]=t,e[18]=i,e[19]=f,e[20]=C,e[21]=p,e[22]=I):I=e[22];const{connect:O,connectingFieldKey:F,error:T}=se(I);let E;if(e[23]!==S||e[24]!==l){let c;e[26]!==l?(c=u=>u.fieldKey===l,e[26]=l,e[27]=c):c=e[27],E=S.find(c),e[23]=S,e[24]=l,e[25]=E}else E=e[25];const a=E;if(!a){let c;e[28]!==r?(c=r("routes.reportsOnboarding.connectModal.loadError"),e[28]=r,e[29]=c):c=e[29];let u;e[30]!==c?(u=n.jsx("p",{className:"text-sm text-muted-foreground",children:c}),e[30]=c,e[31]=u):u=e[31];let m;return e[32]!==s||e[33]!==u?(m=n.jsx(k,{onClose:s,children:u}),e[32]=s,e[33]=u,e[34]=m):m=e[34],m}const R=ne[a.bindingType];if(R&&a.boundVia!=="oauth"){let c;e[35]!==s?(c=D=>!D&&s(),e[35]=s,e[36]=c):c=e[36];let u;e[37]!==a||e[38]!==O?(u=a.satisfied?void 0:()=>{O(a)},e[37]=a,e[38]=O,e[39]=u):u=e[39];let m;return e[40]!==a||e[41]!==t||e[42]!==R||e[43]!==i||e[44]!==f||e[45]!==c||e[46]!==u?(m=n.jsx(ie,{card:a,provider:R,org:t,selfClient:i,siteUrl:f,open:!0,onOpenChange:c,onOAuthInstead:u}),e[40]=a,e[41]=t,e[42]=R,e[43]=i,e[44]=f,e[45]=c,e[46]=u,e[47]=m):m=e[47],m}if(a.satisfied&&a.linkedConnectionId){let c;e[48]!==r?(c=r("reportsOnboarding.connectSourceDialog.loading"),e[48]=r,e[49]=c):c=e[49];let u;e[50]!==c?(u=n.jsx($,{label:c}),e[50]=c,e[51]=u):u=e[51];let m;e[52]!==s||e[53]!==u?(m=n.jsx(k,{onClose:s,children:u}),e[52]=s,e[53]=u,e[54]=m):m=e[54];let D;e[55]!==s?(D=H=>!H&&s(),e[55]=s,e[56]=D):D=e[56];let v;e[57]!==a||e[58]!==t||e[59]!==i||e[60]!==f||e[61]!==D?(v=n.jsx(le,{card:a,org:t,selfClient:i,connectionId:a.linkedConnectionId,contextSiteUrl:f,open:!0,onOpenChange:D}),e[57]=a,e[58]=t,e[59]=i,e[60]=f,e[61]=D,e[62]=v):v=e[62];let _;return e[63]!==m||e[64]!==v?(_=n.jsx(M.Suspense,{fallback:m,children:v}),e[63]=m,e[64]=v,e[65]=_):_=e[65],_}const B=F===a.fieldKey;let N;e[66]!==a||e[67]!==O?(N=()=>{O(a)},e[66]=a,e[67]=O,e[68]=N):N=e[68];let P;return e[69]!==a||e[70]!==T||e[71]!==s||e[72]!==B||e[73]!==N?(P=n.jsx(re,{card:a,connecting:B,error:T,onConnect:N,onClose:s}),e[69]=a,e[70]=T,e[71]=s,e[72]=B,e[73]=N,e[74]=P):P=e[74],P}function re(b){const e=y.c(22),{card:l,connecting:s,error:r,onConnect:t,onClose:d}=b,o=w(),[x,i]=M.useState(!1);x||(i(!0),queueMicrotask(t));let g;e[0]!==s||e[1]!==d?(g=I=>{!I&&s||I||d()},e[0]=s,e[1]=d,e[2]=g):g=e[2];let p;e[3]!==l.icon||e[4]!==l.title?(p=n.jsx(Z,{icon:l.icon,name:l.title,size:"sm",fit:"contain",className:"p-1"}),e[3]=l.icon,e[4]=l.title,e[5]=p):p=e[5];let j;e[6]!==l.title?(j=n.jsx(K,{className:"min-w-0 flex-1",children:l.title}),e[6]=l.title,e[7]=j):j=e[7];let f;e[8]!==p||e[9]!==j?(f=n.jsxs(U,{className:"flex-row items-center gap-3 space-y-0 text-left",children:[p,j]}),e[8]=p,e[9]=j,e[10]=f):f=e[10];let h;e[11]!==l.title||e[12]!==r||e[13]!==t||e[14]!==o?(h=r?n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),n.jsx(G,{type:"button",variant:"outline",size:"sm",className:"self-start",onClick:t,children:o("routes.reportsOnboarding.companionSection.retry")})]}):n.jsx($,{label:o("reportsOnboarding.connectSourceDialog.connecting",{title:l.title})}),e[11]=l.title,e[12]=r,e[13]=t,e[14]=o,e[15]=h):h=e[15];let S;e[16]!==f||e[17]!==h?(S=n.jsxs(z,{"aria-describedby":void 0,className:"sm:max-w-lg",children:[f,h]}),e[16]=f,e[17]=h,e[18]=S):S=e[18];let C;return e[19]!==g||e[20]!==S?(C=n.jsx(A,{open:!0,onOpenChange:g,children:S}),e[19]=g,e[20]=S,e[21]=C):C=e[21],C}export{xe as C};
@@ -1 +1 @@
1
- import{U as b}from"./url-slug-BNPYObW-.js";import{aJ as o,cs as a,bF as t,aK as e,dD as i,dB as r,dH as h,eu as m,dC as _,ct as g}from"./index-DNY1LCEV.js";const f=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:h("object"),properties:i(e(),r()).optional(),required:t(e()).optional()}).catchall(r()),S=m.extend({inputSchema:s,outputSchema:s.optional()}),T=o({headers:i(e(),e()).optional()}),y=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),l=256*1024;function d(n){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=l,{message:`${n} must serialize to at most ${l} bytes`})}const u=4096,p=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),url_slug:e().nullable().optional().describe("Name of the connection in Studio URLs, unique in the organization. Set it to rename the URL; the old one keeps redirecting."),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().optional().describe("Authentication token (for HTTP connections). Write-only: tool responses never include it."),has_connection_token:g().optional().describe("Whether a connection_token is stored. Set on tool responses."),connection_headers:_([y,T]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:f.nullable().describe("OAuth configuration"),configuration_state:d("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:d("metadata").describe("Additional metadata (includes repository info)"),tools:t(S).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});p.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0,has_connection_token:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish(),connection_token:e().max(u).nullish()});p.omit({has_connection_token:!0}).partial().extend({url_slug:b.nullish(),connection_token:e().max(u).nullish()});function D(n){return n!=null&&"command"in n}function I(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{f as O,D as i,I as p};
1
+ import{U as b}from"./url-slug-DgA17VrJ.js";import{aJ as o,cs as a,bF as t,aK as e,dD as i,dB as r,dH as h,eu as m,dC as _,ct as g}from"./index-FRxLT_js.js";const f=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:h("object"),properties:i(e(),r()).optional(),required:t(e()).optional()}).catchall(r()),S=m.extend({inputSchema:s,outputSchema:s.optional()}),T=o({headers:i(e(),e()).optional()}),y=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),l=256*1024;function d(n){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=l,{message:`${n} must serialize to at most ${l} bytes`})}const u=4096,p=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),url_slug:e().nullable().optional().describe("Name of the connection in Studio URLs, unique in the organization. Set it to rename the URL; the old one keeps redirecting."),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().optional().describe("Authentication token (for HTTP connections). Write-only: tool responses never include it."),has_connection_token:g().optional().describe("Whether a connection_token is stored. Set on tool responses."),connection_headers:_([y,T]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:f.nullable().describe("OAuth configuration"),configuration_state:d("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:d("metadata").describe("Additional metadata (includes repository info)"),tools:t(S).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});p.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0,has_connection_token:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish(),connection_token:e().max(u).nullish()});p.omit({has_connection_token:!0}).partial().extend({url_slug:b.nullish(),connection_token:e().max(u).nullish()});function D(n){return n!=null&&"command"in n}function I(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{f as O,D as i,I as p};
@@ -1 +1 @@
1
- import{c as D,a6 as S,an as $,K as F,cM as K,b as R,m as T,j as c,gK as q}from"./index-DNY1LCEV.js";import{u as O}from"./useInfiniteQuery-jSvPkUAC.js";import{g as A}from"./connection-slug-BxAeiVuI.js";import{I as z}from"./integration-icon-B7GQGDoQ.js";function X(t){const e=D.c(21),{org:s}=S(),o=$();let l;e[0]!==t?(l=t?.trim().split(/\s+/).filter(Boolean)??[],e[0]=t,e[1]=l):l=e[1];const r=l;let n;e[2]!==s.id||e[3]!==t?(n=F.storeDiscovery(s.id,`deco-json:${t??""}`),e[2]=s.id,e[3]=t,e[4]=n):n=e[4];let a;e[5]!==o||e[6]!==r?(a=I=>{const{pageParam:_}=I;return o.call("COLLECTION_REGISTRY_APP_LIST",{limit:24,cursor:_,where:r.length?{operator:"or",conditions:r.flatMap(B)}:void 0})},e[5]=o,e[6]=r,e[7]=a):a=e[7];let u;e[8]!==n||e[9]!==a?(u={queryKey:n,queryFn:a,initialPageParam:void 0,getNextPageParam:Y,staleTime:3e5,placeholderData:K,throwOnError:!0},e[8]=n,e[9]=a,e[10]=u):u=e[10];const i=O(u);let p;e[11]!==i.data?.pages?(p=i.data?.pages.flatMap(V)??[],e[11]=i.data?.pages,e[12]=p):p=e[12];const m=p;let f;e[13]!==i?(f=()=>{i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},e[13]=i,e[14]=f):f=e[14];let d;return e[15]!==m||e[16]!==i.hasNextPage||e[17]!==i.isFetchingNextPage||e[18]!==i.isLoading||e[19]!==f?(d={items:m,hasMore:i.hasNextPage,isLoadingMore:i.isFetchingNextPage,isInitialLoading:i.isLoading,loadMore:f},e[15]=m,e[16]=i.hasNextPage,e[17]=i.isFetchingNextPage,e[18]=i.isLoading,e[19]=f,e[20]=d):d=e[20],d}function V(t){return t.items}function Y(t){return t.nextCursor}function B(t){return[["title"],["description"],["id"],["server","name"]].map(e=>({field:e,operator:"contains",value:t}))}function Z(t){const e=new Map;for(const l of t){const r=A(l),n=e.get(r);n?n.push(l):e.set(r,[l])}const s=[],o=new Set;for(const l of t){const r=A(l);if(o.has(r))continue;o.add(r);const n=e.get(r),a=n[0];n.length===1?s.push({type:"single",connection:a}):s.push({type:"group",key:r,icon:a.icon,title:a.app_name?a.title.replace(/\s*\(\d+\)\s*$/,""):a.title,connections:n})}return s}function ee(t){const e=D.c(43),{connection:s,onClick:o,headerActions:l,headerActionsAlwaysVisible:r,footer:n,className:a,fallbackIcon:u,selected:i}=t,p=r===void 0?!1:r,m=R(),f=o&&"cursor-pointer hover:bg-accent";let d;e[0]!==a||e[1]!==f?(d=T("transition-colors group overflow-hidden flex flex-col h-full",f,a),e[0]=a,e[1]=f,e[2]=d):d=e[2];const I=o?"button":void 0,_=o?0:void 0,M=o&&i!==void 0?i:void 0;let g;e[3]!==o?(g=o?L=>{L.target===L.currentTarget&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),o())}:void 0,e[3]=o,e[4]=g):g=e[4];let x;e[5]!==s.icon||e[6]!==s.title||e[7]!==u?(x=c.jsx(z,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-edge",fallbackIcon:u}),e[5]=s.icon,e[6]=s.title,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==p?(h=l&&c.jsx("div",{className:T("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:Q,children:l}),e[9]=l,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==h?(v=c.jsx("div",{className:"relative",children:h}),e[12]=h,e[13]=v):v=e[13];let N;e[14]!==v||e[15]!==x?(N=c.jsxs("div",{className:"flex items-start justify-between",children:[x,v]}),e[14]=v,e[15]=x,e[16]=N):N=e[16];let y;e[17]!==s.title?(y=c.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[17]=s.title,e[18]=y):y=e[18];let P;e[19]!==s.description||e[20]!==m?(P=s.description||m("connections.connectionCard.noDescription"),e[19]=s.description,e[20]=m,e[21]=P):P=e[21];let j;e[22]!==P?(j=c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=j):j=e[23];let C;e[24]!==y||e[25]!==j?(C=c.jsxs("div",{className:"flex flex-col gap-1",children:[y,j]}),e[24]=y,e[25]=j,e[26]=C):C=e[26];let b;e[27]!==N||e[28]!==C?(b=c.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,C]}),e[27]=N,e[28]=C,e[29]=b):b=e[29];let k;e[30]!==n?(k=n&&c.jsx("div",{className:"border-t border-border mt-auto",children:c.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:G,children:n})}),e[30]=n,e[31]=k):k=e[31];let w;e[32]!==b||e[33]!==k?(w=c.jsxs("div",{className:"flex flex-col flex-1",children:[b,k]}),e[32]=b,e[33]=k,e[34]=w):w=e[34];let E;return e[35]!==o||e[36]!==w||e[37]!==d||e[38]!==I||e[39]!==_||e[40]!==M||e[41]!==g?(E=c.jsx(q,{size:"flush",className:d,onClick:o,role:I,tabIndex:_,"aria-pressed":M,onKeyDown:g,children:w}),e[35]=o,e[36]=w,e[37]=d,e[38]=I,e[39]=_,e[40]=M,e[41]=g,e[42]=E):E=e[42],E}function G(t){return t.stopPropagation()}function Q(t){return t.stopPropagation()}export{ee as C,Z as g,X as u};
1
+ import{c as D,a6 as S,an as $,K as F,cM as K,b as R,m as T,j as c,gK as q}from"./index-FRxLT_js.js";import{u as O}from"./useInfiniteQuery-D_gObArx.js";import{g as A}from"./connection-slug-DOi8cWyk.js";import{I as z}from"./integration-icon-BTN_yWEk.js";function X(t){const e=D.c(21),{org:s}=S(),o=$();let l;e[0]!==t?(l=t?.trim().split(/\s+/).filter(Boolean)??[],e[0]=t,e[1]=l):l=e[1];const r=l;let n;e[2]!==s.id||e[3]!==t?(n=F.storeDiscovery(s.id,`deco-json:${t??""}`),e[2]=s.id,e[3]=t,e[4]=n):n=e[4];let a;e[5]!==o||e[6]!==r?(a=I=>{const{pageParam:_}=I;return o.call("COLLECTION_REGISTRY_APP_LIST",{limit:24,cursor:_,where:r.length?{operator:"or",conditions:r.flatMap(B)}:void 0})},e[5]=o,e[6]=r,e[7]=a):a=e[7];let u;e[8]!==n||e[9]!==a?(u={queryKey:n,queryFn:a,initialPageParam:void 0,getNextPageParam:Y,staleTime:3e5,placeholderData:K,throwOnError:!0},e[8]=n,e[9]=a,e[10]=u):u=e[10];const i=O(u);let p;e[11]!==i.data?.pages?(p=i.data?.pages.flatMap(V)??[],e[11]=i.data?.pages,e[12]=p):p=e[12];const m=p;let f;e[13]!==i?(f=()=>{i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},e[13]=i,e[14]=f):f=e[14];let d;return e[15]!==m||e[16]!==i.hasNextPage||e[17]!==i.isFetchingNextPage||e[18]!==i.isLoading||e[19]!==f?(d={items:m,hasMore:i.hasNextPage,isLoadingMore:i.isFetchingNextPage,isInitialLoading:i.isLoading,loadMore:f},e[15]=m,e[16]=i.hasNextPage,e[17]=i.isFetchingNextPage,e[18]=i.isLoading,e[19]=f,e[20]=d):d=e[20],d}function V(t){return t.items}function Y(t){return t.nextCursor}function B(t){return[["title"],["description"],["id"],["server","name"]].map(e=>({field:e,operator:"contains",value:t}))}function Z(t){const e=new Map;for(const l of t){const r=A(l),n=e.get(r);n?n.push(l):e.set(r,[l])}const s=[],o=new Set;for(const l of t){const r=A(l);if(o.has(r))continue;o.add(r);const n=e.get(r),a=n[0];n.length===1?s.push({type:"single",connection:a}):s.push({type:"group",key:r,icon:a.icon,title:a.app_name?a.title.replace(/\s*\(\d+\)\s*$/,""):a.title,connections:n})}return s}function ee(t){const e=D.c(43),{connection:s,onClick:o,headerActions:l,headerActionsAlwaysVisible:r,footer:n,className:a,fallbackIcon:u,selected:i}=t,p=r===void 0?!1:r,m=R(),f=o&&"cursor-pointer hover:bg-accent";let d;e[0]!==a||e[1]!==f?(d=T("transition-colors group overflow-hidden flex flex-col h-full",f,a),e[0]=a,e[1]=f,e[2]=d):d=e[2];const I=o?"button":void 0,_=o?0:void 0,M=o&&i!==void 0?i:void 0;let g;e[3]!==o?(g=o?L=>{L.target===L.currentTarget&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),o())}:void 0,e[3]=o,e[4]=g):g=e[4];let x;e[5]!==s.icon||e[6]!==s.title||e[7]!==u?(x=c.jsx(z,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-edge",fallbackIcon:u}),e[5]=s.icon,e[6]=s.title,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==p?(h=l&&c.jsx("div",{className:T("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:Q,children:l}),e[9]=l,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==h?(v=c.jsx("div",{className:"relative",children:h}),e[12]=h,e[13]=v):v=e[13];let N;e[14]!==v||e[15]!==x?(N=c.jsxs("div",{className:"flex items-start justify-between",children:[x,v]}),e[14]=v,e[15]=x,e[16]=N):N=e[16];let y;e[17]!==s.title?(y=c.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[17]=s.title,e[18]=y):y=e[18];let P;e[19]!==s.description||e[20]!==m?(P=s.description||m("connections.connectionCard.noDescription"),e[19]=s.description,e[20]=m,e[21]=P):P=e[21];let j;e[22]!==P?(j=c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=j):j=e[23];let C;e[24]!==y||e[25]!==j?(C=c.jsxs("div",{className:"flex flex-col gap-1",children:[y,j]}),e[24]=y,e[25]=j,e[26]=C):C=e[26];let b;e[27]!==N||e[28]!==C?(b=c.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,C]}),e[27]=N,e[28]=C,e[29]=b):b=e[29];let k;e[30]!==n?(k=n&&c.jsx("div",{className:"border-t border-border mt-auto",children:c.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:G,children:n})}),e[30]=n,e[31]=k):k=e[31];let w;e[32]!==b||e[33]!==k?(w=c.jsxs("div",{className:"flex flex-col flex-1",children:[b,k]}),e[32]=b,e[33]=k,e[34]=w):w=e[34];let E;return e[35]!==o||e[36]!==w||e[37]!==d||e[38]!==I||e[39]!==_||e[40]!==M||e[41]!==g?(E=c.jsx(q,{size:"flush",className:d,onClick:o,role:I,tabIndex:_,"aria-pressed":M,onKeyDown:g,children:w}),e[35]=o,e[36]=w,e[37]=d,e[38]=I,e[39]=_,e[40]=M,e[41]=g,e[42]=E):E=e[42],E}function G(t){return t.stopPropagation()}function Q(t){return t.stopPropagation()}export{ee as C,Z as g,X as u};
@@ -1 +1 @@
1
- import{aJ as Ne,dD as Me,dB as ze,aK as de,bF as Ee,c as F,b as V,j as t,h as Se,B,r as Q,m as ye,a6 as te,an as Re,V as me,K as ee,d as se,C as _e,av as Ce,gK as Fe,e3 as Ue,n as Ve,hF as ue,a5 as Le,I as J,_ as Be,X as qe,Z as He,Y as xe,R as Ke,f as Ge,hX as Xe,q as Qe,hk as We,aI as Ye,aH as Je,o as Ze,t as Y}from"./index-DNY1LCEV.js";import{g as et}from"./extract-connection-data-0MTwkkap.js";import{E as we}from"./empty-state-CCe_gxuj.js";import{E as tt,r as st,b as nt,c as it}from"./connection-form-helpers-D-61dVx3.js";import{c as ot,S as at,D as lt}from"./index-Ctcj_Ic4.js";import{u as ke,T as rt}from"./use-mcp-auth-status-WaulxB9m.js";import{a as ct}from"./mcp-oauth-DdZ5iqUI.js";import{I as ae}from"./integration-icon-B7GQGDoQ.js";import{s as dt}from"./Plus-Bd_Azs6t.js";import{b6 as mt,a5 as ut,a$ as xt,a6 as ne}from"./agent-icon-zKGrqypc.js";import{a as Ie,f as pt,s as ft}from"./Tool01-JC0jUvnM.js";import{s as re}from"./Trash01-DUjxO1Dn.js";import{b as ht,a as gt,c as jt,S as vt,d as bt}from"./sheet-BclrNEHN.js";import{F as H,b as K,c as G,d as L,f as X,e as pe,a as Nt}from"./form-DINHcU5h.js";import{u as Te,a as Ae,b as St}from"./use-connection-DW1VkUDp.js";import{u as Pe}from"./use-mcp-client-XSpKurXu.js";import{u as yt}from"./use-mcp-tools-C_TsO2I8.js";import{a as _t}from"./use-mcp-prompts-Bs2ZYPMm.js";import{i as Ct}from"./mcp-oauth-Bm9eowFy.js";import{u as wt,D as kt}from"./use-delete-connection-Ddr1KxTc.js";import{c as It}from"./monitoring-stats-row-BGw1gEqW.js";import{c as Tt,b as At,C as Pt,a as Dt,B as $t}from"./chart-BD1DM8Vo.js";import{C as Ot}from"./tooltipContext-BbljAPKp.js";import{u as Mt}from"./repository-binding-0rqv5CYu.js";import{T as ie,a as zt,c as oe,b as Et}from"./tabs-DzZuOsBG.js";import{g as De}from"./connection-slug-BxAeiVuI.js";import{n as Rt}from"./BookOpen01-BUy5CVjC.js";import{g as ce}from"./types-mnHt7RAy.js";import{M as Ft}from"./mcp-app-renderer-xoRmsbxJ.js";import{C as Ut}from"./collection-search-C3yL3Si4.js";import{B as Vt}from"./badge-DhCDyINb.js";import{S as fe,b as he,a as ge,d as je,c as q}from"./select-BtuZ1_PE.js";import{i as Lt}from"./CheckCircle-DtUq_uxu.js";import{t as Bt}from"./ChevronDown-C0rME5fU.js";import{n as qt}from"./LinkBroken01-w2HNuUHo.js";import{d as Ht}from"./UserSquare-D6ubIo4l.js";import{s as Kt}from"./XClose-CHJIrn3i.js";import{p as Gt,i as Xt}from"./connection-OrxsAVXu.js";import{c as Qt}from"./schema-JoNeetSU.js";import"./metadata-D72DunRR.js";import"./Key01-B7vuN73N.js";import"./auth-BbyP7Mh4.js";import"./index-WY5skHFQ.js";import"./index-C1HmbFkP.js";import"./index-CxRoy25G.js";import"./index-BdQq_4o_.js";import"./index-DGzcH4Vq.js";import"./popover-O0--zxB3.js";import"./tooltip-DEqrMv7W.js";import"./index-D4Cq4uu-.js";import"./SearchMd-DoUjFKDV.js";import"./use-mobile-BxcOWRrF.js";import"./use-navigate-to-agent-D9QHHZbU.js";import"./thread-intent-Dmqjim4G.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CLN8yu6T.js";import"./task-board-B6w6sUwb.js";import"./schema-UfVOE_vK.js";import"./session-runtime-C9K2fhXt.js";import"./Eye-DvysNEeS.js";import"./AlertCircle-BYyFOifG.js";import"./UserCheck01-CHkzczFI.js";import"./ArrowUp-BbdlU24N.js";import"./ArrowLeft-BQKI9I0k.js";import"./ArrowRight-B21E_uc5.js";import"./Globe04--1ycu_yQ.js";import"./ChevronSelectorVertical-BCjXLDN_.js";import"./ChevronUp-CIqW-9_W.js";import"./CreditCard01-BGMvQi86.js";import"./File02-Nky5bxni.js";import"./MessageCircle01-BUz5eIR5.js";import"./SwitchHorizontal01-BZWsjo2g.js";import"./Fingerprint04-DNoiAgrN.js";import"./Image01-BGZNkNVE.js";import"./LayoutLeft-DTjvUEMi.js";import"./Minus-DhX2EjkJ.js";import"./Monitor01-Dv4dKtFe.js";import"./Sun-bgIMzv-s.js";import"./Play-BcRuLGoC.js";import"./ShoppingBag01-DsiPVRC3.js";import"./Upload01-BcZgaIHQ.js";import"./Users01-DOgFV3e5.js";import"./Zap-6gSNYeqn.js";import"./label-BleuytxV.js";import"./CartesianChart-DDuspEUo.js";import"./CategoricalChart-CclXOr_i.js";import"./AreaChart-D6tyN032.js";import"./active-indicator-CCMhAsc_.js";import"./url-slug-BNPYObW-.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=F.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=ke(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(Ie,{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=F.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(Ie,{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=F.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=F.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=It(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=F.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=F.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=F.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=F.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=F.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=F.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(Ut,{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(Fe,{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(Ue,{className:"h-full w-full"}),children:t.jsx(Ft,{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=F.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=F.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(k){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:m,collectionName:"tools",itemId:encodeURIComponent(k)}})},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 k;e[14]!==b?(k=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:b}),e[14]=b,e[15]=k):k=e[15];let I;e[16]!==d?(I=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=I):I=e[17];let U;e[18]!==I?(U=t.jsx("p",{className:"text-sm text-muted-foreground",children:I}),e[18]=I,e[19]=U):U=e[19];let W;return e[20]!==k||e[21]!==U?(W=t.jsxs("div",{className:"surface p-5",children:[k,U]}),e[20]=k,e[21]=U,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=F.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?Gt(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(H,{control:s.control,name:"ui_type",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(H,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(K,{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(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ht,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),l==="NPX"&&t.jsx(H,{control:s.control,name:"npx_package",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"stdio_command",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"stdio_args",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"env_vars",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"connection_token",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(qe,{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(He,{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(Kt,{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),_=ke({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(),k=Cs(b),I=h?.id??e;await x.update.mutateAsync({id:I,data:k}),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:k,tokenInfo:I,error:U}=await ct({connectionId:p,orgSlug:f.slug,...b?{scope:b}:{}});if(U||!k){Y.error(r("details.connection.authFailed",{error:U??""}));return}if(I)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:I.accessToken,refreshToken:I.refreshToken,expiresIn:I.expiresIn,scope:I.scope,clientId:I.clientId,clientSecret:I.clientSecret,tokenEndpoint:I.tokenEndpoint})});if(!Z.ok)console.error("Failed to save OAuth token:",await Z.text()),await x.update.mutateAsync({id:p,data:{connection_token:k}});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:k}})}else await x.update.mutateAsync({id:p,data:{connection_token:k}});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 k=await p.text();Y.error(r("details.connection.failedRemoveOAuth",{error:k}));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(kt,{...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(H,{control:S.control,name:"title",render:({field:p})=>t.jsxs(K,{children:[t.jsx(G,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...p})}),t.jsx(X,{})]})}),t.jsx(H,{control:S.control,name:"description",render:({field:p})=>t.jsxs(K,{children:[t.jsx(G,{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*$/,""),k=a.length+1,I=`${b} (${k})`,U=et("conn");await x.create.mutateAsync({id:U,title:I,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/${U}`,window.location.origin),Z=await Ct({url:W.href,token:null,orgId:f.id});Z.supportsOAuth&&!Z.isAuthenticated&&await M(U)}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 ks(){const s=F.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}=Ge(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 k=b.id===h?_:p(b.tools);for(const I of k)A.has(I.name)||(A.add(I.name),R.push(I))}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(Is),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 k;s[27]!==p||s[28]!==b?(k=t.jsx(B,{variant:"outline",onClick:p,children:b}),s[27]=p,s[28]=b,s[29]=k):k=s[29];let I;return s[30]!==A||s[31]!==R||s[32]!==k?(I=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(we,{title:A,description:R,actions:k})}),s[30]=A,s[31]=R,s[32]=k,s[33]=I):I=s[33],I}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 Is(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=F.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{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(ks,{})})}),s[0]=e):e=s[0],e}function ji(){const s=F.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{ji as default};
1
+ import{aJ as Ne,dD as Me,dB as ze,aK as de,bF as Ee,c as F,b as V,j as t,h as Se,B,r as Q,m as ye,a6 as te,an as Re,V as me,K as ee,d as se,C as _e,av as Ce,gK as Fe,e3 as Ue,n as Ve,hF as ue,a5 as Le,I as J,_ as Be,X as qe,Z as He,Y as xe,R as Ke,f as Ge,hX as Xe,q as Qe,hk as We,aI as Ye,aH as Je,o as Ze,t as Y}from"./index-FRxLT_js.js";import{g as et}from"./extract-connection-data-DjE1yVUY.js";import{E as we}from"./empty-state-l9Tatoxd.js";import{E as tt,r as st,b as nt,c as it}from"./connection-form-helpers-veDVCb9w.js";import{c as ot,S as at,D as lt}from"./index-CorQG-PM.js";import{u as ke,T as rt}from"./use-mcp-auth-status-BabDSoXH.js";import{a as ct}from"./mcp-oauth-Ds0j31F2.js";import{I as ae}from"./integration-icon-BTN_yWEk.js";import{s as dt}from"./Plus-BlCDSK3_.js";import{b6 as mt,a5 as ut,a$ as xt,a6 as ne}from"./agent-icon-qKbICqBE.js";import{a as Ie,f as pt,s as ft}from"./Tool01-D_bTJJvK.js";import{s as re}from"./Trash01-CvVvZjMc.js";import{b as ht,a as gt,c as jt,S as vt,d as bt}from"./sheet-Dps_OtzY.js";import{F as H,b as K,c as G,d as L,f as X,e as pe,a as Nt}from"./form-eUXxZ5Qg.js";import{u as Te,a as Ae,b as St}from"./use-connection-DoUaPNkI.js";import{u as Pe}from"./use-mcp-client-rOHZbD3Y.js";import{u as yt}from"./use-mcp-tools-DfFo5hFt.js";import{a as _t}from"./use-mcp-prompts-Cq6mpthN.js";import{i as Ct}from"./mcp-oauth-Ci6yqFTl.js";import{u as wt,D as kt}from"./use-delete-connection-4Fx-JLmK.js";import{c as It}from"./monitoring-stats-row-DJXMqCN0.js";import{c as Tt,b as At,C as Pt,a as Dt,B as $t}from"./chart-D2etphpL.js";import{C as Ot}from"./tooltipContext-D2O58pOO.js";import{u as Mt}from"./repository-binding-DjFY5b0y.js";import{T as ie,a as zt,c as oe,b as Et}from"./tabs-JKAPr-O4.js";import{g as De}from"./connection-slug-DOi8cWyk.js";import{n as Rt}from"./BookOpen01-0vmOJP7K.js";import{g as ce}from"./types-cOzCnmYI.js";import{M as Ft}from"./mcp-app-renderer-BAfMgB1Z.js";import{C as Ut}from"./collection-search-CphnxlYD.js";import{B as Vt}from"./badge-CFiK0EOx.js";import{S as fe,b as he,a as ge,d as je,c as q}from"./select-D5aPAOxI.js";import{i as Lt}from"./CheckCircle-CVSsEuJs.js";import{t as Bt}from"./ChevronDown-BkddO6nk.js";import{n as qt}from"./LinkBroken01-CothmVOv.js";import{d as Ht}from"./UserSquare-fSKR9s5Z.js";import{s as Kt}from"./XClose-BvzwUB-E.js";import{p as Gt,i as Xt}from"./connection-BZJlBrLd.js";import{c as Qt}from"./schema-D1mfj_VD.js";import"./metadata-D72DunRR.js";import"./Key01-B6wydByr.js";import"./auth-AT-S53oU.js";import"./index-xNvvPF5K.js";import"./index-B1yf8QQv.js";import"./index-K-FtkPVI.js";import"./index-BdQq_4o_.js";import"./index-CdR9qfQl.js";import"./popover-BI-lpUhu.js";import"./tooltip-C6OYlSV-.js";import"./index-D9pnpNHk.js";import"./SearchMd-B2ZqlWzx.js";import"./use-mobile-eRuVOAzy.js";import"./use-navigate-to-agent-CoxxT5G0.js";import"./thread-intent-CoFgTbor.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DGsiEkeQ.js";import"./task-board-B_oKjzEP.js";import"./schema-DFMNr5Cf.js";import"./session-runtime-CVF2LvNW.js";import"./Eye-NyWbd_Et.js";import"./AlertCircle-CS5y5cdF.js";import"./UserCheck01-B7Ux1cXt.js";import"./ArrowUp-B_rPxUl3.js";import"./ArrowLeft-CnpYebJt.js";import"./ArrowRight-CTIzvrRD.js";import"./Globe04-Bu51hlDK.js";import"./ChevronSelectorVertical-B_EPXu-J.js";import"./ChevronUp-hmtO7NfN.js";import"./CreditCard01-CYAMo28t.js";import"./File02-B0o8Z6Rd.js";import"./MessageCircle01-BoiiT0Ka.js";import"./SwitchHorizontal01-B9krqVlE.js";import"./Fingerprint04-DFly9X11.js";import"./Image01-Xgs_5RZR.js";import"./LayoutLeft-ww8XIIKY.js";import"./Minus-DjGZhteG.js";import"./Monitor01-BnNa35fy.js";import"./Sun-C31h0XVy.js";import"./Play-DYcX2TsV.js";import"./ShoppingBag01-CO-Ik7_a.js";import"./Upload01-DAa882sM.js";import"./Users01-CYXQ60-Z.js";import"./Zap-BALSokOc.js";import"./label-DKoCaul6.js";import"./CartesianChart-BLh4dFJB.js";import"./CategoricalChart-CwzUkCwO.js";import"./AreaChart-6i9ddKAo.js";import"./active-indicator-CCMhAsc_.js";import"./url-slug-DgA17VrJ.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=F.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=ke(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(Ie,{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=F.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(Ie,{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=F.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=F.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=It(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=F.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=F.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=F.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=F.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=F.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=F.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(Ut,{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(Fe,{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(Ue,{className:"h-full w-full"}),children:t.jsx(Ft,{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=F.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=F.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(k){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:m,collectionName:"tools",itemId:encodeURIComponent(k)}})},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 k;e[14]!==b?(k=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:b}),e[14]=b,e[15]=k):k=e[15];let I;e[16]!==d?(I=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=I):I=e[17];let U;e[18]!==I?(U=t.jsx("p",{className:"text-sm text-muted-foreground",children:I}),e[18]=I,e[19]=U):U=e[19];let W;return e[20]!==k||e[21]!==U?(W=t.jsxs("div",{className:"surface p-5",children:[k,U]}),e[20]=k,e[21]=U,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=F.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?Gt(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(H,{control:s.control,name:"ui_type",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(H,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(K,{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(q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ht,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),l==="NPX"&&t.jsx(H,{control:s.control,name:"npx_package",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"stdio_command",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"stdio_args",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"env_vars",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(H,{control:s.control,name:"connection_token",render:({field:m})=>t.jsxs(K,{className:"flex flex-col gap-3",children:[t.jsx(G,{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(qe,{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(He,{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(Kt,{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),_=ke({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(),k=Cs(b),I=h?.id??e;await x.update.mutateAsync({id:I,data:k}),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:k,tokenInfo:I,error:U}=await ct({connectionId:p,orgSlug:f.slug,...b?{scope:b}:{}});if(U||!k){Y.error(r("details.connection.authFailed",{error:U??""}));return}if(I)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:I.accessToken,refreshToken:I.refreshToken,expiresIn:I.expiresIn,scope:I.scope,clientId:I.clientId,clientSecret:I.clientSecret,tokenEndpoint:I.tokenEndpoint})});if(!Z.ok)console.error("Failed to save OAuth token:",await Z.text()),await x.update.mutateAsync({id:p,data:{connection_token:k}});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:k}})}else await x.update.mutateAsync({id:p,data:{connection_token:k}});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 k=await p.text();Y.error(r("details.connection.failedRemoveOAuth",{error:k}));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(kt,{...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(H,{control:S.control,name:"title",render:({field:p})=>t.jsxs(K,{children:[t.jsx(G,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...p})}),t.jsx(X,{})]})}),t.jsx(H,{control:S.control,name:"description",render:({field:p})=>t.jsxs(K,{children:[t.jsx(G,{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*$/,""),k=a.length+1,I=`${b} (${k})`,U=et("conn");await x.create.mutateAsync({id:U,title:I,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/${U}`,window.location.origin),Z=await Ct({url:W.href,token:null,orgId:f.id});Z.supportsOAuth&&!Z.isAuthenticated&&await M(U)}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 ks(){const s=F.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}=Ge(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 k=b.id===h?_:p(b.tools);for(const I of k)A.has(I.name)||(A.add(I.name),R.push(I))}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(Is),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 k;s[27]!==p||s[28]!==b?(k=t.jsx(B,{variant:"outline",onClick:p,children:b}),s[27]=p,s[28]=b,s[29]=k):k=s[29];let I;return s[30]!==A||s[31]!==R||s[32]!==k?(I=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(we,{title:A,description:R,actions:k})}),s[30]=A,s[31]=R,s[32]=k,s[33]=I):I=s[33],I}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 Is(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=F.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{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(ks,{})})}),s[0]=e):e=s[0],e}function ji(){const s=F.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{ji as default};
@@ -1 +1 @@
1
- import{c as z,j as c,I as T,B as N}from"./index-DNY1LCEV.js";import{s as A}from"./Plus-Bd_Azs6t.js";import{s as H}from"./Trash01-DUjxO1Dn.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
+ import{c as z,j as c,I as T,B as N}from"./index-FRxLT_js.js";import{s as A}from"./Plus-BlCDSK3_.js";import{s as H}from"./Trash01-CvVvZjMc.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-C9K2fhXt.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
+ import{e}from"./session-runtime-CVF2LvNW.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};