decocms 4.398.0 → 4.398.1

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 (351) hide show
  1. package/dist/client/assets/{AlertCircle-BQBmepo1.js → AlertCircle-98wzPKVW.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Bnl86Bmb.js → AreaChart-DcLXgcu7.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-DHPtMbTg.js → ArrowLeft-BzMccwRu.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-m94XgZ3O.js → ArrowRight-lHe1U48z.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DBDp30x0.js → ArrowUp-BmtqMqby.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-W8IwLG3F.js → CartesianChart-B7-atApO.js} +1 -1
  7. package/dist/client/assets/{Check-Bcnv-H55.js → Check-BzQDWJjM.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-CySwUqst.js → CheckCircle-HC56_LGd.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-wyCoS3df.js → ChevronUp-zrMm2jhU.js} +1 -1
  10. package/dist/client/assets/{Copy01-CMEvgxoC.js → Copy01-CODH5Oqa.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-Bi7YfG5v.js → CreditCard01-B8bIMJLX.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-B97QY-fA.js → DotsVertical-kHMk4ug_.js} +1 -1
  13. package/dist/client/assets/{Download01-DokiLBvz.js → Download01-gLJ_F3hc.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-CyEUeczg.js → ErrorBarContext-BBVKmyFc.js} +1 -1
  15. package/dist/client/assets/{Eye-DlNsmazk.js → Eye-DLCz-6qH.js} +1 -1
  16. package/dist/client/assets/{Globe04-CcTw2hMd.js → Globe04-BpUt_ty9.js} +1 -1
  17. package/dist/client/assets/{Image01-CGox3JEN.js → Image01-BpDKkqa8.js} +1 -1
  18. package/dist/client/assets/{Key01-MH27mIao.js → Key01-zdcblxxb.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-CpKRfpdN.js → LayoutLeft-B_xCpWrI.js} +1 -1
  20. package/dist/client/assets/{Line-BldjxoIZ.js → Line-P3ej5KXF.js} +1 -1
  21. package/dist/client/assets/{Link01-BcMSFUIJ.js → Link01-CL40WKQj.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-3Lsw2Z8I.js → LinkExternal01-DCf_4tEb.js} +1 -1
  23. package/dist/client/assets/{Monitor01-FNWg7-7u.js → Monitor01-C3eP4jhE.js} +1 -1
  24. package/dist/client/assets/{Package-ColnpoOk.js → Package-D8ukbq-a.js} +1 -1
  25. package/dist/client/assets/{Palette-Bb9IRvVj.js → Palette-DtA5rf3b.js} +1 -1
  26. package/dist/client/assets/{Plus-t4kIBGIE.js → Plus-B8Z2drir.js} +1 -1
  27. package/dist/client/assets/{SearchLg-DrU6iSmg.js → SearchLg-C_6dfKKh.js} +1 -1
  28. package/dist/client/assets/{SearchMd-Y5wxql57.js → SearchMd-3G73My4C.js} +1 -1
  29. package/dist/client/assets/{Sector-DfoxRE0A.js → Sector-Dr3tzQLe.js} +1 -1
  30. package/dist/client/assets/{Share07-DxxTtQWb.js → Share07-DtOs_WWI.js} +1 -1
  31. package/dist/client/assets/{Stars01-Dwmyh59Q.js → Stars01-bSsamSaB.js} +1 -1
  32. package/dist/client/assets/{Sun-mSxdzNTE.js → Sun-9j0Po2AP.js} +1 -1
  33. package/dist/client/assets/{Tool01-CaOf6Mu4.js → Tool01-DzYcs8vG.js} +1 -1
  34. package/dist/client/assets/{Trash01-DHtEq5nA.js → Trash01-Lp4e1hVO.js} +1 -1
  35. package/dist/client/assets/{Upload01--yrzZIir.js → Upload01-D1rXIspQ.js} +1 -1
  36. package/dist/client/assets/{User01-Dn00_JAZ.js → User01-D1oM1BHv.js} +1 -1
  37. package/dist/client/assets/{UserSquare-BfH7tTry.js → UserSquare-CmhJWMRI.js} +1 -1
  38. package/dist/client/assets/{Users01-BBUvRTwh.js → Users01-B-_tKxiA.js} +1 -1
  39. package/dist/client/assets/{X-xX_XXXXt.js → X-O0g-zSXl.js} +1 -1
  40. package/dist/client/assets/{XCircle-Bdqr7Csd.js → XCircle-D5gCbNRx.js} +1 -1
  41. package/dist/client/assets/{XClose-Cx8dSxYY.js → XClose-BVb5UCwC.js} +1 -1
  42. package/dist/client/assets/{Zap-Da5qzBL9.js → Zap-BlYosmzp.js} +1 -1
  43. package/dist/client/assets/{ZoomOut-C8BTMnO9.js → ZoomOut-BpJbUkSE.js} +1 -1
  44. package/dist/client/assets/{access-gate-wTt0hkiV.js → access-gate-BRVtYWTn.js} +1 -1
  45. package/dist/client/assets/{add-connection-dialog-C8n1sIiv.js → add-connection-dialog-BVHCfBCW.js} +1 -1
  46. package/dist/client/assets/{agent-analytics-BigiGcC3.js → agent-analytics-BApueoM9.js} +1 -1
  47. package/dist/client/assets/agent-app--WPkabyd.js +1 -0
  48. package/dist/client/assets/{agent-assets-C0cz7g53.js → agent-assets-Bm2oOJqy.js} +1 -1
  49. package/dist/client/assets/{agent-automation-NB5zps7C.js → agent-automation-BhOxRtSv.js} +1 -1
  50. package/dist/client/assets/{agent-automations-Dr2TOtVh.js → agent-automations-CCpNNCjK.js} +1 -1
  51. package/dist/client/assets/{agent-connect-sources-BP-ePYzm.js → agent-connect-sources-CTvrkv3i.js} +1 -1
  52. package/dist/client/assets/agent-deck-B_ROCg90.js +1 -0
  53. package/dist/client/assets/{agent-e2e-7pGygJe1.js → agent-e2e-DrpVDqBY.js} +1 -1
  54. package/dist/client/assets/{agent-experiments-NFpgU_vW.js → agent-experiments-BKZ46FeV.js} +1 -1
  55. package/dist/client/assets/agent-file-DP1nsS28.js +1 -0
  56. package/dist/client/assets/{agent-git-Dp2pjcq7.js → agent-git-nk_-yOb4.js} +1 -1
  57. package/dist/client/assets/{agent-hosting-swMJFfI8.js → agent-hosting-CLsE6dnK.js} +1 -1
  58. package/dist/client/assets/{agent-icon-b_XHjZEZ.js → agent-icon-Dz2LbXuC.js} +1 -1
  59. package/dist/client/assets/agent-library-file-DgRRgy-A.js +1 -0
  60. package/dist/client/assets/{agent-monitor-DXml8cXU.js → agent-monitor-CiZfI6SJ.js} +1 -1
  61. package/dist/client/assets/{agent-overview-B-8Q_kMe.js → agent-overview-0QPtfT14.js} +1 -1
  62. package/dist/client/assets/agent-settings-CcrItTbK.js +1 -0
  63. package/dist/client/assets/{agent-site-editor-C69PUReM.js → agent-site-editor-TizqnJhD.js} +1 -1
  64. package/dist/client/assets/agent-site-editor-code-DQga0ybf.js +2 -0
  65. package/dist/client/assets/{agent-site-editor-content-B9j94FVC.js → agent-site-editor-content-CDqcaHey.js} +3 -3
  66. package/dist/client/assets/{agent-site-editor-preview-CKfhefDr.js → agent-site-editor-preview-CoG6BsSN.js} +3 -3
  67. package/dist/client/assets/agent-view-dnqfoYCh.js +1 -0
  68. package/dist/client/assets/{agent-view-guard-DH71qayK.js → agent-view-guard-BhJ52yO2.js} +1 -1
  69. package/dist/client/assets/{agents-list-DqxafIkw.js → agents-list-CTr3UCsA.js} +1 -1
  70. package/dist/client/assets/{ai-providers-DjYgCZLG.js → ai-providers-BcvcgJNN.js} +1 -1
  71. package/dist/client/assets/{alert-DJICfxE6.js → alert-BRhcTM_7.js} +1 -1
  72. package/dist/client/assets/{alert-dialog-DehGSRTj.js → alert-dialog-C3LshfDK.js} +1 -1
  73. package/dist/client/assets/{analytics-sections-DAtGnCwB.js → analytics-sections-4kXlIaik.js} +1 -1
  74. package/dist/client/assets/{api-keys-BRbJWypK.js → api-keys-B-9d463a.js} +1 -1
  75. package/dist/client/assets/api-keys-HStbfsUF.js +1 -0
  76. package/dist/client/assets/app-editor-CKcMSoy_.js +1 -0
  77. package/dist/client/assets/{asset-utils-Dc_dFFTI.js → asset-utils-iBbDDnCM.js} +1 -1
  78. package/dist/client/assets/{auth-CxmhwEgd.js → auth-DkozDQfT.js} +1 -1
  79. package/dist/client/assets/{auth-catchall-CJK5Vd3r.js → auth-catchall-CaoohWWQ.js} +1 -1
  80. package/dist/client/assets/{auth-entry-XnuRce_W.js → auth-entry-sTOujlrO.js} +1 -1
  81. package/dist/client/assets/{auth-split-layout-CNTa1r8B.js → auth-split-layout-C3PsoZUS.js} +1 -1
  82. package/dist/client/assets/{authenticate-and-persist-oauth-D88bk5XQ.js → authenticate-and-persist-oauth-C6gFvq2v.js} +1 -1
  83. package/dist/client/assets/{automation-list-row-CQBHFIqU.js → automation-list-row-ChU0Sito.js} +1 -1
  84. package/dist/client/assets/{automation-runs-BNk_SzYI.js → automation-runs-CL5c_LWy.js} +1 -1
  85. package/dist/client/assets/{automations-CzHIfHdu.js → automations-BIOGw5Qo.js} +1 -1
  86. package/dist/client/assets/{autosend-CR9k38nC.js → autosend-DNj6HoOh.js} +1 -1
  87. package/dist/client/assets/{avatar-BOPY-KDj.js → avatar-DhNZu9aS.js} +1 -1
  88. package/dist/client/assets/{badge-CN6KFcHa.js → badge-BkjHhNmD.js} +1 -1
  89. package/dist/client/assets/{block-document-9qy4_FT6.js → block-document-CQCTTozx.js} +1 -1
  90. package/dist/client/assets/{blocks-preview-workspace-context-uDXO7VHT.js → blocks-preview-workspace-context-DmV6FtS0.js} +1 -1
  91. package/dist/client/assets/{breadcrumb-BxovhK-E.js → breadcrumb-rDzNfg9x.js} +1 -1
  92. package/dist/client/assets/{buckets-B83w_wIY.js → buckets-lQmD1FAW.js} +1 -1
  93. package/dist/client/assets/{build-improve-prompt-doc-Z251-hmh.js → build-improve-prompt-doc-DkODbHCn.js} +1 -1
  94. package/dist/client/assets/{calendar-Dd9w8Cda.js → calendar-CeXsatfK.js} +1 -1
  95. package/dist/client/assets/{capability-load-error-DVSWQq85.js → capability-load-error-DEFOhVqR.js} +1 -1
  96. package/dist/client/assets/{category-editor-Bvuph8Uc.js → category-editor-rQLavGw6.js} +1 -1
  97. package/dist/client/assets/{chart-D837siBd.js → chart-BdDhEkJW.js} +1 -1
  98. package/dist/client/assets/{chat-context-mOTo9_NI.js → chat-context-Dx19VUrB.js} +1 -1
  99. package/dist/client/assets/{chat-draft-D14VCCNF.js → chat-draft-CC0Ic13U.js} +1 -1
  100. package/dist/client/assets/{checkbox-I2peiheL.js → checkbox-BA7heRMu.js} +1 -1
  101. package/dist/client/assets/{choose-editor-BF24n3Ts.js → choose-editor-Np-ReOob.js} +1 -1
  102. package/dist/client/assets/{claim-phase-copy-nu5hupgI.js → claim-phase-copy-COCflyZr.js} +1 -1
  103. package/dist/client/assets/{cli-auth-success-BDtPEboS.js → cli-auth-success-BGmtWa6Z.js} +1 -1
  104. package/dist/client/assets/{client-icons-D_GjDPGl.js → client-icons-GXedD3uv.js} +1 -1
  105. package/dist/client/assets/{collapsible-gVegBMwF.js → collapsible-CZOJ1j6g.js} +1 -1
  106. package/dist/client/assets/{collection-detail-RDK_8DsU.js → collection-detail-qr33JcsZ.js} +1 -1
  107. package/dist/client/assets/{collection-display-button-BFbabvmp.js → collection-display-button-u4S1LAtI.js} +1 -1
  108. package/dist/client/assets/{collection-search-4vCvX0QD.js → collection-search-B-x1t4C0.js} +1 -1
  109. package/dist/client/assets/{collection-table-wrapper-DxjlDy-5.js → collection-table-wrapper-DBE42Jux.js} +1 -1
  110. package/dist/client/assets/{collection-tabs-DS-Im1ic.js → collection-tabs-0f-3wp-x.js} +1 -1
  111. package/dist/client/assets/{combobox-DrUSoNBs.js → combobox-BFwJe_OK.js} +1 -1
  112. package/dist/client/assets/{command-gKTxqgCX.js → command-B8kD2k68.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-CP9gqcaw.js → companion-mcps-section-DDU2J30A.js} +1 -1
  114. package/dist/client/assets/{connect-DRelsvjB.js → connect-DoctJyXv.js} +1 -1
  115. package/dist/client/assets/{connect-layout-Cqhyb7PV.js → connect-layout-Bl9Gwxmt.js} +1 -1
  116. package/dist/client/assets/{connection-C15f5bNS.js → connection-CmGfLu0Q.js} +1 -1
  117. package/dist/client/assets/{connection-card-BMeKUGng.js → connection-card-BVRdv6UQ.js} +1 -1
  118. package/dist/client/assets/{connection-detail-CcO19QVa.js → connection-detail-DOYadB4_.js} +1 -1
  119. package/dist/client/assets/{connection-form-helpers-CmIBkFb3.js → connection-form-helpers-tM_VoG8F.js} +1 -1
  120. package/dist/client/assets/{connections-kJZ9DqVg.js → connections-DHYFDdZP.js} +1 -1
  121. package/dist/client/assets/{context-waQx2W4V.js → context-9zKFm2v9.js} +1 -1
  122. package/dist/client/assets/{create-organization-dialog-DoTSwQvQ.js → create-organization-dialog-BtOGY33C.js} +1 -1
  123. package/dist/client/assets/{decofile-api-DwohDDOu.js → decofile-api-B_E7EbfM.js} +1 -1
  124. package/dist/client/assets/{decopilot-bLAHPQ8D.js → decopilot-DqJHkJDR.js} +1 -1
  125. package/dist/client/assets/{dialog-Dcra4McE.js → dialog-jP8njNI6.js} +1 -1
  126. package/dist/client/assets/{discover-srrXvfjV.js → discover-BPYHS5UU.js} +1 -1
  127. package/dist/client/assets/{domain-settings-CcyamET0.js → domain-settings-BwuEYXEQ.js} +1 -1
  128. package/dist/client/assets/{download-app-dialog-Bt9MR0m_.js → download-app-dialog-mLTiBfmY.js} +1 -1
  129. package/dist/client/assets/{drawer-0y_cyI4K.js → drawer-s4SH2mc3.js} +1 -1
  130. package/dist/client/assets/{editor-BCdzptBY.js → editor-B53xAYN4.js} +1 -1
  131. package/dist/client/assets/{empty-state-BimfTH5j.js → empty-state-CzZHrBSz.js} +1 -1
  132. package/dist/client/assets/{empty-state-BV17J4rU.js → empty-state-D0NCdca7.js} +1 -1
  133. package/dist/client/assets/{extract-connection-data-ByvXZO_i.js → extract-connection-data-CrLtw8ci.js} +1 -1
  134. package/dist/client/assets/{feature-gate-CGTKfO9Z.js → feature-gate-BNDpNIIw.js} +1 -1
  135. package/dist/client/assets/{feature-paywall-Bl0cYtHt.js → feature-paywall-Cva507rq.js} +1 -1
  136. package/dist/client/assets/{file-explorer-76PPVdlw.js → file-explorer-CSd2xyTo.js} +1 -1
  137. package/dist/client/assets/{file-preview-cVqXpH_G.js → file-preview-JRBAUOKb.js} +1 -1
  138. package/dist/client/assets/{file-share-button-BuMvzP63.js → file-share-button-DtUyAqLk.js} +1 -1
  139. package/dist/client/assets/{file-type-icon-DYMR5_m7.js → file-type-icon-BOWlnPUV.js} +1 -1
  140. package/dist/client/assets/{folder-icon-DQB6n2kf.js → folder-icon-C2pAAR00.js} +1 -1
  141. package/dist/client/assets/{form-Bn_VlbjB.js → form-DaPOdR17.js} +1 -1
  142. package/dist/client/assets/{gateway-client-DSN8PosO.js → gateway-client-CGk-7MR6.js} +1 -1
  143. package/dist/client/assets/{general-B-jviDo6.js → general-D4ZIpqC2.js} +1 -1
  144. package/dist/client/assets/{github-icon-8fpS8l__.js → github-icon-ByY-0mGh.js} +1 -1
  145. package/dist/client/assets/{home-CL83ye26.js → home-BLmIPmqc.js} +1 -1
  146. package/dist/client/assets/{hooks-V57yclqv.js → hooks-CXbyAtVG.js} +1 -1
  147. package/dist/client/assets/{icon-button-B2Jd-vIw.js → icon-button-Cq1k6ZVS.js} +1 -1
  148. package/dist/client/assets/{index-B9RXO-FB.js → index-4Z84UU8G.js} +1 -1
  149. package/dist/client/assets/{index-DRFd03i9.js → index-Bdlkb4iQ.js} +1 -1
  150. package/dist/client/assets/{index-Do9AlR8P.js → index-ByaCvMUk.js} +1 -1
  151. package/dist/client/assets/{index-gECsHnHY.js → index-CGsDcnec.js} +1 -1
  152. package/dist/client/assets/{index-CFZrnnmD.js → index-CIpplZnk.js} +2 -2
  153. package/dist/client/assets/{index-Cv3P6Wq4.js → index-CMcP18Ct.js} +1 -1
  154. package/dist/client/assets/{index-DdGk5PPa.js → index-CV72CUvH.js} +1 -1
  155. package/dist/client/assets/{index-Cw3ZmUL2.js → index-D7oOQp3m.js} +1 -1
  156. package/dist/client/assets/{index-D-R5D9vw.js → index-D_DNWqlh.js} +1 -1
  157. package/dist/client/assets/{index-CsvWb_z5.js → index-RHxL1eAg.js} +1 -1
  158. package/dist/client/assets/{index-DtZHgx57.js → index-Yo2ppgZR.js} +1 -1
  159. package/dist/client/assets/{index-C_YKA6uy.js → index-bPpaMV2E.js} +1 -1
  160. package/dist/client/assets/{index-Dq-IpwkC.js → index-ieQLTghw.js} +1 -1
  161. package/dist/client/assets/{index-redirect-CTTvBSR1.js → index-redirect-DRkwr1qK.js} +1 -1
  162. package/dist/client/assets/{index-BRVGbtHX.js → index-upFcZaJ9.js} +1 -1
  163. package/dist/client/assets/{infiniteQueryObserver-Gux7qMEO.js → infiniteQueryObserver-Bqu02ZY5.js} +1 -1
  164. package/dist/client/assets/{infra-billing-Cvvw03Dm.js → infra-billing-CQKKzPZR.js} +1 -1
  165. package/dist/client/assets/{input-DmvvEyNC.js → input-BNnugwQe.js} +1 -1
  166. package/dist/client/assets/{input-B_-SnRO5.js → input-BPtPkDjr.js} +1 -1
  167. package/dist/client/assets/{input-Bwe8NZ5T.js → input-C6oonHwB.js} +1 -1
  168. package/dist/client/assets/{integration-icon-C9XaIOHe.js → integration-icon-FGill8kv.js} +1 -1
  169. package/dist/client/assets/{label-DSLU6fFz.js → label-tAOICfGy.js} +1 -1
  170. package/dist/client/assets/{last-preview-page-Bq7holaY.js → last-preview-page-WUGh86cS.js} +1 -1
  171. package/dist/client/assets/{layout-BKGCgfkN.js → layout-P6Po01E5.js} +1 -1
  172. package/dist/client/assets/{legacy-agents-deep-T9NXwWHP.js → legacy-agents-deep-SOljgH4P.js} +1 -1
  173. package/dist/client/assets/{legacy-main-redirect-CdjJmBj-.js → legacy-main-redirect-6SMZr0lc.js} +1 -1
  174. package/dist/client/assets/{library-CDWN3mYj.js → library-BLOWLPoq.js} +1 -1
  175. package/dist/client/assets/{login-Cx2qLFTf.js → login-BbJtzWX8.js} +1 -1
  176. package/dist/client/assets/{markdown-oeL4d_tN.js → markdown-DOW-6sXC.js} +1 -1
  177. package/dist/client/assets/{mcp-app-renderer-CmLIkf6i.js → mcp-app-renderer-Dp4aDRFa.js} +1 -1
  178. package/dist/client/assets/{mcp-oauth-D1pDEEn0.js → mcp-oauth-BGxWwoSJ.js} +1 -1
  179. package/dist/client/assets/{members-DDvZMbmX.js → members-BPBMhZ2e.js} +1 -1
  180. package/dist/client/assets/{message-templates-D-nRIsWk.js → message-templates-BKToR_KO.js} +1 -1
  181. package/dist/client/assets/{mini-report-page-nehi6gd3.js → mini-report-page-BgGrdgVe.js} +1 -1
  182. package/dist/client/assets/{mock-board-BcrW0eEv.js → mock-board-HS6ZyMs7.js} +3 -3
  183. package/dist/client/assets/{monaco-editor-rG_ojQtN.js → monaco-editor-Bn7ZAIFi.js} +1 -1
  184. package/dist/client/assets/{monitoring-stats-row-u_eyyh8S.js → monitoring-stats-row-uSPm4TGm.js} +1 -1
  185. package/dist/client/assets/{multi-select-C1vxoOWR.js → multi-select-ikM4zDSm.js} +1 -1
  186. package/dist/client/assets/{mustache-_05g5fSZ.js → mustache-UXrEN3oi.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-BParqGue.js → oauth-callback-BuIFkkpz.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-CFCc4vuY.js → oauth-callback-ai-provider-CuOqLEOL.js} +1 -1
  189. package/dist/client/assets/{onboarding-CefimiY5.js → onboarding-BsLWsSNO.js} +1 -1
  190. package/dist/client/assets/{optimistic-project-sidebar-views-Ds7dxAP-.js → optimistic-project-sidebar-views-DpQrux5Y.js} +1 -1
  191. package/dist/client/assets/{org-file-open-context-DI6t8wtB.js → org-file-open-context-YAA5_1V8.js} +1 -1
  192. package/dist/client/assets/{organization-choice-DqCYRx3X.js → organization-choice-QwjuxmVy.js} +1 -1
  193. package/dist/client/assets/{orgs-B9XC3G_x.js → orgs-CnltLAQY.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-Bxx9SwNT.js → page-seo-form-Bs8WgrD5.js} +1 -1
  195. package/dist/client/assets/{pair-CVurrPq-.js → pair-QAcIbRc1.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-BfylXdSz.js → plan-ladder-FCxbXDbY.js} +1 -1
  197. package/dist/client/assets/{popover-Baq0imIs.js → popover-fTX4Xa7z.js} +1 -1
  198. package/dist/client/assets/{post-calendar-Deyu5RSY.js → post-calendar-CCy3Rkj-.js} +1 -1
  199. package/dist/client/assets/{post-editor-B77-jPfP.js → post-editor-KBvky45B.js} +1 -1
  200. package/dist/client/assets/{preview-content-Cb2RYCeo.js → preview-content-D4jGV5tt.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-AWoznOua.js → preview-dialog-CfNH0Lbe.js} +1 -1
  202. package/dist/client/assets/{profile-Bno_MC0t.js → profile-BctUXNiF.js} +1 -1
  203. package/dist/client/assets/{project-app-view-BoEEmEk4.js → project-app-view-B15pKaAL.js} +1 -1
  204. package/dist/client/assets/{project-feed-DT9rU3wJ.js → project-feed-YdABu1Sg.js} +1 -1
  205. package/dist/client/assets/{project-icon-CzEj0avy.js → project-icon-CK24j_02.js} +1 -1
  206. package/dist/client/assets/project-reports-Cmyeztbb.js +1 -0
  207. package/dist/client/assets/project-tasks-CK_xwSxn.js +1 -0
  208. package/dist/client/assets/{prompts-BU3lT5yK.js → prompts-BxzWfQAU.js} +1 -1
  209. package/dist/client/assets/record-editor-B-cJMYFm.js +1 -0
  210. package/dist/client/assets/{redirect-editor-BrsiQdWf.js → redirect-editor-C9LkCwmC.js} +1 -1
  211. package/dist/client/assets/{reports-BWa8EEwC.js → reports-23kvwh32.js} +1 -1
  212. package/dist/client/assets/reports-CTNHSnDH.js +1 -0
  213. package/dist/client/assets/{reports-onboarding-soeZpVO2.js → reports-onboarding-B1LUM_Oo.js} +1 -1
  214. package/dist/client/assets/{reports-tab-DvvKKs9h.js → reports-tab-BQIBSteI.js} +2 -2
  215. package/dist/client/assets/{repositories-DxBiP88Q.js → repositories-CIaQ1-tt.js} +1 -1
  216. package/dist/client/assets/{repository-import-picker-DmgbIRex.js → repository-import-picker-BsAgV8Se.js} +1 -1
  217. package/dist/client/assets/{repository-picker-BdbJB8MH.js → repository-picker-CqBWAelp.js} +1 -1
  218. package/dist/client/assets/{require-capability-CUtBt1bi.js → require-capability-Shivm_GS.js} +1 -1
  219. package/dist/client/assets/{required-auth-layout-BlnGUT2q.js → required-auth-layout-DZJ0ncSQ.js} +1 -1
  220. package/dist/client/assets/{reset-password-OMiTHFai.js → reset-password-S2Hx9vgp.js} +1 -1
  221. package/dist/client/assets/{resizable-Dr5PNlfE.js → resizable-DSp-mBJp.js} +1 -1
  222. package/dist/client/assets/{review-settings-84byzwHU.js → review-settings-CoiR_Ztj.js} +1 -1
  223. package/dist/client/assets/{rich-text-link-control-CFnLXxfY.js → rich-text-link-control-BAlsv86z.js} +1 -1
  224. package/dist/client/assets/{roles-AcbVFhCZ.js → roles-DArCtTLg.js} +1 -1
  225. package/dist/client/assets/{route-BA_J22E-.js → route-26Mt5mzA.js} +1 -1
  226. package/dist/client/assets/{route-73J6vHiy.js → route-DgmVTZMj.js} +1 -1
  227. package/dist/client/assets/{route-BHnu0h_N.js → route-Dy8UtoAO.js} +1 -1
  228. package/dist/client/assets/{route-page-header-CByDrdCZ.js → route-page-header-DRUN9y5J.js} +1 -1
  229. package/dist/client/assets/{runnable-block-editor-C-z6sg8d.js → runnable-block-editor-BZ6oB296.js} +1 -1
  230. package/dist/client/assets/{sandbox-lifecycle-context-244BQJ78.js → sandbox-lifecycle-context-CZACEFk2.js} +1 -1
  231. package/dist/client/assets/{schema-Du8_zRy7.js → schema-CPd5aeYI.js} +1 -1
  232. package/dist/client/assets/{scroll-area-DWMWIudU.js → scroll-area-BmpdCi7H.js} +1 -1
  233. package/dist/client/assets/{search-input-C7zzo1gV.js → search-input-D64mWW5B.js} +1 -1
  234. package/dist/client/assets/{search-toggle-CArb_7uo.js → search-toggle-Czd1UahM.js} +1 -1
  235. package/dist/client/assets/{secret-picker-CQN9d587.js → secret-picker-BbxILR0N.js} +1 -1
  236. package/dist/client/assets/{secrets-D1CraqxC.js → secrets-CWGHj3-4.js} +1 -1
  237. package/dist/client/assets/{sections-editor-Wq74SyFR.js → sections-editor-DGlNHFIn.js} +1 -1
  238. package/dist/client/assets/{select-BOM-aKhP.js → select-Bo6x_o6t.js} +1 -1
  239. package/dist/client/assets/{select-model-DpXoMCZH.js → select-model-rH9zU1R6.js} +1 -1
  240. package/dist/client/assets/{seo-editor-D1cw49ws.js → seo-editor-DCpmtymR.js} +1 -1
  241. package/dist/client/assets/{separator-DW6Prz-B.js → separator-D5qdiNs3.js} +1 -1
  242. package/dist/client/assets/{settings-tab-BlphdJug.js → settings-tab-PxnX0_3G.js} +1 -1
  243. package/dist/client/assets/{sheet-Dq13NqY6.js → sheet-BGZWKAH-.js} +1 -1
  244. package/dist/client/assets/{shell-layout-DMJ3Gw_b.js → shell-layout-BgCM8XJt.js} +1 -1
  245. package/dist/client/assets/{sidebar-n3X--4aE.js → sidebar-CGrYLwXg.js} +1 -1
  246. package/dist/client/assets/{skill-preview-ht8NWRpt.js → skill-preview-8oicUgJt.js} +1 -1
  247. package/dist/client/assets/{skills-2dbI_ehN.js → skills-wyI-absD.js} +1 -1
  248. package/dist/client/assets/{sso-D4ClPuk5.js → sso-HywbSvna.js} +1 -1
  249. package/dist/client/assets/{suggestion-B2gCPjEY.js → suggestion-DRraTYTY.js} +1 -1
  250. package/dist/client/assets/{switch-BpU_dXOg.js → switch-Cfah00lh.js} +1 -1
  251. package/dist/client/assets/{synced-repos-B4WffdFD.js → synced-repos-CGTEq57k.js} +1 -1
  252. package/dist/client/assets/{table-BK5Bj0BA.js → table-DAZIzNQ8.js} +1 -1
  253. package/dist/client/assets/{tabs-DtulKHna.js → tabs-v7aq9W_R.js} +1 -1
  254. package/dist/client/assets/{task-board-BlCSl7H6.js → task-board-CGkhJUE0.js} +1 -1
  255. package/dist/client/assets/{task-route-Buk2mgML.js → task-route-CaklBMYm.js} +1 -1
  256. package/dist/client/assets/{task-status-BvbYEbq9.js → task-status-CN1U2UFr.js} +1 -1
  257. package/dist/client/assets/{taskboard-analytics-C4h2ZM5g.js → taskboard-analytics-ChfWJlvV.js} +1 -1
  258. package/dist/client/assets/{tasks-ClVRdGRp.js → tasks-CF4j9ZQy.js} +1 -1
  259. package/dist/client/assets/tasks-iRvr4R5a.js +1 -0
  260. package/dist/client/assets/{textarea-CDG_4h5K.js → textarea-AoHG-xc8.js} +1 -1
  261. package/dist/client/assets/{thread-analytics-CrrAYz-K.js → thread-analytics-bBQJ6D7W.js} +1 -1
  262. package/dist/client/assets/{thread-button-Bt2nv3eP.js → thread-button-DC2FqVVD.js} +1 -1
  263. package/dist/client/assets/{thread-intent-DfUdqfo1.js → thread-intent-glwqnDtC.js} +1 -1
  264. package/dist/client/assets/{thread-route-CIar6WIg.js → thread-route-CxXnvrpW.js} +1 -1
  265. package/dist/client/assets/{thread-route-BcHRblub.js → thread-route-D3TxABEC.js} +1 -1
  266. package/dist/client/assets/{thread-sheet-body-BeD4yJxi.js → thread-sheet-body-DrfgB9cA.js} +1 -1
  267. package/dist/client/assets/{toggle-group-CNL0xUW4.js → toggle-group-DOgcFL4v.js} +1 -1
  268. package/dist/client/assets/{toolbar-icon-button-bv_fQ-aj.js → toolbar-icon-button-y4PM5-9w.js} +1 -1
  269. package/dist/client/assets/{tooltip-CPnP6Sjs.js → tooltip-CXi7o6QP.js} +1 -1
  270. package/dist/client/assets/{track-B9PuaPFx.js → track-DmW-NZr9.js} +1 -1
  271. package/dist/client/assets/{types-d1eRFziw.js → types-BtZlYpRe.js} +1 -1
  272. package/dist/client/assets/{usage-stats-DJsI8Eqk.js → usage-stats-xKmxu4iy.js} +1 -1
  273. package/dist/client/assets/{use-ai-providers-BV_DvH7o.js → use-ai-providers-BCh0GxqC.js} +1 -1
  274. package/dist/client/assets/{use-automations-BHsMhlO9.js → use-automations-D87B_EUH.js} +1 -1
  275. package/dist/client/assets/{use-autosave-DgwX0mMm.js → use-autosave-frEJXTDA.js} +1 -1
  276. package/dist/client/assets/{use-connect-companion-BzIs5X88.js → use-connect-companion-CTqRarXO.js} +1 -1
  277. package/dist/client/assets/{use-connection-Bi6HLcH4.js → use-connection-CXcRnxjN.js} +1 -1
  278. package/dist/client/assets/{use-copy-CDhoRgm3.js → use-copy-gkafpnsk.js} +1 -1
  279. package/dist/client/assets/{use-create-virtual-mcp-DIHuJhyr.js → use-create-virtual-mcp-DIg3RbKx.js} +1 -1
  280. package/dist/client/assets/{use-date-fns-locale-Cy0bIV3c.js → use-date-fns-locale-DrMzy_FK.js} +1 -1
  281. package/dist/client/assets/{use-debounced-autosave-D8Sorx0q.js → use-debounced-autosave-D_-x43mA.js} +1 -1
  282. package/dist/client/assets/{use-debounced-value-Bi1oqAau.js → use-debounced-value-B4B0DOlQ.js} +1 -1
  283. package/dist/client/assets/{use-deco-credits-CRBFL3xa.js → use-deco-credits-Dh1J6eMk.js} +1 -1
  284. package/dist/client/assets/{use-decopilot-events-CVfzaSiv.js → use-decopilot-events-AZfnvS0v.js} +1 -1
  285. package/dist/client/assets/{use-delete-connection-CX0v-UqP.js → use-delete-connection-BSWf3M-7.js} +1 -1
  286. package/dist/client/assets/{use-deployment-admin-C2loCmMs.js → use-deployment-admin-Bz8D_07n.js} +1 -1
  287. package/dist/client/assets/{use-entitlements-qq0onzk3.js → use-entitlements-DmXuSjaB.js} +1 -1
  288. package/dist/client/assets/{use-fast-preview-draft-url-DUGuDJ0B.js → use-fast-preview-draft-url-12Zomm_h.js} +1 -1
  289. package/dist/client/assets/{use-file-configs-DI6Asnep.js → use-file-configs-DDF4ME58.js} +1 -1
  290. package/dist/client/assets/{use-in-settings-2EIzhXwd.js → use-in-settings-7nb91Hdl.js} +1 -1
  291. package/dist/client/assets/{use-infinite-scroll-BwJMlu6L.js → use-infinite-scroll-ufEM3hT-.js} +1 -1
  292. package/dist/client/assets/{use-join-requests-752eIkzS.js → use-join-requests-Dk4ggQU5.js} +1 -1
  293. package/dist/client/assets/{use-main-panel-tabs-DIxFD1x0.js → use-main-panel-tabs-CPdeW3w6.js} +1 -1
  294. package/dist/client/assets/{use-mcp-auth-status-Cyg7VElH.js → use-mcp-auth-status-Dqxl918q.js} +1 -1
  295. package/dist/client/assets/{use-mcp-client-4SfStdvU.js → use-mcp-client-Beusq7Tu.js} +1 -1
  296. package/dist/client/assets/{use-mcp-prompts-DNTC-VnG.js → use-mcp-prompts-fJ5FqsHx.js} +1 -1
  297. package/dist/client/assets/{use-mcp-tools-CmJbGXa2.js → use-mcp-tools-CtkSsDJL.js} +1 -1
  298. package/dist/client/assets/{use-members-ChLgHSO3.js → use-members-6xmqE_DE.js} +1 -1
  299. package/dist/client/assets/{use-mobile-DARHzVZh.js → use-mobile-Cib4VYxP.js} +1 -1
  300. package/dist/client/assets/{use-navigate-to-agent-a1v5JNRv.js → use-navigate-to-agent-DL9BnEdc.js} +1 -1
  301. package/dist/client/assets/{use-open-billing-url-CSkUOZcG.js → use-open-billing-url-NPMAfiIz.js} +1 -1
  302. package/dist/client/assets/{use-org-auth-client-BcltMH40.js → use-org-auth-client-BhRawBZC.js} +1 -1
  303. package/dist/client/assets/{use-org-fs-PfmH2IwE.js → use-org-fs-BCGhVQu5.js} +1 -1
  304. package/dist/client/assets/{use-org-repo-syncs-BGgD9fX9.js → use-org-repo-syncs-CORE3eQH.js} +1 -1
  305. package/dist/client/assets/{use-org-sso-BcU16muD.js → use-org-sso-CeH0e9fd.js} +1 -1
  306. package/dist/client/assets/{use-organization-roles-RhvAN6UI.js → use-organization-roles-BAYGR7ct.js} +1 -1
  307. package/dist/client/assets/{use-organization-settings-BLvm6CUv.js → use-organization-settings-0Zwi3Fi0.js} +1 -1
  308. package/dist/client/assets/{use-panel-navigate-Ba3IZxfG.js → use-panel-navigate-CWuMssp-.js} +1 -1
  309. package/dist/client/assets/{use-project-native-view-presence-CsPNZgcc.js → use-project-native-view-presence-DxprB2h6.js} +1 -1
  310. package/dist/client/assets/{use-project-scope-BspeH_sq.js → use-project-scope-CJsyC3na.js} +1 -1
  311. package/dist/client/assets/{use-releases-CVzN8uNR.js → use-releases-DCcyngLk.js} +1 -1
  312. package/dist/client/assets/{use-reports-diagnostic-CrvplLbm.js → use-reports-diagnostic-WgUi0pqp.js} +1 -1
  313. package/dist/client/assets/{use-route-default-main-DSqzyOuP.js → use-route-default-main-BcsKyhK4.js} +1 -1
  314. package/dist/client/assets/{use-secrets-DgrFX5xg.js → use-secrets-Cp7IdDQp.js} +1 -1
  315. package/dist/client/assets/{use-section-preview-base-B-Hn9i9b.js → use-section-preview-base-fadywuhv.js} +1 -1
  316. package/dist/client/assets/{use-session-runtime-BVLmSBh6.js → use-session-runtime-Dr7e2ZQv.js} +1 -1
  317. package/dist/client/assets/{use-tags-BOv9arBp.js → use-tags-BnDGg-BG.js} +1 -1
  318. package/dist/client/assets/{use-task-board-analytics-DPM83CD7.js → use-task-board-analytics-AN_DQWMB.js} +1 -1
  319. package/dist/client/assets/{use-task-metadata-CJ-QxfGm.js → use-task-metadata-uBP-gX-8.js} +1 -1
  320. package/dist/client/assets/{use-thread-analytics-C0CiMqbi.js → use-thread-analytics-DWIa8VRe.js} +1 -1
  321. package/dist/client/assets/{use-thread-outputs-CTmmbNmM.js → use-thread-outputs-CdqDCmBJ.js} +1 -1
  322. package/dist/client/assets/{use-virtual-mcp-B1-yfeBH.js → use-virtual-mcp-BFBtWaJR.js} +1 -1
  323. package/dist/client/assets/useInfiniteQuery-CMmW9U3V.js +1 -0
  324. package/dist/client/assets/{useQueries-CrqtqlHM.js → useQueries-BjqYP0q_.js} +1 -1
  325. package/dist/client/assets/useSuspenseInfiniteQuery-B6GLqmw0.js +1 -0
  326. package/dist/client/assets/{users-mYCEW-vA.js → users-ovx8MoDb.js} +1 -1
  327. package/dist/client/assets/{utils-D2y8J057.js → utils-CwK0CgrK.js} +1 -1
  328. package/dist/client/assets/{variant-calendar-7H3LNEKh.js → variant-calendar-D7pBaGln.js} +1 -1
  329. package/dist/client/assets/{variant-matcher-override-4dV3T02L.js → variant-matcher-override-Bpf_q63q.js} +1 -1
  330. package/dist/client/assets/{view-mode-toggle-BQub2iHi.js → view-mode-toggle-KOhMNfN3.js} +1 -1
  331. package/dist/client/assets/{virtual-mcp-7pXCbTsW.js → virtual-mcp-Bw3gaPfR.js} +1 -1
  332. package/dist/client/index.html +1 -1
  333. package/dist/server/cli.js +49 -49
  334. package/dist/server/server.js +136 -136
  335. package/package.json +1 -1
  336. package/dist/client/assets/agent-app-BynIiQPm.js +0 -1
  337. package/dist/client/assets/agent-deck-B4AuEIZ3.js +0 -1
  338. package/dist/client/assets/agent-file-CtFUY5q3.js +0 -1
  339. package/dist/client/assets/agent-library-file-Cs2o3xUR.js +0 -1
  340. package/dist/client/assets/agent-settings-D_j9iMnB.js +0 -1
  341. package/dist/client/assets/agent-site-editor-code-DSXPZTZD.js +0 -2
  342. package/dist/client/assets/agent-view-cJkl5h-x.js +0 -1
  343. package/dist/client/assets/api-keys-CRlcHMxs.js +0 -1
  344. package/dist/client/assets/app-editor-BYU_FtWh.js +0 -1
  345. package/dist/client/assets/project-reports-DYAJh_Wl.js +0 -1
  346. package/dist/client/assets/project-tasks-CE9Re7Tj.js +0 -1
  347. package/dist/client/assets/record-editor-BZi1czEu.js +0 -1
  348. package/dist/client/assets/reports-ARrC7tI6.js +0 -1
  349. package/dist/client/assets/tasks-IK2ZoIhQ.js +0 -1
  350. package/dist/client/assets/useInfiniteQuery-CpVWUzdl.js +0 -1
  351. package/dist/client/assets/useSuspenseInfiniteQuery-CXyd6z14.js +0 -1
@@ -1,4 +1,4 @@
1
- import{aN as vr,c as B,o as Cn,m as Q0,K as Q9,b as f9,j as r,l as H,B as h9,T as En,aG as br,e as wn,r as F,t as A9,aO as jr,aP as J9,n as Sr,Z as T9,aM as An,F as ce,am as Le,G as N9,H as G9,I as H9,aQ as de,aL as Fe,aK as kr,h as x0,aR as Nr,E as Tr,aS as _r}from"./index-CFZrnnmD.js";import{u as Ke}from"./use-session-runtime-BVLmSBh6.js";import{u as Ge,g as Rn,A as D9,B as Mn,r as F9,D as Cr,b as j9,P as X9,E as e0,N as I0,F as k9,L as Pt,H as u0,C as Er,I as Pn,l as In,J as It,K as wr,M as Ar,O as Fn,Q as _0,k as Rr,T as Mr,v as Pr,U as Ir,V as Fr,W as Or}from"./claim-phase-copy-nu5hupgI.js";import{e as On}from"./backoff-8mStPHYB.js";import{a1 as Dr,a2 as $r,a3 as zr,a4 as Br,a5 as Vr,a6 as Ur,a7 as Kr,a8 as Gr,T as Hr,a9 as Dn,aa as ue,p as qr,_ as R0,R as Yr,o as Wr,ab as Jr,B as $n,ac as Ft,ad as Zr,a0 as Qr,y as Xr,ae as ei,af as ti}from"./agent-icon-b_XHjZEZ.js";import{i as zn}from"./Sun-mSxdzNTE.js";import{S as Ot}from"./sandbox-start-errors-BK_aDCyt.js";import{G as ni}from"./pair-CVurrPq-.js";import{i as q9}from"./Check-Bcnv-H55.js";import{i as He,c as si,d as ri,e as ii,b as oi}from"./Tool01-CaOf6Mu4.js";import{e as fe,C as me,b as K9,a as f0,c as pe,d as qe,f as ai}from"./command-gKTxqgCX.js";import{a as F0,b as O0,P as D0}from"./popover-Baq0imIs.js";import{s as li,a as ci,b as Li}from"./utils-D2y8J057.js";import{u as Bn}from"./chat-context-mOTo9_NI.js";import{n as Vn}from"./LinkExternal01-3Lsw2Z8I.js";import{i as Un}from"./X-xX_XXXXt.js";import{S as Kn}from"./scroll-area-DWMWIudU.js";import{T as _9,a as C9,c as E9}from"./tooltip-CPnP6Sjs.js";import{a as Gn,d as di}from"./use-virtual-mcp-B1-yfeBH.js";import{M as Hn}from"./monaco-editor-rG_ojQtN.js";import{C as ui}from"./calendar-Dd9w8Cda.js";import{I as R9}from"./input-B_-SnRO5.js";import{T as fi}from"./textarea-CDG_4h5K.js";import{L as $9}from"./label-DSLU6fFz.js";import{i as mi}from"./XClose-Cx8dSxYY.js";import{s as y0}from"./Plus-t4kIBGIE.js";import{E as s0,M as pi,m as hi,g as $0,u as gi,s as xi,a as yi,b as vi}from"./index-B9RXO-FB.js";import{S as he,b as ge,a as xe,d as ye,c as m0}from"./select-BOM-aKhP.js";import{a as bi}from"./Palette-Bb9IRvVj.js";import{T as M9,R as ji,u as Ye,C as We,a as Je,b as p0,s as Ze,K as Qe,P as Xe,D as et,c as tt,S as nt,v as st,d as rt,e as X0}from"./rich-text-link-control-CFnLXxfY.js";import{S as it}from"./switch-BpU_dXOg.js";import{a as ve}from"./Copy01-CMEvgxoC.js";import{s as Si}from"./Eye-DlNsmazk.js";import{s as r0}from"./Trash01-DHtEq5nA.js";import{t as z0}from"./ChevronUp-wyCoS3df.js";import{c as N0}from"./UserSquare-BfH7tTry.js";import{i as l0}from"./Share07-DxxTtQWb.js";import{C as ki}from"./combobox-DrUSoNBs.js";import{s as qn}from"./XCircle-Bdqr7Csd.js";import{A as Ni,a as Ti,b as _i,c as Ci,g as Ei,d as wi,e as Ai,f as Ri}from"./alert-dialog-DehGSRTj.js";import{d as ot,h as at,c as lt,e as Yn,b as ct,D as Lt}from"./dialog-Dcra4McE.js";import{b as dt}from"./sandbox-url-D3mC8qhT.js";import{i as Oe}from"./ZoomOut-C8BTMnO9.js";import{i as B0}from"./Upload01--yrzZIir.js";import{i as Wn}from"./AlertCircle-BQBmepo1.js";import{i as Jn}from"./DotsVertical-B97QY-fA.js";import{a as h0}from"./Image01-CGox3JEN.js";import{S as Mi}from"./search-input-C7zzo1gV.js";import{T as Pi,a as Ii,c as Fi,b as Oi}from"./tabs-DtulKHna.js";import{u as Di}from"./use-debounced-value-Bi1oqAau.js";import{u as $i,a as Zn}from"./use-file-configs-DI6Asnep.js";import{u as zi,a as ut,i as Qn,e as Bi,b as Dt,f as Vi}from"./asset-utils-Dc_dFFTI.js";import{m as Xn}from"./match-site-slug-config-D3fUJ6vX.js";import{a as Ui,T as Ki}from"./toggle-group-CNL0xUW4.js";import{f as Gi,p as Hi,s as qi,t as Yi,b as Wi,a as Ji}from"./decofile-api-DwohDDOu.js";import{o as Zi}from"./sandbox-git-api-B1R0585s.js";const ft=vr("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);function mt(t,e){const n=(t??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${e}`:e}function $t(t){let e;try{e=JSON.parse(t)}catch{return null}return typeof e!="object"||e===null||Array.isArray(e)?null:e}function es(t,e){return dt(t,e)}function Qi(t,e){return dt(t,"preview-fetch",{path:e})}function Xi(t){return es(t,"preview-invoke")}function E4(t){return es(t,"catalog-invoke")}function ts(t){try{const{hostname:e}=new URL(t);return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}function e1(){if(typeof document>"u")return null;const t=Array.from(document.querySelectorAll("iframe"));for(const e of t){const n=e.getAttribute("src");if(n&&ts(n))return n}return null}function ns(t,e){const n=t.previewUrl??t.getFallbackPreviewUrl?.()??e1();return n&&ts(n)?new URL(e,n).toString():Qi(t,e)}function t1(t){return ns(t,"/.decofile")}function n1(t){return t===400?"absent":t===404?"unavailable":t>=200&&t<300?"ok":"error"}function zt(t){return t.liveOk||t.committedAbsent?404:t.liveStatus??502}async function ss(t,e){const n=dt(t,"read"),s=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,full:!0})}),i=n1(s.status);if(i==="absent")return{kind:"absent"};if(i==="unavailable")return{kind:"unavailable"};if(i==="error"){const a=new Error(`Failed to read ${e}: ${s.status}`);throw a.status=s.status,a}const o=await s.json();if(typeof o.content!="string")return{kind:"unavailable"};try{return{kind:"data",data:JSON.parse(li(o.content))}}catch{return{kind:"unavailable"}}}async function s1(t){const e=`/api/${t.orgSlug}/decofile/${encodeURIComponent(t.virtualMcpId)}/${encodeURIComponent(t.branch)}/meta`,n=await fetch(e,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const s=new Error(`Failed to read committed meta: ${n.status}`);throw s.status=n.status,s}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function pt(t){return Gn(t)?.metadata?.runtime?.path??null}function rs(t){const e=`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`;return t.localPreviewUrl?`${e}:local:${t.localPreviewUrl}`:e}function w4(t,e){const n=B.c(16),{url:s}=Ge(t?.virtualMcpId),i=!!s,o=t?rs({...t,localPreviewUrl:s}):"",a=e?.fetchEnabled??!0,l=pt(t?.virtualMcpId),c=Ke(t?.virtualMcpId).runtime==="cms",L=Cn(),d=Q9.decofile(o);let u;n[0]!==c||n[1]!==a||n[2]!==i||n[3]!==s||n[4]!==l||n[5]!==t||n[6]!==L?(u=async()=>{if(i){const v=await fetch(new URL("/.decofile",s).toString(),{cache:"no-store"}).catch(o1),j=v?.ok?$t(await v.text()):null;if(j)return j;const S=new Error("decofile unavailable (local tunnel unreachable)");throw S.status=502,S}if(c)return Gi(L,t);const p=()=>ss(t,mt(l,".deco/blocks.gen.json"));if(a){const v=await fetch(t1(t),{cache:"no-store"}).catch(i1);if(v?.ok){const x=$t(await v.text());if(x)return x}const j=await p();if(j.kind==="data")return j.data;const S=new Error(`Failed to fetch decofile: ${v?.status??"network error"}`);throw S.status=zt({liveOk:!!v?.ok,liveStatus:v?.status,committedAbsent:j.kind==="absent"}),S}const g=await p();if(g.kind==="data")return g.data;const h=new Error("decofile unavailable (preview down, no committed snapshot)");throw h.status=zt({liveOk:!1,committedAbsent:g.kind==="absent"}),h},n[0]=c,n[1]=a,n[2]=i,n[3]=s,n[4]=l,n[5]=t,n[6]=L,n[7]=u):u=n[7];const f=!!t;let y;n[8]!==c||n[9]!==i?(y=(p,g)=>{if(c||i)return p<3;const h=g.status;return h!==502&&h!==404&&p<2},n[8]=c,n[9]=i,n[10]=y):y=n[10];let m;return n[11]!==d||n[12]!==u||n[13]!==f||n[14]!==y?(m={queryKey:d,queryFn:u,enabled:f,staleTime:3e4,retry:y,retryDelay:r1},n[11]=d,n[12]=u,n[13]=f,n[14]=y,n[15]=m):m=n[15],Q0(m)}function r1(t){return On(5e3,1e3,t,2,0)}function i1(){return null}function o1(){return null}const a1=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function l1(t){return t.includes("matchers")||t.includes("Match")}function is(t,e){const n=t.__resolveType;return typeof n!="string"||!n||a1.has(n)?!1:e?Cr(e,n):l1(n)}function c1(t,e){const n=[];for(const[s,i]of Object.entries(e)){if(s.includes("/")||!D9(s)||Mn(s)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;is(o,t)&&n.push({blockKey:s,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((s,i)=>(s.name??s.blockKey).localeCompare(i.name??i.blockKey))}function v0(t,e,n){if(!t)return!1;const s=t.__resolveType;if(typeof s!="string"||!D9(s)||!Object.hasOwn(e,s))return!1;const i=e[s];return!i||typeof i!="object"||Array.isArray(i)?!1:is(i,n)}function L1(t,e,n){return v0(t,e,n)?t?.__resolveType??null:null}function os(t,e,n){if(!t)return null;const s=t.__resolveType??"";if(!s)return null;if(v0(t,e,n)){const a=e[s]??{},l=a.__resolveType??s,{__resolveType:c,name:L,...d}=a;return{resolveType:l,data:d,blockKey:s}}const{__resolveType:i,...o}=t;return{resolveType:s,data:o}}function as(t,e,n){const s=os(t,e,n);return s?{__resolveType:s.resolveType,...s.data}:{__resolveType:""}}function ht(t,e,n){if(t)return v0(t,e,n)?as(t,e,n):t}function T0(t,e,n,s){if(!t)return"Default";if(v0(t,e,s)){const i=t.__resolveType??"",o=e[i];return Rn(i,o)}return n(t)}function d1(t,e,n){return{__resolveType:t,...e,name:n}}function u1(t){return{__resolveType:t}}function f1(t,e,n){const s=os(t,e,n);return s?{resolveType:s.resolveType,formValue:s.data}:{resolveType:"",formValue:{}}}function m1(t,e){const n={__resolveType:t};if(!t||!e)return n;const s=F9(t,e),i=s?.type==="inline-union"?s.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function p1(t){const e=[];return t.fastPreviewActive?e.push({kind:"committed"}):(t.fetchEnabled&&t.previewUrl&&e.push({kind:"live",baseUrl:t.previewUrl}),e.push({kind:"committed"})),t.productionUrl&&e.push({kind:"production",baseUrl:t.productionUrl}),e}function h1(t){return Q9.liveMeta(t.orgSlug,t.virtualMcpId,t.branch,t.previewUrl??"",t.productionUrl??"")}function A4(t,e){const n=B.c(21),{url:s}=Ge(t?.virtualMcpId),i=!!s,o=i||(e?.fetchEnabled??!0),a=s??t?.previewUrl,l=pt(t?.virtualMcpId),{previewServerUrl:c,runtime:L}=Ke(t?.virtualMcpId),d=!i&&L==="cms";let u;n[0]!==t||n[1]!==a||n[2]!==c?(u=t?h1({...t,previewUrl:a,productionUrl:c}):Q9.liveMeta(""),n[0]=t,n[1]=a,n[2]=c,n[3]=u):u=n[3];let f;n[4]!==d||n[5]!==o||n[6]!==i||n[7]!==l||n[8]!==t||n[9]!==a||n[10]!==c?(f=async()=>{const h=x1,v=()=>d?s1(t):ss(t,mt(l,".deco/meta.gen.json")),j=i&&a?[{kind:"live",baseUrl:a}]:p1({fetchEnabled:o,previewUrl:a,productionUrl:c,fastPreviewActive:d});for(const x of j){if(x.kind==="committed"){const k=await v();if(k.kind==="data")return k.data;continue}const b=await h(x.baseUrl);if(b)return b}const S=new Error("live meta unavailable (dev server down, no committed snapshot, no production fallback)");throw S.status=502,S},n[4]=d,n[5]=o,n[6]=i,n[7]=l,n[8]=t,n[9]=a,n[10]=c,n[11]=f):f=n[11];const y=!!t,m=e?.refetchInterval;let p;n[12]!==d||n[13]!==i?(p=(h,v)=>(d||i||v.status!==502)&&h<3,n[12]=d,n[13]=i,n[14]=p):p=n[14];let g;return n[15]!==u||n[16]!==f||n[17]!==y||n[18]!==m||n[19]!==p?(g={queryKey:u,queryFn:f,enabled:y,refetchInterval:m,refetchIntervalInBackground:!1,staleTime:3e5,retry:p,retryDelay:g1},n[15]=u,n[16]=f,n[17]=y,n[18]=m,n[19]=p,n[20]=g):g=n[20],Q0(g)}function g1(t){return On(5e3,1e3,t,2,0)}async function x1(t){const e=new URL("/live/_meta",t).href,n=await fetch(e,{cache:"no-store"}).catch(y1);if(!n?.ok)return null;try{return await n.json()}catch{return null}}function y1(){return null}function Ee(t,e,n){const s=n[t];return typeof s?.name=="string"&&s.name||t.replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase())||`Section ${e+1}`}function R4(t,e){return t.map((n,s)=>{const i=n.__resolveType??"",o=j9(i);if(!o&&i!==""&&D9(i)&&i in e)return{index:s,resolveType:i,label:Ee(i,s,e),isLazy:!1,isSavedBlock:!0};const a=o?n.section:void 0,l=o?a?.__resolveType??"":i;if(l===X9||l===e0){const L=o?a:n,d=Array.isArray(L?.variants)?L.variants:[];if(d.length===1&&(d[0]?.rule?.__resolveType??"")===I0){const y=d[0]?.value??{};let m=y.__resolveType??"";const p=j9(m);let g=y;if(p){const h=y.section;m=h?.__resolveType??m,h&&(g=h)}if(m===X9||m===e0){const v=(Array.isArray(g.variants)?g.variants:[])[0]?.value?.__resolveType,j=v?k9(v):"Section";return{index:s,resolveType:i,label:`Variants of ${j}`,variantOf:j,isHidden:!0,isLazy:p}}return m!==""&&D9(m)&&m in e?{index:s,resolveType:i,label:Ee(m,s,e),isHidden:!0,isLazy:p,isSavedBlock:!0}:{index:s,resolveType:i,label:k9(m)||`Section ${s+1}`,isHidden:!0,isLazy:p}}const u=d[0]?.value?.__resolveType,f=u?k9(u):"Section";return{index:s,resolveType:i,label:`Variants of ${f}`,variantOf:f,isMultivariate:!0,isLazy:o}}const c=o?n.section?.__resolveType??i:i;return o&&c!==""&&D9(c)&&c in e?{index:s,resolveType:i,label:Ee(c,s,e),isLazy:!0,isSavedBlock:!0}:{index:s,resolveType:i,label:k9(c)||`Section ${s+1}`,isLazy:o}})}function ls(t){const e=t.__resolveType??"";return j9(e)?t.section??t:t}function ee(t){const i=(j9(t.__resolveType??"")?t.section:t)?.variants?.[0];return i?.rule?.__resolveType!==I0?null:i?.value??null}function M4(t){const e=ls(t);return{__resolveType:e0,variants:[{value:e,rule:{__resolveType:I0}}]}}function P4(t){const e=t.__resolveType??"";if(!e)return null;if(j9(e))return t.section??null;const n=ee(t);return n?j9(n.__resolveType??"")?n:{__resolveType:Pt,section:ls(n)}:{__resolveType:Pt,section:t}}function G0(t){const e=t.__resolveType??"";if(!e)return null;if(j9(e)){const n=t.section,s=n?.__resolveType??"";return!s||!n?null:{resolveType:s,data:n}}return{resolveType:e,data:t}}function I4(t){const e=ee(t);if(e)return G0(e);if(j9(t.__resolveType??"")){const s=t.section;if(!s)return null;const i=ee(s);return G0(i||s)}return G0(t)}function F4(t){return ee(t)}const v1=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function gt(t){if(!t)return!1;const e=t.__resolveType??"";return e===""?Object.keys(t).length===0:v1.includes(e)||e.includes("always")}function b1(t){const e=t.variants??[];if(e.length===0)return-1;const n=e.findIndex(s=>gt(s.rule));return n!==-1?n:e.length-1}function O4(t,e,n){const s=n.variants??[];if(s.length===0)return null;const i=b1(n),o=s[i]?.value;if(!o)return null;const a=structuredClone(o);return e.isLazy?{...t,section:a}:a}function cs(t,e){return e.isMultivariate?e.isLazy?t.section??null:t:null}function D4(t,e){return Array.isArray(t.variants)?t.variants.map((n,s)=>({label:e(n.rule)||`Variant ${s+1}`,value:n.value??{},rule:n.rule})):[]}function $4(t,e){const n=t.__resolveType??"";if(!n)return null;if(j9(n)){const s=t.section??t,i=s.__resolveType??n;if(!i.includes("/")&&i in e){const o=e[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...s},resolveType:i}}if(!n.includes("/")&&n in e){const s=e[n]??{};return{data:{...s},resolveType:s.__resolveType??n}}return{data:{...t},resolveType:n}}function j1(t,e){const n=t.__resolveType??"";return j9(n)?{...t,section:e}:e}function S1(t,e,n){return e.isLazy?{...t,section:n}:n}function z4(t,e,n){const s=[...t.variants??[]],i=s[e];if(!i)return t;const o=i.value??{};return s[e]={...i,value:j1(o,n)},{...t,variants:s}}function B4(t,e,n){const s=[...t.variants??[]];return s[e]?(s[e]={...s[e],rule:n},{...t,variants:s}):t}function V4(t,e){const n=[...t.variants??[]],s=n[e];return s?(n.splice(e+1,0,structuredClone(s)),{...t,variants:n}):t}function U4(t,e,n){const s=[...t.variants??[]];if(e===n||e<0||n<0||e>=s.length||n>=s.length)return t;const[i]=s.splice(e,1);return i?(s.splice(n,0,i),{...t,variants:s}):t}function K4(t,e){const n=[...t.variants??[]];return n.length<=1?null:(n.splice(e,1),{...t,variants:n})}function De(t){return{rule:u0(),value:structuredClone(t)}}function Ls(t,e){return{...e,__resolveType:e0,variants:t}}function G4(t){return t.isHidden!==!0&&t.isSavedBlock!==!0}function k1(t,e){if(e.isHidden)return null;if(e.isMultivariate){const s=cs(t,e)?.variants??[],i=s[s.length-1]?.value;return i?structuredClone(i):null}if(e.isLazy){const n=t.section;return n?structuredClone(n):null}return structuredClone(t)}function N1(t,e,n){if(e.isMultivariate||e.isHidden)return null;const s=k1(t,e);if(!s)return null;const i=Ls([De(s),De(s)]);return e.isLazy?{...t,section:i}:i}function H4(t,e,n){if(e.isHidden||e.isSavedBlock)return null;if(e.isMultivariate){const i=cs(t,e);if(!i)return null;const o=i.variants??[],a=o[o.length-1]?.value;if(!a)return null;const l=Ls([...o,De(a)],i);return{section:S1(t,e,l),newVariantIndex:o.length}}const s=N1(t,e);return s?{section:s,newVariantIndex:1}:null}function be(t){return t.anyOfRefs?.some(e=>e.resolveType!==X9?!1:e.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function T1(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t;return e.__resolveType===e0&&Array.isArray(e.variants)}function te(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.__resolveType===X9}function _1(t){if(!te(t))return null;const e=t.variants;if(!Array.isArray(e))return null;const n=e[0]?.value;return Array.isArray(n)?n:null}function C1(t,e){if(!te(t))return e;const n=structuredClone(t),s=[...n.variants??[]];return s.length===0?s.push({rule:u0(),value:e}):s[0]={...s[0],value:e},{...n,variants:s}}function q4(t,e){const s=t[e]?.sections;if(!s||Array.isArray(s))return 1;const i=s;return Array.isArray(i.variants)?i.variants.length:1}function Y4(t,e,n){const i=t[e]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const a=o[n];return Array.isArray(a?.value)?a.value:[]}}return[]}function E1(t,e,n){if(Array.isArray(t))return[{label:"Default",sections:t}];if(t&&typeof t=="object"){const s=t;if(Array.isArray(s.variants)){const i=s.variants,o=i.map(c=>T0(c.rule,e,n)),a=o.reduce((c,L)=>(c[L]=(c[L]??0)+1,c),{}),l={};return i.map((c,L)=>{const d=o[L]??`Variant ${L+1}`,u=a[d]??1;let f=d;return u>1&&(l[d]=(l[d]??0)+1,f=`${d} ${l[d]}`),{label:f||`Variant ${L+1}`,sections:Array.isArray(c.value)?c.value:[],rule:c.rule}})}}return[]}function k0(t){return{rule:u0(),value:t}}function L0(t,e){return{...e,__resolveType:X9,variants:t}}function W4(t,e){const n=structuredClone(e);if(Array.isArray(t))return L0([k0(t),k0(n)]);if(t&&typeof t=="object"){const s=t;return Array.isArray(s.variants)?L0([...s.variants,k0(n)],s):null}return L0([k0([]),k0(n)])}function J4(t){const e=t.variants;return Array.isArray(e)?e.length-1:1}function Z4(t,e){const n=t[e];if(!n)return null;const s=[...t];return s.splice(e+1,0,structuredClone(n)),s}function Q4(t,e){if(e.length===0)return L0([],t);if(e.length===1){const n=e[0],s=n?.rule;if(!gt(s))return L0(e,t);if(Array.isArray(n?.value))return n.value}return L0(e,t)}function w1(t,e,n){const s=[];for(const[o,a]of Object.entries(t))o!==e&&s.push(a);const i=new Set;for(;s.length>0;){const o=s.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const a of o)s.push(a);continue}n(o);for(const a of Object.values(o))s.push(a)}}}function X4(t,e,n){if(!e)return 0;let s=0;return w1(t,e,i=>{i.__resolveType===e&&v0(i,t,n)&&s++}),s}const A1={provision:0,cloning:1,install:2,dev:3};function R1(t){return A1[t.step]}const Bt=48,ds=28,us=3,M1=(()=>{const t=[];let e=0;for(let n=0;n<Bt;n++)n===ds?t.push(null):(t.push(e/(Bt-1)*us),e++);return t})();function P1(t){return{provision:t("sandbox.bootingVisual.phaseProvision"),cloning:t("sandbox.bootingVisual.phaseCloning"),install:t("sandbox.bootingVisual.phaseInstall"),dev:t("sandbox.bootingVisual.phaseDev")}}function I1(t,e,n){return t.step==="provision"&&e!=null&&e.kind!=="ready"&&e.kind!=="failed"?Er[e.kind].long:n[t.step]}const O9="bg-foreground/[0.05]",P9="bg-foreground/[0.09]",F1=Array.from({length:35},()=>Math.random()*1.8),O1=Array.from({length:35},()=>Math.random()<.4);function D1(t){const e=B.c(31),{progress:n,claimPhase:s}=t,i=f9();let o;e[0]!==n?(o=R1(n),e[0]=n,e[1]=o):o=e[1];const a=o;let l;e[2]!==s||e[3]!==n||e[4]!==i?(l=I1(n,s,P1(i)),e[2]=s,e[3]=n,e[4]=i,e[5]=l):l=e[5];const c=l;let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=r.jsx(ni,{}),e[6]=L):L=e[6];const d=`${n.step}-${c}`;let u;e[7]!==c||e[8]!==d?(u=r.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-foreground/10 bg-background px-3.5 py-1.5 shadow-[0_4px_20px_-4px_rgb(0_0_0_/_0.12)]",children:[L,r.jsxs("span",{className:"animate-in fade-in text-[13px] font-medium text-foreground/85 duration-500",children:[c,"…"]},d)]}),e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx($1,{}),e[10]=f):f=e[10];let y;e[11]!==a?(y=r.jsx(H0,{phase:0,current:a,children:f}),e[11]=a,e[12]=y):y=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(B1,{}),e[13]=m):m=e[13];let p;e[14]!==a?(p=r.jsx(H0,{phase:1,current:a,children:m}),e[14]=a,e[15]=p):p=e[15];let g;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(V1,{}),e[16]=g):g=e[16];let h;e[17]!==a?(h=r.jsx(H0,{phase:2,current:a,children:g}),e[17]=a,e[18]=h):h=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx(K1,{}),e[19]=v):v=e[19];let j;e[20]!==a?(j=r.jsx(H0,{phase:3,current:a,children:v}),e[20]=a,e[21]=j):j=e[21];let S;e[22]!==h||e[23]!==j||e[24]!==y||e[25]!==p?(S=r.jsxs("div",{className:"relative aspect-[4/3] w-[min(78%,560px)]",children:[y,p,h,j]}),e[22]=h,e[23]=j,e[24]=y,e[25]=p,e[26]=S):S=e[26];let x;e[27]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx("style",{children:`
1
+ import{aN as vr,c as B,o as Cn,m as Q0,K as Q9,b as f9,j as r,l as H,B as h9,T as En,aG as br,e as wn,r as F,t as A9,aO as jr,aP as J9,n as Sr,Z as T9,aM as An,F as ce,am as Le,G as N9,H as G9,I as H9,aQ as de,aL as Fe,aK as kr,h as x0,aR as Nr,E as Tr,aS as _r}from"./index-CIpplZnk.js";import{u as Ke}from"./use-session-runtime-Dr7e2ZQv.js";import{u as Ge,g as Rn,A as D9,B as Mn,r as F9,D as Cr,b as j9,P as X9,E as e0,N as I0,F as k9,L as Pt,H as u0,C as Er,I as Pn,l as In,J as It,K as wr,M as Ar,O as Fn,Q as _0,k as Rr,T as Mr,v as Pr,U as Ir,V as Fr,W as Or}from"./claim-phase-copy-COCflyZr.js";import{e as On}from"./backoff-8mStPHYB.js";import{a1 as Dr,a2 as $r,a3 as zr,a4 as Br,a5 as Vr,a6 as Ur,a7 as Kr,a8 as Gr,T as Hr,a9 as Dn,aa as ue,p as qr,_ as R0,R as Yr,o as Wr,ab as Jr,B as $n,ac as Ft,ad as Zr,a0 as Qr,y as Xr,ae as ei,af as ti}from"./agent-icon-Dz2LbXuC.js";import{i as zn}from"./Sun-9j0Po2AP.js";import{S as Ot}from"./sandbox-start-errors-BK_aDCyt.js";import{G as ni}from"./pair-QAcIbRc1.js";import{i as q9}from"./Check-BzQDWJjM.js";import{i as He,c as si,d as ri,e as ii,b as oi}from"./Tool01-DzYcs8vG.js";import{e as fe,C as me,b as K9,a as f0,c as pe,d as qe,f as ai}from"./command-B8kD2k68.js";import{a as F0,b as O0,P as D0}from"./popover-fTX4Xa7z.js";import{s as li,a as ci,b as Li}from"./utils-CwK0CgrK.js";import{u as Bn}from"./chat-context-Dx19VUrB.js";import{n as Vn}from"./LinkExternal01-DCf_4tEb.js";import{i as Un}from"./X-O0g-zSXl.js";import{S as Kn}from"./scroll-area-BmpdCi7H.js";import{T as _9,a as C9,c as E9}from"./tooltip-CXi7o6QP.js";import{a as Gn,d as di}from"./use-virtual-mcp-BFBtWaJR.js";import{M as Hn}from"./monaco-editor-Bn7ZAIFi.js";import{C as ui}from"./calendar-CeXsatfK.js";import{I as R9}from"./input-BPtPkDjr.js";import{T as fi}from"./textarea-AoHG-xc8.js";import{L as $9}from"./label-tAOICfGy.js";import{i as mi}from"./XClose-BVb5UCwC.js";import{s as y0}from"./Plus-B8Z2drir.js";import{E as s0,M as pi,m as hi,g as $0,u as gi,s as xi,a as yi,b as vi}from"./index-4Z84UU8G.js";import{S as he,b as ge,a as xe,d as ye,c as m0}from"./select-Bo6x_o6t.js";import{a as bi}from"./Palette-DtA5rf3b.js";import{T as M9,R as ji,u as Ye,C as We,a as Je,b as p0,s as Ze,K as Qe,P as Xe,D as et,c as tt,S as nt,v as st,d as rt,e as X0}from"./rich-text-link-control-BAlsv86z.js";import{S as it}from"./switch-Cfah00lh.js";import{a as ve}from"./Copy01-CODH5Oqa.js";import{s as Si}from"./Eye-DLCz-6qH.js";import{s as r0}from"./Trash01-Lp4e1hVO.js";import{t as z0}from"./ChevronUp-zrMm2jhU.js";import{c as N0}from"./UserSquare-CmhJWMRI.js";import{i as l0}from"./Share07-DtOs_WWI.js";import{C as ki}from"./combobox-BFwJe_OK.js";import{s as qn}from"./XCircle-D5gCbNRx.js";import{A as Ni,a as Ti,b as _i,c as Ci,g as Ei,d as wi,e as Ai,f as Ri}from"./alert-dialog-C3LshfDK.js";import{d as ot,h as at,c as lt,e as Yn,b as ct,D as Lt}from"./dialog-jP8njNI6.js";import{b as dt}from"./sandbox-url-D3mC8qhT.js";import{i as Oe}from"./ZoomOut-BpJbUkSE.js";import{i as B0}from"./Upload01-D1rXIspQ.js";import{i as Wn}from"./AlertCircle-98wzPKVW.js";import{i as Jn}from"./DotsVertical-kHMk4ug_.js";import{a as h0}from"./Image01-BpDKkqa8.js";import{S as Mi}from"./search-input-D64mWW5B.js";import{T as Pi,a as Ii,c as Fi,b as Oi}from"./tabs-v7aq9W_R.js";import{u as Di}from"./use-debounced-value-B4B0DOlQ.js";import{u as $i,a as Zn}from"./use-file-configs-DDF4ME58.js";import{u as zi,a as ut,i as Qn,e as Bi,b as Dt,f as Vi}from"./asset-utils-iBbDDnCM.js";import{m as Xn}from"./match-site-slug-config-D3fUJ6vX.js";import{a as Ui,T as Ki}from"./toggle-group-DOgcFL4v.js";import{f as Gi,p as Hi,s as qi,t as Yi,b as Wi,a as Ji}from"./decofile-api-B_E7EbfM.js";import{o as Zi}from"./sandbox-git-api-B1R0585s.js";const ft=vr("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);function mt(t,e){const n=(t??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${e}`:e}function $t(t){let e;try{e=JSON.parse(t)}catch{return null}return typeof e!="object"||e===null||Array.isArray(e)?null:e}function es(t,e){return dt(t,e)}function Qi(t,e){return dt(t,"preview-fetch",{path:e})}function Xi(t){return es(t,"preview-invoke")}function E4(t){return es(t,"catalog-invoke")}function ts(t){try{const{hostname:e}=new URL(t);return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}function e1(){if(typeof document>"u")return null;const t=Array.from(document.querySelectorAll("iframe"));for(const e of t){const n=e.getAttribute("src");if(n&&ts(n))return n}return null}function ns(t,e){const n=t.previewUrl??t.getFallbackPreviewUrl?.()??e1();return n&&ts(n)?new URL(e,n).toString():Qi(t,e)}function t1(t){return ns(t,"/.decofile")}function n1(t){return t===400?"absent":t===404?"unavailable":t>=200&&t<300?"ok":"error"}function zt(t){return t.liveOk||t.committedAbsent?404:t.liveStatus??502}async function ss(t,e){const n=dt(t,"read"),s=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,full:!0})}),i=n1(s.status);if(i==="absent")return{kind:"absent"};if(i==="unavailable")return{kind:"unavailable"};if(i==="error"){const a=new Error(`Failed to read ${e}: ${s.status}`);throw a.status=s.status,a}const o=await s.json();if(typeof o.content!="string")return{kind:"unavailable"};try{return{kind:"data",data:JSON.parse(li(o.content))}}catch{return{kind:"unavailable"}}}async function s1(t){const e=`/api/${t.orgSlug}/decofile/${encodeURIComponent(t.virtualMcpId)}/${encodeURIComponent(t.branch)}/meta`,n=await fetch(e,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok){const s=new Error(`Failed to read committed meta: ${n.status}`);throw s.status=n.status,s}try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function pt(t){return Gn(t)?.metadata?.runtime?.path??null}function rs(t){const e=`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`;return t.localPreviewUrl?`${e}:local:${t.localPreviewUrl}`:e}function w4(t,e){const n=B.c(16),{url:s}=Ge(t?.virtualMcpId),i=!!s,o=t?rs({...t,localPreviewUrl:s}):"",a=e?.fetchEnabled??!0,l=pt(t?.virtualMcpId),c=Ke(t?.virtualMcpId).runtime==="cms",L=Cn(),d=Q9.decofile(o);let u;n[0]!==c||n[1]!==a||n[2]!==i||n[3]!==s||n[4]!==l||n[5]!==t||n[6]!==L?(u=async()=>{if(i){const v=await fetch(new URL("/.decofile",s).toString(),{cache:"no-store"}).catch(o1),j=v?.ok?$t(await v.text()):null;if(j)return j;const S=new Error("decofile unavailable (local tunnel unreachable)");throw S.status=502,S}if(c)return Gi(L,t);const p=()=>ss(t,mt(l,".deco/blocks.gen.json"));if(a){const v=await fetch(t1(t),{cache:"no-store"}).catch(i1);if(v?.ok){const x=$t(await v.text());if(x)return x}const j=await p();if(j.kind==="data")return j.data;const S=new Error(`Failed to fetch decofile: ${v?.status??"network error"}`);throw S.status=zt({liveOk:!!v?.ok,liveStatus:v?.status,committedAbsent:j.kind==="absent"}),S}const g=await p();if(g.kind==="data")return g.data;const h=new Error("decofile unavailable (preview down, no committed snapshot)");throw h.status=zt({liveOk:!1,committedAbsent:g.kind==="absent"}),h},n[0]=c,n[1]=a,n[2]=i,n[3]=s,n[4]=l,n[5]=t,n[6]=L,n[7]=u):u=n[7];const f=!!t;let y;n[8]!==c||n[9]!==i?(y=(p,g)=>{if(c||i)return p<3;const h=g.status;return h!==502&&h!==404&&p<2},n[8]=c,n[9]=i,n[10]=y):y=n[10];let m;return n[11]!==d||n[12]!==u||n[13]!==f||n[14]!==y?(m={queryKey:d,queryFn:u,enabled:f,staleTime:3e4,retry:y,retryDelay:r1},n[11]=d,n[12]=u,n[13]=f,n[14]=y,n[15]=m):m=n[15],Q0(m)}function r1(t){return On(5e3,1e3,t,2,0)}function i1(){return null}function o1(){return null}const a1=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function l1(t){return t.includes("matchers")||t.includes("Match")}function is(t,e){const n=t.__resolveType;return typeof n!="string"||!n||a1.has(n)?!1:e?Cr(e,n):l1(n)}function c1(t,e){const n=[];for(const[s,i]of Object.entries(e)){if(s.includes("/")||!D9(s)||Mn(s)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;is(o,t)&&n.push({blockKey:s,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((s,i)=>(s.name??s.blockKey).localeCompare(i.name??i.blockKey))}function v0(t,e,n){if(!t)return!1;const s=t.__resolveType;if(typeof s!="string"||!D9(s)||!Object.hasOwn(e,s))return!1;const i=e[s];return!i||typeof i!="object"||Array.isArray(i)?!1:is(i,n)}function L1(t,e,n){return v0(t,e,n)?t?.__resolveType??null:null}function os(t,e,n){if(!t)return null;const s=t.__resolveType??"";if(!s)return null;if(v0(t,e,n)){const a=e[s]??{},l=a.__resolveType??s,{__resolveType:c,name:L,...d}=a;return{resolveType:l,data:d,blockKey:s}}const{__resolveType:i,...o}=t;return{resolveType:s,data:o}}function as(t,e,n){const s=os(t,e,n);return s?{__resolveType:s.resolveType,...s.data}:{__resolveType:""}}function ht(t,e,n){if(t)return v0(t,e,n)?as(t,e,n):t}function T0(t,e,n,s){if(!t)return"Default";if(v0(t,e,s)){const i=t.__resolveType??"",o=e[i];return Rn(i,o)}return n(t)}function d1(t,e,n){return{__resolveType:t,...e,name:n}}function u1(t){return{__resolveType:t}}function f1(t,e,n){const s=os(t,e,n);return s?{resolveType:s.resolveType,formValue:s.data}:{resolveType:"",formValue:{}}}function m1(t,e){const n={__resolveType:t};if(!t||!e)return n;const s=F9(t,e),i=s?.type==="inline-union"?s.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function p1(t){const e=[];return t.fastPreviewActive?e.push({kind:"committed"}):(t.fetchEnabled&&t.previewUrl&&e.push({kind:"live",baseUrl:t.previewUrl}),e.push({kind:"committed"})),t.productionUrl&&e.push({kind:"production",baseUrl:t.productionUrl}),e}function h1(t){return Q9.liveMeta(t.orgSlug,t.virtualMcpId,t.branch,t.previewUrl??"",t.productionUrl??"")}function A4(t,e){const n=B.c(21),{url:s}=Ge(t?.virtualMcpId),i=!!s,o=i||(e?.fetchEnabled??!0),a=s??t?.previewUrl,l=pt(t?.virtualMcpId),{previewServerUrl:c,runtime:L}=Ke(t?.virtualMcpId),d=!i&&L==="cms";let u;n[0]!==t||n[1]!==a||n[2]!==c?(u=t?h1({...t,previewUrl:a,productionUrl:c}):Q9.liveMeta(""),n[0]=t,n[1]=a,n[2]=c,n[3]=u):u=n[3];let f;n[4]!==d||n[5]!==o||n[6]!==i||n[7]!==l||n[8]!==t||n[9]!==a||n[10]!==c?(f=async()=>{const h=x1,v=()=>d?s1(t):ss(t,mt(l,".deco/meta.gen.json")),j=i&&a?[{kind:"live",baseUrl:a}]:p1({fetchEnabled:o,previewUrl:a,productionUrl:c,fastPreviewActive:d});for(const x of j){if(x.kind==="committed"){const k=await v();if(k.kind==="data")return k.data;continue}const b=await h(x.baseUrl);if(b)return b}const S=new Error("live meta unavailable (dev server down, no committed snapshot, no production fallback)");throw S.status=502,S},n[4]=d,n[5]=o,n[6]=i,n[7]=l,n[8]=t,n[9]=a,n[10]=c,n[11]=f):f=n[11];const y=!!t,m=e?.refetchInterval;let p;n[12]!==d||n[13]!==i?(p=(h,v)=>(d||i||v.status!==502)&&h<3,n[12]=d,n[13]=i,n[14]=p):p=n[14];let g;return n[15]!==u||n[16]!==f||n[17]!==y||n[18]!==m||n[19]!==p?(g={queryKey:u,queryFn:f,enabled:y,refetchInterval:m,refetchIntervalInBackground:!1,staleTime:3e5,retry:p,retryDelay:g1},n[15]=u,n[16]=f,n[17]=y,n[18]=m,n[19]=p,n[20]=g):g=n[20],Q0(g)}function g1(t){return On(5e3,1e3,t,2,0)}async function x1(t){const e=new URL("/live/_meta",t).href,n=await fetch(e,{cache:"no-store"}).catch(y1);if(!n?.ok)return null;try{return await n.json()}catch{return null}}function y1(){return null}function Ee(t,e,n){const s=n[t];return typeof s?.name=="string"&&s.name||t.replace(/[-_]/g," ").replace(/\b\w/g,i=>i.toUpperCase())||`Section ${e+1}`}function R4(t,e){return t.map((n,s)=>{const i=n.__resolveType??"",o=j9(i);if(!o&&i!==""&&D9(i)&&i in e)return{index:s,resolveType:i,label:Ee(i,s,e),isLazy:!1,isSavedBlock:!0};const a=o?n.section:void 0,l=o?a?.__resolveType??"":i;if(l===X9||l===e0){const L=o?a:n,d=Array.isArray(L?.variants)?L.variants:[];if(d.length===1&&(d[0]?.rule?.__resolveType??"")===I0){const y=d[0]?.value??{};let m=y.__resolveType??"";const p=j9(m);let g=y;if(p){const h=y.section;m=h?.__resolveType??m,h&&(g=h)}if(m===X9||m===e0){const v=(Array.isArray(g.variants)?g.variants:[])[0]?.value?.__resolveType,j=v?k9(v):"Section";return{index:s,resolveType:i,label:`Variants of ${j}`,variantOf:j,isHidden:!0,isLazy:p}}return m!==""&&D9(m)&&m in e?{index:s,resolveType:i,label:Ee(m,s,e),isHidden:!0,isLazy:p,isSavedBlock:!0}:{index:s,resolveType:i,label:k9(m)||`Section ${s+1}`,isHidden:!0,isLazy:p}}const u=d[0]?.value?.__resolveType,f=u?k9(u):"Section";return{index:s,resolveType:i,label:`Variants of ${f}`,variantOf:f,isMultivariate:!0,isLazy:o}}const c=o?n.section?.__resolveType??i:i;return o&&c!==""&&D9(c)&&c in e?{index:s,resolveType:i,label:Ee(c,s,e),isLazy:!0,isSavedBlock:!0}:{index:s,resolveType:i,label:k9(c)||`Section ${s+1}`,isLazy:o}})}function ls(t){const e=t.__resolveType??"";return j9(e)?t.section??t:t}function ee(t){const i=(j9(t.__resolveType??"")?t.section:t)?.variants?.[0];return i?.rule?.__resolveType!==I0?null:i?.value??null}function M4(t){const e=ls(t);return{__resolveType:e0,variants:[{value:e,rule:{__resolveType:I0}}]}}function P4(t){const e=t.__resolveType??"";if(!e)return null;if(j9(e))return t.section??null;const n=ee(t);return n?j9(n.__resolveType??"")?n:{__resolveType:Pt,section:ls(n)}:{__resolveType:Pt,section:t}}function G0(t){const e=t.__resolveType??"";if(!e)return null;if(j9(e)){const n=t.section,s=n?.__resolveType??"";return!s||!n?null:{resolveType:s,data:n}}return{resolveType:e,data:t}}function I4(t){const e=ee(t);if(e)return G0(e);if(j9(t.__resolveType??"")){const s=t.section;if(!s)return null;const i=ee(s);return G0(i||s)}return G0(t)}function F4(t){return ee(t)}const v1=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function gt(t){if(!t)return!1;const e=t.__resolveType??"";return e===""?Object.keys(t).length===0:v1.includes(e)||e.includes("always")}function b1(t){const e=t.variants??[];if(e.length===0)return-1;const n=e.findIndex(s=>gt(s.rule));return n!==-1?n:e.length-1}function O4(t,e,n){const s=n.variants??[];if(s.length===0)return null;const i=b1(n),o=s[i]?.value;if(!o)return null;const a=structuredClone(o);return e.isLazy?{...t,section:a}:a}function cs(t,e){return e.isMultivariate?e.isLazy?t.section??null:t:null}function D4(t,e){return Array.isArray(t.variants)?t.variants.map((n,s)=>({label:e(n.rule)||`Variant ${s+1}`,value:n.value??{},rule:n.rule})):[]}function $4(t,e){const n=t.__resolveType??"";if(!n)return null;if(j9(n)){const s=t.section??t,i=s.__resolveType??n;if(!i.includes("/")&&i in e){const o=e[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...s},resolveType:i}}if(!n.includes("/")&&n in e){const s=e[n]??{};return{data:{...s},resolveType:s.__resolveType??n}}return{data:{...t},resolveType:n}}function j1(t,e){const n=t.__resolveType??"";return j9(n)?{...t,section:e}:e}function S1(t,e,n){return e.isLazy?{...t,section:n}:n}function z4(t,e,n){const s=[...t.variants??[]],i=s[e];if(!i)return t;const o=i.value??{};return s[e]={...i,value:j1(o,n)},{...t,variants:s}}function B4(t,e,n){const s=[...t.variants??[]];return s[e]?(s[e]={...s[e],rule:n},{...t,variants:s}):t}function V4(t,e){const n=[...t.variants??[]],s=n[e];return s?(n.splice(e+1,0,structuredClone(s)),{...t,variants:n}):t}function U4(t,e,n){const s=[...t.variants??[]];if(e===n||e<0||n<0||e>=s.length||n>=s.length)return t;const[i]=s.splice(e,1);return i?(s.splice(n,0,i),{...t,variants:s}):t}function K4(t,e){const n=[...t.variants??[]];return n.length<=1?null:(n.splice(e,1),{...t,variants:n})}function De(t){return{rule:u0(),value:structuredClone(t)}}function Ls(t,e){return{...e,__resolveType:e0,variants:t}}function G4(t){return t.isHidden!==!0&&t.isSavedBlock!==!0}function k1(t,e){if(e.isHidden)return null;if(e.isMultivariate){const s=cs(t,e)?.variants??[],i=s[s.length-1]?.value;return i?structuredClone(i):null}if(e.isLazy){const n=t.section;return n?structuredClone(n):null}return structuredClone(t)}function N1(t,e,n){if(e.isMultivariate||e.isHidden)return null;const s=k1(t,e);if(!s)return null;const i=Ls([De(s),De(s)]);return e.isLazy?{...t,section:i}:i}function H4(t,e,n){if(e.isHidden||e.isSavedBlock)return null;if(e.isMultivariate){const i=cs(t,e);if(!i)return null;const o=i.variants??[],a=o[o.length-1]?.value;if(!a)return null;const l=Ls([...o,De(a)],i);return{section:S1(t,e,l),newVariantIndex:o.length}}const s=N1(t,e);return s?{section:s,newVariantIndex:1}:null}function be(t){return t.anyOfRefs?.some(e=>e.resolveType!==X9?!1:e.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function T1(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t;return e.__resolveType===e0&&Array.isArray(e.variants)}function te(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.__resolveType===X9}function _1(t){if(!te(t))return null;const e=t.variants;if(!Array.isArray(e))return null;const n=e[0]?.value;return Array.isArray(n)?n:null}function C1(t,e){if(!te(t))return e;const n=structuredClone(t),s=[...n.variants??[]];return s.length===0?s.push({rule:u0(),value:e}):s[0]={...s[0],value:e},{...n,variants:s}}function q4(t,e){const s=t[e]?.sections;if(!s||Array.isArray(s))return 1;const i=s;return Array.isArray(i.variants)?i.variants.length:1}function Y4(t,e,n){const i=t[e]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const a=o[n];return Array.isArray(a?.value)?a.value:[]}}return[]}function E1(t,e,n){if(Array.isArray(t))return[{label:"Default",sections:t}];if(t&&typeof t=="object"){const s=t;if(Array.isArray(s.variants)){const i=s.variants,o=i.map(c=>T0(c.rule,e,n)),a=o.reduce((c,L)=>(c[L]=(c[L]??0)+1,c),{}),l={};return i.map((c,L)=>{const d=o[L]??`Variant ${L+1}`,u=a[d]??1;let f=d;return u>1&&(l[d]=(l[d]??0)+1,f=`${d} ${l[d]}`),{label:f||`Variant ${L+1}`,sections:Array.isArray(c.value)?c.value:[],rule:c.rule}})}}return[]}function k0(t){return{rule:u0(),value:t}}function L0(t,e){return{...e,__resolveType:X9,variants:t}}function W4(t,e){const n=structuredClone(e);if(Array.isArray(t))return L0([k0(t),k0(n)]);if(t&&typeof t=="object"){const s=t;return Array.isArray(s.variants)?L0([...s.variants,k0(n)],s):null}return L0([k0([]),k0(n)])}function J4(t){const e=t.variants;return Array.isArray(e)?e.length-1:1}function Z4(t,e){const n=t[e];if(!n)return null;const s=[...t];return s.splice(e+1,0,structuredClone(n)),s}function Q4(t,e){if(e.length===0)return L0([],t);if(e.length===1){const n=e[0],s=n?.rule;if(!gt(s))return L0(e,t);if(Array.isArray(n?.value))return n.value}return L0(e,t)}function w1(t,e,n){const s=[];for(const[o,a]of Object.entries(t))o!==e&&s.push(a);const i=new Set;for(;s.length>0;){const o=s.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const a of o)s.push(a);continue}n(o);for(const a of Object.values(o))s.push(a)}}}function X4(t,e,n){if(!e)return 0;let s=0;return w1(t,e,i=>{i.__resolveType===e&&v0(i,t,n)&&s++}),s}const A1={provision:0,cloning:1,install:2,dev:3};function R1(t){return A1[t.step]}const Bt=48,ds=28,us=3,M1=(()=>{const t=[];let e=0;for(let n=0;n<Bt;n++)n===ds?t.push(null):(t.push(e/(Bt-1)*us),e++);return t})();function P1(t){return{provision:t("sandbox.bootingVisual.phaseProvision"),cloning:t("sandbox.bootingVisual.phaseCloning"),install:t("sandbox.bootingVisual.phaseInstall"),dev:t("sandbox.bootingVisual.phaseDev")}}function I1(t,e,n){return t.step==="provision"&&e!=null&&e.kind!=="ready"&&e.kind!=="failed"?Er[e.kind].long:n[t.step]}const O9="bg-foreground/[0.05]",P9="bg-foreground/[0.09]",F1=Array.from({length:35},()=>Math.random()*1.8),O1=Array.from({length:35},()=>Math.random()<.4);function D1(t){const e=B.c(31),{progress:n,claimPhase:s}=t,i=f9();let o;e[0]!==n?(o=R1(n),e[0]=n,e[1]=o):o=e[1];const a=o;let l;e[2]!==s||e[3]!==n||e[4]!==i?(l=I1(n,s,P1(i)),e[2]=s,e[3]=n,e[4]=i,e[5]=l):l=e[5];const c=l;let L;e[6]===Symbol.for("react.memo_cache_sentinel")?(L=r.jsx(ni,{}),e[6]=L):L=e[6];const d=`${n.step}-${c}`;let u;e[7]!==c||e[8]!==d?(u=r.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-foreground/10 bg-background px-3.5 py-1.5 shadow-[0_4px_20px_-4px_rgb(0_0_0_/_0.12)]",children:[L,r.jsxs("span",{className:"animate-in fade-in text-[13px] font-medium text-foreground/85 duration-500",children:[c,"…"]},d)]}),e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=r.jsx($1,{}),e[10]=f):f=e[10];let y;e[11]!==a?(y=r.jsx(H0,{phase:0,current:a,children:f}),e[11]=a,e[12]=y):y=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(B1,{}),e[13]=m):m=e[13];let p;e[14]!==a?(p=r.jsx(H0,{phase:1,current:a,children:m}),e[14]=a,e[15]=p):p=e[15];let g;e[16]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(V1,{}),e[16]=g):g=e[16];let h;e[17]!==a?(h=r.jsx(H0,{phase:2,current:a,children:g}),e[17]=a,e[18]=h):h=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx(K1,{}),e[19]=v):v=e[19];let j;e[20]!==a?(j=r.jsx(H0,{phase:3,current:a,children:v}),e[20]=a,e[21]=j):j=e[21];let S;e[22]!==h||e[23]!==j||e[24]!==y||e[25]!==p?(S=r.jsxs("div",{className:"relative aspect-[4/3] w-[min(78%,560px)]",children:[y,p,h,j]}),e[22]=h,e[23]=j,e[24]=y,e[25]=p,e[26]=S):S=e[26];let x;e[27]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx("style",{children:`
2
2
  @keyframes vm-pulse-soft {
3
3
  0%, 100% { opacity: 0.25; }
4
4
  50% { opacity: 1; }
@@ -1,2 +1,2 @@
1
- import{o as G,r as o,dr as Ce,dp as De,c as Pe,e as Ae,dl as ee,a0 as Ee,j as ye,K as M,z as _e}from"./index-CFZrnnmD.js";import{u as Le}from"./use-mcp-client-4SfStdvU.js";import{u as Ue}from"./use-session-runtime-BVLmSBh6.js";import{u as Re,b as Oe}from"./chat-context-mOTo9_NI.js";import{u as Be}from"./hooks-V57yclqv.js";import{e as ge}from"./backoff-8mStPHYB.js";import{b as Ne}from"./sandbox-url-D3mC8qhT.js";import{a as Fe}from"./use-virtual-mcp-B1-yfeBH.js";import{d as $e}from"./sandbox-start-errors-BK_aDCyt.js";function Ke(e,t){const n=G(t);return Ve({filters:{...e,status:"pending"}},n).length}function fe(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Ve(e={},t){const n=G(t).getMutationCache(),s=o.useRef(e),u=o.useRef(null);return u.current===null&&(u.current=fe(n,e)),o.useEffect(()=>{s.current=e}),o.useSyncExternalStore(o.useCallback(c=>n.subscribe(()=>{const a=Ce(u.current,fe(n,s.current));u.current!==a&&(u.current=a,De.schedule(c))}),[n]),()=>u.current,()=>u.current)}async function qe(e,t,n){const s=await e.callTool({name:t,arguments:n});if(s.isError){const u=s.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(u)}return s}const be=["SANDBOX_START"],W=new Map,He=e=>`${e.virtualMcpId}::${e.branch??""}`,Qe=e=>e.message.includes("retry shortly"),ie=new Set,le={mark:(e,t)=>ie.add(`${e}::${t}`),clear:(e,t)=>ie.delete(`${e}::${t}`),isStopped:(e,t)=>ie.has(`${e}::${t}`)};function Ye(e,t){const n=G();return Ae({mutationKey:be,retry:(s,u)=>Qe(u)&&s<6,retryDelay:s=>ge(5e3,500,s,2,0),mutationFn:async s=>{s.branch&&le.clear(s.virtualMcpId,s.branch);const u=He(s),c=W.get(u);if(c)return c;const a=(async()=>(await qe(e,"SANDBOX_START",s)).structuredContent)();W.set(u,a);try{return await a}finally{W.get(u)===a&&W.delete(u)}},onSuccess:()=>{ee(n),t?.onStarted?.()}})}function Rt(e,t){const n=Pe.c(3);let s;return n[0]!==t||n[1]!==e?(s={mutationKey:be,predicate:c=>{if(!e)return!1;const a=c.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=s):s=n[2],Ke(s)>0}function Se(e){return e==="installing"||e==="install-failed"||e==="starting"||e==="start-failed"||e==="running"||e==="crashed"}const Me={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ve=o.createContext(Me),me=16384;class Ge{data="";append(t){this.data+=t,this.data.length>me&&(this.data=this.data.slice(this.data.length-me))}get(){return this.data}clear(){this.data=""}}const Xe=1e3,je=3e4,Ie=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],pe="log";function Je(e){if(!e)return null;try{return new URL("/_sandbox/events",e).href}catch{return null}}function We(e){return e===404}async function ze(e){try{const t=await fetch(e,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Ie)});return await t.body?.cancel().catch(()=>{}),We(t.status)}catch{return!1}}function gt({virtualMcpId:e,branch:t,previewUrl:n=null,enabled:s=!0,children:u}){const{org:c}=Ee(),a=G(),V=Re()?.taskId??null,[X,E]=o.useState(null),[te,b]=o.useState({phase:"idle"}),[ne,U]=o.useState({state:"running"}),[re,y]=o.useState({kind:"unknown"}),[j,h]=o.useState(!1),[k,q]=o.useState([]),[se,R]=o.useState([]),[,H]=o.useState(0),v=o.useRef(new Map),O=o.useRef(new Set),w=o.useRef(new Set),C=o.useRef(null),p=Je(n),Q=Fe(e)?.metadata?.runtime?.selected==="deno",_=d=>{let S=v.current.get(d);return S||(S=new Ge,v.current.set(d,S)),S};o.useEffect(()=>{if(E(null),b({phase:"idle"}),U({state:"running"}),y({kind:"unknown"}),C.current=null,h(!1),q([]),R([]),v.current.clear(),!e||!t||!s)return;const d=Ne({orgSlug:c.slug,virtualMcpId:e,branch:t,threadId:V??null},"events");let S=!1,D=0,L=null,T=null,P=null,g=null,m=null,A=null;const I=r=>{try{const i=JSON.parse(r.data);E(i),i.kind!=="failed"&&(h(!1),D=0),i.kind==="ready"&&ae()}catch(i){console.warn("[vm-events] bad phase payload",i)}},B=()=>{h(!0),E(null),b({phase:"idle"}),U({state:"running"}),y({kind:"unknown"}),q([]),R([]),v.current.clear()},Y=r=>{try{const i=JSON.parse(r.data);if(typeof i.data!="string")return;D=0;const f=i.data.replace(/\r?\n/g,`\r
1
+ import{o as G,r as o,dr as Ce,dp as De,c as Pe,e as Ae,dl as ee,a0 as Ee,j as ye,K as M,z as _e}from"./index-CIpplZnk.js";import{u as Le}from"./use-mcp-client-Beusq7Tu.js";import{u as Ue}from"./use-session-runtime-Dr7e2ZQv.js";import{u as Re,b as Oe}from"./chat-context-Dx19VUrB.js";import{u as Be}from"./hooks-CXbyAtVG.js";import{e as ge}from"./backoff-8mStPHYB.js";import{b as Ne}from"./sandbox-url-D3mC8qhT.js";import{a as Fe}from"./use-virtual-mcp-BFBtWaJR.js";import{d as $e}from"./sandbox-start-errors-BK_aDCyt.js";function Ke(e,t){const n=G(t);return Ve({filters:{...e,status:"pending"}},n).length}function fe(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function Ve(e={},t){const n=G(t).getMutationCache(),s=o.useRef(e),u=o.useRef(null);return u.current===null&&(u.current=fe(n,e)),o.useEffect(()=>{s.current=e}),o.useSyncExternalStore(o.useCallback(c=>n.subscribe(()=>{const a=Ce(u.current,fe(n,s.current));u.current!==a&&(u.current=a,De.schedule(c))}),[n]),()=>u.current,()=>u.current)}async function qe(e,t,n){const s=await e.callTool({name:t,arguments:n});if(s.isError){const u=s.content?.[0]?.text??`Tool ${t} failed without a message`;throw new Error(u)}return s}const be=["SANDBOX_START"],W=new Map,He=e=>`${e.virtualMcpId}::${e.branch??""}`,Qe=e=>e.message.includes("retry shortly"),ie=new Set,le={mark:(e,t)=>ie.add(`${e}::${t}`),clear:(e,t)=>ie.delete(`${e}::${t}`),isStopped:(e,t)=>ie.has(`${e}::${t}`)};function Ye(e,t){const n=G();return Ae({mutationKey:be,retry:(s,u)=>Qe(u)&&s<6,retryDelay:s=>ge(5e3,500,s,2,0),mutationFn:async s=>{s.branch&&le.clear(s.virtualMcpId,s.branch);const u=He(s),c=W.get(u);if(c)return c;const a=(async()=>(await qe(e,"SANDBOX_START",s)).structuredContent)();W.set(u,a);try{return await a}finally{W.get(u)===a&&W.delete(u)}},onSuccess:()=>{ee(n),t?.onStarted?.()}})}function Rt(e,t){const n=Pe.c(3);let s;return n[0]!==t||n[1]!==e?(s={mutationKey:be,predicate:c=>{if(!e)return!1;const a=c.state.variables;return!a||a.virtualMcpId!==e?!1:(a.branch??"")===(t??"")}},n[0]=t,n[1]=e,n[2]=s):s=n[2],Ke(s)>0}function Se(e){return e==="installing"||e==="install-failed"||e==="starting"||e==="start-failed"||e==="running"||e==="crashed"}const Me={phase:null,lifecycle:{phase:"idle"},status:{state:"running"},branch:{kind:"unknown"},notFound:!1,scripts:[],activeProcesses:[],getBuffer:()=>"",hasData:()=>!1,subscribeChunks:()=>()=>{},subscribeReload:()=>()=>{}},ve=o.createContext(Me),me=16384;class Ge{data="";append(t){this.data+=t,this.data.length>me&&(this.data=this.data.slice(this.data.length-me))}get(){return this.data}clear(){this.data=""}}const Xe=1e3,je=3e4,Ie=3e3,he=["lifecycle","status","tasks","scripts","branch","reload","file-changed"],pe="log";function Je(e){if(!e)return null;try{return new URL("/_sandbox/events",e).href}catch{return null}}function We(e){return e===404}async function ze(e){try{const t=await fetch(e,{headers:{Accept:"text/event-stream"},cache:"no-store",signal:AbortSignal.timeout(Ie)});return await t.body?.cancel().catch(()=>{}),We(t.status)}catch{return!1}}function gt({virtualMcpId:e,branch:t,previewUrl:n=null,enabled:s=!0,children:u}){const{org:c}=Ee(),a=G(),V=Re()?.taskId??null,[X,E]=o.useState(null),[te,b]=o.useState({phase:"idle"}),[ne,U]=o.useState({state:"running"}),[re,y]=o.useState({kind:"unknown"}),[j,h]=o.useState(!1),[k,q]=o.useState([]),[se,R]=o.useState([]),[,H]=o.useState(0),v=o.useRef(new Map),O=o.useRef(new Set),w=o.useRef(new Set),C=o.useRef(null),p=Je(n),Q=Fe(e)?.metadata?.runtime?.selected==="deno",_=d=>{let S=v.current.get(d);return S||(S=new Ge,v.current.set(d,S)),S};o.useEffect(()=>{if(E(null),b({phase:"idle"}),U({state:"running"}),y({kind:"unknown"}),C.current=null,h(!1),q([]),R([]),v.current.clear(),!e||!t||!s)return;const d=Ne({orgSlug:c.slug,virtualMcpId:e,branch:t,threadId:V??null},"events");let S=!1,D=0,L=null,T=null,P=null,g=null,m=null,A=null;const I=r=>{try{const i=JSON.parse(r.data);E(i),i.kind!=="failed"&&(h(!1),D=0),i.kind==="ready"&&ae()}catch(i){console.warn("[vm-events] bad phase payload",i)}},B=()=>{h(!0),E(null),b({phase:"idle"}),U({state:"running"}),y({kind:"unknown"}),q([]),R([]),v.current.clear()},Y=r=>{try{const i=JSON.parse(r.data);if(typeof i.data!="string")return;D=0;const f=i.data.replace(/\r?\n/g,`\r
2
2
  `);_(i.source).append(f);for(const l of O.current)try{l(i.source,f)}catch{}H(l=>l+1)}catch{}},J=r=>{const i=r.type;try{const f=JSON.parse(r.data);switch(D=0,i){case"lifecycle":{const l=f;b(l.state);const F=`${c.slug}/${e}/${t}`;if(Se(l.state.phase)&&!(A&&Se(A))){ee(a,c.id);const K=M.decofile(F);a.getQueryData(K)===void 0&&a.invalidateQueries({queryKey:K})}l.state.phase==="running"&&A!=="running"&&(ee(a,c.id),a.invalidateQueries({queryKey:M.decofile(F)}),a.invalidateQueries({queryKey:M.liveMeta(c.slug,e,t)})),A=l.state.phase;const $=l.state.phase==="running"?l.state.port:null,ce=C.current;if(C.current=$,ce!==null&&$!==null&&ce!==$)for(const K of w.current)try{K()}catch{}return}case"status":U(f);return;case"tasks":{const F=f.active.map($=>$.logName??"").filter(Boolean);R(F);return}case"scripts":q(f.scripts);return;case"branch":{const l=f.meta;y(l);return}case"reload":for(const l of w.current)try{l()}catch{}return;case"file-changed":{const{path:l}=f,F=`${c.slug}/${e}/${t}`;if(l.startsWith(".deco/")||l.includes("/.deco/")){if(!(A==="running"))return;P&&clearTimeout(P),P=setTimeout(()=>{if(P=null,a.invalidateQueries({queryKey:M.decofile(F)}),Q)for(const K of w.current)try{K()}catch{}},500)}else T&&clearTimeout(T),T=setTimeout(()=>{T=null,a.invalidateQueries({queryKey:M.liveMeta(c.slug,e,t)})},1e3);return}}}catch{}};function N(){if(S)return;const r=new EventSource(d);g=r,r.onopen=()=>{},r.onerror=()=>{g===r&&r.readyState===EventSource.CLOSED&&x("studio")},r.addEventListener("phase",I),r.addEventListener("gone",B),r.addEventListener(pe,Y);for(const i of he)r.addEventListener(i,J)}function ae(){if(S||!p||m)return;const r=new EventSource(p);m=r;let i=!1;r.onopen=()=>{if(S||m!==r)return;i=!0,D=0;const f=g;g=null,f?.close()},r.onerror=()=>{m===r&&r.readyState===EventSource.CLOSED&&ue(r,i)},r.addEventListener(pe,Y);for(const f of he)r.addEventListener(f,J)}async function ue(r,i){const f=p?await ze(p):!1;if(!(S||m!==r)){if(r.close(),m=null,f){B(),g||N();return}i&&x("direct")}}function x(r){if(S||L)return;const i=ge(je,Xe,D,2,0);D++,L=setTimeout(()=>{if(L=null,!S){if(r==="direct"){m?.close(),m=null,ae();return}g?.close(),g=null,N()}},i)}return N(),()=>{S=!0,g?.close(),m?.close(),L&&clearTimeout(L),T&&clearTimeout(T),P&&clearTimeout(P)}},[e,t,c.slug,c.id,s,V,p,a,Q]);const oe={phase:X,lifecycle:te,status:ne,branch:re,notFound:j,scripts:k,activeProcesses:se,getBuffer:d=>v.current.get(d)?.get()??"",hasData:d=>(v.current.get(d)?.get().length??0)>0,subscribeChunks:d=>(O.current.add(d),()=>{O.current.delete(d)}),subscribeReload:d=>(w.current.add(d),()=>{w.current.delete(d)})};return ye.jsx(ve,{value:oe,children:u})}function de(){return o.use(ve)}function bt(e){const{subscribeChunks:t}=de(),n=o.useRef(e);n.current=e,o.useEffect(()=>t((c,a)=>{n.current?.(c,a)}),[t])}function vt(e){const{subscribeReload:t}=de(),n=o.useRef(e);n.current=e,o.useEffect(()=>t(()=>{n.current?.()}),[t])}function Ze(e){return e.appPaused||e.userStopped?{kind:"suspended"}:e.startError&&!e.previewUrl?{kind:"errored",error:e.startError}:e.previewUrl?{kind:"iframe",previewUrl:e.previewUrl}:{kind:"starting"}}function et(e){return e.executionEnabled&&e.sessionRuntime==="sandbox"&&e.hasActiveGithubRepo&&!!e.userId&&!!e.branch&&!e.vmEntry&&!e.userStopped&&!e.isPending&&!e.attempted}function wt(e){return e.threadLoaded&&e.isOwner&&e.hasActiveGithubRepo&&!e.branch&&!e.attempted}function tt(e){return e.executionEnabled&&e.notFound&&!!e.deadVmId&&!e.isPending&&!e.userStopped&&e.deadVmId!==e.lastDeadVmId}function Tt(e){const{agentSandboxMap:t,threadSandboxMap:n,userId:s,branch:u}=e,c=e.ownerId??s;if(!s||!c||!u)return t;const a=n?.[c]?.[u];return a?{...t??{},[s]:{...t?.[s]??{},[u]:a}}:t}function z(e,t,n){const s={virtualMcpId:e};return t&&(s.branch=t),n&&(s.threadId=n),s}const we=2,nt=new Set(["scheduling-timeout","reconciler-error","claim-never-created","unknown"]);function Te(e){return nt.has(e)}function rt(e){return e.executionEnabled&&e.failedReason!==null&&Te(e.failedReason)&&e.attempts<we&&!e.isPending&&!e.userStopped&&!e.alreadyHandled}const st={branch:null,count:0,handled:!1};function ot(e,t){return e.branch===t?e:{branch:t,count:0,handled:!1}}function at(e){return e.mutationError?e.mutationError:e.phase?.kind==="failed"&&!e.startPending&&e.claimRetryExhausted?{code:null,message:e.phase.message}:null}function ut(e){switch(e.kind){case"suspended":return"suspended";case"iframe":return"running";case"starting":return"starting";case"errored":return"errored"}}function xe(e,t){return`${e??""}::${t??""}`}function ct(e){const t=e.vmEntry?.previewUrl??null;return t||(e.seeded?.key===e.key?e.seeded.url:null)}function Z(e){const{data:t,virtualMcpId:n,branch:s}=e;t?.branch&&!s&&e.setCurrentTaskBranch(t.branch),t?.previewUrl&&e.setSeededPreviewUrl({key:xe(n,t.branch??s),url:t.previewUrl})}const it={branch:null,previewState:{kind:"starting"},status:"idle",vmEntry:null,previewUrl:null,userStopped:!1,start:()=>{},stop:async()=>{},restart:async()=>{},retry:()=>{},resume:()=>{}},ke=o.createContext(it);function xt(){return o.use(ke)}function kt({executionEnabled:e,virtualMcpId:t,branch:n,userId:s,hasActiveGithubRepo:u,vmEntry:c,threadId:a,children:V}){const{org:X}=Ee(),{setCurrentTaskBranch:E}=Oe(),te=Be(),b=de(),ne=G(),U=Ue(t),re=U.resolved?U.runtime:null,y=Re()?.taskId??null,j=Le({connectionId:_e,orgId:X.id,orgSlug:X.slug}),h=Ye(j,{onStarted:()=>{a&&te?.refreshThreadMetadata(a)}}),{mutate:k,reset:q}=h,[se,R]=o.useState(null),H=o.useRef(new Set),v=o.useRef(null),[O,w]=o.useState(st),C=ot(O,n);C!==O&&w(C);const p=b.phase?.kind==="failed"?b.phase:null,Q=ct({vmEntry:c,seeded:p?null:se,key:xe(t,n)}),_=!!t&&!!n&&le.isStopped(t,n),oe=b.status.state==="paused",d=!p||!Te(p.reason)||C.count>=we,S=at({mutationError:h.isError&&h.error?$e(h.error.message):null,phase:b.phase,startPending:h.isPending,claimRetryExhausted:d}),D=Ze({previewUrl:Q,appPaused:oe,userStopped:_,startError:S}),L=ut(D),T=n??"",P=H.current.has(T),g=et({executionEnabled:e,hasActiveGithubRepo:u,userId:s,branch:n,vmEntry:c,userStopped:_,isPending:h.isPending,attempted:P,sessionRuntime:re});o.useEffect(()=>{if(!g||!t)return;H.current.add(T);const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] auto-start failed:",r)}})},[g,T,n,t,y,k,E,R]);const m=b.notFound?c?.sandboxHandle??null:null,A=tt({executionEnabled:e,notFound:b.notFound,deadVmId:m,lastDeadVmId:v.current,isPending:h.isPending,userStopped:_});o.useEffect(()=>{if(!A||!m||!t)return;v.current=m;const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] self-heal failed:",r)}})},[A,m,t,n,y,k,E,R]);const I=rt({executionEnabled:e,failedReason:p?.reason??null,attempts:C.count,isPending:h.isPending,userStopped:_,alreadyHandled:C.handled});o.useEffect(()=>{if(!p){w(r=>r.handled?{...r,handled:!1}:r);return}if(!I||!t)return;w(r=>({...r,handled:!0,count:r.count+1}));const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] claim auto-retry failed:",r)}})},[p,I,t,n,y,k,E,R]);const B=()=>{if(!e||!t)return;const x=z(t,n,y);k(x,{onSuccess:r=>{Z({data:r,virtualMcpId:t,branch:n,setCurrentTaskBranch:E,setSeededPreviewUrl:R})},onError:r=>{console.error("[sandbox-lifecycle] user start failed:",r)}})},Y=async()=>{if(!(!e||!t||!n)&&c){le.mark(t,n);try{await j.callTool({name:"SANDBOX_DELETE",arguments:{virtualMcpId:t,branch:n}})}catch{}ee(ne)}},J=async()=>{await Y(),B()},N=()=>{H.current=new Set,v.current=null,w({branch:n,count:0,handled:!1}),q(),B()},ue={branch:n,previewState:D,status:L,vmEntry:c,previewUrl:Q,userStopped:_,start:B,stop:Y,restart:J,retry:N,resume:N};return ye.jsx(ke,{value:ue,children:V})}export{gt as S,kt as a,Ye as b,de as c,xt as d,bt as e,vt as f,Ke as g,Tt as o,wt as s,Rt as u};
@@ -1 +1 @@
1
- import{ap as n,bN as t,aq as e,bO as m,bP as p,bQ as d,bR as h}from"./index-CFZrnnmD.js";const i=500;n({title:e().max(i),url:e().max(i),icon:e().max(i)});const s=n({keyId:e().max(i),modelId:e().max(i),title:e().max(i).optional()}).nullable();m(["fast","smart","thinking","image","web_search","deep_research"]);m(["fast","smart","thinking"]);const y=n({tiers:n({fast:s,smart:s,thinking:s,image:s,web_search:s,deep_research:s})});n({tiers:n({fast:s.optional(),smart:s.optional(),thinking:s.optional()})});const b=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;n({host:e().min(1).max(i).regex(b).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:e().min(1).max(i).describe("Vault secret id holding the PAT used to authenticate this host.")});n({ids:p(e().max(i)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const v=n({home_task_intake_enabled:t().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:t().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:t().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:t().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:t().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:t().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:t().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:t().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:t().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:t().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:t().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:t().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:t().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:t().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),monitor_enabled:t().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),delivery_lanes_enabled:t().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),cms_auto_fresh_branch:t().optional().describe("When a user opens the CMS on a branch whose last commit is older than the staleness window (2 days), move the session to a freshly minted branch cut from the default branch. The stale branch is left intact on GitHub. Off by default.")}),u=new Set(["reviewer_enabled","cheap_reviewer_model"]);function x(a,r){const c=a?.[r];return u.has(r)?c!==!1:c===!0}function w(a){const r=a?.auto_resolve_conflicts;return typeof r=="boolean"?r:a?.auto_merge===!0}const l=256*1024,f=50,o=500,g=5e3;n({id:e().describe("Brand context ID"),name:e().max(o).describe("Company name"),domain:e().max(o).describe("Company domain (e.g. example.com)"),overview:e().max(g).describe("Company overview / description"),logo:e().max(o).nullable().optional().describe("Logo URL"),favicon:e().max(o).nullable().optional().describe("Favicon URL"),ogImage:e().max(o).nullable().optional().describe("OG image URL"),fonts:n({heading:e().max(o).optional().describe("Font family for headings"),body:e().max(o).optional().describe("Font family for body text"),code:e().max(o).optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:n({primary:e().max(o).optional().describe("Primary brand color (hex)"),secondary:e().max(o).optional().describe("Secondary brand color (hex)"),accent:e().max(o).optional().describe("Accent / highlight color (hex)"),background:e().max(o).optional().describe("Background color (hex)"),foreground:e().max(o).optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:p(d(e(),h())).max(f).nullable().optional().refine(a=>a==null||JSON.stringify(a).length<=l,{message:`images must serialize to at most ${l} bytes`}).describe("Brand images"),metadata:d(e(),h()).nullable().optional().refine(a=>a==null||JSON.stringify(a).length<=l,{message:`metadata must serialize to at most ${l} bytes`}).describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:t().optional().describe("Whether this is the default brand for the organization")});export{u as D,v as O,y as S,w as a,b,x as o};
1
+ import{ap as n,bN as t,aq as e,bO as m,bP as p,bQ as d,bR as h}from"./index-CIpplZnk.js";const i=500;n({title:e().max(i),url:e().max(i),icon:e().max(i)});const s=n({keyId:e().max(i),modelId:e().max(i),title:e().max(i).optional()}).nullable();m(["fast","smart","thinking","image","web_search","deep_research"]);m(["fast","smart","thinking"]);const y=n({tiers:n({fast:s,smart:s,thinking:s,image:s,web_search:s,deep_research:s})});n({tiers:n({fast:s.optional(),smart:s.optional(),thinking:s.optional()})});const b=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;n({host:e().min(1).max(i).regex(b).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:e().min(1).max(i).describe("Vault secret id holding the PAT used to authenticate this host.")});n({ids:p(e().max(i)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const v=n({home_task_intake_enabled:t().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:t().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:t().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:t().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:t().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:t().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:t().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:t().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:t().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:t().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:t().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:t().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:t().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:t().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),monitor_enabled:t().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),delivery_lanes_enabled:t().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),cms_auto_fresh_branch:t().optional().describe("When a user opens the CMS on a branch whose last commit is older than the staleness window (2 days), move the session to a freshly minted branch cut from the default branch. The stale branch is left intact on GitHub. Off by default.")}),u=new Set(["reviewer_enabled","cheap_reviewer_model"]);function x(a,r){const c=a?.[r];return u.has(r)?c!==!1:c===!0}function w(a){const r=a?.auto_resolve_conflicts;return typeof r=="boolean"?r:a?.auto_merge===!0}const l=256*1024,f=50,o=500,g=5e3;n({id:e().describe("Brand context ID"),name:e().max(o).describe("Company name"),domain:e().max(o).describe("Company domain (e.g. example.com)"),overview:e().max(g).describe("Company overview / description"),logo:e().max(o).nullable().optional().describe("Logo URL"),favicon:e().max(o).nullable().optional().describe("Favicon URL"),ogImage:e().max(o).nullable().optional().describe("OG image URL"),fonts:n({heading:e().max(o).optional().describe("Font family for headings"),body:e().max(o).optional().describe("Font family for body text"),code:e().max(o).optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:n({primary:e().max(o).optional().describe("Primary brand color (hex)"),secondary:e().max(o).optional().describe("Secondary brand color (hex)"),accent:e().max(o).optional().describe("Accent / highlight color (hex)"),background:e().max(o).optional().describe("Background color (hex)"),foreground:e().max(o).optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:p(d(e(),h())).max(f).nullable().optional().refine(a=>a==null||JSON.stringify(a).length<=l,{message:`images must serialize to at most ${l} bytes`}).describe("Brand images"),metadata:d(e(),h()).nullable().optional().refine(a=>a==null||JSON.stringify(a).length<=l,{message:`metadata must serialize to at most ${l} bytes`}).describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:t().optional().describe("Whether this is the default brand for the organization")});export{u as D,v as O,y as S,w as a,b,x as o};
@@ -1 +1 @@
1
- import{r as d,bp as T,bt as ce,j as b,br as _,bI as ae,dm as O,bs as C,bC as P,bx as ie,c as F,l as $}from"./index-CFZrnnmD.js";import{e as de}from"./select-BOM-aKhP.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[A,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),v=T(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=T(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,A]=d.useState(null),Y=T(e,v=>A(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function W(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(v))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=T(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(B,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
1
+ import{r as d,bp as T,bt as ce,j as b,br as _,bI as ae,dm as O,bs as C,bC as P,bx as ie,c as F,l as $}from"./index-CIpplZnk.js";import{e as de}from"./select-Bo6x_o6t.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[A,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,W]=d.useState(!1),v=T(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=T(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(V,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=T(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,A]=d.useState(null),Y=T(e,v=>A(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function W(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(v))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(H,o),s=ee(H,o),{onThumbPositionChange:a}=s,c=T(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(B,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
@@ -1 +1 @@
1
- import{c as b,l as w,j as a,h as j}from"./index-CFZrnnmD.js";import{i as v}from"./SearchMd-Y5wxql57.js";function k(f){const e=b.c(17),{value:l,onChange:c,placeholder:m,onKeyDown:u,className:d,isSearching:p,disabled:r}=f,x=m===void 0?"Search...":m,h=r&&"pointer-events-none opacity-50";let t;e[0]!==d||e[1]!==h?(t=w("flex items-center gap-4 rounded-lg bg-[var(--studio-input-background)] px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",h,d),e[0]=d,e[1]=h,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{className:"size-4 text-muted-foreground/75 shrink-0"}):a.jsx(v,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=g=>c(g.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==r||e[8]!==u||e[9]!==x||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:u,placeholder:x,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=r,e[8]=u,e[9]=x,e[10]=s,e[11]=l,e[12]=o):o=e[12];let i;return e[13]!==t||e[14]!==n||e[15]!==o?(i=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=i):i=e[16],i}export{k as S};
1
+ import{c as b,l as w,j as a,h as j}from"./index-CIpplZnk.js";import{i as v}from"./SearchMd-3G73My4C.js";function k(f){const e=b.c(17),{value:l,onChange:c,placeholder:m,onKeyDown:u,className:d,isSearching:p,disabled:r}=f,x=m===void 0?"Search...":m,h=r&&"pointer-events-none opacity-50";let t;e[0]!==d||e[1]!==h?(t=w("flex items-center gap-4 rounded-lg bg-[var(--studio-input-background)] px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",h,d),e[0]=d,e[1]=h,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{className:"size-4 text-muted-foreground/75 shrink-0"}):a.jsx(v,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=g=>c(g.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==r||e[8]!==u||e[9]!==x||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:u,placeholder:x,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=r,e[8]=u,e[9]=x,e[10]=s,e[11]=l,e[12]=o):o=e[12];let i;return e[13]!==t||e[14]!==n||e[15]!==o?(i=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=i):i=e[16],i}export{k as S};
@@ -1 +1 @@
1
- import{c as K,r as C,l as B,j as a}from"./index-CFZrnnmD.js";import{i as I}from"./SearchMd-Y5wxql57.js";import{i as M}from"./X-xX_XXXXt.js";import{I as O}from"./icon-button-B2Jd-vIw.js";function H(S){const e=K.c(34),{value:t,onChange:s,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,y=F===void 0?"Clear search":F,[L,p]=C.useState(t!==""),[R,z]=C.useState(!1),[V,$]=C.useState(t);if(t!==V&&($(t),t===""&&!R&&p(!1)),!L&&!o){let l,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>p(!0),g=a.jsx(I,{}),e[0]=l,e[1]=g):(l=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"secondary",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const _=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==_?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground card-shadow",_,j),e[4]=j,e[5]=_,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(I,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const k=!o;let r;e[8]!==s?(r=l=>s(l.target.value),e[8]=s,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>z(!0),e[10]=h):h=e[10];let i;e[11]!==t?(i=()=>{z(!1),t===""&&p(!1)},e[11]=t,e[12]=i):i=e[12];let c;e[13]!==s?(c=l=>{l.key==="Escape"&&s("")},e[13]=s,e[14]=c):c=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=B("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==i||e[19]!==c||e[20]!==f||e[21]!==k||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:k,value:t,onChange:r,onFocus:h,onBlur:i,onKeyDown:c,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=i,e[19]=c,e[20]=f,e[21]=k,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==y||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":y,onMouseDown:P,onClick:()=>{s(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=y,e[26]=o,e[27]=s,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{H as S};
1
+ import{c as K,r as C,l as B,j as a}from"./index-CIpplZnk.js";import{i as I}from"./SearchMd-3G73My4C.js";import{i as M}from"./X-O0g-zSXl.js";import{I as O}from"./icon-button-Cq1k6ZVS.js";function H(S){const e=K.c(34),{value:t,onChange:s,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,y=F===void 0?"Clear search":F,[L,p]=C.useState(t!==""),[R,z]=C.useState(!1),[V,$]=C.useState(t);if(t!==V&&($(t),t===""&&!R&&p(!1)),!L&&!o){let l,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>p(!0),g=a.jsx(I,{}),e[0]=l,e[1]=g):(l=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"secondary",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const _=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==_?(n=B("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground card-shadow",_,j),e[4]=j,e[5]=_,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(I,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const k=!o;let r;e[8]!==s?(r=l=>s(l.target.value),e[8]=s,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>z(!0),e[10]=h):h=e[10];let i;e[11]!==t?(i=()=>{z(!1),t===""&&p(!1)},e[11]=t,e[12]=i):i=e[12];let c;e[13]!==s?(c=l=>{l.key==="Escape"&&s("")},e[13]=s,e[14]=c):c=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=B("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==i||e[19]!==c||e[20]!==f||e[21]!==k||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:k,value:t,onChange:r,onFocus:h,onBlur:i,onKeyDown:c,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=i,e[19]=c,e[20]=f,e[21]=k,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==y||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":y,onMouseDown:P,onClick:()=>{s(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=y,e[26]=o,e[27]=s,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{H as S};
@@ -1 +1 @@
1
- import{c as x,b as d,j as l}from"./index-CFZrnnmD.js";import{s as j}from"./User01-Dn00_JAZ.js";import{t as E}from"./Users01-BBUvRTwh.js";const b=/^[A-Za-z0-9_.-]+$/;function h(u){const e=x.c(15),{field:p,secretById:t}=u,s=d(),n=p.value||"";if(!n)return null;let a;e[0]!==n||e[1]!==t?(a=t.get(n),e[0]=n,e[1]=t,e[2]=a):a=e[2];const c=a;if(!c){let i;e[3]!==n||e[4]!==s?(i=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=i):i=e[5];let f;return e[6]!==i?(f=l.jsx("span",{className:"text-destructive",children:i}),e[6]=i,e[7]=f):f=e[7],f}let o;e[8]!==c.scope?(o=l.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=l.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=l.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(u){const e=x.c(2),{scope:p}=u,t=p==="user"?j:E;let s;return e[0]!==t?(s=l.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{h as S,b as a,N as b};
1
+ import{c as x,b as d,j as l}from"./index-CIpplZnk.js";import{s as j}from"./User01-D1oM1BHv.js";import{t as E}from"./Users01-B-_tKxiA.js";const b=/^[A-Za-z0-9_.-]+$/;function h(u){const e=x.c(15),{field:p,secretById:t}=u,s=d(),n=p.value||"";if(!n)return null;let a;e[0]!==n||e[1]!==t?(a=t.get(n),e[0]=n,e[1]=t,e[2]=a):a=e[2];const c=a;if(!c){let i;e[3]!==n||e[4]!==s?(i=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=i):i=e[5];let f;return e[6]!==i?(f=l.jsx("span",{className:"text-destructive",children:i}),e[6]=i,e[7]=f):f=e[7],f}let o;e[8]!==c.scope?(o=l.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=l.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=l.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(u){const e=x.c(2),{scope:p}=u,t=p==="user"?j:E;let s;return e[0]!==t?(s=l.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{h as S,b as a,N as b};
@@ -1 +1 @@
1
- import{c as v,b as C,j as s,n as w,e$ as F,E as L,r as y,aR as O,Z as R,B as z,R as E,t as _}from"./index-CFZrnnmD.js";import{i as B}from"./AlertCircle-BQBmepo1.js";import{s as A}from"./Plus-t4kIBGIE.js";import{s as I}from"./User01-Dn00_JAZ.js";import{t as q}from"./Users01-BBUvRTwh.js";import{D as V,b as H,c as Z,d as G,h as J,e as K}from"./dialog-Dcra4McE.js";import{I as P}from"./input-B_-SnRO5.js";import{L as D}from"./label-DSLU6fFz.js";import{S as M,b as Q,a as U,d as W,c as $}from"./select-BOM-aKhP.js";import{T as X}from"./textarea-CDG_4h5K.js";import{u as Y,a as ee}from"./use-secrets-DgrFX5xg.js";import{R as te}from"./require-capability-CUtBt1bi.js";import"./X-xX_XXXXt.js";import"./index-Cv3P6Wq4.js";import"./Check-Bcnv-H55.js";import"./ChevronUp-wyCoS3df.js";import"./access-gate-wTt0hkiV.js";import"./capability-load-error-DVSWQq85.js";function se(t){const e=v.c(6),{error:r}=t,n=C();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(B,{size:16}),e[0]=c):c=e[0];let i;e[1]!==r.message||e[2]!==n?(i=n("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=n,e[3]=i):i=e[3];let l;return e[4]!==i?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:i})]}),e[4]=i,e[5]=l):l=e[5],l}function re(t){const e=v.c(8),{scope:r}=t,n=C(),c=r==="user"?I:q;let i;e[0]!==r||e[1]!==n?(i=n(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=n,e[2]=i):i=e[2];const l=i;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let o;return e[5]!==l||e[6]!==a?(o=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=o):o=e[7],o}function T(t){const e=v.c(20),{secret:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(E,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let i;e[3]!==r.scope?(i=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let l;e[5]!==c||e[6]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,i]}),e[5]=c,e[6]=i,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let o;e[10]!==l||e[11]!==a?(o=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=o):o=e[12];let m;e[13]!==r.createdAt?(m=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=m):m=e[14];let d;e[15]!==m?(d=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:m}),e[15]=m,e[16]=d):d=e[16];let u;return e[17]!==o||e[18]!==d?(u=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[o,d]}),e[17]=o,e[18]=d,e[19]=u):u=e[19],u}function ne(t){const e=v.c(15),{action:r}=t,n=C();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(E,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let i;e[1]!==n?(i=n("settings.secrets.emptyTitle"),e[1]=n,e[2]=i):i=e[2];let l;e[3]!==i?(l=s.jsx("p",{className:"font-medium text-sm",children:i}),e[3]=i,e[4]=l):l=e[4];let a;e[5]!==n?(a=n("settings.secrets.emptyDescription"),e[5]=n,e[6]=a):a=e[6];let o;e[7]!==a?(o=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=o):o=e[8];let m;e[9]!==l||e[10]!==o?(m=s.jsxs("div",{children:[l,o]}),e[9]=l,e[10]=o,e[11]=m):m=e[11];let d;return e[12]!==r||e[13]!==m?(d=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,m,r]}),e[12]=r,e[13]=m,e[14]=d):d=e[14],d}function k({open:t,onOpenChange:e}){const r=C(),[n,c]=y.useState("organization"),[i,l]=y.useState(""),[a,o]=y.useState(""),[m,d]=y.useState(""),u=ee();function b(){c("organization"),l(""),o(""),d("")}function g(){b(),e(!1)}async function S(x){if(x.preventDefault(),!(!i.trim()||!a))try{await u.mutateAsync({scope:n,name:i.trim(),value:a,description:m.trim()||void 0}),_.success(r("settings.secrets.secretCreated",{name:i.trim()})),g()}catch(j){_.error(j instanceof Error?j.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(V,{open:t,onOpenChange:x=>{x?e(x):g()},children:s.jsxs(H,{className:"sm:max-w-lg",children:[s.jsxs(Z,{children:[s.jsx(G,{children:r("settings.secrets.newSecretTitle")}),s.jsx(J,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(M,{value:n,onValueChange:x=>c(x),children:[s.jsx(Q,{id:"secret-scope",children:s.jsx(U,{})}),s.jsxs(W,{children:[s.jsx($,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx($,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(P,{id:"secret-name",value:i,onChange:x=>l(x.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(P,{id:"secret-value",type:"password",value:a,onChange:x=>o(x.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(X,{id:"secret-description",value:m,onChange:x=>d(x.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(K,{children:[s.jsx(z,{type:"button",variant:"outline",onClick:g,disabled:u.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(z,{type:"submit",disabled:u.isPending||!i.trim()||!a,children:u.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=v.c(36),e=R(),r=C(),n=Y(),[c,i]=y.useState(!1);let l,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>i(!0),a=s.jsx(A,{size:14}),t[0]=l,t[1]=a):(l=t[0],a=t[1]);let o;t[2]!==r?(o=r("settings.secrets.newSecret"),t[2]=r,t[3]=o):o=t[3];let m;t[4]!==o?(m=s.jsx(w.Actions,{children:s.jsxs(z,{size:"sm",onClick:l,children:[a,o]})}),t[4]=o,t[5]=m):m=t[5];const d=m;if(n.length===0){const j=e&&d,N=!e&&d;let h;t[6]!==N?(h=s.jsx(ne,{action:N}),t[6]=N,t[7]=h):h=t[7];let f;t[8]!==c?(f=s.jsx(k,{open:c,onOpenChange:i}),t[8]=c,t[9]=f):f=t[9];let p;return t[10]!==j||t[11]!==h||t[12]!==f?(p=s.jsxs(s.Fragment,{children:[j,h,f]}),t[10]=j,t[11]=h,t[12]=f,t[13]=p):p=t[13],p}let u,b,g;if(t[14]!==d||t[15]!==n||t[16]!==r){const j=n.filter(oe),N=n.filter(ae),h=n.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let f;t[20]!==n.length||t[21]!==r||t[22]!==h?(f=r(h,{count:n.length}),t[20]=n.length,t[21]=r,t[22]=h,t[23]=f):f=t[23];let p;t[24]!==f?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:f}),t[24]=f,t[25]=p):p=t[25],t[26]!==d||t[27]!==p?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[p,d]}),t[26]=d,t[27]=p,t[28]=u):u=t[28],b=j.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:r("settings.secrets.sectionOrganization")}),s.jsx("div",{children:j.map(le)})]}):null,g=N.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:r("settings.secrets.sectionPrivate")}),s.jsx("div",{children:N.map(ce)})]}):null,t[14]=d,t[15]=n,t[16]=r,t[17]=u,t[18]=b,t[19]=g}else u=t[17],b=t[18],g=t[19];let S;t[29]!==c?(S=s.jsx(k,{open:c,onOpenChange:i}),t[29]=c,t[30]=S):S=t[30];let x;return t[31]!==u||t[32]!==b||t[33]!==g||t[34]!==S?(x=s.jsxs(s.Fragment,{children:[u,b,g,S]}),t[31]=u,t[32]=b,t[33]=g,t[34]=S,t[35]=x):x=t[35],x}function ce(t){return s.jsx(T,{secret:t},t.id)}function le(t){return s.jsx(T,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function de(){const t=v.c(7),e=C();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let n;t[2]!==r?(n=s.jsx(w.Title,{children:r}),t[2]=r,t[3]=n):n=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(L,{fallback:me,children:s.jsx(y.Suspense,{fallback:s.jsx(O,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let i;return t[5]!==n?(i=s.jsx(w,{children:s.jsx(w.Content,{children:s.jsx(w.Container,{children:s.jsxs(F,{children:[n,c]})})})}),t[5]=n,t[6]=i):i=t[6],i}function me(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function $e(){const t=v.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(de,{})}),t[0]=e):e=t[0],e}export{$e as default};
1
+ import{c as v,b as C,j as s,n as w,e$ as F,E as L,r as y,aR as O,Z as R,B as z,R as E,t as _}from"./index-CIpplZnk.js";import{i as B}from"./AlertCircle-98wzPKVW.js";import{s as A}from"./Plus-B8Z2drir.js";import{s as I}from"./User01-D1oM1BHv.js";import{t as q}from"./Users01-B-_tKxiA.js";import{D as V,b as H,c as Z,d as G,h as J,e as K}from"./dialog-jP8njNI6.js";import{I as P}from"./input-BPtPkDjr.js";import{L as D}from"./label-tAOICfGy.js";import{S as M,b as Q,a as U,d as W,c as $}from"./select-Bo6x_o6t.js";import{T as X}from"./textarea-AoHG-xc8.js";import{u as Y,a as ee}from"./use-secrets-Cp7IdDQp.js";import{R as te}from"./require-capability-Shivm_GS.js";import"./X-O0g-zSXl.js";import"./index-CMcP18Ct.js";import"./Check-BzQDWJjM.js";import"./ChevronUp-zrMm2jhU.js";import"./access-gate-BRVtYWTn.js";import"./capability-load-error-DEFOhVqR.js";function se(t){const e=v.c(6),{error:r}=t,n=C();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(B,{size:16}),e[0]=c):c=e[0];let i;e[1]!==r.message||e[2]!==n?(i=n("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=n,e[3]=i):i=e[3];let l;return e[4]!==i?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:i})]}),e[4]=i,e[5]=l):l=e[5],l}function re(t){const e=v.c(8),{scope:r}=t,n=C(),c=r==="user"?I:q;let i;e[0]!==r||e[1]!==n?(i=n(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=n,e[2]=i):i=e[2];const l=i;let a;e[3]!==c?(a=s.jsx(c,{size:12}),e[3]=c,e[4]=a):a=e[4];let o;return e[5]!==l||e[6]!==a?(o=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[a,l]}),e[5]=l,e[6]=a,e[7]=o):o=e[7],o}function T(t){const e=v.c(20),{secret:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(E,{size:16,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let i;e[3]!==r.scope?(i=s.jsx(re,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let l;e[5]!==c||e[6]!==i?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,i]}),e[5]=c,e[6]=i,e[7]=l):l=e[7];let a;e[8]!==r.description?(a=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=a):a=e[9];let o;e[10]!==l||e[11]!==a?(o=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[n,s.jsxs("div",{className:"min-w-0",children:[l,a]})]}),e[10]=l,e[11]=a,e[12]=o):o=e[12];let m;e[13]!==r.createdAt?(m=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=m):m=e[14];let d;e[15]!==m?(d=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:m}),e[15]=m,e[16]=d):d=e[16];let u;return e[17]!==o||e[18]!==d?(u=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[o,d]}),e[17]=o,e[18]=d,e[19]=u):u=e[19],u}function ne(t){const e=v.c(15),{action:r}=t,n=C();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(E,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let i;e[1]!==n?(i=n("settings.secrets.emptyTitle"),e[1]=n,e[2]=i):i=e[2];let l;e[3]!==i?(l=s.jsx("p",{className:"font-medium text-sm",children:i}),e[3]=i,e[4]=l):l=e[4];let a;e[5]!==n?(a=n("settings.secrets.emptyDescription"),e[5]=n,e[6]=a):a=e[6];let o;e[7]!==a?(o=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:a}),e[7]=a,e[8]=o):o=e[8];let m;e[9]!==l||e[10]!==o?(m=s.jsxs("div",{children:[l,o]}),e[9]=l,e[10]=o,e[11]=m):m=e[11];let d;return e[12]!==r||e[13]!==m?(d=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,m,r]}),e[12]=r,e[13]=m,e[14]=d):d=e[14],d}function k({open:t,onOpenChange:e}){const r=C(),[n,c]=y.useState("organization"),[i,l]=y.useState(""),[a,o]=y.useState(""),[m,d]=y.useState(""),u=ee();function b(){c("organization"),l(""),o(""),d("")}function g(){b(),e(!1)}async function S(x){if(x.preventDefault(),!(!i.trim()||!a))try{await u.mutateAsync({scope:n,name:i.trim(),value:a,description:m.trim()||void 0}),_.success(r("settings.secrets.secretCreated",{name:i.trim()})),g()}catch(j){_.error(j instanceof Error?j.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(V,{open:t,onOpenChange:x=>{x?e(x):g()},children:s.jsxs(H,{className:"sm:max-w-lg",children:[s.jsxs(Z,{children:[s.jsx(G,{children:r("settings.secrets.newSecretTitle")}),s.jsx(J,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:S,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(M,{value:n,onValueChange:x=>c(x),children:[s.jsx(Q,{id:"secret-scope",children:s.jsx(U,{})}),s.jsxs(W,{children:[s.jsx($,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx($,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(P,{id:"secret-name",value:i,onChange:x=>l(x.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(P,{id:"secret-value",type:"password",value:a,onChange:x=>o(x.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(D,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(X,{id:"secret-description",value:m,onChange:x=>d(x.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(K,{children:[s.jsx(z,{type:"button",variant:"outline",onClick:g,disabled:u.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(z,{type:"submit",disabled:u.isPending||!i.trim()||!a,children:u.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function ie(){const t=v.c(36),e=R(),r=C(),n=Y(),[c,i]=y.useState(!1);let l,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>i(!0),a=s.jsx(A,{size:14}),t[0]=l,t[1]=a):(l=t[0],a=t[1]);let o;t[2]!==r?(o=r("settings.secrets.newSecret"),t[2]=r,t[3]=o):o=t[3];let m;t[4]!==o?(m=s.jsx(w.Actions,{children:s.jsxs(z,{size:"sm",onClick:l,children:[a,o]})}),t[4]=o,t[5]=m):m=t[5];const d=m;if(n.length===0){const j=e&&d,N=!e&&d;let h;t[6]!==N?(h=s.jsx(ne,{action:N}),t[6]=N,t[7]=h):h=t[7];let f;t[8]!==c?(f=s.jsx(k,{open:c,onOpenChange:i}),t[8]=c,t[9]=f):f=t[9];let p;return t[10]!==j||t[11]!==h||t[12]!==f?(p=s.jsxs(s.Fragment,{children:[j,h,f]}),t[10]=j,t[11]=h,t[12]=f,t[13]=p):p=t[13],p}let u,b,g;if(t[14]!==d||t[15]!==n||t[16]!==r){const j=n.filter(oe),N=n.filter(ae),h=n.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let f;t[20]!==n.length||t[21]!==r||t[22]!==h?(f=r(h,{count:n.length}),t[20]=n.length,t[21]=r,t[22]=h,t[23]=f):f=t[23];let p;t[24]!==f?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:f}),t[24]=f,t[25]=p):p=t[25],t[26]!==d||t[27]!==p?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[p,d]}),t[26]=d,t[27]=p,t[28]=u):u=t[28],b=j.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:r("settings.secrets.sectionOrganization")}),s.jsx("div",{children:j.map(le)})]}):null,g=N.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:r("settings.secrets.sectionPrivate")}),s.jsx("div",{children:N.map(ce)})]}):null,t[14]=d,t[15]=n,t[16]=r,t[17]=u,t[18]=b,t[19]=g}else u=t[17],b=t[18],g=t[19];let S;t[29]!==c?(S=s.jsx(k,{open:c,onOpenChange:i}),t[29]=c,t[30]=S):S=t[30];let x;return t[31]!==u||t[32]!==b||t[33]!==g||t[34]!==S?(x=s.jsxs(s.Fragment,{children:[u,b,g,S]}),t[31]=u,t[32]=b,t[33]=g,t[34]=S,t[35]=x):x=t[35],x}function ce(t){return s.jsx(T,{secret:t},t.id)}function le(t){return s.jsx(T,{secret:t},t.id)}function ae(t){return t.scope==="user"}function oe(t){return t.scope==="organization"}function de(){const t=v.c(7),e=C();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let n;t[2]!==r?(n=s.jsx(w.Title,{children:r}),t[2]=r,t[3]=n):n=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(L,{fallback:me,children:s.jsx(y.Suspense,{fallback:s.jsx(O,{className:"h-32 w-full"}),children:s.jsx(ie,{})})}),t[4]=c):c=t[4];let i;return t[5]!==n?(i=s.jsx(w,{children:s.jsx(w.Content,{children:s.jsx(w.Container,{children:s.jsxs(F,{children:[n,c]})})})}),t[5]=n,t[6]=i):i=t[6],i}function me(t){const{error:e}=t;return s.jsx(se,{error:e??new Error("Failed to load secrets")})}function $e(){const t=v.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{capability:"secrets:manage",area:"secrets",children:s.jsx(de,{})}),t[0]=e):e=t[0],e}export{$e as default};