decocms 4.365.0 → 4.365.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-bl0yU7gy.js → AlertCircle-BPZWT1gc.js} +1 -1
- package/dist/client/assets/{AreaChart-CHPDNuDf.js → AreaChart-CxCPUfZu.js} +3 -3
- package/dist/client/assets/{ArrowLeft-CpbUCYpB.js → ArrowLeft-c3HIgil5.js} +1 -1
- package/dist/client/assets/{ArrowRight-CkVUmxaa.js → ArrowRight-BHzAyFwu.js} +1 -1
- package/dist/client/assets/{ArrowUp-BQQdFypM.js → ArrowUp-DywwLYcR.js} +1 -1
- package/dist/client/assets/{Check-BJaMheL7.js → Check-PyGET9iL.js} +1 -1
- package/dist/client/assets/{CheckCircle-BNNyBNMK.js → CheckCircle-4Be5K85Z.js} +1 -1
- package/dist/client/assets/{ChevronRight-2Ti1evDh.js → ChevronRight-vY_5m8VB.js} +1 -1
- package/dist/client/assets/{ChevronUp-Cp-tcsrs.js → ChevronUp-B9QGJbr0.js} +1 -1
- package/dist/client/assets/{Copy01-BrL9ZrVF.js → Copy01-BbtQlTnV.js} +1 -1
- package/dist/client/assets/{CreditCard01-_mwanoIZ.js → CreditCard01-2jrzrshR.js} +1 -1
- package/dist/client/assets/{Database01-Dm_V08L3.js → Database01-B8rfUUUF.js} +1 -1
- package/dist/client/assets/{DotsVertical-B8slOnrw.js → DotsVertical-zFAA_as9.js} +1 -1
- package/dist/client/assets/{Download01-Bl2-HJHJ.js → Download01-CSiLQIib.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-nVgseQIz.js → ErrorBarContext-D7xML5iT.js} +1 -1
- package/dist/client/assets/{Eye-B_BMkWWc.js → Eye-BRXlESxS.js} +1 -1
- package/dist/client/assets/{File02-3fotvfyl.js → File02-D4JZqTxD.js} +1 -1
- package/dist/client/assets/{GitBranch01-Dr0NRbj6.js → GitBranch01-95kZh6WB.js} +1 -1
- package/dist/client/assets/{Globe01-DMnQmvOn.js → Globe01-Dej65_H6.js} +1 -1
- package/dist/client/assets/{HardDrive-CxNWrsuq.js → HardDrive-DCLQ4vdy.js} +1 -1
- package/dist/client/assets/{Image01-DMAKgzzX.js → Image01-Dd-Rx_B5.js} +1 -1
- package/dist/client/assets/{Key01-CVfJV98q.js → Key01-CQFO2R8H.js} +1 -1
- package/dist/client/assets/{Link01-CKw3sRrv.js → Link01-pGxgI9VT.js} +1 -1
- package/dist/client/assets/{LinkExternal01-OjBTsG9L.js → LinkExternal01-Jetqi62I.js} +1 -1
- package/dist/client/assets/MessageCircle01-D2dDPrBD.js +1 -0
- package/dist/client/assets/{Monitor01-Bc6Zvq9B.js → Monitor01-Bw-h-DKp.js} +1 -1
- package/dist/client/assets/{Package-DTeqx5ul.js → Package-CF-S4NRB.js} +1 -1
- package/dist/client/assets/{Palette-CiXH5EXK.js → Palette-DuCZiZH-.js} +1 -1
- package/dist/client/assets/{Play-BPdpqeiE.js → Play-BTJRmkRf.js} +1 -1
- package/dist/client/assets/{Plus-kQ9d0PiA.js → Plus-BUGmioCX.js} +1 -1
- package/dist/client/assets/Printer-B2Ij2s1c.js +1 -0
- package/dist/client/assets/{SearchLg-Cecpe6x9.js → SearchLg-De3yWxzK.js} +1 -1
- package/dist/client/assets/{SearchMd-hBr_biLL.js → SearchMd-DanltqT5.js} +1 -1
- package/dist/client/assets/{Sector-B0yBxg4a.js → Sector-DqvqR1iU.js} +2 -2
- package/dist/client/assets/{Settings02-BqKUeA5H.js → Settings02-C-HNbNsn.js} +1 -1
- package/dist/client/assets/{Share07-D8xQrAsX.js → Share07-C4Gw_nzw.js} +1 -1
- package/dist/client/assets/{Shield01-Dav77ssu.js → Shield01-7bhnSYVs.js} +1 -1
- package/dist/client/assets/{Stars01-DWjpdjKn.js → Stars01-BmtGexbk.js} +1 -1
- package/dist/client/assets/{Sun-wxsl7cI_.js → Sun-D5AClOdh.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CCraiYIJ.js → SwitchHorizontal01-CCmSX-Ww.js} +1 -1
- package/dist/client/assets/{Tool01-E6Rv0Nbs.js → Tool01-C1VYYGhf.js} +1 -1
- package/dist/client/assets/{Tool02-Darwb8nP.js → Tool02-A5gv-OOO.js} +1 -1
- package/dist/client/assets/{Trash01-BB2ymX9J.js → Trash01-DkwdEhkp.js} +1 -1
- package/dist/client/assets/{TrendUp01-PJuAXI74.js → TrendUp01-CQWL_vX5.js} +1 -1
- package/dist/client/assets/{Upload01-BtBtAyal.js → Upload01-BlEOH700.js} +1 -1
- package/dist/client/assets/{User01-CtDIPHIF.js → User01-C2ILPAHc.js} +1 -1
- package/dist/client/assets/{UserSquare-BflxhZ_l.js → UserSquare-DY1wI6ZR.js} +1 -1
- package/dist/client/assets/{Users01-9HTYv5bx.js → Users01-bydaoxbh.js} +1 -1
- package/dist/client/assets/{Users03-D8RoJqiC.js → Users03-3yW32m45.js} +1 -1
- package/dist/client/assets/X-DejWyAyX.js +1 -0
- package/dist/client/assets/{XCircle-Dvf0BUKb.js → XCircle-SVZraRfE.js} +1 -1
- package/dist/client/assets/{XClose-DPfGLo7I.js → XClose-wkdnmhrB.js} +1 -1
- package/dist/client/assets/{Zap-ChgjHdxL.js → Zap-0km1-ru7.js} +1 -1
- package/dist/client/assets/{ZoomOut-BAhVAzy1.js → ZoomOut-BA2ZiotX.js} +1 -1
- package/dist/client/assets/access-gate-DpZqBld0.js +1 -0
- package/dist/client/assets/add-connection-dialog-DB5JJjad.js +1 -0
- package/dist/client/assets/agent-analytics-CAHUVirD.js +2 -0
- package/dist/client/assets/agent-app-BeMC8z8k.js +1 -0
- package/dist/client/assets/agent-assets-DsMv2xEg.js +1 -0
- package/dist/client/assets/agent-automation-BY5j9rqa.js +20 -0
- package/dist/client/assets/agent-automations-1_XWI0cB.js +1 -0
- package/dist/client/assets/agent-connect-sources-CGYs_l_4.js +1 -0
- package/dist/client/assets/agent-deck-BqKNWwGC.js +1 -0
- package/dist/client/assets/agent-e2e-DSg6pAM6.js +1 -0
- package/dist/client/assets/agent-file-QzuIvb2U.js +1 -0
- package/dist/client/assets/agent-git-B5SGdxwk.js +3 -0
- package/dist/client/assets/agent-hosting-CWM0TAgK.js +1 -0
- package/dist/client/assets/agent-icon-BjknPEfN.js +1 -0
- package/dist/client/assets/agent-library-file-DOj4Pso1.js +1 -0
- package/dist/client/assets/agent-monitor-D0SLtbEO.js +1 -0
- package/dist/client/assets/agent-overview-4MzJb6Tv.js +1 -0
- package/dist/client/assets/agent-settings-D4SL-PIa.js +1 -0
- package/dist/client/assets/agent-site-editor-BDP-vSUl.js +24 -0
- package/dist/client/assets/agent-site-editor-code-C2z-Az-Y.js +2 -0
- package/dist/client/assets/agent-site-editor-content-JPYekiK_.js +2 -0
- package/dist/client/assets/agent-site-editor-preview-CFLjaarK.js +504 -0
- package/dist/client/assets/agent-view-Bp9ooHxf.js +1 -0
- package/dist/client/assets/agent-view-guard-B7qYW-b3.js +1 -0
- package/dist/client/assets/agents-list-h96XaSKk.js +1 -0
- package/dist/client/assets/ai-providers-COWdzwzu.js +1 -0
- package/dist/client/assets/{alert-DkgzGFz6.js → alert-CvK2RkF3.js} +1 -1
- package/dist/client/assets/{alert-dialog-BdwUra4d.js → alert-dialog-CDARhUOh.js} +2 -2
- package/dist/client/assets/{api-keys-Bl99t7Nm.js → api-keys-Ba-S9F5Y.js} +1 -1
- package/dist/client/assets/api-keys-DeCwNgs3.js +1 -0
- package/dist/client/assets/app-editor-CsOLGnt4.js +1 -0
- package/dist/client/assets/asset-utils-DQpbxjwd.js +1 -0
- package/dist/client/assets/{auth-vfqjjrgv.js → auth-Cyjh0UQp.js} +1 -1
- package/dist/client/assets/{auth-catchall-CZ_cFv3z.js → auth-catchall-BbOJ2FpE.js} +1 -1
- package/dist/client/assets/{auth-entry-Cp4v6AT2.js → auth-entry-CIc1-YG9.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BB-yAg-2.js → auth-split-layout-WGnYlU-M.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CpB-R1LO.js → authenticate-and-persist-oauth-Dgc5b4Jr.js} +1 -1
- package/dist/client/assets/{automation-list-row-DKusfCau.js → automation-list-row-Dyqat6cE.js} +1 -1
- package/dist/client/assets/automation-runs-DkHp_jZr.js +1 -0
- package/dist/client/assets/automations-BSGRkynt.js +1 -0
- package/dist/client/assets/{autosend-u-W4xgi7.js → autosend-BBoss6Ia.js} +1 -1
- package/dist/client/assets/{avatar-BpU54ct-.js → avatar-CO3n6wLC.js} +1 -1
- package/dist/client/assets/backoff-8mStPHYB.js +1 -0
- package/dist/client/assets/{badge-DJ5ezE5-.js → badge-DUpgRwQu.js} +1 -1
- package/dist/client/assets/{block-document-7Ngv587f.js → block-document-CVyeCLBq.js} +3 -3
- package/dist/client/assets/blocks-preview-workspace-context-CLQbGv9t.js +1 -0
- package/dist/client/assets/{breadcrumb-Dlcs3jWo.js → breadcrumb-FJ1G6kmP.js} +1 -1
- package/dist/client/assets/buckets-BTZUX3pR.js +1 -0
- package/dist/client/assets/build-improve-prompt-doc-CcAYvBOj.js +2 -0
- package/dist/client/assets/bulk-category-panel-9cEfFq4L.js +1 -0
- package/dist/client/assets/{calendar-B8BrEMls.js → calendar-Bb8OUNd8.js} +1 -1
- package/dist/client/assets/{capability-load-error-CdMFNpdR.js → capability-load-error-Ctg9pY-k.js} +1 -1
- package/dist/client/assets/{cards-BfP1wflC.js → cards-CbRL3hJc.js} +1 -1
- package/dist/client/assets/category-editor-DLB1OCyq.js +1 -0
- package/dist/client/assets/{chart-zbtN9_7R.js → chart-DqNrc8dZ.js} +1 -1
- package/dist/client/assets/{chat-context-CD1rWX64.js → chat-context-B40ngn3f.js} +9 -9
- package/dist/client/assets/{checkbox-DwVdLA7e.js → checkbox-STVvKX8k.js} +1 -1
- package/dist/client/assets/choose-editor-DVdbAy2O.js +1 -0
- package/dist/client/assets/claim-phase-copy-0btUuJoC.js +1 -0
- package/dist/client/assets/{cli-auth-success-BtBj1xJE.js → cli-auth-success-DmTxFaq5.js} +1 -1
- package/dist/client/assets/{client-icons-BcSFyY79.js → client-icons-CR99ZCoE.js} +1 -1
- package/dist/client/assets/collapsible-Cf4ZreOo.js +1 -0
- package/dist/client/assets/collection-detail-oWaNi-hD.js +1 -0
- package/dist/client/assets/collection-display-button-CkKXuKd-.js +1 -0
- package/dist/client/assets/{collection-search-Bi-DttH4.js → collection-search-CDaDEv2c.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DfAhVjGn.js → collection-table-wrapper-B036tBOl.js} +1 -1
- package/dist/client/assets/{collection-tabs-BZkkvpP_.js → collection-tabs-CkeFxbT3.js} +1 -1
- package/dist/client/assets/{command-cJVGaRa3.js → command-D7YFT70c.js} +1 -1
- package/dist/client/assets/{command-palette-store-BNo0UXiS.js → command-palette-store-BcwFt5eE.js} +1 -1
- package/dist/client/assets/commerce-onboarding-BcoYZTQG.js +1 -0
- package/dist/client/assets/{companion-mcps-section-smAU7jYC.js → companion-mcps-section-CS9qQ8v0.js} +1 -1
- package/dist/client/assets/{connect-Bn7h46Ea.js → connect-BM6ZfhOz.js} +2 -2
- package/dist/client/assets/connect-layout-De5w9TxQ.js +1 -0
- package/dist/client/assets/{connection-card-DCMUv-0w.js → connection-card-kANJRcvf.js} +1 -1
- package/dist/client/assets/connection-detail-Ckkh02Py.js +1 -0
- package/dist/client/assets/{connection-D6f54N4w.js → connection-di4Fldx3.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BiJdmlDA.js → connection-form-helpers-fWne-kOd.js} +1 -1
- package/dist/client/assets/connections-BKm7IMTt.js +1 -0
- package/dist/client/assets/{create-organization-dialog-IR2z5bIs.js → create-organization-dialog-BmgLNeEx.js} +1 -1
- package/dist/client/assets/decofile-api-BhjpITFN.js +1 -0
- package/dist/client/assets/{decopilot-CK3rN_ad.js → decopilot-ClO0uusm.js} +2 -2
- package/dist/client/assets/dialog-Dxe0Jgna.js +1 -0
- package/dist/client/assets/discover-BdugM7FR.js +1 -0
- package/dist/client/assets/domain-settings-Dp-mWih8.js +1 -0
- package/dist/client/assets/{download-app-dialog-CNd8ka-x.js → download-app-dialog-lwMMuYsF.js} +1 -1
- package/dist/client/assets/{drawer-DsG6Si3V.js → drawer-1GzYkddr.js} +1 -1
- package/dist/client/assets/{dropdown-menu-4cRHTbic.js → dropdown-menu-Bws_0K_q.js} +1 -1
- package/dist/client/assets/{editor-NTP5Xcj9.js → editor-U5ucetu-.js} +1 -1
- package/dist/client/assets/{empty-state-DmTochCH.js → empty-state-BjMIbq91.js} +1 -1
- package/dist/client/assets/{empty-state-D86Jkx4H.js → empty-state-C3Z_6q55.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B3hIAjiC.js → extract-connection-data-BAjOM4U5.js} +1 -1
- package/dist/client/assets/file-explorer-LFC3Ac60.js +2 -0
- package/dist/client/assets/{file-preview-BbFH5cdB.js → file-preview-n35lcg8c.js} +1 -1
- package/dist/client/assets/{file-share-button-ChoXQdlr.js → file-share-button-D04rfik7.js} +2 -2
- package/dist/client/assets/{file-type-icon-DJQFeBpV.js → file-type-icon-C4dI9q_n.js} +1 -1
- package/dist/client/assets/{folder-icon-BRLOuEpt.js → folder-icon-pWHmymOf.js} +1 -1
- package/dist/client/assets/{form-DhUF_Mtg.js → form-CRSWplOb.js} +1 -1
- package/dist/client/assets/{gateway-client-Cb37izH_.js → gateway-client-D45uHvIc.js} +1 -1
- package/dist/client/assets/general-C7RGB0Oj.js +1 -0
- package/dist/client/assets/{github-icon-cJDFDEm7.js → github-icon-CsH29e4W.js} +1 -1
- package/dist/client/assets/{github-repo-C0igpkr9.js → github-repo-BknN0SVI.js} +1 -1
- package/dist/client/assets/home-CpLcM3nB.js +1 -0
- package/dist/client/assets/hooks-CE7d6Dy1.js +15 -0
- package/dist/client/assets/{hooks-BrcP19Uo.js → hooks-CxBYuMc8.js} +2 -2
- package/dist/client/assets/{index-epfDD3H5.js → index-4fsCOuPz.js} +2 -2
- package/dist/client/assets/index-B53DWiGz.js +1 -0
- package/dist/client/assets/{index-BQzHGsvt.js → index-BJDZS0O4.js} +11 -11
- package/dist/client/assets/index-BQwroePl.js +1 -0
- package/dist/client/assets/{index-Df6f9kP3.js → index-BRigOSQu.js} +1 -1
- package/dist/client/assets/{index-CoYeuRng.js → index-CBcq1VSB.js} +1 -1
- package/dist/client/assets/index-CFUteTrc.js +1 -0
- package/dist/client/assets/{index-gctAQu2T.js → index-CVJEcf37.js} +74 -74
- package/dist/client/assets/{index-DQ6uuKpF.js → index-CblYf_yB.js} +8 -8
- package/dist/client/assets/{index-BywxOh2e.js → index-CcEd_wWL.js} +1 -1
- package/dist/client/assets/index-Clbrhj--.js +1 -0
- package/dist/client/assets/{index-CImKKZ20.js → index-CxOPSFx9.js} +1 -1
- package/dist/client/assets/index-CyYEAXEU.js +1 -0
- package/dist/client/assets/{index-eVyHwFa9.js → index-DAN6A7hZ.js} +1 -1
- package/dist/client/assets/{index-DJADaZ4J.css → index-DUflXgSu.css} +1 -1
- package/dist/client/assets/index-Dio39w6e.js +26 -0
- package/dist/client/assets/index-DsI9yqDT.js +1 -0
- package/dist/client/assets/{index-redirect-DxBD4sTo.js → index-redirect-Bw20Ba6Y.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Da0v0sXC.js → infiniteQueryObserver-BSmIgXE3.js} +1 -1
- package/dist/client/assets/infra-billing-DFEuQtvU.js +1 -0
- package/dist/client/assets/{input-eBmoU-9D.js → input-C8MQoDCb.js} +1 -1
- package/dist/client/assets/{input-DlvEXkej.js → input-CQyA0V5b.js} +1 -1
- package/dist/client/assets/{input-C9QH7mMV.js → input-DD_DI_Km.js} +2 -2
- package/dist/client/assets/{integration-icon-YYg8l_RW.js → integration-icon-BV7Q9XOu.js} +1 -1
- package/dist/client/assets/{label-DGkzLfNU.js → label-Cfl8uGDP.js} +1 -1
- package/dist/client/assets/last-preview-page-B_KVLuYW.js +1 -0
- package/dist/client/assets/layout-Dm4T-Vne.js +1 -0
- package/dist/client/assets/legacy-agents-deep-Dd57JUEI.js +1 -0
- package/dist/client/assets/legacy-main-redirect-CWvMqmhB.js +1 -0
- package/dist/client/assets/{library-CKrgioQu.js → library-3DHQWojm.js} +4 -4
- package/dist/client/assets/login-CupMnybl.js +1 -0
- package/dist/client/assets/{markdown-BV0XgGTq.js → markdown-BvSl7QX1.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-Bv46PiO3.js → mcp-app-renderer-DJ7Ve9Yy.js} +2 -2
- package/dist/client/assets/{mcp-oauth-i7PCjbNf.js → mcp-oauth-OvlzbMCP.js} +1 -1
- package/dist/client/assets/members-Cuiahh5G.js +1 -0
- package/dist/client/assets/message-templates-wocfrCJF.js +1 -0
- package/dist/client/assets/{mini-report-page-k88VT2C2.js → mini-report-page-4Bd0cMlr.js} +1 -1
- package/dist/client/assets/{monaco-editor-kRD7y0Pc.js → monaco-editor-B2KCfh7a.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CuCuR7PQ.js → monitoring-stats-row-CufhVlNy.js} +1 -1
- package/dist/client/assets/{multi-select-CltjjMwX.js → multi-select-BHFunwbq.js} +1 -1
- package/dist/client/assets/{mustache-Db7x-4gI.js → mustache-DyjElMuJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-CT29B8-5.js → oauth-callback-4BOm__rV.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-3CPoYshC.js → oauth-callback-ai-provider-Czk5gVgf.js} +1 -1
- package/dist/client/assets/{onboarding-DEm51GnF.js → onboarding-D2PsWH4h.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-Drtbh9Ui.js → optimistic-project-sidebar-views-B3vU1qR8.js} +1 -1
- package/dist/client/assets/{organization-choice-BdqJqB_v.js → organization-choice-C-PRPVPc.js} +1 -1
- package/dist/client/assets/orgs-DpmY6dw4.js +1 -0
- package/dist/client/assets/{page-seo-form-BXvLQ5tk.js → page-seo-form-gUB5sB3u.js} +1 -1
- package/dist/client/assets/{pair-BIPkH5eA.js → pair-98UY-0wm.js} +8 -8
- package/dist/client/assets/{popover-BfKN_4aI.js → popover-DAJR0ej2.js} +1 -1
- package/dist/client/assets/post-calendar-4XiTJrif.js +1 -0
- package/dist/client/assets/post-editor-CXRn_RK8.js +1 -0
- package/dist/client/assets/preview-content-Tw_jYCgT.js +1 -0
- package/dist/client/assets/{preview-dialog-CYbL8r4H.js → preview-dialog-Bg_Wo7YI.js} +1 -1
- package/dist/client/assets/{primitives-BXcg67BS.js → primitives-BfIYsPoI.js} +1 -1
- package/dist/client/assets/profile-CDs1X-Le.js +1 -0
- package/dist/client/assets/project-app-view-BPLB01Cj.js +1 -0
- package/dist/client/assets/project-feed-CeGbFvMT.js +1 -0
- package/dist/client/assets/{project-icon-Dk1HaDIZ.js → project-icon-D1x6NEST.js} +1 -1
- package/dist/client/assets/project-reports-fH8-r6df.js +1 -0
- package/dist/client/assets/project-tasks-tas6EPem.js +1 -0
- package/dist/client/assets/prompts-B-VqD1p-.js +1 -0
- package/dist/client/assets/record-editor-LOQZDk0V.js +1 -0
- package/dist/client/assets/redirect-editor-CgXt_KHn.js +1 -0
- package/dist/client/assets/registry-YMo7WLlx.js +2 -0
- package/dist/client/assets/{registry-layout-CRM-FBei.js → registry-layout-SseogjtO.js} +3 -3
- package/dist/client/assets/reports-DC8tSFj3.js +1 -0
- package/dist/client/assets/{reports-B1FmmHPo.js → reports-Q6oueood.js} +2 -2
- package/dist/client/assets/reports-tab-DE-TYPly.js +2 -0
- package/dist/client/assets/repositories-BoiOgwFm.js +1 -0
- package/dist/client/assets/repository-import-picker-DyEfEliR.js +1 -0
- package/dist/client/assets/repository-picker-DWJtJkZW.js +1 -0
- package/dist/client/assets/require-capability-DljrHpsM.js +1 -0
- package/dist/client/assets/{required-auth-layout-CraNNSBi.js → required-auth-layout-TTElzhIM.js} +1 -1
- package/dist/client/assets/{reset-password-DcO8_P05.js → reset-password-B1ylDKoe.js} +1 -1
- package/dist/client/assets/resizable-DOW_fL7z.js +1 -0
- package/dist/client/assets/retry-i8LvYSZg.js +1 -0
- package/dist/client/assets/{review-settings-CANg_Nan.js → review-settings-DHvMG4G0.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CCig2s9-.js → rich-text-link-control-HLhFAha7.js} +1 -1
- package/dist/client/assets/roles-BWbTlJZc.js +1 -0
- package/dist/client/assets/route-D26IsMv1.js +1 -0
- package/dist/client/assets/route-D_kbg4iH.js +1 -0
- package/dist/client/assets/route-jdsFbZW7.js +1 -0
- package/dist/client/assets/runnable-block-editor-Bi0Cv7yD.js +16 -0
- package/dist/client/assets/sandbox-git-api-CMdpE2TE.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-Beua1bNX.js → sandbox-lifecycle-context-BbTDNpeS.js} +2 -2
- package/dist/client/assets/save-changes-debug-nBi-n9eV.js +1 -0
- package/dist/client/assets/{schema-BzgrQmAY.js → schema-BegvnGCM.js} +1 -1
- package/dist/client/assets/{scroll-area-tBZq-ZvJ.js → scroll-area-CxxMejtk.js} +1 -1
- package/dist/client/assets/{search-input-CYERWjWv.js → search-input-axkgbTZ7.js} +1 -1
- package/dist/client/assets/secrets-kzqIbFmd.js +1 -0
- package/dist/client/assets/section-preview-url-Csj0_ZDg.js +1 -0
- package/dist/client/assets/sections-editor-B_t9OrnC.js +2 -0
- package/dist/client/assets/select-B2GRzoG3.js +1 -0
- package/dist/client/assets/select-model-BRHN792B.js +1 -0
- package/dist/client/assets/seo-editor-DvngP1ti.js +1 -0
- package/dist/client/assets/settings-tab-DFjZ-Fkn.js +5 -0
- package/dist/client/assets/sheet-BePDARR0.js +1 -0
- package/dist/client/assets/shell-layout-D2wS-FNX.js +1 -0
- package/dist/client/assets/sidebar-IspuJbto.js +1 -0
- package/dist/client/assets/skill-preview-BdtuUFgV.js +1 -0
- package/dist/client/assets/skills-QJ3mhNvI.js +1 -0
- package/dist/client/assets/sso-DKhL-ARh.js +1 -0
- package/dist/client/assets/{store-CjL9y_7d.js → store-B9Az6md3.js} +1 -1
- package/dist/client/assets/store-registry-hcgHbNGW.js +2 -0
- package/dist/client/assets/switch-DJ4Dr2_V.js +1 -0
- package/dist/client/assets/synced-repos-flbNGs20.js +1 -0
- package/dist/client/assets/{table-aIDGrvqv.js → table-CrJ9LOSc.js} +1 -1
- package/dist/client/assets/{tabs-Sr-wlkg3.js → tabs-DVMaAAMA.js} +1 -1
- package/dist/client/assets/{task-board-CazuPR-U.js → task-board-SlBuwhrX.js} +1 -1
- package/dist/client/assets/task-route-B4hPzw6u.js +1 -0
- package/dist/client/assets/{task-status-Cj8IGjJC.js → task-status-DhZZzZ6G.js} +1 -1
- package/dist/client/assets/{tasks-DzatESzy.js → tasks-B_rqCvr1.js} +4 -4
- package/dist/client/assets/tasks-CViGtGHm.js +1 -0
- package/dist/client/assets/{textarea-6VvdKhvF.js → textarea-BDMLJ5G-.js} +1 -1
- package/dist/client/assets/{thread-intent-DPwCeeGE.js → thread-intent-C7DpKTRQ.js} +1 -1
- package/dist/client/assets/thread-route-Bc63tvFc.js +1 -0
- package/dist/client/assets/{thread-route-BsrvgyVU.js → thread-route-BzWllNYG.js} +1 -1
- package/dist/client/assets/thread-sheet-body-CiausLhX.js +1 -0
- package/dist/client/assets/toggle-group-BW8cP6lf.js +1 -0
- package/dist/client/assets/{toolbar-icon-button-CSTgB2Je.js → toolbar-icon-button-A2ebiBUr.js} +1 -1
- package/dist/client/assets/tooltip-B7VLfO9w.js +1 -0
- package/dist/client/assets/{track-CDfY4FZL.js → track-BGU8HJCB.js} +1 -1
- package/dist/client/assets/{types-8hWP_tsZ.js → types-CrAbOCy3.js} +6 -6
- package/dist/client/assets/usage-stats-Bf1Ukas_.js +1 -0
- package/dist/client/assets/use-ai-providers-R1Jac-4Q.js +1 -0
- package/dist/client/assets/use-automations-BzLd_Cf7.js +1 -0
- package/dist/client/assets/{use-autosave-DRlRuq5e.js → use-autosave-BezKrA6F.js} +1 -1
- package/dist/client/assets/use-commerce-diagnostic-DTGIqIpu.js +1 -0
- package/dist/client/assets/use-connect-companion-CgerJAPe.js +1 -0
- package/dist/client/assets/{use-connection-tOIuuLKJ.js → use-connection-B4t4VJEN.js} +1 -1
- package/dist/client/assets/{use-copy-B4PUMZjo.js → use-copy-DQwrjGi4.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-x2IPUAAO.js → use-create-virtual-mcp-CHEKOqdh.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-use6rm0l.js → use-date-fns-locale-m0Q-8AAg.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CWLgAozd.js → use-debounced-autosave-C82NqRut.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BHZw1Wtv.js → use-debounced-value-SjJ8k_tD.js} +1 -1
- package/dist/client/assets/use-deco-credits-CIfhJ3OU.js +1 -0
- package/dist/client/assets/use-decopilot-events-DDnHJjGY.js +1 -0
- package/dist/client/assets/use-delete-connection-BWW3Qwe4.js +1 -0
- package/dist/client/assets/{use-deployment-admin-PTBGIrMl.js → use-deployment-admin-D4Et99Id.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-B8C-G0p2.js +1 -0
- package/dist/client/assets/use-file-configs-CKcyFOK-.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-DnRzNQQc.js → use-infinite-scroll-C88xvDJq.js} +1 -1
- package/dist/client/assets/use-join-requests-CtMSd2H7.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-BLf-yD79.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-CF5e5Swp.js +1 -0
- package/dist/client/assets/{use-mcp-client-CzGi1Gun.js → use-mcp-client-DmOwsV3f.js} +6 -6
- package/dist/client/assets/{use-mcp-prompts-BJsq63pG.js → use-mcp-prompts-BKFfTbQi.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-I4ahUYGD.js → use-mcp-tools-eOThR6gd.js} +1 -1
- package/dist/client/assets/{use-members-xjztJVBn.js → use-members-mw1URW2v.js} +1 -1
- package/dist/client/assets/use-mobile-WPuOYoIV.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-CBQsYRLL.js → use-navigate-to-agent-zGc1-u-z.js} +1 -1
- package/dist/client/assets/use-open-billing-url-BYWSUicc.js +1 -0
- package/dist/client/assets/use-org-auth-client-mMTl8cKp.js +1 -0
- package/dist/client/assets/{use-org-fs-Cm8FYvYP.js → use-org-fs-Ck9VysIz.js} +1 -1
- package/dist/client/assets/use-org-notice-Cb7z4nA0.js +1 -0
- package/dist/client/assets/{use-org-sso-CP_t4LLU.js → use-org-sso-CvkPQsKr.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Cnixvt9H.js → use-organization-roles-wnmrYWSM.js} +1 -1
- package/dist/client/assets/use-organization-settings-CRw6qdb3.js +1 -0
- package/dist/client/assets/use-panel-navigate-ez3OqVq8.js +1 -0
- package/dist/client/assets/{use-project-native-view-presence-CJ7vLSBz.js → use-project-native-view-presence-DFjsPIlC.js} +1 -1
- package/dist/client/assets/use-project-scope-D9t-w7F3.js +1 -0
- package/dist/client/assets/use-registry-connections-BC1Pt8V1.js +1 -0
- package/dist/client/assets/use-releases-B_ioEYcb.js +1 -0
- package/dist/client/assets/use-route-default-main-B8Ci266p.js +1 -0
- package/dist/client/assets/use-secrets-BZEH47Ed.js +1 -0
- package/dist/client/assets/use-section-preview-base-D8ddLJeY.js +1 -0
- package/dist/client/assets/{use-session-runtime-Cs4eGT9k.js → use-session-runtime-CKDTMwlz.js} +1 -1
- package/dist/client/assets/use-tags-BnnveSvi.js +1 -0
- package/dist/client/assets/use-task-metadata-DQ-jzCVZ.js +1 -0
- package/dist/client/assets/{use-thread-outputs-DtpQGqCf.js → use-thread-outputs-ChimPCUk.js} +1 -1
- package/dist/client/assets/use-view-mode-CpyVGfy9.js +1 -0
- package/dist/client/assets/use-virtual-mcp-DvSX4N6q.js +1 -0
- package/dist/client/assets/useInfiniteQuery-CuoCKqDV.js +1 -0
- package/dist/client/assets/{useQueries-CnHkVL7d.js → useQueries-CCVXh4wK.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BGyZ2Zcs.js +1 -0
- package/dist/client/assets/{users-CWHZPvdU.js → users-DgkJfwRz.js} +1 -1
- package/dist/client/assets/{utils-CdxSjBly.js → utils-D06E4WDv.js} +2 -2
- package/dist/client/assets/variant-calendar-B2YQFxru.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BLTbL0Nb.js → variant-matcher-override-POFwaaTG.js} +1 -1
- package/dist/client/assets/view-mode-toggle-B09x-ETl.js +1 -0
- package/dist/client/assets/{virtual-mcp-CIE6gIFV.js → virtual-mcp-D-br_N6s.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/Printer-Nban-oJk.js +0 -1
- package/dist/client/assets/access-gate-aVhmxNUP.js +0 -1
- package/dist/client/assets/add-connection-dialog-C2-znERG.js +0 -1
- package/dist/client/assets/agent-analytics-CLObAM6S.js +0 -2
- package/dist/client/assets/agent-app-DtLxy7iB.js +0 -1
- package/dist/client/assets/agent-assets-5J9H4wgC.js +0 -1
- package/dist/client/assets/agent-automation-DTYBStDc.js +0 -20
- package/dist/client/assets/agent-automations-DYZPALXC.js +0 -1
- package/dist/client/assets/agent-connect-sources-DJFWziK9.js +0 -1
- package/dist/client/assets/agent-deck-De0Y6qk5.js +0 -1
- package/dist/client/assets/agent-e2e-MVQ6vmAy.js +0 -1
- package/dist/client/assets/agent-file-IBnKf7Fw.js +0 -1
- package/dist/client/assets/agent-git-DjVoKiR8.js +0 -3
- package/dist/client/assets/agent-hosting-DbC8wvCr.js +0 -1
- package/dist/client/assets/agent-icon-DsGBCBNv.js +0 -1
- package/dist/client/assets/agent-library-file-CySHm683.js +0 -1
- package/dist/client/assets/agent-monitor-Duc2QTVQ.js +0 -1
- package/dist/client/assets/agent-overview-DAVTPrgq.js +0 -1
- package/dist/client/assets/agent-settings-DBEnACPy.js +0 -1
- package/dist/client/assets/agent-site-editor-CJ_722sF.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CBPV2yNN.js +0 -2
- package/dist/client/assets/agent-site-editor-content-C-fwwsI7.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-Be-uG2hV.js +0 -504
- package/dist/client/assets/agent-view-B3DdbJTr.js +0 -1
- package/dist/client/assets/agent-view-guard-DTG6Ut5n.js +0 -1
- package/dist/client/assets/agents-list-DNaOFYAO.js +0 -1
- package/dist/client/assets/ai-providers-BPcl_qgT.js +0 -1
- package/dist/client/assets/api-keys-CYMMtT0P.js +0 -1
- package/dist/client/assets/app-editor-_27_2g82.js +0 -1
- package/dist/client/assets/asset-utils-DTfzHa9m.js +0 -1
- package/dist/client/assets/automation-runs-Dt50JHCo.js +0 -1
- package/dist/client/assets/automations-DDydXmIK.js +0 -1
- package/dist/client/assets/backoff-CrEUbyZT.js +0 -1
- package/dist/client/assets/buckets-Wx6DtJNT.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-4aKzyTWA.js +0 -2
- package/dist/client/assets/bulk-category-panel-CclTC40F.js +0 -1
- package/dist/client/assets/category-editor-CuGxUDVJ.js +0 -1
- package/dist/client/assets/choose-editor-CE7aKrQp.js +0 -1
- package/dist/client/assets/collapsible-BDifv-q9.js +0 -1
- package/dist/client/assets/collection-detail-ec9sW8Ey.js +0 -1
- package/dist/client/assets/collection-display-button-C3CfuUhX.js +0 -1
- package/dist/client/assets/commerce-onboarding-Dxc7EEsL.js +0 -1
- package/dist/client/assets/connect-layout-Bby2uYqZ.js +0 -1
- package/dist/client/assets/connection-detail-C-Fe9wui.js +0 -1
- package/dist/client/assets/connections-CxSK9S4W.js +0 -1
- package/dist/client/assets/decode-html-entities-B4Qel6ov.js +0 -1
- package/dist/client/assets/decopilot-sse-pool-czpSFI9L.js +0 -1
- package/dist/client/assets/delay-CnY5UFtP.js +0 -1
- package/dist/client/assets/dialog--Jkwvpx1.js +0 -1
- package/dist/client/assets/discover-C7-JIKhR.js +0 -1
- package/dist/client/assets/domain-settings-Dh029s1M.js +0 -1
- package/dist/client/assets/file-explorer-B4d-xz4q.js +0 -2
- package/dist/client/assets/general-BY1zbaWS.js +0 -1
- package/dist/client/assets/home-CeJo7q7K.js +0 -1
- package/dist/client/assets/hooks-CxPd9b6i.js +0 -15
- package/dist/client/assets/index-1yGxjvng.js +0 -24
- package/dist/client/assets/index-C7tZKQ5s.js +0 -1
- package/dist/client/assets/index-CklK0EA_.js +0 -1
- package/dist/client/assets/index-D5CXQ9x9.js +0 -1
- package/dist/client/assets/index-Og5m3t85.js +0 -26
- package/dist/client/assets/index-Y6pd1REu.js +0 -1
- package/dist/client/assets/infra-billing-ChvPe0pr.js +0 -1
- package/dist/client/assets/invite-member-dialog-CeSVAfZq.js +0 -1
- package/dist/client/assets/layout-BIIr_imR.js +0 -1
- package/dist/client/assets/legacy-agents-deep-CdZo4h4A.js +0 -1
- package/dist/client/assets/legacy-main-redirect-CWWHewM6.js +0 -1
- package/dist/client/assets/login-svGY2sKo.js +0 -1
- package/dist/client/assets/members-BOTXfNHf.js +0 -1
- package/dist/client/assets/org-layout-BiRvLqL-.js +0 -1
- package/dist/client/assets/orgs-CMf-H7HH.js +0 -1
- package/dist/client/assets/post-calendar-BAQtpQvh.js +0 -1
- package/dist/client/assets/post-editor-DBJMHXYe.js +0 -1
- package/dist/client/assets/preview-content-CICx8Frq.js +0 -1
- package/dist/client/assets/profile-CUkJFM3_.js +0 -1
- package/dist/client/assets/project-app-view-BSYHmGj3.js +0 -1
- package/dist/client/assets/project-feed-BEGVLizK.js +0 -1
- package/dist/client/assets/project-reports-BozhFElP.js +0 -1
- package/dist/client/assets/project-tasks-DVexwc9x.js +0 -1
- package/dist/client/assets/prompts-Df-P8Zuz.js +0 -1
- package/dist/client/assets/record-editor-9YdHcAWO.js +0 -1
- package/dist/client/assets/redirect-editor-BohyWJXT.js +0 -1
- package/dist/client/assets/registry-BbkHDIpk.js +0 -2
- package/dist/client/assets/reports-SeFGRJSZ.js +0 -1
- package/dist/client/assets/reports-tab-D5rlmWEp.js +0 -2
- package/dist/client/assets/repositories-BXEjUV3F.js +0 -1
- package/dist/client/assets/repository-import-picker-Bc_O4k0-.js +0 -1
- package/dist/client/assets/repository-picker-DC97O6OK.js +0 -1
- package/dist/client/assets/require-capability-CoB1D-Ih.js +0 -1
- package/dist/client/assets/retry-CErkP7V6.js +0 -1
- package/dist/client/assets/roles-DEMri9Kk.js +0 -1
- package/dist/client/assets/runnable-block-editor-BD-IThSC.js +0 -16
- package/dist/client/assets/secrets-7Z0pTBUq.js +0 -1
- package/dist/client/assets/sections-editor-DoMH-fks.js +0 -2
- package/dist/client/assets/select-C9ZnmbzX.js +0 -1
- package/dist/client/assets/select-model-FK_tmltz.js +0 -1
- package/dist/client/assets/seo-editor-DNovpojV.js +0 -1
- package/dist/client/assets/settings-layout-Cd8jASua.js +0 -1
- package/dist/client/assets/settings-sidebar-DP80M_GR.js +0 -1
- package/dist/client/assets/settings-tab-DE3XUo7h.js +0 -5
- package/dist/client/assets/shell-controls-CnE-Tn5l.js +0 -1
- package/dist/client/assets/shell-layout-DMp5UdGb.js +0 -1
- package/dist/client/assets/skill-preview-D2lK4hU9.js +0 -1
- package/dist/client/assets/skills-xXfBybxi.js +0 -1
- package/dist/client/assets/source-system-tabs-CnEGUb4r.js +0 -1
- package/dist/client/assets/sso-DdBxRFrm.js +0 -1
- package/dist/client/assets/store-registry-BFRxGHgD.js +0 -2
- package/dist/client/assets/switch-DADMizS1.js +0 -1
- package/dist/client/assets/synced-repos-Cp7R03Jp.js +0 -1
- package/dist/client/assets/task-route-_NgFGVoT.js +0 -1
- package/dist/client/assets/tasks-BvZdYZ5R.js +0 -1
- package/dist/client/assets/thread-sheet-body-S2AS0IdJ.js +0 -1
- package/dist/client/assets/toggle-group-CHZjV-1n.js +0 -1
- package/dist/client/assets/toolbar-DAhC4RMM.js +0 -1
- package/dist/client/assets/usage-stats-B38oXMbk.js +0 -1
- package/dist/client/assets/use-ai-providers-DYf552qv.js +0 -1
- package/dist/client/assets/use-automations-DSRSDlyo.js +0 -1
- package/dist/client/assets/use-commerce-diagnostic-pXwQBZmy.js +0 -1
- package/dist/client/assets/use-connect-companion-Bt171l5d.js +0 -1
- package/dist/client/assets/use-deco-credits-Coxc4dyp.js +0 -1
- package/dist/client/assets/use-decopilot-events-V4xtyk7c.js +0 -1
- package/dist/client/assets/use-delete-connection-geT4L5Ed.js +0 -1
- package/dist/client/assets/use-file-configs-BLWnBKpa.js +0 -1
- package/dist/client/assets/use-join-requests-DL4guRSR.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-BtAksZ1f.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-CpecQqEX.js +0 -1
- package/dist/client/assets/use-open-billing-url-DaC9_MxZ.js +0 -1
- package/dist/client/assets/use-org-auth-client-DuxSmx0x.js +0 -1
- package/dist/client/assets/use-org-notice-lWz1PPs-.js +0 -1
- package/dist/client/assets/use-organization-settings-C-LQvPpq.js +0 -1
- package/dist/client/assets/use-panel-navigate-D2RT2tc_.js +0 -1
- package/dist/client/assets/use-project-scope-Ch_4TfMQ.js +0 -1
- package/dist/client/assets/use-registry-connections-CuDWC28C.js +0 -1
- package/dist/client/assets/use-secrets-BJDccjnS.js +0 -1
- package/dist/client/assets/use-section-preview-base-SCqBiLMF.js +0 -1
- package/dist/client/assets/use-status-sounds-BG-lkYEo.js +0 -1
- package/dist/client/assets/use-tags-DhkHJc7C.js +0 -1
- package/dist/client/assets/use-task-metadata-COSUQhUk.js +0 -1
- package/dist/client/assets/use-view-mode-CUARubnx.js +0 -1
- package/dist/client/assets/use-virtual-mcp-BMRFgR9g.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DOeboQGx.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B5UzTlHS.js +0 -1
- package/dist/client/assets/variant-calendar-f9XxiGiP.js +0 -1
- package/dist/client/assets/view-mode-toggle-D31fXZcw.js +0 -1
- /package/dist/client/assets/{index-DDGTF8rc.css → agent-site-editor-DDGTF8rc.css} +0 -0
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-B_t9OrnC.js","assets/index-CVJEcf37.js","assets/index-DUflXgSu.css","assets/chat-context-B40ngn3f.js","assets/use-panel-navigate-ez3OqVq8.js","assets/thread-route-BzWllNYG.js","assets/use-project-scope-D9t-w7F3.js","assets/use-virtual-mcp-DvSX4N6q.js","assets/use-mcp-client-DmOwsV3f.js","assets/auth-Cyjh0UQp.js","assets/github-repo-BknN0SVI.js","assets/autosend-BBoss6Ia.js","assets/thread-intent-C7DpKTRQ.js","assets/slugify-CEUa2lfQ.js","assets/hooks-CE7d6Dy1.js","assets/backoff-8mStPHYB.js","assets/task-board-SlBuwhrX.js","assets/schema-BegvnGCM.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-ai-providers-R1Jac-4Q.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-DDnHJjGY.js","assets/use-organization-settings-CRw6qdb3.js","assets/ChevronUp-B9QGJbr0.js","assets/agent-icon-BjknPEfN.js","assets/AlertCircle-BPZWT1gc.js","assets/Tool01-C1VYYGhf.js","assets/ArrowUp-DywwLYcR.js","assets/ArrowLeft-c3HIgil5.js","assets/Tool02-A5gv-OOO.js","assets/ArrowRight-BHzAyFwu.js","assets/TrendUp01-CQWL_vX5.js","assets/ZoomOut-BA2ZiotX.js","assets/Users03-3yW32m45.js","assets/CheckCircle-4Be5K85Z.js","assets/Check-PyGET9iL.js","assets/ChevronRight-vY_5m8VB.js","assets/DotsVertical-zFAA_as9.js","assets/UserSquare-DY1wI6ZR.js","assets/Copy01-BbtQlTnV.js","assets/CreditCard01-2jrzrshR.js","assets/Database01-B8rfUUUF.js","assets/MessageCircle01-D2dDPrBD.js","assets/Download01-CSiLQIib.js","assets/Printer-B2Ij2s1c.js","assets/Settings02-C-HNbNsn.js","assets/Eye-BRXlESxS.js","assets/File02-D4JZqTxD.js","assets/Share07-C4Gw_nzw.js","assets/GitBranch01-95kZh6WB.js","assets/Globe01-Dej65_H6.js","assets/SwitchHorizontal01-CCmSX-Ww.js","assets/HardDrive-DCLQ4vdy.js","assets/Image01-Dd-Rx_B5.js","assets/Key01-CQFO2R8H.js","assets/Link01-pGxgI9VT.js","assets/LinkExternal01-Jetqi62I.js","assets/Monitor01-Bw-h-DKp.js","assets/Sun-D5AClOdh.js","assets/Package-CF-S4NRB.js","assets/Palette-DuCZiZH-.js","assets/Play-BTJRmkRf.js","assets/Plus-BUGmioCX.js","assets/SearchLg-De3yWxzK.js","assets/SearchMd-DanltqT5.js","assets/Shield01-7bhnSYVs.js","assets/Stars01-BmtGexbk.js","assets/Trash01-DkwdEhkp.js","assets/Upload01-BlEOH700.js","assets/User01-C2ILPAHc.js","assets/Users01-bydaoxbh.js","assets/XCircle-SVZraRfE.js","assets/XClose-wkdnmhrB.js","assets/X-DejWyAyX.js","assets/Zap-0km1-ru7.js","assets/scroll-area-CxxMejtk.js","assets/select-B2GRzoG3.js","assets/index-CFUteTrc.js","assets/tooltip-B7VLfO9w.js","assets/dialog-Dxe0Jgna.js","assets/input-C8MQoDCb.js","assets/runnable-block-editor-Bi0Cv7yD.js","assets/use-session-runtime-CKDTMwlz.js","assets/decofile-api-BhjpITFN.js","assets/utils-D06E4WDv.js","assets/sandbox-url-D3mC8qhT.js","assets/claim-phase-copy-0btUuJoC.js","assets/sandbox-lifecycle-context-BbTDNpeS.js","assets/pair-98UY-0wm.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-Cf4ZreOo.js","assets/use-copy-DQwrjGi4.js","assets/usage-stats-Bf1Ukas_.js","assets/markdown-BvSl7QX1.js","assets/use-mobile-WPuOYoIV.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DJ7Ve9Yy.js","assets/types-CrAbOCy3.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/gateway-client-D45uHvIc.js","assets/tool-namespace-DmnQIdtF.js","assets/utils-CVEq3hMx.js","assets/shell-layout-D2wS-FNX.js","assets/avatar-CO3n6wLC.js","assets/download-app-dialog-lwMMuYsF.js","assets/anchors-yqDzZN4K.js","assets/use-org-notice-Cb7z4nA0.js","assets/command-palette-store-BcwFt5eE.js","assets/command-D7YFT70c.js","assets/index-DsI9yqDT.js","assets/integration-icon-BV7Q9XOu.js","assets/project-icon-D1x6NEST.js","assets/required-auth-layout-TTElzhIM.js","assets/use-org-sso-CvkPQsKr.js","assets/shell-layout-CuFt8bor.css","assets/sheet-BePDARR0.js","assets/use-connection-B4t4VJEN.js","assets/use-navigate-to-agent-zGc1-u-z.js","assets/use-mcp-prompts-BKFfTbQi.js","assets/index-CblYf_yB.js","assets/form-CRSWplOb.js","assets/label-Cfl8uGDP.js","assets/use-thread-outputs-ChimPCUk.js","assets/file-type-icon-C4dI9q_n.js","assets/popover-DAJR0ej2.js","assets/monaco-editor-B2KCfh7a.js","assets/editor-U5ucetu-.js","assets/calendar-Bb8OUNd8.js","assets/textarea-BDMLJ5G-.js","assets/rich-text-link-control-HLhFAha7.js","assets/switch-DJ4Dr2_V.js","assets/safe-image-url-D5z803Ot.js","assets/dropdown-menu-Bws_0K_q.js","assets/search-input-axkgbTZ7.js","assets/tabs-DVMaAAMA.js","assets/use-debounced-value-SjJ8k_tD.js","assets/use-file-configs-CKcyFOK-.js","assets/asset-utils-DQpbxjwd.js","assets/useInfiniteQuery-CuoCKqDV.js","assets/infiniteQueryObserver-BSmIgXE3.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/toggle-group-BW8cP6lf.js","assets/alert-dialog-CDARhUOh.js","assets/sandbox-git-api-CMdpE2TE.js","assets/mustache-DyjElMuJ.js","assets/page-seo-form-gUB5sB3u.js","assets/use-section-preview-base-D8ddLJeY.js","assets/section-preview-url-Csj0_ZDg.js","assets/variant-matcher-override-POFwaaTG.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as v,aa as yt,at as Ge,ab as Se,c as pe,b as Ce,j as n,K as Fr,e as Br,h as kt,B as Je,au as $r,M as Gt,av as Ir,as as zr,l as Ke,o as Kr,t as yn}from"./index-CVJEcf37.js";import{A as Ur}from"./agent-view-guard-B7qYW-b3.js";import{a as Hr,b as St}from"./chat-context-B40ngn3f.js";import{d as Wr,a as Vr}from"./use-virtual-mcp-DvSX4N6q.js";import{c as zn,d as Jt,f as qr}from"./sandbox-lifecycle-context-BbTDNpeS.js";import{e as Gr,d as Jr}from"./backoff-8mStPHYB.js";import{a as Yr}from"./thread-intent-C7DpKTRQ.js";import{u as Kn}from"./use-session-runtime-CKDTMwlz.js";import{u as Qr}from"./use-mobile-WPuOYoIV.js";import{t as Xr}from"./ChevronUp-B9QGJbr0.js";import{u as Un,B as Zr,C as es,h as wn,x as ts,D as kn,E as ns,F as rs,G as ss}from"./agent-icon-BjknPEfN.js";import{s as Sn}from"./Database01-B8rfUUUF.js";import{n as Hn}from"./LinkExternal01-Jetqi62I.js";import{s as os}from"./Plus-BUGmioCX.js";import{i as is}from"./SearchLg-De3yWxzK.js";import{c as ut,T as mt,a as ft}from"./tooltip-B7VLfO9w.js";import{T as pt}from"./toolbar-icon-button-A2ebiBUr.js";import{P as as}from"./index-Clbrhj--.js";import{b as ls,a as cs,u as Wn,g as ds,c as us,B as It,P as ms,r as fs,R as ps,d as hs,e as Yt,f as Vn,h as gs,l as vs,m as xs,i as bs,p as ys,j as ws,S as zt}from"./runnable-block-editor-Bi0Cv7yD.js";import{w as ht}from"./variant-matcher-override-POFwaaTG.js";import{N as ks,b as Ss,s as wt,n as Qt,c as qn,f as Fe,v as Gn,h as Ps,e as js,d as Es,j as Ns,k as Pn}from"./claim-phase-copy-0btUuJoC.js";import{r as Cs,w as Rs,D as Ts,b as jn,a as Ls}from"./section-preview-url-Csj0_ZDg.js";import{u as _s}from"./use-fast-preview-draft-url-B8C-G0p2.js";import{r as Jn,l as Yn,u as Os,w as Ds}from"./last-preview-page-B_KVLuYW.js";import{u as As}from"./use-is-desktop-app-BNujXJc_.js";import{u as Ms}from"./shell-layout-D2wS-FNX.js";import{u as Wt}from"./useQueries-CCVXh4wK.js";import{i as Fs}from"./ArrowRight-BHzAyFwu.js";import{a as Qn,b as Xn,c as Bs,d as $s,e as Is,C as zs}from"./command-D7YFT70c.js";import{b as Zn,D as er,c as tr,d as nr,e as Ks}from"./dialog-Dxe0Jgna.js";import{I as En}from"./input-C8MQoDCb.js";import{u as rr}from"./blocks-preview-workspace-context-CLQbGv9t.js";import{i as Us}from"./AlertCircle-BPZWT1gc.js";import{E as Xt}from"./empty-state-BjMIbq91.js";import{i as Hs}from"./X-DejWyAyX.js";import{M as Ws}from"./monaco-editor-B2KCfh7a.js";import{R as Nn,a as gt,b as Cn}from"./resizable-DOW_fL7z.js";import{a as sr}from"./use-org-notice-Cb7z4nA0.js";import{r as Vs}from"./virtual-mcp-D-br_N6s.js";import{b as Kt}from"./use-project-scope-D9t-w7F3.js";import{G as Rn}from"./github-icon-CsH29e4W.js";import{R as qs}from"./repository-import-picker-DyEfEliR.js";import{r as Gs}from"./use-main-panel-tabs-BLf-yD79.js";import{u as Js}from"./use-task-metadata-DQ-jzCVZ.js";import{b as Ys}from"./thread-route-BzWllNYG.js";import"./use-panel-navigate-ez3OqVq8.js";import"./autosend-BBoss6Ia.js";import"./hooks-CE7d6Dy1.js";import"./use-mcp-client-DmOwsV3f.js";import"./auth-Cyjh0UQp.js";import"./task-board-SlBuwhrX.js";import"./schema-BegvnGCM.js";import"./use-ai-providers-R1Jac-4Q.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DDnHJjGY.js";import"./use-organization-settings-CRw6qdb3.js";import"./sandbox-url-D3mC8qhT.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-C1VYYGhf.js";import"./ArrowUp-DywwLYcR.js";import"./ArrowLeft-c3HIgil5.js";import"./Tool02-A5gv-OOO.js";import"./TrendUp01-CQWL_vX5.js";import"./ZoomOut-BA2ZiotX.js";import"./Users03-3yW32m45.js";import"./CheckCircle-4Be5K85Z.js";import"./Check-PyGET9iL.js";import"./ChevronRight-vY_5m8VB.js";import"./DotsVertical-zFAA_as9.js";import"./UserSquare-DY1wI6ZR.js";import"./Copy01-BbtQlTnV.js";import"./CreditCard01-2jrzrshR.js";import"./MessageCircle01-D2dDPrBD.js";import"./Download01-CSiLQIib.js";import"./Printer-B2Ij2s1c.js";import"./Settings02-C-HNbNsn.js";import"./Eye-BRXlESxS.js";import"./File02-D4JZqTxD.js";import"./Share07-C4Gw_nzw.js";import"./GitBranch01-95kZh6WB.js";import"./Globe01-Dej65_H6.js";import"./SwitchHorizontal01-CCmSX-Ww.js";import"./HardDrive-DCLQ4vdy.js";import"./Image01-Dd-Rx_B5.js";import"./Key01-CQFO2R8H.js";import"./Link01-pGxgI9VT.js";import"./Monitor01-Bw-h-DKp.js";import"./Sun-D5AClOdh.js";import"./Package-CF-S4NRB.js";import"./Palette-DuCZiZH-.js";import"./Play-BTJRmkRf.js";import"./SearchMd-DanltqT5.js";import"./Shield01-7bhnSYVs.js";import"./Stars01-BmtGexbk.js";import"./Trash01-DkwdEhkp.js";import"./Upload01-BlEOH700.js";import"./User01-C2ILPAHc.js";import"./Users01-bydaoxbh.js";import"./XCircle-SVZraRfE.js";import"./XClose-wkdnmhrB.js";import"./Zap-0km1-ru7.js";import"./index-CFUteTrc.js";import"./decofile-api-BhjpITFN.js";import"./utils-D06E4WDv.js";import"./pair-98UY-0wm.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-Cf4ZreOo.js";import"./use-copy-DQwrjGi4.js";import"./usage-stats-Bf1Ukas_.js";import"./markdown-BvSl7QX1.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DJ7Ve9Yy.js";import"./types-CrAbOCy3.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-D45uHvIc.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-BePDARR0.js";import"./integration-icon-BV7Q9XOu.js";import"./use-connection-B4t4VJEN.js";import"./use-navigate-to-agent-zGc1-u-z.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-BKFfTbQi.js";import"./index-CblYf_yB.js";import"./form-CRSWplOb.js";import"./label-Cfl8uGDP.js";import"./use-thread-outputs-ChimPCUk.js";import"./file-type-icon-C4dI9q_n.js";import"./popover-DAJR0ej2.js";import"./scroll-area-CxxMejtk.js";import"./select-B2GRzoG3.js";import"./calendar-Bb8OUNd8.js";import"./textarea-BDMLJ5G-.js";import"./rich-text-link-control-HLhFAha7.js";import"./switch-DJ4Dr2_V.js";import"./safe-image-url-D5z803Ot.js";import"./dropdown-menu-Bws_0K_q.js";import"./search-input-axkgbTZ7.js";import"./tabs-DVMaAAMA.js";import"./use-debounced-value-SjJ8k_tD.js";import"./use-file-configs-CKcyFOK-.js";import"./asset-utils-DQpbxjwd.js";import"./useInfiniteQuery-CuoCKqDV.js";import"./infiniteQueryObserver-BSmIgXE3.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-BW8cP6lf.js";import"./alert-dialog-CDARhUOh.js";import"./sandbox-git-api-CMdpE2TE.js";import"./avatar-CO3n6wLC.js";import"./download-app-dialog-lwMMuYsF.js";import"./anchors-yqDzZN4K.js";import"./command-palette-store-BcwFt5eE.js";import"./project-icon-D1x6NEST.js";import"./required-auth-layout-TTElzhIM.js";import"./use-org-sso-CvkPQsKr.js";import"./index-DsI9yqDT.js";import"./editor-U5ucetu-.js";import"./repository-picker-DWJtJkZW.js";import"./collection-search-CDaDEv2c.js";import"./use-route-default-main-B8Ci266p.js";import"./use-mcp-tools-eOThR6gd.js";import"./index-BQwroePl.js";import"./drawer-1GzYkddr.js";import"./input-DD_DI_Km.js";import"./use-open-billing-url-BYWSUicc.js";import"./use-deco-credits-CIfhJ3OU.js";import"./decopilot-ClO0uusm.js";import"./checkbox-STVvKX8k.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-CcEd_wWL.js";import"./input-CQyA0V5b.js";import"./hooks-CxBYuMc8.js";import"./use-org-fs-Ck9VysIz.js";import"./question-004-sINsf4GQ.js";import"./use-members-mw1URW2v.js";import"./use-org-auth-client-mMTl8cKp.js";import"./add-connection-dialog-DB5JJjad.js";import"./extract-connection-data-BAjOM4U5.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./connection-di4Fldx3.js";import"./connection-card-kANJRcvf.js";import"./use-registry-connections-BC1Pt8V1.js";import"./retry-i8LvYSZg.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-fWne-kOd.js";import"./authenticate-and-persist-oauth-Dgc5b4Jr.js";import"./mcp-oauth-OvlzbMCP.js";import"./collection-tabs-CkeFxbT3.js";import"./badge-DUpgRwQu.js";import"./use-infinite-scroll-C88xvDJq.js";import"./useSuspenseInfiniteQuery-BGyZ2Zcs.js";import"./use-project-native-view-presence-DFjsPIlC.js";import"./site-slug-uya6Wp4-.js";const Qs={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Xs(t){const{previewState:e,progressStatus:r,fastPreviewActive:s=!1,fastPreviewReady:o=!1,codingSession:u=!1}=t,d=u?null:t.previewServerUrl;return e.kind==="suspended"||e.kind==="errored"?Qs:s&&o&&d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&r!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const Zs=1e4,eo=1e3,to=3e4;function no({iframeRef:t,src:e,active:r}){const s=v.useRef(0),o=v.useRef(null),u=v.useRef(null),d=v.useRef(e),l=v.useRef(r);d.current=e,l.current=r;const a=()=>{o.current&&clearTimeout(o.current),u.current&&clearTimeout(u.current),o.current=null,u.current=null},c=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,h()},Zs)},h=()=>{if(!l.current||!d.current)return;u.current&&clearTimeout(u.current);const E=Gr(to,eo,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const g=t.current,w=d.current;!g||!w||!l.current||(g.src=w,c())},E)},p=()=>{s.current=0,a()},f=()=>{o.current&&(clearTimeout(o.current),o.current=null),h()};return v.useEffect(()=>{if(a(),s.current=0,!(!r||!e))return c(),a},[e,r]),{handleLoad:p,handleError:f}}var Tn;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(Tn||(Tn={}));const ro=yt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:yt({width:Ge(),height:Ge()}),position:yt({x:Ge(),y:Ge()})}),so=`(function() {
|
|
3
|
+
if (window.__visualEditorActive) return;
|
|
4
|
+
window.__visualEditorActive = true;
|
|
5
|
+
|
|
6
|
+
var cursorStyle = document.createElement("style");
|
|
7
|
+
cursorStyle.textContent = "* { cursor: default !important; }";
|
|
8
|
+
document.head.appendChild(cursorStyle);
|
|
9
|
+
|
|
10
|
+
var highlight = document.createElement("div");
|
|
11
|
+
highlight.style.cssText = "position:fixed;pointer-events:none;outline:2px solid #a855f7;background:rgba(168,85,247,0.08);border-radius:2px;z-index:2147483647;display:none;";
|
|
12
|
+
document.body.appendChild(highlight);
|
|
13
|
+
|
|
14
|
+
var badge = document.createElement("div");
|
|
15
|
+
badge.style.cssText = "position:fixed;pointer-events:none;background:#a855f7;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
16
|
+
document.body.appendChild(badge);
|
|
17
|
+
|
|
18
|
+
var lastTarget = null;
|
|
19
|
+
var rafPending = false;
|
|
20
|
+
var moveHandler = function(e) {
|
|
21
|
+
if (rafPending) return;
|
|
22
|
+
rafPending = true;
|
|
23
|
+
var target = e.target;
|
|
24
|
+
requestAnimationFrame(function() {
|
|
25
|
+
rafPending = false;
|
|
26
|
+
var el = target;
|
|
27
|
+
if (!el || el === highlight || el === badge) return;
|
|
28
|
+
if (el === lastTarget) return;
|
|
29
|
+
lastTarget = el;
|
|
30
|
+
var r = el.getBoundingClientRect();
|
|
31
|
+
highlight.style.display = "block";
|
|
32
|
+
highlight.style.top = r.top + "px";
|
|
33
|
+
highlight.style.left = r.left + "px";
|
|
34
|
+
highlight.style.width = r.width + "px";
|
|
35
|
+
highlight.style.height = r.height + "px";
|
|
36
|
+
var tag = el.tagName.toLowerCase();
|
|
37
|
+
var id = el.id ? "#" + el.id : "";
|
|
38
|
+
var cls = el.className && typeof el.className === "string"
|
|
39
|
+
? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
|
|
40
|
+
: "";
|
|
41
|
+
badge.textContent = tag + id + cls;
|
|
42
|
+
badge.style.display = "block";
|
|
43
|
+
badge.style.top = Math.max(0, r.top - 20) + "px";
|
|
44
|
+
badge.style.left = r.left + "px";
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
48
|
+
|
|
49
|
+
var outHandler = function(e) {
|
|
50
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
51
|
+
highlight.style.display = "none";
|
|
52
|
+
badge.style.display = "none";
|
|
53
|
+
lastTarget = null;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
57
|
+
|
|
58
|
+
var clickHandler = function(e) {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
e.stopImmediatePropagation();
|
|
61
|
+
var el = e.target;
|
|
62
|
+
if (!el || el === highlight || el === badge) return;
|
|
63
|
+
|
|
64
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
65
|
+
highlight.style.background = "rgba(168,85,247,0.15)";
|
|
66
|
+
setTimeout(function() {
|
|
67
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
68
|
+
highlight.style.background = "rgba(168,85,247,0.08)";
|
|
69
|
+
}, 400);
|
|
70
|
+
|
|
71
|
+
var tag = el.tagName.toLowerCase();
|
|
72
|
+
var id = el.id || "";
|
|
73
|
+
var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
|
|
74
|
+
var text = (el.textContent || "").trim().slice(0, 200);
|
|
75
|
+
var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
|
|
76
|
+
|
|
77
|
+
var closestSection = el.closest("section[data-manifest-key]");
|
|
78
|
+
var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
|
|
79
|
+
|
|
80
|
+
var ancestor = el;
|
|
81
|
+
var componentName = null;
|
|
82
|
+
for (var i = 0; i < 10 && ancestor; i++) {
|
|
83
|
+
if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
|
|
84
|
+
ancestor = ancestor.parentElement;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var parents = [];
|
|
88
|
+
var p = el.parentElement;
|
|
89
|
+
for (var j = 0; j < 4 && p && p !== document.body; j++) {
|
|
90
|
+
var pTag = p.tagName ? p.tagName.toLowerCase() : "";
|
|
91
|
+
var pId = p.id ? "#" + p.id : "";
|
|
92
|
+
var pCls = p.className && typeof p.className === "string"
|
|
93
|
+
? "." + p.className.trim().split(/\\s+/)[0]
|
|
94
|
+
: "";
|
|
95
|
+
parents.unshift(pTag + pId + pCls);
|
|
96
|
+
p = p.parentElement;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
window.parent.postMessage({
|
|
100
|
+
type: "visual-editor::element-clicked",
|
|
101
|
+
payload: {
|
|
102
|
+
tag: tag, id: id, classes: classes, text: text, html: html,
|
|
103
|
+
manifestKey: manifestKey, componentName: componentName,
|
|
104
|
+
parents: parents.join(" > "),
|
|
105
|
+
url: window.location.href, path: window.location.pathname,
|
|
106
|
+
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
107
|
+
position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
|
|
108
|
+
}
|
|
109
|
+
}, "*");
|
|
110
|
+
};
|
|
111
|
+
document.addEventListener("click", clickHandler, true);
|
|
112
|
+
|
|
113
|
+
window.addEventListener("message", function(e) {
|
|
114
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — a nested/downstream frame's forged message can't deactivate the editor.
|
|
115
|
+
if (e.source !== window.parent) return;
|
|
116
|
+
if (e.data && e.data.type === "visual-editor::deactivate") {
|
|
117
|
+
highlight.remove();
|
|
118
|
+
badge.remove();
|
|
119
|
+
cursorStyle.remove();
|
|
120
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
121
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
122
|
+
document.removeEventListener("click", clickHandler, true);
|
|
123
|
+
window.__visualEditorActive = false;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
})();`;function oo(t,e){const r=t.map(()=>null),s=[];for(let f=0;f<t.length;f++)t[f]!==null&&s.push(f);const o=s.length,u=e.length;if(!o||!u)return r;const d=(f,E)=>{const g=t[s[f]??0];return!g||!g.length?1:g.indexOf(e[E]??"")>=0?2:0},l=[],a=[];for(let f=0;f<=o;f++)l.push(new Array(u+1).fill(0)),a.push(new Array(u+1).fill(2));for(let f=1;f<=o;f++){const E=l[f-1]??[],g=l[f]??[],w=a[f]??[];for(let b=1;b<=u;b++){let k=E[b]??0,N=2;const y=g[b-1]??0;y>k&&(k=y,N=0);const S=d(f-1,b-1),x=(E[b-1]??0)+S;S>0&&x>k&&(k=x,N=1),g[b]=k,w[b]=N}}let c=0,h=o,p=u;for(;h>0&&p>0;){const f=a[h]?.[p]??2;f===1?(r[s[h-1]??0]=p-1,c++,h--,p--):f===0?p--:h--}if(c===0&&u===o)for(let f=0;f<o;f++)r[s[f]??0]=f;return r}const io=yt({sectionIndex:Ge(),manifestKey:Se(),clickSeq:Ge()}),Ln=`(function() {
|
|
127
|
+
if (window.__cmsEditorActive) return;
|
|
128
|
+
window.__cmsEditorActive = true;
|
|
129
|
+
|
|
130
|
+
// Preserve scroll across variant-override navigations and save-reloads.
|
|
131
|
+
// Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
|
|
132
|
+
// or reloads it, which would otherwise jump to the top. We persist the scroll
|
|
133
|
+
// offset to sessionStorage (survives reload, same-origin) keyed by pathname
|
|
134
|
+
// (the override only changes the query, so the key is stable), then restore it
|
|
135
|
+
// on the next load — retried for ~1s so it outlasts re-hydration and lazy
|
|
136
|
+
// sections that grow the page after load. The recency guard avoids restoring a
|
|
137
|
+
// stale offset on a genuinely fresh visit.
|
|
138
|
+
var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
|
|
139
|
+
var saveScroll = function() {
|
|
140
|
+
try {
|
|
141
|
+
sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
|
|
142
|
+
x: window.scrollX, y: window.scrollY, t: Date.now()
|
|
143
|
+
}));
|
|
144
|
+
} catch (_) {}
|
|
145
|
+
};
|
|
146
|
+
var saveScrollPending = false;
|
|
147
|
+
window.addEventListener("scroll", function() {
|
|
148
|
+
if (saveScrollPending) return;
|
|
149
|
+
saveScrollPending = true;
|
|
150
|
+
requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
|
|
151
|
+
}, { passive: true });
|
|
152
|
+
(function restoreScroll() {
|
|
153
|
+
var raw = null;
|
|
154
|
+
try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
|
|
155
|
+
if (!raw) return;
|
|
156
|
+
var saved = null;
|
|
157
|
+
try { saved = JSON.parse(raw); } catch (_) { return; }
|
|
158
|
+
if (!saved || (Date.now() - saved.t) > 10000) return;
|
|
159
|
+
if (!saved.x && !saved.y) return;
|
|
160
|
+
var attempts = 0;
|
|
161
|
+
var apply = function() {
|
|
162
|
+
attempts++;
|
|
163
|
+
window.scrollTo(saved.x || 0, saved.y || 0);
|
|
164
|
+
if (attempts < 8) setTimeout(apply, 120);
|
|
165
|
+
};
|
|
166
|
+
apply();
|
|
167
|
+
})();
|
|
168
|
+
|
|
169
|
+
var highlight = document.createElement("div");
|
|
170
|
+
highlight.style.cssText = "position:absolute;pointer-events:none;outline:2px solid #06b6d4;background:rgba(6,182,212,0.06);border-radius:2px;z-index:2147483647;display:none;";
|
|
171
|
+
document.body.appendChild(highlight);
|
|
172
|
+
|
|
173
|
+
var badge = document.createElement("div");
|
|
174
|
+
badge.style.cssText = "position:absolute;pointer-events:none;background:#06b6d4;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
175
|
+
document.body.appendChild(badge);
|
|
176
|
+
|
|
177
|
+
var isTopLevelSection = function(el) {
|
|
178
|
+
return el && el.parentElement
|
|
179
|
+
? !el.parentElement.closest("section[data-manifest-key]")
|
|
180
|
+
: true;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
// All top-level page sections in DOM order (deco renders page sections as
|
|
184
|
+
// <section data-manifest-key>; nested islands/sections carry the attribute
|
|
185
|
+
// too, hence the top-level filter). This is the full DOM run, framework
|
|
186
|
+
// sections included — getAllSections() narrows it to the editable window.
|
|
187
|
+
var topLevelSections = function() {
|
|
188
|
+
return Array.from(document.querySelectorAll("section[data-manifest-key]"))
|
|
189
|
+
.filter(isTopLevelSection);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
|
|
193
|
+
var sectionCandidates = [];
|
|
194
|
+
|
|
195
|
+
// Stringified from section-alignment.ts so both sides share one copy.
|
|
196
|
+
var alignSections = ${oo.toString()};
|
|
197
|
+
|
|
198
|
+
// Indexed like the decofile array; unmapped entries stay null (not clickable).
|
|
199
|
+
var computeAlignment = function(tops) {
|
|
200
|
+
var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
|
|
201
|
+
return alignSections(sectionCandidates, domKeys).map(function(idx) {
|
|
202
|
+
return idx === null ? null : tops[idx];
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// Editable sections, indexed to match the decofile array the panel uses.
|
|
207
|
+
// Recomputed from the live DOM each call (cheap, rAF-throttled) so it
|
|
208
|
+
// self-heals as client-rendered/lazy sections mount. Until the editor sends
|
|
209
|
+
// candidates, fall back to the full top-level run.
|
|
210
|
+
var getAllSections = function() {
|
|
211
|
+
var tops = topLevelSections();
|
|
212
|
+
return sectionCandidates.length ? computeAlignment(tops) : tops;
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// Resolve to the OUTERMOST page-level section (clicking nested content still
|
|
216
|
+
// maps to the top-level section the panel indexes); null if it isn't in the
|
|
217
|
+
// aligned editable set (a framework section deco injected).
|
|
218
|
+
var findSection = function(el, out) {
|
|
219
|
+
var node = el;
|
|
220
|
+
var found = null;
|
|
221
|
+
while (node && node !== document.body) {
|
|
222
|
+
if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
|
|
223
|
+
found = node;
|
|
224
|
+
}
|
|
225
|
+
node = node.parentElement;
|
|
226
|
+
}
|
|
227
|
+
if (!found) return null;
|
|
228
|
+
var sections = getAllSections();
|
|
229
|
+
if (out) out.sections = sections;
|
|
230
|
+
return sections.indexOf(found) >= 0 ? found : null;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
// A Lazy wrapper's key is just the loader — show the inner section's instead.
|
|
234
|
+
var LAZY_KEYS = [
|
|
235
|
+
"website/sections/Rendering/Lazy.tsx",
|
|
236
|
+
"website/sections/Rendering/SingleDeferred.tsx"
|
|
237
|
+
];
|
|
238
|
+
var isLazyKey = function(key) {
|
|
239
|
+
return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
|
|
240
|
+
};
|
|
241
|
+
var displayKey = function(section) {
|
|
242
|
+
var key = section.getAttribute("data-manifest-key") || "section";
|
|
243
|
+
if (isLazyKey(key)) {
|
|
244
|
+
var inner = section.querySelector("section[data-manifest-key]");
|
|
245
|
+
if (inner) return inner.getAttribute("data-manifest-key") || key;
|
|
246
|
+
}
|
|
247
|
+
return key;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
// Per-section metadata sent by the editor, aligned by index with
|
|
251
|
+
// getAllSections(). labels: names the DOM can't carry (a global section or a
|
|
252
|
+
// global inside async rendering); kinds: section type that drives the color.
|
|
253
|
+
var sectionLabels = [];
|
|
254
|
+
var sectionKinds = [];
|
|
255
|
+
var labelFor = function(section, sections) {
|
|
256
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
257
|
+
if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
|
|
258
|
+
return displayKey(section);
|
|
259
|
+
};
|
|
260
|
+
var kindFor = function(section, sections) {
|
|
261
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
262
|
+
return (idx >= 0 && sectionKinds[idx]) || "normal";
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
// Highlight palette by section kind: global = light purple, variant = green,
|
|
266
|
+
// normal = blue.
|
|
267
|
+
var COLORS = {
|
|
268
|
+
normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
|
|
269
|
+
global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
|
|
270
|
+
variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
|
|
271
|
+
};
|
|
272
|
+
var applyColor = function(kind) {
|
|
273
|
+
var c = COLORS[kind] || COLORS.normal;
|
|
274
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
275
|
+
highlight.style.background = c.bg;
|
|
276
|
+
badge.style.background = c.solid;
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
var lastSection = null;
|
|
280
|
+
var lastLabel = "";
|
|
281
|
+
var lastKind = "normal";
|
|
282
|
+
var rafPending = false;
|
|
283
|
+
// True while an in-place render fetch/swap is in flight; suppresses hover so it can't re-show the overlay right before the swap snapshots it.
|
|
284
|
+
var renderPending = false;
|
|
285
|
+
|
|
286
|
+
// Document-relative coordinates (rect + scroll) on absolutely-positioned
|
|
287
|
+
// nodes, so the browser scrolls the highlight together with the page
|
|
288
|
+
// natively — no per-frame JS repositioning, no scroll lag.
|
|
289
|
+
var positionHighlight = function(section) {
|
|
290
|
+
var r = section.getBoundingClientRect();
|
|
291
|
+
var top = r.top + window.scrollY;
|
|
292
|
+
var left = r.left + window.scrollX;
|
|
293
|
+
highlight.style.display = "block";
|
|
294
|
+
highlight.style.top = top + "px";
|
|
295
|
+
highlight.style.left = left + "px";
|
|
296
|
+
highlight.style.width = r.width + "px";
|
|
297
|
+
highlight.style.height = r.height + "px";
|
|
298
|
+
badge.textContent = lastLabel || displayKey(section);
|
|
299
|
+
badge.style.display = "block";
|
|
300
|
+
badge.style.top = Math.max(0, top - 20) + "px";
|
|
301
|
+
badge.style.left = left + "px";
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
var moveHandler = function(e) {
|
|
305
|
+
if (renderPending || rafPending) return;
|
|
306
|
+
rafPending = true;
|
|
307
|
+
var target = e.target;
|
|
308
|
+
requestAnimationFrame(function() {
|
|
309
|
+
rafPending = false;
|
|
310
|
+
if (renderPending) return;
|
|
311
|
+
if (!target || target === highlight || target === badge) return;
|
|
312
|
+
var out = {};
|
|
313
|
+
var section = findSection(target, out);
|
|
314
|
+
if (section === lastSection) return;
|
|
315
|
+
lastSection = section;
|
|
316
|
+
if (!section) {
|
|
317
|
+
highlight.style.display = "none";
|
|
318
|
+
badge.style.display = "none";
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
lastLabel = labelFor(section, out.sections);
|
|
322
|
+
lastKind = kindFor(section, out.sections);
|
|
323
|
+
applyColor(lastKind);
|
|
324
|
+
positionHighlight(section);
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
328
|
+
|
|
329
|
+
// Window scroll is handled natively by the absolute positioning above; this
|
|
330
|
+
// only re-syncs on resize and on scrolls inside nested scroll containers
|
|
331
|
+
// (capture=true catches those), where document coordinates do shift.
|
|
332
|
+
var reposition = function() {
|
|
333
|
+
if (!lastSection || highlight.style.display === "none") return;
|
|
334
|
+
if (rafPending) return;
|
|
335
|
+
rafPending = true;
|
|
336
|
+
requestAnimationFrame(function() {
|
|
337
|
+
rafPending = false;
|
|
338
|
+
if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
window.addEventListener("scroll", reposition, { capture: true, passive: true });
|
|
342
|
+
window.addEventListener("resize", reposition, { passive: true });
|
|
343
|
+
|
|
344
|
+
var outHandler = function(e) {
|
|
345
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
346
|
+
highlight.style.display = "none";
|
|
347
|
+
badge.style.display = "none";
|
|
348
|
+
lastSection = null;
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
352
|
+
|
|
353
|
+
var clickSeq = 0;
|
|
354
|
+
|
|
355
|
+
// Blocks observes clicks to select sections in the side panel; it must not
|
|
356
|
+
// cancel the iframe page's own handlers or native control behavior.
|
|
357
|
+
var clickHandler = function(e) {
|
|
358
|
+
var target = e.target;
|
|
359
|
+
if (!target || target === highlight || target === badge) return;
|
|
360
|
+
var out = {};
|
|
361
|
+
var section = findSection(target, out);
|
|
362
|
+
if (!section) return;
|
|
363
|
+
|
|
364
|
+
var sectionIndex = out.sections.indexOf(section);
|
|
365
|
+
var manifestKey = section.getAttribute("data-manifest-key") || "";
|
|
366
|
+
|
|
367
|
+
var c = COLORS[lastKind] || COLORS.normal;
|
|
368
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
369
|
+
highlight.style.background = c.active;
|
|
370
|
+
setTimeout(function() {
|
|
371
|
+
highlight.style.background = c.bg;
|
|
372
|
+
}, 400);
|
|
373
|
+
|
|
374
|
+
clickSeq++;
|
|
375
|
+
window.parent.postMessage({
|
|
376
|
+
type: "cms-editor::section-clicked",
|
|
377
|
+
payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
|
|
378
|
+
}, "*");
|
|
379
|
+
};
|
|
380
|
+
document.addEventListener("click", clickHandler, true);
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Navigation is disabled while editing: leaving the page would leave the
|
|
384
|
+
* panel editing the previous page's sections. Only the default action of a
|
|
385
|
+
* real navigation is cancelled, never propagation — in-page controls must
|
|
386
|
+
* keep working (#5567).
|
|
387
|
+
*/
|
|
388
|
+
var isNavigatingAnchor = function(a) {
|
|
389
|
+
if (!a) return false;
|
|
390
|
+
var href = a.getAttribute("href");
|
|
391
|
+
if (!href) return false;
|
|
392
|
+
var trimmed = href.trim();
|
|
393
|
+
if (!trimmed || trimmed.charAt(0) === "#") return false;
|
|
394
|
+
if (/^javascript:/i.test(trimmed)) return false;
|
|
395
|
+
// Same document + fragment only scrolls.
|
|
396
|
+
try {
|
|
397
|
+
var url = new URL(a.href, location.href);
|
|
398
|
+
if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
|
|
399
|
+
} catch (_) {}
|
|
400
|
+
return true;
|
|
401
|
+
};
|
|
402
|
+
var navBlocker = function(e) {
|
|
403
|
+
var el = e.target;
|
|
404
|
+
var a = el && el.closest ? el.closest("a") : null;
|
|
405
|
+
if (!isNavigatingAnchor(a)) return;
|
|
406
|
+
e.preventDefault();
|
|
407
|
+
};
|
|
408
|
+
document.addEventListener("click", navBlocker, true);
|
|
409
|
+
|
|
410
|
+
var submitBlocker = function(e) { e.preventDefault(); };
|
|
411
|
+
document.addEventListener("submit", submitBlocker, true);
|
|
412
|
+
|
|
413
|
+
// Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
|
|
414
|
+
var renderCtrl = null;
|
|
415
|
+
var renderQueue = Promise.resolve();
|
|
416
|
+
var TRANSITION_TAG =
|
|
417
|
+
"<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
|
|
418
|
+
var renderInPlace = function(src, body) {
|
|
419
|
+
if (renderCtrl) renderCtrl.abort();
|
|
420
|
+
var ctrl = new AbortController();
|
|
421
|
+
renderCtrl = ctrl;
|
|
422
|
+
renderPending = true;
|
|
423
|
+
highlight.style.display = "none";
|
|
424
|
+
badge.style.display = "none";
|
|
425
|
+
window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
|
|
426
|
+
renderQueue = renderQueue.then(function() {
|
|
427
|
+
return fetch(src, {
|
|
428
|
+
method: "POST",
|
|
429
|
+
body: body,
|
|
430
|
+
signal: ctrl.signal,
|
|
431
|
+
headers: { accept: "text/html", "content-type": "application/json" }
|
|
432
|
+
}).then(function(res) {
|
|
433
|
+
if (!res.ok) throw new Error("render " + res.status);
|
|
434
|
+
return res.text();
|
|
435
|
+
}).then(function(html) {
|
|
436
|
+
var swap = function() {
|
|
437
|
+
document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
|
|
438
|
+
document.body.appendChild(highlight);
|
|
439
|
+
document.body.appendChild(badge);
|
|
440
|
+
// Old section is gone; hide the overlay until the next hover repositions it.
|
|
441
|
+
highlight.style.display = "none";
|
|
442
|
+
badge.style.display = "none";
|
|
443
|
+
lastSection = null;
|
|
444
|
+
};
|
|
445
|
+
var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
|
|
446
|
+
var doc = new DOMParser().parseFromString(headHtml, "text/html");
|
|
447
|
+
var sheets = Array.prototype.map.call(
|
|
448
|
+
doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
|
|
449
|
+
function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
|
|
450
|
+
);
|
|
451
|
+
return Promise.all(sheets).then(function() {
|
|
452
|
+
if (typeof document.startViewTransition === "function") {
|
|
453
|
+
return document.startViewTransition(swap).finished;
|
|
454
|
+
}
|
|
455
|
+
swap();
|
|
456
|
+
});
|
|
457
|
+
}).then(function() {
|
|
458
|
+
var t = document.getElementById("deco-disable-transitions");
|
|
459
|
+
if (t) t.remove();
|
|
460
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
461
|
+
window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
|
|
462
|
+
}).catch(function(err) {
|
|
463
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
464
|
+
if (err && err.name === "AbortError") return;
|
|
465
|
+
window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
|
|
466
|
+
});
|
|
467
|
+
});
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
window.addEventListener("message", function(e) {
|
|
471
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
|
|
472
|
+
if (e.source !== window.parent) return;
|
|
473
|
+
if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
|
|
474
|
+
renderInPlace(e.data.src, e.data.body);
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
|
|
478
|
+
sectionLabels = e.data.labels;
|
|
479
|
+
if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
|
|
480
|
+
if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
|
|
481
|
+
if (lastSection) {
|
|
482
|
+
lastLabel = labelFor(lastSection);
|
|
483
|
+
lastKind = kindFor(lastSection);
|
|
484
|
+
applyColor(lastKind);
|
|
485
|
+
if (highlight.style.display !== "none") positionHighlight(lastSection);
|
|
486
|
+
}
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
if (e.data && e.data.type === "cms-editor::deactivate") {
|
|
490
|
+
highlight.remove();
|
|
491
|
+
badge.remove();
|
|
492
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
493
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
494
|
+
document.removeEventListener("click", clickHandler, true);
|
|
495
|
+
// Or the page stays unnavigable after leaving Blocks mode.
|
|
496
|
+
document.removeEventListener("click", navBlocker, true);
|
|
497
|
+
document.removeEventListener("submit", submitBlocker, true);
|
|
498
|
+
window.removeEventListener("scroll", reposition, { capture: true });
|
|
499
|
+
window.removeEventListener("resize", reposition);
|
|
500
|
+
window.__cmsEditorActive = false;
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
})();`;function Vt(t,e){let r=t,s=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let o=0;s&&o<5;o++){const u=e[s];if(u&&typeof u=="object"&&"__resolveType"in u){const d=u.__resolveType;if(typeof d=="string"&&d&&d!==s){r=u,s=d;continue}}break}if(!s)return[];if(s.includes("flags/multivariate")){const o=Array.isArray(r.variants)?r.variants:[];if(o.length===0||o.every(l=>l?.rule?.__resolveType===ks))return null;const d=[];for(const l of o){const a=l?.value;if(a&&typeof a=="object")for(const c of Vt(a,e)??[])d.includes(c)||d.push(c)}return d}if(Ss(s)){const o=r.section&&typeof r.section=="object"?Vt(r.section,e):[];return o===null?null:o.length?[s,...o]:[s]}return[s]}function qe(t){return t.replace(/[`*_]/g,"\\$&")}function ao(t,e){const r=[`The user selected an element on the live preview and asked: **"${qe(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&r.push(`**Section resolveType:** \`${qe(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const s=`<${t.tag}${t.classes?` class="${qe(t.classes)}"`:""}>`;r.push(`**Clicked element:** \`${s}\``),t.parents&&r.push(`**DOM breadcrumb:** ${qe(t.parents)} > ${t.tag}`),t.text&&r.push(`**Text content:** "${qe(t.text)}"`),t.componentName&&r.push(`**Component name:** ${qe(t.componentName)}`);const o=t.html.replace(/```/g,"`` `");return r.push("","**HTML snippet:**","```html",o,"```"),r.push("","Please read the source file, locate the element, and apply the requested change."),r.join(`
|
|
504
|
+
`)}function lo(t,e,r=320,s=44,o=12){const{x:u,y:d}=t,{width:l,height:a}=e,c=Math.max(o,Math.min(u-r/2,l-r-o)),p=d/a>.68?Math.max(o,d-s-18):Math.min(d+18,a-s-o);return{leftPct:c/l*100,topPct:p/a*100}}function co(t){const e=pe.c(45),{element:r,onDismiss:s}=t,[o,u]=v.useState(""),d=v.useRef(null),{sendMessage:l}=Hr(),{openSidePanel:a}=Ms(),c=Ce();let h;e[0]!==r||e[1]!==o||e[2]!==s||e[3]!==a||e[4]!==l?(h=()=>{if(!o.trim())return;const D=ao(r,o);a(),l({parts:[{type:"text",text:D}]}),s()},e[0]=r,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=h):h=e[5];const p=h;let f;e[6]!==r.position||e[7]!==r.viewport?(f=lo(r.position,r.viewport),e[6]=r.position,e[7]=r.viewport,e[8]=f):f=e[8];const E=f,g=`${E.leftPct}%`,w=`${E.topPct}%`;let b;e[9]!==g||e[10]!==w?(b={left:g,top:w,width:"320px"},e[9]=g,e[10]=w,e[11]=b):b=e[11];let k;e[12]!==p?(k=D=>{D.preventDefault(),p()},e[12]=p,e[13]=k):k=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=D=>u(D.target.value),e[14]=N):N=e[14];let y;e[15]!==s?(y=D=>{D.key==="Escape"&&s()},e[15]=s,e[16]=y):y=e[16];let S;e[17]!==c?(S=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=S):S=e[18];let x;e[19]!==o||e[20]!==y||e[21]!==S?(x=n.jsx("input",{ref:d,autoFocus:!0,type:"text",value:o,onChange:N,onKeyDown:y,placeholder:S,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=o,e[20]=y,e[21]=S,e[22]=x):x=e[22];let P;e[23]!==o?(P=o.trim(),e[23]=o,e[24]=P):P=e[24];const M=!P;let j;e[25]!==c?(j=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=j):j=e[26];let B;e[27]!==c?(B=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=B):B=e[28];let W;e[29]!==B?(W=n.jsx("title",{children:B}),e[29]=B,e[30]=W):W=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=n.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=K):K=e[31];let R;e[32]!==W?(R=n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[W,K]}),e[32]=W,e[33]=R):R=e[33];let O;e[34]!==M||e[35]!==j||e[36]!==R?(O=n.jsx("button",{type:"submit",disabled:M,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:R}),e[34]=M,e[35]=j,e[36]=R,e[37]=O):O=e[37];let $;e[38]!==x||e[39]!==O||e[40]!==k?($=n.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:k,children:[x,O]}),e[38]=x,e[39]=O,e[40]=k,e[41]=$):$=e[41];let V;return e[42]!==$||e[43]!==b?(V=n.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:$}),e[42]=$,e[43]=b,e[44]=V):V=e[44],V}const _n="site-links",uo=/details?page|\bpdp\b/i,mo=/listingpage|\bplp\b/i;function fo(t,e,r){const s=new Set;for(const l of r)uo.test(l)&&s.add("product"),mo.test(l)&&s.add("category");const o=wt(Qt(t)),u=o[o.length-1],d=o[o.length-2];return u?.type==="text"&&u.text==="/p"&&d?.type==="param"&&d.name===e&&s.add("product"),e==="*"&&o.some(l=>l.type==="param"&&l.name==="*")&&s.add("category"),s}const po=["rosa","preto","pink","black"];function vt(t,e){const r=e.trim();return r?t(r):po.flatMap(s=>t(s))}function ho(t,e){const r=e.trim(),s=[];/^\d+$/.test(r)&&s.push({resolveType:t,props:{ids:[r]}});const u=r.includes("-")&&!/\s/.test(r)?r.replace(/-+/g," "):r;return s.push({resolveType:t,props:{query:u,count:10}}),s}const or=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Zt(t){return t.split("/")[0]??""}function go(t){const e=new Set;for(const r of t){const s=Zt(r);or.has(s)&&e.add(s)}return e}function vo(t,e){const r=Zt(t);return!or.has(r)||e.size===0?!0:e.has(r)}const xo=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>vt(r=>ho(t,r),e),optionsFromPayload:xt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{props:{search:r,pageSize:10,currentPage:1}}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{term:r,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>vt(r=>[{resolveType:t,props:{query:r,term:r,count:10,hitsPerPage:10}}],e),optionsFromPayload:xt},{kind:"category",test:t=>t==="vtex/loaders/categories/tree.ts"||/categor(y|ies).*tree/i.test(t),clientFilter:!0,buildRequests:t=>[{resolveType:t,props:{}}],optionsFromPayload:jo}];function bo(t,e,r=new Set){const s=[...e],o=l=>{const a=[];for(const c of xo){if(c.kind!==l)continue;const h=s.find(p=>c.test(p)&&vo(p,r));h&&a.push({cand:c,resolveType:h})}return a.find(c=>r.has(Zt(c.resolveType)))??a[0]},u=(l,a,c)=>({kind:l.kind,id:`${l.kind}:${a}`,resolveType:a,clientFilter:l.clientFilter,isFallback:c,buildRequests:h=>l.buildRequests(a,h),optionsFromPayload:l.optionsFromPayload}),d=[];for(const l of["product","category"]){if(!t.has(l))continue;const a=o(l);a&&d.push(u(a.cand,a.resolveType,!1))}return t.size>0&&d.push(yo(t.has("category")?"category":"product")),d}function yo(t){return{kind:t,id:_n,resolveType:_n,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,r)=>To(e,r)}}function Ue(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function wo(t,e,r){const s=new Set,o=new Set,u=d=>{if(Array.isArray(d)){for(const c of d)u(c);return}const l=Ue(d);if(!l)return;const a=l.__resolveType;if(typeof a=="string"){if(r(a))s.add(a);else if(a in e&&!o.has(a)){o.add(a);const c=Ue(e[a])?.__resolveType;typeof c=="string"&&r(c)&&s.add(a),u(e[a])}}for(const c of Object.values(l))u(c)};return u(t),s}function ir(t){const e=new Set,r=[];for(const s of t)for(const o of s)e.has(o.value)||(e.add(o.value),r.push(o));return r}function ar(t){try{return decodeURIComponent(t)}catch{return t}}function ko(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function So(t){const e=[];let r="^";for(const s of t)s.type==="text"?r+=ko(s.text):(e.push(s.name),r+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${r}$`),order:e}}function lr(t,e,r){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const o=wt(Qt(e)),{pattern:u,order:d}=So(o),l=d.indexOf(r);if(l===-1)return null;const a=s.match(u);if(!a)return null;const c=a[l+1]?.replace(/^\/+|\/+$/g,"");return c?ar(c):null}function xt(t,e){const r=Ue(t),s=Array.isArray(t)?t:Array.isArray(r?.products)?r.products:Array.isArray(r?.list)?r.list:[],o=[],u=new Set;for(const d of s){const l=Ue(d);if(!l)continue;const a=lr(l.url,e.template,e.paramName);if(!a||u.has(a))continue;u.add(a);const c=Ue(l.isVariantOf),h=typeof c?.name=="string"&&c.name||typeof l.name=="string"&&l.name||a,p=Array.isArray(l.image)?Ue(l.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;o.push({value:a,label:h,image:f})}return o}function Po(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const r=e.replace(/^\/+|\/+$/g,"");return r?ar(r):null}function jo(t){const e=[],r=new Set,s=(o,u)=>{const d=Ue(o);if(!d)return;const l=typeof d.name=="string"&&d.name?d.name:"",a=l?[...u,l]:u,c=Po(d.url);if(c&&!r.has(c)&&(r.add(c),e.push({value:c,label:a.join(" › ")||c})),Array.isArray(d.children))for(const h of d.children)s(h,a)};if(Array.isArray(t))for(const o of t)s(o,[]);return e}const Eo=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 No(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,r=>r.toUpperCase())}function Co(t){if(typeof t!="string"||!t)return[];const e=[],r=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let s,o=0;for(;(s=r.exec(t))!==null&&o++<5e3;){const u=s[1]??"",d=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:d})}return e}function Ro(t){if(typeof t!="string"||!t)return[];const e=[],r=new Set,s=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,o=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,d=0;for(;(u=s.exec(t))!==null&&d++<3e3;){const l=(u[1]??"").replace(/\\\//g,"/");if(!l||r.has(l))continue;r.add(l);const a=t.slice(u.index,u.index+900).match(o)?.[1]?.replace(/\\\//g,"/");e.push({url:l,name:u[2]??"",image:a||void 0})}return e}function To(t,e){const r=[],s=new Set,o=(u,d,l,a)=>{if(r.length>=200)return;const c=lr(u,e.template,e.paramName);!c||s.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||l==="category"&&Eo.has(c.split("/")[0]??"")||(s.add(c),r.push({value:c,label:d&&d.length<=80?d:No(c),kind:l,image:a}))};for(const{url:u,name:d,image:l}of Ro(t))o(u,d,"product",l);for(const{href:u,text:d}of Co(t))u.startsWith("/")&&!u.startsWith("//")&&o(u,d,"category");return r}function tt(t,e,r=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,r)}const cr=1e4;function Lo(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 _o(t,{resolveType:e,props:r}){const s=await fetch(ls(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...r}),signal:AbortSignal.timeout(cr)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function On(t,e){const r=await fetch(cs(t,e),{signal:AbortSignal.timeout(cr)});if(!r.ok)throw new Error(`Failed to fetch page: ${r.status}`);return r.text()}async function Oo(t,e,r){const s=e.optionsFromPayload(await On(t,"/"),r),o=s.find(d=>d.kind==="category");if(!o)return s;const u=Fe(r.template,{[r.paramName]:o.value});if(u==="/")return s;try{const d=e.optionsFromPayload(await On(t,u),r).filter(l=>l.kind==="product");return ir([s,d])}catch{return s}}function Do(t,e,r){return Fr.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":r}`)}async function Ao(t,e,r,s){if(e.homepageLinks)return Oo(t,e,s);const o=e.buildRequests?.(r)??[];if(o.length===0)return[];const u=await Promise.allSettled(o.map(l=>_o(t,l))),d=u.filter(l=>l.status==="fulfilled").map(l=>l.value);if(d.length===0){const l=u.find(a=>a.status==="rejected");throw l?l.reason:new Error("Failed to fetch options")}return ir(d.map(l=>e.optionsFromPayload(l,s)))}function qt(t,e,r,s,o){return{queryKey:Do(t,e,r),queryFn:()=>Ao(t,e,r,s),enabled:o,staleTime:6e4,retry:1}}function nt(t){const e=pe.c(16),{heading:r,iconKind:s,options:o,template:u,paramName:d,keyPrefix:l,onSelect:a}=t;if(o.length===0)return null;let c;if(e[0]!==s||e[1]!==l||e[2]!==a||e[3]!==o||e[4]!==d||e[5]!==u){let p;e[7]!==s||e[8]!==l||e[9]!==a||e[10]!==d||e[11]!==u?(p=f=>n.jsxs(Xn,{value:`${l}:${f.value}`,className:"gap-3 py-2",onSelect:()=>a(f.value),children:[s==="product"&&n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?n.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):n.jsx(Un,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:f.label}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[d]:f.value})})]})]},`${l}:${f.value}`),e[7]=s,e[8]=l,e[9]=a,e[10]=d,e[11]=u,e[12]=p):p=e[12],c=o.map(p),e[0]=s,e[1]=l,e[2]=a,e[3]=o,e[4]=d,e[5]=u,e[6]=c}else c=e[6];let h;return e[13]!==r||e[14]!==c?(h=n.jsx(Qn,{heading:r,children:c}),e[13]=r,e[14]=c,e[15]=h):h=e[15],h}function Dn(t){const e=pe.c(2),{text:r}=t;let s;return e[0]!==r?(s=n.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:r}),e[0]=r,e[1]=s):s=e[1],s}function Mo(t){const e=pe.c(52),{sources:r,template:s,paramName:o,value:u,sandboxRef:d,onCommit:l}=t,a=Ce(),[c,h]=v.useState(!1),[p,f]=v.useState(""),[E,g]=v.useState(""),w=v.useRef(null),b=o==="*"?a("sandbox.preview.catchAllParamLabel"):`:${o}`,k=Lo(a),y=[...new Set(r.map(H=>k[H.kind].noun))].join(" or ");let S;e[0]!==a||e[1]!==y?(S=a("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=a,e[1]=y,e[2]=S):S=e[2];const x=S,P={template:s,paramName:o};let M;e[3]!==p?(M=(H,T)=>({source:H,query:T,options:H.clientFilter?tt(T.data??[],p):T.data??[]}),e[3]=p,e[4]=M):M=e[4];const j=M,B=r.filter(Ho),W=r.filter(Uo),K=Wt({queries:B.map(H=>qt(d,H,E,P,c))});let R;e[5]!==K||e[6]!==j?(R=(H,T)=>j(H,K[T]),e[5]=K,e[6]=j,e[7]=R):R=e[7];const O=B.map(R),$=O.length===0||O.every(Ko),V=Wt({queries:W.map(H=>qt(d,H,E,P,c&&$))});let D;e[8]!==V||e[9]!==j?(D=(H,T)=>j(H,V[T]),e[8]=V,e[9]=j,e[10]=D):D=e[10];const U=W.map(D),A=$?U:O,I=A.length===1&&A[0]?.source.homepageLinks?A[0]:null,L=I&&!I.query.isLoading&&!I.query.isError?I?.query.data??[]:[],Z=tt(L.filter(zo),p),Y=tt(L.filter(Io),p),de=Z.length>0&&Y.length>0,q=H=>{h(H),w.current&&clearTimeout(w.current),f(H?u:""),g(H?u:"")};let X;e[11]===Symbol.for("react.memo_cache_sentinel")?(X=H=>{f(H),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{g(H)},300)},e[11]=X):X=e[11];const ee=X,J=H=>{l(H),q(!1)},ue=qn(p),re=Fe(s,{[o]:ue}),G=er,ie=Zn,xe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",me=$o;let te;e[12]!==b||e[13]!==a?(te=a("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=a,e[14]=te):te=e[14];let ae;e[15]!==te?(ae=n.jsx(tr,{className:"sr-only",children:n.jsx(nr,{children:te})}),e[15]=te,e[16]=ae):ae=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=n.jsx(Un,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let ne;e[18]!==a?(ne=a("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=a,e[19]=ne):ne=e[19];let le;e[20]!==b?(le=n.jsx("span",{className:"rounded-sm bg-violet-500/15 px-1 py-0.5 font-mono text-[12px] text-violet-600 dark:text-violet-400",children:b}),e[20]=b,e[21]=le):le=e[21];let se;e[22]!==ne||e[23]!==le?(se=n.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,n.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ne," ",le]})]}),e[22]=ne,e[23]=le,e[24]=se):se=e[24];const Pe=$s,Re=!1,Be="min-h-0 flex-1";let ge;e[25]!==x||e[26]!==p?(ge=n.jsx(Is,{autoFocus:!0,placeholder:x,value:p,onValueChange:ee}),e[25]=x,e[26]=p,e[27]=ge):ge=e[27];const Ye=Bs,Oe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Te;e[28]!==a?(Te=a("sandbox.pathParamPickerChip.noResults"),e[28]=a,e[29]=Te):Te=e[29];let je;e[30]!==Te?(je=n.jsx(zs,{children:Te}),e[30]=Te,e[31]=je):je=e[31];const $e=ue&&n.jsx(Qn,{className:"shrink-0",children:n.jsxs(Xn,{value:`__raw__:${ue}`,className:"gap-3 py-2",onSelect:()=>J(ue),children:[n.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:n.jsx(Fs,{size:14,className:"text-muted-foreground"})}),n.jsxs("span",{className:"min-w-0 flex-1",children:[n.jsx("span",{className:"block truncate text-sm",children:a("sandbox.pathParamPickerChip.useRawValue",{rawTerm:ue,paramLabel:b})}),n.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:re})]})]})}),De=de?n.jsxs("div",{className:"flex min-h-0 flex-1",children:[n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:Z,template:s,paramName:o,keyPrefix:`${I?.source.id}:cat`,onSelect:J})}),n.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:Y,template:s,paramName:o,keyPrefix:`${I?.source.id}:prod`,onSelect:J})})]}):n.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:A.map(H=>{const{source:T,query:fe,options:Me}=H,{noun:Pt}=k[T.kind];if(fe.isLoading)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.loading",{noun:Pt})},T.id);if(fe.isError)return n.jsx(Dn,{text:a("sandbox.pathParamPickerChip.couldNotLoad")},T.id);if(T.homepageLinks){const Qe=fe.data??[];return n.jsxs(v.Fragment,{children:[n.jsx(nt,{heading:k.category.heading,iconKind:"category",options:tt(Qe.filter(Bo),p),template:s,paramName:o,keyPrefix:`${T.id}:cat`,onSelect:J}),n.jsx(nt,{heading:k.product.heading,iconKind:"product",options:tt(Qe.filter(Fo),p),template:s,paramName:o,keyPrefix:`${T.id}:prod`,onSelect:J})]},T.id)}return n.jsx(nt,{heading:A.length>1?k[T.kind].heading:void 0,iconKind:T.kind,options:Me,template:s,paramName:o,keyPrefix:T.id,onSelect:J},T.id)})});let Ae;e[32]!==Ye||e[33]!==je||e[34]!==$e||e[35]!==De?(Ae=n.jsxs(Ye,{className:Oe,children:[je,$e,De]}),e[32]=Ye,e[33]=je,e[34]=$e,e[35]=De,e[36]=Ae):Ae=e[36];let ve;e[37]!==Pe||e[38]!==ge||e[39]!==Ae?(ve=n.jsxs(Pe,{shouldFilter:Re,className:Be,children:[ge,Ae]}),e[37]=Pe,e[38]=ge,e[39]=Ae,e[40]=ve):ve=e[40];let Le;e[41]!==ie||e[42]!==ae||e[43]!==se||e[44]!==ve||e[45]!==me?(Le=n.jsxs(ie,{className:xe,onClick:me,children:[ae,se,ve]}),e[41]=ie,e[42]=ae,e[43]=se,e[44]=ve,e[45]=me,e[46]=Le):Le=e[46];let He;return e[47]!==G||e[48]!==q||e[49]!==c||e[50]!==Le?(He=n.jsx(G,{open:c,onOpenChange:q,children:Le}),e[47]=G,e[48]=q,e[49]=c,e[50]=Le,e[51]=He):He=e[51],n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",title:a("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-sm bg-violet-500/15 px-1 py-0.5 text-[12px] text-violet-600 hover:bg-violet-500/25 dark:text-violet-400",onClick:H=>{H.stopPropagation(),q(!0)},children:u||b}),He]})}function Fo(t){return t.kind==="product"}function Bo(t){return t.kind!=="product"}function $o(t){return t.stopPropagation()}function Io(t){return t.kind==="product"}function zo(t){return t.kind!=="product"}function Ko(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Uo(t){return t.isFallback}function Ho(t){return!t.isFallback}function Wo(t){const e=pe.c(8),{sources:r,template:s,paramName:o,sandboxRef:u,onFill:d}=t;let l,a;if(e[0]!==o||e[1]!==u||e[2]!==r||e[3]!==s){const E={template:s,paramName:o},g=r.filter(Vo);a=Wt,l=g.map(w=>qt(u,w,"",E,!0)),e[0]=o,e[1]=u,e[2]=r,e[3]=s,e[4]=l,e[5]=a}else l=e[4],a=e[5];let c;e[6]!==l?(c={queries:l},e[6]=l,e[7]=c):c=e[7];const h=a(c),[p,f]=v.useState(!1);if(!p)for(const E of h){if(E.isLoading)break;const g=E.data?.[0];if(g){f(!0),queueMicrotask(()=>d(g.value));break}}return null}function Vo(t){return!t.isFallback}function qo(t){const e=pe.c(31),{name:r,value:s,onCommit:o}=t,u=Ce(),[d,l]=v.useState(s),[a,c]=v.useState(!1),h=v.useRef(!1);let p;e[0]!==r||e[1]!==u?(p=r==="*"?u("sandbox.preview.catchAllParamLabel"):`:${r}`,e[0]=r,e[1]=u,e[2]=p):p=e[2];const f=p,E=d||f;let g;e[3]!==E?(g=n.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=g):g=e[4];let w;e[5]!==f||e[6]!==u?(w=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=w):w=e[7];let b,k;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>l(j.target.value),k=()=>c(!0),e[8]=b,e[9]=k):(b=e[8],k=e[9]);let N;e[10]!==s?(N=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,l(s),j.currentTarget.blur())},e[10]=s,e[11]=N):N=e[11];let y;e[12]!==d||e[13]!==o||e[14]!==s?(y=()=>{if(c(!1),h.current){h.current=!1;return}const j=qn(d);l(j),j!==s&&o(j)},e[12]=d,e[13]=o,e[14]=s,e[15]=y):y=e[15];let S;e[16]!==d||e[17]!==f||e[18]!==w||e[19]!==N||e[20]!==y?(S=n.jsx("input",{type:"text",value:d,placeholder:f,title:w,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-violet-500/15 px-1 text-[12px] text-violet-600 outline-none placeholder:text-violet-500/60 focus:bg-violet-500/25 dark:text-violet-400",onClick:Go,onChange:b,onFocus:k,onKeyDown:N,onBlur:y}),e[16]=d,e[17]=f,e[18]=w,e[19]=N,e[20]=y,e[21]=S):S=e[21];let x;e[22]!==g||e[23]!==S?(x=n.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,S]}),e[22]=g,e[23]=S,e[24]=x):x=e[24];let P;e[25]!==a||e[26]!==u?(P=a&&n.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[n.jsx(Zr,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=a,e[26]=u,e[27]=P):P=e[27];let M;return e[28]!==P||e[29]!==x?(M=n.jsxs(n.Fragment,{children:[x,P]}),e[28]=P,e[29]=x,e[30]=M):M=e[30],M}function Go(t){return t.stopPropagation()}function Jo(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const r=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${r.host}${s}`}catch{return e}}function Yo(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function Qo(t){const e=pe.c(5);let r;e[0]!==t?(r=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=r):r=e[1];const s=Wn(r);let o;return e[2]!==t||e[3]!==s?(o={mutationFn:async u=>{const{name:d,path:l,template:a}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const c=ds(d),h=a?{...a,name:d,path:l}:us(d,l);return await s.mutateAsync({blockKey:c,data:h}),{key:c,name:d,path:l}}},e[2]=t,e[3]=s,e[4]=o):o=e[4],Br(o)}function Xo(t){const e=pe.c(89),{open:r,onOpenChange:s,isPending:o,error:u,templates:d,onSubmit:l}=t,a=o===void 0?!1:o,c=Ce();let h;e[0]!==c?(h=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=h):h=e[1];const[p,f]=v.useState(h);let E;e[2]!==c?(E=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=E):E=e[3];const[g,w]=v.useState(E),[b,k]=v.useState(It),[N,y]=v.useState(null),[S,x]=v.useState(r);r!==S&&(x(r),r&&(f(c("sectionsEditor.createPageModal.defaultPageName")),w(c("sectionsEditor.createPageModal.defaultPagePath")),k(It),y(null)));const P=!!d?.length;let M;e[4]!==a||e[5]!==s?(M=ne=>{!ne&&!a&&(y(null),s(!1))},e[4]=a,e[5]=s,e[6]=M):M=e[6];const j=M;let B;e[7]!==a||e[8]!==p||e[9]!==l||e[10]!==g||e[11]!==P||e[12]!==b?(B=async ne=>{ne.preventDefault();const le=p.trim(),se=g.trim();if(!le||!se||a)return;const Pe=Gn(se);if(Pe){y(Pe);return}y(null),await l({name:le,path:se,templateKey:P&&b!==It?b:null})},e[7]=a,e[8]=p,e[9]=l,e[10]=g,e[11]=P,e[12]=b,e[13]=B):B=e[13];const W=B,K=N??u;let R;e[14]!==c?(R=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=R):R=e[15];let O;e[16]!==R?(O=n.jsx(tr,{children:n.jsx(nr,{children:R})}),e[16]=R,e[17]=O):O=e[17];let $;e[18]!==c?($=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=$):$=e[19];let V;e[20]!==$?(V=n.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:$}),e[20]=$,e[21]=V):V=e[21];let D;e[22]===Symbol.for("react.memo_cache_sentinel")?(D=ne=>f(ne.target.value),e[22]=D):D=e[22];let U;e[23]!==c?(U=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=U):U=e[24];let A;e[25]!==a||e[26]!==p||e[27]!==U?(A=n.jsx(En,{id:"new-page-name",value:p,onChange:D,placeholder:U,autoFocus:!0,disabled:a}),e[25]=a,e[26]=p,e[27]=U,e[28]=A):A=e[28];let I;e[29]!==A||e[30]!==V?(I=n.jsxs("div",{className:"space-y-1.5",children:[V,A]}),e[29]=A,e[30]=V,e[31]=I):I=e[31];let Q;e[32]!==c?(Q=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=Q):Q=e[33];let L;e[34]!==Q?(L=n.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:Q}),e[34]=Q,e[35]=L):L=e[35];let Z;e[36]===Symbol.for("react.memo_cache_sentinel")?(Z=ne=>w(ne.target.value),e[36]=Z):Z=e[36];let Y;e[37]!==c?(Y=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=Y):Y=e[38];let de;e[39]!==a||e[40]!==g||e[41]!==Y?(de=n.jsx(En,{id:"new-page-path",value:g,onChange:Z,placeholder:Y,disabled:a}),e[39]=a,e[40]=g,e[41]=Y,e[42]=de):de=e[42];let q;e[43]!==L||e[44]!==de?(q=n.jsxs("div",{className:"space-y-1.5",children:[L,de]}),e[43]=L,e[44]=de,e[45]=q):q=e[45];let X;e[46]!==a||e[47]!==P||e[48]!==c||e[49]!==b||e[50]!==d?(X=P&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),n.jsx(ms,{id:"new-page-template",value:b,onChange:k,templates:d??[],disabled:a})]}),e[46]=a,e[47]=P,e[48]=c,e[49]=b,e[50]=d,e[51]=X):X=e[51];let ee;e[52]!==K?(ee=K&&n.jsx("p",{className:"text-xs text-destructive",children:K}),e[52]=K,e[53]=ee):ee=e[53];let J;e[54]!==I||e[55]!==q||e[56]!==X||e[57]!==ee?(J=n.jsxs("div",{className:"space-y-4 py-4",children:[I,q,X,ee]}),e[54]=I,e[55]=q,e[56]=X,e[57]=ee,e[58]=J):J=e[58];let ue;e[59]!==s?(ue=()=>s(!1),e[59]=s,e[60]=ue):ue=e[60];let re;e[61]!==c?(re=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=re):re=e[62];let G;e[63]!==a||e[64]!==ue||e[65]!==re?(G=n.jsx(Je,{type:"button",variant:"outline",onClick:ue,disabled:a,children:re}),e[63]=a,e[64]=ue,e[65]=re,e[66]=G):G=e[66];let ie;e[67]!==a||e[68]!==p||e[69]!==g?(ie=!p.trim()||!g.trim()||a,e[67]=a,e[68]=p,e[69]=g,e[70]=ie):ie=e[70];let xe;e[71]!==a||e[72]!==c?(xe=a?n.jsxs(n.Fragment,{children:[n.jsx(kt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=a,e[72]=c,e[73]=xe):xe=e[73];let me;e[74]!==ie||e[75]!==xe?(me=n.jsx(Je,{type:"submit",disabled:ie,children:xe}),e[74]=ie,e[75]=xe,e[76]=me):me=e[76];let te;e[77]!==G||e[78]!==me?(te=n.jsxs(Ks,{children:[G,me]}),e[77]=G,e[78]=me,e[79]=te):te=e[79];let ae;e[80]!==W||e[81]!==J||e[82]!==te||e[83]!==O?(ae=n.jsx(Zn,{className:"sm:max-w-md",children:n.jsxs("form",{onSubmit:W,children:[O,J,te]})}),e[80]=W,e[81]=J,e[82]=te,e[83]=O,e[84]=ae):ae=e[84];let be;return e[85]!==j||e[86]!==r||e[87]!==ae?(be=n.jsx(er,{open:r,onOpenChange:j,children:ae}),e[85]=j,e[86]=r,e[87]=ae,e[88]=be):be=e[88],be}function Zo(t){const e=pe.c(29),{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,blockKey:a}=t,c=Ce();let h;e[0]!==o||e[1]!==r||e[2]!==s?(h={orgSlug:r,virtualMcpId:s,branch:o},e[0]=o,e[1]=r,e[2]=s,e[3]=h):h=e[3];const p=Wn(h);let f;e[4]!==p?(f=hs((x,P)=>p.mutate({blockKey:x,data:P})),e[4]=p,e[5]=f):f=e[5];const E=f;let g;e[6]!==a||e[7]!==l?(g=fs(l,a),e[6]=a,e[7]=l,e[8]=g):g=e[8];const{resolveType:w,props:b,title:k}=g;if(!w){let x;e[9]!==c?(x=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=x):x=e[10];let P;return e[11]!==x?(P=n.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:x}),e[11]=x,e[12]=P):P=e[12],P}const N=`loader:${a}`;let y;e[13]!==a||e[14]!==w||e[15]!==k?(y={mode:"saved",blockKey:a,resolveType:w,title:k},e[13]=a,e[14]=w,e[15]=k,e[16]=y):y=e[16];let S;return e[17]!==o||e[18]!==l||e[19]!==d||e[20]!==r||e[21]!==u||e[22]!==b||e[23]!==p.isPending||e[24]!==E||e[25]!==N||e[26]!==y||e[27]!==s?(S=n.jsx(ps,{orgSlug:r,virtualMcpId:s,branch:o,previewUrl:u,meta:d,decofile:l,kind:"loaders",target:y,initialValue:b,isCreating:p.isPending,onCreate:ei,onSaveReferencedBlock:E,showRun:!1},N),e[17]=o,e[18]=l,e[19]=d,e[20]=r,e[21]=u,e[22]=b,e[23]=p.isPending,e[24]=E,e[25]=N,e[26]=y,e[27]=s,e[28]=S):S=e[28],S}async function ei(){}function ti(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function An(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:ti(t.error)}}function ni(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 ri(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=ni(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const r=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return r&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(o=>o.status==="error"&&!o.hasData&&o.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:r?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const si="https://github.com/decocms/blocks";function oi(){const t=pe.c(14),e=Ce();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(es,{size:48,className:"text-muted-foreground"}),t[0]=r):r=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=t[2];let o;t[3]!==e?(o=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=o):o=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Hn,{size:14}),t[7]=d):d=t[7];let l;t[8]!==u?(l=n.jsx(Je,{size:"sm",asChild:!0,children:n.jsxs("a",{href:si,target:"_blank",rel:"noreferrer",children:[u,d]})}),t[8]=u,t[9]=l):l=t[9];let a;return t[10]!==s||t[11]!==o||t[12]!==l?(a=n.jsx(Xt,{className:"h-full w-full",image:r,title:s,description:o,actions:l}),t[10]=s,t[11]=o,t[12]=l,t[13]=a):a=t[13],a}function ii(t){const e=pe.c(15),{source:r,onRetry:s}=t,o=Ce();let u;e[0]!==r||e[1]!==o?(u=o(r==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=r,e[1]=o,e[2]=u):u=e[2];const d=u;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Us,{size:48,className:"text-muted-foreground"}),e[3]=l):l=e[3];let a;e[4]!==o?(a=o("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=o,e[5]=a):a=e[5];let c;e[6]!==o?(c=o("mainPanelTabs.blocksTabStates.retry"),e[6]=o,e[7]=c):c=e[7];let h;e[8]!==s||e[9]!==c?(h=n.jsx(Je,{variant:"outline",size:"sm",onClick:s,children:c}),e[8]=s,e[9]=c,e[10]=h):h=e[10];let p;return e[11]!==d||e[12]!==a||e[13]!==h?(p=n.jsx(Xt,{image:l,title:a,description:d,actions:h}),e[11]=d,e[12]=a,e[13]=h,e[14]=p):p=e[14],p}const ai=v.lazy(()=>$r(()=>import("./sections-editor-B_t9OrnC.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])).then(t=>({default:t.SectionsEditor})));function Mn(t){const e=pe.c(49),{virtualMcpId:r,externalSelection:s,onViewJsonFile:o}=t,u=s===void 0?null:s,{org:d}=Gt(),{currentBranch:l,taskId:a}=St(),c=zn(),h=Jt(),p=rr(),f=c.lifecycle.phase==="running",E=h.previewUrl;let g;e[0]!==l||e[1]!==d||e[2]!==E||e[3]!==a||e[4]!==r?(g=l?{orgSlug:d.slug,virtualMcpId:r,branch:l,threadId:a??null,previewUrl:E}:null,e[0]=l,e[1]=d,e[2]=E,e[3]=a,e[4]=r,e[5]=g):g=e[5];const w=g;let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const k=Yt(w,b);let N;e[8]!==f?(N={fetchEnabled:f},e[8]=f,e[9]=N):N=e[9];const y=Vn(w,N),S=ri({lifecyclePhase:c.lifecycle.phase,decofile:An(k),meta:An(y),hasEditableContent:Ps(k.data,y.data),fastPreviewActive:Kn(r).runtime==="cms"}),x=li;if(S.kind==="loading"){let L;return e[10]===Symbol.for("react.memo_cache_sentinel")?(L=x(n.jsx(Ir,{})),e[10]=L):L=e[10],L}if(S.kind==="empty"){let L;return e[11]===Symbol.for("react.memo_cache_sentinel")?(L=x(n.jsx(oi,{})),e[11]=L):L=e[11],L}if(S.kind==="error"){let L;e[12]!==k||e[13]!==h||e[14]!==y||e[15]!==S.source?(L=()=>{if(S.source==="sandbox"){h.retry();return}Promise.all([k.refetch(),y.refetch()])},e[12]=k,e[13]=h,e[14]=y,e[15]=S.source,e[16]=L):L=e[16];const Z=L;let Y;return e[17]!==Z||e[18]!==S.source?(Y=x(n.jsx(ii,{source:S.source,onRetry:Z})),e[17]=Z,e[18]=S.source,e[19]=Y):Y=e[19],Y}let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=L=>x(n.jsx("div",{className:"h-full min-h-0",children:L})),e[20]=P):P=e[20];const M=P,j=p.state.target;if(j?.kind==="loader"&&k.data&&y.data){const L=l??"",Z=E??null;let Y;return e[21]!==k.data||e[22]!==y.data||e[23]!==d.slug||e[24]!==L||e[25]!==Z||e[26]!==j.key||e[27]!==r?(Y=M(n.jsx(Zo,{orgSlug:d.slug,virtualMcpId:r,branch:L,previewUrl:Z,meta:y.data,decofile:k.data,blockKey:j.key})),e[21]=k.data,e[22]=y.data,e[23]=d.slug,e[24]=L,e[25]=Z,e[26]=j.key,e[27]=r,e[28]=Y):Y=e[28],Y}let B;e[29]!==l||e[30]!==d.slug||e[31]!==j||e[32]!==r?(B=j||!l?null:Jn(Yn(d.slug,r,l)),e[29]=l,e[30]=d.slug,e[31]=j,e[32]=r,e[33]=B):B=e[33];const W=B;let K="/",R=null,O=null;j?.kind==="page"?(K=j.path,R=j.key):j?.kind==="section"?O=j.key:W&&(K=W.path,R=W.pageKey);const $=R?`page:${R}`:O?`section:${O}`:`path:${K}`;let V;e[34]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("div",{className:"h-full flex items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}),e[34]=V):V=e[34];const D=l??"",U=E??void 0,A=O?null:u,I=!!R&&p.state.editSeoPageKey===R;let Q;return e[35]!==O||e[36]!==R||e[37]!==K||e[38]!==$||e[39]!==o||e[40]!==d.slug||e[41]!==A||e[42]!==I||e[43]!==D||e[44]!==U||e[45]!==r||e[46]!==p.consumeEditSeo||e[47]!==p.setVariantOverride?(Q=M(n.jsx(v.Suspense,{fallback:V,children:n.jsx(ai,{orgSlug:d.slug,virtualMcpId:r,branch:D,previewReady:!0,previewUrl:U,currentPath:K,activePageBlockKey:R,activeGlobalBlockKey:O,externalSelection:A,initialEditSeo:I,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onViewJsonFile:o},$)})),e[35]=O,e[36]=R,e[37]=K,e[38]=$,e[39]=o,e[40]=d.slug,e[41]=A,e[42]=I,e[43]=D,e[44]=U,e[45]=r,e[46]=p.consumeEditSeo,e[47]=p.setVariantOverride,e[48]=Q):Q=e[48],Q}function li(t){return n.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Fn(t){const e=pe.c(44),{virtualMcpId:r,pageKey:s,onClose:o,ref:u}=t,d=Ce(),{org:l}=Gt(),{currentBranch:a,taskId:c}=St(),p=Jt().previewUrl;let f;e[0]!==a||e[1]!==l.slug||e[2]!==p||e[3]!==c||e[4]!==r?(f=a?{orgSlug:l.slug,virtualMcpId:r,branch:a,threadId:c??null,previewUrl:p}:null,e[0]=a,e[1]=l.slug,e[2]=p,e[3]=c,e[4]=r,e[5]=f):f=e[5];const g=Yt(f),w=a??"";let b;e[6]!==l.slug||e[7]!==w||e[8]!==r?(b={orgSlug:l.slug,virtualMcpId:r,branch:w},e[6]=l.slug,e[7]=w,e[8]=r,e[9]=b):b=e[9];const{save:k,flush:N}=gs(b),y=g.data?.[s],S=g.data===void 0&&g.isLoading,x=g.data!==void 0&&y===void 0,P=!a||x||S;let M;e[10]!==y?(M=y===void 0?"":JSON.stringify(y,null,2),e[10]=y,e[11]=M):M=e[11];const j=M;let B;e[12]!==s||e[13]!==P||e[14]!==k?(B=Q=>{if(P)return;let L;try{L=JSON.parse(Q)}catch{return}L===null||typeof L!="object"||Array.isArray(L)||k(s,L)},e[12]=s,e[13]=P,e[14]=k,e[15]=B):B=e[15];const W=B;let K;e[16]!==N?(K=()=>({flush:N}),e[16]=N,e[17]=K):K=e[17],v.useImperativeHandle(u,K);let R;e[18]!==d?(R=d("sectionsEditor.pageJsonDialog.titleShort"),e[18]=d,e[19]=R):R=e[19];let O;e[20]!==R?(O=n.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:R}),e[20]=R,e[21]=O):O=e[21];let $;e[22]!==d?($=d("sectionsEditor.pageJsonDialog.close"),e[22]=d,e[23]=$):$=e[23];let V;e[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Hs,{size:14}),e[24]=V):V=e[24];let D;e[25]!==o||e[26]!==$?(D=n.jsx(Je,{variant:"ghost",size:"icon",onClick:o,"aria-label":$,className:"size-7 shrink-0",children:V}),e[25]=o,e[26]=$,e[27]=D):D=e[27];let U;e[28]!==D||e[29]!==O?(U=n.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[O,D]}),e[28]=D,e[29]=O,e[30]=U):U=e[30];let A;e[31]!==g.data||e[32]!==N||e[33]!==j||e[34]!==S||e[35]!==x||e[36]!==s||e[37]!==P||e[38]!==W||e[39]!==d?(A=S?n.jsx("div",{className:"flex flex-1 items-center justify-center",children:n.jsx(kt,{className:"size-5 text-muted-foreground"})}):x?n.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(Ws,{code:j,language:"json",readOnly:P,height:"100%",onChange:Q=>W(Q??""),onSave:Q=>{W(Q),N()}},`${s}:${g.data===void 0?"loading":"ready"}`)}),e[31]=g.data,e[32]=N,e[33]=j,e[34]=S,e[35]=x,e[36]=s,e[37]=P,e[38]=W,e[39]=d,e[40]=A):A=e[40];let I;return e[41]!==U||e[42]!==A?(I=n.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[U,A]}),e[41]=U,e[42]=A,e[43]=I):I=e[43],I}function dr(t){return t.contentEditingEnabled&&!t.isMobile}function ci(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function di(t){return dr({contentEditingEnabled:sr(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function ui(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const mi=500,fi={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Bn=1,Ut=["desktop","mobile","tablet"],$n={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function In(t,e){try{const r=new URL(t,window.location.href);return r.searchParams.set("deviceHint",e),r.href}catch{return t}}function pi(t){if(!t)return null;try{const e=new URL(t,window.location.href);return e.searchParams.set("__decoFBT","0"),e.searchParams.set("__deco_ssr","1"),e.href}catch{return t}}function bt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ht(t,e){try{return new URL(t,e).href}catch{return null}}function hi(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const r={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:r,effective:r.url}}return{pin:t,effective:t?.url??null}}function gi(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function vi(t,e,r){const s=t.toLowerCase(),o=e.toLowerCase(),u=o.split("/").filter(Boolean),d=a=>{if(a===r)return 100;const c=a.indexOf(r);if(c===-1)return 0;let h=40;return c===0?h+=30:/[\s/-]/.test(a[c-1]??"")&&(h+=20),h+=Math.round(r.length/a.length*20),h};let l=Math.max(d(s),d(o));return u.at(-1)===r?l=Math.max(l,95):u.includes(r)&&(l=Math.max(l,90)),l}function xi(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function bi({virtualMcpId:t}){const e=Ce(),r=As(),s=Qr(),{currentBranch:o,taskId:u,virtualMcpId:d}=St(),l=rr(),a=Wr(d===t?t:null),c=Kn(t),h=Vs(a?.metadata?.ui?.layout??null),p=sr(h),f=dr({contentEditingEnabled:p,isMobile:s}),[E,g]=v.useState(()=>di({cmsMode:h,isMobile:s})),[w,b]=v.useState("desktop"),[k,N]=v.useState(null),[y,S]=v.useState(null),x=v.useRef(null),P=v.useRef(null),[M,j]=v.useState(!1),B=v.useRef(null),W=()=>{B.current?.flush(),j(!1)},K=()=>j(i=>(i&&B.current?.flush(),!i)),[R,O]=v.useState({width:0,height:0}),[$,V]=v.useState(null),[D,U]=v.useState(!1),[A,I]=v.useState(""),Q=v.useRef(null),[L,Z]=v.useState(!1),[Y,de]=v.useState(),[q,X]=v.useState(null),[ee,J]=v.useState(null),[ue,re]=v.useState(null),[G,ie]=v.useState("/"),[xe,me]=v.useState(null),[te,ae]=v.useState({}),[be,ne]=v.useState(!1),le=v.useRef(null),se=()=>{ne(!0),le.current&&clearTimeout(le.current),le.current=setTimeout(()=>ne(!1),15e3)},Pe=()=>{le.current&&(clearTimeout(le.current),le.current=null),ne(!1)},{org:Re}=Gt(),Be=zn(),ge=Jt(),Ye=ge.vmEntry,Oe=ge.previewUrl,Te=Be.lifecycle.phase,je=Te==="running",$e=a?.id===t?Yr(a.metadata):null,De=a?.id===t&&c.runtime==="cms",Ae=c.projectDefault==="cms",ve=Cs({sandboxUrl:Oe,previewServerUrl:$e,fastPreviewActive:De}),Le=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null,previewUrl:Oe}:null,He=Yt(Le,{fetchEnabled:je}),H=Vn(Le,{fetchEnabled:je}),T=He.data,fe=H.data,Me=T?js(T).sort((i,m)=>i.name.localeCompare(m.name)):[],Pt=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o}:null,Qe=Qo(Pt),jt=T&&fe?Es(T,fe):[],en=T&&fe?vs(fe,T,"loaders"):[],We=A?(()=>{const i=A.toLowerCase();return Me.map(m=>({page:m,score:vi(m.name,m.path,i)})).filter(({score:m})=>m>0).sort((m,C)=>C.score-m.score||m.page.path.length-C.page.path.length).map(({page:m})=>m)})():Me,rt=jt.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.name.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),tn=f?en:[],Et=tn.filter(i=>{if(!A)return!0;const m=A.toLowerCase();return i.title.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),nn=ee?en.find(i=>i.key===ee)??null:null,Ee=Qt,Nt=q||ee?null:Ns(Me,G,xe),Ct=q?q.name:nn?.title??Nt?.name,z=Nt?.key??null,st=Nt?.path??null,Ve=(z?te[z]:void 0)??{},ye=Fe(G,Ve),Rt={};if(je&&Oe&&fe&&T){const i=xs(fe,"loaders"),m=z?T[z]:void 0,C=wo(m,T,oe=>i.has(oe)),_=go(C);for(const oe of wt(G)){if(oe.type!=="param")continue;const _e=fo(G,oe.name,C),ke=bo(_e,i,_);ke.length>0&&(Rt[oe.name]=ke)}}const ot=t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,threadId:u??null}:null,rn=T&&z?bs(T,z,0):[],sn=T?ys(rn,T):[],Tt=sn.map(i=>i.isSavedBlock?i.label:""),Lt=sn.map(i=>i.isSavedBlock?"global":i.isMultivariate?"variant":"normal"),_t=rn.map(i=>Vt(i,T??{})),on=v.useRef(null),Ne=v.useRef(null),ur=Be.status.state==="paused",Ot=Be.phase,an=ws({claimPhase:Ot,lifecycle:Be.lifecycle}),Ie=ge.previewState,mr=ge.userStopped,fr=Os(Re.slug,t??"",o??""),{url:ze}=_s(De&&t&&o?{orgSlug:Re.slug,virtualMcpId:t,branch:o,previewServerUrl:$e??null,path:ye}:null),pr=Ae&&c.runtime==="sandbox",F=Xs({previewState:Ie,progressStatus:an.status,previewServerUrl:$e,fastPreviewActive:De,fastPreviewReady:!!ze,codingSession:pr}),Xe=F.mode!=="none",ln=F.mode==="production"&&F.iframeBase?bt(F.iframeBase):null,hr=!r,Ze=F.mode==="production"?ln:bt(Oe),gr=a?.id===t&&a.metadata?.fastPreviewInPlace===!0,et=F.mode==="production"&&De&&gr&&f&&E==="blocks",cn=v.useRef(null),{pin:vr,effective:xr}=hi(cn.current,{inPlaceRenderActive:et,draftPreviewUrl:ze,resolvedPath:ye});cn.current=vr;const we=pi(F.mode==="sandbox"?ht(In(ue??Ht(ye,F.iframeBase)??F.iframeBase,w),l.state.variantOverride??[]):F.mode==="production"&&hr?ht(In(Rs(ue??xr??Ht(ye,F.iframeBase)??F.iframeBase,F.showWakingPill?Ts:null),w),l.state.variantOverride??[]):null);v.useEffect(()=>{},[r,ln,$]);const dn="sandbox.preview.openInNewTab",un=ze??(F.iframeBase?Ht(ye,F.iframeBase):null),br=F.mode==="production"?un?ht(un,l.state.variantOverride??[]):null:we??F.iframeBase,yr=async()=>{const i=br;if(i){window.open(i,"_blank","noopener");return}},it=t&&o?Yn(Re.slug,t,o):null,at=i=>{it&&Ds(it,i)},ce=l.state.target;v.useEffect(()=>{if(!(!ce||!ve||!fe))if(ce.kind==="page"){const i=te[ce.key]??{};Ne.current=Fe(ce.path,i),X(null),J(null),re(null),me(ce.key),ie(ce.path),at({path:ce.path,pageKey:ce.key,params:i})}else if(ce.kind==="loader")Ne.current=null,X(null),J(ce.key),re(null);else{const i=jt.find(m=>m.key===ce.key);if(i){Ne.current=null;const m=Pn(fe);J(null),X(i),re(jn(ve,m,i.key))}}},[ce,ve,fe,te]),v.useEffect(()=>{!z||st===null||ce?.kind==="page"&&ce.key===z&&ce.path===st||l.selectTarget({kind:"page",key:z,path:st})},[z,st,ce]);const[mn,wr]=v.useState(null);if(Ie.kind==="iframe"&&mn!==Ie.previewUrl){const i=mn!==null;wr(Ie.previewUrl);const m=it?Jn(it):null;if(m){if(Ne.current=Fe(m.path,m.params),ie(m.path),me(m.pageKey),re(null),X(null),J(null),m.pageKey&&Object.keys(m.params).length>0){const C=m.pageKey;ae(_=>({..._,[C]:m.params}))}}else i&&(Ne.current=null,ie("/"),re(null),me(null),X(null),J(null))}on.current=we;const fn=no({iframeRef:x,src:F.mode==="sandbox"?we:null,active:F.mode==="sandbox"}),pn=v.useRef(null);v.useEffect(()=>{if(!ze||!we||pn.current===ze)return;pn.current=ze;const i=x.current;i&&i.getAttribute("src")!==we&&(se(),i.src=we)},[ze,we]);const hn=()=>{const i=x.current?.contentWindow,m=Ze;if(!i||!m||!T||!z)return;const C=T[z];if(!C||typeof C!="object")return;const _=Ls({previewBaseUrl:m,pageBlock:C,decofile:T,path:ye,pathTemplate:G});if(!_)return;const oe=ht(_.src,l.state.variantOverride??[]);i.postMessage({type:"cms-editor::render",src:oe,body:_.body},m)},Dt=v.useRef(null);v.useEffect(()=>{if(!et||q||ee||!z||!T){Dt.current=null;return}const i={nav:JSON.stringify({page:z,path:ye,pathTemplate:G}),content:JSON.stringify(T)},m=gi(Dt.current,i);Dt.current=i,m&&hn()},[T,et,q,ee,z,ye,G]);const At=v.useRef(null);v.useEffect(()=>{if(!et||q||ee||!z||!T){At.current=null;return}const i=JSON.stringify(l.state.variantOverride??null),m=At.current;At.current={page:z,sig:i},!(!m||m.page!==z||m.sig===i)&&hn()},[l.state.variantOverride,et,q,ee,z]);const kr=!!t&&!!o&&!Be.notFound&&!mr&&!ur&&(Ot?.kind==="ready"||Te!=="idle"),he=ui({editingMode:E,sandboxDisplay:F.mode==="sandbox",blocksEditingEnabled:f});v.useEffect(()=>{const i=Ze;if(!i)return;const m=C=>{if(C.origin===i)if(C.data?.type==="visual-editor::element-clicked"){const _=ro.safeParse(C.data.payload);_.success&&N(_.data)}else if(C.data?.type==="cms-editor::section-clicked"){const _=io.safeParse(C.data.payload);_.success&&S({index:_.data.sectionIndex,seq:_.data.clickSeq})}else C.data?.type==="cms-editor::render-start"?se():C.data?.type==="cms-editor::render-end"?(Pe(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},i)):C.data?.type==="cms-editor::render-error"&&Pe()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[Ze,Tt,Lt,_t]);const gn=()=>{const i=x.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::activate",script:so},m)},Sr=()=>{const i=x.current?.contentWindow,m=bt(Oe);!i||!m||i.postMessage({type:"visual-editor::deactivate"},m)},Mt=()=>{const i=x.current?.contentWindow,m=Ze;!i||!m||(i.postMessage(F.mode==="production"?{type:"editor::inject",args:{script:Ln}}:{type:"visual-editor::activate",script:Ln},m),i.postMessage({type:"cms-editor::set-labels",labels:Tt,kinds:Lt,keys:_t},m))},Pr=()=>{const i=x.current?.contentWindow,m=Ze;!i||!m||i.postMessage({type:"cms-editor::deactivate"},m)},Ft=i=>{if(i==="blocks"&&!f)return;const m=E;!s&&i!==m&&(i==="blocks"?P.current?.resize("30%"):P.current?.collapse()),i!=="blocks"&&W(),g(i),N(null),S(null),i!=="blocks"&&J(null),m==="visual"&&Sr(),i==="visual"&&gn(),m==="blocks"&&i!=="blocks"&&Pr(),i==="blocks"&&Mt()},jr=()=>{Ft(ci(E,f))},Er=()=>{if(!x.current||!we)return;se();const i=x.current;i.src=we};qr(()=>{const i=x.current;if(!i)return;se();const m=document.activeElement,C=i.tabIndex;i.tabIndex=-1,i.style.pointerEvents="none",i.blur(),xi(i,on.current);let _;const oe=()=>{clearTimeout(_),i.tabIndex=C,i.style.pointerEvents="";const _e=document.activeElement;(!_e||_e===document.body||_e===i)&&m?.focus(),i.removeEventListener("load",oe)};i.addEventListener("load",oe),_=setTimeout(oe,3e3)});const Nr=()=>{const i=Ut.indexOf(w);b(Ut[(i+1)%Ut.length])},Bt=(i,m)=>{if(!z)return;const C=z,_={...Ve,[i]:m};Ne.current=Fe(G,_),ae(oe=>({...oe,[C]:_})),at({path:G,pageKey:C,params:_})},vn=Jo({iframeBase:F.iframeBase,resolvedPath:ye,activeGlobalSectionName:q?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),$t=i=>{const m=te[i.key]??{},C=Fe(i.path,m);(q||Ee(C)!==Ee(ye))&&se(),Ne.current=C,X(null),J(null),re(null),S(null),me(i.key),ie(i.path),at({path:i.path,pageKey:i.key,params:m}),l.selectTarget({kind:"page",key:i.key,path:i.path})},Cr=i=>{if(!ve||!fe){yn.error(e("sandbox.preview.previewMetadataNotReady"));return}se(),Ne.current=null;const m=Pn(fe),C=jn(ve,m,i.key);X(i),J(null),re(C),S(null),l.selectTarget({kind:"section",key:i.key})},Rr=i=>{f&&(X(null),J(i.key),re(null),Ft("blocks"),l.selectTarget({kind:"loader",key:i.key}))},Tr=async({name:i,path:m,templateKey:C})=>{if(!t||!o)return;const _=Gn(m);if(_){de(_);return}const oe=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(Me.some(ke=>Ee(ke.path)===Ee(oe))){de(e("sandbox.preview.pageAlreadyExists",{path:oe}));return}let _e;if(C&&(_e=T?.[C],!_e)){de(e("sandbox.preview.templateNoLongerExists"));return}de(void 0);try{const ke=await Qe.mutateAsync({name:i,path:oe,template:_e});Z(!1),yn.success(e("sandbox.preview.pageCreated",{name:i})),await Jr(mi),$t({key:ke.key,name:ke.name,path:ke.path}),Ft("blocks")}catch(ke){de(ke instanceof Error?ke.message:e("sandbox.preview.failedToCreatePage"))}},xn=Xe&&(kr||F.mode==="production"),Lr=Yo({showPreviewToolbar:xn,contentEditingEnabled:p}),lt=xn?n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Er,"aria-label":e("sandbox.preview.refresh"),children:n.jsx(zr,{size:16})})}),n.jsx(ft,{side:"bottom",children:e("sandbox.preview.refresh")})]}),Lr?n.jsxs("div",{ref:Q,className:"relative min-w-0 w-64 shrink",children:[n.jsxs("div",{className:"flex h-7 w-full min-w-0 items-center rounded-md border border-border bg-background transition-colors duration-200 hover:bg-accent",children:[n.jsxs("div",{className:"flex h-full min-w-0 flex-1 cursor-pointer items-center gap-1 pl-2 pr-1",onClick:()=>U(i=>!i),children:[q&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[n.jsx(wn,{size:11}),"Global"]}),nn&&n.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground",children:[n.jsx(Sn,{size:11}),e("sandbox.preview.loaderBadge")]}),n.jsx("span",{className:Ke("text-[13px] font-medium text-foreground",Ct==null?"min-w-0 flex-1 truncate":"min-w-0 shrink truncate"),children:Ct??vn}),!q&&!ee&&Ct!=null&&G&&n.jsx("span",{className:"flex min-w-0 flex-1 items-center overflow-hidden whitespace-nowrap text-[12px] text-muted-foreground",children:wt(G).map((i,m)=>{if(i.type==="text")return n.jsx("span",{className:Ke(m===0?"min-w-0 truncate":"shrink-0"),children:i.text},`text-${m}`);const C=Rt[i.name];return C&&ot?n.jsx(Mo,{sources:C,template:G,paramName:i.name,value:Ve[i.name]??"",sandboxRef:ot,onCommit:_=>Bt(i.name,_)},`${z}:${i.name}`):n.jsx(qo,{name:i.name,value:Ve[i.name]??"",onCommit:_=>Bt(i.name,_)},`${z}:${i.name}`)})})]}),n.jsx("button",{type:"button",className:"flex h-full shrink-0 items-center pl-1 pr-2",onClick:()=>U(i=>!i),"aria-label":e("sandbox.preview.choosePage"),"aria-expanded":D,children:n.jsx(Xr,{size:12,className:Ke("shrink-0 text-muted-foreground transition-transform",D&&"rotate-180")})})]}),D&&n.jsxs("div",{className:"absolute left-1/2 top-full z-50 mt-1.5 w-[500px] max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-lg border bg-popover shadow-lg",children:[n.jsxs("div",{className:"px-2 h-10 flex items-center gap-2 border-b",children:[n.jsx(is,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),n.jsx("input",{type:"text",value:A,onChange:i=>I(i.target.value),onKeyDown:i=>{if(i.key!=="Enter")return;const m=A.trim();if(!m)return;const C=We.find(_=>Ee(_.path)===Ee(m));C&&(i.preventDefault(),U(!1),I(""),$t(C))},placeholder:e("sandbox.preview.searchPagesAndComponents"),className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground",autoFocus:!0})]}),n.jsx("div",{className:"p-1.5 border-b",children:n.jsxs("button",{type:"button",className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:i=>{i.preventDefault(),U(!1),I(""),de(void 0),Z(!0)},children:[n.jsx(os,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"flex-1 font-medium",children:e("sandbox.preview.createNewPage")})]})}),We.length===0&&rt.length===0&&Et.length===0?n.jsx("div",{className:"px-4 py-5 text-center text-xs text-muted-foreground",children:Me.length===0&&jt.length===0&&tn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}):n.jsxs("div",{className:"max-h-80 overflow-y-auto overscroll-contain",children:[We.length>0&&n.jsx("div",{className:"p-1.5",children:We.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),U(!1),I(""),$t(i)},children:[n.jsx(ts,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.path})]},i.key))}),rt.length>0&&n.jsxs("div",{className:Ke("p-1.5",We.length>0&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalComponents")}),rt.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),U(!1),I(""),Cr(i)},children:[n.jsx(wn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.name}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]}),Et.length>0&&n.jsxs("div",{className:Ke("p-1.5",(We.length>0||rt.length>0)&&"border-t"),children:[n.jsx("div",{className:"px-3 py-2 text-xs font-medium text-muted-foreground",children:e("sandbox.preview.globalLoaders")}),Et.map(i=>n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",onMouseDown:m=>{m.preventDefault(),U(!1),I(""),Rr(i)},children:[n.jsx(Sn,{size:16,className:"shrink-0 text-muted-foreground"}),n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:i.title}),n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:i.resolveType.split("/").pop()?.replace(/\.tsx?$/,"")})]},i.key))]})]})]})]}):n.jsx("span",{className:"min-w-0 truncate px-2 text-[13px] text-muted-foreground",children:vn}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{"aria-label":e(dn),onClick:()=>{yr()},children:n.jsx(Hn,{size:16})})}),n.jsx(ft,{side:"bottom",children:e(dn)})]})]}):null,_r=lt?n.jsx("div",{className:"flex min-w-0 items-center gap-0.5",children:lt}):null,Or=F.mode==="sandbox",ct=fi[w],dt=w==="desktop"&&(R.width===0||R.width>=ct.width+2*Bn),bn=dt?1:Math.min(R.width>0?R.width/(ct.width+2*Bn):1,1),Dr=dt?{width:"100%",height:"100%"}:{width:`${ct.width}px`,height:R.height>0?`${R.height/bn}px`:`${ct.height}px`,transform:`scale(${bn})`,transformOrigin:"top center"},Ar=Xe?n.jsx("div",{className:"absolute bottom-4 left-1/2 z-20 -translate-x-1/2 scale-125",children:n.jsxs("div",{className:"flex items-center gap-0.5 rounded-full border bg-background/60 p-1 shadow-lg backdrop-blur-md",children:[Or&&n.jsxs(n.Fragment,{children:[n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:jr,"aria-pressed":he==="visual","aria-label":e("sandbox.preview.visualEditor"),active:he==="visual",className:"rounded-full",children:n.jsx(kn,{size:16})})}),n.jsx(ft,{side:"top",children:e("sandbox.preview.visualEditor")})]}),n.jsx("div",{className:"mx-0.5 h-5 w-px bg-border"})]}),n.jsxs(ut,{children:[n.jsx(mt,{asChild:!0,children:n.jsx(pt,{onClick:Nr,"aria-label":e($n[w]),className:"rounded-full",children:n.jsxs("span",{className:"flex items-center justify-center animate-device-icon-pop",children:[w==="mobile"&&n.jsx(ns,{size:16}),w==="tablet"&&n.jsx(rs,{size:16}),w==="desktop"&&n.jsx(ss,{size:16})]},w)})}),n.jsx(ft,{side:"top",children:e($n[w])})]})]})}):null,Mr=!!ee&&he==="blocks";return n.jsxs("div",{className:"flex flex-col w-full h-full",children:[ot&&Object.entries(Rt).map(([i,m])=>(Ve[i]??"")===""?n.jsx(Wo,{sources:m,template:G,paramName:i,sandboxRef:ot,onFill:C=>Bt(i,C)},`${z}:${i}`):null),n.jsx(as.Topbar.Center.Portal,{fallback:lt&&n.jsxs("div",{className:"@container/panel-header relative flex h-12 shrink-0 items-center gap-2 border-b border-border/60 px-3 md:px-4",children:[n.jsx("div",{className:"flex-1"}),n.jsx("div",{className:"flex min-w-0 shrink items-center justify-center gap-0.5",children:lt}),n.jsx("div",{className:"flex-1"})]}),children:_r}),n.jsx("div",{className:"flex-1 overflow-hidden",children:Mr?n.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K}),M&&z&&n.jsx("div",{className:"absolute inset-0 z-10",children:n.jsx(Fn,{ref:B,virtualMcpId:t,pageKey:z,onClose:W})})]}):n.jsxs(Nn,{orientation:"horizontal",disabled:he!=="blocks",children:[n.jsx(gt,{ref:P,id:"preview-blocks-editor",defaultSize:he==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:he==="blocks"&&n.jsx(Mn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:K})}),he==="blocks"&&n.jsx(Cn,{withHandle:!0}),n.jsx(gt,{id:"preview-canvas",defaultSize:he==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden",children:n.jsxs(Nn,{orientation:"horizontal",disabled:!(M&&z),children:[M&&z&&n.jsxs(n.Fragment,{children:[n.jsx(gt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:n.jsx(Fn,{ref:B,virtualMcpId:t,pageKey:z,onClose:W})}),n.jsx(Cn,{withHandle:!0})]}),n.jsx(gt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:n.jsxs("div",{ref:i=>{if(!i)return;const m=()=>O(_=>_.width===i.clientWidth&&_.height===i.clientHeight?_:{width:i.clientWidth,height:i.clientHeight});m();const C=new ResizeObserver(m);return C.observe(i),()=>C.disconnect()},className:Ke("h-full relative overflow-clip flex justify-center",Xe&&!dt&&"bg-muted/30"),children:[(be||fr)&&Xe&&n.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:n.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),F.showBlockingOverlay&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"starting",progress:an,claimPhase:Ot})}),Ie.kind==="suspended"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"suspended",onResume:ge.resume})}),Ie.kind==="errored"&&n.jsx("div",{className:"absolute inset-0 z-30",children:n.jsx(zt,{kind:"errored",error:Ie.error,onRetry:ge.retry,connectionsHref:`/${Re.slug}/settings/connections`})}),F.showWakingPill&&n.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[n.jsx(kt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"flex flex-col gap-0.5",children:[n.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),n.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),he==="visual"&&!k&&n.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[n.jsx(kn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),he==="visual"&&k&&n.jsx(co,{element:k,onDismiss:()=>N(null)}),Ar,Xe&&we&&n.jsx("div",{className:Ke("shrink-0",!dt&&"border-x border-border bg-background shadow-sm"),style:Dr,children:n.jsx("iframe",{ref:x,src:we,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:fn.handleError,onLoad:()=>{if(fn.handleLoad(),Pe(),F.mode!=="sandbox"){F.mode==="production"&&!F.showWakingPill&&he==="blocks"&&Mt();return}if(Kr("vm_preview_loaded",{view_mode:he,vm_id:Ye?.sandboxHandle??null}),!q)try{const i=x.current?.contentWindow?.location?.pathname;if(!i)return;const m=Ne.current;if(m!==null&&(Ne.current=null,Ee(i)!==Ee(m))||Ee(i)===Ee(ye))return;ie(i),at({path:i,pageKey:xe,params:Ve})}catch{}he==="visual"&&gn(),he==="blocks"&&Mt()}},F.iframeBase)})]})})]})})]})}),n.jsx(Xo,{open:L,onOpenChange:Z,isPending:Qe.isPending,error:Y,templates:Me,onSubmit:Tr})]})}function yi(t){const e=pe.c(22),{virtualMcpId:r}=t,s=Ce(),o=Vr(r),{activeTask:u,taskId:d,currentBranch:l}=St(),a=Js(d),[c,h]=v.useState(!1);if(Gs({threadId:d,sandboxBranch:u?.branch??l,agentHasRepo:Kt(o?.metadata),threadHasRepo:Kt(a)||Kt(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:n.jsx(Rn,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let g;e[1]!==s?(g=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=g):g=e[2];let w;e[3]!==s?(w=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=w):w=e[4];let b,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),k=n.jsx(Rn,{className:"size-4"}),e[5]=b,e[6]=k):(b=e[5],k=e[6]);let N;e[7]!==s?(N=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=N):N=e[8];let y;e[9]!==N?(y=n.jsxs(Je,{onClick:b,children:[k,N]}),e[9]=N,e[10]=y):y=e[10];let S;e[11]!==g||e[12]!==w||e[13]!==y?(S=n.jsx(Xt,{className:"h-full",image:E,title:g,description:w,actions:y}),e[11]=g,e[12]=w,e[13]=y,e[14]=S):S=e[14];let x;e[15]!==c?(x=n.jsx(qs,{open:c,onOpenChange:h,mode:"agent"}),e[15]=c,e[16]=x):x=e[16];let P;return e[17]!==S||e[18]!==x?(P=n.jsxs(n.Fragment,{children:[S,x]}),e[17]=S,e[18]=x,e[19]=P):P=e[19],P}let f;return e[20]!==r?(f=n.jsx(bi,{virtualMcpId:r}),e[20]=r,e[21]=f):f=e[21],f}function td(){const t=pe.c(2),e=Ys();let r;return t[0]!==e?(r=n.jsx(Ur,{tabId:"site-editor",children:n.jsx(yi,{virtualMcpId:e})}),t[0]=e,t[1]=r):r=t[1],r}export{td as default};
|