decocms 4.491.0 → 4.491.2

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 (372) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-DLpi3Mut.js → ActiveShapeUtils-O3KzxQKu.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-73Q0VrfY.js → AlertCircle-DxGlheNv.js} +1 -1
  3. package/dist/client/assets/{AreaChart-CoSfFzjr.js → AreaChart-DAZPqqE4.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-C0LL-sgl.js → ArrowLeft-C5TDkvfy.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Dj6CCNsY.js → ArrowUp-B_1yzk0u.js} +1 -1
  6. package/dist/client/assets/{BarChart-Do7uwnsd.js → BarChart-BQ3lemjs.js} +1 -1
  7. package/dist/client/assets/{Building02-BeTTPw4J.js → Building02-aupVb9bk.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-CO-78DYK.js → CategoricalChart-Cbg52QF6.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-0plS54pM.js → CheckCircle-Ck2nYEsD.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-DwDvAYDg.js → ChevronSelectorVertical-vEYxYM2o.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-C6o4R3ke.js → ChevronUp-CiQJnmx3.js} +1 -1
  12. package/dist/client/assets/{Copy01-BVZwKlTd.js → Copy01-CSQiL-8m.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-DJSVxquB.js → CreditCard01-Dbsq9vqA.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-Bgiru7Ei.js → DotsVertical-D5VxjRuG.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-BJsJZOx3.js → ErrorBarContext-C93DPBOn.js} +1 -1
  16. package/dist/client/assets/{Globe04-BLrBNEf_.js → Globe04-BYAnRXKE.js} +1 -1
  17. package/dist/client/assets/{Image01-BrcKEvc0.js → Image01-CRH49dh2.js} +1 -1
  18. package/dist/client/assets/{Key01-Cw13ohrp.js → Key01-DlUQl2kb.js} +1 -1
  19. package/dist/client/assets/{Link01-D3VGGIFO.js → Link01-CZ9mTgFL.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-BfhSmQkh.js → LinkBroken01-aiXtOyEy.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CMM__gU1.js → LinkExternal01-BNOHDQ-X.js} +1 -1
  22. package/dist/client/assets/{Monitor01-Db_PJsLs.js → Monitor01-Dibe2H0E.js} +1 -1
  23. package/dist/client/assets/{Play-C38buPg2.js → Play-JhD_8p9T.js} +1 -1
  24. package/dist/client/assets/{Plus-BwqBS2VV.js → Plus-B-VohzJ4.js} +1 -1
  25. package/dist/client/assets/{SearchMd-GeiqoX_N.js → SearchMd-B4A8PIUy.js} +1 -1
  26. package/dist/client/assets/{Sector-DRyp7Sms.js → Sector-07CUaZqh.js} +1 -1
  27. package/dist/client/assets/{ShoppingBag01-DTMr5LPX.js → ShoppingBag01-CZ0mlBHZ.js} +1 -1
  28. package/dist/client/assets/{Sun-Dl9-uMzC.js → Sun-aaILGBFQ.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-SDrROb0m.js → SwitchHorizontal01-CUO4Tr7k.js} +1 -1
  30. package/dist/client/assets/{Tool01-3qFWwkJ0.js → Tool01-B-ugA2BM.js} +1 -1
  31. package/dist/client/assets/{Trash01-EYI48T6O.js → Trash01--ZO2TG0s.js} +1 -1
  32. package/dist/client/assets/{Upload01-CJy3PS7X.js → Upload01-CNXMP8gQ.js} +1 -1
  33. package/dist/client/assets/{User01-IYKl2aWt.js → User01-DqG0FbTZ.js} +1 -1
  34. package/dist/client/assets/{UserSquare-b8RRnbDc.js → UserSquare-Dbdn52Lc.js} +1 -1
  35. package/dist/client/assets/{Users01-BMm-ncU9.js → Users01-Co0Q_ns9.js} +1 -1
  36. package/dist/client/assets/{X-CYSlb_l4.js → X-CGpWJ0hX.js} +1 -1
  37. package/dist/client/assets/{XAxis-1-cTcouU.js → XAxis-CjFRctRT.js} +1 -1
  38. package/dist/client/assets/{XClose-D4SH1jH_.js → XClose-BHLC9coi.js} +1 -1
  39. package/dist/client/assets/{ZoomOut-Dkf0QR14.js → ZoomOut-DtT7NZBX.js} +1 -1
  40. package/dist/client/assets/{access-gate-BE7eP4-l.js → access-gate-ChYKF6hW.js} +1 -1
  41. package/dist/client/assets/{add-connection-dialog-BAFlEZTE.js → add-connection-dialog-Bs6jGGvh.js} +1 -1
  42. package/dist/client/assets/{agent-analytics-BQm9SDtQ.js → agent-analytics-BnLptKbu.js} +1 -1
  43. package/dist/client/assets/agent-app-QHYDv9wm.js +1 -0
  44. package/dist/client/assets/{agent-assets-CTYWEE7u.js → agent-assets-CRarjbts.js} +1 -1
  45. package/dist/client/assets/{agent-automation-y2UM518o.js → agent-automation-33aqaKe4.js} +1 -1
  46. package/dist/client/assets/{agent-automations-C1Eq-2R6.js → agent-automations-CQKB-t_S.js} +1 -1
  47. package/dist/client/assets/{agent-connect-sources-B8u5eJb7.js → agent-connect-sources-COzXkalQ.js} +1 -1
  48. package/dist/client/assets/agent-deck-CFpEgiHW.js +1 -0
  49. package/dist/client/assets/{agent-e2e-BIRPZwcA.js → agent-e2e-Chyzilo0.js} +1 -1
  50. package/dist/client/assets/{agent-experiments-EdMm76kp.js → agent-experiments-DHKzrPTl.js} +1 -1
  51. package/dist/client/assets/{agent-file-Bz35uItE.js → agent-file-rvuSnAm8.js} +1 -1
  52. package/dist/client/assets/{agent-hosting-CaXV2cce.js → agent-hosting-D8LVdRAw.js} +1 -1
  53. package/dist/client/assets/{agent-icon-DNBz9Nv-.js → agent-icon-CqZASRJE.js} +1 -1
  54. package/dist/client/assets/agent-library-D4uAz-Gm.js +1 -0
  55. package/dist/client/assets/agent-library-file-Cm-5j5_Q.js +1 -0
  56. package/dist/client/assets/{agent-monitor-B6Hw81MQ.js → agent-monitor-BzlCINOe.js} +1 -1
  57. package/dist/client/assets/{agent-overview-CR2QIZqN.js → agent-overview-DUFMWxEU.js} +1 -1
  58. package/dist/client/assets/agent-settings-DHaR6tV_.js +1 -0
  59. package/dist/client/assets/{agent-site-editor-CHzKWhEn.js → agent-site-editor-Cgd_VIhY.js} +1 -1
  60. package/dist/client/assets/agent-site-editor-code-BOVBRJg8.js +2 -0
  61. package/dist/client/assets/{agent-site-editor-content-mtJ9LaTE.js → agent-site-editor-content-hTgzjtkp.js} +3 -3
  62. package/dist/client/assets/{agent-site-editor-preview-mkrRvwR9.js → agent-site-editor-preview-yX5vZUh0.js} +3 -3
  63. package/dist/client/assets/agent-view-DhvgMtwi.js +1 -0
  64. package/dist/client/assets/{agent-view-guard-apbHI-m9.js → agent-view-guard-WwLdd03P.js} +1 -1
  65. package/dist/client/assets/{agents-list-D717nD-n.js → agents-list-Dd_HwOB5.js} +1 -1
  66. package/dist/client/assets/{ai-providers-YZFdIMBT.js → ai-providers-CJqVOOjj.js} +1 -1
  67. package/dist/client/assets/{alert-Bx5J4myN.js → alert-C7GKQkEa.js} +1 -1
  68. package/dist/client/assets/{alert-dialog-GNsEmNv6.js → alert-dialog-D_aRnY2J.js} +1 -1
  69. package/dist/client/assets/{analytics-sections-BdnLUkT_.js → analytics-sections-B_0ylm-F.js} +1 -1
  70. package/dist/client/assets/api-keys-BQyxoF0G.js +1 -0
  71. package/dist/client/assets/{api-keys-DecQs0uF.js → api-keys-CTrR4NLT.js} +1 -1
  72. package/dist/client/assets/app-editor-CdpSejbG.js +1 -0
  73. package/dist/client/assets/{asset-utils-BtHJk8iw.js → asset-utils-DPFCQacY.js} +1 -1
  74. package/dist/client/assets/{auth-CRi4QG6a.js → auth-DK9f1ZTH.js} +1 -1
  75. package/dist/client/assets/{auth-catchall-DRl4RiN5.js → auth-catchall-ymAvaIfq.js} +1 -1
  76. package/dist/client/assets/{auth-entry-B_NnSwZH.js → auth-entry-Bipf-3As.js} +1 -1
  77. package/dist/client/assets/{auth-split-layout-DLLllUEU.js → auth-split-layout-BIJktSXr.js} +1 -1
  78. package/dist/client/assets/{authenticate-and-persist-oauth-Cqx4X050.js → authenticate-and-persist-oauth-JHbhZWlI.js} +1 -1
  79. package/dist/client/assets/{automation-list-row-DG3NQK9z.js → automation-list-row-DEJdl0i5.js} +1 -1
  80. package/dist/client/assets/{automation-runs-IujUgYaK.js → automation-runs-BvXAH6Zy.js} +1 -1
  81. package/dist/client/assets/{automations-RftS9ry5.js → automations-CqeboptP.js} +1 -1
  82. package/dist/client/assets/{autosend-CYljOHAf.js → autosend-BV2PsimL.js} +1 -1
  83. package/dist/client/assets/{avatar-DHU_JQXK.js → avatar-CYsgyDk8.js} +1 -1
  84. package/dist/client/assets/{badge-DZA-IFl-.js → badge-80v1nRPK.js} +1 -1
  85. package/dist/client/assets/{block-document-PpXnFp-B.js → block-document-Cz2P_vpn.js} +1 -1
  86. package/dist/client/assets/{blocks-preview-workspace-context-L29maHoo.js → blocks-preview-workspace-context-BtM79Kvx.js} +1 -1
  87. package/dist/client/assets/{blog-schema-HlsaJIna.js → blog-schema-STc-KePE.js} +1 -1
  88. package/dist/client/assets/{board-analytics-BCXrlgKw.js → board-analytics-Kq5_7Oyo.js} +1 -1
  89. package/dist/client/assets/{buckets-BjhzME7T.js → buckets-CjScpz_6.js} +1 -1
  90. package/dist/client/assets/{build-improve-prompt-doc-CRhZL-xc.js → build-improve-prompt-doc-CbyMBFhr.js} +1 -1
  91. package/dist/client/assets/{calendar-Cm5rhiek.js → calendar-7itqlUGW.js} +1 -1
  92. package/dist/client/assets/{capability-load-error-dXmTNNeU.js → capability-load-error-BwUoLzKX.js} +1 -1
  93. package/dist/client/assets/{category-editor-CIo588Ai.js → category-editor-Cad32exX.js} +1 -1
  94. package/dist/client/assets/{chart-CRrbNF_l.js → chart-ohHxB0r5.js} +1 -1
  95. package/dist/client/assets/{chat-context-BXo4vS9q.js → chat-context-BEKkV-Ll.js} +1 -1
  96. package/dist/client/assets/{chat-draft-D6E9Jgt7.js → chat-draft-B0NTSRWz.js} +1 -1
  97. package/dist/client/assets/{checkbox-t57Ctij5.js → checkbox-CvWHs1zK.js} +1 -1
  98. package/dist/client/assets/{choose-editor-BKW-TN4I.js → choose-editor-BwfUJgeg.js} +1 -1
  99. package/dist/client/assets/{claim-phase-copy-DspsYazy.js → claim-phase-copy-BL3WW58c.js} +1 -1
  100. package/dist/client/assets/{cli-auth-success-DnSRJga5.js → cli-auth-success-CYBiu7ru.js} +1 -1
  101. package/dist/client/assets/{client-icons-Dvys0Wpa.js → client-icons-5hQaeIu1.js} +1 -1
  102. package/dist/client/assets/{collapsible-BQiYh-Rz.js → collapsible-jaPP2OhC.js} +1 -1
  103. package/dist/client/assets/{collection-detail-DSzS4U2T.js → collection-detail-BBvtaNRJ.js} +1 -1
  104. package/dist/client/assets/{collection-display-button-DDKJ_FOU.js → collection-display-button-DVNQgzNC.js} +1 -1
  105. package/dist/client/assets/{collection-search-ZK57HtXx.js → collection-search-BMeq1F4t.js} +1 -1
  106. package/dist/client/assets/{collection-table-wrapper-DiN9BbFO.js → collection-table-wrapper-B_m86D_K.js} +1 -1
  107. package/dist/client/assets/{collection-tabs-D1E4IGtI.js → collection-tabs-Ba1MLgdh.js} +1 -1
  108. package/dist/client/assets/{column-rules-CuaMhXi_.js → column-rules-DqbtcnMo.js} +1 -1
  109. package/dist/client/assets/{combobox-DWrO-0sH.js → combobox-AP2SQ_RO.js} +1 -1
  110. package/dist/client/assets/{command-gpgaKQ12.js → command-Bvxnety0.js} +1 -1
  111. package/dist/client/assets/{companion-mcps-section-jpsbLLW9.js → companion-mcps-section-BJx9eTFU.js} +1 -1
  112. package/dist/client/assets/{config-DQwxWYbk.js → config-JsgNFdSm.js} +1 -1
  113. package/dist/client/assets/{connect-BbucsRpq.js → connect-Cw4wL4Mo.js} +1 -1
  114. package/dist/client/assets/{connect-layout-CsXt-EIA.js → connect-layout-C8etZ06x.js} +1 -1
  115. package/dist/client/assets/{connection-C82rO5ye.js → connection-CeKZpSJo.js} +1 -1
  116. package/dist/client/assets/{connection-card-CewKGErp.js → connection-card-BBsdybH0.js} +1 -1
  117. package/dist/client/assets/{connection-detail-DgoVrRpD.js → connection-detail-Zij0KKeD.js} +1 -1
  118. package/dist/client/assets/{connection-form-helpers-DTKsttLG.js → connection-form-helpers-DTld_nTJ.js} +1 -1
  119. package/dist/client/assets/{connections-B-RVAC08.js → connections-C78U2QWF.js} +1 -1
  120. package/dist/client/assets/{context-C2lWN9hq.js → context-D4huQsCX.js} +1 -1
  121. package/dist/client/assets/{context-menu-D7OAdbor.js → context-menu-C5PIf9Ud.js} +1 -1
  122. package/dist/client/assets/{core.esm-CzT8OC5D.js → core.esm-CFyPPg_k.js} +1 -1
  123. package/dist/client/assets/{create-organization-dialog-C0WnG7s6.js → create-organization-dialog-BfiRTIkh.js} +1 -1
  124. package/dist/client/assets/{daily-pulse-DdkvCPzY.js → daily-pulse-CCzRbH3i.js} +1 -1
  125. package/dist/client/assets/{device-hint-BAvsacGu.js → device-hint-CTUpl3CG.js} +1 -1
  126. package/dist/client/assets/{dialog-CPwHf_Wz.js → dialog-CaizaKQW.js} +1 -1
  127. package/dist/client/assets/{discover-thZg7qEM.js → discover-BZ1M_pJS.js} +1 -1
  128. package/dist/client/assets/{domain-settings-TQF3uvL5.js → domain-settings-TcnTgsTU.js} +1 -1
  129. package/dist/client/assets/{drawer-BpZLKYXl.js → drawer-Cn362UbS.js} +1 -1
  130. package/dist/client/assets/{editor-CGW6JIf_.js → editor-B-nIGllj.js} +1 -1
  131. package/dist/client/assets/{empty-state-DH5a3g1w.js → empty-state-C3-ZBqZ7.js} +1 -1
  132. package/dist/client/assets/{empty-state-D-IgKZTi.js → empty-state-DfNAbSXk.js} +1 -1
  133. package/dist/client/assets/{extract-connection-data-Be1rMX3H.js → extract-connection-data-WKz3D__i.js} +1 -1
  134. package/dist/client/assets/{feature-gate-D1lPShmi.js → feature-gate-CQMKDgiz.js} +1 -1
  135. package/dist/client/assets/{feature-paywall-Bec4WKNH.js → feature-paywall-DnC43PTT.js} +1 -1
  136. package/dist/client/assets/{file-explorer-BON4pOEZ.js → file-explorer-BEX4Rc_N.js} +1 -1
  137. package/dist/client/assets/{file-preview-Br95UW1c.js → file-preview-kacuDdK5.js} +1 -1
  138. package/dist/client/assets/{file-share-button-BYK3uP_k.js → file-share-button-BWY-7IZa.js} +1 -1
  139. package/dist/client/assets/{file-type-icon-DUorPfRr.js → file-type-icon-CDG1qAi8.js} +1 -1
  140. package/dist/client/assets/flat-project-BJHdKc4J.js +1 -0
  141. package/dist/client/assets/{folder-icon-7yHfmhnb.js → folder-icon-Dt1GSdhj.js} +1 -1
  142. package/dist/client/assets/{form-DYlgPN3G.js → form-CpErFrQ1.js} +1 -1
  143. package/dist/client/assets/{general-8aaJXxN5.js → general-DfGmywaK.js} +1 -1
  144. package/dist/client/assets/{home-D1qyT9GE.js → home-CND3Dkfc.js} +1 -1
  145. package/dist/client/assets/{icon-button-AFJ_IHRs.js → icon-button-BZdEBEfj.js} +1 -1
  146. package/dist/client/assets/{index-CmKWqFAI.js → index-BCgTVQy6.js} +1 -1
  147. package/dist/client/assets/{index-C3L-9o03.js → index-BYizWVl-.js} +1 -1
  148. package/dist/client/assets/{index-C50RHncY.js → index-BfjkKzIS.js} +1 -1
  149. package/dist/client/assets/{index-D0UGWeOA.js → index-BygP9YwT.js} +3 -3
  150. package/dist/client/assets/{index-CVAe7Z-K.js → index-CiUGtn_W.js} +1 -1
  151. package/dist/client/assets/{index-Vqmbxckx.js → index-ClRj6-3N.js} +1 -1
  152. package/dist/client/assets/{index-BsBe0xct.js → index-CnLkSXZ0.js} +1 -1
  153. package/dist/client/assets/{index-DWLq19BP.js → index-D1cfaJ2t.js} +1 -1
  154. package/dist/client/assets/{index-QRiNSSRg.js → index-D6ZKj0d3.js} +2 -2
  155. package/dist/client/assets/{index-B2V_PSz0.css → index-D7k-FSss.css} +1 -1
  156. package/dist/client/assets/{index-DrM8Fu0n.js → index-QSc3eGTu.js} +1 -1
  157. package/dist/client/assets/{index-CEIoMkij.js → index-W5Uv1gFu.js} +1 -1
  158. package/dist/client/assets/{index-BysXGtTe.js → index-dB_1XyGB.js} +1 -1
  159. package/dist/client/assets/{index-C2777A6h.js → index-ikDsOzpt.js} +1 -1
  160. package/dist/client/assets/{index-redirect-BFDyBMdI.js → index-redirect-BikVIQHZ.js} +1 -1
  161. package/dist/client/assets/{infiniteQueryObserver-D-Bj8iuA.js → infiniteQueryObserver-kLjXQrHB.js} +1 -1
  162. package/dist/client/assets/{infra-billing-B3HhznhV.js → infra-billing-UCBSl2oy.js} +1 -1
  163. package/dist/client/assets/{input-nuX-8zcf.js → input-BR2ZOmYv.js} +1 -1
  164. package/dist/client/assets/{input-BhNzKaIw.js → input-CEMJ7uPy.js} +1 -1
  165. package/dist/client/assets/{input-DuQVWVe6.js → input-DWfiFAhX.js} +3 -3
  166. package/dist/client/assets/{integration-icon-BOMex3da.js → integration-icon-BXBLtmJk.js} +1 -1
  167. package/dist/client/assets/{jira-icon-MYapTdJi.js → jira-icon-BHqtDmCA.js} +1 -1
  168. package/dist/client/assets/{label-CI6a4h7J.js → label-SS4h69R5.js} +1 -1
  169. package/dist/client/assets/{layout-CPN_cJBe.js → layout-C4L4n6Lc.js} +1 -1
  170. package/dist/client/assets/{legacy-agents-deep-DqOvk4Ml.js → legacy-agents-deep-C7aZ6oEJ.js} +1 -1
  171. package/dist/client/assets/{legacy-main-redirect-lgfx9rxv.js → legacy-main-redirect-hF1zoiVf.js} +1 -1
  172. package/dist/client/assets/library-BilS1-Q5.js +1 -0
  173. package/dist/client/assets/{library-tab-TIzqMKX5.js → library-tab-l_VVRZXX.js} +1 -1
  174. package/dist/client/assets/{login-D5n-w-FE.js → login-CKMvHvtg.js} +1 -1
  175. package/dist/client/assets/{markdown-CFuqOFzm.js → markdown-29HM3kkf.js} +1 -1
  176. package/dist/client/assets/{mcp-app-renderer-CPSBlHtL.js → mcp-app-renderer-DXGnetCy.js} +1 -1
  177. package/dist/client/assets/{mcp-oauth-UALjHFjo.js → mcp-oauth-3A9tYRyL.js} +1 -1
  178. package/dist/client/assets/{members-BBd3y-NQ.js → members-BcUrZyS-.js} +1 -1
  179. package/dist/client/assets/{memory-Bbk2wEI2.js → memory-CGswqj8y.js} +1 -1
  180. package/dist/client/assets/{mini-report-page-yxW8s1i9.js → mini-report-page-Da7eznro.js} +1 -1
  181. package/dist/client/assets/{mock-board-DFT0Q1dt.js → mock-board-DXthXijU.js} +1 -1
  182. package/dist/client/assets/{monaco-editor-4muYSA1L.js → monaco-editor-DvydENcY.js} +1 -1
  183. package/dist/client/assets/{monitoring-stats-row-CzEIDVfy.js → monitoring-stats-row-C3CaqX-m.js} +1 -1
  184. package/dist/client/assets/{multi-select-vJ6yd9zq.js → multi-select-DwlQIhXq.js} +1 -1
  185. package/dist/client/assets/{mustache-BlaGEQT0.js → mustache-Brnm_dXD.js} +1 -1
  186. package/dist/client/assets/{new-project-dialog-D8OeVQOw.js → new-project-dialog-pM62WBis.js} +1 -1
  187. package/dist/client/assets/{oauth-callback-4lzgA8lM.js → oauth-callback-BMrgEZxm.js} +1 -1
  188. package/dist/client/assets/{oauth-callback-ai-provider-yXZCyoT9.js → oauth-callback-ai-provider-CspcIUB4.js} +1 -1
  189. package/dist/client/assets/{onboarding-cz7HeUpv.js → onboarding-iQ3xdqhh.js} +1 -1
  190. package/dist/client/assets/{openai-conversation-CYcNjkNf.js → openai-conversation-Bo92iq4Z.js} +1 -1
  191. package/dist/client/assets/{optimistic-project-sidebar-views-DVL9G9nw.js → optimistic-project-sidebar-views-Bui3Aln1.js} +1 -1
  192. package/dist/client/assets/{organization-choice-BRQzI7fM.js → organization-choice-CHmTDpwe.js} +1 -1
  193. package/dist/client/assets/{orgs-CI3xq18h.js → orgs-DccGLnZP.js} +1 -1
  194. package/dist/client/assets/{page-seo-form-kfF1Y8-O.js → page-seo-form-CVheom0z.js} +1 -1
  195. package/dist/client/assets/{pair-C6jzj2gM.js → pair-H2ebpVnC.js} +1 -1
  196. package/dist/client/assets/{plan-ladder-CWvgaryk.js → plan-ladder-D3lWJLFO.js} +1 -1
  197. package/dist/client/assets/{popover-BFbFUONi.js → popover-B69wnZ0x.js} +1 -1
  198. package/dist/client/assets/{post-calendar-DB2lDxGn.js → post-calendar-BmLvpLiq.js} +1 -1
  199. package/dist/client/assets/{post-editor-t_M9ICeR.js → post-editor-C2IWsxcW.js} +1 -1
  200. package/dist/client/assets/{preview-content-BmLtDU7K.js → preview-content-dlihu8Yt.js} +1 -1
  201. package/dist/client/assets/{preview-dialog-B7dD4D13.js → preview-dialog-WrHsjHqZ.js} +1 -1
  202. package/dist/client/assets/{preview-panel-DLlJjFY5.js → preview-panel-C2DKjThP.js} +1 -1
  203. package/dist/client/assets/{product-picker-dialog-B3p0irs1.js → product-picker-dialog-CvuFuDIB.js} +1 -1
  204. package/dist/client/assets/{profile-xvCqnML_.js → profile-CkXUOnP1.js} +1 -1
  205. package/dist/client/assets/{project-app-view-BlzXPu5v.js → project-app-view-4F1NzKg3.js} +1 -1
  206. package/dist/client/assets/{project-feed-DmzH80mi.js → project-feed-Cno5cSVS.js} +1 -1
  207. package/dist/client/assets/{project-icon-DL5EBc-E.js → project-icon-C0Nw8mPG.js} +1 -1
  208. package/dist/client/assets/project-reports-hao_xuVG.js +1 -0
  209. package/dist/client/assets/project-tasks-0iRMtR_B.js +1 -0
  210. package/dist/client/assets/{projects-BTLDm8fY.js → projects-DQhNR69M.js} +1 -1
  211. package/dist/client/assets/{projects-empty-state-mvE2zbWD.js → projects-empty-state-BpTZWKkI.js} +1 -1
  212. package/dist/client/assets/{prompts-7FMn2Zh3.js → prompts-CigibTM9.js} +1 -1
  213. package/dist/client/assets/record-editor-D01ICPr8.js +1 -0
  214. package/dist/client/assets/redirect-editor-BptL49e1.js +1 -0
  215. package/dist/client/assets/{reports-7rkoPOAJ.js → reports-B5U9tB3f.js} +1 -1
  216. package/dist/client/assets/reports-CTOZc-B3.js +1 -0
  217. package/dist/client/assets/{reports-onboarding-bFWPLNy_.js → reports-onboarding-CTVsl5Md.js} +1 -1
  218. package/dist/client/assets/{reports-tab-D2oLCAHr.js → reports-tab-M9rEzg5O.js} +2 -2
  219. package/dist/client/assets/{repositories-DVLQLHL3.js → repositories-rhEkEXbS.js} +1 -1
  220. package/dist/client/assets/{repository-binding-CytM9xU8.js → repository-binding-DU5xCC2f.js} +1 -1
  221. package/dist/client/assets/{repository-import-picker-D5AcDzE0.js → repository-import-picker-DbT-KPfC.js} +1 -1
  222. package/dist/client/assets/{repository-picker-COwBzoTt.js → repository-picker-CbM65WpS.js} +1 -1
  223. package/dist/client/assets/{require-capability-zjsjPUS_.js → require-capability-Dn-PxZ0M.js} +1 -1
  224. package/dist/client/assets/{required-auth-layout-NcpNSiLT.js → required-auth-layout-UMnYz1o3.js} +1 -1
  225. package/dist/client/assets/{reset-password-BCv1CSjv.js → reset-password-Db0Wagvh.js} +1 -1
  226. package/dist/client/assets/{resizable-D3t-NcWv.js → resizable-CMUQk1zK.js} +1 -1
  227. package/dist/client/assets/{resolve-tab-icon-DgToKs-Z.js → resolve-tab-icon-sUoI4LWt.js} +1 -1
  228. package/dist/client/assets/{review-settings-Cjv2LLIy.js → review-settings-CyyTBWak.js} +1 -1
  229. package/dist/client/assets/{rich-text-link-control-BQh5dQcA.js → rich-text-link-control-BloybQa2.js} +1 -1
  230. package/dist/client/assets/{roles-ClJJMwuY.js → roles-BI264iFV.js} +1 -1
  231. package/dist/client/assets/{route-BFw2zO18.js → route-6SYGGrOe.js} +1 -1
  232. package/dist/client/assets/route-DRK1Yrag.js +1 -0
  233. package/dist/client/assets/route-Dqvws1eb.js +1 -0
  234. package/dist/client/assets/{runnable-block-editor-BbGoeo9T.js → runnable-block-editor-aiNmn7uQ.js} +1 -1
  235. package/dist/client/assets/{sandbox-lifecycle-context-EoHoFnzh.js → sandbox-lifecycle-context-KvsIkNFN.js} +1 -1
  236. package/dist/client/assets/{schema-hu4ZPmHW.js → schema-DBi1obJz.js} +1 -1
  237. package/dist/client/assets/{scroll-area-CmRfBXhn.js → scroll-area-DrC4kFvC.js} +1 -1
  238. package/dist/client/assets/{search-input-QTV7Iu_z.js → search-input-IgJHEtUf.js} +1 -1
  239. package/dist/client/assets/{search-toggle-fqEERfMq.js → search-toggle-CQpL269o.js} +1 -1
  240. package/dist/client/assets/{secret-picker-4W2GVFZz.js → secret-picker-1felyUvp.js} +1 -1
  241. package/dist/client/assets/{secrets-BZ_1lyUB.js → secrets-B-VUMA_J.js} +1 -1
  242. package/dist/client/assets/{sections-editor-BrVGgaeZ.js → sections-editor-BHfMW6Ts.js} +1 -1
  243. package/dist/client/assets/{select-CIKv-cP8.js → select-BimoKSOp.js} +1 -1
  244. package/dist/client/assets/{select-model-CX0fqzgl.js → select-model-DuC12JIh.js} +1 -1
  245. package/dist/client/assets/{seo-editor-DHd4dXhN.js → seo-editor-DmSwADHy.js} +1 -1
  246. package/dist/client/assets/{separator-buy7aDbH.js → separator-BDE3I0fn.js} +1 -1
  247. package/dist/client/assets/{settings-tab-AANUCTnU.js → settings-tab-BbBuUb6A.js} +1 -1
  248. package/dist/client/assets/{sheet-EtuK9kpn.js → sheet-BF6gLW4J.js} +1 -1
  249. package/dist/client/assets/{shell-layout-BlsRs6mq.js → shell-layout-_Pn7cxIp.js} +1 -1
  250. package/dist/client/assets/{skills-9g_RzIk9.js → skills-Cdwff9-N.js} +1 -1
  251. package/dist/client/assets/{slider-BXap5VEX.js → slider-FhNC3fVS.js} +1 -1
  252. package/dist/client/assets/{sortable.esm-BlRKLv6h.js → sortable.esm-BW2r2TQ5.js} +1 -1
  253. package/dist/client/assets/{sso-BrIb8Zth.js → sso-BwV31EHP.js} +1 -1
  254. package/dist/client/assets/{suggestion-rrmCibxz.js → suggestion-CO1eCyUL.js} +1 -1
  255. package/dist/client/assets/{switch-CN9B9IYC.js → switch-DbiylKGt.js} +1 -1
  256. package/dist/client/assets/{symbol-P41KeU47.js → symbol-jxhImUCd.js} +1 -1
  257. package/dist/client/assets/{synced-repos-CA7rt8jf.js → synced-repos-BC8M1bWl.js} +1 -1
  258. package/dist/client/assets/{tab-icon-glyph-CaOcn133.js → tab-icon-glyph-CASAQt8G.js} +1 -1
  259. package/dist/client/assets/{table-BFGbBQ0V.js → table-D0TLPmnq.js} +1 -1
  260. package/dist/client/assets/{tabs-q6_JzTyv.js → tabs-BwctFHZr.js} +1 -1
  261. package/dist/client/assets/{task-board-BB07RDcy.js → task-board-DFP-fne3.js} +1 -1
  262. package/dist/client/assets/{task-route-DTMqZ207.js → task-route-BierUG4Q.js} +1 -1
  263. package/dist/client/assets/{task-status-DQYRnex5.js → task-status-cNdQKcCz.js} +1 -1
  264. package/dist/client/assets/taskboard-analytics-yjyawLTO.js +1 -0
  265. package/dist/client/assets/tasks-C5vDjoxa.js +1 -0
  266. package/dist/client/assets/{tasks-DMlpwwqd.js → tasks-CEP9Drl2.js} +1 -1
  267. package/dist/client/assets/{textarea-BXBoqmU6.js → textarea-DncV9TJN.js} +1 -1
  268. package/dist/client/assets/{thread-analytics-DheU3WFx.js → thread-analytics-BSQZhWFS.js} +1 -1
  269. package/dist/client/assets/{thread-button-wYbAKljL.js → thread-button-3YyJ_qZE.js} +1 -1
  270. package/dist/client/assets/{thread-intent-DjuWufF8.js → thread-intent-o4o-MA3S.js} +1 -1
  271. package/dist/client/assets/{thread-route-BoZdboG-.js → thread-route-BasyELse.js} +1 -1
  272. package/dist/client/assets/{thread-route-1k2Am-5A.js → thread-route-CaKdVoOw.js} +1 -1
  273. package/dist/client/assets/{thread-sheet-body-Djs61clk.js → thread-sheet-body-C6mBvsIL.js} +1 -1
  274. package/dist/client/assets/{time-range-picker-BkOy25Bu.js → time-range-picker-C3YgWELe.js} +1 -1
  275. package/dist/client/assets/{toggle-group-C017ApXo.js → toggle-group-Be2zaRQe.js} +1 -1
  276. package/dist/client/assets/{tool-namespace-B_q_wCZr.js → tool-namespace-BaO4I7fR.js} +1 -1
  277. package/dist/client/assets/{toolbar-icon-button-BMvT8UMD.js → toolbar-icon-button-DnfVpnpi.js} +1 -1
  278. package/dist/client/assets/{tooltip-ZVqzgWr5.js → tooltip-ud1E4lWe.js} +1 -1
  279. package/dist/client/assets/{tooltipContext-2bjEHgcc.js → tooltipContext-Bn73mb9f.js} +1 -1
  280. package/dist/client/assets/{track-CbRvdlP1.js → track-D9xSFomP.js} +1 -1
  281. package/dist/client/assets/{types-hNXlshSp.js → types-C52Y_JT0.js} +1 -1
  282. package/dist/client/assets/{url-slug-BMR6hHRv.js → url-slug-DA14zDBr.js} +1 -1
  283. package/dist/client/assets/{usage-stats-CsSt_gIh.js → usage-stats-qYCfmoBc.js} +1 -1
  284. package/dist/client/assets/{use-ai-providers-BM5FPaFB.js → use-ai-providers-BLkItyxK.js} +1 -1
  285. package/dist/client/assets/{use-automations-Bm5-L8DN.js → use-automations-wOelP2bP.js} +1 -1
  286. package/dist/client/assets/{use-autosave-BPywatQP.js → use-autosave-DwWGqeny.js} +1 -1
  287. package/dist/client/assets/{use-chat-layout-state-ViStMfAb.js → use-chat-layout-state-BXUQI_Uj.js} +1 -1
  288. package/dist/client/assets/{use-chat-navigation-BMvqsWWZ.js → use-chat-navigation-0CERUZel.js} +1 -1
  289. package/dist/client/assets/{use-clock-tick-BKuJ3MK9.js → use-clock-tick-Byjn6Ipz.js} +1 -1
  290. package/dist/client/assets/{use-connect-companion-uUQY7KQq.js → use-connect-companion-CJUuykr1.js} +1 -1
  291. package/dist/client/assets/{use-connection-BYw7Mfr_.js → use-connection-BLNfspiw.js} +1 -1
  292. package/dist/client/assets/{use-copy-CrZ5dLcO.js → use-copy-Dg2-hZvb.js} +1 -1
  293. package/dist/client/assets/{use-create-virtual-mcp-Bamay0jX.js → use-create-virtual-mcp-DaSHuVdx.js} +1 -1
  294. package/dist/client/assets/{use-date-fns-locale-Cj68gl6J.js → use-date-fns-locale-yEAg4rlf.js} +1 -1
  295. package/dist/client/assets/{use-debounced-autosave-DMvYLP6G.js → use-debounced-autosave-BbQxm-LP.js} +1 -1
  296. package/dist/client/assets/{use-debounced-value-BXavENJJ.js → use-debounced-value-DkB41yRZ.js} +1 -1
  297. package/dist/client/assets/{use-deco-credits-DOALlJ29.js → use-deco-credits-ODPDFKit.js} +1 -1
  298. package/dist/client/assets/{use-decopilot-events-DAURKDqv.js → use-decopilot-events-C_UyGftl.js} +1 -1
  299. package/dist/client/assets/{use-delete-connection-DZlPwEWj.js → use-delete-connection-DtNaJnIN.js} +1 -1
  300. package/dist/client/assets/{use-deployment-admin-C4O2b7G1.js → use-deployment-admin-LfJmve5n.js} +1 -1
  301. package/dist/client/assets/{use-ensure-project-folder-Dc4mJnmy.js → use-ensure-project-folder-i0uoPVJF.js} +1 -1
  302. package/dist/client/assets/{use-fast-preview-draft-url-6FTIgzM1.js → use-fast-preview-draft-url-DfCPo5oA.js} +1 -1
  303. package/dist/client/assets/{use-file-configs-Bklznbm7.js → use-file-configs-CGY_ert6.js} +1 -1
  304. package/dist/client/assets/{use-infinite-scroll-Db1cO7Vx.js → use-infinite-scroll-979kKqgG.js} +1 -1
  305. package/dist/client/assets/{use-join-requests-BkiJPhfn.js → use-join-requests-BVEasBlK.js} +1 -1
  306. package/dist/client/assets/{use-main-panel-tabs-CKeJUbYl.js → use-main-panel-tabs-H7fQ4i6B.js} +1 -1
  307. package/dist/client/assets/{use-mcp-auth-status-DpiSe6Ji.js → use-mcp-auth-status-D2S8OUYy.js} +1 -1
  308. package/dist/client/assets/{use-mcp-client-Bg3_AhYF.js → use-mcp-client-BhAo2QDs.js} +1 -1
  309. package/dist/client/assets/{use-mcp-prompts-Bdpz7VbT.js → use-mcp-prompts-DPLwYnKg.js} +1 -1
  310. package/dist/client/assets/{use-mcp-tools-Ds0ZkdkL.js → use-mcp-tools-Bv_07i-f.js} +1 -1
  311. package/dist/client/assets/{use-members-CvjdZeK-.js → use-members-BA82esMl.js} +1 -1
  312. package/dist/client/assets/{use-mobile-DZqz77Pm.js → use-mobile-DsXG93j_.js} +1 -1
  313. package/dist/client/assets/{use-navigate-to-agent-fXx4xDJO.js → use-navigate-to-agent-_Fy5-uKx.js} +1 -1
  314. package/dist/client/assets/use-new-blocks-editor-BEuQmWCf.js +1 -0
  315. package/dist/client/assets/{use-open-billing-url-DOMvfkHO.js → use-open-billing-url-CUDSWbJf.js} +1 -1
  316. package/dist/client/assets/{use-org-auth-client-Bw9jbhf5.js → use-org-auth-client-hM9___IR.js} +1 -1
  317. package/dist/client/assets/{use-org-fs-iQHkUqUk.js → use-org-fs-Df2-ebn-.js} +1 -1
  318. package/dist/client/assets/{use-org-repo-syncs-Bwz4rKwj.js → use-org-repo-syncs-RpIgueH5.js} +1 -1
  319. package/dist/client/assets/{use-org-sso-BZyWfhFg.js → use-org-sso-IZ5t5non.js} +1 -1
  320. package/dist/client/assets/{use-organization-roles-D6wYdajX.js → use-organization-roles-CHRytV-b.js} +1 -1
  321. package/dist/client/assets/{use-organization-settings-1nS29Aiq.js → use-organization-settings-XOD9ESkO.js} +1 -1
  322. package/dist/client/assets/{use-panel-navigate-DLkRwPwU.js → use-panel-navigate-vbXDgGYl.js} +1 -1
  323. package/dist/client/assets/{use-project-scope-DT4CQCZ6.js → use-project-scope-KzlP3xju.js} +1 -1
  324. package/dist/client/assets/{use-releases-TEM3idYi.js → use-releases-DMtt37HC.js} +1 -1
  325. package/dist/client/assets/{use-reports-diagnostic-CARKkLJZ.js → use-reports-diagnostic-B2l9rZ7n.js} +1 -1
  326. package/dist/client/assets/{use-sandbox-events-Dh1QYu5T.js → use-sandbox-events-nw0-bXbS.js} +1 -1
  327. package/dist/client/assets/{use-secrets-DyVePm_M.js → use-secrets-DcZKciGM.js} +1 -1
  328. package/dist/client/assets/{use-section-preview-base-Bv1g7sbn.js → use-section-preview-base-BSDyoSl7.js} +1 -1
  329. package/dist/client/assets/{use-tags-fZHD5ST0.js → use-tags-fdcoiGJW.js} +1 -1
  330. package/dist/client/assets/{use-task-board-analytics-CF3X3p4A.js → use-task-board-analytics-DNKYjvsI.js} +1 -1
  331. package/dist/client/assets/{use-task-board-events-DvDYuYhV.js → use-task-board-events-Bsmaoj96.js} +1 -1
  332. package/dist/client/assets/{use-task-board-item-prs-xfFp49cV.js → use-task-board-item-prs-h7cdMLQu.js} +1 -1
  333. package/dist/client/assets/{use-task-board-items-C71yNtGA.js → use-task-board-items-D9AUaVNI.js} +1 -1
  334. package/dist/client/assets/{use-task-metadata-DtdbaLRU.js → use-task-metadata-BhK_QNSv.js} +1 -1
  335. package/dist/client/assets/{use-thread-analytics-Bsqps-qn.js → use-thread-analytics-BNWVClHo.js} +1 -1
  336. package/dist/client/assets/{use-thread-outputs-D6r9RyCm.js → use-thread-outputs-714c96C6.js} +1 -1
  337. package/dist/client/assets/useInfiniteQuery-jncr8EKF.js +1 -0
  338. package/dist/client/assets/{useQueries-DpfqGXm1.js → useQueries-BAV2VQJS.js} +1 -1
  339. package/dist/client/assets/useSuspenseInfiniteQuery-rmy_OGLk.js +1 -0
  340. package/dist/client/assets/{users-C2qKzk32.js → users-D6p7l9Qo.js} +1 -1
  341. package/dist/client/assets/{utils-BpkCEmGJ.js → utils-Cp3D7BS-.js} +1 -1
  342. package/dist/client/assets/{variant-calendar-sDeaVivG.js → variant-calendar-ClgUoajU.js} +1 -1
  343. package/dist/client/assets/{variant-matcher-override-Bjcyt8xP.js → variant-matcher-override-BPr4phd8.js} +1 -1
  344. package/dist/client/assets/{view-mode-toggle-UUHbnK5b.js → view-mode-toggle-rvdqWR_F.js} +1 -1
  345. package/dist/client/assets/{virtual-mcp-DnfVpr07.js → virtual-mcp-y87s1o4x.js} +1 -1
  346. package/dist/client/assets/{watch-sse-pool-Ba9ocaYD.js → watch-sse-pool-HwFSe36n.js} +1 -1
  347. package/dist/client/index.html +2 -2
  348. package/dist/server/server.js +383 -383
  349. package/package.json +1 -1
  350. package/dist/client/assets/agent-app-8hix2iE1.js +0 -1
  351. package/dist/client/assets/agent-deck-CCQLdNj7.js +0 -1
  352. package/dist/client/assets/agent-library-file-Cwrj7uER.js +0 -1
  353. package/dist/client/assets/agent-library-uIoFBiuy.js +0 -1
  354. package/dist/client/assets/agent-settings-TQmHLZP1.js +0 -1
  355. package/dist/client/assets/agent-site-editor-code-DTmOiG7t.js +0 -2
  356. package/dist/client/assets/agent-view-BeV5wojC.js +0 -1
  357. package/dist/client/assets/api-keys-9k3EmVLz.js +0 -1
  358. package/dist/client/assets/app-editor-AE2hMfBt.js +0 -1
  359. package/dist/client/assets/flat-project-CzgWbL5q.js +0 -1
  360. package/dist/client/assets/library-BbXu9uNy.js +0 -1
  361. package/dist/client/assets/project-reports-BKxCXLpw.js +0 -1
  362. package/dist/client/assets/project-tasks-BK708T13.js +0 -1
  363. package/dist/client/assets/record-editor-CJ5DcKCR.js +0 -1
  364. package/dist/client/assets/redirect-editor-C5ghAUwo.js +0 -1
  365. package/dist/client/assets/reports-CB4qsPw2.js +0 -1
  366. package/dist/client/assets/route-DRRVfBTb.js +0 -1
  367. package/dist/client/assets/route-dTNdpddE.js +0 -1
  368. package/dist/client/assets/taskboard-analytics-mlQoY2AT.js +0 -1
  369. package/dist/client/assets/tasks-DFtmz4-1.js +0 -1
  370. package/dist/client/assets/use-new-blocks-editor-DPWHBdGg.js +0 -1
  371. package/dist/client/assets/useInfiniteQuery-gn_0q_rp.js +0 -1
  372. package/dist/client/assets/useSuspenseInfiniteQuery-BSfAZu0N.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-BrVGgaeZ.js","assets/index-QRiNSSRg.js","assets/index-B2V_PSz0.css","assets/chat-context-BXo4vS9q.js","assets/use-panel-navigate-DLkRwPwU.js","assets/thread-route-1k2Am-5A.js","assets/use-project-scope-DT4CQCZ6.js","assets/repository-binding-CytM9xU8.js","assets/use-mcp-client-Bg3_AhYF.js","assets/auth-CRi4QG6a.js","assets/autosend-CYljOHAf.js","assets/thread-intent-DjuWufF8.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-Ba9ocaYD.js","assets/task-board-BB07RDcy.js","assets/schema-hu4ZPmHW.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-DAURKDqv.js","assets/use-ai-providers-BM5FPaFB.js","assets/use-chat-navigation-BMvqsWWZ.js","assets/location-BjlyegC2.js","assets/use-organization-settings-1nS29Aiq.js","assets/use-new-blocks-editor-DPWHBdGg.js","assets/runnable-block-editor-BbGoeo9T.js","assets/input-DuQVWVe6.js","assets/usage-stats-CsSt_gIh.js","assets/tool-namespace-B_q_wCZr.js","assets/dialog-CPwHf_Wz.js","assets/X-CYSlb_l4.js","assets/form-DYlgPN3G.js","assets/label-CI6a4h7J.js","assets/input-nuX-8zcf.js","assets/utils-CVEq3hMx.js","assets/markdown-CFuqOFzm.js","assets/use-copy-CrZ5dLcO.js","assets/Copy01-BVZwKlTd.js","assets/ZoomOut-Dkf0QR14.js","assets/use-mobile-DZqz77Pm.js","assets/tooltip-ZVqzgWr5.js","assets/index-DrM8Fu0n.js","assets/agent-icon-DNBz9Nv-.js","assets/AlertCircle-73Q0VrfY.js","assets/Tool01-3qFWwkJ0.js","assets/ArrowUp-Dj6CCNsY.js","assets/ArrowLeft-C0LL-sgl.js","assets/LinkBroken01-BfhSmQkh.js","assets/ShoppingBag01-DTMr5LPX.js","assets/Building02-BeTTPw4J.js","assets/CheckCircle-0plS54pM.js","assets/ChevronUp-C6o4R3ke.js","assets/ChevronSelectorVertical-DwDvAYDg.js","assets/UserSquare-b8RRnbDc.js","assets/CreditCard01-DJSVxquB.js","assets/DotsVertical-Bgiru7Ei.js","assets/Image01-BrcKEvc0.js","assets/Globe04-BLrBNEf_.js","assets/SwitchHorizontal01-SDrROb0m.js","assets/Key01-Cw13ohrp.js","assets/Link01-D3VGGIFO.js","assets/LinkExternal01-CMM__gU1.js","assets/Monitor01-Db_PJsLs.js","assets/Sun-Dl9-uMzC.js","assets/Play-C38buPg2.js","assets/Plus-BwqBS2VV.js","assets/SearchMd-GeiqoX_N.js","assets/Trash01-EYI48T6O.js","assets/Upload01-CJy3PS7X.js","assets/User01-IYKl2aWt.js","assets/Users01-BMm-ncU9.js","assets/XClose-D4SH1jH_.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-AFJ_IHRs.js","assets/file-type-icon-DUorPfRr.js","assets/shell-layout-BlsRs6mq.js","assets/avatar-DHU_JQXK.js","assets/use-clock-tick-BKuJ3MK9.js","assets/command-gpgaKQ12.js","assets/index-BsBe0xct.js","assets/integration-icon-BOMex3da.js","assets/project-icon-DL5EBc-E.js","assets/new-project-dialog-D8OeVQOw.js","assets/repository-import-picker-D5AcDzE0.js","assets/use-navigate-to-agent-fXx4xDJO.js","assets/repository-picker-COwBzoTt.js","assets/useInfiniteQuery-gn_0q_rp.js","assets/infiniteQueryObserver-D-Bj8iuA.js","assets/collection-search-ZK57HtXx.js","assets/use-debounced-value-BXavENJJ.js","assets/required-auth-layout-NcpNSiLT.js","assets/use-org-sso-BZyWfhFg.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-D6E9Jgt7.js","assets/select-CIKv-cP8.js","assets/index-BdQq_4o_.js","assets/tabs-q6_JzTyv.js","assets/use-deco-credits-DOALlJ29.js","assets/toggle-group-C017ApXo.js","assets/use-open-billing-url-DOMvfkHO.js","assets/index-C3L-9o03.js","assets/checkbox-t57Ctij5.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-BFbFUONi.js","assets/drawer-BpZLKYXl.js","assets/input-BhNzKaIw.js","assets/suggestion-rrmCibxz.js","assets/use-chat-layout-state-ViStMfAb.js","assets/use-file-configs-Bklznbm7.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-Bdpz7VbT.js","assets/use-org-fs-iQHkUqUk.js","assets/question-004-sINsf4GQ.js","assets/use-members-CvjdZeK-.js","assets/use-org-auth-client-Bw9jbhf5.js","assets/feature-paywall-Bec4WKNH.js","assets/plan-ladder-CWvgaryk.js","assets/add-connection-dialog-BAFlEZTE.js","assets/extract-connection-data-Be1rMX3H.js","assets/metadata-D72DunRR.js","assets/connection-C82rO5ye.js","assets/url-slug-BMR6hHRv.js","assets/connection-card-CewKGErp.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-BXBoqmU6.js","assets/use-connection-BYw7Mfr_.js","assets/connection-form-helpers-DTKsttLG.js","assets/authenticate-and-persist-oauth-Cqx4X050.js","assets/mcp-oauth-UALjHFjo.js","assets/collection-tabs-D1E4IGtI.js","assets/badge-DZA-IFl-.js","assets/use-infinite-scroll-Db1cO7Vx.js","assets/useSuspenseInfiniteQuery-BSfAZu0N.js","assets/use-task-board-events-DvDYuYhV.js","assets/input-Bwd_JSM8.css","assets/claim-phase-copy-DspsYazy.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-C6jzj2gM.js","assets/collapsible-BQiYh-Rz.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-CPSBlHtL.js","assets/types-hNXlshSp.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-EtuK9kpn.js","assets/use-thread-outputs-D6r9RyCm.js","assets/utils-BpkCEmGJ.js","assets/scroll-area-CmRfBXhn.js","assets/monaco-editor-4muYSA1L.js","assets/editor-CGW6JIf_.js","assets/calendar-Cm5rhiek.js","assets/rich-text-link-control-BQh5dQcA.js","assets/switch-CN9B9IYC.js","assets/core.esm-CzT8OC5D.js","assets/sortable.esm-BlRKLv6h.js","assets/combobox-DWrO-0sH.js","assets/alert-dialog-GNsEmNv6.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-QTV7Iu_z.js","assets/asset-utils-BtHJk8iw.js","assets/sandbox-git-api-C7JbVL7R.js","assets/mustache-BlaGEQT0.js","assets/page-seo-form-kfF1Y8-O.js","assets/use-section-preview-base-Bv1g7sbn.js","assets/section-preview-url-7zfngvgW.js","assets/variant-matcher-override-Bjcyt8xP.js"])))=>i.map(i=>d[i]);
2
- import{r as x,av as kt,aK as He,aw as Pe,c as pe,b as Ne,j as s,K as zs,e as Is,h as Pt,B as De,aL as Us,X as Qt,aM as Hs,l as Dt,P as Pn,q as Vs,t as Sn}from"./index-QRiNSSRg.js";import{A as qs}from"./agent-view-guard-apbHI-m9.js";import{F as Ws}from"./feature-gate-D1lPShmi.js";import{a as Gs,b as St}from"./chat-context-BXo4vS9q.js";import{t as Js}from"./ChevronUp-C6o4R3ke.js";import{I as In,R as Ys,S as Qs,d as Xs,T as Zs,U as er,V as tr,W as nr,X as jn,K as sr}from"./agent-icon-DNBz9Nv-.js";import{a as rr}from"./UserSquare-b8RRnbDc.js";import{n as Un}from"./LinkExternal01-CMM__gU1.js";import{s as ar}from"./Plus-BwqBS2VV.js";import{P as ir,a as or,b as lr}from"./popover-BFbFUONi.js";import{e as tt,b as nt,c as Hn,f as Vn,C as qn,a as Wn}from"./command-gpgaKQ12.js";import{c as cr,a as dr}from"./repository-binding-CytM9xU8.js";import{b as Xt}from"./sandbox-lifecycle-context-EoHoFnzh.js";import{e as ur}from"./backoff-CrEUbyZT.js";import{f as mr}from"./thread-intent-DjuWufF8.js";import{a as Gn}from"./input-DuQVWVe6.js";import{N as fr,c as pr,s as st,n as Zt,d as Jn,f as Be,v as Yn,h as hr,u as gr,j as vr,k as br,l as xr,m as yr,o as En}from"./claim-phase-copy-DspsYazy.js";import{u as wr}from"./use-mobile-DZqz77Pm.js";import{b as Kt,T as zt,a as It}from"./tooltip-ZVqzgWr5.js";import{T as Qe}from"./toolbar-icon-button-BMvT8UMD.js";import{b as kr,a as Pr,u as Qn,g as Sr,c as jr,B as Ut,P as Er,r as Nr,R as Tr,d as Cr,e as en,f as Xn,h as Rr,i as Lr,j as Or,l as _r,m as Ar,p as Br,k as $r,S as Ht}from"./runnable-block-editor-BbGoeo9T.js";import{w as bt,i as Fr}from"./variant-matcher-override-Bjcyt8xP.js";import{r as Mr,w as Dr,D as Kr,b as Nn,a as zr}from"./section-preview-url-7zfngvgW.js";import{u as Ir}from"./use-fast-preview-draft-url-6FTIgzM1.js";import{r as Zn,l as es,u as Ur,w as Tn,a as Hr}from"./device-hint-BAvsacGu.js";import{a as Vr,c as ts}from"./shell-layout-BlsRs6mq.js";import{u as ns,b as qr}from"./use-sandbox-events-Dh1QYu5T.js";import{u as Gt}from"./useQueries-DpfqGXm1.js";import{i as Wr}from"./LinkBroken01-BfhSmQkh.js";import{b as ss,D as rs,c as as,d as is,e as Gr}from"./dialog-CPwHf_Wz.js";import{I as Cn}from"./input-nuX-8zcf.js";import{u as os}from"./blocks-preview-workspace-context-L29maHoo.js";import{i as Jr}from"./AlertCircle-73Q0VrfY.js";import{E as tn}from"./empty-state-DH5a3g1w.js";import{i as Yr}from"./X-CYSlb_l4.js";import{M as Qr}from"./monaco-editor-4muYSA1L.js";import{u as Xr}from"./use-new-blocks-editor-DPWHBdGg.js";import{a as Zr}from"./utils-BpkCEmGJ.js";import{R as Rn,a as xt,b as Ln}from"./resizable-D3t-NcWv.js";import{r as ea}from"./virtual-mcp-DnfVpr07.js";import{d as ta}from"./delay-CnY5UFtP.js";import{a as Vt}from"./use-chat-layout-state-ViStMfAb.js";import{G as On}from"./repository-picker-COwBzoTt.js";import{R as na}from"./repository-import-picker-D5AcDzE0.js";import{r as sa}from"./use-main-panel-tabs-CKeJUbYl.js";import{u as ra}from"./use-task-metadata-DtdbaLRU.js";import{b as aa}from"./thread-route-1k2Am-5A.js";import"./use-panel-navigate-DLkRwPwU.js";import"./use-project-scope-DT4CQCZ6.js";import"./feature-paywall-Bec4WKNH.js";import"./plan-ladder-CWvgaryk.js";import"./use-decopilot-events-DAURKDqv.js";import"./watch-sse-pool-Ba9ocaYD.js";import"./task-board-BB07RDcy.js";import"./schema-hu4ZPmHW.js";import"./autosend-CYljOHAf.js";import"./use-mcp-client-Bg3_AhYF.js";import"./auth-CRi4QG6a.js";import"./use-ai-providers-BM5FPaFB.js";import"./use-chat-navigation-BMvqsWWZ.js";import"./location-BjlyegC2.js";import"./use-organization-settings-1nS29Aiq.js";import"./Tool01-3qFWwkJ0.js";import"./ArrowUp-Dj6CCNsY.js";import"./ArrowLeft-C0LL-sgl.js";import"./ShoppingBag01-DTMr5LPX.js";import"./ZoomOut-Dkf0QR14.js";import"./Building02-BeTTPw4J.js";import"./CheckCircle-0plS54pM.js";import"./ChevronSelectorVertical-DwDvAYDg.js";import"./Copy01-BVZwKlTd.js";import"./CreditCard01-DJSVxquB.js";import"./DotsVertical-Bgiru7Ei.js";import"./Image01-BrcKEvc0.js";import"./Globe04-BLrBNEf_.js";import"./SwitchHorizontal01-SDrROb0m.js";import"./Key01-Cw13ohrp.js";import"./Link01-D3VGGIFO.js";import"./Monitor01-Db_PJsLs.js";import"./Sun-Dl9-uMzC.js";import"./Play-C38buPg2.js";import"./SearchMd-GeiqoX_N.js";import"./Trash01-EYI48T6O.js";import"./Upload01-CJy3PS7X.js";import"./User01-IYKl2aWt.js";import"./Users01-BMm-ncU9.js";import"./XClose-D4SH1jH_.js";import"./index-BsBe0xct.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./usage-stats-CsSt_gIh.js";import"./tool-namespace-B_q_wCZr.js";import"./form-DYlgPN3G.js";import"./label-CI6a4h7J.js";import"./utils-CVEq3hMx.js";import"./markdown-CFuqOFzm.js";import"./use-copy-CrZ5dLcO.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-AFJ_IHRs.js";import"./file-type-icon-DUorPfRr.js";import"./chat-draft-D6E9Jgt7.js";import"./select-CIKv-cP8.js";import"./index-BdQq_4o_.js";import"./index-DrM8Fu0n.js";import"./tabs-q6_JzTyv.js";import"./use-deco-credits-DOALlJ29.js";import"./toggle-group-C017ApXo.js";import"./use-open-billing-url-DOMvfkHO.js";import"./index-C3L-9o03.js";import"./checkbox-t57Ctij5.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DHU_JQXK.js";import"./drawer-BpZLKYXl.js";import"./input-BhNzKaIw.js";import"./suggestion-rrmCibxz.js";import"./use-mcp-prompts-Bdpz7VbT.js";import"./use-org-fs-iQHkUqUk.js";import"./useInfiniteQuery-gn_0q_rp.js";import"./infiniteQueryObserver-D-Bj8iuA.js";import"./question-004-sINsf4GQ.js";import"./use-members-CvjdZeK-.js";import"./use-org-auth-client-Bw9jbhf5.js";import"./add-connection-dialog-BAFlEZTE.js";import"./collection-search-ZK57HtXx.js";import"./extract-connection-data-Be1rMX3H.js";import"./metadata-D72DunRR.js";import"./connection-C82rO5ye.js";import"./url-slug-BMR6hHRv.js";import"./connection-card-CewKGErp.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-BOMex3da.js";import"./textarea-BXBoqmU6.js";import"./use-connection-BYw7Mfr_.js";import"./connection-form-helpers-DTKsttLG.js";import"./authenticate-and-persist-oauth-Cqx4X050.js";import"./mcp-oauth-UALjHFjo.js";import"./collection-tabs-D1E4IGtI.js";import"./badge-DZA-IFl-.js";import"./use-infinite-scroll-Db1cO7Vx.js";import"./useSuspenseInfiniteQuery-BSfAZu0N.js";import"./use-task-board-events-DvDYuYhV.js";import"./pair-C6jzj2gM.js";import"./collapsible-BQiYh-Rz.js";import"./use-clock-tick-BKuJ3MK9.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CPSBlHtL.js";import"./types-hNXlshSp.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-EtuK9kpn.js";import"./use-navigate-to-agent-fXx4xDJO.js";import"./use-thread-outputs-D6r9RyCm.js";import"./scroll-area-CmRfBXhn.js";import"./calendar-Cm5rhiek.js";import"./rich-text-link-control-BQh5dQcA.js";import"./switch-CN9B9IYC.js";import"./core.esm-CzT8OC5D.js";import"./sortable.esm-BlRKLv6h.js";import"./combobox-DWrO-0sH.js";import"./alert-dialog-GNsEmNv6.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-QTV7Iu_z.js";import"./use-debounced-value-BXavENJJ.js";import"./use-file-configs-Bklznbm7.js";import"./asset-utils-BtHJk8iw.js";import"./sandbox-git-api-C7JbVL7R.js";import"./project-icon-DL5EBc-E.js";import"./new-project-dialog-D8OeVQOw.js";import"./required-auth-layout-NcpNSiLT.js";import"./use-org-sso-BZyWfhFg.js";import"./editor-CGW6JIf_.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-tools-Ds0ZkdkL.js";import"./resolve-tab-icon-DgToKs-Z.js";const ia={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function oa(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,l=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?ia:r&&i&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const la=1e4,ca=1e3,da=3e4;function ua({iframeRef:t,src:e,active:n}){const r=x.useRef(0),i=x.useRef(null),u=x.useRef(null),l=x.useRef(e),c=x.useRef(n);l.current=e,c.current=n;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},la)},h=()=>{if(!c.current||!l.current)return;u.current&&clearTimeout(u.current);const j=ur(da,ca,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,E=l.current;!g||!E||!c.current||(g.src=E,d())},j)},m=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return x.useEffect(()=>{if(o(),r.current=0,!(!n||!e))return d(),o},[e,n]),{handleLoad:m,handleError:p}}const ma=kt({tag:Pe(),id:Pe(),classes:Pe(),text:Pe(),html:Pe(),manifestKey:Pe().nullable(),componentName:Pe().nullable(),parents:Pe(),url:Pe(),path:Pe(),viewport:kt({width:He(),height:He()}),position:kt({x:He(),y:He()})}),fa=`(function() {
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-BHfMW6Ts.js","assets/index-D6ZKj0d3.js","assets/index-D7k-FSss.css","assets/chat-context-BEKkV-Ll.js","assets/use-panel-navigate-vbXDgGYl.js","assets/thread-route-CaKdVoOw.js","assets/use-project-scope-KzlP3xju.js","assets/repository-binding-DU5xCC2f.js","assets/use-mcp-client-BhAo2QDs.js","assets/auth-DK9f1ZTH.js","assets/autosend-BV2PsimL.js","assets/thread-intent-o4o-MA3S.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-HwFSe36n.js","assets/task-board-DFP-fne3.js","assets/schema-DBi1obJz.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-C_UyGftl.js","assets/use-ai-providers-BLkItyxK.js","assets/use-chat-navigation-0CERUZel.js","assets/location-BjlyegC2.js","assets/use-organization-settings-XOD9ESkO.js","assets/use-new-blocks-editor-BEuQmWCf.js","assets/runnable-block-editor-aiNmn7uQ.js","assets/input-DWfiFAhX.js","assets/usage-stats-qYCfmoBc.js","assets/tool-namespace-BaO4I7fR.js","assets/dialog-CaizaKQW.js","assets/X-CGpWJ0hX.js","assets/form-CpErFrQ1.js","assets/label-SS4h69R5.js","assets/input-BR2ZOmYv.js","assets/utils-CVEq3hMx.js","assets/markdown-29HM3kkf.js","assets/use-copy-Dg2-hZvb.js","assets/Copy01-CSQiL-8m.js","assets/ZoomOut-DtT7NZBX.js","assets/use-mobile-DsXG93j_.js","assets/tooltip-ud1E4lWe.js","assets/index-QSc3eGTu.js","assets/agent-icon-CqZASRJE.js","assets/AlertCircle-DxGlheNv.js","assets/Tool01-B-ugA2BM.js","assets/ArrowUp-B_1yzk0u.js","assets/ArrowLeft-C5TDkvfy.js","assets/LinkBroken01-aiXtOyEy.js","assets/ShoppingBag01-CZ0mlBHZ.js","assets/Building02-aupVb9bk.js","assets/CheckCircle-Ck2nYEsD.js","assets/ChevronUp-CiQJnmx3.js","assets/ChevronSelectorVertical-vEYxYM2o.js","assets/UserSquare-Dbdn52Lc.js","assets/CreditCard01-Dbsq9vqA.js","assets/DotsVertical-D5VxjRuG.js","assets/Image01-CRH49dh2.js","assets/Globe04-BYAnRXKE.js","assets/SwitchHorizontal01-CUO4Tr7k.js","assets/Key01-DlUQl2kb.js","assets/Link01-CZ9mTgFL.js","assets/LinkExternal01-BNOHDQ-X.js","assets/Monitor01-Dibe2H0E.js","assets/Sun-aaILGBFQ.js","assets/Play-JhD_8p9T.js","assets/Plus-B-VohzJ4.js","assets/SearchMd-B4A8PIUy.js","assets/Trash01--ZO2TG0s.js","assets/Upload01-CNXMP8gQ.js","assets/User01-DqG0FbTZ.js","assets/Users01-Co0Q_ns9.js","assets/XClose-BHLC9coi.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-BZdEBEfj.js","assets/file-type-icon-CDG1qAi8.js","assets/shell-layout-_Pn7cxIp.js","assets/avatar-CYsgyDk8.js","assets/use-clock-tick-Byjn6Ipz.js","assets/command-Bvxnety0.js","assets/index-CnLkSXZ0.js","assets/integration-icon-BXBLtmJk.js","assets/project-icon-C0Nw8mPG.js","assets/new-project-dialog-pM62WBis.js","assets/repository-import-picker-DbT-KPfC.js","assets/use-navigate-to-agent-_Fy5-uKx.js","assets/repository-picker-CbM65WpS.js","assets/useInfiniteQuery-jncr8EKF.js","assets/infiniteQueryObserver-kLjXQrHB.js","assets/collection-search-BMeq1F4t.js","assets/use-debounced-value-DkB41yRZ.js","assets/required-auth-layout-UMnYz1o3.js","assets/use-org-sso-IZ5t5non.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-B0NTSRWz.js","assets/select-BimoKSOp.js","assets/index-BdQq_4o_.js","assets/tabs-BwctFHZr.js","assets/use-deco-credits-ODPDFKit.js","assets/toggle-group-Be2zaRQe.js","assets/use-open-billing-url-CUDSWbJf.js","assets/index-BYizWVl-.js","assets/checkbox-CvWHs1zK.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-B69wnZ0x.js","assets/drawer-Cn362UbS.js","assets/input-CEMJ7uPy.js","assets/suggestion-CO1eCyUL.js","assets/use-chat-layout-state-BXUQI_Uj.js","assets/use-file-configs-CGY_ert6.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-DPLwYnKg.js","assets/use-org-fs-Df2-ebn-.js","assets/question-004-sINsf4GQ.js","assets/use-members-BA82esMl.js","assets/use-org-auth-client-hM9___IR.js","assets/feature-paywall-DnC43PTT.js","assets/plan-ladder-D3lWJLFO.js","assets/add-connection-dialog-Bs6jGGvh.js","assets/extract-connection-data-WKz3D__i.js","assets/metadata-D72DunRR.js","assets/connection-CeKZpSJo.js","assets/url-slug-DA14zDBr.js","assets/connection-card-BBsdybH0.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-DncV9TJN.js","assets/use-connection-BLNfspiw.js","assets/connection-form-helpers-DTld_nTJ.js","assets/authenticate-and-persist-oauth-JHbhZWlI.js","assets/mcp-oauth-3A9tYRyL.js","assets/collection-tabs-Ba1MLgdh.js","assets/badge-80v1nRPK.js","assets/use-infinite-scroll-979kKqgG.js","assets/useSuspenseInfiniteQuery-rmy_OGLk.js","assets/use-task-board-events-Bsmaoj96.js","assets/input-Bwd_JSM8.css","assets/claim-phase-copy-BL3WW58c.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-H2ebpVnC.js","assets/collapsible-jaPP2OhC.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DXGnetCy.js","assets/types-C52Y_JT0.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-BF6gLW4J.js","assets/use-thread-outputs-714c96C6.js","assets/utils-Cp3D7BS-.js","assets/scroll-area-DrC4kFvC.js","assets/monaco-editor-DvydENcY.js","assets/editor-B-nIGllj.js","assets/calendar-7itqlUGW.js","assets/rich-text-link-control-BloybQa2.js","assets/switch-DbiylKGt.js","assets/core.esm-CFyPPg_k.js","assets/sortable.esm-BW2r2TQ5.js","assets/combobox-AP2SQ_RO.js","assets/alert-dialog-D_aRnY2J.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-IgJHEtUf.js","assets/asset-utils-DPFCQacY.js","assets/sandbox-git-api-C7JbVL7R.js","assets/mustache-Brnm_dXD.js","assets/page-seo-form-CVheom0z.js","assets/use-section-preview-base-BSDyoSl7.js","assets/section-preview-url-7zfngvgW.js","assets/variant-matcher-override-BPr4phd8.js"])))=>i.map(i=>d[i]);
2
+ import{r as x,av as kt,aK as He,aw as Pe,c as pe,b as Ne,j as s,K as zs,e as Is,h as Pt,B as De,aL as Us,X as Qt,aM as Hs,l as Dt,P as Pn,q as Vs,t as Sn}from"./index-D6ZKj0d3.js";import{A as qs}from"./agent-view-guard-WwLdd03P.js";import{F as Ws}from"./feature-gate-CQMKDgiz.js";import{a as Gs,b as St}from"./chat-context-BEKkV-Ll.js";import{t as Js}from"./ChevronUp-CiQJnmx3.js";import{I as In,R as Ys,S as Qs,d as Xs,T as Zs,U as er,V as tr,W as nr,X as jn,K as sr}from"./agent-icon-CqZASRJE.js";import{a as rr}from"./UserSquare-Dbdn52Lc.js";import{n as Un}from"./LinkExternal01-BNOHDQ-X.js";import{s as ar}from"./Plus-B-VohzJ4.js";import{P as ir,a as or,b as lr}from"./popover-B69wnZ0x.js";import{e as tt,b as nt,c as Hn,f as Vn,C as qn,a as Wn}from"./command-Bvxnety0.js";import{c as cr,a as dr}from"./repository-binding-DU5xCC2f.js";import{b as Xt}from"./sandbox-lifecycle-context-KvsIkNFN.js";import{e as ur}from"./backoff-CrEUbyZT.js";import{f as mr}from"./thread-intent-o4o-MA3S.js";import{a as Gn}from"./input-DWfiFAhX.js";import{N as fr,c as pr,s as st,n as Zt,d as Jn,f as Be,v as Yn,h as hr,u as gr,j as vr,k as br,l as xr,m as yr,o as En}from"./claim-phase-copy-BL3WW58c.js";import{u as wr}from"./use-mobile-DsXG93j_.js";import{b as Kt,T as zt,a as It}from"./tooltip-ud1E4lWe.js";import{T as Qe}from"./toolbar-icon-button-DnfVpnpi.js";import{b as kr,a as Pr,u as Qn,g as Sr,c as jr,B as Ut,P as Er,r as Nr,R as Tr,d as Cr,e as en,f as Xn,h as Rr,i as Lr,j as Or,l as _r,m as Ar,p as Br,k as $r,S as Ht}from"./runnable-block-editor-aiNmn7uQ.js";import{w as bt,i as Fr}from"./variant-matcher-override-BPr4phd8.js";import{r as Mr,w as Dr,D as Kr,b as Nn,a as zr}from"./section-preview-url-7zfngvgW.js";import{u as Ir}from"./use-fast-preview-draft-url-DfCPo5oA.js";import{r as Zn,l as es,u as Ur,w as Tn,a as Hr}from"./device-hint-CTUpl3CG.js";import{a as Vr,c as ts}from"./shell-layout-_Pn7cxIp.js";import{u as ns,b as qr}from"./use-sandbox-events-nw0-bXbS.js";import{u as Gt}from"./useQueries-BAV2VQJS.js";import{i as Wr}from"./LinkBroken01-aiXtOyEy.js";import{b as ss,D as rs,c as as,d as is,e as Gr}from"./dialog-CaizaKQW.js";import{I as Cn}from"./input-BR2ZOmYv.js";import{u as os}from"./blocks-preview-workspace-context-BtM79Kvx.js";import{i as Jr}from"./AlertCircle-DxGlheNv.js";import{E as tn}from"./empty-state-C3-ZBqZ7.js";import{i as Yr}from"./X-CGpWJ0hX.js";import{M as Qr}from"./monaco-editor-DvydENcY.js";import{u as Xr}from"./use-new-blocks-editor-BEuQmWCf.js";import{a as Zr}from"./utils-Cp3D7BS-.js";import{R as Rn,a as xt,b as Ln}from"./resizable-CMUQk1zK.js";import{r as ea}from"./virtual-mcp-y87s1o4x.js";import{d as ta}from"./delay-CnY5UFtP.js";import{a as Vt}from"./use-chat-layout-state-BXUQI_Uj.js";import{G as On}from"./repository-picker-CbM65WpS.js";import{R as na}from"./repository-import-picker-DbT-KPfC.js";import{r as sa}from"./use-main-panel-tabs-H7fQ4i6B.js";import{u as ra}from"./use-task-metadata-BhK_QNSv.js";import{b as aa}from"./thread-route-CaKdVoOw.js";import"./use-panel-navigate-vbXDgGYl.js";import"./use-project-scope-KzlP3xju.js";import"./feature-paywall-DnC43PTT.js";import"./plan-ladder-D3lWJLFO.js";import"./use-decopilot-events-C_UyGftl.js";import"./watch-sse-pool-HwFSe36n.js";import"./task-board-DFP-fne3.js";import"./schema-DBi1obJz.js";import"./autosend-BV2PsimL.js";import"./use-mcp-client-BhAo2QDs.js";import"./auth-DK9f1ZTH.js";import"./use-ai-providers-BLkItyxK.js";import"./use-chat-navigation-0CERUZel.js";import"./location-BjlyegC2.js";import"./use-organization-settings-XOD9ESkO.js";import"./Tool01-B-ugA2BM.js";import"./ArrowUp-B_1yzk0u.js";import"./ArrowLeft-C5TDkvfy.js";import"./ShoppingBag01-CZ0mlBHZ.js";import"./ZoomOut-DtT7NZBX.js";import"./Building02-aupVb9bk.js";import"./CheckCircle-Ck2nYEsD.js";import"./ChevronSelectorVertical-vEYxYM2o.js";import"./Copy01-CSQiL-8m.js";import"./CreditCard01-Dbsq9vqA.js";import"./DotsVertical-D5VxjRuG.js";import"./Image01-CRH49dh2.js";import"./Globe04-BYAnRXKE.js";import"./SwitchHorizontal01-CUO4Tr7k.js";import"./Key01-DlUQl2kb.js";import"./Link01-CZ9mTgFL.js";import"./Monitor01-Dibe2H0E.js";import"./Sun-aaILGBFQ.js";import"./Play-JhD_8p9T.js";import"./SearchMd-B4A8PIUy.js";import"./Trash01--ZO2TG0s.js";import"./Upload01-CNXMP8gQ.js";import"./User01-DqG0FbTZ.js";import"./Users01-Co0Q_ns9.js";import"./XClose-BHLC9coi.js";import"./index-CnLkSXZ0.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./usage-stats-qYCfmoBc.js";import"./tool-namespace-BaO4I7fR.js";import"./form-CpErFrQ1.js";import"./label-SS4h69R5.js";import"./utils-CVEq3hMx.js";import"./markdown-29HM3kkf.js";import"./use-copy-Dg2-hZvb.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-BZdEBEfj.js";import"./file-type-icon-CDG1qAi8.js";import"./chat-draft-B0NTSRWz.js";import"./select-BimoKSOp.js";import"./index-BdQq_4o_.js";import"./index-QSc3eGTu.js";import"./tabs-BwctFHZr.js";import"./use-deco-credits-ODPDFKit.js";import"./toggle-group-Be2zaRQe.js";import"./use-open-billing-url-CUDSWbJf.js";import"./index-BYizWVl-.js";import"./checkbox-CvWHs1zK.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-CYsgyDk8.js";import"./drawer-Cn362UbS.js";import"./input-CEMJ7uPy.js";import"./suggestion-CO1eCyUL.js";import"./use-mcp-prompts-DPLwYnKg.js";import"./use-org-fs-Df2-ebn-.js";import"./useInfiniteQuery-jncr8EKF.js";import"./infiniteQueryObserver-kLjXQrHB.js";import"./question-004-sINsf4GQ.js";import"./use-members-BA82esMl.js";import"./use-org-auth-client-hM9___IR.js";import"./add-connection-dialog-Bs6jGGvh.js";import"./collection-search-BMeq1F4t.js";import"./extract-connection-data-WKz3D__i.js";import"./metadata-D72DunRR.js";import"./connection-CeKZpSJo.js";import"./url-slug-DA14zDBr.js";import"./connection-card-BBsdybH0.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-BXBLtmJk.js";import"./textarea-DncV9TJN.js";import"./use-connection-BLNfspiw.js";import"./connection-form-helpers-DTld_nTJ.js";import"./authenticate-and-persist-oauth-JHbhZWlI.js";import"./mcp-oauth-3A9tYRyL.js";import"./collection-tabs-Ba1MLgdh.js";import"./badge-80v1nRPK.js";import"./use-infinite-scroll-979kKqgG.js";import"./useSuspenseInfiniteQuery-rmy_OGLk.js";import"./use-task-board-events-Bsmaoj96.js";import"./pair-H2ebpVnC.js";import"./collapsible-jaPP2OhC.js";import"./use-clock-tick-Byjn6Ipz.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DXGnetCy.js";import"./types-C52Y_JT0.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-BF6gLW4J.js";import"./use-navigate-to-agent-_Fy5-uKx.js";import"./use-thread-outputs-714c96C6.js";import"./scroll-area-DrC4kFvC.js";import"./calendar-7itqlUGW.js";import"./rich-text-link-control-BloybQa2.js";import"./switch-DbiylKGt.js";import"./core.esm-CFyPPg_k.js";import"./sortable.esm-BW2r2TQ5.js";import"./combobox-AP2SQ_RO.js";import"./alert-dialog-D_aRnY2J.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-IgJHEtUf.js";import"./use-debounced-value-DkB41yRZ.js";import"./use-file-configs-CGY_ert6.js";import"./asset-utils-DPFCQacY.js";import"./sandbox-git-api-C7JbVL7R.js";import"./project-icon-C0Nw8mPG.js";import"./new-project-dialog-pM62WBis.js";import"./required-auth-layout-UMnYz1o3.js";import"./use-org-sso-IZ5t5non.js";import"./editor-B-nIGllj.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-tools-Bv_07i-f.js";import"./resolve-tab-icon-sUoI4LWt.js";const ia={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function oa(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,l=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?ia:r&&i&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const la=1e4,ca=1e3,da=3e4;function ua({iframeRef:t,src:e,active:n}){const r=x.useRef(0),i=x.useRef(null),u=x.useRef(null),l=x.useRef(e),c=x.useRef(n);l.current=e,c.current=n;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},la)},h=()=>{if(!c.current||!l.current)return;u.current&&clearTimeout(u.current);const j=ur(da,ca,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,E=l.current;!g||!E||!c.current||(g.src=E,d())},j)},m=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return x.useEffect(()=>{if(o(),r.current=0,!(!n||!e))return d(),o},[e,n]),{handleLoad:m,handleError:p}}const ma=kt({tag:Pe(),id:Pe(),classes:Pe(),text:Pe(),html:Pe(),manifestKey:Pe().nullable(),componentName:Pe().nullable(),parents:Pe(),url:Pe(),path:Pe(),viewport:kt({width:He(),height:He()}),position:kt({x:He(),y:He()})}),fa=`(function() {
3
3
  if (window.__visualEditorActive) return;
4
4
  window.__visualEditorActive = true;
5
5
 
@@ -515,4 +515,4 @@ import{r as x,av as kt,aK as He,aw as Pe,c as pe,b as Ne,j as s,K as zs,e as Is,
515
515
  }
516
516
  });
517
517
  })();`;function Jt(t,e){let n=t,r=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const l=u.__resolveType;if(typeof l=="string"&&l&&l!==r){n=u,r=l;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(n.variants)?n.variants:[];if(i.length===0||i.every(c=>c?.rule?.__resolveType===fr))return null;const l=[];for(const c of i){const o=c?.value;if(o&&typeof o=="object")for(const d of Jt(o,e)??[])l.includes(d)||l.push(d)}return l}if(pr(r)){const i=n.section&&typeof n.section=="object"?Jt(n.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Ue(t){return t.replace(/[`*_]/g,"\\$&")}function ga(t,e){const n=[`The user selected an element on the live preview and asked: **"${Ue(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&n.push(`**Section resolveType:** \`${Ue(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${Ue(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Ue(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Ue(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Ue(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",i,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
518
- `)}function va(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),m=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:m/o*100}}function ba(t){const e=pe.c(45),{element:n,onDismiss:r}=t,[i,u]=x.useState(""),l=x.useRef(null),{sendMessage:c}=Gs(),{openSidePanel:o}=Vr(),d=Ne();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const $=ga(n,i);o(),c({parts:[{type:"text",text:$}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const m=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=va(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const j=p,g=`${j.leftPct}%`,E=`${j.topPct}%`;let b;e[9]!==g||e[10]!==E?(b={left:g,top:E,width:"320px"},e[9]=g,e[10]=E,e[11]=b):b=e[11];let w;e[12]!==m?(w=$=>{$.preventDefault(),m()},e[12]=m,e[13]=w):w=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=$=>u($.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=$=>{$.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let v;e[17]!==d?(v=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=v):v=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==v?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:v,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=v,e[22]=k):k=e[22];let P;e[23]!==i?(P=i.trim(),e[23]=i,e[24]=P):P=e[24];const D=!P;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let V;e[27]!==d?(V=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=V):V=e[28];let z;e[29]!==V?(z=s.jsx("title",{children:V}),e[29]=V,e[30]=z):z=e[30];let B;e[31]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=B):B=e[31];let L;e[32]!==z?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[z,B]}),e[32]=z,e[33]=L):L=e[33];let O;e[34]!==D||e[35]!==S||e[36]!==L?(O=s.jsx("button",{type:"submit",disabled:D,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=D,e[35]=S,e[36]=L,e[37]=O):O=e[37];let I;e[38]!==k||e[39]!==O||e[40]!==w?(I=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:w,children:[k,O]}),e[38]=k,e[39]=O,e[40]=w,e[41]=I):I=e[41];let _;return e[42]!==I||e[43]!==b?(_=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:I}),e[42]=I,e[43]=b,e[44]=_):_=e[44],_}const An="site-links",xa=/details?page|\bpdp\b/i,ya=/listingpage|\bplp\b/i;function wa(t,e,n){const r=new Set;for(const c of n)xa.test(c)&&r.add("product"),ya.test(c)&&r.add("category");const i=st(Zt(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const ka=["rosa","preto","pink","black"];function yt(t,e){const n=e.trim();return n?t(n):ka.flatMap(r=>t(r))}function Pa(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const ls=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function nn(t){return t.split("/")[0]??""}function Sa(t){const e=new Set;for(const n of t){const r=nn(n);ls.has(r)&&e.add(r)}return e}function ja(t,e){const n=nn(t);return!ls.has(n)||e.size===0?!0:e.has(n)}const Ea=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>yt(n=>Pa(t,n),e),optionsFromPayload:wt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:_a}];function Na(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of Ea){if(d.kind!==c)continue;const h=r.find(m=>d.test(m)&&ja(m,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(nn(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(Ta(t.has("category")?"category":"product")),l}function Ta(t){return{kind:t,id:An,resolveType:An,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ma(e,n)}}function Me(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Ca(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Me(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Me(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function cs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ds(t){try{return decodeURIComponent(t)}catch{return t}}function Ra(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function La(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Ra(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function us(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=st(Zt(e)),{pattern:u,order:l}=La(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ds(d):null}function wt(t,e){const n=Me(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Me(l);if(!c)continue;const o=us(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Me(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,m=Array.isArray(c.image)?Me(c.image[0]):null,p=typeof m?.url=="string"?m.url:void 0;i.push({value:o,label:h,image:p})}return i}function Oa(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?ds(n):null}function _a(t){const e=[],n=new Set,r=(i,u)=>{const l=Me(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=Oa(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const Aa=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 Ba(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function $a(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Fa(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Ma(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=us(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&Aa.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:Ba(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Fa(t))i(u,l,"product",c);for(const{href:u,text:l}of $a(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function Xe(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const ms=1e4;function Da(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 Ka(t,{resolveType:e,props:n}){const r=await fetch(kr(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(ms)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Bn(t,e){const n=await fetch(Pr(t,e),{signal:AbortSignal.timeout(ms)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function za(t,e,n){const r=e.optionsFromPayload(await Bn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=Be(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Bn(t,u),n).filter(c=>c.kind==="product");return cs([r,l])}catch{return r}}function Ia(t,e,n){return zs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Ua(t,e,n,r){if(e.homepageLinks)return za(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>Ka(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return cs(l.map(c=>e.optionsFromPayload(c,r)))}function Yt(t,e,n,r,i){return{queryKey:Ia(t,e,n),queryFn:()=>Ua(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function Ze(t){const e=pe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let m;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(m=p=>s.jsxs(nt,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(In,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Be(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=m):m=e[12],d=i.map(m),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(tt,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function $n(t){const e=pe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Ha(t){const e=pe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Ne(),[d,h]=x.useState(!1),[m,p]=x.useState(""),[j,g]=x.useState(""),E=x.useRef(null),b=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,w=Da(o),y=[...new Set(n.map(R=>w[R.kind].noun))].join(" or ");let v;e[0]!==o||e[1]!==y?(v=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=v):v=e[2];const k=v,P={template:r,paramName:i};let D;e[3]!==m?(D=(R,G)=>({source:R,query:G,options:R.clientFilter?Xe(G.data??[],m):G.data??[]}),e[3]=m,e[4]=D):D=e[4];const S=D,V=n.filter(Xa),z=n.filter(Qa),B=Gt({queries:V.map(R=>Yt(l,R,j,P,d))});let L;e[5]!==B||e[6]!==S?(L=(R,G)=>S(R,B[G]),e[5]=B,e[6]=S,e[7]=L):L=e[7];const O=V.map(L),I=O.length===0||O.every(Ya),_=Gt({queries:z.map(R=>Yt(l,R,j,P,d&&I))});let $;e[8]!==_||e[9]!==S?($=(R,G)=>S(R,_[G]),e[8]=_,e[9]=S,e[10]=$):$=e[10];const Y=z.map($),J=I?Y:O,q=J.length===1&&J[0]?.source.homepageLinks?J[0]:null,C=q&&!q.query.isLoading&&!q.query.isError?q?.query.data??[]:[],M=Xe(C.filter(Ja),m),U=Xe(C.filter(Ga),m),Z=M.length>0&&U.length>0,Q=R=>{h(R),E.current&&clearTimeout(E.current),p(R?u:""),g(R?u:"")};let he;e[11]===Symbol.for("react.memo_cache_sentinel")?(he=R=>{p(R),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{g(R)},300)},e[11]=he):he=e[11];const se=he,K=R=>{c(R),Q(!1)},te=Jn(m),be=Be(r,{[i]:te}),ue=rs,me=ss,xe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ve=Wa;let re;e[12]!==b||e[13]!==o?(re=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=o,e[14]=re):re=e[14];let ee;e[15]!==re?(ee=s.jsx(as,{className:"sr-only",children:s.jsx(is,{children:re})}),e[15]=re,e[16]=ee):ee=e[16];let fe;e[17]===Symbol.for("react.memo_cache_sentinel")?(fe=s.jsx(In,{size:16,className:"shrink-0 text-foreground"}),e[17]=fe):fe=e[17];let ne;e[18]!==o?(ne=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=ne):ne=e[19];let ae;e[20]!==b?(ae=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:b}),e[20]=b,e[21]=ae):ae=e[21];let le;e[22]!==ne||e[23]!==ae?(le=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[fe,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ne," ",ae]})]}),e[22]=ne,e[23]=ae,e[24]=le):le=e[24];const ge=Vn,jt=!1,rt="min-h-0 flex-1";let ie;e[25]!==k||e[26]!==m?(ie=s.jsx(qn,{autoFocus:!0,placeholder:k,value:m,onValueChange:se}),e[25]=k,e[26]=m,e[27]=ie):ie=e[27];const Se=Hn,Ve="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let je;e[28]!==o?(je=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=je):je=e[29];let ye;e[30]!==je?(ye=s.jsx(Wn,{children:je}),e[30]=je,e[31]=ye):ye=e[31];const qe=te&&s.jsx(tt,{className:"shrink-0",children:s.jsxs(nt,{value:`__raw__:${te}`,className:"gap-3 py-2",onSelect:()=>K(te),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(Wr,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:te,paramLabel:b})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:be})]})]})}),Te=Z?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(Ze,{heading:w.category.heading,iconKind:"category",options:M,template:r,paramName:i,keyPrefix:`${q?.source.id}:cat`,onSelect:K})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(Ze,{heading:w.product.heading,iconKind:"product",options:U,template:r,paramName:i,keyPrefix:`${q?.source.id}:prod`,onSelect:K})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:J.map(R=>{const{source:G,query:We,options:at}=R,{noun:Ge}=w[G.kind];if(We.isLoading)return s.jsx($n,{text:o("sandbox.pathParamPickerChip.loading",{noun:Ge})},G.id);if(We.isError)return s.jsx($n,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},G.id);if(G.homepageLinks){const Je=We.data??[];return s.jsxs(x.Fragment,{children:[s.jsx(Ze,{heading:w.category.heading,iconKind:"category",options:Xe(Je.filter(qa),m),template:r,paramName:i,keyPrefix:`${G.id}:cat`,onSelect:K}),s.jsx(Ze,{heading:w.product.heading,iconKind:"product",options:Xe(Je.filter(Va),m),template:r,paramName:i,keyPrefix:`${G.id}:prod`,onSelect:K})]},G.id)}return s.jsx(Ze,{heading:J.length>1?w[G.kind].heading:void 0,iconKind:G.kind,options:at,template:r,paramName:i,keyPrefix:G.id,onSelect:K},G.id)})});let Ce;e[32]!==Se||e[33]!==ye||e[34]!==qe||e[35]!==Te?(Ce=s.jsxs(Se,{className:Ve,children:[ye,qe,Te]}),e[32]=Se,e[33]=ye,e[34]=qe,e[35]=Te,e[36]=Ce):Ce=e[36];let Re;e[37]!==ge||e[38]!==ie||e[39]!==Ce?(Re=s.jsxs(ge,{shouldFilter:jt,className:rt,children:[ie,Ce]}),e[37]=ge,e[38]=ie,e[39]=Ce,e[40]=Re):Re=e[40];let Le;e[41]!==me||e[42]!==ee||e[43]!==le||e[44]!==Re||e[45]!==ve?(Le=s.jsxs(me,{className:xe,onClick:ve,children:[ee,le,Re]}),e[41]=me,e[42]=ee,e[43]=le,e[44]=Re,e[45]=ve,e[46]=Le):Le=e[46];let W;return e[47]!==ue||e[48]!==Q||e[49]!==d||e[50]!==Le?(W=s.jsx(ue,{open:d,onOpenChange:Q,children:Le}),e[47]=ue,e[48]=Q,e[49]=d,e[50]=Le,e[51]=W):W=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:R=>{R.stopPropagation(),Q(!0)},children:u||b}),W]})}function Va(t){return t.kind==="product"}function qa(t){return t.kind!=="product"}function Wa(t){return t.stopPropagation()}function Ga(t){return t.kind==="product"}function Ja(t){return t.kind!=="product"}function Ya(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Qa(t){return t.isFallback}function Xa(t){return!t.isFallback}function Za(t){const e=pe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const j={template:r,paramName:i},g=n.filter(ei);o=Gt,c=g.map(E=>Yt(u,E,"",j,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[m,p]=x.useState(!1);if(!m)for(const j of h){if(j.isLoading)break;const g=j.data?.[0];if(g){p(!0),queueMicrotask(()=>l(g.value));break}}return null}function ei(t){return!t.isFallback}function ti(t){const e=pe.c(31),{name:n,value:r,onCommit:i}=t,u=Ne(),[l,c]=x.useState(r),[o,d]=x.useState(!1),h=x.useRef(!1);let m;e[0]!==n||e[1]!==u?(m=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=m):m=e[2];const p=m,j=l||p;let g;e[3]!==j?(g=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:j}),e[3]=j,e[4]=g):g=e[4];let E;e[5]!==p||e[6]!==u?(E=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=E):E=e[7];let b,w;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=S=>c(S.target.value),w=()=>d(!0),e[8]=b,e[9]=w):(b=e[8],w=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=Jn(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let v;e[16]!==l||e[17]!==p||e[18]!==E||e[19]!==N||e[20]!==y?(v=s.jsx("input",{type:"text",value:l,placeholder:p,title:E,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:ni,onChange:b,onFocus:w,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=E,e[19]=N,e[20]=y,e[21]=v):v=e[21];let k;e[22]!==g||e[23]!==v?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,v]}),e[22]=g,e[23]=v,e[24]=k):k=e[24];let P;e[25]!==o||e[26]!==u?(P=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(Ys,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=P):P=e[27];let D;return e[28]!==P||e[29]!==k?(D=s.jsxs(s.Fragment,{children:[k,P]}),e[28]=P,e[29]=k,e[30]=D):D=e[30],D}function ni(t){return t.stopPropagation()}function si(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function ri(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function ai(t){const e=pe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=Qn(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Sr(l),h=o?{...o,name:l,path:c}:jr(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Is(i)}function ii(t){const e=pe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Ne();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[m,p]=x.useState(h);let j;e[2]!==d?(j=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=j):j=e[3];const[g,E]=x.useState(j),[b,w]=x.useState(Ut),[N,y]=x.useState(null),[v,k]=x.useState(n);n!==v&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),E(d("sectionsEditor.createPageModal.defaultPagePath")),w(Ut),y(null)));const P=!!l?.length;let D;e[4]!==o||e[5]!==r?(D=ne=>{!ne&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=D):D=e[6];const S=D;let V;e[7]!==o||e[8]!==m||e[9]!==c||e[10]!==g||e[11]!==P||e[12]!==b?(V=async ne=>{ne.preventDefault();const ae=m.trim(),le=g.trim();if(!ae||!le||o)return;const ge=Yn(le);if(ge){y(ge);return}y(null),await c({name:ae,path:le,templateKey:P&&b!==Ut?b:null})},e[7]=o,e[8]=m,e[9]=c,e[10]=g,e[11]=P,e[12]=b,e[13]=V):V=e[13];const z=V,B=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let O;e[16]!==L?(O=s.jsx(as,{children:s.jsx(is,{children:L})}),e[16]=L,e[17]=O):O=e[17];let I;e[18]!==d?(I=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=I):I=e[19];let _;e[20]!==I?(_=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:I}),e[20]=I,e[21]=_):_=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=ne=>p(ne.target.value),e[22]=$):$=e[22];let Y;e[23]!==d?(Y=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=Y):Y=e[24];let J;e[25]!==o||e[26]!==m||e[27]!==Y?(J=s.jsx(Cn,{id:"new-page-name",value:m,onChange:$,placeholder:Y,autoFocus:!0,disabled:o}),e[25]=o,e[26]=m,e[27]=Y,e[28]=J):J=e[28];let q;e[29]!==J||e[30]!==_?(q=s.jsxs("div",{className:"space-y-1.5",children:[_,J]}),e[29]=J,e[30]=_,e[31]=q):q=e[31];let X;e[32]!==d?(X=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=X):X=e[33];let C;e[34]!==X?(C=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:X}),e[34]=X,e[35]=C):C=e[35];let M;e[36]===Symbol.for("react.memo_cache_sentinel")?(M=ne=>E(ne.target.value),e[36]=M):M=e[36];let U;e[37]!==d?(U=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=U):U=e[38];let Z;e[39]!==o||e[40]!==g||e[41]!==U?(Z=s.jsx(Cn,{id:"new-page-path",value:g,onChange:M,placeholder:U,disabled:o}),e[39]=o,e[40]=g,e[41]=U,e[42]=Z):Z=e[42];let Q;e[43]!==C||e[44]!==Z?(Q=s.jsxs("div",{className:"space-y-1.5",children:[C,Z]}),e[43]=C,e[44]=Z,e[45]=Q):Q=e[45];let he;e[46]!==o||e[47]!==P||e[48]!==d||e[49]!==b||e[50]!==l?(he=P&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(Er,{id:"new-page-template",value:b,onChange:w,templates:l??[],disabled:o})]}),e[46]=o,e[47]=P,e[48]=d,e[49]=b,e[50]=l,e[51]=he):he=e[51];let se;e[52]!==B?(se=B&&s.jsx("p",{className:"text-xs text-destructive",children:B}),e[52]=B,e[53]=se):se=e[53];let K;e[54]!==q||e[55]!==Q||e[56]!==he||e[57]!==se?(K=s.jsxs("div",{className:"space-y-4 py-4",children:[q,Q,he,se]}),e[54]=q,e[55]=Q,e[56]=he,e[57]=se,e[58]=K):K=e[58];let te;e[59]!==r?(te=()=>r(!1),e[59]=r,e[60]=te):te=e[60];let be;e[61]!==d?(be=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=be):be=e[62];let ue;e[63]!==o||e[64]!==te||e[65]!==be?(ue=s.jsx(De,{type:"button",variant:"outline",onClick:te,disabled:o,children:be}),e[63]=o,e[64]=te,e[65]=be,e[66]=ue):ue=e[66];let me;e[67]!==o||e[68]!==m||e[69]!==g?(me=!m.trim()||!g.trim()||o,e[67]=o,e[68]=m,e[69]=g,e[70]=me):me=e[70];let xe;e[71]!==o||e[72]!==d?(xe=o?s.jsxs(s.Fragment,{children:[s.jsx(Pt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=xe):xe=e[73];let ve;e[74]!==me||e[75]!==xe?(ve=s.jsx(De,{type:"submit",disabled:me,children:xe}),e[74]=me,e[75]=xe,e[76]=ve):ve=e[76];let re;e[77]!==ue||e[78]!==ve?(re=s.jsxs(Gr,{children:[ue,ve]}),e[77]=ue,e[78]=ve,e[79]=re):re=e[79];let ee;e[80]!==z||e[81]!==K||e[82]!==re||e[83]!==O?(ee=s.jsx(ss,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:z,children:[O,K,re]})}),e[80]=z,e[81]=K,e[82]=re,e[83]=O,e[84]=ee):ee=e[84];let fe;return e[85]!==S||e[86]!==n||e[87]!==ee?(fe=s.jsx(rs,{open:n,onOpenChange:S,children:ee}),e[85]=S,e[86]=n,e[87]=ee,e[88]=fe):fe=e[88],fe}function oi(t){const e=pe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Ne();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const m=Qn(h);let p;e[4]!==m?(p=Cr((k,P)=>m.mutate({blockKey:k,data:P})),e[4]=m,e[5]=p):p=e[5];const j=p;let g;e[6]!==o||e[7]!==c?(g=Nr(c,o),e[6]=o,e[7]=c,e[8]=g):g=e[8];const{resolveType:E,props:b,title:w}=g;if(!E){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let P;return e[11]!==k?(P=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=P):P=e[12],P}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==E||e[15]!==w?(y={mode:"saved",blockKey:o,resolveType:E,title:w},e[13]=o,e[14]=E,e[15]=w,e[16]=y):y=e[16];let v;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==b||e[23]!==m.isPending||e[24]!==j||e[25]!==N||e[26]!==y||e[27]!==r?(v=s.jsx(Tr,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:b,isCreating:m.isPending,onCreate:li,onSaveReferencedBlock:j,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=b,e[23]=m.isPending,e[24]=j,e[25]=N,e[26]=y,e[27]=r,e[28]=v):v=e[28],v}async function li(){}function ci(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Fn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:ci(t.error)}}function di(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 ui(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=di(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const mi="https://github.com/decocms/blocks";function fi(){const t=pe.c(14),e=Ne();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Qs,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Un,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(De,{size:"sm",asChild:!0,children:s.jsxs("a",{href:mi,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(tn,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function pi(t){const e=pe.c(15),{source:n,onRetry:r}=t,i=Ne();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Jr,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(De,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let m;return e[11]!==l||e[12]!==o||e[13]!==h?(m=s.jsx(tn,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=m):m=e[14],m}const hi=x.lazy(()=>Us(()=>import("./sections-editor-BrVGgaeZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=Qt(),{currentBranch:c,taskId:o}=St(),d=ns(),h=Xt(),m=os(),p=d.lifecycle.phase==="running",j=h.previewUrl;let g;e[0]!==c||e[1]!==l||e[2]!==j||e[3]!==o||e[4]!==n?(g=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:j}:null,e[0]=c,e[1]=l,e[2]=j,e[3]=o,e[4]=n,e[5]=g):g=e[5];const E=g;let b;e[6]!==p?(b={fetchEnabled:p},e[6]=p,e[7]=b):b=e[7];const w=en(E,b);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=Xn(E,N),v=ui({lifecyclePhase:d.lifecycle.phase,decofile:Fn(w),meta:Fn(y),hasEditableContent:hr(w.data,y.data),fastPreviewActive:Gn(n).runtime==="cms"}),k=gi;if(v.kind==="loading"){let C;return e[10]===Symbol.for("react.memo_cache_sentinel")?(C=k(s.jsx(Hs,{})),e[10]=C):C=e[10],C}if(v.kind==="empty"){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=k(s.jsx(fi,{})),e[11]=C):C=e[11],C}if(v.kind==="error"){let C;e[12]!==w||e[13]!==h||e[14]!==y||e[15]!==v.source?(C=()=>{if(v.source==="sandbox"){h.retry();return}Promise.all([w.refetch(),y.refetch()])},e[12]=w,e[13]=h,e[14]=y,e[15]=v.source,e[16]=C):C=e[16];const M=C;let U;return e[17]!==M||e[18]!==v.source?(U=k(s.jsx(pi,{source:v.source,onRetry:M})),e[17]=M,e[18]=v.source,e[19]=U):U=e[19],U}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=C=>k(s.jsx("div",{className:"h-full min-h-0",children:C})),e[20]=P):P=e[20];const D=P,S=m.state.target;if(S?.kind==="loader"&&w.data&&y.data){const C=c??"",M=j??null;let U;return e[21]!==w.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==C||e[25]!==M||e[26]!==S.key||e[27]!==n?(U=D(s.jsx(oi,{orgSlug:l.slug,virtualMcpId:n,branch:C,previewUrl:M,meta:y.data,decofile:w.data,blockKey:S.key})),e[21]=w.data,e[22]=y.data,e[23]=l.slug,e[24]=C,e[25]=M,e[26]=S.key,e[27]=n,e[28]=U):U=e[28],U}let V;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(V=S||!c?null:Zn(es(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=V):V=e[33];const z=V;let B="/",L=null,O=null;S?.kind==="page"?(B=S.path,L=S.key):S?.kind==="section"?O=S.key:z&&(B=z.path,L=z.pageKey);const I=L?`page:${L}`:O?`section:${O}`:`path:${B}`;let _;e[34]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(Pt,{className:"size-5 text-muted-foreground"})}),e[34]=_):_=e[34];const $=c??"",Y=j??void 0,J=O?null:u,q=!!L&&m.state.editSeoPageKey===L;let X;return e[35]!==O||e[36]!==L||e[37]!==B||e[38]!==I||e[39]!==i||e[40]!==l.slug||e[41]!==J||e[42]!==q||e[43]!==$||e[44]!==Y||e[45]!==n||e[46]!==m.consumeEditSeo||e[47]!==m.setFocusedBlock||e[48]!==m.setVariantOverride?(X=D(s.jsx(x.Suspense,{fallback:_,children:s.jsx(hi,{orgSlug:l.slug,virtualMcpId:n,branch:$,previewReady:!0,previewUrl:Y,currentPath:B,activePageBlockKey:L,activeGlobalBlockKey:O,externalSelection:J,initialEditSeo:q,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:i},I)})),e[35]=O,e[36]=L,e[37]=B,e[38]=I,e[39]=i,e[40]=l.slug,e[41]=J,e[42]=q,e[43]=$,e[44]=Y,e[45]=n,e[46]=m.consumeEditSeo,e[47]=m.setFocusedBlock,e[48]=m.setVariantOverride,e[49]=X):X=e[49],X}function gi(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Dn(t){const e=pe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Ne(),c=Xr(),o=Rr(n);let d;e[0]!==o||e[1]!==r?(d=Lr(o,Zr(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:m}=Qt(),{currentBranch:p,taskId:j}=St(),E=Xt().previewUrl;let b;e[3]!==p||e[4]!==m.slug||e[5]!==E||e[6]!==j||e[7]!==n?(b=p?{orgSlug:m.slug,virtualMcpId:n,branch:p,threadId:j??null,previewUrl:E}:null,e[3]=p,e[4]=m.slug,e[5]=E,e[6]=j,e[7]=n,e[8]=b):b=e[8];const N=en(b),y=p??"";let v;e[9]!==m.slug||e[10]!==y||e[11]!==n?(v={orgSlug:m.slug,virtualMcpId:n,branch:y},e[9]=m.slug,e[10]=y,e[11]=n,e[12]=v):v=e[12];const{save:k,flush:P}=Or(v),D=N.data?.[r],S=N.data===void 0&&N.isLoading,V=N.data!==void 0&&D===void 0,z=!p||V||S;let B;e[13]!==D?(B=D===void 0?"":JSON.stringify(D,null,2),e[13]=D,e[14]=B):B=e[14];const L=B;let O;e[15]!==r||e[16]!==z||e[17]!==k?(O=q=>{if(z)return;let X;try{X=JSON.parse(q)}catch{return}X===null||typeof X!="object"||Array.isArray(X)||k(r,X)},e[15]=r,e[16]=z,e[17]=k,e[18]=O):O=e[18];const I=O;let _;e[19]!==P?(_=()=>({flush:P}),e[19]=P,e[20]=_):_=e[20],x.useImperativeHandle(u,_);let $;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?($=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(De,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(Yr,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=$):$=e[25];let Y;e[26]!==N.data||e[27]!==P||e[28]!==L||e[29]!==S||e[30]!==V||e[31]!==r||e[32]!==z||e[33]!==I||e[34]!==l?(Y=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(Pt,{className:"size-5 text-muted-foreground"})}):V?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Qr,{code:L,language:"json",readOnly:z,height:"100%",onChange:q=>I(q??""),onSave:q=>{I(q),P()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=P,e[28]=L,e[29]=S,e[30]=V,e[31]=r,e[32]=z,e[33]=I,e[34]=l,e[35]=Y):Y=e[35];let J;return e[36]!==$||e[37]!==Y?(J=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[$,Y]}),e[36]=$,e[37]=Y,e[38]=J):J=e[38],J}function fs(t){return t.contentEditingEnabled&&!t.isMobile}function vi(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function bi(t,e){return t==="blocks"?"preview":e?"blocks":t}function xi(t){return fs({contentEditingEnabled:ts(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function yi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const wi=500,ki={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Kn=1,qt=["desktop","mobile","tablet"],zn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Pi(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 et(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Wt(t,e){try{return new URL(t,e).href}catch{return null}}function Si(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function ji(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Ei(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function Ni(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ti({virtualMcpId:t}){const e=Ne(),n=wr(),{currentBranch:r,taskId:i,virtualMcpId:u}=St(),l=os(),c=cr(u===t?t:null),o=Gn(t),d=ea(c?.metadata?.ui?.layout??null),h=ts(d),m=fs({contentEditingEnabled:h,isMobile:n}),[p,j]=x.useState(()=>xi({cmsMode:d,isMobile:n})),[g,E]=x.useState("desktop"),[b,w]=x.useState(null),[N,y]=x.useState(null),v=x.useRef(null),k=x.useRef(null),[P,D]=x.useState(!1),S=x.useRef(null),V=()=>{S.current?.flush(),D(!1)},z=()=>D(a=>(a&&S.current?.flush(),!a)),[B,L]=x.useState({width:0,height:0}),[O,I]=x.useState(!1),[_,$]=x.useState(""),Y=x.useRef(null),[J,q]=x.useState(!1),[X,C]=x.useState(),[M,U]=x.useState(null),[Z,Q]=x.useState(null),[he,se]=x.useState(null),[K,te]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[be,ue]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[me,xe]=x.useState({}),[ve,re]=x.useState(!1),ee=x.useRef(null),fe=()=>{re(!0),ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>re(!1),15e3)},ne=()=>{ee.current&&(clearTimeout(ee.current),ee.current=null),re(!1)},{org:ae}=Qt(),le=ns(),ge=Xt(),jt=ge.vmEntry,rt=le.lifecycle.phase,{url:ie}=gr(t),Se=ie??ge.previewUrl,Ve=!!ie||rt==="running",je=c?.id===t?mr(c.metadata):null,ye=!ie&&c?.id===t&&o.runtime==="cms",qe=o.projectDefault==="cms",Te=Mr({sandboxUrl:Se,previewServerUrl:je,fastPreviewActive:ye}),Ce=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:Se}:null,Re=en(Ce,{fetchEnabled:Ve}),Le=Xn(Ce,{fetchEnabled:Ve}),W=Re.data,R=Le.data,G=W?vr(W).sort((a,f)=>a.name.localeCompare(f.name)):[],We=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r}:null,at=ai(We),Ge=W&&R?br(W,R):[],Je=W&&R?_r(R,W,"loaders"):[],sn=_?(()=>{const a=_.toLowerCase();return G.map(f=>({page:f,score:Ei(f.name,f.path,a)})).filter(({score:f})=>f>0).sort((f,T)=>T.score-f.score||f.page.path.length-T.page.path.length).map(({page:f})=>f)})():G,rn=Ge.filter(a=>{if(!_)return!0;const f=_.toLowerCase();return a.name.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),an=m?Je:[],on=an.filter(a=>{if(!_)return!0;const f=_.toLowerCase();return a.title.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),it=Z?Je.find(a=>a.key===Z)??null:null,Ae=Zt,Et=M||Z?null:xr(G,K,be),H=Et?.key??null,Ke=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??H,ot=Et?.path??null,ze=(H?me[H]:void 0)??{},we=Be(K,ze),Nt={};if(Ve&&Se&&R&&W){const a=Ar(R,"loaders"),f=H?W[H]:void 0,T=Ca(f,W,oe=>a.has(oe)),A=Sa(T);for(const oe of st(K)){if(oe.type!=="param")continue;const _e=wa(K,oe.name,T),ke=Na(_e,a,A);ke.length>0&&(Nt[oe.name]=ke)}}const lt=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,ln=W&&H?yr(W,H,0):[],cn=W?Br(ln,W):[],Tt=cn.map(a=>a.isSavedBlock?a.label:""),Ct=cn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Rt=ln.map(a=>Jt(a,W??{})),dn=x.useRef(null),Ee=x.useRef(null),ps=le.status.state==="paused",Lt=le.phase,un=$r({claimPhase:Lt,lifecycle:le.lifecycle}),$e=ge.previewState,hs=ge.userStopped,gs=Ur(ae.slug,t??"",r??""),{url:Fe}=Ir(ye&&t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,previewServerUrl:je??null,path:we}:null),vs=qe&&o.runtime==="sandbox",F=oa({previewState:$e,progressStatus:un.status,previewServerUrl:je,fastPreviewActive:ye,fastPreviewReady:!!Fe,codingSession:vs,localPreviewUrl:ie}),ct=F.mode!=="none",bs=F.mode==="production"&&F.iframeBase?et(F.iframeBase):null,Ie=F.mode==="production"?bs:et(Se),xs=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Ye=ie?F.mode==="sandbox"&&m&&p==="blocks":F.mode==="production"&&ye&&xs&&m&&p==="blocks",mn=x.useRef(null),{pin:ys,effective:ws}=Si(mn.current,{inPlaceRenderActive:Ye,draftPreviewUrl:Fe,resolvedPath:we});mn.current=ys;const Oe=Pi(F.mode==="sandbox"?bt(Tn(he??Wt(we,F.iframeBase)??F.iframeBase,g),l.state.variantOverride??[]):F.mode==="production"?bt(Tn(Dr(he??ws??Wt(we,F.iframeBase)??F.iframeBase,F.showWakingPill?Kr:null),g),l.state.variantOverride??[]):null),fn=Fe??(F.iframeBase?Wt(we,F.iframeBase):null),ks=F.mode==="production"?fn?bt(fn,l.state.variantOverride??[]):null:Oe??F.iframeBase,Ps=()=>{const a=ks;a&&window.open(a,"_blank","noopener")},dt=t&&r?es(ae.slug,t,r):null,ut=a=>{dt&&Hr(dt,a)},ce=l.state.target;x.useEffect(()=>{if(!(!ce||!Te||!R))if(ce.kind==="page"){const a=me[ce.key]??{};Ee.current=Be(ce.path,a),U(null),Q(null),se(null),ue(ce.key),te(ce.path),ut({path:ce.path,pageKey:ce.key,params:a})}else if(ce.kind==="loader")Ee.current=null,U(null),Q(ce.key),se(null);else{const a=Ge.find(f=>f.key===ce.key);if(a){Ee.current=null;const f=En(R);Q(null),U(a),se(Nn(Te,f,a.key))}}},[ce,Te,R,me]),x.useEffect(()=>{!H||ot===null||ce?.kind==="page"&&ce.key===H&&ce.path===ot||l.selectTarget({kind:"page",key:H,path:ot})},[H,ot,ce]);const[pn,Ss]=x.useState(null);if($e.kind==="iframe"&&pn!==$e.previewUrl){const a=pn!==null;Ss($e.previewUrl);const f=dt?Zn(dt):null;if(f){if(Ee.current=Be(f.path,f.params),te(f.path),ue(f.pageKey),se(null),U(null),Q(null),f.pageKey&&Object.keys(f.params).length>0){const T=f.pageKey;xe(A=>({...A,[T]:f.params}))}}else a&&(Ee.current=null,te("/"),se(null),ue(null),U(null),Q(null))}dn.current=Oe;const hn=ua({iframeRef:v,src:F.mode==="sandbox"?Oe:null,active:F.mode==="sandbox"}),gn=x.useRef(null);x.useEffect(()=>{if(!Fe||!Oe||gn.current===Fe)return;gn.current=Fe;const a=v.current;a&&a.getAttribute("src")!==Oe&&(fe(),a.src=Oe)},[Fe,Oe]);const vn=()=>{const a=v.current?.contentWindow,f=Ie;if(!a||!f||!W||!H)return;const T=W[H];if(!T||typeof T!="object")return;const A=zr({previewBaseUrl:f,pageBlock:T,decofile:W,path:we,pathTemplate:K});if(!A)return;const oe=bt(A.src,Fr(l.state.variantOverride??[],H));a.postMessage({type:"cms-editor::render",src:oe,body:A.body},f)},Ot=x.useRef(null);x.useEffect(()=>{if(!Ye||M||Z||!H||!W){Ot.current=null;return}const a={nav:JSON.stringify({page:H,path:we,pathTemplate:K}),content:JSON.stringify(W)},f=ji(Ot.current,a);Ot.current=a,f&&vn()},[W,Ye,M,Z,H,we,K]);const _t=x.useRef(null);x.useEffect(()=>{if(!Ye||M||Z||!H||!W){_t.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),f=_t.current;_t.current={page:H,sig:a},!(!f||f.page!==H||f.sig===a)&&vn()},[l.state.variantOverride,Ye,M,Z,H]);const js=!!t&&!!r&&!le.notFound&&!hs&&!ps&&(Lt?.kind==="ready"||rt!=="idle"),de=yi({editingMode:p,sandboxDisplay:F.mode==="sandbox",blocksEditingEnabled:m});x.useEffect(()=>{const a=Ie;if(!a)return;const f=T=>{if(T.origin===a)if(T.data?.type==="visual-editor::element-clicked"){const A=ma.safeParse(T.data.payload);A.success&&w(A.data)}else if(T.data?.type==="cms-editor::section-clicked"){const A=ha.safeParse(T.data.payload);A.success&&y({index:A.data.sectionIndex,seq:A.data.clickSeq})}else T.data?.type==="cms-editor::render-start"?fe():T.data?.type==="cms-editor::render-end"?(ne(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Ct,keys:Rt},a)):T.data?.type==="cms-editor::render-error"&&ne()};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[Ie,Tt,Ct,Rt]);const bn=()=>{const a=v.current?.contentWindow,f=et(Se);!a||!f||a.postMessage({type:"visual-editor::activate",script:fa},f)},Es=()=>{const a=v.current?.contentWindow,f=et(Se);!a||!f||a.postMessage({type:"visual-editor::deactivate"},f)},At=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||(a.postMessage(F.mode==="production"||ie?{type:"editor::inject",args:{script:_n}}:{type:"visual-editor::activate",script:_n},f),a.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Ct,keys:Rt},f))},Ns=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||a.postMessage({type:"cms-editor::deactivate"},f)},Ts=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||(a.postMessage({type:"cms-editor::clear-hover"},f),a.postMessage({type:"visual-editor::clear-hover"},f))},mt=a=>{if(a==="blocks"&&!m)return;const f=p;!n&&a!==f&&(a==="blocks"?k.current?.resize("30%"):k.current?.collapse()),j(a),w(null),y(null),a!=="blocks"&&Q(null),f==="visual"&&Es(),a==="visual"&&bn(),f==="blocks"&&a!=="blocks"&&Ns(),a==="blocks"&&At()},Cs=()=>{mt(vi(p,m))},Rs=()=>{mt(bi(p,m))};qr(()=>{const a=v.current;if(!a)return;fe();const f=document.activeElement,T=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ni(a,dn.current);let A;const oe=()=>{clearTimeout(A),a.tabIndex=T,a.style.pointerEvents="";const _e=document.activeElement;(!_e||_e===document.body||_e===a)&&f?.focus(),a.removeEventListener("load",oe)};a.addEventListener("load",oe),A=setTimeout(oe,3e3)});const Ls=()=>{const a=qt.indexOf(g);E(qt[(a+1)%qt.length])},Bt=(a,f)=>{if(!H)return;const T=H,A={...ze,[a]:f};Ee.current=Be(K,A),xe(oe=>({...oe,[T]:A})),ut({path:K,pageKey:T,params:A})},Os=si({iframeBase:F.iframeBase,resolvedPath:we,activeGlobalSectionName:M?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),xn=a=>{const f=me[a.key]??{},T=Be(a.path,f);(M||Ae(T)!==Ae(we))&&fe(),Ee.current=T,U(null),Q(null),se(null),y(null),ue(a.key),te(a.path),ut({path:a.path,pageKey:a.key,params:f}),l.selectTarget({kind:"page",key:a.key,path:a.path})},_s=a=>{if(!Te||!R){Sn.error(e("sandbox.preview.previewMetadataNotReady"));return}fe(),Ee.current=null;const f=En(R),T=Nn(Te,f,a.key);U(a),Q(null),se(T),y(null),l.selectTarget({kind:"section",key:a.key})},As=a=>{m&&(U(null),Q(a.key),se(null),mt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},Bs=async({name:a,path:f,templateKey:T})=>{if(!t||!r)return;const A=Yn(f);if(A){C(A);return}const oe=f.trim().startsWith("/")?f.trim():`/${f.trim()}`;if(G.some(ke=>Ae(ke.path)===Ae(oe))){C(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let _e;if(T&&(_e=W?.[T],!_e)){C(e("sandbox.preview.templateNoLongerExists"));return}C(void 0);try{const ke=await at.mutateAsync({name:a,path:oe,template:_e});q(!1),Sn.success(e("sandbox.preview.pageCreated",{name:a})),await ta(wi),xn({key:ke.key,name:ke.name,path:ke.path}),mt("blocks")}catch(ke){C(ke instanceof Error?ke.message:e("sandbox.preview.failedToCreatePage"))}},ft=ct&&(js||F.mode==="production"),$s=ri({showPreviewToolbar:ft,contentEditingEnabled:h}),pt=()=>{I(!1),$("")},$t=M?.name??it?.title??Et?.name,Ft=Re.isPending||Le.isPending,Mt=Ft?et(F.iframeBase):$t,ht=M?`section:${M.key}`:Z?`loader:${Z}`:H?`page:${H}`:void 0,Fs=ft?$s?s.jsxs(ir,{open:O,onOpenChange:a=>{I(a),a||$("")},children:[s.jsx(or,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:Ft?Mt??void 0:M||it?$t:[$t,K].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[M&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(Xs,{size:11}),e("sandbox.preview.globalBadge")]}),it&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(Zs,{size:11}),e("sandbox.preview.loaderBadge")]}),Mt&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Mt}),!Ft&&!M&&!it&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:K}),s.jsx(Js,{size:12,className:Dt("shrink-0 transition-transform",O&&"rotate-180")})]})})}),s.jsxs(lr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(Vn,{shouldFilter:!1,defaultValue:ht,children:[s.jsx(qn,{value:_,onValueChange:a=>{$(a),Y.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(Hn,{ref:Y,className:"max-h-80",children:[s.jsx(Wn,{children:G.length===0&&Ge.length===0&&an.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),sn.length>0&&s.jsx(tt,{children:sn.map(a=>s.jsxs(nt,{value:`page:${a.key}`,"aria-current":ht===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{pt(),xn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),rn.length>0&&s.jsx(tt,{heading:e("sandbox.preview.globalComponents"),children:rn.map(a=>s.jsx(nt,{value:`section:${a.key}`,"aria-current":ht===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),_s(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),on.length>0&&s.jsx(tt,{heading:e("sandbox.preview.globalLoaders"),children:on.map(a=>s.jsx(nt,{value:`loader:${a.key}`,"aria-current":ht===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),As(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!M&&!Z&&st(K).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:st(K).map((a,f)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${f}`);const T=Nt[a.name];return T&&lt?s.jsx(Ha,{sources:T,template:K,paramName:a.name,value:ze[a.name]??"",sandboxRef:lt,onCommit:A=>Bt(a.name,A)},`${H}:${a.name}`):s.jsx(ti,{name:a.name,value:ze[a.name]??"",onCommit:A=>Bt(a.name,A)},`${H}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(De,{variant:"ghost",className:"w-full justify-start",onClick:()=>{pt(),C(void 0),q(!0)},children:[s.jsx(ar,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Os}):null,yn=ft||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Qe,{onClick:Ls,"aria-label":e(zn[g]),children:g==="mobile"?s.jsx(er,{size:16}):g==="tablet"?s.jsx(tr,{size:16}):s.jsx(nr,{size:16})})}),s.jsx(It,{children:e(zn[g])})]}),Fs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(Qe,{onClick:Ps,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(Un,{size:16})})})]}):null,Ms=F.mode==="sandbox",gt=ki[g],vt=g==="desktop"&&(B.width===0||B.width>=gt.width+2*Kn),wn=vt?1:Math.min(B.width>0?B.width/(gt.width+2*Kn):1,1),Ds=vt?{width:"100%",height:"100%"}:{width:`${gt.width}px`,height:B.height>0?`${B.height/wn}px`:`${gt.height}px`,transform:`scale(${wn})`,transformOrigin:"top center"},kn=s.jsxs(s.Fragment,{children:[Ms&&(ft||h)&&s.jsx(Qe,{onClick:Cs,"aria-pressed":de==="visual","aria-label":e("sandbox.preview.visualEditor"),active:de==="visual",children:s.jsx(jn,{size:16})}),m&&s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Qe,{onClick:Rs,"aria-pressed":de==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:de==="blocks",children:s.jsx(rr,{size:16})})}),s.jsx(It,{children:e("sandbox.preview.blocksEditor")})]}),Ke&&s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Qe,{onClick:z,"aria-pressed":P,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:P,children:s.jsx(sr,{size:16})})}),s.jsx(It,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Ks=!!Z&&de==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[lt&&Object.entries(Nt).map(([a,f])=>(ze[a]??"")===""?s.jsx(Za,{sources:f,template:K,paramName:a,sandboxRef:lt,onFill:T=>Bt(a,T)},`${H}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(Pn.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:yn}),children:yn}),s.jsx(Pn.Toolbar.Right.Portal,{fallback:kn,children:kn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Ks?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Mn,{virtualMcpId:t,externalSelection:N,onViewJsonFile:z}),P&&Ke&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Dn,{ref:S,virtualMcpId:t,pageKey:Ke,onClose:V})})]}):s.jsxs(Rn,{orientation:"horizontal",disabled:de!=="blocks",className:"relative isolate",children:[s.jsx(xt,{ref:k,id:"preview-blocks-editor",defaultSize:de==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:de==="blocks"&&s.jsx(Mn,{virtualMcpId:t,externalSelection:N,onViewJsonFile:z})}),de==="blocks"&&s.jsx(Ln,{withHandle:!0}),s.jsx(xt,{id:"preview-canvas",defaultSize:de==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(Rn,{orientation:"horizontal",disabled:!(P&&Ke),children:[s.jsx(xt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const f=()=>L(A=>A.width===a.clientWidth&&A.height===a.clientHeight?A:{width:a.clientWidth,height:a.clientHeight});f();const T=new ResizeObserver(f);return T.observe(a),()=>T.disconnect()},className:Dt("h-full relative overflow-clip flex justify-center",ct&&!vt&&"bg-muted/30"),children:[(ve||gs)&&ct&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),F.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"starting",progress:un,claimPhase:Lt})}),!ie&&$e.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"suspended",onResume:ge.resume})}),!ie&&$e.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"errored",error:$e.error,onRetry:ge.retry,connectionsHref:`/${ae.slug}/settings/connections`})}),F.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(Pt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),de==="visual"&&!b&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(jn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),de==="visual"&&b&&s.jsx(ba,{element:b,onDismiss:()=>w(null)}),ct&&Oe&&s.jsx("div",{className:Dt("shrink-0",!vt&&"border-x border-border bg-background shadow-sm"),style:Ds,onMouseLeave:Ts,children:s.jsx("iframe",{ref:v,src:Oe,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:hn.handleError,onLoad:()=>{if(hn.handleLoad(),ne(),F.mode!=="sandbox"||ie){(F.mode==="production"&&!F.showWakingPill||ie)&&de==="blocks"&&At();return}if(Vs("vm_preview_loaded",{view_mode:de,vm_id:jt?.sandboxHandle??null}),!M)try{const a=v.current?.contentWindow?.location?.pathname;if(!a)return;const f=Ee.current;if(f!==null&&(Ee.current=null,Ae(a)!==Ae(f))||Ae(a)===Ae(we))return;te(a),ut({path:a,pageKey:be,params:ze})}catch{}de==="visual"&&bn(),de==="blocks"&&At()}},F.iframeBase)})]})}),P&&Ke&&s.jsxs(s.Fragment,{children:[s.jsx(Ln,{withHandle:!0}),s.jsx(xt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Dn,{ref:S,virtualMcpId:t,pageKey:Ke,onClose:V})})]})]})})]})}),s.jsx(ii,{open:J,onOpenChange:q,isPending:at.isPending,error:X,templates:G,onSubmit:Bs})]})}function Ci(t){const e=pe.c(22),{virtualMcpId:n}=t,r=Ne(),i=dr(n),{activeTask:u,taskId:l,currentBranch:c}=St(),o=ra(l),[d,h]=x.useState(!1);if(sa({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Vt(i?.metadata),threadHasRepo:Vt(o)||Vt(u?.metadata)})==="none"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(On,{className:"size-7 text-foreground"})}),e[0]=j):j=e[0];let g;e[1]!==r?(g=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=g):g=e[2];let E;e[3]!==r?(E=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=E):E=e[4];let b,w;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),w=s.jsx(On,{className:"size-4"}),e[5]=b,e[6]=w):(b=e[5],w=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(De,{onClick:b,children:[w,N]}),e[9]=N,e[10]=y):y=e[10];let v;e[11]!==g||e[12]!==E||e[13]!==y?(v=s.jsx(tn,{className:"h-full",image:j,title:g,description:E,actions:y}),e[11]=g,e[12]=E,e[13]=y,e[14]=v):v=e[14];let k;e[15]!==d?(k=s.jsx(na,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let P;return e[17]!==v||e[18]!==k?(P=s.jsxs(s.Fragment,{children:[v,k]}),e[17]=v,e[18]=k,e[19]=P):P=e[19],P}let p;return e[20]!==n?(p=s.jsx(Ti,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function Hc(){const t=pe.c(2),e=aa();let n;return t[0]!==e?(n=s.jsx(qs,{tabId:"site-editor",children:s.jsx(Ws,{feature:"cms",children:s.jsx(Ci,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{Hc as default};
518
+ `)}function va(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),m=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:m/o*100}}function ba(t){const e=pe.c(45),{element:n,onDismiss:r}=t,[i,u]=x.useState(""),l=x.useRef(null),{sendMessage:c}=Gs(),{openSidePanel:o}=Vr(),d=Ne();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const $=ga(n,i);o(),c({parts:[{type:"text",text:$}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const m=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=va(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const j=p,g=`${j.leftPct}%`,E=`${j.topPct}%`;let b;e[9]!==g||e[10]!==E?(b={left:g,top:E,width:"320px"},e[9]=g,e[10]=E,e[11]=b):b=e[11];let w;e[12]!==m?(w=$=>{$.preventDefault(),m()},e[12]=m,e[13]=w):w=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=$=>u($.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=$=>{$.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let v;e[17]!==d?(v=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=v):v=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==v?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:v,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=v,e[22]=k):k=e[22];let P;e[23]!==i?(P=i.trim(),e[23]=i,e[24]=P):P=e[24];const D=!P;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let V;e[27]!==d?(V=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=V):V=e[28];let z;e[29]!==V?(z=s.jsx("title",{children:V}),e[29]=V,e[30]=z):z=e[30];let B;e[31]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=B):B=e[31];let L;e[32]!==z?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[z,B]}),e[32]=z,e[33]=L):L=e[33];let O;e[34]!==D||e[35]!==S||e[36]!==L?(O=s.jsx("button",{type:"submit",disabled:D,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=D,e[35]=S,e[36]=L,e[37]=O):O=e[37];let I;e[38]!==k||e[39]!==O||e[40]!==w?(I=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:w,children:[k,O]}),e[38]=k,e[39]=O,e[40]=w,e[41]=I):I=e[41];let _;return e[42]!==I||e[43]!==b?(_=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:I}),e[42]=I,e[43]=b,e[44]=_):_=e[44],_}const An="site-links",xa=/details?page|\bpdp\b/i,ya=/listingpage|\bplp\b/i;function wa(t,e,n){const r=new Set;for(const c of n)xa.test(c)&&r.add("product"),ya.test(c)&&r.add("category");const i=st(Zt(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const ka=["rosa","preto","pink","black"];function yt(t,e){const n=e.trim();return n?t(n):ka.flatMap(r=>t(r))}function Pa(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const ls=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function nn(t){return t.split("/")[0]??""}function Sa(t){const e=new Set;for(const n of t){const r=nn(n);ls.has(r)&&e.add(r)}return e}function ja(t,e){const n=nn(t);return!ls.has(n)||e.size===0?!0:e.has(n)}const Ea=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>yt(n=>Pa(t,n),e),optionsFromPayload:wt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:_a}];function Na(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of Ea){if(d.kind!==c)continue;const h=r.find(m=>d.test(m)&&ja(m,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(nn(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(Ta(t.has("category")?"category":"product")),l}function Ta(t){return{kind:t,id:An,resolveType:An,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ma(e,n)}}function Me(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Ca(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Me(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Me(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function cs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ds(t){try{return decodeURIComponent(t)}catch{return t}}function Ra(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function La(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Ra(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function us(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=st(Zt(e)),{pattern:u,order:l}=La(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ds(d):null}function wt(t,e){const n=Me(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Me(l);if(!c)continue;const o=us(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Me(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,m=Array.isArray(c.image)?Me(c.image[0]):null,p=typeof m?.url=="string"?m.url:void 0;i.push({value:o,label:h,image:p})}return i}function Oa(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?ds(n):null}function _a(t){const e=[],n=new Set,r=(i,u)=>{const l=Me(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=Oa(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const Aa=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 Ba(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function $a(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Fa(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Ma(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=us(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&Aa.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:Ba(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Fa(t))i(u,l,"product",c);for(const{href:u,text:l}of $a(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function Xe(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const ms=1e4;function Da(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 Ka(t,{resolveType:e,props:n}){const r=await fetch(kr(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(ms)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Bn(t,e){const n=await fetch(Pr(t,e),{signal:AbortSignal.timeout(ms)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function za(t,e,n){const r=e.optionsFromPayload(await Bn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=Be(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Bn(t,u),n).filter(c=>c.kind==="product");return cs([r,l])}catch{return r}}function Ia(t,e,n){return zs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Ua(t,e,n,r){if(e.homepageLinks)return za(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>Ka(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return cs(l.map(c=>e.optionsFromPayload(c,r)))}function Yt(t,e,n,r,i){return{queryKey:Ia(t,e,n),queryFn:()=>Ua(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function Ze(t){const e=pe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let m;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(m=p=>s.jsxs(nt,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(In,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Be(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=m):m=e[12],d=i.map(m),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(tt,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function $n(t){const e=pe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Ha(t){const e=pe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Ne(),[d,h]=x.useState(!1),[m,p]=x.useState(""),[j,g]=x.useState(""),E=x.useRef(null),b=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,w=Da(o),y=[...new Set(n.map(R=>w[R.kind].noun))].join(" or ");let v;e[0]!==o||e[1]!==y?(v=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=v):v=e[2];const k=v,P={template:r,paramName:i};let D;e[3]!==m?(D=(R,G)=>({source:R,query:G,options:R.clientFilter?Xe(G.data??[],m):G.data??[]}),e[3]=m,e[4]=D):D=e[4];const S=D,V=n.filter(Xa),z=n.filter(Qa),B=Gt({queries:V.map(R=>Yt(l,R,j,P,d))});let L;e[5]!==B||e[6]!==S?(L=(R,G)=>S(R,B[G]),e[5]=B,e[6]=S,e[7]=L):L=e[7];const O=V.map(L),I=O.length===0||O.every(Ya),_=Gt({queries:z.map(R=>Yt(l,R,j,P,d&&I))});let $;e[8]!==_||e[9]!==S?($=(R,G)=>S(R,_[G]),e[8]=_,e[9]=S,e[10]=$):$=e[10];const Y=z.map($),J=I?Y:O,q=J.length===1&&J[0]?.source.homepageLinks?J[0]:null,C=q&&!q.query.isLoading&&!q.query.isError?q?.query.data??[]:[],M=Xe(C.filter(Ja),m),U=Xe(C.filter(Ga),m),Z=M.length>0&&U.length>0,Q=R=>{h(R),E.current&&clearTimeout(E.current),p(R?u:""),g(R?u:"")};let he;e[11]===Symbol.for("react.memo_cache_sentinel")?(he=R=>{p(R),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{g(R)},300)},e[11]=he):he=e[11];const se=he,K=R=>{c(R),Q(!1)},te=Jn(m),be=Be(r,{[i]:te}),ue=rs,me=ss,xe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ve=Wa;let re;e[12]!==b||e[13]!==o?(re=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=o,e[14]=re):re=e[14];let ee;e[15]!==re?(ee=s.jsx(as,{className:"sr-only",children:s.jsx(is,{children:re})}),e[15]=re,e[16]=ee):ee=e[16];let fe;e[17]===Symbol.for("react.memo_cache_sentinel")?(fe=s.jsx(In,{size:16,className:"shrink-0 text-foreground"}),e[17]=fe):fe=e[17];let ne;e[18]!==o?(ne=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=ne):ne=e[19];let ae;e[20]!==b?(ae=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:b}),e[20]=b,e[21]=ae):ae=e[21];let le;e[22]!==ne||e[23]!==ae?(le=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[fe,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ne," ",ae]})]}),e[22]=ne,e[23]=ae,e[24]=le):le=e[24];const ge=Vn,jt=!1,rt="min-h-0 flex-1";let ie;e[25]!==k||e[26]!==m?(ie=s.jsx(qn,{autoFocus:!0,placeholder:k,value:m,onValueChange:se}),e[25]=k,e[26]=m,e[27]=ie):ie=e[27];const Se=Hn,Ve="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let je;e[28]!==o?(je=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=je):je=e[29];let ye;e[30]!==je?(ye=s.jsx(Wn,{children:je}),e[30]=je,e[31]=ye):ye=e[31];const qe=te&&s.jsx(tt,{className:"shrink-0",children:s.jsxs(nt,{value:`__raw__:${te}`,className:"gap-3 py-2",onSelect:()=>K(te),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(Wr,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:te,paramLabel:b})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:be})]})]})}),Te=Z?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(Ze,{heading:w.category.heading,iconKind:"category",options:M,template:r,paramName:i,keyPrefix:`${q?.source.id}:cat`,onSelect:K})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(Ze,{heading:w.product.heading,iconKind:"product",options:U,template:r,paramName:i,keyPrefix:`${q?.source.id}:prod`,onSelect:K})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:J.map(R=>{const{source:G,query:We,options:at}=R,{noun:Ge}=w[G.kind];if(We.isLoading)return s.jsx($n,{text:o("sandbox.pathParamPickerChip.loading",{noun:Ge})},G.id);if(We.isError)return s.jsx($n,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},G.id);if(G.homepageLinks){const Je=We.data??[];return s.jsxs(x.Fragment,{children:[s.jsx(Ze,{heading:w.category.heading,iconKind:"category",options:Xe(Je.filter(qa),m),template:r,paramName:i,keyPrefix:`${G.id}:cat`,onSelect:K}),s.jsx(Ze,{heading:w.product.heading,iconKind:"product",options:Xe(Je.filter(Va),m),template:r,paramName:i,keyPrefix:`${G.id}:prod`,onSelect:K})]},G.id)}return s.jsx(Ze,{heading:J.length>1?w[G.kind].heading:void 0,iconKind:G.kind,options:at,template:r,paramName:i,keyPrefix:G.id,onSelect:K},G.id)})});let Ce;e[32]!==Se||e[33]!==ye||e[34]!==qe||e[35]!==Te?(Ce=s.jsxs(Se,{className:Ve,children:[ye,qe,Te]}),e[32]=Se,e[33]=ye,e[34]=qe,e[35]=Te,e[36]=Ce):Ce=e[36];let Re;e[37]!==ge||e[38]!==ie||e[39]!==Ce?(Re=s.jsxs(ge,{shouldFilter:jt,className:rt,children:[ie,Ce]}),e[37]=ge,e[38]=ie,e[39]=Ce,e[40]=Re):Re=e[40];let Le;e[41]!==me||e[42]!==ee||e[43]!==le||e[44]!==Re||e[45]!==ve?(Le=s.jsxs(me,{className:xe,onClick:ve,children:[ee,le,Re]}),e[41]=me,e[42]=ee,e[43]=le,e[44]=Re,e[45]=ve,e[46]=Le):Le=e[46];let W;return e[47]!==ue||e[48]!==Q||e[49]!==d||e[50]!==Le?(W=s.jsx(ue,{open:d,onOpenChange:Q,children:Le}),e[47]=ue,e[48]=Q,e[49]=d,e[50]=Le,e[51]=W):W=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:R=>{R.stopPropagation(),Q(!0)},children:u||b}),W]})}function Va(t){return t.kind==="product"}function qa(t){return t.kind!=="product"}function Wa(t){return t.stopPropagation()}function Ga(t){return t.kind==="product"}function Ja(t){return t.kind!=="product"}function Ya(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Qa(t){return t.isFallback}function Xa(t){return!t.isFallback}function Za(t){const e=pe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const j={template:r,paramName:i},g=n.filter(ei);o=Gt,c=g.map(E=>Yt(u,E,"",j,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[m,p]=x.useState(!1);if(!m)for(const j of h){if(j.isLoading)break;const g=j.data?.[0];if(g){p(!0),queueMicrotask(()=>l(g.value));break}}return null}function ei(t){return!t.isFallback}function ti(t){const e=pe.c(31),{name:n,value:r,onCommit:i}=t,u=Ne(),[l,c]=x.useState(r),[o,d]=x.useState(!1),h=x.useRef(!1);let m;e[0]!==n||e[1]!==u?(m=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=m):m=e[2];const p=m,j=l||p;let g;e[3]!==j?(g=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:j}),e[3]=j,e[4]=g):g=e[4];let E;e[5]!==p||e[6]!==u?(E=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=E):E=e[7];let b,w;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=S=>c(S.target.value),w=()=>d(!0),e[8]=b,e[9]=w):(b=e[8],w=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=Jn(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let v;e[16]!==l||e[17]!==p||e[18]!==E||e[19]!==N||e[20]!==y?(v=s.jsx("input",{type:"text",value:l,placeholder:p,title:E,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:ni,onChange:b,onFocus:w,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=E,e[19]=N,e[20]=y,e[21]=v):v=e[21];let k;e[22]!==g||e[23]!==v?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,v]}),e[22]=g,e[23]=v,e[24]=k):k=e[24];let P;e[25]!==o||e[26]!==u?(P=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(Ys,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=P):P=e[27];let D;return e[28]!==P||e[29]!==k?(D=s.jsxs(s.Fragment,{children:[k,P]}),e[28]=P,e[29]=k,e[30]=D):D=e[30],D}function ni(t){return t.stopPropagation()}function si(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function ri(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function ai(t){const e=pe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=Qn(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Sr(l),h=o?{...o,name:l,path:c}:jr(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Is(i)}function ii(t){const e=pe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Ne();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[m,p]=x.useState(h);let j;e[2]!==d?(j=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=j):j=e[3];const[g,E]=x.useState(j),[b,w]=x.useState(Ut),[N,y]=x.useState(null),[v,k]=x.useState(n);n!==v&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),E(d("sectionsEditor.createPageModal.defaultPagePath")),w(Ut),y(null)));const P=!!l?.length;let D;e[4]!==o||e[5]!==r?(D=ne=>{!ne&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=D):D=e[6];const S=D;let V;e[7]!==o||e[8]!==m||e[9]!==c||e[10]!==g||e[11]!==P||e[12]!==b?(V=async ne=>{ne.preventDefault();const ae=m.trim(),le=g.trim();if(!ae||!le||o)return;const ge=Yn(le);if(ge){y(ge);return}y(null),await c({name:ae,path:le,templateKey:P&&b!==Ut?b:null})},e[7]=o,e[8]=m,e[9]=c,e[10]=g,e[11]=P,e[12]=b,e[13]=V):V=e[13];const z=V,B=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let O;e[16]!==L?(O=s.jsx(as,{children:s.jsx(is,{children:L})}),e[16]=L,e[17]=O):O=e[17];let I;e[18]!==d?(I=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=I):I=e[19];let _;e[20]!==I?(_=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:I}),e[20]=I,e[21]=_):_=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=ne=>p(ne.target.value),e[22]=$):$=e[22];let Y;e[23]!==d?(Y=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=Y):Y=e[24];let J;e[25]!==o||e[26]!==m||e[27]!==Y?(J=s.jsx(Cn,{id:"new-page-name",value:m,onChange:$,placeholder:Y,autoFocus:!0,disabled:o}),e[25]=o,e[26]=m,e[27]=Y,e[28]=J):J=e[28];let q;e[29]!==J||e[30]!==_?(q=s.jsxs("div",{className:"space-y-1.5",children:[_,J]}),e[29]=J,e[30]=_,e[31]=q):q=e[31];let X;e[32]!==d?(X=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=X):X=e[33];let C;e[34]!==X?(C=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:X}),e[34]=X,e[35]=C):C=e[35];let M;e[36]===Symbol.for("react.memo_cache_sentinel")?(M=ne=>E(ne.target.value),e[36]=M):M=e[36];let U;e[37]!==d?(U=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=U):U=e[38];let Z;e[39]!==o||e[40]!==g||e[41]!==U?(Z=s.jsx(Cn,{id:"new-page-path",value:g,onChange:M,placeholder:U,disabled:o}),e[39]=o,e[40]=g,e[41]=U,e[42]=Z):Z=e[42];let Q;e[43]!==C||e[44]!==Z?(Q=s.jsxs("div",{className:"space-y-1.5",children:[C,Z]}),e[43]=C,e[44]=Z,e[45]=Q):Q=e[45];let he;e[46]!==o||e[47]!==P||e[48]!==d||e[49]!==b||e[50]!==l?(he=P&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(Er,{id:"new-page-template",value:b,onChange:w,templates:l??[],disabled:o})]}),e[46]=o,e[47]=P,e[48]=d,e[49]=b,e[50]=l,e[51]=he):he=e[51];let se;e[52]!==B?(se=B&&s.jsx("p",{className:"text-xs text-destructive",children:B}),e[52]=B,e[53]=se):se=e[53];let K;e[54]!==q||e[55]!==Q||e[56]!==he||e[57]!==se?(K=s.jsxs("div",{className:"space-y-4 py-4",children:[q,Q,he,se]}),e[54]=q,e[55]=Q,e[56]=he,e[57]=se,e[58]=K):K=e[58];let te;e[59]!==r?(te=()=>r(!1),e[59]=r,e[60]=te):te=e[60];let be;e[61]!==d?(be=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=be):be=e[62];let ue;e[63]!==o||e[64]!==te||e[65]!==be?(ue=s.jsx(De,{type:"button",variant:"outline",onClick:te,disabled:o,children:be}),e[63]=o,e[64]=te,e[65]=be,e[66]=ue):ue=e[66];let me;e[67]!==o||e[68]!==m||e[69]!==g?(me=!m.trim()||!g.trim()||o,e[67]=o,e[68]=m,e[69]=g,e[70]=me):me=e[70];let xe;e[71]!==o||e[72]!==d?(xe=o?s.jsxs(s.Fragment,{children:[s.jsx(Pt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=xe):xe=e[73];let ve;e[74]!==me||e[75]!==xe?(ve=s.jsx(De,{type:"submit",disabled:me,children:xe}),e[74]=me,e[75]=xe,e[76]=ve):ve=e[76];let re;e[77]!==ue||e[78]!==ve?(re=s.jsxs(Gr,{children:[ue,ve]}),e[77]=ue,e[78]=ve,e[79]=re):re=e[79];let ee;e[80]!==z||e[81]!==K||e[82]!==re||e[83]!==O?(ee=s.jsx(ss,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:z,children:[O,K,re]})}),e[80]=z,e[81]=K,e[82]=re,e[83]=O,e[84]=ee):ee=e[84];let fe;return e[85]!==S||e[86]!==n||e[87]!==ee?(fe=s.jsx(rs,{open:n,onOpenChange:S,children:ee}),e[85]=S,e[86]=n,e[87]=ee,e[88]=fe):fe=e[88],fe}function oi(t){const e=pe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Ne();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const m=Qn(h);let p;e[4]!==m?(p=Cr((k,P)=>m.mutate({blockKey:k,data:P})),e[4]=m,e[5]=p):p=e[5];const j=p;let g;e[6]!==o||e[7]!==c?(g=Nr(c,o),e[6]=o,e[7]=c,e[8]=g):g=e[8];const{resolveType:E,props:b,title:w}=g;if(!E){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let P;return e[11]!==k?(P=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=P):P=e[12],P}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==E||e[15]!==w?(y={mode:"saved",blockKey:o,resolveType:E,title:w},e[13]=o,e[14]=E,e[15]=w,e[16]=y):y=e[16];let v;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==b||e[23]!==m.isPending||e[24]!==j||e[25]!==N||e[26]!==y||e[27]!==r?(v=s.jsx(Tr,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:b,isCreating:m.isPending,onCreate:li,onSaveReferencedBlock:j,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=b,e[23]=m.isPending,e[24]=j,e[25]=N,e[26]=y,e[27]=r,e[28]=v):v=e[28],v}async function li(){}function ci(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Fn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:ci(t.error)}}function di(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 ui(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=di(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const mi="https://github.com/decocms/blocks";function fi(){const t=pe.c(14),e=Ne();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Qs,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Un,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(De,{size:"sm",asChild:!0,children:s.jsxs("a",{href:mi,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(tn,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function pi(t){const e=pe.c(15),{source:n,onRetry:r}=t,i=Ne();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Jr,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(De,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let m;return e[11]!==l||e[12]!==o||e[13]!==h?(m=s.jsx(tn,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=m):m=e[14],m}const hi=x.lazy(()=>Us(()=>import("./sections-editor-BHfMW6Ts.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=Qt(),{currentBranch:c,taskId:o}=St(),d=ns(),h=Xt(),m=os(),p=d.lifecycle.phase==="running",j=h.previewUrl;let g;e[0]!==c||e[1]!==l||e[2]!==j||e[3]!==o||e[4]!==n?(g=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:j}:null,e[0]=c,e[1]=l,e[2]=j,e[3]=o,e[4]=n,e[5]=g):g=e[5];const E=g;let b;e[6]!==p?(b={fetchEnabled:p},e[6]=p,e[7]=b):b=e[7];const w=en(E,b);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=Xn(E,N),v=ui({lifecyclePhase:d.lifecycle.phase,decofile:Fn(w),meta:Fn(y),hasEditableContent:hr(w.data,y.data),fastPreviewActive:Gn(n).runtime==="cms"}),k=gi;if(v.kind==="loading"){let C;return e[10]===Symbol.for("react.memo_cache_sentinel")?(C=k(s.jsx(Hs,{})),e[10]=C):C=e[10],C}if(v.kind==="empty"){let C;return e[11]===Symbol.for("react.memo_cache_sentinel")?(C=k(s.jsx(fi,{})),e[11]=C):C=e[11],C}if(v.kind==="error"){let C;e[12]!==w||e[13]!==h||e[14]!==y||e[15]!==v.source?(C=()=>{if(v.source==="sandbox"){h.retry();return}Promise.all([w.refetch(),y.refetch()])},e[12]=w,e[13]=h,e[14]=y,e[15]=v.source,e[16]=C):C=e[16];const M=C;let U;return e[17]!==M||e[18]!==v.source?(U=k(s.jsx(pi,{source:v.source,onRetry:M})),e[17]=M,e[18]=v.source,e[19]=U):U=e[19],U}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=C=>k(s.jsx("div",{className:"h-full min-h-0",children:C})),e[20]=P):P=e[20];const D=P,S=m.state.target;if(S?.kind==="loader"&&w.data&&y.data){const C=c??"",M=j??null;let U;return e[21]!==w.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==C||e[25]!==M||e[26]!==S.key||e[27]!==n?(U=D(s.jsx(oi,{orgSlug:l.slug,virtualMcpId:n,branch:C,previewUrl:M,meta:y.data,decofile:w.data,blockKey:S.key})),e[21]=w.data,e[22]=y.data,e[23]=l.slug,e[24]=C,e[25]=M,e[26]=S.key,e[27]=n,e[28]=U):U=e[28],U}let V;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(V=S||!c?null:Zn(es(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=V):V=e[33];const z=V;let B="/",L=null,O=null;S?.kind==="page"?(B=S.path,L=S.key):S?.kind==="section"?O=S.key:z&&(B=z.path,L=z.pageKey);const I=L?`page:${L}`:O?`section:${O}`:`path:${B}`;let _;e[34]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(Pt,{className:"size-5 text-muted-foreground"})}),e[34]=_):_=e[34];const $=c??"",Y=j??void 0,J=O?null:u,q=!!L&&m.state.editSeoPageKey===L;let X;return e[35]!==O||e[36]!==L||e[37]!==B||e[38]!==I||e[39]!==i||e[40]!==l.slug||e[41]!==J||e[42]!==q||e[43]!==$||e[44]!==Y||e[45]!==n||e[46]!==m.consumeEditSeo||e[47]!==m.setFocusedBlock||e[48]!==m.setVariantOverride?(X=D(s.jsx(x.Suspense,{fallback:_,children:s.jsx(hi,{orgSlug:l.slug,virtualMcpId:n,branch:$,previewReady:!0,previewUrl:Y,currentPath:B,activePageBlockKey:L,activeGlobalBlockKey:O,externalSelection:J,initialEditSeo:q,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:i},I)})),e[35]=O,e[36]=L,e[37]=B,e[38]=I,e[39]=i,e[40]=l.slug,e[41]=J,e[42]=q,e[43]=$,e[44]=Y,e[45]=n,e[46]=m.consumeEditSeo,e[47]=m.setFocusedBlock,e[48]=m.setVariantOverride,e[49]=X):X=e[49],X}function gi(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Dn(t){const e=pe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Ne(),c=Xr(),o=Rr(n);let d;e[0]!==o||e[1]!==r?(d=Lr(o,Zr(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:m}=Qt(),{currentBranch:p,taskId:j}=St(),E=Xt().previewUrl;let b;e[3]!==p||e[4]!==m.slug||e[5]!==E||e[6]!==j||e[7]!==n?(b=p?{orgSlug:m.slug,virtualMcpId:n,branch:p,threadId:j??null,previewUrl:E}:null,e[3]=p,e[4]=m.slug,e[5]=E,e[6]=j,e[7]=n,e[8]=b):b=e[8];const N=en(b),y=p??"";let v;e[9]!==m.slug||e[10]!==y||e[11]!==n?(v={orgSlug:m.slug,virtualMcpId:n,branch:y},e[9]=m.slug,e[10]=y,e[11]=n,e[12]=v):v=e[12];const{save:k,flush:P}=Or(v),D=N.data?.[r],S=N.data===void 0&&N.isLoading,V=N.data!==void 0&&D===void 0,z=!p||V||S;let B;e[13]!==D?(B=D===void 0?"":JSON.stringify(D,null,2),e[13]=D,e[14]=B):B=e[14];const L=B;let O;e[15]!==r||e[16]!==z||e[17]!==k?(O=q=>{if(z)return;let X;try{X=JSON.parse(q)}catch{return}X===null||typeof X!="object"||Array.isArray(X)||k(r,X)},e[15]=r,e[16]=z,e[17]=k,e[18]=O):O=e[18];const I=O;let _;e[19]!==P?(_=()=>({flush:P}),e[19]=P,e[20]=_):_=e[20],x.useImperativeHandle(u,_);let $;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?($=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(De,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(Yr,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=$):$=e[25];let Y;e[26]!==N.data||e[27]!==P||e[28]!==L||e[29]!==S||e[30]!==V||e[31]!==r||e[32]!==z||e[33]!==I||e[34]!==l?(Y=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(Pt,{className:"size-5 text-muted-foreground"})}):V?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(Qr,{code:L,language:"json",readOnly:z,height:"100%",onChange:q=>I(q??""),onSave:q=>{I(q),P()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=P,e[28]=L,e[29]=S,e[30]=V,e[31]=r,e[32]=z,e[33]=I,e[34]=l,e[35]=Y):Y=e[35];let J;return e[36]!==$||e[37]!==Y?(J=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[$,Y]}),e[36]=$,e[37]=Y,e[38]=J):J=e[38],J}function fs(t){return t.contentEditingEnabled&&!t.isMobile}function vi(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function bi(t,e){return t==="blocks"?"preview":e?"blocks":t}function xi(t){return fs({contentEditingEnabled:ts(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function yi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const wi=500,ki={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Kn=1,qt=["desktop","mobile","tablet"],zn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Pi(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 et(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Wt(t,e){try{return new URL(t,e).href}catch{return null}}function Si(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function ji(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Ei(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function Ni(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ti({virtualMcpId:t}){const e=Ne(),n=wr(),{currentBranch:r,taskId:i,virtualMcpId:u}=St(),l=os(),c=cr(u===t?t:null),o=Gn(t),d=ea(c?.metadata?.ui?.layout??null),h=ts(d),m=fs({contentEditingEnabled:h,isMobile:n}),[p,j]=x.useState(()=>xi({cmsMode:d,isMobile:n})),[g,E]=x.useState("desktop"),[b,w]=x.useState(null),[N,y]=x.useState(null),v=x.useRef(null),k=x.useRef(null),[P,D]=x.useState(!1),S=x.useRef(null),V=()=>{S.current?.flush(),D(!1)},z=()=>D(a=>(a&&S.current?.flush(),!a)),[B,L]=x.useState({width:0,height:0}),[O,I]=x.useState(!1),[_,$]=x.useState(""),Y=x.useRef(null),[J,q]=x.useState(!1),[X,C]=x.useState(),[M,U]=x.useState(null),[Z,Q]=x.useState(null),[he,se]=x.useState(null),[K,te]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[be,ue]=x.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[me,xe]=x.useState({}),[ve,re]=x.useState(!1),ee=x.useRef(null),fe=()=>{re(!0),ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>re(!1),15e3)},ne=()=>{ee.current&&(clearTimeout(ee.current),ee.current=null),re(!1)},{org:ae}=Qt(),le=ns(),ge=Xt(),jt=ge.vmEntry,rt=le.lifecycle.phase,{url:ie}=gr(t),Se=ie??ge.previewUrl,Ve=!!ie||rt==="running",je=c?.id===t?mr(c.metadata):null,ye=!ie&&c?.id===t&&o.runtime==="cms",qe=o.projectDefault==="cms",Te=Mr({sandboxUrl:Se,previewServerUrl:je,fastPreviewActive:ye}),Ce=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:Se}:null,Re=en(Ce,{fetchEnabled:Ve}),Le=Xn(Ce,{fetchEnabled:Ve}),W=Re.data,R=Le.data,G=W?vr(W).sort((a,f)=>a.name.localeCompare(f.name)):[],We=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r}:null,at=ai(We),Ge=W&&R?br(W,R):[],Je=W&&R?_r(R,W,"loaders"):[],sn=_?(()=>{const a=_.toLowerCase();return G.map(f=>({page:f,score:Ei(f.name,f.path,a)})).filter(({score:f})=>f>0).sort((f,T)=>T.score-f.score||f.page.path.length-T.page.path.length).map(({page:f})=>f)})():G,rn=Ge.filter(a=>{if(!_)return!0;const f=_.toLowerCase();return a.name.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),an=m?Je:[],on=an.filter(a=>{if(!_)return!0;const f=_.toLowerCase();return a.title.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),it=Z?Je.find(a=>a.key===Z)??null:null,Ae=Zt,Et=M||Z?null:xr(G,K,be),H=Et?.key??null,Ke=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??H,ot=Et?.path??null,ze=(H?me[H]:void 0)??{},we=Be(K,ze),Nt={};if(Ve&&Se&&R&&W){const a=Ar(R,"loaders"),f=H?W[H]:void 0,T=Ca(f,W,oe=>a.has(oe)),A=Sa(T);for(const oe of st(K)){if(oe.type!=="param")continue;const _e=wa(K,oe.name,T),ke=Na(_e,a,A);ke.length>0&&(Nt[oe.name]=ke)}}const lt=t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,ln=W&&H?yr(W,H,0):[],cn=W?Br(ln,W):[],Tt=cn.map(a=>a.isSavedBlock?a.label:""),Ct=cn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Rt=ln.map(a=>Jt(a,W??{})),dn=x.useRef(null),Ee=x.useRef(null),ps=le.status.state==="paused",Lt=le.phase,un=$r({claimPhase:Lt,lifecycle:le.lifecycle}),$e=ge.previewState,hs=ge.userStopped,gs=Ur(ae.slug,t??"",r??""),{url:Fe}=Ir(ye&&t&&r?{orgSlug:ae.slug,virtualMcpId:t,branch:r,previewServerUrl:je??null,path:we}:null),vs=qe&&o.runtime==="sandbox",F=oa({previewState:$e,progressStatus:un.status,previewServerUrl:je,fastPreviewActive:ye,fastPreviewReady:!!Fe,codingSession:vs,localPreviewUrl:ie}),ct=F.mode!=="none",bs=F.mode==="production"&&F.iframeBase?et(F.iframeBase):null,Ie=F.mode==="production"?bs:et(Se),xs=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Ye=ie?F.mode==="sandbox"&&m&&p==="blocks":F.mode==="production"&&ye&&xs&&m&&p==="blocks",mn=x.useRef(null),{pin:ys,effective:ws}=Si(mn.current,{inPlaceRenderActive:Ye,draftPreviewUrl:Fe,resolvedPath:we});mn.current=ys;const Oe=Pi(F.mode==="sandbox"?bt(Tn(he??Wt(we,F.iframeBase)??F.iframeBase,g),l.state.variantOverride??[]):F.mode==="production"?bt(Tn(Dr(he??ws??Wt(we,F.iframeBase)??F.iframeBase,F.showWakingPill?Kr:null),g),l.state.variantOverride??[]):null),fn=Fe??(F.iframeBase?Wt(we,F.iframeBase):null),ks=F.mode==="production"?fn?bt(fn,l.state.variantOverride??[]):null:Oe??F.iframeBase,Ps=()=>{const a=ks;a&&window.open(a,"_blank","noopener")},dt=t&&r?es(ae.slug,t,r):null,ut=a=>{dt&&Hr(dt,a)},ce=l.state.target;x.useEffect(()=>{if(!(!ce||!Te||!R))if(ce.kind==="page"){const a=me[ce.key]??{};Ee.current=Be(ce.path,a),U(null),Q(null),se(null),ue(ce.key),te(ce.path),ut({path:ce.path,pageKey:ce.key,params:a})}else if(ce.kind==="loader")Ee.current=null,U(null),Q(ce.key),se(null);else{const a=Ge.find(f=>f.key===ce.key);if(a){Ee.current=null;const f=En(R);Q(null),U(a),se(Nn(Te,f,a.key))}}},[ce,Te,R,me]),x.useEffect(()=>{!H||ot===null||ce?.kind==="page"&&ce.key===H&&ce.path===ot||l.selectTarget({kind:"page",key:H,path:ot})},[H,ot,ce]);const[pn,Ss]=x.useState(null);if($e.kind==="iframe"&&pn!==$e.previewUrl){const a=pn!==null;Ss($e.previewUrl);const f=dt?Zn(dt):null;if(f){if(Ee.current=Be(f.path,f.params),te(f.path),ue(f.pageKey),se(null),U(null),Q(null),f.pageKey&&Object.keys(f.params).length>0){const T=f.pageKey;xe(A=>({...A,[T]:f.params}))}}else a&&(Ee.current=null,te("/"),se(null),ue(null),U(null),Q(null))}dn.current=Oe;const hn=ua({iframeRef:v,src:F.mode==="sandbox"?Oe:null,active:F.mode==="sandbox"}),gn=x.useRef(null);x.useEffect(()=>{if(!Fe||!Oe||gn.current===Fe)return;gn.current=Fe;const a=v.current;a&&a.getAttribute("src")!==Oe&&(fe(),a.src=Oe)},[Fe,Oe]);const vn=()=>{const a=v.current?.contentWindow,f=Ie;if(!a||!f||!W||!H)return;const T=W[H];if(!T||typeof T!="object")return;const A=zr({previewBaseUrl:f,pageBlock:T,decofile:W,path:we,pathTemplate:K});if(!A)return;const oe=bt(A.src,Fr(l.state.variantOverride??[],H));a.postMessage({type:"cms-editor::render",src:oe,body:A.body},f)},Ot=x.useRef(null);x.useEffect(()=>{if(!Ye||M||Z||!H||!W){Ot.current=null;return}const a={nav:JSON.stringify({page:H,path:we,pathTemplate:K}),content:JSON.stringify(W)},f=ji(Ot.current,a);Ot.current=a,f&&vn()},[W,Ye,M,Z,H,we,K]);const _t=x.useRef(null);x.useEffect(()=>{if(!Ye||M||Z||!H||!W){_t.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),f=_t.current;_t.current={page:H,sig:a},!(!f||f.page!==H||f.sig===a)&&vn()},[l.state.variantOverride,Ye,M,Z,H]);const js=!!t&&!!r&&!le.notFound&&!hs&&!ps&&(Lt?.kind==="ready"||rt!=="idle"),de=yi({editingMode:p,sandboxDisplay:F.mode==="sandbox",blocksEditingEnabled:m});x.useEffect(()=>{const a=Ie;if(!a)return;const f=T=>{if(T.origin===a)if(T.data?.type==="visual-editor::element-clicked"){const A=ma.safeParse(T.data.payload);A.success&&w(A.data)}else if(T.data?.type==="cms-editor::section-clicked"){const A=ha.safeParse(T.data.payload);A.success&&y({index:A.data.sectionIndex,seq:A.data.clickSeq})}else T.data?.type==="cms-editor::render-start"?fe():T.data?.type==="cms-editor::render-end"?(ne(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Ct,keys:Rt},a)):T.data?.type==="cms-editor::render-error"&&ne()};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[Ie,Tt,Ct,Rt]);const bn=()=>{const a=v.current?.contentWindow,f=et(Se);!a||!f||a.postMessage({type:"visual-editor::activate",script:fa},f)},Es=()=>{const a=v.current?.contentWindow,f=et(Se);!a||!f||a.postMessage({type:"visual-editor::deactivate"},f)},At=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||(a.postMessage(F.mode==="production"||ie?{type:"editor::inject",args:{script:_n}}:{type:"visual-editor::activate",script:_n},f),a.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Ct,keys:Rt},f))},Ns=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||a.postMessage({type:"cms-editor::deactivate"},f)},Ts=()=>{const a=v.current?.contentWindow,f=Ie;!a||!f||(a.postMessage({type:"cms-editor::clear-hover"},f),a.postMessage({type:"visual-editor::clear-hover"},f))},mt=a=>{if(a==="blocks"&&!m)return;const f=p;!n&&a!==f&&(a==="blocks"?k.current?.resize("30%"):k.current?.collapse()),j(a),w(null),y(null),a!=="blocks"&&Q(null),f==="visual"&&Es(),a==="visual"&&bn(),f==="blocks"&&a!=="blocks"&&Ns(),a==="blocks"&&At()},Cs=()=>{mt(vi(p,m))},Rs=()=>{mt(bi(p,m))};qr(()=>{const a=v.current;if(!a)return;fe();const f=document.activeElement,T=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ni(a,dn.current);let A;const oe=()=>{clearTimeout(A),a.tabIndex=T,a.style.pointerEvents="";const _e=document.activeElement;(!_e||_e===document.body||_e===a)&&f?.focus(),a.removeEventListener("load",oe)};a.addEventListener("load",oe),A=setTimeout(oe,3e3)});const Ls=()=>{const a=qt.indexOf(g);E(qt[(a+1)%qt.length])},Bt=(a,f)=>{if(!H)return;const T=H,A={...ze,[a]:f};Ee.current=Be(K,A),xe(oe=>({...oe,[T]:A})),ut({path:K,pageKey:T,params:A})},Os=si({iframeBase:F.iframeBase,resolvedPath:we,activeGlobalSectionName:M?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),xn=a=>{const f=me[a.key]??{},T=Be(a.path,f);(M||Ae(T)!==Ae(we))&&fe(),Ee.current=T,U(null),Q(null),se(null),y(null),ue(a.key),te(a.path),ut({path:a.path,pageKey:a.key,params:f}),l.selectTarget({kind:"page",key:a.key,path:a.path})},_s=a=>{if(!Te||!R){Sn.error(e("sandbox.preview.previewMetadataNotReady"));return}fe(),Ee.current=null;const f=En(R),T=Nn(Te,f,a.key);U(a),Q(null),se(T),y(null),l.selectTarget({kind:"section",key:a.key})},As=a=>{m&&(U(null),Q(a.key),se(null),mt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},Bs=async({name:a,path:f,templateKey:T})=>{if(!t||!r)return;const A=Yn(f);if(A){C(A);return}const oe=f.trim().startsWith("/")?f.trim():`/${f.trim()}`;if(G.some(ke=>Ae(ke.path)===Ae(oe))){C(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let _e;if(T&&(_e=W?.[T],!_e)){C(e("sandbox.preview.templateNoLongerExists"));return}C(void 0);try{const ke=await at.mutateAsync({name:a,path:oe,template:_e});q(!1),Sn.success(e("sandbox.preview.pageCreated",{name:a})),await ta(wi),xn({key:ke.key,name:ke.name,path:ke.path}),mt("blocks")}catch(ke){C(ke instanceof Error?ke.message:e("sandbox.preview.failedToCreatePage"))}},ft=ct&&(js||F.mode==="production"),$s=ri({showPreviewToolbar:ft,contentEditingEnabled:h}),pt=()=>{I(!1),$("")},$t=M?.name??it?.title??Et?.name,Ft=Re.isPending||Le.isPending,Mt=Ft?et(F.iframeBase):$t,ht=M?`section:${M.key}`:Z?`loader:${Z}`:H?`page:${H}`:void 0,Fs=ft?$s?s.jsxs(ir,{open:O,onOpenChange:a=>{I(a),a||$("")},children:[s.jsx(or,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:Ft?Mt??void 0:M||it?$t:[$t,K].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[M&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(Xs,{size:11}),e("sandbox.preview.globalBadge")]}),it&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(Zs,{size:11}),e("sandbox.preview.loaderBadge")]}),Mt&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Mt}),!Ft&&!M&&!it&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:K}),s.jsx(Js,{size:12,className:Dt("shrink-0 transition-transform",O&&"rotate-180")})]})})}),s.jsxs(lr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(Vn,{shouldFilter:!1,defaultValue:ht,children:[s.jsx(qn,{value:_,onValueChange:a=>{$(a),Y.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(Hn,{ref:Y,className:"max-h-80",children:[s.jsx(Wn,{children:G.length===0&&Ge.length===0&&an.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),sn.length>0&&s.jsx(tt,{children:sn.map(a=>s.jsxs(nt,{value:`page:${a.key}`,"aria-current":ht===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{pt(),xn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),rn.length>0&&s.jsx(tt,{heading:e("sandbox.preview.globalComponents"),children:rn.map(a=>s.jsx(nt,{value:`section:${a.key}`,"aria-current":ht===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),_s(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),on.length>0&&s.jsx(tt,{heading:e("sandbox.preview.globalLoaders"),children:on.map(a=>s.jsx(nt,{value:`loader:${a.key}`,"aria-current":ht===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),As(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!M&&!Z&&st(K).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:st(K).map((a,f)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${f}`);const T=Nt[a.name];return T&&lt?s.jsx(Ha,{sources:T,template:K,paramName:a.name,value:ze[a.name]??"",sandboxRef:lt,onCommit:A=>Bt(a.name,A)},`${H}:${a.name}`):s.jsx(ti,{name:a.name,value:ze[a.name]??"",onCommit:A=>Bt(a.name,A)},`${H}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(De,{variant:"ghost",className:"w-full justify-start",onClick:()=>{pt(),C(void 0),q(!0)},children:[s.jsx(ar,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Os}):null,yn=ft||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Qe,{onClick:Ls,"aria-label":e(zn[g]),children:g==="mobile"?s.jsx(er,{size:16}):g==="tablet"?s.jsx(tr,{size:16}):s.jsx(nr,{size:16})})}),s.jsx(It,{children:e(zn[g])})]}),Fs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(Qe,{onClick:Ps,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(Un,{size:16})})})]}):null,Ms=F.mode==="sandbox",gt=ki[g],vt=g==="desktop"&&(B.width===0||B.width>=gt.width+2*Kn),wn=vt?1:Math.min(B.width>0?B.width/(gt.width+2*Kn):1,1),Ds=vt?{width:"100%",height:"100%"}:{width:`${gt.width}px`,height:B.height>0?`${B.height/wn}px`:`${gt.height}px`,transform:`scale(${wn})`,transformOrigin:"top center"},kn=s.jsxs(s.Fragment,{children:[Ms&&(ft||h)&&s.jsx(Qe,{onClick:Cs,"aria-pressed":de==="visual","aria-label":e("sandbox.preview.visualEditor"),active:de==="visual",children:s.jsx(jn,{size:16})}),m&&s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Qe,{onClick:Rs,"aria-pressed":de==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:de==="blocks",children:s.jsx(rr,{size:16})})}),s.jsx(It,{children:e("sandbox.preview.blocksEditor")})]}),Ke&&s.jsxs(Kt,{children:[s.jsx(zt,{asChild:!0,children:s.jsx(Qe,{onClick:z,"aria-pressed":P,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:P,children:s.jsx(sr,{size:16})})}),s.jsx(It,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Ks=!!Z&&de==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[lt&&Object.entries(Nt).map(([a,f])=>(ze[a]??"")===""?s.jsx(Za,{sources:f,template:K,paramName:a,sandboxRef:lt,onFill:T=>Bt(a,T)},`${H}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(Pn.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:yn}),children:yn}),s.jsx(Pn.Toolbar.Right.Portal,{fallback:kn,children:kn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Ks?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Mn,{virtualMcpId:t,externalSelection:N,onViewJsonFile:z}),P&&Ke&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Dn,{ref:S,virtualMcpId:t,pageKey:Ke,onClose:V})})]}):s.jsxs(Rn,{orientation:"horizontal",disabled:de!=="blocks",className:"relative isolate",children:[s.jsx(xt,{ref:k,id:"preview-blocks-editor",defaultSize:de==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:de==="blocks"&&s.jsx(Mn,{virtualMcpId:t,externalSelection:N,onViewJsonFile:z})}),de==="blocks"&&s.jsx(Ln,{withHandle:!0}),s.jsx(xt,{id:"preview-canvas",defaultSize:de==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(Rn,{orientation:"horizontal",disabled:!(P&&Ke),children:[s.jsx(xt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const f=()=>L(A=>A.width===a.clientWidth&&A.height===a.clientHeight?A:{width:a.clientWidth,height:a.clientHeight});f();const T=new ResizeObserver(f);return T.observe(a),()=>T.disconnect()},className:Dt("h-full relative overflow-clip flex justify-center",ct&&!vt&&"bg-muted/30"),children:[(ve||gs)&&ct&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),F.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"starting",progress:un,claimPhase:Lt})}),!ie&&$e.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"suspended",onResume:ge.resume})}),!ie&&$e.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Ht,{kind:"errored",error:$e.error,onRetry:ge.retry,connectionsHref:`/${ae.slug}/settings/connections`})}),F.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(Pt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),de==="visual"&&!b&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(jn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),de==="visual"&&b&&s.jsx(ba,{element:b,onDismiss:()=>w(null)}),ct&&Oe&&s.jsx("div",{className:Dt("shrink-0",!vt&&"border-x border-border bg-background shadow-sm"),style:Ds,onMouseLeave:Ts,children:s.jsx("iframe",{ref:v,src:Oe,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:hn.handleError,onLoad:()=>{if(hn.handleLoad(),ne(),F.mode!=="sandbox"||ie){(F.mode==="production"&&!F.showWakingPill||ie)&&de==="blocks"&&At();return}if(Vs("vm_preview_loaded",{view_mode:de,vm_id:jt?.sandboxHandle??null}),!M)try{const a=v.current?.contentWindow?.location?.pathname;if(!a)return;const f=Ee.current;if(f!==null&&(Ee.current=null,Ae(a)!==Ae(f))||Ae(a)===Ae(we))return;te(a),ut({path:a,pageKey:be,params:ze})}catch{}de==="visual"&&bn(),de==="blocks"&&At()}},F.iframeBase)})]})}),P&&Ke&&s.jsxs(s.Fragment,{children:[s.jsx(Ln,{withHandle:!0}),s.jsx(xt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Dn,{ref:S,virtualMcpId:t,pageKey:Ke,onClose:V})})]})]})})]})}),s.jsx(ii,{open:J,onOpenChange:q,isPending:at.isPending,error:X,templates:G,onSubmit:Bs})]})}function Ci(t){const e=pe.c(22),{virtualMcpId:n}=t,r=Ne(),i=dr(n),{activeTask:u,taskId:l,currentBranch:c}=St(),o=ra(l),[d,h]=x.useState(!1);if(sa({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Vt(i?.metadata),threadHasRepo:Vt(o)||Vt(u?.metadata)})==="none"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(On,{className:"size-7 text-foreground"})}),e[0]=j):j=e[0];let g;e[1]!==r?(g=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=g):g=e[2];let E;e[3]!==r?(E=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=E):E=e[4];let b,w;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),w=s.jsx(On,{className:"size-4"}),e[5]=b,e[6]=w):(b=e[5],w=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(De,{onClick:b,children:[w,N]}),e[9]=N,e[10]=y):y=e[10];let v;e[11]!==g||e[12]!==E||e[13]!==y?(v=s.jsx(tn,{className:"h-full",image:j,title:g,description:E,actions:y}),e[11]=g,e[12]=E,e[13]=y,e[14]=v):v=e[14];let k;e[15]!==d?(k=s.jsx(na,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let P;return e[17]!==v||e[18]!==k?(P=s.jsxs(s.Fragment,{children:[v,k]}),e[17]=v,e[18]=k,e[19]=P):P=e[19],P}let p;return e[20]!==n?(p=s.jsx(Ti,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function Hc(){const t=pe.c(2),e=aa();let n;return t[0]!==e?(n=s.jsx(qs,{tabId:"site-editor",children:s.jsx(Ws,{feature:"cms",children:s.jsx(Ci,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{Hc as default};
@@ -0,0 +1 @@
1
+ import{c as s,j as e,M as l}from"./index-D6ZKj0d3.js";import{C as u}from"./index-ClRj6-3N.js";import{AppViewContent as c}from"./project-app-view-4F1NzKg3.js";import{S as d}from"./settings-tab-BbBuUb6A.js";import{a as f}from"./repository-binding-DU5xCC2f.js";import"./use-mobile-DsXG93j_.js";import"./thread-button-3YyJ_qZE.js";import"./agent-icon-CqZASRJE.js";import"./AlertCircle-DxGlheNv.js";import"./Tool01-B-ugA2BM.js";import"./ArrowUp-B_1yzk0u.js";import"./ArrowLeft-C5TDkvfy.js";import"./LinkBroken01-aiXtOyEy.js";import"./ShoppingBag01-CZ0mlBHZ.js";import"./ZoomOut-DtT7NZBX.js";import"./Building02-aupVb9bk.js";import"./CheckCircle-Ck2nYEsD.js";import"./ChevronUp-CiQJnmx3.js";import"./ChevronSelectorVertical-vEYxYM2o.js";import"./UserSquare-Dbdn52Lc.js";import"./Copy01-CSQiL-8m.js";import"./CreditCard01-Dbsq9vqA.js";import"./DotsVertical-D5VxjRuG.js";import"./Image01-CRH49dh2.js";import"./Globe04-BYAnRXKE.js";import"./SwitchHorizontal01-CUO4Tr7k.js";import"./Key01-DlUQl2kb.js";import"./Link01-CZ9mTgFL.js";import"./LinkExternal01-BNOHDQ-X.js";import"./Monitor01-Dibe2H0E.js";import"./Sun-aaILGBFQ.js";import"./Play-JhD_8p9T.js";import"./Plus-B-VohzJ4.js";import"./SearchMd-B4A8PIUy.js";import"./Trash01--ZO2TG0s.js";import"./Upload01-CNXMP8gQ.js";import"./User01-DqG0FbTZ.js";import"./Users01-Co0Q_ns9.js";import"./XClose-BHLC9coi.js";import"./X-CGpWJ0hX.js";import"./use-chat-layout-state-BXUQI_Uj.js";import"./use-file-configs-CGY_ert6.js";import"./use-organization-settings-XOD9ESkO.js";import"./schema-DBi1obJz.js";import"./task-board-DFP-fne3.js";import"./site-slug-DebpOoQq.js";import"./thread-route-CaKdVoOw.js";import"./use-panel-navigate-vbXDgGYl.js";import"./use-project-scope-KzlP3xju.js";import"./thread-intent-o4o-MA3S.js";import"./use-mcp-client-BhAo2QDs.js";import"./auth-DK9f1ZTH.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-HwFSe36n.js";import"./slugify-CEUa2lfQ.js";import"./sheet-BF6gLW4J.js";import"./tooltip-ud1E4lWe.js";import"./index-QSc3eGTu.js";import"./toolbar-icon-button-DnfVpnpi.js";import"./shell-layout-_Pn7cxIp.js";import"./avatar-CYsgyDk8.js";import"./use-clock-tick-Byjn6Ipz.js";import"./dialog-CaizaKQW.js";import"./command-Bvxnety0.js";import"./index-CnLkSXZ0.js";import"./integration-icon-BXBLtmJk.js";import"./project-icon-C0Nw8mPG.js";import"./new-project-dialog-pM62WBis.js";import"./input-BR2ZOmYv.js";import"./label-SS4h69R5.js";import"./repository-import-picker-DbT-KPfC.js";import"./use-navigate-to-agent-_Fy5-uKx.js";import"./repository-picker-CbM65WpS.js";import"./useInfiniteQuery-jncr8EKF.js";import"./infiniteQueryObserver-kLjXQrHB.js";import"./collection-search-BMeq1F4t.js";import"./use-debounced-value-DkB41yRZ.js";import"./required-auth-layout-UMnYz1o3.js";import"./autosend-BV2PsimL.js";import"./use-org-sso-IZ5t5non.js";import"./resizable-CMUQk1zK.js";import"./icon-button-BZdEBEfj.js";import"./tool-namespace-BaO4I7fR.js";import"./use-mcp-tools-Bv_07i-f.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DXGnetCy.js";import"./types-C52Y_JT0.js";import"./chat-context-BEKkV-Ll.js";import"./use-decopilot-events-C_UyGftl.js";import"./use-ai-providers-BLkItyxK.js";import"./use-chat-navigation-0CERUZel.js";import"./location-BjlyegC2.js";import"./task-route-BierUG4Q.js";import"./core.esm-CFyPPg_k.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-CJUuykr1.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-CpErFrQ1.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-BAV2VQJS.js";import"./authenticate-and-persist-oauth-JHbhZWlI.js";import"./mcp-oauth-3A9tYRyL.js";import"./track-D9xSFomP.js";import"./extract-connection-data-WKz3D__i.js";import"./connection-CeKZpSJo.js";import"./url-slug-DA14zDBr.js";import"./build-improve-prompt-doc-CbyMBFhr.js";import"./empty-state-C3-ZBqZ7.js";import"./use-date-fns-locale-yEAg4rlf.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-connection-BLNfspiw.js";import"./alert-dialog-D_aRnY2J.js";import"./textarea-DncV9TJN.js";import"./use-debounced-autosave-BbQxm-LP.js";import"./add-connection-dialog-Bs6jGGvh.js";import"./connection-card-BBsdybH0.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-Cn362UbS.js";import"./select-BimoKSOp.js";import"./index-BdQq_4o_.js";import"./connection-form-helpers-DTld_nTJ.js";import"./collection-tabs-Ba1MLgdh.js";import"./badge-80v1nRPK.js";import"./use-infinite-scroll-979kKqgG.js";import"./useSuspenseInfiniteQuery-rmy_OGLk.js";import"./file-type-icon-CDG1qAi8.js";import"./use-org-fs-Df2-ebn-.js";import"./checkbox-CvWHs1zK.js";import"./search-input-IgJHEtUf.js";import"./use-mcp-auth-status-D2S8OUYy.js";import"./use-mcp-prompts-DPLwYnKg.js";import"./utils-CVEq3hMx.js";import"./switch-DbiylKGt.js";import"./popover-B69wnZ0x.js";import"./scroll-area-DrC4kFvC.js";import"./optimistic-project-sidebar-views-Bui3Aln1.js";import"./virtual-mcp-y87s1o4x.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-1felyUvp.js";import"./use-secrets-DcZKciGM.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const g=l("/shell/$org/org-shell/agent-shell/projects/$agentId/views/$viewId");function w(){const t=s.c(7),{agentId:o,viewId:i}=g.useParams(),a=f(o);let m;t[0]!==a?.metadata?.ui?.layout?.tabs||t[1]!==i?(m=a?.metadata?.ui?.layout?.tabs?.find(n=>n.id===i),t[0]=a?.metadata?.ui?.layout?.tabs,t[1]=i,t[2]=m):m=t[2];const r=m;let p;return t[3]!==o||t[4]!==r||t[5]!==i?(p=r?e.jsx(c,{connectionId:r.view.appId,toolName:r.id,args:r.view.args},i):e.jsx(d,{virtualMcpId:o}),t[3]=o,t[4]=r,t[5]=i,t[6]=p):p=t[6],p}function oi(){const t=s.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(u.Content,{children:e.jsx(w,{})}),t[0]=o):o=t[0],o}export{oi as default};
@@ -1 +1 @@
1
- import{c as g,j as l,N as d,J as p,M as m}from"./index-QRiNSSRg.js";import{u as f}from"./use-main-panel-tabs-CKeJUbYl.js";import{a as I}from"./thread-route-1k2Am-5A.js";import{r as h}from"./use-panel-navigate-DLkRwPwU.js";const v=m("/shell/$org/org-shell/agent-shell/projects/$agentId");function P(o){const e=g.c(6),{children:u,tabId:c}=o,s=v.useParams(),t=s.agentId,n=I();let a;e[0]!==t||e[1]!==n?(a={virtualMcpId:t,taskId:n},e[0]=t,e[1]=n,e[2]=a):a=e[2];const{activeTab:i}=f(a);if(c==="code"?i==="code"||i.startsWith("code:"):i===c)return u;let r;return e[3]!==t||e[4]!==s.org?(r=l.jsx(d,{to:p.settings,params:{org:s.org,agentId:t},search:R,replace:!0}),e[3]=t,e[4]=s.org,e[5]=r):r=e[5],r}function R(o){return h({previous:o,destination:"agent"})}export{P as A};
1
+ import{c as g,j as l,N as d,J as p,M as m}from"./index-D6ZKj0d3.js";import{u as f}from"./use-main-panel-tabs-H7fQ4i6B.js";import{a as I}from"./thread-route-CaKdVoOw.js";import{r as h}from"./use-panel-navigate-vbXDgGYl.js";const v=m("/shell/$org/org-shell/agent-shell/projects/$agentId");function P(o){const e=g.c(6),{children:u,tabId:c}=o,s=v.useParams(),t=s.agentId,n=I();let a;e[0]!==t||e[1]!==n?(a={virtualMcpId:t,taskId:n},e[0]=t,e[1]=n,e[2]=a):a=e[2];const{activeTab:i}=f(a);if(c==="code"?i==="code"||i.startsWith("code:"):i===c)return u;let r;return e[3]!==t||e[4]!==s.org?(r=l.jsx(d,{to:p.settings,params:{org:s.org,agentId:t},search:R,replace:!0}),e[3]=t,e[4]=s.org,e[5]=r):r=e[5],r}function R(o){return h({previous:o,destination:"agent"})}export{P as A};