@decocms/mesh 2.123.4 → 2.123.5

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 (185) hide show
  1. package/dist/client/assets/{AlertCircle-DiDJuuO7.js → AlertCircle-e9vRKWVt.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-T8X2xR5Y.js → AlertOctagon-CNHeyyqI.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-BR7J9Jvh.js → AlertTriangle-cnBbzVPi.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CZ4ZZXqO.js → ArrowLeft-TcoC4WAS.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CBTnQfpb.js → ArrowUp-C9QbeSMz.js} +1 -1
  6. package/dist/client/assets/{Check-ebSdGxZp.js → Check-EA1ayL22.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-BX10u03U.js → CheckCircle-xWFK4Wk3.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-BKZeNjYI.js → CheckDone01-BOMbg_rH.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-Bc-TzDsw.js → CheckVerified02-4QT-kdyE.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-BxrIQ2Hg.js → ChevronDown-xG1flmUs.js} +1 -1
  11. package/dist/client/assets/{ChevronRight-D1zpPr9G.js → ChevronRight-C9tH4CkK.js} +1 -1
  12. package/dist/client/assets/{Clock-ByTlM-Ae.js → Clock-BcphCi5B.js} +1 -1
  13. package/dist/client/assets/{Code01-62o0ASv5.js → Code01-ADQg-6t7.js} +1 -1
  14. package/dist/client/assets/{Container-Cr2TCDTS.js → Container-CxXUVDpa.js} +1 -1
  15. package/dist/client/assets/{Copy01-CfVZSokb.js → Copy01-Dv-qbf9Z.js} +1 -1
  16. package/dist/client/assets/{Dataflow03-CEYvQeh9.js → Dataflow03-B87skZTy.js} +1 -1
  17. package/dist/client/assets/{DotsHorizontal-D_wKOZTi.js → DotsHorizontal-DHYMLP_1.js} +1 -1
  18. package/dist/client/assets/{DotsVertical-BNJZVkhj.js → DotsVertical-CWcpvKQb.js} +1 -1
  19. package/dist/client/assets/{Download01-CMusldak.js → Download01-BjOSY-hg.js} +1 -1
  20. package/dist/client/assets/{Edit01-BySGjbs-.js → Edit01-Bc5S6NRh.js} +1 -1
  21. package/dist/client/assets/{Eye-Wh_bq-Y4.js → Eye-C8kM8O8_.js} +1 -1
  22. package/dist/client/assets/{File02-Drnn3tnJ.js → File02-BUAk_Mxv.js} +1 -1
  23. package/dist/client/assets/{File06-CL04kImU.js → File06-DiS1m4o9.js} +1 -1
  24. package/dist/client/assets/{FilterLines-DgwYDfry.js → FilterLines-BwKo1iZw.js} +1 -1
  25. package/dist/client/assets/{Globe01-BMVTN5_w.js → Globe01-4jB_rpuY.js} +1 -1
  26. package/dist/client/assets/{Globe02-BD3ZCWms.js → Globe02-CT2c-Sr-.js} +1 -1
  27. package/dist/client/assets/{Grid01-BWcrgmNx.js → Grid01-D2I-nDSy.js} +1 -1
  28. package/dist/client/assets/{Hash02-Dqi3bcQt.js → Hash02-CzXz7icr.js} +1 -1
  29. package/dist/client/assets/{Home02-lTWiIHtK.js → Home02-BA7Zg0e7.js} +1 -1
  30. package/dist/client/assets/{Image01-DcX1niB5.js → Image01-DNFNbFFa.js} +1 -1
  31. package/dist/client/assets/{Inbox01-8_gDqife.js → Inbox01-B0U3vj2i.js} +1 -1
  32. package/dist/client/assets/{InfoCircle-BKPaDpeK.js → InfoCircle-BGj0zA50.js} +1 -1
  33. package/dist/client/assets/{Key01-CyWdmMm6.js → Key01-CXgWd4vy.js} +1 -1
  34. package/dist/client/assets/{LinkExternal01-DPNrtGWV.js → LinkExternal01-DYnfy1wV.js} +1 -1
  35. package/dist/client/assets/{List-DqeEnxu3.js → List-DGxlSM0E.js} +1 -1
  36. package/dist/client/assets/{Loading01-BZRHfswB.js → Loading01-KCITfr7g.js} +1 -1
  37. package/dist/client/assets/{Lock01-BDqkVPGz.js → Lock01-CdxVQsk2.js} +1 -1
  38. package/dist/client/assets/{Pin01-BDMJN64-.js → Pin01-u382yYSC.js} +1 -1
  39. package/dist/client/assets/{Play-BKXV9SNy.js → Play-D_UDCjeV.js} +1 -1
  40. package/dist/client/assets/{Plus-YlJja9E2.js → Plus-BNEEXEVt.js} +1 -1
  41. package/dist/client/assets/{RefreshCcw01-Ci0qepHw.js → RefreshCcw01-BpGtyqTA.js} +1 -1
  42. package/dist/client/assets/{RefreshCw01-Sv3Ciq4-.js → RefreshCw01-k0GFakzy.js} +1 -1
  43. package/dist/client/assets/{Rows03-DjbwBGBI.js → Rows03-nEjgsj7h.js} +1 -1
  44. package/dist/client/assets/{Save01-CUHpjboy.js → Save01-BbS0C0s1.js} +1 -1
  45. package/dist/client/assets/{SearchMd-CdY2Qz31.js → SearchMd-DqymgKbi.js} +1 -1
  46. package/dist/client/assets/{Settings01-hHMZndAB.js → Settings01-DB_FXn41.js} +1 -1
  47. package/dist/client/assets/{Shield01-BC6B_xBt.js → Shield01-83aA2EpW.js} +1 -1
  48. package/dist/client/assets/{Terminal-D2rGQta9.js → Terminal-D70UGODi.js} +1 -1
  49. package/dist/client/assets/{Tool01-8K3JOGke.js → Tool01-Gadnesxv.js} +1 -1
  50. package/dist/client/assets/{Trash01-DjSET-_p.js → Trash01-Ve8IhEa-.js} +1 -1
  51. package/dist/client/assets/{Upload01-C0CPwbYb.js → Upload01-BM2mkCav.js} +1 -1
  52. package/dist/client/assets/{Users03-BiJcw06H.js → Users03-CgNWgARv.js} +1 -1
  53. package/dist/client/assets/{XCircle-oJlXTAnn.js → XCircle-I5P8gQFi.js} +1 -1
  54. package/dist/client/assets/{XClose-CNjsPY9p.js → XClose-Ds_Z25Px.js} +1 -1
  55. package/dist/client/assets/{agent-connections-preview-CyTgEjXK.js → agent-connections-preview-DjlpVnu5.js} +1 -1
  56. package/dist/client/assets/{agent-detail-9DFcapAu.js → agent-detail-D2ISZyix.js} +1 -1
  57. package/dist/client/assets/{agents-4gtiAnuv.js → agents-DOdcUWzi.js} +1 -1
  58. package/dist/client/assets/{alert-dialog-DG1mgLiN.js → alert-dialog-97XFXZ7z.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-BSjXqHGj.js → auth-catchall-QQUziPMo.js} +1 -1
  60. package/dist/client/assets/{avatar-CLzAk7bk.js → avatar-CSAt9Xy0.js} +1 -1
  61. package/dist/client/assets/{badge-zj5rJqFG.js → badge-CmYXzetd.js} +1 -1
  62. package/dist/client/assets/{binder-Yx0eVQL7.js → binder-DYyCY7OY.js} +1 -1
  63. package/dist/client/assets/{breadcrumb-p3FP4YzT.js → breadcrumb-C8XV9Tx6.js} +1 -1
  64. package/dist/client/assets/{button-BlFVi9O-.js → button-BCe1bdkY.js} +1 -1
  65. package/dist/client/assets/{card-C5XZXHnb.js → card-CPMQS2Ob.js} +1 -1
  66. package/dist/client/assets/{chart-CECGc95G.js → chart-BkpAbHOw.js} +1 -1
  67. package/dist/client/assets/{checkbox-C81GTltZ.js → checkbox-CwkaBsQF.js} +1 -1
  68. package/dist/client/assets/{circle-alert-DTrbbil0.js → circle-alert-Bm720OZV.js} +1 -1
  69. package/dist/client/assets/{collection-detail-DC6lEGsR.js → collection-detail-BFUjMKO2.js} +1 -1
  70. package/dist/client/assets/{collection-tab-dYtQ3dOc.js → collection-tab-CrrbTDng.js} +1 -1
  71. package/dist/client/assets/{collection-table-wrapper-D3UQPYYs.js → collection-table-wrapper-CXjGnlMm.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-DXae7bMN.js → collection-tabs-BHN2S0hU.js} +1 -1
  73. package/dist/client/assets/{command-C0Lk3OoX.js → command-Pq6xcJWI.js} +1 -1
  74. package/dist/client/assets/{connect-B0zgap2s.js → connect-DQK3gKkY.js} +1 -1
  75. package/dist/client/assets/{connection-card-Bfx8qlqL.js → connection-card-BpGIljul.js} +1 -1
  76. package/dist/client/assets/{connection-detail-CFl60IV3.js → connection-detail-BqvjF6X1.js} +1 -1
  77. package/dist/client/assets/{connections-40Z9p3na.js → connections-BY5LbGWi.js} +1 -1
  78. package/dist/client/assets/{constants-DS4O9R8r.js → constants-BHgsXonC.js} +1 -1
  79. package/dist/client/assets/constants-CsU2_t5q.js +1 -0
  80. package/dist/client/assets/{context-CJpih0Aq.js → context-L0w3Lka_.js} +2 -2
  81. package/dist/client/assets/{create-organization-dialog-BFIfEtVL.js → create-organization-dialog-CBFtj5S8.js} +1 -1
  82. package/dist/client/assets/{create-project-dialog-D2mtQ7wt.js → create-project-dialog-D6D5900x.js} +1 -1
  83. package/dist/client/assets/deco-constants-0EY--BSu.js +1 -0
  84. package/dist/client/assets/{dialog-BED3woG1.js → dialog-CtlwZ0jC.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-Db2R0f6-.js → dropdown-menu-DrduhkS0.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-BzLyvc2d.js → dynamic-plugin-layout-B2-8YMnE.js} +1 -1
  87. package/dist/client/assets/{empty-state-CIZqXQMR.js → empty-state-Ar7E8UGz.js} +1 -1
  88. package/dist/client/assets/{empty-state-DwKYfPjb.js → empty-state-Cme5CLy_.js} +1 -1
  89. package/dist/client/assets/{env-vars-editor-CDWwUXgx.js → env-vars-editor-CULzWCmD.js} +1 -1
  90. package/dist/client/assets/{error-boundary-DFWzxGF2.js → error-boundary-CEwcdDux.js} +1 -1
  91. package/dist/client/assets/{extract-connection-data-1y_2LKN1.js → extract-connection-data-D0wplOp-.js} +1 -1
  92. package/dist/client/assets/{file-browser-BLbb-Y8y.js → file-browser-BgdKdkl_.js} +2 -2
  93. package/dist/client/assets/{form-DdvC8UfL.js → form-CKVYRQ0T.js} +1 -1
  94. package/dist/client/assets/{grid-view-CqSeu3_O.js → grid-view-Co3RRJOJ.js} +1 -1
  95. package/dist/client/assets/{home-DlTcQ85K.js → home-DznUdggS.js} +1 -1
  96. package/dist/client/assets/{index-Cs9SJKB2.js → index-2W7jwMtr.js} +1 -1
  97. package/dist/client/assets/{index-C5tdq0OE.js → index-CcDRz5PD.js} +1 -1
  98. package/dist/client/assets/{index-CNFSBpm2.js → index-Cn654U6b.js} +1 -1
  99. package/dist/client/assets/{index-Chdo1wOf.js → index-D9HmjKFM.js} +3 -3
  100. package/dist/client/assets/{index-6Tp9fsVX.js → index-DT392Y-e.js} +1 -1
  101. package/dist/client/assets/{index-Bb5ajAZZ.js → index-DX0MTN78.js} +1 -1
  102. package/dist/client/assets/{index-D8_oQFvH.js → index-Dn7aggDn.js} +1 -1
  103. package/dist/client/assets/{index-BG2jkRwM.js → index-k8Oe2hAn.js} +1 -1
  104. package/dist/client/assets/{infiniteQueryObserver-DOxbID_2.js → infiniteQueryObserver-D6Tb66x3.js} +1 -1
  105. package/dist/client/assets/{input-C2bYHqSZ.js → input-Dh6_kcmG.js} +1 -1
  106. package/dist/client/assets/{integration-icon-CHfvIBul.js → integration-icon-cQ6g2UTs.js} +1 -1
  107. package/dist/client/assets/{label-Cz00Hk_C.js → label-BMznY53d.js} +1 -1
  108. package/dist/client/assets/{layout-D8HdJww7.js → layout-Czw_4tYq.js} +1 -1
  109. package/dist/client/assets/{localstorage-keys-D6jY_B8O.js → localstorage-keys-CiUgmUPA.js} +1 -1
  110. package/dist/client/assets/{login-B4sEC044.js → login-Btb0l3uq.js} +1 -1
  111. package/dist/client/assets/{markdown-W0glOUUc.js → markdown-U-heFZhR.js} +1 -1
  112. package/dist/client/assets/{mcp-oauth-CxZiVIG0.js → mcp-oauth-B9YTiwC5.js} +1 -1
  113. package/dist/client/assets/{mcp-server-card-MyE_33s4.js → mcp-server-card-BG1M4TxF.js} +1 -1
  114. package/dist/client/assets/{mcp-server-detail-DPKP-AVk.js → mcp-server-detail-B9DpOKRj.js} +2 -2
  115. package/dist/client/assets/{members-C0wNcB0L.js → members-BgBfar63.js} +1 -1
  116. package/dist/client/assets/{monitoring-DnyUAZQs.js → monitoring-BE-L8s7T.js} +1 -1
  117. package/dist/client/assets/{monitoring-dashboard-edit-CeSLs60r.js → monitoring-dashboard-edit-D1JRXMr3.js} +1 -1
  118. package/dist/client/assets/{monitoring-dashboard-view-CXYrse_E.js → monitoring-dashboard-view-BIzOH-Jz.js} +1 -1
  119. package/dist/client/assets/{oauth-callback-CtEIzTst.js → oauth-callback-BXtPanrp.js} +1 -1
  120. package/dist/client/assets/{page-BaeXPwI_.js → page-Ce7Y9dmM.js} +1 -1
  121. package/dist/client/assets/{page-wIVLNXO6.js → page-EpeWbq1x.js} +1 -1
  122. package/dist/client/assets/{plugin-empty-state-C3dQRExn.js → plugin-empty-state-BofxsUhg.js} +1 -1
  123. package/dist/client/assets/{plugin-empty-state-CtOLvnau.js → plugin-empty-state-ChEPKOiF.js} +1 -1
  124. package/dist/client/assets/{plugin-header-BpYtnCvY.js → plugin-header-DOkBj305.js} +1 -1
  125. package/dist/client/assets/{plugin-header-wMO8zy_s.js → plugin-header-Lsd9YZZT.js} +1 -1
  126. package/dist/client/assets/{popover-B4On8gSm.js → popover-eropQyy1.js} +1 -1
  127. package/dist/client/assets/project-layout-xiFU-30r.js +1 -0
  128. package/dist/client/assets/{projects-list-DNSZsINF.js → projects-list-CRX29G8Z.js} +1 -1
  129. package/dist/client/assets/{ranking-layout-BgeMngBH.js → ranking-layout-CBbuyeVt.js} +1 -1
  130. package/dist/client/assets/{readme-viewer-gb5hrmSg.js → readme-viewer-DZxyjAz3.js} +1 -1
  131. package/dist/client/assets/{registry-layout-Cyki9u_h.js → registry-layout-O1Li2ya2.js} +1 -1
  132. package/dist/client/assets/{registry-utils-BL6Np0uD.js → registry-utils-CyMutbQd.js} +1 -1
  133. package/dist/client/assets/{reports-layout-DImwy6ND.js → reports-layout-BFKmzSSH.js} +1 -1
  134. package/dist/client/assets/{reset-password-ButVRXi9.js → reset-password-DShMbyV1.js} +1 -1
  135. package/dist/client/assets/{resizable-DUdJ1A_O.js → resizable-BG9z6Y7B.js} +1 -1
  136. package/dist/client/assets/{save-actions-BiCpAXjr.js → save-actions-B-kfZtU1.js} +1 -1
  137. package/dist/client/assets/{scroll-area-C9Z4g4D3.js → scroll-area-CtvEyO8q.js} +1 -1
  138. package/dist/client/assets/{select-DwyzrBGR.js → select-CTboIb4n.js} +1 -1
  139. package/dist/client/assets/shell-layout-BUmIacnr.js +3 -0
  140. package/dist/client/assets/{skeleton-DdrlSfda.js → skeleton-DvxloPhR.js} +1 -1
  141. package/dist/client/assets/{spinner-DeIV40-d.js → spinner-BXzzaGxp.js} +1 -1
  142. package/dist/client/assets/{store-invite-DHfus7Si.js → store-invite-DIMsDV12.js} +1 -1
  143. package/dist/client/assets/{switch-BW_XeGpN.js → switch-Bqvl2ZUo.js} +1 -1
  144. package/dist/client/assets/{table-N5hQy-1m.js → table-8mfsydT_.js} +1 -1
  145. package/dist/client/assets/{tasks-CKkoq9mO.js → tasks-CkROBPPq.js} +1 -1
  146. package/dist/client/assets/{textarea-B5CEImaf.js → textarea-D7l_vCcE.js} +1 -1
  147. package/dist/client/assets/{time-range-picker-B3M_kZtN.js → time-range-picker-jSuF4CZc.js} +1 -1
  148. package/dist/client/assets/{toggle-group-k8q-T2Qa.js → toggle-group-Dn_Mv5A3.js} +1 -1
  149. package/dist/client/assets/{tools-list-TXvbi7bf.js → tools-list-4-0RjQZk.js} +1 -1
  150. package/dist/client/assets/{tooltip-BWW8lvJo.js → tooltip-D4-guuax.js} +1 -1
  151. package/dist/client/assets/{topbar-portal-m9wB0x-E.js → topbar-portal-BYH3tZsX.js} +1 -1
  152. package/dist/client/assets/{typewriter-title-DcVIzze1.js → typewriter-title-4u2iTKVw.js} +1 -1
  153. package/dist/client/assets/{use-binding-DT0OPEEL.js → use-binding-Df-bJ2So.js} +1 -1
  154. package/dist/client/assets/{use-connection-O4z2Mc_F.js → use-connection-DdTk8NLZ.js} +1 -1
  155. package/dist/client/assets/{use-copy-Drx5AGFH.js → use-copy-8HhO39al.js} +1 -1
  156. package/dist/client/assets/{use-create-virtual-mcp-CZu2JnDv.js → use-create-virtual-mcp-DwsRmfVV.js} +1 -1
  157. package/dist/client/assets/{use-deco-chat-open-Qq9AtQ8h.js → use-deco-chat-open-hbEpr7iz.js} +1 -1
  158. package/dist/client/assets/{use-install-from-registry-Dc84s0lp.js → use-install-from-registry-Ce99gIbp.js} +1 -1
  159. package/dist/client/assets/{use-list-state-DQM_pDDC.js → use-list-state-jCvBKLOI.js} +1 -1
  160. package/dist/client/assets/{use-llm-Z9GIoSzc.js → use-llm-DUUdSPtc.js} +1 -1
  161. package/dist/client/assets/{use-mcp-prompts-uD1aNW_g.js → use-mcp-prompts-BFC1Reld.js} +1 -1
  162. package/dist/client/assets/{use-mcp-tools-B8wkpbTs.js → use-mcp-tools-CLGl37yf.js} +1 -1
  163. package/dist/client/assets/{use-mobile-ziAtnWz2.js → use-mobile-DjLsite2.js} +1 -1
  164. package/dist/client/assets/{use-organization-settings-BJEr33WT.js → use-organization-settings-DcyH2By3.js} +1 -1
  165. package/dist/client/assets/{use-project-Dz1PHkz5.js → use-project-dNP8uTKN.js} +1 -1
  166. package/dist/client/assets/{use-settings-modal-CYH_HZlL.js → use-settings-modal-DA_WPJ_R.js} +1 -1
  167. package/dist/client/assets/{use-view-mode-CRJUL6S-.js → use-view-mode-BGqPs4Aj.js} +1 -1
  168. package/dist/client/assets/{use-virtual-mcp-BateG3is.js → use-virtual-mcp-CtYFVzEt.js} +1 -1
  169. package/dist/client/assets/useInfiniteQuery-JCmjqA8d.js +1 -0
  170. package/dist/client/assets/{useMutation-BTkDU0tp.js → useMutation-4bsh-QBF.js} +1 -1
  171. package/dist/client/assets/useQuery-DGMDf2So.js +1 -0
  172. package/dist/client/assets/useSuspenseInfiniteQuery-DX7McnGC.js +1 -0
  173. package/dist/client/assets/{workflow-CTPlOYoh.js → workflow-Yiu69H_T.js} +1 -1
  174. package/dist/client/index.html +1 -1
  175. package/dist/server/cli.js +168 -168
  176. package/dist/server/migrate.js +2 -2
  177. package/dist/server/server.js +2 -2
  178. package/package.json +1 -1
  179. package/dist/client/assets/constants-0nWmzfAq.js +0 -1
  180. package/dist/client/assets/deco-constants-B2fB4qCk.js +0 -1
  181. package/dist/client/assets/project-layout-1AjzWWMn.js +0 -1
  182. package/dist/client/assets/shell-layout-BGf6BKNx.js +0 -3
  183. package/dist/client/assets/useInfiniteQuery-BHuahm2t.js +0 -1
  184. package/dist/client/assets/useQuery-C0AkqYB7.js +0 -1
  185. package/dist/client/assets/useSuspenseInfiniteQuery-DPaJK1nP.js +0 -1
@@ -1,10 +1,10 @@
1
- import{r as I,bI as Qa,bJ as Xa,D as Ka,bd as q,s as x,bK as Ve,bL as Yt,bh as es,bi as ts,bc as as,be as B,b8 as Re,aj as De,o as j,bf as E,bg as ce,bM as ss,bN as k,ak as rs,bq as os,c as D,u as xe,K as ve,e as Qt,m as He,t as je,j as d,b as ns,O as is,d as ls}from"./index-Chdo1wOf.js";import{u as mt,a as ft,d as cs}from"./constants-DS4O9R8r.js";import{b as us}from"./use-virtual-mcp-BateG3is.js";import{A as Nt,D as Ke}from"./decopilot-events-Brt4gAR6.js";import{u as ht,a as ds}from"./use-llm-Z9GIoSzc.js";import{u as ps}from"./useQuery-C0AkqYB7.js";import{u as Be,L as gt}from"./localstorage-keys-D6jY_B8O.js";import{E as vt}from"./error-boundary-DFWzxGF2.js";import{S as U,u as ms}from"./skeleton-DdrlSfda.js";import{c as Xt,B as rt}from"./button-BlFVi9O-.js";import{I as fs}from"./input-C2bYHqSZ.js";import{P as hs,a as gs,b as vs}from"./popover-B4On8gSm.js";import{S as ys,a as xs,b as bs,c as _s,d as Es}from"./select-DwyzrBGR.js";import{i as Ss}from"./AlertTriangle-BR7J9Jvh.js";import{t as ot}from"./ChevronDown-BxrIQ2Hg.js";import{i as Is}from"./File06-CL04kImU.js";import{c as ws}from"./Grid01-BWcrgmNx.js";import{a as Ns}from"./Image01-DcX1niB5.js";import{s as Ts}from"./RefreshCcw01-Ci0qepHw.js";import{i as Kt}from"./SearchMd-CdY2Qz31.js";import{t as Cs}from"./Settings01-hHMZndAB.js";import{b as yt,c as As,a as Ms,e as Rs}from"./use-connection-O4z2Mc_F.js";import{u as js}from"./useSuspenseInfiniteQuery-DPaJK1nP.js";var ke;(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})(ke||(ke={}));var Tt;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Tt||(Tt={}));ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ke.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 qe 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 qe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ke.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()}}qe.create=t=>new qe(t);var Ct;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ct||(Ct={}));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 ea=({size:t=24,color:e="currentColor",...a})=>I.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},I.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));ea.displayName="ChevronSelectorVertical";const ta=({size:t=24,color:e="currentColor",...a})=>I.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},I.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"}));ta.displayName="CurrencyDollar";const aa=({size:t=24,color:e="currentColor",...a})=>I.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},I.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"}));aa.displayName="LogOut04";const sa=({size:t=24,color:e="currentColor",...a})=>I.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},I.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));sa.displayName="Stars01";var ra="vercel.ai.error",ks=Symbol.for(ra),At,Mt,te=class oa extends(Mt=Error,At=ks,Mt){constructor({name:e,message:a,cause:s}){super(a),this[At]=!0,this.name=e,this.cause=s}static isInstance(e){return oa.hasMarker(e,ra)}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 na(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var ia="AI_InvalidArgumentError",la=`vercel.ai.error.${ia}`,Os=Symbol.for(la),Rt,jt,Ps=class extends(jt=te,Rt=Os,jt){constructor({message:t,cause:e,argument:a}){super({name:ia,message:t,cause:e}),this[Rt]=!0,this.argument=a}static isInstance(t){return te.hasMarker(t,la)}},ca="AI_JSONParseError",ua=`vercel.ai.error.${ca}`,Ds=Symbol.for(ua),kt,Ot,Pt=class extends(Ot=te,kt=Ds,Ot){constructor({text:t,cause:e}){super({name:ca,message:`JSON parsing failed: Text: ${t}.
1
+ import{r as I,bI as Qa,bJ as Xa,D as Ka,bd as q,s as x,bK as Ve,bL as Yt,bh as es,bi as ts,bc as as,be as B,b8 as Re,aj as De,o as j,bf as E,bg as ce,bM as ss,bN as k,ak as rs,bq as os,c as D,u as xe,K as ve,e as Qt,m as He,t as je,j as d,b as ns,O as is,d as ls}from"./index-D9HmjKFM.js";import{u as mt,a as ft,d as cs}from"./constants-BHgsXonC.js";import{b as us}from"./use-virtual-mcp-CtYFVzEt.js";import{A as Nt,D as Ke}from"./decopilot-events-Brt4gAR6.js";import{u as ht,a as ds}from"./use-llm-DUUdSPtc.js";import{u as ps}from"./useQuery-DGMDf2So.js";import{u as Be,L as gt}from"./localstorage-keys-CiUgmUPA.js";import{E as vt}from"./error-boundary-CEwcdDux.js";import{S as U,u as ms}from"./skeleton-DvxloPhR.js";import{c as Xt,B as rt}from"./button-BCe1bdkY.js";import{I as fs}from"./input-Dh6_kcmG.js";import{P as hs,a as gs,b as vs}from"./popover-eropQyy1.js";import{S as ys,a as xs,b as bs,c as _s,d as Es}from"./select-CTboIb4n.js";import{i as Ss}from"./AlertTriangle-cnBbzVPi.js";import{t as ot}from"./ChevronDown-xG1flmUs.js";import{i as Is}from"./File06-DiS1m4o9.js";import{c as ws}from"./Grid01-D2I-nDSy.js";import{a as Ns}from"./Image01-DNFNbFFa.js";import{s as Ts}from"./RefreshCcw01-BpGtyqTA.js";import{i as Kt}from"./SearchMd-DqymgKbi.js";import{t as Cs}from"./Settings01-DB_FXn41.js";import{b as yt,c as As,a as Ms,e as Rs}from"./use-connection-DdTk8NLZ.js";import{u as js}from"./useSuspenseInfiniteQuery-DX7McnGC.js";var ke;(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})(ke||(ke={}));var Tt;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Tt||(Tt={}));ke.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ke.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 qe 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 qe))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ke.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()}}qe.create=t=>new qe(t);var Ct;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ct||(Ct={}));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 ea=({size:t=24,color:e="currentColor",...a})=>I.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},I.createElement("path",{d:"m7 15 5 5 5-5M7 9l5-5 5 5"}));ea.displayName="ChevronSelectorVertical";const ta=({size:t=24,color:e="currentColor",...a})=>I.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},I.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"}));ta.displayName="CurrencyDollar";const aa=({size:t=24,color:e="currentColor",...a})=>I.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},I.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"}));aa.displayName="LogOut04";const sa=({size:t=24,color:e="currentColor",...a})=>I.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},I.createElement("path",{d:"m6.5 13 .784 1.569c.266.53.399.796.576 1.026a3 3 0 0 0 .545.545c.23.177.495.31 1.026.575L11 17.5l-1.569.785c-.53.265-.796.398-1.026.575a3 3 0 0 0-.545.545c-.177.23-.31.495-.576 1.026L6.5 22l-.784-1.569c-.266-.53-.399-.796-.576-1.026a3 3 0 0 0-.545-.545c-.23-.177-.495-.31-1.026-.575L2 17.5l1.569-.785c.53-.265.796-.398 1.026-.575a3 3 0 0 0 .545-.545c.177-.23.31-.495.576-1.026L6.5 13ZM15 2l1.179 3.064c.282.734.423 1.1.642 1.409a3 3 0 0 0 .706.706c.309.22.675.36 1.409.642L22 9l-3.064 1.179c-.734.282-1.1.423-1.409.642a3 3 0 0 0-.706.706c-.22.309-.36.675-.642 1.409L15 16l-1.179-3.064c-.282-.734-.423-1.1-.642-1.409a3 3 0 0 0-.706-.706c-.309-.22-.675-.36-1.409-.642L8 9l3.064-1.179c.734-.282 1.1-.423 1.409-.642a3 3 0 0 0 .706-.706c.22-.309.36-.675.642-1.409L15 2Z"}));sa.displayName="Stars01";var ra="vercel.ai.error",ks=Symbol.for(ra),At,Mt,te=class oa extends(Mt=Error,At=ks,Mt){constructor({name:e,message:a,cause:s}){super(a),this[At]=!0,this.name=e,this.cause=s}static isInstance(e){return oa.hasMarker(e,ra)}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 na(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var ia="AI_InvalidArgumentError",la=`vercel.ai.error.${ia}`,Os=Symbol.for(la),Rt,jt,Ps=class extends(jt=te,Rt=Os,jt){constructor({message:t,cause:e,argument:a}){super({name:ia,message:t,cause:e}),this[Rt]=!0,this.argument=a}static isInstance(t){return te.hasMarker(t,la)}},ca="AI_JSONParseError",ua=`vercel.ai.error.${ca}`,Ds=Symbol.for(ua),kt,Ot,Pt=class extends(Ot=te,kt=Ds,Ot){constructor({text:t,cause:e}){super({name:ca,message:`JSON parsing failed: Text: ${t}.
2
2
  Error message: ${na(e)}`,cause:e}),this[kt]=!0,this.text=t}static isInstance(t){return te.hasMarker(t,ua)}},da="AI_TypeValidationError",pa=`vercel.ai.error.${da}`,$s=Symbol.for(pa),Dt,$t,we=class nt extends($t=te,Dt=$s,$t){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:da,message:`${r}: Value: ${JSON.stringify(e)}.
3
3
  Error message: ${na(a)}`,cause:a}),this[Dt]=!0,this.value=e,this.context=s}static isInstance(e){return te.hasMarker(e,pa)}static wrap({value:e,cause:a,context:s}){var r,o,i;return nt.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 nt({value:e,cause:a,context:s})}},$e=({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 Ps({argument:"separator",message:`The separator "${s}" must not be part of the alphabet "${a}".`});return()=>`${t}${s}${r()}`},Ls=$e();function Lt(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 ge(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 Zt(t,...e){const a=new Headers(ge(t)),s=a.get("user-agent")||"";return a.set("user-agent",[s,...e].filter(Boolean).join(" ")),Object.fromEntries(a.entries())}var Zs=/"__proto__"\s*:/,Fs=/"constructor"\s*:/;function Ft(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Zs.test(t)===!1&&Fs.test(t)===!1?e:Us(e)}function Us(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 zs(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ft(t)}try{return Ft(t)}finally{Error.stackTraceLimit=e}}function xt(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]=he(a[s])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(he):he(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(he)),t.allOf!=null&&(t.allOf=t.allOf.map(he)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(he));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=he(e[a]);return t}function he(t){return typeof t=="boolean"?t:xt(t)}var Vs=Symbol("Let zodToJsonSchema decide on which parser to use"),Ut={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"},Bs=t=>typeof t=="string"?{...Ut,name:t}:{...Ut,...t};function H(){return{}}function qs(t,e){var a,s,r;const o={type:"array"};return(a=t.type)!=null&&a._def&&((r=(s=t.type)==null?void 0:s._def)==null?void 0:r.typeName)!==w.ZodAny&&(o.items=R(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Hs(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 Ws(){return{type:"boolean"}}function ma(t,e){return R(t.type._def,e)}var Js=(t,e)=>R(t.innerType._def,e);function fa(t,e,a){const s=a??e.dateStrategy;if(Array.isArray(s))return{anyOf:s.map((r,o)=>fa(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 Gs(t)}}var Gs=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 Ys(t,e){return{...R(t.innerType._def,e),default:t.defaultValue()}}function Qs(t,e){return e.effectStrategy==="input"?R(t.schema._def,e):H()}function Xs(t){return{type:"string",enum:Array.from(t.values)}}var Ks=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function er(t,e){const a=[R(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),R(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(r=>!!r),s=[];return a.forEach(r=>{if(Ks(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 tr(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 et=void 0,Y={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(et===void 0&&(et=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),et),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 ha(t,e){const a={type:"string"};if(t.checks)for(const s of t.checks)switch(s.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"email":switch(e.emailStrategy){case"format:email":Q(a,"email",s.message,e);break;case"format:idn-email":Q(a,"idn-email",s.message,e);break;case"pattern:zod":V(a,Y.email,s.message,e);break}break;case"url":Q(a,"uri",s.message,e);break;case"uuid":Q(a,"uuid",s.message,e);break;case"regex":V(a,s.regex,s.message,e);break;case"cuid":V(a,Y.cuid,s.message,e);break;case"cuid2":V(a,Y.cuid2,s.message,e);break;case"startsWith":V(a,RegExp(`^${tt(s.value,e)}`),s.message,e);break;case"endsWith":V(a,RegExp(`${tt(s.value,e)}$`),s.message,e);break;case"datetime":Q(a,"date-time",s.message,e);break;case"date":Q(a,"date",s.message,e);break;case"time":Q(a,"time",s.message,e);break;case"duration":Q(a,"duration",s.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,s.value):s.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,s.value):s.value;break;case"includes":{V(a,RegExp(tt(s.value,e)),s.message,e);break}case"ip":{s.version!=="v6"&&Q(a,"ipv4",s.message,e),s.version!=="v4"&&Q(a,"ipv6",s.message,e);break}case"base64url":V(a,Y.base64url,s.message,e);break;case"jwt":V(a,Y.jwt,s.message,e);break;case"cidr":{s.version!=="v6"&&V(a,Y.ipv4Cidr,s.message,e),s.version!=="v4"&&V(a,Y.ipv6Cidr,s.message,e);break}case"emoji":V(a,Y.emoji(),s.message,e);break;case"ulid":{V(a,Y.ulid,s.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Q(a,"binary",s.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{V(a,Y.base64,s.message,e);break}}break}case"nanoid":V(a,Y.nanoid,s.message,e)}return a}function tt(t,e){return e.patternStrategy==="escape"?sr(t):t}var ar=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function sr(t){let e="";for(let a=0;a<t.length;a++)ar.has(t[a])||(e+="\\"),e+=t[a];return e}function Q(t,e,a,s){var r;t.format||(r=t.anyOf)!=null&&r.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&s.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function V(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:zt(e,s),...a&&s.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=zt(e,s)}function zt(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 ga(t,e){var a,s,r,o,i,n;const c={type:"object",additionalProperties:(a=R(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}=ha(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}=ma(t.keyType._def,e);return{...c,propertyNames:p}}}return c}function rr(t,e){if(e.mapStrategy==="record")return ga(t,e);const a=R(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||H(),s=R(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||H();return{type:"array",maxItems:125,items:{type:"array",items:[a,s],minItems:2,maxItems:2}}}function or(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 nr(){return{not:H()}}function ir(){return{type:"null"}}var it={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function lr(t,e){const a=t.options instanceof Map?Array.from(t.options.values()):t.options;if(a.every(s=>s._def.typeName in it&&(!s._def.checks||!s._def.checks.length))){const s=a.reduce((r,o)=>{const i=it[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 cr(t,e)}var cr=(t,e)=>{const a=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((s,r)=>R(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 ur(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return{type:[it[t.innerType._def.typeName],"null"]};const a=R(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return a&&{anyOf:[a,{type:"null"}]}}function dr(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 pr(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=fr(n),l=R(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=mr(t,e);return o!==void 0&&(a.additionalProperties=o),a}function mr(t,e){if(t.catchall._def.typeName!=="ZodNever")return R(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 fr(t){try{return t.isOptional()}catch{return!0}}var hr=(t,e)=>{var a;if(e.currentPath.toString()===((a=e.propertyPath)==null?void 0:a.toString()))return R(t.innerType._def,e);const s=R(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return s?{anyOf:[{not:H()},s]}:H()},gr=(t,e)=>{if(e.pipeStrategy==="input")return R(t.in._def,e);if(e.pipeStrategy==="output")return R(t.out._def,e);const a=R(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),s=R(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",a?"1":"0"]});return{allOf:[a,s].filter(r=>r!==void 0)}};function vr(t,e){return R(t.type._def,e)}function yr(t,e){const s={type:"array",uniqueItems:!0,items:R(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 xr(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((a,s)=>R(a._def,{...e,currentPath:[...e.currentPath,"items",`${s}`]})).reduce((a,s)=>s===void 0?a:[...a,s],[]),additionalItems:R(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((a,s)=>R(a._def,{...e,currentPath:[...e.currentPath,"items",`${s}`]})).reduce((a,s)=>s===void 0?a:[...a,s],[])}}function br(){return{not:H()}}function _r(){return H()}var Er=(t,e)=>R(t.innerType._def,e),Sr=(t,e,a)=>{switch(e){case w.ZodString:return ha(t,a);case w.ZodNumber:return dr(t);case w.ZodObject:return pr(t,a);case w.ZodBigInt:return Hs(t);case w.ZodBoolean:return Ws();case w.ZodDate:return fa(t,a);case w.ZodUndefined:return br();case w.ZodNull:return ir();case w.ZodArray:return qs(t,a);case w.ZodUnion:case w.ZodDiscriminatedUnion:return lr(t,a);case w.ZodIntersection:return er(t,a);case w.ZodTuple:return xr(t,a);case w.ZodRecord:return ga(t,a);case w.ZodLiteral:return tr(t);case w.ZodEnum:return Xs(t);case w.ZodNativeEnum:return or(t);case w.ZodNullable:return ur(t,a);case w.ZodOptional:return hr(t,a);case w.ZodMap:return rr(t,a);case w.ZodSet:return yr(t,a);case w.ZodLazy:return()=>t.getter()._def;case w.ZodPromise:return vr(t,a);case w.ZodNaN:case w.ZodNever:return nr();case w.ZodEffects:return Qs(t,a);case w.ZodAny:return H();case w.ZodUnknown:return _r();case w.ZodDefault:return Ys(t,a);case w.ZodBranded:return ma(t,a);case w.ZodReadonly:return Er(t,a);case w.ZodCatch:return Js(t,a);case w.ZodPipeline:return gr(t,a);case w.ZodFunction:case w.ZodVoid:case w.ZodSymbol:return;default:return(s=>{})()}},Ir=(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 R(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!==Vs)return c}if(r&&!a){const c=wr(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=Sr(t,t.typeName,e),n=typeof i=="function"?R(i(),e):i;if(n&&Nr(t,e,n),e.postProcess){const c=e.postProcess(n,t,e);return o.jsonSchema=n,c}return o.jsonSchema=n,n}var wr=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Ir(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`),H()):e.$refStrategy==="seen"?H():void 0}},Nr=(t,e,a)=>(t.description&&(a.description=t.description),a),Tr=t=>{const e=Bs(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}]))}},Cr=(t,e)=>{var a;const s=Tr(e);let r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((l,[p,m])=>{var g;return{...l,[p]:(g=R(m._def,{...s,currentPath:[...s.basePath,s.definitionPath,p]},!0))!=null?g:H()}},{}):void 0;const o=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,i=(a=R(t._def,o===void 0?s:{...s,currentPath:[...s.basePath,s.definitionPath,o]},!1))!=null?a:H(),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},lt=Symbol.for("vercel.ai.schema");function Ar(t){let e;return()=>(e==null&&(e=t()),e)}function We(t,{validate:e}={}){return{[lt]:!0,_type:void 0,get jsonSchema(){return typeof t=="function"&&(t=t()),t},validate:e}}function Mr(t){return typeof t=="object"&&t!==null&&lt in t&&t[lt]===!0&&"jsonSchema"in t&&"validate"in t}function bt(t){return t==null?We({properties:{},additionalProperties:!1}):Mr(t)?t:"~standard"in t?t["~standard"].vendor==="zod"?va(t):Rr(t):t()}function Rr(t){return We(()=>xt(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 we({value:e,cause:a.issues})}}})}function jr(t,e){var a;const s=(a=void 0)!=null?a:!1;return We(()=>Cr(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 kr(t,e){var a;const s=(a=void 0)!=null?a:!1;return We(()=>xt(Ka(t,{target:"draft-7",io:"input",reused:s?"ref":"inline"})),{validate:async r=>{const o=await Xa(t,r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function Or(t){return"_zod"in t}function va(t,e){return Or(t)?kr(t):jr(t)}async function Vt({value:t,schema:e,context:a}){const s=await Oe({value:t,schema:e,context:a});if(!s.success)throw we.wrap({value:t,cause:s.error,context:a});return s.value}async function Oe({value:t,schema:e,context:a}){const s=bt(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:we.wrap({value:t,cause:r.error,context:a}),rawValue:t}}catch(r){return{success:!1,error:we.wrap({value:t,cause:r,context:a}),rawValue:t}}}async function ye({text:t,schema:e}){try{const a=zs(t);return e==null?{success:!0,value:a,rawValue:a}:await Oe({value:a,schema:e})}catch(a){return{success:!1,error:Pt.isInstance(a)?a:new Pt({text:t,cause:a}),rawValue:void 0}}}function Pr({stream:t,schema:e}){return t.pipeThrough(new TextDecoderStream).pipeThrough(new Qa).pipeThrough(new TransformStream({async transform({data:a},s){a!=="[DONE]"&&s.enqueue(await ye({text:a,schema:e}))}}))}async function de(t){return typeof t=="function"&&(t=t()),Promise.resolve(t)}var Dr=Object.defineProperty,$r=(t,e)=>{for(var a in e)Dr(t,a,{get:e[a],enumerable:!0})},ya="AI_NoObjectGeneratedError",xa=`vercel.ai.error.${ya}`,Lr=Symbol.for(xa),ba,pe=class extends te{constructor({message:t="No object generated.",cause:e,text:a,response:s,usage:r,finishReason:o}){super({name:ya,message:t,cause:e}),this[ba]=!0,this.text=a,this.response=s,this.usage=r,this.finishReason=o}static isInstance(t){return te.hasMarker(t,xa)}};ba=Lr;var _a="AI_UIMessageStreamError",Ea=`vercel.ai.error.${_a}`,Zr=Symbol.for(Ea),Sa,Ee=class extends te{constructor({chunkType:t,chunkId:e,message:a}){super({name:_a,message:a}),this[Sa]=!0,this.chunkType=t,this.chunkId=e}static isInstance(t){return te.hasMarker(t,Ea)}};Sa=Zr;var Bt="6.0.105",Ia=q([x(),Ve(Uint8Array),Ve(ArrayBuffer),Yt(t=>{var e,a;return(a=(e=globalThis.Buffer)==null?void 0:e.isBuffer(t))!=null?a:!1},{message:"Must be a Buffer"})]),Pe=es(()=>q([ts(),x(),as(),B(),Re(x(),Pe.optional()),De(Pe)])),M=Re(x(),Re(x(),Pe.optional())),wa=j({type:E("text"),text:x(),providerOptions:M.optional()}),Fr=j({type:E("image"),image:q([Ia,Ve(URL)]),mediaType:x().optional(),providerOptions:M.optional()}),Na=j({type:E("file"),data:q([Ia,Ve(URL)]),filename:x().optional(),mediaType:x(),providerOptions:M.optional()}),Ur=j({type:E("reasoning"),text:x(),providerOptions:M.optional()}),zr=j({type:E("tool-call"),toolCallId:x(),toolName:x(),input:ce(),providerOptions:M.optional(),providerExecuted:B().optional()}),Vr=ss("type",[j({type:E("text"),value:x(),providerOptions:M.optional()}),j({type:E("json"),value:Pe,providerOptions:M.optional()}),j({type:E("execution-denied"),reason:x().optional(),providerOptions:M.optional()}),j({type:E("error-text"),value:x(),providerOptions:M.optional()}),j({type:E("error-json"),value:Pe,providerOptions:M.optional()}),j({type:E("content"),value:De(q([j({type:E("text"),text:x(),providerOptions:M.optional()}),j({type:E("media"),data:x(),mediaType:x()}),j({type:E("file-data"),data:x(),mediaType:x(),filename:x().optional(),providerOptions:M.optional()}),j({type:E("file-url"),url:x(),providerOptions:M.optional()}),j({type:E("file-id"),fileId:q([x(),Re(x(),x())]),providerOptions:M.optional()}),j({type:E("image-data"),data:x(),mediaType:x(),providerOptions:M.optional()}),j({type:E("image-url"),url:x(),providerOptions:M.optional()}),j({type:E("image-file-id"),fileId:q([x(),Re(x(),x())]),providerOptions:M.optional()}),j({type:E("custom"),providerOptions:M.optional()})]))})]),Ta=j({type:E("tool-result"),toolCallId:x(),toolName:x(),output:Vr,providerOptions:M.optional()}),Br=j({type:E("tool-approval-request"),approvalId:x(),toolCallId:x()}),qr=j({type:E("tool-approval-response"),approvalId:x(),approved:B(),reason:x().optional()}),Hr=j({role:E("system"),content:x(),providerOptions:M.optional()}),Wr=j({role:E("user"),content:q([x(),De(q([wa,Fr,Na]))]),providerOptions:M.optional()}),Jr=j({role:E("assistant"),content:q([x(),De(q([wa,Na,Ur,zr,Ta,Br]))]),providerOptions:M.optional()}),Gr=j({role:E("tool"),content:De(q([Ta,qr])),providerOptions:M.optional()});q([Hr,Wr,Jr,Gr]);function Ca(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]=Ca(o,r):a[s]=r}return a}var Yr={};$r(Yr,{array:()=>eo,choice:()=>to,json:()=>ao,object:()=>Kr,text:()=>Xr});function Qr(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 Le(t){if(t===void 0)return{value:void 0,state:"undefined-input"};let e=await ye({text:t});return e.success?{value:e.value,state:"successful-parse"}:(e=await ye({text:Qr(t)}),e.success?{value:e.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var Xr=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:t}){return t},async parsePartialOutput({text:t}){return{partial:t}},createElementStreamTransform(){}}),Kr=({schema:t,name:e,description:a})=>{const s=bt(t);return{name:"object",responseFormat:de(s.jsonSchema).then(r=>({type:"json",schema:r,...e!=null&&{name:e},...a!=null&&{description:a}})),async parseCompleteOutput({text:r},o){const i=await ye({text:r});if(!i.success)throw new pe({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 Oe({value:i.value,schema:s});if(!n.success)throw new pe({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 Le(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:o.value}}},createElementStreamTransform(){}}},eo=({element:t,name:e,description:a})=>{const s=bt(t);return{name:"array",responseFormat:de(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 ye({text:r});if(!i.success)throw new pe({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 pe({message:"No object generated: response did not match schema.",cause:new we({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 Oe({value:c,schema:s});if(!l.success)throw new pe({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 Le(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 Oe({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])}})}}},to=({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 ye({text:s});if(!o.success)throw new pe({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 pe({message:"No object generated: response did not match schema.",cause:new we({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 Le(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(){}}),ao=({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 ye({text:a});if(!r.success)throw new pe({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 Le(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(){}});$e({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 ga(t,e){var a,s,r,o,i,n;const c={type:"object",additionalProperties:(a=R(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}=ha(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}=ma(t.keyType._def,e);return{...c,propertyNames:p}}}return c}function rr(t,e){if(e.mapStrategy==="record")return ga(t,e);const a=R(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||H(),s=R(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||H();return{type:"array",maxItems:125,items:{type:"array",items:[a,s],minItems:2,maxItems:2}}}function or(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 nr(){return{not:H()}}function ir(){return{type:"null"}}var it={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function lr(t,e){const a=t.options instanceof Map?Array.from(t.options.values()):t.options;if(a.every(s=>s._def.typeName in it&&(!s._def.checks||!s._def.checks.length))){const s=a.reduce((r,o)=>{const i=it[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 cr(t,e)}var cr=(t,e)=>{const a=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((s,r)=>R(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 ur(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return{type:[it[t.innerType._def.typeName],"null"]};const a=R(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return a&&{anyOf:[a,{type:"null"}]}}function dr(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 pr(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=fr(n),l=R(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=mr(t,e);return o!==void 0&&(a.additionalProperties=o),a}function mr(t,e){if(t.catchall._def.typeName!=="ZodNever")return R(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 fr(t){try{return t.isOptional()}catch{return!0}}var hr=(t,e)=>{var a;if(e.currentPath.toString()===((a=e.propertyPath)==null?void 0:a.toString()))return R(t.innerType._def,e);const s=R(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return s?{anyOf:[{not:H()},s]}:H()},gr=(t,e)=>{if(e.pipeStrategy==="input")return R(t.in._def,e);if(e.pipeStrategy==="output")return R(t.out._def,e);const a=R(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),s=R(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",a?"1":"0"]});return{allOf:[a,s].filter(r=>r!==void 0)}};function vr(t,e){return R(t.type._def,e)}function yr(t,e){const s={type:"array",uniqueItems:!0,items:R(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 xr(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((a,s)=>R(a._def,{...e,currentPath:[...e.currentPath,"items",`${s}`]})).reduce((a,s)=>s===void 0?a:[...a,s],[]),additionalItems:R(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((a,s)=>R(a._def,{...e,currentPath:[...e.currentPath,"items",`${s}`]})).reduce((a,s)=>s===void 0?a:[...a,s],[])}}function br(){return{not:H()}}function _r(){return H()}var Er=(t,e)=>R(t.innerType._def,e),Sr=(t,e,a)=>{switch(e){case w.ZodString:return ha(t,a);case w.ZodNumber:return dr(t);case w.ZodObject:return pr(t,a);case w.ZodBigInt:return Hs(t);case w.ZodBoolean:return Ws();case w.ZodDate:return fa(t,a);case w.ZodUndefined:return br();case w.ZodNull:return ir();case w.ZodArray:return qs(t,a);case w.ZodUnion:case w.ZodDiscriminatedUnion:return lr(t,a);case w.ZodIntersection:return er(t,a);case w.ZodTuple:return xr(t,a);case w.ZodRecord:return ga(t,a);case w.ZodLiteral:return tr(t);case w.ZodEnum:return Xs(t);case w.ZodNativeEnum:return or(t);case w.ZodNullable:return ur(t,a);case w.ZodOptional:return hr(t,a);case w.ZodMap:return rr(t,a);case w.ZodSet:return yr(t,a);case w.ZodLazy:return()=>t.getter()._def;case w.ZodPromise:return vr(t,a);case w.ZodNaN:case w.ZodNever:return nr();case w.ZodEffects:return Qs(t,a);case w.ZodAny:return H();case w.ZodUnknown:return _r();case w.ZodDefault:return Ys(t,a);case w.ZodBranded:return ma(t,a);case w.ZodReadonly:return Er(t,a);case w.ZodCatch:return Js(t,a);case w.ZodPipeline:return gr(t,a);case w.ZodFunction:case w.ZodVoid:case w.ZodSymbol:return;default:return(s=>{})()}},Ir=(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 R(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!==Vs)return c}if(r&&!a){const c=wr(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=Sr(t,t.typeName,e),n=typeof i=="function"?R(i(),e):i;if(n&&Nr(t,e,n),e.postProcess){const c=e.postProcess(n,t,e);return o.jsonSchema=n,c}return o.jsonSchema=n,n}var wr=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Ir(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`),H()):e.$refStrategy==="seen"?H():void 0}},Nr=(t,e,a)=>(t.description&&(a.description=t.description),a),Tr=t=>{const e=Bs(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}]))}},Cr=(t,e)=>{var a;const s=Tr(e);let r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((l,[p,m])=>{var g;return{...l,[p]:(g=R(m._def,{...s,currentPath:[...s.basePath,s.definitionPath,p]},!0))!=null?g:H()}},{}):void 0;const o=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,i=(a=R(t._def,o===void 0?s:{...s,currentPath:[...s.basePath,s.definitionPath,o]},!1))!=null?a:H(),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},lt=Symbol.for("vercel.ai.schema");function Ar(t){let e;return()=>(e==null&&(e=t()),e)}function We(t,{validate:e}={}){return{[lt]:!0,_type:void 0,get jsonSchema(){return typeof t=="function"&&(t=t()),t},validate:e}}function Mr(t){return typeof t=="object"&&t!==null&&lt in t&&t[lt]===!0&&"jsonSchema"in t&&"validate"in t}function bt(t){return t==null?We({properties:{},additionalProperties:!1}):Mr(t)?t:"~standard"in t?t["~standard"].vendor==="zod"?va(t):Rr(t):t()}function Rr(t){return We(()=>xt(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 we({value:e,cause:a.issues})}}})}function jr(t,e){var a;const s=(a=void 0)!=null?a:!1;return We(()=>Cr(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 kr(t,e){var a;const s=(a=void 0)!=null?a:!1;return We(()=>xt(Ka(t,{target:"draft-7",io:"input",reused:s?"ref":"inline"})),{validate:async r=>{const o=await Xa(t,r);return o.success?{success:!0,value:o.data}:{success:!1,error:o.error}}})}function Or(t){return"_zod"in t}function va(t,e){return Or(t)?kr(t):jr(t)}async function Vt({value:t,schema:e,context:a}){const s=await Oe({value:t,schema:e,context:a});if(!s.success)throw we.wrap({value:t,cause:s.error,context:a});return s.value}async function Oe({value:t,schema:e,context:a}){const s=bt(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:we.wrap({value:t,cause:r.error,context:a}),rawValue:t}}catch(r){return{success:!1,error:we.wrap({value:t,cause:r,context:a}),rawValue:t}}}async function ye({text:t,schema:e}){try{const a=zs(t);return e==null?{success:!0,value:a,rawValue:a}:await Oe({value:a,schema:e})}catch(a){return{success:!1,error:Pt.isInstance(a)?a:new Pt({text:t,cause:a}),rawValue:void 0}}}function Pr({stream:t,schema:e}){return t.pipeThrough(new TextDecoderStream).pipeThrough(new Qa).pipeThrough(new TransformStream({async transform({data:a},s){a!=="[DONE]"&&s.enqueue(await ye({text:a,schema:e}))}}))}async function de(t){return typeof t=="function"&&(t=t()),Promise.resolve(t)}var Dr=Object.defineProperty,$r=(t,e)=>{for(var a in e)Dr(t,a,{get:e[a],enumerable:!0})},ya="AI_NoObjectGeneratedError",xa=`vercel.ai.error.${ya}`,Lr=Symbol.for(xa),ba,pe=class extends te{constructor({message:t="No object generated.",cause:e,text:a,response:s,usage:r,finishReason:o}){super({name:ya,message:t,cause:e}),this[ba]=!0,this.text=a,this.response=s,this.usage=r,this.finishReason=o}static isInstance(t){return te.hasMarker(t,xa)}};ba=Lr;var _a="AI_UIMessageStreamError",Ea=`vercel.ai.error.${_a}`,Zr=Symbol.for(Ea),Sa,Ee=class extends te{constructor({chunkType:t,chunkId:e,message:a}){super({name:_a,message:a}),this[Sa]=!0,this.chunkType=t,this.chunkId=e}static isInstance(t){return te.hasMarker(t,Ea)}};Sa=Zr;var Bt="6.0.106",Ia=q([x(),Ve(Uint8Array),Ve(ArrayBuffer),Yt(t=>{var e,a;return(a=(e=globalThis.Buffer)==null?void 0:e.isBuffer(t))!=null?a:!1},{message:"Must be a Buffer"})]),Pe=es(()=>q([ts(),x(),as(),B(),Re(x(),Pe.optional()),De(Pe)])),M=Re(x(),Re(x(),Pe.optional())),wa=j({type:E("text"),text:x(),providerOptions:M.optional()}),Fr=j({type:E("image"),image:q([Ia,Ve(URL)]),mediaType:x().optional(),providerOptions:M.optional()}),Na=j({type:E("file"),data:q([Ia,Ve(URL)]),filename:x().optional(),mediaType:x(),providerOptions:M.optional()}),Ur=j({type:E("reasoning"),text:x(),providerOptions:M.optional()}),zr=j({type:E("tool-call"),toolCallId:x(),toolName:x(),input:ce(),providerOptions:M.optional(),providerExecuted:B().optional()}),Vr=ss("type",[j({type:E("text"),value:x(),providerOptions:M.optional()}),j({type:E("json"),value:Pe,providerOptions:M.optional()}),j({type:E("execution-denied"),reason:x().optional(),providerOptions:M.optional()}),j({type:E("error-text"),value:x(),providerOptions:M.optional()}),j({type:E("error-json"),value:Pe,providerOptions:M.optional()}),j({type:E("content"),value:De(q([j({type:E("text"),text:x(),providerOptions:M.optional()}),j({type:E("media"),data:x(),mediaType:x()}),j({type:E("file-data"),data:x(),mediaType:x(),filename:x().optional(),providerOptions:M.optional()}),j({type:E("file-url"),url:x(),providerOptions:M.optional()}),j({type:E("file-id"),fileId:q([x(),Re(x(),x())]),providerOptions:M.optional()}),j({type:E("image-data"),data:x(),mediaType:x(),providerOptions:M.optional()}),j({type:E("image-url"),url:x(),providerOptions:M.optional()}),j({type:E("image-file-id"),fileId:q([x(),Re(x(),x())]),providerOptions:M.optional()}),j({type:E("custom"),providerOptions:M.optional()})]))})]),Ta=j({type:E("tool-result"),toolCallId:x(),toolName:x(),output:Vr,providerOptions:M.optional()}),Br=j({type:E("tool-approval-request"),approvalId:x(),toolCallId:x()}),qr=j({type:E("tool-approval-response"),approvalId:x(),approved:B(),reason:x().optional()}),Hr=j({role:E("system"),content:x(),providerOptions:M.optional()}),Wr=j({role:E("user"),content:q([x(),De(q([wa,Fr,Na]))]),providerOptions:M.optional()}),Jr=j({role:E("assistant"),content:q([x(),De(q([wa,Na,Ur,zr,Ta,Br]))]),providerOptions:M.optional()}),Gr=j({role:E("tool"),content:De(q([Ta,qr])),providerOptions:M.optional()});q([Hr,Wr,Jr,Gr]);function Ca(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]=Ca(o,r):a[s]=r}return a}var Yr={};$r(Yr,{array:()=>eo,choice:()=>to,json:()=>ao,object:()=>Kr,text:()=>Xr});function Qr(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 Le(t){if(t===void 0)return{value:void 0,state:"undefined-input"};let e=await ye({text:t});return e.success?{value:e.value,state:"successful-parse"}:(e=await ye({text:Qr(t)}),e.success?{value:e.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var Xr=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:t}){return t},async parsePartialOutput({text:t}){return{partial:t}},createElementStreamTransform(){}}),Kr=({schema:t,name:e,description:a})=>{const s=bt(t);return{name:"object",responseFormat:de(s.jsonSchema).then(r=>({type:"json",schema:r,...e!=null&&{name:e},...a!=null&&{description:a}})),async parseCompleteOutput({text:r},o){const i=await ye({text:r});if(!i.success)throw new pe({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 Oe({value:i.value,schema:s});if(!n.success)throw new pe({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 Le(r);switch(o.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:o.value}}},createElementStreamTransform(){}}},eo=({element:t,name:e,description:a})=>{const s=bt(t);return{name:"array",responseFormat:de(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 ye({text:r});if(!i.success)throw new pe({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 pe({message:"No object generated: response did not match schema.",cause:new we({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 Oe({value:c,schema:s});if(!l.success)throw new pe({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 Le(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 Oe({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])}})}}},to=({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 ye({text:s});if(!o.success)throw new pe({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 pe({message:"No object generated: response did not match schema.",cause:new we({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 Le(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(){}}),ao=({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 ye({text:a});if(!r.success)throw new pe({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 Le(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(){}});$e({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{o as A,s as D,c as O,k as v,l as E,j as r,d as N}from"./index-Chdo1wOf.js";import{A as I,a as M,b as L,c as R,d as T,e as $,f as k}from"./alert-dialog-DG1mgLiN.js";import{B}from"./button-BlFVi9O-.js";import{F as V,a as q,b as H,c as U,d as G,e as J,f as K}from"./form-DdvC8UfL.js";import{I as P}from"./input-C2bYHqSZ.js";import{S as Q}from"./spinner-DeIV40-d.js";import{u as W}from"./useMutation-BTkDU0tp.js";function _(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const X=A({name:D().min(2,"Organization name is required")});function ne(o){const e=O.c(41),{open:a,onOpenChange:s}=o;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:v(X),defaultValues:{name:""}},e[0]=j):j=e[0];const t=E(j);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={mutationFn:Z,onSuccess:Y},e[1]=w):w=e[1];const i=W(w),z=i.error instanceof Error?i.error.message:i.error?"Failed to create organization.":null;let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsxs(L,{children:[r.jsx(R,{children:"Create a new organization"}),r.jsx(T,{children:"Set up a new organization to collaborate with others."})]}),e[2]=F):F=e[2];let n;if(e[3]!==i||e[4]!==t){let x;e[6]!==i?(x=b=>i.mutateAsync(b),e[6]=i,e[7]=x):x=e[7],n=t.handleSubmit(x),e[3]=i,e[4]=t,e[5]=n}else n=e[5];let l;e[8]!==t.formState.isSubmitting?(l=x=>{const{field:b}=x;return r.jsxs(H,{children:[r.jsx(U,{children:"Organization Name"}),r.jsx(G,{children:r.jsx(P,{...b,placeholder:"Acme Inc.",disabled:t.formState.isSubmitting})}),r.jsx(J,{children:"The name of your company or organization"}),b.value&&r.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",r.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",_(b.value)]})]}),r.jsx(K,{})]})},e[8]=t.formState.isSubmitting,e[9]=l):l=e[9];let m;e[10]!==t.control||e[11]!==l?(m=r.jsx(V,{control:t.control,name:"name",render:l}),e[10]=t.control,e[11]=l,e[12]=m):m=e[12];let c;e[13]!==z?(c=z&&r.jsx("div",{className:"text-destructive text-sm mt-2",children:z}),e[13]=z,e[14]=c):c=e[14];let f;e[15]!==i||e[16]!==t?(f=()=>{i.reset(),t.reset()},e[15]=i,e[16]=t,e[17]=f):f=e[17];let g;e[18]!==t.formState.isSubmitting||e[19]!==f?(g=r.jsx(I,{disabled:t.formState.isSubmitting,onClick:f,children:"Cancel"}),e[18]=t.formState.isSubmitting,e[19]=f,e[20]=g):g=e[20];const y=!t.formState.isValid||t.formState.isSubmitting;let u;e[21]!==t.formState.isSubmitting?(u=t.formState.isSubmitting?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Q,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=t.formState.isSubmitting,e[22]=u):u=e[22];let d;e[23]!==y||e[24]!==u?(d=r.jsx(B,{type:"submit",variant:"default",disabled:y,children:u}),e[23]=y,e[24]=u,e[25]=d):d=e[25];let S;e[26]!==d||e[27]!==g?(S=r.jsxs($,{children:[g,d]}),e[26]=d,e[27]=g,e[28]=S):S=e[28];let h;e[29]!==S||e[30]!==n||e[31]!==m||e[32]!==c?(h=r.jsxs("form",{className:"space-y-6",onSubmit:n,autoComplete:"off",children:[m,c,S]}),e[29]=S,e[30]=n,e[31]=m,e[32]=c,e[33]=h):h=e[33];let p;e[34]!==t||e[35]!==h?(p=r.jsxs(M,{children:[F,r.jsx(q,{...t,children:h})]}),e[34]=t,e[35]=h,e[36]=p):p=e[36];let C;return e[37]!==s||e[38]!==a||e[39]!==p?(C=r.jsx(k,{open:a,onOpenChange:s,children:p}),e[37]=s,e[38]=a,e[39]=p,e[40]=C):C=e[40],C}function Y(o){const{orgSlug:e}=o;window.location.href=`/${e}`}async function Z(o){const e=_(o.name);if(!e)throw new Error("Organization slug is invalid");const a=await N.organization.create({name:o.name,slug:e});if(a?.error)throw new Error(a.error.message||"Failed to create organization");const s=a?.data?.slug??e;if(!s)throw new Error("Failed to create organization");return{orgSlug:s}}export{ne as C};
1
+ import{o as A,s as D,c as O,k as v,l as E,j as r,d as N}from"./index-D9HmjKFM.js";import{A as I,a as M,b as L,c as R,d as T,e as $,f as k}from"./alert-dialog-97XFXZ7z.js";import{B}from"./button-BCe1bdkY.js";import{F as V,a as q,b as H,c as U,d as G,e as J,f as K}from"./form-CKVYRQ0T.js";import{I as P}from"./input-Dh6_kcmG.js";import{S as Q}from"./spinner-BXzzaGxp.js";import{u as W}from"./useMutation-4bsh-QBF.js";function _(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const X=A({name:D().min(2,"Organization name is required")});function ne(o){const e=O.c(41),{open:a,onOpenChange:s}=o;let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:v(X),defaultValues:{name:""}},e[0]=j):j=e[0];const t=E(j);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={mutationFn:Z,onSuccess:Y},e[1]=w):w=e[1];const i=W(w),z=i.error instanceof Error?i.error.message:i.error?"Failed to create organization.":null;let F;e[2]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsxs(L,{children:[r.jsx(R,{children:"Create a new organization"}),r.jsx(T,{children:"Set up a new organization to collaborate with others."})]}),e[2]=F):F=e[2];let n;if(e[3]!==i||e[4]!==t){let x;e[6]!==i?(x=b=>i.mutateAsync(b),e[6]=i,e[7]=x):x=e[7],n=t.handleSubmit(x),e[3]=i,e[4]=t,e[5]=n}else n=e[5];let l;e[8]!==t.formState.isSubmitting?(l=x=>{const{field:b}=x;return r.jsxs(H,{children:[r.jsx(U,{children:"Organization Name"}),r.jsx(G,{children:r.jsx(P,{...b,placeholder:"Acme Inc.",disabled:t.formState.isSubmitting})}),r.jsx(J,{children:"The name of your company or organization"}),b.value&&r.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",r.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",_(b.value)]})]}),r.jsx(K,{})]})},e[8]=t.formState.isSubmitting,e[9]=l):l=e[9];let m;e[10]!==t.control||e[11]!==l?(m=r.jsx(V,{control:t.control,name:"name",render:l}),e[10]=t.control,e[11]=l,e[12]=m):m=e[12];let c;e[13]!==z?(c=z&&r.jsx("div",{className:"text-destructive text-sm mt-2",children:z}),e[13]=z,e[14]=c):c=e[14];let f;e[15]!==i||e[16]!==t?(f=()=>{i.reset(),t.reset()},e[15]=i,e[16]=t,e[17]=f):f=e[17];let g;e[18]!==t.formState.isSubmitting||e[19]!==f?(g=r.jsx(I,{disabled:t.formState.isSubmitting,onClick:f,children:"Cancel"}),e[18]=t.formState.isSubmitting,e[19]=f,e[20]=g):g=e[20];const y=!t.formState.isValid||t.formState.isSubmitting;let u;e[21]!==t.formState.isSubmitting?(u=t.formState.isSubmitting?r.jsxs("span",{className:"flex items-center gap-2",children:[r.jsx(Q,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=t.formState.isSubmitting,e[22]=u):u=e[22];let d;e[23]!==y||e[24]!==u?(d=r.jsx(B,{type:"submit",variant:"default",disabled:y,children:u}),e[23]=y,e[24]=u,e[25]=d):d=e[25];let S;e[26]!==d||e[27]!==g?(S=r.jsxs($,{children:[g,d]}),e[26]=d,e[27]=g,e[28]=S):S=e[28];let h;e[29]!==S||e[30]!==n||e[31]!==m||e[32]!==c?(h=r.jsxs("form",{className:"space-y-6",onSubmit:n,autoComplete:"off",children:[m,c,S]}),e[29]=S,e[30]=n,e[31]=m,e[32]=c,e[33]=h):h=e[33];let p;e[34]!==t||e[35]!==h?(p=r.jsxs(M,{children:[F,r.jsx(q,{...t,children:h})]}),e[34]=t,e[35]=h,e[36]=p):p=e[36];let C;return e[37]!==s||e[38]!==a||e[39]!==p?(C=r.jsx(k,{open:a,onOpenChange:s,children:p}),e[37]=s,e[38]=a,e[39]=p,e[40]=C):C=e[40],C}function Y(o){const{orgSlug:e}=o;window.location.href=`/${e}`}async function Z(o){const e=_(o.name);if(!e)throw new Error("Organization slug is invalid");const a=await N.organization.create({name:o.name,slug:e});if(a?.error)throw new Error(a.error.message||"Failed to create organization");const s=a?.data?.slug??e;if(!s)throw new Error("Failed to create organization");return{orgSlug:s}}export{ne as C};
@@ -1 +1 @@
1
- import{c as A,j as e,u as L,b as R,m as k,r as z,l as M,t as B,K as T,O as j,o as V,s as f}from"./index-Chdo1wOf.js";import{u as $}from"./useMutation-BTkDU0tp.js";import{u as q,a as O}from"./constants-DS4O9R8r.js";import{D as K,a as U,b as G,c as J,d as Q,e as Y}from"./dialog-BED3woG1.js";import{c as H,B as D}from"./button-BlFVi9O-.js";import{a as W,F as v,b as F,c as N,d as S,f as w}from"./form-DdvC8UfL.js";import{I}from"./input-C2bYHqSZ.js";import{T as X}from"./textarea-B5CEImaf.js";import{L as Z}from"./label-Cz00Hk_C.js";import{i as ee}from"./Check-ebSdGxZp.js";function se(l){return l.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function _(l){return/^[a-z0-9-]+$/.test(l)&&l.length>0&&l.length<=100}const te=["#3B82F6","#8B5CF6","#EC4899","#EF4444","#F97316","#EAB308","#22C55E","#14B8A6","#06B6D4","#6366F1","#64748B","#000000"];function re(l){const s=A.c(16),{value:n,onChange:i}=l;let c;s[0]!==i||s[1]!==n?(c=te.map(o=>e.jsx("button",{type:"button",onClick:()=>i(o),className:H("size-8 rounded-lg transition-all",n===o&&"ring-2 ring-offset-2 ring-primary"),style:{backgroundColor:o},children:n===o&&e.jsx(ee,{className:"size-4 text-white mx-auto"})},o)),s[0]=i,s[1]=n,s[2]=c):c=s[2];let u;s[3]!==c?(u=e.jsx("div",{className:"grid grid-cols-6 gap-2",children:c}),s[3]=c,s[4]=u):u=s[4];const g=n??"#3B82F6";let d;s[5]!==i?(d=o=>i(o.target.value),s[5]=i,s[6]=d):d=s[6];let t;s[7]!==g||s[8]!==d?(t=e.jsx("input",{type:"color",value:g,onChange:d,className:"size-8 rounded cursor-pointer"}),s[7]=g,s[8]=d,s[9]=t):t=s[9];let a;s[10]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx("span",{className:"text-sm text-muted-foreground",children:"Custom color"}),s[10]=a):a=s[10];let m;s[11]!==t?(m=e.jsxs("div",{className:"flex items-center gap-2",children:[t,a]}),s[11]=t,s[12]=m):m=s[12];let x;return s[13]!==u||s[14]!==m?(x=e.jsxs("div",{className:"space-y-3",children:[u,m]}),s[13]=u,s[14]=m,s[15]=x):x=s[15],x}V({name:f().min(1,"Name is required").max(200),slug:f().min(1,"Slug is required").max(100),description:f().max(1e3).optional(),bannerColor:f().nullable().optional()});function xe({open:l,onOpenChange:s}){const{org:n}=L(),i=R(),c=k(),[u,g]=z.useState(!1),d=q({connectionId:O,orgId:n.id}),t=M({mode:"onChange",defaultValues:{name:"",slug:"",description:"",bannerColor:"#3B82F6"}}),a=$({mutationFn:async r=>{const h=await d.callTool({name:"PROJECT_CREATE",arguments:{organizationId:n.id,slug:r.slug,name:r.name,description:r.description||null,enabledPlugins:[],ui:{banner:null,bannerColor:r.bannerColor??null,icon:null,themeColor:r.bannerColor??null}}});return h.structuredContent??h},onSuccess:r=>{c.invalidateQueries({queryKey:T.projects(n.id)}),B.success("Project created successfully"),s(!1),t.reset({name:"",slug:"",description:"",bannerColor:"#3B82F6"}),g(!1),i({to:"/$org/$project",params:{org:n.slug,project:r.project.slug}})},onError:r=>{B.error("Failed to create project: "+(r instanceof Error?r.message:"Unknown error"))}}),m=async r=>{if(!_(r.slug)){t.setError("slug",{message:"Slug must be lowercase alphanumeric with hyphens only"});return}if(r.slug===j){t.setError("slug",{message:`"${j}" is a reserved slug`});return}await a.mutateAsync(r)},x=r=>{const h=r.target.value;if(t.setValue("name",h),!u){const P=se(h);t.setValue("slug",P)}},o=r=>{g(!0),t.setValue("slug",r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,""))},C=t.watch("bannerColor"),p=t.watch("slug"),b=t.watch("name"),y=p===j,E=p.length>0&&!_(p);return e.jsx(K,{open:l,onOpenChange:s,children:e.jsxs(U,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(G,{children:[e.jsx(J,{children:"Create New Project"}),e.jsxs(Q,{children:["Set up a new project in ",n.name,". You can configure plugins and settings after creation."]})]}),e.jsx(W,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(m),className:"space-y-6",children:[e.jsx("div",{className:"h-20 rounded-lg relative",style:{backgroundColor:C??"#3B82F6"},children:e.jsx("div",{className:"absolute -bottom-4 left-4",children:e.jsx("div",{className:"size-12 rounded-lg border-2 border-background flex items-center justify-center text-lg font-semibold text-white",style:{backgroundColor:C??"#3B82F6"},children:b?.charAt(0)?.toUpperCase()||"P"})})}),e.jsxs("div",{className:"space-y-2 pt-4",children:[e.jsx(Z,{children:"Banner Color"}),e.jsx(re,{value:C??null,onChange:r=>t.setValue("bannerColor",r)})]}),e.jsx(v,{control:t.control,name:"name",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Project Name *"}),e.jsx(S,{children:e.jsx(I,{value:b,onChange:x,placeholder:"My Awesome Project",autoFocus:!0,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"slug",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Slug *"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["/",n.slug,"/"]}),e.jsx(S,{children:e.jsx(I,{value:p,onChange:o,placeholder:"my-awesome-project",className:"flex-1",disabled:a.isPending})})]}),y&&e.jsxs("p",{className:"text-xs text-destructive",children:['"',j,'" is a reserved slug']}),E&&!y&&e.jsx("p",{className:"text-xs text-destructive",children:"Slug must be lowercase alphanumeric with hyphens only"}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"description",render:({field:r})=>e.jsxs(F,{children:[e.jsx(N,{children:"Description"}),e.jsx(S,{children:e.jsx(X,{...r,placeholder:"What is this project for?",rows:2,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsxs(Y,{children:[e.jsx(D,{type:"button",variant:"outline",onClick:()=>s(!1),disabled:a.isPending,children:"Cancel"}),e.jsx(D,{type:"submit",disabled:a.isPending||y||E||!b||!p,children:a.isPending?"Creating...":"Create Project"})]})]})})]})})}export{xe as C};
1
+ import{c as A,j as e,u as L,b as R,m as k,r as z,l as M,t as B,K as T,O as j,o as V,s as f}from"./index-D9HmjKFM.js";import{u as $}from"./useMutation-4bsh-QBF.js";import{u as q,a as O}from"./constants-BHgsXonC.js";import{D as K,a as U,b as G,c as J,d as Q,e as Y}from"./dialog-CtlwZ0jC.js";import{c as H,B as D}from"./button-BCe1bdkY.js";import{a as W,F as v,b as F,c as N,d as S,f as w}from"./form-CKVYRQ0T.js";import{I}from"./input-Dh6_kcmG.js";import{T as X}from"./textarea-D7l_vCcE.js";import{L as Z}from"./label-BMznY53d.js";import{i as ee}from"./Check-EA1ayL22.js";function se(l){return l.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function _(l){return/^[a-z0-9-]+$/.test(l)&&l.length>0&&l.length<=100}const te=["#3B82F6","#8B5CF6","#EC4899","#EF4444","#F97316","#EAB308","#22C55E","#14B8A6","#06B6D4","#6366F1","#64748B","#000000"];function re(l){const s=A.c(16),{value:n,onChange:i}=l;let c;s[0]!==i||s[1]!==n?(c=te.map(o=>e.jsx("button",{type:"button",onClick:()=>i(o),className:H("size-8 rounded-lg transition-all",n===o&&"ring-2 ring-offset-2 ring-primary"),style:{backgroundColor:o},children:n===o&&e.jsx(ee,{className:"size-4 text-white mx-auto"})},o)),s[0]=i,s[1]=n,s[2]=c):c=s[2];let u;s[3]!==c?(u=e.jsx("div",{className:"grid grid-cols-6 gap-2",children:c}),s[3]=c,s[4]=u):u=s[4];const g=n??"#3B82F6";let d;s[5]!==i?(d=o=>i(o.target.value),s[5]=i,s[6]=d):d=s[6];let t;s[7]!==g||s[8]!==d?(t=e.jsx("input",{type:"color",value:g,onChange:d,className:"size-8 rounded cursor-pointer"}),s[7]=g,s[8]=d,s[9]=t):t=s[9];let a;s[10]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx("span",{className:"text-sm text-muted-foreground",children:"Custom color"}),s[10]=a):a=s[10];let m;s[11]!==t?(m=e.jsxs("div",{className:"flex items-center gap-2",children:[t,a]}),s[11]=t,s[12]=m):m=s[12];let x;return s[13]!==u||s[14]!==m?(x=e.jsxs("div",{className:"space-y-3",children:[u,m]}),s[13]=u,s[14]=m,s[15]=x):x=s[15],x}V({name:f().min(1,"Name is required").max(200),slug:f().min(1,"Slug is required").max(100),description:f().max(1e3).optional(),bannerColor:f().nullable().optional()});function xe({open:l,onOpenChange:s}){const{org:n}=L(),i=R(),c=k(),[u,g]=z.useState(!1),d=q({connectionId:O,orgId:n.id}),t=M({mode:"onChange",defaultValues:{name:"",slug:"",description:"",bannerColor:"#3B82F6"}}),a=$({mutationFn:async r=>{const h=await d.callTool({name:"PROJECT_CREATE",arguments:{organizationId:n.id,slug:r.slug,name:r.name,description:r.description||null,enabledPlugins:[],ui:{banner:null,bannerColor:r.bannerColor??null,icon:null,themeColor:r.bannerColor??null}}});return h.structuredContent??h},onSuccess:r=>{c.invalidateQueries({queryKey:T.projects(n.id)}),B.success("Project created successfully"),s(!1),t.reset({name:"",slug:"",description:"",bannerColor:"#3B82F6"}),g(!1),i({to:"/$org/$project",params:{org:n.slug,project:r.project.slug}})},onError:r=>{B.error("Failed to create project: "+(r instanceof Error?r.message:"Unknown error"))}}),m=async r=>{if(!_(r.slug)){t.setError("slug",{message:"Slug must be lowercase alphanumeric with hyphens only"});return}if(r.slug===j){t.setError("slug",{message:`"${j}" is a reserved slug`});return}await a.mutateAsync(r)},x=r=>{const h=r.target.value;if(t.setValue("name",h),!u){const P=se(h);t.setValue("slug",P)}},o=r=>{g(!0),t.setValue("slug",r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,""))},C=t.watch("bannerColor"),p=t.watch("slug"),b=t.watch("name"),y=p===j,E=p.length>0&&!_(p);return e.jsx(K,{open:l,onOpenChange:s,children:e.jsxs(U,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(G,{children:[e.jsx(J,{children:"Create New Project"}),e.jsxs(Q,{children:["Set up a new project in ",n.name,". You can configure plugins and settings after creation."]})]}),e.jsx(W,{...t,children:e.jsxs("form",{onSubmit:t.handleSubmit(m),className:"space-y-6",children:[e.jsx("div",{className:"h-20 rounded-lg relative",style:{backgroundColor:C??"#3B82F6"},children:e.jsx("div",{className:"absolute -bottom-4 left-4",children:e.jsx("div",{className:"size-12 rounded-lg border-2 border-background flex items-center justify-center text-lg font-semibold text-white",style:{backgroundColor:C??"#3B82F6"},children:b?.charAt(0)?.toUpperCase()||"P"})})}),e.jsxs("div",{className:"space-y-2 pt-4",children:[e.jsx(Z,{children:"Banner Color"}),e.jsx(re,{value:C??null,onChange:r=>t.setValue("bannerColor",r)})]}),e.jsx(v,{control:t.control,name:"name",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Project Name *"}),e.jsx(S,{children:e.jsx(I,{value:b,onChange:x,placeholder:"My Awesome Project",autoFocus:!0,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"slug",render:()=>e.jsxs(F,{children:[e.jsx(N,{children:"Slug *"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:["/",n.slug,"/"]}),e.jsx(S,{children:e.jsx(I,{value:p,onChange:o,placeholder:"my-awesome-project",className:"flex-1",disabled:a.isPending})})]}),y&&e.jsxs("p",{className:"text-xs text-destructive",children:['"',j,'" is a reserved slug']}),E&&!y&&e.jsx("p",{className:"text-xs text-destructive",children:"Slug must be lowercase alphanumeric with hyphens only"}),e.jsx(w,{})]})}),e.jsx(v,{control:t.control,name:"description",render:({field:r})=>e.jsxs(F,{children:[e.jsx(N,{children:"Description"}),e.jsx(S,{children:e.jsx(X,{...r,placeholder:"What is this project for?",rows:2,disabled:a.isPending})}),e.jsx(w,{})]})}),e.jsxs(Y,{children:[e.jsx(D,{type:"button",variant:"outline",onClick:()=>s(!1),disabled:a.isPending,children:"Cancel"}),e.jsx(D,{type:"submit",disabled:a.isPending||y||E||!b||!p,children:a.isPending?"Creating...":"Create Project"})]})]})})]})})}export{xe as C};
@@ -0,0 +1 @@
1
+ import{r as s}from"./index-D9HmjKFM.js";const c=({size:e=24,color:t="currentColor",...o})=>s.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},s.createElement("path",{d:"M15.938 15.938A7.001 7.001 0 0 0 15 2a7.001 7.001 0 0 0-6.938 6.062M16 15a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"}));c.displayName="Coins01";const p="https://sites-openrouter.decocache.com/mcp",a="https://sites-deco-ai-gateway.decocache.com/mcp",n=[a];function d(e){if(!e)return!1;try{const t=new URL(e);return n.some(o=>{const r=new URL(o);return t.origin===r.origin&&t.pathname.replace(/\/$/,"")===r.pathname})}catch{return!1}}const h="https://assets.decocache.com/decocms/b2e2f64f-6025-45f7-9e8c-3b3ebdd073d8/openrouter_logojpg.jpg";export{h as O,c as a,p as b,d as i};
@@ -1 +1 @@
1
- import{c as n,j as i,I as m,J as g,T as u,M as x,Q as j,U as N,W as b,X as D}from"./index-Chdo1wOf.js";import{i as h}from"./tooltip-BWW8lvJo.js";import{c}from"./button-BlFVi9O-.js";function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("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/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(b,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(g,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(u,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("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=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{k as D,T as a,R as b,E as c,O as d,B as e,w as f};
1
+ import{c as n,j as i,I as m,J as g,T as u,M as x,Q as j,U as N,W as b,X as D}from"./index-D9HmjKFM.js";import{i as h}from"./tooltip-D4-guuax.js";import{c}from"./button-BCe1bdkY.js";function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("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/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(N,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","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 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(b,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(g,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(u,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("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=i.jsx(x,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{k as D,T as a,R as b,E as c,O as d,B as e,w as f};
@@ -1 +1 @@
1
- import{c,j as d,Y as p,Z as f,_ as m,$ as g,a0 as x,a1 as v,a2 as b,a3 as h,a4 as w,a5 as j,a6 as N,a7 as z}from"./index-Chdo1wOf.js";import{i as _}from"./Check-ebSdGxZp.js";import{i as $}from"./ChevronRight-D1zpPr9G.js";import{c as u}from"./button-BlFVi9O-.js";function k(n){const e=c.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=d.jsx(g,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function C(n){const e=c.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=d.jsx(p,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function I(n){const e=c.c(10);let t,s,a;e[0]!==n?({className:t,sideOffset:a,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const o=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==o||e[8]!==r?(i=d.jsx(x,{children:d.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:o,className:r,...s})}),e[6]=s,e[7]=o,e[8]=r,e[9]=i):i=e[9],i}function T(n){const e=c.c(12);let t,s,a,o;e[0]!==n?({className:t,inset:s,variant: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 r=o===void 0?"default":o;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(l=d.jsx(m,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...a}),e[7]=s,e[8]=a,e[9]=i,e[10]=r,e[11]=l):l=e[11],l}function R(n){const e=c.c(13);let t,s,a,o;e[0]!==n?({className:a,children:s,checked:t,...o}=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]);let r;e[5]!==a?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(w,{children:d.jsx(_,{className:"size-4"})})}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==o||e[11]!==r?(l=d.jsxs(f,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...o,children:[i,s]}),e[8]=t,e[9]=s,e[10]=o,e[11]=r,e[12]=l):l=e[12],l}function E(n){const e=c.c(10);let t,s,a;e[0]!==n?({className:t,inset:s,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let o;e[4]!==t?(o=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=o):o=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==o?(r=d.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:o,...a}),e[6]=s,e[7]=a,e[8]=o,e[9]=r):r=e[9],r}function L(n){const e=c.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=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=d.jsx(h,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(n){const e=c.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=d.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(n){const e=c.c(13);let t,s,a,o;e[0]!==n?({className:s,inset:a,children:t,...o}=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]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx($,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==o||e[11]!==r?(l=d.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...o,children:[t,i]}),e[8]=t,e[9]=a,e[10]=o,e[11]=r,e[12]=l):l=e[12],l}function Y(n){const e=c.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=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=d.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{k as D,C as a,I as b,T as c,O as d,P as e,Y as f,L as g,R as h,E as i};
1
+ import{c,j as d,Y as p,Z as f,_ as m,$ as g,a0 as x,a1 as v,a2 as b,a3 as h,a4 as w,a5 as j,a6 as N,a7 as z}from"./index-D9HmjKFM.js";import{i as _}from"./Check-EA1ayL22.js";import{i as $}from"./ChevronRight-C9tH4CkK.js";import{c as u}from"./button-BCe1bdkY.js";function k(n){const e=c.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=d.jsx(g,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function C(n){const e=c.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=d.jsx(p,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function I(n){const e=c.c(10);let t,s,a;e[0]!==n?({className:t,sideOffset:a,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const o=a===void 0?4:a;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==o||e[8]!==r?(i=d.jsx(x,{children:d.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:o,className:r,...s})}),e[6]=s,e[7]=o,e[8]=r,e[9]=i):i=e[9],i}function T(n){const e=c.c(12);let t,s,a,o;e[0]!==n?({className:t,inset:s,variant: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 r=o===void 0?"default":o;let i;e[5]!==t?(i=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==a||e[9]!==i||e[10]!==r?(l=d.jsx(m,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:i,...a}),e[7]=s,e[8]=a,e[9]=i,e[10]=r,e[11]=l):l=e[11],l}function R(n){const e=c.c(13);let t,s,a,o;e[0]!==n?({className:a,children:s,checked:t,...o}=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]);let r;e[5]!==a?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),e[5]=a,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(w,{children:d.jsx(_,{className:"size-4"})})}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==o||e[11]!==r?(l=d.jsxs(f,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...o,children:[i,s]}),e[8]=t,e[9]=s,e[10]=o,e[11]=r,e[12]=l):l=e[12],l}function E(n){const e=c.c(10);let t,s,a;e[0]!==n?({className:t,inset:s,...a}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);let o;e[4]!==t?(o=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=o):o=e[5];let r;return e[6]!==s||e[7]!==a||e[8]!==o?(r=d.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:o,...a}),e[6]=s,e[7]=a,e[8]=o,e[9]=r):r=e[9],r}function L(n){const e=c.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=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=d.jsx(h,{"data-slot":"dropdown-menu-separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(n){const e=c.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=d.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(n){const e=c.c(13);let t,s,a,o;e[0]!==n?({className:s,inset:a,children:t,...o}=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]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let i;e[7]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx($,{className:"ml-auto size-4"}),e[7]=i):i=e[7];let l;return e[8]!==t||e[9]!==a||e[10]!==o||e[11]!==r?(l=d.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:r,...o,children:[t,i]}),e[8]=t,e[9]=a,e[10]=o,e[11]=r,e[12]=l):l=e[12],l}function Y(n){const e=c.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=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=d.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{k as D,C as a,I as b,T as c,O as d,P as e,Y as f,L as g,R as h,E as i};
@@ -1 +1 @@
1
- import{c as R,u as W,e as A,d as X,K as Z,j as n,r as $,aD as J,aE as ee,aF as te}from"./index-Chdo1wOf.js";import{i as v}from"./Loading01-BZRHfswB.js";import{c as ne}from"./binder-Yx0eVQL7.js";import{P as O}from"./topbar-portal-m9wB0x-E.js";import{u as ie}from"./useQuery-C0AkqYB7.js";import{h as se}from"./use-connection-O4z2Mc_F.js";import{a as oe,u as le,j as re}from"./constants-DS4O9R8r.js";import{t as ae}from"./Settings01-hHMZndAB.js";import{B as ce}from"./button-BlFVi9O-.js";import{P as E}from"./index-6Tp9fsVX.js";import"./useMutation-BTkDU0tp.js";import"./use-mobile-ziAtnWz2.js";import"./tooltip-BWW8lvJo.js";function de(t,e){return t?t.filter(m=>ne(m,e)):[]}function K(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function me(t){const e=R.c(35),{binding:m,renderHeader:f,renderEmptyState:i}=t,{org:o,project:l}=W();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:r,project:g,pluginId:u}=A(c),Q=se(),{data:y}=X.useSession();let _;e[1]!==o.id?(_={connectionId:oe,orgId:o.id},e[1]=o.id,e[2]=_):_=e[2];const H=le(_);let x;e[3]!==u||e[4]!==l.id?(x=Z.projectPluginConfig(l.id??"",u),e[3]=u,e[4]=l.id,e[5]=x):x=e[5];let p;e[6]!==u||e[7]!==l.id||e[8]!==H?(p=async()=>{const s=await H.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:u}});return s.structuredContent??s},e[6]=u,e[7]=l.id,e[8]=H,e[9]=p):p=e[9];const T=!!l.id&&!!u;let b;e[10]!==x||e[11]!==p||e[12]!==T?(b={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=b):b=e[13];const{data:U,isLoading:Y}=ie(b),q=de(Q,m),D=U?.config?.connectionId,j=D?q.find(s=>s.id===D):null,P=re({connectionId:j?.id,orgId:o.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:o.id,slug:o.slug,name:o.name};if(Y){let s;return e[14]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=s):s=e[14],s}if(q.length===0){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let a;e[15]!==i?(a=i(),e[15]=i,e[16]=a):a=e[16];let d;return e[17]!==a?(d=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:a}),e[17]=a,e[18]=d):d=e[18],n.jsx(O,{value:s,children:d})}if(!j){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let a;e[19]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ae,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=a):a=e[19];const d=r??o.slug,M=g??l.slug??"";let L;return e[20]!==d||e[21]!==M?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[a,n.jsx(ce,{asChild:!0,children:n.jsx(ee,{to:"/$org/$project/settings",params:{org:d,project:M},children:"Go to Project Settings"})})]}),e[20]=d,e[21]=M,e[22]=L):L=e[22],n.jsx(O,{value:s,children:L})}let S;e[23]!==P?(S=(s,a)=>P?P.callTool({name:s,arguments:a}).then(fe):Promise.reject(new Error("MCP client is not available")),e[23]=P,e[24]=S):S=e[24];const V={connectionId:j.id,connection:K(j),toolCaller:S,org:z,session:w},B=E,G=E,k=E,F=f({connections:[K(j)],selectedConnectionId:j.id,onConnectionChange:ue});let h;e[25]!==F||e[26]!==k.Header.Left?(h=n.jsx(k.Header.Left,{children:F}),e[25]=F,e[26]=k.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(E.Content,{children:n.jsx($.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(J,{})})}),e[31]=N):N=e[31];let I;return e[32]!==B||e[33]!==C?(I=n.jsxs(B,{children:[C,N]}),e[32]=B,e[33]=C,e[34]=I):I=e[34],n.jsx(O,{value:V,children:I})}function ue(){}function fe(t){return t.structuredContent??t}function Le(){const t=R.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=A(e);let f;t[1]!==m?(f=te.find(r=>r.id===m),t[1]=m,t[2]=f):f=t[2];const i=f;if(i?.renderHeader&&i?.renderEmptyState&&i?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let g;return t[4]!==i.binding||t[5]!==i.renderEmptyState||t[6]!==i.renderHeader?(g=n.jsx($.Suspense,{fallback:r,children:n.jsx(me,{binding:i.binding,renderHeader:i.renderHeader,renderEmptyState:i.renderEmptyState})}),t[4]=i.binding,t[5]=i.renderEmptyState,t[6]=i.renderHeader,t[7]=g):g=t[7],g}const o=i?.LayoutComponent;if(!o){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(J,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let c;return t[10]!==o?(c=n.jsx($.Suspense,{fallback:l,children:n.jsx(o,{})}),t[10]=o,t[11]=c):c=t[11],c}export{Le as default};
1
+ import{c as R,u as W,e as A,d as X,K as Z,j as n,r as $,aD as J,aE as ee,aF as te}from"./index-D9HmjKFM.js";import{i as v}from"./Loading01-KCITfr7g.js";import{c as ne}from"./binder-DYyCY7OY.js";import{P as O}from"./topbar-portal-BYH3tZsX.js";import{u as ie}from"./useQuery-DGMDf2So.js";import{h as se}from"./use-connection-DdTk8NLZ.js";import{a as oe,u as le,j as re}from"./constants-BHgsXonC.js";import{t as ae}from"./Settings01-DB_FXn41.js";import{B as ce}from"./button-BCe1bdkY.js";import{P as E}from"./index-DT392Y-e.js";import"./useMutation-4bsh-QBF.js";import"./use-mobile-DjLsite2.js";import"./tooltip-D4-guuax.js";function de(t,e){return t?t.filter(m=>ne(m,e)):[]}function K(t){return{id:t.id,title:t.title,icon:t.icon,description:t.description,app_name:t.app_name,app_id:t.app_id,tools:t.tools,metadata:t.metadata}}function me(t){const e=R.c(35),{binding:m,renderHeader:f,renderEmptyState:i}=t,{org:o,project:l}=W();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const{org:r,project:g,pluginId:u}=A(c),Q=se(),{data:y}=X.useSession();let _;e[1]!==o.id?(_={connectionId:oe,orgId:o.id},e[1]=o.id,e[2]=_):_=e[2];const H=le(_);let x;e[3]!==u||e[4]!==l.id?(x=Z.projectPluginConfig(l.id??"",u),e[3]=u,e[4]=l.id,e[5]=x):x=e[5];let p;e[6]!==u||e[7]!==l.id||e[8]!==H?(p=async()=>{const s=await H.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:u}});return s.structuredContent??s},e[6]=u,e[7]=l.id,e[8]=H,e[9]=p):p=e[9];const T=!!l.id&&!!u;let b;e[10]!==x||e[11]!==p||e[12]!==T?(b={queryKey:x,queryFn:p,enabled:T},e[10]=x,e[11]=p,e[12]=T,e[13]=b):b=e[13];const{data:U,isLoading:Y}=ie(b),q=de(Q,m),D=U?.config?.connectionId,j=D?q.find(s=>s.id===D):null,P=re({connectionId:j?.id,orgId:o.id}),w=y?.user?{user:{id:y.user.id,name:y.user.name,email:y.user.email,image:y.user.image}}:null,z={id:o.id,slug:o.slug,name:o.name};if(Y){let s;return e[14]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[14]=s):s=e[14],s}if(q.length===0){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let a;e[15]!==i?(a=i(),e[15]=i,e[16]=a):a=e[16];let d;return e[17]!==a?(d=n.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:a}),e[17]=a,e[18]=d):d=e[18],n.jsx(O,{value:s,children:d})}if(!j){const s={connectionId:null,connection:null,toolCaller:null,org:z,session:w};let a;e[19]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[n.jsx(ae,{size:48,className:"text-muted-foreground mb-2"}),n.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[19]=a):a=e[19];const d=r??o.slug,M=g??l.slug??"";let L;return e[20]!==d||e[21]!==M?(L=n.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[a,n.jsx(ce,{asChild:!0,children:n.jsx(ee,{to:"/$org/$project/settings",params:{org:d,project:M},children:"Go to Project Settings"})})]}),e[20]=d,e[21]=M,e[22]=L):L=e[22],n.jsx(O,{value:s,children:L})}let S;e[23]!==P?(S=(s,a)=>P?P.callTool({name:s,arguments:a}).then(fe):Promise.reject(new Error("MCP client is not available")),e[23]=P,e[24]=S):S=e[24];const V={connectionId:j.id,connection:K(j),toolCaller:S,org:z,session:w},B=E,G=E,k=E,F=f({connections:[K(j)],selectedConnectionId:j.id,onConnectionChange:ue});let h;e[25]!==F||e[26]!==k.Header.Left?(h=n.jsx(k.Header.Left,{children:F}),e[25]=F,e[26]=k.Header.Left,e[27]=h):h=e[27];let C;e[28]!==h||e[29]!==G.Header?(C=n.jsx(G.Header,{children:h}),e[28]=h,e[29]=G.Header,e[30]=C):C=e[30];let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(E.Content,{children:n.jsx($.Suspense,{fallback:n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),children:n.jsx(J,{})})}),e[31]=N):N=e[31];let I;return e[32]!==B||e[33]!==C?(I=n.jsxs(B,{children:[C,N]}),e[32]=B,e[33]=C,e[34]=I):I=e[34],n.jsx(O,{value:V,children:I})}function ue(){}function fe(t){return t.structuredContent??t}function Le(){const t=R.c(12);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{pluginId:m}=A(e);let f;t[1]!==m?(f=te.find(r=>r.id===m),t[1]=m,t[2]=f):f=t[2];const i=f;if(i?.renderHeader&&i?.renderEmptyState&&i?.binding){let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[3]=r):r=t[3];let g;return t[4]!==i.binding||t[5]!==i.renderEmptyState||t[6]!==i.renderHeader?(g=n.jsx($.Suspense,{fallback:r,children:n.jsx(me,{binding:i.binding,renderHeader:i.renderHeader,renderEmptyState:i.renderEmptyState})}),t[4]=i.binding,t[5]=i.renderEmptyState,t[6]=i.renderHeader,t[7]=g):g=t[7],g}const o=i?.LayoutComponent;if(!o){let r;return t[8]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(J,{}),t[8]=r):r=t[8],r}let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[n.jsx(v,{size:32,className:"animate-spin text-muted-foreground mb-4"}),n.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),t[9]=l):l=t[9];let c;return t[10]!==o?(c=n.jsx($.Suspense,{fallback:l,children:n.jsx(o,{})}),t[10]=o,t[11]=c):c=t[11],c}export{Le as default};
@@ -1 +1 @@
1
- import{c as b,j as t}from"./index-Chdo1wOf.js";import{c as h,B as g}from"./button-BlFVi9O-.js";function E(N){const e=b.c(21),{icon:o,illustration:a,title:u,description:d,buttonProps:s,buttonComponent:x,className:j,children:p}=N;let l;e[0]!==j?(l=h("flex flex-col items-center justify-center py-16 text-center",j),e[0]=j,e[1]=l):l=e[1];let i;e[2]!==o||e[3]!==a?(i=a?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:a}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=a,e[4]=i):i=e[4];let n;e[5]!==u?(n=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[5]=u,e[6]=n):n=e[6];let c;e[7]!==d?(c=d&&t.jsx("div",{className:"text-sm text-muted-foreground",children:d}),e[7]=d,e[8]=c):c=e[8];let r;e[9]!==n||e[10]!==c?(r=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[n,c]}),e[9]=n,e[10]=c,e[11]=r):r=e[11];let m;e[12]!==x||e[13]!==s?(m=(x??s)&&t.jsx("div",{className:"mt-4",children:x??(s&&t.jsx(g,{size:"sm",className:h(s?.className),...s}))}),e[12]=x,e[13]=s,e[14]=m):m=e[14];let f;return e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==r||e[19]!==m?(f=t.jsxs("div",{className:l,children:[i,r,m,p]}),e[15]=p,e[16]=l,e[17]=i,e[18]=r,e[19]=m,e[20]=f):f=e[20],f}export{E};
1
+ import{c as b,j as t}from"./index-D9HmjKFM.js";import{c as h,B as g}from"./button-BCe1bdkY.js";function E(N){const e=b.c(21),{icon:o,illustration:a,title:u,description:d,buttonProps:s,buttonComponent:x,className:j,children:p}=N;let l;e[0]!==j?(l=h("flex flex-col items-center justify-center py-16 text-center",j),e[0]=j,e[1]=l):l=e[1];let i;e[2]!==o||e[3]!==a?(i=a?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:a}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=a,e[4]=i):i=e[4];let n;e[5]!==u?(n=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[5]=u,e[6]=n):n=e[6];let c;e[7]!==d?(c=d&&t.jsx("div",{className:"text-sm text-muted-foreground",children:d}),e[7]=d,e[8]=c):c=e[8];let r;e[9]!==n||e[10]!==c?(r=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[n,c]}),e[9]=n,e[10]=c,e[11]=r):r=e[11];let m;e[12]!==x||e[13]!==s?(m=(x??s)&&t.jsx("div",{className:"mt-4",children:x??(s&&t.jsx(g,{size:"sm",className:h(s?.className),...s}))}),e[12]=x,e[13]=s,e[14]=m):m=e[14];let f;return e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==r||e[19]!==m?(f=t.jsxs("div",{className:l,children:[i,r,m,p]}),e[15]=p,e[16]=l,e[17]=i,e[18]=r,e[19]=m,e[20]=f):f=e[20],f}export{E};
@@ -1 +1 @@
1
- import{c as v,j as t}from"./index-Chdo1wOf.js";import{i as y}from"./Loading01-BZRHfswB.js";import{i as C}from"./SearchMd-CdY2Qz31.js";import{I as w}from"./input-C2bYHqSZ.js";import{c as N}from"./button-BlFVi9O-.js";function R(u){const e=v.c(21),{value:f,onChange:h,placeholder:j,onKeyDown:d,className:p,isSearching:g,disabled:x}=u,n=j===void 0?"Search...":j;let s;e[0]!==p?(s=N("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=s):s=e[1];const o=x?"cursor-not-allowed opacity-50":"cursor-text";let l;e[2]!==o?(l=N("flex items-center gap-2.5 h-12 px-4",o),e[2]=o,e[3]=l):l=e[3];let i;e[4]!==g?(i=g?t.jsx(y,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=g,e[5]=i):i=e[5];let r;e[6]!==h?(r=b=>h(b.target.value),e[6]=h,e[7]=r):r=e[7];let a;e[8]!==x||e[9]!==d||e[10]!==n||e[11]!==r||e[12]!==f?(a=t.jsx(w,{value:f,onChange:r,onKeyDown:d,placeholder:n,disabled:x,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[8]=x,e[9]=d,e[10]=n,e[11]=r,e[12]=f,e[13]=a):a=e[13];let c;e[14]!==l||e[15]!==i||e[16]!==a?(c=t.jsxs("label",{className:l,children:[i,a]}),e[14]=l,e[15]=i,e[16]=a,e[17]=c):c=e[17];let m;return e[18]!==s||e[19]!==c?(m=t.jsx("div",{className:s,children:c}),e[18]=s,e[19]=c,e[20]=m):m=e[20],m}function S(){const u=v.c(1);let e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),u[0]=e):e=u[0],e}function _(u){const e=v.c(24),{image:f,title:h,description:j,actions:d,className:p,descriptionClassName:g,actionsClassName:x}=u;let n;e[0]!==p?(n=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",p),e[0]=p,e[1]=n):n=e[1];let s;e[2]!==f?(s=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(S,{})}),e[2]=f,e[3]=s):s=e[3];let o;e[4]!==h?(o=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:h}),e[4]=h,e[5]=o):o=e[5];let l;e[6]!==g?(l=N("text-sm text-muted-foreground text-center max-w-[300px]",g),e[6]=g,e[7]=l):l=e[7];let i;e[8]!==j||e[9]!==l?(i=t.jsx("div",{className:l,children:j}),e[8]=j,e[9]=l,e[10]=i):i=e[10];let r;e[11]!==o||e[12]!==i?(r=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[o,i]}),e[11]=o,e[12]=i,e[13]=r):r=e[13];let a;e[14]!==d||e[15]!==x?(a=d&&t.jsx("div",{className:N("flex items-center gap-2",x),children:d}),e[14]=d,e[15]=x,e[16]=a):a=e[16];let c;e[17]!==r||e[18]!==a?(c=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[r,a]}),e[17]=r,e[18]=a,e[19]=c):c=e[19];let m;return e[20]!==n||e[21]!==s||e[22]!==c?(m=t.jsxs("div",{className:n,children:[s,c]}),e[20]=n,e[21]=s,e[22]=c,e[23]=m):m=e[23],m}export{R as C,_ as E};
1
+ import{c as v,j as t}from"./index-D9HmjKFM.js";import{i as y}from"./Loading01-KCITfr7g.js";import{i as C}from"./SearchMd-DqymgKbi.js";import{I as w}from"./input-Dh6_kcmG.js";import{c as N}from"./button-BCe1bdkY.js";function R(u){const e=v.c(21),{value:f,onChange:h,placeholder:j,onKeyDown:d,className:p,isSearching:g,disabled:x}=u,n=j===void 0?"Search...":j;let s;e[0]!==p?(s=N("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=s):s=e[1];const o=x?"cursor-not-allowed opacity-50":"cursor-text";let l;e[2]!==o?(l=N("flex items-center gap-2.5 h-12 px-4",o),e[2]=o,e[3]=l):l=e[3];let i;e[4]!==g?(i=g?t.jsx(y,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=g,e[5]=i):i=e[5];let r;e[6]!==h?(r=b=>h(b.target.value),e[6]=h,e[7]=r):r=e[7];let a;e[8]!==x||e[9]!==d||e[10]!==n||e[11]!==r||e[12]!==f?(a=t.jsx(w,{value:f,onChange:r,onKeyDown:d,placeholder:n,disabled:x,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[8]=x,e[9]=d,e[10]=n,e[11]=r,e[12]=f,e[13]=a):a=e[13];let c;e[14]!==l||e[15]!==i||e[16]!==a?(c=t.jsxs("label",{className:l,children:[i,a]}),e[14]=l,e[15]=i,e[16]=a,e[17]=c):c=e[17];let m;return e[18]!==s||e[19]!==c?(m=t.jsx("div",{className:s,children:c}),e[18]=s,e[19]=c,e[20]=m):m=e[20],m}function S(){const u=v.c(1);let e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),u[0]=e):e=u[0],e}function _(u){const e=v.c(24),{image:f,title:h,description:j,actions:d,className:p,descriptionClassName:g,actionsClassName:x}=u;let n;e[0]!==p?(n=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",p),e[0]=p,e[1]=n):n=e[1];let s;e[2]!==f?(s=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(S,{})}),e[2]=f,e[3]=s):s=e[3];let o;e[4]!==h?(o=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:h}),e[4]=h,e[5]=o):o=e[5];let l;e[6]!==g?(l=N("text-sm text-muted-foreground text-center max-w-[300px]",g),e[6]=g,e[7]=l):l=e[7];let i;e[8]!==j||e[9]!==l?(i=t.jsx("div",{className:l,children:j}),e[8]=j,e[9]=l,e[10]=i):i=e[10];let r;e[11]!==o||e[12]!==i?(r=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[o,i]}),e[11]=o,e[12]=i,e[13]=r):r=e[13];let a;e[14]!==d||e[15]!==x?(a=d&&t.jsx("div",{className:N("flex items-center gap-2",x),children:d}),e[14]=d,e[15]=x,e[16]=a):a=e[16];let c;e[17]!==r||e[18]!==a?(c=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[r,a]}),e[17]=r,e[18]=a,e[19]=c):c=e[19];let m;return e[20]!==n||e[21]!==s||e[22]!==c?(m=t.jsxs("div",{className:n,children:[s,c]}),e[20]=n,e[21]=s,e[22]=c,e[23]=m):m=e[23],m}export{R as C,_ as E};
@@ -1 +1 @@
1
- import{c as V,j as o}from"./index-Chdo1wOf.js";import{B as C}from"./button-BlFVi9O-.js";import{I as P}from"./input-C2bYHqSZ.js";import{s as A}from"./Plus-YlJja9E2.js";import{s as R}from"./Trash01-DjSET-_p.js";function z(i){const e=i.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(l=>e.includes(l))||["sk_","rk_","whsec_","pk_live","sk_live"].some(l=>e.startsWith(l))||["_key","_secret","_token","_password","_auth","_pat"].some(l=>e.endsWith(l)))}function T(i){const e=V.c(34),{value:t,onChange:s,keyPlaceholder:j,valuePlaceholder:l,className:E}=i,p=j===void 0?"VARIABLE_NAME":j,h=l===void 0?"value...":l;let k;e[0]!==s||e[1]!==t?(k=()=>{s([...t,{key:"",value:""}])},e[0]=s,e[1]=t,e[2]=k):k=e[2];const N=k;let y;e[3]!==s||e[4]!==t?(y=n=>{s(t.filter((c,r)=>r!==n))},e[3]=s,e[4]=t,e[5]=y):y=e[5];const m=y;let g;e[6]!==s||e[7]!==t?(g=(n,c)=>{const r=[...t],a=r[n];a&&(r[n]={key:c,value:a.value},s(r))},e[6]=s,e[7]=t,e[8]=g):g=e[8];const _=g;let x;e[9]!==s||e[10]!==t?(x=(n,c)=>{const r=[...t],a=r[n];a&&(r[n]={key:a.key,value:c},s(r))},e[9]=s,e[10]=t,e[11]=x):x=e[11];const v=x;let u;if(e[12]!==_||e[13]!==m||e[14]!==v||e[15]!==p||e[16]!==t||e[17]!==h){let n;e[19]!==_||e[20]!==m||e[21]!==v||e[22]!==p||e[23]!==h?(n=(c,r)=>o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(P,{placeholder:p,value:c.key,onChange:a=>_(r,a.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),o.jsx(P,{type:z(c.key)?"password":"text",placeholder:h,value:c.value,onChange:a=>v(r,a.target.value),className:"h-10 rounded-lg flex-1"}),o.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>m(r),children:o.jsx(R,{size:16})})]},r),e[19]=_,e[20]=m,e[21]=v,e[22]=p,e[23]=h,e[24]=n):n=e[24],u=t.map(n),e[12]=_,e[13]=m,e[14]=v,e[15]=p,e[16]=t,e[17]=h,e[18]=u}else u=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(A,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let f;e[26]!==N?(f=o.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:N,children:[w,"Add Environment Variable"]}),e[26]=N,e[27]=f):f=e[27];let d;e[28]!==u||e[29]!==f?(d=o.jsxs("div",{className:"flex flex-col gap-2",children:[u,f]}),e[28]=u,e[29]=f,e[30]=d):d=e[30];let b;return e[31]!==E||e[32]!==d?(b=o.jsx("div",{className:E,children:d}),e[31]=E,e[32]=d,e[33]=b):b=e[33],b}function W(i){const e={};for(const{key:t,value:s}of i)t.trim()&&(e[t.trim()]=s);return e}function $(i){return i?Object.entries(i).map(([e,t])=>({key:e,value:t})):[]}export{T as E,W as e,$ as r};
1
+ import{c as V,j as o}from"./index-D9HmjKFM.js";import{B as C}from"./button-BCe1bdkY.js";import{I as P}from"./input-Dh6_kcmG.js";import{s as A}from"./Plus-BNEEXEVt.js";import{s as R}from"./Trash01-Ve8IhEa-.js";function z(i){const e=i.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(l=>e.includes(l))||["sk_","rk_","whsec_","pk_live","sk_live"].some(l=>e.startsWith(l))||["_key","_secret","_token","_password","_auth","_pat"].some(l=>e.endsWith(l)))}function T(i){const e=V.c(34),{value:t,onChange:s,keyPlaceholder:j,valuePlaceholder:l,className:E}=i,p=j===void 0?"VARIABLE_NAME":j,h=l===void 0?"value...":l;let k;e[0]!==s||e[1]!==t?(k=()=>{s([...t,{key:"",value:""}])},e[0]=s,e[1]=t,e[2]=k):k=e[2];const N=k;let y;e[3]!==s||e[4]!==t?(y=n=>{s(t.filter((c,r)=>r!==n))},e[3]=s,e[4]=t,e[5]=y):y=e[5];const m=y;let g;e[6]!==s||e[7]!==t?(g=(n,c)=>{const r=[...t],a=r[n];a&&(r[n]={key:c,value:a.value},s(r))},e[6]=s,e[7]=t,e[8]=g):g=e[8];const _=g;let x;e[9]!==s||e[10]!==t?(x=(n,c)=>{const r=[...t],a=r[n];a&&(r[n]={key:a.key,value:c},s(r))},e[9]=s,e[10]=t,e[11]=x):x=e[11];const v=x;let u;if(e[12]!==_||e[13]!==m||e[14]!==v||e[15]!==p||e[16]!==t||e[17]!==h){let n;e[19]!==_||e[20]!==m||e[21]!==v||e[22]!==p||e[23]!==h?(n=(c,r)=>o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx(P,{placeholder:p,value:c.key,onChange:a=>_(r,a.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),o.jsx(P,{type:z(c.key)?"password":"text",placeholder:h,value:c.value,onChange:a=>v(r,a.target.value),className:"h-10 rounded-lg flex-1"}),o.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>m(r),children:o.jsx(R,{size:16})})]},r),e[19]=_,e[20]=m,e[21]=v,e[22]=p,e[23]=h,e[24]=n):n=e[24],u=t.map(n),e[12]=_,e[13]=m,e[14]=v,e[15]=p,e[16]=t,e[17]=h,e[18]=u}else u=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(A,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let f;e[26]!==N?(f=o.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:N,children:[w,"Add Environment Variable"]}),e[26]=N,e[27]=f):f=e[27];let d;e[28]!==u||e[29]!==f?(d=o.jsxs("div",{className:"flex flex-col gap-2",children:[u,f]}),e[28]=u,e[29]=f,e[30]=d):d=e[30];let b;return e[31]!==E||e[32]!==d?(b=o.jsx("div",{className:E,children:d}),e[31]=E,e[32]=d,e[33]=b):b=e[33],b}function W(i){const e={};for(const{key:t,value:s}of i)t.trim()&&(e[t.trim()]=s);return e}function $(i){return i?Object.entries(i).map(([e,t])=>({key:e,value:t})):[]}export{T as E,W as e,$ as r};
@@ -1 +1 @@
1
- import{r as s,j as e}from"./index-Chdo1wOf.js";import{B as o}from"./button-BlFVi9O-.js";import{i as a}from"./AlertTriangle-BR7J9Jvh.js";class u extends s.Component{state={hasError:!1,error:null};static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,t){console.error("Uncaught error:",r,t)}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:r}=this.props;return typeof r=="function"?r({error:this.state.error,resetError:this.resetError}):r!==void 0?r:e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[e.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:e.jsx(a,{className:"h-6 w-6 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),e.jsx(o,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}export{u as E};
1
+ import{r as s,j as e}from"./index-D9HmjKFM.js";import{B as o}from"./button-BCe1bdkY.js";import{i as a}from"./AlertTriangle-cnBbzVPi.js";class u extends s.Component{state={hasError:!1,error:null};static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,t){console.error("Uncaught error:",r,t)}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:r}=this.props;return typeof r=="function"?r({error:this.state.error,resetError:this.resetError}):r!==void 0?r:e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[e.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:e.jsx(a,{className:"h-6 w-6 text-destructive"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),e.jsx(o,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}export{u as E};
@@ -1 +1 @@
1
- import"./constants-0nWmzfAq.js";import{g as A}from"./github-icon-Dp3wHhYE.js";import{g as D}from"./registry-utils-BL6Np0uD.js";import{g as H}from"./generate-id-Dyweu44Y.js";const E="mcp.mesh";function O(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function R(e){const r=e?.identifier||e?.name;return r?r.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown"}function j(e,r,d,i){const n=e.server,t=e._meta?.[E],f=new Date().toISOString(),b=t?.friendlyName||t?.friendly_name||e.title||n?.title||n?.name||"Unnamed MCP Server",v=n?.description||null,x=n?.icons?.[0]?.src||A(n?.repository)||null,o=t?.oauth_config,I=o&&typeof o.authorizationEndpoint=="string"&&typeof o.tokenEndpoint=="string"&&typeof o.clientId=="string"&&Array.isArray(o.scopes)&&(o.grantType==="authorization_code"||o.grantType==="client_credentials")?o:null,N=t?.configuration_state,P=t?.configuration_scopes,T=n?.repository?{url:n.repository.url,source:n.repository.source,subfolder:n.repository.subfolder}:null,u=n?.packages??[],m=n?.remotes??[],C=i?.packageIndex??0,S=i?.remoteIndex??0,y=u.length>0&&i?.packageIndex!==void 0,a=y?u[C]:null,s=y?null:m[S];let c,l,_=null;if(a){const h=a.identifier||a.name;c="STDIO",l="";const g={};if(a.environmentVariables)for(const k of a.environmentVariables)k.name&&(g[k.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(g).length>0&&{envVars:g}}}else s?(c=D(s.type)||"HTTP",l=s.url||""):(c="HTTP",l="");const w=m.length>1,M=u.length>1;let p="";a&&M?p=` (${R(a)})`:s&&w&&(p=` (${O(s)})`);const U=b+p;return{id:H("conn"),title:U,description:v,icon:x,app_name:t?.appName||n?.name||null,app_id:t?.id||e.id||null,connection_type:c,connection_url:l,connection_token:null,connection_headers:_,oauth_config:I,configuration_state:N??null,configuration_scopes:P??null,metadata:{source:"store",registry_item_id:e.id,verified:t?.verified??!1,scopeName:t?.scopeName??null,toolsCount:t?.tools?.length??0,publishedAt:t?.publishedAt??null,repository:T},created_at:f,updated_at:f,created_by:d,organization_id:r,tools:null,bindings:null,status:"inactive"}}export{E as M,j as e};
1
+ import"./constants-CsU2_t5q.js";import{g as A}from"./github-icon-Dp3wHhYE.js";import{g as D}from"./registry-utils-CyMutbQd.js";import{g as H}from"./generate-id-Dyweu44Y.js";const E="mcp.mesh";function O(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function R(e){const r=e?.identifier||e?.name;return r?r.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase()):"Unknown"}function j(e,r,d,i){const n=e.server,t=e._meta?.[E],f=new Date().toISOString(),b=t?.friendlyName||t?.friendly_name||e.title||n?.title||n?.name||"Unnamed MCP Server",v=n?.description||null,x=n?.icons?.[0]?.src||A(n?.repository)||null,o=t?.oauth_config,I=o&&typeof o.authorizationEndpoint=="string"&&typeof o.tokenEndpoint=="string"&&typeof o.clientId=="string"&&Array.isArray(o.scopes)&&(o.grantType==="authorization_code"||o.grantType==="client_credentials")?o:null,N=t?.configuration_state,P=t?.configuration_scopes,T=n?.repository?{url:n.repository.url,source:n.repository.source,subfolder:n.repository.subfolder}:null,u=n?.packages??[],m=n?.remotes??[],C=i?.packageIndex??0,S=i?.remoteIndex??0,y=u.length>0&&i?.packageIndex!==void 0,a=y?u[C]:null,s=y?null:m[S];let c,l,_=null;if(a){const h=a.identifier||a.name;c="STDIO",l="";const g={};if(a.environmentVariables)for(const k of a.environmentVariables)k.name&&(g[k.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(g).length>0&&{envVars:g}}}else s?(c=D(s.type)||"HTTP",l=s.url||""):(c="HTTP",l="");const w=m.length>1,M=u.length>1;let p="";a&&M?p=` (${R(a)})`:s&&w&&(p=` (${O(s)})`);const U=b+p;return{id:H("conn"),title:U,description:v,icon:x,app_name:t?.appName||n?.name||null,app_id:t?.id||e.id||null,connection_type:c,connection_url:l,connection_token:null,connection_headers:_,oauth_config:I,configuration_state:N??null,configuration_scopes:P??null,metadata:{source:"store",registry_item_id:e.id,verified:t?.verified??!1,scopeName:t?.scopeName??null,toolsCount:t?.tools?.length??0,publishedAt:t?.publishedAt??null,repository:T},created_at:f,updated_at:f,created_by:d,organization_id:r,tools:null,bindings:null,status:"inactive"}}export{E as M,j as e};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/grid-view-CqSeu3_O.js","assets/index-Chdo1wOf.js","assets/index-BHAz67cr.css","assets/topbar-portal-m9wB0x-E.js","assets/button-BlFVi9O-.js","assets/AlertCircle-DiDJuuO7.js","assets/Download01-CMusldak.js","assets/File02-Drnn3tnJ.js","assets/File06-CL04kImU.js","assets/Image01-DcX1niB5.js","assets/Loading01-BZRHfswB.js","assets/Trash01-DjSET-_p.js","assets/Upload01-C0CPwbYb.js","assets/useMutation-BTkDU0tp.js","assets/useQuery-C0AkqYB7.js","assets/useInfiniteQuery-BHuahm2t.js","assets/infiniteQueryObserver-DOxbID_2.js","assets/checkbox-C81GTltZ.js","assets/Check-ebSdGxZp.js","assets/ChevronRight-D1zpPr9G.js","assets/Grid01-BWcrgmNx.js","assets/Home02-lTWiIHtK.js","assets/List-DqeEnxu3.js"])))=>i.map(i=>d[i]);
2
- import{r as M,c as K,bt as A,m as Y,t as D,j as t,bu as X,H as ee}from"./index-Chdo1wOf.js";import{u as Q}from"./topbar-portal-m9wB0x-E.js";import{u as te}from"./useInfiniteQuery-BHuahm2t.js";import{B as _,c as J}from"./button-BlFVi9O-.js";import{C as U}from"./checkbox-C81GTltZ.js";import{i as se}from"./AlertCircle-DiDJuuO7.js";import{i as ae}from"./ChevronRight-D1zpPr9G.js";import{n as ie}from"./Download01-CMusldak.js";import{i as re}from"./File02-Drnn3tnJ.js";import{c as G}from"./Grid01-BWcrgmNx.js";import{a as oe}from"./Home02-lTWiIHtK.js";import{i as V}from"./List-DqeEnxu3.js";import{i as L}from"./Loading01-BZRHfswB.js";import{s as W}from"./Trash01-DjSET-_p.js";import{i as $}from"./Upload01-C0CPwbYb.js";import{u as q}from"./useMutation-BTkDU0tp.js";const Z=({size:s=24,color:e="currentColor",...i})=>M.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},M.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Z.displayName="FolderPlus";const R={objects:(s,e,i=!1,o=100)=>["object-storage","objects",s,e,{flat:i,pageSize:o}],metadata:(s,e)=>["object-storage","metadata",s,e],imagePreview:(s,e)=>["object-storage","image-preview",s,e]},ne=100;function le(s){const e=K.c(30);let i;e[0]!==s?(i=s===void 0?{}:s,e[0]=s,e[1]=i):i=e[1];const o=i,{prefix:n,flat:x,pageSize:d}=o,m=n===void 0?"":n,l=x===void 0?!1:x,c=d===void 0?ne:d,{connectionId:b,toolCaller:S}=Q();let f;e[2]!==b||e[3]!==l||e[4]!==c||e[5]!==m?(f=R.objects(b,m,l,c),e[2]=b,e[3]=l,e[4]=c,e[5]=m,e[6]=f):f=e[6];let u;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==S?(u=async a=>{const{pageParam:r}=a;return await S("LIST_OBJECTS",{prefix:m||void 0,maxKeys:c,continuationToken:r,delimiter:l?void 0:"/"})},e[7]=l,e[8]=c,e[9]=m,e[10]=S,e[11]=u):u=e[11];let E;e[12]!==f||e[13]!==u?(E={queryKey:f,queryFn:u,initialPageParam:void 0,getNextPageParam:ge,staleTime:3e4},e[12]=f,e[13]=u,e[14]=E):E=e[14];const{data:p,isLoading:z,isFetchingNextPage:g,hasNextPage:y,fetchNextPage:h,error:w}=te(E);let v;if(l){let a;e[15]!==p?.pages?(a=p?.pages.flatMap(he).filter(pe).map(xe)??[],e[15]=p?.pages,e[16]=a):a=e[16],v=a}else{let a;if(e[17]!==p?.pages){const r=p?.pages[0]?.commonPrefixes?.map(ue)??[],j=p?.pages.flatMap(de)??[];a=[...r.sort(ce),...j],e[17]=p?.pages,e[18]=a}else a=e[18];v=a}let N;e[19]!==h||e[20]!==y||e[21]!==g?(N=()=>{y&&!g&&h()},e[19]=h,e[20]=y,e[21]=g,e[22]=N):N=e[22];const C=N,F=y??!1,P=w;let k;return e[23]!==g||e[24]!==z||e[25]!==C||e[26]!==v||e[27]!==P||e[28]!==F?(k={objects:v,isLoading:z,isFetchingMore:g,hasMore:F,loadMore:C,error:P},e[23]=g,e[24]=z,e[25]=C,e[26]=v,e[27]=P,e[28]=F,e[29]=k):k=e[29],k}function ce(s,e){return s.key.localeCompare(e.key)}function de(s){return(s.objects??[]).filter(fe).map(me)}function me(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function fe(s){return!s.key.endsWith("/")}function ue(s){return{key:s,size:0,lastModified:"",etag:"",isFolder:!0}}function xe(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function pe(s){return!s.key.endsWith("/")}function he(s){return s.objects??[]}function ge(s){return s.nextContinuationToken}function I(s){const e=s.split("/").filter(Boolean);return e[e.length-1]||s}function je(s){if(s===0)return"0 B";const e=["B","KB","MB","GB","TB"],i=1024,o=Math.floor(Math.log(s)/Math.log(i));return`${parseFloat((s/Math.pow(i,o)).toFixed(1))} ${e[o]}`}function ye(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function ve(s){const e=[],i=s.split("/").filter(Boolean);let o="";for(const n of i)o+=n+"/",e.push({name:n,path:o});return e}function Ie(s,e){switch(s.split(".").pop()?.toLowerCase()){case"jpg":case"jpeg":case"png":case"gif":case"webp":case"svg":return"Image01";case"mp4":case"mov":case"avi":case"webm":return"VideoRecorder";case"mp3":case"wav":case"ogg":return"Music01";case"pdf":return"File06";case"zip":case"tar":case"gz":case"rar":return"File07";case"js":case"ts":case"tsx":case"jsx":case"json":case"html":case"css":return"FileCode01";case"md":case"txt":return"File04";default:return"File02"}}const Ne=M.lazy(()=>X(()=>import("./grid-view-CqSeu3_O.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])));function be(s){const e=K.c(50),{item:i,selected:o,showFullPath:n,onSelect:x,onNavigate:d,onDownload:m,onDelete:l}=s,c=n===void 0?!1:n;let b;e[0]!==i.key||e[1]!==c?(b=c?i.key:I(i.key),e[0]=i.key,e[1]=c,e[2]=b):b=e[2];const S=b;let f;e[3]!==x||e[4]!==o?(f=t.jsx(U,{checked:o,onCheckedChange:x,className:"opacity-0 group-hover:opacity-100 focus:opacity-100 data-[state=checked]:opacity-100"}),e[3]=x,e[4]=o,e[5]=f):f=e[5];let u;e[6]!==i.isFolder||e[7]!==i.key||e[8]!==d?(u=()=>i.isFolder?d(i.key):void 0,e[6]=i.isFolder,e[7]=i.key,e[8]=d,e[9]=u):u=e[9];const E=i.isFolder&&"cursor-pointer hover:text-primary";let p;e[10]!==E?(p=J("flex items-center gap-2 flex-1 min-w-0 text-left",E),e[10]=E,e[11]=p):p=e[11];let z;e[12]!==i.isFolder?(z=i.isFolder?t.jsx(ee,{size:18,className:"text-amber-500 shrink-0"}):t.jsx(re,{size:18,className:"text-muted-foreground shrink-0"}),e[12]=i.isFolder,e[13]=z):z=e[13];let g;e[14]!==S?(g=t.jsx("span",{className:"truncate",children:S}),e[14]=S,e[15]=g):g=e[15];let y;e[16]!==u||e[17]!==p||e[18]!==z||e[19]!==g?(y=t.jsxs("button",{type:"button",onClick:u,className:p,children:[z,g]}),e[16]=u,e[17]=p,e[18]=z,e[19]=g,e[20]=y):y=e[20];let h;e[21]!==i.isFolder||e[22]!==i.size?(h=i.isFolder?"-":je(i.size),e[21]=i.isFolder,e[22]=i.size,e[23]=h):h=e[23];let w;e[24]!==h?(w=t.jsx("span",{className:"text-sm text-muted-foreground w-20 text-right shrink-0",children:h}),e[24]=h,e[25]=w):w=e[25];let v;e[26]!==i.isFolder||e[27]!==i.lastModified?(v=i.isFolder?"-":ye(i.lastModified),e[26]=i.isFolder,e[27]=i.lastModified,e[28]=v):v=e[28];let N;e[29]!==v?(N=t.jsx("span",{className:"text-sm text-muted-foreground w-28 text-right shrink-0",children:v}),e[29]=v,e[30]=N):N=e[30];let C;e[31]!==i.isFolder||e[32]!==i.key||e[33]!==m?(C=!i.isFolder&&t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0",onClick:()=>m(i.key),children:t.jsx(ie,{size:14})}),e[31]=i.isFolder,e[32]=i.key,e[33]=m,e[34]=C):C=e[34];let F;e[35]!==i.key||e[36]!==l?(F=()=>l(i.key),e[35]=i.key,e[36]=l,e[37]=F):F=e[37];let P;e[38]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(W,{size:14}),e[38]=P):P=e[38];let k;e[39]!==F?(k=t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F,children:P}),e[39]=F,e[40]=k):k=e[40];let a;e[41]!==C||e[42]!==k?(a=t.jsxs("div",{className:"flex items-center gap-1 w-16 justify-end shrink-0 opacity-0 group-hover:opacity-100",children:[C,k]}),e[41]=C,e[42]=k,e[43]=a):a=e[43];let r;return e[44]!==w||e[45]!==N||e[46]!==a||e[47]!==f||e[48]!==y?(r=t.jsxs("div",{className:"group flex items-center gap-3 px-4 py-2 hover:bg-muted/50 border-b border-border last:border-b-0",children:[f,y,w,N,a]}),e[44]=w,e[45]=N,e[46]=a,e[47]=f,e[48]=y,e[49]=r):r=e[49],r}function H(s){const e=K.c(8),{prefix:i,onNavigate:o}=s;let n;if(e[0]!==o||e[1]!==i){const x=ve(i);let d;e[3]!==o?(d=()=>o(""),e[3]=o,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(oe,{size:16}),e[5]=m):m=e[5];let l;e[6]!==d?(l=t.jsx("button",{type:"button",onClick:d,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground",children:m}),e[6]=d,e[7]=l):l=e[7],n=t.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[l,x.map((c,b)=>t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(ae,{size:14,className:"text-muted-foreground"}),t.jsx("button",{type:"button",onClick:()=>o(c.path),className:J("hover:text-primary",b===x.length-1?"font-medium text-foreground":"text-muted-foreground"),children:c.name})]},c.path))]}),e[0]=o,e[1]=i,e[2]=n}else n=e[2];return n}function ke(){const{path:s="",flat:e=!1,view:i="table"}=A.useSearch({from:"/"}),o=A.useNavigate(),[n,x]=M.useState(new Set),d=a=>{x(new Set),o({to:"/",search:{path:a||void 0,flat:e,view:i}})},m=a=>{x(new Set),o({to:"/",search:{path:a?void 0:s||void 0,flat:a,view:i}})},l=a=>{x(new Set),o({to:"/",search:{path:s||void 0,flat:e,view:a}})},c=M.useRef(null),b=Y(),{connectionId:S,toolCaller:f}=Q(),{objects:u,isLoading:E,isFetchingMore:p,hasMore:z,loadMore:g,error:y}=le({prefix:s,flat:e}),h=q({mutationFn:async a=>{const r=s+a.name,{url:j}=await f("PUT_PRESIGNED_URL",{key:r,contentType:a.type||"application/octet-stream"}),T=await fetch(j,{method:"PUT",body:a,headers:{"Content-Type":a.type||"application/octet-stream"}});if(!T.ok)throw new Error(`Upload failed: ${T.statusText}`);return r},onSuccess:a=>{D.success(`Uploaded ${I(a)}`),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.error(`Upload failed: ${a.message}`)}}),w=q({mutationFn:async a=>a.length===1&&a[0]?f("DELETE_OBJECT",{key:a[0]}):f("DELETE_OBJECTS",{keys:a}),onSuccess:()=>{D.success("Deleted successfully"),x(new Set),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.error(`Delete failed: ${a.message}`)}}),v=async a=>{try{const{url:r}=await f("GET_PRESIGNED_URL",{key:a}),j=await fetch(r);if(!j.ok)throw new Error(`Failed to fetch file: ${j.statusText}`);const T=await j.blob(),O=URL.createObjectURL(T),B=document.createElement("a");B.href=O,B.download=I(a),document.body.appendChild(B),B.click(),document.body.removeChild(B),URL.revokeObjectURL(O)}catch(r){D.error(`Download failed: ${r instanceof Error?r.message:"Unknown error"}`)}},N=a=>{const r=a.target.files;if(r){for(const j of Array.from(r))h.mutate(j);a.target.value=""}},C=(a,r)=>{const j=new Set(n);r?j.add(a):j.delete(a),x(j)},F=a=>{x(a?new Set(u.map(r=>r.key)):new Set)},P=()=>{n.size!==0&&w.mutate(Array.from(n))},k=a=>{if(!z||p)return;const r=a.currentTarget;r.scrollHeight-r.scrollTop-r.clientHeight<200&&g()};return y?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(se,{size:48,className:"text-destructive mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),t.jsx("p",{className:"text-muted-foreground text-center",children:y.message})]}):i==="grid"?t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]}),t.jsx(M.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(L,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ne,{prefix:s,flat:e,onNavigate:d})})]}):t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[n.size>0&&t.jsxs(_,{variant:"outline",size:"sm",className:"text-destructive",onClick:P,disabled:w.isPending,children:[t.jsx(W,{size:14,className:"mr-1"}),"Delete (",n.size,")"]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-border bg-muted/30 text-sm font-medium text-muted-foreground",children:[t.jsx(U,{checked:n.size>0&&n.size===u.length,onCheckedChange:F}),t.jsx("span",{className:"flex-1",children:"Name"}),t.jsx("span",{className:"w-20 text-right",children:"Size"}),t.jsx("span",{className:"w-28 text-right",children:"Modified"}),t.jsx("span",{className:"w-16"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",onScroll:k,children:E?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx(L,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):u.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(Z,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),t.jsxs(_,{variant:"outline",onClick:()=>c.current?.click(),children:[t.jsx($,{size:14,className:"mr-1"}),"Upload files"]})]}):t.jsxs(t.Fragment,{children:[u.map(a=>t.jsx(be,{item:a,selected:n.has(a.key),showFullPath:e,onSelect:r=>C(a.key,r),onNavigate:d,onDownload:v,onDelete:r=>w.mutate([r])},a.key)),p&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(L,{size:20,className:"animate-spin text-muted-foreground"})})]})})]})}const Ke=Object.freeze(Object.defineProperty({__proto__:null,default:ke},Symbol.toStringTag,{value:"Module"}));export{R as K,Ie as a,Ke as b,je as f,I as g,Z as s,le as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/grid-view-Co3RRJOJ.js","assets/index-D9HmjKFM.js","assets/index-BHAz67cr.css","assets/topbar-portal-BYH3tZsX.js","assets/button-BCe1bdkY.js","assets/AlertCircle-e9vRKWVt.js","assets/Download01-BjOSY-hg.js","assets/File02-BUAk_Mxv.js","assets/File06-DiS1m4o9.js","assets/Image01-DNFNbFFa.js","assets/Loading01-KCITfr7g.js","assets/Trash01-Ve8IhEa-.js","assets/Upload01-BM2mkCav.js","assets/useMutation-4bsh-QBF.js","assets/useQuery-DGMDf2So.js","assets/useInfiniteQuery-JCmjqA8d.js","assets/infiniteQueryObserver-D6Tb66x3.js","assets/checkbox-CwkaBsQF.js","assets/Check-EA1ayL22.js","assets/ChevronRight-C9tH4CkK.js","assets/Grid01-D2I-nDSy.js","assets/Home02-BA7Zg0e7.js","assets/List-DGxlSM0E.js"])))=>i.map(i=>d[i]);
2
+ import{r as M,c as K,bt as A,m as Y,t as D,j as t,bu as X,H as ee}from"./index-D9HmjKFM.js";import{u as Q}from"./topbar-portal-BYH3tZsX.js";import{u as te}from"./useInfiniteQuery-JCmjqA8d.js";import{B as _,c as J}from"./button-BCe1bdkY.js";import{C as U}from"./checkbox-CwkaBsQF.js";import{i as se}from"./AlertCircle-e9vRKWVt.js";import{i as ae}from"./ChevronRight-C9tH4CkK.js";import{n as ie}from"./Download01-BjOSY-hg.js";import{i as re}from"./File02-BUAk_Mxv.js";import{c as G}from"./Grid01-D2I-nDSy.js";import{a as oe}from"./Home02-BA7Zg0e7.js";import{i as V}from"./List-DGxlSM0E.js";import{i as L}from"./Loading01-KCITfr7g.js";import{s as W}from"./Trash01-Ve8IhEa-.js";import{i as $}from"./Upload01-BM2mkCav.js";import{u as q}from"./useMutation-4bsh-QBF.js";const Z=({size:s=24,color:e="currentColor",...i})=>M.createElement("svg",{viewBox:"0 0 24 24",width:s,height:s,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},M.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Zm10 10v-6m-3 3h6"}));Z.displayName="FolderPlus";const R={objects:(s,e,i=!1,o=100)=>["object-storage","objects",s,e,{flat:i,pageSize:o}],metadata:(s,e)=>["object-storage","metadata",s,e],imagePreview:(s,e)=>["object-storage","image-preview",s,e]},ne=100;function le(s){const e=K.c(30);let i;e[0]!==s?(i=s===void 0?{}:s,e[0]=s,e[1]=i):i=e[1];const o=i,{prefix:n,flat:x,pageSize:d}=o,m=n===void 0?"":n,l=x===void 0?!1:x,c=d===void 0?ne:d,{connectionId:b,toolCaller:S}=Q();let f;e[2]!==b||e[3]!==l||e[4]!==c||e[5]!==m?(f=R.objects(b,m,l,c),e[2]=b,e[3]=l,e[4]=c,e[5]=m,e[6]=f):f=e[6];let u;e[7]!==l||e[8]!==c||e[9]!==m||e[10]!==S?(u=async a=>{const{pageParam:r}=a;return await S("LIST_OBJECTS",{prefix:m||void 0,maxKeys:c,continuationToken:r,delimiter:l?void 0:"/"})},e[7]=l,e[8]=c,e[9]=m,e[10]=S,e[11]=u):u=e[11];let E;e[12]!==f||e[13]!==u?(E={queryKey:f,queryFn:u,initialPageParam:void 0,getNextPageParam:ge,staleTime:3e4},e[12]=f,e[13]=u,e[14]=E):E=e[14];const{data:p,isLoading:z,isFetchingNextPage:g,hasNextPage:y,fetchNextPage:h,error:w}=te(E);let v;if(l){let a;e[15]!==p?.pages?(a=p?.pages.flatMap(he).filter(pe).map(xe)??[],e[15]=p?.pages,e[16]=a):a=e[16],v=a}else{let a;if(e[17]!==p?.pages){const r=p?.pages[0]?.commonPrefixes?.map(ue)??[],j=p?.pages.flatMap(de)??[];a=[...r.sort(ce),...j],e[17]=p?.pages,e[18]=a}else a=e[18];v=a}let N;e[19]!==h||e[20]!==y||e[21]!==g?(N=()=>{y&&!g&&h()},e[19]=h,e[20]=y,e[21]=g,e[22]=N):N=e[22];const C=N,F=y??!1,P=w;let k;return e[23]!==g||e[24]!==z||e[25]!==C||e[26]!==v||e[27]!==P||e[28]!==F?(k={objects:v,isLoading:z,isFetchingMore:g,hasMore:F,loadMore:C,error:P},e[23]=g,e[24]=z,e[25]=C,e[26]=v,e[27]=P,e[28]=F,e[29]=k):k=e[29],k}function ce(s,e){return s.key.localeCompare(e.key)}function de(s){return(s.objects??[]).filter(fe).map(me)}function me(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function fe(s){return!s.key.endsWith("/")}function ue(s){return{key:s,size:0,lastModified:"",etag:"",isFolder:!0}}function xe(s){return{key:s.key,size:s.size,lastModified:s.lastModified,etag:s.etag,isFolder:!1}}function pe(s){return!s.key.endsWith("/")}function he(s){return s.objects??[]}function ge(s){return s.nextContinuationToken}function I(s){const e=s.split("/").filter(Boolean);return e[e.length-1]||s}function je(s){if(s===0)return"0 B";const e=["B","KB","MB","GB","TB"],i=1024,o=Math.floor(Math.log(s)/Math.log(i));return`${parseFloat((s/Math.pow(i,o)).toFixed(1))} ${e[o]}`}function ye(s){return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function ve(s){const e=[],i=s.split("/").filter(Boolean);let o="";for(const n of i)o+=n+"/",e.push({name:n,path:o});return e}function Ie(s,e){switch(s.split(".").pop()?.toLowerCase()){case"jpg":case"jpeg":case"png":case"gif":case"webp":case"svg":return"Image01";case"mp4":case"mov":case"avi":case"webm":return"VideoRecorder";case"mp3":case"wav":case"ogg":return"Music01";case"pdf":return"File06";case"zip":case"tar":case"gz":case"rar":return"File07";case"js":case"ts":case"tsx":case"jsx":case"json":case"html":case"css":return"FileCode01";case"md":case"txt":return"File04";default:return"File02"}}const Ne=M.lazy(()=>X(()=>import("./grid-view-Co3RRJOJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])));function be(s){const e=K.c(50),{item:i,selected:o,showFullPath:n,onSelect:x,onNavigate:d,onDownload:m,onDelete:l}=s,c=n===void 0?!1:n;let b;e[0]!==i.key||e[1]!==c?(b=c?i.key:I(i.key),e[0]=i.key,e[1]=c,e[2]=b):b=e[2];const S=b;let f;e[3]!==x||e[4]!==o?(f=t.jsx(U,{checked:o,onCheckedChange:x,className:"opacity-0 group-hover:opacity-100 focus:opacity-100 data-[state=checked]:opacity-100"}),e[3]=x,e[4]=o,e[5]=f):f=e[5];let u;e[6]!==i.isFolder||e[7]!==i.key||e[8]!==d?(u=()=>i.isFolder?d(i.key):void 0,e[6]=i.isFolder,e[7]=i.key,e[8]=d,e[9]=u):u=e[9];const E=i.isFolder&&"cursor-pointer hover:text-primary";let p;e[10]!==E?(p=J("flex items-center gap-2 flex-1 min-w-0 text-left",E),e[10]=E,e[11]=p):p=e[11];let z;e[12]!==i.isFolder?(z=i.isFolder?t.jsx(ee,{size:18,className:"text-amber-500 shrink-0"}):t.jsx(re,{size:18,className:"text-muted-foreground shrink-0"}),e[12]=i.isFolder,e[13]=z):z=e[13];let g;e[14]!==S?(g=t.jsx("span",{className:"truncate",children:S}),e[14]=S,e[15]=g):g=e[15];let y;e[16]!==u||e[17]!==p||e[18]!==z||e[19]!==g?(y=t.jsxs("button",{type:"button",onClick:u,className:p,children:[z,g]}),e[16]=u,e[17]=p,e[18]=z,e[19]=g,e[20]=y):y=e[20];let h;e[21]!==i.isFolder||e[22]!==i.size?(h=i.isFolder?"-":je(i.size),e[21]=i.isFolder,e[22]=i.size,e[23]=h):h=e[23];let w;e[24]!==h?(w=t.jsx("span",{className:"text-sm text-muted-foreground w-20 text-right shrink-0",children:h}),e[24]=h,e[25]=w):w=e[25];let v;e[26]!==i.isFolder||e[27]!==i.lastModified?(v=i.isFolder?"-":ye(i.lastModified),e[26]=i.isFolder,e[27]=i.lastModified,e[28]=v):v=e[28];let N;e[29]!==v?(N=t.jsx("span",{className:"text-sm text-muted-foreground w-28 text-right shrink-0",children:v}),e[29]=v,e[30]=N):N=e[30];let C;e[31]!==i.isFolder||e[32]!==i.key||e[33]!==m?(C=!i.isFolder&&t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0",onClick:()=>m(i.key),children:t.jsx(ie,{size:14})}),e[31]=i.isFolder,e[32]=i.key,e[33]=m,e[34]=C):C=e[34];let F;e[35]!==i.key||e[36]!==l?(F=()=>l(i.key),e[35]=i.key,e[36]=l,e[37]=F):F=e[37];let P;e[38]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(W,{size:14}),e[38]=P):P=e[38];let k;e[39]!==F?(k=t.jsx(_,{variant:"ghost",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F,children:P}),e[39]=F,e[40]=k):k=e[40];let a;e[41]!==C||e[42]!==k?(a=t.jsxs("div",{className:"flex items-center gap-1 w-16 justify-end shrink-0 opacity-0 group-hover:opacity-100",children:[C,k]}),e[41]=C,e[42]=k,e[43]=a):a=e[43];let r;return e[44]!==w||e[45]!==N||e[46]!==a||e[47]!==f||e[48]!==y?(r=t.jsxs("div",{className:"group flex items-center gap-3 px-4 py-2 hover:bg-muted/50 border-b border-border last:border-b-0",children:[f,y,w,N,a]}),e[44]=w,e[45]=N,e[46]=a,e[47]=f,e[48]=y,e[49]=r):r=e[49],r}function H(s){const e=K.c(8),{prefix:i,onNavigate:o}=s;let n;if(e[0]!==o||e[1]!==i){const x=ve(i);let d;e[3]!==o?(d=()=>o(""),e[3]=o,e[4]=d):d=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(oe,{size:16}),e[5]=m):m=e[5];let l;e[6]!==d?(l=t.jsx("button",{type:"button",onClick:d,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground",children:m}),e[6]=d,e[7]=l):l=e[7],n=t.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[l,x.map((c,b)=>t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(ae,{size:14,className:"text-muted-foreground"}),t.jsx("button",{type:"button",onClick:()=>o(c.path),className:J("hover:text-primary",b===x.length-1?"font-medium text-foreground":"text-muted-foreground"),children:c.name})]},c.path))]}),e[0]=o,e[1]=i,e[2]=n}else n=e[2];return n}function ke(){const{path:s="",flat:e=!1,view:i="table"}=A.useSearch({from:"/"}),o=A.useNavigate(),[n,x]=M.useState(new Set),d=a=>{x(new Set),o({to:"/",search:{path:a||void 0,flat:e,view:i}})},m=a=>{x(new Set),o({to:"/",search:{path:a?void 0:s||void 0,flat:a,view:i}})},l=a=>{x(new Set),o({to:"/",search:{path:s||void 0,flat:e,view:a}})},c=M.useRef(null),b=Y(),{connectionId:S,toolCaller:f}=Q(),{objects:u,isLoading:E,isFetchingMore:p,hasMore:z,loadMore:g,error:y}=le({prefix:s,flat:e}),h=q({mutationFn:async a=>{const r=s+a.name,{url:j}=await f("PUT_PRESIGNED_URL",{key:r,contentType:a.type||"application/octet-stream"}),T=await fetch(j,{method:"PUT",body:a,headers:{"Content-Type":a.type||"application/octet-stream"}});if(!T.ok)throw new Error(`Upload failed: ${T.statusText}`);return r},onSuccess:a=>{D.success(`Uploaded ${I(a)}`),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.error(`Upload failed: ${a.message}`)}}),w=q({mutationFn:async a=>a.length===1&&a[0]?f("DELETE_OBJECT",{key:a[0]}):f("DELETE_OBJECTS",{keys:a}),onSuccess:()=>{D.success("Deleted successfully"),x(new Set),b.invalidateQueries({queryKey:R.objects(S,s)})},onError:a=>{D.error(`Delete failed: ${a.message}`)}}),v=async a=>{try{const{url:r}=await f("GET_PRESIGNED_URL",{key:a}),j=await fetch(r);if(!j.ok)throw new Error(`Failed to fetch file: ${j.statusText}`);const T=await j.blob(),O=URL.createObjectURL(T),B=document.createElement("a");B.href=O,B.download=I(a),document.body.appendChild(B),B.click(),document.body.removeChild(B),URL.revokeObjectURL(O)}catch(r){D.error(`Download failed: ${r instanceof Error?r.message:"Unknown error"}`)}},N=a=>{const r=a.target.files;if(r){for(const j of Array.from(r))h.mutate(j);a.target.value=""}},C=(a,r)=>{const j=new Set(n);r?j.add(a):j.delete(a),x(j)},F=a=>{x(a?new Set(u.map(r=>r.key)):new Set)},P=()=>{n.size!==0&&w.mutate(Array.from(n))},k=a=>{if(!z||p)return;const r=a.currentTarget;r.scrollHeight-r.scrollTop-r.clientHeight<200&&g()};return y?t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(se,{size:48,className:"text-destructive mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),t.jsx("p",{className:"text-muted-foreground text-center",children:y.message})]}):i==="grid"?t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]}),t.jsx(M.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(L,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Ne,{prefix:s,flat:e,onNavigate:d})})]}):t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-background",children:[e?t.jsx("span",{className:"text-sm text-muted-foreground",children:"All files (flat)"}):t.jsx(H,{prefix:s,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[t.jsx(U,{checked:!e,onCheckedChange:a=>m(!a)}),t.jsx("span",{className:"text-muted-foreground",children:"Show as directories"})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(_,{variant:i==="grid"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("grid"),children:t.jsx(G,{size:16})}),t.jsx(_,{variant:i==="table"?"secondary":"ghost",size:"sm",className:"size-8 p-0",onClick:()=>l("table"),children:t.jsx(V,{size:16})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[n.size>0&&t.jsxs(_,{variant:"outline",size:"sm",className:"text-destructive",onClick:P,disabled:w.isPending,children:[t.jsx(W,{size:14,className:"mr-1"}),"Delete (",n.size,")"]}),t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:N}),t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),disabled:h.isPending,children:[h.isPending?t.jsx(L,{size:14,className:"mr-1 animate-spin"}):t.jsx($,{size:14,className:"mr-1"}),"Upload"]})]})]})]}),t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-border bg-muted/30 text-sm font-medium text-muted-foreground",children:[t.jsx(U,{checked:n.size>0&&n.size===u.length,onCheckedChange:F}),t.jsx("span",{className:"flex-1",children:"Name"}),t.jsx("span",{className:"w-20 text-right",children:"Size"}),t.jsx("span",{className:"w-28 text-right",children:"Modified"}),t.jsx("span",{className:"w-16"})]}),t.jsx("div",{className:"flex-1 overflow-y-auto",onScroll:k,children:E?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[t.jsx(L,{size:32,className:"animate-spin text-muted-foreground mb-4"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):u.length===0?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[t.jsx(Z,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),t.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),t.jsxs(_,{variant:"outline",onClick:()=>c.current?.click(),children:[t.jsx($,{size:14,className:"mr-1"}),"Upload files"]})]}):t.jsxs(t.Fragment,{children:[u.map(a=>t.jsx(be,{item:a,selected:n.has(a.key),showFullPath:e,onSelect:r=>C(a.key,r),onNavigate:d,onDownload:v,onDelete:r=>w.mutate([r])},a.key)),p&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(L,{size:20,className:"animate-spin text-muted-foreground"})})]})})]})}const Ke=Object.freeze(Object.defineProperty({__proto__:null,default:ke},Symbol.toStringTag,{value:"Module"}));export{R as K,Ie as a,Ke as b,je as f,I as g,Z as s,le as u};
@@ -1 +1 @@
1
- import{F as C,c as f,j as c,q as j,r as d,v,w as b,x as h}from"./index-Chdo1wOf.js";import{L as N}from"./label-Cz00Hk_C.js";import{c as p}from"./button-BlFVi9O-.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function L(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function P(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function y(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function R(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function q(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,L as b,P as c,y as d,R as e,q as f};
1
+ import{F as C,c as f,j as c,q as j,r as d,v,w as b,x as h}from"./index-D9HmjKFM.js";import{L as N}from"./label-BMznY53d.js";import{c as p}from"./button-BCe1bdkY.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=b();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function L(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function P(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function y(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(v,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function R(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function q(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,L as b,P as c,y as d,R as e,q as f};