@decocms/mesh 2.85.0 → 2.86.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 (212) hide show
  1. package/dist/client/assets/{AlertCircle-Dv-pGVbe.js → AlertCircle-CZKkWliR.js} +1 -1
  2. package/dist/client/assets/AlertOctagon-CeHHEPVj.js +1 -0
  3. package/dist/client/assets/{ArrowLeft-DmjHPtds.js → ArrowLeft-BRQUElkq.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-CNNhUiSK.js → ArrowUp-DglMchA5.js} +1 -1
  5. package/dist/client/assets/{Calendar-DvFZbDSm.js → Calendar-BsrCli7T.js} +1 -1
  6. package/dist/client/assets/{Check-D0-doi3D.js → Check-D6aC5DTd.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-B7BcMa43.js → CheckCircle-BFtRy3Ud.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-BFFxKfwE.js → CheckDone01-CFLMeuPc.js} +1 -1
  9. package/dist/client/assets/{ChevronDown-DhDohZgY.js → ChevronDown-CbbKn8HV.js} +1 -1
  10. package/dist/client/assets/{ChevronRight-YlJxRSER.js → ChevronRight-Chr-Opwh.js} +1 -1
  11. package/dist/client/assets/{Code01-BALFVt_U.js → Code01-BrzyalBQ.js} +1 -1
  12. package/dist/client/assets/{Copy01-CdI1uSIx.js → Copy01-DqRoI1-6.js} +1 -1
  13. package/dist/client/assets/{DotsHorizontal-BBNdFqaM.js → DotsHorizontal-Bg70q80a.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-eKFCZgNz.js → DotsVertical-D2hVHMV7.js} +1 -1
  15. package/dist/client/assets/{Download01-ByYU943d.js → Download01-CK8wSuTm.js} +1 -1
  16. package/dist/client/assets/{Edit01-BLqaLVsN.js → Edit01-DdekSr5y.js} +1 -1
  17. package/dist/client/assets/Eye-DF_0-3p6.js +1 -0
  18. package/dist/client/assets/{File02-ChsZyHSt.js → File02-Cyebv_VV.js} +1 -1
  19. package/dist/client/assets/{File06-ZuO2Pzkt.js → File06-B40bEevg.js} +1 -1
  20. package/dist/client/assets/{FilterLines-kdqwOMYU.js → FilterLines-Vmcdh-DQ.js} +1 -1
  21. package/dist/client/assets/{Globe02-R_O247ek.js → Globe02-CnvB05VP.js} +1 -1
  22. package/dist/client/assets/{Grid01-Hl_fTaOZ.js → Grid01-BSLssB32.js} +1 -1
  23. package/dist/client/assets/{Home02-DCuV9I0Z.js → Home02-ByOV6OTK.js} +1 -1
  24. package/dist/client/assets/{Image01-UevfVWVa.js → Image01-BHFBKHh1.js} +1 -1
  25. package/dist/client/assets/{Inbox01-DkILVHwB.js → Inbox01-BCKz6bhQ.js} +1 -1
  26. package/dist/client/assets/{InfoCircle-OFmSmQRy.js → InfoCircle-pOOorbPI.js} +1 -1
  27. package/dist/client/assets/{LinkExternal01-CzCmb0H9.js → LinkExternal01-X-xVeISQ.js} +1 -1
  28. package/dist/client/assets/{List-CziLidfU.js → List-DU0cbaW8.js} +1 -1
  29. package/dist/client/assets/{Loading01-Bnk-9-nZ.js → Loading01-BPsj2Ikr.js} +1 -1
  30. package/dist/client/assets/{Lock01-D1Ke74xN.js → Lock01-CS7UEcIJ.js} +1 -1
  31. package/dist/client/assets/{Pin01-BY5CK8qS.js → Pin01-CiUUgpU9.js} +1 -1
  32. package/dist/client/assets/{Play-D6Lfsz7v.js → Play-Dv4AMgTA.js} +1 -1
  33. package/dist/client/assets/{Plus-BsvHyKJ8.js → Plus-B_c8T2NA.js} +1 -1
  34. package/dist/client/assets/{RefreshCcw01-BjGY5EQM.js → RefreshCcw01-Dh-nQZ6_.js} +1 -1
  35. package/dist/client/assets/{SearchMd-B2tl0hgr.js → SearchMd-DUhyUDi8.js} +1 -1
  36. package/dist/client/assets/{Settings01-DFEntEgk.js → Settings01-BBv98jla.js} +1 -1
  37. package/dist/client/assets/{Settings02-BKH7FnCM.js → Settings02-DDgRyQEW.js} +1 -1
  38. package/dist/client/assets/{Share07-BoaRx3Mk.js → Share07-Cje8p_rj.js} +1 -1
  39. package/dist/client/assets/{Terminal-DAZzR_ZP.js → Terminal-y0YJjQ3t.js} +1 -1
  40. package/dist/client/assets/{Tool01-CwDTk-Rs.js → Tool01-R-ugQCdx.js} +1 -1
  41. package/dist/client/assets/{Trash01-DCp8kuDe.js → Trash01-5qyOQuDf.js} +1 -1
  42. package/dist/client/assets/{Upload01-u4nRmrqT.js → Upload01-32MstECF.js} +1 -1
  43. package/dist/client/assets/{Users03-B2zsfnpN.js → Users03-DH9LrHXm.js} +1 -1
  44. package/dist/client/assets/{X-CERPEbZp.js → X-Hp3kXOcu.js} +1 -1
  45. package/dist/client/assets/{XClose-Vbmhp4-x.js → XClose-DH3KRZCt.js} +1 -1
  46. package/dist/client/assets/agent-connections-preview-LAUoc9nd.js +1 -0
  47. package/dist/client/assets/agent-detail-LxMqgUWr.js +1 -0
  48. package/dist/client/assets/agents-BGjJ8Gal.js +1 -0
  49. package/dist/client/assets/{alert-dialog-DZUHuYRj.js → alert-dialog-CDTYj-K3.js} +4 -4
  50. package/dist/client/assets/{auth-catchall-WiUbh3Vy.js → auth-catchall-wy1AyoKc.js} +1 -1
  51. package/dist/client/assets/avatar-CwCwm6yK.js +1 -0
  52. package/dist/client/assets/badge-qV-BdFxU.js +1 -0
  53. package/dist/client/assets/{binder-Dm6uKx_q.js → binder-DLof5cwN.js} +1 -1
  54. package/dist/client/assets/breadcrumb-CpY5_MEM.js +1 -0
  55. package/dist/client/assets/button-BzzgqPA1.js +1 -0
  56. package/dist/client/assets/card-BMS2jWLg.js +1 -0
  57. package/dist/client/assets/checkbox-DGcmbWPy.js +1 -0
  58. package/dist/client/assets/{circle-alert-CFYGWMlI.js → circle-alert-Dl1mKU53.js} +1 -1
  59. package/dist/client/assets/{collection-detail-CtGRRRDt.js → collection-detail-q4wl2I_I.js} +6 -6
  60. package/dist/client/assets/collection-search-C0EzGOfM.js +1 -0
  61. package/dist/client/assets/collection-tab-gslp5F0N.js +1 -0
  62. package/dist/client/assets/collection-table-wrapper-DIbesVyO.js +1 -0
  63. package/dist/client/assets/collection-tabs-DSThe4TZ.js +1 -0
  64. package/dist/client/assets/command-CuDo8_GW.js +1 -0
  65. package/dist/client/assets/connect-Dg03rIYV.js +1 -0
  66. package/dist/client/assets/connection-card-BdJz7ukQ.js +1 -0
  67. package/dist/client/assets/connection-detail-jgh_EmLL.js +1 -0
  68. package/dist/client/assets/connections-roV0pn7n.js +1 -0
  69. package/dist/client/assets/{constants-DeSBGDil.js → constants-BF_fvAn_.js} +1 -1
  70. package/dist/client/assets/constants-DUoC8L5w.js +1 -0
  71. package/dist/client/assets/{create-organization-dialog-DTTLW3st.js → create-organization-dialog-DPv196Km.js} +1 -1
  72. package/dist/client/assets/create-project-dialog-2_Pd_aSh.js +1 -0
  73. package/dist/client/assets/dialog-QALiZUqS.js +1 -0
  74. package/dist/client/assets/dropdown-menu-BLDCY1bL.js +1 -0
  75. package/dist/client/assets/dynamic-plugin-layout-BAUs-04R.js +1 -0
  76. package/dist/client/assets/empty-state-CeiZxNhi.js +1 -0
  77. package/dist/client/assets/empty-state-Dk2L_oED.js +1 -0
  78. package/dist/client/assets/{env-vars-editor-hgEfXkCQ.js → env-vars-editor-C-ecvZjs.js} +1 -1
  79. package/dist/client/assets/{error-boundary-BWYaX2Wu.js → error-boundary-BlQFrpbk.js} +1 -1
  80. package/dist/client/assets/{extract-connection-data-CYX0n8Dz.js → extract-connection-data-BsEN7v48.js} +1 -1
  81. package/dist/client/assets/file-browser-BEOrBYII.js +2 -0
  82. package/dist/client/assets/form-CbWGUyQf.js +1 -0
  83. package/dist/client/assets/format-time-CMKyl-GC.js +1 -0
  84. package/dist/client/assets/grid-view-wsw1RDPg.js +1 -0
  85. package/dist/client/assets/home-CWU0nrDB.js +1 -0
  86. package/dist/client/assets/{index-DjoTHPX-.js → index-BXpaQTBX.js} +2 -2
  87. package/dist/client/assets/{index-CkIIowTe.js → index-BidPkBMC.js} +1 -1
  88. package/dist/client/assets/{index-DIarRfAA.js → index-Bu-mgyhF.js} +1 -1
  89. package/dist/client/assets/{index-Cu9TDLt5.js → index-CGEiLVgM.js} +1 -1
  90. package/dist/client/assets/{index-Cj2ccTyE.js → index-Cc2Q-hXW.js} +1 -1
  91. package/dist/client/assets/{index-ZW5LgkfR.js → index-CfNE8P8f.js} +3 -3
  92. package/dist/client/assets/index-CwsYRpNw.css +1 -0
  93. package/dist/client/assets/{index-BleD0AWt.js → index-DDYx0w19.js} +1 -1
  94. package/dist/client/assets/index-DHPVwvvK.js +1 -0
  95. package/dist/client/assets/{index-DyoRyDg0.js → index-DUWyEHsq.js} +3 -3
  96. package/dist/client/assets/{infiniteQueryObserver-4tHvFsCT.js → infiniteQueryObserver-B0EWimPZ.js} +1 -1
  97. package/dist/client/assets/input-DIsbo1lI.js +1 -0
  98. package/dist/client/assets/integration-icon-DcCARkam.js +1 -0
  99. package/dist/client/assets/label-CP_MZF-0.js +1 -0
  100. package/dist/client/assets/{layout-CiQVyOtU.js → layout-0JlcWnLI.js} +1 -1
  101. package/dist/client/assets/{localstorage-keys-BVi4c9Wu.js → localstorage-keys-R4XNPXwy.js} +1 -1
  102. package/dist/client/assets/login-_PPABhsV.js +1 -0
  103. package/dist/client/assets/{mcp-oauth-D5ZIKdBG.js → mcp-oauth-BWHYGXC1.js} +1 -1
  104. package/dist/client/assets/mcp-server-card-cX2Tejap.js +1 -0
  105. package/dist/client/assets/mcp-server-detail-B28ZtBkh.js +2 -0
  106. package/dist/client/assets/members-DJOwIKYx.js +3 -0
  107. package/dist/client/assets/{monaco-editor-D8XjYu_I.js → monaco-editor-D_GBjMj0.js} +1 -1
  108. package/dist/client/assets/{monitoring-CDhjTLeQ.js → monitoring-BNLqQvTt.js} +5 -5
  109. package/dist/client/assets/{oauth-callback-BeReH52R.js → oauth-callback-EdySGBJH.js} +1 -1
  110. package/dist/client/assets/page-C4vj3JO0.js +1 -0
  111. package/dist/client/assets/page-a94myL5U.js +1 -0
  112. package/dist/client/assets/{plugin-empty-state-DJs75tbR.js → plugin-empty-state-nEolcCXS.js} +1 -1
  113. package/dist/client/assets/{plugin-header-B9k5Jlo7.js → plugin-header-DE4En7D8.js} +1 -1
  114. package/dist/client/assets/popover-gPOnk7wt.js +1 -0
  115. package/dist/client/assets/project-layout-D32bBhDN.js +1 -0
  116. package/dist/client/assets/project-settings-BHpZshG9.js +1 -0
  117. package/dist/client/assets/projects-list-CwEp-lb0.js +1 -0
  118. package/dist/client/assets/{registry-utils-BSsNDH8z.js → registry-utils-D7Rmthqt.js} +1 -1
  119. package/dist/client/assets/resizable-6Lb0xMt4.js +1 -0
  120. package/dist/client/assets/select-BggQZ1Tx.js +1 -0
  121. package/dist/client/assets/shell-layout-CzYvgeZY.js +12 -0
  122. package/dist/client/assets/spinner-B_SBvaLu.js +1 -0
  123. package/dist/client/assets/{store-invite-OC-5AI4v.js → store-invite-DLhQlLoS.js} +1 -1
  124. package/dist/client/assets/switch-D6vw18Yw.js +1 -0
  125. package/dist/client/assets/table-Do6WMe3W.js +1 -0
  126. package/dist/client/assets/tasks-Bq2Pr-RR.js +1 -0
  127. package/dist/client/assets/textarea-oHVaqxcw.js +1 -0
  128. package/dist/client/assets/{tools-list-B4uqUufu.js → tools-list-CNOFWqOv.js} +1 -1
  129. package/dist/client/assets/{topbar-portal-BkkURAkp.js → topbar-portal-req43WDK.js} +1 -1
  130. package/dist/client/assets/typewriter-title-CPAQ-LAN.js +16 -0
  131. package/dist/client/assets/{use-binding-jnlj8haE.js → use-binding-Ci-Bobgy.js} +1 -1
  132. package/dist/client/assets/{use-connection-CdUUg5oM.js → use-connection-DQ_s0J7q.js} +1 -1
  133. package/dist/client/assets/{use-create-virtual-mcp-Brpfqy1S.js → use-create-virtual-mcp-dFxVUcUv.js} +1 -1
  134. package/dist/client/assets/{use-deco-chat-open-BIqIiDW-.js → use-deco-chat-open-Dt7HPs70.js} +3 -3
  135. package/dist/client/assets/{use-install-from-registry-zPimeqjE.js → use-install-from-registry-BwMZfHES.js} +1 -1
  136. package/dist/client/assets/use-list-state-B1GDSVRC.js +1 -0
  137. package/dist/client/assets/{use-llm-AxlP2IMZ.js → use-llm-BQiFzTFE.js} +1 -1
  138. package/dist/client/assets/{use-mcp-prompts-B4-jhghr.js → use-mcp-prompts-DW8bdyVk.js} +1 -1
  139. package/dist/client/assets/{use-mcp-tools-CwSPwOy3.js → use-mcp-tools-CyxMU-U3.js} +1 -1
  140. package/dist/client/assets/{use-mobile-CZgmHxJy.js → use-mobile-CwW2OqhO.js} +1 -1
  141. package/dist/client/assets/{use-organization-settings-7U_CYDtf.js → use-organization-settings-DR0xAoRU.js} +1 -1
  142. package/dist/client/assets/{use-project-DHmrO9yE.js → use-project-D6K-Qkve.js} +1 -1
  143. package/dist/client/assets/{use-virtual-mcp-B_EKKbiX.js → use-virtual-mcp-YuqZrZuH.js} +1 -1
  144. package/dist/client/assets/useInfiniteQuery-DeQegkYt.js +1 -0
  145. package/dist/client/assets/{useMutation-BZJqJibi.js → useMutation-CMum5GhU.js} +1 -1
  146. package/dist/client/assets/useQuery-BCcnZLQc.js +1 -0
  147. package/dist/client/assets/view-mode-toggle-4KKEmX6-.js +1 -0
  148. package/dist/client/assets/workflow-Dymxh2Yh.js +1 -0
  149. package/dist/client/index.html +2 -2
  150. package/dist/server/cli.js +176 -176
  151. package/dist/server/migrate.js +150 -150
  152. package/dist/server/server.js +156 -156
  153. package/package.json +1 -1
  154. package/dist/client/assets/agent-connections-preview-C8us1TXi.js +0 -1
  155. package/dist/client/assets/agent-detail-DPvjIJq8.js +0 -1
  156. package/dist/client/assets/agents-B_Mc2Y0p.js +0 -1
  157. package/dist/client/assets/avatar-BlXkFPmj.js +0 -1
  158. package/dist/client/assets/badge-DspY47ru.js +0 -1
  159. package/dist/client/assets/breadcrumb-Ds3Lal_V.js +0 -1
  160. package/dist/client/assets/button-DyxB0Yk5.js +0 -1
  161. package/dist/client/assets/card-Czo4WORA.js +0 -1
  162. package/dist/client/assets/checkbox-BJHuci-0.js +0 -1
  163. package/dist/client/assets/collection-search-B1sfCtHP.js +0 -1
  164. package/dist/client/assets/collection-tab-C0EGq1kq.js +0 -1
  165. package/dist/client/assets/collection-table-wrapper-CWAiVtOh.js +0 -1
  166. package/dist/client/assets/collection-tabs-BBncsSV1.js +0 -1
  167. package/dist/client/assets/command-DwjGvSxM.js +0 -1
  168. package/dist/client/assets/connect-79qxws_p.js +0 -1
  169. package/dist/client/assets/connection-card-BNG8RiKR.js +0 -1
  170. package/dist/client/assets/connection-detail-DpJ2obA4.js +0 -1
  171. package/dist/client/assets/connections-BOIKCGcJ.js +0 -1
  172. package/dist/client/assets/constants-Bo5G03e3.js +0 -1
  173. package/dist/client/assets/create-project-dialog-b2rgBy6I.js +0 -1
  174. package/dist/client/assets/dialog-RkqsUuro.js +0 -1
  175. package/dist/client/assets/dropdown-menu-DJfLCcXj.js +0 -1
  176. package/dist/client/assets/dynamic-plugin-layout-C-BX9dZD.js +0 -1
  177. package/dist/client/assets/empty-state-B1qLg3Wj.js +0 -1
  178. package/dist/client/assets/empty-state-C70KsS8J.js +0 -1
  179. package/dist/client/assets/file-browser-luwLtvt1.js +0 -2
  180. package/dist/client/assets/form-CPHFoWqg.js +0 -1
  181. package/dist/client/assets/grid-view-BYwAtmMs.js +0 -1
  182. package/dist/client/assets/home-6BSXWwE-.js +0 -1
  183. package/dist/client/assets/index-NuPnrQEp.js +0 -1
  184. package/dist/client/assets/index-tYpHqvxs.css +0 -1
  185. package/dist/client/assets/input-BGIEfDaw.js +0 -1
  186. package/dist/client/assets/integration-icon-BRZY1p3G.js +0 -1
  187. package/dist/client/assets/label-nYOkPUBD.js +0 -1
  188. package/dist/client/assets/login-ZhUdP3Du.js +0 -1
  189. package/dist/client/assets/mcp-server-card-BluZeoJV.js +0 -1
  190. package/dist/client/assets/mcp-server-detail-DA38ZVYK.js +0 -2
  191. package/dist/client/assets/members-CcwWOeY4.js +0 -3
  192. package/dist/client/assets/page-BL5oRGL8.js +0 -1
  193. package/dist/client/assets/page-KDOuYuNd.js +0 -1
  194. package/dist/client/assets/popover-CRq_6wOS.js +0 -1
  195. package/dist/client/assets/project-layout-BNYVyor9.js +0 -1
  196. package/dist/client/assets/project-settings-BB9OYyku.js +0 -1
  197. package/dist/client/assets/projects-list-tCSe-p9p.js +0 -1
  198. package/dist/client/assets/resizable-IICqdC0P.js +0 -1
  199. package/dist/client/assets/select-f15wOonn.js +0 -1
  200. package/dist/client/assets/shell-layout-Du8t77ur.js +0 -12
  201. package/dist/client/assets/spinner-DnPscNbk.js +0 -1
  202. package/dist/client/assets/switch-BIO6p3F2.js +0 -1
  203. package/dist/client/assets/table-BECdubXZ.js +0 -1
  204. package/dist/client/assets/tasks-07lkw73y.js +0 -1
  205. package/dist/client/assets/textarea-Beyy6QRE.js +0 -1
  206. package/dist/client/assets/typewriter-title-CXc5iNqe.js +0 -16
  207. package/dist/client/assets/use-list-state-C8dJBLRY.js +0 -1
  208. package/dist/client/assets/useInfiniteQuery-DiBxunOm.js +0 -1
  209. package/dist/client/assets/useQuery-B0sG-lD7.js +0 -1
  210. package/dist/client/assets/utils-CDly9l2F.js +0 -1
  211. package/dist/client/assets/view-mode-toggle-DFlygBbR.js +0 -1
  212. package/dist/client/assets/workflow-CyeaW6pw.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as S,bv as gs,bw as vs,M as ys,bf as B,s as b,bx as Qe,by as ua,bj as xs,bk as bs,be as _s,bg as U,ba as Re,aj as $e,o as k,bh as I,bi as ce,bz as Es,bA as O,ak as Is,b5 as Ss,c as j,u as Ce,K as Le,a as pa,z as It,t as St,j as d,g as ws,a$ as Ns,am as ma,a3 as ge,at as fa,av as ha,aq as ga,b8 as va,b7 as Ts,an as Je,b6 as Cs,al as As,b0 as Ms}from"./index-DyoRyDg0.js";import{u as wt,a as Nt,d as js}from"./constants-DeSBGDil.js";import{b as Rs}from"./use-virtual-mcp-B_EKKbiX.js";import{a as ks,u as Tt}from"./use-llm-AxlP2IMZ.js";import{u as Ps}from"./useQuery-B0sG-lD7.js";import{u as ke,L as et}from"./localstorage-keys-BVi4c9Wu.js";import{B as ya}from"./button-DyxB0Yk5.js";import{I as Os}from"./input-BGIEfDaw.js";import{P as Ds,a as $s,b as Ls}from"./popover-CRq_6wOS.js";import{S as Zs,a as Fs,b as zs,c as Us,d as Bs}from"./select-f15wOonn.js";import{c as ve}from"./utils-CDly9l2F.js";import{E as xa,i as Vs}from"./error-boundary-BWYaX2Wu.js";import{t as ht}from"./ChevronDown-DhDohZgY.js";import{i as qs}from"./File06-ZuO2Pzkt.js";import{c as Ws}from"./Grid01-Hl_fTaOZ.js";import{a as Hs}from"./Image01-UevfVWVa.js";import{s as Js}from"./RefreshCcw01-BjGY5EQM.js";import{i as ba}from"./SearchMd-B2tl0hgr.js";import{b as Ct,c as Gs,a as Ys,e as Qs}from"./use-connection-CdUUg5oM.js";import{u as Xs}from"./Code01-BALFVt_U.js";var Pe;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const o={};for(const i of r)o[i]=i;return o},t.getValidEnumValues=r=>{const o=t.objectKeys(r).filter(n=>typeof r[r[n]]!="number"),i={};for(const n of o)i[n]=r[n];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const o=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.push(i);return o},t.find=(r,o)=>{for(const i of r)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,o=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=s,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(Pe||(Pe={}));var Ut;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ut||(Ut={}));Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Xe extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},s={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(a(i));else{let n=s,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(n[l]=n[l]||{_errors:[]},n[l]._errors.push(a(i))):n[l]=n[l]||{_errors:[]},n=n[l],c++}}};return r(this),s}static assert(e){if(!(e instanceof Xe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const o=r.path[0];a[o]=a[o]||[],a[o].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}Xe.create=t=>new Xe(t);var Bt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Bt||(Bt={}));var w;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(w||(w={}));const Ks=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Ks.displayName="ArrowsRight";const _a=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));_a.displayName="ChevronSelectorVertical";const Ea=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));Ea.displayName="CurrencyDollar";const er=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));er.displayName="Lightbulb02";const Ia=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));Ia.displayName="LogOut04";const Sa=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));Sa.displayName="Stars01";var wa="vercel.ai.error",tr=Symbol.for(wa),Vt,qt,se=class Na extends(qt=Error,Vt=tr,qt){constructor({name:e,message:a,cause:s}){super(a),this[Vt]=!0,this.name=e,this.cause=s}static isInstance(e){return Na.hasMarker(e,wa)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function Ta(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ca="AI_InvalidArgumentError",Aa=`vercel.ai.error.${Ca}`,ar=Symbol.for(Aa),Wt,Ht,sr=class extends(Ht=se,Wt=ar,Ht){constructor({message:t,cause:e,argument:a}){super({name:Ca,message:t,cause:e}),this[Wt]=!0,this.argument=a}static isInstance(t){return se.hasMarker(t,Aa)}},Ma="AI_JSONParseError",ja=`vercel.ai.error.${Ma}`,rr=Symbol.for(ja),Jt,Gt,Yt=class extends(Gt=se,Jt=rr,Gt){constructor({text:t,cause:e}){super({name:Ma,message:`JSON parsing failed: Text: ${t}.
1
+ import{r as S,bw as gs,bx as vs,M as ys,bg as B,s as b,by as Qe,bz as ua,bk as xs,bl as bs,bf as _s,bh as U,bb as Re,ah as $e,o as k,bi as I,bj as ce,bA as Es,bB as O,ai as Is,b6 as Ss,c as j,u as Ce,K as Le,a as pa,z as It,t as St,j as d,g as ws,b0 as Ns,ak as ma,a3 as ge,ar as fa,at as ha,ao as ga,b9 as va,b8 as Ts,al as Je,b7 as Cs,aj as As,b1 as Ms}from"./index-DUWyEHsq.js";import{u as wt,a as Nt,d as js}from"./constants-BF_fvAn_.js";import{b as Rs}from"./use-virtual-mcp-YuqZrZuH.js";import{a as ks,u as Tt}from"./use-llm-BQiFzTFE.js";import{u as Ps}from"./useQuery-BCcnZLQc.js";import{u as ke,L as et}from"./localstorage-keys-R4XNPXwy.js";import{c as ve,B as ya}from"./button-BzzgqPA1.js";import{I as Os}from"./input-DIsbo1lI.js";import{P as Ds,a as $s,b as Ls}from"./popover-gPOnk7wt.js";import{S as Zs,a as Fs,b as zs,c as Us,d as Bs}from"./select-BggQZ1Tx.js";import{E as xa,i as Vs}from"./error-boundary-BlQFrpbk.js";import{t as ht}from"./ChevronDown-CbbKn8HV.js";import{i as qs}from"./File06-B40bEevg.js";import{c as Ws}from"./Grid01-BSLssB32.js";import{a as Hs}from"./Image01-BHFBKHh1.js";import{s as Js}from"./RefreshCcw01-Dh-nQZ6_.js";import{i as ba}from"./SearchMd-DUhyUDi8.js";import{b as Ct,c as Gs,a as Ys,e as Qs}from"./use-connection-DQ_s0J7q.js";import{u as Xs}from"./Code01-BrzyalBQ.js";var Pe;(function(t){t.assertEqual=r=>{};function e(r){}t.assertIs=e;function a(r){throw new Error}t.assertNever=a,t.arrayToEnum=r=>{const o={};for(const i of r)o[i]=i;return o},t.getValidEnumValues=r=>{const o=t.objectKeys(r).filter(n=>typeof r[r[n]]!="number"),i={};for(const n of o)i[n]=r[n];return t.objectValues(i)},t.objectValues=r=>t.objectKeys(r).map(function(o){return r[o]}),t.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const o=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.push(i);return o},t.find=(r,o)=>{for(const i of r)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function s(r,o=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=s,t.jsonStringifyReplacer=(r,o)=>typeof o=="bigint"?o.toString():o})(Pe||(Pe={}));var Ut;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ut||(Ut={}));Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);Pe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Xe extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},s={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)s._errors.push(a(i));else{let n=s,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(n[l]=n[l]||{_errors:[]},n[l]._errors.push(a(i))):n[l]=n[l]||{_errors:[]},n=n[l],c++}}};return r(this),s}static assert(e){if(!(e instanceof Xe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),s=[];for(const r of this.issues)if(r.path.length>0){const o=r.path[0];a[o]=a[o]||[],a[o].push(e(r))}else s.push(e(r));return{formErrors:s,fieldErrors:a}}get formErrors(){return this.flatten()}}Xe.create=t=>new Xe(t);var Bt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Bt||(Bt={}));var w;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(w||(w={}));const Ks=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M4 7h11m0 0-4 4m4-4-4-4M4 17h16m0 0-4 4m4-4-4-4"}));Ks.displayName="ArrowsRight";const _a=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));_a.displayName="ChevronSelectorVertical";const Ea=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M6 16a4 4 0 0 0 4 4h4a4 4 0 0 0 0-8h-4a4 4 0 0 1 0-8h4a4 4 0 0 1 4 4m-6-6v20"}));Ea.displayName="CurrencyDollar";const er=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"M10 17.659V20a2 2 0 1 0 4 0v-2.341M12 2v1m-9 9H2m3.5-6.5-.6-.6m13.6.6.6-.6M22 12h-1m-3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"}));er.displayName="Lightbulb02";const Ia=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m18 8 4 4m0 0-4 4m4-4H9m6-7.796A8.383 8.383 0 0 0 10.667 3C5.88 3 2 7.03 2 12s3.88 9 8.667 9A8.384 8.384 0 0 0 15 19.796"}));Ia.displayName="LogOut04";const Sa=({size:t=24,color:e="currentColor",...a})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},S.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));Sa.displayName="Stars01";var wa="vercel.ai.error",tr=Symbol.for(wa),Vt,qt,se=class Na extends(qt=Error,Vt=tr,qt){constructor({name:e,message:a,cause:s}){super(a),this[Vt]=!0,this.name=e,this.cause=s}static isInstance(e){return Na.hasMarker(e,wa)}static hasMarker(e,a){const s=Symbol.for(a);return e!=null&&typeof e=="object"&&s in e&&typeof e[s]=="boolean"&&e[s]===!0}};function Ta(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ca="AI_InvalidArgumentError",Aa=`vercel.ai.error.${Ca}`,ar=Symbol.for(Aa),Wt,Ht,sr=class extends(Ht=se,Wt=ar,Ht){constructor({message:t,cause:e,argument:a}){super({name:Ca,message:t,cause:e}),this[Wt]=!0,this.argument=a}static isInstance(t){return se.hasMarker(t,Aa)}},Ma="AI_JSONParseError",ja=`vercel.ai.error.${Ma}`,rr=Symbol.for(ja),Jt,Gt,Yt=class extends(Gt=se,Jt=rr,Gt){constructor({text:t,cause:e}){super({name:Ma,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${Ta(e)}`,cause:e}),this[Jt]=!0,this.text=t}static isInstance(t){return se.hasMarker(t,ja)}},Ra="AI_TypeValidationError",ka=`vercel.ai.error.${Ra}`,or=Symbol.for(ka),Qt,Xt,Te=class gt extends(Xt=se,Qt=or,Xt){constructor({value:e,cause:a,context:s}){let r="Type validation failed";if(s?.field&&(r+=` for ${s.field}`),s?.entityName||s?.entityId){r+=" (";const o=[];s.entityName&&o.push(s.entityName),s.entityId&&o.push(`id: "${s.entityId}"`),r+=o.join(", "),r+=")"}super({name:Ra,message:`${r}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${Ta(a)}`,cause:a}),this[Qt]=!0,this.value=e,this.context=s}static isInstance(e){return se.hasMarker(e,ka)}static wrap({value:e,cause:a,context:s}){var r,o,i;return gt.isInstance(a)&&a.value===e&&((r=a.context)==null?void 0:r.field)===s?.field&&((o=a.context)==null?void 0:o.entityName)===s?.entityName&&((i=a.context)==null?void 0:i.entityId)===s?.entityId?a:new gt({value:e,cause:a,context:s})}},Ze=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:s="-"}={})=>{const r=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return r;if(a.includes(s))throw new sr({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${a}".`});return()=>`${t}${s}${r()}`},nr=Ze();function Kt(t=globalThis){var e,a,s;return t.window?"runtime/browser":(e=t.navigator)!=null&&e.userAgent?`runtime/${t.navigator.userAgent.toLowerCase()}`:(s=(a=t.process)==null?void 0:a.versions)!=null&&s.node?`runtime/node.js/${t.process.version.substring(0)}`:t.EdgeRuntime?"runtime/vercel-edge":"runtime/unknown"}function fe(t){if(t==null)return{};const e={};if(t instanceof Headers)t.forEach((a,s)=>{e[s.toLowerCase()]=a});else{Array.isArray(t)||(t=Object.entries(t));for(const[a,s]of t)s!=null&&(e[a.toLowerCase()]=s)}return e}function ea(t,...e){const a=new Headers(fe(t)),s=a.get("user-agent")||"";return a.set("user-agent",[s,...e].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var ir=/"__proto__"\s*:/,lr=/"constructor"\s*:/;function ta(t){const e=JSON.parse(t);return e===null||typeof e!="object"||ir.test(t)===!1&&lr.test(t)===!1?e:cr(e)}function cr(t){let e=[t];for(;e.length;){const a=e;e=[];for(const s of a){if(Object.prototype.hasOwnProperty.call(s,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(s,"constructor")&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const r in s){const o=s[r];o&&typeof o=="object"&&e.push(o)}}}return t}function dr(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return ta(t)}try{return ta(t)}finally{Error.stackTraceLimit=e}}function At(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const s of Object.keys(a))a[s]=me(a[s])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(me):me(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(me)),t.allOf!=null&&(t.allOf=t.allOf.map(me)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(me));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=me(e[a]);return t}function me(t){return typeof t=="boolean"?t:At(t)}var ur=Symbol("Let zodToJsonSchema decide on which parser to use"),aa={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},pr=t=>typeof t=="string"?{...aa,name:t}:{...aa,...t};function V(){return{}}function mr(t,e){var a,s,r;const o={type:"array"};return(a=t.type)!=null&&a._def&&((r=(s=t.type)==null?void 0:s._def)==null?void 0:r.typeName)!==w.ZodAny&&(o.items=R(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function fr(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function hr(){return{type:"boolean"}}function Pa(t,e){return R(t.type._def,e)}var gr=(t,e)=>R(t.innerType._def,e);function Oa(t,e,a){const s=a??e.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((r,o)=>Oa(t,e,r))};switch(s){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return vr(t)}}var vr=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function yr(t,e){return{...R(t.innerType._def,e),default:t.defaultValue()}}function xr(t,e){return e.effectStrategy==="input"?R(t.schema._def,e):V()}function br(t){return{type:"string",enum:Array.from(t.values)}}var _r=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Er(t,e){const a=[R(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),R(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),s=[];return a.forEach(r=>{if(_r(r))s.push(...r.allOf);else{let o=r;if("additionalProperties"in r&&r.additionalProperties===!1){const{additionalProperties:i,...n}=r;o=n}s.push(o)}}),s.length?{allOf:s}:void 0}function Ir(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var pt=void 0,Y={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(pt===void 0&&(pt=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),pt),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Da(t,e){const a={type:"string"};if(t.checks)for(const s of t.checks)switch(s.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"email":switch(e.emailStrategy){case"format:email":Q(a,"email",s.message,e);break;case"format:idn-email":Q(a,"idn-email",s.message,e);break;case"pattern:zod":z(a,Y.email,s.message,e);break}break;case"url":Q(a,"uri",s.message,e);break;case"uuid":Q(a,"uuid",s.message,e);break;case"regex":z(a,s.regex,s.message,e);break;case"cuid":z(a,Y.cuid,s.message,e);break;case"cuid2":z(a,Y.cuid2,s.message,e);break;case"startsWith":z(a,RegExp(`^${mt(s.value,e)}`),s.message,e);break;case"endsWith":z(a,RegExp(`${mt(s.value,e)}$`),s.message,e);break;case"datetime":Q(a,"date-time",s.message,e);break;case"date":Q(a,"date",s.message,e);break;case"time":Q(a,"time",s.message,e);break;case"duration":Q(a,"duration",s.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"includes":{z(a,RegExp(mt(s.value,e)),s.message,e);break}case"ip":{s.version!=="v6"&&Q(a,"ipv4",s.message,e),s.version!=="v4"&&Q(a,"ipv6",s.message,e);break}case"base64url":z(a,Y.base64url,s.message,e);break;case"jwt":z(a,Y.jwt,s.message,e);break;case"cidr":{s.version!=="v6"&&z(a,Y.ipv4Cidr,s.message,e),s.version!=="v4"&&z(a,Y.ipv6Cidr,s.message,e);break}case"emoji":z(a,Y.emoji(),s.message,e);break;case"ulid":{z(a,Y.ulid,s.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Q(a,"binary",s.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{z(a,Y.base64,s.message,e);break}}break}case"nanoid":z(a,Y.nanoid,s.message,e)}return a}function mt(t,e){return e.patternStrategy==="escape"?wr(t):t}var Sr=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function wr(t){let e="";for(let a=0;a<t.length;a++)Sr.has(t[a])||(e+="\\"),e+=t[a];return e}function Q(t,e,a,s){var r;t.format||(r=t.anyOf)!=null&&r.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&s.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function z(t,e,a,s){var r;t.pattern||(r=t.allOf)!=null&&r.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:sa(e,s),...a&&s.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=sa(e,s)}function sa(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const s={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=s.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,c=!1;for(let l=0;l<r.length;l++){if(i){o+=r[l],i=!1;continue}if(s.i){if(n){if(r[l].match(/[a-z]/)){c?(o+=r[l],o+=`${r[l-2]}-${r[l]}`.toUpperCase(),c=!1):r[l+1]==="-"&&((a=r[l+2])!=null&&a.match(/[a-z]/))?(o+=r[l],c=!0):o+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){o+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(s.m){if(r[l]==="^"){o+=`(^|(?<=[\r
4
4
  ]))`;continue}else if(r[l]==="$"){o+=`($|(?=[\r
@@ -16,8 +16,8 @@ ${o.join(`
16
16
 
17
17
  Help the user understand and work with this resource.`),e[1]=s.collectionName,e[2]=s.connectionId,e[3]=s.itemId,e[4]=t,e[5]=r}else r=e[5];return r.join(`
18
18
 
19
- `)}function Vo(){const t=j.c(5),e=It(),{org:a}=Ce();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const r=pa(s);let o;return t[1]!==a||t[2]!==r||t[3]!==e?(o=i=>{const c=i.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!c||!c[1])return;const l=c[1],u=r.connectionId;if(!u)return;e.invalidateQueries({queryKey:Le.collection(a.slug,u,l)});const p=l.toLowerCase().replace(/_/g," ");St.success(`${p} updated`)},t[1]=a,t[2]=r,t[3]=e,t[4]=o):o=t[4],o}function Z(t){const e=j.c(8);let a,s;e[0]!==t?({className:a,...s}=t,e[0]=t,e[1]=a,e[2]=s):(a=e[1],s=e[2]);let r;e[3]!==a?(r=ve("bg-accent animate-pulse rounded-md",a),e[3]=a,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=d.jsx("div",{"data-slot":"skeleton",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}const qo=["x-ai/grok-code-fast-1","anthropic/claude-sonnet-4.5","google/gemini-2.5-flash","xiaomi/mimo-v2-flash:free","google/gemini-3-flash-preview","deepseek/deepseek-v3.2","anthropic/claude-opus-4.5","x-ai/grok-4.1-fast","google/gemini-2.5-flash-lite","google/gemini-2.0-flash-001"],Et=new Map;qo.forEach((t,e)=>{Et.set(t,e)});function Rt(t){const e=j.c(3);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={pageSize:999},e[0]=a):a=e[0];const s=ks(t??void 0,a);let r;return e[1]!==s?(r=s.filter(Ho).sort(Wo),e[1]=s,e[2]=r):r=e[2],r}function Wo(t,e){const a=Et.get(t.id),s=Et.get(e.id);return a!==void 0&&s!==void 0?a-s:a!==void 0?-1:s!==void 0?1:t.title.localeCompare(e.title)}function Ho(t){return t.limits?.contextWindow&&t.limits?.maxOutputTokens}const Jo={reasoning:{icon:d.jsx(Sa,{className:"size-4"}),label:"Reasoning"},"image-upload":{icon:d.jsx(Hs,{className:"size-4"}),label:"Can analyze images"},"file-upload":{icon:d.jsx(qs,{className:"size-4"}),label:"Can analyze files"},"web-search":{icon:d.jsx(ba,{className:"size-4"}),label:"Can search the web to answer questions"}};function Xa(t){const e=j.c(10),{capability:a}=t,s=Jo[a];let r,o;e[0]!==a||e[1]!==s?(r=s||{icon:null,label:a},o=r.label.split("-").map(Go).join(" "),e[0]=a,e[1]=s,e[2]=r,e[3]=o):(r=e[2],o=e[3]);const i=o;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:"color-mix(in oklch, var(--chart-1) 15%, transparent)",color:"var(--chart-1)"},e[4]=n):n=e[4];let c;e[5]!==i?(c=d.jsx("span",{children:i}),e[5]=i,e[6]=c):c=e[6];let l;return e[7]!==r.icon||e[8]!==c?(l=d.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 px-1.5 rounded-md text-xs font-medium",style:n,children:[r.icon,c]}),e[7]=r.icon,e[8]=c,e[9]=l):l=e[9],l}function Go(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Yo(t){const e=j.c(53),{model:a,compact:s}=t,r=s===void 0?!1:s;if(!a){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=d.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Hover to preview"}),e[0]=g):g=e[0],g}const o=a.limits?.contextWindow||a.costs?.input||a.costs?.output||a.limits?.maxOutputTokens;if(!o&&!r){let g;e[1]!==a.logo||e[2]!==a.title?(g=a.logo&&d.jsx("img",{src:a.logo,className:"w-6 h-6",alt:a.title}),e[1]=a.logo,e[2]=a.title,e[3]=g):g=e[3];let h;e[4]!==a.title?(h=d.jsx("p",{className:"text-lg font-medium leading-7",children:a.title}),e[4]=a.title,e[5]=h):h=e[5];let x;e[6]!==g||e[7]!==h?(x=d.jsxs("div",{className:"flex items-center gap-3 py-2 px-0",children:[g,h]}),e[6]=g,e[7]=h,e[8]=x):x=e[8];let m;e[9]!==a.description?(m=a.description&&d.jsx("p",{className:"text-sm text-muted-foreground",children:a.description}),e[9]=a.description,e[10]=m):m=e[10];let E;return e[11]!==x||e[12]!==m?(E=d.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[x,m]}),e[11]=x,e[12]=m,e[13]=E):E=e[13],E}if(!o&&r)return null;if(r){let g;e[14]!==a.limits?(g=a.limits?.contextWindow&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Context"}),d.jsxs("span",{className:"text-foreground font-medium",children:[a.limits.contextWindow.toLocaleString()," tokens"]})]}),e[14]=a.limits,e[15]=g):g=e[15];let h;e[16]!==a.costs?(h=a.costs?.input&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Input cost"}),d.jsxs("span",{className:"text-foreground font-medium",children:["$",(a.costs.input*1e6).toFixed(2)," / 1M"]})]}),e[16]=a.costs,e[17]=h):h=e[17];let x;e[18]!==a.costs?(x=a.costs?.output&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Output cost"}),d.jsxs("span",{className:"text-foreground font-medium",children:["$",(a.costs.output*1e6).toFixed(2)," / 1M"]})]}),e[18]=a.costs,e[19]=x):x=e[19];let m;e[20]!==a.limits?(m=a.limits?.maxOutputTokens&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Output limit"}),d.jsxs("span",{className:"text-foreground font-medium",children:[a.limits.maxOutputTokens.toLocaleString()," tokens"]})]}),e[20]=a.limits,e[21]=m):m=e[21];let E;return e[22]!==g||e[23]!==h||e[24]!==x||e[25]!==m?(E=d.jsxs("div",{className:"flex flex-col gap-2.5 pt-3 pb-3 px-3 rounded-b-lg text-xs",children:[g,h,x,m]}),e[22]=g,e[23]=h,e[24]=x,e[25]=m,e[26]=E):E=e[26],E}let i;e[27]!==a.logo||e[28]!==a.title?(i=a.logo&&d.jsx("img",{src:a.logo,className:"w-6 h-6 shrink-0",alt:a.title}),e[27]=a.logo,e[28]=a.title,e[29]=i):i=e[29];let n;e[30]!==a.title?(n=d.jsx("p",{className:"text-lg font-medium leading-7 wrap-break-word min-w-0",children:a.title}),e[30]=a.title,e[31]=n):n=e[31];let c;e[32]!==i||e[33]!==n?(c=d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[i,n]}),e[32]=i,e[33]=n,e[34]=c):c=e[34];let l;e[35]!==a.capabilities?(l=a.capabilities&&a.capabilities.length>0&&d.jsx("div",{className:"flex items-center gap-2",children:a.capabilities.map(Qo)}),e[35]=a.capabilities,e[36]=l):l=e[36];let u;e[37]!==c||e[38]!==l?(u=d.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[c,l]}),e[37]=c,e[38]=l,e[39]=u):u=e[39];let p;e[40]!==a.limits?(p=a.limits?.contextWindow&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Ws,{className:"w-3.5 h-3.5 text-muted-foreground"}),d.jsx("p",{className:"text-sm text-foreground",children:"Context window"})]}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.limits.contextWindow.toLocaleString()," tokens"]})]}),e[40]=a.limits,e[41]=p):p=e[41];let f;e[42]!==a.costs?(f=(a.costs?.input||a.costs?.output)&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Ea,{className:"w-3.5 h-3.5 text-muted-foreground"}),d.jsx("p",{className:"text-sm text-foreground",children:"Costs"})]}),d.jsxs("div",{className:"flex flex-col gap-0.5",children:[a.costs?.input!==null&&a.costs?.input!==void 0&&d.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",(a.costs.input*1e6).toFixed(2)," / 1M tokens (input)"]}),a.costs?.output!==null&&a.costs?.output!==void 0&&d.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",(a.costs.output*1e6).toFixed(2)," / 1M tokens (output)"]})]})]}),e[42]=a.costs,e[43]=f):f=e[43];let v;e[44]!==a.limits?(v=a.limits?.maxOutputTokens&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Ia,{className:"w-4.5 h-4.5 text-muted-foreground/70"}),d.jsx("p",{className:"text-sm text-foreground",children:"Output limit"})]}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.limits.maxOutputTokens.toLocaleString()," token limit"]})]}),e[44]=a.limits,e[45]=v):v=e[45];let y;e[46]!==p||e[47]!==f||e[48]!==v?(y=d.jsxs("div",{className:"flex flex-col gap-4",children:[p,f,v]}),e[46]=p,e[47]=f,e[48]=v,e[49]=y):y=e[49];let _;return e[50]!==y||e[51]!==u?(_=d.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[u,y]}),e[50]=y,e[51]=u,e[52]=_):_=e[52],_}function Qo(t){return d.jsx(Xa,{capability:t},t)}function Xo(t){const e=j.c(15),{model:a,onHover:s}=t;let r;e[0]!==a||e[1]!==s?(r=()=>s(a),e[0]=a,e[1]=s,e[2]=r):r=e[2];let o;e[3]!==a.logo||e[4]!==a.title?(o=a.logo&&d.jsx("img",{src:a.logo,className:"w-5 h-5 shrink-0",alt:a.title}),e[3]=a.logo,e[4]=a.title,e[5]=o):o=e[5];let i;e[6]!==a.title?(i=d.jsx("span",{className:"text-sm text-foreground flex-1 min-w-0 line-clamp-1",children:a.title}),e[6]=a.title,e[7]=i):i=e[7];let n;e[8]!==a.capabilities?(n=a.capabilities&&a.capabilities.length>0&&d.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:a.capabilities.slice(0,2).map(Ko)}),e[8]=a.capabilities,e[9]=n):n=e[9];let c;return e[10]!==r||e[11]!==o||e[12]!==i||e[13]!==n?(c=d.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:r,children:[o,i,n]}),e[10]=r,e[11]=o,e[12]=i,e[13]=n,e[14]=c):c=e[14],c}function Ko(t){return d.jsx(Xa,{capability:t},t)}function en(t){const e=j.c(10),{error:a,onRetry:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=d.jsx("div",{className:"bg-destructive/10 p-2 rounded-full",children:d.jsx(Vs,{className:"size-5 text-destructive"})}),e[0]=r):r=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=d.jsx("p",{className:"text-sm font-medium text-foreground",children:"Failed to load models"}),e[1]=o):o=e[1];const i=a?.message||"Could not fetch models from this provider.";let n;e[2]!==i?(n=d.jsxs("div",{className:"flex flex-col gap-1",children:[o,d.jsxs("p",{className:"text-xs text-muted-foreground max-w-[260px]",children:[i," Try another provider or retry."]})]}),e[2]=i,e[3]=n):n=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Js,{className:"size-3.5"}),e[4]=c):c=e[4];let l;e[5]!==s?(l=d.jsxs(ya,{variant:"outline",size:"sm",onClick:s,className:"gap-1.5",children:[c,"Retry"]}),e[5]=s,e[6]=l):l=e[6];let u;return e[7]!==n||e[8]!==l?(u=d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-4 py-8 text-center",children:[r,n,l]}),e[7]=n,e[8]=l,e[9]=u):u=e[9],u}function tn(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=d.jsx("div",{className:"flex-1 overflow-y-auto px-0.5 pt-2 space-y-1",children:Array.from({length:6}).map(an)}),t[0]=e):e=t[0],e}function an(t,e){return d.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[d.jsx(Z,{className:"size-5 shrink-0 rounded-sm"}),d.jsx(Z,{className:"flex-1 h-4"}),d.jsx(Z,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function sn(t){const e=j.c(20),{connectionId:a,allowAll:s,isModelAllowed:r,searchTerm:o,selectedModel:i,onModelSelect:n,onHover:c}=t,l=Rt(a??void 0);let u;e[0]!==l||e[1]!==s||e[2]!==a||e[3]!==r?(u=s?l:l.filter(g=>a&&r(a,g.id)),e[0]=l,e[1]=s,e[2]=a,e[3]=r,e[4]=u):u=e[4];const p=u;let f;e[5]!==p||e[6]!==o?(f=o.trim()?p.filter(g=>{const h=o.toLowerCase();return g.title.toLowerCase().includes(h)||g.provider?.toLowerCase().includes(h)||g.description?.toLowerCase().includes(h)}):p,e[5]=p,e[6]=o,e[7]=f):f=e[7];const v=f;if(v.length===0){let g;return e[8]===Symbol.for("react.memo_cache_sentinel")?(g=d.jsx("div",{className:"flex-1 flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No models found"}),e[8]=g):g=e[8],g}let y;if(e[9]!==v||e[10]!==c||e[11]!==n||e[12]!==i?.thinking){let g;e[14]!==c||e[15]!==n||e[16]!==i?.thinking?(g=h=>{const x=h.id===i?.thinking.id;return d.jsx("div",{onClick:()=>n(h),className:ve("rounded-lg mb-1",x&&"bg-accent"),children:d.jsx(Xo,{model:h,onHover:c})},h.id)},e[14]=c,e[15]=n,e[16]=i?.thinking,e[17]=g):g=e[17],y=v.map(g),e[9]=v,e[10]=c,e[11]=n,e[12]=i?.thinking,e[13]=y}else y=e[13];let _;return e[18]!==y?(_=d.jsx("div",{className:"flex-1 overflow-y-auto px-0.5 pt-2",children:y}),e[18]=y,e[19]=_):_=e[19],_}function kt(t){const e=j.c(14),{model:a,placeholder:s}=t,r=s===void 0?"Select model":s;if(!a){let l;e[0]!==r?(l=d.jsx("span",{className:"text-sm text-muted-foreground",children:r}),e[0]=r,e[1]=l):l=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=d.jsx(ht,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[2]=u):u=e[2];let p;return e[3]!==l?(p=d.jsxs("div",{className:"flex items-center gap-1.5",children:[l,u]}),e[3]=l,e[4]=p):p=e[4],p}let o;e[5]!==a.logo||e[6]!==a.title?(o=a.logo&&d.jsx("img",{src:a.logo,className:"w-5 h-5 shrink-0 rounded-sm",alt:a.title}),e[5]=a.logo,e[6]=a.title,e[7]=o):o=e[7];let i;e[8]!==a.title?(i=d.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground group-data-[state=open]:text-foreground truncate whitespace-nowrap max-w-0 opacity-0 group-hover:max-w-[150px] group-hover:opacity-100 group-data-[state=open]:max-w-[150px] group-data-[state=open]:opacity-100 transition-all duration-200 ease-in-out overflow-hidden",children:a.title}),e[8]=a.title,e[9]=i):i=e[9];let n;e[10]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(ht,{size:14,className:"text-muted-foreground opacity-0 max-w-0 group-hover:opacity-50 group-hover:max-w-[14px] group-data-[state=open]:opacity-50 group-data-[state=open]:max-w-[14px] shrink-0 transition-all duration-200 ease-in-out overflow-hidden"}),e[10]=n):n=e[10];let c;return e[11]!==o||e[12]!==i?(c=d.jsxs("div",{className:"flex items-center gap-0 group-hover:gap-2 group-data-[state=open]:gap-2 min-w-0 overflow-hidden transition-all duration-200",children:[o,i,n]}),e[11]=o,e[12]=i,e[13]=c):c=e[13],c}function pi(t){return t?.thinking?.capabilities?.vision===!0}function rn(){const t=j.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=d.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:d.jsxs("div",{className:"flex items-center gap-2.5 h-12 px-4",children:[d.jsx(Z,{className:"size-4 shrink-0"}),d.jsx(Z,{className:"flex-1 h-6"}),d.jsx(Z,{className:"w-[140px] h-8 shrink-0"})]})}),t[0]=e):e=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsxs("div",{className:"flex-1 flex flex-col md:border-r md:w-[400px] md:min-w-[400px]",children:[e,d.jsx("div",{className:"flex-1 overflow-y-auto px-0.5 pt-2 space-y-1",children:Array.from({length:6}).map(on)})]}),t[1]=a):a=t[1];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx(Z,{className:"size-6 shrink-0"}),d.jsx(Z,{className:"h-6 w-32"})]}),t[2]=s):s=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=d.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[s,d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Z,{className:"h-6 w-20 rounded-md"}),d.jsx(Z,{className:"h-6 w-24 rounded-md"})]})]}),t[3]=r):r=t[3];let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsx(Z,{className:"h-4 w-24"}),d.jsx(Z,{className:"h-4 w-32"})]}),t[4]=o):o=t[4];let i;return t[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsxs("div",{className:"flex flex-col md:flex-row h-[350px]",children:[a,d.jsx("div",{className:"hidden md:block md:w-[320px] md:shrink-0 p-3",children:d.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[r,d.jsxs("div",{className:"flex flex-col gap-4",children:[o,d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsx(Z,{className:"h-4 w-16"}),d.jsx(Z,{className:"h-4 w-40"})]})]})]})})]}),t[5]=i):i=t[5],i}function on(t,e){return d.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[d.jsx(Z,{className:"size-5 shrink-0 rounded-sm"}),d.jsx(Z,{className:"flex-1 h-4"}),d.jsx(Z,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function nn(t){const e=j.c(40),{selectedModel:a,onModelChange:s,onClose:r,modelsConnections:o}=t,[i,n]=S.useState(null),[c,l]=S.useState(""),u=S.useRef(null),[p,f]=S.useState(a?.connectionId??null),v=Tt(),y=o??v,{isModelAllowed:_,allowAll:g,hasConnectionModels:h}=jt();let x;e[0]!==y||e[1]!==g||e[2]!==h?(x=g?y:y.filter(q=>h(q.id)),e[0]=y,e[1]=g,e[2]=h,e[3]=x):x=e[3];const m=x;let E,C;e[4]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{setTimeout(()=>{u.current?.focus()},0)},C=[],e[4]=E,e[5]=C):(E=e[4],C=e[5]),S.useEffect(E,C);let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=q=>{f(q),n(null)},e[6]=N):N=e[6];const T=N;let P;e[7]!==r||e[8]!==s||e[9]!==p?(P=q=>{p&&(s({id:q.id,connectionId:p,provider:q.provider??void 0}),l(""),r())},e[7]=r,e[8]=s,e[9]=p,e[10]=P):P=e[10];const L=P;let F;e[11]===Symbol.for("react.memo_cache_sentinel")?(F=d.jsx(ba,{size:16,className:"text-muted-foreground shrink-0"}),e[11]=F):F=e[11];let re;e[12]===Symbol.for("react.memo_cache_sentinel")?(re=q=>l(q.target.value),e[12]=re):re=e[12];let X;e[13]!==c?(X=d.jsx(Os,{ref:u,type:"text",placeholder:"Search for a model...",value:c,onChange:re,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[13]=c,e[14]=X):X=e[14];let J;e[15]!==m||e[16]!==p?(J=m.length>0&&d.jsxs(Zs,{value:p??"",onValueChange:T,children:[d.jsxs(Fs,{size:"sm",className:"w-auto min-w-[140px] h-8 shrink-0 [&>svg:last-child]:hidden",onClick:dn,children:[d.jsx(zs,{placeholder:"Select connection"}),d.jsx(_a,{className:"size-4 opacity-50 shrink-0 pointer-events-none"})]}),d.jsx(Us,{children:m.map(cn)})]}),e[15]=m,e[16]=p,e[17]=J):J=e[17];let K;e[18]!==X||e[19]!==J?(K=d.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:d.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[F,X,J]})}),e[18]=X,e[19]=J,e[20]=K):K=e[20];let oe;e[21]===Symbol.for("react.memo_cache_sentinel")?(oe=d.jsx(tn,{}),e[21]=oe):oe=e[21];let ee;e[22]!==g||e[23]!==L||e[24]!==_||e[25]!==c||e[26]!==p||e[27]!==a?(ee=d.jsx(S.Suspense,{fallback:oe,children:d.jsx(sn,{connectionId:p,allowAll:g,isModelAllowed:_,searchTerm:c,selectedModel:a,onModelSelect:L,onHover:n})}),e[22]=g,e[23]=L,e[24]=_,e[25]=c,e[26]=p,e[27]=a,e[28]=ee):ee=e[28];let ie;e[29]!==p||e[30]!==ee?(ie=d.jsx(xa,{fallback:ln,children:ee},p),e[29]=p,e[30]=ee,e[31]=ie):ie=e[31];let G;e[32]!==K||e[33]!==ie?(G=d.jsxs("div",{className:"flex-1 flex flex-col md:border-r md:w-[400px] md:min-w-[400px]",children:[K,ie]}),e[32]=K,e[33]=ie,e[34]=G):G=e[34];let M;e[35]!==i?(M=d.jsx("div",{className:"hidden md:block md:w-[320px] md:shrink-0 p-3",children:d.jsx(Yo,{model:i})}),e[35]=i,e[36]=M):M=e[36];let le;return e[37]!==G||e[38]!==M?(le=d.jsxs("div",{className:"flex flex-col md:flex-row h-[350px]",children:[G,M]}),e[37]=G,e[38]=M,e[39]=le):le=e[39],le}function ln(t){const{error:e,resetError:a}=t;return d.jsx(en,{error:e,onRetry:a})}function cn(t){return d.jsx(Bs,{value:t.id,children:d.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?d.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):d.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),d.jsx("span",{children:t.title})]})},t.id)}function dn(t){return t.stopPropagation()}function un(t){const e=j.c(6),{selectedModel:a,placeholder:s}=t,r=a?.connectionId??void 0,o=Rt(r);let i;e[0]!==o||e[1]!==a?(i=a?o.find(l=>l.id===a.thinking.id):void 0,e[0]=o,e[1]=a,e[2]=i):i=e[2];const n=i;let c;return e[3]!==n||e[4]!==s?(c=d.jsx(kt,{model:n,placeholder:s}),e[3]=n,e[4]=s,e[5]=c):c=e[5],c}function pn(t){const e=j.c(9),{selectedModel:a,placeholder:s}=t;if(!a){let u;return e[0]!==s?(u=d.jsx(kt,{model:void 0,placeholder:s}),e[0]=s,e[1]=u):u=e[1],u}const r=a.thinking.id;let o;e[2]!==r?(o=r.split("/").pop()??r,e[2]=r,e[3]=o):o=e[3];const i=o;let n;e[4]!==i?(n=d.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground group-data-[state=open]:text-foreground truncate whitespace-nowrap max-w-0 opacity-0 group-hover:max-w-[150px] group-hover:opacity-100 group-data-[state=open]:max-w-[150px] group-data-[state=open]:opacity-100 transition-all duration-200 ease-in-out overflow-hidden",children:i}),e[4]=i,e[5]=n):n=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(ht,{size:14,className:"text-muted-foreground opacity-0 max-w-0 group-hover:opacity-50 group-hover:max-w-[14px] group-data-[state=open]:opacity-50 group-data-[state=open]:max-w-[14px] shrink-0 transition-all duration-200 ease-in-out overflow-hidden"}),e[6]=c):c=e[6];let l;return e[7]!==n?(l=d.jsxs("div",{className:"flex items-center gap-0 group-hover:gap-2 group-data-[state=open]:gap-2 min-w-0 overflow-hidden transition-all duration-200",children:[n,c]}),e[7]=n,e[8]=l):l=e[8],l}function mi(t){const e=j.c(31),{selectedModel:a,onModelChange:s,modelsConnections:r,variant:o,className:i,placeholder:n}=t,c=o===void 0?"borderless":o,l=n===void 0?"Select model":n,[u,p]=S.useState(!1),f=Tt(),v=r??f;if(v.length===0)return null;const y=c==="borderless"?"ghost":"outline",_=c==="borderless"&&"md:border-none";let g;e[0]!==i||e[1]!==_?(g=ve("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",_,i),e[0]=i,e[1]=_,e[2]=g):g=e[2];let h;e[3]!==l||e[4]!==a?(h=d.jsx(pn,{selectedModel:a,placeholder:l}),e[3]=l,e[4]=a,e[5]=h):h=e[5];let x;e[6]!==l?(x=d.jsx(kt,{model:void 0,placeholder:l}),e[6]=l,e[7]=x):x=e[7];let m;e[8]!==l||e[9]!==a?(m=d.jsx(un,{selectedModel:a,placeholder:l}),e[8]=l,e[9]=a,e[10]=m):m=e[10];let E;e[11]!==x||e[12]!==m?(E=d.jsx(S.Suspense,{fallback:x,children:m}),e[11]=x,e[12]=m,e[13]=E):E=e[13];let C;e[14]!==h||e[15]!==E?(C=d.jsx(xa,{fallback:h,children:E}),e[14]=h,e[15]=E,e[16]=C):C=e[16];let N;e[17]!==C||e[18]!==y||e[19]!==g?(N=d.jsx(Ds,{asChild:!0,children:d.jsx(ya,{variant:y,size:"sm",className:g,children:C})}),e[17]=C,e[18]=y,e[19]=g,e[20]=N):N=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=d.jsx(rn,{}),e[21]=T):T=e[21];let P;e[22]===Symbol.for("react.memo_cache_sentinel")?(P=()=>p(!1),e[22]=P):P=e[22];let L;e[23]!==v||e[24]!==s||e[25]!==a?(L=d.jsx($s,{className:"w-full md:w-auto p-0",align:"start",side:"bottom",sideOffset:8,children:d.jsx(S.Suspense,{fallback:T,children:d.jsx(nn,{selectedModel:a,onModelChange:s,onClose:P,modelsConnections:v})})}),e[23]=v,e[24]=s,e[25]=a,e[26]=L):L=e[26];let F;return e[27]!==u||e[28]!==N||e[29]!==L?(F=d.jsxs(Ls,{open:u,onOpenChange:p,children:[N,L]}),e[27]=u,e[28]=N,e[29]=L,e[30]=F):F=e[30],F}function mn(){const t=j.c(2),e=It();let a;return t[0]!==e?(a={prefillCollectionCache:(r,o,i,n)=>{if(!r)return;const c=Ct(r,o,i,n);if(e.getQueryData(c))return;const u={structuredContent:{items:[]},isError:!1};e.setQueryData(c,u)}},t[0]=e,t[1]=a):a=t[1],a}const ne={THREAD_MESSAGES_PAGE_SIZE:100,THREADS_PAGE_SIZE:50,QUERY_STALE_TIME:3e4};function ca(t,e,a,s){const r=Le.threads(e),o=t.getQueryData(r);if(!o)return;const i=o.pages.map(c=>{const l=c.items.findIndex(v=>v.id===a);if(l===-1)return c;const u=[...c.items],p=u[l];if(!p)return c;const f={id:p.id,title:s.title??p.title,createdAt:p.createdAt,updatedAt:s.updatedAt??p.updatedAt,hidden:s.hidden??p.hidden};return u[l]=f,{...c,items:u}});i.some((c,l)=>c.items.length!==o.pages[l]?.items.length||c.items.some((u,p)=>u.id===a&&u!==o.pages[l]?.items[p]))&&t.setQueryData(r,{...o,pages:i})}function fn(t,e,a){const s=Le.threads(e),r=t.getQueryData(s);if(!r){t.setQueryData(s,{pages:[{items:[a],hasMore:!1,totalCount:1}],pageParams:[0]});return}if(r.pages.some(n=>n.items.some(c=>c.id===a.id)))return;const i=r.pages[0];if(i){const n={...i,items:[a,...i.items],totalCount:(i.totalCount??i.items.length)+1};t.setQueryData(s,{...r,pages:[n,...r.pages.slice(1)]})}else t.setQueryData(s,{...r,pages:[{items:[a],hasMore:!1,totalCount:1}]})}async function hn(t,e,a,s){if(!e)return;const r=Ct(e,"THREAD_MESSAGES",a,{filters:[{column:"threadId",value:s}],pageSize:ne.THREAD_MESSAGES_PAGE_SIZE});if(!r||t.getQueryData(r))return;const i="COLLECTION_THREAD_MESSAGES_LIST",n=Gs(void 0,[{column:"threadId",value:s}],[]),c=Ys(void 0,void 0,"updated_at"),l={...n&&{where:n},...c&&{orderBy:c},limit:ne.THREAD_MESSAGES_PAGE_SIZE,offset:0};await t.fetchQuery({queryKey:r,queryFn:async()=>await e.callTool({name:i,arguments:l}),staleTime:ne.QUERY_STALE_TIME,retry:!1})}function gn(t,e,a,s,r){if(!e)return;const o=Ct(e,"THREAD_MESSAGES",a,{filters:[{column:"threadId",value:s}],pageSize:ne.THREAD_MESSAGES_PAGE_SIZE});o&&t.setQueryData(o,{structuredContent:{items:r},isError:!1})}async function vn(t,e,a){if(!t)throw new Error("MCP client is not available");const s=await t.callTool({name:"COLLECTION_THREADS_UPDATE",arguments:{id:e,data:a}});return(s.structuredContent??s).item}function yn(t){const e=new Date().toISOString();return{id:t,title:"New chat",createdAt:e,updatedAt:e}}function xn(t,e){return t.find(a=>a.id!==e)??null}function bn(){const t=j.c(17),{locator:e,org:a}=Ce();let s;t[0]!==a.id?(s={connectionId:Nt,orgId:a.id},t[0]=a.id,t[1]=s):s=t[1];const r=wt(s);let o;t[2]!==e?(o=Le.threads(e),t[2]=e,t[3]=o):o=t[3];let i;t[4]!==r?(i=async g=>{const{pageParam:h}=g,x=h===void 0?0:h;if(!r)throw new Error("MCP client is not available");const m={limit:ne.THREADS_PAGE_SIZE,offset:x},E=await r.callTool({name:"COLLECTION_THREADS_LIST",arguments:m}),C=E.structuredContent??E;return{items:C.items??[],hasMore:C.hasMore??!1,totalCount:C.totalCount}},t[4]=r,t[5]=i):i=t[5];let n;t[6]!==o||t[7]!==i?(n={queryKey:o,queryFn:i,getNextPageParam:En,initialPageParam:0,staleTime:ne.QUERY_STALE_TIME},t[6]=o,t[7]=i,t[8]=n):n=t[8];const{data:c,fetchNextPage:l,hasNextPage:u,isFetchingNextPage:p,refetch:f}=Xs(n);let v;t[9]!==c?.pages?(v=c?.pages.flatMap(_n)??[],t[9]=c?.pages,t[10]=v):v=t[10];const y=v;let _;return t[11]!==l||t[12]!==u||t[13]!==p||t[14]!==f||t[15]!==y?(_={threads:y,refetch:f,hasNextPage:u,isFetchingNextPage:p,fetchNextPage:l},t[11]=l,t[12]=u,t[13]=p,t[14]=f,t[15]=y,t[16]=_):_=t[16],_}function _n(t){return t.items}function En(t,e){if(t.hasMore)return e.length*ne.THREADS_PAGE_SIZE}function In(t){const e=j.c(6),{org:a}=Ce();let s;e[0]!==a.id?(s={connectionId:Nt,orgId:a.id},e[0]=a.id,e[1]=s):s=e[1];const r=wt(s);let o;e[2]!==t?(o={filters:t?[{column:"threadId",value:t}]:[],pageSize:ne.THREAD_MESSAGES_PAGE_SIZE},e[2]=t,e[3]=o):o=e[3];const i=Qs(a.id,"THREAD_MESSAGES",r,o);let n;return e[4]!==i?(n=i??[],e[4]=i,e[5]=n):n=e[5],n}function Sn(){const{locator:t,org:e}=Ce(),a=It(),{prefillCollectionCache:s}=mn(),{threads:r,hasNextPage:o,isFetchingNextPage:i,fetchNextPage:n}=bn(),c=wt({connectionId:Nt,orgId:e.id}),[l,u]=ke(et.assistantChatActiveThread(t),r[0]?.id??crypto.randomUUID()),p=In(l),f=()=>{const h=crypto.randomUUID(),x=yn(h);fn(a,t,x),c&&s(c,"THREAD_MESSAGES",e.id,{filters:[{column:"threadId",value:h}],pageSize:ne.THREAD_MESSAGES_PAGE_SIZE}),u(h)},v=async h=>{await hn(a,c,e.id,h),u(h)};return{threads:r,activeThreadId:l,messages:p,hasNextPage:o,isFetchingNextPage:i,fetchNextPage:n,createThread:f,switchThread:v,updateThread:(h,x)=>{ca(a,t,h,x)},hideThread:async h=>{try{const x=await vn(c,h,{hidden:!0});if(x){if(h===l){const E=xn(r,h);E?await v(E.id):f()}ca(a,t,h,{hidden:!0,updatedAt:x.updatedAt??new Date().toISOString()})}}catch(x){const m=x;St.error(`Failed to update thread: ${m.message}`),console.error("[chat] Failed to update thread:",x)}},updateMessagesCache:(h,x)=>{gn(a,c,e.id,h,x)}}}const wn=t=>new Ya({api:`/api/${t}/decopilot/stream`,credentials:"include",prepareSendMessagesRequest:({messages:e,requestMetadata:a={}})=>{const{system:s,tiptapDoc:r,...o}=a,i=s?{id:crypto.randomUUID(),role:"system",parts:[{type:"text",text:s}]}:null,n=e.slice(-1).filter(Boolean),c=i?[i,...n]:n,l=e.at(-1)?.metadata??{},u={...o,agent:o.agent??l.agent,models:o.models??l.models,thread_id:o.thread_id??l.thread_id};return{body:{messages:c,...u}}}}),da=(t,e)=>t?.find(a=>a.id===e)??t?.[0]??null,Nn=(t,e)=>{const a=j.c(5);let s;a[0]!==t?(s=et.chatSelectedModel(t),a[0]=t,a[1]=s):s=a[1];const[r,o]=ke(s,null),{isModelAllowed:i,allowAll:n}=jt(),c=da(e,r?.connectionId),l=Rt(c?.id),u=n||!c?.id?l:l.filter(_=>i(c.id,_.id)),p=u.filter(kn).reduce(Pn,void 0),f=da(u,r?.id),v=f&&c?.id?{connectionId:c.id,thinking:{id:f.id,provider:f.provider??void 0,limits:f.limits??void 0,capabilities:f.capabilities?{vision:f.capabilities.includes("vision")?!0:void 0,text:f.capabilities.includes("text")?!0:void 0,tools:f.capabilities.includes("tools")?!0:void 0}:void 0},fast:p?{id:p.id,provider:p.provider??void 0,limits:p.limits??void 0,capabilities:p.capabilities?{vision:p.capabilities.includes("vision")?!0:void 0,text:p.capabilities.includes("text")?!0:void 0,tools:p.capabilities.includes("tools")?!0:void 0}:void 0}:void 0}:null;let y;return a[2]!==v||a[3]!==o?(y=[v,o],a[2]=v,a[3]=o,a[4]=y):y=a[4],y},Ka={tiptapDoc:void 0,parentThread:null,finishReason:null};function Tn(t,e){switch(e.type){case"SET_TIPTAP_DOC":return{...t,tiptapDoc:e.payload};case"CLEAR_TIPTAP_DOC":return{...t,tiptapDoc:void 0};case"START_BRANCH":return{...t,parentThread:e.payload};case"CLEAR_BRANCH":return{...t,parentThread:null};case"SET_FINISH_REASON":return{...t,finishReason:e.payload};case"CLEAR_FINISH_REASON":return{...t,finishReason:null};case"RESET":return Ka;default:return t}}function Cn(t,e){const a=[];for(const s of t)"text"in s&&s.text?a.push({type:"text",text:`[${e}]
19
+ `)}function Vo(){const t=j.c(5),e=It(),{org:a}=Ce();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const r=pa(s);let o;return t[1]!==a||t[2]!==r||t[3]!==e?(o=i=>{const c=i.toolCall.toolName.match(/^COLLECTION_([A-Z_]+)_(CREATE|UPDATE|DELETE)$/);if(!c||!c[1])return;const l=c[1],u=r.connectionId;if(!u)return;e.invalidateQueries({queryKey:Le.collection(a.slug,u,l)});const p=l.toLowerCase().replace(/_/g," ");St.success(`${p} updated`)},t[1]=a,t[2]=r,t[3]=e,t[4]=o):o=t[4],o}function Z(t){const e=j.c(8);let a,s;e[0]!==t?({className:a,...s}=t,e[0]=t,e[1]=a,e[2]=s):(a=e[1],s=e[2]);let r;e[3]!==a?(r=ve("bg-accent animate-pulse rounded-md",a),e[3]=a,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=d.jsx("div",{"data-slot":"skeleton",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}const qo=["x-ai/grok-code-fast-1","anthropic/claude-sonnet-4.5","google/gemini-2.5-flash","xiaomi/mimo-v2-flash:free","google/gemini-3-flash-preview","deepseek/deepseek-v3.2","anthropic/claude-opus-4.5","x-ai/grok-4.1-fast","google/gemini-2.5-flash-lite","google/gemini-2.0-flash-001"],Et=new Map;qo.forEach((t,e)=>{Et.set(t,e)});function Rt(t){const e=j.c(3);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={pageSize:999},e[0]=a):a=e[0];const s=ks(t??void 0,a);let r;return e[1]!==s?(r=s.filter(Ho).sort(Wo),e[1]=s,e[2]=r):r=e[2],r}function Wo(t,e){const a=Et.get(t.id),s=Et.get(e.id);return a!==void 0&&s!==void 0?a-s:a!==void 0?-1:s!==void 0?1:t.title.localeCompare(e.title)}function Ho(t){return t.limits?.contextWindow&&t.limits?.maxOutputTokens}const Jo={reasoning:{icon:d.jsx(Sa,{className:"size-4"}),label:"Reasoning"},"image-upload":{icon:d.jsx(Hs,{className:"size-4"}),label:"Can analyze images"},"file-upload":{icon:d.jsx(qs,{className:"size-4"}),label:"Can analyze files"},"web-search":{icon:d.jsx(ba,{className:"size-4"}),label:"Can search the web to answer questions"}};function Xa(t){const e=j.c(10),{capability:a}=t,s=Jo[a];let r,o;e[0]!==a||e[1]!==s?(r=s||{icon:null,label:a},o=r.label.split("-").map(Go).join(" "),e[0]=a,e[1]=s,e[2]=r,e[3]=o):(r=e[2],o=e[3]);const i=o;let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:"color-mix(in oklch, var(--chart-1) 15%, transparent)",color:"var(--chart-1)"},e[4]=n):n=e[4];let c;e[5]!==i?(c=d.jsx("span",{children:i}),e[5]=i,e[6]=c):c=e[6];let l;return e[7]!==r.icon||e[8]!==c?(l=d.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 px-1.5 rounded-md text-xs font-medium",style:n,children:[r.icon,c]}),e[7]=r.icon,e[8]=c,e[9]=l):l=e[9],l}function Go(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Yo(t){const e=j.c(53),{model:a,compact:s}=t,r=s===void 0?!1:s;if(!a){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=d.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Hover to preview"}),e[0]=g):g=e[0],g}const o=a.limits?.contextWindow||a.costs?.input||a.costs?.output||a.limits?.maxOutputTokens;if(!o&&!r){let g;e[1]!==a.logo||e[2]!==a.title?(g=a.logo&&d.jsx("img",{src:a.logo,className:"w-6 h-6",alt:a.title}),e[1]=a.logo,e[2]=a.title,e[3]=g):g=e[3];let h;e[4]!==a.title?(h=d.jsx("p",{className:"text-lg font-medium leading-7",children:a.title}),e[4]=a.title,e[5]=h):h=e[5];let x;e[6]!==g||e[7]!==h?(x=d.jsxs("div",{className:"flex items-center gap-3 py-2 px-0",children:[g,h]}),e[6]=g,e[7]=h,e[8]=x):x=e[8];let m;e[9]!==a.description?(m=a.description&&d.jsx("p",{className:"text-sm text-muted-foreground",children:a.description}),e[9]=a.description,e[10]=m):m=e[10];let E;return e[11]!==x||e[12]!==m?(E=d.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[x,m]}),e[11]=x,e[12]=m,e[13]=E):E=e[13],E}if(!o&&r)return null;if(r){let g;e[14]!==a.limits?(g=a.limits?.contextWindow&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Context"}),d.jsxs("span",{className:"text-foreground font-medium",children:[a.limits.contextWindow.toLocaleString()," tokens"]})]}),e[14]=a.limits,e[15]=g):g=e[15];let h;e[16]!==a.costs?(h=a.costs?.input&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Input cost"}),d.jsxs("span",{className:"text-foreground font-medium",children:["$",(a.costs.input*1e6).toFixed(2)," / 1M"]})]}),e[16]=a.costs,e[17]=h):h=e[17];let x;e[18]!==a.costs?(x=a.costs?.output&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Output cost"}),d.jsxs("span",{className:"text-foreground font-medium",children:["$",(a.costs.output*1e6).toFixed(2)," / 1M"]})]}),e[18]=a.costs,e[19]=x):x=e[19];let m;e[20]!==a.limits?(m=a.limits?.maxOutputTokens&&d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:"Output limit"}),d.jsxs("span",{className:"text-foreground font-medium",children:[a.limits.maxOutputTokens.toLocaleString()," tokens"]})]}),e[20]=a.limits,e[21]=m):m=e[21];let E;return e[22]!==g||e[23]!==h||e[24]!==x||e[25]!==m?(E=d.jsxs("div",{className:"flex flex-col gap-2.5 pt-3 pb-3 px-3 rounded-b-lg text-xs",children:[g,h,x,m]}),e[22]=g,e[23]=h,e[24]=x,e[25]=m,e[26]=E):E=e[26],E}let i;e[27]!==a.logo||e[28]!==a.title?(i=a.logo&&d.jsx("img",{src:a.logo,className:"w-6 h-6 shrink-0",alt:a.title}),e[27]=a.logo,e[28]=a.title,e[29]=i):i=e[29];let n;e[30]!==a.title?(n=d.jsx("p",{className:"text-lg font-medium leading-7 wrap-break-word min-w-0",children:a.title}),e[30]=a.title,e[31]=n):n=e[31];let c;e[32]!==i||e[33]!==n?(c=d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[i,n]}),e[32]=i,e[33]=n,e[34]=c):c=e[34];let l;e[35]!==a.capabilities?(l=a.capabilities&&a.capabilities.length>0&&d.jsx("div",{className:"flex items-center gap-2",children:a.capabilities.map(Qo)}),e[35]=a.capabilities,e[36]=l):l=e[36];let u;e[37]!==c||e[38]!==l?(u=d.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[c,l]}),e[37]=c,e[38]=l,e[39]=u):u=e[39];let p;e[40]!==a.limits?(p=a.limits?.contextWindow&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Ws,{className:"w-3.5 h-3.5 text-muted-foreground"}),d.jsx("p",{className:"text-sm text-foreground",children:"Context window"})]}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.limits.contextWindow.toLocaleString()," tokens"]})]}),e[40]=a.limits,e[41]=p):p=e[41];let f;e[42]!==a.costs?(f=(a.costs?.input||a.costs?.output)&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Ea,{className:"w-3.5 h-3.5 text-muted-foreground"}),d.jsx("p",{className:"text-sm text-foreground",children:"Costs"})]}),d.jsxs("div",{className:"flex flex-col gap-0.5",children:[a.costs?.input!==null&&a.costs?.input!==void 0&&d.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",(a.costs.input*1e6).toFixed(2)," / 1M tokens (input)"]}),a.costs?.output!==null&&a.costs?.output!==void 0&&d.jsxs("p",{className:"text-sm text-muted-foreground",children:["$",(a.costs.output*1e6).toFixed(2)," / 1M tokens (output)"]})]})]}),e[42]=a.costs,e[43]=f):f=e[43];let v;e[44]!==a.limits?(v=a.limits?.maxOutputTokens&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Ia,{className:"w-4.5 h-4.5 text-muted-foreground/70"}),d.jsx("p",{className:"text-sm text-foreground",children:"Output limit"})]}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.limits.maxOutputTokens.toLocaleString()," token limit"]})]}),e[44]=a.limits,e[45]=v):v=e[45];let y;e[46]!==p||e[47]!==f||e[48]!==v?(y=d.jsxs("div",{className:"flex flex-col gap-4",children:[p,f,v]}),e[46]=p,e[47]=f,e[48]=v,e[49]=y):y=e[49];let _;return e[50]!==y||e[51]!==u?(_=d.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[u,y]}),e[50]=y,e[51]=u,e[52]=_):_=e[52],_}function Qo(t){return d.jsx(Xa,{capability:t},t)}function Xo(t){const e=j.c(15),{model:a,onHover:s}=t;let r;e[0]!==a||e[1]!==s?(r=()=>s(a),e[0]=a,e[1]=s,e[2]=r):r=e[2];let o;e[3]!==a.logo||e[4]!==a.title?(o=a.logo&&d.jsx("img",{src:a.logo,className:"w-5 h-5 shrink-0",alt:a.title}),e[3]=a.logo,e[4]=a.title,e[5]=o):o=e[5];let i;e[6]!==a.title?(i=d.jsx("span",{className:"text-sm text-foreground flex-1 min-w-0 line-clamp-1",children:a.title}),e[6]=a.title,e[7]=i):i=e[7];let n;e[8]!==a.capabilities?(n=a.capabilities&&a.capabilities.length>0&&d.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:a.capabilities.slice(0,2).map(Ko)}),e[8]=a.capabilities,e[9]=n):n=e[9];let c;return e[10]!==r||e[11]!==o||e[12]!==i||e[13]!==n?(c=d.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:r,children:[o,i,n]}),e[10]=r,e[11]=o,e[12]=i,e[13]=n,e[14]=c):c=e[14],c}function Ko(t){return d.jsx(Xa,{capability:t},t)}function en(t){const e=j.c(10),{error:a,onRetry:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=d.jsx("div",{className:"bg-destructive/10 p-2 rounded-full",children:d.jsx(Vs,{className:"size-5 text-destructive"})}),e[0]=r):r=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=d.jsx("p",{className:"text-sm font-medium text-foreground",children:"Failed to load models"}),e[1]=o):o=e[1];const i=a?.message||"Could not fetch models from this provider.";let n;e[2]!==i?(n=d.jsxs("div",{className:"flex flex-col gap-1",children:[o,d.jsxs("p",{className:"text-xs text-muted-foreground max-w-[260px]",children:[i," Try another provider or retry."]})]}),e[2]=i,e[3]=n):n=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Js,{className:"size-3.5"}),e[4]=c):c=e[4];let l;e[5]!==s?(l=d.jsxs(ya,{variant:"outline",size:"sm",onClick:s,className:"gap-1.5",children:[c,"Retry"]}),e[5]=s,e[6]=l):l=e[6];let u;return e[7]!==n||e[8]!==l?(u=d.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-4 py-8 text-center",children:[r,n,l]}),e[7]=n,e[8]=l,e[9]=u):u=e[9],u}function tn(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=d.jsx("div",{className:"flex-1 overflow-y-auto px-0.5 pt-2 space-y-1",children:Array.from({length:6}).map(an)}),t[0]=e):e=t[0],e}function an(t,e){return d.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[d.jsx(Z,{className:"size-5 shrink-0 rounded-sm"}),d.jsx(Z,{className:"flex-1 h-4"}),d.jsx(Z,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function sn(t){const e=j.c(20),{connectionId:a,allowAll:s,isModelAllowed:r,searchTerm:o,selectedModel:i,onModelSelect:n,onHover:c}=t,l=Rt(a??void 0);let u;e[0]!==l||e[1]!==s||e[2]!==a||e[3]!==r?(u=s?l:l.filter(g=>a&&r(a,g.id)),e[0]=l,e[1]=s,e[2]=a,e[3]=r,e[4]=u):u=e[4];const p=u;let f;e[5]!==p||e[6]!==o?(f=o.trim()?p.filter(g=>{const h=o.toLowerCase();return g.title.toLowerCase().includes(h)||g.provider?.toLowerCase().includes(h)||g.description?.toLowerCase().includes(h)}):p,e[5]=p,e[6]=o,e[7]=f):f=e[7];const v=f;if(v.length===0){let g;return e[8]===Symbol.for("react.memo_cache_sentinel")?(g=d.jsx("div",{className:"flex-1 flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No models found"}),e[8]=g):g=e[8],g}let y;if(e[9]!==v||e[10]!==c||e[11]!==n||e[12]!==i?.thinking){let g;e[14]!==c||e[15]!==n||e[16]!==i?.thinking?(g=h=>{const x=h.id===i?.thinking.id;return d.jsx("div",{onClick:()=>n(h),className:ve("rounded-lg mb-1",x&&"bg-accent"),children:d.jsx(Xo,{model:h,onHover:c})},h.id)},e[14]=c,e[15]=n,e[16]=i?.thinking,e[17]=g):g=e[17],y=v.map(g),e[9]=v,e[10]=c,e[11]=n,e[12]=i?.thinking,e[13]=y}else y=e[13];let _;return e[18]!==y?(_=d.jsx("div",{className:"flex-1 overflow-y-auto px-0.5 pt-2",children:y}),e[18]=y,e[19]=_):_=e[19],_}function kt(t){const e=j.c(14),{model:a,placeholder:s}=t,r=s===void 0?"Select model":s;if(!a){let l;e[0]!==r?(l=d.jsx("span",{className:"text-sm text-muted-foreground",children:r}),e[0]=r,e[1]=l):l=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=d.jsx(ht,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[2]=u):u=e[2];let p;return e[3]!==l?(p=d.jsxs("div",{className:"flex items-center gap-1.5",children:[l,u]}),e[3]=l,e[4]=p):p=e[4],p}let o;e[5]!==a.logo||e[6]!==a.title?(o=a.logo&&d.jsx("img",{src:a.logo,className:"w-5 h-5 shrink-0 rounded-sm",alt:a.title}),e[5]=a.logo,e[6]=a.title,e[7]=o):o=e[7];let i;e[8]!==a.title?(i=d.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground group-data-[state=open]:text-foreground truncate whitespace-nowrap max-w-0 opacity-0 group-hover:max-w-[150px] group-hover:opacity-100 group-data-[state=open]:max-w-[150px] group-data-[state=open]:opacity-100 transition-all duration-200 ease-in-out overflow-hidden",children:a.title}),e[8]=a.title,e[9]=i):i=e[9];let n;e[10]===Symbol.for("react.memo_cache_sentinel")?(n=d.jsx(ht,{size:14,className:"text-muted-foreground opacity-0 max-w-0 group-hover:opacity-50 group-hover:max-w-[14px] group-data-[state=open]:opacity-50 group-data-[state=open]:max-w-[14px] shrink-0 transition-all duration-200 ease-in-out overflow-hidden"}),e[10]=n):n=e[10];let c;return e[11]!==o||e[12]!==i?(c=d.jsxs("div",{className:"flex items-center gap-0 group-hover:gap-2 group-data-[state=open]:gap-2 min-w-0 overflow-hidden transition-all duration-200",children:[o,i,n]}),e[11]=o,e[12]=i,e[13]=c):c=e[13],c}function ui(t){return t?.thinking?.capabilities?.vision===!0}function rn(){const t=j.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=d.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:d.jsxs("div",{className:"flex items-center gap-2.5 h-12 px-4",children:[d.jsx(Z,{className:"size-4 shrink-0"}),d.jsx(Z,{className:"flex-1 h-6"}),d.jsx(Z,{className:"w-[140px] h-8 shrink-0"})]})}),t[0]=e):e=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsxs("div",{className:"flex-1 flex flex-col md:border-r md:w-[400px] md:min-w-[400px]",children:[e,d.jsx("div",{className:"flex-1 overflow-y-auto px-0.5 pt-2 space-y-1",children:Array.from({length:6}).map(on)})]}),t[1]=a):a=t[1];let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx(Z,{className:"size-6 shrink-0"}),d.jsx(Z,{className:"h-6 w-32"})]}),t[2]=s):s=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=d.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[s,d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Z,{className:"h-6 w-20 rounded-md"}),d.jsx(Z,{className:"h-6 w-24 rounded-md"})]})]}),t[3]=r):r=t[3];let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsx(Z,{className:"h-4 w-24"}),d.jsx(Z,{className:"h-4 w-32"})]}),t[4]=o):o=t[4];let i;return t[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsxs("div",{className:"flex flex-col md:flex-row h-[350px]",children:[a,d.jsx("div",{className:"hidden md:block md:w-[320px] md:shrink-0 p-3",children:d.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[r,d.jsxs("div",{className:"flex flex-col gap-4",children:[o,d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsx(Z,{className:"h-4 w-16"}),d.jsx(Z,{className:"h-4 w-40"})]})]})]})})]}),t[5]=i):i=t[5],i}function on(t,e){return d.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[d.jsx(Z,{className:"size-5 shrink-0 rounded-sm"}),d.jsx(Z,{className:"flex-1 h-4"}),d.jsx(Z,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function nn(t){const e=j.c(40),{selectedModel:a,onModelChange:s,onClose:r,modelsConnections:o}=t,[i,n]=S.useState(null),[c,l]=S.useState(""),u=S.useRef(null),[p,f]=S.useState(a?.connectionId??null),v=Tt(),y=o??v,{isModelAllowed:_,allowAll:g,hasConnectionModels:h}=jt();let x;e[0]!==y||e[1]!==g||e[2]!==h?(x=g?y:y.filter(q=>h(q.id)),e[0]=y,e[1]=g,e[2]=h,e[3]=x):x=e[3];const m=x;let E,C;e[4]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{setTimeout(()=>{u.current?.focus()},0)},C=[],e[4]=E,e[5]=C):(E=e[4],C=e[5]),S.useEffect(E,C);let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=q=>{f(q),n(null)},e[6]=N):N=e[6];const T=N;let P;e[7]!==r||e[8]!==s||e[9]!==p?(P=q=>{p&&(s({id:q.id,connectionId:p,provider:q.provider??void 0}),l(""),r())},e[7]=r,e[8]=s,e[9]=p,e[10]=P):P=e[10];const L=P;let F;e[11]===Symbol.for("react.memo_cache_sentinel")?(F=d.jsx(ba,{size:16,className:"text-muted-foreground shrink-0"}),e[11]=F):F=e[11];let re;e[12]===Symbol.for("react.memo_cache_sentinel")?(re=q=>l(q.target.value),e[12]=re):re=e[12];let X;e[13]!==c?(X=d.jsx(Os,{ref:u,type:"text",placeholder:"Search for a model...",value:c,onChange:re,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[13]=c,e[14]=X):X=e[14];let J;e[15]!==m||e[16]!==p?(J=m.length>0&&d.jsxs(Zs,{value:p??"",onValueChange:T,children:[d.jsxs(Fs,{size:"sm",className:"w-auto min-w-[140px] h-8 shrink-0 [&>svg:last-child]:hidden",onClick:dn,children:[d.jsx(zs,{placeholder:"Select connection"}),d.jsx(_a,{className:"size-4 opacity-50 shrink-0 pointer-events-none"})]}),d.jsx(Us,{children:m.map(cn)})]}),e[15]=m,e[16]=p,e[17]=J):J=e[17];let K;e[18]!==X||e[19]!==J?(K=d.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:d.jsxs("label",{className:"flex items-center gap-2.5 h-12 px-4 cursor-text",children:[F,X,J]})}),e[18]=X,e[19]=J,e[20]=K):K=e[20];let oe;e[21]===Symbol.for("react.memo_cache_sentinel")?(oe=d.jsx(tn,{}),e[21]=oe):oe=e[21];let ee;e[22]!==g||e[23]!==L||e[24]!==_||e[25]!==c||e[26]!==p||e[27]!==a?(ee=d.jsx(S.Suspense,{fallback:oe,children:d.jsx(sn,{connectionId:p,allowAll:g,isModelAllowed:_,searchTerm:c,selectedModel:a,onModelSelect:L,onHover:n})}),e[22]=g,e[23]=L,e[24]=_,e[25]=c,e[26]=p,e[27]=a,e[28]=ee):ee=e[28];let ie;e[29]!==p||e[30]!==ee?(ie=d.jsx(xa,{fallback:ln,children:ee},p),e[29]=p,e[30]=ee,e[31]=ie):ie=e[31];let G;e[32]!==K||e[33]!==ie?(G=d.jsxs("div",{className:"flex-1 flex flex-col md:border-r md:w-[400px] md:min-w-[400px]",children:[K,ie]}),e[32]=K,e[33]=ie,e[34]=G):G=e[34];let M;e[35]!==i?(M=d.jsx("div",{className:"hidden md:block md:w-[320px] md:shrink-0 p-3",children:d.jsx(Yo,{model:i})}),e[35]=i,e[36]=M):M=e[36];let le;return e[37]!==G||e[38]!==M?(le=d.jsxs("div",{className:"flex flex-col md:flex-row h-[350px]",children:[G,M]}),e[37]=G,e[38]=M,e[39]=le):le=e[39],le}function ln(t){const{error:e,resetError:a}=t;return d.jsx(en,{error:e,onRetry:a})}function cn(t){return d.jsx(Bs,{value:t.id,children:d.jsxs("div",{className:"flex items-center gap-2",children:[t.icon?d.jsx("img",{src:t.icon,alt:t.title,className:"w-4 h-4 rounded"}):d.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:t.title.slice(0,1).toUpperCase()}),d.jsx("span",{children:t.title})]})},t.id)}function dn(t){return t.stopPropagation()}function un(t){const e=j.c(6),{selectedModel:a,placeholder:s}=t,r=a?.connectionId??void 0,o=Rt(r);let i;e[0]!==o||e[1]!==a?(i=a?o.find(l=>l.id===a.thinking.id):void 0,e[0]=o,e[1]=a,e[2]=i):i=e[2];const n=i;let c;return e[3]!==n||e[4]!==s?(c=d.jsx(kt,{model:n,placeholder:s}),e[3]=n,e[4]=s,e[5]=c):c=e[5],c}function pn(t){const e=j.c(9),{selectedModel:a,placeholder:s}=t;if(!a){let u;return e[0]!==s?(u=d.jsx(kt,{model:void 0,placeholder:s}),e[0]=s,e[1]=u):u=e[1],u}const r=a.thinking.id;let o;e[2]!==r?(o=r.split("/").pop()??r,e[2]=r,e[3]=o):o=e[3];const i=o;let n;e[4]!==i?(n=d.jsx("span",{className:"text-sm text-muted-foreground group-hover:text-foreground group-data-[state=open]:text-foreground truncate whitespace-nowrap max-w-0 opacity-0 group-hover:max-w-[150px] group-hover:opacity-100 group-data-[state=open]:max-w-[150px] group-data-[state=open]:opacity-100 transition-all duration-200 ease-in-out overflow-hidden",children:i}),e[4]=i,e[5]=n):n=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(ht,{size:14,className:"text-muted-foreground opacity-0 max-w-0 group-hover:opacity-50 group-hover:max-w-[14px] group-data-[state=open]:opacity-50 group-data-[state=open]:max-w-[14px] shrink-0 transition-all duration-200 ease-in-out overflow-hidden"}),e[6]=c):c=e[6];let l;return e[7]!==n?(l=d.jsxs("div",{className:"flex items-center gap-0 group-hover:gap-2 group-data-[state=open]:gap-2 min-w-0 overflow-hidden transition-all duration-200",children:[n,c]}),e[7]=n,e[8]=l):l=e[8],l}function pi(t){const e=j.c(31),{selectedModel:a,onModelChange:s,modelsConnections:r,variant:o,className:i,placeholder:n}=t,c=o===void 0?"borderless":o,l=n===void 0?"Select model":n,[u,p]=S.useState(!1),f=Tt(),v=r??f;if(v.length===0)return null;const y=c==="borderless"?"ghost":"outline",_=c==="borderless"&&"md:border-none";let g;e[0]!==i||e[1]!==_?(g=ve("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",_,i),e[0]=i,e[1]=_,e[2]=g):g=e[2];let h;e[3]!==l||e[4]!==a?(h=d.jsx(pn,{selectedModel:a,placeholder:l}),e[3]=l,e[4]=a,e[5]=h):h=e[5];let x;e[6]!==l?(x=d.jsx(kt,{model:void 0,placeholder:l}),e[6]=l,e[7]=x):x=e[7];let m;e[8]!==l||e[9]!==a?(m=d.jsx(un,{selectedModel:a,placeholder:l}),e[8]=l,e[9]=a,e[10]=m):m=e[10];let E;e[11]!==x||e[12]!==m?(E=d.jsx(S.Suspense,{fallback:x,children:m}),e[11]=x,e[12]=m,e[13]=E):E=e[13];let C;e[14]!==h||e[15]!==E?(C=d.jsx(xa,{fallback:h,children:E}),e[14]=h,e[15]=E,e[16]=C):C=e[16];let N;e[17]!==C||e[18]!==y||e[19]!==g?(N=d.jsx(Ds,{asChild:!0,children:d.jsx(ya,{variant:y,size:"sm",className:g,children:C})}),e[17]=C,e[18]=y,e[19]=g,e[20]=N):N=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=d.jsx(rn,{}),e[21]=T):T=e[21];let P;e[22]===Symbol.for("react.memo_cache_sentinel")?(P=()=>p(!1),e[22]=P):P=e[22];let L;e[23]!==v||e[24]!==s||e[25]!==a?(L=d.jsx($s,{className:"w-full md:w-auto p-0",align:"start",side:"bottom",sideOffset:8,children:d.jsx(S.Suspense,{fallback:T,children:d.jsx(nn,{selectedModel:a,onModelChange:s,onClose:P,modelsConnections:v})})}),e[23]=v,e[24]=s,e[25]=a,e[26]=L):L=e[26];let F;return e[27]!==u||e[28]!==N||e[29]!==L?(F=d.jsxs(Ls,{open:u,onOpenChange:p,children:[N,L]}),e[27]=u,e[28]=N,e[29]=L,e[30]=F):F=e[30],F}function mn(){const t=j.c(2),e=It();let a;return t[0]!==e?(a={prefillCollectionCache:(r,o,i,n)=>{if(!r)return;const c=Ct(r,o,i,n);if(e.getQueryData(c))return;const u={structuredContent:{items:[]},isError:!1};e.setQueryData(c,u)}},t[0]=e,t[1]=a):a=t[1],a}const ne={THREAD_MESSAGES_PAGE_SIZE:100,THREADS_PAGE_SIZE:50,QUERY_STALE_TIME:3e4};function ca(t,e,a,s){const r=Le.threads(e),o=t.getQueryData(r);if(!o)return;const i=o.pages.map(c=>{const l=c.items.findIndex(v=>v.id===a);if(l===-1)return c;const u=[...c.items],p=u[l];if(!p)return c;const f={id:p.id,title:s.title??p.title,created_at:p.created_at,updated_at:s.updated_at??p.updated_at,hidden:s.hidden??p.hidden};return u[l]=f,{...c,items:u}});i.some((c,l)=>c.items.length!==o.pages[l]?.items.length||c.items.some((u,p)=>u.id===a&&u!==o.pages[l]?.items[p]))&&t.setQueryData(r,{...o,pages:i})}function fn(t,e,a){const s=Le.threads(e),r=t.getQueryData(s);if(!r){t.setQueryData(s,{pages:[{items:[a],hasMore:!1,totalCount:1}],pageParams:[0]});return}if(r.pages.some(n=>n.items.some(c=>c.id===a.id)))return;const i=r.pages[0];if(i){const n={...i,items:[a,...i.items],totalCount:(i.totalCount??i.items.length)+1};t.setQueryData(s,{...r,pages:[n,...r.pages.slice(1)]})}else t.setQueryData(s,{...r,pages:[{items:[a],hasMore:!1,totalCount:1}]})}async function hn(t,e,a,s){if(!e)return;const r=Ct(e,"THREAD_MESSAGES",a,{filters:[{column:"thread_id",value:s}],pageSize:ne.THREAD_MESSAGES_PAGE_SIZE});if(!r||t.getQueryData(r))return;const i="COLLECTION_THREAD_MESSAGES_LIST",n=Gs(void 0,[{column:"thread_id",value:s}],[]),c=Ys(void 0,void 0,"updated_at"),l={...n&&{where:n},...c&&{orderBy:c},limit:ne.THREAD_MESSAGES_PAGE_SIZE,offset:0};await t.fetchQuery({queryKey:r,queryFn:async()=>await e.callTool({name:i,arguments:l}),staleTime:ne.QUERY_STALE_TIME,retry:!1})}function gn(t,e,a,s,r){if(!e)return;const o=Ct(e,"THREAD_MESSAGES",a,{filters:[{column:"thread_id",value:s}],pageSize:ne.THREAD_MESSAGES_PAGE_SIZE});o&&t.setQueryData(o,{structuredContent:{items:r},isError:!1})}async function vn(t,e,a){if(!t)throw new Error("MCP client is not available");const s=await t.callTool({name:"COLLECTION_THREADS_UPDATE",arguments:{id:e,data:a}});return(s.structuredContent??s).item}function yn(t){const e=new Date().toISOString();return{id:t,title:"New chat",created_at:e,updated_at:e}}function xn(t,e){return t.find(a=>a.id!==e)??null}function bn(){const t=j.c(17),{locator:e,org:a}=Ce();let s;t[0]!==a.id?(s={connectionId:Nt,orgId:a.id},t[0]=a.id,t[1]=s):s=t[1];const r=wt(s);let o;t[2]!==e?(o=Le.threads(e),t[2]=e,t[3]=o):o=t[3];let i;t[4]!==r?(i=async g=>{const{pageParam:h}=g,x=h===void 0?0:h;if(!r)throw new Error("MCP client is not available");const m={limit:ne.THREADS_PAGE_SIZE,offset:x},E=await r.callTool({name:"COLLECTION_THREADS_LIST",arguments:m}),C=E.structuredContent??E;return{items:C.items??[],hasMore:C.hasMore??!1,totalCount:C.totalCount}},t[4]=r,t[5]=i):i=t[5];let n;t[6]!==o||t[7]!==i?(n={queryKey:o,queryFn:i,getNextPageParam:En,initialPageParam:0,staleTime:ne.QUERY_STALE_TIME},t[6]=o,t[7]=i,t[8]=n):n=t[8];const{data:c,fetchNextPage:l,hasNextPage:u,isFetchingNextPage:p,refetch:f}=Xs(n);let v;t[9]!==c?.pages?(v=c?.pages.flatMap(_n)??[],t[9]=c?.pages,t[10]=v):v=t[10];const y=v;let _;return t[11]!==l||t[12]!==u||t[13]!==p||t[14]!==f||t[15]!==y?(_={threads:y,refetch:f,hasNextPage:u,isFetchingNextPage:p,fetchNextPage:l},t[11]=l,t[12]=u,t[13]=p,t[14]=f,t[15]=y,t[16]=_):_=t[16],_}function _n(t){return t.items}function En(t,e){if(t.hasMore)return e.length*ne.THREADS_PAGE_SIZE}function In(t){const e=j.c(6),{org:a}=Ce();let s;e[0]!==a.id?(s={connectionId:Nt,orgId:a.id},e[0]=a.id,e[1]=s):s=e[1];const r=wt(s);let o;e[2]!==t?(o={filters:t?[{column:"thread_id",value:t}]:[],pageSize:ne.THREAD_MESSAGES_PAGE_SIZE},e[2]=t,e[3]=o):o=e[3];const i=Qs(a.id,"THREAD_MESSAGES",r,o);let n;return e[4]!==i?(n=i??[],e[4]=i,e[5]=n):n=e[5],n}function Sn(){const{locator:t,org:e}=Ce(),a=It(),{prefillCollectionCache:s}=mn(),{threads:r,hasNextPage:o,isFetchingNextPage:i,fetchNextPage:n}=bn(),c=wt({connectionId:Nt,orgId:e.id}),[l,u]=ke(et.assistantChatActiveThread(t),r[0]?.id??crypto.randomUUID()),p=In(l),f=()=>{const h=crypto.randomUUID(),x=yn(h);fn(a,t,x),c&&s(c,"THREAD_MESSAGES",e.id,{filters:[{column:"thread_id",value:h}],pageSize:ne.THREAD_MESSAGES_PAGE_SIZE}),u(h)},v=async h=>{await hn(a,c,e.id,h),u(h)};return{threads:r,activeThreadId:l,messages:p,hasNextPage:o,isFetchingNextPage:i,fetchNextPage:n,createThread:f,switchThread:v,updateThread:(h,x)=>{ca(a,t,h,x)},hideThread:async h=>{try{const x=await vn(c,h,{hidden:!0});if(x){if(h===l){const E=xn(r,h);E?await v(E.id):f()}ca(a,t,h,{hidden:!0,updated_at:x.updated_at??new Date().toISOString()})}}catch(x){const m=x;St.error(`Failed to update thread: ${m.message}`),console.error("[chat] Failed to update thread:",x)}},updateMessagesCache:(h,x)=>{gn(a,c,e.id,h,x)}}}const wn=t=>new Ya({api:`/api/${t}/decopilot/stream`,credentials:"include",prepareSendMessagesRequest:({messages:e,requestMetadata:a={}})=>{const{system:s,tiptapDoc:r,...o}=a,i=s?{id:crypto.randomUUID(),role:"system",parts:[{type:"text",text:s}]}:null,n=e.slice(-1).filter(Boolean),c=i?[i,...n]:n,l=e.at(-1)?.metadata??{},u={...o,agent:o.agent??l.agent,models:o.models??l.models,thread_id:o.thread_id??l.thread_id};return{body:{messages:c,...u}}}}),da=(t,e)=>t?.find(a=>a.id===e)??t?.[0]??null,Nn=(t,e)=>{const a=j.c(5);let s;a[0]!==t?(s=et.chatSelectedModel(t),a[0]=t,a[1]=s):s=a[1];const[r,o]=ke(s,null),{isModelAllowed:i,allowAll:n}=jt(),c=da(e,r?.connectionId),l=Rt(c?.id),u=n||!c?.id?l:l.filter(_=>i(c.id,_.id)),p=u.filter(kn).reduce(Pn,void 0),f=da(u,r?.id),v=f&&c?.id?{connectionId:c.id,thinking:{id:f.id,provider:f.provider??void 0,limits:f.limits??void 0,capabilities:f.capabilities?{vision:f.capabilities.includes("vision")?!0:void 0,text:f.capabilities.includes("text")?!0:void 0,tools:f.capabilities.includes("tools")?!0:void 0}:void 0},fast:p?{id:p.id,provider:p.provider??void 0,limits:p.limits??void 0,capabilities:p.capabilities?{vision:p.capabilities.includes("vision")?!0:void 0,text:p.capabilities.includes("text")?!0:void 0,tools:p.capabilities.includes("tools")?!0:void 0}:void 0}:void 0}:null;let y;return a[2]!==v||a[3]!==o?(y=[v,o],a[2]=v,a[3]=o,a[4]=y):y=a[4],y},Ka={tiptapDoc:void 0,parentThread:null,finishReason:null};function Tn(t,e){switch(e.type){case"SET_TIPTAP_DOC":return{...t,tiptapDoc:e.payload};case"CLEAR_TIPTAP_DOC":return{...t,tiptapDoc:void 0};case"START_BRANCH":return{...t,parentThread:e.payload};case"CLEAR_BRANCH":return{...t,parentThread:null};case"SET_FINISH_REASON":return{...t,finishReason:e.payload};case"CLEAR_FINISH_REASON":return{...t,finishReason:null};case"RESET":return Ka;default:return t}}function Cn(t,e){const a=[];for(const s of t)"text"in s&&s.text?a.push({type:"text",text:`[${e}]
20
20
  ${s.text}`}):"blob"in s&&s.blob&&s.mimeType&&a.push({type:"file",url:`data:${s.mimeType};base64,${s.blob}`,filename:String(s.uri),mediaType:String(s.mimeType)});return a}function An(t,e){const a=[];for(const s of t){if(s.role!=="user"||!s.content)continue;const r=Array.isArray(s.content)?s.content:[s.content];for(const o of r)switch(o.type){case"text":{const i=o.text?.trim();if(!i)continue;a.push({type:"text",text:`[${e}]
21
21
  ${i}`});break}case"image":case"audio":{if(!o.data||!o.mimeType)continue;a.push({type:"file",url:`data:${o.mimeType};base64,${o.data}`,mediaType:o.mimeType});break}case"resource":{const i=o.resource;if(!i||!i.mimeType)continue;i&&("text"in i&&i.text?a.push({type:"text",text:`[${e}]
22
22
  ${i.text}`}):"blob"in i&&i.blob&&i.mimeType&&a.push({type:"file",url:`data:${i.mimeType};base64,${i.blob}`,filename:String(i.uri),mediaType:String(i.mimeType)}));break}}}return a}function Mn(t,e){const{mimeType:a,data:s}=t;if(a.startsWith("text/"))try{const r=atob(s);return[{type:"text",text:`${e}
23
- ${r}`}]}catch(r){console.error("Failed to decode text file:",r)}return[{type:"file",url:`data:${a};base64,${s}`,filename:e,mediaType:a}]}function jn(t){if(!t)return[];const e=[];let a="";const s=r=>{if(r){if(r.type==="text"&&"text"in r&&typeof r.text=="string")a+=r.text;else if(r.type==="mention"&&r.attrs){const o=r.attrs.char??"/",i=`${o}${r.attrs.name}`;if(a+=i,o==="@"){const n=r.attrs.metadata||[];e.push(...Cn(n,i))}else{const n=r.attrs.metadata||r.attrs.prompts||[];e.push(...An(n,i))}}else if(r.type==="file"&&r.attrs){const o=r.attrs,i=`[file:://${encodeURIComponent(o.name)}]`;a+=i,e.push(...Mn(o,i))}if("content"in r&&Array.isArray(r.content))for(const o of r.content)s(o)}};return s(t),a.trim()&&e.unshift({type:"text",text:a.trim()}),e}const es=S.createContext(null);function fi(t){const e=j.c(84),{children:a}=t,{locator:s,org:r}=Ce(),o=Sn(),{data:i}=ws.useSession(),n=i?.user??null,[c,l]=S.useReducer(Tn,Ka),u=Rs(),[p,f]=ke(`${s}:selected-virtual-mcp-id`,null),v=Tt(),{hasConnectionModels:y}=jt();let _;if(e[0]!==v||e[1]!==y){let $;e[3]!==y?($=W=>y(W.id),e[3]=y,e[4]=$):$=e[4],_=v.filter($),e[0]=v,e[1]=y,e[2]=_}else _=e[2];const g=_,[h,x]=Nn(s,g);let m;e[5]!==s?(m=et.chatSelectedMode(s),e[5]=s,e[6]=m):m=e[6];const[E,C]=ke(m,"code_execution"),N=o.messages,T=Bo(p),P=Vo();let L;e[7]!==p||e[8]!==u?(L=p?u.find($=>$.id===p)??null:null,e[7]=p,e[8]=u,e[9]=L):L=e[9];const F=L;let re;e[10]!==r.id?(re=js(r.id),e[10]=r.id,e[11]=re):re=e[11];const X=re.id;let J;e[12]!==r.slug?(J=wn(r.slug),e[12]=r.slug,e[13]=J):J=e[13];const K=J;let oe;e[14]!==o?(oe=async $=>{const{finishReason:W,isAbort:Ie,isDisconnect:ct,isError:dt,message:fs,messages:hs}=$;if(l({type:"SET_FINISH_REASON",payload:W??null}),W!=="stop"||Ie||ct||dt)return;const{title:Ft,thread_id:ut,created_at:zt}=fs.metadata??{};!ut||!Ft||!zt||(o.updateMessagesCache(ut,hs),o.updateThread(ut,{title:Ft,updatedAt:new Date(zt).toISOString()}))},e[14]=o,e[15]=oe):oe=e[15];const ee=oe,ie=Rn;let G;e[16]!==N||e[17]!==ee||e[18]!==P||e[19]!==o.activeThreadId||e[20]!==K?(G={id:o.activeThreadId,messages:N,transport:K,sendAutomaticallyWhen:Do,onFinish:ee,onToolCall:P,onError:ie},e[16]=N,e[17]=ee,e[18]=P,e[19]=o.activeThreadId,e[20]=K,e[21]=G):G=e[21];const M=Uo(G),le=M.status==="submitted"||M.status==="streaming",q=M.messages.length===0;let ye,xe,be,te,_e,Ee;if(e[22]!==o){xe=()=>{te(),o.createThread()},Ee=o.switchThread,be=o.hideThread;let $;e[29]===Symbol.for("react.memo_cache_sentinel")?($=Ie=>l({type:"SET_TIPTAP_DOC",payload:Ie}),e[29]=$):$=e[29],_e=$;let W;e[30]===Symbol.for("react.memo_cache_sentinel")?(W=()=>l({type:"CLEAR_TIPTAP_DOC"}),e[30]=W):W=e[30],ye=W,te=()=>l({type:"RESET"}),e[22]=o,e[23]=ye,e[24]=xe,e[25]=be,e[26]=te,e[27]=_e,e[28]=Ee}else ye=e[23],xe=e[24],be=e[25],te=e[26],_e=e[27],Ee=e[28];let ze;e[31]!==f?(ze=$=>{f($)},e[31]=f,e[32]=ze):ze=e[32];const rt=ze;let Ue;e[33]!==x?(Ue=$=>{x({id:$.id,connectionId:$.connectionId})},e[33]=x,e[34]=Ue):Ue=e[34];const ot=Ue;let Be;e[35]!==M||e[36]!==T||e[37]!==X||e[38]!==te||e[39]!==E||e[40]!==h||e[41]!==F?.id||e[42]!==o.activeThreadId||e[43]!==n?.image||e[44]!==n?.name?(Be=async $=>{if(!h){St.error("No model configured");return}const W=jn($);if(W.length===0)return;te();const Ie={tiptapDoc:$,created_at:new Date().toISOString(),thread_id:o.activeThreadId,agent:{id:F?.id??X,mode:E},user:{avatar:n?.image??void 0,name:n?.name??"you"}},ct={...Ie,system:T,models:h},dt={id:crypto.randomUUID(),role:"user",parts:W,metadata:Ie};await M.sendMessage(dt,{metadata:ct})},e[35]=M,e[36]=T,e[37]=X,e[38]=te,e[39]=E,e[40]=h,e[41]=F?.id,e[42]=o.activeThreadId,e[43]=n?.image,e[44]=n?.name,e[45]=Be):Be=e[45];const nt=Be;let Ve;e[46]!==M?(Ve=()=>M.stop(),e[46]=M,e[47]=Ve):Ve=e[47];const it=Ve;let qe;e[48]===Symbol.for("react.memo_cache_sentinel")?(qe=()=>l({type:"CLEAR_FINISH_REASON"}),e[48]=qe):qe=e[48];const ms=qe;let We;e[49]!==M.addToolOutput||e[50]!==M.clearError||e[51]!==M.error||e[52]!==M.messages||e[53]!==M.setMessages||e[54]!==M.status||e[55]!==c.finishReason||e[56]!==c.tiptapDoc||e[57]!==ye||e[58]!==xe||e[59]!==be||e[60]!==q||e[61]!==le||e[62]!==g||e[63]!==te||e[64]!==E||e[65]!==h||e[66]!==F||e[67]!==nt||e[68]!==C||e[69]!==ot||e[70]!==_e||e[71]!==rt||e[72]!==it||e[73]!==Ee||e[74]!==o.activeThreadId||e[75]!==o.fetchNextPage||e[76]!==o.hasNextPage||e[77]!==o.isFetchingNextPage||e[78]!==o.threads||e[79]!==u?(We={tiptapDoc:c.tiptapDoc,setTiptapDoc:_e,clearTiptapDoc:ye,resetInteraction:te,activeThreadId:o.activeThreadId,threads:o.threads,createThread:xe,switchToThread:Ee,hideThread:be,hasNextPage:o.hasNextPage,isFetchingNextPage:o.isFetchingNextPage,fetchNextPage:o.fetchNextPage,virtualMcps:u,selectedVirtualMcp:F,setVirtualMcpId:rt,modelsConnections:g,selectedModel:h,setSelectedModel:ot,selectedMode:E,setSelectedMode:C,messages:M.messages,status:M.status,setMessages:M.setMessages,error:M.error,clearError:M.clearError,stop:it,addToolOutput:M.addToolOutput,sendMessage:nt,isStreaming:le,isChatEmpty:q,finishReason:c.finishReason,clearFinishReason:ms},e[49]=M.addToolOutput,e[50]=M.clearError,e[51]=M.error,e[52]=M.messages,e[53]=M.setMessages,e[54]=M.status,e[55]=c.finishReason,e[56]=c.tiptapDoc,e[57]=ye,e[58]=xe,e[59]=be,e[60]=q,e[61]=le,e[62]=g,e[63]=te,e[64]=E,e[65]=h,e[66]=F,e[67]=nt,e[68]=C,e[69]=ot,e[70]=_e,e[71]=rt,e[72]=it,e[73]=Ee,e[74]=o.activeThreadId,e[75]=o.fetchNextPage,e[76]=o.hasNextPage,e[77]=o.isFetchingNextPage,e[78]=o.threads,e[79]=u,e[80]=We):We=e[80];const lt=We;let He;return e[81]!==a||e[82]!==lt?(He=d.jsx(es.Provider,{value:lt,children:a}),e[81]=a,e[82]=lt,e[83]=He):He=e[83],He}function Rn(t){console.error("[chat] Error",t)}function hi(){const t=S.useContext(es);if(!t)throw new Error("useChat must be used within a ChatProvider");return t}function kn(t){return(t.costs?.input??0)+(t.costs?.output??0)>0}function Pn(t,e){const a=e.costs?.input??0,s=e.costs?.output??0,r=(t?.costs?.input??0)+(t?.costs?.output??0);return!t||r===0||a+s<r?e:t}var at="Tabs",[On]=ga(at,[va]),ts=va(),[Dn,Pt]=On(at),as=S.forwardRef((t,e)=>{const{__scopeTabs:a,value:s,onValueChange:r,defaultValue:o,orientation:i="horizontal",dir:n,activationMode:c="automatic",...l}=t,u=Ns(n),[p,f]=ma({prop:s,onChange:r,defaultProp:o??"",caller:at});return d.jsx(Dn,{scope:a,baseId:fa(),value:p,onValueChange:f,orientation:i,dir:u,activationMode:c,children:d.jsx(ge.div,{dir:u,"data-orientation":i,...l,ref:e})})});as.displayName=at;var ss="TabsList",rs=S.forwardRef((t,e)=>{const{__scopeTabs:a,loop:s=!0,...r}=t,o=Pt(ss,a),i=ts(a);return d.jsx(Cs,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:s,children:d.jsx(ge.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:e})})});rs.displayName=ss;var os="TabsTrigger",ns=S.forwardRef((t,e)=>{const{__scopeTabs:a,value:s,disabled:r=!1,...o}=t,i=Pt(os,a),n=ts(a),c=cs(i.baseId,s),l=ds(i.baseId,s),u=s===i.value;return d.jsx(Ts,{asChild:!0,...n,focusable:!r,active:u,children:d.jsx(ge.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:c,...o,ref:e,onMouseDown:Je(t.onMouseDown,p=>{!r&&p.button===0&&p.ctrlKey===!1?i.onValueChange(s):p.preventDefault()}),onKeyDown:Je(t.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(s)}),onFocus:Je(t.onFocus,()=>{const p=i.activationMode!=="manual";!u&&!r&&p&&i.onValueChange(s)})})})});ns.displayName=os;var is="TabsContent",ls=S.forwardRef((t,e)=>{const{__scopeTabs:a,value:s,forceMount:r,children:o,...i}=t,n=Pt(is,a),c=cs(n.baseId,s),l=ds(n.baseId,s),u=s===n.value,p=S.useRef(u);return S.useEffect(()=>{const f=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(f)},[]),d.jsx(ha,{present:r||u,children:({present:f})=>d.jsx(ge.div,{"data-state":u?"active":"inactive","data-orientation":n.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:l,tabIndex:0,...i,ref:e,style:{...t.style,animationDuration:p.current?"0s":void 0},children:f&&o})})});ls.displayName=is;function cs(t,e){return`${t}-trigger-${e}`}function ds(t,e){return`${t}-content-${e}`}var $n=as,Ln=rs,Zn=ns,Fn=ls;function gi(t){const e=j.c(10);let a,s,r;e[0]!==t?({className:a,variant:r,...s}=t,e[0]=t,e[1]=a,e[2]=s,e[3]=r):(a=e[1],s=e[2],r=e[3]);const o=r===void 0?"pill":r;let i;e[4]!==a?(i=ve("flex flex-col gap-2",a),e[4]=a,e[5]=i):i=e[5];let n;return e[6]!==s||e[7]!==i||e[8]!==o?(n=d.jsx($n,{"data-slot":"tabs","data-variant":o,className:i,...s}),e[6]=s,e[7]=i,e[8]=o,e[9]=n):n=e[9],n}function vi(t){const e=j.c(11);let a,s,r;e[0]!==t?({className:a,variant:r,...s}=t,e[0]=t,e[1]=a,e[2]=s,e[3]=r):(a=e[1],s=e[2],r=e[3]);const o=r||"pill",i=o==="underline"?"flex h-[52px] items-center border-b border-border":o==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let n;e[4]!==a||e[5]!==i?(n=ve(i,a),e[4]=a,e[5]=i,e[6]=n):n=e[6];let c;return e[7]!==o||e[8]!==s||e[9]!==n?(c=d.jsx(Ln,{"data-slot":"tabs-list","data-variant":o,className:n,...s}),e[7]=o,e[8]=s,e[9]=n,e[10]=c):c=e[10],c}function yi(t){const e=j.c(11);let a,s,r;e[0]!==t?({className:a,variant:r,...s}=t,e[0]=t,e[1]=a,e[2]=s,e[3]=r):(a=e[1],s=e[2],r=e[3]);const o=r||"pill",i=o==="underline"?"cursor-pointer flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-foreground disabled:pointer-events-none disabled:opacity-50":o==="canvas"?"cursor-pointer flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let n;e[4]!==a||e[5]!==i?(n=ve(i,a),e[4]=a,e[5]=i,e[6]=n):n=e[6];let c;return e[7]!==o||e[8]!==s||e[9]!==n?(c=d.jsx(Zn,{"data-slot":"tabs-trigger","data-variant":o,className:n,...s}),e[7]=o,e[8]=s,e[9]=n,e[10]=c):c=e[10],c}function xi(t){const e=j.c(8);let a,s;e[0]!==t?({className:a,...s}=t,e[0]=t,e[1]=a,e[2]=s):(a=e[1],s=e[2]);let r;e[3]!==a?(r=ve("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=d.jsx(Fn,{"data-slot":"tabs-content",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}var st="Collapsible",[zn,bi]=ga(st),[Un,Ot]=zn(st),us=S.forwardRef((t,e)=>{const{__scopeCollapsible:a,open:s,defaultOpen:r,disabled:o,onOpenChange:i,...n}=t,[c,l]=ma({prop:s,defaultProp:r??!1,onChange:i,caller:st});return d.jsx(Un,{scope:a,disabled:o,contentId:fa(),open:c,onOpenToggle:S.useCallback(()=>l(u=>!u),[l]),children:d.jsx(ge.div,{"data-state":Zt(c),"data-disabled":o?"":void 0,...n,ref:e})})});us.displayName=st;var ps="CollapsibleTrigger",Dt=S.forwardRef((t,e)=>{const{__scopeCollapsible:a,...s}=t,r=Ot(ps,a);return d.jsx(ge.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":Zt(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...s,ref:e,onClick:Je(t.onClick,r.onOpenToggle)})});Dt.displayName=ps;var $t="CollapsibleContent",Lt=S.forwardRef((t,e)=>{const{forceMount:a,...s}=t,r=Ot($t,t.__scopeCollapsible);return d.jsx(ha,{present:a||r.open,children:({present:o})=>d.jsx(Bn,{...s,ref:e,present:o})})});Lt.displayName=$t;var Bn=S.forwardRef((t,e)=>{const{__scopeCollapsible:a,present:s,children:r,...o}=t,i=Ot($t,a),[n,c]=S.useState(s),l=S.useRef(null),u=As(e,l),p=S.useRef(0),f=p.current,v=S.useRef(0),y=v.current,_=i.open||n,g=S.useRef(_),h=S.useRef(void 0);return S.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),Ms(()=>{const x=l.current;if(x){h.current=h.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const m=x.getBoundingClientRect();p.current=m.height,v.current=m.width,g.current||(x.style.transitionDuration=h.current.transitionDuration,x.style.animationName=h.current.animationName),c(s)}},[i.open,s]),d.jsx(ge.div,{"data-state":Zt(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!_,...o,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:_&&r})});function Zt(t){return t?"open":"closed"}var Vn=us,_i=Dt,Ei=Lt;function Ii(t){const e=j.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let s;return e[2]!==a?(s=d.jsx(Vn,{"data-slot":"collapsible",...a}),e[2]=a,e[3]=s):s=e[3],s}function Si(t){const e=j.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let s;return e[2]!==a?(s=d.jsx(Dt,{"data-slot":"collapsible-trigger",...a}),e[2]=a,e[3]=s):s=e[3],s}function wi(t){const e=j.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let s;return e[2]!==a?(s=d.jsx(Lt,{"data-slot":"collapsible-content",...a}),e[2]=a,e[3]=s):s=e[3],s}function Ni(){const t=j.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=et.decoChatOpen(),t[0]=e):e=t[0];const[a,s]=ke(e,qn);let r;return t[1]!==a||t[2]!==s?(r=[a,s],t[1]=a,t[2]=s,t[3]=r):r=t[3],r}function qn(t){return!!(t??!0)}export{Ii as C,mi as M,Vn as R,Z as S,yi as T,vi as a,xi as b,gi as c,er as d,Ni as e,Si as f,_a as g,wi as h,Ks as i,_i as j,Ei as k,bi as l,pi as m,fi as n,Sa as t,hi as u};
23
+ ${r}`}]}catch(r){console.error("Failed to decode text file:",r)}return[{type:"file",url:`data:${a};base64,${s}`,filename:e,mediaType:a}]}function jn(t){if(!t)return[];const e=[];let a="";const s=r=>{if(r){if(r.type==="text"&&"text"in r&&typeof r.text=="string")a+=r.text;else if(r.type==="mention"&&r.attrs){const o=r.attrs.char??"/",i=`${o}${r.attrs.name}`;if(a+=i,o==="@"){const n=r.attrs.metadata||[];e.push(...Cn(n,i))}else{const n=r.attrs.metadata||r.attrs.prompts||[];e.push(...An(n,i))}}else if(r.type==="file"&&r.attrs){const o=r.attrs,i=`[file:://${encodeURIComponent(o.name)}]`;a+=i,e.push(...Mn(o,i))}if("content"in r&&Array.isArray(r.content))for(const o of r.content)s(o)}};return s(t),a.trim()&&e.unshift({type:"text",text:a.trim()}),e}const es=S.createContext(null);function mi(t){const e=j.c(84),{children:a}=t,{locator:s,org:r}=Ce(),o=Sn(),{data:i}=ws.useSession(),n=i?.user??null,[c,l]=S.useReducer(Tn,Ka),u=Rs(),[p,f]=ke(`${s}:selected-virtual-mcp-id`,null),v=Tt(),{hasConnectionModels:y}=jt();let _;if(e[0]!==v||e[1]!==y){let $;e[3]!==y?($=W=>y(W.id),e[3]=y,e[4]=$):$=e[4],_=v.filter($),e[0]=v,e[1]=y,e[2]=_}else _=e[2];const g=_,[h,x]=Nn(s,g);let m;e[5]!==s?(m=et.chatSelectedMode(s),e[5]=s,e[6]=m):m=e[6];const[E,C]=ke(m,"code_execution"),N=o.messages,T=Bo(p),P=Vo();let L;e[7]!==p||e[8]!==u?(L=p?u.find($=>$.id===p)??null:null,e[7]=p,e[8]=u,e[9]=L):L=e[9];const F=L;let re;e[10]!==r.id?(re=js(r.id),e[10]=r.id,e[11]=re):re=e[11];const X=re.id;let J;e[12]!==r.slug?(J=wn(r.slug),e[12]=r.slug,e[13]=J):J=e[13];const K=J;let oe;e[14]!==o?(oe=async $=>{const{finishReason:W,isAbort:Ie,isDisconnect:ct,isError:dt,message:fs,messages:hs}=$;if(l({type:"SET_FINISH_REASON",payload:W??null}),W!=="stop"||Ie||ct||dt)return;const{title:Ft,thread_id:ut,created_at:zt}=fs.metadata??{};!ut||!Ft||!zt||(o.updateMessagesCache(ut,hs),o.updateThread(ut,{title:Ft,updated_at:new Date(zt).toISOString()}))},e[14]=o,e[15]=oe):oe=e[15];const ee=oe,ie=Rn;let G;e[16]!==N||e[17]!==ee||e[18]!==P||e[19]!==o.activeThreadId||e[20]!==K?(G={id:o.activeThreadId,messages:N,transport:K,sendAutomaticallyWhen:Do,onFinish:ee,onToolCall:P,onError:ie},e[16]=N,e[17]=ee,e[18]=P,e[19]=o.activeThreadId,e[20]=K,e[21]=G):G=e[21];const M=Uo(G),le=M.status==="submitted"||M.status==="streaming",q=M.messages.length===0;let ye,xe,be,te,_e,Ee;if(e[22]!==o){xe=()=>{te(),o.createThread()},Ee=o.switchThread,be=o.hideThread;let $;e[29]===Symbol.for("react.memo_cache_sentinel")?($=Ie=>l({type:"SET_TIPTAP_DOC",payload:Ie}),e[29]=$):$=e[29],_e=$;let W;e[30]===Symbol.for("react.memo_cache_sentinel")?(W=()=>l({type:"CLEAR_TIPTAP_DOC"}),e[30]=W):W=e[30],ye=W,te=()=>l({type:"RESET"}),e[22]=o,e[23]=ye,e[24]=xe,e[25]=be,e[26]=te,e[27]=_e,e[28]=Ee}else ye=e[23],xe=e[24],be=e[25],te=e[26],_e=e[27],Ee=e[28];let ze;e[31]!==f?(ze=$=>{f($)},e[31]=f,e[32]=ze):ze=e[32];const rt=ze;let Ue;e[33]!==x?(Ue=$=>{x({id:$.id,connectionId:$.connectionId})},e[33]=x,e[34]=Ue):Ue=e[34];const ot=Ue;let Be;e[35]!==M||e[36]!==T||e[37]!==X||e[38]!==te||e[39]!==E||e[40]!==h||e[41]!==F?.id||e[42]!==o.activeThreadId||e[43]!==n?.image||e[44]!==n?.name?(Be=async $=>{if(!h){St.error("No model configured");return}const W=jn($);if(W.length===0)return;te();const Ie={tiptapDoc:$,created_at:new Date().toISOString(),thread_id:o.activeThreadId,agent:{id:F?.id??X,mode:E},user:{avatar:n?.image??void 0,name:n?.name??"you"}},ct={...Ie,system:T,models:h},dt={id:crypto.randomUUID(),role:"user",parts:W,metadata:Ie};await M.sendMessage(dt,{metadata:ct})},e[35]=M,e[36]=T,e[37]=X,e[38]=te,e[39]=E,e[40]=h,e[41]=F?.id,e[42]=o.activeThreadId,e[43]=n?.image,e[44]=n?.name,e[45]=Be):Be=e[45];const nt=Be;let Ve;e[46]!==M?(Ve=()=>M.stop(),e[46]=M,e[47]=Ve):Ve=e[47];const it=Ve;let qe;e[48]===Symbol.for("react.memo_cache_sentinel")?(qe=()=>l({type:"CLEAR_FINISH_REASON"}),e[48]=qe):qe=e[48];const ms=qe;let We;e[49]!==M.addToolOutput||e[50]!==M.clearError||e[51]!==M.error||e[52]!==M.messages||e[53]!==M.setMessages||e[54]!==M.status||e[55]!==c.finishReason||e[56]!==c.tiptapDoc||e[57]!==ye||e[58]!==xe||e[59]!==be||e[60]!==q||e[61]!==le||e[62]!==g||e[63]!==te||e[64]!==E||e[65]!==h||e[66]!==F||e[67]!==nt||e[68]!==C||e[69]!==ot||e[70]!==_e||e[71]!==rt||e[72]!==it||e[73]!==Ee||e[74]!==o.activeThreadId||e[75]!==o.fetchNextPage||e[76]!==o.hasNextPage||e[77]!==o.isFetchingNextPage||e[78]!==o.threads||e[79]!==u?(We={tiptapDoc:c.tiptapDoc,setTiptapDoc:_e,clearTiptapDoc:ye,resetInteraction:te,activeThreadId:o.activeThreadId,threads:o.threads,createThread:xe,switchToThread:Ee,hideThread:be,hasNextPage:o.hasNextPage,isFetchingNextPage:o.isFetchingNextPage,fetchNextPage:o.fetchNextPage,virtualMcps:u,selectedVirtualMcp:F,setVirtualMcpId:rt,modelsConnections:g,selectedModel:h,setSelectedModel:ot,selectedMode:E,setSelectedMode:C,messages:M.messages,status:M.status,setMessages:M.setMessages,error:M.error,clearError:M.clearError,stop:it,addToolOutput:M.addToolOutput,sendMessage:nt,isStreaming:le,isChatEmpty:q,finishReason:c.finishReason,clearFinishReason:ms},e[49]=M.addToolOutput,e[50]=M.clearError,e[51]=M.error,e[52]=M.messages,e[53]=M.setMessages,e[54]=M.status,e[55]=c.finishReason,e[56]=c.tiptapDoc,e[57]=ye,e[58]=xe,e[59]=be,e[60]=q,e[61]=le,e[62]=g,e[63]=te,e[64]=E,e[65]=h,e[66]=F,e[67]=nt,e[68]=C,e[69]=ot,e[70]=_e,e[71]=rt,e[72]=it,e[73]=Ee,e[74]=o.activeThreadId,e[75]=o.fetchNextPage,e[76]=o.hasNextPage,e[77]=o.isFetchingNextPage,e[78]=o.threads,e[79]=u,e[80]=We):We=e[80];const lt=We;let He;return e[81]!==a||e[82]!==lt?(He=d.jsx(es.Provider,{value:lt,children:a}),e[81]=a,e[82]=lt,e[83]=He):He=e[83],He}function Rn(t){console.error("[chat] Error",t)}function fi(){const t=S.useContext(es);if(!t)throw new Error("useChat must be used within a ChatProvider");return t}function kn(t){return(t.costs?.input??0)+(t.costs?.output??0)>0}function Pn(t,e){const a=e.costs?.input??0,s=e.costs?.output??0,r=(t?.costs?.input??0)+(t?.costs?.output??0);return!t||r===0||a+s<r?e:t}var at="Tabs",[On]=ga(at,[va]),ts=va(),[Dn,Pt]=On(at),as=S.forwardRef((t,e)=>{const{__scopeTabs:a,value:s,onValueChange:r,defaultValue:o,orientation:i="horizontal",dir:n,activationMode:c="automatic",...l}=t,u=Ns(n),[p,f]=ma({prop:s,onChange:r,defaultProp:o??"",caller:at});return d.jsx(Dn,{scope:a,baseId:fa(),value:p,onValueChange:f,orientation:i,dir:u,activationMode:c,children:d.jsx(ge.div,{dir:u,"data-orientation":i,...l,ref:e})})});as.displayName=at;var ss="TabsList",rs=S.forwardRef((t,e)=>{const{__scopeTabs:a,loop:s=!0,...r}=t,o=Pt(ss,a),i=ts(a);return d.jsx(Cs,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:s,children:d.jsx(ge.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:e})})});rs.displayName=ss;var os="TabsTrigger",ns=S.forwardRef((t,e)=>{const{__scopeTabs:a,value:s,disabled:r=!1,...o}=t,i=Pt(os,a),n=ts(a),c=cs(i.baseId,s),l=ds(i.baseId,s),u=s===i.value;return d.jsx(Ts,{asChild:!0,...n,focusable:!r,active:u,children:d.jsx(ge.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:c,...o,ref:e,onMouseDown:Je(t.onMouseDown,p=>{!r&&p.button===0&&p.ctrlKey===!1?i.onValueChange(s):p.preventDefault()}),onKeyDown:Je(t.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(s)}),onFocus:Je(t.onFocus,()=>{const p=i.activationMode!=="manual";!u&&!r&&p&&i.onValueChange(s)})})})});ns.displayName=os;var is="TabsContent",ls=S.forwardRef((t,e)=>{const{__scopeTabs:a,value:s,forceMount:r,children:o,...i}=t,n=Pt(is,a),c=cs(n.baseId,s),l=ds(n.baseId,s),u=s===n.value,p=S.useRef(u);return S.useEffect(()=>{const f=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(f)},[]),d.jsx(ha,{present:r||u,children:({present:f})=>d.jsx(ge.div,{"data-state":u?"active":"inactive","data-orientation":n.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:l,tabIndex:0,...i,ref:e,style:{...t.style,animationDuration:p.current?"0s":void 0},children:f&&o})})});ls.displayName=is;function cs(t,e){return`${t}-trigger-${e}`}function ds(t,e){return`${t}-content-${e}`}var $n=as,Ln=rs,Zn=ns,Fn=ls;function hi(t){const e=j.c(10);let a,s,r;e[0]!==t?({className:a,variant:r,...s}=t,e[0]=t,e[1]=a,e[2]=s,e[3]=r):(a=e[1],s=e[2],r=e[3]);const o=r===void 0?"pill":r;let i;e[4]!==a?(i=ve("flex flex-col gap-2",a),e[4]=a,e[5]=i):i=e[5];let n;return e[6]!==s||e[7]!==i||e[8]!==o?(n=d.jsx($n,{"data-slot":"tabs","data-variant":o,className:i,...s}),e[6]=s,e[7]=i,e[8]=o,e[9]=n):n=e[9],n}function gi(t){const e=j.c(11);let a,s,r;e[0]!==t?({className:a,variant:r,...s}=t,e[0]=t,e[1]=a,e[2]=s,e[3]=r):(a=e[1],s=e[2],r=e[3]);const o=r||"pill",i=o==="underline"?"flex h-[52px] items-center border-b border-border":o==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let n;e[4]!==a||e[5]!==i?(n=ve(i,a),e[4]=a,e[5]=i,e[6]=n):n=e[6];let c;return e[7]!==o||e[8]!==s||e[9]!==n?(c=d.jsx(Ln,{"data-slot":"tabs-list","data-variant":o,className:n,...s}),e[7]=o,e[8]=s,e[9]=n,e[10]=c):c=e[10],c}function vi(t){const e=j.c(11);let a,s,r;e[0]!==t?({className:a,variant:r,...s}=t,e[0]=t,e[1]=a,e[2]=s,e[3]=r):(a=e[1],s=e[2],r=e[3]);const o=r||"pill",i=o==="underline"?"cursor-pointer flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-foreground disabled:pointer-events-none disabled:opacity-50":o==="canvas"?"cursor-pointer flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground cursor-pointer focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let n;e[4]!==a||e[5]!==i?(n=ve(i,a),e[4]=a,e[5]=i,e[6]=n):n=e[6];let c;return e[7]!==o||e[8]!==s||e[9]!==n?(c=d.jsx(Zn,{"data-slot":"tabs-trigger","data-variant":o,className:n,...s}),e[7]=o,e[8]=s,e[9]=n,e[10]=c):c=e[10],c}function yi(t){const e=j.c(8);let a,s;e[0]!==t?({className:a,...s}=t,e[0]=t,e[1]=a,e[2]=s):(a=e[1],s=e[2]);let r;e[3]!==a?(r=ve("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=d.jsx(Fn,{"data-slot":"tabs-content",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}var st="Collapsible",[zn,xi]=ga(st),[Un,Ot]=zn(st),us=S.forwardRef((t,e)=>{const{__scopeCollapsible:a,open:s,defaultOpen:r,disabled:o,onOpenChange:i,...n}=t,[c,l]=ma({prop:s,defaultProp:r??!1,onChange:i,caller:st});return d.jsx(Un,{scope:a,disabled:o,contentId:fa(),open:c,onOpenToggle:S.useCallback(()=>l(u=>!u),[l]),children:d.jsx(ge.div,{"data-state":Zt(c),"data-disabled":o?"":void 0,...n,ref:e})})});us.displayName=st;var ps="CollapsibleTrigger",Dt=S.forwardRef((t,e)=>{const{__scopeCollapsible:a,...s}=t,r=Ot(ps,a);return d.jsx(ge.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":Zt(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...s,ref:e,onClick:Je(t.onClick,r.onOpenToggle)})});Dt.displayName=ps;var $t="CollapsibleContent",Lt=S.forwardRef((t,e)=>{const{forceMount:a,...s}=t,r=Ot($t,t.__scopeCollapsible);return d.jsx(ha,{present:a||r.open,children:({present:o})=>d.jsx(Bn,{...s,ref:e,present:o})})});Lt.displayName=$t;var Bn=S.forwardRef((t,e)=>{const{__scopeCollapsible:a,present:s,children:r,...o}=t,i=Ot($t,a),[n,c]=S.useState(s),l=S.useRef(null),u=As(e,l),p=S.useRef(0),f=p.current,v=S.useRef(0),y=v.current,_=i.open||n,g=S.useRef(_),h=S.useRef(void 0);return S.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),Ms(()=>{const x=l.current;if(x){h.current=h.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const m=x.getBoundingClientRect();p.current=m.height,v.current=m.width,g.current||(x.style.transitionDuration=h.current.transitionDuration,x.style.animationName=h.current.animationName),c(s)}},[i.open,s]),d.jsx(ge.div,{"data-state":Zt(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!_,...o,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:_&&r})});function Zt(t){return t?"open":"closed"}var Vn=us,bi=Dt,_i=Lt;function Ei(t){const e=j.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let s;return e[2]!==a?(s=d.jsx(Vn,{"data-slot":"collapsible",...a}),e[2]=a,e[3]=s):s=e[3],s}function Ii(t){const e=j.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let s;return e[2]!==a?(s=d.jsx(Dt,{"data-slot":"collapsible-trigger",...a}),e[2]=a,e[3]=s):s=e[3],s}function Si(t){const e=j.c(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let s;return e[2]!==a?(s=d.jsx(Lt,{"data-slot":"collapsible-content",...a}),e[2]=a,e[3]=s):s=e[3],s}function wi(){const t=j.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=et.decoChatOpen(),t[0]=e):e=t[0];const[a,s]=ke(e,qn);let r;return t[1]!==a||t[2]!==s?(r=[a,s],t[1]=a,t[2]=s,t[3]=r):r=t[3],r}function qn(t){return!!(t??!0)}export{Ei as C,pi as M,Vn as R,Z as S,vi as T,gi as a,yi as b,hi as c,er as d,wi as e,Ii as f,_a as g,Si as h,Ks as i,bi as j,_i as k,xi as l,ui as m,mi as n,Sa as t,fi as u};
@@ -1 +1 @@
1
- import{u as g,g as y,t as e}from"./index-DyoRyDg0.js";import{u as C}from"./use-binding-jnlj8haE.js";import{g as S,h as v}from"./use-connection-CdUUg5oM.js";import{e as B}from"./extract-connection-data-CYX0n8Dz.js";import{f as I,c as P,e as _}from"./registry-utils-BSsNDH8z.js";function w(t){return t.startsWith("@")?t:`@${t}`}function F(){const{org:t}=g(),{data:s}=y.useSession(),i=S(),l=v(),u=C(l);return{installByBinding:async r=>{if(!t||!s?.user?.id){e.error("Not authenticated");return}const d=w(r),a=(await Promise.all(u.map(async o=>{const c=I(o.tools);if(!c)return null;try{const p=await P(o.id,t.id,c,{where:{appName:d}});return _(p??[])[0]??null}catch{return null}}))).find(o=>o!==null);if(!a){e.error(`MCP Server not found in registry: ${r}`);return}const n=B(a,t.id,s.user.id),m=n.connection_type==="STDIO",f=!!n.connection_url,h=m&&n.connection_headers&&typeof n.connection_headers=="object"&&"command"in n.connection_headers;if(!f&&!h){e.error("This MCP Server cannot be connected: no connection method available");return}return await i.create.mutateAsync(n),{id:n.id,connection:n}},isInstalling:i.create.isPending}}export{F as u};
1
+ import{u as g,g as y,t as e}from"./index-DUWyEHsq.js";import{u as C}from"./use-binding-Ci-Bobgy.js";import{g as S,h as v}from"./use-connection-DQ_s0J7q.js";import{e as B}from"./extract-connection-data-BsEN7v48.js";import{f as I,c as P,e as _}from"./registry-utils-D7Rmthqt.js";function w(t){return t.startsWith("@")?t:`@${t}`}function F(){const{org:t}=g(),{data:s}=y.useSession(),i=S(),l=v(),u=C(l);return{installByBinding:async r=>{if(!t||!s?.user?.id){e.error("Not authenticated");return}const d=w(r),a=(await Promise.all(u.map(async o=>{const c=I(o.tools);if(!c)return null;try{const p=await P(o.id,t.id,c,{where:{appName:d}});return _(p??[])[0]??null}catch{return null}}))).find(o=>o!==null);if(!a){e.error(`MCP Server not found in registry: ${r}`);return}const n=B(a,t.id,s.user.id),m=n.connection_type==="STDIO",f=!!n.connection_url,h=m&&n.connection_headers&&typeof n.connection_headers=="object"&&"command"in n.connection_headers;if(!f&&!h){e.error("This MCP Server cannot be connected: no connection method available");return}return await i.create.mutateAsync(n),{id:n.id,connection:n}},isInstalling:i.create.isPending}}export{F as u};
@@ -0,0 +1 @@
1
+ import{c as $,u as U,K as C,j as x,r as w}from"./index-DUWyEHsq.js";import{A as _}from"./avatar-CwCwm6yK.js";import{c as B}from"./button-BzzgqPA1.js";import{u as D}from"./useQuery-BCcnZLQc.js";import{a as P,u as A}from"./constants-BF_fvAn_.js";import{u as L}from"./use-mobile-CwW2OqhO.js";function R(n){const e=$.c(11),{org:t}=U();let a;e[0]!==t.id?(a={connectionId:P,orgId:t.id},e[0]=t.id,e[1]=a):a=e[1];const r=A(a);let s;e[2]!==n?(s=C.user(n),e[2]=n,e[3]=s):s=e[3];let o;e[4]!==r||e[5]!==n?(o=async()=>{const p=await r.callTool({name:"USER_GET",arguments:{id:n}});return(p.structuredContent??p).user},e[4]=r,e[5]=n,e[6]=o):o=e[6];const i=!!n;let l;return e[7]!==s||e[8]!==o||e[9]!==i?(l={queryKey:s,queryFn:o,staleTime:3e5,retry:1,enabled:i},e[7]=s,e[8]=o,e[9]=i,e[10]=l):l=e[10],D(l)}function H(n){const e=$.c(39),{id:t,size:a,showEmail:r,className:s}=n,o=a===void 0?"xs":a,i=r===void 0?!1:r,{data:l,isLoading:p,isError:y}=R(t);if(p){let u;e[0]!==s?(u=B("flex items-center gap-2",s),e[0]=s,e[1]=u):u=e[1];let c;e[2]!==o?(c=x.jsx(_.Skeleton,{shape:"circle",size:o}),e[2]=o,e[3]=c):c=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=x.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[4]=h):h=e[4];let g;e[5]!==i?(g=i&&x.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[5]=i,e[6]=g):g=e[6];let j;e[7]!==g?(j=x.jsxs("div",{className:"flex flex-col gap-1",children:[h,g]}),e[7]=g,e[8]=j):j=e[8];let M;return e[9]!==u||e[10]!==c||e[11]!==j?(M=x.jsxs("div",{className:u,children:[c,j]}),e[9]=u,e[10]=c,e[11]=j,e[12]=M):M=e[12],M}if(y||!l){let u;e[13]!==s?(u=B("flex items-center gap-2",s),e[13]=s,e[14]=u):u=e[14];let c;e[15]!==o?(c=x.jsx(_,{shape:"circle",size:o,fallback:"?",muted:!0}),e[15]=o,e[16]=c):c=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=x.jsx("div",{className:"flex flex-col",children:x.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[17]=h):h=e[17];let g;return e[18]!==u||e[19]!==c?(g=x.jsxs("div",{className:u,children:[c,h]}),e[18]=u,e[19]=c,e[20]=g):g=e[20],g}let v;e[21]!==s?(v=B("flex items-center gap-2",s),e[21]=s,e[22]=v):v=e[22];const b=l.image??void 0;let m;e[23]!==o||e[24]!==b||e[25]!==l.name?(m=x.jsx(_,{shape:"circle",size:o,url:b,fallback:l.name}),e[23]=o,e[24]=b,e[25]=l.name,e[26]=m):m=e[26];let f;e[27]!==l.name?(f=x.jsx("div",{className:"text-sm font-medium",children:l.name}),e[27]=l.name,e[28]=f):f=e[28];let d;e[29]!==i||e[30]!==l.email?(d=i&&x.jsx("div",{className:"text-xs text-muted-foreground",children:l.email}),e[29]=i,e[30]=l.email,e[31]=d):d=e[31];let S;e[32]!==f||e[33]!==d?(S=x.jsxs("div",{className:"flex flex-col",children:[f,d]}),e[32]=f,e[33]=d,e[34]=S):S=e[34];let N;return e[35]!==v||e[36]!==m||e[37]!==S?(N=x.jsxs("div",{className:v,children:[m,S]}),e[35]=v,e[36]=m,e[37]=S,e[38]=N):N=e[38],N}function k(n){const e=`deco-filters-${n}`,[t,a]=w.useState(()=>{try{const s=globalThis.localStorage?.getItem(e);if(s)return JSON.parse(s)}catch(s){console.error("Failed to parse stored filters:",s)}return[]});return[t,s=>{a(s);try{globalThis.localStorage?.setItem(e,JSON.stringify(s))}catch(o){console.error("Failed to save filters:",o)}}]}function W(n){const e=$.c(7),[t,a]=w.useState(n),[r,s]=w.useState(n?"desc":null);let o;e[0]!==r||e[1]!==t?(o=p=>{t!==p?(a(p),s("asc")):r==="asc"?s("desc"):r==="desc"&&(a(void 0),s(null))},e[0]=r,e[1]=t,e[2]=o):o=e[2];const i=o;let l;return e[3]!==i||e[4]!==r||e[5]!==t?(l={sortKey:t,sortDirection:r,handleSort:i},e[3]=i,e[4]=r,e[5]=t,e[6]=l):l=e[6],l}function q(n,e){const t=$.c(12),a=e===void 0?"cards":e,r=L(),s=w.useRef(r),o=n?`deco-view-mode-${n}`:"deco-view-mode";let i;t[0]!==a||t[1]!==o?(i=()=>{const d=globalThis.localStorage?.getItem(o);return d==="cards"||d==="table"?d:a},t[0]=a,t[1]=o,t[2]=i):i=t[2];const[l,p]=w.useState(i);let y;t[3]!==o?(y=d=>{p(d),globalThis.localStorage?.setItem(o,d)},t[3]=o,t[4]=y):y=t[4];const v=y;let b,m;t[5]!==r||t[6]!==l?(b=()=>{!s.current&&r&&l==="table"&&p("cards"),s.current=r},m=[r,l],t[5]=r,t[6]=l,t[7]=b,t[8]=m):(b=t[7],m=t[8]),w.useEffect(b,m);let f;return t[9]!==v||t[10]!==l?(f=[l,v],t[9]=v,t[10]=l,t[11]=f):f=t[11],f}function X(n){const e=$.c(20),{namespace:t,resource:a,defaultSortKey:r,defaultViewMode:s}=n,o=r===void 0?"title":r,i=s===void 0?"table":s,[l,p]=w.useState(""),y=w.useDeferredValue(l),v=`${t}-${a}`,[b,m]=k(v),f=`mesh-${a}-filter-visible-${t}`;let d;e[0]!==f?(d=()=>globalThis.localStorage?.getItem(f)==="true",e[0]=f,e[1]=d):d=e[1];const[S,N]=w.useState(d);let u;e[2]!==f?(u=T=>{N(T),globalThis.localStorage?.setItem(f,String(T))},e[2]=f,e[3]=u):u=e[3];const c=u;let h;e[4]!==S||e[5]!==c?(h=()=>{c(!S)},e[4]=S,e[5]=c,e[6]=h):h=e[6];const g=h,[j,M]=q(`mesh-${a}-${t}`,i),{sortKey:I,sortDirection:E,handleSort:F}=W(o),V=I;let K;return e[7]!==S||e[8]!==b||e[9]!==F||e[10]!==l||e[11]!==y||e[12]!==c||e[13]!==m||e[14]!==M||e[15]!==E||e[16]!==V||e[17]!==g||e[18]!==j?(K={search:l,searchTerm:y,setSearch:p,filters:b,setFilters:m,filterBarVisible:S,setFilterBarVisible:c,toggleFilterBar:g,viewMode:j,setViewMode:M,sortKey:V,sortDirection:E,handleSort:F},e[7]=S,e[8]=b,e[9]=F,e[10]=l,e[11]=y,e[12]=c,e[13]=m,e[14]=M,e[15]=E,e[16]=V,e[17]=g,e[18]=j,e[19]=K):K=e[19],K}export{H as U,X as u};
@@ -1 +1 @@
1
- import{c,u}from"./index-DyoRyDg0.js";import{h as m,e as a}from"./use-connection-CdUUg5oM.js";import{j as p}from"./constants-DeSBGDil.js";import{a as C}from"./use-binding-jnlj8haE.js";function x(n,s){const o=c.c(5);let e;o[0]!==s?(e=s===void 0?{}:s,o[0]=s,o[1]=e):e=o[1];const r=e,{org:i}=u();let t;o[2]!==n||o[3]!==i.id?(t={connectionId:n,orgId:i.id},o[2]=n,o[3]=i.id,o[4]=t):t=o[4];const l=p(t);return a(n??"no-connection","LLM",l,r)}function j(){const n=c.c(2),s=m();let o;return n[0]!==s?(o={connections:s,binding:"LLMS"},n[0]=s,n[1]=o):o=n[1],C(o)}export{x as a,j as u};
1
+ import{c,u}from"./index-DUWyEHsq.js";import{h as m,e as a}from"./use-connection-DQ_s0J7q.js";import{j as p}from"./constants-BF_fvAn_.js";import{a as C}from"./use-binding-Ci-Bobgy.js";function x(n,s){const o=c.c(5);let e;o[0]!==s?(e=s===void 0?{}:s,o[0]=s,o[1]=e):e=o[1];const r=e,{org:i}=u();let t;o[2]!==n||o[3]!==i.id?(t={connectionId:n,orgId:i.id},o[2]=n,o[3]=i.id,o[4]=t):t=o[4];const l=p(t);return a(n??"no-connection","LLM",l,r)}function j(){const n=c.c(2),s=m();let o;return n[0]!==s?(o={connections:s,binding:"LLMS"},n[0]=s,n[1]=o):o=n[1],C(o)}export{x as a,j as u};
@@ -1 +1 @@
1
- import{c as n,aV as u,aW as p,n as f}from"./index-DyoRyDg0.js";import{u as m}from"./useQuery-B0sG-lD7.js";import{K as c}from"./constants-DeSBGDil.js";async function y(o){if(!o.getServerCapabilities()?.resources)return{resources:[]};try{return await o.listResources()}catch(t){if(t instanceof u&&t.code===p.MethodNotFound)return{resources:[]};throw t}}async function R(o,e){return await o.readResource({uri:e})}function w(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>y(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],f(a)}function C(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>y(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],m(a)}async function P(o){if(!o.getServerCapabilities()?.prompts)return{prompts:[]};try{return await o.listPrompts()}catch(t){if(t instanceof u&&t.code===p.MethodNotFound)return{prompts:[]};throw t}}async function L(o,e,t){if(!o.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await o.getPrompt({name:e,arguments:t??{}})}function T(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>P(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],f(a)}function g(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>P(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],m(a)}export{y as a,g as b,w as c,C as d,L as g,P as l,R as r,T as u};
1
+ import{c as n,aV as u,aW as p,n as f}from"./index-DUWyEHsq.js";import{u as m}from"./useQuery-BCcnZLQc.js";import{K as c}from"./constants-BF_fvAn_.js";async function y(o){if(!o.getServerCapabilities()?.resources)return{resources:[]};try{return await o.listResources()}catch(t){if(t instanceof u&&t.code===p.MethodNotFound)return{resources:[]};throw t}}async function R(o,e){return await o.readResource({uri:e})}function w(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>y(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],f(a)}function C(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>y(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],m(a)}async function P(o){if(!o.getServerCapabilities()?.prompts)return{prompts:[]};try{return await o.listPrompts()}catch(t){if(t instanceof u&&t.code===p.MethodNotFound)return{prompts:[]};throw t}}async function L(o,e,t){if(!o.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await o.getPrompt({name:e,arguments:t??{}})}function T(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>P(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],f(a)}function g(o){const e=n.c(12);let t,s;e[0]!==o?({client:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=c.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>P(t),e[5]=t,e[6]=i):i=e[6];const l=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==l?(a={...s,queryKey:r,queryFn:i,staleTime:l,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=l,e[11]=a):a=e[11],m(a)}export{y as a,g as b,w as c,C as d,L as g,P as l,R as r,T as u};
@@ -1 +1 @@
1
- import{c as m,n as p}from"./index-DyoRyDg0.js";import{u as q}from"./useQuery-B0sG-lD7.js";import{u as C}from"./useMutation-BZJqJibi.js";import{K as T}from"./constants-DeSBGDil.js";function w(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function F(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function P(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function $(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function L(r){const e=m.c(8);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{L as a,$ as b,w as c,F as d,P as u};
1
+ import{c as m,n as p}from"./index-DUWyEHsq.js";import{u as q}from"./useQuery-BCcnZLQc.js";import{u as C}from"./useMutation-CMum5GhU.js";import{K as T}from"./constants-BF_fvAn_.js";function w(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],p(n)}function F(r){const e=m.c(12);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=T.mcpToolsList(t),e[3]=t,e[4]=l):l=e[4];let o;e[5]!==t?(o=async()=>await t.listTools(),e[5]=t,e[6]=o):o=e[6];const i=s.staleTime??3e4;let n;return e[7]!==s||e[8]!==l||e[9]!==o||e[10]!==i?(n={...s,queryKey:l,queryFn:o,staleTime:i,retry:!1},e[7]=s,e[8]=l,e[9]=o,e[10]=i,e[11]=n):n=e[11],q(n)}function P(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=p,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function $(r){const e=m.c(21);let t,s,l,o;e[0]!==r?({client:t,toolName:o,toolArguments:l,...s}=r,e[0]=r,e[1]=t,e[2]=s,e[3]=l,e[4]=o):(t=e[1],s=e[2],l=e[3],o=e[4]);let i,n,u;if(e[5]!==t||e[6]!==s||e[7]!==l||e[8]!==o){const y=JSON.stringify(l??{});u=q,i=s,n=T.mcpToolCall(t,o,y),e[5]=t,e[6]=s,e[7]=l,e[8]=o,e[9]=i,e[10]=n,e[11]=u}else i=e[9],n=e[10],u=e[11];let a;e[12]!==t||e[13]!==l||e[14]!==o?(a=async()=>await t.callTool({name:o,arguments:l}),e[12]=t,e[13]=l,e[14]=o,e[15]=a):a=e[15];const f=s.staleTime??3e4;let c;return e[16]!==i||e[17]!==n||e[18]!==a||e[19]!==f?(c={...i,queryKey:n,queryFn:a,staleTime:f,retry:!1},e[16]=i,e[17]=n,e[18]=a,e[19]=f,e[20]=c):c=e[20],u(c)}function L(r){const e=m.c(8);let t,s;e[0]!==r?({client:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let l;e[3]!==t?(l=async i=>await t.callTool(i),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==s||e[6]!==l?(o={...s,mutationFn:l},e[5]=s,e[6]=l,e[7]=o):o=e[7],C(o)}export{L as a,$ as b,w as c,F as d,P as u};
@@ -1 +1 @@
1
- import{c as m,r}from"./index-DyoRyDg0.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
1
+ import{c as m,r}from"./index-DUWyEHsq.js";const a=768,o=()=>globalThis.innerWidth<a;function u(){const e=m.c(2),[l,n]=r.useState(o);let t,s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{const i=()=>n(o),c=globalThis.matchMedia(`(max-width: ${a-1}px)`);return c.addEventListener("change",i),n(o),()=>c.removeEventListener("change",i)},s=[],e[0]=t,e[1]=s):(t=e[0],s=e[1]),r.useEffect(t,s),l}export{u};
@@ -1 +1 @@
1
- import{c as m,u as T,n as d,z as y,K as g}from"./index-DyoRyDg0.js";import{u as _}from"./useMutation-BZJqJibi.js";import{a as p,u as A}from"./constants-DeSBGDil.js";function D(e){const t=m.c(10),{org:i}=T();let l;t[0]!==i.id?(l={connectionId:p,orgId:i.id},t[0]=i.id,t[1]=l):l=t[1];const c=A(l);let u;t[2]!==e?(u=g.organizationSettings(e),t[2]=e,t[3]=u):u=t[3];let s;t[4]!==c||t[5]!==e?(s=async()=>{const a=await c.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}}),r=a.structuredContent??a;return r||{organizationId:e,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},t[4]=c,t[5]=e,t[6]=s):s=t[6];let n;t[7]!==u||t[8]!==s?(n={queryKey:u,queryFn:s,staleTime:6e4},t[7]=u,t[8]=s,t[9]=n):n=t[9];const{data:o}=d(n);return o}function G(e){const t=m.c(13),i=y(),{org:l}=T();let c;t[0]!==l.id?(c={connectionId:p,orgId:l.id},t[0]=l.id,t[1]=c):c=t[1];const u=A(c);let s;t[2]!==u||t[3]!==e?(s=async S=>{const f=await u.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e,...S}});return f.structuredContent??f},t[2]=u,t[3]=e,t[4]=s):s=t[4];let n;t[5]!==e||t[6]!==i?(n=S=>{i.setQueryData(g.organizationSettings(e),S)},t[5]=e,t[6]=i,t[7]=n):n=t[7];let o;t[8]!==s||t[9]!==n?(o={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=o):o=t[10];const a=_(o);let r;return t[11]!==a?(r={update:a},t[11]=a,t[12]=r):r=t[12],r}export{G as a,D as u};
1
+ import{c as m,u as T,n as d,z as y,K as g}from"./index-DUWyEHsq.js";import{u as _}from"./useMutation-CMum5GhU.js";import{a as p,u as A}from"./constants-BF_fvAn_.js";function D(e){const t=m.c(10),{org:i}=T();let l;t[0]!==i.id?(l={connectionId:p,orgId:i.id},t[0]=i.id,t[1]=l):l=t[1];const c=A(l);let u;t[2]!==e?(u=g.organizationSettings(e),t[2]=e,t[3]=u):u=t[3];let s;t[4]!==c||t[5]!==e?(s=async()=>{const a=await c.callTool({name:"ORGANIZATION_SETTINGS_GET",arguments:{}}),r=a.structuredContent??a;return r||{organizationId:e,sidebar_items:null,enabled_plugins:null,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}},t[4]=c,t[5]=e,t[6]=s):s=t[6];let n;t[7]!==u||t[8]!==s?(n={queryKey:u,queryFn:s,staleTime:6e4},t[7]=u,t[8]=s,t[9]=n):n=t[9];const{data:o}=d(n);return o}function G(e){const t=m.c(13),i=y(),{org:l}=T();let c;t[0]!==l.id?(c={connectionId:p,orgId:l.id},t[0]=l.id,t[1]=c):c=t[1];const u=A(c);let s;t[2]!==u||t[3]!==e?(s=async S=>{const f=await u.callTool({name:"ORGANIZATION_SETTINGS_UPDATE",arguments:{organizationId:e,...S}});return f.structuredContent??f},t[2]=u,t[3]=e,t[4]=s):s=t[4];let n;t[5]!==e||t[6]!==i?(n=S=>{i.setQueryData(g.organizationSettings(e),S)},t[5]=e,t[6]=i,t[7]=n):n=t[7];let o;t[8]!==s||t[9]!==n?(o={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=o):o=t[10];const a=_(o);let r;return t[11]!==a?(r={update:a},t[11]=a,t[12]=r):r=t[12],r}export{G as a,D as u};
@@ -1 +1 @@
1
- import{K as m,c as C,n as T}from"./index-DyoRyDg0.js";import{u as y}from"./useQuery-B0sG-lD7.js";import{u as f,a}from"./constants-DeSBGDil.js";function S(t,s){const e=C.c(13);let r;e[0]!==t?(r={connectionId:a,orgId:t},e[0]=t,e[1]=r):r=e[1];const l=f(r);let u;e[2]!==t||e[3]!==s?(u=m.project(t,s),e[2]=t,e[3]=s,e[4]=u):u=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==s?(c=async()=>{const p=await l.callTool({name:"PROJECT_GET",arguments:{organizationId:t,slug:s}});return(p.structuredContent??p).project},e[5]=l,e[6]=t,e[7]=s,e[8]=c):c=e[8];const o=!!t&&!!s;let n;return e[9]!==u||e[10]!==c||e[11]!==o?(n={queryKey:u,queryFn:c,enabled:o,staleTime:3e4},e[9]=u,e[10]=c,e[11]=o,e[12]=n):n=e[12],y(n)}function _(t,s){const e=f({connectionId:a,orgId:t}),r={queryKey:m.projects(t),queryFn:async()=>{const l=await e.callTool({name:"PROJECT_LIST",arguments:{organizationId:t}});return(l.structuredContent??l).projects.map(c=>({...c,organizationId:t}))},staleTime:3e4};return s?.suspense?T(r):y({...r,enabled:!!t})}export{_ as a,S as u};
1
+ import{K as m,c as C,n as T}from"./index-DUWyEHsq.js";import{u as y}from"./useQuery-BCcnZLQc.js";import{u as f,a}from"./constants-BF_fvAn_.js";function S(t,s){const e=C.c(13);let r;e[0]!==t?(r={connectionId:a,orgId:t},e[0]=t,e[1]=r):r=e[1];const l=f(r);let u;e[2]!==t||e[3]!==s?(u=m.project(t,s),e[2]=t,e[3]=s,e[4]=u):u=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==s?(c=async()=>{const p=await l.callTool({name:"PROJECT_GET",arguments:{organizationId:t,slug:s}});return(p.structuredContent??p).project},e[5]=l,e[6]=t,e[7]=s,e[8]=c):c=e[8];const o=!!t&&!!s;let n;return e[9]!==u||e[10]!==c||e[11]!==o?(n={queryKey:u,queryFn:c,enabled:o,staleTime:3e4},e[9]=u,e[10]=c,e[11]=o,e[12]=n):n=e[12],y(n)}function _(t,s){const e=f({connectionId:a,orgId:t}),r={queryKey:m.projects(t),queryFn:async()=>{const l=await e.callTool({name:"PROJECT_LIST",arguments:{organizationId:t}});return(l.structuredContent??l).projects.map(c=>({...c,organizationId:t}))},staleTime:3e4};return s?.suspense?T(r):y({...r,enabled:!!t})}export{_ as a,S as u};
@@ -1 +1 @@
1
- import{c,u as r}from"./index-DyoRyDg0.js";import{e as a,u as C,d as I}from"./use-connection-CdUUg5oM.js";import{a as l,u}from"./constants-DeSBGDil.js";function m(i){const t=c.c(4);let o;t[0]!==i?(o=i===void 0?{}:i,t[0]=i,t[1]=o):o=t[1];const n=o,{org:e}=r();let s;t[2]!==e.id?(s={connectionId:l,orgId:e.id},t[2]=e.id,t[3]=s):s=t[3];const d=u(s);return a(e.id,"VIRTUAL_MCP",d,n)}function V(i){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:l,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=u(n);return I(o.id,"VIRTUAL_MCP",i??void 0,e)}function p(){const i=c.c(2),{org:t}=r();let o;i[0]!==t.id?(o={connectionId:l,orgId:t.id},i[0]=t.id,i[1]=o):o=i[1];const n=u(o);return C(t.id,"VIRTUAL_MCP",n)}export{p as a,m as b,V as u};
1
+ import{c,u as r}from"./index-DUWyEHsq.js";import{e as a,u as C,d as I}from"./use-connection-DQ_s0J7q.js";import{a as l,u}from"./constants-BF_fvAn_.js";function m(i){const t=c.c(4);let o;t[0]!==i?(o=i===void 0?{}:i,t[0]=i,t[1]=o):o=t[1];const n=o,{org:e}=r();let s;t[2]!==e.id?(s={connectionId:l,orgId:e.id},t[2]=e.id,t[3]=s):s=t[3];const d=u(s);return a(e.id,"VIRTUAL_MCP",d,n)}function V(i){const t=c.c(2),{org:o}=r();let n;t[0]!==o.id?(n={connectionId:l,orgId:o.id},t[0]=o.id,t[1]=n):n=t[1];const e=u(n);return I(o.id,"VIRTUAL_MCP",i??void 0,e)}function p(){const i=c.c(2),{org:t}=r();let o;i[0]!==t.id?(o={connectionId:l,orgId:t.id},i[0]=t.id,i[1]=o):o=i[1];const n=u(o);return C(t.id,"VIRTUAL_MCP",n)}export{p as a,m as b,V as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-B0EWimPZ.js";import{a5 as i}from"./index-DUWyEHsq.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{aO as l,aP as p,aQ as n,aR as d,aS as h,z as b,r as o,aT as m,aU as f}from"./index-DyoRyDg0.js";var v=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),p(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,i=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#e.onSuccess?.(t.data,s,i,e),this.#e.onSettled?.(t.data,null,s,i,e)):t?.type==="error"&&(this.#e.onError?.(t.error,s,i,e),this.#e.onSettled?.(void 0,t.error,s,i,e))}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const i=b(s),[e]=o.useState(()=>new v(i,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const r=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(r.error&&f(e.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}export{O as u};
1
+ import{aM as l,aN as p,aO as n,aP as d,aQ as h,z as b,r as o,aR as m,aS as f}from"./index-DUWyEHsq.js";var v=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),p(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&n(s.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??d();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,i=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#e.onSuccess?.(t.data,s,i,e),this.#e.onSettled?.(t.data,null,s,i,e)):t?.type==="error"&&(this.#e.onError?.(t.error,s,i,e),this.#e.onSettled?.(void 0,t.error,s,i,e))}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const i=b(s),[e]=o.useState(()=>new v(i,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const r=o.useSyncExternalStore(o.useCallback(a=>e.subscribe(h.batchCalls(a)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((a,c)=>{e.mutate(a,c).catch(m)},[e]);if(r.error&&f(e.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}export{O as u};
@@ -0,0 +1 @@
1
+ import{a5 as u,a8 as s}from"./index-DUWyEHsq.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -0,0 +1 @@
1
+ import{c as Y,r as V,j as i}from"./index-DUWyEHsq.js";import{c as n}from"./button-BzzgqPA1.js";const Z={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function oe(J){const e=Y.c(66),{value:o,onValueChange:l,options:t,size:D,fullWidth:F,className:W}=J,K=D===void 0?"sm":D,w=F===void 0?!1:F,G=V.useRef(null),H=V.useRef(null);let R;e[0]===Symbol.for("react.memo_cache_sentinel")?(R={left:0,width:0,opacity:0},e[0]=R):R=e[0];const[N,O]=V.useState(R);let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=S=>{if(!S.current)return;const{offsetLeft:U,offsetWidth:X}=S.current;O({left:U,width:X,opacity:1})},e[1]=_):_=e[1];const Q=_;let C;e[2]!==t[0].value||e[3]!==o?(C=()=>{const S=o===t[0].value?G:H;Q(S)},e[2]=t[0].value,e[3]=o,e[4]=C):C=e[4];let E;e[5]!==t||e[6]!==o?(E=[o,t],e[5]=t,e[6]=o,e[7]=E):E=e[7],V.useEffect(C,E);const s=Z[K];let a;e[8]!==W?(a=n("relative flex gap-0 bg-muted rounded-lg",W),e[8]=W,e[9]=a):a=e[9];let c;e[10]!==l||e[11]!==t[0].value?(c=()=>l(t[0].value),e[10]=l,e[11]=t[0].value,e[12]=c):c=e[12];const $=w?"flex-1 h-12 px-4":s.button,I=!w&&t[0].label?"px-3":"";let r;e[13]!==I||e[14]!==$?(r=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",$,I),e[13]=I,e[14]=$,e[15]=r):r=e[15];const P=o===t[0].value?"text-foreground":"text-muted-foreground";let u;e[16]!==s.icon||e[17]!==P?(u=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,P),e[16]=s.icon,e[17]=P,e[18]=u):u=e[18];let f;e[19]!==t[0].icon||e[20]!==u?(f=i.jsx("span",{className:u,children:t[0].icon}),e[19]=t[0].icon,e[20]=u,e[21]=f):f=e[21];let d;e[22]!==t[0].label||e[23]!==t[0].value||e[24]!==o?(d=t[0].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[0].value?"text-foreground":"text-muted-foreground"),children:t[0].label}),e[22]=t[0].label,e[23]=t[0].value,e[24]=o,e[25]=d):d=e[25];let m;e[26]!==r||e[27]!==f||e[28]!==d||e[29]!==c?(m=i.jsxs("button",{ref:G,type:"button",onClick:c,className:r,children:[f,d]}),e[26]=r,e[27]=f,e[28]=d,e[29]=c,e[30]=m):m=e[30];let x;e[31]!==l||e[32]!==t[1].value?(x=()=>l(t[1].value),e[31]=l,e[32]=t[1].value,e[33]=x):x=e[33];const L=w?"flex-1 h-12 px-4":s.button,M=!w&&t[1].label?"px-3":"";let p;e[34]!==L||e[35]!==M?(p=n("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",L,M),e[34]=L,e[35]=M,e[36]=p):p=e[36];const T=o===t[1].value?"text-foreground":"text-muted-foreground";let b;e[37]!==s.icon||e[38]!==T?(b=n("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",s.icon,T),e[37]=s.icon,e[38]=T,e[39]=b):b=e[39];let v;e[40]!==t[1].icon||e[41]!==b?(v=i.jsx("span",{className:b,children:t[1].icon}),e[40]=t[1].icon,e[41]=b,e[42]=v):v=e[42];let g;e[43]!==t[1].label||e[44]!==t[1].value||e[45]!==o?(g=t[1].label&&i.jsx("span",{className:n("text-xs transition-colors ease-out duration-200 whitespace-nowrap",o===t[1].value?"text-foreground":"text-muted-foreground"),children:t[1].label}),e[43]=t[1].label,e[44]=t[1].value,e[45]=o,e[46]=g):g=e[46];let h;e[47]!==x||e[48]!==p||e[49]!==v||e[50]!==g?(h=i.jsxs("button",{ref:H,type:"button",onClick:x,className:p,children:[v,g]}),e[47]=x,e[48]=p,e[49]=v,e[50]=g,e[51]=h):h=e[51];const q=w?"h-12":s.button;let y;e[52]!==q?(y=n("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",q),e[52]=q,e[53]=y):y=e[53];const A=`${N.left}px`,B=`${N.width}px`;let j;e[54]!==N.opacity||e[55]!==A||e[56]!==B?(j={left:A,width:B,opacity:N.opacity},e[54]=N.opacity,e[55]=A,e[56]=B,e[57]=j):j=e[57];let z;e[58]!==y||e[59]!==j?(z=i.jsx("div",{className:y,style:j}),e[58]=y,e[59]=j,e[60]=z):z=e[60];let k;return e[61]!==m||e[62]!==h||e[63]!==z||e[64]!==a?(k=i.jsxs("div",{className:a,children:[m,h,z]}),e[61]=m,e[62]=h,e[63]=z,e[64]=a,e[65]=k):k=e[65],k}export{oe as V};
@@ -0,0 +1 @@
1
+ import{u as P,g as z,m as A,r as E,j as t,O as L,c as _,aK as F}from"./index-DUWyEHsq.js";import{e as M}from"./constants-BF_fvAn_.js";import{C as T}from"./collection-tab-gslp5F0N.js";import{g as G,h as H}from"./use-connection-DQ_s0J7q.js";import{B as w}from"./button-BzzgqPA1.js";import{E as U}from"./empty-state-Dk2L_oED.js";import{E as D,i as J}from"./error-boundary-BlQFrpbk.js";import{P as y}from"./index-DHPVwvvK.js";import{B as V,a as q,b as K,c as Q}from"./breadcrumb-CpY5_MEM.js";import{a as X,b as Y}from"./use-binding-Ci-Bobgy.js";import{i as Z}from"./Loading01-BPsj2Ikr.js";import{s as ee}from"./RefreshCcw01-Dh-nQZ6_.js";import{a as te}from"./Settings02-DDgRyQEW.js";import"./generate-id-Dyweu44Y.js";import"./collection-table-wrapper-DIbesVyO.js";import"./dropdown-menu-BLDCY1bL.js";import"./ChevronRight-Chr-Opwh.js";import"./ArrowUp-DglMchA5.js";import"./Check-D6aC5DTd.js";import"./Grid01-BSLssB32.js";import"./List-DU0cbaW8.js";import"./integration-icon-DcCARkam.js";import"./index-BidPkBMC.js";import"./view-mode-toggle-4KKEmX6-.js";import"./table-Do6WMe3W.js";import"./collection-search-C0EzGOfM.js";import"./SearchMd-DUhyUDi8.js";import"./input-DIsbo1lI.js";import"./card-BMS2jWLg.js";import"./Copy01-DqRoI1-6.js";import"./DotsVertical-D2hVHMV7.js";import"./Edit01-DdekSr5y.js";import"./Eye-DF_0-3p6.js";import"./Trash01-5qyOQuDf.js";import"./empty-state-CeiZxNhi.js";import"./Inbox01-BCKz6bhQ.js";import"./use-list-state-B1GDSVRC.js";import"./avatar-CwCwm6yK.js";import"./useQuery-BCcnZLQc.js";import"./use-mobile-CwW2OqhO.js";import"./constants-DUoC8L5w.js";import"./alert-dialog-CDTYj-K3.js";import"./Plus-B_c8T2NA.js";import"./layout-0JlcWnLI.js";import"./useMutation-CMum5GhU.js";import"./binder-DLof5cwN.js";function se({title:n,description:e,wellKnownMcp:o,imageSrc:r,onConnected:i}){const c=G(),{org:{slug:p}}=P(),{data:a}=z.useSession(),u=A(),[m,k]=E.useState(!1),s=async()=>{if(!(!o||!a?.user?.id)){k(!0);try{const d=await c.create.mutateAsync(o);i?.(d.id),u({to:"/$org/$project/mcps/$connectionId",params:{org:p,project:L,connectionId:d.id}})}finally{k(!1)}}},N=()=>{u({to:"/$org/$project/mcps",params:{org:p,project:L},search:{action:"create"}})};return t.jsx(U,{image:r?t.jsx("img",{src:r,alt:n,width:336,height:320,className:"max-w-full h-auto"}):null,title:n,description:e,actions:t.jsxs(t.Fragment,{children:[t.jsxs(w,{variant:"outline",onClick:s,disabled:m||!o,children:[o?.icon&&t.jsx("img",{src:o.icon,alt:"",className:"size-4"}),m?"Installing...":`Install ${o?.title||"MCP"}`]}),t.jsx(w,{variant:"outline",onClick:N,children:"Custom Connection"})]})})}function ie(n){const e=_.c(35),{bindingName:o,collectionName:r,title:i,emptyState:c,wellKnownMcp:p}=n,{org:a}=P(),u=H();let m;e[0]!==u||e[1]!==o?(m={connections:u,binding:o},e[0]=u,e[1]=o,e[2]=m):m=e[2];const s=X(m)[0],N=Y(s);let d;if(e[3]!==r||e[4]!==N){let l;e[6]!==r?(l=$=>$.name.toLowerCase()===r.toLowerCase(),e[6]=r,e[7]=l):l=e[7],d=N.find(l),e[3]=r,e[4]=N,e[5]=d}else d=e[5];const I=d,[W,O]=E.useState(null),B=s&&I&&(s.id||W);let f;e[8]!==i?(f=t.jsx(y.Header,{children:t.jsx(y.Header.Left,{children:t.jsx(V,{children:t.jsx(q,{children:t.jsx(K,{children:t.jsx(Q,{children:i})})})})})}),e[8]=i,e[9]=f):f=e[9];let x;e[10]!==s||e[11]!==a||e[12]!==i?(x=l=>{const{error:$,resetError:R}=l;return t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(J,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsxs("h3",{className:"text-lg font-medium",children:["Failed to load ",i.toLowerCase()]}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:$?.message||"Unable to connect to the server. Please check that it is running and accessible."})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs(w,{variant:"outline",onClick:R,children:[t.jsx(ee,{className:"size-4"}),"Try again"]}),s&&t.jsx(w,{variant:"outline",asChild:!0,children:t.jsxs(F,{to:"/$org/$project/mcps/$connectionId",params:{org:a.slug,project:L,connectionId:s.id},search:{tab:"settings"},children:[t.jsx(te,{className:"size-4"}),"Connection Settings"]})})]})]})},e[10]=s,e[11]=a,e[12]=i,e[13]=x):x=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Z,{size:32,className:"animate-spin text-muted-foreground mb-4"}),e[14]=S):S=e[14];let g;e[15]!==i?(g=i.toLowerCase(),e[15]=i,e[16]=g):g=e[16];let h;e[17]!==g?(h=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[S,t.jsxs("p",{className:"text-sm text-muted-foreground",children:["Loading ",g,"..."]})]}),e[17]=g,e[18]=h):h=e[18];let j;e[19]!==I||e[20]!==s||e[21]!==c||e[22]!==a||e[23]!==B||e[24]!==p?(j=B?t.jsx(T,{connectionId:s.id,org:a.slug,activeCollection:I}):t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(se,{title:c.title,description:c.description,wellKnownMcp:p,imageSrc:c.imageSrc,onConnected:l=>{O(l)}})}),e[19]=I,e[20]=s,e[21]=c,e[22]=a,e[23]=B,e[24]=p,e[25]=j):j=e[25];let C;e[26]!==h||e[27]!==j?(C=t.jsx(E.Suspense,{fallback:h,children:j}),e[26]=h,e[27]=j,e[28]=C):C=e[28];let b;e[29]!==x||e[30]!==C?(b=t.jsx(y.Content,{children:t.jsx(D,{fallback:x,children:C})}),e[29]=x,e[30]=C,e[31]=b):b=e[31];let v;return e[32]!==b||e[33]!==f?(v=t.jsxs(y,{children:[f,b]}),e[32]=b,e[33]=f,e[34]=v):v=e[34],v}function Qe(){const n=_.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(ie,{bindingName:"WORKFLOW",collectionName:"workflow",title:"Workflows",emptyState:{title:"Create Workflows",description:"Install MCP Studio to create and manage automated workflows with multiple steps and integrations."},wellKnownMcp:M()}),n[0]=e):e=n[0],e}export{Qe as default};
@@ -3,8 +3,8 @@
3
3
  <head>
4
4
  <title>MCP Mesh</title>
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
- <script type="module" crossorigin src="/assets/index-DyoRyDg0.js"></script>
7
- <link rel="stylesheet" crossorigin href="/assets/index-tYpHqvxs.css">
6
+ <script type="module" crossorigin src="/assets/index-DUWyEHsq.js"></script>
7
+ <link rel="stylesheet" crossorigin href="/assets/index-CwsYRpNw.css">
8
8
  </head>
9
9
  <body>
10
10
  <div id="root"></div>