@decocms/mesh 2.76.0 → 2.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/client/assets/{AlertCircle-TbirTaeA.js → AlertCircle-BppvLQSd.js} +1 -1
  2. package/dist/client/assets/{ArrowUp-DVhz9MPT.js → ArrowUp-D26ZQKRa.js} +1 -1
  3. package/dist/client/assets/{Calendar-BhleOqT-.js → Calendar-DDieAsd2.js} +1 -1
  4. package/dist/client/assets/{Check-BIlnRzi6.js → Check-bgVFNRDs.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-CSYoAEm3.js → CheckCircle-D5tJhsvc.js} +1 -1
  6. package/dist/client/assets/{CheckDone01-gZo2F6uL.js → CheckDone01-dY3WtOge.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-jAfIG9nZ.js → ChevronDown-DY4fpd0G.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-CNYkXy1u.js → ChevronRight-DMzFQQCc.js} +1 -1
  9. package/dist/client/assets/{Code01-DeVT5m93.js → Code01-7hV4ZDjZ.js} +1 -1
  10. package/dist/client/assets/{Copy01-BJPi2nBZ.js → Copy01-C35WeFYE.js} +1 -1
  11. package/dist/client/assets/{DotsHorizontal-CZIcl0Ye.js → DotsHorizontal-LbVwX-Tq.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CPJps54j.js → DotsVertical-BNqPYTki.js} +1 -1
  13. package/dist/client/assets/{Download01-BVA62GFI.js → Download01-Cihql6Z7.js} +1 -1
  14. package/dist/client/assets/{Edit01-CLT1AKyh.js → Edit01-DDrpQJgk.js} +1 -1
  15. package/dist/client/assets/{File02-M7e4eeKQ.js → File02-GEmd_G7y.js} +1 -1
  16. package/dist/client/assets/{File06-BUOJeS0C.js → File06-888BgyfZ.js} +1 -1
  17. package/dist/client/assets/{FilterLines-CDkZPaiO.js → FilterLines-Bvkz4XO7.js} +1 -1
  18. package/dist/client/assets/{Globe02-CNtZ4Mz7.js → Globe02-DSX2gzp_.js} +1 -1
  19. package/dist/client/assets/{Grid01-BhCIE3UE.js → Grid01-CfSiTcO8.js} +1 -1
  20. package/dist/client/assets/{Home02-Zp_wVezk.js → Home02-PhQXF8P6.js} +1 -1
  21. package/dist/client/assets/{Image01-Bmljn0R6.js → Image01-BUR65REQ.js} +1 -1
  22. package/dist/client/assets/{Inbox01-Bz-1SNbb.js → Inbox01-Bhe6QhSW.js} +1 -1
  23. package/dist/client/assets/{InfoCircle-DutDNmXq.js → InfoCircle-5NZyA5WD.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-npl2D9IH.js → LinkExternal01-Cr89LzOE.js} +1 -1
  25. package/dist/client/assets/{List-B95opsr5.js → List-BBkbo-oe.js} +1 -1
  26. package/dist/client/assets/{Loading01-CudhqwtJ.js → Loading01-C2vqzEw-.js} +1 -1
  27. package/dist/client/assets/{Lock01-C3j5poil.js → Lock01-ClMI2bMm.js} +1 -1
  28. package/dist/client/assets/{Pin01-DpTwe7GO.js → Pin01-uiXGtZsb.js} +1 -1
  29. package/dist/client/assets/{Play-BxFFyAEF.js → Play-Bm8SKfhZ.js} +1 -1
  30. package/dist/client/assets/{Plus-BVPnBK8D.js → Plus-BMOTPGqH.js} +1 -1
  31. package/dist/client/assets/{RefreshCcw01-Dzlid7sh.js → RefreshCcw01-B1tus5Lj.js} +1 -1
  32. package/dist/client/assets/{SearchMd-yRVgOeax.js → SearchMd-BqVXNd65.js} +1 -1
  33. package/dist/client/assets/{Settings01-DGIrqZBI.js → Settings01-CYRp4gjN.js} +1 -1
  34. package/dist/client/assets/{Settings02-CW4MK9LY.js → Settings02-BiTxgSpC.js} +1 -1
  35. package/dist/client/assets/{Share07-BKNvns4q.js → Share07-BZVoNuS6.js} +1 -1
  36. package/dist/client/assets/{Terminal-DV_yPRWa.js → Terminal-DRpoCIsG.js} +1 -1
  37. package/dist/client/assets/{Tool01-C0EKLKq5.js → Tool01-djk7g7Hv.js} +1 -1
  38. package/dist/client/assets/{Trash01-py7ft8Od.js → Trash01-d4v7i3Ze.js} +1 -1
  39. package/dist/client/assets/{Upload01-CCoXEdI4.js → Upload01-Ci_jklEk.js} +1 -1
  40. package/dist/client/assets/{Users03-D2F2bran.js → Users03-Bw7fWrTD.js} +1 -1
  41. package/dist/client/assets/{X-CixxHrye.js → X-CslJd5Ib.js} +1 -1
  42. package/dist/client/assets/{XClose-S1Me7eeg.js → XClose-CjpNuP8c.js} +1 -1
  43. package/dist/client/assets/{agent-connections-preview-DZgc-mir.js → agent-connections-preview-qFrRTce9.js} +1 -1
  44. package/dist/client/assets/{agent-detail-DPLDxB9n.js → agent-detail-BqrAf6oD.js} +1 -1
  45. package/dist/client/assets/{agents-CynO2-IY.js → agents-DUQt1GSW.js} +1 -1
  46. package/dist/client/assets/{alert-dialog-B1nWkQHx.js → alert-dialog-DRso9X1m.js} +1 -1
  47. package/dist/client/assets/{auth-catchall-CJ49F7Eq.js → auth-catchall-CBFb2pC-.js} +1 -1
  48. package/dist/client/assets/{avatar-BbH9O0kN.js → avatar-kY9raA-l.js} +1 -1
  49. package/dist/client/assets/{badge-C898LHvV.js → badge-DBw6AEaX.js} +1 -1
  50. package/dist/client/assets/{binder-xcUkLvPC.js → binder-Jddq1y1v.js} +1 -1
  51. package/dist/client/assets/{breadcrumb-t_Ccp20G.js → breadcrumb-ChH6wfcA.js} +1 -1
  52. package/dist/client/assets/{button-C1iesapY.js → button-D_OpQIQm.js} +1 -1
  53. package/dist/client/assets/{card-DKzkS6ji.js → card-DAZxrY9k.js} +1 -1
  54. package/dist/client/assets/{checkbox-B82l7mBw.js → checkbox-C1Sx9y02.js} +1 -1
  55. package/dist/client/assets/{circle-alert-_5s_KbQk.js → circle-alert-DHI8xRUj.js} +1 -1
  56. package/dist/client/assets/{collection-detail-B-hnHfhu.js → collection-detail-mD5cqpxJ.js} +1 -1
  57. package/dist/client/assets/{collection-search-D3a5_1zR.js → collection-search-Bkd4qN8a.js} +1 -1
  58. package/dist/client/assets/{collection-tab-Y58MHDMK.js → collection-tab-Dw5b9EM9.js} +1 -1
  59. package/dist/client/assets/{collection-table-wrapper-B6XWzQ-4.js → collection-table-wrapper-DFTdnQhc.js} +1 -1
  60. package/dist/client/assets/{collection-tabs-BPHWDFL4.js → collection-tabs-N53MF1Jz.js} +1 -1
  61. package/dist/client/assets/{command-DepzRVHX.js → command-B5nNM5RC.js} +1 -1
  62. package/dist/client/assets/{connect-OP0J5SPJ.js → connect--hPmG576.js} +1 -1
  63. package/dist/client/assets/{connection-card-DkCny6Ez.js → connection-card-Ci3H_H7r.js} +1 -1
  64. package/dist/client/assets/{connection-detail-CdLleACg.js → connection-detail-8nT6j66Y.js} +1 -1
  65. package/dist/client/assets/{connections-BZUVvBGs.js → connections-ShazCLrP.js} +1 -1
  66. package/dist/client/assets/constants-1u4R2d-I.js +1 -0
  67. package/dist/client/assets/{constants-BEco_-y7.js → constants-DisdEZ3l.js} +1 -1
  68. package/dist/client/assets/{create-organization-dialog-58b_GUv7.js → create-organization-dialog-Ca5pwwfH.js} +1 -1
  69. package/dist/client/assets/{create-project-dialog-C5GAJOOY.js → create-project-dialog-BDfz4rOz.js} +1 -1
  70. package/dist/client/assets/{dialog-CpkgwzHW.js → dialog-BPL7ZvPc.js} +1 -1
  71. package/dist/client/assets/{dropdown-menu-D6YYwFq7.js → dropdown-menu-BxLN4KkF.js} +1 -1
  72. package/dist/client/assets/{dynamic-plugin-layout-BMgNBEQS.js → dynamic-plugin-layout-D9dQ0ajA.js} +1 -1
  73. package/dist/client/assets/{empty-state-BQPtoYZe.js → empty-state-CbIU_RrP.js} +1 -1
  74. package/dist/client/assets/{empty-state-CH3e4Xzf.js → empty-state-DXJM9xrV.js} +1 -1
  75. package/dist/client/assets/{env-vars-editor-Vpi1vdW2.js → env-vars-editor-BbjrljLQ.js} +1 -1
  76. package/dist/client/assets/{error-boundary-BGFWaL1J.js → error-boundary-BMH0CjEH.js} +1 -1
  77. package/dist/client/assets/{extract-connection-data-CDmQ7rLP.js → extract-connection-data-wB5jtXsg.js} +1 -1
  78. package/dist/client/assets/{file-browser-DUDclrRh.js → file-browser-DBOCTon5.js} +2 -2
  79. package/dist/client/assets/{form-NA0-x5iN.js → form-BpiblhO1.js} +1 -1
  80. package/dist/client/assets/{grid-view-DbtTgaoS.js → grid-view-Bty4YwjE.js} +1 -1
  81. package/dist/client/assets/{home-DtmWz3MA.js → home-BIvstm5O.js} +1 -1
  82. package/dist/client/assets/{index-Kq8ytqk9.js → index--vZ0X2xS.js} +1 -1
  83. package/dist/client/assets/{index-wUnd_o-U.js → index-B9-4goiW.js} +1 -1
  84. package/dist/client/assets/{index-HxeE9C0A.js → index-BKpxPW_G.js} +2 -2
  85. package/dist/client/assets/{index-GRocoNYa.js → index-BV_k_ZyP.js} +1 -1
  86. package/dist/client/assets/{index-C9Dn0opW.js → index-B_142IPp.js} +1 -1
  87. package/dist/client/assets/{index-DlY6KFzI.js → index-CnNzyZrg.js} +1 -1
  88. package/dist/client/assets/{index-43_iGxlN.js → index-D-_nr7La.js} +1 -1
  89. package/dist/client/assets/{index-Dv4saiJc.js → index-D0nVkmnC.js} +1 -1
  90. package/dist/client/assets/{index-ByJoFAq_.js → index-fVGDVKMq.js} +1 -1
  91. package/dist/client/assets/{infiniteQueryObserver-CSOdbqFL.js → infiniteQueryObserver-B8M15Jhm.js} +1 -1
  92. package/dist/client/assets/{input-DBGu1Yhi.js → input-lpAGMNlp.js} +1 -1
  93. package/dist/client/assets/{integration-icon-CmJggqPx.js → integration-icon-DFSc5_D8.js} +1 -1
  94. package/dist/client/assets/{label-11d5Pe_w.js → label-h0it3r-G.js} +1 -1
  95. package/dist/client/assets/{layout-BQSZy0Ao.js → layout-DaBTH10o.js} +1 -1
  96. package/dist/client/assets/{localstorage-keys-BxVB7BFB.js → localstorage-keys-CrJngaoW.js} +1 -1
  97. package/dist/client/assets/{login-CMpn2tdR.js → login-DX4NlTrd.js} +1 -1
  98. package/dist/client/assets/{mcp-oauth-JrpxCLx4.js → mcp-oauth-DQYLB8aB.js} +1 -1
  99. package/dist/client/assets/{mcp-server-card-8DET7nVd.js → mcp-server-card-fBAhOAUG.js} +1 -1
  100. package/dist/client/assets/{mcp-server-detail-CMrzxsYv.js → mcp-server-detail-BZkrf0kt.js} +2 -2
  101. package/dist/client/assets/{members-CUWgr5ku.js → members-BigA6ZKR.js} +1 -1
  102. package/dist/client/assets/{monaco-editor-DvJ6AQm-.js → monaco-editor-DZSx9WV6.js} +1 -1
  103. package/dist/client/assets/{monitoring-Db1K0NxK.js → monitoring-cMb0Xapp.js} +1 -1
  104. package/dist/client/assets/{oauth-callback-Bh-LWKIz.js → oauth-callback-CjSC6FG1.js} +1 -1
  105. package/dist/client/assets/{page-Bx3m0Nlj.js → page-BDwNfQ-N.js} +1 -1
  106. package/dist/client/assets/{page-79TZOOqo.js → page-jq7pkske.js} +1 -1
  107. package/dist/client/assets/{plugin-empty-state-34Wj3C93.js → plugin-empty-state-CIjn_En1.js} +1 -1
  108. package/dist/client/assets/{plugin-header-KrvIXXbF.js → plugin-header-DxKd-JRE.js} +1 -1
  109. package/dist/client/assets/{popover-BbAo_V3q.js → popover-ESVk6nXT.js} +1 -1
  110. package/dist/client/assets/{project-layout-QE2hcM6x.js → project-layout-DOGEQwDl.js} +1 -1
  111. package/dist/client/assets/{project-settings-2bxHgR8P.js → project-settings-DPjoRdOS.js} +1 -1
  112. package/dist/client/assets/{projects-list-CSrfAb2G.js → projects-list-BSPk4OqL.js} +1 -1
  113. package/dist/client/assets/{registry-utils-CLfG2KJO.js → registry-utils-yxVJe3X4.js} +1 -1
  114. package/dist/client/assets/{resizable-D5fgPQWp.js → resizable-fcBWjaSA.js} +1 -1
  115. package/dist/client/assets/{select-CnIfeZ9k.js → select-BbzYJ4VF.js} +1 -1
  116. package/dist/client/assets/{shell-layout-DIuzNmm5.js → shell-layout-DlF3XvPK.js} +1 -1
  117. package/dist/client/assets/{spinner-BbdUl9_5.js → spinner-Lv2khbLw.js} +1 -1
  118. package/dist/client/assets/{store-invite-eQ6O_LcC.js → store-invite-Bg3OdZwq.js} +1 -1
  119. package/dist/client/assets/{switch-7wa9WQCt.js → switch-sdaV-SJo.js} +1 -1
  120. package/dist/client/assets/{table-F_F9uG31.js → table-BxUix49E.js} +1 -1
  121. package/dist/client/assets/{tasks-Bo849zPQ.js → tasks-Bl2i_lGW.js} +1 -1
  122. package/dist/client/assets/{textarea-CX1AXmSo.js → textarea-BRJpMcB0.js} +1 -1
  123. package/dist/client/assets/{tools-list-CeBZ5K9_.js → tools-list-Cmzz8Wet.js} +1 -1
  124. package/dist/client/assets/{topbar-portal-DTnSGvrH.js → topbar-portal-bqTUj07t.js} +1 -1
  125. package/dist/client/assets/{typewriter-title-CydscG0b.js → typewriter-title-BPMIdq0b.js} +1 -1
  126. package/dist/client/assets/{use-binding-BIvDtNoa.js → use-binding-DMsO_03X.js} +1 -1
  127. package/dist/client/assets/{use-connection-DWpxH8iy.js → use-connection-B0740Saa.js} +1 -1
  128. package/dist/client/assets/{use-create-virtual-mcp-CMegJpH_.js → use-create-virtual-mcp-lh01_aoW.js} +1 -1
  129. package/dist/client/assets/{use-deco-chat-open-DeBMXnMx.js → use-deco-chat-open-B2KYtTue.js} +2 -2
  130. package/dist/client/assets/{use-install-from-registry-CNdLBCwL.js → use-install-from-registry-BjKzt3Pz.js} +1 -1
  131. package/dist/client/assets/{use-list-state-CqdwrHCA.js → use-list-state-DNfSCsX5.js} +1 -1
  132. package/dist/client/assets/{use-llm-B2BVGott.js → use-llm-D28vq8-j.js} +1 -1
  133. package/dist/client/assets/{use-mcp-prompts-CUow6VVK.js → use-mcp-prompts-FoVTG9k7.js} +1 -1
  134. package/dist/client/assets/{use-mcp-tools-DO_-llbI.js → use-mcp-tools-DF65_5AL.js} +1 -1
  135. package/dist/client/assets/{use-mobile-CqANtQ4e.js → use-mobile-Cu9U-yCu.js} +1 -1
  136. package/dist/client/assets/{use-organization-settings-ANLw4ex1.js → use-organization-settings-CPNBbiln.js} +1 -1
  137. package/dist/client/assets/{use-project-C1G7xlcy.js → use-project-CuNldV92.js} +1 -1
  138. package/dist/client/assets/{use-virtual-mcp-DaI2d98r.js → use-virtual-mcp-BUCuQhrG.js} +1 -1
  139. package/dist/client/assets/useInfiniteQuery-CsMrU_k5.js +1 -0
  140. package/dist/client/assets/{useMutation-M3-wug2Q.js → useMutation-Bnsod7M-.js} +1 -1
  141. package/dist/client/assets/useQuery-Bo6lCSyK.js +1 -0
  142. package/dist/client/assets/utils-Ckp7rFN8.js +1 -0
  143. package/dist/client/assets/{view-mode-toggle-JVmuLwXe.js → view-mode-toggle-4jMhv4Z3.js} +1 -1
  144. package/dist/client/assets/{workflow-BKKAfuJP.js → workflow-BrBoF9SG.js} +1 -1
  145. package/dist/client/index.html +1 -1
  146. package/dist/server/cli.js +152 -149
  147. package/dist/server/server.js +127 -124
  148. package/package.json +1 -1
  149. package/dist/client/assets/constants-gwxE8_b0.js +0 -1
  150. package/dist/client/assets/useInfiniteQuery-CL3o6Gdm.js +0 -1
  151. package/dist/client/assets/useQuery-jRtVXI31.js +0 -1
  152. package/dist/client/assets/utils-D1Qd9-I_.js +0 -1
@@ -1 +1 @@
1
- import{r as _,j as t,b6 as dt,a3 as xe,an as Ne,b5 as mt,av as ut,a_ as ft,am as pt,at as xt,b7 as Ue,aq as ht,c as T,u as he,V as gt,s as bt,t as Oe,m as jt,a as vt,O as He,br as Nt,k as yt,h as Ct,aM as _t,n as Tt}from"./index-HxeE9C0A.js";import{i as St,a as wt,b as kt,u as It,C as Et,c as At}from"./use-deco-chat-open-DeBMXnMx.js";import{E as Ot}from"./empty-state-CH3e4Xzf.js";import{E as pe,i as Dt}from"./error-boundary-BGFWaL1J.js";import{I as ge,T as ce,c as ye,b as de,a as me}from"./integration-icon-CmJggqPx.js";import{I as $t,R as Rt,a as Lt,S as Pt,P as zt}from"./index-GRocoNYa.js";import{B as De}from"./badge-C898LHvV.js";import{B as X}from"./button-C1iesapY.js";import{I as Ve}from"./input-DBGu1Yhi.js";import{S as Mt}from"./switch-7wa9WQCt.js";import{T as Vt}from"./textarea-CX1AXmSo.js";import{h as Ft,f as Bt}from"./use-connection-DWpxH8iy.js";import{u as Gt,a as Ut}from"./use-virtual-mcp-DaI2d98r.js";import{i as We}from"./ChevronRight-CNYkXy1u.js";import{n as Ht}from"./select-CnIfeZ9k.js";import{i as $e}from"./File02-M7e4eeKQ.js";import{i as Ke}from"./Loading01-CudhqwtJ.js";import{i as Wt}from"./Play-BxFFyAEF.js";import{s as Fe}from"./Plus-BVPnBK8D.js";import{i as Kt}from"./Share07-BKNvns4q.js";import{a as Re}from"./Tool01-C0EKLKq5.js";import{B as qt,a as Jt,b as Be,d as Yt,e as Zt,c as Qt}from"./breadcrumb-t_Ccp20G.js";import{a as Xt,V as es}from"./layout-BQSZy0Ao.js";import{C as ts}from"./collection-search-D3a5_1zR.js";import{C as Le}from"./checkbox-B82l7mBw.js";import{e as ss,a as qe,D as Je,b as ls,c as os}from"./dialog-CpkgwzHW.js";import{c as J}from"./utils-D1Qd9-I_.js";import{u as Pe}from"./constants-BEco_-y7.js";import{c as ns}from"./use-mcp-tools-DO_-llbI.js";import{c as rs,u as is}from"./use-mcp-prompts-CUow6VVK.js";import{s as Ye}from"./slugify-CEUa2lfQ.js";import{i as Ze}from"./Check-BIlnRzi6.js";import{i as as}from"./Code01-DeVT5m93.js";import{a as cs}from"./Copy01-BJPi2nBZ.js";import{i as Ce}from"./InfoCircle-DutDNmXq.js";import{A as ds}from"./agent-connections-preview-DZgc-mir.js";import"./use-llm-B2BVGott.js";import"./use-binding-BIvDtNoa.js";import"./binder-xcUkLvPC.js";import"./useQuery-jRtVXI31.js";import"./localstorage-keys-BxVB7BFB.js";import"./useMutation-M3-wug2Q.js";import"./popover-BbAo_V3q.js";import"./ChevronDown-jAfIG9nZ.js";import"./File06-BUOJeS0C.js";import"./Grid01-BhCIE3UE.js";import"./Image01-Bmljn0R6.js";import"./RefreshCcw01-Dzlid7sh.js";import"./SearchMd-yRVgOeax.js";import"./index-ByJoFAq_.js";import"./Pin01-DpTwe7GO.js";import"./use-organization-settings-ANLw4ex1.js";import"./index-wUnd_o-U.js";import"./X-CixxHrye.js";import"./infiniteQueryObserver-CSOdbqFL.js";const Qe=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.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"}));Qe.displayName="Circle";const Xe=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3m4-13h3m-3 5h3M2 9h3m-3 5h3m4.8 5h4.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 16.72 19 15.88 19 14.2V9.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C16.72 5 15.88 5 14.2 5H9.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C5 7.28 5 8.12 5 9.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C7.28 19 8.12 19 9.8 19Z"}));Xe.displayName="CpuChip02";const be=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));be.displayName="CubeOutline";var je="Tabs",[ms]=ht(je,[Ue]),et=Ue(),[us,ze]=ms(je),tt=_.forwardRef((o,e)=>{const{__scopeTabs:s,value:r,onValueChange:l,defaultValue:n,orientation:c="horizontal",dir:i,activationMode:a="automatic",...m}=o,u=ft(i),[d,f]=pt({prop:r,onChange:l,defaultProp:n??"",caller:je});return t.jsx(us,{scope:s,baseId:xt(),value:d,onValueChange:f,orientation:c,dir:u,activationMode:a,children:t.jsx(xe.div,{dir:u,"data-orientation":c,...m,ref:e})})});tt.displayName=je;var st="TabsList",lt=_.forwardRef((o,e)=>{const{__scopeTabs:s,loop:r=!0,...l}=o,n=ze(st,s),c=et(s);return t.jsx(mt,{asChild:!0,...c,orientation:n.orientation,dir:n.dir,loop:r,children:t.jsx(xe.div,{role:"tablist","aria-orientation":n.orientation,...l,ref:e})})});lt.displayName=st;var ot="TabsTrigger",nt=_.forwardRef((o,e)=>{const{__scopeTabs:s,value:r,disabled:l=!1,...n}=o,c=ze(ot,s),i=et(s),a=at(c.baseId,r),m=ct(c.baseId,r),u=r===c.value;return t.jsx(dt,{asChild:!0,...i,focusable:!l,active:u,children:t.jsx(xe.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":m,"data-state":u?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:a,...n,ref:e,onMouseDown:Ne(o.onMouseDown,d=>{!l&&d.button===0&&d.ctrlKey===!1?c.onValueChange(r):d.preventDefault()}),onKeyDown:Ne(o.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&c.onValueChange(r)}),onFocus:Ne(o.onFocus,()=>{const d=c.activationMode!=="manual";!u&&!l&&d&&c.onValueChange(r)})})})});nt.displayName=ot;var rt="TabsContent",it=_.forwardRef((o,e)=>{const{__scopeTabs:s,value:r,forceMount:l,children:n,...c}=o,i=ze(rt,s),a=at(i.baseId,r),m=ct(i.baseId,r),u=r===i.value,d=_.useRef(u);return _.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),t.jsx(ut,{present:l||u,children:({present:f})=>t.jsx(xe.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":a,hidden:!f,id:m,tabIndex:0,...c,ref:e,style:{...o.style,animationDuration:d.current?"0s":void 0},children:f&&n})})});it.displayName=rt;function at(o,e){return`${o}-trigger-${e}`}function ct(o,e){return`${o}-content-${e}`}var fs=tt,ps=lt,xs=nt,hs=it;function gs(o){const e=T.c(10);let s,r,l;e[0]!==o?({className:s,variant:l,...r}=o,e[0]=o,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);const n=l===void 0?"pill":l;let c;e[4]!==s?(c=J("flex flex-col gap-2",s),e[4]=s,e[5]=c):c=e[5];let i;return e[6]!==r||e[7]!==c||e[8]!==n?(i=t.jsx(fs,{"data-slot":"tabs","data-variant":n,className:c,...r}),e[6]=r,e[7]=c,e[8]=n,e[9]=i):i=e[9],i}function bs(o){const e=T.c(11);let s,r,l;e[0]!==o?({className:s,variant:l,...r}=o,e[0]=o,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);const n=l||"pill",c=n==="underline"?"flex h-[52px] items-center border-b border-border":n==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==s||e[5]!==c?(i=J(c,s),e[4]=s,e[5]=c,e[6]=i):i=e[6];let a;return e[7]!==n||e[8]!==r||e[9]!==i?(a=t.jsx(ps,{"data-slot":"tabs-list","data-variant":n,className:i,...r}),e[7]=n,e[8]=r,e[9]=i,e[10]=a):a=e[10],a}function _e(o){const e=T.c(11);let s,r,l;e[0]!==o?({className:s,variant:l,...r}=o,e[0]=o,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);const n=l||"pill",c=n==="underline"?"cursor-pointer flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-foreground disabled:pointer-events-none disabled:opacity-50":n==="canvas"?"cursor-pointer flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==s||e[5]!==c?(i=J(c,s),e[4]=s,e[5]=c,e[6]=i):i=e[6];let a;return e[7]!==n||e[8]!==r||e[9]!==i?(a=t.jsx(xs,{"data-slot":"tabs-trigger","data-variant":n,className:i,...r}),e[7]=n,e[8]=r,e[9]=i,e[10]=a):a=e[10],a}function Te(o){const e=T.c(8);let s,r;e[0]!==o?({className:s,...r}=o,e[0]=o,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=J("flex-1 outline-none h-full",s),e[3]=s,e[4]=l):l=e[4];let n;return e[5]!==r||e[6]!==l?(n=t.jsx(hs,{"data-slot":"tabs-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=n):n=e[7],n}function Se(o){return o===null?"all":o?.length??0}function js(o,e){const s=o[e];if(!s)return"";const r=[];return s.tools===null?r.push("all tools"):s.tools&&s.tools.length>0&&r.push(`${s.tools.length} tools`),s.resources===null?r.push("all resources"):s.resources&&s.resources.length>0&&r.push(`${s.resources.length} resources`),s.prompts===null?r.push("all prompts"):s.prompts&&s.prompts.length>0&&r.push(`${s.prompts.length} prompts`),r.join(", ")}function vs(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const Ns={tools:null,resources:null,prompts:null};function we(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(Ke,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function ke(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Dt,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function ys(o){const e=T.c(18),{item:s,isSelected:r,onToggle:l,disabled:n}=o,c=n?"cursor-not-allowed opacity-50":"cursor-pointer",i=r?"bg-accent/25":"hover:bg-muted/50";let a;e[0]!==c||e[1]!==i?(a=J("flex items-start gap-3 p-4 rounded-lg transition-colors",c,i),e[0]=c,e[1]=i,e[2]=a):a=e[2];let m;e[3]!==s.name?(m=t.jsx("p",{className:"text-sm font-medium leading-none",children:s.name}),e[3]=s.name,e[4]=m):m=e[4];let u;e[5]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[5]=s.description,e[6]=u):u=e[6];let d;e[7]!==m||e[8]!==u?(d=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[m,u]}),e[7]=m,e[8]=u,e[9]=d):d=e[9];let f;e[10]!==n||e[11]!==r||e[12]!==l?(f=t.jsx(Le,{checked:r,onCheckedChange:l,disabled:n,className:"mt-0.5"}),e[10]=n,e[11]=r,e[12]=l,e[13]=f):f=e[13];let h;return e[14]!==a||e[15]!==d||e[16]!==f?(h=t.jsxs("label",{className:a,children:[d,f]}),e[14]=a,e[15]=d,e[16]=f,e[17]=h):h=e[17],h}function Me(o){const e=T.c(32),{items:s,selections:r,onToggle:l,onToggleAll:n,emptyMessage:c,disabled:i}=o;let a,m,u,d,f;if(e[0]!==i||e[1]!==c||e[2]!==s||e[3]!==l||e[4]!==n||e[5]!==r){f=Symbol.for("react.early_return_sentinel");e:{const p=s.map(Cs);if(s.length===0){let C;e[11]!==c?(C=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:c})}),e[11]=c,e[12]=C):C=e[12],f=C;break e}u="flex flex-col h-full";const N=i?"cursor-not-allowed opacity-50":"cursor-pointer";let j;e[13]!==N?(j=J("flex items-start gap-3 p-4",N),e[13]=N,e[14]=j):j=e[14];let v;e[15]!==s.length?(v=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=v):v=e[16];const g=r===null;let y;e[17]!==i||e[18]!==n||e[19]!==g?(y=t.jsx(Le,{checked:g,onCheckedChange:n,disabled:i,className:"mt-0.5"}),e[17]=i,e[18]=n,e[19]=g,e[20]=y):y=e[20],e[21]!==y||e[22]!==j||e[23]!==v?(d=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:j,children:[v,y]})}),e[21]=y,e[22]=j,e[23]=v,e[24]=d):d=e[24],a="flex-1 overflow-auto px-4 py-3 space-y-1",m=s.map(C=>t.jsx(ys,{item:C,isSelected:r===null||r?.includes(C.id),onToggle:()=>l(C.id,p),disabled:i},C.id))}e[0]=i,e[1]=c,e[2]=s,e[3]=l,e[4]=n,e[5]=r,e[6]=a,e[7]=m,e[8]=u,e[9]=d,e[10]=f}else a=e[6],m=e[7],u=e[8],d=e[9],f=e[10];if(f!==Symbol.for("react.early_return_sentinel"))return f;let h;e[25]!==a||e[26]!==m?(h=t.jsx("div",{className:a,children:m}),e[25]=a,e[26]=m,e[27]=h):h=e[27];let x;return e[28]!==u||e[29]!==d||e[30]!==h?(x=t.jsxs("div",{className:u,children:[d,h]}),e[28]=u,e[29]=d,e[30]=h,e[31]=x):x=e[31],x}function Cs(o){return o.id}function _s(o){const e=T.c(13),{connectionId:s,selections:r,onToggle:l,onToggleAll:n,disabled:c}=o,{org:i}=he();let a;e[0]!==s||e[1]!==i.id?(a={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=a):a=e[2];const m=Pe(a);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:d}=ns(u);let f;e[5]!==d.tools?(f=d.tools.map(Ts),e[5]=d.tools,e[6]=f):f=e[6];const h=f;let x;return e[7]!==c||e[8]!==h||e[9]!==l||e[10]!==n||e[11]!==r?(x=t.jsx(Me,{items:h,selections:r,onToggle:l,onToggleAll:n,emptyMessage:"No tools available",disabled:c}),e[7]=c,e[8]=h,e[9]=l,e[10]=n,e[11]=r,e[12]=x):x=e[12],x}function Ts(o){return{id:o.name,name:o.name,description:o.description}}function Ss(o){const e=T.c(13),{connectionId:s,selections:r,onToggle:l,onToggleAll:n,disabled:c}=o,{org:i}=he();let a;e[0]!==s||e[1]!==i.id?(a={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=a):a=e[2];const m=Pe(a);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:d}=rs(u);let f;e[5]!==d.resources?(f=d.resources.map(ws),e[5]=d.resources,e[6]=f):f=e[6];const h=f;let x;return e[7]!==c||e[8]!==h||e[9]!==l||e[10]!==n||e[11]!==r?(x=t.jsx(Me,{items:h,selections:r,onToggle:l,onToggleAll:n,emptyMessage:"No resources available",disabled:c}),e[7]=c,e[8]=h,e[9]=l,e[10]=n,e[11]=r,e[12]=x):x=e[12],x}function ws(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function ks(o){const e=T.c(13),{connectionId:s,selections:r,onToggle:l,onToggleAll:n,disabled:c}=o,{org:i}=he();let a;e[0]!==s||e[1]!==i.id?(a={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=a):a=e[2];const m=Pe(a);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:d}=is(u);let f;e[5]!==d.prompts?(f=d.prompts.map(Is),e[5]=d.prompts,e[6]=f):f=e[6];const h=f;let x;return e[7]!==c||e[8]!==h||e[9]!==l||e[10]!==n||e[11]!==r?(x=t.jsx(Me,{items:h,selections:r,onToggle:l,onToggleAll:n,emptyMessage:"No prompts available",disabled:c}),e[7]=c,e[8]=h,e[9]=l,e[10]=n,e[11]=r,e[12]=x):x=e[12],x}function Is(o){return{id:o.name,name:o.name,description:o.description}}function Es(o){const e=T.c(24),{connection:s,isSelected:r,hasSelections:l,summary:n,onClick:c,onToggleAll:i,disabled:a}=o,m=a?"cursor-not-allowed opacity-50":"cursor-pointer",u=r?"bg-accent":"hover:bg-muted/50";let d;e[0]!==m||e[1]!==u?(d=J("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",m,u),e[0]=m,e[1]=u,e[2]=d):d=e[2];const f=a?void 0:c;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(ge,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=h):h=e[5];let x;e[6]!==s.title?(x=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=x):x=e[7];let p;e[8]!==l||e[9]!==n?(p=l&&n&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),e[8]=l,e[9]=n,e[10]=p):p=e[10];let N;e[11]!==x||e[12]!==p?(N=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[x,p]}),e[11]=x,e[12]=p,e[13]=N):N=e[13];let j;e[14]!==a||e[15]!==l||e[16]!==i?(j=t.jsx(Le,{checked:l,onCheckedChange:i,onClick:As,disabled:a,className:"shrink-0"}),e[14]=a,e[15]=l,e[16]=i,e[17]=j):j=e[17];let v;return e[18]!==d||e[19]!==f||e[20]!==h||e[21]!==N||e[22]!==j?(v=t.jsxs("div",{className:d,onClick:f,children:[h,N,j]}),e[18]=d,e[19]=f,e[20]=h,e[21]=N,e[22]=j,e[23]=v):v=e[23],v}function As(o){return o.stopPropagation()}function Os(o){const e=T.c(22),{allConnections:s,searchTerm:r,selectedId:l,hasSelections:n,getSelectionSummary:c,onConnectionClick:i,onToggleAll:a,disabled:m}=o;let u;e[0]!==s||e[1]!==r?(u=r?s.filter(x=>x.title.toLowerCase().includes(r.toLowerCase())||x.description?.toLowerCase().includes(r.toLowerCase())):s,e[0]=s,e[1]=r,e[2]=u):u=e[2];const d=u;if(d.length===0){const x=r?"No connections found":"No connections available";let p;return e[3]!==x?(p=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:x}),e[3]=x,e[4]=p):p=e[4],p}let f;if(e[5]!==m||e[6]!==d||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==a||e[11]!==l){let x;e[13]!==m||e[14]!==c||e[15]!==n||e[16]!==i||e[17]!==a||e[18]!==l?(x=p=>t.jsx(Es,{connection:p,isSelected:l===p.id,hasSelections:n(p.id),summary:c(p.id),onClick:()=>i(p.id),onToggleAll:()=>a(p.id),disabled:m},p.id),e[13]=m,e[14]=c,e[15]=n,e[16]=i,e[17]=a,e[18]=l,e[19]=x):x=e[19],f=d.map(x),e[5]=m,e[6]=d,e[7]=c,e[8]=n,e[9]=i,e[10]=a,e[11]=l,e[12]=f}else f=e[12];let h;return e[20]!==f?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:f}),e[20]=f,e[21]=h):h=e[21],h}function Ds(o){const e=T.c(75),{currentConnection:s,activeTab:r,selectedId:l,formData:n,toggleTool:c,toggleResource:i,togglePrompt:a,toggleAllTools:m,toggleAllResources:u,toggleAllPrompts:d,onTabChange:f}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(ge,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=h):h=e[2];let x;e[3]!==s.title?(x=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=x):x=e[4];let p;e[5]!==s.description?(p=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=p):p=e[6];let N;e[7]!==x||e[8]!==p?(N=t.jsxs("div",{className:"flex-1 min-w-0",children:[x,p]}),e[7]=x,e[8]=p,e[9]=N):N=e[9];let j;e[10]!==h||e[11]!==N?(j=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,N]})}),e[10]=h,e[11]=N,e[12]=j):j=e[12];let v;e[13]!==f?(v=F=>f(F),e[13]=f,e[14]=v):v=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsxs(_e,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Re,{size:16}),"Tools"]}),e[15]=g):g=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(_e,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=y):y=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(bs,{variant:"underline",className:"shrink-0 px-6",children:[g,y,t.jsxs(_e,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx($e,{size:16}),"Prompts"]})]}),e[17]=C):C=e[17];let z;e[18]===Symbol.for("react.memo_cache_sentinel")?(z=ke("Tools not supported by this server"),e[18]=z):z=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(we,{}),e[19]=w):w=e[19];let O;e[20]!==n||e[21]!==l?(O=n[l]?n[l].tools:[],e[20]=n,e[21]=l,e[22]=O):O=e[22];let S;e[23]!==l||e[24]!==c?(S=(F,Z)=>c(l,F,Z),e[23]=l,e[24]=c,e[25]=S):S=e[25];let k;e[26]!==l||e[27]!==m?(k=()=>m(l),e[26]=l,e[27]=m,e[28]=k):k=e[28];let E;e[29]!==l||e[30]!==O||e[31]!==S||e[32]!==k?(E=t.jsx(Te,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:z,children:t.jsx(_.Suspense,{fallback:w,children:t.jsx(_s,{connectionId:l,selections:O,onToggle:S,onToggleAll:k})})})}),e[29]=l,e[30]=O,e[31]=S,e[32]=k,e[33]=E):E=e[33];let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=ke("Resources not supported by this server"),e[34]=D):D=e[34];let L;e[35]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(we,{}),e[35]=L):L=e[35];let I;e[36]!==n||e[37]!==l?(I=n[l]?n[l].resources:[],e[36]=n,e[37]=l,e[38]=I):I=e[38];let A;e[39]!==l||e[40]!==i?(A=(F,Z)=>i(l,F,Z),e[39]=l,e[40]=i,e[41]=A):A=e[41];let $;e[42]!==l||e[43]!==u?($=()=>u(l),e[42]=l,e[43]=u,e[44]=$):$=e[44];let P;e[45]!==l||e[46]!==I||e[47]!==A||e[48]!==$?(P=t.jsx(Te,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:D,children:t.jsx(_.Suspense,{fallback:L,children:t.jsx(Ss,{connectionId:l,selections:I,onToggle:A,onToggleAll:$})})})}),e[45]=l,e[46]=I,e[47]=A,e[48]=$,e[49]=P):P=e[49];let q;e[50]===Symbol.for("react.memo_cache_sentinel")?(q=ke("Prompts not supported by this server"),e[50]=q):q=e[50];let Y;e[51]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(we,{}),e[51]=Y):Y=e[51];let B;e[52]!==n||e[53]!==l?(B=n[l]?n[l].prompts:[],e[52]=n,e[53]=l,e[54]=B):B=e[54];let W;e[55]!==l||e[56]!==a?(W=(F,Z)=>a(l,F,Z),e[55]=l,e[56]=a,e[57]=W):W=e[57];let G;e[58]!==l||e[59]!==d?(G=()=>d(l),e[58]=l,e[59]=d,e[60]=G):G=e[60];let K;e[61]!==l||e[62]!==B||e[63]!==W||e[64]!==G?(K=t.jsx(Te,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:q,children:t.jsx(_.Suspense,{fallback:Y,children:t.jsx(ks,{connectionId:l,selections:B,onToggle:W,onToggleAll:G})})})}),e[61]=l,e[62]=B,e[63]=W,e[64]=G,e[65]=K):K=e[65];let U;e[66]!==r||e[67]!==E||e[68]!==P||e[69]!==K||e[70]!==v?(U=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(gs,{value:r,onValueChange:v,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[C,E,P,K]})}),e[66]=r,e[67]=E,e[68]=P,e[69]=K,e[70]=v,e[71]=U):U=e[71];let H;return e[72]!==U||e[73]!==j?(H=t.jsxs(t.Fragment,{children:[j,U]}),e[72]=U,e[73]=j,e[74]=H):H=e[74],H}function $s(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function Ie(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function Rs(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const Ge=(o,e)=>o.find(s=>s.id===e)??o[0];function Ls(o){const e=T.c(79),{open:s,onOpenChange:r,selectedId:l,form:n,connections:c}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const a=Ft(i);let m;e[1]!==a||e[2]!==l?(m=Ge(a,l)?.id??null,e[1]=a,e[2]=l,e[3]=m):m=e[3];let u;e[4]!==m?(u={activeTab:"tools",searchTerm:"",selectedId:m},e[4]=m,e[5]=u):u=e[5];const[d,f]=_.useReducer(Rs,u);let h;e[6]!==c?(h=c??[],e[6]=c,e[7]=h):h=e[7];let x;e[8]!==h?(x=$s(h),e[8]=h,e[9]=x):x=e[9];const p=x;let N;e[10]!==a||e[11]!==d.selectedId?(N=Ge(a,d.selectedId),e[10]=a,e[11]=d.selectedId,e[12]=N):N=e[12];const j=N;let v;e[13]!==p?(v=b=>vs(p,b),e[13]=p,e[14]=v):v=e[14];const g=v;let y;e[15]!==p?(y=b=>js(p,b),e[15]=p,e[16]=y):y=e[16];const C=y;let z;e[17]!==n||e[18]!==p?(z=(b,R,M,Q)=>{const ie=p[b]?.[R];let V;ie===null?V=Q.filter(ve=>ve!==M):ie?.includes(M)?V=ie.filter(ve=>ve!==M):(V=[...ie??[],M],V.length===Q.length&&(V=null));const ae={...p};ae[b]?ae[b]={...ae[b]}:ae[b]={tools:null,resources:null,prompts:null},ae[b][R]=V,n.setValue("connections",Ie(ae),{shouldDirty:!0,shouldTouch:!0})},e[17]=n,e[18]=p,e[19]=z):z=e[19];const w=z;let O;e[20]!==n||e[21]!==p?(O=(b,R)=>{const ie=p[b]?.[R]===null?[]:null,V={...p};V[b]?V[b]={...V[b]}:V[b]={tools:null,resources:null,prompts:null},V[b][R]=ie,n.setValue("connections",Ie(V),{shouldDirty:!0,shouldTouch:!0})},e[20]=n,e[21]=p,e[22]=O):O=e[22];const S=O;let k;e[23]!==w?(k=(b,R,M)=>w(b,"tools",R,M),e[23]=w,e[24]=k):k=e[24];const E=k;let D;e[25]!==w?(D=(b,R,M)=>w(b,"resources",R,M),e[25]=w,e[26]=D):D=e[26];const L=D;let I;e[27]!==w?(I=(b,R,M)=>w(b,"prompts",R,M),e[27]=w,e[28]=I):I=e[28];const A=I;let $;e[29]!==S?($=b=>S(b,"tools"),e[29]=S,e[30]=$):$=e[30];const P=$;let q;e[31]!==S?(q=b=>S(b,"resources"),e[31]=S,e[32]=q):q=e[32];const Y=q;let B;e[33]!==S?(B=b=>S(b,"prompts"),e[33]=S,e[34]=B):B=e[34];const W=B;let G;e[35]!==n||e[36]!==p?(G=b=>{const R=p[b],M=R&&R.tools===null&&R.resources===null&&R.prompts===null,Q={...p};M?delete Q[b]:Q[b]=Ns,n.setValue("connections",Ie(Q),{shouldDirty:!0,shouldTouch:!0})},e[35]=n,e[36]=p,e[37]=G):G=e[37];const K=G;let U;e[38]!==a||e[39]!==r||e[40]!==l?(U=b=>{b&&f({type:"RESET",payload:{selectedId:l,firstConnectionId:a[0]?.id??null}}),r(b)},e[38]=a,e[39]=r,e[40]=l,e[41]=U):U=e[41];const H=U;let F;e[42]===Symbol.for("react.memo_cache_sentinel")?(F=b=>{f({type:"SELECT_CONNECTION",payload:b})},e[42]=F):F=e[42];const Z=F;let ue;e[43]===Symbol.for("react.memo_cache_sentinel")?(ue=b=>f({type:"SET_SEARCH_TERM",payload:b}),e[43]=ue):ue=e[43];let ee;e[44]!==d.searchTerm?(ee=t.jsx(ts,{value:d.searchTerm,onChange:ue,placeholder:"Search connections..."}),e[44]=d.searchTerm,e[45]=ee):ee=e[45];let te;e[46]!==a||e[47]!==d.searchTerm||e[48]!==d.selectedId||e[49]!==C||e[50]!==g||e[51]!==K?(te=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(Os,{allConnections:a,searchTerm:d.searchTerm,selectedId:d.selectedId,hasSelections:g,getSelectionSummary:C,onConnectionClick:Z,onToggleAll:K})}),e[46]=a,e[47]=d.searchTerm,e[48]=d.selectedId,e[49]=C,e[50]=g,e[51]=K,e[52]=te):te=e[52];let se;e[53]!==ee||e[54]!==te?(se=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[ee,te]}),e[53]=ee,e[54]=te,e[55]=se):se=e[55];let le;e[56]!==j||e[57]!==d.activeTab||e[58]!==d.selectedId||e[59]!==p||e[60]!==W||e[61]!==Y||e[62]!==P||e[63]!==A||e[64]!==L||e[65]!==E?(le=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:j&&d.selectedId?t.jsx(Ds,{currentConnection:j,activeTab:d.activeTab,selectedId:d.selectedId,formData:p,toggleTool:E,toggleResource:L,togglePrompt:A,toggleAllTools:P,toggleAllResources:Y,toggleAllPrompts:W,onTabChange:b=>f({type:"SET_ACTIVE_TAB",payload:b})},d.selectedId):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[56]=j,e[57]=d.activeTab,e[58]=d.selectedId,e[59]=p,e[60]=W,e[61]=Y,e[62]=P,e[63]=A,e[64]=L,e[65]=E,e[66]=le):le=e[66];let oe;e[67]!==se||e[68]!==le?(oe=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[se,le]}),e[67]=se,e[68]=le,e[69]=oe):oe=e[69];let ne;e[70]!==H?(ne=t.jsx(ss,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(X,{variant:"outline",onClick:()=>H(!1),children:"Done"})}),e[70]=H,e[71]=ne):ne=e[71];let re;e[72]!==oe||e[73]!==ne?(re=t.jsxs(qe,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[oe,ne]}),e[72]=oe,e[73]=ne,e[74]=re):re=e[74];let fe;return e[75]!==H||e[76]!==s||e[77]!==re?(fe=t.jsx(Je,{open:s,onOpenChange:H,children:re}),e[75]=H,e[76]=s,e[77]=re,e[78]=fe):fe=e[78],fe}const Ps=gt.pick({title:!0,description:!0,status:!0,metadata:!0,connections:!0}).extend({title:bt().min(1,"Name is required").max(255)});function zs(o){const e=T.c(8);let s,r;e[0]!==o?({className:s,...r}=o,e[0]=o,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=J("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let n;return e[5]!==r||e[6]!==l?(n=t.jsx(Rt,{"data-slot":"radio-group",className:l,...r}),e[5]=r,e[6]=l,e[7]=n):n=e[7],n}function Ee(o){const e=T.c(9);let s,r;e[0]!==o?({className:s,...r}=o,e[0]=o,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=J("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Lt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Qe,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=n):n=e[5];let c;return e[6]!==r||e[7]!==l?(c=t.jsx($t,{"data-slot":"radio-group-item",className:l,...r,children:n}),e[6]=r,e[7]=l,e[8]=c):c=e[8],c}function Ms(o){const s=new TextEncoder().encode(o),r=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(r)}function Vs(o){const e=T.c(10),{url:s}=o,[r,l]=_.useState(!1);let n;e[0]!==s?(n=async()=>{await navigator.clipboard.writeText(s),l(!0),Oe.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=n):n=e[1];const c=n;let i;e[2]!==r?(i=r?t.jsx(Ze,{size:20,className:"text-green-600"}):t.jsx(cs,{size:20}),e[2]=r,e[3]=i):i=e[3];const a=r?"Copied!":"Copy URL";let m;e[4]!==a?(m=t.jsx("span",{className:"text-xs font-medium",children:a}),e[4]=a,e[5]=m):m=e[5];let u;return e[6]!==c||e[7]!==i||e[8]!==m?(u=t.jsxs(X,{type:"button",variant:"outline",onClick:c,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[i,m]}),e[6]=c,e[7]=i,e[8]=m,e[9]=u):u=e[9],u}function Fs(o){const e=T.c(7),{url:s,serverName:r}=o;let l;e[0]!==r||e[1]!==s?(l=()=>{const m=Ye(r),d=Ms(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),f=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(m)}&config=${encodeURIComponent(d)}`;window.open(f,"_blank"),Oe.success("Opening Cursor...")},e[0]=r,e[1]=s,e[2]=l):l=e[2];const n=l;let c,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),i=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=c,e[4]=i):(c=e[3],i=e[4]);let a;return e[5]!==n?(a=t.jsxs(X,{type:"button",variant:"outline",onClick:n,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[c,i]}),e[5]=n,e[6]=a):a=e[6],a}function Bs(o){const e=T.c(11),{url:s,serverName:r}=o,[l,n]=_.useState(!1);let c;e[0]!==r||e[1]!==s?(c=async()=>{const f=Ye(r),x=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),p=`claude mcp add-json "${f}" '${x.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(p),n(!0),Oe.success("Claude Code command copied to clipboard"),setTimeout(()=>n(!1),2e3)},e[0]=r,e[1]=s,e[2]=c):c=e[2];const i=c;let a;e[3]!==l?(a=l?t.jsx(Ze,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=a):a=e[4];const m=l?"Copied!":"Install on Claude";let u;e[5]!==m?(u=t.jsx("span",{className:"text-xs font-medium",children:m}),e[5]=m,e[6]=u):u=e[6];let d;return e[7]!==i||e[8]!==a||e[9]!==u?(d=t.jsxs(X,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,u]}),e[7]=i,e[8]=a,e[9]=u,e[10]=d):d=e[10],d}function Gs(o){const e=T.c(40),{open:s,onOpenChange:r,virtualMcp:l}=o,[n,c]=_.useState("code_execution");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=P=>{(P==="passthrough"||P==="smart_tool_selection"||P==="code_execution")&&c(P)},e[0]=i):i=e[0];const a=i;let m;e[1]!==n||e[2]!==l.id?(m=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),m.searchParams.set("mode",n),e[1]=n,e[2]=l.id,e[3]=m):m=e[3];let u;e[4]!==l.id||e[5]!==l.title?(u=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=u):u=e[6];const d=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ls,{children:t.jsx(os,{children:"Share Agent"})}),e[7]=f):f=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=h):h=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(St,{className:"size-5 text-muted-foreground"})}),e[9]=x):x=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=p):p=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(ce,{asChild:!0,children:t.jsx(Ce,{className:"size-3.5 text-muted-foreground"})}),e[11]=N):N=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[x,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[p,t.jsx(ye,{children:t.jsxs(de,{children:[N,t.jsx(me,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(Ee,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=j):j=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(wt,{className:"size-5 text-muted-foreground"})}),e[13]=v):v=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=g):g=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ce,{asChild:!0,children:t.jsx(Ce,{className:"size-3.5 text-muted-foreground"})}),e[15]=y):y=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[v,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[g,t.jsx(ye,{children:t.jsxs(de,{children:[y,t.jsx(me,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(Ee,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=C):C=e[16];let z;e[17]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(as,{className:"size-5 text-muted-foreground"})}),e[17]=z):z=e[17];let w;e[18]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=w):w=e[18];let O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ce,{asChild:!0,children:t.jsx(Ce,{className:"size-3.5 text-muted-foreground"})}),e[19]=O):O=e[19];let S;e[20]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[z,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[w,t.jsx(ye,{children:t.jsxs(de,{children:[O,t.jsx(me,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(Ee,{id:"mode-code",value:"code_execution"}),t.jsx(De,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=S):S=e[20];let k;e[21]!==n?(k=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(zs,{value:n,onValueChange:a,className:"flex flex-col gap-4.5",children:[j,C,S]})]}),e[21]=n,e[22]=k):k=e[22];let E;e[23]!==m.href?(E=t.jsx(Vs,{url:m.href}),e[23]=m.href,e[24]=E):E=e[24];let D,L;e[25]!==d||e[26]!==m.href?(D=t.jsx(Fs,{url:m.href,serverName:d}),L=t.jsx(Bs,{url:m.href,serverName:d}),e[25]=d,e[26]=m.href,e[27]=D,e[28]=L):(D=e[27],L=e[28]);let I;e[29]!==E||e[30]!==D||e[31]!==L?(I=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[E,D,L]})}),e[29]=E,e[30]=D,e[31]=L,e[32]=I):I=e[32];let A;e[33]!==k||e[34]!==I?(A=t.jsxs(qe,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[f,t.jsxs("div",{className:"flex flex-col gap-6",children:[k,I]})]}),e[33]=k,e[34]=I,e[35]=A):A=e[35];let $;return e[36]!==r||e[37]!==s||e[38]!==A?($=t.jsx(Je,{open:s,onOpenChange:r,children:A}),e[36]=r,e[37]=s,e[38]=A,e[39]=$):$=e[39],$}function Us(o,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...o,shareDialogOpen:e.payload};case"SET_CONNECTION_DIALOG_OPEN":return{...o,connectionDialogOpen:e.payload};case"SET_EDITING_CONNECTION_ID":return{...o,editingConnectionId:e.payload};case"SET_SKILLS_OPEN":return{...o,skillsOpen:e.payload};default:return o}}function Ae(o){const e=T.c(27),{connection_id:s,selected_tools:r,selected_resources:l,selected_prompts:n,onClick:c}=o,i=Bt(s);if(!i)return null;let a;e[0]!==r?(a=Se(r),e[0]=r,e[1]=a):a=e[1];const m=a;let u;e[2]!==l?(u=Se(l),e[2]=l,e[3]=u):u=e[3];const d=u;let f;e[4]!==n?(f=Se(n),e[4]=n,e[5]=f):f=e[5];const h=f;let x;e[6]!==i.icon||e[7]!==i.title?(x=t.jsx(ge,{icon:i.icon,name:i.title,size:"xs"}),e[6]=i.icon,e[7]=i.title,e[8]=x):x=e[8];let p;e[9]!==i.title?(p=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:i.title}),e[9]=i.title,e[10]=p):p=e[10];let N;e[11]!==m?(N=m!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:m==="all"?"all":m}),t.jsx(Re,{size:12})]}),e[11]=m,e[12]=N):N=e[12];let j;e[13]!==d?(j=d!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:d==="all"?"all":d}),t.jsx(be,{size:12})]}),e[13]=d,e[14]=j):j=e[14];let v;e[15]!==h?(v=h!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:h==="all"?"all":h}),t.jsx($e,{size:12})]}),e[15]=h,e[16]=v):v=e[16];let g;e[17]!==N||e[18]!==j||e[19]!==v?(g=t.jsxs(De,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[N,j,v]}),e[17]=N,e[18]=j,e[19]=v,e[20]=g):g=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(We,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=y):y=e[21];let C;return e[22]!==c||e[23]!==x||e[24]!==p||e[25]!==g?(C=t.jsxs("div",{onClick:c,className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border hover:bg-accent/50 transition-colors cursor-pointer",children:[x,p,g,y]}),e[22]=c,e[23]=x,e[24]=p,e[25]=g,e[26]=C):C=e[26],C}Ae.Fallback=function(){return t.jsxs("div",{className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border",children:[t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"flex-1 h-4 rounded bg-muted animate-pulse"}),t.jsxs(De,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Re,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(be,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx($e,{size:12})]})]}),t.jsx(We,{size:16,className:"text-muted-foreground shrink-0"})]})};function Hs({virtualMcp:o}){const{org:e}=he(),r=Nt().location.href,l=Ut(),n=yt({resolver:Ct(Ps),defaultValues:o}),c=n.watch("connections"),[i,a]=_.useReducer(Us,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,m]=kt(),{setVirtualMcpId:u}=It();_.useEffect(()=>{m(!0),u(o.id)},[o.id]);const d=()=>{u(o.id),m(!0)},f=n.formState.isDirty,h=async()=>{const g=n.getValues(),y=await l.update.mutateAsync({id:o.id,data:g});n.reset(y)},x=()=>{n.reset(o)},p=()=>{a({type:"SET_EDITING_CONNECTION_ID",payload:null}),a({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},N=g=>{a({type:"SET_EDITING_CONNECTION_ID",payload:g}),a({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},j=l.update.isPending,v=t.jsx(qt,{children:t.jsxs(Jt,{children:[t.jsx(Be,{children:t.jsx(Yt,{asChild:!0,children:t.jsx(_t,{to:"/$org/$project/agents",params:{org:e.slug,project:He},children:"Agents"})})}),t.jsx(Zt,{}),t.jsx(Be,{children:t.jsx(Qt,{children:o.title})})]})});return t.jsxs(Xt,{breadcrumb:v,children:[t.jsxs(es,{children:[t.jsx(Pt,{onSave:h,onUndo:x,isDirty:f,isSaving:j}),t.jsxs(de,{delayDuration:0,children:[t.jsx(ce,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(X,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:d,"aria-label":"Test Agent",children:[t.jsx(Wt,{size:14}),"Test Agent"]})})}),t.jsx(me,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(de,{delayDuration:0,children:[t.jsx(ce,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(X,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:()=>a({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),"aria-label":"Share",children:t.jsx(Kt,{size:14})})})}),t.jsx(me,{side:"bottom",children:"Share"})]}),t.jsx(zt,{title:o.title,url:r,icon:o.icon??"cpu_chip"})]}),t.jsx("div",{className:"flex h-full w-full bg-background overflow-auto",children:t.jsxs("div",{className:"flex flex-col w-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4 p-6 shrink-0",children:[t.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[t.jsx(ge,{icon:o.icon,name:n.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(Xe,{})}),t.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[t.jsx(Ve,{...n.register("title"),className:"h-auto py-0.5 text-lg! font-medium leading-7 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Agent Name"}),t.jsx(Ve,{...n.register("description"),className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})]})]}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Mt,{checked:n.watch("status")==="active",onCheckedChange:g=>n.setValue("status",g?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(Et,{open:i.skillsOpen,onOpenChange:g=>a({type:"SET_SKILLS_OPEN",payload:g}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[c.length===0?t.jsxs("button",{type:"button",onClick:p,className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"h-7 px-2 inline-flex items-center justify-center gap-1 rounded-md text-sm text-muted-foreground",children:[t.jsx(Fe,{size:14}),"Add"]})]}):t.jsx(At,{asChild:!0,children:t.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"ease-(--ease-out-expo)",style:{width:i.skillsOpen?0:"auto",marginRight:i.skillsOpen?0:4,opacity:i.skillsOpen?0:1,pointerEvents:i.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:i.skillsOpen?"0ms":"200ms"},children:t.jsx(ds,{connectionIds:c.map(g=>g.connection_id),maxVisibleIcons:2})}),t.jsxs("div",{role:"button",tabIndex:0,className:"h-7 inline-flex items-center justify-center rounded-md text-sm text-muted-foreground overflow-hidden transition-all duration-200 ease-(--ease-out-expo) hover:bg-accent hover:text-accent-foreground",style:{width:i.skillsOpen?"auto":28,paddingLeft:i.skillsOpen?8:0,paddingRight:i.skillsOpen?8:0,gap:i.skillsOpen?4:0},onPointerDown:g=>{g.stopPropagation()},onClick:g=>{g.stopPropagation(),g.preventDefault(),p()},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),g.preventDefault(),p())},children:[t.jsx(Fe,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?"auto":0,opacity:i.skillsOpen?1:0},children:"Add"})]}),t.jsx("div",{className:"h-7 inline-flex items-center justify-center overflow-hidden transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?28:0,opacity:i.skillsOpen?1:0},children:t.jsx(Ht,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:i.skillsOpen?"1fr":"0fr"},children:t.jsx("div",{className:"min-h-0 overflow-hidden",children:t.jsx("div",{className:"overflow-y-auto max-h-[300px] mask-[linear-gradient(to_bottom,black_calc(100%-40px),transparent_100%)]",children:t.jsx("div",{className:"flex flex-col gap-2 px-6 pb-4 pt-2",children:c.map(g=>t.jsx(_.Suspense,{fallback:t.jsx(Ae.Fallback,{}),children:t.jsx(Ae,{connection_id:g.connection_id,selected_tools:g.selected_tools,selected_resources:g.selected_resources,selected_prompts:g.selected_prompts,onClick:()=>N(g.connection_id)})},g.connection_id))})})})})]}),t.jsxs("div",{className:"flex flex-col flex-1 p-6 border-t border-border overflow-auto",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Instructions"}),t.jsx(Tt,{name:"metadata.instructions",control:n.control,render:({field:g})=>t.jsx(Vt,{...g,value:g.value??"",placeholder:"Write instructions here...",className:"min-h-[200px] resize-none text-sm placeholder:text-muted-foreground/50 leading-relaxed border-0 rounded-none shadow-none px-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:border-0 bg-transparent"})})]})]})}),t.jsx(Ls,{open:i.connectionDialogOpen,onOpenChange:g=>a({type:"SET_CONNECTION_DIALOG_OPEN",payload:g}),selectedId:i.editingConnectionId,form:n,connections:c}),t.jsx(Gs,{open:i.shareDialogOpen,onOpenChange:g=>a({type:"SET_SHARE_DIALOG_OPEN",payload:g}),virtualMcp:o})]})}function Ws(){const o=T.c(6),e=jt();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const r=vt(s),{org:l,agentId:n}=r,c=Gt(n);if(!c){let a;return o[1]!==e||o[2]!==l?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ot,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(X,{variant:"outline",onClick:()=>e({to:"/$org/$project/agents",params:{org:l,project:He}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=a):a=o[3],a}let i;return o[4]!==c?(i=t.jsx(Hs,{virtualMcp:c}),o[4]=c,o[5]=i):i=o[5],i}function ql(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(pe,{children:t.jsx(_.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ke,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ws,{})})}),o[0]=e):e=o[0],e}export{ql as default};
1
+ import{r as _,j as t,b6 as dt,a3 as xe,an as Ne,b5 as mt,av as ut,a_ as ft,am as pt,at as xt,b7 as Ue,aq as ht,c as T,u as he,V as gt,s as bt,t as Oe,m as jt,a as vt,O as He,br as Nt,k as yt,h as Ct,aM as _t,n as Tt}from"./index-BKpxPW_G.js";import{i as St,a as wt,b as kt,u as It,C as Et,c as At}from"./use-deco-chat-open-B2KYtTue.js";import{E as Ot}from"./empty-state-DXJM9xrV.js";import{E as pe,i as Dt}from"./error-boundary-BMH0CjEH.js";import{I as ge,T as ce,c as ye,b as de,a as me}from"./integration-icon-DFSc5_D8.js";import{I as $t,R as Rt,a as Lt,S as Pt,P as zt}from"./index-BV_k_ZyP.js";import{B as De}from"./badge-DBw6AEaX.js";import{B as X}from"./button-D_OpQIQm.js";import{I as Ve}from"./input-lpAGMNlp.js";import{S as Mt}from"./switch-sdaV-SJo.js";import{T as Vt}from"./textarea-BRJpMcB0.js";import{h as Ft,f as Bt}from"./use-connection-B0740Saa.js";import{u as Gt,a as Ut}from"./use-virtual-mcp-BUCuQhrG.js";import{i as We}from"./ChevronRight-DMzFQQCc.js";import{n as Ht}from"./select-BbzYJ4VF.js";import{i as $e}from"./File02-GEmd_G7y.js";import{i as Ke}from"./Loading01-C2vqzEw-.js";import{i as Wt}from"./Play-Bm8SKfhZ.js";import{s as Fe}from"./Plus-BMOTPGqH.js";import{i as Kt}from"./Share07-BZVoNuS6.js";import{a as Re}from"./Tool01-djk7g7Hv.js";import{B as qt,a as Jt,b as Be,d as Yt,e as Zt,c as Qt}from"./breadcrumb-ChH6wfcA.js";import{a as Xt,V as es}from"./layout-DaBTH10o.js";import{C as ts}from"./collection-search-Bkd4qN8a.js";import{C as Le}from"./checkbox-C1Sx9y02.js";import{e as ss,a as qe,D as Je,b as ls,c as os}from"./dialog-BPL7ZvPc.js";import{c as J}from"./utils-Ckp7rFN8.js";import{u as Pe}from"./constants-DisdEZ3l.js";import{c as ns}from"./use-mcp-tools-DF65_5AL.js";import{c as rs,u as is}from"./use-mcp-prompts-FoVTG9k7.js";import{s as Ye}from"./slugify-CEUa2lfQ.js";import{i as Ze}from"./Check-bgVFNRDs.js";import{i as as}from"./Code01-7hV4ZDjZ.js";import{a as cs}from"./Copy01-C35WeFYE.js";import{i as Ce}from"./InfoCircle-5NZyA5WD.js";import{A as ds}from"./agent-connections-preview-qFrRTce9.js";import"./use-llm-D28vq8-j.js";import"./use-binding-DMsO_03X.js";import"./binder-Jddq1y1v.js";import"./useQuery-Bo6lCSyK.js";import"./localstorage-keys-CrJngaoW.js";import"./useMutation-Bnsod7M-.js";import"./popover-ESVk6nXT.js";import"./ChevronDown-DY4fpd0G.js";import"./File06-888BgyfZ.js";import"./Grid01-CfSiTcO8.js";import"./Image01-BUR65REQ.js";import"./RefreshCcw01-B1tus5Lj.js";import"./SearchMd-BqVXNd65.js";import"./index-fVGDVKMq.js";import"./Pin01-uiXGtZsb.js";import"./use-organization-settings-CPNBbiln.js";import"./index-B9-4goiW.js";import"./X-CslJd5Ib.js";import"./infiniteQueryObserver-B8M15Jhm.js";const Qe=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.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"}));Qe.displayName="Circle";const Xe=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"M9 2v3m6-3v3M9 19v3m6-3v3m4-13h3m-3 5h3M2 9h3m-3 5h3m4.8 5h4.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C19 16.72 19 15.88 19 14.2V9.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C16.72 5 15.88 5 14.2 5H9.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C5 7.28 5 8.12 5 9.8v4.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C7.28 19 8.12 19 9.8 19Z"}));Xe.displayName="CpuChip02";const be=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));be.displayName="CubeOutline";var je="Tabs",[ms]=ht(je,[Ue]),et=Ue(),[us,ze]=ms(je),tt=_.forwardRef((o,e)=>{const{__scopeTabs:s,value:r,onValueChange:l,defaultValue:n,orientation:c="horizontal",dir:i,activationMode:a="automatic",...m}=o,u=ft(i),[d,f]=pt({prop:r,onChange:l,defaultProp:n??"",caller:je});return t.jsx(us,{scope:s,baseId:xt(),value:d,onValueChange:f,orientation:c,dir:u,activationMode:a,children:t.jsx(xe.div,{dir:u,"data-orientation":c,...m,ref:e})})});tt.displayName=je;var st="TabsList",lt=_.forwardRef((o,e)=>{const{__scopeTabs:s,loop:r=!0,...l}=o,n=ze(st,s),c=et(s);return t.jsx(mt,{asChild:!0,...c,orientation:n.orientation,dir:n.dir,loop:r,children:t.jsx(xe.div,{role:"tablist","aria-orientation":n.orientation,...l,ref:e})})});lt.displayName=st;var ot="TabsTrigger",nt=_.forwardRef((o,e)=>{const{__scopeTabs:s,value:r,disabled:l=!1,...n}=o,c=ze(ot,s),i=et(s),a=at(c.baseId,r),m=ct(c.baseId,r),u=r===c.value;return t.jsx(dt,{asChild:!0,...i,focusable:!l,active:u,children:t.jsx(xe.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":m,"data-state":u?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:a,...n,ref:e,onMouseDown:Ne(o.onMouseDown,d=>{!l&&d.button===0&&d.ctrlKey===!1?c.onValueChange(r):d.preventDefault()}),onKeyDown:Ne(o.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&c.onValueChange(r)}),onFocus:Ne(o.onFocus,()=>{const d=c.activationMode!=="manual";!u&&!l&&d&&c.onValueChange(r)})})})});nt.displayName=ot;var rt="TabsContent",it=_.forwardRef((o,e)=>{const{__scopeTabs:s,value:r,forceMount:l,children:n,...c}=o,i=ze(rt,s),a=at(i.baseId,r),m=ct(i.baseId,r),u=r===i.value,d=_.useRef(u);return _.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),t.jsx(ut,{present:l||u,children:({present:f})=>t.jsx(xe.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":a,hidden:!f,id:m,tabIndex:0,...c,ref:e,style:{...o.style,animationDuration:d.current?"0s":void 0},children:f&&n})})});it.displayName=rt;function at(o,e){return`${o}-trigger-${e}`}function ct(o,e){return`${o}-content-${e}`}var fs=tt,ps=lt,xs=nt,hs=it;function gs(o){const e=T.c(10);let s,r,l;e[0]!==o?({className:s,variant:l,...r}=o,e[0]=o,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);const n=l===void 0?"pill":l;let c;e[4]!==s?(c=J("flex flex-col gap-2",s),e[4]=s,e[5]=c):c=e[5];let i;return e[6]!==r||e[7]!==c||e[8]!==n?(i=t.jsx(fs,{"data-slot":"tabs","data-variant":n,className:c,...r}),e[6]=r,e[7]=c,e[8]=n,e[9]=i):i=e[9],i}function bs(o){const e=T.c(11);let s,r,l;e[0]!==o?({className:s,variant:l,...r}=o,e[0]=o,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);const n=l||"pill",c=n==="underline"?"flex h-[52px] items-center border-b border-border":n==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==s||e[5]!==c?(i=J(c,s),e[4]=s,e[5]=c,e[6]=i):i=e[6];let a;return e[7]!==n||e[8]!==r||e[9]!==i?(a=t.jsx(ps,{"data-slot":"tabs-list","data-variant":n,className:i,...r}),e[7]=n,e[8]=r,e[9]=i,e[10]=a):a=e[10],a}function _e(o){const e=T.c(11);let s,r,l;e[0]!==o?({className:s,variant:l,...r}=o,e[0]=o,e[1]=s,e[2]=r,e[3]=l):(s=e[1],r=e[2],l=e[3]);const n=l||"pill",c=n==="underline"?"cursor-pointer flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-foreground disabled:pointer-events-none disabled:opacity-50":n==="canvas"?"cursor-pointer flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==s||e[5]!==c?(i=J(c,s),e[4]=s,e[5]=c,e[6]=i):i=e[6];let a;return e[7]!==n||e[8]!==r||e[9]!==i?(a=t.jsx(xs,{"data-slot":"tabs-trigger","data-variant":n,className:i,...r}),e[7]=n,e[8]=r,e[9]=i,e[10]=a):a=e[10],a}function Te(o){const e=T.c(8);let s,r;e[0]!==o?({className:s,...r}=o,e[0]=o,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=J("flex-1 outline-none h-full",s),e[3]=s,e[4]=l):l=e[4];let n;return e[5]!==r||e[6]!==l?(n=t.jsx(hs,{"data-slot":"tabs-content",className:l,...r}),e[5]=r,e[6]=l,e[7]=n):n=e[7],n}function Se(o){return o===null?"all":o?.length??0}function js(o,e){const s=o[e];if(!s)return"";const r=[];return s.tools===null?r.push("all tools"):s.tools&&s.tools.length>0&&r.push(`${s.tools.length} tools`),s.resources===null?r.push("all resources"):s.resources&&s.resources.length>0&&r.push(`${s.resources.length} resources`),s.prompts===null?r.push("all prompts"):s.prompts&&s.prompts.length>0&&r.push(`${s.prompts.length} prompts`),r.join(", ")}function vs(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const Ns={tools:null,resources:null,prompts:null};function we(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(Ke,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function ke(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Dt,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function ys(o){const e=T.c(18),{item:s,isSelected:r,onToggle:l,disabled:n}=o,c=n?"cursor-not-allowed opacity-50":"cursor-pointer",i=r?"bg-accent/25":"hover:bg-muted/50";let a;e[0]!==c||e[1]!==i?(a=J("flex items-start gap-3 p-4 rounded-lg transition-colors",c,i),e[0]=c,e[1]=i,e[2]=a):a=e[2];let m;e[3]!==s.name?(m=t.jsx("p",{className:"text-sm font-medium leading-none",children:s.name}),e[3]=s.name,e[4]=m):m=e[4];let u;e[5]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[5]=s.description,e[6]=u):u=e[6];let d;e[7]!==m||e[8]!==u?(d=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[m,u]}),e[7]=m,e[8]=u,e[9]=d):d=e[9];let f;e[10]!==n||e[11]!==r||e[12]!==l?(f=t.jsx(Le,{checked:r,onCheckedChange:l,disabled:n,className:"mt-0.5"}),e[10]=n,e[11]=r,e[12]=l,e[13]=f):f=e[13];let h;return e[14]!==a||e[15]!==d||e[16]!==f?(h=t.jsxs("label",{className:a,children:[d,f]}),e[14]=a,e[15]=d,e[16]=f,e[17]=h):h=e[17],h}function Me(o){const e=T.c(32),{items:s,selections:r,onToggle:l,onToggleAll:n,emptyMessage:c,disabled:i}=o;let a,m,u,d,f;if(e[0]!==i||e[1]!==c||e[2]!==s||e[3]!==l||e[4]!==n||e[5]!==r){f=Symbol.for("react.early_return_sentinel");e:{const p=s.map(Cs);if(s.length===0){let C;e[11]!==c?(C=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:c})}),e[11]=c,e[12]=C):C=e[12],f=C;break e}u="flex flex-col h-full";const N=i?"cursor-not-allowed opacity-50":"cursor-pointer";let j;e[13]!==N?(j=J("flex items-start gap-3 p-4",N),e[13]=N,e[14]=j):j=e[14];let v;e[15]!==s.length?(v=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=v):v=e[16];const g=r===null;let y;e[17]!==i||e[18]!==n||e[19]!==g?(y=t.jsx(Le,{checked:g,onCheckedChange:n,disabled:i,className:"mt-0.5"}),e[17]=i,e[18]=n,e[19]=g,e[20]=y):y=e[20],e[21]!==y||e[22]!==j||e[23]!==v?(d=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:j,children:[v,y]})}),e[21]=y,e[22]=j,e[23]=v,e[24]=d):d=e[24],a="flex-1 overflow-auto px-4 py-3 space-y-1",m=s.map(C=>t.jsx(ys,{item:C,isSelected:r===null||r?.includes(C.id),onToggle:()=>l(C.id,p),disabled:i},C.id))}e[0]=i,e[1]=c,e[2]=s,e[3]=l,e[4]=n,e[5]=r,e[6]=a,e[7]=m,e[8]=u,e[9]=d,e[10]=f}else a=e[6],m=e[7],u=e[8],d=e[9],f=e[10];if(f!==Symbol.for("react.early_return_sentinel"))return f;let h;e[25]!==a||e[26]!==m?(h=t.jsx("div",{className:a,children:m}),e[25]=a,e[26]=m,e[27]=h):h=e[27];let x;return e[28]!==u||e[29]!==d||e[30]!==h?(x=t.jsxs("div",{className:u,children:[d,h]}),e[28]=u,e[29]=d,e[30]=h,e[31]=x):x=e[31],x}function Cs(o){return o.id}function _s(o){const e=T.c(13),{connectionId:s,selections:r,onToggle:l,onToggleAll:n,disabled:c}=o,{org:i}=he();let a;e[0]!==s||e[1]!==i.id?(a={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=a):a=e[2];const m=Pe(a);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:d}=ns(u);let f;e[5]!==d.tools?(f=d.tools.map(Ts),e[5]=d.tools,e[6]=f):f=e[6];const h=f;let x;return e[7]!==c||e[8]!==h||e[9]!==l||e[10]!==n||e[11]!==r?(x=t.jsx(Me,{items:h,selections:r,onToggle:l,onToggleAll:n,emptyMessage:"No tools available",disabled:c}),e[7]=c,e[8]=h,e[9]=l,e[10]=n,e[11]=r,e[12]=x):x=e[12],x}function Ts(o){return{id:o.name,name:o.name,description:o.description}}function Ss(o){const e=T.c(13),{connectionId:s,selections:r,onToggle:l,onToggleAll:n,disabled:c}=o,{org:i}=he();let a;e[0]!==s||e[1]!==i.id?(a={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=a):a=e[2];const m=Pe(a);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:d}=rs(u);let f;e[5]!==d.resources?(f=d.resources.map(ws),e[5]=d.resources,e[6]=f):f=e[6];const h=f;let x;return e[7]!==c||e[8]!==h||e[9]!==l||e[10]!==n||e[11]!==r?(x=t.jsx(Me,{items:h,selections:r,onToggle:l,onToggleAll:n,emptyMessage:"No resources available",disabled:c}),e[7]=c,e[8]=h,e[9]=l,e[10]=n,e[11]=r,e[12]=x):x=e[12],x}function ws(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function ks(o){const e=T.c(13),{connectionId:s,selections:r,onToggle:l,onToggleAll:n,disabled:c}=o,{org:i}=he();let a;e[0]!==s||e[1]!==i.id?(a={connectionId:s,orgId:i.id},e[0]=s,e[1]=i.id,e[2]=a):a=e[2];const m=Pe(a);let u;e[3]!==m?(u={client:m},e[3]=m,e[4]=u):u=e[4];const{data:d}=is(u);let f;e[5]!==d.prompts?(f=d.prompts.map(Is),e[5]=d.prompts,e[6]=f):f=e[6];const h=f;let x;return e[7]!==c||e[8]!==h||e[9]!==l||e[10]!==n||e[11]!==r?(x=t.jsx(Me,{items:h,selections:r,onToggle:l,onToggleAll:n,emptyMessage:"No prompts available",disabled:c}),e[7]=c,e[8]=h,e[9]=l,e[10]=n,e[11]=r,e[12]=x):x=e[12],x}function Is(o){return{id:o.name,name:o.name,description:o.description}}function Es(o){const e=T.c(24),{connection:s,isSelected:r,hasSelections:l,summary:n,onClick:c,onToggleAll:i,disabled:a}=o,m=a?"cursor-not-allowed opacity-50":"cursor-pointer",u=r?"bg-accent":"hover:bg-muted/50";let d;e[0]!==m||e[1]!==u?(d=J("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",m,u),e[0]=m,e[1]=u,e[2]=d):d=e[2];const f=a?void 0:c;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(ge,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=h):h=e[5];let x;e[6]!==s.title?(x=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=x):x=e[7];let p;e[8]!==l||e[9]!==n?(p=l&&n&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),e[8]=l,e[9]=n,e[10]=p):p=e[10];let N;e[11]!==x||e[12]!==p?(N=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[x,p]}),e[11]=x,e[12]=p,e[13]=N):N=e[13];let j;e[14]!==a||e[15]!==l||e[16]!==i?(j=t.jsx(Le,{checked:l,onCheckedChange:i,onClick:As,disabled:a,className:"shrink-0"}),e[14]=a,e[15]=l,e[16]=i,e[17]=j):j=e[17];let v;return e[18]!==d||e[19]!==f||e[20]!==h||e[21]!==N||e[22]!==j?(v=t.jsxs("div",{className:d,onClick:f,children:[h,N,j]}),e[18]=d,e[19]=f,e[20]=h,e[21]=N,e[22]=j,e[23]=v):v=e[23],v}function As(o){return o.stopPropagation()}function Os(o){const e=T.c(22),{allConnections:s,searchTerm:r,selectedId:l,hasSelections:n,getSelectionSummary:c,onConnectionClick:i,onToggleAll:a,disabled:m}=o;let u;e[0]!==s||e[1]!==r?(u=r?s.filter(x=>x.title.toLowerCase().includes(r.toLowerCase())||x.description?.toLowerCase().includes(r.toLowerCase())):s,e[0]=s,e[1]=r,e[2]=u):u=e[2];const d=u;if(d.length===0){const x=r?"No connections found":"No connections available";let p;return e[3]!==x?(p=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:x}),e[3]=x,e[4]=p):p=e[4],p}let f;if(e[5]!==m||e[6]!==d||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==a||e[11]!==l){let x;e[13]!==m||e[14]!==c||e[15]!==n||e[16]!==i||e[17]!==a||e[18]!==l?(x=p=>t.jsx(Es,{connection:p,isSelected:l===p.id,hasSelections:n(p.id),summary:c(p.id),onClick:()=>i(p.id),onToggleAll:()=>a(p.id),disabled:m},p.id),e[13]=m,e[14]=c,e[15]=n,e[16]=i,e[17]=a,e[18]=l,e[19]=x):x=e[19],f=d.map(x),e[5]=m,e[6]=d,e[7]=c,e[8]=n,e[9]=i,e[10]=a,e[11]=l,e[12]=f}else f=e[12];let h;return e[20]!==f?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:f}),e[20]=f,e[21]=h):h=e[21],h}function Ds(o){const e=T.c(75),{currentConnection:s,activeTab:r,selectedId:l,formData:n,toggleTool:c,toggleResource:i,togglePrompt:a,toggleAllTools:m,toggleAllResources:u,toggleAllPrompts:d,onTabChange:f}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(ge,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=h):h=e[2];let x;e[3]!==s.title?(x=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=x):x=e[4];let p;e[5]!==s.description?(p=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=p):p=e[6];let N;e[7]!==x||e[8]!==p?(N=t.jsxs("div",{className:"flex-1 min-w-0",children:[x,p]}),e[7]=x,e[8]=p,e[9]=N):N=e[9];let j;e[10]!==h||e[11]!==N?(j=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,N]})}),e[10]=h,e[11]=N,e[12]=j):j=e[12];let v;e[13]!==f?(v=F=>f(F),e[13]=f,e[14]=v):v=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsxs(_e,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Re,{size:16}),"Tools"]}),e[15]=g):g=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(_e,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=y):y=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(bs,{variant:"underline",className:"shrink-0 px-6",children:[g,y,t.jsxs(_e,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx($e,{size:16}),"Prompts"]})]}),e[17]=C):C=e[17];let z;e[18]===Symbol.for("react.memo_cache_sentinel")?(z=ke("Tools not supported by this server"),e[18]=z):z=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(we,{}),e[19]=w):w=e[19];let O;e[20]!==n||e[21]!==l?(O=n[l]?n[l].tools:[],e[20]=n,e[21]=l,e[22]=O):O=e[22];let S;e[23]!==l||e[24]!==c?(S=(F,Z)=>c(l,F,Z),e[23]=l,e[24]=c,e[25]=S):S=e[25];let k;e[26]!==l||e[27]!==m?(k=()=>m(l),e[26]=l,e[27]=m,e[28]=k):k=e[28];let E;e[29]!==l||e[30]!==O||e[31]!==S||e[32]!==k?(E=t.jsx(Te,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:z,children:t.jsx(_.Suspense,{fallback:w,children:t.jsx(_s,{connectionId:l,selections:O,onToggle:S,onToggleAll:k})})})}),e[29]=l,e[30]=O,e[31]=S,e[32]=k,e[33]=E):E=e[33];let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=ke("Resources not supported by this server"),e[34]=D):D=e[34];let L;e[35]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(we,{}),e[35]=L):L=e[35];let I;e[36]!==n||e[37]!==l?(I=n[l]?n[l].resources:[],e[36]=n,e[37]=l,e[38]=I):I=e[38];let A;e[39]!==l||e[40]!==i?(A=(F,Z)=>i(l,F,Z),e[39]=l,e[40]=i,e[41]=A):A=e[41];let $;e[42]!==l||e[43]!==u?($=()=>u(l),e[42]=l,e[43]=u,e[44]=$):$=e[44];let P;e[45]!==l||e[46]!==I||e[47]!==A||e[48]!==$?(P=t.jsx(Te,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:D,children:t.jsx(_.Suspense,{fallback:L,children:t.jsx(Ss,{connectionId:l,selections:I,onToggle:A,onToggleAll:$})})})}),e[45]=l,e[46]=I,e[47]=A,e[48]=$,e[49]=P):P=e[49];let q;e[50]===Symbol.for("react.memo_cache_sentinel")?(q=ke("Prompts not supported by this server"),e[50]=q):q=e[50];let Y;e[51]===Symbol.for("react.memo_cache_sentinel")?(Y=t.jsx(we,{}),e[51]=Y):Y=e[51];let B;e[52]!==n||e[53]!==l?(B=n[l]?n[l].prompts:[],e[52]=n,e[53]=l,e[54]=B):B=e[54];let W;e[55]!==l||e[56]!==a?(W=(F,Z)=>a(l,F,Z),e[55]=l,e[56]=a,e[57]=W):W=e[57];let G;e[58]!==l||e[59]!==d?(G=()=>d(l),e[58]=l,e[59]=d,e[60]=G):G=e[60];let K;e[61]!==l||e[62]!==B||e[63]!==W||e[64]!==G?(K=t.jsx(Te,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(pe,{fallback:q,children:t.jsx(_.Suspense,{fallback:Y,children:t.jsx(ks,{connectionId:l,selections:B,onToggle:W,onToggleAll:G})})})}),e[61]=l,e[62]=B,e[63]=W,e[64]=G,e[65]=K):K=e[65];let U;e[66]!==r||e[67]!==E||e[68]!==P||e[69]!==K||e[70]!==v?(U=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(gs,{value:r,onValueChange:v,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[C,E,P,K]})}),e[66]=r,e[67]=E,e[68]=P,e[69]=K,e[70]=v,e[71]=U):U=e[71];let H;return e[72]!==U||e[73]!==j?(H=t.jsxs(t.Fragment,{children:[j,U]}),e[72]=U,e[73]=j,e[74]=H):H=e[74],H}function $s(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function Ie(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function Rs(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const Ge=(o,e)=>o.find(s=>s.id===e)??o[0];function Ls(o){const e=T.c(79),{open:s,onOpenChange:r,selectedId:l,form:n,connections:c}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={},e[0]=i):i=e[0];const a=Ft(i);let m;e[1]!==a||e[2]!==l?(m=Ge(a,l)?.id??null,e[1]=a,e[2]=l,e[3]=m):m=e[3];let u;e[4]!==m?(u={activeTab:"tools",searchTerm:"",selectedId:m},e[4]=m,e[5]=u):u=e[5];const[d,f]=_.useReducer(Rs,u);let h;e[6]!==c?(h=c??[],e[6]=c,e[7]=h):h=e[7];let x;e[8]!==h?(x=$s(h),e[8]=h,e[9]=x):x=e[9];const p=x;let N;e[10]!==a||e[11]!==d.selectedId?(N=Ge(a,d.selectedId),e[10]=a,e[11]=d.selectedId,e[12]=N):N=e[12];const j=N;let v;e[13]!==p?(v=b=>vs(p,b),e[13]=p,e[14]=v):v=e[14];const g=v;let y;e[15]!==p?(y=b=>js(p,b),e[15]=p,e[16]=y):y=e[16];const C=y;let z;e[17]!==n||e[18]!==p?(z=(b,R,M,Q)=>{const ie=p[b]?.[R];let V;ie===null?V=Q.filter(ve=>ve!==M):ie?.includes(M)?V=ie.filter(ve=>ve!==M):(V=[...ie??[],M],V.length===Q.length&&(V=null));const ae={...p};ae[b]?ae[b]={...ae[b]}:ae[b]={tools:null,resources:null,prompts:null},ae[b][R]=V,n.setValue("connections",Ie(ae),{shouldDirty:!0,shouldTouch:!0})},e[17]=n,e[18]=p,e[19]=z):z=e[19];const w=z;let O;e[20]!==n||e[21]!==p?(O=(b,R)=>{const ie=p[b]?.[R]===null?[]:null,V={...p};V[b]?V[b]={...V[b]}:V[b]={tools:null,resources:null,prompts:null},V[b][R]=ie,n.setValue("connections",Ie(V),{shouldDirty:!0,shouldTouch:!0})},e[20]=n,e[21]=p,e[22]=O):O=e[22];const S=O;let k;e[23]!==w?(k=(b,R,M)=>w(b,"tools",R,M),e[23]=w,e[24]=k):k=e[24];const E=k;let D;e[25]!==w?(D=(b,R,M)=>w(b,"resources",R,M),e[25]=w,e[26]=D):D=e[26];const L=D;let I;e[27]!==w?(I=(b,R,M)=>w(b,"prompts",R,M),e[27]=w,e[28]=I):I=e[28];const A=I;let $;e[29]!==S?($=b=>S(b,"tools"),e[29]=S,e[30]=$):$=e[30];const P=$;let q;e[31]!==S?(q=b=>S(b,"resources"),e[31]=S,e[32]=q):q=e[32];const Y=q;let B;e[33]!==S?(B=b=>S(b,"prompts"),e[33]=S,e[34]=B):B=e[34];const W=B;let G;e[35]!==n||e[36]!==p?(G=b=>{const R=p[b],M=R&&R.tools===null&&R.resources===null&&R.prompts===null,Q={...p};M?delete Q[b]:Q[b]=Ns,n.setValue("connections",Ie(Q),{shouldDirty:!0,shouldTouch:!0})},e[35]=n,e[36]=p,e[37]=G):G=e[37];const K=G;let U;e[38]!==a||e[39]!==r||e[40]!==l?(U=b=>{b&&f({type:"RESET",payload:{selectedId:l,firstConnectionId:a[0]?.id??null}}),r(b)},e[38]=a,e[39]=r,e[40]=l,e[41]=U):U=e[41];const H=U;let F;e[42]===Symbol.for("react.memo_cache_sentinel")?(F=b=>{f({type:"SELECT_CONNECTION",payload:b})},e[42]=F):F=e[42];const Z=F;let ue;e[43]===Symbol.for("react.memo_cache_sentinel")?(ue=b=>f({type:"SET_SEARCH_TERM",payload:b}),e[43]=ue):ue=e[43];let ee;e[44]!==d.searchTerm?(ee=t.jsx(ts,{value:d.searchTerm,onChange:ue,placeholder:"Search connections..."}),e[44]=d.searchTerm,e[45]=ee):ee=e[45];let te;e[46]!==a||e[47]!==d.searchTerm||e[48]!==d.selectedId||e[49]!==C||e[50]!==g||e[51]!==K?(te=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(Os,{allConnections:a,searchTerm:d.searchTerm,selectedId:d.selectedId,hasSelections:g,getSelectionSummary:C,onConnectionClick:Z,onToggleAll:K})}),e[46]=a,e[47]=d.searchTerm,e[48]=d.selectedId,e[49]=C,e[50]=g,e[51]=K,e[52]=te):te=e[52];let se;e[53]!==ee||e[54]!==te?(se=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[ee,te]}),e[53]=ee,e[54]=te,e[55]=se):se=e[55];let le;e[56]!==j||e[57]!==d.activeTab||e[58]!==d.selectedId||e[59]!==p||e[60]!==W||e[61]!==Y||e[62]!==P||e[63]!==A||e[64]!==L||e[65]!==E?(le=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:j&&d.selectedId?t.jsx(Ds,{currentConnection:j,activeTab:d.activeTab,selectedId:d.selectedId,formData:p,toggleTool:E,toggleResource:L,togglePrompt:A,toggleAllTools:P,toggleAllResources:Y,toggleAllPrompts:W,onTabChange:b=>f({type:"SET_ACTIVE_TAB",payload:b})},d.selectedId):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[56]=j,e[57]=d.activeTab,e[58]=d.selectedId,e[59]=p,e[60]=W,e[61]=Y,e[62]=P,e[63]=A,e[64]=L,e[65]=E,e[66]=le):le=e[66];let oe;e[67]!==se||e[68]!==le?(oe=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[se,le]}),e[67]=se,e[68]=le,e[69]=oe):oe=e[69];let ne;e[70]!==H?(ne=t.jsx(ss,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(X,{variant:"outline",onClick:()=>H(!1),children:"Done"})}),e[70]=H,e[71]=ne):ne=e[71];let re;e[72]!==oe||e[73]!==ne?(re=t.jsxs(qe,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[oe,ne]}),e[72]=oe,e[73]=ne,e[74]=re):re=e[74];let fe;return e[75]!==H||e[76]!==s||e[77]!==re?(fe=t.jsx(Je,{open:s,onOpenChange:H,children:re}),e[75]=H,e[76]=s,e[77]=re,e[78]=fe):fe=e[78],fe}const Ps=gt.pick({title:!0,description:!0,status:!0,metadata:!0,connections:!0}).extend({title:bt().min(1,"Name is required").max(255)});function zs(o){const e=T.c(8);let s,r;e[0]!==o?({className:s,...r}=o,e[0]=o,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=J("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let n;return e[5]!==r||e[6]!==l?(n=t.jsx(Rt,{"data-slot":"radio-group",className:l,...r}),e[5]=r,e[6]=l,e[7]=n):n=e[7],n}function Ee(o){const e=T.c(9);let s,r;e[0]!==o?({className:s,...r}=o,e[0]=o,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let l;e[3]!==s?(l=J("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Lt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Qe,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=n):n=e[5];let c;return e[6]!==r||e[7]!==l?(c=t.jsx($t,{"data-slot":"radio-group-item",className:l,...r,children:n}),e[6]=r,e[7]=l,e[8]=c):c=e[8],c}function Ms(o){const s=new TextEncoder().encode(o),r=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(r)}function Vs(o){const e=T.c(10),{url:s}=o,[r,l]=_.useState(!1);let n;e[0]!==s?(n=async()=>{await navigator.clipboard.writeText(s),l(!0),Oe.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=n):n=e[1];const c=n;let i;e[2]!==r?(i=r?t.jsx(Ze,{size:20,className:"text-green-600"}):t.jsx(cs,{size:20}),e[2]=r,e[3]=i):i=e[3];const a=r?"Copied!":"Copy URL";let m;e[4]!==a?(m=t.jsx("span",{className:"text-xs font-medium",children:a}),e[4]=a,e[5]=m):m=e[5];let u;return e[6]!==c||e[7]!==i||e[8]!==m?(u=t.jsxs(X,{type:"button",variant:"outline",onClick:c,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[i,m]}),e[6]=c,e[7]=i,e[8]=m,e[9]=u):u=e[9],u}function Fs(o){const e=T.c(7),{url:s,serverName:r}=o;let l;e[0]!==r||e[1]!==s?(l=()=>{const m=Ye(r),d=Ms(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),f=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(m)}&config=${encodeURIComponent(d)}`;window.open(f,"_blank"),Oe.success("Opening Cursor...")},e[0]=r,e[1]=s,e[2]=l):l=e[2];const n=l;let c,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),i=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=c,e[4]=i):(c=e[3],i=e[4]);let a;return e[5]!==n?(a=t.jsxs(X,{type:"button",variant:"outline",onClick:n,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[c,i]}),e[5]=n,e[6]=a):a=e[6],a}function Bs(o){const e=T.c(11),{url:s,serverName:r}=o,[l,n]=_.useState(!1);let c;e[0]!==r||e[1]!==s?(c=async()=>{const f=Ye(r),x=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),p=`claude mcp add-json "${f}" '${x.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(p),n(!0),Oe.success("Claude Code command copied to clipboard"),setTimeout(()=>n(!1),2e3)},e[0]=r,e[1]=s,e[2]=c):c=e[2];const i=c;let a;e[3]!==l?(a=l?t.jsx(Ze,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=a):a=e[4];const m=l?"Copied!":"Install on Claude";let u;e[5]!==m?(u=t.jsx("span",{className:"text-xs font-medium",children:m}),e[5]=m,e[6]=u):u=e[6];let d;return e[7]!==i||e[8]!==a||e[9]!==u?(d=t.jsxs(X,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,u]}),e[7]=i,e[8]=a,e[9]=u,e[10]=d):d=e[10],d}function Gs(o){const e=T.c(40),{open:s,onOpenChange:r,virtualMcp:l}=o,[n,c]=_.useState("code_execution");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=P=>{(P==="passthrough"||P==="smart_tool_selection"||P==="code_execution")&&c(P)},e[0]=i):i=e[0];const a=i;let m;e[1]!==n||e[2]!==l.id?(m=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),m.searchParams.set("mode",n),e[1]=n,e[2]=l.id,e[3]=m):m=e[3];let u;e[4]!==l.id||e[5]!==l.title?(u=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=u):u=e[6];const d=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(ls,{children:t.jsx(os,{children:"Share Agent"})}),e[7]=f):f=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=h):h=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(St,{className:"size-5 text-muted-foreground"})}),e[9]=x):x=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=p):p=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(ce,{asChild:!0,children:t.jsx(Ce,{className:"size-3.5 text-muted-foreground"})}),e[11]=N):N=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[x,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[p,t.jsx(ye,{children:t.jsxs(de,{children:[N,t.jsx(me,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(Ee,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=j):j=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(wt,{className:"size-5 text-muted-foreground"})}),e[13]=v):v=e[13];let g;e[14]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=g):g=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ce,{asChild:!0,children:t.jsx(Ce,{className:"size-3.5 text-muted-foreground"})}),e[15]=y):y=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[v,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[g,t.jsx(ye,{children:t.jsxs(de,{children:[y,t.jsx(me,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(Ee,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=C):C=e[16];let z;e[17]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(as,{className:"size-5 text-muted-foreground"})}),e[17]=z):z=e[17];let w;e[18]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=w):w=e[18];let O;e[19]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(ce,{asChild:!0,children:t.jsx(Ce,{className:"size-3.5 text-muted-foreground"})}),e[19]=O):O=e[19];let S;e[20]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[z,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[w,t.jsx(ye,{children:t.jsxs(de,{children:[O,t.jsx(me,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(Ee,{id:"mode-code",value:"code_execution"}),t.jsx(De,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=S):S=e[20];let k;e[21]!==n?(k=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(zs,{value:n,onValueChange:a,className:"flex flex-col gap-4.5",children:[j,C,S]})]}),e[21]=n,e[22]=k):k=e[22];let E;e[23]!==m.href?(E=t.jsx(Vs,{url:m.href}),e[23]=m.href,e[24]=E):E=e[24];let D,L;e[25]!==d||e[26]!==m.href?(D=t.jsx(Fs,{url:m.href,serverName:d}),L=t.jsx(Bs,{url:m.href,serverName:d}),e[25]=d,e[26]=m.href,e[27]=D,e[28]=L):(D=e[27],L=e[28]);let I;e[29]!==E||e[30]!==D||e[31]!==L?(I=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[E,D,L]})}),e[29]=E,e[30]=D,e[31]=L,e[32]=I):I=e[32];let A;e[33]!==k||e[34]!==I?(A=t.jsxs(qe,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[f,t.jsxs("div",{className:"flex flex-col gap-6",children:[k,I]})]}),e[33]=k,e[34]=I,e[35]=A):A=e[35];let $;return e[36]!==r||e[37]!==s||e[38]!==A?($=t.jsx(Je,{open:s,onOpenChange:r,children:A}),e[36]=r,e[37]=s,e[38]=A,e[39]=$):$=e[39],$}function Us(o,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...o,shareDialogOpen:e.payload};case"SET_CONNECTION_DIALOG_OPEN":return{...o,connectionDialogOpen:e.payload};case"SET_EDITING_CONNECTION_ID":return{...o,editingConnectionId:e.payload};case"SET_SKILLS_OPEN":return{...o,skillsOpen:e.payload};default:return o}}function Ae(o){const e=T.c(27),{connection_id:s,selected_tools:r,selected_resources:l,selected_prompts:n,onClick:c}=o,i=Bt(s);if(!i)return null;let a;e[0]!==r?(a=Se(r),e[0]=r,e[1]=a):a=e[1];const m=a;let u;e[2]!==l?(u=Se(l),e[2]=l,e[3]=u):u=e[3];const d=u;let f;e[4]!==n?(f=Se(n),e[4]=n,e[5]=f):f=e[5];const h=f;let x;e[6]!==i.icon||e[7]!==i.title?(x=t.jsx(ge,{icon:i.icon,name:i.title,size:"xs"}),e[6]=i.icon,e[7]=i.title,e[8]=x):x=e[8];let p;e[9]!==i.title?(p=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:i.title}),e[9]=i.title,e[10]=p):p=e[10];let N;e[11]!==m?(N=m!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:m==="all"?"all":m}),t.jsx(Re,{size:12})]}),e[11]=m,e[12]=N):N=e[12];let j;e[13]!==d?(j=d!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:d==="all"?"all":d}),t.jsx(be,{size:12})]}),e[13]=d,e[14]=j):j=e[14];let v;e[15]!==h?(v=h!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:h==="all"?"all":h}),t.jsx($e,{size:12})]}),e[15]=h,e[16]=v):v=e[16];let g;e[17]!==N||e[18]!==j||e[19]!==v?(g=t.jsxs(De,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[N,j,v]}),e[17]=N,e[18]=j,e[19]=v,e[20]=g):g=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(We,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=y):y=e[21];let C;return e[22]!==c||e[23]!==x||e[24]!==p||e[25]!==g?(C=t.jsxs("div",{onClick:c,className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border hover:bg-accent/50 transition-colors cursor-pointer",children:[x,p,g,y]}),e[22]=c,e[23]=x,e[24]=p,e[25]=g,e[26]=C):C=e[26],C}Ae.Fallback=function(){return t.jsxs("div",{className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border",children:[t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"flex-1 h-4 rounded bg-muted animate-pulse"}),t.jsxs(De,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Re,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(be,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx($e,{size:12})]})]}),t.jsx(We,{size:16,className:"text-muted-foreground shrink-0"})]})};function Hs({virtualMcp:o}){const{org:e}=he(),r=Nt().location.href,l=Ut(),n=yt({resolver:Ct(Ps),defaultValues:o}),c=n.watch("connections"),[i,a]=_.useReducer(Us,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,m]=kt(),{setVirtualMcpId:u}=It();_.useEffect(()=>{m(!0),u(o.id)},[o.id]);const d=()=>{u(o.id),m(!0)},f=n.formState.isDirty,h=async()=>{const g=n.getValues(),y=await l.update.mutateAsync({id:o.id,data:g});n.reset(y)},x=()=>{n.reset(o)},p=()=>{a({type:"SET_EDITING_CONNECTION_ID",payload:null}),a({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},N=g=>{a({type:"SET_EDITING_CONNECTION_ID",payload:g}),a({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},j=l.update.isPending,v=t.jsx(qt,{children:t.jsxs(Jt,{children:[t.jsx(Be,{children:t.jsx(Yt,{asChild:!0,children:t.jsx(_t,{to:"/$org/$project/agents",params:{org:e.slug,project:He},children:"Agents"})})}),t.jsx(Zt,{}),t.jsx(Be,{children:t.jsx(Qt,{children:o.title})})]})});return t.jsxs(Xt,{breadcrumb:v,children:[t.jsxs(es,{children:[t.jsx(Pt,{onSave:h,onUndo:x,isDirty:f,isSaving:j}),t.jsxs(de,{delayDuration:0,children:[t.jsx(ce,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(X,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:d,"aria-label":"Test Agent",children:[t.jsx(Wt,{size:14}),"Test Agent"]})})}),t.jsx(me,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(de,{delayDuration:0,children:[t.jsx(ce,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsx(X,{variant:"outline",size:"icon",className:"size-7 border border-input",onClick:()=>a({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),"aria-label":"Share",children:t.jsx(Kt,{size:14})})})}),t.jsx(me,{side:"bottom",children:"Share"})]}),t.jsx(zt,{title:o.title,url:r,icon:o.icon??"cpu_chip"})]}),t.jsx("div",{className:"flex h-full w-full bg-background overflow-auto",children:t.jsxs("div",{className:"flex flex-col w-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4 p-6 shrink-0",children:[t.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[t.jsx(ge,{icon:o.icon,name:n.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(Xe,{})}),t.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[t.jsx(Ve,{...n.register("title"),className:"h-auto py-0.5 text-lg! font-medium leading-7 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Agent Name"}),t.jsx(Ve,{...n.register("description"),className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})]})]}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Mt,{checked:n.watch("status")==="active",onCheckedChange:g=>n.setValue("status",g?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(Et,{open:i.skillsOpen,onOpenChange:g=>a({type:"SET_SKILLS_OPEN",payload:g}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[c.length===0?t.jsxs("button",{type:"button",onClick:p,className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"h-7 px-2 inline-flex items-center justify-center gap-1 rounded-md text-sm text-muted-foreground",children:[t.jsx(Fe,{size:14}),"Add"]})]}):t.jsx(At,{asChild:!0,children:t.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"ease-(--ease-out-expo)",style:{width:i.skillsOpen?0:"auto",marginRight:i.skillsOpen?0:4,opacity:i.skillsOpen?0:1,pointerEvents:i.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:i.skillsOpen?"0ms":"200ms"},children:t.jsx(ds,{connectionIds:c.map(g=>g.connection_id),maxVisibleIcons:2})}),t.jsxs("div",{role:"button",tabIndex:0,className:"h-7 inline-flex items-center justify-center rounded-md text-sm text-muted-foreground overflow-hidden transition-all duration-200 ease-(--ease-out-expo) hover:bg-accent hover:text-accent-foreground",style:{width:i.skillsOpen?"auto":28,paddingLeft:i.skillsOpen?8:0,paddingRight:i.skillsOpen?8:0,gap:i.skillsOpen?4:0},onPointerDown:g=>{g.stopPropagation()},onClick:g=>{g.stopPropagation(),g.preventDefault(),p()},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.stopPropagation(),g.preventDefault(),p())},children:[t.jsx(Fe,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?"auto":0,opacity:i.skillsOpen?1:0},children:"Add"})]}),t.jsx("div",{className:"h-7 inline-flex items-center justify-center overflow-hidden transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?28:0,opacity:i.skillsOpen?1:0},children:t.jsx(Ht,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:i.skillsOpen?"1fr":"0fr"},children:t.jsx("div",{className:"min-h-0 overflow-hidden",children:t.jsx("div",{className:"overflow-y-auto max-h-[300px] mask-[linear-gradient(to_bottom,black_calc(100%-40px),transparent_100%)]",children:t.jsx("div",{className:"flex flex-col gap-2 px-6 pb-4 pt-2",children:c.map(g=>t.jsx(_.Suspense,{fallback:t.jsx(Ae.Fallback,{}),children:t.jsx(Ae,{connection_id:g.connection_id,selected_tools:g.selected_tools,selected_resources:g.selected_resources,selected_prompts:g.selected_prompts,onClick:()=>N(g.connection_id)})},g.connection_id))})})})})]}),t.jsxs("div",{className:"flex flex-col flex-1 p-6 border-t border-border overflow-auto",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Instructions"}),t.jsx(Tt,{name:"metadata.instructions",control:n.control,render:({field:g})=>t.jsx(Vt,{...g,value:g.value??"",placeholder:"Write instructions here...",className:"min-h-[200px] resize-none text-sm placeholder:text-muted-foreground/50 leading-relaxed border-0 rounded-none shadow-none px-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:border-0 bg-transparent"})})]})]})}),t.jsx(Ls,{open:i.connectionDialogOpen,onOpenChange:g=>a({type:"SET_CONNECTION_DIALOG_OPEN",payload:g}),selectedId:i.editingConnectionId,form:n,connections:c}),t.jsx(Gs,{open:i.shareDialogOpen,onOpenChange:g=>a({type:"SET_SHARE_DIALOG_OPEN",payload:g}),virtualMcp:o})]})}function Ws(){const o=T.c(6),e=jt();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const r=vt(s),{org:l,agentId:n}=r,c=Gt(n);if(!c){let a;return o[1]!==e||o[2]!==l?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ot,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(X,{variant:"outline",onClick:()=>e({to:"/$org/$project/agents",params:{org:l,project:He}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=a):a=o[3],a}let i;return o[4]!==c?(i=t.jsx(Hs,{virtualMcp:c}),o[4]=c,o[5]=i):i=o[5],i}function ql(){const o=T.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(pe,{children:t.jsx(_.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ke,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ws,{})})}),o[0]=e):e=o[0],e}export{ql as default};
@@ -1 +1 @@
1
- import{c as ne,j as t,r as X,u as ie,m as ae,O as V}from"./index-HxeE9C0A.js";import{C as le,a as ce}from"./collection-table-wrapper-B6XWzQ-4.js";import{C as de}from"./collection-search-D3a5_1zR.js";import{P as j}from"./index-wUnd_o-U.js";import{B as me,a as pe,b as ge,c as ue}from"./breadcrumb-t_Ccp20G.js";import{C as fe}from"./connection-card-DkCny6Ez.js";import{E as q}from"./empty-state-CH3e4Xzf.js";import{E as he}from"./error-boundary-BGFWaL1J.js";import{I as xe}from"./integration-icon-CmJggqPx.js";import{u as je,s as Y,U as Ce}from"./use-list-state-CqdwrHCA.js";import{u as be}from"./use-create-virtual-mcp-CMegJpH_.js";import{i as ye}from"./constants-BEco_-y7.js";import{b as we,a as De}from"./use-virtual-mcp-DaI2d98r.js";import{c as Ne,b as Se,d as _e,A as ke,e as $e,g as ve,a as Ae,f as Me}from"./alert-dialog-B1nWkQHx.js";import{B as Q}from"./button-C1iesapY.js";import{D as Z,a as ee,b as te,c as R}from"./dropdown-menu-D6YYwFq7.js";import{i as se}from"./DotsVertical-CPJps54j.js";import{i as Ie}from"./Loading01-CudhqwtJ.js";import{s as oe}from"./Trash01-py7ft8Od.js";import{t as C}from"./Users03-D2F2bran.js";import{A as re}from"./agent-connections-preview-DZgc-mir.js";import{d as Pe}from"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowUp-DVhz9MPT.js";import"./Check-BIlnRzi6.js";import"./Grid01-BhCIE3UE.js";import"./List-B95opsr5.js";import"./view-mode-toggle-JVmuLwXe.js";import"./utils-D1Qd9-I_.js";import"./table-F_F9uG31.js";import"./SearchMd-yRVgOeax.js";import"./input-DBGu1Yhi.js";import"./ChevronRight-CNYkXy1u.js";import"./card-DKzkS6ji.js";import"./index-ByJoFAq_.js";import"./avatar-BbH9O0kN.js";import"./useQuery-jRtVXI31.js";import"./use-mobile-CqANtQ4e.js";import"./use-connection-DWpxH8iy.js";import"./useMutation-M3-wug2Q.js";function ze(e){const o=Pe(new Date,e);return o<60?"<1m":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:o<31536e3?`${Math.floor(o/2592e3)}mo ago`:`${Math.floor(o/31536e3)}y ago`}function Be(e,o){switch(o.type){case"delete":return{mode:"deleting",virtualMcp:o.virtualMcp};case"close":return{mode:"idle"}}}function Oe(){const e=ne.c(65),{org:o}=ie(),i=ae();let b;e[0]!==o.slug?(b={namespace:o.slug,resource:"agents"},e[0]=o.slug,e[1]=b):b=e[1];const s=je(b),x=we(s);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},e[2]=y):y=e[2];const{createVirtualMCP:T,isCreating:w}=be(y),U=De();let D;e[3]===Symbol.for("react.memo_cache_sentinel")?(D={mode:"idle"},e[3]=D):D=e[3];const[n,N]=X.useReducer(Be,D);let S;e[4]!==U||e[5]!==n.mode||e[6]!==n.virtualMcp?(S=async()=>{if(n.mode!=="deleting")return;const r=n.virtualMcp.id;if(N({type:"close"}),!(!r||ye(r)))try{await U.delete.mutateAsync(r)}catch{}},e[4]=U,e[5]=n.mode,e[6]=n.virtualMcp,e[7]=S):S=e[7];const L=S;let _,k,$,v,A;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Ge,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:Fe,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},$={id:"connections",header:"Connections",render:Le,cellClassName:"w-28 shrink-0"},v={id:"updated_by",header:"Updated by",render:Ue,cellClassName:"w-32 shrink-0",sortable:!0},A={id:"updated_at",header:"Updated",render:Te,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=$,e[11]=v,e[12]=A):(_=e[8],k=e[9],$=e[10],v=e[11],A=e[12]);let M;e[13]!==i||e[14]!==o.slug?(M=[_,k,$,v,A,{id:"actions",header:"",render:r=>t.jsxs(Z,{children:[t.jsx(ee,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Re,children:t.jsx(se,{size:20})})}),t.jsxs(te,{align:"end",onClick:Ve,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}})},children:[t.jsx(Y,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=i,e[14]=o.slug,e[15]=M):M=e[15];const H=M,F=w?"Creating...":"Create Agent";let I;e[16]!==T||e[17]!==w||e[18]!==F?(I=t.jsx(Q,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:F}),e[16]=T,e[17]=w,e[18]=F,e[19]=I):I=e[19];const G=I,J=n.mode==="deleting";let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=r=>!r&&N({type:"close"}),e[20]=P):P=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ne,{children:"Delete Agent?"}),e[21]=z):z=e[21];const W=n.mode==="deleting"&&n.virtualMcp.title;let l;e[22]!==W?(l=t.jsxs(Se,{children:[z,t.jsxs(_e,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[22]=W,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==L?(c=t.jsxs($e,{children:[B,t.jsx(ve,{onClick:L,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=L,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ae,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==J||e[31]!==d?(m=t.jsx(Me,{open:J,onOpenChange:P,children:d}),e[30]=J,e[31]=d,e[32]=m):m=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(j.Header.Left,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ge,{children:t.jsx(ue,{children:"Agents"})})})})}),e[33]=O):O=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=E):E=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(le,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:E}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let g;e[41]!==G||e[42]!==p?(g=t.jsxs(j.Header,{children:[O,t.jsxs(j.Header.Right,{children:[p,G]})]}),e[41]=G,e[42]=p,e[43]=g):g=e[43];let u;e[44]!==s?(u=r=>{r.key==="Escape"&&(s.setSearch(""),r.target.blur())},e[44]=s,e[45]=u):u=e[45];let f;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==u?(f=t.jsx(de,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:u}),e[46]=s.search,e[47]=s.setSearch,e[48]=u,e[49]=f):f=e[49];let h;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==i||e[57]!==o.slug||e[58]!==x?(h=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(r=>t.jsx(fe,{connection:{id:r.id??"",title:r.title,description:r.description,icon:r.icon,status:r.status},fallbackIcon:t.jsx(C,{}),onClick:()=>i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[r.connections.length," connection",r.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Z,{children:[t.jsx(ee,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ke,children:t.jsx(se,{size:20})})}),t.jsxs(te,{align:"end",onClick:Ee,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}})},children:[t.jsx(Y,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]})},r.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(ce,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:r=>i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=i,e[57]=o.slug,e[58]=x,e[59]=h):h=e[59];let K;return e[60]!==m||e[61]!==g||e[62]!==f||e[63]!==h?(K=t.jsxs(j,{children:[m,g,f,h]}),e[60]=m,e[61]=g,e[62]=f,e[63]=h,e[64]=K):K=e[64],K}function Ee(e){return e.stopPropagation()}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Re(e){return e.stopPropagation()}function Te(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?ze(new Date(e.updated_at)):"—"})}function Ue(e){return t.jsx(Ce,{id:e.updated_by??e.created_by,size:"3xs"})}function Le(e){return t.jsx(X.Suspense,{fallback:t.jsx(re.Fallback,{}),children:t.jsx(re,{connectionIds:e.connections.map(He),maxVisibleIcons:2})})}function He(e){return e.connection_id}function Fe(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Ge(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(xe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function It(){const e=ne.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(he,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Oe,{})})}),e[0]=o):o=e[0],o}export{It as default};
1
+ import{c as ne,j as t,r as X,u as ie,m as ae,O as V}from"./index-BKpxPW_G.js";import{C as le,a as ce}from"./collection-table-wrapper-DFTdnQhc.js";import{C as de}from"./collection-search-Bkd4qN8a.js";import{P as j}from"./index-B9-4goiW.js";import{B as me,a as pe,b as ge,c as ue}from"./breadcrumb-ChH6wfcA.js";import{C as fe}from"./connection-card-Ci3H_H7r.js";import{E as q}from"./empty-state-DXJM9xrV.js";import{E as he}from"./error-boundary-BMH0CjEH.js";import{I as xe}from"./integration-icon-DFSc5_D8.js";import{u as je,s as Y,U as Ce}from"./use-list-state-DNfSCsX5.js";import{u as be}from"./use-create-virtual-mcp-lh01_aoW.js";import{i as ye}from"./constants-DisdEZ3l.js";import{b as we,a as De}from"./use-virtual-mcp-BUCuQhrG.js";import{c as Ne,b as Se,d as _e,A as ke,e as $e,g as ve,a as Ae,f as Me}from"./alert-dialog-DRso9X1m.js";import{B as Q}from"./button-D_OpQIQm.js";import{D as Z,a as ee,b as te,c as R}from"./dropdown-menu-BxLN4KkF.js";import{i as se}from"./DotsVertical-BNqPYTki.js";import{i as Ie}from"./Loading01-C2vqzEw-.js";import{s as oe}from"./Trash01-d4v7i3Ze.js";import{t as C}from"./Users03-Bw7fWrTD.js";import{A as re}from"./agent-connections-preview-qFrRTce9.js";import{d as Pe}from"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowUp-D26ZQKRa.js";import"./Check-bgVFNRDs.js";import"./Grid01-CfSiTcO8.js";import"./List-BBkbo-oe.js";import"./view-mode-toggle-4jMhv4Z3.js";import"./utils-Ckp7rFN8.js";import"./table-BxUix49E.js";import"./SearchMd-BqVXNd65.js";import"./input-lpAGMNlp.js";import"./ChevronRight-DMzFQQCc.js";import"./card-DAZxrY9k.js";import"./index-fVGDVKMq.js";import"./avatar-kY9raA-l.js";import"./useQuery-Bo6lCSyK.js";import"./use-mobile-Cu9U-yCu.js";import"./use-connection-B0740Saa.js";import"./useMutation-Bnsod7M-.js";function ze(e){const o=Pe(new Date,e);return o<60?"<1m":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:o<31536e3?`${Math.floor(o/2592e3)}mo ago`:`${Math.floor(o/31536e3)}y ago`}function Be(e,o){switch(o.type){case"delete":return{mode:"deleting",virtualMcp:o.virtualMcp};case"close":return{mode:"idle"}}}function Oe(){const e=ne.c(65),{org:o}=ie(),i=ae();let b;e[0]!==o.slug?(b={namespace:o.slug,resource:"agents"},e[0]=o.slug,e[1]=b):b=e[1];const s=je(b),x=we(s);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},e[2]=y):y=e[2];const{createVirtualMCP:T,isCreating:w}=be(y),U=De();let D;e[3]===Symbol.for("react.memo_cache_sentinel")?(D={mode:"idle"},e[3]=D):D=e[3];const[n,N]=X.useReducer(Be,D);let S;e[4]!==U||e[5]!==n.mode||e[6]!==n.virtualMcp?(S=async()=>{if(n.mode!=="deleting")return;const r=n.virtualMcp.id;if(N({type:"close"}),!(!r||ye(r)))try{await U.delete.mutateAsync(r)}catch{}},e[4]=U,e[5]=n.mode,e[6]=n.virtualMcp,e[7]=S):S=e[7];const L=S;let _,k,$,v,A;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Ge,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:Fe,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},$={id:"connections",header:"Connections",render:Le,cellClassName:"w-28 shrink-0"},v={id:"updated_by",header:"Updated by",render:Ue,cellClassName:"w-32 shrink-0",sortable:!0},A={id:"updated_at",header:"Updated",render:Te,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=$,e[11]=v,e[12]=A):(_=e[8],k=e[9],$=e[10],v=e[11],A=e[12]);let M;e[13]!==i||e[14]!==o.slug?(M=[_,k,$,v,A,{id:"actions",header:"",render:r=>t.jsxs(Z,{children:[t.jsx(ee,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Re,children:t.jsx(se,{size:20})})}),t.jsxs(te,{align:"end",onClick:Ve,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}})},children:[t.jsx(Y,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=i,e[14]=o.slug,e[15]=M):M=e[15];const H=M,F=w?"Creating...":"Create Agent";let I;e[16]!==T||e[17]!==w||e[18]!==F?(I=t.jsx(Q,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:F}),e[16]=T,e[17]=w,e[18]=F,e[19]=I):I=e[19];const G=I,J=n.mode==="deleting";let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=r=>!r&&N({type:"close"}),e[20]=P):P=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ne,{children:"Delete Agent?"}),e[21]=z):z=e[21];const W=n.mode==="deleting"&&n.virtualMcp.title;let l;e[22]!==W?(l=t.jsxs(Se,{children:[z,t.jsxs(_e,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[22]=W,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==L?(c=t.jsxs($e,{children:[B,t.jsx(ve,{onClick:L,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=L,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ae,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==J||e[31]!==d?(m=t.jsx(Me,{open:J,onOpenChange:P,children:d}),e[30]=J,e[31]=d,e[32]=m):m=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(j.Header.Left,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ge,{children:t.jsx(ue,{children:"Agents"})})})})}),e[33]=O):O=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=E):E=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(le,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:E}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let g;e[41]!==G||e[42]!==p?(g=t.jsxs(j.Header,{children:[O,t.jsxs(j.Header.Right,{children:[p,G]})]}),e[41]=G,e[42]=p,e[43]=g):g=e[43];let u;e[44]!==s?(u=r=>{r.key==="Escape"&&(s.setSearch(""),r.target.blur())},e[44]=s,e[45]=u):u=e[45];let f;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==u?(f=t.jsx(de,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:u}),e[46]=s.search,e[47]=s.setSearch,e[48]=u,e[49]=f):f=e[49];let h;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==i||e[57]!==o.slug||e[58]!==x?(h=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(r=>t.jsx(fe,{connection:{id:r.id??"",title:r.title,description:r.description,icon:r.icon,status:r.status},fallbackIcon:t.jsx(C,{}),onClick:()=>i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[r.connections.length," connection",r.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Z,{children:[t.jsx(ee,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ke,children:t.jsx(se,{size:20})})}),t.jsxs(te,{align:"end",onClick:Ee,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}})},children:[t.jsx(Y,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]})},r.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(ce,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:r=>i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=i,e[57]=o.slug,e[58]=x,e[59]=h):h=e[59];let K;return e[60]!==m||e[61]!==g||e[62]!==f||e[63]!==h?(K=t.jsxs(j,{children:[m,g,f,h]}),e[60]=m,e[61]=g,e[62]=f,e[63]=h,e[64]=K):K=e[64],K}function Ee(e){return e.stopPropagation()}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Re(e){return e.stopPropagation()}function Te(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?ze(new Date(e.updated_at)):"—"})}function Ue(e){return t.jsx(Ce,{id:e.updated_by??e.created_by,size:"3xs"})}function Le(e){return t.jsx(X.Suspense,{fallback:t.jsx(re.Fallback,{}),children:t.jsx(re,{connectionIds:e.connections.map(He),maxVisibleIcons:2})})}function He(e){return e.connection_id}function Fe(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Ge(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(xe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function It(){const e=ne.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(he,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Oe,{})})}),e[0]=o):o=e[0],o}export{It as default};
@@ -1,4 +1,4 @@
1
- import{r as n,j as s,T as w,al as m,aG as O,D as I,an as M,J as A,B as G,E as z,aH as D,G as F,aI as H,aq as L,I as k,H as q,c as i}from"./index-HxeE9C0A.js";import{c as p}from"./utils-D1Qd9-I_.js";import{b as v}from"./button-C1iesapY.js";var x="AlertDialog",[B]=L(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(G,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(k,{...o,...a,ref:e})});y.displayName=V;var W="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(F,{...a,...t})};j.displayName=W;var Y="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(q,{...o,...a,ref:e})});_.displayName=Y;var f="AlertDialogContent",[J,K]=B(f),Q=H("AlertDialogContent"),h=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,r=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return s.jsx(O,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:s.jsx(J,{scope:t,cancelRef:u,children:s.jsxs(I,{role:"alertdialog",...r,...o,ref:P,onOpenAutoFocus:M(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[s.jsx(Q,{children:a}),s.jsx(X,{contentRef:c})]})})})});h.displayName=f;var b="AlertDialogTitle",E=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(w,{...o,...a,ref:e})});E.displayName=b;var $="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(z,{...o,...a,ref:e})});R.displayName=$;var U="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(A,{...o,...a,ref:e})});C.displayName=U;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(S,t),r=d(t),c=m(e,o);return s.jsx(A,{...r,...a,ref:c})});T.displayName=S;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
1
+ import{r as n,j as s,T as w,al as m,aG as O,D as I,an as M,J as A,B as G,E as z,aH as D,G as F,aI as H,aq as L,I as k,H as q,c as i}from"./index-BKpxPW_G.js";import{c as p}from"./utils-Ckp7rFN8.js";import{b as v}from"./button-D_OpQIQm.js";var x="AlertDialog",[B]=L(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(G,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(k,{...o,...a,ref:e})});y.displayName=V;var W="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(F,{...a,...t})};j.displayName=W;var Y="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(q,{...o,...a,ref:e})});_.displayName=Y;var f="AlertDialogContent",[J,K]=B(f),Q=H("AlertDialogContent"),h=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,r=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return s.jsx(O,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:s.jsx(J,{scope:t,cancelRef:u,children:s.jsxs(I,{role:"alertdialog",...r,...o,ref:P,onOpenAutoFocus:M(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[s.jsx(Q,{children:a}),s.jsx(X,{contentRef:c})]})})})});h.displayName=f;var b="AlertDialogTitle",E=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(w,{...o,...a,ref:e})});E.displayName=b;var $="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(z,{...o,...a,ref:e})});R.displayName=$;var U="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(A,{...o,...a,ref:e})});C.displayName=U;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(S,t),r=d(t),c=m(e,o);return s.jsx(A,{...r,...a,ref:c})});T.displayName=S;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${f}\` by passing a \`${$}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1 +1 @@
1
- import{c as r,a as m,j as n,A as o}from"./index-HxeE9C0A.js";function i(){const e=r.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/auth/$pathname"},e[0]=t):t=e[0];const{pathname:s}=m(t);let a;return e[1]!==s?(a=n.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:n.jsx(o,{pathname:s})}),e[1]=s,e[2]=a):a=e[2],a}export{i as default};
1
+ import{c as r,a as m,j as n,A as o}from"./index-BKpxPW_G.js";function i(){const e=r.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/auth/$pathname"},e[0]=t):t=e[0];const{pathname:s}=m(t);let a;return e[1]!==s?(a=n.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:n.jsx(o,{pathname:s})}),e[1]=s,e[2]=a):a=e[2],a}export{i as default};
@@ -1 +1 @@
1
- import{r as R,c as j,j as i,x as I,aJ as U,aK as $,aL as M}from"./index-HxeE9C0A.js";import{c as f}from"./utils-D1Qd9-I_.js";const V=({size:a=24,color:e="currentColor",...s})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(M,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(U,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function W(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx($,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],_="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function B(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%S.length;return S[s]}const L=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),J=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function K(a){const e=j.c(35);let s,t,o,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[m,x]=R.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(k){z=_;break e}if(typeof t=="string"){let c;e[11]!==t?(c=B(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(L({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==m||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:J(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(W,{className:f(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=m,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function Z(a){const e=j.c(18);let s,t,o,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,m=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==m||e[16]!==l?(x=i.jsx(K,{shape:b,url:l,fallback:t,size:m,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=m,e[16]=l,e[17]=x):x=e[17],x}Z.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(L({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{Z as A};
1
+ import{r as R,c as j,j as i,x as I,aJ as U,aK as $,aL as M}from"./index-BKpxPW_G.js";import{c as f}from"./utils-Ckp7rFN8.js";const V=({size:a=24,color:e="currentColor",...s})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(M,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(U,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function W(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx($,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],_="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function B(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%S.length;return S[s]}const L=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),J=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function K(a){const e=j.c(35);let s,t,o,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[m,x]=R.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(k){z=_;break e}if(typeof t=="string"){let c;e[11]!==t?(c=B(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(L({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==m||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:J(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(W,{className:f(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=m,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function Z(a){const e=j.c(18);let s,t,o,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,m=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==m||e[16]!==l?(x=i.jsx(K,{shape:b,url:l,fallback:t,size:m,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=m,e[16]=l,e[17]=x):x=e[17],x}Z.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(L({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{Z as A};
@@ -1 +1 @@
1
- import{c as d,j as u,q as l,x as v}from"./index-HxeE9C0A.js";import{c as g}from"./utils-D1Qd9-I_.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
1
+ import{c as d,j as u,q as l,x as v}from"./index-BKpxPW_G.js";import{c as g}from"./utils-Ckp7rFN8.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
@@ -1 +1 @@
1
- import"./index-HxeE9C0A.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
1
+ import"./index-BKpxPW_G.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
@@ -1 +1 @@
1
- import{c,j as n,q as f}from"./index-HxeE9C0A.js";import{i as u}from"./ChevronRight-CNYkXy1u.js";import{c as m}from"./utils-D1Qd9-I_.js";function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?f:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=n.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-normal truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??n.jsx(u,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=n.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,h as c,j as d,B as e};
1
+ import{c,j as n,q as f}from"./index-BKpxPW_G.js";import{i as u}from"./ChevronRight-DMzFQQCc.js";import{c as m}from"./utils-Ckp7rFN8.js";function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?f:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=n.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-normal truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??n.jsx(u,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=n.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,h as c,j as d,B as e};
@@ -1 +1 @@
1
- import{c as g,j as l,q as u,x as v}from"./index-HxeE9C0A.js";import{c as b}from"./utils-D1Qd9-I_.js";const p=v("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground",brand:"bg-brand-green-light text-brand-green-dark hover:bg-brand-green-light/90"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function m(d){const e=g.c(14);let t,r,i,a,s;e[0]!==d?({className:t,variant:s,size:i,asChild:a,...r}=d,e[0]=d,e[1]=t,e[2]=r,e[3]=i,e[4]=a,e[5]=s):(t=e[1],r=e[2],i=e[3],a=e[4],s=e[5]);const c=(a===void 0?!1:a)?u:"button";let n;e[6]!==t||e[7]!==i||e[8]!==s?(n=b(p({variant:s,size:i,className:t})),e[6]=t,e[7]=i,e[8]=s,e[9]=n):n=e[9];let o;return e[10]!==c||e[11]!==r||e[12]!==n?(o=l.jsx(c,{"data-slot":"button",className:n,...r}),e[10]=c,e[11]=r,e[12]=n,e[13]=o):o=e[13],o}export{m as B,p as b};
1
+ import{c as g,j as l,q as u,x as v}from"./index-BKpxPW_G.js";import{c as b}from"./utils-Ckp7rFN8.js";const p=v("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground",brand:"bg-brand-green-light text-brand-green-dark hover:bg-brand-green-light/90"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function m(d){const e=g.c(14);let t,r,i,a,s;e[0]!==d?({className:t,variant:s,size:i,asChild:a,...r}=d,e[0]=d,e[1]=t,e[2]=r,e[3]=i,e[4]=a,e[5]=s):(t=e[1],r=e[2],i=e[3],a=e[4],s=e[5]);const c=(a===void 0?!1:a)?u:"button";let n;e[6]!==t||e[7]!==i||e[8]!==s?(n=b(p({variant:s,size:i,className:t})),e[6]=t,e[7]=i,e[8]=s,e[9]=n):n=e[9];let o;return e[10]!==c||e[11]!==r||e[12]!==n?(o=l.jsx(c,{"data-slot":"button",className:n,...r}),e[10]=c,e[11]=r,e[12]=n,e[13]=o):o=e[13],o}export{m as B,p as b};
@@ -1 +1 @@
1
- import{c,j as l}from"./index-HxeE9C0A.js";import{c as n}from"./utils-D1Qd9-I_.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",r),e[3]=r,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
1
+ import{c,j as l}from"./index-BKpxPW_G.js";import{c as n}from"./utils-Ckp7rFN8.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",r),e[3]=r,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
@@ -1 +1 @@
1
- import{c as d,j as c,a6 as n,a7 as l}from"./index-HxeE9C0A.js";import{i as m}from"./Check-BIlnRzi6.js";import{c as b}from"./utils-D1Qd9-I_.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
1
+ import{c as d,j as c,a6 as n,a7 as l}from"./index-BKpxPW_G.js";import{i as m}from"./Check-bgVFNRDs.js";import{c as b}from"./utils-Ckp7rFN8.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
@@ -1 +1 @@
1
- import{r as c}from"./index-HxeE9C0A.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
1
+ import{r as c}from"./index-BKpxPW_G.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};