decocms 2.167.0 → 2.167.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/dist/client/assets/{AlertCircle-48gOoEWA.js → AlertCircle-CRefRGB6.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-CKoC1cMY.js → AlignLeft-DCeZyfUv.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-_L7cw1A8.js → ArrowDown-Ddd2bFCq.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-jV1c6x3k.js → ArrowLeft-COkllC0A.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DKc3SUsQ.js → ArrowUp-D8-wpLhK.js} +1 -1
  6. package/dist/client/assets/{Check-BWCeXHN7.js → Check-DFFtcHrw.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DZcEBbaZ.js → CheckCircle-DFbYHiLE.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-CsC_Ltj-.js → CheckDone01-JzYSoDE1.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-UCZI60jf.js → CheckVerified02-DfPGhpKJ.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-B15SC8MA.js → ChevronDown-DkB2aRG4.js} +1 -1
  11. package/dist/client/assets/{ChevronLeft-BjnPH80Y.js → ChevronLeft-BGM38xu6.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-DNq10e3Z.js → ChevronRight-ACRFNNEg.js} +1 -1
  13. package/dist/client/assets/{ChevronUp-Be0WocGY.js → ChevronUp-Bs9Ot1hj.js} +1 -1
  14. package/dist/client/assets/{Clock-CbBdVVok.js → Clock-VRCh834Q.js} +1 -1
  15. package/dist/client/assets/{Code01-BDvBTEm7.js → Code01-C8PssGbH.js} +1 -1
  16. package/dist/client/assets/{Coins01-CGSgNFIJ.js → Coins01-TB9HLbQn.js} +1 -1
  17. package/dist/client/assets/{Container-C4I-ZzWI.js → Container-B7oSS_-y.js} +1 -1
  18. package/dist/client/assets/{Copy01-BJVPuQbm.js → Copy01-CgUyGO9-.js} +1 -1
  19. package/dist/client/assets/{Dataflow03-CdPLEX-g.js → Dataflow03-8QP7Bqkf.js} +1 -1
  20. package/dist/client/assets/{DotsHorizontal-zwvwj18G.js → DotsHorizontal-DP-ax0xe.js} +1 -1
  21. package/dist/client/assets/{DotsVertical-DUf6cEvO.js → DotsVertical-D0oq2fjv.js} +1 -1
  22. package/dist/client/assets/{Download01-BwJBKvsx.js → Download01-DfOkRvOp.js} +1 -1
  23. package/dist/client/assets/{Edit01-BM5GDmTx.js → Edit01-odlMa8iv.js} +1 -1
  24. package/dist/client/assets/{Edit05-FVXfLA6i.js → Edit05-BbP5Wuhr.js} +1 -1
  25. package/dist/client/assets/{Eye-DkD5as17.js → Eye-DvVdD51j.js} +1 -1
  26. package/dist/client/assets/{EyeOff-BeKLPveV.js → EyeOff-CuPz9L1S.js} +1 -1
  27. package/dist/client/assets/{File02-C6fFP8wJ.js → File02-Cj1i35zl.js} +1 -1
  28. package/dist/client/assets/{File06-NiquJK6U.js → File06-DT_blB7L.js} +1 -1
  29. package/dist/client/assets/{FilterLines-Cn-l4hcD.js → FilterLines-DIdq4C3O.js} +1 -1
  30. package/dist/client/assets/{Globe01-oM7Jrrrb.js → Globe01-De8m2Ley.js} +1 -1
  31. package/dist/client/assets/{Globe02-BtYVEi0C.js → Globe02-C_VB-hTP.js} +1 -1
  32. package/dist/client/assets/{Grid01-Cj17P1tC.js → Grid01-Sp0biDxT.js} +1 -1
  33. package/dist/client/assets/{Hash02-BdiI1XxB.js → Hash02-DVmJlk2n.js} +1 -1
  34. package/dist/client/assets/{Home02-BGdlx1AT.js → Home02-C6yMcBVZ.js} +1 -1
  35. package/dist/client/assets/{Image01-CHkBHANF.js → Image01-DqXOaj2A.js} +1 -1
  36. package/dist/client/assets/{Inbox01-BxbPwF62.js → Inbox01-BtrVazQu.js} +1 -1
  37. package/dist/client/assets/{InfoCircle-BqEmSE9k.js → InfoCircle-t2WPl417.js} +1 -1
  38. package/dist/client/assets/{Key01-Be9_ogDx.js → Key01-FZzH7KSv.js} +1 -1
  39. package/dist/client/assets/{LayersTwo01-CqPgQoaH.js → LayersTwo01-DpY-ll-F.js} +1 -1
  40. package/dist/client/assets/{LayoutLeft-z9_XAaYG.js → LayoutLeft-Bt0zvSW4.js} +1 -1
  41. package/dist/client/assets/{Link01-DXpyb1VQ.js → Link01-emFpE4io.js} +1 -1
  42. package/dist/client/assets/{LinkExternal01--09S5N5q.js → LinkExternal01-BDorTcHT.js} +1 -1
  43. package/dist/client/assets/{List-c0L2g9Qy.js → List-ClxAjgXZ.js} +1 -1
  44. package/dist/client/assets/{Loading01-BUlApwyE.js → Loading01-CmbgGBJZ.js} +1 -1
  45. package/dist/client/assets/{Lock01-D2mdnqp4.js → Lock01-Xr17_tjV.js} +1 -1
  46. package/dist/client/assets/{Play-a4a9k_A2.js → Play-DJ6yCSJw.js} +1 -1
  47. package/dist/client/assets/{Plus-CiuqWk7L.js → Plus-BYkvGXiG.js} +1 -1
  48. package/dist/client/assets/{RefreshCcw01-CpK4UKE8.js → RefreshCcw01-CS4ZawZZ.js} +1 -1
  49. package/dist/client/assets/{Save01-CGK6rW3l.js → Save01-egVkGifz.js} +1 -1
  50. package/dist/client/assets/{SearchMd-D_8XQU19.js → SearchMd-JEgBfhSx.js} +1 -1
  51. package/dist/client/assets/{Settings01-BXea0IX5.js → Settings01-D4taEXIn.js} +1 -1
  52. package/dist/client/assets/{Shield01-xSYnh-yR.js → Shield01-Dd_1pv5e.js} +1 -1
  53. package/dist/client/assets/{Terminal-CJ1WAC7b.js → Terminal-LTVNn-ZQ.js} +1 -1
  54. package/dist/client/assets/{Trash01-CHv5mU8b.js → Trash01-Cw6VFCl2.js} +1 -1
  55. package/dist/client/assets/{Upload01-CquOr5qE.js → Upload01-CN7lXpcp.js} +1 -1
  56. package/dist/client/assets/{Users03-DBQP_ao_.js → Users03-B92JA0ax.js} +1 -1
  57. package/dist/client/assets/{X-CC0aD5R8.js → X-Coju733X.js} +1 -1
  58. package/dist/client/assets/{XCircle-CuIPHDkx.js → XCircle-BwKPKfX4.js} +1 -1
  59. package/dist/client/assets/{XClose-B-kxIP35.js → XClose-B27D0Pes.js} +1 -1
  60. package/dist/client/assets/{Zap-w2d1hiBo.js → Zap-Bt5a3_xw.js} +1 -1
  61. package/dist/client/assets/{agent-connections-preview-dUyrsdf1.js → agent-connections-preview-BAKS5gJJ.js} +1 -1
  62. package/dist/client/assets/agent-detail-h81X2k4_.js +2 -0
  63. package/dist/client/assets/{agents-NISG8LkE.js → agents-C2VjCuoK.js} +1 -1
  64. package/dist/client/assets/{alert-dialog-CpiIzpaw.js → alert-dialog-BP-z4Ogy.js} +2 -2
  65. package/dist/client/assets/{auth-catchall-Dmbx7J6q.js → auth-catchall-D7kGH0lg.js} +1 -1
  66. package/dist/client/assets/automation-detail-BDUvniQC.js +1 -0
  67. package/dist/client/assets/{automations-CQIWjBPD.js → automations-CChtinnU.js} +1 -1
  68. package/dist/client/assets/{avatar-CbDE9O_w.js → avatar-BCqIRh9w.js} +1 -1
  69. package/dist/client/assets/{badge-BiElTurh.js → badge-CDP8kbvH.js} +1 -1
  70. package/dist/client/assets/{binder-DAywY5NR.js → binder-DCIUHgMq.js} +1 -1
  71. package/dist/client/assets/{breadcrumb-U9pZLesK.js → breadcrumb-jhLLcaSq.js} +1 -1
  72. package/dist/client/assets/{card-DXYG1PJt.js → card-Bby2NP30.js} +1 -1
  73. package/dist/client/assets/{chart-BbEOfgV-.js → chart-DSgLCPFS.js} +1 -1
  74. package/dist/client/assets/{checkbox-7ZiSm3FO.js → checkbox-CXNIiG-w.js} +1 -1
  75. package/dist/client/assets/{circle-alert-DJViAw6g.js → circle-alert-CK8igi7e.js} +1 -1
  76. package/dist/client/assets/{collapsible-B9yZLN6Y.js → collapsible-C7W88NZ4.js} +1 -1
  77. package/dist/client/assets/{collection-detail-Clb7680a.js → collection-detail-uSo4M9af.js} +2 -2
  78. package/dist/client/assets/{collection-display-button-BKC7veh8.js → collection-display-button-771l7C-D.js} +1 -1
  79. package/dist/client/assets/{collection-search-DwGryXKM.js → collection-search-BcxXiwnM.js} +1 -1
  80. package/dist/client/assets/{collection-tab-Bo-9KEsf.js → collection-tab-Ca4vJhb7.js} +1 -1
  81. package/dist/client/assets/{collection-table-wrapper-CLdf4mbp.js → collection-table-wrapper-DRSC2j3q.js} +1 -1
  82. package/dist/client/assets/{collection-tabs-CPmBQ0Ih.js → collection-tabs-VNdwgO9D.js} +1 -1
  83. package/dist/client/assets/{command-BvPYgT3U.js → command-Ce4RvYhe.js} +1 -1
  84. package/dist/client/assets/{connect-DfhSkdZH.js → connect-BK7xH19m.js} +1 -1
  85. package/dist/client/assets/{connection-card-C48yZP0o.js → connection-card-8C6CCQg8.js} +1 -1
  86. package/dist/client/assets/{connection-detail-UUX3N3PI.js → connection-detail-DCm0Gf7T.js} +1 -1
  87. package/dist/client/assets/{connection-status-EaZNPeGi.js → connection-status-D82b0hJj.js} +1 -1
  88. package/dist/client/assets/{connections-DuZzWjnz.js → connections-eH8HE_fN.js} +1 -1
  89. package/dist/client/assets/{constants-BtZ3fAEQ.js → constants-CzDvwmSY.js} +1 -1
  90. package/dist/client/assets/constants-o-H0wcv5.js +1 -0
  91. package/dist/client/assets/context-DWa5-aY3.js +21 -0
  92. package/dist/client/assets/{create-organization-dialog-CUI7nss-.js → create-organization-dialog-D8Pt61pM.js} +1 -1
  93. package/dist/client/assets/{create-project-dialog-DI59mOlr.js → create-project-dialog-KRfVbR_V.js} +1 -1
  94. package/dist/client/assets/{danger-CgyY9J87.js → danger-lBuPJ9ow.js} +1 -1
  95. package/dist/client/assets/{danger-zone-CDTRHqoC.js → danger-zone-DwgtnkJb.js} +1 -1
  96. package/dist/client/assets/decopilot-events-Brt4gAR6.js +1 -0
  97. package/dist/client/assets/{dependencies-C-LUznBo.js → dependencies-ByapbBJ1.js} +1 -1
  98. package/dist/client/assets/dialog-DVrvUtp4.js +1 -0
  99. package/dist/client/assets/{dropdown-menu-W_lhWsM7.js → dropdown-menu-_sgnI8Sd.js} +1 -1
  100. package/dist/client/assets/{dynamic-plugin-layout-CLOgUYdt.js → dynamic-plugin-layout-EARuow4v.js} +1 -1
  101. package/dist/client/assets/{editable-task-title-DPm5hTsj.js → editable-task-title-DhgWYKTG.js} +1 -1
  102. package/dist/client/assets/{empty-state-DgczK1zq.js → empty-state-Cm3pZKVF.js} +1 -1
  103. package/dist/client/assets/{empty-state-Dz90tIjg.js → empty-state-VXOPlUbP.js} +1 -1
  104. package/dist/client/assets/{env-vars-editor-_us1Wsrd.js → env-vars-editor-CP22lwO9.js} +1 -1
  105. package/dist/client/assets/{extract-connection-data-4B_VINLV.js → extract-connection-data-DtmJqtHf.js} +1 -1
  106. package/dist/client/assets/{file-browser-07_p2xwc.js → file-browser-DhXVJnGT.js} +2 -2
  107. package/dist/client/assets/{form-BcVHSZnK.js → form-CRKVnCMR.js} +1 -1
  108. package/dist/client/assets/{general-ByH8NK66.js → general-RoGak9EH.js} +1 -1
  109. package/dist/client/assets/{grid-view-G5Ljiye5.js → grid-view-DeQZC1Ad.js} +1 -1
  110. package/dist/client/assets/{home-CdGGIEZY.js → home-DDWI0l_A.js} +1 -1
  111. package/dist/client/assets/{icon-picker-BR9TG3fC.js → icon-picker-C7pK4XCN.js} +1 -1
  112. package/dist/client/assets/{index-DbAOnuVY.js → index-B8JTf3bb.js} +1 -1
  113. package/dist/client/assets/{index-C4stU7_X.js → index-BE_3KD3M.js} +1 -1
  114. package/dist/client/assets/{index-EJhirEgi.js → index-BwxEZIQr.js} +32 -32
  115. package/dist/client/assets/{index-DJJzspJA.js → index-CO5ACses.js} +1 -1
  116. package/dist/client/assets/{index-BLjdA58H.js → index-D4QMenD_.js} +1 -1
  117. package/dist/client/assets/{index-6R2fscZr.js → index-DBuq81UB.js} +1 -1
  118. package/dist/client/assets/index-DIpn2laL.js +1 -0
  119. package/dist/client/assets/{index-D9aD7jmG.js → index-DRz1LsGS.js} +1 -1
  120. package/dist/client/assets/{index-Dv4huKa6.js → index-DzqmGhb3.js} +1 -1
  121. package/dist/client/assets/index-mgXzNPbR.js +1 -0
  122. package/dist/client/assets/{infiniteQueryObserver--lmuu5bR.js → infiniteQueryObserver-CZi5HeDN.js} +1 -1
  123. package/dist/client/assets/{input-23yd6VmI.js → input-Fhdajp_c.js} +1 -1
  124. package/dist/client/assets/{integration-icon-DnuBmEuk.js → integration-icon-TkiXAcCx.js} +1 -1
  125. package/dist/client/assets/{label-t2hx_05l.js → label-BLns8yFo.js} +1 -1
  126. package/dist/client/assets/{layout-Bw9dlo1E.js → layout-DQ81Lcct.js} +1 -1
  127. package/dist/client/assets/{layout-PA5WM8-4.js → layout-DeyJpCSu.js} +1 -1
  128. package/dist/client/assets/{login-n1KLhNbG.js → login-0CbZQiT4.js} +1 -1
  129. package/dist/client/assets/{logo-upload-B8w0TwVt.js → logo-upload-DUpx1K3j.js} +1 -1
  130. package/dist/client/assets/{markdown-D-1lsMgV.js → markdown-nhoc672y.js} +8 -8
  131. package/dist/client/assets/{mcp-app-renderer-YYUTU_-w.js → mcp-app-renderer-Czr8i4GK.js} +1 -1
  132. package/dist/client/assets/{mcp-server-card-d9n08Fh_.js → mcp-server-card-CWmebPs2.js} +1 -1
  133. package/dist/client/assets/mcp-server-detail-CbDJjQnJ.js +2 -0
  134. package/dist/client/assets/{members-1p11_2SS.js → members-EshNMuE5.js} +1 -1
  135. package/dist/client/assets/{monaco-editor-u58hRDQ4.js → monaco-editor-B6P_dgEC.js} +1 -1
  136. package/dist/client/assets/{monitoring-BB5FmWMv.js → monitoring-Dp7ndAsk.js} +11 -11
  137. package/dist/client/assets/{monitoring-dashboard-edit--q5QEX5i.js → monitoring-dashboard-edit-ClBenkfK.js} +1 -1
  138. package/dist/client/assets/{monitoring-dashboard-view-UsQjkLki.js → monitoring-dashboard-view-DS6l3WrT.js} +1 -1
  139. package/dist/client/assets/{oauth-callback-BL_sqHVU.js → oauth-callback-C1BG3W1h.js} +1 -1
  140. package/dist/client/assets/{oauth-callback-ai-provider-Cx3DblLQ.js → oauth-callback-ai-provider-DZLVWOw_.js} +1 -1
  141. package/dist/client/assets/org-ai-providers-DyjPbDPw.js +1 -0
  142. package/dist/client/assets/page-Dm5wW5_4.js +1 -0
  143. package/dist/client/assets/page-R2MxmNee.js +1 -0
  144. package/dist/client/assets/{plugin-empty-state-DgqJPRi5.js → plugin-empty-state-DILviBJd.js} +1 -1
  145. package/dist/client/assets/{plugin-empty-state-CJh4Lqbf.js → plugin-empty-state-DOItggu9.js} +1 -1
  146. package/dist/client/assets/{plugin-header-KT2ilJzM.js → plugin-header-BPoTqcJO.js} +1 -1
  147. package/dist/client/assets/{plugin-header-DDT-qUkq.js → plugin-header-CmM0hhfH.js} +1 -1
  148. package/dist/client/assets/plugins-Cp4R69Ly.js +1 -0
  149. package/dist/client/assets/{popover-Cmt-BFZN.js → popover-PQM18UlA.js} +1 -1
  150. package/dist/client/assets/project-app-view-CO-ltixT.js +1 -0
  151. package/dist/client/assets/project-layout-CRYoVp6K.js +1 -0
  152. package/dist/client/assets/{project-plugins-Caet_L4_.js → project-plugins-_fYzNgni.js} +1 -1
  153. package/dist/client/assets/{projects-list-DWFSv3Ix.js → projects-list-BPNPhjeN.js} +1 -1
  154. package/dist/client/assets/{readme-viewer-Xgb_lJQx.js → readme-viewer-Bxl1dElh.js} +1 -1
  155. package/dist/client/assets/{registry-layout-M9XW6rhp.js → registry-layout-zDOn9GUq.js} +1 -1
  156. package/dist/client/assets/{registry-utils-Bc7JySBD.js → registry-utils-BSSbBnO1.js} +1 -1
  157. package/dist/client/assets/{reports-layout-DiGXJ7eO.js → reports-layout-D4qhgPNX.js} +1 -1
  158. package/dist/client/assets/{reset-password-CwVXb38O.js → reset-password-fmyW6U2y.js} +1 -1
  159. package/dist/client/assets/{resizable-ghy0Xufz.js → resizable-Cm6dp-B2.js} +1 -1
  160. package/dist/client/assets/{save-actions-DvQBIk-t.js → save-actions-DuKbd0Td.js} +1 -1
  161. package/dist/client/assets/{scroll-area-DzWnDQB-.js → scroll-area-B-Ee7B_j.js} +1 -1
  162. package/dist/client/assets/{select-B2Bho1QQ.js → select-1RddZ4CO.js} +1 -1
  163. package/dist/client/assets/{select-virtual-mcp-Tk-m3Fu9.js → select-virtual-mcp-DGdxHoQi.js} +1 -1
  164. package/dist/client/assets/shell-layout-Ca0m0ZLh.js +3 -0
  165. package/dist/client/assets/{sidebar-settings-BTY81fOZ.js → sidebar-settings-De4sr2dR.js} +1 -1
  166. package/dist/client/assets/{skeleton-BDMxlKkg.js → skeleton-DJF7tug6.js} +1 -1
  167. package/dist/client/assets/{spinner-DcYxwnHl.js → spinner-BnxbYYlb.js} +1 -1
  168. package/dist/client/assets/{store-invite-CDA2bein.js → store-invite-oCuf7I6o.js} +1 -1
  169. package/dist/client/assets/{switch-DRgBKNMz.js → switch-Bq8IUh07.js} +1 -1
  170. package/dist/client/assets/{table-Bs6V2h_N.js → table-BqV5DzoG.js} +1 -1
  171. package/dist/client/assets/{tabs-Cbvel-f6.js → tabs-C5hfwptf.js} +1 -1
  172. package/dist/client/assets/{task-status-B95CCzhX.js → task-status-Bl9QTmtn.js} +30 -22
  173. package/dist/client/assets/tasks-0Eg7ZyIZ.js +1 -0
  174. package/dist/client/assets/{tasks-panel-BGarv8W1.js → tasks-panel-OJ8S6gUG.js} +1 -1
  175. package/dist/client/assets/{textarea--Uagmopx.js → textarea-Bz-C9pBX.js} +1 -1
  176. package/dist/client/assets/{time-range-picker-Vb_Ca2x7.js → time-range-picker-BTo-nySJ.js} +1 -1
  177. package/dist/client/assets/{toggle-group-CnbQDoAl.js → toggle-group-P3u85xuW.js} +1 -1
  178. package/dist/client/assets/{tools-list-Cd5xU46X.js → tools-list-CAH2xsXw.js} +1 -1
  179. package/dist/client/assets/{tooltip-BXI94UP3.js → tooltip-aT8SYWF_.js} +1 -1
  180. package/dist/client/assets/{topbar-portal-BgYtwYtw.js → topbar-portal-C-sDPeUg.js} +1 -1
  181. package/dist/client/assets/{types-CdefEA9e.js → types-Dpvg5M06.js} +1 -1
  182. package/dist/client/assets/usage-t6qWPVZ4.js +1 -0
  183. package/dist/client/assets/{use-automations-3lm8AX10.js → use-automations-qsid-9wy.js} +1 -1
  184. package/dist/client/assets/{use-binding-THgLcp9C.js → use-binding-BmEXmDTS.js} +1 -1
  185. package/dist/client/assets/{use-collections-B4b2cHqe.js → use-collections-L9vgkwE-.js} +1 -1
  186. package/dist/client/assets/{use-connection-DrhtnyBi.js → use-connection-DneEev9a.js} +1 -1
  187. package/dist/client/assets/{use-copy-BAQklmkz.js → use-copy-D_A8LaGR.js} +1 -1
  188. package/dist/client/assets/{use-create-virtual-mcp-DLy6t37V.js → use-create-virtual-mcp-CWD_gaUu.js} +1 -1
  189. package/dist/client/assets/{use-install-from-registry-EOOhwh-F.js → use-install-from-registry--Cp53uqX.js} +1 -1
  190. package/dist/client/assets/{use-list-state-BXqBxE3W.js → use-list-state-CcAjjCVm.js} +1 -1
  191. package/dist/client/assets/{use-llm-B0ZUgM3D.js → use-llm-uI2ZLalw.js} +1 -1
  192. package/dist/client/assets/use-local-storage-CI_WEqce.js +1 -0
  193. package/dist/client/assets/{use-mcp-prompts-LuO7HYtE.js → use-mcp-prompts-CpqNoP0o.js} +1 -1
  194. package/dist/client/assets/{use-mcp-resources-Dk6zV1FV.js → use-mcp-resources-BsCeSR2x.js} +1 -1
  195. package/dist/client/assets/{use-mcp-tools-CKkWOyR2.js → use-mcp-tools-DNu930_U.js} +1 -1
  196. package/dist/client/assets/{use-members-DQi2Ov4F.js → use-members-DpuzXMS1.js} +1 -1
  197. package/dist/client/assets/{use-mobile-DwOvFQ5A.js → use-mobile-DFD6SQiI.js} +1 -1
  198. package/dist/client/assets/{use-project-UxeKn7lk.js → use-project-BAPzM4i4.js} +1 -1
  199. package/dist/client/assets/{use-view-mode-CkJMVXNZ.js → use-view-mode-2oXrhkvB.js} +1 -1
  200. package/dist/client/assets/{use-virtual-mcp-D_iE9Cdz.js → use-virtual-mcp-CvmGsLOT.js} +1 -1
  201. package/dist/client/assets/useInfiniteQuery-D9IG6LkB.js +1 -0
  202. package/dist/client/assets/{useMutation-ClueFvpj.js → useMutation-xr8MgEC0.js} +1 -1
  203. package/dist/client/assets/useQuery-BMWtXZn8.js +1 -0
  204. package/dist/client/assets/useSuspenseInfiniteQuery-DIDJd1Uk.js +1 -0
  205. package/dist/client/assets/{user-CmrAywRT.js → user-Ye6g7e7k.js} +1 -1
  206. package/dist/client/assets/{workflow-DUiHQumC.js → workflow-ckfsqQYq.js} +1 -1
  207. package/dist/client/index.html +11 -2
  208. package/dist/client/og-image.png +0 -0
  209. package/dist/server/cli.js +219 -219
  210. package/dist/server/migrate.js +1 -1
  211. package/dist/server/server.js +134 -134
  212. package/package.json +1 -1
  213. package/dist/client/assets/agent-detail-gWgaUo37.js +0 -2
  214. package/dist/client/assets/automation-detail-pgXQ6r-z.js +0 -1
  215. package/dist/client/assets/constants-DCSMrWwu.js +0 -1
  216. package/dist/client/assets/context-228p0Ol2.js +0 -29
  217. package/dist/client/assets/default-model-D8jxKXJs.js +0 -1
  218. package/dist/client/assets/dialog-DD3DgOo2.js +0 -1
  219. package/dist/client/assets/index-BL4eeGnH.js +0 -1
  220. package/dist/client/assets/index-wbJeckpV.js +0 -1
  221. package/dist/client/assets/localstorage-keys-CyCsfmz2.js +0 -1
  222. package/dist/client/assets/mcp-server-detail-CK4-sRdM.js +0 -2
  223. package/dist/client/assets/org-ai-providers-DEZEBxef.js +0 -1
  224. package/dist/client/assets/page-4As1cwNm.js +0 -1
  225. package/dist/client/assets/page-bNXst3ko.js +0 -1
  226. package/dist/client/assets/plugins-s9Jf7v31.js +0 -1
  227. package/dist/client/assets/project-app-view-DhZEpR7h.js +0 -1
  228. package/dist/client/assets/project-layout-7FJbf_iM.js +0 -1
  229. package/dist/client/assets/shell-layout-ChsgawOS.js +0 -3
  230. package/dist/client/assets/tasks-C8R0uxcK.js +0 -1
  231. package/dist/client/assets/usage-B8eRkRZY.js +0 -1
  232. package/dist/client/assets/use-preferences-D5crHwiP.js +0 -1
  233. package/dist/client/assets/useInfiniteQuery-Dg54E7EH.js +0 -1
  234. package/dist/client/assets/useQuery-mGiR1oLn.js +0 -1
  235. package/dist/client/assets/useSuspenseInfiniteQuery-DUeEwu4s.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{r as S,c as k,j as t,E as fe,B as J,z as ae,ae as Je,u as de,V as Ze,n as Qe,w as ce,e as Xe,g as et,O as Fe,t as tt,q as st,at as lt,G as Me}from"./index-BwxEZIQr.js";import{u as ot}from"./context-DWa5-aY3.js";import{E as nt}from"./empty-state-VXOPlUbP.js";import{I as it}from"./icon-picker-C7pK4XCN.js";import{I as Ae}from"./integration-icon-TkiXAcCx.js";import{u as rt}from"./index-DIpn2laL.js";import{B as Oe}from"./badge-CDP8kbvH.js";import{i as at,a as ct,C as dt,b as mt}from"./collapsible-C7W88NZ4.js";import{I as Ve}from"./input-Fhdajp_c.js";import{S as ut}from"./switch-Bq8IUh07.js";import{T as ft}from"./textarea-Bz-C9pBX.js";import{a as xe,b as ye,c as pe,T as he}from"./tooltip-aT8SYWF_.js";import{b as xt,u as pt}from"./use-connection-DneEev9a.js";import{u as ht,a as gt}from"./use-virtual-mcp-CvmGsLOT.js";import{i as He}from"./ChevronRight-ACRFNNEg.js";import{n as jt}from"./ChevronUp-Bs9Ot1hj.js";import{i as $e}from"./File02-Cj1i35zl.js";import{i as De}from"./Loading01-CmbgGBJZ.js";import{i as bt}from"./Play-DJ6yCSJw.js";import{s as Be}from"./Plus-BYkvGXiG.js";import{b as Le}from"./index-B8JTf3bb.js";import{t as Nt}from"./Users03-B92JA0ax.js";import{B as yt,a as vt,b as Ge,d as Ct,e as _t,c as St}from"./breadcrumb-jhLLcaSq.js";import{a as Tt,V as kt}from"./layout-DeyJpCSu.js";import{S as wt}from"./save-actions-DuKbd0Td.js";import{C as Et}from"./collection-search-BcxXiwnM.js";import{T as It}from"./tools-list-CAH2xsXw.js";import{C as ze}from"./checkbox-CXNIiG-w.js";import{e as At,a as Ue,D as Ke,b as Ot,c as $t}from"./dialog-DVrvUtp4.js";import{T as ve,a as Dt,b as Ce,c as Lt}from"./tabs-C5hfwptf.js";import{u as ge,a as zt}from"./constants-CzDvwmSY.js";import{c as Rt}from"./use-mcp-tools-DNu930_U.js";import{a as Pt}from"./use-mcp-resources-BsCeSR2x.js";import{u as Mt}from"./use-mcp-prompts-CpqNoP0o.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{I as Vt,R as Bt,a as Gt}from"./index-BE_3KD3M.js";import{i as Ft}from"./dropdown-menu-_sgnI8Sd.js";import{i as je}from"./Check-DFFtcHrw.js";import{i as Ht}from"./Code01-C8PssGbH.js";import{a as Re}from"./Copy01-CgUyGO9-.js";import{i as _e}from"./InfoCircle-t2WPl417.js";import{i as Ut}from"./Key01-FZzH7KSv.js";import{A as Kt}from"./agent-connections-preview-BAKS5gJJ.js";import"./decopilot-events-Brt4gAR6.js";import"./popover-PQM18UlA.js";import"./scroll-area-B-Ee7B_j.js";import"./Container-B7oSS_-y.js";import"./Edit05-BbP5Wuhr.js";import"./Link01-emFpE4io.js";import"./XClose-B27D0Pes.js";import"./use-local-storage-CI_WEqce.js";import"./useQuery-BMWtXZn8.js";import"./useMutation-xr8MgEC0.js";import"./index-DzqmGhb3.js";import"./use-collections-L9vgkwE-.js";import"./Save01-egVkGifz.js";import"./SearchMd-JEgBfhSx.js";import"./collection-display-button-771l7C-D.js";import"./ArrowDown-Ddd2bFCq.js";import"./ArrowUp-D8-wpLhK.js";import"./Grid01-Sp0biDxT.js";import"./List-ClxAjgXZ.js";import"./collection-table-wrapper-DRSC2j3q.js";import"./table-BqV5DzoG.js";import"./card-Bby2NP30.js";import"./types-Dpvg5M06.js";import"./Eye-DvVdD51j.js";import"./Globe02-C_VB-hTP.js";import"./LayersTwo01-DpY-ll-F.js";import"./X-Coju733X.js";const be=({size:o=24,color:e="currentColor",...s})=>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},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";const Ye=({size:o=24,color:e="currentColor",...s})=>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},S.createElement("path",{d:"m12 5.5-4.638 6.747c-.28.406-.42.609-.41.778a.5.5 0 0 0 .195.373c.135.102.38.102.874.102H12v5l4.638-6.747c.28-.406.42-.609.41-.778a.5.5 0 0 0-.195-.373c-.135-.102-.38-.102-.874-.102H12v-5Z"}),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"}));Ye.displayName="ZapCircle";function Se(o){return o===null?"all":o?.length??0}function Wt(o,e){const s=o[e];if(!s)return"";const n=[];return s.tools===null?n.push("all tools"):s.tools&&s.tools.length>0&&n.push(`${s.tools.length} tools`),s.resources===null?n.push("all resources"):s.resources&&s.resources.length>0&&n.push(`${s.resources.length} resources`),s.prompts===null?n.push("all prompts"):s.prompts&&s.prompts.length>0&&n.push(`${s.prompts.length} prompts`),n.join(", ")}function Yt(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 qt={tools:null,resources:null,prompts:null};function Te(){const o=k.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(De,{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(Je,{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 Jt(o){const e=k.c(23),{item:s,isSelected:n,onToggle:l,disabled:i}=o,d=i?"cursor-not-allowed opacity-50":"cursor-pointer",a=n?"bg-accent/25":"hover:bg-muted/50";let r;e[0]!==d||e[1]!==a?(r=ae("flex items-start gap-3 p-4 rounded-lg transition-colors",d,a),e[0]=d,e[1]=a,e[2]=r):r=e[2];let c;e[3]!==s.name?(c=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=c):c=e[4];let p;e[5]!==s.tags?(p=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=p):p=e[6];let g;e[7]!==c||e[8]!==p?(g=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c,p]}),e[7]=c,e[8]=p,e[9]=g):g=e[9];let x;e[10]!==s.description?(x=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=x):x=e[11];let h;e[12]!==g||e[13]!==x?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[g,x]}),e[12]=g,e[13]=x,e[14]=h):h=e[14];let u;e[15]!==i||e[16]!==n||e[17]!==l?(u=t.jsx(ze,{checked:n,onCheckedChange:l,disabled:i,className:"mt-0.5"}),e[15]=i,e[16]=n,e[17]=l,e[18]=u):u=e[18];let f;return e[19]!==r||e[20]!==h||e[21]!==u?(f=t.jsxs("label",{className:r,children:[h,u]}),e[19]=r,e[20]=h,e[21]=u,e[22]=f):f=e[22],f}function Pe(o){const e=k.c(32),{items:s,selections:n,onToggle:l,onToggleAll:i,emptyMessage:d,disabled:a}=o;let r,c,p,g,x;if(e[0]!==a||e[1]!==d||e[2]!==s||e[3]!==l||e[4]!==i||e[5]!==n){x=Symbol.for("react.early_return_sentinel");e:{const f=s.map(Zt);if(s.length===0){let v;e[11]!==d?(v=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:d})}),e[11]=d,e[12]=v):v=e[12],x=v;break e}p="flex flex-col h-full";const b=a?"cursor-not-allowed opacity-50":"cursor-pointer";let m;e[13]!==b?(m=ae("flex items-start gap-3 p-4",b),e[13]=b,e[14]=m):m=e[14];let j;e[15]!==s.length?(j=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]=j):j=e[16];const y=n===null;let C;e[17]!==a||e[18]!==i||e[19]!==y?(C=t.jsx(ze,{checked:y,onCheckedChange:i,disabled:a,className:"mt-0.5"}),e[17]=a,e[18]=i,e[19]=y,e[20]=C):C=e[20],e[21]!==C||e[22]!==m||e[23]!==j?(g=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:m,children:[j,C]})}),e[21]=C,e[22]=m,e[23]=j,e[24]=g):g=e[24],r="flex-1 overflow-auto px-4 py-3 space-y-1",c=s.map(v=>t.jsx(Jt,{item:v,isSelected:n===null||n?.includes(v.id),onToggle:()=>l(v.id,f),disabled:a},v.id))}e[0]=a,e[1]=d,e[2]=s,e[3]=l,e[4]=i,e[5]=n,e[6]=r,e[7]=c,e[8]=p,e[9]=g,e[10]=x}else r=e[6],c=e[7],p=e[8],g=e[9],x=e[10];if(x!==Symbol.for("react.early_return_sentinel"))return x;let h;e[25]!==r||e[26]!==c?(h=t.jsx("div",{className:r,children:c}),e[25]=r,e[26]=c,e[27]=h):h=e[27];let u;return e[28]!==p||e[29]!==g||e[30]!==h?(u=t.jsxs("div",{className:p,children:[g,h]}),e[28]=p,e[29]=g,e[30]=h,e[31]=u):u=e[31],u}function Zt(o){return o.id}function Qt(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let p;e[3]!==c?(p={client:c},e[3]=c,e[4]=p):p=e[4];const{data:g}=Rt(p);let x;e[5]!==g.tools?(x=g.tools.map(Xt),e[5]=g.tools,e[6]=x):x=e[6];const h=x;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No tools available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function Xt(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(It,{annotations:o.annotations,_meta:o._meta})}}function es(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let p;e[3]!==c?(p={client:c},e[3]=c,e[4]=p):p=e[4];const{data:g}=Pt(p);let x;e[5]!==g.resources?(x=g.resources.map(ts),e[5]=g.resources,e[6]=x):x=e[6];const h=x;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No resources available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function ts(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function ss(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let p;e[3]!==c?(p={client:c},e[3]=c,e[4]=p):p=e[4];const{data:g}=Mt(p);let x;e[5]!==g.prompts?(x=g.prompts.map(ls),e[5]=g.prompts,e[6]=x):x=e[6];const h=x;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No prompts available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function ls(o){return{id:o.name,name:o.name,description:o.description}}function os(o){const e=k.c(24),{connection:s,isSelected:n,hasSelections:l,summary:i,onClick:d,onToggleAll:a,disabled:r}=o,c=r?"cursor-not-allowed opacity-50":"cursor-pointer",p=n?"bg-accent":"hover:bg-muted/50";let g;e[0]!==c||e[1]!==p?(g=ae("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",c,p),e[0]=c,e[1]=p,e[2]=g):g=e[2];const x=r?void 0:d;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(Ae,{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 u;e[6]!==s.title?(u=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=u):u=e[7];let f;e[8]!==l||e[9]!==i?(f=l&&i&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[8]=l,e[9]=i,e[10]=f):f=e[10];let b;e[11]!==u||e[12]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[u,f]}),e[11]=u,e[12]=f,e[13]=b):b=e[13];let m;e[14]!==r||e[15]!==l||e[16]!==a?(m=t.jsx(ze,{checked:l,onCheckedChange:a,onClick:ns,disabled:r,className:"shrink-0"}),e[14]=r,e[15]=l,e[16]=a,e[17]=m):m=e[17];let j;return e[18]!==g||e[19]!==x||e[20]!==h||e[21]!==b||e[22]!==m?(j=t.jsxs("div",{className:g,onClick:x,children:[h,b,m]}),e[18]=g,e[19]=x,e[20]=h,e[21]=b,e[22]=m,e[23]=j):j=e[23],j}function ns(o){return o.stopPropagation()}function is(o){const e=k.c(22),{allConnections:s,searchTerm:n,selectedId:l,hasSelections:i,getSelectionSummary:d,onConnectionClick:a,onToggleAll:r,disabled:c}=o;let p;e[0]!==s||e[1]!==n?(p=n?s.filter(u=>u.title.toLowerCase().includes(n.toLowerCase())||u.description?.toLowerCase().includes(n.toLowerCase())):s,e[0]=s,e[1]=n,e[2]=p):p=e[2];const g=p;if(g.length===0){const u=n?"No connections found":"No connections available";let f;return e[3]!==u?(f=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:u}),e[3]=u,e[4]=f):f=e[4],f}let x;if(e[5]!==c||e[6]!==g||e[7]!==d||e[8]!==i||e[9]!==a||e[10]!==r||e[11]!==l){let u;e[13]!==c||e[14]!==d||e[15]!==i||e[16]!==a||e[17]!==r||e[18]!==l?(u=f=>t.jsx(os,{connection:f,isSelected:l===f.id,hasSelections:i(f.id),summary:d(f.id),onClick:()=>a(f.id),onToggleAll:()=>r(f.id),disabled:c},f.id),e[13]=c,e[14]=d,e[15]=i,e[16]=a,e[17]=r,e[18]=l,e[19]=u):u=e[19],x=g.map(u),e[5]=c,e[6]=g,e[7]=d,e[8]=i,e[9]=a,e[10]=r,e[11]=l,e[12]=x}else x=e[12];let h;return e[20]!==x?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:x}),e[20]=x,e[21]=h):h=e[21],h}function rs(o){const e=k.c(75),{currentConnection:s,activeTab:n,selectedId:l,formData:i,toggleTool:d,toggleResource:a,togglePrompt:r,toggleAllTools:c,toggleAllResources:p,toggleAllPrompts:g,onTabChange:x}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(Ae,{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 u;e[3]!==s.title?(u=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=u):u=e[4];let f;e[5]!==s.description?(f=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=f):f=e[6];let b;e[7]!==u||e[8]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,f]}),e[7]=u,e[8]=f,e[9]=b):b=e[9];let m;e[10]!==h||e[11]!==b?(m=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,b]})}),e[10]=h,e[11]=b,e[12]=m):m=e[12];let j;e[13]!==x?(j=M=>x(M),e[13]=x,e[14]=j):j=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(ve,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Le,{size:16}),"Tools"]}),e[15]=y):y=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(ve,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=C):C=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(Dt,{variant:"underline",className:"shrink-0 px-6",children:[y,C,t.jsxs(ve,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx($e,{size:16}),"Prompts"]})]}),e[17]=v):v=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=ke("Tools not supported by this server"),e[18]=V):V=e[18];let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Te,{}),e[19]=R):R=e[19];let T;e[20]!==i||e[21]!==l?(T=i[l]?i[l].tools:[],e[20]=i,e[21]=l,e[22]=T):T=e[22];let O;e[23]!==l||e[24]!==d?(O=(M,q)=>d(l,M,q),e[23]=l,e[24]=d,e[25]=O):O=e[25];let _;e[26]!==l||e[27]!==c?(_=()=>c(l),e[26]=l,e[27]=c,e[28]=_):_=e[28];let w;e[29]!==l||e[30]!==T||e[31]!==O||e[32]!==_?(w=t.jsx(Ce,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:V,children:t.jsx(S.Suspense,{fallback:R,children:t.jsx(Qt,{connectionId:l,selections:T,onToggle:O,onToggleAll:_})})})}),e[29]=l,e[30]=T,e[31]=O,e[32]=_,e[33]=w):w=e[33];let z;e[34]===Symbol.for("react.memo_cache_sentinel")?(z=ke("Resources not supported by this server"),e[34]=z):z=e[34];let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Te,{}),e[35]=$):$=e[35];let I;e[36]!==i||e[37]!==l?(I=i[l]?i[l].resources:[],e[36]=i,e[37]=l,e[38]=I):I=e[38];let D;e[39]!==l||e[40]!==a?(D=(M,q)=>a(l,M,q),e[39]=l,e[40]=a,e[41]=D):D=e[41];let A;e[42]!==l||e[43]!==p?(A=()=>p(l),e[42]=l,e[43]=p,e[44]=A):A=e[44];let E;e[45]!==l||e[46]!==I||e[47]!==D||e[48]!==A?(E=t.jsx(Ce,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:z,children:t.jsx(S.Suspense,{fallback:$,children:t.jsx(es,{connectionId:l,selections:I,onToggle:D,onToggleAll:A})})})}),e[45]=l,e[46]=I,e[47]=D,e[48]=A,e[49]=E):E=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=ke("Prompts not supported by this server"),e[50]=B):B=e[50];let P;e[51]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Te,{}),e[51]=P):P=e[51];let K;e[52]!==i||e[53]!==l?(K=i[l]?i[l].prompts:[],e[52]=i,e[53]=l,e[54]=K):K=e[54];let H;e[55]!==l||e[56]!==r?(H=(M,q)=>r(l,M,q),e[55]=l,e[56]=r,e[57]=H):H=e[57];let W;e[58]!==l||e[59]!==g?(W=()=>g(l),e[58]=l,e[59]=g,e[60]=W):W=e[60];let U;e[61]!==l||e[62]!==K||e[63]!==H||e[64]!==W?(U=t.jsx(Ce,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:B,children:t.jsx(S.Suspense,{fallback:P,children:t.jsx(ss,{connectionId:l,selections:K,onToggle:H,onToggleAll:W})})})}),e[61]=l,e[62]=K,e[63]=H,e[64]=W,e[65]=U):U=e[65];let Y;e[66]!==n||e[67]!==w||e[68]!==E||e[69]!==U||e[70]!==j?(Y=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(Lt,{value:n,onValueChange:j,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[v,w,E,U]})}),e[66]=n,e[67]=w,e[68]=E,e[69]=U,e[70]=j,e[71]=Y):Y=e[71];let Z;return e[72]!==Y||e[73]!==m?(Z=t.jsxs(t.Fragment,{children:[m,Y]}),e[72]=Y,e[73]=m,e[74]=Z):Z=e[74],Z}function as(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 we(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function cs(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 ds=(o,e)=>o.find(s=>s.id===e)??o[0];function ms(o){const e=k.c(77),{open:s,onOpenChange:n,selectedId:l,form:i,connections:d}=o;let a;e[0]!==l?(a={activeTab:"tools",searchTerm:"",selectedId:l},e[0]=l,e[1]=a):a=e[1];const[r,c]=S.useReducer(cs,a),p=S.useDeferredValue(r.searchTerm);let g;e[2]!==p?(g={searchTerm:p},e[2]=p,e[3]=g):g=e[3];const x=xt(g);let h;e[4]!==d?(h=d??[],e[4]=d,e[5]=h):h=e[5];let u;e[6]!==h?(u=as(h),e[6]=h,e[7]=u):u=e[7];const f=u;let b;e[8]!==x||e[9]!==r.selectedId?(b=ds(x,r.selectedId),e[8]=x,e[9]=r.selectedId,e[10]=b):b=e[10];const m=b,j=m?.id??null;let y;e[11]!==f?(y=N=>Yt(f,N),e[11]=f,e[12]=y):y=e[12];const C=y;let v;e[13]!==f?(v=N=>Wt(f,N),e[13]=f,e[14]=v):v=e[14];const V=v;let R;e[15]!==i||e[16]!==f?(R=(N,L,G,Q)=>{const ie=f[N]?.[L];let F;ie===null?F=Q.filter(Ne=>Ne!==G):ie?.includes(G)?F=ie.filter(Ne=>Ne!==G):(F=[...ie??[],G],F.length===Q.length&&(F=null));const re={...f};re[N]?re[N]={...re[N]}:re[N]={tools:null,resources:null,prompts:null},re[N][L]=F,i.setValue("connections",we(re),{shouldDirty:!0,shouldTouch:!0})},e[15]=i,e[16]=f,e[17]=R):R=e[17];const T=R;let O;e[18]!==i||e[19]!==f?(O=(N,L)=>{const ie=f[N]?.[L]===null?[]:null,F={...f};F[N]?F[N]={...F[N]}:F[N]={tools:null,resources:null,prompts:null},F[N][L]=ie,i.setValue("connections",we(F),{shouldDirty:!0,shouldTouch:!0})},e[18]=i,e[19]=f,e[20]=O):O=e[20];const _=O;let w;e[21]!==T?(w=(N,L,G)=>T(N,"tools",L,G),e[21]=T,e[22]=w):w=e[22];const z=w;let $;e[23]!==T?($=(N,L,G)=>T(N,"resources",L,G),e[23]=T,e[24]=$):$=e[24];const I=$;let D;e[25]!==T?(D=(N,L,G)=>T(N,"prompts",L,G),e[25]=T,e[26]=D):D=e[26];const A=D;let E;e[27]!==_?(E=N=>_(N,"tools"),e[27]=_,e[28]=E):E=e[28];const B=E;let P;e[29]!==_?(P=N=>_(N,"resources"),e[29]=_,e[30]=P):P=e[30];const K=P;let H;e[31]!==_?(H=N=>_(N,"prompts"),e[31]=_,e[32]=H):H=e[32];const W=H;let U;e[33]!==i||e[34]!==f?(U=N=>{const L=f[N],G=L&&L.tools===null&&L.resources===null&&L.prompts===null,Q={...f};G?delete Q[N]:Q[N]=qt,i.setValue("connections",we(Q),{shouldDirty:!0,shouldTouch:!0})},e[33]=i,e[34]=f,e[35]=U):U=e[35];const Y=U;let Z;e[36]!==x||e[37]!==n||e[38]!==l?(Z=N=>{N&&c({type:"RESET",payload:{selectedId:l,firstConnectionId:x[0]?.id??null}}),n(N)},e[36]=x,e[37]=n,e[38]=l,e[39]=Z):Z=e[39];const M=Z;let q;e[40]===Symbol.for("react.memo_cache_sentinel")?(q=N=>{c({type:"SELECT_CONNECTION",payload:N})},e[40]=q):q=e[40];const qe=q;let me;e[41]===Symbol.for("react.memo_cache_sentinel")?(me=N=>c({type:"SET_SEARCH_TERM",payload:N}),e[41]=me):me=e[41];let X;e[42]!==r.searchTerm?(X=t.jsx(Et,{value:r.searchTerm,onChange:me,placeholder:"Search connections..."}),e[42]=r.searchTerm,e[43]=X):X=e[43];let ee;e[44]!==x||e[45]!==r.searchTerm||e[46]!==j||e[47]!==V||e[48]!==C||e[49]!==Y?(ee=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(is,{allConnections:x,searchTerm:r.searchTerm,selectedId:j,hasSelections:C,getSelectionSummary:V,onConnectionClick:qe,onToggleAll:Y})}),e[44]=x,e[45]=r.searchTerm,e[46]=j,e[47]=V,e[48]=C,e[49]=Y,e[50]=ee):ee=e[50];let te;e[51]!==X||e[52]!==ee?(te=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:[X,ee]}),e[51]=X,e[52]=ee,e[53]=te):te=e[53];let se;e[54]!==m||e[55]!==r.activeTab||e[56]!==j||e[57]!==f||e[58]!==W||e[59]!==K||e[60]!==B||e[61]!==A||e[62]!==I||e[63]!==z?(se=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:m&&j?t.jsx(rs,{currentConnection:m,activeTab:r.activeTab,selectedId:j,formData:f,toggleTool:z,toggleResource:I,togglePrompt:A,toggleAllTools:B,toggleAllResources:K,toggleAllPrompts:W,onTabChange:N=>c({type:"SET_ACTIVE_TAB",payload:N})},j):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[54]=m,e[55]=r.activeTab,e[56]=j,e[57]=f,e[58]=W,e[59]=K,e[60]=B,e[61]=A,e[62]=I,e[63]=z,e[64]=se):se=e[64];let le;e[65]!==te||e[66]!==se?(le=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[te,se]}),e[65]=te,e[66]=se,e[67]=le):le=e[67];let oe;e[68]!==M?(oe=t.jsx(At,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(J,{variant:"outline",onClick:()=>M(!1),children:"Done"})}),e[68]=M,e[69]=oe):oe=e[69];let ne;e[70]!==le||e[71]!==oe?(ne=t.jsxs(Ue,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[le,oe]}),e[70]=le,e[71]=oe,e[72]=ne):ne=e[72];let ue;return e[73]!==M||e[74]!==s||e[75]!==ne?(ue=t.jsx(Ke,{open:s,onOpenChange:M,children:ne}),e[73]=M,e[74]=s,e[75]=ne,e[76]=ue):ue=e[76],ue}const us=Ze.pick({title:!0,description:!0,icon:!0,status:!0,metadata:!0,connections:!0}).extend({title:Qe().min(1,"Name is required").max(255)});function fs(o){const e=k.c(8);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=ae("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==n||e[6]!==l?(i=t.jsx(Bt,{"data-slot":"radio-group",className:l,...n}),e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function Ee(o){const e=k.c(9);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=ae("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 i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Gt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Ft,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=i):i=e[5];let d;return e[6]!==n||e[7]!==l?(d=t.jsx(Vt,{"data-slot":"radio-group-item",className:l,...n,children:i}),e[6]=n,e[7]=l,e[8]=d):d=e[8],d}function xs(o){const s=new TextEncoder().encode(o),n=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(n)}function ps(o){const e=k.c(10),{url:s}=o,[n,l]=S.useState(!1);let i;e[0]!==s?(i=async()=>{await navigator.clipboard.writeText(s),l(!0),ce.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=i):i=e[1];const d=i;let a;e[2]!==n?(a=n?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx(Re,{size:20}),e[2]=n,e[3]=a):a=e[3];const r=n?"Copied!":"Copy URL";let c;e[4]!==r?(c=t.jsx("span",{className:"text-xs font-medium",children:r}),e[4]=r,e[5]=c):c=e[5];let p;return e[6]!==d||e[7]!==a||e[8]!==c?(p=t.jsxs(J,{type:"button",variant:"outline",onClick:d,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,c]}),e[6]=d,e[7]=a,e[8]=c,e[9]=p):p=e[9],p}function hs(o){const e=k.c(7),{url:s,serverName:n}=o;let l;e[0]!==n||e[1]!==s?(l=()=>{const c=We(n),g=xs(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),x=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(c)}&config=${encodeURIComponent(g)}`;window.open(x,"_blank"),ce.success("Opening Cursor...")},e[0]=n,e[1]=s,e[2]=l):l=e[2];const i=l;let d,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=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%)"}}),a=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=d,e[4]=a):(d=e[3],a=e[4]);let r;return e[5]!==i?(r=t.jsxs(J,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[d,a]}),e[5]=i,e[6]=r):r=e[6],r}function gs(o){const e=k.c(11),{url:s,serverName:n}=o,[l,i]=S.useState(!1);let d;e[0]!==n||e[1]!==s?(d=async()=>{const x=We(n),u=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),f=`claude mcp add-json "${x}" '${u.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(f),i(!0),ce.success("Claude Code command copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[0]=n,e[1]=s,e[2]=d):d=e[2];const a=d;let r;e[3]!==l?(r=l?t.jsx(je,{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]=r):r=e[4];const c=l?"Copied!":"Install on Claude";let p;e[5]!==c?(p=t.jsx("span",{className:"text-xs font-medium",children:c}),e[5]=c,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==r||e[9]!==p?(g=t.jsxs(J,{type:"button",variant:"outline",onClick:a,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[r,p]}),e[7]=a,e[8]=r,e[9]=p,e[10]=g):g=e[10],g}function js({virtualMcp:o}){const{org:e}=de(),s=ge({connectionId:zt,orgId:e.id}),[n,l]=S.useState(null),[i,d]=S.useState(!1),[a,r]=S.useState(!1),c=o.id,p=o.title||`agent-${c.slice(0,8)}`,g=n?`bunx @decocms/typegen@latest --mcp ${c} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${c} --key <api-key> --output client.ts`,x=async()=>{d(!0);try{const f=(await s.callTool({name:"API_KEY_CREATE",arguments:{name:`typegen-${p}`,permissions:{[c]:["*"]}}})).structuredContent?.key;if(!f)throw new Error("No key in response");l(f)}catch{ce.error("Failed to generate API key")}finally{d(!1)}},h=async()=>{await navigator.clipboard.writeText(g),r(!0),ce.success("Command copied to clipboard"),setTimeout(()=>r(!1),2e3)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Generate typed client"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Introspects this agent and writes a typed"," ",t.jsx("code",{className:"font-mono",children:"client.ts"})," you can import directly."]})]}),!n&&t.jsxs(J,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:x,disabled:i,children:[i?t.jsx(De,{size:14,className:"animate-spin"}):t.jsx(Ut,{size:14}),t.jsx("span",{children:i?"Generating…":"Generate API key"})]})]}),n&&t.jsx("p",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700",children:"Store this key securely — it won't be shown again."}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Generate client"}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:g}),t.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:h,children:a?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Runtime variables"}),t.jsx(bs,{apiKey:n})]})}function bs(o){const e=k.c(19),{apiKey:s}=o,[n,l]=S.useState(!1),i=window.location.origin,d=s?`MESH_API_KEY=${s}`:"MESH_API_KEY=<api-key>",a=`MESH_BASE_URL=${i}`,r=`${d}
2
+ ${a}`;let c;e[0]!==r?(c=async()=>{await navigator.clipboard.writeText(r),l(!0),setTimeout(()=>l(!1),2e3)},e[0]=r,e[1]=c):c=e[1];const p=c,g=!s;let x;e[2]!==g?(x=ae({"opacity-50":g}),e[2]=g,e[3]=x):x=e[3];let h;e[4]!==d||e[5]!==x?(h=t.jsx("span",{className:x,children:d}),e[4]=d,e[5]=x,e[6]=h):h=e[6];let u,f;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("br",{}),f=t.jsx("span",{children:a}),e[7]=u,e[8]=f):(u=e[7],f=e[8]);let b;e[9]!==h?(b=t.jsxs("code",{className:"min-w-0 flex-1 font-mono text-xs text-muted-foreground",children:[h,u,f]}),e[9]=h,e[10]=b):b=e[10];let m;e[11]!==n?(m=n?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12}),e[11]=n,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==m?(j=t.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:p,children:m}),e[13]=p,e[14]=m,e[15]=j):j=e[15];let y;return e[16]!==b||e[17]!==j?(y=t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[b,j]})}),e[16]=b,e[17]=j,e[18]=y):y=e[18],y}function Ns(o){const e=k.c(3),{virtualMcp:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"h-20 animate-pulse rounded-md bg-muted"}),e[0]=n):n=e[0];let l;return e[1]!==s?(l=t.jsx(S.Suspense,{fallback:n,children:t.jsx(js,{virtualMcp:s})}),e[1]=s,e[2]=l):l=e[2],l}function ys(o){const e=k.c(44),{open:s,onOpenChange:n,virtualMcp:l}=o,[i,d]=S.useState("code_execution");let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=P=>{(P==="passthrough"||P==="smart_tool_selection"||P==="code_execution")&&d(P)},e[0]=a):a=e[0];const r=a;let c;e[1]!==i||e[2]!==l.id?(c=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),c.searchParams.set("mode",i),e[1]=i,e[2]=l.id,e[3]=c):c=e[3];let p;e[4]!==l.id||e[5]!==l.title?(p=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=p):p=e[6];const g=p;let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ot,{children:t.jsx($t,{children:"Connect"})}),e[7]=x):x=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 u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(at,{className:"size-5 text-muted-foreground"})}),e[9]=u):u=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=f):f=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[11]=b):b=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=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:[u,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[f,t.jsx(ye,{children:t.jsxs(pe,{children:[b,t.jsx(he,{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]=m):m=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(ct,{className:"size-5 text-muted-foreground"})}),e[13]=j):j=e[13];let y;e[14]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=y):y=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[15]=C):C=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=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:[j,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[y,t.jsx(ye,{children:t.jsxs(pe,{children:[C,t.jsx(he,{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]=v):v=e[16];let V;e[17]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Ht,{className:"size-5 text-muted-foreground"})}),e[17]=V):V=e[17];let R;e[18]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=R):R=e[18];let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(xe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[19]=T):T=e[19];let O;e[20]===Symbol.for("react.memo_cache_sentinel")?(O=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:[V,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[R,t.jsx(ye,{children:t.jsxs(pe,{children:[T,t.jsx(he,{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(Oe,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=O):O=e[20];let _;e[21]!==i?(_=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(fs,{value:i,onValueChange:r,className:"flex flex-col gap-4.5",children:[m,v,O]})]}),e[21]=i,e[22]=_):_=e[22];let w;e[23]!==c.href?(w=t.jsx(ps,{url:c.href}),e[23]=c.href,e[24]=w):w=e[24];let z,$;e[25]!==g||e[26]!==c.href?(z=t.jsx(hs,{url:c.href,serverName:g}),$=t.jsx(gs,{url:c.href,serverName:g}),e[25]=g,e[26]=c.href,e[27]=z,e[28]=$):(z=e[27],$=e[28]);let I;e[29]!==w||e[30]!==z||e[31]!==$?(I=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[w,z,$]})}),e[29]=w,e[30]=z,e[31]=$,e[32]=I):I=e[32];let D;e[33]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("div",{className:"border-t border-border"}),e[33]=D):D=e[33];let A;e[34]!==l?(A=t.jsx(Ns,{virtualMcp:l}),e[34]=l,e[35]=A):A=e[35];let E;e[36]!==_||e[37]!==I||e[38]!==A?(E=t.jsxs(Ue,{className:"max-h-[80vh] overflow-y-auto sm:max-w-2xl",children:[x,t.jsxs("div",{className:"flex flex-col gap-6",children:[_,I,D,A]})]}),e[36]=_,e[37]=I,e[38]=A,e[39]=E):E=e[39];let B;return e[40]!==n||e[41]!==s||e[42]!==E?(B=t.jsx(Ke,{open:s,onOpenChange:n,children:E}),e[40]=n,e[41]=s,e[42]=E,e[43]=B):B=e[43],B}function vs(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 Ie(o){const e=k.c(27),{connection_id:s,selected_tools:n,selected_resources:l,selected_prompts:i,onClick:d}=o,a=pt(s);if(!a)return null;let r;e[0]!==n?(r=Se(n),e[0]=n,e[1]=r):r=e[1];const c=r;let p;e[2]!==l?(p=Se(l),e[2]=l,e[3]=p):p=e[3];const g=p;let x;e[4]!==i?(x=Se(i),e[4]=i,e[5]=x):x=e[5];const h=x;let u;e[6]!==a.icon||e[7]!==a.title?(u=t.jsx(Ae,{icon:a.icon,name:a.title,size:"xs"}),e[6]=a.icon,e[7]=a.title,e[8]=u):u=e[8];let f;e[9]!==a.title?(f=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:a.title}),e[9]=a.title,e[10]=f):f=e[10];let b;e[11]!==c?(b=c!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:c==="all"?"all":c}),t.jsx(Le,{size:12})]}),e[11]=c,e[12]=b):b=e[12];let m;e[13]!==g?(m=g!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:g==="all"?"all":g}),t.jsx(be,{size:12})]}),e[13]=g,e[14]=m):m=e[14];let j;e[15]!==h?(j=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]=j):j=e[16];let y;e[17]!==b||e[18]!==m||e[19]!==j?(y=t.jsxs(Oe,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[b,m,j]}),e[17]=b,e[18]=m,e[19]=j,e[20]=y):y=e[20];let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(He,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=C):C=e[21];let v;return e[22]!==d||e[23]!==u||e[24]!==f||e[25]!==y?(v=t.jsxs("div",{onClick:d,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:[u,f,y,C]}),e[22]=d,e[23]=u,e[24]=f,e[25]=y,e[26]=v):v=e[26],v}Ie.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(Oe,{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(Le,{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(He,{size:16,className:"text-muted-foreground shrink-0"})]})};function Cs({virtualMcp:o}){const{org:e}=de(),s=gt(),n=tt({resolver:st(us),defaultValues:o}),l=n.watch("connections"),[i,d]=S.useReducer(vs,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,a]=rt(),{setVirtualMcpId:r}=ot();S.useEffect(()=>{a(!0),r(o.id)},[o.id]);const c=()=>{r(o.id),a(!0)},p=n.formState.isDirty,g=async()=>{const m=n.getValues(),j=await s.update.mutateAsync({id:o.id,data:m});n.reset(j)},x=()=>{n.reset(o)},h=()=>{d({type:"SET_EDITING_CONNECTION_ID",payload:null}),d({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},u=m=>{d({type:"SET_EDITING_CONNECTION_ID",payload:m}),d({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},f=s.update.isPending,b=t.jsx(yt,{children:t.jsxs(vt,{children:[t.jsx(Ge,{children:t.jsx(Ct,{asChild:!0,children:t.jsx(lt,{to:"/$org/$project/agents",params:{org:e.slug,project:Fe},children:"Agents"})})}),t.jsx(_t,{}),t.jsx(Ge,{children:t.jsx(St,{children:o.title})})]})});return t.jsxs(Tt,{breadcrumb:b,children:[t.jsxs(kt,{children:[t.jsx(wt,{onSave:g,onUndo:x,isDirty:p,isSaving:f}),t.jsxs(pe,{delayDuration:0,children:[t.jsx(xe,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(J,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:c,"aria-label":"Test Agent",children:[t.jsx(bt,{size:14}),"Test Agent"]})})}),t.jsx(he,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(J,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:()=>d({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),children:[t.jsx(Ye,{size:14}),"Connect"]})]}),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(Me,{control:n.control,name:"icon",render:({field:m})=>t.jsx(it,{value:m.value,onChange:m.onChange,name:n.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(Nt,{})})}),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(ut,{checked:n.watch("status")==="active",onCheckedChange:m=>n.setValue("status",m?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(dt,{open:i.skillsOpen,onOpenChange:m=>d({type:"SET_SKILLS_OPEN",payload:m}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[l.length===0?t.jsxs("button",{type:"button",onClick:h,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(Be,{size:14}),"Add"]})]}):t.jsx(mt,{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(Kt,{connectionIds:l.map(m=>m.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:m=>{m.stopPropagation()},onClick:m=>{m.stopPropagation(),m.preventDefault(),h()},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.stopPropagation(),m.preventDefault(),h())},children:[t.jsx(Be,{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(jt,{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:l.map(m=>t.jsx(S.Suspense,{fallback:t.jsx(Ie.Fallback,{}),children:t.jsx(Ie,{connection_id:m.connection_id,selected_tools:m.selected_tools,selected_resources:m.selected_resources,selected_prompts:m.selected_prompts,onClick:()=>u(m.connection_id)})},m.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(Me,{name:"metadata.instructions",control:n.control,render:({field:m})=>t.jsx(ft,{...m,value:m.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(ms,{open:i.connectionDialogOpen,onOpenChange:m=>d({type:"SET_CONNECTION_DIALOG_OPEN",payload:m}),selectedId:i.editingConnectionId,form:n,connections:l}),t.jsx(ys,{open:i.shareDialogOpen,onOpenChange:m=>d({type:"SET_SHARE_DIALOG_OPEN",payload:m}),virtualMcp:o})]})}function _s(){const o=k.c(6),e=Xe();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const n=et(s),{org:l,agentId:i}=n,d=ht(i);if(!d){let r;return o[1]!==e||o[2]!==l?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(nt,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(J,{variant:"outline",onClick:()=>e({to:"/$org/$project/agents",params:{org:l,project:Fe}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=r):r=o[3],r}let a;return o[4]!==d?(a=t.jsx(Cs,{virtualMcp:d}),o[4]=d,o[5]=a):a=o[5],a}function Bl(){const o=k.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(fe,{children:t.jsx(S.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(De,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_s,{})})}),o[0]=e):e=o[0],e}export{Bl as default};
@@ -1 +1 @@
1
- import{c as we,j as s,E as vt,r as J,u as Nt,e as Ct,B as Q,z as X,w as yt,O as wt}from"./index-EJhirEgi.js";import{C as St}from"./collection-display-button-BKC7veh8.js";import{C as kt}from"./collection-search-DwGryXKM.js";import{P as ve}from"./index-wbJeckpV.js";import{B as _t,a as Dt,b as zt,c as At}from"./breadcrumb-U9pZLesK.js";import{C as xt}from"./connection-card-C48yZP0o.js";import{C as He,i as Mt}from"./connection-status-EaZNPeGi.js";import{E as Ze}from"./empty-state-Dz90tIjg.js";import{I as Ge}from"./integration-icon-DnuBmEuk.js";import{u as Tt}from"./use-list-state-BXqBxE3W.js";import{u as $t}from"./use-create-virtual-mcp-DLy6t37V.js";import{i as Ne}from"./constants-BtZ3fAEQ.js";import{b as Pt,a as It}from"./use-virtual-mcp-D_iE9Cdz.js";import{c as at,b as rt,d as ot,A as ct,e as dt,h as mt,a as ft,f as ut}from"./alert-dialog-CpiIzpaw.js";import{B as et}from"./badge-BiElTurh.js";import{C as Ue}from"./checkbox-7ZiSm3FO.js";import{c as Ot,d as Bt,b as Lt,a as Rt,D as Et}from"./dialog-DD3DgOo2.js";import{T as Kt,a as Vt,b as Ve,c as se,d as Gt,e as Ut}from"./table-Bs6V2h_N.js";import{D as tt,a as st,b as nt,c as je}from"./dropdown-menu-W_lhWsM7.js";import{n as Ft}from"./ArrowDown-_L7cw1A8.js";import{i as Ht}from"./ArrowUp-DKc3SUsQ.js";import{t as qt}from"./ChevronDown-B15SC8MA.js";import{i as it}from"./DotsVertical-DUf6cEvO.js";import{s as lt}from"./Eye-DkD5as17.js";import{i as Jt}from"./Loading01-BUlApwyE.js";import{s as Fe}from"./Trash01-CHv5mU8b.js";import{t as Y}from"./Users03-DBQP_ao_.js";import{s as gt}from"./XClose-B-kxIP35.js";import{U as Ce}from"./user-CmrAywRT.js";import{A as ht}from"./agent-connections-preview-dUyrsdf1.js";import{f as ye}from"./format-time-CMKyl-GC.js";import"./Check-BWCeXHN7.js";import"./Grid01-Cj17P1tC.js";import"./List-c0L2g9Qy.js";import"./tooltip-BXI94UP3.js";import"./index-Dv4huKa6.js";import"./SearchMd-D_8XQU19.js";import"./input-23yd6VmI.js";import"./localstorage-keys-CyCsfmz2.js";import"./useQuery-mGiR1oLn.js";import"./useMutation-ClueFvpj.js";import"./ChevronRight-DNq10e3Z.js";import"./card-DXYG1PJt.js";import"./AlertCircle-48gOoEWA.js";import"./CheckCircle-DZcEBbaZ.js";import"./Container-C4I-ZzWI.js";import"./use-view-mode-CkJMVXNZ.js";import"./use-mobile-DwOvFQ5A.js";import"./use-collections-B4b2cHqe.js";import"./X-CC0aD5R8.js";import"./avatar-CbDE9O_w.js";import"./use-connection-DrhtnyBi.js";import"./differenceInSeconds-NQ4PDo0z.js";function pt(t){return t.title.trim().replace(/\s+\(\d+\)$/,"")}function Qt(t){const e=new Map;for(const i of t){const a=pt(i),l=e.get(a);l?l.push(i):e.set(a,[i])}const n=[],d=new Set;for(const i of t){const a=pt(i);if(d.has(a))continue;d.add(a);const l=e.get(a),x=l[0];l.length===1?n.push({type:"single",agent:x}):n.push({type:"group",key:a,icon:x.icon,title:x.title.replace(/\s*\(\d+\)\s*$/,""),agents:l})}return n}function jt(t){const e=new Set,n=[];for(const d of t)d.created_by&&!e.has(d.created_by)&&(e.add(d.created_by),n.push(d.created_by));return n}function Wt(t,e){switch(e.type){case"delete":return{mode:"deleting",virtualMcp:e.virtualMcp};case"close":return{mode:"idle"}}}function Xt(t){const e=we.c(107),{group:n,onNavigate:d,onDelete:i,selectionMode:a,selectedIds:l,onToggleSelect:x}=t,[N,g]=J.useState(!1);let w;if(e[0]!==n.agents||e[1]!==l){let y;e[3]!==l?(y=_=>l.has(_.id),e[3]=l,e[4]=y):y=e[4],w=n.agents.every(y),e[0]=n.agents,e[1]=l,e[2]=w}else w=e[2];const m=w;let D;if(e[5]!==n.agents||e[6]!==l){let y;e[8]!==l?(y=_=>l.has(_.id),e[8]=l,e[9]=y):y=e[9],D=n.agents.some(y),e[5]=n.agents,e[6]=l,e[7]=D}else D=e[7];const o=D;let O,S,c,C,z,P,k,I,A,f,j;if(e[10]!==m||e[11]!==n.agents||e[12]!==n.icon||e[13]!==n.title||e[14]!==x||e[15]!==l||e[16]!==a||e[17]!==o){const y=jt(n.agents),_=n.agents.reduce(ts,n.agents[0]),W=_.updated_at??_.created_at;O=xt;const Z=`${n.agents.length} instances`;e[29]!==n.icon||e[30]!==n.title||e[31]!==Z?(A={title:n.title,icon:n.icon,description:Z},e[29]=n.icon,e[30]=n.title,e[31]=Z,e[32]=A):A=e[32],e[33]!==m||e[34]!==n.agents||e[35]!==x||e[36]!==l||e[37]!==a?(f=()=>a?(()=>{for(const R of n.agents)m?l.has(R.id)&&x(R.id):l.has(R.id)||x(R.id)})():g(!0),e[33]=m,e[34]=n.agents,e[35]=x,e[36]=l,e[37]=a,e[38]=f):f=e[38];const H=a&&m&&"ring-2 ring-primary",ee=a&&o&&!m&&"ring-1 ring-primary/50";e[39]!==H||e[40]!==ee?(j=X(H,ee),e[39]=H,e[40]=ee,e[41]=j):j=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Y,{}),e[42]=S):S=e[42],e[43]!==m||e[44]!==n.agents||e[45]!==x||e[46]!==l||e[47]!==a||e[48]!==o?(c=a?s.jsx(Ue,{checked:m?!0:o?"indeterminate":!1,onCheckedChange:()=>{for(const R of n.agents)m?l.has(R.id)&&x(R.id):l.has(R.id)||x(R.id)}}):s.jsxs(et,{variant:"secondary",className:"text-xs tabular-nums",children:["x",n.agents.length]}),e[43]=m,e[44]=n.agents,e[45]=x,e[46]=l,e[47]=a,e[48]=o,e[49]=c):c=e[49];let q;e[50]!==n.agents?(q=n.agents.slice(0,6).map(es),e[50]=n.agents,e[51]=q):q=e[51],e[52]!==q?(C=s.jsx("div",{className:"flex items-center gap-1",children:q}),e[52]=q,e[53]=C):C=e[53],k="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const te=y.map(R=>s.jsx(Ce,{id:R,size:"3xs",avatarOnly:y.length>1},R));e[54]!==te?(I=s.jsx("div",{className:"flex items-center -space-x-1.5",children:te}),e[54]=te,e[55]=I):I=e[55],z="shrink-0 ml-2",P=W?ye(new Date(W)):"—",e[10]=m,e[11]=n.agents,e[12]=n.icon,e[13]=n.title,e[14]=x,e[15]=l,e[16]=a,e[17]=o,e[18]=O,e[19]=S,e[20]=c,e[21]=C,e[22]=z,e[23]=P,e[24]=k,e[25]=I,e[26]=A,e[27]=f,e[28]=j}else O=e[18],S=e[19],c=e[20],C=e[21],z=e[22],P=e[23],k=e[24],I=e[25],A=e[26],f=e[27],j=e[28];let p;e[56]!==z||e[57]!==P?(p=s.jsx("span",{className:z,children:P}),e[56]=z,e[57]=P,e[58]=p):p=e[58];let M;e[59]!==p||e[60]!==k||e[61]!==I?(M=s.jsxs("div",{className:k,children:[I,p]}),e[59]=p,e[60]=k,e[61]=I,e[62]=M):M=e[62];let T;e[63]!==O||e[64]!==S||e[65]!==c||e[66]!==C||e[67]!==M||e[68]!==A||e[69]!==f||e[70]!==j?(T=s.jsx(O,{connection:A,onClick:f,className:j,fallbackIcon:S,headerActions:c,body:C,footer:M}),e[63]=O,e[64]=S,e[65]=c,e[66]=C,e[67]=M,e[68]=A,e[69]=f,e[70]=j,e[71]=T):T=e[71];let B;e[72]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Y,{}),e[72]=B):B=e[72];let $;e[73]!==n.icon||e[74]!==n.title?($=s.jsx(Ge,{icon:n.icon,name:n.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:B}),e[73]=n.icon,e[74]=n.title,e[75]=$):$=e[75];let L;e[76]!==n.agents.length?(L=s.jsxs(et,{variant:"secondary",className:"ml-2 text-xs tabular-nums",children:["x",n.agents.length]}),e[76]=n.agents.length,e[77]=L):L=e[77];let r;e[78]!==n.title||e[79]!==L?(r=s.jsxs(Ot,{children:[n.title,L]}),e[78]=n.title,e[79]=L,e[80]=r):r=e[80];let u;e[81]!==n.agents.length?(u=s.jsxs(Bt,{children:[n.agents.length," instances"]}),e[81]=n.agents.length,e[82]=u):u=e[82];let b;e[83]!==r||e[84]!==u?(b=s.jsxs("div",{children:[r,u]}),e[83]=r,e[84]=u,e[85]=b):b=e[85];let K;e[86]!==$||e[87]!==b?(K=s.jsx(Lt,{className:"px-6 pt-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[$,b]})}),e[86]=$,e[87]=b,e[88]=K):K=e[88];let V;if(e[89]!==n.agents||e[90]!==i||e[91]!==d){let y;e[93]!==i||e[94]!==d?(y=_=>s.jsxs("div",{className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>{g(!1),d(_.id)},children:[s.jsx(Ge,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0",fallbackIcon:s.jsx(Y,{})}),s.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:_.title}),s.jsx(He,{status:_.status})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[s.jsx(Ce,{id:_.created_by,size:"3xs"}),s.jsx("span",{children:_.created_at?ye(new Date(_.created_at)):"—"})]}),s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:Zt,children:s.jsx(it,{size:16})})}),s.jsxs(nt,{align:"end",onClick:Yt,children:[s.jsxs(je,{onClick:()=>{g(!1),d(_.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(_.id)&&s.jsxs(je,{variant:"destructive",onClick:()=>i(_),children:[s.jsx(Fe,{size:16}),"Delete"]})]})]})]},_.id),e[93]=i,e[94]=d,e[95]=y):y=e[95],V=n.agents.map(y),e[89]=n.agents,e[90]=i,e[91]=d,e[92]=V}else V=e[92];let G;e[96]!==V?(G=s.jsx("div",{className:"divide-y max-h-80 overflow-auto",children:V}),e[96]=V,e[97]=G):G=e[97];let E;e[98]!==K||e[99]!==G?(E=s.jsxs(Rt,{className:"sm:max-w-lg p-0 gap-0",children:[K,G]}),e[98]=K,e[99]=G,e[100]=E):E=e[100];let U;e[101]!==N||e[102]!==E?(U=s.jsx(Et,{open:N,onOpenChange:g,children:E}),e[101]=N,e[102]=E,e[103]=U):U=e[103];let F;return e[104]!==T||e[105]!==U?(F=s.jsxs(s.Fragment,{children:[T,U]}),e[104]=T,e[105]=U,e[106]=F):F=e[106],F}function Yt(t){return t.stopPropagation()}function Zt(t){return t.stopPropagation()}function es(t){return s.jsx(He,{status:t.status},t.id)}function ts(t,e){const n=e.updated_at??e.created_at,d=t.updated_at??t.created_at;return n?d?new Date(n)>new Date(d)?e:t:e:t}function ss(t){const e=we.c(21),{count:n,total:d,onSelectAll:i,onDeselectAll:a,onDelete:l,onCancel:x}=t;if(n===0)return null;let N;e[0]!==n?(N=s.jsxs("span",{className:"text-sm font-medium tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=N):N=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-4 w-px bg-border"}),e[2]=g):g=e[2];let w;e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==d?(w=n<d?s.jsxs(Q,{variant:"ghost",size:"sm",onClick:i,children:["Select all (",d,")"]}):s.jsx(Q,{variant:"ghost",size:"sm",onClick:a,children:"Clear selection"}),e[3]=n,e[4]=a,e[5]=i,e[6]=d,e[7]=w):w=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-4 w-px bg-border"}),e[8]=m):m=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Fe,{size:14}),e[9]=D):D=e[9];let o;e[10]!==l?(o=s.jsxs(Q,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:l,children:[D,"Delete"]}),e[10]=l,e[11]=o):o=e[11];let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("div",{className:"h-4 w-px bg-border"}),e[12]=O):O=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(gt,{size:14}),e[13]=S):S=e[13];let c;e[14]!==x?(c=s.jsxs(Q,{variant:"ghost",size:"sm",onClick:x,children:[S,"Cancel"]}),e[14]=x,e[15]=c):c=e[15];let C;return e[16]!==N||e[17]!==w||e[18]!==o||e[19]!==c?(C=s.jsxs("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 flex items-center gap-3 rounded-xl border border-border bg-background/95 backdrop-blur px-4 py-2.5 shadow-lg",children:[N,g,w,m,o,O,c]}),e[16]=N,e[17]=w,e[18]=o,e[19]=c,e[20]=C):C=e[20],C}function ns(t){const e=we.c(37),{columns:n,grouped:d,sortKey:i,sortDirection:a,onSort:l,onRowClick:x,selectionMode:N,selectedIds:g,onToggleSelect:w,emptyState:m}=t;let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=new Set,e[0]=D):D=e[0];const[o,O]=J.useState(D);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=f=>{O(j=>{const p=new Set(j);return p.has(f)?p.delete(f):p.add(f),p})},e[1]=S):S=e[1];const c=S;if(d.length===0&&m){let f;return e[2]!==m?(f=s.jsx("div",{className:"flex items-center justify-center h-full",children:m}),e[2]=m,e[3]=f):f=e[3],f}const C=n.length;let z;if(e[4]!==C||e[5]!==n||e[6]!==l||e[7]!==a||e[8]!==i){let f;e[10]!==C||e[11]!==l||e[12]!==a||e[13]!==i?(f=(j,p)=>{const M=i===j.id,T=p===C-1;return s.jsx(Kt,{className:X("px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider",T&&"w-8","group transition-colors select-none",j.sortable&&"hover:bg-accent cursor-pointer",j.cellClassName),onClick:j.sortable&&l?()=>l(j.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[j.header,j.sortable&&s.jsx("span",{className:"w-4 flex items-center justify-center",children:M&&a&&(a==="asc"?s.jsx(Ht,{size:16,className:"text-muted-foreground"}):s.jsx(Ft,{size:16,className:"text-muted-foreground"}))})]})},j.id)},e[10]=C,e[11]=l,e[12]=a,e[13]=i,e[14]=f):f=e[14],z=n.map(f),e[4]=C,e[5]=n,e[6]=l,e[7]=a,e[8]=i,e[9]=z}else z=e[9];let P;e[15]!==z?(P=s.jsx(Vt,{className:"border-b-0",children:s.jsx(Ve,{className:"h-9 hover:bg-transparent border-b border-border",children:z})}),e[15]=z,e[16]=P):P=e[16];let k;if(e[17]!==n||e[18]!==o||e[19]!==d||e[20]!==x||e[21]!==w||e[22]!==g||e[23]!==N){let f;e[25]!==n||e[26]!==o||e[27]!==x||e[28]!==w||e[29]!==g||e[30]!==N?(f=j=>{if(j.type==="single"){const r=j.agent;return s.jsx(Ve,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer",N&&g.has(r.id)&&"bg-primary/5"),onClick:()=>x(r),children:n.map(u=>s.jsx(se,{className:X("px-5 py-4 h-16 align-middle text-sm text-foreground",u.cellClassName),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:u.render?u.render(r):null})},u.id))},r.id)}const p=j,M=o.has(p.key),T=p.agents.every(r=>g.has(r.id)),B=p.agents.some(r=>g.has(r.id)),$=jt(p.agents),L=p.agents.reduce(ls,p.agents[0]);return s.jsxs(J.Fragment,{children:[s.jsx(Ve,{className:"border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>c(p.key),children:n.map(r=>{const u=X("px-5 py-3 h-14 align-middle text-sm",r.cellClassName);if(r.id==="select")return s.jsx(se,{className:u,children:s.jsx(Ue,{checked:T?!0:B?"indeterminate":!1,onCheckedChange:()=>{for(const b of p.agents)T?g.has(b.id)&&w(b.id):g.has(b.id)||w(b.id)},onClick:is})},r.id);if(r.id==="title")return s.jsx(se,{className:u,children:s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ge,{icon:p.icon,name:p.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(Y,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:p.title}),s.jsxs(et,{variant:"secondary",className:"text-xs tabular-nums",children:["x",p.agents.length]})]})},r.id);if(r.id==="updated_by")return s.jsx(se,{className:u,children:s.jsx("div",{className:"flex items-center -space-x-1.5",children:$.map(b=>s.jsx(Ce,{id:b,size:"3xs",avatarOnly:$.length>1},b))})},r.id);if(r.id==="updated_at"){const b=L.updated_at??L.created_at;return s.jsx(se,{className:u,children:s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b?ye(new Date(b)):"—"})},r.id)}return r.id==="actions"?s.jsx(se,{className:u,children:s.jsx(qt,{size:16,className:X("text-muted-foreground transition-transform",M&&"rotate-180")})},r.id):s.jsx(se,{className:u},r.id)})}),M&&p.agents.map(r=>s.jsx(Ve,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer bg-muted/20",N&&g.has(r.id)&&"bg-primary/5"),onClick:()=>x(r),children:n.map(u=>s.jsx(se,{className:X("px-5 py-3 h-14 align-middle text-sm text-foreground",u.cellClassName,u.id==="title"&&"pl-12"),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:u.render?u.render(r):null})},u.id))},r.id))]},p.key)},e[25]=n,e[26]=o,e[27]=x,e[28]=w,e[29]=g,e[30]=N,e[31]=f):f=e[31],k=d.map(f),e[17]=n,e[18]=o,e[19]=d,e[20]=x,e[21]=w,e[22]=g,e[23]=N,e[24]=k}else k=e[24];let I;e[32]!==k?(I=s.jsx(Gt,{children:k}),e[32]=k,e[33]=I):I=e[33];let A;return e[34]!==P||e[35]!==I?(A=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs(Ut,{className:"w-full border-collapse",children:[P,I]})}),e[34]=P,e[35]=I,e[36]=A):A=e[36],A}function is(t){return t.stopPropagation()}function ls(t,e){const n=e.updated_at??e.created_at,d=t.updated_at??t.created_at;return n?d?new Date(n)>new Date(d)?e:t:e:t}function as(){const t=we.c(138),{org:e}=Nt(),n=Ct();let d;t[0]!==e.slug?(d={namespace:e.slug,resource:"agents"},t[0]=e.slug,t[1]=d):d=t[1];const i=Tt(d),a=Pt(i);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={navigateOnCreate:!0},t[2]=l):l=t[2];const{createVirtualMCP:x,isCreating:N}=$t(l),g=It();let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w={mode:"idle"},t[3]=w):w=t[3];const[m,D]=J.useReducer(Wt,w),[o,O]=J.useState(!1);let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=new Set,t[4]=S):S=t[4];const[c,C]=J.useState(S),[z,P]=J.useState(!1),[k,I]=J.useState("ALL");let A;t[5]===Symbol.for("react.memo_cache_sentinel")?(A=E=>{C(U=>{const F=new Set(U);return F.has(E)?F.delete(E):F.add(E),F})},t[5]=A):A=t[5];const f=A;let j;t[6]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{O(!1),C(new Set)},t[6]=j):j=t[6];const p=j;let M,T,B,$,L,r,u,b;if(t[7]!==g||t[8]!==z||t[9]!==x||t[10]!==m.mode||t[11]!==m.virtualMcp||t[12]!==N||t[13]!==i||t[14]!==n||t[15]!==e.slug||t[16]!==c||t[17]!==o||t[18]!==k||t[19]!==a){let E;t[28]!==k?(E=h=>!(k!=="ALL"&&h.status!==k),t[28]=k,t[29]=E):E=t[29],B=a.filter(E);const U=Qt(B),F=a.length;let y;t[30]!==a?(y=a.filter(Ns),t[30]=a,t[31]=y):y=t[31];const _=y.length;let W;t[32]!==a?(W=a.filter(vs),t[32]=a,t[33]=W):W=t[33];let Z;t[34]!==y.length||t[35]!==W.length||t[36]!==a.length?(Z={total:F,active:_,inactive:W.length},t[34]=y.length,t[35]=W.length,t[36]=a.length,t[37]=Z):Z=t[37];const H=Z;let ee;t[38]!==g||t[39]!==m.mode||t[40]!==m.virtualMcp?(ee=async()=>{if(m.mode!=="deleting")return;const h=m.virtualMcp.id;if(D({type:"close"}),!(!h||Ne(h)))try{await g.delete.mutateAsync(h)}catch{}},t[38]=g,t[39]=m.mode,t[40]=m.virtualMcp,t[41]=ee):ee=t[41];const q=ee;let te;t[42]!==g||t[43]!==c?(te=async()=>{P(!1);let h=0;for(const v of c)if(!Ne(v))try{await g.delete.mutateAsync(v),h++}catch{}yt.success(`Deleted ${h} agent${h!==1?"s":""}`),p()},t[42]=g,t[43]=c,t[44]=te):te=t[44];const R=te;let Se;t[45]!==n||t[46]!==e.slug||t[47]!==o?(Se=h=>{if(o){f(h);return}n({to:"/$org/$project/agents/$agentId",params:{org:e.slug,project:wt,agentId:h}})},t[45]=n,t[46]=e.slug,t[47]=o,t[48]=Se):Se=t[48];const ne=Se;let ie;t[49]!==c||t[50]!==o?(ie=o?[{id:"select",header:"",render:h=>s.jsx(Ue,{checked:c.has(h.id),onCheckedChange:()=>f(h.id),onClick:bs}),cellClassName:"w-10 shrink-0"}]:[],t[49]=c,t[50]=o,t[51]=ie):ie=t[51];let ke,_e,De,ze,Ae,Me;t[52]===Symbol.for("react.memo_cache_sentinel")?(ke={id:"title",header:"Name",render:js,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_e={id:"description",header:"Description",render:gs,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},De={id:"connections",header:"Connections",render:ps,cellClassName:"w-28 shrink-0"},ze={id:"status",header:"Status",render:hs,cellClassName:"w-24 shrink-0"},Ae={id:"updated_by",header:"Updated by",render:us,cellClassName:"w-32 shrink-0",sortable:!0},Me={id:"updated_at",header:"Updated",render:fs,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},t[52]=ke,t[53]=_e,t[54]=De,t[55]=ze,t[56]=Ae,t[57]=Me):(ke=t[52],_e=t[53],De=t[54],ze=t[55],Ae=t[56],Me=t[57]);let le;t[58]!==ne?(le={id:"actions",header:"",render:h=>s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ms,children:s.jsx(it,{size:20})})}),s.jsxs(nt,{align:"end",onClick:ds,children:[s.jsxs(je,{onClick:v=>{v.stopPropagation(),ne(h.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(h.id)&&s.jsxs(je,{variant:"destructive",onClick:v=>{v.stopPropagation(),D({type:"delete",virtualMcp:h})},children:[s.jsx(Fe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"},t[58]=ne,t[59]=le):le=t[59];let Te;t[60]!==ie||t[61]!==le?(Te=[...ie,ke,_e,De,ze,Ae,Me,le],t[60]=ie,t[61]=le,t[62]=Te):Te=t[62];const bt=Te;let $e;t[63]!==x||t[64]!==N||t[65]!==o?($e=s.jsx("div",{className:"flex items-center gap-2",children:o?s.jsxs(Q,{variant:"ghost",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:p,children:[s.jsx(gt,{size:14}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsxs(Q,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:()=>O(!0),children:[s.jsx(Mt,{size:14}),"Select"]}),s.jsx(Q,{onClick:x,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:N,children:N?"Creating...":"Create Agent"})]})}),t[63]=x,t[64]=N,t[65]=o,t[66]=$e):$e=t[66];const qe=$e;T=ve;const Je=m.mode==="deleting";let Pe;t[67]===Symbol.for("react.memo_cache_sentinel")?(Pe=h=>!h&&D({type:"close"}),t[67]=Pe):Pe=t[67];let Ie;t[68]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(at,{children:"Delete Agent?"}),t[68]=Ie):Ie=t[68];const Qe=m.mode==="deleting"&&m.virtualMcp.title;let ae;t[69]!==Qe?(ae=s.jsxs(rt,{children:[Ie,s.jsxs(ot,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:Qe}),"."]})]}),t[69]=Qe,t[70]=ae):ae=t[70];let Oe;t[71]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(ct,{children:"Cancel"}),t[71]=Oe):Oe=t[71];let re;t[72]!==q?(re=s.jsxs(dt,{children:[Oe,s.jsx(mt,{onClick:q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[72]=q,t[73]=re):re=t[73];let oe;t[74]!==ae||t[75]!==re?(oe=s.jsxs(ft,{children:[ae,re]}),t[74]=ae,t[75]=re,t[76]=oe):oe=t[76],t[77]!==Je||t[78]!==oe?(r=s.jsx(ut,{open:Je,onOpenChange:Pe,children:oe}),t[77]=Je,t[78]=oe,t[79]=r):r=t[79];const We=c.size!==1?"s":"";let ce;t[80]!==c.size||t[81]!==We?(ce=s.jsxs(at,{children:["Delete ",c.size," agent",We,"?"]}),t[80]=c.size,t[81]=We,t[82]=ce):ce=t[82];let Be;t[83]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(ot,{children:"This action cannot be undone. This will permanently delete the selected agents."}),t[83]=Be):Be=t[83];let de;t[84]!==ce?(de=s.jsxs(rt,{children:[ce,Be]}),t[84]=ce,t[85]=de):de=t[85];let Le;t[86]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(ct,{children:"Cancel"}),t[86]=Le):Le=t[86];let me;t[87]!==R?(me=s.jsxs(dt,{children:[Le,s.jsx(mt,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[87]=R,t[88]=me):me=t[88];let fe;t[89]!==de||t[90]!==me?(fe=s.jsxs(ft,{children:[de,me]}),t[89]=de,t[90]=me,t[91]=fe):fe=t[91],t[92]!==z||t[93]!==fe?(u=s.jsx(ut,{open:z,onOpenChange:P,children:fe}),t[92]=z,t[93]=fe,t[94]=u):u=t[94];const Xe=H.active>0&&` · ${H.active} active`,Ye=H.inactive>0&&` · ${H.inactive} inactive`;let ue;t[95]!==H.total||t[96]!==Xe||t[97]!==Ye?(ue=s.jsx(ve.Header.Left,{children:s.jsx(_t,{children:s.jsx(Dt,{children:s.jsx(zt,{children:s.jsxs(At,{className:"flex items-center gap-2",children:["Agents",s.jsxs("span",{className:"text-xs font-normal text-muted-foreground tabular-nums",children:[H.total," total",Xe,Ye]})]})})})})}),t[95]=H.total,t[96]=Xe,t[97]=Ye,t[98]=ue):ue=t[98];let Re;t[99]===Symbol.for("react.memo_cache_sentinel")?(Re=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],t[99]=Re):Re=t[99];let Ee,Ke;t[100]===Symbol.for("react.memo_cache_sentinel")?(Ee=h=>I(h||"ALL"),Ke=[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}],t[100]=Ee,t[101]=Ke):(Ee=t[100],Ke=t[101]);let he;t[102]!==k?(he=[{label:"Status",value:k,onChange:Ee,options:Ke}],t[102]=k,t[103]=he):he=t[103];let pe;t[104]!==i.handleSort||t[105]!==i.setViewMode||t[106]!==i.sortDirection||t[107]!==i.sortKey||t[108]!==i.viewMode||t[109]!==he?(pe=s.jsx(St,{viewMode:i.viewMode,onViewModeChange:i.setViewMode,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,sortOptions:Re,filters:he}),t[104]=i.handleSort,t[105]=i.setViewMode,t[106]=i.sortDirection,t[107]=i.sortKey,t[108]=i.viewMode,t[109]=he,t[110]=pe):pe=t[110];let xe;t[111]!==qe||t[112]!==pe?(xe=s.jsxs(ve.Header.Right,{children:[pe,qe]}),t[111]=qe,t[112]=pe,t[113]=xe):xe=t[113],t[114]!==ue||t[115]!==xe?(b=s.jsxs(ve.Header,{children:[ue,xe]}),t[114]=ue,t[115]=xe,t[116]=b):b=t[116];let ge;t[117]!==i?(ge=h=>{h.key==="Escape"&&(i.setSearch(""),h.target.blur())},t[117]=i,t[118]=ge):ge=t[118],t[119]!==i.search||t[120]!==i.setSearch||t[121]!==ge?($=s.jsx("div",{className:"flex items-center gap-3 px-5 pb-0",children:s.jsx("div",{className:"flex-1",children:s.jsx(kt,{value:i.search,onChange:i.setSearch,placeholder:"Search for an agent...",onKeyDown:ge})})}),t[119]=i.search,t[120]=i.setSearch,t[121]=ge,t[122]=$):$=t[122],M=ve.Content,L=i.viewMode==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:B.length===0?s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:U.map(h=>{if(h.type==="group")return s.jsx(Xt,{group:h,onNavigate:ne,onDelete:be=>D({type:"delete",virtualMcp:be}),selectionMode:o,selectedIds:c,onToggleSelect:f},h.key);const v=h.agent;return s.jsxs("div",{className:"relative",children:[o&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsx(Ue,{checked:c.has(v.id),onCheckedChange:()=>f(v.id)})}),s.jsx(xt,{connection:{id:v.id??"",title:v.title,description:v.description,icon:v.icon,status:v.status},fallbackIcon:s.jsx(Y,{}),onClick:()=>ne(v.id),className:X(o&&c.has(v.id)&&"ring-2 ring-primary"),body:s.jsx(He,{status:v.status}),footer:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ce,{id:v.updated_by??v.created_by,size:"3xs"})}),s.jsx("span",{className:"shrink-0 ml-2",children:v.updated_at?ye(new Date(v.updated_at)):"—"})]}),headerActions:o?void 0:s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:cs,children:s.jsx(it,{size:20})})}),s.jsxs(nt,{align:"end",onClick:os,children:[s.jsxs(je,{onClick:be=>{be.stopPropagation(),ne(v.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(v.id)&&s.jsxs(je,{variant:"destructive",onClick:be=>{be.stopPropagation(),D({type:"delete",virtualMcp:v})},children:[s.jsx(Fe,{size:16}),"Delete"]})]})]})})]},v.id)})})}):s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:s.jsx("div",{className:"min-w-[1000px]",children:s.jsx(ns,{columns:bt,grouped:U,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,onRowClick:h=>ne(h.id),selectionMode:o,selectedIds:c,onToggleSelect:f,emptyState:i.search?s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${i.search}"`}):s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})})}),t[7]=g,t[8]=z,t[9]=x,t[10]=m.mode,t[11]=m.virtualMcp,t[12]=N,t[13]=i,t[14]=n,t[15]=e.slug,t[16]=c,t[17]=o,t[18]=k,t[19]=a,t[20]=M,t[21]=T,t[22]=B,t[23]=$,t[24]=L,t[25]=r,t[26]=u,t[27]=b}else M=t[20],T=t[21],B=t[22],$=t[23],L=t[24],r=t[25],u=t[26],b=t[27];let K;t[123]!==M||t[124]!==L?(K=s.jsx(M,{children:L}),t[123]=M,t[124]=L,t[125]=K):K=t[125];let V;t[126]!==B||t[127]!==c.size||t[128]!==o?(V=o&&s.jsx(ss,{count:c.size,total:B.length,onSelectAll:()=>C(new Set(B.map(rs))),onDeselectAll:()=>C(new Set),onDelete:()=>P(!0),onCancel:p}),t[126]=B,t[127]=c.size,t[128]=o,t[129]=V):V=t[129];let G;return t[130]!==T||t[131]!==$||t[132]!==K||t[133]!==V||t[134]!==r||t[135]!==u||t[136]!==b?(G=s.jsxs(T,{children:[r,u,b,$,K,V]}),t[130]=T,t[131]=$,t[132]=K,t[133]=V,t[134]=r,t[135]=u,t[136]=b,t[137]=G):G=t[137],G}function rs(t){return t.id}function os(t){return t.stopPropagation()}function cs(t){return t.stopPropagation()}function ds(t){return t.stopPropagation()}function ms(t){return t.stopPropagation()}function fs(t){return s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?ye(new Date(t.updated_at)):"—"})}function us(t){return s.jsx(Ce,{id:t.updated_by??t.created_by,size:"3xs"})}function hs(t){return s.jsx(He,{status:t.status})}function ps(t){return s.jsx(J.Suspense,{fallback:s.jsx(ht.Fallback,{}),children:s.jsx(ht,{connectionIds:t.connections.map(xs),maxVisibleIcons:2})})}function xs(t){return t.connection_id}function gs(t){return s.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"})}function js(t){return s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ge,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(Y,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title})]})}function bs(t){return t.stopPropagation()}function vs(t){return t.status==="inactive"}function Ns(t){return t.status==="active"}function Cn(){const t=we.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vt,{children:s.jsx(J.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Jt,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(as,{})})}),t[0]=e):e=t[0],e}export{Cn as default};
1
+ import{c as we,j as s,E as vt,r as J,u as Nt,e as Ct,B as Q,z as X,w as yt,O as wt}from"./index-BwxEZIQr.js";import{C as St}from"./collection-display-button-771l7C-D.js";import{C as kt}from"./collection-search-BcxXiwnM.js";import{P as ve}from"./index-DIpn2laL.js";import{B as _t,a as Dt,b as zt,c as At}from"./breadcrumb-jhLLcaSq.js";import{C as xt}from"./connection-card-8C6CCQg8.js";import{C as He,i as Mt}from"./connection-status-D82b0hJj.js";import{E as Ze}from"./empty-state-VXOPlUbP.js";import{I as Ge}from"./integration-icon-TkiXAcCx.js";import{u as Tt}from"./use-list-state-CcAjjCVm.js";import{u as $t}from"./use-create-virtual-mcp-CWD_gaUu.js";import{i as Ne}from"./constants-CzDvwmSY.js";import{b as Pt,a as It}from"./use-virtual-mcp-CvmGsLOT.js";import{c as at,b as rt,d as ot,A as ct,e as dt,h as mt,a as ft,f as ut}from"./alert-dialog-BP-z4Ogy.js";import{B as et}from"./badge-CDP8kbvH.js";import{C as Ue}from"./checkbox-CXNIiG-w.js";import{c as Ot,d as Bt,b as Lt,a as Rt,D as Et}from"./dialog-DVrvUtp4.js";import{T as Kt,a as Vt,b as Ve,c as se,d as Gt,e as Ut}from"./table-BqV5DzoG.js";import{D as tt,a as st,b as nt,c as je}from"./dropdown-menu-_sgnI8Sd.js";import{n as Ft}from"./ArrowDown-Ddd2bFCq.js";import{i as Ht}from"./ArrowUp-D8-wpLhK.js";import{t as qt}from"./ChevronDown-DkB2aRG4.js";import{i as it}from"./DotsVertical-D0oq2fjv.js";import{s as lt}from"./Eye-DvVdD51j.js";import{i as Jt}from"./Loading01-CmbgGBJZ.js";import{s as Fe}from"./Trash01-Cw6VFCl2.js";import{t as Y}from"./Users03-B92JA0ax.js";import{s as gt}from"./XClose-B27D0Pes.js";import{U as Ce}from"./user-Ye6g7e7k.js";import{A as ht}from"./agent-connections-preview-BAKS5gJJ.js";import{f as ye}from"./format-time-CMKyl-GC.js";import"./Check-DFFtcHrw.js";import"./Grid01-Sp0biDxT.js";import"./List-ClxAjgXZ.js";import"./tooltip-aT8SYWF_.js";import"./index-DzqmGhb3.js";import"./SearchMd-JEgBfhSx.js";import"./input-Fhdajp_c.js";import"./use-local-storage-CI_WEqce.js";import"./useQuery-BMWtXZn8.js";import"./useMutation-xr8MgEC0.js";import"./ChevronRight-ACRFNNEg.js";import"./card-Bby2NP30.js";import"./AlertCircle-CRefRGB6.js";import"./CheckCircle-DFbYHiLE.js";import"./Container-B7oSS_-y.js";import"./use-view-mode-2oXrhkvB.js";import"./use-mobile-DFD6SQiI.js";import"./use-collections-L9vgkwE-.js";import"./X-Coju733X.js";import"./avatar-BCqIRh9w.js";import"./use-connection-DneEev9a.js";import"./differenceInSeconds-NQ4PDo0z.js";function pt(t){return t.title.trim().replace(/\s+\(\d+\)$/,"")}function Qt(t){const e=new Map;for(const i of t){const a=pt(i),l=e.get(a);l?l.push(i):e.set(a,[i])}const n=[],d=new Set;for(const i of t){const a=pt(i);if(d.has(a))continue;d.add(a);const l=e.get(a),x=l[0];l.length===1?n.push({type:"single",agent:x}):n.push({type:"group",key:a,icon:x.icon,title:x.title.replace(/\s*\(\d+\)\s*$/,""),agents:l})}return n}function jt(t){const e=new Set,n=[];for(const d of t)d.created_by&&!e.has(d.created_by)&&(e.add(d.created_by),n.push(d.created_by));return n}function Wt(t,e){switch(e.type){case"delete":return{mode:"deleting",virtualMcp:e.virtualMcp};case"close":return{mode:"idle"}}}function Xt(t){const e=we.c(107),{group:n,onNavigate:d,onDelete:i,selectionMode:a,selectedIds:l,onToggleSelect:x}=t,[N,g]=J.useState(!1);let w;if(e[0]!==n.agents||e[1]!==l){let y;e[3]!==l?(y=_=>l.has(_.id),e[3]=l,e[4]=y):y=e[4],w=n.agents.every(y),e[0]=n.agents,e[1]=l,e[2]=w}else w=e[2];const m=w;let D;if(e[5]!==n.agents||e[6]!==l){let y;e[8]!==l?(y=_=>l.has(_.id),e[8]=l,e[9]=y):y=e[9],D=n.agents.some(y),e[5]=n.agents,e[6]=l,e[7]=D}else D=e[7];const o=D;let O,S,c,C,z,P,k,I,A,f,j;if(e[10]!==m||e[11]!==n.agents||e[12]!==n.icon||e[13]!==n.title||e[14]!==x||e[15]!==l||e[16]!==a||e[17]!==o){const y=jt(n.agents),_=n.agents.reduce(ts,n.agents[0]),W=_.updated_at??_.created_at;O=xt;const Z=`${n.agents.length} instances`;e[29]!==n.icon||e[30]!==n.title||e[31]!==Z?(A={title:n.title,icon:n.icon,description:Z},e[29]=n.icon,e[30]=n.title,e[31]=Z,e[32]=A):A=e[32],e[33]!==m||e[34]!==n.agents||e[35]!==x||e[36]!==l||e[37]!==a?(f=()=>a?(()=>{for(const R of n.agents)m?l.has(R.id)&&x(R.id):l.has(R.id)||x(R.id)})():g(!0),e[33]=m,e[34]=n.agents,e[35]=x,e[36]=l,e[37]=a,e[38]=f):f=e[38];const H=a&&m&&"ring-2 ring-primary",ee=a&&o&&!m&&"ring-1 ring-primary/50";e[39]!==H||e[40]!==ee?(j=X(H,ee),e[39]=H,e[40]=ee,e[41]=j):j=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Y,{}),e[42]=S):S=e[42],e[43]!==m||e[44]!==n.agents||e[45]!==x||e[46]!==l||e[47]!==a||e[48]!==o?(c=a?s.jsx(Ue,{checked:m?!0:o?"indeterminate":!1,onCheckedChange:()=>{for(const R of n.agents)m?l.has(R.id)&&x(R.id):l.has(R.id)||x(R.id)}}):s.jsxs(et,{variant:"secondary",className:"text-xs tabular-nums",children:["x",n.agents.length]}),e[43]=m,e[44]=n.agents,e[45]=x,e[46]=l,e[47]=a,e[48]=o,e[49]=c):c=e[49];let q;e[50]!==n.agents?(q=n.agents.slice(0,6).map(es),e[50]=n.agents,e[51]=q):q=e[51],e[52]!==q?(C=s.jsx("div",{className:"flex items-center gap-1",children:q}),e[52]=q,e[53]=C):C=e[53],k="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const te=y.map(R=>s.jsx(Ce,{id:R,size:"3xs",avatarOnly:y.length>1},R));e[54]!==te?(I=s.jsx("div",{className:"flex items-center -space-x-1.5",children:te}),e[54]=te,e[55]=I):I=e[55],z="shrink-0 ml-2",P=W?ye(new Date(W)):"—",e[10]=m,e[11]=n.agents,e[12]=n.icon,e[13]=n.title,e[14]=x,e[15]=l,e[16]=a,e[17]=o,e[18]=O,e[19]=S,e[20]=c,e[21]=C,e[22]=z,e[23]=P,e[24]=k,e[25]=I,e[26]=A,e[27]=f,e[28]=j}else O=e[18],S=e[19],c=e[20],C=e[21],z=e[22],P=e[23],k=e[24],I=e[25],A=e[26],f=e[27],j=e[28];let p;e[56]!==z||e[57]!==P?(p=s.jsx("span",{className:z,children:P}),e[56]=z,e[57]=P,e[58]=p):p=e[58];let M;e[59]!==p||e[60]!==k||e[61]!==I?(M=s.jsxs("div",{className:k,children:[I,p]}),e[59]=p,e[60]=k,e[61]=I,e[62]=M):M=e[62];let T;e[63]!==O||e[64]!==S||e[65]!==c||e[66]!==C||e[67]!==M||e[68]!==A||e[69]!==f||e[70]!==j?(T=s.jsx(O,{connection:A,onClick:f,className:j,fallbackIcon:S,headerActions:c,body:C,footer:M}),e[63]=O,e[64]=S,e[65]=c,e[66]=C,e[67]=M,e[68]=A,e[69]=f,e[70]=j,e[71]=T):T=e[71];let B;e[72]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Y,{}),e[72]=B):B=e[72];let $;e[73]!==n.icon||e[74]!==n.title?($=s.jsx(Ge,{icon:n.icon,name:n.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:B}),e[73]=n.icon,e[74]=n.title,e[75]=$):$=e[75];let L;e[76]!==n.agents.length?(L=s.jsxs(et,{variant:"secondary",className:"ml-2 text-xs tabular-nums",children:["x",n.agents.length]}),e[76]=n.agents.length,e[77]=L):L=e[77];let r;e[78]!==n.title||e[79]!==L?(r=s.jsxs(Ot,{children:[n.title,L]}),e[78]=n.title,e[79]=L,e[80]=r):r=e[80];let u;e[81]!==n.agents.length?(u=s.jsxs(Bt,{children:[n.agents.length," instances"]}),e[81]=n.agents.length,e[82]=u):u=e[82];let b;e[83]!==r||e[84]!==u?(b=s.jsxs("div",{children:[r,u]}),e[83]=r,e[84]=u,e[85]=b):b=e[85];let K;e[86]!==$||e[87]!==b?(K=s.jsx(Lt,{className:"px-6 pt-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[$,b]})}),e[86]=$,e[87]=b,e[88]=K):K=e[88];let V;if(e[89]!==n.agents||e[90]!==i||e[91]!==d){let y;e[93]!==i||e[94]!==d?(y=_=>s.jsxs("div",{className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>{g(!1),d(_.id)},children:[s.jsx(Ge,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0",fallbackIcon:s.jsx(Y,{})}),s.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:_.title}),s.jsx(He,{status:_.status})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[s.jsx(Ce,{id:_.created_by,size:"3xs"}),s.jsx("span",{children:_.created_at?ye(new Date(_.created_at)):"—"})]}),s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:Zt,children:s.jsx(it,{size:16})})}),s.jsxs(nt,{align:"end",onClick:Yt,children:[s.jsxs(je,{onClick:()=>{g(!1),d(_.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(_.id)&&s.jsxs(je,{variant:"destructive",onClick:()=>i(_),children:[s.jsx(Fe,{size:16}),"Delete"]})]})]})]},_.id),e[93]=i,e[94]=d,e[95]=y):y=e[95],V=n.agents.map(y),e[89]=n.agents,e[90]=i,e[91]=d,e[92]=V}else V=e[92];let G;e[96]!==V?(G=s.jsx("div",{className:"divide-y max-h-80 overflow-auto",children:V}),e[96]=V,e[97]=G):G=e[97];let E;e[98]!==K||e[99]!==G?(E=s.jsxs(Rt,{className:"sm:max-w-lg p-0 gap-0",children:[K,G]}),e[98]=K,e[99]=G,e[100]=E):E=e[100];let U;e[101]!==N||e[102]!==E?(U=s.jsx(Et,{open:N,onOpenChange:g,children:E}),e[101]=N,e[102]=E,e[103]=U):U=e[103];let F;return e[104]!==T||e[105]!==U?(F=s.jsxs(s.Fragment,{children:[T,U]}),e[104]=T,e[105]=U,e[106]=F):F=e[106],F}function Yt(t){return t.stopPropagation()}function Zt(t){return t.stopPropagation()}function es(t){return s.jsx(He,{status:t.status},t.id)}function ts(t,e){const n=e.updated_at??e.created_at,d=t.updated_at??t.created_at;return n?d?new Date(n)>new Date(d)?e:t:e:t}function ss(t){const e=we.c(21),{count:n,total:d,onSelectAll:i,onDeselectAll:a,onDelete:l,onCancel:x}=t;if(n===0)return null;let N;e[0]!==n?(N=s.jsxs("span",{className:"text-sm font-medium tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=N):N=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-4 w-px bg-border"}),e[2]=g):g=e[2];let w;e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==d?(w=n<d?s.jsxs(Q,{variant:"ghost",size:"sm",onClick:i,children:["Select all (",d,")"]}):s.jsx(Q,{variant:"ghost",size:"sm",onClick:a,children:"Clear selection"}),e[3]=n,e[4]=a,e[5]=i,e[6]=d,e[7]=w):w=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-4 w-px bg-border"}),e[8]=m):m=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Fe,{size:14}),e[9]=D):D=e[9];let o;e[10]!==l?(o=s.jsxs(Q,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:l,children:[D,"Delete"]}),e[10]=l,e[11]=o):o=e[11];let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("div",{className:"h-4 w-px bg-border"}),e[12]=O):O=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(gt,{size:14}),e[13]=S):S=e[13];let c;e[14]!==x?(c=s.jsxs(Q,{variant:"ghost",size:"sm",onClick:x,children:[S,"Cancel"]}),e[14]=x,e[15]=c):c=e[15];let C;return e[16]!==N||e[17]!==w||e[18]!==o||e[19]!==c?(C=s.jsxs("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 flex items-center gap-3 rounded-xl border border-border bg-background/95 backdrop-blur px-4 py-2.5 shadow-lg",children:[N,g,w,m,o,O,c]}),e[16]=N,e[17]=w,e[18]=o,e[19]=c,e[20]=C):C=e[20],C}function ns(t){const e=we.c(37),{columns:n,grouped:d,sortKey:i,sortDirection:a,onSort:l,onRowClick:x,selectionMode:N,selectedIds:g,onToggleSelect:w,emptyState:m}=t;let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=new Set,e[0]=D):D=e[0];const[o,O]=J.useState(D);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=f=>{O(j=>{const p=new Set(j);return p.has(f)?p.delete(f):p.add(f),p})},e[1]=S):S=e[1];const c=S;if(d.length===0&&m){let f;return e[2]!==m?(f=s.jsx("div",{className:"flex items-center justify-center h-full",children:m}),e[2]=m,e[3]=f):f=e[3],f}const C=n.length;let z;if(e[4]!==C||e[5]!==n||e[6]!==l||e[7]!==a||e[8]!==i){let f;e[10]!==C||e[11]!==l||e[12]!==a||e[13]!==i?(f=(j,p)=>{const M=i===j.id,T=p===C-1;return s.jsx(Kt,{className:X("px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider",T&&"w-8","group transition-colors select-none",j.sortable&&"hover:bg-accent cursor-pointer",j.cellClassName),onClick:j.sortable&&l?()=>l(j.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[j.header,j.sortable&&s.jsx("span",{className:"w-4 flex items-center justify-center",children:M&&a&&(a==="asc"?s.jsx(Ht,{size:16,className:"text-muted-foreground"}):s.jsx(Ft,{size:16,className:"text-muted-foreground"}))})]})},j.id)},e[10]=C,e[11]=l,e[12]=a,e[13]=i,e[14]=f):f=e[14],z=n.map(f),e[4]=C,e[5]=n,e[6]=l,e[7]=a,e[8]=i,e[9]=z}else z=e[9];let P;e[15]!==z?(P=s.jsx(Vt,{className:"border-b-0",children:s.jsx(Ve,{className:"h-9 hover:bg-transparent border-b border-border",children:z})}),e[15]=z,e[16]=P):P=e[16];let k;if(e[17]!==n||e[18]!==o||e[19]!==d||e[20]!==x||e[21]!==w||e[22]!==g||e[23]!==N){let f;e[25]!==n||e[26]!==o||e[27]!==x||e[28]!==w||e[29]!==g||e[30]!==N?(f=j=>{if(j.type==="single"){const r=j.agent;return s.jsx(Ve,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer",N&&g.has(r.id)&&"bg-primary/5"),onClick:()=>x(r),children:n.map(u=>s.jsx(se,{className:X("px-5 py-4 h-16 align-middle text-sm text-foreground",u.cellClassName),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:u.render?u.render(r):null})},u.id))},r.id)}const p=j,M=o.has(p.key),T=p.agents.every(r=>g.has(r.id)),B=p.agents.some(r=>g.has(r.id)),$=jt(p.agents),L=p.agents.reduce(ls,p.agents[0]);return s.jsxs(J.Fragment,{children:[s.jsx(Ve,{className:"border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>c(p.key),children:n.map(r=>{const u=X("px-5 py-3 h-14 align-middle text-sm",r.cellClassName);if(r.id==="select")return s.jsx(se,{className:u,children:s.jsx(Ue,{checked:T?!0:B?"indeterminate":!1,onCheckedChange:()=>{for(const b of p.agents)T?g.has(b.id)&&w(b.id):g.has(b.id)||w(b.id)},onClick:is})},r.id);if(r.id==="title")return s.jsx(se,{className:u,children:s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ge,{icon:p.icon,name:p.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(Y,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:p.title}),s.jsxs(et,{variant:"secondary",className:"text-xs tabular-nums",children:["x",p.agents.length]})]})},r.id);if(r.id==="updated_by")return s.jsx(se,{className:u,children:s.jsx("div",{className:"flex items-center -space-x-1.5",children:$.map(b=>s.jsx(Ce,{id:b,size:"3xs",avatarOnly:$.length>1},b))})},r.id);if(r.id==="updated_at"){const b=L.updated_at??L.created_at;return s.jsx(se,{className:u,children:s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b?ye(new Date(b)):"—"})},r.id)}return r.id==="actions"?s.jsx(se,{className:u,children:s.jsx(qt,{size:16,className:X("text-muted-foreground transition-transform",M&&"rotate-180")})},r.id):s.jsx(se,{className:u},r.id)})}),M&&p.agents.map(r=>s.jsx(Ve,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer bg-muted/20",N&&g.has(r.id)&&"bg-primary/5"),onClick:()=>x(r),children:n.map(u=>s.jsx(se,{className:X("px-5 py-3 h-14 align-middle text-sm text-foreground",u.cellClassName,u.id==="title"&&"pl-12"),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:u.render?u.render(r):null})},u.id))},r.id))]},p.key)},e[25]=n,e[26]=o,e[27]=x,e[28]=w,e[29]=g,e[30]=N,e[31]=f):f=e[31],k=d.map(f),e[17]=n,e[18]=o,e[19]=d,e[20]=x,e[21]=w,e[22]=g,e[23]=N,e[24]=k}else k=e[24];let I;e[32]!==k?(I=s.jsx(Gt,{children:k}),e[32]=k,e[33]=I):I=e[33];let A;return e[34]!==P||e[35]!==I?(A=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs(Ut,{className:"w-full border-collapse",children:[P,I]})}),e[34]=P,e[35]=I,e[36]=A):A=e[36],A}function is(t){return t.stopPropagation()}function ls(t,e){const n=e.updated_at??e.created_at,d=t.updated_at??t.created_at;return n?d?new Date(n)>new Date(d)?e:t:e:t}function as(){const t=we.c(138),{org:e}=Nt(),n=Ct();let d;t[0]!==e.slug?(d={namespace:e.slug,resource:"agents"},t[0]=e.slug,t[1]=d):d=t[1];const i=Tt(d),a=Pt(i);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={navigateOnCreate:!0},t[2]=l):l=t[2];const{createVirtualMCP:x,isCreating:N}=$t(l),g=It();let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w={mode:"idle"},t[3]=w):w=t[3];const[m,D]=J.useReducer(Wt,w),[o,O]=J.useState(!1);let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=new Set,t[4]=S):S=t[4];const[c,C]=J.useState(S),[z,P]=J.useState(!1),[k,I]=J.useState("ALL");let A;t[5]===Symbol.for("react.memo_cache_sentinel")?(A=E=>{C(U=>{const F=new Set(U);return F.has(E)?F.delete(E):F.add(E),F})},t[5]=A):A=t[5];const f=A;let j;t[6]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{O(!1),C(new Set)},t[6]=j):j=t[6];const p=j;let M,T,B,$,L,r,u,b;if(t[7]!==g||t[8]!==z||t[9]!==x||t[10]!==m.mode||t[11]!==m.virtualMcp||t[12]!==N||t[13]!==i||t[14]!==n||t[15]!==e.slug||t[16]!==c||t[17]!==o||t[18]!==k||t[19]!==a){let E;t[28]!==k?(E=h=>!(k!=="ALL"&&h.status!==k),t[28]=k,t[29]=E):E=t[29],B=a.filter(E);const U=Qt(B),F=a.length;let y;t[30]!==a?(y=a.filter(Ns),t[30]=a,t[31]=y):y=t[31];const _=y.length;let W;t[32]!==a?(W=a.filter(vs),t[32]=a,t[33]=W):W=t[33];let Z;t[34]!==y.length||t[35]!==W.length||t[36]!==a.length?(Z={total:F,active:_,inactive:W.length},t[34]=y.length,t[35]=W.length,t[36]=a.length,t[37]=Z):Z=t[37];const H=Z;let ee;t[38]!==g||t[39]!==m.mode||t[40]!==m.virtualMcp?(ee=async()=>{if(m.mode!=="deleting")return;const h=m.virtualMcp.id;if(D({type:"close"}),!(!h||Ne(h)))try{await g.delete.mutateAsync(h)}catch{}},t[38]=g,t[39]=m.mode,t[40]=m.virtualMcp,t[41]=ee):ee=t[41];const q=ee;let te;t[42]!==g||t[43]!==c?(te=async()=>{P(!1);let h=0;for(const v of c)if(!Ne(v))try{await g.delete.mutateAsync(v),h++}catch{}yt.success(`Deleted ${h} agent${h!==1?"s":""}`),p()},t[42]=g,t[43]=c,t[44]=te):te=t[44];const R=te;let Se;t[45]!==n||t[46]!==e.slug||t[47]!==o?(Se=h=>{if(o){f(h);return}n({to:"/$org/$project/agents/$agentId",params:{org:e.slug,project:wt,agentId:h}})},t[45]=n,t[46]=e.slug,t[47]=o,t[48]=Se):Se=t[48];const ne=Se;let ie;t[49]!==c||t[50]!==o?(ie=o?[{id:"select",header:"",render:h=>s.jsx(Ue,{checked:c.has(h.id),onCheckedChange:()=>f(h.id),onClick:bs}),cellClassName:"w-10 shrink-0"}]:[],t[49]=c,t[50]=o,t[51]=ie):ie=t[51];let ke,_e,De,ze,Ae,Me;t[52]===Symbol.for("react.memo_cache_sentinel")?(ke={id:"title",header:"Name",render:js,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_e={id:"description",header:"Description",render:gs,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},De={id:"connections",header:"Connections",render:ps,cellClassName:"w-28 shrink-0"},ze={id:"status",header:"Status",render:hs,cellClassName:"w-24 shrink-0"},Ae={id:"updated_by",header:"Updated by",render:us,cellClassName:"w-32 shrink-0",sortable:!0},Me={id:"updated_at",header:"Updated",render:fs,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},t[52]=ke,t[53]=_e,t[54]=De,t[55]=ze,t[56]=Ae,t[57]=Me):(ke=t[52],_e=t[53],De=t[54],ze=t[55],Ae=t[56],Me=t[57]);let le;t[58]!==ne?(le={id:"actions",header:"",render:h=>s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ms,children:s.jsx(it,{size:20})})}),s.jsxs(nt,{align:"end",onClick:ds,children:[s.jsxs(je,{onClick:v=>{v.stopPropagation(),ne(h.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(h.id)&&s.jsxs(je,{variant:"destructive",onClick:v=>{v.stopPropagation(),D({type:"delete",virtualMcp:h})},children:[s.jsx(Fe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"},t[58]=ne,t[59]=le):le=t[59];let Te;t[60]!==ie||t[61]!==le?(Te=[...ie,ke,_e,De,ze,Ae,Me,le],t[60]=ie,t[61]=le,t[62]=Te):Te=t[62];const bt=Te;let $e;t[63]!==x||t[64]!==N||t[65]!==o?($e=s.jsx("div",{className:"flex items-center gap-2",children:o?s.jsxs(Q,{variant:"ghost",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:p,children:[s.jsx(gt,{size:14}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsxs(Q,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:()=>O(!0),children:[s.jsx(Mt,{size:14}),"Select"]}),s.jsx(Q,{onClick:x,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:N,children:N?"Creating...":"Create Agent"})]})}),t[63]=x,t[64]=N,t[65]=o,t[66]=$e):$e=t[66];const qe=$e;T=ve;const Je=m.mode==="deleting";let Pe;t[67]===Symbol.for("react.memo_cache_sentinel")?(Pe=h=>!h&&D({type:"close"}),t[67]=Pe):Pe=t[67];let Ie;t[68]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(at,{children:"Delete Agent?"}),t[68]=Ie):Ie=t[68];const Qe=m.mode==="deleting"&&m.virtualMcp.title;let ae;t[69]!==Qe?(ae=s.jsxs(rt,{children:[Ie,s.jsxs(ot,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:Qe}),"."]})]}),t[69]=Qe,t[70]=ae):ae=t[70];let Oe;t[71]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(ct,{children:"Cancel"}),t[71]=Oe):Oe=t[71];let re;t[72]!==q?(re=s.jsxs(dt,{children:[Oe,s.jsx(mt,{onClick:q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[72]=q,t[73]=re):re=t[73];let oe;t[74]!==ae||t[75]!==re?(oe=s.jsxs(ft,{children:[ae,re]}),t[74]=ae,t[75]=re,t[76]=oe):oe=t[76],t[77]!==Je||t[78]!==oe?(r=s.jsx(ut,{open:Je,onOpenChange:Pe,children:oe}),t[77]=Je,t[78]=oe,t[79]=r):r=t[79];const We=c.size!==1?"s":"";let ce;t[80]!==c.size||t[81]!==We?(ce=s.jsxs(at,{children:["Delete ",c.size," agent",We,"?"]}),t[80]=c.size,t[81]=We,t[82]=ce):ce=t[82];let Be;t[83]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(ot,{children:"This action cannot be undone. This will permanently delete the selected agents."}),t[83]=Be):Be=t[83];let de;t[84]!==ce?(de=s.jsxs(rt,{children:[ce,Be]}),t[84]=ce,t[85]=de):de=t[85];let Le;t[86]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(ct,{children:"Cancel"}),t[86]=Le):Le=t[86];let me;t[87]!==R?(me=s.jsxs(dt,{children:[Le,s.jsx(mt,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[87]=R,t[88]=me):me=t[88];let fe;t[89]!==de||t[90]!==me?(fe=s.jsxs(ft,{children:[de,me]}),t[89]=de,t[90]=me,t[91]=fe):fe=t[91],t[92]!==z||t[93]!==fe?(u=s.jsx(ut,{open:z,onOpenChange:P,children:fe}),t[92]=z,t[93]=fe,t[94]=u):u=t[94];const Xe=H.active>0&&` · ${H.active} active`,Ye=H.inactive>0&&` · ${H.inactive} inactive`;let ue;t[95]!==H.total||t[96]!==Xe||t[97]!==Ye?(ue=s.jsx(ve.Header.Left,{children:s.jsx(_t,{children:s.jsx(Dt,{children:s.jsx(zt,{children:s.jsxs(At,{className:"flex items-center gap-2",children:["Agents",s.jsxs("span",{className:"text-xs font-normal text-muted-foreground tabular-nums",children:[H.total," total",Xe,Ye]})]})})})})}),t[95]=H.total,t[96]=Xe,t[97]=Ye,t[98]=ue):ue=t[98];let Re;t[99]===Symbol.for("react.memo_cache_sentinel")?(Re=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],t[99]=Re):Re=t[99];let Ee,Ke;t[100]===Symbol.for("react.memo_cache_sentinel")?(Ee=h=>I(h||"ALL"),Ke=[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}],t[100]=Ee,t[101]=Ke):(Ee=t[100],Ke=t[101]);let he;t[102]!==k?(he=[{label:"Status",value:k,onChange:Ee,options:Ke}],t[102]=k,t[103]=he):he=t[103];let pe;t[104]!==i.handleSort||t[105]!==i.setViewMode||t[106]!==i.sortDirection||t[107]!==i.sortKey||t[108]!==i.viewMode||t[109]!==he?(pe=s.jsx(St,{viewMode:i.viewMode,onViewModeChange:i.setViewMode,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,sortOptions:Re,filters:he}),t[104]=i.handleSort,t[105]=i.setViewMode,t[106]=i.sortDirection,t[107]=i.sortKey,t[108]=i.viewMode,t[109]=he,t[110]=pe):pe=t[110];let xe;t[111]!==qe||t[112]!==pe?(xe=s.jsxs(ve.Header.Right,{children:[pe,qe]}),t[111]=qe,t[112]=pe,t[113]=xe):xe=t[113],t[114]!==ue||t[115]!==xe?(b=s.jsxs(ve.Header,{children:[ue,xe]}),t[114]=ue,t[115]=xe,t[116]=b):b=t[116];let ge;t[117]!==i?(ge=h=>{h.key==="Escape"&&(i.setSearch(""),h.target.blur())},t[117]=i,t[118]=ge):ge=t[118],t[119]!==i.search||t[120]!==i.setSearch||t[121]!==ge?($=s.jsx("div",{className:"flex items-center gap-3 px-5 pb-0",children:s.jsx("div",{className:"flex-1",children:s.jsx(kt,{value:i.search,onChange:i.setSearch,placeholder:"Search for an agent...",onKeyDown:ge})})}),t[119]=i.search,t[120]=i.setSearch,t[121]=ge,t[122]=$):$=t[122],M=ve.Content,L=i.viewMode==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:B.length===0?s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:U.map(h=>{if(h.type==="group")return s.jsx(Xt,{group:h,onNavigate:ne,onDelete:be=>D({type:"delete",virtualMcp:be}),selectionMode:o,selectedIds:c,onToggleSelect:f},h.key);const v=h.agent;return s.jsxs("div",{className:"relative",children:[o&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsx(Ue,{checked:c.has(v.id),onCheckedChange:()=>f(v.id)})}),s.jsx(xt,{connection:{id:v.id??"",title:v.title,description:v.description,icon:v.icon,status:v.status},fallbackIcon:s.jsx(Y,{}),onClick:()=>ne(v.id),className:X(o&&c.has(v.id)&&"ring-2 ring-primary"),body:s.jsx(He,{status:v.status}),footer:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ce,{id:v.updated_by??v.created_by,size:"3xs"})}),s.jsx("span",{className:"shrink-0 ml-2",children:v.updated_at?ye(new Date(v.updated_at)):"—"})]}),headerActions:o?void 0:s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:cs,children:s.jsx(it,{size:20})})}),s.jsxs(nt,{align:"end",onClick:os,children:[s.jsxs(je,{onClick:be=>{be.stopPropagation(),ne(v.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(v.id)&&s.jsxs(je,{variant:"destructive",onClick:be=>{be.stopPropagation(),D({type:"delete",virtualMcp:v})},children:[s.jsx(Fe,{size:16}),"Delete"]})]})]})})]},v.id)})})}):s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:s.jsx("div",{className:"min-w-[1000px]",children:s.jsx(ns,{columns:bt,grouped:U,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,onRowClick:h=>ne(h.id),selectionMode:o,selectedIds:c,onToggleSelect:f,emptyState:i.search?s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${i.search}"`}):s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})})}),t[7]=g,t[8]=z,t[9]=x,t[10]=m.mode,t[11]=m.virtualMcp,t[12]=N,t[13]=i,t[14]=n,t[15]=e.slug,t[16]=c,t[17]=o,t[18]=k,t[19]=a,t[20]=M,t[21]=T,t[22]=B,t[23]=$,t[24]=L,t[25]=r,t[26]=u,t[27]=b}else M=t[20],T=t[21],B=t[22],$=t[23],L=t[24],r=t[25],u=t[26],b=t[27];let K;t[123]!==M||t[124]!==L?(K=s.jsx(M,{children:L}),t[123]=M,t[124]=L,t[125]=K):K=t[125];let V;t[126]!==B||t[127]!==c.size||t[128]!==o?(V=o&&s.jsx(ss,{count:c.size,total:B.length,onSelectAll:()=>C(new Set(B.map(rs))),onDeselectAll:()=>C(new Set),onDelete:()=>P(!0),onCancel:p}),t[126]=B,t[127]=c.size,t[128]=o,t[129]=V):V=t[129];let G;return t[130]!==T||t[131]!==$||t[132]!==K||t[133]!==V||t[134]!==r||t[135]!==u||t[136]!==b?(G=s.jsxs(T,{children:[r,u,b,$,K,V]}),t[130]=T,t[131]=$,t[132]=K,t[133]=V,t[134]=r,t[135]=u,t[136]=b,t[137]=G):G=t[137],G}function rs(t){return t.id}function os(t){return t.stopPropagation()}function cs(t){return t.stopPropagation()}function ds(t){return t.stopPropagation()}function ms(t){return t.stopPropagation()}function fs(t){return s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?ye(new Date(t.updated_at)):"—"})}function us(t){return s.jsx(Ce,{id:t.updated_by??t.created_by,size:"3xs"})}function hs(t){return s.jsx(He,{status:t.status})}function ps(t){return s.jsx(J.Suspense,{fallback:s.jsx(ht.Fallback,{}),children:s.jsx(ht,{connectionIds:t.connections.map(xs),maxVisibleIcons:2})})}function xs(t){return t.connection_id}function gs(t){return s.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"})}function js(t){return s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ge,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(Y,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title})]})}function bs(t){return t.stopPropagation()}function vs(t){return t.status==="inactive"}function Ns(t){return t.status==="active"}function Cn(){const t=we.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vt,{children:s.jsx(J.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Jt,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(as,{})})}),t[0]=e):e=t[0],e}export{Cn as default};
@@ -1,7 +1,7 @@
1
- import{j as r,T as w,r as n,aj as m,ba as O,U as M,al as I,W as z,X as F,$ as A,bb as D,Y as L,b0 as G,ao as W,a0 as Y,Z as k,c as i,z as p,bc as v}from"./index-EJhirEgi.js";var x="AlertDialog",[H]=W(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(Y,{...o,...a,ref:e})});y.displayName=V;var q="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t})};j.displayName=q;var B="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});_.displayName=B;var g="AlertDialogContent",[U,X]=H(g),Z=G("AlertDialogContent"),b=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return r.jsx(O,{contentName:g,titleName:h,docsSlug:"alert-dialog",children:r.jsx(U,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[r.jsx(Z,{children:a}),r.jsx(K,{contentRef:c})]})})})});b.displayName=g;var h="AlertDialogTitle",$=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});$.displayName=h;var E="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(F,{...o,...a,ref:e})});R.displayName=E;var J="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=J;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=X(S,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});T.displayName=S;var K=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.
1
+ import{j as r,U as w,r as n,aj as m,ba as O,W as M,al as I,X as z,Y as F,a0 as A,bb as D,Z as L,b0 as G,ao as W,a1 as Y,$ as k,c as i,z as p,bc as v}from"./index-BwxEZIQr.js";var x="AlertDialog",[H]=W(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(Y,{...o,...a,ref:e})});y.displayName=V;var q="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t})};j.displayName=q;var B="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});_.displayName=B;var g="AlertDialogContent",[U,X]=H(g),Z=G("AlertDialogContent"),b=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=n.useRef(null),T=m(e,c),u=n.useRef(null);return r.jsx(O,{contentName:g,titleName:h,docsSlug:"alert-dialog",children:r.jsx(U,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:T,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[r.jsx(Z,{children:a}),r.jsx(K,{contentRef:c})]})})})});b.displayName=g;var h="AlertDialogTitle",$=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});$.displayName=h;var E="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(F,{...o,...a,ref:e})});R.displayName=E;var J="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=J;var S="AlertDialogCancel",P=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=X(S,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});P.displayName=S;var K=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${g}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
5
5
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${g}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
6
 
7
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return n.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},Q=N,ee=y,te=j,ae=_,oe=b,le=C,se=T,re=$,ie=R;function pe(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(Q,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function ge(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(ee,{"data-slot":"alert-dialog-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(te,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ce(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(ae,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function fe(l){const e=i.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ce,{}),e[3]=o):o=e[3];let s;e[4]!==t?(s=p("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=s):s=e[5];let c;return e[6]!==a||e[7]!==s?(c=r.jsxs(ne,{children:[o,r.jsx(oe,{"data-slot":"alert-dialog-content",className:s,...a})]}),e[6]=a,e[7]=s,e[8]=c):c=e[8],c}function ue(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function me(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function Ae(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(re,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function De(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(ie,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ve(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v(),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function xe(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(se,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}export{xe as A,fe as a,ue as b,Ae as c,De as d,me as e,pe as f,ge as g,ve as h};
7
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return n.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},Q=N,ee=y,te=j,ae=_,oe=b,le=C,se=P,re=$,ie=R;function pe(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(Q,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function ge(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(ee,{"data-slot":"alert-dialog-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=r.jsx(te,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ce(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(ae,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function fe(l){const e=i.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ce,{}),e[3]=o):o=e[3];let s;e[4]!==t?(s=p("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=s):s=e[5];let c;return e[6]!==a||e[7]!==s?(c=r.jsxs(ne,{children:[o,r.jsx(oe,{"data-slot":"alert-dialog-content",className:s,...a})]}),e[6]=a,e[7]=s,e[8]=c):c=e[8],c}function ue(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function me(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function Ae(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(re,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function De(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(ie,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function ve(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v(),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}function xe(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let s;return e[5]!==a||e[6]!==o?(s=r.jsx(se,{className:o,...a}),e[5]=a,e[6]=o,e[7]=s):s=e[7],s}export{xe as A,fe as a,ue as b,Ae as c,De as d,me as e,pe as f,ge as g,ve as h};
@@ -1 +1 @@
1
- import{c as l,g as m,j as t,A as f,S as h,k as x,l as r,m as p,N as u}from"./index-EJhirEgi.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
1
+ import{c as l,g as m,j as t,A as f,S as h,k as x,l as r,m as p,N as u}from"./index-BwxEZIQr.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
@@ -0,0 +1 @@
1
+ import{c as q,g as Ne,e as _e,u as le,r as E,j as r,at as Se,O as ee,w as k,B as L,t as Oe,G as Ae,x as ke,K as Q}from"./index-BwxEZIQr.js";import{E as ce}from"./empty-state-VXOPlUbP.js";import{V as he,a as Re}from"./layout-DeyJpCSu.js";import{S as Me}from"./save-actions-DuKbd0Td.js";import{u as Ee}from"./use-llm-uI2ZLalw.js";import{T as ze,a as Pe,M as Ie,S as te}from"./task-status-Bl9QTmtn.js";import{V as Ue}from"./select-virtual-mcp-DGdxHoQi.js";import{c as We,b as Le,d as Fe,e as ue,f as $e}from"./use-automations-qsid-9wy.js";import{u as de}from"./index-DIpn2laL.js";import{b as me,d as pe,c as fe,A as ge,e as xe,h as ye,a as ve,f as we}from"./alert-dialog-BP-z4Ogy.js";import{B as Ve}from"./badge-CDP8kbvH.js";import{b as se,d as Be,c as He,e as Ze,B as Ye,a as qe}from"./breadcrumb-jhLLcaSq.js";import{I as J}from"./input-Fhdajp_c.js";import{b as Ke,P as Ge,a as Qe}from"./popover-PQM18UlA.js";import{S as Je}from"./switch-Bq8IUh07.js";import{e as Xe,a as et,b as Te,T as H,d as tt,c as Z}from"./table-BqV5DzoG.js";import{u as st}from"./useQuery-BMWtXZn8.js";import{u as it,a as rt}from"./constants-CzDvwmSY.js";import{i as ie}from"./ArrowLeft-COkllC0A.js";import{i as nt}from"./ArrowUp-D8-wpLhK.js";import{i as ot}from"./Check-DFFtcHrw.js";import{i as at}from"./ChevronRight-ACRFNNEg.js";import{s as lt}from"./Clock-VRCh834Q.js";import{i as ct}from"./Edit05-BbP5Wuhr.js";import{i as K}from"./Loading01-CmbgGBJZ.js";import{s as ht}from"./Plus-BYkvGXiG.js";import{i as ut}from"./SearchMd-JEgBfhSx.js";import{s as Ce}from"./Trash01-Cw6VFCl2.js";import{s as dt}from"./XClose-B27D0Pes.js";import{a as je,t as mt,b as pt}from"./context-DWa5-aY3.js";import{f as ft}from"./formatDistanceToNow-Cb2QZZJn.js";import"./Save01-egVkGifz.js";import"./skeleton-DJF7tug6.js";import"./spinner-BnxbYYlb.js";import"./tooltip-aT8SYWF_.js";import"./index-DzqmGhb3.js";import"./use-mcp-prompts-CpqNoP0o.js";import"./dialog-DVrvUtp4.js";import"./X-Coju733X.js";import"./form-CRKVnCMR.js";import"./label-BLns8yFo.js";import"./index-CO5ACses.js";import"./usage-t6qWPVZ4.js";import"./ChevronDown-DkB2aRG4.js";import"./Edit01-odlMa8iv.js";import"./Lock01-Xr17_tjV.js";import"./Users03-B92JA0ax.js";import"./XCircle-BwKPKfX4.js";import"./AlertCircle-CRefRGB6.js";import"./select-1RddZ4CO.js";import"./ChevronUp-Bs9Ot1hj.js";import"./org-ai-providers-DyjPbDPw.js";import"./use-local-storage-CI_WEqce.js";import"./useMutation-xr8MgEC0.js";import"./EyeOff-CuPz9L1S.js";import"./Eye-DvVdD51j.js";import"./Key01-FZzH7KSv.js";import"./card-Bby2NP30.js";import"./avatar-BCqIRh9w.js";import"./use-copy-D_A8LaGR.js";import"./tabs-C5hfwptf.js";import"./collapsible-C7W88NZ4.js";import"./index-B8JTf3bb.js";import"./Code01-C8PssGbH.js";import"./checkbox-CXNIiG-w.js";import"./AlignLeft-DCeZyfUv.js";import"./Image01-DqXOaj2A.js";import"./RefreshCcw01-CS4ZawZZ.js";import"./Settings01-D4taEXIn.js";import"./ai-providers-logos-W57Qm-EN.js";import"./use-mcp-resources-BsCeSR2x.js";import"./Copy01-CgUyGO9-.js";import"./marked.esm-BaswSlok.js";import"./markdown-nhoc672y.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Czr8i4GK.js";import"./types-Dpvg5M06.js";import"./Globe02-C_VB-hTP.js";import"./LayersTwo01-DpY-ll-F.js";import"./integration-icon-TkiXAcCx.js";import"./Container-B7oSS_-y.js";import"./use-virtual-mcp-CvmGsLOT.js";import"./use-collections-L9vgkwE-.js";import"./useSuspenseInfiniteQuery-DIDJd1Uk.js";import"./infiniteQueryObserver-CZi5HeDN.js";import"./CheckCircle-DFbYHiLE.js";import"./use-create-virtual-mcp-CWD_gaUu.js";import"./decopilot-events-Brt4gAR6.js";import"./differenceInSeconds-NQ4PDo0z.js";function _(t,e,s,i,n,o,c,a){return _.fromTZ(_.tp(t,e,s,i,n,o,c),a)}_.fromTZISO=(t,e,s)=>_.fromTZ(gt(t,e),s);_.fromTZ=function(t,e){let s=new Date(Date.UTC(t.y,t.m-1,t.d,t.h,t.i,t.s)),i=G(t.tz,s),n=new Date(s.getTime()-i),o=G(t.tz,n);if(o-i===0)return n;{let c=new Date(s.getTime()-o),a=G(t.tz,c);if(a-o===0||!e&&a-o>0)return c;if(e)throw new Error("Invalid date passed to fromTZ()");return n}};_.toTZ=function(t,e){let s=t.toLocaleString("en-US",{timeZone:e}).replace(/[\u202f]/," "),i=new Date(s);return{y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate(),h:i.getHours(),i:i.getMinutes(),s:i.getSeconds(),tz:e}};_.tp=(t,e,s,i,n,o,c)=>({y:t,m:e,d:s,h:i,i:n,s:o,tz:c});function G(t,e=new Date){let s=e.toLocaleString("en-US",{timeZone:t,timeZoneName:"shortOffset"}).split(" ").slice(-1)[0],i=e.toLocaleString("en-US").replace(/[\u202f]/," ");return Date.parse(`${i} GMT`)-Date.parse(`${i} ${s}`)}function gt(t,e){let s=new Date(Date.parse(t));if(isNaN(s))throw new Error("minitz: Invalid ISO8601 passed to parser.");let i=t.substring(9);return t.includes("Z")||i.includes("-")||i.includes("+")?_.tp(s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),"Etc/UTC"):_.tp(s.getFullYear(),s.getMonth()+1,s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),e)}_.minitz=_;var X=32,B=31|X,be=[1,2,4,8,16],re=class{pattern;timezone;second;minute;hour;day;month;dayOfWeek;lastDayOfMonth;starDOM;starDOW;constructor(t,e){this.pattern=t,this.timezone=e,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.lastDayOfMonth=!1,this.starDOM=!1,this.starDOW=!1,this.parse()}parse(){if(!(typeof this.pattern=="string"||this.pattern instanceof String))throw new TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let t=this.pattern.replace(/\s+/g," ").split(" ");if(t.length<5||t.length>6)throw new TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five or six space separated parts are required.");if(t.length===5&&t.unshift("0"),t[3].indexOf("L")>=0&&(t[3]=t[3].replace("L",""),this.lastDayOfMonth=!0),t[3]=="*"&&(this.starDOM=!0),t[4].length>=3&&(t[4]=this.replaceAlphaMonths(t[4])),t[5].length>=3&&(t[5]=this.replaceAlphaDays(t[5])),t[5]=="*"&&(this.starDOW=!0),this.pattern.indexOf("?")>=0){let e=new M(new Date,this.timezone).getDate(!0);t[0]=t[0].replace("?",e.getSeconds().toString()),t[1]=t[1].replace("?",e.getMinutes().toString()),t[2]=t[2].replace("?",e.getHours().toString()),this.starDOM||(t[3]=t[3].replace("?",e.getDate().toString())),t[4]=t[4].replace("?",(e.getMonth()+1).toString()),this.starDOW||(t[5]=t[5].replace("?",e.getDay().toString()))}this.throwAtIllegalCharacters(t),this.partToArray("second",t[0],0,1),this.partToArray("minute",t[1],0,1),this.partToArray("hour",t[2],0,1),this.partToArray("day",t[3],-1,1),this.partToArray("month",t[4],-1,1),this.partToArray("dayOfWeek",t[5],0,B),this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(t,e,s,i){let n=this[t],o=t==="day"&&this.lastDayOfMonth;if(e===""&&!o)throw new TypeError("CronPattern: configuration entry "+t+" ("+e+") is empty, check for trailing spaces.");if(e==="*")return n.fill(i);let c=e.split(",");if(c.length>1)for(let a=0;a<c.length;a++)this.partToArray(t,c[a],s,i);else e.indexOf("-")!==-1&&e.indexOf("/")!==-1?this.handleRangeWithStepping(e,t,s,i):e.indexOf("-")!==-1?this.handleRange(e,t,s,i):e.indexOf("/")!==-1?this.handleStepping(e,t,s,i):e!==""&&this.handleNumber(e,t,s,i)}throwAtIllegalCharacters(t){for(let e=0;e<t.length;e++)if((e===5?/[^/*0-9,\-#L]+/:/[^/*0-9,-]+/).test(t[e]))throw new TypeError("CronPattern: configuration entry "+e+" ("+t[e]+") contains illegal characters.")}handleNumber(t,e,s,i){let n=this.extractNth(t,e),o=parseInt(n[0],10)+s;if(isNaN(o))throw new TypeError("CronPattern: "+e+" is not a number: '"+t+"'");this.setPart(e,o,n[1]||i)}setPart(t,e,s){if(!Object.prototype.hasOwnProperty.call(this,t))throw new TypeError("CronPattern: Invalid part specified: "+t);if(t==="dayOfWeek"){if(e===7&&(e=0),e<0||e>6)throw new RangeError("CronPattern: Invalid value for dayOfWeek: "+e);this.setNthWeekdayOfMonth(e,s);return}if(t==="second"||t==="minute"){if(e<0||e>=60)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="hour"){if(e<0||e>=24)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="day"){if(e<0||e>=31)throw new RangeError("CronPattern: Invalid value for "+t+": "+e)}else if(t==="month"&&(e<0||e>=12))throw new RangeError("CronPattern: Invalid value for "+t+": "+e);this[t][e]=s}handleRangeWithStepping(t,e,s,i){let n=this.extractNth(t,e),o=n[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(o===null)throw new TypeError("CronPattern: Syntax error, illegal range with stepping: '"+t+"'");let[,c,a,l]=o,f=parseInt(c,10)+s,h=parseInt(a,10)+s,y=parseInt(l,10);if(isNaN(f))throw new TypeError("CronPattern: Syntax error, illegal lower range (NaN)");if(isNaN(h))throw new TypeError("CronPattern: Syntax error, illegal upper range (NaN)");if(isNaN(y))throw new TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");if(y===0)throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");if(y>this[e].length)throw new TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[e].length+")");if(f>h)throw new TypeError("CronPattern: From value is larger than to value: '"+t+"'");for(let p=f;p<=h;p+=y)this.setPart(e,p,n[1]||i)}extractNth(t,e){let s=t,i;if(s.includes("#")){if(e!=="dayOfWeek")throw new Error("CronPattern: nth (#) only allowed in day-of-week field");i=s.split("#")[1],s=s.split("#")[0]}return[s,i]}handleRange(t,e,s,i){let n=this.extractNth(t,e),o=n[0].split("-");if(o.length!==2)throw new TypeError("CronPattern: Syntax error, illegal range: '"+t+"'");let c=parseInt(o[0],10)+s,a=parseInt(o[1],10)+s;if(isNaN(c))throw new TypeError("CronPattern: Syntax error, illegal lower range (NaN)");if(isNaN(a))throw new TypeError("CronPattern: Syntax error, illegal upper range (NaN)");if(c>a)throw new TypeError("CronPattern: From value is larger than to value: '"+t+"'");for(let l=c;l<=a;l++)this.setPart(e,l,n[1]||i)}handleStepping(t,e,s,i){let n=this.extractNth(t,e),o=n[0].split("/");if(o.length!==2)throw new TypeError("CronPattern: Syntax error, illegal stepping: '"+t+"'");o[0]===""&&(o[0]="*");let c=0;o[0]!=="*"&&(c=parseInt(o[0],10)+s);let a=parseInt(o[1],10);if(isNaN(a))throw new TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");if(a===0)throw new TypeError("CronPattern: Syntax error, illegal stepping: 0");if(a>this[e].length)throw new TypeError("CronPattern: Syntax error, max steps for part is ("+this[e].length+")");for(let l=c;l<this[e].length;l+=a)this.setPart(e,l,n[1]||i)}replaceAlphaDays(t){return t.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaMonths(t){return t.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(t){let e=t.trim().toLowerCase();return e==="@yearly"||e==="@annually"?"0 0 1 1 *":e==="@monthly"?"0 0 1 * *":e==="@weekly"?"0 0 * * 0":e==="@daily"?"0 0 * * *":e==="@hourly"?"0 * * * *":t}setNthWeekdayOfMonth(t,e){if(typeof e!="number"&&e==="L")this.dayOfWeek[t]=this.dayOfWeek[t]|X;else if(e===B)this.dayOfWeek[t]=B;else if(e<6&&e>0)this.dayOfWeek[t]=this.dayOfWeek[t]|be[e-1];else throw new TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${e}, Type: ${typeof e}`)}},ne=[31,28,31,30,31,30,31,31,30,31,30,31],U=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],M=class De{tz;ms;second;minute;hour;day;month;year;constructor(e,s){if(this.tz=s,e&&e instanceof Date)if(!isNaN(e))this.fromDate(e);else throw new TypeError("CronDate: Invalid date passed to CronDate constructor");else if(e===void 0)this.fromDate(new Date);else if(e&&typeof e=="string")this.fromString(e);else if(e instanceof De)this.fromCronDate(e);else throw new TypeError("CronDate: Invalid type ("+typeof e+") passed to CronDate constructor")}isNthWeekdayOfMonth(e,s,i,n){let o=new Date(Date.UTC(e,s,i)).getUTCDay(),c=0;for(let a=1;a<=i;a++)new Date(Date.UTC(e,s,a)).getUTCDay()===o&&c++;if(n&B&&be[c-1]&n)return!0;if(n&X){let a=new Date(Date.UTC(e,s+1,0)).getUTCDate();for(let l=i+1;l<=a;l++)if(new Date(Date.UTC(e,s,l)).getUTCDay()===o)return!1;return!0}return!1}fromDate(e){if(this.tz!==void 0)if(typeof this.tz=="number")this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else{let s=_.toTZ(e,this.tz);this.ms=e.getMilliseconds(),this.second=s.s,this.minute=s.i,this.hour=s.h,this.day=s.d,this.month=s.m-1,this.year=s.y}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear()}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms}apply(){if(this.month>11||this.day>ne[this.month]||this.hour>59||this.minute>59||this.second>59||this.hour<0||this.minute<0||this.second<0){let e=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}else return!1}fromString(e){if(typeof this.tz=="number"){let s=_.fromTZISO(e);this.ms=s.getUTCMilliseconds(),this.second=s.getUTCSeconds(),this.minute=s.getUTCMinutes(),this.hour=s.getUTCHours(),this.day=s.getUTCDate(),this.month=s.getUTCMonth(),this.year=s.getUTCFullYear(),this.apply()}else return this.fromDate(_.fromTZISO(e,this.tz))}findNext(e,s,i,n){let o=this[s],c;i.lastDayOfMonth&&(this.month!==1?c=ne[this.month]:c=new Date(Date.UTC(this.year,this.month+1,0,0,0,0,0)).getUTCDate());let a=!i.starDOW&&s=="day"?new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay():void 0;for(let l=this[s]+n;l<i[s].length;l++){let f=i[s][l];if(s==="day"&&i.lastDayOfMonth&&l-n==c&&(f=1),s==="day"&&!i.starDOW){let h=i.dayOfWeek[(a+(l-n-1))%7];if(h&&h&B)h=this.isNthWeekdayOfMonth(this.year,this.month,l-n,h)?1:0;else if(h)throw new Error(`CronDate: Invalid value for dayOfWeek encountered. ${h}`);e.legacyMode&&!i.starDOM?f=f||h:f=f&&h}if(f)return this[s]=l-n,o!==this[s]?2:1}return 3}recurse(e,s,i){let n=this.findNext(s,U[i][0],e,U[i][2]);if(n>1){let o=i+1;for(;o<U.length;)this[U[o][0]]=-U[o][2],o++;if(n===3)return this[U[i][1]]++,this[U[i][0]]=-U[i][2],this.apply(),this.recurse(e,s,0);if(this.apply())return this.recurse(e,s,i-1)}return i+=1,i>=U.length?this:this.year>=3e3?null:this.recurse(e,s,i)}increment(e,s,i){return this.second+=s.interval!==void 0&&s.interval>1&&i?s.interval:1,this.ms=0,this.apply(),this.recurse(e,s,0)}getDate(e){return e||this.tz===void 0?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):typeof this.tz=="number"?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):_.fromTZ(_.tp(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}};function xt(t){if(t===void 0&&(t={}),delete t.name,t.legacyMode=t.legacyMode===void 0?!0:t.legacyMode,t.paused=t.paused===void 0?!1:t.paused,t.maxRuns=t.maxRuns===void 0?1/0:t.maxRuns,t.catch=t.catch===void 0?!1:t.catch,t.interval=t.interval===void 0?0:parseInt(t.interval.toString(),10),t.utcOffset=t.utcOffset===void 0?void 0:parseInt(t.utcOffset.toString(),10),t.unref=t.unref===void 0?!1:t.unref,t.startAt&&(t.startAt=new M(t.startAt,t.timezone)),t.stopAt&&(t.stopAt=new M(t.stopAt,t.timezone)),t.interval!==null){if(isNaN(t.interval))throw new Error("CronOptions: Supplied value for interval is not a number");if(t.interval<0)throw new Error("CronOptions: Supplied value for interval can not be negative")}if(t.utcOffset!==void 0){if(isNaN(t.utcOffset))throw new Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(t.utcOffset<-870||t.utcOffset>870)throw new Error("CronOptions: utcOffset out of bounds.");if(t.utcOffset!==void 0&&t.timezone)throw new Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(t.unref!==!0&&t.unref!==!1)throw new Error("CronOptions: Unref should be either true, false or undefined(false).");return t}function V(t){return Object.prototype.toString.call(t)==="[object Function]"||typeof t=="function"||t instanceof Function}function yt(t){return V(t)}function vt(t){typeof Deno<"u"&&typeof Deno.unrefTimer<"u"?Deno.unrefTimer(t):t&&typeof t.unref<"u"&&t.unref()}var oe=30*1e3,Y=[],wt=class{name;options;_states;fn;constructor(t,e,s){let i,n;if(V(e))n=e;else if(typeof e=="object")i=e;else if(e!==void 0)throw new Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(V(s))n=s;else if(typeof s=="object")i=s;else if(s!==void 0)throw new Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=i?.name,this.options=xt(i),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:i?i.maxRuns:void 0,paused:i?i.paused:!1,pattern:new re("* * * * *")},t&&(t instanceof Date||typeof t=="string"&&t.indexOf(":")>0)?this._states.once=new M(t,this.options.timezone||this.options.utcOffset):this._states.pattern=new re(t,this.options.timezone),this.name){if(Y.find(o=>o.name===this.name))throw new Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");Y.push(this)}return n!==void 0&&yt(n)&&(this.fn=n,this.schedule()),this}nextRun(t){let e=this._next(t);return e?e.getDate(!1):null}nextRuns(t,e){this._states.maxRuns!==void 0&&t>this._states.maxRuns&&(t=this._states.maxRuns);let s=[],i=e||this._states.currentRun||void 0;for(;t--&&(i=this.nextRun(i));)s.push(i);return s}getPattern(){return this._states.pattern?this._states.pattern.pattern:void 0}isRunning(){let t=this.nextRun(this._states.currentRun),e=!this._states.paused,s=this.fn!==void 0,i=!this._states.kill;return e&&s&&i&&t!==null}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(t){let e=this._next(t);return e?t instanceof M||t instanceof Date?e.getTime()-t.getTime():e.getTime()-new M(t).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let t=Y.indexOf(this);t>=0&&Y.splice(t,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(t){if(t&&this.fn)throw new Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");t&&(this.fn=t);let e=this.msToNext(),s=this.nextRun(this._states.currentRun);return e==null||isNaN(e)||s===null?this:(e>oe&&(e=oe),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(s),e),this._states.currentTimeout&&this.options.unref&&vt(this._states.currentTimeout),this)}async _trigger(t){if(this._states.blocking=!0,this._states.currentRun=new M(void 0,this.options.timezone||this.options.utcOffset),this.options.catch)try{this.fn!==void 0&&await this.fn(this,this.options.context)}catch(e){V(this.options.catch)&&this.options.catch(e,this)}else this.fn!==void 0&&await this.fn(this,this.options.context);this._states.previousRun=new M(t,this.options.timezone||this.options.utcOffset),this._states.blocking=!1}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(t){let e=new Date,s=!this._states.paused&&e.getTime()>=t.getTime(),i=this._states.blocking&&this.options.protect;s&&!i?(this._states.maxRuns!==void 0&&this._states.maxRuns--,this._trigger()):s&&i&&V(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(t){let e=!!(t||this._states.currentRun),s=!1;!t&&this.options.startAt&&this.options.interval&&([t,e]=this._calculatePreviousRun(t,e),s=!t),t=new M(t,this.options.timezone||this.options.utcOffset),this.options.startAt&&t&&t.getTime()<this.options.startAt.getTime()&&(t=this.options.startAt);let i=this._states.once||new M(t,this.options.timezone||this.options.utcOffset);return!s&&i!==this._states.once&&(i=i.increment(this._states.pattern,this.options,e)),this._states.once&&this._states.once.getTime()<=t.getTime()||i===null||this._states.maxRuns!==void 0&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&i.getTime()>=this.options.stopAt.getTime()?null:i}_calculatePreviousRun(t,e){let s=new M(void 0,this.options.timezone||this.options.utcOffset),i=t;if(this.options.startAt.getTime()<=s.getTime()){i=this.options.startAt;let n=i.getTime()+this.options.interval*1e3;for(;n<=s.getTime();)i=new M(i,this.options.timezone||this.options.utcOffset).increment(this._states.pattern,this.options,!0),n=i.getTime()+this.options.interval*1e3;e=!0}return i===null&&(i=void 0),[i,e]}};const ae=[{label:"Minute",cron:"* * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}];function Tt(t){const e=q.c(44),{automationId:s}=t,i=ue(),[n,o]=E.useState(!1),[c,a]=E.useState("menu"),[l,f]=E.useState(""),[h,y]=E.useState("");let p;if(e[0]===Symbol.for("react.memo_cache_sentinel")){const u=()=>{a("menu"),f(""),y("")};p=R=>{o(R),R||u()},e[0]=p}else p=e[0];const D=p;let w;e[1]!==i||e[2]!==s?(w=async u=>{try{await i.mutateAsync({automation_id:s,type:"cron",cron_expression:u}),k.success("Trigger added"),D(!1)}catch(R){const z=R,$=z instanceof Error?z.message:"Failed to add trigger";k.error($)}},e[1]=i,e[2]=s,e[3]=w):w=e[3];const x=w;let g;e[4]!==h||e[5]!==x?(g=()=>{if(!h.trim()){k.error("Cron expression is required");return}x(h.trim())},e[4]=h,e[5]=x,e[6]=g):g=e[6];const d=g;let v,j,m,T,b,S,O,A,C,P;if(e[7]!==i||e[8]!==h||e[9]!==d||e[10]!==n||e[11]!==l||e[12]!==x||e[13]!==c){const u=[...ae.map(N=>({label:`Every ${N.label}`,action:()=>x(N.cron)})),{label:"Custom (cron)",action:()=>a("custom-cron")}],R=l.trim()?u.filter(N=>N.label.toLowerCase().includes(l.toLowerCase())):null;j=Ke,P=n,m=D,e[24]===Symbol.for("react.memo_cache_sentinel")?(T=r.jsx(Ge,{asChild:!0,children:r.jsxs(L,{variant:"outline",size:"sm",children:[r.jsx(ht,{size:14}),"Add Trigger"]})}),e[24]=T):T=e[24],v=Qe,O="w-[280px] p-0",A="end";let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=r.jsx(ut,{size:14,className:"text-muted-foreground pointer-events-none shrink-0"}),e[25]=z):z=e[25];let $;e[26]===Symbol.for("react.memo_cache_sentinel")?($=N=>f(N.target.value),e[26]=$):$=e[26],e[27]!==l?(C=r.jsx("div",{className:"border-b px-3 py-2",children:r.jsxs("div",{className:"relative flex items-center gap-2",children:[z,r.jsx("input",{type:"text",placeholder:"Search triggers...",value:l,onChange:$,className:"flex-1 text-sm bg-transparent border-0 outline-none placeholder:text-muted-foreground"})]})}),e[27]=l,e[28]=C):C=e[28],b="py-1",S=R?R.length>0?R.map(N=>r.jsx("button",{type:"button",className:"w-full text-left px-3 py-2 text-sm hover:bg-accent cursor-pointer transition-colors",onClick:N.action,disabled:i.isPending,children:N.label},N.label)):r.jsx("div",{className:"px-3 py-4 text-sm text-muted-foreground text-center",children:"No triggers found"}):c==="menu"?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"px-3 py-1.5 text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[r.jsx(lt,{size:12}),"Scheduled"]}),r.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-3 py-2 text-sm hover:bg-accent cursor-pointer transition-colors",onClick:()=>a("every"),children:[r.jsx("span",{children:"Every..."}),r.jsx(at,{size:14,className:"text-muted-foreground"})]}),r.jsx("button",{type:"button",className:"w-full text-left px-3 py-2 text-sm hover:bg-accent cursor-pointer transition-colors",onClick:()=>a("custom-cron"),children:"Custom (cron)"})]}):c==="every"?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",className:"w-full flex items-center gap-1.5 px-3 py-2 text-sm hover:bg-accent cursor-pointer transition-colors text-muted-foreground",onClick:()=>a("menu"),children:[r.jsx(ie,{size:14}),"Back"]}),ae.map(N=>r.jsxs("button",{type:"button",className:"w-full text-left px-3 py-2 text-sm hover:bg-accent cursor-pointer transition-colors",onClick:()=>x(N.cron),disabled:i.isPending,children:["Every ",N.label]},N.cron))]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",className:"w-full flex items-center gap-1.5 px-3 py-2 text-sm hover:bg-accent cursor-pointer transition-colors text-muted-foreground",onClick:()=>a("menu"),children:[r.jsx(ie,{size:14}),"Back"]}),r.jsxs("div",{className:"px-3 py-2 flex flex-col gap-2",children:[r.jsx(J,{value:h,onChange:N=>y(N.target.value),placeholder:"*/5 * * * *",className:"h-8 text-sm"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Minimum interval: 60 seconds between runs."}),r.jsxs(L,{size:"sm",className:"w-full",onClick:d,disabled:i.isPending,children:[i.isPending&&r.jsx(K,{size:14,className:"animate-spin"}),"Add Trigger"]})]})]}),e[7]=i,e[8]=h,e[9]=d,e[10]=n,e[11]=l,e[12]=x,e[13]=c,e[14]=v,e[15]=j,e[16]=m,e[17]=T,e[18]=b,e[19]=S,e[20]=O,e[21]=A,e[22]=C,e[23]=P}else v=e[14],j=e[15],m=e[16],T=e[17],b=e[18],S=e[19],O=e[20],A=e[21],C=e[22],P=e[23];let W;e[29]!==b||e[30]!==S?(W=r.jsx("div",{className:b,children:S}),e[29]=b,e[30]=S,e[31]=W):W=e[31];let I;e[32]!==v||e[33]!==W||e[34]!==O||e[35]!==A||e[36]!==C?(I=r.jsxs(v,{className:O,align:A,children:[C,W]}),e[32]=v,e[33]=W,e[34]=O,e[35]=A,e[36]=C,e[37]=I):I=e[37];let F;return e[38]!==j||e[39]!==m||e[40]!==T||e[41]!==I||e[42]!==P?(F=r.jsxs(j,{open:P,onOpenChange:m,children:[T,I]}),e[38]=j,e[39]=m,e[40]=T,e[41]=I,e[42]=P,e[43]=F):F=e[43],F}function Ct({trigger:t,automationId:e}){const s=$e(),i=ue(),[n,o]=E.useState(!1),[c,a]=E.useState(!1),[l,f]=E.useState(t.cron_expression??""),h=s.isPending||i.isPending,y=async()=>{try{await s.mutateAsync({trigger_id:t.id,automation_id:e}),k.success("Trigger removed")}catch{k.error("Failed to remove trigger")}o(!1)},p=async()=>{const g=l.trim();if(!g){k.error("Cron expression is required");return}if(g===t.cron_expression){a(!1);return}try{await i.mutateAsync({automation_id:e,type:"cron",cron_expression:g}),await s.mutateAsync({trigger_id:t.id,automation_id:e}),k.success("Trigger updated"),a(!1)}catch{k.error("Failed to update trigger")}},D=()=>{f(t.cron_expression??""),a(!1)},w=g=>{g.key==="Enter"&&p(),g.key==="Escape"&&D()},x=t.type==="cron";return r.jsxs(r.Fragment,{children:[r.jsxs(Te,{children:[r.jsx(Z,{children:r.jsx(Ve,{variant:"outline",children:x?"Cron":"Event"})}),r.jsx(Z,{className:"text-muted-foreground font-mono text-xs",children:c?r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(J,{value:l,onChange:g=>f(g.target.value),onKeyDown:w,placeholder:"*/5 * * * *",className:"h-7 text-xs font-mono w-36",autoFocus:!0,disabled:h}),r.jsx(L,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:p,disabled:h,children:h?r.jsx(K,{size:14,className:"animate-spin"}):r.jsx(ot,{size:14,className:"text-green-600"})}),r.jsx(L,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:D,disabled:h,children:r.jsx(dt,{size:14,className:"text-muted-foreground"})})]}):x?t.cron_expression:`${t.event_type} @ ${t.connection_id?.slice(0,8)}...`}),r.jsx(Z,{className:"text-muted-foreground text-xs",children:(()=>{if(!x||!t.cron_expression)return"-";try{const g=new wt(t.cron_expression,{timezone:"UTC"}).nextRun();return g?g.toLocaleString(void 0,{timeZoneName:"short"}):"-"}catch{return"-"}})()}),r.jsx(Z,{children:r.jsxs("div",{className:"flex items-center gap-0.5",children:[x&&!c&&r.jsx(L,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>a(!0),children:r.jsx(ct,{size:14,className:"text-muted-foreground"})}),r.jsx(L,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>o(!0),children:r.jsx(Ce,{size:14,className:"text-muted-foreground"})})]})})]}),r.jsx(we,{open:n,onOpenChange:o,children:r.jsxs(ve,{children:[r.jsxs(me,{children:[r.jsx(fe,{children:"Remove Trigger"}),r.jsx(pe,{children:"Are you sure you want to remove this trigger? For event triggers, it will also be disabled on the connection."})]}),r.jsxs(xe,{children:[r.jsx(ge,{children:"Cancel"}),r.jsx(ye,{onClick:y,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]})})]})}function jt({automationId:t,automation:e}){const s=Fe(),{createTask:i,setVirtualMcpId:n,setSelectedModel:o,setSelectedMode:c,sendMessage:a,credentialId:l,model:f}=je(),[,h]=de(),y=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[p,D]=E.useState(y),[w,x]=E.useState(y),g=E.useRef(!1),d=u=>{D(u),g.current||(g.current=!0,y||x(u))},v=e.models?.credentialId||l||"",j=e.models?.thinking?.id||f?.modelId||"",m=Oe({defaultValues:{name:e.name,active:e.active,agent_id:e.agent?.id??"",credential_id:v,model_id:j}}),T=m.watch("agent_id"),b=m.watch("credential_id"),S=m.watch("model_id"),{models:O,isLoading:A}=Ee(b||void 0),C=O.find(u=>u.modelId===S)??null,P=async()=>{const u=m.getValues();try{const R=u.credential_id&&u.model_id?u.credential_id:"",z=u.credential_id&&u.model_id?u.model_id:"";return await s.mutateAsync({id:t,name:u.name,active:u.active,agent:{id:u.agent_id,mode:"passthrough"},models:{credentialId:R,thinking:{id:z}},messages:mt(p),temperature:0}),m.reset({...u,credential_id:R,model_id:z}),x(p),k.success("Automation saved"),!0}catch{return k.error("Failed to save automation"),!1}},W=()=>{m.reset(),d(w)},I=m.formState.isDirty||JSON.stringify(p??null)!==JSON.stringify(w??null),F=async()=>{if(I&&!await P())return;if(!p){k.error("No message configured for this automation");return}const u=m.getValues();n(u.agent_id||null),c("passthrough"),C&&b&&o({...C,keyId:b}),h(!0),i(),setTimeout(()=>{a(p,{toolApprovalLevel:"yolo"})},0)};return r.jsxs(r.Fragment,{children:[r.jsx(he,{children:r.jsx(Me,{onSave:async()=>{await P()},onUndo:W,isDirty:I,isSaving:s.isPending})}),r.jsxs("div",{className:"flex flex-col gap-6 p-6",children:[r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(J,{...m.register("name"),placeholder:"Automation name",className:"flex-1 max-w-xs"}),r.jsx(Ae,{control:m.control,name:"active",render:({field:u})=>r.jsx(Je,{checked:u.value,onCheckedChange:u.onChange,className:"cursor-pointer"})})]}),r.jsx(ze,{tiptapDoc:p,setTiptapDoc:d,placeholder:"What should this automation do?",children:r.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[r.jsx(Pe,{virtualMcpId:T||null}),r.jsxs("div",{className:"flex items-center justify-between p-2.5",children:[r.jsx("div",{className:"flex items-center gap-1.5 min-w-0 overflow-hidden",children:r.jsx(Ue,{selectedVirtualMcpId:T||null,onVirtualMcpChange:u=>m.setValue("agent_id",u??"",{shouldDirty:!0}),placeholder:"Select Agent"})}),r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Ie,{model:C,isLoading:A,credentialId:b||null,onCredentialChange:u=>{m.setValue("credential_id",u??"",{shouldDirty:!0}),m.setValue("model_id","",{shouldDirty:!0})},onModelChange:u=>m.setValue("model_id",u.modelId,{shouldDirty:!0}),placeholder:"Model"}),r.jsx(L,{type:"button",variant:"default",size:"icon",className:"size-8 rounded-full",onClick:F,title:"Test Automation",children:r.jsx(nt,{size:20})})]})]})]})}),r.jsxs("div",{className:"flex flex-col gap-3 border-t border-border pt-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("h3",{className:"text-sm font-medium",children:"Triggers"}),r.jsx(Tt,{automationId:t})]}),e.triggers.length===0?r.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No triggers configured. Add a cron schedule or event trigger."}):r.jsxs(Xe,{children:[r.jsx(et,{children:r.jsxs(Te,{children:[r.jsx(H,{children:"Type"}),r.jsx(H,{children:"Configuration"}),r.jsx(H,{children:"Next Run"}),r.jsx(H,{className:"w-12"})]})}),r.jsx(tt,{children:e.triggers.map(u=>r.jsx(Ct,{trigger:u,automationId:t},u.id))})]})]}),r.jsxs("div",{className:"flex flex-col gap-3 border-t border-border pt-6",children:[r.jsx("h3",{className:"text-sm font-medium",children:"Run History"}),r.jsx(Dt,{automationId:t,triggerIds:e.triggers.map(u=>u.id)})]})]})]})}function bt(t,e,s){const i=q.c(13);let n;i[0]!==t?(n={connectionId:rt,orgId:t},i[0]=t,i[1]=n):n=i[1];const o=it(n);let c;i[2]!==e||i[3]!==t||i[4]!==s?(c=Q.automationRuns(t,e,s),i[2]=e,i[3]=t,i[4]=s,i[5]=c):c=i[5];let a;i[6]!==o||i[7]!==s?(a=async()=>{if(!o)throw new Error("MCP client not available");const h=await o.callTool({name:"COLLECTION_THREADS_LIST",arguments:{where:{trigger_ids:s},limit:20}});return(h.structuredContent??h).items??[]},i[6]=o,i[7]=s,i[8]=a):a=i[8];const l=s.length>0;let f;return i[9]!==c||i[10]!==a||i[11]!==l?(f={queryKey:c,queryFn:a,enabled:l},i[9]=c,i[10]=a,i[11]=l,i[12]=f):f=i[12],st(f)}function Dt(t){const e=q.c(22),{automationId:s,triggerIds:i}=t,{org:n}=le(),{switchToTask:o}=je(),[,c]=de(),a=ke(),{data:l,isLoading:f}=bt(n.id,s,i),h=i.length>0;let y;e[0]!==s||e[1]!==n.id||e[2]!==a||e[3]!==l||e[4]!==i?(y=d=>{const v=d.subject,j=l??[];j.find(T=>T.id===v)?a.setQueryData(Q.automationRuns(n.id,s,i),j.map(T=>T.id===v?{...T,status:d.data.status,updated_at:new Date().toISOString()}:T)):a.invalidateQueries({queryKey:Q.automationRuns(n.id,s,i)})},e[0]=s,e[1]=n.id,e[2]=a,e[3]=l,e[4]=i,e[5]=y):y=e[5];let p;if(e[6]!==n.id||e[7]!==h||e[8]!==y?(p={orgId:n.id,enabled:h,onTaskStatus:y},e[6]=n.id,e[7]=h,e[8]=y,e[9]=p):p=e[9],pt(p),f){let d;return e[10]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx("div",{className:"flex items-center justify-center py-8",children:r.jsx(K,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=d):d=e[10],d}if(!l||l.length===0){let d;return e[11]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(ce,{title:"No run history",description:"Run history will appear here when the automation has been triggered."}),e[11]=d):d=e[11],d}let D;e[12]!==c||e[13]!==o?(D=async d=>{await o(d),c(!0)},e[12]=c,e[13]=o,e[14]=D):D=e[14];const w=D;let x;if(e[15]!==w||e[16]!==l){let d;e[18]!==w?(d=v=>{const j=te[v.status]??te.completed,m=j.icon;return r.jsxs("button",{type:"button",className:"flex items-center gap-3 px-1 py-2.5 text-left hover:bg-accent/50 transition-colors cursor-pointer rounded-sm",onClick:()=>w(v.id),children:[r.jsx(m,{size:16,className:j.iconClassName}),r.jsx("span",{className:"flex-1 min-w-0 text-sm truncate",children:v.title}),r.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:ft(new Date(v.updated_at),{addSuffix:!0})})]},v.id)},e[18]=w,e[19]=d):d=e[19],x=l.map(d),e[15]=w,e[16]=l,e[17]=x}else x=e[17];let g;return e[20]!==x?(g=r.jsx("div",{className:"flex flex-col divide-y divide-border",children:x}),e[20]=x,e[21]=g):g=e[21],g}function ai(){const t=q.c(36);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{automationId:s}=Ne(e),i=_e(),{org:n}=le(),{data:o,isLoading:c}=We(s),a=Le(),[l,f]=E.useState(!1);let h;t[1]!==s||t[2]!==a||t[3]!==i||t[4]!==n?(h=async()=>{try{await a.mutateAsync(s),k.success("Automation deleted"),i({to:"/$org/$project/automations",params:{org:n.slug,project:ee}})}catch{k.error("Failed to delete automation")}f(!1)},t[1]=s,t[2]=a,t[3]=i,t[4]=n,t[5]=h):h=t[5];const y=h;if(c){let C;return t[6]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx(K,{size:24,className:"animate-spin text-muted-foreground"})}),t[6]=C):C=t[6],C}if(!o){let C;return t[7]===Symbol.for("react.memo_cache_sentinel")?(C=r.jsx(ce,{title:"Automation not found",description:"This automation may have been deleted."}),t[7]=C):C=t[7],C}let p;t[8]!==n.slug?(p=r.jsx(se,{children:r.jsx(Be,{asChild:!0,children:r.jsx(Se,{to:"/$org/$project/automations",params:{org:n.slug,project:ee},children:"Automations"})})}),t[8]=n.slug,t[9]=p):p=t[9];let D;t[10]===Symbol.for("react.memo_cache_sentinel")?(D=r.jsx(Ze,{}),t[10]=D):D=t[10];let w;t[11]!==o.name?(w=r.jsx(se,{children:r.jsx(He,{children:o.name})}),t[11]=o.name,t[12]=w):w=t[12];let x;t[13]!==p||t[14]!==w?(x=r.jsx(Ye,{children:r.jsxs(qe,{children:[p,D,w]})}),t[13]=p,t[14]=w,t[15]=x):x=t[15];const g=x;let d;t[16]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(he,{children:r.jsxs(L,{variant:"ghost",size:"sm",className:"h-7 text-destructive hover:text-destructive",onClick:()=>f(!0),children:[r.jsx(Ce,{size:14}),"Delete"]})}),t[16]=d):d=t[16];let v;t[17]!==o||t[18]!==s?(v=r.jsx(jt,{automationId:s,automation:o},s),t[17]=o,t[18]=s,t[19]=v):v=t[19];let j;t[20]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(fe,{children:"Delete Automation"}),t[20]=j):j=t[20];let m;t[21]!==o.name?(m=r.jsxs(me,{children:[j,r.jsxs(pe,{children:['Are you sure you want to delete "',o.name,'"? This action cannot be undone.']})]}),t[21]=o.name,t[22]=m):m=t[22];let T;t[23]===Symbol.for("react.memo_cache_sentinel")?(T=r.jsx(ge,{children:"Cancel"}),t[23]=T):T=t[23];let b;t[24]!==y?(b=r.jsxs(xe,{children:[T,r.jsx(ye,{onClick:y,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[24]=y,t[25]=b):b=t[25];let S;t[26]!==b||t[27]!==m?(S=r.jsxs(ve,{children:[m,b]}),t[26]=b,t[27]=m,t[28]=S):S=t[28];let O;t[29]!==l||t[30]!==S?(O=r.jsx(we,{open:l,onOpenChange:f,children:S}),t[29]=l,t[30]=S,t[31]=O):O=t[31];let A;return t[32]!==g||t[33]!==O||t[34]!==v?(A=r.jsxs(Re,{breadcrumb:g,children:[d,v,O]}),t[32]=g,t[33]=O,t[34]=v,t[35]=A):A=t[35],A}export{ai as default};
@@ -1 +1 @@
1
- import{e as y,u as D,r as T,O as c,j as e,B as d,w as m}from"./index-EJhirEgi.js";import{E as P}from"./empty-state-Dz90tIjg.js";import{P as a}from"./index-wbJeckpV.js";import{u as B,a as w,b as z}from"./use-automations-3lm8AX10.js";import{U as I}from"./user-CmrAywRT.js";import{f as k,a as $,b as H,c as E,d as L,e as R,A as S,h as _}from"./alert-dialog-CpiIzpaw.js";import{B as O}from"./badge-BiElTurh.js";import{B as F,a as M,b as U,c as G}from"./breadcrumb-U9pZLesK.js";import{e as J,a as q,b as g,T as r,d as K,c as i}from"./table-Bs6V2h_N.js";import{i as u}from"./Loading01-BUlApwyE.js";import{s as p}from"./Plus-CiuqWk7L.js";import{s as Q}from"./Trash01-CHv5mU8b.js";import"./localstorage-keys-CyCsfmz2.js";import"./useQuery-mGiR1oLn.js";import"./useMutation-ClueFvpj.js";import"./tooltip-BXI94UP3.js";import"./index-Dv4huKa6.js";import"./constants-BtZ3fAEQ.js";import"./avatar-CbDE9O_w.js";import"./ChevronRight-DNq10e3Z.js";function je(){const x=y(),{org:f,locator:A}=D(),{data:n,isLoading:b}=B(),t=w(),v=z(),[o,l]=T.useState(null),h=A.split("/")[0]??f.slug??c,j=async()=>{try{const s=await t.mutateAsync({name:"New Automation",agent:{id:"",mode:"passthrough"},messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0});x({to:"/$org/$project/automations/$automationId",params:{org:h,project:c,automationId:s.id}})}catch{m.error("Failed to create automation")}},C=async()=>{if(o)try{await v.mutateAsync(o.id),m.success("Automation deleted")}catch{m.error("Failed to delete automation")}finally{l(null)}};return e.jsxs(a,{children:[e.jsxs(a.Header,{children:[e.jsx(a.Header.Left,{children:e.jsx(F,{children:e.jsx(M,{children:e.jsx(U,{children:e.jsx(G,{children:"Automations"})})})})}),e.jsx(a.Header.Right,{children:e.jsxs(d,{size:"sm",onClick:j,disabled:t.isPending,children:[t.isPending?e.jsx(u,{size:14,className:"animate-spin"}):e.jsx(p,{size:14}),"Create Automation"]})})]}),e.jsxs(a.Content,{children:[b?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(u,{size:24,className:"animate-spin text-muted-foreground"})}):!n||n.length===0?e.jsx("div",{className:"flex items-center h-full",children:e.jsx(P,{title:"No automations yet",description:"Automations run tasks on a schedule or in response to events.",actions:e.jsxs(d,{size:"sm",onClick:j,disabled:t.isPending,children:[t.isPending?e.jsx(u,{size:14,className:"animate-spin"}):e.jsx(p,{size:14}),"Create Automation"]})})}):e.jsx("div",{className:"p-4",children:e.jsxs(J,{children:[e.jsx(q,{children:e.jsxs(g,{children:[e.jsx(r,{children:"Name"}),e.jsx(r,{children:"Status"}),e.jsx(r,{children:"Triggers"}),e.jsx(r,{children:"Created by"}),e.jsx(r,{className:"w-12"})]})}),e.jsx(K,{children:n.map(s=>e.jsxs(g,{className:"cursor-pointer",onClick:()=>x({to:"/$org/$project/automations/$automationId",params:{org:h,project:c,automationId:s.id}}),children:[e.jsx(i,{className:"font-medium",children:s.name}),e.jsx(i,{children:e.jsx(O,{variant:s.active?"default":"secondary",children:s.active?"Active":"Inactive"})}),e.jsx(i,{className:"text-muted-foreground",children:s.trigger_count}),e.jsx(i,{children:e.jsx(I,{id:s.created_by})}),e.jsx(i,{children:e.jsx(d,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:N=>{N.stopPropagation(),l({id:s.id,name:s.name})},children:e.jsx(Q,{size:14,className:"text-muted-foreground"})})})]},s.id))})]})}),e.jsx(k,{open:!!o,onOpenChange:s=>!s&&l(null),children:e.jsxs($,{children:[e.jsxs(H,{children:[e.jsx(E,{children:"Delete Automation"}),e.jsxs(L,{children:['Are you sure you want to delete "',o?.name,'"? This action cannot be undone. All triggers will be removed.']})]}),e.jsxs(R,{children:[e.jsx(S,{children:"Cancel"}),e.jsx(_,{onClick:C,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})})]})]})}export{je as default};
1
+ import{e as y,u as D,r as T,O as c,j as e,B as d,w as m}from"./index-BwxEZIQr.js";import{E as P}from"./empty-state-VXOPlUbP.js";import{P as a}from"./index-DIpn2laL.js";import{u as B,a as w,b as z}from"./use-automations-qsid-9wy.js";import{U as I}from"./user-Ye6g7e7k.js";import{f as k,a as $,b as H,c as E,d as L,e as R,A as S,h as _}from"./alert-dialog-BP-z4Ogy.js";import{B as O}from"./badge-CDP8kbvH.js";import{B as F,a as M,b as U,c as G}from"./breadcrumb-jhLLcaSq.js";import{e as J,a as q,b as g,T as r,d as K,c as i}from"./table-BqV5DzoG.js";import{i as u}from"./Loading01-CmbgGBJZ.js";import{s as p}from"./Plus-BYkvGXiG.js";import{s as Q}from"./Trash01-Cw6VFCl2.js";import"./use-local-storage-CI_WEqce.js";import"./useQuery-BMWtXZn8.js";import"./useMutation-xr8MgEC0.js";import"./tooltip-aT8SYWF_.js";import"./index-DzqmGhb3.js";import"./constants-CzDvwmSY.js";import"./avatar-BCqIRh9w.js";import"./ChevronRight-ACRFNNEg.js";function je(){const x=y(),{org:f,locator:A}=D(),{data:n,isLoading:b}=B(),t=w(),v=z(),[o,l]=T.useState(null),h=A.split("/")[0]??f.slug??c,j=async()=>{try{const s=await t.mutateAsync({name:"New Automation",agent:{id:"",mode:"passthrough"},messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0});x({to:"/$org/$project/automations/$automationId",params:{org:h,project:c,automationId:s.id}})}catch{m.error("Failed to create automation")}},C=async()=>{if(o)try{await v.mutateAsync(o.id),m.success("Automation deleted")}catch{m.error("Failed to delete automation")}finally{l(null)}};return e.jsxs(a,{children:[e.jsxs(a.Header,{children:[e.jsx(a.Header.Left,{children:e.jsx(F,{children:e.jsx(M,{children:e.jsx(U,{children:e.jsx(G,{children:"Automations"})})})})}),e.jsx(a.Header.Right,{children:e.jsxs(d,{size:"sm",onClick:j,disabled:t.isPending,children:[t.isPending?e.jsx(u,{size:14,className:"animate-spin"}):e.jsx(p,{size:14}),"Create Automation"]})})]}),e.jsxs(a.Content,{children:[b?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsx(u,{size:24,className:"animate-spin text-muted-foreground"})}):!n||n.length===0?e.jsx("div",{className:"flex items-center h-full",children:e.jsx(P,{title:"No automations yet",description:"Automations run tasks on a schedule or in response to events.",actions:e.jsxs(d,{size:"sm",onClick:j,disabled:t.isPending,children:[t.isPending?e.jsx(u,{size:14,className:"animate-spin"}):e.jsx(p,{size:14}),"Create Automation"]})})}):e.jsx("div",{className:"p-4",children:e.jsxs(J,{children:[e.jsx(q,{children:e.jsxs(g,{children:[e.jsx(r,{children:"Name"}),e.jsx(r,{children:"Status"}),e.jsx(r,{children:"Triggers"}),e.jsx(r,{children:"Created by"}),e.jsx(r,{className:"w-12"})]})}),e.jsx(K,{children:n.map(s=>e.jsxs(g,{className:"cursor-pointer",onClick:()=>x({to:"/$org/$project/automations/$automationId",params:{org:h,project:c,automationId:s.id}}),children:[e.jsx(i,{className:"font-medium",children:s.name}),e.jsx(i,{children:e.jsx(O,{variant:s.active?"default":"secondary",children:s.active?"Active":"Inactive"})}),e.jsx(i,{className:"text-muted-foreground",children:s.trigger_count}),e.jsx(i,{children:e.jsx(I,{id:s.created_by})}),e.jsx(i,{children:e.jsx(d,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:N=>{N.stopPropagation(),l({id:s.id,name:s.name})},children:e.jsx(Q,{size:14,className:"text-muted-foreground"})})})]},s.id))})]})}),e.jsx(k,{open:!!o,onOpenChange:s=>!s&&l(null),children:e.jsxs($,{children:[e.jsxs(H,{children:[e.jsx(E,{children:"Delete Automation"}),e.jsxs(L,{children:['Are you sure you want to delete "',o?.name,'"? This action cannot be undone. All triggers will be removed.']})]}),e.jsxs(R,{children:[e.jsx(S,{children:"Cancel"}),e.jsx(_,{onClick:C,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})})]})]})}export{je as default};
@@ -1 +1 @@
1
- import{r as R,c as j,j as i,z as m,M as V,aT as M,aU as $,aV as L}from"./index-EJhirEgi.js";const I=({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"}));I.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=m("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(L,{"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=m("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(M,{"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=m("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 U=V("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] 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=V("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),Z=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 G(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,[f,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=m(U({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]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(I,{size:Z(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(D({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(W,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,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 H(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,f=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]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,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]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(U({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
1
+ import{r as R,c as j,j as i,z as m,R as V,aT as $,aU as L,aV as M}from"./index-BwxEZIQr.js";const I=({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"}));I.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=m("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=m("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($,{"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=m("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(L,{"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 U=V("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] 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=V("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),Z=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 G(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,[f,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=m(U({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]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(I,{size:Z(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(D({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(W,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,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 H(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,f=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]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,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]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(U({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
@@ -1 +1 @@
1
- import{c as d,z as u,j as l,H as v,M as g}from"./index-EJhirEgi.js";const b=g("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 x(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)?v:"span";let i;e[5]!==r||e[6]!==t?(i=u(b({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=l.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{x as B};
1
+ import{c as d,z as u,j as l,H as v,R as g}from"./index-BwxEZIQr.js";const b=g("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 x(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)?v:"span";let i;e[5]!==r||e[6]!==t?(i=u(b({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=l.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{x as B};
@@ -1 +1 @@
1
- import"./index-EJhirEgi.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-BwxEZIQr.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,z as m,j as o,H as u}from"./index-EJhirEgi.js";import{i as d}from"./ChevronRight-DNq10e3Z.js";function b(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=o.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 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("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=o.jsx("ol",{"data-slot":"breadcrumb-list",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("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=o.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(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?u:"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 n;return e[6]!==l||e[7]!==s||e[8]!==i?(n=o.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=n):n=e[9],n}function j(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-medium truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.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 h(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??o.jsx(d,{}),e[6]=a,e[7]=i):i=e[7];let n;return e[8]!==s||e[9]!==l||e[10]!==i?(n=o.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]=n):n=e[11],n}export{b as B,x as a,N as b,j as c,g as d,h as e};
1
+ import{c,z as m,j as o,H as u}from"./index-BwxEZIQr.js";import{i as d}from"./ChevronRight-ACRFNNEg.js";function b(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=o.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 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("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=o.jsx("ol",{"data-slot":"breadcrumb-list",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("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=o.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(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?u:"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 n;return e[6]!==l||e[7]!==s||e[8]!==i?(n=o.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=n):n=e[9],n}function j(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-medium truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.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 h(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??o.jsx(d,{}),e[6]=a,e[7]=i):i=e[7];let n;return e[8]!==s||e[9]!==l||e[10]!==i?(n=o.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]=n):n=e[11],n}export{b as B,x as a,N as b,j as c,g as d,h as e};
@@ -1 +1 @@
1
- import{c as o,z as d,j as c}from"./index-EJhirEgi.js";function n(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75 shadow-xs",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{n as C,m as a,p as b,u as c,f as d};
1
+ import{c as o,z as d,j as c}from"./index-BwxEZIQr.js";function n(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75 shadow-xs",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{n as C,m as a,p as b,u as c,f as d};