decocms 4.363.0 → 4.363.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/dist/client/assets/{AlertCircle-Df7Uu4Sr.js → AlertCircle-CgERhdh6.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BRLjJaJt.js → AreaChart-kU4sTinA.js} +2 -2
  3. package/dist/client/assets/{ArrowLeft-Ce4LVTaQ.js → ArrowLeft-BVx6AQzq.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-CuO69upc.js → ArrowRight-DZQert3q.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DmWBbOjK.js → ArrowUp-lpfNBlP2.js} +1 -1
  6. package/dist/client/assets/{Check-C1wq38_E.js → Check-DClZtAIP.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-DWvslkKl.js → CheckCircle-BGqFZ8sM.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-B76sbAXC.js → ChevronRight-BNfU55ld.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-C4wJ3zDR.js → ChevronSelectorVertical-ilm76_0p.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-B0KEDz5f.js → ChevronUp-CbF1Gmeo.js} +1 -1
  11. package/dist/client/assets/{Copy01-rsN5AnPv.js → Copy01-DiITYBuR.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-Cqs_Biv7.js → CreditCard01-Zpy-4Wu9.js} +1 -1
  13. package/dist/client/assets/Database01-zcGUPFsG.js +1 -0
  14. package/dist/client/assets/{DotsVertical-CBmzJDPB.js → DotsVertical-LmkOTjL4.js} +1 -1
  15. package/dist/client/assets/{Download01-zZEPtQ0U.js → Download01-C4blLpML.js} +1 -1
  16. package/dist/client/assets/ErrorBarContext-KbkdtIBU.js +1 -0
  17. package/dist/client/assets/{Eye-DFgd5114.js → Eye-Cd7v-liN.js} +1 -1
  18. package/dist/client/assets/File02-CceuR6rF.js +1 -0
  19. package/dist/client/assets/{GitBranch01-B7iymaqC.js → GitBranch01-Dil6c2wv.js} +1 -1
  20. package/dist/client/assets/{Globe01-Df6dZmsR.js → Globe01-BVji6jXS.js} +1 -1
  21. package/dist/client/assets/{HardDrive-CiahcooN.js → HardDrive-B4UY5qYp.js} +1 -1
  22. package/dist/client/assets/{Image01-CMpSR3RQ.js → Image01-CpXdMb8x.js} +1 -1
  23. package/dist/client/assets/{Key01-t3bX5YI3.js → Key01-BsAAVoJx.js} +1 -1
  24. package/dist/client/assets/{Link01-pX5C3rEv.js → Link01-OqB-2yPE.js} +1 -1
  25. package/dist/client/assets/{LinkExternal01-CzRiacvQ.js → LinkExternal01-DobnLseV.js} +1 -1
  26. package/dist/client/assets/{Monitor01-jzbehxNG.js → Monitor01-BTqHf-K4.js} +1 -1
  27. package/dist/client/assets/{Package-CiAH049d.js → Package-CCkk0w5h.js} +1 -1
  28. package/dist/client/assets/{Palette-CmMvG40G.js → Palette-BBWt8owf.js} +1 -1
  29. package/dist/client/assets/{Play-k9_JCuZW.js → Play-CPeIBqH_.js} +1 -1
  30. package/dist/client/assets/{Plus-Bac7Bl-V.js → Plus-DaErdsG1.js} +1 -1
  31. package/dist/client/assets/Printer-BG6NfeSZ.js +1 -0
  32. package/dist/client/assets/{SearchLg-iYej-M-S.js → SearchLg-DxQfk550.js} +1 -1
  33. package/dist/client/assets/{SearchMd-hxPQERkg.js → SearchMd-BNXjQ2BV.js} +1 -1
  34. package/dist/client/assets/Sector-D2wxgDkd.js +28 -0
  35. package/dist/client/assets/{Settings02-t15FjJbr.js → Settings02-DL8f5fN1.js} +1 -1
  36. package/dist/client/assets/{Share07-CJrTonmW.js → Share07-D1Sv14jA.js} +1 -1
  37. package/dist/client/assets/{Shield01-DS-tpugO.js → Shield01-BsobIEfQ.js} +1 -1
  38. package/dist/client/assets/{Stars01-ByE0-f1z.js → Stars01-f37Q7vDf.js} +1 -1
  39. package/dist/client/assets/{Sun-vdviKSpi.js → Sun-DjKz3VjB.js} +1 -1
  40. package/dist/client/assets/{XClose-DvenHyNp.js → SwitchHorizontal01-BIyO34Jw.js} +1 -1
  41. package/dist/client/assets/{Tool01-CmpQe3MS.js → Tool01-D6HOM_aJ.js} +1 -1
  42. package/dist/client/assets/{Tool02-BAA6OFl0.js → Tool02-BrfQeZRx.js} +1 -1
  43. package/dist/client/assets/{Trash01-C6vCLvEw.js → Trash01-DQjprOwc.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-fHRYAiew.js → TrendUp01-DIz6JZwT.js} +1 -1
  45. package/dist/client/assets/{Upload01-lE597uPz.js → Upload01-BDeLrRhf.js} +1 -1
  46. package/dist/client/assets/{User01-BPodfm7s.js → User01-B8a5ssx2.js} +1 -1
  47. package/dist/client/assets/{UserSquare-CXhk4rLY.js → UserSquare-yIpHwPSn.js} +1 -1
  48. package/dist/client/assets/{Users01-Dgbd4CM_.js → Users01-BCRhQsCX.js} +1 -1
  49. package/dist/client/assets/{Users03-B4Km0_9u.js → Users03-DWh3D2_T.js} +1 -1
  50. package/dist/client/assets/{XCircle-BK1898xU.js → XCircle-DudPVYQR.js} +1 -1
  51. package/dist/client/assets/XClose-DpDcHm9Y.js +1 -0
  52. package/dist/client/assets/{Zap-nPZGKdXf.js → Zap-C5eiFR0N.js} +1 -1
  53. package/dist/client/assets/ZoomOut-DdupjPFF.js +1 -0
  54. package/dist/client/assets/access-gate-Dnh0JyKy.js +1 -0
  55. package/dist/client/assets/add-connection-dialog-BSihy3_s.js +1 -0
  56. package/dist/client/assets/agent-analytics-C1OAYjbt.js +2 -0
  57. package/dist/client/assets/agent-app-62cavSHy.js +1 -0
  58. package/dist/client/assets/agent-assets-vYQq8qui.js +1 -0
  59. package/dist/client/assets/agent-automation-BPNX454_.js +20 -0
  60. package/dist/client/assets/agent-automations-BLOXID0N.js +1 -0
  61. package/dist/client/assets/agent-connect-sources-BzEccd4r.js +1 -0
  62. package/dist/client/assets/agent-deck-DVW32bsA.js +1 -0
  63. package/dist/client/assets/agent-e2e-DM8adI3E.js +1 -0
  64. package/dist/client/assets/agent-file-C7nywZCe.js +1 -0
  65. package/dist/client/assets/agent-git-DarQSTRH.js +3 -0
  66. package/dist/client/assets/agent-hosting-Dnr2S-TT.js +1 -0
  67. package/dist/client/assets/agent-icon-vDfwuZu4.js +1 -0
  68. package/dist/client/assets/agent-library-file-D4p-8dXS.js +1 -0
  69. package/dist/client/assets/agent-monitor-DpaaBIhL.js +1 -0
  70. package/dist/client/assets/agent-overview-D9IrP622.js +1 -0
  71. package/dist/client/assets/agent-settings-CxGAsqqN.js +1 -0
  72. package/dist/client/assets/agent-site-editor-DTFbZmEY.js +1 -0
  73. package/dist/client/assets/agent-site-editor-code-Dcgjtfwk.js +2 -0
  74. package/dist/client/assets/agent-site-editor-content-BE26aik7.js +2 -0
  75. package/dist/client/assets/agent-site-editor-preview-ki_D8wtP.js +504 -0
  76. package/dist/client/assets/agent-view-DYYYDEW_.js +1 -0
  77. package/dist/client/assets/agent-view-guard-DomQyuot.js +1 -0
  78. package/dist/client/assets/agents-list-B0vnsITA.js +1 -0
  79. package/dist/client/assets/ai-providers-CxaMjUP7.js +1 -0
  80. package/dist/client/assets/{alert-D8igu3TO.js → alert-DcFgIKLk.js} +1 -1
  81. package/dist/client/assets/{alert-dialog-CFCsKBpN.js → alert-dialog-CiKfgw9r.js} +2 -2
  82. package/dist/client/assets/{api-keys-BIjM5sVA.js → api-keys-CEPWE1iS.js} +1 -1
  83. package/dist/client/assets/api-keys-DoGNEUpY.js +1 -0
  84. package/dist/client/assets/app-editor-CRjlYU-M.js +1 -0
  85. package/dist/client/assets/asset-utils-DJXdpjr9.js +1 -0
  86. package/dist/client/assets/{auth-catchall-E5QBtigN.js → auth-catchall-DV5KEwZ2.js} +1 -1
  87. package/dist/client/assets/{auth-entry-C91RF11H.js → auth-entry-Fe8qT_kq.js} +1 -1
  88. package/dist/client/assets/{auth-DeD0YpKg.js → auth-ksbj4Esa.js} +1 -1
  89. package/dist/client/assets/{auth-split-layout-BFF9n_Qv.js → auth-split-layout-CFJK_BXW.js} +1 -1
  90. package/dist/client/assets/{authenticate-and-persist-oauth-6UYdTwrd.js → authenticate-and-persist-oauth-DMvGjBUE.js} +1 -1
  91. package/dist/client/assets/{automation-list-row-Ba1cMA4W.js → automation-list-row-CkrObNhq.js} +1 -1
  92. package/dist/client/assets/automation-runs-C-5kRp10.js +1 -0
  93. package/dist/client/assets/automations-CKhgbURI.js +1 -0
  94. package/dist/client/assets/{autosend-DI1ZpOT0.js → autosend-BzUVLyEq.js} +1 -1
  95. package/dist/client/assets/{avatar-CfO1mReu.js → avatar-CW4PxBuN.js} +1 -1
  96. package/dist/client/assets/{badge-GP_pc1i_.js → badge-C5Ilvf_J.js} +1 -1
  97. package/dist/client/assets/{block-document-B_vPvGLi.js → block-document-Zfk-C1Kp.js} +3 -3
  98. package/dist/client/assets/breadcrumb-BajFgW5V.js +1 -0
  99. package/dist/client/assets/{buckets-BeX-azQt.js → buckets-CyNocIPE.js} +1 -1
  100. package/dist/client/assets/build-improve-prompt-doc-BrRLOIlw.js +2 -0
  101. package/dist/client/assets/bulk-category-panel-e217-dmm.js +1 -0
  102. package/dist/client/assets/calendar-DGiOuDgZ.js +1 -0
  103. package/dist/client/assets/{capability-load-error-BoR9RbMs.js → capability-load-error-DFv8gs5U.js} +1 -1
  104. package/dist/client/assets/{cards-m7YgOjsz.js → cards-XHNjVWeh.js} +3 -3
  105. package/dist/client/assets/category-editor-zLRtagcy.js +1 -0
  106. package/dist/client/assets/{chart-BanyRqbL.js → chart-C7CmtzOp.js} +2 -2
  107. package/dist/client/assets/chat-context-HB_KOUNM.js +35 -0
  108. package/dist/client/assets/{checkbox-ZsR1Bced.js → checkbox-Dg_GkeBT.js} +1 -1
  109. package/dist/client/assets/choose-editor-DO1mGCL1.js +1 -0
  110. package/dist/client/assets/{cli-auth-success-sB1yOlRg.js → cli-auth-success-e-RADpiN.js} +1 -1
  111. package/dist/client/assets/{client-icons-DHLFDmNu.js → client-icons-tt6oaVA2.js} +1 -1
  112. package/dist/client/assets/collapsible-CycyYnXe.js +1 -0
  113. package/dist/client/assets/collection-detail-DhtfN_Wl.js +1 -0
  114. package/dist/client/assets/collection-display-button-BRbx9UhH.js +1 -0
  115. package/dist/client/assets/{collection-search-7NUVJQfN.js → collection-search-j4HjYlys.js} +1 -1
  116. package/dist/client/assets/{collection-table-wrapper-D0kCJcbB.js → collection-table-wrapper-0LZ9BKlr.js} +1 -1
  117. package/dist/client/assets/{collection-tabs-MvaIz7gt.js → collection-tabs-Bc9QOlJ8.js} +1 -1
  118. package/dist/client/assets/{command-CF7nzIN2.js → command-BpjWfGyr.js} +1 -1
  119. package/dist/client/assets/command-palette-store-D19nXDNm.js +1 -0
  120. package/dist/client/assets/commerce-onboarding-CdG4FfWS.js +1 -0
  121. package/dist/client/assets/companion-mcps-section-CVcicsr9.js +1 -0
  122. package/dist/client/assets/companions-core-CZwGf1b1.js +1 -0
  123. package/dist/client/assets/{connect-G-ytX-wq.js → connect-COU6F3Do.js} +2 -2
  124. package/dist/client/assets/connect-layout-Bl-ol5HH.js +1 -0
  125. package/dist/client/assets/{connection-D885aDuM.js → connection-By77bjvj.js} +1 -1
  126. package/dist/client/assets/{connection-card-Nc1w-XCq.js → connection-card-Br8jDKgZ.js} +1 -1
  127. package/dist/client/assets/connection-detail-vVdPGlxv.js +1 -0
  128. package/dist/client/assets/{connection-form-helpers-B4IwDJJQ.js → connection-form-helpers-CFXh6BoJ.js} +1 -1
  129. package/dist/client/assets/connections-BBNFmXEe.js +1 -0
  130. package/dist/client/assets/content-blocks-o63cs2vh.js +1 -0
  131. package/dist/client/assets/{create-organization-dialog-gO5G25gp.js → create-organization-dialog-CRl8hry2.js} +1 -1
  132. package/dist/client/assets/decode-html-entities-Cf7wUEql.js +1 -0
  133. package/dist/client/assets/{decopilot-sse-pool-Bm_3HC4t.js → decopilot-sse-pool-D2Qtyl-A.js} +1 -1
  134. package/dist/client/assets/{dialog-CyDGwxcX.js → dialog-DJBpjJnY.js} +1 -1
  135. package/dist/client/assets/discover-y7BsppSE.js +1 -0
  136. package/dist/client/assets/{domain-settings-Cx6UibuZ.js → domain-settings-B_cuGCF0.js} +1 -1
  137. package/dist/client/assets/download-app-dialog-DYhv8XsJ.js +1 -0
  138. package/dist/client/assets/{drawer-CqSEztKC.js → drawer-B5NRhNfW.js} +1 -1
  139. package/dist/client/assets/{dropdown-menu-CgwRqOnX.js → dropdown-menu-DzwCPltk.js} +1 -1
  140. package/dist/client/assets/{editor-D7S6MtwI.js → editor-BHnwprUT.js} +1 -1
  141. package/dist/client/assets/{empty-state-SN5mEPhX.js → empty-state-CJ95hR0w.js} +1 -1
  142. package/dist/client/assets/{empty-state-DfBha5W6.js → empty-state-CXolWOTn.js} +1 -1
  143. package/dist/client/assets/extract-connection-data-B1nPGa4h.js +1 -0
  144. package/dist/client/assets/{file-explorer-paPAvOUA.js → file-explorer-Dj1zqDxa.js} +2 -2
  145. package/dist/client/assets/file-preview-kRDXQYfi.js +1 -0
  146. package/dist/client/assets/file-share-button-P5GnoZYM.js +3 -0
  147. package/dist/client/assets/{file-type-icon--TvA6C0i.js → file-type-icon-Cg81au_Z.js} +1 -1
  148. package/dist/client/assets/folder-icon-Bey_C_xd.js +2 -0
  149. package/dist/client/assets/{form-BnUN8JhF.js → form-EGCuUtdG.js} +1 -1
  150. package/dist/client/assets/{general-DhiseHhA.js → general-BJ_Ksgnn.js} +1 -1
  151. package/dist/client/assets/github-D4UJ99TO.js +1 -0
  152. package/dist/client/assets/{github-icon-7BmoW2Y2.js → github-icon-CiNkodR8.js} +1 -1
  153. package/dist/client/assets/{github-repo-CTPv5ZM2.js → github-repo-C0igpkr9.js} +1 -1
  154. package/dist/client/assets/github-repo-scope-C8GSbvaz.js +1 -0
  155. package/dist/client/assets/home-Cmddezu3.js +1 -0
  156. package/dist/client/assets/{hooks-Bv30myGB.js → hooks-BSkeWBV7.js} +2 -2
  157. package/dist/client/assets/hooks-Bb9SArul.js +2 -0
  158. package/dist/client/assets/{index-y6Z5iMfg.js → index-6GXqHE0w.js} +42 -42
  159. package/dist/client/assets/{index-C2fs5Fhc.js → index-9FQARZdh.js} +1 -1
  160. package/dist/client/assets/index-B7ENeoW4.js +4 -0
  161. package/dist/client/assets/index-B9bOVdMd.js +90 -0
  162. package/dist/client/assets/index-BVRQ9yUZ.js +1 -0
  163. package/dist/client/assets/index-BaItIL-_.js +1 -0
  164. package/dist/client/assets/index-CUa7fAjf.js +24 -0
  165. package/dist/client/assets/index-CY40-aHW.js +1 -0
  166. package/dist/client/assets/{index-CnV8Y6tV.js → index-Cu77hgR2.js} +1 -1
  167. package/dist/client/assets/index-DCQ3taiG.js +1 -0
  168. package/dist/client/assets/{index-DD_a39Sy.js → index-Dg14Zpi9.js} +2 -2
  169. package/dist/client/assets/{index-B_j4TgZF.js → index-cEqwHhEg.js} +1 -1
  170. package/dist/client/assets/{index-Cf5RfBo5.js → index-hC6VOnUm.js} +2 -2
  171. package/dist/client/assets/index-qEipD_7S.js +1 -0
  172. package/dist/client/assets/index-redirect-BRL1uQPT.js +1 -0
  173. package/dist/client/assets/{infiniteQueryObserver-CvFtTJPb.js → infiniteQueryObserver-C7FrFXuf.js} +1 -1
  174. package/dist/client/assets/infra-billing-B0e93_qz.js +1 -0
  175. package/dist/client/assets/input-BRqLi1TH.js +8 -0
  176. package/dist/client/assets/input-D8xrvlz-.js +1 -0
  177. package/dist/client/assets/{input-DRjCNSPN.js → input-TvernbmY.js} +1 -1
  178. package/dist/client/assets/{integration-icon-CFGOsRgH.js → integration-icon-B6H5J7sl.js} +1 -1
  179. package/dist/client/assets/{invite-member-dialog-qtYgFNfF.js → invite-member-dialog-CsolElt3.js} +1 -1
  180. package/dist/client/assets/{label-DGsSvY2I.js → label-aWEsDmHM.js} +1 -1
  181. package/dist/client/assets/{layout-C7iOarOb.js → layout-CAwe_kK2.js} +1 -1
  182. package/dist/client/assets/legacy-agents-deep-DJ_t0QLc.js +1 -0
  183. package/dist/client/assets/legacy-main-redirect-CySqEohs.js +1 -0
  184. package/dist/client/assets/library-DRmbr8Ht.js +161 -0
  185. package/dist/client/assets/{login-B4RHcX-Z.js → login-DQDbHhI7.js} +1 -1
  186. package/dist/client/assets/{markdown-Y6owwpHy.js → markdown-CBvmi8AF.js} +30 -30
  187. package/dist/client/assets/match-site-slug-config-D3fUJ6vX.js +1 -0
  188. package/dist/client/assets/{mcp-app-renderer-Cy31bAY0.js → mcp-app-renderer-BQ7hPzlx.js} +2 -2
  189. package/dist/client/assets/{mcp-oauth-Bm9ijvfC.js → mcp-oauth-DhRKpyTH.js} +1 -1
  190. package/dist/client/assets/members-NHaXKGgP.js +1 -0
  191. package/dist/client/assets/mini-report-page-BcG9QHwQ.js +1 -0
  192. package/dist/client/assets/monaco-editor-C5zvkMO4.js +9 -0
  193. package/dist/client/assets/monitoring-stats-row-CWqusnLf.js +1 -0
  194. package/dist/client/assets/{multi-select-kzt94BG4.js → multi-select-CvACpZbb.js} +1 -1
  195. package/dist/client/assets/mustache-DQXz9E52.js +4 -0
  196. package/dist/client/assets/{oauth-callback-CsYpPVhX.js → oauth-callback-BHJTnNxG.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-ai-provider-CkroR0wl.js → oauth-callback-ai-provider-wF0_7wc5.js} +1 -1
  198. package/dist/client/assets/omit-sandbox-map-jj4lCB2U.js +1 -0
  199. package/dist/client/assets/{onboarding-DN_VeGxV.js → onboarding-20FUHLvO.js} +1 -1
  200. package/dist/client/assets/optimistic-project-sidebar-views-DKtRXqQ0.js +1 -0
  201. package/dist/client/assets/org-layout-DRrVivAL.js +1 -0
  202. package/dist/client/assets/{organization-choice-Bugd-m5W.js → organization-choice-BmSYuBSE.js} +1 -1
  203. package/dist/client/assets/{orgs-Bv7LuXwC.js → orgs-1ZlqeM-y.js} +1 -1
  204. package/dist/client/assets/page-seo-form-Cpi2Oike.js +1 -0
  205. package/dist/client/assets/pair-CD8Vxcvs.js +47 -0
  206. package/dist/client/assets/{popover-DrJcYe9C.js → popover-Ci-k968-.js} +1 -1
  207. package/dist/client/assets/post-calendar-CgTLYrrU.js +1 -0
  208. package/dist/client/assets/post-editor-DyayPm7u.js +1 -0
  209. package/dist/client/assets/preview-content-DhEgigNG.js +1 -0
  210. package/dist/client/assets/preview-dialog-CKWnRekk.js +1 -0
  211. package/dist/client/assets/primitives-1lR28duD.js +1 -0
  212. package/dist/client/assets/{profile-Bs-irLLH.js → profile-DixSbE4L.js} +1 -1
  213. package/dist/client/assets/project-app-view-DBHiU3Rg.js +1 -0
  214. package/dist/client/assets/project-feed-boKgu_TR.js +1 -0
  215. package/dist/client/assets/project-icon-DIXBuD-A.js +1 -0
  216. package/dist/client/assets/project-reports-ChLta7_v.js +1 -0
  217. package/dist/client/assets/project-tasks-nUWazd1g.js +1 -0
  218. package/dist/client/assets/{prompts-wjQ-EFKj.js → prompts-BROxvafI.js} +1 -1
  219. package/dist/client/assets/provision-repo-scoped-github-connection-B6zdkC6p.js +1 -0
  220. package/dist/client/assets/record-editor-FqHaN2k4.js +1 -0
  221. package/dist/client/assets/redirect-editor-CWYZom_C.js +1 -0
  222. package/dist/client/assets/registry-C3_EEMj-.js +2 -0
  223. package/dist/client/assets/{registry-layout-DHYm94rU.js → registry-layout-BUEF9YqP.js} +4 -4
  224. package/dist/client/assets/{reports-D4elpaqK.js → reports-B1C9NU2m.js} +1 -1
  225. package/dist/client/assets/reports-BY7Ca1Ey.js +1 -0
  226. package/dist/client/assets/reports-tab-uLMivl2p.js +2 -0
  227. package/dist/client/assets/{repositories-3ia_V4sE.js → repositories-BgD13VwL.js} +1 -1
  228. package/dist/client/assets/repository-import-picker-DVnadPZ8.js +1 -0
  229. package/dist/client/assets/{repository-picker-s01uE4_E.js → repository-picker-BGpoa_g_.js} +1 -1
  230. package/dist/client/assets/require-capability-DSFKKTc-.js +1 -0
  231. package/dist/client/assets/{required-auth-layout-mSUodrzA.js → required-auth-layout-DMNBbcf3.js} +1 -1
  232. package/dist/client/assets/{reset-password-B_-cD_PK.js → reset-password-GCDcBOjo.js} +1 -1
  233. package/dist/client/assets/review-settings-VwYzzjCc.js +1 -0
  234. package/dist/client/assets/rich-text-link-control-C6A8Q9Jd.js +5 -0
  235. package/dist/client/assets/roles-PgEO9KN-.js +1 -0
  236. package/dist/client/assets/runnable-block-editor-Db2XbJYi.js +16 -0
  237. package/dist/client/assets/sandbox-lifecycle-context-DxbfUbxP.js +2 -0
  238. package/dist/client/assets/sandbox-url-D3mC8qhT.js +1 -0
  239. package/dist/client/assets/{schema-BDy_4D7A.js → schema-Cnskrzk1.js} +1 -1
  240. package/dist/client/assets/{scroll-area-C18Y2v3L.js → scroll-area-CaE3a4_T.js} +1 -1
  241. package/dist/client/assets/{search-input-L0lrukmF.js → search-input-lFP9sD3O.js} +1 -1
  242. package/dist/client/assets/{secrets-CdpkfmHa.js → secrets-BU_daRxy.js} +1 -1
  243. package/dist/client/assets/sections-editor-D-W8vM7g.js +2 -0
  244. package/dist/client/assets/{select-BGnwGqnU.js → select-Ce9NznPv.js} +1 -1
  245. package/dist/client/assets/select-model-CjTijsS7.js +1 -0
  246. package/dist/client/assets/self-tool-result-8OxPN9Nm.js +1 -0
  247. package/dist/client/assets/seo-editor-O94He1NF.js +1 -0
  248. package/dist/client/assets/serial-task-queue-CGOeQgpr.js +1 -0
  249. package/dist/client/assets/settings-layout-CWQI71Tg.js +1 -0
  250. package/dist/client/assets/settings-sidebar-BcAe-WS4.js +1 -0
  251. package/dist/client/assets/settings-tab-Cg5CqTki.js +5 -0
  252. package/dist/client/assets/shell-controls-gkZZS07l.js +1 -0
  253. package/dist/client/assets/shell-layout-C3IRibnI.js +1 -0
  254. package/dist/client/assets/site-url-en5df9c-.js +1 -0
  255. package/dist/client/assets/skill-preview-MIddvDZe.js +1 -0
  256. package/dist/client/assets/skills-hRnVKZ5K.js +1 -0
  257. package/dist/client/assets/{sso-CVpMpJ2m.js → sso-BePH_NId.js} +1 -1
  258. package/dist/client/assets/store-CqeIEwHN.js +1 -0
  259. package/dist/client/assets/store-registry-BCokMLik.js +2 -0
  260. package/dist/client/assets/switch-D5GcuD9Z.js +1 -0
  261. package/dist/client/assets/synced-repos-Cnp4m7yg.js +1 -0
  262. package/dist/client/assets/{table-DSIbUmyY.js → table-O0SpY8ZO.js} +1 -1
  263. package/dist/client/assets/{tabs-BVFMEVzk.js → tabs-DQoXHeZr.js} +1 -1
  264. package/dist/client/assets/{task-board-By8eCqZc.js → task-board-DyZE7mH1.js} +1 -1
  265. package/dist/client/assets/task-route-CayeX6cv.js +1 -0
  266. package/dist/client/assets/task-status-CyTozLxL.js +1 -0
  267. package/dist/client/assets/tasks-DGTMeQBa.js +1 -0
  268. package/dist/client/assets/{tasks-kFCSziTb.js → tasks-Da-h-zLm.js} +1 -1
  269. package/dist/client/assets/{textarea-CuF3aDTE.js → textarea-BpFOmm9_.js} +1 -1
  270. package/dist/client/assets/{thread-intent-q_RVjRN0.js → thread-intent-AJKohiRy.js} +1 -1
  271. package/dist/client/assets/thread-route-CEvVLI2K.js +1 -0
  272. package/dist/client/assets/thread-sheet-body-Bs4b4fMK.js +1 -0
  273. package/dist/client/assets/toggle-group-Cs1yIHkK.js +1 -0
  274. package/dist/client/assets/tool-namespace-ySa3S1AM.js +1 -0
  275. package/dist/client/assets/{toolbar-B5cewwJb.js → toolbar-DOOz2W24.js} +1 -1
  276. package/dist/client/assets/{toolbar-icon-button-BtBUZ8nA.js → toolbar-icon-button-Dp-AbzNZ.js} +1 -1
  277. package/dist/client/assets/{track-BYunSel2.js → track-Dns1NpdC.js} +1 -1
  278. package/dist/client/assets/{types-BB_Up-3A.js → types-C1gRrnQe.js} +6 -6
  279. package/dist/client/assets/usage-stats-D5mXC24B.js +141 -0
  280. package/dist/client/assets/{use-ai-providers-BMexfNaB.js → use-ai-providers-Bg_y9f3x.js} +1 -1
  281. package/dist/client/assets/{use-automations-BgzAjzua.js → use-automations-BI_yIok-.js} +1 -1
  282. package/dist/client/assets/{use-autosave-D70NA0HD.js → use-autosave-BB0U2eiK.js} +1 -1
  283. package/dist/client/assets/use-commerce-diagnostic-DqKipeip.js +1 -0
  284. package/dist/client/assets/use-connect-companion-Mci4Y6hu.js +1 -0
  285. package/dist/client/assets/{use-connection-ClORxmw4.js → use-connection-DCUpGmsb.js} +1 -1
  286. package/dist/client/assets/{use-copy-DUxpBqXm.js → use-copy-GVBAvo9n.js} +1 -1
  287. package/dist/client/assets/{use-create-virtual-mcp-DBeldBRq.js → use-create-virtual-mcp-CizXpVyQ.js} +1 -1
  288. package/dist/client/assets/{use-date-fns-locale-40K6SzJD.js → use-date-fns-locale-CcPpBz8y.js} +1 -1
  289. package/dist/client/assets/{use-debounced-autosave-kf66WQZj.js → use-debounced-autosave-wCEzYUZh.js} +1 -1
  290. package/dist/client/assets/{use-debounced-value-v41IOreQ.js → use-debounced-value-D0SYNQsR.js} +1 -1
  291. package/dist/client/assets/use-deco-credits-DjxZxHMq.js +1 -0
  292. package/dist/client/assets/{use-decopilot-events-C0NWoSQc.js → use-decopilot-events-zpeu2MCG.js} +1 -1
  293. package/dist/client/assets/{use-delete-connection-qmqqgsKa.js → use-delete-connection-B-DNpbCU.js} +1 -1
  294. package/dist/client/assets/{use-deployment-admin-C7c9x0vv.js → use-deployment-admin-Dpkh4HgH.js} +1 -1
  295. package/dist/client/assets/{use-file-configs-Dm3fOdMk.js → use-file-configs-B1FdrMZJ.js} +1 -1
  296. package/dist/client/assets/{use-infinite-scroll-Bw5rNIGx.js → use-infinite-scroll-BXOEU8Y7.js} +1 -1
  297. package/dist/client/assets/{use-join-requests-DbtrL0Pl.js → use-join-requests-1Ow065Yq.js} +1 -1
  298. package/dist/client/assets/use-main-panel-tabs-CeyJWpQP.js +1 -0
  299. package/dist/client/assets/{use-mcp-auth-status-kHe3lJRg.js → use-mcp-auth-status-CSQiZCDG.js} +1 -1
  300. package/dist/client/assets/use-mcp-client-Bq-mjhw3.js +10 -0
  301. package/dist/client/assets/{use-mcp-prompts-CtjkJFfg.js → use-mcp-prompts-CWmeNLXn.js} +1 -1
  302. package/dist/client/assets/{use-mcp-tools-DRBItGTD.js → use-mcp-tools-DGdyHn8U.js} +1 -1
  303. package/dist/client/assets/{use-members-C23rfxcZ.js → use-members-Dnee1tF2.js} +1 -1
  304. package/dist/client/assets/use-navigate-to-agent-Drdqs1cr.js +1 -0
  305. package/dist/client/assets/use-open-billing-url-Cju1isPI.js +1 -0
  306. package/dist/client/assets/{use-org-auth-client-DvlpnDFO.js → use-org-auth-client-CVFBkaiI.js} +1 -1
  307. package/dist/client/assets/use-org-fs-DG1oJieK.js +1 -0
  308. package/dist/client/assets/{use-org-notice-DlsdC1WA.js → use-org-notice-PUfO84YR.js} +1 -1
  309. package/dist/client/assets/{use-org-sso-xd-5IiLc.js → use-org-sso-uleG21Aq.js} +1 -1
  310. package/dist/client/assets/{use-organization-roles-B3neE_6D.js → use-organization-roles-yO3kgQbK.js} +1 -1
  311. package/dist/client/assets/use-organization-settings-DrJN-E78.js +1 -0
  312. package/dist/client/assets/use-panel-navigate-CCqZdv2O.js +1 -0
  313. package/dist/client/assets/use-project-native-view-presence-01L5j4lu.js +1 -0
  314. package/dist/client/assets/use-project-scope-DZ9tacAx.js +1 -0
  315. package/dist/client/assets/use-registry-connections-cro5WL6A.js +1 -0
  316. package/dist/client/assets/{use-secrets-PkTonlJ_.js → use-secrets-w6G8jtp4.js} +1 -1
  317. package/dist/client/assets/use-section-preview-base-lro_p1nx.js +1 -0
  318. package/dist/client/assets/use-session-runtime-TS34dEJv.js +1 -0
  319. package/dist/client/assets/{use-status-sounds-C-6LEj0t.js → use-status-sounds-DQ2pMmh0.js} +1 -1
  320. package/dist/client/assets/{use-tags-BuxETA7b.js → use-tags-B6zE47mm.js} +1 -1
  321. package/dist/client/assets/use-task-metadata-C4MfiHBQ.js +1 -0
  322. package/dist/client/assets/use-thread-outputs-CpCqTMOi.js +1 -0
  323. package/dist/client/assets/{use-view-mode-BGsTNFK8.js → use-view-mode-B9wUn2ad.js} +1 -1
  324. package/dist/client/assets/use-virtual-mcp-CMlCV8Oj.js +1 -0
  325. package/dist/client/assets/useInfiniteQuery-CM35R0yt.js +1 -0
  326. package/dist/client/assets/useQueries-C6OAJOs7.js +1 -0
  327. package/dist/client/assets/useSuspenseInfiniteQuery-DWyGwvh9.js +1 -0
  328. package/dist/client/assets/{users-CuqlxLsH.js → users-CYflDdFv.js} +1 -1
  329. package/dist/client/assets/utils-B-5U5Z26.js +4 -0
  330. package/dist/client/assets/utils-CVEq3hMx.js +1 -0
  331. package/dist/client/assets/variant-calendar-BsFwTl3D.js +1 -0
  332. package/dist/client/assets/variant-matcher-override-CRlEf4IL.js +1 -0
  333. package/dist/client/assets/{view-mode-toggle-BlEO3gFJ.js → view-mode-toggle-kY4gR8CN.js} +1 -1
  334. package/dist/client/assets/virtual-mcp-CKi1xJsO.js +1 -0
  335. package/dist/client/index.html +1 -1
  336. package/dist/server/cli.js +1 -1
  337. package/dist/server/server.js +1 -1
  338. package/package.json +1 -1
  339. package/dist/client/assets/ErrorBarContext-CQj5vlL8.js +0 -1
  340. package/dist/client/assets/Sector-CD1ykt0B.js +0 -28
  341. package/dist/client/assets/ZoomOut-DhJWoynj.js +0 -1
  342. package/dist/client/assets/access-gate-OgewzCmd.js +0 -1
  343. package/dist/client/assets/agent-icon-6EllA70W.js +0 -1
  344. package/dist/client/assets/agents-list-BY0vT0Wn.js +0 -1
  345. package/dist/client/assets/ai-providers-vUA1qSht.js +0 -1
  346. package/dist/client/assets/analytics-tab-Do-IciVD.js +0 -2
  347. package/dist/client/assets/api-keys-pPtOUmL_.js +0 -1
  348. package/dist/client/assets/app-editor-CSGywsTY.js +0 -1
  349. package/dist/client/assets/automation-runs-CoIkXCsB.js +0 -187
  350. package/dist/client/assets/automations-CJ2EIlox.js +0 -1
  351. package/dist/client/assets/breadcrumb-CAKgWNOZ.js +0 -1
  352. package/dist/client/assets/bulk-category-panel-BenSOwl7.js +0 -1
  353. package/dist/client/assets/category-editor-iK-flfht.js +0 -1
  354. package/dist/client/assets/cdn-tab-Ck8xjhCA.js +0 -1
  355. package/dist/client/assets/chat-context-C6UT7ht1.js +0 -35
  356. package/dist/client/assets/choose-editor-B8v8x2gP.js +0 -1
  357. package/dist/client/assets/collection-detail-CZicQp0E.js +0 -1
  358. package/dist/client/assets/collection-display-button-BiBiEJPp.js +0 -1
  359. package/dist/client/assets/commerce-onboarding-DKWZMrBI.js +0 -1
  360. package/dist/client/assets/connect-layout-BLwdQBWt.js +0 -1
  361. package/dist/client/assets/connection-detail-BboxJXTl.js +0 -1
  362. package/dist/client/assets/connections-H_c0ER6v.js +0 -1
  363. package/dist/client/assets/e2e-tab-DbA_PByD.js +0 -1
  364. package/dist/client/assets/extract-connection-data-DkL3Oqhk.js +0 -1
  365. package/dist/client/assets/folder-icon-C46JPU0-.js +0 -2
  366. package/dist/client/assets/index-9Wn-1DpE.js +0 -1
  367. package/dist/client/assets/index-BEyFhSeZ.js +0 -834
  368. package/dist/client/assets/index-DHHqS3nT.js +0 -1
  369. package/dist/client/assets/index-DR6uwZdc.js +0 -1
  370. package/dist/client/assets/index-I7v7d4v2.js +0 -1
  371. package/dist/client/assets/index-SmsG_b1w.js +0 -1
  372. package/dist/client/assets/index-redirect-C3gwJ6Fh.js +0 -1
  373. package/dist/client/assets/infra-billing-Ch_WWq-u.js +0 -1
  374. package/dist/client/assets/members-ypEfbto9.js +0 -1
  375. package/dist/client/assets/monaco-editor-D3QSLeam.js +0 -9
  376. package/dist/client/assets/monitoring-stats-row--wR3KC6f.js +0 -1
  377. package/dist/client/assets/org-layout-DzsJ720P.js +0 -1
  378. package/dist/client/assets/page-seo-form-DPrfWQ94.js +0 -1
  379. package/dist/client/assets/post-calendar-DyncB6BE.js +0 -1
  380. package/dist/client/assets/post-editor-FfaApBeX.js +0 -1
  381. package/dist/client/assets/primitives-DZEMS67c.js +0 -1
  382. package/dist/client/assets/project-app-view-C1W5Uv5V.js +0 -1
  383. package/dist/client/assets/project-icon-DQTfNALl.js +0 -1
  384. package/dist/client/assets/provision-repo-scoped-github-connection-WQFARyHG.js +0 -1
  385. package/dist/client/assets/record-editor-DaGE-E4Q.js +0 -1
  386. package/dist/client/assets/redirect-editor-BgylW9YL.js +0 -1
  387. package/dist/client/assets/registry-YIdSAHGV.js +0 -2
  388. package/dist/client/assets/repository-import-picker-DN9Nn9yd.js +0 -1
  389. package/dist/client/assets/require-capability-BVMwcBeZ.js +0 -1
  390. package/dist/client/assets/review-settings-BN9py8rz.js +0 -1
  391. package/dist/client/assets/roles-CGT8NKA4.js +0 -1
  392. package/dist/client/assets/sections-editor-BIoyRz1G.js +0 -2
  393. package/dist/client/assets/select-model-BNDe5FJr.js +0 -4
  394. package/dist/client/assets/self-tool-result-DM7xixxP.js +0 -1
  395. package/dist/client/assets/seo-editor-EIeTDSnb.js +0 -1
  396. package/dist/client/assets/settings-layout-CwJp96nZ.js +0 -1
  397. package/dist/client/assets/settings-sidebar-BvIIdmkC.js +0 -1
  398. package/dist/client/assets/shell-controls-nVElTnLJ.js +0 -1
  399. package/dist/client/assets/shell-layout-CTNVA2t4.js +0 -1
  400. package/dist/client/assets/skill-preview-BswJw8Eb.js +0 -4
  401. package/dist/client/assets/skills-DXWVIfB4.js +0 -1
  402. package/dist/client/assets/store-BUUS-eER.js +0 -1
  403. package/dist/client/assets/store-registry-DxfEOZiI.js +0 -2
  404. package/dist/client/assets/switch-CPLM-IZy.js +0 -1
  405. package/dist/client/assets/synced-repos-Bl-1vG4K.js +0 -1
  406. package/dist/client/assets/task-route-B8aecmdq.js +0 -1
  407. package/dist/client/assets/thread-route-jI9qvJe_.js +0 -1
  408. package/dist/client/assets/toggle-group-WfRpP-dB.js +0 -1
  409. package/dist/client/assets/use-destination-route-CY15sZqw.js +0 -1
  410. package/dist/client/assets/use-mcp-client-Cw1fcLqm.js +0 -10
  411. package/dist/client/assets/use-navigate-to-agent-COVw0ub8.js +0 -1
  412. package/dist/client/assets/use-organization-settings-DucmPYOE.js +0 -1
  413. package/dist/client/assets/use-panel-navigate-C6Ga2vR8.js +0 -1
  414. package/dist/client/assets/use-registry-connections-DBp-MS3e.js +0 -1
  415. package/dist/client/assets/use-section-preview-base-B4s2_IK6.js +0 -1
  416. package/dist/client/assets/use-virtual-mcp-Bnfc4yEo.js +0 -1
  417. package/dist/client/assets/useInfiniteQuery-DThUrotQ.js +0 -1
  418. package/dist/client/assets/useSuspenseInfiniteQuery-Dsg0_SX3.js +0 -1
  419. package/dist/client/assets/variant-calendar-BhJlQ5r6.js +0 -1
@@ -0,0 +1,504 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-D-W8vM7g.js","assets/index-6GXqHE0w.js","assets/index-DJADaZ4J.css","assets/chat-context-HB_KOUNM.js","assets/use-panel-navigate-CCqZdv2O.js","assets/thread-route-CEvVLI2K.js","assets/use-project-scope-DZ9tacAx.js","assets/use-virtual-mcp-CMlCV8Oj.js","assets/use-mcp-client-Bq-mjhw3.js","assets/auth-ksbj4Esa.js","assets/github-repo-C0igpkr9.js","assets/autosend-BzUVLyEq.js","assets/thread-intent-AJKohiRy.js","assets/slugify-CEUa2lfQ.js","assets/hooks-BSkeWBV7.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/decopilot-sse-pool-D2Qtyl-A.js","assets/task-board-DyZE7mH1.js","assets/schema-Cnskrzk1.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-ai-providers-Bg_y9f3x.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-zpeu2MCG.js","assets/use-organization-settings-DrJN-E78.js","assets/index-CUa7fAjf.js","assets/use-main-panel-tabs-CeyJWpQP.js","assets/Globe01-BVji6jXS.js","assets/Monitor01-BTqHf-K4.js","assets/use-connection-DCUpGmsb.js","assets/use-mcp-tools-DGdyHn8U.js","assets/types-C1gRrnQe.js","assets/utils-CVEq3hMx.js","assets/ArrowUp-lpfNBlP2.js","assets/tool-namespace-ySa3S1AM.js","assets/dialog-DJBpjJnY.js","assets/drawer-B5NRhNfW.js","assets/collection-search-j4HjYlys.js","assets/SearchMd-BNXjQ2BV.js","assets/use-mcp-prompts-CWmeNLXn.js","assets/usage-stats-D5mXC24B.js","assets/form-EGCuUtdG.js","assets/label-aWEsDmHM.js","assets/input-TvernbmY.js","assets/use-copy-GVBAvo9n.js","assets/markdown-CBvmi8AF.js","assets/Check-DClZtAIP.js","assets/Copy01-DiITYBuR.js","assets/Download01-C4blLpML.js","assets/ZoomOut-DdupjPFF.js","assets/agent-icon-vDfwuZu4.js","assets/AlertCircle-CgERhdh6.js","assets/Tool01-D6HOM_aJ.js","assets/ArrowLeft-BVx6AQzq.js","assets/Tool02-BrfQeZRx.js","assets/ArrowRight-DZQert3q.js","assets/TrendUp01-DIz6JZwT.js","assets/Users03-DWh3D2_T.js","assets/CheckCircle-BGqFZ8sM.js","assets/ChevronUp-CbF1Gmeo.js","assets/ChevronRight-BNfU55ld.js","assets/ChevronSelectorVertical-ilm76_0p.js","assets/DotsVertical-LmkOTjL4.js","assets/UserSquare-yIpHwPSn.js","assets/CreditCard01-Zpy-4Wu9.js","assets/Database01-zcGUPFsG.js","assets/Printer-BG6NfeSZ.js","assets/Settings02-DL8f5fN1.js","assets/Eye-Cd7v-liN.js","assets/File02-CceuR6rF.js","assets/Share07-D1Sv14jA.js","assets/GitBranch01-Dil6c2wv.js","assets/SwitchHorizontal01-BIyO34Jw.js","assets/HardDrive-B4UY5qYp.js","assets/Image01-CpXdMb8x.js","assets/Key01-BsAAVoJx.js","assets/Link01-OqB-2yPE.js","assets/LinkExternal01-DobnLseV.js","assets/Sun-DjKz3VjB.js","assets/Package-CCkk0w5h.js","assets/Palette-BBWt8owf.js","assets/Play-CPeIBqH_.js","assets/Plus-DaErdsG1.js","assets/SearchLg-DxQfk550.js","assets/Shield01-BsobIEfQ.js","assets/Stars01-f37Q7vDf.js","assets/Trash01-DQjprOwc.js","assets/Upload01-BDeLrRhf.js","assets/User01-B8a5ssx2.js","assets/Users01-BCRhQsCX.js","assets/XCircle-DudPVYQR.js","assets/XClose-DpDcHm9Y.js","assets/Zap-C5eiFR0N.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/input-BRqLi1TH.js","assets/command-palette-store-D19nXDNm.js","assets/use-open-billing-url-Cju1isPI.js","assets/use-session-runtime-TS34dEJv.js","assets/select-Ce9NznPv.js","assets/tabs-DQoXHeZr.js","assets/toggle-group-Cs1yIHkK.js","assets/use-deco-credits-DjxZxHMq.js","assets/index-B7ENeoW4.js","assets/checkbox-Dg_GkeBT.js","assets/ai-providers-logos-DD3qZ33J.js","assets/avatar-CW4PxBuN.js","assets/download-app-dialog-DYhv8XsJ.js","assets/popover-Ci-k968-.js","assets/input-D8xrvlz-.js","assets/hooks-Bb9SArul.js","assets/use-org-fs-DG1oJieK.js","assets/dropdown-menu-DzwCPltk.js","assets/question-004-sINsf4GQ.js","assets/use-members-Dnee1tF2.js","assets/use-org-auth-client-CVFBkaiI.js","assets/add-connection-dialog-BSihy3_s.js","assets/extract-connection-data-B1nPGa4h.js","assets/metadata-dUsYcpuu.js","assets/github-D4UJ99TO.js","assets/connection-By77bjvj.js","assets/connection-card-Br8jDKgZ.js","assets/use-registry-connections-cro5WL6A.js","assets/useInfiniteQuery-CM35R0yt.js","assets/infiniteQueryObserver-C7FrFXuf.js","assets/retry-CErkP7V6.js","assets/connection-slug-CITJ0kGN.js","assets/integration-icon-B6H5J7sl.js","assets/textarea-BpFOmm9_.js","assets/connection-form-helpers-CFXh6BoJ.js","assets/authenticate-and-persist-oauth-DMvGjBUE.js","assets/mcp-oauth-DhRKpyTH.js","assets/collection-tabs-Bc9QOlJ8.js","assets/badge-C5Ilvf_J.js","assets/use-infinite-scroll-BXOEU8Y7.js","assets/useSuspenseInfiniteQuery-DWyGwvh9.js","assets/pair-CD8Vxcvs.js","assets/collapsible-CycyYnXe.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-BQ7hPzlx.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-C3IRibnI.js","assets/anchors-yqDzZN4K.js","assets/source-system-tabs-CnEGUb4r.js","assets/command-BpjWfGyr.js","assets/index-cEqwHhEg.js","assets/project-icon-DIXBuD-A.js","assets/required-auth-layout-DMNBbcf3.js","assets/use-org-sso-uleG21Aq.js","assets/use-org-notice-PUfO84YR.js","assets/shell-layout-CuFt8bor.css","assets/use-navigate-to-agent-Drdqs1cr.js","assets/use-thread-outputs-CpCqTMOi.js","assets/file-type-icon-Cg81au_Z.js","assets/sandbox-lifecycle-context-DxbfUbxP.js","assets/sandbox-url-D3mC8qhT.js","assets/use-task-metadata-C4MfiHBQ.js","assets/use-project-native-view-presence-01L5j4lu.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-B1FdrMZJ.js","assets/site-slug-uya6Wp4-.js","assets/virtual-mcp-CKi1xJsO.js","assets/use-status-sounds-DQ2pMmh0.js","assets/empty-state-CXolWOTn.js","assets/serial-task-queue-CGOeQgpr.js","assets/toolbar-DOOz2W24.js","assets/legacy-main-redirect-CySqEohs.js","assets/preview-dialog-CKWnRekk.js","assets/preview-content-DhEgigNG.js","assets/file-preview-kRDXQYfi.js","assets/utils-B-5U5Z26.js","assets/editor-BHnwprUT.js","assets/file-share-button-P5GnoZYM.js","assets/toolbar-icon-button-Dp-AbzNZ.js","assets/github-icon-CiNkodR8.js","assets/decode-html-entities-Cf7wUEql.js","assets/alert-dialog-CiKfgw9r.js","assets/use-debounced-value-D0SYNQsR.js","assets/task-status-CyTozLxL.js","assets/index-DDGTF8rc.css","assets/scroll-area-CaE3a4_T.js","assets/runnable-block-editor-Db2XbJYi.js","assets/monaco-editor-C5zvkMO4.js","assets/calendar-DGiOuDgZ.js","assets/rich-text-link-control-C6A8Q9Jd.js","assets/switch-D5GcuD9Z.js","assets/safe-image-url-D5z803Ot.js","assets/search-input-lFP9sD3O.js","assets/asset-utils-DJXdpjr9.js","assets/mustache-DQXz9E52.js","assets/page-seo-form-Cpi2Oike.js","assets/use-section-preview-base-lro_p1nx.js","assets/variant-matcher-override-CRlEf4IL.js"])))=>i.map(i=>d[i]);
2
+ import{r as v,ak as yt,al as Ge,am as Se,c as pe,b as Ce,j as n,K as Fr,e as $r,h as kt,B as Je,an as Br,I as Gt,ao as Ir,ap as zr,R as Kr,a9 as ut,a6 as mt,aq as Hr,a7 as ft,l as Ke,o as Ur,t as wn}from"./index-6GXqHE0w.js";import{A as Wr}from"./agent-view-guard-DomQyuot.js";import{u as Vr,a as St}from"./chat-context-HB_KOUNM.js";import{u as Kn,a as Jt,b as qr}from"./sandbox-lifecycle-context-DxbfUbxP.js";import{N as Gr,i as Jr,s as wt,n as Yt,a as Hn,f as Fe,v as Un,u as Wn,h as Yr,r as Vn,l as qn,b as Qr,c as Xr,d as Zr,e as es,g as ts,j as ns,k as rs,m as ss,w as os,D as is,o as kn,p as Sn,M as as,R as Pn,q as pt,t as jn,x as ls,y as cs}from"./index-CUa7fAjf.js";import{e as ds}from"./backoff-CrEUbyZT.js";import{r as us}from"./thread-intent-AJKohiRy.js";import{u as Gn}from"./use-session-runtime-TS34dEJv.js";import{t as ms}from"./ChevronUp-CbF1Gmeo.js";import{k as Jn,l as fs,m as ps,h as En,o as hs,p as Nn,q as gs,r as vs,u as xs}from"./agent-icon-vDfwuZu4.js";import{s as Cn}from"./Database01-zcGUPFsG.js";import{n as Yn}from"./LinkExternal01-DobnLseV.js";import{s as bs}from"./Plus-DaErdsG1.js";import{i as ys}from"./SearchLg-DxQfk550.js";import{T as ht}from"./toolbar-icon-button-Dp-AbzNZ.js";import{b as ws,a as ks,u as Qn,g as Ss,c as Ps,B as It,P as js,r as Es,R as Ns,d as Cs,e as Qt,f as Xn,h as Rs,l as Ts,m as Ls,i as _s,p as Os,j as Ds,S as zt}from"./runnable-block-editor-Db2XbJYi.js";import{w as gt}from"./variant-matcher-override-CRlEf4IL.js";import{u as As}from"./use-is-desktop-app-BNujXJc_.js";import{u as Ms}from"./shell-layout-C3IRibnI.js";import{u as Wt}from"./useQueries-C6OAJOs7.js";import{i as Fs}from"./ArrowRight-DZQert3q.js";import{C as Zn,a as er,b as $s,c as Bs,d as Is,e as zs}from"./command-BpjWfGyr.js";import{b as tr,D as nr,c as rr,d as sr,e as Ks}from"./dialog-DJBpjJnY.js";import{I as Rn}from"./input-TvernbmY.js";import{i as Hs}from"./AlertCircle-CgERhdh6.js";import{E as Xt}from"./empty-state-CXolWOTn.js";import{M as Us}from"./monaco-editor-C5zvkMO4.js";import{a as or}from"./source-system-tabs-CnEGUb4r.js";import{r as Ws}from"./virtual-mcp-CKi1xJsO.js";import{d as Vs}from"./delay-CnY5UFtP.js";import{b as Kt}from"./use-project-scope-DZ9tacAx.js";import{a as qs}from"./use-virtual-mcp-CMlCV8Oj.js";import{G as Tn}from"./github-icon-CiNkodR8.js";import{R as Gs}from"./repository-import-picker-DVnadPZ8.js";import{r as Js}from"./use-main-panel-tabs-CeyJWpQP.js";import{u as Ys}from"./use-task-metadata-C4MfiHBQ.js";import{a as Qs}from"./thread-route-CEvVLI2K.js";import"./use-panel-navigate-CCqZdv2O.js";import"./autosend-BzUVLyEq.js";import"./hooks-BSkeWBV7.js";import"./use-mcp-client-Bq-mjhw3.js";import"./auth-ksbj4Esa.js";import"./decopilot-sse-pool-D2Qtyl-A.js";import"./task-board-DyZE7mH1.js";import"./schema-Cnskrzk1.js";import"./use-ai-providers-Bg_y9f3x.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-zpeu2MCG.js";import"./use-organization-settings-DrJN-E78.js";import"./sandbox-url-D3mC8qhT.js";import"./CheckCircle-BGqFZ8sM.js";import"./XCircle-DudPVYQR.js";import"./XClose-DpDcHm9Y.js";import"./integration-icon-B6H5J7sl.js";import"./Tool02-BrfQeZRx.js";import"./usage-stats-D5mXC24B.js";import"./tool-namespace-ySa3S1AM.js";import"./form-EGCuUtdG.js";import"./label-aWEsDmHM.js";import"./utils-CVEq3hMx.js";import"./use-copy-GVBAvo9n.js";import"./markdown-CBvmi8AF.js";import"./Check-DClZtAIP.js";import"./Copy01-DiITYBuR.js";import"./Download01-C4blLpML.js";import"./ZoomOut-DdupjPFF.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./pair-CD8Vxcvs.js";import"./Stars01-f37Q7vDf.js";import"./ChevronRight-BNfU55ld.js";import"./collapsible-CycyYnXe.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BQ7hPzlx.js";import"./types-C1gRrnQe.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./Eye-Cd7v-liN.js";import"./Tool01-D6HOM_aJ.js";import"./Printer-BG6NfeSZ.js";import"./Share07-D1Sv14jA.js";import"./SearchMd-BNXjQ2BV.js";import"./Image01-CpXdMb8x.js";import"./use-connection-DCUpGmsb.js";import"./Users03-DWh3D2_T.js";import"./Palette-BBWt8owf.js";import"./use-navigate-to-agent-Drdqs1cr.js";import"./github-repo-C0igpkr9.js";import"./Link01-OqB-2yPE.js";import"./use-mcp-prompts-CWmeNLXn.js";import"./Globe01-BVji6jXS.js";import"./Monitor01-BTqHf-K4.js";import"./use-thread-outputs-CpCqTMOi.js";import"./file-type-icon-Cg81au_Z.js";import"./use-deco-credits-DjxZxHMq.js";import"./command-palette-store-D19nXDNm.js";import"./use-status-sounds-DQ2pMmh0.js";import"./question-004-sINsf4GQ.js";import"./serial-task-queue-CGOeQgpr.js";import"./toolbar-DOOz2W24.js";import"./select-Ce9NznPv.js";import"./Package-CCkk0w5h.js";import"./legacy-main-redirect-CySqEohs.js";import"./preview-dialog-CKWnRekk.js";import"./preview-content-DhEgigNG.js";import"./file-preview-kRDXQYfi.js";import"./use-org-fs-DG1oJieK.js";import"./utils-B-5U5Z26.js";import"./File02-CceuR6rF.js";import"./editor-BHnwprUT.js";import"./file-share-button-P5GnoZYM.js";import"./dropdown-menu-DzwCPltk.js";import"./DotsVertical-LmkOTjL4.js";import"./popover-Ci-k968-.js";import"./Key01-BsAAVoJx.js";import"./Play-CPeIBqH_.js";import"./UserSquare-yIpHwPSn.js";import"./anchors-yqDzZN4K.js";import"./textarea-BpFOmm9_.js";import"./Trash01-DQjprOwc.js";import"./decode-html-entities-Cf7wUEql.js";import"./tabs-DQoXHeZr.js";import"./GitBranch01-Dil6c2wv.js";import"./alert-dialog-CiKfgw9r.js";import"./use-debounced-value-D0SYNQsR.js";import"./useInfiniteQuery-CM35R0yt.js";import"./infiniteQueryObserver-C7FrFXuf.js";import"./toggle-group-Cs1yIHkK.js";import"./Zap-C5eiFR0N.js";import"./task-status-CyTozLxL.js";import"./slugify-CEUa2lfQ.js";import"./ArrowUp-lpfNBlP2.js";import"./ArrowLeft-BVx6AQzq.js";import"./TrendUp01-DIz6JZwT.js";import"./ChevronSelectorVertical-ilm76_0p.js";import"./CreditCard01-Zpy-4Wu9.js";import"./Settings02-DL8f5fN1.js";import"./SwitchHorizontal01-BIyO34Jw.js";import"./HardDrive-B4UY5qYp.js";import"./Sun-DjKz3VjB.js";import"./Shield01-BsobIEfQ.js";import"./Upload01-BDeLrRhf.js";import"./User01-B8a5ssx2.js";import"./Users01-BCRhQsCX.js";import"./scroll-area-CaE3a4_T.js";import"./calendar-DGiOuDgZ.js";import"./rich-text-link-control-C6A8Q9Jd.js";import"./switch-D5GcuD9Z.js";import"./safe-image-url-D5z803Ot.js";import"./search-input-lFP9sD3O.js";import"./use-file-configs-B1FdrMZJ.js";import"./asset-utils-DJXdpjr9.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./avatar-CW4PxBuN.js";import"./download-app-dialog-DYhv8XsJ.js";import"./project-icon-DIXBuD-A.js";import"./required-auth-layout-DMNBbcf3.js";import"./use-org-sso-uleG21Aq.js";import"./use-org-notice-PUfO84YR.js";import"./index-cEqwHhEg.js";import"./repository-picker-BGpoa_g_.js";import"./collection-search-j4HjYlys.js";import"./use-mcp-tools-DGdyHn8U.js";import"./drawer-B5NRhNfW.js";import"./input-BRqLi1TH.js";import"./use-open-billing-url-Cju1isPI.js";import"./index-B7ENeoW4.js";import"./checkbox-Dg_GkeBT.js";import"./ai-providers-logos-DD3qZ33J.js";import"./input-D8xrvlz-.js";import"./hooks-Bb9SArul.js";import"./use-members-Dnee1tF2.js";import"./use-org-auth-client-CVFBkaiI.js";import"./add-connection-dialog-BSihy3_s.js";import"./extract-connection-data-B1nPGa4h.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-By77bjvj.js";import"./connection-card-Br8jDKgZ.js";import"./use-registry-connections-cro5WL6A.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-CFXh6BoJ.js";import"./authenticate-and-persist-oauth-DMvGjBUE.js";import"./mcp-oauth-DhRKpyTH.js";import"./collection-tabs-Bc9QOlJ8.js";import"./badge-C5Ilvf_J.js";import"./use-infinite-scroll-BXOEU8Y7.js";import"./useSuspenseInfiniteQuery-DWyGwvh9.js";import"./use-project-native-view-presence-01L5j4lu.js";import"./site-slug-uya6Wp4-.js";const Xs={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Zs(t){const{previewState:e,progressStatus:r,fastPreviewActive:s=!1,fastPreviewReady:a=!1,codingSession:u=!1}=t,d=u?null:t.previewServerUrl;return e.kind==="suspended"||e.kind==="errored"?Xs:s&&a&&d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&r!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const eo=1e4,to=1e3,no=3e4;function ro({iframeRef:t,src:e,active:r}){const s=v.useRef(0),a=v.useRef(null),u=v.useRef(null),d=v.useRef(e),l=v.useRef(r);d.current=e,l.current=r;const i=()=>{a.current&&clearTimeout(a.current),u.current&&clearTimeout(u.current),a.current=null,u.current=null},c=()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,h()},eo)},h=()=>{if(!l.current||!d.current)return;u.current&&clearTimeout(u.current);const E=ds(no,to,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,w=d.current;!g||!w||!l.current||(g.src=w,c())},E)},p=()=>{s.current=0,i()},f=()=>{a.current&&(clearTimeout(a.current),a.current=null),h()};return v.useEffect(()=>{if(i(),s.current=0,!(!r||!e))return c(),i},[e,r]),{handleLoad:p,handleError:f}}var Ln;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(Ln||(Ln={}));const so=yt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:yt({width:Ge(),height:Ge()}),position:yt({x:Ge(),y:Ge()})}),oo=`(function() {
3
+ if (window.__visualEditorActive) return;
4
+ window.__visualEditorActive = true;
5
+
6
+ var cursorStyle = document.createElement("style");
7
+ cursorStyle.textContent = "* { cursor: default !important; }";
8
+ document.head.appendChild(cursorStyle);
9
+
10
+ var highlight = document.createElement("div");
11
+ highlight.style.cssText = "position:fixed;pointer-events:none;outline:2px solid #a855f7;background:rgba(168,85,247,0.08);border-radius:2px;z-index:2147483647;display:none;";
12
+ document.body.appendChild(highlight);
13
+
14
+ var badge = document.createElement("div");
15
+ badge.style.cssText = "position:fixed;pointer-events:none;background:#a855f7;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
16
+ document.body.appendChild(badge);
17
+
18
+ var lastTarget = null;
19
+ var rafPending = false;
20
+ var moveHandler = function(e) {
21
+ if (rafPending) return;
22
+ rafPending = true;
23
+ var target = e.target;
24
+ requestAnimationFrame(function() {
25
+ rafPending = false;
26
+ var el = target;
27
+ if (!el || el === highlight || el === badge) return;
28
+ if (el === lastTarget) return;
29
+ lastTarget = el;
30
+ var r = el.getBoundingClientRect();
31
+ highlight.style.display = "block";
32
+ highlight.style.top = r.top + "px";
33
+ highlight.style.left = r.left + "px";
34
+ highlight.style.width = r.width + "px";
35
+ highlight.style.height = r.height + "px";
36
+ var tag = el.tagName.toLowerCase();
37
+ var id = el.id ? "#" + el.id : "";
38
+ var cls = el.className && typeof el.className === "string"
39
+ ? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
40
+ : "";
41
+ badge.textContent = tag + id + cls;
42
+ badge.style.display = "block";
43
+ badge.style.top = Math.max(0, r.top - 20) + "px";
44
+ badge.style.left = r.left + "px";
45
+ });
46
+ };
47
+ document.addEventListener("mousemove", moveHandler, true);
48
+
49
+ var outHandler = function(e) {
50
+ if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
51
+ highlight.style.display = "none";
52
+ badge.style.display = "none";
53
+ lastTarget = null;
54
+ }
55
+ };
56
+ document.addEventListener("mouseout", outHandler, true);
57
+
58
+ var clickHandler = function(e) {
59
+ e.preventDefault();
60
+ e.stopImmediatePropagation();
61
+ var el = e.target;
62
+ if (!el || el === highlight || el === badge) return;
63
+
64
+ highlight.style.outline = "2px solid #a855f7";
65
+ highlight.style.background = "rgba(168,85,247,0.15)";
66
+ setTimeout(function() {
67
+ highlight.style.outline = "2px solid #a855f7";
68
+ highlight.style.background = "rgba(168,85,247,0.08)";
69
+ }, 400);
70
+
71
+ var tag = el.tagName.toLowerCase();
72
+ var id = el.id || "";
73
+ var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
74
+ var text = (el.textContent || "").trim().slice(0, 200);
75
+ var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
76
+
77
+ var closestSection = el.closest("section[data-manifest-key]");
78
+ var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
79
+
80
+ var ancestor = el;
81
+ var componentName = null;
82
+ for (var i = 0; i < 10 && ancestor; i++) {
83
+ if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
84
+ ancestor = ancestor.parentElement;
85
+ }
86
+
87
+ var parents = [];
88
+ var p = el.parentElement;
89
+ for (var j = 0; j < 4 && p && p !== document.body; j++) {
90
+ var pTag = p.tagName ? p.tagName.toLowerCase() : "";
91
+ var pId = p.id ? "#" + p.id : "";
92
+ var pCls = p.className && typeof p.className === "string"
93
+ ? "." + p.className.trim().split(/\\s+/)[0]
94
+ : "";
95
+ parents.unshift(pTag + pId + pCls);
96
+ p = p.parentElement;
97
+ }
98
+
99
+ window.parent.postMessage({
100
+ type: "visual-editor::element-clicked",
101
+ payload: {
102
+ tag: tag, id: id, classes: classes, text: text, html: html,
103
+ manifestKey: manifestKey, componentName: componentName,
104
+ parents: parents.join(" > "),
105
+ url: window.location.href, path: window.location.pathname,
106
+ viewport: { width: window.innerWidth, height: window.innerHeight },
107
+ position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
108
+ }
109
+ }, "*");
110
+ };
111
+ document.addEventListener("click", clickHandler, true);
112
+
113
+ window.addEventListener("message", function(e) {
114
+ // Only Studio's own postMessage (source === this frame's parent) may drive the bridge — a nested/downstream frame's forged message can't deactivate the editor.
115
+ if (e.source !== window.parent) return;
116
+ if (e.data && e.data.type === "visual-editor::deactivate") {
117
+ highlight.remove();
118
+ badge.remove();
119
+ cursorStyle.remove();
120
+ document.removeEventListener("mousemove", moveHandler, true);
121
+ document.removeEventListener("mouseout", outHandler, true);
122
+ document.removeEventListener("click", clickHandler, true);
123
+ window.__visualEditorActive = false;
124
+ }
125
+ });
126
+ })();`;function io(t,e){const r=t.map(()=>null),s=[];for(let f=0;f<t.length;f++)t[f]!==null&&s.push(f);const a=s.length,u=e.length;if(!a||!u)return r;const d=(f,E)=>{const g=t[s[f]??0];return!g||!g.length?1:g.indexOf(e[E]??"")>=0?2:0},l=[],i=[];for(let f=0;f<=a;f++)l.push(new Array(u+1).fill(0)),i.push(new Array(u+1).fill(2));for(let f=1;f<=a;f++){const E=l[f-1]??[],g=l[f]??[],w=i[f]??[];for(let b=1;b<=u;b++){let k=E[b]??0,N=2;const y=g[b-1]??0;y>k&&(k=y,N=0);const S=d(f-1,b-1),x=(E[b-1]??0)+S;S>0&&x>k&&(k=x,N=1),g[b]=k,w[b]=N}}let c=0,h=a,p=u;for(;h>0&&p>0;){const f=i[h]?.[p]??2;f===1?(r[s[h-1]??0]=p-1,c++,h--,p--):f===0?p--:h--}if(c===0&&u===a)for(let f=0;f<a;f++)r[s[f]??0]=f;return r}const ao=yt({sectionIndex:Ge(),manifestKey:Se(),clickSeq:Ge()}),_n=`(function() {
127
+ if (window.__cmsEditorActive) return;
128
+ window.__cmsEditorActive = true;
129
+
130
+ // Preserve scroll across variant-override navigations and save-reloads.
131
+ // Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
132
+ // or reloads it, which would otherwise jump to the top. We persist the scroll
133
+ // offset to sessionStorage (survives reload, same-origin) keyed by pathname
134
+ // (the override only changes the query, so the key is stable), then restore it
135
+ // on the next load — retried for ~1s so it outlasts re-hydration and lazy
136
+ // sections that grow the page after load. The recency guard avoids restoring a
137
+ // stale offset on a genuinely fresh visit.
138
+ var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
139
+ var saveScroll = function() {
140
+ try {
141
+ sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
142
+ x: window.scrollX, y: window.scrollY, t: Date.now()
143
+ }));
144
+ } catch (_) {}
145
+ };
146
+ var saveScrollPending = false;
147
+ window.addEventListener("scroll", function() {
148
+ if (saveScrollPending) return;
149
+ saveScrollPending = true;
150
+ requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
151
+ }, { passive: true });
152
+ (function restoreScroll() {
153
+ var raw = null;
154
+ try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
155
+ if (!raw) return;
156
+ var saved = null;
157
+ try { saved = JSON.parse(raw); } catch (_) { return; }
158
+ if (!saved || (Date.now() - saved.t) > 10000) return;
159
+ if (!saved.x && !saved.y) return;
160
+ var attempts = 0;
161
+ var apply = function() {
162
+ attempts++;
163
+ window.scrollTo(saved.x || 0, saved.y || 0);
164
+ if (attempts < 8) setTimeout(apply, 120);
165
+ };
166
+ apply();
167
+ })();
168
+
169
+ var highlight = document.createElement("div");
170
+ highlight.style.cssText = "position:absolute;pointer-events:none;outline:2px solid #06b6d4;background:rgba(6,182,212,0.06);border-radius:2px;z-index:2147483647;display:none;";
171
+ document.body.appendChild(highlight);
172
+
173
+ var badge = document.createElement("div");
174
+ badge.style.cssText = "position:absolute;pointer-events:none;background:#06b6d4;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
175
+ document.body.appendChild(badge);
176
+
177
+ var isTopLevelSection = function(el) {
178
+ return el && el.parentElement
179
+ ? !el.parentElement.closest("section[data-manifest-key]")
180
+ : true;
181
+ };
182
+
183
+ // All top-level page sections in DOM order (deco renders page sections as
184
+ // <section data-manifest-key>; nested islands/sections carry the attribute
185
+ // too, hence the top-level filter). This is the full DOM run, framework
186
+ // sections included — getAllSections() narrows it to the editable window.
187
+ var topLevelSections = function() {
188
+ return Array.from(document.querySelectorAll("section[data-manifest-key]"))
189
+ .filter(isTopLevelSection);
190
+ };
191
+
192
+ // Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
193
+ var sectionCandidates = [];
194
+
195
+ // Stringified from section-alignment.ts so both sides share one copy.
196
+ var alignSections = ${io.toString()};
197
+
198
+ // Indexed like the decofile array; unmapped entries stay null (not clickable).
199
+ var computeAlignment = function(tops) {
200
+ var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
201
+ return alignSections(sectionCandidates, domKeys).map(function(idx) {
202
+ return idx === null ? null : tops[idx];
203
+ });
204
+ };
205
+
206
+ // Editable sections, indexed to match the decofile array the panel uses.
207
+ // Recomputed from the live DOM each call (cheap, rAF-throttled) so it
208
+ // self-heals as client-rendered/lazy sections mount. Until the editor sends
209
+ // candidates, fall back to the full top-level run.
210
+ var getAllSections = function() {
211
+ var tops = topLevelSections();
212
+ return sectionCandidates.length ? computeAlignment(tops) : tops;
213
+ };
214
+
215
+ // Resolve to the OUTERMOST page-level section (clicking nested content still
216
+ // maps to the top-level section the panel indexes); null if it isn't in the
217
+ // aligned editable set (a framework section deco injected).
218
+ var findSection = function(el, out) {
219
+ var node = el;
220
+ var found = null;
221
+ while (node && node !== document.body) {
222
+ if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
223
+ found = node;
224
+ }
225
+ node = node.parentElement;
226
+ }
227
+ if (!found) return null;
228
+ var sections = getAllSections();
229
+ if (out) out.sections = sections;
230
+ return sections.indexOf(found) >= 0 ? found : null;
231
+ };
232
+
233
+ // A Lazy wrapper's key is just the loader — show the inner section's instead.
234
+ var LAZY_KEYS = [
235
+ "website/sections/Rendering/Lazy.tsx",
236
+ "website/sections/Rendering/SingleDeferred.tsx"
237
+ ];
238
+ var isLazyKey = function(key) {
239
+ return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
240
+ };
241
+ var displayKey = function(section) {
242
+ var key = section.getAttribute("data-manifest-key") || "section";
243
+ if (isLazyKey(key)) {
244
+ var inner = section.querySelector("section[data-manifest-key]");
245
+ if (inner) return inner.getAttribute("data-manifest-key") || key;
246
+ }
247
+ return key;
248
+ };
249
+
250
+ // Per-section metadata sent by the editor, aligned by index with
251
+ // getAllSections(). labels: names the DOM can't carry (a global section or a
252
+ // global inside async rendering); kinds: section type that drives the color.
253
+ var sectionLabels = [];
254
+ var sectionKinds = [];
255
+ var labelFor = function(section, sections) {
256
+ var idx = (sections || getAllSections()).indexOf(section);
257
+ if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
258
+ return displayKey(section);
259
+ };
260
+ var kindFor = function(section, sections) {
261
+ var idx = (sections || getAllSections()).indexOf(section);
262
+ return (idx >= 0 && sectionKinds[idx]) || "normal";
263
+ };
264
+
265
+ // Highlight palette by section kind: global = light purple, variant = green,
266
+ // normal = blue.
267
+ var COLORS = {
268
+ normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
269
+ global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
270
+ variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
271
+ };
272
+ var applyColor = function(kind) {
273
+ var c = COLORS[kind] || COLORS.normal;
274
+ highlight.style.outline = "2px solid " + c.solid;
275
+ highlight.style.background = c.bg;
276
+ badge.style.background = c.solid;
277
+ };
278
+
279
+ var lastSection = null;
280
+ var lastLabel = "";
281
+ var lastKind = "normal";
282
+ var rafPending = false;
283
+ // True while an in-place render fetch/swap is in flight; suppresses hover so it can't re-show the overlay right before the swap snapshots it.
284
+ var renderPending = false;
285
+
286
+ // Document-relative coordinates (rect + scroll) on absolutely-positioned
287
+ // nodes, so the browser scrolls the highlight together with the page
288
+ // natively — no per-frame JS repositioning, no scroll lag.
289
+ var positionHighlight = function(section) {
290
+ var r = section.getBoundingClientRect();
291
+ var top = r.top + window.scrollY;
292
+ var left = r.left + window.scrollX;
293
+ highlight.style.display = "block";
294
+ highlight.style.top = top + "px";
295
+ highlight.style.left = left + "px";
296
+ highlight.style.width = r.width + "px";
297
+ highlight.style.height = r.height + "px";
298
+ badge.textContent = lastLabel || displayKey(section);
299
+ badge.style.display = "block";
300
+ badge.style.top = Math.max(0, top - 20) + "px";
301
+ badge.style.left = left + "px";
302
+ };
303
+
304
+ var moveHandler = function(e) {
305
+ if (renderPending || rafPending) return;
306
+ rafPending = true;
307
+ var target = e.target;
308
+ requestAnimationFrame(function() {
309
+ rafPending = false;
310
+ if (renderPending) return;
311
+ if (!target || target === highlight || target === badge) return;
312
+ var out = {};
313
+ var section = findSection(target, out);
314
+ if (section === lastSection) return;
315
+ lastSection = section;
316
+ if (!section) {
317
+ highlight.style.display = "none";
318
+ badge.style.display = "none";
319
+ return;
320
+ }
321
+ lastLabel = labelFor(section, out.sections);
322
+ lastKind = kindFor(section, out.sections);
323
+ applyColor(lastKind);
324
+ positionHighlight(section);
325
+ });
326
+ };
327
+ document.addEventListener("mousemove", moveHandler, true);
328
+
329
+ // Window scroll is handled natively by the absolute positioning above; this
330
+ // only re-syncs on resize and on scrolls inside nested scroll containers
331
+ // (capture=true catches those), where document coordinates do shift.
332
+ var reposition = function() {
333
+ if (!lastSection || highlight.style.display === "none") return;
334
+ if (rafPending) return;
335
+ rafPending = true;
336
+ requestAnimationFrame(function() {
337
+ rafPending = false;
338
+ if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
339
+ });
340
+ };
341
+ window.addEventListener("scroll", reposition, { capture: true, passive: true });
342
+ window.addEventListener("resize", reposition, { passive: true });
343
+
344
+ var outHandler = function(e) {
345
+ if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
346
+ highlight.style.display = "none";
347
+ badge.style.display = "none";
348
+ lastSection = null;
349
+ }
350
+ };
351
+ document.addEventListener("mouseout", outHandler, true);
352
+
353
+ var clickSeq = 0;
354
+
355
+ // Blocks observes clicks to select sections in the side panel; it must not
356
+ // cancel the iframe page's own handlers or native control behavior.
357
+ var clickHandler = function(e) {
358
+ var target = e.target;
359
+ if (!target || target === highlight || target === badge) return;
360
+ var out = {};
361
+ var section = findSection(target, out);
362
+ if (!section) return;
363
+
364
+ var sectionIndex = out.sections.indexOf(section);
365
+ var manifestKey = section.getAttribute("data-manifest-key") || "";
366
+
367
+ var c = COLORS[lastKind] || COLORS.normal;
368
+ highlight.style.outline = "2px solid " + c.solid;
369
+ highlight.style.background = c.active;
370
+ setTimeout(function() {
371
+ highlight.style.background = c.bg;
372
+ }, 400);
373
+
374
+ clickSeq++;
375
+ window.parent.postMessage({
376
+ type: "cms-editor::section-clicked",
377
+ payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
378
+ }, "*");
379
+ };
380
+ document.addEventListener("click", clickHandler, true);
381
+
382
+ /**
383
+ * Navigation is disabled while editing: leaving the page would leave the
384
+ * panel editing the previous page's sections. Only the default action of a
385
+ * real navigation is cancelled, never propagation — in-page controls must
386
+ * keep working (#5567).
387
+ */
388
+ var isNavigatingAnchor = function(a) {
389
+ if (!a) return false;
390
+ var href = a.getAttribute("href");
391
+ if (!href) return false;
392
+ var trimmed = href.trim();
393
+ if (!trimmed || trimmed.charAt(0) === "#") return false;
394
+ if (/^javascript:/i.test(trimmed)) return false;
395
+ // Same document + fragment only scrolls.
396
+ try {
397
+ var url = new URL(a.href, location.href);
398
+ if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
399
+ } catch (_) {}
400
+ return true;
401
+ };
402
+ var navBlocker = function(e) {
403
+ var el = e.target;
404
+ var a = el && el.closest ? el.closest("a") : null;
405
+ if (!isNavigatingAnchor(a)) return;
406
+ e.preventDefault();
407
+ };
408
+ document.addEventListener("click", navBlocker, true);
409
+
410
+ var submitBlocker = function(e) { e.preventDefault(); };
411
+ document.addEventListener("submit", submitBlocker, true);
412
+
413
+ // Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
414
+ var renderCtrl = null;
415
+ var renderQueue = Promise.resolve();
416
+ var TRANSITION_TAG =
417
+ "<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
418
+ var renderInPlace = function(src, body) {
419
+ if (renderCtrl) renderCtrl.abort();
420
+ var ctrl = new AbortController();
421
+ renderCtrl = ctrl;
422
+ renderPending = true;
423
+ highlight.style.display = "none";
424
+ badge.style.display = "none";
425
+ window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
426
+ renderQueue = renderQueue.then(function() {
427
+ return fetch(src, {
428
+ method: "POST",
429
+ body: body,
430
+ signal: ctrl.signal,
431
+ headers: { accept: "text/html", "content-type": "application/json" }
432
+ }).then(function(res) {
433
+ if (!res.ok) throw new Error("render " + res.status);
434
+ return res.text();
435
+ }).then(function(html) {
436
+ var swap = function() {
437
+ document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
438
+ document.body.appendChild(highlight);
439
+ document.body.appendChild(badge);
440
+ // Old section is gone; hide the overlay until the next hover repositions it.
441
+ highlight.style.display = "none";
442
+ badge.style.display = "none";
443
+ lastSection = null;
444
+ };
445
+ var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
446
+ var doc = new DOMParser().parseFromString(headHtml, "text/html");
447
+ var sheets = Array.prototype.map.call(
448
+ doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
449
+ function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
450
+ );
451
+ return Promise.all(sheets).then(function() {
452
+ if (typeof document.startViewTransition === "function") {
453
+ return document.startViewTransition(swap).finished;
454
+ }
455
+ swap();
456
+ });
457
+ }).then(function() {
458
+ var t = document.getElementById("deco-disable-transitions");
459
+ if (t) t.remove();
460
+ if (ctrl === renderCtrl) renderPending = false;
461
+ window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
462
+ }).catch(function(err) {
463
+ if (ctrl === renderCtrl) renderPending = false;
464
+ if (err && err.name === "AbortError") return;
465
+ window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
466
+ });
467
+ });
468
+ };
469
+
470
+ window.addEventListener("message", function(e) {
471
+ // Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
472
+ if (e.source !== window.parent) return;
473
+ if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
474
+ renderInPlace(e.data.src, e.data.body);
475
+ return;
476
+ }
477
+ if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
478
+ sectionLabels = e.data.labels;
479
+ if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
480
+ if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
481
+ if (lastSection) {
482
+ lastLabel = labelFor(lastSection);
483
+ lastKind = kindFor(lastSection);
484
+ applyColor(lastKind);
485
+ if (highlight.style.display !== "none") positionHighlight(lastSection);
486
+ }
487
+ return;
488
+ }
489
+ if (e.data && e.data.type === "cms-editor::deactivate") {
490
+ highlight.remove();
491
+ badge.remove();
492
+ document.removeEventListener("mousemove", moveHandler, true);
493
+ document.removeEventListener("mouseout", outHandler, true);
494
+ document.removeEventListener("click", clickHandler, true);
495
+ // Or the page stays unnavigable after leaving Blocks mode.
496
+ document.removeEventListener("click", navBlocker, true);
497
+ document.removeEventListener("submit", submitBlocker, true);
498
+ window.removeEventListener("scroll", reposition, { capture: true });
499
+ window.removeEventListener("resize", reposition);
500
+ window.__cmsEditorActive = false;
501
+ }
502
+ });
503
+ })();`;function Vt(t,e){let r=t,s=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let a=0;s&&a<5;a++){const u=e[s];if(u&&typeof u=="object"&&"__resolveType"in u){const d=u.__resolveType;if(typeof d=="string"&&d&&d!==s){r=u,s=d;continue}}break}if(!s)return[];if(s.includes("flags/multivariate")){const a=Array.isArray(r.variants)?r.variants:[];if(a.length===0||a.every(l=>l?.rule?.__resolveType===Gr))return null;const d=[];for(const l of a){const i=l?.value;if(i&&typeof i=="object")for(const c of Vt(i,e)??[])d.includes(c)||d.push(c)}return d}if(Jr(s)){const a=r.section&&typeof r.section=="object"?Vt(r.section,e):[];return a===null?null:a.length?[s,...a]:[s]}return[s]}function qe(t){return t.replace(/[`*_]/g,"\\$&")}function lo(t,e){const r=[`The user selected an element on the live preview and asked: **"${qe(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&&r.push(`**Section resolveType:** \`${qe(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 s=`<${t.tag}${t.classes?` class="${qe(t.classes)}"`:""}>`;r.push(`**Clicked element:** \`${s}\``),t.parents&&r.push(`**DOM breadcrumb:** ${qe(t.parents)} > ${t.tag}`),t.text&&r.push(`**Text content:** "${qe(t.text)}"`),t.componentName&&r.push(`**Component name:** ${qe(t.componentName)}`);const a=t.html.replace(/```/g,"`` `");return r.push("","**HTML snippet:**","```html",a,"```"),r.push("","Please read the source file, locate the element, and apply the requested change."),r.join(`
504
+ `)}function co(t,e,r=320,s=44,a=12){const{x:u,y:d}=t,{width:l,height:i}=e,c=Math.max(a,Math.min(u-r/2,l-r-a)),p=d/i>.68?Math.max(a,d-s-18):Math.min(d+18,i-s-a);return{leftPct:c/l*100,topPct:p/i*100}}function uo(t){const e=pe.c(45),{element:r,onDismiss:s}=t,[a,u]=v.useState(""),d=v.useRef(null),{sendMessage:l}=Vr(),{openSidePanel:i}=Ms(),c=Ce();let h;e[0]!==r||e[1]!==a||e[2]!==s||e[3]!==i||e[4]!==l?(h=()=>{if(!a.trim())return;const D=lo(r,a);i(),l({parts:[{type:"text",text:D}]}),s()},e[0]=r,e[1]=a,e[2]=s,e[3]=i,e[4]=l,e[5]=h):h=e[5];const p=h;let f;e[6]!==r.position||e[7]!==r.viewport?(f=co(r.position,r.viewport),e[6]=r.position,e[7]=r.viewport,e[8]=f):f=e[8];const E=f,g=`${E.leftPct}%`,w=`${E.topPct}%`;let b;e[9]!==g||e[10]!==w?(b={left:g,top:w,width:"320px"},e[9]=g,e[10]=w,e[11]=b):b=e[11];let k;e[12]!==p?(k=D=>{D.preventDefault(),p()},e[12]=p,e[13]=k):k=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=D=>u(D.target.value),e[14]=N):N=e[14];let y;e[15]!==s?(y=D=>{D.key==="Escape"&&s()},e[15]=s,e[16]=y):y=e[16];let S;e[17]!==c?(S=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=S):S=e[18];let x;e[19]!==a||e[20]!==y||e[21]!==S?(x=n.jsx("input",{ref:d,autoFocus:!0,type:"text",value:a,onChange:N,onKeyDown:y,placeholder:S,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=a,e[20]=y,e[21]=S,e[22]=x):x=e[22];let P;e[23]!==a?(P=a.trim(),e[23]=a,e[24]=P):P=e[24];const M=!P;let j;e[25]!==c?(j=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=j):j=e[26];let $;e[27]!==c?($=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=$):$=e[28];let W;e[29]!==$?(W=n.jsx("title",{children:$}),e[29]=$,e[30]=W):W=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=K):K=e[31];let R;e[32]!==W?(R=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[W,K]}),e[32]=W,e[33]=R):R=e[33];let O;e[34]!==M||e[35]!==j||e[36]!==R?(O=n.jsx("button",{type:"submit",disabled:M,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:R}),e[34]=M,e[35]=j,e[36]=R,e[37]=O):O=e[37];let B;e[38]!==x||e[39]!==O||e[40]!==k?(B=n.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:k,children:[x,O]}),e[38]=x,e[39]=O,e[40]=k,e[41]=B):B=e[41];let V;return e[42]!==B||e[43]!==b?(V=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:B}),e[42]=B,e[43]=b,e[44]=V):V=e[44],V}const On="site-links",mo=/details?page|\bpdp\b/i,fo=/listingpage|\bplp\b/i;function po(t,e,r){const s=new Set;for(const l of r)mo.test(l)&&s.add("product"),fo.test(l)&&s.add("category");const a=wt(Yt(t)),u=a[a.length-1],d=a[a.length-2];return u?.type==="text"&&u.text==="/p"&&d?.type==="param"&&d.name===e&&s.add("product"),e==="*"&&a.some(l=>l.type==="param"&&l.name==="*")&&s.add("category"),s}const ho=["rosa","preto","pink","black"];function vt(t,e){const r=e.trim();return r?t(r):ho.flatMap(s=>t(s))}function go(t,e){const r=e.trim(),s=[];/^\d+$/.test(r)&&s.push({resolveType:t,props:{ids:[r]}});const u=r.includes("-")&&!/\s/.test(r)?r.replace(/-+/g," "):r;return s.push({resolveType:t,props:{query:u,count:10}}),s}const ir=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Zt(t){return t.split("/")[0]??""}function vo(t){const e=new Set;for(const r of t){const s=Zt(r);ir.has(s)&&e.add(s)}return e}function xo(t,e){const r=Zt(t);return!ir.has(r)||e.size===0?!0:e.has(r)}const bo=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>vt(r=>go(t,r),e),optionsFromPayload:xt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{props:{search:r,pageSize:10,currentPage:1}}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{term:r,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{query:r,term:r,count:10,hitsPerPage:10}}],e),optionsFromPayload:xt},{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:Eo}];function yo(t,e,r=new Set){const s=[...e],a=l=>{const i=[];for(const c of bo){if(c.kind!==l)continue;const h=s.find(p=>c.test(p)&&xo(p,r));h&&i.push({cand:c,resolveType:h})}return i.find(c=>r.has(Zt(c.resolveType)))??i[0]},u=(l,i,c)=>({kind:l.kind,id:`${l.kind}:${i}`,resolveType:i,clientFilter:l.clientFilter,isFallback:c,buildRequests:h=>l.buildRequests(i,h),optionsFromPayload:l.optionsFromPayload}),d=[];for(const l of["product","category"]){if(!t.has(l))continue;const i=a(l);i&&d.push(u(i.cand,i.resolveType,!1))}return t.size>0&&d.push(wo(t.has("category")?"category":"product")),d}function wo(t){return{kind:t,id:On,resolveType:On,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,r)=>Lo(e,r)}}function He(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function ko(t,e,r){const s=new Set,a=new Set,u=d=>{if(Array.isArray(d)){for(const c of d)u(c);return}const l=He(d);if(!l)return;const i=l.__resolveType;if(typeof i=="string"){if(r(i))s.add(i);else if(i in e&&!a.has(i)){a.add(i);const c=He(e[i])?.__resolveType;typeof c=="string"&&r(c)&&s.add(i),u(e[i])}}for(const c of Object.values(l))u(c)};return u(t),s}function ar(t){const e=new Set,r=[];for(const s of t)for(const a of s)e.has(a.value)||(e.add(a.value),r.push(a));return r}function lr(t){try{return decodeURIComponent(t)}catch{return t}}function So(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Po(t){const e=[];let r="^";for(const s of t)s.type==="text"?r+=So(s.text):(e.push(s.name),r+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${r}$`),order:e}}function cr(t,e,r){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const a=wt(Yt(e)),{pattern:u,order:d}=Po(a),l=d.indexOf(r);if(l===-1)return null;const i=s.match(u);if(!i)return null;const c=i[l+1]?.replace(/^\/+|\/+$/g,"");return c?lr(c):null}function xt(t,e){const r=He(t),s=Array.isArray(t)?t:Array.isArray(r?.products)?r.products:Array.isArray(r?.list)?r.list:[],a=[],u=new Set;for(const d of s){const l=He(d);if(!l)continue;const i=cr(l.url,e.template,e.paramName);if(!i||u.has(i))continue;u.add(i);const c=He(l.isVariantOf),h=typeof c?.name=="string"&&c.name||typeof l.name=="string"&&l.name||i,p=Array.isArray(l.image)?He(l.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;a.push({value:i,label:h,image:f})}return a}function jo(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const r=e.replace(/^\/+|\/+$/g,"");return r?lr(r):null}function Eo(t){const e=[],r=new Set,s=(a,u)=>{const d=He(a);if(!d)return;const l=typeof d.name=="string"&&d.name?d.name:"",i=l?[...u,l]:u,c=jo(d.url);if(c&&!r.has(c)&&(r.add(c),e.push({value:c,label:i.join(" › ")||c})),Array.isArray(d.children))for(const h of d.children)s(h,i)};if(Array.isArray(t))for(const a of t)s(a,[]);return e}const No=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 Co(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function Ro(t){if(typeof t!="string"||!t)return[];const e=[],r=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let s,a=0;for(;(s=r.exec(t))!==null&&a++<5e3;){const u=s[1]??"",d=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:d})}return e}function To(t){if(typeof t!="string"||!t)return[];const e=[],r=new Set,s=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,a=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,d=0;for(;(u=s.exec(t))!==null&&d++<3e3;){const l=(u[1]??"").replace(/\\\//g,"/");if(!l||r.has(l))continue;r.add(l);const i=t.slice(u.index,u.index+900).match(a)?.[1]?.replace(/\\\//g,"/");e.push({url:l,name:u[2]??"",image:i||void 0})}return e}function Lo(t,e){const r=[],s=new Set,a=(u,d,l,i)=>{if(r.length>=200)return;const c=cr(u,e.template,e.paramName);!c||s.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||l==="category"&&No.has(c.split("/")[0]??"")||(s.add(c),r.push({value:c,label:d&&d.length<=80?d:Co(c),kind:l,image:i}))};for(const{url:u,name:d,image:l}of To(t))a(u,d,"product",l);for(const{href:u,text:d}of Ro(t))u.startsWith("/")&&!u.startsWith("//")&&a(u,d,"category");return r}function tt(t,e,r=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,r)}const dr=1e4;function _o(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 Oo(t,{resolveType:e,props:r}){const s=await fetch(ws(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...r}),signal:AbortSignal.timeout(dr)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function Dn(t,e){const r=await fetch(ks(t,e),{signal:AbortSignal.timeout(dr)});if(!r.ok)throw new Error(`Failed to fetch page: ${r.status}`);return r.text()}async function Do(t,e,r){const s=e.optionsFromPayload(await Dn(t,"/"),r),a=s.find(d=>d.kind==="category");if(!a)return s;const u=Fe(r.template,{[r.paramName]:a.value});if(u==="/")return s;try{const d=e.optionsFromPayload(await Dn(t,u),r).filter(l=>l.kind==="product");return ar([s,d])}catch{return s}}function Ao(t,e,r){return Fr.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":r}`)}async function Mo(t,e,r,s){if(e.homepageLinks)return Do(t,e,s);const a=e.buildRequests?.(r)??[];if(a.length===0)return[];const u=await Promise.allSettled(a.map(l=>Oo(t,l))),d=u.filter(l=>l.status==="fulfilled").map(l=>l.value);if(d.length===0){const l=u.find(i=>i.status==="rejected");throw l?l.reason:new Error("Failed to fetch options")}return ar(d.map(l=>e.optionsFromPayload(l,s)))}function qt(t,e,r,s,a){return{queryKey:Ao(t,e,r),queryFn:()=>Mo(t,e,r,s),enabled:a,staleTime:6e4,retry:1}}function nt(t){const e=pe.c(16),{heading:r,iconKind:s,options:a,template:u,paramName:d,keyPrefix:l,onSelect:i}=t;if(a.length===0)return null;let c;if(e[0]!==s||e[1]!==l||e[2]!==i||e[3]!==a||e[4]!==d||e[5]!==u){let p;e[7]!==s||e[8]!==l||e[9]!==i||e[10]!==d||e[11]!==u?(p=f=>n.jsxs(er,{value:`${l}:${f.value}`,className:"gap-3 py-2",onSelect:()=>i(f.value),children:[s==="product"&&n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?n.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(Jn,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:f.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[d]:f.value})})]})]},`${l}:${f.value}`),e[7]=s,e[8]=l,e[9]=i,e[10]=d,e[11]=u,e[12]=p):p=e[12],c=a.map(p),e[0]=s,e[1]=l,e[2]=i,e[3]=a,e[4]=d,e[5]=u,e[6]=c}else c=e[6];let h;return e[13]!==r||e[14]!==c?(h=n.jsx(Zn,{heading:r,children:c}),e[13]=r,e[14]=c,e[15]=h):h=e[15],h}function An(t){const e=pe.c(2),{text:r}=t;let s;return e[0]!==r?(s=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r}),e[0]=r,e[1]=s):s=e[1],s}function Fo(t){const e=pe.c(52),{sources:r,template:s,paramName:a,value:u,sandboxRef:d,onCommit:l}=t,i=Ce(),[c,h]=v.useState(!1),[p,f]=v.useState(""),[E,g]=v.useState(""),w=v.useRef(null),b=a==="*"?i("sandbox.preview.catchAllParamLabel"):`:${a}`,k=_o(i),y=[...new Set(r.map(U=>k[U.kind].noun))].join(" or ");let S;e[0]!==i||e[1]!==y?(S=i("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=i,e[1]=y,e[2]=S):S=e[2];const x=S,P={template:s,paramName:a};let M;e[3]!==p?(M=(U,T)=>({source:U,query:T,options:U.clientFilter?tt(T.data??[],p):T.data??[]}),e[3]=p,e[4]=M):M=e[4];const j=M,$=r.filter(Wo),W=r.filter(Uo),K=Wt({queries:$.map(U=>qt(d,U,E,P,c))});let R;e[5]!==K||e[6]!==j?(R=(U,T)=>j(U,K[T]),e[5]=K,e[6]=j,e[7]=R):R=e[7];const O=$.map(R),B=O.length===0||O.every(Ho),V=Wt({queries:W.map(U=>qt(d,U,E,P,c&&B))});let D;e[8]!==V||e[9]!==j?(D=(U,T)=>j(U,V[T]),e[8]=V,e[9]=j,e[10]=D):D=e[10];const H=W.map(D),A=B?H:O,I=A.length===1&&A[0]?.source.homepageLinks?A[0]:null,L=I&&!I.query.isLoading&&!I.query.isError?I?.query.data??[]:[],Z=tt(L.filter(Ko),p),Y=tt(L.filter(zo),p),de=Z.length>0&&Y.length>0,q=U=>{h(U),w.current&&clearTimeout(w.current),f(U?u:""),g(U?u:"")};let X;e[11]===Symbol.for("react.memo_cache_sentinel")?(X=U=>{f(U),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{g(U)},300)},e[11]=X):X=e[11];const ee=X,J=U=>{l(U),q(!1)},ue=Hn(p),re=Fe(s,{[a]:ue}),G=nr,ie=tr,xe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",me=Io;let te;e[12]!==b||e[13]!==i?(te=i("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=i,e[14]=te):te=e[14];let ae;e[15]!==te?(ae=n.jsx(rr,{className:"sr-only",children:n.jsx(sr,{children:te})}),e[15]=te,e[16]=ae):ae=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=n.jsx(Jn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let ne;e[18]!==i?(ne=i("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=i,e[19]=ne):ne=e[19];let le;e[20]!==b?(le=n.jsx("span",{className:"rounded-sm bg-violet-500/15 px-1 py-0.5 font-mono text-[12px] text-violet-600 dark:text-violet-400",children:b}),e[20]=b,e[21]=le):le=e[21];let se;e[22]!==ne||e[23]!==le?(se=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ne," ",le]})]}),e[22]=ne,e[23]=le,e[24]=se):se=e[24];const Pe=Bs,Re=!1,$e="min-h-0 flex-1";let ge;e[25]!==x||e[26]!==p?(ge=n.jsx(Is,{autoFocus:!0,placeholder:x,value:p,onValueChange:ee}),e[25]=x,e[26]=p,e[27]=ge):ge=e[27];const Ye=$s,Oe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Te;e[28]!==i?(Te=i("sandbox.pathParamPickerChip.noResults"),e[28]=i,e[29]=Te):Te=e[29];let je;e[30]!==Te?(je=n.jsx(zs,{children:Te}),e[30]=Te,e[31]=je):je=e[31];const Be=ue&&n.jsx(Zn,{className:"shrink-0",children:n.jsxs(er,{value:`__raw__:${ue}`,className:"gap-3 py-2",onSelect:()=>J(ue),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(Fs,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:i("sandbox.pathParamPickerChip.useRawValue",{rawTerm:ue,paramLabel:b})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:re})]})]})}),De=de?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:Z,template:s,paramName:a,keyPrefix:`${I?.source.id}:cat`,onSelect:J})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:Y,template:s,paramName:a,keyPrefix:`${I?.source.id}:prod`,onSelect:J})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:A.map(U=>{const{source:T,query:fe,options:Me}=U,{noun:Pt}=k[T.kind];if(fe.isLoading)return n.jsx(An,{text:i("sandbox.pathParamPickerChip.loading",{noun:Pt})},T.id);if(fe.isError)return n.jsx(An,{text:i("sandbox.pathParamPickerChip.couldNotLoad")},T.id);if(T.homepageLinks){const Qe=fe.data??[];return n.jsxs(v.Fragment,{children:[n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:tt(Qe.filter(Bo),p),template:s,paramName:a,keyPrefix:`${T.id}:cat`,onSelect:J}),n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:tt(Qe.filter($o),p),template:s,paramName:a,keyPrefix:`${T.id}:prod`,onSelect:J})]},T.id)}return n.jsx(nt,{heading:A.length>1?k[T.kind].heading:void 0,iconKind:T.kind,options:Me,template:s,paramName:a,keyPrefix:T.id,onSelect:J},T.id)})});let Ae;e[32]!==Ye||e[33]!==je||e[34]!==Be||e[35]!==De?(Ae=n.jsxs(Ye,{className:Oe,children:[je,Be,De]}),e[32]=Ye,e[33]=je,e[34]=Be,e[35]=De,e[36]=Ae):Ae=e[36];let ve;e[37]!==Pe||e[38]!==ge||e[39]!==Ae?(ve=n.jsxs(Pe,{shouldFilter:Re,className:$e,children:[ge,Ae]}),e[37]=Pe,e[38]=ge,e[39]=Ae,e[40]=ve):ve=e[40];let Le;e[41]!==ie||e[42]!==ae||e[43]!==se||e[44]!==ve||e[45]!==me?(Le=n.jsxs(ie,{className:xe,onClick:me,children:[ae,se,ve]}),e[41]=ie,e[42]=ae,e[43]=se,e[44]=ve,e[45]=me,e[46]=Le):Le=e[46];let Ue;return e[47]!==G||e[48]!==q||e[49]!==c||e[50]!==Le?(Ue=n.jsx(G,{open:c,onOpenChange:q,children:Le}),e[47]=G,e[48]=q,e[49]=c,e[50]=Le,e[51]=Ue):Ue=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:i("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-sm bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400",onClick:U=>{U.stopPropagation(),q(!0)},children:u||b}),Ue]})}function $o(t){return t.kind==="product"}function Bo(t){return t.kind!=="product"}function Io(t){return t.stopPropagation()}function zo(t){return t.kind==="product"}function Ko(t){return t.kind!=="product"}function Ho(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Uo(t){return t.isFallback}function Wo(t){return!t.isFallback}function Vo(t){const e=pe.c(8),{sources:r,template:s,paramName:a,sandboxRef:u,onFill:d}=t;let l,i;if(e[0]!==a||e[1]!==u||e[2]!==r||e[3]!==s){const E={template:s,paramName:a},g=r.filter(qo);i=Wt,l=g.map(w=>qt(u,w,"",E,!0)),e[0]=a,e[1]=u,e[2]=r,e[3]=s,e[4]=l,e[5]=i}else l=e[4],i=e[5];let c;e[6]!==l?(c={queries:l},e[6]=l,e[7]=c):c=e[7];const h=i(c),[p,f]=v.useState(!1);if(!p)for(const E of h){if(E.isLoading)break;const g=E.data?.[0];if(g){f(!0),queueMicrotask(()=>d(g.value));break}}return null}function qo(t){return!t.isFallback}function Go(t){const e=pe.c(31),{name:r,value:s,onCommit:a}=t,u=Ce(),[d,l]=v.useState(s),[i,c]=v.useState(!1),h=v.useRef(!1);let p;e[0]!==r||e[1]!==u?(p=r==="*"?u("sandbox.preview.catchAllParamLabel"):`:${r}`,e[0]=r,e[1]=u,e[2]=p):p=e[2];const f=p,E=d||f;let g;e[3]!==E?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=g):g=e[4];let w;e[5]!==f||e[6]!==u?(w=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=w):w=e[7];let b,k;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>l(j.target.value),k=()=>c(!0),e[8]=b,e[9]=k):(b=e[8],k=e[9]);let N;e[10]!==s?(N=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,l(s),j.currentTarget.blur())},e[10]=s,e[11]=N):N=e[11];let y;e[12]!==d||e[13]!==a||e[14]!==s?(y=()=>{if(c(!1),h.current){h.current=!1;return}const j=Hn(d);l(j),j!==s&&a(j)},e[12]=d,e[13]=a,e[14]=s,e[15]=y):y=e[15];let S;e[16]!==d||e[17]!==f||e[18]!==w||e[19]!==N||e[20]!==y?(S=n.jsx("input",{type:"text",value:d,placeholder:f,title:w,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-violet-500/15 px-1 text-[12px] text-violet-600 outline-none placeholder:text-violet-500/60 focus:bg-violet-500/25 dark:text-violet-400",onClick:Jo,onChange:b,onFocus:k,onKeyDown:N,onBlur:y}),e[16]=d,e[17]=f,e[18]=w,e[19]=N,e[20]=y,e[21]=S):S=e[21];let x;e[22]!==g||e[23]!==S?(x=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,S]}),e[22]=g,e[23]=S,e[24]=x):x=e[24];let P;e[25]!==i||e[26]!==u?(P=i&&n.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[n.jsx(fs,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=i,e[26]=u,e[27]=P):P=e[27];let M;return e[28]!==P||e[29]!==x?(M=n.jsxs(n.Fragment,{children:[x,P]}),e[28]=P,e[29]=x,e[30]=M):M=e[30],M}function Jo(t){return t.stopPropagation()}function Yo(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const r=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${r.host}${s}`}catch{return e}}function Qo(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function Xo(t){const e=pe.c(5);let r;e[0]!==t?(r=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=r):r=e[1];const s=Qn(r);let a;return e[2]!==t||e[3]!==s?(a={mutationFn:async u=>{const{name:d,path:l,template:i}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const c=Ss(d),h=i?{...i,name:d,path:l}:Ps(d,l);return await s.mutateAsync({blockKey:c,data:h}),{key:c,name:d,path:l}}},e[2]=t,e[3]=s,e[4]=a):a=e[4],$r(a)}function Zo(t){const e=pe.c(89),{open:r,onOpenChange:s,isPending:a,error:u,templates:d,onSubmit:l}=t,i=a===void 0?!1:a,c=Ce();let h;e[0]!==c?(h=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=h):h=e[1];const[p,f]=v.useState(h);let E;e[2]!==c?(E=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=E):E=e[3];const[g,w]=v.useState(E),[b,k]=v.useState(It),[N,y]=v.useState(null),[S,x]=v.useState(r);r!==S&&(x(r),r&&(f(c("sectionsEditor.createPageModal.defaultPageName")),w(c("sectionsEditor.createPageModal.defaultPagePath")),k(It),y(null)));const P=!!d?.length;let M;e[4]!==i||e[5]!==s?(M=ne=>{!ne&&!i&&(y(null),s(!1))},e[4]=i,e[5]=s,e[6]=M):M=e[6];const j=M;let $;e[7]!==i||e[8]!==p||e[9]!==l||e[10]!==g||e[11]!==P||e[12]!==b?($=async ne=>{ne.preventDefault();const le=p.trim(),se=g.trim();if(!le||!se||i)return;const Pe=Un(se);if(Pe){y(Pe);return}y(null),await l({name:le,path:se,templateKey:P&&b!==It?b:null})},e[7]=i,e[8]=p,e[9]=l,e[10]=g,e[11]=P,e[12]=b,e[13]=$):$=e[13];const W=$,K=N??u;let R;e[14]!==c?(R=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=R):R=e[15];let O;e[16]!==R?(O=n.jsx(rr,{children:n.jsx(sr,{children:R})}),e[16]=R,e[17]=O):O=e[17];let B;e[18]!==c?(B=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=B):B=e[19];let V;e[20]!==B?(V=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:B}),e[20]=B,e[21]=V):V=e[21];let D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=ne=>f(ne.target.value),e[22]=D):D=e[22];let H;e[23]!==c?(H=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=H):H=e[24];let A;e[25]!==i||e[26]!==p||e[27]!==H?(A=n.jsx(Rn,{id:"new-page-name",value:p,onChange:D,placeholder:H,autoFocus:!0,disabled:i}),e[25]=i,e[26]=p,e[27]=H,e[28]=A):A=e[28];let I;e[29]!==A||e[30]!==V?(I=n.jsxs("div",{className:"space-y-1.5",children:[V,A]}),e[29]=A,e[30]=V,e[31]=I):I=e[31];let Q;e[32]!==c?(Q=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=Q):Q=e[33];let L;e[34]!==Q?(L=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:Q}),e[34]=Q,e[35]=L):L=e[35];let Z;e[36]===Symbol.for("react.memo_cache_sentinel")?(Z=ne=>w(ne.target.value),e[36]=Z):Z=e[36];let Y;e[37]!==c?(Y=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=Y):Y=e[38];let de;e[39]!==i||e[40]!==g||e[41]!==Y?(de=n.jsx(Rn,{id:"new-page-path",value:g,onChange:Z,placeholder:Y,disabled:i}),e[39]=i,e[40]=g,e[41]=Y,e[42]=de):de=e[42];let q;e[43]!==L||e[44]!==de?(q=n.jsxs("div",{className:"space-y-1.5",children:[L,de]}),e[43]=L,e[44]=de,e[45]=q):q=e[45];let X;e[46]!==i||e[47]!==P||e[48]!==c||e[49]!==b||e[50]!==d?(X=P&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),n.jsx(js,{id:"new-page-template",value:b,onChange:k,templates:d??[],disabled:i})]}),e[46]=i,e[47]=P,e[48]=c,e[49]=b,e[50]=d,e[51]=X):X=e[51];let ee;e[52]!==K?(ee=K&&n.jsx("p",{className:"text-xs text-destructive",children:K}),e[52]=K,e[53]=ee):ee=e[53];let J;e[54]!==I||e[55]!==q||e[56]!==X||e[57]!==ee?(J=n.jsxs("div",{className:"space-y-4 py-4",children:[I,q,X,ee]}),e[54]=I,e[55]=q,e[56]=X,e[57]=ee,e[58]=J):J=e[58];let ue;e[59]!==s?(ue=()=>s(!1),e[59]=s,e[60]=ue):ue=e[60];let re;e[61]!==c?(re=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=re):re=e[62];let G;e[63]!==i||e[64]!==ue||e[65]!==re?(G=n.jsx(Je,{type:"button",variant:"outline",onClick:ue,disabled:i,children:re}),e[63]=i,e[64]=ue,e[65]=re,e[66]=G):G=e[66];let ie;e[67]!==i||e[68]!==p||e[69]!==g?(ie=!p.trim()||!g.trim()||i,e[67]=i,e[68]=p,e[69]=g,e[70]=ie):ie=e[70];let xe;e[71]!==i||e[72]!==c?(xe=i?n.jsxs(n.Fragment,{children:[n.jsx(kt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=i,e[72]=c,e[73]=xe):xe=e[73];let me;e[74]!==ie||e[75]!==xe?(me=n.jsx(Je,{type:"submit",disabled:ie,children:xe}),e[74]=ie,e[75]=xe,e[76]=me):me=e[76];let te;e[77]!==G||e[78]!==me?(te=n.jsxs(Ks,{children:[G,me]}),e[77]=G,e[78]=me,e[79]=te):te=e[79];let ae;e[80]!==W||e[81]!==J||e[82]!==te||e[83]!==O?(ae=n.jsx(tr,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:W,children:[O,J,te]})}),e[80]=W,e[81]=J,e[82]=te,e[83]=O,e[84]=ae):ae=e[84];let be;return e[85]!==j||e[86]!==r||e[87]!==ae?(be=n.jsx(nr,{open:r,onOpenChange:j,children:ae}),e[85]=j,e[86]=r,e[87]=ae,e[88]=be):be=e[88],be}function ei(t){const e=pe.c(29),{orgSlug:r,virtualMcpId:s,branch:a,previewUrl:u,meta:d,decofile:l,blockKey:i}=t,c=Ce();let h;e[0]!==a||e[1]!==r||e[2]!==s?(h={orgSlug:r,virtualMcpId:s,branch:a},e[0]=a,e[1]=r,e[2]=s,e[3]=h):h=e[3];const p=Qn(h);let f;e[4]!==p?(f=Cs((x,P)=>p.mutate({blockKey:x,data:P})),e[4]=p,e[5]=f):f=e[5];const E=f;let g;e[6]!==i||e[7]!==l?(g=Es(l,i),e[6]=i,e[7]=l,e[8]=g):g=e[8];const{resolveType:w,props:b,title:k}=g;if(!w){let x;e[9]!==c?(x=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=x):x=e[10];let P;return e[11]!==x?(P=n.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:x}),e[11]=x,e[12]=P):P=e[12],P}const N=`loader:${i}`;let y;e[13]!==i||e[14]!==w||e[15]!==k?(y={mode:"saved",blockKey:i,resolveType:w,title:k},e[13]=i,e[14]=w,e[15]=k,e[16]=y):y=e[16];let S;return e[17]!==a||e[18]!==l||e[19]!==d||e[20]!==r||e[21]!==u||e[22]!==b||e[23]!==p.isPending||e[24]!==E||e[25]!==N||e[26]!==y||e[27]!==s?(S=n.jsx(Ns,{orgSlug:r,virtualMcpId:s,branch:a,previewUrl:u,meta:d,decofile:l,kind:"loaders",target:y,initialValue:b,isCreating:p.isPending,onCreate:ti,onSaveReferencedBlock:E,showRun:!1},N),e[17]=a,e[18]=l,e[19]=d,e[20]=r,e[21]=u,e[22]=b,e[23]=p.isPending,e[24]=E,e[25]=N,e[26]=y,e[27]=s,e[28]=S):S=e[28],S}async function ti(){}function ni(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Mn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:ni(t.error)}}function ri(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 si(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=ri(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const r=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return r&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(a=>a.status==="error"&&!a.hasData&&a.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:r?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 oi="https://github.com/decocms/blocks";function ii(){const t=pe.c(14),e=Ce();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ps,{size:48,className:"text-muted-foreground"}),t[0]=r):r=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e?(a=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=a):a=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Yn,{size:14}),t[7]=d):d=t[7];let l;t[8]!==u?(l=n.jsx(Je,{size:"sm",asChild:!0,children:n.jsxs("a",{href:oi,target:"_blank",rel:"noreferrer",children:[u,d]})}),t[8]=u,t[9]=l):l=t[9];let i;return t[10]!==s||t[11]!==a||t[12]!==l?(i=n.jsx(Xt,{className:"h-full w-full",image:r,title:s,description:a,actions:l}),t[10]=s,t[11]=a,t[12]=l,t[13]=i):i=t[13],i}function ai(t){const e=pe.c(15),{source:r,onRetry:s}=t,a=Ce();let u;e[0]!==r||e[1]!==a?(u=a(r==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=r,e[1]=a,e[2]=u):u=e[2];const d=u;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Hs,{size:48,className:"text-muted-foreground"}),e[3]=l):l=e[3];let i;e[4]!==a?(i=a("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=a,e[5]=i):i=e[5];let c;e[6]!==a?(c=a("mainPanelTabs.blocksTabStates.retry"),e[6]=a,e[7]=c):c=e[7];let h;e[8]!==s||e[9]!==c?(h=n.jsx(Je,{variant:"outline",size:"sm",onClick:s,children:c}),e[8]=s,e[9]=c,e[10]=h):h=e[10];let p;return e[11]!==d||e[12]!==i||e[13]!==h?(p=n.jsx(Xt,{image:l,title:i,description:d,actions:h}),e[11]=d,e[12]=i,e[13]=h,e[14]=p):p=e[14],p}const li=v.lazy(()=>Br(()=>import("./sections-editor-D-W8vM7g.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,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192])).then(t=>({default:t.SectionsEditor})));function Fn(t){const e=pe.c(49),{virtualMcpId:r,externalSelection:s,onViewJsonFile:a}=t,u=s===void 0?null:s,{org:d}=Gt(),{currentBranch:l,taskId:i}=St(),c=Kn(),h=Jt(),p=Wn(),f=c.lifecycle.phase==="running",E=h.previewUrl;let g;e[0]!==l||e[1]!==d||e[2]!==E||e[3]!==i||e[4]!==r?(g=l?{orgSlug:d.slug,virtualMcpId:r,branch:l,threadId:i??null,previewUrl:E}:null,e[0]=l,e[1]=d,e[2]=E,e[3]=i,e[4]=r,e[5]=g):g=e[5];const w=g;let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const k=Qt(w,b);let N;e[8]!==f?(N={fetchEnabled:f},e[8]=f,e[9]=N):N=e[9];const y=Xn(w,N),S=si({lifecyclePhase:c.lifecycle.phase,decofile:Mn(k),meta:Mn(y),hasEditableContent:Yr(k.data,y.data),fastPreviewActive:Gn(r).runtime==="cms"}),x=ci;if(S.kind==="loading"){let L;return e[10]===Symbol.for("react.memo_cache_sentinel")?(L=x(n.jsx(Ir,{})),e[10]=L):L=e[10],L}if(S.kind==="empty"){let L;return e[11]===Symbol.for("react.memo_cache_sentinel")?(L=x(n.jsx(ii,{})),e[11]=L):L=e[11],L}if(S.kind==="error"){let L;e[12]!==k||e[13]!==h||e[14]!==y||e[15]!==S.source?(L=()=>{if(S.source==="sandbox"){h.retry();return}Promise.all([k.refetch(),y.refetch()])},e[12]=k,e[13]=h,e[14]=y,e[15]=S.source,e[16]=L):L=e[16];const Z=L;let Y;return e[17]!==Z||e[18]!==S.source?(Y=x(n.jsx(ai,{source:S.source,onRetry:Z})),e[17]=Z,e[18]=S.source,e[19]=Y):Y=e[19],Y}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=L=>x(n.jsx("div",{className:"h-full min-h-0",children:L})),e[20]=P):P=e[20];const M=P,j=p.state.target;if(j?.kind==="loader"&&k.data&&y.data){const L=l??"",Z=E??null;let Y;return e[21]!==k.data||e[22]!==y.data||e[23]!==d.slug||e[24]!==L||e[25]!==Z||e[26]!==j.key||e[27]!==r?(Y=M(n.jsx(ei,{orgSlug:d.slug,virtualMcpId:r,branch:L,previewUrl:Z,meta:y.data,decofile:k.data,blockKey:j.key})),e[21]=k.data,e[22]=y.data,e[23]=d.slug,e[24]=L,e[25]=Z,e[26]=j.key,e[27]=r,e[28]=Y):Y=e[28],Y}let $;e[29]!==l||e[30]!==d.slug||e[31]!==j||e[32]!==r?($=j||!l?null:Vn(qn(d.slug,r,l)),e[29]=l,e[30]=d.slug,e[31]=j,e[32]=r,e[33]=$):$=e[33];const W=$;let K="/",R=null,O=null;j?.kind==="page"?(K=j.path,R=j.key):j?.kind==="section"?O=j.key:W&&(K=W.path,R=W.pageKey);const B=R?`page:${R}`:O?`section:${O}`:`path:${K}`;let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}),e[34]=V):V=e[34];const D=l??"",H=E??void 0,A=O?null:u,I=!!R&&p.state.editSeoPageKey===R;let Q;return e[35]!==O||e[36]!==R||e[37]!==K||e[38]!==B||e[39]!==a||e[40]!==d.slug||e[41]!==A||e[42]!==I||e[43]!==D||e[44]!==H||e[45]!==r||e[46]!==p.consumeEditSeo||e[47]!==p.setVariantOverride?(Q=M(n.jsx(v.Suspense,{fallback:V,children:n.jsx(li,{orgSlug:d.slug,virtualMcpId:r,branch:D,previewReady:!0,previewUrl:H,currentPath:K,activePageBlockKey:R,activeGlobalBlockKey:O,externalSelection:A,initialEditSeo:I,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onViewJsonFile:a},B)})),e[35]=O,e[36]=R,e[37]=K,e[38]=B,e[39]=a,e[40]=d.slug,e[41]=A,e[42]=I,e[43]=D,e[44]=H,e[45]=r,e[46]=p.consumeEditSeo,e[47]=p.setVariantOverride,e[48]=Q):Q=e[48],Q}function ci(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function $n(t){const e=pe.c(44),{virtualMcpId:r,pageKey:s,onClose:a,ref:u}=t,d=Ce(),{org:l}=Gt(),{currentBranch:i,taskId:c}=St(),p=Jt().previewUrl;let f;e[0]!==i||e[1]!==l.slug||e[2]!==p||e[3]!==c||e[4]!==r?(f=i?{orgSlug:l.slug,virtualMcpId:r,branch:i,threadId:c??null,previewUrl:p}:null,e[0]=i,e[1]=l.slug,e[2]=p,e[3]=c,e[4]=r,e[5]=f):f=e[5];const g=Qt(f),w=i??"";let b;e[6]!==l.slug||e[7]!==w||e[8]!==r?(b={orgSlug:l.slug,virtualMcpId:r,branch:w},e[6]=l.slug,e[7]=w,e[8]=r,e[9]=b):b=e[9];const{save:k,flush:N}=Rs(b),y=g.data?.[s],S=g.data===void 0&&g.isLoading,x=g.data!==void 0&&y===void 0,P=!i||x||S;let M;e[10]!==y?(M=y===void 0?"":JSON.stringify(y,null,2),e[10]=y,e[11]=M):M=e[11];const j=M;let $;e[12]!==s||e[13]!==P||e[14]!==k?($=Q=>{if(P)return;let L;try{L=JSON.parse(Q)}catch{return}L===null||typeof L!="object"||Array.isArray(L)||k(s,L)},e[12]=s,e[13]=P,e[14]=k,e[15]=$):$=e[15];const W=$;let K;e[16]!==N?(K=()=>({flush:N}),e[16]=N,e[17]=K):K=e[17],v.useImperativeHandle(u,K);let R;e[18]!==d?(R=d("sectionsEditor.pageJsonDialog.titleShort"),e[18]=d,e[19]=R):R=e[19];let O;e[20]!==R?(O=n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:R}),e[20]=R,e[21]=O):O=e[21];let B;e[22]!==d?(B=d("sectionsEditor.pageJsonDialog.close"),e[22]=d,e[23]=B):B=e[23];let V;e[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(zr,{size:14}),e[24]=V):V=e[24];let D;e[25]!==a||e[26]!==B?(D=n.jsx(Je,{variant:"ghost",size:"icon",onClick:a,"aria-label":B,className:"size-7 shrink-0",children:V}),e[25]=a,e[26]=B,e[27]=D):D=e[27];let H;e[28]!==D||e[29]!==O?(H=n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[O,D]}),e[28]=D,e[29]=O,e[30]=H):H=e[30];let A;e[31]!==g.data||e[32]!==N||e[33]!==j||e[34]!==S||e[35]!==x||e[36]!==s||e[37]!==P||e[38]!==W||e[39]!==d?(A=S?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}):x?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(Us,{code:j,language:"json",readOnly:P,height:"100%",onChange:Q=>W(Q??""),onSave:Q=>{W(Q),N()}},`${s}:${g.data===void 0?"loading":"ready"}`)}),e[31]=g.data,e[32]=N,e[33]=j,e[34]=S,e[35]=x,e[36]=s,e[37]=P,e[38]=W,e[39]=d,e[40]=A):A=e[40];let I;return e[41]!==H||e[42]!==A?(I=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[H,A]}),e[41]=H,e[42]=A,e[43]=I):I=e[43],I}function ur(t){return t.contentEditingEnabled&&!t.isMobile}function di(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function ui(t){return ur({contentEditingEnabled:or(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function mi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const fi=500,pi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Bn=1,Ht=["desktop","mobile","tablet"],In={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function zn(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}function hi(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 bt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ut(t,e){try{return new URL(t,e).href}catch{return null}}function gi(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 r={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:r,effective:r.url}}return{pin:t,effective:t?.url??null}}function vi(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function xi(t,e,r){const s=t.toLowerCase(),a=e.toLowerCase(),u=a.split("/").filter(Boolean),d=i=>{if(i===r)return 100;const c=i.indexOf(r);if(c===-1)return 0;let h=40;return c===0?h+=30:/[\s/-]/.test(i[c-1]??"")&&(h+=20),h+=Math.round(r.length/i.length*20),h};let l=Math.max(d(s),d(a));return u.at(-1)===r?l=Math.max(l,95):u.includes(r)&&(l=Math.max(l,90)),l}function bi(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function yi({virtualMcpId:t}){const e=Ce(),r=As(),s=Kr(),a=Qr(),{currentBranch:u,taskId:d}=St(),l=Wn(),i=Xr(),c=Gn(t),h=Ws(i?.entity?.id===t?i.entity.metadata?.ui?.layout??null:null),p=or(h),f=ur({contentEditingEnabled:p,isMobile:s}),[E,g]=v.useState(()=>ui({cmsMode:h,isMobile:s})),[w,b]=v.useState("desktop"),[k,N]=v.useState(null),[y,S]=v.useState(null),x=v.useRef(null),P=v.useRef(null),[M,j]=v.useState(!1),$=v.useRef(null),W=()=>{$.current?.flush(),j(!1)},K=()=>j(o=>(o&&$.current?.flush(),!o)),[R,O]=v.useState({width:0,height:0}),[B,V]=v.useState(null),[D,H]=v.useState(!1),[A,I]=v.useState(""),Q=v.useRef(null),[L,Z]=v.useState(!1),[Y,de]=v.useState(),[q,X]=v.useState(null),[ee,J]=v.useState(null),[ue,re]=v.useState(null),[G,ie]=v.useState("/"),[xe,me]=v.useState(null),[te,ae]=v.useState({}),[be,ne]=v.useState(!1),le=v.useRef(null),se=()=>{ne(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>ne(!1),15e3)},Pe=()=>{le.current&&(clearTimeout(le.current),le.current=null),ne(!1)},{org:Re}=Gt(),$e=Kn(),ge=Jt(),Ye=ge.vmEntry,Oe=ge.previewUrl,Te=$e.lifecycle.phase,je=Te==="running",Be=i?.entity?.id===t?us(i.entity.metadata):null,De=i?.entity?.id===t&&c.runtime==="cms",Ae=c.projectDefault==="cms",ve=Zr({sandboxUrl:Oe,previewServerUrl:Be,fastPreviewActive:De}),Le=t&&u?{orgSlug:Re.slug,virtualMcpId:t,branch:u,threadId:d??null,previewUrl:Oe}:null,Ue=Qt(Le,{fetchEnabled:je}),U=Xn(Le,{fetchEnabled:je}),T=Ue.data,fe=U.data,Me=T?es(T).sort((o,m)=>o.name.localeCompare(m.name)):[],Pt=t&&u?{orgSlug:Re.slug,virtualMcpId:t,branch:u}:null,Qe=Xo(Pt),jt=T&&fe?ts(T,fe):[],en=T&&fe?Ts(fe,T,"loaders"):[],We=A?(()=>{const o=A.toLowerCase();return Me.map(m=>({page:m,score:xi(m.name,m.path,o)})).filter(({score:m})=>m>0).sort((m,C)=>C.score-m.score||m.page.path.length-C.page.path.length).map(({page:m})=>m)})():Me,rt=jt.filter(o=>{if(!A)return!0;const m=A.toLowerCase();return o.name.toLowerCase().includes(m)||o.key.toLowerCase().includes(m)||o.resolveType.toLowerCase().includes(m)}),tn=f?en:[],Et=tn.filter(o=>{if(!A)return!0;const m=A.toLowerCase();return o.title.toLowerCase().includes(m)||o.key.toLowerCase().includes(m)||o.resolveType.toLowerCase().includes(m)}),nn=ee?en.find(o=>o.key===ee)??null:null,Ee=Yt,Nt=q||ee?null:ns(Me,G,xe),Ct=q?q.name:nn?.title??Nt?.name,z=Nt?.key??null,st=Nt?.path??null,Ve=(z?te[z]:void 0)??{},ye=Fe(G,Ve),Rt={};if(je&&Oe&&fe&&T){const o=Ls(fe,"loaders"),m=z?T[z]:void 0,C=ko(m,T,oe=>o.has(oe)),_=vo(C);for(const oe of wt(G)){if(oe.type!=="param")continue;const _e=po(G,oe.name,C),ke=yo(_e,o,_);ke.length>0&&(Rt[oe.name]=ke)}}const ot=t&&u?{orgSlug:Re.slug,virtualMcpId:t,branch:u,threadId:d??null}:null,rn=T&&z?_s(T,z,0):[],sn=T?Os(rn,T):[],Tt=sn.map(o=>o.isSavedBlock?o.label:""),Lt=sn.map(o=>o.isSavedBlock?"global":o.isMultivariate?"variant":"normal"),_t=rn.map(o=>Vt(o,T??{})),on=v.useRef(null),Ne=v.useRef(null),mr=$e.status.state==="paused",Ot=$e.phase,an=Ds({claimPhase:Ot,lifecycle:$e.lifecycle}),Ie=ge.previewState,fr=ge.userStopped,pr=rs(Re.slug,t??"",u??""),{url:ze}=ss(De&&t&&u?{orgSlug:Re.slug,virtualMcpId:t,branch:u,previewServerUrl:Be??null,path:ye}:null),hr=Ae&&c.runtime==="sandbox",F=Zs({previewState:Ie,progressStatus:an.status,previewServerUrl:Be,fastPreviewActive:De,fastPreviewReady:!!ze,codingSession:hr}),Xe=F.mode!=="none",ln=F.mode==="production"&&F.iframeBase?bt(F.iframeBase):null,gr=!r,Ze=F.mode==="production"?ln:bt(Oe),vr=i?.entity?.id===t&&i.entity.metadata?.fastPreviewInPlace===!0,et=F.mode==="production"&&De&&vr&&f&&E==="blocks",cn=v.useRef(null),{pin:xr,effective:br}=gi(cn.current,{inPlaceRenderActive:et,draftPreviewUrl:ze,resolvedPath:ye});cn.current=xr;const we=hi(F.mode==="sandbox"?gt(zn(ue??Ut(ye,F.iframeBase)??F.iframeBase,w),l.state.variantOverride??[]):F.mode==="production"&&gr?gt(zn(os(ue??br??Ut(ye,F.iframeBase)??F.iframeBase,F.showWakingPill?is:null),w),l.state.variantOverride??[]):null);v.useEffect(()=>{},[r,ln,B]);const dn="sandbox.preview.openInNewTab",un=ze??(F.iframeBase?Ut(ye,F.iframeBase):null),yr=F.mode==="production"?un?gt(un,l.state.variantOverride??[]):null:we??F.iframeBase,wr=async()=>{const o=yr;if(o){window.open(o,"_blank","noopener");return}},it=t&&u?qn(Re.slug,t,u):null,at=o=>{it&&ls(it,o)},ce=l.state.target;v.useEffect(()=>{if(!(!ce||!ve||!fe))if(ce.kind==="page"){const o=te[ce.key]??{};Ne.current=Fe(ce.path,o),X(null),J(null),re(null),me(ce.key),ie(ce.path),at({path:ce.path,pageKey:ce.key,params:o})}else if(ce.kind==="loader")Ne.current=null,X(null),J(ce.key),re(null);else{const o=jt.find(m=>m.key===ce.key);if(o){Ne.current=null;const m=kn(fe);J(null),X(o),re(Sn(ve,m,o.key))}}},[ce,ve,fe,te]),v.useEffect(()=>{!z||st===null||ce?.kind==="page"&&ce.key===z&&ce.path===st||l.selectTarget({kind:"page",key:z,path:st})},[z,st,ce]);const[mn,kr]=v.useState(null);if(Ie.kind==="iframe"&&mn!==Ie.previewUrl){const o=mn!==null;kr(Ie.previewUrl);const m=it?Vn(it):null;if(m){if(Ne.current=Fe(m.path,m.params),ie(m.path),me(m.pageKey),re(null),X(null),J(null),m.pageKey&&Object.keys(m.params).length>0){const C=m.pageKey;ae(_=>({..._,[C]:m.params}))}}else o&&(Ne.current=null,ie("/"),re(null),me(null),X(null),J(null))}on.current=we;const fn=ro({iframeRef:x,src:F.mode==="sandbox"?we:null,active:F.mode==="sandbox"}),pn=v.useRef(null);v.useEffect(()=>{if(!ze||!we||pn.current===ze)return;pn.current=ze;const o=x.current;o&&o.getAttribute("src")!==we&&(se(),o.src=we)},[ze,we]);const hn=()=>{const o=x.current?.contentWindow,m=Ze;if(!o||!m||!T||!z)return;const C=T[z];if(!C||typeof C!="object")return;const _=cs({previewBaseUrl:m,pageBlock:C,decofile:T,path:ye,pathTemplate:G});if(!_)return;const oe=gt(_.src,l.state.variantOverride??[]);o.postMessage({type:"cms-editor::render",src:oe,body:_.body},m)},Dt=v.useRef(null);v.useEffect(()=>{if(!et||q||ee||!z||!T){Dt.current=null;return}const o={nav:JSON.stringify({page:z,path:ye,pathTemplate:G}),content:JSON.stringify(T)},m=vi(Dt.current,o);Dt.current=o,m&&hn()},[T,et,q,ee,z,ye,G]);const At=v.useRef(null);v.useEffect(()=>{if(!et||q||ee||!z||!T){At.current=null;return}const o=JSON.stringify(l.state.variantOverride??null),m=At.current;At.current={page:z,sig:o},!(!m||m.page!==z||m.sig===o)&&hn()},[l.state.variantOverride,et,q,ee,z]);const Sr=!!t&&!!u&&!$e.notFound&&!fr&&!mr&&(Ot?.kind==="ready"||Te!=="idle"),he=mi({editingMode:E,sandboxDisplay:F.mode==="sandbox",blocksEditingEnabled:f});v.useEffect(()=>{const o=Ze;if(!o)return;const m=C=>{if(C.origin===o)if(C.data?.type==="visual-editor::element-clicked"){const _=so.safeParse(C.data.payload);_.success&&N(_.data)}else if(C.data?.type==="cms-editor::section-clicked"){const _=ao.safeParse(C.data.payload);_.success&&S({index:_.data.sectionIndex,seq:_.data.clickSeq})}else C.data?.type==="cms-editor::render-start"?se():C.data?.type==="cms-editor::render-end"?(Pe(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},o)):C.data?.type==="cms-editor::render-error"&&Pe()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[Ze,Tt,Lt,_t]);const gn=()=>{const o=x.current?.contentWindow,m=bt(Oe);!o||!m||o.postMessage({type:"visual-editor::activate",script:oo},m)},Pr=()=>{const o=x.current?.contentWindow,m=bt(Oe);!o||!m||o.postMessage({type:"visual-editor::deactivate"},m)},Mt=()=>{const o=x.current?.contentWindow,m=Ze;!o||!m||(o.postMessage(F.mode==="production"?{type:"editor::inject",args:{script:_n}}:{type:"visual-editor::activate",script:_n},m),o.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},m))},jr=()=>{const o=x.current?.contentWindow,m=Ze;!o||!m||o.postMessage({type:"cms-editor::deactivate"},m)},Ft=o=>{if(o==="blocks"&&!f)return;const m=E;!s&&o!==m&&(o==="blocks"?P.current?.resize("30%"):P.current?.collapse()),o!=="blocks"&&W(),g(o),N(null),S(null),o!=="blocks"&&J(null),m==="visual"&&Pr(),o==="visual"&&gn(),m==="blocks"&&o!=="blocks"&&jr(),o==="blocks"&&Mt()},Er=()=>{Ft(di(E,f))},Nr=()=>{if(!x.current||!we)return;se();const o=x.current;o.src=we};qr(()=>{const o=x.current;if(!o)return;se();const m=document.activeElement,C=o.tabIndex;o.tabIndex=-1,o.style.pointerEvents="none",o.blur(),bi(o,on.current);let _;const oe=()=>{clearTimeout(_),o.tabIndex=C,o.style.pointerEvents="";const _e=document.activeElement;(!_e||_e===document.body||_e===o)&&m?.focus(),o.removeEventListener("load",oe)};o.addEventListener("load",oe),_=setTimeout(oe,3e3)});const Cr=()=>{const o=Ht.indexOf(w);b(Ht[(o+1)%Ht.length])},$t=(o,m)=>{if(!z)return;const C=z,_={...Ve,[o]:m};Ne.current=Fe(G,_),ae(oe=>({...oe,[C]:_})),at({path:G,pageKey:C,params:_})},vn=Yo({iframeBase:F.iframeBase,resolvedPath:ye,activeGlobalSectionName:q?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Bt=o=>{const m=te[o.key]??{},C=Fe(o.path,m);(q||Ee(C)!==Ee(ye))&&se(),Ne.current=C,X(null),J(null),re(null),S(null),me(o.key),ie(o.path),at({path:o.path,pageKey:o.key,params:m}),l.selectTarget({kind:"page",key:o.key,path:o.path})},Rr=o=>{if(!ve||!fe){wn.error(e("sandbox.preview.previewMetadataNotReady"));return}se(),Ne.current=null;const m=kn(fe),C=Sn(ve,m,o.key);X(o),J(null),re(C),S(null),l.selectTarget({kind:"section",key:o.key})},Tr=o=>{f&&(X(null),J(o.key),re(null),Ft("blocks"),l.selectTarget({kind:"loader",key:o.key}))},Lr=async({name:o,path:m,templateKey:C})=>{if(!t||!u)return;const _=Un(m);if(_){de(_);return}const oe=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Me.some(ke=>Ee(ke.path)===Ee(oe))){de(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let _e;if(C&&(_e=T?.[C],!_e)){de(e("sandbox.preview.templateNoLongerExists"));return}de(void 0);try{const ke=await Qe.mutateAsync({name:o,path:oe,template:_e});Z(!1),wn.success(e("sandbox.preview.pageCreated",{name:o})),await Vs(fi),Bt({key:ke.key,name:ke.name,path:ke.path}),Ft("blocks")}catch(ke){de(ke instanceof Error?ke.message:e("sandbox.preview.failedToCreatePage"))}},xn=Xe&&(Sr||F.mode==="production"),_r=Qo({showPreviewToolbar:xn,contentEditingEnabled:p}),lt=xn?n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(ht,{onClick:Nr,"aria-label":e("sandbox.preview.refresh"),children:n.jsx(Hr,{size:16})})}),n.jsx(ft,{side:"bottom",children:e("sandbox.preview.refresh")})]}),_r?n.jsxs("div",{ref:Q,className:"relative min-w-0 w-64 shrink",children:[n.jsxs("div",{className:"flex h-7 w-full min-w-0 items-center rounded-md border border-border bg-background transition-colors duration-200 hover:bg-accent",children:[n.jsxs("div",{className:"flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 pl-2 pr-1",onClick:()=>H(o=>!o),children:[q&&n.jsxs("span",{className:"shrink-0 inline-flex 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:[n.jsx(En,{size:11}),"Global"]}),nn&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[n.jsx(Cn,{size:11}),e("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:Ke("text-[13px] font-medium text-foreground",Ct==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:Ct??vn}),!q&&!ee&&Ct!=null&&G&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:wt(G).map((o,m)=>{if(o.type==="text")return n.jsx("span",{className:Ke(m===0?"min-w-0 truncate":"shrink-0"),children:o.text},`text-${m}`);const C=Rt[o.name];return C&&ot?n.jsx(Fo,{sources:C,template:G,paramName:o.name,value:Ve[o.name]??"",sandboxRef:ot,onCommit:_=>$t(o.name,_)},`${z}:${o.name}`):n.jsx(Go,{name:o.name,value:Ve[o.name]??"",onCommit:_=>$t(o.name,_)},`${z}:${o.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>H(o=>!o),"aria-label":e("sandbox.preview.choosePage"),"aria-expanded":D,children:n.jsx(ms,{size:12,className:Ke("shrink-0 text-muted-foreground transition-transform",D&&"rotate-180")})})]}),D&&n.jsxs("div",{className:"absolute left-1/2 top-full z-50 mt-1.5 w-[500px] max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-lg border bg-popover shadow-lg",children:[n.jsxs("div",{className:"px-2 h-10 flex items-center gap-2 border-b",children:[n.jsx(ys,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:A,onChange:o=>I(o.target.value),onKeyDown:o=>{if(o.key!=="Enter")return;const m=A.trim();if(!m)return;const C=We.find(_=>Ee(_.path)===Ee(m));C&&(o.preventDefault(),H(!1),I(""),Bt(C))},placeholder:e("sandbox.preview.searchPagesAndComponents"),className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoFocus:!0})]}),n.jsx("div",{className:"p-1.5 border-b",children:n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:o=>{o.preventDefault(),H(!1),I(""),de(void 0),Z(!0)},children:[n.jsx(bs,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:e("sandbox.preview.createNewPage")})]})}),We.length===0&&rt.length===0&&Et.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Me.length===0&&jt.length===0&&tn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[We.length>0&&n.jsx("div",{className:"p-1.5",children:We.map(o=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Bt(o)},children:[n.jsx(hs,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:o.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:o.path})]},o.key))}),rt.length>0&&n.jsxs("div",{className:Ke("p-1.5",We.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalComponents")}),rt.map(o=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Rr(o)},children:[n.jsx(En,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:o.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:o.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},o.key))]}),Et.length>0&&n.jsxs("div",{className:Ke("p-1.5",(We.length>0||rt.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalLoaders")}),Et.map(o=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),H(!1),I(""),Tr(o)},children:[n.jsx(Cn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:o.title}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:o.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},o.key))]})]})]})]}):n.jsx("span",{className:"min-w-0 truncate px-2 text-[13px] text-muted-foreground",children:vn}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(ht,{"aria-label":e(dn),onClick:()=>{wr()},children:n.jsx(Yn,{size:16})})}),n.jsx(ft,{side:"bottom",children:e(dn)})]})]}):null,bn=lt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:lt}):null,Or=F.mode==="sandbox",ct=pi[w],dt=w==="desktop"&&(R.width===0||R.width>=ct.width+2*Bn),yn=dt?1:Math.min(R.width>0?R.width/(ct.width+2*Bn):1,1),Dr=dt?{width:"100%",height:"100%"}:{width:`${ct.width}px`,height:R.height>0?`${R.height/yn}px`:`${ct.height}px`,transform:`scale(${yn})`,transformOrigin:"top center"},Ar=Xe?n.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 -translate-x-1/2 scale-125",children:n.jsxs("div",{className:"flex items-center gap-0.5 rounded-full border bg-background/60 p-1 shadow-lg backdrop-blur-md",children:[Or&&n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(ht,{onClick:Er,"aria-pressed":he==="visual","aria-label":e("sandbox.preview.visualEditor"),active:he==="visual",className:"rounded-full",children:n.jsx(Nn,{size:16})})}),n.jsx(ft,{side:"top",children:e("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(ht,{onClick:Cr,"aria-label":e(In[w]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[w==="mobile"&&n.jsx(gs,{size:16}),w==="tablet"&&n.jsx(vs,{size:16}),w==="desktop"&&n.jsx(xs,{size:16})]},w)})}),n.jsx(ft,{side:"top",children:e(In[w])})]})]})}):null,Mr=!!ee&&he==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[ot&&Object.entries(Rt).map(([o,m])=>(Ve[o]??"")===""?n.jsx(Vo,{sources:m,template:G,paramName:o,sandboxRef:ot,onFill:C=>$t(o,C)},`${z}:${o}`):null),a?bn&&n.jsx(as,{children:bn}):lt&&n.jsxs("div",{className:"@container/panel-header relative flex h-12 shrink-0 items-center gap-2 border-b border-border/60 px-3 md:px-4",children:[n.jsx("div",{className:"flex-1"}),n.jsx("div",{className:"flex min-w-0 shrink items-center justify-center gap-0.5",children:lt}),n.jsx("div",{className:"flex-1"})]}),n.jsx("div",{className:"flex-1 overflow-hidden",children:Mr?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(Fn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K}),M&&z&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx($n,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})})]}):n.jsxs(Pn,{orientation:"horizontal",disabled:he!=="blocks",children:[n.jsx(pt,{ref:P,id:"preview-blocks-editor",defaultSize:he==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:he==="blocks"&&n.jsx(Fn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K})}),he==="blocks"&&n.jsx(jn,{withHandle:!0}),n.jsx(pt,{id:"preview-canvas",defaultSize:he==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden",children:n.jsxs(Pn,{orientation:"horizontal",disabled:!(M&&z),children:[M&&z&&n.jsxs(n.Fragment,{children:[n.jsx(pt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx($n,{ref:$,virtualMcpId:t,pageKey:z,onClose:W})}),n.jsx(jn,{withHandle:!0})]}),n.jsx(pt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:o=>{if(!o)return;const m=()=>O(_=>_.width===o.clientWidth&&_.height===o.clientHeight?_:{width:o.clientWidth,height:o.clientHeight});m();const C=new ResizeObserver(m);return C.observe(o),()=>C.disconnect()},className:Ke("h-full relative overflow-clip flex justify-center",Xe&&!dt&&"bg-muted/30"),children:[(be||pr)&&Xe&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),F.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"starting",progress:an,claimPhase:Ot})}),Ie.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"suspended",onResume:ge.resume})}),Ie.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"errored",error:Ie.error,onRetry:ge.retry,connectionsHref:`/${Re.slug}/settings/connections`})}),F.showWakingPill&&n.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[n.jsx(kt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),he==="visual"&&!k&&n.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-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:[n.jsx(Nn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),he==="visual"&&k&&n.jsx(uo,{element:k,onDismiss:()=>N(null)}),Ar,Xe&&we&&n.jsx("div",{className:Ke("shrink-0",!dt&&"border-x border-border bg-background shadow-sm"),style:Dr,children:n.jsx("iframe",{ref:x,src:we,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:fn.handleError,onLoad:()=>{if(fn.handleLoad(),Pe(),F.mode!=="sandbox"){F.mode==="production"&&!F.showWakingPill&&he==="blocks"&&Mt();return}if(Ur("vm_preview_loaded",{view_mode:he,vm_id:Ye?.sandboxHandle??null}),!q)try{const o=x.current?.contentWindow?.location?.pathname;if(!o)return;const m=Ne.current;if(m!==null&&(Ne.current=null,Ee(o)!==Ee(m))||Ee(o)===Ee(ye))return;ie(o),at({path:o,pageKey:xe,params:Ve})}catch{}he==="visual"&&gn(),he==="blocks"&&Mt()}},F.iframeBase)})]})})]})})]})}),n.jsx(Zo,{open:L,onOpenChange:Z,isPending:Qe.isPending,error:Y,templates:Me,onSubmit:Lr})]})}function wi(t){const e=pe.c(22),{virtualMcpId:r}=t,s=Ce(),a=qs(r),{activeTask:u,taskId:d,currentBranch:l}=St(),i=Ys(d),[c,h]=v.useState(!1);if(Js({threadId:d,sandboxBranch:u?.branch??l,agentHasRepo:Kt(a?.metadata),threadHasRepo:Kt(i)||Kt(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(Tn,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let g;e[1]!==s?(g=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=g):g=e[2];let w;e[3]!==s?(w=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=w):w=e[4];let b,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),k=n.jsx(Tn,{className:"size-4"}),e[5]=b,e[6]=k):(b=e[5],k=e[6]);let N;e[7]!==s?(N=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=N):N=e[8];let y;e[9]!==N?(y=n.jsxs(Je,{onClick:b,children:[k,N]}),e[9]=N,e[10]=y):y=e[10];let S;e[11]!==g||e[12]!==w||e[13]!==y?(S=n.jsx(Xt,{className:"h-full",image:E,title:g,description:w,actions:y}),e[11]=g,e[12]=w,e[13]=y,e[14]=S):S=e[14];let x;e[15]!==c?(x=n.jsx(Gs,{open:c,onOpenChange:h,mode:"agent"}),e[15]=c,e[16]=x):x=e[16];let P;return e[17]!==S||e[18]!==x?(P=n.jsxs(n.Fragment,{children:[S,x]}),e[17]=S,e[18]=x,e[19]=P):P=e[19],P}let f;return e[20]!==r?(f=n.jsx(yi,{virtualMcpId:r}),e[20]=r,e[21]=f):f=e[21],f}function Qc(){const t=pe.c(2),e=Qs();let r;return t[0]!==e?(r=n.jsx(Wr,{tabId:"site-editor",children:n.jsx(wi,{virtualMcpId:e})}),t[0]=e,t[1]=r):r=t[1],r}export{Qc as default};