decocms 4.520.0 → 4.521.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-a2DoNLsg.js → ActiveShapeUtils-NiXAWNnI.js} +1 -1
- package/dist/client/assets/{AlertCircle-CePpxiVL.js → AlertCircle-DGVmeswV.js} +1 -1
- package/dist/client/assets/{AreaChart-futTS77r.js → AreaChart-DL7RX4W6.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DPa6sZRI.js → ArrowLeft-DDWHto_R.js} +1 -1
- package/dist/client/assets/{ArrowUp-Bc6Es12Z.js → ArrowUp-bm_9Fp5i.js} +1 -1
- package/dist/client/assets/{BarChart-CJBobvga.js → BarChart-DmTON82J.js} +1 -1
- package/dist/client/assets/{Building02-BbEppJaI.js → Building02-p3_mZ-E2.js} +1 -1
- package/dist/client/assets/{CartesianChart-D2mofn_H.js → CartesianChart-oH_IqMjj.js} +1 -1
- package/dist/client/assets/{CategoricalChart-1f5JjzPP.js → CategoricalChart-Dy74bBD9.js} +1 -1
- package/dist/client/assets/{CheckCircle-Dlz5XR1a.js → CheckCircle-Bx5iI6Lz.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BjvpkKQW.js → ChevronSelectorVertical-CtVpNCaH.js} +1 -1
- package/dist/client/assets/{ChevronUp-CHckv_8T.js → ChevronUp-ojSOtVX2.js} +1 -1
- package/dist/client/assets/{Copy01-ynYolVGY.js → Copy01-CixCoZek.js} +1 -1
- package/dist/client/assets/{CreditCard01-CJRwgkVP.js → CreditCard01-D0K-VlXU.js} +1 -1
- package/dist/client/assets/{DotsVertical-xGYJd_oZ.js → DotsVertical-DzE0Ijkk.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Bu4h-9ud.js → ErrorBarContext-DRS3e7xk.js} +1 -1
- package/dist/client/assets/{Globe04-rKrlqbJ3.js → Globe04-CE15ScrO.js} +1 -1
- package/dist/client/assets/{Image01-J72Rm0Yr.js → Image01-Bks737AT.js} +1 -1
- package/dist/client/assets/{Key01-GACmaKDe.js → Key01-CxbATohw.js} +1 -1
- package/dist/client/assets/{Link01-Dy_bSHLe.js → Link01-DCdDhO7H.js} +1 -1
- package/dist/client/assets/{LinkBroken01-Dbb_PbFz.js → LinkBroken01-ZF7OlrXq.js} +1 -1
- package/dist/client/assets/{Minus-cuNEQYA9.js → Minus-DqMKpYLh.js} +1 -1
- package/dist/client/assets/{Monitor01-CW3G0lSo.js → Monitor01-B-_Pl3qs.js} +1 -1
- package/dist/client/assets/{Play-RPF1C2F0.js → Play-B6eaz3Uv.js} +1 -1
- package/dist/client/assets/{Plus-DXIMcQkQ.js → Plus-B28tKNm1.js} +1 -1
- package/dist/client/assets/{ReferenceLine-CYgqeMqY.js → ReferenceLine-C5aqWs1r.js} +1 -1
- package/dist/client/assets/{SearchMd-DQ6xirDN.js → SearchMd-OCyidoZI.js} +1 -1
- package/dist/client/assets/{Sector-fbb2Py22.js → Sector-CtNXSnWN.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-B81IcYcu.js → ShoppingBag01-DHyiQNjO.js} +1 -1
- package/dist/client/assets/{Sun-Bd7hlMAK.js → Sun-BUl5hUgs.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-QjLd4gai.js → SwitchHorizontal01-BKu4aB4V.js} +1 -1
- package/dist/client/assets/{Tool01-D7eccoeh.js → Tool01-CnZckhqi.js} +1 -1
- package/dist/client/assets/{Trash01-CTrNlbT8.js → Trash01-C34kFeWG.js} +1 -1
- package/dist/client/assets/{Upload01-B9oMCz-6.js → Upload01-sDXthFWJ.js} +1 -1
- package/dist/client/assets/{User01-BgWUolo8.js → User01-2Hx1yZRb.js} +1 -1
- package/dist/client/assets/UserSquare-UeuSXkL4.js +1 -0
- package/dist/client/assets/{Users01-B7zAiC4m.js → Users01-D78JG135.js} +1 -1
- package/dist/client/assets/{XClose-C9XzQkao.js → XClose-BbuvN9Qp.js} +1 -1
- package/dist/client/assets/{ZoomOut-DKNOmfuK.js → ZoomOut-DnRMz8gp.js} +1 -1
- package/dist/client/assets/{access-gate-BBEga0hz.js → access-gate-B-XccyUi.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-ldH4ynvN.js → add-connection-dialog-3BCYyOlq.js} +1 -1
- package/dist/client/assets/agent-analytics-CwuUduKr.js +1 -0
- package/dist/client/assets/agent-app-Dd83t7Jr.js +1 -0
- package/dist/client/assets/{agent-assets-BTuYhb0x.js → agent-assets-BX70IHOT.js} +1 -1
- package/dist/client/assets/{agent-automation-CPVX6Ssc.js → agent-automation-DSOT91yw.js} +1 -1
- package/dist/client/assets/{agent-automations-Depk4_IZ.js → agent-automations-DELrtNmQ.js} +1 -1
- package/dist/client/assets/agent-calendar-DAFHiZ7t.js +1 -0
- package/dist/client/assets/{agent-connect-sources-B_w_bZyW.js → agent-connect-sources-EYRSBit6.js} +1 -1
- package/dist/client/assets/agent-deck-19EIpeOv.js +1 -0
- package/dist/client/assets/agent-e2e-DgDrdrOU.js +1 -0
- package/dist/client/assets/agent-experiments-CDIR-vBl.js +1 -0
- package/dist/client/assets/agent-file-Crkwe1n0.js +1 -0
- package/dist/client/assets/agent-hosting-COv9KqxJ.js +1 -0
- package/dist/client/assets/agent-icon-2Sd6TPJR.js +1 -0
- package/dist/client/assets/agent-library-6vXi0pmB.js +1 -0
- package/dist/client/assets/agent-library-file-D_31XTpy.js +1 -0
- package/dist/client/assets/agent-monitor-DZGhzZ5b.js +1 -0
- package/dist/client/assets/{agent-overview-D3DqJ6Lq.js → agent-overview-jQR56ImR.js} +1 -1
- package/dist/client/assets/{agent-releases-JCAWDH6g.js → agent-releases-1LcFLBWb.js} +1 -1
- package/dist/client/assets/agent-settings-BJW57Xya.js +1 -0
- package/dist/client/assets/{agent-site-editor-DmMopyU6.js → agent-site-editor-FH5rkph4.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-Dp5l17ta.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BIwmC0as.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-DJt8FppE.js +1 -0
- package/dist/client/assets/agent-view-DuXo8UyN.js +1 -0
- package/dist/client/assets/{agent-view-guard-MrJ6Jxxx.js → agent-view-guard-BtSTYr3f.js} +1 -1
- package/dist/client/assets/{agents-list-6A96PYcg.js → agents-list-BciltAjT.js} +1 -1
- package/dist/client/assets/{ai-providers-DLOQtpHm.js → ai-providers-1_g2-YFO.js} +1 -1
- package/dist/client/assets/{alert-BEazQOeN.js → alert-B6jt7ehz.js} +1 -1
- package/dist/client/assets/{alert-dialog-DdGCb0IF.js → alert-dialog-C6IuYhIc.js} +1 -1
- package/dist/client/assets/{analytics-sections-BO4YnAjA.js → analytics-sections-CMbHJdjJ.js} +1 -1
- package/dist/client/assets/{analytics-tab-DaOlRgMk.js → analytics-tab-BptBREH9.js} +1 -1
- package/dist/client/assets/{api-keys-BJgy-lS2.js → api-keys-DNoVGHBL.js} +1 -1
- package/dist/client/assets/api-keys-YdF23sAO.js +1 -0
- package/dist/client/assets/{app-editor-DLE8thcF.js → app-editor-DIGpXnGi.js} +1 -1
- package/dist/client/assets/app-preview-url-DmK5uokM.js +1 -0
- package/dist/client/assets/{asset-utils-BCgXGBCC.js → asset-utils-BaoKrfcS.js} +1 -1
- package/dist/client/assets/{auth-D6exVMlw.js → auth-MbbNpK0f.js} +1 -1
- package/dist/client/assets/{auth-catchall-DvDQWdKb.js → auth-catchall-CQhqMFI7.js} +1 -1
- package/dist/client/assets/{auth-entry-C86oFADV.js → auth-entry-BytQWBJH.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DyRJlWjB.js → auth-split-layout-BLy72f6M.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ByNJ3IhY.js → authenticate-and-persist-oauth-ChOS0TQ8.js} +1 -1
- package/dist/client/assets/{automation-list-row-CX5dszCC.js → automation-list-row-CDTQ4wXs.js} +1 -1
- package/dist/client/assets/{automation-runs-CHeG76Ew.js → automation-runs-uGIsi6Hf.js} +1 -1
- package/dist/client/assets/{automations-BpcPPmZL.js → automations-CYPV9xM6.js} +1 -1
- package/dist/client/assets/{autosend-DJIOdR-h.js → autosend-nr-hPbHj.js} +1 -1
- package/dist/client/assets/{avatar-49aPXdv7.js → avatar-DarGMVT9.js} +1 -1
- package/dist/client/assets/{badge-Xi0bu-aJ.js → badge-7nY_ai7T.js} +1 -1
- package/dist/client/assets/{block-document-Cn8tlonv.js → block-document-BFjSBfhL.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-QgOcURJH.js → blocks-preview-workspace-context-CPEN608S.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BG-MFk9Q.js → blocks-tab-states-DEKXC5rW.js} +1 -1
- package/dist/client/assets/{blog-schema-BO9IdDkD.js → blog-schema-DXeDEF-x.js} +1 -1
- package/dist/client/assets/{buckets-xqarwZ-o.js → buckets-Fnw-QnpR.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-D7Pi_LQA.js → build-improve-prompt-doc-BNyp6j2d.js} +1 -1
- package/dist/client/assets/{calendar-HcE4WZuE.js → calendar-D8eqk8F_.js} +1 -1
- package/dist/client/assets/{campaigns-view-BLsQazTL.js → campaigns-view-DwenRJ4m.js} +1 -1
- package/dist/client/assets/{capability-load-error-BzCsh693.js → capability-load-error-DK8yJwbi.js} +1 -1
- package/dist/client/assets/{category-editor-Cwe6Gn4P.js → category-editor-CvvoknG-.js} +1 -1
- package/dist/client/assets/{cdn-tab-tnk9RtCD.js → cdn-tab-DGngqFre.js} +1 -1
- package/dist/client/assets/{chart-BKCzQrbM.js → chart-BVOKVwol.js} +1 -1
- package/dist/client/assets/{chat-context-CwxNIspy.js → chat-context-4LDKQ9-8.js} +1 -1
- package/dist/client/assets/{chat-draft-Czzd6Fgc.js → chat-draft-DtnFj70R.js} +1 -1
- package/dist/client/assets/{checkbox-IscGSBh9.js → checkbox--QGg9JL6.js} +1 -1
- package/dist/client/assets/{choose-editor-uAgHg51i.js → choose-editor-Co3gZPYu.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BhFG_H4z.js → cli-auth-success-PhyGH5OW.js} +1 -1
- package/dist/client/assets/{client-icons-CZ-ZSlxS.js → client-icons-C_ct3pd0.js} +1 -1
- package/dist/client/assets/cms-settings-editor-VrhsAjtC.js +1 -0
- package/dist/client/assets/{collapsible-D314pUSB.js → collapsible-DGVOZrNj.js} +1 -1
- package/dist/client/assets/{collection-detail-CuIOpuSM.js → collection-detail-BAmfEJxU.js} +1 -1
- package/dist/client/assets/{collection-display-button-kbHHi0Kq.js → collection-display-button-ClKK9pYP.js} +1 -1
- package/dist/client/assets/{collection-search-DCYm5aP4.js → collection-search-DRo1WmLT.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DDG00R7J.js → collection-table-wrapper-Dgqpnsq8.js} +1 -1
- package/dist/client/assets/{collection-tabs-CpRvK4aY.js → collection-tabs-Dc2dImyc.js} +1 -1
- package/dist/client/assets/{column-rules-yLNPamrN.js → column-rules-DiqfCnEN.js} +1 -1
- package/dist/client/assets/{combobox-uDe7w0z0.js → combobox-DZgmK343.js} +1 -1
- package/dist/client/assets/{command-DcKOVszs.js → command-CPx9UwtG.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DZ2ioXzY.js → companion-mcps-section-CLb76BIo.js} +1 -1
- package/dist/client/assets/{config-DlkgY7Jy.js → config-CxVvKo3A.js} +1 -1
- package/dist/client/assets/{connect-wFJx1iR7.js → connect-A3Avs8Pl.js} +1 -1
- package/dist/client/assets/{connect-layout-DU417orE.js → connect-layout-BksXTmdN.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-B6k_6_M9.js → connect-source-dialog-DSaPW3-r.js} +1 -1
- package/dist/client/assets/{connection-CLuVf0UF.js → connection-GML1C2tu.js} +1 -1
- package/dist/client/assets/{connection-card-BaWG41H0.js → connection-card-ZvVd_UVc.js} +1 -1
- package/dist/client/assets/{connection-detail-B8vzaLYN.js → connection-detail-DtbzbTIM.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BWk506qj.js → connection-form-helpers-CGyT85pi.js} +1 -1
- package/dist/client/assets/{connections-ajPWQmhT.js → connections-D4x-lAFA.js} +1 -1
- package/dist/client/assets/{content-tab-C9mWHRiZ.js → content-tab-DgdEt3c6.js} +3 -3
- package/dist/client/assets/{context-BZM48LEC.js → context-BcuOiE0n.js} +1 -1
- package/dist/client/assets/{context-menu-DuBXLH-0.js → context-menu-BPat3chT.js} +1 -1
- package/dist/client/assets/{context-shell-DBFau4jR.js → context-shell-BpD_TiZV.js} +3 -3
- package/dist/client/assets/{core.esm-r_1fOlla.js → core.esm-CumN7OYl.js} +2 -2
- package/dist/client/assets/{create-organization-dialog-DinRNNUe.js → create-organization-dialog-C7cTp33N.js} +1 -1
- package/dist/client/assets/{daily-pulse-DIrHsqZA.js → daily-pulse-DIdfLtIG.js} +1 -1
- package/dist/client/assets/{discover-fUj70D62.js → discover-CG4C5Odc.js} +1 -1
- package/dist/client/assets/{domain-settings-CLujyp1m.js → domain-settings-DkAHUlQw.js} +1 -1
- package/dist/client/assets/{drawer-CyiQimHr.js → drawer-Bp7WNOCz.js} +1 -1
- package/dist/client/assets/{editor-BpL3QDOn.js → editor-CmZJbc4Z.js} +1 -1
- package/dist/client/assets/{editor-classes-DA3QHiC-.js → editor-classes-DYddjmhz.js} +1 -1
- package/dist/client/assets/{empty-state-Bw4axBb5.js → empty-state-DBHadTD8.js} +1 -1
- package/dist/client/assets/{empty-state-B0G_CGwR.js → empty-state-vh9cmtA2.js} +1 -1
- package/dist/client/assets/{experiments-tab-BkzMMdcP.js → experiments-tab-BaB_Zi0V.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BYO4Dw1S.js → experiments-tab-choice-p3E1pILX.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CwDf8Ns1.js → extract-connection-data-C2lA8ZOm.js} +1 -1
- package/dist/client/assets/{feature-gate-BxG3yqt8.js → feature-gate-D8HHU_kV.js} +1 -1
- package/dist/client/assets/{feature-paywall-BHK5XVuW.js → feature-paywall-CRRIPYfS.js} +1 -1
- package/dist/client/assets/{file-explorer-CPGV5tot.js → file-explorer-BTIbvupP.js} +1 -1
- package/dist/client/assets/{file-preview-BdEwMhOt.js → file-preview-CsDpTAv6.js} +1 -1
- package/dist/client/assets/{file-share-button-C4MFpt4s.js → file-share-button-BmWv4msr.js} +1 -1
- package/dist/client/assets/{file-type-icon-BnEUVv2h.js → file-type-icon-Ixvc6_bA.js} +1 -1
- package/dist/client/assets/{folder-icon-DOB3P9Vd.js → folder-icon-ByIjnQde.js} +1 -1
- package/dist/client/assets/{form-CpnGThcL.js → form-CIAWZjuP.js} +1 -1
- package/dist/client/assets/{general-7WS5B97k.js → general-DEusZ5JT.js} +1 -1
- package/dist/client/assets/{home-CfcdGSri.js → home-B9bSA6tC.js} +1 -1
- package/dist/client/assets/{icon-button-B1pb2_kW.js → icon-button-7F5Toil2.js} +1 -1
- package/dist/client/assets/{index-Okf21u4l.js → index-4NUDq9UX.js} +1 -1
- package/dist/client/assets/{index-CXV4VJ6T.js → index-B0ZOlWzX.js} +1 -1
- package/dist/client/assets/{index-CMr2QK3C.js → index-B1T14RYF.js} +1 -1
- package/dist/client/assets/{index-P7t2U4iN.js → index-BEqT-aNW.js} +1 -1
- package/dist/client/assets/index-BQfNeaI1.css +1 -0
- package/dist/client/assets/{index-B6fYZNK2.js → index-BZ3kN-UW.js} +1 -1
- package/dist/client/assets/{index-DwGMmQy3.js → index-CRYNJjMc.js} +1 -1
- package/dist/client/assets/{index-BlsmUzy2.js → index-CYGV5ggz.js} +1 -1
- package/dist/client/assets/{index-tbca9DY7.js → index-CblLVDuN.js} +1 -1
- package/dist/client/assets/{index-B-nEUC-m.js → index-CfHLnaAs.js} +1 -1
- package/dist/client/assets/{index-CMKEBGKX.js → index-DJCD1T3p.js} +7 -7
- package/dist/client/assets/{index-CDmfe_Ze.js → index-DiKBQ93t.js} +1 -1
- package/dist/client/assets/index-DrxFcbdt.js +4 -0
- package/dist/client/assets/{index-C_uum72U.js → index-DxIuEmxM.js} +1 -1
- package/dist/client/assets/{index-CZWqOlKo.js → index-MrGr5MGL.js} +1 -1
- package/dist/client/assets/{index-redirect-B2074CyX.js → index-redirect-BSxSh5S-.js} +1 -1
- package/dist/client/assets/{index-D2b1OQG0.js → index-xD4K2nG7.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-sZS50x9h.js → infiniteQueryObserver-5dM4o4Hf.js} +1 -1
- package/dist/client/assets/{infra-billing-Cf1YDWV8.js → infra-billing-BW0f21OW.js} +1 -1
- package/dist/client/assets/{input-qA_oxMGt.js → input-2QjNp7qX.js} +1 -1
- package/dist/client/assets/{input-DlOSVkNE.js → input-Di5PUIe8.js} +3 -3
- package/dist/client/assets/{integration-icon-mkTLlJYZ.js → integration-icon-CMGBZM9F.js} +1 -1
- package/dist/client/assets/{jira-icon-C5lcBXYi.js → jira-icon-DZrAPkCR.js} +1 -1
- package/dist/client/assets/{label-8_hsm0_y.js → label-CBlQ82Fk.js} +1 -1
- package/dist/client/assets/{layout-C4N_3p9u.js → layout-jno9iSY1.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Zsw21wnc.js → legacy-agents-deep-C-JHuDVd.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-RzdE-Ynb.js → legacy-main-redirect-BjKbMolf.js} +1 -1
- package/dist/client/assets/library-DC_yyIum.js +1 -0
- package/dist/client/assets/{login-B439_6KR.js → login-DrbMDqlp.js} +1 -1
- package/dist/client/assets/{markdown-yQLRhm2z.js → markdown-BU6g98sq.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-gJ1lyd1u.js → mcp-app-renderer-B6MBkXrw.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B64tInkO.js → mcp-oauth-CFQzR34b.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BFUDXDf6.js → mcp-oauth-DHXkg8Ce.js} +1 -1
- package/dist/client/assets/{members-Beq92g_c.js → members-D1907SI-.js} +1 -1
- package/dist/client/assets/{memory-BkOPkUkc.js → memory-CaQIwNtK.js} +1 -1
- package/dist/client/assets/{mini-report-page-BWPJGpfB.js → mini-report-page-5Lry2_1Y.js} +1 -1
- package/dist/client/assets/{mock-board-qTnFSOlt.js → mock-board-Dfc7Zn2k.js} +3 -3
- package/dist/client/assets/{monaco-editor-C2ej8TCv.js → monaco-editor-D1yDvJd3.js} +1 -1
- package/dist/client/assets/{monitoring-BdT45NJd.js → monitoring-CvGmGp-w.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-QRt_yzIW.js → monitoring-stats-row-C-A-doof.js} +1 -1
- package/dist/client/assets/{multi-select-D4sL81eP.js → multi-select-BNUkLp8H.js} +1 -1
- package/dist/client/assets/{mustache-3jnCJNSv.js → mustache-CksHv2Dr.js} +1 -1
- package/dist/client/assets/{named-rule-uses-u1am7LRC.js → named-rule-uses-BBl065fe.js} +1 -1
- package/dist/client/assets/{named-rule-view-B49ZuZC_.js → named-rule-view-BXK5sJ8X.js} +1 -1
- package/dist/client/assets/{new-project-dialog-DCNrhfVx.js → new-project-dialog-CYkF5k4O.js} +1 -1
- package/dist/client/assets/{oauth-callback-D1lTLeuO.js → oauth-callback-BPlDpCVw.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-uHk7H4_s.js → oauth-callback-ai-provider-C-kNRGr2.js} +1 -1
- package/dist/client/assets/{onboarding-Cqmu7Q1I.js → onboarding-81KXiaqI.js} +1 -1
- package/dist/client/assets/{openai-conversation-D9oaPp7I.js → openai-conversation-Bi9e1sKc.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-C2xkkt2n.js → optimistic-project-sidebar-views-CVVwXn2X.js} +1 -1
- package/dist/client/assets/{order-monitor-day-Bn2RftCy.js → order-monitor-day-BVSLADXz.js} +1 -1
- package/dist/client/assets/{organization-choice-DbSR_Tq1.js → organization-choice-DmteYBAc.js} +1 -1
- package/dist/client/assets/{orgs-Dv6ZMLaR.js → orgs-BFPSbb2q.js} +1 -1
- package/dist/client/assets/{page-seo-form-CYdB-eYU.js → page-seo-form-VA7wIeJU.js} +1 -1
- package/dist/client/assets/{pair-DIRyClgs.js → pair-Cjnol9_x.js} +1 -1
- package/dist/client/assets/{parse-sections-CvCJ7mYl.js → parse-sections-7Tm_vjpy.js} +1 -1
- package/dist/client/assets/{plan-bTtLskYs.js → plan-KARVWZDV.js} +1 -1
- package/dist/client/assets/{plan-ladder-DNfn-N6n.js → plan-ladder-C-o1aFSi.js} +1 -1
- package/dist/client/assets/{popover-n_tcLsd5.js → popover-BsX8gIsV.js} +1 -1
- package/dist/client/assets/{post-calendar-DnSIZDH2.js → post-calendar-B6fP7Sp3.js} +1 -1
- package/dist/client/assets/{post-editor-Ds8VBbi2.js → post-editor-B530kxYZ.js} +1 -1
- package/dist/client/assets/{preview-content-YpNvTcZt.js → preview-content-IEhLMW40.js} +1 -1
- package/dist/client/assets/{preview-dialog-DJ8srmsM.js → preview-dialog-B8MUF8yg.js} +1 -1
- package/dist/client/assets/{preview-panel-C7cA2AYG.js → preview-panel-C3yGSsCn.js} +1 -1
- package/dist/client/assets/preview-tab-DZ2jzEbi.js +551 -0
- package/dist/client/assets/{product-picker-dialog-BQZeexho.js → product-picker-dialog-Duu5EFXJ.js} +1 -1
- package/dist/client/assets/{profile-D9pE1ZCt.js → profile-SgKnnlOX.js} +1 -1
- package/dist/client/assets/{project-app-view-BJMSCiLQ.js → project-app-view-69GUddZy.js} +1 -1
- package/dist/client/assets/{project-apps-CKpWGbT4.js → project-apps-DxvrGikA.js} +1 -1
- package/dist/client/assets/{project-feed-BFyTaEPY.js → project-feed-Dkn186cj.js} +1 -1
- package/dist/client/assets/{project-icon-BozuiJlT.js → project-icon-DozUqz8V.js} +1 -1
- package/dist/client/assets/project-reports-6uzfgJoN.js +1 -0
- package/dist/client/assets/project-tasks-BLcB7Cwc.js +1 -0
- package/dist/client/assets/{projects-Bj8bu01s.js → projects-BvtnS4il.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Co0D5JhR.js → projects-empty-state-Bd8sqs2o.js} +1 -1
- package/dist/client/assets/{prompts-CUYrqR6B.js → prompts-CfiuzCI2.js} +1 -1
- package/dist/client/assets/record-editor-DD-1yqpv.js +1 -0
- package/dist/client/assets/{redirect-editor-tsiTjzIT.js → redirect-editor-Cq58-dw7.js} +1 -1
- package/dist/client/assets/{releases-api-DuhgreiH.js → releases-api-toiaosbq.js} +1 -1
- package/dist/client/assets/reports-VJqlTUDX.js +1 -0
- package/dist/client/assets/{reports-BG2If9Qe.js → reports-X-r24zwl.js} +1 -1
- package/dist/client/assets/{reports-onboarding-DMCkOYqe.js → reports-onboarding-B1eQP37P.js} +1 -1
- package/dist/client/assets/{reports-tab-LnruJoPA.js → reports-tab-BqceAQel.js} +2 -2
- package/dist/client/assets/{repositories-D-cEWI3N.js → repositories-CkzQSY8F.js} +1 -1
- package/dist/client/assets/repositories-DRGtDHym.js +1 -0
- package/dist/client/assets/{repository-binding-BBtZf2zz.js → repository-binding-CiDG0Cr0.js} +1 -1
- package/dist/client/assets/{repository-import-picker-Dm0ES3Rv.js → repository-import-picker-TlIvK00I.js} +1 -1
- package/dist/client/assets/{repository-picker-CPuj3bZ1.js → repository-picker-BrjMgENb.js} +1 -1
- package/dist/client/assets/{require-capability-C24QIC4M.js → require-capability-D5vaDJ6i.js} +1 -1
- package/dist/client/assets/{required-auth-layout-PhuA3Ewp.js → required-auth-layout-CLsGddT6.js} +1 -1
- package/dist/client/assets/{reset-password-C8SdUbOh.js → reset-password-BDTPUkZZ.js} +1 -1
- package/dist/client/assets/{resizable-miZzhQuc.js → resizable-LNv9WlFU.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CpfXvomr.js → resolve-tab-icon-DDEl8WpS.js} +1 -1
- package/dist/client/assets/review-settings-CR1udLwz.js +1 -0
- package/dist/client/assets/{roles-BlQqDK5V.js → roles-DIBxviRh.js} +1 -1
- package/dist/client/assets/route-CMp29IPi.js +1 -0
- package/dist/client/assets/{route-C1AFWDaT.js → route-CwE5K4wd.js} +1 -1
- package/dist/client/assets/{route-fvDFg13s.js → route-DiDqKVTg.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-Bn4b767r.js → runnable-block-editor-D9HAcpIU.js} +3 -3
- package/dist/client/assets/{sandbox-lifecycle-context-DR0GTBJX.js → sandbox-lifecycle-context-BKUYq7kP.js} +1 -1
- package/dist/client/assets/{schema-BRZOWw0d.js → schema-6JU3flf4.js} +1 -1
- package/dist/client/assets/{schema-CylodOUQ.js → schema-BbiQjr1e.js} +1 -1
- package/dist/client/assets/{scroll-area-BH2Oy8PV.js → scroll-area-CCVLtkoB.js} +1 -1
- package/dist/client/assets/{search-input-RbNJNFgo.js → search-input-43leKkGn.js} +1 -1
- package/dist/client/assets/{search-toggle-BKYod6Wy.js → search-toggle-Ds25LhLA.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-IJ4Mey7K.js → secret-ciphertext-BrIiDgyd.js} +1 -1
- package/dist/client/assets/{secret-picker-C-cbBnBP.js → secret-picker-aJPnp_F5.js} +1 -1
- package/dist/client/assets/{secrets-BvD9KlhJ.js → secrets-CfWgVKjc.js} +1 -1
- package/dist/client/assets/{sections-C2rk7uX1.js → sections-Dvgo02ra.js} +1 -1
- package/dist/client/assets/{sections-editor-DTbMqnxy.js → sections-editor-BSfFPyUU.js} +1 -1
- package/dist/client/assets/{select-B-vRTlp8.js → select-CHmq3OGd.js} +1 -1
- package/dist/client/assets/{select-model-jzXUtlUA.js → select-model-CvpLn49w.js} +1 -1
- package/dist/client/assets/{seo-editor-BqtZxWFt.js → seo-editor-BQ3pdKQv.js} +1 -1
- package/dist/client/assets/{separator-DQdTCaJ6.js → separator-vkFvxZ8m.js} +1 -1
- package/dist/client/assets/settings-tab-B_bx6QgP.js +1 -0
- package/dist/client/assets/{sheet-DIT9lGlU.js → sheet-C_qetF7d.js} +1 -1
- package/dist/client/assets/{shell-layout-NV-fbXIm.js → shell-layout-Bb-Bk8Da.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DpuJ9efE.js → site-draft-actions-GBt56z1o.js} +1 -1
- package/dist/client/assets/site-draft-view-CZq-6QXP.js +2 -0
- package/dist/client/assets/site-editor-Dw86EYnX.js +1 -0
- package/dist/client/assets/{site-editor-toast-hxv14akZ.js → site-editor-toast-Dvaha1qd.js} +1 -1
- package/dist/client/assets/{skills-Dmur65NR.js → skills-CNP2yKUA.js} +1 -1
- package/dist/client/assets/{slider-DL5ZrKD2.js → slider-Dt2pZuy0.js} +1 -1
- package/dist/client/assets/{sortable.esm-CmQjLRc-.js → sortable.esm-Dgy_5_Gq.js} +1 -1
- package/dist/client/assets/{sso-DJaANv0k.js → sso-BwMXXLZ-.js} +1 -1
- package/dist/client/assets/{suggestion-Dp-vLwaS.js → suggestion-DUWht7S9.js} +1 -1
- package/dist/client/assets/{switch-CWqn4x2S.js → switch-BKqScyl8.js} +1 -1
- package/dist/client/assets/{symbol-9K-WFQbg.js → symbol-Bw5pneOj.js} +1 -1
- package/dist/client/assets/{synced-repos-C6pBMypP.js → synced-repos-DhRHDr6D.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CM3k-yhU.js → tab-icon-glyph-ALHCeulj.js} +1 -1
- package/dist/client/assets/{table-Clkje7xI.js → table-DSiO4Kq6.js} +1 -1
- package/dist/client/assets/{tabs-SpJ7v19a.js → tabs-BcHqdI-j.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-D7x8Ztl2.js → task-assignee-avatar-CwyY8xOb.js} +1 -1
- package/dist/client/assets/{task-board-CEgpYip9.js → task-board-ICmHlMKj.js} +1 -1
- package/dist/client/assets/{task-route-0IGfE2Sp.js → task-route-SvQTR3TJ.js} +1 -1
- package/dist/client/assets/{task-status-DxuW2r4d.js → task-status-Dk0B9E0G.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D5efiDoG.js → taskboard-analytics-vr9mjCEM.js} +1 -1
- package/dist/client/assets/{tasks-BOOTk53y.js → tasks-DUtkLCHD.js} +1 -1
- package/dist/client/assets/tasks-DzLAZqT6.js +1 -0
- package/dist/client/assets/{textarea-DhtVYf8e.js → textarea-CTbC00Fo.js} +1 -1
- package/dist/client/assets/{thread-analytics-WxV3T9V2.js → thread-analytics-CYtiXz-Q.js} +1 -1
- package/dist/client/assets/{thread-intent-BS7K-UuZ.js → thread-intent-DcKV1aEK.js} +1 -1
- package/dist/client/assets/{thread-route-BkotEDA1.js → thread-route-D05ck8nv.js} +1 -1
- package/dist/client/assets/{thread-route-BZhEwUGV.js → thread-route-DlbP9X8e.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-F9Cd7VsI.js → thread-sheet-body-DXSUCFvU.js} +1 -1
- package/dist/client/assets/{time-range-picker-DgOYXLpU.js → time-range-picker-cljXExVl.js} +1 -1
- package/dist/client/assets/{toggle-group-errY3aOY.js → toggle-group-cK7x-LaG.js} +1 -1
- package/dist/client/assets/{tool-namespace-BVXAR9Sk.js → tool-namespace-CFMdc33T.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cq4ZT7sJ.js → toolbar-icon-button-AJC8O64v.js} +1 -1
- package/dist/client/assets/{tooltip-WTx8RFDb.js → tooltip-oRr5C_aw.js} +1 -1
- package/dist/client/assets/{tooltipContext-Ccm0pmDN.js → tooltipContext-DBLuHkF3.js} +1 -1
- package/dist/client/assets/{track-DGHY3NJe.js → track-D3xYnfew.js} +1 -1
- package/dist/client/assets/{types-C2kyJgqF.js → types-BnGn2ply.js} +1 -1
- package/dist/client/assets/{url-slug-eBdSwuRg.js → url-slug-CiQKnf5R.js} +1 -1
- package/dist/client/assets/{usage-stats-BCvxtMFR.js → usage-stats-BFNP5B9b.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BUYCLrsq.js → use-ai-providers-DB7Q0SBY.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-D8uSRmIc.js → use-apply-named-rule-DW6Wbxy3.js} +1 -1
- package/dist/client/assets/{use-automations-BKnx1LOU.js → use-automations-BXbY6ysU.js} +1 -1
- package/dist/client/assets/{use-autosave-C0kQXP3a.js → use-autosave-BB3cf8aT.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-CoSgX-8p.js → use-chat-layout-state-KA32sUXt.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BVcS6c_m.js → use-clock-tick-CmSlUOB2.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Dfch6Pn5.js → use-connect-companion-Dzb46un3.js} +1 -1
- package/dist/client/assets/{use-connection-C2QTK4P4.js → use-connection-PJ_l98GU.js} +1 -1
- package/dist/client/assets/{use-content-sync-cSja7hdH.js → use-content-sync-9tvG-lut.js} +1 -1
- package/dist/client/assets/{use-copy-DedJIHzN.js → use-copy-D4R9cJ_t.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-JDXemb5m.js → use-create-virtual-mcp-cYnUmw5j.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-ByEf5sEV.js → use-date-fns-locale-BgdR-wYC.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C_RB3agc.js → use-debounced-autosave-CL6P-Lri.js} +1 -1
- package/dist/client/assets/{use-debounced-value-ELHlrW87.js → use-debounced-value-BdOjhsVi.js} +1 -1
- package/dist/client/assets/{use-deco-credits-D6gi2fbm.js → use-deco-credits-DHNd5iXt.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CwR46UgN.js → use-decopilot-events-CDLwP1Su.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BTgka6iQ.js → use-delete-connection-CkSINryc.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BCN-ylik.js → use-deployment-admin-BZATCf2q.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CVZxF7Um.js → use-fast-preview-draft-url-CGwz_fku.js} +1 -1
- package/dist/client/assets/{use-file-configs-Br5njpmm.js → use-file-configs-nRV9S9D0.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-Dz2zKYVV.js → use-inbox-feed-CMEIMGZ6.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C3u8iypP.js → use-infinite-scroll-CNz9_Nor.js} +1 -1
- package/dist/client/assets/{use-join-requests-D2Wm3dTe.js → use-join-requests-oCznfTNy.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CTK-I6l5.js → use-main-panel-tabs-BKmILeUa.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BPhXIpD4.js → use-mcp-auth-status-BlkUCjXO.js} +1 -1
- package/dist/client/assets/{use-mcp-client-COM3gP2O.js → use-mcp-client-DKIfKwpJ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-1pj8Mn9o.js → use-mcp-prompts-MhXPkujh.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DVMy4xzU.js → use-mcp-tools-CTl2xkGk.js} +1 -1
- package/dist/client/assets/{use-members-BXYZ5GWT.js → use-members-BiXVclqd.js} +1 -1
- package/dist/client/assets/{use-mobile-Bq3CXRKG.js → use-mobile-CCkX9zL-.js} +1 -1
- package/dist/client/assets/{use-move-blocks-BrZbG7eM.js → use-move-blocks-C6LWTkiD.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-F9oDR6Aw.js → use-navigate-to-agent-CEb5-IwU.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-D4P9ija_.js → use-open-billing-url-D-NQ16Mb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-C3gy1liR.js → use-org-auth-client-xXOFDOL1.js} +1 -1
- package/dist/client/assets/{use-org-fs-BRfBBlvJ.js → use-org-fs-DRaVeNa6.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-IArfEyUi.js → use-org-repo-syncs-LHzk4Keo.js} +1 -1
- package/dist/client/assets/{use-org-sso-ChkTjfH5.js → use-org-sso-Bx0Susbk.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Dx88n2m6.js → use-organization-roles-CbO1bQ_O.js} +1 -1
- package/dist/client/assets/{use-organization-settings-dAOl4U_-.js → use-organization-settings-Bf2WDJz9.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CW6DUzf9.js → use-panel-navigate-CYYYdsdC.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CTc7wMZF.js → use-project-native-view-presence-B2rH_d27.js} +1 -1
- package/dist/client/assets/{use-project-scope-BFye4eeg.js → use-project-scope-C66L_LKx.js} +1 -1
- package/dist/client/assets/{use-recent-apps-BU79Go-x.js → use-recent-apps-DaFNVa3y.js} +1 -1
- package/dist/client/assets/{use-releases-CfZAXBwl.js → use-releases-DwpIDRIp.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CJiI0aEe.js → use-reports-diagnostic-DnLCgooz.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-Bryc2tH_.js → use-sandbox-events-CioHBl5Q.js} +1 -1
- package/dist/client/assets/{use-secrets-BBwZJiLY.js → use-secrets-BrDaOgAh.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-B5gtsawP.js → use-section-preview-base-DxyD_MVI.js} +1 -1
- package/dist/client/assets/{use-session-runtime-C6i7UtWU.js → use-session-runtime-DgSb1tZ1.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CKSL9ORL.js → use-sidebar-collapsed-Lbn9i3wJ.js} +1 -1
- package/dist/client/assets/{use-tags-C7NcCL7l.js → use-tags-DxXXXYXQ.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CmTEpb8g.js → use-task-board-analytics-B_lpE6sk.js} +1 -1
- package/dist/client/assets/{use-task-board-events-bChrXXDv.js → use-task-board-events-Ciu9fgM5.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-B5n2Imtn.js → use-task-board-item-prs-BXiZI60U.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CyLevNIC.js → use-task-metadata-DXSFycil.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-BdSD31wi.js → use-thread-analytics-BBBfMO-x.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-COl9UfXy.js → use-thread-outputs-Be0M4DCF.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C9OOM3iT.js +1 -0
- package/dist/client/assets/{useQueries-Dgo1k5er.js → useQueries-CjLpsE8j.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DC4aZJSW.js +1 -0
- package/dist/client/assets/{users-BOMrf4Fo.js → users-DhWYm0Ur.js} +1 -1
- package/dist/client/assets/{utils-fsgeKe9W.js → utils-BlqF72Vj.js} +1 -1
- package/dist/client/assets/{variant-calendar-CGX7TiEA.js → variant-calendar-Z__DuHea.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-D3H0IPwr.js → variant-matcher-override-BcEAaLIA.js} +1 -1
- package/dist/client/assets/virtual-mcp-DQmDpfRM.js +1 -0
- package/dist/client/assets/{watch-sse-pool-9c6_Ze8B.js → watch-sse-pool-9GQSHr-W.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +510 -510
- package/package.json +1 -1
- package/dist/client/assets/UserSquare-CZXKi88L.js +0 -1
- package/dist/client/assets/agent-analytics-CAeIvLpw.js +0 -1
- package/dist/client/assets/agent-app-BIZw6O6x.js +0 -1
- package/dist/client/assets/agent-calendar-rSYcBUhL.js +0 -1
- package/dist/client/assets/agent-deck-BdTe1uEF.js +0 -1
- package/dist/client/assets/agent-e2e-BUjIk9_k.js +0 -1
- package/dist/client/assets/agent-experiments-C9MFznl7.js +0 -1
- package/dist/client/assets/agent-file-CD0Yoa7I.js +0 -1
- package/dist/client/assets/agent-hosting-DZFLF8mA.js +0 -1
- package/dist/client/assets/agent-icon-DtT3h4UX.js +0 -1
- package/dist/client/assets/agent-library-ClrTwj50.js +0 -1
- package/dist/client/assets/agent-library-file-CAlMp336.js +0 -1
- package/dist/client/assets/agent-monitor-Bn4RTzzk.js +0 -1
- package/dist/client/assets/agent-settings-DUBumxG4.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CXdBuByv.js +0 -2
- package/dist/client/assets/agent-site-editor-content-xxngWBr2.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-DBUt1iNd.js +0 -1
- package/dist/client/assets/agent-view-BiUQ1gj5.js +0 -1
- package/dist/client/assets/api-keys-bhSN63jL.js +0 -1
- package/dist/client/assets/cms-settings-editor-DVlUigtK.js +0 -1
- package/dist/client/assets/index-MPdUOMBb.css +0 -1
- package/dist/client/assets/index-uNmIis3_.js +0 -4
- package/dist/client/assets/library-CKihNjtp.js +0 -1
- package/dist/client/assets/preview-tab-lR6Zy9Kz.js +0 -551
- package/dist/client/assets/project-reports-B6AQHucI.js +0 -1
- package/dist/client/assets/project-tasks-DFBfLTNl.js +0 -1
- package/dist/client/assets/record-editor-Dq4w4KU3.js +0 -1
- package/dist/client/assets/reports-DhdnjILE.js +0 -1
- package/dist/client/assets/repositories-CBH2GIms.js +0 -1
- package/dist/client/assets/review-settings-BrKUWarQ.js +0 -1
- package/dist/client/assets/route-DSfRBjPS.js +0 -1
- package/dist/client/assets/settings-tab-CPth5xHx.js +0 -1
- package/dist/client/assets/site-draft-view-D6YYVH6j.js +0 -2
- package/dist/client/assets/site-editor-CpNSE9w9.js +0 -1
- package/dist/client/assets/tasks-DBKhuSFQ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-EcJS-_aQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-XLLgwpcB.js +0 -1
- package/dist/client/assets/virtual-mcp-th0bGjq5.js +0 -1
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-BSfFPyUU.js","assets/index-DJCD1T3p.js","assets/index-BQfNeaI1.css","assets/chat-context-4LDKQ9-8.js","assets/use-panel-navigate-CYYYdsdC.js","assets/thread-route-D05ck8nv.js","assets/use-project-scope-C66L_LKx.js","assets/repository-binding-CiDG0Cr0.js","assets/use-mcp-client-DKIfKwpJ.js","assets/auth-MbbNpK0f.js","assets/autosend-nr-hPbHj.js","assets/thread-intent-DcKV1aEK.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-9GQSHr-W.js","assets/task-board-ICmHlMKj.js","assets/schema-BbiQjr1e.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-CDLwP1Su.js","assets/use-ai-providers-DB7Q0SBY.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-Bf2WDJz9.js","assets/runnable-block-editor-D9HAcpIU.js","assets/utils-BlqF72Vj.js","assets/ZoomOut-DnRMz8gp.js","assets/Image01-Bks737AT.js","assets/agent-icon-2Sd6TPJR.js","assets/AlertCircle-DGVmeswV.js","assets/Tool01-CnZckhqi.js","assets/ArrowUp-bm_9Fp5i.js","assets/ArrowLeft-DDWHto_R.js","assets/LinkBroken01-ZF7OlrXq.js","assets/ShoppingBag01-DHyiQNjO.js","assets/Building02-p3_mZ-E2.js","assets/CheckCircle-Bx5iI6Lz.js","assets/ChevronUp-ojSOtVX2.js","assets/ChevronSelectorVertical-CtVpNCaH.js","assets/UserSquare-UeuSXkL4.js","assets/Copy01-CixCoZek.js","assets/CreditCard01-D0K-VlXU.js","assets/DotsVertical-DzE0Ijkk.js","assets/Globe04-CE15ScrO.js","assets/SwitchHorizontal01-BKu4aB4V.js","assets/Key01-CxbATohw.js","assets/Link01-DCdDhO7H.js","assets/Minus-DqMKpYLh.js","assets/Monitor01-B-_Pl3qs.js","assets/Sun-BUl5hUgs.js","assets/Play-B6eaz3Uv.js","assets/Plus-B28tKNm1.js","assets/SearchMd-OCyidoZI.js","assets/Trash01-C34kFeWG.js","assets/Upload01-sDXthFWJ.js","assets/User01-2Hx1yZRb.js","assets/Users01-D78JG135.js","assets/XClose-BbuvN9Qp.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-Cjnol9_x.js","assets/format-time-Cq80KKvY.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-DGVOZrNj.js","assets/use-copy-D4R9cJ_t.js","assets/usage-stats-BFNP5B9b.js","assets/tool-namespace-CFMdc33T.js","assets/form-CIAWZjuP.js","assets/label-CBlQ82Fk.js","assets/utils-CVEq3hMx.js","assets/markdown-BU6g98sq.js","assets/use-mobile-CCkX9zL-.js","assets/tooltip-oRr5C_aw.js","assets/index-CRYNJjMc.js","assets/use-clock-tick-CmSlUOB2.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-B6MBkXrw.js","assets/types-BnGn2ply.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-Bb-Bk8Da.js","assets/avatar-DarGMVT9.js","assets/command-CPx9UwtG.js","assets/index-MrGr5MGL.js","assets/integration-icon-CMGBZM9F.js","assets/project-icon-DozUqz8V.js","assets/new-project-dialog-CYkF5k4O.js","assets/repository-import-picker-TlIvK00I.js","assets/use-navigate-to-agent-CEb5-IwU.js","assets/repository-picker-BrjMgENb.js","assets/useInfiniteQuery-C9OOM3iT.js","assets/infiniteQueryObserver-5dM4o4Hf.js","assets/collection-search-DRo1WmLT.js","assets/use-debounced-value-BdOjhsVi.js","assets/required-auth-layout-CLsGddT6.js","assets/use-org-sso-Bx0Susbk.js","assets/shell-layout-CE2Eihra.css","assets/sheet-C_qetF7d.js","assets/use-connection-PJ_l98GU.js","assets/use-mcp-prompts-MhXPkujh.js","assets/use-thread-outputs-Be0M4DCF.js","assets/file-type-icon-Ixvc6_bA.js","assets/secret-ciphertext-BrIiDgyd.js","assets/alert-B6jt7ehz.js","assets/parse-sections-7Tm_vjpy.js","assets/switch-BKqScyl8.js","assets/textarea-CTbC00Fo.js","assets/site-editor-toast-Dvaha1qd.js","assets/use-session-runtime-DgSb1tZ1.js","assets/experiments-tab-choice-p3E1pILX.js","assets/sandbox-url-D3mC8qhT.js","assets/use-sandbox-events-CioHBl5Q.js","assets/sandbox-git-api-CH_-QFpD.js","assets/popover-BsX8gIsV.js","assets/blocks-tab-states-DEKXC5rW.js","assets/slider-Dt2pZuy0.js","assets/index-BZ3kN-UW.js","assets/index-BdQq_4o_.js","assets/tooltipContext-DBLuHkF3.js","assets/CategoricalChart-Dy74bBD9.js","assets/index-xD4K2nG7.js","assets/ActiveShapeUtils-NiXAWNnI.js","assets/Sector-CtNXSnWN.js","assets/symbol-Bw5pneOj.js","assets/empty-state-vh9cmtA2.js","assets/scroll-area-CCVLtkoB.js","assets/monaco-editor-D1yDvJd3.js","assets/editor-CmZJbc4Z.js","assets/calendar-D8eqk8F_.js","assets/select-CHmq3OGd.js","assets/editor-classes-DYddjmhz.js","assets/core.esm-CumN7OYl.js","assets/sortable.esm-Dgy_5_Gq.js","assets/toggle-group-cK7x-LaG.js","assets/active-indicator-CCMhAsc_.js","assets/combobox-DZgmK343.js","assets/alert-dialog-C6IuYhIc.js","assets/search-input-43leKkGn.js","assets/tabs-BcHqdI-j.js","assets/use-file-configs-nRV9S9D0.js","assets/asset-utils-BaoKrfcS.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/mustache-CksHv2Dr.js","assets/use-section-preview-base-DxyD_MVI.js","assets/section-preview-url-7zfngvgW.js","assets/use-members-BiXVclqd.js","assets/use-org-auth-client-xXOFDOL1.js","assets/page-seo-form-VA7wIeJU.js","assets/use-apply-named-rule-DW6Wbxy3.js","assets/use-move-blocks-C6LWTkiD.js","assets/variant-matcher-override-BcEAaLIA.js","assets/variant-draft-pointer-BeAKcq_c.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as de,j as s,r as C,l as _e,b as Pe,B as Ve,aG as Qt,aY as it,aH as Re,q as rr,D as ar,K as ir,s as or,v as lr,e as Sa,h as Ct,I as An,w as Pa,aZ as ja,a2 as Kn,aT as Ea,aW as Na,au as _n,aw as On,a5 as cr,P as Dn,y as Ta,t as Xt,aX as Ca,o as Ra,m as La}from"./index-DJCD1T3p.js";import{u as dr,g as Aa,c as Ns,B as Pn,P as _a,r as Oa,R as Da,a as Ba,b as ur,S as $a,d as Ma,l as Fa,m as za,e as Ka,f as jn,N as Ia}from"./runnable-block-editor-D9HAcpIU.js";import{b as Ua,c as Rt,r as fr,l as mr,f as Ha,g as Va,w as qa}from"./chat-context-4LDKQ9-8.js";import{t as Wa}from"./ChevronUp-ojSOtVX2.js";import{T as Ga,U as Ja,M as pr,V as Ya,W as Qa,b as Xa,X as Za,Y as hr,Z as ei,_ as gr,$ as Ts,a0 as ti}from"./agent-icon-2Sd6TPJR.js";import{a as ni,n as si}from"./UserSquare-UeuSXkL4.js";import{s as vr}from"./Plus-B28tKNm1.js";import{a as xr,b as br,P as yr}from"./popover-BsX8gIsV.js";import{a as Et,b as Nt,c as wr,d as kr,e as Sr,C as Pr}from"./command-CPx9UwtG.js";import{c as ri,d as ai,a as ii}from"./repository-binding-CiDG0Cr0.js";import{a as tn}from"./sandbox-lifecycle-context-BKUYq7kP.js";import{e as oi}from"./backoff-CrEUbyZT.js";import{r as li}from"./thread-intent-DcKV1aEK.js";import{u as jr}from"./use-session-runtime-DgSb1tZ1.js";import{S as Er,d as ci,f as di,i as ui,g as fi,h as mi,j as pi,k as hi,u as nn,l as In,m as at,n as gi,o as vi,q as xi,c as Nr,b as Tr,t as bi,v as Ue,w as yi,x as wi,y as ki,z as Cs,A as Si,B as Pi,C as Rs,D as ji,E as Ei,e as Ni}from"./site-editor-toast-Dvaha1qd.js";import{u as Cr}from"./use-mobile-CCkX9zL-.js";import{T as lt,a as ct,c as dt}from"./tooltip-oRr5C_aw.js";import{T as We}from"./toolbar-icon-button-AJC8O64v.js";import{w as qt,i as Ti}from"./variant-matcher-override-BcEAaLIA.js";import{b as Ci,w as Ls}from"./variant-draft-pointer-BeAKcq_c.js";import{u as Rr,i as Ri,B as Li,S as Ai,C as _i,a as Oi,b as Di,l as Bi,D as $i}from"./blocks-tab-states-DEKXC5rW.js";import{i as Mi,a as Fi,v as zi,b as Ki,s as Tt,n as Un,c as Lr,f as He,d as Ar,h as Ii,e as Ui,g as Hi,j as Vi,k as qi,p as Wi,N as Gi,l as Ji,r as Yi,m as As,o as Qi}from"./parse-sections-7Tm_vjpy.js";import{r as Xi,D as _s,w as Os,b as Ds,a as Zi}from"./section-preview-url-7zfngvgW.js";import{p as eo,a as to,u as no,b as Bs}from"./use-fast-preview-draft-url-CGwz_fku.js";import{a as so,c as _r}from"./shell-layout-Bb-Bk8Da.js";import{u as Hn,b as ro}from"./use-sandbox-events-CioHBl5Q.js";import{u as Bn}from"./useQueries-CjLpsE8j.js";import{i as ao}from"./LinkBroken01-ZF7OlrXq.js";import{u as Or}from"./blocks-preview-workspace-context-CPEN608S.js";import{MonacoCodeEditor as io}from"./monaco-editor-D1yDvJd3.js";import{d as oo}from"./utils-BlqF72Vj.js";import{R as $s,a as Wt,b as Ms}from"./resizable-LNv9WlFU.js";import{u as lo,a as En}from"./experiments-tab-choice-p3E1pILX.js";import{w as $n}from"./device-hint-SeLRi17j.js";import{L as co}from"./label-CBlQ82Fk.js";import{a as uo,T as Fs}from"./toggle-group-cK7x-LaG.js";import{h as Dr,w as fo,a as zs}from"./preview-link-C762yHOt.js";import{r as mo,R as po}from"./virtual-mcp-DQmDpfRM.js";import{d as ho}from"./delay-CnY5UFtP.js";import{s as Br}from"./XClose-BbuvN9Qp.js";import{a as Nn,b as go,w as vo,n as Ks}from"./app-preview-url-DmK5uokM.js";import{a as xo}from"./use-organization-settings-Bf2WDJz9.js";import{E as bo}from"./empty-state-vh9cmtA2.js";import{G as Is}from"./repository-picker-BrjMgENb.js";import{R as yo}from"./repository-import-picker-TlIvK00I.js";import{r as wo}from"./preview-source-BsRLGWUP.js";import{C as ko,s as So,L as Po,R as Zt,D as Us}from"./secret-ciphertext-BrIiDgyd.js";import{A as jo,a as Eo,b as No}from"./alert-B6jt7ehz.js";import{u as To}from"./use-task-metadata-DXSFycil.js";function Co(t){const e=de.c(10),{waiting:n}=t,r=n?"true":"false";let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:s.jsx(Ga,{className:"size-5 sm:size-6"})}),e[0]=o):o=e[0];let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("span",{className:"h-px w-full border-t border-dashed border-muted-foreground/40"}),e[1]=d):d=e[1];let i;e[2]!==n?(i=n&&s.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]=n,e[3]=i):i=e[3];let l;e[4]!==i?(l=s.jsxs("span",{className:"relative flex h-2 w-16 items-center sm:w-20",children:[d,i]}),e[4]=i,e[5]=l):l=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("span",{className:"flex size-10 items-center justify-center rounded-xl bg-muted text-muted-foreground sm:size-12",children:s.jsx(Ja,{className:"size-5 sm:size-6"})}),e[6]=c):c=e[6];let a;return e[7]!==r||e[8]!==l?(a=s.jsxs("div",{"aria-hidden":"true","data-testid":"connection-wire","data-waiting":r,className:"flex items-center gap-2",children:[o,l,c]}),e[7]=r,e[8]=l,e[9]=a):a=e[9],a}function Ro(t){const e=de.c(25),{index:n,numbered:r,step:o,heading:d}=t,i=C.useId();let l;e[0]!==n||e[1]!==r?(l=r&&s.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:n}),e[0]=n,e[1]=r,e[2]=l):l=e[2];let c;e[3]!==d||e[4]!==i||e[5]!==o.title?(c=s.jsx(d,{id:i,className:"text-sm font-medium text-foreground",children:o.title}),e[3]=d,e[4]=i,e[5]=o.title,e[6]=c):c=e[6];let a;e[7]!==l||e[8]!==c?(a=s.jsxs("div",{className:"flex items-center gap-3",children:[l,c]}),e[7]=l,e[8]=c,e[9]=a):a=e[9];const p=r&&"sm:pl-9";let m;e[10]!==p?(m=_e("flex min-w-0 flex-col gap-3",p),e[10]=p,e[11]=m):m=e[11];let f;e[12]!==o.body?(f=o.body&&s.jsx("p",{className:"text-sm text-muted-foreground",children:o.body}),e[12]=o.body,e[13]=f):f=e[13];let v;e[14]!==o.command?(v=o.command&&s.jsx(ko,{command:o.command}),e[14]=o.command,e[15]=v):v=e[15];let g;e[16]!==o.after||e[17]!==m||e[18]!==f||e[19]!==v?(g=s.jsxs("div",{className:m,children:[f,v,o.after]}),e[16]=o.after,e[17]=m,e[18]=f,e[19]=v,e[20]=g):g=e[20];let E;return e[21]!==i||e[22]!==a||e[23]!==g?(E=s.jsxs("li",{"aria-labelledby":i,className:"surface flex flex-col gap-3 p-4 sm:p-5",children:[a,g]}),e[21]=i,e[22]=a,e[23]=g,e[24]=E):E=e[24],E}const Lo=[];function en(t){const e=de.c(20),{title:n,lead:r,waiting:o,alerts:d,steps:i,footer:l,headingLevel:c}=t,a=i===void 0?Lo:i,p=c===void 0?1:c,m=p===1?"h1":"h2",f=o&&a.length===0?"status":void 0;let v;e[0]!==o?(v=s.jsx(Co,{waiting:o}),e[0]=o,e[1]=v):v=e[1];let g;e[2]!==m||e[3]!==n?(g=s.jsx(m,{tabIndex:-1,className:"text-balance text-lg font-medium text-foreground outline-none sm:text-xl",children:n}),e[2]=m,e[3]=n,e[4]=g):g=e[4];let E;e[5]!==r?(E=r&&s.jsx("p",{className:"text-pretty text-sm text-muted-foreground",children:r}),e[5]=r,e[6]=E):E=e[6];let h;e[7]!==f||e[8]!==v||e[9]!==g||e[10]!==E?(h=s.jsxs("header",{role:f,className:"flex flex-col items-center gap-3 text-center",children:[v,g,E]}),e[7]=f,e[8]=v,e[9]=g,e[10]=E,e[11]=h):h=e[11];let w;e[12]!==p||e[13]!==a?(w=a.length>0&&s.jsx("ol",{className:"flex flex-col gap-3",children:a.map((y,b)=>s.jsx(Ro,{index:b+1,numbered:a.length>1,step:y,heading:p===1?"h2":"h3"},y.title))}),e[12]=p,e[13]=a,e[14]=w):w=e[14];let S;return e[15]!==d||e[16]!==l||e[17]!==h||e[18]!==w?(S=s.jsx("div",{className:"h-full w-full overflow-y-auto",children:s.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,d,w,l]})}),e[15]=d,e[16]=l,e[17]=h,e[18]=w,e[19]=S):S=e[19],S}function Ao(t){const e=de.c(55),{wait:n,hosts:r,invalidLink:o}=t,d=o===void 0?!1:o,i=Pe();let l;e[0]!==d||e[1]!==i?(l=d&&s.jsx(jo,{variant:"warning",children:s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[s.jsx(Eo,{className:"line-clamp-none text-foreground",children:i("decoServe.link.invalidTitle")}),s.jsx(No,{children:i("decoServe.link.invalidBody")})]})}),e[0]=d,e[1]=i,e[2]=l):l=e[2];const c=l;if(n.kind==="problem"){let R;e[3]!==i||e[4]!==n.host||e[5]!==n.problem?(R=So(i,n.problem,n.host),e[3]=i,e[4]=n.host,e[5]=n.problem,e[6]=R):R=e[6];const{title:T,body:L}=R;let D;e[7]!==L?(D=s.jsx(Zt,{text:L}),e[7]=L,e[8]=D):D=e[8];let _;e[9]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Us,{className:"border-t border-border pt-4",links:["troubleshooting","serve"]}),e[9]=_):_=e[9];let A;return e[10]!==c||e[11]!==D||e[12]!==T?(A=s.jsx(en,{headingLevel:2,waiting:!1,title:T,lead:D,alerts:c,footer:_}),e[10]=c,e[11]=D,e[12]=T,e[13]=A):A=e[13],A}const a=n.kind==="looking",p=a&&!n.paused;let m;e[14]!==i?(m=i("decoServe.waiting.title"),e[14]=i,e[15]=m):m=e[15];let f;e[16]!==i?(f=i("decoServe.waiting.lead"),e[16]=i,e[17]=f):f=e[17];let v;e[18]!==c||e[19]!==n.kind?(v=(c||n.kind==="denied")&&s.jsxs(s.Fragment,{children:[c,n.kind==="denied"&&s.jsx(Po,{})]}),e[18]=c,e[19]=n.kind,e[20]=v):v=e[20];let g;e[21]!==i?(g=i("decoServe.guide.step1.title"),e[21]=i,e[22]=g):g=e[22];let E;e[23]!==i?(E=i("decoServe.guide.step1.body"),e[23]=i,e[24]=E):E=e[24];let h;e[25]!==E?(h=s.jsx(Zt,{text:E}),e[25]=E,e[26]=h):h=e[26];let w;e[27]!==g||e[28]!==h?(w={title:g,body:h,command:Er},e[27]=g,e[28]=h,e[29]=w):w=e[29];let S;e[30]!==i?(S=i("decoServe.waiting.step2.title"),e[30]=i,e[31]=S):S=e[31];let y;e[32]!==i?(y=i("decoServe.waiting.step2.body"),e[32]=i,e[33]=y):y=e[33];let b;e[34]!==r||e[35]!==a||e[36]!==i||e[37]!==n.kind||e[38]!==n.onStart||e[39]!==n.paused?(b=n.kind==="needs-gesture"?s.jsx(Ve,{variant:"outline",className:"self-start",onClick:n.onStart,children:i("decoServe.guide.step2.start")}):a&&s.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:n.paused?i("decoServe.guide.step2.paused"):i("decoServe.guide.step2.looking",{hosts:r})}),e[34]=r,e[35]=a,e[36]=i,e[37]=n.kind,e[38]=n.onStart,e[39]=n.paused,e[40]=b):b=e[40];let j;e[41]!==S||e[42]!==y||e[43]!==b?(j={title:S,body:y,after:b},e[41]=S,e[42]=y,e[43]=b,e[44]=j):j=e[44];let P;e[45]!==w||e[46]!==j?(P=[w,j],e[45]=w,e[46]=j,e[47]=P):P=e[47];let x;e[48]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Us,{className:"border-t border-border pt-4",links:["siteEditor","serve","troubleshooting"]}),e[48]=x):x=e[48];let N;return e[49]!==P||e[50]!==p||e[51]!==m||e[52]!==f||e[53]!==v?(N=s.jsx(en,{headingLevel:2,waiting:p,title:m,lead:f,alerts:v,steps:P,footer:x}),e[49]=P,e[50]=p,e[51]=m,e[52]=f,e[53]=v,e[54]=N):N=e[54],N}function _o(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 Oo=15e3,Do=3e3;function Bo(t){const{candidates:e,probe:n,onFound:r,onChange:o,doc:d=document,setTimer:i=(b,j)=>setTimeout(b,j),clearTimer:l=b=>clearTimeout(b),timeoutMs:c=Do}=t;let a={status:"searching",firstRoundDone:!1,problem:null},p=!1,m=!1,f=0,v=null,g=null;const E=()=>d.visibilityState==="hidden",h=b=>{a={...a,...b},o(a)},w=async b=>{g=new AbortController;const j=g,P=i(()=>j.abort(),c);try{return await n(b,j.signal),!0}catch(x){if(p)return!1;const N=di(x);return N.reason!=="not-answering"?h({problem:{...N,endpoint:b}}):a.problem?.endpoint===b&&h({problem:null}),!1}finally{l(P),g=null}},S=async()=>{if(v=null,!(p||m)){if(e.length===0){h({status:"stopped",firstRoundDone:!0});return}if(E()){h({status:"paused"});return}m=!0,a.status!=="searching"&&h({status:"searching"});for(const b of e){if(p)break;if(await w(b)){if(m=!1,p)return;p=!0,d.removeEventListener("visibilitychange",y),h({status:"found",firstRoundDone:!0}),r(b);return}}if(m=!1,!p){if(f+=1,a.firstRoundDone||h({firstRoundDone:!0}),E()){h({status:"paused"});return}v=i(()=>{S()},ci(f,Oo))}}};function y(){if(!p){if(E()){v!==null&&(l(v),v=null),m||h({status:"paused"});return}v!==null&&l(v),f=0,S()}}return d.addEventListener("visibilitychange",y),o(a),S(),()=>{p=!0,v!==null&&l(v),g?.abort(),d.removeEventListener("visibilitychange",y)}}function $o(t,e){return fi(mi({endpoint:t,fetch:n=>fetch(n,{signal:e})}))}const Mo=["loopback-network","local-network-access"];async function Fo(){if(ui(window.location.origin))return null;for(const t of Mo)try{return await navigator.permissions.query({name:t})}catch{}return null}let $r=null,Hs=!1;const Tn=new Set;function zo(t){if(Tn.add(t),!Hs){Hs=!0;const e=n=>{$r=n;for(const r of Tn)r()};Fo().then(n=>{if(!n)return e("unsupported");e(n.state),n.addEventListener("change",()=>e(n.state))})}return()=>Tn.delete(t)}const Ko={status:"stopped",firstRoundDone:!1,problem:null},Cn=new Map;function Io(t){const e=Cn.get(t);if(e)return e;let n={status:"searching",firstRoundDone:!1,problem:null};const r=new Set;let o=null;const d={onFound:()=>{},getSnapshot:()=>n,subscribe:i=>(r.add(i),o??=Bo({candidates:t.split(" "),probe:$o,onFound:l=>d.onFound(l),onChange:l=>{n=l;for(const c of r)c()}}),()=>{r.delete(i),!(r.size>0)&&(o?.(),o=null,Cn.delete(t))})};return Cn.set(t,d),d}function Mr(){return C.useSyncExternalStore(zo,qs,qs)}const Uo=()=>()=>{},Vs=()=>Ko,qs=()=>$r;function Dd(t){const e=de.c(9),{candidates:n,onFound:r}=t,[o,d]=C.useState(!1),i=Mr(),c=(i==="granted"||i==="unsupported"||i==="prompt"&&o)&&n.length>0;let a;e[0]!==c||e[1]!==n||e[2]!==r?(a=c?Io(n.join(" ")):null,a&&(a.onFound=r),e[0]=c,e[1]=n,e[2]=r,e[3]=a):a=e[3];const p=C.useSyncExternalStore(a?.subscribe??Uo,a?.getSnapshot??Vs,a?.getSnapshot??Vs),m=i==="prompt"&&!o;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=()=>d(!0),e[4]=f):f=e[4];let v;return e[5]!==i||e[6]!==p||e[7]!==m?(v={state:p,access:i,needsGesture:m,start:f},e[5]=i,e[6]=p,e[7]=m,e[8]=v):v=e[8],v}const Rn={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function Ho(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:o=!1,codingSession:d=!1,hostedDraft:i=!1}=t,l=d?null:t.previewServerUrl;return t.deciding?{...Rn,showDecidingLoader:!0}:t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?Rn:i&&t.hostedPointerPending&&!o?{...Rn,showDecidingLoader:!0}:r&&o&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:r&&i&&l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!1}:!r&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:l?{mode:"production",iframeBase:l,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const Vo=1e4,qo=1e3,Wo=3e4;function Go({iframeRef:t,src:e,active:n}){const r=C.useRef(0),o=C.useRef(null),d=C.useRef(null),i=C.useRef(e),l=C.useRef(n);i.current=e,l.current=n;const c=()=>{o.current&&clearTimeout(o.current),d.current&&clearTimeout(d.current),o.current=null,d.current=null},a=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,p()},Vo)},p=()=>{if(!l.current||!i.current)return;d.current&&clearTimeout(d.current);const v=oi(Wo,qo,r.current,2,.5);r.current+=1,d.current=setTimeout(()=>{d.current=null;const g=t.current,E=i.current;!g||!E||!l.current||(g.src=E,a())},v)},m=()=>{r.current=0,c()},f=()=>{o.current&&(clearTimeout(o.current),o.current=null),p()};return C.useEffect(()=>{if(c(),r.current=0,!(!n||!e))return a(),c},[e,n]),{handleLoad:m,handleError:f}}const Jo=1500,Yo=500;function Qo({iframe:t,reload:e,waitMs:n=Jo,confirmMs:r=Yo}){let o;const d=()=>{clearTimeout(i),o=setTimeout(e,r)};t.addEventListener("load",d,{once:!0});const i=setTimeout(()=>{t.removeEventListener("load",d),e()},n);return()=>{clearTimeout(i),clearTimeout(o),t.removeEventListener("load",d)}}const Xo=Qt({tag:Re(),id:Re(),classes:Re(),text:Re(),html:Re(),manifestKey:Re().nullable(),componentName:Re().nullable(),parents:Re(),url:Re(),path:Re(),viewport:Qt({width:it(),height:it()}),position:Qt({x:it(),y:it()})}),Zo=`(function() {
|
|
3
|
+
if (window.__visualEditorActive) return;
|
|
4
|
+
window.__visualEditorActive = true;
|
|
5
|
+
|
|
6
|
+
var cursorStyle = document.createElement("style");
|
|
7
|
+
cursorStyle.textContent = "* { cursor: default !important; }";
|
|
8
|
+
document.head.appendChild(cursorStyle);
|
|
9
|
+
|
|
10
|
+
var highlight = document.createElement("div");
|
|
11
|
+
highlight.style.cssText = "position:fixed;pointer-events:none;outline:2px solid #a855f7;background:rgba(168,85,247,0.08);border-radius:2px;z-index:2147483647;display:none;";
|
|
12
|
+
document.body.appendChild(highlight);
|
|
13
|
+
|
|
14
|
+
var badge = document.createElement("div");
|
|
15
|
+
badge.style.cssText = "position:fixed;pointer-events:none;background:#a855f7;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
16
|
+
document.body.appendChild(badge);
|
|
17
|
+
|
|
18
|
+
var lastTarget = null;
|
|
19
|
+
var rafPending = false;
|
|
20
|
+
var moveHandler = function(e) {
|
|
21
|
+
if (rafPending) return;
|
|
22
|
+
rafPending = true;
|
|
23
|
+
var target = e.target;
|
|
24
|
+
requestAnimationFrame(function() {
|
|
25
|
+
rafPending = false;
|
|
26
|
+
var el = target;
|
|
27
|
+
if (!el || el === highlight || el === badge) return;
|
|
28
|
+
if (el === lastTarget) return;
|
|
29
|
+
lastTarget = el;
|
|
30
|
+
var r = el.getBoundingClientRect();
|
|
31
|
+
highlight.style.display = "block";
|
|
32
|
+
highlight.style.top = r.top + "px";
|
|
33
|
+
highlight.style.left = r.left + "px";
|
|
34
|
+
highlight.style.width = r.width + "px";
|
|
35
|
+
highlight.style.height = r.height + "px";
|
|
36
|
+
var tag = el.tagName.toLowerCase();
|
|
37
|
+
var id = el.id ? "#" + el.id : "";
|
|
38
|
+
var cls = el.className && typeof el.className === "string"
|
|
39
|
+
? "." + el.className.trim().split(/\\s+/).slice(0, 2).join(".")
|
|
40
|
+
: "";
|
|
41
|
+
badge.textContent = tag + id + cls;
|
|
42
|
+
badge.style.display = "block";
|
|
43
|
+
badge.style.top = Math.max(0, r.top - 20) + "px";
|
|
44
|
+
badge.style.left = r.left + "px";
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
48
|
+
|
|
49
|
+
var outHandler = function(e) {
|
|
50
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
51
|
+
highlight.style.display = "none";
|
|
52
|
+
badge.style.display = "none";
|
|
53
|
+
lastTarget = null;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
57
|
+
|
|
58
|
+
var clickHandler = function(e) {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
e.stopImmediatePropagation();
|
|
61
|
+
var el = e.target;
|
|
62
|
+
if (!el || el === highlight || el === badge) return;
|
|
63
|
+
|
|
64
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
65
|
+
highlight.style.background = "rgba(168,85,247,0.15)";
|
|
66
|
+
setTimeout(function() {
|
|
67
|
+
highlight.style.outline = "2px solid #a855f7";
|
|
68
|
+
highlight.style.background = "rgba(168,85,247,0.08)";
|
|
69
|
+
}, 400);
|
|
70
|
+
|
|
71
|
+
var tag = el.tagName.toLowerCase();
|
|
72
|
+
var id = el.id || "";
|
|
73
|
+
var classes = el.className && typeof el.className === "string" ? el.className.trim() : "";
|
|
74
|
+
var text = (el.textContent || "").trim().slice(0, 200);
|
|
75
|
+
var html = (el.outerHTML || "").slice(0, 800).replace(/\\svalue=("[^"]*"|'[^']*'|\\S+)/gi, "");
|
|
76
|
+
|
|
77
|
+
var closestSection = el.closest("section[data-manifest-key]");
|
|
78
|
+
var manifestKey = closestSection ? closestSection.getAttribute("data-manifest-key") : null;
|
|
79
|
+
|
|
80
|
+
var ancestor = el;
|
|
81
|
+
var componentName = null;
|
|
82
|
+
for (var i = 0; i < 10 && ancestor; i++) {
|
|
83
|
+
if (ancestor.dataset) componentName = ancestor.dataset.componentName || componentName;
|
|
84
|
+
ancestor = ancestor.parentElement;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var parents = [];
|
|
88
|
+
var p = el.parentElement;
|
|
89
|
+
for (var j = 0; j < 4 && p && p !== document.body; j++) {
|
|
90
|
+
var pTag = p.tagName ? p.tagName.toLowerCase() : "";
|
|
91
|
+
var pId = p.id ? "#" + p.id : "";
|
|
92
|
+
var pCls = p.className && typeof p.className === "string"
|
|
93
|
+
? "." + p.className.trim().split(/\\s+/)[0]
|
|
94
|
+
: "";
|
|
95
|
+
parents.unshift(pTag + pId + pCls);
|
|
96
|
+
p = p.parentElement;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
window.parent.postMessage({
|
|
100
|
+
type: "visual-editor::element-clicked",
|
|
101
|
+
payload: {
|
|
102
|
+
tag: tag, id: id, classes: classes, text: text, html: html,
|
|
103
|
+
manifestKey: manifestKey, componentName: componentName,
|
|
104
|
+
parents: parents.join(" > "),
|
|
105
|
+
url: window.location.href, path: window.location.pathname,
|
|
106
|
+
viewport: { width: window.innerWidth, height: window.innerHeight },
|
|
107
|
+
position: { x: Math.round(e.clientX), y: Math.round(e.clientY) }
|
|
108
|
+
}
|
|
109
|
+
}, "*");
|
|
110
|
+
};
|
|
111
|
+
document.addEventListener("click", clickHandler, true);
|
|
112
|
+
|
|
113
|
+
window.addEventListener("message", function(e) {
|
|
114
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — a nested/downstream frame's forged message can't deactivate the editor.
|
|
115
|
+
if (e.source !== window.parent) return;
|
|
116
|
+
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
117
|
+
if (e.data && e.data.type === "visual-editor::clear-hover") {
|
|
118
|
+
highlight.style.display = "none";
|
|
119
|
+
badge.style.display = "none";
|
|
120
|
+
lastTarget = null;
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (e.data && e.data.type === "visual-editor::deactivate") {
|
|
124
|
+
highlight.remove();
|
|
125
|
+
badge.remove();
|
|
126
|
+
cursorStyle.remove();
|
|
127
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
128
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
129
|
+
document.removeEventListener("click", clickHandler, true);
|
|
130
|
+
window.__visualEditorActive = false;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
})();`;function el(t,e){const n=t.map(()=>null),r=[];for(let f=0;f<t.length;f++)t[f]!==null&&r.push(f);const o=r.length,d=e.length;if(!o||!d)return n;const i=(f,v)=>{const g=t[r[f]??0];return!g||!g.length?1:g.indexOf(e[v]??"")>=0?2:0},l=[],c=[];for(let f=0;f<=o;f++)l.push(new Array(d+1).fill(0)),c.push(new Array(d+1).fill(2));for(let f=1;f<=o;f++){const v=l[f-1]??[],g=l[f]??[],E=c[f]??[];for(let h=1;h<=d;h++){let w=v[h]??0,S=2;const y=g[h-1]??0;y>w&&(w=y,S=0);const b=i(f-1,h-1),j=(v[h-1]??0)+b;b>0&&j>w&&(w=j,S=1),g[h]=w,E[h]=S}}let a=0,p=o,m=d;for(;p>0&&m>0;){const f=c[p]?.[m]??2;f===1?(n[r[p-1]??0]=m-1,a++,p--,m--):f===0?m--:p--}if(a===0&&d===o)for(let f=0;f<o;f++)n[r[f]??0]=f;return n}const tl=Qt({sectionIndex:it(),manifestKey:Re(),clickSeq:it()}),Ws=`(function() {
|
|
134
|
+
if (window.__cmsEditorActive) return;
|
|
135
|
+
window.__cmsEditorActive = true;
|
|
136
|
+
|
|
137
|
+
// Preserve scroll across variant-override navigations and save-reloads.
|
|
138
|
+
// Selecting a variant rebuilds the iframe src (new x-deco-matchers-override)
|
|
139
|
+
// or reloads it, which would otherwise jump to the top. We persist the scroll
|
|
140
|
+
// offset to sessionStorage (survives reload, same-origin) keyed by pathname
|
|
141
|
+
// (the override only changes the query, so the key is stable), then restore it
|
|
142
|
+
// on the next load — retried for ~1s so it outlasts re-hydration and lazy
|
|
143
|
+
// sections that grow the page after load. The recency guard avoids restoring a
|
|
144
|
+
// stale offset on a genuinely fresh visit.
|
|
145
|
+
var SCROLL_KEY = "__cms_preview_scroll:" + location.pathname;
|
|
146
|
+
var saveScroll = function() {
|
|
147
|
+
try {
|
|
148
|
+
sessionStorage.setItem(SCROLL_KEY, JSON.stringify({
|
|
149
|
+
x: window.scrollX, y: window.scrollY, t: Date.now()
|
|
150
|
+
}));
|
|
151
|
+
} catch (_) {}
|
|
152
|
+
};
|
|
153
|
+
var saveScrollPending = false;
|
|
154
|
+
window.addEventListener("scroll", function() {
|
|
155
|
+
if (saveScrollPending) return;
|
|
156
|
+
saveScrollPending = true;
|
|
157
|
+
requestAnimationFrame(function() { saveScrollPending = false; saveScroll(); });
|
|
158
|
+
}, { passive: true });
|
|
159
|
+
(function restoreScroll() {
|
|
160
|
+
var raw = null;
|
|
161
|
+
try { raw = sessionStorage.getItem(SCROLL_KEY); } catch (_) {}
|
|
162
|
+
if (!raw) return;
|
|
163
|
+
var saved = null;
|
|
164
|
+
try { saved = JSON.parse(raw); } catch (_) { return; }
|
|
165
|
+
if (!saved || (Date.now() - saved.t) > 10000) return;
|
|
166
|
+
if (!saved.x && !saved.y) return;
|
|
167
|
+
var attempts = 0;
|
|
168
|
+
var apply = function() {
|
|
169
|
+
attempts++;
|
|
170
|
+
window.scrollTo(saved.x || 0, saved.y || 0);
|
|
171
|
+
if (attempts < 8) setTimeout(apply, 120);
|
|
172
|
+
};
|
|
173
|
+
apply();
|
|
174
|
+
})();
|
|
175
|
+
|
|
176
|
+
var highlight = document.createElement("div");
|
|
177
|
+
highlight.style.cssText = "position:absolute;pointer-events:none;outline:2px solid #06b6d4;background:rgba(6,182,212,0.06);border-radius:2px;z-index:2147483647;display:none;";
|
|
178
|
+
document.body.appendChild(highlight);
|
|
179
|
+
|
|
180
|
+
var badge = document.createElement("div");
|
|
181
|
+
badge.style.cssText = "position:absolute;pointer-events:none;background:#06b6d4;color:white;font:11px/1 monospace;padding:2px 6px;border-radius:2px;z-index:2147483647;display:none;white-space:nowrap;max-width:240px;overflow:hidden;text-overflow:ellipsis;";
|
|
182
|
+
document.body.appendChild(badge);
|
|
183
|
+
|
|
184
|
+
var isTopLevelSection = function(el) {
|
|
185
|
+
return el && el.parentElement
|
|
186
|
+
? !el.parentElement.closest("section[data-manifest-key]")
|
|
187
|
+
: true;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// All top-level page sections in DOM order (deco renders page sections as
|
|
191
|
+
// <section data-manifest-key>; nested islands/sections carry the attribute
|
|
192
|
+
// too, hence the top-level filter). This is the full DOM run, framework
|
|
193
|
+
// sections included — getAllSections() narrows it to the editable window.
|
|
194
|
+
var topLevelSections = function() {
|
|
195
|
+
return Array.from(document.querySelectorAll("section[data-manifest-key]"))
|
|
196
|
+
.filter(isTopLevelSection);
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
// Acceptable DOM keys per section; [] = wildcard, null = renders nothing.
|
|
200
|
+
var sectionCandidates = [];
|
|
201
|
+
|
|
202
|
+
// Stringified from section-alignment.ts so both sides share one copy.
|
|
203
|
+
var alignSections = ${el.toString()};
|
|
204
|
+
|
|
205
|
+
// Indexed like the decofile array; unmapped entries stay null (not clickable).
|
|
206
|
+
var computeAlignment = function(tops) {
|
|
207
|
+
var domKeys = tops.map(function(s) { return s.getAttribute("data-manifest-key"); });
|
|
208
|
+
return alignSections(sectionCandidates, domKeys).map(function(idx) {
|
|
209
|
+
return idx === null ? null : tops[idx];
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
// Editable sections, indexed to match the decofile array the panel uses.
|
|
214
|
+
// Recomputed from the live DOM each call (cheap, rAF-throttled) so it
|
|
215
|
+
// self-heals as client-rendered/lazy sections mount. Until the editor sends
|
|
216
|
+
// candidates, fall back to the full top-level run.
|
|
217
|
+
var getAllSections = function() {
|
|
218
|
+
var tops = topLevelSections();
|
|
219
|
+
return sectionCandidates.length ? computeAlignment(tops) : tops;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// Resolve to the OUTERMOST page-level section (clicking nested content still
|
|
223
|
+
// maps to the top-level section the panel indexes); null if it isn't in the
|
|
224
|
+
// aligned editable set (a framework section deco injected).
|
|
225
|
+
var findSection = function(el, out) {
|
|
226
|
+
var node = el;
|
|
227
|
+
var found = null;
|
|
228
|
+
while (node && node !== document.body) {
|
|
229
|
+
if (node.tagName === "SECTION" && node.hasAttribute && node.hasAttribute("data-manifest-key")) {
|
|
230
|
+
found = node;
|
|
231
|
+
}
|
|
232
|
+
node = node.parentElement;
|
|
233
|
+
}
|
|
234
|
+
if (!found) return null;
|
|
235
|
+
var sections = getAllSections();
|
|
236
|
+
if (out) out.sections = sections;
|
|
237
|
+
return sections.indexOf(found) >= 0 ? found : null;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// A Lazy wrapper's key is just the loader — show the inner section's instead.
|
|
241
|
+
var LAZY_KEYS = [
|
|
242
|
+
"website/sections/Rendering/Lazy.tsx",
|
|
243
|
+
"website/sections/Rendering/SingleDeferred.tsx"
|
|
244
|
+
];
|
|
245
|
+
var isLazyKey = function(key) {
|
|
246
|
+
return LAZY_KEYS.some(function(s) { return key.endsWith(s); });
|
|
247
|
+
};
|
|
248
|
+
var displayKey = function(section) {
|
|
249
|
+
var key = section.getAttribute("data-manifest-key") || "section";
|
|
250
|
+
if (isLazyKey(key)) {
|
|
251
|
+
var inner = section.querySelector("section[data-manifest-key]");
|
|
252
|
+
if (inner) return inner.getAttribute("data-manifest-key") || key;
|
|
253
|
+
}
|
|
254
|
+
return key;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// Per-section metadata sent by the editor, aligned by index with
|
|
258
|
+
// getAllSections(). labels: names the DOM can't carry (a global section or a
|
|
259
|
+
// global inside async rendering); kinds: section type that drives the color.
|
|
260
|
+
var sectionLabels = [];
|
|
261
|
+
var sectionKinds = [];
|
|
262
|
+
var labelFor = function(section, sections) {
|
|
263
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
264
|
+
if (idx >= 0 && sectionLabels[idx]) return sectionLabels[idx];
|
|
265
|
+
return displayKey(section);
|
|
266
|
+
};
|
|
267
|
+
var kindFor = function(section, sections) {
|
|
268
|
+
var idx = (sections || getAllSections()).indexOf(section);
|
|
269
|
+
return (idx >= 0 && sectionKinds[idx]) || "normal";
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
// Highlight palette by section kind: global = light purple, variant = green,
|
|
273
|
+
// normal = blue.
|
|
274
|
+
var COLORS = {
|
|
275
|
+
normal: { solid: "#06b6d4", bg: "rgba(6,182,212,0.06)", active: "rgba(6,182,212,0.18)" },
|
|
276
|
+
global: { solid: "#c084fc", bg: "rgba(192,132,252,0.10)", active: "rgba(192,132,252,0.22)" },
|
|
277
|
+
variant: { solid: "#22c55e", bg: "rgba(34,197,94,0.08)", active: "rgba(34,197,94,0.20)" }
|
|
278
|
+
};
|
|
279
|
+
var applyColor = function(kind) {
|
|
280
|
+
var c = COLORS[kind] || COLORS.normal;
|
|
281
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
282
|
+
highlight.style.background = c.bg;
|
|
283
|
+
badge.style.background = c.solid;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
var lastSection = null;
|
|
287
|
+
var lastLabel = "";
|
|
288
|
+
var lastKind = "normal";
|
|
289
|
+
var rafPending = false;
|
|
290
|
+
// True while an in-place render fetch/swap is in flight; suppresses hover so it can't re-show the overlay right before the swap snapshots it.
|
|
291
|
+
var renderPending = false;
|
|
292
|
+
|
|
293
|
+
// Document-relative coordinates (rect + scroll) on absolutely-positioned
|
|
294
|
+
// nodes, so the browser scrolls the highlight together with the page
|
|
295
|
+
// natively — no per-frame JS repositioning, no scroll lag.
|
|
296
|
+
var positionHighlight = function(section) {
|
|
297
|
+
var r = section.getBoundingClientRect();
|
|
298
|
+
var top = r.top + window.scrollY;
|
|
299
|
+
var left = r.left + window.scrollX;
|
|
300
|
+
highlight.style.display = "block";
|
|
301
|
+
highlight.style.top = top + "px";
|
|
302
|
+
highlight.style.left = left + "px";
|
|
303
|
+
highlight.style.width = r.width + "px";
|
|
304
|
+
highlight.style.height = r.height + "px";
|
|
305
|
+
badge.textContent = lastLabel || displayKey(section);
|
|
306
|
+
badge.style.display = "block";
|
|
307
|
+
badge.style.top = Math.max(0, top - 20) + "px";
|
|
308
|
+
badge.style.left = left + "px";
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
var moveHandler = function(e) {
|
|
312
|
+
if (renderPending || rafPending) return;
|
|
313
|
+
rafPending = true;
|
|
314
|
+
var target = e.target;
|
|
315
|
+
requestAnimationFrame(function() {
|
|
316
|
+
rafPending = false;
|
|
317
|
+
if (renderPending) return;
|
|
318
|
+
if (!target || target === highlight || target === badge) return;
|
|
319
|
+
var out = {};
|
|
320
|
+
var section = findSection(target, out);
|
|
321
|
+
if (section === lastSection) return;
|
|
322
|
+
lastSection = section;
|
|
323
|
+
if (!section) {
|
|
324
|
+
highlight.style.display = "none";
|
|
325
|
+
badge.style.display = "none";
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
lastLabel = labelFor(section, out.sections);
|
|
329
|
+
lastKind = kindFor(section, out.sections);
|
|
330
|
+
applyColor(lastKind);
|
|
331
|
+
positionHighlight(section);
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
document.addEventListener("mousemove", moveHandler, true);
|
|
335
|
+
|
|
336
|
+
// Window scroll is handled natively by the absolute positioning above; this
|
|
337
|
+
// only re-syncs on resize and on scrolls inside nested scroll containers
|
|
338
|
+
// (capture=true catches those), where document coordinates do shift.
|
|
339
|
+
var reposition = function() {
|
|
340
|
+
if (!lastSection || highlight.style.display === "none") return;
|
|
341
|
+
if (rafPending) return;
|
|
342
|
+
rafPending = true;
|
|
343
|
+
requestAnimationFrame(function() {
|
|
344
|
+
rafPending = false;
|
|
345
|
+
if (lastSection && highlight.style.display !== "none") positionHighlight(lastSection);
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
window.addEventListener("scroll", reposition, { capture: true, passive: true });
|
|
349
|
+
window.addEventListener("resize", reposition, { passive: true });
|
|
350
|
+
|
|
351
|
+
var outHandler = function(e) {
|
|
352
|
+
if (!e.relatedTarget || e.relatedTarget === document.documentElement) {
|
|
353
|
+
highlight.style.display = "none";
|
|
354
|
+
badge.style.display = "none";
|
|
355
|
+
lastSection = null;
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
document.addEventListener("mouseout", outHandler, true);
|
|
359
|
+
|
|
360
|
+
var clickSeq = 0;
|
|
361
|
+
|
|
362
|
+
// Blocks observes clicks to select sections in the side panel; it must not
|
|
363
|
+
// cancel the iframe page's own handlers or native control behavior.
|
|
364
|
+
var clickHandler = function(e) {
|
|
365
|
+
var target = e.target;
|
|
366
|
+
if (!target || target === highlight || target === badge) return;
|
|
367
|
+
var out = {};
|
|
368
|
+
var section = findSection(target, out);
|
|
369
|
+
if (!section) return;
|
|
370
|
+
|
|
371
|
+
var sectionIndex = out.sections.indexOf(section);
|
|
372
|
+
var manifestKey = section.getAttribute("data-manifest-key") || "";
|
|
373
|
+
|
|
374
|
+
var c = COLORS[lastKind] || COLORS.normal;
|
|
375
|
+
highlight.style.outline = "2px solid " + c.solid;
|
|
376
|
+
highlight.style.background = c.active;
|
|
377
|
+
setTimeout(function() {
|
|
378
|
+
highlight.style.background = c.bg;
|
|
379
|
+
}, 400);
|
|
380
|
+
|
|
381
|
+
clickSeq++;
|
|
382
|
+
window.parent.postMessage({
|
|
383
|
+
type: "cms-editor::section-clicked",
|
|
384
|
+
payload: { sectionIndex: sectionIndex, manifestKey: manifestKey, clickSeq: clickSeq }
|
|
385
|
+
}, "*");
|
|
386
|
+
};
|
|
387
|
+
document.addEventListener("click", clickHandler, true);
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Navigation is disabled while editing: leaving the page would leave the
|
|
391
|
+
* panel editing the previous page's sections. Only the default action of a
|
|
392
|
+
* real navigation is cancelled, never propagation — in-page controls must
|
|
393
|
+
* keep working (#5567).
|
|
394
|
+
*/
|
|
395
|
+
var isNavigatingAnchor = function(a) {
|
|
396
|
+
if (!a) return false;
|
|
397
|
+
var href = a.getAttribute("href");
|
|
398
|
+
if (!href) return false;
|
|
399
|
+
var trimmed = href.trim();
|
|
400
|
+
if (!trimmed || trimmed.charAt(0) === "#") return false;
|
|
401
|
+
if (/^javascript:/i.test(trimmed)) return false;
|
|
402
|
+
// Same document + fragment only scrolls.
|
|
403
|
+
try {
|
|
404
|
+
var url = new URL(a.href, location.href);
|
|
405
|
+
if (url.href.split("#")[0] === location.href.split("#")[0]) return false;
|
|
406
|
+
} catch (_) {}
|
|
407
|
+
return true;
|
|
408
|
+
};
|
|
409
|
+
var navBlocker = function(e) {
|
|
410
|
+
var el = e.target;
|
|
411
|
+
var a = el && el.closest ? el.closest("a") : null;
|
|
412
|
+
if (!isNavigatingAnchor(a)) return;
|
|
413
|
+
e.preventDefault();
|
|
414
|
+
};
|
|
415
|
+
document.addEventListener("click", navBlocker, true);
|
|
416
|
+
|
|
417
|
+
var submitBlocker = function(e) { e.preventDefault(); };
|
|
418
|
+
document.addEventListener("submit", submitBlocker, true);
|
|
419
|
+
|
|
420
|
+
// Fast Preview in-place render: POST merged decofile to /live/previews, swap the HTML in (document/window listeners survive; overlay nodes get re-attached).
|
|
421
|
+
var renderCtrl = null;
|
|
422
|
+
var renderQueue = Promise.resolve();
|
|
423
|
+
var TRANSITION_TAG =
|
|
424
|
+
"<style id=\\"deco-disable-transitions\\">* { transition: none !important; }</style></head>";
|
|
425
|
+
|
|
426
|
+
// A skipped view transition rejects its promises with "AbortError:
|
|
427
|
+
// Transition was skipped"; nobody else waits on them, so they are settled
|
|
428
|
+
// here rather than left as uncaught errors in the page's console.
|
|
429
|
+
var settleTransition = function(vt) {
|
|
430
|
+
if (!vt) return;
|
|
431
|
+
var ignore = function() {};
|
|
432
|
+
if (vt.ready) vt.ready.catch(ignore);
|
|
433
|
+
if (vt.updateCallbackDone) vt.updateCallbackDone.catch(ignore);
|
|
434
|
+
if (vt.finished) vt.finished.catch(ignore);
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
// A site that opts into cross-document view transitions
|
|
438
|
+
// (@view-transition { navigation: auto }) gets one on every reload a save
|
|
439
|
+
// makes. When the next save navigates the frame before that transition
|
|
440
|
+
// starts, the browser skips it and rejects the outgoing page's ready
|
|
441
|
+
// promise, which only a pageswap listener can reach. Kept after deactivate:
|
|
442
|
+
// settling changes nothing else, and the frame may still navigate.
|
|
443
|
+
if (!window.__cmsEditorPageSwap) {
|
|
444
|
+
window.__cmsEditorPageSwap = true;
|
|
445
|
+
window.addEventListener("pageswap", function(e) {
|
|
446
|
+
settleTransition(e.viewTransition);
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// A quick second save skips the running transition. Only finished says
|
|
451
|
+
// when the swap is over, so the chain waits on it; the rest is settled.
|
|
452
|
+
var runSwapTransition = function(swap) {
|
|
453
|
+
if (typeof document.startViewTransition !== "function") {
|
|
454
|
+
swap();
|
|
455
|
+
return Promise.resolve();
|
|
456
|
+
}
|
|
457
|
+
var vt = document.startViewTransition(swap);
|
|
458
|
+
settleTransition(vt);
|
|
459
|
+
return vt.finished;
|
|
460
|
+
};
|
|
461
|
+
var renderInPlace = function(src, body) {
|
|
462
|
+
if (renderCtrl) renderCtrl.abort();
|
|
463
|
+
var ctrl = new AbortController();
|
|
464
|
+
renderCtrl = ctrl;
|
|
465
|
+
renderPending = true;
|
|
466
|
+
highlight.style.display = "none";
|
|
467
|
+
badge.style.display = "none";
|
|
468
|
+
window.parent.postMessage({ type: "cms-editor::render-start" }, "*");
|
|
469
|
+
renderQueue = renderQueue.then(function() {
|
|
470
|
+
return fetch(src, {
|
|
471
|
+
method: "POST",
|
|
472
|
+
body: body,
|
|
473
|
+
signal: ctrl.signal,
|
|
474
|
+
headers: { accept: "text/html", "content-type": "application/json" }
|
|
475
|
+
}).then(function(res) {
|
|
476
|
+
if (!res.ok) throw new Error("render " + res.status);
|
|
477
|
+
return res.text();
|
|
478
|
+
}).then(function(html) {
|
|
479
|
+
var swap = function() {
|
|
480
|
+
document.documentElement.innerHTML = html.replace("</head>", TRANSITION_TAG);
|
|
481
|
+
document.body.appendChild(highlight);
|
|
482
|
+
document.body.appendChild(badge);
|
|
483
|
+
// Old section is gone; hide the overlay until the next hover repositions it.
|
|
484
|
+
highlight.style.display = "none";
|
|
485
|
+
badge.style.display = "none";
|
|
486
|
+
lastSection = null;
|
|
487
|
+
};
|
|
488
|
+
var headHtml = html.slice(html.indexOf("<head>"), html.indexOf("</head>") + 7);
|
|
489
|
+
var doc = new DOMParser().parseFromString(headHtml, "text/html");
|
|
490
|
+
var sheets = Array.prototype.map.call(
|
|
491
|
+
doc.head.querySelectorAll("link[rel=\\"stylesheet\\"]"),
|
|
492
|
+
function(el) { return el.href ? fetch(el.href).catch(function() {}) : null; }
|
|
493
|
+
);
|
|
494
|
+
return Promise.all(sheets).then(function() {
|
|
495
|
+
return runSwapTransition(swap);
|
|
496
|
+
});
|
|
497
|
+
}).then(function() {
|
|
498
|
+
var t = document.getElementById("deco-disable-transitions");
|
|
499
|
+
if (t) t.remove();
|
|
500
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
501
|
+
window.parent.postMessage({ type: "cms-editor::render-end" }, "*");
|
|
502
|
+
}).catch(function(err) {
|
|
503
|
+
if (ctrl === renderCtrl) renderPending = false;
|
|
504
|
+
if (err && err.name === "AbortError") return;
|
|
505
|
+
window.parent.postMessage({ type: "cms-editor::render-error" }, "*");
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
window.addEventListener("message", function(e) {
|
|
511
|
+
// Only Studio's own postMessage (source === this frame's parent) may drive the bridge — forged senders can't trigger the render fetch/swap.
|
|
512
|
+
if (e.source !== window.parent) return;
|
|
513
|
+
if (e.data && e.data.type === "cms-editor::render" && typeof e.data.src === "string") {
|
|
514
|
+
renderInPlace(e.data.src, e.data.body);
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
if (e.data && e.data.type === "cms-editor::set-labels" && Array.isArray(e.data.labels)) {
|
|
518
|
+
sectionLabels = e.data.labels;
|
|
519
|
+
if (Array.isArray(e.data.kinds)) sectionKinds = e.data.kinds;
|
|
520
|
+
if (Array.isArray(e.data.keys)) sectionCandidates = e.data.keys;
|
|
521
|
+
if (lastSection) {
|
|
522
|
+
lastLabel = labelFor(lastSection);
|
|
523
|
+
lastKind = kindFor(lastSection);
|
|
524
|
+
applyColor(lastKind);
|
|
525
|
+
if (highlight.style.display !== "none") positionHighlight(lastSection);
|
|
526
|
+
}
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
// Parent-driven clear: the cross-origin iframe can't self-detect a frame exit.
|
|
530
|
+
if (e.data && e.data.type === "cms-editor::clear-hover") {
|
|
531
|
+
highlight.style.display = "none";
|
|
532
|
+
badge.style.display = "none";
|
|
533
|
+
lastSection = null;
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (e.data && e.data.type === "cms-editor::deactivate") {
|
|
537
|
+
highlight.remove();
|
|
538
|
+
badge.remove();
|
|
539
|
+
document.removeEventListener("mousemove", moveHandler, true);
|
|
540
|
+
document.removeEventListener("mouseout", outHandler, true);
|
|
541
|
+
document.removeEventListener("click", clickHandler, true);
|
|
542
|
+
// Or the page stays unnavigable after leaving Blocks mode.
|
|
543
|
+
document.removeEventListener("click", navBlocker, true);
|
|
544
|
+
document.removeEventListener("submit", submitBlocker, true);
|
|
545
|
+
window.removeEventListener("scroll", reposition, { capture: true });
|
|
546
|
+
window.removeEventListener("resize", reposition);
|
|
547
|
+
window.__cmsEditorActive = false;
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
})();`;function Mn(t,e,n=!1){let r=t,o=typeof r?.__resolveType=="string"?r.__resolveType:"";for(let d=0;o&&d<5;d++){const i=e[o];if(i&&typeof i=="object"&&"__resolveType"in i){const l=i.__resolveType;if(typeof l=="string"&&l&&l!==o){r=i,o=l;continue}}break}if(!o)return[];if(o.includes("flags/multivariate")||n&&Mi(o,n)){const d=Array.isArray(r.variants)?r.variants:[];if(d.length===0||d.every(c=>{const a=c?.rule;return Fi(a?.__resolveType,n)}))return null;const l=[];for(const c of d){const a=zi(c,n);if(a&&typeof a=="object")for(const p of Mn(a,e,n)??[])l.includes(p)||l.push(p)}return l}if(Ki(o)){const d=r.section&&typeof r.section=="object"?Mn(r.section,e,n):[];return d===null?null:d.length?[o,...d]:[o]}return[o]}function rt(t){return t.replace(/[`*_]/g,"\\$&")}function nl(t,e){const n=[`The user selected an element on the live preview and asked: **"${rt(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&n.push(`**Section resolveType:** \`${rt(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${rt(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${rt(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${rt(t.text)}"`),t.componentName&&n.push(`**Component name:** ${rt(t.componentName)}`);const o=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",o,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
|
|
551
|
+
`)}function sl(t,e,n=320,r=44,o=12){const{x:d,y:i}=t,{width:l,height:c}=e,a=Math.max(o,Math.min(d-n/2,l-n-o)),m=i/c>.68?Math.max(o,i-r-18):Math.min(i+18,c-r-o);return{leftPct:a/l*100,topPct:m/c*100}}function rl(t){const e=de.c(45),{element:n,onDismiss:r}=t,[o,d]=C.useState(""),i=C.useRef(null),{sendMessage:l}=Ua(),{openSidePanel:c}=so(),a=Pe();let p;e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==c||e[4]!==l?(p=()=>{if(!o.trim())return;const M=nl(n,o);c(),l({parts:[{type:"text",text:M}]}),r()},e[0]=n,e[1]=o,e[2]=r,e[3]=c,e[4]=l,e[5]=p):p=e[5];const m=p;let f;e[6]!==n.position||e[7]!==n.viewport?(f=sl(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=f):f=e[8];const v=f,g=`${v.leftPct}%`,E=`${v.topPct}%`;let h;e[9]!==g||e[10]!==E?(h={left:g,top:E,width:"320px"},e[9]=g,e[10]=E,e[11]=h):h=e[11];let w;e[12]!==m?(w=M=>{M.preventDefault(),m()},e[12]=m,e[13]=w):w=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=M=>d(M.target.value),e[14]=S):S=e[14];let y;e[15]!==r?(y=M=>{M.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let b;e[17]!==a?(b=a("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=a,e[18]=b):b=e[18];let j;e[19]!==o||e[20]!==y||e[21]!==b?(j=s.jsx("input",{ref:i,autoFocus:!0,type:"text",value:o,onChange:S,onKeyDown:y,placeholder:b,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=o,e[20]=y,e[21]=b,e[22]=j):j=e[22];let P;e[23]!==o?(P=o.trim(),e[23]=o,e[24]=P):P=e[24];const x=!P;let N;e[25]!==a?(N=a("sandbox.visualEditorPrompt.sendButton"),e[25]=a,e[26]=N):N=e[26];let R;e[27]!==a?(R=a("sandbox.visualEditorPrompt.sendButton"),e[27]=a,e[28]=R):R=e[28];let T;e[29]!==R?(T=s.jsx("title",{children:R}),e[29]=R,e[30]=T):T=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=L):L=e[31];let D;e[32]!==T?(D=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[T,L]}),e[32]=T,e[33]=D):D=e[33];let _;e[34]!==x||e[35]!==N||e[36]!==D?(_=s.jsx("button",{type:"submit",disabled:x,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:N,children:D}),e[34]=x,e[35]=N,e[36]=D,e[37]=_):_=e[37];let A;e[38]!==j||e[39]!==_||e[40]!==w?(A=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl glass px-3 py-1.5",onSubmit:w,children:[j,_]}),e[38]=j,e[39]=_,e[40]=w,e[41]=A):A=e[41];let B;return e[42]!==A||e[43]!==h?(B=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:h,children:A}),e[42]=A,e[43]=h,e[44]=B):B=e[44],B}const Gs="site-links",al=/details?page|\bpdp\b/i,il=/listingpage|\bplp\b/i;function ol(t,e,n){const r=new Set;for(const l of n)al.test(l)&&r.add("product"),il.test(l)&&r.add("category");const o=Tt(Un(t)),d=o[o.length-1],i=o[o.length-2];return d?.type==="text"&&d.text==="/p"&&i?.type==="param"&&i.name===e&&r.add("product"),e==="*"&&o.some(l=>l.type==="param"&&l.name==="*")&&r.add("category"),r}const ll=["rosa","preto","pink","black"];function Gt(t,e){const n=e.trim();return n?t(n):ll.flatMap(r=>t(r))}function cl(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const d=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:d,count:10}}),r}const Fr=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function Vn(t){return t.split("/")[0]??""}function dl(t){const e=new Set;for(const n of t){const r=Vn(n);Fr.has(r)&&e.add(r)}return e}function ul(t,e){const n=Vn(t);return!Fr.has(n)||e.size===0?!0:e.has(n)}const fl=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>Gt(n=>cl(t,n),e),optionsFromPayload:Jt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Gt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:Jt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Gt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:Jt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>Gt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:Jt},{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:bl}];function ml(t,e,n=new Set){const r=[...e],o=l=>{const c=[];for(const a of fl){if(a.kind!==l)continue;const p=r.find(m=>a.test(m)&&ul(m,n));p&&c.push({cand:a,resolveType:p})}return c.find(a=>n.has(Vn(a.resolveType)))??c[0]},d=(l,c,a)=>({kind:l.kind,id:`${l.kind}:${c}`,resolveType:c,clientFilter:l.clientFilter,isFallback:a,buildRequests:p=>l.buildRequests(c,p),optionsFromPayload:l.optionsFromPayload}),i=[];for(const l of["product","category"]){if(!t.has(l))continue;const c=o(l);c&&i.push(d(c.cand,c.resolveType,!1))}return t.size>0&&i.push(pl(t.has("category")?"category":"product")),i}function pl(t){return{kind:t,id:Gs,resolveType:Gs,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Pl(e,n)}}function Ge(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function hl(t,e,n){const r=new Set,o=new Set,d=i=>{if(Array.isArray(i)){for(const a of i)d(a);return}const l=Ge(i);if(!l)return;const c=l.__resolveType;if(typeof c=="string"){if(n(c))r.add(c);else if(c in e&&!o.has(c)){o.add(c);const a=Ge(e[c])?.__resolveType;typeof a=="string"&&n(a)&&r.add(c),d(e[c])}}for(const a of Object.values(l))d(a)};return d(t),r}function zr(t){const e=new Set,n=[];for(const r of t)for(const o of r)e.has(o.value)||(e.add(o.value),n.push(o));return n}function Kr(t){try{return decodeURIComponent(t)}catch{return t}}function gl(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vl(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=gl(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function Ir(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const o=Tt(Un(e)),{pattern:d,order:i}=vl(o),l=i.indexOf(n);if(l===-1)return null;const c=r.match(d);if(!c)return null;const a=c[l+1]?.replace(/^\/+|\/+$/g,"");return a?Kr(a):null}function Jt(t,e){const n=Ge(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],o=[],d=new Set;for(const i of r){const l=Ge(i);if(!l)continue;const c=Ir(l.url,e.template,e.paramName);if(!c||d.has(c))continue;d.add(c);const a=Ge(l.isVariantOf),p=typeof a?.name=="string"&&a.name||typeof l.name=="string"&&l.name||c,m=Array.isArray(l.image)?Ge(l.image[0]):null,f=typeof m?.url=="string"?m.url:void 0;o.push({value:c,label:p,image:f})}return o}function xl(t){if(typeof t!="string"||!t)return null;let e;try{e=new URL(t,"https://placeholder.invalid").pathname}catch{return null}const n=e.replace(/^\/+|\/+$/g,"");return n?Kr(n):null}function bl(t){const e=[],n=new Set,r=(o,d)=>{const i=Ge(o);if(!i)return;const l=typeof i.name=="string"&&i.name?i.name:"",c=l?[...d,l]:d,a=xl(i.url);if(a&&!n.has(a)&&(n.add(a),e.push({value:a,label:c.join(" › ")||a})),Array.isArray(i.children))for(const p of i.children)r(p,c)};if(Array.isArray(t))for(const o of t)r(o,[]);return e}const yl=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 wl(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function kl(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,o=0;for(;(r=n.exec(t))!==null&&o++<5e3;){const d=r[1]??"",i=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:d,text:i})}return e}function Sl(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,o=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let d,i=0;for(;(d=r.exec(t))!==null&&i++<3e3;){const l=(d[1]??"").replace(/\\\//g,"/");if(!l||n.has(l))continue;n.add(l);const c=t.slice(d.index,d.index+900).match(o)?.[1]?.replace(/\\\//g,"/");e.push({url:l,name:d[2]??"",image:c||void 0})}return e}function Pl(t,e){const n=[],r=new Set,o=(d,i,l,c)=>{if(n.length>=200)return;const a=Ir(d,e.template,e.paramName);!a||r.has(a)||e.paramName==="*"&&/(^|\/)p$/.test(a)||l==="category"&&yl.has(a.split("/")[0]??"")||(r.add(a),n.push({value:a,label:i&&i.length<=80?i:wl(a),kind:l,image:c}))};for(const{url:d,name:i,image:l}of Sl(t))o(d,i,"product",l);for(const{href:d,text:i}of kl(t))d.startsWith("/")&&!d.startsWith("//")&&o(d,i,"category");return n}function St(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(d=>d.label.toLowerCase().includes(r)||d.value.toLowerCase().includes(r)):t).slice(0,n)}const Ur=1e4;function jl(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 El(t,{resolveType:e,props:n}){const r=await fetch(pi(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(Ur)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Js(t,e){const n=await fetch(hi(t,e),{signal:AbortSignal.timeout(Ur)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function Nl(t,e,n){const r=e.optionsFromPayload(await Js(t,"/"),n),o=r.find(i=>i.kind==="category");if(!o)return r;const d=He(n.template,{[n.paramName]:o.value});if(d==="/")return r;try{const i=e.optionsFromPayload(await Js(t,d),n).filter(l=>l.kind==="product");return zr([r,i])}catch{return r}}function Tl(t,e,n){return ir.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Cl(t,e,n,r){if(e.homepageLinks)return Nl(t,e,r);const o=e.buildRequests?.(n)??[];if(o.length===0)return[];const d=await Promise.allSettled(o.map(l=>El(t,l))),i=d.filter(l=>l.status==="fulfilled").map(l=>l.value);if(i.length===0){const l=d.find(c=>c.status==="rejected");throw l?l.reason:new Error("Failed to fetch options")}return zr(i.map(l=>e.optionsFromPayload(l,r)))}function Fn(t,e,n,r,o){return{queryKey:Tl(t,e,n),queryFn:()=>Cl(t,e,n,r),enabled:o,staleTime:6e4,retry:1}}function Pt(t){const e=de.c(16),{heading:n,iconKind:r,options:o,template:d,paramName:i,keyPrefix:l,onSelect:c}=t;if(o.length===0)return null;let a;if(e[0]!==r||e[1]!==l||e[2]!==c||e[3]!==o||e[4]!==i||e[5]!==d){let m;e[7]!==r||e[8]!==l||e[9]!==c||e[10]!==i||e[11]!==d?(m=f=>s.jsxs(Nt,{value:`${l}:${f.value}`,className:"gap-3 py-2",onSelect:()=>c(f.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?s.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(pr,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:f.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:He(d,{[i]:f.value})})]})]},`${l}:${f.value}`),e[7]=r,e[8]=l,e[9]=c,e[10]=i,e[11]=d,e[12]=m):m=e[12],a=o.map(m),e[0]=r,e[1]=l,e[2]=c,e[3]=o,e[4]=i,e[5]=d,e[6]=a}else a=e[6];let p;return e[13]!==n||e[14]!==a?(p=s.jsx(Et,{heading:n,children:a}),e[13]=n,e[14]=a,e[15]=p):p=e[15],p}function Ys(t){const e=de.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Rl(t){const e=de.c(52),{sources:n,template:r,paramName:o,value:d,sandboxRef:i,onCommit:l}=t,c=Pe(),[a,p]=C.useState(!1),[m,f]=C.useState(""),[v,g]=C.useState(""),E=C.useRef(null),h=o==="*"?c("sandbox.preview.catchAllParamLabel"):`:${o}`,w=jl(c),y=[...new Set(n.map(se=>w[se.kind].noun))].join(" or ");let b;e[0]!==c||e[1]!==y?(b=c("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=c,e[1]=y,e[2]=b):b=e[2];const j=b,P={template:r,paramName:o};let x;e[3]!==m?(x=(se,ie)=>({source:se,query:ie,options:se.clientFilter?St(ie.data??[],m):ie.data??[]}),e[3]=m,e[4]=x):x=e[4];const N=x,R=n.filter(Ml),T=n.filter($l),L=Bn({queries:R.map(se=>Fn(i,se,v,P,a))});let D;e[5]!==L||e[6]!==N?(D=(se,ie)=>N(se,L[ie]),e[5]=L,e[6]=N,e[7]=D):D=e[7];const _=R.map(D),A=_.length===0||_.every(Bl),B=Bn({queries:T.map(se=>Fn(i,se,v,P,a&&A))});let M;e[8]!==B||e[9]!==N?(M=(se,ie)=>N(se,B[ie]),e[8]=B,e[9]=N,e[10]=M):M=e[10];const J=T.map(M),z=A?J:_,q=z.length===1&&z[0]?.source.homepageLinks?z[0]:null,H=q&&!q.query.isLoading&&!q.query.isError?q?.query.data??[]:[],W=St(H.filter(Dl),m),O=St(H.filter(Ol),m),U=W.length>0&&O.length>0,$=se=>{p(se),E.current&&clearTimeout(E.current),f(se?d:""),g(se?d:"")};let G;e[11]===Symbol.for("react.memo_cache_sentinel")?(G=se=>{f(se),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{g(se)},300)},e[11]=G):G=e[11];const F=G,Q=se=>{l(se),$(!1)},X=Lr(m),V=He(r,{[o]:X}),re=ar,te=rr,ee="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ce=_l;let fe;e[12]!==h||e[13]!==c?(fe=c("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:h}),e[12]=h,e[13]=c,e[14]=fe):fe=e[14];let oe;e[15]!==fe?(oe=s.jsx(or,{className:"sr-only",children:s.jsx(lr,{children:fe})}),e[15]=fe,e[16]=oe):oe=e[16];let me;e[17]===Symbol.for("react.memo_cache_sentinel")?(me=s.jsx(pr,{size:16,className:"shrink-0 text-foreground"}),e[17]=me):me=e[17];let ue;e[18]!==c?(ue=c("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=c,e[19]=ue):ue=e[19];let ge;e[20]!==h?(ge=s.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]=ge):ge=e[21];let he;e[22]!==ue||e[23]!==ge?(he=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[me,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[ue," ",ge]})]}),e[22]=ue,e[23]=ge,e[24]=he):he=e[24];const ne=kr,be=!1,$e="min-h-0 flex-1";let ve;e[25]!==j||e[26]!==m?(ve=s.jsx(Sr,{autoFocus:!0,placeholder:j,value:m,onValueChange:F}),e[25]=j,e[26]=m,e[27]=ve):ve=e[27];const Oe=wr,Me="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let Fe;e[28]!==c?(Fe=c("sandbox.pathParamPickerChip.noResults"),e[28]=c,e[29]=Fe):Fe=e[29];let De;e[30]!==Fe?(De=s.jsx(Pr,{children:Fe}),e[30]=Fe,e[31]=De):De=e[31];const ut=X&&s.jsx(Et,{className:"shrink-0",children:s.jsxs(Nt,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>Q(X),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(ao,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:c("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:h})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:V})]})]})}),Je=U?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(Pt,{heading:w.category.heading,iconKind:"category",options:W,template:r,paramName:o,keyPrefix:`${q?.source.id}:cat`,onSelect:Q})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(Pt,{heading:w.product.heading,iconKind:"product",options:O,template:r,paramName:o,keyPrefix:`${q?.source.id}:prod`,onSelect:Q})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:z.map(se=>{const{source:ie,query:ke,options:Ke}=se,{noun:ft}=w[ie.kind];if(ke.isLoading)return s.jsx(Ys,{text:c("sandbox.pathParamPickerChip.loading",{noun:ft})},ie.id);if(ke.isError)return s.jsx(Ys,{text:c("sandbox.pathParamPickerChip.couldNotLoad")},ie.id);if(ie.homepageLinks){const Ye=ke.data??[];return s.jsxs(C.Fragment,{children:[s.jsx(Pt,{heading:w.category.heading,iconKind:"category",options:St(Ye.filter(Al),m),template:r,paramName:o,keyPrefix:`${ie.id}:cat`,onSelect:Q}),s.jsx(Pt,{heading:w.product.heading,iconKind:"product",options:St(Ye.filter(Ll),m),template:r,paramName:o,keyPrefix:`${ie.id}:prod`,onSelect:Q})]},ie.id)}return s.jsx(Pt,{heading:z.length>1?w[ie.kind].heading:void 0,iconKind:ie.kind,options:Ke,template:r,paramName:o,keyPrefix:ie.id,onSelect:Q},ie.id)})});let pe;e[32]!==Oe||e[33]!==De||e[34]!==ut||e[35]!==Je?(pe=s.jsxs(Oe,{className:Me,children:[De,ut,Je]}),e[32]=Oe,e[33]=De,e[34]=ut,e[35]=Je,e[36]=pe):pe=e[36];let Te;e[37]!==ne||e[38]!==ve||e[39]!==pe?(Te=s.jsxs(ne,{shouldFilter:be,className:$e,children:[ve,pe]}),e[37]=ne,e[38]=ve,e[39]=pe,e[40]=Te):Te=e[40];let Le;e[41]!==te||e[42]!==oe||e[43]!==he||e[44]!==Te||e[45]!==ce?(Le=s.jsxs(te,{className:ee,onClick:ce,children:[oe,he,Te]}),e[41]=te,e[42]=oe,e[43]=he,e[44]=Te,e[45]=ce,e[46]=Le):Le=e[46];let ze;return e[47]!==re||e[48]!==$||e[49]!==a||e[50]!==Le?(ze=s.jsx(re,{open:a,onOpenChange:$,children:Le}),e[47]=re,e[48]=$,e[49]=a,e[50]=Le,e[51]=ze):ze=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:c("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:se=>{se.stopPropagation(),$(!0)},children:d||h}),ze]})}function Ll(t){return t.kind==="product"}function Al(t){return t.kind!=="product"}function _l(t){return t.stopPropagation()}function Ol(t){return t.kind==="product"}function Dl(t){return t.kind!=="product"}function Bl(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function $l(t){return t.isFallback}function Ml(t){return!t.isFallback}function Fl(t){const e=de.c(8),{sources:n,template:r,paramName:o,sandboxRef:d,onFill:i}=t;let l,c;if(e[0]!==o||e[1]!==d||e[2]!==n||e[3]!==r){const v={template:r,paramName:o},g=n.filter(zl);c=Bn,l=g.map(E=>Fn(d,E,"",v,!0)),e[0]=o,e[1]=d,e[2]=n,e[3]=r,e[4]=l,e[5]=c}else l=e[4],c=e[5];let a;e[6]!==l?(a={queries:l},e[6]=l,e[7]=a):a=e[7];const p=c(a),[m,f]=C.useState(!1);if(!m)for(const v of p){if(v.isLoading)break;const g=v.data?.[0];if(g){f(!0),queueMicrotask(()=>i(g.value));break}}return null}function zl(t){return!t.isFallback}function Kl(t){const e=de.c(31),{name:n,value:r,onCommit:o}=t,d=Pe(),[i,l]=C.useState(r),[c,a]=C.useState(!1),p=C.useRef(!1);let m;e[0]!==n||e[1]!==d?(m=n==="*"?d("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=d,e[2]=m):m=e[2];const f=m,v=i||f;let g;e[3]!==v?(g=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-xs",children:v}),e[3]=v,e[4]=g):g=e[4];let E;e[5]!==f||e[6]!==d?(E=d("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=d,e[7]=E):E=e[7];let h,w;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=N=>l(N.target.value),w=()=>a(!0),e[8]=h,e[9]=w):(h=e[8],w=e[9]);let S;e[10]!==r?(S=N=>{N.key==="Enter"&&N.currentTarget.blur(),N.key==="Escape"&&(p.current=!0,l(r),N.currentTarget.blur())},e[10]=r,e[11]=S):S=e[11];let y;e[12]!==i||e[13]!==o||e[14]!==r?(y=()=>{if(a(!1),p.current){p.current=!1;return}const N=Lr(i);l(N),N!==r&&o(N)},e[12]=i,e[13]=o,e[14]=r,e[15]=y):y=e[15];let b;e[16]!==i||e[17]!==f||e[18]!==E||e[19]!==S||e[20]!==y?(b=s.jsx("input",{type:"text",value:i,placeholder:f,title:E,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:Il,onChange:h,onFocus:w,onKeyDown:S,onBlur:y}),e[16]=i,e[17]=f,e[18]=E,e[19]=S,e[20]=y,e[21]=b):b=e[21];let j;e[22]!==g||e[23]!==b?(j=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[g,b]}),e[22]=g,e[23]=b,e[24]=j):j=e[24];let P;e[25]!==c||e[26]!==d?(P=c&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-2xs text-muted-foreground",children:[s.jsx(Ya,{size:10}),d("sandbox.preview.enterToGo")]}),e[25]=c,e[26]=d,e[27]=P):P=e[27];let x;return e[28]!==P||e[29]!==j?(x=s.jsxs(s.Fragment,{children:[j,P]}),e[28]=P,e[29]=j,e[30]=x):x=e[30],x}function Il(t){return t.stopPropagation()}function Ul(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),r=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${r}`}catch{return e}}function Hl(t){return t.previewSurfaceActive&&(t.daemonReady||t.production||!!t.servePreviewUrl)}function Vl(t){return t.showPreviewToolbar&&t.contentEditingEnabled}class Hr extends Error{constructor(){super("The site's schema isn't loaded yet"),this.name="PageSchemaNotReadyError"}}async function ql(t,e){if(t)return t;const n=await e?.().catch(()=>null);if(!n)throw new Hr;return n}async function Wl(t,e,n){return n?Ns(t,e,await ql(n.meta,n.loadMeta)):Ns(t,e)}function Gl(t){const e=de.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=dr(n);let o;return e[2]!==t||e[3]!==r?(o={mutationFn:async d=>{const{name:i,path:l,template:c,schema:a}=d;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const p=Aa(i),m=c?{...c,name:i,path:l}:await Wl(i,l,a);return await r.mutateAsync({blockKey:p,data:m}),{key:p,name:i,path:l}}},e[2]=t,e[3]=r,e[4]=o):o=e[4],Sa(o)}function Jl(t){const e=de.c(89),{open:n,onOpenChange:r,isPending:o,error:d,templates:i,onSubmit:l}=t,c=o===void 0?!1:o,a=Pe();let p;e[0]!==a?(p=a("sectionsEditor.createPageModal.defaultPageName"),e[0]=a,e[1]=p):p=e[1];const[m,f]=C.useState(p);let v;e[2]!==a?(v=a("sectionsEditor.createPageModal.defaultPagePath"),e[2]=a,e[3]=v):v=e[3];const[g,E]=C.useState(v),[h,w]=C.useState(Pn),[S,y]=C.useState(null),[b,j]=C.useState(n);n!==b&&(j(n),n&&(f(a("sectionsEditor.createPageModal.defaultPageName")),E(a("sectionsEditor.createPageModal.defaultPagePath")),w(Pn),y(null)));const P=!!i?.length;let x;e[4]!==c||e[5]!==r?(x=ue=>{!ue&&!c&&(y(null),r(!1))},e[4]=c,e[5]=r,e[6]=x):x=e[6];const N=x;let R;e[7]!==c||e[8]!==m||e[9]!==l||e[10]!==g||e[11]!==P||e[12]!==h?(R=async ue=>{ue.preventDefault();const ge=m.trim(),he=g.trim();if(!ge||!he||c)return;const ne=Ar(he);if(ne){y(ne);return}y(null),await l({name:ge,path:he,templateKey:P&&h!==Pn?h:null})},e[7]=c,e[8]=m,e[9]=l,e[10]=g,e[11]=P,e[12]=h,e[13]=R):R=e[13];const T=R,L=S??d;let D;e[14]!==a?(D=a("sectionsEditor.createPageModal.title"),e[14]=a,e[15]=D):D=e[15];let _;e[16]!==D?(_=s.jsx(or,{children:s.jsx(lr,{children:D})}),e[16]=D,e[17]=_):_=e[17];let A;e[18]!==a?(A=a("sectionsEditor.createPageModal.nameLabel"),e[18]=a,e[19]=A):A=e[19];let B;e[20]!==A?(B=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:A}),e[20]=A,e[21]=B):B=e[21];let M;e[22]===Symbol.for("react.memo_cache_sentinel")?(M=ue=>f(ue.target.value),e[22]=M):M=e[22];let J;e[23]!==a?(J=a("sectionsEditor.createPageModal.namePlaceholder"),e[23]=a,e[24]=J):J=e[24];let z;e[25]!==c||e[26]!==m||e[27]!==J?(z=s.jsx(An,{id:"new-page-name",value:m,onChange:M,placeholder:J,autoFocus:!0,disabled:c}),e[25]=c,e[26]=m,e[27]=J,e[28]=z):z=e[28];let q;e[29]!==z||e[30]!==B?(q=s.jsxs("div",{className:"space-y-1.5",children:[B,z]}),e[29]=z,e[30]=B,e[31]=q):q=e[31];let I;e[32]!==a?(I=a("sectionsEditor.createPageModal.pathLabel"),e[32]=a,e[33]=I):I=e[33];let H;e[34]!==I?(H=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:I}),e[34]=I,e[35]=H):H=e[35];let W;e[36]===Symbol.for("react.memo_cache_sentinel")?(W=ue=>E(ue.target.value),e[36]=W):W=e[36];let O;e[37]!==a?(O=a("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=a,e[38]=O):O=e[38];let U;e[39]!==c||e[40]!==g||e[41]!==O?(U=s.jsx(An,{id:"new-page-path",value:g,onChange:W,placeholder:O,disabled:c}),e[39]=c,e[40]=g,e[41]=O,e[42]=U):U=e[42];let $;e[43]!==H||e[44]!==U?($=s.jsxs("div",{className:"space-y-1.5",children:[H,U]}),e[43]=H,e[44]=U,e[45]=$):$=e[45];let G;e[46]!==c||e[47]!==P||e[48]!==a||e[49]!==h||e[50]!==i?(G=P&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:a("sectionsEditor.createPageModal.templateLabel")}),s.jsx(_a,{id:"new-page-template",value:h,onChange:w,templates:i??[],disabled:c})]}),e[46]=c,e[47]=P,e[48]=a,e[49]=h,e[50]=i,e[51]=G):G=e[51];let F;e[52]!==L?(F=L&&s.jsx("p",{className:"text-xs text-destructive",children:L}),e[52]=L,e[53]=F):F=e[53];let Q;e[54]!==q||e[55]!==$||e[56]!==G||e[57]!==F?(Q=s.jsxs("div",{className:"space-y-4 py-4",children:[q,$,G,F]}),e[54]=q,e[55]=$,e[56]=G,e[57]=F,e[58]=Q):Q=e[58];let X;e[59]!==r?(X=()=>r(!1),e[59]=r,e[60]=X):X=e[60];let V;e[61]!==a?(V=a("sectionsEditor.createPageModal.cancelButton"),e[61]=a,e[62]=V):V=e[62];let re;e[63]!==c||e[64]!==X||e[65]!==V?(re=s.jsx(Ve,{type:"button",variant:"outline",onClick:X,disabled:c,children:V}),e[63]=c,e[64]=X,e[65]=V,e[66]=re):re=e[66];let te;e[67]!==c||e[68]!==m||e[69]!==g?(te=!m.trim()||!g.trim()||c,e[67]=c,e[68]=m,e[69]=g,e[70]=te):te=e[70];let ee;e[71]!==c||e[72]!==a?(ee=c?s.jsxs(s.Fragment,{children:[s.jsx(Ct,{className:"size-3.5"}),a("sectionsEditor.createPageModal.creatingButton")]}):a("sectionsEditor.createPageModal.createButton"),e[71]=c,e[72]=a,e[73]=ee):ee=e[73];let ce;e[74]!==te||e[75]!==ee?(ce=s.jsx(Ve,{type:"submit",disabled:te,children:ee}),e[74]=te,e[75]=ee,e[76]=ce):ce=e[76];let fe;e[77]!==re||e[78]!==ce?(fe=s.jsxs(Pa,{children:[re,ce]}),e[77]=re,e[78]=ce,e[79]=fe):fe=e[79];let oe;e[80]!==T||e[81]!==Q||e[82]!==fe||e[83]!==_?(oe=s.jsx(rr,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:T,children:[_,Q,fe]})}),e[80]=T,e[81]=Q,e[82]=fe,e[83]=_,e[84]=oe):oe=e[84];let me;return e[85]!==N||e[86]!==n||e[87]!==oe?(me=s.jsx(ar,{open:n,onOpenChange:N,children:oe}),e[85]=N,e[86]=n,e[87]=oe,e[88]=me):me=e[88],me}function Yl(t){const e=de.c(29),{orgSlug:n,virtualMcpId:r,branch:o,previewUrl:d,meta:i,decofile:l,blockKey:c}=t,a=Pe();let p;e[0]!==o||e[1]!==n||e[2]!==r?(p={orgSlug:n,virtualMcpId:r,branch:o},e[0]=o,e[1]=n,e[2]=r,e[3]=p):p=e[3];const m=dr(p);let f;e[4]!==m?(f=Ba((j,P)=>m.mutate({blockKey:j,data:P})),e[4]=m,e[5]=f):f=e[5];const v=f;let g;e[6]!==c||e[7]!==l?(g=Oa(l,c),e[6]=c,e[7]=l,e[8]=g):g=e[8];const{resolveType:E,props:h,title:w}=g;if(!E){let j;e[9]!==a?(j=a("sandbox.preview.loaderNoLongerExists"),e[9]=a,e[10]=j):j=e[10];let P;return e[11]!==j?(P=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:j}),e[11]=j,e[12]=P):P=e[12],P}const S=`loader:${c}`;let y;e[13]!==c||e[14]!==E||e[15]!==w?(y={mode:"saved",blockKey:c,resolveType:E,title:w},e[13]=c,e[14]=E,e[15]=w,e[16]=y):y=e[16];let b;return e[17]!==o||e[18]!==l||e[19]!==i||e[20]!==n||e[21]!==d||e[22]!==h||e[23]!==m.isPending||e[24]!==v||e[25]!==S||e[26]!==y||e[27]!==r?(b=s.jsx(Da,{orgSlug:n,virtualMcpId:r,branch:o,previewUrl:d,meta:i,decofile:l,kind:"loaders",target:y,initialValue:h,isCreating:m.isPending,onCreate:Ql,onSaveReferencedBlock:v,showRun:!1},S),e[17]=o,e[18]=l,e[19]=i,e[20]=n,e[21]=d,e[22]=h,e[23]=m.isPending,e[24]=v,e[25]=S,e[26]=y,e[27]=r,e[28]=b):b=e[28],b}async function Ql(){}function Xl(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Qs(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:Xl(t.error)}}function Zl(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 ec(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=Zl(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(o=>o.status==="error"&&!o.hasData&&o.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const tc=C.lazy(()=>ja(()=>import("./sections-editor-BSfFPyUU.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])).then(t=>({default:t.SectionsEditor})));function Xs(t){const e=de.c(60),{virtualMcpId:n,externalSelection:r,onViewJsonFile:o}=t,d=r===void 0?null:r,{org:i}=Kn(),{currentBranch:l,taskId:c}=Rt(),a=Hn(),p=tn(),m=Or(),f=a.lifecycle.phase==="running",v=p.previewUrl;let g;e[0]!==l||e[1]!==i||e[2]!==v||e[3]!==c||e[4]!==n?(g=l?{orgSlug:i.slug,virtualMcpId:n,branch:l,threadId:c??null,previewUrl:v}:null,e[0]=l,e[1]=i,e[2]=v,e[3]=c,e[4]=n,e[5]=g):g=e[5];const E=g,h=nn(n,l);let w;e[6]!==f?(w={fetchEnabled:f},e[6]=f,e[7]=w):w=e[7];const S=In(E,w);let y;e[8]!==f?(y={fetchEnabled:f},e[8]=f,e[9]=y):y=e[9];const b=Rr(E,y),j=ec({lifecyclePhase:a.lifecycle.phase,decofile:Qs(S),meta:Qs(b),hasEditableContent:Ii(S.data,b.data),fastPreviewActive:jr(n).runtime==="cms"||at(h)}),P=ur()===void 0,x=nc;if(Ri(h)){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=x(s.jsx(Ai,{})),e[10]=O):O=e[10],O}if(h.kind==="pending"&&h.retrying){let O;return e[11]!==h?(O=x(s.jsx(_i,{backend:h})),e[11]=h,e[12]=O):O=e[12],O}if(j.kind==="loading"||P){let O;return e[13]===Symbol.for("react.memo_cache_sentinel")?(O=x(s.jsx(Ea,{})),e[13]=O):O=e[13],O}if(S.data&&gi(b.data)){const O=m.state.target,U=O?.kind==="page"||O?.kind==="section"?O.key:null,$=U??"",G=l??"";let F;return e[14]!==S.data||e[15]!==U||e[16]!==i.slug||e[17]!==$||e[18]!==G||e[19]!==n?(F=x(s.jsx($a,{orgSlug:i.slug,virtualMcpId:n,branch:G,decofile:S.data,initialKey:U,compact:!0},$)),e[14]=S.data,e[15]=U,e[16]=i.slug,e[17]=$,e[18]=G,e[19]=n,e[20]=F):F=e[20],F}if(j.kind==="empty"){let O;return e[21]===Symbol.for("react.memo_cache_sentinel")?(O=x(s.jsx(Oi,{})),e[21]=O):O=e[21],O}if(j.kind==="error"){let O;e[22]!==S||e[23]!==p||e[24]!==b||e[25]!==j.source?(O=()=>{if(j.source==="sandbox"){p.retry();return}Promise.all([S.refetch(),b.refetch()])},e[22]=S,e[23]=p,e[24]=b,e[25]=j.source,e[26]=O):O=e[26];const U=O;let $;return e[27]!==U||e[28]!==j.source?($=x(s.jsx(Li,{source:j.source,onRetry:U})),e[27]=U,e[28]=j.source,e[29]=$):$=e[29],$}let N;e[30]===Symbol.for("react.memo_cache_sentinel")?(N=O=>x(s.jsx("div",{className:"h-full min-h-0",children:O})),e[30]=N):N=e[30];const R=N,T=m.state.target;if(T?.kind==="loader"&&S.data&&b.data){const O=l??"",U=v??null;let $;return e[31]!==S.data||e[32]!==b.data||e[33]!==i.slug||e[34]!==O||e[35]!==U||e[36]!==T.key||e[37]!==n?($=R(s.jsx(Yl,{orgSlug:i.slug,virtualMcpId:n,branch:O,previewUrl:U,meta:b.data,decofile:S.data,blockKey:T.key})),e[31]=S.data,e[32]=b.data,e[33]=i.slug,e[34]=O,e[35]=U,e[36]=T.key,e[37]=n,e[38]=$):$=e[38],$}let L;e[39]!==l||e[40]!==i.slug||e[41]!==T||e[42]!==n?(L=T||!l?null:fr(mr(i.slug,n,l)),e[39]=l,e[40]=i.slug,e[41]=T,e[42]=n,e[43]=L):L=e[43];const D=L;let _="/",A=null,B=null;T?.kind==="page"?(_=T.path,A=T.key):T?.kind==="section"?B=T.key:D&&(_=D.path,A=D.pageKey);const M=A?`page:${A}`:B?`section:${B}`:`path:${_}`;let J;e[44]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(Ct,{className:"size-5 text-muted-foreground"})}),e[44]=J):J=e[44];const z=l??"",q=v??void 0,I=B?null:d,H=!!A&&m.state.editSeoPageKey===A;let W;return e[45]!==B||e[46]!==A||e[47]!==_||e[48]!==M||e[49]!==o||e[50]!==i.slug||e[51]!==I||e[52]!==H||e[53]!==z||e[54]!==q||e[55]!==n||e[56]!==m.consumeEditSeo||e[57]!==m.setFocusedBlock||e[58]!==m.setVariantOverride?(W=R(s.jsx(C.Suspense,{fallback:J,children:s.jsx(tc,{orgSlug:i.slug,virtualMcpId:n,branch:z,previewReady:!0,previewUrl:q,currentPath:_,activePageBlockKey:A,activeGlobalBlockKey:B,externalSelection:I,initialEditSeo:H,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:o},M)})),e[45]=B,e[46]=A,e[47]=_,e[48]=M,e[49]=o,e[50]=i.slug,e[51]=I,e[52]=H,e[53]=z,e[54]=q,e[55]=n,e[56]=m.consumeEditSeo,e[57]=m.setFocusedBlock,e[58]=m.setVariantOverride,e[59]=W):W=e[59],W}function nc(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Zs(t){const e=de.c(39),{virtualMcpId:n,pageKey:r,onClose:o,ref:d}=t,i=Pe(),l=ur(),c=l===!0,a=vi(n);let p;e[0]!==a||e[1]!==r?(p=xi(a,oo(r)),e[0]=a,e[1]=r,e[2]=p):p=e[2];const m=p,{org:f}=Kn(),{currentBranch:v,taskId:g}=Rt(),h=tn().previewUrl;let w;e[3]!==v||e[4]!==f.slug||e[5]!==h||e[6]!==g||e[7]!==n?(w=v?{orgSlug:f.slug,virtualMcpId:n,branch:v,threadId:g??null,previewUrl:h}:null,e[3]=v,e[4]=f.slug,e[5]=h,e[6]=g,e[7]=n,e[8]=w):w=e[8];const y=In(w),b=v??"";let j;e[9]!==f.slug||e[10]!==b||e[11]!==n?(j={orgSlug:f.slug,virtualMcpId:n,branch:b},e[9]=f.slug,e[10]=b,e[11]=n,e[12]=j):j=e[12];const{save:P,flush:x}=Ma(j),N=y.data?.[r],R=y.data===void 0&&y.isLoading||l===void 0,T=y.data!==void 0&&N===void 0,L=!v||T||R;let D;e[13]!==N?(D=N===void 0?"":JSON.stringify(N,null,2),e[13]=N,e[14]=D):D=e[14];const _=D;let A;e[15]!==r||e[16]!==L||e[17]!==P?(A=I=>{if(L)return;let H;try{H=JSON.parse(I)}catch{return}H===null||typeof H!="object"||Array.isArray(H)||P(r,H)},e[15]=r,e[16]=L,e[17]=P,e[18]=A):A=e[18];const B=A;let M;e[19]!==x?(M=()=>({flush:x}),e[19]=x,e[20]=M):M=e[20],C.useImperativeHandle(d,M);let J;e[21]!==m||e[22]!==c||e[23]!==o||e[24]!==i?(J=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:m,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:m})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:i("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(Ve,{variant:"ghost",size:"icon-sm",onClick:o,"aria-label":i("sectionsEditor.pageJsonDialog.close"),className:"shrink-0",children:s.jsx(Na,{size:14})})]}),e[21]=m,e[22]=c,e[23]=o,e[24]=i,e[25]=J):J=e[25];let z;e[26]!==y.data||e[27]!==x||e[28]!==_||e[29]!==R||e[30]!==T||e[31]!==r||e[32]!==L||e[33]!==B||e[34]!==i?(z=R?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(Ct,{className:"size-5 text-muted-foreground"})}):T?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",i("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(io,{code:_,language:"json",readOnly:L,height:"100%",onChange:I=>B(I??""),onSave:I=>{B(I),x()}},`${r}:${y.data===void 0?"loading":"ready"}`)}),e[26]=y.data,e[27]=x,e[28]=_,e[29]=R,e[30]=T,e[31]=r,e[32]=L,e[33]=B,e[34]=i,e[35]=z):z=e[35];let q;return e[36]!==J||e[37]!==z?(q=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[J,z]}),e[36]=J,e[37]=z,e[38]=q):q=e[38],q}function Vr(t){return t.contentEditingEnabled&&!t.isMobile}function sc(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function rc(t,e){return t==="blocks"?"preview":e?"blocks":t}function ac(t){return Vr({contentEditingEnabled:_r(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function ic(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}function oc(t){const e=eo(t),{display:n}=t;let r=null;if(n.mode==="production"&&n.iframeBase)try{r=new URL(t.path,n.iframeBase).href}catch{r=null}const o=to(r,e);return{value:e,frame:o?$n(o,t.device):null,newTab:o}}function lc(t){const e=de.c(90),{tests:n,options:r,onChange:o,available:d}=t,i=Pe();let l;e[0]!==r?(l=Dr(r),e[0]=r,e[1]=l):l=e[1];const c=l;let a;e[2]!==r.tests?(a=r.tests??{},e[2]=r.tests,e[3]=a):a=e[3];const p=a;let m;e[4]!==o||e[5]!==r?(m=V=>{const re=V?Bi(V):null,{at:te,...ee}=r;o(re?{...ee,at:re}:ee)},e[4]=o,e[5]=r,e[6]=m):m=e[6];const f=m;let v;e[7]!==p||e[8]!==o||e[9]!==r?(v=(V,re)=>{const te={...p};re==="on"?te[V]=!0:re==="off"?te[V]=!1:delete te[V];const{tests:ee,...ce}=r;o(Object.keys(te).length>0?{...ce,tests:te}:ce)},e[7]=p,e[8]=o,e[9]=r,e[10]=v):v=e[10];const g=v;let E;e[11]!==i?(E=i("sandbox.previewAs.label"),e[11]=i,e[12]=E):E=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Qa,{size:16}),e[13]=h):h=e[13];let w;e[14]!==c||e[15]!==E?(w=s.jsx(lt,{asChild:!0,children:s.jsx(xr,{asChild:!0,children:s.jsx(We,{"aria-label":E,active:c,"data-testid":"preview-as-trigger",children:h})})}),e[14]=c,e[15]=E,e[16]=w):w=e[16];let S;e[17]!==i?(S=i("sandbox.previewAs.label"),e[17]=i,e[18]=S):S=e[18];let y;e[19]!==S?(y=s.jsx(ct,{children:S}),e[19]=S,e[20]=y):y=e[20];let b;e[21]!==w||e[22]!==y?(b=s.jsxs(dt,{children:[w,y]}),e[21]=w,e[22]=y,e[23]=b):b=e[23];let j;e[24]!==i?(j=i("sandbox.previewAs.label"),e[24]=i,e[25]=j):j=e[25];let P;e[26]!==j?(P=s.jsx("h3",{className:"text-sm font-medium",children:j}),e[26]=j,e[27]=P):P=e[27];let x;e[28]!==d||e[29]!==i?(x=i(d?"sandbox.previewAs.intro":"sandbox.previewAs.unavailable"),e[28]=d,e[29]=i,e[30]=x):x=e[30];let N;e[31]!==x?(N=s.jsx("p",{className:"text-xs text-muted-foreground",children:x}),e[31]=x,e[32]=N):N=e[32];let R;e[33]!==P||e[34]!==N?(R=s.jsxs("div",{className:"flex flex-col gap-1",children:[P,N]}),e[33]=P,e[34]=N,e[35]=R):R=e[35];let T;e[36]!==i?(T=i("sandbox.previewAs.momentLabel"),e[36]=i,e[37]=T):T=e[37];let L;e[38]!==T?(L=s.jsx(co,{htmlFor:"preview-as-moment",children:T}),e[38]=T,e[39]=L):L=e[39];let D;e[40]!==r.at?(D=Di(r.at),e[40]=r.at,e[41]=D):D=e[41];let _;e[42]!==f?(_=V=>f(V.target.value),e[42]=f,e[43]=_):_=e[43];let A;e[44]!==D||e[45]!==_?(A=s.jsx(An,{id:"preview-as-moment",type:"datetime-local",className:$i,value:D,onChange:_}),e[44]=D,e[45]=_,e[46]=A):A=e[46];const B=r.at===void 0;let M;e[47]!==f?(M=()=>f(""),e[47]=f,e[48]=M):M=e[48];let J;e[49]!==i?(J=i("sandbox.previewAs.now"),e[49]=i,e[50]=J):J=e[50];let z;e[51]!==B||e[52]!==M||e[53]!==J?(z=s.jsx(Ve,{type:"button",variant:"ghost",size:"sm",disabled:B,onClick:M,children:J}),e[51]=B,e[52]=M,e[53]=J,e[54]=z):z=e[54];let q;e[55]!==A||e[56]!==z?(q=s.jsxs("div",{className:"flex items-center gap-2",children:[A,z]}),e[55]=A,e[56]=z,e[57]=q):q=e[57];let I;e[58]!==i?(I=i("sandbox.previewAs.momentHint"),e[58]=i,e[59]=I):I=e[59];let H;e[60]!==I?(H=s.jsx("p",{className:"text-xs text-muted-foreground",children:I}),e[60]=I,e[61]=H):H=e[61];let W;e[62]!==L||e[63]!==q||e[64]!==H?(W=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[L,q,H]}),e[62]=L,e[63]=q,e[64]=H,e[65]=W):W=e[65];let O;e[66]!==i?(O=i("sandbox.previewAs.testsLabel"),e[66]=i,e[67]=O):O=e[67];let U;e[68]!==O?(U=s.jsx("span",{className:"text-sm font-medium",children:O}),e[68]=O,e[69]=U):U=e[69];let $;e[70]!==p||e[71]!==g||e[72]!==i||e[73]!==n?($=n.length===0?s.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.previewAs.noTests")}):s.jsxs(s.Fragment,{children:[s.jsx("ul",{className:"flex flex-col gap-1.5",children:n.map(V=>s.jsxs("li",{className:"flex items-center justify-between gap-2","data-testid":"preview-as-test",children:[s.jsx("span",{className:"min-w-0 truncate text-sm",children:V}),s.jsxs(uo,{type:"single",variant:"outline",size:"sm",value:p[V]===void 0?"":p[V]?"on":"off",onValueChange:re=>g(V,re),"aria-label":V,children:[s.jsx(Fs,{value:"off",children:i("sandbox.previewAs.off")}),s.jsx(Fs,{value:"on",children:i("sandbox.previewAs.on")})]})]},V))}),s.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.previewAs.testsHint")})]}),e[70]=p,e[71]=g,e[72]=i,e[73]=n,e[74]=$):$=e[74];let G;e[75]!==U||e[76]!==$?(G=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[U,$]}),e[75]=U,e[76]=$,e[77]=G):G=e[77];let F;e[78]!==c||e[79]!==o||e[80]!==i?(F=c&&s.jsx(Ve,{type:"button",variant:"outline",size:"sm",onClick:()=>o({}),children:i("sandbox.previewAs.reset")}),e[78]=c,e[79]=o,e[80]=i,e[81]=F):F=e[81];let Q;e[82]!==R||e[83]!==W||e[84]!==G||e[85]!==F?(Q=s.jsxs(br,{className:"flex w-80 flex-col gap-4 p-4",align:"center",sideOffset:8,"data-testid":"preview-as",children:[R,W,G,F]}),e[82]=R,e[83]=W,e[84]=G,e[85]=F,e[86]=Q):Q=e[86];let X;return e[87]!==b||e[88]!==Q?(X=s.jsxs(yr,{children:[b,Q]}),e[87]=b,e[88]=Q,e[89]=X):X=e[89],X}const cc=15e3;function dc(t,e,n){return n?t.src===e||t.loading?t:{src:e,loading:!0}:t.src===e&&!t.loading?t:{src:e,loading:!1}}function er(t){return t.loading?{...t,loading:!1}:t}const uc=500,fc={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},tr=1,Yt=["desktop","mobile","tablet"],mc=["preview","visual","blocks"],nr={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function pc(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 jt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Ln(t,e){try{return new URL(t,e).href}catch{return null}}function hc(t,e){if(!e.inPlaceRenderActive)return{pin:e.draftPreviewUrl?{path:e.resolvedPath,url:e.draftPreviewUrl}:null,effective:e.draftPreviewUrl};if(e.draftPreviewUrl!==null&&t?.path!==e.resolvedPath){const n={path:e.resolvedPath,url:e.draftPreviewUrl};return{pin:n,effective:n.url}}return{pin:t,effective:t?.url??null}}function gc(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function vc(t,e,n){const r=t.toLowerCase(),o=e.toLowerCase(),d=o.split("/").filter(Boolean),i=c=>{if(c===n)return 100;const a=c.indexOf(n);if(a===-1)return 0;let p=40;return a===0?p+=30:/[\s/-]/.test(c[a-1]??"")&&(p+=20),p+=Math.round(n.length/c.length*20),p};let l=Math.max(i(r),i(o));return d.at(-1)===n?l=Math.max(l,95):d.includes(n)&&(l=Math.max(l,90)),l}function xc(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function bc({virtualMcpId:t}){const e=Pe(),n=Cr(),{currentBranch:r,taskId:o,virtualMcpId:d}=Rt(),i=!!Ha(),l=Or(),c=ri(d===t?t:null),a=jr(t),p=mo(c?.metadata?.ui?.layout??null),m=_r(p),f=Vr({contentEditingEnabled:m,isMobile:n}),[v]=C.useState(()=>ac({cmsMode:p,isMobile:n})),[g,E]=_n(On.previewEditingMode(t),u=>u&&mc.includes(u)?u:null),h=g??v,[w,S]=_n(On.previewDeviceSize(t),u=>u&&Yt.includes(u)?u:"desktop"),[y,b]=C.useState(null),[j,P]=C.useState(null),x=C.useRef(null),N=C.useRef(null),[R,T]=C.useState(!1),L=C.useRef(null),D=()=>{L.current?.flush(),T(!1)},_=()=>T(u=>(u&&L.current?.flush(),!u)),[A,B]=C.useState({width:0,height:0}),[M,J]=C.useState(!1),[z,q]=C.useState({}),[I,H]=C.useState(""),W=C.useRef(null),[O,U]=C.useState(!1),[$,G]=C.useState(),[F,Q]=C.useState(null),[X,V]=C.useState(null),[re,te]=C.useState(null),[ee,ce]=C.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[fe,oe]=C.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[me,ue]=C.useState({}),[ge,he]=C.useState(!1),ne=C.useRef(null),be=()=>{he(!0),ne.current&&clearTimeout(ne.current),ne.current=setTimeout(()=>he(!1),15e3)},$e=()=>{ne.current&&(clearTimeout(ne.current),ne.current=null),he(!1)},{org:ve}=Kn(),Oe=Hn(),Me=tn(),Fe=Me.vmEntry,De=Oe.lifecycle.phase,{url:ut,undecided:Je}=Nr(t),pe=nn(t,r),{connection:Te}=Tr(t),Le=lo(t),ze=bi({hasServeConnection:!!Te,runtime:a.runtime}),se=Je||ze==="github"&&(Le==="loading"||Le==="error"),ie=!at(pe)&&!se&&!(ze==="github"&&pe.kind==="pending"),ke=Ue(pe)??ut,Ke=ke??Me.previewUrl,ft=!!ke||De==="running",Ye=c?.id===t?li(c.metadata):null,mt=!ke&&!Je&&c?.id===t&&a.runtime==="cms",qr=a.projectDefault==="cms",pt=ie?Xi({sandboxUrl:Ke,previewServerUrl:Ye,fastPreviewActive:mt}):null,qn=t&&r?{orgSlug:ve.slug,virtualMcpId:t,branch:r,threadId:o??null,previewUrl:Ke}:null,Wn=In(qn,{fetchEnabled:ft}),sn=Rr(qn,{fetchEnabled:ft}),le=Wn.data,Se=sn.data,Qe=le?Ui(le,Se).sort((u,k)=>u.name.localeCompare(k.name)):[],Gn=t&&r?{orgSlug:ve.slug,virtualMcpId:t,branch:r}:null,Jn=Gl(Gn),rn=le&&Se?Hi(le,Se):[],Yn=ie&&le&&Se?Fa(Se,le,"loaders"):[],Qn=I?(()=>{const u=I.toLowerCase();return Qe.map(k=>({page:k,score:vc(k.name,k.path,u)})).filter(({score:k})=>k>0).sort((k,K)=>K.score-k.score||k.page.path.length-K.page.path.length).map(({page:k})=>k)})():Qe,Xn=rn.filter(u=>{if(!I)return!0;const k=I.toLowerCase();return u.name.toLowerCase().includes(k)||u.key.toLowerCase().includes(k)||u.resolveType.toLowerCase().includes(k)}),Zn=f?Yn:[],es=Zn.filter(u=>{if(!I)return!0;const k=I.toLowerCase();return u.title.toLowerCase().includes(k)||u.key.toLowerCase().includes(k)||u.resolveType.toLowerCase().includes(k)}),Lt=X?Yn.find(u=>u.key===X)??null:null,Ae=Un,an=F||X?null:Vi(Qe,ee,fe),ae=an?.key??null,Xe=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??ae,At=an?.path??null,Ze=(ae?me[ae]:void 0)??{},je=He(ee,Ze),on={};if(ie&&ft&&Ke&&Se&&le){const u=za(Se,"loaders"),k=ae?le[ae]:void 0,K=hl(k,le,xe=>u.has(xe)),Z=dl(K);for(const xe of Tt(ee)){if(xe.type!=="param")continue;const Be=ol(ee,xe.name,K),Ne=ml(Be,u,Z);Ne.length>0&&(on[xe.name]=Ne)}}const _t=t&&r?{orgSlug:ve.slug,virtualMcpId:t,branch:r,threadId:o??null}:null,ts=le&&ae?qi(le,ae,0):[],ns=at(pe),ss=le?Wi(ts,le,ns):[],ln=ss.map(u=>u.isSavedBlock?u.label:""),cn=ss.map(u=>u.isSavedBlock?"global":u.isMultivariate?"variant":"normal"),dn=ts.map(u=>Mn(u,le??{},ns)),Ot=C.useRef(null),Ce=C.useRef(null),Wr=Oe.status.state==="paused",un=Oe.phase,rs=Ka({claimPhase:un,lifecycle:Oe.lifecycle}),qe=Me.previewState,Gr=Me.userStopped,Jr=yi(ve.slug,t??""),{url:Ie}=no(mt&&t&&r?{orgSlug:ve.slug,virtualMcpId:t,branch:r,previewServerUrl:Ye??null,path:je}:null),Yr=qr&&a.runtime==="sandbox",Ee=wi(pe,ze,Le),as=ki(Ee&&mt&&pe.kind==="protocol"&&t&&r?{orgSlug:ve.slug,virtualMcpId:t,branch:r}:null),is=Ee?as.pointer:null,Y=Ho({previewState:qe,progressStatus:rs.status,previewServerUrl:Ye,fastPreviewActive:mt,fastPreviewReady:!!Ie,codingSession:Yr,localPreviewUrl:ke,hostedDraft:Ee,hostedPointerPending:Ee&&(pe.kind==="pending"||as.pending),deciding:se}),os=Y.showWakingPill||Ee&&Y.mode==="production"&&!is,ht=Y.mode!=="none",Qr=Y.mode==="production"&&Y.iframeBase?jt(Y.iframeBase):null,et=Y.mode==="production"?Qr:jt(Ke),Xr=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,gt=ie?ke?Y.mode==="sandbox"&&f&&h==="blocks":Y.mode==="production"&&mt&&Xr&&f&&h==="blocks":!1,ls=C.useRef(null),{pin:Zr,effective:ea}=hc(ls.current,{inPlaceRenderActive:gt,draftPreviewUrl:Ie,resolvedPath:je});ls.current=Zr;const cs=l.state.variantOverride??[],Dt=ie?cs:[],vt=ie?[]:cs,fn=at(pe)&&Gi.some(u=>Ji(Se,u)==="available"),tt=fn?z:{},ds=Dr(tt),ta=fn&&le?Object.keys(Yi(le).experiments):[],Bt=Ee?oc({display:Y,path:je,pointer:is,device:w,forcedVariants:vt,previewOptions:tt}):null,nt=t?Cs(ve.slug,t):null,us=JSON.stringify([vt,tt]);C.useEffect(()=>{if(!Ee||!nt)return;const[u,k]=JSON.parse(us);Bs(nt,{forcedVariants:u,previewOptions:k})},[Ee,nt,us]),C.useEffect(()=>{if(!(!Ee||!nt))return()=>Bs(nt,null)},[Ee,nt]);const mn=Te&&Ue(pe)?Ci(Te.endpoint,vt,ds):null,na=Te&&Ue(pe)?mn?fo(mn,tt):_s:null,st=pc(Y.mode==="sandbox"?qt($n(Os(re??Ln(je,Y.iframeBase)??Y.iframeBase,na),w),Dt):Y.mode==="production"&&Bt?.frame?Bt.frame:Y.mode==="production"?qt($n(zs(Ls(Os(re??ea??Ln(je,Y.iframeBase)??Y.iframeBase,os?_s:null),vt),tt),w),Dt):null),fs=Ie??(Y.iframeBase?Ln(je,Y.iframeBase):null),ms=Y.mode==="production"&&Bt?Bt.newTab:Y.mode==="production"?fs?qt(zs(Ls(fs,vt),tt),Dt):null:st??Y.iframeBase,sa=()=>{const u=ms;u&&window.open(u,"_blank","noopener")},xt=t&&r?mr(ve.slug,t,r):null,bt=u=>{xt&&qa(xt,u)},ye=l.state.target;C.useEffect(()=>{if(!(!ye||!pt||!Se))if(ye.kind==="page"){const u=me[ye.key]??{};Ce.current=He(ye.path,u),Q(null),V(null),te(null),oe(ye.key),ce(ye.path),bt({path:ye.path,pageKey:ye.key,params:u})}else if(ye.kind==="loader")Ce.current=null,Q(null),V(ye.key),te(null);else{const u=rn.find(k=>k.key===ye.key);if(u){Ce.current=null;const k=As(Se);V(null),Q(u),te(Ds(pt,k,u.key))}}},[ye,pt,Se,me]),C.useEffect(()=>{!ae||At===null||ye?.kind==="page"&&ye.key===ae&&ye.path===At||l.selectTarget({kind:"page",key:ae,path:At})},[ae,At,ye]);const[ps,ra]=C.useState(null);if(qe.kind==="iframe"&&ps!==qe.previewUrl){const u=ps!==null;ra(qe.previewUrl);const k=xt?fr(xt):null;if(k){if(Ce.current=He(k.path,k.params),ce(k.path),oe(k.pageKey),te(null),Q(null),V(null),k.pageKey&&Object.keys(k.params).length>0){const K=k.pageKey;ue(Z=>({...Z,[K]:k.params}))}}else u&&(Ce.current=null,ce("/"),te(null),oe(null),Q(null),V(null))}Ot.current=st;const aa=Y.mode==="production"&&!!Ie&&!ke,[hs,pn]=C.useState({src:st??void 0,loading:!1}),$t=dc(hs,st??void 0,aa);$t!==hs&&pn($t);const yt=$t.src,gs=$t.loading,vs=Go({iframeRef:x,src:Y.mode==="sandbox"?st:null,active:Y.mode==="sandbox"}),xs=C.useRef(null);C.useEffect(()=>{const u=gs?setTimeout(()=>pn(er),cc):null,k=()=>{u&&clearTimeout(u)};if(!Ie||!yt||xs.current===Ie)return k;xs.current=Ie;const K=x.current;return K&&K.getAttribute("src")!==yt&&(be(),K.src=yt),k},[Ie,yt,gs]);const bs=()=>{const u=x.current?.contentWindow,k=et;if(!u||!k||!le||!ae)return;const K=le[ae];if(!K||typeof K!="object")return;const Z=Zi({previewBaseUrl:k,pageBlock:K,decofile:le,path:je,pathTemplate:ee});if(!Z)return;const xe=qt(Z.src,Ti(Dt,ae));u.postMessage({type:"cms-editor::render",src:xe,body:Z.body},k)},hn=C.useRef(null);C.useEffect(()=>{if(!gt||F||X||!ae||!le){hn.current=null;return}const u={nav:JSON.stringify({page:ae,path:je,pathTemplate:ee}),content:JSON.stringify(le)},k=gc(hn.current,u);hn.current=u,k&&bs()},[le,gt,F,X,ae,je,ee]);const gn=C.useRef(null);C.useEffect(()=>{if(!gt||F||X||!ae||!le){gn.current=null;return}const u=JSON.stringify(l.state.variantOverride??null),k=gn.current;gn.current={page:ae,sig:u},!(!k||k.page!==ae||k.sig===u)&&bs()},[l.state.variantOverride,gt,F,X,ae]);const ia=!!t&&!!r&&!Oe.notFound&&!Gr&&!Wr&&(un?.kind==="ready"||De!=="idle"),we=ic({editingMode:h,sandboxDisplay:Y.mode==="sandbox",blocksEditingEnabled:f});C.useEffect(()=>{const u=et;if(!u)return;const k=K=>{if(K.origin===u)if(K.data?.type==="visual-editor::element-clicked"){const Z=Xo.safeParse(K.data.payload);Z.success&&b(Z.data)}else if(K.data?.type==="cms-editor::section-clicked"){const Z=tl.safeParse(K.data.payload);Z.success&&P({index:Z.data.sectionIndex,seq:Z.data.clickSeq})}else K.data?.type==="cms-editor::render-start"?be():K.data?.type==="cms-editor::render-end"?($e(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:ln,kinds:cn,keys:dn},u)):K.data?.type==="cms-editor::render-error"&&$e()};return window.addEventListener("message",k),()=>window.removeEventListener("message",k)},[et,ln,cn,dn]);const ys=()=>{const u=x.current?.contentWindow,k=jt(Ke);!u||!k||u.postMessage({type:"visual-editor::activate",script:Zo},k)},oa=()=>{const u=x.current?.contentWindow,k=jt(Ke);!u||!k||u.postMessage({type:"visual-editor::deactivate"},k)},vn=()=>{const u=x.current?.contentWindow,k=et;!u||!k||(u.postMessage(Y.mode==="production"||ke?{type:"editor::inject",args:{script:Ws}}:{type:"visual-editor::activate",script:Ws},k),u.postMessage({type:"cms-editor::set-labels",labels:ln,kinds:cn,keys:dn},k))},la=()=>{const u=x.current?.contentWindow,k=et;!u||!k||u.postMessage({type:"cms-editor::deactivate"},k)},ca=()=>{const u=x.current?.contentWindow,k=et;!u||!k||(u.postMessage({type:"cms-editor::clear-hover"},k),u.postMessage({type:"visual-editor::clear-hover"},k))},Mt=u=>{if(u==="blocks"&&!f)return;const k=h;!n&&u!==k&&(u==="blocks"?N.current?.resize("30%"):N.current?.collapse()),E(u),b(null),P(null),u!=="blocks"&&V(null),k==="visual"&&oa(),u==="visual"&&ys(),k==="blocks"&&u!=="blocks"&&la(),u==="blocks"&&vn()},da=()=>{Mt(sc(h,f))},ua=()=>{Mt(rc(h,f))},xn=()=>{const u=x.current;if(!u)return;be();const k=document.activeElement,K=u.tabIndex;u.tabIndex=-1,u.style.pointerEvents="none",u.blur(),xc(u,Ot.current);let Z;const xe=()=>{clearTimeout(Z),u.tabIndex=K,u.style.pointerEvents="";const Be=document.activeElement;(!Be||Be===document.body||Be===u)&&k?.focus(),u.removeEventListener("load",xe)};u.addEventListener("load",xe),Z=setTimeout(xe,3e3)};ro(xn);const Ft=Cs(ve.slug,t??""),zt=Ee&&ht&&!!t,ws=C.useRef(null);C.useEffect(()=>{if(zt)return Si(Ft)},[zt,Ft]);const{reload:wt}=Pi(ve.slug,t??""),ks=C.useRef(wt.seq);C.useEffect(()=>{if(ks.current!==wt.seq&&(ks.current=wt.seq,!!zt&&ws.current===Ot.current)){if(wt.navigates){Rs(Ft);return}xn()}},[wt.seq]);const fa=ji(Gn),kt=Ei(Ue(pe)?fa:""),Ss=C.useRef(kt);C.useEffect(()=>{const u=Ss.current;if(Ss.current=kt,!u||!kt||u===kt)return;const k=x.current;if(k)return Qo({iframe:k,reload:xn})},[kt]);const ma=()=>{const u=Yt.indexOf(w);S(Yt[(u+1)%Yt.length])},bn=(u,k)=>{if(!ae)return;const K=ae,Z={...Ze,[u]:k};Ce.current=He(ee,Z),ue(xe=>({...xe,[K]:Z})),bt({path:ee,pageKey:K,params:Z})},pa=Ul({iframeBase:Y.iframeBase,resolvedPath:je,activeGlobalSectionName:F?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),yn=u=>{const k=me[u.key]??{},K=He(u.path,k);(F||Ae(K)!==Ae(je))&&be(),Ce.current=K,Q(null),V(null),te(null),P(null),oe(u.key),ce(u.path),bt({path:u.path,pageKey:u.key,params:k}),l.selectTarget({kind:"page",key:u.key,path:u.path})};Va(xt,u=>{(F||Ae(u)!==Ae(je))&&be(),Ce.current=u,Q(null),V(null),te(null),P(null),oe(null),ce(u),bt({path:u,pageKey:null,params:{}})});const ha=u=>{if(at(pe)){const Z=le?Qi(le,u.key,Se):null;Z?yn(Z):Xt.info(e("sandbox.preview.blockOnNoPage"));return}if(!pt||!Se){Xt.error(e("sandbox.preview.previewMetadataNotReady"));return}be(),Ce.current=null;const k=As(Se),K=Ds(pt,k,u.key);Q(u),V(null),te(K),P(null),l.selectTarget({kind:"section",key:u.key})},ga=u=>{f&&(Q(null),V(u.key),te(null),Mt("blocks"),l.selectTarget({kind:"loader",key:u.key}))},va=async({name:u,path:k,templateKey:K})=>{if(!t||!r)return;const Z=Ar(k);if(Z){G(Z);return}const xe=k.trim().startsWith("/")?k.trim():`/${k.trim()}`;if(Qe.some(Ne=>Ae(Ne.path)===Ae(xe))){G(e("sandbox.preview.pageAlreadyExists",{path:xe}));return}let Be;if(K&&(Be=le?.[K],!Be)){G(e("sandbox.preview.templateNoLongerExists"));return}G(void 0);try{const Ne=await Jn.mutateAsync({name:u,path:xe,template:Be,schema:at(pe)?{meta:Se,loadMeta:async()=>(await sn.refetch()).data}:void 0});U(!1),Xt.success(e("sandbox.preview.pageCreated",{name:u})),await ho(uc),yn({key:Ne.key,name:Ne.name,path:Ne.path}),Mt("blocks")}catch(Ne){G(Ne instanceof Hr?e("sandbox.preview.pageSchemaNotReady"):Ne instanceof Error?Ne.message:e("sandbox.preview.failedToCreatePage"))}},Kt=Hl({previewSurfaceActive:ht,daemonReady:ia,production:Y.mode==="production",servePreviewUrl:Ue(pe)}),xa=Vl({showPreviewToolbar:Kt,contentEditingEnabled:m}),It=()=>{J(!1),H("")},wn=F?.name??Lt?.title??an?.name,kn=Wn.isPending||sn.isPending,Sn=kn?jt(Y.iframeBase):wn,Ut=F?`section:${F.key}`:X?`loader:${X}`:ae?`page:${ae}`:void 0,ba=Kt?xa?s.jsxs(yr,{open:M,onOpenChange:u=>{J(u),u||H("")},children:[s.jsx(xr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:kn?Sn??void 0:F||Lt?wn:[wn,ee].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[F&&s.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:[s.jsx(Xa,{size:11}),e("sandbox.preview.globalBadge")]}),Lt&&s.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:[s.jsx(Za,{size:11}),e("sandbox.preview.loaderBadge")]}),Sn&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Sn}),!kn&&!F&&!Lt&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:ee}),s.jsx(Wa,{size:12,className:_e("shrink-0 transition-transform",M&&"rotate-180")})]})})}),s.jsxs(br,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(kr,{shouldFilter:!1,defaultValue:Ut,children:[s.jsx(Sr,{value:I,onValueChange:u=>{H(u),W.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(wr,{ref:W,className:"max-h-80",children:[s.jsx(Pr,{children:Qe.length===0&&rn.length===0&&Zn.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),Qn.length>0&&s.jsx(Et,{children:Qn.map(u=>s.jsxs(Nt,{value:`page:${u.key}`,"aria-current":Ut===`page:${u.key}`||void 0,title:`${u.name} · ${u.path}`,onSelect:()=>{It(),yn(u)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:u.name}),s.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))}),Xn.length>0&&s.jsx(Et,{heading:e("sandbox.preview.globalComponents"),children:Xn.map(u=>s.jsx(Nt,{value:`section:${u.key}`,"aria-current":Ut===`section:${u.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{It(),ha(u)},children:s.jsx("span",{className:"truncate",children:u.name})},u.key))}),es.length>0&&s.jsx(Et,{heading:e("sandbox.preview.globalLoaders"),children:es.map(u=>s.jsx(Nt,{value:`loader:${u.key}`,"aria-current":Ut===`loader:${u.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{It(),ga(u)},children:s.jsx("span",{className:"truncate",children:u.title})},u.key))})]})]}),!F&&!X&&Tt(ee).some(u=>u.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:Tt(ee).map((u,k)=>{if(u.type==="text")return s.jsx("span",{children:u.text},`text-${k}`);const K=on[u.name];return K&&_t?s.jsx(Rl,{sources:K,template:ee,paramName:u.name,value:Ze[u.name]??"",sandboxRef:_t,onCommit:Z=>bn(u.name,Z)},`${ae}:${u.name}`):s.jsx(Kl,{name:u.name,value:Ze[u.name]??"",onCommit:Z=>bn(u.name,Z)},`${ae}:${u.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(Ve,{variant:"ghost",className:"w-full justify-start",onClick:()=>{It(),G(void 0),U(!0)},children:[s.jsx(vr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:pa}):null,Ps=Kt||m?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(dt,{children:[s.jsx(lt,{asChild:!0,children:s.jsx(We,{onClick:ma,"aria-label":e(nr[w]),children:w==="mobile"?s.jsx(hr,{size:16}):w==="tablet"?s.jsx(ei,{size:16}):s.jsx(gr,{size:16})})}),s.jsx(ct,{children:e(nr[w])})]}),ba,s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[fn&&s.jsx(lc,{tests:ta,options:z,onChange:q,available:!!mn||!os||!ds}),s.jsx(We,{onClick:sa,disabled:Ee&&!ms,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(cr,{size:16})})]})]}):null,ya=(ie||i)&&Y.mode==="sandbox",Ht=fc[w],Vt=w==="desktop"&&(A.width===0||A.width>=Ht.width+2*tr),js=Vt?1:Math.min(A.width>0?A.width/(Ht.width+2*tr):1,1),wa=Vt?{width:"100%",height:"100%"}:{width:`${Ht.width}px`,height:A.height>0?`${A.height/js}px`:`${Ht.height}px`,transform:`scale(${js})`,transformOrigin:"top center"},Es=s.jsxs(s.Fragment,{children:[ya&&(Kt||m)&&s.jsx(We,{onClick:da,"aria-pressed":we==="visual","aria-label":e("sandbox.preview.visualEditor"),active:we==="visual",children:s.jsx(Ts,{size:16})}),f&&s.jsxs(dt,{children:[s.jsx(lt,{asChild:!0,children:s.jsx(We,{onClick:ua,"aria-pressed":we==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:we==="blocks",children:s.jsx(ni,{size:16})})}),s.jsx(ct,{children:e("sandbox.preview.blocksEditor")})]}),Xe&&s.jsxs(dt,{children:[s.jsx(lt,{asChild:!0,children:s.jsx(We,{onClick:_,"aria-pressed":R,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:R,children:s.jsx(ti,{size:16})})}),s.jsx(ct,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),ka=!!X&&we==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[_t&&Object.entries(on).map(([u,k])=>(Ze[u]??"")===""?s.jsx(Fl,{sources:k,template:ee,paramName:u,sandboxRef:_t,onFill:K=>bn(u,K)},`${ae}:${u}`):null),s.jsxs(s.Fragment,{children:[s.jsx(Dn.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Ps}),children:Ps}),s.jsx(Dn.Toolbar.Right.Portal,{fallback:Es,children:Es})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:ka?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(Xs,{virtualMcpId:t,externalSelection:j,onViewJsonFile:_}),R&&Xe&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Zs,{ref:L,virtualMcpId:t,pageKey:Xe,onClose:D})})]}):s.jsxs($s,{orientation:"horizontal",disabled:we!=="blocks",className:"relative isolate",children:[s.jsx(Wt,{ref:N,id:"preview-blocks-editor",defaultSize:we==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:we==="blocks"&&s.jsx(Xs,{virtualMcpId:t,externalSelection:j,onViewJsonFile:_})}),we==="blocks"&&s.jsx(Ms,{withHandle:!0}),s.jsx(Wt,{id:"preview-canvas",defaultSize:we==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs($s,{orientation:"horizontal",disabled:!(R&&Xe),children:[s.jsx(Wt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:u=>{if(!u)return;const k=()=>B(Z=>Z.width===u.clientWidth&&Z.height===u.clientHeight?Z:{width:u.clientWidth,height:u.clientHeight});k();const K=new ResizeObserver(k);return K.observe(u),()=>K.disconnect()},className:_e("h-full relative overflow-clip flex justify-center",ht&&!Vt&&"bg-muted/30"),children:[(ge||Jr)&&ht&&s.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:s.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),Y.showDecidingLoader&&s.jsx("div",{"data-testid":"preview-deciding",className:"absolute inset-0 z-30 flex items-center justify-center",children:s.jsx(Ct,{className:"size-5 text-muted-foreground"})}),Y.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(jn,{kind:"starting",progress:rs,claimPhase:un})}),!ke&&!se&&qe.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(jn,{kind:"suspended",onResume:Me.resume})}),!ke&&!se&&qe.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(jn,{kind:"errored",error:qe.error,onRetry:Me.retry,connectionsHref:`/${ve.slug}/settings/connections`})}),Y.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl bg-muted px-4 py-3 shadow-soft pointer-events-none select-none",children:[s.jsx(Ct,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),we==="visual"&&!y&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-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:[s.jsx(Ts,{size:12}),e("sandbox.preview.clickElementToAsk")]}),we==="visual"&&y&&s.jsx(rl,{element:y,onDismiss:()=>b(null)}),ht&&st&&s.jsx("div",{className:_e("shrink-0",!Vt&&"bg-background shadow-edge"),style:wa,onMouseLeave:ca,children:s.jsx("iframe",{ref:x,src:yt,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:vs.handleError,onLoad:()=>{if(pn(er),vs.handleLoad(),$e(),ws.current=Ot.current,zt&&Rs(Ft),Y.mode!=="sandbox"||ke){(Y.mode==="production"&&!Y.showWakingPill||ke)&&we==="blocks"&&vn();return}if(Ta("vm_preview_loaded",{view_mode:we,vm_id:Fe?.sandboxHandle??null}),!F)try{const u=x.current?.contentWindow?.location?.pathname;if(!u)return;const k=Ce.current;if(k!==null&&(Ce.current=null,Ae(u)!==Ae(k))||Ae(u)===Ae(je))return;ce(u),bt({path:u,pageKey:fe,params:Ze})}catch{}we==="visual"&&ys(),we==="blocks"&&vn()}},Y.iframeBase)})]})}),R&&Xe&&s.jsxs(s.Fragment,{children:[s.jsx(Ms,{withHandle:!0}),s.jsx(Wt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Zs,{ref:L,virtualMcpId:t,pageKey:Xe,onClose:D})})]})]})})]})}),s.jsx(Jl,{open:O,onOpenChange:U,isPending:Jn.isPending,error:$,templates:Qe,onSubmit:va})]})}const zn={app:null,split:!1};function yc(t){const e=de.c(23),{project:n,maxApps:r,children:o}=t,d=Pe();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={silent:!0},e[0]=i):i=e[0];const l=ai(i);let c;e[1]!==n.metadata.runtime?(c=n.metadata.runtime??{},e[1]=n.metadata.runtime,e[2]=c):c=e[2];const a=c;let p;e[3]!==a.apps?(p=a.apps??[],e[3]=a.apps,e[4]=p):p=e[4];const m=p;let f;e[5]!==l.update||e[6]!==n.id||e[7]!==n.metadata||e[8]!==a||e[9]!==d?(f=S=>l.update.mutate({id:n.id,data:{metadata:{...n.metadata,runtime:{...a,apps:S.length?S:null}}}},{onError:()=>Xt.error(d("sandbox.appTabs.saveError"))}),e[5]=l.update,e[6]=n.id,e[7]=n.metadata,e[8]=a,e[9]=d,e[10]=f):f=e[10];const v=f,g=a.path??null;let E,h;e[11]!==m||e[12]!==v?(E=S=>v([...m,{path:S}]),h=S=>v(m.filter(y=>y.path!==S)),e[11]=m,e[12]=v,e[13]=E,e[14]=h):(E=e[13],h=e[14]);let w;return e[15]!==m||e[16]!==o||e[17]!==r||e[18]!==n.id||e[19]!==g||e[20]!==E||e[21]!==h?(w=s.jsx(wc,{virtualMcpId:n.id,mainPath:g,apps:m,maxApps:r,onAddApp:E,onRemoveApp:h,children:o}),e[15]=m,e[16]=o,e[17]=r,e[18]=n.id,e[19]=g,e[20]=E,e[21]=h,e[22]=w):w=e[22],w}function wc(t){const e=de.c(97),{virtualMcpId:n,mainPath:r,apps:o,maxApps:d,onAddApp:i,onRemoveApp:l,children:c}=t,a=Pe(),p=Cr(),{currentBranch:m}=Rt(),f=tn(),v=Hn().lifecycle.phase,g=nn(n,m),{url:E}=Nr(n);let h;e[0]!==g||e[1]!==E?(h=Ue(g)??E,e[0]=g,e[1]=E,e[2]=h):h=e[2];const w=h,S=w??f.previewUrl,y=!!w||v==="running",b=!y&&f.status==="errored";let j;e[3]!==n?(j=On.previewAppLayout(n),e[3]=n,e[4]=j):j=e[4];const[P,x]=_n(j,kc);let N;e[5]!==o||e[6]!==P?(N=o.some(ne=>ne.path===P.app)?P.app:null,e[5]=o,e[6]=P,e[7]=N):N=e[7];const R=N,T=R!==null&&P.split&&!p,L=R===null||T,D=R??o[0]?.path??null,[_,A]=C.useState(null),[B,M]=C.useState(!1);let J;e[8]===Symbol.for("react.memo_cache_sentinel")?(J=()=>{A(null),M(!1)},e[8]=J):J=e[8];const z=J;let q;e[9]!==o||e[10]!==_||e[11]!==p||e[12]!==r||e[13]!==i||e[14]!==x?(q=()=>{if(_===null)return;const ne=Ks(_);if(!ne){z();return}if(ne===Ks(r??"")||o.some(be=>be.path===ne)){M(!0);return}i(ne),x({app:ne,split:!p}),z()},e[9]=o,e[10]=_,e[11]=p,e[12]=r,e[13]=i,e[14]=x,e[15]=q):q=e[15];const I=q;let H;e[16]!==r||e[17]!==a?(H=r?Nn(r):a("sandbox.appTabs.root"),e[16]=r,e[17]=a,e[18]=H):H=e[18];const W=H;let O;e[19]!==T||e[20]!==a?(O=a(T?"sandbox.appTabs.single":"sandbox.appTabs.split"),e[19]=T,e[20]=a,e[21]=O):O=e[21];const U=O;let $;e[22]!==a?($=a("sandbox.appTabs.label"),e[22]=a,e[23]=$):$=e[23];let G;e[24]!==a?(G=a("sandbox.appTabs.main"),e[24]=a,e[25]=G):G=e[25];let F;e[26]!==a?(F=a("sandbox.appTabs.mainHint"),e[26]=a,e[27]=F):F=e[27];let Q;e[28]!==x?(Q=()=>x(zn),e[28]=x,e[29]=Q):Q=e[29];let X;e[30]!==b||e[31]!==W||e[32]!==y||e[33]!==L||e[34]!==F||e[35]!==Q||e[36]!==G?(X=s.jsx(sr,{label:W,badge:G,hint:F,ready:y,failed:b,onScreen:L,onSelect:Q}),e[30]=b,e[31]=W,e[32]=y,e[33]=L,e[34]=F,e[35]=Q,e[36]=G,e[37]=X):X=e[37];let V;if(e[38]!==o||e[39]!==R||e[40]!==b||e[41]!==W||e[42]!==l||e[43]!==y||e[44]!==x||e[45]!==T||e[46]!==a){let ne;e[48]!==R||e[49]!==b||e[50]!==W||e[51]!==l||e[52]!==y||e[53]!==x||e[54]!==T||e[55]!==a?(ne=be=>{const $e=Nn(be.path);return s.jsx(sr,{label:$e,hint:a("sandbox.appTabs.extraHint",{app:W}),ready:y,failed:b,onScreen:be.path===R,onSelect:()=>x({app:be.path,split:T}),onRemove:()=>l(be.path),removeLabel:a("sandbox.appTabs.remove",{app:$e})},be.path)},e[48]=R,e[49]=b,e[50]=W,e[51]=l,e[52]=y,e[53]=x,e[54]=T,e[55]=a,e[56]=ne):ne=e[56],V=o.map(ne),e[38]=o,e[39]=R,e[40]=b,e[41]=W,e[42]=l,e[43]=y,e[44]=x,e[45]=T,e[46]=a,e[47]=V}else V=e[47];let re;e[57]!==X||e[58]!==V||e[59]!==$?(re=s.jsxs("div",{role:"tablist","aria-label":$,className:"flex min-w-0 items-center gap-1 overflow-x-auto",children:[X,V]}),e[57]=X,e[58]=V,e[59]=$,e[60]=re):re=e[60];let te;e[61]!==o.length||e[62]!==I||e[63]!==_||e[64]!==B||e[65]!==d||e[66]!==a?(te=_!==null?s.jsx("form",{className:"w-40 shrink-0",onSubmit:ne=>{ne.preventDefault(),I()},children:s.jsx("input",{autoFocus:!0,value:_,placeholder:"apps/checkout","aria-label":a("sandbox.appTabs.pathLabel"),"aria-invalid":B,onChange:ne=>{A(ne.target.value),M(!1)},onBlur:z,onKeyDown:ne=>{ne.key==="Escape"&&z()},className:_e("h-7 w-full rounded-md border bg-background px-2 font-mono text-xs outline-none",B?"border-destructive":"border-border")})}):o.length<d&&s.jsx(ot,{label:a("sandbox.appTabs.add"),onClick:()=>A(""),children:s.jsx(vr,{})}),e[61]=o.length,e[62]=I,e[63]=_,e[64]=B,e[65]=d,e[66]=a,e[67]=te):te=e[67];let ee;e[68]!==p||e[69]!==x||e[70]!==T||e[71]!==U||e[72]!==D?(ee=!p&&D&&s.jsx(ot,{label:U,active:T,onClick:()=>x(T?zn:{app:D,split:!0}),children:s.jsx(si,{})}),e[68]=p,e[69]=x,e[70]=T,e[71]=U,e[72]=D,e[73]=ee):ee=e[73];let ce;e[74]!==re||e[75]!==te||e[76]!==ee?(ce=s.jsxs(s.Fragment,{children:[re,te,ee]}),e[74]=re,e[75]=te,e[76]=ee,e[77]=ce):ce=e[77];const fe=ce;let oe;e[78]!==fe?(oe=s.jsx(Dn.Topbar.Left.Portal,{fallback:s.jsx("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:fe}),children:s.jsx("div",{className:"ml-1 flex min-w-0 items-center gap-1 border-l border-border/60 pl-2",children:fe})}),e[78]=fe,e[79]=oe):oe=e[79];let me;e[80]!==c||e[81]!==L?(me=L&&s.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:c}),e[80]=c,e[81]=L,e[82]=me):me=e[82];let ue;e[83]!==R||e[84]!==b||e[85]!==W||e[86]!==S||e[87]!==y||e[88]!==x||e[89]!==T?(ue=R!==null&&s.jsx(Sc,{name:Nn(R),mainName:W,appUrl:S?go(S,R):null,ready:y,failed:b,className:_e(T&&"border-l border-border"),onClose:T?()=>x({app:R,split:!1}):void 0},R),e[83]=R,e[84]=b,e[85]=W,e[86]=S,e[87]=y,e[88]=x,e[89]=T,e[90]=ue):ue=e[90];let ge;e[91]!==me||e[92]!==ue?(ge=s.jsxs("div",{className:"flex min-h-0 flex-1",children:[me,ue]}),e[91]=me,e[92]=ue,e[93]=ge):ge=e[93];let he;return e[94]!==oe||e[95]!==ge?(he=s.jsxs("div",{className:"flex h-full w-full min-h-0 flex-col",children:[oe,ge]}),e[94]=oe,e[95]=ge,e[96]=he):he=e[96],he}function kc(t){return t??zn}function sr(t){const e=de.c(28),{label:n,badge:r,hint:o,ready:d,failed:i,onScreen:l,onSelect:c,onRemove:a,removeLabel:p}=t,m=l?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/60 hover:text-foreground";let f;e[0]!==m?(f=_e("group/app-tab flex h-7 shrink-0 items-center rounded-md text-xs transition-colors",m),e[0]=m,e[1]=f):f=e[1];const v=d?"bg-success":i?"bg-destructive":"animate-pulse bg-warning";let g;e[2]!==v?(g=_e("size-1.5 rounded-full",v),e[2]=v,e[3]=g):g=e[3];let E;e[4]!==g?(E=s.jsx("span",{"aria-hidden":!0,className:g}),e[4]=g,e[5]=E):E=e[5];let h;e[6]!==n?(h=s.jsx("span",{className:"max-w-40 truncate",children:n}),e[6]=n,e[7]=h):h=e[7];let w;e[8]!==r?(w=r&&s.jsx("span",{className:"text-[10px] text-muted-foreground",children:r}),e[8]=r,e[9]=w):w=e[9];let S;e[10]!==l||e[11]!==c||e[12]!==E||e[13]!==h||e[14]!==w?(S=s.jsx(lt,{asChild:!0,children:s.jsxs("button",{type:"button",role:"tab","aria-selected":l,onClick:c,className:"flex h-full items-center gap-1.5 rounded-md px-2.5 focus-ring",children:[E,h,w]})}),e[10]=l,e[11]=c,e[12]=E,e[13]=h,e[14]=w,e[15]=S):S=e[15];let y;e[16]!==o?(y=s.jsx(ct,{className:"max-w-64",children:o}),e[16]=o,e[17]=y):y=e[17];let b;e[18]!==S||e[19]!==y?(b=s.jsxs(dt,{children:[S,y]}),e[18]=S,e[19]=y,e[20]=b):b=e[20];let j;e[21]!==a||e[22]!==p?(j=a&&s.jsx("button",{type:"button","aria-label":p,onClick:a,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:s.jsx(Br,{className:"size-3"})}),e[21]=a,e[22]=p,e[23]=j):j=e[23];let P;return e[24]!==b||e[25]!==j||e[26]!==f?(P=s.jsxs("div",{className:f,children:[b,j]}),e[24]=b,e[25]=j,e[26]=f,e[27]=P):P=e[27],P}function Sc(t){const e=de.c(69),{name:n,mainName:r,appUrl:o,ready:d,failed:i,className:l,onClose:c}=t,a=Pe(),[p,m]=C.useState("/"),[f,v]=C.useState("desktop"),[g,E]=C.useState(0),h=C.useRef(null);let w;e[0]!==o||e[1]!==p?(w=o?vo(o,p):null,e[0]=o,e[1]=p,e[2]=w):w=e[2];const S=w;let y;e[3]!==l?(y=_e("flex min-h-0 min-w-0 flex-1 flex-col",l),e[3]=l,e[4]=y):y=e[4];let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=F=>{F.preventDefault(),m(h.current?.value||"/")},e[5]=b):b=e[5];let j;e[6]!==n||e[7]!==a?(j=a("sandbox.appPane.path",{app:n}),e[6]=n,e[7]=a,e[8]=j):j=e[8];let P;e[9]!==p||e[10]!==j?(P=s.jsx("form",{className:"min-w-0 flex-1",onSubmit:b,children:s.jsx("input",{ref:h,defaultValue:p,"aria-label":j,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]=j,e[11]=P):P=e[11];let x;e[12]!==f||e[13]!==a?(x=a(f==="desktop"?"sandbox.preview.deviceMobile":"sandbox.preview.deviceDesktop"),e[12]=f,e[13]=a,e[14]=x):x=e[14];let N;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=()=>v(jc),e[15]=N):N=e[15];let R;e[16]!==f?(R=f==="desktop"?s.jsx(gr,{}):s.jsx(hr,{}),e[16]=f,e[17]=R):R=e[17];let T;e[18]!==x||e[19]!==R?(T=s.jsx(ot,{label:x,onClick:N,children:R}),e[18]=x,e[19]=R,e[20]=T):T=e[20];let L;e[21]!==n||e[22]!==a?(L=a("sandbox.appPane.reload",{app:n}),e[21]=n,e[22]=a,e[23]=L):L=e[23];const D=!S||!d;let _,A;e[24]===Symbol.for("react.memo_cache_sentinel")?(_=()=>E(Pc),A=s.jsx(Ca,{}),e[24]=_,e[25]=A):(_=e[24],A=e[25]);let B;e[26]!==L||e[27]!==D?(B=s.jsx(ot,{label:L,disabled:D,onClick:_,children:A}),e[26]=L,e[27]=D,e[28]=B):B=e[28];let M;e[29]!==n||e[30]!==a?(M=a("sandbox.appPane.openInNewTab",{app:n}),e[29]=n,e[30]=a,e[31]=M):M=e[31];const J=!S||!d;let z;e[32]!==S?(z=()=>S&&window.open(S,"_blank","noopener"),e[32]=S,e[33]=z):z=e[33];let q;e[34]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(cr,{}),e[34]=q):q=e[34];let I;e[35]!==M||e[36]!==J||e[37]!==z?(I=s.jsx(ot,{label:M,disabled:J,onClick:z,children:q}),e[35]=M,e[36]=J,e[37]=z,e[38]=I):I=e[38];let H;e[39]!==n||e[40]!==c||e[41]!==a?(H=c&&s.jsx(ot,{label:a("sandbox.appPane.close",{app:n}),onClick:c,children:s.jsx(Br,{})}),e[39]=n,e[40]=c,e[41]=a,e[42]=H):H=e[42];let W;e[43]!==B||e[44]!==I||e[45]!==H||e[46]!==P||e[47]!==T?(W=s.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-2",children:[P,T,B,I,H]}),e[43]=B,e[44]=I,e[45]=H,e[46]=P,e[47]=T,e[48]=W):W=e[48];let O;e[49]!==r||e[50]!==a?(O=a("sandbox.appPane.previewOnly",{app:r}),e[49]=r,e[50]=a,e[51]=O):O=e[51];let U;e[52]!==O?(U=s.jsx("p",{className:"shrink-0 truncate border-b border-border bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground",children:O}),e[52]=O,e[53]=U):U=e[53];let $;e[54]!==f||e[55]!==i||e[56]!==r||e[57]!==n||e[58]!==d||e[59]!==g||e[60]!==S||e[61]!==a?($=s.jsx("div",{className:"flex min-h-0 flex-1 justify-center overflow-auto bg-muted/40",children:!d||!S?s.jsx("p",{className:"self-center px-6 text-center text-sm text-muted-foreground",children:d?a("sandbox.appPane.noUrl"):i?a("sandbox.appPane.failed",{app:r}):a("sandbox.appPane.waiting")}):s.jsx("iframe",{src:S,title:n,className:_e("h-full bg-background",f==="mobile"?"w-[412px] max-w-full border-x border-border":"w-full")},`${S}#${g}`)}),e[54]=f,e[55]=i,e[56]=r,e[57]=n,e[58]=d,e[59]=g,e[60]=S,e[61]=a,e[62]=$):$=e[62];let G;return e[63]!==n||e[64]!==y||e[65]!==W||e[66]!==U||e[67]!==$?(G=s.jsxs("section",{"aria-label":n,className:y,children:[W,U,$]}),e[63]=n,e[64]=y,e[65]=W,e[66]=U,e[67]=$,e[68]=G):G=e[68],G}function Pc(t){return t+1}function jc(t){return t==="desktop"?"mobile":"desktop"}function ot(t){const e=de.c(11),{label:n,children:r,active:o,disabled:d,onClick:i}=t;let l;e[0]!==o||e[1]!==r||e[2]!==d||e[3]!==n||e[4]!==i?(l=s.jsx(lt,{asChild:!0,children:s.jsx(We,{"aria-label":n,"aria-pressed":o,active:o,disabled:d,onClick:i,children:r})}),e[0]=o,e[1]=r,e[2]=d,e[3]=n,e[4]=i,e[5]=l):l=e[5];let c;e[6]!==n?(c=s.jsx(ct,{children:n}),e[6]=n,e[7]=c):c=e[7];let a;return e[8]!==l||e[9]!==c?(a=s.jsxs(dt,{children:[l,c]}),e[8]=l,e[9]=c,e[10]=a):a=e[10],a}const Ec=async(t,e)=>{try{return await fetch(t,{method:"HEAD",mode:"no-cors",cache:"no-store",credentials:"omit",signal:e}),!0}catch{return!1}},Nc=1e4,Tc=1e4,Cc=5e3,Rc=2;function Lc(t,e){return t&&e===0?Tc:Math.min(1e3*2**Math.max(0,e-1),Cc)}function Ac(t,e,n){return e?!0:t===!0&&n<Rc}function _c(t,e){const n=de.c(11),r=Ec,o=Ra();let d;n[0]!==t?(d=ir.localAppReachable(t??""),n[0]=t,n[1]=d):d=n[1];const i=d;let l;n[2]!==r||n[3]!==o||n[4]!==i||n[5]!==t?(l=async m=>{const{signal:f}=m,v=new AbortController,g=()=>v.abort();f.addEventListener("abort",g);const E=setTimeout(g,Nc),h=await r(t,v.signal).catch(Dc);clearTimeout(E),f.removeEventListener("abort",g);const w=o.getQueryData(i),S=h?0:(w?.failures??0)+1;return{up:Ac(w?.up??null,h,S),failures:S}},n[2]=r,n[3]=o,n[4]=i,n[5]=t,n[6]=l):l=n[6];const c=!!t;let a;n[7]!==i||n[8]!==l||n[9]!==c?(a={queryKey:i,queryFn:l,enabled:c,retry:!1,staleTime:0,gcTime:0,refetchInterval:Oc},n[7]=i,n[8]=l,n[9]=c,n[10]=a):a=n[10];const{data:p}=La(a);return t?p?.up??null:null}function Oc(t){return t.state.data?Lc(t.state.data.up,t.state.data.failures):!1}function Dc(){return!1}function Bc(t){const{backend:e}=t;if(e.kind==="protocol"&&e.source==="local")return{kind:"connected"};if(e.kind==="unavailable"&&e.source==="local"){const n=e.problem;return!n||n.reason==="not-answering"?t.access==="denied"?{kind:"needs-permission"}:{kind:"not-running"}:{kind:"problem",problem:n}}return{kind:"connecting"}}function Bd(t){const e=de.c(53),{virtualMcpId:n}=t,r=Pe(),o=ii(n),{connection:d}=Tr(n),{activeTask:i,taskId:l,currentBranch:c}=Rt(),a=To(l),[p,m]=C.useState(!1),f=nn(n,c);let v;e[0]!==f||e[1]!==d?(v=d?Ue(f):null,e[0]=f,e[1]=d,e[2]=v):v=e[2];const g=v,E=_c(g),h=Mr(),w=xo("multi_app_preview");if(wo({threadId:l,sandboxBranch:i?.branch??c,agentHasRepo:En(o?.metadata),threadHasRepo:En(a)||En(i?.metadata)})==="none"&&!d){let P;e[3]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx(Is,{className:"size-7 text-foreground"})}),e[3]=P):P=e[3];let x;e[4]!==r?(x=r("mainPanelTabs.previewTab.noSourceToPreview"),e[4]=r,e[5]=x):x=e[5];let N;e[6]!==r?(N=r("mainPanelTabs.previewTab.connectGithubDescription"),e[6]=r,e[7]=N):N=e[7];let R,T;e[8]===Symbol.for("react.memo_cache_sentinel")?(R=()=>m(!0),T=s.jsx(Is,{className:"size-4"}),e[8]=R,e[9]=T):(R=e[8],T=e[9]);let L;e[10]!==r?(L=r("mainPanelTabs.previewTab.connectGithub"),e[10]=r,e[11]=L):L=e[11];let D;e[12]!==L?(D=s.jsxs(Ve,{onClick:R,children:[T,L]}),e[12]=L,e[13]=D):D=e[13];let _;e[14]!==x||e[15]!==N||e[16]!==D?(_=s.jsx(bo,{className:"h-full",image:P,title:x,description:N,actions:D}),e[14]=x,e[15]=N,e[16]=D,e[17]=_):_=e[17];let A;e[18]!==p?(A=s.jsx(yo,{open:p,onOpenChange:m,mode:"agent"}),e[18]=p,e[19]=A):A=e[19];let B;return e[20]!==A||e[21]!==_?(B=s.jsxs(s.Fragment,{children:[_,A]}),e[20]=A,e[21]=_,e[22]=B):B=e[22],B}if(d&&o&&!Ue(f)){let P;e[23]!==h||e[24]!==f?(P=Bc({backend:f,access:h}),e[23]=h,e[24]=f,e[25]=P):P=e[25];let x;e[26]!==d.endpoint?(x=Ni(d.endpoint),e[26]=d.endpoint,e[27]=x):x=e[27];let N;return e[28]!==P||e[29]!==x?(N=s.jsx(Mc,{status:P,host:x}),e[28]=P,e[29]=x,e[30]=N):N=e[30],N}if(g&&E!==!0){let P;e[31]!==r?(P=r("mainPanelTabs.previewTab.localAppWaiting.title"),e[31]=r,e[32]=P):P=e[32];let x;e[33]!==g||e[34]!==r?(x=r("mainPanelTabs.previewTab.localAppWaiting.body",{host:$c(g)}),e[33]=g,e[34]=r,e[35]=x):x=e[35];let N;e[36]!==x?(N=s.jsx(Zt,{text:x}),e[36]=x,e[37]=N):N=e[37];let R;e[38]!==r?(R=r("mainPanelTabs.previewTab.localAppWaiting.hint"),e[38]=r,e[39]=R):R=e[39];let T;e[40]!==R?(T=s.jsx("p",{role:"status",className:"text-center text-sm text-muted-foreground",children:R}),e[40]=R,e[41]=T):T=e[41];let L;return e[42]!==P||e[43]!==N||e[44]!==T?(L=s.jsx(en,{headingLevel:2,waiting:!0,title:P,lead:N,footer:T}),e[42]=P,e[43]=N,e[44]=T,e[45]=L):L=e[45],L}let y;e[46]!==n?(y=s.jsx(bc,{virtualMcpId:n}),e[46]=n,e[47]=y):y=e[47];const b=y;let j;return e[48]!==o||e[49]!==w||e[50]!==b||e[51]!==d?(j=s.jsx(Ia,{children:w&&o&&!d?s.jsx(yc,{project:o,maxApps:po,children:b}):b}),e[48]=o,e[49]=w,e[50]=b,e[51]=d,e[52]=j):j=e[52],j}function $c(t){try{return new URL(t).host}catch{return t}}function Mc(t){const e=de.c(20),{status:n,host:r}=t,o=Pe();if(n.kind==="connected"){let l;e[0]!==o?(l=o("mainPanelTabs.previewTab.localhostNoPreview.title"),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==o?(c=o("mainPanelTabs.previewTab.localhostNoPreview.body"),e[2]=o,e[3]=c):c=e[3];let a;e[4]!==c?(a=s.jsx(Zt,{text:c}),e[4]=c,e[5]=a):a=e[5];let p;e[6]!==o?(p=o("mainPanelTabs.previewTab.localhostNoPreview.step.title"),e[6]=o,e[7]=p):p=e[7];let m;e[8]!==p?(m=[{title:p,command:`${Er} --preview localhost:3000`}],e[8]=p,e[9]=m):m=e[9];let f;return e[10]!==l||e[11]!==a||e[12]!==m?(f=s.jsx(en,{headingLevel:2,waiting:!1,title:l,lead:a,steps:m}),e[10]=l,e[11]=a,e[12]=m,e[13]=f):f=e[13],f}let d;e[14]!==r||e[15]!==n?(d=_o(n,r),e[14]=r,e[15]=n,e[16]=d):d=e[16];let i;return e[17]!==r||e[18]!==d?(i=s.jsx(Ao,{wait:d,hosts:r}),e[17]=r,e[18]=d,e[19]=i):i=e[19],i}export{Ao as L,Bd as P,en as S,Dd as u};
|