decocms 2.175.1 → 2.175.2

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 (264) hide show
  1. package/dist/client/assets/{AlertCircle-De9oqjty.js → AlertCircle-CnfwZdxb.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-BaG4OcCg.js → AlignLeft-zj1VrWVO.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-PFFBPH3j.js → ArrowDown-BnnQhLmg.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CPWCs_Od.js → ArrowLeft-C3_bzjZf.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-C6Q-EpUw.js → ArrowUp-BuKX1RSZ.js} +1 -1
  6. package/dist/client/assets/{Check-BfKCyKXX.js → Check-7kB05ju_.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DiRi76qb.js → CheckCircle-DrGaevdP.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-ZekLHdFZ.js → CheckDone01-CVJEgdwq.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-DC3VT092.js → CheckVerified02-DmV5dzDn.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-BHMaRWRt.js → ChevronDown-DHeagNGb.js} +1 -1
  11. package/dist/client/assets/{ChevronLeft-0cpA2yNq.js → ChevronLeft-W2gkpjgL.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-1g9z-Z5h.js → ChevronRight-Blv21S_7.js} +1 -1
  13. package/dist/client/assets/{ChevronUp-1s_S3eDF.js → ChevronUp-J7upZD3-.js} +1 -1
  14. package/dist/client/assets/{Clock-rHd8cQAO.js → Clock-9Mm0U0Dg.js} +1 -1
  15. package/dist/client/assets/{Code01-CoTQP8pZ.js → Code01-DDbKsccR.js} +1 -1
  16. package/dist/client/assets/{Coins01-D7lfLTbO.js → Coins01-DTz6uYyF.js} +1 -1
  17. package/dist/client/assets/{Container-DwxLlgWA.js → Container-Ci_1Xm4L.js} +1 -1
  18. package/dist/client/assets/{Copy01-CIUDy0Hr.js → Copy01-BexEalI-.js} +1 -1
  19. package/dist/client/assets/{Dataflow03-T9TmjQN-.js → Dataflow03-CKfLDuKw.js} +1 -1
  20. package/dist/client/assets/{DotsHorizontal-CmCKbvuJ.js → DotsHorizontal-3xIvFzgk.js} +1 -1
  21. package/dist/client/assets/{DotsVertical-Y8XpM2B_.js → DotsVertical-7N_NB6wt.js} +1 -1
  22. package/dist/client/assets/{Download01-LinNp3zy.js → Download01-D-oC1d8d.js} +1 -1
  23. package/dist/client/assets/{Edit01-Dw-lPBk-.js → Edit01-gYPHsLoC.js} +1 -1
  24. package/dist/client/assets/{Edit05-Bx682Mm6.js → Edit05-BA2Lz_6R.js} +1 -1
  25. package/dist/client/assets/{Eye-JuDcZhJz.js → Eye-Cn6YseXl.js} +1 -1
  26. package/dist/client/assets/{EyeOff-9_-SJWcU.js → EyeOff-L-SLicw9.js} +1 -1
  27. package/dist/client/assets/{File02-bFwU_wEK.js → File02-Dx1Iz50W.js} +1 -1
  28. package/dist/client/assets/{File06-CU5oU1OI.js → File06-Dqc-K1-5.js} +1 -1
  29. package/dist/client/assets/{FilterLines-BaTxnUjH.js → FilterLines-DCrzLWfV.js} +1 -1
  30. package/dist/client/assets/{Globe01-DUjsFcPS.js → Globe01-DW2rHI0i.js} +1 -1
  31. package/dist/client/assets/{Globe02-k3_A41kp.js → Globe02-CyGtzZ8k.js} +1 -1
  32. package/dist/client/assets/{Grid01-DBOkAm2V.js → Grid01-Dqz--q3o.js} +1 -1
  33. package/dist/client/assets/{Hash02-gqJDwuju.js → Hash02-pqCZ_ykD.js} +1 -1
  34. package/dist/client/assets/{Home02-DfEb-Myv.js → Home02-D2W6xjpZ.js} +1 -1
  35. package/dist/client/assets/{Image01-I9pAeT0N.js → Image01-U7ZIAIPc.js} +1 -1
  36. package/dist/client/assets/{Inbox01-BgDmihAV.js → Inbox01-DpRIO4ZY.js} +1 -1
  37. package/dist/client/assets/{InfoCircle-LX1SVC24.js → InfoCircle-CvSmMU6H.js} +1 -1
  38. package/dist/client/assets/{Key01-DAjAUWfr.js → Key01-Dq5b7fdA.js} +1 -1
  39. package/dist/client/assets/{LayersTwo01-C-XZtFtv.js → LayersTwo01-Li6JqY2K.js} +1 -1
  40. package/dist/client/assets/{LayoutLeft-BvuIBX8d.js → LayoutLeft-BAk65lFq.js} +1 -1
  41. package/dist/client/assets/{Link01-q2vhCqdM.js → Link01-NJWLnzFs.js} +1 -1
  42. package/dist/client/assets/{LinkExternal01-QGWpvftd.js → LinkExternal01-B8e_Oa3I.js} +1 -1
  43. package/dist/client/assets/{List-CuV23QYs.js → List-Cc_Ri6eQ.js} +1 -1
  44. package/dist/client/assets/{Loading01-BNn4YU_K.js → Loading01-Cbk1oNZ2.js} +1 -1
  45. package/dist/client/assets/{Lock01-DJQX15kR.js → Lock01-dP10fLup.js} +1 -1
  46. package/dist/client/assets/{Play-C7yKo0dH.js → Play-DqxAqUbl.js} +1 -1
  47. package/dist/client/assets/{Plus-CT_Gcwl2.js → Plus-CqWob4tu.js} +1 -1
  48. package/dist/client/assets/{RefreshCcw01-uL9q48A4.js → RefreshCcw01-B6R5Js1R.js} +1 -1
  49. package/dist/client/assets/{Save01-CuwI4Bxq.js → Save01-BfieBu6m.js} +1 -1
  50. package/dist/client/assets/{SearchMd-BLeX5weN.js → SearchMd-DJI6OMcD.js} +1 -1
  51. package/dist/client/assets/{Settings01-2AkYiqYr.js → Settings01-BWkL3Bf9.js} +1 -1
  52. package/dist/client/assets/{Shield01-D6IOCC-Z.js → Shield01-DMT1motk.js} +1 -1
  53. package/dist/client/assets/{Terminal-Dlvh4GS2.js → Terminal-zNrinv6B.js} +1 -1
  54. package/dist/client/assets/{Tool01-CjSIsyxE.js → Tool01-CUx5BAY-.js} +1 -1
  55. package/dist/client/assets/{Trash01-YPQczxci.js → Trash01-C0891dQq.js} +1 -1
  56. package/dist/client/assets/{Upload01-BlEN4mwB.js → Upload01-ngHWsp64.js} +1 -1
  57. package/dist/client/assets/{Users03-B7X28dbt.js → Users03-FsZwQwZq.js} +1 -1
  58. package/dist/client/assets/{X-B_f76BPZ.js → X-CeRZ6ROs.js} +1 -1
  59. package/dist/client/assets/{XAxis-Du5m1KMx.js → XAxis-B4Pxztvn.js} +1 -1
  60. package/dist/client/assets/{XCircle-DDLf4PgL.js → XCircle-X3Ds2fko.js} +1 -1
  61. package/dist/client/assets/{XClose-eeK1fS1n.js → XClose-BieEiV6P.js} +1 -1
  62. package/dist/client/assets/{Zap-DHey7Hu_.js → Zap-B-qa654H.js} +1 -1
  63. package/dist/client/assets/{agent-connections-preview-D6uKmygR.js → agent-connections-preview-BXeLz6mJ.js} +1 -1
  64. package/dist/client/assets/agent-detail-2cFCKx9t.js +2 -0
  65. package/dist/client/assets/agents-DS-16MLo.js +1 -0
  66. package/dist/client/assets/ai-providers-logos-Bb5LHAPU.js +1 -0
  67. package/dist/client/assets/{alert-dialog-BVglQjyM.js → alert-dialog-DgTufZ_p.js} +1 -1
  68. package/dist/client/assets/{auth-catchall-Bfllc4Ni.js → auth-catchall-zO2o6cw1.js} +1 -1
  69. package/dist/client/assets/automation-detail-CyiDphKi.js +1 -0
  70. package/dist/client/assets/automations-CBvKrAy1.js +1 -0
  71. package/dist/client/assets/{avatar-OE2URZfM.js → avatar-w6QMWHVj.js} +1 -1
  72. package/dist/client/assets/{badge-CAg946Xk.js → badge-B-_hRtCy.js} +1 -1
  73. package/dist/client/assets/{binder-DTBFGqjl.js → binder-BEJ4wRzw.js} +1 -1
  74. package/dist/client/assets/{breadcrumb-aP02JuZO.js → breadcrumb-Dk9kRV2t.js} +1 -1
  75. package/dist/client/assets/{card-RQxLVCBk.js → card-BSGld6G2.js} +1 -1
  76. package/dist/client/assets/{chart-D9IwJUjP.js → chart-CEfru1MQ.js} +1 -1
  77. package/dist/client/assets/{checkbox-DLsMmmhu.js → checkbox-COsQJsO9.js} +1 -1
  78. package/dist/client/assets/{collapsible-CGr-TiAc.js → collapsible-BCGKc4Wz.js} +1 -1
  79. package/dist/client/assets/{collection-detail-CZQpkHig.js → collection-detail-BimbOEiL.js} +2 -2
  80. package/dist/client/assets/{collection-display-button-VOymjalV.js → collection-display-button-CuyLh-NC.js} +1 -1
  81. package/dist/client/assets/{collection-search-62vwaqdq.js → collection-search-aJlY7LHs.js} +1 -1
  82. package/dist/client/assets/{collection-table-wrapper-DPJfuSg9.js → collection-table-wrapper-CcbJTCba.js} +1 -1
  83. package/dist/client/assets/{collection-tabs-FJx5TF4Z.js → collection-tabs-B2Xeppc1.js} +1 -1
  84. package/dist/client/assets/{command-ChmbB2jp.js → command-CyHipwcz.js} +1 -1
  85. package/dist/client/assets/connect-3nC8bK4k.js +1 -0
  86. package/dist/client/assets/{connection-card-D9I87KkT.js → connection-card-iA_b7WBI.js} +1 -1
  87. package/dist/client/assets/connection-detail-B4CoR-IH.js +1 -0
  88. package/dist/client/assets/{connection-status-D_iX92lK.js → connection-status-BddpcBJZ.js} +1 -1
  89. package/dist/client/assets/connections-B-zXLcDP.js +1 -0
  90. package/dist/client/assets/{constants-XtX-WKGm.js → constants-CDL9XClm.js} +1 -1
  91. package/dist/client/assets/constants-DxY-8FrK.js +1 -0
  92. package/dist/client/assets/{context-CtrnP3HC.js → context-DDV_uL9a.js} +1 -1
  93. package/dist/client/assets/{create-organization-dialog-DlsDrfHE.js → create-organization-dialog-CG01zre5.js} +1 -1
  94. package/dist/client/assets/{create-project-dialog-BV-JjiBR.js → create-project-dialog-5e-piQzY.js} +1 -1
  95. package/dist/client/assets/{danger-B3KgXwQ9.js → danger-_ZcnVgTL.js} +1 -1
  96. package/dist/client/assets/{danger-zone-C_4VhnMp.js → danger-zone-e3foS_su.js} +1 -1
  97. package/dist/client/assets/{dependencies-BHUeYRA7.js → dependencies-DUviAtSp.js} +1 -1
  98. package/dist/client/assets/{dialog-_XYw8lZC.js → dialog-DxTRqiug.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-DzFMEBVS.js → dropdown-menu-CdjuOUR6.js} +1 -1
  100. package/dist/client/assets/dynamic-plugin-layout-DszdejBu.js +1 -0
  101. package/dist/client/assets/{editable-task-title-B7Ktbs3r.js → editable-task-title-44X_8A19.js} +1 -1
  102. package/dist/client/assets/{empty-state-AMuFIqs3.js → empty-state-Bj_isc1T.js} +1 -1
  103. package/dist/client/assets/{empty-state-D4GX29pL.js → empty-state-v8jdj56V.js} +1 -1
  104. package/dist/client/assets/{env-vars-editor-DTKmdK-v.js → env-vars-editor-Bs6jziXp.js} +1 -1
  105. package/dist/client/assets/{extract-connection-data-CS_Bn7Ri.js → extract-connection-data-Cyjq-Q5I.js} +1 -1
  106. package/dist/client/assets/{file-browser-OSAi_CZb.js → file-browser-4NMlO2k_.js} +2 -2
  107. package/dist/client/assets/{form-BN7_f2uj.js → form-BV3tSlED.js} +1 -1
  108. package/dist/client/assets/{general-B9J0F1Xq.js → general-LSfgt8-y.js} +1 -1
  109. package/dist/client/assets/{grid-view-BH674f3N.js → grid-view-BD9vYk3H.js} +1 -1
  110. package/dist/client/assets/{home-Dam4fMEZ.js → home-Ck605SqF.js} +1 -1
  111. package/dist/client/assets/{index-CuSj4QrF.js → index-B70G5L15.js} +1 -1
  112. package/dist/client/assets/{index-Cn8BPdHZ.js → index-BE93ZIdg.js} +1 -1
  113. package/dist/client/assets/{index-DsOJvxnb.js → index-BXUNq6d7.js} +3 -3
  114. package/dist/client/assets/{index-DxP-spTj.js → index-CZ7yh8sQ.js} +1 -1
  115. package/dist/client/assets/index-Ci8WAd55.css +1 -0
  116. package/dist/client/assets/{index-C-NLwTON.js → index-Dg_kVhT7.js} +1 -1
  117. package/dist/client/assets/{index-CcA_QriT.js → index-DlhaGZnK.js} +1 -1
  118. package/dist/client/assets/{index-zjV4p_E5.js → index-L6huQtcJ.js} +1 -1
  119. package/dist/client/assets/index-rWegviRE.js +1 -0
  120. package/dist/client/assets/{index-Da9ggy60.js → index-uQDoUdMq.js} +1 -1
  121. package/dist/client/assets/index-zJEaoyYS.js +25 -0
  122. package/dist/client/assets/{infiniteQueryObserver-BE0Fq7u7.js → infiniteQueryObserver-DXFe0xIV.js} +1 -1
  123. package/dist/client/assets/{input-CUT8DBv1.js → input-BFH8rk50.js} +1 -1
  124. package/dist/client/assets/{integration-icon-CVxvM4fR.js → integration-icon-D6SJHU0f.js} +1 -1
  125. package/dist/client/assets/{label-iPw5smAw.js → label-DE7vX487.js} +1 -1
  126. package/dist/client/assets/{layout-C2ZnDBkW.js → layout-B2GnF_Vp.js} +1 -1
  127. package/dist/client/assets/layout-B_GGomJW.js +1 -0
  128. package/dist/client/assets/{login-DJvdi7W3.js → login-CgzRmuxY.js} +1 -1
  129. package/dist/client/assets/{logo-upload-DlKQk0GB.js → logo-upload-Bfzj_LQV.js} +1 -1
  130. package/dist/client/assets/{markdown-CKKBcXcE.js → markdown-Da-6gcG9.js} +1 -1
  131. package/dist/client/assets/{mcp-app-renderer-IX_OR3wW.js → mcp-app-renderer-CNc9yMN5.js} +1 -1
  132. package/dist/client/assets/{mcp-server-card-Cq5E9kuT.js → mcp-server-card-s9NGsKpt.js} +1 -1
  133. package/dist/client/assets/mcp-server-detail-fMXGyX4W.js +2 -0
  134. package/dist/client/assets/members-BvBWfv9e.js +3 -0
  135. package/dist/client/assets/{monaco-editor-J8rInsT2.js → monaco-editor-VspAvYbk.js} +1 -1
  136. package/dist/client/assets/monitoring-B1jfqgQN.js +4 -0
  137. package/dist/client/assets/monitoring-dashboard-edit-Bdujw4Ym.js +1 -0
  138. package/dist/client/assets/{monitoring-dashboard-view-Dt4aILCV.js → monitoring-dashboard-view-CSfkxnkl.js} +2 -2
  139. package/dist/client/assets/{monitoring-stats-row-Dx_W_1nT.js → monitoring-stats-row-Ds_uiyYJ.js} +1 -1
  140. package/dist/client/assets/{oauth-callback-COUada1q.js → oauth-callback-BNPNdlSW.js} +1 -1
  141. package/dist/client/assets/{oauth-callback-ai-provider-CqS-ybCD.js → oauth-callback-ai-provider-CODmoIp9.js} +1 -1
  142. package/dist/client/assets/org-ai-providers-CQKU4ds_.js +1 -0
  143. package/dist/client/assets/page-Bbbh0c0Z.js +1 -0
  144. package/dist/client/assets/page-BfphKBfj.js +1 -0
  145. package/dist/client/assets/{plugin-empty-state-Dt2dvxD9.js → plugin-empty-state-BWhKyfJ8.js} +1 -1
  146. package/dist/client/assets/{plugin-empty-state-CRLH-_5S.js → plugin-empty-state-Cx_CuKe3.js} +1 -1
  147. package/dist/client/assets/{plugin-header-DLDBKovk.js → plugin-header-ET8DV5kQ.js} +1 -1
  148. package/dist/client/assets/{plugin-header-CkWzqJkZ.js → plugin-header-ncr8MkbN.js} +1 -1
  149. package/dist/client/assets/plugins-BdyM0ZUw.js +1 -0
  150. package/dist/client/assets/{popover-CF3EN_0o.js → popover-BcyJids_.js} +1 -1
  151. package/dist/client/assets/project-app-view-BdLdOYqG.js +1 -0
  152. package/dist/client/assets/project-layout-DReK69oR.js +1 -0
  153. package/dist/client/assets/{project-plugins-DRIvSpW5.js → project-plugins-CXWguN_r.js} +1 -1
  154. package/dist/client/assets/projects-list-CZANuMq5.js +1 -0
  155. package/dist/client/assets/{registry-layout-MGTBGYDW.js → registry-layout-CqXQ571U.js} +1 -1
  156. package/dist/client/assets/{registry-utils-Cd3t_Kmp.js → registry-utils-CaVl1vKg.js} +1 -1
  157. package/dist/client/assets/{reports-layout-Cu0HmCBt.js → reports-layout-CQyNOFqA.js} +1 -1
  158. package/dist/client/assets/{reset-password-Dwr8terU.js → reset-password-Bt_v8_59.js} +1 -1
  159. package/dist/client/assets/{resizable-D4LJctEl.js → resizable-B4X_WbHf.js} +1 -1
  160. package/dist/client/assets/{save-actions-MzYbolsq.js → save-actions-Py9YKTe0.js} +1 -1
  161. package/dist/client/assets/{scroll-area-B5XbONJS.js → scroll-area-R7PT492V.js} +1 -1
  162. package/dist/client/assets/{select-DRPG5csU.js → select-B-f7jgVG.js} +1 -1
  163. package/dist/client/assets/{select-virtual-mcp-B8NgSgPI.js → select-virtual-mcp-YanYQUBn.js} +1 -1
  164. package/dist/client/assets/{sheet-BQuKOEiL.js → sheet-7nFLkS7G.js} +1 -1
  165. package/dist/client/assets/shell-layout-Dp8xiQMR.js +3 -0
  166. package/dist/client/assets/{sidebar-settings-BqDjI96r.js → sidebar-settings-w0p27D0n.js} +1 -1
  167. package/dist/client/assets/{skeleton-DJFpR-1P.js → skeleton-CK2-6UkT.js} +1 -1
  168. package/dist/client/assets/{spinner-CqAVfcvO.js → spinner-B1-EIDBS.js} +1 -1
  169. package/dist/client/assets/{store-invite-JCf8JSic.js → store-invite-DVPM6U-x.js} +1 -1
  170. package/dist/client/assets/{switch-BQjzAGvm.js → switch-4UL4iV3X.js} +1 -1
  171. package/dist/client/assets/{table-DJbHB5IL.js → table-Bu98B5a-.js} +1 -1
  172. package/dist/client/assets/{tabs-CkPDQzeX.js → tabs-Cif80TZ4.js} +1 -1
  173. package/dist/client/assets/{task-status-wkv2GdSY.js → task-status-BWKjAgiX.js} +16 -16
  174. package/dist/client/assets/{tasks-panel-TN0GeEUK.js → tasks-panel-D6Bb-wiS.js} +1 -1
  175. package/dist/client/assets/tasks-tenjlvFT.js +1 -0
  176. package/dist/client/assets/{textarea-CTzX43MZ.js → textarea-DPLd5P1K.js} +1 -1
  177. package/dist/client/assets/{time-range-picker-DNJ6dRiN.js → time-range-picker-FJd_w9AH.js} +1 -1
  178. package/dist/client/assets/{toggle-group-y2h19HHT.js → toggle-group-B4QQy8X1.js} +1 -1
  179. package/dist/client/assets/{tools-list-Db7zzadA.js → tools-list-BgmW-tI4.js} +1 -1
  180. package/dist/client/assets/{tooltip-XyKE4lZa.js → tooltip-BGPUMzDS.js} +1 -1
  181. package/dist/client/assets/{topbar-portal-D3fRQWai.js → topbar-portal-CLOTo-7w.js} +1 -1
  182. package/dist/client/assets/{types-B3niHy47.js → types-DZ5M-eMJ.js} +1 -1
  183. package/dist/client/assets/{use-automations-C4CL-jAO.js → use-automations-D7j59hRT.js} +1 -1
  184. package/dist/client/assets/{use-binding-BfjFWpEn.js → use-binding-CZ8osTa1.js} +1 -1
  185. package/dist/client/assets/{use-collections-DSWhP4jg.js → use-collections-yY78nnLx.js} +1 -1
  186. package/dist/client/assets/{use-connection-DmR852Js.js → use-connection-lXrlfojY.js} +1 -1
  187. package/dist/client/assets/{use-copy-dSR0w-bG.js → use-copy-DZJI58oZ.js} +1 -1
  188. package/dist/client/assets/{use-create-virtual-mcp-DXWAjide.js → use-create-virtual-mcp-DK_WDS9Y.js} +1 -1
  189. package/dist/client/assets/{use-infinite-scroll-CvaIKLMy.js → use-infinite-scroll-C-TK62Eo.js} +1 -1
  190. package/dist/client/assets/{use-install-from-registry-_FQYQGQx.js → use-install-from-registry-C24f0cqa.js} +1 -1
  191. package/dist/client/assets/{use-list-state-Ck8sSm9J.js → use-list-state-D6LU1koz.js} +1 -1
  192. package/dist/client/assets/{use-mcp-prompts-C-XU_-dc.js → use-mcp-prompts-DT9l3i02.js} +1 -1
  193. package/dist/client/assets/{use-mcp-resources-Bxkx1Ub1.js → use-mcp-resources-DhBJVSsg.js} +1 -1
  194. package/dist/client/assets/{use-mcp-tools-BXmfFmar.js → use-mcp-tools-CwVNqTmj.js} +1 -1
  195. package/dist/client/assets/{use-members-B-Cx3SpJ.js → use-members-fpZqw1dy.js} +1 -1
  196. package/dist/client/assets/{use-mobile-O8KVzGuv.js → use-mobile-B0lEbMk3.js} +1 -1
  197. package/dist/client/assets/{use-project-Bg5pX2Ab.js → use-project-BnRSDoVD.js} +1 -1
  198. package/dist/client/assets/{use-store-discovery-DPE_0zuT.js → use-store-discovery-C9fJhQ4Y.js} +1 -1
  199. package/dist/client/assets/{use-view-mode-ve-Q_Sd0.js → use-view-mode-0w9n1sJ-.js} +1 -1
  200. package/dist/client/assets/{use-virtual-mcp-C9XdHCA_.js → use-virtual-mcp-CyoGC0aH.js} +1 -1
  201. package/dist/client/assets/useInfiniteQuery-BlrmUHYA.js +1 -0
  202. package/dist/client/assets/{useMutation-B_cFG709.js → useMutation-CkdHuTyE.js} +1 -1
  203. package/dist/client/assets/useQuery-Bmc4jnG2.js +1 -0
  204. package/dist/client/assets/useSuspenseInfiniteQuery-DD4jjrsx.js +1 -0
  205. package/dist/client/assets/{user-rS26WEu1.js → user-sbKkVV9F.js} +1 -1
  206. package/dist/client/assets/workflow-CpP3zoVI.js +1 -0
  207. package/dist/client/index.html +2 -2
  208. package/dist/server/node_modules/async-exit-hook/CHANGELOG.md +62 -0
  209. package/dist/server/node_modules/async-exit-hook/index.js +171 -0
  210. package/dist/server/node_modules/async-exit-hook/license +21 -0
  211. package/dist/server/node_modules/async-exit-hook/package.json +66 -0
  212. package/dist/server/node_modules/async-exit-hook/readme.md +118 -0
  213. package/dist/server/node_modules/postgres-date/index.js +116 -0
  214. package/dist/server/node_modules/postgres-date/license +21 -0
  215. package/dist/server/node_modules/postgres-date/package.json +33 -0
  216. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  217. package/dist/server/node_modules/split2/LICENSE +13 -0
  218. package/dist/server/node_modules/split2/README.md +85 -0
  219. package/dist/server/node_modules/split2/bench.js +27 -0
  220. package/dist/server/node_modules/split2/index.js +141 -0
  221. package/dist/server/node_modules/split2/package.json +39 -0
  222. package/dist/server/node_modules/split2/test.js +409 -0
  223. package/dist/server/node_modules/xtend/.jshintrc +30 -0
  224. package/dist/server/node_modules/xtend/LICENSE +20 -0
  225. package/dist/server/node_modules/xtend/README.md +32 -0
  226. package/dist/server/node_modules/xtend/immutable.js +19 -0
  227. package/dist/server/node_modules/xtend/mutable.js +17 -0
  228. package/dist/server/node_modules/xtend/package.json +55 -0
  229. package/dist/server/node_modules/xtend/test.js +103 -0
  230. package/package.json +1 -1
  231. package/dist/client/assets/agent-detail-BS4g93cA.js +0 -2
  232. package/dist/client/assets/agents-BuWI7PBX.js +0 -1
  233. package/dist/client/assets/ai-providers-logos-W57Qm-EN.js +0 -1
  234. package/dist/client/assets/automation-detail-DNo-sbc_.js +0 -1
  235. package/dist/client/assets/automations-CCXftgU_.js +0 -1
  236. package/dist/client/assets/circle-alert-DCE_cWKa.js +0 -1
  237. package/dist/client/assets/connect-Cak7aHsQ.js +0 -1
  238. package/dist/client/assets/connection-detail-ZRvu6X4P.js +0 -1
  239. package/dist/client/assets/connections-Bi0oPT3Y.js +0 -1
  240. package/dist/client/assets/constants-B4Swgi3d.js +0 -1
  241. package/dist/client/assets/dynamic-plugin-layout-b0Zt6Dxk.js +0 -1
  242. package/dist/client/assets/index-D5cL24p_.css +0 -1
  243. package/dist/client/assets/index-MKlLgXIW.js +0 -25
  244. package/dist/client/assets/index-X4FDee1r.js +0 -1
  245. package/dist/client/assets/layout-CA_pUlCy.js +0 -1
  246. package/dist/client/assets/mcp-server-detail-CTGb-hF0.js +0 -2
  247. package/dist/client/assets/members-CYtrIFR5.js +0 -3
  248. package/dist/client/assets/monitoring-dashboard-edit-6gWIXCOX.js +0 -1
  249. package/dist/client/assets/monitoring-gb_hJ2kW.js +0 -4
  250. package/dist/client/assets/org-ai-providers-BDwPbfg4.js +0 -1
  251. package/dist/client/assets/page-BrXIXidh.js +0 -1
  252. package/dist/client/assets/page-s-fs9Bly.js +0 -1
  253. package/dist/client/assets/plugins-DkI_FXfU.js +0 -1
  254. package/dist/client/assets/project-app-view-Boof680i.js +0 -1
  255. package/dist/client/assets/project-layout-CxwbtNi5.js +0 -1
  256. package/dist/client/assets/projects-list-DmvsbHJl.js +0 -1
  257. package/dist/client/assets/shell-layout-ZGvfzjfQ.js +0 -3
  258. package/dist/client/assets/tasks-zu-x8h5W.js +0 -1
  259. package/dist/client/assets/use-llm-BkLbMZPM.js +0 -1
  260. package/dist/client/assets/use-local-storage-CxC8ozOe.js +0 -1
  261. package/dist/client/assets/useInfiniteQuery-DEfXPFTs.js +0 -1
  262. package/dist/client/assets/useQuery-D2ShO4od.js +0 -1
  263. package/dist/client/assets/useSuspenseInfiniteQuery-CT40dICu.js +0 -1
  264. package/dist/client/assets/workflow-C4-p-dLU.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as Z,c as P,u as Be,j as t,y as gt,v as jt,K as Qe,O as ke,J as lt,e as He,B as Ie,c4 as Ze,at as vt,p as bt,E as Nt,g as yt,x as _t,q as Ct,t as St,b as wt,a as kt,w as Te}from"./index-BXUNq6d7.js";import{E as at}from"./empty-state-v8jdj56V.js";import{E as Tt,c as It,r as At,e as ct}from"./env-vars-editor-Bs6jziXp.js";import{a as Dt}from"./use-binding-CZ8osTa1.js";import{n as $t,u as Ot,S as Pt}from"./index-zJEaoyYS.js";import{u as Et,a as dt}from"./use-connection-lXrlfojY.js";import{u as qe,a as Mt}from"./constants-CDL9XClm.js";import{d as Vt}from"./use-mcp-tools-CwVNqTmj.js";import{b as Ut}from"./use-mcp-resources-DhBJVSsg.js";import{a as Lt}from"./use-mcp-prompts-DT9l3i02.js";import{b as et,c as Rt,d as Ft,e as zt,B as Bt,a as Ht}from"./breadcrumb-Dk9kRV2t.js";import{b as Wt,d as Xt,c as Gt,A as Kt,e as Qt,h as qt,a as Jt,f as Yt}from"./alert-dialog-DgTufZ_p.js";import{S as Zt,a as es,b as ts,c as ss,d as ns}from"./sheet-7nFLkS7G.js";import{F as W,b as X,c as q,d as L,f as J,e as os,a as rs}from"./form-BV3tSlED.js";import{I as Y}from"./input-BFH8rk50.js";import{i as is}from"./Loading01-Cbk1oNZ2.js";import{a as ls}from"./layout-B2GnF_Vp.js";import{c as as,B as cs,a as ds,C as ms}from"./monitoring-stats-row-Ds_uiyYJ.js";import{C as us,a as xs,b as fs}from"./chart-CEfru1MQ.js";import{b as ps}from"./use-virtual-mcp-CyoGC0aH.js";import{i as mt}from"./ChevronRight-Blv21S_7.js";import{t as ut}from"./Users03-FsZwQwZq.js";import{I as xt}from"./integration-icon-D6SJHU0f.js";import{c as hs,T as Re,a as gs,b as Fe}from"./tabs-Cif80TZ4.js";import{a as js}from"./Tool01-CUx5BAY-.js";import{g as Je}from"./types-DZ5M-eMJ.js";import{M as vs}from"./mcp-app-renderer-CNc9yMN5.js";import{C as bs}from"./collection-search-aJlY7LHs.js";import{T as Ns}from"./tools-list-BgmW-tI4.js";import{C as ys}from"./card-BSGld6G2.js";import{t as _s}from"./Settings01-BWkL3Bf9.js";import{U as Cs}from"./user-sbKkVV9F.js";import{f as Ss}from"./format-time-CMKyl-GC.js";import{B as ws}from"./badge-B-_hRtCy.js";import{D as ks,a as Ts,b as Is,c as tt}from"./dropdown-menu-CdjuOUR6.js";import{S as st,a as nt,b as ot,c as rt,d as H}from"./select-B-f7jgVG.js";import{i as As}from"./CheckCircle-DrGaevdP.js";import{t as Ds}from"./ChevronDown-DHeagNGb.js";import{n as $s}from"./Container-Ci_1Xm4L.js";import{s as ze}from"./Globe02-CyGtzZ8k.js";import{s as Os}from"./RefreshCcw01-B6R5Js1R.js";import{i as Ps}from"./Terminal-zNrinv6B.js";import{s as Es}from"./Trash01-C0891dQq.js";import{s as Ms}from"./XClose-BieEiV6P.js";import"./Plus-CqWob4tu.js";import"./binder-BEJ4wRzw.js";import"./File06-Dqc-K1-5.js";import"./Key01-Dq5b7fdA.js";import"./constants-DxY-8FrK.js";import"./registry-utils-CaVl1vKg.js";import"./extract-connection-data-Cyjq-Q5I.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-C24f0cqa.js";import"./index-BE93ZIdg.js";import"./index-CZ7yh8sQ.js";import"./ChevronUp-J7upZD3-.js";import"./index-DlhaGZnK.js";import"./select-virtual-mcp-YanYQUBn.js";import"./popover-BcyJids_.js";import"./tooltip-BGPUMzDS.js";import"./index-L6huQtcJ.js";import"./Check-7kB05ju_.js";import"./SearchMd-DJI6OMcD.js";import"./use-create-virtual-mcp-DK_WDS9Y.js";import"./use-collections-yY78nnLx.js";import"./useMutation-CkdHuTyE.js";import"./useQuery-Bmc4jnG2.js";import"./X-CeRZ6ROs.js";import"./label-DE7vX487.js";import"./index-rWegviRE.js";import"./collection-display-button-CuyLh-NC.js";import"./ArrowDown-BnnQhLmg.js";import"./ArrowUp-BuKX1RSZ.js";import"./Grid01-Dqz--q3o.js";import"./List-Cc_Ri6eQ.js";import"./collection-table-wrapper-CcbJTCba.js";import"./table-Bu98B5a-.js";import"./Eye-Cn6YseXl.js";import"./LayersTwo01-Li6JqY2K.js";import"./avatar-w6QMWHVj.js";import"./differenceInSeconds-NQ4PDo0z.js";const ft=({size:s=24,color:e="currentColor",...n})=>Z.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},Z.createElement("path",{d:"m12 21-.1-.15c-.695-1.042-1.042-1.563-1.5-1.94a4 4 0 0 0-1.378-.737C8.453 18 7.827 18 6.575 18H5.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2 16.48 2 15.92 2 14.8V6.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C3.52 3 4.08 3 5.2 3h.4c2.24 0 3.36 0 4.216.436a4 4 0 0 1 1.748 1.748C12 6.04 12 7.16 12 9.4M12 21V9.4M12 21l.1-.15c.695-1.042 1.042-1.563 1.5-1.94a3.999 3.999 0 0 1 1.378-.737C15.547 18 16.173 18 17.425 18H18.8c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 16.48 22 15.92 22 14.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 3 19.92 3 18.8 3h-.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C12 6.04 12 7.16 12 9.4"}));ft.displayName="BookOpen01";const Vs=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function Us(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 Ls={calls:{label:"Tool calls"},errors:{label:"Errors"}};function Rs(s){const e=P.c(3),{connectionId:n,orgId:r,timeframe:i}=s;let o;e[0]!==r?(o={connectionId:Mt,orgId:r},e[0]=r,e[1]=o):o=e[1];const c=qe(o),a=Us(i),{data:m}=jt({queryKey:Qe.connectionActivity(n,i,r),queryFn:async()=>{const x=await c.callTool({name:"MONITORING_LOGS_LIST",arguments:{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}});return x.structuredContent??x},staleTime:3e5}),d=as(m?.logs??[],a),u=d.data,f=d.totalCalls>0;let l;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Tool calls"}),e[2]=l):l=e[2],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:d.totalCalls.toLocaleString()}),l]}),d.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:d.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Errors"})]}),d.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(d.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Avg latency"})]})]}),f?t.jsxs("div",{children:[t.jsx(us,{config:Ls,className:"h-16 w-full",children:t.jsxs(cs,{data:u,barCategoryGap:"4%",children:[t.jsx(xs,{content:t.jsx(fs,{labelFormatter:zs}),cursor:{fill:"var(--muted)"}}),t.jsx(ds,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:u.map(Fs)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:u[u.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:"No activity in this period"})})]})}function Fs(s,e){return t.jsx(ms,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function zs(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function Bs(){const s=P.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 Hs(s){const e=P.c(13),{connectionId:n}=s,[r,i]=Z.useState("14d"),{org:o}=Be();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Activity"})}),e[0]=c):c=e[0];let a;e[1]!==r?(a=Vs.map(l=>t.jsx("button",{type:"button",onClick:()=>i(l.value),className:gt("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",r===l.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:l.label},l.value)),e[1]=r,e[2]=a):a=e[2];let m;e[3]!==a?(m=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[c,t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:a})]}),e[3]=a,e[4]=m):m=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Bs,{}),e[5]=d):d=e[5];let u;e[6]!==n||e[7]!==o.id||e[8]!==r?(u=t.jsx(Z.Suspense,{fallback:d,children:t.jsx(Rs,{connectionId:n,orgId:o.id,timeframe:r})}),e[6]=n,e[7]=o.id,e[8]=r,e[9]=u):u=e[9];let f;return e[10]!==m||e[11]!==u?(f=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[m,u]}),e[10]=m,e[11]=u,e[12]=f):f=e[12],f}function Ws(s){const e=P.c(14),{virtualMcp:n,org:r}=s;let i;e[0]!==r||e[1]!==n.id?(i={org:r,project:ke,agentId:n.id},e[0]=r,e[1]=n.id,e[2]=i):i=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(ut,{size:16}),e[3]=o):o=e[3];let c;e[4]!==n.icon||e[5]!==n.title?(c=t.jsx(xt,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:o}),e[4]=n.icon,e[5]=n.title,e[6]=c):c=e[6];let a;e[7]!==n.title?(a=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[7]=n.title,e[8]=a):a=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(mt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[9]=m):m=e[9];let d;return e[10]!==i||e[11]!==c||e[12]!==a?(d=t.jsxs(lt,{to:"/$org/$project/agents/$agentId/",params:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group",children:[c,a,m]}),e[10]=i,e[11]=c,e[12]=a,e[13]=d):d=e[13],d}function Xs(s){const e=P.c(7),{virtualMcps:n,org:r}=s;let i;if(e[0]!==r||e[1]!==n){let c;e[3]!==r?(c=a=>t.jsx(Ws,{virtualMcp:a,org:r},a.id),e[3]=r,e[4]=c):c=e[4],i=n.map(c),e[0]=r,e[1]=n,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:i})}),e[5]=i,e[6]=o):o=e[6],o}function Gs(s){const e=P.c(7),{connection:n}=s,{org:r}=Be();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 o=ps(i);if(!(o.length>0)){let d;return e[2]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(t.Fragment,{}),e[2]=d):d=e[2],d}let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=a):a=e[3];let m;return e[4]!==r.slug||e[5]!==o?(m=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[a,t.jsx("div",{className:"px-5 py-4",children:t.jsx(Xs,{virtualMcps:o,org:r.slug})})]}),e[4]=r.slug,e[5]=o,e[6]=m):m=e[6],m}function Ks(s){const e=P.c(27),{tools:n,connectionId:r,org:i}=s,o=He(),{org:c}=Be();let a;e[0]!==r||e[1]!==c.id?(a={connectionId:r,orgId:c.id},e[0]=r,e[1]=c.id,e[2]=a):a=e[2];const m=qe(a),[d,u]=Z.useState("");let f,l,x,g;if(e[3]!==m||e[4]!==r||e[5]!==o||e[6]!==i||e[7]!==d||e[8]!==n){const T=(n??[]).filter(Qs),y=d.toLowerCase().trim(),j=y?T.filter(h=>h.name.toLowerCase().includes(y)||h.description&&h.description.toLowerCase().includes(y)):T;let S;e[13]!==r||e[14]!==o||e[15]!==i?(S=h=>{o({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:i,project:ke,connectionId:r,collectionName:"tools",itemId:encodeURIComponent(h.name)}})},e[13]=r,e[14]=o,e[15]=i,e[16]=S):S=e[16];const I=S;x="flex flex-col h-full overflow-hidden";let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=h=>{h.key==="Escape"&&(u(""),h.target.blur())},e[17]=b):b=e[17],e[18]!==d?(g=t.jsx(bs,{value:d,onChange:u,placeholder:"Search apps...",onKeyDown:b}),e[18]=d,e[19]=g):g=e[19],f="flex-1 overflow-auto p-5",l=j.length===0?t.jsx(at,{image:null,title:d?"No apps found":"No apps available",description:d?"Try adjusting your search terms":"This connection doesn't have any tools with interactive UIs yet."}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:j.map(h=>{const A=Je(h._meta);return t.jsxs(ys,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>I(h),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(vs,{resourceURI:A,toolInfo:{tool:h},displayMode:"inline",minHeight:200,maxHeight:200,client:m})}),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:h.name}),t.jsx(Ns,{annotations:h.annotations,_meta:h._meta})]}),h.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:h.description})]})]},h.name)})}),e[3]=m,e[4]=r,e[5]=o,e[6]=i,e[7]=d,e[8]=n,e[9]=f,e[10]=l,e[11]=x,e[12]=g}else f=e[9],l=e[10],x=e[11],g=e[12];let N;e[20]!==f||e[21]!==l?(N=t.jsx("div",{className:f,children:l}),e[20]=f,e[21]=l,e[22]=N):N=e[22];let v;return e[23]!==x||e[24]!==g||e[25]!==N?(v=t.jsxs("div",{className:x,children:[g,N]}),e[23]=x,e[24]=g,e[25]=N,e[26]=v):v=e[26],v}function Qs(s){return!!Je(s._meta)}function pt(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=c=>c.charAt(0).toUpperCase()+c.slice(1),r=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),i=e.map(n),o=e[e.length-1];return i.length>=2&&o&&r.has(o)?[i.pop(),...i].join(" "):i.join(" ")}function Ke(s){const e=P.c(2),{label:n}=s;let r;return e[0]!==n?(r=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",n," available."]})}),e[0]=n,e[1]=r):r=e[1],r}function qs(s){const e=P.c(71),{tools:n,prompts:r,resources:i,connectionId:o,org:c}=s;let a;e[0]!==r?(a=r===void 0?[]:r,e[0]=r,e[1]=a):a=e[1];const m=a;let d;e[2]!==i?(d=i===void 0?[]:i,e[2]=i,e[3]=d):d=e[3];const u=d,f=He();let l;e[4]!==o||e[5]!==f||e[6]!==c?(l=function(V){!o||!c||f({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:c,project:ke,connectionId:o,collectionName:"tools",itemId:encodeURIComponent(V)}})},e[4]=o,e[5]=f,e[6]=c,e[7]=l):l=e[7];const x=l;let g,N,v,T,y,j,S,I,b,h,A,_;if(e[8]!==o||e[9]!==x||e[10]!==c||e[11]!==m.length||e[12]!==u.length||e[13]!==n){I=Symbol.for("react.early_return_sentinel");e:{const F=n.filter(en);let V;if(e[26]!==o||e[27]!==c||e[28]!==n?(V=o&&c&&n.some(Zs),e[26]=o,e[27]=c,e[28]=n,e[29]=V):V=e[29],v=V,n.length+m.length+u.length===0){let k;e[30]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:"Capabilities"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"No capabilities discovered yet. The connection may still be connecting."})]}),e[30]=k):k=e[30],I=k;break e}S="rounded-xl border border-border bg-card overflow-hidden",N=hs,T="tools",y="underline";let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(Re,{value:"tools",variant:"underline",children:"Tools"}),e[31]=K):K=e[31];let z;e[32]!==v?(z=v&&t.jsx(Re,{value:"apps",variant:"underline",children:"UI"}),e[32]=v,e[33]=z):z=e[33];let U,Q;e[34]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx(Re,{value:"prompts",variant:"underline",children:"Prompts"}),Q=t.jsx(Re,{value:"resources",variant:"underline",children:"Resources"}),e[34]=U,e[35]=Q):(U=e[34],Q=e[35]),e[36]!==z?(j=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(gs,{variant:"underline",className:"gap-1",children:[K,z,U,Q]})}),e[36]=z,e[37]=j):j=e[37],g=Fe,A="tools",_="h-auto",b="divide-y divide-border",h=F.length>0?F.map(k=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>x(k.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(js,{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:pt(k.name)}),k.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:k.description})]}),t.jsx(mt,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},k.name)):t.jsx(Ke,{label:"tools"})}e[8]=o,e[9]=x,e[10]=c,e[11]=m.length,e[12]=u.length,e[13]=n,e[14]=g,e[15]=N,e[16]=v,e[17]=T,e[18]=y,e[19]=j,e[20]=S,e[21]=I,e[22]=b,e[23]=h,e[24]=A,e[25]=_}else g=e[14],N=e[15],v=e[16],T=e[17],y=e[18],j=e[19],S=e[20],I=e[21],b=e[22],h=e[23],A=e[24],_=e[25];if(I!==Symbol.for("react.early_return_sentinel"))return I;let C;e[38]!==b||e[39]!==h?(C=t.jsx("div",{className:b,children:h}),e[38]=b,e[39]=h,e[40]=C):C=e[40];let $;e[41]!==g||e[42]!==C||e[43]!==A||e[44]!==_?($=t.jsx(g,{value:A,className:_,children:C}),e[41]=g,e[42]=C,e[43]=A,e[44]=_,e[45]=$):$=e[45];let p;e[46]!==o||e[47]!==v||e[48]!==c||e[49]!==n?(p=v&&t.jsx(Fe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(Ks,{tools:n,connectionId:o,org:c})}),e[46]=o,e[47]=v,e[48]=c,e[49]=n,e[50]=p):p=e[50];let O;e[51]!==m?(O=m.length>0?m.map(Ys):t.jsx(Ke,{label:"prompts"}),e[51]=m,e[52]=O):O=e[52];let D;e[53]!==O?(D=t.jsx(Fe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:O})}),e[53]=O,e[54]=D):D=e[54];let w;e[55]!==u?(w=u.length>0?u.map(Js):t.jsx(Ke,{label:"resources"}),e[55]=u,e[56]=w):w=e[56];let M;e[57]!==w?(M=t.jsx(Fe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:w})}),e[57]=w,e[58]=M):M=e[58];let R;e[59]!==N||e[60]!==T||e[61]!==y||e[62]!==j||e[63]!==$||e[64]!==p||e[65]!==D||e[66]!==M?(R=t.jsxs(N,{defaultValue:T,variant:y,children:[j,$,p,D,M]}),e[59]=N,e[60]=T,e[61]=y,e[62]=j,e[63]=$,e[64]=p,e[65]=D,e[66]=M,e[67]=R):R=e[67];let G;return e[68]!==S||e[69]!==R?(G=t.jsx("div",{className:S,children:R}),e[68]=S,e[69]=R,e[70]=G):G=e[70],G}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($t,{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 Ys(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(ft,{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:pt(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 Zs(s){return Je(s._meta)}function en(s){return!/^COLLECTION_/i.test(s.name)}function tn(s){const e=P.c(22),{connection:n,onOpenSettings:r,onDisconnect:i}=s;let o;e[0]!==n.icon||e[1]!==n.title?(o=t.jsx(xt,{icon:n.icon,name:n.title,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=o):o=e[2];let c;e[3]!==n.title?(c=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none",children:n.title})}),e[3]=n.title,e[4]=c):c=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let m;e[7]!==c||e[8]!==a?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,a]}),e[7]=c,e[8]=a,e[9]=m):m=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(_s,{size:15}),e[10]=d):d=e[10];let u;e[11]!==r?(u=t.jsx(Ie,{variant:"ghost",size:"icon",onClick:r,title:"Configure connection",className:"h-8 w-8 text-muted-foreground hover:text-foreground",children:d}),e[11]=r,e[12]=u):u=e[12];let f;e[13]!==i?(f=t.jsx(Ie,{variant:"outline",size:"sm",onClick:i,className:"text-destructive border-destructive/25 hover:bg-destructive/5 hover:text-destructive hover:border-destructive/40",children:"Disconnect"}),e[13]=i,e[14]=f):f=e[14];let l;e[15]!==u||e[16]!==f?(l=t.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u,f]}),e[15]=u,e[16]=f,e[17]=l):l=e[17];let x;return e[18]!==o||e[19]!==m||e[20]!==l?(x=t.jsxs("div",{className:"flex items-center gap-6 py-7 px-8 bg-background border-b border-border shrink-0",children:[o,m,l]}),e[18]=o,e[19]=m,e[20]=l,e[21]=x):x=e[21],x}function sn(s){const e=P.c(21),{connection:n,onOpenSettings:r}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Connection"}),e[0]=i):i=e[0];let o;e[1]!==r?(o=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[i,t.jsx("button",{type:"button",onClick:r,className:"text-xs text-muted-foreground hover:text-foreground underline underline-offset-2 transition-colors cursor-pointer",children:"Configure"})]}),e[1]=r,e[2]=o):o=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("span",{className:"text-xs text-muted-foreground",children:"Added by"}),e[3]=c):c=e[3];let a;e[4]!==n.created_by?(a=t.jsxs("div",{className:"flex items-center justify-between",children:[c,t.jsx(Cs,{id:n.created_by,size:"2xs"})]}),e[4]=n.created_by,e[5]=a):a=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"text-xs text-muted-foreground",children:"Updated"}),e[6]=m):m=e[6];let d;e[7]!==n.updated_at?(d=n.updated_at?Ss(new Date(n.updated_at)):"—",e[7]=n.updated_at,e[8]=d):d=e[8];let u;e[9]!==d?(u=t.jsxs("div",{className:"flex items-center justify-between",children:[m,t.jsx("span",{className:"text-xs text-foreground",children:d})]}),e[9]=d,e[10]=u):u=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("span",{className:"text-xs text-muted-foreground",children:"Protocol"}),e[11]=f):f=e[11];let l;e[12]!==n.connection_type?(l=t.jsxs("div",{className:"flex items-center justify-between",children:[f,t.jsx("span",{className:"text-xs font-mono text-foreground",children:n.connection_type})]}),e[12]=n.connection_type,e[13]=l):l=e[13];let x;e[14]!==a||e[15]!==u||e[16]!==l?(x=t.jsxs("div",{className:"px-5 py-4 flex flex-col gap-3",children:[a,u,l]}),e[14]=a,e[15]=u,e[16]=l,e[17]=x):x=e[17];let g;return e[18]!==x||e[19]!==o?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[o,x]}),e[18]=x,e[19]=o,e[20]=g):g=e[20],g}function nn({form:s,connection:e,hasOAuthToken:n,onReauthenticate:r,onRemoveOAuth:i}){const o=Ze({control:s.control,name:"ui_type"}),c=Ze({control:s.control,name:"connection_url"}),{stdioEnabled:a}=vt(),m=(()=>{if(typeof c!="string"||!c)return!1;try{const l=new URL(c);return l.hostname==="api.githubcopilot.com"&&l.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),d=a||e.connection_type==="STDIO",u=e.connection_type==="VIRTUAL",f=u?bt(e.connection_url):null;return u?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:"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(ut,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:"Virtual MCP"})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"This connection references a Virtual MCP. Tools and resources are aggregated dynamically from the Virtual MCP's underlying connections."})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Virtual MCP ID"}),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(W,{control:s.control,name:"ui_type",render:({field:l})=>t.jsxs(X,{className:"flex flex-col gap-3",children:[t.jsx(q,{className:"text-xs text-muted-foreground font-medium",children:"Connection"}),o!=="NPX"&&o!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(st,{value:l.value,onValueChange:l.onChange,children:[t.jsx(L,{children:t.jsxs(nt,{className:"h-10 w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ze,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(ot,{})]})}),t.jsxs(rt,{children:[t.jsx(H,{value:"HTTP",children:"HTTP"}),t.jsx(H,{value:"SSE",children:"SSE"}),t.jsx(H,{value:"Websocket",children:"Websocket"}),d&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:"NPX Package"}),t.jsx(H,{value:"STDIO",children:"Custom Command"})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(W,{control:s.control,name:"connection_url",render:({field:x})=>t.jsx(X,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(Y,{placeholder:"https://example.com/mcp",...x,value:x.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(st,{value:l.value,onValueChange:l.onChange,children:[t.jsx(L,{children:t.jsx(nt,{className:"h-10",children:t.jsx(ot,{})})}),t.jsxs(rt,{children:[t.jsx(H,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ze,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(H,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ze,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(H,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ze,{className:"w-4 h-4"}),"Websocket"]})}),d&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx($s,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(H,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ps,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(J,{})]})}),o==="NPX"&&t.jsx(W,{control:s.control,name:"npx_package",render:({field:l})=>t.jsxs(X,{className:"flex flex-col gap-3",children:[t.jsx(q,{className:"text-xs text-muted-foreground font-medium",children:"NPM Package"}),t.jsx(L,{children:t.jsx(Y,{placeholder:"@perplexity-ai/mcp-server",...l,value:l.value||"",className:"h-10 rounded-lg"})}),t.jsx(J,{})]})}),o==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(W,{control:s.control,name:"stdio_command",render:({field:l})=>t.jsxs(X,{className:"flex flex-col gap-3",children:[t.jsx(q,{className:"text-xs text-muted-foreground font-medium",children:"Command"}),t.jsx(L,{children:t.jsx(Y,{placeholder:"node, bun, python...",...l,value:l.value||"",className:"h-10 rounded-lg"})}),t.jsx(J,{})]})}),t.jsx(W,{control:s.control,name:"stdio_args",render:({field:l})=>t.jsxs(X,{className:"flex flex-col gap-3",children:[t.jsx(q,{className:"text-xs text-muted-foreground font-medium",children:"Arguments"}),t.jsx(L,{children:t.jsx(Y,{placeholder:"arg1 arg2 --flag value",...l,value:l.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated arguments"}),t.jsx(J,{})]})})]}),t.jsx(W,{control:s.control,name:"stdio_cwd",render:({field:l})=>t.jsxs(X,{className:"flex flex-col gap-3",children:[t.jsx(q,{className:"text-xs text-muted-foreground font-medium",children:"Working Directory"}),t.jsx(L,{children:t.jsx(Y,{placeholder:"/path/to/project (optional)",...l,value:l.value||"",className:"h-10 rounded-lg"})}),t.jsx(J,{})]})})]}),(o==="NPX"||o==="STDIO")&&t.jsx(W,{control:s.control,name:"env_vars",render:({field:l})=>t.jsxs(X,{className:"flex flex-col gap-3",children:[t.jsx(q,{className:"text-xs text-muted-foreground font-medium",children:"Environment Variables"}),t.jsx(L,{children:t.jsx(Tt,{value:l.value??[],onChange:l.onChange})}),t.jsx(J,{})]})}),o!=="NPX"&&o!=="STDIO"&&t.jsx(W,{control:s.control,name:"connection_token",render:({field:l})=>t.jsxs(X,{className:"flex flex-col gap-3",children:[t.jsx(q,{className:"text-xs text-muted-foreground font-medium",children:m?"GitHub Personal Access Token":"Token"}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(ks,{children:[t.jsx(Ts,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(ws,{variant:"success",className:"gap-1.5",children:[t.jsx(As,{size:12}),"Authenticated via OAuth",t.jsx(Ds,{size:12})]})})}),t.jsxs(Is,{align:"start",children:[t.jsxs(tt,{onClick:r,children:[t.jsx(Os,{size:16}),"Re-authenticate"]}),t.jsxs(tt,{variant:"destructive",onClick:i,children:[t.jsx(Es,{size:16}),"Remove OAuth"]})]})]})}):e.connection_token&&l.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:()=>l.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:"Clear and replace token",children:t.jsx(Ms,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{children:t.jsx(Y,{type:"password",placeholder:m?"Paste your GitHub PAT":"Enter access token...",...l,value:l.value||"",className:"h-10 rounded-lg"})}),m&&t.jsxs(os,{children:["Create a PAT at"," ",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(J,{})]})})]})}function on(s){return s.command==="npx"}function rn(s){return s.args?.find(e=>!e.startsWith("-"))??""}function ln(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function an(s,e){const n={command:"npx",args:["-y",s]},r=ct(e);return Object.keys(r).length>0&&(n.envVars=r),n}function cn(s,e,n,r){const i={command:s};e.trim()&&(i.args=e.trim().split(/\s+/)),n?.trim()&&(i.cwd=n.trim());const o=ct(r);return Object.keys(o).length>0&&(i.envVars=o),i}function it(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"&&wt(s.connection_headers)){const r=s.connection_headers,i=At(r.envVars);if(on(r)){const c=rn(r);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:c,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:i}}const o=ln(r);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:o.command,stdio_args:o.args,stdio_cwd:o.cwd,env_vars:i}}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 dn(s){let e,n=null,r=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=an(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=cn(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",r=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...r&&{connection_token:r},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function mn(s){const e=P.c(129),{connection:n,connectionId:r,org:i,onUpdate:o,isUpdating:c,tools:a,prompts:m,resources:d}=s;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={from:"/$org/$project/mcps/$connectionId"},e[0]=u):u=e[0];const f=He(u),l=_t(),x=dt(),[g,N]=Z.useState(!1),[v,T]=Z.useState(!1);let y;e[1]!==r?(y={connectionId:r},e[1]=r,e[2]=y):y=e[2];const j=Ot(y),I=n?.connection_type==="VIRTUAL"||j.isAuthenticated;let b;e[3]!==n?(b={connections:[n],binding:"MCP"},e[3]=n,e[4]=b):b=e[4];const A=Dt(b).length>0;let _;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=Ct(It),e[5]=_):_=e[5];let C;e[6]!==n?(C=it(n),e[6]=n,e[7]=C):C=e[7];let $;e[8]!==C?($={resolver:_,values:C},e[8]=C,e[9]=$):$=e[9];const p=St($),O=p.formState.isDirty;let D;e[10]!==p||e[11]!==o?(D=async()=>{if(!await p.trigger())return;const E=p.getValues(),we=dn(E);await o(we),p.reset(E)},e[10]=p,e[11]=o,e[12]=D):D=e[12];const w=D;let M;e[13]!==n||e[14]!==p?(M=()=>{p.reset(it(n))},e[13]=n,e[14]=p,e[15]=M):M=e[15];const R=M;let G;e[16]!==n.id||e[17]!==x.update||e[18]!==l?(G=async()=>{const{token:B,tokenInfo:E,error:we}=await kt({connectionId:n.id});if(we||!B){Te.error(`Authentication failed: ${we}`);return}if(E)try{const Le=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:E.accessToken,refreshToken:E.refreshToken,expiresIn:E.expiresIn,scope:E.scope,clientId:E.clientId,clientSecret:E.clientSecret,tokenEndpoint:E.tokenEndpoint})});if(!Le.ok)console.error("Failed to save OAuth token:",await Le.text()),await x.update.mutateAsync({id:n.id,data:{connection_token:B}});else try{await x.update.mutateAsync({id:n.id,data:{}})}catch(Ye){console.warn("Failed to refresh connection tools after OAuth:",Ye)}}catch(Le){console.error("Error saving OAuth token:",Le),await x.update.mutateAsync({id:n.id,data:{connection_token:B}})}else await x.update.mutateAsync({id:n.id,data:{connection_token:B}});const ht=new URL(`/mcp/${n.id}`,window.location.origin);await l.invalidateQueries({queryKey:Qe.isMCPAuthenticated(ht.href,null)}),Te.success("Authentication successful")},e[16]=n.id,e[17]=x.update,e[18]=l,e[19]=G):G=e[19];const F=G;let V;e[20]!==n.id||e[21]!==l?(V=async()=>{try{const B=await fetch(`/api/connections/${n.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!B.ok){const we=await B.text();Te.error(`Failed to remove OAuth: ${we}`);return}const E=new URL(`/mcp/${n.id}`,window.location.origin);await l.invalidateQueries({queryKey:Qe.isMCPAuthenticated(E.href,null)}),Te.success("OAuth removed. You can now re-authenticate with a different account.")}catch(B){console.error("Error removing OAuth token:",B),Te.error("Failed to remove OAuth")}},e[20]=n.id,e[21]=l,e[22]=V):V=e[22];const Ae=V;let K;e[23]!==n.id||e[24]!==x.delete||e[25]!==f||e[26]!==i?(K=async()=>{await x.delete.mutateAsync(n.id),f({to:"/$org/$project/mcps",params:{org:i,project:ke}})},e[23]=n.id,e[24]=x.delete,e[25]=f,e[26]=i,e[27]=K):K=e[27];const z=K;let U;e[28]!==i?(U=t.jsx(et,{children:t.jsx(Ft,{asChild:!0,children:t.jsx(lt,{to:"/$org/$project/mcps",params:{org:i,project:ke},children:"Connections"})})}),e[28]=i,e[29]=U):U=e[29];let Q;e[30]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(zt,{}),e[30]=Q):Q=e[30];let k;e[31]!==n.title?(k=t.jsx(et,{children:t.jsx(Rt,{children:n.title})}),e[31]=n.title,e[32]=k):k=e[32];let De;e[33]!==U||e[34]!==k?(De=t.jsx(Bt,{children:t.jsxs(Ht,{children:[U,Q,k]})}),e[33]=U,e[34]=k,e[35]=De):De=e[35];const We=De;let $e;e[36]===Symbol.for("react.memo_cache_sentinel")?($e=t.jsx(Gt,{children:"Disconnect connection?"}),e[36]=$e):$e=e[36];let ee;e[37]!==n.title?(ee=t.jsxs(Wt,{children:[$e,t.jsxs(Xt,{children:["This will permanently remove"," ",t.jsx("span",{className:"font-medium text-foreground",children:n.title}),". This action cannot be undone."]})]}),e[37]=n.title,e[38]=ee):ee=e[38];let Oe;e[39]===Symbol.for("react.memo_cache_sentinel")?(Oe=t.jsx(Kt,{children:"Cancel"}),e[39]=Oe):Oe=e[39];let te;e[40]!==z?(te=t.jsxs(Qt,{children:[Oe,t.jsx(qt,{onClick:z,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Disconnect"})]}),e[40]=z,e[41]=te):te=e[41];let se;e[42]!==ee||e[43]!==te?(se=t.jsxs(Jt,{children:[ee,te]}),e[42]=ee,e[43]=te,e[44]=se):se=e[44];let ne;e[45]!==v||e[46]!==se?(ne=t.jsx(Yt,{open:v,onOpenChange:T,children:se}),e[45]=v,e[46]=se,e[47]=ne):ne=e[47];let oe;e[48]!==n.title?(oe=t.jsx(Zt,{className:"text-base",children:n.title}),e[48]=n.title,e[49]=oe):oe=e[49];let Pe;e[50]===Symbol.for("react.memo_cache_sentinel")?(Pe=t.jsx(es,{className:"text-xs",children:"Update URL, authentication, and other settings"}),e[50]=Pe):Pe=e[50];let re;e[51]!==oe?(re=t.jsxs(ts,{className:"px-6 py-4 border-b border-border shrink-0",children:[oe,Pe]}),e[51]=oe,e[52]=re):re=e[52];let ie;e[53]!==p.control?(ie=t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(W,{control:p.control,name:"title",render:xn}),t.jsx(W,{control:p.control,name:"description",render:un})]}),e[53]=p.control,e[54]=ie):ie=e[54];let le;e[55]!==j.hasOAuthToken||e[56]!==n||e[57]!==p||e[58]!==F||e[59]!==Ae?(le=t.jsx(nn,{form:p,connection:n,hasOAuthToken:j.hasOAuthToken,onReauthenticate:F,onRemoveOAuth:Ae}),e[55]=j.hasOAuthToken,e[56]=n,e[57]=p,e[58]=F,e[59]=Ae,e[60]=le):le=e[60];let ae;e[61]!==j.isServerError||e[62]!==j.supportsOAuth||e[63]!==n||e[64]!==p||e[65]!==F||e[66]!==A||e[67]!==I?(ae=t.jsx(Pt,{connection:n,form:p,hasMcpBinding:A,isMCPAuthenticated:I,supportsOAuth:j.supportsOAuth,isServerError:j.isServerError,onAuthenticate:F,onViewReadme:void 0}),e[61]=j.isServerError,e[62]=j.supportsOAuth,e[63]=n,e[64]=p,e[65]=F,e[66]=A,e[67]=I,e[68]=ae):ae=e[68];let ce;e[69]!==ie||e[70]!==le||e[71]!==ae?(ce=t.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5 flex flex-col gap-6",children:[ie,le,ae]}),e[69]=ie,e[70]=le,e[71]=ae,e[72]=ce):ce=e[72];const Xe=!O||c,Ge=c?"Saving…":"Save changes";let de;e[73]!==w||e[74]!==Xe||e[75]!==Ge?(de=t.jsx(Ie,{onClick:w,disabled:Xe,className:"flex-1",children:Ge}),e[73]=w,e[74]=Xe,e[75]=Ge,e[76]=de):de=e[76];let me;e[77]!==R||e[78]!==O?(me=O&&t.jsx(Ie,{variant:"outline",onClick:R,children:"Undo"}),e[77]=R,e[78]=O,e[79]=me):me=e[79];let ue;e[80]!==de||e[81]!==me?(ue=t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[de,me]}),e[80]=de,e[81]=me,e[82]=ue):ue=e[82];let xe;e[83]!==p||e[84]!==ce||e[85]!==ue?(xe=t.jsxs(rs,{...p,children:[ce,ue]}),e[83]=p,e[84]=ce,e[85]=ue,e[86]=xe):xe=e[86];let fe;e[87]!==re||e[88]!==xe?(fe=t.jsxs(ss,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[re,xe]}),e[87]=re,e[88]=xe,e[89]=fe):fe=e[89];let pe;e[90]!==g||e[91]!==fe?(pe=t.jsx(ns,{open:g,onOpenChange:N,children:fe}),e[90]=g,e[91]=fe,e[92]=pe):pe=e[92];let Ee,Me;e[93]===Symbol.for("react.memo_cache_sentinel")?(Ee=()=>N(!0),Me=()=>T(!0),e[93]=Ee,e[94]=Me):(Ee=e[93],Me=e[94]);let he;e[95]!==n?(he=t.jsx(tn,{connection:n,onOpenSettings:Ee,onDisconnect:Me}),e[95]=n,e[96]=he):he=e[96];let ge;e[97]!==r?(ge=t.jsx(Hs,{connectionId:r}),e[97]=r,e[98]=ge):ge=e[98];let je;e[99]!==r||e[100]!==i||e[101]!==m||e[102]!==d||e[103]!==a?(je=t.jsx(qs,{tools:a,prompts:m,resources:d,connectionId:r,org:i}),e[99]=r,e[100]=i,e[101]=m,e[102]=d,e[103]=a,e[104]=je):je=e[104];let ve;e[105]!==ge||e[106]!==je?(ve=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-5",children:[ge,je]}),e[105]=ge,e[106]=je,e[107]=ve):ve=e[107];let be;e[108]!==n?(be=t.jsx(Gs,{connection:n}),e[108]=n,e[109]=be):be=e[109];let Ve;e[110]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>N(!0),e[110]=Ve):Ve=e[110];let Ne;e[111]!==n?(Ne=t.jsx(sn,{connection:n,onOpenSettings:Ve}),e[111]=n,e[112]=Ne):Ne=e[112];let ye;e[113]!==be||e[114]!==Ne?(ye=t.jsxs("div",{className:"w-72 shrink-0 flex flex-col gap-5",children:[be,Ne]}),e[113]=be,e[114]=Ne,e[115]=ye):ye=e[115];let _e;e[116]!==ve||e[117]!==ye?(_e=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsxs("div",{className:"flex gap-6 p-6",children:[ve,ye]})}),e[116]=ve,e[117]=ye,e[118]=_e):_e=e[118];let Ce;e[119]!==he||e[120]!==_e?(Ce=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[he,_e]}),e[119]=he,e[120]=_e,e[121]=Ce):Ce=e[121];let Se;e[122]!==We||e[123]!==Ce?(Se=t.jsx(ls,{breadcrumb:We,children:Ce}),e[122]=We,e[123]=Ce,e[124]=Se):Se=e[124];let Ue;return e[125]!==ne||e[126]!==pe||e[127]!==Se?(Ue=t.jsxs(t.Fragment,{children:[ne,pe,Se]}),e[125]=ne,e[126]=pe,e[127]=Se,e[128]=Ue):Ue=e[128],Ue}function un(s){const{field:e}=s;return t.jsxs(X,{children:[t.jsx(q,{children:"Description"}),t.jsx(L,{children:t.jsx(Y,{...e,value:e.value||""})}),t.jsx(J,{})]})}function xn(s){const{field:e}=s;return t.jsxs(X,{children:[t.jsx(q,{children:"Name"}),t.jsx(L,{children:t.jsx(Y,{...e})}),t.jsx(J,{})]})}function fn(){const s=P.c(39);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/$org/$project/mcps/$connectionId"},s[0]=e):e=s[0];const n=He(e);let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/$project/mcps/$connectionId"},s[1]=r):r=s[1];const{connectionId:i,org:o}=yt(r),{org:c}=Be(),a=Et(i),m=dt();let d;s[2]!==i||s[3]!==c.id?(d={connectionId:i,orgId:c.id},s[2]=i,s[3]=c.id,s[4]=d):d=s[4];const u=qe(d),l=!(a?.connection_type==="VIRTUAL")&&a?.tools&&a.tools.length>0,x=!l;let g;s[5]!==u||s[6]!==x?(g={client:u,enabled:x},s[5]=u,s[6]=x,s[7]=g):g=s[7];const{data:N}=Vt(g);let v;s[8]!==a||s[9]!==l||s[10]!==N?.tools?(v=l?a.tools??[]:(N?.tools??[]).map(gn),s[8]=a,s[9]=l,s[10]=N?.tools,s[11]=v):v=s[11];const T=v;let y;s[12]!==u?(y={client:u},s[12]=u,s[13]=y):y=s[13];const{data:j}=Lt(y);let S;s[14]!==u?(S={client:u},s[14]=u,s[15]=S):S=s[15];const{data:I}=Ut(S);let b;s[16]!==j?.prompts?(b=j?.prompts??[],s[16]=j?.prompts,s[17]=b):b=s[17];let h;s[18]!==b?(h=b.map(hn),s[18]=b,s[19]=h):h=s[19];const A=h;let _;s[20]!==I?.resources?(_=I?.resources??[],s[20]=I?.resources,s[21]=_):_=s[21];let C;s[22]!==_?(C=_.map(pn),s[22]=_,s[23]=C):C=s[23];const $=C;let p;s[24]!==m.update||s[25]!==i?(p=async w=>{await m.update.mutateAsync({id:i,data:w})},s[24]=m.update,s[25]=i,s[26]=p):p=s[26];const O=p;if(!a){let w;return s[27]!==n||s[28]!==o?(w=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(at,{title:"Connection not found",description:"This connection may have been deleted or you may not have access.",actions:t.jsx(Ie,{variant:"outline",onClick:()=>n({to:"/$org/$project/mcps",params:{org:o,project:ke}}),children:"Back to connections"})})}),s[27]=n,s[28]=o,s[29]=w):w=s[29],w}let D;return s[30]!==m.update.isPending||s[31]!==a||s[32]!==i||s[33]!==O||s[34]!==o||s[35]!==A||s[36]!==$||s[37]!==T?(D=t.jsx(mn,{org:o,connection:a,connectionId:i,onUpdate:O,isUpdating:m.update.isPending,tools:T,prompts:A,resources:$}),s[30]=m.update.isPending,s[31]=a,s[32]=i,s[33]=O,s[34]=o,s[35]=A,s[36]=$,s[37]=T,s[38]=D):D=s[38],D}function pn(s){return{name:s.name,description:s.description,uri:s.uri}}function hn(s){return{name:s.name,description:s.description}}function gn(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,annotations:s.annotations,_meta:s._meta}}function jn(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Nt,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(is,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(fn,{})})}),s[0]=e):e=s[0],e}function Ko(){const s=P.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(jn,{}),s[0]=e):e=s[0],e}export{Ko as default};
@@ -1 +1 @@
1
- import{r as c,c as n,j as r}from"./index-DsOJvxnb.js";import{B as a}from"./badge-CAg946Xk.js";import{i as l}from"./AlertCircle-De9oqjty.js";import{i as m}from"./CheckCircle-DiRi76qb.js";const u=({size:s=24,color:e="currentColor",...o})=>c.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},c.createElement("path",{d:"m7.5 12 3 3 6-6M7.8 21h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21Z"}));u.displayName="CheckSquare";function x(s){const e=n.c(3),{status:o}=s;if(o==="active"){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsxs(a,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[r.jsx(m,{size:12}),"Active"]}),e[0]=t):t=e[0],t}if(o==="error"){let t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsxs(a,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[r.jsx(l,{size:12}),"Error"]}),e[1]=t):t=e[1],t}let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(a,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),e[2]=i):i=e[2],i}export{x as C,u as i};
1
+ import{r as c,c as n,j as r}from"./index-BXUNq6d7.js";import{B as a}from"./badge-B-_hRtCy.js";import{i as l}from"./AlertCircle-CnfwZdxb.js";import{i as m}from"./CheckCircle-DrGaevdP.js";const u=({size:s=24,color:e="currentColor",...o})=>c.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},c.createElement("path",{d:"m7.5 12 3 3 6-6M7.8 21h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21Z"}));u.displayName="CheckSquare";function x(s){const e=n.c(3),{status:o}=s;if(o==="active"){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsxs(a,{variant:"success",className:"gap-1.5 text-success border-success/40 bg-background",children:[r.jsx(m,{size:12}),"Active"]}),e[0]=t):t=e[0],t}if(o==="error"){let t;return e[1]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsxs(a,{variant:"outline",className:"gap-1.5 text-destructive border-destructive/40 bg-background",children:[r.jsx(l,{size:12}),"Error"]}),e[1]=t):t=e[1],t}let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(a,{variant:"outline",className:"text-muted-foreground",children:"Inactive"}),e[2]=i):i=e[2],i}export{x as C,u as i};
@@ -0,0 +1 @@
1
+ import{c as de,u as rt,e as ct,j as t,O as re,B as z,E as wt,r as Y,x as Dt,d as It,f as At,at as Pt,aw as $t,t as Et,q as Lt,b as Ot,y as he,w as Q}from"./index-BXUNq6d7.js";import{g as zt}from"./generate-id-Dyweu44Y.js";import{C as Vt}from"./collection-display-button-CuyLh-NC.js";import{C as Ft}from"./collection-search-aJlY7LHs.js";import{C as Ut}from"./collection-tabs-B2Xeppc1.js";import{C as be}from"./connection-card-iA_b7WBI.js";import{I as ge}from"./integration-icon-D6SJHU0f.js";import{f as lt}from"./format-time-CMKyl-GC.js";import{D as Fe,b as Ue,c as Me,d as Be,a as at,e as dt}from"./dialog-DxTRqiug.js";import{i as Ye}from"./ChevronRight-Blv21S_7.js";import{n as ae}from"./Container-Ci_1Xm4L.js";import{s as mt}from"./Plus-CqWob4tu.js";import{a as Je}from"./Tool01-CUx5BAY-.js";import{i as Mt,C as Bt}from"./connection-status-BddpcBJZ.js";import{E as Rt}from"./empty-state-v8jdj56V.js";import{a as Ht,P as xe}from"./index-rWegviRE.js";import{U as Xt}from"./user-sbKkVV9F.js";import{u as Kt}from"./use-binding-CZ8osTa1.js";import{u as Wt}from"./use-infinite-scroll-C-TK62Eo.js";import{u as Gt}from"./use-list-state-D6LU1koz.js";import{u as qt}from"./use-store-discovery-C9fJhQ4Y.js";import{f as Qt,g as Ze}from"./registry-utils-CaVl1vKg.js";import{s as Yt}from"./slugify-CEUa2lfQ.js";import{f as Ie,a as Ae,b as Pe,c as $e,d as Ee,e as Le,A as Oe,h as ze}from"./alert-dialog-DgTufZ_p.js";import{B as Ve}from"./badge-B-_hRtCy.js";import{B as Jt,a as Zt,b as en,c as tn}from"./breadcrumb-Dk9kRV2t.js";import{C as pt}from"./checkbox-COsQJsO9.js";import{D as et,a as tt,b as nt,c as Ce}from"./dropdown-menu-CdjuOUR6.js";import{a as nn,F as Z,b as ee,c as te,d as ne,f as se}from"./form-BV3tSlED.js";import{I as le}from"./input-BFH8rk50.js";import{S as sn,a as on,b as rn,c as cn,d as fe}from"./select-B-f7jgVG.js";import{T as ln}from"./textarea-DPLd5P1K.js";import{a as an,b as st}from"./use-connection-lXrlfojY.js";import{u as dn,a as mn}from"./constants-CDL9XClm.js";import{b as pn}from"./use-virtual-mcp-CyoGC0aH.js";import{i as un}from"./CheckVerified02-DmV5dzDn.js";import{t as xn}from"./ChevronDown-DHeagNGb.js";import{i as fn}from"./DotsVertical-7N_NB6wt.js";import{s as hn}from"./Eye-Cn6YseXl.js";import{s as De}from"./Globe02-CyGtzZ8k.js";import{i as ut}from"./Loading01-Cbk1oNZ2.js";import{i as gn}from"./Terminal-zNrinv6B.js";import{s as xt}from"./Trash01-C0891dQq.js";import{s as jn}from"./XClose-BieEiV6P.js";import{r as yn,E as vn,c as Cn,e as ft}from"./env-vars-editor-Bs6jziXp.js";import"./ArrowDown-BnnQhLmg.js";import"./ArrowUp-BuKX1RSZ.js";import"./Check-7kB05ju_.js";import"./Grid01-Dqz--q3o.js";import"./List-Cc_Ri6eQ.js";import"./tooltip-BGPUMzDS.js";import"./index-L6huQtcJ.js";import"./SearchMd-DJI6OMcD.js";import"./card-BSGld6G2.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./X-CeRZ6ROs.js";import"./AlertCircle-CnfwZdxb.js";import"./CheckCircle-DrGaevdP.js";import"./useQuery-Bmc4jnG2.js";import"./useMutation-CkdHuTyE.js";import"./avatar-w6QMWHVj.js";import"./binder-BEJ4wRzw.js";import"./use-view-mode-0w9n1sJ-.js";import"./use-mobile-B0lEbMk3.js";import"./useInfiniteQuery-BlrmUHYA.js";import"./infiniteQueryObserver-DXFe0xIV.js";import"./label-DE7vX487.js";import"./ChevronUp-J7upZD3-.js";import"./use-collections-yY78nnLx.js";function Nn(i){const e=de.c(63),{open:s,onClose:r,appName:c,appIcon:l,appDescription:m,instances:g}=i,{org:N}=rt(),j=ct(),d=N.slug;let x;e[0]!==j||e[1]!==r||e[2]!==d?(x=function(V){j({to:"/$org/$project/mcps/$connectionId",params:{org:d,project:re,connectionId:V}}),r()},e[0]=j,e[1]=r,e[2]=d,e[3]=x):x=e[3];const v=x;let f;e[4]!==c||e[5]!==j||e[6]!==r||e[7]!==d?(f=function(){j({to:"/$org/$project/mcps",params:{org:d,project:re},search:{install:c}}),r()},e[4]=c,e[5]=j,e[6]=r,e[7]=d,e[8]=f):f=e[8];const h=f;let y;if(e[9]!==g){const w=new Set;y=[];for(const V of g)for(const W of V.tools??[])w.has(W.name)||(w.add(W.name),y.push({name:W.name,description:W.description,connectionId:V.id}));e[9]=g,e[10]=y}else y=e[10];let k;e[11]!==j||e[12]!==r||e[13]!==d?(k=function(V,W){j({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:d,project:re,connectionId:W,collectionName:"tools",itemId:encodeURIComponent(V)}}),r()},e[11]=j,e[12]=r,e[13]=d,e[14]=k):k=e[14];const T=k;let C;e[15]!==r?(C=w=>!w&&r(),e[15]=r,e[16]=C):C=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(ae,{}),e[17]=b):b=e[17];let D;e[18]!==l||e[19]!==c?(D=t.jsx(ge,{icon:l,name:c,size:"md",className:"shrink-0 shadow-sm mt-0.5",fallbackIcon:b}),e[18]=l,e[19]=c,e[20]=D):D=e[20];let I;e[21]!==c?(I=t.jsx(Fe,{className:"text-base font-semibold leading-snug",children:c}),e[21]=c,e[22]=I):I=e[22];let $;e[23]!==m?($=m&&t.jsx("p",{className:"text-sm text-muted-foreground mt-0.5 line-clamp-2",children:m}),e[23]=m,e[24]=$):$=e[24];let O;e[25]!==I||e[26]!==$?(O=t.jsxs("div",{className:"min-w-0",children:[I,$]}),e[25]=I,e[26]=$,e[27]=O):O=e[27];let R;e[28]!==D||e[29]!==O?(R=t.jsx(Ue,{className:"px-6 pt-6 pb-5 shrink-0",children:t.jsxs("div",{className:"flex items-start gap-4",children:[D,O]})}),e[28]=D,e[29]=O,e[30]=R):R=e[30];const P=g.length!==1?"s":"";let F;e[31]!==P?(F=t.jsxs("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Connection",P]}),e[31]=P,e[32]=F):F=e[32];let J;e[33]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsx(mt,{size:14}),e[33]=J):J=e[33];let q;e[34]!==h?(q=t.jsxs(z,{variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:h,children:[J,"Add connection"]}),e[34]=h,e[35]=q):q=e[35];let U;e[36]!==F||e[37]!==q?(U=t.jsxs("div",{className:"flex items-center justify-between px-6 py-3",children:[F,q]}),e[36]=F,e[37]=q,e[38]=U):U=e[38];let X;if(e[39]!==g||e[40]!==v){let w;e[42]!==v?(w=V=>t.jsxs("button",{type:"button",className:"w-full flex items-center gap-3 px-6 py-3 hover:bg-muted/40 transition-colors text-left cursor-pointer",onClick:()=>v(V.id),children:[t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:V.title}),(V.updated_at||V.created_at)&&t.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Last updated"," ",lt(new Date(V.updated_at??V.created_at))]})]}),t.jsx(Ye,{size:16,className:"text-muted-foreground shrink-0"})]},V.id),e[42]=v,e[43]=w):w=e[43],X=g.map(w),e[39]=g,e[40]=v,e[41]=X}else X=e[41];let E;e[44]!==X?(E=t.jsx("div",{className:"pb-2",children:X}),e[44]=X,e[45]=E):E=e[45];let M;e[46]!==U||e[47]!==E?(M=t.jsxs("div",{children:[U,E]}),e[46]=U,e[47]=E,e[48]=M):M=e[48];let _;e[49]!==l||e[50]!==T||e[51]!==y?(_=y.length>0&&t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2 px-6 py-3",children:[t.jsx(Je,{size:14,className:"text-muted-foreground"}),t.jsxs("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Actions (",y.length,")"]})]}),t.jsx("div",{className:"pb-2",children:y.map(w=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-6 py-2.5 hover:bg-muted/40 transition-colors text-left cursor-pointer",onClick:()=>T(w.name,w.connectionId),children:[t.jsx(ge,{icon:l,name:w.name,size:"xs",className:"shrink-0 mt-0.5",fallbackIcon:t.jsx(Je,{size:12})}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:w.name}),w.description&&t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:w.description})]}),t.jsx(Ye,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},w.name))})]}),e[49]=l,e[50]=T,e[51]=y,e[52]=_):_=e[52];let K;e[53]!==M||e[54]!==_?(K=t.jsxs("div",{className:"flex-1 overflow-y-auto divide-y divide-border",children:[M,_]}),e[53]=M,e[54]=_,e[55]=K):K=e[55];let ie;e[56]!==R||e[57]!==K?(ie=t.jsxs(Me,{className:"sm:max-w-xl p-0 gap-0 overflow-hidden flex flex-col max-h-[80vh]",children:[R,K]}),e[56]=R,e[57]=K,e[58]=ie):ie=e[58];let ce;return e[59]!==s||e[60]!==ie||e[61]!==C?(ce=t.jsx(Be,{open:s,onOpenChange:C,children:ie}),e[59]=s,e[60]=ie,e[61]=C,e[62]=ce):ce=e[62],ce}function ot(i){return i.title.trim().replace(/\s+\(\d+\)$/,"")}function bn(i){const e=new Map;for(const c of i){if(c.connection_type==="VIRTUAL")continue;const l=ot(c),m=e.get(l);m?m.push(c):e.set(l,[c])}const s=[],r=new Set;for(const c of i){if(c.connection_type==="VIRTUAL")continue;const l=ot(c);if(r.has(l))continue;r.add(l);const m=e.get(l),g=m[0];m.length===1?s.push({type:"single",connection:g}):s.push({type:"group",key:l,icon:g.icon,title:g.app_name?g.title.replace(/\s*\(\d+\)\s*$/,""):g.title,connections:m})}return s}function Sn(i){const e=new Set,s=[];for(const r of i)r.created_by&&!e.has(r.created_by)&&(e.add(r.created_by),s.push(r.created_by));return s}function Se(i){const e=i.trim();if(!e)return"";try{const s=new URL(e),r=s.pathname.length>1?s.pathname.replace(/\/+$/,""):s.pathname;return`${s.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function _n(i){const e=i.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const s=e[0]?.toLowerCase();if(s!=="npx"&&s!=="bunx")return null;const c=e.slice(1).find(l=>!l.startsWith("-"));return c?{packageName:c}:null}function Ne(i){const{uiType:e}=i,s=Se(i.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&s===Se("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=(i.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function it(i){if(i.registryItems.length===0||i.uiType!=="HTTP"&&i.uiType!=="SSE"&&i.uiType!=="Websocket")return null;const e=Se(i.connectionUrl??"");if(!e)return null;const s=i.registryItems.find(l=>(l.server?.remotes??[]).some(g=>Se(g.url??"")===e));if(!s)return null;const r=s.title||s.name||s.server?.title||s.server?.name||"",c=s.server?.description||s.description||s.summary||null;return r?{id:"registry",title:r,description:c}:null}function kn(i,e){const s={command:"npx",args:["-y",i]},r=ft(e);return Object.keys(r).length>0&&(s.envVars=r),s}function Tn(i,e,s,r){const c={command:i};e.trim()&&(c.args=e.trim().split(/\s+/)),s?.trim()&&(c.cwd=s.trim());const l=ft(r);return Object.keys(l).length>0&&(c.envVars=l),c}function wn(i){return i.command==="npx"}function Dn(i){return i.args?.find(e=>!e.startsWith("-"))??""}function In(i){return{command:i.command,args:i.args?.join(" ")??"",cwd:i.cwd??""}}function An(i,e){switch(e.type){case"edit":return{mode:"editing",connection:e.connection};case"delete":return{mode:"deleting",connection:e.connection};case"force-delete":return{mode:"force-deleting",connection:e.connection,agentNames:e.agentNames};case"close":return{mode:"idle"}}}function Pn(i){const e=de.c(74),{group:s,onOpen:r,selectionMode:c,selectedIds:l,onToggleSelect:m}=i;let g;if(e[0]!==s.connections||e[1]!==l){let P;e[3]!==l?(P=F=>l.has(F.id),e[3]=l,e[4]=P):P=e[4],g=s.connections.every(P),e[0]=s.connections,e[1]=l,e[2]=g}else g=e[2];const N=g;let j;if(e[5]!==s.connections||e[6]!==l){let P;e[8]!==l?(P=F=>l.has(F.id),e[8]=l,e[9]=P):P=e[9],j=s.connections.some(P),e[5]=s.connections,e[6]=l,e[7]=j}else j=e[7];const d=j;let x,v,f,h,y,k,T,C,b,D,I;if(e[10]!==N||e[11]!==s.connections||e[12]!==s.icon||e[13]!==s.title||e[14]!==r||e[15]!==m||e[16]!==l||e[17]!==c||e[18]!==d){const P=Sn(s.connections),F=s.connections.reduce(En,s.connections[0]),J=F.updated_at??F.created_at;x=be;const q=`${s.connections.length} instances`;e[30]!==s.icon||e[31]!==s.title||e[32]!==q?(b={title:s.title,icon:s.icon,description:q},e[30]=s.icon,e[31]=s.title,e[32]=q,e[33]=b):b=e[33],e[34]!==N||e[35]!==s.connections||e[36]!==r||e[37]!==m||e[38]!==l||e[39]!==c?(D=()=>c?(()=>{for(const _ of s.connections)N?l.has(_.id)&&m(_.id):l.has(_.id)||m(_.id)})():r(),e[34]=N,e[35]=s.connections,e[36]=r,e[37]=m,e[38]=l,e[39]=c,e[40]=D):D=e[40];const U=c&&N&&"ring-2 ring-primary",X=c&&d&&!N&&"ring-1 ring-primary/50";e[41]!==U||e[42]!==X?(I=he(U,X),e[41]=U,e[42]=X,e[43]=I):I=e[43],e[44]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ae,{}),e[44]=v):v=e[44],e[45]!==N||e[46]!==s.connections||e[47]!==m||e[48]!==l||e[49]!==c||e[50]!==d?(f=c?t.jsx(pt,{checked:N?!0:d?"indeterminate":!1,onCheckedChange:()=>{for(const _ of s.connections)N?l.has(_.id)&&m(_.id):l.has(_.id)||m(_.id)}}):t.jsxs(Ve,{variant:"secondary",className:"text-xs tabular-nums",children:["x",s.connections.length]}),e[45]=N,e[46]=s.connections,e[47]=m,e[48]=l,e[49]=c,e[50]=d,e[51]=f):f=e[51];let E;e[52]!==s.connections?(E=s.connections.slice(0,6).map($n),e[52]=s.connections,e[53]=E):E=e[53],e[54]!==E?(h=t.jsx("div",{className:"flex items-center gap-1",children:E}),e[54]=E,e[55]=h):h=e[55],T="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const M=P.map(_=>t.jsx(Xt,{id:_,size:"3xs",avatarOnly:P.length>1},_));e[56]!==M?(C=t.jsx("div",{className:"flex items-center -space-x-1.5",children:M}),e[56]=M,e[57]=C):C=e[57],y="shrink-0 ml-2",k=J?lt(new Date(J)):"—",e[10]=N,e[11]=s.connections,e[12]=s.icon,e[13]=s.title,e[14]=r,e[15]=m,e[16]=l,e[17]=c,e[18]=d,e[19]=x,e[20]=v,e[21]=f,e[22]=h,e[23]=y,e[24]=k,e[25]=T,e[26]=C,e[27]=b,e[28]=D,e[29]=I}else x=e[19],v=e[20],f=e[21],h=e[22],y=e[23],k=e[24],T=e[25],C=e[26],b=e[27],D=e[28],I=e[29];let $;e[58]!==y||e[59]!==k?($=t.jsx("span",{className:y,children:k}),e[58]=y,e[59]=k,e[60]=$):$=e[60];let O;e[61]!==$||e[62]!==T||e[63]!==C?(O=t.jsxs("div",{className:T,children:[C,$]}),e[61]=$,e[62]=T,e[63]=C,e[64]=O):O=e[64];let R;return e[65]!==x||e[66]!==v||e[67]!==f||e[68]!==h||e[69]!==O||e[70]!==b||e[71]!==D||e[72]!==I?(R=t.jsx(t.Fragment,{children:t.jsx(x,{connection:b,onClick:D,className:I,fallbackIcon:v,headerActions:f,body:h,footer:O})}),e[65]=x,e[66]=v,e[67]=f,e[68]=h,e[69]=O,e[70]=b,e[71]=D,e[72]=I,e[73]=R):R=e[73],R}function $n(i){return t.jsx(Bt,{status:i.status},i.id)}function En(i,e){const s=e.updated_at??e.created_at,r=i.updated_at??i.created_at;return s?r?new Date(s)>new Date(r)?e:i:e:i}function Ln(i){const e=de.c(28),{count:s,total:r,onSelectAll:c,onDeselectAll:l,onDelete:m,onAddToAgent:g,onToggleStatus:N,onCancel:j}=i;if(s===0)return null;let d;e[0]!==s?(d=t.jsxs("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:[s," selected"]}),e[0]=s,e[1]=d):d=e[1];let x;e[2]!==s||e[3]!==l||e[4]!==c||e[5]!==r?(x=s<r?t.jsxs(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:c,children:["Select all (",r,")"]}):t.jsx(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:l,children:"Clear selection"}),e[2]=s,e[3]=l,e[4]=c,e[5]=r,e[6]=x):x=e[6];let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(mt,{size:13}),e[7]=v):v=e[7];let f;e[8]!==g?(f=t.jsxs(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:g,children:[v,"Add to Agent"]}),e[8]=g,e[9]=f):f=e[9];let h;e[10]!==N?(h=t.jsx(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>N("active"),children:"Enable"}),e[10]=N,e[11]=h):h=e[11];let y;e[12]!==N?(y=t.jsx(z,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>N("inactive"),children:"Disable"}),e[12]=N,e[13]=y):y=e[13];let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(xt,{size:13}),e[14]=k):k=e[14];let T;e[15]!==m?(T=t.jsxs(z,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:m,children:[k,"Delete"]}),e[15]=m,e[16]=T):T=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(jn,{size:13}),e[17]=C):C=e[17];let b;e[18]!==j?(b=t.jsx(z,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:j,children:C}),e[18]=j,e[19]=b):b=e[19];let D;return e[20]!==d||e[21]!==b||e[22]!==x||e[23]!==f||e[24]!==h||e[25]!==y||e[26]!==T?(D=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[d,x,f,h,y,T,b]})}),e[20]=d,e[21]=b,e[22]=x,e[23]=f,e[24]=h,e[25]=y,e[26]=T,e[27]=D):D=e[27],D}function On(i){const e=de.c(25),{open:s,onOpenChange:r,agents:c,onConfirm:l}=i,[m,g]=Y.useState(null);let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsxs(Ue,{children:[t.jsx(Fe,{children:"Add to Agent"}),t.jsx(at,{children:"Select an agent to add the selected connections to."})]}),e[0]=N):N=e[0];let j;e[1]!==c||e[2]!==m?(j=c.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No agents found"}):c.map(C=>t.jsxs("button",{type:"button",onClick:()=>g(C.id),className:he("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",m===C.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(ge,{icon:C.icon,name:C.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:C.title}),C.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:C.description})]})]},C.id)),e[1]=c,e[2]=m,e[3]=j):j=e[3];let d;e[4]!==j?(d=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:j}),e[4]=j,e[5]=d):d=e[5];let x;e[6]!==r?(x=t.jsx(z,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e[6]=r,e[7]=x):x=e[7];const v=!m;let f;e[8]!==l||e[9]!==r||e[10]!==m?(f=()=>{m&&(l(m),r(!1),g(null))},e[8]=l,e[9]=r,e[10]=m,e[11]=f):f=e[11];let h;e[12]!==v||e[13]!==f?(h=t.jsx(z,{disabled:v,onClick:f,children:"Add"}),e[12]=v,e[13]=f,e[14]=h):h=e[14];let y;e[15]!==x||e[16]!==h?(y=t.jsxs(dt,{children:[x,h]}),e[15]=x,e[16]=h,e[17]=y):y=e[17];let k;e[18]!==d||e[19]!==y?(k=t.jsxs(Me,{className:"sm:max-w-[400px]",children:[N,d,y]}),e[18]=d,e[19]=y,e[20]=k):k=e[20];let T;return e[21]!==r||e[22]!==s||e[23]!==k?(T=t.jsx(Be,{open:s,onOpenChange:r,children:k}),e[21]=r,e[22]=s,e[23]=k,e[24]=T):T=e[24],T}function zn(i){const e=de.c(20),{open:s,onOpenChange:r,count:c,onConfirm:l}=i,m=c!==1?"s":"";let g;e[0]!==c||e[1]!==m?(g=t.jsxs($e,{children:["Delete ",c," connection",m,"?"]}),e[0]=c,e[1]=m,e[2]=g):g=e[2];const N=c!==1?"s":"";let j;e[3]!==N?(j=t.jsxs(Ee,{children:["This will permanently delete the selected connection",N,". This action cannot be undone."]}),e[3]=N,e[4]=j):j=e[4];let d;e[5]!==g||e[6]!==j?(d=t.jsxs(Pe,{children:[g,j]}),e[5]=g,e[6]=j,e[7]=d):d=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Oe,{children:"Cancel"}),e[8]=x):x=e[8];const v=c!==1?"s":"";let f;e[9]!==c||e[10]!==l||e[11]!==v?(f=t.jsxs(Le,{children:[x,t.jsxs(ze,{onClick:l,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:["Delete ",c," connection",v]})]}),e[9]=c,e[10]=l,e[11]=v,e[12]=f):f=e[12];let h;e[13]!==d||e[14]!==f?(h=t.jsxs(Ae,{children:[d,f]}),e[13]=d,e[14]=f,e[15]=h):h=e[15];let y;return e[16]!==r||e[17]!==s||e[18]!==h?(y=t.jsx(Ie,{open:s,onOpenChange:r,children:h}),e[16]=r,e[17]=s,e[18]=h,e[19]=y):y=e[19],y}function Vn(){const{org:i}=rt(),e=Dt(),s=ct(),r=It({strict:!1}),{data:c}=At.useSession(),{stdioEnabled:l}=Pt(),m=Gt({namespace:i.slug,resource:"connections"}),g=an(),N=st(m),j=st(),[d,x]=Y.useReducer(An,{mode:"idle"}),[v,f]=Y.useState(new Set),h=v.size>0,[y,k]=Y.useState(!1),[T,C]=Y.useState(!1),[b,D]=Y.useState("all"),[I,$]=Y.useState(null),[O,R]=Y.useState("ALL"),[P,F]=Y.useState("ALL"),J=pn(),U=N.filter(n=>!(n.connection_type==="VIRTUAL"||O!=="ALL"&&n.connection_type!==O||P!=="ALL"&&n.status!==P)),X=bn(U),E=n=>{f(o=>{const a=new Set(o);return a.has(n)?a.delete(n):a.add(n),a})},M=()=>{f(new Set)},_=Kt(j).sort((n,o)=>{const a=n.app_name==="@deco/management-mcp",u=o.app_name==="@deco/management-mcp";return a&&!u?1:!a&&u?-1:0}),[K,ie]=Ht($t.selectedRegistry(i.slug),n=>n??""),ce=(K?_.find(n=>n.id===K):void 0)??_[0],w=ce?.id??"",V=Qt(ce?.tools),W=qt({registryId:w,listToolName:V}),_e=W.items,ht=Wt(W.loadMore,W.hasMore,W.isLoadingMore),Re=new Set(j.filter(n=>n.connection_type!=="VIRTUAL"&&n.app_name).map(n=>n.app_name)),ke=m.search.toLowerCase(),He=b==="all"?_e.filter(n=>{if(!ke)return!0;const o=n._meta?.["mcp.mesh"],a=[o?.friendly_name,n.server?.name,n.server?.title,n.name,n.title,n.id].filter(Boolean).join(" "),u=[o?.short_description,o?.mesh_description,n.server?.description,n.description].filter(Boolean).join(" ");return a.toLowerCase().includes(ke)||u.toLowerCase().includes(ke)}):[],Te=He.filter(n=>n.verified||n._meta?.["mcp.mesh"]?.verified||n.meta?.verified),we=He.filter(n=>!n.verified&&!n._meta?.["mcp.mesh"]?.verified&&!n.meta?.verified),gt=b==="all"?[]:X,je=n=>{const o=Yt(n.name||n.title||n.server?.title||""),a=typeof n.id=="string"&&n.id.includes("/"),u=typeof n.server?.name=="string"&&n.server.name.includes("/"),S=a&&!u?n.id:n.server?.name||n.id||"";s({to:"/$org/$project/store/$appName",params:{org:i.slug,project:re,appName:o},search:{registryId:w,serverName:S}})},Xe=r.action==="create",jt=()=>{s({to:"/$org/$project/mcps",params:{org:i.slug,project:re},search:{action:"create"}})},Ke=()=>{s({to:"/$org/$project/mcps",params:{org:i.slug,project:re},search:{}})},p=Et({resolver:Lt(Cn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),H=p.watch("ui_type"),We=p.watch("connection_url"),yt=p.watch("npx_package"),me=Ne({uiType:H,connectionUrl:We??"",npxPackage:yt??""})??it({uiType:H,connectionUrl:We??"",registryItems:_e}),A=d.mode==="editing"?d.connection:null;Y.useEffect(()=>{if(A){const n=Ot(A.connection_headers)?A.connection_headers:null;if(n&&A.connection_type==="STDIO"){const o=yn(n.envVars);if(wn(n)){const a=Dn(n);p.reset({title:A.title,description:A.description,icon:A.icon??null,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:a,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o})}else{const a=In(n);p.reset({title:A.title,description:A.description,icon:A.icon??null,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:a.command,stdio_args:a.args,stdio_cwd:a.cwd,env_vars:o})}}else p.reset({title:A.title,description:A.description,icon:A.icon??null,ui_type:A.connection_type,connection_url:A.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})}else p.reset({title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]})},[A,p]);const pe=dn({connectionId:mn,orgId:i.id}),ye=()=>{e.invalidateQueries({predicate:n=>{const o=n.queryKey;return o[1]===i.id&&o[3]==="collection"&&o[4]==="CONNECTIONS"}})},vt=async()=>{k(!1);const n=[...v];let o=0;for(const a of n)try{(await pe.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:a,force:!0}})).isError||o++}catch{}ye(),Q.success(`Deleted ${o} connection${o!==1?"s":""}`),M()},Ct=async n=>{const o=[...v];let a=0;for(const u of o)try{await g.update.mutateAsync({id:u,data:{status:n}}),a++}catch{}ye(),Q.success(`${n==="active"?"Enabled":"Disabled"} ${a} connection${a!==1?"s":""}`),M()},Nt=async n=>{const o=J.find(S=>S.id===n);if(!o||!pe)return;const a=new Set(o.connections.map(S=>S.connection_id)),u=[...v].filter(S=>!a.has(S)).map(S=>({connection_id:S,selected_tools:null,selected_resources:null,selected_prompts:null}));if(u.length===0){Q.info("All selected connections are already in that agent");return}try{await pe.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{connections:[...o.connections,...u]}}}),e.invalidateQueries({predicate:S=>{const L=S.queryKey;return L[1]===i.id&&L[3]==="collection"&&L[4]==="VIRTUAL_MCP"}}),Q.success(`Added ${u.length} connection${u.length!==1?"s":""} to "${o.title}"`),M()}catch{Q.error("Failed to add connections to agent")}},Ge=n=>{const o=n.content;return Array.isArray(o)&&o[0]?.type==="text"&&typeof o[0].text=="string"?o[0].text:"Unknown error"},bt=async()=>{if(d.mode!=="deleting")return;const n=d.connection;x({type:"close"});try{const o=await pe.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:n.id}});if(o.isError){const a=Ge(o),u=a.replace(/^Error:\s*/,"");try{const S=JSON.parse(u);if(S.code==="CONNECTION_IN_USE"&&S.agentNames){x({type:"force-delete",connection:n,agentNames:S.agentNames.map(L=>`"${L}"`).join(", ")});return}}catch{}Q.error(`Failed to delete connection: ${a}`);return}ye(),Q.success("Connection deleted successfully")}catch(o){const a=o instanceof Error?o.message:String(o);Q.error(`Failed to delete connection: ${a}`)}},St=async()=>{if(d.mode!=="force-deleting")return;const n=d.connection.id;x({type:"close"});try{const o=await pe.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:n,force:!0}});if(o.isError){Q.error(`Failed to delete connection: ${Ge(o)}`);return}ye(),Q.success("Connection deleted successfully")}catch(o){const a=o instanceof Error?o.message:String(o);Q.error(`Failed to delete connection: ${a}`)}},_t=async n=>{let o,a=null,u=null,S=null;if(n.ui_type==="NPX"?(o="STDIO",a="",S=kn(n.npx_package||"",n.env_vars||[])):n.ui_type==="STDIO"?(o="STDIO",a="",S=Tn(n.stdio_command||"",n.stdio_args||"",n.stdio_cwd,n.env_vars||[])):(o=n.ui_type,a=n.connection_url||"",u=n.connection_token||null),A){await g.update.mutateAsync({id:A.id,data:{title:n.title,description:n.description||null,icon:n.icon??null,connection_type:o,connection_url:a,...u&&{connection_token:u},...S&&{connection_headers:S}}}),x({type:"close"}),p.reset();return}const L=zt("conn");await g.create.mutateAsync({id:L,title:n.title,description:n.description||null,connection_type:o,connection_url:a,connection_token:u,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:c?.user?.id||"system",organization_id:i.id,icon:n.icon??null,app_name:null,app_id:null,connection_headers:S,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),Ke(),p.reset(),s({to:"/$org/$project/mcps/$connectionId",params:{org:i.slug,project:re,connectionId:L}})},qe=n=>{n||(Xe?Ke():x({type:"close"}),p.reset())},ve=n=>{const o=n.trim();if(!o)return;const a=!!p.formState.dirtyFields.title,u=!!p.formState.dirtyFields.description,S=!!p.formState.dirtyFields.env_vars,L=B=>{if(B&&(!a&&!p.getValues("title").trim()&&B.title&&p.setValue("title",B.title,{shouldDirty:!1}),!u&&!(p.getValues("description")??"").trim()&&B.description&&p.setValue("description",B.description,{shouldDirty:!1}),!S&&B.envVarKeys?.length)){const G=p.getValues("env_vars")??[],Tt=new Set(G.map(ue=>ue.key)),Qe=B.envVarKeys.filter(ue=>!Tt.has(ue));Qe.length>0&&p.setValue("env_vars",[...G,...Qe.map(ue=>({key:ue,value:""}))],{shouldDirty:!0})}},oe=_n(o);if(oe&&l){p.setValue("ui_type","NPX",{shouldDirty:!0}),p.setValue("npx_package",oe.packageName,{shouldDirty:!0}),p.setValue("connection_url","",{shouldDirty:!0}),p.setValue("connection_token",null,{shouldDirty:!0}),L(Ne({uiType:"NPX",npxPackage:oe.packageName}));return}if(o.startsWith("http://")||o.startsWith("https://")){const B=H==="HTTP"||H==="SSE"||H==="Websocket"?H:"HTTP";p.setValue("ui_type",B,{shouldDirty:!0}),p.setValue("connection_url",o,{shouldDirty:!0}),L(Ne({uiType:B,connectionUrl:o})??it({uiType:B,connectionUrl:o,registryItems:_e}));return}H==="NPX"&&L(Ne({uiType:"NPX",npxPackage:o}))},kt=t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(z,{variant:"outline",onClick:jt,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",children:"Custom Connection"})});return t.jsxs(t.Fragment,{children:[t.jsxs(xe,{children:[t.jsx(Be,{open:Xe||d.mode==="editing",onOpenChange:qe,children:t.jsxs(Me,{className:"sm:max-w-[525px]",children:[t.jsxs(Ue,{children:[t.jsx(Fe,{children:A?"Edit Connection":"Create Connection"}),t.jsx(at,{children:A?"Update the connection details below.":"Create a custom connection in your organization. Fill in the details below."})]}),t.jsx(nn,{...p,children:t.jsxs("form",{onSubmit:p.handleSubmit(_t),children:[t.jsxs("div",{className:"grid gap-4 py-4",children:[t.jsx(Z,{control:p.control,name:"ui_type",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"Type *"}),t.jsxs(sn,{value:n.value,onValueChange:n.onChange,children:[t.jsx(ne,{children:t.jsx(on,{children:t.jsx(rn,{})})}),t.jsxs(cn,{children:[t.jsx(fe,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(fe,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(fe,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(De,{className:"w-4 h-4"}),"Websocket"]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(fe,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ae,{className:"w-4 h-4"}),"NPX Package"]})}),t.jsx(fe,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(gn,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),t.jsx(se,{})]})}),H==="NPX"&&t.jsx(t.Fragment,{children:t.jsx(Z,{control:p.control,name:"npx_package",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"NPM Package *"}),t.jsx(ne,{children:t.jsx(le,{placeholder:"@perplexity-ai/mcp-server",...n,value:n.value??"",onPaste:o=>{const a=o.clipboardData.getData("text");a&&(o.preventDefault(),p.setValue("npx_package",a.trim(),{shouldDirty:!0}),ve(a))},onBlur:o=>{ve(o.target.value),n.onBlur()}})}),t.jsx(se,{})]})})}),H==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Z,{control:p.control,name:"stdio_command",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"Command *"}),t.jsx(ne,{children:t.jsx(le,{placeholder:"node, bun, python...",...n,value:n.value??""})}),t.jsx(se,{})]})}),t.jsx(Z,{control:p.control,name:"stdio_args",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"Arguments"}),t.jsx(ne,{children:t.jsx(le,{placeholder:"arg1 arg2 --flag value",...n,value:n.value??""})}),t.jsx(se,{})]})})]}),t.jsx(Z,{control:p.control,name:"stdio_cwd",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"Working Directory"}),t.jsx(ne,{children:t.jsx(le,{placeholder:"/path/to/project (optional)",...n,value:n.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),t.jsx(se,{})]})})]}),(H==="NPX"||H==="STDIO")&&t.jsx(Z,{control:p.control,name:"env_vars",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"Environment Variables"}),t.jsx(ne,{children:t.jsx(vn,{value:n.value??[],onChange:n.onChange})}),t.jsx(se,{})]})}),H!=="NPX"&&H!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Z,{control:p.control,name:"connection_url",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"URL *"}),t.jsx(ne,{children:t.jsx(le,{placeholder:"https://example.com/mcp",...n,value:n.value??"",onPaste:o=>{const a=o.clipboardData.getData("text");a&&(o.preventDefault(),p.setValue("connection_url",a.trim(),{shouldDirty:!0}),ve(a))},onBlur:o=>{ve(o.target.value),n.onBlur()}})}),t.jsx(se,{})]})}),t.jsx(Z,{control:p.control,name:"connection_token",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:me?.token?.label??"Token (optional)"}),t.jsx(ne,{children:t.jsx(le,{type:"password",placeholder:me?.token?.placeholder??"Bearer token or API key",...n,value:n.value??""})}),me?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[me.token.helperText,me.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),t.jsx(se,{})]})})]}),t.jsx(Z,{control:p.control,name:"title",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"Name *"}),t.jsx(ne,{children:t.jsx(le,{placeholder:"My Connection",...n})}),t.jsx(se,{})]})}),t.jsx(Z,{control:p.control,name:"description",render:({field:n})=>t.jsxs(ee,{children:[t.jsx(te,{children:"Description"}),t.jsx(ne,{children:t.jsx(ln,{placeholder:"A brief description of this connection",rows:3,...n,value:n.value??""})}),t.jsx(se,{})]})})]}),t.jsxs(dt,{children:[t.jsx(z,{type:"button",variant:"outline",onClick:()=>qe(!1),children:"Cancel"}),t.jsx(z,{type:"submit",disabled:p.formState.isSubmitting,className:"min-w-40",children:p.formState.isSubmitting?"Saving...":A?"Update Connection":"Create Connection"})]})]})})]})}),t.jsx(Ie,{open:d.mode==="deleting",onOpenChange:n=>!n&&x({type:"close"}),children:t.jsxs(Ae,{children:[t.jsxs(Pe,{children:[t.jsx($e,{children:"Delete Connection?"}),t.jsxs(Ee,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:d.mode==="deleting"&&d.connection.title}),"."]})]}),t.jsxs(Le,{children:[t.jsx(Oe,{children:"Cancel"}),t.jsx(ze,{onClick:bt,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),t.jsx(Ie,{open:d.mode==="force-deleting",onOpenChange:n=>!n&&x({type:"close"}),children:t.jsxs(Ae,{children:[t.jsxs(Pe,{children:[t.jsx($e,{children:"Connection Used by Agents"}),t.jsx(Ee,{asChild:!0,children:t.jsxs("div",{children:[t.jsxs("p",{children:["The connection"," ",t.jsx("span",{className:"font-medium text-foreground",children:d.mode==="force-deleting"&&d.connection.title})," ","is currently used by the following agent(s):"," ",t.jsx("span",{className:"font-medium text-foreground",children:d.mode==="force-deleting"&&d.agentNames}),"."]}),t.jsx("p",{className:"mt-2",children:"Deleting this connection will remove it from those agents, which may impact existing workflows that depend on them."})]})})]}),t.jsxs(Le,{children:[t.jsx(Oe,{children:"Cancel"}),t.jsx(ze,{onClick:St,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Anyway"})]})]})}),t.jsx(zn,{open:y,onOpenChange:k,count:v.size,onConfirm:vt}),t.jsx(On,{open:T,onOpenChange:C,agents:J,onConfirm:Nt}),t.jsxs(xe.Header,{children:[t.jsx(xe.Header.Left,{children:t.jsx(Jt,{children:t.jsx(Zt,{children:t.jsx(en,{children:t.jsx(tn,{children:"Connections"})})})})}),t.jsxs(xe.Header.Right,{children:[t.jsx(Vt,{sortKey:m.sortKey,sortDirection:m.sortDirection,onSort:m.handleSort,sortOptions:[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"connection_type",label:"Type"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],filters:[{label:"Type",value:O,onChange:n=>R(n||"ALL"),options:[{id:"ALL",label:"All"},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:"Status",value:P,onChange:n=>F(n||"ALL"),options:[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"},{id:"error",label:"Error"}]}]}),kt]})]}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("div",{children:t.jsx(Ft,{value:m.search,onChange:m.setSearch,placeholder:"Search for a Connection...",onKeyDown:n=>{n.key==="Escape"&&(m.setSearch(""),n.target.blur())}})}),t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border",children:[t.jsx(Ut,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:b,onTabChange:n=>D(n)}),_.length>0&&t.jsx("div",{className:he(b!=="all"&&"invisible pointer-events-none"),children:t.jsxs(et,{children:[t.jsx(tt,{asChild:!0,children:t.jsxs(z,{variant:"outline",size:"sm",className:"h-7 px-2 gap-1.5 text-sm font-normal",children:[(()=>{const n=_.find(o=>o.id===(K||_[0]?.id))??_[0];return t.jsxs(t.Fragment,{children:[t.jsx(ge,{icon:n?.icon,name:n?.title??"",size:"2xs",className:"shrink-0 rounded-sm"}),t.jsx("span",{children:n?.title})]})})(),t.jsx(xn,{size:14,className:"text-muted-foreground"})]})}),t.jsx(nt,{align:"end",children:_.map(n=>t.jsxs(Ce,{onClick:()=>ie(n.id),className:he(K===n.id||!K&&n.id===_[0]?.id?"bg-accent":""),children:[t.jsx(ge,{icon:n.icon,name:n.title,size:"2xs",className:"shrink-0 rounded-sm"}),n.title]},n.id))})]})})]})]}),t.jsx(xe.Content,{children:t.jsx("div",{className:"flex-1 overflow-auto p-5",children:(b==="all"?Te.length===0&&we.length===0:U.length===0)?t.jsx(Rt,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:"No Connections found",description:m.search?`No Connections match "${m.search}"`:"Create a connection to get started."}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[gt.map(n=>{if(n.type==="group")return t.jsx(Pn,{group:n,onOpen:()=>$({appName:n.title,appIcon:n.icon,instances:n.connections}),selectionMode:h,selectedIds:v,onToggleSelect:E},n.key);const o=n.connection,a=v.has(o.id);return t.jsx(be,{connection:o,fallbackIcon:t.jsx(ae,{}),onClick:()=>h?E(o.id):$({appName:o.app_name||o.title,appIcon:o.icon,appDescription:o.description,instances:[o]}),className:he(a&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:h,headerActions:t.jsxs("div",{className:"flex items-center gap-1",children:[h&&t.jsx(pt,{checked:a,onCheckedChange:()=>E(o.id),onClick:u=>u.stopPropagation()}),t.jsxs(et,{children:[t.jsx(tt,{asChild:!0,children:t.jsx(z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:u=>u.stopPropagation(),children:t.jsx(fn,{size:20})})}),t.jsxs(nt,{align:"end",onClick:u=>u.stopPropagation(),children:[t.jsxs(Ce,{onClick:u=>{u.stopPropagation(),s({to:"/$org/$project/mcps/$connectionId",params:{org:i.slug,project:re,connectionId:o.id}})},children:[t.jsx(hn,{size:16}),"Open"]}),t.jsxs(Ce,{onClick:u=>{u.stopPropagation(),E(o.id)},children:[t.jsx(Mt,{size:16}),"Select"]}),t.jsxs(Ce,{variant:"destructive",onClick:u=>{u.stopPropagation(),x({type:"delete",connection:o})},children:[t.jsx(xt,{size:16}),"Delete"]})]})]})]})},o.id)}),b==="all"&&Te.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(un,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Te.map(n=>{const o=n.server?.name||n.name||n.id||"",a=Re.has(o),u=n._meta?.["mcp.mesh"],S=u?.friendlyName||u?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",L=n.server?.description||n.description||null,oe=n.server?.icons?.[0]?.src||Ze(n.server?.repository)||null,B=j.filter(G=>G.connection_type!=="VIRTUAL"&&G.app_name===o);return t.jsx(be,{connection:{title:S,description:L,icon:oe},fallbackIcon:t.jsx(ae,{}),onClick:()=>a?$({appName:S,appIcon:oe,appDescription:L,instances:B}):je(n),headerActionsAlwaysVisible:!0,headerActions:a?t.jsx(Ve,{variant:"secondary",className:"text-xs",children:"Connected"}):t.jsx(z,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:G=>{G.stopPropagation(),je(n)},children:"Connect"})},`catalog-${n.id}`)}),b==="all"&&we.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),we.map(n=>{const o=n.server?.name||n.name||n.id||"",a=Re.has(o),u=n._meta?.["mcp.mesh"],S=u?.friendlyName||u?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",L=n.server?.description||n.description||null,oe=n.server?.icons?.[0]?.src||Ze(n.server?.repository)||null,B=j.filter(G=>G.connection_type!=="VIRTUAL"&&G.app_name===o);return t.jsx(be,{connection:{title:S,description:L,icon:oe},fallbackIcon:t.jsx(ae,{}),onClick:()=>a?$({appName:S,appIcon:oe,appDescription:L,instances:B}):je(n),headerActionsAlwaysVisible:!0,headerActions:a?t.jsx(Ve,{variant:"secondary",className:"text-xs",children:"Connected"}):t.jsx(z,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:G=>{G.stopPropagation(),je(n)},children:"Connect"})},`catalog-${n.id}`)}),b==="all"&&w&&t.jsx("div",{ref:ht,className:"col-span-full h-4"}),b==="all"&&W.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ut,{size:24,className:"animate-spin text-muted-foreground"})})]})})}),h&&t.jsx(Ln,{count:v.size,total:U.length,onSelectAll:()=>{f(new Set(U.map(n=>n.id)))},onDeselectAll:()=>f(new Set),onDelete:()=>k(!0),onAddToAgent:()=>C(!0),onToggleStatus:Ct,onCancel:M})]}),I&&t.jsx(Nn,{open:!0,onClose:()=>$(null),appName:I.appName,appIcon:I.appIcon,appDescription:I.appDescription,instances:I.instances})]})}function eo(){const i=de.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(wt,{children:t.jsx(Y.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ut,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Vn,{})})}),i[0]=e):e=i[0],e}export{eo as default};
@@ -1 +1 @@
1
- import{bO as h,c as d,v as g,bP as y}from"./index-DsOJvxnb.js";const m={authConfig:()=>["authConfig"],threads:e=>["threads",e],virtualMcpThreads:(e,t)=>["threads",e,"virtual-mcp",t],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],mcpClient:(e,t,n,o)=>["mcp","client",e,t,n,o],mcpToolsList:e=>["mcp","client",e,"tools"],mcpResourcesList:e=>["mcp","client",e,"resources"],mcpPromptsList:e=>["mcp","client",e,"prompts"],mcpReadResource:(e,t)=>["mcp","client",e,"resource",t],mcpGetPrompt:(e,t,n)=>["mcp","client",e,"prompt",t,n],mcpToolCall:(e,t,n)=>["mcp","client",e,"tool-call",t,n],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,o,i)=>[e,t,n,"collection",o,i],collectionList:(e,t,n,o,i)=>[e,t,n,"collection",o,"list",i],collectionListInfinite:(e,t,n,o,i)=>[e,t,n,"collection",o,"list-infinite",i],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],virtualMcpPrompts:e=>["virtual-mcp",e,"prompts"],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e]};class _ extends h{constructor(t,n){super(t,n)}send(t,n){const o=C(t);return o?.type==="emit"?(this.onmessage?.(o.message),Promise.resolve()):o?.type==="suppress"?Promise.resolve():super.send(t,n)}}function C(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{},resources:{},prompts:{},tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}},serverInfo:{name:"mesh-virtual-mcp",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}const b={name:"mesh-sdk",version:"1.0.0"};function T(e,t){const n=t??(typeof window<"u"?window.location.origin:void 0);if(!n)throw new Error("MCP client requires either meshUrl option or a browser environment.");const o=e?`/mcp/${e}`:"/mcp";return new URL(o,n).href}async function f({connectionId:e,orgId:t,token:n,meshUrl:o}){const i=T(e,o),s=new y(b,{capabilities:{tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}}}),r=new _(new URL(i),{requestInit:{headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream","x-org-id":t,...n?{Authorization:`Bearer ${n}`}:{}}}});await s.connect(r);const l=m.mcpClient(t,e??"self",n??"",o??"");return s.toJSON=()=>`mcp-client:${l.join(":")}`,s}function S(e){const t=d.c(13),{connectionId:n,orgId:o,token:i,meshUrl:s}=e;let r;t[0]!==n||t[1]!==s||t[2]!==o||t[3]!==i?(r=m.mcpClient(o,n??"self",i??"",s??""),t[0]=n,t[1]=s,t[2]=o,t[3]=i,t[4]=r):r=t[4];const l=r;let c;t[5]!==n||t[6]!==s||t[7]!==o||t[8]!==i?(c=()=>f({connectionId:n,orgId:o,token:i,meshUrl:s}),t[5]=n,t[6]=s,t[7]=o,t[8]=i,t[9]=c):c=t[9];let a;t[10]!==l||t[11]!==c?(a={queryKey:l,queryFn:c,staleTime:1/0,gcTime:0},t[10]=l,t[11]=c,t[12]=a):a=t[12];const{data:u}=g(a);return u}function w(e){const t=d.c(13),{connectionId:n,orgId:o,token:i,meshUrl:s}=e;let r;t[0]!==n||t[1]!==s||t[2]!==o||t[3]!==i?(r=n!==void 0?m.mcpClient(o,n??"self",i??"",s??""):["mcp","client","skip",o],t[0]=n,t[1]=s,t[2]=o,t[3]=i,t[4]=r):r=t[4];const l=r;let c;t[5]!==n||t[6]!==s||t[7]!==o||t[8]!==i?(c=async()=>n===void 0?null:f({connectionId:n,orgId:o,token:i,meshUrl:s}),t[5]=n,t[6]=s,t[7]=o,t[8]=i,t[9]=c):c=t[9];let a;t[10]!==l||t[11]!==c?(a={queryKey:l,queryFn:c,staleTime:1/0,gcTime:0},t[10]=l,t[11]=c,t[12]=a):a=t[12];const{data:u}=g(a);return u??null}const P={SELF:e=>`${e}_self`,REGISTRY:e=>`${e}_registry`,COMMUNITY_REGISTRY:e=>`${e}_community-registry`,DEV_ASSETS:e=>`${e}_dev-assets`},M="self";function R(e){return{id:P.REGISTRY(e),title:"Deco Store",description:"Official deco MCP registry with curated integrations",connection_type:"HTTP",connection_url:"https://studio.decocms.com/org/deco/registry/mcp",icon:"https://assets.decocache.com/decocms/00ccf6c3-9e13-4517-83b0-75ab84554bb9/596364c63320075ca58483660156b6d9de9b526e.png",app_name:"deco-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}function L(){return{id:"community-registry",title:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",connection_type:"HTTP",connection_url:"https://sites-registry.decocache.com/mcp",icon:"https://assets.decocache.com/decocms/cd7ca472-0f72-463a-b0de-6e44bdd0f9b4/mcp.png",app_name:"mcp-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}function D(e){return{id:v(e),organization_id:e,title:"Decopilot",description:"Default agent that aggregates all organization connections",icon:"https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png",status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:"system",updated_by:void 0,metadata:{instructions:null},connections:[]}}const p="decopilot_";function E(e){return!e||!e.startsWith(p)?null:e.slice(p.length)||null}function v(e){return`${p}${e}`}export{m as K,_ as S,P as W,M as a,L as b,f as c,D as d,R as e,w as f,v as g,E as i,S as u};
1
+ import{bO as h,c as d,v as g,bP as y}from"./index-BXUNq6d7.js";const m={authConfig:()=>["authConfig"],threads:e=>["threads",e],virtualMcpThreads:(e,t)=>["threads",e,"virtual-mcp",t],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],mcpClient:(e,t,n,o)=>["mcp","client",e,t,n,o],mcpToolsList:e=>["mcp","client",e,"tools"],mcpResourcesList:e=>["mcp","client",e,"resources"],mcpPromptsList:e=>["mcp","client",e,"prompts"],mcpReadResource:(e,t)=>["mcp","client",e,"resource",t],mcpGetPrompt:(e,t,n)=>["mcp","client",e,"prompt",t,n],mcpToolCall:(e,t,n)=>["mcp","client",e,"tool-call",t,n],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,o,i)=>[e,t,n,"collection",o,i],collectionList:(e,t,n,o,i)=>[e,t,n,"collection",o,"list",i],collectionListInfinite:(e,t,n,o,i)=>[e,t,n,"collection",o,"list-infinite",i],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],virtualMcpPrompts:e=>["virtual-mcp",e,"prompts"],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e]};class _ extends h{constructor(t,n){super(t,n)}send(t,n){const o=C(t);return o?.type==="emit"?(this.onmessage?.(o.message),Promise.resolve()):o?.type==="suppress"?Promise.resolve():super.send(t,n)}}function C(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{},resources:{},prompts:{},tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}},serverInfo:{name:"mesh-virtual-mcp",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}const b={name:"mesh-sdk",version:"1.0.0"};function T(e,t){const n=t??(typeof window<"u"?window.location.origin:void 0);if(!n)throw new Error("MCP client requires either meshUrl option or a browser environment.");const o=e?`/mcp/${e}`:"/mcp";return new URL(o,n).href}async function f({connectionId:e,orgId:t,token:n,meshUrl:o}){const i=T(e,o),s=new y(b,{capabilities:{tasks:{list:{},cancel:{},requests:{tool:{call:{}}}}}}),r=new _(new URL(i),{requestInit:{headers:{"Content-Type":"application/json",Accept:"application/json, text/event-stream","x-org-id":t,...n?{Authorization:`Bearer ${n}`}:{}}}});await s.connect(r);const l=m.mcpClient(t,e??"self",n??"",o??"");return s.toJSON=()=>`mcp-client:${l.join(":")}`,s}function S(e){const t=d.c(13),{connectionId:n,orgId:o,token:i,meshUrl:s}=e;let r;t[0]!==n||t[1]!==s||t[2]!==o||t[3]!==i?(r=m.mcpClient(o,n??"self",i??"",s??""),t[0]=n,t[1]=s,t[2]=o,t[3]=i,t[4]=r):r=t[4];const l=r;let c;t[5]!==n||t[6]!==s||t[7]!==o||t[8]!==i?(c=()=>f({connectionId:n,orgId:o,token:i,meshUrl:s}),t[5]=n,t[6]=s,t[7]=o,t[8]=i,t[9]=c):c=t[9];let a;t[10]!==l||t[11]!==c?(a={queryKey:l,queryFn:c,staleTime:1/0,gcTime:0},t[10]=l,t[11]=c,t[12]=a):a=t[12];const{data:u}=g(a);return u}function w(e){const t=d.c(13),{connectionId:n,orgId:o,token:i,meshUrl:s}=e;let r;t[0]!==n||t[1]!==s||t[2]!==o||t[3]!==i?(r=n!==void 0?m.mcpClient(o,n??"self",i??"",s??""):["mcp","client","skip",o],t[0]=n,t[1]=s,t[2]=o,t[3]=i,t[4]=r):r=t[4];const l=r;let c;t[5]!==n||t[6]!==s||t[7]!==o||t[8]!==i?(c=async()=>n===void 0?null:f({connectionId:n,orgId:o,token:i,meshUrl:s}),t[5]=n,t[6]=s,t[7]=o,t[8]=i,t[9]=c):c=t[9];let a;t[10]!==l||t[11]!==c?(a={queryKey:l,queryFn:c,staleTime:1/0,gcTime:0},t[10]=l,t[11]=c,t[12]=a):a=t[12];const{data:u}=g(a);return u??null}const P={SELF:e=>`${e}_self`,REGISTRY:e=>`${e}_registry`,COMMUNITY_REGISTRY:e=>`${e}_community-registry`,DEV_ASSETS:e=>`${e}_dev-assets`},M="self";function R(e){return{id:P.REGISTRY(e),title:"Deco Store",description:"Official deco MCP registry with curated integrations",connection_type:"HTTP",connection_url:"https://studio.decocms.com/org/deco/registry/mcp",icon:"https://assets.decocache.com/decocms/00ccf6c3-9e13-4517-83b0-75ab84554bb9/596364c63320075ca58483660156b6d9de9b526e.png",app_name:"deco-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}function L(){return{id:"community-registry",title:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",connection_type:"HTTP",connection_url:"https://sites-registry.decocache.com/mcp",icon:"https://assets.decocache.com/decocms/cd7ca472-0f72-463a-b0de-6e44bdd0f9b4/mcp.png",app_name:"mcp-registry",app_id:null,connection_token:null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{isDefault:!0,type:"registry"}}}function D(e){return{id:v(e),organization_id:e,title:"Decopilot",description:"Default agent that aggregates all organization connections",icon:"https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png",status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:"system",updated_by:void 0,metadata:{instructions:null},connections:[]}}const p="decopilot_";function E(e){return!e||!e.startsWith(p)?null:e.slice(p.length)||null}function v(e){return`${p}${e}`}export{m as K,_ as S,P as W,M as a,L as b,f as c,D as d,R as e,w as f,v as g,E as i,S as u};
@@ -0,0 +1 @@
1
+ import{ah as a,ai as t}from"./index-BXUNq6d7.js";const e=a(t,{target:"draft-7"});export{e as B};
@@ -1,4 +1,4 @@
1
- import{cb as It,cc as _t,ah as Et,bl as D,n as d,cd as oe,ce as qe,bW as Tt,bX as St,bp as Mt,bo as P,ax as K,az as se,o as S,bm as h,ay as U,cf as At,cg as w,aA as wt,aw as L,w as me,c as ze,r as z}from"./index-DsOJvxnb.js";import{d as xt}from"./constants-XtX-WKGm.js";import{A as Te,D as de}from"./decopilot-events-Brt4gAR6.js";var ee;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const i={};for(const o of r)i[o]=o;return i},t.getValidEnumValues=r=>{const i=t.objectKeys(r).filter(n=>typeof r[r[n]]!="number"),o={};for(const n of i)o[n]=r[n];return t.objectValues(o)},t.objectValues=r=>t.objectKeys(r).map(function(i){return r[i]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const i=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},t.find=(r,i)=>{for(const o of r)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=s,t.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(ee||(ee={}));var Se;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Se||(Se={}));ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class le extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(i){return i.message},s={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)s._errors.push(a(o));else{let n=s,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(n[l]=n[l]||{_errors:[]},n[l]._errors.push(a(o))):n[l]=n[l]||{_errors:[]},n=n[l],u++}}};return r(this),s}static assert(e){if(!(e instanceof le))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const i=r.path[0];a[i]=a[i]||[],a[i].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}le.create=t=>new le(t);var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));var We="vercel.ai.error",Rt=Symbol.for(We),Ae,we,F=class Ye extends(we=Error,Ae=Rt,we){constructor({name:e,message:a,cause:s}){super(a),this[Ae]=!0,this.name=e,this.cause=s}static isInstance(e){return Ye.hasMarker(e,We)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function He(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ge="AI_InvalidArgumentError",Xe=`vercel.ai.error.${Ge}`,Nt=Symbol.for(Xe),xe,Re,Ot=class extends(Re=F,xe=Nt,Re){constructor({message:t,cause:e,argument:a}){super({name:Ge,message:t,cause:e}),this[xe]=!0,this.argument=a}static isInstance(t){return F.hasMarker(t,Xe)}},Qe="AI_JSONParseError",Ke=`vercel.ai.error.${Qe}`,Ct=Symbol.for(Ke),Ne,Oe,Ce=class extends(Oe=F,Ne=Ct,Oe){constructor({text:t,cause:e}){super({name:Qe,message:`JSON parsing failed: Text: ${t}.
1
+ import{cb as It,cc as _t,ah as Et,bl as D,n as d,cd as oe,ce as qe,bW as Tt,bX as St,bp as Mt,bo as P,ax as K,az as se,o as S,bm as h,ay as U,cf as At,cg as w,aA as wt,aw as L,w as me,c as ze,r as z}from"./index-BXUNq6d7.js";import{d as xt}from"./constants-CDL9XClm.js";import{A as Te,D as de}from"./decopilot-events-Brt4gAR6.js";var ee;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const i={};for(const o of r)i[o]=o;return i},t.getValidEnumValues=r=>{const i=t.objectKeys(r).filter(n=>typeof r[r[n]]!="number"),o={};for(const n of i)o[n]=r[n];return t.objectValues(o)},t.objectValues=r=>t.objectKeys(r).map(function(i){return r[i]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const i=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},t.find=(r,i)=>{for(const o of r)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=s,t.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(ee||(ee={}));var Se;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Se||(Se={}));ee.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ee.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class le extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(i){return i.message},s={_errors:[]},r=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)s._errors.push(a(o));else{let n=s,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(n[l]=n[l]||{_errors:[]},n[l]._errors.push(a(o))):n[l]=n[l]||{_errors:[]},n=n[l],u++}}};return r(this),s}static assert(e){if(!(e instanceof le))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ee.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const i=r.path[0];a[i]=a[i]||[],a[i].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}le.create=t=>new le(t);var Me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Me||(Me={}));var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));var We="vercel.ai.error",Rt=Symbol.for(We),Ae,we,F=class Ye extends(we=Error,Ae=Rt,we){constructor({name:e,message:a,cause:s}){super(a),this[Ae]=!0,this.name=e,this.cause=s}static isInstance(e){return Ye.hasMarker(e,We)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function He(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ge="AI_InvalidArgumentError",Xe=`vercel.ai.error.${Ge}`,Nt=Symbol.for(Xe),xe,Re,Ot=class extends(Re=F,xe=Nt,Re){constructor({message:t,cause:e,argument:a}){super({name:Ge,message:t,cause:e}),this[xe]=!0,this.argument=a}static isInstance(t){return F.hasMarker(t,Xe)}},Qe="AI_JSONParseError",Ke=`vercel.ai.error.${Qe}`,Ct=Symbol.for(Ke),Ne,Oe,Ce=class extends(Oe=F,Ne=Ct,Oe){constructor({text:t,cause:e}){super({name:Qe,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${He(e)}`,cause:e}),this[Ne]=!0,this.text=t}static isInstance(t){return F.hasMarker(t,Ke)}},et="AI_TypeValidationError",tt=`vercel.ai.error.${et}`,Pt=Symbol.for(tt),Pe,De,H=class ge extends(De=F,Pe=Pt,De){constructor({value:e,cause:a,context:s}){let r="Type validation failed";if(s?.field&&(r+=` for ${s.field}`),s?.entityName||s?.entityId){r+=" (";const i=[];s.entityName&&i.push(s.entityName),s.entityId&&i.push(`id: "${s.entityId}"`),r+=i.join(", "),r+=")"}super({name:et,message:`${r}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${He(a)}`,cause:a}),this[Pe]=!0,this.value=e,this.context=s}static isInstance(e){return F.hasMarker(e,tt)}static wrap({value:e,cause:a,context:s}){var r,i,o;return ge.isInstance(a)&&a.value===e&&((r=a.context)==null?void 0:r.field)===s?.field&&((i=a.context)==null?void 0:i.entityName)===s?.entityName&&((o=a.context)==null?void 0:o.entityId)===s?.entityId?a:new ge({value:e,cause:a,context:s})}},re=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:s="-"}={})=>{const r=()=>{const i=a.length,o=new Array(e);for(let n=0;n<e;n++)o[n]=a[Math.random()*i|0];return o.join("")};if(t==null)return r;if(a.includes(s))throw new Ot({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${a}".`});return()=>`${t}${s}${r()}`},Dt=re();function ke(t=globalThis){var e,a,s;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(s=(a=t.process)==null?void 0:a.versions)!=null&&s.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function q(t){if(t==null)return{};const e={};if(t instanceof Headers)t.forEach((a,s)=>{e[s.toLowerCase()]=a});else{Array.isArray(t)||(t=Object.entries(t));for(const[a,s]of t)s!=null&&(e[a.toLowerCase()]=s)}return e}function je(t,...e){const a=new Headers(q(t)),s=a.get("user-agent")||"";return a.set("user-agent",[s,...e].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var kt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,jt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function $e(t){const e=JSON.parse(t);return e===null||typeof e!="object"||kt.test(t)===!1&&jt.test(t)===!1?e:$t(e)}function $t(t){let e=[t];for(;e.length;){const a=e;e=[];for(const s of a){if(Object.prototype.hasOwnProperty.call(s,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const r in s){const i=s[r];i&&typeof i=="object"&&e.push(i)}}}return t}function Zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return $e(t)}try{return $e(t)}finally{Error.stackTraceLimit=e}}function Ie(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const s of Object.keys(a))a[s]=J(a[s])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(J):J(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(J)),t.allOf!=null&&(t.allOf=t.allOf.map(J)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(J));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=J(e[a]);return t}function J(t){return typeof t=="boolean"?t:Ie(t)}var Ft=Symbol("Let zodToJsonSchema decide on which parser to use"),Ze={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Lt=t=>typeof t=="string"?{...Ze,name:t}:{...Ze,...t};function k(){return{}}function Ut(t,e){var a,s,r;const i={type:"array"};return(a=t.type)!=null&&a._def&&((r=(s=t.type)==null?void 0:s._def)==null?void 0:r.typeName)!==g.ZodAny&&(i.items=_(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(i.minItems=t.minLength.value),t.maxLength&&(i.maxItems=t.maxLength.value),t.exactLength&&(i.minItems=t.exactLength.value,i.maxItems=t.exactLength.value),i}function Bt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Vt(){return{type:"boolean"}}function at(t,e){return _(t.type._def,e)}var Jt=(t,e)=>_(t.innerType._def,e);function st(t,e,a){const s=a??e.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((r,i)=>st(t,e,r))};switch(s){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return qt(t)}}var qt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function zt(t,e){return{..._(t.innerType._def,e),default:t.defaultValue()}}function Wt(t,e){return e.effectStrategy==="input"?_(t.schema._def,e):k()}function Yt(t){return{type:"string",enum:Array.from(t.values)}}var Ht=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Gt(t,e){const a=[_(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),_(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),s=[];return a.forEach(r=>{if(Ht(r))s.push(...r.allOf);else{let i=r;if("additionalProperties"in r&&r.additionalProperties===!1){const{additionalProperties:o,...n}=r;i=n}s.push(i)}}),s.length?{allOf:s}:void 0}function Xt(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var pe=void 0,$={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(pe===void 0&&(pe=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),pe),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rt(t,e){const a={type:"string"};if(t.checks)for(const s of t.checks)switch(s.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"email":switch(e.emailStrategy){case"format:email":Z(a,"email",s.message,e);break;case"format:idn-email":Z(a,"idn-email",s.message,e);break;case"pattern:zod":C(a,$.email,s.message,e);break}break;case"url":Z(a,"uri",s.message,e);break;case"uuid":Z(a,"uuid",s.message,e);break;case"regex":C(a,s.regex,s.message,e);break;case"cuid":C(a,$.cuid,s.message,e);break;case"cuid2":C(a,$.cuid2,s.message,e);break;case"startsWith":C(a,RegExp(`^${fe(s.value,e)}`),s.message,e);break;case"endsWith":C(a,RegExp(`${fe(s.value,e)}$`),s.message,e);break;case"datetime":Z(a,"date-time",s.message,e);break;case"date":Z(a,"date",s.message,e);break;case"time":Z(a,"time",s.message,e);break;case"duration":Z(a,"duration",s.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"includes":{C(a,RegExp(fe(s.value,e)),s.message,e);break}case"ip":{s.version!=="v6"&&Z(a,"ipv4",s.message,e),s.version!=="v4"&&Z(a,"ipv6",s.message,e);break}case"base64url":C(a,$.base64url,s.message,e);break;case"jwt":C(a,$.jwt,s.message,e);break;case"cidr":{s.version!=="v6"&&C(a,$.ipv4Cidr,s.message,e),s.version!=="v4"&&C(a,$.ipv6Cidr,s.message,e);break}case"emoji":C(a,$.emoji(),s.message,e);break;case"ulid":{C(a,$.ulid,s.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Z(a,"binary",s.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{C(a,$.base64,s.message,e);break}}break}case"nanoid":C(a,$.nanoid,s.message,e)}return a}function fe(t,e){return e.patternStrategy==="escape"?Kt(t):t}var Qt=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Kt(t){let e="";for(let a=0;a<t.length;a++)Qt.has(t[a])||(e+="\\"),e+=t[a];return e}function Z(t,e,a,s){var r;t.format||(r=t.anyOf)!=null&&r.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&s.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function C(t,e,a,s){var r;t.pattern||(r=t.allOf)!=null&&r.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Fe(e,s),...a&&s.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Fe(e,s)}function Fe(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const s={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=s.i?t.source.toLowerCase():t.source;let i="",o=!1,n=!1,u=!1;for(let l=0;l<r.length;l++){if(o){i+=r[l],o=!1;continue}if(s.i){if(n){if(r[l].match(/[a-z]/)){u?(i+=r[l],i+=`${r[l-2]}-${r[l]}`.toUpperCase(),u=!1):r[l+1]==="-"&&((a=r[l+2])!=null&&a.match(/[a-z]/))?(i+=r[l],u=!0):i+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){i+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(s.m){if(r[l]==="^"){i+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(r[l]==="$"){i+=`($|(?=[\r
@@ -1 +1 @@
1
- import{o as A,n as D,c as O,q as v,t as E,j as r,B as N,f as I}from"./index-DsOJvxnb.js";import{A as M,a as L,b as R,c as T,d as $,e as q,f as B}from"./alert-dialog-BVglQjyM.js";import{F as V,a as k,b as H,c as U,d as G,e as J,f as K}from"./form-BN7_f2uj.js";import{I as P}from"./input-CUT8DBv1.js";import{S as Q}from"./spinner-CqAVfcvO.js";import{u as W}from"./useMutation-B_cFG709.js";function _(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const X=A({name:D().min(2,"Organization name is required")});function se(o){const e=O.c(41),{open:a,onOpenChange:s}=o;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:v(X),defaultValues:{name:""}},e[0]=j):j=e[0];const t=E(j);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={mutationFn:Z,onSuccess:Y},e[1]=w):w=e[1];const i=W(w),z=i.error instanceof Error?i.error.message:i.error?"Failed to create organization.":null;let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsxs(R,{children:[r.jsx(T,{children:"Create a new organization"}),r.jsx($,{children:"Set up a new organization to collaborate with others."})]}),e[2]=F):F=e[2];let n;if(e[3]!==i||e[4]!==t){let p;e[6]!==i?(p=b=>i.mutateAsync(b),e[6]=i,e[7]=p):p=e[7],n=t.handleSubmit(p),e[3]=i,e[4]=t,e[5]=n}else n=e[5];let l;e[8]!==t.formState.isSubmitting?(l=p=>{const{field:b}=p;return r.jsxs(H,{children:[r.jsx(U,{children:"Organization Name"}),r.jsx(G,{children:r.jsx(P,{...b,placeholder:"Acme Inc.",disabled:t.formState.isSubmitting})}),r.jsx(J,{children:"The name of your company or organization"}),b.value&&r.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",r.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",_(b.value)]})]}),r.jsx(K,{})]})},e[8]=t.formState.isSubmitting,e[9]=l):l=e[9];let m;e[10]!==t.control||e[11]!==l?(m=r.jsx(V,{control:t.control,name:"name",render:l}),e[10]=t.control,e[11]=l,e[12]=m):m=e[12];let c;e[13]!==z?(c=z&&r.jsx("div",{className:"text-destructive text-sm mt-2",children:z}),e[13]=z,e[14]=c):c=e[14];let f;e[15]!==i||e[16]!==t?(f=()=>{i.reset(),t.reset()},e[15]=i,e[16]=t,e[17]=f):f=e[17];let g;e[18]!==t.formState.isSubmitting||e[19]!==f?(g=r.jsx(M,{disabled:t.formState.isSubmitting,onClick:f,children:"Cancel"}),e[18]=t.formState.isSubmitting,e[19]=f,e[20]=g):g=e[20];const y=!t.formState.isValid||t.formState.isSubmitting;let u;e[21]!==t.formState.isSubmitting?(u=t.formState.isSubmitting?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Q,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=t.formState.isSubmitting,e[22]=u):u=e[22];let d;e[23]!==y||e[24]!==u?(d=r.jsx(N,{type:"submit",variant:"default",disabled:y,children:u}),e[23]=y,e[24]=u,e[25]=d):d=e[25];let S;e[26]!==d||e[27]!==g?(S=r.jsxs(q,{children:[g,d]}),e[26]=d,e[27]=g,e[28]=S):S=e[28];let h;e[29]!==S||e[30]!==n||e[31]!==m||e[32]!==c?(h=r.jsxs("form",{className:"space-y-6",onSubmit:n,autoComplete:"off",children:[m,c,S]}),e[29]=S,e[30]=n,e[31]=m,e[32]=c,e[33]=h):h=e[33];let x;e[34]!==t||e[35]!==h?(x=r.jsxs(L,{children:[F,r.jsx(k,{...t,children:h})]}),e[34]=t,e[35]=h,e[36]=x):x=e[36];let C;return e[37]!==s||e[38]!==a||e[39]!==x?(C=r.jsx(B,{open:a,onOpenChange:s,children:x}),e[37]=s,e[38]=a,e[39]=x,e[40]=C):C=e[40],C}function Y(o){const{orgSlug:e}=o;window.location.href=`/${e}`}async function Z(o){const e=_(o.name);if(!e)throw new Error("Organization slug is invalid");const a=await I.organization.create({name:o.name,slug:e});if(a?.error)throw new Error(a.error.message||"Failed to create organization");const s=a?.data?.slug??e;if(!s)throw new Error("Failed to create organization");return{orgSlug:s}}export{se as C};
1
+ import{o as A,n as D,c as O,q as v,t as E,j as r,B as N,f as I}from"./index-BXUNq6d7.js";import{A as M,a as L,b as R,c as T,d as $,e as q,f as B}from"./alert-dialog-DgTufZ_p.js";import{F as V,a as k,b as H,c as U,d as G,e as J,f as K}from"./form-BV3tSlED.js";import{I as P}from"./input-BFH8rk50.js";import{S as Q}from"./spinner-B1-EIDBS.js";import{u as W}from"./useMutation-CkdHuTyE.js";function _(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const X=A({name:D().min(2,"Organization name is required")});function se(o){const e=O.c(41),{open:a,onOpenChange:s}=o;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:v(X),defaultValues:{name:""}},e[0]=j):j=e[0];const t=E(j);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={mutationFn:Z,onSuccess:Y},e[1]=w):w=e[1];const i=W(w),z=i.error instanceof Error?i.error.message:i.error?"Failed to create organization.":null;let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsxs(R,{children:[r.jsx(T,{children:"Create a new organization"}),r.jsx($,{children:"Set up a new organization to collaborate with others."})]}),e[2]=F):F=e[2];let n;if(e[3]!==i||e[4]!==t){let p;e[6]!==i?(p=b=>i.mutateAsync(b),e[6]=i,e[7]=p):p=e[7],n=t.handleSubmit(p),e[3]=i,e[4]=t,e[5]=n}else n=e[5];let l;e[8]!==t.formState.isSubmitting?(l=p=>{const{field:b}=p;return r.jsxs(H,{children:[r.jsx(U,{children:"Organization Name"}),r.jsx(G,{children:r.jsx(P,{...b,placeholder:"Acme Inc.",disabled:t.formState.isSubmitting})}),r.jsx(J,{children:"The name of your company or organization"}),b.value&&r.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",r.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",_(b.value)]})]}),r.jsx(K,{})]})},e[8]=t.formState.isSubmitting,e[9]=l):l=e[9];let m;e[10]!==t.control||e[11]!==l?(m=r.jsx(V,{control:t.control,name:"name",render:l}),e[10]=t.control,e[11]=l,e[12]=m):m=e[12];let c;e[13]!==z?(c=z&&r.jsx("div",{className:"text-destructive text-sm mt-2",children:z}),e[13]=z,e[14]=c):c=e[14];let f;e[15]!==i||e[16]!==t?(f=()=>{i.reset(),t.reset()},e[15]=i,e[16]=t,e[17]=f):f=e[17];let g;e[18]!==t.formState.isSubmitting||e[19]!==f?(g=r.jsx(M,{disabled:t.formState.isSubmitting,onClick:f,children:"Cancel"}),e[18]=t.formState.isSubmitting,e[19]=f,e[20]=g):g=e[20];const y=!t.formState.isValid||t.formState.isSubmitting;let u;e[21]!==t.formState.isSubmitting?(u=t.formState.isSubmitting?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Q,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=t.formState.isSubmitting,e[22]=u):u=e[22];let d;e[23]!==y||e[24]!==u?(d=r.jsx(N,{type:"submit",variant:"default",disabled:y,children:u}),e[23]=y,e[24]=u,e[25]=d):d=e[25];let S;e[26]!==d||e[27]!==g?(S=r.jsxs(q,{children:[g,d]}),e[26]=d,e[27]=g,e[28]=S):S=e[28];let h;e[29]!==S||e[30]!==n||e[31]!==m||e[32]!==c?(h=r.jsxs("form",{className:"space-y-6",onSubmit:n,autoComplete:"off",children:[m,c,S]}),e[29]=S,e[30]=n,e[31]=m,e[32]=c,e[33]=h):h=e[33];let x;e[34]!==t||e[35]!==h?(x=r.jsxs(L,{children:[F,r.jsx(k,{...t,children:h})]}),e[34]=t,e[35]=h,e[36]=x):x=e[36];let C;return e[37]!==s||e[38]!==a||e[39]!==x?(C=r.jsx(B,{open:a,onOpenChange:s,children:x}),e[37]=s,e[38]=a,e[39]=x,e[40]=C):C=e[40],C}function Y(o){const{orgSlug:e}=o;window.location.href=`/${e}`}async function Z(o){const e=_(o.name);if(!e)throw new Error("Organization slug is invalid");const a=await I.organization.create({name:o.name,slug:e});if(a?.error)throw new Error(a.error.message||"Failed to create organization");const s=a?.data?.slug??e;if(!s)throw new Error("Failed to create organization");return{orgSlug:s}}export{se as C};
@@ -1 +1 @@
1
- import{c as A,j as e,y as L,u as R,e as k,x as z,r as M,t as T,w as B,K as V,O as j,B as D,o as $,n as f}from"./index-DsOJvxnb.js";import{u as q}from"./useMutation-B_cFG709.js";import{u as O,a as K}from"./constants-XtX-WKGm.js";import{d as U,c as G,b as J,D as Q,a as Y,e as H}from"./dialog-_XYw8lZC.js";import{a as W,F as v,b as F,c as N,d as S,f as w}from"./form-BN7_f2uj.js";import{I}from"./input-CUT8DBv1.js";import{T as X}from"./textarea-CTzX43MZ.js";import{L as Z}from"./label-iPw5smAw.js";import{i as ee}from"./Check-BfKCyKXX.js";function se(l){return l.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function _(l){return/^[a-z0-9-]+$/.test(l)&&l.length>0&&l.length<=100}const te=["#3B82F6","#8B5CF6","#EC4899","#EF4444","#F97316","#EAB308","#22C55E","#14B8A6","#06B6D4","#6366F1","#64748B","#000000"];function ne(l){const s=A.c(16),{value:r,onChange:i}=l;let c;s[0]!==i||s[1]!==r?(c=te.map(o=>e.jsx("button",{type:"button",onClick:()=>i(o),className:L("size-8 rounded-lg transition-all",r===o&&"ring-2 ring-offset-2 ring-primary"),style:{backgroundColor:o},children:r===o&&e.jsx(ee,{className:"size-4 text-white mx-auto"})},o)),s[0]=i,s[1]=r,s[2]=c):c=s[2];let u;s[3]!==c?(u=e.jsx("div",{className:"grid grid-cols-6 gap-2",children:c}),s[3]=c,s[4]=u):u=s[4];const g=r??"#3B82F6";let d;s[5]!==i?(d=o=>i(o.target.value),s[5]=i,s[6]=d):d=s[6];let t;s[7]!==g||s[8]!==d?(t=e.jsx("input",{type:"color",value:g,onChange:d,className:"size-8 rounded cursor-pointer"}),s[7]=g,s[8]=d,s[9]=t):t=s[9];let a;s[10]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx("span",{className:"text-sm text-muted-foreground",children:"Custom color"}),s[10]=a):a=s[10];let m;s[11]!==t?(m=e.jsxs("div",{className:"flex items-center gap-2",children:[t,a]}),s[11]=t,s[12]=m):m=s[12];let x;return s[13]!==u||s[14]!==m?(x=e.jsxs("div",{className:"space-y-3",children:[u,m]}),s[13]=u,s[14]=m,s[15]=x):x=s[15],x}$({name:f().min(1,"Name is required").max(200),slug:f().min(1,"Slug is required").max(100),description:f().max(1e3).optional(),bannerColor:f().nullable().optional()});function ge({open:l,onOpenChange:s}){const{org:r}=R(),i=k(),c=z(),[u,g]=M.useState(!1),d=O({connectionId:K,orgId:r.id}),t=T({mode:"onChange",defaultValues:{name:"",slug:"",description:"",bannerColor:"#3B82F6"}}),a=q({mutationFn:async n=>{const p=await d.callTool({name:"PROJECT_CREATE",arguments:{organizationId:r.id,slug:n.slug,name:n.name,description:n.description||null,enabledPlugins:[],ui:{banner:null,bannerColor:n.bannerColor??null,icon:null,themeColor:n.bannerColor??null}}});return p.structuredContent??p},onSuccess:n=>{c.invalidateQueries({queryKey:V.projects(r.id)}),B.success("Project created successfully"),s(!1),t.reset({name:"",slug:"",description:"",bannerColor:"#3B82F6"}),g(!1),i({to:"/$org/$project",params:{org:r.slug,project:n.project.slug}})},onError:n=>{B.error("Failed to create project: "+(n instanceof Error?n.message:"Unknown error"))}}),m=async n=>{if(!_(n.slug)){t.setError("slug",{message:"Slug must be lowercase alphanumeric with hyphens only"});return}if(n.slug===j){t.setError("slug",{message:`"${j}" is a reserved slug`});return}await a.mutateAsync(n)},x=n=>{const p=n.target.value;if(t.setValue("name",p),!u){const P=se(p);t.setValue("slug",P)}},o=n=>{g(!0),t.setValue("slug",n.target.value.toLowerCase().replace(/[^a-z0-9-]/g,""))},C=t.watch("bannerColor"),h=t.watch("slug"),b=t.watch("name"),y=h===j,E=h.length>0&&!_(h);return e.jsx(U,{open:l,onOpenChange:s,children:e.jsxs(G,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Create New Project"}),e.jsxs(Y,{children:["Set up a new project in ",r.name,". You can configure plugins and settings after creation."]})]}),e.jsx(W,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(m),className:"space-y-6",children:[e.jsx("div",{className:"h-20 rounded-lg relative",style:{backgroundColor:C??"#3B82F6"},children:e.jsx("div",{className:"absolute -bottom-4 left-4",children:e.jsx("div",{className:"size-12 rounded-lg border-2 border-background flex items-center justify-center text-lg font-semibold text-white",style:{backgroundColor:C??"#3B82F6"},children:b?.charAt(0)?.toUpperCase()||"P"})})}),e.jsxs("div",{className:"space-y-2 pt-4",children:[e.jsx(Z,{children:"Banner Color"}),e.jsx(ne,{value:C??null,onChange:n=>t.setValue("bannerColor",n)})]}),e.jsx(v,{control:t.control,name:"name",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Project Name *"}),e.jsx(S,{children:e.jsx(I,{value:b,onChange:x,placeholder:"My Awesome Project",autoFocus:!0,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"slug",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Slug *"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["/",r.slug,"/"]}),e.jsx(S,{children:e.jsx(I,{value:h,onChange:o,placeholder:"my-awesome-project",className:"flex-1",disabled:a.isPending})})]}),y&&e.jsxs("p",{className:"text-xs text-destructive",children:['"',j,'" is a reserved slug']}),E&&!y&&e.jsx("p",{className:"text-xs text-destructive",children:"Slug must be lowercase alphanumeric with hyphens only"}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"description",render:({field:n})=>e.jsxs(F,{children:[e.jsx(N,{children:"Description"}),e.jsx(S,{children:e.jsx(X,{...n,placeholder:"What is this project for?",rows:2,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsxs(H,{children:[e.jsx(D,{type:"button",variant:"outline",onClick:()=>s(!1),disabled:a.isPending,children:"Cancel"}),e.jsx(D,{type:"submit",disabled:a.isPending||y||E||!b||!h,children:a.isPending?"Creating...":"Create Project"})]})]})})]})})}export{ge as C};
1
+ import{c as A,j as e,y as L,u as R,e as k,x as z,r as M,t as T,w as B,K as V,O as j,B as D,o as $,n as f}from"./index-BXUNq6d7.js";import{u as q}from"./useMutation-CkdHuTyE.js";import{u as O,a as K}from"./constants-CDL9XClm.js";import{d as U,c as G,b as J,D as Q,a as Y,e as H}from"./dialog-DxTRqiug.js";import{a as W,F as v,b as F,c as N,d as S,f as w}from"./form-BV3tSlED.js";import{I}from"./input-BFH8rk50.js";import{T as X}from"./textarea-DPLd5P1K.js";import{L as Z}from"./label-DE7vX487.js";import{i as ee}from"./Check-7kB05ju_.js";function se(l){return l.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function _(l){return/^[a-z0-9-]+$/.test(l)&&l.length>0&&l.length<=100}const te=["#3B82F6","#8B5CF6","#EC4899","#EF4444","#F97316","#EAB308","#22C55E","#14B8A6","#06B6D4","#6366F1","#64748B","#000000"];function ne(l){const s=A.c(16),{value:r,onChange:i}=l;let c;s[0]!==i||s[1]!==r?(c=te.map(o=>e.jsx("button",{type:"button",onClick:()=>i(o),className:L("size-8 rounded-lg transition-all",r===o&&"ring-2 ring-offset-2 ring-primary"),style:{backgroundColor:o},children:r===o&&e.jsx(ee,{className:"size-4 text-white mx-auto"})},o)),s[0]=i,s[1]=r,s[2]=c):c=s[2];let u;s[3]!==c?(u=e.jsx("div",{className:"grid grid-cols-6 gap-2",children:c}),s[3]=c,s[4]=u):u=s[4];const g=r??"#3B82F6";let d;s[5]!==i?(d=o=>i(o.target.value),s[5]=i,s[6]=d):d=s[6];let t;s[7]!==g||s[8]!==d?(t=e.jsx("input",{type:"color",value:g,onChange:d,className:"size-8 rounded cursor-pointer"}),s[7]=g,s[8]=d,s[9]=t):t=s[9];let a;s[10]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx("span",{className:"text-sm text-muted-foreground",children:"Custom color"}),s[10]=a):a=s[10];let m;s[11]!==t?(m=e.jsxs("div",{className:"flex items-center gap-2",children:[t,a]}),s[11]=t,s[12]=m):m=s[12];let x;return s[13]!==u||s[14]!==m?(x=e.jsxs("div",{className:"space-y-3",children:[u,m]}),s[13]=u,s[14]=m,s[15]=x):x=s[15],x}$({name:f().min(1,"Name is required").max(200),slug:f().min(1,"Slug is required").max(100),description:f().max(1e3).optional(),bannerColor:f().nullable().optional()});function ge({open:l,onOpenChange:s}){const{org:r}=R(),i=k(),c=z(),[u,g]=M.useState(!1),d=O({connectionId:K,orgId:r.id}),t=T({mode:"onChange",defaultValues:{name:"",slug:"",description:"",bannerColor:"#3B82F6"}}),a=q({mutationFn:async n=>{const p=await d.callTool({name:"PROJECT_CREATE",arguments:{organizationId:r.id,slug:n.slug,name:n.name,description:n.description||null,enabledPlugins:[],ui:{banner:null,bannerColor:n.bannerColor??null,icon:null,themeColor:n.bannerColor??null}}});return p.structuredContent??p},onSuccess:n=>{c.invalidateQueries({queryKey:V.projects(r.id)}),B.success("Project created successfully"),s(!1),t.reset({name:"",slug:"",description:"",bannerColor:"#3B82F6"}),g(!1),i({to:"/$org/$project",params:{org:r.slug,project:n.project.slug}})},onError:n=>{B.error("Failed to create project: "+(n instanceof Error?n.message:"Unknown error"))}}),m=async n=>{if(!_(n.slug)){t.setError("slug",{message:"Slug must be lowercase alphanumeric with hyphens only"});return}if(n.slug===j){t.setError("slug",{message:`"${j}" is a reserved slug`});return}await a.mutateAsync(n)},x=n=>{const p=n.target.value;if(t.setValue("name",p),!u){const P=se(p);t.setValue("slug",P)}},o=n=>{g(!0),t.setValue("slug",n.target.value.toLowerCase().replace(/[^a-z0-9-]/g,""))},C=t.watch("bannerColor"),h=t.watch("slug"),b=t.watch("name"),y=h===j,E=h.length>0&&!_(h);return e.jsx(U,{open:l,onOpenChange:s,children:e.jsxs(G,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Create New Project"}),e.jsxs(Y,{children:["Set up a new project in ",r.name,". You can configure plugins and settings after creation."]})]}),e.jsx(W,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(m),className:"space-y-6",children:[e.jsx("div",{className:"h-20 rounded-lg relative",style:{backgroundColor:C??"#3B82F6"},children:e.jsx("div",{className:"absolute -bottom-4 left-4",children:e.jsx("div",{className:"size-12 rounded-lg border-2 border-background flex items-center justify-center text-lg font-semibold text-white",style:{backgroundColor:C??"#3B82F6"},children:b?.charAt(0)?.toUpperCase()||"P"})})}),e.jsxs("div",{className:"space-y-2 pt-4",children:[e.jsx(Z,{children:"Banner Color"}),e.jsx(ne,{value:C??null,onChange:n=>t.setValue("bannerColor",n)})]}),e.jsx(v,{control:t.control,name:"name",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Project Name *"}),e.jsx(S,{children:e.jsx(I,{value:b,onChange:x,placeholder:"My Awesome Project",autoFocus:!0,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"slug",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Slug *"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["/",r.slug,"/"]}),e.jsx(S,{children:e.jsx(I,{value:h,onChange:o,placeholder:"my-awesome-project",className:"flex-1",disabled:a.isPending})})]}),y&&e.jsxs("p",{className:"text-xs text-destructive",children:['"',j,'" is a reserved slug']}),E&&!y&&e.jsx("p",{className:"text-xs text-destructive",children:"Slug must be lowercase alphanumeric with hyphens only"}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"description",render:({field:n})=>e.jsxs(F,{children:[e.jsx(N,{children:"Description"}),e.jsx(S,{children:e.jsx(X,{...n,placeholder:"What is this project for?",rows:2,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsxs(H,{children:[e.jsx(D,{type:"button",variant:"outline",onClick:()=>s(!1),disabled:a.isPending,children:"Cancel"}),e.jsx(D,{type:"submit",disabled:a.isPending||y||E||!b||!h,children:a.isPending?"Creating...":"Create Project"})]})]})})]})})}export{ge as C};
@@ -1 +1 @@
1
- import{c as o,j as r}from"./index-DsOJvxnb.js";import{D as s}from"./danger-zone-C_4VhnMp.js";import"./useMutation-B_cFG709.js";import"./constants-XtX-WKGm.js";import"./input-CUT8DBv1.js";import"./alert-dialog-BVglQjyM.js";function n(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Danger Zone"}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),r.jsx(s,{})]}),t[0]=e):e=t[0],e}function f(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(n,{}),t[0]=e):e=t[0],e}export{f as default};
1
+ import{c as o,j as r}from"./index-BXUNq6d7.js";import{D as s}from"./danger-zone-e3foS_su.js";import"./useMutation-CkdHuTyE.js";import"./constants-CDL9XClm.js";import"./input-BFH8rk50.js";import"./alert-dialog-DgTufZ_p.js";function n(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Danger Zone"}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Irreversible and destructive actions."})]}),r.jsx(s,{})]}),t[0]=e):e=t[0],e}function f(){const t=o.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(n,{}),t[0]=e):e=t[0],e}export{f as default};
@@ -1 +1 @@
1
- import{c as B,u as G,e as J,x as Q,r as L,O as M,j as t,K as U,w as F,B as Z}from"./index-DsOJvxnb.js";import{u as H}from"./useMutation-B_cFG709.js";import{a as Y,u as z}from"./constants-XtX-WKGm.js";import{I as V}from"./input-CUT8DBv1.js";import{c as W,g as X,d as ee,b as te,A as se,e as le,h as ne,a as re,f as oe}from"./alert-dialog-BVglQjyM.js";function fe(){const e=B.c(45),{org:n,project:s}=G(),S=J(),E=Q(),[x,R]=L.useState(""),[P,k]=L.useState(!1),K=s.slug===M;let h;e[0]!==n.id?(h={connectionId:Y,orgId:n.id},e[0]=n.id,e[1]=h):h=e[1];const I=z(h);let r;e[2]!==I||e[3]!==s.id?(r=async()=>{const l=await I.callTool({name:"PROJECT_DELETE",arguments:{projectId:s.id}});return l.structuredContent??l},e[2]=I,e[3]=s.id,e[4]=r):r=e[4];let o;e[5]!==S||e[6]!==n.id||e[7]!==n.slug||e[8]!==E?(o=l=>{l.success?(E.invalidateQueries({queryKey:U.projects(n.id)}),F.success("Project deleted"),S({to:"/$org/$project/projects",params:{org:n.slug,project:M}})):F.error(l.message??"Failed to delete project")},e[5]=S,e[6]=n.id,e[7]=n.slug,e[8]=E,e[9]=o):o=e[9];let p;e[10]!==r||e[11]!==o?(p={mutationFn:r,onSuccess:o,onError:ae},e[10]=r,e[11]=o,e[12]=p):p=e[12];const g=H(p);if(K)return null;const $=x===s.name;let j;e[13]!==g?(j=()=>{g.mutate()},e[13]=g,e[14]=j):j=e[14];const O=j;let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=l=>{k(l),l||R("")},e[15]=b):b=e[15];const q=b;let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"Danger Zone"}),e[16]=D):D=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Delete Project"}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Permanently delete this project and all its data. This action cannot be undone."})]}),e[17]=v):v=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(X,{asChild:!0,children:t.jsx(Z,{variant:"outline",className:"shrink-0 bg-destructive/10 text-destructive border-0 hover:bg-destructive/15 hover:text-destructive",children:"Delete Project"})}),e[18]=_):_=e[18];let a;e[19]!==s.name?(a=t.jsxs(W,{children:['Delete "',s.name,'"?']}),e[19]=s.name,e[20]=a):a=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ee,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[21]=y):y=e[21];let i;e[22]!==a?(i=t.jsxs(te,{children:[a,y]}),e[22]=a,e[23]=i):i=e[23];let c;e[24]!==s.name?(c=t.jsxs("p",{className:"text-sm mb-2",children:["Type ",t.jsx("strong",{children:s.name})," to confirm:"]}),e[24]=s.name,e[25]=c):c=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=l=>R(l.target.value),e[26]=C):C=e[26];let d;e[27]!==x||e[28]!==s.name?(d=t.jsx(V,{value:x,onChange:C,placeholder:s.name}),e[27]=x,e[28]=s.name,e[29]=d):d=e[29];let m;e[30]!==c||e[31]!==d?(m=t.jsxs("div",{className:"py-4",children:[c,d]}),e[30]=c,e[31]=d,e[32]=m):m=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(se,{children:"Cancel"}),e[33]=A):A=e[33];const T=!$||g.isPending,w=g.isPending?"Deleting...":"Delete Project";let u;e[34]!==O||e[35]!==T||e[36]!==w?(u=t.jsxs(le,{children:[A,t.jsx(ne,{onClick:O,disabled:T,className:"bg-destructive/10 text-destructive hover:bg-destructive/15 hover:text-destructive border-0",children:w})]}),e[34]=O,e[35]=T,e[36]=w,e[37]=u):u=e[37];let f;e[38]!==i||e[39]!==m||e[40]!==u?(f=t.jsxs(re,{children:[i,m,u]}),e[38]=i,e[39]=m,e[40]=u,e[41]=f):f=e[41];let N;return e[42]!==P||e[43]!==f?(N=t.jsxs("div",{className:"flex flex-col",children:[D,t.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[v,t.jsxs(oe,{open:P,onOpenChange:q,children:[_,f]})]})]}),e[42]=P,e[43]=f,e[44]=N):N=e[44],N}function ae(e){F.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}export{fe as D};
1
+ import{c as B,u as G,e as J,x as Q,r as L,O as M,j as t,K as U,w as F,B as Z}from"./index-BXUNq6d7.js";import{u as H}from"./useMutation-CkdHuTyE.js";import{a as Y,u as z}from"./constants-CDL9XClm.js";import{I as V}from"./input-BFH8rk50.js";import{c as W,g as X,d as ee,b as te,A as se,e as le,h as ne,a as re,f as oe}from"./alert-dialog-DgTufZ_p.js";function fe(){const e=B.c(45),{org:n,project:s}=G(),S=J(),E=Q(),[x,R]=L.useState(""),[P,k]=L.useState(!1),K=s.slug===M;let h;e[0]!==n.id?(h={connectionId:Y,orgId:n.id},e[0]=n.id,e[1]=h):h=e[1];const I=z(h);let r;e[2]!==I||e[3]!==s.id?(r=async()=>{const l=await I.callTool({name:"PROJECT_DELETE",arguments:{projectId:s.id}});return l.structuredContent??l},e[2]=I,e[3]=s.id,e[4]=r):r=e[4];let o;e[5]!==S||e[6]!==n.id||e[7]!==n.slug||e[8]!==E?(o=l=>{l.success?(E.invalidateQueries({queryKey:U.projects(n.id)}),F.success("Project deleted"),S({to:"/$org/$project/projects",params:{org:n.slug,project:M}})):F.error(l.message??"Failed to delete project")},e[5]=S,e[6]=n.id,e[7]=n.slug,e[8]=E,e[9]=o):o=e[9];let p;e[10]!==r||e[11]!==o?(p={mutationFn:r,onSuccess:o,onError:ae},e[10]=r,e[11]=o,e[12]=p):p=e[12];const g=H(p);if(K)return null;const $=x===s.name;let j;e[13]!==g?(j=()=>{g.mutate()},e[13]=g,e[14]=j):j=e[14];const O=j;let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=l=>{k(l),l||R("")},e[15]=b):b=e[15];const q=b;let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"Danger Zone"}),e[16]=D):D=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Delete Project"}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Permanently delete this project and all its data. This action cannot be undone."})]}),e[17]=v):v=e[17];let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(X,{asChild:!0,children:t.jsx(Z,{variant:"outline",className:"shrink-0 bg-destructive/10 text-destructive border-0 hover:bg-destructive/15 hover:text-destructive",children:"Delete Project"})}),e[18]=_):_=e[18];let a;e[19]!==s.name?(a=t.jsxs(W,{children:['Delete "',s.name,'"?']}),e[19]=s.name,e[20]=a):a=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ee,{children:"This action cannot be undone. All project data will be permanently deleted."}),e[21]=y):y=e[21];let i;e[22]!==a?(i=t.jsxs(te,{children:[a,y]}),e[22]=a,e[23]=i):i=e[23];let c;e[24]!==s.name?(c=t.jsxs("p",{className:"text-sm mb-2",children:["Type ",t.jsx("strong",{children:s.name})," to confirm:"]}),e[24]=s.name,e[25]=c):c=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=l=>R(l.target.value),e[26]=C):C=e[26];let d;e[27]!==x||e[28]!==s.name?(d=t.jsx(V,{value:x,onChange:C,placeholder:s.name}),e[27]=x,e[28]=s.name,e[29]=d):d=e[29];let m;e[30]!==c||e[31]!==d?(m=t.jsxs("div",{className:"py-4",children:[c,d]}),e[30]=c,e[31]=d,e[32]=m):m=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(se,{children:"Cancel"}),e[33]=A):A=e[33];const T=!$||g.isPending,w=g.isPending?"Deleting...":"Delete Project";let u;e[34]!==O||e[35]!==T||e[36]!==w?(u=t.jsxs(le,{children:[A,t.jsx(ne,{onClick:O,disabled:T,className:"bg-destructive/10 text-destructive hover:bg-destructive/15 hover:text-destructive border-0",children:w})]}),e[34]=O,e[35]=T,e[36]=w,e[37]=u):u=e[37];let f;e[38]!==i||e[39]!==m||e[40]!==u?(f=t.jsxs(re,{children:[i,m,u]}),e[38]=i,e[39]=m,e[40]=u,e[41]=f):f=e[41];let N;return e[42]!==P||e[43]!==f?(N=t.jsxs("div",{className:"flex flex-col",children:[D,t.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[v,t.jsxs(oe,{open:P,onOpenChange:q,children:[_,f]})]})]}),e[42]=P,e[43]=f,e[44]=N):N=e[44],N}function ae(e){F.error("Failed to delete project: "+(e instanceof Error?e.message:"Unknown error"))}export{fe as D};
@@ -1 +1 @@
1
- import{c as K,j as t,u as ue,x as fe,r as pe,y as ne,K as ee,B as xe,w as re}from"./index-DsOJvxnb.js";import{u as he}from"./useQuery-D2ShO4od.js";import{u as oe}from"./useMutation-B_cFG709.js";import{a as je,b as ge,P as Ce}from"./popover-CF3EN_0o.js";import{C as be,a as Ne,b as ve,c as ye,d as Ee,e as Te}from"./command-ChmbB2jp.js";import{s as _e}from"./Plus-CT_Gcwl2.js";import{i as Ie}from"./X-B_f76BPZ.js";import{b as Pe}from"./use-connection-DmR852Js.js";import{a as Se,u as we}from"./constants-XtX-WKGm.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-CcA_QriT.js";import"./SearchMd-BLeX5weN.js";import"./use-collections-DSWhP4jg.js";function ie(e){const n=K.c(6),{icon:o,title:c}=e;if(o){let a;return n[0]!==o?(a=t.jsx("img",{src:o,alt:"",className:"size-5 shrink-0 rounded"}),n[0]=o,n[1]=a):a=n[1],a}let i;n[2]!==c?(i=c.charAt(0).toUpperCase(),n[2]=c,n[3]=i):i=n[3];let r;return n[4]!==i?(r=t.jsx("div",{className:"size-5 shrink-0 rounded bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:i})}),n[4]=i,n[5]=r):r=n[5],r}function Oe(){const e=K.c(72),{org:n,project:o}=ue();let c;e[0]!==n.id?(c={connectionId:Se,orgId:n.id},e[0]=n.id,e[1]=c):c=e[1];const i=we(c),r=fe(),a=Pe(),l=o.id??"",[Q,se]=pe.useState(!1);let d;e[2]!==l?(d=ee.projectConnections(l),e[2]=l,e[3]=d):d=e[3];const L=!!o.id;let m;e[4]!==i||e[5]!==l?(m=async()=>{const s=await i.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:l}});return te(s)},e[4]=i,e[5]=l,e[6]=m):m=e[6];let P;e[7]!==d||e[8]!==L||e[9]!==m?(P={queryKey:d,enabled:L,queryFn:m},e[7]=d,e[8]=L,e[9]=m,e[10]=P):P=e[10];const{data:$}=he(P);let S;e[11]!==$?.connections?(S=new Set(($?.connections??[]).map(Re)),e[11]=$?.connections,e[12]=S):S=e[12];const u=S;let w;e[13]!==u?(w=s=>u.has(s.id),e[13]=u,e[14]=w):w=e[14];const I=(a??[]).filter(w);let O;e[15]!==u?(O=s=>!u.has(s.id),e[15]=u,e[16]=O):O=e[16];const le=(a??[]).filter(O);let k;e[17]!==n.id||e[18]!==o.slug||e[19]!==l||e[20]!==r?(k=()=>{r.invalidateQueries({queryKey:ee.projectConnections(l)}),r.invalidateQueries({queryKey:ee.project(n.id,o.slug)})},e[17]=n.id,e[18]=o.slug,e[19]=l,e[20]=r,e[21]=k):k=e[21];const f=k;let p;e[22]!==i||e[23]!==o.id?(p=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[22]=i,e[23]=o.id,e[24]=p):p=e[24];let x;e[25]!==f?(x=()=>f(),e[25]=f,e[26]=x):x=e[26];let z;e[27]!==x||e[28]!==p?(z={mutationFn:p,onSuccess:x,onError:ze},e[27]=x,e[28]=p,e[29]=z):z=e[29];const J=oe(z);let h;e[30]!==i||e[31]!==o.id?(h=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_REMOVE",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[30]=i,e[31]=o.id,e[32]=h):h=e[32];let j;e[33]!==f?(j=()=>f(),e[33]=f,e[34]=j):j=e[34];let R;e[35]!==h||e[36]!==j?(R={mutationFn:h,onSuccess:j,onError:ke},e[35]=h,e[36]=j,e[37]=R):R=e[37];const A=oe(R);let F;e[38]!==J?(F=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=F):F=e[39];const U=F;let D;e[40]!==A?(D=s=>{A.mutate(s)},e[40]=A,e[41]=D):D=e[41];const ce=D,ae="space-y-4",B=ge;let g;e[42]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ce,{asChild:!0,children:t.jsxs(xe,{variant:"outline",size:"sm",className:"gap-1.5",children:[t.jsx(_e,{size:14}),"Add connection"]})}),e[42]=g):g=e[42];const G=je,de="w-72 p-0",me="start",V=ve;let C;e[43]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(ye,{placeholder:"Search connections..."}),e[43]=C):C=e[43];const Y=Ne;let b;e[44]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Ee,{children:"No connections found."}),e[44]=b):b=e[44];const H=be;let M;e[45]!==U?(M=s=>t.jsxs(Te,{value:s.title,onSelect:()=>U(s.id),children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsx("span",{className:"truncate",children:s.title}),t.jsx("span",{className:ne("ml-auto inline-block size-1.5 shrink-0 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]},s.id),e[45]=U,e[46]=M):M=e[46];const W=le.map(M);let N;e[47]!==H||e[48]!==W?(N=t.jsx(H,{children:W}),e[47]=H,e[48]=W,e[49]=N):N=e[49];let v;e[50]!==Y||e[51]!==b||e[52]!==N?(v=t.jsxs(Y,{children:[b,N]}),e[50]=Y,e[51]=b,e[52]=N,e[53]=v):v=e[53];let y;e[54]!==V||e[55]!==C||e[56]!==v?(y=t.jsxs(V,{children:[C,v]}),e[54]=V,e[55]=C,e[56]=v,e[57]=y):y=e[57];let E;e[58]!==G||e[59]!==y?(E=t.jsx(G,{className:de,align:me,children:y}),e[58]=G,e[59]=y,e[60]=E):E=e[60];let T;e[61]!==B||e[62]!==Q||e[63]!==g||e[64]!==E?(T=t.jsxs(B,{open:Q,onOpenChange:se,children:[g,E]}),e[61]=B,e[62]=Q,e[63]=g,e[64]=E,e[65]=T):T=e[65];const X=I.length>0&&t.jsx("div",{className:"flex flex-col",children:I.map(s=>t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border last:border-0",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),t.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s.connection_type}),t.jsx("span",{className:ne("inline-block size-1.5 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]})]})]}),t.jsx("button",{type:"button",onClick:()=>ce(s.id),disabled:A.isPending,className:"shrink-0 rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors",children:t.jsx(Ie,{size:14})})]},s.id))});let _;e[66]!==I.length?(_=I.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections added yet. Add connections from the organization to make them available in this project."}),e[66]=I.length,e[67]=_):_=e[67];let q;return e[68]!==T||e[69]!==X||e[70]!==_?(q=t.jsxs("div",{className:ae,children:[T,X,_]}),e[68]=T,e[69]=X,e[70]=_,e[71]=q):q=e[71],q}function ke(e){re.error("Failed to remove connection: "+(e instanceof Error?e.message:"Unknown error"))}function ze(e){re.error("Failed to add connection: "+(e instanceof Error?e.message:"Unknown error"))}function Re(e){return e.id}function Ae(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Connections"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose which organization connections are available to this project."})]}),t.jsx(Oe,{})]}),e[0]=n):n=e[0],n}function Ye(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ae,{}),e[0]=n):n=e[0],n}export{Ye as default};
1
+ import{c as K,j as t,u as ue,x as fe,r as pe,y as ne,K as ee,B as xe,w as re}from"./index-BXUNq6d7.js";import{u as he}from"./useQuery-Bmc4jnG2.js";import{u as oe}from"./useMutation-CkdHuTyE.js";import{a as je,b as ge,P as Ce}from"./popover-BcyJids_.js";import{C as be,a as Ne,b as ve,c as ye,d as Ee,e as Te}from"./command-CyHipwcz.js";import{s as _e}from"./Plus-CqWob4tu.js";import{i as Ie}from"./X-CeRZ6ROs.js";import{b as Pe}from"./use-connection-lXrlfojY.js";import{a as Se,u as we}from"./constants-CDL9XClm.js";import{u as te}from"./unwrap-tool-result-BYXdCQMg.js";import"./index-DlhaGZnK.js";import"./SearchMd-DJI6OMcD.js";import"./use-collections-yY78nnLx.js";function ie(e){const n=K.c(6),{icon:o,title:c}=e;if(o){let a;return n[0]!==o?(a=t.jsx("img",{src:o,alt:"",className:"size-5 shrink-0 rounded"}),n[0]=o,n[1]=a):a=n[1],a}let i;n[2]!==c?(i=c.charAt(0).toUpperCase(),n[2]=c,n[3]=i):i=n[3];let r;return n[4]!==i?(r=t.jsx("div",{className:"size-5 shrink-0 rounded bg-muted flex items-center justify-center",children:t.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:i})}),n[4]=i,n[5]=r):r=n[5],r}function Oe(){const e=K.c(72),{org:n,project:o}=ue();let c;e[0]!==n.id?(c={connectionId:Se,orgId:n.id},e[0]=n.id,e[1]=c):c=e[1];const i=we(c),r=fe(),a=Pe(),l=o.id??"",[Q,se]=pe.useState(!1);let d;e[2]!==l?(d=ee.projectConnections(l),e[2]=l,e[3]=d):d=e[3];const L=!!o.id;let m;e[4]!==i||e[5]!==l?(m=async()=>{const s=await i.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:l}});return te(s)},e[4]=i,e[5]=l,e[6]=m):m=e[6];let P;e[7]!==d||e[8]!==L||e[9]!==m?(P={queryKey:d,enabled:L,queryFn:m},e[7]=d,e[8]=L,e[9]=m,e[10]=P):P=e[10];const{data:$}=he(P);let S;e[11]!==$?.connections?(S=new Set(($?.connections??[]).map(Re)),e[11]=$?.connections,e[12]=S):S=e[12];const u=S;let w;e[13]!==u?(w=s=>u.has(s.id),e[13]=u,e[14]=w):w=e[14];const I=(a??[]).filter(w);let O;e[15]!==u?(O=s=>!u.has(s.id),e[15]=u,e[16]=O):O=e[16];const le=(a??[]).filter(O);let k;e[17]!==n.id||e[18]!==o.slug||e[19]!==l||e[20]!==r?(k=()=>{r.invalidateQueries({queryKey:ee.projectConnections(l)}),r.invalidateQueries({queryKey:ee.project(n.id,o.slug)})},e[17]=n.id,e[18]=o.slug,e[19]=l,e[20]=r,e[21]=k):k=e[21];const f=k;let p;e[22]!==i||e[23]!==o.id?(p=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_ADD",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[22]=i,e[23]=o.id,e[24]=p):p=e[24];let x;e[25]!==f?(x=()=>f(),e[25]=f,e[26]=x):x=e[26];let z;e[27]!==x||e[28]!==p?(z={mutationFn:p,onSuccess:x,onError:ze},e[27]=x,e[28]=p,e[29]=z):z=e[29];const J=oe(z);let h;e[30]!==i||e[31]!==o.id?(h=async s=>{const Z=await i.callTool({name:"PROJECT_CONNECTION_REMOVE",arguments:{projectId:o.id,connectionId:s}});te(Z)},e[30]=i,e[31]=o.id,e[32]=h):h=e[32];let j;e[33]!==f?(j=()=>f(),e[33]=f,e[34]=j):j=e[34];let R;e[35]!==h||e[36]!==j?(R={mutationFn:h,onSuccess:j,onError:ke},e[35]=h,e[36]=j,e[37]=R):R=e[37];const A=oe(R);let F;e[38]!==J?(F=s=>{se(!1),J.mutate(s)},e[38]=J,e[39]=F):F=e[39];const U=F;let D;e[40]!==A?(D=s=>{A.mutate(s)},e[40]=A,e[41]=D):D=e[41];const ce=D,ae="space-y-4",B=ge;let g;e[42]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ce,{asChild:!0,children:t.jsxs(xe,{variant:"outline",size:"sm",className:"gap-1.5",children:[t.jsx(_e,{size:14}),"Add connection"]})}),e[42]=g):g=e[42];const G=je,de="w-72 p-0",me="start",V=ve;let C;e[43]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(ye,{placeholder:"Search connections..."}),e[43]=C):C=e[43];const Y=Ne;let b;e[44]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(Ee,{children:"No connections found."}),e[44]=b):b=e[44];const H=be;let M;e[45]!==U?(M=s=>t.jsxs(Te,{value:s.title,onSelect:()=>U(s.id),children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsx("span",{className:"truncate",children:s.title}),t.jsx("span",{className:ne("ml-auto inline-block size-1.5 shrink-0 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]},s.id),e[45]=U,e[46]=M):M=e[46];const W=le.map(M);let N;e[47]!==H||e[48]!==W?(N=t.jsx(H,{children:W}),e[47]=H,e[48]=W,e[49]=N):N=e[49];let v;e[50]!==Y||e[51]!==b||e[52]!==N?(v=t.jsxs(Y,{children:[b,N]}),e[50]=Y,e[51]=b,e[52]=N,e[53]=v):v=e[53];let y;e[54]!==V||e[55]!==C||e[56]!==v?(y=t.jsxs(V,{children:[C,v]}),e[54]=V,e[55]=C,e[56]=v,e[57]=y):y=e[57];let E;e[58]!==G||e[59]!==y?(E=t.jsx(G,{className:de,align:me,children:y}),e[58]=G,e[59]=y,e[60]=E):E=e[60];let T;e[61]!==B||e[62]!==Q||e[63]!==g||e[64]!==E?(T=t.jsxs(B,{open:Q,onOpenChange:se,children:[g,E]}),e[61]=B,e[62]=Q,e[63]=g,e[64]=E,e[65]=T):T=e[65];const X=I.length>0&&t.jsx("div",{className:"flex flex-col",children:I.map(s=>t.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border last:border-0",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[t.jsx(ie,{icon:s.icon,title:s.title}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),t.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:s.connection_type}),t.jsx("span",{className:ne("inline-block size-1.5 rounded-full",s.status==="active"?"bg-success":s.status==="error"?"bg-destructive":"bg-muted-foreground")})]})]})]}),t.jsx("button",{type:"button",onClick:()=>ce(s.id),disabled:A.isPending,className:"shrink-0 rounded-md p-1 text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors",children:t.jsx(Ie,{size:14})})]},s.id))});let _;e[66]!==I.length?(_=I.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections added yet. Add connections from the organization to make them available in this project."}),e[66]=I.length,e[67]=_):_=e[67];let q;return e[68]!==T||e[69]!==X||e[70]!==_?(q=t.jsxs("div",{className:ae,children:[T,X,_]}),e[68]=T,e[69]=X,e[70]=_,e[71]=q):q=e[71],q}function ke(e){re.error("Failed to remove connection: "+(e instanceof Error?e.message:"Unknown error"))}function ze(e){re.error("Failed to add connection: "+(e instanceof Error?e.message:"Unknown error"))}function Re(e){return e.id}function Ae(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Connections"}),t.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose which organization connections are available to this project."})]}),t.jsx(Oe,{})]}),e[0]=n):n=e[0],n}function Ye(){const e=K.c(1);let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ae,{}),e[0]=n):n=e[0],n}export{Ye as default};
@@ -1 +1 @@
1
- import{c as n,j as i,R as g,y as c,z as u,T as m,D as x,F as j,H as N,G as b,a0 as D}from"./index-DsOJvxnb.js";import{i as h}from"./X-B_f76BPZ.js";function C(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(b,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(u,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(m,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{B as D,E as a,T as b,w as c,C as d,R as e,k as f};
1
+ import{c as n,j as i,R as g,y as c,z as u,T as m,D as x,F as j,H as N,G as b,a0 as D}from"./index-BXUNq6d7.js";import{i as h}from"./X-CeRZ6ROs.js";function C(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(b,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function w(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(u,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function T(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(m,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{B as D,E as a,T as b,w as c,C as d,R as e,k as f};
@@ -1 +1 @@
1
- import{r as p,c,j as l,aK as g,aL as x,y as u,aM as v,aN as b,aO as h,aP as w,aQ as j,aR as N,aS as f,aT as z,aU as y,aV as _,aW as M,aX as $}from"./index-DsOJvxnb.js";import{i as k}from"./Check-BfKCyKXX.js";import{i as D}from"./ChevronRight-1g9z-Z5h.js";const m=({size:o=24,color:e="currentColor",...t})=>p.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},p.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));m.displayName="Circle";function R(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(g,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(x,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,sideOffset:a,...s}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=l.jsx(v,{children:l.jsx(b,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function T(o){const e=c.c(12);let t,s,a,n;e[0]!==o?({className:t,inset:s,variant:n,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(d=l.jsx(j,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...a}),e[7]=s,e[8]=a,e[9]=i,e[10]=r,e[11]=d):d=e[11],d}function O(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:a,children:s,checked:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==a?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(f,{children:l.jsx(k,{className:"size-4"})})}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(d=l.jsxs(w,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function G(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx($,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(o){const e=c.c(11);let t,s,a;e[0]!==o?({className:s,children:t,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(f,{children:l.jsx(m,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==a||e[9]!==n?(i=l.jsxs(M,{"data-slot":"dropdown-menu-radio-item",className:n,...a,children:[r,t]}),e[7]=t,e[8]=a,e[9]=n,e[10]=i):i=e[10],i}function W(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,inset:s,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==n?(r=l.jsx(h,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...a}),e[6]=s,e[7]=a,e[8]=n,e[9]=r):r=e[9],r}function B(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=l.jsx(N,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}function K(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(z,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function Q(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:s,inset:a,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(D,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(d=l.jsxs(y,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,i]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function U(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=l.jsx(_,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}export{R as D,E as a,L as b,T as c,Q as d,K as e,U as f,W as g,B as h,P as i,G as j,m as k,O as l};
1
+ import{r as p,c,j as l,aK as g,aL as x,y as u,aM as v,aN as b,aO as h,aP as w,aQ as j,aR as N,aS as f,aT as z,aU as y,aV as _,aW as M,aX as $}from"./index-BXUNq6d7.js";import{i as k}from"./Check-7kB05ju_.js";import{i as D}from"./ChevronRight-Blv21S_7.js";const m=({size:o=24,color:e="currentColor",...t})=>p.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},p.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));m.displayName="Circle";function R(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(g,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function E(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(x,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,sideOffset:a,...s}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const n=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==n||e[8]!==r?(i=l.jsx(v,{children:l.jsx(b,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function T(o){const e=c.c(12);let t,s,a,n;e[0]!==o?({className:t,inset:s,variant:n,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);const r=n===void 0?"default":n;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let d;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(d=l.jsx(j,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...a}),e[7]=s,e[8]=a,e[9]=i,e[10]=r,e[11]=d):d=e[11],d}function O(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:a,children:s,checked:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==a?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(f,{children:l.jsx(k,{className:"size-4"})})}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(d=l.jsxs(w,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[i,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function G(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx($,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(o){const e=c.c(11);let t,s,a;e[0]!==o?({className:s,children:t,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:l.jsx(f,{children:l.jsx(m,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let i;return e[7]!==t||e[8]!==a||e[9]!==n?(i=l.jsxs(M,{"data-slot":"dropdown-menu-radio-item",className:n,...a,children:[r,t]}),e[7]=t,e[8]=a,e[9]=n,e[10]=i):i=e[10],i}function W(o){const e=c.c(10);let t,s,a;e[0]!==o?({className:t,inset:s,...a}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==n?(r=l.jsx(h,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...a}),e[6]=s,e[7]=a,e[8]=n,e[9]=r):r=e[9],r}function B(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=l.jsx(N,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}function K(o){const e=c.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(z,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function Q(o){const e=c.c(13);let t,s,a,n;e[0]!==o?({className:s,inset:a,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=s,e[3]=a,e[4]=n):(t=e[1],s=e[2],a=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(D,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let d;return e[8]!==t||e[9]!==a||e[10]!==n||e[11]!==r?(d=l.jsxs(y,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...n,children:[t,i]}),e[8]=t,e[9]=a,e[10]=n,e[11]=r,e[12]=d):d=e[12],d}function U(o){const e=c.c(8);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let n;return e[5]!==s||e[6]!==a?(n=l.jsx(_,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=n):n=e[7],n}export{R as D,E as a,L as b,T as c,Q as d,K as e,U as f,W as g,B as h,P as i,G as j,m as k,O as l};
@@ -0,0 +1 @@
1
+ import{c as A,u as W,g as D,f as X,K as Z,j as n,r as q,av as J,B as ee,J as te,bh as ne}from"./index-BXUNq6d7.js";import{i as E}from"./Loading01-Cbk1oNZ2.js";import{c as ie}from"./binder-BEJ4wRzw.js";import{P as $}from"./topbar-portal-CLOTo-7w.js";import{u as se}from"./useQuery-Bmc4jnG2.js";import{b as oe}from"./use-connection-lXrlfojY.js";import{a as le,u as re,f as ce}from"./constants-CDL9XClm.js";import{t as ae}from"./Settings01-BWkL3Bf9.js";import{P as v}from"./index-rWegviRE.js";import"./use-collections-yY78nnLx.js";import"./useMutation-CkdHuTyE.js";import"./tooltip-BGPUMzDS.js";import"./index-L6huQtcJ.js";function de(t,e){return t?t.filter(m=>ie(m,e)):[]}function R(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function me(t){const e=A.c(35),{binding:m,renderHeader:f,renderEmptyState:i}=t,{org:o,project:l}=W();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const{org:r,project:g,pluginId:u}=D(a),Q=oe(),{data:y}=X.useSession();let b;e[1]!==o.id?(b={connectionId:le,orgId:o.id},e[1]=o.id,e[2]=b):b=e[2];const H=re(b);let x;e[3]!==u||e[4]!==l.id?(x=Z.projectPluginConfig(l.id??"",u),e[3]=u,e[4]=l.id,e[5]=x):x=e[5];let p;e[6]!==u||e[7]!==l.id||e[8]!==H?(p=async()=>{const s=await H.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:u}});return s.structuredContent??s},e[6]=u,e[7]=l.id,e[8]=H,e[9]=p):p=e[9];const T=!!l.id&&!!u;let _;e[10]!==x||e[11]!==p||e[12]!==T?(_={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=_):_=e[13];const{data:U,isLoading:Y}=se(_),F=de(Q,m),K=U?.config?.connectionId,j=K?F.find(s=>s.id===K):null,P=ce({connectionId:j?.id,orgId:o.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:o.id,slug:o.slug,name:o.name};if(Y){let s;return e[14]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(E,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=s):s=e[14],s}if(F.length===0){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[15]!==i?(c=i(),e[15]=i,e[16]=c):c=e[16];let d;return e[17]!==c?(d=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:c}),e[17]=c,e[18]=d):d=e[18],n.jsx($,{value:s,children:d})}if(!j){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let c;e[19]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ae,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=c):c=e[19];const d=r??o.slug,O=g??l.slug??"";let L;return e[20]!==d||e[21]!==O?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[c,n.jsx(ee,{asChild:!0,children:n.jsx(te,{to:"/$org/$project/settings",params:{org:d,project:O},children:"Go to Project Settings"})})]}),e[20]=d,e[21]=O,e[22]=L):L=e[22],n.jsx($,{value:s,children:L})}let S;e[23]!==P?(S=(s,c)=>P?P.callTool({name:s,arguments:c}).then(fe):Promise.reject(new Error("MCP client is not available")),e[23]=P,e[24]=S):S=e[24];const V={connectionId:j.id,connection:R(j),toolCaller:S,org:z,session:w},B=v,G=v,k=v,M=f({connections:[R(j)],selectedConnectionId:j.id,onConnectionChange:ue});let h;e[25]!==M||e[26]!==k.Header.Left?(h=n.jsx(k.Header.Left,{children:M}),e[25]=M,e[26]=k.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(v.Content,{children:n.jsx(q.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(E,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(J,{})})}),e[31]=N):N=e[31];let I;return e[32]!==B||e[33]!==C?(I=n.jsxs(B,{children:[C,N]}),e[32]=B,e[33]=C,e[34]=I):I=e[34],n.jsx($,{value:V,children:I})}function ue(){}function fe(t){return t.structuredContent??t}function Le(){const t=A.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=D(e);let f;t[1]!==m?(f=ne.find(r=>r.id===m),t[1]=m,t[2]=f):f=t[2];const i=f;if(i?.renderHeader&&i?.renderEmptyState&&i?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(E,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let g;return t[4]!==i.binding||t[5]!==i.renderEmptyState||t[6]!==i.renderHeader?(g=n.jsx(q.Suspense,{fallback:r,children:n.jsx(me,{binding:i.binding,renderHeader:i.renderHeader,renderEmptyState:i.renderEmptyState})}),t[4]=i.binding,t[5]=i.renderEmptyState,t[6]=i.renderHeader,t[7]=g):g=t[7],g}const o=i?.LayoutComponent;if(!o){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(J,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(E,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let a;return t[10]!==o?(a=n.jsx(q.Suspense,{fallback:l,children:n.jsx(o,{})}),t[10]=o,t[11]=a):a=t[11],a}export{Le as default};