decocms 4.523.1 → 4.524.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (518) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-3iGXaBcM.js → ActiveShapeUtils-gwLrBsiR.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-BoecRmSu.js → AlertCircle-COLuN3Qe.js} +1 -1
  3. package/dist/client/assets/{AreaChart-MrowY4g3.js → AreaChart-Dud7jvcC.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CqjWe78l.js → ArrowLeft-BYNlToA0.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-YHdDe54G.js → ArrowUp-CRFAWnPc.js} +1 -1
  6. package/dist/client/assets/{BarChart-BouCSNlP.js → BarChart-JFNliGSV.js} +1 -1
  7. package/dist/client/assets/{Building02-jY0EsZ3c.js → Building02-DinMBe3_.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-YzghzaT-.js → CartesianChart-Cjgu2ECY.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-DSicPUkM.js → CategoricalChart-Bx8yFu23.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-Bjd4331B.js → CheckCircle-DCMOdEuL.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-C8DO4Eax.js → ChevronSelectorVertical-Dwu4Nr-2.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-D732cexR.js → ChevronUp-4EkxqYyz.js} +1 -1
  13. package/dist/client/assets/{Copy01-BNgQXLom.js → Copy01-Tog1jA1S.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-BI7UbDnJ.js → CreditCard01-B7MC6SfH.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-B4rKTO-K.js → DotsVertical-qUaZHjqd.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-DusfmiIN.js → ErrorBarContext-C1p765z-.js} +1 -1
  17. package/dist/client/assets/{Globe04-BZtelxuk.js → Globe04-CGEgYyKw.js} +1 -1
  18. package/dist/client/assets/{Image01-3jSbcDWw.js → Image01-CW7Pcq-W.js} +1 -1
  19. package/dist/client/assets/{Key01-bgf7_Io3.js → Key01-D_nzK0xg.js} +1 -1
  20. package/dist/client/assets/{Link01-CwY3-TdS.js → Link01-CpcYQ7Qt.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-gZ_Womsg.js → LinkBroken01-Ctb4MZUK.js} +1 -1
  22. package/dist/client/assets/{Minus-Cg_Z4UVA.js → Minus-DoRDGpun.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DfNea12c.js → Monitor01-L9jyZGZ2.js} +1 -1
  24. package/dist/client/assets/{Play-C58uA1z7.js → Play-Du5BNsRy.js} +1 -1
  25. package/dist/client/assets/{Plus-BjxA_ka5.js → Plus-BfnmJh1R.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-kghB-Ev4.js → ReferenceLine-DCCnHWMQ.js} +1 -1
  27. package/dist/client/assets/{SearchMd-BYu5iUPZ.js → SearchMd-JUAl7Zv6.js} +1 -1
  28. package/dist/client/assets/{Sector-B82IN8wU.js → Sector-DL6Ad47o.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-D6PcFAZ3.js → ShoppingBag01-usYkWunw.js} +1 -1
  30. package/dist/client/assets/{Sun-ryrPGG0o.js → Sun-B7TolJAG.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-OacdCVpa.js → SwitchHorizontal01-DcP8c_x_.js} +1 -1
  32. package/dist/client/assets/{Tool01-CcNuzAHc.js → Tool01-Bon-ixH5.js} +1 -1
  33. package/dist/client/assets/{Trash01-B_y6cnc0.js → Trash01-cH2tYIUn.js} +1 -1
  34. package/dist/client/assets/{Upload01-C8k7ObxF.js → Upload01-Bo60o4T6.js} +1 -1
  35. package/dist/client/assets/{UserSquare-DvQcif2z.js → UserSquare-DsAVH788.js} +1 -1
  36. package/dist/client/assets/{Users01-BuIADxiS.js → Users01-Bo_9DitT.js} +1 -1
  37. package/dist/client/assets/{XClose-CE-051ne.js → XClose-DhoOL-T1.js} +1 -1
  38. package/dist/client/assets/{ZoomOut-BBaDHidP.js → ZoomOut-B1U_CHeD.js} +1 -1
  39. package/dist/client/assets/access-gate-CGDwkzkf.js +1 -0
  40. package/dist/client/assets/{add-connection-dialog-CBWhQLk7.js → add-connection-dialog-8gQOdlVv.js} +1 -1
  41. package/dist/client/assets/agent-analytics-Bd5QSkcr.js +1 -0
  42. package/dist/client/assets/agent-app-DSGhLy_N.js +1 -0
  43. package/dist/client/assets/agent-assets-Q4lV98mF.js +1 -0
  44. package/dist/client/assets/agent-automation-Dsupi3DF.js +20 -0
  45. package/dist/client/assets/agent-automations-BonoDEyJ.js +1 -0
  46. package/dist/client/assets/agent-calendar-WpcQ_E3l.js +1 -0
  47. package/dist/client/assets/agent-connect-sources-C0oR1IIZ.js +1 -0
  48. package/dist/client/assets/agent-deck-Y0SX6UB9.js +1 -0
  49. package/dist/client/assets/agent-e2e-nbY2lllw.js +1 -0
  50. package/dist/client/assets/agent-experiments-XS7LGaQh.js +1 -0
  51. package/dist/client/assets/agent-file-DKmgj6b-.js +1 -0
  52. package/dist/client/assets/agent-hosting-BC5YnVoX.js +1 -0
  53. package/dist/client/assets/agent-icon-CVEMdYFU.js +1 -0
  54. package/dist/client/assets/agent-library-CYxkIVFl.js +1 -0
  55. package/dist/client/assets/agent-library-file-DPhxbUtG.js +1 -0
  56. package/dist/client/assets/agent-monitor-C01cwPL-.js +1 -0
  57. package/dist/client/assets/agent-overview-DU1IP4XS.js +1 -0
  58. package/dist/client/assets/agent-releases-BuXXsH8W.js +2 -0
  59. package/dist/client/assets/agent-settings-B7CchDfJ.js +1 -0
  60. package/dist/client/assets/{agent-site-editor-DrsYL7Qi.js → agent-site-editor-DSqJlDXx.js} +2 -2
  61. package/dist/client/assets/agent-site-editor-code-uiPbclqT.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-B9B2SztQ.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-CQGXtn5w.js +1 -0
  64. package/dist/client/assets/agent-view-BNK8YJ86.js +1 -0
  65. package/dist/client/assets/{agent-view-guard-Dw8f_Dem.js → agent-view-guard-Bvqt9A7d.js} +1 -1
  66. package/dist/client/assets/agents-list-BV-RY6eO.js +1 -0
  67. package/dist/client/assets/{ai-providers-DGU07bIw.js → ai-providers-D8opLVHp.js} +2 -2
  68. package/dist/client/assets/{alert-CXq7wXAP.js → alert-CYZdSIKq.js} +1 -1
  69. package/dist/client/assets/analytics-sections-BqhdlzKZ.js +1 -0
  70. package/dist/client/assets/analytics-tab-BWgFTW72.js +2 -0
  71. package/dist/client/assets/api-keys-Dj50tYQ9.js +1 -0
  72. package/dist/client/assets/api-keys-MofJBQfW.js +1 -0
  73. package/dist/client/assets/app-editor-BcJaA3eR.js +1 -0
  74. package/dist/client/assets/{asset-utils-CkfOjXdG.js → asset-utils-DcPLl2K6.js} +1 -1
  75. package/dist/client/assets/{auth-D_mwvS_K.js → auth-CEIITB7d.js} +1 -1
  76. package/dist/client/assets/{auth-catchall-ZO5v_1d8.js → auth-catchall-CEBn1SGS.js} +1 -1
  77. package/dist/client/assets/{auth-entry-B0W-KcwY.js → auth-entry-iXHgBQJV.js} +1 -1
  78. package/dist/client/assets/{auth-split-layout-EIGtHpJt.js → auth-split-layout-CsXqgaOS.js} +1 -1
  79. package/dist/client/assets/{authenticate-and-persist-oauth-BNMqjh7K.js → authenticate-and-persist-oauth-CN-ocXe3.js} +1 -1
  80. package/dist/client/assets/automation-list-row-JOMePUFR.js +1 -0
  81. package/dist/client/assets/automation-runs-KPGkDZAM.js +1 -0
  82. package/dist/client/assets/automations-BTtfVGNa.js +1 -0
  83. package/dist/client/assets/{autosend-Rn3iicpQ.js → autosend-CbkP_bEt.js} +1 -1
  84. package/dist/client/assets/{badge-CDGhoWxi.js → badge-DeNt4-FX.js} +1 -1
  85. package/dist/client/assets/{block-document-CwibGNVI.js → block-document-BzAW7wGZ.js} +3 -3
  86. package/dist/client/assets/{blocks-preview-workspace-context-D4YnI8VN.js → blocks-preview-workspace-context-aUwmyorT.js} +1 -1
  87. package/dist/client/assets/blocks-tab-states-PBqE8hLO.js +1 -0
  88. package/dist/client/assets/blog-schema-BYLQdC9S.js +1 -0
  89. package/dist/client/assets/buckets-CFL4z0d-.js +1 -0
  90. package/dist/client/assets/build-improve-prompt-doc-BpkVMxpg.js +2 -0
  91. package/dist/client/assets/{calendar-DlQTMw7m.js → calendar-GMyXKkbA.js} +1 -1
  92. package/dist/client/assets/campaigns-view-iaGM9YLd.js +1 -0
  93. package/dist/client/assets/{capability-load-error-DZqK06os.js → capability-load-error-juzFeQ-_.js} +1 -1
  94. package/dist/client/assets/category-editor-lTx7E71S.js +1 -0
  95. package/dist/client/assets/{cdn-tab-CtqgvIhC.js → cdn-tab-QH34WF_J.js} +1 -1
  96. package/dist/client/assets/{chart-Dh4qH5Sx.js → chart-D9k22T0E.js} +1 -1
  97. package/dist/client/assets/{chat-context-CEf_lJrx.js → chat-context-C56OVvQP.js} +7 -7
  98. package/dist/client/assets/{chat-draft-BWhaChdV.js → chat-draft-DNgi8tda.js} +1 -1
  99. package/dist/client/assets/{checkbox-B-X9akcX.js → checkbox-B6N4ay58.js} +1 -1
  100. package/dist/client/assets/choose-editor-CcEH03W4.js +1 -0
  101. package/dist/client/assets/{cli-auth-success-WALyW8uQ.js → cli-auth-success-CkyWspHU.js} +1 -1
  102. package/dist/client/assets/{client-icons-CrD_By3h.js → client-icons-DyjyTud6.js} +1 -1
  103. package/dist/client/assets/cms-settings-editor-CjDcV3Uq.js +1 -0
  104. package/dist/client/assets/{collapsible-D5FtbLtM.js → collapsible-D3gNdr7N.js} +1 -1
  105. package/dist/client/assets/collection-detail-D66AIxA0.js +1 -0
  106. package/dist/client/assets/collection-display-button-C28fH98T.js +1 -0
  107. package/dist/client/assets/{collection-search-RQehoVFG.js → collection-search-BIuQ3VPN.js} +1 -1
  108. package/dist/client/assets/{collection-table-wrapper-BHmn2oUB.js → collection-table-wrapper-7w5ciWB4.js} +1 -1
  109. package/dist/client/assets/{collection-tabs-BnX5iP1F.js → collection-tabs-m2567Q_Z.js} +1 -1
  110. package/dist/client/assets/{column-rules-B40MgWVZ.js → column-rules-DsLrWs5p.js} +2 -2
  111. package/dist/client/assets/{combobox-C3ljSkZg.js → combobox-BEVN0Tvl.js} +1 -1
  112. package/dist/client/assets/{command-CMb7suOV.js → command-N9BazZHl.js} +1 -1
  113. package/dist/client/assets/{companion-mcps-section-DR1Vwqzz.js → companion-mcps-section-BQyuFD3F.js} +1 -1
  114. package/dist/client/assets/{config-DqTkCyHb.js → config-BmN9tmsx.js} +1 -1
  115. package/dist/client/assets/{connect-DIta94zG.js → connect-CefgSXIv.js} +3 -3
  116. package/dist/client/assets/{connect-layout-0Ai7RfSp.js → connect-layout-CUTmKBkE.js} +1 -1
  117. package/dist/client/assets/connect-source-dialog-CBjVXCAe.js +1 -0
  118. package/dist/client/assets/{connection-DECdok_z.js → connection-CQKYiXol.js} +1 -1
  119. package/dist/client/assets/{connection-card-ygPiujfi.js → connection-card-CvmG6XsV.js} +1 -1
  120. package/dist/client/assets/connection-detail-BloLauxz.js +1 -0
  121. package/dist/client/assets/{connection-form-helpers-WwsXdB5F.js → connection-form-helpers-ytOA1Nl6.js} +1 -1
  122. package/dist/client/assets/connections-BxS3FS9g.js +1 -0
  123. package/dist/client/assets/content-tab-BwyJP-DI.js +22 -0
  124. package/dist/client/assets/context-BakNzIE5.js +1 -0
  125. package/dist/client/assets/{context-menu-DbcS2c7t.js → context-menu-C4h1P6Vl.js} +1 -1
  126. package/dist/client/assets/{context-shell-CIQyklqt.js → context-shell-BxB7W0br.js} +5 -5
  127. package/dist/client/assets/{core.esm-BtSOaBaE.js → core.esm-BYOMVmVh.js} +1 -1
  128. package/dist/client/assets/create-organization-dialog-DqU6G9od.js +1 -0
  129. package/dist/client/assets/{daily-pulse-CH8DO0J_.js → daily-pulse-BlxIy31E.js} +1 -1
  130. package/dist/client/assets/discover-DMRyKZWE.js +1 -0
  131. package/dist/client/assets/{domain-settings-CuqQkLLJ.js → domain-settings-Cj-cRa8T.js} +1 -1
  132. package/dist/client/assets/{drawer-CBUeIn2K.js → drawer-B7ajVnwC.js} +1 -1
  133. package/dist/client/assets/{editor-CxPe-Q-E.js → editor-B7sIq_vQ.js} +1 -1
  134. package/dist/client/assets/{editor-classes-BSm-iwgQ.js → editor-classes-BinXFbFk.js} +1 -1
  135. package/dist/client/assets/{empty-state-BUdzXSg1.js → empty-state-Cc_qF1X6.js} +1 -1
  136. package/dist/client/assets/{empty-state-BzCZ0bf5.js → empty-state-RpLaBfip.js} +1 -1
  137. package/dist/client/assets/experiments-tab-BlgfPezU.js +1 -0
  138. package/dist/client/assets/experiments-tab-choice-DZqY092h.js +1 -0
  139. package/dist/client/assets/{extract-connection-data-DewBd7fP.js → extract-connection-data-ClMH8dL9.js} +1 -1
  140. package/dist/client/assets/{feature-gate-Dof2Z5sB.js → feature-gate-Wo8Dn-M0.js} +1 -1
  141. package/dist/client/assets/{feature-paywall-BQmjnHPQ.js → feature-paywall-C1_xpbwO.js} +1 -1
  142. package/dist/client/assets/file-explorer-DCgzwH3u.js +2 -0
  143. package/dist/client/assets/{file-preview-BnQW8KsX.js → file-preview-DFHvVsCR.js} +1 -1
  144. package/dist/client/assets/{file-share-button-zgq85Ppa.js → file-share-button-DMtXDXf3.js} +2 -2
  145. package/dist/client/assets/{file-type-icon-CnMrgPAl.js → file-type-icon-may_hs3N.js} +1 -1
  146. package/dist/client/assets/{folder-icon-3zXSNb7F.js → folder-icon-DREaQWIx.js} +2 -2
  147. package/dist/client/assets/{form-DWfSZ-uy.js → form-Gz8fbLdb.js} +1 -1
  148. package/dist/client/assets/general-DBULqBSQ.js +1 -0
  149. package/dist/client/assets/held-block-view-DTUWWRfL.js +20 -0
  150. package/dist/client/assets/home-DnXsGhyo.js +1 -0
  151. package/dist/client/assets/{icon-button-DBmNh0NJ.js → icon-button-TQkFyvqB.js} +1 -1
  152. package/dist/client/assets/{index-cD72qupV.js → index-B9NLvHLf.js} +1 -1
  153. package/dist/client/assets/index-BEX8cmtV.js +1 -0
  154. package/dist/client/assets/index-BGcfYf5c.js +4 -0
  155. package/dist/client/assets/index-BNmzMNlZ.js +253 -0
  156. package/dist/client/assets/{index-DipIYjGn.js → index-BNtuHmZB.js} +2 -2
  157. package/dist/client/assets/{index-x6QXFiYo.js → index-C6_m0mjP.js} +1 -1
  158. package/dist/client/assets/{index-BauMDA_C.js → index-CaH8ekvn.js} +1 -1
  159. package/dist/client/assets/{index-CH1yVrTT.js → index-CqFACk2B.js} +3 -3
  160. package/dist/client/assets/{index-DPQJRb2f.js → index-DENKa8lW.js} +6 -6
  161. package/dist/client/assets/{index-Bs2VsSFp.js → index-DNHxXhrW.js} +9 -9
  162. package/dist/client/assets/{index-C6RphnDz.js → index-DgWAoWIc.js} +1 -1
  163. package/dist/client/assets/{index-Nse4lEE5.js → index-DusHyRie.js} +1 -1
  164. package/dist/client/assets/{index-DFiVcvs1.js → index-bf-OLKAU.js} +1 -1
  165. package/dist/client/assets/{index-DdwTulXb.js → index-iynQP1if.js} +1 -1
  166. package/dist/client/assets/{index-CzAA1Ftq.js → index-kd3fyZ9a.js} +1 -1
  167. package/dist/client/assets/{index-redirect-Svh2E4vz.js → index-redirect-DAPRiYQw.js} +1 -1
  168. package/dist/client/assets/{infiniteQueryObserver-BxY60Pl8.js → infiniteQueryObserver-ClGIthQz.js} +1 -1
  169. package/dist/client/assets/{infra-billing-DEwuRVXP.js → infra-billing-Bn8rlKTp.js} +1 -1
  170. package/dist/client/assets/{input-Y4nlSnES.js → input-BS4EACP3.js} +7 -7
  171. package/dist/client/assets/{input-boV3L7bW.js → input-DZSiMfCa.js} +1 -1
  172. package/dist/client/assets/{integration-icon-oEHZLv8F.js → integration-icon-BrTM8z-s.js} +1 -1
  173. package/dist/client/assets/{jira-icon-BkogXsHX.js → jira-icon-CvveHm37.js} +1 -1
  174. package/dist/client/assets/{label-C6V9azY9.js → label-BCxqhVIq.js} +1 -1
  175. package/dist/client/assets/{layout-D4-0fnKG.js → layout-C_-T37yU.js} +1 -1
  176. package/dist/client/assets/legacy-agents-deep-HN0h-Vgf.js +1 -0
  177. package/dist/client/assets/{legacy-main-redirect-DPDO4jzz.js → legacy-main-redirect-HqwAGFUC.js} +1 -1
  178. package/dist/client/assets/library-D2Mrm5WM.js +1 -0
  179. package/dist/client/assets/{login-QwQdytNu.js → login-D25rkjo_.js} +1 -1
  180. package/dist/client/assets/{markdown-DVKH1IaR.js → markdown-P8cO0xLZ.js} +1 -1
  181. package/dist/client/assets/{mcp-app-renderer-DXX6eros.js → mcp-app-renderer-CKUvsXnq.js} +2 -2
  182. package/dist/client/assets/{mcp-oauth-BT1yV9Hn.js → mcp-oauth-C9hLQucs.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-CP_tf4jd.js → mcp-oauth-DBMA8wIh.js} +1 -1
  184. package/dist/client/assets/members-C_tx9w5g.js +1 -0
  185. package/dist/client/assets/{memory-C50Pawnh.js → memory-CsXGZJq1.js} +2 -2
  186. package/dist/client/assets/{mini-report-page-CAjqwv4W.js → mini-report-page-DGZYey3l.js} +1 -1
  187. package/dist/client/assets/{mock-board-D3aM5LBD.js → mock-board-BWzTY2k-.js} +5 -5
  188. package/dist/client/assets/{monaco-editor-LiopisRR.js → monaco-editor-CBJkBgIU.js} +2 -2
  189. package/dist/client/assets/monitoring-BLnrFAQj.js +1 -0
  190. package/dist/client/assets/{monitoring-stats-row-zg7N0blo.js → monitoring-stats-row-vWHUOUB3.js} +1 -1
  191. package/dist/client/assets/{multi-select-lVxVaMtl.js → multi-select-BNfLnIfI.js} +1 -1
  192. package/dist/client/assets/mustache-Crsi4VAX.js +4 -0
  193. package/dist/client/assets/{named-rule-uses-BeXmyiue.js → named-rule-uses-D5gjZwOp.js} +1 -1
  194. package/dist/client/assets/named-rule-view-BVCpec2I.js +1 -0
  195. package/dist/client/assets/{new-project-dialog-DmsgoraK.js → new-project-dialog-BzJmdXI6.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-Bs2w3d0I.js → oauth-callback-CwZ-b3nE.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-ai-provider-CUCvxuBI.js → oauth-callback-ai-provider-CujNNAU2.js} +1 -1
  198. package/dist/client/assets/onboarding-Csy3KW6h.js +1 -0
  199. package/dist/client/assets/openai-conversation-DJfgyA82.js +3 -0
  200. package/dist/client/assets/{optimistic-project-sidebar-views-C7cacXI0.js → optimistic-project-sidebar-views-XzUayXF_.js} +1 -1
  201. package/dist/client/assets/{order-monitor-day-D34Jke5D.js → order-monitor-day-BUk1fjA6.js} +1 -1
  202. package/dist/client/assets/organization-choice-BG-EMl8L.js +1 -0
  203. package/dist/client/assets/orgs-BOi51Yxa.js +1 -0
  204. package/dist/client/assets/page-seo-form-D4gneorY.js +1 -0
  205. package/dist/client/assets/{pair-71Dh0mlf.js → pair-Dh_1oqHi.js} +8 -8
  206. package/dist/client/assets/parse-sections-B30A8ECY.js +1 -0
  207. package/dist/client/assets/plan-BXu8SQ3T.js +1 -0
  208. package/dist/client/assets/{plan-ladder-DMra4X10.js → plan-ladder-CN5p5ylK.js} +1 -1
  209. package/dist/client/assets/{popover-DClINcvR.js → popover-DauDBkON.js} +1 -1
  210. package/dist/client/assets/post-calendar-Ceopsk1u.js +1 -0
  211. package/dist/client/assets/post-editor-BChaRDNt.js +2 -0
  212. package/dist/client/assets/{preview-content-T_PMJBX-.js → preview-content-BvhoJjFR.js} +1 -1
  213. package/dist/client/assets/{preview-dialog-BZFfGFuX.js → preview-dialog-iRKqzeeN.js} +1 -1
  214. package/dist/client/assets/{preview-panel-DlTtP1Ms.js → preview-panel-DcbhbW1H.js} +1 -1
  215. package/dist/client/assets/preview-tab-ClK0lOMy.js +551 -0
  216. package/dist/client/assets/{product-picker-dialog-BpSOLmzl.js → product-picker-dialog-CsTqbwXT.js} +1 -1
  217. package/dist/client/assets/profile-DE1V4tEF.js +1 -0
  218. package/dist/client/assets/project-app-view-BpeI5cMf.js +1 -0
  219. package/dist/client/assets/{project-apps-Dm5IS3KO.js → project-apps-CNRV3DAE.js} +1 -1
  220. package/dist/client/assets/project-feed-BcaTqzKD.js +1 -0
  221. package/dist/client/assets/{project-icon-DuRHj8pv.js → project-icon-9kbQzXfH.js} +1 -1
  222. package/dist/client/assets/project-reports-DZCmLCmE.js +1 -0
  223. package/dist/client/assets/project-tasks-D6qNETK3.js +1 -0
  224. package/dist/client/assets/projects-Kz2HQD_e.js +1 -0
  225. package/dist/client/assets/{projects-empty-state-QJ0Cx8Z2.js → projects-empty-state-Df7eS0pA.js} +1 -1
  226. package/dist/client/assets/{prompts-C9l1TNag.js → prompts-B4KLkb4I.js} +1 -1
  227. package/dist/client/assets/record-editor-C5XOx_LV.js +1 -0
  228. package/dist/client/assets/redirect-editor-BxKT3ntE.js +1 -0
  229. package/dist/client/assets/releases-api-BDl7LEw1.js +1 -0
  230. package/dist/client/assets/{reports-BOvqWT5T.js → reports-Cp14zg57.js} +1 -1
  231. package/dist/client/assets/reports-DBFNTtm-.js +1 -0
  232. package/dist/client/assets/reports-onboarding-D2UqC4mS.js +1 -0
  233. package/dist/client/assets/reports-tab-C51R-6vi.js +2 -0
  234. package/dist/client/assets/repositories-C77B6dOt.js +1 -0
  235. package/dist/client/assets/repositories-CHKGn0VU.js +1 -0
  236. package/dist/client/assets/repository-binding-BZ7FmJ0X.js +1 -0
  237. package/dist/client/assets/{repository-import-picker-DmCy1J1K.js → repository-import-picker-Bjws7k2-.js} +1 -1
  238. package/dist/client/assets/repository-picker-DkvIZLAj.js +1 -0
  239. package/dist/client/assets/{require-capability-Bij86NMO.js → require-capability-Bm5pde_M.js} +1 -1
  240. package/dist/client/assets/{required-auth-layout-FVugTURm.js → required-auth-layout-Dn8nNstE.js} +1 -1
  241. package/dist/client/assets/{reset-password-DT6AfwVB.js → reset-password-CHMCFAp9.js} +1 -1
  242. package/dist/client/assets/{resizable-DgP86V61.js → resizable-BYZDi11K.js} +1 -1
  243. package/dist/client/assets/{resolve-tab-icon-D9iIIIDe.js → resolve-tab-icon-DLcHhSBW.js} +1 -1
  244. package/dist/client/assets/review-settings-DEFTQSp0.js +1 -0
  245. package/dist/client/assets/roles-BIj8m30-.js +1 -0
  246. package/dist/client/assets/route-CwIKlFpH.js +1 -0
  247. package/dist/client/assets/route-DQxiKHs8.js +1 -0
  248. package/dist/client/assets/route-L2EzRsks.js +1 -0
  249. package/dist/client/assets/{sandbox-lifecycle-context-q0eTvNvQ.js → sandbox-lifecycle-context-DMfngoi-.js} +1 -1
  250. package/dist/client/assets/{schema-CJ53G47b.js → schema-DEyBWI2y.js} +1 -1
  251. package/dist/client/assets/{schema-DNweLWtn.js → schema-DoiqvTL7.js} +1 -1
  252. package/dist/client/assets/{scroll-area-BHIKiLUM.js → scroll-area-Cfsm1vBV.js} +1 -1
  253. package/dist/client/assets/search-input-DBKkXR0y.js +1 -0
  254. package/dist/client/assets/{search-toggle-DzUrEZFD.js → search-toggle-CzYTwp_L.js} +1 -1
  255. package/dist/client/assets/secret-ciphertext-cTA7BSVY.js +1 -0
  256. package/dist/client/assets/secret-picker-CqxG24X7.js +1 -0
  257. package/dist/client/assets/secrets-CtByih4R.js +1 -0
  258. package/dist/client/assets/{sections-DHvRm7bA.js → sections-CCcpB_PT.js} +1 -1
  259. package/dist/client/assets/sections-editor-DpO_mTF7.js +1 -0
  260. package/dist/client/assets/{select-BvUL0HyR.js → select-CTAm_W2d.js} +1 -1
  261. package/dist/client/assets/{select-model-Szkl3757.js → select-model-Cvj2OnbU.js} +1 -1
  262. package/dist/client/assets/seo-editor-BPToAJRY.js +1 -0
  263. package/dist/client/assets/{separator-vlhb1Tzj.js → separator-BeYssz5V.js} +1 -1
  264. package/dist/client/assets/settings-tab-BRtykuoH.js +1 -0
  265. package/dist/client/assets/{sheet-D1CAQsjr.js → sheet-C52S-h6R.js} +1 -1
  266. package/dist/client/assets/shell-layout-DYY0I41_.js +1 -0
  267. package/dist/client/assets/site-draft-actions-DwqQ-cQC.js +12 -0
  268. package/dist/client/assets/site-draft-view-CiKU2Icp.js +2 -0
  269. package/dist/client/assets/site-editor-CuXmo07G.js +1 -0
  270. package/dist/client/assets/site-editor-toast-CT4NtD1f.js +1 -0
  271. package/dist/client/assets/skills-_WDetSCi.js +1 -0
  272. package/dist/client/assets/{slider-EpxmA7ZL.js → slider-rNbrBC-4.js} +1 -1
  273. package/dist/client/assets/{sortable.esm-CpdZxqSN.js → sortable.esm-Cw5kBwgn.js} +1 -1
  274. package/dist/client/assets/sso-DSG3YPMw.js +1 -0
  275. package/dist/client/assets/{suggestion-DqRsSpc-.js → suggestion-Dd_Uy5Bv.js} +2 -2
  276. package/dist/client/assets/{switch-BudKCJf7.js → switch-nUFQi60k.js} +1 -1
  277. package/dist/client/assets/{symbol-CYQiJJdu.js → symbol-C3kEOGZ_.js} +1 -1
  278. package/dist/client/assets/synced-repos-DBmibobg.js +1 -0
  279. package/dist/client/assets/{tab-icon-glyph-BGGv8hr_.js → tab-icon-glyph-Bzpngl6a.js} +1 -1
  280. package/dist/client/assets/{table-Bo_p8Wa3.js → table-CxQHf5NT.js} +1 -1
  281. package/dist/client/assets/{tabs-BTB5YGW1.js → tabs-BwD6LFyC.js} +1 -1
  282. package/dist/client/assets/task-assignee-avatar-Bg9ijzoY.js +1 -0
  283. package/dist/client/assets/{task-board-Ds21WWvc.js → task-board-DreQgJBj.js} +1 -1
  284. package/dist/client/assets/{task-route-BUL4mDi5.js → task-route-B6QYswnx.js} +1 -1
  285. package/dist/client/assets/{task-status-CK5oSIgi.js → task-status-DcCdeelW.js} +1 -1
  286. package/dist/client/assets/taskboard-analytics-C_aUAX7S.js +1 -0
  287. package/dist/client/assets/tasks-CYY9XlJ3.js +4 -0
  288. package/dist/client/assets/tasks-CeouZ3tS.js +1 -0
  289. package/dist/client/assets/{textarea-BS7I3MZL.js → textarea-y7TWtoua.js} +1 -1
  290. package/dist/client/assets/thread-analytics-BD8n1a8E.js +1 -0
  291. package/dist/client/assets/{thread-intent-C0R8BtBw.js → thread-intent-cB2EtHpg.js} +6 -6
  292. package/dist/client/assets/thread-route-Cr5f3jw8.js +1 -0
  293. package/dist/client/assets/{thread-route-yHr3Xqpq.js → thread-route-D01w_vQB.js} +1 -1
  294. package/dist/client/assets/thread-sheet-body-C0IyWshl.js +1 -0
  295. package/dist/client/assets/{time-range-picker-C_RAU_JZ.js → time-range-picker-bp6BeGMC.js} +1 -1
  296. package/dist/client/assets/toggle-group-BIu6qfZV.js +1 -0
  297. package/dist/client/assets/{tool-namespace-B1sVq59x.js → tool-namespace-Crbzrqv8.js} +1 -1
  298. package/dist/client/assets/{toolbar-icon-button-D4YToeEY.js → toolbar-icon-button-ByMmG3VL.js} +1 -1
  299. package/dist/client/assets/{tooltip-CmTwSHYA.js → tooltip-DibJz0Jl.js} +1 -1
  300. package/dist/client/assets/{tooltipContext-C41VBtBA.js → tooltipContext-BzrsG1UN.js} +1 -1
  301. package/dist/client/assets/track-C-8tVJFa.js +1 -0
  302. package/dist/client/assets/{types-05YrcBTZ.js → types-BdOsWOEi.js} +9 -9
  303. package/dist/client/assets/{url-slug-BQQBxd5s.js → url-slug-CPCergXm.js} +1 -1
  304. package/dist/client/assets/{usage-stats-DTNxQXdY.js → usage-stats-DDafRqWC.js} +7 -7
  305. package/dist/client/assets/{use-ai-providers-BdMI1dJ8.js → use-ai-providers-Bsehd5pg.js} +1 -1
  306. package/dist/client/assets/use-apply-named-rule-CeNTU7vM.js +1 -0
  307. package/dist/client/assets/{use-automations-7sML6axw.js → use-automations-BscjsX1o.js} +1 -1
  308. package/dist/client/assets/use-autosave-D0y0c0lt.js +1 -0
  309. package/dist/client/assets/{use-chat-layout-state-DuWKLw_d.js → use-chat-layout-state-DpOxQYv4.js} +1 -1
  310. package/dist/client/assets/{use-clock-tick-Cqy994m5.js → use-clock-tick-jRUiEK1v.js} +1 -1
  311. package/dist/client/assets/{use-connect-companion-B7-Rnq6I.js → use-connect-companion-BGtpVGmA.js} +1 -1
  312. package/dist/client/assets/use-connection-CAR6Cxbr.js +1 -0
  313. package/dist/client/assets/{use-content-sync-DxuiTsAP.js → use-content-sync-bYlxy6np.js} +1 -1
  314. package/dist/client/assets/{use-copy-ByMN8ZBl.js → use-copy-Dpm_jhm-.js} +1 -1
  315. package/dist/client/assets/{use-create-virtual-mcp-UGWMFU-8.js → use-create-virtual-mcp-DcCX7uo7.js} +1 -1
  316. package/dist/client/assets/use-date-fns-locale-hUyExEVb.js +1 -0
  317. package/dist/client/assets/{use-debounced-autosave-DN6l6XR3.js → use-debounced-autosave-By6os5xD.js} +1 -1
  318. package/dist/client/assets/{use-debounced-value-3kPVK8wc.js → use-debounced-value-BtR2lyTj.js} +1 -1
  319. package/dist/client/assets/use-deco-credits-DRIA1g3T.js +1 -0
  320. package/dist/client/assets/{use-decopilot-events-DH9vtuqj.js → use-decopilot-events-C4OBhauN.js} +1 -1
  321. package/dist/client/assets/use-delete-connection-BM5PcuGQ.js +1 -0
  322. package/dist/client/assets/{use-deployment-admin-BlS14Krh.js → use-deployment-admin-BmDeutjQ.js} +1 -1
  323. package/dist/client/assets/{use-fast-preview-draft-url-8Q6wI_7_.js → use-fast-preview-draft-url-BUDoPHon.js} +1 -1
  324. package/dist/client/assets/{use-file-configs-BJwH2-6c.js → use-file-configs-CuVchUT-.js} +1 -1
  325. package/dist/client/assets/{use-inbox-feed-BbsXPNFF.js → use-inbox-feed-Bi03vVLM.js} +1 -1
  326. package/dist/client/assets/{use-infinite-scroll-D-NkL7pd.js → use-infinite-scroll-0YRynoMy.js} +1 -1
  327. package/dist/client/assets/use-join-requests-BhMSzUBO.js +1 -0
  328. package/dist/client/assets/use-main-panel-tabs-QcdwwtJ8.js +1 -0
  329. package/dist/client/assets/{use-mcp-auth-status-SDpJIu0o.js → use-mcp-auth-status-Ddp-NElL.js} +1 -1
  330. package/dist/client/assets/{use-mcp-client-CqNgp7C3.js → use-mcp-client-ClU7gdfw.js} +10 -10
  331. package/dist/client/assets/{use-mcp-prompts-_OL9f0kB.js → use-mcp-prompts-CFFfSPcj.js} +1 -1
  332. package/dist/client/assets/{use-mcp-tools-CzxPUwUO.js → use-mcp-tools-CsGOzrhW.js} +1 -1
  333. package/dist/client/assets/{use-mobile-DpTfSAm7.js → use-mobile-nW9hYb6L.js} +1 -1
  334. package/dist/client/assets/use-move-blocks-BKlQlSno.js +1 -0
  335. package/dist/client/assets/{use-navigate-to-agent-CblBUgFe.js → use-navigate-to-agent-CvuO-uuz.js} +1 -1
  336. package/dist/client/assets/{use-open-billing-url-C8vpSsvJ.js → use-open-billing-url-6zduD8ZA.js} +1 -1
  337. package/dist/client/assets/{use-org-fs-BwLqCU_I.js → use-org-fs-BcT14y41.js} +1 -1
  338. package/dist/client/assets/{use-org-repo-syncs-Cg7khzRw.js → use-org-repo-syncs-BdTpYW4-.js} +1 -1
  339. package/dist/client/assets/{use-org-sso-CXvlVlUi.js → use-org-sso-DdzTjSOo.js} +1 -1
  340. package/dist/client/assets/use-organization-roles-DQlsWqEE.js +1 -0
  341. package/dist/client/assets/{use-organization-settings-R35CeX0x.js → use-organization-settings-DeXdcCtZ.js} +1 -1
  342. package/dist/client/assets/{use-panel-navigate-DcAwEhOb.js → use-panel-navigate-BrjENNrA.js} +1 -1
  343. package/dist/client/assets/{use-project-native-view-presence-B1h5Pugj.js → use-project-native-view-presence-OgGOYaV4.js} +1 -1
  344. package/dist/client/assets/{use-project-scope-COq2XQVT.js → use-project-scope-DryffHrf.js} +1 -1
  345. package/dist/client/assets/{use-recent-apps-DQiepK1I.js → use-recent-apps-CMgGjBH4.js} +1 -1
  346. package/dist/client/assets/{use-releases-CXFA4FcN.js → use-releases-BQePeR_j.js} +1 -1
  347. package/dist/client/assets/use-reports-diagnostic-KZB3C_26.js +1 -0
  348. package/dist/client/assets/{use-sandbox-events-wT6wBZge.js → use-sandbox-events-ClbDdVRn.js} +2 -2
  349. package/dist/client/assets/{use-secrets-Dti2Zjt-.js → use-secrets-Cjihb12f.js} +1 -1
  350. package/dist/client/assets/use-section-preview-base-go9VMYa4.js +1 -0
  351. package/dist/client/assets/use-session-runtime-CQOTzbKn.js +1 -0
  352. package/dist/client/assets/{use-sidebar-collapsed-DCvF-wFz.js → use-sidebar-collapsed-CUSnfCt-.js} +1 -1
  353. package/dist/client/assets/{use-tags-Dkh7i4b9.js → use-tags-CMyUN8Qd.js} +1 -1
  354. package/dist/client/assets/use-task-board-analytics-BWzR51Kh.js +1 -0
  355. package/dist/client/assets/{use-task-board-events-BTnll7tY.js → use-task-board-events-DlFBtyOL.js} +1 -1
  356. package/dist/client/assets/{use-task-board-item-prs-DV52O8jk.js → use-task-board-item-prs-D9Aj6NRX.js} +1 -1
  357. package/dist/client/assets/{use-task-metadata-L677N_ml.js → use-task-metadata-DcdDwiSS.js} +1 -1
  358. package/dist/client/assets/{use-thread-analytics-BZBVj7t2.js → use-thread-analytics-cLhxQI8B.js} +1 -1
  359. package/dist/client/assets/{use-thread-outputs-DkwE9vVN.js → use-thread-outputs-D8Bvo55q.js} +1 -1
  360. package/dist/client/assets/useInfiniteQuery-DWVaUM2t.js +1 -0
  361. package/dist/client/assets/useQueries-B8DPRYfS.js +1 -0
  362. package/dist/client/assets/useSuspenseInfiniteQuery-6Ovi3jRe.js +1 -0
  363. package/dist/client/assets/users-BIP3dsuH.js +1 -0
  364. package/dist/client/assets/{utils-JJWwAhjH.js → utils-DeFulDMz.js} +1 -1
  365. package/dist/client/assets/variant-calendar-C37bfPDk.js +1 -0
  366. package/dist/client/assets/variant-matcher-override-B4pYtxaz.js +1 -0
  367. package/dist/client/assets/{virtual-mcp-DhxG1LUt.js → virtual-mcp-D_aBBfQL.js} +1 -1
  368. package/dist/client/assets/{watch-sse-pool-HmUSWdEg.js → watch-sse-pool-Bk0Yni6j.js} +1 -1
  369. package/dist/client/index.html +1 -1
  370. package/dist/server/server.js +783 -783
  371. package/package.json +1 -1
  372. package/dist/client/assets/User01-B5NngWXw.js +0 -1
  373. package/dist/client/assets/access-gate-CXvtA9IQ.js +0 -1
  374. package/dist/client/assets/agent-analytics-BRVR9Nm7.js +0 -1
  375. package/dist/client/assets/agent-app-Wibq0OFa.js +0 -1
  376. package/dist/client/assets/agent-assets-Bj5Luz-W.js +0 -1
  377. package/dist/client/assets/agent-automation-Dr4Y6VGJ.js +0 -20
  378. package/dist/client/assets/agent-automations-FAc-0hCc.js +0 -1
  379. package/dist/client/assets/agent-calendar-D7DufZS_.js +0 -1
  380. package/dist/client/assets/agent-connect-sources-B2TBus9P.js +0 -1
  381. package/dist/client/assets/agent-deck-BQ7xD_0N.js +0 -1
  382. package/dist/client/assets/agent-e2e-Xz5_DbBd.js +0 -1
  383. package/dist/client/assets/agent-experiments-DMb-JH-W.js +0 -1
  384. package/dist/client/assets/agent-file-jmWEmVy9.js +0 -1
  385. package/dist/client/assets/agent-hosting-Jt1eRL4L.js +0 -1
  386. package/dist/client/assets/agent-icon-D9qv9iJQ.js +0 -1
  387. package/dist/client/assets/agent-library-CYOoJcrp.js +0 -1
  388. package/dist/client/assets/agent-library-file-CHPq6ELL.js +0 -1
  389. package/dist/client/assets/agent-monitor-Bxvs2XHa.js +0 -1
  390. package/dist/client/assets/agent-overview-BNrr8sDt.js +0 -1
  391. package/dist/client/assets/agent-releases-BusIaoNs.js +0 -2
  392. package/dist/client/assets/agent-settings-CCQqUf-q.js +0 -1
  393. package/dist/client/assets/agent-site-editor-code-CX9PY1d_.js +0 -2
  394. package/dist/client/assets/agent-site-editor-content-qNC8jZls.js +0 -1
  395. package/dist/client/assets/agent-site-editor-preview-DhMNzXt9.js +0 -1
  396. package/dist/client/assets/agent-view-CI9h5gAx.js +0 -1
  397. package/dist/client/assets/agents-list-DYyNDxTw.js +0 -1
  398. package/dist/client/assets/alert-dialog-BBFgXAmX.js +0 -7
  399. package/dist/client/assets/analytics-sections-czReTaOZ.js +0 -1
  400. package/dist/client/assets/analytics-tab-C1nax7x3.js +0 -2
  401. package/dist/client/assets/api-keys-f3ViWnh0.js +0 -1
  402. package/dist/client/assets/api-keys-qNGMRqbx.js +0 -1
  403. package/dist/client/assets/app-editor-D1Zrm2TM.js +0 -1
  404. package/dist/client/assets/automation-list-row-CiF6h_o_.js +0 -1
  405. package/dist/client/assets/automation-runs-BqVYPzh9.js +0 -1
  406. package/dist/client/assets/automations-BHFkDeZ2.js +0 -1
  407. package/dist/client/assets/avatar-DsyxJdd5.js +0 -1
  408. package/dist/client/assets/blocks-tab-states-_rQb-3nf.js +0 -1
  409. package/dist/client/assets/blog-schema-hiJ1VvK3.js +0 -1
  410. package/dist/client/assets/buckets-Cgqz5f6M.js +0 -1
  411. package/dist/client/assets/build-improve-prompt-doc-Cx1NA6_T.js +0 -2
  412. package/dist/client/assets/campaigns-view-Bn067WyB.js +0 -1
  413. package/dist/client/assets/category-editor-Co3bRfpu.js +0 -1
  414. package/dist/client/assets/choose-editor-DZmSFlJ2.js +0 -1
  415. package/dist/client/assets/cms-settings-editor-B1PCbkSm.js +0 -1
  416. package/dist/client/assets/collection-detail-DtWJ8lB6.js +0 -1
  417. package/dist/client/assets/collection-display-button-BaC3Lby-.js +0 -1
  418. package/dist/client/assets/connect-source-dialog-DjtB0gt2.js +0 -1
  419. package/dist/client/assets/connection-detail-C9scWK5j.js +0 -1
  420. package/dist/client/assets/connections-BQjNaGS9.js +0 -1
  421. package/dist/client/assets/content-tab-CAW0Bhf6.js +0 -22
  422. package/dist/client/assets/context-ddLbYTQy.js +0 -1
  423. package/dist/client/assets/create-organization-dialog-B1J3dbRj.js +0 -1
  424. package/dist/client/assets/differenceInSeconds-C3x8sHUj.js +0 -1
  425. package/dist/client/assets/discover-DORJ6GMD.js +0 -1
  426. package/dist/client/assets/experiments-tab-WOPYssza.js +0 -1
  427. package/dist/client/assets/experiments-tab-choice-CI25uYfH.js +0 -1
  428. package/dist/client/assets/file-explorer-CtLkW4hH.js +0 -2
  429. package/dist/client/assets/format-time-Cq80KKvY.js +0 -1
  430. package/dist/client/assets/general-CANWkC13.js +0 -1
  431. package/dist/client/assets/home-BFodRKhb.js +0 -1
  432. package/dist/client/assets/index-5D9wIy3o.js +0 -1
  433. package/dist/client/assets/index-BAmB740B.js +0 -243
  434. package/dist/client/assets/index-CkPVfANw.js +0 -4
  435. package/dist/client/assets/legacy-agents-deep-oTGqQAve.js +0 -1
  436. package/dist/client/assets/library-BNLBVJPY.js +0 -1
  437. package/dist/client/assets/members-B1ZJujYN.js +0 -1
  438. package/dist/client/assets/monitoring-B7vBtbj0.js +0 -1
  439. package/dist/client/assets/mustache-D4PpoYZo.js +0 -4
  440. package/dist/client/assets/named-rule-view-BD9ako2G.js +0 -1
  441. package/dist/client/assets/onboarding-BUhC7Axs.js +0 -1
  442. package/dist/client/assets/openai-conversation-D40-j2aL.js +0 -3
  443. package/dist/client/assets/organization-choice-CZm6-Lsp.js +0 -1
  444. package/dist/client/assets/orgs-BzS4vgpT.js +0 -1
  445. package/dist/client/assets/page-seo-form-UBTBjVc2.js +0 -1
  446. package/dist/client/assets/parse-sections-C7SJnlZ7.js +0 -1
  447. package/dist/client/assets/plan-6YWkk0Z5.js +0 -1
  448. package/dist/client/assets/post-calendar-l09Ocu-Z.js +0 -1
  449. package/dist/client/assets/post-editor-B5DakPnS.js +0 -2
  450. package/dist/client/assets/preview-tab-DE5CyvZI.js +0 -551
  451. package/dist/client/assets/profile-l7YzIikv.js +0 -1
  452. package/dist/client/assets/project-app-view-CZ4ncHJw.js +0 -1
  453. package/dist/client/assets/project-feed-B429synm.js +0 -1
  454. package/dist/client/assets/project-reports-BqcstnBp.js +0 -1
  455. package/dist/client/assets/project-tasks-0lrWUpFL.js +0 -1
  456. package/dist/client/assets/projects-s6UXfr6V.js +0 -1
  457. package/dist/client/assets/record-editor-BBAM6dba.js +0 -1
  458. package/dist/client/assets/redirect-editor-Da8bdxGX.js +0 -1
  459. package/dist/client/assets/releases-api-BTCDyPHo.js +0 -1
  460. package/dist/client/assets/reports-CBo7lxtK.js +0 -1
  461. package/dist/client/assets/reports-onboarding-D9oUufsD.js +0 -1
  462. package/dist/client/assets/reports-tab-DT51kjgE.js +0 -2
  463. package/dist/client/assets/repositories-CM9WvII2.js +0 -1
  464. package/dist/client/assets/repositories-bGHlY3pM.js +0 -1
  465. package/dist/client/assets/repository-binding-BgJ8uAoU.js +0 -1
  466. package/dist/client/assets/repository-picker-BvSncDst.js +0 -1
  467. package/dist/client/assets/review-settings-DdYgJGVz.js +0 -1
  468. package/dist/client/assets/roles-CgVcsOdT.js +0 -1
  469. package/dist/client/assets/route-CkFix_vP.js +0 -1
  470. package/dist/client/assets/route-DODiDy-j.js +0 -1
  471. package/dist/client/assets/route-DVi1VWR6.js +0 -1
  472. package/dist/client/assets/runnable-block-editor-dRq9eTzq.js +0 -20
  473. package/dist/client/assets/search-input-BAISJ9LS.js +0 -1
  474. package/dist/client/assets/secret-ciphertext-BoA15qGd.js +0 -1
  475. package/dist/client/assets/secret-picker-Cdv3xW0U.js +0 -1
  476. package/dist/client/assets/secrets-C7hm_npZ.js +0 -1
  477. package/dist/client/assets/sections-editor-DgEGZXcq.js +0 -4
  478. package/dist/client/assets/seo-editor-BLHMI9qj.js +0 -1
  479. package/dist/client/assets/settings-tab-Dx6WgZsi.js +0 -1
  480. package/dist/client/assets/shell-layout-B5jnML3d.js +0 -1
  481. package/dist/client/assets/site-draft-actions-D1d2wytY.js +0 -12
  482. package/dist/client/assets/site-draft-view-DmMlvXzq.js +0 -2
  483. package/dist/client/assets/site-editor-eGFXfzA8.js +0 -1
  484. package/dist/client/assets/site-editor-toast-CGZS9BwD.js +0 -1
  485. package/dist/client/assets/skills-NSxr4Z0X.js +0 -1
  486. package/dist/client/assets/sso-BHFwYob2.js +0 -1
  487. package/dist/client/assets/synced-repos-D-U5QZg2.js +0 -1
  488. package/dist/client/assets/task-assignee-avatar-CAj5yPyc.js +0 -1
  489. package/dist/client/assets/taskboard-analytics-D6UWbvQC.js +0 -1
  490. package/dist/client/assets/tasks-CMUaHBkk.js +0 -4
  491. package/dist/client/assets/tasks-D5WIQI-o.js +0 -1
  492. package/dist/client/assets/thread-analytics-Cqdeb287.js +0 -1
  493. package/dist/client/assets/thread-route-DnoU0Lqn.js +0 -1
  494. package/dist/client/assets/thread-sheet-body-BBHV5kVE.js +0 -1
  495. package/dist/client/assets/toggle-group-BcfSAKQP.js +0 -1
  496. package/dist/client/assets/track-DZvu8ree.js +0 -1
  497. package/dist/client/assets/use-apply-named-rule-pRgVjxXf.js +0 -1
  498. package/dist/client/assets/use-autosave-DMApQf0t.js +0 -1
  499. package/dist/client/assets/use-connection-DQSt0eTw.js +0 -1
  500. package/dist/client/assets/use-date-fns-locale-C0oymQ59.js +0 -1
  501. package/dist/client/assets/use-deco-credits-CT72rZSv.js +0 -1
  502. package/dist/client/assets/use-delete-connection-D5mcm_l_.js +0 -1
  503. package/dist/client/assets/use-join-requests-C-xyNeji.js +0 -1
  504. package/dist/client/assets/use-main-panel-tabs-DvsYVOuQ.js +0 -1
  505. package/dist/client/assets/use-members-CTltnPbx.js +0 -1
  506. package/dist/client/assets/use-move-blocks-YDfVWv8x.js +0 -1
  507. package/dist/client/assets/use-org-auth-client-Bi3e38-G.js +0 -1
  508. package/dist/client/assets/use-organization-roles-zn84F9HK.js +0 -1
  509. package/dist/client/assets/use-reports-diagnostic-Dwax0vDS.js +0 -1
  510. package/dist/client/assets/use-section-preview-base-CFzMfuNP.js +0 -1
  511. package/dist/client/assets/use-session-runtime-Ba_EwQTc.js +0 -1
  512. package/dist/client/assets/use-task-board-analytics-Bqx8wPMm.js +0 -1
  513. package/dist/client/assets/useInfiniteQuery-D-VWsr8W.js +0 -1
  514. package/dist/client/assets/useQueries-jXxHGDMF.js +0 -1
  515. package/dist/client/assets/useSuspenseInfiniteQuery-mJC6qHan.js +0 -1
  516. package/dist/client/assets/users-T5camo9f.js +0 -1
  517. package/dist/client/assets/variant-calendar-BgT-KS6e.js +0 -1
  518. package/dist/client/assets/variant-matcher-override-CgViiiNQ.js +0 -1
@@ -0,0 +1,551 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-DpO_mTF7.js","assets/index-BNmzMNlZ.js","assets/index-BQfNeaI1.css","assets/chat-context-C56OVvQP.js","assets/use-panel-navigate-BrjENNrA.js","assets/thread-route-D01w_vQB.js","assets/use-project-scope-DryffHrf.js","assets/repository-binding-BZ7FmJ0X.js","assets/use-mcp-client-ClU7gdfw.js","assets/auth-CEIITB7d.js","assets/autosend-CbkP_bEt.js","assets/thread-intent-cB2EtHpg.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-Bk0Yni6j.js","assets/task-board-DreQgJBj.js","assets/schema-DoiqvTL7.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-C4OBhauN.js","assets/use-ai-providers-Bsehd5pg.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-DeXdcCtZ.js","assets/held-block-view-DTUWWRfL.js","assets/utils-DeFulDMz.js","assets/ZoomOut-B1U_CHeD.js","assets/Image01-CW7Pcq-W.js","assets/agent-icon-CVEMdYFU.js","assets/AlertCircle-COLuN3Qe.js","assets/Tool01-Bon-ixH5.js","assets/ArrowUp-CRFAWnPc.js","assets/ArrowLeft-BYNlToA0.js","assets/LinkBroken01-Ctb4MZUK.js","assets/ShoppingBag01-usYkWunw.js","assets/Building02-DinMBe3_.js","assets/CheckCircle-DCMOdEuL.js","assets/ChevronUp-4EkxqYyz.js","assets/ChevronSelectorVertical-Dwu4Nr-2.js","assets/UserSquare-DsAVH788.js","assets/Copy01-Tog1jA1S.js","assets/CreditCard01-B7MC6SfH.js","assets/DotsVertical-qUaZHjqd.js","assets/Globe04-CGEgYyKw.js","assets/SwitchHorizontal01-DcP8c_x_.js","assets/Key01-D_nzK0xg.js","assets/Link01-CpcYQ7Qt.js","assets/Minus-DoRDGpun.js","assets/Monitor01-L9jyZGZ2.js","assets/Sun-B7TolJAG.js","assets/Play-Du5BNsRy.js","assets/Plus-BfnmJh1R.js","assets/SearchMd-JUAl7Zv6.js","assets/Trash01-cH2tYIUn.js","assets/Upload01-Bo60o4T6.js","assets/Users01-Bo_9DitT.js","assets/XClose-DhoOL-T1.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-Dh_1oqHi.js","assets/collapsible-D3gNdr7N.js","assets/use-copy-Dpm_jhm-.js","assets/usage-stats-DDafRqWC.js","assets/tool-namespace-Crbzrqv8.js","assets/form-Gz8fbLdb.js","assets/label-BCxqhVIq.js","assets/utils-CVEq3hMx.js","assets/markdown-P8cO0xLZ.js","assets/use-mobile-nW9hYb6L.js","assets/tooltip-DibJz0Jl.js","assets/index-CaH8ekvn.js","assets/use-clock-tick-jRUiEK1v.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-CKUvsXnq.js","assets/types-BdOsWOEi.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-DYY0I41_.js","assets/command-N9BazZHl.js","assets/index-kd3fyZ9a.js","assets/integration-icon-BrTM8z-s.js","assets/project-icon-9kbQzXfH.js","assets/new-project-dialog-BzJmdXI6.js","assets/repository-import-picker-Bjws7k2-.js","assets/use-navigate-to-agent-CvuO-uuz.js","assets/repository-picker-DkvIZLAj.js","assets/useInfiniteQuery-DWVaUM2t.js","assets/infiniteQueryObserver-ClGIthQz.js","assets/collection-search-BIuQ3VPN.js","assets/use-debounced-value-BtR2lyTj.js","assets/required-auth-layout-Dn8nNstE.js","assets/use-org-sso-DdzTjSOo.js","assets/shell-layout-CE2Eihra.css","assets/sheet-C52S-h6R.js","assets/use-connection-CAR6Cxbr.js","assets/use-mcp-prompts-CFFfSPcj.js","assets/use-thread-outputs-D8Bvo55q.js","assets/file-type-icon-may_hs3N.js","assets/secret-ciphertext-cTA7BSVY.js","assets/alert-CYZdSIKq.js","assets/parse-sections-B30A8ECY.js","assets/blocks-tab-states-PBqE8hLO.js","assets/slider-rNbrBC-4.js","assets/index-C6_m0mjP.js","assets/index-BdQq_4o_.js","assets/tooltipContext-BzrsG1UN.js","assets/CategoricalChart-Bx8yFu23.js","assets/index-DgWAoWIc.js","assets/ActiveShapeUtils-gwLrBsiR.js","assets/Sector-DL6Ad47o.js","assets/symbol-C3kEOGZ_.js","assets/site-editor-toast-CT4NtD1f.js","assets/use-session-runtime-CQOTzbKn.js","assets/experiments-tab-choice-DZqY092h.js","assets/sandbox-url-D3mC8qhT.js","assets/use-sandbox-events-ClbDdVRn.js","assets/sandbox-git-api-CH_-QFpD.js","assets/empty-state-Cc_qF1X6.js","assets/switch-nUFQi60k.js","assets/textarea-y7TWtoua.js","assets/popover-DauDBkON.js","assets/scroll-area-Cfsm1vBV.js","assets/monaco-editor-CBJkBgIU.js","assets/editor-B7sIq_vQ.js","assets/calendar-GMyXKkbA.js","assets/select-CTAm_W2d.js","assets/editor-classes-BinXFbFk.js","assets/core.esm-BYOMVmVh.js","assets/sortable.esm-Cw5kBwgn.js","assets/toggle-group-BIu6qfZV.js","assets/active-indicator-CCMhAsc_.js","assets/combobox-BEVN0Tvl.js","assets/search-input-DBKkXR0y.js","assets/tabs-BwD6LFyC.js","assets/use-file-configs-CuVchUT-.js","assets/asset-utils-DcPLl2K6.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/mustache-Crsi4VAX.js","assets/use-section-preview-base-go9VMYa4.js","assets/section-preview-url-7zfngvgW.js","assets/page-seo-form-D4gneorY.js","assets/use-apply-named-rule-CeNTU7vM.js","assets/use-move-blocks-BKlQlSno.js","assets/variant-matcher-override-B4pYtxaz.js","assets/variant-draft-pointer-BeAKcq_c.js"])))=>i.map(i=>d[i]);
2
+ import{c as ce,j as n,r as C,l as De,b as Pe,B as Me,aK as Xt,b9 as ot,aL as Ae,ba as Sa,bb as Pa,bc as ja,bd as Ea,v as rr,D as ar,K as or,w as ir,x as lr,e as Na,h as Tt,I as Rs,y as Ca,be as Ta,a4 as zs,b2 as La,b7 as Ra,ax as As,az as _s,a7 as cr,P as Os,C as Aa,t as Zt,b8 as _a,q as Oa,m as Da}from"./index-BNmzMNlZ.js";import{u as dr,g as Ba,c as Nn,B as Ss,P as $a,r as Ma,R as Fa,a as za,H as Ka,b as ur,S as Ia,d as Ua,l as Ha,m as Va,e as qa,f as Ps,N as Wa}from"./held-block-view-DTUWWRfL.js";import{b as Ga,c as Lt,r as fr,l as pr,f as Ja,g as Ya,w as Qa}from"./chat-context-C56OVvQP.js";import{t as Xa}from"./ChevronUp-4EkxqYyz.js";import{T as Za,U as eo,M as mr,V as to,W as so,b as no,X as ro,Y as hr,Z as ao,_ as gr,$ as Cn,a0 as oo}from"./agent-icon-CVEMdYFU.js";import{a as io,n as lo}from"./UserSquare-DsAVH788.js";import{s as vr}from"./Plus-BfnmJh1R.js";import{a as xr,b as br,P as yr}from"./popover-DauDBkON.js";import{a as Et,b as Nt,c as wr,d as kr,e as Sr,C as Pr}from"./command-N9BazZHl.js";import{c as co,d as uo,a as fo}from"./repository-binding-BZ7FmJ0X.js";import{a as Rt}from"./sandbox-lifecycle-context-DMfngoi-.js";import{e as po}from"./backoff-CrEUbyZT.js";import{r as mo}from"./thread-intent-cB2EtHpg.js";import{u as jr}from"./use-session-runtime-CQOTzbKn.js";import{S as Er,d as ho,f as go,i as vo,g as xo,h as bo,j as yo,k as wo,u as ss,l as Ks,m as at,n as ko,o as So,q as Po,c as Nr,b as Cr,t as jo,v as He,w as Eo,x as No,y as Co,z as Tn,A as To,B as Lo,C as Ln,D as Ro,E as Ao,e as _o}from"./site-editor-toast-CT4NtD1f.js";import{u as Tr}from"./use-mobile-nW9hYb6L.js";import{T as lt,a as ct,c as dt}from"./tooltip-DibJz0Jl.js";import{T as We}from"./toolbar-icon-button-ByMmG3VL.js";import{w as Wt,i as Oo}from"./variant-matcher-override-B4pYtxaz.js";import{b as Do,w as Rn}from"./variant-draft-pointer-BeAKcq_c.js";import{u as Lr,i as Bo,B as $o,S as Mo,C as Fo,a as zo,c as Ko,b as Io,d as Uo,l as Ho,D as Vo}from"./blocks-tab-states-PBqE8hLO.js";import{s as Ct,n as Is,a as Rr,f as Ve,v as Ar,h as qo,e as Wo,b as Go,c as Jo,g as Yo,p as Qo,N as Xo,d as Zo,r as ei,i as An,j as ti}from"./parse-sections-B30A8ECY.js";import{r as si,D as _n,w as On,b as Dn,a as ni}from"./section-preview-url-7zfngvgW.js";import{p as ri,a as ai,u as oi,b as Bn}from"./use-fast-preview-draft-url-BUDoPHon.js";import{a as ii,b as _r}from"./shell-layout-DYY0I41_.js";import{u as Us,b as li}from"./use-sandbox-events-ClbDdVRn.js";import{u as Ds}from"./useQueries-B8DPRYfS.js";import{i as ci}from"./LinkBroken01-Ctb4MZUK.js";import{u as Or}from"./blocks-preview-workspace-context-aUwmyorT.js";import{MonacoCodeEditor as di}from"./monaco-editor-CBJkBgIU.js";import{d as ui}from"./utils-DeFulDMz.js";import{R as $n,a as Gt,b as Mn}from"./resizable-BYZDi11K.js";import{u as fi,a as js}from"./experiments-tab-choice-DZqY092h.js";import{w as Bs}from"./device-hint-SeLRi17j.js";import{L as pi}from"./label-BCxqhVIq.js";import{a as mi,T as Fn}from"./toggle-group-BIu6qfZV.js";import{h as Dr,w as hi,a as zn}from"./preview-link-C762yHOt.js";import{r as gi,R as vi}from"./virtual-mcp-D_aBBfQL.js";import{d as xi}from"./delay-CnY5UFtP.js";import{s as Br}from"./XClose-DhoOL-T1.js";import{o as bi}from"./omit-sandbox-map-jj4lCB2U.js";import{a as Es,b as yi,w as wi,n as Kn}from"./app-preview-url-9Od4s8Sz.js";import{a as ki}from"./use-organization-settings-DeXdcCtZ.js";import{E as Si}from"./empty-state-Cc_qF1X6.js";import{G as In}from"./repository-picker-DkvIZLAj.js";import{R as Pi}from"./repository-import-picker-Bjws7k2-.js";import{r as ji}from"./preview-source-BsRLGWUP.js";import{C as Ei,s as Ni,L as Ci,R as es,D as Un}from"./secret-ciphertext-cTA7BSVY.js";import{A as Ti,a as Li,b as Ri}from"./alert-CYZdSIKq.js";import{u as Ai}from"./use-task-metadata-DcdDwiSS.js";function _i(t){const e=ce.c(10),{waiting:s}=t,r=s?"true":"false";let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:n.jsx(Za,{className:"size-5 sm:size-6"})}),e[0]=a):a=e[0];let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("span",{className:"h-px w-full border-t border-dashed border-muted-foreground/40"}),e[1]=d):d=e[1];let o;e[2]!==s?(o=s&&n.jsx("span",{"data-testid":"connection-dot",className:"absolute top-0 size-2 animate-[connection-shuttle_1.8s_var(--ease-in-out-cubic)_infinite_alternate] rounded-full bg-foreground"}),e[2]=s,e[3]=o):o=e[3];let i;e[4]!==o?(i=n.jsxs("span",{className:"relative flex h-2 w-16 items-center sm:w-20",children:[d,o]}),e[4]=o,e[5]=i):i=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:n.jsx(eo,{className:"size-5 sm:size-6"})}),e[6]=c):c=e[6];let l;return e[7]!==r||e[8]!==i?(l=n.jsxs("div",{"aria-hidden":"true","data-testid":"connection-wire","data-waiting":r,className:"flex items-center gap-2",children:[a,i,c]}),e[7]=r,e[8]=i,e[9]=l):l=e[9],l}function Oi(t){const e=ce.c(25),{index:s,numbered:r,step:a,heading:d}=t,o=C.useId();let i;e[0]!==s||e[1]!==r?(i=r&&n.jsx("span",{"aria-hidden":"true",className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium tabular-nums text-foreground",children:s}),e[0]=s,e[1]=r,e[2]=i):i=e[2];let c;e[3]!==d||e[4]!==o||e[5]!==a.title?(c=n.jsx(d,{id:o,className:"text-sm font-medium text-foreground",children:a.title}),e[3]=d,e[4]=o,e[5]=a.title,e[6]=c):c=e[6];let l;e[7]!==i||e[8]!==c?(l=n.jsxs("div",{className:"flex items-center gap-3",children:[i,c]}),e[7]=i,e[8]=c,e[9]=l):l=e[9];const m=r&&"sm:pl-9";let p;e[10]!==m?(p=De("flex min-w-0 flex-col gap-3",m),e[10]=m,e[11]=p):p=e[11];let f;e[12]!==a.body?(f=a.body&&n.jsx("p",{className:"text-sm text-muted-foreground",children:a.body}),e[12]=a.body,e[13]=f):f=e[13];let x;e[14]!==a.command?(x=a.command&&n.jsx(Ei,{command:a.command}),e[14]=a.command,e[15]=x):x=e[15];let h;e[16]!==a.after||e[17]!==p||e[18]!==f||e[19]!==x?(h=n.jsxs("div",{className:p,children:[f,x,a.after]}),e[16]=a.after,e[17]=p,e[18]=f,e[19]=x,e[20]=h):h=e[20];let j;return e[21]!==o||e[22]!==l||e[23]!==h?(j=n.jsxs("li",{"aria-labelledby":o,className:"surface flex flex-col gap-3 p-4 sm:p-5",children:[l,h]}),e[21]=o,e[22]=l,e[23]=h,e[24]=j):j=e[24],j}const Di=[];function ts(t){const e=ce.c(20),{title:s,lead:r,waiting:a,alerts:d,steps:o,footer:i,headingLevel:c}=t,l=o===void 0?Di:o,m=c===void 0?1:c,p=m===1?"h1":"h2",f=a&&l.length===0?"status":void 0;let x;e[0]!==a?(x=n.jsx(_i,{waiting:a}),e[0]=a,e[1]=x):x=e[1];let h;e[2]!==p||e[3]!==s?(h=n.jsx(p,{tabIndex:-1,className:"text-balance text-lg font-medium text-foreground outline-none sm:text-xl",children:s}),e[2]=p,e[3]=s,e[4]=h):h=e[4];let j;e[5]!==r?(j=r&&n.jsx("p",{className:"text-pretty text-sm text-muted-foreground",children:r}),e[5]=r,e[6]=j):j=e[6];let g;e[7]!==f||e[8]!==x||e[9]!==h||e[10]!==j?(g=n.jsxs("header",{role:f,className:"flex flex-col items-center gap-3 text-center",children:[x,h,j]}),e[7]=f,e[8]=x,e[9]=h,e[10]=j,e[11]=g):g=e[11];let b;e[12]!==m||e[13]!==l?(b=l.length>0&&n.jsx("ol",{className:"flex flex-col gap-3",children:l.map((y,v)=>n.jsx(Oi,{index:v+1,numbered:l.length>1,step:y,heading:m===1?"h2":"h3"},y.title))}),e[12]=m,e[13]=l,e[14]=b):b=e[14];let N;return e[15]!==d||e[16]!==i||e[17]!==g||e[18]!==b?(N=n.jsx("div",{className:"h-full w-full overflow-y-auto",children:n.jsxs("div",{className:"mx-auto flex min-h-full w-full max-w-xl flex-col justify-center gap-6 px-4 py-8 sm:py-12",children:[g,d,b,i]})}),e[15]=d,e[16]=i,e[17]=g,e[18]=b,e[19]=N):N=e[19],N}function Bi(t){const e=ce.c(55),{wait:s,hosts:r,invalidLink:a}=t,d=a===void 0?!1:a,o=Pe();let i;e[0]!==d||e[1]!==o?(i=d&&n.jsx(Ti,{variant:"warning",children:n.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[n.jsx(Li,{className:"line-clamp-none text-foreground",children:o("decoServe.link.invalidTitle")}),n.jsx(Ri,{children:o("decoServe.link.invalidBody")})]})}),e[0]=d,e[1]=o,e[2]=i):i=e[2];const c=i;if(s.kind==="problem"){let R;e[3]!==o||e[4]!==s.host||e[5]!==s.problem?(R=Ni(o,s.problem,s.host),e[3]=o,e[4]=s.host,e[5]=s.problem,e[6]=R):R=e[6];const{title:O,body:T}=R;let L;e[7]!==T?(L=n.jsx(es,{text:T}),e[7]=T,e[8]=L):L=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Un,{className:"border-t border-border pt-4",links:["troubleshooting","serve"]}),e[9]=D):D=e[9];let A;return e[10]!==c||e[11]!==L||e[12]!==O?(A=n.jsx(ts,{headingLevel:2,waiting:!1,title:O,lead:L,alerts:c,footer:D}),e[10]=c,e[11]=L,e[12]=O,e[13]=A):A=e[13],A}const l=s.kind==="looking",m=l&&!s.paused;let p;e[14]!==o?(p=o("decoServe.waiting.title"),e[14]=o,e[15]=p):p=e[15];let f;e[16]!==o?(f=o("decoServe.waiting.lead"),e[16]=o,e[17]=f):f=e[17];let x;e[18]!==c||e[19]!==s.kind?(x=(c||s.kind==="denied")&&n.jsxs(n.Fragment,{children:[c,s.kind==="denied"&&n.jsx(Ci,{})]}),e[18]=c,e[19]=s.kind,e[20]=x):x=e[20];let h;e[21]!==o?(h=o("decoServe.guide.step1.title"),e[21]=o,e[22]=h):h=e[22];let j;e[23]!==o?(j=o("decoServe.guide.step1.body"),e[23]=o,e[24]=j):j=e[24];let g;e[25]!==j?(g=n.jsx(es,{text:j}),e[25]=j,e[26]=g):g=e[26];let b;e[27]!==h||e[28]!==g?(b={title:h,body:g,command:Er},e[27]=h,e[28]=g,e[29]=b):b=e[29];let N;e[30]!==o?(N=o("decoServe.waiting.step2.title"),e[30]=o,e[31]=N):N=e[31];let y;e[32]!==o?(y=o("decoServe.waiting.step2.body"),e[32]=o,e[33]=y):y=e[33];let v;e[34]!==r||e[35]!==l||e[36]!==o||e[37]!==s.kind||e[38]!==s.onStart||e[39]!==s.paused?(v=s.kind==="needs-gesture"?n.jsx(Me,{variant:"outline",className:"self-start",onClick:s.onStart,children:o("decoServe.guide.step2.start")}):l&&n.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:s.paused?o("decoServe.guide.step2.paused"):o("decoServe.guide.step2.looking",{hosts:r})}),e[34]=r,e[35]=l,e[36]=o,e[37]=s.kind,e[38]=s.onStart,e[39]=s.paused,e[40]=v):v=e[40];let P;e[41]!==N||e[42]!==y||e[43]!==v?(P={title:N,body:y,after:v},e[41]=N,e[42]=y,e[43]=v,e[44]=P):P=e[44];let E;e[45]!==b||e[46]!==P?(E=[b,P],e[45]=b,e[46]=P,e[47]=E):E=e[47];let k;e[48]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsx(Un,{className:"border-t border-border pt-4",links:["siteEditor","serve","troubleshooting"]}),e[48]=k):k=e[48];let S;return e[49]!==E||e[50]!==m||e[51]!==p||e[52]!==f||e[53]!==x?(S=n.jsx(ts,{headingLevel:2,waiting:m,title:p,lead:f,alerts:x,steps:E,footer:k}),e[49]=E,e[50]=m,e[51]=p,e[52]=f,e[53]=x,e[54]=S):S=e[54],S}function $i(t,e){switch(t.kind){case"needs-permission":return{kind:"denied"};case"problem":return{kind:"problem",problem:t.problem,host:e};default:return{kind:"looking"}}}const Mi=15e3,Fi=3e3;function zi(t){const{candidates:e,probe:s,onFound:r,onChange:a,doc:d=document,setTimer:o=(v,P)=>setTimeout(v,P),clearTimer:i=v=>clearTimeout(v),timeoutMs:c=Fi}=t;let l={status:"searching",firstRoundDone:!1,problem:null},m=!1,p=!1,f=0,x=null,h=null;const j=()=>d.visibilityState==="hidden",g=v=>{l={...l,...v},a(l)},b=async v=>{h=new AbortController;const P=h,E=o(()=>P.abort(),c);try{return await s(v,P.signal),!0}catch(k){if(m)return!1;const S=go(k);return S.reason!=="not-answering"?g({problem:{...S,endpoint:v}}):l.problem?.endpoint===v&&g({problem:null}),!1}finally{i(E),h=null}},N=async()=>{if(x=null,!(m||p)){if(e.length===0){g({status:"stopped",firstRoundDone:!0});return}if(j()){g({status:"paused"});return}p=!0,l.status!=="searching"&&g({status:"searching"});for(const v of e){if(m)break;if(await b(v)){if(p=!1,m)return;m=!0,d.removeEventListener("visibilitychange",y),g({status:"found",firstRoundDone:!0}),r(v);return}}if(p=!1,!m){if(f+=1,l.firstRoundDone||g({firstRoundDone:!0}),j()){g({status:"paused"});return}x=o(()=>{N()},ho(f,Mi))}}};function y(){if(!m){if(j()){x!==null&&(i(x),x=null),p||g({status:"paused"});return}x!==null&&i(x),f=0,N()}}return d.addEventListener("visibilitychange",y),a(l),N(),()=>{m=!0,x!==null&&i(x),h?.abort(),d.removeEventListener("visibilitychange",y)}}function Ki(t,e){return xo(bo({endpoint:t,fetch:s=>fetch(s,{signal:e})}))}const Ii=["loopback-network","local-network-access"];async function Ui(){if(vo(window.location.origin))return null;for(const t of Ii)try{return await navigator.permissions.query({name:t})}catch{}return null}let $r=null,Hn=!1;const Ns=new Set;function Hi(t){if(Ns.add(t),!Hn){Hn=!0;const e=s=>{$r=s;for(const r of Ns)r()};Ui().then(s=>{if(!s)return e("unsupported");e(s.state),s.addEventListener("change",()=>e(s.state))})}return()=>Ns.delete(t)}const Vi={status:"stopped",firstRoundDone:!1,problem:null},Cs=new Map;function qi(t){const e=Cs.get(t);if(e)return e;let s={status:"searching",firstRoundDone:!1,problem:null};const r=new Set;let a=null;const d={onFound:()=>{},getSnapshot:()=>s,subscribe:o=>(r.add(o),a??=zi({candidates:t.split(" "),probe:Ki,onFound:i=>d.onFound(i),onChange:i=>{s=i;for(const c of r)c()}}),()=>{r.delete(o),!(r.size>0)&&(a?.(),a=null,Cs.delete(t))})};return Cs.set(t,d),d}function Mr(){return C.useSyncExternalStore(Hi,qn,qn)}const Wi=()=>()=>{},Vn=()=>Vi,qn=()=>$r;function zd(t){const e=ce.c(9),{candidates:s,onFound:r}=t,[a,d]=C.useState(!1),o=Mr(),c=(o==="granted"||o==="unsupported"||o==="prompt"&&a)&&s.length>0;let l;e[0]!==c||e[1]!==s||e[2]!==r?(l=c?qi(s.join(" ")):null,l&&(l.onFound=r),e[0]=c,e[1]=s,e[2]=r,e[3]=l):l=e[3];const m=C.useSyncExternalStore(l?.subscribe??Wi,l?.getSnapshot??Vn,l?.getSnapshot??Vn),p=o==="prompt"&&!a;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=()=>d(!0),e[4]=f):f=e[4];let x;return e[5]!==o||e[6]!==m||e[7]!==p?(x={state:m,access:o,needsGesture:p,start:f},e[5]=o,e[6]=m,e[7]=p,e[8]=x):x=e[8],x}const Ts={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Gi(t){const{previewState:e,progressStatus:s,fastPreviewActive:r=!1,fastPreviewReady:a=!1,codingSession:d=!1,hostedDraft:o=!1}=t,i=d?null:t.previewServerUrl;return t.deciding?{...Ts,showDecidingLoader:!0}:t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?Ts:o&&t.hostedPointerPending&&!a?{...Ts,showDecidingLoader:!0}:r&&a&&i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!1}:r&&o&&i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&s!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const Ji=1e4,Yi=1e3,Qi=3e4;function Xi({iframeRef:t,src:e,active:s}){const r=C.useRef(0),a=C.useRef(null),d=C.useRef(null),o=C.useRef(e),i=C.useRef(s);o.current=e,i.current=s;const c=()=>{a.current&&clearTimeout(a.current),d.current&&clearTimeout(d.current),a.current=null,d.current=null},l=()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,m()},Ji)},m=()=>{if(!i.current||!o.current)return;d.current&&clearTimeout(d.current);const x=po(Qi,Yi,r.current,2,.5);r.current+=1,d.current=setTimeout(()=>{d.current=null;const h=t.current,j=o.current;!h||!j||!i.current||(h.src=j,l())},x)},p=()=>{r.current=0,c()},f=()=>{a.current&&(clearTimeout(a.current),a.current=null),m()};return C.useEffect(()=>{if(c(),r.current=0,!(!s||!e))return l(),c},[e,s]),{handleLoad:p,handleError:f}}const Zi=1500,el=500;function tl({iframe:t,reload:e,waitMs:s=Zi,confirmMs:r=el}){let a;const d=()=>{clearTimeout(o),a=setTimeout(e,r)};t.addEventListener("load",d,{once:!0});const o=setTimeout(()=>{t.removeEventListener("load",d),e()},s);return()=>{clearTimeout(o),clearTimeout(a),t.removeEventListener("load",d)}}const sl=Xt({tag:Ae(),id:Ae(),classes:Ae(),text:Ae(),html:Ae(),manifestKey:Ae().nullable(),componentName:Ae().nullable(),parents:Ae(),url:Ae(),path:Ae(),viewport:Xt({width:ot(),height:ot()}),position:Xt({x:ot(),y:ot()})}),nl=`(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 rl(t,e){const s=t.map(()=>null),r=[];for(let f=0;f<t.length;f++)t[f]!==null&&r.push(f);const a=r.length,d=e.length;if(!a||!d)return s;const o=(f,x)=>{const h=t[r[f]??0];return!h||!h.length?1:h.indexOf(e[x]??"")>=0?2:0},i=[],c=[];for(let f=0;f<=a;f++)i.push(new Array(d+1).fill(0)),c.push(new Array(d+1).fill(2));for(let f=1;f<=a;f++){const x=i[f-1]??[],h=i[f]??[],j=c[f]??[];for(let g=1;g<=d;g++){let b=x[g]??0,N=2;const y=h[g-1]??0;y>b&&(b=y,N=0);const v=o(f-1,g-1),P=(x[g-1]??0)+v;v>0&&P>b&&(b=P,N=1),h[g]=b,j[g]=N}}let l=0,m=a,p=d;for(;m>0&&p>0;){const f=c[m]?.[p]??2;f===1?(s[r[m-1]??0]=p-1,l++,m--,p--):f===0?p--:m--}if(l===0&&d===a)for(let f=0;f<a;f++)s[r[f]??0]=f;return s}const al=Xt({sectionIndex:ot(),manifestKey:Ae(),clickSeq:ot()}),Wn=`(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 = ${rl.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
+
426
+ // A skipped view transition rejects its promises with "AbortError:
427
+ // Transition was skipped"; nobody else waits on them, so they are settled
428
+ // here rather than left as uncaught errors in the page's console.
429
+ var settleTransition = function(vt) {
430
+ if (!vt) return;
431
+ var ignore = function() {};
432
+ if (vt.ready) vt.ready.catch(ignore);
433
+ if (vt.updateCallbackDone) vt.updateCallbackDone.catch(ignore);
434
+ if (vt.finished) vt.finished.catch(ignore);
435
+ };
436
+
437
+ // A site that opts into cross-document view transitions
438
+ // (@view-transition { navigation: auto }) gets one on every reload a save
439
+ // makes. When the next save navigates the frame before that transition
440
+ // starts, the browser skips it and rejects the outgoing page's ready
441
+ // promise, which only a pageswap listener can reach. Kept after deactivate:
442
+ // settling changes nothing else, and the frame may still navigate.
443
+ if (!window.__cmsEditorPageSwap) {
444
+ window.__cmsEditorPageSwap = true;
445
+ window.addEventListener("pageswap", function(e) {
446
+ settleTransition(e.viewTransition);
447
+ });
448
+ }
449
+
450
+ // A quick second save skips the running transition. Only finished says
451
+ // when the swap is over, so the chain waits on it; the rest is settled.
452
+ var runSwapTransition = function(swap) {
453
+ if (typeof document.startViewTransition !== "function") {
454
+ swap();
455
+ return Promise.resolve();
456
+ }
457
+ var vt = document.startViewTransition(swap);
458
+ settleTransition(vt);
459
+ return vt.finished;
460
+ };
461
+ var renderInPlace = function(src, body) {
462
+ if (renderCtrl) renderCtrl.abort();
463
+ var ctrl = new AbortController();
464
+ renderCtrl = ctrl;
465
+ renderPending = true;
466
+ highlight.style.display = "none";
467
+ badge.style.display = "none";
468
+ window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
469
+ renderQueue = renderQueue.then(function() {
470
+ return fetch(src, {
471
+ method: "POST",
472
+ body: body,
473
+ signal: ctrl.signal,
474
+ headers: { accept: "text/html", "content-type": "application/json" }
475
+ }).then(function(res) {
476
+ if (!res.ok) throw new Error("render " + res.status);
477
+ return res.text();
478
+ }).then(function(html) {
479
+ var swap = function() {
480
+ document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
481
+ document.body.appendChild(highlight);
482
+ document.body.appendChild(badge);
483
+ // Old section is gone; hide the overlay until the next hover repositions it.
484
+ highlight.style.display = "none";
485
+ badge.style.display = "none";
486
+ lastSection = null;
487
+ };
488
+ var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
489
+ var doc = new DOMParser().parseFromString(headHtml, "text/html");
490
+ var sheets = Array.prototype.map.call(
491
+ doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
492
+ function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
493
+ );
494
+ return Promise.all(sheets).then(function() {
495
+ return runSwapTransition(swap);
496
+ });
497
+ }).then(function() {
498
+ var t = document.getElementById("deco-disable-transitions");
499
+ if (t) t.remove();
500
+ if (ctrl === renderCtrl) renderPending = false;
501
+ window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
502
+ }).catch(function(err) {
503
+ if (ctrl === renderCtrl) renderPending = false;
504
+ if (err && err.name === "AbortError") return;
505
+ window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
506
+ });
507
+ });
508
+ };
509
+
510
+ window.addEventListener("message", function(e) {
511
+ // Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
512
+ if (e.source !== window.parent) return;
513
+ if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
514
+ renderInPlace(e.data.src, e.data.body);
515
+ return;
516
+ }
517
+ if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
518
+ sectionLabels = e.data.labels;
519
+ if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
520
+ if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
521
+ if (lastSection) {
522
+ lastLabel = labelFor(lastSection);
523
+ lastKind = kindFor(lastSection);
524
+ applyColor(lastKind);
525
+ if (highlight.style.display !== "none") positionHighlight(lastSection);
526
+ }
527
+ return;
528
+ }
529
+ // Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
530
+ if (e.data && e.data.type === "cms-editor::clear-hover") {
531
+ highlight.style.display = "none";
532
+ badge.style.display = "none";
533
+ lastSection = null;
534
+ return;
535
+ }
536
+ if (e.data && e.data.type === "cms-editor::deactivate") {
537
+ highlight.remove();
538
+ badge.remove();
539
+ document.removeEventListener("mousemove", moveHandler, true);
540
+ document.removeEventListener("mouseout", outHandler, true);
541
+ document.removeEventListener("click", clickHandler, true);
542
+ // Or the page stays unnavigable after leaving Blocks mode.
543
+ document.removeEventListener("click", navBlocker, true);
544
+ document.removeEventListener("submit", submitBlocker, true);
545
+ window.removeEventListener("scroll", reposition, { capture: true });
546
+ window.removeEventListener("resize", reposition);
547
+ window.__cmsEditorActive = false;
548
+ }
549
+ });
550
+ })();`;function $s(t,e,s=!1){let r=t,a=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let d=0;a&&d<5;d++){const o=e[a];if(o&&typeof o=="object"&&"__resolveType"in o){const i=o.__resolveType;if(typeof i=="string"&&i&&i!==a){r=o,a=i;continue}}break}if(!a)return[];if(a.includes("flags/multivariate")||s&&Sa(a,s)){const d=Array.isArray(r.variants)?r.variants:[];if(d.length===0||d.every(c=>{const l=c?.rule;return Pa(l?.__resolveType,s)}))return null;const i=[];for(const c of d){const l=ja(c,s);if(l&&typeof l=="object")for(const m of $s(l,e,s)??[])i.includes(m)||i.push(m)}return i}if(Ea(a)){const d=r.section&&typeof r.section=="object"?$s(r.section,e,s):[];return d===null?null:d.length?[a,...d]:[a]}return[a]}function rt(t){return t.replace(/[`*_]/g,"\\$&")}function ol(t,e){const s=[`The user selected an element on the live preview and asked: **"${rt(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&&s.push(`**Section resolveType:** \`${rt(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="${rt(t.classes)}"`:""}>`;s.push(`**Clicked element:** \`${r}\``),t.parents&&s.push(`**DOM breadcrumb:** ${rt(t.parents)} > ${t.tag}`),t.text&&s.push(`**Text content:** "${rt(t.text)}"`),t.componentName&&s.push(`**Component name:** ${rt(t.componentName)}`);const a=t.html.replace(/```/g,"`` `");return s.push("","**HTML snippet:**","```html",a,"```"),s.push("","Please read the source file, locate the element, and apply the requested change."),s.join(`
551
+ `)}function il(t,e,s=320,r=44,a=12){const{x:d,y:o}=t,{width:i,height:c}=e,l=Math.max(a,Math.min(d-s/2,i-s-a)),p=o/c>.68?Math.max(a,o-r-18):Math.min(o+18,c-r-a);return{leftPct:l/i*100,topPct:p/c*100}}function ll(t){const e=ce.c(45),{element:s,onDismiss:r}=t,[a,d]=C.useState(""),o=C.useRef(null),{sendMessage:i}=Ga(),{openSidePanel:c}=ii(),l=Pe();let m;e[0]!==s||e[1]!==a||e[2]!==r||e[3]!==c||e[4]!==i?(m=()=>{if(!a.trim())return;const H=ol(s,a);c(),i({parts:[{type:"text",text:H}]}),r()},e[0]=s,e[1]=a,e[2]=r,e[3]=c,e[4]=i,e[5]=m):m=e[5];const p=m;let f;e[6]!==s.position||e[7]!==s.viewport?(f=il(s.position,s.viewport),e[6]=s.position,e[7]=s.viewport,e[8]=f):f=e[8];const x=f,h=`${x.leftPct}%`,j=`${x.topPct}%`;let g;e[9]!==h||e[10]!==j?(g={left:h,top:j,width:"320px"},e[9]=h,e[10]=j,e[11]=g):g=e[11];let b;e[12]!==p?(b=H=>{H.preventDefault(),p()},e[12]=p,e[13]=b):b=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=H=>d(H.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=H=>{H.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let v;e[17]!==l?(v=l("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=l,e[18]=v):v=e[18];let P;e[19]!==a||e[20]!==y||e[21]!==v?(P=n.jsx("input",{ref:o,autoFocus:!0,type:"text",value:a,onChange:N,onKeyDown:y,placeholder:v,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=a,e[20]=y,e[21]=v,e[22]=P):P=e[22];let E;e[23]!==a?(E=a.trim(),e[23]=a,e[24]=E):E=e[24];const k=!E;let S;e[25]!==l?(S=l("sandbox.visualEditorPrompt.sendButton"),e[25]=l,e[26]=S):S=e[26];let R;e[27]!==l?(R=l("sandbox.visualEditorPrompt.sendButton"),e[27]=l,e[28]=R):R=e[28];let O;e[29]!==R?(O=n.jsx("title",{children:R}),e[29]=R,e[30]=O):O=e[30];let T;e[31]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=T):T=e[31];let L;e[32]!==O?(L=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[O,T]}),e[32]=O,e[33]=L):L=e[33];let D;e[34]!==k||e[35]!==S||e[36]!==L?(D=n.jsx("button",{type:"submit",disabled:k,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]=k,e[35]=S,e[36]=L,e[37]=D):D=e[37];let A;e[38]!==P||e[39]!==D||e[40]!==b?(A=n.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:b,children:[P,D]}),e[38]=P,e[39]=D,e[40]=b,e[41]=A):A=e[41];let M;return e[42]!==A||e[43]!==g?(M=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:A}),e[42]=A,e[43]=g,e[44]=M):M=e[44],M}const Gn="site-links",cl=/details?page|\bpdp\b/i,dl=/listingpage|\bplp\b/i;function ul(t,e,s){const r=new Set;for(const i of s)cl.test(i)&&r.add("product"),dl.test(i)&&r.add("category");const a=Ct(Is(t)),d=a[a.length-1],o=a[a.length-2];return d?.type==="text"&&d.text==="/p"&&o?.type==="param"&&o.name===e&&r.add("product"),e==="*"&&a.some(i=>i.type==="param"&&i.name==="*")&&r.add("category"),r}const fl=["rosa","preto","pink","black"];function Jt(t,e){const s=e.trim();return s?t(s):fl.flatMap(r=>t(r))}function pl(t,e){const s=e.trim(),r=[];/^\d+$/.test(s)&&r.push({resolveType:t,props:{ids:[s]}});const d=s.includes("-")&&!/\s/.test(s)?s.replace(/-+/g," "):s;return r.push({resolveType:t,props:{query:d,count:10}}),r}const Fr=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Hs(t){return t.split("/")[0]??""}function ml(t){const e=new Set;for(const s of t){const r=Hs(s);Fr.has(r)&&e.add(r)}return e}function hl(t,e){const s=Hs(t);return!Fr.has(s)||e.size===0?!0:e.has(s)}const gl=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>Jt(s=>pl(t,s),e),optionsFromPayload:Yt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Jt(s=>[{resolveType:t,props:{props:{search:s,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Yt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Jt(s=>[{resolveType:t,props:{term:s,hitsPerPage:10}}],e),optionsFromPayload:Yt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Jt(s=>[{resolveType:t,props:{query:s,term:s,count:10,hitsPerPage:10}}],e),optionsFromPayload:Yt},{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:Sl}];function vl(t,e,s=new Set){const r=[...e],a=i=>{const c=[];for(const l of gl){if(l.kind!==i)continue;const m=r.find(p=>l.test(p)&&hl(p,s));m&&c.push({cand:l,resolveType:m})}return c.find(l=>s.has(Hs(l.resolveType)))??c[0]},d=(i,c,l)=>({kind:i.kind,id:`${i.kind}:${c}`,resolveType:c,clientFilter:i.clientFilter,isFallback:l,buildRequests:m=>i.buildRequests(c,m),optionsFromPayload:i.optionsFromPayload}),o=[];for(const i of["product","category"]){if(!t.has(i))continue;const c=a(i);c&&o.push(d(c.cand,c.resolveType,!1))}return t.size>0&&o.push(xl(t.has("category")?"category":"product")),o}function xl(t){return{kind:t,id:Gn,resolveType:Gn,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,s)=>Cl(e,s)}}function Ge(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function bl(t,e,s){const r=new Set,a=new Set,d=o=>{if(Array.isArray(o)){for(const l of o)d(l);return}const i=Ge(o);if(!i)return;const c=i.__resolveType;if(typeof c=="string"){if(s(c))r.add(c);else if(c in e&&!a.has(c)){a.add(c);const l=Ge(e[c])?.__resolveType;typeof l=="string"&&s(l)&&r.add(c),d(e[c])}}for(const l of Object.values(i))d(l)};return d(t),r}function zr(t){const e=new Set,s=[];for(const r of t)for(const a of r)e.has(a.value)||(e.add(a.value),s.push(a));return s}function Kr(t){try{return decodeURIComponent(t)}catch{return t}}function yl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wl(t){const e=[];let s="^";for(const r of t)r.type==="text"?s+=yl(r.text):(e.push(r.name),s+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${s}$`),order:e}}function Ir(t,e,s){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 a=Ct(Is(e)),{pattern:d,order:o}=wl(a),i=o.indexOf(s);if(i===-1)return null;const c=r.match(d);if(!c)return null;const l=c[i+1]?.replace(/^\/+|\/+$/g,"");return l?Kr(l):null}function Yt(t,e){const s=Ge(t),r=Array.isArray(t)?t:Array.isArray(s?.products)?s.products:Array.isArray(s?.list)?s.list:[],a=[],d=new Set;for(const o of r){const i=Ge(o);if(!i)continue;const c=Ir(i.url,e.template,e.paramName);if(!c||d.has(c))continue;d.add(c);const l=Ge(i.isVariantOf),m=typeof l?.name=="string"&&l.name||typeof i.name=="string"&&i.name||c,p=Array.isArray(i.image)?Ge(i.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;a.push({value:c,label:m,image:f})}return a}function kl(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const s=e.replace(/^\/+|\/+$/g,"");return s?Kr(s):null}function Sl(t){const e=[],s=new Set,r=(a,d)=>{const o=Ge(a);if(!o)return;const i=typeof o.name=="string"&&o.name?o.name:"",c=i?[...d,i]:d,l=kl(o.url);if(l&&!s.has(l)&&(s.add(l),e.push({value:l,label:c.join(" › ")||l})),Array.isArray(o.children))for(const m of o.children)r(m,c)};if(Array.isArray(t))for(const a of t)r(a,[]);return e}const Pl=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 jl(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,s=>s.toUpperCase())}function El(t){if(typeof t!="string"||!t)return[];const e=[],s=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,a=0;for(;(r=s.exec(t))!==null&&a++<5e3;){const d=r[1]??"",o=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:d,text:o})}return e}function Nl(t){if(typeof t!="string"||!t)return[];const e=[],s=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,a=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let d,o=0;for(;(d=r.exec(t))!==null&&o++<3e3;){const i=(d[1]??"").replace(/\\\//g,"/");if(!i||s.has(i))continue;s.add(i);const c=t.slice(d.index,d.index+900).match(a)?.[1]?.replace(/\\\//g,"/");e.push({url:i,name:d[2]??"",image:c||void 0})}return e}function Cl(t,e){const s=[],r=new Set,a=(d,o,i,c)=>{if(s.length>=200)return;const l=Ir(d,e.template,e.paramName);!l||r.has(l)||e.paramName==="*"&&/(^|\/)p$/.test(l)||i==="category"&&Pl.has(l.split("/")[0]??"")||(r.add(l),s.push({value:l,label:o&&o.length<=80?o:jl(l),kind:i,image:c}))};for(const{url:d,name:o,image:i}of Nl(t))a(d,o,"product",i);for(const{href:d,text:o}of El(t))d.startsWith("/")&&!d.startsWith("//")&&a(d,o,"category");return s}function St(t,e,s=50){const r=e.trim().toLowerCase();return(r?t.filter(d=>d.label.toLowerCase().includes(r)||d.value.toLowerCase().includes(r)):t).slice(0,s)}const Ur=1e4;function Tl(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 Ll(t,{resolveType:e,props:s}){const r=await fetch(yo(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...s}),signal:AbortSignal.timeout(Ur)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Jn(t,e){const s=await fetch(wo(t,e),{signal:AbortSignal.timeout(Ur)});if(!s.ok)throw new Error(`Failed to fetch page: ${s.status}`);return s.text()}async function Rl(t,e,s){const r=e.optionsFromPayload(await Jn(t,"/"),s),a=r.find(o=>o.kind==="category");if(!a)return r;const d=Ve(s.template,{[s.paramName]:a.value});if(d==="/")return r;try{const o=e.optionsFromPayload(await Jn(t,d),s).filter(i=>i.kind==="product");return zr([r,o])}catch{return r}}function Al(t,e,s){return or.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":s}`)}async function _l(t,e,s,r){if(e.homepageLinks)return Rl(t,e,r);const a=e.buildRequests?.(s)??[];if(a.length===0)return[];const d=await Promise.allSettled(a.map(i=>Ll(t,i))),o=d.filter(i=>i.status==="fulfilled").map(i=>i.value);if(o.length===0){const i=d.find(c=>c.status==="rejected");throw i?i.reason:new Error("Failed to fetch options")}return zr(o.map(i=>e.optionsFromPayload(i,r)))}function Ms(t,e,s,r,a){return{queryKey:Al(t,e,s),queryFn:()=>_l(t,e,s,r),enabled:a,staleTime:6e4,retry:1}}function Pt(t){const e=ce.c(16),{heading:s,iconKind:r,options:a,template:d,paramName:o,keyPrefix:i,onSelect:c}=t;if(a.length===0)return null;let l;if(e[0]!==r||e[1]!==i||e[2]!==c||e[3]!==a||e[4]!==o||e[5]!==d){let p;e[7]!==r||e[8]!==i||e[9]!==c||e[10]!==o||e[11]!==d?(p=f=>n.jsxs(Nt,{value:`${i}:${f.value}`,className:"gap-3 py-2",onSelect:()=>c(f.value),children:[r==="product"&&n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?n.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(mr,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:f.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Ve(d,{[o]:f.value})})]})]},`${i}:${f.value}`),e[7]=r,e[8]=i,e[9]=c,e[10]=o,e[11]=d,e[12]=p):p=e[12],l=a.map(p),e[0]=r,e[1]=i,e[2]=c,e[3]=a,e[4]=o,e[5]=d,e[6]=l}else l=e[6];let m;return e[13]!==s||e[14]!==l?(m=n.jsx(Et,{heading:s,children:l}),e[13]=s,e[14]=l,e[15]=m):m=e[15],m}function Yn(t){const e=ce.c(2),{text:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=r):r=e[1],r}function Ol(t){const e=ce.c(52),{sources:s,template:r,paramName:a,value:d,sandboxRef:o,onCommit:i}=t,c=Pe(),[l,m]=C.useState(!1),[p,f]=C.useState(""),[x,h]=C.useState(""),j=C.useRef(null),g=a==="*"?c("sandbox.preview.catchAllParamLabel"):`:${a}`,b=Tl(c),y=[...new Set(s.map(ne=>b[ne.kind].noun))].join(" or ");let v;e[0]!==c||e[1]!==y?(v=c("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=c,e[1]=y,e[2]=v):v=e[2];const P=v,E={template:r,paramName:a};let k;e[3]!==p?(k=(ne,oe)=>({source:ne,query:oe,options:ne.clientFilter?St(oe.data??[],p):oe.data??[]}),e[3]=p,e[4]=k):k=e[4];const S=k,R=s.filter(Il),O=s.filter(Kl),T=Ds({queries:R.map(ne=>Ms(o,ne,x,E,l))});let L;e[5]!==T||e[6]!==S?(L=(ne,oe)=>S(ne,T[oe]),e[5]=T,e[6]=S,e[7]=L):L=e[7];const D=R.map(L),A=D.length===0||D.every(zl),M=Ds({queries:O.map(ne=>Ms(o,ne,x,E,l&&A))});let H;e[8]!==M||e[9]!==S?(H=(ne,oe)=>S(ne,M[oe]),e[8]=M,e[9]=S,e[10]=H):H=e[10];const X=O.map(H),V=A?X:D,J=V.length===1&&V[0]?.source.homepageLinks?V[0]:null,G=J&&!J.query.isLoading&&!J.query.isError?J?.query.data??[]:[],Y=St(G.filter(Fl),p),_=St(G.filter(Ml),p),$=Y.length>0&&_.length>0,F=ne=>{m(ne),j.current&&clearTimeout(j.current),f(ne?d:""),h(ne?d:"")};let I;e[11]===Symbol.for("react.memo_cache_sentinel")?(I=ne=>{f(ne),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{h(ne)},300)},e[11]=I):I=e[11];const B=I,z=ne=>{i(ne),F(!1)},W=Rr(p),K=Ve(r,{[a]:W}),te=ar,se=rr,ee="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ae=$l;let pe;e[12]!==g||e[13]!==c?(pe=c("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=c,e[14]=pe):pe=e[14];let de;e[15]!==pe?(de=n.jsx(ir,{className:"sr-only",children:n.jsx(lr,{children:pe})}),e[15]=pe,e[16]=de):de=e[16];let ve;e[17]===Symbol.for("react.memo_cache_sentinel")?(ve=n.jsx(mr,{size:16,className:"shrink-0 text-foreground"}),e[17]=ve):ve=e[17];let ue;e[18]!==c?(ue=c("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=c,e[19]=ue):ue=e[19];let xe;e[20]!==g?(xe=n.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-xs text-special",children:g}),e[20]=g,e[21]=xe):xe=e[21];let me;e[22]!==ue||e[23]!==xe?(me=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[ve,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ue," ",xe]})]}),e[22]=ue,e[23]=xe,e[24]=me):me=e[24];const ge=kr,je=!1,fe="min-h-0 flex-1";let ie;e[25]!==P||e[26]!==p?(ie=n.jsx(Sr,{autoFocus:!0,placeholder:P,value:p,onValueChange:B}),e[25]=P,e[26]=p,e[27]=ie):ie=e[27];const Ne=wr,Fe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let ze;e[28]!==c?(ze=c("sandbox.pathParamPickerChip.noResults"),e[28]=c,e[29]=ze):ze=e[29];let Be;e[30]!==ze?(Be=n.jsx(Pr,{children:ze}),e[30]=ze,e[31]=Be):Be=e[31];const ut=W&&n.jsx(Et,{className:"shrink-0",children:n.jsxs(Nt,{value:`__raw__:${W}`,className:"gap-3 py-2",onSelect:()=>z(W),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(ci,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:c("sandbox.pathParamPickerChip.useRawValue",{rawTerm:W,paramLabel:g})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:K})]})]})}),Je=$?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(Pt,{heading:b.category.heading,iconKind:"category",options:Y,template:r,paramName:a,keyPrefix:`${J?.source.id}:cat`,onSelect:z})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(Pt,{heading:b.product.heading,iconKind:"product",options:_,template:r,paramName:a,keyPrefix:`${J?.source.id}:prod`,onSelect:z})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:V.map(ne=>{const{source:oe,query:ke,options:Ie}=ne,{noun:ft}=b[oe.kind];if(ke.isLoading)return n.jsx(Yn,{text:c("sandbox.pathParamPickerChip.loading",{noun:ft})},oe.id);if(ke.isError)return n.jsx(Yn,{text:c("sandbox.pathParamPickerChip.couldNotLoad")},oe.id);if(oe.homepageLinks){const Ye=ke.data??[];return n.jsxs(C.Fragment,{children:[n.jsx(Pt,{heading:b.category.heading,iconKind:"category",options:St(Ye.filter(Bl),p),template:r,paramName:a,keyPrefix:`${oe.id}:cat`,onSelect:z}),n.jsx(Pt,{heading:b.product.heading,iconKind:"product",options:St(Ye.filter(Dl),p),template:r,paramName:a,keyPrefix:`${oe.id}:prod`,onSelect:z})]},oe.id)}return n.jsx(Pt,{heading:V.length>1?b[oe.kind].heading:void 0,iconKind:oe.kind,options:Ie,template:r,paramName:a,keyPrefix:oe.id,onSelect:z},oe.id)})});let he;e[32]!==Ne||e[33]!==Be||e[34]!==ut||e[35]!==Je?(he=n.jsxs(Ne,{className:Fe,children:[Be,ut,Je]}),e[32]=Ne,e[33]=Be,e[34]=ut,e[35]=Je,e[36]=he):he=e[36];let Le;e[37]!==ge||e[38]!==ie||e[39]!==he?(Le=n.jsxs(ge,{shouldFilter:je,className:fe,children:[ie,he]}),e[37]=ge,e[38]=ie,e[39]=he,e[40]=Le):Le=e[40];let _e;e[41]!==se||e[42]!==de||e[43]!==me||e[44]!==Le||e[45]!==ae?(_e=n.jsxs(se,{className:ee,onClick:ae,children:[de,me,Le]}),e[41]=se,e[42]=de,e[43]=me,e[44]=Le,e[45]=ae,e[46]=_e):_e=e[46];let Ke;return e[47]!==te||e[48]!==F||e[49]!==l||e[50]!==_e?(Ke=n.jsx(te,{open:l,onOpenChange:F,children:_e}),e[47]=te,e[48]=F,e[49]=l,e[50]=_e,e[51]=Ke):Ke=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:c("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-xs text-special hover:bg-special/25",onClick:ne=>{ne.stopPropagation(),F(!0)},children:d||g}),Ke]})}function Dl(t){return t.kind==="product"}function Bl(t){return t.kind!=="product"}function $l(t){return t.stopPropagation()}function Ml(t){return t.kind==="product"}function Fl(t){return t.kind!=="product"}function zl(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Kl(t){return t.isFallback}function Il(t){return!t.isFallback}function Ul(t){const e=ce.c(8),{sources:s,template:r,paramName:a,sandboxRef:d,onFill:o}=t;let i,c;if(e[0]!==a||e[1]!==d||e[2]!==s||e[3]!==r){const x={template:r,paramName:a},h=s.filter(Hl);c=Ds,i=h.map(j=>Ms(d,j,"",x,!0)),e[0]=a,e[1]=d,e[2]=s,e[3]=r,e[4]=i,e[5]=c}else i=e[4],c=e[5];let l;e[6]!==i?(l={queries:i},e[6]=i,e[7]=l):l=e[7];const m=c(l),[p,f]=C.useState(!1);if(!p)for(const x of m){if(x.isLoading)break;const h=x.data?.[0];if(h){f(!0),queueMicrotask(()=>o(h.value));break}}return null}function Hl(t){return!t.isFallback}function Vl(t){const e=ce.c(31),{name:s,value:r,onCommit:a}=t,d=Pe(),[o,i]=C.useState(r),[c,l]=C.useState(!1),m=C.useRef(!1);let p;e[0]!==s||e[1]!==d?(p=s==="*"?d("sandbox.preview.catchAllParamLabel"):`:${s}`,e[0]=s,e[1]=d,e[2]=p):p=e[2];const f=p,x=o||f;let h;e[3]!==x?(h=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-xs",children:x}),e[3]=x,e[4]=h):h=e[4];let j;e[5]!==f||e[6]!==d?(j=d("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=d,e[7]=j):j=e[7];let g,b;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=S=>i(S.target.value),b=()=>l(!0),e[8]=g,e[9]=b):(g=e[8],b=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(m.current=!0,i(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==o||e[13]!==a||e[14]!==r?(y=()=>{if(l(!1),m.current){m.current=!1;return}const S=Rr(o);i(S),S!==r&&a(S)},e[12]=o,e[13]=a,e[14]=r,e[15]=y):y=e[15];let v;e[16]!==o||e[17]!==f||e[18]!==j||e[19]!==N||e[20]!==y?(v=n.jsx("input",{type:"text",value:o,placeholder:f,title:j,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-xs text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:ql,onChange:g,onFocus:b,onKeyDown:N,onBlur:y}),e[16]=o,e[17]=f,e[18]=j,e[19]=N,e[20]=y,e[21]=v):v=e[21];let P;e[22]!==h||e[23]!==v?(P=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[h,v]}),e[22]=h,e[23]=v,e[24]=P):P=e[24];let E;e[25]!==c||e[26]!==d?(E=c&&n.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-2xs text-muted-foreground",children:[n.jsx(to,{size:10}),d("sandbox.preview.enterToGo")]}),e[25]=c,e[26]=d,e[27]=E):E=e[27];let k;return e[28]!==E||e[29]!==P?(k=n.jsxs(n.Fragment,{children:[P,E]}),e[28]=E,e[29]=P,e[30]=k):k=e[30],k}function ql(t){return t.stopPropagation()}function Wl(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const s=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${s.host}${r}`}catch{return e}}function Gl(t){return t.previewSurfaceActive&&(t.daemonReady||t.production||!!t.servePreviewUrl)}function Jl(t){return t.showPreviewToolbar&&t.contentEditingEnabled}class Hr extends Error{constructor(){super("The site's schema isn't loaded yet"),this.name="PageSchemaNotReadyError"}}async function Yl(t,e){if(t)return t;const s=await e?.().catch(()=>null);if(!s)throw new Hr;return s}async function Ql(t,e,s){return s?Nn(t,e,await Yl(s.meta,s.loadMeta)):Nn(t,e)}function Xl(t){const e=ce.c(5);let s;e[0]!==t?(s=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=s):s=e[1];const r=dr(s);let a;return e[2]!==t||e[3]!==r?(a={mutationFn:async d=>{const{name:o,path:i,template:c,schema:l}=d;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const m=Ba(o),p=c?{...c,name:o,path:i}:await Ql(o,i,l);return await r.mutateAsync({blockKey:m,data:p}),{key:m,name:o,path:i}}},e[2]=t,e[3]=r,e[4]=a):a=e[4],Na(a)}function Zl(t){const e=ce.c(89),{open:s,onOpenChange:r,isPending:a,error:d,templates:o,onSubmit:i}=t,c=a===void 0?!1:a,l=Pe();let m;e[0]!==l?(m=l("sectionsEditor.createPageModal.defaultPageName"),e[0]=l,e[1]=m):m=e[1];const[p,f]=C.useState(m);let x;e[2]!==l?(x=l("sectionsEditor.createPageModal.defaultPagePath"),e[2]=l,e[3]=x):x=e[3];const[h,j]=C.useState(x),[g,b]=C.useState(Ss),[N,y]=C.useState(null),[v,P]=C.useState(s);s!==v&&(P(s),s&&(f(l("sectionsEditor.createPageModal.defaultPageName")),j(l("sectionsEditor.createPageModal.defaultPagePath")),b(Ss),y(null)));const E=!!o?.length;let k;e[4]!==c||e[5]!==r?(k=ue=>{!ue&&!c&&(y(null),r(!1))},e[4]=c,e[5]=r,e[6]=k):k=e[6];const S=k;let R;e[7]!==c||e[8]!==p||e[9]!==i||e[10]!==h||e[11]!==E||e[12]!==g?(R=async ue=>{ue.preventDefault();const xe=p.trim(),me=h.trim();if(!xe||!me||c)return;const ge=Ar(me);if(ge){y(ge);return}y(null),await i({name:xe,path:me,templateKey:E&&g!==Ss?g:null})},e[7]=c,e[8]=p,e[9]=i,e[10]=h,e[11]=E,e[12]=g,e[13]=R):R=e[13];const O=R,T=N??d;let L;e[14]!==l?(L=l("sectionsEditor.createPageModal.title"),e[14]=l,e[15]=L):L=e[15];let D;e[16]!==L?(D=n.jsx(ir,{children:n.jsx(lr,{children:L})}),e[16]=L,e[17]=D):D=e[17];let A;e[18]!==l?(A=l("sectionsEditor.createPageModal.nameLabel"),e[18]=l,e[19]=A):A=e[19];let M;e[20]!==A?(M=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:A}),e[20]=A,e[21]=M):M=e[21];let H;e[22]===Symbol.for("react.memo_cache_sentinel")?(H=ue=>f(ue.target.value),e[22]=H):H=e[22];let X;e[23]!==l?(X=l("sectionsEditor.createPageModal.namePlaceholder"),e[23]=l,e[24]=X):X=e[24];let V;e[25]!==c||e[26]!==p||e[27]!==X?(V=n.jsx(Rs,{id:"new-page-name",value:p,onChange:H,placeholder:X,autoFocus:!0,disabled:c}),e[25]=c,e[26]=p,e[27]=X,e[28]=V):V=e[28];let J;e[29]!==V||e[30]!==M?(J=n.jsxs("div",{className:"space-y-1.5",children:[M,V]}),e[29]=V,e[30]=M,e[31]=J):J=e[31];let q;e[32]!==l?(q=l("sectionsEditor.createPageModal.pathLabel"),e[32]=l,e[33]=q):q=e[33];let G;e[34]!==q?(G=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:q}),e[34]=q,e[35]=G):G=e[35];let Y;e[36]===Symbol.for("react.memo_cache_sentinel")?(Y=ue=>j(ue.target.value),e[36]=Y):Y=e[36];let _;e[37]!==l?(_=l("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=l,e[38]=_):_=e[38];let $;e[39]!==c||e[40]!==h||e[41]!==_?($=n.jsx(Rs,{id:"new-page-path",value:h,onChange:Y,placeholder:_,disabled:c}),e[39]=c,e[40]=h,e[41]=_,e[42]=$):$=e[42];let F;e[43]!==G||e[44]!==$?(F=n.jsxs("div",{className:"space-y-1.5",children:[G,$]}),e[43]=G,e[44]=$,e[45]=F):F=e[45];let I;e[46]!==c||e[47]!==E||e[48]!==l||e[49]!==g||e[50]!==o?(I=E&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:l("sectionsEditor.createPageModal.templateLabel")}),n.jsx($a,{id:"new-page-template",value:g,onChange:b,templates:o??[],disabled:c})]}),e[46]=c,e[47]=E,e[48]=l,e[49]=g,e[50]=o,e[51]=I):I=e[51];let B;e[52]!==T?(B=T&&n.jsx("p",{className:"text-xs text-destructive",children:T}),e[52]=T,e[53]=B):B=e[53];let z;e[54]!==J||e[55]!==F||e[56]!==I||e[57]!==B?(z=n.jsxs("div",{className:"space-y-4 py-4",children:[J,F,I,B]}),e[54]=J,e[55]=F,e[56]=I,e[57]=B,e[58]=z):z=e[58];let W;e[59]!==r?(W=()=>r(!1),e[59]=r,e[60]=W):W=e[60];let K;e[61]!==l?(K=l("sectionsEditor.createPageModal.cancelButton"),e[61]=l,e[62]=K):K=e[62];let te;e[63]!==c||e[64]!==W||e[65]!==K?(te=n.jsx(Me,{type:"button",variant:"outline",onClick:W,disabled:c,children:K}),e[63]=c,e[64]=W,e[65]=K,e[66]=te):te=e[66];let se;e[67]!==c||e[68]!==p||e[69]!==h?(se=!p.trim()||!h.trim()||c,e[67]=c,e[68]=p,e[69]=h,e[70]=se):se=e[70];let ee;e[71]!==c||e[72]!==l?(ee=c?n.jsxs(n.Fragment,{children:[n.jsx(Tt,{className:"size-3.5"}),l("sectionsEditor.createPageModal.creatingButton")]}):l("sectionsEditor.createPageModal.createButton"),e[71]=c,e[72]=l,e[73]=ee):ee=e[73];let ae;e[74]!==se||e[75]!==ee?(ae=n.jsx(Me,{type:"submit",disabled:se,children:ee}),e[74]=se,e[75]=ee,e[76]=ae):ae=e[76];let pe;e[77]!==te||e[78]!==ae?(pe=n.jsxs(Ca,{children:[te,ae]}),e[77]=te,e[78]=ae,e[79]=pe):pe=e[79];let de;e[80]!==O||e[81]!==z||e[82]!==pe||e[83]!==D?(de=n.jsx(rr,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:O,children:[D,z,pe]})}),e[80]=O,e[81]=z,e[82]=pe,e[83]=D,e[84]=de):de=e[84];let ve;return e[85]!==S||e[86]!==s||e[87]!==de?(ve=n.jsx(ar,{open:s,onOpenChange:S,children:de}),e[85]=S,e[86]=s,e[87]=de,e[88]=ve):ve=e[88],ve}function ec(t){const e=ce.c(36),{orgSlug:s,virtualMcpId:r,branch:a,previewUrl:d,meta:o,decofile:i,blockKey:c}=t,l=Pe();let m;e[0]!==a||e[1]!==s||e[2]!==r?(m={orgSlug:s,virtualMcpId:r,branch:a},e[0]=a,e[1]=s,e[2]=r,e[3]=m):m=e[3];const p=dr(m);let f;e[4]!==p?(f=za((k,S)=>p.mutate({blockKey:k,data:S})),e[4]=p,e[5]=f):f=e[5];const x=f;let h;e[6]!==c||e[7]!==i?(h=Ma(i,c),e[6]=c,e[7]=i,e[8]=h):h=e[8];const{resolveType:j,props:g,title:b}=h;if(!j){let k;e[9]!==l?(k=l("sandbox.preview.loaderNoLongerExists"),e[9]=l,e[10]=k):k=e[10];let S;return e[11]!==k?(S=n.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]=S):S=e[12],S}const N=`loader:${c}`,y=`loader:${c}`;let v;e[13]!==c||e[14]!==j||e[15]!==b?(v={mode:"saved",blockKey:c,resolveType:j,title:b},e[13]=c,e[14]=j,e[15]=b,e[16]=v):v=e[16];let P;e[17]!==a||e[18]!==i||e[19]!==o||e[20]!==s||e[21]!==d||e[22]!==g||e[23]!==p.isPending||e[24]!==x||e[25]!==y||e[26]!==v||e[27]!==r?(P=n.jsx(Fa,{orgSlug:s,virtualMcpId:r,branch:a,previewUrl:d,meta:o,decofile:i,kind:"loaders",target:v,initialValue:g,isCreating:p.isPending,onCreate:tc,onSaveReferencedBlock:x,showRun:!1},y),e[17]=a,e[18]=i,e[19]=o,e[20]=s,e[21]=d,e[22]=g,e[23]=p.isPending,e[24]=x,e[25]=y,e[26]=v,e[27]=r,e[28]=P):P=e[28];let E;return e[29]!==c||e[30]!==a||e[31]!==s||e[32]!==N||e[33]!==P||e[34]!==r?(E=n.jsx(Ka,{orgSlug:s,virtualMcpId:r,branch:a,blockKey:c,present:void 0,children:P},N),e[29]=c,e[30]=a,e[31]=s,e[32]=N,e[33]=P,e[34]=r,e[35]=E):E=e[35],E}async function tc(){}function sc(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Qn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:sc(t.error)}}function nc(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 rc(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=nc(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const s=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return s&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(a=>a.status==="error"&&!a.hasData&&a.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:s?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 ac=C.lazy(()=>Ta(()=>import("./sections-editor-DpO_mTF7.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])).then(t=>({default:t.SectionsEditor})));function Xn(t){const e=ce.c(60),{virtualMcpId:s,externalSelection:r,onViewJsonFile:a}=t,d=r===void 0?null:r,{org:o}=zs(),{currentBranch:i,taskId:c}=Lt(),l=Us(),m=Rt(),p=Or(),f=l.lifecycle.phase==="running",x=m.previewUrl;let h;e[0]!==i||e[1]!==o||e[2]!==x||e[3]!==c||e[4]!==s?(h=i?{orgSlug:o.slug,virtualMcpId:s,branch:i,threadId:c??null,previewUrl:x}:null,e[0]=i,e[1]=o,e[2]=x,e[3]=c,e[4]=s,e[5]=h):h=e[5];const j=h,g=ss(s,i);let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const N=Ks(j,b);let y;e[8]!==f?(y={fetchEnabled:f},e[8]=f,e[9]=y):y=e[9];const v=Lr(j,y),P=rc({lifecyclePhase:l.lifecycle.phase,decofile:Qn(N),meta:Qn(v),hasEditableContent:qo(N.data,v.data),fastPreviewActive:jr(s).runtime==="cms"||at(g)}),E=ur()===void 0,k=oc;if(Bo(g)){let _;return e[10]===Symbol.for("react.memo_cache_sentinel")?(_=k(n.jsx(Mo,{})),e[10]=_):_=e[10],_}if(g.kind==="pending"&&g.retrying){let _;return e[11]!==g?(_=k(n.jsx(Fo,{backend:g})),e[11]=g,e[12]=_):_=e[12],_}if(P.kind==="loading"||E){let _;return e[13]===Symbol.for("react.memo_cache_sentinel")?(_=k(n.jsx(La,{})),e[13]=_):_=e[13],_}if(N.data&&ko(v.data)){const _=p.state.target,$=_?.kind==="page"||_?.kind==="section"?_.key:null,F=$??"",I=i??"";let B;return e[14]!==N.data||e[15]!==$||e[16]!==o.slug||e[17]!==F||e[18]!==I||e[19]!==s?(B=k(n.jsx(Ia,{orgSlug:o.slug,virtualMcpId:s,branch:I,decofile:N.data,initialKey:$,compact:!0},F)),e[14]=N.data,e[15]=$,e[16]=o.slug,e[17]=F,e[18]=I,e[19]=s,e[20]=B):B=e[20],B}if(P.kind==="empty"){let _;return e[21]===Symbol.for("react.memo_cache_sentinel")?(_=k(n.jsx(zo,{})),e[21]=_):_=e[21],_}if(P.kind==="error"){let _;e[22]!==N||e[23]!==m||e[24]!==v||e[25]!==P.source?(_=()=>{if(P.source==="sandbox"){m.retry();return}Promise.all([N.refetch(),v.refetch()])},e[22]=N,e[23]=m,e[24]=v,e[25]=P.source,e[26]=_):_=e[26];const $=_;let F;return e[27]!==$||e[28]!==P.source?(F=k(n.jsx($o,{source:P.source,onRetry:$})),e[27]=$,e[28]=P.source,e[29]=F):F=e[29],F}let S;e[30]===Symbol.for("react.memo_cache_sentinel")?(S=_=>k(n.jsx("div",{className:"h-full min-h-0",children:_})),e[30]=S):S=e[30];const R=S,O=p.state.target;if(O?.kind==="loader"&&N.data&&v.data){const _=i??"",$=x??null;let F;return e[31]!==N.data||e[32]!==v.data||e[33]!==o.slug||e[34]!==_||e[35]!==$||e[36]!==O.key||e[37]!==s?(F=R(n.jsx(ec,{orgSlug:o.slug,virtualMcpId:s,branch:_,previewUrl:$,meta:v.data,decofile:N.data,blockKey:O.key})),e[31]=N.data,e[32]=v.data,e[33]=o.slug,e[34]=_,e[35]=$,e[36]=O.key,e[37]=s,e[38]=F):F=e[38],F}let T;e[39]!==i||e[40]!==o.slug||e[41]!==O||e[42]!==s?(T=O||!i?null:fr(pr(o.slug,s,i)),e[39]=i,e[40]=o.slug,e[41]=O,e[42]=s,e[43]=T):T=e[43];const L=T;let D="/",A=null,M=null;O?.kind==="page"?(D=O.path,A=O.key):O?.kind==="section"?M=O.key:L&&(D=L.path,A=L.pageKey);const H=A?`page:${A}`:M?`section:${M}`:`path:${D}`;let X;e[44]===Symbol.for("react.memo_cache_sentinel")?(X=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(Tt,{className:"size-5 text-muted-foreground"})}),e[44]=X):X=e[44];const V=i??"",J=x??void 0,q=M?null:d,G=!!A&&p.state.editSeoPageKey===A;let Y;return e[45]!==M||e[46]!==A||e[47]!==D||e[48]!==H||e[49]!==a||e[50]!==o.slug||e[51]!==q||e[52]!==G||e[53]!==V||e[54]!==J||e[55]!==s||e[56]!==p.consumeEditSeo||e[57]!==p.setFocusedBlock||e[58]!==p.setVariantOverride?(Y=R(n.jsx(C.Suspense,{fallback:X,children:n.jsx(ac,{orgSlug:o.slug,virtualMcpId:s,branch:V,previewReady:!0,previewUrl:J,currentPath:D,activePageBlockKey:A,activeGlobalBlockKey:M,externalSelection:q,initialEditSeo:G,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onFocusedBlockChange:p.setFocusedBlock,onViewJsonFile:a},H)})),e[45]=M,e[46]=A,e[47]=D,e[48]=H,e[49]=a,e[50]=o.slug,e[51]=q,e[52]=G,e[53]=V,e[54]=J,e[55]=s,e[56]=p.consumeEditSeo,e[57]=p.setFocusedBlock,e[58]=p.setVariantOverride,e[59]=Y):Y=e[59],Y}function oc(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Zn(t){const e=ce.c(51),{virtualMcpId:s,pageKey:r,onClose:a,ref:d}=t,o=Pe(),i=ur(),c=i===!0,l=So(s);let m;e[0]!==l||e[1]!==r?(m=Po(l,ui(r)),e[0]=l,e[1]=r,e[2]=m):m=e[2];const p=m,{org:f}=zs(),{currentBranch:x,taskId:h}=Lt(),g=Rt().previewUrl;let b;e[3]!==x||e[4]!==f.slug||e[5]!==g||e[6]!==h||e[7]!==s?(b=x?{orgSlug:f.slug,virtualMcpId:s,branch:x,threadId:h??null,previewUrl:g}:null,e[3]=x,e[4]=f.slug,e[5]=g,e[6]=h,e[7]=s,e[8]=b):b=e[8];const y=Ks(b),v=x??"";let P;e[9]!==f.slug||e[10]!==v||e[11]!==s?(P={orgSlug:f.slug,virtualMcpId:s,branch:v},e[9]=f.slug,e[10]=v,e[11]=s,e[12]=P):P=e[12];let E;e[13]===Symbol.for("react.memo_cache_sentinel")?(E={holdsCopy:!0},e[13]=E):E=e[13];const{save:k,flush:S,hold:R}=Ua(P,E),O=x??"";let T;e[14]!==f.slug||e[15]!==O||e[16]!==s?(T=Ko({orgSlug:f.slug,virtualMcpId:s,branch:O}),e[14]=f.slug,e[15]=O,e[16]=s,e[17]=T):T=e[17];const L=Io(T);let D;e[18]!==r||e[19]!==L?(D=L(r),e[18]=r,e[19]=L,e[20]=D):D=e[20];const A=D;let M;e[21]!==A||e[22]!==r?(M={pageKey:r,copyEpoch:A},e[21]=A,e[22]=r,e[23]=M):M=e[23];const[H,X]=C.useState(M);(H.pageKey!==r||H.copyEpoch!==A)&&(X({pageKey:r,copyEpoch:A}),R(r));const V=y.data?.[r],J=y.data===void 0&&y.isLoading||i===void 0,q=y.data!==void 0&&V===void 0,G=!x||q||J;let Y;e[24]!==V?(Y=V===void 0?"":JSON.stringify(V,null,2),e[24]=V,e[25]=Y):Y=e[25];const _=Y;let $;e[26]!==r||e[27]!==G||e[28]!==k?($=K=>{if(G)return;let te;try{te=JSON.parse(K)}catch{return}te===null||typeof te!="object"||Array.isArray(te)||k(r,te)},e[26]=r,e[27]=G,e[28]=k,e[29]=$):$=e[29];const F=$;let I;e[30]!==S?(I=()=>({flush:S}),e[30]=S,e[31]=I):I=e[31],C.useImperativeHandle(d,I);let B;e[32]!==p||e[33]!==c||e[34]!==a||e[35]!==o?(B=c?n.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:n.jsx("span",{title:p,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:p})}):n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:o("sectionsEditor.pageJsonDialog.titleShort")}),n.jsx(Me,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":o("sectionsEditor.pageJsonDialog.close"),className:"shrink-0",children:n.jsx(Ra,{size:14})})]}),e[32]=p,e[33]=c,e[34]=a,e[35]=o,e[36]=B):B=e[36];let z;e[37]!==A||e[38]!==y.data||e[39]!==S||e[40]!==_||e[41]!==J||e[42]!==q||e[43]!==r||e[44]!==G||e[45]!==F||e[46]!==o?(z=J?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(Tt,{className:"size-5 text-muted-foreground"})}):q?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",o("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(di,{code:_,language:"json",readOnly:G,height:"100%",onChange:K=>F(K??""),onSave:K=>{F(K),S()}},`${r}:${y.data===void 0?"loading":"ready"}:${A}`)}),e[37]=A,e[38]=y.data,e[39]=S,e[40]=_,e[41]=J,e[42]=q,e[43]=r,e[44]=G,e[45]=F,e[46]=o,e[47]=z):z=e[47];let W;return e[48]!==B||e[49]!==z?(W=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[B,z]}),e[48]=B,e[49]=z,e[50]=W):W=e[50],W}function Vr(t){return t.contentEditingEnabled&&!t.isMobile}function ic(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function lc(t,e){return t==="blocks"?"preview":e?"blocks":t}function cc(t){return Vr({contentEditingEnabled:_r(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function dc(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}function uc(t){const e=ri(t),{display:s}=t;let r=null;if(s.mode==="production"&&s.iframeBase)try{r=new URL(t.path,s.iframeBase).href}catch{r=null}const a=ai(r,e);return{value:e,frame:a?Bs(a,t.device):null,newTab:a}}function fc(t){const e=ce.c(90),{tests:s,options:r,onChange:a,available:d}=t,o=Pe();let i;e[0]!==r?(i=Dr(r),e[0]=r,e[1]=i):i=e[1];const c=i;let l;e[2]!==r.tests?(l=r.tests??{},e[2]=r.tests,e[3]=l):l=e[3];const m=l;let p;e[4]!==a||e[5]!==r?(p=K=>{const te=K?Ho(K):null,{at:se,...ee}=r;a(te?{...ee,at:te}:ee)},e[4]=a,e[5]=r,e[6]=p):p=e[6];const f=p;let x;e[7]!==m||e[8]!==a||e[9]!==r?(x=(K,te)=>{const se={...m};te==="on"?se[K]=!0:te==="off"?se[K]=!1:delete se[K];const{tests:ee,...ae}=r;a(Object.keys(se).length>0?{...ae,tests:se}:ae)},e[7]=m,e[8]=a,e[9]=r,e[10]=x):x=e[10];const h=x;let j;e[11]!==o?(j=o("sandbox.previewAs.label"),e[11]=o,e[12]=j):j=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(so,{size:16}),e[13]=g):g=e[13];let b;e[14]!==c||e[15]!==j?(b=n.jsx(lt,{asChild:!0,children:n.jsx(xr,{asChild:!0,children:n.jsx(We,{"aria-label":j,active:c,"data-testid":"preview-as-trigger",children:g})})}),e[14]=c,e[15]=j,e[16]=b):b=e[16];let N;e[17]!==o?(N=o("sandbox.previewAs.label"),e[17]=o,e[18]=N):N=e[18];let y;e[19]!==N?(y=n.jsx(ct,{children:N}),e[19]=N,e[20]=y):y=e[20];let v;e[21]!==b||e[22]!==y?(v=n.jsxs(dt,{children:[b,y]}),e[21]=b,e[22]=y,e[23]=v):v=e[23];let P;e[24]!==o?(P=o("sandbox.previewAs.label"),e[24]=o,e[25]=P):P=e[25];let E;e[26]!==P?(E=n.jsx("h3",{className:"text-sm font-medium",children:P}),e[26]=P,e[27]=E):E=e[27];let k;e[28]!==d||e[29]!==o?(k=o(d?"sandbox.previewAs.intro":"sandbox.previewAs.unavailable"),e[28]=d,e[29]=o,e[30]=k):k=e[30];let S;e[31]!==k?(S=n.jsx("p",{className:"text-xs text-muted-foreground",children:k}),e[31]=k,e[32]=S):S=e[32];let R;e[33]!==E||e[34]!==S?(R=n.jsxs("div",{className:"flex flex-col gap-1",children:[E,S]}),e[33]=E,e[34]=S,e[35]=R):R=e[35];let O;e[36]!==o?(O=o("sandbox.previewAs.momentLabel"),e[36]=o,e[37]=O):O=e[37];let T;e[38]!==O?(T=n.jsx(pi,{htmlFor:"preview-as-moment",children:O}),e[38]=O,e[39]=T):T=e[39];let L;e[40]!==r.at?(L=Uo(r.at),e[40]=r.at,e[41]=L):L=e[41];let D;e[42]!==f?(D=K=>f(K.target.value),e[42]=f,e[43]=D):D=e[43];let A;e[44]!==L||e[45]!==D?(A=n.jsx(Rs,{id:"preview-as-moment",type:"datetime-local",className:Vo,value:L,onChange:D}),e[44]=L,e[45]=D,e[46]=A):A=e[46];const M=r.at===void 0;let H;e[47]!==f?(H=()=>f(""),e[47]=f,e[48]=H):H=e[48];let X;e[49]!==o?(X=o("sandbox.previewAs.now"),e[49]=o,e[50]=X):X=e[50];let V;e[51]!==M||e[52]!==H||e[53]!==X?(V=n.jsx(Me,{type:"button",variant:"ghost",size:"sm",disabled:M,onClick:H,children:X}),e[51]=M,e[52]=H,e[53]=X,e[54]=V):V=e[54];let J;e[55]!==A||e[56]!==V?(J=n.jsxs("div",{className:"flex items-center gap-2",children:[A,V]}),e[55]=A,e[56]=V,e[57]=J):J=e[57];let q;e[58]!==o?(q=o("sandbox.previewAs.momentHint"),e[58]=o,e[59]=q):q=e[59];let G;e[60]!==q?(G=n.jsx("p",{className:"text-xs text-muted-foreground",children:q}),e[60]=q,e[61]=G):G=e[61];let Y;e[62]!==T||e[63]!==J||e[64]!==G?(Y=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[T,J,G]}),e[62]=T,e[63]=J,e[64]=G,e[65]=Y):Y=e[65];let _;e[66]!==o?(_=o("sandbox.previewAs.testsLabel"),e[66]=o,e[67]=_):_=e[67];let $;e[68]!==_?($=n.jsx("span",{className:"text-sm font-medium",children:_}),e[68]=_,e[69]=$):$=e[69];let F;e[70]!==m||e[71]!==h||e[72]!==o||e[73]!==s?(F=s.length===0?n.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.previewAs.noTests")}):n.jsxs(n.Fragment,{children:[n.jsx("ul",{className:"flex flex-col gap-1.5",children:s.map(K=>n.jsxs("li",{className:"flex items-center justify-between gap-2","data-testid":"preview-as-test",children:[n.jsx("span",{className:"min-w-0 truncate text-sm",children:K}),n.jsxs(mi,{type:"single",variant:"outline",size:"sm",value:m[K]===void 0?"":m[K]?"on":"off",onValueChange:te=>h(K,te),"aria-label":K,children:[n.jsx(Fn,{value:"off",children:o("sandbox.previewAs.off")}),n.jsx(Fn,{value:"on",children:o("sandbox.previewAs.on")})]})]},K))}),n.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.previewAs.testsHint")})]}),e[70]=m,e[71]=h,e[72]=o,e[73]=s,e[74]=F):F=e[74];let I;e[75]!==$||e[76]!==F?(I=n.jsxs("div",{className:"flex flex-col gap-1.5",children:[$,F]}),e[75]=$,e[76]=F,e[77]=I):I=e[77];let B;e[78]!==c||e[79]!==a||e[80]!==o?(B=c&&n.jsx(Me,{type:"button",variant:"outline",size:"sm",onClick:()=>a({}),children:o("sandbox.previewAs.reset")}),e[78]=c,e[79]=a,e[80]=o,e[81]=B):B=e[81];let z;e[82]!==R||e[83]!==Y||e[84]!==I||e[85]!==B?(z=n.jsxs(br,{className:"flex w-80 flex-col gap-4 p-4",align:"center",sideOffset:8,"data-testid":"preview-as",children:[R,Y,I,B]}),e[82]=R,e[83]=Y,e[84]=I,e[85]=B,e[86]=z):z=e[86];let W;return e[87]!==v||e[88]!==z?(W=n.jsxs(yr,{children:[v,z]}),e[87]=v,e[88]=z,e[89]=W):W=e[89],W}const pc=15e3;function mc(t,e,s){return s?t.src===e||t.loading?t:{src:e,loading:!0}:t.src===e&&!t.loading?t:{src:e,loading:!1}}function er(t){return t.loading?{...t,loading:!1}:t}const hc=500,gc={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},tr=1,Qt=["desktop","mobile","tablet"],vc=["preview","visual","blocks"],sr={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function xc(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 jt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ls(t,e){try{return new URL(t,e).href}catch{return null}}function bc(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 s={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:s,effective:s.url}}return{pin:t,effective:t?.url??null}}function yc(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function wc(t,e,s){const r=t.toLowerCase(),a=e.toLowerCase(),d=a.split("/").filter(Boolean),o=c=>{if(c===s)return 100;const l=c.indexOf(s);if(l===-1)return 0;let m=40;return l===0?m+=30:/[\s/-]/.test(c[l-1]??"")&&(m+=20),m+=Math.round(s.length/c.length*20),m};let i=Math.max(o(r),o(a));return d.at(-1)===s?i=Math.max(i,95):d.includes(s)&&(i=Math.max(i,90)),i}function kc(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Sc({virtualMcpId:t}){const e=Pe(),s=Tr(),{currentBranch:r,taskId:a,virtualMcpId:d}=Lt(),o=!!Ja(),i=Or(),c=co(d===t?t:null),l=jr(t),m=gi(c?.metadata?.ui?.layout??null),p=_r(m),f=Vr({contentEditingEnabled:p,isMobile:s}),[x]=C.useState(()=>cc({cmsMode:m,isMobile:s})),[h,j]=As(_s.previewEditingMode(t),u=>u&&vc.includes(u)?u:null),g=h??x,[b,N]=As(_s.previewDeviceSize(t),u=>u&&Qt.includes(u)?u:"desktop"),[y,v]=C.useState(null),[P,E]=C.useState(null),k=C.useRef(null),S=C.useRef(null),[R,O]=C.useState(!1),T=C.useRef(null),L=()=>{T.current?.flush(),O(!1)},D=()=>O(u=>(u&&T.current?.flush(),!u)),[A,M]=C.useState({width:0,height:0}),[H,X]=C.useState(!1),[V,J]=C.useState({}),[q,G]=C.useState(""),Y=C.useRef(null),[_,$]=C.useState(!1),[F,I]=C.useState(),[B,z]=C.useState(null),[W,K]=C.useState(null),[te,se]=C.useState(null),[ee,ae]=C.useState(()=>i.state.target?.kind==="page"?i.state.target.path:"/"),[pe,de]=C.useState(()=>i.state.target?.kind==="page"?i.state.target.key:null),[ve,ue]=C.useState({}),[xe,me]=C.useState(!1),ge=C.useRef(null),je=()=>{me(!0),ge.current&&clearTimeout(ge.current),ge.current=setTimeout(()=>me(!1),15e3)},fe=()=>{ge.current&&(clearTimeout(ge.current),ge.current=null),me(!1)},{org:ie}=zs(),Ne=Us(),Fe=Rt(),ze=Fe.vmEntry,Be=Ne.lifecycle.phase,{url:ut,undecided:Je}=Nr(t),he=ss(t,r),{connection:Le}=Cr(t),_e=fi(t),Ke=jo({hasServeConnection:!!Le,runtime:l.runtime}),ne=Je||Ke==="github"&&(_e==="loading"||_e==="error"),oe=!at(he)&&!ne&&!(Ke==="github"&&he.kind==="pending"),ke=He(he)??ut,Ie=ke??Fe.previewUrl,ft=!!ke||Be==="running",Ye=c?.id===t?mo(c.metadata):null,pt=!ke&&!Je&&c?.id===t&&l.runtime==="cms",qr=l.projectDefault==="cms",mt=oe?si({sandboxUrl:Ie,previewServerUrl:Ye,fastPreviewActive:pt}):null,Vs=t&&r?{orgSlug:ie.slug,virtualMcpId:t,branch:r,threadId:a??null,previewUrl:Ie}:null,qs=Ks(Vs,{fetchEnabled:ft}),ns=Lr(Vs,{fetchEnabled:ft}),le=qs.data,Se=ns.data,Qe=le?Wo(le,Se).sort((u,w)=>u.name.localeCompare(w.name)):[],Ws=t&&r?{orgSlug:ie.slug,virtualMcpId:t,branch:r}:null,Gs=Xl(Ws),rs=le&&Se?Go(le,Se):[],Js=oe&&le&&Se?Ha(Se,le,"loaders"):[],Ys=q?(()=>{const u=q.toLowerCase();return Qe.map(w=>({page:w,score:wc(w.name,w.path,u)})).filter(({score:w})=>w>0).sort((w,U)=>U.score-w.score||w.page.path.length-U.page.path.length).map(({page:w})=>w)})():Qe,Qs=rs.filter(u=>{if(!q)return!0;const w=q.toLowerCase();return u.name.toLowerCase().includes(w)||u.key.toLowerCase().includes(w)||u.resolveType.toLowerCase().includes(w)}),Xs=f?Js:[],Zs=Xs.filter(u=>{if(!q)return!0;const w=q.toLowerCase();return u.title.toLowerCase().includes(w)||u.key.toLowerCase().includes(w)||u.resolveType.toLowerCase().includes(w)}),At=W?Js.find(u=>u.key===W)??null:null,Oe=Is,as=B||W?null:Jo(Qe,ee,pe),re=as?.key??null,Xe=i.state.target?.kind==="section"?i.state.target.key:i.state.focusedBlockKey??re,_t=as?.path??null,Ze=(re?ve[re]:void 0)??{},Ee=Ve(ee,Ze),os={};if(oe&&ft&&Ie&&Se&&le){const u=Va(Se,"loaders"),w=re?le[re]:void 0,U=bl(w,le,be=>u.has(be)),Z=ml(U);for(const be of Ct(ee)){if(be.type!=="param")continue;const $e=ul(ee,be.name,U),Te=vl($e,u,Z);Te.length>0&&(os[be.name]=Te)}}const Ot=t&&r?{orgSlug:ie.slug,virtualMcpId:t,branch:r,threadId:a??null}:null,en=le&&re?Yo(le,re,0):[],tn=at(he),sn=le?Qo(en,le,tn):[],is=sn.map(u=>u.isSavedBlock?u.label:""),ls=sn.map(u=>u.isSavedBlock?"global":u.isMultivariate?"variant":"normal"),cs=en.map(u=>$s(u,le??{},tn)),Dt=C.useRef(null),Re=C.useRef(null),Wr=Ne.status.state==="paused",ds=Ne.phase,nn=qa({claimPhase:ds,lifecycle:Ne.lifecycle}),qe=Fe.previewState,Gr=Fe.userStopped,Jr=Eo(ie.slug,t??""),{url:Ue}=oi(pt&&t&&r?{orgSlug:ie.slug,virtualMcpId:t,branch:r,previewServerUrl:Ye??null,path:Ee}:null),Yr=qr&&l.runtime==="sandbox",Ce=No(he,Ke,_e),rn=Co(Ce&&pt&&he.kind==="protocol"&&t&&r?{orgSlug:ie.slug,virtualMcpId:t,branch:r}:null),an=Ce?rn.pointer:null,Q=Gi({previewState:qe,progressStatus:nn.status,previewServerUrl:Ye,fastPreviewActive:pt,fastPreviewReady:!!Ue,codingSession:Yr,localPreviewUrl:ke,hostedDraft:Ce,hostedPointerPending:Ce&&(he.kind==="pending"||rn.pending),deciding:ne}),on=Q.showWakingPill||Ce&&Q.mode==="production"&&!an,ht=Q.mode!=="none",Qr=Q.mode==="production"&&Q.iframeBase?jt(Q.iframeBase):null,et=Q.mode==="production"?Qr:jt(Ie),Xr=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,gt=oe?ke?Q.mode==="sandbox"&&f&&g==="blocks":Q.mode==="production"&&pt&&Xr&&f&&g==="blocks":!1,ln=C.useRef(null),{pin:Zr,effective:ea}=bc(ln.current,{inPlaceRenderActive:gt,draftPreviewUrl:Ue,resolvedPath:Ee});ln.current=Zr;const cn=i.state.variantOverride??[],Bt=oe?cn:[],vt=oe?[]:cn,us=at(he)&&Xo.some(u=>Zo(Se,u)==="available"),tt=us?V:{},dn=Dr(tt),ta=us&&le?Object.keys(ei(le).experiments):[],$t=Ce?uc({display:Q,path:Ee,pointer:an,device:b,forcedVariants:vt,previewOptions:tt}):null,st=t?Tn(ie.slug,t):null,un=JSON.stringify([vt,tt]);C.useEffect(()=>{if(!Ce||!st)return;const[u,w]=JSON.parse(un);Bn(st,{forcedVariants:u,previewOptions:w})},[Ce,st,un]),C.useEffect(()=>{if(!(!Ce||!st))return()=>Bn(st,null)},[Ce,st]);const fs=Le&&He(he)?Do(Le.endpoint,vt,dn):null,sa=Le&&He(he)?fs?hi(fs,tt):_n:null,nt=xc(Q.mode==="sandbox"?Wt(Bs(On(te??Ls(Ee,Q.iframeBase)??Q.iframeBase,sa),b),Bt):Q.mode==="production"&&$t?.frame?$t.frame:Q.mode==="production"?Wt(Bs(zn(Rn(On(te??ea??Ls(Ee,Q.iframeBase)??Q.iframeBase,on?_n:null),vt),tt),b),Bt):null),fn=Ue??(Q.iframeBase?Ls(Ee,Q.iframeBase):null),pn=Q.mode==="production"&&$t?$t.newTab:Q.mode==="production"?fn?Wt(zn(Rn(fn,vt),tt),Bt):null:nt??Q.iframeBase,na=()=>{const u=pn;u&&window.open(u,"_blank","noopener")},xt=t&&r?pr(ie.slug,t,r):null,bt=u=>{xt&&Qa(xt,u)},ye=i.state.target;C.useEffect(()=>{if(!(!ye||!mt||!Se))if(ye.kind==="page"){const u=ve[ye.key]??{};Re.current=Ve(ye.path,u),z(null),K(null),se(null),de(ye.key),ae(ye.path),bt({path:ye.path,pageKey:ye.key,params:u})}else if(ye.kind==="loader")Re.current=null,z(null),K(ye.key),se(null);else{const u=rs.find(w=>w.key===ye.key);if(u){Re.current=null;const w=An(Se);K(null),z(u),se(Dn(mt,w,u.key))}}},[ye,mt,Se,ve]),C.useEffect(()=>{!re||_t===null||ye?.kind==="page"&&ye.key===re&&ye.path===_t||i.selectTarget({kind:"page",key:re,path:_t})},[re,_t,ye]);const[mn,ra]=C.useState(null);if(qe.kind==="iframe"&&mn!==qe.previewUrl){const u=mn!==null;ra(qe.previewUrl);const w=xt?fr(xt):null;if(w){if(Re.current=Ve(w.path,w.params),ae(w.path),de(w.pageKey),se(null),z(null),K(null),w.pageKey&&Object.keys(w.params).length>0){const U=w.pageKey;ue(Z=>({...Z,[U]:w.params}))}}else u&&(Re.current=null,ae("/"),se(null),de(null),z(null),K(null))}Dt.current=nt;const aa=Q.mode==="production"&&!!Ue&&!ke,[hn,ps]=C.useState({src:nt??void 0,loading:!1}),Mt=mc(hn,nt??void 0,aa);Mt!==hn&&ps(Mt);const yt=Mt.src,gn=Mt.loading,vn=Xi({iframeRef:k,src:Q.mode==="sandbox"?nt:null,active:Q.mode==="sandbox"}),xn=C.useRef(null);C.useEffect(()=>{const u=gn?setTimeout(()=>ps(er),pc):null,w=()=>{u&&clearTimeout(u)};if(!Ue||!yt||xn.current===Ue)return w;xn.current=Ue;const U=k.current;return U&&U.getAttribute("src")!==yt&&(je(),U.src=yt),w},[Ue,yt,gn]);const bn=()=>{const u=k.current?.contentWindow,w=et;if(!u||!w||!le||!re)return;const U=le[re];if(!U||typeof U!="object")return;const Z=ni({previewBaseUrl:w,pageBlock:U,decofile:le,path:Ee,pathTemplate:ee});if(!Z)return;const be=Wt(Z.src,Oo(Bt,re));u.postMessage({type:"cms-editor::render",src:be,body:Z.body},w)},ms=C.useRef(null);C.useEffect(()=>{if(!gt||B||W||!re||!le){ms.current=null;return}const u={nav:JSON.stringify({page:re,path:Ee,pathTemplate:ee}),content:JSON.stringify(le)},w=yc(ms.current,u);ms.current=u,w&&bn()},[le,gt,B,W,re,Ee,ee]);const hs=C.useRef(null);C.useEffect(()=>{if(!gt||B||W||!re||!le){hs.current=null;return}const u=JSON.stringify(i.state.variantOverride??null),w=hs.current;hs.current={page:re,sig:u},!(!w||w.page!==re||w.sig===u)&&bn()},[i.state.variantOverride,gt,B,W,re]);const oa=!!t&&!!r&&!Ne.notFound&&!Gr&&!Wr&&(ds?.kind==="ready"||Be!=="idle"),we=dc({editingMode:g,sandboxDisplay:Q.mode==="sandbox",blocksEditingEnabled:f});C.useEffect(()=>{const u=et;if(!u)return;const w=U=>{if(U.origin===u)if(U.data?.type==="visual-editor::element-clicked"){const Z=sl.safeParse(U.data.payload);Z.success&&v(Z.data)}else if(U.data?.type==="cms-editor::section-clicked"){const Z=al.safeParse(U.data.payload);Z.success&&E({index:Z.data.sectionIndex,seq:Z.data.clickSeq})}else U.data?.type==="cms-editor::render-start"?je():U.data?.type==="cms-editor::render-end"?(fe(),k.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:is,kinds:ls,keys:cs},u)):U.data?.type==="cms-editor::render-error"&&fe()};return window.addEventListener("message",w),()=>window.removeEventListener("message",w)},[et,is,ls,cs]);const yn=()=>{const u=k.current?.contentWindow,w=jt(Ie);!u||!w||u.postMessage({type:"visual-editor::activate",script:nl},w)},ia=()=>{const u=k.current?.contentWindow,w=jt(Ie);!u||!w||u.postMessage({type:"visual-editor::deactivate"},w)},gs=()=>{const u=k.current?.contentWindow,w=et;!u||!w||(u.postMessage(Q.mode==="production"||ke?{type:"editor::inject",args:{script:Wn}}:{type:"visual-editor::activate",script:Wn},w),u.postMessage({type:"cms-editor::set-labels",labels:is,kinds:ls,keys:cs},w))},la=()=>{const u=k.current?.contentWindow,w=et;!u||!w||u.postMessage({type:"cms-editor::deactivate"},w)},ca=()=>{const u=k.current?.contentWindow,w=et;!u||!w||(u.postMessage({type:"cms-editor::clear-hover"},w),u.postMessage({type:"visual-editor::clear-hover"},w))},Ft=u=>{if(u==="blocks"&&!f)return;const w=g;!s&&u!==w&&(u==="blocks"?S.current?.resize("30%"):S.current?.collapse()),j(u),v(null),E(null),u!=="blocks"&&K(null),w==="visual"&&ia(),u==="visual"&&yn(),w==="blocks"&&u!=="blocks"&&la(),u==="blocks"&&gs()},da=()=>{Ft(ic(g,f))},ua=()=>{Ft(lc(g,f))},vs=()=>{const u=k.current;if(!u)return;je();const w=document.activeElement,U=u.tabIndex;u.tabIndex=-1,u.style.pointerEvents="none",u.blur(),kc(u,Dt.current);let Z;const be=()=>{clearTimeout(Z),u.tabIndex=U,u.style.pointerEvents="";const $e=document.activeElement;(!$e||$e===document.body||$e===u)&&w?.focus(),u.removeEventListener("load",be)};u.addEventListener("load",be),Z=setTimeout(be,3e3)};li(vs);const zt=Tn(ie.slug,t??""),Kt=Ce&&ht&&!!t,wn=C.useRef(null);C.useEffect(()=>{if(Kt)return To(zt)},[Kt,zt]);const{reload:wt}=Lo(ie.slug,t??""),kn=C.useRef(wt.seq);C.useEffect(()=>{if(kn.current!==wt.seq&&(kn.current=wt.seq,!!Kt&&wn.current===Dt.current)){if(wt.navigates){Ln(zt);return}vs()}},[wt.seq]);const fa=Ro(Ws),kt=Ao(He(he)?fa:""),Sn=C.useRef(kt);C.useEffect(()=>{const u=Sn.current;if(Sn.current=kt,!u||!kt||u===kt)return;const w=k.current;if(w)return tl({iframe:w,reload:vs})},[kt]);const pa=()=>{const u=Qt.indexOf(b);N(Qt[(u+1)%Qt.length])},xs=(u,w)=>{if(!re)return;const U=re,Z={...Ze,[u]:w};Re.current=Ve(ee,Z),ue(be=>({...be,[U]:Z})),bt({path:ee,pageKey:U,params:Z})},ma=Wl({iframeBase:Q.iframeBase,resolvedPath:Ee,activeGlobalSectionName:B?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),bs=u=>{const w=ve[u.key]??{},U=Ve(u.path,w);(B||Oe(U)!==Oe(Ee))&&je(),Re.current=U,z(null),K(null),se(null),E(null),de(u.key),ae(u.path),bt({path:u.path,pageKey:u.key,params:w}),i.selectTarget({kind:"page",key:u.key,path:u.path})};Ya(xt,u=>{(B||Oe(u)!==Oe(Ee))&&je(),Re.current=u,z(null),K(null),se(null),E(null),de(null),ae(u),bt({path:u,pageKey:null,params:{}})});const ha=u=>{if(at(he)){const Z=le?ti(le,u.key,Se):null;Z?bs(Z):Zt.info(e("sandbox.preview.blockOnNoPage"));return}if(!mt||!Se){Zt.error(e("sandbox.preview.previewMetadataNotReady"));return}je(),Re.current=null;const w=An(Se),U=Dn(mt,w,u.key);z(u),K(null),se(U),E(null),i.selectTarget({kind:"section",key:u.key})},ga=u=>{f&&(z(null),K(u.key),se(null),Ft("blocks"),i.selectTarget({kind:"loader",key:u.key}))},va=async({name:u,path:w,templateKey:U})=>{if(!t||!r)return;const Z=Ar(w);if(Z){I(Z);return}const be=w.trim().startsWith("/")?w.trim():`/${w.trim()}`;if(Qe.some(Te=>Oe(Te.path)===Oe(be))){I(e("sandbox.preview.pageAlreadyExists",{path:be}));return}let $e;if(U&&($e=le?.[U],!$e)){I(e("sandbox.preview.templateNoLongerExists"));return}I(void 0);try{const Te=await Gs.mutateAsync({name:u,path:be,template:$e,schema:at(he)?{meta:Se,loadMeta:async()=>(await ns.refetch()).data}:void 0});$(!1),Zt.success(e("sandbox.preview.pageCreated",{name:u})),await xi(hc),bs({key:Te.key,name:Te.name,path:Te.path}),Ft("blocks")}catch(Te){I(Te instanceof Hr?e("sandbox.preview.pageSchemaNotReady"):Te instanceof Error?Te.message:e("sandbox.preview.failedToCreatePage"))}},It=Gl({previewSurfaceActive:ht,daemonReady:oa,production:Q.mode==="production",servePreviewUrl:He(he)}),xa=Jl({showPreviewToolbar:It,contentEditingEnabled:p}),Ut=()=>{X(!1),G("")},ys=B?.name??At?.title??as?.name,ws=qs.isPending||ns.isPending,ks=ws?jt(Q.iframeBase):ys,Ht=B?`section:${B.key}`:W?`loader:${W}`:re?`page:${re}`:void 0,ba=It?xa?n.jsxs(yr,{open:H,onOpenChange:u=>{X(u),u||G("")},children:[n.jsx(xr,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:ws?ks??void 0:B||At?ys:[ys,ee].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-ring",children:n.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:[B&&n.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-2xs font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[n.jsx(no,{size:11}),e("sandbox.preview.globalBadge")]}),At&&n.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:[n.jsx(ro,{size:11}),e("sandbox.preview.loaderBadge")]}),ks&&n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:ks}),!ws&&!B&&!At&&n.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:ee}),n.jsx(Xa,{size:12,className:De("shrink-0 transition-transform",H&&"rotate-180")})]})})}),n.jsxs(br,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[n.jsxs(kr,{shouldFilter:!1,defaultValue:Ht,children:[n.jsx(Sr,{value:q,onValueChange:u=>{G(u),Y.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),n.jsxs(wr,{ref:Y,className:"max-h-80",children:[n.jsx(Pr,{children:Qe.length===0&&rs.length===0&&Xs.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),Ys.length>0&&n.jsx(Et,{children:Ys.map(u=>n.jsxs(Nt,{value:`page:${u.key}`,"aria-current":Ht===`page:${u.key}`||void 0,title:`${u.name} · ${u.path}`,onSelect:()=>{Ut(),bs(u)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:u.name}),n.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:u.path})]},u.key))}),Qs.length>0&&n.jsx(Et,{heading:e("sandbox.preview.globalComponents"),children:Qs.map(u=>n.jsx(Nt,{value:`section:${u.key}`,"aria-current":Ht===`section:${u.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{Ut(),ha(u)},children:n.jsx("span",{className:"truncate",children:u.name})},u.key))}),Zs.length>0&&n.jsx(Et,{heading:e("sandbox.preview.globalLoaders"),children:Zs.map(u=>n.jsx(Nt,{value:`loader:${u.key}`,"aria-current":Ht===`loader:${u.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{Ut(),ga(u)},children:n.jsx("span",{className:"truncate",children:u.title})},u.key))})]})]}),!B&&!W&&Ct(ee).some(u=>u.type!=="text")&&n.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:Ct(ee).map((u,w)=>{if(u.type==="text")return n.jsx("span",{children:u.text},`text-${w}`);const U=os[u.name];return U&&Ot?n.jsx(Ol,{sources:U,template:ee,paramName:u.name,value:Ze[u.name]??"",sandboxRef:Ot,onCommit:Z=>xs(u.name,Z)},`${re}:${u.name}`):n.jsx(Vl,{name:u.name,value:Ze[u.name]??"",onCommit:Z=>xs(u.name,Z)},`${re}:${u.name}`)})}),n.jsx("div",{className:"border-t p-1.5",children:n.jsxs(Me,{variant:"ghost",className:"w-full justify-start",onClick:()=>{Ut(),I(void 0),$(!0)},children:[n.jsx(vr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):n.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:ma}):null,Pn=It||p?n.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[n.jsxs(dt,{children:[n.jsx(lt,{asChild:!0,children:n.jsx(We,{onClick:pa,"aria-label":e(sr[b]),children:b==="mobile"?n.jsx(hr,{size:16}):b==="tablet"?n.jsx(ao,{size:16}):n.jsx(gr,{size:16})})}),n.jsx(ct,{children:e(sr[b])})]}),ba,n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[us&&n.jsx(fc,{tests:ta,options:V,onChange:J,available:!!fs||!on||!dn}),n.jsx(We,{onClick:na,disabled:Ce&&!pn,"aria-label":e("sandbox.preview.openInNewTab"),children:n.jsx(cr,{size:16})})]})]}):null,ya=(oe||o)&&Q.mode==="sandbox",Vt=gc[b],qt=b==="desktop"&&(A.width===0||A.width>=Vt.width+2*tr),jn=qt?1:Math.min(A.width>0?A.width/(Vt.width+2*tr):1,1),wa=qt?{width:"100%",height:"100%"}:{width:`${Vt.width}px`,height:A.height>0?`${A.height/jn}px`:`${Vt.height}px`,transform:`scale(${jn})`,transformOrigin:"top center"},En=n.jsxs(n.Fragment,{children:[ya&&(It||p)&&n.jsx(We,{onClick:da,"aria-pressed":we==="visual","aria-label":e("sandbox.preview.visualEditor"),active:we==="visual",children:n.jsx(Cn,{size:16})}),f&&n.jsxs(dt,{children:[n.jsx(lt,{asChild:!0,children:n.jsx(We,{onClick:ua,"aria-pressed":we==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:we==="blocks",children:n.jsx(io,{size:16})})}),n.jsx(ct,{children:e("sandbox.preview.blocksEditor")})]}),Xe&&n.jsxs(dt,{children:[n.jsx(lt,{asChild:!0,children:n.jsx(We,{onClick:D,"aria-pressed":R,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:R,children:n.jsx(oo,{size:16})})}),n.jsx(ct,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),ka=!!W&&we==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[Ot&&Object.entries(os).map(([u,w])=>(Ze[u]??"")===""?n.jsx(Ul,{sources:w,template:ee,paramName:u,sandboxRef:Ot,onFill:U=>xs(u,U)},`${re}:${u}`):null),n.jsxs(n.Fragment,{children:[n.jsx(Os.Toolbar.Center.Portal,{fallback:n.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Pn}),children:Pn}),n.jsx(Os.Toolbar.Right.Portal,{fallback:En,children:En})]}),n.jsx("div",{className:"flex-1 overflow-hidden relative",children:ka?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(Xn,{virtualMcpId:t,externalSelection:P,onViewJsonFile:D}),R&&Xe&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(Zn,{ref:T,virtualMcpId:t,pageKey:Xe,onClose:L})})]}):n.jsxs($n,{orientation:"horizontal",disabled:we!=="blocks",className:"relative isolate",children:[n.jsx(Gt,{ref:S,id:"preview-blocks-editor",defaultSize:we==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:we==="blocks"&&n.jsx(Xn,{virtualMcpId:t,externalSelection:P,onViewJsonFile:D})}),we==="blocks"&&n.jsx(Mn,{withHandle:!0}),n.jsx(Gt,{id:"preview-canvas",defaultSize:we==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:n.jsxs($n,{orientation:"horizontal",disabled:!(R&&Xe),children:[n.jsx(Gt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:u=>{if(!u)return;const w=()=>M(Z=>Z.width===u.clientWidth&&Z.height===u.clientHeight?Z:{width:u.clientWidth,height:u.clientHeight});w();const U=new ResizeObserver(w);return U.observe(u),()=>U.disconnect()},className:De("h-full relative overflow-clip flex justify-center",ht&&!qt&&"bg-muted/30"),children:[(xe||Jr)&&ht&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),Q.showDecidingLoader&&n.jsx("div",{"data-testid":"preview-deciding",className:"absolute inset-0 z-30 flex items-center justify-center",children:n.jsx(Tt,{className:"size-5 text-muted-foreground"})}),Q.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(Ps,{kind:"starting",progress:nn,claimPhase:ds})}),!ke&&!ne&&qe.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(Ps,{kind:"suspended",onResume:Fe.resume})}),!ke&&!ne&&qe.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(Ps,{kind:"errored",error:qe.error,onRetry:Fe.retry,connectionsHref:`/${ie.slug}/settings/connections`})}),Q.showWakingPill&&n.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 bg-muted px-4 py-3 shadow-soft pointer-events-none select-none",children:[n.jsx(Tt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),we==="visual"&&!y&&n.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-special/40 bg-special/90 px-3 py-1 text-xs font-medium text-special-foreground shadow-soft backdrop-blur-sm pointer-events-none select-none",children:[n.jsx(Cn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),we==="visual"&&y&&n.jsx(ll,{element:y,onDismiss:()=>v(null)}),ht&&nt&&n.jsx("div",{className:De("shrink-0",!qt&&"bg-background shadow-edge"),style:wa,onMouseLeave:ca,children:n.jsx("iframe",{ref:k,src:yt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:vn.handleError,onLoad:()=>{if(ps(er),vn.handleLoad(),fe(),wn.current=Dt.current,Kt&&Ln(zt),Q.mode!=="sandbox"||ke){(Q.mode==="production"&&!Q.showWakingPill||ke)&&we==="blocks"&&gs();return}if(Aa("vm_preview_loaded",{view_mode:we,vm_id:ze?.sandboxHandle??null}),!B)try{const u=k.current?.contentWindow?.location?.pathname;if(!u)return;const w=Re.current;if(w!==null&&(Re.current=null,Oe(u)!==Oe(w))||Oe(u)===Oe(Ee))return;ae(u),bt({path:u,pageKey:pe,params:Ze})}catch{}we==="visual"&&yn(),we==="blocks"&&gs()}},Q.iframeBase)})]})}),R&&Xe&&n.jsxs(n.Fragment,{children:[n.jsx(Mn,{withHandle:!0}),n.jsx(Gt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(Zn,{ref:T,virtualMcpId:t,pageKey:Xe,onClose:L})})]})]})})]})}),n.jsx(Zl,{open:_,onOpenChange:$,isPending:Gs.isPending,error:F,templates:Qe,onSubmit:va})]})}const Fs={app:null,split:!1};function Pc(t){const e=ce.c(24),{project:s,maxApps:r,children:a}=t,d=Pe();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={silent:!0},e[0]=o):o=e[0];const i=uo(o),c=Rt();let l;e[1]!==s.metadata.runtime?(l=s.metadata.runtime??{},e[1]=s.metadata.runtime,e[2]=l):l=e[2];const m=l;let p;e[3]!==m.apps?(p=m.apps??[],e[3]=m.apps,e[4]=p):p=e[4];const f=p;let x;e[5]!==i.update||e[6]!==c||e[7]!==s.id||e[8]!==s.metadata||e[9]!==m||e[10]!==d?(x=y=>i.update.mutate({id:s.id,data:{metadata:{...bi(s.metadata),runtime:{...m,apps:y.length?y:null}}}},{onSuccess:()=>c.start(),onError:()=>Zt.error(d("sandbox.appTabs.saveError"))}),e[5]=i.update,e[6]=c,e[7]=s.id,e[8]=s.metadata,e[9]=m,e[10]=d,e[11]=x):x=e[11];const h=x,j=m.path??null;let g,b;e[12]!==f||e[13]!==h?(g=y=>h([...f,{path:y}]),b=y=>h(f.filter(v=>v.path!==y)),e[12]=f,e[13]=h,e[14]=g,e[15]=b):(g=e[14],b=e[15]);let N;return e[16]!==f||e[17]!==a||e[18]!==r||e[19]!==s.id||e[20]!==j||e[21]!==g||e[22]!==b?(N=n.jsx(jc,{virtualMcpId:s.id,mainPath:j,apps:f,maxApps:r,onAddApp:g,onRemoveApp:b,children:a}),e[16]=f,e[17]=a,e[18]=r,e[19]=s.id,e[20]=j,e[21]=g,e[22]=b,e[23]=N):N=e[23],N}function jc(t){const e=ce.c(102),{virtualMcpId:s,mainPath:r,apps:a,maxApps:d,onAddApp:o,onRemoveApp:i,children:c}=t,l=Pe(),m=Tr(),{currentBranch:p}=Lt(),f=Rt(),x=Us().lifecycle.phase,h=ss(s,p),{url:j}=Nr(s);let g;e[0]!==h||e[1]!==j?(g=He(h)??j,e[0]=h,e[1]=j,e[2]=g):g=e[2];const b=g,N=b??f.previewUrl,y=!!b||x==="running",v=!y&&f.status==="errored";let P;e[3]!==f.vmEntry?.startedWith?.apps?(P=f.vmEntry?.startedWith?.apps??[],e[3]=f.vmEntry?.startedWith?.apps,e[4]=P):P=e[4];const E=P;let k;e[5]!==s?(k=_s.previewAppLayout(s),e[5]=s,e[6]=k):k=e[6];const[S,R]=As(k,Ec);let O;e[7]!==a||e[8]!==S?(O=a.some(fe=>fe.path===S.app)?S.app:null,e[7]=a,e[8]=S,e[9]=O):O=e[9];const T=O,L=T!==null&&S.split&&!m,D=T===null||L,A=T??a[0]?.path??null,[M,H]=C.useState(null),[X,V]=C.useState(!1);let J;e[10]===Symbol.for("react.memo_cache_sentinel")?(J=()=>{H(null),V(!1)},e[10]=J):J=e[10];const q=J;let G;e[11]!==a||e[12]!==M||e[13]!==m||e[14]!==r||e[15]!==o||e[16]!==R?(G=()=>{if(M===null)return;const fe=Kn(M);if(!fe){q();return}if(fe===Kn(r??"")||a.some(ie=>ie.path===fe)){V(!0);return}o(fe),R({app:fe,split:!m}),q()},e[11]=a,e[12]=M,e[13]=m,e[14]=r,e[15]=o,e[16]=R,e[17]=G):G=e[17];const Y=G;let _;e[18]!==r||e[19]!==l?(_=r?Es(r):l("sandbox.appTabs.root"),e[18]=r,e[19]=l,e[20]=_):_=e[20];const $=_;let F;e[21]!==L||e[22]!==l?(F=l(L?"sandbox.appTabs.single":"sandbox.appTabs.split"),e[21]=L,e[22]=l,e[23]=F):F=e[23];const I=F;let B;e[24]!==l?(B=l("sandbox.appTabs.label"),e[24]=l,e[25]=B):B=e[25];let z;e[26]!==l?(z=l("sandbox.appTabs.main"),e[26]=l,e[27]=z):z=e[27];let W;e[28]!==l?(W=l("sandbox.appTabs.mainHint"),e[28]=l,e[29]=W):W=e[29];let K;e[30]!==R?(K=()=>R(Fs),e[30]=R,e[31]=K):K=e[31];let te;e[32]!==v||e[33]!==$||e[34]!==y||e[35]!==D||e[36]!==z||e[37]!==W||e[38]!==K?(te=n.jsx(nr,{label:$,badge:z,hint:W,ready:y,failed:v,onScreen:D,onSelect:K}),e[32]=v,e[33]=$,e[34]=y,e[35]=D,e[36]=z,e[37]=W,e[38]=K,e[39]=te):te=e[39];let se;if(e[40]!==a||e[41]!==T||e[42]!==v||e[43]!==$||e[44]!==i||e[45]!==y||e[46]!==R||e[47]!==L||e[48]!==l){let fe;e[50]!==T||e[51]!==v||e[52]!==$||e[53]!==i||e[54]!==y||e[55]!==R||e[56]!==L||e[57]!==l?(fe=ie=>{const Ne=Es(ie.path);return n.jsx(nr,{label:Ne,hint:l("sandbox.appTabs.extraHint",{app:$}),ready:y,failed:v,onScreen:ie.path===T,onSelect:()=>R({app:ie.path,split:L}),onRemove:()=>i(ie.path),removeLabel:l("sandbox.appTabs.remove",{app:Ne})},ie.path)},e[50]=T,e[51]=v,e[52]=$,e[53]=i,e[54]=y,e[55]=R,e[56]=L,e[57]=l,e[58]=fe):fe=e[58],se=a.map(fe),e[40]=a,e[41]=T,e[42]=v,e[43]=$,e[44]=i,e[45]=y,e[46]=R,e[47]=L,e[48]=l,e[49]=se}else se=e[49];let ee;e[59]!==te||e[60]!==se||e[61]!==B?(ee=n.jsxs("div",{role:"tablist","aria-label":B,className:"flex min-w-0 items-center gap-1 overflow-x-auto",children:[te,se]}),e[59]=te,e[60]=se,e[61]=B,e[62]=ee):ee=e[62];let ae;e[63]!==a.length||e[64]!==Y||e[65]!==M||e[66]!==X||e[67]!==d||e[68]!==l?(ae=M!==null?n.jsx("form",{className:"w-40 shrink-0",onSubmit:fe=>{fe.preventDefault(),Y()},children:n.jsx("input",{autoFocus:!0,value:M,placeholder:"apps/checkout","aria-label":l("sandbox.appTabs.pathLabel"),"aria-invalid":X,onChange:fe=>{H(fe.target.value),V(!1)},onBlur:q,onKeyDown:fe=>{fe.key==="Escape"&&q()},className:De("h-7 w-full rounded-md border bg-background px-2 font-mono text-xs outline-none",X?"border-destructive":"border-border")})}):a.length<d&&n.jsx(it,{label:l("sandbox.appTabs.add"),onClick:()=>H(""),children:n.jsx(vr,{})}),e[63]=a.length,e[64]=Y,e[65]=M,e[66]=X,e[67]=d,e[68]=l,e[69]=ae):ae=e[69];let pe;e[70]!==m||e[71]!==R||e[72]!==L||e[73]!==I||e[74]!==A?(pe=!m&&A&&n.jsx(it,{label:I,active:L,onClick:()=>R(L?Fs:{app:A,split:!0}),children:n.jsx(lo,{})}),e[70]=m,e[71]=R,e[72]=L,e[73]=I,e[74]=A,e[75]=pe):pe=e[75];let de;e[76]!==ee||e[77]!==ae||e[78]!==pe?(de=n.jsxs(n.Fragment,{children:[ee,ae,pe]}),e[76]=ee,e[77]=ae,e[78]=pe,e[79]=de):de=e[79];const ve=de;let ue;e[80]!==ve?(ue=n.jsx(Os.Topbar.Left.Portal,{fallback:n.jsx("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:ve}),children:n.jsx("div",{className:"ml-1 flex min-w-0 items-center gap-1 border-l border-border/60 pl-2",children:ve})}),e[80]=ve,e[81]=ue):ue=e[81];let xe;e[82]!==c||e[83]!==D?(xe=D&&n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:c}),e[82]=c,e[83]=D,e[84]=xe):xe=e[84];let me;e[85]!==T||e[86]!==v||e[87]!==f.start||e[88]!==b||e[89]!==$||e[90]!==N||e[91]!==y||e[92]!==R||e[93]!==L||e[94]!==E?(me=T!==null&&n.jsx(Nc,{name:Es(T),mainName:$,appUrl:N?yi(N,T):null,ready:y,failed:v,notStarted:!b&&!E.includes(T),onStart:f.start,className:De(L&&"border-l border-border"),onClose:L?()=>R({app:T,split:!1}):void 0},T),e[85]=T,e[86]=v,e[87]=f.start,e[88]=b,e[89]=$,e[90]=N,e[91]=y,e[92]=R,e[93]=L,e[94]=E,e[95]=me):me=e[95];let ge;e[96]!==xe||e[97]!==me?(ge=n.jsxs("div",{className:"flex min-h-0 flex-1",children:[xe,me]}),e[96]=xe,e[97]=me,e[98]=ge):ge=e[98];let je;return e[99]!==ue||e[100]!==ge?(je=n.jsxs("div",{className:"flex h-full w-full min-h-0 flex-col",children:[ue,ge]}),e[99]=ue,e[100]=ge,e[101]=je):je=e[101],je}function Ec(t){return t??Fs}function nr(t){const e=ce.c(28),{label:s,badge:r,hint:a,ready:d,failed:o,onScreen:i,onSelect:c,onRemove:l,removeLabel:m}=t,p=i?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/60 hover:text-foreground";let f;e[0]!==p?(f=De("group/app-tab flex h-7 shrink-0 items-center rounded-md text-xs transition-colors",p),e[0]=p,e[1]=f):f=e[1];const x=d?"bg-success":o?"bg-destructive":"animate-pulse bg-warning";let h;e[2]!==x?(h=De("size-1.5 rounded-full",x),e[2]=x,e[3]=h):h=e[3];let j;e[4]!==h?(j=n.jsx("span",{"aria-hidden":!0,className:h}),e[4]=h,e[5]=j):j=e[5];let g;e[6]!==s?(g=n.jsx("span",{className:"max-w-40 truncate",children:s}),e[6]=s,e[7]=g):g=e[7];let b;e[8]!==r?(b=r&&n.jsx("span",{className:"text-[10px] text-muted-foreground",children:r}),e[8]=r,e[9]=b):b=e[9];let N;e[10]!==i||e[11]!==c||e[12]!==j||e[13]!==g||e[14]!==b?(N=n.jsx(lt,{asChild:!0,children:n.jsxs("button",{type:"button",role:"tab","aria-selected":i,onClick:c,className:"flex h-full items-center gap-1.5 rounded-md px-2.5 focus-ring",children:[j,g,b]})}),e[10]=i,e[11]=c,e[12]=j,e[13]=g,e[14]=b,e[15]=N):N=e[15];let y;e[16]!==a?(y=n.jsx(ct,{className:"max-w-64",children:a}),e[16]=a,e[17]=y):y=e[17];let v;e[18]!==N||e[19]!==y?(v=n.jsxs(dt,{children:[N,y]}),e[18]=N,e[19]=y,e[20]=v):v=e[20];let P;e[21]!==l||e[22]!==m?(P=l&&n.jsx("button",{type:"button","aria-label":m,onClick:l,className:"-ml-1 mr-1 flex size-5 items-center justify-center rounded opacity-0 hover:bg-sidebar-accent focus-ring focus-visible:opacity-100 group-hover/app-tab:opacity-100",children:n.jsx(Br,{className:"size-3"})}),e[21]=l,e[22]=m,e[23]=P):P=e[23];let E;return e[24]!==v||e[25]!==P||e[26]!==f?(E=n.jsxs("div",{className:f,children:[v,P]}),e[24]=v,e[25]=P,e[26]=f,e[27]=E):E=e[27],E}function Nc(t){const e=ce.c(71),{name:s,mainName:r,appUrl:a,ready:d,failed:o,notStarted:i,onStart:c,className:l,onClose:m}=t,p=Pe(),[f,x]=C.useState("/"),[h,j]=C.useState("desktop"),[g,b]=C.useState(0),N=C.useRef(null);let y;e[0]!==a||e[1]!==f?(y=a?wi(a,f):null,e[0]=a,e[1]=f,e[2]=y):y=e[2];const v=y;let P;e[3]!==l?(P=De("flex min-h-0 min-w-0 flex-1 flex-col",l),e[3]=l,e[4]=P):P=e[4];let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=W=>{W.preventDefault(),x(N.current?.value||"/")},e[5]=E):E=e[5];let k;e[6]!==s||e[7]!==p?(k=p("sandbox.appPane.path",{app:s}),e[6]=s,e[7]=p,e[8]=k):k=e[8];let S;e[9]!==f||e[10]!==k?(S=n.jsx("form",{className:"min-w-0 flex-1",onSubmit:E,children:n.jsx("input",{ref:N,defaultValue:f,"aria-label":k,className:"h-7 w-full rounded-md border border-border/60 bg-background px-2 font-mono text-xs text-muted-foreground outline-none hover:border-border focus:border-border focus:text-foreground"})}),e[9]=f,e[10]=k,e[11]=S):S=e[11];let R;e[12]!==h||e[13]!==p?(R=p(h==="desktop"?"sandbox.preview.deviceMobile":"sandbox.preview.deviceDesktop"),e[12]=h,e[13]=p,e[14]=R):R=e[14];let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=()=>j(Tc),e[15]=O):O=e[15];let T;e[16]!==h?(T=h==="desktop"?n.jsx(gr,{}):n.jsx(hr,{}),e[16]=h,e[17]=T):T=e[17];let L;e[18]!==R||e[19]!==T?(L=n.jsx(it,{label:R,onClick:O,children:T}),e[18]=R,e[19]=T,e[20]=L):L=e[20];let D;e[21]!==s||e[22]!==p?(D=p("sandbox.appPane.reload",{app:s}),e[21]=s,e[22]=p,e[23]=D):D=e[23];const A=!v||!d;let M,H;e[24]===Symbol.for("react.memo_cache_sentinel")?(M=()=>b(Cc),H=n.jsx(_a,{}),e[24]=M,e[25]=H):(M=e[24],H=e[25]);let X;e[26]!==D||e[27]!==A?(X=n.jsx(it,{label:D,disabled:A,onClick:M,children:H}),e[26]=D,e[27]=A,e[28]=X):X=e[28];let V;e[29]!==s||e[30]!==p?(V=p("sandbox.appPane.openInNewTab",{app:s}),e[29]=s,e[30]=p,e[31]=V):V=e[31];const J=!v||!d;let q;e[32]!==v?(q=()=>v&&window.open(v,"_blank","noopener"),e[32]=v,e[33]=q):q=e[33];let G;e[34]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsx(cr,{}),e[34]=G):G=e[34];let Y;e[35]!==V||e[36]!==J||e[37]!==q?(Y=n.jsx(it,{label:V,disabled:J,onClick:q,children:G}),e[35]=V,e[36]=J,e[37]=q,e[38]=Y):Y=e[38];let _;e[39]!==s||e[40]!==m||e[41]!==p?(_=m&&n.jsx(it,{label:p("sandbox.appPane.close",{app:s}),onClick:m,children:n.jsx(Br,{})}),e[39]=s,e[40]=m,e[41]=p,e[42]=_):_=e[42];let $;e[43]!==X||e[44]!==Y||e[45]!==_||e[46]!==S||e[47]!==L?($=n.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:[S,L,X,Y,_]}),e[43]=X,e[44]=Y,e[45]=_,e[46]=S,e[47]=L,e[48]=$):$=e[48];let F;e[49]!==r||e[50]!==p?(F=p("sandbox.appPane.previewOnly",{app:r}),e[49]=r,e[50]=p,e[51]=F):F=e[51];let I;e[52]!==F?(I=n.jsx("p",{className:"shrink-0 truncate border-b border-border bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground",children:F}),e[52]=F,e[53]=I):I=e[53];let B;e[54]!==h||e[55]!==o||e[56]!==r||e[57]!==s||e[58]!==i||e[59]!==c||e[60]!==d||e[61]!==g||e[62]!==v||e[63]!==p?(B=n.jsx("div",{className:"flex min-h-0 flex-1 justify-center overflow-auto bg-muted/40",children:d&&i?n.jsxs("div",{className:"flex flex-col items-center gap-3 self-center px-6 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:p("sandbox.appPane.notStarted",{app:s})}),n.jsx(Me,{size:"sm",variant:"outline",onClick:c,children:p("sandbox.appPane.start",{app:s})})]}):!d||!v?n.jsx("p",{className:"self-center px-6 text-center text-sm text-muted-foreground",children:d?p("sandbox.appPane.noUrl"):o?p("sandbox.appPane.failed",{app:r}):p("sandbox.appPane.waiting")}):n.jsx("iframe",{src:v,title:s,className:De("h-full bg-background",h==="mobile"?"w-[412px] max-w-full border-x border-border":"w-full")},`${v}#${g}`)}),e[54]=h,e[55]=o,e[56]=r,e[57]=s,e[58]=i,e[59]=c,e[60]=d,e[61]=g,e[62]=v,e[63]=p,e[64]=B):B=e[64];let z;return e[65]!==s||e[66]!==P||e[67]!==$||e[68]!==I||e[69]!==B?(z=n.jsxs("section",{"aria-label":s,className:P,children:[$,I,B]}),e[65]=s,e[66]=P,e[67]=$,e[68]=I,e[69]=B,e[70]=z):z=e[70],z}function Cc(t){return t+1}function Tc(t){return t==="desktop"?"mobile":"desktop"}function it(t){const e=ce.c(11),{label:s,children:r,active:a,disabled:d,onClick:o}=t;let i;e[0]!==a||e[1]!==r||e[2]!==d||e[3]!==s||e[4]!==o?(i=n.jsx(lt,{asChild:!0,children:n.jsx(We,{"aria-label":s,"aria-pressed":a,active:a,disabled:d,onClick:o,children:r})}),e[0]=a,e[1]=r,e[2]=d,e[3]=s,e[4]=o,e[5]=i):i=e[5];let c;e[6]!==s?(c=n.jsx(ct,{children:s}),e[6]=s,e[7]=c):c=e[7];let l;return e[8]!==i||e[9]!==c?(l=n.jsxs(dt,{children:[i,c]}),e[8]=i,e[9]=c,e[10]=l):l=e[10],l}const Lc=async(t,e)=>{try{return await fetch(t,{method:"HEAD",mode:"no-cors",cache:"no-store",credentials:"omit",signal:e}),!0}catch{return!1}},Rc=1e4,Ac=1e4,_c=5e3,Oc=2;function Dc(t,e){return t&&e===0?Ac:Math.min(1e3*2**Math.max(0,e-1),_c)}function Bc(t,e,s){return e?!0:t===!0&&s<Oc}function $c(t,e){const s=ce.c(11),r=Lc,a=Oa();let d;s[0]!==t?(d=or.localAppReachable(t??""),s[0]=t,s[1]=d):d=s[1];const o=d;let i;s[2]!==r||s[3]!==a||s[4]!==o||s[5]!==t?(i=async p=>{const{signal:f}=p,x=new AbortController,h=()=>x.abort();f.addEventListener("abort",h);const j=setTimeout(h,Rc),g=await r(t,x.signal).catch(Fc);clearTimeout(j),f.removeEventListener("abort",h);const b=a.getQueryData(o),N=g?0:(b?.failures??0)+1;return{up:Bc(b?.up??null,g,N),failures:N}},s[2]=r,s[3]=a,s[4]=o,s[5]=t,s[6]=i):i=s[6];const c=!!t;let l;s[7]!==o||s[8]!==i||s[9]!==c?(l={queryKey:o,queryFn:i,enabled:c,retry:!1,staleTime:0,gcTime:0,refetchInterval:Mc},s[7]=o,s[8]=i,s[9]=c,s[10]=l):l=s[10];const{data:m}=Da(l);return t?m?.up??null:null}function Mc(t){return t.state.data?Dc(t.state.data.up,t.state.data.failures):!1}function Fc(){return!1}function zc(t){const{backend:e}=t;if(e.kind==="protocol"&&e.source==="local")return{kind:"connected"};if(e.kind==="unavailable"&&e.source==="local"){const s=e.problem;return!s||s.reason==="not-answering"?t.access==="denied"?{kind:"needs-permission"}:{kind:"not-running"}:{kind:"problem",problem:s}}return{kind:"connecting"}}function Kd(t){const e=ce.c(53),{virtualMcpId:s}=t,r=Pe(),a=fo(s),{connection:d}=Cr(s),{activeTask:o,taskId:i,currentBranch:c}=Lt(),l=Ai(i),[m,p]=C.useState(!1),f=ss(s,c);let x;e[0]!==f||e[1]!==d?(x=d?He(f):null,e[0]=f,e[1]=d,e[2]=x):x=e[2];const h=x,j=$c(h),g=Mr(),b=ki("multi_app_preview");if(ji({threadId:i,sandboxBranch:o?.branch??c,agentHasRepo:js(a?.metadata),threadHasRepo:js(l)||js(o?.metadata)})==="none"&&!d){let E;e[3]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(In,{className:"size-7 text-foreground"})}),e[3]=E):E=e[3];let k;e[4]!==r?(k=r("mainPanelTabs.previewTab.noSourceToPreview"),e[4]=r,e[5]=k):k=e[5];let S;e[6]!==r?(S=r("mainPanelTabs.previewTab.connectGithubDescription"),e[6]=r,e[7]=S):S=e[7];let R,O;e[8]===Symbol.for("react.memo_cache_sentinel")?(R=()=>p(!0),O=n.jsx(In,{className:"size-4"}),e[8]=R,e[9]=O):(R=e[8],O=e[9]);let T;e[10]!==r?(T=r("mainPanelTabs.previewTab.connectGithub"),e[10]=r,e[11]=T):T=e[11];let L;e[12]!==T?(L=n.jsxs(Me,{onClick:R,children:[O,T]}),e[12]=T,e[13]=L):L=e[13];let D;e[14]!==k||e[15]!==S||e[16]!==L?(D=n.jsx(Si,{className:"h-full",image:E,title:k,description:S,actions:L}),e[14]=k,e[15]=S,e[16]=L,e[17]=D):D=e[17];let A;e[18]!==m?(A=n.jsx(Pi,{open:m,onOpenChange:p,mode:"agent"}),e[18]=m,e[19]=A):A=e[19];let M;return e[20]!==A||e[21]!==D?(M=n.jsxs(n.Fragment,{children:[D,A]}),e[20]=A,e[21]=D,e[22]=M):M=e[22],M}if(d&&a&&!He(f)){let E;e[23]!==g||e[24]!==f?(E=zc({backend:f,access:g}),e[23]=g,e[24]=f,e[25]=E):E=e[25];let k;e[26]!==d.endpoint?(k=_o(d.endpoint),e[26]=d.endpoint,e[27]=k):k=e[27];let S;return e[28]!==E||e[29]!==k?(S=n.jsx(Ic,{status:E,host:k}),e[28]=E,e[29]=k,e[30]=S):S=e[30],S}if(h&&j!==!0){let E;e[31]!==r?(E=r("mainPanelTabs.previewTab.localAppWaiting.title"),e[31]=r,e[32]=E):E=e[32];let k;e[33]!==h||e[34]!==r?(k=r("mainPanelTabs.previewTab.localAppWaiting.body",{host:Kc(h)}),e[33]=h,e[34]=r,e[35]=k):k=e[35];let S;e[36]!==k?(S=n.jsx(es,{text:k}),e[36]=k,e[37]=S):S=e[37];let R;e[38]!==r?(R=r("mainPanelTabs.previewTab.localAppWaiting.hint"),e[38]=r,e[39]=R):R=e[39];let O;e[40]!==R?(O=n.jsx("p",{role:"status",className:"text-center text-sm text-muted-foreground",children:R}),e[40]=R,e[41]=O):O=e[41];let T;return e[42]!==E||e[43]!==S||e[44]!==O?(T=n.jsx(ts,{headingLevel:2,waiting:!0,title:E,lead:S,footer:O}),e[42]=E,e[43]=S,e[44]=O,e[45]=T):T=e[45],T}let y;e[46]!==s?(y=n.jsx(Sc,{virtualMcpId:s}),e[46]=s,e[47]=y):y=e[47];const v=y;let P;return e[48]!==a||e[49]!==b||e[50]!==v||e[51]!==d?(P=n.jsx(Wa,{children:b&&a&&!d?n.jsx(Pc,{project:a,maxApps:vi,children:v}):v}),e[48]=a,e[49]=b,e[50]=v,e[51]=d,e[52]=P):P=e[52],P}function Kc(t){try{return new URL(t).host}catch{return t}}function Ic(t){const e=ce.c(20),{status:s,host:r}=t,a=Pe();if(s.kind==="connected"){let i;e[0]!==a?(i=a("mainPanelTabs.previewTab.localhostNoPreview.title"),e[0]=a,e[1]=i):i=e[1];let c;e[2]!==a?(c=a("mainPanelTabs.previewTab.localhostNoPreview.body"),e[2]=a,e[3]=c):c=e[3];let l;e[4]!==c?(l=n.jsx(es,{text:c}),e[4]=c,e[5]=l):l=e[5];let m;e[6]!==a?(m=a("mainPanelTabs.previewTab.localhostNoPreview.step.title"),e[6]=a,e[7]=m):m=e[7];let p;e[8]!==m?(p=[{title:m,command:`${Er} --preview localhost:3000`}],e[8]=m,e[9]=p):p=e[9];let f;return e[10]!==i||e[11]!==l||e[12]!==p?(f=n.jsx(ts,{headingLevel:2,waiting:!1,title:i,lead:l,steps:p}),e[10]=i,e[11]=l,e[12]=p,e[13]=f):f=e[13],f}let d;e[14]!==r||e[15]!==s?(d=$i(s,r),e[14]=r,e[15]=s,e[16]=d):d=e[16];let o;return e[17]!==r||e[18]!==d?(o=n.jsx(Bi,{wait:d,hosts:r}),e[17]=r,e[18]=d,e[19]=o):o=e[19],o}export{Bi as L,Kd as P,ts as S,zd as u};