decocms 4.587.0 → 4.587.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-D_6mZhd3.js → AlertCircle-gyZP8TIO.js} +1 -1
- package/dist/client/assets/{AreaChart-DQSuG1yE.js → AreaChart-BmP0ImmP.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DjgSByoQ.js → ArrowLeft-BSzt3fBA.js} +1 -1
- package/dist/client/assets/{ArrowRight-Du-vqw_x.js → ArrowRight-BF8V67fk.js} +1 -1
- package/dist/client/assets/{ArrowUp-Hd6A0uf9.js → ArrowUp-DYnF34lU.js} +1 -1
- package/dist/client/assets/{BookOpen01-gL1m_4-g.js → BookOpen01-CpYcxx0H.js} +1 -1
- package/dist/client/assets/{CartesianChart-ghS8jWki.js → CartesianChart-Cflx4Yj4.js} +1 -1
- package/dist/client/assets/{CategoricalChart-FLgBKuSu.js → CategoricalChart-CIY6jBUR.js} +1 -1
- package/dist/client/assets/{CheckCircle-12UwMq4H.js → CheckCircle-CyybvOiK.js} +1 -1
- package/dist/client/assets/{ChevronDown-DeUpalBN.js → ChevronDown-DldgAfZA.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DO-HHLr6.js → ChevronSelectorVertical-BbGwltuJ.js} +1 -1
- package/dist/client/assets/{ChevronUp-BzeZGyJH.js → ChevronUp-Bt9-G08q.js} +1 -1
- package/dist/client/assets/{CreditCard01-C7IRKQGq.js → CreditCard01-vIJuQM5M.js} +1 -1
- package/dist/client/assets/{Eye-C1-H4NKN.js → Eye-BLpLvSpN.js} +1 -1
- package/dist/client/assets/{File02-CFyU1pAb.js → File02-EV4Uhu5z.js} +1 -1
- package/dist/client/assets/{Globe04-DEUqOfwK.js → Globe04-DzGa73Hy.js} +1 -1
- package/dist/client/assets/{Image01-D1EDWKnx.js → Image01-BqCHFUEp.js} +1 -1
- package/dist/client/assets/{Key01-tELScC1h.js → Key01-KTk95wIy.js} +1 -1
- package/dist/client/assets/{LayoutLeft-551J-MO9.js → LayoutLeft-_2SG51dD.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BdgK-qQO.js → LinkBroken01-Br9NMWkB.js} +1 -1
- package/dist/client/assets/{MessageCircle01-DVvYPWC-.js → MessageCircle01-D170V1-p.js} +1 -1
- package/dist/client/assets/{Minus-CwITAxnt.js → Minus-D88-u0DO.js} +1 -1
- package/dist/client/assets/{Monitor01-Cj8V3TAw.js → Monitor01-Df3mZyNU.js} +1 -1
- package/dist/client/assets/{Play-R1uGwJ-1.js → Play-PdUxpWZE.js} +1 -1
- package/dist/client/assets/{Plus-B-S-SZ1j.js → Plus-BYodv7tE.js} +1 -1
- package/dist/client/assets/{ReferenceLine-DFNcBn1Q.js → ReferenceLine-DrwOzdWE.js} +1 -1
- package/dist/client/assets/{SearchMd-BIZLsFUb.js → SearchMd-Cuy8VOOG.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-bCe9ug4u.js → ShoppingBag01-pCIsQ-Jb.js} +1 -1
- package/dist/client/assets/{Sun-DJ9HokSi.js → Sun-BABGQWS8.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DFAhxuil.js → SwitchHorizontal01-Daz2EgW0.js} +1 -1
- package/dist/client/assets/{Tool01-DSm8VUO0.js → Tool01-D6InpKaj.js} +1 -1
- package/dist/client/assets/{Tooltip-DKAhw1l_.js → Tooltip-CP1IpP66.js} +1 -1
- package/dist/client/assets/{Trash01-DmArjRF_.js → Trash01-LecfbxTv.js} +1 -1
- package/dist/client/assets/{TrendUp01-Cb0Ss3qG.js → TrendUp01-C_SySyBC.js} +1 -1
- package/dist/client/assets/{Upload01-C0hxLVoS.js → Upload01-CABY93nl.js} +1 -1
- package/dist/client/assets/{UserCheck01-DoVM7Q3H.js → UserCheck01-Dqn7toBe.js} +1 -1
- package/dist/client/assets/{UserSquare-CeU_BqyG.js → UserSquare-e0qIxN1Q.js} +1 -1
- package/dist/client/assets/{Users01-CxZDOmOJ.js → Users01-UF7lWU9g.js} +1 -1
- package/dist/client/assets/{XClose-lVRJTaql.js → XClose-C9ONGfkv.js} +1 -1
- package/dist/client/assets/{Zap-Cnh7YlUV.js → Zap-D-fE_V4E.js} +1 -1
- package/dist/client/assets/{access-gate-wCyQtv5A.js → access-gate-EJXICSzm.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-sOS8LW6V.js → add-connection-dialog-CEukHWSz.js} +1 -1
- package/dist/client/assets/agent-app-CPNngTIj.js +1 -0
- package/dist/client/assets/agent-assets-IEsYbqYf.js +1 -0
- package/dist/client/assets/{agent-automation-DxylbM6B.js → agent-automation-iOzcLbza.js} +2 -2
- package/dist/client/assets/agent-automations-COHiMRwL.js +1 -0
- package/dist/client/assets/agent-blog-ClTYnrpA.js +2 -0
- package/dist/client/assets/agent-blog-post-BieKo5sU.js +2 -0
- package/dist/client/assets/agent-calendar-DrN9hKs4.js +1 -0
- package/dist/client/assets/{agent-capabilities-DFVJwxaH.js → agent-capabilities-g1Ym1ZNZ.js} +1 -1
- package/dist/client/assets/agent-connect-sources-CZgCtVaH.js +1 -0
- package/dist/client/assets/agent-deck-C63CWfE0.js +1 -0
- package/dist/client/assets/agent-e2e-OCkFxgz-.js +1 -0
- package/dist/client/assets/agent-experiments-BZeZuSr2.js +1 -0
- package/dist/client/assets/agent-file-BS83qFDk.js +1 -0
- package/dist/client/assets/agent-hosting-DnFnd1YM.js +1 -0
- package/dist/client/assets/agent-icon-CfdcYUE7.js +1 -0
- package/dist/client/assets/agent-library-B6Vv6L3Y.js +1 -0
- package/dist/client/assets/agent-library-file-CVP6ClM5.js +1 -0
- package/dist/client/assets/agent-overview-C3EtX-Ab.js +1 -0
- package/dist/client/assets/{agent-releases-JJOjPP8D.js → agent-releases-AtVL__p1.js} +2 -2
- package/dist/client/assets/agent-settings-CEIvC9PJ.js +1 -0
- package/dist/client/assets/agent-site-editor-code-CP-GqZR-.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BmdLBDYW.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-_kq8Kx6K.js +1 -0
- package/dist/client/assets/{agent-site-editor-B1-p5Hbd.js → agent-site-editor-x-mpZE5Q.js} +2 -2
- package/dist/client/assets/agent-view-Ch4mKCK3.js +1 -0
- package/dist/client/assets/{agent-view-guard-Dp1jnrh9.js → agent-view-guard-DLjVinhc.js} +1 -1
- package/dist/client/assets/{ai-providers-DhIAtcli.js → ai-providers-DVYif0Pc.js} +1 -1
- package/dist/client/assets/{alert-D8-tLSOF.js → alert-CvRyYnph.js} +1 -1
- package/dist/client/assets/{analytics-sections-CMaRh5vg.js → analytics-sections-DLx5rbIc.js} +1 -1
- package/dist/client/assets/{api-keys-BYyk36lL.js → api-keys-CC3fBiOG.js} +1 -1
- package/dist/client/assets/api-keys-DW5FUpRL.js +1 -0
- package/dist/client/assets/app-editor-D_fd99pv.js +1 -0
- package/dist/client/assets/{asset-utils-DZv-FEec.js → asset-utils-CTFQl8QO.js} +1 -1
- package/dist/client/assets/{auth-catchall-kXXiTe4J.js → auth-catchall-n3aaYtq8.js} +1 -1
- package/dist/client/assets/auth-entry-DIN9lopt.js +1 -0
- package/dist/client/assets/{auth-split-layout-CHsrc83a.js → auth-split-layout-C3JVxF8x.js} +1 -1
- package/dist/client/assets/{auth-CTQZGBnP.js → auth-vqpzzu5D.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D44eIeUD.js → authenticate-and-persist-oauth-Bblph2Da.js} +1 -1
- package/dist/client/assets/{automation-list-row-PeCAvjmp.js → automation-list-row-Bz8m8BYO.js} +1 -1
- package/dist/client/assets/{automation-runs-BUHEghGv.js → automation-runs-osLD86WP.js} +1 -1
- package/dist/client/assets/automations-BVdNqAsv.js +1 -0
- package/dist/client/assets/{badge-CXWhQd3j.js → badge-DCIHIkLr.js} +1 -1
- package/dist/client/assets/{block-document-CGeTYWv-.js → block-document-Dbx69UMn.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Dpk4HnW-.js → blocks-preview-workspace-context-CK2OXCcd.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CFYo4clt.js → blocks-tab-states-DeaA94XX.js} +1 -1
- package/dist/client/assets/{blog-preview-url-Dnn3CdoH.js → blog-preview-url-58BZuQLd.js} +1 -1
- package/dist/client/assets/{blog-schema-DciG3sv2.js → blog-schema-DfhHwBev.js} +1 -1
- package/dist/client/assets/{blog-source-gate-DxXfL9t9.js → blog-source-gate-CCV8MP-i.js} +1 -1
- package/dist/client/assets/{blog-view-gate-DwmbI_7t.js → blog-view-gate-o9mn9sNx.js} +1 -1
- package/dist/client/assets/{buckets-Dn5vUsy9.js → buckets-RrYuA5vR.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CCMSIskc.js → build-improve-prompt-doc-fsuyBe8R.js} +1 -1
- package/dist/client/assets/{calendar-C8iDoCnd.js → calendar-BbIAhjX6.js} +1 -1
- package/dist/client/assets/{capability-load-error-DGMDILUu.js → capability-load-error-C937GiKP.js} +1 -1
- package/dist/client/assets/category-editor-BgCEgg9r.js +1 -0
- package/dist/client/assets/{category-tree-CoKnKzyW.js → category-tree-yoWo8LKT.js} +1 -1
- package/dist/client/assets/{chart-CxNNAoSv.js → chart-R5Gu29E6.js} +1 -1
- package/dist/client/assets/{chat-context-Bo7uj7QO.js → chat-context-DSu9o-d-.js} +1 -1
- package/dist/client/assets/{chat-draft-1n081f6C.js → chat-draft-BHCxr31Y.js} +1 -1
- package/dist/client/assets/{checkbox-CouJku1L.js → checkbox-D4P_L8j1.js} +1 -1
- package/dist/client/assets/choose-editor-DFX28kMs.js +1 -0
- package/dist/client/assets/{cli-auth-success-XgEBlx4y.js → cli-auth-success-DGIBfDO7.js} +1 -1
- package/dist/client/assets/cms-settings-editor-1icUX_7B.js +1 -0
- package/dist/client/assets/{cms-store-drafts-aK3C7NIN.js → cms-store-drafts-pPAksstG.js} +1 -1
- package/dist/client/assets/{collapsible-BQXIF7yl.js → collapsible-BJX4Hk9k.js} +1 -1
- package/dist/client/assets/collection-detail-Cnr4TuBK.js +1 -0
- package/dist/client/assets/{collection-display-button-rcoJHzLM.js → collection-display-button-C2JNt8jM.js} +1 -1
- package/dist/client/assets/{collection-search-DHGaqJoX.js → collection-search-DIaYviRG.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-nEvFtZNu.js → collection-table-wrapper-DisSN_Gv.js} +1 -1
- package/dist/client/assets/{collection-tabs-DyPYpvut.js → collection-tabs-CxgBigfA.js} +1 -1
- package/dist/client/assets/{combobox-5tUoYNvN.js → combobox-BCPDPSll.js} +1 -1
- package/dist/client/assets/{command-XtwrY353.js → command-DsEpQe7b.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BIxpu0CV.js → companion-mcps-section-CVk0MHqs.js} +1 -1
- package/dist/client/assets/{config-B-dLgcud.js → config-iR6MS3mx.js} +1 -1
- package/dist/client/assets/{connect-IzhjVKIX.js → connect-BJ6zbvIe.js} +3 -3
- package/dist/client/assets/{connect-key-Djf6OdTt.js → connect-key-R6CnqQKc.js} +1 -1
- package/dist/client/assets/{connect-layout-BLFE1r8J.js → connect-layout-CWTX0XxP.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-K-oLzdRz.js → connect-source-dialog-DS1_5d5l.js} +1 -1
- package/dist/client/assets/{connection-CVYLa59l.js → connection-Daz_MJgN.js} +1 -1
- package/dist/client/assets/{connection-card-DrE2nEQK.js → connection-card-BEkW2Rzt.js} +1 -1
- package/dist/client/assets/connection-detail-WE10lVgN.js +1 -0
- package/dist/client/assets/{connection-form-helpers-ws_4888d.js → connection-form-helpers-BZyz8LC0.js} +1 -1
- package/dist/client/assets/{connection-slug-BnP-Wula.js → connection-slug-CvvLfpvw.js} +1 -1
- package/dist/client/assets/connections-8XSaqT9l.js +1 -0
- package/dist/client/assets/{content-tab-DLB2Uvie.js → content-tab-C66XjEbc.js} +3 -3
- package/dist/client/assets/context-DW5quhGR.js +1 -0
- package/dist/client/assets/{context-menu-OGQDG2f-.js → context-menu-Dc1eMRQk.js} +1 -1
- package/dist/client/assets/{context-shell-B2TiiX4o.js → context-shell-CnWm8Iac.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-C58t7dGd.js → create-organization-dialog-BditzGYJ.js} +1 -1
- package/dist/client/assets/{daily-pulse-C-8Ge7Gb.js → daily-pulse-CCUis9lD.js} +1 -1
- package/dist/client/assets/{delete-copy-DsDE5E3R.js → delete-copy-B8O2OJ6R.js} +1 -1
- package/dist/client/assets/{device-hint-Cw9A4RTs.js → device-hint-C-aumrOZ.js} +1 -1
- package/dist/client/assets/{discover-Dt0njfXu.js → discover-Dbo6G7J-.js} +1 -1
- package/dist/client/assets/{domain-settings-DcqOrcxN.js → domain-settings-D_KZc6yt.js} +1 -1
- package/dist/client/assets/{drawer-DDCMGagW.js → drawer-Ckz_nyBH.js} +1 -1
- package/dist/client/assets/{editor-CIB3F1gV.js → editor-Dv1qkRGx.js} +1 -1
- package/dist/client/assets/{editor-classes-CLvZguOr.js → editor-classes-Bm1swfOR.js} +1 -1
- package/dist/client/assets/{empty-message-C5kN-FsM.js → empty-message-Cs32P_FY.js} +1 -1
- package/dist/client/assets/{empty-state-BwwrJHKq.js → empty-state-DGaA5_7F.js} +1 -1
- package/dist/client/assets/{empty-state-CiMt55-l.js → empty-state-DvK349M1.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-HOP6qrjW.js → experiments-tab-choice-pZXd8Qq7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BB3HY3pL.js → extract-connection-data-DyZVXRSl.js} +1 -1
- package/dist/client/assets/{feature-gate-DzJ2Wgrv.js → feature-gate-Q3XqEiLe.js} +1 -1
- package/dist/client/assets/{feature-paywall-D3CjJHet.js → feature-paywall-DLrDt0zj.js} +1 -1
- package/dist/client/assets/file-explorer-DTnrhmiM.js +2 -0
- package/dist/client/assets/{file-preview-DrQhYw7q.js → file-preview-C3aAzbl2.js} +1 -1
- package/dist/client/assets/{file-share-button-2PZ7snDO.js → file-share-button-DchUqnxv.js} +1 -1
- package/dist/client/assets/{file-type-icon-CfPI0k5H.js → file-type-icon-C1PmpIi5.js} +1 -1
- package/dist/client/assets/{folder-icon-Cc4PI_dN.js → folder-icon-GDlGVc-z.js} +1 -1
- package/dist/client/assets/{form-DTFwvxGa.js → form-B3cubXs5.js} +1 -1
- package/dist/client/assets/{frame-navigation-C2MkzXfc.js → frame-navigation-CZuPAR0A.js} +1 -1
- package/dist/client/assets/{gateway-client-BWWNWG13.js → gateway-client-DDICMs0d.js} +1 -1
- package/dist/client/assets/{general-B4k9oqH9.js → general-Dm23uhl2.js} +1 -1
- package/dist/client/assets/{github-icon-CAEaNNXe.js → github-icon-lV5tv6c5.js} +1 -1
- package/dist/client/assets/{held-block-view-BoX35XB_.js → held-block-view-KOyRMpy4.js} +1 -1
- package/dist/client/assets/home-Bdn-v4eM.js +1 -0
- package/dist/client/assets/{home-overview-4hB9-fzq.js → home-overview-_jWE4zXs.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DD1fLsOV.js → hosted-reconcile-CxvdumkL.js} +1 -1
- package/dist/client/assets/{icon-button-C7j9rC9Y.js → icon-button-trmtAOaJ.js} +1 -1
- package/dist/client/assets/{index-6wJ9auoQ.js → index-2abaLvjI.js} +1 -1
- package/dist/client/assets/{index-D6K919s-.js → index-3YHObF9S.js} +1 -1
- package/dist/client/assets/{index-BOuugOzr.js → index-BBeGVRdq.js} +1 -1
- package/dist/client/assets/{index-BBzaKaTx.js → index-BBpZPks2.js} +1 -1
- package/dist/client/assets/{index-Cg9MjN_F.js → index-C7CSN06D.js} +1 -1
- package/dist/client/assets/{index-SNBsd1n5.js → index-D7q4YJXJ.js} +1 -1
- package/dist/client/assets/{index-C1rZOaeR.js → index-DAKnsBwp.js} +1 -1
- package/dist/client/assets/{index-Bnvwu25R.js → index-DaFEqiTp.js} +1 -1
- package/dist/client/assets/{index-C3qV_QcY.js → index-DuvX09S7.js} +1 -1
- package/dist/client/assets/{index-x-5-P0v0.js → index-NWJ7p_1D.js} +1 -1
- package/dist/client/assets/{index-BesTIQjb.js → index-PcrdQb7V.js} +1 -1
- package/dist/client/assets/{index-DdVVtGb-.js → index-QCTvcBUO.js} +1 -1
- package/dist/client/assets/{index-DokE5sNF.js → index-_VeebRNE.js} +56 -57
- package/dist/client/assets/{index-DFLWf492.js → index-_m0OQ-gU.js} +2 -2
- package/dist/client/assets/{index-C3kpYdOE.js → index-j-nHo57s.js} +1 -1
- package/dist/client/assets/{index-redirect-B0kETsWy.js → index-redirect-qshgZoiU.js} +1 -1
- package/dist/client/assets/{index-BuF029H4.js → index-wdSinBQm.js} +1 -1
- package/dist/client/assets/{index-96oa6z-q.js → index-ykH_xCiZ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BXbGEZ4N.js → infiniteQueryObserver-D7rUvD7y.js} +1 -1
- package/dist/client/assets/{infra-billing-DV-AbPt9.js → infra-billing-2jNYgPJB.js} +1 -1
- package/dist/client/assets/{input-CfItTA2l.js → input-CdG_yBtw.js} +1 -1
- package/dist/client/assets/{input-BVDv3LEp.js → input-DAVLPdNO.js} +3 -3
- package/dist/client/assets/{integration-icon-CimWL0HB.js → integration-icon-D8pA0JHG.js} +1 -1
- package/dist/client/assets/{item-actions-Be-0vSN9.js → item-actions-0UZvaX_W.js} +1 -1
- package/dist/client/assets/{jira-icon-zbkTgTO3.js → jira-icon-B6n8YNiL.js} +1 -1
- package/dist/client/assets/{label-CELn1y0I.js → label-DZkEI5Ke.js} +1 -1
- package/dist/client/assets/{layout-D8GnCK_t.js → layout-B_eV9tIt.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-Xn47ClHz.js → legacy-admin-welcome-dialog-ZZ1Gngd8.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CfDZP79N.js → legacy-agents-deep-DIO9RwdG.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CXEG-wJ7.js → legacy-main-redirect-MYDZoBC6.js} +1 -1
- package/dist/client/assets/library-BGNgyVkv.js +1 -0
- package/dist/client/assets/{library-tab-B9UPnHBX.js → library-tab-1VGCJxXK.js} +1 -1
- package/dist/client/assets/login-D1CbtJGZ.js +1 -0
- package/dist/client/assets/{markdown-CDaD-85D.js → markdown-CBoNEgkf.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BS-4Ud35.js → mcp-app-renderer-DtOO8I9w.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Celefz8j.js → mcp-oauth-BHOMUKtj.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Cfk6BMjf.js → mcp-oauth-DGxlh_95.js} +1 -1
- package/dist/client/assets/{members-CO93VCFa.js → members-DHWvHq5T.js} +1 -1
- package/dist/client/assets/{memory-BsFUXROk.js → memory-C6q4guqS.js} +2 -2
- package/dist/client/assets/{mock-board-BhdBHUpK.js → mock-board-ltUmj9_y.js} +3 -3
- package/dist/client/assets/{monaco-editor-CnKR4oUp.js → monaco-editor-D-AA2j7y.js} +1 -1
- package/dist/client/assets/{monitoring-CQmjoD8Y.js → monitoring-DaONVMuI.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-D45dscQU.js → monitoring-stats-row-DeZi5P6B.js} +1 -1
- package/dist/client/assets/{multi-select-D0i-_SFY.js → multi-select-DUQRYjic.js} +1 -1
- package/dist/client/assets/{mustache-9EZH88YQ.js → mustache-uZ8plADR.js} +1 -1
- package/dist/client/assets/{named-rule-step-yZefk1L5.js → named-rule-step-DreL1Pcr.js} +1 -1
- package/dist/client/assets/{named-rule-view-BhK3WMdx.js → named-rule-view-DfnvZmuY.js} +1 -1
- package/dist/client/assets/{new-project-dialog-B-GOkKGZ.js → new-project-dialog-B9UZLlxE.js} +1 -1
- package/dist/client/assets/{new-project-store-BPGzwGDe.js → new-project-store-BzLAZn_u.js} +1 -1
- package/dist/client/assets/{oauth-callback-CPdQzJA-.js → oauth-callback-DeF7HKPm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BYHZVJQa.js → oauth-callback-ai-provider-B-Qmx59a.js} +1 -1
- package/dist/client/assets/oauth-consent-CwjN9gES.js +1 -0
- package/dist/client/assets/{onboarding-BQ661qWy.js → onboarding-vgMy4F5g.js} +1 -1
- package/dist/client/assets/openai-conversation-NvZqYcCK.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-D5Qm8FhS.js → optimistic-project-sidebar-views-CBHDKL26.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DqX4nMyS.js → order-monitor-day-Txb2sZ3L.js} +1 -1
- package/dist/client/assets/{organization-choice-DJgWzk8W.js → organization-choice-CP3Mtgeb.js} +1 -1
- package/dist/client/assets/{orgs-CEuotPd0.js → orgs-QZqcYIh_.js} +1 -1
- package/dist/client/assets/{own-accounts-section-BUJ0fKWR.js → own-accounts-section-B-xTQ1qC.js} +1 -1
- package/dist/client/assets/{pair-COq-ZPQq.js → pair-CHh11R95.js} +1 -1
- package/dist/client/assets/{parse-sections-x0Kx4hiT.js → parse-sections-BX1x8Bjk.js} +2 -2
- package/dist/client/assets/{plan-ladder-pqZJNBpW.js → plan-ladder-Boo36Lf_.js} +1 -1
- package/dist/client/assets/{plan-DKc8rH1K.js → plan-qEpUYs_C.js} +1 -1
- package/dist/client/assets/{plan-usage-card-BWKv5Sja.js → plan-usage-card-XvorW2R2.js} +1 -1
- package/dist/client/assets/{popover-BNjsYhzT.js → popover-CsisCWO2.js} +1 -1
- package/dist/client/assets/post-calendar-halP83kx.js +1 -0
- package/dist/client/assets/{post-editor-CCfke5Rf.js → post-editor-S0aVTLKj.js} +2 -2
- package/dist/client/assets/{preview-content-DvWQfE3X.js → preview-content-5ttXljO9.js} +1 -1
- package/dist/client/assets/{preview-dialog-07cwMrWN.js → preview-dialog-BclA8lM_.js} +1 -1
- package/dist/client/assets/{preview-panel-C9bhKF_2.js → preview-panel-DwKqGg2b.js} +1 -1
- package/dist/client/assets/preview-tab-DY0X1Y__.js +557 -0
- package/dist/client/assets/{product-picker-dialog-ChT9yEE7.js → product-picker-dialog-BYy8uc5-.js} +1 -1
- package/dist/client/assets/profile-Bd_H-bJ-.js +1 -0
- package/dist/client/assets/project-app-view-C5QreDU8.js +1 -0
- package/dist/client/assets/{project-apps-BilxhqpE.js → project-apps-Qpq3Yqgk.js} +1 -1
- package/dist/client/assets/{project-icon-DzSzNLot.js → project-icon-CoHnihPF.js} +1 -1
- package/dist/client/assets/{project-index-CR5OwtEu.js → project-index-QHWJWseM.js} +1 -1
- package/dist/client/assets/project-reports-WCcwA84Y.js +1 -0
- package/dist/client/assets/project-tasks-DKIcBGE8.js +1 -0
- package/dist/client/assets/projects-BH3mZwKm.js +1 -0
- package/dist/client/assets/{projects-empty-state-BfmuFuvO.js → projects-empty-state-DUNpLlKl.js} +1 -1
- package/dist/client/assets/{prompts-NPG6oRsv.js → prompts-DYNo1NOe.js} +1 -1
- package/dist/client/assets/record-editor-ruw8hHLO.js +1 -0
- package/dist/client/assets/redirect-editor-9KKRUJjb.js +1 -0
- package/dist/client/assets/reports-C98Nopj0.js +1 -0
- package/dist/client/assets/{reports-CYPX_k6p.js → reports-CIVLWAKU.js} +2 -2
- package/dist/client/assets/reports-onboarding-BvleSDU0.js +1 -0
- package/dist/client/assets/reports-tab-Cpactxak.js +2 -0
- package/dist/client/assets/repositories-BUVT6KWE.js +1 -0
- package/dist/client/assets/{repositories-uWeQw1G7.js → repositories-D3sB2pcK.js} +1 -1
- package/dist/client/assets/{repository-binding-CBLNaLcn.js → repository-binding-Ct6tvS6k.js} +1 -1
- package/dist/client/assets/{repository-picker-CXy0gwnT.js → repository-picker-D7wgGSh_.js} +1 -1
- package/dist/client/assets/{require-capability-_6vPPsFH.js → require-capability-psnJqvDd.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Da-vkWUX.js → required-auth-layout-5KQLVPyY.js} +1 -1
- package/dist/client/assets/{reset-password-BMooX7J1.js → reset-password-CMUJSwol.js} +1 -1
- package/dist/client/assets/{resizable-CFBuzfqY.js → resizable-TldGXL10.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DYcddXtb.js → resolve-tab-icon-Dx984IYY.js} +1 -1
- package/dist/client/assets/{review-settings-lJuLTN9Z.js → review-settings-EAZgwqP6.js} +1 -1
- package/dist/client/assets/{role-color-C2OQmHte.js → role-color-Az77j5-3.js} +1 -1
- package/dist/client/assets/roles-KaJOIApg.js +1 -0
- package/dist/client/assets/route-CLOMEKRN.js +1 -0
- package/dist/client/assets/route-CsFahJR-.js +1 -0
- package/dist/client/assets/route-DwgCQsMA.js +1 -0
- package/dist/client/assets/{route-page-header-9cHtL5F_.js → route-page-header-B8Mmh-Yn.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-C63hYsFx.js → sandbox-git-api-DN6h_KqP.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BBxxjkfA.js → sandbox-lifecycle-context-Ptllc8xw.js} +1 -1
- package/dist/client/assets/{save-status-DSROJg37.js → save-status-DI5XwwX3.js} +1 -1
- package/dist/client/assets/{schema-BsNip7cg.js → schema-Bawh3LAf.js} +1 -1
- package/dist/client/assets/{schema-DFozZ1Hz.js → schema-Cp9WUmjR.js} +1 -1
- package/dist/client/assets/{scroll-area-pLrQCixi.js → scroll-area-EnKfGRfx.js} +1 -1
- package/dist/client/assets/{search-input-C2u6aF8T.js → search-input-JNlnu1vU.js} +1 -1
- package/dist/client/assets/{search-toggle-CrQFK2VP.js → search-toggle-Gczjy-6q.js} +1 -1
- package/dist/client/assets/{secret-picker-Dv9xQHYk.js → secret-picker-DpLLS_i2.js} +1 -1
- package/dist/client/assets/{secrets-DB4lMKjl.js → secrets-BkICoFYK.js} +1 -1
- package/dist/client/assets/{section-array-field-DeyNfEV2.js → section-array-field-DeIFn5hU.js} +1 -1
- package/dist/client/assets/{sections-DOqOQtJh.js → sections-DsIUB3iD.js} +1 -1
- package/dist/client/assets/sections-editor-DQjh_kFR.js +1 -0
- package/dist/client/assets/{select-CKROachj.js → select-QgdI1Rfc.js} +1 -1
- package/dist/client/assets/{select-model-BWtBiL3W.js → select-model-CRyWxfNm.js} +1 -1
- package/dist/client/assets/{seo-editor-DIdnRSzC.js → seo-editor-bIUZHc8M.js} +1 -1
- package/dist/client/assets/{separator-DfXZNxTX.js → separator-BEzt-XQG.js} +1 -1
- package/dist/client/assets/{session-runtime-gzzgn7Pj.js → session-runtime-DLIbUSWD.js} +1 -1
- package/dist/client/assets/settings-tab-DdQCVDpj.js +1 -0
- package/dist/client/assets/{sheet-DUgkYIwI.js → sheet-8iInbf9D.js} +1 -1
- package/dist/client/assets/{shell-layout-4H95PNNw.js → shell-layout-D8UbY9n5.js} +1 -1
- package/dist/client/assets/{site-draft-actions-k_cj-bS_.js → site-draft-actions-BVBEL1BN.js} +1 -1
- package/dist/client/assets/{site-draft-view-LE30E0qM.js → site-draft-view-CU45gg4m.js} +1 -1
- package/dist/client/assets/site-editor-CyPykGup.js +1 -0
- package/dist/client/assets/{site-editor-toast-Ynfp7Kjt.js → site-editor-toast-Cjans_Z7.js} +1 -1
- package/dist/client/assets/skills-CznUJdJq.js +1 -0
- package/dist/client/assets/{slider-Bw577vCx.js → slider-CnikFjRE.js} +1 -1
- package/dist/client/assets/{sortable.esm-CykrOV-3.js → sortable.esm-CW9y-Z65.js} +1 -1
- package/dist/client/assets/{sso-Cj24TaPV.js → sso-BUdWqS9w.js} +1 -1
- package/dist/client/assets/{suggestion-B9R_Jc1V.js → suggestion-gEn2gqrr.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DPyVQnGV.js → super-agent-icon-Dx5Acgbw.js} +1 -1
- package/dist/client/assets/{switch-B_2aZNJw.js → switch-7uXAaerp.js} +1 -1
- package/dist/client/assets/{synced-repos-CXSZMJ0F.js → synced-repos-C29_oiY7.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-B4eeZpT6.js → tab-icon-glyph-CgM03OpD.js} +1 -1
- package/dist/client/assets/{table-DsirtjTQ.js → table-drGady29.js} +1 -1
- package/dist/client/assets/{tabs-YBRFhTvN.js → tabs-C9s0KY6N.js} +1 -1
- package/dist/client/assets/{task-board-DK1K-Mbd.js → task-board-CHctJwrW.js} +1 -1
- package/dist/client/assets/{task-key-DZxJr9g6.js → task-key-B6H-3XJr.js} +1 -1
- package/dist/client/assets/{task-route-Cqr8SKPq.js → task-route-CBxVmSL7.js} +1 -1
- package/dist/client/assets/{task-status-bozQW5wT.js → task-status-CRPxL8gs.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CBkUVAdj.js → taskboard-analytics-DMGsXigW.js} +1 -1
- package/dist/client/assets/tasks-Cey8OfRa.js +1 -0
- package/dist/client/assets/{tasks-ALHYjofA.js → tasks-Dmvi9b_Y.js} +1 -1
- package/dist/client/assets/{textarea-BJdJh9he.js → textarea-Cimn1xhl.js} +1 -1
- package/dist/client/assets/thread-analytics-BhURcKi_.js +1 -0
- package/dist/client/assets/{thread-button-DZPQxeV0.js → thread-button-DCHp9tO9.js} +1 -1
- package/dist/client/assets/{thread-intent-GDKuN4r8.js → thread-intent-pC76uPwU.js} +1 -1
- package/dist/client/assets/thread-route-BrFKkVcF.js +1 -0
- package/dist/client/assets/{thread-route-9-m2-1gn.js → thread-route-D_C8d7xK.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-j2UKM_n_.js → thread-sheet-body-DAosbhoz.js} +1 -1
- package/dist/client/assets/{time-range-picker-BUjru-02.js → time-range-picker-9BtbKkzB.js} +1 -1
- package/dist/client/assets/{toggle-group-C134tdMJ.js → toggle-group-n8suP90I.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CxmO1N2o.js → tool-set-selector-DP0UayXg.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-dQBEwFVn.js → toolbar-icon-button-BAHC2wln.js} +1 -1
- package/dist/client/assets/{tooltip-CqEoC-F2.js → tooltip-BYnWhoO-.js} +1 -1
- package/dist/client/assets/{tooltipContext-BdzlPUCu.js → tooltipContext-DqZT6jLi.js} +1 -1
- package/dist/client/assets/{track-Drgb4ZQ6.js → track-BXFPt0jP.js} +1 -1
- package/dist/client/assets/{types-DF2iMJoX.js → types-CdP485rd.js} +1 -1
- package/dist/client/assets/{url-slug-pPnhQQlO.js → url-slug-BkKOqwJh.js} +1 -1
- package/dist/client/assets/{usage-stats-BHc1sfxR.js → usage-stats-CCyq9Zgo.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Khsm6etv.js → use-ai-providers-D6peTC8u.js} +1 -1
- package/dist/client/assets/{use-api-keys-CktIN6Ip.js → use-api-keys-DUVyFEfc.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-BH_mAqzD.js → use-apply-named-rule-D9dIZN02.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-DINxvsUX.js +1 -0
- package/dist/client/assets/{use-automations-it-dxpVL.js → use-automations-qL4OMGNt.js} +1 -1
- package/dist/client/assets/{use-autosave-DFZMnBbI.js → use-autosave-DGPPxEGb.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-JOmELUJ6.js +1 -0
- package/dist/client/assets/use-blog-view-DQBrFMuV.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-CyAMAqyg.js → use-chat-layout-state-DMWJLUZv.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-DGbVdkLh.js → use-cms-publish-actions-DuI-swrZ.js} +1 -1
- package/dist/client/assets/{use-connect-companion-C-Jq7bdY.js → use-connect-companion-C9LfjXNg.js} +1 -1
- package/dist/client/assets/{use-connection-BJP9eCiw.js → use-connection-cSaq7_i7.js} +1 -1
- package/dist/client/assets/{use-content-sync-hirvqHbx.js → use-content-sync-DElceZSb.js} +1 -1
- package/dist/client/assets/{use-copy-Bh0jH9rH.js → use-copy-DKfw8n-3.js} +1 -1
- package/dist/client/assets/{use-current-view-xnQlJLn5.js → use-current-view-a6HKOM5X.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D_OgIl71.js → use-date-fns-locale-B_xn4WWe.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BCqW4nkA.js → use-debounced-autosave-Dtb8gA2L.js} +1 -1
- package/dist/client/assets/{use-debounced-value-q_QhUSeI.js → use-debounced-value-BAma3ogA.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DrzaNgs_.js → use-deco-credits-BeQtkXPR.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-TX8jybTQ.js → use-decopilot-events-B0JW1Gtz.js} +1 -1
- package/dist/client/assets/{use-delete-block-BINjsTY1.js → use-delete-block-CUXsAbin.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Ch7Fpvpo.js → use-delete-connection-DNw4luEn.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-h6uBbZPp.js → use-deployment-admin-BENsmKZ2.js} +1 -1
- package/dist/client/assets/{use-entitlements-B_976V5P.js → use-entitlements-B6kax2f9.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CQuFD5Lq.js → use-fast-preview-draft-url-fo8VZAME.js} +1 -1
- package/dist/client/assets/{use-file-configs-iPUyCrpd.js → use-file-configs-aENtp_va.js} +1 -1
- package/dist/client/assets/{use-id-selection-DnYJXQwW.js → use-id-selection-DZH3hNJe.js} +1 -1
- package/dist/client/assets/{use-in-settings-DvVa8LTW.js → use-in-settings-jNNDWh86.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-C2oj6HbE.js → use-inbox-feed-Axr6Wlqz.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BcBSkfyb.js → use-infinite-scroll-DjPaD0kN.js} +1 -1
- package/dist/client/assets/{use-join-requests-D2xu_Ec9.js → use-join-requests-WKQMf9yH.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-PrqkAqrJ.js → use-main-panel-tabs-DFx6VsI6.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CVLoS2DG.js → use-mcp-auth-status-CCXu_Vmb.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DVaNUeKZ.js → use-mcp-client-UP8_tZ9p.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-mR07NyXv.js → use-mcp-prompts-BM9uSers.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DAzNJiwR.js → use-mcp-tools-mA41mojn.js} +1 -1
- package/dist/client/assets/{use-mobile-YQVdSq9V.js → use-mobile-FS1bh43h.js} +1 -1
- package/dist/client/assets/{use-move-blocks-B5nRM-da.js → use-move-blocks-DAGy4lk4.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-O2aekGtL.js → use-navigate-to-agent-Dg2qYHJi.js} +1 -1
- package/dist/client/assets/{use-never-published-WdNVjWmr.js → use-never-published-DDbQ0Vt8.js} +1 -1
- package/dist/client/assets/{use-org-fs-DcqFgCaV.js → use-org-fs-DbTl86_J.js} +1 -1
- package/dist/client/assets/{use-org-notice-D_lzrT1v.js → use-org-notice-D5zuQ4m5.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CXR8xOyz.js → use-org-repo-syncs-C8jG5KSy.js} +1 -1
- package/dist/client/assets/{use-org-sso-Fbk8Wwq4.js → use-org-sso-QMFtipA-.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DYnwG033.js → use-organization-settings-ByKdFGhE.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DYNTPDzL.js → use-panel-navigate-D4GuHOu1.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BWo3tL86.js → use-project-native-view-presence-BEytngua.js} +1 -1
- package/dist/client/assets/{use-project-scope-Zk4IP7B6.js → use-project-scope-CpfOkL8I.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CGvNAmsp.js → use-recent-apps-Dt_ZPA-N.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DYiqS51Q.js → use-reports-diagnostic-MEHXC7RY.js} +1 -1
- package/dist/client/assets/{use-sandbox-events--EgmreWQ.js → use-sandbox-events-CPKES4Ee.js} +1 -1
- package/dist/client/assets/{use-secrets-BcD5BTqH.js → use-secrets-BGup3PHO.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-QYSyjVux.js → use-section-preview-base-CErD4C9a.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DIdfXbOr.js → use-sidebar-collapsed-9Vi_PrVo.js} +1 -1
- package/dist/client/assets/{use-tags-a6kkz9Aj.js → use-tags-CL2wnmn0.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CXDDOLeW.js → use-task-board-analytics-CGiNWJEU.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CmeNcFe2.js → use-task-board-item-prs-Mcp2690_.js} +1 -1
- package/dist/client/assets/{use-task-board-items-TENQt5cS.js → use-task-board-items-DxcJSuMX.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-Dq_lA2pC.js → use-task-board-prompts-CeUQeuL1.js} +1 -1
- package/dist/client/assets/{use-task-metadata-C75UjZAF.js → use-task-metadata-CG-mCqhD.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-he6CbGJb.js → use-thread-outputs-BRvk_pZG.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-DfBSo4Ua.js → use-view-draft-kind-BLkqtU-Q.js} +1 -1
- package/dist/client/assets/{use-voice-input-B9tq3K2A.js → use-voice-input-Dv1QYOod.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CuAeAzcr.js +1 -0
- package/dist/client/assets/{useQueries-UpDYaK89.js → useQueries-X3Wj3mkG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-QLEux5C_.js +1 -0
- package/dist/client/assets/{users-D5ojYrnY.js → users-SsaEf6Es.js} +1 -1
- package/dist/client/assets/{utils-Bsr3pAeq.js → utils-Dovv0grx.js} +1 -1
- package/dist/client/assets/variant-calendar-CtOZf_f5.js +1 -0
- package/dist/client/assets/{variant-matcher-override-CylJ7vNA.js → variant-matcher-override-CdFxQaGp.js} +1 -1
- package/dist/client/assets/{view-header-BwRsIWg-.js → view-header-ByNTN-so.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BULA9FxB.js → virtual-mcp-BjSK3sGG.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BlWzBx5R.js → watch-sse-pool-_tvuBMId.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/migrate.js +389 -694
- package/dist/server/server.js +905 -1210
- package/package.json +1 -2
- package/dist/client/assets/Fingerprint04-BmN62_tt.js +0 -1
- package/dist/client/assets/agent-app-Ddt_i3hs.js +0 -1
- package/dist/client/assets/agent-assets-4Dn6_LPJ.js +0 -1
- package/dist/client/assets/agent-automations-DTCsvg04.js +0 -1
- package/dist/client/assets/agent-blog-YN3-KN-3.js +0 -2
- package/dist/client/assets/agent-blog-post-CM6piUKk.js +0 -2
- package/dist/client/assets/agent-calendar-BJOF6wGS.js +0 -1
- package/dist/client/assets/agent-connect-sources-DyiJgP9L.js +0 -1
- package/dist/client/assets/agent-deck-BJbp-kJP.js +0 -1
- package/dist/client/assets/agent-e2e-BPbuZrSW.js +0 -1
- package/dist/client/assets/agent-experiments-CdtDrGBl.js +0 -1
- package/dist/client/assets/agent-file-TtINmaDO.js +0 -1
- package/dist/client/assets/agent-hosting-C1oXMGvH.js +0 -1
- package/dist/client/assets/agent-icon-DA-Fg7pF.js +0 -1
- package/dist/client/assets/agent-library-DiFYtmp3.js +0 -1
- package/dist/client/assets/agent-library-file-B8tZpffC.js +0 -1
- package/dist/client/assets/agent-overview-BItm6Vlt.js +0 -1
- package/dist/client/assets/agent-settings-BMZl-puv.js +0 -1
- package/dist/client/assets/agent-site-editor-code-GUBPAYOc.js +0 -2
- package/dist/client/assets/agent-site-editor-content-C0ANuka1.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BSvKajfu.js +0 -1
- package/dist/client/assets/agent-view-CuMB-zdu.js +0 -1
- package/dist/client/assets/api-keys-CZghJUH5.js +0 -1
- package/dist/client/assets/app-editor-D0csBY-b.js +0 -1
- package/dist/client/assets/auth-entry-CmrAwa9A.js +0 -1
- package/dist/client/assets/automations-DWMaGnJ_.js +0 -1
- package/dist/client/assets/category-editor-CvyZlhDa.js +0 -1
- package/dist/client/assets/choose-editor-BudS68fU.js +0 -1
- package/dist/client/assets/cms-settings-editor-BihAt8mo.js +0 -1
- package/dist/client/assets/collection-detail-kNjKSTlB.js +0 -1
- package/dist/client/assets/connection-detail-BzNp4KYO.js +0 -1
- package/dist/client/assets/connections-DYD0GVv1.js +0 -1
- package/dist/client/assets/context-E7CmO04l.js +0 -1
- package/dist/client/assets/file-explorer-BUDGmFj3.js +0 -2
- package/dist/client/assets/home-CS3KzMJa.js +0 -1
- package/dist/client/assets/library-OZMSR-Ss.js +0 -1
- package/dist/client/assets/login-lSvN3N4Q.js +0 -1
- package/dist/client/assets/oauth-consent-R7d-lFg9.js +0 -1
- package/dist/client/assets/openai-conversation-N65nOtwY.js +0 -3
- package/dist/client/assets/post-calendar-D2IwNEqN.js +0 -1
- package/dist/client/assets/preview-tab-COGaRa7u.js +0 -557
- package/dist/client/assets/profile-CAs6IhMO.js +0 -1
- package/dist/client/assets/project-app-view-DviUlYP5.js +0 -1
- package/dist/client/assets/project-reports-BbMJz4mc.js +0 -1
- package/dist/client/assets/project-tasks-BrJzU4LM.js +0 -1
- package/dist/client/assets/projects-CEBGkLTr.js +0 -1
- package/dist/client/assets/record-editor-BwlyH5jZ.js +0 -1
- package/dist/client/assets/redirect-editor-DtY_MKxf.js +0 -1
- package/dist/client/assets/reports-DAi0HbOS.js +0 -1
- package/dist/client/assets/reports-onboarding-DKaCbtdm.js +0 -1
- package/dist/client/assets/reports-tab-_GtIHZiT.js +0 -2
- package/dist/client/assets/repositories-DsojF3_X.js +0 -1
- package/dist/client/assets/roles-KUKC8vim.js +0 -1
- package/dist/client/assets/route-BLThcLzr.js +0 -1
- package/dist/client/assets/route-C9UFcNus.js +0 -1
- package/dist/client/assets/route-CC0eCWn4.js +0 -1
- package/dist/client/assets/sections-editor-Cw3wqkPx.js +0 -1
- package/dist/client/assets/settings-tab-BHrFLzvD.js +0 -1
- package/dist/client/assets/site-editor-e8Hx_Aj4.js +0 -1
- package/dist/client/assets/skills-CDREZcnF.js +0 -1
- package/dist/client/assets/tasks-DtEwdEBz.js +0 -1
- package/dist/client/assets/thread-analytics-D1D-pLk-.js +0 -1
- package/dist/client/assets/thread-route-pIQL1n8l.js +0 -1
- package/dist/client/assets/use-ask-in-chat-SQXk6mVC.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-GUlVOp3p.js +0 -1
- package/dist/client/assets/use-blog-view-Bm6F2c8c.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BVFlK8XX.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CGXfA9jP.js +0 -1
- package/dist/client/assets/variant-calendar-CiQ54mcG.js +0 -1
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-DQjh_kFR.js","assets/index-_VeebRNE.js","assets/index-_-faNWQZ.css","assets/chat-context-DSu9o-d-.js","assets/use-panel-navigate-D4GuHOu1.js","assets/thread-route-D_C8d7xK.js","assets/use-project-scope-CpfOkL8I.js","assets/repository-binding-Ct6tvS6k.js","assets/use-mcp-client-UP8_tZ9p.js","assets/auth-vqpzzu5D.js","assets/use-view-draft-kind-BLkqtU-Q.js","assets/use-blog-view-DQBrFMuV.js","assets/use-organization-settings-ByKdFGhE.js","assets/schema-Bawh3LAf.js","assets/task-board-CHctJwrW.js","assets/thread-intent-pC76uPwU.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-_tvuBMId.js","assets/session-runtime-DLIbUSWD.js","assets/use-entitlements-B6kax2f9.js","assets/use-ai-providers-D6peTC8u.js","assets/use-current-view-a6HKOM5X.js","assets/use-in-settings-jNNDWh86.js","assets/use-decopilot-events-B0JW1Gtz.js","assets/save-status-DI5XwwX3.js","assets/Image01-BqCHFUEp.js","assets/Trash01-LecfbxTv.js","assets/Upload01-CABY93nl.js","assets/use-never-published-DDbQ0Vt8.js","assets/use-voice-input-Dv1QYOod.js","assets/popover-CsisCWO2.js","assets/drawer-Ckz_nyBH.js","assets/tooltip-BYnWhoO-.js","assets/index-PcrdQb7V.js","assets/use-mobile-FS1bh43h.js","assets/agent-icon-CfdcYUE7.js","assets/AlertCircle-gyZP8TIO.js","assets/UserCheck01-Dqn7toBe.js","assets/Tool01-D6InpKaj.js","assets/ArrowUp-DYnF34lU.js","assets/ArrowLeft-BSzt3fBA.js","assets/ArrowRight-BF8V67fk.js","assets/BookOpen01-CpYcxx0H.js","assets/Globe04-DzGa73Hy.js","assets/CheckCircle-CyybvOiK.js","assets/TrendUp01-C_SySyBC.js","assets/ChevronDown-DldgAfZA.js","assets/ChevronSelectorVertical-BbGwltuJ.js","assets/ChevronUp-Bt9-G08q.js","assets/UserSquare-e0qIxN1Q.js","assets/LinkBroken01-Br9NMWkB.js","assets/CreditCard01-vIJuQM5M.js","assets/File02-EV4Uhu5z.js","assets/MessageCircle01-D170V1-p.js","assets/SwitchHorizontal01-Daz2EgW0.js","assets/Eye-BLpLvSpN.js","assets/Key01-KTk95wIy.js","assets/LayoutLeft-_2SG51dD.js","assets/Minus-D88-u0DO.js","assets/Monitor01-Df3mZyNU.js","assets/Sun-BABGQWS8.js","assets/Play-PdUxpWZE.js","assets/Plus-BYodv7tE.js","assets/SearchMd-Cuy8VOOG.js","assets/ShoppingBag01-pCIsQ-Jb.js","assets/Users01-UF7lWU9g.js","assets/XClose-C9ONGfkv.js","assets/Zap-D-fE_V4E.js","assets/index-QCTvcBUO.js","assets/checkbox-D4P_L8j1.js","assets/select-QgdI1Rfc.js","assets/index-BdQq_4o_.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/site-editor-toast-Cjans_Z7.js","assets/use-sandbox-events-CPKES4Ee.js","assets/sandbox-url-D3mC8qhT.js","assets/use-blocks-v8-project-JOmELUJ6.js","assets/utils-Dovv0grx.js","assets/sandbox-git-api-DN6h_KqP.js","assets/hosted-reconcile-CxvdumkL.js","assets/blocks-tab-states-DeaA94XX.js","assets/empty-state-DGaA5_7F.js","assets/search-input-JNlnu1vU.js","assets/tabs-C9s0KY6N.js","assets/active-indicator-CCMhAsc_.js","assets/use-debounced-value-BAma3ogA.js","assets/use-file-configs-aENtp_va.js","assets/asset-utils-CTFQl8QO.js","assets/useInfiniteQuery-CuAeAzcr.js","assets/infiniteQueryObserver-D7rUvD7y.js","assets/usage-stats-CCyq9Zgo.js","assets/utils-CVEq3hMx.js","assets/markdown-CBoNEgkf.js","assets/use-copy-DKfw8n-3.js","assets/gateway-client-DDICMs0d.js","assets/form-B3cubXs5.js","assets/label-DZkEI5Ke.js","assets/switch-7uXAaerp.js","assets/toggle-group-n8suP90I.js","assets/match-site-slug-config-B47_xZCi.js","assets/parse-sections-BX1x8Bjk.js","assets/held-block-view-KOyRMpy4.js","assets/calendar-BbIAhjX6.js","assets/textarea-Cimn1xhl.js","assets/editor-classes-Bm1swfOR.js","assets/task-key-B6H-3XJr.js","assets/sortable.esm-CW9y-Z65.js","assets/empty-message-Cs32P_FY.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-CHh11R95.js","assets/collapsible-BJX4Hk9k.js","assets/use-task-board-items-DxcJSuMX.js","assets/config-iR6MS3mx.js","assets/task-route-CBxVmSL7.js","assets/project-index-QHWJWseM.js","assets/shell-layout-D8UbY9n5.js","assets/use-deployment-admin-BENsmKZ2.js","assets/admin-fetch-BhTJlAsX.js","assets/use-org-notice-D5zuQ4m5.js","assets/command-DsEpQe7b.js","assets/index-ykH_xCiZ.js","assets/integration-icon-D8pA0JHG.js","assets/project-icon-CoHnihPF.js","assets/use-navigate-to-agent-Dg2qYHJi.js","assets/new-project-dialog-B9UZLlxE.js","assets/repository-picker-D7wgGSh_.js","assets/github-icon-lV5tv6c5.js","assets/collection-search-DIaYviRG.js","assets/new-project-store-BzLAZn_u.js","assets/legacy-admin-welcome-dialog-ZZ1Gngd8.js","assets/required-auth-layout-5KQLVPyY.js","assets/use-org-sso-QMFtipA-.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DtOO8I9w.js","assets/types-CdP485rd.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/sheet-8iInbf9D.js","assets/use-connection-cSaq7_i7.js","assets/use-mcp-prompts-BM9uSers.js","assets/use-thread-outputs-BRvk_pZG.js","assets/file-type-icon-C1PmpIi5.js","assets/section-array-field-DeIFn5hU.js","assets/named-rule-step-DreL1Pcr.js","assets/slider-CnikFjRE.js","assets/index-NWJ7p_1D.js","assets/tooltipContext-DqZT6jLi.js","assets/CategoricalChart-CIY6jBUR.js","assets/index-j-nHo57s.js","assets/combobox-BCPDPSll.js","assets/scroll-area-EnKfGRfx.js","assets/monaco-editor-D-AA2j7y.js","assets/editor-Dv1qkRGx.js","assets/use-delete-block-CUXsAbin.js","assets/use-section-preview-base-CErD4C9a.js","assets/mustache-uZ8plADR.js","assets/seo-editor-bIUZHc8M.js","assets/use-apply-named-rule-D9dIZN02.js","assets/use-move-blocks-DAGy4lk4.js","assets/variant-matcher-override-CdFxQaGp.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as le,j as r,r as N,m as Re,b as Ee,B as Oe,aH as us,bk as mt,aI as $e,bl as go,bm as vo,bn as xo,bo,v as Ar,D as _r,K as Qs,w as Or,x as Fr,e as yo,h as rt,I as Us,y as wo,b8 as ko,a6 as ms,b7 as So,b5 as Dr,bp as tr,i as $r,at as Ks,av as Hs,a9 as Br,P as Vs,E as Po,t as fs,b6 as jo,q as Eo}from"./index-_VeebRNE.js";import{u as Xs,N as No}from"./save-status-DI5XwwX3.js";import{b as Co,c as at,r as Mr,l as zr,f as To,g as Ro,w as Lo}from"./chat-context-DSu9o-d-.js";import{t as Ao}from"./ChevronDown-DldgAfZA.js";import{G as _o,H as Oo,B as Ir,I as Fo,b as Do,J as sr,K as $o,L as Ur,M as Bo,N as Kr}from"./agent-icon-CfdcYUE7.js";import{s as Mo}from"./File02-EV4Uhu5z.js";import{a as zo,n as Io}from"./UserSquare-e0qIxN1Q.js";import{s as Hr}from"./Plus-BYodv7tE.js";import{a as Vr,b as Wr,P as qr}from"./popover-CsisCWO2.js";import{e as ht,b as gt,c as Gr,f as Jr,a as Yr,C as Qr}from"./command-DsEpQe7b.js";import{a as Uo,c as Ko,b as Ho}from"./repository-binding-Ct6tvS6k.js";import{a as xt}from"./sandbox-lifecycle-context-Ptllc8xw.js";import{a as Vo,n as Wo,u as qo,f as nr,H as Go,P as Jo}from"./frame-navigation-CZuPAR0A.js";import{r as Yo}from"./session-runtime-DLIbUSWD.js";import{u as Xr}from"./use-voice-input-Dv1QYOod.js";import{l as Qo,m as Xo,n as Zo,o as ei,q as ti,t as si,u as Kt,j as hs,v as Zr,i as Xe,w as ni,x as Zs,y as ea,k as ta,z as ri,A as ai,B as sa,C as oi,c as na,b as ra,D as ii,h as He,E as li,d as ci,g as di,F as ui,G as fi,H as rr,I as pi,J as ar,K as mi,L as hi,M as or,N as ir,O as lr,P as cr,Q as dr,R as _s,S as gi,U as vi,V as xi,W as bi,e as yi}from"./site-editor-toast-Cjans_Z7.js";import{u as aa}from"./use-mobile-FS1bh43h.js";import{T as Ze,I as ur}from"./toolbar-icon-button-BAHC2wln.js";import{T as et,a as tt,c as st}from"./tooltip-BYnWhoO-.js";import{w as as,i as wi}from"./variant-matcher-override-CdFxQaGp.js";import{s as Ut,n as en,a as oa,f as Ve,v as ia,u as la,h as ki,i as Si,B as Pi,S as ji,C as Ei,b as Ni,e as Ci,c as Ti,d as Ri,N as Li,g as Ai,r as _i,j as Oi,k as fr,p as Fi}from"./blocks-tab-states-DeaA94XX.js";import{a as Di}from"./use-fast-preview-draft-url-fo8VZAME.js";import{g as $i,c as pr,B as Os,P as Bi,r as Mi,R as zi,S as Ii,l as Ui,m as Ki,p as Hi}from"./parse-sections-BX1x8Bjk.js";import{g as Vi}from"./section-array-field-DeIFn5hU.js";import{u as Wi}from"./shell-layout-D8UbY9n5.js";import{u as tn,b as qi}from"./use-sandbox-events-CPKES4Ee.js";import{d as Gi,S as Fs}from"./empty-message-Cs32P_FY.js";import{u as Ws}from"./useQueries-X3Wj3mkG.js";import{i as Ji}from"./ArrowRight-BF8V67fk.js";import{u as Yi,b as ca}from"./use-never-published-DDbQ0Vt8.js";import{u as da}from"./blocks-preview-workspace-context-CK2OXCcd.js";import{u as Qi,H as Xi}from"./held-block-view-KOyRMpy4.js";import{MonacoCodeEditor as ua}from"./monaco-editor-D-AA2j7y.js";import{c as fa,u as pa}from"./hosted-reconcile-CxvdumkL.js";import{d as ma}from"./utils-Dovv0grx.js";import{R as mr,a as os,b as hr}from"./resizable-TldGXL10.js";import{g as ha}from"./use-org-notice-D5zuQ4m5.js";import{u as Zi}from"./use-blocks-v8-project-JOmELUJ6.js";import{s as el,L as tl,R as ga,D as gr,w as qs}from"./device-hint-C-aumrOZ.js";import{s as sl}from"./UserCheck01-Dqn7toBe.js";import{L as nl}from"./label-DZkEI5Ke.js";import{T as rl,a as vr}from"./toggle-group-n8suP90I.js";import{i as al,l as ol,D as il}from"./named-rule-step-DreL1Pcr.js";import{b as ll}from"./sandbox-url-D3mC8qhT.js";import{r as cl,R as dl}from"./virtual-mcp-BjSK3sGG.js";import{d as ul}from"./delay-CnY5UFtP.js";import{s as va}from"./XClose-C9ONGfkv.js";import{o as fl}from"./omit-server-managed-metadata-L5IhjRZB.js";import{a as Ds,b as pl,w as ml,n as xr}from"./app-preview-url-9Od4s8Sz.js";import{a as hl}from"./use-organization-settings-ByKdFGhE.js";import{a as $s}from"./agent-capabilities-g1Ym1ZNZ.js";import{E as gl}from"./empty-state-DGaA5_7F.js";import{G as br}from"./github-icon-lV5tv6c5.js";import{R as vl}from"./new-project-dialog-B9UZLlxE.js";import{r as xl}from"./preview-source-BsRLGWUP.js";import{A as bl,a as yl,b as wl}from"./alert-CvRyYnph.js";import{u as kl}from"./use-task-metadata-CG-mCqhD.js";function Sl(t){const e=le.c(10),{waiting:s}=t,n=s?"true":"false";let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=r.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:r.jsx(_o,{className:"size-5 sm:size-6"})}),e[0]=a):a=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx("span",{className:"h-px w-full border-t border-dashed border-muted-foreground/40"}),e[1]=c):c=e[1];let d;e[2]!==s?(d=s&&r.jsx("span",{"data-testid":"connection-dot",className:"absolute top-0 size-2 animate-[connection-shuttle_1.8s_var(--ease-in-out-cubic)_infinite_alternate] rounded-full bg-foreground"}),e[2]=s,e[3]=d):d=e[3];let i;e[4]!==d?(i=r.jsxs("span",{className:"relative flex h-2 w-16 items-center sm:w-20",children:[c,d]}),e[4]=d,e[5]=i):i=e[5];let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:r.jsx(Oo,{className:"size-5 sm:size-6"})}),e[6]=o):o=e[6];let l;return e[7]!==n||e[8]!==i?(l=r.jsxs("div",{"aria-hidden":"true","data-testid":"connection-wire","data-waiting":n,className:"flex items-center gap-2",children:[a,i,o]}),e[7]=n,e[8]=i,e[9]=l):l=e[9],l}function Pl(t){const e=le.c(22),{index:s,numbered:n,step:a,heading:c}=t,d=N.useId();let i;e[0]!==s||e[1]!==n?(i=n&&r.jsx("span",{"aria-hidden":"true",className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium tabular-nums text-foreground",children:s}),e[0]=s,e[1]=n,e[2]=i):i=e[2];let o;e[3]!==c||e[4]!==d||e[5]!==a.title?(o=r.jsx(c,{id:d,className:"text-sm font-medium text-foreground",children:a.title}),e[3]=c,e[4]=d,e[5]=a.title,e[6]=o):o=e[6];let l;e[7]!==i||e[8]!==o?(l=r.jsxs("div",{className:"flex items-center gap-3",children:[i,o]}),e[7]=i,e[8]=o,e[9]=l):l=e[9];const m=n&&"sm:pl-9";let f;e[10]!==m?(f=Re("flex min-w-0 flex-col gap-3",m),e[10]=m,e[11]=f):f=e[11];let p;e[12]!==a.body?(p=a.body&&r.jsx("p",{className:"text-sm text-muted-foreground",children:a.body}),e[12]=a.body,e[13]=p):p=e[13];let y;e[14]!==a.after||e[15]!==f||e[16]!==p?(y=r.jsxs("div",{className:f,children:[p,a.after]}),e[14]=a.after,e[15]=f,e[16]=p,e[17]=y):y=e[17];let x;return e[18]!==d||e[19]!==l||e[20]!==y?(x=r.jsxs("li",{"aria-labelledby":d,className:"surface flex flex-col gap-3 p-4 sm:p-5",children:[l,y]}),e[18]=d,e[19]=l,e[20]=y,e[21]=x):x=e[21],x}const jl=[];function ps(t){const e=le.c(20),{title:s,lead:n,waiting:a,alerts:c,steps:d,footer:i,headingLevel:o}=t,l=d===void 0?jl:d,m=o===void 0?1:o,f=m===1?"h1":"h2",p=a&&l.length===0?"status":void 0;let y;e[0]!==a?(y=r.jsx(Sl,{waiting:a}),e[0]=a,e[1]=y):y=e[1];let x;e[2]!==f||e[3]!==s?(x=r.jsx(f,{tabIndex:-1,className:"text-balance text-lg font-medium text-foreground outline-none sm:text-xl",children:s}),e[2]=f,e[3]=s,e[4]=x):x=e[4];let b;e[5]!==n?(b=n&&r.jsx("p",{className:"text-pretty text-sm text-muted-foreground",children:n}),e[5]=n,e[6]=b):b=e[6];let h;e[7]!==p||e[8]!==y||e[9]!==x||e[10]!==b?(h=r.jsxs("header",{role:p,className:"flex flex-col items-center gap-3 text-center",children:[y,x,b]}),e[7]=p,e[8]=y,e[9]=x,e[10]=b,e[11]=h):h=e[11];let v;e[12]!==m||e[13]!==l?(v=l.length>0&&r.jsx("ol",{className:"flex flex-col gap-3",children:l.map((g,w)=>r.jsx(Pl,{index:w+1,numbered:l.length>1,step:g,heading:m===1?"h2":"h3"},g.title))}),e[12]=m,e[13]=l,e[14]=v):v=e[14];let T;return e[15]!==c||e[16]!==i||e[17]!==h||e[18]!==v?(T=r.jsx("div",{className:"h-full w-full overflow-y-auto",children:r.jsxs("div",{className:"mx-auto flex min-h-full w-full max-w-xl flex-col justify-center gap-6 px-4 py-8 sm:py-12",children:[h,c,v,i]})}),e[15]=c,e[16]=i,e[17]=h,e[18]=v,e[19]=T):T=e[19],T}function El(t){const e=le.c(43),{wait:s,hosts:n,invalidLink:a}=t,c=a===void 0?!1:a,d=Ee();let i;e[0]!==c||e[1]!==d?(i=c&&r.jsx(bl,{variant:"warning",children:r.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[r.jsx(yl,{className:"line-clamp-none text-foreground",children:d("decoServe.link.invalidTitle")}),r.jsx(wl,{children:d("decoServe.link.invalidBody")})]})}),e[0]=c,e[1]=d,e[2]=i):i=e[2];const o=i;if(s.kind==="problem"){let w;e[3]!==d||e[4]!==s.host||e[5]!==s.problem?(w=el(d,s.problem,s.host),e[3]=d,e[4]=s.host,e[5]=s.problem,e[6]=w):w=e[6];const{title:C,body:k}=w;let P;e[7]!==k?(P=r.jsx(ga,{text:k}),e[7]=k,e[8]=P):P=e[8];let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=r.jsx(gr,{className:"border-t border-border pt-4",links:["troubleshooting","serve"]}),e[9]=j):j=e[9];let R;return e[10]!==o||e[11]!==P||e[12]!==C?(R=r.jsx(ps,{headingLevel:2,waiting:!1,title:C,lead:P,alerts:o,footer:j}),e[10]=o,e[11]=P,e[12]=C,e[13]=R):R=e[13],R}const l=s.kind==="looking",m=l&&!s.paused;let f;e[14]!==d?(f=d("decoServe.waiting.title"),e[14]=d,e[15]=f):f=e[15];let p;e[16]!==d?(p=d("decoServe.waiting.lead"),e[16]=d,e[17]=p):p=e[17];let y;e[18]!==o||e[19]!==s.kind?(y=(o||s.kind==="denied")&&r.jsxs(r.Fragment,{children:[o,s.kind==="denied"&&r.jsx(tl,{})]}),e[18]=o,e[19]=s.kind,e[20]=y):y=e[20];let x;e[21]!==d?(x=d("decoServe.waiting.connect.title"),e[21]=d,e[22]=x):x=e[22];let b;e[23]!==d?(b=d("decoServe.waiting.connect.body"),e[23]=d,e[24]=b):b=e[24];let h;e[25]!==n||e[26]!==l||e[27]!==d||e[28]!==s.kind||e[29]!==s.onStart||e[30]!==s.paused?(h=s.kind==="needs-gesture"?r.jsx(Oe,{variant:"outline",className:"self-start",onClick:s.onStart,children:d("decoServe.guide.start")}):l&&r.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:s.paused?d("decoServe.guide.paused"):d("decoServe.guide.looking",{hosts:n})}),e[25]=n,e[26]=l,e[27]=d,e[28]=s.kind,e[29]=s.onStart,e[30]=s.paused,e[31]=h):h=e[31];let v;e[32]!==x||e[33]!==b||e[34]!==h?(v=[{title:x,body:b,after:h}],e[32]=x,e[33]=b,e[34]=h,e[35]=v):v=e[35];let T;e[36]===Symbol.for("react.memo_cache_sentinel")?(T=r.jsx(gr,{className:"border-t border-border pt-4",links:["siteEditor","serve","troubleshooting"]}),e[36]=T):T=e[36];let g;return e[37]!==v||e[38]!==m||e[39]!==f||e[40]!==p||e[41]!==y?(g=r.jsx(ps,{headingLevel:2,waiting:m,title:f,lead:p,alerts:y,steps:v,footer:T}),e[37]=v,e[38]=m,e[39]=f,e[40]=p,e[41]=y,e[42]=g):g=e[42],g}function Nl(t,e){switch(t.kind){case"needs-permission":return{kind:"denied"};case"problem":return{kind:"problem",problem:t.problem,host:e};default:return{kind:"looking"}}}const Cl=15e3,Tl=3e3;function Rl(t){const{candidates:e,probe:s,onFound:n,onChange:a,doc:c=document,setTimer:d=(w,C)=>setTimeout(w,C),clearTimer:i=w=>clearTimeout(w),timeoutMs:o=Tl}=t;let l={status:"searching",firstRoundDone:!1,problem:null},m=!1,f=!1,p=0,y=null,x=null;const b=()=>c.visibilityState==="hidden",h=w=>{l={...l,...w},a(l)},v=async w=>{x=new AbortController;const C=x,k=d(()=>C.abort(),o);try{return await s(w,C.signal),!0}catch(P){if(m)return!1;const j=Xo(P);return j.reason!=="not-answering"?h({problem:{...j,endpoint:w}}):l.problem?.endpoint===w&&h({problem:null}),!1}finally{i(k),x=null}},T=async()=>{if(y=null,!(m||f)){if(e.length===0){h({status:"stopped",firstRoundDone:!0});return}if(b()){h({status:"paused"});return}f=!0,l.status!=="searching"&&h({status:"searching"});for(const w of e){if(m)break;if(await v(w)){if(f=!1,m)return;m=!0,c.removeEventListener("visibilitychange",g),h({status:"found",firstRoundDone:!0}),n(w);return}}if(f=!1,!m){if(p+=1,l.firstRoundDone||h({firstRoundDone:!0}),b()){h({status:"paused"});return}y=d(()=>{T()},Qo(p,Cl))}}};function g(){if(!m){if(b()){y!==null&&(i(y),y=null),f||h({status:"paused"});return}y!==null&&i(y),p=0,T()}}return c.addEventListener("visibilitychange",g),a(l),T(),()=>{m=!0,y!==null&&i(y),x?.abort(),c.removeEventListener("visibilitychange",g)}}function Ll(t,e){return ei(t,e)}const Al=["loopback-network","local-network-access"];async function _l(){if(Zo(window.location.origin))return null;for(const t of Al)try{return await navigator.permissions.query({name:t})}catch{}return null}let xa=null,yr=!1;const Bs=new Set;function Ol(t){if(Bs.add(t),!yr){yr=!0;const e=s=>{xa=s;for(const n of Bs)n()};_l().then(s=>{if(!s)return e("unsupported");e(s.state),s.addEventListener("change",()=>e(s.state))})}return()=>Bs.delete(t)}const Fl={status:"stopped",firstRoundDone:!1,problem:null},Ms=new Map;function Dl(t){const e=Ms.get(t);if(e)return e;let s={status:"searching",firstRoundDone:!1,problem:null};const n=new Set;let a=null;const c={onFound:()=>{},getSnapshot:()=>s,subscribe:d=>(n.add(d),a??=Rl({candidates:t.split(" "),probe:Ll,onFound:i=>c.onFound(i),onChange:i=>{s=i;for(const o of n)o()}}),()=>{n.delete(d),!(n.size>0)&&(a?.(),a=null,Ms.delete(t))})};return Ms.set(t,c),c}function ba(){return N.useSyncExternalStore(Ol,kr,kr)}const $l=()=>()=>{},wr=()=>Fl,kr=()=>xa;function of(t){const e=le.c(9),{candidates:s,onFound:n}=t,[a,c]=N.useState(!1),d=ba(),o=(d==="granted"||d==="unsupported"||d==="prompt"&&a)&&s.length>0;let l;e[0]!==o||e[1]!==s||e[2]!==n?(l=o?Dl(s.join(" ")):null,l&&(l.onFound=n),e[0]=o,e[1]=s,e[2]=n,e[3]=l):l=e[3];const m=N.useSyncExternalStore(l?.subscribe??$l,l?.getSnapshot??wr,l?.getSnapshot??wr),f=d==="prompt"&&!a;let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>c(!0),e[4]=p):p=e[4];let y;return e[5]!==d||e[6]!==m||e[7]!==f?(y={state:m,access:d,needsGesture:f,start:p},e[5]=d,e[6]=m,e[7]=f,e[8]=y):y=e[8],y}const Sr={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Bl(t){const{previewState:e,progressStatus:s,fastPreviewActive:n=!1,fastPreviewReady:a=!1,codingSession:c=!1,hostedDraft:d=!1}=t,i=c?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?Sr:d&&t.hostedPointerPending&&!a?{...Sr,showDecidingLoader:!0}:n&&a&&i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!1}:n&&d&&i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!1}:!n&&e.kind==="iframe"&&s!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:i?{mode:"production",iframeBase:i,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const Ml=1500,zl=500;function Il({iframe:t,reload:e,waitMs:s=Ml,confirmMs:n=zl}){let a;const c=()=>{clearTimeout(d),a=setTimeout(e,n)};t.addEventListener("load",c,{once:!0});const d=setTimeout(()=>{t.removeEventListener("load",c),e()},s);return()=>{clearTimeout(d),clearTimeout(a),t.removeEventListener("load",c)}}const Ul=us({tag:$e(),id:$e(),classes:$e(),text:$e(),html:$e(),manifestKey:$e().nullable(),componentName:$e().nullable(),parents:$e(),url:$e(),path:$e(),viewport:us({width:mt(),height:mt()}),position:us({x:mt(),y:mt()})}),Kl=`(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
|
+
// A CSS zoom on <body> scales the overlay's lengths again; the rect is already zoomed.
|
|
32
|
+
var z = document.body.currentCSSZoom || 1;
|
|
33
|
+
var top = r.top / z;
|
|
34
|
+
var left = r.left / z;
|
|
35
|
+
highlight.style.display = "block";
|
|
36
|
+
highlight.style.top = top + "px";
|
|
37
|
+
highlight.style.left = left + "px";
|
|
38
|
+
highlight.style.width = r.width / z + "px";
|
|
39
|
+
highlight.style.height = r.height / z + "px";
|
|
40
|
+
var tag = el.tagName.toLowerCase();
|
|
41
|
+
var id = el.id ? "#" + el.id : "";
|
|
42
|
+
var cls = el.className && typeof el.className === "string"
|
|
43
|
+
? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
|
|
44
|
+
: "";
|
|
45
|
+
badge.textContent = tag + id + cls;
|
|
46
|
+
badge.style.display = "block";
|
|
47
|
+
badge.style.top = Math.max(0, top - 20) + "px";
|
|
48
|
+
badge.style.left = left + "px";
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
52
|
+
|
|
53
|
+
var outHandler = function(e) {
|
|
54
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
55
|
+
highlight.style.display = "none";
|
|
56
|
+
badge.style.display = "none";
|
|
57
|
+
lastTarget = null;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
61
|
+
|
|
62
|
+
var clickHandler = function(e) {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
e.stopImmediatePropagation();
|
|
65
|
+
var el = e.target;
|
|
66
|
+
if (!el || el === highlight || el === badge) return;
|
|
67
|
+
|
|
68
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
69
|
+
highlight.style.background = "rgba(168,85,247,0.15)";
|
|
70
|
+
setTimeout(function() {
|
|
71
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
72
|
+
highlight.style.background = "rgba(168,85,247,0.08)";
|
|
73
|
+
}, 400);
|
|
74
|
+
|
|
75
|
+
var tag = el.tagName.toLowerCase();
|
|
76
|
+
var id = el.id || "";
|
|
77
|
+
var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
|
|
78
|
+
var text = (el.textContent || "").trim().slice(0, 200);
|
|
79
|
+
var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
|
|
80
|
+
|
|
81
|
+
var closestSection = el.closest("section[data-manifest-key]");
|
|
82
|
+
var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
|
|
83
|
+
|
|
84
|
+
var ancestor = el;
|
|
85
|
+
var componentName = null;
|
|
86
|
+
for (var i = 0; i < 10 && ancestor; i++) {
|
|
87
|
+
if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
|
|
88
|
+
ancestor = ancestor.parentElement;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
var parents = [];
|
|
92
|
+
var p = el.parentElement;
|
|
93
|
+
for (var j = 0; j < 4 && p && p !== document.body; j++) {
|
|
94
|
+
var pTag = p.tagName ? p.tagName.toLowerCase() : "";
|
|
95
|
+
var pId = p.id ? "#" + p.id : "";
|
|
96
|
+
var pCls = p.className && typeof p.className === "string"
|
|
97
|
+
? "." + p.className.trim().split(/\\s+/)[0]
|
|
98
|
+
: "";
|
|
99
|
+
parents.unshift(pTag + pId + pCls);
|
|
100
|
+
p = p.parentElement;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
window.parent.postMessage({
|
|
104
|
+
type: "visual-editor::element-clicked",
|
|
105
|
+
payload: {
|
|
106
|
+
tag: tag, id: id, classes: classes, text: text, html: html,
|
|
107
|
+
manifestKey: manifestKey, componentName: componentName,
|
|
108
|
+
parents: parents.join(" > "),
|
|
109
|
+
url: window.location.href, path: window.location.pathname,
|
|
110
|
+
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
111
|
+
position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
|
|
112
|
+
}
|
|
113
|
+
}, "*");
|
|
114
|
+
};
|
|
115
|
+
document.addEventListener("click", clickHandler, true);
|
|
116
|
+
|
|
117
|
+
window.addEventListener("message", function(e) {
|
|
118
|
+
// 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.
|
|
119
|
+
if (e.source !== window.parent) return;
|
|
120
|
+
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
121
|
+
if (e.data && e.data.type === "visual-editor::clear-hover") {
|
|
122
|
+
highlight.style.display = "none";
|
|
123
|
+
badge.style.display = "none";
|
|
124
|
+
lastTarget = null;
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (e.data && e.data.type === "visual-editor::deactivate") {
|
|
128
|
+
highlight.remove();
|
|
129
|
+
badge.remove();
|
|
130
|
+
cursorStyle.remove();
|
|
131
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
132
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
133
|
+
document.removeEventListener("click", clickHandler, true);
|
|
134
|
+
window.__visualEditorActive = false;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
})();`;function Hl(t,e){const s=t.map(()=>null),n=[];for(let b=0;b<t.length;b++)t[b]!==null&&n.push(b);const a=n.length,c=e.length;if(!a||!c)return s;const d=(b,h)=>{const v=t[n[b]??0];return!v||!v.length?1:v.indexOf(e[h]??"")>=0?2:0},i=[],o=[];for(let b=0;b<=a;b++)i.push(new Array(c+1).fill(0)),o.push(new Array(c+1).fill(2));for(let b=1;b<=a;b++){const h=i[b-1]??[],v=i[b]??[],T=o[b]??[];for(let g=1;g<=c;g++){let w=h[g]??0,C=2;const k=v[g-1]??0;k>w&&(w=k,C=0);const P=d(b-1,g-1),j=(h[g-1]??0)+P;P>0&&j>w&&(w=j,C=1),v[g]=w,T[g]=C}}let l=0,m=a,f=c;for(;m>0&&f>0;){const b=o[m]?.[f]??2;b===1?(s[n[m-1]??0]=f-1,l++,m--,f--):b===0?f--:m--}const p=new Array(c).fill(!1);for(const b of n){const h=s[b];h!=null&&(p[h]=!0)}const y=(b,h)=>{const v=t[b];return!!v&&v.length>0&&v.indexOf(e[h]??"")>=0},x=(b,h)=>{for(const v of n){const T=s[v];if(!(T==null||e[T]!==e[h])&&v<b!=T<h)return!1}return!0};for(const b of n)if(s[b]===null){for(let h=0;h<c;h++)if(!p[h]&&y(b,h)&&x(b,h)){s[b]=h,p[h]=!0,l++;break}}if(l===0&&c===a)for(let b=0;b<a;b++)s[n[b]??0]=b;return s}const Vl=us({sectionIndex:mt(),manifestKey:$e(),clickSeq:mt()}),Wl=`(function() {
|
|
138
|
+
if (window.__cmsEditorActive) return;
|
|
139
|
+
window.__cmsEditorActive = true;
|
|
140
|
+
|
|
141
|
+
// Preserve scroll across variant-override navigations and save-reloads.
|
|
142
|
+
// Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
|
|
143
|
+
// or reloads it, which would otherwise jump to the top. We persist the scroll
|
|
144
|
+
// offset to sessionStorage (survives reload, same-origin) keyed by pathname
|
|
145
|
+
// (the override only changes the query, so the key is stable), then restore it
|
|
146
|
+
// on the next load — retried for ~1s so it outlasts re-hydration and lazy
|
|
147
|
+
// sections that grow the page after load. The recency guard avoids restoring a
|
|
148
|
+
// stale offset on a genuinely fresh visit.
|
|
149
|
+
var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
|
|
150
|
+
var saveScroll = function() {
|
|
151
|
+
try {
|
|
152
|
+
sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
|
|
153
|
+
x: window.scrollX, y: window.scrollY, t: Date.now()
|
|
154
|
+
}));
|
|
155
|
+
} catch (_) {}
|
|
156
|
+
};
|
|
157
|
+
var saveScrollPending = false;
|
|
158
|
+
window.addEventListener("scroll", function() {
|
|
159
|
+
if (saveScrollPending) return;
|
|
160
|
+
saveScrollPending = true;
|
|
161
|
+
requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
|
|
162
|
+
}, { passive: true });
|
|
163
|
+
(function restoreScroll() {
|
|
164
|
+
var raw = null;
|
|
165
|
+
try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
|
|
166
|
+
if (!raw) return;
|
|
167
|
+
var saved = null;
|
|
168
|
+
try { saved = JSON.parse(raw); } catch (_) { return; }
|
|
169
|
+
if (!saved || (Date.now() - saved.t) > 10000) return;
|
|
170
|
+
if (!saved.x && !saved.y) return;
|
|
171
|
+
var attempts = 0;
|
|
172
|
+
var apply = function() {
|
|
173
|
+
attempts++;
|
|
174
|
+
window.scrollTo(saved.x || 0, saved.y || 0);
|
|
175
|
+
if (attempts < 8) setTimeout(apply, 120);
|
|
176
|
+
};
|
|
177
|
+
apply();
|
|
178
|
+
})();
|
|
179
|
+
|
|
180
|
+
var highlight = document.createElement("div");
|
|
181
|
+
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;";
|
|
182
|
+
document.body.appendChild(highlight);
|
|
183
|
+
|
|
184
|
+
var badge = document.createElement("div");
|
|
185
|
+
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;";
|
|
186
|
+
document.body.appendChild(badge);
|
|
187
|
+
|
|
188
|
+
var isTopLevelSection = function(el) {
|
|
189
|
+
return el && el.parentElement
|
|
190
|
+
? !el.parentElement.closest("section[data-manifest-key]")
|
|
191
|
+
: true;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// All top-level page sections in DOM order (deco renders page sections as
|
|
195
|
+
// <section data-manifest-key>; nested islands/sections carry the attribute
|
|
196
|
+
// too, hence the top-level filter). This is the full DOM run, framework
|
|
197
|
+
// sections included — getAllSections() narrows it to the editable window.
|
|
198
|
+
var topLevelSections = function() {
|
|
199
|
+
return Array.from(document.querySelectorAll("section[data-manifest-key]"))
|
|
200
|
+
.filter(isTopLevelSection);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
|
|
204
|
+
var sectionCandidates = [];
|
|
205
|
+
|
|
206
|
+
// Stringified from section-alignment.ts so both sides share one copy.
|
|
207
|
+
var alignSections = ${Hl.toString()};
|
|
208
|
+
|
|
209
|
+
// Indexed like the decofile array; unmapped entries stay null (not clickable).
|
|
210
|
+
var computeAlignment = function(tops) {
|
|
211
|
+
var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
|
|
212
|
+
return alignSections(sectionCandidates, domKeys).map(function(idx) {
|
|
213
|
+
return idx === null ? null : tops[idx];
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
// Editable sections, indexed to match the decofile array the panel uses.
|
|
218
|
+
// Recomputed from the live DOM each call (cheap, rAF-throttled) so it
|
|
219
|
+
// self-heals as client-rendered/lazy sections mount. Until the editor sends
|
|
220
|
+
// candidates, fall back to the full top-level run.
|
|
221
|
+
var getAllSections = function() {
|
|
222
|
+
var tops = topLevelSections();
|
|
223
|
+
return sectionCandidates.length ? computeAlignment(tops) : tops;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// Resolve to the OUTERMOST page-level section (clicking nested content still
|
|
227
|
+
// maps to the top-level section the panel indexes); null if it isn't in the
|
|
228
|
+
// aligned editable set (a framework section deco injected).
|
|
229
|
+
var findSection = function(el, out) {
|
|
230
|
+
var node = el;
|
|
231
|
+
var found = null;
|
|
232
|
+
while (node && node !== document.body) {
|
|
233
|
+
if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
|
|
234
|
+
found = node;
|
|
235
|
+
}
|
|
236
|
+
node = node.parentElement;
|
|
237
|
+
}
|
|
238
|
+
if (!found) return null;
|
|
239
|
+
var sections = getAllSections();
|
|
240
|
+
if (out) out.sections = sections;
|
|
241
|
+
return sections.indexOf(found) >= 0 ? found : null;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
// A Lazy wrapper's key is just the loader — show the inner section's instead.
|
|
245
|
+
var LAZY_KEYS = [
|
|
246
|
+
"website/sections/Rendering/Lazy.tsx",
|
|
247
|
+
"website/sections/Rendering/SingleDeferred.tsx"
|
|
248
|
+
];
|
|
249
|
+
var isLazyKey = function(key) {
|
|
250
|
+
return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
|
|
251
|
+
};
|
|
252
|
+
var displayKey = function(section) {
|
|
253
|
+
var key = section.getAttribute("data-manifest-key") || "section";
|
|
254
|
+
if (isLazyKey(key)) {
|
|
255
|
+
var inner = section.querySelector("section[data-manifest-key]");
|
|
256
|
+
if (inner) return inner.getAttribute("data-manifest-key") || key;
|
|
257
|
+
}
|
|
258
|
+
return key;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// Per-section metadata sent by the editor, aligned by index with
|
|
262
|
+
// getAllSections(). labels: names the DOM can't carry (a global section or a
|
|
263
|
+
// global inside async rendering); kinds: section type that drives the color.
|
|
264
|
+
var sectionLabels = [];
|
|
265
|
+
var sectionKinds = [];
|
|
266
|
+
var labelFor = function(section, sections) {
|
|
267
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
268
|
+
if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
|
|
269
|
+
return displayKey(section);
|
|
270
|
+
};
|
|
271
|
+
var kindFor = function(section, sections) {
|
|
272
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
273
|
+
return (idx >= 0 && sectionKinds[idx]) || "normal";
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
// Highlight palette by section kind: global = light purple, variant = green,
|
|
277
|
+
// normal = blue.
|
|
278
|
+
var COLORS = {
|
|
279
|
+
normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
|
|
280
|
+
global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
|
|
281
|
+
variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
|
|
282
|
+
};
|
|
283
|
+
var applyColor = function(kind) {
|
|
284
|
+
var c = COLORS[kind] || COLORS.normal;
|
|
285
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
286
|
+
highlight.style.background = c.bg;
|
|
287
|
+
badge.style.background = c.solid;
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
var lastSection = null;
|
|
291
|
+
var lastLabel = "";
|
|
292
|
+
var lastKind = "normal";
|
|
293
|
+
var rafPending = false;
|
|
294
|
+
// 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.
|
|
295
|
+
var renderPending = false;
|
|
296
|
+
|
|
297
|
+
// Document-relative coordinates (rect + scroll) on absolutely-positioned
|
|
298
|
+
// nodes, so the browser scrolls the highlight together with the page
|
|
299
|
+
// natively — no per-frame JS repositioning, no scroll lag.
|
|
300
|
+
var positionHighlight = function(section) {
|
|
301
|
+
var r = section.getBoundingClientRect();
|
|
302
|
+
// A CSS zoom on <body> scales the overlay's lengths again; the rect is already zoomed.
|
|
303
|
+
var z = document.body.currentCSSZoom || 1;
|
|
304
|
+
var top = (r.top + window.scrollY) / z;
|
|
305
|
+
var left = (r.left + window.scrollX) / z;
|
|
306
|
+
highlight.style.display = "block";
|
|
307
|
+
highlight.style.top = top + "px";
|
|
308
|
+
highlight.style.left = left + "px";
|
|
309
|
+
highlight.style.width = r.width / z + "px";
|
|
310
|
+
highlight.style.height = r.height / z + "px";
|
|
311
|
+
badge.textContent = lastLabel || displayKey(section);
|
|
312
|
+
badge.style.display = "block";
|
|
313
|
+
badge.style.top = Math.max(0, top - 20) + "px";
|
|
314
|
+
badge.style.left = left + "px";
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
var moveHandler = function(e) {
|
|
318
|
+
if (renderPending || rafPending) return;
|
|
319
|
+
rafPending = true;
|
|
320
|
+
var target = e.target;
|
|
321
|
+
requestAnimationFrame(function() {
|
|
322
|
+
rafPending = false;
|
|
323
|
+
if (renderPending) return;
|
|
324
|
+
if (!target || target === highlight || target === badge) return;
|
|
325
|
+
var out = {};
|
|
326
|
+
var section = findSection(target, out);
|
|
327
|
+
if (section === lastSection) return;
|
|
328
|
+
lastSection = section;
|
|
329
|
+
if (!section) {
|
|
330
|
+
highlight.style.display = "none";
|
|
331
|
+
badge.style.display = "none";
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
lastLabel = labelFor(section, out.sections);
|
|
335
|
+
lastKind = kindFor(section, out.sections);
|
|
336
|
+
applyColor(lastKind);
|
|
337
|
+
positionHighlight(section);
|
|
338
|
+
});
|
|
339
|
+
};
|
|
340
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
341
|
+
|
|
342
|
+
// Window scroll is handled natively by the absolute positioning above; this
|
|
343
|
+
// only re-syncs on resize and on scrolls inside nested scroll containers
|
|
344
|
+
// (capture=true catches those), where document coordinates do shift.
|
|
345
|
+
var reposition = function() {
|
|
346
|
+
if (!lastSection || highlight.style.display === "none") return;
|
|
347
|
+
if (rafPending) return;
|
|
348
|
+
rafPending = true;
|
|
349
|
+
requestAnimationFrame(function() {
|
|
350
|
+
rafPending = false;
|
|
351
|
+
if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
window.addEventListener("scroll", reposition, { capture: true, passive: true });
|
|
355
|
+
window.addEventListener("resize", reposition, { passive: true });
|
|
356
|
+
|
|
357
|
+
var outHandler = function(e) {
|
|
358
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
359
|
+
highlight.style.display = "none";
|
|
360
|
+
badge.style.display = "none";
|
|
361
|
+
lastSection = null;
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
365
|
+
|
|
366
|
+
var clickSeq = 0;
|
|
367
|
+
|
|
368
|
+
// Blocks observes clicks to select sections in the side panel; it must not
|
|
369
|
+
// cancel the iframe page's own handlers or native control behavior.
|
|
370
|
+
var clickHandler = function(e) {
|
|
371
|
+
var target = e.target;
|
|
372
|
+
if (!target || target === highlight || target === badge) return;
|
|
373
|
+
var out = {};
|
|
374
|
+
var section = findSection(target, out);
|
|
375
|
+
if (!section) return;
|
|
376
|
+
|
|
377
|
+
var sectionIndex = out.sections.indexOf(section);
|
|
378
|
+
var manifestKey = section.getAttribute("data-manifest-key") || "";
|
|
379
|
+
|
|
380
|
+
var c = COLORS[lastKind] || COLORS.normal;
|
|
381
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
382
|
+
highlight.style.background = c.active;
|
|
383
|
+
setTimeout(function() {
|
|
384
|
+
highlight.style.background = c.bg;
|
|
385
|
+
}, 400);
|
|
386
|
+
|
|
387
|
+
clickSeq++;
|
|
388
|
+
window.parent.postMessage({
|
|
389
|
+
type: "cms-editor::section-clicked",
|
|
390
|
+
payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
|
|
391
|
+
}, "*");
|
|
392
|
+
};
|
|
393
|
+
document.addEventListener("click", clickHandler, true);
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Navigation is disabled while editing: leaving the page would leave the
|
|
397
|
+
* panel editing the previous page's sections. Only the default action of a
|
|
398
|
+
* real navigation is cancelled, never propagation — in-page controls must
|
|
399
|
+
* keep working (#5567).
|
|
400
|
+
*/
|
|
401
|
+
var isNavigatingAnchor = function(a) {
|
|
402
|
+
if (!a) return false;
|
|
403
|
+
var href = a.getAttribute("href");
|
|
404
|
+
if (!href) return false;
|
|
405
|
+
var trimmed = href.trim();
|
|
406
|
+
if (!trimmed || trimmed.charAt(0) === "#") return false;
|
|
407
|
+
if (/^javascript:/i.test(trimmed)) return false;
|
|
408
|
+
// Same document + fragment only scrolls.
|
|
409
|
+
try {
|
|
410
|
+
var url = new URL(a.href, location.href);
|
|
411
|
+
if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
|
|
412
|
+
} catch (_) {}
|
|
413
|
+
return true;
|
|
414
|
+
};
|
|
415
|
+
var navBlocker = function(e) {
|
|
416
|
+
var el = e.target;
|
|
417
|
+
var a = el && el.closest ? el.closest("a") : null;
|
|
418
|
+
if (!isNavigatingAnchor(a)) return;
|
|
419
|
+
e.preventDefault();
|
|
420
|
+
};
|
|
421
|
+
document.addEventListener("click", navBlocker, true);
|
|
422
|
+
|
|
423
|
+
var submitBlocker = function(e) { e.preventDefault(); };
|
|
424
|
+
document.addEventListener("submit", submitBlocker, true);
|
|
425
|
+
|
|
426
|
+
// Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
|
|
427
|
+
var renderCtrl = null;
|
|
428
|
+
var renderQueue = Promise.resolve();
|
|
429
|
+
var TRANSITION_TAG =
|
|
430
|
+
"<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
|
|
431
|
+
|
|
432
|
+
// A skipped view transition rejects its promises with "AbortError:
|
|
433
|
+
// Transition was skipped"; nobody else waits on them, so they are settled
|
|
434
|
+
// here rather than left as uncaught errors in the page's console.
|
|
435
|
+
var settleTransition = function(vt) {
|
|
436
|
+
if (!vt) return;
|
|
437
|
+
var ignore = function() {};
|
|
438
|
+
if (vt.ready) vt.ready.catch(ignore);
|
|
439
|
+
if (vt.updateCallbackDone) vt.updateCallbackDone.catch(ignore);
|
|
440
|
+
if (vt.finished) vt.finished.catch(ignore);
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
// A site that opts into cross-document view transitions
|
|
444
|
+
// (@view-transition { navigation: auto }) gets one on every reload a save
|
|
445
|
+
// makes. When the next save navigates the frame before that transition
|
|
446
|
+
// starts, the browser skips it and rejects the outgoing page's ready
|
|
447
|
+
// promise, which only a pageswap listener can reach. Kept after deactivate:
|
|
448
|
+
// settling changes nothing else, and the frame may still navigate.
|
|
449
|
+
if (!window.__cmsEditorPageSwap) {
|
|
450
|
+
window.__cmsEditorPageSwap = true;
|
|
451
|
+
window.addEventListener("pageswap", function(e) {
|
|
452
|
+
settleTransition(e.viewTransition);
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// A quick second save skips the running transition. Only finished says
|
|
457
|
+
// when the swap is over, so the chain waits on it; the rest is settled.
|
|
458
|
+
var runSwapTransition = function(swap) {
|
|
459
|
+
if (typeof document.startViewTransition !== "function") {
|
|
460
|
+
swap();
|
|
461
|
+
return Promise.resolve();
|
|
462
|
+
}
|
|
463
|
+
var vt = document.startViewTransition(swap);
|
|
464
|
+
settleTransition(vt);
|
|
465
|
+
return vt.finished;
|
|
466
|
+
};
|
|
467
|
+
var renderInPlace = function(src, body) {
|
|
468
|
+
if (renderCtrl) renderCtrl.abort();
|
|
469
|
+
var ctrl = new AbortController();
|
|
470
|
+
renderCtrl = ctrl;
|
|
471
|
+
renderPending = true;
|
|
472
|
+
highlight.style.display = "none";
|
|
473
|
+
badge.style.display = "none";
|
|
474
|
+
window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
|
|
475
|
+
renderQueue = renderQueue.then(function() {
|
|
476
|
+
return fetch(src, {
|
|
477
|
+
method: "POST",
|
|
478
|
+
body: body,
|
|
479
|
+
signal: ctrl.signal,
|
|
480
|
+
headers: { accept: "text/html", "content-type": "application/json" }
|
|
481
|
+
}).then(function(res) {
|
|
482
|
+
if (!res.ok) throw new Error("render " + res.status);
|
|
483
|
+
return res.text();
|
|
484
|
+
}).then(function(html) {
|
|
485
|
+
var swap = function() {
|
|
486
|
+
document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
|
|
487
|
+
document.body.appendChild(highlight);
|
|
488
|
+
document.body.appendChild(badge);
|
|
489
|
+
// Old section is gone; hide the overlay until the next hover repositions it.
|
|
490
|
+
highlight.style.display = "none";
|
|
491
|
+
badge.style.display = "none";
|
|
492
|
+
lastSection = null;
|
|
493
|
+
};
|
|
494
|
+
var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
|
|
495
|
+
var doc = new DOMParser().parseFromString(headHtml, "text/html");
|
|
496
|
+
var sheets = Array.prototype.map.call(
|
|
497
|
+
doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
|
|
498
|
+
function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
|
|
499
|
+
);
|
|
500
|
+
return Promise.all(sheets).then(function() {
|
|
501
|
+
return runSwapTransition(swap);
|
|
502
|
+
});
|
|
503
|
+
}).then(function() {
|
|
504
|
+
var t = document.getElementById("deco-disable-transitions");
|
|
505
|
+
if (t) t.remove();
|
|
506
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
507
|
+
window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
|
|
508
|
+
}).catch(function(err) {
|
|
509
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
510
|
+
if (err && err.name === "AbortError") return;
|
|
511
|
+
window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
|
|
512
|
+
});
|
|
513
|
+
});
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
window.addEventListener("message", function(e) {
|
|
517
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
|
|
518
|
+
if (e.source !== window.parent) return;
|
|
519
|
+
if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
|
|
520
|
+
renderInPlace(e.data.src, e.data.body);
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
|
|
524
|
+
sectionLabels = e.data.labels;
|
|
525
|
+
if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
|
|
526
|
+
if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
|
|
527
|
+
if (lastSection) {
|
|
528
|
+
lastLabel = labelFor(lastSection);
|
|
529
|
+
lastKind = kindFor(lastSection);
|
|
530
|
+
applyColor(lastKind);
|
|
531
|
+
if (highlight.style.display !== "none") positionHighlight(lastSection);
|
|
532
|
+
}
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
536
|
+
if (e.data && e.data.type === "cms-editor::clear-hover") {
|
|
537
|
+
highlight.style.display = "none";
|
|
538
|
+
badge.style.display = "none";
|
|
539
|
+
lastSection = null;
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
if (e.data && e.data.type === "cms-editor::deactivate") {
|
|
543
|
+
highlight.remove();
|
|
544
|
+
badge.remove();
|
|
545
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
546
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
547
|
+
document.removeEventListener("click", clickHandler, true);
|
|
548
|
+
// Or the page stays unnavigable after leaving Blocks mode.
|
|
549
|
+
document.removeEventListener("click", navBlocker, true);
|
|
550
|
+
document.removeEventListener("submit", submitBlocker, true);
|
|
551
|
+
window.removeEventListener("scroll", reposition, { capture: true });
|
|
552
|
+
window.removeEventListener("resize", reposition);
|
|
553
|
+
window.__cmsEditorActive = false;
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
})();`,is=Object.freeze({ready:"deco:ready",load:"deco:load",loaded:"deco:loaded",loadError:"deco:load-error"}),ql="v1",Gl="/studio-modules",zs=["wireframe","html-swap"];function Jl(t,e,s){const n=new URL(`${Gl}/${ql}/${e}.js`,t);return s&&n.searchParams.set("build",s),n.href}const Yl=2e3;class Ql{constructor(e){this.options=e,this.urls=Object.fromEntries(zs.map(s=>[s,Jl(e.studioOrigin,s,e.build)]))}options;origin=null;urls;loaded=new Set;swapId=0;pendingSwap=null;startTimer=null;has(e){return this.loaded.has(e)}handle(e){const s=this.options.frame();if(!s||e.source!==s)return!1;const n=e.data;if(!n||typeof n.type!="string")return!1;if(n.type===is.ready)return Xl(e.origin)?(this.ready(e.origin),!0):!1;if(e.origin!==this.origin)return!1;const a=n;switch(a.type){case is.loaded:{const c=this.nameOf(a.url);return c&&(this.loaded.add(c),this.options.onModulesChange?.(),c==="wireframe"&&this.options.onWireframeReady?.()),!0}case is.loadError:{const c=this.nameOf(a.url);return c&&this.loaded.delete(c)&&this.options.onModulesChange?.(),c==="html-swap"&&this.failSwap(),!0}case"wireframe:hover":case"wireframe:select":return this.options.onWireframe?.(a),!0;case"html-swap:start":return this.pendingSwap?.id===a.id&&(this.pendingSwap.started=!0,this.clearStartTimer()),!0;case"html-swap:end":return this.pendingSwap?.id!==a.id||(this.pendingSwap=null,this.clearStartTimer(),this.options.onSwapEnd?.()),!0;case"html-swap:error":return this.pendingSwap?.id===a.id&&this.failSwap(),!0;default:return!1}}wireframe(e){return this.post("wireframe",e)}refresh(e){if(e!==void 0&&!this.isFrameOrigin(e))return!1;const s=++this.swapId,n=e?{type:"html-swap:refresh",id:s,url:e}:{type:"html-swap:refresh",id:s};return this.post("html-swap",n)?(this.pendingSwap={id:s,started:!1},this.clearStartTimer(),this.startTimer=setTimeout(()=>{this.startTimer=null,this.pendingSwap?.id===s&&!this.pendingSwap.started&&this.failSwap()},Yl),!0):!1}dispose(){this.clearStartTimer(),this.pendingSwap=null,this.loaded.clear(),this.origin=null}ready(e){this.origin=e,this.loaded.size&&(this.loaded.clear(),this.options.onModulesChange?.()),this.pendingSwap&&(this.pendingSwap=null,this.clearStartTimer(),this.options.onSwapEnd?.());const s=this.options.frame();for(const n of zs)s?.postMessage({type:is.load,url:this.urls[n]},e)}post(e,s){const n=this.options.frame();return!n||!this.origin||!this.loaded.has(e)?!1:(n.postMessage(s,this.origin),!0)}isFrameOrigin(e){try{return new URL(e).origin===this.origin}catch{return!1}}nameOf(e){return zs.find(s=>this.urls[s]===e)??null}failSwap(){this.clearStartTimer(),this.pendingSwap&&(this.pendingSwap=null,this.options.onSwapFailed?.())}clearStartTimer(){this.startTimer&&clearTimeout(this.startTimer),this.startTimer=null}}function Xl(t){if(typeof t!="string"||t==="null")return!1;try{const e=new URL(t).origin;return e!=="null"&&e===t}catch{return!1}}function Gs(t,e,s=!1){let n=t,a=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let c=0;a&&c<5;c++){const d=e[a];if(d&&typeof d=="object"&&"__resolveType"in d){const i=d.__resolveType;if(typeof i=="string"&&i&&i!==a){n=d,a=i;continue}}break}if(!a)return[];if(a.includes("flags/multivariate")||s&&go(a,s)){const c=Array.isArray(n.variants)?n.variants:[];if(c.length===0||c.every(o=>{const l=o?.rule;return vo(l?.__resolveType,s)}))return null;const i=[];for(const o of c){const l=xo(o,s);if(l&&typeof l=="object")for(const m of Gs(l,e,s)??[])i.includes(m)||i.push(m)}return i}if(bo(a)){const c=n.section&&typeof n.section=="object"?Gs(n.section,e,s):[];return c===null?null:c.length?[a,...c]:[a]}return[a]}function pt(t){return t.replace(/[`*_]/g,"\\$&")}function Zl(t,e){const s=[`The user selected an element on the live preview and asked: **"${pt(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&s.push(`**Section resolveType:** \`${pt(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 n=`<${t.tag}${t.classes?` class="${pt(t.classes)}"`:""}>`;s.push(`**Clicked element:** \`${n}\``),t.parents&&s.push(`**DOM breadcrumb:** ${pt(t.parents)} > ${t.tag}`),t.text&&s.push(`**Text content:** "${pt(t.text)}"`),t.componentName&&s.push(`**Component name:** ${pt(t.componentName)}`);const a=t.html.replace(/```/g,"`` `");return s.push("","**HTML snippet:**","```html",a,"```"),s.push("","Please read the source file, locate the element, and apply the requested change."),s.join(`
|
|
557
|
+
`)}function ec(t,e,s=320,n=44,a=12){const{x:c,y:d}=t,{width:i,height:o}=e,l=Math.max(a,Math.min(c-s/2,i-s-a)),f=d/o>.68?Math.max(a,d-n-18):Math.min(d+18,o-n-a);return{leftPct:l/i*100,topPct:f/o*100}}function tc(t){const e=le.c(45),{element:s,onDismiss:n}=t,[a,c]=N.useState(""),d=N.useRef(null),{sendMessage:i}=Co(),{openSidePanel:o}=Wi(),l=Ee();let m;e[0]!==s||e[1]!==a||e[2]!==n||e[3]!==o||e[4]!==i?(m=()=>{if(!a.trim())return;const I=Zl(s,a);o(),i({parts:[{type:"text",text:I}]}),n()},e[0]=s,e[1]=a,e[2]=n,e[3]=o,e[4]=i,e[5]=m):m=e[5];const f=m;let p;e[6]!==s.position||e[7]!==s.viewport?(p=ec(s.position,s.viewport),e[6]=s.position,e[7]=s.viewport,e[8]=p):p=e[8];const y=p,x=`${y.leftPct}%`,b=`${y.topPct}%`;let h;e[9]!==x||e[10]!==b?(h={left:x,top:b,width:"320px"},e[9]=x,e[10]=b,e[11]=h):h=e[11];let v;e[12]!==f?(v=I=>{I.preventDefault(),f()},e[12]=f,e[13]=v):v=e[13];let T;e[14]===Symbol.for("react.memo_cache_sentinel")?(T=I=>c(I.target.value),e[14]=T):T=e[14];let g;e[15]!==n?(g=I=>{I.key==="Escape"&&n()},e[15]=n,e[16]=g):g=e[16];let w;e[17]!==l?(w=l("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=l,e[18]=w):w=e[18];let C;e[19]!==a||e[20]!==g||e[21]!==w?(C=r.jsx("input",{ref:d,autoFocus:!0,type:"text",value:a,onChange:T,onKeyDown:g,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=a,e[20]=g,e[21]=w,e[22]=C):C=e[22];let k;e[23]!==a?(k=a.trim(),e[23]=a,e[24]=k):k=e[24];const P=!k;let j;e[25]!==l?(j=l("sandbox.visualEditorPrompt.sendButton"),e[25]=l,e[26]=j):j=e[26];let R;e[27]!==l?(R=l("sandbox.visualEditorPrompt.sendButton"),e[27]=l,e[28]=R):R=e[28];let B;e[29]!==R?(B=r.jsx("title",{children:R}),e[29]=R,e[30]=B):B=e[30];let A;e[31]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=A):A=e[31];let L;e[32]!==B?(L=r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[B,A]}),e[32]=B,e[33]=L):L=e[33];let F;e[34]!==P||e[35]!==j||e[36]!==L?(F=r.jsx("button",{type:"submit",disabled:P,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:L}),e[34]=P,e[35]=j,e[36]=L,e[37]=F):F=e[37];let O;e[38]!==C||e[39]!==F||e[40]!==v?(O=r.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:v,children:[C,F]}),e[38]=C,e[39]=F,e[40]=v,e[41]=O):O=e[41];let $;return e[42]!==O||e[43]!==h?($=r.jsx("div",{className:"absolute z-30 pointer-events-none",style:h,children:O}),e[42]=O,e[43]=h,e[44]=$):$=e[44],$}const Pr="site-links",sc=/details?page|\bpdp\b/i,nc=/listingpage|\bplp\b/i;function rc(t,e,s){const n=new Set;for(const i of s)sc.test(i)&&n.add("product"),nc.test(i)&&n.add("category");const a=Ut(en(t)),c=a[a.length-1],d=a[a.length-2];return c?.type==="text"&&c.text==="/p"&&d?.type==="param"&&d.name===e&&n.add("product"),e==="*"&&a.some(i=>i.type==="param"&&i.name==="*")&&n.add("category"),n}const ac=["rosa","preto","pink","black"];function ls(t,e){const s=e.trim();return s?t(s):ac.flatMap(n=>t(n))}function oc(t,e){const s=e.trim(),n=[];/^\d+$/.test(s)&&n.push({resolveType:t,props:{ids:[s]}});const c=s.includes("-")&&!/\s/.test(s)?s.replace(/-+/g," "):s;return n.push({resolveType:t,props:{query:c,count:10}}),n}const ya=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function sn(t){return t.split("/")[0]??""}function ic(t){const e=new Set;for(const s of t){const n=sn(s);ya.has(n)&&e.add(n)}return e}function lc(t,e){const s=sn(t);return!ya.has(s)||e.size===0?!0:e.has(s)}const cc=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>ls(s=>oc(t,s),e),optionsFromPayload:cs},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>ls(s=>[{resolveType:t,props:{props:{search:s,pageSize:10,currentPage:1}}}],e),optionsFromPayload:cs},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>ls(s=>[{resolveType:t,props:{term:s,hitsPerPage:10}}],e),optionsFromPayload:cs},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>ls(s=>[{resolveType:t,props:{query:s,term:s,count:10,hitsPerPage:10}}],e),optionsFromPayload:cs},{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:gc}];function dc(t,e,s=new Set){const n=[...e],a=i=>{const o=[];for(const l of cc){if(l.kind!==i)continue;const m=n.find(f=>l.test(f)&&lc(f,s));m&&o.push({cand:l,resolveType:m})}return o.find(l=>s.has(sn(l.resolveType)))??o[0]},c=(i,o,l)=>({kind:i.kind,id:`${i.kind}:${o}`,resolveType:o,clientFilter:i.clientFilter,isFallback:l,buildRequests:m=>i.buildRequests(o,m),optionsFromPayload:i.optionsFromPayload}),d=[];for(const i of["product","category"]){if(!t.has(i))continue;const o=a(i);o&&d.push(c(o.cand,o.resolveType,!1))}return t.size>0&&d.push(uc(t.has("category")?"category":"product")),d}function uc(t){return{kind:t,id:Pr,resolveType:Pr,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,s)=>wc(e,s)}}function nt(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function fc(t,e,s){const n=new Set,a=new Set,c=d=>{if(Array.isArray(d)){for(const l of d)c(l);return}const i=nt(d);if(!i)return;const o=i.__resolveType;if(typeof o=="string"){if(s(o))n.add(o);else if(o in e&&!a.has(o)){a.add(o);const l=nt(e[o])?.__resolveType;typeof l=="string"&&s(l)&&n.add(o),c(e[o])}}for(const l of Object.values(i))c(l)};return c(t),n}function wa(t){const e=new Set,s=[];for(const n of t)for(const a of n)e.has(a.value)||(e.add(a.value),s.push(a));return s}function ka(t){try{return decodeURIComponent(t)}catch{return t}}function pc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mc(t){const e=[];let s="^";for(const n of t)n.type==="text"?s+=pc(n.text):(e.push(n.name),s+=n.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${s}$`),order:e}}function Sa(t,e,s){if(typeof t!="string"||!t)return null;let n;try{n=new URL(t,"https://placeholder.invalid").pathname}catch{return null}n=n.replace(/\/+$/,"");const a=Ut(en(e)),{pattern:c,order:d}=mc(a),i=d.indexOf(s);if(i===-1)return null;const o=n.match(c);if(!o)return null;const l=o[i+1]?.replace(/^\/+|\/+$/g,"");return l?ka(l):null}function cs(t,e){const s=nt(t),n=Array.isArray(t)?t:Array.isArray(s?.products)?s.products:Array.isArray(s?.list)?s.list:[],a=[],c=new Set;for(const d of n){const i=nt(d);if(!i)continue;const o=Sa(i.url,e.template,e.paramName);if(!o||c.has(o))continue;c.add(o);const l=nt(i.isVariantOf),m=typeof l?.name=="string"&&l.name||typeof i.name=="string"&&i.name||o,f=Array.isArray(i.image)?nt(i.image[0]):null,p=typeof f?.url=="string"?f.url:void 0;a.push({value:o,label:m,image:p})}return a}function hc(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const s=e.replace(/^\/+|\/+$/g,"");return s?ka(s):null}function gc(t){const e=[],s=new Set,n=(a,c)=>{const d=nt(a);if(!d)return;const i=typeof d.name=="string"&&d.name?d.name:"",o=i?[...c,i]:c,l=hc(d.url);if(l&&!s.has(l)&&(s.add(l),e.push({value:l,label:o.join(" › ")||l})),Array.isArray(d.children))for(const m of d.children)n(m,o)};if(Array.isArray(t))for(const a of t)n(a,[]);return e}const vc=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 xc(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,s=>s.toUpperCase())}function bc(t){if(typeof t!="string"||!t)return[];const e=[],s=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let n,a=0;for(;(n=s.exec(t))!==null&&a++<5e3;){const c=n[1]??"",d=(n[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:c,text:d})}return e}function yc(t){if(typeof t!="string"||!t)return[];const e=[],s=new Set,n=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,a=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let c,d=0;for(;(c=n.exec(t))!==null&&d++<3e3;){const i=(c[1]??"").replace(/\\\//g,"/");if(!i||s.has(i))continue;s.add(i);const o=t.slice(c.index,c.index+900).match(a)?.[1]?.replace(/\\\//g,"/");e.push({url:i,name:c[2]??"",image:o||void 0})}return e}function wc(t,e){const s=[],n=new Set,a=(c,d,i,o)=>{if(s.length>=200)return;const l=Sa(c,e.template,e.paramName);!l||n.has(l)||e.paramName==="*"&&/(^|\/)p$/.test(l)||i==="category"&&vc.has(l.split("/")[0]??"")||(n.add(l),s.push({value:l,label:d&&d.length<=80?d:xc(l),kind:i,image:o}))};for(const{url:c,name:d,image:i}of yc(t))a(c,d,"product",i);for(const{href:c,text:d}of bc(t))c.startsWith("/")&&!c.startsWith("//")&&a(c,d,"category");return s}function Mt(t,e,s=50){const n=e.trim().toLowerCase();return(n?t.filter(c=>c.label.toLowerCase().includes(n)||c.value.toLowerCase().includes(n)):t).slice(0,s)}const Pa=1e4;function kc(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 Sc(t,{resolveType:e,props:s}){const n=await fetch(ti(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...s}),signal:AbortSignal.timeout(Pa)});if(!n.ok)throw new Error(`Failed to fetch options: ${n.status}`);return n.json()}async function jr(t,e){const s=await fetch(si(t,e),{signal:AbortSignal.timeout(Pa)});if(!s.ok)throw new Error(`Failed to fetch page: ${s.status}`);return s.text()}async function Pc(t,e,s){const n=e.optionsFromPayload(await jr(t,"/"),s),a=n.find(d=>d.kind==="category");if(!a)return n;const c=Ve(s.template,{[s.paramName]:a.value});if(c==="/")return n;try{const d=e.optionsFromPayload(await jr(t,c),s).filter(i=>i.kind==="product");return wa([n,d])}catch{return n}}function jc(t,e,s){return Qs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":s}`)}async function Ec(t,e,s,n){if(e.homepageLinks)return Pc(t,e,n);const a=e.buildRequests?.(s)??[];if(a.length===0)return[];const c=await Promise.allSettled(a.map(i=>Sc(t,i))),d=c.filter(i=>i.status==="fulfilled").map(i=>i.value);if(d.length===0){const i=c.find(o=>o.status==="rejected");throw i?i.reason:new Error("Failed to fetch options")}return wa(d.map(i=>e.optionsFromPayload(i,n)))}function Js(t,e,s,n,a){return{queryKey:jc(t,e,s),queryFn:()=>Ec(t,e,s,n),enabled:a,staleTime:6e4,retry:1}}function zt(t){const e=le.c(16),{heading:s,iconKind:n,options:a,template:c,paramName:d,keyPrefix:i,onSelect:o}=t;if(a.length===0)return null;let l;if(e[0]!==n||e[1]!==i||e[2]!==o||e[3]!==a||e[4]!==d||e[5]!==c){let f;e[7]!==n||e[8]!==i||e[9]!==o||e[10]!==d||e[11]!==c?(f=p=>r.jsxs(gt,{value:`${i}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[n==="product"&&r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?r.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):r.jsx(Ir,{size:14,className:"text-muted-foreground"})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:p.label}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Ve(c,{[d]:p.value})})]})]},`${i}:${p.value}`),e[7]=n,e[8]=i,e[9]=o,e[10]=d,e[11]=c,e[12]=f):f=e[12],l=a.map(f),e[0]=n,e[1]=i,e[2]=o,e[3]=a,e[4]=d,e[5]=c,e[6]=l}else l=e[6];let m;return e[13]!==s||e[14]!==l?(m=r.jsx(ht,{heading:s,children:l}),e[13]=s,e[14]=l,e[15]=m):m=e[15],m}function Er(t){const e=le.c(2),{text:s}=t;let n;return e[0]!==s?(n=r.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:s}),e[0]=s,e[1]=n):n=e[1],n}function Nc(t){const e=le.c(52),{sources:s,template:n,paramName:a,value:c,sandboxRef:d,onCommit:i}=t,o=Ee(),[l,m]=N.useState(!1),[f,p]=N.useState(""),[y,x]=N.useState(""),b=N.useRef(null),h=a==="*"?o("sandbox.preview.catchAllParamLabel"):`:${a}`,v=kc(o),g=[...new Set(s.map(ne=>v[ne.kind].noun))].join(" or ");let w;e[0]!==o||e[1]!==g?(w=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:g}),e[0]=o,e[1]=g,e[2]=w):w=e[2];const C=w,k={template:n,paramName:a};let P;e[3]!==f?(P=(ne,de)=>({source:ne,query:de,options:ne.clientFilter?Mt(de.data??[],f):de.data??[]}),e[3]=f,e[4]=P):P=e[4];const j=P,R=s.filter(Fc),B=s.filter(Oc),A=Ws({queries:R.map(ne=>Js(d,ne,y,k,l))});let L;e[5]!==A||e[6]!==j?(L=(ne,de)=>j(ne,A[de]),e[5]=A,e[6]=j,e[7]=L):L=e[7];const F=R.map(L),O=F.length===0||F.every(_c),$=Ws({queries:B.map(ne=>Js(d,ne,y,k,l&&O))});let I;e[8]!==$||e[9]!==j?(I=(ne,de)=>j(ne,$[de]),e[8]=$,e[9]=j,e[10]=I):I=e[10];const G=B.map(I),W=O?G:F,Y=W.length===1&&W[0]?.source.homepageLinks?W[0]:null,Q=Y&&!Y.query.isLoading&&!Y.query.isError?Y?.query.data??[]:[],K=Mt(Q.filter(Ac),f),ee=Mt(Q.filter(Lc),f),H=K.length>0&&ee.length>0,J=ne=>{m(ne),b.current&&clearTimeout(b.current),p(ne?c:""),x(ne?c:"")};let V;e[11]===Symbol.for("react.memo_cache_sentinel")?(V=ne=>{p(ne),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{x(ne)},300)},e[11]=V):V=e[11];const E=V,_=ne=>{i(ne),J(!1)},D=oa(f),U=Ve(n,{[a]:D}),X=_r,se=Ar,z="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",Z=Rc;let re;e[12]!==h||e[13]!==o?(re=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:h}),e[12]=h,e[13]=o,e[14]=re):re=e[14];let oe;e[15]!==re?(oe=r.jsx(Or,{className:"sr-only",children:r.jsx(Fr,{children:re})}),e[15]=re,e[16]=oe):oe=e[16];let he;e[17]===Symbol.for("react.memo_cache_sentinel")?(he=r.jsx(Ir,{size:16,className:"shrink-0 text-foreground"}),e[17]=he):he=e[17];let pe;e[18]!==o?(pe=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=pe):pe=e[19];let be;e[20]!==h?(be=r.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-xs text-special",children:h}),e[20]=h,e[21]=be):be=e[21];let ge;e[22]!==pe||e[23]!==be?(ge=r.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[he,r.jsxs("span",{className:"text-sm font-medium text-foreground",children:[pe," ",be]})]}),e[22]=pe,e[23]=be,e[24]=ge):ge=e[24];const ve=Jr,Se=!1,fe="min-h-0 flex-1";let ce;e[25]!==C||e[26]!==f?(ce=r.jsx(Yr,{autoFocus:!0,placeholder:C,value:f,onValueChange:E}),e[25]=C,e[26]=f,e[27]=ce):ce=e[27];const Le=Gr,ze="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Ie;e[28]!==o?(Ie=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=Ie):Ie=e[29];let Be;e[30]!==Ie?(Be=r.jsx(Qr,{children:Ie}),e[30]=Ie,e[31]=Be):Be=e[31];const bt=D&&r.jsx(ht,{className:"shrink-0",children:r.jsxs(gt,{value:`__raw__:${D}`,className:"gap-3 py-2",onSelect:()=>_(D),children:[r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:r.jsx(Ji,{size:14,className:"text-muted-foreground"})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:D,paramLabel:h})}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:U})]})]})}),me=H?r.jsxs("div",{className:"flex min-h-0 flex-1",children:[r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:r.jsx(zt,{heading:v.category.heading,iconKind:"category",options:K,template:n,paramName:a,keyPrefix:`${Y?.source.id}:cat`,onSelect:_})}),r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r.jsx(zt,{heading:v.product.heading,iconKind:"product",options:ee,template:n,paramName:a,keyPrefix:`${Y?.source.id}:prod`,onSelect:_})})]}):r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.map(ne=>{const{source:de,query:We,options:yt}=ne,{noun:qe}=v[de.kind];if(We.isLoading)return r.jsx(Er,{text:o("sandbox.pathParamPickerChip.loading",{noun:qe})},de.id);if(We.isError)return r.jsx(Er,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},de.id);if(de.homepageLinks){const Ht=We.data??[];return r.jsxs(N.Fragment,{children:[r.jsx(zt,{heading:v.category.heading,iconKind:"category",options:Mt(Ht.filter(Tc),f),template:n,paramName:a,keyPrefix:`${de.id}:cat`,onSelect:_}),r.jsx(zt,{heading:v.product.heading,iconKind:"product",options:Mt(Ht.filter(Cc),f),template:n,paramName:a,keyPrefix:`${de.id}:prod`,onSelect:_})]},de.id)}return r.jsx(zt,{heading:W.length>1?v[de.kind].heading:void 0,iconKind:de.kind,options:yt,template:n,paramName:a,keyPrefix:de.id,onSelect:_},de.id)})});let Fe;e[32]!==Le||e[33]!==Be||e[34]!==bt||e[35]!==me?(Fe=r.jsxs(Le,{className:ze,children:[Be,bt,me]}),e[32]=Le,e[33]=Be,e[34]=bt,e[35]=me,e[36]=Fe):Fe=e[36];let xe;e[37]!==ve||e[38]!==ce||e[39]!==Fe?(xe=r.jsxs(ve,{shouldFilter:Se,className:fe,children:[ce,Fe]}),e[37]=ve,e[38]=ce,e[39]=Fe,e[40]=xe):xe=e[40];let Ue;e[41]!==se||e[42]!==oe||e[43]!==ge||e[44]!==xe||e[45]!==Z?(Ue=r.jsxs(se,{className:z,onClick:Z,children:[oe,ge,xe]}),e[41]=se,e[42]=oe,e[43]=ge,e[44]=xe,e[45]=Z,e[46]=Ue):Ue=e[46];let Ae;return e[47]!==X||e[48]!==J||e[49]!==l||e[50]!==Ue?(Ae=r.jsx(X,{open:l,onOpenChange:J,children:Ue}),e[47]=X,e[48]=J,e[49]=l,e[50]=Ue,e[51]=Ae):Ae=e[51],r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:h}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-xs text-special hover:bg-special/25",onClick:ne=>{ne.stopPropagation(),J(!0)},children:c||h}),Ae]})}function Cc(t){return t.kind==="product"}function Tc(t){return t.kind!=="product"}function Rc(t){return t.stopPropagation()}function Lc(t){return t.kind==="product"}function Ac(t){return t.kind!=="product"}function _c(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function Oc(t){return t.isFallback}function Fc(t){return!t.isFallback}function Dc(t){const e=le.c(8),{sources:s,template:n,paramName:a,sandboxRef:c,onFill:d}=t;let i,o;if(e[0]!==a||e[1]!==c||e[2]!==s||e[3]!==n){const y={template:n,paramName:a},x=s.filter($c);o=Ws,i=x.map(b=>Js(c,b,"",y,!0)),e[0]=a,e[1]=c,e[2]=s,e[3]=n,e[4]=i,e[5]=o}else i=e[4],o=e[5];let l;e[6]!==i?(l={queries:i},e[6]=i,e[7]=l):l=e[7];const m=o(l),[f,p]=N.useState(!1);if(!f)for(const y of m){if(y.isLoading)break;const x=y.data?.[0];if(x){p(!0),queueMicrotask(()=>d(x.value));break}}return null}function $c(t){return!t.isFallback}function Bc(t){const e=le.c(31),{name:s,value:n,onCommit:a}=t,c=Ee(),[d,i]=N.useState(n),[o,l]=N.useState(!1),m=N.useRef(!1);let f;e[0]!==s||e[1]!==c?(f=s==="*"?c("sandbox.preview.catchAllParamLabel"):`:${s}`,e[0]=s,e[1]=c,e[2]=f):f=e[2];const p=f,y=d||p;let x;e[3]!==y?(x=r.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-xs",children:y}),e[3]=y,e[4]=x):x=e[4];let b;e[5]!==p||e[6]!==c?(b=c("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=c,e[7]=b):b=e[7];let h,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=j=>i(j.target.value),v=()=>l(!0),e[8]=h,e[9]=v):(h=e[8],v=e[9]);let T;e[10]!==n?(T=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(m.current=!0,i(n),j.currentTarget.blur())},e[10]=n,e[11]=T):T=e[11];let g;e[12]!==d||e[13]!==a||e[14]!==n?(g=()=>{if(l(!1),m.current){m.current=!1;return}const j=oa(d);i(j),j!==n&&a(j)},e[12]=d,e[13]=a,e[14]=n,e[15]=g):g=e[15];let w;e[16]!==d||e[17]!==p||e[18]!==b||e[19]!==T||e[20]!==g?(w=r.jsx("input",{type:"text",value:d,placeholder:p,title:b,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-xs text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:Mc,onChange:h,onFocus:v,onKeyDown:T,onBlur:g}),e[16]=d,e[17]=p,e[18]=b,e[19]=T,e[20]=g,e[21]=w):w=e[21];let C;e[22]!==x||e[23]!==w?(C=r.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[x,w]}),e[22]=x,e[23]=w,e[24]=C):C=e[24];let k;e[25]!==o||e[26]!==c?(k=o&&r.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-2xs text-muted-foreground",children:[r.jsx(Fo,{size:10}),c("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=c,e[27]=k):k=e[27];let P;return e[28]!==k||e[29]!==C?(P=r.jsxs(r.Fragment,{children:[C,k]}),e[28]=k,e[29]=C,e[30]=P):P=e[30],P}function Mc(t){return t.stopPropagation()}function zc(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const s=new URL(e),n=t.resolvedPath==="/"?"":t.resolvedPath;return`${s.host}${n}`}catch{return e}}function Ic(t){return t.previewSurfaceActive&&(t.daemonReady||t.production||!!t.servePreviewUrl)}function Uc(t){return t.showPreviewToolbar&&(t.contentEditingEnabled||t.hasFrameworkRoutes)}function Kc(t){return t.v8?null:t.production||t.localPreview?{type:"editor::inject",args:{script:t.script}}:{type:"visual-editor::activate",script:t.script}}function Hc(t){return t.v8?null:{type:"visual-editor::activate",script:t.script}}class ja extends Error{constructor(){super("The site's schema isn't loaded yet"),this.name="PageSchemaNotReadyError"}}async function Vc(t,e){if(t)return t;const s=await e?.().catch(()=>null);if(!s)throw new ja;return s}async function Wc(t,e,s){return s?pr(t,e,await Vc(s.meta,s.loadMeta)):pr(t,e)}function qc(t){const e=le.c(5);let s;e[0]!==t?(s=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=s):s=e[1];const n=Yi(s);let a;return e[2]!==t||e[3]!==n?(a={mutationFn:async c=>{const{name:d,path:i,template:o,schema:l}=c;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const m=$i(d),f=o?{...o,name:d,path:i}:await Wc(d,i,l);return await n.mutateAsync({blockKey:m,data:f}),{key:m,name:d,path:i}}},e[2]=t,e[3]=n,e[4]=a):a=e[4],yo(a)}function Gc(t){const e=le.c(89),{open:s,onOpenChange:n,isPending:a,error:c,templates:d,onSubmit:i}=t,o=a===void 0?!1:a,l=Ee();let m;e[0]!==l?(m=l("sectionsEditor.createPageModal.defaultPageName"),e[0]=l,e[1]=m):m=e[1];const[f,p]=N.useState(m);let y;e[2]!==l?(y=l("sectionsEditor.createPageModal.defaultPagePath"),e[2]=l,e[3]=y):y=e[3];const[x,b]=N.useState(y),[h,v]=N.useState(Os),[T,g]=N.useState(null),[w,C]=N.useState(s);s!==w&&(C(s),s&&(p(l("sectionsEditor.createPageModal.defaultPageName")),b(l("sectionsEditor.createPageModal.defaultPagePath")),v(Os),g(null)));const k=!!d?.length;let P;e[4]!==o||e[5]!==n?(P=pe=>{!pe&&!o&&(g(null),n(!1))},e[4]=o,e[5]=n,e[6]=P):P=e[6];const j=P;let R;e[7]!==o||e[8]!==f||e[9]!==i||e[10]!==x||e[11]!==k||e[12]!==h?(R=async pe=>{pe.preventDefault();const be=f.trim(),ge=x.trim();if(!be||!ge||o)return;const ve=ia(ge);if(ve){g(ve);return}g(null),await i({name:be,path:ge,templateKey:k&&h!==Os?h:null})},e[7]=o,e[8]=f,e[9]=i,e[10]=x,e[11]=k,e[12]=h,e[13]=R):R=e[13];const B=R,A=T??c;let L;e[14]!==l?(L=l("sectionsEditor.createPageModal.title"),e[14]=l,e[15]=L):L=e[15];let F;e[16]!==L?(F=r.jsx(Or,{children:r.jsx(Fr,{children:L})}),e[16]=L,e[17]=F):F=e[17];let O;e[18]!==l?(O=l("sectionsEditor.createPageModal.nameLabel"),e[18]=l,e[19]=O):O=e[19];let $;e[20]!==O?($=r.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:O}),e[20]=O,e[21]=$):$=e[21];let I;e[22]===Symbol.for("react.memo_cache_sentinel")?(I=pe=>p(pe.target.value),e[22]=I):I=e[22];let G;e[23]!==l?(G=l("sectionsEditor.createPageModal.namePlaceholder"),e[23]=l,e[24]=G):G=e[24];let W;e[25]!==o||e[26]!==f||e[27]!==G?(W=r.jsx(Us,{id:"new-page-name",value:f,onChange:I,placeholder:G,autoFocus:!0,disabled:o}),e[25]=o,e[26]=f,e[27]=G,e[28]=W):W=e[28];let Y;e[29]!==W||e[30]!==$?(Y=r.jsxs("div",{className:"space-y-1.5",children:[$,W]}),e[29]=W,e[30]=$,e[31]=Y):Y=e[31];let q;e[32]!==l?(q=l("sectionsEditor.createPageModal.pathLabel"),e[32]=l,e[33]=q):q=e[33];let Q;e[34]!==q?(Q=r.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:q}),e[34]=q,e[35]=Q):Q=e[35];let K;e[36]===Symbol.for("react.memo_cache_sentinel")?(K=pe=>b(pe.target.value),e[36]=K):K=e[36];let ee;e[37]!==l?(ee=l("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=l,e[38]=ee):ee=e[38];let H;e[39]!==o||e[40]!==x||e[41]!==ee?(H=r.jsx(Us,{id:"new-page-path",value:x,onChange:K,placeholder:ee,disabled:o}),e[39]=o,e[40]=x,e[41]=ee,e[42]=H):H=e[42];let J;e[43]!==Q||e[44]!==H?(J=r.jsxs("div",{className:"space-y-1.5",children:[Q,H]}),e[43]=Q,e[44]=H,e[45]=J):J=e[45];let V;e[46]!==o||e[47]!==k||e[48]!==l||e[49]!==h||e[50]!==d?(V=k&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:l("sectionsEditor.createPageModal.templateLabel")}),r.jsx(Bi,{id:"new-page-template",value:h,onChange:v,templates:d??[],disabled:o})]}),e[46]=o,e[47]=k,e[48]=l,e[49]=h,e[50]=d,e[51]=V):V=e[51];let E;e[52]!==A?(E=A&&r.jsx("p",{className:"text-xs text-destructive",children:A}),e[52]=A,e[53]=E):E=e[53];let _;e[54]!==Y||e[55]!==J||e[56]!==V||e[57]!==E?(_=r.jsxs("div",{className:"space-y-4 py-4",children:[Y,J,V,E]}),e[54]=Y,e[55]=J,e[56]=V,e[57]=E,e[58]=_):_=e[58];let D;e[59]!==n?(D=()=>n(!1),e[59]=n,e[60]=D):D=e[60];let U;e[61]!==l?(U=l("sectionsEditor.createPageModal.cancelButton"),e[61]=l,e[62]=U):U=e[62];let X;e[63]!==o||e[64]!==D||e[65]!==U?(X=r.jsx(Oe,{type:"button",variant:"outline",onClick:D,disabled:o,children:U}),e[63]=o,e[64]=D,e[65]=U,e[66]=X):X=e[66];let se;e[67]!==o||e[68]!==f||e[69]!==x?(se=!f.trim()||!x.trim()||o,e[67]=o,e[68]=f,e[69]=x,e[70]=se):se=e[70];let z;e[71]!==o||e[72]!==l?(z=o?r.jsxs(r.Fragment,{children:[r.jsx(rt,{className:"size-3.5"}),l("sectionsEditor.createPageModal.creatingButton")]}):l("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=l,e[73]=z):z=e[73];let Z;e[74]!==se||e[75]!==z?(Z=r.jsx(Oe,{type:"submit",disabled:se,children:z}),e[74]=se,e[75]=z,e[76]=Z):Z=e[76];let re;e[77]!==X||e[78]!==Z?(re=r.jsxs(wo,{children:[X,Z]}),e[77]=X,e[78]=Z,e[79]=re):re=e[79];let oe;e[80]!==B||e[81]!==_||e[82]!==re||e[83]!==F?(oe=r.jsx(Ar,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:B,children:[F,_,re]})}),e[80]=B,e[81]=_,e[82]=re,e[83]=F,e[84]=oe):oe=e[84];let he;return e[85]!==j||e[86]!==s||e[87]!==oe?(he=r.jsx(_r,{open:s,onOpenChange:j,children:oe}),e[85]=j,e[86]=s,e[87]=oe,e[88]=he):he=e[88],he}function Jc(t){const e=le.c(35),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:c,meta:d,decofile:i,blockKey:o}=t,l=Ee();let m;e[0]!==a||e[1]!==s||e[2]!==n?(m={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=m):m=e[3];const f=Qi(m,i);let p;e[4]!==o||e[5]!==i?(p=Mi(i,o),e[4]=o,e[5]=i,e[6]=p):p=e[6];const{resolveType:y,props:x,title:b}=p;if(!y){let C;e[7]!==l?(C=l("sandbox.preview.loaderNoLongerExists"),e[7]=l,e[8]=C):C=e[8];let k;return e[9]!==C?(k=r.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:C}),e[9]=C,e[10]=k):k=e[10],k}const h=`loader:${o}`,v=`loader:${o}`;let T;e[11]!==o||e[12]!==y||e[13]!==b?(T={mode:"saved",blockKey:o,resolveType:y,title:b},e[11]=o,e[12]=y,e[13]=b,e[14]=T):T=e[14];let g;e[15]!==a||e[16]!==i||e[17]!==d||e[18]!==s||e[19]!==c||e[20]!==x||e[21]!==f.isPending||e[22]!==f.save||e[23]!==v||e[24]!==T||e[25]!==n?(g=r.jsx(zi,{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:c,meta:d,decofile:i,kind:"loaders",target:T,initialValue:x,isCreating:f.isPending,onCreate:Yc,onSaveReferencedBlock:f.save,showRun:!1},v),e[15]=a,e[16]=i,e[17]=d,e[18]=s,e[19]=c,e[20]=x,e[21]=f.isPending,e[22]=f.save,e[23]=v,e[24]=T,e[25]=n,e[26]=g):g=e[26];let w;return e[27]!==o||e[28]!==a||e[29]!==i||e[30]!==s||e[31]!==h||e[32]!==g||e[33]!==n?(w=r.jsx(Xi,{listing:i,orgSlug:s,virtualMcpId:n,branch:a,blockKey:o,present:void 0,children:g},h),e[27]=o,e[28]=a,e[29]=i,e[30]=s,e[31]=h,e[32]=g,e[33]=n,e[34]=w):w=e[34],w}async function Yc(){}function Qc(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Nr(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:Qc(t.error)}}function Xc(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 Zc(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=Xc(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const s=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return s&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(a=>a.status==="error"&&!a.hasData&&a.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:s?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const ed=N.lazy(()=>ko(()=>import("./sections-editor-DQjh_kFR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161])).then(t=>({default:t.SectionsEditor})));function Cr(t){const e=le.c(62),{virtualMcpId:s,externalSelection:n,onSectionPicked:a,onViewJsonFile:c}=t,d=n===void 0?null:n,{org:i}=ms(),{currentBranch:o,taskId:l}=at(),m=tn(),f=xt(),p=da(),y=m.lifecycle.phase==="running",x=f.previewUrl;let b;e[0]!==o||e[1]!==i||e[2]!==x||e[3]!==l||e[4]!==s?(b=o?{orgSlug:i.slug,virtualMcpId:s,branch:o,threadId:l??null,previewUrl:x}:null,e[0]=o,e[1]=i,e[2]=x,e[3]=l,e[4]=s,e[5]=b):b=e[5];const h=b,v=Kt(s,o);let T;e[6]!==y?(T={fetchEnabled:y},e[6]=y,e[7]=T):T=e[7];const g=hs(h,T),w=Zr(h);let C;e[8]!==y?(C={fetchEnabled:y},e[8]=y,e[9]=C):C=e[9];const k=la(h,C),P=Zc({lifecyclePhase:m.lifecycle.phase,decofile:Nr(g),meta:Nr(k),hasEditableContent:ki(g.data,k.data),fastPreviewActive:Xr(s).runtime==="cms"||Xe(v)}),j=Xs()===void 0,R=td;if(Si(v)){let E;return e[10]===Symbol.for("react.memo_cache_sentinel")?(E=R(r.jsx(ji,{})),e[10]=E):E=e[10],E}if(v.kind==="pending"&&v.retrying){let E;return e[11]!==v?(E=R(r.jsx(Ei,{backend:v})),e[11]=v,e[12]=E):E=e[12],E}if(P.kind==="loading"||j){let E;return e[13]===Symbol.for("react.memo_cache_sentinel")?(E=R(r.jsx(So,{})),e[13]=E):E=e[13],E}if(g.data&&ni(k.data)){const E=p.state.target,_=E?.kind==="page"||E?.kind==="section"?E.key:null,D=v.kind==="legacy"?_??"":`${w}:${_??""}`,U=o??"";let X;return e[14]!==g.data||e[15]!==_||e[16]!==i.slug||e[17]!==D||e[18]!==U||e[19]!==s?(X=R(r.jsx(Ii,{orgSlug:i.slug,virtualMcpId:s,branch:U,decofile:g.data,initialKey:_,compact:!0},D)),e[14]=g.data,e[15]=_,e[16]=i.slug,e[17]=D,e[18]=U,e[19]=s,e[20]=X):X=e[20],X}if(P.kind==="empty"){let E;return e[21]===Symbol.for("react.memo_cache_sentinel")?(E=R(r.jsx(Ni,{})),e[21]=E):E=e[21],E}if(P.kind==="error"){let E;e[22]!==g||e[23]!==f||e[24]!==k||e[25]!==P.source?(E=()=>{if(P.source==="sandbox"){f.retry();return}Promise.all([g.refetch(),k.refetch()])},e[22]=g,e[23]=f,e[24]=k,e[25]=P.source,e[26]=E):E=e[26];const _=E;let D;return e[27]!==_||e[28]!==P.source?(D=R(r.jsx(Pi,{source:P.source,onRetry:_})),e[27]=_,e[28]=P.source,e[29]=D):D=e[29],D}let B;e[30]===Symbol.for("react.memo_cache_sentinel")?(B=E=>R(r.jsx("div",{className:"h-full min-h-0",children:E})),e[30]=B):B=e[30];const A=B,L=p.state.target;if(L?.kind==="loader"&&g.data&&k.data){const E=v.kind==="legacy"?void 0:w,_=o??"",D=x??null;let U;return e[31]!==g.data||e[32]!==k.data||e[33]!==i.slug||e[34]!==E||e[35]!==_||e[36]!==D||e[37]!==L.key||e[38]!==s?(U=A(r.jsx(Jc,{orgSlug:i.slug,virtualMcpId:s,branch:_,previewUrl:D,meta:k.data,decofile:g.data,blockKey:L.key},E)),e[31]=g.data,e[32]=k.data,e[33]=i.slug,e[34]=E,e[35]=_,e[36]=D,e[37]=L.key,e[38]=s,e[39]=U):U=e[39],U}let F;e[40]!==o||e[41]!==i.slug||e[42]!==L||e[43]!==s?(F=L||!o?null:Mr(zr(i.slug,s,o)),e[40]=o,e[41]=i.slug,e[42]=L,e[43]=s,e[44]=F):F=e[44];const O=F;let $="/",I=null,G=null;L?.kind==="page"?($=L.path,I=L.key):L?.kind==="section"?G=L.key:O&&($=O.path,I=O.pageKey);const W=I?`page:${I}`:G?`section:${G}`:`path:${$}`;let Y;e[45]===Symbol.for("react.memo_cache_sentinel")?(Y=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(rt,{className:"size-5 text-muted-foreground"})}),e[45]=Y):Y=e[45];const q=v.kind==="legacy"?W:`${w}:${W}`,Q=o??"",K=x??void 0,ee=G?null:d,H=G?void 0:a,J=!!I&&p.state.editSeoPageKey===I;let V;return e[46]!==G||e[47]!==I||e[48]!==$||e[49]!==c||e[50]!==i.slug||e[51]!==K||e[52]!==ee||e[53]!==H||e[54]!==J||e[55]!==q||e[56]!==Q||e[57]!==s||e[58]!==p.consumeEditSeo||e[59]!==p.setFocusedBlock||e[60]!==p.setVariantOverride?(V=A(r.jsx(N.Suspense,{fallback:Y,children:r.jsx(ed,{orgSlug:i.slug,virtualMcpId:s,branch:Q,previewReady:!0,previewUrl:K,currentPath:$,activePageBlockKey:I,activeGlobalBlockKey:G,externalSelection:ee,onSectionPicked:H,initialEditSeo:J,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onFocusedBlockChange:p.setFocusedBlock,onViewJsonFile:c},q)})),e[46]=G,e[47]=I,e[48]=$,e[49]=c,e[50]=i.slug,e[51]=K,e[52]=ee,e[53]=H,e[54]=J,e[55]=q,e[56]=Q,e[57]=s,e[58]=p.consumeEditSeo,e[59]=p.setFocusedBlock,e[60]=p.setVariantOverride,e[61]=V):V=e[61],V}function td(t){return r.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function sd(t){const e=le.c(51),{virtualMcpId:s,pageKey:n,onClose:a,ref:c}=t,d=Ee(),i=Xs(),o=i===!0,l=Zs(s);let m;e[0]!==l||e[1]!==n?(m=ea(l,ma(n)),e[0]=l,e[1]=n,e[2]=m):m=e[2];const f=m,{org:p}=ms(),{currentBranch:y,taskId:x}=at(),h=xt().previewUrl;let v;e[3]!==y||e[4]!==p.slug||e[5]!==h||e[6]!==x||e[7]!==s?(v=y?{orgSlug:p.slug,virtualMcpId:s,branch:y,threadId:x??null,previewUrl:h}:null,e[3]=y,e[4]=p.slug,e[5]=h,e[6]=x,e[7]=s,e[8]=v):v=e[8];const g=hs(v),w=y??"";let C;e[9]!==p.slug||e[10]!==w||e[11]!==s?(C={orgSlug:p.slug,virtualMcpId:s,branch:w},e[9]=p.slug,e[10]=w,e[11]=s,e[12]=C):C=e[12];let k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={holdsCopy:!0},e[13]=k):k=e[13];const{save:P,flush:j,hold:R}=ca(C,k),B=y??"";let A;e[14]!==p.slug||e[15]!==B||e[16]!==s?(A=fa({orgSlug:p.slug,virtualMcpId:s,branch:B}),e[14]=p.slug,e[15]=B,e[16]=s,e[17]=A):A=e[17];const L=pa(A);let F;e[18]!==n||e[19]!==L?(F=L(n),e[18]=n,e[19]=L,e[20]=F):F=e[20];const O=F;let $;e[21]!==O||e[22]!==n?($={pageKey:n,copyEpoch:O},e[21]=O,e[22]=n,e[23]=$):$=e[23];const[I,G]=N.useState($);(I.pageKey!==n||I.copyEpoch!==O)&&(G({pageKey:n,copyEpoch:O}),R(n));const W=g.data?.[n],Y=g.data===void 0&&g.isLoading||i===void 0,q=g.data!==void 0&&W===void 0,Q=!y||q||Y;let K;e[24]!==W?(K=W===void 0?"":JSON.stringify(W,null,2),e[24]=W,e[25]=K):K=e[25];const ee=K;let H;e[26]!==n||e[27]!==Q||e[28]!==P?(H=U=>{if(Q)return;let X;try{X=JSON.parse(U)}catch{return}X===null||typeof X!="object"||Array.isArray(X)||P(n,X)},e[26]=n,e[27]=Q,e[28]=P,e[29]=H):H=e[29];const J=H;let V;e[30]!==j?(V=()=>({flush:j}),e[30]=j,e[31]=V):V=e[31],N.useImperativeHandle(c,V);let E;e[32]!==f||e[33]!==o||e[34]!==a||e[35]!==d?(E=o?r.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:r.jsx("span",{title:f,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f})}):r.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:d("sectionsEditor.pageJsonDialog.titleShort")}),r.jsx(Oe,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":d("sectionsEditor.pageJsonDialog.close"),className:"shrink-0",children:r.jsx(Dr,{size:14})})]}),e[32]=f,e[33]=o,e[34]=a,e[35]=d,e[36]=E):E=e[36];let _;e[37]!==O||e[38]!==g.data||e[39]!==j||e[40]!==ee||e[41]!==Y||e[42]!==q||e[43]!==n||e[44]!==Q||e[45]!==J||e[46]!==d?(_=Y?r.jsx("div",{className:"flex flex-1 items-center justify-center",children:r.jsx(rt,{className:"size-5 text-muted-foreground"})}):q?r.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):r.jsx("div",{className:"min-h-0 flex-1",children:r.jsx(ua,{code:ee,language:"json",readOnly:Q,height:"100%",onChange:U=>J(U??""),onSave:U=>{J(U),j()}},`${n}:${g.data===void 0?"loading":"ready"}:${O}`)}),e[37]=O,e[38]=g.data,e[39]=j,e[40]=ee,e[41]=Y,e[42]=q,e[43]=n,e[44]=Q,e[45]=J,e[46]=d,e[47]=_):_=e[47];let D;return e[48]!==E||e[49]!==_?(D=r.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[E,_]}),e[48]=E,e[49]=_,e[50]=D):D=e[50],D}function Tr(t){const e=le.c(3),{currentBranch:s}=at(),n=Kt(t.virtualMcpId,s);let a;return e[0]!==n.kind||e[1]!==t?(a=n.kind==="legacy"?r.jsx(sd,{...t}):r.jsx(nd,{...t}),e[0]=n.kind,e[1]=t,e[2]=a):a=e[2],a}function nd(t){const e=le.c(61),{virtualMcpId:s,pageKey:n,onClose:a,ref:c}=t,d=Ee(),i=Xs(),o=i===!0,l=Zs(s);let m;e[0]!==l||e[1]!==n?(m=ea(l,ma(n)),e[0]=l,e[1]=n,e[2]=m):m=e[2];const f=m,{org:p}=ms(),{currentBranch:y,taskId:x}=at(),h=xt().previewUrl;let v;e[3]!==y||e[4]!==p.slug||e[5]!==h||e[6]!==x||e[7]!==s?(v=y?{orgSlug:p.slug,virtualMcpId:s,branch:y,threadId:x??null,previewUrl:h}:null,e[3]=y,e[4]=p.slug,e[5]=h,e[6]=x,e[7]=s,e[8]=v):v=e[8];const T=v,g=hs(T);let w;e[9]!==n?(w=[n],e[9]=n,e[10]=w):w=e[10];let C;e[11]!==g.data?(C={listing:g.data},e[11]=g.data,e[12]=C):C=e[12];const k=ta(T,w,C),P=y??"";let j;e[13]!==p.slug||e[14]!==P||e[15]!==s?(j={orgSlug:p.slug,virtualMcpId:s,branch:P},e[13]=p.slug,e[14]=P,e[15]=s,e[16]=j):j=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R={holdsCopy:!0},e[17]=R):R=e[17];const{save:B,flush:A,hold:L}=ca(j,R),F=y??"";let O;e[18]!==p.slug||e[19]!==F||e[20]!==s?(O=fa({orgSlug:p.slug,virtualMcpId:s,branch:F}),e[18]=p.slug,e[19]=F,e[20]=s,e[21]=O):O=e[21];const $=pa(O);let I;e[22]!==n||e[23]!==$?(I=$(n),e[22]=n,e[23]=$,e[24]=I):I=e[24];const G=I,W=g.data?.[n];let Y;e[25]!==k.ready||e[26]!==g.data||e[27]!==W?(Y=k.ready&&g.data!==void 0&&(W===void 0||tr(W)),e[25]=k.ready,e[26]=g.data,e[27]=W,e[28]=Y):Y=e[28];const q=Y;let Q;e[29]!==G||e[30]!==n?(Q={pageKey:n,copyEpoch:G,opened:!1,code:""},e[29]=G,e[30]=n,e[31]=Q):Q=e[31];const[K,ee]=N.useState(Q);if(q&&(K.pageKey!==n||K.copyEpoch!==G||!K.opened)){let Z;e[32]!==W?(Z=W===void 0?"":JSON.stringify(W,null,2),e[32]=W,e[33]=Z):Z=e[33],ee({pageKey:n,copyEpoch:G,opened:!0,code:Z}),tr(W)&&L(n)}const H=K.pageKey===n&&K.opened,J=i===void 0||!H&&!q,V=q&&W===void 0,E=!y||V||J;let _;e[34]!==n||e[35]!==E||e[36]!==B?(_=Z=>{if(E)return;ee(oe=>({...oe,code:Z}));let re;try{re=JSON.parse(Z)}catch{return}re===null||typeof re!="object"||Array.isArray(re)||B(n,re)},e[34]=n,e[35]=E,e[36]=B,e[37]=_):_=e[37];const D=_;let U;e[38]!==A?(U=()=>({flush:A}),e[38]=A,e[39]=U):U=e[39],N.useImperativeHandle(c,U);let X;e[40]!==f||e[41]!==o||e[42]!==a||e[43]!==d?(X=o?r.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:r.jsx("span",{title:f,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:f})}):r.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:d("sectionsEditor.pageJsonDialog.titleShort")}),r.jsx(Oe,{variant:"ghost",size:"icon-sm",onClick:a,"aria-label":d("sectionsEditor.pageJsonDialog.close"),className:"shrink-0",children:r.jsx(Dr,{size:14})})]}),e[40]=f,e[41]=o,e[42]=a,e[43]=d,e[44]=X):X=e[44];let se;e[45]!==k.failed||e[46]!==k.retry||e[47]!==A||e[48]!==K.code||e[49]!==K.copyEpoch||e[50]!==K.pageKey||e[51]!==J||e[52]!==V||e[53]!==E||e[54]!==D||e[55]!==H||e[56]!==d?(se=!H&&k.failed?r.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-4",children:[r.jsx("p",{className:"text-sm",children:d("sectionsEditor.hosted.blockLoadFailed")}),r.jsx(Oe,{variant:"outline",size:"sm",onClick:k.retry,children:d("sectionsEditor.namedRules.tryAgain")})]}):J?r.jsx("div",{className:"flex flex-1 items-center justify-center",children:r.jsx(rt,{className:"size-5 text-muted-foreground"})}):V?r.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):r.jsx("div",{className:"min-h-0 flex-1",children:r.jsx(ua,{code:K.code,language:"json",readOnly:E,height:"100%",onChange:Z=>D(Z??""),onSave:Z=>{D(Z),A()}},`${K.pageKey}:${K.copyEpoch}`)}),e[45]=k.failed,e[46]=k.retry,e[47]=A,e[48]=K.code,e[49]=K.copyEpoch,e[50]=K.pageKey,e[51]=J,e[52]=V,e[53]=E,e[54]=D,e[55]=H,e[56]=d,e[57]=se):se=e[57];let z;return e[58]!==X||e[59]!==se?(z=r.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[X,se]}),e[58]=X,e[59]=se,e[60]=z):z=e[60],z}function Ea(t){return t.contentEditingEnabled&&!t.isMobile}function rd(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function ad(t,e){return t==="blocks"?"preview":e?"blocks":t}function od(t){return Ea({contentEditingEnabled:ha(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function id(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}function ld(t){const e=ri(t),{display:s}=t;let n=null;if(s.mode==="production"&&s.iframeBase)try{n=new URL(t.path,s.iframeBase).href}catch{n=null}const a=ai(n,e);return{value:e,frame:a?qs(a,t.device):null,newTab:a}}function cd(t){const e=le.c(94),{tests:s,load:n,onOpen:a,options:c,onChange:d,available:i}=t,o=Ee();let l;e[0]!==c?(l=sa(c),e[0]=c,e[1]=l):l=e[1];const m=l;let f;e[2]!==c.tests?(f=c.tests??{},e[2]=c.tests,e[3]=f):f=e[3];const p=f;let y;e[4]!==d||e[5]!==c?(y=z=>{const Z=z?ol(z):null,{at:re,...oe}=c;d(Z?{...oe,at:Z}:oe)},e[4]=d,e[5]=c,e[6]=y):y=e[6];const x=y;let b;e[7]!==p||e[8]!==d||e[9]!==c?(b=(z,Z)=>{const re={...p};Z==="on"?re[z]=!0:Z==="off"?re[z]=!1:delete re[z];const{tests:oe,...he}=c;d(Object.keys(re).length>0?{...he,tests:re}:he)},e[7]=p,e[8]=d,e[9]=c,e[10]=b):b=e[10];const h=b;let v;e[11]!==a?(v=z=>{z&&a?.()},e[11]=a,e[12]=v):v=e[12];let T;e[13]!==o?(T=o("sandbox.previewAs.label"),e[13]=o,e[14]=T):T=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsx(sl,{size:16}),e[15]=g):g=e[15];let w;e[16]!==m||e[17]!==T?(w=r.jsx(et,{asChild:!0,children:r.jsx(Vr,{asChild:!0,children:r.jsx(Ze,{"aria-label":T,active:m,"data-testid":"preview-as-trigger",children:g})})}),e[16]=m,e[17]=T,e[18]=w):w=e[18];let C;e[19]!==o?(C=o("sandbox.previewAs.label"),e[19]=o,e[20]=C):C=e[20];let k;e[21]!==C?(k=r.jsx(tt,{children:C}),e[21]=C,e[22]=k):k=e[22];let P;e[23]!==k||e[24]!==w?(P=r.jsxs(st,{children:[w,k]}),e[23]=k,e[24]=w,e[25]=P):P=e[25];let j;e[26]!==o?(j=o("sandbox.previewAs.label"),e[26]=o,e[27]=j):j=e[27];let R;e[28]!==j?(R=r.jsx("h3",{className:"text-sm font-medium",children:j}),e[28]=j,e[29]=R):R=e[29];let B;e[30]!==i||e[31]!==o?(B=o(i?"sandbox.previewAs.intro":"sandbox.previewAs.unavailable"),e[30]=i,e[31]=o,e[32]=B):B=e[32];let A;e[33]!==B?(A=r.jsx("p",{className:"text-xs text-muted-foreground",children:B}),e[33]=B,e[34]=A):A=e[34];let L;e[35]!==R||e[36]!==A?(L=r.jsxs("div",{className:"flex flex-col gap-1",children:[R,A]}),e[35]=R,e[36]=A,e[37]=L):L=e[37];let F;e[38]!==o?(F=o("sandbox.previewAs.momentLabel"),e[38]=o,e[39]=F):F=e[39];let O;e[40]!==F?(O=r.jsx(nl,{htmlFor:"preview-as-moment",children:F}),e[40]=F,e[41]=O):O=e[41];let $;e[42]!==c.at?($=al(c.at),e[42]=c.at,e[43]=$):$=e[43];let I;e[44]!==x?(I=z=>x(z.target.value),e[44]=x,e[45]=I):I=e[45];let G;e[46]!==$||e[47]!==I?(G=r.jsx(Us,{id:"preview-as-moment",type:"datetime-local",className:il,value:$,onChange:I}),e[46]=$,e[47]=I,e[48]=G):G=e[48];const W=c.at===void 0;let Y;e[49]!==x?(Y=()=>x(""),e[49]=x,e[50]=Y):Y=e[50];let q;e[51]!==o?(q=o("sandbox.previewAs.now"),e[51]=o,e[52]=q):q=e[52];let Q;e[53]!==W||e[54]!==Y||e[55]!==q?(Q=r.jsx(Oe,{type:"button",variant:"ghost",size:"sm",disabled:W,onClick:Y,children:q}),e[53]=W,e[54]=Y,e[55]=q,e[56]=Q):Q=e[56];let K;e[57]!==G||e[58]!==Q?(K=r.jsxs("div",{className:"flex items-center gap-2",children:[G,Q]}),e[57]=G,e[58]=Q,e[59]=K):K=e[59];let ee;e[60]!==o?(ee=o("sandbox.previewAs.momentHint"),e[60]=o,e[61]=ee):ee=e[61];let H;e[62]!==ee?(H=r.jsx("p",{className:"text-xs text-muted-foreground",children:ee}),e[62]=ee,e[63]=H):H=e[63];let J;e[64]!==O||e[65]!==K||e[66]!==H?(J=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[O,K,H]}),e[64]=O,e[65]=K,e[66]=H,e[67]=J):J=e[67];let V;e[68]!==o?(V=o("sandbox.previewAs.testsLabel"),e[68]=o,e[69]=V):V=e[69];let E;e[70]!==V?(E=r.jsx("span",{className:"text-sm font-medium",children:V}),e[70]=V,e[71]=E):E=e[71];let _;e[72]!==p||e[73]!==n||e[74]!==h||e[75]!==o||e[76]!==s?(_=n&&!n.ready?n.failed?r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.previewAs.testsLoadFailed")}),r.jsx(Oe,{type:"button",variant:"outline",size:"sm",onClick:n.retry,children:o("sandbox.previewAs.tryAgain")})]}):r.jsx("div",{className:"flex justify-center py-2","data-testid":"preview-as-tests-loading",children:r.jsx(rt,{className:"size-4 text-muted-foreground"})}):s.length===0?r.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.previewAs.noTests")}):r.jsxs(r.Fragment,{children:[r.jsx("ul",{className:"flex flex-col gap-1.5",children:s.map(z=>r.jsxs("li",{className:"flex items-center justify-between gap-2","data-testid":"preview-as-test",children:[r.jsx("span",{className:"min-w-0 truncate text-sm",children:z}),r.jsxs(rl,{type:"single",variant:"outline",size:"sm",value:p[z]===void 0?"":p[z]?"on":"off",onValueChange:Z=>h(z,Z),"aria-label":z,children:[r.jsx(vr,{value:"off",children:o("sandbox.previewAs.off")}),r.jsx(vr,{value:"on",children:o("sandbox.previewAs.on")})]})]},z))}),r.jsx("p",{className:"text-xs text-muted-foreground",children:o("sandbox.previewAs.testsHint")})]}),e[72]=p,e[73]=n,e[74]=h,e[75]=o,e[76]=s,e[77]=_):_=e[77];let D;e[78]!==E||e[79]!==_?(D=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[E,_]}),e[78]=E,e[79]=_,e[80]=D):D=e[80];let U;e[81]!==m||e[82]!==d||e[83]!==o?(U=m&&r.jsx(Oe,{type:"button",variant:"outline",size:"sm",onClick:()=>d({}),children:o("sandbox.previewAs.reset")}),e[81]=m,e[82]=d,e[83]=o,e[84]=U):U=e[84];let X;e[85]!==L||e[86]!==J||e[87]!==D||e[88]!==U?(X=r.jsxs(Wr,{className:"flex w-80 flex-col gap-4 p-4",align:"center",sideOffset:8,"data-testid":"preview-as",children:[L,J,D,U]}),e[85]=L,e[86]=J,e[87]=D,e[88]=U,e[89]=X):X=e[89];let se;return e[90]!==P||e[91]!==X||e[92]!==v?(se=r.jsxs(qr,{onOpenChange:v,children:[P,X]}),e[90]=P,e[91]=X,e[92]=v,e[93]=se):se=e[93],se}const dd=["next"],ud=["@tanstack/react-router","@tanstack/react-start","@tanstack/solid-router","@tanstack/solid-start"],Na=new Set(["tsx","ts","jsx","js","mdx"]),fd=new Set(["tsx","jsx"]),pd=new Set(["404","500"]);function md(t){const e=new Set;if(!t||typeof t!="object")return e;const s=t;for(const n of["dependencies","devDependencies"]){const a=s[n];if(a&&typeof a=="object"&&!Array.isArray(a))for(const c of Object.keys(a))e.add(c)}return e}function hd(t){const e=md(t);return dd.some(s=>e.has(s))?"next":ud.some(s=>e.has(s))?"tanstack":null}function Ca(t,e){const s=(t??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return s?`${s}/${e}`:e}function gd(t,e){const s=n=>Ca(e,n);switch(t){case"next":return[{router:"next-pages",dir:s("pages"),pattern:"**/*"},{router:"next-pages",dir:s("src/pages"),pattern:"**/*"},{router:"next-app",dir:s("app"),pattern:"**/page.*"},{router:"next-app",dir:s("src/app"),pattern:"**/page.*"}];case"tanstack":return[{router:"tanstack",dir:s("src/routes"),pattern:"**/*"}];default:{const n=t;throw new Error(`Unknown framework: ${String(n)}`)}}}function nn(t){const e=t.lastIndexOf(".");return e<=0?null:[t.slice(0,e),t.slice(e+1)]}function vd(t){const e=nn(t.at(-1)??"");if(!e||!Na.has(e[1]))return null;const[s]=e;if(s.includes("."))return null;const n=[...t.slice(0,-1),s];return n[0]==="api"||n.length===1&&pd.has(s)||n.some(a=>a.startsWith("_")||a.includes("["))?null:(n.at(-1)==="index"&&n.pop(),`/${n.join("/")}`)}function xd(t){const e=nn(t.at(-1)??"");if(!e||e[0]!=="page"||!Na.has(e[1]))return null;const s=[];for(const n of t.slice(0,-1)){if(n.startsWith("_")||n.startsWith("@")||/^\(\.{1,3}\)/.test(n)||n.includes("["))return null;n.startsWith("(")&&n.endsWith(")")||s.push(n)}return`/${s.join("/")}`}function bd(t){const e=[];let s="",n=!1;for(const a of t)a==="["?n=!0:a==="]"&&(n=!1),a==="."&&!n?(e.push(s),s=""):s+=a;return e.push(s),e}function yd(t){const e=nn(t.at(-1)??"");if(!e||!fd.has(e[1]))return null;const s=[...t.slice(0,-1),...bd(e[0])].filter(Boolean);s.at(-1)==="lazy"&&s.pop();const n=s.at(-1);if(!n||n==="__root"||s.some(c=>c.startsWith("-"))||n.startsWith("_"))return null;(n==="index"||n==="route")&&s.pop();const a=[];for(const c of s){if(c.includes("$"))return null;if(c.startsWith("_")||c.startsWith("(")&&c.endsWith(")"))continue;const d=c.replace(/_$/,"").replace(/[[\]]/g,"");d&&a.push(d)}return`/${a.join("/")}`}function wd(t,e){const s=e.split("/").filter(Boolean);if(s.length===0)return null;switch(t){case"next-pages":return vd(s);case"next-app":return xd(s);case"tanstack":return yd(s);default:{const n=t;throw new Error(`Unknown router: ${String(n)}`)}}}function kd(t){const e=new Set;for(const{root:s,files:n}of t){const a=`${s.dir}/`;for(const c of n){if(!c.startsWith(a))continue;const d=wd(s.router,c.slice(a.length));d&&e.add(d)}}return[...e].sort((s,n)=>s==="/"?-1:n==="/"?1:s.localeCompare(n))}const Sd=5e3,Pd=6e4;async function jd(t,e){const s=await fetch(ll(t,"glob"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pattern:e.pattern,path:e.dir,limit:Sd})});if(!s.ok)throw new Error(`Failed to list ${e.dir}: ${s.status}`);const n=await s.json();return Array.isArray(n.files)?n.files.filter(a=>typeof a=="string"):[]}async function Ed(t,e){const s=await oi(t,Ca(e,"package.json"));if(s.kind==="unavailable")throw new Error("package.json unavailable: sandbox not ready");const n=s.kind==="data"?hd(s.data):null;if(!n)return[];const a=gd(n,e),c=await Promise.all(a.map(async d=>({root:d,files:await jd(t,d)})));return kd(c)}function Nd(t,e,s){const n=le.c(12);let a;n[0]!==e||n[1]!==t?(a=t?Qs.frameworkRoutes(t.orgSlug,t.virtualMcpId,t.branch,t.threadId,e):["framework-routes","none"],n[0]=e,n[1]=t,n[2]=a):a=n[2];let c;n[3]!==e||n[4]!==t?(c=()=>t?Ed(t,e):[],n[3]=e,n[4]=t,n[5]=c):c=n[5];const d=s&&!!t;let i;n[6]!==a||n[7]!==c||n[8]!==d?(i={queryKey:a,queryFn:c,enabled:d,staleTime:Pd},n[6]=a,n[7]=c,n[8]=d,n[9]=i):i=n[9];const o=$r(i);let l;return n[10]!==o.data?(l=o.data??[],n[10]=o.data,n[11]=l):l=n[11],l}const Cd=500,Td={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Rr=1,ds=["desktop","mobile","tablet"],Rd=["preview","visual","blocks"],Ld={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Ad(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 It(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Is(t,e){try{return new URL(t,e).href}catch{return null}}function _d(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const s={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:s,effective:s.url}}return{pin:t,effective:t?.url??null}}function Od(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Fd(t,e,s){const n=t.toLowerCase(),a=e.toLowerCase(),c=a.split("/").filter(Boolean),d=o=>{if(o===s)return 100;const l=o.indexOf(s);if(l===-1)return 0;let m=40;return l===0?m+=30:/[\s/-]/.test(o[l-1]??"")&&(m+=20),m+=Math.round(s.length/o.length*20),m};let i=Math.max(d(n),d(a));return c.at(-1)===s?i=Math.max(i,95):c.includes(s)&&(i=Math.max(i,90)),i}function Dd(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function $d({virtualMcpId:t}){const e=Ee(),s=aa(),{currentBranch:n,taskId:a,virtualMcpId:c}=at(),d=!!To(),i=da(),o=Uo(c===t?t:null),l=Xr(t),m=cl(o?.metadata?.ui?.layout??null),f=ha(m),p=Ea({contentEditingEnabled:f,isMobile:s}),[y]=N.useState(()=>od({cmsMode:m,isMobile:s})),[x,b]=Ks(Hs.previewEditingMode(t),u=>u&&Rd.includes(u)?u:null),h=x??y,[v,T]=Ks(Hs.previewDeviceSize(t),u=>u&&ds.includes(u)?u:"desktop"),[g,w]=N.useState(null),[C,k]=N.useState(null),P=N.useRef(null),j=N.useRef(null),[R,B]=N.useState(!1),A=N.useRef(null),L=()=>{A.current?.flush(),B(!1)},F=()=>B(u=>(u&&A.current?.flush(),!u)),[O,$]=N.useState({width:0,height:0}),[I,G]=N.useState(!1),[W,Y]=N.useState({}),[q,Q]=N.useState(""),K=N.useRef(null),[ee,H]=N.useState(!1),[J,V]=N.useState(),[E,_]=N.useState(null),[D,U]=N.useState(null),[X,se]=N.useState(null),[z,Z]=N.useState(()=>i.state.target?.kind==="page"?i.state.target.path:"/"),[re,oe]=N.useState(()=>i.state.target?.kind==="page"?i.state.target.key:null),[he,pe]=N.useState({}),[be,ge]=N.useState(!1),ve=N.useRef(null),Se=()=>{ge(!0),ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>ge(!1),15e3)},fe=()=>{ve.current&&(clearTimeout(ve.current),ve.current=null),ge(!1)},{org:ce}=ms(),Le=tn(),ze=xt(),Ie=ze.vmEntry,Be=Le.lifecycle.phase,{url:bt}=na(t),me=Kt(t,n),{connection:Fe}=ra(t),xe=Zi(t),Ue=ii({hasServeConnection:!!Fe,runtime:l.runtime}),Ae=!Xe(me)&&me.kind!=="pending",ne=He(me)??bt,de=ne??ze.previewUrl,We=!!ne||Be==="running",yt=o?.id===t?Yo(o.metadata):null,qe=!ne&&o?.id===t&&l.runtime==="cms",Ht=l.projectDefault==="cms",wt=Ae?li({sandboxUrl:de,previewServerUrl:yt,fastPreviewActive:qe}):null,rn=t&&n?{orgSlug:ce.slug,virtualMcpId:t,branch:n,threadId:a??null,previewUrl:de}:null,an=hs(rn,{fetchEnabled:We}),gs=la(rn,{fetchEnabled:We}),ue=an.data,Pe=gs.data,Ge=ue?Ci(ue,Pe).sort((u,S)=>u.name.localeCompare(S.name)):[],Vt=t&&n?{orgSlug:ce.slug,virtualMcpId:t,branch:n}:null,on=qc(Vt),Ta=ci(Vt),vs=ue&&Pe?Ti(ue,Pe):[],ln=Ae&&ue&&Pe?Ui(Pe,ue,"loaders"):[],Ra=q?(()=>{const u=q.toLowerCase();return Ge.map(S=>({page:S,score:Fd(S.name,S.path,u)})).filter(({score:S})=>S>0).sort((S,M)=>M.score-S.score||S.page.path.length-M.page.path.length).map(({page:S})=>S)})():Ge,La=vs.filter(u=>{if(!q)return!0;const S=q.toLowerCase();return u.name.toLowerCase().includes(S)||u.key.toLowerCase().includes(S)||u.resolveType.toLowerCase().includes(S)}),cn=p?ln:[],dn=cn.filter(u=>{if(!q)return!0;const S=q.toLowerCase();return u.title.toLowerCase().includes(S)||u.key.toLowerCase().includes(S)||u.resolveType.toLowerCase().includes(S)}),Wt=D?ln.find(u=>u.key===D)??null:null,Ne=en,xs=E||D?null:Ri(Ge,z,re),ie=xs?.key??null,ot=i.state.target?.kind==="section"?i.state.target.key:i.state.focusedBlockKey??ie,qt=xs?.path??null,it=(ie?he[ie]:void 0)??{},Te=Ve(z,it),bs={};if(Ae&&We&&de&&Pe&&ue){const u=Ki(Pe,"loaders"),S=ie?ue[ie]:void 0,M=fc(S,ue,we=>u.has(we)),ae=ic(M);for(const we of Ut(z)){if(we.type!=="param")continue;const Ce=rc(z,we.name,M),ft=dc(Ce,u,ae);ft.length>0&&(bs[we.name]=ft)}}const kt=t&&n?{orgSlug:ce.slug,virtualMcpId:t,branch:n,threadId:a??null}:null,un=ue&&ie?Vi(ue,ie,0):[],fn=Xe(me),pn=ue?Hi(un,ue,fn):[],St=pn.map(u=>u.isSavedBlock?u.label:""),Pt=pn.map(u=>u.isSavedBlock?"global":u.isMultivariate?"variant":"normal"),jt=un.map(u=>Gs(u,ue??{},fn)),lt=N.useRef(null),De=N.useRef(null),Aa=Le.status.state==="paused",ys=Le.phase,mn=Gi({claimPhase:ys,lifecycle:Le.lifecycle}),Je=ze.previewState,_a=ze.userStopped,Oa=di(ce.slug,t??""),{url:Ke}=Di(qe&&t&&n?{orgSlug:ce.slug,virtualMcpId:t,branch:n,previewServerUrl:yt??null,path:Te}:null),Fa=Ht&&l.runtime==="sandbox",_e=ui(me,Ue,xe),hn=fi(_e&&qe&&me.kind==="protocol"&&t&&n?{orgSlug:ce.slug,virtualMcpId:t,branch:n}:null),gn=_e?hn.pointer:null,te=Bl({previewState:Je,progressStatus:mn.status,previewServerUrl:yt,fastPreviewActive:qe,fastPreviewReady:!!Ke,codingSession:Fa,localPreviewUrl:ne,hostedDraft:_e,hostedPointerPending:_e&&(me.kind==="pending"||hn.pending)}),vn=te.showWakingPill||_e&&te.mode==="production"&&!gn,Et=te.mode!=="none",Da=te.mode==="production"&&te.iframeBase?It(te.iframeBase):null,ct=te.mode==="production"?Da:It(de),$a=o?.id===t&&o.metadata?.fastPreviewInPlace===!0,Nt=Ae?ne?te.mode==="sandbox"&&p&&h==="blocks":te.mode==="production"&&qe&&$a&&p&&h==="blocks":!1,xn=N.useRef(null),{pin:Ba,effective:Ma}=_d(xn.current,{inPlaceRenderActive:Nt,draftPreviewUrl:Ke,resolvedPath:Te});xn.current=Ba;const bn=i.state.variantOverride??[],Gt=Ae?bn:[],Ct=Ae?[]:bn,Jt=Xe(me)&&Li.some(u=>Ai(Pe,u)==="available"),dt=Jt?W:{},yn=sa(dt),za=Jt&&ue?Object.keys(_i(ue).experiments):[],[wn,Ia]=N.useState(!1),kn=ta(Vt,Jt&&wn?Oi:[]),Ua={...kn,ready:!(me.kind==="protocol"&&me.hosted)||wn&&kn.ready},Ye=t?rr(ce.slug,t):null,Ka=pi(Ye),Yt=_e?ld({display:te,path:Te,pointer:gn,heldRevision:Ka,device:v,forcedVariants:Ct,previewOptions:dt}):null,Sn=JSON.stringify([Ct,dt]);N.useEffect(()=>{if(!_e||!Ye)return;const[u,S]=JSON.parse(Sn);ar(Ye,{forcedVariants:u,previewOptions:S})},[_e,Ye,Sn]),N.useEffect(()=>{if(!(!_e||!Ye))return()=>ar(Ye,null)},[_e,Ye]);const ws=Fe&&He(me)?mi(Fe.endpoint,Ct,yn):null,Ha=Fe&&He(me)?ws?hi(ws,dt):or:null,Qe=Ad(te.mode==="sandbox"?as(qs(ir(X??Is(Te,te.iframeBase)??te.iframeBase,Ha),v),Gt):te.mode==="production"&&Yt?.frame?Yt.frame:te.mode==="production"?as(qs(lr(cr(ir(X??Ma??Is(Te,te.iframeBase)??te.iframeBase,vn?or:null),Ct),dt),v),Gt):null),Pn=Ke??(te.iframeBase?Is(Te,te.iframeBase):null),jn=te.mode==="production"&&Yt?Yt.newTab:te.mode==="production"?Pn?as(lr(cr(Pn,Ct),dt),Gt):null:Qe??te.iframeBase,Va=()=>{const u=jn;u&&window.open(u,"_blank","noopener")},Tt=t&&n?zr(ce.slug,t,n):null,Rt=u=>{Tt&&Lo(Tt,u)},ke=i.state.target;N.useEffect(()=>{if(!(!ke||!wt||!Pe))if(ke.kind==="page"){const u=he[ke.key]??{};De.current=Ve(ke.path,u),_(null),U(null),se(null),oe(ke.key),Z(ke.path),Rt({path:ke.path,pageKey:ke.key,params:u})}else if(ke.kind==="loader")De.current=null,_(null),U(ke.key),se(null);else{const u=vs.find(S=>S.key===ke.key);if(u){De.current=null;const S=fr(Pe);U(null),_(u),se(dr(wt,S,u.key))}}},[ke,wt,Pe,he]),N.useEffect(()=>{!ie||qt===null||ke?.kind==="page"&&ke.key===ie&&ke.path===qt||i.selectTarget({kind:"page",key:ie,path:qt})},[ie,qt,ke]);const[En,Wa]=N.useState(null);if(Je.kind==="iframe"&&En!==Je.previewUrl){const u=En!==null;Wa(Je.previewUrl);const S=Tt?Mr(Tt):null;if(S){if(De.current=Ve(S.path,S.params),Z(S.path),oe(S.pageKey),se(null),_(null),U(null),S.pageKey&&Object.keys(S.params).length>0){const M=S.pageKey;pe(ae=>({...ae,[M]:S.params}))}}else u&&(De.current=null,Z("/"),se(null),oe(null),_(null),U(null))}lt.current=Qe;const qa=te.mode==="production"&&!!Ke&&!ne,[Qt,ks]=N.useState({src:Qe??void 0,loading:!1}),[Ga,Ss]=N.useState(!1),[Ja,Ya]=N.useState(),[Nn,Cn]=N.useState(null),je=Vo(Nn,{base:te.iframeBase??"",frameSrc:Qt.src,loadedSrc:Ja,wanted:Qe??void 0,canSwap:xe&&Ga&&!Qt.loading});je!==Nn&&Cn(je);const Xt=Wo(Qt,je?je.src:Qe??void 0,qa);Xt!==Qt&&ks(Xt);const ut=Xt.src,Tn=Xt.loading,Rn=qo({iframeRef:P,src:te.mode==="sandbox"?Qe:null,active:te.mode==="sandbox"}),Ln=N.useRef(null);N.useEffect(()=>{const u=Tn?setTimeout(()=>ks(nr),Go):null,S=()=>{u&&clearTimeout(u)};if(!Ke||!ut||Ln.current===Ke)return S;Ln.current=Ke;const M=P.current;return M&&M.getAttribute("src")!==ut&&(Se(),M.src=ut),S},[Ke,ut,Tn]);const An=()=>{const u=P.current?.contentWindow,S=ct;if(!u||!S||!ue||!ie)return;const M=ue[ie];if(!M||typeof M!="object")return;const ae=bi({previewBaseUrl:S,pageBlock:M,decofile:ue,path:Te,pathTemplate:z});if(!ae)return;const we=as(ae.src,wi(Gt,ie));u.postMessage({type:"cms-editor::render",src:we,body:ae.body},S)},Ps=N.useRef(null);N.useEffect(()=>{if(!Nt||E||D||!ie||!ue){Ps.current=null;return}const u={nav:JSON.stringify({page:ie,path:Te,pathTemplate:z}),content:JSON.stringify(ue)},S=Od(Ps.current,u);Ps.current=u,S&&An()},[ue,Nt,E,D,ie,Te,z]);const js=N.useRef(null);N.useEffect(()=>{if(!Nt||E||D||!ie||!ue){js.current=null;return}const u=JSON.stringify(i.state.variantOverride??null),S=js.current;js.current={page:ie,sig:u},!(!S||S.page!==ie||S.sig===u)&&An()},[i.state.variantOverride,Nt,E,D,ie]);const _n=!!t&&!!n&&!Le.notFound&&!_a&&!Aa&&(ys?.kind==="ready"||Be!=="idle"),On=!Xe(me),Qa=Zs(t??void 0),Xa=Nd(kt,Qa,On&&_n),Za=new Set(f?Ge.map(u=>Ne(u.path)):[]),Lt=On?Xa.filter(u=>!Za.has(Ne(u))):[],Fn=q?Lt.filter(u=>u.toLowerCase().includes(q.toLowerCase())):Lt,ye=id({editingMode:h,sandboxDisplay:te.mode==="sandbox",blocksEditingEnabled:p});N.useEffect(()=>{const u=ct;if(!u)return;const S=M=>{if(M.origin===u)if(M.data?.type==="visual-editor::element-clicked"){const ae=Ul.safeParse(M.data.payload);ae.success&&w(ae.data)}else if(M.data?.type==="cms-editor::section-clicked"){const ae=Vl.safeParse(M.data.payload);ae.success&&k({index:ae.data.sectionIndex,seq:ae.data.clickSeq})}else M.data?.type==="cms-editor::render-start"?Se():M.data?.type==="cms-editor::render-end"?(fe(),P.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:St,kinds:Pt,keys:jt},u)):M.data?.type==="cms-editor::render-error"&&fe()};return window.addEventListener("message",S),()=>window.removeEventListener("message",S)},[ct,St,Pt,jt]);const Dn=()=>{const u=P.current?.contentWindow,S=It(de),M=Hc({v8:xe,script:Kl});!u||!S||!M||u.postMessage(M,S)},eo=()=>{if(xe)return;const u=P.current?.contentWindow,S=It(de);!u||!S||u.postMessage({type:"visual-editor::deactivate"},S)},$n=()=>{const u=Me.current;u?.has("wireframe")&&(u.wireframe({type:"wireframe:sections",labels:St,kinds:Pt,keys:jt}),u.wireframe({type:ye==="blocks"?"wireframe:activate":"wireframe:deactivate"}))},Es=()=>{if(xe){$n();return}const u=P.current?.contentWindow,S=ct,M=Kc({v8:xe,production:te.mode==="production",localPreview:!!ne,script:Wl});!u||!S||!M||(u.postMessage(M,S),u.postMessage({type:"cms-editor::set-labels",labels:St,kinds:Pt,keys:jt},S))},to=()=>{if(xe){Me.current?.wireframe({type:"wireframe:deactivate"});return}const u=P.current?.contentWindow,S=ct;!u||!S||u.postMessage({type:"cms-editor::deactivate"},S)},Bn=u=>{Me.current?.wireframe({type:"wireframe:scroll-to",sectionIndex:u})},so=()=>{if(Me.current?.wireframe({type:"wireframe:clear-hover"}),xe)return;const u=P.current?.contentWindow,S=ct;!u||!S||(u.postMessage({type:"cms-editor::clear-hover"},S),u.postMessage({type:"visual-editor::clear-hover"},S))},Zt=u=>{if(u==="blocks"&&!p)return;const S=h;!s&&u!==S&&(u==="blocks"?j.current?.resize("30%"):j.current?.collapse()),b(u),w(null),k(null),u!=="blocks"&&U(null),S==="visual"&&eo(),u==="visual"&&Dn(),S==="blocks"&&u!=="blocks"&&to(),u==="blocks"&&Es()},no=()=>{Zt(rd(h,p))},ro=()=>{Zt(ad(h,p))},es=()=>{const u=P.current;if(!u)return;Se();const S=document.activeElement,M=u.tabIndex;u.tabIndex=-1,u.style.pointerEvents="none",u.blur(),Dd(u,lt.current);let ae;const we=()=>{clearTimeout(ae),u.tabIndex=M,u.style.pointerEvents="";const Ce=document.activeElement;(!Ce||Ce===document.body||Ce===u)&&S?.focus(),u.removeEventListener("load",we)};u.addEventListener("load",we),ae=setTimeout(we,3e3)};qi(es);const Me=N.useRef(null),Mn=N.useEffectEvent($n),ao=N.useEffectEvent((u,S)=>{k({index:u,seq:S})}),oo=N.useEffectEvent(()=>{fe(),je&&(Ns.current=je.shown),_t&&_s(At)}),zn=N.useEffectEvent(()=>{if(Ss(!1),je&&Cn(null),je&&je.src!==lt.current){Se();return}es()});N.useEffect(()=>{if(!xe)return;const u=new Ql({studioOrigin:window.location.origin,build:"4.587.1",frame:()=>P.current?.contentWindow??null,onWireframeReady:()=>Mn(),onWireframe:M=>{M.type==="wireframe:select"&&ao(M.sectionIndex,M.clickSeq)},onModulesChange:()=>Ss(u.has("html-swap")),onSwapEnd:()=>oo(),onSwapFailed:()=>zn()});Me.current=u;const S=M=>{u.handle(M)};return window.addEventListener("message",S),()=>{window.removeEventListener("message",S),u.dispose(),Ss(!1),Me.current===u&&(Me.current=null)}},[xe,te.iframeBase]);const In=xe?JSON.stringify([St,Pt,jt,ye]):"";N.useEffect(()=>{In&&Mn()},[In]);const Un=N.useRef(null);N.useEffect(()=>{const u=Un.current;if(Un.current=je,je&&je!==u){Me.current?.refresh(je.shown)?Se():zn();return}!je&&u&&u.shown!==u.src&&u.src===lt.current&&es()},[je]);const Kn=()=>{Me.current?.refresh()||es()},At=rr(ce.slug,t??""),_t=_e&&Et&&!!t,Ns=N.useRef(null);N.useEffect(()=>{if(_t)return gi(At)},[_t,At]);const{reload:Ot}=vi(ce.slug,t??""),Hn=N.useRef(Ot.seq);N.useEffect(()=>{if(Hn.current!==Ot.seq&&(Hn.current=Ot.seq,!!_t&&Ns.current===lt.current)){if(Ot.navigates){_s(At);return}Kn()}},[Ot.seq]);const Cs=Zr(Vt),Ft=xi(He(me)?Cs:""),Vn=N.useRef(Ft);N.useEffect(()=>{const u=Vn.current;if(Vn.current=Ft,!u||!Ft||u===Ft)return;const S=P.current;if(S)return Il({iframe:S,reload:Kn})},[Ft]);const Wn=()=>{const u=ds.indexOf(v);T(ds[(u+1)%ds.length])},Ts=(u,S)=>{if(!ie)return;const M=ie,ae={...it,[u]:S};De.current=Ve(z,ae),pe(we=>({...we,[M]:ae})),Rt({path:z,pageKey:M,params:ae})},io=zc({iframeBase:te.iframeBase,resolvedPath:Te,activeGlobalSectionName:E?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Rs=u=>{const S=he[u.key]??{},M=Ve(u.path,S);(E||Ne(M)!==Ne(Te))&&Se(),De.current=M,_(null),U(null),se(null),k(null),oe(u.key),Z(u.path),Rt({path:u.path,pageKey:u.key,params:S}),i.selectTarget({kind:"page",key:u.key,path:u.path})},qn=u=>{(E||Ne(u)!==Ne(Te))&&Se(),De.current=u,_(null),U(null),se(null),k(null),oe(null),Z(u),Rt({path:u,pageKey:null,params:{}})};Ro(Tt,qn);const lo=u=>{if(Xe(me)){const ae=ue?Fi(ue,u.key,Pe):null;ae?Rs(ae):fs.info(e("sandbox.preview.blockOnNoPage"));return}if(!wt||!Pe){fs.error(e("sandbox.preview.previewMetadataNotReady"));return}Se(),De.current=null;const S=fr(Pe),M=dr(wt,S,u.key);_(u),U(null),se(M),k(null),i.selectTarget({kind:"section",key:u.key})},co=u=>{p&&(_(null),U(u.key),se(null),Zt("blocks"),i.selectTarget({kind:"loader",key:u.key}))},uo=async({name:u,path:S,templateKey:M})=>{if(!t||!n)return;const ae=ia(S);if(ae){V(ae);return}const we=S.trim().startsWith("/")?S.trim():`/${S.trim()}`;if(Ge.some(Ce=>Ne(Ce.path)===Ne(we))){V(e("sandbox.preview.pageAlreadyExists",{path:we}));return}V(void 0);try{const Ce=M?await Ta(ue,M):void 0;if(M&&!Ce){V(e("sandbox.preview.templateNoLongerExists"));return}const ft=await on.mutateAsync({name:u,path:we,template:Ce,schema:Xe(me)?{meta:Pe,loadMeta:async()=>(await gs.refetch()).data}:void 0});H(!1),fs.success(e("sandbox.preview.pageCreated",{name:u})),await ul(Cd),Rs({key:ft.key,name:ft.name,path:ft.path}),Zt("blocks")}catch(Ce){V(Ce instanceof ja?e("sandbox.preview.pageSchemaNotReady"):Ce instanceof Error?Ce.message:e("sandbox.preview.failedToCreatePage"))}},Dt=Ic({previewSurfaceActive:Et,daemonReady:_n,production:te.mode==="production",servePreviewUrl:He(me)}),Gn=Uc({showPreviewToolbar:Dt,contentEditingEnabled:f,hasFrameworkRoutes:Lt.length>0}),Jn=f?Ra:[],Yn=f?La:[],$t=()=>{G(!1),Q("")},Ls=f?E?.name??Wt?.title??xs?.name:void 0,As=f&&(an.isPending||gs.isPending),ts=As?It(te.iframeBase):Ls,Bt=E?`section:${E.key}`:D?`loader:${D}`:f&&ie?`page:${ie}`:Lt.includes(Ne(z))?`route:${Ne(z)}`:void 0,ss=e(Ld[v]),Qn=v==="mobile"?r.jsx(Ur,{size:16}):v==="tablet"?r.jsx(Bo,{size:16}):r.jsx(Kr,{size:16}),fo=Dt?Gn?r.jsxs("div",{className:"flex h-7 min-w-36 flex-1 items-stretch overflow-hidden rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background transition-colors hover:border-border",children:[r.jsxs(st,{children:[r.jsx(et,{asChild:!0,children:r.jsx("button",{type:"button",onClick:Wn,"aria-label":ss,className:Re("flex w-7 shrink-0 items-center justify-center border-r border-border/60 text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",ur),children:Qn})}),r.jsx(tt,{children:ss})]}),r.jsxs(qr,{open:I,onOpenChange:u=>{G(u),u||Q("")},children:[r.jsx(Vr,{asChild:!0,children:r.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:As?ts??void 0:E||Wt?Ls:[Ls,z].filter(Boolean).join(" · "),className:Re("group/page-picker flex min-w-0 flex-1 items-stretch whitespace-nowrap text-left text-xs text-muted-foreground",ur),children:r.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[E&&r.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-2xs font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[r.jsx(Do,{size:11}),e("sandbox.preview.globalBadge")]}),Wt&&r.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:[r.jsx(Mo,{size:11}),e("sandbox.preview.loaderBadge")]}),ts&&r.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:ts}),!As&&!E&&!Wt&&r.jsx("span",{"data-testid":"preview-page-path",className:Re("min-w-0 truncate font-mono [direction:rtl]",ts?"ml-auto shrink-[2] text-right text-muted-foreground md:@max-[40rem]/panel-toolbar:hidden":"flex-1 text-left text-foreground"),children:r.jsx("bdi",{dir:"ltr",children:z})}),r.jsx(Ao,{size:12,className:Re("shrink-0 transition-transform",I&&"rotate-180")})]})})}),r.jsxs(Wr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[r.jsxs(Jr,{shouldFilter:!1,defaultValue:Bt,children:[r.jsx(Yr,{value:q,onValueChange:u=>{Q(u),K.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),r.jsxs(Gr,{ref:K,className:"max-h-80",children:[r.jsx(Qr,{children:(!f||Ge.length===0)&&Lt.length===0&&(!f||vs.length===0)&&cn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),Jn.length>0&&r.jsx(ht,{children:Jn.map(u=>r.jsxs(gt,{value:`page:${u.key}`,"aria-current":Bt===`page:${u.key}`||void 0,title:`${u.name} · ${u.path}`,onSelect:()=>{$t(),Rs(u)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:u.name}),r.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:u.path})]},u.key))}),Fn.length>0&&r.jsx(ht,{heading:e("sandbox.preview.siteRoutes"),children:Fn.map(u=>r.jsx(gt,{value:`route:${u}`,"aria-current":Bt===`route:${u}`||void 0,title:u,onSelect:()=>{$t(),qn(u)},className:"px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:r.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:u})},u))}),Yn.length>0&&r.jsx(ht,{heading:e("sandbox.preview.globalComponents"),children:Yn.map(u=>r.jsx(gt,{value:`section:${u.key}`,"aria-current":Bt===`section:${u.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{$t(),lo(u)},children:r.jsx("span",{className:"truncate",children:u.name})},u.key))}),dn.length>0&&r.jsx(ht,{heading:e("sandbox.preview.globalLoaders"),children:dn.map(u=>r.jsx(gt,{value:`loader:${u.key}`,"aria-current":Bt===`loader:${u.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{$t(),co(u)},children:r.jsx("span",{className:"truncate",children:u.title})},u.key))})]})]}),f&&!E&&!D&&Ut(z).some(u=>u.type!=="text")&&r.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:Ut(z).map((u,S)=>{if(u.type==="text")return r.jsx("span",{children:u.text},`text-${S}`);const M=bs[u.name];return M&&kt?r.jsx(Nc,{sources:M,template:z,paramName:u.name,value:it[u.name]??"",sandboxRef:kt,onCommit:ae=>Ts(u.name,ae)},`${ie}:${u.name}`):r.jsx(Bc,{name:u.name,value:it[u.name]??"",onCommit:ae=>Ts(u.name,ae)},`${ie}:${u.name}`)})}),f&&r.jsx("div",{className:"border-t p-1.5",children:r.jsxs(Oe,{variant:"ghost",className:"w-full justify-start",onClick:()=>{$t(),V(void 0),H(!0)},children:[r.jsx(Hr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]})]}):r.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:io}):null,Xn=Dt||f?r.jsxs("div",{className:"flex min-w-0 max-w-[24rem] flex-1 items-center justify-center gap-1",children:[!(Dt&&Gn)&&r.jsxs(st,{children:[r.jsx(et,{asChild:!0,children:r.jsx(Ze,{onClick:Wn,"aria-label":ss,children:Qn})}),r.jsx(tt,{children:ss})]}),fo,r.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[Jt&&r.jsx(cd,{tests:za,load:Ua,onOpen:()=>Ia(!0),options:W,onChange:u=>{Y(u),i.previewAsChanged()},available:!!ws||!vn||!yn}),r.jsx(Ze,{onClick:Va,disabled:_e&&!jn,"aria-label":e("sandbox.preview.openInNewTab"),children:r.jsx(Br,{size:16})})]})]}):null,po=(Ae||d)&&te.mode==="sandbox",ns=Td[v],rs=v==="desktop"&&(O.width===0||O.width>=ns.width+2*Rr),Zn=rs?1:Math.min(O.width>0?O.width/(ns.width+2*Rr):1,1),mo=rs?{width:"100%",height:"100%"}:{width:`${ns.width}px`,height:O.height>0?`${O.height/Zn}px`:`${ns.height}px`,transform:`scale(${Zn})`,transformOrigin:"top center"},er=r.jsxs(r.Fragment,{children:[po&&(Dt||f)&&r.jsx(Ze,{onClick:no,"aria-pressed":ye==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ye==="visual",children:r.jsx(sr,{size:16})}),p&&r.jsxs(st,{children:[r.jsx(et,{asChild:!0,children:r.jsx(Ze,{onClick:ro,"aria-pressed":ye==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ye==="blocks",children:r.jsx(zo,{size:16})})}),r.jsx(tt,{children:e("sandbox.preview.blocksEditor")})]}),ot&&r.jsxs(st,{children:[r.jsx(et,{asChild:!0,children:r.jsx(Ze,{onClick:F,"aria-pressed":R,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:R,children:r.jsx($o,{size:16})})}),r.jsx(tt,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),ho=!!D&&ye==="blocks";return r.jsxs("div",{className:"flex flex-col w-full h-full",children:[kt&&Object.entries(bs).map(([u,S])=>(it[u]??"")===""?r.jsx(Dc,{sources:S,template:z,paramName:u,sandboxRef:kt,onFill:M=>Ts(u,M)},`${ie}:${u}`):null),r.jsxs(r.Fragment,{children:[r.jsx(Vs.Toolbar.Center.Portal,{fallback:r.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Xn}),children:Xn}),r.jsx(Vs.Toolbar.Right.Portal,{fallback:er,children:er})]}),r.jsx("div",{className:"flex-1 overflow-hidden relative",children:ho?r.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[r.jsx(Cr,{virtualMcpId:t,externalSelection:C,onSectionPicked:Bn,onViewJsonFile:F}),R&&ot&&r.jsx("div",{className:"absolute inset-0 z-10",children:r.jsx(Tr,{ref:A,virtualMcpId:t,pageKey:ot,onClose:L},me.kind==="legacy"?void 0:JSON.stringify([Cs,xe]))})]}):r.jsxs(mr,{orientation:"horizontal",disabled:ye!=="blocks",className:"relative isolate",children:[r.jsx(os,{ref:j,id:"preview-blocks-editor",defaultSize:ye==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ye==="blocks"&&r.jsx(Cr,{virtualMcpId:t,externalSelection:C,onSectionPicked:Bn,onViewJsonFile:F})}),ye==="blocks"&&r.jsx(hr,{withHandle:!0}),r.jsx(os,{id:"preview-canvas",defaultSize:ye==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:r.jsxs(mr,{orientation:"horizontal",disabled:!(R&&ot),children:[r.jsx(os,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:r.jsxs("div",{ref:u=>{if(!u)return;const S=()=>$(ae=>ae.width===u.clientWidth&&ae.height===u.clientHeight?ae:{width:u.clientWidth,height:u.clientHeight});S();const M=new ResizeObserver(S);return M.observe(u),()=>M.disconnect()},className:Re("h-full relative overflow-clip flex justify-center",Et&&!rs&&"bg-muted/30"),children:[(be||Oa)&&Et&&r.jsx(Jo,{}),te.showDecidingLoader&&r.jsx("div",{"data-testid":"preview-deciding",className:"absolute inset-0 z-30 flex items-center justify-center",children:r.jsx(rt,{className:"size-5 text-muted-foreground"})}),te.showBlockingOverlay&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Fs,{kind:"starting",progress:mn,claimPhase:ys})}),!ne&&Je.kind==="suspended"&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Fs,{kind:"suspended",onResume:ze.resume})}),!ne&&Je.kind==="errored"&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Fs,{kind:"errored",error:Je.error,onRetry:ze.retry,connectionsHref:`/${ce.slug}/settings/connections`})}),te.showWakingPill&&r.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl bg-muted px-4 py-3 shadow-soft pointer-events-none select-none",children:[r.jsx(rt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),r.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),ye==="visual"&&!g&&r.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-special/40 bg-special/90 px-3 py-1 text-xs font-medium text-special-foreground shadow-soft backdrop-blur-sm pointer-events-none select-none",children:[r.jsx(sr,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ye==="visual"&&g&&r.jsx(tc,{element:g,onDismiss:()=>w(null)}),Et&&Qe&&r.jsx("div",{className:Re("shrink-0",!rs&&"bg-background shadow-edge"),style:mo,onMouseLeave:so,children:r.jsx("iframe",{ref:P,src:ut,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:Rn.handleError,onLoad:()=>{if(ks(nr),Ya(ut),Rn.handleLoad(),fe(),Ns.current=lt.current,_t&&_s(At),te.mode!=="sandbox"||ne){(te.mode==="production"&&!te.showWakingPill||ne)&&ye==="blocks"&&Es();return}if(Po("vm_preview_loaded",{view_mode:ye,vm_id:Ie?.sandboxHandle??null}),!E)try{const u=P.current?.contentWindow?.location?.pathname;if(!u)return;const S=De.current;if(S!==null&&(De.current=null,Ne(u)!==Ne(S))||Ne(u)===Ne(Te))return;Z(u),Rt({path:u,pageKey:re,params:it})}catch{}ye==="visual"&&Dn(),ye==="blocks"&&Es()}},te.iframeBase)})]})}),R&&ot&&r.jsxs(r.Fragment,{children:[r.jsx(hr,{withHandle:!0}),r.jsx(os,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:r.jsx(Tr,{ref:A,virtualMcpId:t,pageKey:ot,onClose:L},me.kind==="legacy"?void 0:JSON.stringify([Cs,xe]))})]})]})})]})}),r.jsx(Gc,{open:ee,onOpenChange:H,isPending:on.isPending,error:J,templates:Ge,onSubmit:uo})]})}const Ys={app:null,split:!1};function Bd(t){const e=le.c(24),{project:s,maxApps:n,children:a}=t,c=Ee();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={silent:!0},e[0]=d):d=e[0];const i=Ko(d),o=xt();let l;e[1]!==s.metadata.runtime?(l=s.metadata.runtime??{},e[1]=s.metadata.runtime,e[2]=l):l=e[2];const m=l;let f;e[3]!==m.apps?(f=m.apps??[],e[3]=m.apps,e[4]=f):f=e[4];const p=f;let y;e[5]!==i.update||e[6]!==o||e[7]!==s.id||e[8]!==s.metadata||e[9]!==m||e[10]!==c?(y=g=>i.update.mutate({id:s.id,data:{metadata:{...fl(s.metadata),runtime:{...m,apps:g.length?g:null}}}},{onSuccess:()=>o.start(),onError:()=>fs.error(c("sandbox.appTabs.saveError"))}),e[5]=i.update,e[6]=o,e[7]=s.id,e[8]=s.metadata,e[9]=m,e[10]=c,e[11]=y):y=e[11];const x=y,b=m.path??null;let h,v;e[12]!==p||e[13]!==x?(h=g=>x([...p,{path:g}]),v=g=>x(p.filter(w=>w.path!==g)),e[12]=p,e[13]=x,e[14]=h,e[15]=v):(h=e[14],v=e[15]);let T;return e[16]!==p||e[17]!==a||e[18]!==n||e[19]!==s.id||e[20]!==b||e[21]!==h||e[22]!==v?(T=r.jsx(Md,{virtualMcpId:s.id,mainPath:b,apps:p,maxApps:n,onAddApp:h,onRemoveApp:v,children:a}),e[16]=p,e[17]=a,e[18]=n,e[19]=s.id,e[20]=b,e[21]=h,e[22]=v,e[23]=T):T=e[23],T}function Md(t){const e=le.c(102),{virtualMcpId:s,mainPath:n,apps:a,maxApps:c,onAddApp:d,onRemoveApp:i,children:o}=t,l=Ee(),m=aa(),{currentBranch:f}=at(),p=xt(),y=tn().lifecycle.phase,x=Kt(s,f),{url:b}=na(s);let h;e[0]!==x||e[1]!==b?(h=He(x)??b,e[0]=x,e[1]=b,e[2]=h):h=e[2];const v=h,T=v??p.previewUrl,g=!!v||y==="running",w=!g&&p.status==="errored";let C;e[3]!==p.vmEntry?.startedWith?.apps?(C=p.vmEntry?.startedWith?.apps??[],e[3]=p.vmEntry?.startedWith?.apps,e[4]=C):C=e[4];const k=C;let P;e[5]!==s?(P=Hs.previewAppLayout(s),e[5]=s,e[6]=P):P=e[6];const[j,R]=Ks(P,zd);let B;e[7]!==a||e[8]!==j?(B=a.some(fe=>fe.path===j.app)?j.app:null,e[7]=a,e[8]=j,e[9]=B):B=e[9];const A=B,L=A!==null&&j.split&&!m,F=A===null||L,O=A??a[0]?.path??null,[$,I]=N.useState(null),[G,W]=N.useState(!1);let Y;e[10]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>{I(null),W(!1)},e[10]=Y):Y=e[10];const q=Y;let Q;e[11]!==a||e[12]!==$||e[13]!==m||e[14]!==n||e[15]!==d||e[16]!==R?(Q=()=>{if($===null)return;const fe=xr($);if(!fe){q();return}if(fe===xr(n??"")||a.some(ce=>ce.path===fe)){W(!0);return}d(fe),R({app:fe,split:!m}),q()},e[11]=a,e[12]=$,e[13]=m,e[14]=n,e[15]=d,e[16]=R,e[17]=Q):Q=e[17];const K=Q;let ee;e[18]!==n||e[19]!==l?(ee=n?Ds(n):l("sandbox.appTabs.root"),e[18]=n,e[19]=l,e[20]=ee):ee=e[20];const H=ee;let J;e[21]!==L||e[22]!==l?(J=l(L?"sandbox.appTabs.single":"sandbox.appTabs.split"),e[21]=L,e[22]=l,e[23]=J):J=e[23];const V=J;let E;e[24]!==l?(E=l("sandbox.appTabs.label"),e[24]=l,e[25]=E):E=e[25];let _;e[26]!==l?(_=l("sandbox.appTabs.main"),e[26]=l,e[27]=_):_=e[27];let D;e[28]!==l?(D=l("sandbox.appTabs.mainHint"),e[28]=l,e[29]=D):D=e[29];let U;e[30]!==R?(U=()=>R(Ys),e[30]=R,e[31]=U):U=e[31];let X;e[32]!==w||e[33]!==H||e[34]!==g||e[35]!==F||e[36]!==_||e[37]!==D||e[38]!==U?(X=r.jsx(Lr,{label:H,badge:_,hint:D,ready:g,failed:w,onScreen:F,onSelect:U}),e[32]=w,e[33]=H,e[34]=g,e[35]=F,e[36]=_,e[37]=D,e[38]=U,e[39]=X):X=e[39];let se;if(e[40]!==a||e[41]!==A||e[42]!==w||e[43]!==H||e[44]!==i||e[45]!==g||e[46]!==R||e[47]!==L||e[48]!==l){let fe;e[50]!==A||e[51]!==w||e[52]!==H||e[53]!==i||e[54]!==g||e[55]!==R||e[56]!==L||e[57]!==l?(fe=ce=>{const Le=Ds(ce.path);return r.jsx(Lr,{label:Le,hint:l("sandbox.appTabs.extraHint",{app:H}),ready:g,failed:w,onScreen:ce.path===A,onSelect:()=>R({app:ce.path,split:L}),onRemove:()=>i(ce.path),removeLabel:l("sandbox.appTabs.remove",{app:Le})},ce.path)},e[50]=A,e[51]=w,e[52]=H,e[53]=i,e[54]=g,e[55]=R,e[56]=L,e[57]=l,e[58]=fe):fe=e[58],se=a.map(fe),e[40]=a,e[41]=A,e[42]=w,e[43]=H,e[44]=i,e[45]=g,e[46]=R,e[47]=L,e[48]=l,e[49]=se}else se=e[49];let z;e[59]!==X||e[60]!==se||e[61]!==E?(z=r.jsxs("div",{role:"tablist","aria-label":E,className:"flex min-w-0 items-center gap-1 overflow-x-auto",children:[X,se]}),e[59]=X,e[60]=se,e[61]=E,e[62]=z):z=e[62];let Z;e[63]!==a.length||e[64]!==K||e[65]!==$||e[66]!==G||e[67]!==c||e[68]!==l?(Z=$!==null?r.jsx("form",{className:"w-40 shrink-0",onSubmit:fe=>{fe.preventDefault(),K()},children:r.jsx("input",{autoFocus:!0,value:$,placeholder:"apps/checkout","aria-label":l("sandbox.appTabs.pathLabel"),"aria-invalid":G,onChange:fe=>{I(fe.target.value),W(!1)},onBlur:q,onKeyDown:fe=>{fe.key==="Escape"&&q()},className:Re("h-7 w-full rounded-md border bg-background px-2 font-mono text-xs outline-none",G?"border-destructive":"border-border")})}):a.length<c&&r.jsx(vt,{label:l("sandbox.appTabs.add"),onClick:()=>I(""),children:r.jsx(Hr,{})}),e[63]=a.length,e[64]=K,e[65]=$,e[66]=G,e[67]=c,e[68]=l,e[69]=Z):Z=e[69];let re;e[70]!==m||e[71]!==R||e[72]!==L||e[73]!==V||e[74]!==O?(re=!m&&O&&r.jsx(vt,{label:V,active:L,onClick:()=>R(L?Ys:{app:O,split:!0}),children:r.jsx(Io,{})}),e[70]=m,e[71]=R,e[72]=L,e[73]=V,e[74]=O,e[75]=re):re=e[75];let oe;e[76]!==z||e[77]!==Z||e[78]!==re?(oe=r.jsxs(r.Fragment,{children:[z,Z,re]}),e[76]=z,e[77]=Z,e[78]=re,e[79]=oe):oe=e[79];const he=oe;let pe;e[80]!==he?(pe=r.jsx(Vs.Topbar.Left.Portal,{fallback:r.jsx("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:he}),children:r.jsx("div",{className:"ml-1 flex min-w-0 items-center gap-1 border-l border-border/60 pl-2",children:he})}),e[80]=he,e[81]=pe):pe=e[81];let be;e[82]!==o||e[83]!==F?(be=F&&r.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:o}),e[82]=o,e[83]=F,e[84]=be):be=e[84];let ge;e[85]!==A||e[86]!==w||e[87]!==p.start||e[88]!==v||e[89]!==H||e[90]!==T||e[91]!==g||e[92]!==R||e[93]!==L||e[94]!==k?(ge=A!==null&&r.jsx(Id,{name:Ds(A),mainName:H,appUrl:T?pl(T,A):null,ready:g,failed:w,notStarted:!v&&!k.includes(A),onStart:p.start,className:Re(L&&"border-l border-border"),onClose:L?()=>R({app:A,split:!1}):void 0},A),e[85]=A,e[86]=w,e[87]=p.start,e[88]=v,e[89]=H,e[90]=T,e[91]=g,e[92]=R,e[93]=L,e[94]=k,e[95]=ge):ge=e[95];let ve;e[96]!==be||e[97]!==ge?(ve=r.jsxs("div",{className:"flex min-h-0 flex-1",children:[be,ge]}),e[96]=be,e[97]=ge,e[98]=ve):ve=e[98];let Se;return e[99]!==pe||e[100]!==ve?(Se=r.jsxs("div",{className:"flex h-full w-full min-h-0 flex-col",children:[pe,ve]}),e[99]=pe,e[100]=ve,e[101]=Se):Se=e[101],Se}function zd(t){return t??Ys}function Lr(t){const e=le.c(28),{label:s,badge:n,hint:a,ready:c,failed:d,onScreen:i,onSelect:o,onRemove:l,removeLabel:m}=t,f=i?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/60 hover:text-foreground";let p;e[0]!==f?(p=Re("group/app-tab flex h-7 shrink-0 items-center rounded-md text-xs transition-colors",f),e[0]=f,e[1]=p):p=e[1];const y=c?"bg-success":d?"bg-destructive":"animate-pulse bg-warning";let x;e[2]!==y?(x=Re("size-1.5 rounded-full",y),e[2]=y,e[3]=x):x=e[3];let b;e[4]!==x?(b=r.jsx("span",{"aria-hidden":!0,className:x}),e[4]=x,e[5]=b):b=e[5];let h;e[6]!==s?(h=r.jsx("span",{className:"max-w-40 truncate",children:s}),e[6]=s,e[7]=h):h=e[7];let v;e[8]!==n?(v=n&&r.jsx("span",{className:"text-[10px] text-muted-foreground",children:n}),e[8]=n,e[9]=v):v=e[9];let T;e[10]!==i||e[11]!==o||e[12]!==b||e[13]!==h||e[14]!==v?(T=r.jsx(et,{asChild:!0,children:r.jsxs("button",{type:"button",role:"tab","aria-selected":i,onClick:o,className:"flex h-full items-center gap-1.5 rounded-md px-2.5 focus-ring",children:[b,h,v]})}),e[10]=i,e[11]=o,e[12]=b,e[13]=h,e[14]=v,e[15]=T):T=e[15];let g;e[16]!==a?(g=r.jsx(tt,{className:"max-w-64",children:a}),e[16]=a,e[17]=g):g=e[17];let w;e[18]!==T||e[19]!==g?(w=r.jsxs(st,{children:[T,g]}),e[18]=T,e[19]=g,e[20]=w):w=e[20];let C;e[21]!==l||e[22]!==m?(C=l&&r.jsx("button",{type:"button","aria-label":m,onClick:l,className:"-ml-1 mr-1 flex size-5 items-center justify-center rounded opacity-0 hover:bg-sidebar-accent focus-ring focus-visible:opacity-100 group-hover/app-tab:opacity-100",children:r.jsx(va,{className:"size-3"})}),e[21]=l,e[22]=m,e[23]=C):C=e[23];let k;return e[24]!==w||e[25]!==C||e[26]!==p?(k=r.jsxs("div",{className:p,children:[w,C]}),e[24]=w,e[25]=C,e[26]=p,e[27]=k):k=e[27],k}function Id(t){const e=le.c(71),{name:s,mainName:n,appUrl:a,ready:c,failed:d,notStarted:i,onStart:o,className:l,onClose:m}=t,f=Ee(),[p,y]=N.useState("/"),[x,b]=N.useState("desktop"),[h,v]=N.useState(0),T=N.useRef(null);let g;e[0]!==a||e[1]!==p?(g=a?ml(a,p):null,e[0]=a,e[1]=p,e[2]=g):g=e[2];const w=g;let C;e[3]!==l?(C=Re("flex min-h-0 min-w-0 flex-1 flex-col",l),e[3]=l,e[4]=C):C=e[4];let k;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=D=>{D.preventDefault(),y(T.current?.value||"/")},e[5]=k):k=e[5];let P;e[6]!==s||e[7]!==f?(P=f("sandbox.appPane.path",{app:s}),e[6]=s,e[7]=f,e[8]=P):P=e[8];let j;e[9]!==p||e[10]!==P?(j=r.jsx("form",{className:"min-w-0 flex-1",onSubmit:k,children:r.jsx("input",{ref:T,defaultValue:p,"aria-label":P,className:"h-7 w-full rounded-md border border-border/60 bg-background px-2 font-mono text-xs text-muted-foreground outline-none hover:border-border focus:border-border focus:text-foreground"})}),e[9]=p,e[10]=P,e[11]=j):j=e[11];let R;e[12]!==x||e[13]!==f?(R=f(x==="desktop"?"sandbox.preview.deviceMobile":"sandbox.preview.deviceDesktop"),e[12]=x,e[13]=f,e[14]=R):R=e[14];let B;e[15]===Symbol.for("react.memo_cache_sentinel")?(B=()=>b(Kd),e[15]=B):B=e[15];let A;e[16]!==x?(A=x==="desktop"?r.jsx(Kr,{}):r.jsx(Ur,{}),e[16]=x,e[17]=A):A=e[17];let L;e[18]!==R||e[19]!==A?(L=r.jsx(vt,{label:R,onClick:B,children:A}),e[18]=R,e[19]=A,e[20]=L):L=e[20];let F;e[21]!==s||e[22]!==f?(F=f("sandbox.appPane.reload",{app:s}),e[21]=s,e[22]=f,e[23]=F):F=e[23];const O=!w||!c;let $,I;e[24]===Symbol.for("react.memo_cache_sentinel")?($=()=>v(Ud),I=r.jsx(jo,{}),e[24]=$,e[25]=I):($=e[24],I=e[25]);let G;e[26]!==F||e[27]!==O?(G=r.jsx(vt,{label:F,disabled:O,onClick:$,children:I}),e[26]=F,e[27]=O,e[28]=G):G=e[28];let W;e[29]!==s||e[30]!==f?(W=f("sandbox.appPane.openInNewTab",{app:s}),e[29]=s,e[30]=f,e[31]=W):W=e[31];const Y=!w||!c;let q;e[32]!==w?(q=()=>w&&window.open(w,"_blank","noopener"),e[32]=w,e[33]=q):q=e[33];let Q;e[34]===Symbol.for("react.memo_cache_sentinel")?(Q=r.jsx(Br,{}),e[34]=Q):Q=e[34];let K;e[35]!==W||e[36]!==Y||e[37]!==q?(K=r.jsx(vt,{label:W,disabled:Y,onClick:q,children:Q}),e[35]=W,e[36]=Y,e[37]=q,e[38]=K):K=e[38];let ee;e[39]!==s||e[40]!==m||e[41]!==f?(ee=m&&r.jsx(vt,{label:f("sandbox.appPane.close",{app:s}),onClick:m,children:r.jsx(va,{})}),e[39]=s,e[40]=m,e[41]=f,e[42]=ee):ee=e[42];let H;e[43]!==G||e[44]!==K||e[45]!==ee||e[46]!==j||e[47]!==L?(H=r.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:[j,L,G,K,ee]}),e[43]=G,e[44]=K,e[45]=ee,e[46]=j,e[47]=L,e[48]=H):H=e[48];let J;e[49]!==n||e[50]!==f?(J=f("sandbox.appPane.previewOnly",{app:n}),e[49]=n,e[50]=f,e[51]=J):J=e[51];let V;e[52]!==J?(V=r.jsx("p",{className:"shrink-0 truncate border-b border-border bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground",children:J}),e[52]=J,e[53]=V):V=e[53];let E;e[54]!==x||e[55]!==d||e[56]!==n||e[57]!==s||e[58]!==i||e[59]!==o||e[60]!==c||e[61]!==h||e[62]!==w||e[63]!==f?(E=r.jsx("div",{className:"flex min-h-0 flex-1 justify-center overflow-auto bg-muted/40",children:c&&i?r.jsxs("div",{className:"flex flex-col items-center gap-3 self-center px-6 text-center",children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:f("sandbox.appPane.notStarted",{app:s})}),r.jsx(Oe,{size:"sm",variant:"outline",onClick:o,children:f("sandbox.appPane.start",{app:s})})]}):!c||!w?r.jsx("p",{className:"self-center px-6 text-center text-sm text-muted-foreground",children:c?f("sandbox.appPane.noUrl"):d?f("sandbox.appPane.failed",{app:n}):f("sandbox.appPane.waiting")}):r.jsx("iframe",{src:w,title:s,className:Re("h-full bg-background",x==="mobile"?"w-[412px] max-w-full border-x border-border":"w-full")},`${w}#${h}`)}),e[54]=x,e[55]=d,e[56]=n,e[57]=s,e[58]=i,e[59]=o,e[60]=c,e[61]=h,e[62]=w,e[63]=f,e[64]=E):E=e[64];let _;return e[65]!==s||e[66]!==C||e[67]!==H||e[68]!==V||e[69]!==E?(_=r.jsxs("section",{"aria-label":s,className:C,children:[H,V,E]}),e[65]=s,e[66]=C,e[67]=H,e[68]=V,e[69]=E,e[70]=_):_=e[70],_}function Ud(t){return t+1}function Kd(t){return t==="desktop"?"mobile":"desktop"}function vt(t){const e=le.c(11),{label:s,children:n,active:a,disabled:c,onClick:d}=t;let i;e[0]!==a||e[1]!==n||e[2]!==c||e[3]!==s||e[4]!==d?(i=r.jsx(et,{asChild:!0,children:r.jsx(Ze,{"aria-label":s,"aria-pressed":a,active:a,disabled:c,onClick:d,children:n})}),e[0]=a,e[1]=n,e[2]=c,e[3]=s,e[4]=d,e[5]=i):i=e[5];let o;e[6]!==s?(o=r.jsx(tt,{children:s}),e[6]=s,e[7]=o):o=e[7];let l;return e[8]!==i||e[9]!==o?(l=r.jsxs(st,{children:[i,o]}),e[8]=i,e[9]=o,e[10]=l):l=e[10],l}const Hd=async(t,e)=>{try{return await fetch(t,{method:"HEAD",mode:"no-cors",cache:"no-store",credentials:"omit",signal:e}),!0}catch{return!1}},Vd=1e4,Wd=1e4,qd=5e3,Gd=2;function Jd(t,e){return t&&e===0?Wd:Math.min(1e3*2**Math.max(0,e-1),qd)}function Yd(t,e,s){return e?!0:t===!0&&s<Gd}function Qd(t,e){const s=le.c(11),n=Hd,a=Eo();let c;s[0]!==t?(c=Qs.localAppReachable(t??""),s[0]=t,s[1]=c):c=s[1];const d=c;let i;s[2]!==n||s[3]!==a||s[4]!==d||s[5]!==t?(i=async f=>{const{signal:p}=f,y=new AbortController,x=()=>y.abort();p.addEventListener("abort",x);const b=setTimeout(x,Vd),h=await n(t,y.signal).catch(Zd);clearTimeout(b),p.removeEventListener("abort",x);const v=a.getQueryData(d),T=h?0:(v?.failures??0)+1;return{up:Yd(v?.up??null,h,T),failures:T}},s[2]=n,s[3]=a,s[4]=d,s[5]=t,s[6]=i):i=s[6];const o=!!t;let l;s[7]!==d||s[8]!==i||s[9]!==o?(l={queryKey:d,queryFn:i,enabled:o,retry:!1,staleTime:0,gcTime:0,refetchInterval:Xd},s[7]=d,s[8]=i,s[9]=o,s[10]=l):l=s[10];const{data:m}=$r(l);return t?m?.up??null:null}function Xd(t){return t.state.data?Jd(t.state.data.up,t.state.data.failures):!1}function Zd(){return!1}function eu(t){const{backend:e}=t;if(e.kind==="protocol"&&e.source==="local")return{kind:"connected"};if(e.kind==="unavailable"&&e.source==="local"){const s=e.problem;return!s||s.reason==="not-answering"?t.access==="denied"?{kind:"needs-permission"}:{kind:"not-running"}:{kind:"problem",problem:s}}return{kind:"connecting"}}function lf(t){const e=le.c(53),{virtualMcpId:s}=t,n=Ee(),a=Ho(s),{connection:c}=ra(s),{activeTask:d,taskId:i,currentBranch:o}=at(),l=kl(i),[m,f]=N.useState(!1),p=Kt(s,o);let y;e[0]!==p||e[1]!==c?(y=c?He(p):null,e[0]=p,e[1]=c,e[2]=y):y=e[2];const x=y,b=Qd(x),h=ba(),v=hl("multi_app_preview");if(xl({threadId:i,sandboxBranch:d?.branch??o,agentHasRepo:$s(a?.metadata),threadHasRepo:$s(l)||$s(d?.metadata)})==="none"&&!c){let k;e[3]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:r.jsx(br,{className:"size-7 text-foreground"})}),e[3]=k):k=e[3];let P;e[4]!==n?(P=n("mainPanelTabs.previewTab.noSourceToPreview"),e[4]=n,e[5]=P):P=e[5];let j;e[6]!==n?(j=n("mainPanelTabs.previewTab.connectGithubDescription"),e[6]=n,e[7]=j):j=e[7];let R,B;e[8]===Symbol.for("react.memo_cache_sentinel")?(R=()=>f(!0),B=r.jsx(br,{className:"size-4"}),e[8]=R,e[9]=B):(R=e[8],B=e[9]);let A;e[10]!==n?(A=n("mainPanelTabs.previewTab.connectGithub"),e[10]=n,e[11]=A):A=e[11];let L;e[12]!==A?(L=r.jsxs(Oe,{onClick:R,children:[B,A]}),e[12]=A,e[13]=L):L=e[13];let F;e[14]!==P||e[15]!==j||e[16]!==L?(F=r.jsx(gl,{className:"h-full",image:k,title:P,description:j,actions:L}),e[14]=P,e[15]=j,e[16]=L,e[17]=F):F=e[17];let O;e[18]!==m?(O=r.jsx(vl,{open:m,onOpenChange:f,mode:"agent"}),e[18]=m,e[19]=O):O=e[19];let $;return e[20]!==O||e[21]!==F?($=r.jsxs(r.Fragment,{children:[F,O]}),e[20]=O,e[21]=F,e[22]=$):$=e[22],$}if(c&&a&&!He(p)){let k;e[23]!==h||e[24]!==p?(k=eu({backend:p,access:h}),e[23]=h,e[24]=p,e[25]=k):k=e[25];let P;e[26]!==c.endpoint?(P=yi(c.endpoint),e[26]=c.endpoint,e[27]=P):P=e[27];let j;return e[28]!==k||e[29]!==P?(j=r.jsx(su,{status:k,host:P}),e[28]=k,e[29]=P,e[30]=j):j=e[30],j}if(x&&b!==!0){let k;e[31]!==n?(k=n("mainPanelTabs.previewTab.localAppWaiting.title"),e[31]=n,e[32]=k):k=e[32];let P;e[33]!==x||e[34]!==n?(P=n("mainPanelTabs.previewTab.localAppWaiting.body",{host:tu(x)}),e[33]=x,e[34]=n,e[35]=P):P=e[35];let j;e[36]!==P?(j=r.jsx(ga,{text:P}),e[36]=P,e[37]=j):j=e[37];let R;e[38]!==n?(R=n("mainPanelTabs.previewTab.localAppWaiting.hint"),e[38]=n,e[39]=R):R=e[39];let B;e[40]!==R?(B=r.jsx("p",{role:"status",className:"text-center text-sm text-muted-foreground",children:R}),e[40]=R,e[41]=B):B=e[41];let A;return e[42]!==k||e[43]!==j||e[44]!==B?(A=r.jsx(ps,{headingLevel:2,waiting:!0,title:k,lead:j,footer:B}),e[42]=k,e[43]=j,e[44]=B,e[45]=A):A=e[45],A}let g;e[46]!==s?(g=r.jsx($d,{virtualMcpId:s}),e[46]=s,e[47]=g):g=e[47];const w=g;let C;return e[48]!==a||e[49]!==v||e[50]!==w||e[51]!==c?(C=r.jsx(No,{children:v&&a&&!c?r.jsx(Bd,{project:a,maxApps:dl,children:w}):w}),e[48]=a,e[49]=v,e[50]=w,e[51]=c,e[52]=C):C=e[52],C}function tu(t){try{return new URL(t).host}catch{return t}}function su(t){const e=le.c(13),{status:s,host:n}=t,a=Ee();if(s.kind==="connected"){let i;e[0]!==a?(i=a("mainPanelTabs.previewTab.localhostNoPreview.title"),e[0]=a,e[1]=i):i=e[1];let o;e[2]!==a?(o=a("mainPanelTabs.previewTab.localhostNoPreview.body"),e[2]=a,e[3]=o):o=e[3];let l;return e[4]!==i||e[5]!==o?(l=r.jsx(ps,{headingLevel:2,waiting:!1,title:i,lead:o}),e[4]=i,e[5]=o,e[6]=l):l=e[6],l}let c;e[7]!==n||e[8]!==s?(c=Nl(s,n),e[7]=n,e[8]=s,e[9]=c):c=e[9];let d;return e[10]!==n||e[11]!==c?(d=r.jsx(El,{wait:c,hosts:n}),e[10]=n,e[11]=c,e[12]=d):d=e[12],d}export{El as L,lf as P,ps as S,of as u};
|