decocms 4.597.0 → 4.598.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/dist/client/assets/{AlertCircle-BLw7QvfG.js → AlertCircle-jxvwS2PA.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Cg0oUTGM.js → AreaChart-zoolaKB0.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DH7F9HYx.js → ArrowLeft-Dlf39oKA.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-DZeVAIN7.js → ArrowRight-DCL3gp96.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-C_Mw0uky.js → ArrowUp-BbUoh0-h.js} +1 -1
  6. package/dist/client/assets/{BookOpen01-9fv3inuR.js → BookOpen01-C85UtDum.js} +1 -1
  7. package/dist/client/assets/{CartesianChart-B1PjlPEb.js → CartesianChart-Bl1HZv9F.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CcMGdgiC.js → CategoricalChart-jjkJNbxp.js} +1 -1
  9. package/dist/client/assets/{CheckCircle--1SXoxG_.js → CheckCircle-KztuMvd5.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-DwO0ALfW.js → ChevronDown-c_BdXEOA.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-Bj17dUxw.js → ChevronSelectorVertical-DmpvIgAy.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-BaiO1bgX.js → ChevronUp-BSWVeXQq.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-D6jLDMwS.js → CreditCard01-C4dCRCdu.js} +1 -1
  14. package/dist/client/assets/{Eye-DvcGz393.js → Eye-BSRrcDT9.js} +1 -1
  15. package/dist/client/assets/{File02-Bes4ATvL.js → File02-KoBPCXEf.js} +1 -1
  16. package/dist/client/assets/{Fingerprint04-BpB7HSc7.js → Fingerprint04-B2N20uu4.js} +1 -1
  17. package/dist/client/assets/{Globe04-BBsqVmHb.js → Globe04-UMTQ82HG.js} +1 -1
  18. package/dist/client/assets/{Image01-D2QOi7x6.js → Image01-BGM1ArTz.js} +1 -1
  19. package/dist/client/assets/{Key01-CDcaZkCg.js → Key01-BMkzySkS.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-19qu82-A.js → LayoutLeft-DrOR8tOg.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-Z9hP4zTf.js → LinkBroken01-hoBFLv94.js} +1 -1
  22. package/dist/client/assets/{MessageCircle01-DjShhQqZ.js → MessageCircle01-CDpj4jpt.js} +1 -1
  23. package/dist/client/assets/{Minus-ChoEICrx.js → Minus-DdEPrbsD.js} +1 -1
  24. package/dist/client/assets/{Monitor01-DtssQiym.js → Monitor01-B4iHbF93.js} +1 -1
  25. package/dist/client/assets/{Play-DatgPxza.js → Play-Clz2e0s4.js} +1 -1
  26. package/dist/client/assets/{Plus-GSWEwEm-.js → Plus-CO40HUhB.js} +1 -1
  27. package/dist/client/assets/{ReferenceLine-Cl-8dOcW.js → ReferenceLine-CeSeSzH6.js} +1 -1
  28. package/dist/client/assets/{SearchMd-DhrJsmFj.js → SearchMd-FI2fcykP.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-DQR5ci-Q.js → ShoppingBag01-BBDr_WSy.js} +1 -1
  30. package/dist/client/assets/{Sun-Dpzqhodu.js → Sun-D531tFmZ.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-NAHL2C3Y.js → SwitchHorizontal01-B8iZqdiB.js} +1 -1
  32. package/dist/client/assets/{Tool01-DJqLAFcI.js → Tool01-CldemTEe.js} +1 -1
  33. package/dist/client/assets/{Tooltip-fSWtSvYM.js → Tooltip-B1dYEjVO.js} +1 -1
  34. package/dist/client/assets/{Trash01-Br_8Dd8k.js → Trash01-W_zwe5xo.js} +1 -1
  35. package/dist/client/assets/{Upload01-B1gnueEL.js → Upload01-DDGkOE5t.js} +1 -1
  36. package/dist/client/assets/{UserCheck01-CpLKejEQ.js → UserCheck01-VgBUlrC3.js} +1 -1
  37. package/dist/client/assets/{UserSquare-D1HQ9ju8.js → UserSquare-YQkID8bv.js} +1 -1
  38. package/dist/client/assets/{Users01-qnd_BT_N.js → Users01-CJ_YMgJe.js} +1 -1
  39. package/dist/client/assets/{XClose-BbVr5nc7.js → XClose-Dv4YALPV.js} +1 -1
  40. package/dist/client/assets/{Zap-B1JA6VL5.js → Zap-DFubAl8b.js} +1 -1
  41. package/dist/client/assets/{access-gate-m6QmHtAD.js → access-gate-C-gJXueM.js} +1 -1
  42. package/dist/client/assets/{add-connection-dialog-BIOFD97r.js → add-connection-dialog-DyPd4ss_.js} +1 -1
  43. package/dist/client/assets/agent-app-BxXBXF3L.js +1 -0
  44. package/dist/client/assets/agent-assets-CFkP_Dfu.js +1 -0
  45. package/dist/client/assets/{agent-automation-to9UMVoQ.js → agent-automation-BaYqgCX1.js} +2 -2
  46. package/dist/client/assets/agent-automations-DBsSsUGW.js +1 -0
  47. package/dist/client/assets/agent-blog-lx6Ts7x1.js +2 -0
  48. package/dist/client/assets/agent-blog-post-BeOLBeeI.js +2 -0
  49. package/dist/client/assets/agent-calendar-BnmK4XQ1.js +1 -0
  50. package/dist/client/assets/{agent-capabilities-B8dQ_ZB8.js → agent-capabilities-CTj-iH2e.js} +1 -1
  51. package/dist/client/assets/agent-connect-sources-CH4TSb8y.js +1 -0
  52. package/dist/client/assets/agent-deck-DCB6fHd3.js +1 -0
  53. package/dist/client/assets/agent-e2e-BTYjDJlF.js +1 -0
  54. package/dist/client/assets/agent-experiments-Cw9pv6Dn.js +1 -0
  55. package/dist/client/assets/agent-file-CTx06rQr.js +1 -0
  56. package/dist/client/assets/agent-hosting-B5D0b6SX.js +1 -0
  57. package/dist/client/assets/agent-icon-CF35JltL.js +1 -0
  58. package/dist/client/assets/agent-library-BwDYP2WG.js +1 -0
  59. package/dist/client/assets/agent-library-file-C81bvh62.js +1 -0
  60. package/dist/client/assets/agent-overview-K-iHxR1q.js +1 -0
  61. package/dist/client/assets/{agent-releases-DxZH4Aop.js → agent-releases-BwmxxOKG.js} +1 -1
  62. package/dist/client/assets/agent-settings-DSkSbN3M.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-BVDN7iAe.js → agent-site-editor-AlBg5D2V.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-DKlbc-rv.js +2 -0
  65. package/dist/client/assets/agent-site-editor-content-D8oVt80T.js +1 -0
  66. package/dist/client/assets/agent-site-editor-preview-C7REepxK.js +1 -0
  67. package/dist/client/assets/agent-view-B_4cQTkH.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-DgSIx4Rz.js → agent-view-guard-ZsSVHdZf.js} +1 -1
  69. package/dist/client/assets/{ai-providers-BLNPddjm.js → ai-providers-hSqz3WwB.js} +1 -1
  70. package/dist/client/assets/{alert-B3inZFUT.js → alert-DvKjRxar.js} +1 -1
  71. package/dist/client/assets/{analytics-sections-CTzZQv_A.js → analytics-sections-VB2fGveD.js} +1 -1
  72. package/dist/client/assets/api-keys-1OldN0tT.js +1 -0
  73. package/dist/client/assets/{api-keys-D5yeJ96D.js → api-keys-5hVWR6f4.js} +1 -1
  74. package/dist/client/assets/app-editor-CKOA7wEE.js +1 -0
  75. package/dist/client/assets/{asset-utils-FQrgs53r.js → asset-utils-DRModSGS.js} +1 -1
  76. package/dist/client/assets/{auth-DlYbrS5R.js → auth-Ry9WrZV8.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-DovAKkgg.js → auth-catchall-DJ81nN52.js} +1 -1
  78. package/dist/client/assets/{auth-entry-BeARMnxr.js → auth-entry-N3iwaDe6.js} +1 -1
  79. package/dist/client/assets/{auth-split-layout-CnJuCNmk.js → auth-split-layout-DRc17L6c.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-Da9zgsaC.js → authenticate-and-persist-oauth-ZYDIddXa.js} +1 -1
  81. package/dist/client/assets/{automation-list-row-Cfemy10y.js → automation-list-row-DW-hLflG.js} +1 -1
  82. package/dist/client/assets/{automation-runs-DhXlimIG.js → automation-runs-Cn3-xcc-.js} +1 -1
  83. package/dist/client/assets/automations-CVx7XBRT.js +1 -0
  84. package/dist/client/assets/{badge-CaU7DsCB.js → badge-CWKaTosK.js} +1 -1
  85. package/dist/client/assets/{block-document-D8KopzHb.js → block-document-DnIO3ig2.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-Rebn6SsT.js → blocks-preview-workspace-context-05h1qBm4.js} +1 -1
  87. package/dist/client/assets/{blocks-tab-states-CrihrdT0.js → blocks-tab-states-DDvkpFWf.js} +1 -1
  88. package/dist/client/assets/{blog-preview-url-DM-lGGhF.js → blog-preview-url-BeobaMnK.js} +1 -1
  89. package/dist/client/assets/{blog-schema-0H53CE3k.js → blog-schema-BMIjJkjY.js} +1 -1
  90. package/dist/client/assets/{blog-source-gate-B_GOyP5p.js → blog-source-gate-CTlfDEgd.js} +1 -1
  91. package/dist/client/assets/{blog-view-gate-JzJtOYCL.js → blog-view-gate-BUKolpTm.js} +1 -1
  92. package/dist/client/assets/{buckets-CVXQhalH.js → buckets-Cojjk4Rx.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-DgQdPFxI.js → build-improve-prompt-doc-cVHB56V7.js} +1 -1
  94. package/dist/client/assets/{calendar-DZVkXGhA.js → calendar-D3_Is4BX.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-p87qKYlk.js → capability-load-error-l7VKbDu4.js} +1 -1
  96. package/dist/client/assets/category-editor-3t0p_Aia.js +1 -0
  97. package/dist/client/assets/{category-tree-DUNY9TG8.js → category-tree-rhKblFsZ.js} +1 -1
  98. package/dist/client/assets/{chart-D6tXreNC.js → chart-D0JID1mb.js} +1 -1
  99. package/dist/client/assets/{chat-context-DsLpz7ew.js → chat-context-D5EEwp_m.js} +1 -1
  100. package/dist/client/assets/{chat-draft-ODW7kZWh.js → chat-draft-CL1clhIN.js} +1 -1
  101. package/dist/client/assets/{checkbox-Bo6uhaqm.js → checkbox-DHBAzm3e.js} +1 -1
  102. package/dist/client/assets/choose-editor-CluRV_6I.js +1 -0
  103. package/dist/client/assets/{cli-auth-success-1ibs6VjG.js → cli-auth-success-D9loznd0.js} +1 -1
  104. package/dist/client/assets/cms-settings-editor-DY7QQNQD.js +1 -0
  105. package/dist/client/assets/{cms-store-drafts-Da9bgH02.js → cms-store-drafts-BocSU3zl.js} +1 -1
  106. package/dist/client/assets/{collapsible-Cug6Pp5N.js → collapsible-JCTHx5_U.js} +1 -1
  107. package/dist/client/assets/collection-detail-l7ntNzFm.js +1 -0
  108. package/dist/client/assets/{collection-display-button-BeCmwRLy.js → collection-display-button-C6AAIEpT.js} +1 -1
  109. package/dist/client/assets/{collection-search-EKEj7NYh.js → collection-search-Cez2fKoW.js} +1 -1
  110. package/dist/client/assets/{collection-table-wrapper-QVfey_uk.js → collection-table-wrapper-DkyJJZPl.js} +1 -1
  111. package/dist/client/assets/{collection-tabs-THb2ZDUR.js → collection-tabs-D0yQpVJM.js} +1 -1
  112. package/dist/client/assets/{combobox-CkvX9Of3.js → combobox-Dm0ZumLc.js} +1 -1
  113. package/dist/client/assets/{command-BA_BVypg.js → command-CALEDfdi.js} +1 -1
  114. package/dist/client/assets/{companion-mcps-section-mGMTO-21.js → companion-mcps-section-DyyItakB.js} +1 -1
  115. package/dist/client/assets/{config-DeP83Mjq.js → config-DpuCRGPS.js} +1 -1
  116. package/dist/client/assets/{connect-C-ernj3S.js → connect-DhDiKdM5.js} +3 -3
  117. package/dist/client/assets/{connect-key-B_1YtIEI.js → connect-key-BnZjV7h5.js} +1 -1
  118. package/dist/client/assets/{connect-layout-DhcQffyl.js → connect-layout-DPjmEUCP.js} +1 -1
  119. package/dist/client/assets/{connect-source-dialog-DXcG_Psx.js → connect-source-dialog-CPF3zqCW.js} +1 -1
  120. package/dist/client/assets/{connection-DUUZ34Ff.js → connection-ByE21sI5.js} +1 -1
  121. package/dist/client/assets/{connection-card-BbAx38kp.js → connection-card-v-6X4qws.js} +1 -1
  122. package/dist/client/assets/connection-detail-DOB5tzOq.js +1 -0
  123. package/dist/client/assets/{connection-form-helpers-DEnW0ORZ.js → connection-form-helpers-BZq0bQw7.js} +1 -1
  124. package/dist/client/assets/{connection-slug-Wiu7W5Ro.js → connection-slug-Cu8poN2f.js} +1 -1
  125. package/dist/client/assets/connections-BshSiFUh.js +1 -0
  126. package/dist/client/assets/content-changes-Yn1NpHw-.js +1 -0
  127. package/dist/client/assets/{content-tab-CJmgvKjP.js → content-tab-BOS9R4w0.js} +3 -3
  128. package/dist/client/assets/context-CSNMIE52.js +1 -0
  129. package/dist/client/assets/{context-menu-BvoelKnM.js → context-menu-DjuEbDwW.js} +1 -1
  130. package/dist/client/assets/{context-shell-BHDXVCRL.js → context-shell-BtuEIN_r.js} +4 -4
  131. package/dist/client/assets/{create-organization-dialog-dpA6uSHX.js → create-organization-dialog-BFbwswlq.js} +1 -1
  132. package/dist/client/assets/{daily-pulse-83GnvMF_.js → daily-pulse-Bg2uZfJ3.js} +1 -1
  133. package/dist/client/assets/{delete-copy-C8ERxzK8.js → delete-copy-CyOQI_UN.js} +1 -1
  134. package/dist/client/assets/{device-hint-5lkWUASQ.js → device-hint-1SWvGp3v.js} +1 -1
  135. package/dist/client/assets/{discover-C9WBot8k.js → discover-DRvYEfga.js} +1 -1
  136. package/dist/client/assets/{domain-settings-C7L5I-Ps.js → domain-settings-kxDrXeNT.js} +1 -1
  137. package/dist/client/assets/{drawer-Daptw1OQ.js → drawer-CLdqPUpZ.js} +1 -1
  138. package/dist/client/assets/{editor-classes-eVnt4vp_.js → editor-classes-C7cnK7Wp.js} +1 -1
  139. package/dist/client/assets/{editor-CGkWZSA7.js → editor-fCTeAQ3h.js} +1 -1
  140. package/dist/client/assets/{empty-state-Dfjwzagg.js → empty-state-BM_yXYSI.js} +1 -1
  141. package/dist/client/assets/{empty-state--1H9mx7y.js → empty-state-CHF2Jno9.js} +1 -1
  142. package/dist/client/assets/{experiments-tab-choice-BVYrDQR_.js → experiments-tab-choice-Bo36uaUs.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-Csm2LLbI.js → extract-connection-data-jy3JaUYJ.js} +1 -1
  144. package/dist/client/assets/{feature-gate-DP0JLkRq.js → feature-gate-CDxHWMHG.js} +1 -1
  145. package/dist/client/assets/{feature-paywall-CuECkoDT.js → feature-paywall-Cc43JNfz.js} +1 -1
  146. package/dist/client/assets/file-explorer-BmZFNSEt.js +2 -0
  147. package/dist/client/assets/{file-preview-J0KlNfCN.js → file-preview-DSlXa64u.js} +1 -1
  148. package/dist/client/assets/{file-share-button-1KUHqOgB.js → file-share-button-mLtJT0f8.js} +2 -2
  149. package/dist/client/assets/{file-type-icon-sxJ1fqoc.js → file-type-icon-CNUBpmBv.js} +1 -1
  150. package/dist/client/assets/{folder-icon-DfGo2fIA.js → folder-icon-Db1WLgp9.js} +1 -1
  151. package/dist/client/assets/{form-msT-Nxjd.js → form-CCzLKFB7.js} +1 -1
  152. package/dist/client/assets/{frame-navigation-COhxs0rP.js → frame-navigation-B4-_qfJ3.js} +1 -1
  153. package/dist/client/assets/{gateway-client-mrWD5tSx.js → gateway-client-Dsg5xVl5.js} +1 -1
  154. package/dist/client/assets/general-DRn37bfZ.js +1 -0
  155. package/dist/client/assets/{github-icon-DGEVXZ8I.js → github-icon-CizbgzyS.js} +1 -1
  156. package/dist/client/assets/{held-block-view-DUdsae86.js → held-block-view-CYXKzDkA.js} +1 -1
  157. package/dist/client/assets/home-BDEWRpho.js +1 -0
  158. package/dist/client/assets/{home-overview-CC9gx7Fg.js → home-overview-Cc5zUwKU.js} +1 -1
  159. package/dist/client/assets/{hosted-reconcile-DH-KyBYi.js → hosted-reconcile-BT71cbCZ.js} +1 -1
  160. package/dist/client/assets/{icon-button-am6dsn69.js → icon-button-BY-Dtplw.js} +1 -1
  161. package/dist/client/assets/{index-CDpTFqpR.js → index-BKZ2GYzY.js} +1 -1
  162. package/dist/client/assets/{index-DjWhIee5.js → index-Bf_p4D_6.js} +1 -1
  163. package/dist/client/assets/index-C3JbUkAn.js +1 -0
  164. package/dist/client/assets/{index-DgVQUrlP.js → index-C6V-s7Mj.js} +1 -1
  165. package/dist/client/assets/index-C9ybKZad.css +1 -0
  166. package/dist/client/assets/{index-B26uWbt_.js → index-D146A7MA.js} +1 -1
  167. package/dist/client/assets/{index-B2vvUsuK.js → index-D19iAD4s.js} +51 -39
  168. package/dist/client/assets/{index-DeLM7Rkt.js → index-D6VuEonE.js} +1 -1
  169. package/dist/client/assets/{index-4q-RLwEk.js → index-DAZyLaeQ.js} +1 -1
  170. package/dist/client/assets/{index-BYSU1KyF.js → index-DHiZoBJ3.js} +1 -1
  171. package/dist/client/assets/index-DP6ex8je.js +4 -0
  172. package/dist/client/assets/{index-C0WKaVxy.js → index-DS6kB3db.js} +1 -1
  173. package/dist/client/assets/{index-D0GEyG42.js → index-DWF5ASE_.js} +8 -8
  174. package/dist/client/assets/{index-CsQM0oHc.js → index-DX45d0VZ.js} +1 -1
  175. package/dist/client/assets/{index-0yoxovPZ.js → index-DeWoNfZE.js} +1 -1
  176. package/dist/client/assets/{index-D9zWR22g.js → index-DqGbUVIr.js} +2 -2
  177. package/dist/client/assets/{index-D8TuIm4d.js → index-i1TGxsLb.js} +1 -1
  178. package/dist/client/assets/{index-redirect-uY3IN3rF.js → index-redirect-1X0s58OF.js} +1 -1
  179. package/dist/client/assets/{index-C9UqnrNB.js → index-tfWzV95z.js} +1 -1
  180. package/dist/client/assets/{infiniteQueryObserver-B6MEVTvt.js → infiniteQueryObserver-B1MZYli5.js} +1 -1
  181. package/dist/client/assets/{infra-billing-4CjwqMVB.js → infra-billing-CEbGoBzj.js} +1 -1
  182. package/dist/client/assets/{input-Bzo1OCNz.js → input-DER1ofMN.js} +1 -1
  183. package/dist/client/assets/{input-DFHiqhmH.js → input-DUmEmIMD.js} +3 -3
  184. package/dist/client/assets/{integration-icon-DazsuPNm.js → integration-icon-LqaI_LSB.js} +1 -1
  185. package/dist/client/assets/{item-actions-Yc8vcOg0.js → item-actions-BQdANZXs.js} +1 -1
  186. package/dist/client/assets/{jira-icon-CsaUkukk.js → jira-icon-DNsDxAZ7.js} +1 -1
  187. package/dist/client/assets/{label-BLEP0nH0.js → label-B0UwCsXA.js} +1 -1
  188. package/dist/client/assets/{layout-c8-5uC_O.js → layout-CSIaEqJd.js} +1 -1
  189. package/dist/client/assets/{legacy-admin-welcome-dialog-DwTePCPF.js → legacy-admin-welcome-dialog-DgOZFBtI.js} +1 -1
  190. package/dist/client/assets/{legacy-agents-deep-DL8ddlj5.js → legacy-agents-deep-Cx1B7fLu.js} +1 -1
  191. package/dist/client/assets/{legacy-main-redirect-DjX7qNM7.js → legacy-main-redirect-CuOUB_B1.js} +1 -1
  192. package/dist/client/assets/library-B8otmHwX.js +1 -0
  193. package/dist/client/assets/{library-tab-DOE8AqM2.js → library-tab-BwU2UnDE.js} +1 -1
  194. package/dist/client/assets/{login--MYPwAKH.js → login-D7cd9YYg.js} +1 -1
  195. package/dist/client/assets/{markdown-COcXeIyG.js → markdown-BNFJrVwN.js} +1 -1
  196. package/dist/client/assets/{mcp-app-renderer-CDjvP8t9.js → mcp-app-renderer-ChxjPYfG.js} +1 -1
  197. package/dist/client/assets/{mcp-oauth-ciX7wK5f.js → mcp-oauth-BHqzrP9l.js} +1 -1
  198. package/dist/client/assets/{mcp-oauth-DESKCBIm.js → mcp-oauth-CIbadsEV.js} +1 -1
  199. package/dist/client/assets/{members-DKu_OhY9.js → members-CRNf5jdg.js} +1 -1
  200. package/dist/client/assets/{memory-BL_L-Q3R.js → memory-BtUUGfBH.js} +2 -2
  201. package/dist/client/assets/{mock-board--Ssgy-f6.js → mock-board-CX-WNxEi.js} +3 -3
  202. package/dist/client/assets/{monaco-editor-C0bUrX9K.js → monaco-editor-oNRDmlFg.js} +1 -1
  203. package/dist/client/assets/{monitoring-D8_3FcCV.js → monitoring-DnzPiQ3F.js} +1 -1
  204. package/dist/client/assets/{monitoring-stats-row-L0MR9OOK.js → monitoring-stats-row-eut48zN3.js} +1 -1
  205. package/dist/client/assets/{multi-select-VurXcITl.js → multi-select-CADtUZ9A.js} +1 -1
  206. package/dist/client/assets/{mustache-CSfql4oE.js → mustache-BM5hcjQo.js} +1 -1
  207. package/dist/client/assets/{named-rule-step-BfgtyNIr.js → named-rule-step-jeqaAuBi.js} +1 -1
  208. package/dist/client/assets/named-rule-view-0M7nk7ZR.js +1 -0
  209. package/dist/client/assets/{new-project-dialog-CsFe_Ifg.js → new-project-dialog-TULM28H3.js} +1 -1
  210. package/dist/client/assets/{new-project-store-D3tRl8ms.js → new-project-store-Dkp4wOSi.js} +1 -1
  211. package/dist/client/assets/{oauth-callback-hp7uk30l.js → oauth-callback-D2m0oHFc.js} +1 -1
  212. package/dist/client/assets/{oauth-callback-ai-provider-DYAZYkh4.js → oauth-callback-ai-provider-Cg2K-hUv.js} +1 -1
  213. package/dist/client/assets/{oauth-consent-Buw7iq_C.js → oauth-consent-Cey84Qly.js} +1 -1
  214. package/dist/client/assets/{onboarding-CPK6bWVC.js → onboarding-C5tGxSm3.js} +1 -1
  215. package/dist/client/assets/openai-conversation-Cin6CRLj.js +3 -0
  216. package/dist/client/assets/{optimistic-project-sidebar-views-DWktyZnu.js → optimistic-project-sidebar-views-BwI_h134.js} +1 -1
  217. package/dist/client/assets/{order-monitor-day-lcmZ_W6T.js → order-monitor-day-qB9QL9rR.js} +1 -1
  218. package/dist/client/assets/{organization-choice-5J7_8tx5.js → organization-choice-UcNwkZgV.js} +1 -1
  219. package/dist/client/assets/{orgs-CTAlA2gh.js → orgs-BNCJkrfd.js} +1 -1
  220. package/dist/client/assets/{own-accounts-section-CL-lWHC3.js → own-accounts-section-B_G3r2Ak.js} +1 -1
  221. package/dist/client/assets/{pair-IZ41S3dI.js → pair-DaLtpCvg.js} +8 -8
  222. package/dist/client/assets/{parse-sections-bc3ugIU6.js → parse-sections-BRYcF5X4.js} +3 -3
  223. package/dist/client/assets/plan-BkTiTYLU.js +1 -0
  224. package/dist/client/assets/{plan-ladder-CpzLELQm.js → plan-ladder-DZZeDiD-.js} +1 -1
  225. package/dist/client/assets/{plan-usage-card-Djn1n4Si.js → plan-usage-card-CUEZgkUc.js} +1 -1
  226. package/dist/client/assets/{popover-BN8yB-gL.js → popover-Bm-_ILu8.js} +1 -1
  227. package/dist/client/assets/post-calendar-Dx1uahJO.js +1 -0
  228. package/dist/client/assets/{post-editor-k1GseIfg.js → post-editor-DWqV-Y-J.js} +2 -2
  229. package/dist/client/assets/{preview-content-DrUsIXaL.js → preview-content-DiSiTI85.js} +1 -1
  230. package/dist/client/assets/{preview-dialog-Bl4nn6SJ.js → preview-dialog-BP-VZ8b7.js} +1 -1
  231. package/dist/client/assets/{preview-panel-CPnrD7jy.js → preview-panel-DO2qxYoE.js} +1 -1
  232. package/dist/client/assets/{preview-tab-DJCbL8xU.js → preview-tab-lvMZ2nQh.js} +3 -3
  233. package/dist/client/assets/{primitives-7GEzJciO.js → primitives-DlHl12Ki.js} +1 -1
  234. package/dist/client/assets/{product-picker-dialog-BsLtWfxx.js → product-picker-dialog-2Sh66sGp.js} +1 -1
  235. package/dist/client/assets/{profile-LVIi9kQl.js → profile-C-34uFVs.js} +1 -1
  236. package/dist/client/assets/project-app-view-B1Na7Y2f.js +1 -0
  237. package/dist/client/assets/project-apps-4x8kh2Th.js +1 -0
  238. package/dist/client/assets/{project-icon-NAtCd-2E.js → project-icon-BpBMspxb.js} +1 -1
  239. package/dist/client/assets/{project-index-BDBvdHSq.js → project-index-Dn8Lu82V.js} +1 -1
  240. package/dist/client/assets/project-reports-BKA5CwLs.js +1 -0
  241. package/dist/client/assets/project-tasks-DII3t9E-.js +1 -0
  242. package/dist/client/assets/projects-COEtC32s.js +1 -0
  243. package/dist/client/assets/{projects-empty-state-Bhe-Ul5b.js → projects-empty-state-BaKUbZwF.js} +1 -1
  244. package/dist/client/assets/{prompts-fURd1E3_.js → prompts-BEx4mqMN.js} +1 -1
  245. package/dist/client/assets/record-editor-B5MUcK8d.js +1 -0
  246. package/dist/client/assets/redirect-editor-v_D7tsUa.js +1 -0
  247. package/dist/client/assets/{reports-K6JrO8c3.js → reports-CY9b4q7t.js} +1 -1
  248. package/dist/client/assets/reports-Dc_GbY37.js +1 -0
  249. package/dist/client/assets/reports-onboarding-B78MfFt5.js +1 -0
  250. package/dist/client/assets/reports-tab-DgzPfqIC.js +2 -0
  251. package/dist/client/assets/{repositories-noe5N_6-.js → repositories-BFzOuUP8.js} +1 -1
  252. package/dist/client/assets/repositories-DfE1c4ns.js +1 -0
  253. package/dist/client/assets/{repository-binding-DC98qYdg.js → repository-binding-CP_PNLcQ.js} +1 -1
  254. package/dist/client/assets/{repository-picker-BLhEIBPT.js → repository-picker-DCip0P__.js} +1 -1
  255. package/dist/client/assets/{require-capability-r0eDYoNg.js → require-capability-uCkyxJfa.js} +1 -1
  256. package/dist/client/assets/{required-auth-layout-Dq6PcaGv.js → required-auth-layout-B7e3rkXx.js} +1 -1
  257. package/dist/client/assets/{reset-password-CeDXY3wu.js → reset-password-Bqbu7xzH.js} +1 -1
  258. package/dist/client/assets/{resizable-CDUVHUkS.js → resizable-D75nggzL.js} +1 -1
  259. package/dist/client/assets/resolve-tab-icon-BqdaZDC9.js +1 -0
  260. package/dist/client/assets/review-settings-BU42FIg-.js +1 -0
  261. package/dist/client/assets/{role-color-j5ZAxcKG.js → role-color-CUZgXceG.js} +1 -1
  262. package/dist/client/assets/roles-BhkeI1Tk.js +1 -0
  263. package/dist/client/assets/route-BdFxUFy-.js +1 -0
  264. package/dist/client/assets/route-C_hx8Usp.js +1 -0
  265. package/dist/client/assets/route-CvQ9iNjI.js +1 -0
  266. package/dist/client/assets/{route-page-header-B-0s5BiJ.js → route-page-header-B8C1ZRVD.js} +1 -1
  267. package/dist/client/assets/{sandbox-git-api-CJ3-CkeV.js → sandbox-git-api-B73fIbEU.js} +1 -1
  268. package/dist/client/assets/{sandbox-lifecycle-context-DJVkUHOC.js → sandbox-lifecycle-context-3zZM02yQ.js} +1 -1
  269. package/dist/client/assets/{save-status-5VC4rIi2.js → save-status-5VKYddaB.js} +1 -1
  270. package/dist/client/assets/{schema-B5pk7azZ.js → schema-Bbiw44C-.js} +1 -1
  271. package/dist/client/assets/schema-BmYiAOGn.js +1 -0
  272. package/dist/client/assets/{scroll-area-CXINzzvW.js → scroll-area-ZYmkOMr8.js} +1 -1
  273. package/dist/client/assets/{search-input-Dmx6N7Z7.js → search-input-Dfgi3Bm0.js} +1 -1
  274. package/dist/client/assets/{search-toggle-uhoeAt8V.js → search-toggle-Bt9uO9z1.js} +1 -1
  275. package/dist/client/assets/{secret-picker-CdBDBcEP.js → secret-picker-35tY3ayS.js} +1 -1
  276. package/dist/client/assets/{secrets-DdH9QnxK.js → secrets-CTezjK3j.js} +1 -1
  277. package/dist/client/assets/{section-array-field-RxYDyVUT.js → section-array-field-D3J7UHmj.js} +1 -1
  278. package/dist/client/assets/{sections-CvVT6jo9.js → sections-CsKHN4VK.js} +1 -1
  279. package/dist/client/assets/sections-editor-bf1W6507.js +1 -0
  280. package/dist/client/assets/{select-PhQ1dHUc.js → select-CKa1YoCw.js} +1 -1
  281. package/dist/client/assets/{select-model-DsYbAwnw.js → select-model-BzdKMpAz.js} +1 -1
  282. package/dist/client/assets/{seo-editor-DTf59Uvx.js → seo-editor-RhNyCqwO.js} +1 -1
  283. package/dist/client/assets/{separator-BspBySaE.js → separator-CmEbryS6.js} +1 -1
  284. package/dist/client/assets/{session-runtime-CWUXrNEM.js → session-runtime-DZiu3uM2.js} +1 -1
  285. package/dist/client/assets/settings-tab-DgRCBiDm.js +1 -0
  286. package/dist/client/assets/{sheet-DsBIaG5c.js → sheet-BDbcvRnu.js} +1 -1
  287. package/dist/client/assets/shell-layout-Lgn8VLZ9.js +1 -0
  288. package/dist/client/assets/{site-draft-actions-bEXIW2Ci.js → site-draft-actions-LxERm8rz.js} +5 -5
  289. package/dist/client/assets/{site-draft-view-DL1xS2bS.js → site-draft-view-Dzyq1aKZ.js} +1 -1
  290. package/dist/client/assets/site-editor-DVvyNYht.js +1 -0
  291. package/dist/client/assets/site-editor-toast-QCYxwt4C.js +1 -0
  292. package/dist/client/assets/skills-D2pt05Zp.js +1 -0
  293. package/dist/client/assets/{slider-DiJZup4s.js → slider-B257IOM8.js} +1 -1
  294. package/dist/client/assets/{sortable.esm-AH9TOEe6.js → sortable.esm-6QfVcWZZ.js} +1 -1
  295. package/dist/client/assets/{sso-DJUFzVd6.js → sso-QEHyu29Q.js} +1 -1
  296. package/dist/client/assets/{suggestion-BKU1aw0O.js → suggestion-DXAVxjkm.js} +1 -1
  297. package/dist/client/assets/{super-agent-icon-KeQzZLhO.js → super-agent-icon-Be9GDxp7.js} +1 -1
  298. package/dist/client/assets/{switch-CavZ0Td_.js → switch-DgvZdTyU.js} +1 -1
  299. package/dist/client/assets/{synced-repos-CpobCKuE.js → synced-repos-CsgMx0Ny.js} +1 -1
  300. package/dist/client/assets/{tab-icon-glyph-BQpSs905.js → tab-icon-glyph-UH4S7mUc.js} +1 -1
  301. package/dist/client/assets/{table-_0cphCuz.js → table-ChqekQnS.js} +1 -1
  302. package/dist/client/assets/{tabs-CB9wyI2L.js → tabs-DV8AQUwT.js} +1 -1
  303. package/dist/client/assets/{task-board-DAlkVSdn.js → task-board-DQX_apb8.js} +1 -1
  304. package/dist/client/assets/{task-key-D_de_YB4.js → task-key-rSXWMPFP.js} +1 -1
  305. package/dist/client/assets/{task-route-gaZIOP1Q.js → task-route-KYQNiD-8.js} +1 -1
  306. package/dist/client/assets/{task-status-Dm8lN6h7.js → task-status-CadzUBkc.js} +1 -1
  307. package/dist/client/assets/{taskboard-analytics-BRO72FRF.js → taskboard-analytics-B1Tn3vRG.js} +1 -1
  308. package/dist/client/assets/tasks-BBJAHV_M.js +1 -0
  309. package/dist/client/assets/{tasks-LD7DAdjg.js → tasks-D0Ct-0ZT.js} +1 -1
  310. package/dist/client/assets/{textarea-C5yT2rai.js → textarea-DCWhTUrR.js} +1 -1
  311. package/dist/client/assets/thread-analytics-BXz4d40L.js +1 -0
  312. package/dist/client/assets/{thread-button-jA6lXOHW.js → thread-button-CkP3AL0P.js} +1 -1
  313. package/dist/client/assets/{thread-intent-DC5UuPI5.js → thread-intent-BsMPgCKi.js} +1 -1
  314. package/dist/client/assets/{thread-route-NC2TJMv2.js → thread-route-El3oNOnD.js} +1 -1
  315. package/dist/client/assets/thread-route-wZnmBpi8.js +1 -0
  316. package/dist/client/assets/{thread-sheet-body-BATHVA9a.js → thread-sheet-body-By8H92hw.js} +1 -1
  317. package/dist/client/assets/{time-range-picker-BdF4LahQ.js → time-range-picker-svLFcXAw.js} +1 -1
  318. package/dist/client/assets/{toggle-group-B2L0Fh-A.js → toggle-group-fJYx0W9h.js} +1 -1
  319. package/dist/client/assets/{tool-set-selector-sYj6JiLu.js → tool-set-selector-7nHtwp8O.js} +1 -1
  320. package/dist/client/assets/{toolbar-icon-button-BleYd0k2.js → toolbar-icon-button-DIm3azB_.js} +1 -1
  321. package/dist/client/assets/{tooltip-C0XDZQqg.js → tooltip-B3-v7v0W.js} +1 -1
  322. package/dist/client/assets/{tooltipContext-B5tdv-rH.js → tooltipContext-oNzr-fXK.js} +1 -1
  323. package/dist/client/assets/{track-DkQvKF_r.js → track-C9EcyFLh.js} +1 -1
  324. package/dist/client/assets/{types-BmRTIjW9.js → types-6-Ps6AGR.js} +1 -1
  325. package/dist/client/assets/{url-slug-HTy1TIRr.js → url-slug-3v4BmBw0.js} +1 -1
  326. package/dist/client/assets/{usage-stats-BbuSELy1.js → usage-stats-njGMuDih.js} +1 -1
  327. package/dist/client/assets/{use-ai-providers-CGeOv9zD.js → use-ai-providers-DFv4_P6Z.js} +1 -1
  328. package/dist/client/assets/{use-api-keys-BBDeQmvb.js → use-api-keys-PZMcZPlt.js} +1 -1
  329. package/dist/client/assets/use-apply-named-rule-B8KW11JW.js +1 -0
  330. package/dist/client/assets/use-ask-in-chat-Dxj79lpz.js +1 -0
  331. package/dist/client/assets/{use-automations-UppgD9x4.js → use-automations-DD1lNWAq.js} +1 -1
  332. package/dist/client/assets/{use-autosave-DP-Xo78G.js → use-autosave-DBAueSyZ.js} +1 -1
  333. package/dist/client/assets/use-blocks-v8-project-DjyJGATt.js +1 -0
  334. package/dist/client/assets/use-blog-view-B9cmKJN3.js +1 -0
  335. package/dist/client/assets/{use-chat-layout-state-CYDJQho2.js → use-chat-layout-state-CAIrZGnL.js} +1 -1
  336. package/dist/client/assets/{use-cms-publish-actions-sZFllHA3.js → use-cms-publish-actions-Dq9NhEOB.js} +1 -1
  337. package/dist/client/assets/{use-connect-companion-DM6nloeD.js → use-connect-companion-CLP35iDK.js} +1 -1
  338. package/dist/client/assets/{use-connection-BlQSFvXZ.js → use-connection-CYsyXyy7.js} +1 -1
  339. package/dist/client/assets/{use-content-sync-CmcdSf-W.js → use-content-sync-DWcjd7N0.js} +1 -1
  340. package/dist/client/assets/{use-copy-_EjHpFlu.js → use-copy-BStTcLWM.js} +1 -1
  341. package/dist/client/assets/{use-current-view-DJmYWR9r.js → use-current-view-Cn9H-KAc.js} +1 -1
  342. package/dist/client/assets/{use-date-fns-locale-8kgkXGzy.js → use-date-fns-locale-CSKjWaLe.js} +1 -1
  343. package/dist/client/assets/{use-debounced-autosave-43RSVqCJ.js → use-debounced-autosave-BudnGn2r.js} +1 -1
  344. package/dist/client/assets/{use-debounced-value-CtUf9JOP.js → use-debounced-value-Dcq0NTAp.js} +1 -1
  345. package/dist/client/assets/{use-deco-credits-CrAjq5eE.js → use-deco-credits-D9t5Q-Ms.js} +1 -1
  346. package/dist/client/assets/{use-decopilot-events-CwyVZVbh.js → use-decopilot-events-DsEAOvda.js} +1 -1
  347. package/dist/client/assets/{use-delete-block-CziQYeFw.js → use-delete-block-BZCQAK3P.js} +1 -1
  348. package/dist/client/assets/{use-delete-connection-5KBJh_4H.js → use-delete-connection-CBkpbZja.js} +1 -1
  349. package/dist/client/assets/{use-deployment-admin-vod10AYl.js → use-deployment-admin-HoxFQgZ9.js} +1 -1
  350. package/dist/client/assets/{use-entitlements-D-BsJsBn.js → use-entitlements-BzKQLk_u.js} +1 -1
  351. package/dist/client/assets/{use-fast-preview-draft-url-CTybhvJ7.js → use-fast-preview-draft-url-tiq51pbg.js} +1 -1
  352. package/dist/client/assets/{use-file-configs-zM1_UDsD.js → use-file-configs-Caaj88sr.js} +1 -1
  353. package/dist/client/assets/{use-id-selection-B-V9WQKU.js → use-id-selection-D0jc_Dy0.js} +1 -1
  354. package/dist/client/assets/{use-in-settings-CKmb_d-Z.js → use-in-settings-D-n4dJvM.js} +1 -1
  355. package/dist/client/assets/{use-inbox-feed-BIRoBmxG.js → use-inbox-feed-7Rm2Mjtr.js} +1 -1
  356. package/dist/client/assets/{use-infinite-scroll-D0fDDIyn.js → use-infinite-scroll-f5g_Vpk-.js} +1 -1
  357. package/dist/client/assets/{use-join-requests-C7XAF7yu.js → use-join-requests-Cu6LZvjE.js} +1 -1
  358. package/dist/client/assets/{use-main-panel-tabs-CFBnVDX4.js → use-main-panel-tabs-Ch-_m9wA.js} +1 -1
  359. package/dist/client/assets/{use-mcp-auth-status-Cvpzf8bf.js → use-mcp-auth-status-CrggBiFo.js} +1 -1
  360. package/dist/client/assets/{use-mcp-client-C25DU1dz.js → use-mcp-client-CCT6q-zj.js} +1 -1
  361. package/dist/client/assets/{use-mcp-prompts-DFURxOZn.js → use-mcp-prompts-Bxssn6xT.js} +1 -1
  362. package/dist/client/assets/{use-mcp-tools-DU4EJz2s.js → use-mcp-tools-CdypNtPV.js} +1 -1
  363. package/dist/client/assets/{use-mobile-DFpIEPum.js → use-mobile-Dyvncftm.js} +1 -1
  364. package/dist/client/assets/{use-move-blocks-HLsANXZk.js → use-move-blocks-pw3TQRyc.js} +1 -1
  365. package/dist/client/assets/{use-navigate-to-agent-BGA3nmOF.js → use-navigate-to-agent-0M4hsJnf.js} +1 -1
  366. package/dist/client/assets/{use-never-published-BnWhN5r2.js → use-never-published-BsVhVpS1.js} +1 -1
  367. package/dist/client/assets/{use-org-fs-BrF60Lzy.js → use-org-fs-CyfRrBTl.js} +1 -1
  368. package/dist/client/assets/{use-org-notice-BmwTtllY.js → use-org-notice-BeUR_ZGA.js} +1 -1
  369. package/dist/client/assets/{use-org-repo-syncs-Bi8Ut_qX.js → use-org-repo-syncs-DvcdTgrS.js} +1 -1
  370. package/dist/client/assets/{use-org-sso-CpaEO6G5.js → use-org-sso-BOOKyOjL.js} +1 -1
  371. package/dist/client/assets/use-organization-settings-BEn5xJKT.js +1 -0
  372. package/dist/client/assets/{use-panel-navigate-BvdMbLN8.js → use-panel-navigate-DzpMtCDM.js} +1 -1
  373. package/dist/client/assets/{use-project-native-view-presence-Cj3jJM1f.js → use-project-native-view-presence-D4Mhq-72.js} +1 -1
  374. package/dist/client/assets/{use-project-scope-TiMALD5Y.js → use-project-scope-DdM0t1xa.js} +1 -1
  375. package/dist/client/assets/{use-recent-apps-CAx2Sj77.js → use-recent-apps-BclKHbIs.js} +1 -1
  376. package/dist/client/assets/{use-reports-diagnostic-BWUL8kSa.js → use-reports-diagnostic-BAbQPKnw.js} +1 -1
  377. package/dist/client/assets/use-sandbox-events-CdcsfdkO.js +2 -0
  378. package/dist/client/assets/{use-secrets-DYs_2mJJ.js → use-secrets-LrCR8jto.js} +1 -1
  379. package/dist/client/assets/{use-section-preview-base-bQf9hU5_.js → use-section-preview-base-CiQHlYOM.js} +1 -1
  380. package/dist/client/assets/{use-sidebar-collapsed-Cynyx51j.js → use-sidebar-collapsed-CiqzdmQp.js} +1 -1
  381. package/dist/client/assets/{use-tags-Ds4Jpuu1.js → use-tags-B6rjUKRX.js} +1 -1
  382. package/dist/client/assets/{use-task-board-analytics-5UJcKLaD.js → use-task-board-analytics-B5zThTLs.js} +1 -1
  383. package/dist/client/assets/{use-task-board-item-prs-C0gHPfb5.js → use-task-board-item-prs-QwsxzHpc.js} +1 -1
  384. package/dist/client/assets/{use-task-board-items-osFWr4F_.js → use-task-board-items-B0KeELtH.js} +1 -1
  385. package/dist/client/assets/{use-task-board-prompts-eYQIzP7F.js → use-task-board-prompts-DjkyWndN.js} +1 -1
  386. package/dist/client/assets/{use-task-metadata-DqYio8UA.js → use-task-metadata-DRyTcJBf.js} +1 -1
  387. package/dist/client/assets/{use-thread-outputs-DJQKtV2q.js → use-thread-outputs-U5yvy3ti.js} +1 -1
  388. package/dist/client/assets/{use-view-draft-kind-BYPtD8MA.js → use-view-draft-kind-C2cwPb-d.js} +1 -1
  389. package/dist/client/assets/{use-voice-input-wPU7RMRz.js → use-voice-input-D_lO17n9.js} +1 -1
  390. package/dist/client/assets/useInfiniteQuery-BIIkqC2p.js +1 -0
  391. package/dist/client/assets/{useQueries-DKbjoyEp.js → useQueries-C-94_zeU.js} +1 -1
  392. package/dist/client/assets/useSuspenseInfiniteQuery-B5PirUR6.js +1 -0
  393. package/dist/client/assets/{users-BaX74SiF.js → users-D4cUiO-M.js} +1 -1
  394. package/dist/client/assets/{utils-C8EWsG3o.js → utils-CWN91Q0R.js} +1 -1
  395. package/dist/client/assets/variant-calendar-DHFpb0p3.js +1 -0
  396. package/dist/client/assets/{variant-matcher-override-BsSZ5yFL.js → variant-matcher-override-GbUOkJxx.js} +1 -1
  397. package/dist/client/assets/{view-header-B-qrTWpm.js → view-header-BZNgPIdK.js} +1 -1
  398. package/dist/client/assets/{virtual-mcp-DeWQ4GR6.js → virtual-mcp-jT57t8xN.js} +1 -1
  399. package/dist/client/assets/{watch-sse-pool-DSisQksD.js → watch-sse-pool-CrHa0Ln_.js} +1 -1
  400. package/dist/client/index.html +2 -2
  401. package/dist/server/migrate.js +210 -210
  402. package/dist/server/server.js +693 -693
  403. package/package.json +1 -1
  404. package/dist/client/assets/TrendUp01-Dnr3ECEr.js +0 -1
  405. package/dist/client/assets/agent-app-gA5AyVqP.js +0 -1
  406. package/dist/client/assets/agent-assets-CHRKOS2u.js +0 -1
  407. package/dist/client/assets/agent-automations-VyCqK5Re.js +0 -1
  408. package/dist/client/assets/agent-blog-CZmmsFZV.js +0 -2
  409. package/dist/client/assets/agent-blog-post-CB4b_awk.js +0 -2
  410. package/dist/client/assets/agent-calendar-Cp5T7Qbr.js +0 -1
  411. package/dist/client/assets/agent-connect-sources-BoFtzsla.js +0 -1
  412. package/dist/client/assets/agent-deck-ClKs4ShI.js +0 -1
  413. package/dist/client/assets/agent-e2e-DYM6mhlb.js +0 -1
  414. package/dist/client/assets/agent-experiments-w6nqO2q9.js +0 -1
  415. package/dist/client/assets/agent-file-DrrOEB-e.js +0 -1
  416. package/dist/client/assets/agent-hosting-BSxiIsrn.js +0 -1
  417. package/dist/client/assets/agent-icon-ButaHLCM.js +0 -1
  418. package/dist/client/assets/agent-library-UPbdmbqv.js +0 -1
  419. package/dist/client/assets/agent-library-file-D6WFOASp.js +0 -1
  420. package/dist/client/assets/agent-overview-BYbm2jhI.js +0 -1
  421. package/dist/client/assets/agent-settings-BlXhuK2P.js +0 -1
  422. package/dist/client/assets/agent-site-editor-code-BzxDSxJp.js +0 -2
  423. package/dist/client/assets/agent-site-editor-content-r61QYhf7.js +0 -1
  424. package/dist/client/assets/agent-site-editor-preview-BwuXgbhX.js +0 -1
  425. package/dist/client/assets/agent-view-Ba6W0Fqn.js +0 -1
  426. package/dist/client/assets/api-keys-BxUV6FZ8.js +0 -1
  427. package/dist/client/assets/app-editor-2zianuY6.js +0 -1
  428. package/dist/client/assets/automations-BgwFiPYA.js +0 -1
  429. package/dist/client/assets/category-editor-BEomaUlT.js +0 -1
  430. package/dist/client/assets/choose-editor-CptxA-2o.js +0 -1
  431. package/dist/client/assets/cms-settings-editor-q2PD6d-f.js +0 -1
  432. package/dist/client/assets/collection-detail-BFFv8EBD.js +0 -1
  433. package/dist/client/assets/connection-detail-NnYjF1KC.js +0 -1
  434. package/dist/client/assets/connections-Bs7MQX46.js +0 -1
  435. package/dist/client/assets/context-NTAokEvz.js +0 -1
  436. package/dist/client/assets/file-explorer-_xEpPcaK.js +0 -2
  437. package/dist/client/assets/general-C0agZL75.js +0 -1
  438. package/dist/client/assets/home-b8Q92l_T.js +0 -1
  439. package/dist/client/assets/index-C4wvi2v7.css +0 -1
  440. package/dist/client/assets/index-DETAJcho.js +0 -4
  441. package/dist/client/assets/index-DOrEGYb6.js +0 -1
  442. package/dist/client/assets/library-BD-JkXMr.js +0 -1
  443. package/dist/client/assets/named-rule-view-D1pVQoPd.js +0 -1
  444. package/dist/client/assets/openai-conversation-naly2gFj.js +0 -3
  445. package/dist/client/assets/plan-C-tbQnGr.js +0 -1
  446. package/dist/client/assets/post-calendar-B4Ra6fFT.js +0 -1
  447. package/dist/client/assets/project-app-view-CfT_gJz2.js +0 -1
  448. package/dist/client/assets/project-apps-B5076YmV.js +0 -1
  449. package/dist/client/assets/project-reports-Cc5D1Wqe.js +0 -1
  450. package/dist/client/assets/project-tasks-BzeYrrtq.js +0 -1
  451. package/dist/client/assets/projects-0NQRxQMi.js +0 -1
  452. package/dist/client/assets/record-editor-BiyfqDBa.js +0 -1
  453. package/dist/client/assets/redirect-editor-CysPkosR.js +0 -1
  454. package/dist/client/assets/reports-CuT-F3LQ.js +0 -1
  455. package/dist/client/assets/reports-onboarding-COfLbzIl.js +0 -1
  456. package/dist/client/assets/reports-tab-BNdKCtPv.js +0 -2
  457. package/dist/client/assets/repositories-BcVuKWWr.js +0 -1
  458. package/dist/client/assets/resolve-tab-icon-CCnYS1It.js +0 -1
  459. package/dist/client/assets/review-settings-Cfg9u4wr.js +0 -1
  460. package/dist/client/assets/roles-DNr0gwrs.js +0 -1
  461. package/dist/client/assets/route-Bny9Lc4o.js +0 -1
  462. package/dist/client/assets/route-CpGHqQae.js +0 -1
  463. package/dist/client/assets/route-zFj6XsMD.js +0 -1
  464. package/dist/client/assets/schema-CAZOGJTH.js +0 -1
  465. package/dist/client/assets/sections-editor-FJjN0xqY.js +0 -1
  466. package/dist/client/assets/settings-tab-CoHHJ63I.js +0 -1
  467. package/dist/client/assets/shell-layout-DfpoOTvP.js +0 -1
  468. package/dist/client/assets/site-editor-OTjpPpEJ.js +0 -1
  469. package/dist/client/assets/site-editor-toast-DI5QMuI-.js +0 -1
  470. package/dist/client/assets/skills-sOnNG6z3.js +0 -1
  471. package/dist/client/assets/tasks-BjMbQPZT.js +0 -1
  472. package/dist/client/assets/thread-analytics-TKt2gIA9.js +0 -1
  473. package/dist/client/assets/thread-route-BmXDes0-.js +0 -1
  474. package/dist/client/assets/use-apply-named-rule-c0_gPvLu.js +0 -1
  475. package/dist/client/assets/use-ask-in-chat-DQt8TEjL.js +0 -1
  476. package/dist/client/assets/use-blocks-v8-project-BzyehgAq.js +0 -1
  477. package/dist/client/assets/use-blog-view-BPx89KE1.js +0 -1
  478. package/dist/client/assets/use-organization-settings-CeyizmcT.js +0 -1
  479. package/dist/client/assets/use-sandbox-events-CrjWSBYb.js +0 -2
  480. package/dist/client/assets/useInfiniteQuery-EaWUgCtN.js +0 -1
  481. package/dist/client/assets/useSuspenseInfiniteQuery-D-KEcWQs.js +0 -1
  482. package/dist/client/assets/variant-calendar-56I1fIKh.js +0 -1
@@ -1,4 +0,0 @@
1
- import{gX as Fe,gY as Ze,ht as xn,hu as ks,c as Y,b as X,r as q,j as t,B as Z,h as it,m as ye,_ as Ms,X as _s,Z as Vs,Y as Je,ar as Gt,ap as qt,aq as Ht,t as ie,R as Xe,a6 as Ae,a7 as Ts,hv as gn,v as at,D as lt,y as $t,L as Ft,I as Ne,F as vn,aj as bn,ai as jn,gi as $e,au as Ds,gh as ke,gV as Oe,am as ft,d as pt,i as Ps,K as At,hw as yn,hx as wn,hy as Sn,$ as Ct,e8 as xe,hz as be,n as Ke,P as Nn,u as Cn,aY as rt,q as Et,e as Os,fI as Qt,ad as kn,x as ht,aU as Is,w as xt,ax as Mn,cI as _n,E as _e,e0 as Vn,a as Tn,hA as zt,hB as Dn,b6 as Pn,ah as On,aG as In,aF as $n,bx as Fn,a9 as An,hs as En,aP as zn,aO as Rn,aL as Ln,aJ as Un,aK as Bn,aN as Yn,aM as Wn,b9 as Kn,aW as Gn}from"./index-B2vvUsuK.js";import{g as qn}from"./extract-connection-data-Csm2LLbI.js";import{b as Hn}from"./chat-context-DsLpz7ew.js";import{U as Qn,b as Xn}from"./build-improve-prompt-doc-DgQdPFxI.js";import{E as Jn}from"./empty-state--1H9mx7y.js";import{u as Zn}from"./shell-layout-DfpoOTvP.js";import{g as gt,n as ei,a as Xt,e as ti,u as si,f as ni}from"./use-date-fns-locale-8kgkXGzy.js";import{a as ii}from"./mcp-oauth-ciX7wK5f.js";import{T as ut}from"./textarea-C5yT2rai.js";import{c as Ve,T as Te,a as De}from"./tooltip-C0XDZQqg.js";import{u as Rt,a as $s,b as ai}from"./use-connection-BlQSFvXZ.js";import{b as Fs,g as As,c as li,i as ri}from"./repository-binding-DC98qYdg.js";import{i as Jt}from"./mcp-oauth-DESKCBIm.js";import{a as oi}from"./MessageCircle01-DjShhQqZ.js";import{s as Be}from"./Plus-GSWEwEm-.js";import{t as dt,a as ci}from"./Tool01-DJqLAFcI.js";import{s as vt}from"./Trash01-Br_8Dd8k.js";import{u as Zt}from"./use-debounced-autosave-43RSVqCJ.js";import{A as di}from"./add-connection-dialog-BIOFD97r.js";import{b3 as ui,k as Es,b4 as mi,b5 as fi,aG as pi,a4 as hi,a8 as xi,b6 as gi,b7 as zs,b8 as Rs,b9 as vi,a9 as bi,ba as ji,bb as kt,bc as es,A as ts,C as yi,bd as wi,be as Si,h as Ls,w as ss,j as Ni,a2 as Ci,n as ki,o as Mi,m as _i,g as Us,e as bt,U as Vi}from"./agent-icon-ButaHLCM.js";import{i as Dt}from"./SearchMd-DhrJsmFj.js";import{F as ns}from"./file-type-icon-sxJ1fqoc.js";import{k as Ti,l as Di,p as Pi,q as Oi}from"./use-org-fs-BrF60Lzy.js";import{C as Ii}from"./collection-tabs-THb2ZDUR.js";import{T as Bs,u as Ys}from"./use-mcp-auth-status-Cvpzf8bf.js";import{I as jt}from"./integration-icon-DazsuPNm.js";import{C as $i}from"./checkbox-Bo6uhaqm.js";import{u as yt}from"./use-mcp-client-C25DU1dz.js";import{a as Ws}from"./use-mcp-tools-DU4EJz2s.js";import{u as Fi}from"./use-mcp-prompts-DFURxOZn.js";import{g as Ai}from"./connection-slug-Wiu7W5Ro.js";import{c as Se,b as Ee,a as ze,d as Re,S as Le}from"./select-PhQ1dHUc.js";import{s as Ks}from"./XClose-BbVr5nc7.js";import{t as Pt}from"./utils-CVEq3hMx.js";import{S as et}from"./switch-CavZ0Td_.js";import{a as Gs,b as qs,P as Hs}from"./popover-BN8yB-gL.js";import{S as Ei}from"./scroll-area-CXINzzvW.js";import{i as zi}from"./Upload01-B1gnueEL.js";import{n as Ri,h as Li}from"./UserCheck01-CpLKejEQ.js";import{i as Ui,n as Bi}from"./TrendUp01-Dnr3ECEr.js";import{a as Yi}from"./SwitchHorizontal01-NAHL2C3Y.js";import{a as Wi}from"./Image01-D2QOi7x6.js";import{i as Ki}from"./Monitor01-DtssQiym.js";import{g as Gi}from"./types-BmRTIjW9.js";import{a as Qs,c as qi}from"./agent-capabilities-B8dQ_ZB8.js";import{a as Hi}from"./use-panel-navigate-BvdMbLN8.js";import{u as Qi,p as Xi,g as Ot,o as is,r as It,h as Ji,a as Zi,j as as,t as ea,k as ta,l as sa,b as na}from"./use-project-native-view-presence-Cj3jJM1f.js";import{a as Xs,u as ia,i as aa,o as la,r as ls,p as ra,w as oa,b as rs}from"./optimistic-project-sidebar-views-DWktyZnu.js";import{u as ca}from"./use-file-configs-zM1_UDsD.js";import{a as da,P as ua,i as ma}from"./sections-CvVT6jo9.js";import{i as Lt}from"./Key01-CDcaZkCg.js";import{u as fa}from"./use-copy-_EjHpFlu.js";import{L as we}from"./label-BLEP0nH0.js";import{h as pa}from"./roles-DW32thi2.js";import{b as ha,u as xa}from"./use-blocks-v8-project-BzyehgAq.js";import{s as Js,b as ga,e as Zs,r as va}from"./session-runtime-CWUXrNEM.js";import{V as ba,E as wt,R as os,r as en,C as ja,w as ya}from"./virtual-mcp-DeWQ4GR6.js";import{b as wa,a as Sa,D as Na}from"./drawer-Daptw1OQ.js";import{u as Ca}from"./use-mobile-DFpIEPum.js";import{d as St}from"./delay-CnY5UFtP.js";import{b as ka}from"./sandbox-url-D3mC8qhT.js";import{S as Ma,a as _a,b as Va}from"./secret-picker-CdBDBcEP.js";import{u as Ta,a as Da}from"./use-secrets-DYs_2mJJ.js";import{o as cs}from"./omit-server-managed-metadata-L5IhjRZB.js";import{G as Pa}from"./github-icon-DGEVXZ8I.js";import{R as Oa}from"./repository-picker-BLhEIBPT.js";import{n as ds}from"./app-preview-url-9Od4s8Sz.js";import{a as Ia}from"./use-organization-settings-CeyizmcT.js";import{r as $a}from"./serial-task-queue-CGOeQgpr.js";function nt(a,e){const s=gt(),n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,i=Fe(a,e?.in),l=i.getDay(),c=(l<n?7:0)+l-n;return i.setDate(i.getDate()-c),i.setHours(0,0,0,0),i}function mt(a,e){return nt(a,{...e,weekStartsOn:1})}function tn(a,e){const s=Fe(a,e?.in),n=s.getFullYear(),i=Ze(s,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const l=mt(i),c=Ze(s,0);c.setFullYear(n,0,4),c.setHours(0,0,0,0);const r=mt(c);return s.getTime()>=l.getTime()?n+1:s.getTime()>=r.getTime()?n:n-1}function us(a,e){const s=Fe(a,e?.in);return s.setHours(0,0,0,0),s}function Fa(a,e,s){const[n,i]=ei(s?.in,a,e),l=us(n),c=us(i),r=+l-Xt(l),f=+c-Xt(c);return Math.round((r-f)/xn)}function Aa(a,e){const s=tn(a,e),n=Ze(a,0);return n.setFullYear(s,0,4),n.setHours(0,0,0,0),mt(n)}function Ea(a){return a instanceof Date||typeof a=="object"&&Object.prototype.toString.call(a)==="[object Date]"}function za(a){return!(!Ea(a)&&typeof a!="number"||isNaN(+Fe(a)))}function Ra(a,e){const s=Fe(a,e?.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}function La(a,e){const s=Fe(a,e?.in);return Fa(s,Ra(s))+1}function Ua(a,e){const s=Fe(a,e?.in),n=+mt(s)-+Aa(s);return Math.round(n/ks)+1}function sn(a,e){const s=Fe(a,e?.in),n=s.getFullYear(),i=gt(),l=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,c=Ze(e?.in||a,0);c.setFullYear(n+1,0,l),c.setHours(0,0,0,0);const r=nt(c,e),f=Ze(e?.in||a,0);f.setFullYear(n,0,l),f.setHours(0,0,0,0);const o=nt(f,e);return+s>=+r?n+1:+s>=+o?n:n-1}function Ba(a,e){const s=gt(),n=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,i=sn(a,e),l=Ze(e?.in||a,0);return l.setFullYear(i,0,n),l.setHours(0,0,0,0),nt(l,e)}function Ya(a,e){const s=Fe(a,e?.in),n=+nt(s,e)-+Ba(s,e);return Math.round(n/ks)+1}function ae(a,e){const s=a<0?"-":"",n=Math.abs(a).toString().padStart(e,"0");return s+n}const Ue={y(a,e){const s=a.getFullYear(),n=s>0?s:1-s;return ae(e==="yy"?n%100:n,e.length)},M(a,e){const s=a.getMonth();return e==="M"?String(s+1):ae(s+1,2)},d(a,e){return ae(a.getDate(),e.length)},a(a,e){const s=a.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];default:return s==="am"?"a.m.":"p.m."}},h(a,e){return ae(a.getHours()%12||12,e.length)},H(a,e){return ae(a.getHours(),e.length)},m(a,e){return ae(a.getMinutes(),e.length)},s(a,e){return ae(a.getSeconds(),e.length)},S(a,e){const s=e.length,n=a.getMilliseconds(),i=Math.trunc(n*Math.pow(10,s-3));return ae(i,e.length)}},Qe={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ms={G:function(a,e,s){const n=a.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return s.era(n,{width:"abbreviated"});case"GGGGG":return s.era(n,{width:"narrow"});default:return s.era(n,{width:"wide"})}},y:function(a,e,s){if(e==="yo"){const n=a.getFullYear(),i=n>0?n:1-n;return s.ordinalNumber(i,{unit:"year"})}return Ue.y(a,e)},Y:function(a,e,s,n){const i=sn(a,n),l=i>0?i:1-i;if(e==="YY"){const c=l%100;return ae(c,2)}return e==="Yo"?s.ordinalNumber(l,{unit:"year"}):ae(l,e.length)},R:function(a,e){const s=tn(a);return ae(s,e.length)},u:function(a,e){const s=a.getFullYear();return ae(s,e.length)},Q:function(a,e,s){const n=Math.ceil((a.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return ae(n,2);case"Qo":return s.ordinalNumber(n,{unit:"quarter"});case"QQQ":return s.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(n,{width:"narrow",context:"formatting"});default:return s.quarter(n,{width:"wide",context:"formatting"})}},q:function(a,e,s){const n=Math.ceil((a.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return ae(n,2);case"qo":return s.ordinalNumber(n,{unit:"quarter"});case"qqq":return s.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(n,{width:"narrow",context:"standalone"});default:return s.quarter(n,{width:"wide",context:"standalone"})}},M:function(a,e,s){const n=a.getMonth();switch(e){case"M":case"MM":return Ue.M(a,e);case"Mo":return s.ordinalNumber(n+1,{unit:"month"});case"MMM":return s.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(n,{width:"narrow",context:"formatting"});default:return s.month(n,{width:"wide",context:"formatting"})}},L:function(a,e,s){const n=a.getMonth();switch(e){case"L":return String(n+1);case"LL":return ae(n+1,2);case"Lo":return s.ordinalNumber(n+1,{unit:"month"});case"LLL":return s.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(n,{width:"narrow",context:"standalone"});default:return s.month(n,{width:"wide",context:"standalone"})}},w:function(a,e,s,n){const i=Ya(a,n);return e==="wo"?s.ordinalNumber(i,{unit:"week"}):ae(i,e.length)},I:function(a,e,s){const n=Ua(a);return e==="Io"?s.ordinalNumber(n,{unit:"week"}):ae(n,e.length)},d:function(a,e,s){return e==="do"?s.ordinalNumber(a.getDate(),{unit:"date"}):Ue.d(a,e)},D:function(a,e,s){const n=La(a);return e==="Do"?s.ordinalNumber(n,{unit:"dayOfYear"}):ae(n,e.length)},E:function(a,e,s){const n=a.getDay();switch(e){case"E":case"EE":case"EEE":return s.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(n,{width:"short",context:"formatting"});default:return s.day(n,{width:"wide",context:"formatting"})}},e:function(a,e,s,n){const i=a.getDay(),l=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(l);case"ee":return ae(l,2);case"eo":return s.ordinalNumber(l,{unit:"day"});case"eee":return s.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(i,{width:"short",context:"formatting"});default:return s.day(i,{width:"wide",context:"formatting"})}},c:function(a,e,s,n){const i=a.getDay(),l=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(l);case"cc":return ae(l,e.length);case"co":return s.ordinalNumber(l,{unit:"day"});case"ccc":return s.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(i,{width:"narrow",context:"standalone"});case"cccccc":return s.day(i,{width:"short",context:"standalone"});default:return s.day(i,{width:"wide",context:"standalone"})}},i:function(a,e,s){const n=a.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return ae(i,e.length);case"io":return s.ordinalNumber(i,{unit:"day"});case"iii":return s.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(n,{width:"short",context:"formatting"});default:return s.day(n,{width:"wide",context:"formatting"})}},a:function(a,e,s){const i=a.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(a,e,s){const n=a.getHours();let i;switch(n===12?i=Qe.noon:n===0?i=Qe.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(a,e,s){const n=a.getHours();let i;switch(n>=17?i=Qe.evening:n>=12?i=Qe.afternoon:n>=4?i=Qe.morning:i=Qe.night,e){case"B":case"BB":case"BBB":return s.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(i,{width:"narrow",context:"formatting"});default:return s.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(a,e,s){if(e==="ho"){let n=a.getHours()%12;return n===0&&(n=12),s.ordinalNumber(n,{unit:"hour"})}return Ue.h(a,e)},H:function(a,e,s){return e==="Ho"?s.ordinalNumber(a.getHours(),{unit:"hour"}):Ue.H(a,e)},K:function(a,e,s){const n=a.getHours()%12;return e==="Ko"?s.ordinalNumber(n,{unit:"hour"}):ae(n,e.length)},k:function(a,e,s){let n=a.getHours();return n===0&&(n=24),e==="ko"?s.ordinalNumber(n,{unit:"hour"}):ae(n,e.length)},m:function(a,e,s){return e==="mo"?s.ordinalNumber(a.getMinutes(),{unit:"minute"}):Ue.m(a,e)},s:function(a,e,s){return e==="so"?s.ordinalNumber(a.getSeconds(),{unit:"second"}):Ue.s(a,e)},S:function(a,e){return Ue.S(a,e)},X:function(a,e,s){const n=a.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return ps(n);case"XXXX":case"XX":return We(n);default:return We(n,":")}},x:function(a,e,s){const n=a.getTimezoneOffset();switch(e){case"x":return ps(n);case"xxxx":case"xx":return We(n);default:return We(n,":")}},O:function(a,e,s){const n=a.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+fs(n,":");default:return"GMT"+We(n,":")}},z:function(a,e,s){const n=a.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+fs(n,":");default:return"GMT"+We(n,":")}},t:function(a,e,s){const n=Math.trunc(+a/1e3);return ae(n,e.length)},T:function(a,e,s){return ae(+a,e.length)}};function fs(a,e=""){const s=a>0?"-":"+",n=Math.abs(a),i=Math.trunc(n/60),l=n%60;return l===0?s+String(i):s+String(i)+e+ae(l,2)}function ps(a,e){return a%60===0?(a>0?"-":"+")+ae(Math.abs(a)/60,2):We(a,e)}function We(a,e=""){const s=a>0?"-":"+",n=Math.abs(a),i=ae(Math.trunc(n/60),2),l=ae(n%60,2);return s+i+e+l}const hs=(a,e)=>{switch(a){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},nn=(a,e)=>{switch(a){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Wa=(a,e)=>{const s=a.match(/(P+)(p+)?/)||[],n=s[1],i=s[2];if(!i)return hs(a,e);let l;switch(n){case"P":l=e.dateTime({width:"short"});break;case"PP":l=e.dateTime({width:"medium"});break;case"PPP":l=e.dateTime({width:"long"});break;default:l=e.dateTime({width:"full"});break}return l.replace("{{date}}",hs(n,e)).replace("{{time}}",nn(i,e))},Ka={p:nn,P:Wa},Ga=/^D+$/,qa=/^Y+$/,Ha=["D","DD","YY","YYYY"];function Qa(a){return Ga.test(a)}function Xa(a){return qa.test(a)}function Ja(a,e,s){const n=Za(a,e,s);if(console.warn(n),Ha.includes(a))throw new RangeError(n)}function Za(a,e,s){const n=a[0]==="Y"?"years":"days of the month";return`Use \`${a.toLowerCase()}\` instead of \`${a}\` (in \`${e}\`) for formatting ${n} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const el=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sl=/^'([^]*?)'?$/,nl=/''/g,il=/[a-zA-Z]/;function al(a,e,s){const n=gt(),i=s?.locale??n.locale??ti,l=s?.firstWeekContainsDate??s?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,c=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=Fe(a,s?.in);if(!za(r))throw new RangeError("Invalid time value");let f=e.match(tl).map(p=>{const m=p[0];if(m==="p"||m==="P"){const u=Ka[m];return u(p,i.formatLong)}return p}).join("").match(el).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:ll(p)};if(ms[m])return{isToken:!0,value:p};if(m.match(il))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(f=i.localize.preprocessor(r,f));const o={firstWeekContainsDate:l,weekStartsOn:c,locale:i};return f.map(p=>{if(!p.isToken)return p.value;const m=p.value;(!s?.useAdditionalWeekYearTokens&&Xa(m)||!s?.useAdditionalDayOfYearTokens&&Qa(m))&&Ja(m,e,String(a));const u=ms[m[0]];return u(r,m,i.localize,o)}).join("")}function ll(a){const e=a.match(sl);return e?e[1].replace(nl,"'"):a}const an=25*1024*1024,Mt="home",_t="knowledge";function xs(a){return a==null?"":a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(0)} KB`:`${(a/(1024*1024)).toFixed(1)} MB`}function Ye(a){return a.split("/").pop()??a}function rl(a){const e=Y.c(64),{form:s}=a,n=X(),{upload:i}=Ti(Mt),l=Di(),c=q.useRef(null),[r,f]=q.useState(!1),[o,p]=q.useState(""),[m,u]=q.useState(!1);let h;e[0]!==r?(h={enabled:r},e[0]=r,e[1]=h):h=e[1];const{data:d}=Pi(60,h),x=d===void 0?[]:d;let g;e[2]!==r?(g={enabled:r},e[2]=r,e[3]=g):g=e[3];const{data:v}=Oi(g),j=v===void 0?[]:v;let y;e[4]!==s?(y=()=>s.getValues("metadata.knowledge")??[],e[4]=s,e[5]=y):y=e[5];const[b,w]=q.useState(y);let S;e[6]!==s?(S=I=>{w(I),s.setValue("metadata.knowledge",I,{shouldDirty:!0})},e[6]=s,e[7]=S):S=e[7];const C=S;let N;e[8]!==l||e[9]!==b||e[10]!==C||e[11]!==n||e[12]!==i?(N=async I=>{if(!I||I.length===0)return;const te=Array.from(I),Pe=te.filter(pl),he=te.filter(fl);if(he.length>0&&ie.warning(n("virtualMcp.filesSection.fileTooLargeTitle"),{description:n("virtualMcp.filesSection.fileTooLargeDescription",{names:he.map(ml).join(", ")})}),Pe.length!==0){try{await i.mutateAsync({dir:_t,files:Pe})}catch(D){const le=D;ie.error(le instanceof Error?le.message:n("virtualMcp.filesSection.failedUploadFile"));return}C([...b,...Pe.map(D=>({id:crypto.randomUUID(),name:D.name,volume:Mt,path:`${_t}/${D.name}`,url:l(Mt,`${_t}/${D.name}`),contentType:D.type||null,size:D.size,addedAt:new Date().toISOString()}))])}},e[8]=l,e[9]=b,e[10]=C,e[11]=n,e[12]=i,e[13]=N):N=e[13];const k=N;let V;e[14]!==l||e[15]!==b||e[16]!==C?(V=I=>{b.some(te=>te.volume===I.volume&&te.path===I.path)||(C([...b,{id:crypto.randomUUID(),name:Ye(I.path),volume:I.volume,path:I.path,url:l(I.volume,I.path),contentType:null,size:I.size??null,addedAt:new Date().toISOString()}]),f(!1))},e[14]=l,e[15]=b,e[16]=C,e[17]=V):V=e[17];const T=V;let _;e[18]!==l||e[19]!==b||e[20]!==C?(_=I=>{b.some(te=>te.volume===I.volume&&te.path===I.path)||(C([...b,{id:crypto.randomUUID(),name:Ye(I.path),kind:"skill",volume:I.volume,path:I.path,url:l(I.volume,I.path),contentType:null,size:null,addedAt:new Date().toISOString()}]),f(!1))},e[18]=l,e[19]=b,e[20]=C,e[21]=_):_=e[21];const F=_;let $;e[22]!==b||e[23]!==C?($=I=>{C(b.filter(te=>te.id!==I))},e[22]=b,e[23]=C,e[24]=$):$=e[24];const A=$;let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=I=>{f(I),I&&p("")},e[25]=P):P=e[25];const H=P;let Q;e[26]!==b?(Q=new Set(b.map(ul)),e[26]=b,e[27]=Q):Q=e[27];const R=Q,z=o.toLowerCase();let K;e[28]!==R?(K=I=>!R.has(`${I.volume}/${I.path}`),e[28]=R,e[29]=K):K=e[29];const E=x.filter(dl).filter(K).filter(I=>Ye(I.path).toLowerCase().includes(z)).slice(0,5);let L;e[30]!==R?(L=I=>!R.has(`${I.volume}/${I.path}`),e[30]=R,e[31]=L):L=e[31];const G=j.filter(L).filter(I=>Ye(I.path).toLowerCase().includes(z)).slice(0,5),J=I=>t.jsxs(Ms,{open:r,onOpenChange:H,children:[t.jsx(_s,{asChild:!0,children:I}),t.jsxs(Vs,{align:"end",className:"w-56",children:[t.jsxs(Je,{onSelect:()=>{c.current?.click()},children:[t.jsx(ui,{size:16}),n("virtualMcp.filesSection.uploadFile")]}),t.jsxs(Gt,{children:[t.jsxs(qt,{className:"gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground",children:[t.jsx(Es,{size:16}),n("virtualMcp.filesSection.selectFileOrFolder")]}),t.jsxs(Ht,{className:"w-72 p-0",children:[t.jsxs("div",{className:"flex items-center gap-2 border-b px-3",children:[t.jsx(Dt,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("input",{value:o,onChange:te=>p(te.target.value),onKeyDown:cl,placeholder:n("virtualMcp.filesSection.searchFilesPlaceholder"),className:"h-10 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),t.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:E.length===0?t.jsx("p",{className:"px-2 py-3 text-center text-sm text-muted-foreground",children:n("virtualMcp.filesSection.noFilesFound")}):E.map(te=>t.jsxs(Je,{onSelect:()=>T(te),children:[t.jsx(ns,{filename:Ye(te.path),className:"h-5 w-4 shrink-0"}),t.jsx("span",{className:"flex-1 truncate",children:Ye(te.path)}),te.size!=null&&t.jsx("span",{className:"text-xs text-muted-foreground",children:xs(te.size)})]},`${te.volume}/${te.path}`))})]})]}),t.jsxs(Gt,{children:[t.jsxs(qt,{className:"gap-2 [&_svg:not([class*='text-'])]:text-muted-foreground",children:[t.jsx(dt,{size:16}),n("virtualMcp.filesSection.selectSkill")]}),t.jsxs(Ht,{className:"w-72 p-0",children:[t.jsxs("div",{className:"flex items-center gap-2 border-b px-3",children:[t.jsx(Dt,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("input",{value:o,onChange:te=>p(te.target.value),onKeyDown:ol,placeholder:n("virtualMcp.filesSection.searchSkillsPlaceholder"),className:"h-10 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),t.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:G.length===0?t.jsx("p",{className:"px-2 py-3 text-center text-sm text-muted-foreground",children:n("virtualMcp.filesSection.noSkillsFound")}):G.map(te=>t.jsxs(Je,{onSelect:()=>F(te),children:[t.jsx(dt,{size:16,className:"shrink-0"}),t.jsx("span",{className:"flex-1 truncate",children:Ye(te.path)})]},`${te.volume}/${te.path}`))})]})]})]})]}),ee="flex flex-col gap-3";let M;e[32]!==n?(M=n("virtualMcp.filesSection.filesAndSkills"),e[32]=n,e[33]=M):M=e[33];let O;e[34]!==M?(O=t.jsx("h2",{className:"text-sm font-medium text-foreground",children:M}),e[34]=M,e[35]=O):O=e[35];let U;e[36]!==n?(U=n("virtualMcp.filesSection.description"),e[36]=n,e[37]=U):U=e[37];let B;e[38]!==U?(B=t.jsx("p",{className:"text-sm text-muted-foreground",children:U}),e[38]=U,e[39]=B):B=e[39];let W;e[40]!==O||e[41]!==B?(W=t.jsxs("div",{className:"flex flex-col gap-1",children:[O,B]}),e[40]=O,e[41]=B,e[42]=W):W=e[42];const re=b.length>0&&J(t.jsxs(Z,{variant:"outline",size:"sm",disabled:i.isPending,children:[i.isPending?t.jsx(it,{size:"xs"}):t.jsx(Be,{size:14}),n("virtualMcp.filesSection.add")]}));let oe;e[43]!==W||e[44]!==re?(oe=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[W,re]}),e[43]=W,e[44]=re,e[45]=oe):oe=e[45];let me;e[46]!==k?(me=t.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:I=>{k(I.target.files),I.target.value=""}}),e[46]=k,e[47]=me):me=e[47];let ne,ue;e[48]===Symbol.for("react.memo_cache_sentinel")?(ne=I=>{I.preventDefault(),u(!0)},ue=()=>u(!1),e[48]=ne,e[49]=ue):(ne=e[48],ue=e[49]);let fe;e[50]!==k?(fe=I=>{I.preventDefault(),I.stopPropagation(),u(!1),k(I.dataTransfer.files)},e[50]=k,e[51]=fe):fe=e[51];const pe=m&&"outline outline-2 outline-dashed outline-primary";let ce;e[52]!==pe?(ce=ye("flex flex-col gap-2 rounded-lg",pe),e[52]=pe,e[53]=ce):ce=e[53];const ge=b.length===0?J(t.jsxs("button",{type:"button",className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-dashed border-border hover:bg-accent transition-colors w-full text-left cursor-pointer",children:[t.jsx("div",{className:"flex items-center justify-center size-8 rounded-md text-muted-foreground/75 border border-dashed border-border shrink-0",children:t.jsx(Be,{size:16})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1",children:n("virtualMcp.filesSection.noFilesOrSkillsYet")})]})):b.map(I=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 surface",children:[I.kind==="skill"?t.jsx("div",{className:"flex items-center justify-center h-8 w-6.5 shrink-0 rounded-md bg-muted text-muted-foreground",children:t.jsx(dt,{size:16})}):t.jsx(ns,{filename:I.name,className:"h-8 w-6.5 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:I.name}),t.jsx("p",{className:"text-xs text-muted-foreground",children:I.kind==="skill"?n("virtualMcp.filesSection.kindSkill"):I.size!=null?xs(I.size):n("virtualMcp.filesSection.kindFile")})]}),t.jsx(Z,{variant:"ghost",size:"icon",onClick:()=>A(I.id),"aria-label":n("virtualMcp.filesSection.removeAriaLabel",{name:I.name}),children:t.jsx(vt,{size:16})})]},I.id));let je;e[54]!==ne||e[55]!==ue||e[56]!==fe||e[57]!==ce||e[58]!==ge?(je=t.jsx("div",{onDragOver:ne,onDragLeave:ue,onDrop:fe,className:ce,children:ge}),e[54]=ne,e[55]=ue,e[56]=fe,e[57]=ce,e[58]=ge,e[59]=je):je=e[59];let de;return e[60]!==oe||e[61]!==me||e[62]!==je?(de=t.jsxs("section",{className:ee,children:[oe,me,je]}),e[60]=oe,e[61]=me,e[62]=je,e[63]=de):de=e[63],de}function ol(a){return a.stopPropagation()}function cl(a){return a.stopPropagation()}function dl(a){return a.kind!=="dir"}function ul(a){return`${a.volume}/${a.path}`}function ml(a){return a.name}function fl(a){return a.size>an}function pl(a){return a.size<=an}function st(){const a=Y.c(1);let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(it,{className:"size-6 text-muted-foreground"})}),a[0]=e):e=a[0],e}function ct(a,e){return({error:s})=>s?.message?.includes("Method not found")||s?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:a})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(Ts,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:e("virtualMcp.dependencySelectionDialog.somethingWentWrong")}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:s?.message?s.message.length>200?`${s.message.slice(0,200)}...`:s.message:e("virtualMcp.dependencySelectionDialog.unexpectedError")})]})]})}function ln(a){const e=Y.c(23),{item:s,isSelected:n,onToggle:i,disabled:l}=a,c=l?"cursor-not-allowed opacity-50":"cursor-pointer",r=n?"bg-accent/25":"hover:bg-accent";let f;e[0]!==c||e[1]!==r?(f=ye("flex items-start gap-3 p-4 rounded-lg transition-colors",c,r),e[0]=c,e[1]=r,e[2]=f):f=e[2];let o;e[3]!==s.name?(o=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=o):o=e[4];let p;e[5]!==s.tags?(p=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=p):p=e[6];let m;e[7]!==o||e[8]!==p?(m=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o,p]}),e[7]=o,e[8]=p,e[9]=m):m=e[9];let u;e[10]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[m,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let d;e[15]!==l||e[16]!==n||e[17]!==i?(d=t.jsx($i,{checked:n,onCheckedChange:i,disabled:l,className:"mt-0.5"}),e[15]=l,e[16]=n,e[17]=i,e[18]=d):d=e[18];let x;return e[19]!==f||e[20]!==h||e[21]!==d?(x=t.jsxs("label",{className:f,children:[h,d]}),e[19]=f,e[20]=h,e[21]=d,e[22]=x):x=e[22],x}function hl(a){const e=Y.c(35),{activeTab:s,onTabChange:n,showSelectAll:i,isAllSelected:l,handleSelectAll:c}=a,r=X();let f;e[0]!==r?(f=r("virtualMcp.dependencySelectionDialog.tabTools"),e[0]=r,e[1]=f):f=e[1];let o;e[2]!==f?(o={id:"tools",label:f},e[2]=f,e[3]=o):o=e[3];let p;e[4]!==r?(p=r("virtualMcp.dependencySelectionDialog.tabActive"),e[4]=r,e[5]=p):p=e[5];let m;e[6]!==p?(m={id:"active",label:p},e[6]=p,e[7]=m):m=e[7];let u;e[8]!==r?(u=r("virtualMcp.dependencySelectionDialog.tabResources"),e[8]=r,e[9]=u):u=e[9];let h;e[10]!==u?(h={id:"resources",label:u},e[10]=u,e[11]=h):h=e[11];let d;e[12]!==r?(d=r("virtualMcp.dependencySelectionDialog.tabPrompts"),e[12]=r,e[13]=d):d=e[13];let x;e[14]!==d?(x={id:"prompts",label:d},e[14]=d,e[15]=x):x=e[15];let g;e[16]!==o||e[17]!==m||e[18]!==h||e[19]!==x?(g=[o,m,h,x],e[16]=o,e[17]=m,e[18]=h,e[19]=x,e[20]=g):g=e[20];let v;e[21]!==n?(v=w=>n(w),e[21]=n,e[22]=v):v=e[22];let j;e[23]!==s||e[24]!==v||e[25]!==g?(j=t.jsx(Ii,{tabs:g,activeTab:s,onTabChange:v}),e[23]=s,e[24]=v,e[25]=g,e[26]=j):j=e[26];let y;e[27]!==c||e[28]!==l||e[29]!==i||e[30]!==r?(y=i&&t.jsx("button",{type:"button",onClick:c,className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r(l?"virtualMcp.dependencySelectionDialog.deselectAll":"virtualMcp.dependencySelectionDialog.selectAll")}),e[27]=c,e[28]=l,e[29]=i,e[30]=r,e[31]=y):y=e[31];let b;return e[32]!==j||e[33]!==y?(b=t.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-t border-border shrink-0",children:[j,y]}),e[32]=j,e[33]=y,e[34]=b):b=e[34],b}function Ut(a){const e=Y.c(13),{items:s,selections:n,onToggle:i,emptyMessage:l,disabled:c}=a;let r,f,o;if(e[0]!==c||e[1]!==l||e[2]!==s||e[3]!==i||e[4]!==n){o=Symbol.for("react.early_return_sentinel");e:{const m=s.map(xl);if(s.length===0){let u;e[8]!==l?(u=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:l})}),e[8]=l,e[9]=u):u=e[9],o=u;break e}r="flex-1 overflow-auto px-4 py-3 space-y-1",f=s.map(u=>t.jsx(ln,{item:u,isSelected:n===null||n?.includes(u.id),onToggle:()=>i(u.id,m),disabled:c},u.id))}e[0]=c,e[1]=l,e[2]=s,e[3]=i,e[4]=n,e[5]=r,e[6]=f,e[7]=o}else r=e[5],f=e[6],o=e[7];if(o!==Symbol.for("react.early_return_sentinel"))return o;let p;return e[10]!==r||e[11]!==f?(p=t.jsx("div",{className:r,children:f}),e[10]=r,e[11]=f,e[12]=p):p=e[12],p}function xl(a){return a.id}function gl(a){const e=Y.c(22),{connectionId:s,toolSelections:n,onToggleTool:i}=a,l=X(),{org:c}=Ae();let r;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(r={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=r):r=e[3];const f=yt(r);let o;e[4]!==f?(o={client:f},e[4]=f,e[5]=o):o=e[5];const{data:p}=Ws(o),m=p.tools;let u,h,d;if(e[6]!==p.tools||e[7]!==i||e[8]!==l||e[9]!==n){d=Symbol.for("react.early_return_sentinel");e:{const g=m.map(bl);let v;e[13]!==n?(v=b=>n===null||n.includes(b.name),e[13]=n,e[14]=v):v=e[14];const y=p.tools.filter(v).map(vl);if(y.length===0){let b;e[15]!==l?(b=l("virtualMcp.dependencySelectionDialog.noActiveToolsSelected"),e[15]=l,e[16]=b):b=e[16];let w;e[17]!==b?(w=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:b})}),e[17]=b,e[18]=w):w=e[18],d=w;break e}u="flex-1 overflow-auto px-4 py-3 space-y-1",h=y.map(b=>t.jsx(ln,{item:b,isSelected:!0,onToggle:()=>i(b.id,g)},b.id))}e[6]=p.tools,e[7]=i,e[8]=l,e[9]=n,e[10]=u,e[11]=h,e[12]=d}else u=e[10],h=e[11],d=e[12];if(d!==Symbol.for("react.early_return_sentinel"))return d;let x;return e[19]!==u||e[20]!==h?(x=t.jsx("div",{className:u,children:h}),e[19]=u,e[20]=h,e[21]=x):x=e[21],x}function vl(a){return{id:a.name,name:a.name,description:a.description,tags:t.jsx(Bs,{annotations:a.annotations,_meta:a._meta})}}function bl(a){return a.name}function jl(a){const e=Y.c(16),{connectionId:s,selections:n,onToggle:i,disabled:l}=a,{org:c}=Ae();let r;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(r={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=r):r=e[3];const f=yt(r);let o;e[4]!==f?(o={client:f},e[4]=f,e[5]=o):o=e[5];const{data:p}=Ws(o);let m;e[6]!==p.tools?(m=p.tools.map(yl),e[6]=p.tools,e[7]=m):m=e[7];const u=m,h=X();let d;e[8]!==h?(d=h("virtualMcp.dependencySelectionDialog.noToolsAvailable"),e[8]=h,e[9]=d):d=e[9];let x;return e[10]!==l||e[11]!==u||e[12]!==i||e[13]!==n||e[14]!==d?(x=t.jsx(Ut,{items:u,selections:n,onToggle:i,emptyMessage:d,disabled:l}),e[10]=l,e[11]=u,e[12]=i,e[13]=n,e[14]=d,e[15]=x):x=e[15],x}function yl(a){return{id:a.name,name:a.name,description:a.description,tags:t.jsx(Bs,{annotations:a.annotations,_meta:a._meta})}}function wl(a){const e=Y.c(16),{connectionId:s,selections:n,onToggle:i,disabled:l}=a,{org:c}=Ae();let r;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(r={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=r):r=e[3];const f=yt(r);let o;e[4]!==f?(o={client:f},e[4]=f,e[5]=o):o=e[5];const{data:p}=gn(o);let m;e[6]!==p.resources?(m=p.resources.map(Sl),e[6]=p.resources,e[7]=m):m=e[7];const u=m,h=X();let d;e[8]!==h?(d=h("virtualMcp.dependencySelectionDialog.noResourcesAvailable"),e[8]=h,e[9]=d):d=e[9];let x;return e[10]!==l||e[11]!==u||e[12]!==i||e[13]!==n||e[14]!==d?(x=t.jsx(Ut,{items:u,selections:n,onToggle:i,emptyMessage:d,disabled:l}),e[10]=l,e[11]=u,e[12]=i,e[13]=n,e[14]=d,e[15]=x):x=e[15],x}function Sl(a){return{id:a.name||a.uri,name:a.name||a.uri,description:a.description}}function Nl(a){const e=Y.c(16),{connectionId:s,selections:n,onToggle:i,disabled:l}=a,{org:c}=Ae();let r;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(r={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=r):r=e[3];const f=yt(r);let o;e[4]!==f?(o={client:f},e[4]=f,e[5]=o):o=e[5];const{data:p}=Fi(o);let m;e[6]!==p.prompts?(m=p.prompts.map(Cl),e[6]=p.prompts,e[7]=m):m=e[7];const u=m,h=X();let d;e[8]!==h?(d=h("virtualMcp.dependencySelectionDialog.noPromptsAvailable"),e[8]=h,e[9]=d):d=e[9];let x;return e[10]!==l||e[11]!==u||e[12]!==i||e[13]!==n||e[14]!==d?(x=t.jsx(Ut,{items:u,selections:n,onToggle:i,emptyMessage:d,disabled:l}),e[10]=l,e[11]=u,e[12]=i,e[13]=n,e[14]=d,e[15]=x):x=e[15],x}function Cl(a){return{id:a.name,name:a.name,description:a.description}}function kl(a){const e=Y.c(58),{currentConnection:s,activeTab:n,selectedId:i,formData:l,toggleTool:c,toggleResource:r,togglePrompt:f,toggleAllTools:o,toggleAllResources:p,toggleAllPrompts:m,onTabChange:u}=a,h=X(),d=l[i],x=n==="tools"?d?.tools===null:n==="resources"?d?.resources===null:n==="prompts"?d?.prompts===null:!1,g=n!=="active";let v;e[0]!==n||e[1]!==i||e[2]!==m||e[3]!==p||e[4]!==o?(v=()=>{n==="tools"?o(i):n==="resources"?p(i):n==="prompts"&&m(i)},e[0]=n,e[1]=i,e[2]=m,e[3]=p,e[4]=o,e[5]=v):v=e[5];const j=v;let y;e[6]!==s.icon||e[7]!==s.title?(y=t.jsx(jt,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0"}),e[6]=s.icon,e[7]=s.title,e[8]=y):y=e[8];let b;e[9]!==s.title?(b=t.jsx("h2",{className:"text-base font-semibold truncate",children:s.title}),e[9]=s.title,e[10]=b):b=e[10];let w;e[11]!==s.description?(w=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[11]=s.description,e[12]=w):w=e[12];let S;e[13]!==b||e[14]!==w?(S=t.jsxs("div",{className:"flex-1 min-w-0",children:[b,w]}),e[13]=b,e[14]=w,e[15]=S):S=e[15];let C;e[16]!==y||e[17]!==S?(C=t.jsx("div",{className:"px-6 pt-5 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[y,S]})}),e[16]=y,e[17]=S,e[18]=C):C=e[18];let N;e[19]!==n||e[20]!==j||e[21]!==x||e[22]!==u||e[23]!==g?(N=t.jsx(hl,{activeTab:n,onTabChange:u,showSelectAll:g,isAllSelected:x,handleSelectAll:j}),e[19]=n,e[20]=j,e[21]=x,e[22]=u,e[23]=g,e[24]=N):N=e[24];let k;e[25]!==n||e[26]!==l||e[27]!==i||e[28]!==h||e[29]!==c?(k=n==="active"&&t.jsx(Xe,{fallback:ct(h("virtualMcp.dependencySelectionDialog.toolsNotSupported"),h),children:t.jsx(q.Suspense,{fallback:t.jsx(st,{}),children:t.jsx(gl,{connectionId:i,toolSelections:l[i]?l[i].tools:[],onToggleTool:(A,P)=>c(i,A,P)})})}),e[25]=n,e[26]=l,e[27]=i,e[28]=h,e[29]=c,e[30]=k):k=e[30];let V;e[31]!==n||e[32]!==l||e[33]!==i||e[34]!==h||e[35]!==c?(V=n==="tools"&&t.jsx(Xe,{fallback:ct(h("virtualMcp.dependencySelectionDialog.toolsNotSupported"),h),children:t.jsx(q.Suspense,{fallback:t.jsx(st,{}),children:t.jsx(jl,{connectionId:i,selections:l[i]?l[i].tools:[],onToggle:(A,P)=>c(i,A,P)})})}),e[31]=n,e[32]=l,e[33]=i,e[34]=h,e[35]=c,e[36]=V):V=e[36];let T;e[37]!==n||e[38]!==l||e[39]!==i||e[40]!==h||e[41]!==r?(T=n==="resources"&&t.jsx(Xe,{fallback:ct(h("virtualMcp.dependencySelectionDialog.resourcesNotSupported"),h),children:t.jsx(q.Suspense,{fallback:t.jsx(st,{}),children:t.jsx(wl,{connectionId:i,selections:l[i]?l[i].resources:[],onToggle:(A,P)=>r(i,A,P)})})}),e[37]=n,e[38]=l,e[39]=i,e[40]=h,e[41]=r,e[42]=T):T=e[42];let _;e[43]!==n||e[44]!==l||e[45]!==i||e[46]!==h||e[47]!==f?(_=n==="prompts"&&t.jsx(Xe,{fallback:ct(h("virtualMcp.dependencySelectionDialog.promptsNotSupported"),h),children:t.jsx(q.Suspense,{fallback:t.jsx(st,{}),children:t.jsx(Nl,{connectionId:i,selections:l[i]?l[i].prompts:[],onToggle:(A,P)=>f(i,A,P)})})}),e[43]=n,e[44]=l,e[45]=i,e[46]=h,e[47]=f,e[48]=_):_=e[48];let F;e[49]!==T||e[50]!==_||e[51]!==k||e[52]!==V?(F=t.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[k,V,T,_]}),e[49]=T,e[50]=_,e[51]=k,e[52]=V,e[53]=F):F=e[53];let $;return e[54]!==F||e[55]!==C||e[56]!==N?($=t.jsxs(t.Fragment,{children:[C,N,F]}),e[54]=F,e[55]=C,e[56]=N,e[57]=$):$=e[57],$}function Ml(a){const e=Y.c(7),{onClose:s}=a,n=X();let i;e[0]!==s?(i=()=>s(!1),e[0]=s,e[1]=i):i=e[1];let l;e[2]!==n?(l=n("virtualMcp.dependencySelectionDialog.done"),e[2]=n,e[3]=l):l=e[3];let c;return e[4]!==i||e[5]!==l?(c=t.jsx($t,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(Z,{variant:"outline",onClick:i,children:l})}),e[4]=i,e[5]=l,e[6]=c):c=e[6],c}function _l(a){const e=Y.c(23),{connectionId:s,onAuthenticate:n,children:i}=a,l=X();let c;e[0]!==s?(c={connectionId:s},e[0]=s,e[1]=c):c=e[1];const r=Ys(c);if(r.supportsOAuth&&!r.isAuthenticated){let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex items-center justify-center size-12 rounded-full bg-muted",children:t.jsx(mi,{size:22,className:"text-muted-foreground"})}),e[2]=p):p=e[2];let m;e[3]!==l?(m=l("virtualMcp.dependencySelectionDialog.authorizationRequired"),e[3]=l,e[4]=m):m=e[4];let u;e[5]!==m?(u=t.jsx("p",{className:"text-sm font-medium",children:m}),e[5]=m,e[6]=u):u=e[6];let h;e[7]!==l?(h=l("virtualMcp.dependencySelectionDialog.authorizationDescription"),e[7]=l,e[8]=h):h=e[8];let d;e[9]!==h?(d=t.jsx("p",{className:"text-xs text-muted-foreground max-w-xs",children:h}),e[9]=h,e[10]=d):d=e[10];let x;e[11]!==u||e[12]!==d?(x=t.jsxs("div",{className:"space-y-1",children:[u,d]}),e[11]=u,e[12]=d,e[13]=x):x=e[13];let g;e[14]!==s||e[15]!==n||e[16]!==l?(g=n&&t.jsx(Z,{variant:"outline",size:"sm",onClick:()=>n(s),children:l("virtualMcp.dependencySelectionDialog.authorize")}),e[14]=s,e[15]=n,e[16]=l,e[17]=g):g=e[17];let v;return e[18]!==x||e[19]!==g?(v=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-8 text-center",children:[p,x,g]}),e[18]=x,e[19]=g,e[20]=v):v=e[20],v}let o;return e[21]!==i?(o=t.jsx(t.Fragment,{children:i}),e[21]=i,e[22]=o):o=e[22],o}function Vl(a){const e={};for(const s of a)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function gs(a){return Object.entries(a).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function vs(a,e,s,n){const i=a[e]??{tools:null,resources:null,prompts:null};return{...a,[e]:{...i,[s]:n}}}function Tl(a,e){return e.type==="SET_ACTIVE_TAB"?{...a,activeTab:e.payload}:a}function Dl(a){const e=Y.c(49),{open:s,onOpenChange:n,selectedId:i,form:l,connections:c,onAuthenticate:r}=a;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={activeTab:"tools"},e[0]=f):f=e[0];const[o,p]=q.useReducer(Tl,f),m=Rt(i??"");let u;e[1]!==c?(u=c??[],e[1]=c,e[2]=u):u=e[2];let h;e[3]!==u?(h=Vl(u),e[3]=u,e[4]=h):h=e[4];const d=h;let x;e[5]!==l||e[6]!==d?(x=(E,L,G,J)=>{const ee=d[E]?.[L];let M;ee===null?M=J.filter(O=>O!==G):ee?.includes(G)?M=ee.filter(O=>O!==G):(M=[...ee??[],G],M.length===J.length&&(M=null)),l.setValue("connections",gs(vs(d,E,L,M)),{shouldDirty:!0,shouldTouch:!0})},e[5]=l,e[6]=d,e[7]=x):x=e[7];const g=x;let v;e[8]!==l||e[9]!==d?(v=(E,L)=>{const J=d[E]?.[L]===null?[]:null;l.setValue("connections",gs(vs(d,E,L,J)),{shouldDirty:!0,shouldTouch:!0})},e[8]=l,e[9]=d,e[10]=v):v=e[10];const j=v;let y;e[11]!==g?(y=(E,L,G)=>g(E,"tools",L,G),e[11]=g,e[12]=y):y=e[12];const b=y;let w;e[13]!==g?(w=(E,L,G)=>g(E,"resources",L,G),e[13]=g,e[14]=w):w=e[14];const S=w;let C;e[15]!==g?(C=(E,L,G)=>g(E,"prompts",L,G),e[15]=g,e[16]=C):C=e[16];const N=C;let k;e[17]!==j?(k=E=>j(E,"tools"),e[17]=j,e[18]=k):k=e[18];const V=k;let T;e[19]!==j?(T=E=>j(E,"resources"),e[19]=j,e[20]=T):T=e[20];const _=T;let F;e[21]!==j?(F=E=>j(E,"prompts"),e[21]=j,e[22]=F):F=e[22];const $=F;if(!i||!m)return null;let A;e[23]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(st,{}),e[23]=A):A=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=E=>p({type:"SET_ACTIVE_TAB",payload:E}),e[24]=P):P=e[24];let H;e[25]!==m||e[26]!==o.activeTab||e[27]!==d||e[28]!==i||e[29]!==$||e[30]!==_||e[31]!==V||e[32]!==N||e[33]!==S||e[34]!==b?(H=t.jsx(kl,{currentConnection:m,activeTab:o.activeTab,selectedId:i,formData:d,toggleTool:b,toggleResource:S,togglePrompt:N,toggleAllTools:V,toggleAllResources:_,toggleAllPrompts:$,onTabChange:P},i),e[25]=m,e[26]=o.activeTab,e[27]=d,e[28]=i,e[29]=$,e[30]=_,e[31]=V,e[32]=N,e[33]=S,e[34]=b,e[35]=H):H=e[35];let Q;e[36]!==r||e[37]!==i||e[38]!==H?(Q=t.jsx(q.Suspense,{fallback:A,children:t.jsx(_l,{connectionId:i,onAuthenticate:r,children:H})}),e[36]=r,e[37]=i,e[38]=H,e[39]=Q):Q=e[39];let R;e[40]!==n?(R=t.jsx(Ml,{onClose:n}),e[40]=n,e[41]=R):R=e[41];let z;e[42]!==Q||e[43]!==R?(z=t.jsxs(at,{className:"sm:max-w-2xl h-[75vh] max-h-[75vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[Q,R]}),e[42]=Q,e[43]=R,e[44]=z):z=e[44];let K;return e[45]!==n||e[46]!==s||e[47]!==z?(K=t.jsx(lt,{open:s,onOpenChange:n,children:z}),e[45]=n,e[46]=s,e[47]=z,e[48]=K):K=e[48],K}const bs="__new_instance__";function Pl(a){const e=Y.c(25),{connection_id:s,usedConnectionIds:n,onOpenSettings:i,onRemove:l,onAuthenticate:c,onSwitchInstance:r,onNewInstance:f}=a,o=Rt(s),{org:p}=Ae();if(!o){let g;return e[0]!==l?(g=t.jsx(Fl,{onRemove:l}),e[0]=l,e[1]=g):g=e[1],g}let m;e[2]!==o?(m=Ai(o),e[2]=o,e[3]=m):m=e[3];const u=m;let h;e[4]!==s?(h=t.jsx($l,{connection_id:s}),e[4]=s,e[5]=h):h=e[5];let d;e[6]!==o.app_name||e[7]!==o.connection_type||e[8]!==o.description||e[9]!==o.icon||e[10]!==o.status||e[11]!==o.title||e[12]!==s||e[13]!==c||e[14]!==f||e[15]!==i||e[16]!==l||e[17]!==r||e[18]!==p.slug||e[19]!==u||e[20]!==n?(d=t.jsx(Il,{connection_id:s,connectionTitle:o.title,connectionDescription:o.description,connectionIcon:o.icon,connectionType:o.connection_type,connectionStatus:o.status,slug:u,orgSlug:p.slug,appName:o.app_name,usedConnectionIds:n,onOpenSettings:i,onRemove:l,onAuthenticate:c,onSwitchInstance:r,onNewInstance:f}),e[6]=o.app_name,e[7]=o.connection_type,e[8]=o.description,e[9]=o.icon,e[10]=o.status,e[11]=o.title,e[12]=s,e[13]=c,e[14]=f,e[15]=i,e[16]=l,e[17]=r,e[18]=p.slug,e[19]=u,e[20]=n,e[21]=d):d=e[21];let x;return e[22]!==h||e[23]!==d?(x=t.jsx(q.Suspense,{fallback:h,children:d}),e[22]=h,e[23]=d,e[24]=x):x=e[24],x}function Ol(a){const e=Y.c(24),{appName:s,connectionId:n,usedConnectionIds:i,onSwitchInstance:l,onNewInstance:c}=a,r=X();let f;e[0]!==s?(f={filters:[{column:"app_name",value:s}]},e[0]=s,e[1]=f):f=e[1];const o=ai(f);if(o.length<=1&&!c)return null;let p;e[2]!==n||e[3]!==c||e[4]!==l?(p=g=>{g===bs?c?.():l(n,g)},e[2]=n,e[3]=c,e[4]=l,e[5]=p):p=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Ee,{size:"xs",className:"w-auto gap-1 shadow-none",children:t.jsx(ze,{})}),e[6]=m):m=e[6];let u;if(e[7]!==n||e[8]!==o||e[9]!==i){let g;e[11]!==n||e[12]!==i?(g=v=>t.jsx(Se,{value:v.id,className:"text-xs",disabled:v.id!==n&&i.has(v.id),children:v.title},v.id),e[11]=n,e[12]=i,e[13]=g):g=e[13],u=o.map(g),e[7]=n,e[8]=o,e[9]=i,e[10]=u}else u=e[10];let h;e[14]!==c||e[15]!==r?(h=c&&t.jsxs(Se,{value:bs,className:"text-xs text-muted-foreground",children:["+ ",r("virtualMcp.connectionItem.newInstance")]}),e[14]=c,e[15]=r,e[16]=h):h=e[16];let d;e[17]!==u||e[18]!==h?(d=t.jsxs(Re,{children:[u,h]}),e[17]=u,e[18]=h,e[19]=d):d=e[19];let x;return e[20]!==n||e[21]!==p||e[22]!==d?(x=t.jsxs(Le,{value:n,onValueChange:p,children:[m,d]}),e[20]=n,e[21]=p,e[22]=d,e[23]=x):x=e[23],x}function Il({connection_id:a,connectionTitle:e,connectionDescription:s,connectionIcon:n,connectionType:i,connectionStatus:l,slug:c,orgSlug:r,appName:f,usedConnectionIds:o,onOpenSettings:p,onRemove:m,onAuthenticate:u,onSwitchInstance:h,onNewInstance:d}){const x=Ys({connectionId:a}),g=$s(),j=!(i==="VIRTUAL")&&x.supportsOAuth&&!x.isAuthenticated,y=l!=="active",b=X(),w=async S=>{try{await g.update.mutateAsync({id:a,data:{status:S}}),ie.success(b(S==="active"?"virtualMcp.connectionItem.connectionEnabled":"virtualMcp.connectionItem.connectionDisabled"))}catch{ie.error(b("virtualMcp.connectionItem.failedToUpdateConnection"))}};return t.jsxs("div",{className:ye("surface overflow-hidden transition-colors",(j||y)&&"shadow-edge-destructive bg-destructive/5"),children:[t.jsxs(Ft,{to:"/$org/settings/connections/$appSlug",params:{org:r,appSlug:c},className:"flex items-center gap-3 px-4 py-3 cursor-pointer hover:bg-accent transition-colors",children:[t.jsx(jt,{icon:n,name:e,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:e}),j?t.jsx("span",{className:"text-xs text-destructive font-medium",children:b("virtualMcp.connectionItem.needsAuthorization")}):y?t.jsx("span",{className:"text-xs text-destructive font-medium",children:b(l==="error"?"virtualMcp.connectionItem.disabledError":"virtualMcp.connectionItem.disabled")}):s&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s})]}),j?t.jsx(Z,{variant:"outline",size:"sm",className:"shrink-0",onClick:S=>{S.preventDefault(),S.stopPropagation(),u(a)},children:b("virtualMcp.connectionItem.authorize")}):y?t.jsxs(Z,{variant:"outline",size:"sm",className:"gap-1.5 shrink-0",onClick:S=>{S.preventDefault(),S.stopPropagation(),w("active")},children:[t.jsx(fi,{size:13}),b("virtualMcp.connectionItem.enable")]}):t.jsxs(Ve,{delayDuration:0,children:[t.jsx(Te,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center rounded-md h-7 w-7 hover:bg-accent text-muted-foreground shrink-0 transition-colors",children:t.jsx(ci,{size:16})})}),t.jsx(De,{side:"bottom",children:b("virtualMcp.connectionItem.connectionSettings")})]})]}),t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-t border-border bg-muted/25",children:[f&&t.jsx(Ol,{appName:f,connectionId:a,usedConnectionIds:o,onSwitchInstance:h,onNewInstance:d}),t.jsxs("div",{className:"flex items-center gap-0.5 ml-auto",children:[t.jsxs(Ve,{delayDuration:0,children:[t.jsx(Te,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon-sm",onClick:p,"aria-label":b("virtualMcp.connectionItem.configureResources"),children:t.jsx(pi,{size:13})})}),t.jsx(De,{side:"bottom",children:b("virtualMcp.connectionItem.configureResources")})]}),!y&&t.jsxs(Ve,{delayDuration:0,children:[t.jsx(Te,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground",onClick:()=>w("inactive"),"aria-label":b("virtualMcp.connectionItem.disableConnection"),children:t.jsx(hi,{size:13})})}),t.jsx(De,{side:"bottom",children:b("virtualMcp.connectionItem.disable")})]}),t.jsxs(Ve,{delayDuration:0,children:[t.jsx(Te,{asChild:!0,children:t.jsx(Z,{variant:"ghost-destructive",size:"icon-sm",onClick:m,"aria-label":b("virtualMcp.connectionItem.removeConnection"),children:t.jsx(Ks,{size:13})})}),t.jsx(De,{side:"bottom",children:b("virtualMcp.connectionItem.remove")})]})]})]})]})}function $l(a){const e=Y.c(17),{connection_id:s}=a,n=Rt(s);if(!n){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(rn,{}),e[0]=m):m=e[0],m}let i;e[1]!==n.icon||e[2]!==n.title?(i=t.jsx(jt,{icon:n.icon,name:n.title,size:"sm",className:"shrink-0"}),e[1]=n.icon,e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==n.title?(l=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[4]=n.title,e[5]=l):l=e[5];let c;e[6]!==n.description?(c=n.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[6]=n.description,e[7]=c):c=e[7];let r;e[8]!==l||e[9]!==c?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,c]}),e[8]=l,e[9]=c,e[10]=r):r=e[10];let f;e[11]!==i||e[12]!==r?(f=t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[i,r]}),e[11]=i,e[12]=r,e[13]=f):f=e[13];let o;e[14]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex items-center px-4 py-2 border-t border-border bg-muted/25",children:t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"})}),e[14]=o):o=e[14];let p;return e[15]!==f?(p=t.jsxs("div",{className:"surface overflow-hidden",children:[f,o]}),e[15]=f,e[16]=p):p=e[16],p}function Fl(a){const e=Y.c(20),{onRemove:s}=a,n=X();let i;e[0]!==n?(i=n("virtualMcp.connectionItem.connectionNotFound"),e[0]=n,e[1]=i):i=e[1];let l;e[2]!==i?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm text-destructive font-medium truncate",children:i})}),e[2]=i,e[3]=l):l=e[3];let c;e[4]!==n?(c=n("virtualMcp.connectionItem.removeConnection"),e[4]=n,e[5]=c):c=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ks,{size:13}),e[6]=r):r=e[6];let f;e[7]!==s||e[8]!==c?(f=t.jsx(Te,{asChild:!0,children:t.jsx(Z,{variant:"ghost-destructive",size:"icon-sm",className:"shrink-0",onClick:s,"aria-label":c,children:r})}),e[7]=s,e[8]=c,e[9]=f):f=e[9];let o;e[10]!==n?(o=n("virtualMcp.connectionItem.remove"),e[10]=n,e[11]=o):o=e[11];let p;e[12]!==o?(p=t.jsx(De,{side:"bottom",children:o}),e[12]=o,e[13]=p):p=e[13];let m;e[14]!==f||e[15]!==p?(m=t.jsxs(Ve,{delayDuration:0,children:[f,p]}),e[14]=f,e[15]=p,e[16]=m):m=e[16];let u;return e[17]!==l||e[18]!==m?(u=t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 rounded-xl border border-destructive/50 bg-destructive/5",children:[l,m]}),e[17]=l,e[18]=m,e[19]=u):u=e[19],u}function rn(){const a=Y.c(3);let e;a[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"size-8 rounded-md bg-muted animate-pulse shrink-0"}),a[0]=e):e=a[0];let s;a[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[e,t.jsxs("div",{className:"flex-1 space-y-1.5",children:[t.jsx("div",{className:"h-4 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-48 rounded bg-muted animate-pulse"})]})]}),a[1]=s):s=a[1];let n;return a[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"surface overflow-hidden",children:[s,t.jsx("div",{className:"flex items-center px-4 py-2 border-t border-border bg-muted/25",children:t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"})})]}),a[2]=n):n=a[2],n}function on(a){const e=Y.c(85),{value:s,onChange:n,onColorChange:i,name:l,size:c,className:r,avatarClassName:f,showHoverOverlay:o,disabled:p}=a,m=c===void 0?"lg":c,u=o===void 0?!0:o,h=p===void 0?!1:p,d=X(),[x,g]=q.useState(!1),[v,j]=q.useState("icons"),[y,b]=q.useState(""),[w,S]=q.useState("blue");let C;e[0]!==s?(C=xi(s),e[0]=s,e[1]=C):C=e[1];const N=C,k=N.type==="icon"||N.type==="url"&&N.color?N.color:w;let V;e[2]!==n||e[3]!==k?(V=he=>{n(kt(he,k))},e[2]=n,e[3]=k,e[4]=V):V=e[4];const T=V;let _;e[5]!==n||e[6]!==i||e[7]!==N.name||e[8]!==N.type||e[9]!==N.url?(_=he=>{S(he),i?.(he),N.type==="icon"?n(kt(N.name,he)):N.type==="url"&&n(es(N.url,he))},e[5]=n,e[6]=i,e[7]=N.name,e[8]=N.type,e[9]=N.url,e[10]=_):_=e[10];const F=_;let $;e[11]!==n||e[12]!==k?($=he=>{n(es(he,k)),g(!1)},e[11]=n,e[12]=k,e[13]=$):$=e[13];const A=$;let P;e[14]!==n||e[15]!==k?(P=()=>{const he=zs(),D=he[Math.floor(Math.random()*he.length)];n(kt(D,k))},e[14]=n,e[15]=k,e[16]=P):P=e[16];const H=P,Q=h?!1:x;let R;e[17]!==d?(R=d("common.iconPicker.changeIcon"),e[17]=d,e[18]=R):R=e[18];const z=h?"cursor-default opacity-50":"cursor-pointer";let K;e[19]!==r||e[20]!==m||e[21]!==z?(K=ye("relative group overflow-hidden",z,gi(m),r),e[19]=r,e[20]=m,e[21]=z,e[22]=K):K=e[22];let E;e[23]!==f||e[24]!==l||e[25]!==m||e[26]!==s?(E=t.jsx(ts,{icon:s,name:l,size:m,className:f}),e[23]=f,e[24]=l,e[25]=m,e[26]=s,e[27]=E):E=e[27];let L;e[28]!==h||e[29]!==u?(L=u&&!h&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(yi,{size:16,className:"text-white"})}),e[28]=h,e[29]=u,e[30]=L):L=e[30];let G;e[31]!==h||e[32]!==R||e[33]!==K||e[34]!==E||e[35]!==L?(G=t.jsx(Gs,{asChild:!0,children:t.jsxs("button",{type:"button","data-testid":"icon-picker-trigger","aria-label":R,disabled:h,className:K,children:[E,L]})}),e[31]=h,e[32]=R,e[33]=K,e[34]=E,e[35]=L,e[36]=G):G=e[36];let J;e[37]!==l||e[38]!==s?(J=t.jsx("div",{className:"flex items-center justify-center py-4",children:t.jsx(ts,{icon:s,name:l,size:"xl"})}),e[37]=l,e[38]=s,e[39]=J):J=e[39];let ee;e[40]!==v?(ee=he=>{if(he.key!=="ArrowLeft"&&he.key!=="ArrowRight")return;he.preventDefault();const D=v==="icons"?"upload":"icons";j(D),document.getElementById(`icon-picker-tab-${D}`)?.focus()},e[40]=v,e[41]=ee):ee=e[41];const M=v==="icons",O=v==="icons"?0:-1;let U;e[42]===Symbol.for("react.memo_cache_sentinel")?(U=()=>j("icons"),e[42]=U):U=e[42];const B=v==="icons"?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground";let W;e[43]!==B?(W=ye("px-3 py-2 text-sm font-medium border-b-2 -mb-px transition-colors",B),e[43]=B,e[44]=W):W=e[44];let re;e[45]!==d?(re=d("common.iconPicker.iconsTab"),e[45]=d,e[46]=re):re=e[46];let oe;e[47]!==M||e[48]!==O||e[49]!==W||e[50]!==re?(oe=t.jsx("button",{id:"icon-picker-tab-icons",type:"button",role:"tab","aria-selected":M,"aria-controls":"icon-picker-panel-icons",tabIndex:O,onClick:U,className:W,children:re}),e[47]=M,e[48]=O,e[49]=W,e[50]=re,e[51]=oe):oe=e[51];const me=v==="upload",ne=v==="upload"?0:-1;let ue;e[52]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>j("upload"),e[52]=ue):ue=e[52];const fe=v==="upload"?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground";let pe;e[53]!==fe?(pe=ye("px-3 py-2 text-sm font-medium border-b-2 -mb-px transition-colors",fe),e[53]=fe,e[54]=pe):pe=e[54];let ce;e[55]!==d?(ce=d("common.iconPicker.uploadTab"),e[55]=d,e[56]=ce):ce=e[56];let ge;e[57]!==me||e[58]!==ne||e[59]!==pe||e[60]!==ce?(ge=t.jsx("button",{id:"icon-picker-tab-upload",type:"button",role:"tab","aria-selected":me,"aria-controls":"icon-picker-panel-upload",tabIndex:ne,onClick:ue,className:pe,children:ce}),e[57]=me,e[58]=ne,e[59]=pe,e[60]=ce,e[61]=ge):ge=e[61];let je;e[62]===Symbol.for("react.memo_cache_sentinel")?(je=t.jsx("div",{className:"flex-1"}),e[62]=je):je=e[62];let de;e[63]!==ee||e[64]!==oe||e[65]!==ge?(de=t.jsxs("div",{role:"tablist","aria-label":"Icon source",className:"flex items-center border-b border-border px-3",onKeyDown:ee,children:[oe,ge,je]}),e[63]=ee,e[64]=oe,e[65]=ge,e[66]=de):de=e[66];let I;e[67]!==F||e[68]!==H||e[69]!==T||e[70]!==A||e[71]!==N.name||e[72]!==N.type||e[73]!==y||e[74]!==k||e[75]!==v?(I=v==="icons"?t.jsx("div",{id:"icon-picker-panel-icons",role:"tabpanel","aria-labelledby":"icon-picker-tab-icons",children:t.jsx(Rl,{search:y,onSearchChange:b,selectedColor:k,onColorChange:F,onSelectIcon:T,onRandom:H,currentIconName:N.type==="icon"?N.name:null})}):t.jsx("div",{id:"icon-picker-panel-upload",role:"tabpanel","aria-labelledby":"icon-picker-tab-upload",children:t.jsx(Ll,{onUpload:A})}),e[67]=F,e[68]=H,e[69]=T,e[70]=A,e[71]=N.name,e[72]=N.type,e[73]=y,e[74]=k,e[75]=v,e[76]=I):I=e[76];let te;e[77]!==J||e[78]!==de||e[79]!==I?(te=t.jsx(qs,{align:"start",className:"w-80 p-0",onOpenAutoFocus:Al,children:t.jsxs("div",{className:"flex flex-col",children:[J,de,I]})}),e[77]=J,e[78]=de,e[79]=I,e[80]=te):te=e[80];let Pe;return e[81]!==G||e[82]!==te||e[83]!==Q?(Pe=t.jsxs(Hs,{open:Q,onOpenChange:g,children:[G,te]}),e[81]=G,e[82]=te,e[83]=Q,e[84]=Pe):Pe=e[84],Pe}function Al(a){return a.preventDefault()}function El(a){const e=Y.c(33),{selectedColor:s,onColorChange:n}=a,i=X(),[l,c]=q.useState(!1);let r,f,o,p,m,u,h;if(e[0]!==l||e[1]!==s){const w=Rs(s);f=Hs,u=l,h=c,r=Gs,m=!0,o="button",p=ye("h-6 w-6 rounded-full shrink-0 ring-2 ring-offset-2 ring-offset-background transition-all cursor-pointer hover:scale-110",w.dot,"ring-foreground/20"),e[0]=l,e[1]=s,e[2]=r,e[3]=f,e[4]=o,e[5]=p,e[6]=m,e[7]=u,e[8]=h}else r=e[2],f=e[3],o=e[4],p=e[5],m=e[6],u=e[7],h=e[8];let d;e[9]!==i?(d=i("common.iconPicker.changeColor"),e[9]=i,e[10]=d):d=e[10];let x;e[11]!==i?(x=i("common.iconPicker.changeColor"),e[11]=i,e[12]=x):x=e[12];let g;e[13]!==o||e[14]!==p||e[15]!==d||e[16]!==x?(g=t.jsx("button",{type:o,className:p,title:d,"aria-label":x}),e[13]=o,e[14]=p,e[15]=d,e[16]=x,e[17]=g):g=e[17];let v;e[18]!==r||e[19]!==m||e[20]!==g?(v=t.jsx(r,{asChild:m,children:g}),e[18]=r,e[19]=m,e[20]=g,e[21]=v):v=e[21];let j;e[22]!==n||e[23]!==s?(j=Si.map(w=>t.jsx("button",{type:"button",onClick:()=>{n(w.name),c(!1)},className:ye("h-5 w-5 rounded-full transition-all shrink-0 cursor-pointer",w.dot,s===w.name?"ring-2 ring-offset-1 ring-offset-background ring-foreground/30 scale-110":"hover:scale-110"),title:w.name,"aria-label":w.name},w.name)),e[22]=n,e[23]=s,e[24]=j):j=e[24];let y;e[25]!==j?(y=t.jsx(qs,{align:"start",side:"right",sideOffset:8,className:"w-auto p-2",onOpenAutoFocus:zl,children:t.jsx("div",{className:"grid grid-cols-4 gap-1",children:j})}),e[25]=j,e[26]=y):y=e[26];let b;return e[27]!==f||e[28]!==y||e[29]!==u||e[30]!==h||e[31]!==v?(b=t.jsxs(f,{open:u,onOpenChange:h,children:[v,y]}),e[27]=f,e[28]=y,e[29]=u,e[30]=h,e[31]=v,e[32]=b):b=e[32],b}function zl(a){return a.preventDefault()}function Rl(a){const e=Y.c(55),{search:s,onSearchChange:n,selectedColor:i,onColorChange:l,onSelectIcon:c,onRandom:r,currentIconName:f}=a,o=X();let p,m,u,h,d,x,g;if(e[0]!==f||e[1]!==l||e[2]!==r||e[3]!==n||e[4]!==c||e[5]!==s||e[6]!==i||e[7]!==o){const w=zs(),S=Rs(i);m=vi(w,s),x="flex flex-col";let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Dt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none"}),e[15]=C):C=e[15];let N;e[16]!==n?(N=P=>n(P.target.value),e[16]=n,e[17]=N):N=e[17];let k;e[18]!==o?(k=o("common.iconPicker.filterPlaceholder"),e[18]=o,e[19]=k):k=e[19];let V;e[20]!==s||e[21]!==N||e[22]!==k?(V=t.jsxs("div",{className:"relative flex-1",children:[C,t.jsx(Ne,{value:s,onChange:N,placeholder:k,size:"sm",className:"text-xs pl-7"})]}),e[20]=s,e[21]=N,e[22]=k,e[23]=V):V=e[23];let T;e[24]!==o?(T=o("common.iconPicker.randomIcon"),e[24]=o,e[25]=T):T=e[25];let _;e[26]!==o?(_=o("common.iconPicker.randomIcon"),e[26]=o,e[27]=_):_=e[27];let F;e[28]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(wi,{className:"size-3.5 text-muted-foreground"}),e[28]=F):F=e[28];let $;e[29]!==r||e[30]!==T||e[31]!==_?($=t.jsx(Z,{type:"button",variant:"outline",size:"icon",onClick:r,className:"shrink-0",title:T,"aria-label":_,children:F}),e[29]=r,e[30]=T,e[31]=_,e[32]=$):$=e[32];let A;e[33]!==l||e[34]!==i?(A=t.jsx(El,{selectedColor:i,onColorChange:l}),e[33]=l,e[34]=i,e[35]=A):A=e[35],e[36]!==$||e[37]!==A||e[38]!==V?(g=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[V,$,A]}),e[36]=$,e[37]=A,e[38]=V,e[39]=g):g=e[39],p=Ei,d="h-56",u="grid grid-cols-9 gap-0.5 px-2 pb-2",h=m.map(P=>{const H=bi(P);return H?t.jsx("button",{type:"button",onClick:()=>c(P),className:ye("h-8 w-8 flex items-center justify-center rounded-lg transition-colors cursor-pointer",f===P?ye(S.bg,S.text):ye(S.text,"hover:bg-accent")),title:P,"aria-label":ji(P),children:t.jsx(H,{size:18})},P):null}),e[0]=f,e[1]=l,e[2]=r,e[3]=n,e[4]=c,e[5]=s,e[6]=i,e[7]=o,e[8]=p,e[9]=m,e[10]=u,e[11]=h,e[12]=d,e[13]=x,e[14]=g}else p=e[8],m=e[9],u=e[10],h=e[11],d=e[12],x=e[13],g=e[14];let v;e[40]!==u||e[41]!==h?(v=t.jsx("div",{className:u,children:h}),e[40]=u,e[41]=h,e[42]=v):v=e[42];let j;e[43]!==m.length||e[44]!==o?(j=m.length===0&&t.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:o("common.iconPicker.noIconsFound")}),e[43]=m.length,e[44]=o,e[45]=j):j=e[45];let y;e[46]!==p||e[47]!==d||e[48]!==v||e[49]!==j?(y=t.jsxs(p,{className:d,children:[v,j]}),e[46]=p,e[47]=d,e[48]=v,e[49]=j,e[50]=y):y=e[50];let b;return e[51]!==x||e[52]!==g||e[53]!==y?(b=t.jsxs("div",{className:x,children:[g,y]}),e[51]=x,e[52]=g,e[53]=y,e[54]=b):b=e[54],b}function Ll(a){const e=Y.c(46),{onUpload:s}=a,n=X(),i=q.useRef(null);let l;e[0]!==s||e[1]!==n?(l=$=>{const A=$.target.files?.[0];if(!A)return;if(A.size>2097152){ie.error(n("common.iconPicker.imageTooLarge")),$.target.value="";return}const P=new FileReader;P.onerror=()=>{ie.error(n("common.iconPicker.failedToReadImage")),i.current&&(i.current.value="")},P.onloadend=()=>{P.readyState===FileReader.DONE&&P.result&&s(P.result),i.current&&(i.current.value="")},P.readAsDataURL(A)},e[0]=s,e[1]=n,e[2]=l):l=e[2];const c=l,[r,f]=q.useState("");let o;e[3]!==s||e[4]!==r?(o=()=>{const $=r.trim();$&&(s($),f(""))},e[3]=s,e[4]=r,e[5]=o):o=e[5];const p=o;let m;e[6]!==c?(m=t.jsx("input",{type:"file",ref:i,className:"hidden",accept:"image/*",onChange:c}),e[6]=c,e[7]=m):m=e[7];let u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=()=>i.current?.click(),e[8]=u):u=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(zi,{size:20}),e[9]=h):h=e[9];let d;e[10]!==n?(d=n("common.iconPicker.uploadHint"),e[10]=n,e[11]=d):d=e[11];let x;e[12]!==d?(x=t.jsxs("button",{type:"button",onClick:u,className:"h-24 rounded-lg border-2 border-dashed border-border hover:border-foreground/50 hover:bg-accent transition-colors flex flex-col items-center justify-center gap-2 text-muted-foreground hover:text-foreground",children:[h,t.jsx("span",{className:"text-xs",children:d})]}),e[12]=d,e[13]=x):x=e[13];let g;e[14]!==n?(g=n("common.iconPicker.or"),e[14]=n,e[15]=g):g=e[15];let v;e[16]!==g?(v=t.jsx("span",{className:"text-xs text-muted-foreground",children:g}),e[16]=g,e[17]=v):v=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 h-px bg-border"}),e[18]=j):j=e[18];let y;e[19]!==v?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[v,j]}),e[19]=v,e[20]=y):y=e[20];let b;e[21]===Symbol.for("react.memo_cache_sentinel")?(b=$=>f($.target.value),e[21]=b):b=e[21];let w;e[22]!==n?(w=n("common.iconPicker.pasteUrlPlaceholder"),e[22]=n,e[23]=w):w=e[23];let S;e[24]!==p?(S=$=>{$.key==="Enter"&&($.preventDefault(),p())},e[24]=p,e[25]=S):S=e[25];let C;e[26]!==r||e[27]!==w||e[28]!==S?(C=t.jsx(Ne,{value:r,onChange:b,placeholder:w,className:"h-8 text-xs flex-1",onKeyDown:S}),e[26]=r,e[27]=w,e[28]=S,e[29]=C):C=e[29];let N;e[30]!==r?(N=r.trim(),e[30]=r,e[31]=N):N=e[31];const k=!N;let V;e[32]!==n?(V=n("common.iconPicker.apply"),e[32]=n,e[33]=V):V=e[33];let T;e[34]!==p||e[35]!==k||e[36]!==V?(T=t.jsx(Z,{variant:"outline",className:"shrink-0",onClick:p,disabled:k,children:V}),e[34]=p,e[35]=k,e[36]=V,e[37]=T):T=e[37];let _;e[38]!==C||e[39]!==T?(_=t.jsxs("div",{className:"flex items-center gap-1.5",children:[C,T]}),e[38]=C,e[39]=T,e[40]=_):_=e[40];let F;return e[41]!==y||e[42]!==_||e[43]!==m||e[44]!==x?(F=t.jsxs("div",{className:"flex flex-col gap-3 p-4",children:[m,x,y,_]}),e[41]=y,e[42]=_,e[43]=m,e[44]=x,e[45]=F):F=e[45],F}function Ul(a){const e=Y.c(14),{viewId:s}=a;if(s==="overview"){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ls,{size:16}),e[0]=i):i=e[0],i}if(s==="context"){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Es,{size:16}),e[1]=i):i=e[1],i}if(s==="monitor"){let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ni,{size:16}),e[2]=i):i=e[2],i}if(s==="plan"){let i;return e[3]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ui,{size:16}),e[3]=i):i=e[3],i}if(s==="reports"){let i;return e[4]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ci,{size:16}),e[4]=i):i=e[4],i}if(s==="board"){let i;return e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(ki,{size:16}),e[5]=i):i=e[5],i}if(s==="site-editor"){let i;return e[6]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ki,{size:16}),e[6]=i):i=e[6],i}if(s==="assets"){let i;return e[7]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wi,{size:16}),e[7]=i):i=e[7],i}if(s==="releases"){let i;return e[8]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Mi,{size:16}),e[8]=i):i=e[8],i}if(s==="hosting"){let i;return e[9]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(bn,{size:16}),e[9]=i):i=e[9],i}if(s==="e2e"){let i;return e[10]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Bi,{size:16}),e[10]=i):i=e[10],i}if(s==="calendar"){let i;return e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ri,{size:16}),e[11]=i):i=e[11],i}if(s==="experiments"){let i;return e[12]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(_i,{size:16}),e[12]=i):i=e[12],i}let n;return e[13]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Us,{size:16}),e[13]=n):n=e[13],n}function cn(a){const e=Y.c(51),{pinned:s,canSetMainView:n,onOpen:i,onTogglePin:l,onSetMainView:c}=a,r=X(),f=s?"text-foreground":"text-muted-foreground/40";let o;e[0]!==f?(o=ye("size-7",f),e[0]=f,e[1]=o):o=e[1];let p;e[2]!==s||e[3]!==r?(p=r(s?"virtualMcp.settings.views.unpin":"virtualMcp.settings.views.pin"),e[2]=s,e[3]=r,e[4]=p):p=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ss,{size:16}),e[5]=m):m=e[5];let u;e[6]!==l||e[7]!==s||e[8]!==o||e[9]!==p?(u=t.jsx(Te,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:o,"aria-label":p,"aria-pressed":s,onClick:l,children:m})}),e[6]=l,e[7]=s,e[8]=o,e[9]=p,e[10]=u):u=e[10];let h;e[11]!==s||e[12]!==r?(h=r(s?"virtualMcp.settings.views.unpin":"virtualMcp.settings.views.pin"),e[11]=s,e[12]=r,e[13]=h):h=e[13];let d;e[14]!==h?(d=t.jsx(De,{side:"top",children:h}),e[14]=h,e[15]=d):d=e[15];let x;e[16]!==u||e[17]!==d?(x=t.jsxs(Ve,{delayDuration:0,children:[u,d]}),e[16]=u,e[17]=d,e[18]=x):x=e[18];let g;e[19]!==r?(g=r("virtualMcp.settings.views.rowActions"),e[19]=r,e[20]=g):g=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Yi,{size:16}),e[21]=v):v=e[21];let j;e[22]!==g?(j=t.jsx(_s,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon-sm",className:"text-muted-foreground","aria-label":g,children:v})}),e[22]=g,e[23]=j):j=e[23];let y;e[24]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(vn,{size:14}),e[24]=y):y=e[24];let b;e[25]!==r?(b=r("virtualMcp.settings.views.open"),e[25]=r,e[26]=b):b=e[26];let w;e[27]!==i||e[28]!==b?(w=t.jsxs(Je,{onClick:i,children:[y,b]}),e[27]=i,e[28]=b,e[29]=w):w=e[29];let S;e[30]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(ss,{size:14}),e[30]=S):S=e[30];let C;e[31]!==s||e[32]!==r?(C=r(s?"virtualMcp.settings.views.unpin":"virtualMcp.settings.views.pin"),e[31]=s,e[32]=r,e[33]=C):C=e[33];let N;e[34]!==l||e[35]!==C?(N=t.jsxs(Je,{onClick:l,children:[S,C]}),e[34]=l,e[35]=C,e[36]=N):N=e[36];let k;e[37]!==n||e[38]!==c||e[39]!==r?(k=n&&t.jsxs(Je,{onClick:c,children:[t.jsx(Ls,{size:14}),r("virtualMcp.settings.views.setMainView")]}),e[37]=n,e[38]=c,e[39]=r,e[40]=k):k=e[40];let V;e[41]!==w||e[42]!==N||e[43]!==k?(V=t.jsxs(Vs,{align:"end",children:[w,N,k]}),e[41]=w,e[42]=N,e[43]=k,e[44]=V):V=e[44];let T;e[45]!==j||e[46]!==V?(T=t.jsxs(Ms,{children:[j,V]}),e[45]=j,e[46]=V,e[47]=T):T=e[47];let _;return e[48]!==T||e[49]!==x?(_=t.jsxs("div",{className:"flex items-center gap-1",children:[x,T]}),e[48]=T,e[49]=x,e[50]=_):_=e[50],_}const js=a=>a.stopPropagation();function Bl(a){const e=Y.c(8),{icon:s,title:n}=a;let i;e[0]!==s||e[1]!==n?(i=t.jsx(jt,{icon:s,name:n,size:"xs",className:"shrink-0"}),e[0]=s,e[1]=n,e[2]=i):i=e[2];let l;e[3]!==n?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:n}),e[3]=n,e[4]=l):l=e[4];let c;return e[5]!==i||e[6]!==l?(c=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 bg-muted/30",children:[i,l]}),e[5]=i,e[6]=l,e[7]=c):c=e[7],c}function Yl(a){const e=Y.c(42),{views:s,viewId:n}=a;let i;e[0]!==n||e[1]!==s?(i=s.pinned(n),e[0]=n,e[1]=s,e[2]=i):i=e[2];const l=i;let c;e[3]!==n?(c=t.jsx(Ul,{viewId:n}),e[3]=n,e[4]=c):c=e[4];const r=s.labels[n];let f;e[5]!==n||e[6]!==s?(f=()=>s.openView(n),e[5]=n,e[6]=s,e[7]=f):f=e[7];let o;e[8]!==l||e[9]!==n||e[10]!==s?(o=l&&s.canBeMainView(n)&&!s.isMainView(n),e[8]=l,e[9]=n,e[10]=s,e[11]=o):o=e[11];let p;e[12]!==n||e[13]!==s?(p=()=>s.openView(n),e[12]=n,e[13]=s,e[14]=p):p=e[14];let m;e[15]!==l||e[16]!==n||e[17]!==s?(m=()=>s.togglePin(n,!l),e[15]=l,e[16]=n,e[17]=s,e[18]=m):m=e[18];let u;e[19]!==n||e[20]!==s?(u=()=>s.setMainView(n),e[19]=n,e[20]=s,e[21]=u):u=e[21];let h;e[22]!==l||e[23]!==o||e[24]!==p||e[25]!==m||e[26]!==u?(h=t.jsx(cn,{pinned:l,canSetMainView:o,onOpen:p,onTogglePin:m,onSetMainView:u}),e[22]=l,e[23]=o,e[24]=p,e[25]=m,e[26]=u,e[27]=h):h=e[27];let d;e[28]!==n||e[29]!==s?(d=()=>s.openView(n),e[28]=n,e[29]=s,e[30]=d):d=e[30];let x;e[31]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ds,{size:16}),e[31]=x):x=e[31];let g;e[32]!==d?(g=t.jsx("span",{onClick:d,className:"flex cursor-pointer items-center text-muted-foreground",children:x}),e[32]=d,e[33]=g):g=e[33];let v;e[34]!==g||e[35]!==h?(v=t.jsxs("div",{className:"flex items-center gap-1",children:[h,g]}),e[34]=g,e[35]=h,e[36]=v):v=e[36];let j;return e[37]!==v||e[38]!==c||e[39]!==r||e[40]!==f?(j=t.jsx($e,{icon:c,title:r,onClick:f,action:v}),e[37]=v,e[38]=c,e[39]=r,e[40]=f,e[41]=j):j=e[41],j}function Wl(a){const e=Y.c(75),{views:s}=a,n=X();let i;e[0]!==n?(i=n("virtualMcp.settings.views.defaults"),e[0]=n,e[1]=i):i=e[1];let l;e[2]!==n?(l=n("virtualMcp.layoutTabContent.mainView"),e[2]=n,e[3]=l):l=e[3];let c;e[4]!==n?(c=n("virtualMcp.layoutTabContent.mainViewDescription"),e[4]=n,e[5]=c):c=e[5];const r=s.noMainView?"none":"set",f=s.noMainView?void 0:s.defaultMainView,o=s.setMainView;let p;e[6]!==n?(p=n("virtualMcp.layoutTabContent.mainView"),e[6]=n,e[7]=p):p=e[7];let m;e[8]!==n?(m=n("virtualMcp.layoutTabContent.noMainView"),e[8]=n,e[9]=m):m=e[9];let u;e[10]!==m?(u=t.jsx(ze,{placeholder:m}),e[10]=m,e[11]=u):u=e[11];let h;e[12]!==p||e[13]!==u?(h=t.jsx(Ee,{"aria-label":p,size:"sm",className:"w-36 shrink-0 @min-xl/project-settings:w-44",children:u}),e[12]=p,e[13]=u,e[14]=h):h=e[14];let d;e[15]!==s.defaultMainOptions?(d=s.defaultMainOptions.map(Kl),e[15]=s.defaultMainOptions,e[16]=d):d=e[16];let x;e[17]!==d?(x=t.jsx(Re,{children:d}),e[17]=d,e[18]=x):x=e[18];let g;e[19]!==h||e[20]!==x||e[21]!==r||e[22]!==f||e[23]!==s.setMainView?(g=t.jsxs(Le,{value:f,onValueChange:o,children:[h,x]},r),e[19]=h,e[20]=x,e[21]=r,e[22]=f,e[23]=s.setMainView,e[24]=g):g=e[24];let v;e[25]!==g||e[26]!==l||e[27]!==c?(v=t.jsx($e,{title:l,description:c,action:g}),e[25]=g,e[26]=l,e[27]=c,e[28]=v):v=e[28];let j;e[29]!==n?(j=n("virtualMcp.layoutTabContent.showChat"),e[29]=n,e[30]=j):j=e[30];let y;e[31]!==n?(y=n("virtualMcp.layoutTabContent.showChatDescription"),e[31]=n,e[32]=y):y=e[32];let b;e[33]!==n?(b=n("virtualMcp.layoutTabContent.showChat"),e[33]=n,e[34]=b):b=e[34];const w=s.noMainView?!0:s.chatDefaultOpen;let S;e[35]!==b||e[36]!==w||e[37]!==s.noMainView||e[38]!==s.setChatDefaultOpen?(S=t.jsx(Te,{asChild:!0,children:t.jsx("span",{className:"shrink-0",children:t.jsx(et,{"aria-label":b,checked:w,disabled:s.noMainView,onCheckedChange:s.setChatDefaultOpen})})}),e[35]=b,e[36]=w,e[37]=s.noMainView,e[38]=s.setChatDefaultOpen,e[39]=S):S=e[39];let C;e[40]!==n||e[41]!==s.noMainView?(C=s.noMainView&&t.jsx(De,{side:"top",children:n("virtualMcp.layoutTabContent.chatAlwaysShown")}),e[40]=n,e[41]=s.noMainView,e[42]=C):C=e[42];let N;e[43]!==S||e[44]!==C?(N=t.jsxs(Ve,{delayDuration:0,children:[S,C]}),e[43]=S,e[44]=C,e[45]=N):N=e[45];let k;e[46]!==j||e[47]!==y||e[48]!==N?(k=t.jsx($e,{title:j,description:y,action:N}),e[46]=j,e[47]=y,e[48]=N,e[49]=k):k=e[49];let V;e[50]!==v||e[51]!==k?(V=t.jsxs(ke,{children:[v,k]}),e[50]=v,e[51]=k,e[52]=V):V=e[52];let T;e[53]!==i||e[54]!==V?(T=t.jsx(Oe,{title:i,children:V}),e[53]=i,e[54]=V,e[55]=T):T=e[55];let _;e[56]!==n?(_=n("virtualMcp.settings.views.sidebar"),e[56]=n,e[57]=_):_=e[57];let F;e[58]!==s.navViews||e[59]!==s.projectViews?(F=[...s.navViews,...s.projectViews],e[58]=s.navViews,e[59]=s.projectViews,e[60]=F):F=e[60];let $;e[61]!==F||e[62]!==s?($=F.map(R=>t.jsx(Yl,{views:s,viewId:R},R)),e[61]=F,e[62]=s,e[63]=$):$=e[63];let A;e[64]!==s?(A=s.connectionsData.flatMap(R=>[t.jsx(Bl,{icon:R.icon,title:R.title},`${R.id}:header`),...R.uiTools.map(z=>{const K=s.pinnedAppViews.find(J=>J.connectionId===R.id&&J.toolName===z.name),E=!!K,L=jn(R.id,z.name),G=`ext-apps:${R.id}:${z.name}`;return t.jsx($e,{onClick:()=>s.openView(L),icon:E?t.jsx("span",{onClick:js,children:t.jsx(on,{value:K.icon??null,name:K.label||z.name,size:"xs",showHoverOverlay:!1,onChange:J=>s.setAppViewIcon(R.id,z.name,J)})}):t.jsx(Us,{size:16}),title:E?t.jsx("span",{onClick:js,children:t.jsx(Ne,{value:K.label,onChange:J=>s.setAppViewLabel(R.id,z.name,J.target.value),onBlur:s.commitAppViewLabel,"aria-label":z.title??Pt(z.name),className:"h-7 w-full max-w-52 text-sm"})}):z.title??Pt(z.name),action:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(cn,{pinned:E,canSetMainView:E&&!s.isMainView(G),onOpen:()=>s.openView(L),onTogglePin:()=>s.toggleAppViewPin(R.id,z.name),onSetMainView:()=>s.setMainView(G)}),t.jsx("span",{onClick:()=>s.openView(L),className:"flex cursor-pointer items-center text-muted-foreground",children:t.jsx(Ds,{size:16})})]})},`${R.id}:${z.name}`)})]),e[64]=s,e[65]=A):A=e[65];let P;e[66]!==$||e[67]!==A?(P=t.jsxs(ke,{children:[$,A]}),e[66]=$,e[67]=A,e[68]=P):P=e[68];let H;e[69]!==_||e[70]!==P?(H=t.jsx(Oe,{title:_,children:P}),e[69]=_,e[70]=P,e[71]=H):H=e[71];let Q;return e[72]!==T||e[73]!==H?(Q=t.jsxs(t.Fragment,{children:[T,H]}),e[72]=T,e[73]=H,e[74]=Q):Q=e[74],Q}function Kl(a){return t.jsx(Se,{value:a.value,children:a.label},a.value)}const dn="site-editor",un={context:Ct.library,monitor:Ct.monitoring,plan:Ct.plan};function ys(a){return Object.hasOwn(un,a)}const Gl=new Set([dn,"content"]);function ql({virtualMcpId:a,form:e,flushAndSave:s}){const n=X(),i=ft(),{openPanel:l}=Hi(),c=pt(),{org:r}=Ae(),f=Fs(a),o=Qi(f),p=Xs(a),m=ia(a),u=(f?.connections??[]).map(M=>M.connection_id).sort(),{data:h}=Ps({queryKey:At.projectConnectionDetails(a,u),enabled:u.length>0,queryFn:async()=>await Promise.all(u.map(async O=>{try{const{item:U}=await i.call("COLLECTION_CONNECTIONS_GET",{id:O}),B=(U?.tools??[]).flatMap(W=>{const re=Gi(W._meta);return re?[{name:W.name,title:W.title,description:W.description,resourceUri:re}]:[]});return{fetchOk:!0,id:O,title:U?.title??O,icon:U?.icon??null,uiTools:B}}catch{return{fetchOk:!1,id:O,title:O,icon:null,uiTools:[]}}}))}),d=(h??[]).filter(M=>M.uiTools.length>0),x=new Set([...yn,...wn]),g=e.watch("metadata.ui.pinnedViews")??[],v=e.watch("metadata.ui.layout")??null,j=v?.defaultMainView??null,y=v?.chatDefaultOpen??!0,b=Qs(f?.metadata),w=Xi(b,o.presence),S=e.watch("metadata.sidebarViewsSeen"),C=Ot(It({sidebarViews:e.watch("metadata.sidebarViews"),ui:{layout:v}}),e.watch("metadata.sidebarViewsVersion"),is(S,w)),N=m??(f?Ot(It(f.metadata),f.metadata.sidebarViewsVersion,is(f.metadata.sidebarViewsSeen,w)):C),k=(()=>{if(!j||j.type==="chat")return"";const M=Sn(j.type);return M==="instructions"||M==="connections"||M==="layout"?"settings":Gl.has(M)?dn:x.has(M)?M:`${M}:${j.id??""}:${j.toolName??""}`})(),V=k==="",T=M=>{const[O,U,B]=M.split(":");return O?x.has(O)?{type:O}:O==="ext-apps"&&U?{type:"ext-apps",id:U,toolName:B||void 0}:null:null},_=M=>{e.setValue("metadata.ui.pinnedViews",M,{shouldDirty:!0})},F=M=>{e.setValue("metadata.ui.layout",{...v,...M},{shouldDirty:!0})},$=q.useRef(!1);if(h&&h.length>0&&!$.current){$.current=!0;const M=new Set((h??[]).filter(W=>W.fetchOk).map(W=>W.id)),O=new Set(d.flatMap(W=>W.uiTools.map(re=>`${W.id}:${re.name}`))),U=new Set(u),B=g.filter(W=>U.has(W.connectionId)&&(!M.has(W.connectionId)||O.has(`${W.connectionId}:${W.toolName}`)));B.length!==g.length&&(_(B),j?.type==="ext-apps"&&!B.some(W=>W.connectionId===j.id&&W.toolName===j.toolName)&&F({defaultMainView:{type:"settings"}}))}const A=(M,O)=>{if(g.some(B=>B.connectionId===M&&B.toolName===O)){const B=g.filter(re=>!(re.connectionId===M&&re.toolName===O));_(B);const W=`ext-apps:${M}:${O}`;k===W&&F({defaultMainView:{type:"settings"}})}else{const B=d.find(W=>W.id===M)?.uiTools.find(W=>W.name===O)?.title;_([...g,{connectionId:M,toolName:O,label:B??Pt(O),icon:null}])}s()},P=(M,O,U)=>{_(g.map(B=>B.connectionId===M&&B.toolName===O?{...B,label:U}:B))},H=()=>{s()},Q=(M,O,U)=>{_(g.map(B=>B.connectionId===M&&B.toolName===O?{...B,icon:U}:B)),s()},R=M=>{F({defaultMainView:T(M)}),s()},z=(M,O)=>{const U=ea(N,M,O,1);e.setValue("metadata.sidebarViews",U,{shouldDirty:!0}),e.setValue("metadata.sidebarViewsVersion",1,{shouldDirty:!0}),e.setValue("metadata.sidebarViewsSeen",ta(f?.metadata.sidebarViewsSeen??S,w,U),{shouldDirty:!0}),p.stage(U,N);const B=sa(j,M,O);B!==j&&F({defaultMainView:B})},K=Ji(w),E=Zi(N,w,1),L={overview:n("sidebar.navDestinations.overview"),context:n("sidebar.navDestinations.context"),monitor:n("sidebar.navDestinations.monitor"),plan:n("sidebar.navDestinations.plan"),reports:n("sidebar.navDestinations.reports"),board:n("sidebar.navDestinations.spineTasks"),"site-editor":n("virtualMcp.layoutTabContent.siteEditor"),blog:n("sidebar.projectNav.blog"),assets:n("common.mainPanelTabs.assets"),releases:n("common.mainPanelTabs.releases"),hosting:n("common.mainPanelTabs.hosting"),e2e:n("common.mainPanelTabs.e2e"),automations:n("virtualMcp.layoutTabContent.automations"),calendar:n("common.mainPanelTabs.calendar"),experiments:n("common.mainPanelTabs.experiments")},G=[{value:"overview",label:n("sidebar.navDestinations.overview")}];for(const M of E)M!=="automations"&&M!=="overview"&&(ys(M)||G.push({value:M,label:L[M]}));for(const M of g)G.push({value:`ext-apps:${M.connectionId}:${M.toolName}`,label:M.label||M.toolName});E.includes("automations")&&G.push({value:"automations",label:L.automations}),G.push({value:"settings",label:n("virtualMcp.layoutTabContent.settings")});const J=M=>{if(ys(M)){c({to:un[M],params:{org:r.slug,agentId:a}});return}l(M,{virtualmcpid:a})},ee=new Set(as);return{navViews:as,projectViews:K.filter(M=>!ee.has(M)),labels:L,pinned:M=>N.includes(M),isMainView:M=>k===M,canBeMainView:M=>G.some(O=>O.value===M),defaultMainView:k,defaultMainOptions:G,noMainView:V,chatDefaultOpen:y,connectionsData:d,pinnedAppViews:g,openView:J,togglePin:(M,O)=>z(M,O),setMainView:R,setChatDefaultOpen:M=>{F({chatDefaultOpen:M}),s()},toggleAppViewPin:A,setAppViewIcon:Q,setAppViewLabel:P,commitAppViewLabel:H}}function Hl(a){const e=Y.c(25),{form:s,onCommit:n}=a,i=X(),l=q.useId(),c=ca();let r;e[0]!==i?(r=i("virtualMcp.settings.assetStorage.label"),e[0]=i,e[1]=r):r=e[1];let f;e[2]!==l||e[3]!==r?(f=t.jsx("label",{htmlFor:l,className:"text-sm font-medium",children:r}),e[2]=l,e[3]=r,e[4]=f):f=e[4];let o;e[5]!==i?(o=i("virtualMcp.settings.assetStorage.description"),e[5]=i,e[6]=o):o=e[6];let p;e[7]!==o?(p=t.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:o}),e[7]=o,e[8]=p):p=e[8];let m;e[9]!==f||e[10]!==p?(m=t.jsxs("div",{children:[f,p]}),e[9]=f,e[10]=p,e[11]=m):m=e[11];let u;e[12]!==c.data||e[13]!==c.isError||e[14]!==c.isSuccess||e[15]!==l||e[16]!==n||e[17]!==i?(u=x=>{const{field:g}=x,v=!!g.value&&c.isSuccess&&!c.data.configs.some(j=>j.id===g.value);return t.jsxs("div",{className:"min-w-0 space-y-2",children:[t.jsxs(Le,{value:g.value??"automatic",disabled:!c.isSuccess,onValueChange:j=>{g.onChange(j==="automatic"?null:j),n()},children:[t.jsx(Ee,{id:l,className:"w-full [&_[data-slot=select-value]]:block [&_[data-slot=select-value]]:truncate",children:t.jsx(ze,{placeholder:i("virtualMcp.settings.assetStorage.loading")})}),t.jsxs(Re,{children:[t.jsx(Se,{value:"automatic",children:i("virtualMcp.settings.assetStorage.automatic")}),v&&t.jsx(Se,{value:g.value,disabled:!0,children:i("virtualMcp.settings.assetStorage.missing")}),c.data?.configs.map(Ql)]})]}),c.isError&&t.jsx("p",{className:"text-xs text-destructive",children:i("virtualMcp.settings.assetStorage.loadError")})]})},e[12]=c.data,e[13]=c.isError,e[14]=c.isSuccess,e[15]=l,e[16]=n,e[17]=i,e[18]=u):u=e[18];let h;e[19]!==s.control||e[20]!==u?(h=t.jsx(xe,{name:"metadata.assetStorageConfigId",control:s.control,render:u}),e[19]=s.control,e[20]=u,e[21]=h):h=e[21];let d;return e[22]!==m||e[23]!==h?(d=t.jsx(ke,{children:t.jsxs(be,{className:"grid gap-3 @min-xl/project-settings:grid-cols-[180px_minmax(0,1fr)] @min-xl/project-settings:gap-8",children:[m,h]})}),e[22]=m,e[23]=h,e[24]=d):d=e[24],d}function Ql(a){return t.jsx(Se,{value:a.id,children:a.name},a.id)}function Xl(a){const e=Y.c(55),{form:s,onCommit:n}=a,i=X(),l=q.useId();let c;e[0]!==i?(c=i("virtualMcp.settings.identity.icon"),e[0]=i,e[1]=c):c=e[1];let r;e[2]!==c?(r=t.jsx("p",{className:"text-sm font-medium",children:c}),e[2]=c,e[3]=r):r=e[3];let f;e[4]!==i?(f=i("virtualMcp.settings.identity.iconDescription"),e[4]=i,e[5]=f):f=e[5];let o;e[6]!==f?(o=t.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:f}),e[6]=f,e[7]=o):o=e[7];let p;e[8]!==r||e[9]!==o?(p=t.jsxs("div",{children:[r,o]}),e[8]=r,e[9]=o,e[10]=p):p=e[10];let m;e[11]!==s||e[12]!==n||e[13]!==i?(m=T=>{const{field:_}=T;return t.jsx("div",{className:"justify-self-start",children:t.jsx(on,{value:_.value??null,onChange:F=>{_.onChange(F),n()},onColorChange:F=>{s.setValue("metadata.ui.themeColor",F,{shouldDirty:!0}),n()},name:s.watch("title")||i("virtualMcp.virtualMcp.agentNameFallback"),size:"md",avatarClassName:"[&_svg]:w-1/2 [&_svg]:h-1/2"})})},e[11]=s,e[12]=n,e[13]=i,e[14]=m):m=e[14];let u;e[15]!==s.control||e[16]!==m?(u=t.jsx(xe,{name:"icon",control:s.control,render:m}),e[15]=s.control,e[16]=m,e[17]=u):u=e[17];let h;e[18]!==p||e[19]!==u?(h=t.jsxs(be,{className:"grid gap-3 @min-xl/project-settings:grid-cols-[180px_minmax(0,1fr)] @min-xl/project-settings:gap-8",children:[p,u]}),e[18]=p,e[19]=u,e[20]=h):h=e[20];const d=`${l}-name`;let x;e[21]!==i?(x=i("virtualMcp.settings.identity.name"),e[21]=i,e[22]=x):x=e[22];let g;e[23]!==x||e[24]!==d?(g=t.jsx("label",{htmlFor:d,className:"text-sm font-medium",children:x}),e[23]=x,e[24]=d,e[25]=g):g=e[25];let v;e[26]!==l||e[27]!==n||e[28]!==i?(v=T=>{const{field:_}=T;return t.jsx(Ne,{..._,id:`${l}-name`,value:_.value??"",onBlur:()=>{_.onBlur(),n()},placeholder:i("virtualMcp.virtualMcp.agentNamePlaceholder")})},e[26]=l,e[27]=n,e[28]=i,e[29]=v):v=e[29];let j;e[30]!==s.control||e[31]!==v?(j=t.jsx(xe,{name:"title",control:s.control,render:v}),e[30]=s.control,e[31]=v,e[32]=j):j=e[32];let y;e[33]!==g||e[34]!==j?(y=t.jsxs(be,{className:"grid gap-3 @min-xl/project-settings:grid-cols-[180px_minmax(0,1fr)] @min-xl/project-settings:gap-8",children:[g,j]}),e[33]=g,e[34]=j,e[35]=y):y=e[35];const b=`${l}-description`;let w;e[36]!==i?(w=i("virtualMcp.settings.identity.description"),e[36]=i,e[37]=w):w=e[37];let S;e[38]!==b||e[39]!==w?(S=t.jsx("label",{htmlFor:b,className:"text-sm font-medium",children:w}),e[38]=b,e[39]=w,e[40]=S):S=e[40];let C;e[41]!==l||e[42]!==n||e[43]!==i?(C=T=>{const{field:_}=T;return t.jsx(ut,{..._,id:`${l}-description`,value:_.value??"",onBlur:()=>{_.onBlur(),n()},placeholder:i("virtualMcp.virtualMcp.descriptionPlaceholder"),className:"min-h-24 resize-y"})},e[41]=l,e[42]=n,e[43]=i,e[44]=C):C=e[44];let N;e[45]!==s.control||e[46]!==C?(N=t.jsx(xe,{name:"description",control:s.control,render:C}),e[45]=s.control,e[46]=C,e[47]=N):N=e[47];let k;e[48]!==S||e[49]!==N?(k=t.jsxs(be,{className:"grid gap-3 @min-xl/project-settings:grid-cols-[180px_minmax(0,1fr)] @min-xl/project-settings:gap-8",children:[S,N]}),e[48]=S,e[49]=N,e[50]=k):k=e[50];let V;return e[51]!==y||e[52]!==k||e[53]!==h?(V=t.jsxs(ke,{children:[h,y,k]}),e[51]=y,e[52]=k,e[53]=h,e[54]=V):V=e[54],V}function Jl(a){const e=Y.c(8),{section:s}=a,n=X();let i;e[0]!==n?(i=n("virtualMcp.settings.navigation"),e[0]=n,e[1]=i):i=e[1];let l;e[2]!==s||e[3]!==n?(l=da.map(r=>{const{titleKey:f}=ua[r];return t.jsx(Ke.Tab,{active:s===r,asChild:!0,children:t.jsx(Ft,{to:".",activeOptions:{exact:!0,explicitUndefined:!0},search:o=>({...o,section:r==="general"?void 0:r}),children:n(f)})},r)}),e[2]=s,e[3]=n,e[4]=l):l=e[4];let c;if(e[5]!==i||e[6]!==l){const r=t.jsx(Ke.Tabs,{"aria-label":i,children:l});c=t.jsx(Nn.Toolbar.Left.Portal,{fallback:r,children:r}),e[5]=i,e[6]=l,e[7]=c}else c=e[7];return c}function Zl(){const a=Y.c(8),e=pt();let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},a[0]=s):s=a[0];const{section:n}=Cn(s);let i;a[1]!==n?(i=ma(n)?n:"general",a[1]=n,a[2]=i):i=a[2];let l;a[3]!==e?(l=r=>e({to:".",search:f=>({...f,section:r??void 0})}),a[3]=e,a[4]=l):l=a[4];let c;return a[5]!==i||a[6]!==l?(c={section:i,openSection:l},a[5]=i,a[6]=l,a[7]=c):c=a[7],c}function mn(a){const e=Y.c(20),{value:s,label:n,copiedLabel:i,variant:l,size:c,className:r,copiedClassName:f}=a,o=l===void 0?"ghost":l,p=c===void 0?"icon-sm":c,{handleCopy:m,copied:u}=fa();let h;e[0]!==m||e[1]!==s?(h=()=>{m(s).catch(er)},e[0]=m,e[1]=s,e[2]=h):h=e[2];const d=u&&f;let x;e[3]!==r||e[4]!==d?(x=ye(r,d),e[3]=r,e[4]=d,e[5]=x):x=e[5];let g;e[6]!==u?(g=u?t.jsx(rt,{className:"text-success"}):t.jsx(bt,{}),e[6]=u,e[7]=g):g=e[7];let v;e[8]!==n||e[9]!==p||e[10]!==h||e[11]!==x||e[12]!==g||e[13]!==o?(v=t.jsx(Z,{type:"button",variant:o,size:p,"aria-label":n,onClick:h,className:x,children:g}),e[8]=n,e[9]=p,e[10]=h,e[11]=x,e[12]=g,e[13]=o,e[14]=v):v=e[14];const j=u?i:"";let y;e[15]!==j?(y=t.jsx("span",{className:"sr-only","aria-live":"polite",children:j}),e[15]=j,e[16]=y):y=e[16];let b;return e[17]!==v||e[18]!==y?(b=t.jsxs(t.Fragment,{children:[v,y]}),e[17]=v,e[18]=y,e[19]=b):b=e[19],b}function er(){}function tr(a){const e=Y.c(14),{id:s,value:n,copyLabel:i,copiedLabel:l,className:c}=a;let r;e[0]!==c?(r=ye("relative h-fit",c),e[0]=c,e[1]=r):r=e[1];let f;e[2]!==s||e[3]!==n?(f=t.jsx(Ne,{id:s,value:n,readOnly:!0,className:"pr-10 font-mono"}),e[2]=s,e[3]=n,e[4]=f):f=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=ye("absolute top-1/2 right-1 -translate-y-1/2 transition-opacity","opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100 pointer-coarse:opacity-100"),e[5]=o):o=e[5];let p;e[6]!==l||e[7]!==i||e[8]!==n?(p=t.jsx(mn,{value:n,label:i,copiedLabel:l,className:o,copiedClassName:"opacity-100"}),e[6]=l,e[7]=i,e[8]=n,e[9]=p):p=e[9];let m;return e[10]!==r||e[11]!==f||e[12]!==p?(m=t.jsxs("div",{className:r,children:[f,p]}),e[10]=r,e[11]=f,e[12]=p,e[13]=m):m=e[13],m}function sr(a){const e=Y.c(106),{orgSlug:s,virtualMcpId:n,site:i}=a,l=X(),c=Et();let r;e[0]!==s||e[1]!==n?(r=At.hostedSiteTokens(s,n),e[0]=s,e[1]=n,e[2]=r):r=e[2];const f=r,[o,p]=q.useState(null),m=q.useId();let u;e[3]!==i?(u=async()=>Qt(i,"site-tokens"),e[3]=i,e[4]=u):u=e[4];let h;e[5]!==f||e[6]!==u?(h={queryKey:f,queryFn:u},e[5]=f,e[6]=u,e[7]=h):h=e[7];const d=Ps(h);let x;e[8]!==i?(x=async()=>Qt(i,"site-tokens",{method:"POST"}),e[8]=i,e[9]=x):x=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=de=>{const{token:I}=de;return p(I)},e[10]=g):g=e[10];let v;e[11]!==f||e[12]!==c?(v=()=>c.invalidateQueries({queryKey:f}),e[11]=f,e[12]=c,e[13]=v):v=e[13];let j;e[14]!==x||e[15]!==v?(j={mutationFn:x,onSuccess:g,onError:nr,onSettled:v},e[14]=x,e[15]=v,e[16]=j):j=e[16];const y=Os(j);let b;e[17]!==d.data?.tokens?(b=d.data?.tokens??[],e[17]=d.data?.tokens,e[18]=b):b=e[18];const w=b,S=d.data?.site;let C;e[19]!==l?(C=l("siteTokens.title"),e[19]=l,e[20]=C):C=e[20];let N;e[21]!==l?(N=l("siteTokens.description"),e[21]=l,e[22]=N):N=e[22];let k;e[23]!==l?(k=l("siteTokens.siteId"),e[23]=l,e[24]=k):k=e[24];let V;e[25]!==m||e[26]!==k?(V=t.jsx("label",{htmlFor:m,className:"text-sm font-medium",children:k}),e[25]=m,e[26]=k,e[27]=V):V=e[27];let T;e[28]!==l?(T=l("siteTokens.siteIdDescription"),e[28]=l,e[29]=T):T=e[29];let _;e[30]!==T?(_=t.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:T}),e[30]=T,e[31]=_):_=e[31];let F;e[32]!==S||e[33]!==m||e[34]!==l?(F=S?t.jsx(tr,{id:m,value:S,copyLabel:l("siteTokens.copySiteId"),copiedLabel:l("siteTokens.siteIdCopied"),className:"min-w-0 flex-1"}):t.jsx("p",{className:"min-w-0 flex-1 font-mono text-xs text-muted-foreground",children:"—"}),e[32]=S,e[33]=m,e[34]=l,e[35]=F):F=e[35];const $=!d.data||y.isPending;let A;e[36]!==y?(A=()=>y.mutate(),e[36]=y,e[37]=A):A=e[37];let P;e[38]!==y.isPending?(P=y.isPending?t.jsx(it,{className:"size-3.5"}):t.jsx(Be,{size:14}),e[38]=y.isPending,e[39]=P):P=e[39];let H;e[40]!==l?(H=l("siteTokens.issue"),e[40]=l,e[41]=H):H=e[41];let Q;e[42]!==$||e[43]!==A||e[44]!==P||e[45]!==H?(Q=t.jsxs(Z,{type:"button",size:"sm",className:"shrink-0",disabled:$,onClick:A,children:[P,H]}),e[42]=$,e[43]=A,e[44]=P,e[45]=H,e[46]=Q):Q=e[46];let R;e[47]!==F||e[48]!==Q?(R=t.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[F,Q]}),e[47]=F,e[48]=Q,e[49]=R):R=e[49];let z;e[50]!==V||e[51]!==_||e[52]!==R?(z=t.jsxs(be,{className:"group",children:[V,_,R]}),e[50]=V,e[51]=_,e[52]=R,e[53]=z):z=e[53];let K;e[54]!==d.error||e[55]!==d.isError?(K=d.isError?t.jsx(be,{children:t.jsx("p",{className:"text-xs text-destructive",children:d.error.message})}):null,e[54]=d.error,e[55]=d.isError,e[56]=K):K=e[56];let E;if(e[57]!==l||e[58]!==w){let de;e[60]!==l?(de=I=>t.jsx(be,{children:t.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[t.jsx(Lt,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"truncate font-mono text-xs",children:I.kid}),t.jsx("p",{className:"text-xs text-muted-foreground",children:l("siteTokens.issuedAgo",{when:kn(new Date(I.iat*1e3))})})]})]})},I.kid),e[60]=l,e[61]=de):de=e[61],E=w.map(de),e[57]=l,e[58]=w,e[59]=E}else E=e[59];let L;e[62]!==z||e[63]!==K||e[64]!==E?(L=t.jsxs(ke,{children:[z,K,E]}),e[62]=z,e[63]=K,e[64]=E,e[65]=L):L=e[65];const G=o!==null;let J;e[66]===Symbol.for("react.memo_cache_sentinel")?(J=de=>!de&&p(null),e[66]=J):J=e[66];let ee;e[67]!==l?(ee=l("siteTokens.createdTitle"),e[67]=l,e[68]=ee):ee=e[68];let M;e[69]!==ee?(M=t.jsx(ht,{children:ee}),e[69]=ee,e[70]=M):M=e[70];let O;e[71]!==l?(O=l("siteTokens.createdDescription"),e[71]=l,e[72]=O):O=e[72];let U;e[73]!==O?(U=t.jsx(Is,{children:O}),e[73]=O,e[74]=U):U=e[74];let B;e[75]!==M||e[76]!==U?(B=t.jsxs(xt,{children:[M,U]}),e[75]=M,e[76]=U,e[77]=B):B=e[77];let W;e[78]!==l?(W=l("siteTokens.createdTitle"),e[78]=l,e[79]=W):W=e[79];const re=o??"";let oe;e[80]!==W||e[81]!==re?(oe=t.jsx(Ne,{readOnly:!0,"aria-label":W,value:re,className:"font-mono text-xs"}),e[80]=W,e[81]=re,e[82]=oe):oe=e[82];let me;e[83]!==o||e[84]!==l?(me=o?t.jsx(mn,{value:o,label:l("siteTokens.copy"),copiedLabel:l("siteTokens.copied"),variant:"outline",size:"icon",className:"shrink-0"}):null,e[83]=o,e[84]=l,e[85]=me):me=e[85];let ne;e[86]!==oe||e[87]!==me?(ne=t.jsxs("div",{className:"flex items-center gap-2",children:[oe,me]}),e[86]=oe,e[87]=me,e[88]=ne):ne=e[88];let ue;e[89]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>p(null),e[89]=ue):ue=e[89];let fe;e[90]!==l?(fe=l("siteTokens.done"),e[90]=l,e[91]=fe):fe=e[91];let pe;e[92]!==fe?(pe=t.jsx($t,{children:t.jsx(Z,{onClick:ue,children:fe})}),e[92]=fe,e[93]=pe):pe=e[93];let ce;e[94]!==B||e[95]!==ne||e[96]!==pe?(ce=t.jsxs(at,{className:"sm:max-w-lg",children:[B,ne,pe]}),e[94]=B,e[95]=ne,e[96]=pe,e[97]=ce):ce=e[97];let ge;e[98]!==G||e[99]!==ce?(ge=t.jsx(lt,{open:G,onOpenChange:J,children:ce}),e[98]=G,e[99]=ce,e[100]=ge):ge=e[100];let je;return e[101]!==N||e[102]!==L||e[103]!==ge||e[104]!==C?(je=t.jsxs(Oe,{title:C,description:N,children:[L,ge]}),e[101]=N,e[102]=L,e[103]=ge,e[104]=C,e[105]=je):je=e[105],je}function nr(a){return ie.error(a.message)}function ir(a){const e=Y.c(31),{virtualMcp:s}=a,n=X(),{org:i}=Ae(),{roleSlug:l}=Mn();let c;e[0]!==s?(c=ha(s),e[0]=s,e[1]=c):c=e[1];const r=c,f=ft(),o=Et();let p;e[2]!==f||e[3]!==s?(p=C=>f.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:s.id,data:{blocksV8:C}}),e[2]=f,e[3]=s,e[4]=p):p=e[4];let m;e[5]!==i||e[6]!==o?(m=()=>_n(o,i.id),e[5]=i,e[6]=o,e[7]=m):m=e[7];let u;e[8]!==p||e[9]!==m?(u={mutationFn:p,onError:ar,onSettled:m},e[8]=p,e[9]=m,e[10]=u):u=e[10];const h=Os(u);if(!pa(l))return null;const d=h.isPending?h.variables:r;let x;e[11]!==n?(x=n("virtualMcp.settings.blocksV8Site.label"),e[11]=n,e[12]=x):x=e[12];let g;e[13]!==x?(g=t.jsx(we,{htmlFor:"blocks-v8-site",className:"font-normal text-foreground",children:x}),e[13]=x,e[14]=g):g=e[14];let v;e[15]!==n?(v=n("virtualMcp.settings.blocksV8Site.description"),e[15]=n,e[16]=v):v=e[16];let j;e[17]!==v?(j=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[17]=v,e[18]=j):j=e[18];let y;e[19]!==g||e[20]!==j?(y=t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[g,j]}),e[19]=g,e[20]=j,e[21]=y):y=e[21];let b;e[22]!==h?(b=C=>h.mutate(C),e[22]=h,e[23]=b):b=e[23];let w;e[24]!==d||e[25]!==b||e[26]!==h.isPending?(w=t.jsx(et,{id:"blocks-v8-site",className:"shrink-0",checked:d,disabled:h.isPending,onCheckedChange:b}),e[24]=d,e[25]=b,e[26]=h.isPending,e[27]=w):w=e[27];let S;return e[28]!==w||e[29]!==y?(S=t.jsx(Oe,{children:t.jsx(ke,{children:t.jsx(be,{children:t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[y,w]})})})}),e[28]=w,e[29]=y,e[30]=S):S=e[30],S}function ar(a){return ie.error(a.message)}function lr(a){const e=Y.c(8),{control:s,previewServerUrl:n}=a,i=X();let l;e[0]!==n?(l=Js(n),e[0]=n,e[1]=l):l=e[1];const c=!!l;let r;e[2]!==c||e[3]!==i?(r=o=>{const{field:p}=o;return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(we,{htmlFor:"fast-preview",className:"font-normal text-foreground",children:i("sandbox.cmsSettings.fastPreview.label")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i(c?"sandbox.cmsSettings.fastPreview.description":"sandbox.cmsSettings.fastPreview.needsPreviewServerUrl")})]}),t.jsx(et,{id:"fast-preview",className:"shrink-0",checked:!!p.value&&c,disabled:!c,onCheckedChange:m=>p.onChange(m)})]})},e[2]=c,e[3]=i,e[4]=r):r=e[4];let f;return e[5]!==s||e[6]!==r?(f=t.jsx(xe,{control:s,name:"metadata.fastPreview",render:r}),e[5]=s,e[6]=r,e[7]=f):f=e[7],f}function rr(a){const e=Y.c(5),{control:s,fastPreview:n}=a,i=X();if(!n)return null;let l;e[0]!==i?(l=r=>{const{field:f}=r;return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(we,{htmlFor:"fast-preview-in-place",className:"font-normal text-foreground",children:i("sandbox.cmsSettings.fastPreviewInPlace.label")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.cmsSettings.fastPreviewInPlace.description")})]}),t.jsx(et,{id:"fast-preview-in-place",className:"shrink-0",checked:!!f.value,onCheckedChange:o=>f.onChange(o)})]})},e[0]=i,e[1]=l):l=e[1];let c;return e[2]!==s||e[3]!==l?(c=t.jsx(xe,{control:s,name:"metadata.fastPreviewInPlace",render:l}),e[2]=s,e[3]=l,e[4]=c):c=e[4],c}function or(a){const e=Y.c(18),{control:s,isBlocksV8:n}=a,i=n===void 0?!1:n,l=X();let c;e[0]!==l?(c=l("sandbox.previewServerUrlField.label"),e[0]=l,e[1]=c):c=e[1];let r;e[2]!==c?(r=t.jsx(we,{htmlFor:"preview-server-url",children:c}),e[2]=c,e[3]=r):r=e[3];let f;e[4]!==l?(f=d=>{const{field:x}=d,g=x.value??"";return t.jsx(Ne,{id:"preview-server-url",type:"url",inputMode:"url",placeholder:l("sandbox.previewServerUrlField.placeholder"),value:g,onChange:v=>x.onChange(v.target.value===""?null:v.target.value),onBlur:()=>{x.onChange(ga(g)),x.onBlur()}})},e[4]=l,e[5]=f):f=e[5];let o;e[6]!==s||e[7]!==f?(o=t.jsx(xe,{control:s,name:"metadata.previewServerUrl",render:f}),e[6]=s,e[7]=f,e[8]=o):o=e[8];const p=i?"sandbox.previewServerUrlField.descriptionBlocksV8":"sandbox.previewServerUrlField.description";let m;e[9]!==l||e[10]!==p?(m=l(p),e[9]=l,e[10]=p,e[11]=m):m=e[11];let u;e[12]!==m?(u=t.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e[12]=m,e[13]=u):u=e[13];let h;return e[14]!==r||e[15]!==o||e[16]!==u?(h=t.jsxs("div",{className:"space-y-2",children:[r,o,u]}),e[14]=r,e[15]=o,e[16]=u,e[17]=h):h=e[17],h}function cr(a){const e=Y.c(15),{control:s,isBlocksV8:n,previewServerUrl:i,fastPreview:l}=a,c=X(),r=n||!!l;let f;e[0]!==s||e[1]!==n?(f=t.jsx(be,{children:t.jsx(or,{control:s,isBlocksV8:n})}),e[0]=s,e[1]=n,e[2]=f):f=e[2];let o;e[3]!==s||e[4]!==n||e[5]!==i||e[6]!==c?(o=n?!Js(i)&&t.jsx(be,{children:t.jsx("p",{className:"text-xs text-muted-foreground",children:c("sandbox.cmsSettings.blocksV8.needsPreviewServerUrl")})}):t.jsx(be,{children:t.jsx(lr,{control:s,previewServerUrl:i})}),e[3]=s,e[4]=n,e[5]=i,e[6]=c,e[7]=o):o=e[7];let p;e[8]!==s||e[9]!==r?(p=r&&t.jsx(be,{children:t.jsx(rr,{control:s,fastPreview:r})}),e[8]=s,e[9]=r,e[10]=p):p=e[10];let m;return e[11]!==f||e[12]!==o||e[13]!==p?(m=t.jsxs(t.Fragment,{children:[f,o,p]}),e[11]=f,e[12]=o,e[13]=p,e[14]=m):m=e[14],m}const Vt={tools:null,resources:null,prompts:null},dr=ba.pick({status:!0,title:!0,description:!0,icon:!0,metadata:!0,connections:!0});function ur(a){const s=new TextEncoder().encode(a),n=Array.from(s,i=>String.fromCharCode(i)).join("");return btoa(n)}function fn(a){return{"x-studio-client":a,"x-mesh-client":a}}function mr(a){const e=Y.c(15),{url:s,agentId:n}=a,i=X(),[l,c]=q.useState(!1);let r;e[0]!==n||e[1]!==i||e[2]!==s?(r=async()=>{_e("agent_connect_action",{agent_id:n,action:"copy_url"}),await navigator.clipboard.writeText(s),c(!0),ie.success(i("virtualMcp.virtualMcpShareModal.agentUrlCopied")),await St(2e3),c(!1)},e[0]=n,e[1]=i,e[2]=s,e[3]=r):r=e[3];const f=r;let o;e[4]!==l?(o=l?t.jsx(rt,{size:20,className:"text-success"}):t.jsx(bt,{size:20}),e[4]=l,e[5]=o):o=e[5];let p;e[6]!==l||e[7]!==i?(p=i(l?"virtualMcp.virtualMcpShareModal.copied":"virtualMcp.virtualMcpShareModal.copyUrl"),e[6]=l,e[7]=i,e[8]=p):p=e[8];let m;e[9]!==p?(m=t.jsx("span",{className:"text-xs font-medium",children:p}),e[9]=p,e[10]=m):m=e[10];let u;return e[11]!==f||e[12]!==o||e[13]!==m?(u=t.jsxs(Z,{type:"button",variant:"outline",onClick:f,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[o,m]}),e[11]=f,e[12]=o,e[13]=m,e[14]=u):u=e[14],u}function fr(a){const e=Y.c(13),{url:s,serverName:n,agentId:i}=a,l=X();let c;e[0]!==i||e[1]!==n||e[2]!==l||e[3]!==s?(c=()=>{_e("agent_connect_action",{agent_id:i,action:"install_cursor"});const u=Zs(n),h={type:"http",url:s,headers:fn("Cursor")},d=ur(JSON.stringify(h,null,2)),x=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(u)}&config=${encodeURIComponent(d)}`;window.open(x,"_blank"),ie.success(l("virtualMcp.virtualMcpShareModal.openingCursor"))},e[0]=i,e[1]=n,e[2]=l,e[3]=s,e[4]=c):c=e[4];const r=c;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),e[5]=f):f=e[5];let o;e[6]!==l?(o=l("virtualMcp.virtualMcpShareModal.installOnCursor"),e[6]=l,e[7]=o):o=e[7];let p;e[8]!==o?(p=t.jsx("span",{className:"text-xs font-medium",children:o}),e[8]=o,e[9]=p):p=e[9];let m;return e[10]!==r||e[11]!==p?(m=t.jsxs(Z,{type:"button",variant:"outline",onClick:r,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[f,p]}),e[10]=r,e[11]=p,e[12]=m):m=e[12],m}function pr(a){const e=Y.c(16),{url:s,serverName:n,agentId:i}=a,l=X(),[c,r]=q.useState(!1);let f;e[0]!==i||e[1]!==n||e[2]!==l||e[3]!==s?(f=async()=>{_e("agent_connect_action",{agent_id:i,action:"install_claude_code"});const d=Zs(n),x={type:"http",url:s,headers:fn("Claude Code")},g=JSON.stringify(x,null,2),v=`claude mcp add-json "${d}" '${g.replace(/'/g,"'\\''")}' --scope user`;await navigator.clipboard.writeText(v),r(!0),ie.success(l("virtualMcp.virtualMcpShareModal.claudeCodeCommandCopied")),await St(2e3),r(!1)},e[0]=i,e[1]=n,e[2]=l,e[3]=s,e[4]=f):f=e[4];const o=f;let p;e[5]!==c?(p=c?t.jsx(rt,{size:20,className:"text-success"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[5]=c,e[6]=p):p=e[6];let m;e[7]!==c||e[8]!==l?(m=l(c?"virtualMcp.virtualMcpShareModal.copied":"virtualMcp.virtualMcpShareModal.installOnClaudeCode"),e[7]=c,e[8]=l,e[9]=m):m=e[9];let u;e[10]!==m?(u=t.jsx("span",{className:"text-xs font-medium",children:m}),e[10]=m,e[11]=u):u=e[11];let h;return e[12]!==o||e[13]!==p||e[14]!==u?(h=t.jsxs(Z,{type:"button",variant:"outline",onClick:o,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[p,u]}),e[12]=o,e[13]=p,e[14]=u,e[15]=h):h=e[15],h}const hr=720*60*60;function xr({virtualMcp:a}){const e=X(),s=ft(),[n,i]=q.useState(null),[l,c]=q.useState(!1),[r,f]=q.useState(!1),o=a.id,p=a.title||`agent-${o.slice(0,8)}`,m=n?`bunx @decocms/typegen@latest --mcp ${o} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${o} --key <api-key> --output client.ts`,u=async()=>{c(!0);try{const{key:d}=await s.call("API_KEY_CREATE",{name:`typegen-${p}`,permissions:{[o]:["*"]},expiresIn:hr});if(!d)throw new Error("No key in response");i(d),_e("agent_typegen_key_generated",{agent_id:o})}catch{_e("agent_typegen_key_failed",{agent_id:o}),ie.error(e("virtualMcp.virtualMcpShareModal.failedGenerateApiKey"))}finally{c(!1)}},h=async()=>{_e("agent_connect_action",{agent_id:o,action:"typegen_copy_command",has_api_key:!!n}),await navigator.clipboard.writeText(m),f(!0),ie.success(e("virtualMcp.virtualMcpShareModal.commandCopied")),await St(2e3),f(!1)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:e("virtualMcp.virtualMcpShareModal.generateTypedClient")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:e("virtualMcp.virtualMcpShareModal.generateTypedClientDescription")})]}),!n&&t.jsxs(Z,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:u,disabled:l,children:[l?t.jsx(it,{className:"size-3.5"}):t.jsx(Lt,{size:14}),t.jsx("span",{children:e(l?"virtualMcp.virtualMcpShareModal.generating":"virtualMcp.virtualMcpShareModal.generateApiKey")})]})]}),n&&t.jsx("p",{className:"rounded-md border border-warning/20 bg-warning/10 px-3 py-2 text-xs text-warning",children:e("virtualMcp.virtualMcpShareModal.storeKeySecurely")}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:e("virtualMcp.virtualMcpShareModal.generateClientLabel")}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:m}),t.jsx(Z,{type:"button",variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:h,children:r?t.jsx(rt,{size:12,className:"text-success"}):t.jsx(bt,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:e("virtualMcp.virtualMcpShareModal.runtimeVariables")}),t.jsx(gr,{apiKey:n,agentId:o})]})}function gr(a){const e=Y.c(21),{apiKey:s,agentId:n}=a,[i,l]=q.useState(!1),c=window.location.origin,r=s?`STUDIO_API_KEY=${s}`:"STUDIO_API_KEY=<api-key>",f=`STUDIO_BASE_URL=${c}`,o=`${r}
2
- ${f}`;let p;e[0]!==n||e[1]!==s||e[2]!==o?(p=async()=>{_e("agent_connect_action",{agent_id:n,action:"typegen_copy_env",has_api_key:!!s}),await navigator.clipboard.writeText(o),l(!0),await St(2e3),l(!1)},e[0]=n,e[1]=s,e[2]=o,e[3]=p):p=e[3];const m=p,u=!s;let h;e[4]!==u?(h=ye({"opacity-50":u}),e[4]=u,e[5]=h):h=e[5];let d;e[6]!==r||e[7]!==h?(d=t.jsx("span",{className:h,children:r}),e[6]=r,e[7]=h,e[8]=d):d=e[8];let x,g;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("br",{}),g=t.jsx("span",{children:f}),e[9]=x,e[10]=g):(x=e[9],g=e[10]);let v;e[11]!==d?(v=t.jsxs("code",{className:"min-w-0 flex-1 font-mono text-xs text-muted-foreground",children:[d,x,g]}),e[11]=d,e[12]=v):v=e[12];let j;e[13]!==i?(j=i?t.jsx(rt,{size:12,className:"text-success"}):t.jsx(bt,{size:12}),e[13]=i,e[14]=j):j=e[14];let y;e[15]!==m||e[16]!==j?(y=t.jsx(Z,{type:"button",variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:m,children:j}),e[15]=m,e[16]=j,e[17]=y):y=e[17];let b;return e[18]!==v||e[19]!==y?(b=t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[v,y]})}),e[18]=v,e[19]=y,e[20]=b):b=e[20],b}function vr(a){const e=Y.c(3),{virtualMcp:s}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"h-20 animate-pulse rounded-md bg-muted"}),e[0]=n):n=e[0];let i;return e[1]!==s?(i=t.jsx(q.Suspense,{fallback:n,children:t.jsx(xr,{virtualMcp:s})}),e[1]=s,e[2]=i):i=e[2],i}function br(a){const e=Y.c(45),{open:s,onOpenChange:n,virtualMcp:i}=a,l=X(),{org:c}=Ae(),r=`/api/${c.slug}/mcp/virtual-mcp/${i.id}`;let f;e[0]!==r?(f=new URL(r,window.location.origin),e[0]=r,e[1]=f):f=e[1];const o=f;let p;e[2]!==i.id||e[3]!==i.title?(p=i.title||`agent-${i.id?.slice(0,8)??"default"}`,e[2]=i.id,e[3]=i.title,e[4]=p):p=e[4];const m=p,u=Ca();let h;e[5]!==i.id||e[6]!==o.href?(h=t.jsx(mr,{url:o.href,agentId:i.id}),e[5]=i.id,e[6]=o.href,e[7]=h):h=e[7];let d,x;e[8]!==m||e[9]!==i.id||e[10]!==o.href?(d=t.jsx(fr,{url:o.href,serverName:m,agentId:i.id}),x=t.jsx(pr,{url:o.href,serverName:m,agentId:i.id}),e[8]=m,e[9]=i.id,e[10]=o.href,e[11]=d,e[12]=x):(d=e[11],x=e[12]);let g;e[13]!==h||e[14]!==d||e[15]!==x?(g=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[h,d,x]})}),e[13]=h,e[14]=d,e[15]=x,e[16]=g):g=e[16];let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"border-t border-border"}),e[17]=v):v=e[17];let j;e[18]!==i?(j=t.jsx(vr,{virtualMcp:i}),e[18]=i,e[19]=j):j=e[19];let y;e[20]!==g||e[21]!==j?(y=t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v,j]}),e[20]=g,e[21]=j,e[22]=y):y=e[22];const b=y;if(u){let k;e[23]!==l?(k=l("virtualMcp.virtualMcpShareModal.connect"),e[23]=l,e[24]=k):k=e[24];let V;e[25]!==k?(V=t.jsx(wa,{className:"mt-4 mb-4 text-base font-semibold",children:k}),e[25]=k,e[26]=V):V=e[26];let T;e[27]!==b||e[28]!==V?(T=t.jsx(Sa,{children:t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 pb-6 [touch-action:pan-y]",children:[V,b]})}),e[27]=b,e[28]=V,e[29]=T):T=e[29];let _;return e[30]!==n||e[31]!==s||e[32]!==T?(_=t.jsx(Na,{open:s,onOpenChange:n,children:T}),e[30]=n,e[31]=s,e[32]=T,e[33]=_):_=e[33],_}let w;e[34]!==l?(w=l("virtualMcp.virtualMcpShareModal.connect"),e[34]=l,e[35]=w):w=e[35];let S;e[36]!==w?(S=t.jsx(xt,{children:t.jsx(ht,{children:w})}),e[36]=w,e[37]=S):S=e[37];let C;e[38]!==b||e[39]!==S?(C=t.jsxs(at,{className:"max-h-[80vh] overflow-y-auto sm:max-w-2xl",children:[S,b]}),e[38]=b,e[39]=S,e[40]=C):C=e[40];let N;return e[41]!==n||e[42]!==s||e[43]!==C?(N=t.jsx(lt,{open:s,onOpenChange:n,children:C}),e[41]=n,e[42]=s,e[43]=C,e[44]=N):N=e[44],N}const jr=/^[A-Za-z_][A-Za-z0-9_]*$/;function yr(a){const e={},s=a.split(/\r?\n/);for(let n=0;n<s.length;n++){let i=(s[n]??"").trim();if(!i||i.startsWith("#"))continue;i.startsWith("export ")&&(i=i.slice(7).trim());const l=i.indexOf("=");if(l<0)throw new Error(`Line ${n+1}: missing '='`);const c=i.slice(0,l).trim();if(!jr.test(c))throw new Error(`Line ${n+1}: invalid key "${c}"`);let r=i.slice(l+1).trim();r.length>=2&&(r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'"))&&(r=r.slice(1,-1)),e[c]=r}return e}function wr(a){const e=Y.c(28),{control:s,form:n,virtualMcpId:i,orgSlug:l,sandboxMap:c}=a,r=X();let f;e[0]!==r?(f=r("sandbox.envVarsField.title"),e[0]=r,e[1]=f):f=e[1];let o;e[2]!==f?(o=t.jsx("div",{className:"flex items-baseline justify-between gap-2",children:t.jsx(we,{className:"font-normal text-foreground",children:f})}),e[2]=f,e[3]=o):o=e[3];let p;e[4]!==r?(p=r("sandbox.envVarsField.description"),e[4]=r,e[5]=p):p=e[5];let m;e[6]!==p?(m=t.jsx("p",{className:"text-xs text-muted-foreground",children:p}),e[6]=p,e[7]=m):m=e[7];let u;e[8]!==s||e[9]!==n||e[10]!==l||e[11]!==c||e[12]!==i?(u=t.jsx(Sr,{control:s,form:n,virtualMcpId:i,orgSlug:l,sandboxMap:c}),e[8]=s,e[9]=n,e[10]=l,e[11]=c,e[12]=i,e[13]=u):u=e[13];let h;e[14]!==r?(h=j=>{const{error:y}=j;return t.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:y?.message??r("sandbox.envVarsField.failedToLoadSecrets")})},e[14]=r,e[15]=h):h=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Vn,{className:"h-9 w-full"}),e[16]=d):d=e[16];let x;e[17]!==s||e[18]!==n?(x=t.jsx(q.Suspense,{fallback:d,children:t.jsx(Cr,{control:s,form:n})}),e[17]=s,e[18]=n,e[19]=x):x=e[19];let g;e[20]!==h||e[21]!==x?(g=t.jsx(Xe,{fallback:h,children:x}),e[20]=h,e[21]=x,e[22]=g):g=e[22];let v;return e[23]!==o||e[24]!==m||e[25]!==u||e[26]!==g?(v=t.jsxs("div",{className:"space-y-2",children:[o,m,u,g]}),e[23]=o,e[24]=m,e[25]=u,e[26]=g,e[27]=v):v=e[27],v}function Sr(a){const e=Y.c(33),{control:s,form:n,virtualMcpId:i,orgSlug:l,sandboxMap:c}=a,r=X(),o=Tn.useSession().data?.user?.id,p="metadata.runtime.env";let m;e[0]!==n?(m=()=>JSON.stringify(ws(n.getValues(p))),e[0]=n,e[1]=m):m=e[1];const[u,h]=q.useState(m);let d;e[2]!==s?(d={control:s,name:p},e[2]=s,e[3]=d):d=e[3];const x=zt(d);let g;e[4]!==x?(g=JSON.stringify(ws(x)),e[4]=x,e[5]=g):g=e[5];const v=g,j=v!==u;let y;e[6]!==c||e[7]!==o?(y=o?Object.keys(c?.[o]??{}):[],e[6]=c,e[7]=o,e[8]=y):y=e[8];const b=y,w=b.length>0,[S,C]=q.useState(!1);if(!j||!w)return null;let N;e[9]!==v||e[10]!==l||e[11]!==r||e[12]!==b||e[13]!==i?(N=async()=>{C(!0);const H=await Promise.allSettled(b.map(async R=>{const z=ka({orgSlug:l,virtualMcpId:i,branch:R,threadId:null},"setup/start",{force:"1"}),K=await fetch(z,{method:"POST"});if(!K.ok){const E=await K.text().catch(()=>K.statusText);throw new Error(E||K.statusText)}}));C(!1);const Q=H.filter(Nr).length;Q===0?(h(v),ie.success(b.length===1?r("sandbox.envVarsField.restartedSingle"):r("sandbox.envVarsField.restartedMultiple",{count:b.length}))):ie.error(r("sandbox.envVarsField.restartFailed",{failed:Q,total:b.length}))},e[9]=v,e[10]=l,e[11]=r,e[12]=b,e[13]=i,e[14]=N):N=e[14];const k=N;let V;e[15]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(Ts,{className:"size-3.5 shrink-0"}),e[15]=V):V=e[15];let T;e[16]!==r?(T=r("sandbox.envVarsField.sandboxRunningNotice"),e[16]=r,e[17]=T):T=e[17];let _;e[18]!==T?(_=t.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-warning",children:[V,t.jsx("span",{className:"truncate",children:T})]}),e[18]=T,e[19]=_):_=e[19];let F;e[20]!==S?(F=S?t.jsx(it,{className:"size-3.5"}):t.jsx(Pn,{className:"size-3.5"}),e[20]=S,e[21]=F):F=e[21];let $;e[22]!==S||e[23]!==r?($=r(S?"sandbox.envVarsField.restarting":"sandbox.envVarsField.restartDev"),e[22]=S,e[23]=r,e[24]=$):$=e[24];let A;e[25]!==k||e[26]!==S||e[27]!==$||e[28]!==F?(A=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:k,disabled:S,className:"shrink-0",children:[F,$]}),e[25]=k,e[26]=S,e[27]=$,e[28]=F,e[29]=A):A=e[29];let P;return e[30]!==A||e[31]!==_?(P=t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-warning/20 bg-warning/10 px-3 py-2 text-xs",children:[_,A]}),e[30]=A,e[31]=_,e[32]=P):P=e[32],P}function Nr(a){return a.status==="rejected"}function Cr(a){const e=Y.c(62),{control:s,form:n}=a,i=X(),l="metadata.runtime.env";let c;e[0]!==s?(c={control:s,name:l},e[0]=s,e[1]=c):c=e[1];const r=Dn(c),{fields:f,append:o,remove:p}=r;let m;e[2]!==n?(m=(z,K)=>{n.setValue(`${l}.${z}`,K,{shouldDirty:!0,shouldTouch:!0})},e[2]=n,e[3]=m):m=e[3];const u=m,h=Ta();let d;if(e[4]!==h){d=new Map;for(const z of h)d.set(z.id,z);e[4]=h,e[5]=d}else d=e[5];const[x,g]=q.useState(null);let v;e[6]!==o?(v=()=>{o({key:"",kind:"literal",value:""})},e[6]=o,e[7]=v):v=e[7];const j=v;let y;e[8]!==o||e[9]!==n||e[10]!==i?(y=async()=>{let z;try{z=await navigator.clipboard.readText()}catch{ie.error(i("sandbox.envVarsField.clipboardReadFailed"));return}if(!z.trim()){ie.error(i("sandbox.envVarsField.clipboardEmpty"));return}let K;try{K=yr(z)}catch(M){const O=M;ie.error(O.message);return}const E=Object.entries(K);if(E.length===0){ie.error(i("sandbox.envVarsField.nothingToAdd"));return}const L=n.getValues(l)??[],G=new Set;for(const M of L){const O=(M.key??"").trim();O&&G.add(O)}let J=0,ee=0;for(const[M,O]of E){if(G.has(M)){ee++;continue}o({key:M,kind:"literal",value:O}),G.add(M),J++}J===0&&ee>0?ie.message(i("sandbox.envVarsField.allKeysExist",{count:ee})):ie.success(ee>0?i("sandbox.envVarsField.addedWithSkipped",{added:J,skipped:ee}):i("sandbox.envVarsField.added",{added:J}))},e[8]=o,e[9]=n,e[10]=i,e[11]=y):y=e[11];const b=y;let w;if(e[12]!==s||e[13]!==f||e[14]!==n||e[15]!==p||e[16]!==d||e[17]!==h||e[18]!==u){let z;e[20]!==s||e[21]!==n||e[22]!==p||e[23]!==d||e[24]!==h||e[25]!==u?(z=(K,E)=>t.jsx("li",{className:"rounded-md border border-border bg-background",children:t.jsx(kr,{index:E,control:s,form:n,onUpdateEntry:u,fieldPath:l,secrets:h,secretById:d,onSaveAsSecret:(L,G)=>g({kind:"save-literal",index:E,presetKey:L,presetValue:G}),onCreateNewSecret:L=>g({kind:"create-new",index:E,presetKey:L}),onRemove:()=>p(E)})},K.id),e[20]=s,e[21]=n,e[22]=p,e[23]=d,e[24]=h,e[25]=u,e[26]=z):z=e[26],w=f.map(z),e[12]=s,e[13]=f,e[14]=n,e[15]=p,e[16]=d,e[17]=h,e[18]=u,e[19]=w}else w=e[19];let S;e[27]!==w?(S=t.jsx("ul",{className:"space-y-2",children:w}),e[27]=w,e[28]=S):S=e[28];let C;e[29]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Be,{className:"size-3.5"}),e[29]=C):C=e[29];let N;e[30]!==i?(N=i("sandbox.envVarsField.addEnvVar"),e[30]=i,e[31]=N):N=e[31];let k;e[32]!==j||e[33]!==N?(k=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:j,className:"flex-1",children:[C,N]}),e[32]=j,e[33]=N,e[34]=k):k=e[34];let V;e[35]!==i?(V=i("sandbox.envVarsField.pasteDotenvAriaLabel"),e[35]=i,e[36]=V):V=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(Li,{className:"size-3.5"}),e[37]=T):T=e[37];let _;e[38]!==i?(_=i("sandbox.envVarsField.pasteDotenv"),e[38]=i,e[39]=_):_=e[39];let F;e[40]!==b||e[41]!==V||e[42]!==_?(F=t.jsx(Te,{asChild:!0,children:t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:b,"aria-label":V,children:[T,_]})}),e[40]=b,e[41]=V,e[42]=_,e[43]=F):F=e[43];let $;e[44]!==i?($=i("sandbox.envVarsField.pasteDotenvTooltip"),e[44]=i,e[45]=$):$=e[45];let A;e[46]!==$?(A=t.jsx(De,{children:$}),e[46]=$,e[47]=A):A=e[47];let P;e[48]!==F||e[49]!==A?(P=t.jsxs(Ve,{children:[F,A]}),e[48]=F,e[49]=A,e[50]=P):P=e[50];let H;e[51]!==P||e[52]!==k?(H=t.jsxs("div",{className:"flex items-center gap-2",children:[k,P]}),e[51]=P,e[52]=k,e[53]=H):H=e[53];let Q;e[54]!==x||e[55]!==n||e[56]!==u?(Q=x!==null?t.jsx(_r,{mode:x,onClose:()=>g(null),onSaved:z=>{const K=n.getValues(`${l}.${x.index}.key`)?.trim()??"";u(x.index,{key:K,kind:"secret",secretId:z}),g(null)}}):null,e[54]=x,e[55]=n,e[56]=u,e[57]=Q):Q=e[57];let R;return e[58]!==H||e[59]!==Q||e[60]!==S?(R=t.jsxs("div",{className:"space-y-2",children:[S,H,Q]}),e[58]=H,e[59]=Q,e[60]=S,e[61]=R):R=e[61],R}function kr(a){const e=Y.c(77),{index:s,control:n,form:i,onUpdateEntry:l,fieldPath:c,secrets:r,secretById:f,onSaveAsSecret:o,onCreateNewSecret:p,onRemove:m}=a,u=X(),h=`${c}.${s}.key`,d=`${c}.${s}.value`,x=`${c}.${s}.secretId`,g=`${c}.${s}.kind`;let v;e[0]!==n||e[1]!==g?(v={control:n,name:g},e[0]=n,e[1]=g,e[2]=v):v=e[2];const y=zt(v)==="secret"?"secret":"literal";let b;e[3]!==i||e[4]!==s||e[5]!==h||e[6]!==o||e[7]!==l||e[8]!==d?(b=O=>{const U=i.getValues(h)?.trim()??"";if(O==="literal"){l(s,{key:U,kind:"literal",value:""});return}const B=i.getValues(d)??"";if(B.length>0){o(U,B);return}l(s,{key:U,kind:"secret",secretId:""})},e[3]=i,e[4]=s,e[5]=h,e[6]=o,e[7]=l,e[8]=d,e[9]=b):b=e[9];const w=b;let S;e[10]!==s||e[11]!==u?(S=O=>{const{field:U}=O,B=(U.value??"").trim(),W=B.length>0&&!wt.test(B);return t.jsxs("div",{className:"space-y-1",children:[t.jsx(Ne,{...U,value:U.value??"",placeholder:u("sandbox.envVarsField.keyPlaceholder"),spellCheck:!1,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",className:ye("font-mono",W&&"border-destructive focus-visible:ring-destructive"),"aria-invalid":W,"aria-label":u("sandbox.envVarsField.envVarKeyLabel",{index:s+1}),onBlur:re=>{const oe=re.target.value.trim();U.onChange(oe),U.onBlur()}}),W?t.jsx("p",{className:"text-2xs text-destructive",children:u("sandbox.envVarsField.invalidKeyMessage")}):null]})},e[10]=s,e[11]=u,e[12]=S):S=e[12];let C;e[13]!==n||e[14]!==h||e[15]!==S?(C=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx(xe,{control:n,name:h,render:S})}),e[13]=n,e[14]=h,e[15]=S,e[16]=C):C=e[16];let N;e[17]!==w?(N=O=>w(O),e[17]=w,e[18]=N):N=e[18];let k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Ee,{className:"h-9 w-[110px]",children:t.jsx(ze,{})}),e[19]=k):k=e[19];let V;e[20]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(Lt,{className:"size-3.5"}),e[20]=V):V=e[20];let T;e[21]!==u?(T=u("sandbox.envVarsField.literal"),e[21]=u,e[22]=T):T=e[22];let _;e[23]!==T?(_=t.jsx(Se,{value:"literal",children:t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[V,T]})}),e[23]=T,e[24]=_):_=e[24];let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(On,{className:"size-3.5"}),e[25]=F):F=e[25];let $;e[26]!==u?($=u("sandbox.envVarsField.secret"),e[26]=u,e[27]=$):$=e[27];let A;e[28]!==$?(A=t.jsx(Se,{value:"secret",children:t.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[F,$]})}),e[28]=$,e[29]=A):A=e[29];let P;e[30]!==A||e[31]!==_?(P=t.jsxs(Re,{children:[_,A]}),e[30]=A,e[31]=_,e[32]=P):P=e[32];let H;e[33]!==y||e[34]!==P||e[35]!==N?(H=t.jsx("div",{className:"shrink-0",children:t.jsxs(Le,{value:y,onValueChange:N,children:[k,P]})}),e[33]=y,e[34]=P,e[35]=N,e[36]=H):H=e[36];let Q;e[37]!==n||e[38]!==i||e[39]!==s||e[40]!==h||e[41]!==y||e[42]!==p||e[43]!==f||e[44]!==x||e[45]!==r||e[46]!==u||e[47]!==d?(Q=t.jsx("div",{className:"flex flex-[2] min-w-0 items-center gap-1",children:y==="literal"?t.jsx(xe,{control:n,name:d,render:O=>{const{field:U}=O;return t.jsx(Ne,{...U,value:U.value??"",type:"password",placeholder:u("sandbox.envVarsField.valuePlaceholder"),spellCheck:!1,autoComplete:"off",className:"font-mono","aria-label":u("sandbox.envVarsField.envVarValueLabel",{index:s+1}),onBlur:B=>{U.onChange(B.target.value),U.onBlur()}})}}):t.jsxs(t.Fragment,{children:[t.jsx(xe,{control:n,name:x,render:O=>{const{field:U}=O;return t.jsxs(Le,{value:U.value||"",onValueChange:B=>U.onChange(B),children:[t.jsx(Ee,{className:ye("h-9 w-full",!U.value&&"text-muted-foreground"),"aria-label":u("sandbox.envVarsField.secretAriaLabel",{index:s+1}),children:t.jsx(ze,{placeholder:u("sandbox.envVarsField.pickSecretPlaceholder"),children:t.jsx(Ma,{field:U,secretById:f})})}),t.jsx(Re,{children:r.length===0?t.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:u("sandbox.envVarsField.noSecretsYet")}):r.map(Mr)})]})}}),t.jsxs(Ve,{children:[t.jsx(Te,{asChild:!0,children:t.jsx(Z,{type:"button",variant:"ghost",size:"icon","aria-label":u("sandbox.envVarsField.createNewSecretAriaLabel"),onClick:()=>{const O=i.getValues(h)?.trim()??"";p(O)},children:t.jsx(Be,{className:"size-3.5"})})}),t.jsx(De,{children:u("sandbox.envVarsField.createNewSecret")})]})]})}),e[37]=n,e[38]=i,e[39]=s,e[40]=h,e[41]=y,e[42]=p,e[43]=f,e[44]=x,e[45]=r,e[46]=u,e[47]=d,e[48]=Q):Q=e[48];let R;e[49]!==i||e[50]!==h||e[51]!==y||e[52]!==o||e[53]!==u||e[54]!==d?(R=y==="literal"?t.jsxs(Ve,{children:[t.jsx(Te,{asChild:!0,children:t.jsx(Z,{type:"button",variant:"ghost",size:"icon","aria-label":u("sandbox.envVarsField.saveAsSecretAriaLabel"),onClick:()=>{const O=i.getValues(h)?.trim()??"",U=i.getValues(d)??"";o(O,U)},children:t.jsx(Vi,{className:"size-3.5"})})}),t.jsx(De,{children:u("sandbox.envVarsField.saveAsSecret")})]}):null,e[49]=i,e[50]=h,e[51]=y,e[52]=o,e[53]=u,e[54]=d,e[55]=R):R=e[55];let z;e[56]!==u?(z=u("sandbox.envVarsField.removeEnvVarAriaLabel"),e[56]=u,e[57]=z):z=e[57];let K;e[58]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(vt,{className:"size-3.5"}),e[58]=K):K=e[58];let E;e[59]!==m||e[60]!==z?(E=t.jsx(Te,{asChild:!0,children:t.jsx(Z,{type:"button",variant:"ghost",size:"icon","aria-label":z,onClick:m,children:K})}),e[59]=m,e[60]=z,e[61]=E):E=e[61];let L;e[62]!==u?(L=u("sandbox.envVarsField.remove"),e[62]=u,e[63]=L):L=e[63];let G;e[64]!==L?(G=t.jsx(De,{children:L}),e[64]=L,e[65]=G):G=e[65];let J;e[66]!==E||e[67]!==G?(J=t.jsxs(Ve,{children:[E,G]}),e[66]=E,e[67]=G,e[68]=J):J=e[68];let ee;e[69]!==R||e[70]!==J?(ee=t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[R,J]}),e[69]=R,e[70]=J,e[71]=ee):ee=e[71];let M;return e[72]!==H||e[73]!==Q||e[74]!==ee||e[75]!==C?(M=t.jsxs("div",{className:"flex flex-col gap-2 p-2 sm:flex-row sm:items-center",children:[C,H,Q,ee]}),e[72]=H,e[73]=Q,e[74]=ee,e[75]=C,e[76]=M):M=e[76],M}function Mr(a){return t.jsx(Se,{value:a.id,children:t.jsxs("span",{className:"inline-flex items-center gap-2",children:[t.jsx(Va,{scope:a.scope}),t.jsx("span",{className:"font-mono",children:a.name})]})},a.id)}function _r({mode:a,onClose:e,onSaved:s}){const n=X(),i=a.kind==="save-literal"?a.presetValue:"",l=a.presetKey,[c,r]=q.useState(()=>Vr(l)),[f,o]=q.useState("organization"),[p,m]=q.useState(i),[u,h]=q.useState(""),d=Da(),x=c.trim(),g=p.length>0&&x.length>0&&_a.test(x),v=async b=>{if(b.preventDefault(),!!g)try{const w=await d.mutateAsync({scope:f,name:x,value:p,description:u.trim()||void 0});ie.success(n("sandbox.envVarsField.secretSaved",{name:w.name})),s(w.id)}catch(w){ie.error(w instanceof Error?w.message:n("sandbox.envVarsField.failedToSaveSecret"))}},j=a.kind==="save-literal"?n("sandbox.envVarsField.saveValueAsSecretTitle"):n("sandbox.envVarsField.createNewSecretTitle"),y=a.kind==="save-literal"?n("sandbox.envVarsField.saveValueAsSecretDescription"):n("sandbox.envVarsField.createNewSecretDescription");return t.jsx(lt,{open:!0,onOpenChange:b=>{b||e()},children:t.jsxs(at,{className:"sm:max-w-md",children:[t.jsxs(xt,{children:[t.jsx(ht,{children:j}),t.jsx(Is,{children:y})]}),t.jsxs("form",{onSubmit:v,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(we,{htmlFor:"save-secret-scope",children:n("sandbox.envVarsField.scopeLabel")}),t.jsxs(Le,{value:f,onValueChange:b=>o(b),children:[t.jsx(Ee,{id:"save-secret-scope",children:t.jsx(ze,{})}),t.jsxs(Re,{children:[t.jsx(Se,{value:"organization",children:n("sandbox.envVarsField.scopeOrganization")}),t.jsx(Se,{value:"user",children:n("sandbox.envVarsField.scopePrivate")})]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(we,{htmlFor:"save-secret-name",children:n("sandbox.envVarsField.nameLabel")}),t.jsx(Ne,{id:"save-secret-name",value:c,onChange:b=>r(b.target.value),placeholder:n("sandbox.envVarsField.namePlaceholder"),autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.envVarsField.nameHelperText")})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(we,{htmlFor:"save-secret-value",children:n("sandbox.envVarsField.valueLabel")}),t.jsx(Ne,{id:"save-secret-value",type:"password",value:p,onChange:b=>m(b.target.value),placeholder:n("sandbox.envVarsField.secretValuePlaceholder"),autoComplete:"new-password",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(we,{htmlFor:"save-secret-description",children:n("sandbox.envVarsField.descriptionLabel")}),t.jsx(ut,{id:"save-secret-description",value:u,onChange:b=>h(b.target.value),rows:2,placeholder:n("sandbox.envVarsField.descriptionPlaceholder")})]}),t.jsxs($t,{children:[t.jsx(Z,{type:"button",variant:"outline",onClick:e,disabled:d.isPending,children:n("sandbox.envVarsField.cancel")}),t.jsx(Z,{type:"submit",disabled:!g||d.isPending,children:d.isPending?n("sandbox.envVarsField.saving"):n("sandbox.envVarsField.saveSecret")})]})]})]})})}function ws(a){if(!Array.isArray(a))return[];const e=[];for(const s of a){if(!s||typeof s!="object")continue;const n=s,i=(n.key??"").trim();if(!(!i||!wt.test(i))){if(n.kind==="literal"){e.push({key:i,kind:"literal",value:n.value??""});continue}n.kind==="secret"&&n.secretId&&e.push({key:i,kind:"secret",secretId:n.secretId})}}return e}function Vr(a){const e=a.trim();return e&&wt.test(e)?e:""}function Tr({repository:a}){const e=a.path.split("/");return{owner:e.slice(0,-1).join("/"),name:e.at(-1)??a.path,url:a.webUrl,repositoryId:a.id}}function Dr(a){const e=Y.c(30),{repo:s,onConnect:n}=a,i=X(),[l,c]=q.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Pa,{size:20,className:"text-foreground/70"}),e[0]=r):r=e[0];let f;e[1]!==s||e[2]!==i?(f=s?`${s.owner}/${s.name}`:i("virtualMcp.settings.repository.none"),e[1]=s,e[2]=i,e[3]=f):f=e[3];let o;e[4]!==s||e[5]!==i?(o=s?s.url:i("virtualMcp.settings.repository.noneDescription"),e[4]=s,e[5]=i,e[6]=o):o=e[6];const p=s?"outline":"default";let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=()=>c(!0),e[7]=m):m=e[7];let u;e[8]!==s||e[9]!==i?(u=i(s?"virtualMcp.settings.repository.change":"virtualMcp.settings.repository.connect"),e[8]=s,e[9]=i,e[10]=u):u=e[10];let h;e[11]!==p||e[12]!==u?(h=t.jsx(Z,{size:"sm",variant:p,onClick:m,children:u}),e[11]=p,e[12]=u,e[13]=h):h=e[13];let d;e[14]!==f||e[15]!==o||e[16]!==h?(d=t.jsx(ke,{children:t.jsx($e,{icon:r,title:f,description:o,action:h})}),e[14]=f,e[15]=o,e[16]=h,e[17]=d):d=e[17];let x;e[18]!==i?(x=i("virtualMcp.settings.repository.connect"),e[18]=i,e[19]=x):x=e[19];let g;e[20]!==n||e[21]!==i?(g=async y=>{await n(Tr(y)),c(!1),ie.success(i("virtualMcp.settings.repository.connected",{name:y.repository.path}))},e[20]=n,e[21]=i,e[22]=g):g=e[22];let v;e[23]!==l||e[24]!==g||e[25]!==x?(v=t.jsx(Oa,{open:l,onOpenChange:c,title:x,onPicked:g,onError:Pr}),e[23]=l,e[24]=g,e[25]=x,e[26]=v):v=e[26];let j;return e[27]!==v||e[28]!==d?(j=t.jsxs(Oe,{children:[d,v]}),e[27]=v,e[28]=d,e[29]=j):j=e[29],j}function Pr(a){return ie.error(a)}const Or={npm:{install:"npm install",run:a=>`npm run ${a}`,runtime:"node"},pnpm:{install:"pnpm install",run:a=>`pnpm run ${a}`,runtime:"node"},yarn:{install:"yarn install",run:a=>`yarn run ${a}`,runtime:"node"},bun:{install:"bun install",run:a=>`bun run ${a}`,runtime:"bun"},deno:{install:"deno install",run:a=>`deno task ${a}`,runtime:"deno"}};function Ir(a){const e=a.trim();if(e==="")return{ok:!0,value:null};if(!/^\d+$/.test(e))return{ok:!1};const s=Number(e);return s<1||s>65535?{ok:!1}:{ok:!0,value:String(s)}}const $r=Object.keys(Or),Tt="__none__";function Fr(a){const e=Y.c(47),{control:s}=a,n=X(),i=q.useRef(null);let l;e[0]!==n?(l=n("sandbox.runtimeFields.packageManager"),e[0]=n,e[1]=l):l=e[1];let c;e[2]!==l?(c=t.jsx(we,{htmlFor:"runtime-pm",children:l}),e[2]=l,e[3]=c):c=e[3];let r;e[4]!==n?(r=N=>{const{field:k}=N;return t.jsxs(Le,{value:k.value??Tt,onValueChange:V=>k.onChange(V===Tt?null:V),children:[t.jsx(Ee,{id:"runtime-pm",children:t.jsx(ze,{placeholder:n("sandbox.runtimeFields.autoDetect")})}),t.jsxs(Re,{children:[t.jsx(Se,{value:Tt,children:n("sandbox.runtimeFields.autoDetect")}),$r.map(Er)]})]})},e[4]=n,e[5]=r):r=e[5];let f;e[6]!==s||e[7]!==r?(f=t.jsx(xe,{control:s,name:"metadata.runtime.selected",render:r}),e[6]=s,e[7]=r,e[8]=f):f=e[8];let o;e[9]!==c||e[10]!==f?(o=t.jsxs("div",{className:"space-y-2",children:[c,f]}),e[9]=c,e[10]=f,e[11]=o):o=e[11];let p;e[12]!==n?(p=n("sandbox.runtimeFields.packagePath"),e[12]=n,e[13]=p):p=e[13];let m;e[14]!==p?(m=t.jsx(we,{htmlFor:"runtime-path",children:p}),e[14]=p,e[15]=m):m=e[15];let u;e[16]!==s?(u=t.jsx(xe,{control:s,name:"metadata.runtime.path",render:Ar}),e[16]=s,e[17]=u):u=e[17];let h;e[18]!==n?(h=n("sandbox.runtimeFields.packagePathDescription"),e[18]=n,e[19]=h):h=e[19];let d;e[20]!==h?(d=t.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[20]=h,e[21]=d):d=e[21];let x;e[22]!==d||e[23]!==m||e[24]!==u?(x=t.jsxs("div",{className:"space-y-2",children:[m,u,d]}),e[22]=d,e[23]=m,e[24]=u,e[25]=x):x=e[25];let g;e[26]!==n?(g=n("sandbox.runtimeFields.devServerPort"),e[26]=n,e[27]=g):g=e[27];let v;e[28]!==g?(v=t.jsx(we,{htmlFor:"runtime-port",children:g}),e[28]=g,e[29]=v):v=e[29];let j;e[30]!==n?(j=N=>{const{field:k}=N;return t.jsx(Ne,{ref:i,id:"runtime-port",inputMode:"numeric",placeholder:n("sandbox.runtimeFields.auto"),defaultValue:k.value??"",onBlur:V=>{const T=Ir(V.target.value);T.ok?k.onChange(T.value):i.current&&(i.current.value=k.value??"")}})},e[30]=n,e[31]=j):j=e[31];let y;e[32]!==s||e[33]!==j?(y=t.jsx(xe,{control:s,name:"metadata.runtime.port",render:j}),e[32]=s,e[33]=j,e[34]=y):y=e[34];let b;e[35]!==n?(b=n("sandbox.runtimeFields.devServerPortDescription"),e[35]=n,e[36]=b):b=e[36];let w;e[37]!==b?(w=t.jsx("p",{className:"text-xs text-muted-foreground",children:b}),e[37]=b,e[38]=w):w=e[38];let S;e[39]!==v||e[40]!==y||e[41]!==w?(S=t.jsxs("div",{className:"space-y-2",children:[v,y,w]}),e[39]=v,e[40]=y,e[41]=w,e[42]=S):S=e[42];let C;return e[43]!==x||e[44]!==S||e[45]!==o?(C=t.jsxs("div",{className:"space-y-5",children:[o,x,S]}),e[43]=x,e[44]=S,e[45]=o,e[46]=C):C=e[46],C}function Ar(a){const{field:e}=a;return t.jsx(Ne,{id:"runtime-path",placeholder:".",defaultValue:e.value??"",onBlur:s=>{const n=s.target.value.trim();e.onChange(n===""?null:n)}})}function Er(a){return t.jsx(Se,{value:a,children:a},a)}function zr(a){const e=Y.c(10),{control:s}=a,n=X(),[i,l]=q.useState(null),[c,r]=q.useState(null),f=zt({control:s,name:"metadata.runtime.path"})??"";let o;e[0]!==f?(o=ds(f),e[0]=f,e[1]=o):o=e[1];const p=o;let m;e[2]!==i||e[3]!==c||e[4]!==p||e[5]!==n?(m=h=>{const{field:d}=h,x=d.value??[],g=j=>d.onChange(j.length?j:null),v=()=>{if(i===null)return;const j=ds(i);if(!j){l(null),r(null);return}if(j===p||x.some(y=>y.path===j)){r(n("sandbox.runtimeApps.duplicate"));return}g([...x,{path:j}]),l(null),r(null)};return t.jsxs("div",{className:"space-y-2",children:[t.jsx(we,{htmlFor:"runtime-apps-draft",children:n("sandbox.runtimeApps.title")}),x.length>0&&t.jsx("ul",{className:"space-y-1.5",children:x.map(j=>t.jsxs("li",{className:"flex h-9 items-center gap-2 rounded-md border border-border px-3",children:[t.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:j.path}),t.jsx(Z,{type:"button",variant:"ghost",size:"icon-sm","aria-label":n("sandbox.runtimeApps.remove",{path:j.path}),onClick:()=>g(x.filter(y=>y.path!==j.path)),children:t.jsx(vt,{})})]},j.path))}),i!==null?t.jsx(Ne,{id:"runtime-apps-draft",autoFocus:!0,placeholder:"apps/checkout",value:i,"aria-invalid":!!c,onChange:j=>{l(j.target.value),r(null)},onBlur:v,onKeyDown:j=>{j.key==="Enter"?(j.preventDefault(),v()):j.key==="Escape"&&(l(null),r(null))}}):x.length<os&&t.jsxs(Z,{id:"runtime-apps-draft",type:"button",variant:"outline",size:"sm",onClick:()=>l(""),children:[t.jsx(Be,{}),n("sandbox.runtimeApps.add")]}),c?t.jsx("p",{className:"text-xs text-destructive",children:c}):t.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.runtimeApps.description",{max:String(os)})})]})},e[2]=i,e[3]=c,e[4]=p,e[5]=n,e[6]=m):m=e[6];let u;return e[7]!==s||e[8]!==m?(u=t.jsx(xe,{control:s,name:"metadata.runtime.apps",render:m}),e[7]=s,e[8]=m,e[9]=u):u=e[9],u}function Rr(a){const e=Y.c(5),{control:s}=a,n=X();let i;e[0]!==n?(i=c=>{const{field:r}=c;return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(we,{htmlFor:"field-description-tooltips",className:"font-normal text-foreground",children:n("sandbox.fieldDescriptionTooltipsField.label")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.fieldDescriptionTooltipsField.description")})]}),t.jsx(et,{id:"field-description-tooltips",className:"shrink-0",checked:r.value??!1,onCheckedChange:f=>r.onChange(f)})]})},e[0]=n,e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=t.jsx(xe,{control:s,name:"metadata.fieldDescriptionTooltips",render:i}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}function Lr(a){const e=Y.c(5),{control:s}=a,n=X();let i;e[0]!==n?(i=c=>{const{field:r}=c;return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(we,{htmlFor:"legacy-blog-post-format",className:"font-normal text-foreground",children:n("sandbox.legacyBlogPostFormatField.label")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("sandbox.legacyBlogPostFormatField.description")})]}),t.jsx(et,{id:"legacy-blog-post-format",className:"shrink-0",checked:r.value??!1,onCheckedChange:f=>r.onChange(f)})]})},e[0]=n,e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==i?(l=t.jsx(xe,{control:s,name:"metadata.legacyBlogPostFormat",render:i}),e[2]=s,e[3]=i,e[4]=l):l=e[4],l}function Ur(a){const e=Y.c(32),{control:s,onCommit:n}=a,i=X();let l;e[0]!==i?(l=i("virtualMcp.virtualMcp.publishPolicySmart"),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==i?(c=i("virtualMcp.virtualMcp.publishPolicySmartDescription"),e[2]=i,e[3]=c):c=e[3];let r;e[4]!==l||e[5]!==c?(r={value:"smart",label:l,description:c},e[4]=l,e[5]=c,e[6]=r):r=e[6];let f;e[7]!==i?(f=i("virtualMcp.virtualMcp.publishPolicyCodeReview"),e[7]=i,e[8]=f):f=e[8];let o;e[9]!==i?(o=i("virtualMcp.virtualMcp.publishPolicyCodeReviewDescription"),e[9]=i,e[10]=o):o=e[10];let p;e[11]!==f||e[12]!==o?(p={value:"code-review",label:f,description:o},e[11]=f,e[12]=o,e[13]=p):p=e[13];let m;e[14]!==i?(m=i("virtualMcp.virtualMcp.publishPolicyOpen"),e[14]=i,e[15]=m):m=e[15];let u;e[16]!==i?(u=i("virtualMcp.virtualMcp.publishPolicyOpenDescription"),e[16]=i,e[17]=u):u=e[17];let h;e[18]!==m||e[19]!==u?(h={value:"open",label:m,description:u},e[18]=m,e[19]=u,e[20]=h):h=e[20];let d;e[21]!==r||e[22]!==p||e[23]!==h?(d=[r,p,h],e[21]=r,e[22]=p,e[23]=h,e[24]=d):d=e[24];const x=d;let g;e[25]!==n||e[26]!==x||e[27]!==i?(g=j=>{const{field:y}=j,b=y.value??"smart";return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(we,{htmlFor:"publish-policy",className:"font-normal text-foreground",children:i("virtualMcp.virtualMcp.publishing")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("virtualMcp.virtualMcp.publishingDescription")})]}),t.jsxs(Le,{value:b,onValueChange:w=>{y.onChange(w),n()},children:[t.jsx(Ee,{id:"publish-policy",className:"w-44 shrink-0",children:t.jsx(ze,{})}),t.jsx(Re,{className:"max-w-80",children:x.map(Br)})]})]})},e[25]=n,e[26]=x,e[27]=i,e[28]=g):g=e[28];let v;return e[29]!==s||e[30]!==g?(v=t.jsx(xe,{name:"metadata.publishPolicy",control:s,render:g}),e[29]=s,e[30]=g,e[31]=v):v=e[31],v}function Br(a){return t.jsx(Se,{value:a.value,description:a.description,children:a.label},a.value)}function Yr(a){const e=Y.c(24),{control:s,onCommit:n}=a,i=X();let l;e[0]!==i?(l=i("sandbox.cmsSettings.contentEditing.off"),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==i?(c=i("sandbox.cmsSettings.contentEditing.offDescription"),e[2]=i,e[3]=c):c=e[3];let r;e[4]!==l||e[5]!==c?(r={value:"off",label:l,description:c},e[4]=l,e[5]=c,e[6]=r):r=e[6];let f;e[7]!==i?(f=i("sandbox.cmsSettings.contentEditing.on"),e[7]=i,e[8]=f):f=e[8];let o;e[9]!==i?(o=i("sandbox.cmsSettings.contentEditing.onDescription"),e[9]=i,e[10]=o):o=e[10];let p;e[11]!==f||e[12]!==o?(p={value:"on",label:f,description:o},e[11]=f,e[12]=o,e[13]=p):p=e[13];let m;e[14]!==r||e[15]!==p?(m=[r,p],e[14]=r,e[15]=p,e[16]=m):m=e[16];const u=m;let h;e[17]!==n||e[18]!==u||e[19]!==i?(h=x=>{const{field:g}=x,v=g.value??null,j=en(v);return t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsxs("div",{className:"space-y-0.5 min-w-0",children:[t.jsx(we,{htmlFor:"content-editing-mode",className:"font-normal text-foreground",children:i("sandbox.cmsSettings.contentEditing.title")}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.cmsSettings.contentEditing.description")})]}),t.jsxs(Le,{value:j,onValueChange:y=>{const b=ja.safeParse(y);b.success&&(g.onChange(ya(v,b.data)),n())},children:[t.jsx(Ee,{id:"content-editing-mode",className:"w-44 shrink-0",children:t.jsx(ze,{})}),t.jsx(Re,{className:"max-w-80",children:u.map(Wr)})]})]})},e[17]=n,e[18]=u,e[19]=i,e[20]=h):h=e[20];let d;return e[21]!==s||e[22]!==h?(d=t.jsx(xe,{name:"metadata.ui.layout",control:s,render:h}),e[21]=s,e[22]=h,e[23]=d):d=e[23],d}function Wr(a){return t.jsx(Se,{value:a.value,description:a.description,children:a.label},a.value)}function Ss(a){const e=a.metadata?.sidebarViews,s=a.metadata?.sidebarViewsVersion;return{effectiveViews:[...Ot(It(a.metadata),s)],rawViews:e===null?null:e?[...e]:void 0,version:s,seen:a.metadata?.sidebarViewsSeen??void 0}}function Ns(a,e){return a===e?!0:!a||!e||a.length!==e.length?!1:a.every((s,n)=>s===e[n])}function Kr(a,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...a,shareDialogOpen:e.payload};case"SET_ADD_DIALOG_OPEN":return{...a,addDialogOpen:e.payload};case"OPEN_SETTINGS":return{...a,settingsDialogOpen:!0,settingsConnectionId:e.payload};case"CLOSE_SETTINGS":return{...a,settingsDialogOpen:!1,settingsConnectionId:null};default:return a}}function Gr(a,e){switch(e.type){case"accumulate":{const s=a??{start:e.now,fields:new Set,saveCount:0,instructionsLength:null},n=new Set(s.fields);for(const i of e.fields)n.add(i);return{...s,fields:n,saveCount:s.saveCount+1,instructionsLength:e.instructionsLength??s.instructionsLength}}case"reset":return null}}function qr(a){const e=a.metadata?.runtime?.env;if(!e||e.length===0)return a;const s=e.filter(n=>{if(!n||typeof n!="object")return!1;const i=(n.key??"").trim();return!i||!wt.test(i)?!1:n.kind==="literal"?!0:n.kind==="secret"?!!n.secretId:!1});return s.length===e.length?a:{...a,metadata:{...a.metadata,runtime:{...a.metadata?.runtime??{},env:s}}}}async function Hr(a,e){const s=a?.idToken??null;if(s){const i=Cs(s);if(i)return i}const n=a?.userinfoEndpoint??null;if(n)try{const i=await fetch(n,{headers:{Authorization:`Bearer ${e}`}});if(i.ok){const l=await i.json(),c=typeof l.email=="string"?l.email:typeof l.upn=="string"?l.upn:typeof l.preferred_username=="string"?l.preferred_username:null;if(c)return c}}catch{}return Cs(e)}function Cs(a){try{const e=a.split(".");if(e.length===3&&e[1]){const s=JSON.parse(atob(e[1].replace(/-/g,"+").replace(/_/g,"/")));if(typeof s.email=="string")return s.email;if(typeof s.upn=="string")return s.upn;if(typeof s.preferred_username=="string")return s.preferred_username}}catch{}return null}function Qr({virtualMcp:a,contextSection:e}){const s=X(),n=si(),{org:i}=Ae(),l=li(),{data:c}=ri([a.id]),r=c?.get(a.id)?.last_used_at,f=$s(),o=Et(),p=ft(),m=Xs(a.id),u=JSON.stringify([i.id,a.id]),h=aa(a.metadata,m.snapshot()),d=In({resolver:$n(dr),defaultValues:{...a,metadata:{...cs(a.metadata),previewServerUrl:va(a.metadata),...h}}}),x=d.watch("connections"),g=Ia("multi_app_preview"),v=qi(a),j=Qs(a?.metadata),y=j&&en(d.watch("metadata.ui.layout"))==="off",b=As(a),w=b?{owner:b.owner,name:b.name,url:b.url}:null,[S,C]=q.useReducer(Kr,{shareDialogOpen:!1,addDialogOpen:!1,settingsDialogOpen:!1,settingsConnectionId:null}),[N,k]=q.useState(!1),[V,T]=q.useState(!1),{openSidePanel:_}=Zn(),{sendMessage:F}=Hn(),$=async()=>{if(V)return;const D=d.getValues("metadata.instructions");if(D?.trim()){T(!0);try{R(),_e("agent_instructions_improve_clicked",{agent_id:a.id,instructions_length:D.length}),_();const le=Gn(i.id);await F({tiptapDoc:Xn({managerAgentId:le.id,managerName:le.title,kind:"agent",id:a.id,instructions:D})})}finally{T(!1)}}},[A,P]=q.useReducer(Gr,null),H=()=>{A!==null&&(_e("agent_updated",{agent_id:a.id,fields:Array.from(A.fields),instructions_length:A.instructionsLength,save_count:A.saveCount,edit_duration_ms:Date.now()-A.start}),P({type:"reset"}))},{schedule:Q,flush:R}=Zt({delayMs:3e4,save:async()=>H()}),z=async()=>{const D=m.snapshot(),le={predicate:Ce=>rs(Ce.queryKey,i.id)},se=async()=>(await o.invalidateQueries({predicate:Ce=>rs(Ce.queryKey,i.id),refetchType:"all"}),ls(o,i.id,a.id)),ve=(Ce,He)=>{if(Ce){Ns(d.getValues("metadata.sidebarViews"),Ce.rawViews)||d.setValue("metadata.sidebarViews",Ce.rawViews,{shouldDirty:!1}),d.getValues("metadata.sidebarViewsVersion")!==Ce.version&&d.setValue("metadata.sidebarViewsVersion",Ce.version,{shouldDirty:!1}),Ns(d.getValues("metadata.sidebarViewsSeen"),Ce.seen)||d.setValue("metadata.sidebarViewsSeen",Ce.seen,{shouldDirty:!1});return}He!==null&&(d.setValue("metadata.sidebarViews",[...He],{shouldDirty:!1}),d.setValue("metadata.sidebarViewsVersion",na,{shouldDirty:!1}))},Me=la(D),Ie=Object.keys(d.control._formState.dirtyFields);if(Ie.length===0&&!Me){await m.settle({snapshot:D,saved:!0,authoritativeViews:D?.persistedViews});return}const Ge=Ie.length>0?Ie:["metadata"],ot=Ge.includes("metadata"),qe=d.getValues();d.reset(qe,{keepValues:!0});const tt=qr(qe),pn=ls(o,i.id,a.id),hn=ra({sidebarViews:tt.metadata?.sidebarViews,sidebarViewsVersion:tt.metadata?.sidebarViewsVersion},D,pn?.metadata);tt.metadata={...cs(tt.metadata),...hn};let Nt;try{Nt=await l.update.mutateAsync({id:a.id,data:tt})}catch(Ce){let He=null;try{He=await se()}catch{}const Wt=He?Ss(He):null,Kt=await m.settle({snapshot:D,saved:!1,authoritativeViews:Wt?.effectiveViews});throw Kt.settledLatest&&ve(Wt,Kt.reconciledViews),Ce}await o.cancelQueries(le),oa(o,i.id,Nt);const Bt=Ss(Nt),Yt=await m.settle({snapshot:D,saved:!0,authoritativeViews:Bt.effectiveViews});Yt.settledLatest&&ve(Bt,Yt.reconciledViews),P({type:"accumulate",now:Date.now(),fields:Ge,instructionsLength:ot?qe.metadata?.instructions?.length??0:null}),Q()},K=()=>$a(u,z),{schedule:E,flush:L}=Zt({save:K});q.useEffect(()=>{const D=d.watch(()=>E());return()=>D.unsubscribe()},[]);const G=()=>{_e("connections_dialog_opened",{source:"agent_settings",mode:"add"}),C({type:"SET_ADD_DIALOG_OPEN",payload:!0})},J=async D=>{const le=d.getValues("connections");if(le.some(Me=>Me.connection_id===D))return;d.setValue("connections",[...le,{connection_id:D,selected_tools:Vt.tools,selected_resources:Vt.resources,selected_prompts:Vt.prompts}],{shouldDirty:!0}),C({type:"SET_ADD_DIALOG_OPEN",payload:!1});const se=new URL(`/api/${i.slug}/mcp/${D}`,window.location.origin),ve=await Jt({url:se.href,token:null,orgId:i.id});ve.supportsOAuth&&!ve.isAuthenticated&&await B(D)},ee=D=>{const se=d.getValues("connections").filter(ve=>ve.connection_id!==D);d.setValue("connections",se,{shouldDirty:!0})},M=(D,le)=>{const se=d.getValues("connections");if(se.some(ve=>ve.connection_id===le)){ie.error(s("virtualMcp.virtualMcp.instanceAlreadyAdded"));return}d.setValue("connections",se.map(ve=>ve.connection_id===D?{...ve,connection_id:le}:ve),{shouldDirty:!0})},O=async D=>{if(d.getValues("connections").find(se=>se.connection_id===D))try{const{item:se}=await p.call("COLLECTION_CONNECTIONS_GET",{id:D});if(!se)return;const ve=se.title.replace(/\s*\(.*?\)\s*$/,""),Me=qn("conn"),Ie=`${ve} (${Date.now().toString(36).slice(-4)})`;await f.create.mutateAsync({id:Me,title:Ie,description:se.description??null,connection_type:se.connection_type,connection_url:se.connection_url??null,connection_token:null,icon:se.icon??null,app_name:se.app_name??null,app_id:se.app_id??null,connection_headers:se.connection_headers??null});const Ge=new URL(`/api/${i.slug}/mcp/${Me}`,window.location.origin),ot=await Jt({url:Ge.href,token:null,orgId:i.id});if(ot.supportsOAuth&&!ot.isAuthenticated){const qe=await B(Me);if(!qe){await f.delete.mutateAsync(Me);return}await f.update.mutateAsync({id:Me,data:{title:`${ve} (${qe})`}})}M(D,Me),ie.success(s("virtualMcp.virtualMcp.newInstanceCreated"))}catch(se){console.error("Failed to create instance:",se),ie.error(s("virtualMcp.virtualMcp.failedToCreateInstance"))}},U=D=>{C({type:"OPEN_SETTINGS",payload:D})},B=async D=>{const{token:le,tokenInfo:se,error:ve}=await ii({connectionId:D,orgSlug:i.slug,scope:"offline_access"});if(ve||!le)return ie.error(s("virtualMcp.virtualMcp.authenticationFailed",{error:ve??""})),null;if(se)try{const Ie=await fetch(`/api/${i.slug}/connections/${D}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:se.accessToken,refreshToken:se.refreshToken,expiresIn:se.expiresIn,scope:se.scope,clientId:se.clientId,clientSecret:se.clientSecret,tokenEndpoint:se.tokenEndpoint})});if(!Ie.ok)console.error("Failed to save OAuth token:",await Ie.text()),await f.update.mutateAsync({id:D,data:{connection_token:le}});else try{await f.update.mutateAsync({id:D,data:{}})}catch(Ge){console.warn("Failed to refresh connection tools after OAuth:",Ge)}}catch(Ie){console.error("Error saving OAuth token:",Ie),await f.update.mutateAsync({id:D,data:{connection_token:le}})}else await f.update.mutateAsync({id:D,data:{connection_token:le}});const Me=new URL(`/api/${i.slug}/mcp/${D}`,window.location.origin);return await o.invalidateQueries({queryKey:At.isMCPAuthenticated(Me.href,null)}),ie.success(s("virtualMcp.virtualMcp.authenticationSuccessful")),Hr(se,le)},W=()=>{const D=d.getValues("metadata.instructions")??"",le=s("virtualMcp.virtualMcp.promptTemplateContent"),se=D.trim()?`${D}
3
-
4
- ${le}`:le;d.setValue("metadata.instructions",se,{shouldDirty:!0})},re=new Set(x.map(D=>D.connection_id)),{section:oe}=Zl(),me=e!==null,ne=e==="instructions"?null:e??oe,ue=ne==="general",fe=me?e==="instructions":ue,pe=xa(a.id),ce=Fn(a.metadata),ge=ql({virtualMcpId:a.id,form:d,flushAndSave:L}),je=pt(),[de,I]=q.useState(!1),te=async()=>{R();try{await l.delete.mutateAsync(a.id),_e("agent_deleted",{agent_id:a.id,source:"agent_detail"}),ie.success(s("virtualMcp.virtualMcp.agentDeleted",{title:a.title})),je({to:"/$org",params:{org:i.slug}})}catch{}},Pe=t.jsxs(Z,{variant:"outline",size:"sm",onClick:()=>{_e("agent_connect_modal_opened",{agent_id:a.id}),C({type:"SET_SHARE_DIALOG_OPEN",payload:!0})},children:[t.jsx(An,{size:14}),s("virtualMcp.virtualMcp.connect")]}),he=t.jsxs("div",{className:"flex items-center gap-2",children:[!d.watch("metadata.instructions")?.trim()&&t.jsx(Z,{variant:"outline",size:"sm",onClick:W,children:s("virtualMcp.virtualMcp.promptTemplate")}),t.jsxs(Z,{variant:"outline",size:"sm",disabled:V||!d.watch("metadata.instructions")?.trim(),onClick:$,children:[t.jsx(dt,{size:13}),s("virtualMcp.virtualMcp.improve")]})]});return t.jsxs(Ke,{children:[t.jsxs(t.Fragment,{children:[!me&&t.jsxs(t.Fragment,{children:[t.jsx(Ke.Title,{children:s("virtualMcp.settings.title")}),t.jsx(Jl,{section:ne??"general"})]}),t.jsx(Ke.Actions,{secondary:ne==="connections"?Pe:void 0,children:ne==="connections"?t.jsxs(Z,{size:"sm",onClick:G,children:[t.jsx(Be,{size:14}),s("virtualMcp.virtualMcp.addConnection")]}):ne==="general"?Pe:null}),t.jsx(Ke.Content,{children:t.jsx(Ke.Container,{width:"standard",className:"@container/project-settings",children:t.jsxs(En,{children:[ne==="views"&&t.jsx(Wl,{views:ge}),ue&&t.jsxs(t.Fragment,{children:[t.jsx(Xl,{form:d,onCommit:L}),t.jsx(Hl,{form:d,onCommit:L})]}),ne==="connections"&&t.jsx("section",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:x.length===0?t.jsxs("button",{type:"button",onClick:G,className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-dashed border-border hover:bg-accent transition-colors w-full text-left cursor-pointer",children:[t.jsx("div",{className:"flex items-center justify-center size-8 rounded-md text-muted-foreground/75 border border-dashed border-border shrink-0",children:t.jsx(Be,{size:16})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:s("virtualMcp.virtualMcp.noConnectionsYet")})]}):x.map(D=>t.jsx(Xe,{fallback:()=>null,children:t.jsx(q.Suspense,{fallback:t.jsx(rn,{}),children:t.jsx(Pl,{connection_id:D.connection_id,usedConnectionIds:re,onOpenSettings:()=>U(D.connection_id),onRemove:()=>ee(D.connection_id),onAuthenticate:B,onSwitchInstance:M,onNewInstance:()=>O(D.connection_id)})})},D.connection_id))})}),fe&&t.jsxs("section",{className:"flex flex-col gap-3",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground",children:s("virtualMcp.virtualMcp.instructions")}),he]}),t.jsx(xe,{name:"metadata.instructions",control:d.control,render:({field:D})=>t.jsxs("div",{className:"relative rounded-xl shadow-edge bg-card focus-within-ring",children:[t.jsx(ut,{...D,value:D.value??"",onChange:le=>{D.onChange(le)},onBlur:()=>{D.onBlur(),L()},placeholder:s("virtualMcp.virtualMcp.instructionsPlaceholder"),className:"min-h-[200px] max-h-[360px] overflow-auto resize-none text-base text-muted-foreground placeholder:text-muted-foreground/40 leading-relaxed border-0 shadow-none px-4 py-3 pr-11 focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent",style:{boxShadow:"none"}}),t.jsxs(Ve,{delayDuration:0,children:[t.jsx(Te,{asChild:!0,children:t.jsx(Z,{type:"button",variant:"ghost",size:"icon-sm",className:"absolute top-2 right-2 text-muted-foreground",onClick:()=>k(!0),"aria-label":s("virtualMcp.virtualMcp.openFullscreenEditor"),children:t.jsx(oi,{size:14})})}),t.jsx(De,{side:"left",children:s("virtualMcp.virtualMcp.fullscreen")})]})]})})]}),fe&&t.jsx(rl,{form:d}),ne==="site"&&!j&&t.jsx(Oe,{children:t.jsx(ke,{children:t.jsx($e,{title:s("virtualMcp.settings.cmsEmptyTitle"),description:s("virtualMcp.settings.cmsEmpty"),action:t.jsx(Z,{size:"sm",variant:"outline",asChild:!0,children:t.jsx(Ft,{to:".",search:{section:"repository"},children:s("virtualMcp.settings.repository.open")})})})})}),ne==="site"&&j&&t.jsx(Oe,{title:s("sandbox.cmsSettings.title"),children:t.jsxs(ke,{children:[t.jsx(be,{children:t.jsx(Yr,{control:d.control,onCommit:L})}),!y&&t.jsx(be,{children:t.jsx(Rr,{control:d.control})}),!y&&t.jsx(be,{children:t.jsx(Lr,{control:d.control})}),!y&&v&&t.jsx(be,{children:t.jsx(Ur,{control:d.control,onCommit:L})})]})}),ne==="site"&&!y&&t.jsx(Oe,{title:s("sandbox.cmsSettings.preview.title"),description:s("sandbox.cmsSettings.preview.description"),children:t.jsx(ke,{children:t.jsx(cr,{control:d.control,isBlocksV8:pe,previewServerUrl:d.watch("metadata.previewServerUrl"),fastPreview:d.watch("metadata.fastPreview")})})}),ne==="site"&&t.jsx(ir,{virtualMcp:a}),ne==="site"&&pe&&ce&&t.jsx(sr,{orgSlug:i.slug,virtualMcpId:a.id,site:ce}),ne==="repository"&&t.jsx(Dr,{repo:w,onConnect:D=>(d.setValue("metadata.repository",D,{shouldDirty:!0}),L())}),ne==="repository"&&t.jsx(Oe,{title:s("virtualMcp.settings.repository.runtimeTitle"),description:s("virtualMcp.settings.repository.runtimeDescription"),children:t.jsxs(ke,{children:[t.jsx(be,{children:t.jsx(Fr,{control:d.control})}),g&&t.jsx(be,{children:t.jsx(zr,{control:d.control})}),t.jsx(be,{children:t.jsx(wr,{control:d.control,form:d,virtualMcpId:a.id,orgSlug:i.slug,sandboxMap:a.metadata.sandboxMap})})]})}),ue&&t.jsx(Oe,{title:s("virtualMcp.settings.groups.details"),children:t.jsxs(ke,{children:[t.jsx($e,{title:s("virtualMcp.virtualMcp.createdBy"),action:t.jsx(Qn,{id:a.created_by,size:"2xs",className:"text-sm text-muted-foreground"})}),t.jsx($e,{title:s("virtualMcp.virtualMcp.created"),action:t.jsx("span",{className:"text-sm text-muted-foreground",children:al(new Date(a.created_at),"PP",{locale:n})})}),t.jsx($e,{title:s("virtualMcp.virtualMcp.lastUsedLabel"),action:t.jsx("span",{className:"text-sm text-muted-foreground",children:r?ni(new Date(r),{addSuffix:!0,locale:n}):s("virtualMcp.virtualMcp.neverUsed")})})]})}),ue&&t.jsx(Oe,{title:s("virtualMcp.settings.groups.advanced"),children:t.jsx(ke,{children:t.jsx($e,{title:s("virtualMcp.virtualMcp.deleteAgent"),description:s("virtualMcp.virtualMcp.deleteAgentDescription"),action:t.jsxs(Z,{variant:"outline",size:"sm",className:"text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:()=>I(!0),children:[t.jsx(vt,{size:14}),s("virtualMcp.virtualMcp.deleteAgent")]})})})})]})})},e??ne)]}),t.jsx(zn,{open:de,onOpenChange:I,children:t.jsxs(Rn,{children:[t.jsxs(Ln,{children:[t.jsx(Un,{children:s("virtualMcp.virtualMcp.deleteAgentConfirm")}),t.jsx(Bn,{children:s("virtualMcp.virtualMcp.deleteAgentConfirmDescription",{title:a.title})})]}),t.jsxs(Yn,{children:[t.jsx(Wn,{children:s("virtualMcp.virtualMcp.cancel")}),t.jsx(Kn,{onClick:te,variant:"destructive",children:s("virtualMcp.virtualMcp.delete")})]})]})}),t.jsx(di,{open:S.addDialogOpen,onOpenChange:D=>C({type:"SET_ADD_DIALOG_OPEN",payload:D}),agentId:a.id,addedConnectionIds:re,onAdd:J}),t.jsx(Dl,{open:S.settingsDialogOpen,onOpenChange:D=>{D||C({type:"CLOSE_SETTINGS"})},selectedId:S.settingsConnectionId,form:d,connections:x,onAuthenticate:B}),t.jsx(br,{open:S.shareDialogOpen,onOpenChange:D=>C({type:"SET_SHARE_DIALOG_OPEN",payload:D}),virtualMcp:a}),t.jsx(lt,{open:N,onOpenChange:k,children:t.jsxs(at,{className:"w-[90vw] sm:max-w-6xl h-[85vh] flex flex-col p-0 gap-0",children:[t.jsx(xt,{className:"px-6 pt-6 pb-3 border-b border-border shrink-0",children:t.jsx(ht,{children:s("virtualMcp.virtualMcp.instructions")})}),t.jsx("div",{className:"flex-1 min-h-0 p-6",children:t.jsx(xe,{name:"metadata.instructions",control:d.control,render:({field:D})=>t.jsx(ut,{...D,value:D.value??"",onChange:le=>{D.onChange(le)},onBlur:()=>{D.onBlur(),L()},placeholder:s("virtualMcp.virtualMcp.instructionsPlaceholder"),className:"w-full h-full resize-none text-base text-muted-foreground placeholder:text-muted-foreground/40 leading-relaxed rounded-xl shadow-edge px-4 py-3 focus-ring bg-card border-0",style:{boxShadow:"none"}})})})]})})]})}function fc(a){const e=Y.c(22),{virtualMcpId:s,contextSection:n}=a,i=n===void 0?null:n,l=X(),c=pt(),{org:r}=Ae(),f=Fs(s);if(!f){let u;e[0]!==l?(u=l("virtualMcp.virtualMcp.spaceNotFound"),e[0]=l,e[1]=u):u=e[1];let h;e[2]!==l?(h=l("virtualMcp.virtualMcp.spaceNotFoundDescription"),e[2]=l,e[3]=h):h=e[3];let d;e[4]!==c||e[5]!==r.slug?(d=()=>c({to:"/$org",params:{org:r.slug}}),e[4]=c,e[5]=r.slug,e[6]=d):d=e[6];let x;e[7]!==l?(x=l("virtualMcp.virtualMcp.backToSpaces"),e[7]=l,e[8]=x):x=e[8];let g;e[9]!==d||e[10]!==x?(g=t.jsx(Z,{variant:"outline",onClick:d,children:x}),e[9]=d,e[10]=x,e[11]=g):g=e[11];let v;return e[12]!==u||e[13]!==h||e[14]!==g?(v=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Jn,{title:u,description:h,actions:g})}),e[12]=u,e[13]=h,e[14]=g,e[15]=v):v=e[15],v}let o;e[16]!==f?(o=As(f)?.connectionId??"",e[16]=f,e[17]=o):o=e[17];const p=`${f.id}:${o}`;let m;return e[18]!==i||e[19]!==p||e[20]!==f?(m=t.jsx(Qr,{virtualMcp:f,contextSection:i},p),e[18]=i,e[19]=p,e[20]=f,e[21]=m):m=e[21],m}export{fc as V};
@@ -1 +0,0 @@
1
- import{c as v,a6 as z,K as W,i as Y,m as $,j as l,b as M,B,L as V,r as w,d as K,E as L,x as X,aU as Z,w as J,v as ee,D as te}from"./index-B2vvUsuK.js";import{n as se}from"./ArrowUp-C_Mw0uky.js";import{u as H,f as G,T as ne,A as ae,n as re,o as ie,b as oe,c as le,p as ce,q as ue,t as de,L as fe}from"./chat-context-DsLpz7ew.js";import{T as me,c as ge,b as xe,d as pe,H as he}from"./input-DFHiqhmH.js";import{u as je,a as ve,S as be,M as A}from"./pair-IZ41S3dI.js";import{A as ye,f as Q}from"./agent-icon-ButaHLCM.js";import{n as Ne}from"./use-sandbox-events-CrjWSBYb.js";import{a as Ce}from"./agent-capabilities-B8dQ_ZB8.js";import{a as we}from"./repository-binding-DC98qYdg.js";import{c as Se,i as ke}from"./thread-intent-DC5UuPI5.js";import{a as Te}from"./use-panel-navigate-BvdMbLN8.js";import{N as $e}from"./index-CDpTFqpR.js";import{i as Ee}from"./ArrowRight-DZeVAIN7.js";import{d as De}from"./use-entitlements-D-BsJsBn.js";import{u as Pe}from"./use-deco-credits-CrAjq5eE.js";import{F as _e}from"./feature-paywall-CuECkoDT.js";import{i as Ie}from"./AlertCircle-BLw7QvfG.js";const Oe=15e3;function Me(e,t,n){const s=v.c(20),r=n===void 0?{}:n,{org:a}=z(),i=we(e);let c;s[0]!==t||s[1]!==i?.metadata||s[2]!==e?(c=!!e&&!!t&&Ce(i?.metadata),s[0]=t,s[1]=i?.metadata,s[2]=e,s[3]=c):c=s[3];const u=c;let o;s[4]!==t||s[5]!==a.slug||s[6]!==e?(o=W.chatDraftChanges(a.slug,e??"",t??""),s[4]=t,s[5]=a.slug,s[6]=e,s[7]=o):o=s[7];let d;s[8]!==t||s[9]!==a.slug||s[10]!==e?(d=()=>Ne(a.slug,e,t),s[8]=t,s[9]=a.slug,s[10]=e,s[11]=d):d=s[11];const p=r.poll===!1?!1:Oe;let g;s[12]!==u||s[13]!==o||s[14]!==d||s[15]!==p?(g={queryKey:o,queryFn:d,enabled:u,refetchInterval:p,retry:!1},s[12]=u,s[13]=o,s[14]=d,s[15]=p,s[16]=g):g=s[16];const{data:m}=Y(g),f=m===void 0?0:m,x=u?i:null;let h;return s[17]!==f||s[18]!==x?(h={project:x,changeCount:f},s[17]=f,s[18]=x,s[19]=h):h=s[19],h}function Fe(){const e=v.c(7),t=H(),n=G(),s=t?.virtualMcpId??null,r=t?.currentBranch??null,{project:a,changeCount:i}=Me(s,r);if(!a||!s||!r||i===0)return null;const c=a.icon??null,u=!!n&&(n.isRunInProgress||n.status==="streaming"||n.status==="submitted");let o;return e[0]!==r||e[1]!==i||e[2]!==a.title||e[3]!==c||e[4]!==u||e[5]!==s?(o={virtualMcpId:s,projectTitle:a.title,projectIcon:c,branch:r,changeCount:i,editing:u},e[0]=r,e[1]=i,e[2]=a.title,e[3]=c,e[4]=u,e[5]=s,e[6]=o):o=e[6],o}function Re(e){const t=v.c(24),{icon:n,title:s,subtitle:r,status:a,detail:i,action:c,className:u}=e;let o;t[0]!==u?(o=$("rounded-xl border border-border bg-card p-3",u),t[0]=u,t[1]=o):o=t[1];let d;t[2]!==n?(d=l.jsx("div",{className:"shrink-0",children:n}),t[2]=n,t[3]=d):d=t[3];let p;t[4]!==s?(p=l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s}),t[4]=s,t[5]=p):p=t[5];let g;t[6]!==r?(g=r&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r}),t[6]=r,t[7]=g):g=t[7];let m;t[8]!==p||t[9]!==g?(m=l.jsxs("div",{className:"min-w-0 flex-1",children:[p,g]}),t[8]=p,t[9]=g,t[10]=m):m=t[10];let f;t[11]!==a?(f=a&&l.jsx("span",{className:"flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground",children:a}),t[11]=a,t[12]=f):f=t[12];let x;t[13]!==d||t[14]!==m||t[15]!==f?(x=l.jsxs("div",{className:"flex items-center gap-2.5",children:[d,m,f]}),t[13]=d,t[14]=m,t[15]=f,t[16]=x):x=t[16];let h;t[17]!==c||t[18]!==i?(h=(i||c)&&l.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:i}),c]}),t[17]=c,t[18]=i,t[19]=h):h=t[19];let b;return t[20]!==o||t[21]!==x||t[22]!==h?(b=l.jsxs("div",{className:o,children:[x,h]}),t[20]=o,t[21]=x,t[22]=h,t[23]=b):b=t[23],b}function ze(e){const t=v.c(10),{draft:n}=e,s=M(),r=n.editing?"animate-pulse bg-warning":"bg-success";let a;t[0]!==r?(a=$("size-1.5 rounded-full",r),t[0]=r,t[1]=a):a=t[1];let i;t[2]!==a?(i=l.jsx("span",{"aria-hidden":!0,className:a}),t[2]=a,t[3]=i):i=t[3];const c=n.editing?"chat.draft.editing":"chat.draft.ready";let u;t[4]!==s||t[5]!==c?(u=s(c),t[4]=s,t[5]=c,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==u?(o=l.jsxs(l.Fragment,{children:[i,u]}),t[7]=i,t[8]=u,t[9]=o):o=t[9],o}function Be(e){const t=v.c(11),{draft:n}=e,s=M(),{org:r}=z(),a=H()?.taskId??null;let i;t[0]!==n.virtualMcpId||t[1]!==r.slug?(i={org:r.slug,agentId:n.virtualMcpId},t[0]=n.virtualMcpId,t[1]=r.slug,t[2]=i):i=t[2];let c;t[3]!==a?(c=a?{thread:a}:{},t[3]=a,t[4]=c):c=t[4];let u;t[5]!==s?(u=s("chat.draft.open"),t[5]=s,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==c||t[9]!==u?(o=l.jsx(B,{variant:"outline",size:"sm",asChild:!0,children:l.jsx(V,{to:"/$org/projects/$agentId/site-editor",params:i,search:c,children:u})}),t[7]=i,t[8]=c,t[9]=u,t[10]=o):o=t[10],o}function q(){const e=v.c(20),t=M(),n=Fe();if(!n)return null;let s;e[0]!==n.projectIcon||e[1]!==n.projectTitle?(s=l.jsx(ye,{icon:n.projectIcon,name:n.projectTitle,size:"sm"}),e[0]=n.projectIcon,e[1]=n.projectTitle,e[2]=s):s=e[2];const r=n.projectTitle;let a;e[3]!==n.branch?(a=l.jsx("span",{className:"font-mono",children:n.branch}),e[3]=n.branch,e[4]=a):a=e[4];let i;e[5]!==n?(i=l.jsx(ze,{draft:n}),e[5]=n,e[6]=i):i=e[6];const c=n.changeCount===1?"chat.draft.change":"chat.draft.changes";let u;e[7]!==n.changeCount||e[8]!==t||e[9]!==c?(u=t(c,{count:n.changeCount}),e[7]=n.changeCount,e[8]=t,e[9]=c,e[10]=u):u=e[10];let o;e[11]!==n?(o=l.jsx(Be,{draft:n}),e[11]=n,e[12]=o):o=e[12];let d;return e[13]!==n.projectTitle||e[14]!==s||e[15]!==a||e[16]!==i||e[17]!==u||e[18]!==o?(d=l.jsx(Re,{className:"mx-2.5 mb-6",icon:s,title:r,subtitle:a,status:i,detail:u,action:o}),e[13]=n.projectTitle,e[14]=s,e[15]=a,e[16]=i,e[17]=u,e[18]=o,e[19]=d):d=e[19],d}function He(e){return e.parts.some(t=>t.type==="dynamic-tool"||t.type.startsWith("tool-"))}function Le(e){let t=0;for(const n of e)for(const s of n.parts??[]){const r=s;r.type==="tool-load_repo"&&r.state==="output-available"&&r.output?.success===!0&&t++}return t}function Ae(){const e=v.c(11),{openPanel:t}=Te(),n=Se(),s=G()?.messages??[],r=H(),a=r?.taskId??null,i=r?.currentBranch;let c;e[0]!==i?(c=ke(i),e[0]=i,e[1]=c):c=e[1];const u=c;let o;e[2]!==s?(o=Le(s),e[2]=s,e[3]=o):o=e[3];const d=o,p=w.useRef(null),g=w.useRef(null);let m,f;e[4]!==u||e[5]!==d||e[6]!==n||e[7]!==t||e[8]!==a?(m=()=>{if(!d||!a)return;const x=`${a}:${d}`;g.current!==x&&(g.current=x,n?.refreshThreadMetadata(a)),p.current!==a&&(p.current=a,u||t("site-editor"))},f=[d,a,t,n,u],e[4]=u,e[5]=d,e[6]=n,e[7]=t,e[8]=a,e[9]=m,e[10]=f):(m=e[9],f=e[10]),w.useEffect(m,f)}function U(e){return`deco-credits-empty-dismissed:${e}`}function pt(e){try{return localStorage.getItem(U(e))==="1"}catch{return!1}}function qe(){const e=v.c(56),t=M(),{org:n}=z(),s=De("credits"),r=K(),{decoKeyId:a}=Pe(),[i,c]=w.useState(!0);let u;e[0]!==n.id?(u=()=>{L("credits_empty_state_dismissed",{organization_id:n.id}),c(!1);try{localStorage.setItem(U(n.id),"1")}catch{}},e[0]=n.id,e[1]=u):u=e[1];const o=u;let d,p;if(e[2]!==i||e[3]!==n.id?(d=()=>{i&&L("credits_empty_state_shown",{organization_id:n.id})},p=[i,n.id],e[2]=i,e[3]=n.id,e[4]=d,e[5]=p):(d=e[4],p=e[5]),w.useEffect(d,p),!i)return null;if(!s){let k;e[6]!==t?(k=t("chat.input.allowanceExhaustedTitle"),e[6]=t,e[7]=k):k=e[7];let O;e[8]!==k?(O={title:k},e[8]=k,e[9]=O):O=e[9];let R;return e[10]!==o||e[11]!==O?(R=l.jsx(_e,{feature:"chat",copy:O,onDismiss:o}),e[10]=o,e[11]=O,e[12]=R):R=e[12],R}let g;e[13]!==o?(g=k=>!k&&o(),e[13]=o,e[14]=g):g=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(Q,{size:20,className:"text-warning"})}),e[16]=f):f=e[16];let x;e[17]!==t?(x=t("chat.creditsEmptyState.title"),e[17]=t,e[18]=x):x=e[18];let h;e[19]!==x?(h=l.jsx(X,{className:"text-lg font-semibold",children:x}),e[19]=x,e[20]=h):h=e[20];let b;e[21]!==t?(b=t("chat.creditsEmptyState.description"),e[21]=t,e[22]=b):b=e[22];let N;e[23]!==b?(N=l.jsx(Z,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:b}),e[23]=b,e[24]=N):N=e[24];let C;e[25]!==h||e[26]!==N?(C=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[m,l.jsxs(J,{className:"relative gap-3",children:[f,l.jsxs("div",{className:"text-center",children:[h,N]})]})]}),e[25]=h,e[26]=N,e[27]=C):C=e[27];let y;e[28]!==a||e[29]!==o?(y=a&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(me,{source:"empty_state",onDone:o})}),e[28]=a,e[29]=o,e[30]=y):y=e[30];let S;e[31]!==o||e[32]!==r||e[33]!==n.slug?(S=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),o()},e[31]=o,e[32]=r,e[33]=n.slug,e[34]=S):S=e[34];let j;e[35]!==t?(j=t("chat.creditsEmptyState.useYourOwnProvider"),e[35]=t,e[36]=j):j=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx(Ee,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),e[37]=T):T=e[37];let E;e[38]!==S||e[39]!==j?(E=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:S,children:[j,T]}),e[38]=S,e[39]=j,e[40]=E):E=e[40];let D;e[41]!==t?(D=t("chat.creditsEmptyState.skipForNow"),e[41]=t,e[42]=D):D=e[42];let P;e[43]!==o||e[44]!==D?(P=l.jsx(B,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:o,children:D}),e[43]=o,e[44]=D,e[45]=P):P=e[45];let _;e[46]!==E||e[47]!==P?(_=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[E,P]}),e[46]=E,e[47]=P,e[48]=_):_=e[48];let I;e[49]!==C||e[50]!==y||e[51]!==_?(I=l.jsxs(ee,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ke,children:[C,y,_]}),e[49]=C,e[50]=y,e[51]=_,e[52]=I):I=e[52];let F;return e[53]!==I||e[54]!==g?(F=l.jsx(te,{open:!0,onOpenChange:g,children:I}),e[53]=I,e[54]=g,e[55]=F):F=e[55],F}function Ke(e){return e.preventDefault()}function Ge(e){const t=v.c(6),{balanceDollars:n}=e;let s;t[0]!==n?(s=n.toFixed(2),t[0]=n,t[1]=s):s=t[1];const r=s;let a,i;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),i=l.jsx(Q,{size:13,className:"text-success"}),t[2]=a,t[3]=i):(a=t[2],i=t[3]);let c;return t[4]!==r?(c=l.jsxs("div",{className:a,children:[i,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",r," in credits to get started"]})]}),t[4]=r,t[5]=c):c=t[5],c}function Qe(){const e=v.c(8),{org:t}=z(),n=K();let s;e[0]!==n||e[1]!==t.slug?(s=()=>n({to:"/$org/settings/ai-providers",params:{org:t.slug}}),e[0]=n,e[1]=t.slug,e[2]=s):s=e[2];let r,a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=l.jsx(Ie,{size:13,className:"text-warning"}),i=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),e[3]=r,e[4]=a,e[5]=i):(r=e[3],a=e[4],i=e[5]);let c;return e[6]!==s?(c=l.jsxs("button",{type:"button",onClick:s,className:r,children:[a,i]}),e[6]=s,e[7]=c):c=e[7],c}function Ue(e){const t=v.c(7),{scrollRef:n,sentinelRef:s,hasMoreOlder:r,isFetchingOlder:a,fetchOlderMessages:i}=e;let c,u;t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==s?(c=()=>{const o=s.current,d=n.current;if(!o||!d||!r)return;const p=new IntersectionObserver(async g=>{if(!g[0]?.isIntersecting||a||!r)return;const f=d.scrollHeight,x=d.scrollTop;await i(),requestAnimationFrame(()=>{const h=d.scrollHeight;d.scrollTop=x+(h-f)})},{root:d,rootMargin:"200px 0px 0px 0px"});return p.observe(o),()=>p.disconnect()},u=[n,s,r,a,i],t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=u):(c=t[5],u=t[6]),w.useEffect(c,u)}function We(e){const t=v.c(5),{className:n,children:s}=e;let r;t[0]!==n?(r=$("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",n),t[0]=n,t[1]=r):r=t[1];let a;return t[2]!==s||t[3]!==r?(a=l.jsx("div",{className:r,children:s}),t[2]=s,t[3]=r,t[4]=a):a=t[4],a}function Ye(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-1 min-h-0 overflow-y-auto isolate",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}function Ve(e){const t=v.c(2),{children:n}=e;let s;return t[0]!==n?(s=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:n}),t[0]=n,t[1]=s):s=t[1],s}function Xe(){const e=M(),{messages:t,status:n,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a,isRunInProgress:i}=oe(),{taskId:c}=le();Ae();const u=ce(c??""),o=ue(u),d=o.size===0?t:t.filter(j=>!o.has(j.id)),p=de(d,n==="submitted"||n==="streaming"||i),g=p.visible,m=je(g),f=m.at(-1),x=m.findIndex(j=>!!j.assistant&&He(j.assistant)),b=pe()*he+16,N=w.useRef(null),C=w.useRef(null);Ue({scrollRef:N,sentinelRef:C,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a});const y=ve({initial:!1}),S=j=>{N.current=j,y.scrollRef(j)};return l.jsx(fe.Provider,{value:p,children:l.jsx(be,{messages:t,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),r&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:e("chat.chat.loadingOlderMessages")}),m.slice(0,-1).map((j,T)=>l.jsxs(w.Fragment,{children:[l.jsx(A,{pair:j,isLastPair:!1,status:T===m.length-1?n:void 0}),T===x&&l.jsx(q,{})]},`pair-${j.user?.id??j.assistant?.id}`))]}),f&&l.jsxs("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx(A,{pair:f,isLastPair:!0,status:n},`pair-${f.user?.id??f.assistant?.id}`),x===m.length-1&&l.jsx(q,{})]})]})}),!y.isAtBottom&&l.jsx(B,{type:"button",variant:"outline",size:"icon-sm","aria-label":e("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(se,{size:14})})]})})})}function Ze(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}const ht=Object.assign(We,{Main:Ye,Messages:Xe,EmptyState:Ve,Footer:Ze,Input:xe,Provider:ie,StreamHost:re,ActiveTaskStreamSource:ae,ThreadlessStreamSource:ne,NoAiProviderEmptyState:$e,CreditsEmptyState:qe,CreditsEyebrow:Ge,NoCreditsEyebrow:Qe,CreditsExhaustedBanner:ge});export{ht as C,Me as u,pt as w};
@@ -1 +0,0 @@
1
- import{c as $,d as A,u as J,j as m,n as U}from"./index-B2vvUsuK.js";import{a4 as q,J as z,R as D}from"./chat-context-DsLpz7ew.js";import{u as F}from"./use-mobile-DFpIEPum.js";import{useChatLayout as G,ChatLayout as R}from"./index-DgVQUrlP.js";import{C as B,o as K,d as Q}from"./context-shell-BHDXVCRL.js";import{L as E}from"./preview-panel-CPnrD7jy.js";import{L as V}from"./library-tab-DOE8AqM2.js";import"./use-panel-navigate-BvdMbLN8.js";import"./thread-route-NC2TJMv2.js";import"./use-project-scope-TiMALD5Y.js";import"./repository-binding-DC98qYdg.js";import"./use-mcp-client-C25DU1dz.js";import"./auth-DlYbrS5R.js";import"./use-view-draft-kind-BYPtD8MA.js";import"./use-blog-view-BPx89KE1.js";import"./use-organization-settings-CeyizmcT.js";import"./schema-CAZOGJTH.js";import"./task-board-DAlkVSdn.js";import"./thread-intent-DC5UuPI5.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DSisQksD.js";import"./session-runtime-CWUXrNEM.js";import"./use-entitlements-D-BsJsBn.js";import"./use-ai-providers-CGeOv9zD.js";import"./use-current-view-DJmYWR9r.js";import"./use-in-settings-CKmb_d-Z.js";import"./use-decopilot-events-CwyVZVbh.js";import"./tooltip-C0XDZQqg.js";import"./index-BYSU1KyF.js";import"./MessageCircle01-DjShhQqZ.js";import"./XClose-BbVr5nc7.js";import"./thread-button-jA6lXOHW.js";import"./use-sidebar-collapsed-Cynyx51j.js";import"./sheet-DsBIaG5c.js";import"./use-chat-layout-state-CYDJQho2.js";import"./toolbar-icon-button-BleYd0k2.js";import"./resizable-CDUVHUkS.js";import"./route-page-header-B-0s5BiJ.js";import"./LayoutLeft-19qu82-A.js";import"./BookOpen01-9fv3inuR.js";import"./agent-icon-ButaHLCM.js";import"./AlertCircle-BLw7QvfG.js";import"./UserCheck01-CpLKejEQ.js";import"./Tool01-DJqLAFcI.js";import"./ArrowUp-C_Mw0uky.js";import"./ArrowLeft-DH7F9HYx.js";import"./ArrowRight-DZeVAIN7.js";import"./Globe04-BBsqVmHb.js";import"./CheckCircle--1SXoxG_.js";import"./TrendUp01-Dnr3ECEr.js";import"./ChevronDown-DwO0ALfW.js";import"./ChevronSelectorVertical-Bj17dUxw.js";import"./ChevronUp-BaiO1bgX.js";import"./UserSquare-D1HQ9ju8.js";import"./LinkBroken01-Z9hP4zTf.js";import"./CreditCard01-D6jLDMwS.js";import"./File02-Bes4ATvL.js";import"./SwitchHorizontal01-NAHL2C3Y.js";import"./Eye-DvcGz393.js";import"./Fingerprint04-BpB7HSc7.js";import"./Image01-D2QOi7x6.js";import"./Key01-CDcaZkCg.js";import"./Minus-ChoEICrx.js";import"./Monitor01-DtssQiym.js";import"./Sun-Dpzqhodu.js";import"./Play-DatgPxza.js";import"./Plus-GSWEwEm-.js";import"./SearchMd-DhrJsmFj.js";import"./ShoppingBag01-DQR5ci-Q.js";import"./Trash01-Br_8Dd8k.js";import"./Upload01-B1gnueEL.js";import"./Users01-qnd_BT_N.js";import"./Zap-B1JA6VL5.js";import"./require-capability-r0eDYoNg.js";import"./access-gate-m6QmHtAD.js";import"./capability-load-error-p87qKYlk.js";import"./sections-CvVT6jo9.js";import"./textarea-C5yT2rai.js";import"./empty-state--1H9mx7y.js";import"./use-ask-in-chat-DQt8TEjL.js";import"./shell-layout-DfpoOTvP.js";import"./use-deployment-admin-vod10AYl.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-BmwTtllY.js";import"./command-BA_BVypg.js";import"./index-C0WKaVxy.js";import"./integration-icon-DazsuPNm.js";import"./project-icon-NAtCd-2E.js";import"./use-navigate-to-agent-BGA3nmOF.js";import"./use-debounced-value-CtUf9JOP.js";import"./new-project-dialog-CsFe_Ifg.js";import"./label-BLEP0nH0.js";import"./repository-picker-BLhEIBPT.js";import"./github-icon-DGEVXZ8I.js";import"./useInfiniteQuery-EaWUgCtN.js";import"./infiniteQueryObserver-B6MEVTvt.js";import"./collection-search-EKEj7NYh.js";import"./new-project-store-D3tRl8ms.js";import"./legacy-admin-welcome-dialog-DwTePCPF.js";import"./drawer-Daptw1OQ.js";import"./required-auth-layout-Dq6PcaGv.js";import"./use-org-sso-CpaEO6G5.js";import"./use-org-fs-BrF60Lzy.js";import"./preview-content-DrUsIXaL.js";import"./icon-button-am6dsn69.js";import"./file-share-button-1KUHqOgB.js";import"./popover-BN8yB-gL.js";import"./file-preview-J0KlNfCN.js";import"./utils-C8EWsG3o.js";import"./editor-CGkWZSA7.js";import"./file-type-icon-sxJ1fqoc.js";import"./markdown-COcXeIyG.js";import"./use-copy-_EjHpFlu.js";import"./search-input-Dmx6N7Z7.js";import"./use-org-repo-syncs-Bi8Ut_qX.js";import"./preview-dialog-Bl4nn6SJ.js";import"./folder-icon-DfGo2fIA.js";import"./empty-state-Dfjwzagg.js";import"./table-_0cphCuz.js";function lo(){const t=$.c(56),_=A();let b;t[0]===Symbol.for("react.memo_cache_sentinel")?(b={strict:!1},t[0]=b):b=t[0];const{preview:i,expanded:k,section:M}=J(b);let j;t[1]!==M?(j=K(M),t[1]=M,t[2]=j):j=t[2];const l=j;let v;t[3]!==_?(v=o=>_({to:".",search:r=>({...r,...o.path!==void 0&&{path:o.path},preview:o.preview,expanded:o.expanded})}),t[3]=_,t[4]=v):v=t[4];const e=v;let y;t[5]!==e?(y=()=>e({}),t[5]=e,t[6]=y):y=t[6];const p=y,H=F(),C=G().threadOpen&&!H;if(l!=="files"){let o;t[7]!==l?(o=m.jsx(Q,{section:l}),t[7]=l,t[8]=o):o=t[8];let r;return t[9]!==l||t[10]!==o?(r=m.jsx(R.Content,{children:m.jsx(B,{section:l,children:o})}),t[9]=l,t[10]=o,t[11]=r):r=t[11],r}if(i&&(k||C)){let o,r,n,s,f;if(t[12]!==p||t[13]!==i||t[14]!==e){let T;t[20]!==i?(T=i.lastIndexOf("/"),t[20]=i,t[21]=T):T=t[21];const I=i.slice(0,Math.max(T,0));r=R.Content,o=U.Breadcrumbs,n="page",t[22]!==p?(s={onSelect:p},t[22]=p,t[23]=s):s=t[23];let L;t[24]!==e?(L=O=>({key:`folder:${O.path}`,label:O.label,onSelect:()=>e({path:O.path})}),t[24]=e,t[25]=L):L=t[25];const N=q(I,D).map(L);let u;t[26]!==i?(u=z(i),t[26]=i,t[27]=u):u=t[27];let P;t[28]!==u?(P={key:"file",label:u},t[28]=u,t[29]=P):P=t[29],f=[...N,P],t[12]=p,t[13]=i,t[14]=e,t[15]=o,t[16]=r,t[17]=n,t[18]=s,t[19]=f}else o=t[15],r=t[16],n=t[17],s=t[18],f=t[19];let c;t[30]!==o||t[31]!==n||t[32]!==s||t[33]!==f?(c=m.jsx(o,{after:n,parent:s,items:f}),t[30]=o,t[31]=n,t[32]=s,t[33]=f,t[34]=c):c=t[34];let d;t[35]!==C||t[36]!==i||t[37]!==e?(d=C?void 0:()=>e({preview:i}),t[35]=C,t[36]=i,t[37]=e,t[38]=d):d=t[38];let h;t[39]!==d?(h={expanded:!0,onToggle:d},t[39]=d,t[40]=h):h=t[40];let x;t[41]!==p||t[42]!==i||t[43]!==h?(x=m.jsx(E,{previewPath:i,onClose:p,expand:h},i),t[41]=p,t[42]=i,t[43]=h,t[44]=x):x=t[44];let w;return t[45]!==r||t[46]!==x||t[47]!==c?(w=m.jsxs(r,{children:[c,x]}),t[45]=r,t[46]=x,t[47]=c,t[48]=w):w=t[48],w}let a;t[49]!==p||t[50]!==i||t[51]!==e?(a=i&&m.jsx(E,{variant:"aside",previewPath:i,onClose:p,expand:{expanded:!1,onToggle:()=>e({preview:i,expanded:!0})}},i),t[49]=p,t[50]=i,t[51]=e,t[52]=a):a=t[52];let g;t[53]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx(B,{section:"files",children:m.jsx(V,{filePreview:"side"})}),t[53]=g):g=t[53];let S;return t[54]!==a?(S=m.jsx(R.Content,{aside:a,children:g}),t[54]=a,t[55]=S):S=t[55],S}export{lo as default};
@@ -1 +0,0 @@
1
- import{b as S,r as U,j as p,B as ee,t as D,c as R,x as te,v as ne,D as ae}from"./index-B2vvUsuK.js";import{B as q}from"./badge-CaU7DsCB.js";import{ae as v,aj as H,ai as F,am as se,j as oe}from"./blocks-tab-states-CrihrdT0.js";import{g as re,q as le,b as ie}from"./named-rule-step-BfgtyNIr.js";import{s as ce}from"./Trash01-Br_8Dd8k.js";import{aq as L,aN as de,aO as B,u as G,v as J}from"./site-editor-toast-DI5QMuI-.js";import{u as ue}from"./use-apply-named-rule-c0_gPvLu.js";import{c as Q,k as W}from"./use-sandbox-events-CrjWSBYb.js";function fe(n,e,t,a){const s=v(n,e);return s.kind==="conflict"?null:{writes:{[H(e).blockKey]:F(s.block,e,t,a)}}}function me(n,e,t,a){const s=v(n,e);if(s.kind==="conflict")return{problem:"conflict"};const l=re(t,Object.keys(s.values));return l?{problem:l}:{change:fe(n,e,t.trim(),a)}}function he(n,e,t){const a=v(n,e);return a.kind!=="saved"||!Object.hasOwn(a.block,t)?null:{writes:{[H(e).blockKey]:se(a.block,t)}}}function ge(n,e,t,a){if(a===void 0)return null;const s=v(n,e);return s.kind==="conflict"||Object.hasOwn(s.block,t)?null:{writes:{[H(e).blockKey]:F(s.block,e,t,a)}}}function Me(n,e,t,a){if(!n)return null;const s=v(n,e);return s.kind!=="saved"||!Object.hasOwn(s.values,t)?"new":pe(s.values[t],a)?"published":"changed"}function Ie(n,e,t){if(!n)return;const a=v(n,e);if(a.kind==="saved")return a.values[t]}function Ke(n,e,t){if(!e)return[];const a=v(e,t);if(a.kind!=="saved")return[];const s=v(n,t),l=s.kind==="conflict"?{}:s.values;return Object.keys(a.values).filter(r=>!Object.hasOwn(l,r))}function pe(n,e){return typeof n=="number"||typeof e=="number"?n===e:z(n.start,e.start)&&z(n.end,e.end)}function z(n,e){return n===void 0||e===void 0?n===e:n===e||new Date(n).getTime()===new Date(e).getTime()}function be({kind:n,name:e,pending:t,apply:a,reread:s,onDeleted:l,onUndo:r}){const o=S(),i=n==="experiments",[c,f]=U.useState(!1),u=async()=>{const m=await s();return m||D.info(o("sectionsEditor.namedRules.unavailable"),{...B,description:o("sectionsEditor.namedRules.unavailableHint")}),m},h=async m=>{const g=await u();if(!g)return;const x=ge(g,n,e,m);if(x){r(x);return}const w=v(g,n).kind==="conflict";D.info(o(w?"sectionsEditor.namedRules.changedMeanwhile":"sectionsEditor.namedRules.alreadyBack"),{...B,description:o(w?"sectionsEditor.namedRules.changedMeanwhileHint":"sectionsEditor.namedRules.alreadyBackHint")})},d=async()=>{f(!0);let m;try{m=await u()}finally{f(!1)}if(!m)return;const g=he(m,n,e);if(!g)return;const x=v(m,n),w=x.kind==="saved"?x.block[e]:void 0,k=await a(g);if(k.ok){if(k.keptTheirs){L(o,!1);return}l(),D.success(i?o("experiments.v8.deleted",{name:e}):o("sandbox.dateCampaigns.deleted",{name:e}),{id:de,description:o(i?"experiments.v8.deletedHint":"sandbox.dateCampaigns.deletedHint"),action:{label:o("sectionsEditor.namedRules.undo"),onClick:()=>{h(w)}}})}};return p.jsxs(ee,{type:"button",variant:"ghost",size:"sm",disabled:t||c,onClick:()=>{d()},children:[p.jsx(ce,{size:16}),o(i?"experiments.v8.delete":"sandbox.dateCampaigns.delete")]})}function ve(n,e){const t={...n};for(const[a,s]of Object.entries(e))s.kind!==null&&(s.before!==null?t[a]=s.before:s.baseVersion===null&&delete t[a]);return t}function xe(n){const e=R.c(7);let t;e[0]!==n.branch||e[1]!==n.orgSlug||e[2]!==n.virtualMcpId?(t={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[0]=n.branch,e[1]=n.orgSlug,e[2]=n.virtualMcpId,e[3]=t):t=e[3];const a=t,s=G(n.virtualMcpId,n.branch),l=J(a),r=Q(s,l||null),o=W(s,l||null,r.data);if(!n.decofile||!r.data)return null;if(Object.keys(r.data.changes).length===0)return n.decofile;let i;return e[4]!==n.decofile||e[5]!==o.data?(i=o.data?.entries?ve(n.decofile,o.data.entries):null,e[4]=n.decofile,e[5]=o.data,e[6]=i):i=e[6],i}function ye(n,e,t,a){if(!Object.hasOwn(e,a))return n;const s=t&&Object.hasOwn(t,a)?t[a]:null;if(!s)return"unknown";if(s.kind===null)return n;if(s.before!==null)return{...n,[a]:s.before};if(s.baseVersion!==null)return"unknown";const l={...n};return delete l[a],l}function we(n){const e=R.c(16);let t;e[0]!==n.branch||e[1]!==n.orgSlug||e[2]!==n.virtualMcpId?(t={orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch},e[0]=n.branch,e[1]=n.orgSlug,e[2]=n.virtualMcpId,e[3]=t):t=e[3];const a=t,s=G(n.virtualMcpId,n.branch),l=J(a),r=Q(s,l||null),o=W(s,l||null,r.data);if(!r.data){let d;return e[4]!==r?(d=r.isError?{state:"failed",retry:()=>{r.refetch()}}:{state:"loading"},e[4]=r,e[5]=d):d=e[5],d}if(!n.decofile){let d;return e[6]===Symbol.for("react.memo_cache_sentinel")?(d={state:"loading"},e[6]=d):d=e[6],d}if(Object.hasOwn(r.data.changes,n.blockKey)&&!o.data){let d;return e[7]!==o?(d=o.isError?{state:"failed",retry:()=>{o.refetch()}}:{state:"loading"},e[7]=o,e[8]=d):d=e[8],d}const c=o.data?.entries;let f;e[9]!==r.data.changes||e[10]!==n.blockKey||e[11]!==n.decofile||e[12]!==c?(f=ye(n.decofile,r.data.changes,c,n.blockKey),e[9]=r.data.changes,e[10]=n.blockKey,e[11]=n.decofile,e[12]=c,e[13]=f):f=e[13];const u=f;let h;return e[14]!==u?(h=u==="unknown"?{state:"unknown"}:{state:"ready",content:u},e[14]=u,e[15]=h):h=e[15],h}function _(n,e){return e==="experiments"?{new:n("experiments.v8.new"),stateNew:n("experiments.v8.state.new"),stateChanged:n("experiments.v8.state.changed"),removedTitle:n("experiments.v8.removedTitle"),removedHint:n("experiments.v8.removedHint"),created:t=>n("sectionsEditor.namedRulePicker.createdTest",{name:t})}:{new:n("sandbox.dateCampaigns.new"),stateNew:n("sandbox.dateCampaigns.state.new"),stateChanged:n("sandbox.dateCampaigns.state.changed"),removedTitle:n("sandbox.dateCampaigns.removedTitle"),removedHint:n("sandbox.dateCampaigns.removedHint"),created:t=>n("sectionsEditor.namedRulePicker.createdCampaign",{name:t})}}function Ne(n,e,t){const a=oe(e,t);return a!=="available"?a:v(n,t).kind==="conflict"?"conflict":null}function Be(n,e){const t=R.c(46),a=S(),{orgSlug:s,virtualMcpId:l,branch:r,decofile:o,meta:i}=e;let c;t[0]!==r||t[1]!==o||t[2]!==s||t[3]!==l?(c={orgSlug:s,virtualMcpId:l,branch:r,decofile:o},t[0]=r,t[1]=o,t[2]=s,t[3]=l,t[4]=c):c=t[4];const f=xe(c);let u;t[5]!==n?(u=H(n),t[5]=n,t[6]=u):u=t[6];let h;t[7]!==r||t[8]!==o||t[9]!==s||t[10]!==u.blockKey||t[11]!==l?(h={orgSlug:s,virtualMcpId:l,branch:r,decofile:o,blockKey:u.blockKey},t[7]=r,t[8]=o,t[9]=s,t[10]=u.blockKey,t[11]=l,t[12]=h):h=t[12];const d=we(h);let m;t[13]!==r||t[14]!==s||t[15]!==l?(m={orgSlug:s,virtualMcpId:l,branch:r},t[13]=r,t[14]=s,t[15]=l,t[16]=m):m=t[16];const{apply:g,reread:x,isPending:w,holdsCopy:k}=ue(m),[X,Y]=U.useState(null),P=e.open?e.open.name:X,C=e.open?e.open.set:Y,[V,A]=U.useState(!1);let T;t[17]!==g||t[18]!==a?(T=async(b,K)=>{const E=K===void 0?a("sectionsEditor.namedRules.saved"):K;if(!b)return!1;const N=await g(b);return N.ok&&N.keptTheirs?L(a,!1):N.ok&&D.success(E,{...B,description:a("sectionsEditor.namedRules.savedHint")}),N.ok},t[17]=g,t[18]=a,t[19]=T):T=t[19];const y=T;let M;t[20]!==o||t[21]!==n||t[22]!==y||t[23]!==C||t[24]!==a?(M=b=>{if(b.kind!==n||!b.create)return;const K=b.kind==="experiments"?b.create.share:b.create.window,E=me(o,n,b.name,K);if(!("change"in E)){D.info(E.problem==="conflict"?a("sectionsEditor.namedRules.changedMeanwhile"):le(a,E.problem),B);return}const N=b.name.trim();y(E.change,_(a,n).created(N)).then(Z=>{Z&&(A(!1),C(N))})},t[20]=o,t[21]=n,t[22]=y,t[23]=C,t[24]=a,t[25]=M):M=t[25];const $=M;let O;t[26]!==o||t[27]!==n||t[28]!==i?(O=Ne(o,i,n),t[26]=o,t[27]=n,t[28]=i,t[29]=O):O=t[29];let j;t[30]!==y?(j=b=>{y(b)},t[30]=y,t[31]=j):j=t[31];let I;return t[32]!==g||t[33]!==$||t[34]!==V||t[35]!==k||t[36]!==w||t[37]!==d||t[38]!==P||t[39]!==f||t[40]!==x||t[41]!==y||t[42]!==C||t[43]!==O||t[44]!==j?(I={published:f,live:d,apply:g,reread:x,isPending:w,holdsCopy:k,openName:P,setOpenName:C,creating:V,setCreating:A,blocked:O,save:y,create:$,undo:j},t[32]=g,t[33]=$,t[34]=V,t[35]=k,t[36]=w,t[37]=d,t[38]=P,t[39]=f,t[40]=x,t[41]=y,t[42]=C,t[43]=O,t[44]=j,t[45]=I):I=t[45],I}function He(n){const e=R.c(23),{kind:t,open:a,onOpenChange:s,existingNames:l,pending:r,onCreate:o}=n,i=S();let c;e[0]!==t||e[1]!==i?(c=_(i,t),e[0]=t,e[1]=i,e[2]=c):c=e[2];let f;e[3]!==c.new?(f=p.jsx(te,{className:"sr-only",children:c.new}),e[3]=c.new,e[4]=f):f=e[4];let u;e[5]!==i?(u=i("sectionsEditor.namedRules.create"),e[5]=i,e[6]=u):u=e[6];let h;e[7]!==s?(h=()=>s(!1),e[7]=s,e[8]=h):h=e[8];let d;e[9]!==l||e[10]!==t||e[11]!==o||e[12]!==r||e[13]!==u||e[14]!==h?(d=p.jsx(ie,{kind:t,initialName:"",existingNames:l,pending:r,submitLabel:u,dismiss:"cancel",standalone:!0,onBack:h,onSubmit:o}),e[9]=l,e[10]=t,e[11]=o,e[12]=r,e[13]=u,e[14]=h,e[15]=d):d=e[15];let m;e[16]!==f||e[17]!==d?(m=p.jsxs(ne,{className:"p-0 sm:max-w-md",children:[f,d]}),e[16]=f,e[17]=d,e[18]=m):m=e[18];let g;return e[19]!==s||e[20]!==a||e[21]!==m?(g=p.jsx(ae,{open:a,onOpenChange:s,children:m}),e[19]=s,e[20]=a,e[21]=m,e[22]=g):g=e[22],g}function _e(n){const e=R.c(15),{kind:t,removed:a}=n,s=S();let l;e[0]!==t||e[1]!==s?(l=_(s,t),e[0]=t,e[1]=s,e[2]=l):l=e[2];const r=l;if(a.length===0)return null;let o;e[3]!==r.removedTitle?(o=p.jsx("h3",{className:"text-sm font-medium",children:r.removedTitle}),e[3]=r.removedTitle,e[4]=o):o=e[4];let i;e[5]!==r.removedHint?(i=p.jsx("p",{className:"text-xs text-muted-foreground",children:r.removedHint}),e[5]=r.removedHint,e[6]=i):i=e[6];let c;e[7]!==a?(c=a.map(Re),e[7]=a,e[8]=c):c=e[8];let f;e[9]!==c?(f=p.jsx("ul",{className:"text-sm text-muted-foreground",children:c}),e[9]=c,e[10]=f):f=e[10];let u;return e[11]!==o||e[12]!==i||e[13]!==f?(u=p.jsxs("div",{className:"flex flex-col gap-1",children:[o,i,f]}),e[11]=o,e[12]=i,e[13]=f,e[14]=u):u=e[14],u}function Re(n){return p.jsx("li",{className:"line-through",children:n},n)}function Pe(n){const e=R.c(7),{kind:t,state:a,changed:s}=n,l=s===void 0?!0:s,r=S();let o;e[0]!==t||e[1]!==r?(o=_(r,t),e[0]=t,e[1]=r,e[2]=o):o=e[2];const i=o;if(a==="new"){let c;return e[3]!==i.stateNew?(c=p.jsx(q,{variant:"muted",children:i.stateNew}),e[3]=i.stateNew,e[4]=c):c=e[4],c}if(a==="changed"&&l){let c;return e[5]!==i.stateChanged?(c=p.jsx(q,{variant:"muted",children:i.stateChanged}),e[5]=i.stateChanged,e[6]=c):c=e[6],c}return null}function Ve(n){const e=R.c(8),{kind:t,detail:a}=n;let s;return e[0]!==a.apply||e[1]!==a.onDeleted||e[2]!==a.onUndo||e[3]!==a.pending||e[4]!==a.reread||e[5]!==a.row.name||e[6]!==t?(s=p.jsx(be,{kind:t,name:a.row.name,pending:a.pending,apply:a.apply,reread:a.reread,onDeleted:a.onDeleted,onUndo:a.onUndo}),e[0]=a.apply,e[1]=a.onDeleted,e[2]=a.onUndo,e[3]=a.pending,e[4]=a.reread,e[5]=a.row.name,e[6]=t,e[7]=s):s=e[7],s}function $e(n,e,t){return{row:e,decofile:t.decofile,meta:t.meta,pending:n.isPending,holdsCopy:n.holdsCopy,onBack:()=>n.setOpenName(null),onSave:n.save,apply:n.apply,reread:n.reread,onDeleted:()=>n.setOpenName(null),onUndo:n.undo}}export{Pe as N,Ke as a,Ne as b,Be as c,$e as d,He as e,_e as f,fe as g,Ve as h,Me as n,Ie as p,we as u};
@@ -1,3 +0,0 @@
1
- import{e as J,f as B}from"./input-DFHiqhmH.js";import{aH as A,aI as _,dE as C,bk as U,cq as H}from"./index-B2vvUsuK.js";import"./usage-stats-BbuSELy1.js";import"./utils-CVEq3hMx.js";import"./markdown-COcXeIyG.js";import"./use-copy-_EjHpFlu.js";import"./agent-icon-ButaHLCM.js";import"./AlertCircle-BLw7QvfG.js";import"./UserCheck01-CpLKejEQ.js";import"./Tool01-DJqLAFcI.js";import"./ArrowUp-C_Mw0uky.js";import"./ArrowLeft-DH7F9HYx.js";import"./ArrowRight-DZeVAIN7.js";import"./BookOpen01-9fv3inuR.js";import"./Globe04-BBsqVmHb.js";import"./CheckCircle--1SXoxG_.js";import"./TrendUp01-Dnr3ECEr.js";import"./ChevronDown-DwO0ALfW.js";import"./ChevronSelectorVertical-Bj17dUxw.js";import"./ChevronUp-BaiO1bgX.js";import"./UserSquare-D1HQ9ju8.js";import"./LinkBroken01-Z9hP4zTf.js";import"./CreditCard01-D6jLDMwS.js";import"./File02-Bes4ATvL.js";import"./MessageCircle01-DjShhQqZ.js";import"./SwitchHorizontal01-NAHL2C3Y.js";import"./Eye-DvcGz393.js";import"./Fingerprint04-BpB7HSc7.js";import"./Image01-D2QOi7x6.js";import"./Key01-CDcaZkCg.js";import"./LayoutLeft-19qu82-A.js";import"./Minus-ChoEICrx.js";import"./Monitor01-DtssQiym.js";import"./Sun-Dpzqhodu.js";import"./Play-DatgPxza.js";import"./Plus-GSWEwEm-.js";import"./SearchMd-DhrJsmFj.js";import"./ShoppingBag01-DQR5ci-Q.js";import"./Trash01-Br_8Dd8k.js";import"./Upload01-B1gnueEL.js";import"./Users01-qnd_BT_N.js";import"./XClose-BbVr5nc7.js";import"./Zap-B1JA6VL5.js";import"./chat-context-DsLpz7ew.js";import"./use-panel-navigate-BvdMbLN8.js";import"./thread-route-NC2TJMv2.js";import"./use-project-scope-TiMALD5Y.js";import"./repository-binding-DC98qYdg.js";import"./use-mcp-client-C25DU1dz.js";import"./auth-DlYbrS5R.js";import"./use-view-draft-kind-BYPtD8MA.js";import"./use-blog-view-BPx89KE1.js";import"./use-organization-settings-CeyizmcT.js";import"./schema-CAZOGJTH.js";import"./task-board-DAlkVSdn.js";import"./thread-intent-DC5UuPI5.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DSisQksD.js";import"./session-runtime-CWUXrNEM.js";import"./use-entitlements-D-BsJsBn.js";import"./use-ai-providers-CGeOv9zD.js";import"./use-current-view-DJmYWR9r.js";import"./use-in-settings-CKmb_d-Z.js";import"./use-decopilot-events-CwyVZVbh.js";import"./use-mobile-DFpIEPum.js";import"./tooltip-C0XDZQqg.js";import"./index-BYSU1KyF.js";import"./gateway-client-mrWD5tSx.js";import"./form-msT-Nxjd.js";import"./label-BLEP0nH0.js";import"./icon-button-am6dsn69.js";import"./file-type-icon-sxJ1fqoc.js";import"./chat-draft-ODW7kZWh.js";import"./use-voice-input-wPU7RMRz.js";import"./popover-BN8yB-gL.js";import"./drawer-Daptw1OQ.js";import"./index-CDpTFqpR.js";import"./checkbox-Bo6uhaqm.js";import"./select-PhQ1dHUc.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./tabs-CB9wyI2L.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-CrAjq5eE.js";import"./toggle-group-B2L0Fh-A.js";import"./input-Bzo1OCNz.js";import"./suggestion-BKU1aw0O.js";import"./use-mcp-prompts-DFURxOZn.js";import"./use-org-fs-BrF60Lzy.js";import"./useInfiniteQuery-EaWUgCtN.js";import"./infiniteQueryObserver-B6MEVTvt.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-CuECkoDT.js";import"./plan-ladder-CpzLELQm.js";import"./add-connection-dialog-BIOFD97r.js";import"./collection-search-EKEj7NYh.js";import"./extract-connection-data-Csm2LLbI.js";import"./metadata-D72DunRR.js";import"./connection-DUUZ34Ff.js";import"./url-slug-HTy1TIRr.js";import"./connection-card-BbAx38kp.js";import"./connection-slug-Wiu7W5Ro.js";import"./integration-icon-DazsuPNm.js";import"./textarea-C5yT2rai.js";import"./use-connection-BlQSFvXZ.js";import"./schema-B5pk7azZ.js";import"./connection-form-helpers-DEnW0ORZ.js";import"./authenticate-and-persist-oauth-Da9zgsaC.js";import"./mcp-oauth-ciX7wK5f.js";import"./mcp-oauth-DESKCBIm.js";import"./collection-tabs-THb2ZDUR.js";import"./badge-CaU7DsCB.js";import"./use-infinite-scroll-D0fDDIyn.js";import"./useSuspenseInfiniteQuery-D-KEcWQs.js";import"./use-task-board-items-osFWr4F_.js";import"./use-chat-layout-state-CYDJQho2.js";class W{constructor(t,r=4e3){this.onDisconnect=t,this.graceMs=r}onDisconnect;graceMs;timer;report(t){if(t==="connected"){clearTimeout(this.timer),this.timer=void 0;return}if(t==="failed"||t==="closed"){clearTimeout(this.timer),this.timer=void 0,this.onDisconnect();return}t==="disconnected"&&!this.timer&&(this.timer=setTimeout(this.onDisconnect,this.graceMs))}dispose(){clearTimeout(this.timer),this.timer=void 0}}const X=A({type:H(["session.input_transcript.delta","session.output_transcript.delta"]),event_id:_(),delta:_(),start_ms:U().nonnegative(),end_ms:U().nonnegative()}),$=A({type:C("session.delegation.created"),offset_ms:U().nonnegative(),delegation:A({id:_(),target:C("client")})});class F{constructor(t,r){this.send=t,this.callbacks=r}send;callbacks;closed=!1;fragments=[];seen=new Set;delegated=new Set;consumed=new Set;pending=new Map;contexts=new Map;awaitingContext=new Map;receive(t,r=Date.now()){if(this.closed)return;const n=X.safeParse(t);if(n.success){const e=n.data;if(this.seen.has(e.event_id))return;this.seen.add(e.event_id);const s=e.type==="session.input_transcript.delta"?"user":"agent";if(this.fragments.push({role:s,text:e.delta,start:e.start_ms,end:e.end_ms,arrivedAt:r,id:e.event_id}),this.fragments.sort((o,i)=>o.start-i.start),this.fragments.length>4e3){this.callbacks.onError();return}this.callbacks.onMessage({role:s,message:e.delta,event_id:e.event_id});return}const a=$.safeParse(t);if(a.success){const{id:e}=a.data.delegation;if(this.delegated.has(e)||this.pending.has(e))return;if(this.delegated.size+this.pending.size>=40){this.callbacks.onError();return}this.pending.set(e,{offset:a.data.offset_ms,receivedAt:r});return}const m=A({type:C("session.thinking.appended"),client_event_id:_()}).safeParse(t);if(m.success){const e=m.data.client_event_id,s=this.awaitingContext.get(e);this.awaitingContext.delete(e),s&&(s.remaining.delete(e),s.remaining.size===0&&this.send({type:"session.commentary.append",event_id:crypto.randomUUID(),delegation_id:s.delegationId??null,content:"Studio has supplied the complete background result as context for this request. Briefly explain that result, including any failure or required approval. Acceptance or task creation alone does not mean the work completed."}));return}const p=A({type:_()}).safeParse(t);p.success&&p.data.type==="error"&&this.callbacks.onError()}tick(t=Date.now()){if(!this.closed)for(const[r,n]of this.pending){const a=this.fragments.filter(o=>o.start<n.offset),m=a.reduce((o,i)=>i.role==="user"?Math.max(o,i.arrivedAt):o,n.receivedAt);if(t-m<500)continue;const p=a.filter(o=>o.role==="user"&&!this.consumed.has(o.id));if(!p.length&&t-n.receivedAt<3e3)continue;if(this.pending.delete(r),this.delegated.add(r),!p.length){this.publishUpdate({delivery:"announce",delegationId:r,text:"No new transcribed request is available. No work was started. Ask the user to repeat the request."});continue}const e=p.map(o=>o.text).join("").trim(),s=[];for(const o of a){if(p.includes(o))continue;const i=s.at(-1);i?.role===o.role?i.text+=o.text:s.push({role:o.role,text:o.text})}if(e.length>J){this.publishUpdate({delivery:"announce",delegationId:r,text:"The spoken request is too long. No work was started. Ask the user to shorten it or continue in text."});continue}for(const o of p)this.consumed.add(o.id);this.callbacks.onDelegate({request:e,delegationId:r,transcript:B(s.map(({role:o,text:i})=>({role:o,text:i.trim()})).filter(({text:o})=>o))}).then(o=>{this.closed||this.publishUpdate({delivery:o.status==="rejected"?"announce":"context",delegationId:r,text:JSON.stringify(o)})}).catch(()=>{this.publishUpdate({delivery:"announce",delegationId:r,text:"Studio could not accept this request. Do not claim work started."})})}}publishUpdate(t){if(this.closed)return;if(t.contextId){if(this.contexts.get(t.contextId)===t.text)return;this.contexts.set(t.contextId,t.text)}const n=(t.contextId?`Updated ${t.contextId} data, superseding earlier values:
2
- `:`Studio result data:
3
- `)+t.text,a=new TextEncoder,m=t.delivery==="announce"&&a.encode(n).length>480,p={remaining:new Set,delegationId:t.delegationId};let e="",s=0;const o=()=>{if(!e)return;const i=crypto.randomUUID();m&&(p.remaining.add(i),this.awaitingContext.set(i,p)),this.send({type:t.delivery==="announce"&&!m?"session.commentary.append":"session.thinking.append",event_id:i,delegation_id:t.delegationId??null,content:e}),e="",s=0};for(const i of n){const v=a.encode(i).length;s+v>480&&o(),e+=i,s+=v}o()}close(){this.closed=!0,this.pending.clear(),this.awaitingContext.clear()}}async function so(E,t,r){r.throwIfAborted();const n=new RTCPeerConnection,a=n.createDataChannel("oai-events"),m=document.createElement("audio");m.autoplay=!0;let p,e,s,o,i=!1,v=!1,h,O,L=0,P=0,g,w,y=!1;const I=Promise.withResolvers(),x=Promise.withResolvers();x.promise.catch(()=>{});const b=new F(d=>{!i&&a.readyState==="open"&&a.send(JSON.stringify(d))},t),q=new W(()=>{i||t.onDisconnect()}),M=async()=>{if(!i){i=!0,q.dispose(),b.close(),clearInterval(O),r.removeEventListener("abort",T),a.close(),n.close();for(const d of p?.getTracks()??[])d.stop();m.pause(),m.srcObject=null,e&&e.state!=="closed"&&await e.close().catch(()=>{})}},T=()=>{M()};r.addEventListener("abort",T,{once:!0});const u=AbortSignal.any([r,AbortSignal.timeout(3e4)]),j=x.promise,z=()=>x.reject(u.reason);u.addEventListener("abort",z,{once:!0}),j.catch(()=>{}),a.onmessage=({data:d})=>{if(!(i||typeof d!="string"))try{const l=JSON.parse(d);typeof l=="object"&&l!==null&&"type"in l&&(l.type==="session.started"&&(v=!0,x.resolve()),l.type==="session.closed"&&(I.resolve(),h||t.onDisconnect())),h||b.receive(l)}catch{t.onError()}},a.onclose=()=>{x.reject(new Error("Voice connection closed")),I.resolve(),!i&&!h&&t.onDisconnect()},n.onconnectionstatechange=()=>{i||q.report(n.connectionState)},n.ontrack=({streams:d,track:l})=>{if(i)return;const D=d[0]??new MediaStream([l]);m.srcObject=D,e??=new AudioContext,s=e.createAnalyser(),s.fftSize=256,o=new Uint8Array(s.fftSize),e.createMediaStreamSource(D).connect(s),e.resume().catch(()=>t.onError()),m.play().catch(()=>t.onError())};function N(){if(!s||!o||i)return 0;s.getByteTimeDomainData(o);let d=0;for(const l of o)d+=((l-128)/128)**2;return Math.min(1,Math.sqrt(d/o.length)*4)}try{const d=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}).then(c=>{if(i||u.aborted){for(const f of c.getTracks())f.stop();throw new DOMException("Voice connection cancelled","AbortError")}return p=c,c}),l=await Promise.race([d,new Promise((c,f)=>u.addEventListener("abort",()=>f(u.reason),{once:!0}))]);e??=new AudioContext,g=e.createAnalyser(),g.fftSize=256,w=new Uint8Array(g.fftSize),e.createMediaStreamSource(l).connect(g),await e.resume();for(const c of l.getAudioTracks())n.addTrack(c,l);const D=await n.createOffer();await n.setLocalDescription(D),u.throwIfAborted(),n.iceGatheringState!=="complete"&&await new Promise((c,f)=>{const S=()=>{n.iceGatheringState==="complete"&&(R(),c())},k=()=>{R(),f(u.reason)},R=()=>{n.removeEventListener("icegatheringstatechange",S),u.removeEventListener("abort",k)};n.addEventListener("icegatheringstatechange",S),u.addEventListener("abort",k,{once:!0}),S(),u.aborted&&k()});const V=n.localDescription?.sdp;if(!V)throw new Error("Missing voice offer");const G=await E(V,u);return await n.setRemoteDescription({type:"answer",sdp:G.sdp}),await j,r.throwIfAborted(),u.removeEventListener("abort",z),r.removeEventListener("abort",T),t.onConnect(),O=setInterval(()=>{if(i||h)return;if(b.tick(),g&&w&&!y){g.getByteTimeDomainData(w);const f=w.reduce((S,k)=>S+((k-128)/128)**2,0)/w.length;Math.sqrt(f)>.025&&(P=Date.now())}t.onUserSpeaking(!y&&Date.now()-P<400),N()>.02&&(L=Date.now()),t.onModeChange({mode:Date.now()-L<400?"speaking":"listening"})},100),{endSession:()=>(h??=(async()=>{b.close();for(const c of p?.getTracks()??[])c.stop();if(m.pause(),v&&a.readyState==="open"){a.send(JSON.stringify({type:"session.close"}));let c;await Promise.race([I.promise,new Promise(f=>{c=setTimeout(f,3e3)})]),clearTimeout(c)}await M()})(),h),publishUpdate:c=>b.publishUpdate(c),setMicMuted:c=>{y=c;for(const f of p?.getAudioTracks()??[])f.enabled=!y;y&&t.onUserSpeaking(!1)},getOutputVolume:N}}catch(d){throw await M(),d}}export{so as startOpenAIConversation};
@@ -1 +0,0 @@
1
- import{c as b,b as P,j as t,n as w,m as N}from"./index-B2vvUsuK.js";import{ChatLayout as C}from"./index-DgVQUrlP.js";import{i as y,n as $,a as z}from"./TrendUp01-Dnr3ECEr.js";import{B as I}from"./badge-CaU7DsCB.js";import"./use-mobile-DFpIEPum.js";import"./tooltip-C0XDZQqg.js";import"./index-BYSU1KyF.js";import"./MessageCircle01-DjShhQqZ.js";import"./XClose-BbVr5nc7.js";import"./thread-button-jA6lXOHW.js";import"./use-sidebar-collapsed-Cynyx51j.js";import"./sheet-DsBIaG5c.js";import"./use-chat-layout-state-CYDJQho2.js";import"./use-panel-navigate-BvdMbLN8.js";import"./thread-route-NC2TJMv2.js";import"./use-project-scope-TiMALD5Y.js";import"./repository-binding-DC98qYdg.js";import"./use-mcp-client-C25DU1dz.js";import"./auth-DlYbrS5R.js";import"./toolbar-icon-button-BleYd0k2.js";import"./use-in-settings-CKmb_d-Z.js";import"./resizable-CDUVHUkS.js";import"./route-page-header-B-0s5BiJ.js";import"./LayoutLeft-19qu82-A.js";import"./use-current-view-DJmYWR9r.js";const K={plan:{heading:"home.comingSoon.planHeading",description:"home.comingSoon.planDescription",points:[{Icon:y,labelKey:"home.comingSoon.planGoals",tone:"bg-chart-2/15 text-chart-2"},{Icon:$,labelKey:"home.comingSoon.planTasks",tone:"bg-chart-1/15 text-chart-1"},{Icon:z,labelKey:"home.comingSoon.planProgress",tone:"bg-chart-4/15 text-chart-4"}]}};function L(s){const e=b.c(4),{className:f}=s;let l;e[0]!==f?(l=N("block h-2 rounded-full bg-muted",f),e[0]=f,e[1]=l):l=e[1];let n;return e[2]!==l?(n=t.jsx("span",{className:l}),e[2]=l,e[3]=n):n=e[3],n}const R=[{title:"w-32",fill:"w-[72%]",tone:"bg-chart-2",value:"72%"},{title:"w-24",fill:"w-[45%]",tone:"bg-chart-1",value:"45%"},{title:"w-28",fill:"w-[88%]",tone:"bg-chart-4",value:"88%"}];function B(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex flex-col gap-5",children:R.map(E)}),s[0]=e):e=s[0],e}function E(s){return t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"flex size-6 items-center justify-center rounded-md bg-muted text-muted-foreground",children:t.jsx(y,{size:14})}),t.jsx(L,{className:s.title}),t.jsx("span",{className:"ml-auto text-xs font-medium tabular-nums text-muted-foreground",children:s.value})]}),t.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-muted",children:t.jsx("div",{className:N("h-full rounded-full",s.fill,s.tone)})})]},s.value)}function G(s){const e=b.c(30),{kind:f}=s,l=P(),n=K[f];let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"absolute inset-x-10 -top-4 h-40 rounded-full bg-chart-2/20 blur-3xl"}),e[0]=u):u=e[0];let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{"aria-hidden":!0,className:"relative w-full max-w-md",children:[u,t.jsx("div",{className:"relative surface p-6 [mask-image:linear-gradient(to_bottom,black_65%,transparent)]",children:t.jsx(B,{})})]}),e[1]=h):h=e[1];let i;e[2]!==l?(i=l("home.comingSoon.badge"),e[2]=l,e[3]=i):i=e[3];let o;e[4]!==i?(o=t.jsx(I,{variant:"muted",children:i}),e[4]=i,e[5]=o):o=e[5];let a;e[6]!==n.heading||e[7]!==l?(a=l(n.heading),e[6]=n.heading,e[7]=l,e[8]=a):a=e[8];let r;e[9]!==a?(r=t.jsx("h1",{className:"text-2xl font-medium text-balance text-foreground",children:a}),e[9]=a,e[10]=r):r=e[10];let c;e[11]!==n.description||e[12]!==l?(c=l(n.description),e[11]=n.description,e[12]=l,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx("p",{className:"max-w-md text-sm text-pretty text-muted-foreground",children:c}),e[14]=c,e[15]=m):m=e[15];let d;e[16]!==o||e[17]!==r||e[18]!==m?(d=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[o,r,m]}),e[16]=o,e[17]=r,e[18]=m,e[19]=d):d=e[19];let p;if(e[20]!==n.points||e[21]!==l){let j;e[23]!==l?(j=S=>{const{Icon:_,labelKey:v,tone:k}=S;return t.jsxs("li",{className:"flex items-center gap-3 surface p-4 sm:flex-col sm:items-start",children:[t.jsx("span",{className:N("flex size-9 shrink-0 items-center justify-center rounded-lg",k),children:t.jsx(_,{size:18})}),t.jsx("span",{className:"text-sm text-foreground",children:l(v)})]},v)},e[23]=l,e[24]=j):j=e[24],p=n.points.map(j),e[20]=n.points,e[21]=l,e[22]=p}else p=e[22];let x;e[25]!==p?(x=t.jsx("ul",{className:"grid w-full gap-3 sm:grid-cols-3",children:p}),e[25]=p,e[26]=x):x=e[26];let g;return e[27]!==x||e[28]!==d?(g=t.jsx(w,{children:t.jsx(w.Content,{children:t.jsxs("div",{className:"mx-auto flex w-full max-w-2xl flex-col items-center gap-10 px-4 pt-12 pb-16 md:pt-20",children:[h,d,x]})})}),e[27]=x,e[28]=d,e[29]=g):g=e[29],g}function ce(){const s=b.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(C.Content,{children:t.jsx(G,{kind:"plan"})}),s[0]=e):e=s[0],e}export{ce as default};