decocms 4.500.7 → 4.501.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-DHLjYBHG.js → ActiveShapeUtils-D-fL_h7g.js} +1 -1
- package/dist/client/assets/{AlertCircle-BILwGqjV.js → AlertCircle-D3bAofoi.js} +1 -1
- package/dist/client/assets/{AreaChart-MBaQ2sXA.js → AreaChart-BkD3ldvt.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DlRqrbst.js → ArrowLeft-Cdobx1UV.js} +1 -1
- package/dist/client/assets/{ArrowUp-CFc2wNu3.js → ArrowUp-D_3dn5Sd.js} +1 -1
- package/dist/client/assets/{BarChart-ip63zVKP.js → BarChart-DdPh9tNP.js} +1 -1
- package/dist/client/assets/{Building02-QB_UI3sB.js → Building02-Bh6iwr2R.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CD4E_XC5.js → CategoricalChart-tLM_K2Lc.js} +1 -1
- package/dist/client/assets/{CheckCircle-CG1RvCMD.js → CheckCircle-BQiYUYV1.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-23OZgHQl.js → ChevronSelectorVertical-CpMmf6o-.js} +1 -1
- package/dist/client/assets/{ChevronUp-BrMcnDd0.js → ChevronUp-CfnfCq3M.js} +1 -1
- package/dist/client/assets/{Copy01-QpufVNbj.js → Copy01-CKF8jrEa.js} +1 -1
- package/dist/client/assets/{CreditCard01-W1zS1W7o.js → CreditCard01-B4jz404y.js} +1 -1
- package/dist/client/assets/{DotsVertical-E-CAHxZx.js → DotsVertical-BVuRRGqu.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DoXCMhKl.js → ErrorBarContext-D3QRg5_X.js} +1 -1
- package/dist/client/assets/{Globe04-C2IFbCwJ.js → Globe04-CfnS-Tur.js} +1 -1
- package/dist/client/assets/{Image01-D8Dg78Ju.js → Image01-C6EZAhw4.js} +1 -1
- package/dist/client/assets/{Key01-CCpcNn9J.js → Key01-C3bTgL7y.js} +1 -1
- package/dist/client/assets/{Link01-Dw-VkUVV.js → Link01-Bb9ZHTO8.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BBYM52IU.js → LinkBroken01-BbLhCJ9C.js} +1 -1
- package/dist/client/assets/{Monitor01-596xyLh3.js → Monitor01-BT48-O3V.js} +1 -1
- package/dist/client/assets/{Play-CIe1tupB.js → Play-DlM8u9Zn.js} +1 -1
- package/dist/client/assets/{Plus-DTyq8wfJ.js → Plus-h-7fG8-i.js} +1 -1
- package/dist/client/assets/{SearchMd-DnZ_sK_U.js → SearchMd-DdAgg3kt.js} +1 -1
- package/dist/client/assets/{Sector-iSjEHRg-.js → Sector-udGfVqY9.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Brrt7Bh6.js → ShoppingBag01-gtt6oc_g.js} +1 -1
- package/dist/client/assets/{Sun-BmhcFIJl.js → Sun-D0bMmBqD.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B5sfCWHV.js → SwitchHorizontal01-mzV8h1Yb.js} +1 -1
- package/dist/client/assets/{Tool01-BSpg9N8Q.js → Tool01-BOGFE1PW.js} +1 -1
- package/dist/client/assets/{Trash01-uPItCfKQ.js → Trash01-BKZKll81.js} +1 -1
- package/dist/client/assets/{Upload01-ClSeM0gf.js → Upload01-ClJbirSb.js} +1 -1
- package/dist/client/assets/{User01-DabbLHAZ.js → User01-jcmfLZ4a.js} +1 -1
- package/dist/client/assets/{UserSquare-BXjBRbTF.js → UserSquare-Dnl3alN_.js} +1 -1
- package/dist/client/assets/{Users01-Dt36FENA.js → Users01-DBt3BOu-.js} +1 -1
- package/dist/client/assets/{XAxis-BQtU7n4v.js → XAxis-DWTEKRSO.js} +1 -1
- package/dist/client/assets/{XClose-BMDlg-34.js → XClose-DtCD4hEo.js} +1 -1
- package/dist/client/assets/{ZoomOut-Bnst3wtU.js → ZoomOut-C-oiWFtM.js} +1 -1
- package/dist/client/assets/{access-gate-BnarIuC9.js → access-gate-Bs83GnN9.js} +1 -1
- package/dist/client/assets/add-connection-dialog-CkfM8RAE.js +1 -0
- package/dist/client/assets/agent-analytics-PkbYclRB.js +2 -0
- package/dist/client/assets/agent-app-Dq_KNzND.js +1 -0
- package/dist/client/assets/agent-assets-BSNQs1Q4.js +1 -0
- package/dist/client/assets/agent-automation-CYLhaLQV.js +20 -0
- package/dist/client/assets/agent-automations-CylXZmQz.js +1 -0
- package/dist/client/assets/agent-connect-sources-gehkSGol.js +1 -0
- package/dist/client/assets/agent-deck-CB0RXEGe.js +1 -0
- package/dist/client/assets/agent-e2e-gcrRg7hM.js +1 -0
- package/dist/client/assets/agent-experiments-CMJUnUoe.js +1 -0
- package/dist/client/assets/agent-file-JLVKcoj6.js +1 -0
- package/dist/client/assets/agent-hosting-AV1ldWsd.js +1 -0
- package/dist/client/assets/{agent-icon-BdZdLCky.js → agent-icon-D1bIPwJ9.js} +1 -1
- package/dist/client/assets/agent-library-ChYqVk94.js +1 -0
- package/dist/client/assets/agent-library-file-5NiMKcJU.js +1 -0
- package/dist/client/assets/agent-monitor-DCEK-_YE.js +1 -0
- package/dist/client/assets/agent-overview-Bq6iylVc.js +1 -0
- package/dist/client/assets/agent-releases-0JQ-pNIw.js +2 -0
- package/dist/client/assets/agent-settings-DutqpeLT.js +1 -0
- package/dist/client/assets/agent-site-editor-DUVPLgUJ.js +27 -0
- package/dist/client/assets/agent-site-editor-code-Bs5iWgah.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DG0PHKu_.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-IbSFpbgz.js +1 -0
- package/dist/client/assets/agent-view-BMSjk6sE.js +1 -0
- package/dist/client/assets/agent-view-guard-B0ssprgS.js +1 -0
- package/dist/client/assets/{agents-list-qSpN3sGU.js → agents-list-CL_HbBRx.js} +1 -1
- package/dist/client/assets/{ai-providers-DwrXOrzh.js → ai-providers-mazNpep3.js} +1 -1
- package/dist/client/assets/{alert-Tk2m0Iz_.js → alert-Bo4bO9Yj.js} +1 -1
- package/dist/client/assets/{alert-dialog-By0HRTrM.js → alert-dialog-BEUBWKqO.js} +2 -2
- package/dist/client/assets/{analytics-sections-BjYHHt7V.js → analytics-sections-DM3YuBYq.js} +1 -1
- package/dist/client/assets/api-keys-BfQZh5eV.js +1 -0
- package/dist/client/assets/{api-keys-DaMqNdv1.js → api-keys-DVwB6mPs.js} +1 -1
- package/dist/client/assets/app-editor-6HFiMwKn.js +1 -0
- package/dist/client/assets/{asset-utils-Cne_zeGQ.js → asset-utils-f7af-ti1.js} +1 -1
- package/dist/client/assets/{auth-CTn9OsYL.js → auth-CpMllKKy.js} +1 -1
- package/dist/client/assets/{auth-catchall-CMbAfThb.js → auth-catchall-s5AR8jnh.js} +1 -1
- package/dist/client/assets/auth-entry-DhhGCuwo.js +1 -0
- package/dist/client/assets/{auth-split-layout--aU7QLNo.js → auth-split-layout-CVNIUCsf.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-bcqFV5Ih.js → authenticate-and-persist-oauth-B45I3cgI.js} +1 -1
- package/dist/client/assets/{automation-list-row-3u6JAmgN.js → automation-list-row-sOJZ4uwa.js} +1 -1
- package/dist/client/assets/{automation-runs-Cy2qWf8T.js → automation-runs-CR9XH4Bt.js} +1 -1
- package/dist/client/assets/{automations-B06cv6_Q.js → automations-KO9N3LUU.js} +1 -1
- package/dist/client/assets/{autosend-Cr5TlS-x.js → autosend-BPCdEy8S.js} +1 -1
- package/dist/client/assets/{avatar-DNs314ny.js → avatar-BwGV1yBo.js} +1 -1
- package/dist/client/assets/{badge-BDMYkxf_.js → badge-DZi2puxG.js} +1 -1
- package/dist/client/assets/{block-document-BkfPgGlg.js → block-document-DKS5cj35.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-D5JWaTS4.js → blocks-preview-workspace-context-CDjfxqPx.js} +1 -1
- package/dist/client/assets/blocks-tab-states-CdRfYXjG.js +20 -0
- package/dist/client/assets/blog-schema-DQu9FHji.js +1 -0
- package/dist/client/assets/{board-analytics-B8AHF8AB.js → board-analytics-Br92I9NK.js} +1 -1
- package/dist/client/assets/{buckets-CUa7QjX3.js → buckets-BJOMOAgi.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-l6jHAadC.js → build-improve-prompt-doc-DrFz7LF_.js} +1 -1
- package/dist/client/assets/{calendar-9HE_r4Hw.js → calendar-evfJy3uJ.js} +1 -1
- package/dist/client/assets/{capability-load-error-DVDKy7cm.js → capability-load-error-vW3f0aqj.js} +1 -1
- package/dist/client/assets/category-editor-QytvoXKo.js +1 -0
- package/dist/client/assets/{chart-n7qVLeZu.js → chart-yXoVtu1q.js} +1 -1
- package/dist/client/assets/chat-context-lAP9vX1C.js +39 -0
- package/dist/client/assets/{chat-draft-Bi-CpEK_.js → chat-draft-DVJc17WV.js} +1 -1
- package/dist/client/assets/{checkbox-jukyyas4.js → checkbox-DcDvQwKW.js} +1 -1
- package/dist/client/assets/{choose-editor-BpukaXWx.js → choose-editor-B0ViIXN7.js} +1 -1
- package/dist/client/assets/{cli-auth-success-ZwkiiHM_.js → cli-auth-success-CKu92ul9.js} +1 -1
- package/dist/client/assets/{client-icons-CI6qGlDq.js → client-icons-DV_DZLb3.js} +1 -1
- package/dist/client/assets/cms-settings-editor-Cz5yTS8J.js +1 -0
- package/dist/client/assets/{collapsible-CSMgVqT4.js → collapsible-BvvJbkUN.js} +1 -1
- package/dist/client/assets/collection-detail-gDWElNf6.js +1 -0
- package/dist/client/assets/{collection-display-button-DfzaspAg.js → collection-display-button-CX9hkCzp.js} +1 -1
- package/dist/client/assets/{collection-search-q0ogFMFh.js → collection-search-ChJFrp7I.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dnaf2KFs.js → collection-table-wrapper-S14li0ck.js} +1 -1
- package/dist/client/assets/{collection-tabs-CYgVG041.js → collection-tabs-CSxs3D41.js} +1 -1
- package/dist/client/assets/{column-rules-BDs9HTxP.js → column-rules-GXfmm3XY.js} +2 -2
- package/dist/client/assets/{combobox-BTfHieW4.js → combobox-C7I8ANxO.js} +1 -1
- package/dist/client/assets/{command-DFd1c5Z5.js → command-3UFu4XzT.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-4lkaw_O0.js → companion-mcps-section-B4r6rXjT.js} +1 -1
- package/dist/client/assets/{config-CtmGoERx.js → config-CXc91so8.js} +1 -1
- package/dist/client/assets/{connect-CmDZNw9R.js → connect-CyItQRMN.js} +3 -3
- package/dist/client/assets/{connect-layout-CC9olkOl.js → connect-layout-C_C_fSz7.js} +1 -1
- package/dist/client/assets/{connection-DSkv8Cg1.js → connection-C37KtOpn.js} +1 -1
- package/dist/client/assets/{connection-card-C7Yq5GHs.js → connection-card-BZTmMkIC.js} +1 -1
- package/dist/client/assets/connection-detail-D0FXWtUX.js +1 -0
- package/dist/client/assets/{connection-form-helpers-BsU6F-s_.js → connection-form-helpers-DxBwDmAB.js} +1 -1
- package/dist/client/assets/connections-D-s5sSvb.js +1 -0
- package/dist/client/assets/content-tab-zP6Y355z.js +8 -0
- package/dist/client/assets/context-CXih-hDd.js +1 -0
- package/dist/client/assets/{context-menu-CYa4PKRJ.js → context-menu-BVwispbr.js} +1 -1
- package/dist/client/assets/{core.esm-lZvNzlYc.js → core.esm-CmRvLUZs.js} +2 -2
- package/dist/client/assets/{create-organization-dialog-D-9YlOhY.js → create-organization-dialog-MkYGLytC.js} +1 -1
- package/dist/client/assets/daily-pulse-C5ZpC1Ja.js +1 -0
- package/dist/client/assets/device-hint-SeLRi17j.js +1 -0
- package/dist/client/assets/discover-CnNtsI6p.js +1 -0
- package/dist/client/assets/{domain-settings-BDouaDKh.js → domain-settings-C-ul_GpW.js} +1 -1
- package/dist/client/assets/{drawer-UzGeZrmC.js → drawer-BnxsVk9h.js} +1 -1
- package/dist/client/assets/{editor-KeKsFC14.js → editor-BcMzCvWI.js} +1 -1
- package/dist/client/assets/editor-classes-qOc25VDM.js +1 -0
- package/dist/client/assets/{empty-state-CvDYWxOG.js → empty-state-CLULH17h.js} +1 -1
- package/dist/client/assets/{empty-state-DdJZ_leg.js → empty-state-Csd3ZQCl.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CJhjAx3s.js → extract-connection-data-QezQYJtA.js} +1 -1
- package/dist/client/assets/{feature-gate-D5KGpIQ3.js → feature-gate-X9j31WTs.js} +1 -1
- package/dist/client/assets/{feature-paywall-nTUHasXJ.js → feature-paywall-CVHEJqfB.js} +1 -1
- package/dist/client/assets/{file-explorer-CcZkMQK3.js → file-explorer-CzlgH02W.js} +2 -2
- package/dist/client/assets/{file-preview-Ct2165jc.js → file-preview-Ddg0WJAM.js} +1 -1
- package/dist/client/assets/{file-share-button-DnzCcmZ2.js → file-share-button-D2qOTxL8.js} +2 -2
- package/dist/client/assets/{file-type-icon-C-_1hLql.js → file-type-icon-Bqf9C4DT.js} +1 -1
- package/dist/client/assets/flat-project-EkkB9kye.js +1 -0
- package/dist/client/assets/{folder-icon-CksigScx.js → folder-icon-CktDjbyx.js} +2 -2
- package/dist/client/assets/{form-D6DHFxsw.js → form-BLRuutWX.js} +1 -1
- package/dist/client/assets/format-time-CAj8AQXM.js +1 -0
- package/dist/client/assets/general-DAKv-uYe.js +1 -0
- package/dist/client/assets/home-BtntFMXr.js +1 -0
- package/dist/client/assets/hosted-publish-feedback-DnbP_2C-.js +1 -0
- package/dist/client/assets/{icon-button-d9uOvdxM.js → icon-button-08xWmNqW.js} +1 -1
- package/dist/client/assets/{index-BGz-w6Gg.js → index-3um-0YWE.js} +1 -1
- package/dist/client/assets/index-3yvbELIe.js +1 -0
- package/dist/client/assets/{index-COV2t6Wc.js → index-9WXzzgOS.js} +2 -2
- package/dist/client/assets/{index-MZuRM-ap.js → index-BOjNGNvg.js} +1 -1
- package/dist/client/assets/index-BgxfZN5I.js +243 -0
- package/dist/client/assets/index-BiU97Vx4.js +1 -0
- package/dist/client/assets/index-BvCsVc8L.js +2 -0
- package/dist/client/assets/{index-B0rouRMk.js → index-Ct9bVcsr.js} +1 -1
- package/dist/client/assets/{index-DCmQGiOV.js → index-DIK8YZFn.js} +2 -2
- package/dist/client/assets/{index-Dhdyv2s0.js → index-DJTmuPQQ.js} +1 -1
- package/dist/client/assets/{index-Cw6J2Hl5.js → index-DT37BMIF.js} +5 -5
- package/dist/client/assets/{index-JuyO8Sz3.js → index-Dhveikge.js} +1 -1
- package/dist/client/assets/index-Dss8yn2Y.js +1 -0
- package/dist/client/assets/{index-DyaBZBxm.js → index-DyeE93ho.js} +14 -14
- package/dist/client/assets/{index-B5IA1qMq.js → index-lUChgCue.js} +1 -1
- package/dist/client/assets/index-m9hX09uY.css +1 -0
- package/dist/client/assets/{index-redirect-CdLcLUA4.js → index-redirect-CHE6u4Cv.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-rUCOtzeA.js → infiniteQueryObserver-ClCiPTXN.js} +1 -1
- package/dist/client/assets/{infra-billing-CNFpdYUt.js → infra-billing-ChfVikin.js} +1 -1
- package/dist/client/assets/input-BSxNJ_GL.js +17 -0
- package/dist/client/assets/input-BwymrIPS.js +1 -0
- package/dist/client/assets/{integration-icon-DogZfPWq.js → integration-icon-DmnIXoLv.js} +1 -1
- package/dist/client/assets/{jira-icon-Bkx-ixmo.js → jira-icon-BLL3j9jm.js} +1 -1
- package/dist/client/assets/{label-Bqj_xjz9.js → label-CXUY_vfR.js} +1 -1
- package/dist/client/assets/{layout-z7Pz7phr.js → layout-DIeTUTU5.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-BKyQMU33.js +1 -0
- package/dist/client/assets/legacy-main-redirect-BsoX6iN0.js +1 -0
- package/dist/client/assets/library-j3CGQ36X.js +1 -0
- package/dist/client/assets/{library-tab-0FXiesZx.js → library-tab-D2qgQui6.js} +4 -4
- package/dist/client/assets/{login-B4wTb5ls.js → login-E4QHNGwe.js} +1 -1
- package/dist/client/assets/{markdown-5DzLzA6E.js → markdown-b3WNjA4d.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DuGbCe-D.js → mcp-app-renderer-Cn4aCsu6.js} +2 -2
- package/dist/client/assets/{mcp-oauth-D_oaXY6E.js → mcp-oauth-C3NWluK_.js} +1 -1
- package/dist/client/assets/{mcp-oauth-tCidCN-u.js → mcp-oauth-RicpD0nY.js} +1 -1
- package/dist/client/assets/{members-CDM-83p9.js → members-BxD5PzHF.js} +1 -1
- package/dist/client/assets/{memory-0faJ-8hP.js → memory-C9XODnnD.js} +2 -2
- package/dist/client/assets/{mini-report-page-CrKZ4okq.js → mini-report-page-BIc8DpQB.js} +1 -1
- package/dist/client/assets/{mock-board-N392Vku2.js → mock-board-ohQUjnsi.js} +1 -1
- package/dist/client/assets/{monaco-editor-2Ci5R71u.js → monaco-editor-sh4I5RUd.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-BbxkYAB2.js → monitoring-stats-row-DV6G65vc.js} +1 -1
- package/dist/client/assets/{multi-select-CNHwKIXn.js → multi-select-B-4k-Bqg.js} +1 -1
- package/dist/client/assets/mustache-Ds0VW1db.js +4 -0
- package/dist/client/assets/{new-project-dialog-C5lJfUJ3.js → new-project-dialog-B1YWyUQY.js} +1 -1
- package/dist/client/assets/{oauth-callback-DGtqmz9D.js → oauth-callback-Dk0amXzl.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Bhuh08e8.js → oauth-callback-ai-provider-yxTXgHsL.js} +1 -1
- package/dist/client/assets/{onboarding-D55kfuiq.js → onboarding-WAcQlT34.js} +1 -1
- package/dist/client/assets/openai-conversation-DdRGYa72.js +3 -0
- package/dist/client/assets/optimistic-project-sidebar-views-CX9xIBGl.js +1 -0
- package/dist/client/assets/{organization-choice-CUxHZSL3.js → organization-choice-ByF9jLiX.js} +1 -1
- package/dist/client/assets/{orgs-CPCdS87I.js → orgs-BQHW_eGH.js} +1 -1
- package/dist/client/assets/page-seo-form-CHn8Xad5.js +1 -0
- package/dist/client/assets/{pair-DjM6V7aG.js → pair-CUEfObr7.js} +8 -8
- package/dist/client/assets/{plan-ladder-gwROOTzi.js → plan-ladder-DCjrzFrn.js} +1 -1
- package/dist/client/assets/{popover-MLSOZysn.js → popover-C7Cokk1g.js} +1 -1
- package/dist/client/assets/post-calendar-8u0J9Dxw.js +1 -0
- package/dist/client/assets/post-editor-BzyUnSeO.js +2 -0
- package/dist/client/assets/{preview-content-Cuq13S1x.js → preview-content-DvIKkdby.js} +1 -1
- package/dist/client/assets/{preview-dialog-CP7wwQxY.js → preview-dialog-l7y7EMMl.js} +1 -1
- package/dist/client/assets/{preview-panel-DFRYD57I.js → preview-panel-BVF8JvLU.js} +1 -1
- package/dist/client/assets/preview-source-BsRLGWUP.js +1 -0
- package/dist/client/assets/preview-tab-DSXQiNWB.js +551 -0
- package/dist/client/assets/product-picker-dialog-D1HSCZY-.js +1 -0
- package/dist/client/assets/{profile-E9E7lNqo.js → profile-DLHHp5WU.js} +1 -1
- package/dist/client/assets/{project-app-view-CqnnpjCc.js → project-app-view-BwoWS8NM.js} +1 -1
- package/dist/client/assets/{project-feed-DI26nV5j.js → project-feed-Bb_IIsXz.js} +1 -1
- package/dist/client/assets/{project-icon-DsUbDdQC.js → project-icon-Dgrl5qpw.js} +1 -1
- package/dist/client/assets/project-reports-C-bRcSvJ.js +1 -0
- package/dist/client/assets/project-tasks-DDJFKuGl.js +1 -0
- package/dist/client/assets/{projects-CdLu99l3.js → projects-DRVKv_2I.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CO-mNXLv.js → projects-empty-state-CtZ_2AQk.js} +1 -1
- package/dist/client/assets/{prompts-CGIibyOn.js → prompts-BeeaQU8h.js} +1 -1
- package/dist/client/assets/record-editor-5RvQSHc4.js +1 -0
- package/dist/client/assets/redirect-editor-B1Nkj9GS.js +1 -0
- package/dist/client/assets/reports-BGfmbbJs.js +1 -0
- package/dist/client/assets/{reports-CKJQ8Zdg.js → reports-C5l1V9UL.js} +1 -1
- package/dist/client/assets/{reports-onboarding-UAs51Fs-.js → reports-onboarding-DP7Vd0T2.js} +1 -1
- package/dist/client/assets/{reports-tab-D-UL6Cu0.js → reports-tab-CtVbVcib.js} +2 -2
- package/dist/client/assets/{repositories-8LjwXVAZ.js → repositories-CbAg-Btm.js} +1 -1
- package/dist/client/assets/repository-binding-BFm9AVly.js +1 -0
- package/dist/client/assets/{repository-import-picker-D5xDiyD_.js → repository-import-picker-EyjACjb3.js} +1 -1
- package/dist/client/assets/{repository-picker-DExxlkis.js → repository-picker-CIkU8AaT.js} +1 -1
- package/dist/client/assets/{require-capability-DJr1iBd_.js → require-capability-BHXvQx1F.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Dzef4Ao1.js → required-auth-layout-BWy4wi63.js} +1 -1
- package/dist/client/assets/{reset-password-CWozFngH.js → reset-password-BmnWobO1.js} +1 -1
- package/dist/client/assets/{resizable-UTJFKDGm.js → resizable-ojZdlQ3J.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-CQA14gzS.js +1 -0
- package/dist/client/assets/review-settings-HBrPojjW.js +1 -0
- package/dist/client/assets/{roles-D_wIHL0X.js → roles-Dtyn_BZq.js} +1 -1
- package/dist/client/assets/route-BnPcnvQE.js +1 -0
- package/dist/client/assets/route-FIzJ_P0a.js +1 -0
- package/dist/client/assets/route-tGmKNjFY.js +1 -0
- package/dist/client/assets/sandbox-git-api-CRxdlhrN.js +1 -0
- package/dist/client/assets/sandbox-lifecycle-context-BiADnqP0.js +1 -0
- package/dist/client/assets/{schema-kVE-1hbs.js → schema-C2wKusx1.js} +1 -1
- package/dist/client/assets/{schema-BKM3gR2B.js → schema-CP7YDlC2.js} +1 -1
- package/dist/client/assets/{scroll-area-1S72VGW0.js → scroll-area-eDDZTCNn.js} +1 -1
- package/dist/client/assets/{search-input-pTAwOtCG.js → search-input-Uw0JKwfe.js} +1 -1
- package/dist/client/assets/{search-toggle-DAU6nVmU.js → search-toggle-sm1qzFKh.js} +1 -1
- package/dist/client/assets/secret-ciphertext-CONJpmu9.js +1 -0
- package/dist/client/assets/{secret-picker-CDYFp1fc.js → secret-picker-60Shu074.js} +1 -1
- package/dist/client/assets/{secrets-B0srIKJq.js → secrets-BoqLiEya.js} +1 -1
- package/dist/client/assets/sections-editor-vaJsT4Ye.js +4 -0
- package/dist/client/assets/{select-WviNHwZD.js → select-BFEZcGSl.js} +1 -1
- package/dist/client/assets/{select-model-cTObTD6V.js → select-model-DqlWeDem.js} +1 -1
- package/dist/client/assets/seo-editor-CH8U1dHr.js +1 -0
- package/dist/client/assets/{separator-DHqK6uc1.js → separator-B8-QmvpR.js} +1 -1
- package/dist/client/assets/settings-tab-CKwbS1hi.js +4 -0
- package/dist/client/assets/{sheet-CZiDNUQZ.js → sheet-Nq7jp8TZ.js} +1 -1
- package/dist/client/assets/shell-layout-D6cRROrP.js +1 -0
- package/dist/client/assets/site-editor-BZvWDg3I.js +1 -0
- package/dist/client/assets/site-editor-toast-DKv6_ydN.js +1 -0
- package/dist/client/assets/{skills-Bhf5PJUl.js → skills-D12rIMUM.js} +1 -1
- package/dist/client/assets/{slider-gvEbcdOp.js → slider-DDXbeLEV.js} +1 -1
- package/dist/client/assets/{sortable.esm-h3AYG-u7.js → sortable.esm-B6I_GSlr.js} +1 -1
- package/dist/client/assets/{sso-B6q4MTEL.js → sso-BlG3mIxu.js} +1 -1
- package/dist/client/assets/{suggestion-C591DFAx.js → suggestion-BDdps7f5.js} +2 -2
- package/dist/client/assets/{switch-CUK4V52q.js → switch-fTPKFxtt.js} +1 -1
- package/dist/client/assets/{symbol-BQaHJ_MF.js → symbol-DzslO63t.js} +1 -1
- package/dist/client/assets/{synced-repos-BbxE1rvi.js → synced-repos-BoksOfkS.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-D8Um0oDf.js → tab-icon-glyph-B_Nx9b90.js} +1 -1
- package/dist/client/assets/{table-Dsl6wBVe.js → table-DM6c5ztx.js} +1 -1
- package/dist/client/assets/{tabs-BXhvcQgN.js → tabs-_ffnq5EI.js} +1 -1
- package/dist/client/assets/{task-board-kbcRVMI1.js → task-board-3mxTKXc4.js} +1 -1
- package/dist/client/assets/{task-route-BPrIj9mX.js → task-route-Bd7_oRze.js} +1 -1
- package/dist/client/assets/{task-status-codqNsI7.js → task-status-DobFUFUP.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BqoskKtI.js +1 -0
- package/dist/client/assets/{tasks-J75byAMf.js → tasks-8erS0IrD.js} +3 -3
- package/dist/client/assets/tasks-SfkUPw6i.js +1 -0
- package/dist/client/assets/{textarea-DvoMwt1e.js → textarea-DuXoEX68.js} +1 -1
- package/dist/client/assets/thread-analytics-DRN0lWXv.js +1 -0
- package/dist/client/assets/{thread-intent-CG-CCDLs.js → thread-intent-CNERxhpd.js} +6 -6
- package/dist/client/assets/{thread-route-DvTW6luy.js → thread-route-B1yKR26I.js} +1 -1
- package/dist/client/assets/{thread-route-CR0TIP8s.js → thread-route-Ctf783T8.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BAmHmw0m.js → thread-sheet-body-BOzE-wDr.js} +1 -1
- package/dist/client/assets/{time-range-picker-CPMdzMas.js → time-range-picker-CTRRThMq.js} +1 -1
- package/dist/client/assets/{toggle-group-Q9SREgL7.js → toggle-group-Cfs_-SSG.js} +1 -1
- package/dist/client/assets/{tool-namespace-uRsPbj-p.js → tool-namespace-D2ik4cAJ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Djr5zvaV.js → toolbar-icon-button-CPspdKt4.js} +1 -1
- package/dist/client/assets/{tooltip-COqLwkid.js → tooltip-IZurjemL.js} +1 -1
- package/dist/client/assets/{tooltipContext-DDD6cP5q.js → tooltipContext-D100ISAz.js} +1 -1
- package/dist/client/assets/{track-DG4JP_WA.js → track-Dgx71QRR.js} +1 -1
- package/dist/client/assets/{types-C5SQt0XZ.js → types-BE1SardL.js} +10 -10
- package/dist/client/assets/{url-slug-CUhgOgGc.js → url-slug-CwNPw3b4.js} +1 -1
- package/dist/client/assets/{usage-stats-CAukzrpg.js → usage-stats-CG9oV0kb.js} +34 -34
- package/dist/client/assets/{use-ai-providers-IjG3zzka.js → use-ai-providers-CPzOGdQy.js} +1 -1
- package/dist/client/assets/use-app-takeover-l9YncUZ0.js +1 -0
- package/dist/client/assets/{use-automations-Dt8Ypk0g.js → use-automations-B6o4Nbzc.js} +1 -1
- package/dist/client/assets/{use-autosave-CiBl7wSO.js → use-autosave-DPNBZc_p.js} +1 -1
- package/dist/client/assets/use-chat-navigation-Do_KkN8I.js +1 -0
- package/dist/client/assets/{use-clock-tick-zaL95TTy.js → use-clock-tick-BnfclhFE.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CRI0nNcp.js → use-connect-companion-BPMXolOl.js} +1 -1
- package/dist/client/assets/{use-connection-gMb_8zEe.js → use-connection-DS1VAR5N.js} +1 -1
- package/dist/client/assets/{use-copy-2j0k06rN.js → use-copy-C8TWXH-H.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bz6TE2Qz.js → use-create-virtual-mcp-CeEuYNMP.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BPq8VLDt.js → use-date-fns-locale-D3qFWxxv.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CMA_1eXM.js → use-debounced-autosave-DsoI68di.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Dju-tMu1.js → use-debounced-value-KpwtUdsd.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BtvhFk4m.js → use-deco-credits-DscUzXq9.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D8zpT0sX.js → use-decopilot-events-D8UIooCs.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BXDiC_mk.js → use-delete-connection-Dnzv3Wbz.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CXT7CFHy.js → use-deployment-admin-P_SogPj1.js} +1 -1
- package/dist/client/assets/use-ensure-project-folder-Dom2nmkC.js +1 -0
- package/dist/client/assets/use-fast-preview-draft-url-DnHFw81T.js +1 -0
- package/dist/client/assets/use-file-configs-Cv2mXUdp.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-CtScOz_h.js → use-infinite-scroll-CuKgvt7b.js} +1 -1
- package/dist/client/assets/{use-join-requests-CccLwL3-.js → use-join-requests-cLAvpRra.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-B0dFgvCE.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-Is2pR00q.js → use-mcp-auth-status-DaPeILTX.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DuTNn1dc.js → use-mcp-client-CU2kDBXP.js} +2 -2
- package/dist/client/assets/{use-mcp-prompts-3vLSpQqZ.js → use-mcp-prompts-CdDXQMlf.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CA6Ri5UK.js → use-mcp-tools-CyHq-JFp.js} +1 -1
- package/dist/client/assets/{use-members-BqWTpMNp.js → use-members-CkpNHwM6.js} +1 -1
- package/dist/client/assets/{use-mobile-Di3PCVWm.js → use-mobile-DNDEd3kt.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Cu9cZhs8.js → use-navigate-to-agent-JTDphVE0.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-sjDwQSEM.js → use-open-billing-url-2Iqpie3T.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DIUzAE5u.js → use-org-auth-client-Bwzj9WuC.js} +1 -1
- package/dist/client/assets/{use-org-fs-DOu4nQSr.js → use-org-fs-Cg7EJCYS.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BhJEcVcm.js → use-org-repo-syncs-D4j72pCa.js} +1 -1
- package/dist/client/assets/{use-org-sso-B57pfGVG.js → use-org-sso-CMfwXvs9.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DDnFx_jd.js → use-organization-roles-DPDTJ01F.js} +1 -1
- package/dist/client/assets/use-organization-settings-BMIqQlbM.js +1 -0
- package/dist/client/assets/{use-panel-navigate-c5H4a21L.js → use-panel-navigate-CL5hztR3.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-CBbSdoTE.js +1 -0
- package/dist/client/assets/{use-project-scope-A4YCdR4N.js → use-project-scope-DqbIN7fa.js} +1 -1
- package/dist/client/assets/use-recent-apps-Beu6vFHw.js +1 -0
- package/dist/client/assets/use-releases-Bfs5MNEe.js +1 -0
- package/dist/client/assets/{use-reports-diagnostic-Dw_QzpEb.js → use-reports-diagnostic-QSfTgm94.js} +1 -1
- package/dist/client/assets/{use-secrets-BwPjhWC0.js → use-secrets-BaG_Hkwz.js} +1 -1
- package/dist/client/assets/use-section-preview-base-DUXeQAGw.js +1 -0
- package/dist/client/assets/{use-tags-Ce3D-sM7.js → use-tags-BWRD1El7.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BR7NSR26.js → use-task-board-analytics-Bkf73btp.js} +1 -1
- package/dist/client/assets/{use-task-board-events-BBlz-cBe.js → use-task-board-events-CLNIzDoN.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BzAFAQp8.js → use-task-board-item-prs-Bh5krZjb.js} +1 -1
- package/dist/client/assets/{use-task-board-items-DTbT7rEp.js → use-task-board-items-zobNU9xE.js} +1 -1
- package/dist/client/assets/use-task-metadata-Bsl_Cezz.js +1 -0
- package/dist/client/assets/{use-thread-analytics-CeuE3odS.js → use-thread-analytics-CdWNwDDd.js} +1 -1
- package/dist/client/assets/use-thread-outputs-BkgKa2EX.js +1 -0
- package/dist/client/assets/useInfiniteQuery-pEq0vd9s.js +1 -0
- package/dist/client/assets/{useQueries-BliyNTtT.js → useQueries-E-2AGLRt.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BQsEFgzv.js +1 -0
- package/dist/client/assets/{users-CsvLtEUJ.js → users-L9Rh2Jo7.js} +1 -1
- package/dist/client/assets/{utils-DHYRJNUn.js → utils-Dx9iFvKJ.js} +1 -1
- package/dist/client/assets/variant-calendar-CkKYqTGY.js +1 -0
- package/dist/client/assets/variant-draft-pointer-CSAndyah.js +1 -0
- package/dist/client/assets/{view-mode-toggle-B55pxnK_.js → view-mode-toggle-DxuIXC_C.js} +1 -1
- package/dist/client/assets/virtual-mcp-D7evpUlE.js +1 -0
- package/dist/client/assets/{watch-sse-pool-B66Eygyb.js → watch-sse-pool-Bs34dRKl.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/migrate-dbos.js +1 -1
- package/dist/server/migrate.js +42 -42
- package/dist/server/server.js +777 -737
- package/package.json +2 -1
- package/dist/client/assets/add-connection-dialog-BB_zBu7s.js +0 -1
- package/dist/client/assets/agent-analytics-DJ6OqUua.js +0 -2
- package/dist/client/assets/agent-app-6ZZFFR6d.js +0 -1
- package/dist/client/assets/agent-assets-BHKSbhmH.js +0 -1
- package/dist/client/assets/agent-automation-BEmy5bSr.js +0 -20
- package/dist/client/assets/agent-automations-p8P_f3PC.js +0 -1
- package/dist/client/assets/agent-connect-sources-DHxXXvzx.js +0 -1
- package/dist/client/assets/agent-deck-kxbwQZGK.js +0 -1
- package/dist/client/assets/agent-e2e-BPE2bY36.js +0 -1
- package/dist/client/assets/agent-experiments-ChC-SJXX.js +0 -1
- package/dist/client/assets/agent-file-BFxmR6QX.js +0 -1
- package/dist/client/assets/agent-hosting-BV7C2pVl.js +0 -1
- package/dist/client/assets/agent-library-dgFnuWrg.js +0 -1
- package/dist/client/assets/agent-library-file-LGRVpT_Z.js +0 -1
- package/dist/client/assets/agent-monitor-CbF33zT0.js +0 -1
- package/dist/client/assets/agent-overview-CiiRxzYe.js +0 -1
- package/dist/client/assets/agent-settings-CFC23BeV.js +0 -1
- package/dist/client/assets/agent-site-editor-Dq16bHz8.js +0 -25
- package/dist/client/assets/agent-site-editor-code-B3URMZgm.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CbMNndHb.js +0 -8
- package/dist/client/assets/agent-site-editor-preview-Dy_HN_0a.js +0 -551
- package/dist/client/assets/agent-view-AaYNRrLl.js +0 -1
- package/dist/client/assets/agent-view-guard-CShYlKBB.js +0 -1
- package/dist/client/assets/api-keys-CvurWoww.js +0 -1
- package/dist/client/assets/app-editor-Dtvslmpt.js +0 -1
- package/dist/client/assets/auth-entry-CcnG-745.js +0 -1
- package/dist/client/assets/blog-schema-Qz918NIm.js +0 -1
- package/dist/client/assets/category-editor-w7_HM15g.js +0 -1
- package/dist/client/assets/chat-context-DszOftwV.js +0 -39
- package/dist/client/assets/claim-phase-copy-gKkPnPW4.js +0 -1
- package/dist/client/assets/collection-detail-D7Eq0q0A.js +0 -1
- package/dist/client/assets/connection-detail-DVH9ilyh.js +0 -1
- package/dist/client/assets/connections-BMBv6B3A.js +0 -1
- package/dist/client/assets/context-B_2GuX3F.js +0 -1
- package/dist/client/assets/daily-pulse-CSM9zceR.js +0 -1
- package/dist/client/assets/device-hint-DPN31B5L.js +0 -1
- package/dist/client/assets/discover-DvrfCZMt.js +0 -1
- package/dist/client/assets/flat-project-Dhd407Mb.js +0 -1
- package/dist/client/assets/format-time-CjIPQhCN.js +0 -1
- package/dist/client/assets/general-CeTNWbSz.js +0 -1
- package/dist/client/assets/home-B3luwcfX.js +0 -1
- package/dist/client/assets/index-DHd9v6HB.js +0 -1
- package/dist/client/assets/index-DQO0lnZr.css +0 -1
- package/dist/client/assets/index-bl_DQ3mH.js +0 -243
- package/dist/client/assets/index-zYf8hP69.js +0 -1
- package/dist/client/assets/input-B6YAOx07.js +0 -17
- package/dist/client/assets/input-C1msyAUz.js +0 -1
- package/dist/client/assets/legacy-agents-deep-fygb-JNd.js +0 -1
- package/dist/client/assets/legacy-main-redirect-BKIEGtd4.js +0 -1
- package/dist/client/assets/library-BgLLAz_1.js +0 -1
- package/dist/client/assets/mustache-B7TZyK91.js +0 -4
- package/dist/client/assets/openai-conversation-C4Qt6S-l.js +0 -3
- package/dist/client/assets/optimistic-project-sidebar-views-CoZosNmn.js +0 -1
- package/dist/client/assets/page-seo-form-DdXyS1MG.js +0 -1
- package/dist/client/assets/post-calendar-Dr7XWigd.js +0 -1
- package/dist/client/assets/post-editor-CKCVg_my.js +0 -2
- package/dist/client/assets/product-picker-dialog-DuFOtAE-.js +0 -1
- package/dist/client/assets/project-reports-UVwSbHHJ.js +0 -1
- package/dist/client/assets/project-tasks-DuMsfpY5.js +0 -1
- package/dist/client/assets/record-editor-ceYt0p4C.js +0 -1
- package/dist/client/assets/redirect-editor-Ca575ToY.js +0 -1
- package/dist/client/assets/reports-y_yDpDn4.js +0 -1
- package/dist/client/assets/repository-binding-BTsmo_dA.js +0 -1
- package/dist/client/assets/resolve-tab-icon-DqCiaIA7.js +0 -1
- package/dist/client/assets/review-settings-THwrc5M3.js +0 -1
- package/dist/client/assets/rich-text-link-control-CNQ92nZ4.js +0 -1
- package/dist/client/assets/route-CfEJDbbT.js +0 -1
- package/dist/client/assets/route-DD4978oF.js +0 -1
- package/dist/client/assets/route-e2YuR4Xl.js +0 -1
- package/dist/client/assets/runnable-block-editor-fWbFWGvz.js +0 -17
- package/dist/client/assets/sandbox-git-api-C7JbVL7R.js +0 -1
- package/dist/client/assets/sandbox-lifecycle-context-C25F7mSK.js +0 -1
- package/dist/client/assets/sections-editor-B5MFR1yl.js +0 -4
- package/dist/client/assets/seo-editor-DCKDCOQr.js +0 -1
- package/dist/client/assets/settings-tab-fdKZYnq9.js +0 -4
- package/dist/client/assets/shell-layout-Bk6uPKMe.js +0 -1
- package/dist/client/assets/taskboard-analytics-xeHAgwnO.js +0 -1
- package/dist/client/assets/tasks-Ba-oyyIK.js +0 -1
- package/dist/client/assets/thread-analytics-C0BM4p9K.js +0 -1
- package/dist/client/assets/thread-button-DKjUerzt.js +0 -1
- package/dist/client/assets/use-chat-layout-state-CVkPEEUs.js +0 -1
- package/dist/client/assets/use-chat-navigation-DLnmXNT9.js +0 -1
- package/dist/client/assets/use-ensure-project-folder-CqaPdVz-.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-DlLnA8PJ.js +0 -1
- package/dist/client/assets/use-file-configs-BSnoYr1R.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-O3Jy3Qh8.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-D9sV9o2T.js +0 -1
- package/dist/client/assets/use-organization-settings-BOGRgJjV.js +0 -1
- package/dist/client/assets/use-releases-BmeSCMgM.js +0 -1
- package/dist/client/assets/use-sandbox-events-hhwp2IWJ.js +0 -2
- package/dist/client/assets/use-section-preview-base-B7bjCuOw.js +0 -1
- package/dist/client/assets/use-task-metadata-CBQ5Muu5.js +0 -1
- package/dist/client/assets/use-thread-outputs-c6b1HaAz.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DeMEFTdd.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CUkGf5w6.js +0 -1
- package/dist/client/assets/variant-calendar-CKqGYdH4.js +0 -1
- package/dist/client/assets/variant-matcher-override-uklREcGs.js +0 -1
- package/dist/client/assets/virtual-mcp-DFjD0qBz.js +0 -1
|
@@ -1,551 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-B5MFR1yl.js","assets/index-bl_DQ3mH.js","assets/index-DQO0lnZr.css","assets/chat-context-DszOftwV.js","assets/use-panel-navigate-c5H4a21L.js","assets/thread-route-CR0TIP8s.js","assets/use-project-scope-A4YCdR4N.js","assets/repository-binding-BTsmo_dA.js","assets/use-mcp-client-DuTNn1dc.js","assets/auth-CTn9OsYL.js","assets/autosend-Cr5TlS-x.js","assets/thread-intent-CG-CCDLs.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-B66Eygyb.js","assets/task-board-kbcRVMI1.js","assets/schema-kVE-1hbs.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-D8zpT0sX.js","assets/use-ai-providers-IjG3zzka.js","assets/use-chat-navigation-DLnmXNT9.js","assets/location-BjlyegC2.js","assets/use-organization-settings-BOGRgJjV.js","assets/use-new-blocks-editor-D9sV9o2T.js","assets/runnable-block-editor-fWbFWGvz.js","assets/input-B6YAOx07.js","assets/usage-stats-CAukzrpg.js","assets/tool-namespace-uRsPbj-p.js","assets/form-D6DHFxsw.js","assets/label-Bqj_xjz9.js","assets/utils-CVEq3hMx.js","assets/markdown-5DzLzA6E.js","assets/use-copy-2j0k06rN.js","assets/Copy01-QpufVNbj.js","assets/ZoomOut-Bnst3wtU.js","assets/use-mobile-Di3PCVWm.js","assets/tooltip-COqLwkid.js","assets/index-B5IA1qMq.js","assets/agent-icon-BdZdLCky.js","assets/AlertCircle-BILwGqjV.js","assets/Tool01-BSpg9N8Q.js","assets/ArrowUp-CFc2wNu3.js","assets/ArrowLeft-DlRqrbst.js","assets/LinkBroken01-BBYM52IU.js","assets/ShoppingBag01-Brrt7Bh6.js","assets/Building02-QB_UI3sB.js","assets/CheckCircle-CG1RvCMD.js","assets/ChevronUp-BrMcnDd0.js","assets/ChevronSelectorVertical-23OZgHQl.js","assets/UserSquare-BXjBRbTF.js","assets/CreditCard01-W1zS1W7o.js","assets/DotsVertical-E-CAHxZx.js","assets/Image01-D8Dg78Ju.js","assets/Globe04-C2IFbCwJ.js","assets/SwitchHorizontal01-B5sfCWHV.js","assets/Key01-CCpcNn9J.js","assets/Link01-Dw-VkUVV.js","assets/Monitor01-596xyLh3.js","assets/Sun-BmhcFIJl.js","assets/Play-CIe1tupB.js","assets/Plus-DTyq8wfJ.js","assets/SearchMd-DnZ_sK_U.js","assets/Trash01-uPItCfKQ.js","assets/Upload01-ClSeM0gf.js","assets/User01-DabbLHAZ.js","assets/Users01-Dt36FENA.js","assets/XClose-BMDlg-34.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-d9uOvdxM.js","assets/file-type-icon-C-_1hLql.js","assets/shell-layout-Bk6uPKMe.js","assets/avatar-DNs314ny.js","assets/use-clock-tick-zaL95TTy.js","assets/command-DFd1c5Z5.js","assets/index-Dhdyv2s0.js","assets/integration-icon-DogZfPWq.js","assets/project-icon-DsUbDdQC.js","assets/new-project-dialog-C5lJfUJ3.js","assets/repository-import-picker-D5xDiyD_.js","assets/use-navigate-to-agent-Cu9cZhs8.js","assets/repository-picker-DExxlkis.js","assets/useInfiniteQuery-DeMEFTdd.js","assets/infiniteQueryObserver-rUCOtzeA.js","assets/collection-search-q0ogFMFh.js","assets/use-debounced-value-Dju-tMu1.js","assets/required-auth-layout-Dzef4Ao1.js","assets/use-org-sso-B57pfGVG.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-Bi-CpEK_.js","assets/select-WviNHwZD.js","assets/index-BdQq_4o_.js","assets/tabs-BXhvcQgN.js","assets/use-deco-credits-BtvhFk4m.js","assets/toggle-group-Q9SREgL7.js","assets/use-open-billing-url-sjDwQSEM.js","assets/index-DCmQGiOV.js","assets/checkbox-jukyyas4.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-MLSOZysn.js","assets/drawer-UzGeZrmC.js","assets/input-C1msyAUz.js","assets/suggestion-C591DFAx.js","assets/use-chat-layout-state-CVkPEEUs.js","assets/use-file-configs-BSnoYr1R.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-3vLSpQqZ.js","assets/use-org-fs-DOu4nQSr.js","assets/question-004-sINsf4GQ.js","assets/use-members-BqWTpMNp.js","assets/use-org-auth-client-DIUzAE5u.js","assets/feature-paywall-nTUHasXJ.js","assets/plan-ladder-gwROOTzi.js","assets/add-connection-dialog-BB_zBu7s.js","assets/extract-connection-data-CJhjAx3s.js","assets/metadata-D72DunRR.js","assets/connection-DSkv8Cg1.js","assets/url-slug-CUhgOgGc.js","assets/connection-card-C7Yq5GHs.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-DvoMwt1e.js","assets/use-connection-gMb_8zEe.js","assets/schema-BKM3gR2B.js","assets/connection-form-helpers-BsU6F-s_.js","assets/authenticate-and-persist-oauth-bcqFV5Ih.js","assets/mcp-oauth-D_oaXY6E.js","assets/mcp-oauth-tCidCN-u.js","assets/collection-tabs-CYgVG041.js","assets/badge-BDMYkxf_.js","assets/use-infinite-scroll-CtScOz_h.js","assets/useSuspenseInfiniteQuery-CUkGf5w6.js","assets/use-task-board-events-BBlz-cBe.js","assets/input-Bwd_JSM8.css","assets/claim-phase-copy-gKkPnPW4.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-DjM6V7aG.js","assets/collapsible-CSMgVqT4.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DuGbCe-D.js","assets/types-C5SQt0XZ.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-CZiDNUQZ.js","assets/use-thread-outputs-c6b1HaAz.js","assets/utils-DHYRJNUn.js","assets/scroll-area-1S72VGW0.js","assets/monaco-editor-2Ci5R71u.js","assets/editor-KeKsFC14.js","assets/calendar-9HE_r4Hw.js","assets/rich-text-link-control-CNQ92nZ4.js","assets/switch-CUK4V52q.js","assets/core.esm-lZvNzlYc.js","assets/sortable.esm-h3AYG-u7.js","assets/view-mode-toggle-B55pxnK_.js","assets/combobox-BTfHieW4.js","assets/alert-dialog-By0HRTrM.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-pTAwOtCG.js","assets/asset-utils-Cne_zeGQ.js","assets/sandbox-git-api-C7JbVL7R.js","assets/mustache-B7TZyK91.js","assets/page-seo-form-DdXyS1MG.js","assets/use-section-preview-base-B7bjCuOw.js","assets/section-preview-url-7zfngvgW.js","assets/variant-matcher-override-uklREcGs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as v,aD as Et,aW as Ye,aE as Ee,c as fe,b as Te,j as s,q as Xn,D as Zn,K as Xs,s as es,v as ts,e as Zs,h as jt,I as Rn,B as Ue,w as er,a6 as ns,aX as tr,a2 as tn,aY as nr,aV as sr,a0 as Ln,a1 as On,l as Ht,P as _n,y as rr,t as An}from"./index-bl_DQ3mH.js";import{A as ar}from"./agent-view-guard-CShYlKBB.js";import{F as ir}from"./feature-gate-D5KGpIQ3.js";import{a as or,b as Nt,r as ss,l as rs,f as lr,w as cr}from"./chat-context-DszOftwV.js";import{t as dr}from"./ChevronUp-BrMcnDd0.js";import{I as as,R as ur,S as mr,d as fr,T as pr,U as hr,V as gr,W as vr,X as Bn,K as br}from"./agent-icon-BdZdLCky.js";import{a as xr}from"./UserSquare-BXjBRbTF.js";import{s as yr}from"./Plus-DTyq8wfJ.js";import{P as wr,a as kr,b as Pr}from"./popover-MLSOZysn.js";import{e as it,b as ot,c as is,f as os,C as ls,a as cs}from"./command-DFd1c5Z5.js";import{c as Sr,a as Er}from"./repository-binding-BTsmo_dA.js";import{b as nn}from"./sandbox-lifecycle-context-C25F7mSK.js";import{e as jr}from"./backoff-CrEUbyZT.js";import{f as Nr}from"./thread-intent-CG-CCDLs.js";import{a as ds}from"./input-B6YAOx07.js";import{N as Tr,c as Cr,s as lt,n as sn,d as us,f as $e,v as ms,h as Rr,u as Lr,j as Or,k as _r,l as Ar,m as Br,o as Fn}from"./claim-phase-copy-gKkPnPW4.js";import{u as Fr}from"./use-mobile-Di3PCVWm.js";import{b as Vt,T as qt,a as Wt}from"./tooltip-COqLwkid.js";import{T as nt}from"./toolbar-icon-button-Djr5zvaV.js";import{b as $r,a as Mr,u as fs,g as Dr,c as Kr,B as Gt,P as zr,r as Ir,R as Ur,d as Hr,e as rn,f as ps,h as Vr,i as qr,j as Wr,l as Gr,m as Jr,p as Yr,k as Qr,S as Jt}from"./runnable-block-editor-fWbFWGvz.js";import{w as yt,i as Xr}from"./variant-matcher-override-uklREcGs.js";import{r as Zr,w as ea,D as ta,b as $n,a as na}from"./section-preview-url-7zfngvgW.js";import{u as sa}from"./use-fast-preview-draft-url-DlLnA8PJ.js";import{u as ra,w as Mn}from"./device-hint-DPN31B5L.js";import{a as aa,c as hs}from"./shell-layout-Bk6uPKMe.js";import{u as gs,b as ia}from"./use-sandbox-events-hhwp2IWJ.js";import{u as Xt}from"./useQueries-BliyNTtT.js";import{i as oa}from"./LinkBroken01-BBYM52IU.js";import{u as vs}from"./blocks-preview-workspace-context-D5JWaTS4.js";import{i as la}from"./AlertCircle-BILwGqjV.js";import{E as an}from"./empty-state-CvDYWxOG.js";import{M as ca}from"./monaco-editor-2Ci5R71u.js";import{u as da}from"./use-new-blocks-editor-D9sV9o2T.js";import{a as ua}from"./utils-DHYRJNUn.js";import{R as Dn,a as wt,b as Kn}from"./resizable-UTJFKDGm.js";import{r as ma}from"./virtual-mcp-DFjD0qBz.js";import{d as fa}from"./delay-CnY5UFtP.js";import{a as Yt}from"./use-chat-layout-state-CVkPEEUs.js";import{G as zn}from"./repository-picker-DExxlkis.js";import{R as pa}from"./repository-import-picker-D5xDiyD_.js";import{r as ha}from"./use-main-panel-tabs-O3Jy3Qh8.js";import{u as ga}from"./use-task-metadata-CBQ5Muu5.js";import{b as va}from"./thread-route-CR0TIP8s.js";import"./use-panel-navigate-c5H4a21L.js";import"./use-project-scope-A4YCdR4N.js";import"./feature-paywall-nTUHasXJ.js";import"./plan-ladder-gwROOTzi.js";import"./use-decopilot-events-D8zpT0sX.js";import"./watch-sse-pool-B66Eygyb.js";import"./task-board-kbcRVMI1.js";import"./schema-kVE-1hbs.js";import"./autosend-Cr5TlS-x.js";import"./use-mcp-client-DuTNn1dc.js";import"./auth-CTn9OsYL.js";import"./use-ai-providers-IjG3zzka.js";import"./use-chat-navigation-DLnmXNT9.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BOGRgJjV.js";import"./Tool01-BSpg9N8Q.js";import"./ArrowUp-CFc2wNu3.js";import"./ArrowLeft-DlRqrbst.js";import"./ShoppingBag01-Brrt7Bh6.js";import"./ZoomOut-Bnst3wtU.js";import"./Building02-QB_UI3sB.js";import"./CheckCircle-CG1RvCMD.js";import"./ChevronSelectorVertical-23OZgHQl.js";import"./Copy01-QpufVNbj.js";import"./CreditCard01-W1zS1W7o.js";import"./DotsVertical-E-CAHxZx.js";import"./Image01-D8Dg78Ju.js";import"./Globe04-C2IFbCwJ.js";import"./SwitchHorizontal01-B5sfCWHV.js";import"./Key01-CCpcNn9J.js";import"./Link01-Dw-VkUVV.js";import"./Monitor01-596xyLh3.js";import"./Sun-BmhcFIJl.js";import"./Play-CIe1tupB.js";import"./SearchMd-DnZ_sK_U.js";import"./Trash01-uPItCfKQ.js";import"./Upload01-ClSeM0gf.js";import"./User01-DabbLHAZ.js";import"./Users01-Dt36FENA.js";import"./XClose-BMDlg-34.js";import"./index-Dhdyv2s0.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./usage-stats-CAukzrpg.js";import"./tool-namespace-uRsPbj-p.js";import"./form-D6DHFxsw.js";import"./label-Bqj_xjz9.js";import"./utils-CVEq3hMx.js";import"./markdown-5DzLzA6E.js";import"./use-copy-2j0k06rN.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-d9uOvdxM.js";import"./file-type-icon-C-_1hLql.js";import"./chat-draft-Bi-CpEK_.js";import"./select-WviNHwZD.js";import"./index-BdQq_4o_.js";import"./index-B5IA1qMq.js";import"./tabs-BXhvcQgN.js";import"./use-deco-credits-BtvhFk4m.js";import"./toggle-group-Q9SREgL7.js";import"./use-open-billing-url-sjDwQSEM.js";import"./index-DCmQGiOV.js";import"./checkbox-jukyyas4.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-DNs314ny.js";import"./drawer-UzGeZrmC.js";import"./input-C1msyAUz.js";import"./suggestion-C591DFAx.js";import"./use-mcp-prompts-3vLSpQqZ.js";import"./use-org-fs-DOu4nQSr.js";import"./useInfiniteQuery-DeMEFTdd.js";import"./infiniteQueryObserver-rUCOtzeA.js";import"./question-004-sINsf4GQ.js";import"./use-members-BqWTpMNp.js";import"./use-org-auth-client-DIUzAE5u.js";import"./add-connection-dialog-BB_zBu7s.js";import"./collection-search-q0ogFMFh.js";import"./extract-connection-data-CJhjAx3s.js";import"./metadata-D72DunRR.js";import"./connection-DSkv8Cg1.js";import"./url-slug-CUhgOgGc.js";import"./connection-card-C7Yq5GHs.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-DogZfPWq.js";import"./textarea-DvoMwt1e.js";import"./use-connection-gMb_8zEe.js";import"./schema-BKM3gR2B.js";import"./connection-form-helpers-BsU6F-s_.js";import"./authenticate-and-persist-oauth-bcqFV5Ih.js";import"./mcp-oauth-D_oaXY6E.js";import"./mcp-oauth-tCidCN-u.js";import"./collection-tabs-CYgVG041.js";import"./badge-BDMYkxf_.js";import"./use-infinite-scroll-CtScOz_h.js";import"./useSuspenseInfiniteQuery-CUkGf5w6.js";import"./use-task-board-events-BBlz-cBe.js";import"./pair-DjM6V7aG.js";import"./collapsible-CSMgVqT4.js";import"./use-clock-tick-zaL95TTy.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DuGbCe-D.js";import"./types-C5SQt0XZ.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CZiDNUQZ.js";import"./use-navigate-to-agent-Cu9cZhs8.js";import"./use-thread-outputs-c6b1HaAz.js";import"./scroll-area-1S72VGW0.js";import"./calendar-9HE_r4Hw.js";import"./rich-text-link-control-CNQ92nZ4.js";import"./switch-CUK4V52q.js";import"./core.esm-lZvNzlYc.js";import"./sortable.esm-h3AYG-u7.js";import"./view-mode-toggle-B55pxnK_.js";import"./combobox-BTfHieW4.js";import"./alert-dialog-By0HRTrM.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-pTAwOtCG.js";import"./use-debounced-value-Dju-tMu1.js";import"./use-file-configs-BSnoYr1R.js";import"./asset-utils-Cne_zeGQ.js";import"./sandbox-git-api-C7JbVL7R.js";import"./project-icon-DsUbDdQC.js";import"./new-project-dialog-C5lJfUJ3.js";import"./required-auth-layout-Dzef4Ao1.js";import"./use-org-sso-B57pfGVG.js";import"./editor-KeKsFC14.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-tools-CA6Ri5UK.js";import"./resolve-tab-icon-DqCiaIA7.js";const ba={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function xa(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,l=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?ba:r&&i&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const ya=1e4,wa=1e3,ka=3e4;function Pa({iframeRef:t,src:e,active:n}){const r=v.useRef(0),i=v.useRef(null),u=v.useRef(null),l=v.useRef(e),c=v.useRef(n);l.current=e,c.current=n;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},ya)},h=()=>{if(!c.current||!l.current)return;u.current&&clearTimeout(u.current);const j=jr(ka,wa,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const b=t.current,P=l.current;!b||!P||!c.current||(b.src=P,d())},j)},f=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return v.useEffect(()=>{if(o(),r.current=0,!(!n||!e))return d(),o},[e,n]),{handleLoad:f,handleError:p}}const Sa=Et({tag:Ee(),id:Ee(),classes:Ee(),text:Ee(),html:Ee(),manifestKey:Ee().nullable(),componentName:Ee().nullable(),parents:Ee(),url:Ee(),path:Ee(),viewport:Et({width:Ye(),height:Ye()}),position:Et({x:Ye(),y:Ye()})}),Ea=`(function() {
|
|
3
|
-
if (window.__visualEditorActive) return;
|
|
4
|
-
window.__visualEditorActive = true;
|
|
5
|
-
|
|
6
|
-
var cursorStyle = document.createElement("style");
|
|
7
|
-
cursorStyle.textContent = "* { cursor: default !important; }";
|
|
8
|
-
document.head.appendChild(cursorStyle);
|
|
9
|
-
|
|
10
|
-
var highlight = document.createElement("div");
|
|
11
|
-
highlight.style.cssText = "position:fixed;pointer-events:none;outline:2px solid #a855f7;background:rgba(168,85,247,0.08);border-radius:2px;z-index:2147483647;display:none;";
|
|
12
|
-
document.body.appendChild(highlight);
|
|
13
|
-
|
|
14
|
-
var badge = document.createElement("div");
|
|
15
|
-
badge.style.cssText = "position:fixed;pointer-events:none;background:#a855f7;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
16
|
-
document.body.appendChild(badge);
|
|
17
|
-
|
|
18
|
-
var lastTarget = null;
|
|
19
|
-
var rafPending = false;
|
|
20
|
-
var moveHandler = function(e) {
|
|
21
|
-
if (rafPending) return;
|
|
22
|
-
rafPending = true;
|
|
23
|
-
var target = e.target;
|
|
24
|
-
requestAnimationFrame(function() {
|
|
25
|
-
rafPending = false;
|
|
26
|
-
var el = target;
|
|
27
|
-
if (!el || el === highlight || el === badge) return;
|
|
28
|
-
if (el === lastTarget) return;
|
|
29
|
-
lastTarget = el;
|
|
30
|
-
var r = el.getBoundingClientRect();
|
|
31
|
-
highlight.style.display = "block";
|
|
32
|
-
highlight.style.top = r.top + "px";
|
|
33
|
-
highlight.style.left = r.left + "px";
|
|
34
|
-
highlight.style.width = r.width + "px";
|
|
35
|
-
highlight.style.height = r.height + "px";
|
|
36
|
-
var tag = el.tagName.toLowerCase();
|
|
37
|
-
var id = el.id ? "#" + el.id : "";
|
|
38
|
-
var cls = el.className && typeof el.className === "string"
|
|
39
|
-
? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
|
|
40
|
-
: "";
|
|
41
|
-
badge.textContent = tag + id + cls;
|
|
42
|
-
badge.style.display = "block";
|
|
43
|
-
badge.style.top = Math.max(0, r.top - 20) + "px";
|
|
44
|
-
badge.style.left = r.left + "px";
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
document.addEventListener("mousemove", moveHandler, true);
|
|
48
|
-
|
|
49
|
-
var outHandler = function(e) {
|
|
50
|
-
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
51
|
-
highlight.style.display = "none";
|
|
52
|
-
badge.style.display = "none";
|
|
53
|
-
lastTarget = null;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
document.addEventListener("mouseout", outHandler, true);
|
|
57
|
-
|
|
58
|
-
var clickHandler = function(e) {
|
|
59
|
-
e.preventDefault();
|
|
60
|
-
e.stopImmediatePropagation();
|
|
61
|
-
var el = e.target;
|
|
62
|
-
if (!el || el === highlight || el === badge) return;
|
|
63
|
-
|
|
64
|
-
highlight.style.outline = "2px solid #a855f7";
|
|
65
|
-
highlight.style.background = "rgba(168,85,247,0.15)";
|
|
66
|
-
setTimeout(function() {
|
|
67
|
-
highlight.style.outline = "2px solid #a855f7";
|
|
68
|
-
highlight.style.background = "rgba(168,85,247,0.08)";
|
|
69
|
-
}, 400);
|
|
70
|
-
|
|
71
|
-
var tag = el.tagName.toLowerCase();
|
|
72
|
-
var id = el.id || "";
|
|
73
|
-
var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
|
|
74
|
-
var text = (el.textContent || "").trim().slice(0, 200);
|
|
75
|
-
var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
|
|
76
|
-
|
|
77
|
-
var closestSection = el.closest("section[data-manifest-key]");
|
|
78
|
-
var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
|
|
79
|
-
|
|
80
|
-
var ancestor = el;
|
|
81
|
-
var componentName = null;
|
|
82
|
-
for (var i = 0; i < 10 && ancestor; i++) {
|
|
83
|
-
if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
|
|
84
|
-
ancestor = ancestor.parentElement;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
var parents = [];
|
|
88
|
-
var p = el.parentElement;
|
|
89
|
-
for (var j = 0; j < 4 && p && p !== document.body; j++) {
|
|
90
|
-
var pTag = p.tagName ? p.tagName.toLowerCase() : "";
|
|
91
|
-
var pId = p.id ? "#" + p.id : "";
|
|
92
|
-
var pCls = p.className && typeof p.className === "string"
|
|
93
|
-
? "." + p.className.trim().split(/\\s+/)[0]
|
|
94
|
-
: "";
|
|
95
|
-
parents.unshift(pTag + pId + pCls);
|
|
96
|
-
p = p.parentElement;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
window.parent.postMessage({
|
|
100
|
-
type: "visual-editor::element-clicked",
|
|
101
|
-
payload: {
|
|
102
|
-
tag: tag, id: id, classes: classes, text: text, html: html,
|
|
103
|
-
manifestKey: manifestKey, componentName: componentName,
|
|
104
|
-
parents: parents.join(" > "),
|
|
105
|
-
url: window.location.href, path: window.location.pathname,
|
|
106
|
-
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
107
|
-
position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
|
|
108
|
-
}
|
|
109
|
-
}, "*");
|
|
110
|
-
};
|
|
111
|
-
document.addEventListener("click", clickHandler, true);
|
|
112
|
-
|
|
113
|
-
window.addEventListener("message", function(e) {
|
|
114
|
-
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — a nested/downstream frame's forged message can't deactivate the editor.
|
|
115
|
-
if (e.source !== window.parent) return;
|
|
116
|
-
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
117
|
-
if (e.data && e.data.type === "visual-editor::clear-hover") {
|
|
118
|
-
highlight.style.display = "none";
|
|
119
|
-
badge.style.display = "none";
|
|
120
|
-
lastTarget = null;
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
if (e.data && e.data.type === "visual-editor::deactivate") {
|
|
124
|
-
highlight.remove();
|
|
125
|
-
badge.remove();
|
|
126
|
-
cursorStyle.remove();
|
|
127
|
-
document.removeEventListener("mousemove", moveHandler, true);
|
|
128
|
-
document.removeEventListener("mouseout", outHandler, true);
|
|
129
|
-
document.removeEventListener("click", clickHandler, true);
|
|
130
|
-
window.__visualEditorActive = false;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
})();`;function ja(t,e){const n=t.map(()=>null),r=[];for(let p=0;p<t.length;p++)t[p]!==null&&r.push(p);const i=r.length,u=e.length;if(!i||!u)return n;const l=(p,j)=>{const b=t[r[p]??0];return!b||!b.length?1:b.indexOf(e[j]??"")>=0?2:0},c=[],o=[];for(let p=0;p<=i;p++)c.push(new Array(u+1).fill(0)),o.push(new Array(u+1).fill(2));for(let p=1;p<=i;p++){const j=c[p-1]??[],b=c[p]??[],P=o[p]??[];for(let g=1;g<=u;g++){let E=j[g]??0,N=2;const y=b[g-1]??0;y>E&&(E=y,N=0);const w=l(p-1,g-1),k=(j[g-1]??0)+w;w>0&&k>E&&(E=k,N=1),b[g]=E,P[g]=N}}let d=0,h=i,f=u;for(;h>0&&f>0;){const p=o[h]?.[f]??2;p===1?(n[r[h-1]??0]=f-1,d++,h--,f--):p===0?f--:h--}if(d===0&&u===i)for(let p=0;p<i;p++)n[r[p]??0]=p;return n}const Na=Et({sectionIndex:Ye(),manifestKey:Ee(),clickSeq:Ye()}),In=`(function() {
|
|
134
|
-
if (window.__cmsEditorActive) return;
|
|
135
|
-
window.__cmsEditorActive = true;
|
|
136
|
-
|
|
137
|
-
// Preserve scroll across variant-override navigations and save-reloads.
|
|
138
|
-
// Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
|
|
139
|
-
// or reloads it, which would otherwise jump to the top. We persist the scroll
|
|
140
|
-
// offset to sessionStorage (survives reload, same-origin) keyed by pathname
|
|
141
|
-
// (the override only changes the query, so the key is stable), then restore it
|
|
142
|
-
// on the next load — retried for ~1s so it outlasts re-hydration and lazy
|
|
143
|
-
// sections that grow the page after load. The recency guard avoids restoring a
|
|
144
|
-
// stale offset on a genuinely fresh visit.
|
|
145
|
-
var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
|
|
146
|
-
var saveScroll = function() {
|
|
147
|
-
try {
|
|
148
|
-
sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
|
|
149
|
-
x: window.scrollX, y: window.scrollY, t: Date.now()
|
|
150
|
-
}));
|
|
151
|
-
} catch (_) {}
|
|
152
|
-
};
|
|
153
|
-
var saveScrollPending = false;
|
|
154
|
-
window.addEventListener("scroll", function() {
|
|
155
|
-
if (saveScrollPending) return;
|
|
156
|
-
saveScrollPending = true;
|
|
157
|
-
requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
|
|
158
|
-
}, { passive: true });
|
|
159
|
-
(function restoreScroll() {
|
|
160
|
-
var raw = null;
|
|
161
|
-
try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
|
|
162
|
-
if (!raw) return;
|
|
163
|
-
var saved = null;
|
|
164
|
-
try { saved = JSON.parse(raw); } catch (_) { return; }
|
|
165
|
-
if (!saved || (Date.now() - saved.t) > 10000) return;
|
|
166
|
-
if (!saved.x && !saved.y) return;
|
|
167
|
-
var attempts = 0;
|
|
168
|
-
var apply = function() {
|
|
169
|
-
attempts++;
|
|
170
|
-
window.scrollTo(saved.x || 0, saved.y || 0);
|
|
171
|
-
if (attempts < 8) setTimeout(apply, 120);
|
|
172
|
-
};
|
|
173
|
-
apply();
|
|
174
|
-
})();
|
|
175
|
-
|
|
176
|
-
var highlight = document.createElement("div");
|
|
177
|
-
highlight.style.cssText = "position:absolute;pointer-events:none;outline:2px solid #06b6d4;background:rgba(6,182,212,0.06);border-radius:2px;z-index:2147483647;display:none;";
|
|
178
|
-
document.body.appendChild(highlight);
|
|
179
|
-
|
|
180
|
-
var badge = document.createElement("div");
|
|
181
|
-
badge.style.cssText = "position:absolute;pointer-events:none;background:#06b6d4;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
182
|
-
document.body.appendChild(badge);
|
|
183
|
-
|
|
184
|
-
var isTopLevelSection = function(el) {
|
|
185
|
-
return el && el.parentElement
|
|
186
|
-
? !el.parentElement.closest("section[data-manifest-key]")
|
|
187
|
-
: true;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
// All top-level page sections in DOM order (deco renders page sections as
|
|
191
|
-
// <section data-manifest-key>; nested islands/sections carry the attribute
|
|
192
|
-
// too, hence the top-level filter). This is the full DOM run, framework
|
|
193
|
-
// sections included — getAllSections() narrows it to the editable window.
|
|
194
|
-
var topLevelSections = function() {
|
|
195
|
-
return Array.from(document.querySelectorAll("section[data-manifest-key]"))
|
|
196
|
-
.filter(isTopLevelSection);
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
// Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
|
|
200
|
-
var sectionCandidates = [];
|
|
201
|
-
|
|
202
|
-
// Stringified from section-alignment.ts so both sides share one copy.
|
|
203
|
-
var alignSections = ${ja.toString()};
|
|
204
|
-
|
|
205
|
-
// Indexed like the decofile array; unmapped entries stay null (not clickable).
|
|
206
|
-
var computeAlignment = function(tops) {
|
|
207
|
-
var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
|
|
208
|
-
return alignSections(sectionCandidates, domKeys).map(function(idx) {
|
|
209
|
-
return idx === null ? null : tops[idx];
|
|
210
|
-
});
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
// Editable sections, indexed to match the decofile array the panel uses.
|
|
214
|
-
// Recomputed from the live DOM each call (cheap, rAF-throttled) so it
|
|
215
|
-
// self-heals as client-rendered/lazy sections mount. Until the editor sends
|
|
216
|
-
// candidates, fall back to the full top-level run.
|
|
217
|
-
var getAllSections = function() {
|
|
218
|
-
var tops = topLevelSections();
|
|
219
|
-
return sectionCandidates.length ? computeAlignment(tops) : tops;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// Resolve to the OUTERMOST page-level section (clicking nested content still
|
|
223
|
-
// maps to the top-level section the panel indexes); null if it isn't in the
|
|
224
|
-
// aligned editable set (a framework section deco injected).
|
|
225
|
-
var findSection = function(el, out) {
|
|
226
|
-
var node = el;
|
|
227
|
-
var found = null;
|
|
228
|
-
while (node && node !== document.body) {
|
|
229
|
-
if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
|
|
230
|
-
found = node;
|
|
231
|
-
}
|
|
232
|
-
node = node.parentElement;
|
|
233
|
-
}
|
|
234
|
-
if (!found) return null;
|
|
235
|
-
var sections = getAllSections();
|
|
236
|
-
if (out) out.sections = sections;
|
|
237
|
-
return sections.indexOf(found) >= 0 ? found : null;
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
// A Lazy wrapper's key is just the loader — show the inner section's instead.
|
|
241
|
-
var LAZY_KEYS = [
|
|
242
|
-
"website/sections/Rendering/Lazy.tsx",
|
|
243
|
-
"website/sections/Rendering/SingleDeferred.tsx"
|
|
244
|
-
];
|
|
245
|
-
var isLazyKey = function(key) {
|
|
246
|
-
return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
|
|
247
|
-
};
|
|
248
|
-
var displayKey = function(section) {
|
|
249
|
-
var key = section.getAttribute("data-manifest-key") || "section";
|
|
250
|
-
if (isLazyKey(key)) {
|
|
251
|
-
var inner = section.querySelector("section[data-manifest-key]");
|
|
252
|
-
if (inner) return inner.getAttribute("data-manifest-key") || key;
|
|
253
|
-
}
|
|
254
|
-
return key;
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
// Per-section metadata sent by the editor, aligned by index with
|
|
258
|
-
// getAllSections(). labels: names the DOM can't carry (a global section or a
|
|
259
|
-
// global inside async rendering); kinds: section type that drives the color.
|
|
260
|
-
var sectionLabels = [];
|
|
261
|
-
var sectionKinds = [];
|
|
262
|
-
var labelFor = function(section, sections) {
|
|
263
|
-
var idx = (sections || getAllSections()).indexOf(section);
|
|
264
|
-
if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
|
|
265
|
-
return displayKey(section);
|
|
266
|
-
};
|
|
267
|
-
var kindFor = function(section, sections) {
|
|
268
|
-
var idx = (sections || getAllSections()).indexOf(section);
|
|
269
|
-
return (idx >= 0 && sectionKinds[idx]) || "normal";
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
// Highlight palette by section kind: global = light purple, variant = green,
|
|
273
|
-
// normal = blue.
|
|
274
|
-
var COLORS = {
|
|
275
|
-
normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
|
|
276
|
-
global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
|
|
277
|
-
variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
|
|
278
|
-
};
|
|
279
|
-
var applyColor = function(kind) {
|
|
280
|
-
var c = COLORS[kind] || COLORS.normal;
|
|
281
|
-
highlight.style.outline = "2px solid " + c.solid;
|
|
282
|
-
highlight.style.background = c.bg;
|
|
283
|
-
badge.style.background = c.solid;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
var lastSection = null;
|
|
287
|
-
var lastLabel = "";
|
|
288
|
-
var lastKind = "normal";
|
|
289
|
-
var rafPending = false;
|
|
290
|
-
// True while an in-place render fetch/swap is in flight; suppresses hover so it can't re-show the overlay right before the swap snapshots it.
|
|
291
|
-
var renderPending = false;
|
|
292
|
-
|
|
293
|
-
// Document-relative coordinates (rect + scroll) on absolutely-positioned
|
|
294
|
-
// nodes, so the browser scrolls the highlight together with the page
|
|
295
|
-
// natively — no per-frame JS repositioning, no scroll lag.
|
|
296
|
-
var positionHighlight = function(section) {
|
|
297
|
-
var r = section.getBoundingClientRect();
|
|
298
|
-
var top = r.top + window.scrollY;
|
|
299
|
-
var left = r.left + window.scrollX;
|
|
300
|
-
highlight.style.display = "block";
|
|
301
|
-
highlight.style.top = top + "px";
|
|
302
|
-
highlight.style.left = left + "px";
|
|
303
|
-
highlight.style.width = r.width + "px";
|
|
304
|
-
highlight.style.height = r.height + "px";
|
|
305
|
-
badge.textContent = lastLabel || displayKey(section);
|
|
306
|
-
badge.style.display = "block";
|
|
307
|
-
badge.style.top = Math.max(0, top - 20) + "px";
|
|
308
|
-
badge.style.left = left + "px";
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
var moveHandler = function(e) {
|
|
312
|
-
if (renderPending || rafPending) return;
|
|
313
|
-
rafPending = true;
|
|
314
|
-
var target = e.target;
|
|
315
|
-
requestAnimationFrame(function() {
|
|
316
|
-
rafPending = false;
|
|
317
|
-
if (renderPending) return;
|
|
318
|
-
if (!target || target === highlight || target === badge) return;
|
|
319
|
-
var out = {};
|
|
320
|
-
var section = findSection(target, out);
|
|
321
|
-
if (section === lastSection) return;
|
|
322
|
-
lastSection = section;
|
|
323
|
-
if (!section) {
|
|
324
|
-
highlight.style.display = "none";
|
|
325
|
-
badge.style.display = "none";
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
lastLabel = labelFor(section, out.sections);
|
|
329
|
-
lastKind = kindFor(section, out.sections);
|
|
330
|
-
applyColor(lastKind);
|
|
331
|
-
positionHighlight(section);
|
|
332
|
-
});
|
|
333
|
-
};
|
|
334
|
-
document.addEventListener("mousemove", moveHandler, true);
|
|
335
|
-
|
|
336
|
-
// Window scroll is handled natively by the absolute positioning above; this
|
|
337
|
-
// only re-syncs on resize and on scrolls inside nested scroll containers
|
|
338
|
-
// (capture=true catches those), where document coordinates do shift.
|
|
339
|
-
var reposition = function() {
|
|
340
|
-
if (!lastSection || highlight.style.display === "none") return;
|
|
341
|
-
if (rafPending) return;
|
|
342
|
-
rafPending = true;
|
|
343
|
-
requestAnimationFrame(function() {
|
|
344
|
-
rafPending = false;
|
|
345
|
-
if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
|
|
346
|
-
});
|
|
347
|
-
};
|
|
348
|
-
window.addEventListener("scroll", reposition, { capture: true, passive: true });
|
|
349
|
-
window.addEventListener("resize", reposition, { passive: true });
|
|
350
|
-
|
|
351
|
-
var outHandler = function(e) {
|
|
352
|
-
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
353
|
-
highlight.style.display = "none";
|
|
354
|
-
badge.style.display = "none";
|
|
355
|
-
lastSection = null;
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
document.addEventListener("mouseout", outHandler, true);
|
|
359
|
-
|
|
360
|
-
var clickSeq = 0;
|
|
361
|
-
|
|
362
|
-
// Blocks observes clicks to select sections in the side panel; it must not
|
|
363
|
-
// cancel the iframe page's own handlers or native control behavior.
|
|
364
|
-
var clickHandler = function(e) {
|
|
365
|
-
var target = e.target;
|
|
366
|
-
if (!target || target === highlight || target === badge) return;
|
|
367
|
-
var out = {};
|
|
368
|
-
var section = findSection(target, out);
|
|
369
|
-
if (!section) return;
|
|
370
|
-
|
|
371
|
-
var sectionIndex = out.sections.indexOf(section);
|
|
372
|
-
var manifestKey = section.getAttribute("data-manifest-key") || "";
|
|
373
|
-
|
|
374
|
-
var c = COLORS[lastKind] || COLORS.normal;
|
|
375
|
-
highlight.style.outline = "2px solid " + c.solid;
|
|
376
|
-
highlight.style.background = c.active;
|
|
377
|
-
setTimeout(function() {
|
|
378
|
-
highlight.style.background = c.bg;
|
|
379
|
-
}, 400);
|
|
380
|
-
|
|
381
|
-
clickSeq++;
|
|
382
|
-
window.parent.postMessage({
|
|
383
|
-
type: "cms-editor::section-clicked",
|
|
384
|
-
payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
|
|
385
|
-
}, "*");
|
|
386
|
-
};
|
|
387
|
-
document.addEventListener("click", clickHandler, true);
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Navigation is disabled while editing: leaving the page would leave the
|
|
391
|
-
* panel editing the previous page's sections. Only the default action of a
|
|
392
|
-
* real navigation is cancelled, never propagation — in-page controls must
|
|
393
|
-
* keep working (#5567).
|
|
394
|
-
*/
|
|
395
|
-
var isNavigatingAnchor = function(a) {
|
|
396
|
-
if (!a) return false;
|
|
397
|
-
var href = a.getAttribute("href");
|
|
398
|
-
if (!href) return false;
|
|
399
|
-
var trimmed = href.trim();
|
|
400
|
-
if (!trimmed || trimmed.charAt(0) === "#") return false;
|
|
401
|
-
if (/^javascript:/i.test(trimmed)) return false;
|
|
402
|
-
// Same document + fragment only scrolls.
|
|
403
|
-
try {
|
|
404
|
-
var url = new URL(a.href, location.href);
|
|
405
|
-
if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
|
|
406
|
-
} catch (_) {}
|
|
407
|
-
return true;
|
|
408
|
-
};
|
|
409
|
-
var navBlocker = function(e) {
|
|
410
|
-
var el = e.target;
|
|
411
|
-
var a = el && el.closest ? el.closest("a") : null;
|
|
412
|
-
if (!isNavigatingAnchor(a)) return;
|
|
413
|
-
e.preventDefault();
|
|
414
|
-
};
|
|
415
|
-
document.addEventListener("click", navBlocker, true);
|
|
416
|
-
|
|
417
|
-
var submitBlocker = function(e) { e.preventDefault(); };
|
|
418
|
-
document.addEventListener("submit", submitBlocker, true);
|
|
419
|
-
|
|
420
|
-
// Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
|
|
421
|
-
var renderCtrl = null;
|
|
422
|
-
var renderQueue = Promise.resolve();
|
|
423
|
-
var TRANSITION_TAG =
|
|
424
|
-
"<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
|
|
425
|
-
|
|
426
|
-
// A skipped view transition rejects its promises with "AbortError:
|
|
427
|
-
// Transition was skipped"; nobody else waits on them, so they are settled
|
|
428
|
-
// here rather than left as uncaught errors in the page's console.
|
|
429
|
-
var settleTransition = function(vt) {
|
|
430
|
-
if (!vt) return;
|
|
431
|
-
var ignore = function() {};
|
|
432
|
-
if (vt.ready) vt.ready.catch(ignore);
|
|
433
|
-
if (vt.updateCallbackDone) vt.updateCallbackDone.catch(ignore);
|
|
434
|
-
if (vt.finished) vt.finished.catch(ignore);
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
// A site that opts into cross-document view transitions
|
|
438
|
-
// (@view-transition { navigation: auto }) gets one on every reload a save
|
|
439
|
-
// makes. When the next save navigates the frame before that transition
|
|
440
|
-
// starts, the browser skips it and rejects the outgoing page's ready
|
|
441
|
-
// promise, which only a pageswap listener can reach. Kept after deactivate:
|
|
442
|
-
// settling changes nothing else, and the frame may still navigate.
|
|
443
|
-
if (!window.__cmsEditorPageSwap) {
|
|
444
|
-
window.__cmsEditorPageSwap = true;
|
|
445
|
-
window.addEventListener("pageswap", function(e) {
|
|
446
|
-
settleTransition(e.viewTransition);
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
// A quick second save skips the running transition. Only finished says
|
|
451
|
-
// when the swap is over, so the chain waits on it; the rest is settled.
|
|
452
|
-
var runSwapTransition = function(swap) {
|
|
453
|
-
if (typeof document.startViewTransition !== "function") {
|
|
454
|
-
swap();
|
|
455
|
-
return Promise.resolve();
|
|
456
|
-
}
|
|
457
|
-
var vt = document.startViewTransition(swap);
|
|
458
|
-
settleTransition(vt);
|
|
459
|
-
return vt.finished;
|
|
460
|
-
};
|
|
461
|
-
var renderInPlace = function(src, body) {
|
|
462
|
-
if (renderCtrl) renderCtrl.abort();
|
|
463
|
-
var ctrl = new AbortController();
|
|
464
|
-
renderCtrl = ctrl;
|
|
465
|
-
renderPending = true;
|
|
466
|
-
highlight.style.display = "none";
|
|
467
|
-
badge.style.display = "none";
|
|
468
|
-
window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
|
|
469
|
-
renderQueue = renderQueue.then(function() {
|
|
470
|
-
return fetch(src, {
|
|
471
|
-
method: "POST",
|
|
472
|
-
body: body,
|
|
473
|
-
signal: ctrl.signal,
|
|
474
|
-
headers: { accept: "text/html", "content-type": "application/json" }
|
|
475
|
-
}).then(function(res) {
|
|
476
|
-
if (!res.ok) throw new Error("render " + res.status);
|
|
477
|
-
return res.text();
|
|
478
|
-
}).then(function(html) {
|
|
479
|
-
var swap = function() {
|
|
480
|
-
document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
|
|
481
|
-
document.body.appendChild(highlight);
|
|
482
|
-
document.body.appendChild(badge);
|
|
483
|
-
// Old section is gone; hide the overlay until the next hover repositions it.
|
|
484
|
-
highlight.style.display = "none";
|
|
485
|
-
badge.style.display = "none";
|
|
486
|
-
lastSection = null;
|
|
487
|
-
};
|
|
488
|
-
var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
|
|
489
|
-
var doc = new DOMParser().parseFromString(headHtml, "text/html");
|
|
490
|
-
var sheets = Array.prototype.map.call(
|
|
491
|
-
doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
|
|
492
|
-
function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
|
|
493
|
-
);
|
|
494
|
-
return Promise.all(sheets).then(function() {
|
|
495
|
-
return runSwapTransition(swap);
|
|
496
|
-
});
|
|
497
|
-
}).then(function() {
|
|
498
|
-
var t = document.getElementById("deco-disable-transitions");
|
|
499
|
-
if (t) t.remove();
|
|
500
|
-
if (ctrl === renderCtrl) renderPending = false;
|
|
501
|
-
window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
|
|
502
|
-
}).catch(function(err) {
|
|
503
|
-
if (ctrl === renderCtrl) renderPending = false;
|
|
504
|
-
if (err && err.name === "AbortError") return;
|
|
505
|
-
window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
|
|
506
|
-
});
|
|
507
|
-
});
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
window.addEventListener("message", function(e) {
|
|
511
|
-
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
|
|
512
|
-
if (e.source !== window.parent) return;
|
|
513
|
-
if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
|
|
514
|
-
renderInPlace(e.data.src, e.data.body);
|
|
515
|
-
return;
|
|
516
|
-
}
|
|
517
|
-
if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
|
|
518
|
-
sectionLabels = e.data.labels;
|
|
519
|
-
if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
|
|
520
|
-
if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
|
|
521
|
-
if (lastSection) {
|
|
522
|
-
lastLabel = labelFor(lastSection);
|
|
523
|
-
lastKind = kindFor(lastSection);
|
|
524
|
-
applyColor(lastKind);
|
|
525
|
-
if (highlight.style.display !== "none") positionHighlight(lastSection);
|
|
526
|
-
}
|
|
527
|
-
return;
|
|
528
|
-
}
|
|
529
|
-
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
530
|
-
if (e.data && e.data.type === "cms-editor::clear-hover") {
|
|
531
|
-
highlight.style.display = "none";
|
|
532
|
-
badge.style.display = "none";
|
|
533
|
-
lastSection = null;
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
if (e.data && e.data.type === "cms-editor::deactivate") {
|
|
537
|
-
highlight.remove();
|
|
538
|
-
badge.remove();
|
|
539
|
-
document.removeEventListener("mousemove", moveHandler, true);
|
|
540
|
-
document.removeEventListener("mouseout", outHandler, true);
|
|
541
|
-
document.removeEventListener("click", clickHandler, true);
|
|
542
|
-
// Or the page stays unnavigable after leaving Blocks mode.
|
|
543
|
-
document.removeEventListener("click", navBlocker, true);
|
|
544
|
-
document.removeEventListener("submit", submitBlocker, true);
|
|
545
|
-
window.removeEventListener("scroll", reposition, { capture: true });
|
|
546
|
-
window.removeEventListener("resize", reposition);
|
|
547
|
-
window.__cmsEditorActive = false;
|
|
548
|
-
}
|
|
549
|
-
});
|
|
550
|
-
})();`;function Zt(t,e){let n=t,r=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const l=u.__resolveType;if(typeof l=="string"&&l&&l!==r){n=u,r=l;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(n.variants)?n.variants:[];if(i.length===0||i.every(c=>c?.rule?.__resolveType===Tr))return null;const l=[];for(const c of i){const o=c?.value;if(o&&typeof o=="object")for(const d of Zt(o,e)??[])l.includes(d)||l.push(d)}return l}if(Cr(r)){const i=n.section&&typeof n.section=="object"?Zt(n.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Je(t){return t.replace(/[`*_]/g,"\\$&")}function Ta(t,e){const n=[`The user selected an element on the live preview and asked: **"${Je(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&n.push(`**Section resolveType:** \`${Je(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${Je(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Je(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Je(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Je(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",i,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
|
|
551
|
-
`)}function Ca(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),f=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:f/o*100}}function Ra(t){const e=fe.c(45),{element:n,onDismiss:r}=t,[i,u]=v.useState(""),l=v.useRef(null),{sendMessage:c}=or(),{openSidePanel:o}=aa(),d=Te();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const F=Ta(n,i);o(),c({parts:[{type:"text",text:F}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const f=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=Ca(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const j=p,b=`${j.leftPct}%`,P=`${j.topPct}%`;let g;e[9]!==b||e[10]!==P?(g={left:b,top:P,width:"320px"},e[9]=b,e[10]=P,e[11]=g):g=e[11];let E;e[12]!==f?(E=F=>{F.preventDefault(),f()},e[12]=f,e[13]=E):E=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=F=>u(F.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=F=>{F.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let w;e[17]!==d?(w=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=w):w=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==w?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=w,e[22]=k):k=e[22];let x;e[23]!==i?(x=i.trim(),e[23]=i,e[24]=x):x=e[24];const B=!x;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let I;e[27]!==d?(I=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=I):I=e[28];let $;e[29]!==I?($=s.jsx("title",{children:I}),e[29]=I,e[30]=$):$=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=M):M=e[31];let L;e[32]!==$?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[$,M]}),e[32]=$,e[33]=L):L=e[33];let R;e[34]!==B||e[35]!==S||e[36]!==L?(R=s.jsx("button",{type:"submit",disabled:B,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=B,e[35]=S,e[36]=L,e[37]=R):R=e[37];let U;e[38]!==k||e[39]!==R||e[40]!==E?(U=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:E,children:[k,R]}),e[38]=k,e[39]=R,e[40]=E,e[41]=U):U=e[41];let D;return e[42]!==U||e[43]!==g?(D=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:U}),e[42]=U,e[43]=g,e[44]=D):D=e[44],D}const Un="site-links",La=/details?page|\bpdp\b/i,Oa=/listingpage|\bplp\b/i;function _a(t,e,n){const r=new Set;for(const c of n)La.test(c)&&r.add("product"),Oa.test(c)&&r.add("category");const i=lt(sn(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const Aa=["rosa","preto","pink","black"];function kt(t,e){const n=e.trim();return n?t(n):Aa.flatMap(r=>t(r))}function Ba(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const bs=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function on(t){return t.split("/")[0]??""}function Fa(t){const e=new Set;for(const n of t){const r=on(n);bs.has(r)&&e.add(r)}return e}function $a(t,e){const n=on(t);return!bs.has(n)||e.size===0?!0:e.has(n)}const Ma=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>kt(n=>Ba(t,n),e),optionsFromPayload:Pt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Pt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:Pt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>kt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:Pt},{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:Va}];function Da(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of Ma){if(d.kind!==c)continue;const h=r.find(f=>d.test(f)&&$a(f,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(on(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(Ka(t.has("category")?"category":"product")),l}function Ka(t){return{kind:t,id:Un,resolveType:Un,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ya(e,n)}}function Ie(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function za(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Ie(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Ie(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function xs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ys(t){try{return decodeURIComponent(t)}catch{return t}}function Ia(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ua(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Ia(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function ws(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=lt(sn(e)),{pattern:u,order:l}=Ua(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ys(d):null}function Pt(t,e){const n=Ie(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Ie(l);if(!c)continue;const o=ws(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Ie(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,f=Array.isArray(c.image)?Ie(c.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;i.push({value:o,label:h,image:p})}return i}function Ha(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?ys(n):null}function Va(t){const e=[],n=new Set,r=(i,u)=>{const l=Ie(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=Ha(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const qa=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 Wa(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function Ga(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Ja(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Ya(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=ws(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&qa.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:Wa(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Ja(t))i(u,l,"product",c);for(const{href:u,text:l}of Ga(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function st(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const ks=1e4;function Qa(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 Xa(t,{resolveType:e,props:n}){const r=await fetch($r(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(ks)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Hn(t,e){const n=await fetch(Mr(t,e),{signal:AbortSignal.timeout(ks)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Za(t,e,n){const r=e.optionsFromPayload(await Hn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=$e(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Hn(t,u),n).filter(c=>c.kind==="product");return xs([r,l])}catch{return r}}function ei(t,e,n){return Xs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function ti(t,e,n,r){if(e.homepageLinks)return Za(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>Xa(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return xs(l.map(c=>e.optionsFromPayload(c,r)))}function en(t,e,n,r,i){return{queryKey:ei(t,e,n),queryFn:()=>ti(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function rt(t){const e=fe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let f;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(f=p=>s.jsxs(ot,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(as,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:$e(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=f):f=e[12],d=i.map(f),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(it,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function Vn(t){const e=fe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function ni(t){const e=fe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Te(),[d,h]=v.useState(!1),[f,p]=v.useState(""),[j,b]=v.useState(""),P=v.useRef(null),g=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,E=Qa(o),y=[...new Set(n.map(K=>E[K.kind].noun))].join(" or ");let w;e[0]!==o||e[1]!==y?(w=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=w):w=e[2];const k=w,x={template:r,paramName:i};let B;e[3]!==f?(B=(K,C)=>({source:K,query:C,options:K.clientFilter?st(C.data??[],f):C.data??[]}),e[3]=f,e[4]=B):B=e[4];const S=B,I=n.filter(di),$=n.filter(ci),M=Xt({queries:I.map(K=>en(l,K,j,x,d))});let L;e[5]!==M||e[6]!==S?(L=(K,C)=>S(K,M[C]),e[5]=M,e[6]=S,e[7]=L):L=e[7];const R=I.map(L),U=R.length===0||R.every(li),D=Xt({queries:$.map(K=>en(l,K,j,x,d&&U))});let F;e[8]!==D||e[9]!==S?(F=(K,C)=>S(K,D[C]),e[8]=D,e[9]=S,e[10]=F):F=e[10];const H=$.map(F),W=U?H:R,V=W.length===1&&W[0]?.source.homepageLinks?W[0]:null,O=V&&!V.query.isLoading&&!V.query.isError?V?.query.data??[]:[],ne=st(O.filter(oi),f),q=st(O.filter(ii),f),G=ne.length>0&&q.length>0,Q=K=>{h(K),P.current&&clearTimeout(P.current),p(K?u:""),b(K?u:"")};let Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=K=>{p(K),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{b(K)},300)},e[11]=Y):Y=e[11];const te=Y,ae=K=>{c(K),Q(!1)},X=us(f),J=$e(r,{[i]:X}),se=Zn,ve=Xn,pe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",de=ai;let ie;e[12]!==g||e[13]!==o?(ie=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=o,e[14]=ie):ie=e[14];let ue;e[15]!==ie?(ue=s.jsx(es,{className:"sr-only",children:s.jsx(ts,{children:ie})}),e[15]=ie,e[16]=ue):ue=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(as,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let Z;e[18]!==o?(Z=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=Z):Z=e[19];let oe;e[20]!==g?(oe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:g}),e[20]=g,e[21]=oe):oe=e[21];let he;e[22]!==Z||e[23]!==oe?(he=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[Z," ",oe]})]}),e[22]=Z,e[23]=oe,e[24]=he):he=e[24];const ge=os,Me=!1,Le="min-h-0 flex-1";let Oe;e[25]!==k||e[26]!==f?(Oe=s.jsx(ls,{autoFocus:!0,placeholder:k,value:f,onValueChange:te}),e[25]=k,e[26]=f,e[27]=Oe):Oe=e[27];const He=is,xe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let ye;e[28]!==o?(ye=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=ye):ye=e[29];let je;e[30]!==ye?(je=s.jsx(cs,{children:ye}),e[30]=ye,e[31]=je):je=e[31];const De=X&&s.jsx(it,{className:"shrink-0",children:s.jsxs(ot,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>ae(X),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(oa,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:J})]})]})}),_e=G?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(rt,{heading:E.category.heading,iconKind:"category",options:ne,template:r,paramName:i,keyPrefix:`${V?.source.id}:cat`,onSelect:ae})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(rt,{heading:E.product.heading,iconKind:"product",options:q,template:r,paramName:i,keyPrefix:`${V?.source.id}:prod`,onSelect:ae})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.map(K=>{const{source:C,query:me,options:Be}=K,{noun:Tt}=E[C.kind];if(me.isLoading)return s.jsx(Vn,{text:o("sandbox.pathParamPickerChip.loading",{noun:Tt})},C.id);if(me.isError)return s.jsx(Vn,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},C.id);if(C.homepageLinks){const Qe=me.data??[];return s.jsxs(v.Fragment,{children:[s.jsx(rt,{heading:E.category.heading,iconKind:"category",options:st(Qe.filter(ri),f),template:r,paramName:i,keyPrefix:`${C.id}:cat`,onSelect:ae}),s.jsx(rt,{heading:E.product.heading,iconKind:"product",options:st(Qe.filter(si),f),template:r,paramName:i,keyPrefix:`${C.id}:prod`,onSelect:ae})]},C.id)}return s.jsx(rt,{heading:W.length>1?E[C.kind].heading:void 0,iconKind:C.kind,options:Be,template:r,paramName:i,keyPrefix:C.id,onSelect:ae},C.id)})});let Ae;e[32]!==He||e[33]!==je||e[34]!==De||e[35]!==_e?(Ae=s.jsxs(He,{className:xe,children:[je,De,_e]}),e[32]=He,e[33]=je,e[34]=De,e[35]=_e,e[36]=Ae):Ae=e[36];let we;e[37]!==ge||e[38]!==Oe||e[39]!==Ae?(we=s.jsxs(ge,{shouldFilter:Me,className:Le,children:[Oe,Ae]}),e[37]=ge,e[38]=Oe,e[39]=Ae,e[40]=we):we=e[40];let Ce;e[41]!==ve||e[42]!==ue||e[43]!==he||e[44]!==we||e[45]!==de?(Ce=s.jsxs(ve,{className:pe,onClick:de,children:[ue,he,we]}),e[41]=ve,e[42]=ue,e[43]=he,e[44]=we,e[45]=de,e[46]=Ce):Ce=e[46];let Ke;return e[47]!==se||e[48]!==Q||e[49]!==d||e[50]!==Ce?(Ke=s.jsx(se,{open:d,onOpenChange:Q,children:Ce}),e[47]=se,e[48]=Q,e[49]=d,e[50]=Ce,e[51]=Ke):Ke=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:K=>{K.stopPropagation(),Q(!0)},children:u||g}),Ke]})}function si(t){return t.kind==="product"}function ri(t){return t.kind!=="product"}function ai(t){return t.stopPropagation()}function ii(t){return t.kind==="product"}function oi(t){return t.kind!=="product"}function li(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ci(t){return t.isFallback}function di(t){return!t.isFallback}function ui(t){const e=fe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const j={template:r,paramName:i},b=n.filter(mi);o=Xt,c=b.map(P=>en(u,P,"",j,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[f,p]=v.useState(!1);if(!f)for(const j of h){if(j.isLoading)break;const b=j.data?.[0];if(b){p(!0),queueMicrotask(()=>l(b.value));break}}return null}function mi(t){return!t.isFallback}function fi(t){const e=fe.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[l,c]=v.useState(r),[o,d]=v.useState(!1),h=v.useRef(!1);let f;e[0]!==n||e[1]!==u?(f=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=f):f=e[2];const p=f,j=l||p;let b;e[3]!==j?(b=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:j}),e[3]=j,e[4]=b):b=e[4];let P;e[5]!==p||e[6]!==u?(P=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=P):P=e[7];let g,E;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=S=>c(S.target.value),E=()=>d(!0),e[8]=g,e[9]=E):(g=e[8],E=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=us(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let w;e[16]!==l||e[17]!==p||e[18]!==P||e[19]!==N||e[20]!==y?(w=s.jsx("input",{type:"text",value:l,placeholder:p,title:P,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:pi,onChange:g,onFocus:E,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=P,e[19]=N,e[20]=y,e[21]=w):w=e[21];let k;e[22]!==b||e[23]!==w?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[b,w]}),e[22]=b,e[23]=w,e[24]=k):k=e[24];let x;e[25]!==o||e[26]!==u?(x=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(ur,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=x):x=e[27];let B;return e[28]!==x||e[29]!==k?(B=s.jsxs(s.Fragment,{children:[k,x]}),e[28]=x,e[29]=k,e[30]=B):B=e[30],B}function pi(t){return t.stopPropagation()}function hi(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function gi(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function vi(t){const e=fe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=fs(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Dr(l),h=o?{...o,name:l,path:c}:Kr(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],Zs(i)}function bi(t){const e=fe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Te();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[f,p]=v.useState(h);let j;e[2]!==d?(j=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=j):j=e[3];const[b,P]=v.useState(j),[g,E]=v.useState(Gt),[N,y]=v.useState(null),[w,k]=v.useState(n);n!==w&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),P(d("sectionsEditor.createPageModal.defaultPagePath")),E(Gt),y(null)));const x=!!l?.length;let B;e[4]!==o||e[5]!==r?(B=Z=>{!Z&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=B):B=e[6];const S=B;let I;e[7]!==o||e[8]!==f||e[9]!==c||e[10]!==b||e[11]!==x||e[12]!==g?(I=async Z=>{Z.preventDefault();const oe=f.trim(),he=b.trim();if(!oe||!he||o)return;const ge=ms(he);if(ge){y(ge);return}y(null),await c({name:oe,path:he,templateKey:x&&g!==Gt?g:null})},e[7]=o,e[8]=f,e[9]=c,e[10]=b,e[11]=x,e[12]=g,e[13]=I):I=e[13];const $=I,M=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let R;e[16]!==L?(R=s.jsx(es,{children:s.jsx(ts,{children:L})}),e[16]=L,e[17]=R):R=e[17];let U;e[18]!==d?(U=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=U):U=e[19];let D;e[20]!==U?(D=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:U}),e[20]=U,e[21]=D):D=e[21];let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=Z=>p(Z.target.value),e[22]=F):F=e[22];let H;e[23]!==d?(H=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=H):H=e[24];let W;e[25]!==o||e[26]!==f||e[27]!==H?(W=s.jsx(Rn,{id:"new-page-name",value:f,onChange:F,placeholder:H,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=H,e[28]=W):W=e[28];let V;e[29]!==W||e[30]!==D?(V=s.jsxs("div",{className:"space-y-1.5",children:[D,W]}),e[29]=W,e[30]=D,e[31]=V):V=e[31];let ee;e[32]!==d?(ee=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=ee):ee=e[33];let O;e[34]!==ee?(O=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:ee}),e[34]=ee,e[35]=O):O=e[35];let ne;e[36]===Symbol.for("react.memo_cache_sentinel")?(ne=Z=>P(Z.target.value),e[36]=ne):ne=e[36];let q;e[37]!==d?(q=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=q):q=e[38];let G;e[39]!==o||e[40]!==b||e[41]!==q?(G=s.jsx(Rn,{id:"new-page-path",value:b,onChange:ne,placeholder:q,disabled:o}),e[39]=o,e[40]=b,e[41]=q,e[42]=G):G=e[42];let Q;e[43]!==O||e[44]!==G?(Q=s.jsxs("div",{className:"space-y-1.5",children:[O,G]}),e[43]=O,e[44]=G,e[45]=Q):Q=e[45];let Y;e[46]!==o||e[47]!==x||e[48]!==d||e[49]!==g||e[50]!==l?(Y=x&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(zr,{id:"new-page-template",value:g,onChange:E,templates:l??[],disabled:o})]}),e[46]=o,e[47]=x,e[48]=d,e[49]=g,e[50]=l,e[51]=Y):Y=e[51];let te;e[52]!==M?(te=M&&s.jsx("p",{className:"text-xs text-destructive",children:M}),e[52]=M,e[53]=te):te=e[53];let ae;e[54]!==V||e[55]!==Q||e[56]!==Y||e[57]!==te?(ae=s.jsxs("div",{className:"space-y-4 py-4",children:[V,Q,Y,te]}),e[54]=V,e[55]=Q,e[56]=Y,e[57]=te,e[58]=ae):ae=e[58];let X;e[59]!==r?(X=()=>r(!1),e[59]=r,e[60]=X):X=e[60];let J;e[61]!==d?(J=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=J):J=e[62];let se;e[63]!==o||e[64]!==X||e[65]!==J?(se=s.jsx(Ue,{type:"button",variant:"outline",onClick:X,disabled:o,children:J}),e[63]=o,e[64]=X,e[65]=J,e[66]=se):se=e[66];let ve;e[67]!==o||e[68]!==f||e[69]!==b?(ve=!f.trim()||!b.trim()||o,e[67]=o,e[68]=f,e[69]=b,e[70]=ve):ve=e[70];let pe;e[71]!==o||e[72]!==d?(pe=o?s.jsxs(s.Fragment,{children:[s.jsx(jt,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=pe):pe=e[73];let de;e[74]!==ve||e[75]!==pe?(de=s.jsx(Ue,{type:"submit",disabled:ve,children:pe}),e[74]=ve,e[75]=pe,e[76]=de):de=e[76];let ie;e[77]!==se||e[78]!==de?(ie=s.jsxs(er,{children:[se,de]}),e[77]=se,e[78]=de,e[79]=ie):ie=e[79];let ue;e[80]!==$||e[81]!==ae||e[82]!==ie||e[83]!==R?(ue=s.jsx(Xn,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:$,children:[R,ae,ie]})}),e[80]=$,e[81]=ae,e[82]=ie,e[83]=R,e[84]=ue):ue=e[84];let be;return e[85]!==S||e[86]!==n||e[87]!==ue?(be=s.jsx(Zn,{open:n,onOpenChange:S,children:ue}),e[85]=S,e[86]=n,e[87]=ue,e[88]=be):be=e[88],be}function xi(t){const e=fe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Te();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const f=fs(h);let p;e[4]!==f?(p=Hr((k,x)=>f.mutate({blockKey:k,data:x})),e[4]=f,e[5]=p):p=e[5];const j=p;let b;e[6]!==o||e[7]!==c?(b=Ir(c,o),e[6]=o,e[7]=c,e[8]=b):b=e[8];const{resolveType:P,props:g,title:E}=b;if(!P){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let x;return e[11]!==k?(x=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=x):x=e[12],x}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==P||e[15]!==E?(y={mode:"saved",blockKey:o,resolveType:P,title:E},e[13]=o,e[14]=P,e[15]=E,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==g||e[23]!==f.isPending||e[24]!==j||e[25]!==N||e[26]!==y||e[27]!==r?(w=s.jsx(Ur,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:g,isCreating:f.isPending,onCreate:yi,onSaveReferencedBlock:j,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=g,e[23]=f.isPending,e[24]=j,e[25]=N,e[26]=y,e[27]=r,e[28]=w):w=e[28],w}async function yi(){}function wi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function qn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:wi(t.error)}}function ki(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 Pi(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=ki(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const Si="https://github.com/decocms/blocks";function Ei(){const t=fe.c(14),e=Te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(mr,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ns,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(Ue,{size:"sm",asChild:!0,children:s.jsxs("a",{href:Si,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(an,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function ji(t){const e=fe.c(15),{source:n,onRetry:r}=t,i=Te();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(la,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(Ue,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let f;return e[11]!==l||e[12]!==o||e[13]!==h?(f=s.jsx(an,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=f):f=e[14],f}const Ni=v.lazy(()=>tr(()=>import("./sections-editor-B5MFR1yl.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])).then(t=>({default:t.SectionsEditor})));function Wn(t){const e=fe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=tn(),{currentBranch:c,taskId:o}=Nt(),d=gs(),h=nn(),f=vs(),p=d.lifecycle.phase==="running",j=h.previewUrl;let b;e[0]!==c||e[1]!==l||e[2]!==j||e[3]!==o||e[4]!==n?(b=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:j}:null,e[0]=c,e[1]=l,e[2]=j,e[3]=o,e[4]=n,e[5]=b):b=e[5];const P=b;let g;e[6]!==p?(g={fetchEnabled:p},e[6]=p,e[7]=g):g=e[7];const E=rn(P,g);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=ps(P,N),w=Pi({lifecyclePhase:d.lifecycle.phase,decofile:qn(E),meta:qn(y),hasEditableContent:Rr(E.data,y.data),fastPreviewActive:ds(n).runtime==="cms"}),k=Ti;if(w.kind==="loading"){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(nr,{})),e[10]=O):O=e[10],O}if(w.kind==="empty"){let O;return e[11]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(Ei,{})),e[11]=O):O=e[11],O}if(w.kind==="error"){let O;e[12]!==E||e[13]!==h||e[14]!==y||e[15]!==w.source?(O=()=>{if(w.source==="sandbox"){h.retry();return}Promise.all([E.refetch(),y.refetch()])},e[12]=E,e[13]=h,e[14]=y,e[15]=w.source,e[16]=O):O=e[16];const ne=O;let q;return e[17]!==ne||e[18]!==w.source?(q=k(s.jsx(ji,{source:w.source,onRetry:ne})),e[17]=ne,e[18]=w.source,e[19]=q):q=e[19],q}let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=O=>k(s.jsx("div",{className:"h-full min-h-0",children:O})),e[20]=x):x=e[20];const B=x,S=f.state.target;if(S?.kind==="loader"&&E.data&&y.data){const O=c??"",ne=j??null;let q;return e[21]!==E.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==O||e[25]!==ne||e[26]!==S.key||e[27]!==n?(q=B(s.jsx(xi,{orgSlug:l.slug,virtualMcpId:n,branch:O,previewUrl:ne,meta:y.data,decofile:E.data,blockKey:S.key})),e[21]=E.data,e[22]=y.data,e[23]=l.slug,e[24]=O,e[25]=ne,e[26]=S.key,e[27]=n,e[28]=q):q=e[28],q}let I;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(I=S||!c?null:ss(rs(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=I):I=e[33];const $=I;let M="/",L=null,R=null;S?.kind==="page"?(M=S.path,L=S.key):S?.kind==="section"?R=S.key:$&&(M=$.path,L=$.pageKey);const U=L?`page:${L}`:R?`section:${R}`:`path:${M}`;let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(jt,{className:"size-5 text-muted-foreground"})}),e[34]=D):D=e[34];const F=c??"",H=j??void 0,W=R?null:u,V=!!L&&f.state.editSeoPageKey===L;let ee;return e[35]!==R||e[36]!==L||e[37]!==M||e[38]!==U||e[39]!==i||e[40]!==l.slug||e[41]!==W||e[42]!==V||e[43]!==F||e[44]!==H||e[45]!==n||e[46]!==f.consumeEditSeo||e[47]!==f.setFocusedBlock||e[48]!==f.setVariantOverride?(ee=B(s.jsx(v.Suspense,{fallback:D,children:s.jsx(Ni,{orgSlug:l.slug,virtualMcpId:n,branch:F,previewReady:!0,previewUrl:H,currentPath:M,activePageBlockKey:L,activeGlobalBlockKey:R,externalSelection:W,initialEditSeo:V,onExitSeo:f.consumeEditSeo,onVariantPreviewOverride:f.setVariantOverride,onFocusedBlockChange:f.setFocusedBlock,onViewJsonFile:i},U)})),e[35]=R,e[36]=L,e[37]=M,e[38]=U,e[39]=i,e[40]=l.slug,e[41]=W,e[42]=V,e[43]=F,e[44]=H,e[45]=n,e[46]=f.consumeEditSeo,e[47]=f.setFocusedBlock,e[48]=f.setVariantOverride,e[49]=ee):ee=e[49],ee}function Ti(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Gn(t){const e=fe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Te(),c=da(),o=Vr(n);let d;e[0]!==o||e[1]!==r?(d=qr(o,ua(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:f}=tn(),{currentBranch:p,taskId:j}=Nt(),P=nn().previewUrl;let g;e[3]!==p||e[4]!==f.slug||e[5]!==P||e[6]!==j||e[7]!==n?(g=p?{orgSlug:f.slug,virtualMcpId:n,branch:p,threadId:j??null,previewUrl:P}:null,e[3]=p,e[4]=f.slug,e[5]=P,e[6]=j,e[7]=n,e[8]=g):g=e[8];const N=rn(g),y=p??"";let w;e[9]!==f.slug||e[10]!==y||e[11]!==n?(w={orgSlug:f.slug,virtualMcpId:n,branch:y},e[9]=f.slug,e[10]=y,e[11]=n,e[12]=w):w=e[12];const{save:k,flush:x}=Wr(w),B=N.data?.[r],S=N.data===void 0&&N.isLoading,I=N.data!==void 0&&B===void 0,$=!p||I||S;let M;e[13]!==B?(M=B===void 0?"":JSON.stringify(B,null,2),e[13]=B,e[14]=M):M=e[14];const L=M;let R;e[15]!==r||e[16]!==$||e[17]!==k?(R=V=>{if($)return;let ee;try{ee=JSON.parse(V)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||k(r,ee)},e[15]=r,e[16]=$,e[17]=k,e[18]=R):R=e[18];const U=R;let D;e[19]!==x?(D=()=>({flush:x}),e[19]=x,e[20]=D):D=e[20],v.useImperativeHandle(u,D);let F;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?(F=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(Ue,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(sr,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=F):F=e[25];let H;e[26]!==N.data||e[27]!==x||e[28]!==L||e[29]!==S||e[30]!==I||e[31]!==r||e[32]!==$||e[33]!==U||e[34]!==l?(H=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(jt,{className:"size-5 text-muted-foreground"})}):I?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ca,{code:L,language:"json",readOnly:$,height:"100%",onChange:V=>U(V??""),onSave:V=>{U(V),x()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=x,e[28]=L,e[29]=S,e[30]=I,e[31]=r,e[32]=$,e[33]=U,e[34]=l,e[35]=H):H=e[35];let W;return e[36]!==F||e[37]!==H?(W=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[F,H]}),e[36]=F,e[37]=H,e[38]=W):W=e[38],W}function Ps(t){return t.contentEditingEnabled&&!t.isMobile}function Ci(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Ri(t,e){return t==="blocks"?"preview":e?"blocks":t}function Li(t){return Ps({contentEditingEnabled:hs(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function Oi(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const _i=15e3;function Ai(t,e,n){return n?t.src===e||t.loading?t:{src:e,loading:!0}:t.src===e&&!t.loading?t:{src:e,loading:!1}}function Jn(t){return t.loading?{...t,loading:!1}:t}const Bi=500,Fi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Yn=1,St=["desktop","mobile","tablet"],$i=["preview","visual","blocks"],Qn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Mi(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 at(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Qt(t,e){try{return new URL(t,e).href}catch{return null}}function Di(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function Ki(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function zi(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function Ii(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ui({virtualMcpId:t}){const e=Te(),n=Fr(),{currentBranch:r,taskId:i,virtualMcpId:u}=Nt(),l=vs(),c=Sr(u===t?t:null),o=ds(t),d=ma(c?.metadata?.ui?.layout??null),h=hs(d),f=Ps({contentEditingEnabled:h,isMobile:n}),[p]=v.useState(()=>Li({cmsMode:d,isMobile:n})),[j,b]=Ln(On.previewEditingMode(t),a=>a&&$i.includes(a)?a:null),P=j??p,[g,E]=Ln(On.previewDeviceSize(t),a=>a&&St.includes(a)?a:"desktop"),[N,y]=v.useState(null),[w,k]=v.useState(null),x=v.useRef(null),B=v.useRef(null),[S,I]=v.useState(!1),$=v.useRef(null),M=()=>{$.current?.flush(),I(!1)},L=()=>I(a=>(a&&$.current?.flush(),!a)),[R,U]=v.useState({width:0,height:0}),[D,F]=v.useState(!1),[H,W]=v.useState(""),V=v.useRef(null),[ee,O]=v.useState(!1),[ne,q]=v.useState(),[G,Q]=v.useState(null),[Y,te]=v.useState(null),[ae,X]=v.useState(null),[J,se]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[ve,pe]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[de,ie]=v.useState({}),[ue,be]=v.useState(!1),Z=v.useRef(null),oe=()=>{be(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>be(!1),15e3)},he=()=>{Z.current&&(clearTimeout(Z.current),Z.current=null),be(!1)},{org:ge}=tn(),Me=gs(),Le=nn(),Oe=Le.vmEntry,He=Me.lifecycle.phase,{url:xe}=Lr(t),ye=xe??Le.previewUrl,je=!!xe||He==="running",De=c?.id===t?Nr(c.metadata):null,_e=!xe&&c?.id===t&&o.runtime==="cms",Ae=o.projectDefault==="cms",we=Zr({sandboxUrl:ye,previewServerUrl:De,fastPreviewActive:_e}),Ce=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:ye}:null,Ke=rn(Ce,{fetchEnabled:je}),K=ps(Ce,{fetchEnabled:je}),C=Ke.data,me=K.data,Be=C?Or(C).sort((a,m)=>a.name.localeCompare(m.name)):[],Tt=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r}:null,Qe=vi(Tt),Ct=C&&me?_r(C,me):[],ln=C&&me?Gr(me,C,"loaders"):[],cn=H?(()=>{const a=H.toLowerCase();return Be.map(m=>({page:m,score:zi(m.name,m.path,a)})).filter(({score:m})=>m>0).sort((m,T)=>T.score-m.score||m.page.path.length-T.page.path.length).map(({page:m})=>m)})():Be,dn=Ct.filter(a=>{if(!H)return!0;const m=H.toLowerCase();return a.name.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),un=f?ln:[],mn=un.filter(a=>{if(!H)return!0;const m=H.toLowerCase();return a.title.toLowerCase().includes(m)||a.key.toLowerCase().includes(m)||a.resolveType.toLowerCase().includes(m)}),ct=Y?ln.find(a=>a.key===Y)??null:null,Ne=sn,Rt=G||Y?null:Ar(Be,J,ve),z=Rt?.key??null,Ve=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??z,dt=Rt?.path??null,qe=(z?de[z]:void 0)??{},ke=$e(J,qe),Lt={};if(je&&ye&&me&&C){const a=Jr(me,"loaders"),m=z?C[z]:void 0,T=za(m,C,re=>a.has(re)),A=Fa(T);for(const re of lt(J)){if(re.type!=="param")continue;const Re=_a(J,re.name,T),Se=Da(Re,a,A);Se.length>0&&(Lt[re.name]=Se)}}const ut=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,fn=C&&z?Br(C,z,0):[],pn=C?Yr(fn,C):[],Ot=pn.map(a=>a.isSavedBlock?a.label:""),_t=pn.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),At=fn.map(a=>Zt(a,C??{})),hn=v.useRef(null),Pe=v.useRef(null),Ss=Me.status.state==="paused",Bt=Me.phase,gn=Qr({claimPhase:Bt,lifecycle:Me.lifecycle}),ze=Le.previewState,Es=Le.userStopped,js=ra(ge.slug,t??"",r??""),{url:Fe}=sa(_e&&t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,previewServerUrl:De??null,path:ke}:null),Ns=Ae&&o.runtime==="sandbox",_=xa({previewState:ze,progressStatus:gn.status,previewServerUrl:De,fastPreviewActive:_e,fastPreviewReady:!!Fe,codingSession:Ns,localPreviewUrl:xe}),mt=_.mode!=="none",Ts=_.mode==="production"&&_.iframeBase?at(_.iframeBase):null,We=_.mode==="production"?Ts:at(ye),Cs=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Xe=xe?_.mode==="sandbox"&&f&&P==="blocks":_.mode==="production"&&_e&&Cs&&f&&P==="blocks",vn=v.useRef(null),{pin:Rs,effective:Ls}=Di(vn.current,{inPlaceRenderActive:Xe,draftPreviewUrl:Fe,resolvedPath:ke});vn.current=Rs;const Ge=Mi(_.mode==="sandbox"?yt(Mn(ae??Qt(ke,_.iframeBase)??_.iframeBase,g),l.state.variantOverride??[]):_.mode==="production"?yt(Mn(ea(ae??Ls??Qt(ke,_.iframeBase)??_.iframeBase,_.showWakingPill?ta:null),g),l.state.variantOverride??[]):null),bn=Fe??(_.iframeBase?Qt(ke,_.iframeBase):null),Os=_.mode==="production"?bn?yt(bn,l.state.variantOverride??[]):null:Ge??_.iframeBase,_s=()=>{const a=Os;a&&window.open(a,"_blank","noopener")},Ze=t&&r?rs(ge.slug,t,r):null,et=a=>{Ze&&cr(Ze,a)},le=l.state.target;v.useEffect(()=>{if(!(!le||!we||!me))if(le.kind==="page"){const a=de[le.key]??{};Pe.current=$e(le.path,a),Q(null),te(null),X(null),pe(le.key),se(le.path),et({path:le.path,pageKey:le.key,params:a})}else if(le.kind==="loader")Pe.current=null,Q(null),te(le.key),X(null);else{const a=Ct.find(m=>m.key===le.key);if(a){Pe.current=null;const m=Fn(me);te(null),Q(a),X($n(we,m,a.key))}}},[le,we,me,de]),v.useEffect(()=>{!z||dt===null||le?.kind==="page"&&le.key===z&&le.path===dt||l.selectTarget({kind:"page",key:z,path:dt})},[z,dt,le]);const[xn,As]=v.useState(null);if(ze.kind==="iframe"&&xn!==ze.previewUrl){const a=xn!==null;As(ze.previewUrl);const m=Ze?ss(Ze):null;if(m){if(Pe.current=$e(m.path,m.params),se(m.path),pe(m.pageKey),X(null),Q(null),te(null),m.pageKey&&Object.keys(m.params).length>0){const T=m.pageKey;ie(A=>({...A,[T]:m.params}))}}else a&&(Pe.current=null,se("/"),X(null),pe(null),Q(null),te(null))}hn.current=Ge;const Bs=_.mode==="production"&&!!Fe&&!xe,[yn,Ft]=v.useState({src:Ge??void 0,loading:!1}),ft=Ai(yn,Ge??void 0,Bs);ft!==yn&&Ft(ft);const tt=ft.src,wn=ft.loading,kn=Pa({iframeRef:x,src:_.mode==="sandbox"?Ge:null,active:_.mode==="sandbox"}),Pn=v.useRef(null);v.useEffect(()=>{const a=wn?setTimeout(()=>Ft(Jn),_i):null,m=()=>{a&&clearTimeout(a)};if(!Fe||!tt||Pn.current===Fe)return m;Pn.current=Fe;const T=x.current;return T&&T.getAttribute("src")!==tt&&(oe(),T.src=tt),m},[Fe,tt,wn]);const Sn=()=>{const a=x.current?.contentWindow,m=We;if(!a||!m||!C||!z)return;const T=C[z];if(!T||typeof T!="object")return;const A=na({previewBaseUrl:m,pageBlock:T,decofile:C,path:ke,pathTemplate:J});if(!A)return;const re=yt(A.src,Xr(l.state.variantOverride??[],z));a.postMessage({type:"cms-editor::render",src:re,body:A.body},m)},$t=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!C){$t.current=null;return}const a={nav:JSON.stringify({page:z,path:ke,pathTemplate:J}),content:JSON.stringify(C)},m=Ki($t.current,a);$t.current=a,m&&Sn()},[C,Xe,G,Y,z,ke,J]);const Mt=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!C){Mt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),m=Mt.current;Mt.current={page:z,sig:a},!(!m||m.page!==z||m.sig===a)&&Sn()},[l.state.variantOverride,Xe,G,Y,z]);const Fs=!!t&&!!r&&!Me.notFound&&!Es&&!Ss&&(Bt?.kind==="ready"||He!=="idle"),ce=Oi({editingMode:P,sandboxDisplay:_.mode==="sandbox",blocksEditingEnabled:f});v.useEffect(()=>{const a=We;if(!a)return;const m=T=>{if(T.origin===a)if(T.data?.type==="visual-editor::element-clicked"){const A=Sa.safeParse(T.data.payload);A.success&&y(A.data)}else if(T.data?.type==="cms-editor::section-clicked"){const A=Na.safeParse(T.data.payload);A.success&&k({index:A.data.sectionIndex,seq:A.data.clickSeq})}else T.data?.type==="cms-editor::render-start"?oe():T.data?.type==="cms-editor::render-end"?(he(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Ot,kinds:_t,keys:At},a)):T.data?.type==="cms-editor::render-error"&&he()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[We,Ot,_t,At]);const En=()=>{const a=x.current?.contentWindow,m=at(ye);!a||!m||a.postMessage({type:"visual-editor::activate",script:Ea},m)},$s=()=>{const a=x.current?.contentWindow,m=at(ye);!a||!m||a.postMessage({type:"visual-editor::deactivate"},m)},Dt=()=>{const a=x.current?.contentWindow,m=We;!a||!m||(a.postMessage(_.mode==="production"||xe?{type:"editor::inject",args:{script:In}}:{type:"visual-editor::activate",script:In},m),a.postMessage({type:"cms-editor::set-labels",labels:Ot,kinds:_t,keys:At},m))},Ms=()=>{const a=x.current?.contentWindow,m=We;!a||!m||a.postMessage({type:"cms-editor::deactivate"},m)},Ds=()=>{const a=x.current?.contentWindow,m=We;!a||!m||(a.postMessage({type:"cms-editor::clear-hover"},m),a.postMessage({type:"visual-editor::clear-hover"},m))},pt=a=>{if(a==="blocks"&&!f)return;const m=P;!n&&a!==m&&(a==="blocks"?B.current?.resize("30%"):B.current?.collapse()),b(a),y(null),k(null),a!=="blocks"&&te(null),m==="visual"&&$s(),a==="visual"&&En(),m==="blocks"&&a!=="blocks"&&Ms(),a==="blocks"&&Dt()},Ks=()=>{pt(Ci(P,f))},zs=()=>{pt(Ri(P,f))};ia(()=>{const a=x.current;if(!a)return;oe();const m=document.activeElement,T=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),Ii(a,hn.current);let A;const re=()=>{clearTimeout(A),a.tabIndex=T,a.style.pointerEvents="";const Re=document.activeElement;(!Re||Re===document.body||Re===a)&&m?.focus(),a.removeEventListener("load",re)};a.addEventListener("load",re),A=setTimeout(re,3e3)});const Is=()=>{const a=St.indexOf(g);E(St[(a+1)%St.length])},Kt=(a,m)=>{if(!z)return;const T=z,A={...qe,[a]:m};Pe.current=$e(J,A),ie(re=>({...re,[T]:A})),et({path:J,pageKey:T,params:A})},Us=hi({iframeBase:_.iframeBase,resolvedPath:ke,activeGlobalSectionName:G?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),jn=a=>{const m=de[a.key]??{},T=$e(a.path,m);(G||Ne(T)!==Ne(ke))&&oe(),Pe.current=T,Q(null),te(null),X(null),k(null),pe(a.key),se(a.path),et({path:a.path,pageKey:a.key,params:m}),l.selectTarget({kind:"page",key:a.key,path:a.path})};lr(Ze,a=>{(G||Ne(a)!==Ne(ke))&&oe(),Pe.current=a,Q(null),te(null),X(null),k(null),pe(null),se(a),et({path:a,pageKey:null,params:{}})});const Hs=a=>{if(!we||!me){An.error(e("sandbox.preview.previewMetadataNotReady"));return}oe(),Pe.current=null;const m=Fn(me),T=$n(we,m,a.key);Q(a),te(null),X(T),k(null),l.selectTarget({kind:"section",key:a.key})},Vs=a=>{f&&(Q(null),te(a.key),X(null),pt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},qs=async({name:a,path:m,templateKey:T})=>{if(!t||!r)return;const A=ms(m);if(A){q(A);return}const re=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Be.some(Se=>Ne(Se.path)===Ne(re))){q(e("sandbox.preview.pageAlreadyExists",{path:re}));return}let Re;if(T&&(Re=C?.[T],!Re)){q(e("sandbox.preview.templateNoLongerExists"));return}q(void 0);try{const Se=await Qe.mutateAsync({name:a,path:re,template:Re});O(!1),An.success(e("sandbox.preview.pageCreated",{name:a})),await fa(Bi),jn({key:Se.key,name:Se.name,path:Se.path}),pt("blocks")}catch(Se){q(Se instanceof Error?Se.message:e("sandbox.preview.failedToCreatePage"))}},ht=mt&&(Fs||_.mode==="production"),Ws=gi({showPreviewToolbar:ht,contentEditingEnabled:h}),gt=()=>{F(!1),W("")},zt=G?.name??ct?.title??Rt?.name,It=Ke.isPending||K.isPending,Ut=It?at(_.iframeBase):zt,vt=G?`section:${G.key}`:Y?`loader:${Y}`:z?`page:${z}`:void 0,Gs=ht?Ws?s.jsxs(wr,{open:D,onOpenChange:a=>{F(a),a||W("")},children:[s.jsx(kr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:It?Ut??void 0:G||ct?zt:[zt,J].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[G&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(fr,{size:11}),e("sandbox.preview.globalBadge")]}),ct&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[s.jsx(pr,{size:11}),e("sandbox.preview.loaderBadge")]}),Ut&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Ut}),!It&&!G&&!ct&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:J}),s.jsx(dr,{size:12,className:Ht("shrink-0 transition-transform",D&&"rotate-180")})]})})}),s.jsxs(Pr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(os,{shouldFilter:!1,defaultValue:vt,children:[s.jsx(ls,{value:H,onValueChange:a=>{W(a),V.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(is,{ref:V,className:"max-h-80",children:[s.jsx(cs,{children:Be.length===0&&Ct.length===0&&un.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),cn.length>0&&s.jsx(it,{children:cn.map(a=>s.jsxs(ot,{value:`page:${a.key}`,"aria-current":vt===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{gt(),jn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),dn.length>0&&s.jsx(it,{heading:e("sandbox.preview.globalComponents"),children:dn.map(a=>s.jsx(ot,{value:`section:${a.key}`,"aria-current":vt===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{gt(),Hs(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),mn.length>0&&s.jsx(it,{heading:e("sandbox.preview.globalLoaders"),children:mn.map(a=>s.jsx(ot,{value:`loader:${a.key}`,"aria-current":vt===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{gt(),Vs(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!G&&!Y&<(J).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:lt(J).map((a,m)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${m}`);const T=Lt[a.name];return T&&ut?s.jsx(ni,{sources:T,template:J,paramName:a.name,value:qe[a.name]??"",sandboxRef:ut,onCommit:A=>Kt(a.name,A)},`${z}:${a.name}`):s.jsx(fi,{name:a.name,value:qe[a.name]??"",onCommit:A=>Kt(a.name,A)},`${z}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(Ue,{variant:"ghost",className:"w-full justify-start",onClick:()=>{gt(),q(void 0),O(!0)},children:[s.jsx(yr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:Us}):null,Nn=ht||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:Is,"aria-label":e(Qn[g]),children:g==="mobile"?s.jsx(hr,{size:16}):g==="tablet"?s.jsx(gr,{size:16}):s.jsx(vr,{size:16})})}),s.jsx(Wt,{children:e(Qn[g])})]}),Gs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(nt,{onClick:_s,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(ns,{size:16})})})]}):null,Js=_.mode==="sandbox",bt=Fi[g],xt=g==="desktop"&&(R.width===0||R.width>=bt.width+2*Yn),Tn=xt?1:Math.min(R.width>0?R.width/(bt.width+2*Yn):1,1),Ys=xt?{width:"100%",height:"100%"}:{width:`${bt.width}px`,height:R.height>0?`${R.height/Tn}px`:`${bt.height}px`,transform:`scale(${Tn})`,transformOrigin:"top center"},Cn=s.jsxs(s.Fragment,{children:[Js&&(ht||h)&&s.jsx(nt,{onClick:Ks,"aria-pressed":ce==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ce==="visual",children:s.jsx(Bn,{size:16})}),f&&s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:zs,"aria-pressed":ce==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ce==="blocks",children:s.jsx(xr,{size:16})})}),s.jsx(Wt,{children:e("sandbox.preview.blocksEditor")})]}),Ve&&s.jsxs(Vt,{children:[s.jsx(qt,{asChild:!0,children:s.jsx(nt,{onClick:L,"aria-pressed":S,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:S,children:s.jsx(br,{size:16})})}),s.jsx(Wt,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Qs=!!Y&&ce==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[ut&&Object.entries(Lt).map(([a,m])=>(qe[a]??"")===""?s.jsx(ui,{sources:m,template:J,paramName:a,sandboxRef:ut,onFill:T=>Kt(a,T)},`${z}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(_n.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Nn}),children:Nn}),s.jsx(_n.Toolbar.Right.Portal,{fallback:Cn,children:Cn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Qs?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Wn,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L}),S&&Ve&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Gn,{ref:$,virtualMcpId:t,pageKey:Ve,onClose:M})})]}):s.jsxs(Dn,{orientation:"horizontal",disabled:ce!=="blocks",className:"relative isolate",children:[s.jsx(wt,{ref:B,id:"preview-blocks-editor",defaultSize:ce==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ce==="blocks"&&s.jsx(Wn,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L})}),ce==="blocks"&&s.jsx(Kn,{withHandle:!0}),s.jsx(wt,{id:"preview-canvas",defaultSize:ce==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(Dn,{orientation:"horizontal",disabled:!(S&&Ve),children:[s.jsx(wt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const m=()=>U(A=>A.width===a.clientWidth&&A.height===a.clientHeight?A:{width:a.clientWidth,height:a.clientHeight});m();const T=new ResizeObserver(m);return T.observe(a),()=>T.disconnect()},className:Ht("h-full relative overflow-clip flex justify-center",mt&&!xt&&"bg-muted/30"),children:[(ue||js)&&mt&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),_.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"starting",progress:gn,claimPhase:Bt})}),!xe&&ze.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"suspended",onResume:Le.resume})}),!xe&&ze.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(Jt,{kind:"errored",error:ze.error,onRetry:Le.retry,connectionsHref:`/${ge.slug}/settings/connections`})}),_.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(jt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),ce==="visual"&&!N&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(Bn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ce==="visual"&&N&&s.jsx(Ra,{element:N,onDismiss:()=>y(null)}),mt&&Ge&&s.jsx("div",{className:Ht("shrink-0",!xt&&"border-x border-border bg-background shadow-sm"),style:Ys,onMouseLeave:Ds,children:s.jsx("iframe",{ref:x,src:tt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:kn.handleError,onLoad:()=>{if(Ft(Jn),kn.handleLoad(),he(),_.mode!=="sandbox"||xe){(_.mode==="production"&&!_.showWakingPill||xe)&&ce==="blocks"&&Dt();return}if(rr("vm_preview_loaded",{view_mode:ce,vm_id:Oe?.sandboxHandle??null}),!G)try{const a=x.current?.contentWindow?.location?.pathname;if(!a)return;const m=Pe.current;if(m!==null&&(Pe.current=null,Ne(a)!==Ne(m))||Ne(a)===Ne(ke))return;se(a),et({path:a,pageKey:ve,params:qe})}catch{}ce==="visual"&&En(),ce==="blocks"&&Dt()}},_.iframeBase)})]})}),S&&Ve&&s.jsxs(s.Fragment,{children:[s.jsx(Kn,{withHandle:!0}),s.jsx(wt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Gn,{ref:$,virtualMcpId:t,pageKey:Ve,onClose:M})})]})]})})]})}),s.jsx(bi,{open:ee,onOpenChange:O,isPending:Qe.isPending,error:ne,templates:Be,onSubmit:qs})]})}function Hi(t){const e=fe.c(22),{virtualMcpId:n}=t,r=Te(),i=Er(n),{activeTask:u,taskId:l,currentBranch:c}=Nt(),o=ga(l),[d,h]=v.useState(!1);if(ha({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Yt(i?.metadata),threadHasRepo:Yt(o)||Yt(u?.metadata)})==="none"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(zn,{className:"size-7 text-foreground"})}),e[0]=j):j=e[0];let b;e[1]!==r?(b=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=b):b=e[2];let P;e[3]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=P):P=e[4];let g,E;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=()=>h(!0),E=s.jsx(zn,{className:"size-4"}),e[5]=g,e[6]=E):(g=e[5],E=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(Ue,{onClick:g,children:[E,N]}),e[9]=N,e[10]=y):y=e[10];let w;e[11]!==b||e[12]!==P||e[13]!==y?(w=s.jsx(an,{className:"h-full",image:j,title:b,description:P,actions:y}),e[11]=b,e[12]=P,e[13]=y,e[14]=w):w=e[14];let k;e[15]!==d?(k=s.jsx(pa,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let x;return e[17]!==w||e[18]!==k?(x=s.jsxs(s.Fragment,{children:[w,k]}),e[17]=w,e[18]=k,e[19]=x):x=e[19],x}let p;return e[20]!==n?(p=s.jsx(Ui,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function ad(){const t=fe.c(2),e=va();let n;return t[0]!==e?(n=s.jsx(ar,{tabId:"site-editor",children:s.jsx(ir,{feature:"cms",children:s.jsx(Hi,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{ad as default};
|