decocms 4.494.0 → 4.495.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 (368) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-C-buMql8.js → ActiveShapeUtils-h1pqy1tf.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-xh90NARB.js → AlertCircle-CIcaLchq.js} +1 -1
  3. package/dist/client/assets/{AreaChart-hhJtx5W4.js → AreaChart-CZ-42bmk.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-Xffg7q8p.js → ArrowLeft-DfXjYrQi.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-4iK8zoCx.js → ArrowUp-B8mx1ol5.js} +1 -1
  6. package/dist/client/assets/{BarChart-CvyDfHpd.js → BarChart-CEMnTLeo.js} +1 -1
  7. package/dist/client/assets/{Building02-DAEF4UrO.js → Building02-BPQ9fMgU.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CMQWnNBW.js → CategoricalChart-M1P6vf9W.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-DUpC1qQ4.js → CheckCircle-ChTvVqPO.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-DCkH1mIQ.js → ChevronSelectorVertical-zoEWZ9sC.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-D_Wjh1Pp.js → ChevronUp-DckC0O5o.js} +1 -1
  12. package/dist/client/assets/{Copy01-BdyOQaoT.js → Copy01-Corfj4_5.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-YN58MJQp.js → CreditCard01-DlMgd9ia.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-C0q218c1.js → DotsVertical-uTiOtqeH.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-thUyR0rx.js → ErrorBarContext-B19L0BAB.js} +1 -1
  16. package/dist/client/assets/{Globe04-brrhloqP.js → Globe04-CL3-GeAh.js} +1 -1
  17. package/dist/client/assets/{Image01-Drnu_oTX.js → Image01-gtPlqhVq.js} +1 -1
  18. package/dist/client/assets/{Key01-DXKey19o.js → Key01-BQnNEHGn.js} +1 -1
  19. package/dist/client/assets/{Link01-DAwi9mlM.js → Link01-BSAGxXho.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-wTJMvAdz.js → LinkBroken01-t0qEt8Lb.js} +1 -1
  21. package/dist/client/assets/{Monitor01-Bm_bTKyL.js → Monitor01-BIhKjgAf.js} +1 -1
  22. package/dist/client/assets/{Play-CqIDE5zC.js → Play-Ba5tQ65L.js} +1 -1
  23. package/dist/client/assets/{Plus-j4aDTi8e.js → Plus-4vFTW30B.js} +1 -1
  24. package/dist/client/assets/{SearchMd-DhQxjm00.js → SearchMd-DqzvTdT2.js} +1 -1
  25. package/dist/client/assets/{Sector-Dhm7L79o.js → Sector-CdUfaAFg.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-BJ4cJNkc.js → ShoppingBag01-C6V1h_2Z.js} +1 -1
  27. package/dist/client/assets/{Sun-D0UkgT29.js → Sun-DlWI3pkK.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-6WEEE86B.js → SwitchHorizontal01-DN4m9K18.js} +1 -1
  29. package/dist/client/assets/{Tool01-DG06N0su.js → Tool01-BJxIe84T.js} +1 -1
  30. package/dist/client/assets/{Trash01-C9lhbJs7.js → Trash01-Dvqfc9le.js} +1 -1
  31. package/dist/client/assets/{Upload01-Bt337Shk.js → Upload01-BxWCGLDw.js} +1 -1
  32. package/dist/client/assets/{User01-DXN8J2dA.js → User01-Dh_l7uq-.js} +1 -1
  33. package/dist/client/assets/{UserSquare-B7AJhMXA.js → UserSquare-B4EnRc3E.js} +1 -1
  34. package/dist/client/assets/{Users01-CHS_3A2d.js → Users01-CIo5W1LA.js} +1 -1
  35. package/dist/client/assets/{XAxis-M9-_1D7_.js → XAxis-B_TwRkrI.js} +1 -1
  36. package/dist/client/assets/{XClose-pteQuwAH.js → XClose-D59UZ-3l.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-D4nHzX79.js → ZoomOut-BwebNTOr.js} +1 -1
  38. package/dist/client/assets/{access-gate-CNFrC5-Q.js → access-gate-gXgyWrzR.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-BXB3P-4X.js → add-connection-dialog-BWXm_ufM.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-C1qxm1L0.js → agent-analytics-C-L1VtQz.js} +1 -1
  41. package/dist/client/assets/agent-app-DdLgacxL.js +1 -0
  42. package/dist/client/assets/{agent-assets-Doo6qn_B.js → agent-assets-C7fUNq2M.js} +1 -1
  43. package/dist/client/assets/{agent-automation-BhXRsqWt.js → agent-automation-Dpa5yDG5.js} +1 -1
  44. package/dist/client/assets/{agent-automations-B3GOPyc3.js → agent-automations-BP9tDs5d.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-Cj-TiW7a.js → agent-connect-sources-DpyMUK1-.js} +1 -1
  46. package/dist/client/assets/agent-deck-BYEYsFu3.js +1 -0
  47. package/dist/client/assets/{agent-e2e-CyiK0Nn8.js → agent-e2e-C-WfEm6u.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-Dero6WeN.js → agent-experiments-eTfavUjm.js} +1 -1
  49. package/dist/client/assets/{agent-file-Cao_W_me.js → agent-file-DQ-Axvcs.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-5VKfgGQd.js → agent-hosting-DnmQYnCT.js} +1 -1
  51. package/dist/client/assets/{agent-icon-CAaO4ypa.js → agent-icon-B6BGlN8Z.js} +1 -1
  52. package/dist/client/assets/agent-library-587LhhOs.js +1 -0
  53. package/dist/client/assets/agent-library-file-DYqQlnsg.js +1 -0
  54. package/dist/client/assets/{agent-monitor-UjHCObOn.js → agent-monitor-DVgP3QNe.js} +1 -1
  55. package/dist/client/assets/{agent-overview-CARG35t2.js → agent-overview-d4b3y6_i.js} +1 -1
  56. package/dist/client/assets/agent-settings-Df-14Bch.js +1 -0
  57. package/dist/client/assets/{agent-site-editor-CXDMfxCU.js → agent-site-editor-BwrjcFt1.js} +1 -1
  58. package/dist/client/assets/agent-site-editor-code-BS_mQuFD.js +2 -0
  59. package/dist/client/assets/{agent-site-editor-content-BAjBb750.js → agent-site-editor-content-2sl9AU9q.js} +3 -3
  60. package/dist/client/assets/agent-site-editor-preview-CXCXzBai.js +518 -0
  61. package/dist/client/assets/agent-view-BhxMS98G.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-1XKy1jVJ.js → agent-view-guard-CGvorA84.js} +1 -1
  63. package/dist/client/assets/{agents-list-BKQ9GkqQ.js → agents-list-DoqG_xIw.js} +1 -1
  64. package/dist/client/assets/{ai-providers-DQvwi-LI.js → ai-providers-D4PaL9-3.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-DhiFzLmM.js → alert-dialog-G7y5OQF6.js} +1 -1
  66. package/dist/client/assets/{alert-DEeNrGpM.js → alert-sNWraY0q.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-BW-0HIcE.js → analytics-sections-BjxK3DaP.js} +1 -1
  68. package/dist/client/assets/{api-keys-B6xfTHb9.js → api-keys-DWxZSE3m.js} +1 -1
  69. package/dist/client/assets/api-keys-Dd4XvmOL.js +1 -0
  70. package/dist/client/assets/app-editor-D525MffA.js +1 -0
  71. package/dist/client/assets/{asset-utils-RYK8HJ3w.js → asset-utils-C3b9KJ52.js} +1 -1
  72. package/dist/client/assets/{auth-CFVKU9If.js → auth-CK5qaIjH.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-UV-w9rG5.js → auth-catchall-CBQrYLJa.js} +1 -1
  74. package/dist/client/assets/{auth-entry-DI7FcrqT.js → auth-entry-5fZpsKca.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout-CuIKSb1N.js → auth-split-layout-_2GxCjhr.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth-C4TrLSCm.js → authenticate-and-persist-oauth-BqWfXARS.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-Dv9cy6ec.js → automation-list-row-DkLqeS2t.js} +1 -1
  78. package/dist/client/assets/{automation-runs-qbW12Sit.js → automation-runs-KOVQ8ghD.js} +1 -1
  79. package/dist/client/assets/{automations-CVxx9AvI.js → automations-GiLoIizc.js} +1 -1
  80. package/dist/client/assets/{autosend-DqvDhR1V.js → autosend-CACWNbxC.js} +1 -1
  81. package/dist/client/assets/{avatar-DC1Cmzej.js → avatar-CFdg60BT.js} +1 -1
  82. package/dist/client/assets/{badge-C85ocGTA.js → badge-2H20v0nO.js} +1 -1
  83. package/dist/client/assets/{block-document-DQft1xyS.js → block-document-BJBufMup.js} +1 -1
  84. package/dist/client/assets/{blocks-preview-workspace-context-6ZMkVqw_.js → blocks-preview-workspace-context-45OWUgi1.js} +1 -1
  85. package/dist/client/assets/{blog-schema-vO6IoJBM.js → blog-schema-C3v2xT_H.js} +1 -1
  86. package/dist/client/assets/{board-analytics-DatP--tQ.js → board-analytics-DXWCCmjm.js} +1 -1
  87. package/dist/client/assets/{buckets-Cczodic8.js → buckets-C4_hXb9P.js} +1 -1
  88. package/dist/client/assets/{build-improve-prompt-doc-BQEdJK2P.js → build-improve-prompt-doc-D_-kPQOz.js} +1 -1
  89. package/dist/client/assets/{calendar-BUi8IxeZ.js → calendar-BYqJ2k4j.js} +1 -1
  90. package/dist/client/assets/{capability-load-error-rL1NTtJa.js → capability-load-error-D-0oMipl.js} +1 -1
  91. package/dist/client/assets/{category-editor-B_XTuKuu.js → category-editor-Bq4nzviJ.js} +1 -1
  92. package/dist/client/assets/{chart-CjiGuzpk.js → chart-BPIcOkoH.js} +1 -1
  93. package/dist/client/assets/{chat-context-oLIKqlGE.js → chat-context-Dh5tO9W1.js} +1 -1
  94. package/dist/client/assets/{chat-draft-Cgc2XQsH.js → chat-draft-Bck3d8Ok.js} +1 -1
  95. package/dist/client/assets/{checkbox-DZ-_DOro.js → checkbox-BRl2nVIa.js} +1 -1
  96. package/dist/client/assets/{choose-editor-CryRu8AV.js → choose-editor-BOSYr3Y3.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy--pyKC4gk.js → claim-phase-copy-De8hliCj.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-DmgEVi8V.js → cli-auth-success-BHU-QcJX.js} +1 -1
  99. package/dist/client/assets/{client-icons-Dr3qA-pT.js → client-icons-9yzx81xM.js} +1 -1
  100. package/dist/client/assets/{collapsible-D6DR3zQ4.js → collapsible-CQEd_xSV.js} +1 -1
  101. package/dist/client/assets/{collection-detail-CDuDEGYz.js → collection-detail-DRnSuti2.js} +1 -1
  102. package/dist/client/assets/{collection-display-button-DoIjEbJ3.js → collection-display-button-B_HjtsMm.js} +1 -1
  103. package/dist/client/assets/{collection-search-CacvIdKe.js → collection-search-BPtx8G1f.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-hyzp9jUd.js → collection-table-wrapper-BryChMzP.js} +1 -1
  105. package/dist/client/assets/{collection-tabs-ywProb31.js → collection-tabs-rDrGFt87.js} +1 -1
  106. package/dist/client/assets/{column-rules-BK42oUF9.js → column-rules-CBDddx-X.js} +1 -1
  107. package/dist/client/assets/{combobox-DOrn42oJ.js → combobox-CUJidMCM.js} +1 -1
  108. package/dist/client/assets/{command-fqp-0b5f.js → command-CdSfLL9P.js} +1 -1
  109. package/dist/client/assets/{companion-mcps-section-CzRe8aZa.js → companion-mcps-section-CapqSyeR.js} +1 -1
  110. package/dist/client/assets/{config-CIO93PJU.js → config-DYtJAhTs.js} +1 -1
  111. package/dist/client/assets/{connect-Be6_BDOH.js → connect-DzC_JY0O.js} +1 -1
  112. package/dist/client/assets/{connect-layout-Dgmc1sNX.js → connect-layout-CwfCc-Yp.js} +1 -1
  113. package/dist/client/assets/{connection-BCelELHr.js → connection-KGhvUETQ.js} +1 -1
  114. package/dist/client/assets/{connection-card-BWXrChNc.js → connection-card-CmOjRIm5.js} +1 -1
  115. package/dist/client/assets/{connection-detail-B7kDdVY9.js → connection-detail-8IXvecot.js} +1 -1
  116. package/dist/client/assets/{connection-form-helpers-DCUMal7M.js → connection-form-helpers-DwH5XcOW.js} +1 -1
  117. package/dist/client/assets/{connections-BYbkoIDQ.js → connections-Bl-ms1sl.js} +1 -1
  118. package/dist/client/assets/{context-ByfIilVn.js → context-CQ5RUVRk.js} +1 -1
  119. package/dist/client/assets/{context-menu-CiGJumcW.js → context-menu-BONDmMvs.js} +1 -1
  120. package/dist/client/assets/{core.esm-C2_DCN6Y.js → core.esm-gbvtUb0d.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-BHthlR2A.js → create-organization-dialog--_vdq0__.js} +1 -1
  122. package/dist/client/assets/{daily-pulse-E_FUA1NH.js → daily-pulse-BBYJtLUK.js} +1 -1
  123. package/dist/client/assets/{device-hint-DA_uRg_p.js → device-hint-C3mf2rBk.js} +1 -1
  124. package/dist/client/assets/{discover-J_sID2RZ.js → discover-Dg3bEYIg.js} +1 -1
  125. package/dist/client/assets/{domain-settings-BrzCpB_6.js → domain-settings-BLJaGYt5.js} +1 -1
  126. package/dist/client/assets/{drawer-BMuDp3pZ.js → drawer-C9byc45q.js} +1 -1
  127. package/dist/client/assets/{editor-Dq4IMcxm.js → editor-vTtvQU6U.js} +1 -1
  128. package/dist/client/assets/{empty-state-DvEOfDhm.js → empty-state-MzgkrW8i.js} +1 -1
  129. package/dist/client/assets/{empty-state-BV6Ywh9y.js → empty-state-OuooYiXX.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-DU6Jox_T.js → extract-connection-data-DKxAapkS.js} +1 -1
  131. package/dist/client/assets/{feature-gate-BZc24_E5.js → feature-gate-DthOZE3T.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-D03mknXg.js → feature-paywall-B43OWr6s.js} +1 -1
  133. package/dist/client/assets/{file-explorer-Lz97U563.js → file-explorer-BK6CBYkh.js} +1 -1
  134. package/dist/client/assets/{file-preview-CV8hE6WA.js → file-preview-Cp_wgKZ4.js} +1 -1
  135. package/dist/client/assets/{file-share-button-Bdi3sj_s.js → file-share-button-BFJJKHR1.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-OOS78AjU.js → file-type-icon-D_YzVdyI.js} +1 -1
  137. package/dist/client/assets/flat-project-OqAYQvXi.js +1 -0
  138. package/dist/client/assets/{folder-icon-B0QLaV9K.js → folder-icon-DDtGpklD.js} +1 -1
  139. package/dist/client/assets/{form-CZcQhZCa.js → form-CJ_Xz43P.js} +1 -1
  140. package/dist/client/assets/{general-BMgatBn-.js → general-BZXk3K5d.js} +1 -1
  141. package/dist/client/assets/{home-D1UZSXtn.js → home-BujtXmg1.js} +1 -1
  142. package/dist/client/assets/{icon-button-DbTR-7FA.js → icon-button-HZupTrz9.js} +1 -1
  143. package/dist/client/assets/{index-Box10IZB.js → index-ABTatWfQ.js} +1 -1
  144. package/dist/client/assets/{index-CX4bp0FC.js → index-BRlpwCN0.js} +1 -1
  145. package/dist/client/assets/{index-BvTG_LLZ.js → index-BZvXKYts.js} +1 -1
  146. package/dist/client/assets/{index-Cj4602fN.js → index-BpzCwtjK.js} +1 -1
  147. package/dist/client/assets/{index-BG5IZjO1.js → index-C-fX0RCG.js} +1 -1
  148. package/dist/client/assets/{index-DcG5TBas.js → index-C759w8PG.js} +1 -1
  149. package/dist/client/assets/{index-C9YSJ0Pi.js → index-CcyJ-5NJ.js} +1 -1
  150. package/dist/client/assets/{index-DYLoE6lZ.js → index-CsOndfWq.js} +3 -3
  151. package/dist/client/assets/{index-D-F3H3Df.js → index-D3DgX6eB.js} +1 -1
  152. package/dist/client/assets/{index-BvhG_GL8.js → index-D6j44vfq.js} +3 -3
  153. package/dist/client/assets/{index-Cql9s2oo.js → index-DLLBoYqS.js} +1 -1
  154. package/dist/client/assets/{index-BrozBhiV.js → index-DWDW9ng6.js} +1 -1
  155. package/dist/client/assets/{index-redirect-DnUfmxMQ.js → index-redirect-BQZIR8Rn.js} +1 -1
  156. package/dist/client/assets/{index-D_2G1SLW.js → index-vXsAhBzz.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-C-FPZrNN.js → infiniteQueryObserver-pU9pZci3.js} +1 -1
  158. package/dist/client/assets/{infra-billing-51h8KhW5.js → infra-billing-CJ1SDWNW.js} +1 -1
  159. package/dist/client/assets/{input-B0wYSpb2.js → input-D_3UHFsb.js} +1 -1
  160. package/dist/client/assets/{input-Bv9QfIGh.js → input-EIjvUWwG.js} +3 -3
  161. package/dist/client/assets/{integration-icon-CDrootbG.js → integration-icon-D2n5_i5E.js} +1 -1
  162. package/dist/client/assets/{jira-icon-BYFRiv-4.js → jira-icon-BtEsLcr1.js} +1 -1
  163. package/dist/client/assets/{label-COS7xlc4.js → label-PMOCFxAK.js} +1 -1
  164. package/dist/client/assets/{layout-CBzBOevY.js → layout-ChMyQ0My.js} +1 -1
  165. package/dist/client/assets/{legacy-agents-deep-MO8oblzi.js → legacy-agents-deep-CPBbZTxM.js} +1 -1
  166. package/dist/client/assets/{legacy-main-redirect-CudcgLCq.js → legacy-main-redirect-uv67id5O.js} +1 -1
  167. package/dist/client/assets/library-C5qrWpgG.js +1 -0
  168. package/dist/client/assets/{library-tab-BhC4uvZL.js → library-tab-De6d8NXP.js} +1 -1
  169. package/dist/client/assets/{login-DhV7QjVw.js → login-ew7OWyIA.js} +1 -1
  170. package/dist/client/assets/{markdown-FpxtcMsE.js → markdown-jtizwWYK.js} +1 -1
  171. package/dist/client/assets/{mcp-app-renderer-oNRSzgIY.js → mcp-app-renderer-URE_9VC7.js} +1 -1
  172. package/dist/client/assets/{mcp-oauth-_2kQOfTH.js → mcp-oauth-CS7wEky-.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-hlA0Q-1K.js → mcp-oauth-CtduGE9o.js} +1 -1
  174. package/dist/client/assets/{members-NF923Ad9.js → members-4nC3G4fN.js} +1 -1
  175. package/dist/client/assets/{memory-CkWrgyW6.js → memory-DjFNyy0l.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-CtUg6esm.js → mini-report-page-SXYfkfsJ.js} +1 -1
  177. package/dist/client/assets/{mock-board-BbcelWvr.js → mock-board-DOPI9v1n.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-DOjflLD3.js → monaco-editor--q8pYjVp.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-5gnR_PsS.js → monitoring-stats-row-CEOJr_Mr.js} +1 -1
  180. package/dist/client/assets/{multi-select-DHbRaRWn.js → multi-select-B5EYUvVe.js} +1 -1
  181. package/dist/client/assets/{mustache-CUJOpa04.js → mustache-CwOtagWC.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-Bytx7uX5.js → new-project-dialog-DNSDpVVm.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-BOiaAtqL.js → oauth-callback-N9EX0dsT.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-DHi7-rTD.js → oauth-callback-ai-provider-DYJWavL1.js} +1 -1
  185. package/dist/client/assets/{onboarding-BcQ_H-Ta.js → onboarding-Cf4I151E.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-BgjVhT0d.js → openai-conversation-DGz26UPY.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-DuLy3JAN.js → optimistic-project-sidebar-views-7KZes5Aj.js} +1 -1
  188. package/dist/client/assets/{organization-choice-obmsj85V.js → organization-choice-BjXMGiEn.js} +1 -1
  189. package/dist/client/assets/{orgs-D5F2hLXP.js → orgs-Co8dpTJE.js} +1 -1
  190. package/dist/client/assets/{page-seo-form-Ba1SWsx7.js → page-seo-form-BKnLWhFP.js} +1 -1
  191. package/dist/client/assets/{pair-DfD0HGLO.js → pair-B5n9SRL4.js} +1 -1
  192. package/dist/client/assets/{plan-ladder-ByxenYnr.js → plan-ladder-Bue-fGj1.js} +1 -1
  193. package/dist/client/assets/{popover-CsrTLLWE.js → popover-Cz5BF_3m.js} +1 -1
  194. package/dist/client/assets/{post-calendar-CAVjY12v.js → post-calendar-CEBSrXXn.js} +1 -1
  195. package/dist/client/assets/{post-editor-CLhXk7zA.js → post-editor-BnKzHRjp.js} +1 -1
  196. package/dist/client/assets/{preview-content-CcXQsTVX.js → preview-content-B68u7aBy.js} +1 -1
  197. package/dist/client/assets/{preview-dialog-CuP09SDy.js → preview-dialog-BrKZ8Eye.js} +1 -1
  198. package/dist/client/assets/{preview-panel-si7dSHQt.js → preview-panel-hieScKI7.js} +1 -1
  199. package/dist/client/assets/{product-picker-dialog-Ch2ijOSh.js → product-picker-dialog-DI1rZSm9.js} +1 -1
  200. package/dist/client/assets/{profile-D0l--Bsl.js → profile-DHWmm71D.js} +1 -1
  201. package/dist/client/assets/{project-app-view-Bz65jJNr.js → project-app-view-DfvTxGtE.js} +1 -1
  202. package/dist/client/assets/{project-feed-DSA4fOC7.js → project-feed-DZ1W25Hn.js} +1 -1
  203. package/dist/client/assets/{project-icon-C-N3cJkz.js → project-icon-EnEce15b.js} +1 -1
  204. package/dist/client/assets/project-reports-DkXaua8h.js +1 -0
  205. package/dist/client/assets/project-tasks-Bh6cwC6Y.js +1 -0
  206. package/dist/client/assets/{projects-DvvpjGnZ.js → projects-QOPxi_mI.js} +1 -1
  207. package/dist/client/assets/{projects-empty-state-DfvyQfpd.js → projects-empty-state-B0ZQBktO.js} +1 -1
  208. package/dist/client/assets/{prompts-BuofI3_s.js → prompts-CezqR9ud.js} +1 -1
  209. package/dist/client/assets/record-editor-C_Y1Wo0r.js +1 -0
  210. package/dist/client/assets/redirect-editor-CjFXK1kC.js +1 -0
  211. package/dist/client/assets/{reports-DOq1hOqC.js → reports-BG-GKzeu.js} +1 -1
  212. package/dist/client/assets/reports-BoLey7zx.js +1 -0
  213. package/dist/client/assets/{reports-onboarding-BC8kmZ8I.js → reports-onboarding-5j0jaaNw.js} +1 -1
  214. package/dist/client/assets/{reports-tab-3R3ocdaz.js → reports-tab-BkTRSHA7.js} +2 -2
  215. package/dist/client/assets/{repositories-Bt6nbmSu.js → repositories-BGagF1EN.js} +1 -1
  216. package/dist/client/assets/{repository-binding-4wb1SqGi.js → repository-binding-CXF8Iqmd.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-DgjVp-Rp.js → repository-import-picker-DqDsZx5W.js} +1 -1
  218. package/dist/client/assets/{repository-picker-Dhir_mBD.js → repository-picker-DLkKyJUN.js} +1 -1
  219. package/dist/client/assets/{require-capability-BXoL3s4D.js → require-capability-BM6Ybgn3.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-rplY5gMF.js → required-auth-layout-CVWrBxoR.js} +1 -1
  221. package/dist/client/assets/{reset-password-CNXROw6o.js → reset-password-CEx0Ff3M.js} +1 -1
  222. package/dist/client/assets/{resizable-CYDmoKgw.js → resizable-DyTZr2pU.js} +1 -1
  223. package/dist/client/assets/{resolve-tab-icon-CIzsgPiq.js → resolve-tab-icon-DfIQZFlu.js} +1 -1
  224. package/dist/client/assets/{review-settings-CIijxO9K.js → review-settings-ClvQY-hD.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-BlJN8nO0.js → rich-text-link-control-mLwtvxkK.js} +1 -1
  226. package/dist/client/assets/{roles-rqo1THOy.js → roles-lRXToodJ.js} +1 -1
  227. package/dist/client/assets/{route-nWQgD8-7.js → route-BhRw08bH.js} +1 -1
  228. package/dist/client/assets/route-CndEOl6m.js +1 -0
  229. package/dist/client/assets/{route-D_4e8W74.js → route-DDzvkEDQ.js} +1 -1
  230. package/dist/client/assets/{runnable-block-editor-Cq2CDyKN.js → runnable-block-editor-Cr3HQlva.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-qUf8Q_Xq.js → sandbox-lifecycle-context-CyWspjuL.js} +1 -1
  232. package/dist/client/assets/{schema-B7T6zvOr.js → schema-D6ibRSPf.js} +1 -1
  233. package/dist/client/assets/{scroll-area-C9CkDOV0.js → scroll-area-C8BYcujI.js} +1 -1
  234. package/dist/client/assets/{search-input-CSa-vO3l.js → search-input-ChI_JhrH.js} +1 -1
  235. package/dist/client/assets/{search-toggle-CAbpMgN6.js → search-toggle-CUWWqFsW.js} +1 -1
  236. package/dist/client/assets/{secret-picker-DoaNLSBs.js → secret-picker-CxU-8m-r.js} +1 -1
  237. package/dist/client/assets/{secrets-byDlZpmy.js → secrets-BmlGwv-i.js} +1 -1
  238. package/dist/client/assets/{sections-editor-Bhx-Ytw3.js → sections-editor-DTefyMnC.js} +1 -1
  239. package/dist/client/assets/{select-BTxDOmEz.js → select-CMFCWFoG.js} +1 -1
  240. package/dist/client/assets/{select-model-DXgRM3p3.js → select-model-BGcA4VFt.js} +1 -1
  241. package/dist/client/assets/{seo-editor-SjuXgM-3.js → seo-editor-VyAPTq8i.js} +1 -1
  242. package/dist/client/assets/{separator-i5pMbmNF.js → separator-CF3-tizq.js} +1 -1
  243. package/dist/client/assets/{settings-tab-CKfMYuwP.js → settings-tab-cuNoLFSI.js} +1 -1
  244. package/dist/client/assets/{sheet-B-Hh_nak.js → sheet-DDYhwyXr.js} +1 -1
  245. package/dist/client/assets/{shell-layout-BYblzqjk.js → shell-layout-J-egCYHs.js} +1 -1
  246. package/dist/client/assets/{skills-D04V2qi_.js → skills-DHf4Wnnh.js} +1 -1
  247. package/dist/client/assets/{slider-D3apdx8g.js → slider-BiFHboSa.js} +1 -1
  248. package/dist/client/assets/{sortable.esm-BcPKBoEH.js → sortable.esm-D8MkW_Mj.js} +1 -1
  249. package/dist/client/assets/{sso-Ba8xYn_P.js → sso-B2O83AEI.js} +1 -1
  250. package/dist/client/assets/{suggestion-yrhgs0c3.js → suggestion-CzlBu15n.js} +1 -1
  251. package/dist/client/assets/{switch-Bv7OaKpB.js → switch-CkoldjL2.js} +1 -1
  252. package/dist/client/assets/{symbol-CotFyP2y.js → symbol-Bd69ZTHX.js} +1 -1
  253. package/dist/client/assets/{synced-repos-MTGAuYvc.js → synced-repos-Nygw9-io.js} +1 -1
  254. package/dist/client/assets/{tab-icon-glyph-gJ6W_ogl.js → tab-icon-glyph-DPo9bSSl.js} +1 -1
  255. package/dist/client/assets/{table-CMo_Zd79.js → table-CxKhFuEH.js} +1 -1
  256. package/dist/client/assets/{tabs-DsQwfF9n.js → tabs-DLw8-jiv.js} +1 -1
  257. package/dist/client/assets/{task-board-jYYT4T-P.js → task-board-B6zg05l8.js} +1 -1
  258. package/dist/client/assets/{task-route-CWhoPEpW.js → task-route-Da1wUewT.js} +1 -1
  259. package/dist/client/assets/{task-status-B1Q1IWuY.js → task-status-ENyxLffS.js} +1 -1
  260. package/dist/client/assets/taskboard-analytics-Bq1qJL1-.js +1 -0
  261. package/dist/client/assets/{tasks-sExg1TPS.js → tasks-CIFURdGc.js} +1 -1
  262. package/dist/client/assets/tasks-DK3Yxxu5.js +1 -0
  263. package/dist/client/assets/{textarea-CXxxIkE2.js → textarea-DtmaxKHE.js} +1 -1
  264. package/dist/client/assets/{thread-analytics-CN8JIWoa.js → thread-analytics-DIbC04_x.js} +1 -1
  265. package/dist/client/assets/{thread-button-BjphGBFn.js → thread-button-VjZAd4E3.js} +1 -1
  266. package/dist/client/assets/{thread-intent-Cv8T2W7d.js → thread-intent-iex-fi8o.js} +1 -1
  267. package/dist/client/assets/{thread-route-Y6_0A4lo.js → thread-route-B-vRjZGb.js} +1 -1
  268. package/dist/client/assets/{thread-route-md0irSaA.js → thread-route-Cl51Xz5G.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-qCnpdPMv.js → thread-sheet-body-C_srY05t.js} +1 -1
  270. package/dist/client/assets/{time-range-picker-nGk4jkHe.js → time-range-picker-C5iiqrEW.js} +1 -1
  271. package/dist/client/assets/{toggle-group-MxDdKb-A.js → toggle-group-DlGyqAyH.js} +1 -1
  272. package/dist/client/assets/{tool-namespace-NA4CQCu7.js → tool-namespace-4DMlS5tP.js} +1 -1
  273. package/dist/client/assets/{toolbar-icon-button-DfPVpCUn.js → toolbar-icon-button-D0koaCWD.js} +1 -1
  274. package/dist/client/assets/{tooltip-D0bgPl8K.js → tooltip-UhT0N_rD.js} +1 -1
  275. package/dist/client/assets/{tooltipContext-BJ3U7dLG.js → tooltipContext-Cyn3L__C.js} +1 -1
  276. package/dist/client/assets/{track-BR4OSmkP.js → track-BMoyL32N.js} +1 -1
  277. package/dist/client/assets/{types-D0iAHfi-.js → types-DHDp1Ix5.js} +1 -1
  278. package/dist/client/assets/{url-slug-CsF5_jEJ.js → url-slug-QrQmlYwX.js} +1 -1
  279. package/dist/client/assets/{usage-stats-DMZgLWXn.js → usage-stats-CC8M4nNz.js} +1 -1
  280. package/dist/client/assets/{use-ai-providers-C1zAqMn5.js → use-ai-providers-Cz8n-q9d.js} +1 -1
  281. package/dist/client/assets/{use-automations-guIq1Jf8.js → use-automations-C_6nt9Zp.js} +1 -1
  282. package/dist/client/assets/{use-autosave-KNHbArST.js → use-autosave-BgX70Gz2.js} +1 -1
  283. package/dist/client/assets/{use-chat-layout-state-DiI7M741.js → use-chat-layout-state-C60DGNO2.js} +1 -1
  284. package/dist/client/assets/{use-chat-navigation-CoFd5UE7.js → use-chat-navigation-CyFm8cEg.js} +1 -1
  285. package/dist/client/assets/{use-clock-tick-BMgzMfT6.js → use-clock-tick-BKZqeY5S.js} +1 -1
  286. package/dist/client/assets/{use-connect-companion-BNtTOOiR.js → use-connect-companion-DTmLU6ot.js} +1 -1
  287. package/dist/client/assets/{use-connection-BlwV3kYC.js → use-connection-UE8r2cKi.js} +1 -1
  288. package/dist/client/assets/{use-copy-BzyND5sN.js → use-copy-qR80P2m5.js} +1 -1
  289. package/dist/client/assets/{use-create-virtual-mcp-CRjB3w_a.js → use-create-virtual-mcp-DRMHi1dT.js} +1 -1
  290. package/dist/client/assets/{use-date-fns-locale-DHjSaunn.js → use-date-fns-locale-CoZazUfP.js} +1 -1
  291. package/dist/client/assets/{use-debounced-autosave-DzioetsZ.js → use-debounced-autosave-CYyabydu.js} +1 -1
  292. package/dist/client/assets/{use-debounced-value-Bw9XyFDS.js → use-debounced-value-XS_u63Qy.js} +1 -1
  293. package/dist/client/assets/{use-deco-credits-BwBAsZjN.js → use-deco-credits-BWgRmbgF.js} +1 -1
  294. package/dist/client/assets/{use-decopilot-events-LdqK-BR8.js → use-decopilot-events-BatPvp4V.js} +1 -1
  295. package/dist/client/assets/{use-delete-connection-B1009COB.js → use-delete-connection-VV7G6Dis.js} +1 -1
  296. package/dist/client/assets/{use-deployment-admin-DqRcHfUs.js → use-deployment-admin-DW4_2QbY.js} +1 -1
  297. package/dist/client/assets/{use-ensure-project-folder-q_3EwSkl.js → use-ensure-project-folder-D3lq0ueh.js} +1 -1
  298. package/dist/client/assets/{use-fast-preview-draft-url-BGVVIo_d.js → use-fast-preview-draft-url-mXiWjLYU.js} +1 -1
  299. package/dist/client/assets/{use-file-configs-CiMmOBPH.js → use-file-configs-B6MWoy0P.js} +1 -1
  300. package/dist/client/assets/{use-infinite-scroll-CFznRnci.js → use-infinite-scroll-BD4__gTJ.js} +1 -1
  301. package/dist/client/assets/{use-join-requests-LdDd-D1N.js → use-join-requests-IoygYkkX.js} +1 -1
  302. package/dist/client/assets/{use-main-panel-tabs-BVPkp8pd.js → use-main-panel-tabs-z1NdoakW.js} +1 -1
  303. package/dist/client/assets/{use-mcp-auth-status-BAmLODpB.js → use-mcp-auth-status-CDCKWbI3.js} +1 -1
  304. package/dist/client/assets/{use-mcp-client-CyZFCbXf.js → use-mcp-client-DaCLGUbW.js} +1 -1
  305. package/dist/client/assets/{use-mcp-prompts-hbtCEuPx.js → use-mcp-prompts-Cj8TKxv6.js} +1 -1
  306. package/dist/client/assets/{use-mcp-tools-CqwLSwPQ.js → use-mcp-tools-B_v6Xc8f.js} +1 -1
  307. package/dist/client/assets/{use-members-0uvS2aBL.js → use-members-COPm4P5W.js} +1 -1
  308. package/dist/client/assets/{use-mobile-DsnBmTih.js → use-mobile-CSIXbJHF.js} +1 -1
  309. package/dist/client/assets/{use-navigate-to-agent-e1Fty-W6.js → use-navigate-to-agent-CyIa0H8E.js} +1 -1
  310. package/dist/client/assets/use-new-blocks-editor-CFDJQWsr.js +1 -0
  311. package/dist/client/assets/{use-open-billing-url-CtVqEeze.js → use-open-billing-url-ByV0ShcL.js} +1 -1
  312. package/dist/client/assets/{use-org-auth-client--vi1jVLH.js → use-org-auth-client-DYKRjiNi.js} +1 -1
  313. package/dist/client/assets/{use-org-fs-XuRHX-wd.js → use-org-fs-DcHowQO9.js} +1 -1
  314. package/dist/client/assets/{use-org-repo-syncs-DIFvvjD1.js → use-org-repo-syncs-CpMqTwr0.js} +1 -1
  315. package/dist/client/assets/{use-org-sso-BY1EpA2d.js → use-org-sso-Bhc1WrbS.js} +1 -1
  316. package/dist/client/assets/{use-organization-roles-WaawCXoD.js → use-organization-roles-CPv4-j68.js} +1 -1
  317. package/dist/client/assets/{use-organization-settings-wIzO33y-.js → use-organization-settings-DxhpqnYO.js} +1 -1
  318. package/dist/client/assets/{use-panel-navigate-BNghtY2T.js → use-panel-navigate-B75ATwR5.js} +1 -1
  319. package/dist/client/assets/{use-project-scope-kaofAo-2.js → use-project-scope-YpfqNFMB.js} +1 -1
  320. package/dist/client/assets/{use-releases-DGpmgwQI.js → use-releases-DpsGlymp.js} +1 -1
  321. package/dist/client/assets/{use-reports-diagnostic-C5t0yrnl.js → use-reports-diagnostic-BacLoY5G.js} +1 -1
  322. package/dist/client/assets/{use-sandbox-events-DFZHFjJV.js → use-sandbox-events-BnBgyYjB.js} +1 -1
  323. package/dist/client/assets/{use-secrets-H7WJMT_o.js → use-secrets-CkRBiULT.js} +1 -1
  324. package/dist/client/assets/{use-section-preview-base-7My4H7me.js → use-section-preview-base-Bzis1rCo.js} +1 -1
  325. package/dist/client/assets/{use-tags-LkAv2_8e.js → use-tags-D6F6hDK1.js} +1 -1
  326. package/dist/client/assets/{use-task-board-analytics-DYzMdhLH.js → use-task-board-analytics-DGP81lZo.js} +1 -1
  327. package/dist/client/assets/{use-task-board-events-DFFKnQzP.js → use-task-board-events-CMdVOm7R.js} +1 -1
  328. package/dist/client/assets/{use-task-board-item-prs-DlBSKV0p.js → use-task-board-item-prs-DsMQwqER.js} +1 -1
  329. package/dist/client/assets/{use-task-board-items-GPnynZhW.js → use-task-board-items-SO19iMil.js} +1 -1
  330. package/dist/client/assets/{use-task-metadata-Bj-IbI9d.js → use-task-metadata-DSX2LZld.js} +1 -1
  331. package/dist/client/assets/{use-thread-analytics-BaY4EBEv.js → use-thread-analytics-CVouJyNf.js} +1 -1
  332. package/dist/client/assets/{use-thread-outputs-BE4mR7oi.js → use-thread-outputs-PwDDA0de.js} +1 -1
  333. package/dist/client/assets/useInfiniteQuery-C6j7p53s.js +1 -0
  334. package/dist/client/assets/{useQueries-F64PMR6y.js → useQueries-DYlwY_7i.js} +1 -1
  335. package/dist/client/assets/useSuspenseInfiniteQuery-LN6pz4nD.js +1 -0
  336. package/dist/client/assets/{users-BjFgJ7AD.js → users-CYFJuXuG.js} +1 -1
  337. package/dist/client/assets/{utils-DgqX0z1b.js → utils-VljhGZNh.js} +1 -1
  338. package/dist/client/assets/{variant-calendar-DLNhYnQf.js → variant-calendar-CmxcC_ep.js} +1 -1
  339. package/dist/client/assets/{variant-matcher-override-D3WXi6Ga.js → variant-matcher-override-wPBIsNi7.js} +1 -1
  340. package/dist/client/assets/{view-mode-toggle-0cm3AkV5.js → view-mode-toggle-Bsl9fIVT.js} +1 -1
  341. package/dist/client/assets/{virtual-mcp-C_TeGFZa.js → virtual-mcp-DUsuHWMj.js} +1 -1
  342. package/dist/client/assets/{watch-sse-pool-end_AVWu.js → watch-sse-pool-BxFXPxOj.js} +1 -1
  343. package/dist/client/index.html +1 -1
  344. package/dist/server/server.js +3 -3
  345. package/package.json +1 -1
  346. package/dist/client/assets/agent-app-BN1xlwca.js +0 -1
  347. package/dist/client/assets/agent-deck-gN98WSbp.js +0 -1
  348. package/dist/client/assets/agent-library-CxgcYBSr.js +0 -1
  349. package/dist/client/assets/agent-library-file-lpnZiokW.js +0 -1
  350. package/dist/client/assets/agent-settings-7e_XyBHe.js +0 -1
  351. package/dist/client/assets/agent-site-editor-code-yflTKEXl.js +0 -2
  352. package/dist/client/assets/agent-site-editor-preview-BgyDrf4u.js +0 -518
  353. package/dist/client/assets/agent-view-vQcOlN6j.js +0 -1
  354. package/dist/client/assets/api-keys-LZWLXizN.js +0 -1
  355. package/dist/client/assets/app-editor-B7dAjCr9.js +0 -1
  356. package/dist/client/assets/flat-project-Br0qxJS9.js +0 -1
  357. package/dist/client/assets/library-CMmULIMr.js +0 -1
  358. package/dist/client/assets/project-reports-iIDLiTtT.js +0 -1
  359. package/dist/client/assets/project-tasks-D52OJfjJ.js +0 -1
  360. package/dist/client/assets/record-editor-wVe5Wpmu.js +0 -1
  361. package/dist/client/assets/redirect-editor-D6yYqLjJ.js +0 -1
  362. package/dist/client/assets/reports-Bj-OdndV.js +0 -1
  363. package/dist/client/assets/route-3hj1gfVP.js +0 -1
  364. package/dist/client/assets/taskboard-analytics-BnPIIn86.js +0 -1
  365. package/dist/client/assets/tasks-aFMERcVH.js +0 -1
  366. package/dist/client/assets/use-new-blocks-editor-CGtkQLL-.js +0 -1
  367. package/dist/client/assets/useInfiniteQuery-D4wBC58J.js +0 -1
  368. package/dist/client/assets/useSuspenseInfiniteQuery-ZDUWj1v_.js +0 -1
@@ -1,518 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-Bhx-Ytw3.js","assets/index-DYLoE6lZ.js","assets/index-D7k-FSss.css","assets/chat-context-oLIKqlGE.js","assets/use-panel-navigate-BNghtY2T.js","assets/thread-route-md0irSaA.js","assets/use-project-scope-kaofAo-2.js","assets/repository-binding-4wb1SqGi.js","assets/use-mcp-client-CyZFCbXf.js","assets/auth-CFVKU9If.js","assets/autosend-DqvDhR1V.js","assets/thread-intent-Cv8T2W7d.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-end_AVWu.js","assets/task-board-jYYT4T-P.js","assets/schema-B7T6zvOr.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-LdqK-BR8.js","assets/use-ai-providers-C1zAqMn5.js","assets/use-chat-navigation-CoFd5UE7.js","assets/location-BjlyegC2.js","assets/use-organization-settings-wIzO33y-.js","assets/use-new-blocks-editor-CGtkQLL-.js","assets/runnable-block-editor-Cq2CDyKN.js","assets/input-Bv9QfIGh.js","assets/usage-stats-DMZgLWXn.js","assets/tool-namespace-NA4CQCu7.js","assets/form-CZcQhZCa.js","assets/label-COS7xlc4.js","assets/utils-CVEq3hMx.js","assets/markdown-FpxtcMsE.js","assets/use-copy-BzyND5sN.js","assets/Copy01-BdyOQaoT.js","assets/ZoomOut-D4nHzX79.js","assets/use-mobile-DsnBmTih.js","assets/tooltip-D0bgPl8K.js","assets/index-Cql9s2oo.js","assets/agent-icon-CAaO4ypa.js","assets/AlertCircle-xh90NARB.js","assets/Tool01-DG06N0su.js","assets/ArrowUp-4iK8zoCx.js","assets/ArrowLeft-Xffg7q8p.js","assets/LinkBroken01-wTJMvAdz.js","assets/ShoppingBag01-BJ4cJNkc.js","assets/Building02-DAEF4UrO.js","assets/CheckCircle-DUpC1qQ4.js","assets/ChevronUp-D_Wjh1Pp.js","assets/ChevronSelectorVertical-DCkH1mIQ.js","assets/UserSquare-B7AJhMXA.js","assets/CreditCard01-YN58MJQp.js","assets/DotsVertical-C0q218c1.js","assets/Image01-Drnu_oTX.js","assets/Globe04-brrhloqP.js","assets/SwitchHorizontal01-6WEEE86B.js","assets/Key01-DXKey19o.js","assets/Link01-DAwi9mlM.js","assets/Monitor01-Bm_bTKyL.js","assets/Sun-D0UkgT29.js","assets/Play-CqIDE5zC.js","assets/Plus-j4aDTi8e.js","assets/SearchMd-DhQxjm00.js","assets/Trash01-C9lhbJs7.js","assets/Upload01-Bt337Shk.js","assets/User01-DXN8J2dA.js","assets/Users01-CHS_3A2d.js","assets/XClose-pteQuwAH.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-DbTR-7FA.js","assets/file-type-icon-OOS78AjU.js","assets/shell-layout-BYblzqjk.js","assets/avatar-DC1Cmzej.js","assets/use-clock-tick-BMgzMfT6.js","assets/command-fqp-0b5f.js","assets/index-DcG5TBas.js","assets/integration-icon-CDrootbG.js","assets/project-icon-C-N3cJkz.js","assets/new-project-dialog-Bytx7uX5.js","assets/repository-import-picker-DgjVp-Rp.js","assets/use-navigate-to-agent-e1Fty-W6.js","assets/repository-picker-Dhir_mBD.js","assets/useInfiniteQuery-D4wBC58J.js","assets/infiniteQueryObserver-C-FPZrNN.js","assets/collection-search-CacvIdKe.js","assets/use-debounced-value-Bw9XyFDS.js","assets/required-auth-layout-rplY5gMF.js","assets/use-org-sso-BY1EpA2d.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-Cgc2XQsH.js","assets/select-BTxDOmEz.js","assets/index-BdQq_4o_.js","assets/tabs-DsQwfF9n.js","assets/use-deco-credits-BwBAsZjN.js","assets/toggle-group-MxDdKb-A.js","assets/use-open-billing-url-CtVqEeze.js","assets/index-C9YSJ0Pi.js","assets/checkbox-DZ-_DOro.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-CsrTLLWE.js","assets/drawer-BMuDp3pZ.js","assets/input-B0wYSpb2.js","assets/suggestion-yrhgs0c3.js","assets/use-chat-layout-state-DiI7M741.js","assets/use-file-configs-CiMmOBPH.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-hbtCEuPx.js","assets/use-org-fs-XuRHX-wd.js","assets/question-004-sINsf4GQ.js","assets/use-members-0uvS2aBL.js","assets/use-org-auth-client--vi1jVLH.js","assets/feature-paywall-D03mknXg.js","assets/plan-ladder-ByxenYnr.js","assets/add-connection-dialog-BXB3P-4X.js","assets/extract-connection-data-DU6Jox_T.js","assets/metadata-D72DunRR.js","assets/connection-BCelELHr.js","assets/url-slug-CsF5_jEJ.js","assets/connection-card-BWXrChNc.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-CXxxIkE2.js","assets/use-connection-BlwV3kYC.js","assets/connection-form-helpers-DCUMal7M.js","assets/authenticate-and-persist-oauth-C4TrLSCm.js","assets/mcp-oauth-_2kQOfTH.js","assets/mcp-oauth-hlA0Q-1K.js","assets/collection-tabs-ywProb31.js","assets/badge-C85ocGTA.js","assets/use-infinite-scroll-CFznRnci.js","assets/useSuspenseInfiniteQuery-ZDUWj1v_.js","assets/use-task-board-events-DFFKnQzP.js","assets/input-Bwd_JSM8.css","assets/claim-phase-copy--pyKC4gk.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-DfD0HGLO.js","assets/collapsible-D6DR3zQ4.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-oNRSzgIY.js","assets/types-D0iAHfi-.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-B-Hh_nak.js","assets/use-thread-outputs-BE4mR7oi.js","assets/utils-DgqX0z1b.js","assets/scroll-area-C9CkDOV0.js","assets/monaco-editor-DOjflLD3.js","assets/editor-Dq4IMcxm.js","assets/calendar-BUi8IxeZ.js","assets/rich-text-link-control-BlJN8nO0.js","assets/switch-Bv7OaKpB.js","assets/core.esm-C2_DCN6Y.js","assets/sortable.esm-BcPKBoEH.js","assets/combobox-DOrn42oJ.js","assets/alert-dialog-DhiFzLmM.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-CSa-vO3l.js","assets/asset-utils-RYK8HJ3w.js","assets/sandbox-git-api-C7JbVL7R.js","assets/mustache-CUJOpa04.js","assets/page-seo-form-Ba1SWsx7.js","assets/use-section-preview-base-7My4H7me.js","assets/section-preview-url-7zfngvgW.js","assets/variant-matcher-override-D3WXi6Ga.js"])))=>i.map(i=>d[i]);
2
- import{r as x,aD as kt,aW as He,aE as Se,c as pe,b as Te,j as s,q as In,D as Un,K as zs,s as Hn,v as Vn,e as Is,h as Pt,I as Pn,B as De,w as Us,a6 as qn,aX as Hs,a2 as Qt,aY as Vs,aV as qs,l as Dt,P as Sn,y as Ws,t as jn}from"./index-DYLoE6lZ.js";import{A as Gs}from"./agent-view-guard-1XKy1jVJ.js";import{F as Js}from"./feature-gate-BZc24_E5.js";import{a as Ys,b as St,r as Wn,l as Gn,f as Qs,w as Xs}from"./chat-context-oLIKqlGE.js";import{t as Zs}from"./ChevronUp-D_Wjh1Pp.js";import{I as Jn,R as er,S as tr,d as nr,T as sr,U as rr,V as ar,W as ir,X as En,K as or}from"./agent-icon-CAaO4ypa.js";import{a as lr}from"./UserSquare-B7AJhMXA.js";import{s as cr}from"./Plus-j4aDTi8e.js";import{P as dr,a as ur,b as mr}from"./popover-CsrTLLWE.js";import{e as st,b as rt,c as Yn,f as Qn,C as Xn,a as Zn}from"./command-fqp-0b5f.js";import{c as fr,a as pr}from"./repository-binding-4wb1SqGi.js";import{b as Xt}from"./sandbox-lifecycle-context-qUf8Q_Xq.js";import{e as hr}from"./backoff-CrEUbyZT.js";import{f as gr}from"./thread-intent-Cv8T2W7d.js";import{a as es}from"./input-Bv9QfIGh.js";import{N as vr,c as br,s as at,n as Zt,d as ts,f as Be,v as ns,h as xr,u as yr,j as wr,k as kr,l as Pr,m as Sr,o as Nn}from"./claim-phase-copy--pyKC4gk.js";import{u as jr}from"./use-mobile-DsnBmTih.js";import{b as Kt,T as zt,a as It}from"./tooltip-D0bgPl8K.js";import{T as Ze}from"./toolbar-icon-button-DfPVpCUn.js";import{b as Er,a as Nr,u as ss,g as Tr,c as Cr,B as Ut,P as Rr,r as Lr,R as Or,d as _r,e as en,f as rs,h as Ar,i as Br,j as $r,l as Fr,m as Mr,p as Dr,k as Kr,S as Ht}from"./runnable-block-editor-Cq2CDyKN.js";import{w as bt,i as zr}from"./variant-matcher-override-D3WXi6Ga.js";import{r as Ir,w as Ur,D as Hr,b as Tn,a as Vr}from"./section-preview-url-7zfngvgW.js";import{u as qr}from"./use-fast-preview-draft-url-BGVVIo_d.js";import{u as Wr,w as Cn}from"./device-hint-DA_uRg_p.js";import{a as Gr,c as as}from"./shell-layout-BYblzqjk.js";import{u as is,b as Jr}from"./use-sandbox-events-DFZHFjJV.js";import{u as Gt}from"./useQueries-F64PMR6y.js";import{i as Yr}from"./LinkBroken01-wTJMvAdz.js";import{u as os}from"./blocks-preview-workspace-context-6ZMkVqw_.js";import{i as Qr}from"./AlertCircle-xh90NARB.js";import{E as tn}from"./empty-state-DvEOfDhm.js";import{M as Xr}from"./monaco-editor-DOjflLD3.js";import{u as Zr}from"./use-new-blocks-editor-CGtkQLL-.js";import{a as ea}from"./utils-DgqX0z1b.js";import{R as Rn,a as xt,b as Ln}from"./resizable-CYDmoKgw.js";import{r as ta}from"./virtual-mcp-C_TeGFZa.js";import{d as na}from"./delay-CnY5UFtP.js";import{a as Vt}from"./use-chat-layout-state-DiI7M741.js";import{G as On}from"./repository-picker-Dhir_mBD.js";import{R as sa}from"./repository-import-picker-DgjVp-Rp.js";import{r as ra}from"./use-main-panel-tabs-BVPkp8pd.js";import{u as aa}from"./use-task-metadata-Bj-IbI9d.js";import{b as ia}from"./thread-route-md0irSaA.js";import"./use-panel-navigate-BNghtY2T.js";import"./use-project-scope-kaofAo-2.js";import"./feature-paywall-D03mknXg.js";import"./plan-ladder-ByxenYnr.js";import"./use-decopilot-events-LdqK-BR8.js";import"./watch-sse-pool-end_AVWu.js";import"./task-board-jYYT4T-P.js";import"./schema-B7T6zvOr.js";import"./autosend-DqvDhR1V.js";import"./use-mcp-client-CyZFCbXf.js";import"./auth-CFVKU9If.js";import"./use-ai-providers-C1zAqMn5.js";import"./use-chat-navigation-CoFd5UE7.js";import"./location-BjlyegC2.js";import"./use-organization-settings-wIzO33y-.js";import"./Tool01-DG06N0su.js";import"./ArrowUp-4iK8zoCx.js";import"./ArrowLeft-Xffg7q8p.js";import"./ShoppingBag01-BJ4cJNkc.js";import"./ZoomOut-D4nHzX79.js";import"./Building02-DAEF4UrO.js";import"./CheckCircle-DUpC1qQ4.js";import"./ChevronSelectorVertical-DCkH1mIQ.js";import"./Copy01-BdyOQaoT.js";import"./CreditCard01-YN58MJQp.js";import"./DotsVertical-C0q218c1.js";import"./Image01-Drnu_oTX.js";import"./Globe04-brrhloqP.js";import"./SwitchHorizontal01-6WEEE86B.js";import"./Key01-DXKey19o.js";import"./Link01-DAwi9mlM.js";import"./Monitor01-Bm_bTKyL.js";import"./Sun-D0UkgT29.js";import"./Play-CqIDE5zC.js";import"./SearchMd-DhQxjm00.js";import"./Trash01-C9lhbJs7.js";import"./Upload01-Bt337Shk.js";import"./User01-DXN8J2dA.js";import"./Users01-CHS_3A2d.js";import"./XClose-pteQuwAH.js";import"./index-DcG5TBas.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./usage-stats-DMZgLWXn.js";import"./tool-namespace-NA4CQCu7.js";import"./form-CZcQhZCa.js";import"./label-COS7xlc4.js";import"./utils-CVEq3hMx.js";import"./markdown-FpxtcMsE.js";import"./use-copy-BzyND5sN.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-DbTR-7FA.js";import"./file-type-icon-OOS78AjU.js";import"./chat-draft-Cgc2XQsH.js";import"./select-BTxDOmEz.js";import"./index-BdQq_4o_.js";import"./index-Cql9s2oo.js";import"./tabs-DsQwfF9n.js";import"./use-deco-credits-BwBAsZjN.js";import"./toggle-group-MxDdKb-A.js";import"./use-open-billing-url-CtVqEeze.js";import"./index-C9YSJ0Pi.js";import"./checkbox-DZ-_DOro.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DC1Cmzej.js";import"./drawer-BMuDp3pZ.js";import"./input-B0wYSpb2.js";import"./suggestion-yrhgs0c3.js";import"./use-mcp-prompts-hbtCEuPx.js";import"./use-org-fs-XuRHX-wd.js";import"./useInfiniteQuery-D4wBC58J.js";import"./infiniteQueryObserver-C-FPZrNN.js";import"./question-004-sINsf4GQ.js";import"./use-members-0uvS2aBL.js";import"./use-org-auth-client--vi1jVLH.js";import"./add-connection-dialog-BXB3P-4X.js";import"./collection-search-CacvIdKe.js";import"./extract-connection-data-DU6Jox_T.js";import"./metadata-D72DunRR.js";import"./connection-BCelELHr.js";import"./url-slug-CsF5_jEJ.js";import"./connection-card-BWXrChNc.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-CDrootbG.js";import"./textarea-CXxxIkE2.js";import"./use-connection-BlwV3kYC.js";import"./connection-form-helpers-DCUMal7M.js";import"./authenticate-and-persist-oauth-C4TrLSCm.js";import"./mcp-oauth-_2kQOfTH.js";import"./mcp-oauth-hlA0Q-1K.js";import"./collection-tabs-ywProb31.js";import"./badge-C85ocGTA.js";import"./use-infinite-scroll-CFznRnci.js";import"./useSuspenseInfiniteQuery-ZDUWj1v_.js";import"./use-task-board-events-DFFKnQzP.js";import"./pair-DfD0HGLO.js";import"./collapsible-D6DR3zQ4.js";import"./use-clock-tick-BMgzMfT6.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-oNRSzgIY.js";import"./types-D0iAHfi-.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-B-Hh_nak.js";import"./use-navigate-to-agent-e1Fty-W6.js";import"./use-thread-outputs-BE4mR7oi.js";import"./scroll-area-C9CkDOV0.js";import"./calendar-BUi8IxeZ.js";import"./rich-text-link-control-BlJN8nO0.js";import"./switch-Bv7OaKpB.js";import"./core.esm-C2_DCN6Y.js";import"./sortable.esm-BcPKBoEH.js";import"./combobox-DOrn42oJ.js";import"./alert-dialog-DhiFzLmM.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-CSa-vO3l.js";import"./use-debounced-value-Bw9XyFDS.js";import"./use-file-configs-CiMmOBPH.js";import"./asset-utils-RYK8HJ3w.js";import"./sandbox-git-api-C7JbVL7R.js";import"./project-icon-C-N3cJkz.js";import"./new-project-dialog-Bytx7uX5.js";import"./required-auth-layout-rplY5gMF.js";import"./use-org-sso-BY1EpA2d.js";import"./editor-Dq4IMcxm.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-tools-CqwLSwPQ.js";import"./resolve-tab-icon-CIzsgPiq.js";const oa={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function la(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,l=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?oa:r&&i&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const ca=1e4,da=1e3,ua=3e4;function ma({iframeRef:t,src:e,active:n}){const r=x.useRef(0),i=x.useRef(null),u=x.useRef(null),l=x.useRef(e),c=x.useRef(n);l.current=e,c.current=n;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},ca)},h=()=>{if(!c.current||!l.current)return;u.current&&clearTimeout(u.current);const j=hr(ua,da,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,E=l.current;!g||!E||!c.current||(g.src=E,d())},j)},m=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return x.useEffect(()=>{if(o(),r.current=0,!(!n||!e))return d(),o},[e,n]),{handleLoad:m,handleError:p}}const fa=kt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:kt({width:He(),height:He()}),position:kt({x:He(),y:He()})}),pa=`(function() {
3
- if (window.__visualEditorActive) return;
4
- window.__visualEditorActive = true;
5
-
6
- var cursorStyle = document.createElement("style");
7
- cursorStyle.textContent = "* { cursor: default !important; }";
8
- document.head.appendChild(cursorStyle);
9
-
10
- var highlight = document.createElement("div");
11
- highlight.style.cssText = "position:fixed;pointer-events:none;outline:2px solid #a855f7;background:rgba(168,85,247,0.08);border-radius:2px;z-index:2147483647;display:none;";
12
- document.body.appendChild(highlight);
13
-
14
- var badge = document.createElement("div");
15
- badge.style.cssText = "position:fixed;pointer-events:none;background:#a855f7;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
16
- document.body.appendChild(badge);
17
-
18
- var lastTarget = null;
19
- var rafPending = false;
20
- var moveHandler = function(e) {
21
- if (rafPending) return;
22
- rafPending = true;
23
- var target = e.target;
24
- requestAnimationFrame(function() {
25
- rafPending = false;
26
- var el = target;
27
- if (!el || el === highlight || el === badge) return;
28
- if (el === lastTarget) return;
29
- lastTarget = el;
30
- var r = el.getBoundingClientRect();
31
- highlight.style.display = "block";
32
- highlight.style.top = r.top + "px";
33
- highlight.style.left = r.left + "px";
34
- highlight.style.width = r.width + "px";
35
- highlight.style.height = r.height + "px";
36
- var tag = el.tagName.toLowerCase();
37
- var id = el.id ? "#" + el.id : "";
38
- var cls = el.className && typeof el.className === "string"
39
- ? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
40
- : "";
41
- badge.textContent = tag + id + cls;
42
- badge.style.display = "block";
43
- badge.style.top = Math.max(0, r.top - 20) + "px";
44
- badge.style.left = r.left + "px";
45
- });
46
- };
47
- document.addEventListener("mousemove", moveHandler, true);
48
-
49
- var outHandler = function(e) {
50
- if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
51
- highlight.style.display = "none";
52
- badge.style.display = "none";
53
- lastTarget = null;
54
- }
55
- };
56
- document.addEventListener("mouseout", outHandler, true);
57
-
58
- var clickHandler = function(e) {
59
- e.preventDefault();
60
- e.stopImmediatePropagation();
61
- var el = e.target;
62
- if (!el || el === highlight || el === badge) return;
63
-
64
- highlight.style.outline = "2px solid #a855f7";
65
- highlight.style.background = "rgba(168,85,247,0.15)";
66
- setTimeout(function() {
67
- highlight.style.outline = "2px solid #a855f7";
68
- highlight.style.background = "rgba(168,85,247,0.08)";
69
- }, 400);
70
-
71
- var tag = el.tagName.toLowerCase();
72
- var id = el.id || "";
73
- var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
74
- var text = (el.textContent || "").trim().slice(0, 200);
75
- var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
76
-
77
- var closestSection = el.closest("section[data-manifest-key]");
78
- var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
79
-
80
- var ancestor = el;
81
- var componentName = null;
82
- for (var i = 0; i < 10 && ancestor; i++) {
83
- if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
84
- ancestor = ancestor.parentElement;
85
- }
86
-
87
- var parents = [];
88
- var p = el.parentElement;
89
- for (var j = 0; j < 4 && p && p !== document.body; j++) {
90
- var pTag = p.tagName ? p.tagName.toLowerCase() : "";
91
- var pId = p.id ? "#" + p.id : "";
92
- var pCls = p.className && typeof p.className === "string"
93
- ? "." + p.className.trim().split(/\\s+/)[0]
94
- : "";
95
- parents.unshift(pTag + pId + pCls);
96
- p = p.parentElement;
97
- }
98
-
99
- window.parent.postMessage({
100
- type: "visual-editor::element-clicked",
101
- payload: {
102
- tag: tag, id: id, classes: classes, text: text, html: html,
103
- manifestKey: manifestKey, componentName: componentName,
104
- parents: parents.join(" > "),
105
- url: window.location.href, path: window.location.pathname,
106
- viewport: { width: window.innerWidth, height: window.innerHeight },
107
- position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
108
- }
109
- }, "*");
110
- };
111
- document.addEventListener("click", clickHandler, true);
112
-
113
- window.addEventListener("message", function(e) {
114
- // Only Studio's own postMessage (source === this frame's parent) may drive the bridge — a nested/downstream frame's forged message can't deactivate the editor.
115
- if (e.source !== window.parent) return;
116
- // Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
117
- if (e.data && e.data.type === "visual-editor::clear-hover") {
118
- highlight.style.display = "none";
119
- badge.style.display = "none";
120
- lastTarget = null;
121
- return;
122
- }
123
- if (e.data && e.data.type === "visual-editor::deactivate") {
124
- highlight.remove();
125
- badge.remove();
126
- cursorStyle.remove();
127
- document.removeEventListener("mousemove", moveHandler, true);
128
- document.removeEventListener("mouseout", outHandler, true);
129
- document.removeEventListener("click", clickHandler, true);
130
- window.__visualEditorActive = false;
131
- }
132
- });
133
- })();`;function ha(t,e){const n=t.map(()=>null),r=[];for(let p=0;p<t.length;p++)t[p]!==null&&r.push(p);const i=r.length,u=e.length;if(!i||!u)return n;const l=(p,j)=>{const g=t[r[p]??0];return!g||!g.length?1:g.indexOf(e[j]??"")>=0?2:0},c=[],o=[];for(let p=0;p<=i;p++)c.push(new Array(u+1).fill(0)),o.push(new Array(u+1).fill(2));for(let p=1;p<=i;p++){const j=c[p-1]??[],g=c[p]??[],E=o[p]??[];for(let b=1;b<=u;b++){let w=j[b]??0,N=2;const y=g[b-1]??0;y>w&&(w=y,N=0);const v=l(p-1,b-1),k=(j[b-1]??0)+v;v>0&&k>w&&(w=k,N=1),g[b]=w,E[b]=N}}let d=0,h=i,m=u;for(;h>0&&m>0;){const p=o[h]?.[m]??2;p===1?(n[r[h-1]??0]=m-1,d++,h--,m--):p===0?m--:h--}if(d===0&&u===i)for(let p=0;p<i;p++)n[r[p]??0]=p;return n}const ga=kt({sectionIndex:He(),manifestKey:Se(),clickSeq:He()}),_n=`(function() {
134
- if (window.__cmsEditorActive) return;
135
- window.__cmsEditorActive = true;
136
-
137
- // Preserve scroll across variant-override navigations and save-reloads.
138
- // Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
139
- // or reloads it, which would otherwise jump to the top. We persist the scroll
140
- // offset to sessionStorage (survives reload, same-origin) keyed by pathname
141
- // (the override only changes the query, so the key is stable), then restore it
142
- // on the next load — retried for ~1s so it outlasts re-hydration and lazy
143
- // sections that grow the page after load. The recency guard avoids restoring a
144
- // stale offset on a genuinely fresh visit.
145
- var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
146
- var saveScroll = function() {
147
- try {
148
- sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
149
- x: window.scrollX, y: window.scrollY, t: Date.now()
150
- }));
151
- } catch (_) {}
152
- };
153
- var saveScrollPending = false;
154
- window.addEventListener("scroll", function() {
155
- if (saveScrollPending) return;
156
- saveScrollPending = true;
157
- requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
158
- }, { passive: true });
159
- (function restoreScroll() {
160
- var raw = null;
161
- try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
162
- if (!raw) return;
163
- var saved = null;
164
- try { saved = JSON.parse(raw); } catch (_) { return; }
165
- if (!saved || (Date.now() - saved.t) > 10000) return;
166
- if (!saved.x && !saved.y) return;
167
- var attempts = 0;
168
- var apply = function() {
169
- attempts++;
170
- window.scrollTo(saved.x || 0, saved.y || 0);
171
- if (attempts < 8) setTimeout(apply, 120);
172
- };
173
- apply();
174
- })();
175
-
176
- var highlight = document.createElement("div");
177
- highlight.style.cssText = "position:absolute;pointer-events:none;outline:2px solid #06b6d4;background:rgba(6,182,212,0.06);border-radius:2px;z-index:2147483647;display:none;";
178
- document.body.appendChild(highlight);
179
-
180
- var badge = document.createElement("div");
181
- badge.style.cssText = "position:absolute;pointer-events:none;background:#06b6d4;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
182
- document.body.appendChild(badge);
183
-
184
- var isTopLevelSection = function(el) {
185
- return el && el.parentElement
186
- ? !el.parentElement.closest("section[data-manifest-key]")
187
- : true;
188
- };
189
-
190
- // All top-level page sections in DOM order (deco renders page sections as
191
- // <section data-manifest-key>; nested islands/sections carry the attribute
192
- // too, hence the top-level filter). This is the full DOM run, framework
193
- // sections included — getAllSections() narrows it to the editable window.
194
- var topLevelSections = function() {
195
- return Array.from(document.querySelectorAll("section[data-manifest-key]"))
196
- .filter(isTopLevelSection);
197
- };
198
-
199
- // Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
200
- var sectionCandidates = [];
201
-
202
- // Stringified from section-alignment.ts so both sides share one copy.
203
- var alignSections = ${ha.toString()};
204
-
205
- // Indexed like the decofile array; unmapped entries stay null (not clickable).
206
- var computeAlignment = function(tops) {
207
- var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
208
- return alignSections(sectionCandidates, domKeys).map(function(idx) {
209
- return idx === null ? null : tops[idx];
210
- });
211
- };
212
-
213
- // Editable sections, indexed to match the decofile array the panel uses.
214
- // Recomputed from the live DOM each call (cheap, rAF-throttled) so it
215
- // self-heals as client-rendered/lazy sections mount. Until the editor sends
216
- // candidates, fall back to the full top-level run.
217
- var getAllSections = function() {
218
- var tops = topLevelSections();
219
- return sectionCandidates.length ? computeAlignment(tops) : tops;
220
- };
221
-
222
- // Resolve to the OUTERMOST page-level section (clicking nested content still
223
- // maps to the top-level section the panel indexes); null if it isn't in the
224
- // aligned editable set (a framework section deco injected).
225
- var findSection = function(el, out) {
226
- var node = el;
227
- var found = null;
228
- while (node && node !== document.body) {
229
- if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
230
- found = node;
231
- }
232
- node = node.parentElement;
233
- }
234
- if (!found) return null;
235
- var sections = getAllSections();
236
- if (out) out.sections = sections;
237
- return sections.indexOf(found) >= 0 ? found : null;
238
- };
239
-
240
- // A Lazy wrapper's key is just the loader — show the inner section's instead.
241
- var LAZY_KEYS = [
242
- "website/sections/Rendering/Lazy.tsx",
243
- "website/sections/Rendering/SingleDeferred.tsx"
244
- ];
245
- var isLazyKey = function(key) {
246
- return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
247
- };
248
- var displayKey = function(section) {
249
- var key = section.getAttribute("data-manifest-key") || "section";
250
- if (isLazyKey(key)) {
251
- var inner = section.querySelector("section[data-manifest-key]");
252
- if (inner) return inner.getAttribute("data-manifest-key") || key;
253
- }
254
- return key;
255
- };
256
-
257
- // Per-section metadata sent by the editor, aligned by index with
258
- // getAllSections(). labels: names the DOM can't carry (a global section or a
259
- // global inside async rendering); kinds: section type that drives the color.
260
- var sectionLabels = [];
261
- var sectionKinds = [];
262
- var labelFor = function(section, sections) {
263
- var idx = (sections || getAllSections()).indexOf(section);
264
- if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
265
- return displayKey(section);
266
- };
267
- var kindFor = function(section, sections) {
268
- var idx = (sections || getAllSections()).indexOf(section);
269
- return (idx >= 0 && sectionKinds[idx]) || "normal";
270
- };
271
-
272
- // Highlight palette by section kind: global = light purple, variant = green,
273
- // normal = blue.
274
- var COLORS = {
275
- normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
276
- global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
277
- variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
278
- };
279
- var applyColor = function(kind) {
280
- var c = COLORS[kind] || COLORS.normal;
281
- highlight.style.outline = "2px solid " + c.solid;
282
- highlight.style.background = c.bg;
283
- badge.style.background = c.solid;
284
- };
285
-
286
- var lastSection = null;
287
- var lastLabel = "";
288
- var lastKind = "normal";
289
- var rafPending = false;
290
- // True while an in-place render fetch/swap is in flight; suppresses hover so it can't re-show the overlay right before the swap snapshots it.
291
- var renderPending = false;
292
-
293
- // Document-relative coordinates (rect + scroll) on absolutely-positioned
294
- // nodes, so the browser scrolls the highlight together with the page
295
- // natively — no per-frame JS repositioning, no scroll lag.
296
- var positionHighlight = function(section) {
297
- var r = section.getBoundingClientRect();
298
- var top = r.top + window.scrollY;
299
- var left = r.left + window.scrollX;
300
- highlight.style.display = "block";
301
- highlight.style.top = top + "px";
302
- highlight.style.left = left + "px";
303
- highlight.style.width = r.width + "px";
304
- highlight.style.height = r.height + "px";
305
- badge.textContent = lastLabel || displayKey(section);
306
- badge.style.display = "block";
307
- badge.style.top = Math.max(0, top - 20) + "px";
308
- badge.style.left = left + "px";
309
- };
310
-
311
- var moveHandler = function(e) {
312
- if (renderPending || rafPending) return;
313
- rafPending = true;
314
- var target = e.target;
315
- requestAnimationFrame(function() {
316
- rafPending = false;
317
- if (renderPending) return;
318
- if (!target || target === highlight || target === badge) return;
319
- var out = {};
320
- var section = findSection(target, out);
321
- if (section === lastSection) return;
322
- lastSection = section;
323
- if (!section) {
324
- highlight.style.display = "none";
325
- badge.style.display = "none";
326
- return;
327
- }
328
- lastLabel = labelFor(section, out.sections);
329
- lastKind = kindFor(section, out.sections);
330
- applyColor(lastKind);
331
- positionHighlight(section);
332
- });
333
- };
334
- document.addEventListener("mousemove", moveHandler, true);
335
-
336
- // Window scroll is handled natively by the absolute positioning above; this
337
- // only re-syncs on resize and on scrolls inside nested scroll containers
338
- // (capture=true catches those), where document coordinates do shift.
339
- var reposition = function() {
340
- if (!lastSection || highlight.style.display === "none") return;
341
- if (rafPending) return;
342
- rafPending = true;
343
- requestAnimationFrame(function() {
344
- rafPending = false;
345
- if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
346
- });
347
- };
348
- window.addEventListener("scroll", reposition, { capture: true, passive: true });
349
- window.addEventListener("resize", reposition, { passive: true });
350
-
351
- var outHandler = function(e) {
352
- if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
353
- highlight.style.display = "none";
354
- badge.style.display = "none";
355
- lastSection = null;
356
- }
357
- };
358
- document.addEventListener("mouseout", outHandler, true);
359
-
360
- var clickSeq = 0;
361
-
362
- // Blocks observes clicks to select sections in the side panel; it must not
363
- // cancel the iframe page's own handlers or native control behavior.
364
- var clickHandler = function(e) {
365
- var target = e.target;
366
- if (!target || target === highlight || target === badge) return;
367
- var out = {};
368
- var section = findSection(target, out);
369
- if (!section) return;
370
-
371
- var sectionIndex = out.sections.indexOf(section);
372
- var manifestKey = section.getAttribute("data-manifest-key") || "";
373
-
374
- var c = COLORS[lastKind] || COLORS.normal;
375
- highlight.style.outline = "2px solid " + c.solid;
376
- highlight.style.background = c.active;
377
- setTimeout(function() {
378
- highlight.style.background = c.bg;
379
- }, 400);
380
-
381
- clickSeq++;
382
- window.parent.postMessage({
383
- type: "cms-editor::section-clicked",
384
- payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
385
- }, "*");
386
- };
387
- document.addEventListener("click", clickHandler, true);
388
-
389
- /**
390
- * Navigation is disabled while editing: leaving the page would leave the
391
- * panel editing the previous page's sections. Only the default action of a
392
- * real navigation is cancelled, never propagation — in-page controls must
393
- * keep working (#5567).
394
- */
395
- var isNavigatingAnchor = function(a) {
396
- if (!a) return false;
397
- var href = a.getAttribute("href");
398
- if (!href) return false;
399
- var trimmed = href.trim();
400
- if (!trimmed || trimmed.charAt(0) === "#") return false;
401
- if (/^javascript:/i.test(trimmed)) return false;
402
- // Same document + fragment only scrolls.
403
- try {
404
- var url = new URL(a.href, location.href);
405
- if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
406
- } catch (_) {}
407
- return true;
408
- };
409
- var navBlocker = function(e) {
410
- var el = e.target;
411
- var a = el && el.closest ? el.closest("a") : null;
412
- if (!isNavigatingAnchor(a)) return;
413
- e.preventDefault();
414
- };
415
- document.addEventListener("click", navBlocker, true);
416
-
417
- var submitBlocker = function(e) { e.preventDefault(); };
418
- document.addEventListener("submit", submitBlocker, true);
419
-
420
- // Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
421
- var renderCtrl = null;
422
- var renderQueue = Promise.resolve();
423
- var TRANSITION_TAG =
424
- "<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
425
- var renderInPlace = function(src, body) {
426
- if (renderCtrl) renderCtrl.abort();
427
- var ctrl = new AbortController();
428
- renderCtrl = ctrl;
429
- renderPending = true;
430
- highlight.style.display = "none";
431
- badge.style.display = "none";
432
- window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
433
- renderQueue = renderQueue.then(function() {
434
- return fetch(src, {
435
- method: "POST",
436
- body: body,
437
- signal: ctrl.signal,
438
- headers: { accept: "text/html", "content-type": "application/json" }
439
- }).then(function(res) {
440
- if (!res.ok) throw new Error("render " + res.status);
441
- return res.text();
442
- }).then(function(html) {
443
- var swap = function() {
444
- document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
445
- document.body.appendChild(highlight);
446
- document.body.appendChild(badge);
447
- // Old section is gone; hide the overlay until the next hover repositions it.
448
- highlight.style.display = "none";
449
- badge.style.display = "none";
450
- lastSection = null;
451
- };
452
- var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
453
- var doc = new DOMParser().parseFromString(headHtml, "text/html");
454
- var sheets = Array.prototype.map.call(
455
- doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
456
- function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
457
- );
458
- return Promise.all(sheets).then(function() {
459
- if (typeof document.startViewTransition === "function") {
460
- return document.startViewTransition(swap).finished;
461
- }
462
- swap();
463
- });
464
- }).then(function() {
465
- var t = document.getElementById("deco-disable-transitions");
466
- if (t) t.remove();
467
- if (ctrl === renderCtrl) renderPending = false;
468
- window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
469
- }).catch(function(err) {
470
- if (ctrl === renderCtrl) renderPending = false;
471
- if (err && err.name === "AbortError") return;
472
- window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
473
- });
474
- });
475
- };
476
-
477
- window.addEventListener("message", function(e) {
478
- // Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
479
- if (e.source !== window.parent) return;
480
- if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
481
- renderInPlace(e.data.src, e.data.body);
482
- return;
483
- }
484
- if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
485
- sectionLabels = e.data.labels;
486
- if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
487
- if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
488
- if (lastSection) {
489
- lastLabel = labelFor(lastSection);
490
- lastKind = kindFor(lastSection);
491
- applyColor(lastKind);
492
- if (highlight.style.display !== "none") positionHighlight(lastSection);
493
- }
494
- return;
495
- }
496
- // Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
497
- if (e.data && e.data.type === "cms-editor::clear-hover") {
498
- highlight.style.display = "none";
499
- badge.style.display = "none";
500
- lastSection = null;
501
- return;
502
- }
503
- if (e.data && e.data.type === "cms-editor::deactivate") {
504
- highlight.remove();
505
- badge.remove();
506
- document.removeEventListener("mousemove", moveHandler, true);
507
- document.removeEventListener("mouseout", outHandler, true);
508
- document.removeEventListener("click", clickHandler, true);
509
- // Or the page stays unnavigable after leaving Blocks mode.
510
- document.removeEventListener("click", navBlocker, true);
511
- document.removeEventListener("submit", submitBlocker, true);
512
- window.removeEventListener("scroll", reposition, { capture: true });
513
- window.removeEventListener("resize", reposition);
514
- window.__cmsEditorActive = false;
515
- }
516
- });
517
- })();`;function Jt(t,e){let n=t,r=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const l=u.__resolveType;if(typeof l=="string"&&l&&l!==r){n=u,r=l;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(n.variants)?n.variants:[];if(i.length===0||i.every(c=>c?.rule?.__resolveType===vr))return null;const l=[];for(const c of i){const o=c?.value;if(o&&typeof o=="object")for(const d of Jt(o,e)??[])l.includes(d)||l.push(d)}return l}if(br(r)){const i=n.section&&typeof n.section=="object"?Jt(n.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Ue(t){return t.replace(/[`*_]/g,"\\$&")}function va(t,e){const n=[`The user selected an element on the live preview and asked: **"${Ue(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&n.push(`**Section resolveType:** \`${Ue(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${Ue(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Ue(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Ue(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Ue(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",i,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
518
- `)}function ba(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),m=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:m/o*100}}function xa(t){const e=pe.c(45),{element:n,onDismiss:r}=t,[i,u]=x.useState(""),l=x.useRef(null),{sendMessage:c}=Ys(),{openSidePanel:o}=Gr(),d=Te();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const $=va(n,i);o(),c({parts:[{type:"text",text:$}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const m=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=ba(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const j=p,g=`${j.leftPct}%`,E=`${j.topPct}%`;let b;e[9]!==g||e[10]!==E?(b={left:g,top:E,width:"320px"},e[9]=g,e[10]=E,e[11]=b):b=e[11];let w;e[12]!==m?(w=$=>{$.preventDefault(),m()},e[12]=m,e[13]=w):w=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=$=>u($.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=$=>{$.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let v;e[17]!==d?(v=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=v):v=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==v?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:v,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=v,e[22]=k):k=e[22];let P;e[23]!==i?(P=i.trim(),e[23]=i,e[24]=P):P=e[24];const D=!P;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let V;e[27]!==d?(V=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=V):V=e[28];let I;e[29]!==V?(I=s.jsx("title",{children:V}),e[29]=V,e[30]=I):I=e[30];let B;e[31]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=B):B=e[31];let L;e[32]!==I?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[I,B]}),e[32]=I,e[33]=L):L=e[33];let O;e[34]!==D||e[35]!==S||e[36]!==L?(O=s.jsx("button",{type:"submit",disabled:D,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=D,e[35]=S,e[36]=L,e[37]=O):O=e[37];let U;e[38]!==k||e[39]!==O||e[40]!==w?(U=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:w,children:[k,O]}),e[38]=k,e[39]=O,e[40]=w,e[41]=U):U=e[41];let _;return e[42]!==U||e[43]!==b?(_=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:U}),e[42]=U,e[43]=b,e[44]=_):_=e[44],_}const An="site-links",ya=/details?page|\bpdp\b/i,wa=/listingpage|\bplp\b/i;function ka(t,e,n){const r=new Set;for(const c of n)ya.test(c)&&r.add("product"),wa.test(c)&&r.add("category");const i=at(Zt(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const Pa=["rosa","preto","pink","black"];function yt(t,e){const n=e.trim();return n?t(n):Pa.flatMap(r=>t(r))}function Sa(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const ls=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function nn(t){return t.split("/")[0]??""}function ja(t){const e=new Set;for(const n of t){const r=nn(n);ls.has(r)&&e.add(r)}return e}function Ea(t,e){const n=nn(t);return!ls.has(n)||e.size===0?!0:e.has(n)}const Na=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>yt(n=>Sa(t,n),e),optionsFromPayload:wt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:Aa}];function Ta(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of Na){if(d.kind!==c)continue;const h=r.find(m=>d.test(m)&&Ea(m,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(nn(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(Ca(t.has("category")?"category":"product")),l}function Ca(t){return{kind:t,id:An,resolveType:An,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Da(e,n)}}function Me(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Ra(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Me(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Me(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function cs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ds(t){try{return decodeURIComponent(t)}catch{return t}}function La(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oa(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=La(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function us(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=at(Zt(e)),{pattern:u,order:l}=Oa(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ds(d):null}function wt(t,e){const n=Me(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Me(l);if(!c)continue;const o=us(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Me(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,m=Array.isArray(c.image)?Me(c.image[0]):null,p=typeof m?.url=="string"?m.url:void 0;i.push({value:o,label:h,image:p})}return i}function _a(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?ds(n):null}function Aa(t){const e=[],n=new Set,r=(i,u)=>{const l=Me(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=_a(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const Ba=new Set(["login","logout","signin","sign-in","signup","sign-up","register","account","myaccount","my-account","minha-conta","conta","cart","carrinho","checkout","wishlist","favoritos","favorites","orders","pedidos","help","hc","sac","atendimento","contato","contact","institucional","newsletter","customer","sales","catalogsearch","search","busca","privacy-policy-cookie-restriction-mode"]);function $a(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function Fa(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Ma(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Da(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=us(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&Ba.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:$a(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Ma(t))i(u,l,"product",c);for(const{href:u,text:l}of Fa(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function et(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const ms=1e4;function Ka(t){return{product:{noun:t("sandbox.pathParamPickerChip.kindProductNoun"),heading:t("sandbox.pathParamPickerChip.kindProductHeading")},category:{noun:t("sandbox.pathParamPickerChip.kindCategoryNoun"),heading:t("sandbox.pathParamPickerChip.kindCategoryHeading")}}}async function za(t,{resolveType:e,props:n}){const r=await fetch(Er(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(ms)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Bn(t,e){const n=await fetch(Nr(t,e),{signal:AbortSignal.timeout(ms)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Ia(t,e,n){const r=e.optionsFromPayload(await Bn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=Be(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Bn(t,u),n).filter(c=>c.kind==="product");return cs([r,l])}catch{return r}}function Ua(t,e,n){return zs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Ha(t,e,n,r){if(e.homepageLinks)return Ia(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>za(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return cs(l.map(c=>e.optionsFromPayload(c,r)))}function Yt(t,e,n,r,i){return{queryKey:Ua(t,e,n),queryFn:()=>Ha(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function tt(t){const e=pe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let m;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(m=p=>s.jsxs(rt,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(Jn,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Be(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=m):m=e[12],d=i.map(m),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(st,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function $n(t){const e=pe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Va(t){const e=pe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Te(),[d,h]=x.useState(!1),[m,p]=x.useState(""),[j,g]=x.useState(""),E=x.useRef(null),b=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,w=Ka(o),y=[...new Set(n.map(R=>w[R.kind].noun))].join(" or ");let v;e[0]!==o||e[1]!==y?(v=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=v):v=e[2];const k=v,P={template:r,paramName:i};let D;e[3]!==m?(D=(R,G)=>({source:R,query:G,options:R.clientFilter?et(G.data??[],m):G.data??[]}),e[3]=m,e[4]=D):D=e[4];const S=D,V=n.filter(Za),I=n.filter(Xa),B=Gt({queries:V.map(R=>Yt(l,R,j,P,d))});let L;e[5]!==B||e[6]!==S?(L=(R,G)=>S(R,B[G]),e[5]=B,e[6]=S,e[7]=L):L=e[7];const O=V.map(L),U=O.length===0||O.every(Qa),_=Gt({queries:I.map(R=>Yt(l,R,j,P,d&&U))});let $;e[8]!==_||e[9]!==S?($=(R,G)=>S(R,_[G]),e[8]=_,e[9]=S,e[10]=$):$=e[10];const Q=I.map($),J=U?Q:O,q=J.length===1&&J[0]?.source.homepageLinks?J[0]:null,C=q&&!q.query.isLoading&&!q.query.isError?q?.query.data??[]:[],F=et(C.filter(Ya),m),K=et(C.filter(Ja),m),Z=F.length>0&&K.length>0,Y=R=>{h(R),E.current&&clearTimeout(E.current),p(R?u:""),g(R?u:"")};let he;e[11]===Symbol.for("react.memo_cache_sentinel")?(he=R=>{p(R),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{g(R)},300)},e[11]=he):he=e[11];const ne=he,z=R=>{c(R),Y(!1)},te=ts(m),xe=Be(r,{[i]:te}),le=Un,fe=In,ye="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ve=Ga;let re;e[12]!==b||e[13]!==o?(re=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=o,e[14]=re):re=e[14];let ee;e[15]!==re?(ee=s.jsx(Hn,{className:"sr-only",children:s.jsx(Vn,{children:re})}),e[15]=re,e[16]=ee):ee=e[16];let ce;e[17]===Symbol.for("react.memo_cache_sentinel")?(ce=s.jsx(Jn,{size:16,className:"shrink-0 text-foreground"}),e[17]=ce):ce=e[17];let se;e[18]!==o?(se=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=se):se=e[19];let ae;e[20]!==b?(ae=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:b}),e[20]=b,e[21]=ae):ae=e[21];let de;e[22]!==se||e[23]!==ae?(de=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[ce,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[se," ",ae]})]}),e[22]=se,e[23]=ae,e[24]=de):de=e[24];const ge=Qn,jt=!1,it="min-h-0 flex-1";let ie;e[25]!==k||e[26]!==m?(ie=s.jsx(Xn,{autoFocus:!0,placeholder:k,value:m,onValueChange:ne}),e[25]=k,e[26]=m,e[27]=ie):ie=e[27];const je=Yn,Ve="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Ee;e[28]!==o?(Ee=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=Ee):Ee=e[29];let we;e[30]!==Ee?(we=s.jsx(Zn,{children:Ee}),e[30]=Ee,e[31]=we):we=e[31];const qe=te&&s.jsx(st,{className:"shrink-0",children:s.jsxs(rt,{value:`__raw__:${te}`,className:"gap-3 py-2",onSelect:()=>z(te),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(Yr,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:te,paramLabel:b})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:xe})]})]})}),Ce=Z?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(tt,{heading:w.category.heading,iconKind:"category",options:F,template:r,paramName:i,keyPrefix:`${q?.source.id}:cat`,onSelect:z})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(tt,{heading:w.product.heading,iconKind:"product",options:K,template:r,paramName:i,keyPrefix:`${q?.source.id}:prod`,onSelect:z})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:J.map(R=>{const{source:G,query:We,options:ot}=R,{noun:Ge}=w[G.kind];if(We.isLoading)return s.jsx($n,{text:o("sandbox.pathParamPickerChip.loading",{noun:Ge})},G.id);if(We.isError)return s.jsx($n,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},G.id);if(G.homepageLinks){const Je=We.data??[];return s.jsxs(x.Fragment,{children:[s.jsx(tt,{heading:w.category.heading,iconKind:"category",options:et(Je.filter(Wa),m),template:r,paramName:i,keyPrefix:`${G.id}:cat`,onSelect:z}),s.jsx(tt,{heading:w.product.heading,iconKind:"product",options:et(Je.filter(qa),m),template:r,paramName:i,keyPrefix:`${G.id}:prod`,onSelect:z})]},G.id)}return s.jsx(tt,{heading:J.length>1?w[G.kind].heading:void 0,iconKind:G.kind,options:ot,template:r,paramName:i,keyPrefix:G.id,onSelect:z},G.id)})});let Re;e[32]!==je||e[33]!==we||e[34]!==qe||e[35]!==Ce?(Re=s.jsxs(je,{className:Ve,children:[we,qe,Ce]}),e[32]=je,e[33]=we,e[34]=qe,e[35]=Ce,e[36]=Re):Re=e[36];let Le;e[37]!==ge||e[38]!==ie||e[39]!==Re?(Le=s.jsxs(ge,{shouldFilter:jt,className:it,children:[ie,Re]}),e[37]=ge,e[38]=ie,e[39]=Re,e[40]=Le):Le=e[40];let Oe;e[41]!==fe||e[42]!==ee||e[43]!==de||e[44]!==Le||e[45]!==ve?(Oe=s.jsxs(fe,{className:ye,onClick:ve,children:[ee,de,Le]}),e[41]=fe,e[42]=ee,e[43]=de,e[44]=Le,e[45]=ve,e[46]=Oe):Oe=e[46];let W;return e[47]!==le||e[48]!==Y||e[49]!==d||e[50]!==Oe?(W=s.jsx(le,{open:d,onOpenChange:Y,children:Oe}),e[47]=le,e[48]=Y,e[49]=d,e[50]=Oe,e[51]=W):W=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:R=>{R.stopPropagation(),Y(!0)},children:u||b}),W]})}function qa(t){return t.kind==="product"}function Wa(t){return t.kind!=="product"}function Ga(t){return t.stopPropagation()}function Ja(t){return t.kind==="product"}function Ya(t){return t.kind!=="product"}function Qa(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Xa(t){return t.isFallback}function Za(t){return!t.isFallback}function ei(t){const e=pe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const j={template:r,paramName:i},g=n.filter(ti);o=Gt,c=g.map(E=>Yt(u,E,"",j,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[m,p]=x.useState(!1);if(!m)for(const j of h){if(j.isLoading)break;const g=j.data?.[0];if(g){p(!0),queueMicrotask(()=>l(g.value));break}}return null}function ti(t){return!t.isFallback}function ni(t){const e=pe.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[l,c]=x.useState(r),[o,d]=x.useState(!1),h=x.useRef(!1);let m;e[0]!==n||e[1]!==u?(m=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=m):m=e[2];const p=m,j=l||p;let g;e[3]!==j?(g=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:j}),e[3]=j,e[4]=g):g=e[4];let E;e[5]!==p||e[6]!==u?(E=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=E):E=e[7];let b,w;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=S=>c(S.target.value),w=()=>d(!0),e[8]=b,e[9]=w):(b=e[8],w=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=ts(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let v;e[16]!==l||e[17]!==p||e[18]!==E||e[19]!==N||e[20]!==y?(v=s.jsx("input",{type:"text",value:l,placeholder:p,title:E,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:si,onChange:b,onFocus:w,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=E,e[19]=N,e[20]=y,e[21]=v):v=e[21];let k;e[22]!==g||e[23]!==v?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,v]}),e[22]=g,e[23]=v,e[24]=k):k=e[24];let P;e[25]!==o||e[26]!==u?(P=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(er,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=P):P=e[27];let D;return e[28]!==P||e[29]!==k?(D=s.jsxs(s.Fragment,{children:[k,P]}),e[28]=P,e[29]=k,e[30]=D):D=e[30],D}function si(t){return t.stopPropagation()}function ri(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function ai(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function ii(t){const e=pe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=ss(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Tr(l),h=o?{...o,name:l,path:c}:Cr(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Is(i)}function oi(t){const e=pe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Te();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[m,p]=x.useState(h);let j;e[2]!==d?(j=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=j):j=e[3];const[g,E]=x.useState(j),[b,w]=x.useState(Ut),[N,y]=x.useState(null),[v,k]=x.useState(n);n!==v&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),E(d("sectionsEditor.createPageModal.defaultPagePath")),w(Ut),y(null)));const P=!!l?.length;let D;e[4]!==o||e[5]!==r?(D=se=>{!se&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=D):D=e[6];const S=D;let V;e[7]!==o||e[8]!==m||e[9]!==c||e[10]!==g||e[11]!==P||e[12]!==b?(V=async se=>{se.preventDefault();const ae=m.trim(),de=g.trim();if(!ae||!de||o)return;const ge=ns(de);if(ge){y(ge);return}y(null),await c({name:ae,path:de,templateKey:P&&b!==Ut?b:null})},e[7]=o,e[8]=m,e[9]=c,e[10]=g,e[11]=P,e[12]=b,e[13]=V):V=e[13];const I=V,B=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let O;e[16]!==L?(O=s.jsx(Hn,{children:s.jsx(Vn,{children:L})}),e[16]=L,e[17]=O):O=e[17];let U;e[18]!==d?(U=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=U):U=e[19];let _;e[20]!==U?(_=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:U}),e[20]=U,e[21]=_):_=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=se=>p(se.target.value),e[22]=$):$=e[22];let Q;e[23]!==d?(Q=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=Q):Q=e[24];let J;e[25]!==o||e[26]!==m||e[27]!==Q?(J=s.jsx(Pn,{id:"new-page-name",value:m,onChange:$,placeholder:Q,autoFocus:!0,disabled:o}),e[25]=o,e[26]=m,e[27]=Q,e[28]=J):J=e[28];let q;e[29]!==J||e[30]!==_?(q=s.jsxs("div",{className:"space-y-1.5",children:[_,J]}),e[29]=J,e[30]=_,e[31]=q):q=e[31];let X;e[32]!==d?(X=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=X):X=e[33];let C;e[34]!==X?(C=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:X}),e[34]=X,e[35]=C):C=e[35];let F;e[36]===Symbol.for("react.memo_cache_sentinel")?(F=se=>E(se.target.value),e[36]=F):F=e[36];let K;e[37]!==d?(K=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=K):K=e[38];let Z;e[39]!==o||e[40]!==g||e[41]!==K?(Z=s.jsx(Pn,{id:"new-page-path",value:g,onChange:F,placeholder:K,disabled:o}),e[39]=o,e[40]=g,e[41]=K,e[42]=Z):Z=e[42];let Y;e[43]!==C||e[44]!==Z?(Y=s.jsxs("div",{className:"space-y-1.5",children:[C,Z]}),e[43]=C,e[44]=Z,e[45]=Y):Y=e[45];let he;e[46]!==o||e[47]!==P||e[48]!==d||e[49]!==b||e[50]!==l?(he=P&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(Rr,{id:"new-page-template",value:b,onChange:w,templates:l??[],disabled:o})]}),e[46]=o,e[47]=P,e[48]=d,e[49]=b,e[50]=l,e[51]=he):he=e[51];let ne;e[52]!==B?(ne=B&&s.jsx("p",{className:"text-xs text-destructive",children:B}),e[52]=B,e[53]=ne):ne=e[53];let z;e[54]!==q||e[55]!==Y||e[56]!==he||e[57]!==ne?(z=s.jsxs("div",{className:"space-y-4 py-4",children:[q,Y,he,ne]}),e[54]=q,e[55]=Y,e[56]=he,e[57]=ne,e[58]=z):z=e[58];let te;e[59]!==r?(te=()=>r(!1),e[59]=r,e[60]=te):te=e[60];let xe;e[61]!==d?(xe=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=xe):xe=e[62];let le;e[63]!==o||e[64]!==te||e[65]!==xe?(le=s.jsx(De,{type:"button",variant:"outline",onClick:te,disabled:o,children:xe}),e[63]=o,e[64]=te,e[65]=xe,e[66]=le):le=e[66];let fe;e[67]!==o||e[68]!==m||e[69]!==g?(fe=!m.trim()||!g.trim()||o,e[67]=o,e[68]=m,e[69]=g,e[70]=fe):fe=e[70];let ye;e[71]!==o||e[72]!==d?(ye=o?s.jsxs(s.Fragment,{children:[s.jsx(Pt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=ye):ye=e[73];let ve;e[74]!==fe||e[75]!==ye?(ve=s.jsx(De,{type:"submit",disabled:fe,children:ye}),e[74]=fe,e[75]=ye,e[76]=ve):ve=e[76];let re;e[77]!==le||e[78]!==ve?(re=s.jsxs(Us,{children:[le,ve]}),e[77]=le,e[78]=ve,e[79]=re):re=e[79];let ee;e[80]!==I||e[81]!==z||e[82]!==re||e[83]!==O?(ee=s.jsx(In,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:I,children:[O,z,re]})}),e[80]=I,e[81]=z,e[82]=re,e[83]=O,e[84]=ee):ee=e[84];let ce;return e[85]!==S||e[86]!==n||e[87]!==ee?(ce=s.jsx(Un,{open:n,onOpenChange:S,children:ee}),e[85]=S,e[86]=n,e[87]=ee,e[88]=ce):ce=e[88],ce}function li(t){const e=pe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Te();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const m=ss(h);let p;e[4]!==m?(p=_r((k,P)=>m.mutate({blockKey:k,data:P})),e[4]=m,e[5]=p):p=e[5];const j=p;let g;e[6]!==o||e[7]!==c?(g=Lr(c,o),e[6]=o,e[7]=c,e[8]=g):g=e[8];const{resolveType:E,props:b,title:w}=g;if(!E){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let P;return e[11]!==k?(P=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=P):P=e[12],P}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==E||e[15]!==w?(y={mode:"saved",blockKey:o,resolveType:E,title:w},e[13]=o,e[14]=E,e[15]=w,e[16]=y):y=e[16];let v;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==b||e[23]!==m.isPending||e[24]!==j||e[25]!==N||e[26]!==y||e[27]!==r?(v=s.jsx(Or,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:b,isCreating:m.isPending,onCreate:ci,onSaveReferencedBlock:j,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=b,e[23]=m.isPending,e[24]=j,e[25]=N,e[26]=y,e[27]=r,e[28]=v):v=e[28],v}async function ci(){}function di(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Fn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:di(t.error)}}function ui(t){switch(t){case"clone-failed":case"install-failed":case"start-failed":return"terminal-error";case"idle":case"cloning":return"booting";case"checking-out":case"installing":case"starting":case"running":case"crashed":return"snapshot-readable"}}function mi(t){if(t.fastPreviewActive)return t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData?{kind:"error",source:"data"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"};const e=ui(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const fi="https://github.com/decocms/blocks";function pi(){const t=pe.c(14),e=Te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(tr,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(qn,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(De,{size:"sm",asChild:!0,children:s.jsxs("a",{href:fi,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(tn,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function hi(t){const e=pe.c(15),{source:n,onRetry:r}=t,i=Te();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qr,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(De,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let m;return e[11]!==l||e[12]!==o||e[13]!==h?(m=s.jsx(tn,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=m):m=e[14],m}const gi=x.lazy(()=>Hs(()=>import("./sections-editor-Bhx-Ytw3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=Qt(),{currentBranch:c,taskId:o}=St(),d=is(),h=Xt(),m=os(),p=d.lifecycle.phase==="running",j=h.previewUrl;let g;e[0]!==c||e[1]!==l||e[2]!==j||e[3]!==o||e[4]!==n?(g=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:j}:null,e[0]=c,e[1]=l,e[2]=j,e[3]=o,e[4]=n,e[5]=g):g=e[5];const E=g;let b;e[6]!==p?(b={fetchEnabled:p},e[6]=p,e[7]=b):b=e[7];const w=en(E,b);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=rs(E,N),v=mi({lifecyclePhase:d.lifecycle.phase,decofile:Fn(w),meta:Fn(y),hasEditableContent:xr(w.data,y.data),fastPreviewActive:es(n).runtime==="cms"}),k=vi;if(v.kind==="loading"){let C;return e[10]===Symbol.for("react.memo_cache_sentinel")?(C=k(s.jsx(Vs,{})),e[10]=C):C=e[10],C}if(v.kind==="empty"){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=k(s.jsx(pi,{})),e[11]=C):C=e[11],C}if(v.kind==="error"){let C;e[12]!==w||e[13]!==h||e[14]!==y||e[15]!==v.source?(C=()=>{if(v.source==="sandbox"){h.retry();return}Promise.all([w.refetch(),y.refetch()])},e[12]=w,e[13]=h,e[14]=y,e[15]=v.source,e[16]=C):C=e[16];const F=C;let K;return e[17]!==F||e[18]!==v.source?(K=k(s.jsx(hi,{source:v.source,onRetry:F})),e[17]=F,e[18]=v.source,e[19]=K):K=e[19],K}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=C=>k(s.jsx("div",{className:"h-full min-h-0",children:C})),e[20]=P):P=e[20];const D=P,S=m.state.target;if(S?.kind==="loader"&&w.data&&y.data){const C=c??"",F=j??null;let K;return e[21]!==w.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==C||e[25]!==F||e[26]!==S.key||e[27]!==n?(K=D(s.jsx(li,{orgSlug:l.slug,virtualMcpId:n,branch:C,previewUrl:F,meta:y.data,decofile:w.data,blockKey:S.key})),e[21]=w.data,e[22]=y.data,e[23]=l.slug,e[24]=C,e[25]=F,e[26]=S.key,e[27]=n,e[28]=K):K=e[28],K}let V;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(V=S||!c?null:Wn(Gn(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=V):V=e[33];const I=V;let B="/",L=null,O=null;S?.kind==="page"?(B=S.path,L=S.key):S?.kind==="section"?O=S.key:I&&(B=I.path,L=I.pageKey);const U=L?`page:${L}`:O?`section:${O}`:`path:${B}`;let _;e[34]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(Pt,{className:"size-5 text-muted-foreground"})}),e[34]=_):_=e[34];const $=c??"",Q=j??void 0,J=O?null:u,q=!!L&&m.state.editSeoPageKey===L;let X;return e[35]!==O||e[36]!==L||e[37]!==B||e[38]!==U||e[39]!==i||e[40]!==l.slug||e[41]!==J||e[42]!==q||e[43]!==$||e[44]!==Q||e[45]!==n||e[46]!==m.consumeEditSeo||e[47]!==m.setFocusedBlock||e[48]!==m.setVariantOverride?(X=D(s.jsx(x.Suspense,{fallback:_,children:s.jsx(gi,{orgSlug:l.slug,virtualMcpId:n,branch:$,previewReady:!0,previewUrl:Q,currentPath:B,activePageBlockKey:L,activeGlobalBlockKey:O,externalSelection:J,initialEditSeo:q,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:i},U)})),e[35]=O,e[36]=L,e[37]=B,e[38]=U,e[39]=i,e[40]=l.slug,e[41]=J,e[42]=q,e[43]=$,e[44]=Q,e[45]=n,e[46]=m.consumeEditSeo,e[47]=m.setFocusedBlock,e[48]=m.setVariantOverride,e[49]=X):X=e[49],X}function vi(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Dn(t){const e=pe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Te(),c=Zr(),o=Ar(n);let d;e[0]!==o||e[1]!==r?(d=Br(o,ea(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:m}=Qt(),{currentBranch:p,taskId:j}=St(),E=Xt().previewUrl;let b;e[3]!==p||e[4]!==m.slug||e[5]!==E||e[6]!==j||e[7]!==n?(b=p?{orgSlug:m.slug,virtualMcpId:n,branch:p,threadId:j??null,previewUrl:E}:null,e[3]=p,e[4]=m.slug,e[5]=E,e[6]=j,e[7]=n,e[8]=b):b=e[8];const N=en(b),y=p??"";let v;e[9]!==m.slug||e[10]!==y||e[11]!==n?(v={orgSlug:m.slug,virtualMcpId:n,branch:y},e[9]=m.slug,e[10]=y,e[11]=n,e[12]=v):v=e[12];const{save:k,flush:P}=$r(v),D=N.data?.[r],S=N.data===void 0&&N.isLoading,V=N.data!==void 0&&D===void 0,I=!p||V||S;let B;e[13]!==D?(B=D===void 0?"":JSON.stringify(D,null,2),e[13]=D,e[14]=B):B=e[14];const L=B;let O;e[15]!==r||e[16]!==I||e[17]!==k?(O=q=>{if(I)return;let X;try{X=JSON.parse(q)}catch{return}X===null||typeof X!="object"||Array.isArray(X)||k(r,X)},e[15]=r,e[16]=I,e[17]=k,e[18]=O):O=e[18];const U=O;let _;e[19]!==P?(_=()=>({flush:P}),e[19]=P,e[20]=_):_=e[20],x.useImperativeHandle(u,_);let $;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?($=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(De,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(qs,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=$):$=e[25];let Q;e[26]!==N.data||e[27]!==P||e[28]!==L||e[29]!==S||e[30]!==V||e[31]!==r||e[32]!==I||e[33]!==U||e[34]!==l?(Q=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(Pt,{className:"size-5 text-muted-foreground"})}):V?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Xr,{code:L,language:"json",readOnly:I,height:"100%",onChange:q=>U(q??""),onSave:q=>{U(q),P()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=P,e[28]=L,e[29]=S,e[30]=V,e[31]=r,e[32]=I,e[33]=U,e[34]=l,e[35]=Q):Q=e[35];let J;return e[36]!==$||e[37]!==Q?(J=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[$,Q]}),e[36]=$,e[37]=Q,e[38]=J):J=e[38],J}function fs(t){return t.contentEditingEnabled&&!t.isMobile}function bi(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function xi(t,e){return t==="blocks"?"preview":e?"blocks":t}function yi(t){return fs({contentEditingEnabled:as(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function wi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const ki=500,Pi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Kn=1,qt=["desktop","mobile","tablet"],zn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Si(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function nt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Wt(t,e){try{return new URL(t,e).href}catch{return null}}function ji(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function Ei(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Ni(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function Ti(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ci({virtualMcpId:t}){const e=Te(),n=jr(),{currentBranch:r,taskId:i,virtualMcpId:u}=St(),l=os(),c=fr(u===t?t:null),o=es(t),d=ta(c?.metadata?.ui?.layout??null),h=as(d),m=fs({contentEditingEnabled:h,isMobile:n}),[p,j]=x.useState(()=>yi({cmsMode:d,isMobile:n})),[g,E]=x.useState("desktop"),[b,w]=x.useState(null),[N,y]=x.useState(null),v=x.useRef(null),k=x.useRef(null),[P,D]=x.useState(!1),S=x.useRef(null),V=()=>{S.current?.flush(),D(!1)},I=()=>D(a=>(a&&S.current?.flush(),!a)),[B,L]=x.useState({width:0,height:0}),[O,U]=x.useState(!1),[_,$]=x.useState(""),Q=x.useRef(null),[J,q]=x.useState(!1),[X,C]=x.useState(),[F,K]=x.useState(null),[Z,Y]=x.useState(null),[he,ne]=x.useState(null),[z,te]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[xe,le]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[fe,ye]=x.useState({}),[ve,re]=x.useState(!1),ee=x.useRef(null),ce=()=>{re(!0),ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>re(!1),15e3)},se=()=>{ee.current&&(clearTimeout(ee.current),ee.current=null),re(!1)},{org:ae}=Qt(),de=is(),ge=Xt(),jt=ge.vmEntry,it=de.lifecycle.phase,{url:ie}=yr(t),je=ie??ge.previewUrl,Ve=!!ie||it==="running",Ee=c?.id===t?gr(c.metadata):null,we=!ie&&c?.id===t&&o.runtime==="cms",qe=o.projectDefault==="cms",Ce=Ir({sandboxUrl:je,previewServerUrl:Ee,fastPreviewActive:we}),Re=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:je}:null,Le=en(Re,{fetchEnabled:Ve}),Oe=rs(Re,{fetchEnabled:Ve}),W=Le.data,R=Oe.data,G=W?wr(W).sort((a,f)=>a.name.localeCompare(f.name)):[],We=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r}:null,ot=ii(We),Ge=W&&R?kr(W,R):[],Je=W&&R?Fr(R,W,"loaders"):[],sn=_?(()=>{const a=_.toLowerCase();return G.map(f=>({page:f,score:Ni(f.name,f.path,a)})).filter(({score:f})=>f>0).sort((f,T)=>T.score-f.score||f.page.path.length-T.page.path.length).map(({page:f})=>f)})():G,rn=Ge.filter(a=>{if(!_)return!0;const f=_.toLowerCase();return a.name.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),an=m?Je:[],on=an.filter(a=>{if(!_)return!0;const f=_.toLowerCase();return a.title.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),lt=Z?Je.find(a=>a.key===Z)??null:null,Ne=Zt,Et=F||Z?null:Pr(G,z,xe),H=Et?.key??null,Ke=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??H,ct=Et?.path??null,ze=(H?fe[H]:void 0)??{},be=Be(z,ze),Nt={};if(Ve&&je&&R&&W){const a=Mr(R,"loaders"),f=H?W[H]:void 0,T=Ra(f,W,oe=>a.has(oe)),A=ja(T);for(const oe of at(z)){if(oe.type!=="param")continue;const Ae=ka(z,oe.name,T),Pe=Ta(Ae,a,A);Pe.length>0&&(Nt[oe.name]=Pe)}}const dt=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,ln=W&&H?Sr(W,H,0):[],cn=W?Dr(ln,W):[],Tt=cn.map(a=>a.isSavedBlock?a.label:""),Ct=cn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Rt=ln.map(a=>Jt(a,W??{})),dn=x.useRef(null),ke=x.useRef(null),ps=de.status.state==="paused",Lt=de.phase,un=Kr({claimPhase:Lt,lifecycle:de.lifecycle}),$e=ge.previewState,hs=ge.userStopped,gs=Wr(ae.slug,t??"",r??""),{url:Fe}=qr(we&&t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,previewServerUrl:Ee??null,path:be}:null),vs=qe&&o.runtime==="sandbox",M=la({previewState:$e,progressStatus:un.status,previewServerUrl:Ee,fastPreviewActive:we,fastPreviewReady:!!Fe,codingSession:vs,localPreviewUrl:ie}),ut=M.mode!=="none",bs=M.mode==="production"&&M.iframeBase?nt(M.iframeBase):null,Ie=M.mode==="production"?bs:nt(je),xs=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Ye=ie?M.mode==="sandbox"&&m&&p==="blocks":M.mode==="production"&&we&&xs&&m&&p==="blocks",mn=x.useRef(null),{pin:ys,effective:ws}=ji(mn.current,{inPlaceRenderActive:Ye,draftPreviewUrl:Fe,resolvedPath:be});mn.current=ys;const _e=Si(M.mode==="sandbox"?bt(Cn(he??Wt(be,M.iframeBase)??M.iframeBase,g),l.state.variantOverride??[]):M.mode==="production"?bt(Cn(Ur(he??ws??Wt(be,M.iframeBase)??M.iframeBase,M.showWakingPill?Hr:null),g),l.state.variantOverride??[]):null),fn=Fe??(M.iframeBase?Wt(be,M.iframeBase):null),ks=M.mode==="production"?fn?bt(fn,l.state.variantOverride??[]):null:_e??M.iframeBase,Ps=()=>{const a=ks;a&&window.open(a,"_blank","noopener")},Qe=t&&r?Gn(ae.slug,t,r):null,Xe=a=>{Qe&&Xs(Qe,a)},ue=l.state.target;x.useEffect(()=>{if(!(!ue||!Ce||!R))if(ue.kind==="page"){const a=fe[ue.key]??{};ke.current=Be(ue.path,a),K(null),Y(null),ne(null),le(ue.key),te(ue.path),Xe({path:ue.path,pageKey:ue.key,params:a})}else if(ue.kind==="loader")ke.current=null,K(null),Y(ue.key),ne(null);else{const a=Ge.find(f=>f.key===ue.key);if(a){ke.current=null;const f=Nn(R);Y(null),K(a),ne(Tn(Ce,f,a.key))}}},[ue,Ce,R,fe]),x.useEffect(()=>{!H||ct===null||ue?.kind==="page"&&ue.key===H&&ue.path===ct||l.selectTarget({kind:"page",key:H,path:ct})},[H,ct,ue]);const[pn,Ss]=x.useState(null);if($e.kind==="iframe"&&pn!==$e.previewUrl){const a=pn!==null;Ss($e.previewUrl);const f=Qe?Wn(Qe):null;if(f){if(ke.current=Be(f.path,f.params),te(f.path),le(f.pageKey),ne(null),K(null),Y(null),f.pageKey&&Object.keys(f.params).length>0){const T=f.pageKey;ye(A=>({...A,[T]:f.params}))}}else a&&(ke.current=null,te("/"),ne(null),le(null),K(null),Y(null))}dn.current=_e;const hn=ma({iframeRef:v,src:M.mode==="sandbox"?_e:null,active:M.mode==="sandbox"}),gn=x.useRef(null);x.useEffect(()=>{if(!Fe||!_e||gn.current===Fe)return;gn.current=Fe;const a=v.current;a&&a.getAttribute("src")!==_e&&(ce(),a.src=_e)},[Fe,_e]);const vn=()=>{const a=v.current?.contentWindow,f=Ie;if(!a||!f||!W||!H)return;const T=W[H];if(!T||typeof T!="object")return;const A=Vr({previewBaseUrl:f,pageBlock:T,decofile:W,path:be,pathTemplate:z});if(!A)return;const oe=bt(A.src,zr(l.state.variantOverride??[],H));a.postMessage({type:"cms-editor::render",src:oe,body:A.body},f)},Ot=x.useRef(null);x.useEffect(()=>{if(!Ye||F||Z||!H||!W){Ot.current=null;return}const a={nav:JSON.stringify({page:H,path:be,pathTemplate:z}),content:JSON.stringify(W)},f=Ei(Ot.current,a);Ot.current=a,f&&vn()},[W,Ye,F,Z,H,be,z]);const _t=x.useRef(null);x.useEffect(()=>{if(!Ye||F||Z||!H||!W){_t.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),f=_t.current;_t.current={page:H,sig:a},!(!f||f.page!==H||f.sig===a)&&vn()},[l.state.variantOverride,Ye,F,Z,H]);const js=!!t&&!!r&&!de.notFound&&!hs&&!ps&&(Lt?.kind==="ready"||it!=="idle"),me=wi({editingMode:p,sandboxDisplay:M.mode==="sandbox",blocksEditingEnabled:m});x.useEffect(()=>{const a=Ie;if(!a)return;const f=T=>{if(T.origin===a)if(T.data?.type==="visual-editor::element-clicked"){const A=fa.safeParse(T.data.payload);A.success&&w(A.data)}else if(T.data?.type==="cms-editor::section-clicked"){const A=ga.safeParse(T.data.payload);A.success&&y({index:A.data.sectionIndex,seq:A.data.clickSeq})}else T.data?.type==="cms-editor::render-start"?ce():T.data?.type==="cms-editor::render-end"?(se(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Ct,keys:Rt},a)):T.data?.type==="cms-editor::render-error"&&se()};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[Ie,Tt,Ct,Rt]);const bn=()=>{const a=v.current?.contentWindow,f=nt(je);!a||!f||a.postMessage({type:"visual-editor::activate",script:pa},f)},Es=()=>{const a=v.current?.contentWindow,f=nt(je);!a||!f||a.postMessage({type:"visual-editor::deactivate"},f)},At=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||(a.postMessage(M.mode==="production"||ie?{type:"editor::inject",args:{script:_n}}:{type:"visual-editor::activate",script:_n},f),a.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Ct,keys:Rt},f))},Ns=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||a.postMessage({type:"cms-editor::deactivate"},f)},Ts=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||(a.postMessage({type:"cms-editor::clear-hover"},f),a.postMessage({type:"visual-editor::clear-hover"},f))},mt=a=>{if(a==="blocks"&&!m)return;const f=p;!n&&a!==f&&(a==="blocks"?k.current?.resize("30%"):k.current?.collapse()),j(a),w(null),y(null),a!=="blocks"&&Y(null),f==="visual"&&Es(),a==="visual"&&bn(),f==="blocks"&&a!=="blocks"&&Ns(),a==="blocks"&&At()},Cs=()=>{mt(bi(p,m))},Rs=()=>{mt(xi(p,m))};Jr(()=>{const a=v.current;if(!a)return;ce();const f=document.activeElement,T=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ti(a,dn.current);let A;const oe=()=>{clearTimeout(A),a.tabIndex=T,a.style.pointerEvents="";const Ae=document.activeElement;(!Ae||Ae===document.body||Ae===a)&&f?.focus(),a.removeEventListener("load",oe)};a.addEventListener("load",oe),A=setTimeout(oe,3e3)});const Ls=()=>{const a=qt.indexOf(g);E(qt[(a+1)%qt.length])},Bt=(a,f)=>{if(!H)return;const T=H,A={...ze,[a]:f};ke.current=Be(z,A),ye(oe=>({...oe,[T]:A})),Xe({path:z,pageKey:T,params:A})},Os=ri({iframeBase:M.iframeBase,resolvedPath:be,activeGlobalSectionName:F?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),xn=a=>{const f=fe[a.key]??{},T=Be(a.path,f);(F||Ne(T)!==Ne(be))&&ce(),ke.current=T,K(null),Y(null),ne(null),y(null),le(a.key),te(a.path),Xe({path:a.path,pageKey:a.key,params:f}),l.selectTarget({kind:"page",key:a.key,path:a.path})};Qs(Qe,a=>{(F||Ne(a)!==Ne(be))&&ce(),ke.current=a,K(null),Y(null),ne(null),y(null),le(null),te(a),Xe({path:a,pageKey:null,params:{}})});const _s=a=>{if(!Ce||!R){jn.error(e("sandbox.preview.previewMetadataNotReady"));return}ce(),ke.current=null;const f=Nn(R),T=Tn(Ce,f,a.key);K(a),Y(null),ne(T),y(null),l.selectTarget({kind:"section",key:a.key})},As=a=>{m&&(K(null),Y(a.key),ne(null),mt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},Bs=async({name:a,path:f,templateKey:T})=>{if(!t||!r)return;const A=ns(f);if(A){C(A);return}const oe=f.trim().startsWith("/")?f.trim():`/${f.trim()}`;if(G.some(Pe=>Ne(Pe.path)===Ne(oe))){C(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let Ae;if(T&&(Ae=W?.[T],!Ae)){C(e("sandbox.preview.templateNoLongerExists"));return}C(void 0);try{const Pe=await ot.mutateAsync({name:a,path:oe,template:Ae});q(!1),jn.success(e("sandbox.preview.pageCreated",{name:a})),await na(ki),xn({key:Pe.key,name:Pe.name,path:Pe.path}),mt("blocks")}catch(Pe){C(Pe instanceof Error?Pe.message:e("sandbox.preview.failedToCreatePage"))}},ft=ut&&(js||M.mode==="production"),$s=ai({showPreviewToolbar:ft,contentEditingEnabled:h}),pt=()=>{U(!1),$("")},$t=F?.name??lt?.title??Et?.name,Ft=Le.isPending||Oe.isPending,Mt=Ft?nt(M.iframeBase):$t,ht=F?`section:${F.key}`:Z?`loader:${Z}`:H?`page:${H}`:void 0,Fs=ft?$s?s.jsxs(dr,{open:O,onOpenChange:a=>{U(a),a||$("")},children:[s.jsx(ur,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:Ft?Mt??void 0:F||lt?$t:[$t,z].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[F&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(nr,{size:11}),e("sandbox.preview.globalBadge")]}),lt&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(sr,{size:11}),e("sandbox.preview.loaderBadge")]}),Mt&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Mt}),!Ft&&!F&&!lt&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:z}),s.jsx(Zs,{size:12,className:Dt("shrink-0 transition-transform",O&&"rotate-180")})]})})}),s.jsxs(mr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(Qn,{shouldFilter:!1,defaultValue:ht,children:[s.jsx(Xn,{value:_,onValueChange:a=>{$(a),Q.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(Yn,{ref:Q,className:"max-h-80",children:[s.jsx(Zn,{children:G.length===0&&Ge.length===0&&an.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),sn.length>0&&s.jsx(st,{children:sn.map(a=>s.jsxs(rt,{value:`page:${a.key}`,"aria-current":ht===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{pt(),xn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),rn.length>0&&s.jsx(st,{heading:e("sandbox.preview.globalComponents"),children:rn.map(a=>s.jsx(rt,{value:`section:${a.key}`,"aria-current":ht===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),_s(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),on.length>0&&s.jsx(st,{heading:e("sandbox.preview.globalLoaders"),children:on.map(a=>s.jsx(rt,{value:`loader:${a.key}`,"aria-current":ht===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),As(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!F&&!Z&&at(z).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:at(z).map((a,f)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${f}`);const T=Nt[a.name];return T&&dt?s.jsx(Va,{sources:T,template:z,paramName:a.name,value:ze[a.name]??"",sandboxRef:dt,onCommit:A=>Bt(a.name,A)},`${H}:${a.name}`):s.jsx(ni,{name:a.name,value:ze[a.name]??"",onCommit:A=>Bt(a.name,A)},`${H}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(De,{variant:"ghost",className:"w-full justify-start",onClick:()=>{pt(),C(void 0),q(!0)},children:[s.jsx(cr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Os}):null,yn=ft||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Ze,{onClick:Ls,"aria-label":e(zn[g]),children:g==="mobile"?s.jsx(rr,{size:16}):g==="tablet"?s.jsx(ar,{size:16}):s.jsx(ir,{size:16})})}),s.jsx(It,{children:e(zn[g])})]}),Fs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(Ze,{onClick:Ps,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(qn,{size:16})})})]}):null,Ms=M.mode==="sandbox",gt=Pi[g],vt=g==="desktop"&&(B.width===0||B.width>=gt.width+2*Kn),wn=vt?1:Math.min(B.width>0?B.width/(gt.width+2*Kn):1,1),Ds=vt?{width:"100%",height:"100%"}:{width:`${gt.width}px`,height:B.height>0?`${B.height/wn}px`:`${gt.height}px`,transform:`scale(${wn})`,transformOrigin:"top center"},kn=s.jsxs(s.Fragment,{children:[Ms&&(ft||h)&&s.jsx(Ze,{onClick:Cs,"aria-pressed":me==="visual","aria-label":e("sandbox.preview.visualEditor"),active:me==="visual",children:s.jsx(En,{size:16})}),m&&s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Ze,{onClick:Rs,"aria-pressed":me==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:me==="blocks",children:s.jsx(lr,{size:16})})}),s.jsx(It,{children:e("sandbox.preview.blocksEditor")})]}),Ke&&s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Ze,{onClick:I,"aria-pressed":P,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:P,children:s.jsx(or,{size:16})})}),s.jsx(It,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Ks=!!Z&&me==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[dt&&Object.entries(Nt).map(([a,f])=>(ze[a]??"")===""?s.jsx(ei,{sources:f,template:z,paramName:a,sandboxRef:dt,onFill:T=>Bt(a,T)},`${H}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(Sn.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:yn}),children:yn}),s.jsx(Sn.Toolbar.Right.Portal,{fallback:kn,children:kn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Ks?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Mn,{virtualMcpId:t,externalSelection:N,onViewJsonFile:I}),P&&Ke&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Dn,{ref:S,virtualMcpId:t,pageKey:Ke,onClose:V})})]}):s.jsxs(Rn,{orientation:"horizontal",disabled:me!=="blocks",className:"relative isolate",children:[s.jsx(xt,{ref:k,id:"preview-blocks-editor",defaultSize:me==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:me==="blocks"&&s.jsx(Mn,{virtualMcpId:t,externalSelection:N,onViewJsonFile:I})}),me==="blocks"&&s.jsx(Ln,{withHandle:!0}),s.jsx(xt,{id:"preview-canvas",defaultSize:me==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(Rn,{orientation:"horizontal",disabled:!(P&&Ke),children:[s.jsx(xt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const f=()=>L(A=>A.width===a.clientWidth&&A.height===a.clientHeight?A:{width:a.clientWidth,height:a.clientHeight});f();const T=new ResizeObserver(f);return T.observe(a),()=>T.disconnect()},className:Dt("h-full relative overflow-clip flex justify-center",ut&&!vt&&"bg-muted/30"),children:[(ve||gs)&&ut&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),M.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"starting",progress:un,claimPhase:Lt})}),!ie&&$e.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"suspended",onResume:ge.resume})}),!ie&&$e.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"errored",error:$e.error,onRetry:ge.retry,connectionsHref:`/${ae.slug}/settings/connections`})}),M.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(Pt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),me==="visual"&&!b&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(En,{size:12}),e("sandbox.preview.clickElementToAsk")]}),me==="visual"&&b&&s.jsx(xa,{element:b,onDismiss:()=>w(null)}),ut&&_e&&s.jsx("div",{className:Dt("shrink-0",!vt&&"border-x border-border bg-background shadow-sm"),style:Ds,onMouseLeave:Ts,children:s.jsx("iframe",{ref:v,src:_e,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:hn.handleError,onLoad:()=>{if(hn.handleLoad(),se(),M.mode!=="sandbox"||ie){(M.mode==="production"&&!M.showWakingPill||ie)&&me==="blocks"&&At();return}if(Ws("vm_preview_loaded",{view_mode:me,vm_id:jt?.sandboxHandle??null}),!F)try{const a=v.current?.contentWindow?.location?.pathname;if(!a)return;const f=ke.current;if(f!==null&&(ke.current=null,Ne(a)!==Ne(f))||Ne(a)===Ne(be))return;te(a),Xe({path:a,pageKey:xe,params:ze})}catch{}me==="visual"&&bn(),me==="blocks"&&At()}},M.iframeBase)})]})}),P&&Ke&&s.jsxs(s.Fragment,{children:[s.jsx(Ln,{withHandle:!0}),s.jsx(xt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Dn,{ref:S,virtualMcpId:t,pageKey:Ke,onClose:V})})]})]})})]})}),s.jsx(oi,{open:J,onOpenChange:q,isPending:ot.isPending,error:X,templates:G,onSubmit:Bs})]})}function Ri(t){const e=pe.c(22),{virtualMcpId:n}=t,r=Te(),i=pr(n),{activeTask:u,taskId:l,currentBranch:c}=St(),o=aa(l),[d,h]=x.useState(!1);if(ra({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Vt(i?.metadata),threadHasRepo:Vt(o)||Vt(u?.metadata)})==="none"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(On,{className:"size-7 text-foreground"})}),e[0]=j):j=e[0];let g;e[1]!==r?(g=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=g):g=e[2];let E;e[3]!==r?(E=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=E):E=e[4];let b,w;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),w=s.jsx(On,{className:"size-4"}),e[5]=b,e[6]=w):(b=e[5],w=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(De,{onClick:b,children:[w,N]}),e[9]=N,e[10]=y):y=e[10];let v;e[11]!==g||e[12]!==E||e[13]!==y?(v=s.jsx(tn,{className:"h-full",image:j,title:g,description:E,actions:y}),e[11]=g,e[12]=E,e[13]=y,e[14]=v):v=e[14];let k;e[15]!==d?(k=s.jsx(sa,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let P;return e[17]!==v||e[18]!==k?(P=s.jsxs(s.Fragment,{children:[v,k]}),e[17]=v,e[18]=k,e[19]=P):P=e[19],P}let p;return e[20]!==n?(p=s.jsx(Ci,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function Uc(){const t=pe.c(2),e=ia();let n;return t[0]!==e?(n=s.jsx(Gs,{tabId:"site-editor",children:s.jsx(Js,{feature:"cms",children:s.jsx(Ri,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{Uc as default};