decocms 4.498.1 → 4.498.2
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-CEOSKof6.js → ActiveShapeUtils-CPrqBLS-.js} +1 -1
- package/dist/client/assets/{AlertCircle-yt_vxPJf.js → AlertCircle-Bz95IA1L.js} +1 -1
- package/dist/client/assets/{AreaChart-NgSbz1YU.js → AreaChart-Xme8QWLU.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BoFdVIj0.js → ArrowLeft-B5K5-flN.js} +1 -1
- package/dist/client/assets/{ArrowUp-CIbRKXRd.js → ArrowUp-W9fOJYtW.js} +1 -1
- package/dist/client/assets/{BarChart-CZZfMdqS.js → BarChart-BPQlorah.js} +1 -1
- package/dist/client/assets/{Building02-Grdt_-B9.js → Building02-DH0ShiKs.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DOyrhZnb.js → CategoricalChart-Dy_bc6zw.js} +1 -1
- package/dist/client/assets/{CheckCircle-CZBNcseh.js → CheckCircle-CvrX7p0-.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Cx7bXE4W.js → ChevronSelectorVertical-DCbswHDn.js} +1 -1
- package/dist/client/assets/{ChevronUp-D6IHSaQn.js → ChevronUp-BF5A1_bk.js} +1 -1
- package/dist/client/assets/{Copy01-CEPiTf5t.js → Copy01-JxasDo0Y.js} +1 -1
- package/dist/client/assets/{CreditCard01-tiXWLEqR.js → CreditCard01-zruO6RR6.js} +1 -1
- package/dist/client/assets/{DotsVertical-BuI2KBNC.js → DotsVertical-IlcVf06d.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-z-eRCr-L.js → ErrorBarContext-BHJpW1jD.js} +1 -1
- package/dist/client/assets/{Globe04-C0XtFFMY.js → Globe04-DRKGVBCX.js} +1 -1
- package/dist/client/assets/{Image01-9sEHDLML.js → Image01-Bt6ZIkX1.js} +1 -1
- package/dist/client/assets/{Key01-yp2uNovQ.js → Key01-DBTFQIL_.js} +1 -1
- package/dist/client/assets/{Link01-EXdK0urZ.js → Link01-Da5EfBPU.js} +1 -1
- package/dist/client/assets/{LinkBroken01-3c_toy9W.js → LinkBroken01-DeBiMAX8.js} +1 -1
- package/dist/client/assets/{Monitor01-TfUbVR_O.js → Monitor01-8fVRFSue.js} +1 -1
- package/dist/client/assets/{Play-CN_3v0Nc.js → Play-auont4T3.js} +1 -1
- package/dist/client/assets/{Plus-BuHYG86K.js → Plus-B-IfeegN.js} +1 -1
- package/dist/client/assets/{SearchMd-Dq3HFXQW.js → SearchMd-BHEy3hgp.js} +1 -1
- package/dist/client/assets/{Sector-BZNZXef1.js → Sector-8CKg69iF.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Cf6UKyjX.js → ShoppingBag01-DVzEvqIf.js} +1 -1
- package/dist/client/assets/{Sun-CO0EKSy7.js → Sun-BBJ4xAcN.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bu2dq40R.js → SwitchHorizontal01-DWzDEU-3.js} +1 -1
- package/dist/client/assets/{Tool01-1QQRqWDa.js → Tool01-G_7e_fu0.js} +1 -1
- package/dist/client/assets/{Trash01-B6NXmxPH.js → Trash01-DsUZfXDb.js} +1 -1
- package/dist/client/assets/{Upload01-D4HC2Tn9.js → Upload01-CQ46KAYz.js} +1 -1
- package/dist/client/assets/{User01-j65IkD-p.js → User01-P3sVVPbl.js} +1 -1
- package/dist/client/assets/{UserSquare-BlEF03DB.js → UserSquare-D3rxt1fW.js} +1 -1
- package/dist/client/assets/{Users01-DaolauCT.js → Users01-C3X5KgEC.js} +1 -1
- package/dist/client/assets/{XAxis-BEe_hkuD.js → XAxis-ccboYQXo.js} +1 -1
- package/dist/client/assets/{XClose-DR6y5rEy.js → XClose-wS5BxV-4.js} +1 -1
- package/dist/client/assets/{ZoomOut-4Na-37_y.js → ZoomOut-RInN96sm.js} +1 -1
- package/dist/client/assets/{access-gate-BkRaj5GE.js → access-gate-BfaxUmir.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Clf3RGrh.js → add-connection-dialog-CuTrOuMt.js} +1 -1
- package/dist/client/assets/{agent-analytics-DtOK7V_m.js → agent-analytics-QnKf3VXx.js} +1 -1
- package/dist/client/assets/agent-app-y713S8L2.js +1 -0
- package/dist/client/assets/{agent-assets-eggmJ6AO.js → agent-assets-CbOxvUVV.js} +1 -1
- package/dist/client/assets/{agent-automation-DKjiKuGX.js → agent-automation-DTCmfA1N.js} +1 -1
- package/dist/client/assets/{agent-automations-D0TPMz58.js → agent-automations-BmGXIPS7.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-QM1x-Vlg.js → agent-connect-sources-_4X6sAcK.js} +1 -1
- package/dist/client/assets/agent-deck-Clw_PoDY.js +1 -0
- package/dist/client/assets/{agent-e2e-Ca7-yyUr.js → agent-e2e-yMfZw5Yr.js} +1 -1
- package/dist/client/assets/{agent-experiments-CShjLMy4.js → agent-experiments-Hqcu4xN3.js} +1 -1
- package/dist/client/assets/{agent-file-CXnhLpHv.js → agent-file-CAK6n9Y3.js} +1 -1
- package/dist/client/assets/{agent-hosting-CJ7X3aoi.js → agent-hosting-DzG38PAp.js} +1 -1
- package/dist/client/assets/{agent-icon-BWm1tEHf.js → agent-icon-DtuRgBXt.js} +1 -1
- package/dist/client/assets/agent-library-CDbG2dvW.js +1 -0
- package/dist/client/assets/agent-library-file-D6nDt_06.js +1 -0
- package/dist/client/assets/{agent-monitor-aO-ZX72I.js → agent-monitor-BOoiOM64.js} +1 -1
- package/dist/client/assets/{agent-overview-BdNqyANT.js → agent-overview-BAiMf3nd.js} +1 -1
- package/dist/client/assets/agent-settings-DZqJ1Ao9.js +1 -0
- package/dist/client/assets/{agent-site-editor-DpVUGFZO.js → agent-site-editor-D0WgiifS.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-hMG7vrm0.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-Ch_W-XBW.js → agent-site-editor-content-BgOJFG9c.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-B_IWatK1.js → agent-site-editor-preview-CUoQ3A2A.js} +3 -3
- package/dist/client/assets/agent-view-49jn3sef.js +1 -0
- package/dist/client/assets/{agent-view-guard-BvLhIXrv.js → agent-view-guard-4ZKaGH4G.js} +1 -1
- package/dist/client/assets/{agents-list-C1mOaR5S.js → agents-list-D3gJ2RT9.js} +1 -1
- package/dist/client/assets/{ai-providers-Dl-M1PyL.js → ai-providers-EX3loIyU.js} +1 -1
- package/dist/client/assets/{alert-SBNacSkV.js → alert--bP6MJ-s.js} +1 -1
- package/dist/client/assets/{alert-dialog-jQtZ3ZzI.js → alert-dialog-BXQXu_hy.js} +1 -1
- package/dist/client/assets/{analytics-sections-ClrZtpv-.js → analytics-sections-CdYiQ-xy.js} +1 -1
- package/dist/client/assets/{api-keys-CPJrFMqi.js → api-keys-BrjugwDb.js} +1 -1
- package/dist/client/assets/api-keys-CJs0zhxS.js +1 -0
- package/dist/client/assets/app-editor-jFcBonBj.js +1 -0
- package/dist/client/assets/{asset-utils-D08Aoc_R.js → asset-utils-D7XXIUcy.js} +1 -1
- package/dist/client/assets/{auth-mFhLeKMz.js → auth-BE-jkdby.js} +1 -1
- package/dist/client/assets/{auth-catchall-BeMyoBKu.js → auth-catchall-CjR3tChI.js} +1 -1
- package/dist/client/assets/{auth-entry-DJaGJAjK.js → auth-entry-DDsI8LJz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-ByDkAW2k.js → auth-split-layout-D6qqJdJA.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CeGbqgzS.js → authenticate-and-persist-oauth-6gcBpEYE.js} +1 -1
- package/dist/client/assets/{automation-list-row-DVkYWn7-.js → automation-list-row-CteUT-6p.js} +1 -1
- package/dist/client/assets/{automation-runs-ClsfcDj3.js → automation-runs-CUtnmcVp.js} +1 -1
- package/dist/client/assets/{automations-J6M9iOPe.js → automations-lYa6AiLA.js} +1 -1
- package/dist/client/assets/{autosend-BMgG-yyo.js → autosend-DoPX3ID2.js} +1 -1
- package/dist/client/assets/{avatar-CGKHJJ29.js → avatar-Bq6TAAFW.js} +1 -1
- package/dist/client/assets/{badge-e2QrlLU3.js → badge-DdyoasWI.js} +1 -1
- package/dist/client/assets/{block-document-CwvleIK5.js → block-document-DFUf28-k.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CRfw600-.js → blocks-preview-workspace-context-CcflmcEy.js} +1 -1
- package/dist/client/assets/{blog-schema-9H1MsVja.js → blog-schema-OMPmGRLW.js} +1 -1
- package/dist/client/assets/{board-analytics-DJF9aWKh.js → board-analytics-BiNZrPNn.js} +1 -1
- package/dist/client/assets/{buckets-BP1Vhyhd.js → buckets-CaFJvXOA.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-v8716goQ.js → build-improve-prompt-doc-vQTXQ0bc.js} +1 -1
- package/dist/client/assets/{calendar-Bk2o0YZw.js → calendar-CKjCUK4z.js} +1 -1
- package/dist/client/assets/{capability-load-error-CIHPR5Gy.js → capability-load-error-yY_zJ-Ao.js} +1 -1
- package/dist/client/assets/{category-editor-BaQg02aW.js → category-editor-k50OxEem.js} +1 -1
- package/dist/client/assets/{chart-HyDGBD-q.js → chart-DLnDEiU-.js} +1 -1
- package/dist/client/assets/{chat-context-BbNDNUk9.js → chat-context-CrQzXlfA.js} +1 -1
- package/dist/client/assets/{chat-draft-hlZVssEX.js → chat-draft-Dt0YxfIm.js} +1 -1
- package/dist/client/assets/{checkbox-C_2F1Cj3.js → checkbox-BDf-RH4K.js} +1 -1
- package/dist/client/assets/{choose-editor-ChSwWWjo.js → choose-editor-DGzy5hBy.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-D269DINR.js → claim-phase-copy-DzqqNAQK.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CmkX-i8P.js → cli-auth-success-BxMYF6-F.js} +1 -1
- package/dist/client/assets/{client-icons-DSMjDL_L.js → client-icons-Dg5TRoFi.js} +1 -1
- package/dist/client/assets/{collapsible-B9gzEACx.js → collapsible-BxK4deT6.js} +1 -1
- package/dist/client/assets/{collection-detail-1UUQlOPW.js → collection-detail-CywnSV_7.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bfbynwrl.js → collection-display-button-jNP5K1bz.js} +1 -1
- package/dist/client/assets/{collection-search-B0uW5tI4.js → collection-search-DPsn3CXI.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-ClFZOmuM.js → collection-table-wrapper-V4lSNzMe.js} +1 -1
- package/dist/client/assets/{collection-tabs-Bkk1_mfm.js → collection-tabs-yGaibPbt.js} +1 -1
- package/dist/client/assets/{column-rules-DSDPtHpm.js → column-rules-w5dI6MiR.js} +1 -1
- package/dist/client/assets/{combobox-CShUh4PQ.js → combobox-BiNAlC0P.js} +1 -1
- package/dist/client/assets/{command-nVyplWK_.js → command-BTi6xeFr.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-kC08wD54.js → companion-mcps-section-CeXtyAjb.js} +1 -1
- package/dist/client/assets/{config-0BiCejtE.js → config-kzOWzcVE.js} +1 -1
- package/dist/client/assets/{connect-BBeQU_EJ.js → connect-D9ikDmaj.js} +1 -1
- package/dist/client/assets/{connect-layout-Bwx9aBPg.js → connect-layout-CTahsp5z.js} +1 -1
- package/dist/client/assets/{connection-A7b7D2VS.js → connection-D9I74S7M.js} +1 -1
- package/dist/client/assets/{connection-card-DE57XYjn.js → connection-card-CJQIw_Nv.js} +1 -1
- package/dist/client/assets/{connection-detail-BTLWRKbY.js → connection-detail-pgMuX5Oz.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DtAJchwc.js → connection-form-helpers-B-LWzl1k.js} +1 -1
- package/dist/client/assets/{connections-DrngcRP8.js → connections-DieTcSBX.js} +1 -1
- package/dist/client/assets/{context-DaL6xhih.js → context-DFJUTjoL.js} +1 -1
- package/dist/client/assets/{context-menu-BJwy_nFH.js → context-menu-D1ZZXqJA.js} +1 -1
- package/dist/client/assets/{core.esm-DDBCWV0w.js → core.esm-Dv_8c6_R.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DB9rEtrK.js → create-organization-dialog-Creof6Q6.js} +1 -1
- package/dist/client/assets/{daily-pulse-CJrJLexW.js → daily-pulse-C1iRL0DP.js} +1 -1
- package/dist/client/assets/{device-hint-CvaTEhNc.js → device-hint-D6o0ZAXt.js} +1 -1
- package/dist/client/assets/{discover-Dw08zcmB.js → discover-CePAnyrm.js} +1 -1
- package/dist/client/assets/{domain-settings-B0_IxtF3.js → domain-settings-D6QuHIIo.js} +1 -1
- package/dist/client/assets/{drawer-DcBsCtJm.js → drawer-BteL4_b8.js} +1 -1
- package/dist/client/assets/{editor-BM9Si7NB.js → editor-DXs48n4m.js} +1 -1
- package/dist/client/assets/{empty-state-DLkkLJux.js → empty-state-DVOe8f0v.js} +1 -1
- package/dist/client/assets/{empty-state-C3RzST0N.js → empty-state-nxvSNmCo.js} +1 -1
- package/dist/client/assets/{extract-connection-data-oAa1fXR4.js → extract-connection-data-C4LE3XP1.js} +1 -1
- package/dist/client/assets/{feature-gate-r-cIsb_9.js → feature-gate-D5cs36pg.js} +1 -1
- package/dist/client/assets/{feature-paywall-nMZG76Hu.js → feature-paywall-Bav9eu3-.js} +1 -1
- package/dist/client/assets/{file-explorer-Bom54db-.js → file-explorer-BxD_Van3.js} +1 -1
- package/dist/client/assets/{file-preview-CALjnZBa.js → file-preview--UotbnAp.js} +1 -1
- package/dist/client/assets/{file-share-button-CJ6c6rH7.js → file-share-button-DfSOzwKL.js} +1 -1
- package/dist/client/assets/{file-type-icon-DUTtkOfJ.js → file-type-icon-BdgYZI0o.js} +1 -1
- package/dist/client/assets/flat-project-DECVe2Af.js +1 -0
- package/dist/client/assets/{folder-icon-BpHYuhb6.js → folder-icon-DPpHsFKf.js} +1 -1
- package/dist/client/assets/{form-D6G00z5h.js → form-D1MBRr1a.js} +1 -1
- package/dist/client/assets/{general-B7xvTz9V.js → general-s5vFb1AW.js} +1 -1
- package/dist/client/assets/{home-PELUmr4H.js → home-zkRu3m0Z.js} +1 -1
- package/dist/client/assets/{icon-button-DGINqU7U.js → icon-button-Be2OFfn9.js} +1 -1
- package/dist/client/assets/{index-Bq_h7Umn.js → index-BWAlpkwu.js} +2 -2
- package/dist/client/assets/{index-TQwnj3sP.js → index-BZmo2tt3.js} +1 -1
- package/dist/client/assets/{index-yMyEaAzH.js → index-BarLJujz.js} +1 -1
- package/dist/client/assets/{index-45BC-IUR.js → index-CYZBRz3B.js} +1 -1
- package/dist/client/assets/{index-BJiAXB1x.js → index-CpwRaMGG.js} +1 -1
- package/dist/client/assets/{index-CakTkyAW.js → index-Cu0cR7bc.js} +3 -3
- package/dist/client/assets/{index-BqudK4-L.js → index-DCl7JFhF.js} +1 -1
- package/dist/client/assets/{index-BOHdm5fb.js → index-DQfpFSGJ.js} +1 -1
- package/dist/client/assets/{index-CkoPmvjx.js → index-DZ-4XlyB.js} +1 -1
- package/dist/client/assets/{index-DdQUASg3.js → index-DaIZzrp6.js} +1 -1
- package/dist/client/assets/{index-DdOq1jSd.js → index-DphH3SH1.js} +1 -1
- package/dist/client/assets/{index-BuDhwSVB.js → index-U_vV9Req.js} +1 -1
- package/dist/client/assets/{index-mX8QUf9o.js → index-nGorqSn2.js} +1 -1
- package/dist/client/assets/{index-redirect-DNi4zMfa.js → index-redirect-BUhiGPCW.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BGAJA7Os.js → infiniteQueryObserver-MzzHKvZc.js} +1 -1
- package/dist/client/assets/{infra-billing-CbbmB2V7.js → infra-billing-iMOaTHaE.js} +1 -1
- package/dist/client/assets/{input-BKhewuuN.js → input-B36YHfuk.js} +1 -1
- package/dist/client/assets/{input-Box_WV2_.js → input-Dxjz6HLl.js} +3 -3
- package/dist/client/assets/{integration-icon-DhOhrv7U.js → integration-icon-COlVJ6Ap.js} +1 -1
- package/dist/client/assets/{jira-icon-i4VUNyiL.js → jira-icon-C99q-eqp.js} +1 -1
- package/dist/client/assets/{label-CsAQzNfl.js → label-DxzpCGxy.js} +1 -1
- package/dist/client/assets/{layout-CkHYkU9R.js → layout-BPEjMWyv.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-C98RQKXI.js → legacy-agents-deep-D22i61GY.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BIgyJ_Rn.js → legacy-main-redirect-Bd1f4-s6.js} +1 -1
- package/dist/client/assets/library-BzWAyYdS.js +1 -0
- package/dist/client/assets/{library-tab-BPP4xFsL.js → library-tab-BwMklNG7.js} +1 -1
- package/dist/client/assets/{login-C9xo8gC-.js → login-Cg-H_746.js} +1 -1
- package/dist/client/assets/{markdown-Clwy6_tr.js → markdown-CIDKXAe3.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DArMX47N.js → mcp-app-renderer-C_aV5_pO.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Cea99ANT.js → mcp-oauth-IMvvQmc3.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CbvlD5SX.js → mcp-oauth-nWbzfbZw.js} +1 -1
- package/dist/client/assets/{members-wctf2Ubi.js → members-Z99D6BSC.js} +1 -1
- package/dist/client/assets/{memory-Jt-lr6yw.js → memory-BzR5MfaH.js} +1 -1
- package/dist/client/assets/{mini-report-page-B13wqcgl.js → mini-report-page-J0RaSepS.js} +1 -1
- package/dist/client/assets/{mock-board-B5RdDxLI.js → mock-board-CnMocWT0.js} +1 -1
- package/dist/client/assets/{monaco-editor-dtwnOmjA.js → monaco-editor-DKDSZsxq.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DYDDyWu-.js → monitoring-stats-row-_d1_Xm5C.js} +1 -1
- package/dist/client/assets/{multi-select-DdSpqudi.js → multi-select-C4Opj1Hx.js} +1 -1
- package/dist/client/assets/{mustache-CX4MpdBX.js → mustache-DpS2EmOz.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BGypGobH.js → new-project-dialog-Cqc94Xrg.js} +1 -1
- package/dist/client/assets/{oauth-callback-kqzCIobn.js → oauth-callback-BvnuYowV.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DWrRnAQa.js → oauth-callback-ai-provider-DoVXzlg4.js} +1 -1
- package/dist/client/assets/{onboarding-CcYfi8WI.js → onboarding-BxKrIDfZ.js} +1 -1
- package/dist/client/assets/{openai-conversation-DhlBv8-E.js → openai-conversation-D_WargBp.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-zum4YfIs.js → optimistic-project-sidebar-views-C72D-T6C.js} +1 -1
- package/dist/client/assets/{organization-choice-BfiXSZG8.js → organization-choice-CkZFZuI5.js} +1 -1
- package/dist/client/assets/{orgs-B5gFQq1F.js → orgs-BkyRjXec.js} +1 -1
- package/dist/client/assets/{page-seo-form-JFwiZIT0.js → page-seo-form-V0XVwdbM.js} +1 -1
- package/dist/client/assets/{pair-BGz-xvRt.js → pair-DArsz9tT.js} +1 -1
- package/dist/client/assets/{plan-ladder-B7BcLgoM.js → plan-ladder-HvyjB5S9.js} +1 -1
- package/dist/client/assets/{popover-SThjTKkw.js → popover-DiRh2ZE6.js} +1 -1
- package/dist/client/assets/{post-calendar-D2ZuozAK.js → post-calendar-DZPRF1Fw.js} +1 -1
- package/dist/client/assets/{post-editor-C5YzMvlA.js → post-editor-Rq8bfJrk.js} +1 -1
- package/dist/client/assets/{preview-content-D4UMh6Mw.js → preview-content-BBDqb8iV.js} +1 -1
- package/dist/client/assets/{preview-dialog-CNlppihz.js → preview-dialog-B05ZYzPt.js} +1 -1
- package/dist/client/assets/{preview-panel-D1c2tSFa.js → preview-panel-C0Z5Xpkr.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-Bg_wRS27.js → product-picker-dialog-B3zoX2p7.js} +1 -1
- package/dist/client/assets/{profile-BgOQ9aAb.js → profile-D0KJYGbH.js} +1 -1
- package/dist/client/assets/{project-app-view-4rqXbkzF.js → project-app-view-DnyrcgvT.js} +1 -1
- package/dist/client/assets/{project-feed-B9W-92Dz.js → project-feed-B1V1oVqF.js} +1 -1
- package/dist/client/assets/{project-icon-CIwLSfgH.js → project-icon-CERkoZt2.js} +1 -1
- package/dist/client/assets/project-reports-ClPCzaR7.js +1 -0
- package/dist/client/assets/project-tasks-D6PlNqPf.js +1 -0
- package/dist/client/assets/{projects-CTer1OmE.js → projects-BjpwoYcB.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Bdm7hEu4.js → projects-empty-state-mw_x5s3z.js} +1 -1
- package/dist/client/assets/{prompts-BVzWI9A2.js → prompts-ws24GjVu.js} +1 -1
- package/dist/client/assets/record-editor-BM2bfocU.js +1 -0
- package/dist/client/assets/redirect-editor-8f6pOi1q.js +1 -0
- package/dist/client/assets/{reports-DD5cz_RA.js → reports-9nAIioaC.js} +1 -1
- package/dist/client/assets/reports-efTLNI8J.js +1 -0
- package/dist/client/assets/{reports-onboarding-BsU9VGgp.js → reports-onboarding-CQX2_wNC.js} +1 -1
- package/dist/client/assets/{reports-tab-Csnk5c_k.js → reports-tab-CTElJmji.js} +2 -2
- package/dist/client/assets/{repositories-CpvdMs7E.js → repositories-BNfy6lS5.js} +1 -1
- package/dist/client/assets/{repository-binding-BRtfh-B2.js → repository-binding-BkAj46q1.js} +1 -1
- package/dist/client/assets/{repository-import-picker-BHmiPnBI.js → repository-import-picker-D222lJkc.js} +1 -1
- package/dist/client/assets/{repository-picker-DvE9EG8b.js → repository-picker-BgLHJAB7.js} +1 -1
- package/dist/client/assets/{require-capability-CPXwUBF0.js → require-capability-9g_2IlJC.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BndaENeT.js → required-auth-layout-C2W0Hmb4.js} +1 -1
- package/dist/client/assets/{reset-password-BS360IO6.js → reset-password-Bl7GenBs.js} +1 -1
- package/dist/client/assets/{resizable-DziF2F06.js → resizable-BeKhifo6.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DtE6yqkk.js → resolve-tab-icon-sCKE8Gcb.js} +1 -1
- package/dist/client/assets/{review-settings-C18UhQh3.js → review-settings-CK8XpKJr.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-DzTRiuLD.js → rich-text-link-control-DFO6A-Xy.js} +1 -1
- package/dist/client/assets/{roles-D2MdIBra.js → roles-BE5NOOrK.js} +1 -1
- package/dist/client/assets/route-ByrWDzCb.js +1 -0
- package/dist/client/assets/{route-DBgBZrOb.js → route-DP_WtFkJ.js} +1 -1
- package/dist/client/assets/{route-Dixxnj33.js → route-g1ppf9aO.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-CIGu38ky.js → runnable-block-editor-D7D4bcP5.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CPCgb-_w.js → sandbox-lifecycle-context-DwZumXpN.js} +1 -1
- package/dist/client/assets/{schema-Du_TtumO.js → schema-SVXt4E6H.js} +1 -1
- package/dist/client/assets/{scroll-area-ms-tTzk1.js → scroll-area-DC2prxTD.js} +1 -1
- package/dist/client/assets/{search-input-39xhlSYx.js → search-input-DpIQ019n.js} +1 -1
- package/dist/client/assets/{search-toggle-CSuLKQ_Y.js → search-toggle-DQlNqONe.js} +1 -1
- package/dist/client/assets/{secret-picker-CZCX6GO5.js → secret-picker-BVqoJ9wg.js} +1 -1
- package/dist/client/assets/{secrets-CdI8V4V2.js → secrets-jX83QUBm.js} +1 -1
- package/dist/client/assets/{sections-editor-DMeqz1oV.js → sections-editor-D06mA4CH.js} +1 -1
- package/dist/client/assets/{select-JLYSksJb.js → select-5QkF-ydf.js} +1 -1
- package/dist/client/assets/{select-model-DKQUaD4e.js → select-model-BPJLgnED.js} +1 -1
- package/dist/client/assets/{seo-editor-DsYvsfFz.js → seo-editor-BIs-FzOM.js} +1 -1
- package/dist/client/assets/{separator-BmovFMP1.js → separator-CwKe-sT_.js} +1 -1
- package/dist/client/assets/{settings-tab-txXR_zUN.js → settings-tab-BryWi3Fl.js} +1 -1
- package/dist/client/assets/{sheet-Jvnn431v.js → sheet-Ccw9R6E9.js} +1 -1
- package/dist/client/assets/{shell-layout-CJgfswow.js → shell-layout-CmyoqizW.js} +1 -1
- package/dist/client/assets/{skills-DYFaqavF.js → skills-DWOJiWbw.js} +1 -1
- package/dist/client/assets/{slider-Bdt_gbvO.js → slider-BhZMOdIj.js} +1 -1
- package/dist/client/assets/{sortable.esm-Cj9zcuDX.js → sortable.esm-CTrrb9k2.js} +1 -1
- package/dist/client/assets/{sso-BGnGFz0u.js → sso-BbaZR3ST.js} +1 -1
- package/dist/client/assets/{suggestion-QLaiiEa4.js → suggestion-DN6ve0Z-.js} +1 -1
- package/dist/client/assets/{switch-Cr9OdHZR.js → switch-BcjqQ0Bd.js} +1 -1
- package/dist/client/assets/{symbol-6XkBontZ.js → symbol-Anjb0I8w.js} +1 -1
- package/dist/client/assets/{synced-repos-nPJinKKB.js → synced-repos-omp4l-Qh.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-D-ycwvR2.js → tab-icon-glyph-DJKeBMtp.js} +1 -1
- package/dist/client/assets/{table-Cri4Xg02.js → table-zpHK9BMQ.js} +1 -1
- package/dist/client/assets/{tabs-D4q7kwbr.js → tabs-BbVh-GPF.js} +1 -1
- package/dist/client/assets/{task-board-tSRaoKqm.js → task-board-CuPrIMXJ.js} +1 -1
- package/dist/client/assets/{task-route-ZhU1PK_V.js → task-route-Be5gAj81.js} +1 -1
- package/dist/client/assets/{task-status-BbeX0x8L.js → task-status-BF84kVgv.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BACyQaw4.js +1 -0
- package/dist/client/assets/{tasks-Byrbraao.js → tasks-Cg2ediCg.js} +1 -1
- package/dist/client/assets/tasks-DbSw5iLI.js +1 -0
- package/dist/client/assets/{textarea-Dl_dkdBZ.js → textarea-CU3yT73Z.js} +1 -1
- package/dist/client/assets/{thread-analytics-CXh2lNz9.js → thread-analytics-CL66KEgk.js} +1 -1
- package/dist/client/assets/{thread-button-DXyx_ks_.js → thread-button-BicBi2YW.js} +1 -1
- package/dist/client/assets/{thread-intent-D_WXT-Pe.js → thread-intent-qsgT0v7g.js} +1 -1
- package/dist/client/assets/{thread-route-VI83l3tU.js → thread-route-Bvc86kB8.js} +1 -1
- package/dist/client/assets/{thread-route-CUc8muIW.js → thread-route-VcdZ-yo1.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-jfLPV_BJ.js → thread-sheet-body-CPBxYYyX.js} +1 -1
- package/dist/client/assets/{time-range-picker-D6_PeFy6.js → time-range-picker-BiZZSuW7.js} +1 -1
- package/dist/client/assets/{toggle-group-CMzFoK81.js → toggle-group-mviOe0_V.js} +1 -1
- package/dist/client/assets/{tool-namespace-CBl6r41H.js → tool-namespace-Cm6DqXGb.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-4Lwb9IsI.js → toolbar-icon-button-CT832dEu.js} +1 -1
- package/dist/client/assets/{tooltip-BwGAQHGK.js → tooltip-DgqSmkd3.js} +1 -1
- package/dist/client/assets/{tooltipContext-Dg_1ywjo.js → tooltipContext-CWoJ1tLJ.js} +1 -1
- package/dist/client/assets/{track-DRV0x9iD.js → track-Bsbqp3Hn.js} +1 -1
- package/dist/client/assets/{types-CyBvFRGE.js → types-ZkHG882G.js} +1 -1
- package/dist/client/assets/{url-slug-DGtQ7HWv.js → url-slug-Bn0tWo1u.js} +1 -1
- package/dist/client/assets/{usage-stats-BzAa1e6J.js → usage-stats-CwHrFrwm.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Dzg7qOBB.js → use-ai-providers-Dw5yZbHU.js} +1 -1
- package/dist/client/assets/{use-automations-BmndfAFz.js → use-automations-DGkz1D1I.js} +1 -1
- package/dist/client/assets/{use-autosave-dIExvC1c.js → use-autosave-CRooFXam.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-Cu5VHCdn.js → use-chat-layout-state-Aoi0ufu4.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-Dq4AID7c.js → use-chat-navigation-D7AQRSfw.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CVfWS6yM.js → use-clock-tick-DFaAt8jb.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B8sGfDXf.js → use-connect-companion-ZHdRjz9u.js} +1 -1
- package/dist/client/assets/{use-connection-BOUIPY6t.js → use-connection-CEXahlIk.js} +1 -1
- package/dist/client/assets/{use-copy-Dvf6c8uG.js → use-copy-DapieTwf.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DSn6yk0N.js → use-create-virtual-mcp-CjHeuHjz.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CgGcC6Az.js → use-date-fns-locale-BIu5umci.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CE2-QUqa.js → use-debounced-autosave-uZ7zbYGC.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BzsL07qR.js → use-debounced-value-D6NhrevJ.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DkF5SY_h.js → use-deco-credits-BZuYHeV1.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Blhc-ndU.js → use-decopilot-events-Cq_vCUrM.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CYF8pz_F.js → use-delete-connection-gUL1t4_0.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CLpFZG4D.js → use-deployment-admin-BtZ93ofY.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-BOYyvWFQ.js → use-ensure-project-folder-FLO8zvA3.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CIyiUthR.js → use-fast-preview-draft-url-G0OtfyDx.js} +1 -1
- package/dist/client/assets/{use-file-configs-96Lf4lzD.js → use-file-configs-6DIvP8tn.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Dm8NTnoo.js → use-infinite-scroll-DeMwG1OG.js} +1 -1
- package/dist/client/assets/{use-join-requests-Cknb7py1.js → use-join-requests-DmvTad5Q.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BgFjt2aK.js → use-main-panel-tabs-BtpwyvjF.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Y0skDQ3v.js → use-mcp-auth-status-CCBaD_t7.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CNAsaI5e.js → use-mcp-client-Qoi044ys.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CmgQ14fY.js → use-mcp-prompts-BMgpvY14.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-UtYane4F.js → use-mcp-tools-BlaP_xtx.js} +1 -1
- package/dist/client/assets/{use-members-BgejpANd.js → use-members-ENr1twTa.js} +1 -1
- package/dist/client/assets/{use-mobile-DnCFkPJO.js → use-mobile-CwSfPydP.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B0zcOk2z.js → use-navigate-to-agent-D1F3bZCL.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-D2VBaOY7.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CKWus2xS.js → use-open-billing-url-BoRkSQlB.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CD-nyV-c.js → use-org-auth-client-BsOQBY-k.js} +1 -1
- package/dist/client/assets/{use-org-fs-DLNWZCr_.js → use-org-fs-CVJeIAyC.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DJwlGK__.js → use-org-repo-syncs-DxrCYoIn.js} +1 -1
- package/dist/client/assets/{use-org-sso-CRxV8p8t.js → use-org-sso-Ddt7V8xj.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BfBFRRgX.js → use-organization-roles-D9xxQxFR.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BNn0Gqay.js → use-organization-settings-BbR_CXXI.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DwB1wmJM.js → use-panel-navigate-DKoLfagd.js} +1 -1
- package/dist/client/assets/{use-project-scope-4_AOQZp8.js → use-project-scope-B9BJjHwp.js} +1 -1
- package/dist/client/assets/{use-releases-Cx-VnR2N.js → use-releases-JESV1CSi.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CsqGKGh6.js → use-reports-diagnostic-xu7ZUmZP.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CSD-klwz.js → use-sandbox-events-CZCsW2q8.js} +1 -1
- package/dist/client/assets/{use-secrets-DXbIcS8Z.js → use-secrets-Jwfb7jmE.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BvT5dwZ-.js → use-section-preview-base-Dd1LZgFO.js} +1 -1
- package/dist/client/assets/{use-tags-jhKYOldy.js → use-tags-BaR2yuSY.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-3nTgrvPC.js → use-task-board-analytics-JumBGEbJ.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CqrXYzkU.js → use-task-board-events-DJcOVtd5.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-Dd1q_l-B.js → use-task-board-item-prs-CRO34NDT.js} +1 -1
- package/dist/client/assets/{use-task-board-items-C75zoD0D.js → use-task-board-items-CgMDPdKH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DdlcIqCj.js → use-task-metadata-CZKhUiWq.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DCMrsmOZ.js → use-thread-analytics-BwMzDnad.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CvH5Vmni.js → use-thread-outputs-CINM0_Ec.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C1KwH6U-.js +1 -0
- package/dist/client/assets/{useQueries-Tky8WmoX.js → useQueries-B0oo9pOn.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BhqW4802.js +1 -0
- package/dist/client/assets/{users-CVCcRfbM.js → users-bQzZTP34.js} +1 -1
- package/dist/client/assets/{utils-BOsIAs_e.js → utils-BQ82PIjq.js} +1 -1
- package/dist/client/assets/{variant-calendar-Dk9EVqWx.js → variant-calendar-DeFFVX92.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BpPqjUGk.js → variant-matcher-override-DoZRlwTe.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Dl2euStK.js → view-mode-toggle-ClN4sSDy.js} +1 -1
- package/dist/client/assets/{virtual-mcp-5EzMLO01.js → virtual-mcp-Dx4LWaPY.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CMD7Z7qL.js → watch-sse-pool-jiotiysJ.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/agent-app-OaxZqeD_.js +0 -1
- package/dist/client/assets/agent-deck-B2nYR7Dm.js +0 -1
- package/dist/client/assets/agent-library-BOKehDWH.js +0 -1
- package/dist/client/assets/agent-library-file-bZx6dPQZ.js +0 -1
- package/dist/client/assets/agent-settings-C9O5P6Ac.js +0 -1
- package/dist/client/assets/agent-site-editor-code-B6YFKzJn.js +0 -2
- package/dist/client/assets/agent-view-B5RueEsw.js +0 -1
- package/dist/client/assets/api-keys-DBSJuVWB.js +0 -1
- package/dist/client/assets/app-editor-pad2zBVL.js +0 -1
- package/dist/client/assets/flat-project-D87vZYtU.js +0 -1
- package/dist/client/assets/library-DFMSzKbO.js +0 -1
- package/dist/client/assets/project-reports-RELkMoLG.js +0 -1
- package/dist/client/assets/project-tasks-DNjdwI1k.js +0 -1
- package/dist/client/assets/record-editor-CJO9Opqj.js +0 -1
- package/dist/client/assets/redirect-editor-CU0aYdIn.js +0 -1
- package/dist/client/assets/reports-BAz1tWvD.js +0 -1
- package/dist/client/assets/route-IAz4JGQ1.js +0 -1
- package/dist/client/assets/taskboard-analytics-BBPxyOfm.js +0 -1
- package/dist/client/assets/tasks-BJbNG40I.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-67BT0BD6.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Dv-XATwg.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C_E-uilI.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-
|
|
2
|
-
import{r as v,aD as Pt,aW as Ye,aE as je,c as fe,b as Te,j as s,q as qn,D as Wn,K as Vs,s as Gn,v as Jn,e as qs,h as St,I as jn,B as He,w as Ws,a6 as Yn,aX as Gs,a2 as Xt,aY as Js,aV as Ys,a0 as En,a1 as Nn,l as zt,P as Tn,y as Qs,t as Cn}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-D06mA4CH.js","assets/index-BWAlpkwu.js","assets/index-D7k-FSss.css","assets/chat-context-CrQzXlfA.js","assets/use-panel-navigate-DKoLfagd.js","assets/thread-route-VcdZ-yo1.js","assets/use-project-scope-B9BJjHwp.js","assets/repository-binding-BkAj46q1.js","assets/use-mcp-client-Qoi044ys.js","assets/auth-BE-jkdby.js","assets/autosend-DoPX3ID2.js","assets/thread-intent-qsgT0v7g.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-jiotiysJ.js","assets/task-board-CuPrIMXJ.js","assets/schema-SVXt4E6H.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-Cq_vCUrM.js","assets/use-ai-providers-Dw5yZbHU.js","assets/use-chat-navigation-D7AQRSfw.js","assets/location-BjlyegC2.js","assets/use-organization-settings-BbR_CXXI.js","assets/use-new-blocks-editor-D2VBaOY7.js","assets/runnable-block-editor-D7D4bcP5.js","assets/input-Dxjz6HLl.js","assets/usage-stats-CwHrFrwm.js","assets/tool-namespace-Cm6DqXGb.js","assets/form-D1MBRr1a.js","assets/label-DxzpCGxy.js","assets/utils-CVEq3hMx.js","assets/markdown-CIDKXAe3.js","assets/use-copy-DapieTwf.js","assets/Copy01-JxasDo0Y.js","assets/ZoomOut-RInN96sm.js","assets/use-mobile-CwSfPydP.js","assets/tooltip-DgqSmkd3.js","assets/index-DphH3SH1.js","assets/agent-icon-DtuRgBXt.js","assets/AlertCircle-Bz95IA1L.js","assets/Tool01-G_7e_fu0.js","assets/ArrowUp-W9fOJYtW.js","assets/ArrowLeft-B5K5-flN.js","assets/LinkBroken01-DeBiMAX8.js","assets/ShoppingBag01-DVzEvqIf.js","assets/Building02-DH0ShiKs.js","assets/CheckCircle-CvrX7p0-.js","assets/ChevronUp-BF5A1_bk.js","assets/ChevronSelectorVertical-DCbswHDn.js","assets/UserSquare-D3rxt1fW.js","assets/CreditCard01-zruO6RR6.js","assets/DotsVertical-IlcVf06d.js","assets/Image01-Bt6ZIkX1.js","assets/Globe04-DRKGVBCX.js","assets/SwitchHorizontal01-DWzDEU-3.js","assets/Key01-DBTFQIL_.js","assets/Link01-Da5EfBPU.js","assets/Monitor01-8fVRFSue.js","assets/Sun-BBJ4xAcN.js","assets/Play-auont4T3.js","assets/Plus-B-IfeegN.js","assets/SearchMd-BHEy3hgp.js","assets/Trash01-DsUZfXDb.js","assets/Upload01-CQ46KAYz.js","assets/User01-P3sVVPbl.js","assets/Users01-C3X5KgEC.js","assets/XClose-wS5BxV-4.js","assets/format-time-CjIPQhCN.js","assets/differenceInSeconds-C3x8sHUj.js","assets/icon-button-Be2OFfn9.js","assets/file-type-icon-BdgYZI0o.js","assets/shell-layout-CmyoqizW.js","assets/avatar-Bq6TAAFW.js","assets/use-clock-tick-DFaAt8jb.js","assets/command-BTi6xeFr.js","assets/index-U_vV9Req.js","assets/integration-icon-COlVJ6Ap.js","assets/project-icon-CERkoZt2.js","assets/new-project-dialog-Cqc94Xrg.js","assets/repository-import-picker-D222lJkc.js","assets/use-navigate-to-agent-D1F3bZCL.js","assets/repository-picker-BgLHJAB7.js","assets/useInfiniteQuery-C1KwH6U-.js","assets/infiniteQueryObserver-MzzHKvZc.js","assets/collection-search-DPsn3CXI.js","assets/use-debounced-value-D6NhrevJ.js","assets/required-auth-layout-C2W0Hmb4.js","assets/use-org-sso-Ddt7V8xj.js","assets/shell-layout-CE2Eihra.css","assets/chat-draft-Dt0YxfIm.js","assets/select-5QkF-ydf.js","assets/index-BdQq_4o_.js","assets/tabs-BbVh-GPF.js","assets/use-deco-credits-BZuYHeV1.js","assets/toggle-group-mviOe0_V.js","assets/use-open-billing-url-BoRkSQlB.js","assets/index-nGorqSn2.js","assets/checkbox-BDf-RH4K.js","assets/ai-providers-logos-DD3qZ33J.js","assets/popover-DiRh2ZE6.js","assets/drawer-BteL4_b8.js","assets/input-B36YHfuk.js","assets/suggestion-DN6ve0Z-.js","assets/use-chat-layout-state-Aoi0ufu4.js","assets/use-file-configs-6DIvP8tn.js","assets/site-slug-DebpOoQq.js","assets/use-mcp-prompts-BMgpvY14.js","assets/use-org-fs-CVJeIAyC.js","assets/question-004-sINsf4GQ.js","assets/use-members-ENr1twTa.js","assets/use-org-auth-client-BsOQBY-k.js","assets/feature-paywall-Bav9eu3-.js","assets/plan-ladder-HvyjB5S9.js","assets/add-connection-dialog-CuTrOuMt.js","assets/extract-connection-data-C4LE3XP1.js","assets/metadata-D72DunRR.js","assets/connection-D9I74S7M.js","assets/url-slug-Bn0tWo1u.js","assets/connection-card-CJQIw_Nv.js","assets/connection-slug-CITJ0kGN.js","assets/textarea-CU3yT73Z.js","assets/use-connection-CEXahlIk.js","assets/connection-form-helpers-B-LWzl1k.js","assets/authenticate-and-persist-oauth-6gcBpEYE.js","assets/mcp-oauth-nWbzfbZw.js","assets/mcp-oauth-IMvvQmc3.js","assets/collection-tabs-yGaibPbt.js","assets/badge-DdyoasWI.js","assets/use-infinite-scroll-DeMwG1OG.js","assets/useSuspenseInfiniteQuery-BhqW4802.js","assets/use-task-board-events-DJcOVtd5.js","assets/input-Bwd_JSM8.css","assets/claim-phase-copy-DzqqNAQK.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-DArsz9tT.js","assets/collapsible-BxK4deT6.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-C_aV5_pO.js","assets/types-ZkHG882G.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/sheet-Ccw9R6E9.js","assets/use-thread-outputs-CINM0_Ec.js","assets/utils-BQ82PIjq.js","assets/scroll-area-DC2prxTD.js","assets/monaco-editor-DKDSZsxq.js","assets/editor-DXs48n4m.js","assets/calendar-CKjCUK4z.js","assets/rich-text-link-control-DFO6A-Xy.js","assets/switch-BcjqQ0Bd.js","assets/core.esm-Dv_8c6_R.js","assets/sortable.esm-CTrrb9k2.js","assets/view-mode-toggle-ClN4sSDy.js","assets/combobox-BiNAlC0P.js","assets/alert-dialog-BXQXu_hy.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-DpIQ019n.js","assets/asset-utils-D7XXIUcy.js","assets/sandbox-git-api-C7JbVL7R.js","assets/mustache-DpS2EmOz.js","assets/page-seo-form-V0XVwdbM.js","assets/use-section-preview-base-Dd1LZgFO.js","assets/section-preview-url-7zfngvgW.js","assets/variant-matcher-override-DoZRlwTe.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as v,aD as Pt,aW as Ye,aE as je,c as fe,b as Te,j as s,q as qn,D as Wn,K as Vs,s as Gn,v as Jn,e as qs,h as St,I as jn,B as He,w as Ws,a6 as Yn,aX as Gs,a2 as Xt,aY as Js,aV as Ys,a0 as En,a1 as Nn,l as zt,P as Tn,y as Qs,t as Cn}from"./index-BWAlpkwu.js";import{A as Xs}from"./agent-view-guard-4ZKaGH4G.js";import{F as Zs}from"./feature-gate-D5cs36pg.js";import{a as er,b as jt,r as Qn,l as Xn,f as tr,w as nr}from"./chat-context-CrQzXlfA.js";import{t as sr}from"./ChevronUp-BF5A1_bk.js";import{I as Zn,R as rr,S as ar,d as ir,T as or,U as lr,V as cr,W as dr,X as Rn,K as ur}from"./agent-icon-DtuRgBXt.js";import{a as mr}from"./UserSquare-D3rxt1fW.js";import{s as fr}from"./Plus-B-IfeegN.js";import{P as pr,a as hr,b as gr}from"./popover-DiRh2ZE6.js";import{e as at,b as it,c as es,f as ts,C as ns,a as ss}from"./command-BTi6xeFr.js";import{c as vr,a as br}from"./repository-binding-BkAj46q1.js";import{b as Zt}from"./sandbox-lifecycle-context-DwZumXpN.js";import{e as xr}from"./backoff-CrEUbyZT.js";import{f as yr}from"./thread-intent-qsgT0v7g.js";import{a as rs}from"./input-Dxjz6HLl.js";import{N as wr,c as kr,s as ot,n as en,d as as,f as Fe,v as is,h as Pr,u as Sr,j as jr,k as Er,l as Nr,m as Tr,o as Ln}from"./claim-phase-copy-DzqqNAQK.js";import{u as Cr}from"./use-mobile-CwSfPydP.js";import{b as It,T as Ut,a as Ht}from"./tooltip-DgqSmkd3.js";import{T as tt}from"./toolbar-icon-button-CT832dEu.js";import{b as Rr,a as Lr,u as os,g as Or,c as _r,B as Vt,P as Ar,r as Br,R as $r,d as Fr,e as tn,f as ls,h as Mr,i as Dr,j as Kr,l as zr,m as Ir,p as Ur,k as Hr,S as qt}from"./runnable-block-editor-D7D4bcP5.js";import{w as bt,i as Vr}from"./variant-matcher-override-DoZRlwTe.js";import{r as qr,w as Wr,D as Gr,b as On,a as Jr}from"./section-preview-url-7zfngvgW.js";import{u as Yr}from"./use-fast-preview-draft-url-G0OtfyDx.js";import{u as Qr,w as _n}from"./device-hint-D6o0ZAXt.js";import{a as Xr,c as cs}from"./shell-layout-CmyoqizW.js";import{u as ds,b as Zr}from"./use-sandbox-events-CZCsW2q8.js";import{u as Jt}from"./useQueries-B0oo9pOn.js";import{i as ea}from"./LinkBroken01-DeBiMAX8.js";import{u as us}from"./blocks-preview-workspace-context-CcflmcEy.js";import{i as ta}from"./AlertCircle-Bz95IA1L.js";import{E as nn}from"./empty-state-DVOe8f0v.js";import{M as na}from"./monaco-editor-DKDSZsxq.js";import{u as sa}from"./use-new-blocks-editor-D2VBaOY7.js";import{a as ra}from"./utils-BQ82PIjq.js";import{R as An,a as xt,b as Bn}from"./resizable-BeKhifo6.js";import{r as aa}from"./virtual-mcp-Dx4LWaPY.js";import{d as ia}from"./delay-CnY5UFtP.js";import{a as Wt}from"./use-chat-layout-state-Aoi0ufu4.js";import{G as $n}from"./repository-picker-BgLHJAB7.js";import{R as oa}from"./repository-import-picker-D222lJkc.js";import{r as la}from"./use-main-panel-tabs-BtpwyvjF.js";import{u as ca}from"./use-task-metadata-CZKhUiWq.js";import{b as da}from"./thread-route-VcdZ-yo1.js";import"./use-panel-navigate-DKoLfagd.js";import"./use-project-scope-B9BJjHwp.js";import"./feature-paywall-Bav9eu3-.js";import"./plan-ladder-HvyjB5S9.js";import"./use-decopilot-events-Cq_vCUrM.js";import"./watch-sse-pool-jiotiysJ.js";import"./task-board-CuPrIMXJ.js";import"./schema-SVXt4E6H.js";import"./autosend-DoPX3ID2.js";import"./use-mcp-client-Qoi044ys.js";import"./auth-BE-jkdby.js";import"./use-ai-providers-Dw5yZbHU.js";import"./use-chat-navigation-D7AQRSfw.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BbR_CXXI.js";import"./Tool01-G_7e_fu0.js";import"./ArrowUp-W9fOJYtW.js";import"./ArrowLeft-B5K5-flN.js";import"./ShoppingBag01-DVzEvqIf.js";import"./ZoomOut-RInN96sm.js";import"./Building02-DH0ShiKs.js";import"./CheckCircle-CvrX7p0-.js";import"./ChevronSelectorVertical-DCbswHDn.js";import"./Copy01-JxasDo0Y.js";import"./CreditCard01-zruO6RR6.js";import"./DotsVertical-IlcVf06d.js";import"./Image01-Bt6ZIkX1.js";import"./Globe04-DRKGVBCX.js";import"./SwitchHorizontal01-DWzDEU-3.js";import"./Key01-DBTFQIL_.js";import"./Link01-Da5EfBPU.js";import"./Monitor01-8fVRFSue.js";import"./Sun-BBJ4xAcN.js";import"./Play-auont4T3.js";import"./SearchMd-BHEy3hgp.js";import"./Trash01-DsUZfXDb.js";import"./Upload01-CQ46KAYz.js";import"./User01-P3sVVPbl.js";import"./Users01-C3X5KgEC.js";import"./XClose-wS5BxV-4.js";import"./index-U_vV9Req.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./usage-stats-CwHrFrwm.js";import"./tool-namespace-Cm6DqXGb.js";import"./form-D1MBRr1a.js";import"./label-DxzpCGxy.js";import"./utils-CVEq3hMx.js";import"./markdown-CIDKXAe3.js";import"./use-copy-DapieTwf.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-Be2OFfn9.js";import"./file-type-icon-BdgYZI0o.js";import"./chat-draft-Dt0YxfIm.js";import"./select-5QkF-ydf.js";import"./index-BdQq_4o_.js";import"./index-DphH3SH1.js";import"./tabs-BbVh-GPF.js";import"./use-deco-credits-BZuYHeV1.js";import"./toggle-group-mviOe0_V.js";import"./use-open-billing-url-BoRkSQlB.js";import"./index-nGorqSn2.js";import"./checkbox-BDf-RH4K.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-Bq6TAAFW.js";import"./drawer-BteL4_b8.js";import"./input-B36YHfuk.js";import"./suggestion-DN6ve0Z-.js";import"./use-mcp-prompts-BMgpvY14.js";import"./use-org-fs-CVJeIAyC.js";import"./useInfiniteQuery-C1KwH6U-.js";import"./infiniteQueryObserver-MzzHKvZc.js";import"./question-004-sINsf4GQ.js";import"./use-members-ENr1twTa.js";import"./use-org-auth-client-BsOQBY-k.js";import"./add-connection-dialog-CuTrOuMt.js";import"./collection-search-DPsn3CXI.js";import"./extract-connection-data-C4LE3XP1.js";import"./metadata-D72DunRR.js";import"./connection-D9I74S7M.js";import"./url-slug-Bn0tWo1u.js";import"./connection-card-CJQIw_Nv.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-COlVJ6Ap.js";import"./textarea-CU3yT73Z.js";import"./use-connection-CEXahlIk.js";import"./connection-form-helpers-B-LWzl1k.js";import"./authenticate-and-persist-oauth-6gcBpEYE.js";import"./mcp-oauth-nWbzfbZw.js";import"./mcp-oauth-IMvvQmc3.js";import"./collection-tabs-yGaibPbt.js";import"./badge-DdyoasWI.js";import"./use-infinite-scroll-DeMwG1OG.js";import"./useSuspenseInfiniteQuery-BhqW4802.js";import"./use-task-board-events-DJcOVtd5.js";import"./pair-DArsz9tT.js";import"./collapsible-BxK4deT6.js";import"./use-clock-tick-DFaAt8jb.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C_aV5_pO.js";import"./types-ZkHG882G.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-Ccw9R6E9.js";import"./use-navigate-to-agent-D1F3bZCL.js";import"./use-thread-outputs-CINM0_Ec.js";import"./scroll-area-DC2prxTD.js";import"./calendar-CKjCUK4z.js";import"./rich-text-link-control-DFO6A-Xy.js";import"./switch-BcjqQ0Bd.js";import"./core.esm-Dv_8c6_R.js";import"./sortable.esm-CTrrb9k2.js";import"./view-mode-toggle-ClN4sSDy.js";import"./combobox-BiNAlC0P.js";import"./alert-dialog-BXQXu_hy.js";import"./sandbox-url-D3mC8qhT.js";import"./search-input-DpIQ019n.js";import"./use-debounced-value-D6NhrevJ.js";import"./use-file-configs-6DIvP8tn.js";import"./asset-utils-D7XXIUcy.js";import"./sandbox-git-api-C7JbVL7R.js";import"./project-icon-CERkoZt2.js";import"./new-project-dialog-Cqc94Xrg.js";import"./required-auth-layout-C2W0Hmb4.js";import"./use-org-sso-Ddt7V8xj.js";import"./editor-DXs48n4m.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-tools-BlaP_xtx.js";import"./resolve-tab-icon-sCKE8Gcb.js";const ua={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function ma(t){const{previewState:e,progressStatus:n,fastPreviewActive:r=!1,fastPreviewReady:i=!1,codingSession:u=!1}=t,l=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?ua: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 fa=1e4,pa=1e3,ha=3e4;function ga({iframeRef:t,src:e,active:n}){const r=v.useRef(0),i=v.useRef(null),u=v.useRef(null),l=v.useRef(e),c=v.useRef(n);l.current=e,c.current=n;const o=()=>{i.current&&clearTimeout(i.current),u.current&&clearTimeout(u.current),i.current=null,u.current=null},d=()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null,h()},fa)},h=()=>{if(!c.current||!l.current)return;u.current&&clearTimeout(u.current);const E=xr(ha,pa,r.current,2,.5);r.current+=1,u.current=setTimeout(()=>{u.current=null;const b=t.current,P=l.current;!b||!P||!c.current||(b.src=P,d())},E)},m=()=>{r.current=0,o()},p=()=>{i.current&&(clearTimeout(i.current),i.current=null),h()};return v.useEffect(()=>{if(o(),r.current=0,!(!n||!e))return d(),o},[e,n]),{handleLoad:m,handleError:p}}const va=Pt({tag:je(),id:je(),classes:je(),text:je(),html:je(),manifestKey:je().nullable(),componentName:je().nullable(),parents:je(),url:je(),path:je(),viewport:Pt({width:Ye(),height:Ye()}),position:Pt({x:Ye(),y:Ye()})}),ba=`(function() {
|
|
3
3
|
if (window.__visualEditorActive) return;
|
|
4
4
|
window.__visualEditorActive = true;
|
|
5
5
|
|
|
@@ -515,4 +515,4 @@ import{r as v,aD as Pt,aW as Ye,aE as je,c as fe,b as Te,j as s,q as qn,D as Wn,
|
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
517
|
})();`;function Yt(t,e){let n=t,r=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let i=0;r&&i<5;i++){const u=e[r];if(u&&typeof u=="object"&&"__resolveType"in u){const l=u.__resolveType;if(typeof l=="string"&&l&&l!==r){n=u,r=l;continue}}break}if(!r)return[];if(r.includes("flags/multivariate")){const i=Array.isArray(n.variants)?n.variants:[];if(i.length===0||i.every(c=>c?.rule?.__resolveType===wr))return null;const l=[];for(const c of i){const o=c?.value;if(o&&typeof o=="object")for(const d of Yt(o,e)??[])l.includes(d)||l.push(d)}return l}if(kr(r)){const i=n.section&&typeof n.section=="object"?Yt(n.section,e):[];return i===null?null:i.length?[r,...i]:[r]}return[r]}function Je(t){return t.replace(/[`*_]/g,"\\$&")}function wa(t,e){const n=[`The user selected an element on the live preview and asked: **"${Je(e.trim())}"**`,"","For text content changes, locate the correct source file and apply the change.","For code and CSS changes, understand which component the user is referring to and apply changes to the correct component.",""];t.manifestKey&&n.push(`**Section resolveType:** \`${Je(t.manifestKey)}\``,"","This is a Deco resolveType, not a literal file path. The leading segment is the app name, not a directory — the actual source file lives under a sections directory whose root varies by site (commonly `sections/`, `src/sections/`, or `site/sections/`). Locate the file by searching for the trailing path (e.g. the component filename), don't assume the resolveType is a valid path on disk.","");const r=`<${t.tag}${t.classes?` class="${Je(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${r}\``),t.parents&&n.push(`**DOM breadcrumb:** ${Je(t.parents)} > ${t.tag}`),t.text&&n.push(`**Text content:** "${Je(t.text)}"`),t.componentName&&n.push(`**Component name:** ${Je(t.componentName)}`);const i=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",i,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
|
|
518
|
-
`)}function ka(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),m=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:m/o*100}}function Pa(t){const e=fe.c(45),{element:n,onDismiss:r}=t,[i,u]=v.useState(""),l=v.useRef(null),{sendMessage:c}=er(),{openSidePanel:o}=Xr(),d=Te();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const $=wa(n,i);o(),c({parts:[{type:"text",text:$}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const m=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=ka(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const E=p,b=`${E.leftPct}%`,P=`${E.topPct}%`;let g;e[9]!==b||e[10]!==P?(g={left:b,top:P,width:"320px"},e[9]=b,e[10]=P,e[11]=g):g=e[11];let j;e[12]!==m?(j=$=>{$.preventDefault(),m()},e[12]=m,e[13]=j):j=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=$=>u($.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=$=>{$.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let w;e[17]!==d?(w=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=w):w=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==w?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=w,e[22]=k):k=e[22];let x;e[23]!==i?(x=i.trim(),e[23]=i,e[24]=x):x=e[24];const B=!x;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let I;e[27]!==d?(I=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=I):I=e[28];let F;e[29]!==I?(F=s.jsx("title",{children:I}),e[29]=I,e[30]=F):F=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=M):M=e[31];let L;e[32]!==F?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[F,M]}),e[32]=F,e[33]=L):L=e[33];let R;e[34]!==B||e[35]!==S||e[36]!==L?(R=s.jsx("button",{type:"submit",disabled:B,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=B,e[35]=S,e[36]=L,e[37]=R):R=e[37];let U;e[38]!==k||e[39]!==R||e[40]!==j?(U=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:j,children:[k,R]}),e[38]=k,e[39]=R,e[40]=j,e[41]=U):U=e[41];let D;return e[42]!==U||e[43]!==g?(D=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:U}),e[42]=U,e[43]=g,e[44]=D):D=e[44],D}const Mn="site-links",Sa=/details?page|\bpdp\b/i,ja=/listingpage|\bplp\b/i;function Ea(t,e,n){const r=new Set;for(const c of n)Sa.test(c)&&r.add("product"),ja.test(c)&&r.add("category");const i=ot(en(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const Na=["rosa","preto","pink","black"];function yt(t,e){const n=e.trim();return n?t(n):Na.flatMap(r=>t(r))}function Ta(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const ms=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function sn(t){return t.split("/")[0]??""}function Ca(t){const e=new Set;for(const n of t){const r=sn(n);ms.has(r)&&e.add(r)}return e}function Ra(t,e){const n=sn(t);return!ms.has(n)||e.size===0?!0:e.has(n)}const La=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>yt(n=>Ta(t,n),e),optionsFromPayload:wt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:wt},{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:Ma}];function Oa(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of La){if(d.kind!==c)continue;const h=r.find(m=>d.test(m)&&Ra(m,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(sn(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(_a(t.has("category")?"category":"product")),l}function _a(t){return{kind:t,id:Mn,resolveType:Mn,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ua(e,n)}}function Ue(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Aa(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Ue(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Ue(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function fs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ps(t){try{return decodeURIComponent(t)}catch{return t}}function Ba(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $a(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Ba(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function hs(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=ot(en(e)),{pattern:u,order:l}=$a(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ps(d):null}function wt(t,e){const n=Ue(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Ue(l);if(!c)continue;const o=hs(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Ue(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,m=Array.isArray(c.image)?Ue(c.image[0]):null,p=typeof m?.url=="string"?m.url:void 0;i.push({value:o,label:h,image:p})}return i}function Fa(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?ps(n):null}function Ma(t){const e=[],n=new Set,r=(i,u)=>{const l=Ue(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=Fa(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const Da=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 Ka(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function za(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Ia(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Ua(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=hs(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&Da.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:Ka(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Ia(t))i(u,l,"product",c);for(const{href:u,text:l}of za(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function nt(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const gs=1e4;function Ha(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 Va(t,{resolveType:e,props:n}){const r=await fetch(Rr(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(gs)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Dn(t,e){const n=await fetch(Lr(t,e),{signal:AbortSignal.timeout(gs)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function qa(t,e,n){const r=e.optionsFromPayload(await Dn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=Fe(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Dn(t,u),n).filter(c=>c.kind==="product");return fs([r,l])}catch{return r}}function Wa(t,e,n){return Vs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Ga(t,e,n,r){if(e.homepageLinks)return qa(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>Va(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return fs(l.map(c=>e.optionsFromPayload(c,r)))}function Qt(t,e,n,r,i){return{queryKey:Wa(t,e,n),queryFn:()=>Ga(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function st(t){const e=fe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let m;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(m=p=>s.jsxs(it,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(Zn,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=m):m=e[12],d=i.map(m),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(at,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function Kn(t){const e=fe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Ja(t){const e=fe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Te(),[d,h]=v.useState(!1),[m,p]=v.useState(""),[E,b]=v.useState(""),P=v.useRef(null),g=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,j=Ha(o),y=[...new Set(n.map(K=>j[K.kind].noun))].join(" or ");let w;e[0]!==o||e[1]!==y?(w=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=w):w=e[2];const k=w,x={template:r,paramName:i};let B;e[3]!==m?(B=(K,T)=>({source:K,query:T,options:K.clientFilter?nt(T.data??[],m):T.data??[]}),e[3]=m,e[4]=B):B=e[4];const S=B,I=n.filter(si),F=n.filter(ni),M=Jt({queries:I.map(K=>Qt(l,K,E,x,d))});let L;e[5]!==M||e[6]!==S?(L=(K,T)=>S(K,M[T]),e[5]=M,e[6]=S,e[7]=L):L=e[7];const R=I.map(L),U=R.length===0||R.every(ti),D=Jt({queries:F.map(K=>Qt(l,K,E,x,d&&U))});let $;e[8]!==D||e[9]!==S?($=(K,T)=>S(K,D[T]),e[8]=D,e[9]=S,e[10]=$):$=e[10];const H=F.map($),W=U?H:R,V=W.length===1&&W[0]?.source.homepageLinks?W[0]:null,O=V&&!V.query.isLoading&&!V.query.isError?V?.query.data??[]:[],ne=nt(O.filter(ei),m),q=nt(O.filter(Za),m),G=ne.length>0&&q.length>0,Q=K=>{h(K),P.current&&clearTimeout(P.current),p(K?u:""),b(K?u:"")};let Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=K=>{p(K),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{b(K)},300)},e[11]=Y):Y=e[11];const te=Y,ae=K=>{c(K),Q(!1)},X=as(m),J=Fe(r,{[i]:X}),se=Wn,ve=qn,pe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",de=Xa;let ie;e[12]!==g||e[13]!==o?(ie=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=o,e[14]=ie):ie=e[14];let ue;e[15]!==ie?(ue=s.jsx(Gn,{className:"sr-only",children:s.jsx(Jn,{children:ie})}),e[15]=ie,e[16]=ue):ue=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Zn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let Z;e[18]!==o?(Z=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=Z):Z=e[19];let oe;e[20]!==g?(oe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:g}),e[20]=g,e[21]=oe):oe=e[21];let he;e[22]!==Z||e[23]!==oe?(he=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[Z," ",oe]})]}),e[22]=Z,e[23]=oe,e[24]=he):he=e[24];const ge=ts,Me=!1,Oe="min-h-0 flex-1";let _e;e[25]!==k||e[26]!==m?(_e=s.jsx(ns,{autoFocus:!0,placeholder:k,value:m,onValueChange:te}),e[25]=k,e[26]=m,e[27]=_e):_e=e[27];const Ve=es,ye="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let xe;e[28]!==o?(xe=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=xe):xe=e[29];let Ee;e[30]!==xe?(Ee=s.jsx(ss,{children:xe}),e[30]=xe,e[31]=Ee):Ee=e[31];const De=X&&s.jsx(at,{className:"shrink-0",children:s.jsxs(it,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>ae(X),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(ea,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:J})]})]})}),Ae=G?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(st,{heading:j.category.heading,iconKind:"category",options:ne,template:r,paramName:i,keyPrefix:`${V?.source.id}:cat`,onSelect:ae})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(st,{heading:j.product.heading,iconKind:"product",options:q,template:r,paramName:i,keyPrefix:`${V?.source.id}:prod`,onSelect:ae})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.map(K=>{const{source:T,query:me,options:$e}=K,{noun:Et}=j[T.kind];if(me.isLoading)return s.jsx(Kn,{text:o("sandbox.pathParamPickerChip.loading",{noun:Et})},T.id);if(me.isError)return s.jsx(Kn,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},T.id);if(T.homepageLinks){const Qe=me.data??[];return s.jsxs(v.Fragment,{children:[s.jsx(st,{heading:j.category.heading,iconKind:"category",options:nt(Qe.filter(Qa),m),template:r,paramName:i,keyPrefix:`${T.id}:cat`,onSelect:ae}),s.jsx(st,{heading:j.product.heading,iconKind:"product",options:nt(Qe.filter(Ya),m),template:r,paramName:i,keyPrefix:`${T.id}:prod`,onSelect:ae})]},T.id)}return s.jsx(st,{heading:W.length>1?j[T.kind].heading:void 0,iconKind:T.kind,options:$e,template:r,paramName:i,keyPrefix:T.id,onSelect:ae},T.id)})});let Be;e[32]!==Ve||e[33]!==Ee||e[34]!==De||e[35]!==Ae?(Be=s.jsxs(Ve,{className:ye,children:[Ee,De,Ae]}),e[32]=Ve,e[33]=Ee,e[34]=De,e[35]=Ae,e[36]=Be):Be=e[36];let we;e[37]!==ge||e[38]!==_e||e[39]!==Be?(we=s.jsxs(ge,{shouldFilter:Me,className:Oe,children:[_e,Be]}),e[37]=ge,e[38]=_e,e[39]=Be,e[40]=we):we=e[40];let Ce;e[41]!==ve||e[42]!==ue||e[43]!==he||e[44]!==we||e[45]!==de?(Ce=s.jsxs(ve,{className:pe,onClick:de,children:[ue,he,we]}),e[41]=ve,e[42]=ue,e[43]=he,e[44]=we,e[45]=de,e[46]=Ce):Ce=e[46];let Ke;return e[47]!==se||e[48]!==Q||e[49]!==d||e[50]!==Ce?(Ke=s.jsx(se,{open:d,onOpenChange:Q,children:Ce}),e[47]=se,e[48]=Q,e[49]=d,e[50]=Ce,e[51]=Ke):Ke=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:K=>{K.stopPropagation(),Q(!0)},children:u||g}),Ke]})}function Ya(t){return t.kind==="product"}function Qa(t){return t.kind!=="product"}function Xa(t){return t.stopPropagation()}function Za(t){return t.kind==="product"}function ei(t){return t.kind!=="product"}function ti(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ni(t){return t.isFallback}function si(t){return!t.isFallback}function ri(t){const e=fe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const E={template:r,paramName:i},b=n.filter(ai);o=Jt,c=b.map(P=>Qt(u,P,"",E,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[m,p]=v.useState(!1);if(!m)for(const E of h){if(E.isLoading)break;const b=E.data?.[0];if(b){p(!0),queueMicrotask(()=>l(b.value));break}}return null}function ai(t){return!t.isFallback}function ii(t){const e=fe.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[l,c]=v.useState(r),[o,d]=v.useState(!1),h=v.useRef(!1);let m;e[0]!==n||e[1]!==u?(m=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=m):m=e[2];const p=m,E=l||p;let b;e[3]!==E?(b=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=b):b=e[4];let P;e[5]!==p||e[6]!==u?(P=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=P):P=e[7];let g,j;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=S=>c(S.target.value),j=()=>d(!0),e[8]=g,e[9]=j):(g=e[8],j=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=as(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let w;e[16]!==l||e[17]!==p||e[18]!==P||e[19]!==N||e[20]!==y?(w=s.jsx("input",{type:"text",value:l,placeholder:p,title:P,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:oi,onChange:g,onFocus:j,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=P,e[19]=N,e[20]=y,e[21]=w):w=e[21];let k;e[22]!==b||e[23]!==w?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[b,w]}),e[22]=b,e[23]=w,e[24]=k):k=e[24];let x;e[25]!==o||e[26]!==u?(x=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(rr,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=x):x=e[27];let B;return e[28]!==x||e[29]!==k?(B=s.jsxs(s.Fragment,{children:[k,x]}),e[28]=x,e[29]=k,e[30]=B):B=e[30],B}function oi(t){return t.stopPropagation()}function li(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 ci(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function di(t){const e=fe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=os(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Or(l),h=o?{...o,name:l,path:c}:_r(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],qs(i)}function ui(t){const e=fe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Te();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[m,p]=v.useState(h);let E;e[2]!==d?(E=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=E):E=e[3];const[b,P]=v.useState(E),[g,j]=v.useState(Vt),[N,y]=v.useState(null),[w,k]=v.useState(n);n!==w&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),P(d("sectionsEditor.createPageModal.defaultPagePath")),j(Vt),y(null)));const x=!!l?.length;let B;e[4]!==o||e[5]!==r?(B=Z=>{!Z&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=B):B=e[6];const S=B;let I;e[7]!==o||e[8]!==m||e[9]!==c||e[10]!==b||e[11]!==x||e[12]!==g?(I=async Z=>{Z.preventDefault();const oe=m.trim(),he=b.trim();if(!oe||!he||o)return;const ge=is(he);if(ge){y(ge);return}y(null),await c({name:oe,path:he,templateKey:x&&g!==Vt?g:null})},e[7]=o,e[8]=m,e[9]=c,e[10]=b,e[11]=x,e[12]=g,e[13]=I):I=e[13];const F=I,M=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let R;e[16]!==L?(R=s.jsx(Gn,{children:s.jsx(Jn,{children:L})}),e[16]=L,e[17]=R):R=e[17];let U;e[18]!==d?(U=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=U):U=e[19];let D;e[20]!==U?(D=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:U}),e[20]=U,e[21]=D):D=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=Z=>p(Z.target.value),e[22]=$):$=e[22];let H;e[23]!==d?(H=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=H):H=e[24];let W;e[25]!==o||e[26]!==m||e[27]!==H?(W=s.jsx(jn,{id:"new-page-name",value:m,onChange:$,placeholder:H,autoFocus:!0,disabled:o}),e[25]=o,e[26]=m,e[27]=H,e[28]=W):W=e[28];let V;e[29]!==W||e[30]!==D?(V=s.jsxs("div",{className:"space-y-1.5",children:[D,W]}),e[29]=W,e[30]=D,e[31]=V):V=e[31];let ee;e[32]!==d?(ee=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=ee):ee=e[33];let O;e[34]!==ee?(O=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:ee}),e[34]=ee,e[35]=O):O=e[35];let ne;e[36]===Symbol.for("react.memo_cache_sentinel")?(ne=Z=>P(Z.target.value),e[36]=ne):ne=e[36];let q;e[37]!==d?(q=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=q):q=e[38];let G;e[39]!==o||e[40]!==b||e[41]!==q?(G=s.jsx(jn,{id:"new-page-path",value:b,onChange:ne,placeholder:q,disabled:o}),e[39]=o,e[40]=b,e[41]=q,e[42]=G):G=e[42];let Q;e[43]!==O||e[44]!==G?(Q=s.jsxs("div",{className:"space-y-1.5",children:[O,G]}),e[43]=O,e[44]=G,e[45]=Q):Q=e[45];let Y;e[46]!==o||e[47]!==x||e[48]!==d||e[49]!==g||e[50]!==l?(Y=x&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(Ar,{id:"new-page-template",value:g,onChange:j,templates:l??[],disabled:o})]}),e[46]=o,e[47]=x,e[48]=d,e[49]=g,e[50]=l,e[51]=Y):Y=e[51];let te;e[52]!==M?(te=M&&s.jsx("p",{className:"text-xs text-destructive",children:M}),e[52]=M,e[53]=te):te=e[53];let ae;e[54]!==V||e[55]!==Q||e[56]!==Y||e[57]!==te?(ae=s.jsxs("div",{className:"space-y-4 py-4",children:[V,Q,Y,te]}),e[54]=V,e[55]=Q,e[56]=Y,e[57]=te,e[58]=ae):ae=e[58];let X;e[59]!==r?(X=()=>r(!1),e[59]=r,e[60]=X):X=e[60];let J;e[61]!==d?(J=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=J):J=e[62];let se;e[63]!==o||e[64]!==X||e[65]!==J?(se=s.jsx(He,{type:"button",variant:"outline",onClick:X,disabled:o,children:J}),e[63]=o,e[64]=X,e[65]=J,e[66]=se):se=e[66];let ve;e[67]!==o||e[68]!==m||e[69]!==b?(ve=!m.trim()||!b.trim()||o,e[67]=o,e[68]=m,e[69]=b,e[70]=ve):ve=e[70];let pe;e[71]!==o||e[72]!==d?(pe=o?s.jsxs(s.Fragment,{children:[s.jsx(St,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=pe):pe=e[73];let de;e[74]!==ve||e[75]!==pe?(de=s.jsx(He,{type:"submit",disabled:ve,children:pe}),e[74]=ve,e[75]=pe,e[76]=de):de=e[76];let ie;e[77]!==se||e[78]!==de?(ie=s.jsxs(Ws,{children:[se,de]}),e[77]=se,e[78]=de,e[79]=ie):ie=e[79];let ue;e[80]!==F||e[81]!==ae||e[82]!==ie||e[83]!==R?(ue=s.jsx(qn,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:F,children:[R,ae,ie]})}),e[80]=F,e[81]=ae,e[82]=ie,e[83]=R,e[84]=ue):ue=e[84];let be;return e[85]!==S||e[86]!==n||e[87]!==ue?(be=s.jsx(Wn,{open:n,onOpenChange:S,children:ue}),e[85]=S,e[86]=n,e[87]=ue,e[88]=be):be=e[88],be}function mi(t){const e=fe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Te();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const m=os(h);let p;e[4]!==m?(p=Fr((k,x)=>m.mutate({blockKey:k,data:x})),e[4]=m,e[5]=p):p=e[5];const E=p;let b;e[6]!==o||e[7]!==c?(b=Br(c,o),e[6]=o,e[7]=c,e[8]=b):b=e[8];const{resolveType:P,props:g,title:j}=b;if(!P){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let x;return e[11]!==k?(x=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=x):x=e[12],x}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==P||e[15]!==j?(y={mode:"saved",blockKey:o,resolveType:P,title:j},e[13]=o,e[14]=P,e[15]=j,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==g||e[23]!==m.isPending||e[24]!==E||e[25]!==N||e[26]!==y||e[27]!==r?(w=s.jsx($r,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:g,isCreating:m.isPending,onCreate:fi,onSaveReferencedBlock:E,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=g,e[23]=m.isPending,e[24]=E,e[25]=N,e[26]=y,e[27]=r,e[28]=w):w=e[28],w}async function fi(){}function pi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function zn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:pi(t.error)}}function hi(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 gi(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=hi(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const vi="https://github.com/decocms/blocks";function bi(){const t=fe.c(14),e=Te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ar,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Yn,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(He,{size:"sm",asChild:!0,children:s.jsxs("a",{href:vi,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(nn,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function xi(t){const e=fe.c(15),{source:n,onRetry:r}=t,i=Te();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ta,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(He,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let m;return e[11]!==l||e[12]!==o||e[13]!==h?(m=s.jsx(nn,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=m):m=e[14],m}const yi=v.lazy(()=>Gs(()=>import("./sections-editor-DMeqz1oV.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162])).then(t=>({default:t.SectionsEditor})));function In(t){const e=fe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=Xt(),{currentBranch:c,taskId:o}=jt(),d=ds(),h=Zt(),m=us(),p=d.lifecycle.phase==="running",E=h.previewUrl;let b;e[0]!==c||e[1]!==l||e[2]!==E||e[3]!==o||e[4]!==n?(b=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:E}:null,e[0]=c,e[1]=l,e[2]=E,e[3]=o,e[4]=n,e[5]=b):b=e[5];const P=b;let g;e[6]!==p?(g={fetchEnabled:p},e[6]=p,e[7]=g):g=e[7];const j=tn(P,g);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=ls(P,N),w=gi({lifecyclePhase:d.lifecycle.phase,decofile:zn(j),meta:zn(y),hasEditableContent:Pr(j.data,y.data),fastPreviewActive:rs(n).runtime==="cms"}),k=wi;if(w.kind==="loading"){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(Js,{})),e[10]=O):O=e[10],O}if(w.kind==="empty"){let O;return e[11]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(bi,{})),e[11]=O):O=e[11],O}if(w.kind==="error"){let O;e[12]!==j||e[13]!==h||e[14]!==y||e[15]!==w.source?(O=()=>{if(w.source==="sandbox"){h.retry();return}Promise.all([j.refetch(),y.refetch()])},e[12]=j,e[13]=h,e[14]=y,e[15]=w.source,e[16]=O):O=e[16];const ne=O;let q;return e[17]!==ne||e[18]!==w.source?(q=k(s.jsx(xi,{source:w.source,onRetry:ne})),e[17]=ne,e[18]=w.source,e[19]=q):q=e[19],q}let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=O=>k(s.jsx("div",{className:"h-full min-h-0",children:O})),e[20]=x):x=e[20];const B=x,S=m.state.target;if(S?.kind==="loader"&&j.data&&y.data){const O=c??"",ne=E??null;let q;return e[21]!==j.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==O||e[25]!==ne||e[26]!==S.key||e[27]!==n?(q=B(s.jsx(mi,{orgSlug:l.slug,virtualMcpId:n,branch:O,previewUrl:ne,meta:y.data,decofile:j.data,blockKey:S.key})),e[21]=j.data,e[22]=y.data,e[23]=l.slug,e[24]=O,e[25]=ne,e[26]=S.key,e[27]=n,e[28]=q):q=e[28],q}let I;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(I=S||!c?null:Qn(Xn(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=I):I=e[33];const F=I;let M="/",L=null,R=null;S?.kind==="page"?(M=S.path,L=S.key):S?.kind==="section"?R=S.key:F&&(M=F.path,L=F.pageKey);const U=L?`page:${L}`:R?`section:${R}`:`path:${M}`;let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(St,{className:"size-5 text-muted-foreground"})}),e[34]=D):D=e[34];const $=c??"",H=E??void 0,W=R?null:u,V=!!L&&m.state.editSeoPageKey===L;let ee;return e[35]!==R||e[36]!==L||e[37]!==M||e[38]!==U||e[39]!==i||e[40]!==l.slug||e[41]!==W||e[42]!==V||e[43]!==$||e[44]!==H||e[45]!==n||e[46]!==m.consumeEditSeo||e[47]!==m.setFocusedBlock||e[48]!==m.setVariantOverride?(ee=B(s.jsx(v.Suspense,{fallback:D,children:s.jsx(yi,{orgSlug:l.slug,virtualMcpId:n,branch:$,previewReady:!0,previewUrl:H,currentPath:M,activePageBlockKey:L,activeGlobalBlockKey:R,externalSelection:W,initialEditSeo:V,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:i},U)})),e[35]=R,e[36]=L,e[37]=M,e[38]=U,e[39]=i,e[40]=l.slug,e[41]=W,e[42]=V,e[43]=$,e[44]=H,e[45]=n,e[46]=m.consumeEditSeo,e[47]=m.setFocusedBlock,e[48]=m.setVariantOverride,e[49]=ee):ee=e[49],ee}function wi(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Un(t){const e=fe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Te(),c=sa(),o=Mr(n);let d;e[0]!==o||e[1]!==r?(d=Dr(o,ra(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:m}=Xt(),{currentBranch:p,taskId:E}=jt(),P=Zt().previewUrl;let g;e[3]!==p||e[4]!==m.slug||e[5]!==P||e[6]!==E||e[7]!==n?(g=p?{orgSlug:m.slug,virtualMcpId:n,branch:p,threadId:E??null,previewUrl:P}:null,e[3]=p,e[4]=m.slug,e[5]=P,e[6]=E,e[7]=n,e[8]=g):g=e[8];const N=tn(g),y=p??"";let w;e[9]!==m.slug||e[10]!==y||e[11]!==n?(w={orgSlug:m.slug,virtualMcpId:n,branch:y},e[9]=m.slug,e[10]=y,e[11]=n,e[12]=w):w=e[12];const{save:k,flush:x}=Kr(w),B=N.data?.[r],S=N.data===void 0&&N.isLoading,I=N.data!==void 0&&B===void 0,F=!p||I||S;let M;e[13]!==B?(M=B===void 0?"":JSON.stringify(B,null,2),e[13]=B,e[14]=M):M=e[14];const L=M;let R;e[15]!==r||e[16]!==F||e[17]!==k?(R=V=>{if(F)return;let ee;try{ee=JSON.parse(V)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||k(r,ee)},e[15]=r,e[16]=F,e[17]=k,e[18]=R):R=e[18];const U=R;let D;e[19]!==x?(D=()=>({flush:x}),e[19]=x,e[20]=D):D=e[20],v.useImperativeHandle(u,D);let $;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?($=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(He,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(Ys,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=$):$=e[25];let H;e[26]!==N.data||e[27]!==x||e[28]!==L||e[29]!==S||e[30]!==I||e[31]!==r||e[32]!==F||e[33]!==U||e[34]!==l?(H=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(St,{className:"size-5 text-muted-foreground"})}):I?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(na,{code:L,language:"json",readOnly:F,height:"100%",onChange:V=>U(V??""),onSave:V=>{U(V),x()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=x,e[28]=L,e[29]=S,e[30]=I,e[31]=r,e[32]=F,e[33]=U,e[34]=l,e[35]=H):H=e[35];let W;return e[36]!==$||e[37]!==H?(W=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[$,H]}),e[36]=$,e[37]=H,e[38]=W):W=e[38],W}function vs(t){return t.contentEditingEnabled&&!t.isMobile}function ki(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Pi(t,e){return t==="blocks"?"preview":e?"blocks":t}function Si(t){return vs({contentEditingEnabled:cs(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function ji(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const Ei=500,Ni={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Hn=1,kt=["desktop","mobile","tablet"],Ti=["preview","visual","blocks"],Vn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Ci(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 rt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Gt(t,e){try{return new URL(t,e).href}catch{return null}}function Ri(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 Li(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Oi(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function _i(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ai({virtualMcpId:t}){const e=Te(),n=Cr(),{currentBranch:r,taskId:i,virtualMcpId:u}=jt(),l=us(),c=vr(u===t?t:null),o=rs(t),d=aa(c?.metadata?.ui?.layout??null),h=cs(d),m=vs({contentEditingEnabled:h,isMobile:n}),[p]=v.useState(()=>Si({cmsMode:d,isMobile:n})),[E,b]=En(Nn.previewEditingMode(t),a=>a&&Ti.includes(a)?a:null),P=E??p,[g,j]=En(Nn.previewDeviceSize(t),a=>a&&kt.includes(a)?a:"desktop"),[N,y]=v.useState(null),[w,k]=v.useState(null),x=v.useRef(null),B=v.useRef(null),[S,I]=v.useState(!1),F=v.useRef(null),M=()=>{F.current?.flush(),I(!1)},L=()=>I(a=>(a&&F.current?.flush(),!a)),[R,U]=v.useState({width:0,height:0}),[D,$]=v.useState(!1),[H,W]=v.useState(""),V=v.useRef(null),[ee,O]=v.useState(!1),[ne,q]=v.useState(),[G,Q]=v.useState(null),[Y,te]=v.useState(null),[ae,X]=v.useState(null),[J,se]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[ve,pe]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[de,ie]=v.useState({}),[ue,be]=v.useState(!1),Z=v.useRef(null),oe=()=>{be(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>be(!1),15e3)},he=()=>{Z.current&&(clearTimeout(Z.current),Z.current=null),be(!1)},{org:ge}=Xt(),Me=ds(),Oe=Zt(),_e=Oe.vmEntry,Ve=Me.lifecycle.phase,{url:ye}=Sr(t),xe=ye??Oe.previewUrl,Ee=!!ye||Ve==="running",De=c?.id===t?yr(c.metadata):null,Ae=!ye&&c?.id===t&&o.runtime==="cms",Be=o.projectDefault==="cms",we=qr({sandboxUrl:xe,previewServerUrl:De,fastPreviewActive:Ae}),Ce=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:xe}:null,Ke=tn(Ce,{fetchEnabled:Ee}),K=ls(Ce,{fetchEnabled:Ee}),T=Ke.data,me=K.data,$e=T?jr(T).sort((a,f)=>a.name.localeCompare(f.name)):[],Et=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r}:null,Qe=di(Et),Nt=T&&me?Er(T,me):[],rn=T&&me?zr(me,T,"loaders"):[],an=H?(()=>{const a=H.toLowerCase();return $e.map(f=>({page:f,score:Oi(f.name,f.path,a)})).filter(({score:f})=>f>0).sort((f,C)=>C.score-f.score||f.page.path.length-C.page.path.length).map(({page:f})=>f)})():$e,on=Nt.filter(a=>{if(!H)return!0;const f=H.toLowerCase();return a.name.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),ln=m?rn:[],cn=ln.filter(a=>{if(!H)return!0;const f=H.toLowerCase();return a.title.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),lt=Y?rn.find(a=>a.key===Y)??null:null,Ne=en,Tt=G||Y?null:Nr($e,J,ve),z=Tt?.key??null,qe=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??z,ct=Tt?.path??null,We=(z?de[z]:void 0)??{},ke=Fe(J,We),Ct={};if(Ee&&xe&&me&&T){const a=Ir(me,"loaders"),f=z?T[z]:void 0,C=Aa(f,T,re=>a.has(re)),_=Ca(C);for(const re of ot(J)){if(re.type!=="param")continue;const Le=Ea(J,re.name,C),Se=Oa(Le,a,_);Se.length>0&&(Ct[re.name]=Se)}}const dt=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,dn=T&&z?Tr(T,z,0):[],un=T?Ur(dn,T):[],Rt=un.map(a=>a.isSavedBlock?a.label:""),Lt=un.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Ot=dn.map(a=>Yt(a,T??{})),mn=v.useRef(null),Pe=v.useRef(null),bs=Me.status.state==="paused",_t=Me.phase,fn=Hr({claimPhase:_t,lifecycle:Me.lifecycle}),ze=Oe.previewState,xs=Oe.userStopped,ys=Qr(ge.slug,t??"",r??""),{url:Ie}=Yr(Ae&&t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,previewServerUrl:De??null,path:ke}:null),ws=Be&&o.runtime==="sandbox",A=ma({previewState:ze,progressStatus:fn.status,previewServerUrl:De,fastPreviewActive:Ae,fastPreviewReady:!!Ie,codingSession:ws,localPreviewUrl:ye}),ut=A.mode!=="none",ks=A.mode==="production"&&A.iframeBase?rt(A.iframeBase):null,Ge=A.mode==="production"?ks:rt(xe),Ps=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Xe=ye?A.mode==="sandbox"&&m&&P==="blocks":A.mode==="production"&&Ae&&Ps&&m&&P==="blocks",pn=v.useRef(null),{pin:Ss,effective:js}=Ri(pn.current,{inPlaceRenderActive:Xe,draftPreviewUrl:Ie,resolvedPath:ke});pn.current=Ss;const Re=Ci(A.mode==="sandbox"?bt(_n(ae??Gt(ke,A.iframeBase)??A.iframeBase,g),l.state.variantOverride??[]):A.mode==="production"?bt(_n(Wr(ae??js??Gt(ke,A.iframeBase)??A.iframeBase,A.showWakingPill?Gr:null),g),l.state.variantOverride??[]):null),hn=Ie??(A.iframeBase?Gt(ke,A.iframeBase):null),Es=A.mode==="production"?hn?bt(hn,l.state.variantOverride??[]):null:Re??A.iframeBase,Ns=()=>{const a=Es;a&&window.open(a,"_blank","noopener")},Ze=t&&r?Xn(ge.slug,t,r):null,et=a=>{Ze&&nr(Ze,a)},le=l.state.target;v.useEffect(()=>{if(!(!le||!we||!me))if(le.kind==="page"){const a=de[le.key]??{};Pe.current=Fe(le.path,a),Q(null),te(null),X(null),pe(le.key),se(le.path),et({path:le.path,pageKey:le.key,params:a})}else if(le.kind==="loader")Pe.current=null,Q(null),te(le.key),X(null);else{const a=Nt.find(f=>f.key===le.key);if(a){Pe.current=null;const f=Ln(me);te(null),Q(a),X(On(we,f,a.key))}}},[le,we,me,de]),v.useEffect(()=>{!z||ct===null||le?.kind==="page"&&le.key===z&&le.path===ct||l.selectTarget({kind:"page",key:z,path:ct})},[z,ct,le]);const[gn,Ts]=v.useState(null);if(ze.kind==="iframe"&&gn!==ze.previewUrl){const a=gn!==null;Ts(ze.previewUrl);const f=Ze?Qn(Ze):null;if(f){if(Pe.current=Fe(f.path,f.params),se(f.path),pe(f.pageKey),X(null),Q(null),te(null),f.pageKey&&Object.keys(f.params).length>0){const C=f.pageKey;ie(_=>({..._,[C]:f.params}))}}else a&&(Pe.current=null,se("/"),X(null),pe(null),Q(null),te(null))}mn.current=Re;const vn=ga({iframeRef:x,src:A.mode==="sandbox"?Re:null,active:A.mode==="sandbox"}),bn=v.useRef(null);v.useEffect(()=>{if(!Ie||!Re||bn.current===Ie)return;bn.current=Ie;const a=x.current;a&&a.getAttribute("src")!==Re&&(oe(),a.src=Re)},[Ie,Re]);const xn=()=>{const a=x.current?.contentWindow,f=Ge;if(!a||!f||!T||!z)return;const C=T[z];if(!C||typeof C!="object")return;const _=Jr({previewBaseUrl:f,pageBlock:C,decofile:T,path:ke,pathTemplate:J});if(!_)return;const re=bt(_.src,Vr(l.state.variantOverride??[],z));a.postMessage({type:"cms-editor::render",src:re,body:_.body},f)},At=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!T){At.current=null;return}const a={nav:JSON.stringify({page:z,path:ke,pathTemplate:J}),content:JSON.stringify(T)},f=Li(At.current,a);At.current=a,f&&xn()},[T,Xe,G,Y,z,ke,J]);const Bt=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!T){Bt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),f=Bt.current;Bt.current={page:z,sig:a},!(!f||f.page!==z||f.sig===a)&&xn()},[l.state.variantOverride,Xe,G,Y,z]);const Cs=!!t&&!!r&&!Me.notFound&&!xs&&!bs&&(_t?.kind==="ready"||Ve!=="idle"),ce=ji({editingMode:P,sandboxDisplay:A.mode==="sandbox",blocksEditingEnabled:m});v.useEffect(()=>{const a=Ge;if(!a)return;const f=C=>{if(C.origin===a)if(C.data?.type==="visual-editor::element-clicked"){const _=va.safeParse(C.data.payload);_.success&&y(_.data)}else if(C.data?.type==="cms-editor::section-clicked"){const _=ya.safeParse(C.data.payload);_.success&&k({index:_.data.sectionIndex,seq:_.data.clickSeq})}else C.data?.type==="cms-editor::render-start"?oe():C.data?.type==="cms-editor::render-end"?(he(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Rt,kinds:Lt,keys:Ot},a)):C.data?.type==="cms-editor::render-error"&&he()};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[Ge,Rt,Lt,Ot]);const yn=()=>{const a=x.current?.contentWindow,f=rt(xe);!a||!f||a.postMessage({type:"visual-editor::activate",script:ba},f)},Rs=()=>{const a=x.current?.contentWindow,f=rt(xe);!a||!f||a.postMessage({type:"visual-editor::deactivate"},f)},$t=()=>{const a=x.current?.contentWindow,f=Ge;!a||!f||(a.postMessage(A.mode==="production"||ye?{type:"editor::inject",args:{script:Fn}}:{type:"visual-editor::activate",script:Fn},f),a.postMessage({type:"cms-editor::set-labels",labels:Rt,kinds:Lt,keys:Ot},f))},Ls=()=>{const a=x.current?.contentWindow,f=Ge;!a||!f||a.postMessage({type:"cms-editor::deactivate"},f)},Os=()=>{const a=x.current?.contentWindow,f=Ge;!a||!f||(a.postMessage({type:"cms-editor::clear-hover"},f),a.postMessage({type:"visual-editor::clear-hover"},f))},mt=a=>{if(a==="blocks"&&!m)return;const f=P;!n&&a!==f&&(a==="blocks"?B.current?.resize("30%"):B.current?.collapse()),b(a),y(null),k(null),a!=="blocks"&&te(null),f==="visual"&&Rs(),a==="visual"&&yn(),f==="blocks"&&a!=="blocks"&&Ls(),a==="blocks"&&$t()},_s=()=>{mt(ki(P,m))},As=()=>{mt(Pi(P,m))};Zr(()=>{const a=x.current;if(!a)return;oe();const f=document.activeElement,C=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),_i(a,mn.current);let _;const re=()=>{clearTimeout(_),a.tabIndex=C,a.style.pointerEvents="";const Le=document.activeElement;(!Le||Le===document.body||Le===a)&&f?.focus(),a.removeEventListener("load",re)};a.addEventListener("load",re),_=setTimeout(re,3e3)});const Bs=()=>{const a=kt.indexOf(g);j(kt[(a+1)%kt.length])},Ft=(a,f)=>{if(!z)return;const C=z,_={...We,[a]:f};Pe.current=Fe(J,_),ie(re=>({...re,[C]:_})),et({path:J,pageKey:C,params:_})},$s=li({iframeBase:A.iframeBase,resolvedPath:ke,activeGlobalSectionName:G?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),wn=a=>{const f=de[a.key]??{},C=Fe(a.path,f);(G||Ne(C)!==Ne(ke))&&oe(),Pe.current=C,Q(null),te(null),X(null),k(null),pe(a.key),se(a.path),et({path:a.path,pageKey:a.key,params:f}),l.selectTarget({kind:"page",key:a.key,path:a.path})};tr(Ze,a=>{(G||Ne(a)!==Ne(ke))&&oe(),Pe.current=a,Q(null),te(null),X(null),k(null),pe(null),se(a),et({path:a,pageKey:null,params:{}})});const Fs=a=>{if(!we||!me){Cn.error(e("sandbox.preview.previewMetadataNotReady"));return}oe(),Pe.current=null;const f=Ln(me),C=On(we,f,a.key);Q(a),te(null),X(C),k(null),l.selectTarget({kind:"section",key:a.key})},Ms=a=>{m&&(Q(null),te(a.key),X(null),mt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},Ds=async({name:a,path:f,templateKey:C})=>{if(!t||!r)return;const _=is(f);if(_){q(_);return}const re=f.trim().startsWith("/")?f.trim():`/${f.trim()}`;if($e.some(Se=>Ne(Se.path)===Ne(re))){q(e("sandbox.preview.pageAlreadyExists",{path:re}));return}let Le;if(C&&(Le=T?.[C],!Le)){q(e("sandbox.preview.templateNoLongerExists"));return}q(void 0);try{const Se=await Qe.mutateAsync({name:a,path:re,template:Le});O(!1),Cn.success(e("sandbox.preview.pageCreated",{name:a})),await ia(Ei),wn({key:Se.key,name:Se.name,path:Se.path}),mt("blocks")}catch(Se){q(Se instanceof Error?Se.message:e("sandbox.preview.failedToCreatePage"))}},ft=ut&&(Cs||A.mode==="production"),Ks=ci({showPreviewToolbar:ft,contentEditingEnabled:h}),pt=()=>{$(!1),W("")},Mt=G?.name??lt?.title??Tt?.name,Dt=Ke.isPending||K.isPending,Kt=Dt?rt(A.iframeBase):Mt,ht=G?`section:${G.key}`:Y?`loader:${Y}`:z?`page:${z}`:void 0,zs=ft?Ks?s.jsxs(pr,{open:D,onOpenChange:a=>{$(a),a||W("")},children:[s.jsx(hr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:Dt?Kt??void 0:G||lt?Mt:[Mt,J].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[G&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(ir,{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-[11px] font-medium text-muted-foreground",children:[s.jsx(or,{size:11}),e("sandbox.preview.loaderBadge")]}),Kt&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Kt}),!Dt&&!G&&!lt&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:J}),s.jsx(sr,{size:12,className:zt("shrink-0 transition-transform",D&&"rotate-180")})]})})}),s.jsxs(gr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(ts,{shouldFilter:!1,defaultValue:ht,children:[s.jsx(ns,{value:H,onValueChange:a=>{W(a),V.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(es,{ref:V,className:"max-h-80",children:[s.jsx(ss,{children:$e.length===0&&Nt.length===0&&ln.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),an.length>0&&s.jsx(at,{children:an.map(a=>s.jsxs(it,{value:`page:${a.key}`,"aria-current":ht===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{pt(),wn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),on.length>0&&s.jsx(at,{heading:e("sandbox.preview.globalComponents"),children:on.map(a=>s.jsx(it,{value:`section:${a.key}`,"aria-current":ht===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),Fs(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),cn.length>0&&s.jsx(at,{heading:e("sandbox.preview.globalLoaders"),children:cn.map(a=>s.jsx(it,{value:`loader:${a.key}`,"aria-current":ht===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),Ms(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!G&&!Y&&ot(J).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:ot(J).map((a,f)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${f}`);const C=Ct[a.name];return C&&dt?s.jsx(Ja,{sources:C,template:J,paramName:a.name,value:We[a.name]??"",sandboxRef:dt,onCommit:_=>Ft(a.name,_)},`${z}:${a.name}`):s.jsx(ii,{name:a.name,value:We[a.name]??"",onCommit:_=>Ft(a.name,_)},`${z}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(He,{variant:"ghost",className:"w-full justify-start",onClick:()=>{pt(),q(void 0),O(!0)},children:[s.jsx(fr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:$s}):null,kn=ft||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(It,{children:[s.jsx(Ut,{asChild:!0,children:s.jsx(tt,{onClick:Bs,"aria-label":e(Vn[g]),children:g==="mobile"?s.jsx(lr,{size:16}):g==="tablet"?s.jsx(cr,{size:16}):s.jsx(dr,{size:16})})}),s.jsx(Ht,{children:e(Vn[g])})]}),zs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(tt,{onClick:Ns,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(Yn,{size:16})})})]}):null,Is=A.mode==="sandbox",gt=Ni[g],vt=g==="desktop"&&(R.width===0||R.width>=gt.width+2*Hn),Pn=vt?1:Math.min(R.width>0?R.width/(gt.width+2*Hn):1,1),Us=vt?{width:"100%",height:"100%"}:{width:`${gt.width}px`,height:R.height>0?`${R.height/Pn}px`:`${gt.height}px`,transform:`scale(${Pn})`,transformOrigin:"top center"},Sn=s.jsxs(s.Fragment,{children:[Is&&(ft||h)&&s.jsx(tt,{onClick:_s,"aria-pressed":ce==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ce==="visual",children:s.jsx(Rn,{size:16})}),m&&s.jsxs(It,{children:[s.jsx(Ut,{asChild:!0,children:s.jsx(tt,{onClick:As,"aria-pressed":ce==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ce==="blocks",children:s.jsx(mr,{size:16})})}),s.jsx(Ht,{children:e("sandbox.preview.blocksEditor")})]}),qe&&s.jsxs(It,{children:[s.jsx(Ut,{asChild:!0,children:s.jsx(tt,{onClick:L,"aria-pressed":S,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:S,children:s.jsx(ur,{size:16})})}),s.jsx(Ht,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Hs=!!Y&&ce==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[dt&&Object.entries(Ct).map(([a,f])=>(We[a]??"")===""?s.jsx(ri,{sources:f,template:J,paramName:a,sandboxRef:dt,onFill:C=>Ft(a,C)},`${z}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(Tn.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:kn}),children:kn}),s.jsx(Tn.Toolbar.Right.Portal,{fallback:Sn,children:Sn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Hs?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(In,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L}),S&&qe&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Un,{ref:F,virtualMcpId:t,pageKey:qe,onClose:M})})]}):s.jsxs(An,{orientation:"horizontal",disabled:ce!=="blocks",className:"relative isolate",children:[s.jsx(xt,{ref:B,id:"preview-blocks-editor",defaultSize:ce==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ce==="blocks"&&s.jsx(In,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L})}),ce==="blocks"&&s.jsx(Bn,{withHandle:!0}),s.jsx(xt,{id:"preview-canvas",defaultSize:ce==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(An,{orientation:"horizontal",disabled:!(S&&qe),children:[s.jsx(xt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const f=()=>U(_=>_.width===a.clientWidth&&_.height===a.clientHeight?_:{width:a.clientWidth,height:a.clientHeight});f();const C=new ResizeObserver(f);return C.observe(a),()=>C.disconnect()},className:zt("h-full relative overflow-clip flex justify-center",ut&&!vt&&"bg-muted/30"),children:[(ue||ys)&&ut&&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"})}),A.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(qt,{kind:"starting",progress:fn,claimPhase:_t})}),!ye&&ze.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(qt,{kind:"suspended",onResume:Oe.resume})}),!ye&&ze.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(qt,{kind:"errored",error:ze.error,onRetry:Oe.retry,connectionsHref:`/${ge.slug}/settings/connections`})}),A.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(St,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),ce==="visual"&&!N&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(Rn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ce==="visual"&&N&&s.jsx(Pa,{element:N,onDismiss:()=>y(null)}),ut&&Re&&s.jsx("div",{className:zt("shrink-0",!vt&&"border-x border-border bg-background shadow-sm"),style:Us,onMouseLeave:Os,children:s.jsx("iframe",{ref:x,src:Re,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:vn.handleError,onLoad:()=>{if(vn.handleLoad(),he(),A.mode!=="sandbox"||ye){(A.mode==="production"&&!A.showWakingPill||ye)&&ce==="blocks"&&$t();return}if(Qs("vm_preview_loaded",{view_mode:ce,vm_id:_e?.sandboxHandle??null}),!G)try{const a=x.current?.contentWindow?.location?.pathname;if(!a)return;const f=Pe.current;if(f!==null&&(Pe.current=null,Ne(a)!==Ne(f))||Ne(a)===Ne(ke))return;se(a),et({path:a,pageKey:ve,params:We})}catch{}ce==="visual"&&yn(),ce==="blocks"&&$t()}},A.iframeBase)})]})}),S&&qe&&s.jsxs(s.Fragment,{children:[s.jsx(Bn,{withHandle:!0}),s.jsx(xt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Un,{ref:F,virtualMcpId:t,pageKey:qe,onClose:M})})]})]})})]})}),s.jsx(ui,{open:ee,onOpenChange:O,isPending:Qe.isPending,error:ne,templates:$e,onSubmit:Ds})]})}function Bi(t){const e=fe.c(22),{virtualMcpId:n}=t,r=Te(),i=br(n),{activeTask:u,taskId:l,currentBranch:c}=jt(),o=ca(l),[d,h]=v.useState(!1);if(la({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Wt(i?.metadata),threadHasRepo:Wt(o)||Wt(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx($n,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let b;e[1]!==r?(b=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=b):b=e[2];let P;e[3]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=P):P=e[4];let g,j;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=()=>h(!0),j=s.jsx($n,{className:"size-4"}),e[5]=g,e[6]=j):(g=e[5],j=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(He,{onClick:g,children:[j,N]}),e[9]=N,e[10]=y):y=e[10];let w;e[11]!==b||e[12]!==P||e[13]!==y?(w=s.jsx(nn,{className:"h-full",image:E,title:b,description:P,actions:y}),e[11]=b,e[12]=P,e[13]=y,e[14]=w):w=e[14];let k;e[15]!==d?(k=s.jsx(oa,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let x;return e[17]!==w||e[18]!==k?(x=s.jsxs(s.Fragment,{children:[w,k]}),e[17]=w,e[18]=k,e[19]=x):x=e[19],x}let p;return e[20]!==n?(p=s.jsx(Ai,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function Jc(){const t=fe.c(2),e=da();let n;return t[0]!==e?(n=s.jsx(Xs,{tabId:"site-editor",children:s.jsx(Zs,{feature:"cms",children:s.jsx(Bi,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{Jc as default};
|
|
518
|
+
`)}function ka(t,e,n=320,r=44,i=12){const{x:u,y:l}=t,{width:c,height:o}=e,d=Math.max(i,Math.min(u-n/2,c-n-i)),m=l/o>.68?Math.max(i,l-r-18):Math.min(l+18,o-r-i);return{leftPct:d/c*100,topPct:m/o*100}}function Pa(t){const e=fe.c(45),{element:n,onDismiss:r}=t,[i,u]=v.useState(""),l=v.useRef(null),{sendMessage:c}=er(),{openSidePanel:o}=Xr(),d=Te();let h;e[0]!==n||e[1]!==i||e[2]!==r||e[3]!==o||e[4]!==c?(h=()=>{if(!i.trim())return;const $=wa(n,i);o(),c({parts:[{type:"text",text:$}]}),r()},e[0]=n,e[1]=i,e[2]=r,e[3]=o,e[4]=c,e[5]=h):h=e[5];const m=h;let p;e[6]!==n.position||e[7]!==n.viewport?(p=ka(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=p):p=e[8];const E=p,b=`${E.leftPct}%`,P=`${E.topPct}%`;let g;e[9]!==b||e[10]!==P?(g={left:b,top:P,width:"320px"},e[9]=b,e[10]=P,e[11]=g):g=e[11];let j;e[12]!==m?(j=$=>{$.preventDefault(),m()},e[12]=m,e[13]=j):j=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=$=>u($.target.value),e[14]=N):N=e[14];let y;e[15]!==r?(y=$=>{$.key==="Escape"&&r()},e[15]=r,e[16]=y):y=e[16];let w;e[17]!==d?(w=d("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=d,e[18]=w):w=e[18];let k;e[19]!==i||e[20]!==y||e[21]!==w?(k=s.jsx("input",{ref:l,autoFocus:!0,type:"text",value:i,onChange:N,onKeyDown:y,placeholder:w,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=i,e[20]=y,e[21]=w,e[22]=k):k=e[22];let x;e[23]!==i?(x=i.trim(),e[23]=i,e[24]=x):x=e[24];const B=!x;let S;e[25]!==d?(S=d("sandbox.visualEditorPrompt.sendButton"),e[25]=d,e[26]=S):S=e[26];let I;e[27]!==d?(I=d("sandbox.visualEditorPrompt.sendButton"),e[27]=d,e[28]=I):I=e[28];let F;e[29]!==I?(F=s.jsx("title",{children:I}),e[29]=I,e[30]=F):F=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=M):M=e[31];let L;e[32]!==F?(L=s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[F,M]}),e[32]=F,e[33]=L):L=e[33];let R;e[34]!==B||e[35]!==S||e[36]!==L?(R=s.jsx("button",{type:"submit",disabled:B,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:S,children:L}),e[34]=B,e[35]=S,e[36]=L,e[37]=R):R=e[37];let U;e[38]!==k||e[39]!==R||e[40]!==j?(U=s.jsxs("form",{className:"pointer-events-auto flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:j,children:[k,R]}),e[38]=k,e[39]=R,e[40]=j,e[41]=U):U=e[41];let D;return e[42]!==U||e[43]!==g?(D=s.jsx("div",{className:"absolute z-30 pointer-events-none",style:g,children:U}),e[42]=U,e[43]=g,e[44]=D):D=e[44],D}const Mn="site-links",Sa=/details?page|\bpdp\b/i,ja=/listingpage|\bplp\b/i;function Ea(t,e,n){const r=new Set;for(const c of n)Sa.test(c)&&r.add("product"),ja.test(c)&&r.add("category");const i=ot(en(t)),u=i[i.length-1],l=i[i.length-2];return u?.type==="text"&&u.text==="/p"&&l?.type==="param"&&l.name===e&&r.add("product"),e==="*"&&i.some(c=>c.type==="param"&&c.name==="*")&&r.add("category"),r}const Na=["rosa","preto","pink","black"];function yt(t,e){const n=e.trim();return n?t(n):Na.flatMap(r=>t(r))}function Ta(t,e){const n=e.trim(),r=[];/^\d+$/.test(n)&&r.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return r.push({resolveType:t,props:{query:u,count:10}}),r}const ms=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function sn(t){return t.split("/")[0]??""}function Ca(t){const e=new Set;for(const n of t){const r=sn(n);ms.has(r)&&e.add(r)}return e}function Ra(t,e){const n=sn(t);return!ms.has(n)||e.size===0?!0:e.has(n)}const La=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>yt(n=>Ta(t,n),e),optionsFromPayload:wt},{kind:"product",test:t=>/magento\/.*products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{props:{search:n,pageSize:10,currentPage:1}}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/algolia\/.*products?\/(list|suggestions)(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{term:n,hitsPerPage:10}}],e),optionsFromPayload:wt},{kind:"product",test:t=>/products?\/list(\.tsx?)?$/i.test(t),clientFilter:!1,buildRequests:(t,e)=>yt(n=>[{resolveType:t,props:{query:n,term:n,count:10,hitsPerPage:10}}],e),optionsFromPayload:wt},{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:Ma}];function Oa(t,e,n=new Set){const r=[...e],i=c=>{const o=[];for(const d of La){if(d.kind!==c)continue;const h=r.find(m=>d.test(m)&&Ra(m,n));h&&o.push({cand:d,resolveType:h})}return o.find(d=>n.has(sn(d.resolveType)))??o[0]},u=(c,o,d)=>({kind:c.kind,id:`${c.kind}:${o}`,resolveType:o,clientFilter:c.clientFilter,isFallback:d,buildRequests:h=>c.buildRequests(o,h),optionsFromPayload:c.optionsFromPayload}),l=[];for(const c of["product","category"]){if(!t.has(c))continue;const o=i(c);o&&l.push(u(o.cand,o.resolveType,!1))}return t.size>0&&l.push(_a(t.has("category")?"category":"product")),l}function _a(t){return{kind:t,id:Mn,resolveType:Mn,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ua(e,n)}}function Ue(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Aa(t,e,n){const r=new Set,i=new Set,u=l=>{if(Array.isArray(l)){for(const d of l)u(d);return}const c=Ue(l);if(!c)return;const o=c.__resolveType;if(typeof o=="string"){if(n(o))r.add(o);else if(o in e&&!i.has(o)){i.add(o);const d=Ue(e[o])?.__resolveType;typeof d=="string"&&n(d)&&r.add(o),u(e[o])}}for(const d of Object.values(c))u(d)};return u(t),r}function fs(t){const e=new Set,n=[];for(const r of t)for(const i of r)e.has(i.value)||(e.add(i.value),n.push(i));return n}function ps(t){try{return decodeURIComponent(t)}catch{return t}}function Ba(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $a(t){const e=[];let n="^";for(const r of t)r.type==="text"?n+=Ba(r.text):(e.push(r.name),n+=r.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function hs(t,e,n){if(typeof t!="string"||!t)return null;let r;try{r=new URL(t,"https://placeholder.invalid").pathname}catch{return null}r=r.replace(/\/+$/,"");const i=ot(en(e)),{pattern:u,order:l}=$a(i),c=l.indexOf(n);if(c===-1)return null;const o=r.match(u);if(!o)return null;const d=o[c+1]?.replace(/^\/+|\/+$/g,"");return d?ps(d):null}function wt(t,e){const n=Ue(t),r=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],i=[],u=new Set;for(const l of r){const c=Ue(l);if(!c)continue;const o=hs(c.url,e.template,e.paramName);if(!o||u.has(o))continue;u.add(o);const d=Ue(c.isVariantOf),h=typeof d?.name=="string"&&d.name||typeof c.name=="string"&&c.name||o,m=Array.isArray(c.image)?Ue(c.image[0]):null,p=typeof m?.url=="string"?m.url:void 0;i.push({value:o,label:h,image:p})}return i}function Fa(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?ps(n):null}function Ma(t){const e=[],n=new Set,r=(i,u)=>{const l=Ue(i);if(!l)return;const c=typeof l.name=="string"&&l.name?l.name:"",o=c?[...u,c]:u,d=Fa(l.url);if(d&&!n.has(d)&&(n.add(d),e.push({value:d,label:o.join(" › ")||d})),Array.isArray(l.children))for(const h of l.children)r(h,o)};if(Array.isArray(t))for(const i of t)r(i,[]);return e}const Da=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 Ka(t){return(t.split("/").filter(Boolean).pop()??t).replace(/[-_]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,n=>n.toUpperCase())}function za(t){if(typeof t!="string"||!t)return[];const e=[],n=/<a\b[^>]*?\bhref="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi;let r,i=0;for(;(r=n.exec(t))!==null&&i++<5e3;){const u=r[1]??"",l=(r[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:l})}return e}function Ia(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,r=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,i=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,l=0;for(;(u=r.exec(t))!==null&&l++<3e3;){const c=(u[1]??"").replace(/\\\//g,"/");if(!c||n.has(c))continue;n.add(c);const o=t.slice(u.index,u.index+900).match(i)?.[1]?.replace(/\\\//g,"/");e.push({url:c,name:u[2]??"",image:o||void 0})}return e}function Ua(t,e){const n=[],r=new Set,i=(u,l,c,o)=>{if(n.length>=200)return;const d=hs(u,e.template,e.paramName);!d||r.has(d)||e.paramName==="*"&&/(^|\/)p$/.test(d)||c==="category"&&Da.has(d.split("/")[0]??"")||(r.add(d),n.push({value:d,label:l&&l.length<=80?l:Ka(d),kind:c,image:o}))};for(const{url:u,name:l,image:c}of Ia(t))i(u,l,"product",c);for(const{href:u,text:l}of za(t))u.startsWith("/")&&!u.startsWith("//")&&i(u,l,"category");return n}function nt(t,e,n=50){const r=e.trim().toLowerCase();return(r?t.filter(u=>u.label.toLowerCase().includes(r)||u.value.toLowerCase().includes(r)):t).slice(0,n)}const gs=1e4;function Ha(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 Va(t,{resolveType:e,props:n}){const r=await fetch(Rr(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(gs)});if(!r.ok)throw new Error(`Failed to fetch options: ${r.status}`);return r.json()}async function Dn(t,e){const n=await fetch(Lr(t,e),{signal:AbortSignal.timeout(gs)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function qa(t,e,n){const r=e.optionsFromPayload(await Dn(t,"/"),n),i=r.find(l=>l.kind==="category");if(!i)return r;const u=Fe(n.template,{[n.paramName]:i.value});if(u==="/")return r;try{const l=e.optionsFromPayload(await Dn(t,u),n).filter(c=>c.kind==="product");return fs([r,l])}catch{return r}}function Wa(t,e,n){return Vs.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Ga(t,e,n,r){if(e.homepageLinks)return qa(t,e,r);const i=e.buildRequests?.(n)??[];if(i.length===0)return[];const u=await Promise.allSettled(i.map(c=>Va(t,c))),l=u.filter(c=>c.status==="fulfilled").map(c=>c.value);if(l.length===0){const c=u.find(o=>o.status==="rejected");throw c?c.reason:new Error("Failed to fetch options")}return fs(l.map(c=>e.optionsFromPayload(c,r)))}function Qt(t,e,n,r,i){return{queryKey:Wa(t,e,n),queryFn:()=>Ga(t,e,n,r),enabled:i,staleTime:6e4,retry:1}}function st(t){const e=fe.c(16),{heading:n,iconKind:r,options:i,template:u,paramName:l,keyPrefix:c,onSelect:o}=t;if(i.length===0)return null;let d;if(e[0]!==r||e[1]!==c||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==u){let m;e[7]!==r||e[8]!==c||e[9]!==o||e[10]!==l||e[11]!==u?(m=p=>s.jsxs(it,{value:`${c}:${p.value}`,className:"gap-3 py-2",onSelect:()=>o(p.value),children:[r==="product"&&s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:p.image?s.jsx("img",{src:p.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):s.jsx(Zn,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:p.label}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[l]:p.value})})]})]},`${c}:${p.value}`),e[7]=r,e[8]=c,e[9]=o,e[10]=l,e[11]=u,e[12]=m):m=e[12],d=i.map(m),e[0]=r,e[1]=c,e[2]=o,e[3]=i,e[4]=l,e[5]=u,e[6]=d}else d=e[6];let h;return e[13]!==n||e[14]!==d?(h=s.jsx(at,{heading:n,children:d}),e[13]=n,e[14]=d,e[15]=h):h=e[15],h}function Kn(t){const e=fe.c(2),{text:n}=t;let r;return e[0]!==n?(r=s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1],r}function Ja(t){const e=fe.c(52),{sources:n,template:r,paramName:i,value:u,sandboxRef:l,onCommit:c}=t,o=Te(),[d,h]=v.useState(!1),[m,p]=v.useState(""),[E,b]=v.useState(""),P=v.useRef(null),g=i==="*"?o("sandbox.preview.catchAllParamLabel"):`:${i}`,j=Ha(o),y=[...new Set(n.map(K=>j[K.kind].noun))].join(" or ");let w;e[0]!==o||e[1]!==y?(w=o("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=o,e[1]=y,e[2]=w):w=e[2];const k=w,x={template:r,paramName:i};let B;e[3]!==m?(B=(K,T)=>({source:K,query:T,options:K.clientFilter?nt(T.data??[],m):T.data??[]}),e[3]=m,e[4]=B):B=e[4];const S=B,I=n.filter(si),F=n.filter(ni),M=Jt({queries:I.map(K=>Qt(l,K,E,x,d))});let L;e[5]!==M||e[6]!==S?(L=(K,T)=>S(K,M[T]),e[5]=M,e[6]=S,e[7]=L):L=e[7];const R=I.map(L),U=R.length===0||R.every(ti),D=Jt({queries:F.map(K=>Qt(l,K,E,x,d&&U))});let $;e[8]!==D||e[9]!==S?($=(K,T)=>S(K,D[T]),e[8]=D,e[9]=S,e[10]=$):$=e[10];const H=F.map($),W=U?H:R,V=W.length===1&&W[0]?.source.homepageLinks?W[0]:null,O=V&&!V.query.isLoading&&!V.query.isError?V?.query.data??[]:[],ne=nt(O.filter(ei),m),q=nt(O.filter(Za),m),G=ne.length>0&&q.length>0,Q=K=>{h(K),P.current&&clearTimeout(P.current),p(K?u:""),b(K?u:"")};let Y;e[11]===Symbol.for("react.memo_cache_sentinel")?(Y=K=>{p(K),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{b(K)},300)},e[11]=Y):Y=e[11];const te=Y,ae=K=>{c(K),Q(!1)},X=as(m),J=Fe(r,{[i]:X}),se=Wn,ve=qn,pe="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",de=Xa;let ie;e[12]!==g||e[13]!==o?(ie=o("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:g}),e[12]=g,e[13]=o,e[14]=ie):ie=e[14];let ue;e[15]!==ie?(ue=s.jsx(Gn,{className:"sr-only",children:s.jsx(Jn,{children:ie})}),e[15]=ie,e[16]=ue):ue=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Zn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let Z;e[18]!==o?(Z=o("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=o,e[19]=Z):Z=e[19];let oe;e[20]!==g?(oe=s.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:g}),e[20]=g,e[21]=oe):oe=e[21];let he;e[22]!==Z||e[23]!==oe?(he=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,s.jsxs("span",{className:"text-sm font-medium text-foreground",children:[Z," ",oe]})]}),e[22]=Z,e[23]=oe,e[24]=he):he=e[24];const ge=ts,Me=!1,Oe="min-h-0 flex-1";let _e;e[25]!==k||e[26]!==m?(_e=s.jsx(ns,{autoFocus:!0,placeholder:k,value:m,onValueChange:te}),e[25]=k,e[26]=m,e[27]=_e):_e=e[27];const Ve=es,ye="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let xe;e[28]!==o?(xe=o("sandbox.pathParamPickerChip.noResults"),e[28]=o,e[29]=xe):xe=e[29];let Ee;e[30]!==xe?(Ee=s.jsx(ss,{children:xe}),e[30]=xe,e[31]=Ee):Ee=e[31];const De=X&&s.jsx(at,{className:"shrink-0",children:s.jsxs(it,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>ae(X),children:[s.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:s.jsx(ea,{size:14,className:"text-muted-foreground"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block truncate text-sm",children:o("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:g})}),s.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:J})]})]})}),Ae=G?s.jsxs("div",{className:"flex min-h-0 flex-1",children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:s.jsx(st,{heading:j.category.heading,iconKind:"category",options:ne,template:r,paramName:i,keyPrefix:`${V?.source.id}:cat`,onSelect:ae})}),s.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:s.jsx(st,{heading:j.product.heading,iconKind:"product",options:q,template:r,paramName:i,keyPrefix:`${V?.source.id}:prod`,onSelect:ae})})]}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:W.map(K=>{const{source:T,query:me,options:$e}=K,{noun:Et}=j[T.kind];if(me.isLoading)return s.jsx(Kn,{text:o("sandbox.pathParamPickerChip.loading",{noun:Et})},T.id);if(me.isError)return s.jsx(Kn,{text:o("sandbox.pathParamPickerChip.couldNotLoad")},T.id);if(T.homepageLinks){const Qe=me.data??[];return s.jsxs(v.Fragment,{children:[s.jsx(st,{heading:j.category.heading,iconKind:"category",options:nt(Qe.filter(Qa),m),template:r,paramName:i,keyPrefix:`${T.id}:cat`,onSelect:ae}),s.jsx(st,{heading:j.product.heading,iconKind:"product",options:nt(Qe.filter(Ya),m),template:r,paramName:i,keyPrefix:`${T.id}:prod`,onSelect:ae})]},T.id)}return s.jsx(st,{heading:W.length>1?j[T.kind].heading:void 0,iconKind:T.kind,options:$e,template:r,paramName:i,keyPrefix:T.id,onSelect:ae},T.id)})});let Be;e[32]!==Ve||e[33]!==Ee||e[34]!==De||e[35]!==Ae?(Be=s.jsxs(Ve,{className:ye,children:[Ee,De,Ae]}),e[32]=Ve,e[33]=Ee,e[34]=De,e[35]=Ae,e[36]=Be):Be=e[36];let we;e[37]!==ge||e[38]!==_e||e[39]!==Be?(we=s.jsxs(ge,{shouldFilter:Me,className:Oe,children:[_e,Be]}),e[37]=ge,e[38]=_e,e[39]=Be,e[40]=we):we=e[40];let Ce;e[41]!==ve||e[42]!==ue||e[43]!==he||e[44]!==we||e[45]!==de?(Ce=s.jsxs(ve,{className:pe,onClick:de,children:[ue,he,we]}),e[41]=ve,e[42]=ue,e[43]=he,e[44]=we,e[45]=de,e[46]=Ce):Ce=e[46];let Ke;return e[47]!==se||e[48]!==Q||e[49]!==d||e[50]!==Ce?(Ke=s.jsx(se,{open:d,onOpenChange:Q,children:Ce}),e[47]=se,e[48]=Q,e[49]=d,e[50]=Ce,e[51]=Ke):Ke=e[51],s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button",title:o("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:g}),className:"max-w-64 shrink-0 cursor-pointer truncate rounded-lg bg-special/15 px-1 py-0.5 text-[12px] text-special hover:bg-special/25",onClick:K=>{K.stopPropagation(),Q(!0)},children:u||g}),Ke]})}function Ya(t){return t.kind==="product"}function Qa(t){return t.kind!=="product"}function Xa(t){return t.stopPropagation()}function Za(t){return t.kind==="product"}function ei(t){return t.kind!=="product"}function ti(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ni(t){return t.isFallback}function si(t){return!t.isFallback}function ri(t){const e=fe.c(8),{sources:n,template:r,paramName:i,sandboxRef:u,onFill:l}=t;let c,o;if(e[0]!==i||e[1]!==u||e[2]!==n||e[3]!==r){const E={template:r,paramName:i},b=n.filter(ai);o=Jt,c=b.map(P=>Qt(u,P,"",E,!0)),e[0]=i,e[1]=u,e[2]=n,e[3]=r,e[4]=c,e[5]=o}else c=e[4],o=e[5];let d;e[6]!==c?(d={queries:c},e[6]=c,e[7]=d):d=e[7];const h=o(d),[m,p]=v.useState(!1);if(!m)for(const E of h){if(E.isLoading)break;const b=E.data?.[0];if(b){p(!0),queueMicrotask(()=>l(b.value));break}}return null}function ai(t){return!t.isFallback}function ii(t){const e=fe.c(31),{name:n,value:r,onCommit:i}=t,u=Te(),[l,c]=v.useState(r),[o,d]=v.useState(!1),h=v.useRef(!1);let m;e[0]!==n||e[1]!==u?(m=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=m):m=e[2];const p=m,E=l||p;let b;e[3]!==E?(b=s.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:E}),e[3]=E,e[4]=b):b=e[4];let P;e[5]!==p||e[6]!==u?(P=u("sandbox.preview.valueForParam",{label:p}),e[5]=p,e[6]=u,e[7]=P):P=e[7];let g,j;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=S=>c(S.target.value),j=()=>d(!0),e[8]=g,e[9]=j):(g=e[8],j=e[9]);let N;e[10]!==r?(N=S=>{S.key==="Enter"&&S.currentTarget.blur(),S.key==="Escape"&&(h.current=!0,c(r),S.currentTarget.blur())},e[10]=r,e[11]=N):N=e[11];let y;e[12]!==l||e[13]!==i||e[14]!==r?(y=()=>{if(d(!1),h.current){h.current=!1;return}const S=as(l);c(S),S!==r&&i(S)},e[12]=l,e[13]=i,e[14]=r,e[15]=y):y=e[15];let w;e[16]!==l||e[17]!==p||e[18]!==P||e[19]!==N||e[20]!==y?(w=s.jsx("input",{type:"text",value:l,placeholder:p,title:P,spellCheck:!1,className:"absolute inset-0 rounded-sm bg-special/15 px-1 text-[12px] text-special outline-none placeholder:text-special/60 focus:bg-special/25",onClick:oi,onChange:g,onFocus:j,onKeyDown:N,onBlur:y}),e[16]=l,e[17]=p,e[18]=P,e[19]=N,e[20]=y,e[21]=w):w=e[21];let k;e[22]!==b||e[23]!==w?(k=s.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[b,w]}),e[22]=b,e[23]=w,e[24]=k):k=e[24];let x;e[25]!==o||e[26]!==u?(x=o&&s.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[s.jsx(rr,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=o,e[26]=u,e[27]=x):x=e[27];let B;return e[28]!==x||e[29]!==k?(B=s.jsxs(s.Fragment,{children:[k,x]}),e[28]=x,e[29]=k,e[30]=B):B=e[30],B}function oi(t){return t.stopPropagation()}function li(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 ci(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function di(t){const e=fe.c(5);let n;e[0]!==t?(n=t??{orgSlug:"",virtualMcpId:"",branch:""},e[0]=t,e[1]=n):n=e[1];const r=os(n);let i;return e[2]!==t||e[3]!==r?(i={mutationFn:async u=>{const{name:l,path:c,template:o}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const d=Or(l),h=o?{...o,name:l,path:c}:_r(l,c);return await r.mutateAsync({blockKey:d,data:h}),{key:d,name:l,path:c}}},e[2]=t,e[3]=r,e[4]=i):i=e[4],qs(i)}function ui(t){const e=fe.c(89),{open:n,onOpenChange:r,isPending:i,error:u,templates:l,onSubmit:c}=t,o=i===void 0?!1:i,d=Te();let h;e[0]!==d?(h=d("sectionsEditor.createPageModal.defaultPageName"),e[0]=d,e[1]=h):h=e[1];const[m,p]=v.useState(h);let E;e[2]!==d?(E=d("sectionsEditor.createPageModal.defaultPagePath"),e[2]=d,e[3]=E):E=e[3];const[b,P]=v.useState(E),[g,j]=v.useState(Vt),[N,y]=v.useState(null),[w,k]=v.useState(n);n!==w&&(k(n),n&&(p(d("sectionsEditor.createPageModal.defaultPageName")),P(d("sectionsEditor.createPageModal.defaultPagePath")),j(Vt),y(null)));const x=!!l?.length;let B;e[4]!==o||e[5]!==r?(B=Z=>{!Z&&!o&&(y(null),r(!1))},e[4]=o,e[5]=r,e[6]=B):B=e[6];const S=B;let I;e[7]!==o||e[8]!==m||e[9]!==c||e[10]!==b||e[11]!==x||e[12]!==g?(I=async Z=>{Z.preventDefault();const oe=m.trim(),he=b.trim();if(!oe||!he||o)return;const ge=is(he);if(ge){y(ge);return}y(null),await c({name:oe,path:he,templateKey:x&&g!==Vt?g:null})},e[7]=o,e[8]=m,e[9]=c,e[10]=b,e[11]=x,e[12]=g,e[13]=I):I=e[13];const F=I,M=N??u;let L;e[14]!==d?(L=d("sectionsEditor.createPageModal.title"),e[14]=d,e[15]=L):L=e[15];let R;e[16]!==L?(R=s.jsx(Gn,{children:s.jsx(Jn,{children:L})}),e[16]=L,e[17]=R):R=e[17];let U;e[18]!==d?(U=d("sectionsEditor.createPageModal.nameLabel"),e[18]=d,e[19]=U):U=e[19];let D;e[20]!==U?(D=s.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:U}),e[20]=U,e[21]=D):D=e[21];let $;e[22]===Symbol.for("react.memo_cache_sentinel")?($=Z=>p(Z.target.value),e[22]=$):$=e[22];let H;e[23]!==d?(H=d("sectionsEditor.createPageModal.namePlaceholder"),e[23]=d,e[24]=H):H=e[24];let W;e[25]!==o||e[26]!==m||e[27]!==H?(W=s.jsx(jn,{id:"new-page-name",value:m,onChange:$,placeholder:H,autoFocus:!0,disabled:o}),e[25]=o,e[26]=m,e[27]=H,e[28]=W):W=e[28];let V;e[29]!==W||e[30]!==D?(V=s.jsxs("div",{className:"space-y-1.5",children:[D,W]}),e[29]=W,e[30]=D,e[31]=V):V=e[31];let ee;e[32]!==d?(ee=d("sectionsEditor.createPageModal.pathLabel"),e[32]=d,e[33]=ee):ee=e[33];let O;e[34]!==ee?(O=s.jsx("label",{htmlFor:"new-page-path",className:"text-xs font-medium text-muted-foreground",children:ee}),e[34]=ee,e[35]=O):O=e[35];let ne;e[36]===Symbol.for("react.memo_cache_sentinel")?(ne=Z=>P(Z.target.value),e[36]=ne):ne=e[36];let q;e[37]!==d?(q=d("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=d,e[38]=q):q=e[38];let G;e[39]!==o||e[40]!==b||e[41]!==q?(G=s.jsx(jn,{id:"new-page-path",value:b,onChange:ne,placeholder:q,disabled:o}),e[39]=o,e[40]=b,e[41]=q,e[42]=G):G=e[42];let Q;e[43]!==O||e[44]!==G?(Q=s.jsxs("div",{className:"space-y-1.5",children:[O,G]}),e[43]=O,e[44]=G,e[45]=Q):Q=e[45];let Y;e[46]!==o||e[47]!==x||e[48]!==d||e[49]!==g||e[50]!==l?(Y=x&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:d("sectionsEditor.createPageModal.templateLabel")}),s.jsx(Ar,{id:"new-page-template",value:g,onChange:j,templates:l??[],disabled:o})]}),e[46]=o,e[47]=x,e[48]=d,e[49]=g,e[50]=l,e[51]=Y):Y=e[51];let te;e[52]!==M?(te=M&&s.jsx("p",{className:"text-xs text-destructive",children:M}),e[52]=M,e[53]=te):te=e[53];let ae;e[54]!==V||e[55]!==Q||e[56]!==Y||e[57]!==te?(ae=s.jsxs("div",{className:"space-y-4 py-4",children:[V,Q,Y,te]}),e[54]=V,e[55]=Q,e[56]=Y,e[57]=te,e[58]=ae):ae=e[58];let X;e[59]!==r?(X=()=>r(!1),e[59]=r,e[60]=X):X=e[60];let J;e[61]!==d?(J=d("sectionsEditor.createPageModal.cancelButton"),e[61]=d,e[62]=J):J=e[62];let se;e[63]!==o||e[64]!==X||e[65]!==J?(se=s.jsx(He,{type:"button",variant:"outline",onClick:X,disabled:o,children:J}),e[63]=o,e[64]=X,e[65]=J,e[66]=se):se=e[66];let ve;e[67]!==o||e[68]!==m||e[69]!==b?(ve=!m.trim()||!b.trim()||o,e[67]=o,e[68]=m,e[69]=b,e[70]=ve):ve=e[70];let pe;e[71]!==o||e[72]!==d?(pe=o?s.jsxs(s.Fragment,{children:[s.jsx(St,{className:"size-3.5"}),d("sectionsEditor.createPageModal.creatingButton")]}):d("sectionsEditor.createPageModal.createButton"),e[71]=o,e[72]=d,e[73]=pe):pe=e[73];let de;e[74]!==ve||e[75]!==pe?(de=s.jsx(He,{type:"submit",disabled:ve,children:pe}),e[74]=ve,e[75]=pe,e[76]=de):de=e[76];let ie;e[77]!==se||e[78]!==de?(ie=s.jsxs(Ws,{children:[se,de]}),e[77]=se,e[78]=de,e[79]=ie):ie=e[79];let ue;e[80]!==F||e[81]!==ae||e[82]!==ie||e[83]!==R?(ue=s.jsx(qn,{className:"sm:max-w-md",children:s.jsxs("form",{onSubmit:F,children:[R,ae,ie]})}),e[80]=F,e[81]=ae,e[82]=ie,e[83]=R,e[84]=ue):ue=e[84];let be;return e[85]!==S||e[86]!==n||e[87]!==ue?(be=s.jsx(Wn,{open:n,onOpenChange:S,children:ue}),e[85]=S,e[86]=n,e[87]=ue,e[88]=be):be=e[88],be}function mi(t){const e=fe.c(29),{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,blockKey:o}=t,d=Te();let h;e[0]!==i||e[1]!==n||e[2]!==r?(h={orgSlug:n,virtualMcpId:r,branch:i},e[0]=i,e[1]=n,e[2]=r,e[3]=h):h=e[3];const m=os(h);let p;e[4]!==m?(p=Fr((k,x)=>m.mutate({blockKey:k,data:x})),e[4]=m,e[5]=p):p=e[5];const E=p;let b;e[6]!==o||e[7]!==c?(b=Br(c,o),e[6]=o,e[7]=c,e[8]=b):b=e[8];const{resolveType:P,props:g,title:j}=b;if(!P){let k;e[9]!==d?(k=d("sandbox.preview.loaderNoLongerExists"),e[9]=d,e[10]=k):k=e[10];let x;return e[11]!==k?(x=s.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:k}),e[11]=k,e[12]=x):x=e[12],x}const N=`loader:${o}`;let y;e[13]!==o||e[14]!==P||e[15]!==j?(y={mode:"saved",blockKey:o,resolveType:P,title:j},e[13]=o,e[14]=P,e[15]=j,e[16]=y):y=e[16];let w;return e[17]!==i||e[18]!==c||e[19]!==l||e[20]!==n||e[21]!==u||e[22]!==g||e[23]!==m.isPending||e[24]!==E||e[25]!==N||e[26]!==y||e[27]!==r?(w=s.jsx($r,{orgSlug:n,virtualMcpId:r,branch:i,previewUrl:u,meta:l,decofile:c,kind:"loaders",target:y,initialValue:g,isCreating:m.isPending,onCreate:fi,onSaveReferencedBlock:E,showRun:!1},N),e[17]=i,e[18]=c,e[19]=l,e[20]=n,e[21]=u,e[22]=g,e[23]=m.isPending,e[24]=E,e[25]=N,e[26]=y,e[27]=r,e[28]=w):w=e[28],w}async function fi(){}function pi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function zn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:pi(t.error)}}function hi(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 gi(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=hi(t.lifecyclePhase);if(e==="terminal-error")return{kind:"error",source:"sandbox"};if(e==="booting")return{kind:"loading"};const n=t.decofile.status==="error"&&!t.decofile.hasData||t.meta.status==="error"&&!t.meta.hasData;return n&&t.lifecyclePhase==="checking-out"?{kind:"loading"}:[t.decofile,t.meta].some(i=>i.status==="error"&&!i.hasData&&i.errorStatus===404)?{kind:"empty",reason:"framework-missing"}:n?t.lifecyclePhase==="running"||t.lifecyclePhase==="crashed"?{kind:"error",source:"data"}:{kind:"loading"}:!t.decofile.hasData||!t.meta.hasData?{kind:"loading"}:t.hasEditableContent?{kind:"content"}:{kind:"empty",reason:"no-content"}}const vi="https://github.com/decocms/blocks";function bi(){const t=fe.c(14),e=Te();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ar,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=r):r=t[2];let i;t[3]!==e?(i=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=i):i=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Yn,{size:14}),t[7]=l):l=t[7];let c;t[8]!==u?(c=s.jsx(He,{size:"sm",asChild:!0,children:s.jsxs("a",{href:vi,target:"_blank",rel:"noreferrer",children:[u,l]})}),t[8]=u,t[9]=c):c=t[9];let o;return t[10]!==r||t[11]!==i||t[12]!==c?(o=s.jsx(nn,{className:"h-full w-full",image:n,title:r,description:i,actions:c}),t[10]=r,t[11]=i,t[12]=c,t[13]=o):o=t[13],o}function xi(t){const e=fe.c(15),{source:n,onRetry:r}=t,i=Te();let u;e[0]!==n||e[1]!==i?(u=i(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=i,e[2]=u):u=e[2];const l=u;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ta,{size:48,className:"text-muted-foreground"}),e[3]=c):c=e[3];let o;e[4]!==i?(o=i("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=i,e[5]=o):o=e[5];let d;e[6]!==i?(d=i("mainPanelTabs.blocksTabStates.retry"),e[6]=i,e[7]=d):d=e[7];let h;e[8]!==r||e[9]!==d?(h=s.jsx(He,{variant:"outline",size:"sm",onClick:r,children:d}),e[8]=r,e[9]=d,e[10]=h):h=e[10];let m;return e[11]!==l||e[12]!==o||e[13]!==h?(m=s.jsx(nn,{image:c,title:o,description:l,actions:h}),e[11]=l,e[12]=o,e[13]=h,e[14]=m):m=e[14],m}const yi=v.lazy(()=>Gs(()=>import("./sections-editor-D06mA4CH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162])).then(t=>({default:t.SectionsEditor})));function In(t){const e=fe.c(50),{virtualMcpId:n,externalSelection:r,onViewJsonFile:i}=t,u=r===void 0?null:r,{org:l}=Xt(),{currentBranch:c,taskId:o}=jt(),d=ds(),h=Zt(),m=us(),p=d.lifecycle.phase==="running",E=h.previewUrl;let b;e[0]!==c||e[1]!==l||e[2]!==E||e[3]!==o||e[4]!==n?(b=c?{orgSlug:l.slug,virtualMcpId:n,branch:c,threadId:o??null,previewUrl:E}:null,e[0]=c,e[1]=l,e[2]=E,e[3]=o,e[4]=n,e[5]=b):b=e[5];const P=b;let g;e[6]!==p?(g={fetchEnabled:p},e[6]=p,e[7]=g):g=e[7];const j=tn(P,g);let N;e[8]!==p?(N={fetchEnabled:p},e[8]=p,e[9]=N):N=e[9];const y=ls(P,N),w=gi({lifecyclePhase:d.lifecycle.phase,decofile:zn(j),meta:zn(y),hasEditableContent:Pr(j.data,y.data),fastPreviewActive:rs(n).runtime==="cms"}),k=wi;if(w.kind==="loading"){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(Js,{})),e[10]=O):O=e[10],O}if(w.kind==="empty"){let O;return e[11]===Symbol.for("react.memo_cache_sentinel")?(O=k(s.jsx(bi,{})),e[11]=O):O=e[11],O}if(w.kind==="error"){let O;e[12]!==j||e[13]!==h||e[14]!==y||e[15]!==w.source?(O=()=>{if(w.source==="sandbox"){h.retry();return}Promise.all([j.refetch(),y.refetch()])},e[12]=j,e[13]=h,e[14]=y,e[15]=w.source,e[16]=O):O=e[16];const ne=O;let q;return e[17]!==ne||e[18]!==w.source?(q=k(s.jsx(xi,{source:w.source,onRetry:ne})),e[17]=ne,e[18]=w.source,e[19]=q):q=e[19],q}let x;e[20]===Symbol.for("react.memo_cache_sentinel")?(x=O=>k(s.jsx("div",{className:"h-full min-h-0",children:O})),e[20]=x):x=e[20];const B=x,S=m.state.target;if(S?.kind==="loader"&&j.data&&y.data){const O=c??"",ne=E??null;let q;return e[21]!==j.data||e[22]!==y.data||e[23]!==l.slug||e[24]!==O||e[25]!==ne||e[26]!==S.key||e[27]!==n?(q=B(s.jsx(mi,{orgSlug:l.slug,virtualMcpId:n,branch:O,previewUrl:ne,meta:y.data,decofile:j.data,blockKey:S.key})),e[21]=j.data,e[22]=y.data,e[23]=l.slug,e[24]=O,e[25]=ne,e[26]=S.key,e[27]=n,e[28]=q):q=e[28],q}let I;e[29]!==c||e[30]!==l.slug||e[31]!==S||e[32]!==n?(I=S||!c?null:Qn(Xn(l.slug,n,c)),e[29]=c,e[30]=l.slug,e[31]=S,e[32]=n,e[33]=I):I=e[33];const F=I;let M="/",L=null,R=null;S?.kind==="page"?(M=S.path,L=S.key):S?.kind==="section"?R=S.key:F&&(M=F.path,L=F.pageKey);const U=L?`page:${L}`:R?`section:${R}`:`path:${M}`;let D;e[34]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"h-full flex items-center justify-center",children:s.jsx(St,{className:"size-5 text-muted-foreground"})}),e[34]=D):D=e[34];const $=c??"",H=E??void 0,W=R?null:u,V=!!L&&m.state.editSeoPageKey===L;let ee;return e[35]!==R||e[36]!==L||e[37]!==M||e[38]!==U||e[39]!==i||e[40]!==l.slug||e[41]!==W||e[42]!==V||e[43]!==$||e[44]!==H||e[45]!==n||e[46]!==m.consumeEditSeo||e[47]!==m.setFocusedBlock||e[48]!==m.setVariantOverride?(ee=B(s.jsx(v.Suspense,{fallback:D,children:s.jsx(yi,{orgSlug:l.slug,virtualMcpId:n,branch:$,previewReady:!0,previewUrl:H,currentPath:M,activePageBlockKey:L,activeGlobalBlockKey:R,externalSelection:W,initialEditSeo:V,onExitSeo:m.consumeEditSeo,onVariantPreviewOverride:m.setVariantOverride,onFocusedBlockChange:m.setFocusedBlock,onViewJsonFile:i},U)})),e[35]=R,e[36]=L,e[37]=M,e[38]=U,e[39]=i,e[40]=l.slug,e[41]=W,e[42]=V,e[43]=$,e[44]=H,e[45]=n,e[46]=m.consumeEditSeo,e[47]=m.setFocusedBlock,e[48]=m.setVariantOverride,e[49]=ee):ee=e[49],ee}function wi(t){return s.jsx("div",{"data-testid":"blocks-panel",className:"h-full min-h-0 overflow-hidden",children:t})}function Un(t){const e=fe.c(39),{virtualMcpId:n,pageKey:r,onClose:i,ref:u}=t,l=Te(),c=sa(),o=Mr(n);let d;e[0]!==o||e[1]!==r?(d=Dr(o,ra(r)),e[0]=o,e[1]=r,e[2]=d):d=e[2];const h=d,{org:m}=Xt(),{currentBranch:p,taskId:E}=jt(),P=Zt().previewUrl;let g;e[3]!==p||e[4]!==m.slug||e[5]!==P||e[6]!==E||e[7]!==n?(g=p?{orgSlug:m.slug,virtualMcpId:n,branch:p,threadId:E??null,previewUrl:P}:null,e[3]=p,e[4]=m.slug,e[5]=P,e[6]=E,e[7]=n,e[8]=g):g=e[8];const N=tn(g),y=p??"";let w;e[9]!==m.slug||e[10]!==y||e[11]!==n?(w={orgSlug:m.slug,virtualMcpId:n,branch:y},e[9]=m.slug,e[10]=y,e[11]=n,e[12]=w):w=e[12];const{save:k,flush:x}=Kr(w),B=N.data?.[r],S=N.data===void 0&&N.isLoading,I=N.data!==void 0&&B===void 0,F=!p||I||S;let M;e[13]!==B?(M=B===void 0?"":JSON.stringify(B,null,2),e[13]=B,e[14]=M):M=e[14];const L=M;let R;e[15]!==r||e[16]!==F||e[17]!==k?(R=V=>{if(F)return;let ee;try{ee=JSON.parse(V)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||k(r,ee)},e[15]=r,e[16]=F,e[17]=k,e[18]=R):R=e[18];const U=R;let D;e[19]!==x?(D=()=>({flush:x}),e[19]=x,e[20]=D):D=e[20],v.useImperativeHandle(u,D);let $;e[21]!==h||e[22]!==c||e[23]!==i||e[24]!==l?($=c?s.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:s.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):s.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[s.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:l("sectionsEditor.pageJsonDialog.titleShort")}),s.jsx(He,{variant:"ghost",size:"icon",onClick:i,"aria-label":l("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:s.jsx(Ys,{size:14})})]}),e[21]=h,e[22]=c,e[23]=i,e[24]=l,e[25]=$):$=e[25];let H;e[26]!==N.data||e[27]!==x||e[28]!==L||e[29]!==S||e[30]!==I||e[31]!==r||e[32]!==F||e[33]!==U||e[34]!==l?(H=S?s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(St,{className:"size-5 text-muted-foreground"})}):I?s.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",l("sectionsEditor.pageJsonDialog.pageNotFound")]}):s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(na,{code:L,language:"json",readOnly:F,height:"100%",onChange:V=>U(V??""),onSave:V=>{U(V),x()}},`${r}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=x,e[28]=L,e[29]=S,e[30]=I,e[31]=r,e[32]=F,e[33]=U,e[34]=l,e[35]=H):H=e[35];let W;return e[36]!==$||e[37]!==H?(W=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[$,H]}),e[36]=$,e[37]=H,e[38]=W):W=e[38],W}function vs(t){return t.contentEditingEnabled&&!t.isMobile}function ki(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Pi(t,e){return t==="blocks"?"preview":e?"blocks":t}function Si(t){return vs({contentEditingEnabled:cs(t.cmsMode),isMobile:t.isMobile})?"blocks":"preview"}function ji(t){return t.editingMode==="blocks"&&!t.blocksEditingEnabled||t.editingMode==="visual"&&!t.sandboxDisplay?"preview":t.editingMode}const Ei=500,Ni={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Hn=1,kt=["desktop","mobile","tablet"],Ti=["preview","visual","blocks"],Vn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Ci(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 rt(t){if(!t)return null;try{return new URL(t,window.location.href).origin}catch{return null}}function Gt(t,e){try{return new URL(t,e).href}catch{return null}}function Ri(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 Li(t,e){return!t||t.nav!==e.nav?!1:t.content!==e.content}function Oi(t,e,n){const r=t.toLowerCase(),i=e.toLowerCase(),u=i.split("/").filter(Boolean),l=o=>{if(o===n)return 100;const d=o.indexOf(n);if(d===-1)return 0;let h=40;return d===0?h+=30:/[\s/-]/.test(o[d-1]??"")&&(h+=20),h+=Math.round(n.length/o.length*20),h};let c=Math.max(l(r),l(i));return u.at(-1)===n?c=Math.max(c,95):u.includes(n)&&(c=Math.max(c,90)),c}function _i(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ai({virtualMcpId:t}){const e=Te(),n=Cr(),{currentBranch:r,taskId:i,virtualMcpId:u}=jt(),l=us(),c=vr(u===t?t:null),o=rs(t),d=aa(c?.metadata?.ui?.layout??null),h=cs(d),m=vs({contentEditingEnabled:h,isMobile:n}),[p]=v.useState(()=>Si({cmsMode:d,isMobile:n})),[E,b]=En(Nn.previewEditingMode(t),a=>a&&Ti.includes(a)?a:null),P=E??p,[g,j]=En(Nn.previewDeviceSize(t),a=>a&&kt.includes(a)?a:"desktop"),[N,y]=v.useState(null),[w,k]=v.useState(null),x=v.useRef(null),B=v.useRef(null),[S,I]=v.useState(!1),F=v.useRef(null),M=()=>{F.current?.flush(),I(!1)},L=()=>I(a=>(a&&F.current?.flush(),!a)),[R,U]=v.useState({width:0,height:0}),[D,$]=v.useState(!1),[H,W]=v.useState(""),V=v.useRef(null),[ee,O]=v.useState(!1),[ne,q]=v.useState(),[G,Q]=v.useState(null),[Y,te]=v.useState(null),[ae,X]=v.useState(null),[J,se]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.path:"/"),[ve,pe]=v.useState(()=>l.state.target?.kind==="page"?l.state.target.key:null),[de,ie]=v.useState({}),[ue,be]=v.useState(!1),Z=v.useRef(null),oe=()=>{be(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>be(!1),15e3)},he=()=>{Z.current&&(clearTimeout(Z.current),Z.current=null),be(!1)},{org:ge}=Xt(),Me=ds(),Oe=Zt(),_e=Oe.vmEntry,Ve=Me.lifecycle.phase,{url:ye}=Sr(t),xe=ye??Oe.previewUrl,Ee=!!ye||Ve==="running",De=c?.id===t?yr(c.metadata):null,Ae=!ye&&c?.id===t&&o.runtime==="cms",Be=o.projectDefault==="cms",we=qr({sandboxUrl:xe,previewServerUrl:De,fastPreviewActive:Ae}),Ce=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null,previewUrl:xe}:null,Ke=tn(Ce,{fetchEnabled:Ee}),K=ls(Ce,{fetchEnabled:Ee}),T=Ke.data,me=K.data,$e=T?jr(T).sort((a,f)=>a.name.localeCompare(f.name)):[],Et=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r}:null,Qe=di(Et),Nt=T&&me?Er(T,me):[],rn=T&&me?zr(me,T,"loaders"):[],an=H?(()=>{const a=H.toLowerCase();return $e.map(f=>({page:f,score:Oi(f.name,f.path,a)})).filter(({score:f})=>f>0).sort((f,C)=>C.score-f.score||f.page.path.length-C.page.path.length).map(({page:f})=>f)})():$e,on=Nt.filter(a=>{if(!H)return!0;const f=H.toLowerCase();return a.name.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),ln=m?rn:[],cn=ln.filter(a=>{if(!H)return!0;const f=H.toLowerCase();return a.title.toLowerCase().includes(f)||a.key.toLowerCase().includes(f)||a.resolveType.toLowerCase().includes(f)}),lt=Y?rn.find(a=>a.key===Y)??null:null,Ne=en,Tt=G||Y?null:Nr($e,J,ve),z=Tt?.key??null,qe=l.state.target?.kind==="section"?l.state.target.key:l.state.focusedBlockKey??z,ct=Tt?.path??null,We=(z?de[z]:void 0)??{},ke=Fe(J,We),Ct={};if(Ee&&xe&&me&&T){const a=Ir(me,"loaders"),f=z?T[z]:void 0,C=Aa(f,T,re=>a.has(re)),_=Ca(C);for(const re of ot(J)){if(re.type!=="param")continue;const Le=Ea(J,re.name,C),Se=Oa(Le,a,_);Se.length>0&&(Ct[re.name]=Se)}}const dt=t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,threadId:i??null}:null,dn=T&&z?Tr(T,z,0):[],un=T?Ur(dn,T):[],Rt=un.map(a=>a.isSavedBlock?a.label:""),Lt=un.map(a=>a.isSavedBlock?"global":a.isMultivariate?"variant":"normal"),Ot=dn.map(a=>Yt(a,T??{})),mn=v.useRef(null),Pe=v.useRef(null),bs=Me.status.state==="paused",_t=Me.phase,fn=Hr({claimPhase:_t,lifecycle:Me.lifecycle}),ze=Oe.previewState,xs=Oe.userStopped,ys=Qr(ge.slug,t??"",r??""),{url:Ie}=Yr(Ae&&t&&r?{orgSlug:ge.slug,virtualMcpId:t,branch:r,previewServerUrl:De??null,path:ke}:null),ws=Be&&o.runtime==="sandbox",A=ma({previewState:ze,progressStatus:fn.status,previewServerUrl:De,fastPreviewActive:Ae,fastPreviewReady:!!Ie,codingSession:ws,localPreviewUrl:ye}),ut=A.mode!=="none",ks=A.mode==="production"&&A.iframeBase?rt(A.iframeBase):null,Ge=A.mode==="production"?ks:rt(xe),Ps=c?.id===t&&c.metadata?.fastPreviewInPlace===!0,Xe=ye?A.mode==="sandbox"&&m&&P==="blocks":A.mode==="production"&&Ae&&Ps&&m&&P==="blocks",pn=v.useRef(null),{pin:Ss,effective:js}=Ri(pn.current,{inPlaceRenderActive:Xe,draftPreviewUrl:Ie,resolvedPath:ke});pn.current=Ss;const Re=Ci(A.mode==="sandbox"?bt(_n(ae??Gt(ke,A.iframeBase)??A.iframeBase,g),l.state.variantOverride??[]):A.mode==="production"?bt(_n(Wr(ae??js??Gt(ke,A.iframeBase)??A.iframeBase,A.showWakingPill?Gr:null),g),l.state.variantOverride??[]):null),hn=Ie??(A.iframeBase?Gt(ke,A.iframeBase):null),Es=A.mode==="production"?hn?bt(hn,l.state.variantOverride??[]):null:Re??A.iframeBase,Ns=()=>{const a=Es;a&&window.open(a,"_blank","noopener")},Ze=t&&r?Xn(ge.slug,t,r):null,et=a=>{Ze&&nr(Ze,a)},le=l.state.target;v.useEffect(()=>{if(!(!le||!we||!me))if(le.kind==="page"){const a=de[le.key]??{};Pe.current=Fe(le.path,a),Q(null),te(null),X(null),pe(le.key),se(le.path),et({path:le.path,pageKey:le.key,params:a})}else if(le.kind==="loader")Pe.current=null,Q(null),te(le.key),X(null);else{const a=Nt.find(f=>f.key===le.key);if(a){Pe.current=null;const f=Ln(me);te(null),Q(a),X(On(we,f,a.key))}}},[le,we,me,de]),v.useEffect(()=>{!z||ct===null||le?.kind==="page"&&le.key===z&&le.path===ct||l.selectTarget({kind:"page",key:z,path:ct})},[z,ct,le]);const[gn,Ts]=v.useState(null);if(ze.kind==="iframe"&&gn!==ze.previewUrl){const a=gn!==null;Ts(ze.previewUrl);const f=Ze?Qn(Ze):null;if(f){if(Pe.current=Fe(f.path,f.params),se(f.path),pe(f.pageKey),X(null),Q(null),te(null),f.pageKey&&Object.keys(f.params).length>0){const C=f.pageKey;ie(_=>({..._,[C]:f.params}))}}else a&&(Pe.current=null,se("/"),X(null),pe(null),Q(null),te(null))}mn.current=Re;const vn=ga({iframeRef:x,src:A.mode==="sandbox"?Re:null,active:A.mode==="sandbox"}),bn=v.useRef(null);v.useEffect(()=>{if(!Ie||!Re||bn.current===Ie)return;bn.current=Ie;const a=x.current;a&&a.getAttribute("src")!==Re&&(oe(),a.src=Re)},[Ie,Re]);const xn=()=>{const a=x.current?.contentWindow,f=Ge;if(!a||!f||!T||!z)return;const C=T[z];if(!C||typeof C!="object")return;const _=Jr({previewBaseUrl:f,pageBlock:C,decofile:T,path:ke,pathTemplate:J});if(!_)return;const re=bt(_.src,Vr(l.state.variantOverride??[],z));a.postMessage({type:"cms-editor::render",src:re,body:_.body},f)},At=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!T){At.current=null;return}const a={nav:JSON.stringify({page:z,path:ke,pathTemplate:J}),content:JSON.stringify(T)},f=Li(At.current,a);At.current=a,f&&xn()},[T,Xe,G,Y,z,ke,J]);const Bt=v.useRef(null);v.useEffect(()=>{if(!Xe||G||Y||!z||!T){Bt.current=null;return}const a=JSON.stringify(l.state.variantOverride??null),f=Bt.current;Bt.current={page:z,sig:a},!(!f||f.page!==z||f.sig===a)&&xn()},[l.state.variantOverride,Xe,G,Y,z]);const Cs=!!t&&!!r&&!Me.notFound&&!xs&&!bs&&(_t?.kind==="ready"||Ve!=="idle"),ce=ji({editingMode:P,sandboxDisplay:A.mode==="sandbox",blocksEditingEnabled:m});v.useEffect(()=>{const a=Ge;if(!a)return;const f=C=>{if(C.origin===a)if(C.data?.type==="visual-editor::element-clicked"){const _=va.safeParse(C.data.payload);_.success&&y(_.data)}else if(C.data?.type==="cms-editor::section-clicked"){const _=ya.safeParse(C.data.payload);_.success&&k({index:_.data.sectionIndex,seq:_.data.clickSeq})}else C.data?.type==="cms-editor::render-start"?oe():C.data?.type==="cms-editor::render-end"?(he(),x.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Rt,kinds:Lt,keys:Ot},a)):C.data?.type==="cms-editor::render-error"&&he()};return window.addEventListener("message",f),()=>window.removeEventListener("message",f)},[Ge,Rt,Lt,Ot]);const yn=()=>{const a=x.current?.contentWindow,f=rt(xe);!a||!f||a.postMessage({type:"visual-editor::activate",script:ba},f)},Rs=()=>{const a=x.current?.contentWindow,f=rt(xe);!a||!f||a.postMessage({type:"visual-editor::deactivate"},f)},$t=()=>{const a=x.current?.contentWindow,f=Ge;!a||!f||(a.postMessage(A.mode==="production"||ye?{type:"editor::inject",args:{script:Fn}}:{type:"visual-editor::activate",script:Fn},f),a.postMessage({type:"cms-editor::set-labels",labels:Rt,kinds:Lt,keys:Ot},f))},Ls=()=>{const a=x.current?.contentWindow,f=Ge;!a||!f||a.postMessage({type:"cms-editor::deactivate"},f)},Os=()=>{const a=x.current?.contentWindow,f=Ge;!a||!f||(a.postMessage({type:"cms-editor::clear-hover"},f),a.postMessage({type:"visual-editor::clear-hover"},f))},mt=a=>{if(a==="blocks"&&!m)return;const f=P;!n&&a!==f&&(a==="blocks"?B.current?.resize("30%"):B.current?.collapse()),b(a),y(null),k(null),a!=="blocks"&&te(null),f==="visual"&&Rs(),a==="visual"&&yn(),f==="blocks"&&a!=="blocks"&&Ls(),a==="blocks"&&$t()},_s=()=>{mt(ki(P,m))},As=()=>{mt(Pi(P,m))};Zr(()=>{const a=x.current;if(!a)return;oe();const f=document.activeElement,C=a.tabIndex;a.tabIndex=-1,a.style.pointerEvents="none",a.blur(),_i(a,mn.current);let _;const re=()=>{clearTimeout(_),a.tabIndex=C,a.style.pointerEvents="";const Le=document.activeElement;(!Le||Le===document.body||Le===a)&&f?.focus(),a.removeEventListener("load",re)};a.addEventListener("load",re),_=setTimeout(re,3e3)});const Bs=()=>{const a=kt.indexOf(g);j(kt[(a+1)%kt.length])},Ft=(a,f)=>{if(!z)return;const C=z,_={...We,[a]:f};Pe.current=Fe(J,_),ie(re=>({...re,[C]:_})),et({path:J,pageKey:C,params:_})},$s=li({iframeBase:A.iframeBase,resolvedPath:ke,activeGlobalSectionName:G?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),wn=a=>{const f=de[a.key]??{},C=Fe(a.path,f);(G||Ne(C)!==Ne(ke))&&oe(),Pe.current=C,Q(null),te(null),X(null),k(null),pe(a.key),se(a.path),et({path:a.path,pageKey:a.key,params:f}),l.selectTarget({kind:"page",key:a.key,path:a.path})};tr(Ze,a=>{(G||Ne(a)!==Ne(ke))&&oe(),Pe.current=a,Q(null),te(null),X(null),k(null),pe(null),se(a),et({path:a,pageKey:null,params:{}})});const Fs=a=>{if(!we||!me){Cn.error(e("sandbox.preview.previewMetadataNotReady"));return}oe(),Pe.current=null;const f=Ln(me),C=On(we,f,a.key);Q(a),te(null),X(C),k(null),l.selectTarget({kind:"section",key:a.key})},Ms=a=>{m&&(Q(null),te(a.key),X(null),mt("blocks"),l.selectTarget({kind:"loader",key:a.key}))},Ds=async({name:a,path:f,templateKey:C})=>{if(!t||!r)return;const _=is(f);if(_){q(_);return}const re=f.trim().startsWith("/")?f.trim():`/${f.trim()}`;if($e.some(Se=>Ne(Se.path)===Ne(re))){q(e("sandbox.preview.pageAlreadyExists",{path:re}));return}let Le;if(C&&(Le=T?.[C],!Le)){q(e("sandbox.preview.templateNoLongerExists"));return}q(void 0);try{const Se=await Qe.mutateAsync({name:a,path:re,template:Le});O(!1),Cn.success(e("sandbox.preview.pageCreated",{name:a})),await ia(Ei),wn({key:Se.key,name:Se.name,path:Se.path}),mt("blocks")}catch(Se){q(Se instanceof Error?Se.message:e("sandbox.preview.failedToCreatePage"))}},ft=ut&&(Cs||A.mode==="production"),Ks=ci({showPreviewToolbar:ft,contentEditingEnabled:h}),pt=()=>{$(!1),W("")},Mt=G?.name??lt?.title??Tt?.name,Dt=Ke.isPending||K.isPending,Kt=Dt?rt(A.iframeBase):Mt,ht=G?`section:${G.key}`:Y?`loader:${Y}`:z?`page:${z}`:void 0,zs=ft?Ks?s.jsxs(pr,{open:D,onOpenChange:a=>{$(a),a||W("")},children:[s.jsx(hr,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:Dt?Kt??void 0:G||lt?Mt:[Mt,J].filter(Boolean).join(" · "),className:"group/page-picker flex h-7 w-fit min-w-[320px] items-stretch overflow-hidden whitespace-nowrap rounded-[var(--studio-button-radius,calc(var(--radius)*1.333))] border border-border/60 bg-background text-left text-xs text-muted-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[G&&s.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded bg-global-section/14 px-1.5 py-0.5 text-[11px] font-medium text-global-section-fg dark:text-global-section-fg-dark",children:[s.jsx(ir,{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-[11px] font-medium text-muted-foreground",children:[s.jsx(or,{size:11}),e("sandbox.preview.loaderBadge")]}),Kt&&s.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Kt}),!Dt&&!G&&!lt&&s.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:J}),s.jsx(sr,{size:12,className:zt("shrink-0 transition-transform",D&&"rotate-180")})]})})}),s.jsxs(gr,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[s.jsxs(ts,{shouldFilter:!1,defaultValue:ht,children:[s.jsx(ns,{value:H,onValueChange:a=>{W(a),V.current?.scrollTo({top:0})},placeholder:e("sandbox.preview.searchPagesAndComponents")}),s.jsxs(es,{ref:V,className:"max-h-80",children:[s.jsx(ss,{children:$e.length===0&&Nt.length===0&&ln.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),an.length>0&&s.jsx(at,{children:an.map(a=>s.jsxs(it,{value:`page:${a.key}`,"aria-current":ht===`page:${a.key}`||void 0,title:`${a.name} · ${a.path}`,onSelect:()=>{pt(),wn(a)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.name}),s.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:a.path})]},a.key))}),on.length>0&&s.jsx(at,{heading:e("sandbox.preview.globalComponents"),children:on.map(a=>s.jsx(it,{value:`section:${a.key}`,"aria-current":ht===`section:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),Fs(a)},children:s.jsx("span",{className:"truncate",children:a.name})},a.key))}),cn.length>0&&s.jsx(at,{heading:e("sandbox.preview.globalLoaders"),children:cn.map(a=>s.jsx(it,{value:`loader:${a.key}`,"aria-current":ht===`loader:${a.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),Ms(a)},children:s.jsx("span",{className:"truncate",children:a.title})},a.key))})]})]}),!G&&!Y&&ot(J).some(a=>a.type!=="text")&&s.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:ot(J).map((a,f)=>{if(a.type==="text")return s.jsx("span",{children:a.text},`text-${f}`);const C=Ct[a.name];return C&&dt?s.jsx(Ja,{sources:C,template:J,paramName:a.name,value:We[a.name]??"",sandboxRef:dt,onCommit:_=>Ft(a.name,_)},`${z}:${a.name}`):s.jsx(ii,{name:a.name,value:We[a.name]??"",onCommit:_=>Ft(a.name,_)},`${z}:${a.name}`)})}),s.jsx("div",{className:"border-t p-1.5",children:s.jsxs(He,{variant:"ghost",className:"w-full justify-start",onClick:()=>{pt(),q(void 0),O(!0)},children:[s.jsx(fr,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):s.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:$s}):null,kn=ft||h?s.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[s.jsxs(It,{children:[s.jsx(Ut,{asChild:!0,children:s.jsx(tt,{onClick:Bs,"aria-label":e(Vn[g]),children:g==="mobile"?s.jsx(lr,{size:16}):g==="tablet"?s.jsx(cr,{size:16}):s.jsx(dr,{size:16})})}),s.jsx(Ht,{children:e(Vn[g])})]}),zs,s.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.jsx(tt,{onClick:Ns,"aria-label":e("sandbox.preview.openInNewTab"),children:s.jsx(Yn,{size:16})})})]}):null,Is=A.mode==="sandbox",gt=Ni[g],vt=g==="desktop"&&(R.width===0||R.width>=gt.width+2*Hn),Pn=vt?1:Math.min(R.width>0?R.width/(gt.width+2*Hn):1,1),Us=vt?{width:"100%",height:"100%"}:{width:`${gt.width}px`,height:R.height>0?`${R.height/Pn}px`:`${gt.height}px`,transform:`scale(${Pn})`,transformOrigin:"top center"},Sn=s.jsxs(s.Fragment,{children:[Is&&(ft||h)&&s.jsx(tt,{onClick:_s,"aria-pressed":ce==="visual","aria-label":e("sandbox.preview.visualEditor"),active:ce==="visual",children:s.jsx(Rn,{size:16})}),m&&s.jsxs(It,{children:[s.jsx(Ut,{asChild:!0,children:s.jsx(tt,{onClick:As,"aria-pressed":ce==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:ce==="blocks",children:s.jsx(mr,{size:16})})}),s.jsx(Ht,{children:e("sandbox.preview.blocksEditor")})]}),qe&&s.jsxs(It,{children:[s.jsx(Ut,{asChild:!0,children:s.jsx(tt,{onClick:L,"aria-pressed":S,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:S,children:s.jsx(ur,{size:16})})}),s.jsx(Ht,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Hs=!!Y&&ce==="blocks";return s.jsxs("div",{className:"flex flex-col w-full h-full",children:[dt&&Object.entries(Ct).map(([a,f])=>(We[a]??"")===""?s.jsx(ri,{sources:f,template:J,paramName:a,sandboxRef:dt,onFill:C=>Ft(a,C)},`${z}:${a}`):null),s.jsxs(s.Fragment,{children:[s.jsx(Tn.Toolbar.Center.Portal,{fallback:s.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:kn}),children:kn}),s.jsx(Tn.Toolbar.Right.Portal,{fallback:Sn,children:Sn})]}),s.jsx("div",{className:"flex-1 overflow-hidden relative",children:Hs?s.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[s.jsx(In,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L}),S&&qe&&s.jsx("div",{className:"absolute inset-0 z-10",children:s.jsx(Un,{ref:F,virtualMcpId:t,pageKey:qe,onClose:M})})]}):s.jsxs(An,{orientation:"horizontal",disabled:ce!=="blocks",className:"relative isolate",children:[s.jsx(xt,{ref:B,id:"preview-blocks-editor",defaultSize:ce==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:ce==="blocks"&&s.jsx(In,{virtualMcpId:t,externalSelection:w,onViewJsonFile:L})}),ce==="blocks"&&s.jsx(Bn,{withHandle:!0}),s.jsx(xt,{id:"preview-canvas",defaultSize:ce==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:s.jsxs(An,{orientation:"horizontal",disabled:!(S&&qe),children:[s.jsx(xt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:s.jsxs("div",{ref:a=>{if(!a)return;const f=()=>U(_=>_.width===a.clientWidth&&_.height===a.clientHeight?_:{width:a.clientWidth,height:a.clientHeight});f();const C=new ResizeObserver(f);return C.observe(a),()=>C.disconnect()},className:zt("h-full relative overflow-clip flex justify-center",ut&&!vt&&"bg-muted/30"),children:[(ue||ys)&&ut&&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"})}),A.showBlockingOverlay&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(qt,{kind:"starting",progress:fn,claimPhase:_t})}),!ye&&ze.kind==="suspended"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(qt,{kind:"suspended",onResume:Oe.resume})}),!ye&&ze.kind==="errored"&&s.jsx("div",{className:"absolute inset-0 z-30",children:s.jsx(qt,{kind:"errored",error:ze.error,onRetry:Oe.retry,connectionsHref:`/${ge.slug}/settings/connections`})}),A.showWakingPill&&s.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[s.jsx(St,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),s.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),ce==="visual"&&!N&&s.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-violet-400/40 bg-violet-500/90 px-3 py-1 text-xs font-medium text-white shadow-md backdrop-blur-sm pointer-events-none select-none",children:[s.jsx(Rn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),ce==="visual"&&N&&s.jsx(Pa,{element:N,onDismiss:()=>y(null)}),ut&&Re&&s.jsx("div",{className:zt("shrink-0",!vt&&"border-x border-border bg-background shadow-sm"),style:Us,onMouseLeave:Os,children:s.jsx("iframe",{ref:x,src:Re,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:vn.handleError,onLoad:()=>{if(vn.handleLoad(),he(),A.mode!=="sandbox"||ye){(A.mode==="production"&&!A.showWakingPill||ye)&&ce==="blocks"&&$t();return}if(Qs("vm_preview_loaded",{view_mode:ce,vm_id:_e?.sandboxHandle??null}),!G)try{const a=x.current?.contentWindow?.location?.pathname;if(!a)return;const f=Pe.current;if(f!==null&&(Pe.current=null,Ne(a)!==Ne(f))||Ne(a)===Ne(ke))return;se(a),et({path:a,pageKey:ve,params:We})}catch{}ce==="visual"&&yn(),ce==="blocks"&&$t()}},A.iframeBase)})]})}),S&&qe&&s.jsxs(s.Fragment,{children:[s.jsx(Bn,{withHandle:!0}),s.jsx(xt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:s.jsx(Un,{ref:F,virtualMcpId:t,pageKey:qe,onClose:M})})]})]})})]})}),s.jsx(ui,{open:ee,onOpenChange:O,isPending:Qe.isPending,error:ne,templates:$e,onSubmit:Ds})]})}function Bi(t){const e=fe.c(22),{virtualMcpId:n}=t,r=Te(),i=br(n),{activeTask:u,taskId:l,currentBranch:c}=jt(),o=ca(l),[d,h]=v.useState(!1);if(la({threadId:l,sandboxBranch:u?.branch??c,agentHasRepo:Wt(i?.metadata),threadHasRepo:Wt(o)||Wt(u?.metadata)})==="none"){let E;e[0]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:s.jsx($n,{className:"size-7 text-foreground"})}),e[0]=E):E=e[0];let b;e[1]!==r?(b=r("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=r,e[2]=b):b=e[2];let P;e[3]!==r?(P=r("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=r,e[4]=P):P=e[4];let g,j;e[5]===Symbol.for("react.memo_cache_sentinel")?(g=()=>h(!0),j=s.jsx($n,{className:"size-4"}),e[5]=g,e[6]=j):(g=e[5],j=e[6]);let N;e[7]!==r?(N=r("mainPanelTabs.previewTab.connectGithub"),e[7]=r,e[8]=N):N=e[8];let y;e[9]!==N?(y=s.jsxs(He,{onClick:g,children:[j,N]}),e[9]=N,e[10]=y):y=e[10];let w;e[11]!==b||e[12]!==P||e[13]!==y?(w=s.jsx(nn,{className:"h-full",image:E,title:b,description:P,actions:y}),e[11]=b,e[12]=P,e[13]=y,e[14]=w):w=e[14];let k;e[15]!==d?(k=s.jsx(oa,{open:d,onOpenChange:h,mode:"agent"}),e[15]=d,e[16]=k):k=e[16];let x;return e[17]!==w||e[18]!==k?(x=s.jsxs(s.Fragment,{children:[w,k]}),e[17]=w,e[18]=k,e[19]=x):x=e[19],x}let p;return e[20]!==n?(p=s.jsx(Ai,{virtualMcpId:n}),e[20]=n,e[21]=p):p=e[21],p}function Jc(){const t=fe.c(2),e=da();let n;return t[0]!==e?(n=s.jsx(Xs,{tabId:"site-editor",children:s.jsx(Zs,{feature:"cms",children:s.jsx(Bi,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{Jc as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s,j as e,_ as l}from"./index-BWAlpkwu.js";import{C as u}from"./index-DQfpFSGJ.js";import{AppViewContent as c}from"./project-app-view-DnyrcgvT.js";import{S as d}from"./settings-tab-BryWi3Fl.js";import{a as f}from"./repository-binding-BkAj46q1.js";import"./use-mobile-CwSfPydP.js";import"./thread-button-BicBi2YW.js";import"./agent-icon-DtuRgBXt.js";import"./AlertCircle-Bz95IA1L.js";import"./Tool01-G_7e_fu0.js";import"./ArrowUp-W9fOJYtW.js";import"./ArrowLeft-B5K5-flN.js";import"./LinkBroken01-DeBiMAX8.js";import"./ShoppingBag01-DVzEvqIf.js";import"./ZoomOut-RInN96sm.js";import"./Building02-DH0ShiKs.js";import"./CheckCircle-CvrX7p0-.js";import"./ChevronUp-BF5A1_bk.js";import"./ChevronSelectorVertical-DCbswHDn.js";import"./UserSquare-D3rxt1fW.js";import"./Copy01-JxasDo0Y.js";import"./CreditCard01-zruO6RR6.js";import"./DotsVertical-IlcVf06d.js";import"./Image01-Bt6ZIkX1.js";import"./Globe04-DRKGVBCX.js";import"./SwitchHorizontal01-DWzDEU-3.js";import"./Key01-DBTFQIL_.js";import"./Link01-Da5EfBPU.js";import"./Monitor01-8fVRFSue.js";import"./Sun-BBJ4xAcN.js";import"./Play-auont4T3.js";import"./Plus-B-IfeegN.js";import"./SearchMd-BHEy3hgp.js";import"./Trash01-DsUZfXDb.js";import"./Upload01-CQ46KAYz.js";import"./User01-P3sVVPbl.js";import"./Users01-C3X5KgEC.js";import"./XClose-wS5BxV-4.js";import"./use-chat-layout-state-Aoi0ufu4.js";import"./use-file-configs-6DIvP8tn.js";import"./use-organization-settings-BbR_CXXI.js";import"./schema-SVXt4E6H.js";import"./task-board-CuPrIMXJ.js";import"./site-slug-DebpOoQq.js";import"./thread-route-VcdZ-yo1.js";import"./use-panel-navigate-DKoLfagd.js";import"./use-project-scope-B9BJjHwp.js";import"./thread-intent-qsgT0v7g.js";import"./use-mcp-client-Qoi044ys.js";import"./auth-BE-jkdby.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-jiotiysJ.js";import"./slugify-CEUa2lfQ.js";import"./sheet-Ccw9R6E9.js";import"./tooltip-DgqSmkd3.js";import"./index-DphH3SH1.js";import"./toolbar-icon-button-CT832dEu.js";import"./shell-layout-CmyoqizW.js";import"./avatar-Bq6TAAFW.js";import"./use-clock-tick-DFaAt8jb.js";import"./command-BTi6xeFr.js";import"./index-U_vV9Req.js";import"./integration-icon-COlVJ6Ap.js";import"./project-icon-CERkoZt2.js";import"./new-project-dialog-Cqc94Xrg.js";import"./label-DxzpCGxy.js";import"./repository-import-picker-D222lJkc.js";import"./use-navigate-to-agent-D1F3bZCL.js";import"./repository-picker-BgLHJAB7.js";import"./useInfiniteQuery-C1KwH6U-.js";import"./infiniteQueryObserver-MzzHKvZc.js";import"./collection-search-DPsn3CXI.js";import"./use-debounced-value-D6NhrevJ.js";import"./required-auth-layout-C2W0Hmb4.js";import"./autosend-DoPX3ID2.js";import"./use-org-sso-Ddt7V8xj.js";import"./resizable-BeKhifo6.js";import"./icon-button-Be2OFfn9.js";import"./tool-namespace-Cm6DqXGb.js";import"./use-mcp-tools-BlaP_xtx.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-C_aV5_pO.js";import"./types-ZkHG882G.js";import"./chat-context-CrQzXlfA.js";import"./use-decopilot-events-Cq_vCUrM.js";import"./use-ai-providers-Dw5yZbHU.js";import"./use-chat-navigation-D7AQRSfw.js";import"./location-BjlyegC2.js";import"./task-route-Be5gAj81.js";import"./core.esm-Dv_8c6_R.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-ZHdRjz9u.js";import"./companions-core-DzyeM-yJ.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-ByTYKy_L.js";import"./form-D1MBRr1a.js";import"./provision-repo-scoped-github-connection-lckxpDHD.js";import"./useQueries-B0oo9pOn.js";import"./authenticate-and-persist-oauth-6gcBpEYE.js";import"./mcp-oauth-nWbzfbZw.js";import"./mcp-oauth-IMvvQmc3.js";import"./track-Bsbqp3Hn.js";import"./extract-connection-data-C4LE3XP1.js";import"./connection-D9I74S7M.js";import"./url-slug-Bn0tWo1u.js";import"./build-improve-prompt-doc-vQTXQ0bc.js";import"./empty-state-DVOe8f0v.js";import"./use-date-fns-locale-BIu5umci.js";import"./differenceInSeconds-C3x8sHUj.js";import"./alert-dialog-BXQXu_hy.js";import"./textarea-CU3yT73Z.js";import"./use-connection-CEXahlIk.js";import"./use-debounced-autosave-uZ7zbYGC.js";import"./add-connection-dialog-CuTrOuMt.js";import"./connection-card-CJQIw_Nv.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-BteL4_b8.js";import"./select-5QkF-ydf.js";import"./index-BdQq_4o_.js";import"./connection-form-helpers-B-LWzl1k.js";import"./collection-tabs-yGaibPbt.js";import"./badge-DdyoasWI.js";import"./use-infinite-scroll-DeMwG1OG.js";import"./useSuspenseInfiniteQuery-BhqW4802.js";import"./file-type-icon-BdgYZI0o.js";import"./use-org-fs-CVJeIAyC.js";import"./checkbox-BDf-RH4K.js";import"./search-input-DpIQ019n.js";import"./use-mcp-auth-status-CCBaD_t7.js";import"./use-mcp-prompts-BMgpvY14.js";import"./utils-CVEq3hMx.js";import"./switch-BcjqQ0Bd.js";import"./popover-DiRh2ZE6.js";import"./scroll-area-DC2prxTD.js";import"./optimistic-project-sidebar-views-C72D-T6C.js";import"./virtual-mcp-Dx4LWaPY.js";import"./sandbox-url-D3mC8qhT.js";import"./secret-picker-BVqoJ9wg.js";import"./use-secrets-Jwfb7jmE.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./serial-task-queue-CGOeQgpr.js";const g=l("/shell/$org/org-shell/agent-shell/projects/$agentId/views/$viewId");function w(){const t=s.c(7),{agentId:o,viewId:i}=g.useParams(),a=f(o);let m;t[0]!==a?.metadata?.ui?.layout?.tabs||t[1]!==i?(m=a?.metadata?.ui?.layout?.tabs?.find(n=>n.id===i),t[0]=a?.metadata?.ui?.layout?.tabs,t[1]=i,t[2]=m):m=t[2];const r=m;let p;return t[3]!==o||t[4]!==r||t[5]!==i?(p=r?e.jsx(c,{connectionId:r.view.appId,toolName:r.id,args:r.view.args},i):e.jsx(d,{virtualMcpId:o}),t[3]=o,t[4]=r,t[5]=i,t[6]=p):p=t[6],p}function Yo(){const t=s.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(u.Content,{children:e.jsx(w,{})}),t[0]=o):o=t[0],o}export{Yo as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as l,N as d,Y as p,_ as m}from"./index-
|
|
1
|
+
import{c as g,j as l,N as d,Y as p,_ as m}from"./index-BWAlpkwu.js";import{u as f}from"./use-main-panel-tabs-BtpwyvjF.js";import{a as I}from"./thread-route-VcdZ-yo1.js";import{r as h}from"./use-panel-navigate-DKoLfagd.js";const v=m("/shell/$org/org-shell/agent-shell/projects/$agentId");function P(o){const e=g.c(6),{children:u,tabId:c}=o,s=v.useParams(),t=s.agentId,n=I();let a;e[0]!==t||e[1]!==n?(a={virtualMcpId:t,taskId:n},e[0]=t,e[1]=n,e[2]=a):a=e[2];const{activeTab:i}=f(a);if(c==="code"?i==="code"||i.startsWith("code:"):i===c)return u;let r;return e[3]!==t||e[4]!==s.org?(r=l.jsx(d,{to:p.settings,params:{org:s.org,agentId:t},search:R,replace:!0}),e[3]=t,e[4]=s.org,e[5]=r):r=e[5],r}function R(o){return h({previous:o,destination:"agent"})}export{P as A};
|