@decocms/mesh 2.113.1 → 2.114.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/client/assets/{AlertCircle-bZ_a8hW_.js → AlertCircle-FL98lGLa.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-g_tWXJrL.js → AlertOctagon-B33KdaLi.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-CGGjQU9b.js → AlertTriangle-DteHmOG1.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-BbVcfdiE.js → ArrowLeft-CMuGBwkE.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BtMmVpE7.js → ArrowUp-xougxkbC.js} +1 -1
  6. package/dist/client/assets/{Check-E8-Inf76.js → Check-BY-DCpO_.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DfWHy2te.js → CheckCircle-CpXx2avT.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-DpB-5lWR.js → CheckDone01-DJLuFHxJ.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-Bxyg9cYG.js → CheckVerified02-Cqu-AawR.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-CtTw1zlt.js → ChevronDown-FdgQzkaa.js} +1 -1
  11. package/dist/client/assets/{ChevronRight-Cj97ppFv.js → ChevronRight-DYxU3E_q.js} +1 -1
  12. package/dist/client/assets/{Clock-ElxTVbMS.js → Clock-Drw10Mc_.js} +1 -1
  13. package/dist/client/assets/{Code01-F0FnnpDN.js → Code01-CowHxp14.js} +1 -1
  14. package/dist/client/assets/{Container-8z-xyt04.js → Container-B7qKC3EI.js} +1 -1
  15. package/dist/client/assets/{Copy01-DKHGVRMd.js → Copy01-B_7d0dwb.js} +1 -1
  16. package/dist/client/assets/{Dataflow03-DItczzaI.js → Dataflow03-Cf4yDkKR.js} +1 -1
  17. package/dist/client/assets/{DotsHorizontal-CzG-G9QT.js → DotsHorizontal-CqtaWGEh.js} +1 -1
  18. package/dist/client/assets/{DotsVertical-IiJAY3kM.js → DotsVertical-qEJ2g9HJ.js} +1 -1
  19. package/dist/client/assets/{Download01-DnJPBc-y.js → Download01-IPqVm26W.js} +1 -1
  20. package/dist/client/assets/{Edit01-CSgI_vqG.js → Edit01-CUcmwNxC.js} +1 -1
  21. package/dist/client/assets/{Eye-DPrkOx1m.js → Eye-Rq15dwoo.js} +1 -1
  22. package/dist/client/assets/{File02-CwSZ_YSq.js → File02-DPSlzBxh.js} +1 -1
  23. package/dist/client/assets/{File06-DYvRHz1R.js → File06-xsY7vCFb.js} +1 -1
  24. package/dist/client/assets/{FilterLines-DwLmRqdf.js → FilterLines-CJgE2bmA.js} +1 -1
  25. package/dist/client/assets/{Globe01-kIBQPFuR.js → Globe01-BuKzbzrx.js} +1 -1
  26. package/dist/client/assets/{Globe02-DEZv7rrz.js → Globe02-BIRPCTiD.js} +1 -1
  27. package/dist/client/assets/{Grid01-xeO6ixb6.js → Grid01-CcUd9dpu.js} +1 -1
  28. package/dist/client/assets/{Hash02-BUvQoWvM.js → Hash02-BAkYwsUS.js} +1 -1
  29. package/dist/client/assets/{Home02-3_wGODLc.js → Home02-CyX62jfB.js} +1 -1
  30. package/dist/client/assets/{Image01-BkoRO_9d.js → Image01-CiGMIZf1.js} +1 -1
  31. package/dist/client/assets/{Inbox01-CHcPs9mB.js → Inbox01-CxlDy_Yy.js} +1 -1
  32. package/dist/client/assets/{InfoCircle-FWPoCdrs.js → InfoCircle-BBQwzN3e.js} +1 -1
  33. package/dist/client/assets/{Key01-vyx6BDY8.js → Key01-CcfhRF0P.js} +1 -1
  34. package/dist/client/assets/{LinkExternal01-Ch5ScwlH.js → LinkExternal01-CHfE9mil.js} +1 -1
  35. package/dist/client/assets/{List-CEuiHx2u.js → List-BkcTlONj.js} +1 -1
  36. package/dist/client/assets/{Loading01-Du9ChcBO.js → Loading01-CWwskqmx.js} +1 -1
  37. package/dist/client/assets/{Lock01-BmNrik2P.js → Lock01-C-e30A69.js} +1 -1
  38. package/dist/client/assets/{Pin01-NetFNrEd.js → Pin01-DNrhTTs3.js} +1 -1
  39. package/dist/client/assets/{Play-BP_59zaK.js → Play-sMJsBLST.js} +1 -1
  40. package/dist/client/assets/{Plus-hJGQuZKS.js → Plus-7gpDbhJy.js} +1 -1
  41. package/dist/client/assets/{RefreshCcw01-OjrTubY1.js → RefreshCcw01-BzY8N8T3.js} +1 -1
  42. package/dist/client/assets/{RefreshCw01-Be9PrKJk.js → RefreshCw01-dI5kYugT.js} +1 -1
  43. package/dist/client/assets/{Save01-DiDeFwU2.js → Save01-C9jVAZgo.js} +1 -1
  44. package/dist/client/assets/{SearchMd-B9pv8N9E.js → SearchMd-BMO4jqwv.js} +1 -1
  45. package/dist/client/assets/{Settings01-BPkeey3w.js → Settings01-CRoxTuTO.js} +1 -1
  46. package/dist/client/assets/{Share07-Ii045gzD.js → Share07-DFdDYoqj.js} +1 -1
  47. package/dist/client/assets/Shield01-DymehiLu.js +1 -0
  48. package/dist/client/assets/{Terminal-BGTg6hg-.js → Terminal-zi42zfXM.js} +1 -1
  49. package/dist/client/assets/{Tool01-DbSgV9fI.js → Tool01-lC4M_AmN.js} +1 -1
  50. package/dist/client/assets/{Trash01-DT85aU53.js → Trash01-BKhksYCP.js} +1 -1
  51. package/dist/client/assets/{Upload01-Cr9JNoRV.js → Upload01-CorstXj2.js} +1 -1
  52. package/dist/client/assets/{Users03-IogkUnji.js → Users03-B6oew679.js} +1 -1
  53. package/dist/client/assets/{XCircle-B8PCL4R4.js → XCircle-WTPrrNWD.js} +1 -1
  54. package/dist/client/assets/{XClose-BtHqnElt.js → XClose-DoKE29TG.js} +1 -1
  55. package/dist/client/assets/{agent-connections-preview-BbTjonVz.js → agent-connections-preview-DybZ18X5.js} +1 -1
  56. package/dist/client/assets/agent-detail-DncXhd81.js +1 -0
  57. package/dist/client/assets/agents-D-4jcSt1.js +1 -0
  58. package/dist/client/assets/{alert-dialog-5IiN8bI8.js → alert-dialog-Dm7Md3Yk.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-Bsz8qard.js → auth-catchall-DHQTu60x.js} +1 -1
  60. package/dist/client/assets/avatar-B-mPVtLH.js +1 -0
  61. package/dist/client/assets/{badge-DGPPcvVD.js → badge-Bt6C7wEJ.js} +1 -1
  62. package/dist/client/assets/{binder-BXFbhA2G.js → binder-BvXUsKRF.js} +1 -1
  63. package/dist/client/assets/breadcrumb-Cipoy1eR.js +1 -0
  64. package/dist/client/assets/button-Bl7hMmCe.js +1 -0
  65. package/dist/client/assets/card-BMQBEGUR.js +1 -0
  66. package/dist/client/assets/{checkbox-C2Pc1VwJ.js → checkbox-C-nrBu1T.js} +1 -1
  67. package/dist/client/assets/{circle-alert-B5cVsMTM.js → circle-alert-DYoRV5F7.js} +1 -1
  68. package/dist/client/assets/{collection-detail-BWciJVNY.js → collection-detail-x0pDfnG2.js} +3 -3
  69. package/dist/client/assets/{collection-tab-CiiXwxHW.js → collection-tab-CMJJpUjs.js} +1 -1
  70. package/dist/client/assets/{collection-table-wrapper-D8mRH9XX.js → collection-table-wrapper-DS44ibQ8.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-fLdn4E8h.js → collection-tabs-Dyc14WST.js} +1 -1
  72. package/dist/client/assets/{command-CeYHWZzE.js → command-DGGP5Edh.js} +1 -1
  73. package/dist/client/assets/{connect-BdOXcl_Y.js → connect-BqPwKrDp.js} +1 -1
  74. package/dist/client/assets/{connection-card-BcrKHNoi.js → connection-card-B_yTVrCB.js} +1 -1
  75. package/dist/client/assets/connection-detail-BHwcydrH.js +1 -0
  76. package/dist/client/assets/connections-C2FniOCy.js +1 -0
  77. package/dist/client/assets/constants-B9b2QjkO.js +1 -0
  78. package/dist/client/assets/{constants-BHcnwzXS.js → constants-DY_BU6PR.js} +1 -1
  79. package/dist/client/assets/{create-organization-dialog-DIppco5e.js → create-organization-dialog-BmtVHISe.js} +1 -1
  80. package/dist/client/assets/{create-project-dialog-Dg334vRx.js → create-project-dialog-DFYOBIMM.js} +1 -1
  81. package/dist/client/assets/dialog-BTs7spED.js +1 -0
  82. package/dist/client/assets/{dropdown-menu-D5LbTa4P.js → dropdown-menu-Dk3PdiLq.js} +1 -1
  83. package/dist/client/assets/dynamic-plugin-layout-C8tDNw7E.js +1 -0
  84. package/dist/client/assets/empty-state-BrrA9jzc.js +1 -0
  85. package/dist/client/assets/{empty-state-BvzVGw0j.js → empty-state-yzpNvfA-.js} +1 -1
  86. package/dist/client/assets/{env-vars-editor-DPP2Mrhu.js → env-vars-editor-CxFtbjNH.js} +1 -1
  87. package/dist/client/assets/{error-boundary-B0-C3nR-.js → error-boundary-GB3TovJQ.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-C_PlCvXj.js → extract-connection-data-Cjm6QMzJ.js} +1 -1
  89. package/dist/client/assets/{file-browser-D6eYzF31.js → file-browser-CeBgj9Bh.js} +2 -2
  90. package/dist/client/assets/{form-BoeJzVfE.js → form-Dxe8J4dP.js} +1 -1
  91. package/dist/client/assets/{grid-view-Cqpn4831.js → grid-view-qfkYjNIX.js} +1 -1
  92. package/dist/client/assets/{home-DtTiTJHY.js → home-C39nGjR7.js} +1 -1
  93. package/dist/client/assets/index-48TFsA2Q.css +1 -0
  94. package/dist/client/assets/{index-DNGgnz4O.js → index-B2KxLjHq.js} +1 -1
  95. package/dist/client/assets/{index-CK46yvDU.js → index-BOlMuTYA.js} +6 -6
  96. package/dist/client/assets/index-BrH9wXxf.js +1 -0
  97. package/dist/client/assets/{index-CkziH66W.js → index-BuPkfOh7.js} +1 -1
  98. package/dist/client/assets/{index-B8FAEn0C.js → index-CLUeNS9F.js} +1 -1
  99. package/dist/client/assets/{index-Dg7j7nF8.js → index-CSf23Q8F.js} +5 -5
  100. package/dist/client/assets/index-CzSiUwwv.js +218 -0
  101. package/dist/client/assets/{index-CqJghtvI.js → index-DVHOzh7f.js} +1 -1
  102. package/dist/client/assets/{index-BDio7_0T.js → index-Dps5khDb.js} +1 -1
  103. package/dist/client/assets/{infiniteQueryObserver-DTtSISl9.js → infiniteQueryObserver-Ctmp4byY.js} +1 -1
  104. package/dist/client/assets/{input-BdH38qw4.js → input-CAPxG1rh.js} +1 -1
  105. package/dist/client/assets/{integration-icon-Bw_I-XAE.js → integration-icon-jbm4PmZt.js} +1 -1
  106. package/dist/client/assets/{label-Bl-YFbel.js → label-A7ibpcPd.js} +1 -1
  107. package/dist/client/assets/{layout-aRIgHMvp.js → layout-DHncYg0M.js} +1 -1
  108. package/dist/client/assets/{localstorage-keys-BX9jvEU1.js → localstorage-keys-Cc9e53sU.js} +1 -1
  109. package/dist/client/assets/{login-BSw2WJHG.js → login-C4VFa6jD.js} +1 -1
  110. package/dist/client/assets/{markdown-CzkeFZ5X.js → markdown-DTO-ngpn.js} +1 -1
  111. package/dist/client/assets/{mcp-oauth-DqRfTp6V.js → mcp-oauth-lMxJpMMH.js} +1 -1
  112. package/dist/client/assets/{mcp-server-card-B9T5TAk8.js → mcp-server-card-C-sPhXVX.js} +1 -1
  113. package/dist/client/assets/mcp-server-detail-BtO9BwQ6.js +2 -0
  114. package/dist/client/assets/members-Dh31vMll.js +3 -0
  115. package/dist/client/assets/{monitoring-CvktJ_La.js → monitoring-D0DgTEcy.js} +1 -1
  116. package/dist/client/assets/monitoring-dashboard-edit-DCcFalwQ.js +1 -0
  117. package/dist/client/assets/{monitoring-dashboard-view-D5o2th_e.js → monitoring-dashboard-view-CuFcYaD_.js} +1 -1
  118. package/dist/client/assets/{oauth-callback-Cwqn_YCy.js → oauth-callback-DKWROL5U.js} +1 -1
  119. package/dist/client/assets/{page-CoUcimRv.js → page-BpCfHp43.js} +1 -1
  120. package/dist/client/assets/page-CoIEp87I.js +1 -0
  121. package/dist/client/assets/{plugin-empty-state-FJt7wPXr.js → plugin-empty-state-DMdw5AKa.js} +1 -1
  122. package/dist/client/assets/{plugin-empty-state-RlHFcXiB.js → plugin-empty-state-DfPCNHNV.js} +1 -1
  123. package/dist/client/assets/{plugin-header-CfI3xE0K.js → plugin-header-CVaBr8-j.js} +1 -1
  124. package/dist/client/assets/{plugin-header-CrQ7aOX2.js → plugin-header-DqwJE7vc.js} +1 -1
  125. package/dist/client/assets/{popover-mZJnuJjI.js → popover-Ca9Cyzf7.js} +1 -1
  126. package/dist/client/assets/{project-layout-DotJsvl2.js → project-layout-F2YJOnzp.js} +1 -1
  127. package/dist/client/assets/project-settings-DwtLH_vq.js +1 -0
  128. package/dist/client/assets/projects-list-DPMlGsBe.js +1 -0
  129. package/dist/client/assets/{readme-viewer-Czlw9OLy.js → readme-viewer-D5RieYNW.js} +1 -1
  130. package/dist/client/assets/{registry-layout-DKEyfF0q.js → registry-layout-BrhYm9Dr.js} +2 -2
  131. package/dist/client/assets/{registry-utils-CX7yxjy_.js → registry-utils--fif7P3x.js} +1 -1
  132. package/dist/client/assets/{reports-layout-B_ULsOiV.js → reports-layout-9yNTvI9o.js} +1 -1
  133. package/dist/client/assets/{reset-password-Cdnxjg8n.js → reset-password-FRWYt8ap.js} +1 -1
  134. package/dist/client/assets/{resizable-DfITuo54.js → resizable-DKtpdeB3.js} +1 -1
  135. package/dist/client/assets/{save-actions-ChqbuLbD.js → save-actions-DH-J_-0b.js} +1 -1
  136. package/dist/client/assets/{scroll-area-C8UIsNZT.js → scroll-area-BfJ2ZkbI.js} +1 -1
  137. package/dist/client/assets/{select-CixKYbFw.js → select-CKDoCTJO.js} +1 -1
  138. package/dist/client/assets/shell-layout-DkuDKL8p.js +3 -0
  139. package/dist/client/assets/{spinner-BMxXfTiG.js → spinner-B-FWJ8nx.js} +1 -1
  140. package/dist/client/assets/{store-invite-BxswfJKl.js → store-invite-1HxdtnDC.js} +1 -1
  141. package/dist/client/assets/{switch-B_EwtGD2.js → switch-ySGmS6Zx.js} +1 -1
  142. package/dist/client/assets/{table-C5Cvp27H.js → table-DGDNn7mH.js} +1 -1
  143. package/dist/client/assets/tasks-BuxJd7k9.js +1 -0
  144. package/dist/client/assets/{textarea-Bosg8LSF.js → textarea-COGwSIgK.js} +1 -1
  145. package/dist/client/assets/{time-range-picker-DqbTNWJO.js → time-range-picker-hBuoR0m0.js} +1 -1
  146. package/dist/client/assets/{toggle-group-C9vSpu1B.js → toggle-group-RO8j2kDd.js} +1 -1
  147. package/dist/client/assets/{tools-list-m2LGQ8uO.js → tools-list-CBpacE22.js} +1 -1
  148. package/dist/client/assets/tooltip-CLbmwjfd.js +1 -0
  149. package/dist/client/assets/topbar-portal-BHxVS8Tl.js +1 -0
  150. package/dist/client/assets/typewriter-title-C4OcGX3b.js +16 -0
  151. package/dist/client/assets/{use-binding-op5oWkHb.js → use-binding-D36c91MK.js} +1 -1
  152. package/dist/client/assets/{use-connection-DD4p_Qxm.js → use-connection-CdIwTzRh.js} +1 -1
  153. package/dist/client/assets/{use-copy-QNK64gRO.js → use-copy-BZqI2HfR.js} +1 -1
  154. package/dist/client/assets/{use-create-virtual-mcp-DTZkMOkn.js → use-create-virtual-mcp-DKrayFIg.js} +1 -1
  155. package/dist/client/assets/{use-deco-chat-open-D2iAkBUE.js → use-deco-chat-open-BuMsTBnv.js} +3 -3
  156. package/dist/client/assets/{use-install-from-registry-BzBNvPLt.js → use-install-from-registry-kn39eg4d.js} +1 -1
  157. package/dist/client/assets/{use-list-state-58FQ5_m7.js → use-list-state-CYucxtoX.js} +1 -1
  158. package/dist/client/assets/{use-llm-Dxppw3BS.js → use-llm-CX9QGbjZ.js} +1 -1
  159. package/dist/client/assets/{use-mcp-prompts-Cugr7S4A.js → use-mcp-prompts-DMC1gnwj.js} +1 -1
  160. package/dist/client/assets/{use-mcp-tools-DAXcjOXG.js → use-mcp-tools-SZ1hgrkZ.js} +1 -1
  161. package/dist/client/assets/{use-organization-settings-CMbhnXrw.js → use-organization-settings-1mU06z41.js} +1 -1
  162. package/dist/client/assets/{use-project-22jTFib5.js → use-project-CsuhSK50.js} +1 -1
  163. package/dist/client/assets/use-view-mode-CVN4cPaD.js +1 -0
  164. package/dist/client/assets/{use-virtual-mcp-CSTx0yIN.js → use-virtual-mcp-CqdRLJoL.js} +1 -1
  165. package/dist/client/assets/useInfiniteQuery-Bd_PpC7_.js +1 -0
  166. package/dist/client/assets/{useMutation-CeUP6TdZ.js → useMutation-BYl8vvsl.js} +1 -1
  167. package/dist/client/assets/useQuery-CTct6gOY.js +1 -0
  168. package/dist/client/assets/useSuspenseInfiniteQuery-DJZPFUMY.js +1 -0
  169. package/dist/client/assets/workflow-CMJomw9A.js +1 -0
  170. package/dist/client/index.html +2 -2
  171. package/dist/server/cli.js +3 -3
  172. package/dist/server/migrate.js +3 -3
  173. package/dist/server/server.js +3 -3
  174. package/package.json +1 -1
  175. package/dist/client/assets/Settings02-Pk4hmkwR.js +0 -1
  176. package/dist/client/assets/X-zQXau9tc.js +0 -1
  177. package/dist/client/assets/agent-detail-Ft0AbV0R.js +0 -1
  178. package/dist/client/assets/agents-DyJp-v0r.js +0 -1
  179. package/dist/client/assets/avatar-A9KYWJyz.js +0 -1
  180. package/dist/client/assets/breadcrumb-KvFHoKN7.js +0 -1
  181. package/dist/client/assets/button-CcxsPygM.js +0 -1
  182. package/dist/client/assets/card-k6wylZpL.js +0 -1
  183. package/dist/client/assets/connection-detail-DmthZz54.js +0 -1
  184. package/dist/client/assets/connections-r_aRLPNJ.js +0 -1
  185. package/dist/client/assets/constants-CehTGa6m.js +0 -1
  186. package/dist/client/assets/dialog-Rb8gAr_X.js +0 -1
  187. package/dist/client/assets/dynamic-plugin-layout-eqQ8vb-X.js +0 -1
  188. package/dist/client/assets/empty-state-CA7kuHGK.js +0 -1
  189. package/dist/client/assets/index-CSfvtoe4.js +0 -1
  190. package/dist/client/assets/index-ClncOz6N.js +0 -218
  191. package/dist/client/assets/index-Dtj1StPs.css +0 -1
  192. package/dist/client/assets/mcp-server-detail-aLIeserX.js +0 -2
  193. package/dist/client/assets/members-CbEIJSgz.js +0 -3
  194. package/dist/client/assets/monitoring-dashboard-edit-C4CBUoJi.js +0 -1
  195. package/dist/client/assets/page-DKc1c6GW.js +0 -1
  196. package/dist/client/assets/project-settings-9R_bMZ34.js +0 -1
  197. package/dist/client/assets/projects-list-Xd18kAoB.js +0 -1
  198. package/dist/client/assets/shell-layout-BUnBBwEV.js +0 -12
  199. package/dist/client/assets/tasks-CLmc4-Ka.js +0 -1
  200. package/dist/client/assets/tooltip-TMQButig.js +0 -1
  201. package/dist/client/assets/topbar-portal-D3WNlquz.js +0 -1
  202. package/dist/client/assets/typewriter-title-D4y6_U_x.js +0 -16
  203. package/dist/client/assets/use-mobile-BttsZXmR.js +0 -1
  204. package/dist/client/assets/use-view-mode-DJpnO-MR.js +0 -1
  205. package/dist/client/assets/useInfiniteQuery-UJjoB_Vx.js +0 -1
  206. package/dist/client/assets/useQuery-BSd1v_RX.js +0 -1
  207. package/dist/client/assets/useSuspenseInfiniteQuery-B9OvX_J7.js +0 -1
  208. package/dist/client/assets/workflow-C62_M1_u.js +0 -1
@@ -0,0 +1,3 @@
1
+ import{r as O,c as L,j as s,u as he,b as Re,bz as Ue,L as Be,bv as At,bE as Ot,O as te,I as et,e as Ge,d as ue,t as fe,bF as Tt,b6 as Mt,z as Lt,A as Et,S as tt,f as Dt,h as Rt,N as Ut,n as Ft,K as Ht,m as st,P as Bt}from"./index-CzSiUwwv.js";import{C as ne,i as Wt}from"./index-CSf23Q8F.js";import{I as qt}from"./integration-icon-jbm4PmZt.js";import{P as ke,u as nt,d as me,e as re,f as Fe,g as Ie,h as Pe,i as rt,j as Gt,k as Vt,l as it,m as Zt,n as Kt,o as Yt,p as Qt}from"./index-BrH9wXxf.js";import{e as Ve,u as Jt,g as Ae,S as se,h as Xt,C as es,f as ts,j as ss}from"./use-deco-chat-open-BuMsTBnv.js";import{c as K,B as Ee}from"./button-Bl7hMmCe.js";import{d as ns}from"./constants-DY_BU6PR.js";import{T as rs,i as is,b as os}from"./typewriter-title-C4OcGX3b.js";import{s as ze}from"./Plus-7gpDbhJy.js";import{t as Ze}from"./Users03-B6oew679.js";import{i as De,a as ot,b as lt,T as at,c as ls}from"./tooltip-CLbmwjfd.js";import{E as ct}from"./error-boundary-GB3TovJQ.js";import{C as dt}from"./create-project-dialog-DFYOBIMM.js";import{n as mt}from"./CheckDone01-DJLuFHxJ.js";import{n as as}from"./Container-B7qKC3EI.js";import{e as cs}from"./Dataflow03-Cf4yDkKR.js";import{a as ds}from"./Home02-CyX62jfB.js";import{u as ft,a as ut}from"./use-project-CsuhSK50.js";import{t as xt}from"./ChevronDown-FdgQzkaa.js";import{A as xe}from"./avatar-B-mPVtLH.js";import{c as X,g as $e,d as ms,e as fs,f as us,b as pt,D as ht,a as gt}from"./dropdown-menu-Dk3PdiLq.js";import{i as pe}from"./Check-BY-DCpO_.js";import{t as We}from"./Settings01-CRoxTuTO.js";import{C as xs}from"./create-organization-dialog-BmtVHISe.js";import{a as jt}from"./Copy01-B_7d0dwb.js";import{i as bt}from"./File06-xsY7vCFb.js";import{i as ps}from"./Globe01-BuKzbzrx.js";import{n as Ce}from"./LinkExternal01-CHfE9mil.js";import{i as hs}from"./Shield01-DymehiLu.js";import{c as gs,b as js,g as bs,a as Ns,D as vs}from"./dialog-BTs7spED.js";import{L as we}from"./label-A7ibpcPd.js";import{S as ys,a as Ss,b as ks,d as He,c as _s}from"./select-CKDoCTJO.js";import{S as Le}from"./switch-ySGmS6Zx.js";import{i as Cs}from"./Code01-CowHxp14.js";import{a as ws,P as zs,b as $s}from"./popover-Ca9Cyzf7.js";import{n as Je}from"./Inbox01-CxlDy_Yy.js";import{s as Is}from"./XClose-DoKE29TG.js";import{u as Nt,a as Ps}from"./use-organization-settings-1mU06z41.js";import{i as As}from"./ChevronRight-DYxU3E_q.js";import{u as Ke,L as Ye}from"./localstorage-keys-Cc9e53sU.js";import{R as Os,a as vt,b as Ts}from"./resizable-DKtpdeB3.js";import"./spinner-B-FWJ8nx.js";import"./use-mcp-prompts-DMC1gnwj.js";import"./useQuery-CTct6gOY.js";import"./form-Dxe8J4dP.js";import"./input-CAPxG1rh.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-xougxkbC.js";import"./Edit01-CUcmwNxC.js";import"./XCircle-WTPrrNWD.js";import"./AlertCircle-FL98lGLa.js";import"./AlertTriangle-DteHmOG1.js";import"./ArrowLeft-CMuGBwkE.js";import"./use-copy-BZqI2HfR.js";import"./badge-Bt6C7wEJ.js";import"./use-virtual-mcp-CqdRLJoL.js";import"./use-connection-CdIwTzRh.js";import"./useMutation-BYl8vvsl.js";import"./SearchMd-BMO4jqwv.js";import"./use-create-virtual-mcp-DKrayFIg.js";import"./marked.esm-BaswSlok.js";import"./markdown-DTO-ngpn.js";import"./tools-list-CBpacE22.js";import"./collection-table-wrapper-DS44ibQ8.js";import"./Grid01-CcUd9dpu.js";import"./List-BkcTlONj.js";import"./table-DGDNn7mH.js";import"./empty-state-yzpNvfA-.js";import"./Loading01-CWwskqmx.js";import"./card-BMQBEGUR.js";import"./Eye-Rq15dwoo.js";import"./Globe02-BIRPCTiD.js";import"./RefreshCw01-dI5kYugT.js";import"./layout-DHncYg0M.js";import"./generate-id-Dyweu44Y.js";import"./Clock-Drw10Mc_.js";import"./Trash01-BKhksYCP.js";import"./use-llm-CX9QGbjZ.js";import"./use-binding-D36c91MK.js";import"./binder-BvXUsKRF.js";import"./Image01-CiGMIZf1.js";import"./RefreshCcw01-BzY8N8T3.js";import"./useSuspenseInfiniteQuery-DJZPFUMY.js";import"./infiniteQueryObserver-Ctmp4byY.js";import"./index-Dps5khDb.js";import"./textarea-COGwSIgK.js";import"./alert-dialog-Dm7Md3Yk.js";const yt=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));yt.displayName="BarChart10";const St=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));St.displayName="Bell01";const Qe=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M15 21v-5.4c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 14 13.96 14 13.4 14h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 14.76 9 15.04 9 15.6V21M3 7a3 3 0 0 0 6 0 3 3 0 1 0 6 0 3 3 0 1 0 6 0M6.2 21h11.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3H6.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21Z"}));Qe.displayName="Building02";const kt=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M8 14s1.5 2 4 2 4-2 4-2m-1-5h.01M9 9h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-6.5-3a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-6 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"}));kt.displayName="FaceSmile";const _t=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));_t.displayName="LogOut01";const Ct=({size:t=24,color:e="currentColor",...n})=>O.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},O.createElement("path",{d:"M8 9.5h4M8 13h7m-3 8a9 9 0 1 0-8.342-5.616c.081.2.122.3.14.381a.907.907 0 0 1 .024.219c0 .083-.015.173-.045.353l-.593 3.558c-.062.373-.093.56-.035.694a.5.5 0 0 0 .262.262c.135.058.321.027.694-.035l3.558-.593c.18-.03.27-.045.353-.045.081 0 .14.006.219.024.08.018.18.059.38.14A8.973 8.973 0 0 0 12 21Z"}));Ct.displayName="MessageTextCircle02";function Ms(){const t=L.c(65),{org:e}=he(),[,n]=Ve(),{selectedVirtualMcp:o,modelsConnections:i,isChatEmpty:a,activeThreadId:r,createThread:l,switchToThread:d,threads:c}=Jt();let m;if(t[0]!==r||t[1]!==c){let B;t[3]!==r?(B=W=>W.id===r,t[3]=r,t[4]=B):B=t[4],m=c.find(B),t[0]=r,t[1]=c,t[2]=m}else m=t[2];const u=m,[f,h]=O.useState(!1),[p,j]=O.useTransition();let g;t[5]!==e.id?(g=ns(e.id),t[5]=e.id,t[6]=g):g=t[6];const x=o??g;let b;t[7]!==l?(b=()=>{j(()=>{l()})},t[7]=l,t[8]=b):b=t[8];const v=b;if(i.length===0){let B;t[9]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(ke.Header.Left,{className:"gap-2"}),t[9]=B):B=t[9];let W;t[10]!==n?(W=()=>n(!1),t[10]=n,t[11]=W):W=t[11];let _;t[12]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(De,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=_):_=t[12];let G;t[13]!==W?(G=s.jsxs(ke.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[B,s.jsx(ke.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:W,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:_})})]}),t[13]=W,t[14]=G):G=t[14];let J;t[15]!==e?(J=s.jsx(ne.Main,{className:"flex flex-col items-center",children:s.jsx(ne.EmptyState,{children:s.jsx(ne.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features.",org:e})})}),t[15]=e,t[16]=J):J=t[16];let ie;return t[17]!==G||t[18]!==J?(ie=s.jsxs(ne,{className:"animate-in fade-in-0 duration-200",children:[G,J]}),t[17]=G,t[18]=J,t[19]=ie):ie=t[19],ie}const N=f?"duration-300 opacity-0 -translate-x-4 pointer-events-none":p?"duration-150 opacity-0 pointer-events-none":"duration-300 opacity-100 translate-x-0";let y;t[20]!==N?(y=K("absolute inset-0 flex flex-col transition-[opacity,transform] ease-[var(--ease-out-quart)]",N),t[20]=N,t[21]=y):y=t[21];let S;t[22]!==u||t[23]!==a?(S=!a&&u?.title&&s.jsx(rs,{text:u.title,className:"text-sm font-medium text-foreground"}),t[22]=u,t[23]=a,t[24]=S):S=t[24];let z;t[25]!==S?(z=s.jsx(ke.Header.Left,{className:"gap-2",children:S}),t[25]=S,t[26]=z):z=t[26];let M;t[27]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(ze,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[27]=M):M=t[27];let E;t[28]!==v||t[29]!==p?(E=s.jsx("button",{type:"button",onClick:v,disabled:p,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:M}),t[28]=v,t[29]=p,t[30]=E):E=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=()=>h(!0),t[31]=I):I=t[31];let F;t[32]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx("button",{type:"button",onClick:I,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Chat history",children:s.jsx(is,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[32]=F):F=t[32];let D;t[33]!==n?(D=()=>n(!1),t[33]=n,t[34]=D):D=t[34];let H;t[35]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(De,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[35]=H):H=t[35];let $;t[36]!==D?($=s.jsx("button",{type:"button",onClick:D,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:H}),t[36]=D,t[37]=$):$=t[37];let P;t[38]!==$||t[39]!==E?(P=s.jsxs(ke.Header.Right,{className:"gap-1",children:[E,F,$]}),t[38]=$,t[39]=E,t[40]=P):P=t[40];let C;t[41]!==P||t[42]!==z?(C=s.jsxs(ke.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[z,P]}),t[41]=P,t[42]=z,t[43]=C):C=t[43];let T;t[44]!==x||t[45]!==a?(T=s.jsx(ne.Main,{children:a?s.jsx(ne.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[s.jsx(qt,{icon:x.icon,name:x.title,size:"lg",fallbackIcon:s.jsx(Ze,{size:32}),className:"size-[60px]! rounded-[18px]!"}),s.jsx("h3",{className:"text-xl font-medium text-foreground",children:x.title}),s.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:x.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(ne.IceBreakers,{})]})}):s.jsx(ne.Messages,{})}),t[44]=x,t[45]=a,t[46]=T):T=t[46];let A;t[47]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(ne.Footer,{children:s.jsx(ne.Input,{})}),t[47]=A):A=t[47];let R;t[48]!==C||t[49]!==T||t[50]!==y?(R=s.jsxs("div",{className:y,children:[C,T,A]}),t[48]=C,t[49]=T,t[50]=y,t[51]=R):R=t[51];const ee=f?"opacity-100 translate-x-0":"opacity-0 translate-x-4 pointer-events-none";let Y;t[52]!==ee?(Y=K("absolute inset-0 flex flex-col transition-[opacity,transform] duration-300 ease-[var(--ease-out-quart)]",ee),t[52]=ee,t[53]=Y):Y=t[53];let Q;t[54]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>h(!1),t[54]=Q):Q=t[54];let V;t[55]!==r||t[56]!==d||t[57]!==c?(V=s.jsx(os,{threads:c,activeThreadId:r,onThreadSelect:d,onClose:Q}),t[55]=r,t[56]=d,t[57]=c,t[58]=V):V=t[58];let U;t[59]!==Y||t[60]!==V?(U=s.jsx("div",{className:Y,children:V}),t[59]=Y,t[60]=V,t[61]=U):U=t[61];let Z;return t[62]!==R||t[63]!==U?(Z=s.jsxs(ne,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[R,U]}),t[62]=R,t[63]=U,t[64]=Z):Z=t[64],Z}function Ls(){const t=L.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ne.Skeleton,{}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ct,{fallback:e,children:s.jsx(O.Suspense,{fallback:s.jsx(ne.Skeleton,{}),children:s.jsx(Ms,{})})}),t[1]=n):n=t[1],n}function Es(){const t=L.c(47),[e]=Ae(),{locator:n,org:o}=he(),i=Re(),a=Ue(),{org:r,project:l}=Be.parse(n),d=Be.isOrgAdminProject(n),{data:c}=ft(o.id,l);let m;t[0]!==c?.enabledPlugins?(m=c?.enabledPlugins??[],t[0]=c?.enabledPlugins,t[1]=m):m=t[1];const u=m;let f;t[2]!==u?(f=w=>u.includes(w.pluginId),t[2]=u,t[3]=f):f=t[3];const h=At.filter(f),p=a.location.pathname,j=`/${r}/${l}`,g=p===j||p===`${j}/`;let k;t[4]!==j||t[5]!==p?(k=w=>p.startsWith(`${j}/${w}`),t[4]=j,t[5]=p,t[6]=k):k=t[6];const x=k;let b;t[7]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ds,{}),t[7]=b):b=t[7];const v={key:"home",label:"Home",icon:b,isActive:g,onClick:()=>{g?window.dispatchEvent(new CustomEvent("reset-home-view")):i({to:"/$org/$project",params:{org:r,project:l}})}};let N;t[8]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(mt,{}),t[8]=N):N=t[8];const y={key:"tasks",label:"Tasks",icon:N,isActive:x("tasks"),onClick:()=>i({to:"/$org/$project/tasks",params:{org:r,project:te}})};let S;t[9]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(as,{}),t[9]=S):S=t[9];const z={key:"mcps",label:"Connections",icon:S,isActive:x("mcps"),onClick:()=>i({to:"/$org/$project/mcps",params:{org:r,project:te}})};let M;t[10]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(et,{}),t[10]=M):M=t[10];const E={key:"projects",label:"Projects",icon:M,isActive:x("projects"),onClick:()=>i({to:"/$org/$project/projects",params:{org:r,project:te}})};let I;t[11]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Qe,{}),t[11]=I):I=t[11];const F={key:"store",label:"Store",icon:I,isActive:x("store"),onClick:()=>i({to:"/$org/$project/store",params:{org:r,project:te}})};let D;t[12]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ze,{}),t[12]=D):D=t[12];const H={key:"agents",label:"Agents",icon:D,isActive:x("agents"),onClick:()=>i({to:"/$org/$project/agents",params:{org:r,project:te}})};let $;t[13]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(yt,{}),t[13]=$):$=t[13];const P={key:"monitoring",label:"Monitor",icon:$,isActive:x("monitoring"),onClick:()=>i({to:"/$org/$project/monitoring",params:{org:r,project:te}})};let C;t[14]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(kt,{}),t[14]=C):C=t[14];const T={key:"members",label:"Members",icon:C,isActive:x("members"),onClick:()=>i({to:"/$org/$project/members",params:{org:r,project:te}})},A=h.map(w=>({key:w.pluginId,label:w.label,icon:w.icon,isActive:x(w.pluginId),onClick:()=>i({to:"/$org/$project/$pluginId",params:{org:r,project:l,pluginId:w.pluginId}})}));let R;t[15]!==u?(R=w=>u.includes(w.pluginId),t[15]=u,t[16]=R):R=t[16];const Y=Ot.filter(R).map(w=>({type:"group",group:{id:`${w.pluginId}-${w.id}`,label:w.label,items:w.items.map((q,oe)=>({key:`${w.pluginId}-${w.id}-${oe}`,label:q.label,icon:q.icon,isActive:x(w.pluginId),onClick:()=>i({to:"/$org/$project/$pluginId",params:{org:r,project:l,pluginId:w.pluginId}})})),defaultExpanded:w.defaultExpanded??!0}}));if(d){const w=[{type:"items",items:[v,...e.experimental_projects?[E]:[]]},{type:"group",group:{id:"build",label:"Build",items:[H,z,P,...e.experimental_tasks?[y]:[]],defaultExpanded:!0}},{type:"group",group:{id:"manage",label:"Manage",items:[T,F],defaultExpanded:!0}}];if(A.length>0){let q;t[17]===Symbol.for("react.memo_cache_sentinel")?(q={type:"divider"},t[17]=q):q=t[17],w.push(q);let oe;t[18]!==A?(oe={type:"items",items:A},t[18]=A,t[19]=oe):oe=t[19],w.push(oe)}if(Y.length>0){if(A.length===0){let q;t[20]===Symbol.for("react.memo_cache_sentinel")?(q={type:"divider"},t[20]=q):q=t[20],w.push(q)}w.push(...Y)}return w}let Q;t[21]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(Wt,{}),t[21]=Q):Q=t[21];let V;t[22]!==x?(V=x("tasks"),t[22]=x,t[23]=V):V=t[23];let U;t[24]!==i||t[25]!==r||t[26]!==l?(U=()=>i({to:"/$org/$project/tasks",params:{org:r,project:l}}),t[24]=i,t[25]=r,t[26]=l,t[27]=U):U=t[27];let Z;t[28]!==V||t[29]!==U?(Z={key:"tasks",label:"Tasks",icon:Q,isActive:V,onClick:U},t[28]=V,t[29]=U,t[30]=Z):Z=t[30];const B=Z;let W;t[31]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(cs,{}),t[31]=W):W=t[31];let _;t[32]!==x?(_=x("workflows"),t[32]=x,t[33]=_):_=t[33];let G;t[34]!==i||t[35]!==r||t[36]!==l?(G=()=>i({to:"/$org/$project/workflows",params:{org:r,project:l}}),t[34]=i,t[35]=r,t[36]=l,t[37]=G):G=t[37];let J;t[38]!==_||t[39]!==G?(J={key:"workflows",label:"Workflows",icon:W,isActive:_,onClick:G},t[38]=_,t[39]=G,t[40]=J):J=t[40];const ie=J;let le;t[41]!==e.experimental_tasks||t[42]!==B?(le=e.experimental_tasks?[B]:[],t[41]=e.experimental_tasks,t[42]=B,t[43]=le):le=t[43];const ae=[{type:"items",items:[v,...le,ie]}];if(A.length>0){let w;t[44]===Symbol.for("react.memo_cache_sentinel")?(w={type:"divider"},t[44]=w):w=t[44],ae.push(w);let q;t[45]!==A?(q={type:"items",items:A},t[45]=A,t[46]=q):q=t[46],ae.push(q)}return Y.length>0&&ae.push(...Y),ae}function Ds(t){const e=L.c(11),{label:n,children:o,defaultExpanded:i}=t,a=i===void 0?!0:i,[r,l]=O.useState(a),{state:d}=nt(),c=d==="collapsed";let m;e[0]!==r||e[1]!==c||e[2]!==n?(m=c?s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-8 rounded-full bg-sidebar-foreground/15"})}):s.jsx(me,{children:s.jsx(re,{children:s.jsxs(Fe,{className:"h-6 cursor-pointer select-none gap-1 [&>svg]:size-3",onClick:()=>l(!r),children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),s.jsx(xt,{size:12,className:K("text-muted-foreground transition-transform duration-200",!r&&"-rotate-90")})]})})}),e[0]=r,e[1]=c,e[2]=n,e[3]=m):m=e[3];let u;e[4]!==o||e[5]!==r||e[6]!==c?(u=(c||r)&&s.jsx(Ie,{children:s.jsx(me,{className:"gap-0.5",children:o})}),e[4]=o,e[5]=r,e[6]=c,e[7]=u):u=e[7];let f;return e[8]!==m||e[9]!==u?(f=s.jsxs(Pe,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[m,u]}),e[8]=m,e[9]=u,e[10]=f):f=e[10],f}function wt(t){const e=L.c(13),{item:n}=t;let o;e[0]!==n.icon?(o=s.jsx("span",{className:"[&>svg]:size-4",children:n.icon}),e[0]=n.icon,e[1]=o):o=e[1];let i;e[2]!==n.label?(i=s.jsx("span",{className:"truncate group-data-[collapsible=icon]:hidden",children:n.label}),e[2]=n.label,e[3]=i):i=e[3];let a;e[4]!==n.isActive||e[5]!==n.label||e[6]!==n.onClick||e[7]!==o||e[8]!==i?(a=s.jsxs(Fe,{onClick:n.onClick,isActive:n.isActive,tooltip:n.label,children:[o,i]}),e[4]=n.isActive,e[5]=n.label,e[6]=n.onClick,e[7]=o,e[8]=i,e[9]=a):a=e[9];let r;return e[10]!==n.key||e[11]!==a?(r=s.jsx(re,{children:a},n.key),e[10]=n.key,e[11]=a,e[12]=r):r=e[12],r}function Rs(t){const e=L.c(12),{section:n}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let a;e[2]!==n.group.items?(a=n.group.items.map(Fs),e[2]=n.group.items,e[3]=a):a=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==a?(r=s.jsx(Ds,{label:o,defaultExpanded:i,children:a}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=a,e[7]=r):r=e[7],r}case"items":{let o;e[8]!==n.items?(o=n.items.map(Us),e[8]=n.items,e[9]=o):o=e[9];let i;return e[10]!==o?(i=s.jsx(Pe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ie,{children:s.jsx(me,{className:"gap-0.5",children:o})})}),e[10]=o,e[11]=i):i=e[11],i}}}function Us(t){return s.jsx(wt,{item:t},t.key)}function Fs(t){return s.jsx(wt,{item:t},t.key)}function zt(t){const e=L.c(14),{sections:n,header:o,footer:i,additionalContent:a,variant:r,collapsible:l,contentClassName:d}=t,c=r===void 0?"sidebar":r,m=l===void 0?"icon":l;let u;e[0]!==d?(u=K("flex flex-col flex-1 overflow-x-hidden mt-1 px-3.5 pb-2 group-data-[collapsible=icon]:px-2",d),e[0]=d,e[1]=u):u=e[1];let f;e[2]!==n?(f=n.map(Hs),e[2]=n,e[3]=f):f=e[3];let h;e[4]!==a||e[5]!==u||e[6]!==f?(h=s.jsxs(Gt,{className:u,children:[f,a]}),e[4]=a,e[5]=u,e[6]=f,e[7]=h):h=e[7];let p;return e[8]!==m||e[9]!==i||e[10]!==o||e[11]!==h||e[12]!==c?(p=s.jsxs(Vt,{variant:c,collapsible:m,children:[o,h,i]}),e[8]=m,e[9]=i,e[10]=o,e[11]=h,e[12]=c,e[13]=p):p=e[13],p}function Hs(t,e){return s.jsx(Rs,{section:t},e)}zt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(se,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Bs(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-0.5 px-1 py-1",children:[s.jsx(se,{className:"h-8 w-full rounded-lg"}),s.jsx(se,{className:"h-8 w-full rounded-lg"})]}),t[0]=e):e=t[0],e}function Ws(t){const e=L.c(12),{organizationId:n,currentProjectSlug:o,onSelect:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={suspense:!0},e[0]=a):a=e[0];const{data:r}=ut(n,a);let l,d;if(e[1]!==o||e[2]!==i||e[3]!==r){d=Symbol.for("react.early_return_sentinel");e:{const m=r?.filter(qs)??[];if(m.length===0){let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:"No projects yet"}),e[6]=f):f=e[6],d=f;break e}let u;e[7]!==o||e[8]!==i?(u=f=>{const h=o===f.slug,p=f.ui?.themeColor??"#3B82F6";return s.jsxs(X,{className:K("gap-2.5",h&&"bg-accent"),onClick:()=>i(f.slug),children:[s.jsx("div",{className:"size-6 rounded-md shrink-0 flex items-center justify-center overflow-hidden border border-border/50",style:{backgroundColor:p},children:f.ui?.icon?s.jsx("img",{src:f.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-xs font-semibold text-white",children:f.name.charAt(0).toUpperCase()})}),s.jsx("span",{className:"flex-1 truncate",children:f.name}),h&&s.jsx(pe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},f.id)},e[7]=o,e[8]=i,e[9]=u):u=e[9],l=m.map(u)}e[1]=o,e[2]=i,e[3]=r,e[4]=l,e[5]=d}else l=e[4],d=e[5];if(d!==Symbol.for("react.early_return_sentinel"))return d;let c;return e[10]!==l?(c=s.jsx(s.Fragment,{children:l}),e[10]=l,e[11]=c):c=e[11],c}function qs(t){return t.slug!==te}function Gs(t){let e=0;for(let o=0;o<t.length;o++)e=t.charCodeAt(o)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function $t(t){const e=L.c(44),{isCollapsed:n,onCreateProject:o}=t,i=n===void 0?!1:n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const{org:r,project:l}=Ge(a),{data:d}=ue.useListOrganizations(),c=Re(),m=d?.find(_=>_.slug===r),[u,f]=O.useState(!1),[h]=Ae(),p=h.experimental_projects,j=l===te,{data:g}=ft(m?.id??"",j?"":l??"");let k;e[1]!==r?(k=(_,G)=>_.slug===r?-1:G.slug===r?1:_.name.localeCompare(G.name),e[1]=r,e[2]=k):k=e[2];const x=[...d??[]].sort(k);let b;e[3]!==c||e[4]!==r?(b=()=>{r&&c({to:"/$org/$project",params:{org:r,project:te}})},e[3]=c,e[4]=r,e[5]=b):b=e[5];const v=b;let N;e[6]!==c||e[7]!==r?(N=_=>{r&&c({to:"/$org/$project",params:{org:r,project:_}})},e[6]=c,e[7]=r,e[8]=N):N=e[8];const y=N;let S;e[9]!==c?(S=_=>{c({to:"/$org/$project",params:{org:_,project:te}})},e[9]=c,e[10]=S):S=e[10];const z=S;let M;e[11]!==o?(M=o?()=>o():void 0,e[11]=o,e[12]=M):M=e[12];const E=M;let I;e[13]!==c||e[14]!==r||e[15]!==l?(I=()=>{!r||!l||c({to:"/$org/$project/settings",params:{org:r,project:l}})},e[13]=c,e[14]=r,e[15]=l,e[16]=I):I=e[16];const F=I,D=ht,H=i?"w-auto pr-1.5":"w-full";let $;e[17]!==H?($=K("flex items-center gap-3 rounded-md p-1.5 pr-2 text-left hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring min-h-[2.75rem]",H),e[17]=H,e[18]=$):$=e[18];const P=j?s.jsx("div",{className:K("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",i?"size-6":"size-8"),style:m?.logo?void 0:Gs(m?.name??""),children:m?.logo?s.jsx("img",{src:m.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:K("font-semibold leading-none",i?"text-[9px]":"text-xs"),children:(m?.name??"?").slice(0,2).toUpperCase()})}):s.jsx("div",{className:K("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",i?"size-6":"size-8"),style:{backgroundColor:g?.ui?.themeColor??"#60a5fa"},children:g?.ui?.icon?s.jsx("img",{src:g.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:K("font-semibold text-white",i?"text-xs":"text-lg"),children:(g?.name??l??"?").charAt(0).toUpperCase()})});let C;e[19]!==m?.name||e[20]!==g?.name||e[21]!==p||e[22]!==i||e[23]!==j||e[24]!==l?(C=!i&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:p?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"block text-[11px] text-sidebar-foreground/50 leading-tight truncate",children:m?.name??"Select org"}),s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:j?"Studio":g?.name??l??""})]}):s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:m?.name??"Select org"})}),s.jsx(Xt,{size:16,className:"shrink-0 text-sidebar-foreground/40 group-data-[studio]/sidebar-wrapper:text-sidebar-foreground/85"})]}),e[19]=m?.name,e[20]=g?.name,e[21]=p,e[22]=i,e[23]=j,e[24]=l,e[25]=C):C=e[25];let T;e[26]!==$||e[27]!==P||e[28]!==C?(T=s.jsx(gt,{asChild:!0,children:s.jsxs("button",{type:"button",className:$,children:[P,C]})}),e[26]=$,e[27]=P,e[28]=C,e[29]=T):T=e[29];const A=pt,R="start",ee="bottom",Y="w-64 flex flex-col gap-0.5",Q=Vs,V=p?s.jsxs(s.Fragment,{children:[s.jsxs(X,{className:K("gap-2.5",j&&"bg-accent"),onClick:v,children:[s.jsx(xe,{url:m?.logo??"",fallback:m?.name??"",size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),s.jsxs("span",{className:"flex-1 truncate",children:["Studio · ",m?.name]}),j&&s.jsx(pe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]}),s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Projects"}),m&&s.jsx(O.Suspense,{fallback:s.jsx(Bs,{}),children:s.jsx(Ws,{organizationId:m.id,currentProjectSlug:l,orgSlug:r??"",onSelect:y})}),E&&s.jsxs(X,{className:"gap-2.5",onClick:E,children:[s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create project"})]}),s.jsx($e,{}),s.jsxs(ms,{children:[s.jsxs(fs,{className:"gap-2.5",children:[s.jsx(Qe,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Switch organization"})]}),s.jsxs(us,{className:"w-48 flex flex-col gap-0.5",children:[x.map(_=>s.jsxs(X,{className:K("gap-2.5",_.slug===r&&"bg-accent"),onClick:()=>z(_.slug),children:[s.jsx(xe,{url:_.logo??"",fallback:_.name,size:"xs",className:"size-5 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:_.name}),_.slug===r&&s.jsx(pe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id)),s.jsx($e,{}),s.jsxs(X,{className:"gap-2.5",onClick:()=>f(!0),children:[s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]})]})]}),s.jsxs(X,{className:"gap-2.5",onClick:F,children:[s.jsx(We,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Organizations"}),x.map(_=>s.jsxs(X,{className:K("gap-2.5",_.slug===r&&"bg-accent"),onClick:()=>z(_.slug),children:[s.jsx(xe,{url:_.logo??"",fallback:_.name,size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:_.name}),_.slug===r&&s.jsx(pe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id)),s.jsxs(X,{className:"gap-2.5",onClick:()=>f(!0),children:[s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]}),s.jsx($e,{}),s.jsxs(X,{className:"gap-2.5",onClick:F,children:[s.jsx(We,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]})]});let U;e[30]!==A||e[31]!==Q||e[32]!==V?(U=s.jsx(A,{align:R,side:ee,className:Y,onCloseAutoFocus:Q,children:V}),e[30]=A,e[31]=Q,e[32]=V,e[33]=U):U=e[33];let Z;e[34]!==D||e[35]!==T||e[36]!==U?(Z=s.jsxs(D,{children:[T,U]}),e[34]=D,e[35]=T,e[36]=U,e[37]=Z):Z=e[37];let B;e[38]!==u||e[39]!==f?(B=s.jsx(xs,{open:u,onOpenChange:f}),e[38]=u,e[39]=f,e[40]=B):B=e[40];let W;return e[41]!==Z||e[42]!==B?(W=s.jsxs(s.Fragment,{children:[Z,B]}),e[41]=Z,e[42]=B,e[43]=W):W=e[43],W}function Vs(t){return t.preventDefault()}$t.Skeleton=function(){return s.jsxs("div",{className:"flex items-center gap-1.5 h-7 px-1.5 w-full",children:[s.jsx(se,{className:"size-5 rounded-[5px] shrink-0 bg-sidebar-accent"}),s.jsx(se,{className:"h-3.5 flex-1 bg-sidebar-accent"})]})};function qe(t){const e=L.c(23),{onCreateProject:n}=t,{state:o}=nt(),i=o==="collapsed",[a,r]=Ve();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const{org:d,project:c}=Ge(l),{location:m}=Ue(),u=m.pathname===`/${d}/${c}`||m.pathname===`/${d}/${c}/`;let f;e[1]!==r?(f=()=>{r(Zs)},e[1]=r,e[2]=f):f=e[2];const h=f;let p;e[3]!==i||e[4]!==n?(p=s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx($t,{isCollapsed:i,onCreateProject:n})}),e[3]=i,e[4]=n,e[5]=p):p=e[5];const j=i||u?"max-w-0 opacity-0 pointer-events-none":"max-w-[2rem] opacity-100";let g;e[6]!==j?(g=K("flex items-center gap-0.5 shrink-0 overflow-hidden transition-[max-width,opacity] duration-300 ease-[var(--ease-out-quart)]",j),e[6]=j,e[7]=g):g=e[7];const k=a&&"bg-sidebar-accent text-sidebar-foreground";let x;e[8]!==k?(x=K("size-7 hover:bg-sidebar-accent text-sidebar-foreground/50 hover:text-sidebar-foreground group-data-[studio]/sidebar-wrapper:text-sidebar-foreground/85",k),e[8]=k,e[9]=x):x=e[9];let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ct,{size:14,className:"text-inherit"}),e[10]=b):b=e[10];let v;e[11]!==x||e[12]!==h?(v=s.jsx(ot,{asChild:!0,children:s.jsx(Ee,{variant:"ghost",size:"icon",className:x,onClick:h,"aria-label":"Toggle Decopilot",children:b})}),e[11]=x,e[12]=h,e[13]=v):v=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(lt,{side:"bottom",children:"Toggle Decopilot"}),e[14]=N):N=e[14];let y;e[15]!==v?(y=s.jsxs(at,{children:[v,N]}),e[15]=v,e[16]=y):y=e[16];let S;e[17]!==y||e[18]!==g?(S=s.jsx("div",{className:g,children:y}),e[17]=y,e[18]=g,e[19]=S):S=e[19];let z;return e[20]!==S||e[21]!==p?(z=s.jsx(it,{className:"px-3 group-data-[collapsible=icon]:px-2 animate-in fade-in-0 duration-200",children:s.jsx(me,{children:s.jsx(re,{children:s.jsxs("div",{className:"flex items-center justify-between w-full gap-1",children:[p,S]})})})}),e[20]=S,e[21]=p,e[22]=z):z=e[22],z}function Zs(t){return!t}qe.Skeleton=function(){return s.jsx(it,{className:"px-3",children:s.jsx(me,{children:s.jsx(re,{children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 p-1.5",children:[s.jsx(se,{className:"size-8 rounded-md shrink-0 bg-sidebar-accent"}),s.jsx(se,{className:"h-3.5 w-16 bg-sidebar-accent"})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(se,{className:"size-7 rounded-lg bg-sidebar-accent"}),s.jsx(se,{className:"size-7 rounded-lg bg-sidebar-accent"})]})]})})})})};function Ks(t){const e=L.c(108),{open:n,onOpenChange:o,user:i,userImage:a}=t,[r,l]=Ae(),[d,c]=O.useState(!1);let m;e[0]!==i.id?(m=()=>{navigator.clipboard.writeText(i.id),c(!0),setTimeout(()=>c(!1),2e3)},e[0]=i.id,e[1]=m):m=e[1];const u=m;let f;e[2]!==l?(f=async ce=>{if(ce&&await Notification.requestPermission()!=="granted"){fe.error("Notifications denied. Please enable them in your browser settings."),l(nn);return}l(de=>({...de,enableNotifications:ce}))},e[2]=l,e[3]=f):f=e[3];const h=f;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(gs,{className:"text-base",children:"Profile Settings"}),e[4]=p):p=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs(js,{className:"px-6 pt-6 pb-4 border-b border-border shrink-0 relative",children:[p,s.jsxs(bs,{className:"absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[s.jsx(De,{size:16}),s.jsx("span",{className:"sr-only",children:"Close"})]})]}),e[5]=j):j=e[5];const g=i.name||"U";let k;e[6]!==g||e[7]!==a?(k=s.jsx(xe,{url:a,fallback:g,shape:"circle",size:"xl",className:"h-16 w-16"}),e[6]=g,e[7]=a,e[8]=k):k=e[8];const x=i.name||"User";let b;e[9]!==x?(b=s.jsx("span",{className:"text-base font-medium text-foreground",children:x}),e[9]=x,e[10]=b):b=e[10];let v;e[11]!==i.email?(v=s.jsx("span",{className:"text-sm text-muted-foreground",children:i.email}),e[11]=i.email,e[12]=v):v=e[12];let N;e[13]!==b||e[14]!==v?(N=s.jsxs("div",{className:"flex flex-col gap-1",children:[b,v]}),e[13]=b,e[14]=v,e[15]=N):N=e[15];let y;e[16]!==N||e[17]!==k?(y=s.jsxs("div",{className:"flex items-center gap-4",children:[k,N]}),e[16]=N,e[17]=k,e[18]=y):y=e[18];let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Preferences"}),e[19]=S):S=e[19];let z;e[20]!==l?(z=()=>l(sn),e[20]=l,e[21]=z):z=e[21];let M;e[22]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(we,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(Cs,{size:16,className:"text-muted-foreground"}),"Developer Mode"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Show technical details like JSON input/output for tool calls"})]}),e[22]=M):M=e[22];let E;e[23]!==l?(E=ce=>l(de=>({...de,devMode:ce})),e[23]=l,e[24]=E):E=e[24];let I;e[25]!==r.devMode||e[26]!==E?(I=s.jsx("div",{onClick:tn,children:s.jsx(Le,{checked:r.devMode,onCheckedChange:E})}),e[25]=r.devMode,e[26]=E,e[27]=I):I=e[27];let F;e[28]!==z||e[29]!==I?(F=s.jsxs("button",{type:"button",onClick:z,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[M,I]}),e[28]=z,e[29]=I,e[30]=F):F=e[30];let D;e[31]!==h||e[32]!==r.enableNotifications?(D=()=>h(!r.enableNotifications),e[31]=h,e[32]=r.enableNotifications,e[33]=D):D=e[33];let H;e[34]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(we,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(St,{size:16,className:"text-muted-foreground"}),"Notifications"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Play a sound and show notifications when chat messages complete while app is unfocused"})]}),e[34]=H):H=e[34];let $;e[35]!==h||e[36]!==r.enableNotifications?($=s.jsx("div",{onClick:en,children:s.jsx(Le,{disabled:typeof Notification>"u",checked:r.enableNotifications,onCheckedChange:h})}),e[35]=h,e[36]=r.enableNotifications,e[37]=$):$=e[37];let P;e[38]!==D||e[39]!==$?(P=s.jsxs("button",{type:"button",disabled:typeof Notification>"u",onClick:D,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[H,$]}),e[38]=D,e[39]=$,e[40]=P):P=e[40];let C;e[41]!==F||e[42]!==P?(C=s.jsxs("div",{className:"flex flex-col gap-2",children:[S,F,P]}),e[41]=F,e[42]=P,e[43]=C):C=e[43];let T,A;e[44]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(we,{className:"text-sm font-medium text-foreground",children:"Tool Approval"}),A=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose when to require approval before tools execute"}),e[44]=T,e[45]=A):(T=e[44],A=e[45]);let R;e[46]!==l?(R=ce=>l(de=>({...de,toolApprovalLevel:ce})),e[46]=l,e[47]=R):R=e[47];let ee;e[48]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Ss,{className:"w-full",children:s.jsx(ks,{})}),e[48]=ee):ee=e[48];let Y;e[49]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(He,{value:"none",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"None"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),e[49]=Y):Y=e[49];let Q;e[50]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(He,{value:"readonly",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[50]=Q):Q=e[50];let V;e[51]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsxs(_s,{children:[Y,Q,s.jsx(He,{value:"yolo",children:s.jsxs("div",{className:"flex items-start flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"YOLO"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),e[51]=V):V=e[51];let U;e[52]!==r.toolApprovalLevel||e[53]!==R?(U=s.jsxs("div",{className:"flex flex-col gap-2",children:[T,A,s.jsxs(ys,{value:r.toolApprovalLevel,onValueChange:R,children:[ee,V]})]}),e[52]=r.toolApprovalLevel,e[53]=R,e[54]=U):U=e[54];let Z,B;e[55]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx("h3",{className:"text-sm font-medium text-foreground",children:"Experimental"}),B=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Experimental features are unstable and may change or stop working at any time."}),e[55]=Z,e[56]=B):(Z=e[55],B=e[56]);let W;e[57]!==l?(W=()=>l(Xs),e[57]=l,e[58]=W):W=e[58];let _;e[59]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(we,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(et,{size:16,className:"text-muted-foreground"}),"Projects"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the projects feature in the sidebar"})]}),e[59]=_):_=e[59];let G;e[60]!==l?(G=ce=>l(de=>({...de,experimental_projects:ce})),e[60]=l,e[61]=G):G=e[61];let J;e[62]!==r.experimental_projects||e[63]!==G?(J=s.jsx("div",{onClick:Js,children:s.jsx(Le,{checked:r.experimental_projects,onCheckedChange:G})}),e[62]=r.experimental_projects,e[63]=G,e[64]=J):J=e[64];let ie;e[65]!==W||e[66]!==J?(ie=s.jsxs("button",{type:"button",onClick:W,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_,J]}),e[65]=W,e[66]=J,e[67]=ie):ie=e[67];let le;e[68]!==l?(le=()=>l(Qs),e[68]=l,e[69]=le):le=e[69];let _e;e[70]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsxs("div",{className:"flex flex-col gap-1 flex-1 min-w-0",children:[s.jsxs(we,{className:"text-sm font-medium text-foreground flex items-center gap-2 pointer-events-none",children:[s.jsx(mt,{size:16,className:"text-muted-foreground"}),"Tasks"]}),s.jsx("p",{className:"text-xs text-muted-foreground pointer-events-none",children:"Enable the tasks feature in the sidebar"})]}),e[70]=_e):_e=e[70];let ae;e[71]!==l?(ae=ce=>l(de=>({...de,experimental_tasks:ce})),e[71]=l,e[72]=ae):ae=e[72];let w;e[73]!==r.experimental_tasks||e[74]!==ae?(w=s.jsx("div",{onClick:Ys,children:s.jsx(Le,{checked:r.experimental_tasks,onCheckedChange:ae})}),e[73]=r.experimental_tasks,e[74]=ae,e[75]=w):w=e[75];let q;e[76]!==le||e[77]!==w?(q=s.jsxs("button",{type:"button",onClick:le,className:"flex items-center justify-between gap-4 p-4 rounded-lg border border-border hover:bg-accent/50 transition-colors text-left w-full cursor-pointer",children:[_e,w]}),e[76]=le,e[77]=w,e[78]=q):q=e[78];let oe;e[79]!==ie||e[80]!==q?(oe=s.jsxs("div",{className:"flex flex-col gap-2",children:[Z,B,ie,q]}),e[79]=ie,e[80]=q,e[81]=oe):oe=e[81];let ge;e[82]!==y||e[83]!==C||e[84]!==U||e[85]!==oe?(ge=s.jsxs("div",{className:"p-5 space-y-6 min-h-[225px] overflow-y-auto",children:[y,C,U,oe]}),e[82]=y,e[83]=C,e[84]=U,e[85]=oe,e[86]=ge):ge=e[86];let je;e[87]!==i.id?(je=s.jsx("span",{className:"font-mono text-xs",children:i.id}),e[87]=i.id,e[88]=je):je=e[88];let be;e[89]!==d?(be=d?s.jsx(pe,{size:14,className:"text-green-600"}):s.jsx(jt,{size:14,className:"opacity-0 group-hover:opacity-100 transition-opacity"}),e[89]=d,e[90]=be):be=e[90];let Ne;e[91]!==u||e[92]!==je||e[93]!==be?(Ne=s.jsx(ot,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:u,className:"group flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[je,be]})}),e[91]=u,e[92]=je,e[93]=be,e[94]=Ne):Ne=e[94];let Oe;e[95]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(lt,{side:"top",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[95]=Oe):Oe=e[95];let ve;e[96]!==Ne?(ve=s.jsx(ls,{children:s.jsxs(at,{children:[Ne,Oe]})}),e[96]=Ne,e[97]=ve):ve=e[97];let Te;e[98]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsxs("span",{className:"text-xs text-muted-foreground/75",children:["v","2.114.0"]}),e[98]=Te):Te=e[98];let ye;e[99]!==ve?(ye=s.jsxs("div",{className:"border-t border-border px-5 py-4 flex items-center justify-between shrink-0",children:[ve,Te]}),e[99]=ve,e[100]=ye):ye=e[100];let Se;e[101]!==ge||e[102]!==ye?(Se=s.jsxs(Ns,{className:"sm:max-w-lg sm:max-h-[85vh] p-0 flex flex-col",closeButtonClassName:"hidden",children:[j,s.jsxs("div",{className:"flex flex-col overflow-y-hidden",children:[ge,ye]})]}),e[101]=ge,e[102]=ye,e[103]=Se):Se=e[103];let Me;return e[104]!==o||e[105]!==n||e[106]!==Se?(Me=s.jsx(vs,{open:n,onOpenChange:o,children:Se}),e[104]=o,e[105]=n,e[106]=Se,e[107]=Me):Me=e[107],Me}function Ys(t){return t.stopPropagation()}function Qs(t){return{...t,experimental_tasks:!t.experimental_tasks}}function Js(t){return t.stopPropagation()}function Xs(t){return{...t,experimental_projects:!t.experimental_projects}}function en(t){return t.stopPropagation()}function tn(t){return t.stopPropagation()}function sn(t){return{...t,devMode:!t.devMode}}function nn(t){return{...t,enableNotifications:!1}}function rn(t){const e=L.c(50),{user:n,userImage:o}=t,[i,a]=O.useState(!1),[r,l]=O.useState(!1);let d;e[0]!==n.email||e[1]!==n.id||e[2]!==n.name?(d=()=>{const R=`ID: ${n.id}
2
+ Name: ${n.name||"N/A"}
3
+ Email: ${n.email}`;navigator.clipboard.writeText(R),l(!0),fe.success("User info copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=n.email,e[1]=n.id,e[2]=n.name,e[3]=d):d=e[3];const c=d,m=n.name||n.email||"U";let u;e[4]!==m||e[5]!==o?(u=s.jsx(xe,{url:o,fallback:m,shape:"circle",size:"2xs",className:"shrink-0 size-5"}),e[4]=m,e[5]=o,e[6]=u):u=e[6];const f=n.name||"User";let h;e[7]!==f?(h=s.jsx("div",{className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:s.jsx("div",{className:"text-sm font-medium truncate text-sidebar-foreground leading-none",children:f})}),e[7]=f,e[8]=h):h=e[8];let p;e[9]!==u||e[10]!==h?(p=s.jsx(gt,{asChild:!0,children:s.jsxs("button",{className:"flex w-full h-8 items-center gap-2 rounded-md px-1 hover:bg-sidebar-accent transition-colors text-left min-w-0",children:[u,h]})}),e[9]=u,e[10]=h,e[11]=p):p=e[11];const j=n.name||n.email||"U";let g;e[12]!==j||e[13]!==o?(g=s.jsx(xe,{url:o,fallback:j,shape:"circle",size:"sm",className:"shrink-0"}),e[12]=j,e[13]=o,e[14]=g):g=e[14];const k=n.name||"User";let x;e[15]!==k?(x=s.jsx("div",{className:"text-sm font-medium truncate",children:k}),e[15]=k,e[16]=x):x=e[16];let b;e[17]!==n.email?(b=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n.email}),e[17]=n.email,e[18]=b):b=e[18];let v;e[19]!==x||e[20]!==b?(v=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,b]}),e[19]=x,e[20]=b,e[21]=v):v=e[21];let N;e[22]!==r?(N=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:r?s.jsx(pe,{size:14,className:"text-green-600"}):s.jsx(jt,{size:14,className:"text-muted-foreground"})}),e[22]=r,e[23]=N):N=e[23];let y;e[24]!==c||e[25]!==v||e[26]!==N||e[27]!==g?(y=s.jsxs(X,{onClick:c,className:"gap-2.5 group",children:[g,v,N]}),e[24]=c,e[25]=v,e[26]=N,e[27]=g,e[28]=y):y=e[28];let S;e[29]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx($e,{}),e[29]=S):S=e[29];let z;e[30]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsxs(X,{className:"gap-2.5",onClick:()=>a(!0),children:[s.jsx(We,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]}),e[30]=z):z=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(X,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(bt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Terms of Use"}),s.jsx(Ce,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[31]=M):M=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(X,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(hs,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Privacy Policy"}),s.jsx(Ce,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[32]=E):E=e[32];let I;e[33]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(X,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Tt,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(Ce,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[33]=I):I=e[33];let F;e[34]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(X,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com/discord",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Community"}),s.jsx(Ce,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[34]=F):F=e[34];let D,H;e[35]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(X,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ps,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Homepage"}),s.jsx(Ce,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),H=s.jsx($e,{}),e[35]=D,e[36]=H):(D=e[35],H=e[36]);let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($=s.jsxs(X,{className:"gap-2.5",onClick:on,children:[s.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Sign out"})]}),e[37]=$):$=e[37];let P;e[38]!==y?(P=s.jsxs(pt,{side:"top",align:"end",collisionPadding:8,className:"w-64 flex flex-col gap-0.5",onCloseAutoFocus:ln,children:[y,S,z,M,E,I,F,D,H,$]}),e[38]=y,e[39]=P):P=e[39];let C;e[40]!==P||e[41]!==p?(C=s.jsxs(ht,{children:[p,P]}),e[40]=P,e[41]=p,e[42]=C):C=e[42];let T;e[43]!==i||e[44]!==n||e[45]!==o?(T=i&&s.jsx(Ks,{open:i,onOpenChange:a,user:n,userImage:o}),e[43]=i,e[44]=n,e[45]=o,e[46]=T):T=e[46];let A;return e[47]!==C||e[48]!==T?(A=s.jsxs(s.Fragment,{children:[C,T]}),e[47]=C,e[48]=T,e[49]=A):A=e[49],A}function on(){return ue.signOut()}function ln(t){return t.preventDefault()}function It(){const t=L.c(7),{data:e}=ue.useSession();if(!e?.user){let d;return t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(xe,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=d):d=t[0],d}const n=e.user,o=n.name??void 0;let i;t[1]!==o||t[2]!==n?(i={...n,name:o},t[1]=o,t[2]=n,t[3]=i):i=t[3];const a=i,r=n.image;let l;return t[4]!==r||t[5]!==a?(l=s.jsx(rn,{user:a,userImage:r}),t[4]=r,t[5]=a,t[6]=l):l=t[6],l}function an({invitation:t}){const[e,n]=O.useState(!1),[o,i]=O.useState(!1),a=Lt(),r=async()=>{n(!0);try{const d=await ue.organization.acceptInvitation({invitationId:t.id});if(d.error)fe.error(d.error.message),n(!1);else{const c=await ue.organization.setActive({organizationId:t.organizationId});fe.success("Invitation accepted!");const m=c?.data?.slug;window.location.href=m?`/${m}`:"/"}}catch{fe.error("Failed to accept invitation"),n(!1)}},l=async()=>{i(!0);try{const d=await ue.organization.rejectInvitation({invitationId:t.id});d.error?(fe.error(d.error.message),i(!1)):(fe.success("Invitation declined"),a.invalidateQueries())}catch{fe.error("Failed to decline invitation"),i(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(Ee,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:r,disabled:e||o,"aria-label":"Accept invitation",children:s.jsx(pe,{size:14})}),s.jsx(Ee,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:l,disabled:e||o,"aria-label":"Decline invitation",children:s.jsx(Is,{size:14})})]})]})}function cn(){const t=O.useContext(Mt),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date)}function dn(){const t=L.c(12),e=cn();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(It,{})}),t[0]=n):n=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(zs,{asChild:!0,children:s.jsx(Ee,{variant:"ghost",size:"icon",className:"size-8 text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent","aria-label":"Open inbox",children:s.jsx(Je,{size:16})})}),t[1]=o):o=t[1];let i;t[2]!==e.length?(i=e.length>0&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 ring-2 ring-sidebar pointer-events-none"}),t[2]=e.length,t[3]=i):i=t[3];let a;t[4]!==i?(a=s.jsxs("div",{className:"relative",children:[o,i]}),t[4]=i,t[5]=a):a=t[5];let r;t[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),t[6]=r):r=t[6];let l;t[7]!==e?(l=s.jsxs(ws,{side:"right",align:"end",sideOffset:24,className:"w-[400px] p-0 h-[650px] flex flex-col",children:[r,e.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Je,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"No messages or invites pending"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages, workspace and project invitations will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:e.map(mn)})]}),t[7]=e,t[8]=l):l=t[8];let d;return t[9]!==a||t[10]!==l?(d=s.jsx(Zt,{className:"px-3.5 pb-3 group-data-[collapsible=icon]:px-2",children:s.jsx(me,{children:s.jsx(re,{children:s.jsxs("div",{className:"flex items-center w-full gap-1",children:[n,s.jsx("div",{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs($s,{children:[a,l]})})]})})})}),t[9]=a,t[10]=l,t[11]=d):d=t[11],d}function mn(t){return s.jsx(an,{invitation:t},t.id)}function Pt(t){const e=L.c(4),{children:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(rt,{className:"my-2"}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(re,{children:s.jsx("div",{className:"group-data-[collapsible=icon]:hidden px-2 py-0 text-xs font-medium h-6 text-muted-foreground flex items-center justify-between",children:s.jsx("span",{className:"whitespace-nowrap",children:"Pinned Views"})})}),e[1]=i):i=e[1];let a;return e[2]!==n?(a=s.jsxs(s.Fragment,{children:[o,i,n]}),e[2]=n,e[3]=a):a=e[3],a}function fn(t){const e=L.c(26),{item:n}=t,o=Re(),{org:i}=he(),a=Nt(i.id),r=Ps(i.id);let l;e[0]!==r.update||e[1]!==n.url||e[2]!==a?.sidebar_items?(l=async()=>{const v=(a?.sidebar_items||[]).filter(N=>N.url!==n.url);await r.update.mutateAsync({sidebar_items:v})},e[0]=r.update,e[1]=n.url,e[2]=a?.sidebar_items,e[3]=l):l=e[3];const d=l;let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=/^https?:\/\/.+/,e[4]=c):c=e[4];let m;e[5]!==n.icon?(m=c.test(n.icon),e[5]=n.icon,e[6]=m):m=e[6];const u=m;let f;e[7]!==n.url||e[8]!==o?(f=()=>{o({to:n.url})},e[7]=n.url,e[8]=o,e[9]=f):f=e[9];const h=n.title;let p;e[10]!==u||e[11]!==n.icon||e[12]!==n.title?(p=s.jsx("div",{className:"flex items-center justify-center shrink-0",children:u?s.jsx("img",{src:n.icon,alt:n.title,className:"h-4 w-4 rounded object-cover"}):s.jsx(bt,{size:16,className:"text-muted-foreground group-hover/item:text-foreground transition-colors"})}),e[10]=u,e[11]=n.icon,e[12]=n.title,e[13]=p):p=e[13];let j;e[14]!==n.title?(j=n.title.toLocaleLowerCase(),e[14]=n.title,e[15]=j):j=e[15];let g;e[16]!==j?(g=s.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:s.jsx("span",{className:"truncate text-sm w-full capitalize",children:j})}),e[16]=j,e[17]=g):g=e[17];let k;e[18]!==d?(k=s.jsx(De,{size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:b=>{b.preventDefault(),b.stopPropagation(),d()}}),e[18]=d,e[19]=k):k=e[19];let x;return e[20]!==n.title||e[21]!==f||e[22]!==p||e[23]!==g||e[24]!==k?(x=s.jsx(re,{children:s.jsxs(Fe,{className:"w-full pr-2 group/item relative cursor-pointer text-foreground/90 hover:text-foreground",onClick:f,tooltip:h,children:[p,g,k]})}),e[20]=n.title,e[21]=f,e[22]=p,e[23]=g,e[24]=k,e[25]=x):x=e[25],x}function Xe(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(re,{children:s.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:s.jsx(se,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function un(){const t=L.c(4),{org:e}=he(),o=Nt(e.id)?.sidebar_items;if(!o?.length)return null;let i;t[0]!==o?(i=o.map(xn),t[0]=o,t[1]=i):i=t[1];let a;return t[2]!==i?(a=s.jsx(Pt,{children:i}),t[2]=i,t[3]=a):a=t[3],a}function xn(t){return s.jsx(fn,{item:t},t.url)}function pn(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(O.Suspense,{fallback:s.jsxs(Pt,{children:[s.jsx(Xe,{}),s.jsx(Xe,{})]}),children:s.jsx(un,{})}),t[0]=e):e=t[0],e}function hn(t){const e=L.c(11),{project:n}=t,o=n.ui?.themeColor??"#60a5fa";if(n.ui?.icon){let d;return e[0]!==n.ui.icon?(d=s.jsx("img",{src:n.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=n.ui.icon,e[1]=d):d=e[1],d}let i;e[2]!==o?(i={backgroundColor:o},e[2]=o,e[3]=i):i=e[3];let a;e[4]!==n.name?(a=n.name.charAt(0).toUpperCase(),e[4]=n.name,e[5]=a):a=e[5];let r;e[6]!==a?(r=s.jsx("span",{className:"text-[10px] font-medium text-white",children:a}),e[6]=a,e[7]=r):r=e[7];let l;return e[8]!==i||e[9]!==r?(l=s.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:i,children:r}),e[8]=i,e[9]=r,e[10]=l):l=e[10],l}function gn(t){const e=L.c(14),{project:n}=t,o=Re(),{org:i}=he();let a;e[0]!==o||e[1]!==i.slug||e[2]!==n.slug?(a=()=>{o({to:"/$org/$project",params:{org:i.slug,project:n.slug}})},e[0]=o,e[1]=i.slug,e[2]=n.slug,e[3]=a):a=e[3];let r;e[4]!==n?(r=s.jsx(hn,{project:n}),e[4]=n,e[5]=r):r=e[5];let l;e[6]!==n.name?(l=s.jsx("span",{className:"truncate flex-1 group-data-[collapsible=icon]:hidden",children:n.name}),e[6]=n.name,e[7]=l):l=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(As,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity group-data-[collapsible=icon]:hidden"}),e[8]=d):d=e[8];let c;return e[9]!==n.name||e[10]!==a||e[11]!==r||e[12]!==l?(c=s.jsx(re,{children:s.jsxs(Fe,{onClick:a,tooltip:n.name,children:[r,l,d]})}),e[9]=n.name,e[10]=a,e[11]=r,e[12]=l,e[13]=c):c=e[13],c}function jn(){const t=L.c(55),{org:e}=he(),{data:n,isLoading:o}=ut(e.id),[i,a]=O.useState(!0),[r,l]=O.useState(!1);let d,c,m,u,f,h,p,j,g,k,x,b,v;if(t[0]!==o||t[1]!==i||t[2]!==n){v=Symbol.for("react.early_return_sentinel");e:{const D=n?.filter(Nn)??[];if(o){let R;t[16]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(re,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(se,{className:"h-4 w-4 rounded"}),s.jsx(se,{className:"h-4 flex-1"})]})}),t[16]=R):R=t[16];let ee;t[17]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Pe,{className:"py-0 px-0",children:s.jsx(Ie,{children:s.jsxs(me,{className:"gap-0.5",children:[R,s.jsx(re,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(se,{className:"h-4 w-4 rounded"}),s.jsx(se,{className:"h-4 flex-1"})]})})]})})}),t[17]=ee):ee=t[17],v=ee;break e}b="group/projects-section mt-2",f=es,k=i,x=a,u=Pe,g="py-0 px-0",m=Ie,c=me,p="gap-0.5";let H;t[18]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Projects"}),t[18]=H):H=t[18];const $=!i&&"-rotate-90";let P;t[19]!==$?(P=K("text-muted-foreground shrink-0 transition-transform duration-200",$),t[19]=$,t[20]=P):P=t[20];let C;t[21]!==P?(C=s.jsx(ts,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex flex-1 items-center gap-1 cursor-pointer min-w-0",children:[H,s.jsx(xt,{size:12,className:P})]})}),t[21]=P,t[22]=C):C=t[22];let T;t[23]===Symbol.for("react.memo_cache_sentinel")?(T=()=>l(!0),t[23]=T):T=t[23];let A;t[24]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("button",{type:"button",onClick:T,title:"Create new project",className:"opacity-0 group-hover/projects-section:opacity-100 transition-opacity text-muted-foreground hover:text-foreground flex items-center justify-center h-4 rounded shrink-0",children:s.jsx(ze,{size:16})}),t[24]=A):A=t[24],t[25]!==C?(j=s.jsx(re,{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs("div",{className:"flex h-6 w-full items-center gap-1 rounded-md pl-1.5 pr-0.5 hover:bg-sidebar-accent transition-colors",children:[C,A]})}),t[25]=C,t[26]=j):j=t[26],d=ss,h=D.length===0?s.jsx(re,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):D.map(bn)}t[0]=o,t[1]=i,t[2]=n,t[3]=d,t[4]=c,t[5]=m,t[6]=u,t[7]=f,t[8]=h,t[9]=p,t[10]=j,t[11]=g,t[12]=k,t[13]=x,t[14]=b,t[15]=v}else d=t[3],c=t[4],m=t[5],u=t[6],f=t[7],h=t[8],p=t[9],j=t[10],g=t[11],k=t[12],x=t[13],b=t[14],v=t[15];if(v!==Symbol.for("react.early_return_sentinel"))return v;let N;t[27]!==d||t[28]!==h?(N=s.jsx(d,{children:h}),t[27]=d,t[28]=h,t[29]=N):N=t[29];let y;t[30]!==c||t[31]!==p||t[32]!==j||t[33]!==N?(y=s.jsxs(c,{className:p,children:[j,N]}),t[30]=c,t[31]=p,t[32]=j,t[33]=N,t[34]=y):y=t[34];let S;t[35]!==m||t[36]!==y?(S=s.jsx(m,{children:y}),t[35]=m,t[36]=y,t[37]=S):S=t[37];let z;t[38]!==u||t[39]!==S||t[40]!==g?(z=s.jsx(u,{className:g,children:S}),t[38]=u,t[39]=S,t[40]=g,t[41]=z):z=t[41];let M;t[42]!==f||t[43]!==z||t[44]!==k||t[45]!==x?(M=s.jsx(f,{open:k,onOpenChange:x,children:z}),t[42]=f,t[43]=z,t[44]=k,t[45]=x,t[46]=M):M=t[46];let E;t[47]!==M||t[48]!==b?(E=s.jsx("div",{className:b,children:M}),t[47]=M,t[48]=b,t[49]=E):E=t[49];let I;t[50]!==r?(I=s.jsx(dt,{open:r,onOpenChange:l}),t[50]=r,t[51]=I):I=t[51];let F;return t[52]!==E||t[53]!==I?(F=s.jsxs(s.Fragment,{children:[E,I]}),t[52]=E,t[53]=I,t[54]=F):F=t[54],F}function bn(t){return s.jsx(gn,{project:t},t.id)}function Nn(t){return t.slug!==te}function vn(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(O.Suspense,{fallback:s.jsx(Pe,{className:"py-0 px-0",children:s.jsx(Ie,{children:s.jsx(me,{className:"gap-0.5",children:s.jsx(re,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(se,{className:"h-4 w-4 rounded"}),s.jsx(se,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(jn,{})}),t[0]=e):e=t[0],e}function yn(t){const e=L.c(15),{onCreateProject:n}=t,[o]=Ae(),i=Es(),{locator:a}=he();let r;e[0]!==a?(r=Be.isOrgAdminProject(a),e[0]=a,e[1]=r):r=e[1];const l=r;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(qe.Skeleton,{}),e[2]=d):d=e[2];let c;e[3]!==n?(c=s.jsx(O.Suspense,{fallback:d,children:s.jsx(qe,{onCreateProject:n})}),e[3]=n,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(dn,{}),e[5]=m):m=e[5];let u;e[6]!==l||e[7]!==o?(u=l?o.experimental_projects?s.jsx(vn,{}):null:s.jsx(pn,{}),e[6]=l,e[7]=o,e[8]=u):u=e[8];let f;e[9]!==u?(f=s.jsx(ct,{children:s.jsx(O.Suspense,{fallback:null,children:u})}),e[9]=u,e[10]=f):f=e[10];let h;return e[11]!==i||e[12]!==c||e[13]!==f?(h=s.jsx(zt,{sections:i,header:c,footer:m,additionalContent:f}),e[11]=i,e[12]=c,e[13]=f,e[14]=h):h=e[14],h}function Sn(){const t=L.c(2),n=Ue().location.href;let o;return t[0]!==n?(o=s.jsx(Ut,{to:"/login",search:{next:n},replace:!0}),t[0]=n,t[1]=o):o=t[1],o}function kn(t){const e=L.c(6),{children:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Et,{children:s.jsx(tt,{})}),e[0]=o):o=e[0];let i;e[1]!==n?(i=s.jsx(Dt,{children:n}),e[1]=n,e[2]=i):i=e[2];let a;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Rt,{children:s.jsx(Sn,{})}),e[3]=a):a=e[3];let r;return e[4]!==i?(r=s.jsxs(s.Fragment,{children:[o,i,a]}),e[4]=i,e[5]=r):r=e[5],r}function _n(t){const e=L.c(10),{children:n,className:o}=t,[,i]=O.useTransition();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=Ye.decoChatPanelWidth(),e[0]=a):a=e[0];const[r,l]=Ke(a,30);let d;e[1]!==l?(d=f=>i(()=>l(f)),e[1]=l,e[2]=d):d=e[2];const c=d;let m;e[3]!==o?(m=K("min-w-0",o),e[3]=o,e[4]=m):m=e[4];let u;return e[5]!==r||e[6]!==n||e[7]!==c||e[8]!==m?(u=s.jsx(vt,{defaultSize:r,minSize:20,className:m,onResize:c,children:n}),e[5]=r,e[6]=n,e[7]=c,e[8]=m,e[9]=u):u=e[9],u}function Cn(t){const e=L.c(5),{children:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ye.sidebarOpen(),e[0]=o):o=e[0];const[i,a]=Ke(o,!0);let r;return e[1]!==n||e[2]!==a||e[3]!==i?(r=s.jsx(Kt,{open:i,onOpenChange:a,children:n}),e[1]=n,e[2]=a,e[3]=i,e[4]=r):r=e[4],r}function wn(t){const e=L.c(24),{isStudio:n,isHomeRoute:o,onCreateProject:i}=t,[a]=Ve();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Ye.decoChatPanelWidth(),e[0]=r):r=e[0];const[l]=Ke(r,30),[d]=Ae(),c=n&&d.experimental_projects?"":void 0,m=`${l}cqi`;let u;e[1]!==m?(u={"--sidebar-width":"13.5rem","--sidebar-width-mobile":"11rem","--chat-panel-w":m},e[1]=m,e[2]=u):u=e[2];const f=u;let h;e[3]!==i?(h=s.jsx(yn,{onCreateProject:i}),e[3]=i,e[4]=h):h=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},e[5]=p):p=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j={overflow:"visible"},e[6]=j):j=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g={overflow:"visible"},e[7]=g):g=e[7];const k=a&&"rounded-tr-[0.75rem] border-r";let x;e[8]!==k?(x=K("flex flex-col flex-1 min-h-0 bg-card overflow-hidden","border-t border-l border-sidebar-border","rounded-tl-[0.75rem]","transition-[border-radius] duration-200 ease-[var(--ease-out-quart)]",k),e[8]=k,e[9]=x):x=e[9];let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(st,{})}),e[10]=b):b=e[10];let v;e[11]!==x?(v=s.jsx(vt,{className:"min-w-0 flex flex-col",style:g,children:s.jsx("div",{className:x,children:b})}),e[11]=x,e[12]=v):v=e[12];let N;e[13]!==a||e[14]!==o?(N=!o&&s.jsxs(s.Fragment,{children:[s.jsx(Os,{className:"bg-sidebar"}),s.jsx(_n,{className:K("transition-[max-width] duration-200 ease-[var(--ease-out-quart)] overflow-hidden",a?"max-w-[var(--chat-panel-w)] bg-sidebar":"max-w-0"),children:s.jsx("div",{className:"h-full min-w-[var(--chat-panel-w)] pl-1.5 pr-1.5 pb-1.5",children:s.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden border border-sidebar-border shadow-sm",children:s.jsx(Ls,{})})})})]}),e[13]=a,e[14]=o,e[15]=N):N=e[15];let y;e[16]!==v||e[17]!==N?(y=s.jsx(Yt,{className:"pt-1.5",style:p,children:s.jsxs(Ts,{direction:"horizontal",className:"h-full",style:j,children:[v,N]})}),e[16]=v,e[17]=N,e[18]=y):y=e[18];let S;return e[19]!==y||e[20]!==c||e[21]!==f||e[22]!==h?(S=s.jsxs(Qt,{className:"flex-1 bg-sidebar","data-studio":c,style:f,children:[h,y]}),e[19]=y,e[20]=c,e[21]=f,e[22]=h,e[23]=S):S=e[23],S}function zn(){const{org:t,project:e}=Ge({strict:!1}),n=Ue(),[o,i]=O.useState(!1),a=n.location.pathname===`/${t}/${e}`||n.location.pathname===`/${t}/${e}/`,r=e??te,{data:l}=Ft({queryKey:Ht.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:m}=await ue.organization.setActive({organizationSlug:t});return{org:m,project:{slug:r,isOrgAdmin:r===te}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!l)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx("header",{className:"h-12 flex items-center justify-end px-4 border-b border-border",children:s.jsx(It,{})}),s.jsx(st,{})]});if(!l.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const d={...l,project:{...l.project,slug:r,isOrgAdmin:r===te}},c=r===te;return s.jsxs(Bt,{...d,children:[s.jsx(Cn,{children:s.jsx("div",{className:"flex flex-col h-screen overflow-hidden",children:s.jsx(ne.Provider,{children:s.jsx(wn,{isStudio:c,isHomeRoute:a,onCreateProject:()=>i(!0)})})})}),s.jsx(dt,{open:o,onOpenChange:i})]})}function ai(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(kn,{children:s.jsx(O.Suspense,{fallback:s.jsx(tt,{}),children:s.jsx(zn,{})})}),t[0]=e):e=t[0],e}export{ai as default};
@@ -1 +1 @@
1
- import{c as C,y as d,j as a}from"./index-ClncOz6N.js";import{c as m}from"./button-CcxsPygM.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
1
+ import{c as C,y as d,j as a}from"./index-CzSiUwwv.js";import{c as m}from"./button-Bl7hMmCe.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
@@ -1 +1 @@
1
- import{c as h,e as S,j as o,A as x,S as d,f as j,h as b,a as g,d as y,O as N,N as p}from"./index-ClncOz6N.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=g(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[_,u]of Object.entries(n))u!=null&&r.set(_,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=g(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(d,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(d,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
1
+ import{c as h,e as S,j as o,A as x,S as d,f as j,h as b,a as g,d as y,O as N,N as p}from"./index-CzSiUwwv.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=g(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[_,u]of Object.entries(n))u!=null&&r.set(_,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=g(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(d,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(d,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
@@ -1 +1 @@
1
- import{r as c,j as i,a9 as C,at as y,ar as T,av as I,az as M,aA as z,ay as A,c as H}from"./index-ClncOz6N.js";import{c as g}from"./button-CcxsPygM.js";var b="Switch",[U]=A(b),[q,L]=U(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(s.onClick,m=>{N(B=>!B),S&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(s){return s?"checked":"unchecked"}var $=E,D=R;function X(s){const e=H.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
1
+ import{r as c,j as i,a9 as C,at as y,ar as T,av as I,az as M,aA as z,ay as A,c as H}from"./index-CzSiUwwv.js";import{c as g}from"./button-Bl7hMmCe.js";var b="Switch",[U]=A(b),[q,L]=U(b),E=c.forwardRef((s,e)=>{const{__scopeSwitch:t,name:r,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=s,[p,h]=c.useState(null),v=y(e,m=>h(m)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:b});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(s.onClick,m=>{N(B=>!B),S&&(x.current=m.isPropagationStopped(),x.current||m.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=c.forwardRef((s,e)=>{const{__scopeSwitch:t,...r}=s,a=L(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:s,control:e,checked:t,bubbles:r=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(s){return s?"checked":"unchecked"}var $=E,D=R;function X(s){const e=H.c(9);let t,r;e[0]!==s?({className:t,...r}=s,e[0]=s,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==a?(o=i.jsx($,{"data-slot":"switch",className:a,...r,children:n}),e[6]=r,e[7]=a,e[8]=o):o=e[8],o}export{X as S};
@@ -1 +1 @@
1
- import{c as r,j as c}from"./index-ClncOz6N.js";import{c as i}from"./button-CcxsPygM.js";function b(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-background",children:c.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-background",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function u(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{u as T,f as a,m as b,x as c,p as d,b as e};
1
+ import{c as r,j as c}from"./index-CzSiUwwv.js";import{c as i}from"./button-Bl7hMmCe.js";function b(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-background",children:c.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-background",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function u(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{u as T,f as a,m as b,x as c,p as d,b as e};
@@ -0,0 +1 @@
1
+ import{c as B,j as r,r as F,u as O,b as W,n as Q,K as Y}from"./index-CzSiUwwv.js";import"./index-CSf23Q8F.js";import{C as G,a as J}from"./collection-table-wrapper-DS44ibQ8.js";import{C as X,E as I}from"./empty-state-yzpNvfA-.js";import{E as Z}from"./error-boundary-GB3TovJQ.js";import{P as h}from"./index-BrH9wXxf.js";import{u as ee,U as te}from"./use-list-state-CYucxtoX.js";import{f as re}from"./format-time-CMKyl-GC.js";import{a as se,u as oe}from"./constants-DY_BU6PR.js";import{B as ie,a as ae,b as le,c as ne}from"./breadcrumb-Cipoy1eR.js";import{B as f}from"./badge-Bt6C7wEJ.js";import{i as ce}from"./AlertCircle-FL98lGLa.js";import{c as me}from"./AlertOctagon-B33KdaLi.js";import{n as V}from"./CheckDone01-DJLuFHxJ.js";import{i as de}from"./Check-BY-DCpO_.js";import{s as pe}from"./Clock-Drw10Mc_.js";import{i as R}from"./Loading01-CWwskqmx.js";import{u as ue}from"./use-deco-chat-open-BuMsTBnv.js";import"./button-Bl7hMmCe.js";import"./popover-Ca9Cyzf7.js";import"./spinner-B-FWJ8nx.js";import"./tooltip-CLbmwjfd.js";import"./index-Dps5khDb.js";import"./use-mcp-prompts-DMC1gnwj.js";import"./useQuery-CTct6gOY.js";import"./dialog-BTs7spED.js";import"./form-Dxe8J4dP.js";import"./label-A7ibpcPd.js";import"./input-CAPxG1rh.js";import"./integration-icon-jbm4PmZt.js";import"./Container-B7qKC3EI.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-xougxkbC.js";import"./ChevronDown-FdgQzkaa.js";import"./Edit01-CUcmwNxC.js";import"./Users03-B6oew679.js";import"./XCircle-WTPrrNWD.js";import"./AlertTriangle-DteHmOG1.js";import"./ArrowLeft-CMuGBwkE.js";import"./use-copy-BZqI2HfR.js";import"./Code01-CowHxp14.js";import"./use-virtual-mcp-CqdRLJoL.js";import"./use-connection-CdIwTzRh.js";import"./useMutation-BYl8vvsl.js";import"./SearchMd-BMO4jqwv.js";import"./use-create-virtual-mcp-DKrayFIg.js";import"./ChevronRight-DYxU3E_q.js";import"./marked.esm-BaswSlok.js";import"./markdown-DTO-ngpn.js";import"./Copy01-B_7d0dwb.js";import"./tools-list-CBpacE22.js";import"./card-BMQBEGUR.js";import"./Eye-Rq15dwoo.js";import"./Globe02-BIRPCTiD.js";import"./RefreshCw01-dI5kYugT.js";import"./layout-DHncYg0M.js";import"./generate-id-Dyweu44Y.js";import"./Trash01-BKhksYCP.js";import"./dropdown-menu-Dk3PdiLq.js";import"./Grid01-CcUd9dpu.js";import"./List-BkcTlONj.js";import"./table-DGDNn7mH.js";import"./avatar-B-mPVtLH.js";import"./use-view-mode-CVN4cPaD.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-llm-CX9QGbjZ.js";import"./use-binding-D36c91MK.js";import"./binder-BvXUsKRF.js";import"./localstorage-keys-Cc9e53sU.js";import"./select-CKDoCTJO.js";import"./File06-xsY7vCFb.js";import"./Image01-CiGMIZf1.js";import"./RefreshCcw01-BzY8N8T3.js";import"./Settings01-CRoxTuTO.js";import"./useSuspenseInfiniteQuery-DJZPFUMY.js";import"./infiniteQueryObserver-Ctmp4byY.js";function fe(e){const s=B.c(7),{status:a}=e;switch(a){case"in_progress":{let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"secondary",className:"gap-1",children:[r.jsx(R,{size:11,className:"animate-spin"}),"Running"]}),s[0]=o):o=s[0],o}case"completed":{let o;return s[1]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"success",className:"gap-1",children:[r.jsx(de,{size:11}),"Completed"]}),s[1]=o):o=s[1],o}case"requires_action":{let o;return s[2]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"outline",className:"gap-1 text-blue-600 border-blue-600/40",children:[r.jsx(ce,{size:11}),"Waiting for input"]}),s[2]=o):o=s[2],o}case"failed":{let o;return s[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"destructive",className:"gap-1",children:[r.jsx(me,{size:11}),"Failed"]}),s[3]=o):o=s[3],o}case"expired":{let o;return s[4]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsxs(f,{variant:"outline",className:"gap-1 text-warning border-warning/40",children:[r.jsx(pe,{size:11}),"Timed out"]}),s[4]=o):o=s[4],o}default:{let o;return s[5]!==a?(o=r.jsx(f,{variant:"secondary",className:"gap-1",children:a}),s[5]=a,s[6]=o):o=s[6],o}}}function he(){const e=B.c(49),{org:s,project:a,locator:o}=O();let x;e[0]!==s.id?(x={connectionId:se,orgId:s.id},e[0]=s.id,e[1]=x):x=e[1];const g=oe(x),v=W(),{switchToThread:k}=ue();let j;e[2]!==s.slug?(j={namespace:s.slug,resource:"tasks",defaultSortKey:"updated_at",defaultViewMode:"table"},e[2]=s.slug,e[3]=j):j=e[3];const t=ee(j);let l;e[4]!==o?(l=Y.taskThreads(o),e[4]=o,e[5]=l):l=e[5];let n;e[6]!==g?(n=async()=>{if(!g)throw new Error("MCP client is not available");const i=await g.callTool({name:"COLLECTION_THREADS_LIST",arguments:{limit:100,offset:0}});return(i.structuredContent??i).items??[]},e[6]=g,e[7]=n):n=e[7];let y;e[8]!==l||e[9]!==n?(y={queryKey:l,queryFn:n,staleTime:3e4},e[8]=l,e[9]=n,e[10]=y):y=e[10];const{data:D}=Q(y);let S;if(e[11]!==D||e[12]!==t){const i=D.filter(Se),z=t.searchTerm?i.filter(M=>M.title.toLowerCase().includes(t.searchTerm.toLowerCase())):i;let T;e[14]!==t?(T=(M,H)=>{const{sortKey:L,sortDirection:P}=t;if(!L||!P)return 0;const U=String(M[L]??""),q=String(H[L]??""),$=U.localeCompare(q);return P==="asc"?$:-$},e[14]=t,e[15]=T):T=e[15],S=[...z].sort(T),e[11]=D,e[12]=t,e[13]=S}else S=e[13];const K=S;let b;e[16]!==v||e[17]!==s.slug||e[18]!==a.slug||e[19]!==k?(b=async i=>{await k(i.id),v({to:"/$org/$project",params:{org:s.slug,project:a.slug}})},e[16]=v,e[17]=s.slug,e[18]=a.slug,e[19]=k,e[20]=b):b=e[20];const E=b;let _;e[21]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"title",header:"Title",render:ye,cellClassName:"flex-1 min-w-0",sortable:!0},{id:"status",header:"Status",render:je,cellClassName:"w-40 shrink-0",sortable:!0},{id:"created_by",header:"Created by",render:ge,cellClassName:"w-32 shrink-0"},{id:"updated_at",header:"Updated",render:xe,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0}],e[21]=_):_=e[21];const A=_;let w;e[22]===Symbol.for("react.memo_cache_sentinel")?(w=r.jsx(h.Header.Left,{children:r.jsx(ie,{children:r.jsx(ae,{children:r.jsx(le,{children:r.jsx(ne,{children:"Tasks"})})})})}),e[22]=w):w=e[22];let C;e[23]===Symbol.for("react.memo_cache_sentinel")?(C=[{id:"title",label:"Title"},{id:"status",label:"Status"},{id:"updated_at",label:"Updated"}],e[23]=C):C=e[23];let c;e[24]!==t.handleSort||e[25]!==t.setViewMode||e[26]!==t.sortDirection||e[27]!==t.sortKey||e[28]!==t.viewMode?(c=r.jsxs(h.Header,{children:[w,r.jsx(h.Header.Right,{children:r.jsx(G,{viewMode:t.viewMode,onViewModeChange:t.setViewMode,sortKey:t.sortKey,sortDirection:t.sortDirection,onSort:t.handleSort,sortOptions:C})})]}),e[24]=t.handleSort,e[25]=t.setViewMode,e[26]=t.sortDirection,e[27]=t.sortKey,e[28]=t.viewMode,e[29]=c):c=e[29];let m;e[30]!==t?(m=i=>{i.key==="Escape"&&(t.setSearch(""),i.target.blur())},e[30]=t,e[31]=m):m=e[31];let d;e[32]!==t.search||e[33]!==t.setSearch||e[34]!==m?(d=r.jsx(X,{value:t.search,onChange:t.setSearch,placeholder:"Search tasks...",onKeyDown:m}),e[32]=t.search,e[33]=t.setSearch,e[34]=m,e[35]=d):d=e[35];let p;e[36]!==t.search?(p=t.search?r.jsx(I,{image:r.jsx(V,{size:36,className:"text-muted-foreground"}),title:"No tasks found",description:`No tasks match "${t.search}"`}):r.jsx(I,{image:r.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-muted",children:r.jsx(V,{size:32,className:"text-muted-foreground"})}),title:"No tasks yet",description:"Tasks will appear here when agents start processing work."}),e[36]=t.search,e[37]=p):p=e[37];let u;e[38]!==t.handleSort||e[39]!==t.sortDirection||e[40]!==t.sortKey||e[41]!==E||e[42]!==p||e[43]!==K?(u=r.jsx(h.Content,{children:r.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r.jsx(J,{columns:A,data:K,isLoading:!1,sortKey:t.sortKey,sortDirection:t.sortDirection,onSort:t.handleSort,onRowClick:E,emptyState:p})})}),e[38]=t.handleSort,e[39]=t.sortDirection,e[40]=t.sortKey,e[41]=E,e[42]=p,e[43]=K,e[44]=u):u=e[44];let N;return e[45]!==c||e[46]!==d||e[47]!==u?(N=r.jsxs(h,{children:[c,d,u]}),e[45]=c,e[46]=d,e[47]=u,e[48]=N):N=e[48],N}function xe(e){return r.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?re(new Date(e.updated_at)):"—"})}function ge(e){return r.jsx(te,{id:e.created_by,size:"3xs"})}function je(e){return r.jsx(fe,{status:e.status??"completed"})}function ye(e){return r.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})}function Se(e){return!e.hidden}function Ut(){const e=B.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx(Z,{children:r.jsx(F.Suspense,{fallback:r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(R,{size:32,className:"animate-spin text-muted-foreground"})}),children:r.jsx(he,{})})}),e[0]=s):s=e[0],s}export{Ut as default};
@@ -1 +1 @@
1
- import{c as o,j as n}from"./index-ClncOz6N.js";import{c as l}from"./button-CcxsPygM.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground 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 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
1
+ import{c as o,j as n}from"./index-CzSiUwwv.js";import{c as l}from"./button-Bl7hMmCe.js";function u(s){const e=o.c(8);let r,i;e[0]!==s?({className:r,...i}=s,e[0]=s,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let t;e[3]!==r?(t=l("border-input placeholder:text-muted-foreground 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 flex field-sizing-content min-h-16 w-full rounded-xl border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),e[3]=r,e[4]=t):t=e[4];let a;return e[5]!==i||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...i}),e[5]=i,e[6]=t,e[7]=a):a=e[7],a}export{u as T};
@@ -1,4 +1,4 @@
1
- import{r as x,c as At,b as yn,u as bn,j as s,O as kt,t as ne}from"./index-ClncOz6N.js";import{B as xn}from"./badge-DGPPcvVD.js";import{B as I,c as U,b as Dt}from"./button-CcxsPygM.js";import{b as lt,P as ct,a as ut}from"./popover-mZJnuJjI.js";import{T as Ge,a as Qe,b as Xe}from"./tooltip-TMQButig.js";import{i as Je}from"./Check-E8-Inf76.js";import{a as $e}from"./Copy01-DKHGVRMd.js";import{n as Mt}from"./Download01-DnJPBc-y.js";import{i as wn}from"./FilterLines-DwLmRqdf.js";import{i as Nn}from"./Key01-vyx6BDY8.js";import{i as kn}from"./Play-BP_59zaK.js";import{M as _t,n as Dn,a as Mn}from"./scroll-area-C8UIsNZT.js";import{t as _n}from"./ChevronDown-CtTw1zlt.js";import{s as jn}from"./Clock-ElxTVbMS.js";import{i as Cn}from"./ChevronRight-Cj97ppFv.js";import{I as jt}from"./input-BdH38qw4.js";const Ht=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"m15 18-6-6 6-6"}));Ht.displayName="ChevronLeft";const Sn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M11 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 22 5.12 22 6.8 22h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V13M8 16h1.675c.489 0 .733 0 .963-.055.204-.05.4-.13.579-.24.201-.123.374-.296.72-.642L21.5 5.5a2.121 2.121 0 0 0-3-3l-9.563 9.563c-.346.346-.519.519-.642.72a2 2 0 0 0-.24.579c-.055.23-.055.474-.055.963V16Z"}));Sn.displayName="Edit05";const qt=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M4 7c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C5.602 4 6.068 4 7 4h10c.932 0 1.398 0 1.765.152a2 2 0 0 1 1.083 1.083C20 5.602 20 6.068 20 7M9 20h6M12 4v16"}));qt.displayName="Type01";const Ct={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function On(t){return t.filter(e=>e.key.trim()).map(e=>{const n=encodeURIComponent(e.key.trim()),r=encodeURIComponent(e.value||"");return`${n}:${e.operator}:${r}`}).join(",")}function Ao(t){return t?t.split(",").map(e=>{const[n,r,...a]=e.split(":");return{key:decodeURIComponent(n||""),operator:r||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ho(t){return t.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{r as x,c as At,b as yn,u as bn,j as s,O as kt,t as ne}from"./index-CzSiUwwv.js";import{B as xn}from"./badge-Bt6C7wEJ.js";import{B as I,c as U,b as Dt}from"./button-Bl7hMmCe.js";import{b as lt,P as ct,a as ut}from"./popover-Ca9Cyzf7.js";import{T as Ge,a as Qe,b as Xe}from"./tooltip-CLbmwjfd.js";import{i as Je}from"./Check-BY-DCpO_.js";import{a as $e}from"./Copy01-B_7d0dwb.js";import{n as Mt}from"./Download01-IPqVm26W.js";import{i as wn}from"./FilterLines-CJgE2bmA.js";import{i as Nn}from"./Key01-CcfhRF0P.js";import{i as kn}from"./Play-sMJsBLST.js";import{M as _t,n as Dn,a as Mn}from"./scroll-area-BfJ2ZkbI.js";import{t as _n}from"./ChevronDown-FdgQzkaa.js";import{s as jn}from"./Clock-Drw10Mc_.js";import{i as Cn}from"./ChevronRight-DYxU3E_q.js";import{I as jt}from"./input-CAPxG1rh.js";const Ht=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"m15 18-6-6 6-6"}));Ht.displayName="ChevronLeft";const Sn=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M11 4H6.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C2 6.28 2 7.12 2 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C4.28 22 5.12 22 6.8 22h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.72 20 18.88 20 17.2V13M8 16h1.675c.489 0 .733 0 .963-.055.204-.05.4-.13.579-.24.201-.123.374-.296.72-.642L21.5 5.5a2.121 2.121 0 0 0-3-3l-9.563 9.563c-.346.346-.519.519-.642.72a2 2 0 0 0-.24.579c-.055.23-.055.474-.055.963V16Z"}));Sn.displayName="Edit05";const qt=({size:t=24,color:e="currentColor",...n})=>x.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},x.createElement("path",{d:"M4 7c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C5.602 4 6.068 4 7 4h10c.932 0 1.398 0 1.765.152a2 2 0 0 1 1.083 1.083C20 5.602 20 6.068 20 7M9 20h6M12 4v16"}));qt.displayName="Type01";const Ct={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function On(t){return t.filter(e=>e.key.trim()).map(e=>{const n=encodeURIComponent(e.key.trim()),r=encodeURIComponent(e.value||"");return`${n}:${e.operator}:${r}`}).join(",")}function Ao(t){return t?t.split(",").map(e=>{const[n,r,...a]=e.split(":");return{key:decodeURIComponent(n||""),operator:r||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ho(t){return t.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function qo(t){return t.trim()?t.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[n,...r]=e.split("=");return{key:n||"",operator:"eq",value:r.join("=")}}if(e.includes("~")){const[n,...r]=e.split("~");return{key:n||"",operator:"contains",value:r.join("~")}}if(e.includes("@")){const[n,...r]=e.split("@");return{key:n||"",operator:"in",value:r.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function zo(t){const e={},n={},r=[],a={};for(const o of t)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(n[o.key]=`%${o.value}%`);break;case"exists":r.push(o.key);break;case"in":o.value&&(a[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(n).length>0?n:void 0,propertyKeys:r.length>0?r:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function St(t){if(!t)return{content:"null",isTruncated:!1,originalSize:4};const e=JSON.stringify(t,null,2),n=e.length;return n<=Ct.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:n}:{content:e.slice(0,Ct.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{r as x,ar as h,j as c,a9 as m,av as k,bm as p,au as M,aw as T,ay as S,aq as A,as as F,y as $,c as P}from"./index-ClncOz6N.js";import{c as C}from"./button-CcxsPygM.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=h({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=S(v,[T]),I=T(),b=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});b.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});b.displayName=v;var[O,q]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=A(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(F,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=q(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),H=b,L=N;const U=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function Q(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function W(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(U({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{Q as T,W as a};
1
+ import{r as x,ar as h,j as c,a9 as m,av as k,bm as p,au as M,aw as T,ay as S,aq as A,as as F,y as $,c as P}from"./index-CzSiUwwv.js";import{c as C}from"./button-Bl7hMmCe.js";var j="Toggle",_=x.forwardRef((a,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...r}=a,[t,o]=h({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":a.disabled?"":void 0,...r,ref:e,onClick:k(a.onClick,()=>{a.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=S(v,[T]),I=T(),b=p.forwardRef((a,e)=>{const{type:l,...s}=a;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});b.displayName=v;var[z,y]=w(v),D=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:a.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...r,ref:e})})}),B=p.forwardRef((a,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...r}=a,[t,o]=h({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:a.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...r,ref:e})})});b.displayName=v;var[O,q]=w(v),R=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:r,dir:t,loop:o=!0,...i}=a,d=I(l),u=A(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(F,{asChild:!0,...d,orientation:r,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((a,e)=>{const l=y(f,a.__scopeToggleGroup),s=q(f,a.__scopeToggleGroup),n=I(a.__scopeToggleGroup),r=l.value.includes(a.value),t=s.disabled||a.disabled,o={...a,pressed:r,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:r,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((a,e)=>{const{__scopeToggleGroup:l,value:s,...n}=a,r=y(f,l),t={role:"radio","aria-checked":a.pressed,"aria-pressed":void 0},o=r.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?r.onItemActivate(s):r.onItemDeactivate(s)}})}),H=b,L=N;const U=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function Q(a){const e=P.c(20);let l,s,n,r,t;e[0]!==a?({className:s,variant:t,size:r,children:l,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==r||e[9]!==t?(i={variant:t,size:r},e[8]=r,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==r||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:o,...n,children:d}),e[14]=n,e[15]=r,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function W(a){const e=P.c(18);let l,s,n,r,t;e[0]!==a?({className:s,children:l,variant:t,size:r,...n}=a,e[0]=a,e[1]=l,e[2]=s,e[3]=n,e[4]=r,e[5]=t):(l=e[1],s=e[2],n=e[3],r=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||r;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==r||e[10]!==t?(u=C(U({variant:o.variant||t,size:o.size||r}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=r,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{Q as T,W as a};
@@ -1 +1 @@
1
- import{c as z,b as F,r as D,j as t,O as J}from"./index-ClncOz6N.js";import{a as q,C as Q}from"./collection-table-wrapper-D8mRH9XX.js";import{E as K,C as X}from"./empty-state-BvzVGw0j.js";import{I as Y}from"./integration-icon-Bw_I-XAE.js";import{B as Z}from"./badge-DGPPcvVD.js";import{C as ee}from"./card-k6wylZpL.js";import{T as te,a as oe,b as se,c as ne}from"./tooltip-TMQButig.js";import{i as re}from"./AlertTriangle-CGGjQU9b.js";import{s as ae}from"./Eye-DPrkOx1m.js";import{s as ie}from"./Globe02-DEZv7rrz.js";import{s as le}from"./RefreshCw01-Be9PrKJk.js";import{V as ce}from"./layout-aRIgHMvp.js";const me=[{key:"readOnlyHint",label:"Read-only",Icon:ae,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:re,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:le,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:ie,variant:"outline"}];function de(o){const e=z.c(11),{annotations:r}=o;if(!r)return null;let a,c,m,d;if(e[0]!==r){d=Symbol.for("react.early_return_sentinel");e:{const u=me.filter(h=>r[h.key]===!0);if(u.length===0){d=null;break e}a=ne,c="flex gap-1 flex-nowrap",m=u.map(fe)}e[0]=r,e[1]=a,e[2]=c,e[3]=m,e[4]=d}else a=e[1],c=e[2],m=e[3],d=e[4];if(d!==Symbol.for("react.early_return_sentinel"))return d;let f;e[5]!==c||e[6]!==m?(f=t.jsx("div",{className:c,children:m}),e[5]=c,e[6]=m,e[7]=f):f=e[7];let p;return e[8]!==a||e[9]!==f?(p=t.jsx(a,{children:f}),e[8]=a,e[9]=f,e[10]=p):p=e[10],p}function fe(o){const{label:e,Icon:r,variant:a}=o;return t.jsxs(te,{children:[t.jsx(oe,{asChild:!0,children:t.jsx(Z,{asChild:!0,variant:a,className:"size-6 p-1",children:t.jsx(r,{})})}),t.jsx(se,{children:e})]},e)}function Le(o){const e=z.c(40),{tools:r,connectionId:a,org:c,onToolClick:m,showToolbar:d,emptyMessage:f,isLoading:p}=o,u=d===void 0?!0:d,h=f===void 0?"This connection doesn't have any tools yet.":f,E=p===void 0?!1:p,R=F(),[i,H]=D.useState(""),[x,G]=D.useState("table"),[n,M]=D.useState("name"),[l,V]=D.useState("asc");let T;e[0]!==l||e[1]!==n?(T=s=>{n===s?(V(je),l==="desc"&&M(void 0)):(M(s),V("asc"))},e[0]=l,e[1]=n,e[2]=T):T=e[2];const g=T;let S;e[3]!==a||e[4]!==R||e[5]!==m||e[6]!==c?(S=s=>{m?m(s):a&&c&&R({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:c,project:J,connectionId:a,collectionName:"tools",itemId:encodeURIComponent(s.name)}})},e[3]=a,e[4]=R,e[5]=m,e[6]=c,e[7]=S):S=e[7];const w=S;let I;if(e[8]!==i||e[9]!==l||e[10]!==n||e[11]!==r){const s=!r||r.length===0?[]:i.trim()?(()=>{const O=i.toLowerCase();return r.filter(C=>C.name.toLowerCase().includes(O)||C.description&&C.description.toLowerCase().includes(O))})():r;I=!n||!l?s:[...s].sort((O,C)=>{const U=O[n]||"",W=C[n]||"",B=String(U).localeCompare(String(W));return l==="asc"?B:-B}),e[8]=i,e[9]=l,e[10]=n,e[11]=r,e[12]=I}else I=e[12];const v=I;let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"name",header:"Name",render:ge,sortable:!0},{id:"annotations",header:"Hints",render:xe,cellClassName:"w-32 shrink-0"},{id:"description",header:"Description",render:he,cellClassName:"flex-1",sortable:!0}],e[13]=_):_=e[13];const A=_;let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=A.filter(ue).map(pe),e[14]=k):k=e[14];const P=k;let j;e[15]!==g||e[16]!==u||e[17]!==l||e[18]!==n||e[19]!==x?(j=u&&t.jsx(ce,{children:t.jsx(Q,{viewMode:x,onViewModeChange:G,sortKey:n,sortDirection:l,onSort:g,sortOptions:P})}),e[15]=g,e[16]=u,e[17]=l,e[18]=n,e[19]=x,e[20]=j):j=e[20];let $;e[21]===Symbol.for("react.memo_cache_sentinel")?($=s=>{s.key==="Escape"&&(H(""),s.target.blur())},e[21]=$):$=e[21];let y;e[22]!==i?(y=t.jsx(X,{value:i,onChange:H,placeholder:"Search tools...",onKeyDown:$}),e[22]=i,e[23]=y):y=e[23];let N;e[24]!==h||e[25]!==g||e[26]!==w||e[27]!==E||e[28]!==i||e[29]!==l||e[30]!==n||e[31]!==v||e[32]!==x?(N=x==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:v.length===0?t.jsx(K,{image:null,title:i?"No tools found":"No tools available",description:i?"Try adjusting your search terms":h}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:v.map(s=>t.jsx(ee,{className:"cursor-pointer transition-colors",onClick:()=>w(s),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(Y,{icon:null,name:s.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:s.description||"No description"})]})]})},s.name))})}):t.jsx(q,{columns:A,data:v,isLoading:E,sortKey:n,sortDirection:l,onSort:g,onRowClick:s=>w(s),emptyState:t.jsx(K,{image:null,title:i?"No tools found":"No tools available",description:i?"Try adjusting your search terms":h})}),e[24]=h,e[25]=g,e[26]=w,e[27]=E,e[28]=i,e[29]=l,e[30]=n,e[31]=v,e[32]=x,e[33]=N):N=e[33];let b;e[34]!==y||e[35]!==N?(b=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,N]}),e[34]=y,e[35]=N,e[36]=b):b=e[36];let L;return e[37]!==b||e[38]!==j?(L=t.jsxs(t.Fragment,{children:[j,b]}),e[37]=b,e[38]=j,e[39]=L):L=e[39],L}function pe(o){return{id:o.id,label:typeof o.header=="string"?o.header:o.id}}function ue(o){return o.sortable}function he(o){return t.jsx("span",{className:"text-sm text-foreground",children:o.description||"—"})}function xe(o){return t.jsx(de,{annotations:o.annotations})}function ge(o){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:o.name})}function je(o){return o==="asc"?"desc":o==="desc"?null:"asc"}export{de as T,Le as a};
1
+ import{c as z,b as F,r as D,j as t,O as J}from"./index-CzSiUwwv.js";import{a as q,C as Q}from"./collection-table-wrapper-DS44ibQ8.js";import{E as K,C as X}from"./empty-state-yzpNvfA-.js";import{I as Y}from"./integration-icon-jbm4PmZt.js";import{B as Z}from"./badge-Bt6C7wEJ.js";import{C as ee}from"./card-BMQBEGUR.js";import{T as te,a as oe,b as se,c as ne}from"./tooltip-CLbmwjfd.js";import{i as re}from"./AlertTriangle-DteHmOG1.js";import{s as ae}from"./Eye-Rq15dwoo.js";import{s as ie}from"./Globe02-BIRPCTiD.js";import{s as le}from"./RefreshCw01-dI5kYugT.js";import{V as ce}from"./layout-DHncYg0M.js";const me=[{key:"readOnlyHint",label:"Read-only",Icon:ae,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:re,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:le,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:ie,variant:"outline"}];function de(o){const e=z.c(11),{annotations:r}=o;if(!r)return null;let a,c,m,d;if(e[0]!==r){d=Symbol.for("react.early_return_sentinel");e:{const u=me.filter(h=>r[h.key]===!0);if(u.length===0){d=null;break e}a=ne,c="flex gap-1 flex-nowrap",m=u.map(fe)}e[0]=r,e[1]=a,e[2]=c,e[3]=m,e[4]=d}else a=e[1],c=e[2],m=e[3],d=e[4];if(d!==Symbol.for("react.early_return_sentinel"))return d;let f;e[5]!==c||e[6]!==m?(f=t.jsx("div",{className:c,children:m}),e[5]=c,e[6]=m,e[7]=f):f=e[7];let p;return e[8]!==a||e[9]!==f?(p=t.jsx(a,{children:f}),e[8]=a,e[9]=f,e[10]=p):p=e[10],p}function fe(o){const{label:e,Icon:r,variant:a}=o;return t.jsxs(te,{children:[t.jsx(oe,{asChild:!0,children:t.jsx(Z,{asChild:!0,variant:a,className:"size-6 p-1",children:t.jsx(r,{})})}),t.jsx(se,{children:e})]},e)}function Le(o){const e=z.c(40),{tools:r,connectionId:a,org:c,onToolClick:m,showToolbar:d,emptyMessage:f,isLoading:p}=o,u=d===void 0?!0:d,h=f===void 0?"This connection doesn't have any tools yet.":f,E=p===void 0?!1:p,R=F(),[i,H]=D.useState(""),[x,G]=D.useState("table"),[n,M]=D.useState("name"),[l,V]=D.useState("asc");let T;e[0]!==l||e[1]!==n?(T=s=>{n===s?(V(je),l==="desc"&&M(void 0)):(M(s),V("asc"))},e[0]=l,e[1]=n,e[2]=T):T=e[2];const g=T;let S;e[3]!==a||e[4]!==R||e[5]!==m||e[6]!==c?(S=s=>{m?m(s):a&&c&&R({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:c,project:J,connectionId:a,collectionName:"tools",itemId:encodeURIComponent(s.name)}})},e[3]=a,e[4]=R,e[5]=m,e[6]=c,e[7]=S):S=e[7];const w=S;let I;if(e[8]!==i||e[9]!==l||e[10]!==n||e[11]!==r){const s=!r||r.length===0?[]:i.trim()?(()=>{const O=i.toLowerCase();return r.filter(C=>C.name.toLowerCase().includes(O)||C.description&&C.description.toLowerCase().includes(O))})():r;I=!n||!l?s:[...s].sort((O,C)=>{const U=O[n]||"",W=C[n]||"",B=String(U).localeCompare(String(W));return l==="asc"?B:-B}),e[8]=i,e[9]=l,e[10]=n,e[11]=r,e[12]=I}else I=e[12];const v=I;let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"name",header:"Name",render:ge,sortable:!0},{id:"annotations",header:"Hints",render:xe,cellClassName:"w-32 shrink-0"},{id:"description",header:"Description",render:he,cellClassName:"flex-1",sortable:!0}],e[13]=_):_=e[13];const A=_;let k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=A.filter(ue).map(pe),e[14]=k):k=e[14];const P=k;let j;e[15]!==g||e[16]!==u||e[17]!==l||e[18]!==n||e[19]!==x?(j=u&&t.jsx(ce,{children:t.jsx(Q,{viewMode:x,onViewModeChange:G,sortKey:n,sortDirection:l,onSort:g,sortOptions:P})}),e[15]=g,e[16]=u,e[17]=l,e[18]=n,e[19]=x,e[20]=j):j=e[20];let $;e[21]===Symbol.for("react.memo_cache_sentinel")?($=s=>{s.key==="Escape"&&(H(""),s.target.blur())},e[21]=$):$=e[21];let y;e[22]!==i?(y=t.jsx(X,{value:i,onChange:H,placeholder:"Search tools...",onKeyDown:$}),e[22]=i,e[23]=y):y=e[23];let N;e[24]!==h||e[25]!==g||e[26]!==w||e[27]!==E||e[28]!==i||e[29]!==l||e[30]!==n||e[31]!==v||e[32]!==x?(N=x==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:v.length===0?t.jsx(K,{image:null,title:i?"No tools found":"No tools available",description:i?"Try adjusting your search terms":h}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:v.map(s=>t.jsx(ee,{className:"cursor-pointer transition-colors",onClick:()=>w(s),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(Y,{icon:null,name:s.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:s.description||"No description"})]})]})},s.name))})}):t.jsx(q,{columns:A,data:v,isLoading:E,sortKey:n,sortDirection:l,onSort:g,onRowClick:s=>w(s),emptyState:t.jsx(K,{image:null,title:i?"No tools found":"No tools available",description:i?"Try adjusting your search terms":h})}),e[24]=h,e[25]=g,e[26]=w,e[27]=E,e[28]=i,e[29]=l,e[30]=n,e[31]=v,e[32]=x,e[33]=N):N=e[33];let b;e[34]!==y||e[35]!==N?(b=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,N]}),e[34]=y,e[35]=N,e[36]=b):b=e[36];let L;return e[37]!==b||e[38]!==j?(L=t.jsxs(t.Fragment,{children:[j,b]}),e[37]=b,e[38]=j,e[39]=L):L=e[39],L}function pe(o){return{id:o.id,label:typeof o.header=="string"?o.header:o.id}}function ue(o){return o.sortable}function he(o){return t.jsx("span",{className:"text-sm text-foreground",children:o.description||"—"})}function xe(o){return t.jsx(de,{annotations:o.annotations})}function ge(o){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:o.name})}function je(o){return o==="asc"?"desc":o==="desc"?null:"asc"}export{de as T,Le as a};
@@ -0,0 +1 @@
1
+ import{r as a,at as H,j as c,aH as J,a9 as Q,av as C,ax as $,aI as Z,an as ee,ar as te,aG as oe,aJ as G,aP as re,aQ as ne,ay as se,aU as ae,aR as ie,c as _}from"./index-CzSiUwwv.js";import{R as le}from"./index-Dps5khDb.js";import{c as ce}from"./button-Bl7hMmCe.js";var[O]=se("Tooltip",[G]),L=G(),B="TooltipProvider",ue=700,k="tooltip.open",[de,A]=O(B),z=o=>{const{__scopeTooltip:e,delayDuration:t=ue,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,i=a.useRef(!0),d=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const p=l.current;return()=>window.clearTimeout(p)},[]),c.jsx(de,{scope:e,isOpenDelayedRef:i,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};z.displayName=B;var R="Tooltip",[pe,j]=O(R),F=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:i,delayDuration:d}=o,l=A(R,o.__scopeTooltip),p=L(e),[u,h]=a.useState(null),v=ee(),f=a.useRef(0),x=i??l.disableHoverableContent,g=d??l.delayDuration,m=a.useRef(!1),[y,T]=te({prop:r,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(k))):l.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>y?m.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),N=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{m.current=!0,T(!0),f.current=0},g)},[g,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(oe,{...p,children:c.jsx(pe,{scope:e,contentId:v,open:y,stateAttribute:w,trigger:u,onTriggerChange:h,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?N():E()},[l.isOpenDelayedRef,N,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(f.current),f.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};F.displayName=R;var M="TooltipTrigger",U=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=j(M,t),s=A(M,t),i=L(t),d=a.useRef(null),l=H(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),h=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(J,{asChild:!0,...i,children:c.jsx(Q.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:C(o.onPointerMove,v=>{v.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:C(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:C(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:C(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:C(o.onBlur,n.onClose),onClick:C(o.onClick,n.onClose)})})});U.displayName=M;var I="TooltipPortal",[fe,he]=O(I,{forceMount:void 0}),q=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=j(I,e);return c.jsx(fe,{scope:e,forceMount:t,children:c.jsx($,{present:t||s.open,children:c.jsx(Z,{asChild:!0,container:n,children:r})})})};q.displayName=I;var b="TooltipContent",V=a.forwardRef((o,e)=>{const t=he(b,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,i=j(b,o.__scopeTooltip);return c.jsx($,{present:r||i.open,children:i.disableHoverableContent?c.jsx(W,{side:n,...s,ref:e}):c.jsx(ve,{side:n,...s,ref:e})})}),ve=a.forwardRef((o,e)=>{const t=j(b,o.__scopeTooltip),r=A(b,o.__scopeTooltip),n=a.useRef(null),s=H(e,n),[i,d]=a.useState(null),{trigger:l,onClose:p}=t,u=n.current,{onPointerInTransitChange:h}=r,v=a.useCallback(()=>{d(null),h(!1)},[h]),f=a.useCallback((x,g)=>{const m=x.currentTarget,y={x:x.clientX,y:x.clientY},T=Te(y,m.getBoundingClientRect()),w=ye(y,T),E=Ce(g.getBoundingClientRect()),P=we([...w,...E]);d(P),h(!0)},[h]);return a.useEffect(()=>()=>v(),[v]),a.useEffect(()=>{if(l&&u){const x=m=>f(m,u),g=m=>f(m,l);return l.addEventListener("pointerleave",x),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",g)}}},[l,u,f,v]),a.useEffect(()=>{if(i){const x=g=>{const m=g.target,y={x:g.clientX,y:g.clientY},T=l?.contains(m)||u?.contains(m),w=!be(y,i);T?v():w&&(v(),p())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,u,i,p,v]),c.jsx(W,{...o,ref:s})}),[xe,me]=O(R,{isInside:!1}),ge=ae("TooltipContent"),W=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...d}=o,l=j(b,t),p=L(t),{onClose:u}=l;return a.useEffect(()=>(document.addEventListener(k,u),()=>document.removeEventListener(k,u)),[u]),a.useEffect(()=>{if(l.trigger){const h=v=>{v.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,u]),c.jsx(re,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:c.jsxs(ne,{"data-state":l.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(ge,{children:r}),c.jsx(xe,{scope:t,isInside:!0,children:c.jsx(le,{id:l.contentId,role:"tooltip",children:n||r})})]})})});V.displayName=b;var X="TooltipArrow",Y=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=L(t);return me(X,t).isInside?null:c.jsx(ie,{...n,...r,ref:e})});Y.displayName=X;function Te(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function ye(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Ce(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function be(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const d=e[s],l=e[i],p=d.x,u=d.y,h=l.x,v=l.y;u>r!=v>r&&t<(h-p)*(r-u)/(v-u)+p&&(n=!n)}return n}function we(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ee(e)}function Ee(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],i=e[e.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Pe=z,Re=F,_e=U,je=q,Oe=V,Le=Y;const De=({size:o=24,color:e="currentColor",...t})=>a.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},a.createElement("path",{d:"M17 7 7 17M7 7l10 10"}));De.displayName="X";const K=768,D=()=>globalThis.innerWidth<K;function Ne(){const o=_.c(2),[e,t]=a.useState(D);let r,n;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const s=()=>t(D),i=globalThis.matchMedia(`(max-width: ${K-1}px)`);return i.addEventListener("change",s),t(D),()=>i.removeEventListener("change",s)},n=[],o[0]=r,o[1]=n):(r=o[0],n=o[1]),a.useEffect(r,n),e}function ke(o){const e=_.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(Pe,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Se(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(ke,{children:c.jsx(Re,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function He(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(_e,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function $e(o){const e=_.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const i=s===void 0?0:s;let d;e[5]!==r?(d=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(Le,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=l):l=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==i||e[11]!==d?(p=c.jsx(je,{children:c.jsxs(Oe,{"data-slot":"tooltip-content",sideOffset:i,className:d,...n,children:[t,l]})}),e[8]=t,e[9]=n,e[10]=i,e[11]=d,e[12]=p):p=e[12],p}export{Se as T,He as a,$e as b,ke as c,De as i,Ne as u};
@@ -0,0 +1 @@
1
+ import{r,c,j as l}from"./index-CzSiUwwv.js";const s=r.createContext(null);function x(i){const t=c.c(3),{value:u,children:n}=i,o=u;let e;return t[0]!==n||t[1]!==o?(e=l.jsx(s.Provider,{value:o,children:n}),t[0]=n,t[1]=o,t[2]=e):e=t[2],e}function p(i){const t=r.useContext(s);if(!t)throw new Error("usePluginContext must be used within a PluginContextProvider");if(!t.connectionId||!t.connection||!t.toolCaller)throw new Error("usePluginContext requires a valid connection. Use { partial: true } in empty state components.");return t}r.createContext(null);export{x as P,p as u};
@@ -0,0 +1,16 @@
1
+ import{r as C,c as T,j as t}from"./index-CzSiUwwv.js";import{I as L}from"./input-CAPxG1rh.js";import{S as _,a as $,b as V,c as z}from"./index-BrH9wXxf.js";import{c as S}from"./button-Bl7hMmCe.js";import{i as I}from"./SearchMd-BMO4jqwv.js";const D=({size:l=24,color:e="currentColor",...s})=>C.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},C.createElement("path",{d:"m22.7 13.5-2-2-2 2M21 12a9 9 0 1 1-1.245-4.57M12 7v5l3 2"}));D.displayName="ClockRewind";const E=({size:l=24,color:e="currentColor",...s})=>C.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},C.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));E.displayName="MessageChatSquare";function H(l){const e=T.c(24),{threads:s,activeThreadId:i,onThreadSelect:o,onClose:r,showHeader:c,showBackButton:w}=l,d=c===void 0?!0:c,n=w===void 0?!1:w,[a,k]=C.useState("");let y;e[0]!==a||e[1]!==s?(y=a.trim()?s.filter(h=>(h.title||"New chat").toLowerCase().includes(a.toLowerCase())):s,e[0]=a,e[1]=s,e[2]=y):y=e[2];const v=y;let f;e[3]!==r||e[4]!==o?(f=h=>{o(h),r&&r()},e[3]=r,e[4]=o,e[5]=f):f=e[5];const b=f;let x;e[6]!==r||e[7]!==n||e[8]!==d?(x=d&&t.jsxs("div",{className:"h-12 px-4 flex items-center justify-between border-b shrink-0",children:[t.jsx("span",{className:"text-sm font-medium",children:"Chat History"}),n&&t.jsx("button",{type:"button",onClick:r,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Back to chat"})]}),e[6]=r,e[7]=n,e[8]=d,e[9]=x):x=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=S("px-3 py-3 border-b","shrink-0"),e[10]=g):g=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(I,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[11]=N):N=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=h=>k(h.target.value),e[12]=u):u=e[12];let m;e[13]!==a?(m=t.jsx("div",{className:g,children:t.jsxs("div",{className:"relative",children:[N,t.jsx(L,{type:"text",placeholder:"Search conversations...",value:a,onChange:u,className:"pl-9 h-9 text-sm"})]})}),e[13]=a,e[14]=m):m=e[14];let p;e[15]!==i||e[16]!==v||e[17]!==b||e[18]!==a?(p=t.jsx("div",{className:"flex-1 overflow-y-auto",children:v.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 px-4 text-center",children:[t.jsx("div",{className:"size-12 rounded-full bg-muted/50 flex items-center justify-center",children:t.jsx(E,{size:24,className:"text-muted-foreground"})}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:a?"No results found":"No conversations yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a?"Try a different search term":"Start a new chat to see your history here"})]})]}):t.jsx("div",{className:"flex flex-col py-2",children:v.map(h=>{const B=h.id===i;return t.jsx("button",{type:"button",onClick:()=>b(h.id),className:S("flex items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50",B&&"bg-accent/50"),children:t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:S("text-sm truncate",B?"font-medium text-foreground":"text-muted-foreground"),children:h.title||"New chat"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(h.updated_at).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})},h.id)})})}),e[15]=i,e[16]=v,e[17]=b,e[18]=a,e[19]=p):p=e[19];let j;return e[20]!==p||e[21]!==x||e[22]!==m?(j=t.jsxs(t.Fragment,{children:[x,m,p]}),e[20]=p,e[21]=x,e[22]=m,e[23]=j):j=e[23],j}function q(l){const e=T.c(9),{open:s,onOpenChange:i,threads:o,activeThreadId:r,onThreadSelect:c}=l;let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(_,{className:"h-12 px-4 flex flex-row items-center justify-between border-b shrink-0",children:t.jsx($,{className:"text-sm font-medium",children:"Chat History"})}),e[0]=w):w=e[0];let d;e[1]!==r||e[2]!==c||e[3]!==o?(d=t.jsxs(V,{side:"right",className:"w-[320px] sm:w-[380px] p-0 flex flex-col",children:[w,t.jsx(H,{threads:o,activeThreadId:r,onThreadSelect:c,showHeader:!1})]}),e[1]=r,e[2]=c,e[3]=o,e[4]=d):d=e[4];let n;return e[5]!==i||e[6]!==s||e[7]!==d?(n=t.jsx(z,{open:s,onOpenChange:i,children:d}),e[5]=i,e[6]=s,e[7]=d,e[8]=n):n=e[8],n}function F(l){const e=T.c(5),{threads:s,activeThreadId:i,onThreadSelect:o,onClose:r}=l;let c;return e[0]!==i||e[1]!==r||e[2]!==o||e[3]!==s?(c=t.jsx("div",{className:"flex flex-col h-full w-full bg-background",children:t.jsx(H,{threads:s,activeThreadId:i,onThreadSelect:o,onClose:r,showBackButton:!0})}),e[0]=i,e[1]=r,e[2]=o,e[3]=s,e[4]=c):c=e[4],c}function O(l){const e=T.c(22),{text:s,className:i,speed:o}=l,r=i===void 0?"":i,c=o===void 0?30:o,[w,d]=C.useState(!1),n=s.length/c*1e3,a=s.length,k=`${s.length}ch`;let y;e[0]!==n?(y=()=>{d(!1);const h=setTimeout(()=>{d(!0)},n);return()=>clearTimeout(h)},e[0]=n,e[1]=y):y=e[1];let v;e[2]!==n||e[3]!==s?(v=[s,n],e[2]=n,e[3]=s,e[4]=v):v=e[4],C.useEffect(y,v);let f;e[5]!==r?(f=S(r,"block overflow-hidden inline-flex"),e[5]=r,e[6]=f):f=e[6];const b=`${n}ms`;let x;e[7]!==k||e[8]!==a||e[9]!==b?(x={"--typewriter-duration":b,"--typewriter-steps":a,"--typewriter-max-width":k},e[7]=k,e[8]=a,e[9]=b,e[10]=x):x=e[10];const g=x,N=w&&"truncate";let u;e[11]!==N?(u=S("typewriter-text",N),e[11]=N,e[12]=u):u=e[12];let m;e[13]!==u||e[14]!==s?(m=t.jsx("span",{className:u,children:s}),e[13]=u,e[14]=s,e[15]=m):m=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("style",{children:`
2
+ .typewriter-text {
3
+ display: inline-block;
4
+ width: 0;
5
+ max-width: 100%;
6
+ overflow: hidden;
7
+ white-space: nowrap;
8
+ animation: typewriter var(--typewriter-duration) steps(var(--typewriter-steps)) forwards;
9
+ }
10
+
11
+ @keyframes typewriter {
12
+ to {
13
+ width: min(var(--typewriter-max-width), 100%);
14
+ }
15
+ }
16
+ `}),e[16]=p):p=e[16];let j;return e[17]!==m||e[18]!==f||e[19]!==g||e[20]!==s?(j=t.jsxs("span",{className:f,style:g,children:[m,p]},s),e[17]=m,e[18]=f,e[19]=g,e[20]=s,e[21]=j):j=e[21],j}export{O as T,q as a,F as b,D as i,E as t};
@@ -1 +1 @@
1
- import{a as A}from"./binder-BXFbhA2G.js";import{b7 as I,G as O,o as t,s as e,b8 as g,al as c,b9 as l,ba as M,bb as D,bc as s,am as C,bd as m,be as S,bf as n,bg as _,bh as k,bi as w,bj as B,bk as U,bl as v}from"./index-ClncOz6N.js";const G=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=I("assistant",G),W=[...F],y=k(()=>m([w(),e(),s(),S(),g(e(),y),c(y)])),h=g(e(),g(e(),y)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),R=t({type:n("text"),text:e().describe("The text content"),providerOptions:h}),j=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),q=e().describe("File data as URL string"),x=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:q,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:h}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:h}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:S().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:h}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:S().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Y=m([t({type:n("text"),value:e()}),t({type:n("json"),value:y}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:y}),t({type:n("content"),value:c(m([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))}),t({type:n("execution-denied"),reason:e().optional()}),e().describe("Raw or JSON-serialized output (e.g. from AI SDK mapToolResultOutput)")]),E=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:Y.describe("Result of the tool call"),result:_().describe("Unknown result of the tool call"),providerOptions:h}),H=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:S().optional().describe("Whether the result is an error or error message"),providerExecuted:S().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),X=m([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:h}),Q=t({role:n("user"),content:c(m([R,x])).describe("User message content parts (text or file)"),providerOptions:h}),ee=t({role:n("assistant"),content:c(m([R,x,J,z,E])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:h}),te=t({role:n("tool"),content:c(E).describe("Tool message content (tool results)"),providerOptions:h}),oe=m([Z,Q,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ne=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:s().optional().describe("Maximum number of tokens to generate"),temperature:s().optional().describe("Temperature setting. The range depends on the provider and model"),topP:s().optional().describe("Nucleus sampling parameter"),topK:s().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:s().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:s().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:s().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:m([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:S().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ie=t({content:c(m([j,$,K,V,H,X])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:C(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:D({inputTokens:s().optional(),outputTokens:s().optional(),totalTokens:s().optional(),reasoningTokens:s().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:M().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:g(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:g(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const re=t({supportedUrls:g(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:t({input:s(),output:s()}).nullable(),provider:C(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ne}),se=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:t({input:s(),output:s()}).nullable(),provider:C(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=I("llm",se,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:re},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ie},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:g(e(),_()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],L={LLMS:ce,WORKFLOW:U,WORKFLOW_EXECUTION:B,ASSISTANTS:W,MCP:pe};function ue(o){return o.map(a=>({name:a.name,inputSchema:a.inputSchema?(()=>{try{return v(a.inputSchema)}catch(r){return console.error(`Failed to convert input schema for ${a.name}:`,r),t({})}})():t({}),outputSchema:a.outputSchema?(()=>{try{return v(a.outputSchema)}catch(r){return console.error(`Failed to convert output schema for ${a.name}:`,r),t({})}})():t({})}))}function me(o,a){const r=o.tools;if(!r||r.length===0)return!1;const i=r.map(p=>({name:p.name,inputSchema:p.inputSchema})),d=a.map(p=>({name:p.name,inputSchema:p.inputSchema,opt:p.opt}));return A(d).isImplementedBy(i)}function Ie({connections:o,binding:a}){const r=(()=>{if(a){if(typeof a=="string"){const i=a.toUpperCase(),d=L[i];if(!d){console.warn(`[useBindingConnections] Unknown binding "${a}". Available bindings: ${Object.keys(L).join(", ")}. Returning all connections without filtering.`);return}return d}if(a.length===0){console.warn("[useBindingConnections] Empty binding array provided. Returning all connections without filtering.");return}return ue(a)}})();return o?r?o.filter(i=>me(i,r)):o:[]}function he(o){return o.toLowerCase().split("_").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function P(o){if(!o||o.length===0)return[];const a=/^COLLECTION_(.+)_LIST$/,r=[];for(const i of o){const d=i.name.match(a);d?.[1]&&r.push(d[1])}return r}function be(o){return!o||o.length===0?!1:o.some(a=>a.name==="REGISTRY_ITEM_LIST"||a.name==="COLLECTION_REGISTRY_APP_LIST"?!0:a.name.startsWith("COLLECTION_REGISTRY_APP_"))}function fe(o,a){const i=o.find(u=>u.name===`COLLECTION_${a}_CREATE`)?.inputSchema?.properties;if(i&&typeof i=="object"&&"data"in i)return i.data;const b=o.find(u=>u.name===`COLLECTION_${a}_UPDATE`)?.inputSchema?.properties;if(b&&typeof b=="object"&&"data"in b)return b.data;const T=o.find(u=>u.name===`COLLECTION_${a}_LIST`)?.outputSchema?.properties;if(T&&typeof T=="object"&&"items"in T){const u=T.items;if(u.items)return u.items}}function ge(o,a){const r=a.toUpperCase();return{hasCreateTool:o.some(i=>i.name===`COLLECTION_${r}_CREATE`),hasUpdateTool:o.some(i=>i.name===`COLLECTION_${r}_UPDATE`),hasDeleteTool:o.some(i=>i.name===`COLLECTION_${r}_DELETE`)}}function Se(o){if(!o||o.length===0)return[];const a=P(o);if(a.length===0)return[];const r=[];for(const i of a)try{const d=I(i.toLowerCase(),O,{readOnly:!0}),b=o.map(f=>({name:f.name,inputSchema:f.inputSchema})),p=d.map(f=>({name:f.name,inputSchema:f.inputSchema}));if(A(p).isImplementedBy(b)){const f=ge(o,i);r.push({name:i,displayName:he(i),schema:fe(o,i),...f})}}catch{}return r}function Oe(o){return Se(o?.tools??null)}function Ce(o){return o?o.filter(a=>P(a.tools).includes("REGISTRY_APP")||be(a.tools)):[]}export{Ie as a,Oe as b,me as c,Ce as u};
1
+ import{a as A}from"./binder-BvXUsKRF.js";import{b7 as I,G as O,o as t,s as e,b8 as g,al as c,b9 as l,ba as M,bb as D,bc as s,am as C,bd as m,be as S,bf as n,bg as _,bh as k,bi as w,bj as B,bk as U,bl as v}from"./index-CzSiUwwv.js";const G=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=I("assistant",G),W=[...F],y=k(()=>m([w(),e(),s(),S(),g(e(),y),c(y)])),h=g(e(),g(e(),y)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),R=t({type:n("text"),text:e().describe("The text content"),providerOptions:h}),j=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),q=e().describe("File data as URL string"),x=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:q,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:h}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:h}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:S().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:h}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:S().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Y=m([t({type:n("text"),value:e()}),t({type:n("json"),value:y}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:y}),t({type:n("content"),value:c(m([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))}),t({type:n("execution-denied"),reason:e().optional()}),e().describe("Raw or JSON-serialized output (e.g. from AI SDK mapToolResultOutput)")]),E=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:Y.describe("Result of the tool call"),result:_().describe("Unknown result of the tool call"),providerOptions:h}),H=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:S().optional().describe("Whether the result is an error or error message"),providerExecuted:S().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),X=m([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),Z=t({role:n("system"),content:e().describe("System message content"),providerOptions:h}),Q=t({role:n("user"),content:c(m([R,x])).describe("User message content parts (text or file)"),providerOptions:h}),ee=t({role:n("assistant"),content:c(m([R,x,J,z,E])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:h}),te=t({role:n("tool"),content:c(E).describe("Tool message content (tool results)"),providerOptions:h}),oe=m([Z,Q,ee,te]),ae=c(oe).describe("A list of messages forming the prompt"),ne=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:s().optional().describe("Maximum number of tokens to generate"),temperature:s().optional().describe("Temperature setting. The range depends on the provider and model"),topP:s().optional().describe("Nucleus sampling parameter"),topK:s().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:s().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:s().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:s().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:m([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:S().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),ie=t({content:c(m([j,$,K,V,H,X])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:C(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:D({inputTokens:s().optional(),outputTokens:s().optional(),totalTokens:s().optional(),reasoningTokens:s().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:M().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:g(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:g(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const re=t({supportedUrls:g(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:t({input:s(),output:s()}).nullable(),provider:C(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ne}),se=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:s(),maxOutputTokens:s()}).nullable(),costs:t({input:s(),output:s()}).nullable(),provider:C(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=I("llm",se,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:re},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ie},...le],de=t({scopes:c(e()).describe("List of scopes available"),stateSchema:g(e(),_()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],L={LLMS:ce,WORKFLOW:U,WORKFLOW_EXECUTION:B,ASSISTANTS:W,MCP:pe};function ue(o){return o.map(a=>({name:a.name,inputSchema:a.inputSchema?(()=>{try{return v(a.inputSchema)}catch(r){return console.error(`Failed to convert input schema for ${a.name}:`,r),t({})}})():t({}),outputSchema:a.outputSchema?(()=>{try{return v(a.outputSchema)}catch(r){return console.error(`Failed to convert output schema for ${a.name}:`,r),t({})}})():t({})}))}function me(o,a){const r=o.tools;if(!r||r.length===0)return!1;const i=r.map(p=>({name:p.name,inputSchema:p.inputSchema})),d=a.map(p=>({name:p.name,inputSchema:p.inputSchema,opt:p.opt}));return A(d).isImplementedBy(i)}function Ie({connections:o,binding:a}){const r=(()=>{if(a){if(typeof a=="string"){const i=a.toUpperCase(),d=L[i];if(!d){console.warn(`[useBindingConnections] Unknown binding "${a}". Available bindings: ${Object.keys(L).join(", ")}. Returning all connections without filtering.`);return}return d}if(a.length===0){console.warn("[useBindingConnections] Empty binding array provided. Returning all connections without filtering.");return}return ue(a)}})();return o?r?o.filter(i=>me(i,r)):o:[]}function he(o){return o.toLowerCase().split("_").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function P(o){if(!o||o.length===0)return[];const a=/^COLLECTION_(.+)_LIST$/,r=[];for(const i of o){const d=i.name.match(a);d?.[1]&&r.push(d[1])}return r}function be(o){return!o||o.length===0?!1:o.some(a=>a.name==="REGISTRY_ITEM_LIST"||a.name==="COLLECTION_REGISTRY_APP_LIST"?!0:a.name.startsWith("COLLECTION_REGISTRY_APP_"))}function fe(o,a){const i=o.find(u=>u.name===`COLLECTION_${a}_CREATE`)?.inputSchema?.properties;if(i&&typeof i=="object"&&"data"in i)return i.data;const b=o.find(u=>u.name===`COLLECTION_${a}_UPDATE`)?.inputSchema?.properties;if(b&&typeof b=="object"&&"data"in b)return b.data;const T=o.find(u=>u.name===`COLLECTION_${a}_LIST`)?.outputSchema?.properties;if(T&&typeof T=="object"&&"items"in T){const u=T.items;if(u.items)return u.items}}function ge(o,a){const r=a.toUpperCase();return{hasCreateTool:o.some(i=>i.name===`COLLECTION_${r}_CREATE`),hasUpdateTool:o.some(i=>i.name===`COLLECTION_${r}_UPDATE`),hasDeleteTool:o.some(i=>i.name===`COLLECTION_${r}_DELETE`)}}function Se(o){if(!o||o.length===0)return[];const a=P(o);if(a.length===0)return[];const r=[];for(const i of a)try{const d=I(i.toLowerCase(),O,{readOnly:!0}),b=o.map(f=>({name:f.name,inputSchema:f.inputSchema})),p=d.map(f=>({name:f.name,inputSchema:f.inputSchema}));if(A(p).isImplementedBy(b)){const f=ge(o,i);r.push({name:i,displayName:he(i),schema:fe(o,i),...f})}}catch{}return r}function Oe(o){return Se(o?.tools??null)}function Ce(o){return o?o.filter(a=>P(a.tools).includes("REGISTRY_APP")||be(a.tools)):[]}export{Ie as a,Oe as b,me as c,Ce as u};
@@ -1 +1 @@
1
- import{n as P,c as I,z as Q,t as L,u as x}from"./index-ClncOz6N.js";import{u as v}from"./useMutation-CeUP6TdZ.js";import{K,a as q,u as U}from"./constants-BHcnwzXS.js";function b(e,n,s){const t=[];if(e?.trim()){const o=e.trim(),r=s.map(i=>({field:[String(i)],operator:"contains",value:o}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(n&&n.length>0)for(const o of n)t.push({field:[o.column],operator:"eq",value:o.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function D(e,n,s){const t=e??s,o=n??"asc";return[{field:[String(t)],direction:o}]}function O(e){if(!e||typeof e!="object")throw new Error("Invalid result");if("isError"in e&&e.isError)throw new Error("content"in e&&Array.isArray(e.content)&&e.content[0]?.type==="text"?e.content[0].text:"Unknown error");if("structuredContent"in e)return e.structuredContent;throw new Error("No structured content found")}function k(e,n,s,t){const o=I.c(14);let r,i,u;if(o[0]!==t||o[1]!==n||o[2]!==s||o[3]!==e){const a=n.toUpperCase();r=`COLLECTION_${a}_GET`,u=P,i=K.collectionItem(t,e,"",a,s??""),o[0]=t,o[1]=n,o[2]=s,o[3]=e,o[4]=r,o[5]=i,o[6]=u}else r=o[4],i=o[5],u=o[6];let c;o[7]!==t||o[8]!==r||o[9]!==s?(c=async()=>{if(!s)return{item:null};const a=await t.callTool({name:r,arguments:{id:s}});return O(a)},o[7]=t,o[8]=r,o[9]=s,o[10]=c):c=o[10];let d;o[11]!==i||o[12]!==c?(d={queryKey:i,queryFn:c,staleTime:6e4},o[11]=i,o[12]=c,o[13]=d):d=o[13];const{data:p}=u(d);return p?.item??null}const z={structuredContent:{items:[]},isError:!1};function B(e,n,s,t={}){const{searchTerm:o,filters:r,sortKey:i,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:p=100}=t,a=n.toUpperCase(),m=`COLLECTION_${a}_LIST`,f=b(o,r,c),y=D(i,u,d),C={...f&&{where:f},...y&&{orderBy:y},limit:p,offset:0},g=JSON.stringify(C),E=K.collectionList(s,e,"",a,g),{data:_}=P({queryKey:E,queryFn:async()=>s?await s.callTool({name:m,arguments:C}):z,staleTime:3e4,retry:!1,select:N=>O(N??{})?.items??[]});return _}function X(e,n,s,t={}){const{searchTerm:o,filters:r,sortKey:i,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:p=100}=t,a=n.toUpperCase(),m=b(o,r,c),f=D(i,u,d),y={...m&&{where:m},...f&&{orderBy:f},limit:p,offset:0},C=JSON.stringify(y);return K.collectionList(e,s,"",a,C)}function R(e,n,s){const t=I.c(34),o=Q();let r;t[0]!==n?(r=n.toUpperCase(),t[0]=n,t[1]=r):r=t[1];const i=r,u=`COLLECTION_${i}_CREATE`,c=`COLLECTION_${i}_UPDATE`,d=`COLLECTION_${i}_DELETE`;let p;t[2]!==o||t[3]!==e||t[4]!==i?(p=()=>{o.invalidateQueries({predicate:S=>{const l=S.queryKey;return l[1]===e&&l[3]==="collection"&&l[4]===i}})},t[2]=o,t[3]=e,t[4]=i,t[5]=p):p=t[5];const a=p;let m;t[6]!==s||t[7]!==u?(m=async S=>{const l=await s.callTool({name:u,arguments:{data:S}});if(l.isError)throw new Error(Array.isArray(l.content)?l.content[0]?.text:String(l.content));return O(l).item},t[6]=s,t[7]=u,t[8]=m):m=t[8];let f;t[9]!==a?(f=()=>{a(),L.success("Item created successfully")},t[9]=a,t[10]=f):f=t[10];let y;t[11]!==m||t[12]!==f?(y={mutationFn:m,onSuccess:f,onError:Y},t[11]=m,t[12]=f,t[13]=y):y=t[13];const C=v(y);let g;t[14]!==s||t[15]!==c?(g=async S=>{const{id:l,data:F}=S,M=await s.callTool({name:c,arguments:{id:l,data:F}});return O(M).item},t[14]=s,t[15]=c,t[16]=g):g=t[16];let E;t[17]!==a?(E=()=>{a(),L.success("Item updated successfully")},t[17]=a,t[18]=E):E=t[18];let _;t[19]!==g||t[20]!==E?(_={mutationFn:g,onSuccess:E,onError:J},t[19]=g,t[20]=E,t[21]=_):_=t[21];const N=v(_);let T;t[22]!==s||t[23]!==d?(T=async S=>{const l=await s.callTool({name:d,arguments:{id:S}});return O(l).item.id},t[22]=s,t[23]=d,t[24]=T):T=t[24];let h;t[25]!==a?(h=()=>{a(),L.success("Item deleted successfully")},t[25]=a,t[26]=h):h=t[26];let w;t[27]!==T||t[28]!==h?(w={mutationFn:T,onSuccess:h,onError:j},t[27]=T,t[28]=h,t[29]=w):w=t[29];const A=v(w);let $;return t[30]!==C||t[31]!==A||t[32]!==N?($={create:C,update:N,delete:A},t[30]=C,t[31]=A,t[32]=N,t[33]=$):$=t[33],$}function j(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to delete item: ${n}`)}function J(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to update item: ${n}`)}function Y(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to create item: ${n}`)}function Z(e){const n=I.c(4);let s;n[0]!==e?(s=e===void 0?{}:e,n[0]=e,n[1]=s):s=n[1];const t=s,{org:o}=x();let r;n[2]!==o.id?(r={connectionId:q,orgId:o.id},n[2]=o.id,n[3]=r):r=n[3];const i=U(r);return B(o.id,"CONNECTIONS",i,t)}function tt(e){const n=I.c(2),{org:s}=x();let t;n[0]!==s.id?(t={connectionId:q,orgId:s.id},n[0]=s.id,n[1]=t):t=n[1];const o=U(t);return k(s.id,"CONNECTIONS",e,o)}function et(){const e=I.c(2),{org:n}=x();let s;e[0]!==n.id?(s={connectionId:q,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const t=U(s);return R(n.id,"CONNECTIONS",t)}export{z as E,D as a,X as b,b as c,k as d,B as e,tt as f,et as g,Z as h,R as u};
1
+ import{n as P,c as I,z as Q,t as L,u as x}from"./index-CzSiUwwv.js";import{u as v}from"./useMutation-BYl8vvsl.js";import{K,a as q,u as U}from"./constants-DY_BU6PR.js";function b(e,n,s){const t=[];if(e?.trim()){const o=e.trim(),r=s.map(i=>({field:[String(i)],operator:"contains",value:o}));r.length===1&&r[0]?t.push(r[0]):r.length>1&&t.push({operator:"or",conditions:r})}if(n&&n.length>0)for(const o of n)t.push({field:[o.column],operator:"eq",value:o.value});if(t.length!==0)return t.length===1?t[0]:{operator:"and",conditions:t}}function D(e,n,s){const t=e??s,o=n??"asc";return[{field:[String(t)],direction:o}]}function O(e){if(!e||typeof e!="object")throw new Error("Invalid result");if("isError"in e&&e.isError)throw new Error("content"in e&&Array.isArray(e.content)&&e.content[0]?.type==="text"?e.content[0].text:"Unknown error");if("structuredContent"in e)return e.structuredContent;throw new Error("No structured content found")}function k(e,n,s,t){const o=I.c(14);let r,i,u;if(o[0]!==t||o[1]!==n||o[2]!==s||o[3]!==e){const a=n.toUpperCase();r=`COLLECTION_${a}_GET`,u=P,i=K.collectionItem(t,e,"",a,s??""),o[0]=t,o[1]=n,o[2]=s,o[3]=e,o[4]=r,o[5]=i,o[6]=u}else r=o[4],i=o[5],u=o[6];let c;o[7]!==t||o[8]!==r||o[9]!==s?(c=async()=>{if(!s)return{item:null};const a=await t.callTool({name:r,arguments:{id:s}});return O(a)},o[7]=t,o[8]=r,o[9]=s,o[10]=c):c=o[10];let d;o[11]!==i||o[12]!==c?(d={queryKey:i,queryFn:c,staleTime:6e4},o[11]=i,o[12]=c,o[13]=d):d=o[13];const{data:p}=u(d);return p?.item??null}const z={structuredContent:{items:[]},isError:!1};function B(e,n,s,t={}){const{searchTerm:o,filters:r,sortKey:i,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:p=100}=t,a=n.toUpperCase(),m=`COLLECTION_${a}_LIST`,f=b(o,r,c),y=D(i,u,d),C={...f&&{where:f},...y&&{orderBy:y},limit:p,offset:0},g=JSON.stringify(C),E=K.collectionList(s,e,"",a,g),{data:_}=P({queryKey:E,queryFn:async()=>s?await s.callTool({name:m,arguments:C}):z,staleTime:3e4,retry:!1,select:N=>O(N??{})?.items??[]});return _}function X(e,n,s,t={}){const{searchTerm:o,filters:r,sortKey:i,sortDirection:u,searchFields:c=["title","description"],defaultSortKey:d="updated_at",pageSize:p=100}=t,a=n.toUpperCase(),m=b(o,r,c),f=D(i,u,d),y={...m&&{where:m},...f&&{orderBy:f},limit:p,offset:0},C=JSON.stringify(y);return K.collectionList(e,s,"",a,C)}function R(e,n,s){const t=I.c(34),o=Q();let r;t[0]!==n?(r=n.toUpperCase(),t[0]=n,t[1]=r):r=t[1];const i=r,u=`COLLECTION_${i}_CREATE`,c=`COLLECTION_${i}_UPDATE`,d=`COLLECTION_${i}_DELETE`;let p;t[2]!==o||t[3]!==e||t[4]!==i?(p=()=>{o.invalidateQueries({predicate:S=>{const l=S.queryKey;return l[1]===e&&l[3]==="collection"&&l[4]===i}})},t[2]=o,t[3]=e,t[4]=i,t[5]=p):p=t[5];const a=p;let m;t[6]!==s||t[7]!==u?(m=async S=>{const l=await s.callTool({name:u,arguments:{data:S}});if(l.isError)throw new Error(Array.isArray(l.content)?l.content[0]?.text:String(l.content));return O(l).item},t[6]=s,t[7]=u,t[8]=m):m=t[8];let f;t[9]!==a?(f=()=>{a(),L.success("Item created successfully")},t[9]=a,t[10]=f):f=t[10];let y;t[11]!==m||t[12]!==f?(y={mutationFn:m,onSuccess:f,onError:Y},t[11]=m,t[12]=f,t[13]=y):y=t[13];const C=v(y);let g;t[14]!==s||t[15]!==c?(g=async S=>{const{id:l,data:F}=S,M=await s.callTool({name:c,arguments:{id:l,data:F}});return O(M).item},t[14]=s,t[15]=c,t[16]=g):g=t[16];let E;t[17]!==a?(E=()=>{a(),L.success("Item updated successfully")},t[17]=a,t[18]=E):E=t[18];let _;t[19]!==g||t[20]!==E?(_={mutationFn:g,onSuccess:E,onError:J},t[19]=g,t[20]=E,t[21]=_):_=t[21];const N=v(_);let T;t[22]!==s||t[23]!==d?(T=async S=>{const l=await s.callTool({name:d,arguments:{id:S}});return O(l).item.id},t[22]=s,t[23]=d,t[24]=T):T=t[24];let h;t[25]!==a?(h=()=>{a(),L.success("Item deleted successfully")},t[25]=a,t[26]=h):h=t[26];let w;t[27]!==T||t[28]!==h?(w={mutationFn:T,onSuccess:h,onError:j},t[27]=T,t[28]=h,t[29]=w):w=t[29];const A=v(w);let $;return t[30]!==C||t[31]!==A||t[32]!==N?($={create:C,update:N,delete:A},t[30]=C,t[31]=A,t[32]=N,t[33]=$):$=t[33],$}function j(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to delete item: ${n}`)}function J(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to update item: ${n}`)}function Y(e){const n=e instanceof Error?e.message:String(e);L.error(`Failed to create item: ${n}`)}function Z(e){const n=I.c(4);let s;n[0]!==e?(s=e===void 0?{}:e,n[0]=e,n[1]=s):s=n[1];const t=s,{org:o}=x();let r;n[2]!==o.id?(r={connectionId:q,orgId:o.id},n[2]=o.id,n[3]=r):r=n[3];const i=U(r);return B(o.id,"CONNECTIONS",i,t)}function tt(e){const n=I.c(2),{org:s}=x();let t;n[0]!==s.id?(t={connectionId:q,orgId:s.id},n[0]=s.id,n[1]=t):t=n[1];const o=U(t);return k(s.id,"CONNECTIONS",e,o)}function et(){const e=I.c(2),{org:n}=x();let s;e[0]!==n.id?(s={connectionId:q,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const t=U(s);return R(n.id,"CONNECTIONS",t)}export{z as E,D as a,X as b,b as c,k as d,B as e,tt as f,et as g,Z as h,R as u};
@@ -1 +1 @@
1
- import{r,c}from"./index-ClncOz6N.js";const l=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M5 12h14m0 0-7-7m7 7-7 7"}));l.displayName="ArrowRight";const d=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M10.5 9.002a2.248 2.248 0 0 1 4.369.75C14.869 11.25 12.62 12 12.62 12m.028 3h.01m-.16 5a8.5 8.5 0 1 0-8.056-5.783c.108.32.162.481.172.604a.899.899 0 0 1-.028.326c-.03.12-.098.245-.232.494l-1.636 3.027c-.233.432-.35.648-.324.815a.5.5 0 0 0 .234.35c.144.087.388.062.876.011l5.121-.529c.155-.016.233-.024.303-.021.07.002.12.009.187.024.069.016.155.05.329.116A8.478 8.478 0 0 0 12.5 20Z"}));d.displayName="MessageQuestionCircle";function h(){const e=c.c(3),[t,o]=r.useState(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=async s=>{await navigator.clipboard.writeText(s),o(!0),setTimeout(()=>o(!1),2e3)},e[0]=i):i=e[0];const n=i;let a;return e[1]!==t?(a={handleCopy:n,copied:t},e[1]=t,e[2]=a):a=e[2],a}export{l as i,d as t,h as u};
1
+ import{r,c}from"./index-CzSiUwwv.js";const l=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M5 12h14m0 0-7-7m7 7-7 7"}));l.displayName="ArrowRight";const d=({size:e=24,color:t="currentColor",...o})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},r.createElement("path",{d:"M10.5 9.002a2.248 2.248 0 0 1 4.369.75C14.869 11.25 12.62 12 12.62 12m.028 3h.01m-.16 5a8.5 8.5 0 1 0-8.056-5.783c.108.32.162.481.172.604a.899.899 0 0 1-.028.326c-.03.12-.098.245-.232.494l-1.636 3.027c-.233.432-.35.648-.324.815a.5.5 0 0 0 .234.35c.144.087.388.062.876.011l5.121-.529c.155-.016.233-.024.303-.021.07.002.12.009.187.024.069.016.155.05.329.116A8.478 8.478 0 0 0 12.5 20Z"}));d.displayName="MessageQuestionCircle";function h(){const e=c.c(3),[t,o]=r.useState(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=async s=>{await navigator.clipboard.writeText(s),o(!0),setTimeout(()=>o(!1),2e3)},e[0]=i):i=e[0];const n=i;let a;return e[1]!==t?(a={handleCopy:n,copied:t},e[1]=t,e[2]=a):a=e[2],a}export{l as i,d as t,h as u};
@@ -1 +1 @@
1
- import{c as p,u as C,b as f,O as m}from"./index-ClncOz6N.js";import{a as v}from"./use-virtual-mcp-CSTx0yIN.js";function M(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:l}=d,o=l===void 0?!1:l,{org:r}=C(),c=f(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const g=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:m,agentId:g.id}}),{id:g.id,virtualMcp:g}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{M as u};
1
+ import{c as p,u as C,b as f,O as m}from"./index-CzSiUwwv.js";import{a as v}from"./use-virtual-mcp-CqdRLJoL.js";function M(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:l}=d,o=l===void 0?!1:l,{org:r}=C(),c=f(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const g=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:m,agentId:g.id}}),{id:g.id,virtualMcp:g}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{M as u};