@decocms/mesh 2.76.0 → 2.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/client/assets/{AlertCircle-TbirTaeA.js → AlertCircle-BppvLQSd.js} +1 -1
  2. package/dist/client/assets/{ArrowUp-DVhz9MPT.js → ArrowUp-D26ZQKRa.js} +1 -1
  3. package/dist/client/assets/{Calendar-BhleOqT-.js → Calendar-DDieAsd2.js} +1 -1
  4. package/dist/client/assets/{Check-BIlnRzi6.js → Check-bgVFNRDs.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-CSYoAEm3.js → CheckCircle-D5tJhsvc.js} +1 -1
  6. package/dist/client/assets/{CheckDone01-gZo2F6uL.js → CheckDone01-dY3WtOge.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-jAfIG9nZ.js → ChevronDown-DY4fpd0G.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-CNYkXy1u.js → ChevronRight-DMzFQQCc.js} +1 -1
  9. package/dist/client/assets/{Code01-DeVT5m93.js → Code01-7hV4ZDjZ.js} +1 -1
  10. package/dist/client/assets/{Copy01-BJPi2nBZ.js → Copy01-C35WeFYE.js} +1 -1
  11. package/dist/client/assets/{DotsHorizontal-CZIcl0Ye.js → DotsHorizontal-LbVwX-Tq.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CPJps54j.js → DotsVertical-BNqPYTki.js} +1 -1
  13. package/dist/client/assets/{Download01-BVA62GFI.js → Download01-Cihql6Z7.js} +1 -1
  14. package/dist/client/assets/{Edit01-CLT1AKyh.js → Edit01-DDrpQJgk.js} +1 -1
  15. package/dist/client/assets/{File02-M7e4eeKQ.js → File02-GEmd_G7y.js} +1 -1
  16. package/dist/client/assets/{File06-BUOJeS0C.js → File06-888BgyfZ.js} +1 -1
  17. package/dist/client/assets/{FilterLines-CDkZPaiO.js → FilterLines-Bvkz4XO7.js} +1 -1
  18. package/dist/client/assets/{Globe02-CNtZ4Mz7.js → Globe02-DSX2gzp_.js} +1 -1
  19. package/dist/client/assets/{Grid01-BhCIE3UE.js → Grid01-CfSiTcO8.js} +1 -1
  20. package/dist/client/assets/{Home02-Zp_wVezk.js → Home02-PhQXF8P6.js} +1 -1
  21. package/dist/client/assets/{Image01-Bmljn0R6.js → Image01-BUR65REQ.js} +1 -1
  22. package/dist/client/assets/{Inbox01-Bz-1SNbb.js → Inbox01-Bhe6QhSW.js} +1 -1
  23. package/dist/client/assets/{InfoCircle-DutDNmXq.js → InfoCircle-5NZyA5WD.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-npl2D9IH.js → LinkExternal01-Cr89LzOE.js} +1 -1
  25. package/dist/client/assets/{List-B95opsr5.js → List-BBkbo-oe.js} +1 -1
  26. package/dist/client/assets/{Loading01-CudhqwtJ.js → Loading01-C2vqzEw-.js} +1 -1
  27. package/dist/client/assets/{Lock01-C3j5poil.js → Lock01-ClMI2bMm.js} +1 -1
  28. package/dist/client/assets/{Pin01-DpTwe7GO.js → Pin01-uiXGtZsb.js} +1 -1
  29. package/dist/client/assets/{Play-BxFFyAEF.js → Play-Bm8SKfhZ.js} +1 -1
  30. package/dist/client/assets/{Plus-BVPnBK8D.js → Plus-BMOTPGqH.js} +1 -1
  31. package/dist/client/assets/{RefreshCcw01-Dzlid7sh.js → RefreshCcw01-B1tus5Lj.js} +1 -1
  32. package/dist/client/assets/{SearchMd-yRVgOeax.js → SearchMd-BqVXNd65.js} +1 -1
  33. package/dist/client/assets/{Settings01-DGIrqZBI.js → Settings01-CYRp4gjN.js} +1 -1
  34. package/dist/client/assets/{Settings02-CW4MK9LY.js → Settings02-BiTxgSpC.js} +1 -1
  35. package/dist/client/assets/{Share07-BKNvns4q.js → Share07-BZVoNuS6.js} +1 -1
  36. package/dist/client/assets/{Terminal-DV_yPRWa.js → Terminal-DRpoCIsG.js} +1 -1
  37. package/dist/client/assets/{Tool01-C0EKLKq5.js → Tool01-djk7g7Hv.js} +1 -1
  38. package/dist/client/assets/{Trash01-py7ft8Od.js → Trash01-d4v7i3Ze.js} +1 -1
  39. package/dist/client/assets/{Upload01-CCoXEdI4.js → Upload01-Ci_jklEk.js} +1 -1
  40. package/dist/client/assets/{Users03-D2F2bran.js → Users03-Bw7fWrTD.js} +1 -1
  41. package/dist/client/assets/{X-CixxHrye.js → X-CslJd5Ib.js} +1 -1
  42. package/dist/client/assets/{XClose-S1Me7eeg.js → XClose-CjpNuP8c.js} +1 -1
  43. package/dist/client/assets/{agent-connections-preview-DZgc-mir.js → agent-connections-preview-qFrRTce9.js} +1 -1
  44. package/dist/client/assets/{agent-detail-DPLDxB9n.js → agent-detail-BqrAf6oD.js} +1 -1
  45. package/dist/client/assets/{agents-CynO2-IY.js → agents-DUQt1GSW.js} +1 -1
  46. package/dist/client/assets/{alert-dialog-B1nWkQHx.js → alert-dialog-DRso9X1m.js} +1 -1
  47. package/dist/client/assets/{auth-catchall-CJ49F7Eq.js → auth-catchall-CBFb2pC-.js} +1 -1
  48. package/dist/client/assets/{avatar-BbH9O0kN.js → avatar-kY9raA-l.js} +1 -1
  49. package/dist/client/assets/{badge-C898LHvV.js → badge-DBw6AEaX.js} +1 -1
  50. package/dist/client/assets/{binder-xcUkLvPC.js → binder-Jddq1y1v.js} +1 -1
  51. package/dist/client/assets/{breadcrumb-t_Ccp20G.js → breadcrumb-ChH6wfcA.js} +1 -1
  52. package/dist/client/assets/{button-C1iesapY.js → button-D_OpQIQm.js} +1 -1
  53. package/dist/client/assets/{card-DKzkS6ji.js → card-DAZxrY9k.js} +1 -1
  54. package/dist/client/assets/{checkbox-B82l7mBw.js → checkbox-C1Sx9y02.js} +1 -1
  55. package/dist/client/assets/{circle-alert-_5s_KbQk.js → circle-alert-DHI8xRUj.js} +1 -1
  56. package/dist/client/assets/{collection-detail-B-hnHfhu.js → collection-detail-mD5cqpxJ.js} +1 -1
  57. package/dist/client/assets/{collection-search-D3a5_1zR.js → collection-search-Bkd4qN8a.js} +1 -1
  58. package/dist/client/assets/{collection-tab-Y58MHDMK.js → collection-tab-Dw5b9EM9.js} +1 -1
  59. package/dist/client/assets/{collection-table-wrapper-B6XWzQ-4.js → collection-table-wrapper-DFTdnQhc.js} +1 -1
  60. package/dist/client/assets/{collection-tabs-BPHWDFL4.js → collection-tabs-N53MF1Jz.js} +1 -1
  61. package/dist/client/assets/{command-DepzRVHX.js → command-B5nNM5RC.js} +1 -1
  62. package/dist/client/assets/{connect-OP0J5SPJ.js → connect--hPmG576.js} +1 -1
  63. package/dist/client/assets/{connection-card-DkCny6Ez.js → connection-card-Ci3H_H7r.js} +1 -1
  64. package/dist/client/assets/{connection-detail-CdLleACg.js → connection-detail-8nT6j66Y.js} +1 -1
  65. package/dist/client/assets/{connections-BZUVvBGs.js → connections-ShazCLrP.js} +1 -1
  66. package/dist/client/assets/constants-1u4R2d-I.js +1 -0
  67. package/dist/client/assets/{constants-BEco_-y7.js → constants-DisdEZ3l.js} +1 -1
  68. package/dist/client/assets/{create-organization-dialog-58b_GUv7.js → create-organization-dialog-Ca5pwwfH.js} +1 -1
  69. package/dist/client/assets/{create-project-dialog-C5GAJOOY.js → create-project-dialog-BDfz4rOz.js} +1 -1
  70. package/dist/client/assets/{dialog-CpkgwzHW.js → dialog-BPL7ZvPc.js} +1 -1
  71. package/dist/client/assets/{dropdown-menu-D6YYwFq7.js → dropdown-menu-BxLN4KkF.js} +1 -1
  72. package/dist/client/assets/{dynamic-plugin-layout-BMgNBEQS.js → dynamic-plugin-layout-D9dQ0ajA.js} +1 -1
  73. package/dist/client/assets/{empty-state-BQPtoYZe.js → empty-state-CbIU_RrP.js} +1 -1
  74. package/dist/client/assets/{empty-state-CH3e4Xzf.js → empty-state-DXJM9xrV.js} +1 -1
  75. package/dist/client/assets/{env-vars-editor-Vpi1vdW2.js → env-vars-editor-BbjrljLQ.js} +1 -1
  76. package/dist/client/assets/{error-boundary-BGFWaL1J.js → error-boundary-BMH0CjEH.js} +1 -1
  77. package/dist/client/assets/{extract-connection-data-CDmQ7rLP.js → extract-connection-data-wB5jtXsg.js} +1 -1
  78. package/dist/client/assets/{file-browser-DUDclrRh.js → file-browser-DBOCTon5.js} +2 -2
  79. package/dist/client/assets/{form-NA0-x5iN.js → form-BpiblhO1.js} +1 -1
  80. package/dist/client/assets/{grid-view-DbtTgaoS.js → grid-view-Bty4YwjE.js} +1 -1
  81. package/dist/client/assets/{home-DtmWz3MA.js → home-BIvstm5O.js} +1 -1
  82. package/dist/client/assets/{index-Kq8ytqk9.js → index--vZ0X2xS.js} +1 -1
  83. package/dist/client/assets/{index-wUnd_o-U.js → index-B9-4goiW.js} +1 -1
  84. package/dist/client/assets/{index-HxeE9C0A.js → index-BKpxPW_G.js} +2 -2
  85. package/dist/client/assets/{index-GRocoNYa.js → index-BV_k_ZyP.js} +1 -1
  86. package/dist/client/assets/{index-C9Dn0opW.js → index-B_142IPp.js} +1 -1
  87. package/dist/client/assets/{index-DlY6KFzI.js → index-CnNzyZrg.js} +1 -1
  88. package/dist/client/assets/{index-43_iGxlN.js → index-D-_nr7La.js} +1 -1
  89. package/dist/client/assets/{index-Dv4saiJc.js → index-D0nVkmnC.js} +1 -1
  90. package/dist/client/assets/{index-ByJoFAq_.js → index-fVGDVKMq.js} +1 -1
  91. package/dist/client/assets/{infiniteQueryObserver-CSOdbqFL.js → infiniteQueryObserver-B8M15Jhm.js} +1 -1
  92. package/dist/client/assets/{input-DBGu1Yhi.js → input-lpAGMNlp.js} +1 -1
  93. package/dist/client/assets/{integration-icon-CmJggqPx.js → integration-icon-DFSc5_D8.js} +1 -1
  94. package/dist/client/assets/{label-11d5Pe_w.js → label-h0it3r-G.js} +1 -1
  95. package/dist/client/assets/{layout-BQSZy0Ao.js → layout-DaBTH10o.js} +1 -1
  96. package/dist/client/assets/{localstorage-keys-BxVB7BFB.js → localstorage-keys-CrJngaoW.js} +1 -1
  97. package/dist/client/assets/{login-CMpn2tdR.js → login-DX4NlTrd.js} +1 -1
  98. package/dist/client/assets/{mcp-oauth-JrpxCLx4.js → mcp-oauth-DQYLB8aB.js} +1 -1
  99. package/dist/client/assets/{mcp-server-card-8DET7nVd.js → mcp-server-card-fBAhOAUG.js} +1 -1
  100. package/dist/client/assets/{mcp-server-detail-CMrzxsYv.js → mcp-server-detail-BZkrf0kt.js} +2 -2
  101. package/dist/client/assets/{members-CUWgr5ku.js → members-BigA6ZKR.js} +1 -1
  102. package/dist/client/assets/{monaco-editor-DvJ6AQm-.js → monaco-editor-DZSx9WV6.js} +1 -1
  103. package/dist/client/assets/{monitoring-Db1K0NxK.js → monitoring-cMb0Xapp.js} +1 -1
  104. package/dist/client/assets/{oauth-callback-Bh-LWKIz.js → oauth-callback-CjSC6FG1.js} +1 -1
  105. package/dist/client/assets/{page-Bx3m0Nlj.js → page-BDwNfQ-N.js} +1 -1
  106. package/dist/client/assets/{page-79TZOOqo.js → page-jq7pkske.js} +1 -1
  107. package/dist/client/assets/{plugin-empty-state-34Wj3C93.js → plugin-empty-state-CIjn_En1.js} +1 -1
  108. package/dist/client/assets/{plugin-header-KrvIXXbF.js → plugin-header-DxKd-JRE.js} +1 -1
  109. package/dist/client/assets/{popover-BbAo_V3q.js → popover-ESVk6nXT.js} +1 -1
  110. package/dist/client/assets/{project-layout-QE2hcM6x.js → project-layout-DOGEQwDl.js} +1 -1
  111. package/dist/client/assets/{project-settings-2bxHgR8P.js → project-settings-DPjoRdOS.js} +1 -1
  112. package/dist/client/assets/{projects-list-CSrfAb2G.js → projects-list-BSPk4OqL.js} +1 -1
  113. package/dist/client/assets/{registry-utils-CLfG2KJO.js → registry-utils-yxVJe3X4.js} +1 -1
  114. package/dist/client/assets/{resizable-D5fgPQWp.js → resizable-fcBWjaSA.js} +1 -1
  115. package/dist/client/assets/{select-CnIfeZ9k.js → select-BbzYJ4VF.js} +1 -1
  116. package/dist/client/assets/{shell-layout-DIuzNmm5.js → shell-layout-DlF3XvPK.js} +1 -1
  117. package/dist/client/assets/{spinner-BbdUl9_5.js → spinner-Lv2khbLw.js} +1 -1
  118. package/dist/client/assets/{store-invite-eQ6O_LcC.js → store-invite-Bg3OdZwq.js} +1 -1
  119. package/dist/client/assets/{switch-7wa9WQCt.js → switch-sdaV-SJo.js} +1 -1
  120. package/dist/client/assets/{table-F_F9uG31.js → table-BxUix49E.js} +1 -1
  121. package/dist/client/assets/{tasks-Bo849zPQ.js → tasks-Bl2i_lGW.js} +1 -1
  122. package/dist/client/assets/{textarea-CX1AXmSo.js → textarea-BRJpMcB0.js} +1 -1
  123. package/dist/client/assets/{tools-list-CeBZ5K9_.js → tools-list-Cmzz8Wet.js} +1 -1
  124. package/dist/client/assets/{topbar-portal-DTnSGvrH.js → topbar-portal-bqTUj07t.js} +1 -1
  125. package/dist/client/assets/{typewriter-title-CydscG0b.js → typewriter-title-BPMIdq0b.js} +1 -1
  126. package/dist/client/assets/{use-binding-BIvDtNoa.js → use-binding-DMsO_03X.js} +1 -1
  127. package/dist/client/assets/{use-connection-DWpxH8iy.js → use-connection-B0740Saa.js} +1 -1
  128. package/dist/client/assets/{use-create-virtual-mcp-CMegJpH_.js → use-create-virtual-mcp-lh01_aoW.js} +1 -1
  129. package/dist/client/assets/{use-deco-chat-open-DeBMXnMx.js → use-deco-chat-open-B2KYtTue.js} +2 -2
  130. package/dist/client/assets/{use-install-from-registry-CNdLBCwL.js → use-install-from-registry-BjKzt3Pz.js} +1 -1
  131. package/dist/client/assets/{use-list-state-CqdwrHCA.js → use-list-state-DNfSCsX5.js} +1 -1
  132. package/dist/client/assets/{use-llm-B2BVGott.js → use-llm-D28vq8-j.js} +1 -1
  133. package/dist/client/assets/{use-mcp-prompts-CUow6VVK.js → use-mcp-prompts-FoVTG9k7.js} +1 -1
  134. package/dist/client/assets/{use-mcp-tools-DO_-llbI.js → use-mcp-tools-DF65_5AL.js} +1 -1
  135. package/dist/client/assets/{use-mobile-CqANtQ4e.js → use-mobile-Cu9U-yCu.js} +1 -1
  136. package/dist/client/assets/{use-organization-settings-ANLw4ex1.js → use-organization-settings-CPNBbiln.js} +1 -1
  137. package/dist/client/assets/{use-project-C1G7xlcy.js → use-project-CuNldV92.js} +1 -1
  138. package/dist/client/assets/{use-virtual-mcp-DaI2d98r.js → use-virtual-mcp-BUCuQhrG.js} +1 -1
  139. package/dist/client/assets/useInfiniteQuery-CsMrU_k5.js +1 -0
  140. package/dist/client/assets/{useMutation-M3-wug2Q.js → useMutation-Bnsod7M-.js} +1 -1
  141. package/dist/client/assets/useQuery-Bo6lCSyK.js +1 -0
  142. package/dist/client/assets/utils-Ckp7rFN8.js +1 -0
  143. package/dist/client/assets/{view-mode-toggle-JVmuLwXe.js → view-mode-toggle-4jMhv4Z3.js} +1 -1
  144. package/dist/client/assets/{workflow-BKKAfuJP.js → workflow-BrBoF9SG.js} +1 -1
  145. package/dist/client/index.html +1 -1
  146. package/dist/server/cli.js +152 -149
  147. package/dist/server/server.js +127 -124
  148. package/package.json +1 -1
  149. package/dist/client/assets/constants-gwxE8_b0.js +0 -1
  150. package/dist/client/assets/useInfiniteQuery-CL3o6Gdm.js +0 -1
  151. package/dist/client/assets/useQuery-jRtVXI31.js +0 -1
  152. package/dist/client/assets/utils-D1Qd9-I_.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as T,c as j,j as l,T as E,D as z,B as H,G as L,J as D,H as V,E as I}from"./index-HxeE9C0A.js";import{I as R}from"./input-DBGu1Yhi.js";import{i as A}from"./X-CixxHrye.js";import{c as b}from"./utils-D1Qd9-I_.js";import{i as M}from"./SearchMd-yRVgOeax.js";const O=({size:n=24,color:e="currentColor",...t})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},T.createElement("path",{d:"m22.7 13.5-2-2-2 2M21 12a9 9 0 1 1-1.245-4.57M12 7v5l3 2"}));O.displayName="ClockRewind";const B=({size:n=24,color:e="currentColor",...t})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},T.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));B.displayName="MessageChatSquare";function W(n){const e=j.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(n){const e=j.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Q(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(V,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function q(n){const e=j.c(17);let t,s,a,o;e[0]!==n?({className:s,children:t,side:o,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);const c=o===void 0?"right":o;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(Q,{}),e[5]=h):h=e[5];const d=c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",i=c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r=c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",v=c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let m;e[6]!==s||e[7]!==d||e[8]!==i||e[9]!==r||e[10]!==v?(m=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",d,i,r,v,s),e[6]=s,e[7]=d,e[8]=i,e[9]=r,e[10]=v,e[11]=m):m=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsxs(D,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[l.jsx(A,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=u):u=e[12];let f;return e[13]!==t||e[14]!==a||e[15]!==m?(f=l.jsxs(P,{children:[h,l.jsxs(z,{"data-slot":"sheet-content",className:m,...a,children:[t,u]})]}),e[13]=t,e[14]=a,e[15]=m,e[16]=f):f=e[16],f}function F(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function G(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(E,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function Y(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(I,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function _(n){const e=j.c(24),{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o,showHeader:c,showBackButton:h}=n,d=c===void 0?!0:c,i=h===void 0?!1:h,[r,v]=T.useState("");let m;e[0]!==r||e[1]!==t?(m=r.trim()?t.filter(p=>(p.title||"New chat").toLowerCase().includes(r.toLowerCase())):t,e[0]=r,e[1]=t,e[2]=m):m=e[2];const u=m;let f;e[3]!==o||e[4]!==a?(f=p=>{a(p),o&&o()},e[3]=o,e[4]=a,e[5]=f):f=e[5];const k=f;let y;e[6]!==o||e[7]!==i||e[8]!==d?(y=d&&l.jsxs("div",{className:"h-12 px-4 flex items-center justify-between border-b shrink-0",children:[l.jsx("span",{className:"text-sm font-medium",children:"Chat History"}),i&&l.jsx("button",{type:"button",onClick:o,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Back to chat"})]}),e[6]=o,e[7]=i,e[8]=d,e[9]=y):y=e[9];let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C=b("px-3 py-3 border-b","shrink-0"),e[10]=C):C=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(M,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[11]=S):S=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=p=>v(p.target.value),e[12]=g):g=e[12];let x;e[13]!==r?(x=l.jsx("div",{className:C,children:l.jsxs("div",{className:"relative",children:[S,l.jsx(R,{type:"text",placeholder:"Search conversations...",value:r,onChange:g,className:"pl-9 h-9 text-sm"})]})}),e[13]=r,e[14]=x):x=e[14];let w;e[15]!==s||e[16]!==u||e[17]!==k||e[18]!==r?(w=l.jsx("div",{className:"flex-1 overflow-y-auto",children:u.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 px-4 text-center",children:[l.jsx("div",{className:"size-12 rounded-full bg-muted/50 flex items-center justify-center",children:l.jsx(B,{size:24,className:"text-muted-foreground"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium text-foreground",children:r?"No results found":"No conversations yet"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:r?"Try a different search term":"Start a new chat to see your history here"})]})]}):l.jsx("div",{className:"flex flex-col py-2",children:u.map(p=>{const $=p.id===s;return l.jsx("button",{type:"button",onClick:()=>k(p.id),className:b("flex items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50",$&&"bg-accent/50"),children:l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:b("text-sm truncate",$?"font-medium text-foreground":"text-muted-foreground"),children:p.title||"New chat"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(p.updatedAt).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})},p.id)})})}),e[15]=s,e[16]=u,e[17]=k,e[18]=r,e[19]=w):w=e[19];let N;return e[20]!==w||e[21]!==y||e[22]!==x?(N=l.jsxs(l.Fragment,{children:[y,x,w]}),e[20]=w,e[21]=y,e[22]=x,e[23]=N):N=e[23],N}function ee(n){const e=j.c(9),{open:t,onOpenChange:s,threads:a,activeThreadId:o,onThreadSelect:c}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(F,{className:"h-12 px-4 flex flex-row items-center justify-between border-b shrink-0",children:l.jsx(G,{className:"text-sm font-medium",children:"Chat History"})}),e[0]=h):h=e[0];let d;e[1]!==o||e[2]!==c||e[3]!==a?(d=l.jsxs(q,{side:"right",className:"w-[320px] sm:w-[380px] p-0 flex flex-col",children:[h,l.jsx(_,{threads:a,activeThreadId:o,onThreadSelect:c,showHeader:!1})]}),e[1]=o,e[2]=c,e[3]=a,e[4]=d):d=e[4];let i;return e[5]!==s||e[6]!==t||e[7]!==d?(i=l.jsx(W,{open:t,onOpenChange:s,children:d}),e[5]=s,e[6]=t,e[7]=d,e[8]=i):i=e[8],i}function te(n){const e=j.c(5),{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o}=n;let c;return e[0]!==s||e[1]!==o||e[2]!==a||e[3]!==t?(c=l.jsx("div",{className:"flex flex-col h-full w-full bg-background",children:l.jsx(_,{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o,showBackButton:!0})}),e[0]=s,e[1]=o,e[2]=a,e[3]=t,e[4]=c):c=e[4],c}function se(n){const e=j.c(22),{text:t,className:s,speed:a}=n,o=s===void 0?"":s,c=a===void 0?30:a,[h,d]=T.useState(!1),i=t.length/c*1e3,r=t.length,v=`${t.length}ch`;let m;e[0]!==i?(m=()=>{d(!1);const p=setTimeout(()=>{d(!0)},i);return()=>clearTimeout(p)},e[0]=i,e[1]=m):m=e[1];let u;e[2]!==i||e[3]!==t?(u=[t,i],e[2]=i,e[3]=t,e[4]=u):u=e[4],T.useEffect(m,u);let f;e[5]!==o?(f=b(o,"block overflow-hidden inline-flex"),e[5]=o,e[6]=f):f=e[6];const k=`${i}ms`;let y;e[7]!==v||e[8]!==r||e[9]!==k?(y={"--typewriter-duration":k,"--typewriter-steps":r,"--typewriter-max-width":v},e[7]=v,e[8]=r,e[9]=k,e[10]=y):y=e[10];const C=y,S=h&&"truncate";let g;e[11]!==S?(g=b("typewriter-text",S),e[11]=S,e[12]=g):g=e[12];let x;e[13]!==g||e[14]!==t?(x=l.jsx("span",{className:g,children:t}),e[13]=g,e[14]=t,e[15]=x):x=e[15];let w;e[16]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx("style",{children:`
1
+ import{r as T,c as j,j as l,T as E,D as z,B as H,G as L,J as D,H as V,E as I}from"./index-BKpxPW_G.js";import{I as R}from"./input-lpAGMNlp.js";import{i as A}from"./X-CslJd5Ib.js";import{c as b}from"./utils-Ckp7rFN8.js";import{i as M}from"./SearchMd-BqVXNd65.js";const O=({size:n=24,color:e="currentColor",...t})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},T.createElement("path",{d:"m22.7 13.5-2-2-2 2M21 12a9 9 0 1 1-1.245-4.57M12 7v5l3 2"}));O.displayName="ClockRewind";const B=({size:n=24,color:e="currentColor",...t})=>T.createElement("svg",{viewBox:"0 0 24 24",width:n,height:n,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},T.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));B.displayName="MessageChatSquare";function W(n){const e=j.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(n){const e=j.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Q(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(V,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function q(n){const e=j.c(17);let t,s,a,o;e[0]!==n?({className:s,children:t,side:o,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);const c=o===void 0?"right":o;let h;e[5]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(Q,{}),e[5]=h):h=e[5];const d=c==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",i=c==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r=c==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",v=c==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let m;e[6]!==s||e[7]!==d||e[8]!==i||e[9]!==r||e[10]!==v?(m=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",d,i,r,v,s),e[6]=s,e[7]=d,e[8]=i,e[9]=r,e[10]=v,e[11]=m):m=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsxs(D,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[l.jsx(A,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=u):u=e[12];let f;return e[13]!==t||e[14]!==a||e[15]!==m?(f=l.jsxs(P,{children:[h,l.jsxs(z,{"data-slot":"sheet-content",className:m,...a,children:[t,u]})]}),e[13]=t,e[14]=a,e[15]=m,e[16]=f):f=e[16],f}function F(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function G(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(E,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function Y(n){const e=j.c(8);let t,s;e[0]!==n?({className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=l.jsx(I,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function _(n){const e=j.c(24),{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o,showHeader:c,showBackButton:h}=n,d=c===void 0?!0:c,i=h===void 0?!1:h,[r,v]=T.useState("");let m;e[0]!==r||e[1]!==t?(m=r.trim()?t.filter(p=>(p.title||"New chat").toLowerCase().includes(r.toLowerCase())):t,e[0]=r,e[1]=t,e[2]=m):m=e[2];const u=m;let f;e[3]!==o||e[4]!==a?(f=p=>{a(p),o&&o()},e[3]=o,e[4]=a,e[5]=f):f=e[5];const k=f;let y;e[6]!==o||e[7]!==i||e[8]!==d?(y=d&&l.jsxs("div",{className:"h-12 px-4 flex items-center justify-between border-b shrink-0",children:[l.jsx("span",{className:"text-sm font-medium",children:"Chat History"}),i&&l.jsx("button",{type:"button",onClick:o,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Back to chat"})]}),e[6]=o,e[7]=i,e[8]=d,e[9]=y):y=e[9];let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C=b("px-3 py-3 border-b","shrink-0"),e[10]=C):C=e[10];let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(M,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e[11]=S):S=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=p=>v(p.target.value),e[12]=g):g=e[12];let x;e[13]!==r?(x=l.jsx("div",{className:C,children:l.jsxs("div",{className:"relative",children:[S,l.jsx(R,{type:"text",placeholder:"Search conversations...",value:r,onChange:g,className:"pl-9 h-9 text-sm"})]})}),e[13]=r,e[14]=x):x=e[14];let w;e[15]!==s||e[16]!==u||e[17]!==k||e[18]!==r?(w=l.jsx("div",{className:"flex-1 overflow-y-auto",children:u.length===0?l.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 px-4 text-center",children:[l.jsx("div",{className:"size-12 rounded-full bg-muted/50 flex items-center justify-center",children:l.jsx(B,{size:24,className:"text-muted-foreground"})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium text-foreground",children:r?"No results found":"No conversations yet"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:r?"Try a different search term":"Start a new chat to see your history here"})]})]}):l.jsx("div",{className:"flex flex-col py-2",children:u.map(p=>{const $=p.id===s;return l.jsx("button",{type:"button",onClick:()=>k(p.id),className:b("flex items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent/50",$&&"bg-accent/50"),children:l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:b("text-sm truncate",$?"font-medium text-foreground":"text-muted-foreground"),children:p.title||"New chat"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(p.updatedAt).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})},p.id)})})}),e[15]=s,e[16]=u,e[17]=k,e[18]=r,e[19]=w):w=e[19];let N;return e[20]!==w||e[21]!==y||e[22]!==x?(N=l.jsxs(l.Fragment,{children:[y,x,w]}),e[20]=w,e[21]=y,e[22]=x,e[23]=N):N=e[23],N}function ee(n){const e=j.c(9),{open:t,onOpenChange:s,threads:a,activeThreadId:o,onThreadSelect:c}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx(F,{className:"h-12 px-4 flex flex-row items-center justify-between border-b shrink-0",children:l.jsx(G,{className:"text-sm font-medium",children:"Chat History"})}),e[0]=h):h=e[0];let d;e[1]!==o||e[2]!==c||e[3]!==a?(d=l.jsxs(q,{side:"right",className:"w-[320px] sm:w-[380px] p-0 flex flex-col",children:[h,l.jsx(_,{threads:a,activeThreadId:o,onThreadSelect:c,showHeader:!1})]}),e[1]=o,e[2]=c,e[3]=a,e[4]=d):d=e[4];let i;return e[5]!==s||e[6]!==t||e[7]!==d?(i=l.jsx(W,{open:t,onOpenChange:s,children:d}),e[5]=s,e[6]=t,e[7]=d,e[8]=i):i=e[8],i}function te(n){const e=j.c(5),{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o}=n;let c;return e[0]!==s||e[1]!==o||e[2]!==a||e[3]!==t?(c=l.jsx("div",{className:"flex flex-col h-full w-full bg-background",children:l.jsx(_,{threads:t,activeThreadId:s,onThreadSelect:a,onClose:o,showBackButton:!0})}),e[0]=s,e[1]=o,e[2]=a,e[3]=t,e[4]=c):c=e[4],c}function se(n){const e=j.c(22),{text:t,className:s,speed:a}=n,o=s===void 0?"":s,c=a===void 0?30:a,[h,d]=T.useState(!1),i=t.length/c*1e3,r=t.length,v=`${t.length}ch`;let m;e[0]!==i?(m=()=>{d(!1);const p=setTimeout(()=>{d(!0)},i);return()=>clearTimeout(p)},e[0]=i,e[1]=m):m=e[1];let u;e[2]!==i||e[3]!==t?(u=[t,i],e[2]=i,e[3]=t,e[4]=u):u=e[4],T.useEffect(m,u);let f;e[5]!==o?(f=b(o,"block overflow-hidden inline-flex"),e[5]=o,e[6]=f):f=e[6];const k=`${i}ms`;let y;e[7]!==v||e[8]!==r||e[9]!==k?(y={"--typewriter-duration":k,"--typewriter-steps":r,"--typewriter-max-width":v},e[7]=v,e[8]=r,e[9]=k,e[10]=y):y=e[10];const C=y,S=h&&"truncate";let g;e[11]!==S?(g=b("typewriter-text",S),e[11]=S,e[12]=g):g=e[12];let x;e[13]!==g||e[14]!==t?(x=l.jsx("span",{className:g,children:t}),e[13]=g,e[14]=t,e[15]=x):x=e[15];let w;e[16]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx("style",{children:`
2
2
  .typewriter-text {
3
3
  display: inline-block;
4
4
  width: 0;
@@ -1,4 +1,4 @@
1
- import{a as v}from"./binder-xcUkLvPC.js";import{b8 as T,Q as O,o as t,s as e,b9 as p,aj as l,ba as c,bb as R,bc as U,bd as i,ak as x,be as u,bf as g,bg as n,bh as b,bi as L,bj as B,bk as C}from"./index-HxeE9C0A.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),l(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),H=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:l(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:H.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:c().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),Q=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:c().optional().describe("Additional provider-specific metadata")})]),Y=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Z=t({role:n("user"),content:l(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:l(u([E,k,J,V,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:l(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Y,Z,ee,te]),ae=l(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:l(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:c().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:l(c()).optional().describe("The tools that are available for the model"),toolChoice:c().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:c().optional().describe("Abort signal for cancelling the operation"),providerOptions:c().optional().describe("Additional provider-specific options")}),ne=t({content:l(u([q,$,K,z,X,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:U({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:c().optional().describe("Additional provider-specific metadata"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:R().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:c().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:l(c()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:c().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),l(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:l(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
1
+ import{a as v}from"./binder-Jddq1y1v.js";import{b8 as T,Q as O,o as t,s as e,b9 as p,aj as l,ba as c,bb as R,bc as U,bd as i,ak as x,be as u,bf as g,bg as n,bh as b,bi as L,bj as B,bk as C}from"./index-BKpxPW_G.js";const W=O.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),F=T("assistant",W),G=[...F],w=L(()=>u([B(),e(),i(),g(),p(e(),w),l(w)])),f=p(e(),p(e(),w)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:f}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),j=e().describe("File data as URL string"),k=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:j,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:f}),$=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),J=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:f}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),V=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:f}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:g().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),H=u([t({type:n("text"),value:e()}),t({type:n("json"),value:w}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:w}),t({type:n("content"),value:l(u([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))})]),A=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:H.describe("Result of the tool call"),result:b().describe("Unknown result of the tool call"),providerOptions:f}),X=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:c().describe("Result of the tool call (JSON-serializable)"),isError:g().optional().describe("Whether the result is an error or error message"),providerExecuted:g().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),Q=u([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:c().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:c().optional().describe("Additional provider-specific metadata")})]),Y=t({role:n("system"),content:e().describe("System message content"),providerOptions:f}),Z=t({role:n("user"),content:l(u([E,k])).describe("User message content parts (text or file)"),providerOptions:f}),ee=t({role:n("assistant"),content:l(u([E,k,J,V,A])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:f}),te=t({role:n("tool"),content:l(A).describe("Tool message content (tool results)"),providerOptions:f}),oe=u([Y,Z,ee,te]),ae=l(oe).describe("A list of messages forming the prompt"),ie=t({prompt:ae.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:l(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:u([t({type:n("text")}),t({type:n("json"),schema:c().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:l(c()).optional().describe("The tools that are available for the model"),toolChoice:c().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:g().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:c().optional().describe("Abort signal for cancelling the operation"),providerOptions:c().optional().describe("Additional provider-specific options")}),ne=t({content:l(u([q,$,K,z,X,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:x(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:U({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:c().optional().describe("Additional provider-specific metadata"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:R().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:p(e(),e()).optional().describe("Response headers"),body:c().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:l(c()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:c().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:c().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:p(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const se=t({supportedUrls:p(e(),l(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const N=t({modelId:e().describe("The ID of the model"),callOptions:ie}),re=O.extend({logo:e().nullable(),description:e().nullable(),capabilities:l(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:x(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),le=T("llm",re,{readOnly:!0}),ce=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:se},{name:"LLM_DO_STREAM",inputSchema:N,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:N,outputSchema:ne},...le],de=t({scopes:l(e()).describe("List of scopes available"),stateSchema:p(e(),b()).describe("JSON Schema (draft-07) defining the state structure")}),pe=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:de}],ue=t({toolName:e().describe("Name of the tool to invoke on that connection"),transformCode:e().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),me=t({code:e().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
2
2
  The input is the resolved value of the references in the input field. Example:
3
3
  {
4
4
  "input": {
@@ -1 +1 @@
1
- import{y as P,c as w,z as Q,t as h,u as v}from"./index-HxeE9C0A.js";import{u as F}from"./useMutation-M3-wug2Q.js";import{K as x,a as q,u as U}from"./constants-BEco_-y7.js";function b(o,n,s){const e=[];if(o?.trim()){const t=o.trim(),r=s.map(a=>({field:[String(a)],operator:"contains",value:t}));r.length===1&&r[0]?e.push(r[0]):r.length>1&&e.push({operator:"or",conditions:r})}if(n&&n.length>0)for(const t of n)e.push({field:[t.column],operator:"eq",value:t.value});if(e.length!==0)return e.length===1?e[0]:{operator:"and",conditions:e}}function D(o,n,s){const e=o??s,t=n??"asc";return[{field:[String(e)],direction:t}]}function I(o){if(!o||typeof o!="object")throw new Error("Invalid result");if("isError"in o&&o.isError)throw new Error("content"in o&&Array.isArray(o.content)&&o.content[0]?.type==="text"?o.content[0].text:"Unknown error");if("structuredContent"in o)return o.structuredContent;throw new Error("No structured content found")}function k(o,n,s,e){const t=w.c(13);let r;t[0]!==n?(r=n.toUpperCase(),t[0]=n,t[1]=r):r=t[1];const i=`COLLECTION_${r}_GET`;let c;t[2]!==e||t[3]!==i||t[4]!==s?(c=x.mcpToolCall(e,i,s??""),t[2]=e,t[3]=i,t[4]=s,t[5]=c):c=t[5];let l;t[6]!==e||t[7]!==i||t[8]!==s?(l=async()=>{if(!s)return{item:null};const p=await e.callTool({name:i,arguments:{id:s}});return I(p)},t[6]=e,t[7]=i,t[8]=s,t[9]=l):l=t[9];let d;t[10]!==c||t[11]!==l?(d={queryKey:c,queryFn:l,staleTime:6e4},t[10]=c,t[11]=l,t[12]=d):d=t[12];const{data:f}=P(d);return f?.item??null}const z={structuredContent:{items:[]},isError:!1};function B(o,n,s,e={}){const{searchTerm:t,filters:r,sortKey:a,sortDirection:i,searchFields:c=["title","description"],defaultSortKey:l="updated_at",pageSize:d=100}=e,p=`COLLECTION_${n.toUpperCase()}_LIST`,m=b(t,r,c),y=D(a,i,l),E={...m&&{where:m},...y&&{orderBy:y},limit:d,offset:0},C=JSON.stringify(E),g=x.mcpToolCall(s,p,C),{data:N}=P({queryKey:g,queryFn:async()=>s?await s.callTool({name:p,arguments:E}):z,staleTime:3e4,retry:!1,select:S=>I(S??{})?.items??[]});return N}function X(o,n,s,e={}){const{searchTerm:t,filters:r,sortKey:a,sortDirection:i,searchFields:c=["title","description"],defaultSortKey:l="updated_at",pageSize:d=100}=e,p=`COLLECTION_${n.toUpperCase()}_LIST`,m=b(t,r,c),y=D(a,i,l),E={...m&&{where:m},...y&&{orderBy:y},limit:d,offset:0},C=JSON.stringify(E);return x.mcpToolCall(o,p,C)}function R(o,n,s){const e=w.c(33),t=Q();let r;e[0]!==n?(r=n.toUpperCase(),e[0]=n,e[1]=r):r=e[1];const a=r,i=`COLLECTION_${a}_CREATE`,c=`COLLECTION_${a}_UPDATE`,l=`COLLECTION_${a}_DELETE`;let d;e[2]!==t||e[3]!==a?(d=()=>{t.invalidateQueries({predicate:_=>{const u=_.queryKey;if(u[0]!=="mcp"||u[1]!=="client"||u[3]!=="tool-call")return!1;const L=u[4];return typeof L=="string"&&L.startsWith(`COLLECTION_${a}_`)}})},e[2]=t,e[3]=a,e[4]=d):d=e[4];const f=d;let p;e[5]!==s||e[6]!==i?(p=async _=>{const u=await s.callTool({name:i,arguments:{data:_}});if(u.isError)throw new Error(Array.isArray(u.content)?u.content[0]?.text:String(u.content));return I(u).item},e[5]=s,e[6]=i,e[7]=p):p=e[7];let m;e[8]!==f?(m=()=>{f(),h.success("Item created successfully")},e[8]=f,e[9]=m):m=e[9];let y;e[10]!==p||e[11]!==m?(y={mutationFn:p,onSuccess:m,onError:W},e[10]=p,e[11]=m,e[12]=y):y=e[12];const E=F(y);let C;e[13]!==s||e[14]!==c?(C=async _=>{const{id:u,data:L}=_,M=await s.callTool({name:c,arguments:{id:u,data:L}});return I(M).item},e[13]=s,e[14]=c,e[15]=C):C=e[15];let g;e[16]!==f?(g=()=>{f(),h.success("Item updated successfully")},e[16]=f,e[17]=g):g=e[17];let N;e[18]!==C||e[19]!==g?(N={mutationFn:C,onSuccess:g,onError:J},e[18]=C,e[19]=g,e[20]=N):N=e[20];const S=F(N);let T;e[21]!==s||e[22]!==l?(T=async _=>{const u=await s.callTool({name:l,arguments:{id:_}});return I(u).item.id},e[21]=s,e[22]=l,e[23]=T):T=e[23];let O;e[24]!==f?(O=()=>{f(),h.success("Item deleted successfully")},e[24]=f,e[25]=O):O=e[25];let K;e[26]!==T||e[27]!==O?(K={mutationFn:T,onSuccess:O,onError:j},e[26]=T,e[27]=O,e[28]=K):K=e[28];const A=F(K);let $;return e[29]!==E||e[30]!==A||e[31]!==S?($={create:E,update:S,delete:A},e[29]=E,e[30]=A,e[31]=S,e[32]=$):$=e[32],$}function j(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to delete item: ${n}`)}function J(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to update item: ${n}`)}function W(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to create item: ${n}`)}function Z(o){const n=w.c(4);let s;n[0]!==o?(s=o===void 0?{}:o,n[0]=o,n[1]=s):s=n[1];const e=s,{org:t}=v();let r;n[2]!==t.id?(r={connectionId:q,orgId:t.id},n[2]=t.id,n[3]=r):r=n[3];const a=U(r);return B(t.id,"CONNECTIONS",a,e)}function ee(o){const n=w.c(2),{org:s}=v();let e;n[0]!==s.id?(e={connectionId:q,orgId:s.id},n[0]=s.id,n[1]=e):e=n[1];const t=U(e);return k(s.id,"CONNECTIONS",o,t)}function te(){const o=w.c(2),{org:n}=v();let s;o[0]!==n.id?(s={connectionId:q,orgId:n.id},o[0]=n.id,o[1]=s):s=o[1];const e=U(s);return R(n.id,"CONNECTIONS",e)}export{z as E,D as a,X as b,b as c,k as d,B as e,ee as f,te as g,Z as h,R as u};
1
+ import{y as P,c as w,z as Q,t as h,u as v}from"./index-BKpxPW_G.js";import{u as F}from"./useMutation-Bnsod7M-.js";import{K as x,a as q,u as U}from"./constants-DisdEZ3l.js";function b(o,n,s){const e=[];if(o?.trim()){const t=o.trim(),r=s.map(a=>({field:[String(a)],operator:"contains",value:t}));r.length===1&&r[0]?e.push(r[0]):r.length>1&&e.push({operator:"or",conditions:r})}if(n&&n.length>0)for(const t of n)e.push({field:[t.column],operator:"eq",value:t.value});if(e.length!==0)return e.length===1?e[0]:{operator:"and",conditions:e}}function D(o,n,s){const e=o??s,t=n??"asc";return[{field:[String(e)],direction:t}]}function I(o){if(!o||typeof o!="object")throw new Error("Invalid result");if("isError"in o&&o.isError)throw new Error("content"in o&&Array.isArray(o.content)&&o.content[0]?.type==="text"?o.content[0].text:"Unknown error");if("structuredContent"in o)return o.structuredContent;throw new Error("No structured content found")}function k(o,n,s,e){const t=w.c(13);let r;t[0]!==n?(r=n.toUpperCase(),t[0]=n,t[1]=r):r=t[1];const i=`COLLECTION_${r}_GET`;let c;t[2]!==e||t[3]!==i||t[4]!==s?(c=x.mcpToolCall(e,i,s??""),t[2]=e,t[3]=i,t[4]=s,t[5]=c):c=t[5];let l;t[6]!==e||t[7]!==i||t[8]!==s?(l=async()=>{if(!s)return{item:null};const p=await e.callTool({name:i,arguments:{id:s}});return I(p)},t[6]=e,t[7]=i,t[8]=s,t[9]=l):l=t[9];let d;t[10]!==c||t[11]!==l?(d={queryKey:c,queryFn:l,staleTime:6e4},t[10]=c,t[11]=l,t[12]=d):d=t[12];const{data:f}=P(d);return f?.item??null}const z={structuredContent:{items:[]},isError:!1};function B(o,n,s,e={}){const{searchTerm:t,filters:r,sortKey:a,sortDirection:i,searchFields:c=["title","description"],defaultSortKey:l="updated_at",pageSize:d=100}=e,p=`COLLECTION_${n.toUpperCase()}_LIST`,m=b(t,r,c),y=D(a,i,l),E={...m&&{where:m},...y&&{orderBy:y},limit:d,offset:0},C=JSON.stringify(E),g=x.mcpToolCall(s,p,C),{data:N}=P({queryKey:g,queryFn:async()=>s?await s.callTool({name:p,arguments:E}):z,staleTime:3e4,retry:!1,select:S=>I(S??{})?.items??[]});return N}function X(o,n,s,e={}){const{searchTerm:t,filters:r,sortKey:a,sortDirection:i,searchFields:c=["title","description"],defaultSortKey:l="updated_at",pageSize:d=100}=e,p=`COLLECTION_${n.toUpperCase()}_LIST`,m=b(t,r,c),y=D(a,i,l),E={...m&&{where:m},...y&&{orderBy:y},limit:d,offset:0},C=JSON.stringify(E);return x.mcpToolCall(o,p,C)}function R(o,n,s){const e=w.c(33),t=Q();let r;e[0]!==n?(r=n.toUpperCase(),e[0]=n,e[1]=r):r=e[1];const a=r,i=`COLLECTION_${a}_CREATE`,c=`COLLECTION_${a}_UPDATE`,l=`COLLECTION_${a}_DELETE`;let d;e[2]!==t||e[3]!==a?(d=()=>{t.invalidateQueries({predicate:_=>{const u=_.queryKey;if(u[0]!=="mcp"||u[1]!=="client"||u[3]!=="tool-call")return!1;const L=u[4];return typeof L=="string"&&L.startsWith(`COLLECTION_${a}_`)}})},e[2]=t,e[3]=a,e[4]=d):d=e[4];const f=d;let p;e[5]!==s||e[6]!==i?(p=async _=>{const u=await s.callTool({name:i,arguments:{data:_}});if(u.isError)throw new Error(Array.isArray(u.content)?u.content[0]?.text:String(u.content));return I(u).item},e[5]=s,e[6]=i,e[7]=p):p=e[7];let m;e[8]!==f?(m=()=>{f(),h.success("Item created successfully")},e[8]=f,e[9]=m):m=e[9];let y;e[10]!==p||e[11]!==m?(y={mutationFn:p,onSuccess:m,onError:W},e[10]=p,e[11]=m,e[12]=y):y=e[12];const E=F(y);let C;e[13]!==s||e[14]!==c?(C=async _=>{const{id:u,data:L}=_,M=await s.callTool({name:c,arguments:{id:u,data:L}});return I(M).item},e[13]=s,e[14]=c,e[15]=C):C=e[15];let g;e[16]!==f?(g=()=>{f(),h.success("Item updated successfully")},e[16]=f,e[17]=g):g=e[17];let N;e[18]!==C||e[19]!==g?(N={mutationFn:C,onSuccess:g,onError:J},e[18]=C,e[19]=g,e[20]=N):N=e[20];const S=F(N);let T;e[21]!==s||e[22]!==l?(T=async _=>{const u=await s.callTool({name:l,arguments:{id:_}});return I(u).item.id},e[21]=s,e[22]=l,e[23]=T):T=e[23];let O;e[24]!==f?(O=()=>{f(),h.success("Item deleted successfully")},e[24]=f,e[25]=O):O=e[25];let K;e[26]!==T||e[27]!==O?(K={mutationFn:T,onSuccess:O,onError:j},e[26]=T,e[27]=O,e[28]=K):K=e[28];const A=F(K);let $;return e[29]!==E||e[30]!==A||e[31]!==S?($={create:E,update:S,delete:A},e[29]=E,e[30]=A,e[31]=S,e[32]=$):$=e[32],$}function j(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to delete item: ${n}`)}function J(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to update item: ${n}`)}function W(o){const n=o instanceof Error?o.message:String(o);h.error(`Failed to create item: ${n}`)}function Z(o){const n=w.c(4);let s;n[0]!==o?(s=o===void 0?{}:o,n[0]=o,n[1]=s):s=n[1];const e=s,{org:t}=v();let r;n[2]!==t.id?(r={connectionId:q,orgId:t.id},n[2]=t.id,n[3]=r):r=n[3];const a=U(r);return B(t.id,"CONNECTIONS",a,e)}function ee(o){const n=w.c(2),{org:s}=v();let e;n[0]!==s.id?(e={connectionId:q,orgId:s.id},n[0]=s.id,n[1]=e):e=n[1];const t=U(e);return k(s.id,"CONNECTIONS",o,t)}function te(){const o=w.c(2),{org:n}=v();let s;o[0]!==n.id?(s={connectionId:q,orgId:n.id},o[0]=n.id,o[1]=s):s=o[1];const e=U(s);return R(n.id,"CONNECTIONS",e)}export{z as E,D as a,X as b,b as c,k as d,B as e,ee as f,te as g,Z as h,R as u};
@@ -1 +1 @@
1
- import{c as p,u as m,m as C,O as f}from"./index-HxeE9C0A.js";import{a as v}from"./use-virtual-mcp-DaI2d98r.js";function M(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:l}=d,o=l===void 0?!1:l,{org:r}=m(),c=C(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const g=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:f,agentId:g.id}}),{id:g.id,virtualMcp:g}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{M as u};
1
+ import{c as p,u as m,m as C,O as f}from"./index-BKpxPW_G.js";import{a as v}from"./use-virtual-mcp-BUCuQhrG.js";function M(s){const e=p.c(10);let a;e[0]!==s?(a=s===void 0?{}:s,e[0]=s,e[1]=a):a=e[1];const d=a,{navigateOnCreate:l}=d,o=l===void 0?!1:l,{org:r}=m(),c=C(),t=v();let n;e[2]!==t.create||e[3]!==c||e[4]!==o||e[5]!==r?(n=async()=>{const g=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",connections:[]});return o&&c({to:"/$org/$project/agents/$agentId",params:{org:r.slug,project:f,agentId:g.id}}),{id:g.id,virtualMcp:g}},e[2]=t.create,e[3]=c,e[4]=o,e[5]=r,e[6]=n):n=e[6];const u=n;let i;return e[7]!==t.create.isPending||e[8]!==u?(i={createVirtualMCP:u,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=u,e[9]=i):i=e[9],i}export{M as u};
@@ -1,10 +1,10 @@
1
- import{r as S,bu as ts,bv as as,M as ss,be as B,s as b,bw as qe,bx as ca,bi as rs,bj as os,bd as ns,bf as z,b9 as Ie,aj as Te,o as R,bg as I,bh as ie,by as is,bz as O,ak as ls,b4 as cs,c as k,u as xe,K as Ae,a as da,z as xt,t as bt,j as d,g as ds,am as us,a3 as _t,at as ps,an as ms,aq as fs,av as hs,al as gs,a$ as vs}from"./index-HxeE9C0A.js";import{u as Et,a as It,d as ys}from"./constants-BEco_-y7.js";import{b as xs}from"./use-virtual-mcp-DaI2d98r.js";import{a as bs,u as St}from"./use-llm-B2BVGott.js";import{u as _s}from"./useQuery-jRtVXI31.js";import{b as wt,c as Es,a as Is,e as Ss}from"./use-connection-DWpxH8iy.js";import{u as ws}from"./Code01-DeVT5m93.js";import{u as Se,L as We}from"./localstorage-keys-BxVB7BFB.js";import{B as ua}from"./button-C1iesapY.js";import{I as Ns}from"./input-DBGu1Yhi.js";import{P as Cs,a as Ts,b as As}from"./popover-BbAo_V3q.js";import{S as Ms,a as js,b as Rs,c as Ps,d as ks}from"./select-CnIfeZ9k.js";import{c as Nt}from"./utils-D1Qd9-I_.js";import{E as pa,i as Os}from"./error-boundary-BGFWaL1J.js";import{t as dt}from"./ChevronDown-jAfIG9nZ.js";import{i as Ds}from"./File06-BUOJeS0C.js";import{c as $s}from"./Grid01-BhCIE3UE.js";import{a as Ls}from"./Image01-Bmljn0R6.js";import{s as Zs}from"./RefreshCcw01-Dzlid7sh.js";import{i as ma}from"./SearchMd-yRVgOeax.js";var we;(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})(we||(we={}));var Ft;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ft||(Ft={}));we.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);we.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 He 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 He))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,we.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()}}He.create=t=>new He(t);var Ut;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ut||(Ut={}));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 Fs=({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"}));Fs.displayName="ArrowsRight";const fa=({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"}));fa.displayName="ChevronSelectorVertical";const ha=({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"}));ha.displayName="CurrencyDollar";const Us=({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"}));Us.displayName="Lightbulb02";const ga=({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"}));ga.displayName="LogOut04";const va=({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"}));va.displayName="Stars01";var ya="vercel.ai.error",zs=Symbol.for(ya),zt,Bt,te=class xa extends(Bt=Error,zt=zs,Bt){constructor({name:e,message:a,cause:s}){super(a),this[zt]=!0,this.name=e,this.cause=s}static isInstance(e){return xa.hasMarker(e,ya)}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 ba(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var _a="AI_InvalidArgumentError",Ea=`vercel.ai.error.${_a}`,Bs=Symbol.for(Ea),Vt,qt,Vs=class extends(qt=te,Vt=Bs,qt){constructor({message:t,cause:e,argument:a}){super({name:_a,message:t,cause:e}),this[Vt]=!0,this.argument=a}static isInstance(t){return te.hasMarker(t,Ea)}},Ia="AI_JSONParseError",Sa=`vercel.ai.error.${Ia}`,qs=Symbol.for(Sa),Ht,Wt,Jt=class extends(Wt=te,Ht=qs,Wt){constructor({text:t,cause:e}){super({name:Ia,message:`JSON parsing failed: Text: ${t}.
1
+ import{r as S,bu as ts,bv as as,M as ss,be as B,s as b,bw as qe,bx as ca,bi as rs,bj as os,bd as ns,bf as z,b9 as Ie,aj as Te,o as R,bg as I,bh as ie,by as is,bz as O,ak as ls,b4 as cs,c as k,u as xe,K as Ae,a as da,z as xt,t as bt,j as d,g as ds,am as us,a3 as _t,at as ps,an as ms,aq as fs,av as hs,al as gs,a$ as vs}from"./index-BKpxPW_G.js";import{u as Et,a as It,d as ys}from"./constants-DisdEZ3l.js";import{b as xs}from"./use-virtual-mcp-BUCuQhrG.js";import{a as bs,u as St}from"./use-llm-D28vq8-j.js";import{u as _s}from"./useQuery-Bo6lCSyK.js";import{b as wt,c as Es,a as Is,e as Ss}from"./use-connection-B0740Saa.js";import{u as ws}from"./Code01-7hV4ZDjZ.js";import{u as Se,L as We}from"./localstorage-keys-CrJngaoW.js";import{B as ua}from"./button-D_OpQIQm.js";import{I as Ns}from"./input-lpAGMNlp.js";import{P as Cs,a as Ts,b as As}from"./popover-ESVk6nXT.js";import{S as Ms,a as js,b as Rs,c as Ps,d as ks}from"./select-BbzYJ4VF.js";import{c as Nt}from"./utils-Ckp7rFN8.js";import{E as pa,i as Os}from"./error-boundary-BMH0CjEH.js";import{t as dt}from"./ChevronDown-DY4fpd0G.js";import{i as Ds}from"./File06-888BgyfZ.js";import{c as $s}from"./Grid01-CfSiTcO8.js";import{a as Ls}from"./Image01-BUR65REQ.js";import{s as Zs}from"./RefreshCcw01-B1tus5Lj.js";import{i as ma}from"./SearchMd-BqVXNd65.js";var we;(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})(we||(we={}));var Ft;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ft||(Ft={}));we.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);we.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 He 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 He))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,we.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()}}He.create=t=>new He(t);var Ut;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ut||(Ut={}));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 Fs=({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"}));Fs.displayName="ArrowsRight";const fa=({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"}));fa.displayName="ChevronSelectorVertical";const ha=({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"}));ha.displayName="CurrencyDollar";const Us=({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"}));Us.displayName="Lightbulb02";const ga=({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"}));ga.displayName="LogOut04";const va=({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"}));va.displayName="Stars01";var ya="vercel.ai.error",zs=Symbol.for(ya),zt,Bt,te=class xa extends(Bt=Error,zt=zs,Bt){constructor({name:e,message:a,cause:s}){super(a),this[zt]=!0,this.name=e,this.cause=s}static isInstance(e){return xa.hasMarker(e,ya)}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 ba(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var _a="AI_InvalidArgumentError",Ea=`vercel.ai.error.${_a}`,Bs=Symbol.for(Ea),Vt,qt,Vs=class extends(qt=te,Vt=Bs,qt){constructor({message:t,cause:e,argument:a}){super({name:_a,message:t,cause:e}),this[Vt]=!0,this.argument=a}static isInstance(t){return te.hasMarker(t,Ea)}},Ia="AI_JSONParseError",Sa=`vercel.ai.error.${Ia}`,qs=Symbol.for(Sa),Ht,Wt,Jt=class extends(Wt=te,Ht=qs,Wt){constructor({text:t,cause:e}){super({name:Ia,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${ba(e)}`,cause:e}),this[Ht]=!0,this.text=t}static isInstance(t){return te.hasMarker(t,Sa)}},wa="AI_TypeValidationError",Na=`vercel.ai.error.${wa}`,Hs=Symbol.for(Na),Gt,Yt,ye=class ut extends(Yt=te,Gt=Hs,Yt){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:wa,message:`${r}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${ba(a)}`,cause:a}),this[Gt]=!0,this.value=e,this.context=s}static isInstance(e){return te.hasMarker(e,Na)}static wrap({value:e,cause:a,context:s}){var r,o,i;return ut.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 ut({value:e,cause:a,context:s})}},Me=({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 Vs({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${a}".`});return()=>`${t}${s}${r()}`},Ws=Me();function Qt(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 me(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 Xt(t,...e){const a=new Headers(me(t)),s=a.get("user-agent")||"";return a.set("user-agent",[s,...e].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var Js=/"__proto__"\s*:/,Gs=/"constructor"\s*:/;function Kt(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Js.test(t)===!1&&Gs.test(t)===!1?e:Ys(e)}function Ys(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 Qs(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Kt(t)}try{return Kt(t)}finally{Error.stackTraceLimit=e}}function Ct(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]=pe(a[s])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(pe):pe(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(pe)),t.allOf!=null&&(t.allOf=t.allOf.map(pe)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(pe));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=pe(e[a]);return t}function pe(t){return typeof t=="boolean"?t:Ct(t)}var Xs=Symbol("Let zodToJsonSchema decide on which parser to use"),ea={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"},Ks=t=>typeof t=="string"?{...ea,name:t}:{...ea,...t};function V(){return{}}function er(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=j(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 tr(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 ar(){return{type:"boolean"}}function Ca(t,e){return j(t.type._def,e)}var sr=(t,e)=>j(t.innerType._def,e);function Ta(t,e,a){const s=a??e.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((r,o)=>Ta(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 rr(t)}}var rr=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 or(t,e){return{...j(t.innerType._def,e),default:t.defaultValue()}}function nr(t,e){return e.effectStrategy==="input"?j(t.schema._def,e):V()}function ir(t){return{type:"string",enum:Array.from(t.values)}}var lr=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function cr(t,e){const a=[j(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),j(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),s=[];return a.forEach(r=>{if(lr(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 dr(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 it=void 0,G={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:()=>(it===void 0&&(it=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),it),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 Aa(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":Y(a,"email",s.message,e);break;case"format:idn-email":Y(a,"idn-email",s.message,e);break;case"pattern:zod":U(a,G.email,s.message,e);break}break;case"url":Y(a,"uri",s.message,e);break;case"uuid":Y(a,"uuid",s.message,e);break;case"regex":U(a,s.regex,s.message,e);break;case"cuid":U(a,G.cuid,s.message,e);break;case"cuid2":U(a,G.cuid2,s.message,e);break;case"startsWith":U(a,RegExp(`^${lt(s.value,e)}`),s.message,e);break;case"endsWith":U(a,RegExp(`${lt(s.value,e)}$`),s.message,e);break;case"datetime":Y(a,"date-time",s.message,e);break;case"date":Y(a,"date",s.message,e);break;case"time":Y(a,"time",s.message,e);break;case"duration":Y(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":{U(a,RegExp(lt(s.value,e)),s.message,e);break}case"ip":{s.version!=="v6"&&Y(a,"ipv4",s.message,e),s.version!=="v4"&&Y(a,"ipv6",s.message,e);break}case"base64url":U(a,G.base64url,s.message,e);break;case"jwt":U(a,G.jwt,s.message,e);break;case"cidr":{s.version!=="v6"&&U(a,G.ipv4Cidr,s.message,e),s.version!=="v4"&&U(a,G.ipv6Cidr,s.message,e);break}case"emoji":U(a,G.emoji(),s.message,e);break;case"ulid":{U(a,G.ulid,s.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Y(a,"binary",s.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{U(a,G.base64,s.message,e);break}}break}case"nanoid":U(a,G.nanoid,s.message,e)}return a}function lt(t,e){return e.patternStrategy==="escape"?pr(t):t}var ur=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function pr(t){let e="";for(let a=0;a<t.length;a++)ur.has(t[a])||(e+="\\"),e+=t[a];return e}function Y(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 U(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:ta(e,s),...a&&s.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=ta(e,s)}function ta(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
5
5
  ]))`;continue}}if(s.s&&r[l]==="."){o+=n?`${r[l]}\r
6
6
  `:`[${r[l]}\r
7
- ]`;continue}o+=r[l],r[l]==="\\"?i=!0:n&&r[l]==="]"?n=!1:!n&&r[l]==="["&&(n=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return o}function Ma(t,e){var a,s,r,o,i,n;const c={type:"object",additionalProperties:(a=j(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]}))!=null?a:e.allowedAdditionalProperties};if(((s=t.keyType)==null?void 0:s._def.typeName)===w.ZodString&&((r=t.keyType._def.checks)!=null&&r.length)){const{type:l,...p}=Aa(t.keyType._def,e);return{...c,propertyNames:p}}else{if(((o=t.keyType)==null?void 0:o._def.typeName)===w.ZodEnum)return{...c,propertyNames:{enum:t.keyType._def.values}};if(((i=t.keyType)==null?void 0:i._def.typeName)===w.ZodBranded&&t.keyType._def.type._def.typeName===w.ZodString&&((n=t.keyType._def.type._def.checks)!=null&&n.length)){const{type:l,...p}=Ca(t.keyType._def,e);return{...c,propertyNames:p}}}return c}function mr(t,e){if(e.mapStrategy==="record")return Ma(t,e);const a=j(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||V(),s=j(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||V();return{type:"array",maxItems:125,items:{type:"array",items:[a,s],minItems:2,maxItems:2}}}function fr(t){const e=t.values,s=Object.keys(t.values).filter(o=>typeof e[e[o]]!="number").map(o=>e[o]),r=Array.from(new Set(s.map(o=>typeof o)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:s}}function hr(){return{not:V()}}function gr(){return{type:"null"}}var pt={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function vr(t,e){const a=t.options instanceof Map?Array.from(t.options.values()):t.options;if(a.every(s=>s._def.typeName in pt&&(!s._def.checks||!s._def.checks.length))){const s=a.reduce((r,o)=>{const i=pt[o._def.typeName];return i&&!r.includes(i)?[...r,i]:r},[]);return{type:s.length>1?s:s[0]}}else if(a.every(s=>s._def.typeName==="ZodLiteral"&&!s.description)){const s=a.reduce((r,o)=>{const i=typeof o._def.value;switch(i){case"string":case"number":case"boolean":return[...r,i];case"bigint":return[...r,"integer"];case"object":if(o._def.value===null)return[...r,"null"];default:return r}},[]);if(s.length===a.length){const r=s.filter((o,i,n)=>n.indexOf(o)===i);return{type:r.length>1?r:r[0],enum:a.reduce((o,i)=>o.includes(i._def.value)?o:[...o,i._def.value],[])}}}else if(a.every(s=>s._def.typeName==="ZodEnum"))return{type:"string",enum:a.reduce((s,r)=>[...s,...r._def.values.filter(o=>!s.includes(o))],[])};return yr(t,e)}var yr=(t,e)=>{const a=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((s,r)=>j(s._def,{...e,currentPath:[...e.currentPath,"anyOf",`${r}`]})).filter(s=>!!s&&(!e.strictUnions||typeof s=="object"&&Object.keys(s).length>0));return a.length?{anyOf:a}:void 0};function xr(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return{type:[pt[t.innerType._def.typeName],"null"]};const a=j(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return a&&{anyOf:[a,{type:"null"}]}}function br(t){const e={type:"number"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"int":e.type="integer";break;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 _r(t,e){const a={type:"object",properties:{}},s=[],r=t.shape();for(const i in r){let n=r[i];if(n===void 0||n._def===void 0)continue;const c=Ir(n),l=j(n._def,{...e,currentPath:[...e.currentPath,"properties",i],propertyPath:[...e.currentPath,"properties",i]});l!==void 0&&(a.properties[i]=l,c||s.push(i))}s.length&&(a.required=s);const o=Er(t,e);return o!==void 0&&(a.additionalProperties=o),a}function Er(t,e){if(t.catchall._def.typeName!=="ZodNever")return j(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function Ir(t){try{return t.isOptional()}catch{return!0}}var Sr=(t,e)=>{var a;if(e.currentPath.toString()===((a=e.propertyPath)==null?void 0:a.toString()))return j(t.innerType._def,e);const s=j(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return s?{anyOf:[{not:V()},s]}:V()},wr=(t,e)=>{if(e.pipeStrategy==="input")return j(t.in._def,e);if(e.pipeStrategy==="output")return j(t.out._def,e);const a=j(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),s=j(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",a?"1":"0"]});return{allOf:[a,s].filter(r=>r!==void 0)}};function Nr(t,e){return j(t.type._def,e)}function Cr(t,e){const s={type:"array",uniqueItems:!0,items:j(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&(s.minItems=t.minSize.value),t.maxSize&&(s.maxItems=t.maxSize.value),s}function Tr(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((a,s)=>j(a._def,{...e,currentPath:[...e.currentPath,"items",`${s}`]})).reduce((a,s)=>s===void 0?a:[...a,s],[]),additionalItems:j(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((a,s)=>j(a._def,{...e,currentPath:[...e.currentPath,"items",`${s}`]})).reduce((a,s)=>s===void 0?a:[...a,s],[])}}function Ar(){return{not:V()}}function Mr(){return V()}var jr=(t,e)=>j(t.innerType._def,e),Rr=(t,e,a)=>{switch(e){case w.ZodString:return Aa(t,a);case w.ZodNumber:return br(t);case w.ZodObject:return _r(t,a);case w.ZodBigInt:return tr(t);case w.ZodBoolean:return ar();case w.ZodDate:return Ta(t,a);case w.ZodUndefined:return Ar();case w.ZodNull:return gr();case w.ZodArray:return er(t,a);case w.ZodUnion:case w.ZodDiscriminatedUnion:return vr(t,a);case w.ZodIntersection:return cr(t,a);case w.ZodTuple:return Tr(t,a);case w.ZodRecord:return Ma(t,a);case w.ZodLiteral:return dr(t);case w.ZodEnum:return ir(t);case w.ZodNativeEnum:return fr(t);case w.ZodNullable:return xr(t,a);case w.ZodOptional:return Sr(t,a);case w.ZodMap:return mr(t,a);case w.ZodSet:return Cr(t,a);case w.ZodLazy:return()=>t.getter()._def;case w.ZodPromise:return Nr(t,a);case w.ZodNaN:case w.ZodNever:return hr();case w.ZodEffects:return nr(t,a);case w.ZodAny:return V();case w.ZodUnknown:return Mr();case w.ZodDefault:return or(t,a);case w.ZodBranded:return Ca(t,a);case w.ZodReadonly:return jr(t,a);case w.ZodCatch:return sr(t,a);case w.ZodPipeline:return wr(t,a);case w.ZodFunction:case w.ZodVoid:case w.ZodSymbol:return;default:return(s=>{})()}},Pr=(t,e)=>{let a=0;for(;a<t.length&&a<e.length&&t[a]===e[a];a++);return[(t.length-a).toString(),...e.slice(a)].join("/")};function j(t,e,a=!1){var s;const r=e.seen.get(t);if(e.override){const c=(s=e.override)==null?void 0:s.call(e,t,e,r,a);if(c!==Xs)return c}if(r&&!a){const c=kr(r,e);if(c!==void 0)return c}const o={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,o);const i=Rr(t,t.typeName,e),n=typeof i=="function"?j(i(),e):i;if(n&&Or(t,e,n),e.postProcess){const c=e.postProcess(n,t,e);return o.jsonSchema=n,c}return o.jsonSchema=n,n}var kr=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Pr(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((a,s)=>e.currentPath[s]===a)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),V()):e.$refStrategy==="seen"?V():void 0}},Or=(t,e,a)=>(t.description&&(a.description=t.description),a),Dr=t=>{const e=Ks(t),a=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([s,r])=>[r._def,{def:r._def,path:[...e.basePath,e.definitionPath,s],jsonSchema:void 0}]))}},$r=(t,e)=>{var a;const s=Dr(e);let r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((l,[p,m])=>{var h;return{...l,[p]:(h=j(m._def,{...s,currentPath:[...s.basePath,s.definitionPath,p]},!0))!=null?h:V()}},{}):void 0;const o=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,i=(a=j(t._def,o===void 0?s:{...s,currentPath:[...s.basePath,s.definitionPath,o]},!1))!=null?a:V(),n=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;n!==void 0&&(i.title=n);const c=o===void 0?r?{...i,[s.definitionPath]:r}:i:{$ref:[...s.$refStrategy==="relative"?[]:s.basePath,s.definitionPath,o].join("/"),[s.definitionPath]:{...r,[o]:i}};return c.$schema="http://json-schema.org/draft-07/schema#",c},mt=Symbol.for("vercel.ai.schema");function Lr(t){let e;return()=>(e==null&&(e=t()),e)}function Je(t,{validate:e}={}){return{[mt]:!0,_type:void 0,get jsonSchema(){return typeof t=="function"&&(t=t()),t},validate:e}}function Zr(t){return typeof t=="object"&&t!==null&&mt in t&&t[mt]===!0&&"jsonSchema"in t&&"validate"in t}function Tt(t){return t==null?Je({properties:{},additionalProperties:!1}):Zr(t)?t:"~standard"in t?t["~standard"].vendor==="zod"?ja(t):Fr(t):t()}function Fr(t){return Je(()=>Ct(t["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async e=>{const a=await t["~standard"].validate(e);return"value"in a?{success:!0,value:a.value}:{success:!1,error:new ye({value:e,cause:a.issues})}}})}function Ur(t,e){var a;const s=(a=void 0)!=null?a:!1;return Je(()=>$r(t,{$refStrategy:s?"root":"none"}),{validate:async r=>{const o=await t.safeParseAsync(r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function zr(t,e){var a;const s=(a=void 0)!=null?a:!1;return Je(()=>Ct(ss(t,{target:"draft-7",io:"input",reused:s?"ref":"inline"})),{validate:async r=>{const o=await as(t,r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function Br(t){return"_zod"in t}function ja(t,e){return Br(t)?zr(t):Ur(t)}async function aa({value:t,schema:e,context:a}){const s=await Ne({value:t,schema:e,context:a});if(!s.success)throw ye.wrap({value:t,cause:s.error,context:a});return s.value}async function Ne({value:t,schema:e,context:a}){const s=Tt(e);try{if(s.validate==null)return{success:!0,value:t,rawValue:t};const r=await s.validate(t);return r.success?{success:!0,value:r.value,rawValue:t}:{success:!1,error:ye.wrap({value:t,cause:r.error,context:a}),rawValue:t}}catch(r){return{success:!1,error:ye.wrap({value:t,cause:r,context:a}),rawValue:t}}}async function fe({text:t,schema:e}){try{const a=Qs(t);return e==null?{success:!0,value:a,rawValue:a}:await Ne({value:a,schema:e})}catch(a){return{success:!1,error:Jt.isInstance(a)?a:new Jt({text:t,cause:a}),rawValue:void 0}}}function Vr({stream:t,schema:e}){return t.pipeThrough(new TextDecoderStream).pipeThrough(new ts).pipeThrough(new TransformStream({async transform({data:a},s){a!=="[DONE]"&&s.enqueue(await fe({text:a,schema:e}))}}))}async function ce(t){return typeof t=="function"&&(t=t()),Promise.resolve(t)}var qr=Object.defineProperty,Hr=(t,e)=>{for(var a in e)qr(t,a,{get:e[a],enumerable:!0})},Ra="AI_NoObjectGeneratedError",Pa=`vercel.ai.error.${Ra}`,Wr=Symbol.for(Pa),ka,de=class extends te{constructor({message:t="No object generated.",cause:e,text:a,response:s,usage:r,finishReason:o}){super({name:Ra,message:t,cause:e}),this[ka]=!0,this.text=a,this.response=s,this.usage=r,this.finishReason=o}static isInstance(t){return te.hasMarker(t,Pa)}};ka=Wr;var Oa="AI_UIMessageStreamError",Da=`vercel.ai.error.${Oa}`,Jr=Symbol.for(Da),$a,he=class extends te{constructor({chunkType:t,chunkId:e,message:a}){super({name:Oa,message:a}),this[$a]=!0,this.chunkType=t,this.chunkId=e}static isInstance(t){return te.hasMarker(t,Da)}};$a=Jr;var sa="6.0.73",La=B([b(),qe(Uint8Array),qe(ArrayBuffer),ca(t=>{var e,a;return(a=(e=globalThis.Buffer)==null?void 0:e.isBuffer(t))!=null?a:!1},{message:"Must be a Buffer"})]),Ce=rs(()=>B([os(),b(),ns(),z(),Ie(b(),Ce.optional()),Te(Ce)])),A=Ie(b(),Ie(b(),Ce.optional())),Za=R({type:I("text"),text:b(),providerOptions:A.optional()}),Gr=R({type:I("image"),image:B([La,qe(URL)]),mediaType:b().optional(),providerOptions:A.optional()}),Fa=R({type:I("file"),data:B([La,qe(URL)]),filename:b().optional(),mediaType:b(),providerOptions:A.optional()}),Yr=R({type:I("reasoning"),text:b(),providerOptions:A.optional()}),Qr=R({type:I("tool-call"),toolCallId:b(),toolName:b(),input:ie(),providerOptions:A.optional(),providerExecuted:z().optional()}),Xr=is("type",[R({type:I("text"),value:b(),providerOptions:A.optional()}),R({type:I("json"),value:Ce,providerOptions:A.optional()}),R({type:I("execution-denied"),reason:b().optional(),providerOptions:A.optional()}),R({type:I("error-text"),value:b(),providerOptions:A.optional()}),R({type:I("error-json"),value:Ce,providerOptions:A.optional()}),R({type:I("content"),value:Te(B([R({type:I("text"),text:b(),providerOptions:A.optional()}),R({type:I("media"),data:b(),mediaType:b()}),R({type:I("file-data"),data:b(),mediaType:b(),filename:b().optional(),providerOptions:A.optional()}),R({type:I("file-url"),url:b(),providerOptions:A.optional()}),R({type:I("file-id"),fileId:B([b(),Ie(b(),b())]),providerOptions:A.optional()}),R({type:I("image-data"),data:b(),mediaType:b(),providerOptions:A.optional()}),R({type:I("image-url"),url:b(),providerOptions:A.optional()}),R({type:I("image-file-id"),fileId:B([b(),Ie(b(),b())]),providerOptions:A.optional()}),R({type:I("custom"),providerOptions:A.optional()})]))})]),Ua=R({type:I("tool-result"),toolCallId:b(),toolName:b(),output:Xr,providerOptions:A.optional()}),Kr=R({type:I("tool-approval-request"),approvalId:b(),toolCallId:b()}),eo=R({type:I("tool-approval-response"),approvalId:b(),approved:z(),reason:b().optional()}),to=R({role:I("system"),content:b(),providerOptions:A.optional()}),ao=R({role:I("user"),content:B([b(),Te(B([Za,Gr,Fa]))]),providerOptions:A.optional()}),so=R({role:I("assistant"),content:B([b(),Te(B([Za,Fa,Yr,Qr,Ua,Kr]))]),providerOptions:A.optional()}),ro=R({role:I("tool"),content:Te(B([Ua,eo])),providerOptions:A.optional()});B([to,ao,so,ro]);function za(t,e){if(t===void 0&&e===void 0)return;if(t===void 0)return e;if(e===void 0)return t;const a={...t};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)){const r=e[s];if(r===void 0)continue;const o=s in t?t[s]:void 0,i=r!==null&&typeof r=="object"&&!Array.isArray(r)&&!(r instanceof Date)&&!(r instanceof RegExp),n=o!=null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp);i&&n?a[s]=za(o,r):a[s]=r}return a}var oo={};Hr(oo,{array:()=>co,choice:()=>uo,json:()=>po,object:()=>lo,text:()=>io});function no(t){const e=["ROOT"];let a=-1,s=null;function r(c,l,p){switch(c){case'"':{a=l,e.pop(),e.push(p),e.push("INSIDE_STRING");break}case"f":case"t":case"n":{a=l,s=l,e.pop(),e.push(p),e.push("INSIDE_LITERAL");break}case"-":{e.pop(),e.push(p),e.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{a=l,e.pop(),e.push(p),e.push("INSIDE_NUMBER");break}case"{":{a=l,e.pop(),e.push(p),e.push("INSIDE_OBJECT_START");break}case"[":{a=l,e.pop(),e.push(p),e.push("INSIDE_ARRAY_START");break}}}function o(c,l){switch(c){case",":{e.pop(),e.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{a=l,e.pop();break}}}function i(c,l){switch(c){case",":{e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{a=l,e.pop();break}}}for(let c=0;c<t.length;c++){const l=t[c];switch(e[e.length-1]){case"ROOT":r(l,c,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{e.pop(),e.push("INSIDE_OBJECT_KEY");break}case"}":{a=c,e.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{l==='"'&&(e.pop(),e.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{l==='"'&&(e.pop(),e.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{l===":"&&(e.pop(),e.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{r(l,c,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{o(l,c);break}case"INSIDE_STRING":{switch(l){case'"':{e.pop(),a=c;break}case"\\":{e.push("INSIDE_STRING_ESCAPE");break}default:a=c}break}case"INSIDE_ARRAY_START":{l==="]"?(a=c,e.pop()):(a=c,r(l,c,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{a=c,e.pop();break}default:{a=c;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{r(l,c,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{e.pop(),a=c;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{a=c;break}case"e":case"E":case"-":case".":break;case",":{e.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,c),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(l,c);break}case"}":{e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(l,c);break}case"]":{e.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,c);break}default:{e.pop();break}}break}case"INSIDE_LITERAL":{const m=t.substring(s,c+1);!"false".startsWith(m)&&!"true".startsWith(m)&&!"null".startsWith(m)?(e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?o(l,c):e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,c)):a=c;break}}}let n=t.slice(0,a+1);for(let c=e.length-1;c>=0;c--)switch(e[c]){case"INSIDE_STRING":{n+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{n+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{n+="]";break}case"INSIDE_LITERAL":{const p=t.substring(s,t.length);"true".startsWith(p)?n+="true".slice(p.length):"false".startsWith(p)?n+="false".slice(p.length):"null".startsWith(p)&&(n+="null".slice(p.length))}}return n}async function je(t){if(t===void 0)return{value:void 0,state:"undefined-input"};let e=await fe({text:t});return e.success?{value:e.value,state:"successful-parse"}:(e=await fe({text:no(t)}),e.success?{value:e.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var io=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:t}){return t},async parsePartialOutput({text:t}){return{partial:t}},createElementStreamTransform(){}}),lo=({schema:t,name:e,description:a})=>{const s=Tt(t);return{name:"object",responseFormat:ce(s.jsonSchema).then(r=>({type:"json",schema:r,...e!=null&&{name:e},...a!=null&&{description:a}})),async parseCompleteOutput({text:r},o){const i=await fe({text:r});if(!i.success)throw new de({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});const n=await Ne({value:i.value,schema:s});if(!n.success)throw new de({message:"No object generated: response did not match schema.",cause:n.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});return n.value},async parsePartialOutput({text:r}){const o=await je(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:o.value}}},createElementStreamTransform(){}}},co=({element:t,name:e,description:a})=>{const s=Tt(t);return{name:"array",responseFormat:ce(s.jsonSchema).then(r=>{const{$schema:o,...i}=r;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:i}},required:["elements"],additionalProperties:!1},...e!=null&&{name:e},...a!=null&&{description:a}}}),async parseCompleteOutput({text:r},o){const i=await fe({text:r});if(!i.success)throw new de({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});const n=i.value;if(n==null||typeof n!="object"||!("elements"in n)||!Array.isArray(n.elements))throw new de({message:"No object generated: response did not match schema.",cause:new ye({value:n,cause:"response must be an object with an elements array"}),text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});for(const c of n.elements){const l=await Ne({value:c,schema:s});if(!l.success)throw new de({message:"No object generated: response did not match schema.",cause:l.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason})}return n.elements},async parsePartialOutput({text:r}){const o=await je(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const i=o.value;if(i==null||typeof i!="object"||!("elements"in i)||!Array.isArray(i.elements))return;const n=o.state==="repaired-parse"&&i.elements.length>0?i.elements.slice(0,-1):i.elements,c=[];for(const l of n){const p=await Ne({value:l,schema:s});p.success&&c.push(p.value)}return{partial:c}}}},createElementStreamTransform(){let r=0;return new TransformStream({transform({partialOutput:o},i){if(o!=null)for(;r<o.length;r++)i.enqueue(o[r])}})}}},uo=({options:t,name:e,description:a})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:t}},required:["result"],additionalProperties:!1},...e!=null&&{name:e},...a!=null&&{description:a}}),async parseCompleteOutput({text:s},r){const o=await fe({text:s});if(!o.success)throw new de({message:"No object generated: could not parse the response.",cause:o.error,text:s,response:r.response,usage:r.usage,finishReason:r.finishReason});const i=o.value;if(i==null||typeof i!="object"||!("result"in i)||typeof i.result!="string"||!t.includes(i.result))throw new de({message:"No object generated: response did not match schema.",cause:new ye({value:i,cause:"response must be an object that contains a choice value."}),text:s,response:r.response,usage:r.usage,finishReason:r.finishReason});return i.result},async parsePartialOutput({text:s}){const r=await je(s);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const o=r.value;if(o==null||typeof o!="object"||!("result"in o)||typeof o.result!="string")return;const i=t.filter(n=>n.startsWith(o.result));return r.state==="successful-parse"?i.includes(o.result)?{partial:o.result}:void 0:i.length===1?{partial:i[0]}:void 0}}},createElementStreamTransform(){}}),po=({name:t,description:e}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...t!=null&&{name:t},...e!=null&&{description:e}}),async parseCompleteOutput({text:a},s){const r=await fe({text:a});if(!r.success)throw new de({message:"No object generated: could not parse the response.",cause:r.error,text:a,response:s.response,usage:s.usage,finishReason:s.finishReason});return r.value},async parsePartialOutput({text:a}){const s=await je(a);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return s.value===void 0?void 0:{partial:s.value}}},createElementStreamTransform(){}});Me({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(t,e){e.enqueue(`data: ${JSON.stringify(t)}
7
+ ]`;continue}o+=r[l],r[l]==="\\"?i=!0:n&&r[l]==="]"?n=!1:!n&&r[l]==="["&&(n=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return o}function Ma(t,e){var a,s,r,o,i,n;const c={type:"object",additionalProperties:(a=j(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]}))!=null?a:e.allowedAdditionalProperties};if(((s=t.keyType)==null?void 0:s._def.typeName)===w.ZodString&&((r=t.keyType._def.checks)!=null&&r.length)){const{type:l,...p}=Aa(t.keyType._def,e);return{...c,propertyNames:p}}else{if(((o=t.keyType)==null?void 0:o._def.typeName)===w.ZodEnum)return{...c,propertyNames:{enum:t.keyType._def.values}};if(((i=t.keyType)==null?void 0:i._def.typeName)===w.ZodBranded&&t.keyType._def.type._def.typeName===w.ZodString&&((n=t.keyType._def.type._def.checks)!=null&&n.length)){const{type:l,...p}=Ca(t.keyType._def,e);return{...c,propertyNames:p}}}return c}function mr(t,e){if(e.mapStrategy==="record")return Ma(t,e);const a=j(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||V(),s=j(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||V();return{type:"array",maxItems:125,items:{type:"array",items:[a,s],minItems:2,maxItems:2}}}function fr(t){const e=t.values,s=Object.keys(t.values).filter(o=>typeof e[e[o]]!="number").map(o=>e[o]),r=Array.from(new Set(s.map(o=>typeof o)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:s}}function hr(){return{not:V()}}function gr(){return{type:"null"}}var pt={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function vr(t,e){const a=t.options instanceof Map?Array.from(t.options.values()):t.options;if(a.every(s=>s._def.typeName in pt&&(!s._def.checks||!s._def.checks.length))){const s=a.reduce((r,o)=>{const i=pt[o._def.typeName];return i&&!r.includes(i)?[...r,i]:r},[]);return{type:s.length>1?s:s[0]}}else if(a.every(s=>s._def.typeName==="ZodLiteral"&&!s.description)){const s=a.reduce((r,o)=>{const i=typeof o._def.value;switch(i){case"string":case"number":case"boolean":return[...r,i];case"bigint":return[...r,"integer"];case"object":if(o._def.value===null)return[...r,"null"];default:return r}},[]);if(s.length===a.length){const r=s.filter((o,i,n)=>n.indexOf(o)===i);return{type:r.length>1?r:r[0],enum:a.reduce((o,i)=>o.includes(i._def.value)?o:[...o,i._def.value],[])}}}else if(a.every(s=>s._def.typeName==="ZodEnum"))return{type:"string",enum:a.reduce((s,r)=>[...s,...r._def.values.filter(o=>!s.includes(o))],[])};return yr(t,e)}var yr=(t,e)=>{const a=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((s,r)=>j(s._def,{...e,currentPath:[...e.currentPath,"anyOf",`${r}`]})).filter(s=>!!s&&(!e.strictUnions||typeof s=="object"&&Object.keys(s).length>0));return a.length?{anyOf:a}:void 0};function xr(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return{type:[pt[t.innerType._def.typeName],"null"]};const a=j(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return a&&{anyOf:[a,{type:"null"}]}}function br(t){const e={type:"number"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"int":e.type="integer";break;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 _r(t,e){const a={type:"object",properties:{}},s=[],r=t.shape();for(const i in r){let n=r[i];if(n===void 0||n._def===void 0)continue;const c=Ir(n),l=j(n._def,{...e,currentPath:[...e.currentPath,"properties",i],propertyPath:[...e.currentPath,"properties",i]});l!==void 0&&(a.properties[i]=l,c||s.push(i))}s.length&&(a.required=s);const o=Er(t,e);return o!==void 0&&(a.additionalProperties=o),a}function Er(t,e){if(t.catchall._def.typeName!=="ZodNever")return j(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function Ir(t){try{return t.isOptional()}catch{return!0}}var Sr=(t,e)=>{var a;if(e.currentPath.toString()===((a=e.propertyPath)==null?void 0:a.toString()))return j(t.innerType._def,e);const s=j(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return s?{anyOf:[{not:V()},s]}:V()},wr=(t,e)=>{if(e.pipeStrategy==="input")return j(t.in._def,e);if(e.pipeStrategy==="output")return j(t.out._def,e);const a=j(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),s=j(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",a?"1":"0"]});return{allOf:[a,s].filter(r=>r!==void 0)}};function Nr(t,e){return j(t.type._def,e)}function Cr(t,e){const s={type:"array",uniqueItems:!0,items:j(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&(s.minItems=t.minSize.value),t.maxSize&&(s.maxItems=t.maxSize.value),s}function Tr(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((a,s)=>j(a._def,{...e,currentPath:[...e.currentPath,"items",`${s}`]})).reduce((a,s)=>s===void 0?a:[...a,s],[]),additionalItems:j(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((a,s)=>j(a._def,{...e,currentPath:[...e.currentPath,"items",`${s}`]})).reduce((a,s)=>s===void 0?a:[...a,s],[])}}function Ar(){return{not:V()}}function Mr(){return V()}var jr=(t,e)=>j(t.innerType._def,e),Rr=(t,e,a)=>{switch(e){case w.ZodString:return Aa(t,a);case w.ZodNumber:return br(t);case w.ZodObject:return _r(t,a);case w.ZodBigInt:return tr(t);case w.ZodBoolean:return ar();case w.ZodDate:return Ta(t,a);case w.ZodUndefined:return Ar();case w.ZodNull:return gr();case w.ZodArray:return er(t,a);case w.ZodUnion:case w.ZodDiscriminatedUnion:return vr(t,a);case w.ZodIntersection:return cr(t,a);case w.ZodTuple:return Tr(t,a);case w.ZodRecord:return Ma(t,a);case w.ZodLiteral:return dr(t);case w.ZodEnum:return ir(t);case w.ZodNativeEnum:return fr(t);case w.ZodNullable:return xr(t,a);case w.ZodOptional:return Sr(t,a);case w.ZodMap:return mr(t,a);case w.ZodSet:return Cr(t,a);case w.ZodLazy:return()=>t.getter()._def;case w.ZodPromise:return Nr(t,a);case w.ZodNaN:case w.ZodNever:return hr();case w.ZodEffects:return nr(t,a);case w.ZodAny:return V();case w.ZodUnknown:return Mr();case w.ZodDefault:return or(t,a);case w.ZodBranded:return Ca(t,a);case w.ZodReadonly:return jr(t,a);case w.ZodCatch:return sr(t,a);case w.ZodPipeline:return wr(t,a);case w.ZodFunction:case w.ZodVoid:case w.ZodSymbol:return;default:return(s=>{})()}},Pr=(t,e)=>{let a=0;for(;a<t.length&&a<e.length&&t[a]===e[a];a++);return[(t.length-a).toString(),...e.slice(a)].join("/")};function j(t,e,a=!1){var s;const r=e.seen.get(t);if(e.override){const c=(s=e.override)==null?void 0:s.call(e,t,e,r,a);if(c!==Xs)return c}if(r&&!a){const c=kr(r,e);if(c!==void 0)return c}const o={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,o);const i=Rr(t,t.typeName,e),n=typeof i=="function"?j(i(),e):i;if(n&&Or(t,e,n),e.postProcess){const c=e.postProcess(n,t,e);return o.jsonSchema=n,c}return o.jsonSchema=n,n}var kr=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Pr(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((a,s)=>e.currentPath[s]===a)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),V()):e.$refStrategy==="seen"?V():void 0}},Or=(t,e,a)=>(t.description&&(a.description=t.description),a),Dr=t=>{const e=Ks(t),a=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([s,r])=>[r._def,{def:r._def,path:[...e.basePath,e.definitionPath,s],jsonSchema:void 0}]))}},$r=(t,e)=>{var a;const s=Dr(e);let r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((l,[p,m])=>{var h;return{...l,[p]:(h=j(m._def,{...s,currentPath:[...s.basePath,s.definitionPath,p]},!0))!=null?h:V()}},{}):void 0;const o=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,i=(a=j(t._def,o===void 0?s:{...s,currentPath:[...s.basePath,s.definitionPath,o]},!1))!=null?a:V(),n=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;n!==void 0&&(i.title=n);const c=o===void 0?r?{...i,[s.definitionPath]:r}:i:{$ref:[...s.$refStrategy==="relative"?[]:s.basePath,s.definitionPath,o].join("/"),[s.definitionPath]:{...r,[o]:i}};return c.$schema="http://json-schema.org/draft-07/schema#",c},mt=Symbol.for("vercel.ai.schema");function Lr(t){let e;return()=>(e==null&&(e=t()),e)}function Je(t,{validate:e}={}){return{[mt]:!0,_type:void 0,get jsonSchema(){return typeof t=="function"&&(t=t()),t},validate:e}}function Zr(t){return typeof t=="object"&&t!==null&&mt in t&&t[mt]===!0&&"jsonSchema"in t&&"validate"in t}function Tt(t){return t==null?Je({properties:{},additionalProperties:!1}):Zr(t)?t:"~standard"in t?t["~standard"].vendor==="zod"?ja(t):Fr(t):t()}function Fr(t){return Je(()=>Ct(t["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async e=>{const a=await t["~standard"].validate(e);return"value"in a?{success:!0,value:a.value}:{success:!1,error:new ye({value:e,cause:a.issues})}}})}function Ur(t,e){var a;const s=(a=void 0)!=null?a:!1;return Je(()=>$r(t,{$refStrategy:s?"root":"none"}),{validate:async r=>{const o=await t.safeParseAsync(r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function zr(t,e){var a;const s=(a=void 0)!=null?a:!1;return Je(()=>Ct(ss(t,{target:"draft-7",io:"input",reused:s?"ref":"inline"})),{validate:async r=>{const o=await as(t,r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function Br(t){return"_zod"in t}function ja(t,e){return Br(t)?zr(t):Ur(t)}async function aa({value:t,schema:e,context:a}){const s=await Ne({value:t,schema:e,context:a});if(!s.success)throw ye.wrap({value:t,cause:s.error,context:a});return s.value}async function Ne({value:t,schema:e,context:a}){const s=Tt(e);try{if(s.validate==null)return{success:!0,value:t,rawValue:t};const r=await s.validate(t);return r.success?{success:!0,value:r.value,rawValue:t}:{success:!1,error:ye.wrap({value:t,cause:r.error,context:a}),rawValue:t}}catch(r){return{success:!1,error:ye.wrap({value:t,cause:r,context:a}),rawValue:t}}}async function fe({text:t,schema:e}){try{const a=Qs(t);return e==null?{success:!0,value:a,rawValue:a}:await Ne({value:a,schema:e})}catch(a){return{success:!1,error:Jt.isInstance(a)?a:new Jt({text:t,cause:a}),rawValue:void 0}}}function Vr({stream:t,schema:e}){return t.pipeThrough(new TextDecoderStream).pipeThrough(new ts).pipeThrough(new TransformStream({async transform({data:a},s){a!=="[DONE]"&&s.enqueue(await fe({text:a,schema:e}))}}))}async function ce(t){return typeof t=="function"&&(t=t()),Promise.resolve(t)}var qr=Object.defineProperty,Hr=(t,e)=>{for(var a in e)qr(t,a,{get:e[a],enumerable:!0})},Ra="AI_NoObjectGeneratedError",Pa=`vercel.ai.error.${Ra}`,Wr=Symbol.for(Pa),ka,de=class extends te{constructor({message:t="No object generated.",cause:e,text:a,response:s,usage:r,finishReason:o}){super({name:Ra,message:t,cause:e}),this[ka]=!0,this.text=a,this.response=s,this.usage=r,this.finishReason=o}static isInstance(t){return te.hasMarker(t,Pa)}};ka=Wr;var Oa="AI_UIMessageStreamError",Da=`vercel.ai.error.${Oa}`,Jr=Symbol.for(Da),$a,he=class extends te{constructor({chunkType:t,chunkId:e,message:a}){super({name:Oa,message:a}),this[$a]=!0,this.chunkType=t,this.chunkId=e}static isInstance(t){return te.hasMarker(t,Da)}};$a=Jr;var sa="6.0.77",La=B([b(),qe(Uint8Array),qe(ArrayBuffer),ca(t=>{var e,a;return(a=(e=globalThis.Buffer)==null?void 0:e.isBuffer(t))!=null?a:!1},{message:"Must be a Buffer"})]),Ce=rs(()=>B([os(),b(),ns(),z(),Ie(b(),Ce.optional()),Te(Ce)])),A=Ie(b(),Ie(b(),Ce.optional())),Za=R({type:I("text"),text:b(),providerOptions:A.optional()}),Gr=R({type:I("image"),image:B([La,qe(URL)]),mediaType:b().optional(),providerOptions:A.optional()}),Fa=R({type:I("file"),data:B([La,qe(URL)]),filename:b().optional(),mediaType:b(),providerOptions:A.optional()}),Yr=R({type:I("reasoning"),text:b(),providerOptions:A.optional()}),Qr=R({type:I("tool-call"),toolCallId:b(),toolName:b(),input:ie(),providerOptions:A.optional(),providerExecuted:z().optional()}),Xr=is("type",[R({type:I("text"),value:b(),providerOptions:A.optional()}),R({type:I("json"),value:Ce,providerOptions:A.optional()}),R({type:I("execution-denied"),reason:b().optional(),providerOptions:A.optional()}),R({type:I("error-text"),value:b(),providerOptions:A.optional()}),R({type:I("error-json"),value:Ce,providerOptions:A.optional()}),R({type:I("content"),value:Te(B([R({type:I("text"),text:b(),providerOptions:A.optional()}),R({type:I("media"),data:b(),mediaType:b()}),R({type:I("file-data"),data:b(),mediaType:b(),filename:b().optional(),providerOptions:A.optional()}),R({type:I("file-url"),url:b(),providerOptions:A.optional()}),R({type:I("file-id"),fileId:B([b(),Ie(b(),b())]),providerOptions:A.optional()}),R({type:I("image-data"),data:b(),mediaType:b(),providerOptions:A.optional()}),R({type:I("image-url"),url:b(),providerOptions:A.optional()}),R({type:I("image-file-id"),fileId:B([b(),Ie(b(),b())]),providerOptions:A.optional()}),R({type:I("custom"),providerOptions:A.optional()})]))})]),Ua=R({type:I("tool-result"),toolCallId:b(),toolName:b(),output:Xr,providerOptions:A.optional()}),Kr=R({type:I("tool-approval-request"),approvalId:b(),toolCallId:b()}),eo=R({type:I("tool-approval-response"),approvalId:b(),approved:z(),reason:b().optional()}),to=R({role:I("system"),content:b(),providerOptions:A.optional()}),ao=R({role:I("user"),content:B([b(),Te(B([Za,Gr,Fa]))]),providerOptions:A.optional()}),so=R({role:I("assistant"),content:B([b(),Te(B([Za,Fa,Yr,Qr,Ua,Kr]))]),providerOptions:A.optional()}),ro=R({role:I("tool"),content:Te(B([Ua,eo])),providerOptions:A.optional()});B([to,ao,so,ro]);function za(t,e){if(t===void 0&&e===void 0)return;if(t===void 0)return e;if(e===void 0)return t;const a={...t};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)){const r=e[s];if(r===void 0)continue;const o=s in t?t[s]:void 0,i=r!==null&&typeof r=="object"&&!Array.isArray(r)&&!(r instanceof Date)&&!(r instanceof RegExp),n=o!=null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp);i&&n?a[s]=za(o,r):a[s]=r}return a}var oo={};Hr(oo,{array:()=>co,choice:()=>uo,json:()=>po,object:()=>lo,text:()=>io});function no(t){const e=["ROOT"];let a=-1,s=null;function r(c,l,p){switch(c){case'"':{a=l,e.pop(),e.push(p),e.push("INSIDE_STRING");break}case"f":case"t":case"n":{a=l,s=l,e.pop(),e.push(p),e.push("INSIDE_LITERAL");break}case"-":{e.pop(),e.push(p),e.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{a=l,e.pop(),e.push(p),e.push("INSIDE_NUMBER");break}case"{":{a=l,e.pop(),e.push(p),e.push("INSIDE_OBJECT_START");break}case"[":{a=l,e.pop(),e.push(p),e.push("INSIDE_ARRAY_START");break}}}function o(c,l){switch(c){case",":{e.pop(),e.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{a=l,e.pop();break}}}function i(c,l){switch(c){case",":{e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{a=l,e.pop();break}}}for(let c=0;c<t.length;c++){const l=t[c];switch(e[e.length-1]){case"ROOT":r(l,c,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{e.pop(),e.push("INSIDE_OBJECT_KEY");break}case"}":{a=c,e.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{l==='"'&&(e.pop(),e.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{l==='"'&&(e.pop(),e.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{l===":"&&(e.pop(),e.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{r(l,c,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{o(l,c);break}case"INSIDE_STRING":{switch(l){case'"':{e.pop(),a=c;break}case"\\":{e.push("INSIDE_STRING_ESCAPE");break}default:a=c}break}case"INSIDE_ARRAY_START":{l==="]"?(a=c,e.pop()):(a=c,r(l,c,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{a=c,e.pop();break}default:{a=c;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{r(l,c,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{e.pop(),a=c;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{a=c;break}case"e":case"E":case"-":case".":break;case",":{e.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,c),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(l,c);break}case"}":{e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(l,c);break}case"]":{e.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,c);break}default:{e.pop();break}}break}case"INSIDE_LITERAL":{const m=t.substring(s,c+1);!"false".startsWith(m)&&!"true".startsWith(m)&&!"null".startsWith(m)?(e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?o(l,c):e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&i(l,c)):a=c;break}}}let n=t.slice(0,a+1);for(let c=e.length-1;c>=0;c--)switch(e[c]){case"INSIDE_STRING":{n+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{n+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{n+="]";break}case"INSIDE_LITERAL":{const p=t.substring(s,t.length);"true".startsWith(p)?n+="true".slice(p.length):"false".startsWith(p)?n+="false".slice(p.length):"null".startsWith(p)&&(n+="null".slice(p.length))}}return n}async function je(t){if(t===void 0)return{value:void 0,state:"undefined-input"};let e=await fe({text:t});return e.success?{value:e.value,state:"successful-parse"}:(e=await fe({text:no(t)}),e.success?{value:e.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var io=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:t}){return t},async parsePartialOutput({text:t}){return{partial:t}},createElementStreamTransform(){}}),lo=({schema:t,name:e,description:a})=>{const s=Tt(t);return{name:"object",responseFormat:ce(s.jsonSchema).then(r=>({type:"json",schema:r,...e!=null&&{name:e},...a!=null&&{description:a}})),async parseCompleteOutput({text:r},o){const i=await fe({text:r});if(!i.success)throw new de({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});const n=await Ne({value:i.value,schema:s});if(!n.success)throw new de({message:"No object generated: response did not match schema.",cause:n.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});return n.value},async parsePartialOutput({text:r}){const o=await je(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:o.value}}},createElementStreamTransform(){}}},co=({element:t,name:e,description:a})=>{const s=Tt(t);return{name:"array",responseFormat:ce(s.jsonSchema).then(r=>{const{$schema:o,...i}=r;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:i}},required:["elements"],additionalProperties:!1},...e!=null&&{name:e},...a!=null&&{description:a}}}),async parseCompleteOutput({text:r},o){const i=await fe({text:r});if(!i.success)throw new de({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});const n=i.value;if(n==null||typeof n!="object"||!("elements"in n)||!Array.isArray(n.elements))throw new de({message:"No object generated: response did not match schema.",cause:new ye({value:n,cause:"response must be an object with an elements array"}),text:r,response:o.response,usage:o.usage,finishReason:o.finishReason});for(const c of n.elements){const l=await Ne({value:c,schema:s});if(!l.success)throw new de({message:"No object generated: response did not match schema.",cause:l.error,text:r,response:o.response,usage:o.usage,finishReason:o.finishReason})}return n.elements},async parsePartialOutput({text:r}){const o=await je(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const i=o.value;if(i==null||typeof i!="object"||!("elements"in i)||!Array.isArray(i.elements))return;const n=o.state==="repaired-parse"&&i.elements.length>0?i.elements.slice(0,-1):i.elements,c=[];for(const l of n){const p=await Ne({value:l,schema:s});p.success&&c.push(p.value)}return{partial:c}}}},createElementStreamTransform(){let r=0;return new TransformStream({transform({partialOutput:o},i){if(o!=null)for(;r<o.length;r++)i.enqueue(o[r])}})}}},uo=({options:t,name:e,description:a})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:t}},required:["result"],additionalProperties:!1},...e!=null&&{name:e},...a!=null&&{description:a}}),async parseCompleteOutput({text:s},r){const o=await fe({text:s});if(!o.success)throw new de({message:"No object generated: could not parse the response.",cause:o.error,text:s,response:r.response,usage:r.usage,finishReason:r.finishReason});const i=o.value;if(i==null||typeof i!="object"||!("result"in i)||typeof i.result!="string"||!t.includes(i.result))throw new de({message:"No object generated: response did not match schema.",cause:new ye({value:i,cause:"response must be an object that contains a choice value."}),text:s,response:r.response,usage:r.usage,finishReason:r.finishReason});return i.result},async parsePartialOutput({text:s}){const r=await je(s);switch(r.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const o=r.value;if(o==null||typeof o!="object"||!("result"in o)||typeof o.result!="string")return;const i=t.filter(n=>n.startsWith(o.result));return r.state==="successful-parse"?i.includes(o.result)?{partial:o.result}:void 0:i.length===1?{partial:i[0]}:void 0}}},createElementStreamTransform(){}}),po=({name:t,description:e}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...t!=null&&{name:t},...e!=null&&{description:e}}),async parseCompleteOutput({text:a},s){const r=await fe({text:a});if(!r.success)throw new de({message:"No object generated: could not parse the response.",cause:r.error,text:a,response:s.response,usage:s.usage,finishReason:s.finishReason});return r.value},async parsePartialOutput({text:a}){const s=await je(a);switch(s.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return s.value===void 0?void 0:{partial:s.value}}},createElementStreamTransform(){}});Me({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(t,e){e.enqueue(`data: ${JSON.stringify(t)}
8
8
 
9
9
  `)},flush(t){t.enqueue(`data: [DONE]
10
10
 
@@ -1 +1 @@
1
- import{u as g,g as y,t as e}from"./index-HxeE9C0A.js";import{u as C}from"./use-binding-BIvDtNoa.js";import{g as S,h as v}from"./use-connection-DWpxH8iy.js";import{e as B}from"./extract-connection-data-CDmQ7rLP.js";import{f as I,c as P,e as _}from"./registry-utils-CLfG2KJO.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-BKpxPW_G.js";import{u as C}from"./use-binding-DMsO_03X.js";import{g as S,h as v}from"./use-connection-B0740Saa.js";import{e as B}from"./extract-connection-data-wB5jtXsg.js";import{f as I,c as P,e as _}from"./registry-utils-yxVJe3X4.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 +1 @@
1
- import{r as b,c as N,u as B,K as I,j as x}from"./index-HxeE9C0A.js";import{A as _}from"./avatar-BbH9O0kN.js";import{c as C}from"./utils-D1Qd9-I_.js";import{u as L}from"./useQuery-jRtVXI31.js";import{a as U,u as D}from"./constants-BEco_-y7.js";import{u as P}from"./use-mobile-CqANtQ4e.js";const A=({size:i=24,color:e="currentColor",...t})=>b.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},b.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),b.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));A.displayName="Eye";function R(i){const e=N.c(11),{org:t}=B();let c;e[0]!==t.id?(c={connectionId:U,orgId:t.id},e[0]=t.id,e[1]=c):c=e[1];const r=D(c);let s;e[2]!==i?(s=I.user(i),e[2]=i,e[3]=s):s=e[3];let o;e[4]!==r||e[5]!==i?(o=async()=>{const p=await r.callTool({name:"USER_GET",arguments:{id:i}});return(p.structuredContent??p).user},e[4]=r,e[5]=i,e[6]=o):o=e[6];const a=!!i;let l;return e[7]!==s||e[8]!==o||e[9]!==a?(l={queryKey:s,queryFn:o,staleTime:3e5,retry:1,enabled:a},e[7]=s,e[8]=o,e[9]=a,e[10]=l):l=e[10],L(l)}function H(i){const e=N.c(39),{id:t,size:c,showEmail:r,className:s}=i,o=c===void 0?"xs":c,a=r===void 0?!1:r,{data:l,isLoading:p,isError:j}=R(t);if(p){let u;e[0]!==s?(u=C("flex items-center gap-2",s),e[0]=s,e[1]=u):u=e[1];let n;e[2]!==o?(n=x.jsx(_.Skeleton,{shape:"circle",size:o}),e[2]=o,e[3]=n):n=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=x.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[4]=g):g=e[4];let h;e[5]!==a?(h=a&&x.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[5]=a,e[6]=h):h=e[6];let w;e[7]!==h?(w=x.jsxs("div",{className:"flex flex-col gap-1",children:[g,h]}),e[7]=h,e[8]=w):w=e[8];let M;return e[9]!==u||e[10]!==n||e[11]!==w?(M=x.jsxs("div",{className:u,children:[n,w]}),e[9]=u,e[10]=n,e[11]=w,e[12]=M):M=e[12],M}if(j||!l){let u;e[13]!==s?(u=C("flex items-center gap-2",s),e[13]=s,e[14]=u):u=e[14];let n;e[15]!==o?(n=x.jsx(_,{shape:"circle",size:o,fallback:"?",muted:!0}),e[15]=o,e[16]=n):n=e[16];let g;e[17]===Symbol.for("react.memo_cache_sentinel")?(g=x.jsx("div",{className:"flex flex-col",children:x.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[17]=g):g=e[17];let h;return e[18]!==u||e[19]!==n?(h=x.jsxs("div",{className:u,children:[n,g]}),e[18]=u,e[19]=n,e[20]=h):h=e[20],h}let v;e[21]!==s?(v=C("flex items-center gap-2",s),e[21]=s,e[22]=v):v=e[22];const y=l.image??void 0;let m;e[23]!==o||e[24]!==y||e[25]!==l.name?(m=x.jsx(_,{shape:"circle",size:o,url:y,fallback:l.name}),e[23]=o,e[24]=y,e[25]=l.name,e[26]=m):m=e[26];let d;e[27]!==l.name?(d=x.jsx("div",{className:"text-sm font-medium",children:l.name}),e[27]=l.name,e[28]=d):d=e[28];let f;e[29]!==a||e[30]!==l.email?(f=a&&x.jsx("div",{className:"text-xs text-muted-foreground",children:l.email}),e[29]=a,e[30]=l.email,e[31]=f):f=e[31];let S;e[32]!==d||e[33]!==f?(S=x.jsxs("div",{className:"flex flex-col",children:[d,f]}),e[32]=d,e[33]=f,e[34]=S):S=e[34];let E;return e[35]!==v||e[36]!==m||e[37]!==S?(E=x.jsxs("div",{className:v,children:[m,S]}),e[35]=v,e[36]=m,e[37]=S,e[38]=E):E=e[38],E}function W(i){const e=`deco-filters-${i}`,[t,c]=b.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=>{c(s);try{globalThis.localStorage?.setItem(e,JSON.stringify(s))}catch(o){console.error("Failed to save filters:",o)}}]}function z(i){const e=N.c(7),[t,c]=b.useState(i),[r,s]=b.useState(i?"desc":null);let o;e[0]!==r||e[1]!==t?(o=p=>{t!==p?(c(p),s("asc")):r==="asc"?s("desc"):r==="desc"&&(c(void 0),s(null))},e[0]=r,e[1]=t,e[2]=o):o=e[2];const a=o;let l;return e[3]!==a||e[4]!==r||e[5]!==t?(l={sortKey:t,sortDirection:r,handleSort:a},e[3]=a,e[4]=r,e[5]=t,e[6]=l):l=e[6],l}function q(i,e){const t=N.c(12),c=e===void 0?"cards":e,r=P(),s=b.useRef(r),o=i?`deco-view-mode-${i}`:"deco-view-mode";let a;t[0]!==c||t[1]!==o?(a=()=>{const f=globalThis.localStorage?.getItem(o);return f==="cards"||f==="table"?f:c},t[0]=c,t[1]=o,t[2]=a):a=t[2];const[l,p]=b.useState(a);let j;t[3]!==o?(j=f=>{p(f),globalThis.localStorage?.setItem(o,f)},t[3]=o,t[4]=j):j=t[4];const v=j;let y,m;t[5]!==r||t[6]!==l?(y=()=>{!s.current&&r&&l==="table"&&p("cards"),s.current=r},m=[r,l],t[5]=r,t[6]=l,t[7]=y,t[8]=m):(y=t[7],m=t[8]),b.useEffect(y,m);let d;return t[9]!==v||t[10]!==l?(d=[l,v],t[9]=v,t[10]=l,t[11]=d):d=t[11],d}function X(i){const e=N.c(20),{namespace:t,resource:c,defaultSortKey:r,defaultViewMode:s}=i,o=r===void 0?"title":r,a=s===void 0?"table":s,[l,p]=b.useState(""),j=b.useDeferredValue(l),v=`${t}-${c}`,[y,m]=W(v),d=`mesh-${c}-filter-visible-${t}`;let f;e[0]!==d?(f=()=>globalThis.localStorage?.getItem(d)==="true",e[0]=d,e[1]=f):f=e[1];const[S,E]=b.useState(f);let u;e[2]!==d?(u=T=>{E(T),globalThis.localStorage?.setItem(d,String(T))},e[2]=d,e[3]=u):u=e[3];const n=u;let g;e[4]!==S||e[5]!==n?(g=()=>{n(!S)},e[4]=S,e[5]=n,e[6]=g):g=e[6];const h=g,[w,M]=q(`mesh-${c}-${t}`,a),{sortKey:k,sortDirection:K,handleSort:F}=z(o),V=k;let $;return e[7]!==S||e[8]!==y||e[9]!==F||e[10]!==l||e[11]!==j||e[12]!==n||e[13]!==m||e[14]!==M||e[15]!==K||e[16]!==V||e[17]!==h||e[18]!==w?($={search:l,searchTerm:j,setSearch:p,filters:y,setFilters:m,filterBarVisible:S,setFilterBarVisible:n,toggleFilterBar:h,viewMode:w,setViewMode:M,sortKey:V,sortDirection:K,handleSort:F},e[7]=S,e[8]=y,e[9]=F,e[10]=l,e[11]=j,e[12]=n,e[13]=m,e[14]=M,e[15]=K,e[16]=V,e[17]=h,e[18]=w,e[19]=$):$=e[19],$}export{H as U,A as s,X as u};
1
+ import{r as b,c as N,u as B,K as I,j as x}from"./index-BKpxPW_G.js";import{A as _}from"./avatar-kY9raA-l.js";import{c as C}from"./utils-Ckp7rFN8.js";import{u as L}from"./useQuery-Bo6lCSyK.js";import{a as U,u as D}from"./constants-DisdEZ3l.js";import{u as P}from"./use-mobile-Cu9U-yCu.js";const A=({size:i=24,color:e="currentColor",...t})=>b.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},b.createElement("path",{d:"M2.42 12.713c-.136-.215-.204-.323-.242-.49a1.173 1.173 0 0 1 0-.446c.038-.167.106-.274.242-.49C3.546 9.505 6.895 5 12 5s8.455 4.505 9.58 6.287c.137.215.205.323.243.49.029.125.029.322 0 .446-.038.167-.106.274-.242.49C20.455 14.495 17.105 19 12 19c-5.106 0-8.455-4.505-9.58-6.287Z"}),b.createElement("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"}));A.displayName="Eye";function R(i){const e=N.c(11),{org:t}=B();let c;e[0]!==t.id?(c={connectionId:U,orgId:t.id},e[0]=t.id,e[1]=c):c=e[1];const r=D(c);let s;e[2]!==i?(s=I.user(i),e[2]=i,e[3]=s):s=e[3];let o;e[4]!==r||e[5]!==i?(o=async()=>{const p=await r.callTool({name:"USER_GET",arguments:{id:i}});return(p.structuredContent??p).user},e[4]=r,e[5]=i,e[6]=o):o=e[6];const a=!!i;let l;return e[7]!==s||e[8]!==o||e[9]!==a?(l={queryKey:s,queryFn:o,staleTime:3e5,retry:1,enabled:a},e[7]=s,e[8]=o,e[9]=a,e[10]=l):l=e[10],L(l)}function H(i){const e=N.c(39),{id:t,size:c,showEmail:r,className:s}=i,o=c===void 0?"xs":c,a=r===void 0?!1:r,{data:l,isLoading:p,isError:j}=R(t);if(p){let u;e[0]!==s?(u=C("flex items-center gap-2",s),e[0]=s,e[1]=u):u=e[1];let n;e[2]!==o?(n=x.jsx(_.Skeleton,{shape:"circle",size:o}),e[2]=o,e[3]=n):n=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=x.jsx("div",{className:"h-3 w-24 bg-muted animate-pulse rounded"}),e[4]=g):g=e[4];let h;e[5]!==a?(h=a&&x.jsx("div",{className:"h-2 w-32 bg-muted animate-pulse rounded"}),e[5]=a,e[6]=h):h=e[6];let w;e[7]!==h?(w=x.jsxs("div",{className:"flex flex-col gap-1",children:[g,h]}),e[7]=h,e[8]=w):w=e[8];let M;return e[9]!==u||e[10]!==n||e[11]!==w?(M=x.jsxs("div",{className:u,children:[n,w]}),e[9]=u,e[10]=n,e[11]=w,e[12]=M):M=e[12],M}if(j||!l){let u;e[13]!==s?(u=C("flex items-center gap-2",s),e[13]=s,e[14]=u):u=e[14];let n;e[15]!==o?(n=x.jsx(_,{shape:"circle",size:o,fallback:"?",muted:!0}),e[15]=o,e[16]=n):n=e[16];let g;e[17]===Symbol.for("react.memo_cache_sentinel")?(g=x.jsx("div",{className:"flex flex-col",children:x.jsx("div",{className:"text-sm text-muted-foreground",children:"Unknown User"})}),e[17]=g):g=e[17];let h;return e[18]!==u||e[19]!==n?(h=x.jsxs("div",{className:u,children:[n,g]}),e[18]=u,e[19]=n,e[20]=h):h=e[20],h}let v;e[21]!==s?(v=C("flex items-center gap-2",s),e[21]=s,e[22]=v):v=e[22];const y=l.image??void 0;let m;e[23]!==o||e[24]!==y||e[25]!==l.name?(m=x.jsx(_,{shape:"circle",size:o,url:y,fallback:l.name}),e[23]=o,e[24]=y,e[25]=l.name,e[26]=m):m=e[26];let d;e[27]!==l.name?(d=x.jsx("div",{className:"text-sm font-medium",children:l.name}),e[27]=l.name,e[28]=d):d=e[28];let f;e[29]!==a||e[30]!==l.email?(f=a&&x.jsx("div",{className:"text-xs text-muted-foreground",children:l.email}),e[29]=a,e[30]=l.email,e[31]=f):f=e[31];let S;e[32]!==d||e[33]!==f?(S=x.jsxs("div",{className:"flex flex-col",children:[d,f]}),e[32]=d,e[33]=f,e[34]=S):S=e[34];let E;return e[35]!==v||e[36]!==m||e[37]!==S?(E=x.jsxs("div",{className:v,children:[m,S]}),e[35]=v,e[36]=m,e[37]=S,e[38]=E):E=e[38],E}function W(i){const e=`deco-filters-${i}`,[t,c]=b.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=>{c(s);try{globalThis.localStorage?.setItem(e,JSON.stringify(s))}catch(o){console.error("Failed to save filters:",o)}}]}function z(i){const e=N.c(7),[t,c]=b.useState(i),[r,s]=b.useState(i?"desc":null);let o;e[0]!==r||e[1]!==t?(o=p=>{t!==p?(c(p),s("asc")):r==="asc"?s("desc"):r==="desc"&&(c(void 0),s(null))},e[0]=r,e[1]=t,e[2]=o):o=e[2];const a=o;let l;return e[3]!==a||e[4]!==r||e[5]!==t?(l={sortKey:t,sortDirection:r,handleSort:a},e[3]=a,e[4]=r,e[5]=t,e[6]=l):l=e[6],l}function q(i,e){const t=N.c(12),c=e===void 0?"cards":e,r=P(),s=b.useRef(r),o=i?`deco-view-mode-${i}`:"deco-view-mode";let a;t[0]!==c||t[1]!==o?(a=()=>{const f=globalThis.localStorage?.getItem(o);return f==="cards"||f==="table"?f:c},t[0]=c,t[1]=o,t[2]=a):a=t[2];const[l,p]=b.useState(a);let j;t[3]!==o?(j=f=>{p(f),globalThis.localStorage?.setItem(o,f)},t[3]=o,t[4]=j):j=t[4];const v=j;let y,m;t[5]!==r||t[6]!==l?(y=()=>{!s.current&&r&&l==="table"&&p("cards"),s.current=r},m=[r,l],t[5]=r,t[6]=l,t[7]=y,t[8]=m):(y=t[7],m=t[8]),b.useEffect(y,m);let d;return t[9]!==v||t[10]!==l?(d=[l,v],t[9]=v,t[10]=l,t[11]=d):d=t[11],d}function X(i){const e=N.c(20),{namespace:t,resource:c,defaultSortKey:r,defaultViewMode:s}=i,o=r===void 0?"title":r,a=s===void 0?"table":s,[l,p]=b.useState(""),j=b.useDeferredValue(l),v=`${t}-${c}`,[y,m]=W(v),d=`mesh-${c}-filter-visible-${t}`;let f;e[0]!==d?(f=()=>globalThis.localStorage?.getItem(d)==="true",e[0]=d,e[1]=f):f=e[1];const[S,E]=b.useState(f);let u;e[2]!==d?(u=T=>{E(T),globalThis.localStorage?.setItem(d,String(T))},e[2]=d,e[3]=u):u=e[3];const n=u;let g;e[4]!==S||e[5]!==n?(g=()=>{n(!S)},e[4]=S,e[5]=n,e[6]=g):g=e[6];const h=g,[w,M]=q(`mesh-${c}-${t}`,a),{sortKey:k,sortDirection:K,handleSort:F}=z(o),V=k;let $;return e[7]!==S||e[8]!==y||e[9]!==F||e[10]!==l||e[11]!==j||e[12]!==n||e[13]!==m||e[14]!==M||e[15]!==K||e[16]!==V||e[17]!==h||e[18]!==w?($={search:l,searchTerm:j,setSearch:p,filters:y,setFilters:m,filterBarVisible:S,setFilterBarVisible:n,toggleFilterBar:h,viewMode:w,setViewMode:M,sortKey:V,sortDirection:K,handleSort:F},e[7]=S,e[8]=y,e[9]=F,e[10]=l,e[11]=j,e[12]=n,e[13]=m,e[14]=M,e[15]=K,e[16]=V,e[17]=h,e[18]=w,e[19]=$):$=e[19],$}export{H as U,A as s,X as u};
@@ -1 +1 @@
1
- import{c,u}from"./index-HxeE9C0A.js";import{h as m,e as a}from"./use-connection-DWpxH8iy.js";import{j as p}from"./constants-BEco_-y7.js";import{a as C}from"./use-binding-BIvDtNoa.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-BKpxPW_G.js";import{h as m,e as a}from"./use-connection-B0740Saa.js";import{j as p}from"./constants-DisdEZ3l.js";import{a as C}from"./use-binding-DMsO_03X.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 u,y as c}from"./index-HxeE9C0A.js";import{u as p}from"./useQuery-jRtVXI31.js";import{K as n}from"./constants-BEco_-y7.js";async function f(l){return l.getServerCapabilities()?.resources?await l.listResources():{resources:[]}}async function b(l,e){return await l.readResource({uri:e})}function R(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function L(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}async function m(l){return l.getServerCapabilities()?.prompts?await l.listPrompts():{prompts:[]}}async function T(l,e,t){if(!l.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await l.getPrompt({name:e,arguments:t??{}})}function g(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function C(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}export{f as a,C as b,R as c,L as d,T as g,m as l,b as r,g as u};
1
+ import{c as u,y as c}from"./index-BKpxPW_G.js";import{u as p}from"./useQuery-Bo6lCSyK.js";import{K as n}from"./constants-DisdEZ3l.js";async function f(l){return l.getServerCapabilities()?.resources?await l.listResources():{resources:[]}}async function b(l,e){return await l.readResource({uri:e})}function R(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function L(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpResourcesList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>f(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}async function m(l){return l.getServerCapabilities()?.prompts?await l.listPrompts():{prompts:[]}}async function T(l,e,t){if(!l.getServerCapabilities()?.prompts)throw new Error("Prompts capability not supported");return await l.getPrompt({name:e,arguments:t??{}})}function g(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],c(a)}function C(l){const e=u.c(12);let t,s;e[0]!==l?({client:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n.mcpPromptsList(t),e[3]=t,e[4]=r):r=e[4];let i;e[5]!==t?(i=()=>m(t),e[5]=t,e[6]=i):i=e[6];const o=s.staleTime??3e4;let a;return e[7]!==s||e[8]!==r||e[9]!==i||e[10]!==o?(a={...s,queryKey:r,queryFn:i,staleTime:o,retry:!1},e[7]=s,e[8]=r,e[9]=i,e[10]=o,e[11]=a):a=e[11],p(a)}export{f as a,C as b,R as c,L as d,T as g,m as l,b as r,g as u};
@@ -1 +1 @@
1
- import{c as m,y as p}from"./index-HxeE9C0A.js";import{u as q}from"./useQuery-jRtVXI31.js";import{u as C}from"./useMutation-M3-wug2Q.js";import{K as T}from"./constants-BEco_-y7.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,y as p}from"./index-BKpxPW_G.js";import{u as q}from"./useQuery-Bo6lCSyK.js";import{u as C}from"./useMutation-Bnsod7M-.js";import{K as T}from"./constants-DisdEZ3l.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-HxeE9C0A.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-BKpxPW_G.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,y as A,z as d,K as g}from"./index-HxeE9C0A.js";import{u as _}from"./useMutation-M3-wug2Q.js";import{a as p,u as y}from"./constants-BEco_-y7.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=y(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}=A(n);return o}function G(e){const t=m.c(13),i=d(),{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=y(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,y as A,z as d,K as g}from"./index-BKpxPW_G.js";import{u as _}from"./useMutation-Bnsod7M-.js";import{a as p,u as y}from"./constants-DisdEZ3l.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=y(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}=A(n);return o}function G(e){const t=m.c(13),i=d(),{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=y(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}from"./index-HxeE9C0A.js";import{u as y}from"./useQuery-jRtVXI31.js";import{u as f,a}from"./constants-BEco_-y7.js";function q(t,s){const e=C.c(13);let l;e[0]!==t?(l={connectionId:a,orgId:t},e[0]=t,e[1]=l):l=e[1];const u=f(l);let r;e[2]!==t||e[3]!==s?(r=m.project(t,s),e[2]=t,e[3]=s,e[4]=r):r=e[4];let c;e[5]!==u||e[6]!==t||e[7]!==s?(c=async()=>{const p=await u.callTool({name:"PROJECT_GET",arguments:{organizationId:t,slug:s}});return(p.structuredContent??p).project},e[5]=u,e[6]=t,e[7]=s,e[8]=c):c=e[8];const n=!!t&&!!s;let o;return e[9]!==r||e[10]!==c||e[11]!==n?(o={queryKey:r,queryFn:c,enabled:n,staleTime:3e4},e[9]=r,e[10]=c,e[11]=n,e[12]=o):o=e[12],y(o)}function _(t,s){const e=f({connectionId:a,orgId:t}),l={queryKey:m.projects(t),queryFn:async()=>{const u=await e.callTool({name:"PROJECT_LIST",arguments:{organizationId:t}});return(u.structuredContent??u).projects.map(c=>({...c,organizationId:t}))},staleTime:3e4};return y({...l,enabled:!!t})}export{_ as a,q as u};
1
+ import{K as m,c as C}from"./index-BKpxPW_G.js";import{u as y}from"./useQuery-Bo6lCSyK.js";import{u as f,a}from"./constants-DisdEZ3l.js";function q(t,s){const e=C.c(13);let l;e[0]!==t?(l={connectionId:a,orgId:t},e[0]=t,e[1]=l):l=e[1];const u=f(l);let r;e[2]!==t||e[3]!==s?(r=m.project(t,s),e[2]=t,e[3]=s,e[4]=r):r=e[4];let c;e[5]!==u||e[6]!==t||e[7]!==s?(c=async()=>{const p=await u.callTool({name:"PROJECT_GET",arguments:{organizationId:t,slug:s}});return(p.structuredContent??p).project},e[5]=u,e[6]=t,e[7]=s,e[8]=c):c=e[8];const n=!!t&&!!s;let o;return e[9]!==r||e[10]!==c||e[11]!==n?(o={queryKey:r,queryFn:c,enabled:n,staleTime:3e4},e[9]=r,e[10]=c,e[11]=n,e[12]=o):o=e[12],y(o)}function _(t,s){const e=f({connectionId:a,orgId:t}),l={queryKey:m.projects(t),queryFn:async()=>{const u=await e.callTool({name:"PROJECT_LIST",arguments:{organizationId:t}});return(u.structuredContent??u).projects.map(c=>({...c,organizationId:t}))},staleTime:3e4};return y({...l,enabled:!!t})}export{_ as a,q as u};
@@ -1 +1 @@
1
- import{c,u as r}from"./index-HxeE9C0A.js";import{e as a,u as C,d as I}from"./use-connection-DWpxH8iy.js";import{a as l,u}from"./constants-BEco_-y7.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-BKpxPW_G.js";import{e as a,u as C,d as I}from"./use-connection-B0740Saa.js";import{a as l,u}from"./constants-DisdEZ3l.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-B8M15Jhm.js";import{a5 as i}from"./index-BKpxPW_G.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-HxeE9C0A.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{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-BKpxPW_G.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-BKpxPW_G.js";function o(e,r){return u(e,s,r)}export{o as u};
@@ -0,0 +1 @@
1
+ import{ac as a,ad as c}from"./index-BKpxPW_G.js";function e(...r){return a(c(r))}export{e as c};
@@ -1 +1 @@
1
- import{c as Y,r as V,j as i}from"./index-HxeE9C0A.js";import{c as n}from"./utils-D1Qd9-I_.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};
1
+ import{c as Y,r as V,j as i}from"./index-BKpxPW_G.js";import{c as n}from"./utils-Ckp7rFN8.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};
@@ -1 +1 @@
1
- import{u as P,g as z,m as M,r as E,j as t,O as L,c as _,aM as A}from"./index-HxeE9C0A.js";import{e as F}from"./constants-BEco_-y7.js";import{C as T}from"./collection-tab-Y58MHDMK.js";import{g as G,h as H}from"./use-connection-DWpxH8iy.js";import{B as w}from"./button-C1iesapY.js";import{E as U}from"./empty-state-CH3e4Xzf.js";import{E as D,i as J}from"./error-boundary-BGFWaL1J.js";import{P as y}from"./index-wUnd_o-U.js";import{B as V,a as q,b as Q,c as X}from"./breadcrumb-t_Ccp20G.js";import{a as Y,b as Z}from"./use-binding-BIvDtNoa.js";import{i as K}from"./Loading01-CudhqwtJ.js";import{s as ee}from"./RefreshCcw01-Dzlid7sh.js";import{a as te}from"./Settings02-CW4MK9LY.js";import"./generate-id-Dyweu44Y.js";import"./collection-table-wrapper-B6XWzQ-4.js";import"./dropdown-menu-D6YYwFq7.js";import"./ChevronRight-CNYkXy1u.js";import"./utils-D1Qd9-I_.js";import"./ArrowUp-DVhz9MPT.js";import"./Check-BIlnRzi6.js";import"./Grid01-BhCIE3UE.js";import"./List-B95opsr5.js";import"./integration-icon-CmJggqPx.js";import"./index-ByJoFAq_.js";import"./view-mode-toggle-JVmuLwXe.js";import"./table-F_F9uG31.js";import"./collection-search-D3a5_1zR.js";import"./SearchMd-yRVgOeax.js";import"./input-DBGu1Yhi.js";import"./card-DKzkS6ji.js";import"./Copy01-BJPi2nBZ.js";import"./DotsVertical-CPJps54j.js";import"./Edit01-CLT1AKyh.js";import"./use-list-state-CqdwrHCA.js";import"./avatar-BbH9O0kN.js";import"./useQuery-jRtVXI31.js";import"./use-mobile-CqANtQ4e.js";import"./Trash01-py7ft8Od.js";import"./empty-state-BQPtoYZe.js";import"./Inbox01-Bz-1SNbb.js";import"./constants-gwxE8_b0.js";import"./alert-dialog-B1nWkQHx.js";import"./Plus-BVPnBK8D.js";import"./layout-BQSZy0Ao.js";import"./useMutation-M3-wug2Q.js";import"./binder-xcUkLvPC.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=M(),[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=Y(m)[0],N=Z(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(Q,{children:t.jsx(X,{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(A,{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(K,{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 Xe(){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:F()}),n[0]=e):e=n[0],e}export{Xe as default};
1
+ import{u as P,g as z,m as M,r as E,j as t,O as L,c as _,aM as A}from"./index-BKpxPW_G.js";import{e as F}from"./constants-DisdEZ3l.js";import{C as T}from"./collection-tab-Dw5b9EM9.js";import{g as G,h as H}from"./use-connection-B0740Saa.js";import{B as w}from"./button-D_OpQIQm.js";import{E as U}from"./empty-state-DXJM9xrV.js";import{E as D,i as J}from"./error-boundary-BMH0CjEH.js";import{P as y}from"./index-B9-4goiW.js";import{B as V,a as q,b as Q,c as X}from"./breadcrumb-ChH6wfcA.js";import{a as Y,b as Z}from"./use-binding-DMsO_03X.js";import{i as K}from"./Loading01-C2vqzEw-.js";import{s as ee}from"./RefreshCcw01-B1tus5Lj.js";import{a as te}from"./Settings02-BiTxgSpC.js";import"./generate-id-Dyweu44Y.js";import"./collection-table-wrapper-DFTdnQhc.js";import"./dropdown-menu-BxLN4KkF.js";import"./ChevronRight-DMzFQQCc.js";import"./utils-Ckp7rFN8.js";import"./ArrowUp-D26ZQKRa.js";import"./Check-bgVFNRDs.js";import"./Grid01-CfSiTcO8.js";import"./List-BBkbo-oe.js";import"./integration-icon-DFSc5_D8.js";import"./index-fVGDVKMq.js";import"./view-mode-toggle-4jMhv4Z3.js";import"./table-BxUix49E.js";import"./collection-search-Bkd4qN8a.js";import"./SearchMd-BqVXNd65.js";import"./input-lpAGMNlp.js";import"./card-DAZxrY9k.js";import"./Copy01-C35WeFYE.js";import"./DotsVertical-BNqPYTki.js";import"./Edit01-DDrpQJgk.js";import"./use-list-state-DNfSCsX5.js";import"./avatar-kY9raA-l.js";import"./useQuery-Bo6lCSyK.js";import"./use-mobile-Cu9U-yCu.js";import"./Trash01-d4v7i3Ze.js";import"./empty-state-CbIU_RrP.js";import"./Inbox01-Bhe6QhSW.js";import"./constants-1u4R2d-I.js";import"./alert-dialog-DRso9X1m.js";import"./Plus-BMOTPGqH.js";import"./layout-DaBTH10o.js";import"./useMutation-Bnsod7M-.js";import"./binder-Jddq1y1v.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=M(),[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=Y(m)[0],N=Z(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(Q,{children:t.jsx(X,{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(A,{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(K,{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 Xe(){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:F()}),n[0]=e):e=n[0],e}export{Xe as default};