decocms 4.401.1 → 4.401.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/{AlertCircle-CPEr23R9.js → AlertCircle-B6v6clUp.js} +1 -1
- package/dist/client/assets/{AreaChart-BRp3tfJa.js → AreaChart-DMVzNDEl.js} +1 -1
- package/dist/client/assets/{ArrowLeft-gHnXneZZ.js → ArrowLeft-DDW5by-5.js} +1 -1
- package/dist/client/assets/{ArrowRight-BRVmWkaB.js → ArrowRight-b4OSvT38.js} +1 -1
- package/dist/client/assets/{ArrowUp-CNjJZghs.js → ArrowUp-Cwnen55n.js} +1 -1
- package/dist/client/assets/{CartesianChart-D55BfjHL.js → CartesianChart-BfpVdm26.js} +1 -1
- package/dist/client/assets/{Check-CVeTZNSw.js → Check-BcWDZio0.js} +1 -1
- package/dist/client/assets/{CheckCircle-B2OjIV2w.js → CheckCircle-MH252tOY.js} +1 -1
- package/dist/client/assets/{ChevronUp-BgbDGchl.js → ChevronUp-zgSkYMxJ.js} +1 -1
- package/dist/client/assets/{Copy01-BrBAdqBW.js → Copy01-B1NOvXZB.js} +1 -1
- package/dist/client/assets/{CreditCard01-BXJ6Scir.js → CreditCard01-BZsA4Hwc.js} +1 -1
- package/dist/client/assets/{DotsVertical-DgVfgwq5.js → DotsVertical-Bl1hnuJi.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-XTxohn4s.js → ErrorBarContext-Cf0TgTnP.js} +1 -1
- package/dist/client/assets/{Eye-CRAkr59H.js → Eye-BbaBeCZ5.js} +1 -1
- package/dist/client/assets/{Globe04-kjveQbT-.js → Globe04-BKigapNa.js} +1 -1
- package/dist/client/assets/{Image01-BBSpdC7P.js → Image01-w2ZWkVaa.js} +1 -1
- package/dist/client/assets/{Key01-B-c3zcwk.js → Key01-DT2DLjDU.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Cy2wqUJU.js → LayoutLeft-DmPeVi4U.js} +1 -1
- package/dist/client/assets/{Line-C-JVEX3h.js → Line-B-z09LFG.js} +1 -1
- package/dist/client/assets/{Link01-C907Gz0z.js → Link01-CwAzoHCm.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BeOpv0ks.js → LinkExternal01-BVro7p0d.js} +1 -1
- package/dist/client/assets/{Monitor01-rI1gjgbD.js → Monitor01-BXGpB3DU.js} +1 -1
- package/dist/client/assets/{Palette-wj6TPRrn.js → Palette-p6gpXB43.js} +1 -1
- package/dist/client/assets/{Plus-DQ8YbhOD.js → Plus-CPRr8eLA.js} +1 -1
- package/dist/client/assets/{SearchMd-BXQRredV.js → SearchMd-DmrZ8tNb.js} +1 -1
- package/dist/client/assets/{Sector-D8IM05fH.js → Sector-DZC4A0lj.js} +1 -1
- package/dist/client/assets/{Share07-CzZU-0lX.js → Share07-Cs13DReE.js} +1 -1
- package/dist/client/assets/{Sun-CAOmTl7T.js → Sun-Cvn5rNir.js} +1 -1
- package/dist/client/assets/{Tool01-DVAmF9a6.js → Tool01-Cc10eS4M.js} +1 -1
- package/dist/client/assets/{Trash01-B12FEgzf.js → Trash01-BUFUahy8.js} +1 -1
- package/dist/client/assets/{Upload01-H1MTk3aw.js → Upload01-BYDz7chj.js} +1 -1
- package/dist/client/assets/{User01-Bkdfq1xc.js → User01-jkNTFSxf.js} +1 -1
- package/dist/client/assets/{UserSquare-DO-wgAkN.js → UserSquare-BcjGTyJF.js} +1 -1
- package/dist/client/assets/{Users01-MNFi-bbv.js → Users01-CnASZBXO.js} +1 -1
- package/dist/client/assets/{X-C154AObr.js → X-DMAiKm4q.js} +1 -1
- package/dist/client/assets/{XClose-DKzsyGKV.js → XClose-BNpVIYKH.js} +1 -1
- package/dist/client/assets/{Zap-B8e9ezRB.js → Zap-YBE6LDnX.js} +1 -1
- package/dist/client/assets/{ZoomOut-B317hRVZ.js → ZoomOut-BWWdIPu7.js} +1 -1
- package/dist/client/assets/{access-gate-D5Bp1cjT.js → access-gate-Ddqr1mvk.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Bh5fO84W.js → add-connection-dialog-C9-7gsrE.js} +1 -1
- package/dist/client/assets/{agent-analytics-BSYI19KE.js → agent-analytics-C47FuCQZ.js} +1 -1
- package/dist/client/assets/agent-app-C7cXZ0kS.js +1 -0
- package/dist/client/assets/{agent-assets-BkLnegbg.js → agent-assets-CPvE-CBL.js} +1 -1
- package/dist/client/assets/{agent-automation-D6GXdQU1.js → agent-automation-CgzYkuuN.js} +1 -1
- package/dist/client/assets/{agent-automations-9cIkG6Ba.js → agent-automations--sI5vNnO.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-B9UqZJBc.js → agent-connect-sources-D1bHyzQg.js} +1 -1
- package/dist/client/assets/agent-deck-Cw35maEW.js +1 -0
- package/dist/client/assets/{agent-e2e-BOsArkL5.js → agent-e2e-BxdoyeFi.js} +1 -1
- package/dist/client/assets/{agent-experiments-ByDF_q1Q.js → agent-experiments-r7syzEaa.js} +1 -1
- package/dist/client/assets/{agent-file-DofWWoQ4.js → agent-file-Bm3BKmT9.js} +1 -1
- package/dist/client/assets/{agent-git-i-Gd50Vj.js → agent-git-Tbbx1T0C.js} +1 -1
- package/dist/client/assets/{agent-hosting-ByLf4mc1.js → agent-hosting-CPcY-HOG.js} +1 -1
- package/dist/client/assets/{agent-icon-3at7GzsZ.js → agent-icon-8fIO3moM.js} +1 -1
- package/dist/client/assets/agent-library-file-DldGDe9Y.js +1 -0
- package/dist/client/assets/{agent-monitor-CQI8uZzl.js → agent-monitor-C2Jao52C.js} +1 -1
- package/dist/client/assets/{agent-overview-RCJH7JQG.js → agent-overview-B6UPf1Up.js} +1 -1
- package/dist/client/assets/agent-settings-PqVZkvdc.js +1 -0
- package/dist/client/assets/{agent-site-editor-CriokF3X.js → agent-site-editor-_6Tt0TKl.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-C-BuVqW6.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-BEA7bjQD.js → agent-site-editor-content-FXH4AYL7.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-CMCL_dUV.js → agent-site-editor-preview-Badj2YHF.js} +3 -3
- package/dist/client/assets/agent-view-_8QAMrkV.js +1 -0
- package/dist/client/assets/{agent-view-guard-D0ut5NAG.js → agent-view-guard-9U9HS2_t.js} +1 -1
- package/dist/client/assets/{agents-list-ChoQO1sp.js → agents-list-y7CUfAaF.js} +1 -1
- package/dist/client/assets/{ai-providers-BkAsXdRd.js → ai-providers-DiqO8wdM.js} +1 -1
- package/dist/client/assets/{alert-x4X_GRO2.js → alert-DGPx0aDu.js} +1 -1
- package/dist/client/assets/{alert-dialog-cqQYXzDf.js → alert-dialog-mXuhGOeD.js} +1 -1
- package/dist/client/assets/{analytics-sections-EdibO0EZ.js → analytics-sections-DgI0FI3X.js} +1 -1
- package/dist/client/assets/api-keys-BMZKZiWC.js +1 -0
- package/dist/client/assets/{api-keys-CHVawMec.js → api-keys-CFmbWRSI.js} +1 -1
- package/dist/client/assets/app-editor-BZsVeaYh.js +1 -0
- package/dist/client/assets/{asset-utils-CC6F7-AZ.js → asset-utils-DCRQ2cUb.js} +1 -1
- package/dist/client/assets/{auth-catchall-0il6tXO-.js → auth-catchall-LQUX4Het.js} +1 -1
- package/dist/client/assets/{auth-entry-wG1k17iI.js → auth-entry-qy2UOGAe.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DivTJlRX.js → auth-split-layout-D9dYFtzN.js} +1 -1
- package/dist/client/assets/{auth-CcjAo-4E.js → auth-yECgQ-YG.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D1uu4uNq.js → authenticate-and-persist-oauth-Cdoq_uUT.js} +1 -1
- package/dist/client/assets/{automation-list-row-Bj1Utp6g.js → automation-list-row-mdjfkD8U.js} +1 -1
- package/dist/client/assets/{automation-runs-C065C-Em.js → automation-runs-B5ioc_Ms.js} +1 -1
- package/dist/client/assets/{automations-DfIqHWlj.js → automations-BiI3jWxV.js} +1 -1
- package/dist/client/assets/{autosend-CnLg4iyu.js → autosend-CBLCn5Df.js} +1 -1
- package/dist/client/assets/{avatar-CLzlzqg-.js → avatar-BWIF2BFh.js} +1 -1
- package/dist/client/assets/{badge-5H6-8M2L.js → badge-MUYSitCi.js} +1 -1
- package/dist/client/assets/{block-document-Dhdi7KP2.js → block-document-Caszzcw-.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BdK175Nf.js → blocks-preview-workspace-context-C0MFUrPc.js} +1 -1
- package/dist/client/assets/{buckets-Cs1-INj9.js → buckets-BrC8LnsU.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-9lf62EUm.js → build-improve-prompt-doc-HGUNWQ_n.js} +1 -1
- package/dist/client/assets/{calendar-BQHoAsd6.js → calendar-BGSFNOk3.js} +1 -1
- package/dist/client/assets/{capability-load-error-0Uc737LL.js → capability-load-error-CjiWoJ39.js} +1 -1
- package/dist/client/assets/{cards-DUvl76bf.js → cards-BcbkVzXP.js} +1 -1
- package/dist/client/assets/{category-editor-DZ8v1VCJ.js → category-editor-D0xlnLlv.js} +1 -1
- package/dist/client/assets/{chart-D2xGaBdH.js → chart-BAAxrEuW.js} +1 -1
- package/dist/client/assets/{chat-context-BNvT6rzW.js → chat-context-BiOtKn7P.js} +1 -1
- package/dist/client/assets/{chat-draft-BXsvrA3U.js → chat-draft-IKP3Bpj9.js} +1 -1
- package/dist/client/assets/{checkbox-Dm-cOrC-.js → checkbox-iCK8-YOo.js} +1 -1
- package/dist/client/assets/{choose-editor-K5zEI6gt.js → choose-editor-DRWnK3Kj.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-CltSQpgg.js → claim-phase-copy-Yh04XZxP.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BLMRYwDh.js → cli-auth-success-D9AMqFFP.js} +1 -1
- package/dist/client/assets/{client-icons-CyfLLJ0i.js → client-icons-DLp3d5R1.js} +1 -1
- package/dist/client/assets/{collapsible-BIjP_loq.js → collapsible-CzA8-NMA.js} +1 -1
- package/dist/client/assets/{collection-detail-DX5rgQom.js → collection-detail-Dhwx_szl.js} +1 -1
- package/dist/client/assets/{collection-display-button-Cysz3Xm0.js → collection-display-button-D4IBHGZc.js} +1 -1
- package/dist/client/assets/{collection-search-DverrpuC.js → collection-search-BvnUba7J.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DNg0nsQn.js → collection-table-wrapper-DjKD0XJB.js} +1 -1
- package/dist/client/assets/{collection-tabs-Uy6POvao.js → collection-tabs--W1A2Kno.js} +1 -1
- package/dist/client/assets/{combobox-DypS57b1.js → combobox-BdqfRWb0.js} +1 -1
- package/dist/client/assets/{command-Dg2fnZVE.js → command-CzEVwgKB.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BXh65CHH.js → companion-mcps-section-DTCGaI6A.js} +1 -1
- package/dist/client/assets/{connect-MnY8n6nK.js → connect-CT8jrV2P.js} +1 -1
- package/dist/client/assets/{connect-layout-BmU4TTqG.js → connect-layout-CYt4Oksg.js} +1 -1
- package/dist/client/assets/{connection-C8bPFDEx.js → connection-BY8-KaA4.js} +1 -1
- package/dist/client/assets/{connection-card-CXVGIjkM.js → connection-card-B4bw8HCo.js} +1 -1
- package/dist/client/assets/{connection-detail-xZF8BVF0.js → connection-detail-DRVN8VC-.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CEaaJsMg.js → connection-form-helpers-DMj6bxTF.js} +1 -1
- package/dist/client/assets/{connections-CoxyeL-Q.js → connections-w9tEnUf-.js} +1 -1
- package/dist/client/assets/{context-CvdvtYuk.js → context-CiiTJRNN.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CVF9Pkh5.js → create-organization-dialog-CStCZ29k.js} +1 -1
- package/dist/client/assets/{decofile-api-DqVrJn1_.js → decofile-api-CTqqNPjg.js} +1 -1
- package/dist/client/assets/{decopilot-B9jAytRs.js → decopilot-D-CvU-Yz.js} +1 -1
- package/dist/client/assets/{dialog-BOggtOpT.js → dialog-BGQjuyIa.js} +1 -1
- package/dist/client/assets/{discover-C9zqRJNp.js → discover-CUaLN8h5.js} +1 -1
- package/dist/client/assets/{domain-settings-qd7-1lSE.js → domain-settings-Bvt351cL.js} +1 -1
- package/dist/client/assets/{download-app-dialog-PPhwBTH9.js → download-app-dialog-REdgjDQr.js} +1 -1
- package/dist/client/assets/{drawer-BclOIYt1.js → drawer-B-c-ivso.js} +1 -1
- package/dist/client/assets/{editor-TpzHa_gf.js → editor-DzPBGxM9.js} +1 -1
- package/dist/client/assets/{empty-state-CL8wHgVo.js → empty-state-CzE4b4zD.js} +1 -1
- package/dist/client/assets/{empty-state-R3nLlu9z.js → empty-state-D4FOaSCM.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CmMVwBW2.js → extract-connection-data-D4h0y4EU.js} +1 -1
- package/dist/client/assets/{feature-gate-DKNH_0kU.js → feature-gate-BxoH2N-k.js} +1 -1
- package/dist/client/assets/{feature-paywall-CPu4y-mi.js → feature-paywall-D1UvIJE8.js} +1 -1
- package/dist/client/assets/{file-explorer-CleCPHx6.js → file-explorer-L6D988ID.js} +1 -1
- package/dist/client/assets/{file-preview-Mmi0KVgV.js → file-preview-bVJ7RHCN.js} +1 -1
- package/dist/client/assets/{file-share-button-DlQZmJHL.js → file-share-button-X4sCk74v.js} +1 -1
- package/dist/client/assets/{file-type-icon-BxC36yCu.js → file-type-icon-9ZD-EW4g.js} +1 -1
- package/dist/client/assets/{folder-icon-BQsr0uf8.js → folder-icon-BnECBWBk.js} +1 -1
- package/dist/client/assets/{form-Bt-RSEHD.js → form-DTmMHLRx.js} +1 -1
- package/dist/client/assets/{gateway-client-HEACnrX1.js → gateway-client-BA28nWtn.js} +1 -1
- package/dist/client/assets/{general-ClcNIPBS.js → general-Bwpt40AL.js} +1 -1
- package/dist/client/assets/{github-icon-O-IotW5p.js → github-icon-D1YjVdXZ.js} +1 -1
- package/dist/client/assets/{home-Bugw6f3C.js → home-B5OFK-dy.js} +1 -1
- package/dist/client/assets/{hooks-Bm1nlJeS.js → hooks-DkDt1nFE.js} +1 -1
- package/dist/client/assets/{icon-button-B5jy_lJx.js → icon-button-YPSYZ_i4.js} +1 -1
- package/dist/client/assets/{index-DpYjANa-.js → index-BExO8BBu.js} +1 -1
- package/dist/client/assets/{index-fVWt1lpr.js → index-BjrR9kZj.js} +2 -2
- package/dist/client/assets/{index-0d4QXoG3.js → index-CFqXjwf4.js} +1 -1
- package/dist/client/assets/{index-beSzH801.js → index-CO4A8f3_.js} +1 -1
- package/dist/client/assets/{index--RuMjVyN.js → index-CTVfZLyR.js} +1 -1
- package/dist/client/assets/{index-q1daWx8d.js → index-CYxcU_1G.js} +1 -1
- package/dist/client/assets/{index-CPVB221H.js → index-CdjFDf_N.js} +1 -1
- package/dist/client/assets/{index-D9L2r4MO.js → index-Cep3DlIQ.js} +1 -1
- package/dist/client/assets/{index-BYL1evEv.js → index-CujAxzYL.js} +1 -1
- package/dist/client/assets/{index-yYa9zxlb.js → index-DA-FmRbp.js} +1 -1
- package/dist/client/assets/{index-BgP0qZnf.js → index-DSi-K9mm.js} +1 -1
- package/dist/client/assets/{index-CoBWNh7w.js → index-DhBFD4kx.js} +1 -1
- package/dist/client/assets/{index---GpIbzw.js → index-DoT72w42.js} +1 -1
- package/dist/client/assets/{index-uJh8CcCU.js → index-DvDGTSZO.js} +1 -1
- package/dist/client/assets/{index-redirect-CEIsML5U.js → index-redirect-UZ8z6_9_.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CKFKhFnQ.js → infiniteQueryObserver-DFZOc4R3.js} +1 -1
- package/dist/client/assets/{infra-billing-DVAV6v8p.js → infra-billing-CbcvcVow.js} +1 -1
- package/dist/client/assets/{input-BkH_3_lh.js → input-D4erz3OA.js} +1 -1
- package/dist/client/assets/{input-D2u13NjF.js → input-DFe835A1.js} +1 -1
- package/dist/client/assets/{input-DnsrsTkC.js → input-DbKUv_Vw.js} +1 -1
- package/dist/client/assets/{integration-icon-lkI0afUy.js → integration-icon-DpzEVv6e.js} +1 -1
- package/dist/client/assets/{label-DDXjSo5b.js → label-68C0kM-R.js} +1 -1
- package/dist/client/assets/{last-preview-page-T4cWlWCz.js → last-preview-page-LzMfR51s.js} +1 -1
- package/dist/client/assets/{layout-DCGQK6TC.js → layout-P9Bd-jAm.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Dk4Qwm22.js → legacy-agents-deep-CVENV7ac.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-F2zSp5tI.js → legacy-main-redirect-BdVZ82I_.js} +1 -1
- package/dist/client/assets/{library-BtGokA8R.js → library-DJGGZ0Zy.js} +1 -1
- package/dist/client/assets/{login-DrzevGVQ.js → login-BOm6626q.js} +1 -1
- package/dist/client/assets/{markdown-B0l4rHOR.js → markdown-FaJSXz8c.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-13c0HciG.js → mcp-app-renderer-Bcpidv6E.js} +1 -1
- package/dist/client/assets/{mcp-oauth-siG_cfmV.js → mcp-oauth-BMxlsP2O.js} +1 -1
- package/dist/client/assets/{members-CGdWgjNK.js → members-BS5tCQVH.js} +1 -1
- package/dist/client/assets/{message-templates-BoFSW2CI.js → message-templates-OWljVJD5.js} +1 -1
- package/dist/client/assets/{mini-report-page-BK_Pf9fe.js → mini-report-page-BRlf5FN6.js} +1 -1
- package/dist/client/assets/{mock-board-BuZmwDhY.js → mock-board-BNj7oowZ.js} +3 -3
- package/dist/client/assets/{monaco-editor-BVoYbb1f.js → monaco-editor-CZp4UVdz.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-7DELRlYs.js → monitoring-stats-row-Cbi53snE.js} +1 -1
- package/dist/client/assets/{multi-select-QUvu0uCK.js → multi-select-CnlVdbwv.js} +1 -1
- package/dist/client/assets/{mustache-BmovsuOr.js → mustache-Ca6JIIV3.js} +1 -1
- package/dist/client/assets/{oauth-callback-DchJhst_.js → oauth-callback-BeLO32vx.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Y227Oftd.js → oauth-callback-ai-provider-BY8qEJVF.js} +1 -1
- package/dist/client/assets/{onboarding-HozZLV2N.js → onboarding-BtAEKL_6.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BX7ZIz6B.js → optimistic-project-sidebar-views-Dd7Kmc6p.js} +1 -1
- package/dist/client/assets/{org-file-open-context-C0hgS1Jo.js → org-file-open-context-dfBXT7MO.js} +1 -1
- package/dist/client/assets/{organization-choice-CXZ6gkyl.js → organization-choice-BF8PizrV.js} +1 -1
- package/dist/client/assets/{orgs-Dy8AnRAd.js → orgs-DhSyLRvs.js} +1 -1
- package/dist/client/assets/{page-seo-form-Bt-KyLUW.js → page-seo-form-CkLwkYBd.js} +1 -1
- package/dist/client/assets/{pair-Dwhp-QkI.js → pair-CI7mZS0g.js} +1 -1
- package/dist/client/assets/{plan-ladder-BgoCZoId.js → plan-ladder-BHP-xahB.js} +1 -1
- package/dist/client/assets/{popover-Bm2g2dKA.js → popover-Bfdv1gl-.js} +1 -1
- package/dist/client/assets/{post-calendar-Sul5NCPi.js → post-calendar-C-FAL0Ry.js} +1 -1
- package/dist/client/assets/{post-editor-v0sVuMmM.js → post-editor-CqQXYpr7.js} +1 -1
- package/dist/client/assets/{preview-content-BaaIpGIX.js → preview-content-CbqQjhni.js} +1 -1
- package/dist/client/assets/{preview-dialog-D6gkPU-v.js → preview-dialog-CDG9haxV.js} +1 -1
- package/dist/client/assets/{profile-CfF9emxx.js → profile-D8cs-pPc.js} +1 -1
- package/dist/client/assets/{project-app-view-7ytayuSK.js → project-app-view-CwbZ9tdF.js} +1 -1
- package/dist/client/assets/{project-feed-boavVsZo.js → project-feed-DiRf7mLY.js} +1 -1
- package/dist/client/assets/{project-icon-Caze2c7Z.js → project-icon-Cr4yXuUg.js} +1 -1
- package/dist/client/assets/project-reports-Dlwv4gmO.js +1 -0
- package/dist/client/assets/project-tasks-DSsmEYDA.js +1 -0
- package/dist/client/assets/{prompts-D6EJy36O.js → prompts-amdxWtkw.js} +1 -1
- package/dist/client/assets/record-editor-BeMREyAi.js +1 -0
- package/dist/client/assets/{redirect-editor-DWJ_FImu.js → redirect-editor-vEh44rPX.js} +1 -1
- package/dist/client/assets/{reports-CoGtI9j_.js → reports-BRTUu7pH.js} +1 -1
- package/dist/client/assets/reports-BxBXnK7L.js +1 -0
- package/dist/client/assets/{reports-onboarding-DinC9B-6.js → reports-onboarding-D3OrRvWJ.js} +1 -1
- package/dist/client/assets/{reports-tab-SGlpgHqf.js → reports-tab-BxNOl98V.js} +2 -2
- package/dist/client/assets/{repositories-BS-bWA5-.js → repositories-Ckb6ekqQ.js} +1 -1
- package/dist/client/assets/{repository-import-picker-_pAlFkhi.js → repository-import-picker-BAZ9mPpT.js} +1 -1
- package/dist/client/assets/{repository-picker-DpEVKEDq.js → repository-picker-D-TogGEt.js} +1 -1
- package/dist/client/assets/{require-capability-CcHoyYNu.js → require-capability-BVjtMA1J.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Br8-tZC8.js → required-auth-layout-DY_cdaIx.js} +1 -1
- package/dist/client/assets/{reset-password-ndXl1h8v.js → reset-password-CsZF9Bi0.js} +1 -1
- package/dist/client/assets/{resizable-CmU1UFW5.js → resizable-BtDH_0Vi.js} +1 -1
- package/dist/client/assets/{review-settings-BQT2e44E.js → review-settings-hRNYkWVc.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-BoRfGq9j.js → rich-text-link-control-DJRcgLMd.js} +1 -1
- package/dist/client/assets/{roles-DZFiLJ9E.js → roles-Dtk1kJXW.js} +1 -1
- package/dist/client/assets/{route-BGuagqOc.js → route-4WMSVXXz.js} +1 -1
- package/dist/client/assets/{route-BeB47Wls.js → route-DVw-1wdo.js} +1 -1
- package/dist/client/assets/{route-C9CtGxLX.js → route-Hbxv89X2.js} +1 -1
- package/dist/client/assets/{route-page-header-sfG3hoJk.js → route-page-header-BWvRqVR5.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-D17D6ot6.js → runnable-block-editor-B-NGtP-T.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DbIoDfH_.js → sandbox-lifecycle-context-ir4poExj.js} +1 -1
- package/dist/client/assets/{schema-BSSNLZcx.js → schema-DR6HLXFs.js} +1 -1
- package/dist/client/assets/{scroll-area-7yOUlGhi.js → scroll-area-C2I8c9NJ.js} +1 -1
- package/dist/client/assets/{search-input-BNaZ530e.js → search-input-CFuVSdCR.js} +1 -1
- package/dist/client/assets/{search-toggle-DFo2t2PR.js → search-toggle--L0X1zt3.js} +1 -1
- package/dist/client/assets/{secret-picker-wDs_PYaU.js → secret-picker-DvWxSNYJ.js} +1 -1
- package/dist/client/assets/{secrets-CAUpWomS.js → secrets-lxuA8lGZ.js} +1 -1
- package/dist/client/assets/{sections-editor-DbtrkTJp.js → sections-editor-BrJtbdMq.js} +1 -1
- package/dist/client/assets/{select-BVdY-oUw.js → select-DfRa6U-n.js} +1 -1
- package/dist/client/assets/{select-model-BG-np3eO.js → select-model-U4Dqa8Dd.js} +1 -1
- package/dist/client/assets/{seo-editor-Dcu__lEc.js → seo-editor-DHpSeEA1.js} +1 -1
- package/dist/client/assets/{separator-CEpsszRN.js → separator-D2OxZy8p.js} +1 -1
- package/dist/client/assets/{settings-tab-CE-zP-s-.js → settings-tab-C7fwvrln.js} +1 -1
- package/dist/client/assets/{sheet-DF3R7FBJ.js → sheet-CBJ9Lsc2.js} +1 -1
- package/dist/client/assets/{shell-layout-2wAM2ksB.js → shell-layout-CVhVAInm.js} +1 -1
- package/dist/client/assets/{skill-preview-D6m4p1Wk.js → skill-preview-dfvgyHwB.js} +1 -1
- package/dist/client/assets/{skills-BTD2gZMF.js → skills-zNDBdjJd.js} +1 -1
- package/dist/client/assets/{sso-DMLe81w3.js → sso-CuKtRutW.js} +1 -1
- package/dist/client/assets/{suggestion-D41p5Nlw.js → suggestion-ns0qv0uQ.js} +1 -1
- package/dist/client/assets/{switch-DsI_im2t.js → switch-tss5J5qD.js} +1 -1
- package/dist/client/assets/{synced-repos-Bgu2XcXF.js → synced-repos-2hWPuLjw.js} +1 -1
- package/dist/client/assets/{table-C4hyTb2t.js → table-CAWKNKxB.js} +1 -1
- package/dist/client/assets/{tabs-VLV4jDm4.js → tabs-Ct12da-2.js} +1 -1
- package/dist/client/assets/{task-board-BM0rSWlL.js → task-board-D00YvbAx.js} +1 -1
- package/dist/client/assets/{task-route-xwNk2dEf.js → task-route-DA0R3nvt.js} +1 -1
- package/dist/client/assets/{task-status-CnhcAbWB.js → task-status-BFvj4FVC.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BKvqd2Zb.js → taskboard-analytics-B4f7NdY4.js} +1 -1
- package/dist/client/assets/{tasks-B4NT7cCF.js → tasks-DSHLXRfJ.js} +1 -1
- package/dist/client/assets/tasks-Dv8B8TKy.js +1 -0
- package/dist/client/assets/{textarea-6ExQYFkQ.js → textarea-DcUTXKBn.js} +1 -1
- package/dist/client/assets/{thread-analytics-3sSJIqAe.js → thread-analytics-Br9oWS6c.js} +1 -1
- package/dist/client/assets/{thread-button-DkmJxu_A.js → thread-button-D9YdtqqV.js} +1 -1
- package/dist/client/assets/{thread-intent-g-PM5L5V.js → thread-intent-Dk6BvhGr.js} +1 -1
- package/dist/client/assets/{thread-route-DkC2CUZU.js → thread-route-DtaqqUc8.js} +1 -1
- package/dist/client/assets/{thread-route-Bjrbqzl8.js → thread-route-V1sEHiBY.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-By3JPwYd.js → thread-sheet-body-28PK5CVb.js} +1 -1
- package/dist/client/assets/{toggle-group-CdX5yciZ.js → toggle-group-BN_nhcbs.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-oAWnd74z.js → toolbar-icon-button-dJwApEoN.js} +1 -1
- package/dist/client/assets/{tooltip-ssFfyABz.js → tooltip-a6VXOqQI.js} +1 -1
- package/dist/client/assets/{track-D3zn8u09.js → track-DIm5D0FO.js} +1 -1
- package/dist/client/assets/{types-BOURPUxt.js → types-CuuumKKW.js} +1 -1
- package/dist/client/assets/{usage-stats-DSpOuTy_.js → usage-stats-C7Cj3ABB.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B4mNdfKq.js → use-ai-providers-OcKKapmz.js} +1 -1
- package/dist/client/assets/{use-automations-Bus3XZEG.js → use-automations-CTWHi6sW.js} +1 -1
- package/dist/client/assets/{use-autosave-DBLXv5_D.js → use-autosave-C4kWhwdX.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CGdWa7jz.js → use-connect-companion-d9HKC-0k.js} +1 -1
- package/dist/client/assets/{use-connection-CYJgCYqU.js → use-connection-C8UZsu8O.js} +1 -1
- package/dist/client/assets/{use-copy-CrB88O_V.js → use-copy-o2njqteO.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BNC4mnlO.js → use-create-virtual-mcp-CeoevsEt.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-D0utOkHu.js → use-date-fns-locale-B8wxfqnW.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Dan7rsIv.js → use-debounced-autosave-BPjq0zWT.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CH4MSTum.js → use-debounced-value-B18TIcGd.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BqWAy8ZX.js → use-deco-credits-CgEDwdqQ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-RRjEeCHU.js → use-decopilot-events-DAkmyAjs.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Du5O_WnR.js → use-delete-connection-B1tYA8Rp.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DkX6QZM3.js → use-deployment-admin-CQsyen5K.js} +1 -1
- package/dist/client/assets/{use-entitlements-ClCAPn-1.js → use-entitlements-DWdxlnxk.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-D5GFt7R1.js → use-fast-preview-draft-url-B1UgW16r.js} +1 -1
- package/dist/client/assets/{use-file-configs-DcspjE-T.js → use-file-configs-D3FQo26s.js} +1 -1
- package/dist/client/assets/{use-in-settings-D5UcgsST.js → use-in-settings-GZqf01My.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C9JuSLN2.js → use-infinite-scroll-BPlWiH_j.js} +1 -1
- package/dist/client/assets/{use-join-requests-D5hr7HFQ.js → use-join-requests-CbTCJ0RQ.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-6FUyPoV0.js → use-main-panel-tabs-Box7rwH3.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Ddw6PUoc.js → use-mcp-auth-status-DVw_h1d5.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C9kpna06.js → use-mcp-client-_RtWTLxt.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BtGNVYiz.js → use-mcp-prompts-DeRVqq5E.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BpbNRSCE.js → use-mcp-tools-DCl_jTFW.js} +1 -1
- package/dist/client/assets/{use-members-CJT-2YAL.js → use-members-6K9R1oBQ.js} +1 -1
- package/dist/client/assets/{use-mobile-VK58ppXT.js → use-mobile-DN-7qwao.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BKGmkOVk.js → use-navigate-to-agent-D1O3uESn.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-Bvnx0BOM.js → use-open-billing-url-BVcQWIPf.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CKZ58VC5.js → use-org-auth-client-BxtjYe6u.js} +1 -1
- package/dist/client/assets/{use-org-fs-DPzG-whZ.js → use-org-fs-DORLuh0o.js} +1 -1
- package/dist/client/assets/{use-org-sso-B04Mxuuf.js → use-org-sso-CFSNXhow.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DitLiCzh.js → use-organization-roles-BkeY_qOu.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BlcGUzK2.js → use-organization-settings-BxxGkCBh.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-dyxR-DTC.js → use-panel-navigate-fIPDxYtj.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DW-vXW8q.js → use-project-native-view-presence-qb6mZmmd.js} +1 -1
- package/dist/client/assets/{use-project-scope-BodZ2Y-N.js → use-project-scope-DnsWGMAI.js} +1 -1
- package/dist/client/assets/{use-releases-B4Q4KNAy.js → use-releases-BOEFTfGN.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-D3WavNHe.js → use-reports-diagnostic-Bk5i3iRe.js} +1 -1
- package/dist/client/assets/{use-route-default-main-ZrMvaReT.js → use-route-default-main-CgrCIrJm.js} +1 -1
- package/dist/client/assets/{use-secrets-CsokxVTz.js → use-secrets-B2ml5euf.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-_MEoft3G.js → use-section-preview-base-CYzrmMH8.js} +1 -1
- package/dist/client/assets/{use-session-runtime-Bt7lvBMi.js → use-session-runtime-BSZZ8HIC.js} +1 -1
- package/dist/client/assets/{use-tags-BDJReoHD.js → use-tags-QXuvcG5w.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-C3jMZU4N.js → use-task-board-analytics-CgBHstM8.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DZYdecWA.js → use-task-metadata-DSs-EmG9.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-Bt8K0M9o.js → use-thread-analytics-Bsk1DFKA.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CyueLh5F.js → use-thread-outputs-C8be3K3D.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DqshZ0HH.js → use-virtual-mcp-BHM7_O3U.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BBFjBKxn.js +1 -0
- package/dist/client/assets/{useQueries-vjRkxTV6.js → useQueries-lLlYiC7p.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-xG_Af635.js +1 -0
- package/dist/client/assets/{users-8kGWPdIs.js → users-D4wAQwHR.js} +1 -1
- package/dist/client/assets/{utils-BOGJ6QKf.js → utils-C4OWYF9w.js} +1 -1
- package/dist/client/assets/{variant-calendar-ZCqhGA5B.js → variant-calendar-B6gLK3az.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-YSkLazsC.js → variant-matcher-override-zacKGhFx.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BR6xW0ar.js → view-mode-toggle-DSuJIM_N.js} +1 -1
- package/dist/client/assets/{virtual-mcp-I4dedXQ8.js → virtual-mcp-IurQ91Dd.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +266 -266
- package/dist/server/server.js +239 -239
- package/package.json +1 -1
- package/dist/client/assets/agent-app-D_VI9cR9.js +0 -1
- package/dist/client/assets/agent-deck-CqcGjdtS.js +0 -1
- package/dist/client/assets/agent-library-file-Ca84W-pf.js +0 -1
- package/dist/client/assets/agent-settings-BHLTTfW4.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BR_ncsV8.js +0 -2
- package/dist/client/assets/agent-view-DS8QF4Ke.js +0 -1
- package/dist/client/assets/api-keys-DD8G4v42.js +0 -1
- package/dist/client/assets/app-editor-Dd80JbK2.js +0 -1
- package/dist/client/assets/project-reports-1ZKKeXQL.js +0 -1
- package/dist/client/assets/project-tasks-KKNu291m.js +0 -1
- package/dist/client/assets/record-editor-CnFqh3Vp.js +0 -1
- package/dist/client/assets/reports-CMBemuV-.js +0 -1
- package/dist/client/assets/tasks-DuaaDsqx.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BFkml8d7.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DtRGEtxl.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 g,an as kt,aE as Qe,ao as Se,c as fe,b as Ne,j as r,K as qr,e as Gr,h as Pt,B as He,aF as Jr,X as Xt,aG as Yr,aH as Qr,l as It,P as Nn,q as Xr,t as Cn}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sections-editor-BrJtbdMq.js","assets/index-BjrR9kZj.js","assets/index-BeJdXzSv.css","assets/chat-context-BiOtKn7P.js","assets/use-panel-navigate-fIPDxYtj.js","assets/thread-route-V1sEHiBY.js","assets/use-project-scope-DnsWGMAI.js","assets/use-virtual-mcp-BHM7_O3U.js","assets/use-mcp-client-_RtWTLxt.js","assets/auth-yECgQ-YG.js","assets/github-repo-BknN0SVI.js","assets/autosend-CBLCn5Df.js","assets/thread-intent-Dk6BvhGr.js","assets/slugify-CEUa2lfQ.js","assets/hooks-DkDt1nFE.js","assets/backoff-8mStPHYB.js","assets/task-board-D00YvbAx.js","assets/schema-DR6HLXFs.js","assets/use-is-desktop-app-BNujXJc_.js","assets/use-entitlements-DWdxlnxk.js","assets/use-ai-providers-OcKKapmz.js","assets/location-oTTXFrSF.js","assets/use-decopilot-events-DAkmyAjs.js","assets/use-organization-settings-BxxGkCBh.js","assets/runnable-block-editor-B-NGtP-T.js","assets/use-session-runtime-BSZZ8HIC.js","assets/claim-phase-copy-Yh04XZxP.js","assets/agent-icon-8fIO3moM.js","assets/AlertCircle-B6v6clUp.js","assets/Tool01-Cc10eS4M.js","assets/ArrowUp-Cwnen55n.js","assets/ArrowLeft-DDW5by-5.js","assets/ArrowRight-b4OSvT38.js","assets/ZoomOut-BWWdIPu7.js","assets/Globe04-BKigapNa.js","assets/CheckCircle-MH252tOY.js","assets/Check-BcWDZio0.js","assets/ChevronUp-zgSkYMxJ.js","assets/UserSquare-BcjGTyJF.js","assets/Copy01-B1NOvXZB.js","assets/CreditCard01-BZsA4Hwc.js","assets/DotsVertical-Bl1hnuJi.js","assets/Eye-BbaBeCZ5.js","assets/Share07-Cs13DReE.js","assets/XClose-BNpVIYKH.js","assets/Image01-w2ZWkVaa.js","assets/Key01-DT2DLjDU.js","assets/LayoutLeft-DmPeVi4U.js","assets/Link01-CwAzoHCm.js","assets/LinkExternal01-BVro7p0d.js","assets/Monitor01-BXGpB3DU.js","assets/Sun-Cvn5rNir.js","assets/Palette-p6gpXB43.js","assets/Plus-CPRr8eLA.js","assets/SearchMd-DmrZ8tNb.js","assets/Trash01-BUFUahy8.js","assets/Upload01-BYDz7chj.js","assets/User01-jkNTFSxf.js","assets/Users01-CnASZBXO.js","assets/X-DMAiKm4q.js","assets/Zap-YBE6LDnX.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-CI7mZS0g.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-CzA8-NMA.js","assets/use-copy-o2njqteO.js","assets/usage-stats-C7Cj3ABB.js","assets/markdown-FaJSXz8c.js","assets/dialog-BGQjuyIa.js","assets/org-file-open-context-dfBXT7MO.js","assets/use-mobile-DN-7qwao.js","assets/tooltip-a6VXOqQI.js","assets/index-BExO8BBu.js","assets/shell-layout-CVhVAInm.js","assets/avatar-BWIF2BFh.js","assets/download-app-dialog-REdgjDQr.js","assets/command-CzEVwgKB.js","assets/index-DvDGTSZO.js","assets/integration-icon-DpzEVv6e.js","assets/project-icon-Cr4yXuUg.js","assets/required-auth-layout-DY_cdaIx.js","assets/use-org-sso-CFSNXhow.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-Bcpidv6E.js","assets/types-CuuumKKW.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/gateway-client-BA28nWtn.js","assets/tool-namespace-DmnQIdtF.js","assets/utils-CVEq3hMx.js","assets/sheet-CBJ9Lsc2.js","assets/use-connection-C8UZsu8O.js","assets/use-navigate-to-agent-D1O3uESn.js","assets/use-mcp-prompts-DeRVqq5E.js","assets/index-CujAxzYL.js","assets/form-DTmMHLRx.js","assets/label-68C0kM-R.js","assets/input-DFe835A1.js","assets/use-thread-outputs-C8be3K3D.js","assets/file-type-icon-9ZD-EW4g.js","assets/popover-Bfdv1gl-.js","assets/utils-C4OWYF9w.js","assets/scroll-area-C2I8c9NJ.js","assets/select-DfRa6U-n.js","assets/monaco-editor-CZp4UVdz.js","assets/editor-DzPBGxM9.js","assets/calendar-BGSFNOk3.js","assets/textarea-DcUTXKBn.js","assets/rich-text-link-control-DJRcgLMd.js","assets/switch-tss5J5qD.js","assets/combobox-BdqfRWb0.js","assets/alert-dialog-mXuhGOeD.js","assets/sandbox-url-D3mC8qhT.js","assets/search-input-CFuVSdCR.js","assets/tabs-Ct12da-2.js","assets/use-debounced-value-B18TIcGd.js","assets/use-file-configs-D3FQo26s.js","assets/asset-utils-DCRQ2cUb.js","assets/useInfiniteQuery-BBFjBKxn.js","assets/infiniteQueryObserver-DFZOc4R3.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/toggle-group-BN_nhcbs.js","assets/decofile-api-CTqqNPjg.js","assets/sandbox-git-api-B1R0585s.js","assets/mustache-Ca6JIIV3.js","assets/page-seo-form-CkLwkYBd.js","assets/use-section-preview-base-CYzrmMH8.js","assets/section-preview-url-Csj0_ZDg.js","assets/variant-matcher-override-zacKGhFx.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as g,an as kt,aE as Qe,ao as Se,c as fe,b as Ne,j as r,K as qr,e as Gr,h as Pt,B as He,aF as Jr,X as Xt,aG as Yr,aH as Qr,l as It,P as Nn,q as Xr,t as Cn}from"./index-BjrR9kZj.js";import{A as Zr}from"./agent-view-guard-9U9HS2_t.js";import{F as es}from"./feature-gate-BxoH2N-k.js";import{a as ts,b as St}from"./chat-context-BiOtKn7P.js";import{t as ns}from"./ChevronUp-zgSkYMxJ.js";import{z as qn,H as rs,I as ss,J as as,K as is,L as os,M as ls,N as Rn,E as cs,C as ds}from"./agent-icon-8fIO3moM.js";import{i as us}from"./Share07-Cs13DReE.js";import{n as Gn}from"./LinkExternal01-BVro7p0d.js";import{s as ms}from"./Plus-CPRr8eLA.js";import{P as fs,a as ps,b as hs}from"./popover-Bfdv1gl-.js";import{a as rt,b as st,c as Jn,d as Yn,e as Qn,C as Xn}from"./command-CzEVwgKB.js";import{d as gs,a as vs}from"./use-virtual-mcp-BHM7_O3U.js";import{c as Zn,d as Zt,f as bs}from"./sandbox-lifecycle-context-ir4poExj.js";import{e as xs,d as ys}from"./backoff-8mStPHYB.js";import{a as ws}from"./thread-intent-Dk6BvhGr.js";import{u as er}from"./use-session-runtime-BSZZ8HIC.js";import{N as ks,b as Ps,s as at,n as en,c as tr,f as Fe,v as nr,h as Ss,u as Es,e as js,d as Ns,j as Cs,k as Tn}from"./claim-phase-copy-Yh04XZxP.js";import{u as Rs}from"./use-mobile-DN-7qwao.js";import{c as Kt,T as zt,a as Ut}from"./tooltip-a6VXOqQI.js";import{T as et}from"./toolbar-icon-button-dJwApEoN.js";import{b as Ts,a as Ls,u as rr,g as Os,c as _s,B as Ht,P as As,r as Ds,R as Bs,d as Fs,e as tn,f as sr,h as $s,i as Ms,j as Is,l as Ks,m as zs,k as Us,p as Hs,n as Ws,S as Wt}from"./runnable-block-editor-B-NGtP-T.js";import{w as bt}from"./variant-matcher-override-zacKGhFx.js";import{r as Vs,w as qs,D as Gs,b as Ln,a as Js}from"./section-preview-url-Csj0_ZDg.js";import{u as Ys}from"./use-fast-preview-draft-url-B1UgW16r.js";import{r as ar,l as ir,u as Qs,w as Xs}from"./last-preview-page-LzMfR51s.js";import{u as Zs}from"./use-is-desktop-app-BNujXJc_.js";import{a as ea,d as or}from"./shell-layout-CVhVAInm.js";import{u as Jt}from"./useQueries-lLlYiC7p.js";import{i as ta}from"./ArrowRight-b4OSvT38.js";import{b as lr,D as cr,c as dr,d as ur,e as na}from"./dialog-BGQjuyIa.js";import{I as On}from"./input-DFe835A1.js";import{u as mr}from"./blocks-preview-workspace-context-C0MFUrPc.js";import{i as ra}from"./AlertCircle-B6v6clUp.js";import{E as nn}from"./empty-state-CzE4b4zD.js";import{i as sa}from"./X-DMAiKm4q.js";import{M as aa}from"./monaco-editor-CZp4UVdz.js";import{a as ia}from"./utils-C4OWYF9w.js";import{R as _n,a as xt,b as An}from"./resizable-BtDH_0Vi.js";import{r as oa}from"./virtual-mcp-IurQ91Dd.js";import{b as Vt}from"./use-project-scope-DnsWGMAI.js";import{G as Dn}from"./github-icon-D1YjVdXZ.js";import{R as la}from"./repository-import-picker-BAZ9mPpT.js";import{r as ca}from"./use-main-panel-tabs-Box7rwH3.js";import{u as da}from"./use-task-metadata-DSs-EmG9.js";import{b as ua}from"./thread-route-V1sEHiBY.js";import"./use-panel-navigate-fIPDxYtj.js";import"./feature-paywall-D1UvIJE8.js";import"./Check-BcWDZio0.js";import"./plan-ladder-BHP-xahB.js";import"./use-entitlements-DWdxlnxk.js";import"./autosend-CBLCn5Df.js";import"./hooks-DkDt1nFE.js";import"./use-mcp-client-_RtWTLxt.js";import"./auth-yECgQ-YG.js";import"./task-board-D00YvbAx.js";import"./schema-DR6HLXFs.js";import"./use-ai-providers-OcKKapmz.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DAkmyAjs.js";import"./use-organization-settings-BxxGkCBh.js";import"./Tool01-Cc10eS4M.js";import"./ArrowUp-Cwnen55n.js";import"./ArrowLeft-DDW5by-5.js";import"./ZoomOut-BWWdIPu7.js";import"./Globe04-BKigapNa.js";import"./CheckCircle-MH252tOY.js";import"./UserSquare-BcjGTyJF.js";import"./Copy01-B1NOvXZB.js";import"./CreditCard01-BZsA4Hwc.js";import"./DotsVertical-Bl1hnuJi.js";import"./Eye-BbaBeCZ5.js";import"./XClose-BNpVIYKH.js";import"./Image01-w2ZWkVaa.js";import"./Key01-DT2DLjDU.js";import"./LayoutLeft-DmPeVi4U.js";import"./Link01-CwAzoHCm.js";import"./Monitor01-BXGpB3DU.js";import"./Sun-Cvn5rNir.js";import"./Palette-p6gpXB43.js";import"./SearchMd-DmrZ8tNb.js";import"./Trash01-BUFUahy8.js";import"./Upload01-BYDz7chj.js";import"./User01-jkNTFSxf.js";import"./Users01-CnASZBXO.js";import"./Zap-YBE6LDnX.js";import"./index-DvDGTSZO.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./slugify-CEUa2lfQ.js";import"./index-BExO8BBu.js";import"./pair-CI7mZS0g.js";import"./format-time-BtXRrtv4.js";import"./differenceInSeconds-C3x8sHUj.js";import"./collapsible-CzA8-NMA.js";import"./use-copy-o2njqteO.js";import"./usage-stats-C7Cj3ABB.js";import"./markdown-FaJSXz8c.js";import"./org-file-open-context-dfBXT7MO.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Bcpidv6E.js";import"./types-CuuumKKW.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./gateway-client-BA28nWtn.js";import"./tool-namespace-DmnQIdtF.js";import"./utils-CVEq3hMx.js";import"./sheet-CBJ9Lsc2.js";import"./integration-icon-DpzEVv6e.js";import"./use-connection-C8UZsu8O.js";import"./use-navigate-to-agent-D1O3uESn.js";import"./github-repo-BknN0SVI.js";import"./use-mcp-prompts-DeRVqq5E.js";import"./index-CujAxzYL.js";import"./form-DTmMHLRx.js";import"./label-68C0kM-R.js";import"./use-thread-outputs-C8be3K3D.js";import"./file-type-icon-9ZD-EW4g.js";import"./scroll-area-C2I8c9NJ.js";import"./select-DfRa6U-n.js";import"./calendar-BGSFNOk3.js";import"./textarea-DcUTXKBn.js";import"./rich-text-link-control-DJRcgLMd.js";import"./switch-tss5J5qD.js";import"./combobox-BdqfRWb0.js";import"./alert-dialog-mXuhGOeD.js";import"./search-input-CFuVSdCR.js";import"./tabs-Ct12da-2.js";import"./use-debounced-value-B18TIcGd.js";import"./use-file-configs-D3FQo26s.js";import"./asset-utils-DCRQ2cUb.js";import"./useInfiniteQuery-BBFjBKxn.js";import"./infiniteQueryObserver-DFZOc4R3.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./toggle-group-BN_nhcbs.js";import"./decofile-api-CTqqNPjg.js";import"./sandbox-git-api-B1R0585s.js";import"./avatar-BWIF2BFh.js";import"./download-app-dialog-REdgjDQr.js";import"./project-icon-Cr4yXuUg.js";import"./required-auth-layout-DY_cdaIx.js";import"./use-org-sso-CFSNXhow.js";import"./editor-DzPBGxM9.js";import"./repository-picker-D-TogGEt.js";import"./collection-search-BvnUba7J.js";import"./use-route-default-main-CgrCIrJm.js";import"./use-mcp-tools-DCl_jTFW.js";import"./index-DhBFD4kx.js";import"./drawer-B-c-ivso.js";import"./input-DbKUv_Vw.js";import"./chat-draft-IKP3Bpj9.js";import"./use-deco-credits-CgEDwdqQ.js";import"./use-open-billing-url-BVcQWIPf.js";import"./decopilot-D-CvU-Yz.js";import"./checkbox-iCK8-YOo.js";import"./ai-providers-logos-DD3qZ33J.js";import"./index-DA-FmRbp.js";import"./input-D4erz3OA.js";import"./suggestion-ns0qv0uQ.js";import"./use-org-fs-DORLuh0o.js";import"./question-004-sINsf4GQ.js";import"./use-members-6K9R1oBQ.js";import"./use-org-auth-client-BxtjYe6u.js";import"./add-connection-dialog-C9-7gsrE.js";import"./extract-connection-data-D4h0y4EU.js";import"./metadata-D72DunRR.js";import"./connection-BY8-KaA4.js";import"./connection-card-B4bw8HCo.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-DMj6bxTF.js";import"./authenticate-and-persist-oauth-Cdoq_uUT.js";import"./mcp-oauth-BMxlsP2O.js";import"./collection-tabs--W1A2Kno.js";import"./badge-MUYSitCi.js";import"./use-infinite-scroll-BPlWiH_j.js";import"./useSuspenseInfiniteQuery-xG_Af635.js";import"./use-project-native-view-presence-qb6mZmmd.js";import"./site-slug-DebpOoQq.js";const ma={mode:"none",iframeBase:null,showBlockingOverlay:!1,showWakingPill:!1};function fa(t){const{previewState:e,progressStatus:n,fastPreviewActive:s=!1,fastPreviewReady:a=!1,codingSession:u=!1}=t,d=u?null:t.previewServerUrl;return t.localPreviewUrl?{mode:"sandbox",iframeBase:t.localPreviewUrl,showBlockingOverlay:!1,showWakingPill:!1}:e.kind==="suspended"||e.kind==="errored"?ma:s&&a&&d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!1}:!s&&e.kind==="iframe"&&n!=="doing"?{mode:"sandbox",iframeBase:e.previewUrl,showBlockingOverlay:!1,showWakingPill:!1}:d?{mode:"production",iframeBase:d,showBlockingOverlay:!1,showWakingPill:!0}:{mode:"none",iframeBase:null,showBlockingOverlay:!0,showWakingPill:!1}}const pa=1e4,ha=1e3,ga=3e4;function va({iframeRef:t,src:e,active:n}){const s=g.useRef(0),a=g.useRef(null),u=g.useRef(null),d=g.useRef(e),o=g.useRef(n);d.current=e,o.current=n;const l=()=>{a.current&&clearTimeout(a.current),u.current&&clearTimeout(u.current),a.current=null,u.current=null},c=()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,h()},pa)},h=()=>{if(!o.current||!d.current)return;u.current&&clearTimeout(u.current);const P=xs(ga,ha,s.current,2,.5);s.current+=1,u.current=setTimeout(()=>{u.current=null;const x=t.current,w=d.current;!x||!w||!o.current||(x.src=w,c())},P)},p=()=>{s.current=0,l()},f=()=>{a.current&&(clearTimeout(a.current),a.current=null),h()};return g.useEffect(()=>{if(l(),s.current=0,!(!n||!e))return c(),l},[e,n]),{handleLoad:p,handleError:f}}var Bn;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(Bn||(Bn={}));const ba=kt({tag:Se(),id:Se(),classes:Se(),text:Se(),html:Se(),manifestKey:Se().nullable(),componentName:Se().nullable(),parents:Se(),url:Se(),path:Se(),viewport:kt({width:Qe(),height:Qe()}),position:kt({x:Qe(),y:Qe()})}),xa=`(function() {
|
|
3
3
|
if (window.__visualEditorActive) return;
|
|
4
4
|
window.__visualEditorActive = true;
|
|
5
5
|
|
|
@@ -515,4 +515,4 @@ import{r as g,an as kt,aE as Qe,ao as Se,c as fe,b as Ne,j as r,K as qr,e as Gr,
|
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
517
|
})();`;function Yt(t,e){let n=t,s=typeof n?.__resolveType=="string"?n.__resolveType:"";for(let a=0;s&&a<5;a++){const u=e[s];if(u&&typeof u=="object"&&"__resolveType"in u){const d=u.__resolveType;if(typeof d=="string"&&d&&d!==s){n=u,s=d;continue}}break}if(!s)return[];if(s.includes("flags/multivariate")){const a=Array.isArray(n.variants)?n.variants:[];if(a.length===0||a.every(o=>o?.rule?.__resolveType===ks))return null;const d=[];for(const o of a){const l=o?.value;if(l&&typeof l=="object")for(const c of Yt(l,e)??[])d.includes(c)||d.push(c)}return d}if(Ps(s)){const a=n.section&&typeof n.section=="object"?Yt(n.section,e):[];return a===null?null:a.length?[s,...a]:[s]}return[s]}function Je(t){return t.replace(/[`*_]/g,"\\$&")}function ka(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 s=`<${t.tag}${t.classes?` class="${Je(t.classes)}"`:""}>`;n.push(`**Clicked element:** \`${s}\``),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 a=t.html.replace(/```/g,"`` `");return n.push("","**HTML snippet:**","```html",a,"```"),n.push("","Please read the source file, locate the element, and apply the requested change."),n.join(`
|
|
518
|
-
`)}function Pa(t,e,n=320,s=44,a=12){const{x:u,y:d}=t,{width:o,height:l}=e,c=Math.max(a,Math.min(u-n/2,o-n-a)),p=d/l>.68?Math.max(a,d-s-18):Math.min(d+18,l-s-a);return{leftPct:c/o*100,topPct:p/l*100}}function Sa(t){const e=fe.c(45),{element:n,onDismiss:s}=t,[a,u]=g.useState(""),d=g.useRef(null),{sendMessage:o}=ts(),{openSidePanel:l}=ea(),c=Ne();let h;e[0]!==n||e[1]!==a||e[2]!==s||e[3]!==l||e[4]!==o?(h=()=>{if(!a.trim())return;const B=ka(n,a);l(),o({parts:[{type:"text",text:B}]}),s()},e[0]=n,e[1]=a,e[2]=s,e[3]=l,e[4]=o,e[5]=h):h=e[5];const p=h;let f;e[6]!==n.position||e[7]!==n.viewport?(f=Pa(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=f):f=e[8];const P=f,x=`${P.leftPct}%`,w=`${P.topPct}%`;let b;e[9]!==x||e[10]!==w?(b={left:x,top:w,width:"320px"},e[9]=x,e[10]=w,e[11]=b):b=e[11];let S;e[12]!==p?(S=B=>{B.preventDefault(),p()},e[12]=p,e[13]=S):S=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=B=>u(B.target.value),e[14]=N):N=e[14];let y;e[15]!==s?(y=B=>{B.key==="Escape"&&s()},e[15]=s,e[16]=y):y=e[16];let k;e[17]!==c?(k=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=k):k=e[18];let v;e[19]!==a||e[20]!==y||e[21]!==k?(v=r.jsx("input",{ref:d,autoFocus:!0,type:"text",value:a,onChange:N,onKeyDown:y,placeholder:k,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=a,e[20]=y,e[21]=k,e[22]=v):v=e[22];let E;e[23]!==a?(E=a.trim(),e[23]=a,e[24]=E):E=e[24];const _=!E;let j;e[25]!==c?(j=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=j):j=e[26];let F;e[27]!==c?(F=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=F):F=e[28];let K;e[29]!==F?(K=r.jsx("title",{children:F}),e[29]=F,e[30]=K):K=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=$):$=e[31];let T;e[32]!==K?(T=r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[K,$]}),e[32]=K,e[33]=T):T=e[33];let D;e[34]!==_||e[35]!==j||e[36]!==T?(D=r.jsx("button",{type:"submit",disabled:_,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:T}),e[34]=_,e[35]=j,e[36]=T,e[37]=D):D=e[37];let z;e[38]!==v||e[39]!==D||e[40]!==S?(z=r.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:S,children:[v,D]}),e[38]=v,e[39]=D,e[40]=S,e[41]=z):z=e[41];let W;return e[42]!==z||e[43]!==b?(W=r.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:z}),e[42]=z,e[43]=b,e[44]=W):W=e[44],W}const $n="site-links",Ea=/details?page|\bpdp\b/i,ja=/listingpage|\bplp\b/i;function Na(t,e,n){const s=new Set;for(const o of n)Ea.test(o)&&s.add("product"),ja.test(o)&&s.add("category");const a=at(en(t)),u=a[a.length-1],d=a[a.length-2];return u?.type==="text"&&u.text==="/p"&&d?.type==="param"&&d.name===e&&s.add("product"),e==="*"&&a.some(o=>o.type==="param"&&o.name==="*")&&s.add("category"),s}const Ca=["rosa","preto","pink","black"];function yt(t,e){const n=e.trim();return n?t(n):Ca.flatMap(s=>t(s))}function Ra(t,e){const n=e.trim(),s=[];/^\d+$/.test(n)&&s.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return s.push({resolveType:t,props:{query:u,count:10}}),s}const fr=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function rn(t){return t.split("/")[0]??""}function Ta(t){const e=new Set;for(const n of t){const s=rn(n);fr.has(s)&&e.add(s)}return e}function La(t,e){const n=rn(t);return!fr.has(n)||e.size===0?!0:e.has(n)}const Oa=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>yt(n=>Ra(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 _a(t,e,n=new Set){const s=[...e],a=o=>{const l=[];for(const c of Oa){if(c.kind!==o)continue;const h=s.find(p=>c.test(p)&&La(p,n));h&&l.push({cand:c,resolveType:h})}return l.find(c=>n.has(rn(c.resolveType)))??l[0]},u=(o,l,c)=>({kind:o.kind,id:`${o.kind}:${l}`,resolveType:l,clientFilter:o.clientFilter,isFallback:c,buildRequests:h=>o.buildRequests(l,h),optionsFromPayload:o.optionsFromPayload}),d=[];for(const o of["product","category"]){if(!t.has(o))continue;const l=a(o);l&&d.push(u(l.cand,l.resolveType,!1))}return t.size>0&&d.push(Aa(t.has("category")?"category":"product")),d}function Aa(t){return{kind:t,id:$n,resolveType:$n,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ha(e,n)}}function Ue(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Da(t,e,n){const s=new Set,a=new Set,u=d=>{if(Array.isArray(d)){for(const c of d)u(c);return}const o=Ue(d);if(!o)return;const l=o.__resolveType;if(typeof l=="string"){if(n(l))s.add(l);else if(l in e&&!a.has(l)){a.add(l);const c=Ue(e[l])?.__resolveType;typeof c=="string"&&n(c)&&s.add(l),u(e[l])}}for(const c of Object.values(o))u(c)};return u(t),s}function pr(t){const e=new Set,n=[];for(const s of t)for(const a of s)e.has(a.value)||(e.add(a.value),n.push(a));return n}function hr(t){try{return decodeURIComponent(t)}catch{return t}}function Ba(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fa(t){const e=[];let n="^";for(const s of t)s.type==="text"?n+=Ba(s.text):(e.push(s.name),n+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function gr(t,e,n){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const a=at(en(e)),{pattern:u,order:d}=Fa(a),o=d.indexOf(n);if(o===-1)return null;const l=s.match(u);if(!l)return null;const c=l[o+1]?.replace(/^\/+|\/+$/g,"");return c?hr(c):null}function wt(t,e){const n=Ue(t),s=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],a=[],u=new Set;for(const d of s){const o=Ue(d);if(!o)continue;const l=gr(o.url,e.template,e.paramName);if(!l||u.has(l))continue;u.add(l);const c=Ue(o.isVariantOf),h=typeof c?.name=="string"&&c.name||typeof o.name=="string"&&o.name||l,p=Array.isArray(o.image)?Ue(o.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;a.push({value:l,label:h,image:f})}return a}function $a(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?hr(n):null}function Ma(t){const e=[],n=new Set,s=(a,u)=>{const d=Ue(a);if(!d)return;const o=typeof d.name=="string"&&d.name?d.name:"",l=o?[...u,o]:u,c=$a(d.url);if(c&&!n.has(c)&&(n.add(c),e.push({value:c,label:l.join(" › ")||c})),Array.isArray(d.children))for(const h of d.children)s(h,l)};if(Array.isArray(t))for(const a of t)s(a,[]);return e}const Ia=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 s,a=0;for(;(s=n.exec(t))!==null&&a++<5e3;){const u=s[1]??"",d=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:d})}return e}function Ua(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,s=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,a=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,d=0;for(;(u=s.exec(t))!==null&&d++<3e3;){const o=(u[1]??"").replace(/\\\//g,"/");if(!o||n.has(o))continue;n.add(o);const l=t.slice(u.index,u.index+900).match(a)?.[1]?.replace(/\\\//g,"/");e.push({url:o,name:u[2]??"",image:l||void 0})}return e}function Ha(t,e){const n=[],s=new Set,a=(u,d,o,l)=>{if(n.length>=200)return;const c=gr(u,e.template,e.paramName);!c||s.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||o==="category"&&Ia.has(c.split("/")[0]??"")||(s.add(c),n.push({value:c,label:d&&d.length<=80?d:Ka(c),kind:o,image:l}))};for(const{url:u,name:d,image:o}of Ua(t))a(u,d,"product",o);for(const{href:u,text:d}of za(t))u.startsWith("/")&&!u.startsWith("//")&&a(u,d,"category");return n}function tt(t,e,n=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,n)}const vr=1e4;function Wa(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 s=await fetch(Ts(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(vr)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function Mn(t,e){const n=await fetch(Ls(t,e),{signal:AbortSignal.timeout(vr)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function qa(t,e,n){const s=e.optionsFromPayload(await Mn(t,"/"),n),a=s.find(d=>d.kind==="category");if(!a)return s;const u=Fe(n.template,{[n.paramName]:a.value});if(u==="/")return s;try{const d=e.optionsFromPayload(await Mn(t,u),n).filter(o=>o.kind==="product");return pr([s,d])}catch{return s}}function Ga(t,e,n){return qr.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Ja(t,e,n,s){if(e.homepageLinks)return qa(t,e,s);const a=e.buildRequests?.(n)??[];if(a.length===0)return[];const u=await Promise.allSettled(a.map(o=>Va(t,o))),d=u.filter(o=>o.status==="fulfilled").map(o=>o.value);if(d.length===0){const o=u.find(l=>l.status==="rejected");throw o?o.reason:new Error("Failed to fetch options")}return pr(d.map(o=>e.optionsFromPayload(o,s)))}function Qt(t,e,n,s,a){return{queryKey:Ga(t,e,n),queryFn:()=>Ja(t,e,n,s),enabled:a,staleTime:6e4,retry:1}}function nt(t){const e=fe.c(16),{heading:n,iconKind:s,options:a,template:u,paramName:d,keyPrefix:o,onSelect:l}=t;if(a.length===0)return null;let c;if(e[0]!==s||e[1]!==o||e[2]!==l||e[3]!==a||e[4]!==d||e[5]!==u){let p;e[7]!==s||e[8]!==o||e[9]!==l||e[10]!==d||e[11]!==u?(p=f=>r.jsxs(st,{value:`${o}:${f.value}`,className:"gap-3 py-2",onSelect:()=>l(f.value),children:[s==="product"&&r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?r.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):r.jsx(qn,{size:14,className:"text-muted-foreground"})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:f.label}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[d]:f.value})})]})]},`${o}:${f.value}`),e[7]=s,e[8]=o,e[9]=l,e[10]=d,e[11]=u,e[12]=p):p=e[12],c=a.map(p),e[0]=s,e[1]=o,e[2]=l,e[3]=a,e[4]=d,e[5]=u,e[6]=c}else c=e[6];let h;return e[13]!==n||e[14]!==c?(h=r.jsx(rt,{heading:n,children:c}),e[13]=n,e[14]=c,e[15]=h):h=e[15],h}function In(t){const e=fe.c(2),{text:n}=t;let s;return e[0]!==n?(s=r.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=s):s=e[1],s}function Ya(t){const e=fe.c(52),{sources:n,template:s,paramName:a,value:u,sandboxRef:d,onCommit:o}=t,l=Ne(),[c,h]=g.useState(!1),[p,f]=g.useState(""),[P,x]=g.useState(""),w=g.useRef(null),b=a==="*"?l("sandbox.preview.catchAllParamLabel"):`:${a}`,S=Wa(l),y=[...new Set(n.map(I=>S[I.kind].noun))].join(" or ");let k;e[0]!==l||e[1]!==y?(k=l("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=l,e[1]=y,e[2]=k):k=e[2];const v=k,E={template:s,paramName:a};let _;e[3]!==p?(_=(I,C)=>({source:I,query:C,options:I.clientFilter?tt(C.data??[],p):C.data??[]}),e[3]=p,e[4]=_):_=e[4];const j=_,F=n.filter(si),K=n.filter(ri),$=Jt({queries:F.map(I=>Qt(d,I,P,E,c))});let T;e[5]!==$||e[6]!==j?(T=(I,C)=>j(I,$[C]),e[5]=$,e[6]=j,e[7]=T):T=e[7];const D=F.map(T),z=D.length===0||D.every(ni),W=Jt({queries:K.map(I=>Qt(d,I,P,E,c&&z))});let B;e[8]!==W||e[9]!==j?(B=(I,C)=>j(I,W[C]),e[8]=W,e[9]=j,e[10]=B):B=e[10];const Y=K.map(B),M=z?Y:D,U=M.length===1&&M[0]?.source.homepageLinks?M[0]:null,O=U&&!U.query.isLoading&&!U.query.isError?U?.query.data??[]:[],ne=tt(O.filter(ti),p),V=tt(O.filter(ei),p),q=ne.length>0&&V.length>0,Q=I=>{h(I),w.current&&clearTimeout(w.current),f(I?u:""),x(I?u:"")};let J;e[11]===Symbol.for("react.memo_cache_sentinel")?(J=I=>{f(I),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{x(I)},300)},e[11]=J):J=e[11];const te=J,se=I=>{o(I),Q(!1)},X=tr(p),G=Fe(s,{[a]:X}),ae=cr,ge=lr,ve="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ce=Za;let ie;e[12]!==b||e[13]!==l?(ie=l("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=l,e[14]=ie):ie=e[14];let de;e[15]!==ie?(de=r.jsx(dr,{className:"sr-only",children:r.jsx(ur,{children:ie})}),e[15]=ie,e[16]=de):de=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=r.jsx(qn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let Z;e[18]!==l?(Z=l("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=l,e[19]=Z):Z=e[19];let ue;e[20]!==b?(ue=r.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:b}),e[20]=b,e[21]=ue):ue=e[21];let pe;e[22]!==Z||e[23]!==ue?(pe=r.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,r.jsxs("span",{className:"text-sm font-medium text-foreground",children:[Z," ",ue]})]}),e[22]=Z,e[23]=ue,e[24]=pe):pe=e[24];const he=Yn,$e=!1,Le="min-h-0 flex-1";let Oe;e[25]!==v||e[26]!==p?(Oe=r.jsx(Qn,{autoFocus:!0,placeholder:v,value:p,onValueChange:te}),e[25]=v,e[26]=p,e[27]=Oe):Oe=e[27];const We=Jn,xe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let ye;e[28]!==l?(ye=l("sandbox.pathParamPickerChip.noResults"),e[28]=l,e[29]=ye):ye=e[29];let Ee;e[30]!==ye?(Ee=r.jsx(Xn,{children:ye}),e[30]=ye,e[31]=Ee):Ee=e[31];const Me=X&&r.jsx(rt,{className:"shrink-0",children:r.jsxs(st,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>se(X),children:[r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:r.jsx(ta,{size:14,className:"text-muted-foreground"})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:l("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:b})}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:G})]})]})}),_e=q?r.jsxs("div",{className:"flex min-h-0 flex-1",children:[r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:r.jsx(nt,{heading:S.category.heading,iconKind:"category",options:ne,template:s,paramName:a,keyPrefix:`${U?.source.id}:cat`,onSelect:se})}),r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r.jsx(nt,{heading:S.product.heading,iconKind:"product",options:V,template:s,paramName:a,keyPrefix:`${U?.source.id}:prod`,onSelect:se})})]}):r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:M.map(I=>{const{source:C,query:me,options:De}=I,{noun:Et}=S[C.kind];if(me.isLoading)return r.jsx(In,{text:l("sandbox.pathParamPickerChip.loading",{noun:Et})},C.id);if(me.isError)return r.jsx(In,{text:l("sandbox.pathParamPickerChip.couldNotLoad")},C.id);if(C.homepageLinks){const Xe=me.data??[];return r.jsxs(g.Fragment,{children:[r.jsx(nt,{heading:S.category.heading,iconKind:"category",options:tt(Xe.filter(Xa),p),template:s,paramName:a,keyPrefix:`${C.id}:cat`,onSelect:se}),r.jsx(nt,{heading:S.product.heading,iconKind:"product",options:tt(Xe.filter(Qa),p),template:s,paramName:a,keyPrefix:`${C.id}:prod`,onSelect:se})]},C.id)}return r.jsx(nt,{heading:M.length>1?S[C.kind].heading:void 0,iconKind:C.kind,options:De,template:s,paramName:a,keyPrefix:C.id,onSelect:se},C.id)})});let Ae;e[32]!==We||e[33]!==Ee||e[34]!==Me||e[35]!==_e?(Ae=r.jsxs(We,{className:xe,children:[Ee,Me,_e]}),e[32]=We,e[33]=Ee,e[34]=Me,e[35]=_e,e[36]=Ae):Ae=e[36];let we;e[37]!==he||e[38]!==Oe||e[39]!==Ae?(we=r.jsxs(he,{shouldFilter:$e,className:Le,children:[Oe,Ae]}),e[37]=he,e[38]=Oe,e[39]=Ae,e[40]=we):we=e[40];let Ce;e[41]!==ge||e[42]!==de||e[43]!==pe||e[44]!==we||e[45]!==ce?(Ce=r.jsxs(ge,{className:ve,onClick:ce,children:[de,pe,we]}),e[41]=ge,e[42]=de,e[43]=pe,e[44]=we,e[45]=ce,e[46]=Ce):Ce=e[46];let Ie;return e[47]!==ae||e[48]!==Q||e[49]!==c||e[50]!==Ce?(Ie=r.jsx(ae,{open:c,onOpenChange:Q,children:Ce}),e[47]=ae,e[48]=Q,e[49]=c,e[50]=Ce,e[51]=Ie):Ie=e[51],r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",title:l("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),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:I=>{I.stopPropagation(),Q(!0)},children:u||b}),Ie]})}function Qa(t){return t.kind==="product"}function Xa(t){return t.kind!=="product"}function Za(t){return t.stopPropagation()}function ei(t){return t.kind==="product"}function ti(t){return t.kind!=="product"}function ni(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ri(t){return t.isFallback}function si(t){return!t.isFallback}function ai(t){const e=fe.c(8),{sources:n,template:s,paramName:a,sandboxRef:u,onFill:d}=t;let o,l;if(e[0]!==a||e[1]!==u||e[2]!==n||e[3]!==s){const P={template:s,paramName:a},x=n.filter(ii);l=Jt,o=x.map(w=>Qt(u,w,"",P,!0)),e[0]=a,e[1]=u,e[2]=n,e[3]=s,e[4]=o,e[5]=l}else o=e[4],l=e[5];let c;e[6]!==o?(c={queries:o},e[6]=o,e[7]=c):c=e[7];const h=l(c),[p,f]=g.useState(!1);if(!p)for(const P of h){if(P.isLoading)break;const x=P.data?.[0];if(x){f(!0),queueMicrotask(()=>d(x.value));break}}return null}function ii(t){return!t.isFallback}function oi(t){const e=fe.c(31),{name:n,value:s,onCommit:a}=t,u=Ne(),[d,o]=g.useState(s),[l,c]=g.useState(!1),h=g.useRef(!1);let p;e[0]!==n||e[1]!==u?(p=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=p):p=e[2];const f=p,P=d||f;let x;e[3]!==P?(x=r.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:P}),e[3]=P,e[4]=x):x=e[4];let w;e[5]!==f||e[6]!==u?(w=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=w):w=e[7];let b,S;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>o(j.target.value),S=()=>c(!0),e[8]=b,e[9]=S):(b=e[8],S=e[9]);let N;e[10]!==s?(N=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,o(s),j.currentTarget.blur())},e[10]=s,e[11]=N):N=e[11];let y;e[12]!==d||e[13]!==a||e[14]!==s?(y=()=>{if(c(!1),h.current){h.current=!1;return}const j=tr(d);o(j),j!==s&&a(j)},e[12]=d,e[13]=a,e[14]=s,e[15]=y):y=e[15];let k;e[16]!==d||e[17]!==f||e[18]!==w||e[19]!==N||e[20]!==y?(k=r.jsx("input",{type:"text",value:d,placeholder:f,title:w,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:li,onChange:b,onFocus:S,onKeyDown:N,onBlur:y}),e[16]=d,e[17]=f,e[18]=w,e[19]=N,e[20]=y,e[21]=k):k=e[21];let v;e[22]!==x||e[23]!==k?(v=r.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[x,k]}),e[22]=x,e[23]=k,e[24]=v):v=e[24];let E;e[25]!==l||e[26]!==u?(E=l&&r.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[r.jsx(rs,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=l,e[26]=u,e[27]=E):E=e[27];let _;return e[28]!==E||e[29]!==v?(_=r.jsxs(r.Fragment,{children:[v,E]}),e[28]=E,e[29]=v,e[30]=_):_=e[30],_}function li(t){return t.stopPropagation()}function ci(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${s}`}catch{return e}}function di(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function ui(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 s=rr(n);let a;return e[2]!==t||e[3]!==s?(a={mutationFn:async u=>{const{name:d,path:o,template:l}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const c=Os(d),h=l?{...l,name:d,path:o}:_s(d,o);return await s.mutateAsync({blockKey:c,data:h}),{key:c,name:d,path:o}}},e[2]=t,e[3]=s,e[4]=a):a=e[4],Gr(a)}function mi(t){const e=fe.c(89),{open:n,onOpenChange:s,isPending:a,error:u,templates:d,onSubmit:o}=t,l=a===void 0?!1:a,c=Ne();let h;e[0]!==c?(h=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=h):h=e[1];const[p,f]=g.useState(h);let P;e[2]!==c?(P=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=P):P=e[3];const[x,w]=g.useState(P),[b,S]=g.useState(Ht),[N,y]=g.useState(null),[k,v]=g.useState(n);n!==k&&(v(n),n&&(f(c("sectionsEditor.createPageModal.defaultPageName")),w(c("sectionsEditor.createPageModal.defaultPagePath")),S(Ht),y(null)));const E=!!d?.length;let _;e[4]!==l||e[5]!==s?(_=Z=>{!Z&&!l&&(y(null),s(!1))},e[4]=l,e[5]=s,e[6]=_):_=e[6];const j=_;let F;e[7]!==l||e[8]!==p||e[9]!==o||e[10]!==x||e[11]!==E||e[12]!==b?(F=async Z=>{Z.preventDefault();const ue=p.trim(),pe=x.trim();if(!ue||!pe||l)return;const he=nr(pe);if(he){y(he);return}y(null),await o({name:ue,path:pe,templateKey:E&&b!==Ht?b:null})},e[7]=l,e[8]=p,e[9]=o,e[10]=x,e[11]=E,e[12]=b,e[13]=F):F=e[13];const K=F,$=N??u;let T;e[14]!==c?(T=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=T):T=e[15];let D;e[16]!==T?(D=r.jsx(dr,{children:r.jsx(ur,{children:T})}),e[16]=T,e[17]=D):D=e[17];let z;e[18]!==c?(z=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=z):z=e[19];let W;e[20]!==z?(W=r.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:z}),e[20]=z,e[21]=W):W=e[21];let B;e[22]===Symbol.for("react.memo_cache_sentinel")?(B=Z=>f(Z.target.value),e[22]=B):B=e[22];let Y;e[23]!==c?(Y=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=Y):Y=e[24];let M;e[25]!==l||e[26]!==p||e[27]!==Y?(M=r.jsx(On,{id:"new-page-name",value:p,onChange:B,placeholder:Y,autoFocus:!0,disabled:l}),e[25]=l,e[26]=p,e[27]=Y,e[28]=M):M=e[28];let U;e[29]!==M||e[30]!==W?(U=r.jsxs("div",{className:"space-y-1.5",children:[W,M]}),e[29]=M,e[30]=W,e[31]=U):U=e[31];let ee;e[32]!==c?(ee=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=ee):ee=e[33];let O;e[34]!==ee?(O=r.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=>w(Z.target.value),e[36]=ne):ne=e[36];let V;e[37]!==c?(V=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=V):V=e[38];let q;e[39]!==l||e[40]!==x||e[41]!==V?(q=r.jsx(On,{id:"new-page-path",value:x,onChange:ne,placeholder:V,disabled:l}),e[39]=l,e[40]=x,e[41]=V,e[42]=q):q=e[42];let Q;e[43]!==O||e[44]!==q?(Q=r.jsxs("div",{className:"space-y-1.5",children:[O,q]}),e[43]=O,e[44]=q,e[45]=Q):Q=e[45];let J;e[46]!==l||e[47]!==E||e[48]!==c||e[49]!==b||e[50]!==d?(J=E&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),r.jsx(As,{id:"new-page-template",value:b,onChange:S,templates:d??[],disabled:l})]}),e[46]=l,e[47]=E,e[48]=c,e[49]=b,e[50]=d,e[51]=J):J=e[51];let te;e[52]!==$?(te=$&&r.jsx("p",{className:"text-xs text-destructive",children:$}),e[52]=$,e[53]=te):te=e[53];let se;e[54]!==U||e[55]!==Q||e[56]!==J||e[57]!==te?(se=r.jsxs("div",{className:"space-y-4 py-4",children:[U,Q,J,te]}),e[54]=U,e[55]=Q,e[56]=J,e[57]=te,e[58]=se):se=e[58];let X;e[59]!==s?(X=()=>s(!1),e[59]=s,e[60]=X):X=e[60];let G;e[61]!==c?(G=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=G):G=e[62];let ae;e[63]!==l||e[64]!==X||e[65]!==G?(ae=r.jsx(He,{type:"button",variant:"outline",onClick:X,disabled:l,children:G}),e[63]=l,e[64]=X,e[65]=G,e[66]=ae):ae=e[66];let ge;e[67]!==l||e[68]!==p||e[69]!==x?(ge=!p.trim()||!x.trim()||l,e[67]=l,e[68]=p,e[69]=x,e[70]=ge):ge=e[70];let ve;e[71]!==l||e[72]!==c?(ve=l?r.jsxs(r.Fragment,{children:[r.jsx(Pt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=l,e[72]=c,e[73]=ve):ve=e[73];let ce;e[74]!==ge||e[75]!==ve?(ce=r.jsx(He,{type:"submit",disabled:ge,children:ve}),e[74]=ge,e[75]=ve,e[76]=ce):ce=e[76];let ie;e[77]!==ae||e[78]!==ce?(ie=r.jsxs(na,{children:[ae,ce]}),e[77]=ae,e[78]=ce,e[79]=ie):ie=e[79];let de;e[80]!==K||e[81]!==se||e[82]!==ie||e[83]!==D?(de=r.jsx(lr,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:K,children:[D,se,ie]})}),e[80]=K,e[81]=se,e[82]=ie,e[83]=D,e[84]=de):de=e[84];let be;return e[85]!==j||e[86]!==n||e[87]!==de?(be=r.jsx(cr,{open:n,onOpenChange:j,children:de}),e[85]=j,e[86]=n,e[87]=de,e[88]=be):be=e[88],be}function fi(t){const e=fe.c(29),{orgSlug:n,virtualMcpId:s,branch:a,previewUrl:u,meta:d,decofile:o,blockKey:l}=t,c=Ne();let h;e[0]!==a||e[1]!==n||e[2]!==s?(h={orgSlug:n,virtualMcpId:s,branch:a},e[0]=a,e[1]=n,e[2]=s,e[3]=h):h=e[3];const p=rr(h);let f;e[4]!==p?(f=Fs((v,E)=>p.mutate({blockKey:v,data:E})),e[4]=p,e[5]=f):f=e[5];const P=f;let x;e[6]!==l||e[7]!==o?(x=Ds(o,l),e[6]=l,e[7]=o,e[8]=x):x=e[8];const{resolveType:w,props:b,title:S}=x;if(!w){let v;e[9]!==c?(v=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=v):v=e[10];let E;return e[11]!==v?(E=r.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:v}),e[11]=v,e[12]=E):E=e[12],E}const N=`loader:${l}`;let y;e[13]!==l||e[14]!==w||e[15]!==S?(y={mode:"saved",blockKey:l,resolveType:w,title:S},e[13]=l,e[14]=w,e[15]=S,e[16]=y):y=e[16];let k;return e[17]!==a||e[18]!==o||e[19]!==d||e[20]!==n||e[21]!==u||e[22]!==b||e[23]!==p.isPending||e[24]!==P||e[25]!==N||e[26]!==y||e[27]!==s?(k=r.jsx(Bs,{orgSlug:n,virtualMcpId:s,branch:a,previewUrl:u,meta:d,decofile:o,kind:"loaders",target:y,initialValue:b,isCreating:p.isPending,onCreate:pi,onSaveReferencedBlock:P,showRun:!1},N),e[17]=a,e[18]=o,e[19]=d,e[20]=n,e[21]=u,e[22]=b,e[23]=p.isPending,e[24]=P,e[25]=N,e[26]=y,e[27]=s,e[28]=k):k=e[28],k}async function pi(){}function hi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Kn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:hi(t.error)}}function gi(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 vi(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=gi(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(a=>a.status==="error"&&!a.hasData&&a.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 bi="https://github.com/decocms/blocks";function xi(){const t=fe.c(14),e=Ne();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx(ss,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e?(a=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=a):a=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Gn,{size:14}),t[7]=d):d=t[7];let o;t[8]!==u?(o=r.jsx(He,{size:"sm",asChild:!0,children:r.jsxs("a",{href:bi,target:"_blank",rel:"noreferrer",children:[u,d]})}),t[8]=u,t[9]=o):o=t[9];let l;return t[10]!==s||t[11]!==a||t[12]!==o?(l=r.jsx(nn,{className:"h-full w-full",image:n,title:s,description:a,actions:o}),t[10]=s,t[11]=a,t[12]=o,t[13]=l):l=t[13],l}function yi(t){const e=fe.c(15),{source:n,onRetry:s}=t,a=Ne();let u;e[0]!==n||e[1]!==a?(u=a(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=a,e[2]=u):u=e[2];const d=u;let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ra,{size:48,className:"text-muted-foreground"}),e[3]=o):o=e[3];let l;e[4]!==a?(l=a("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=a,e[5]=l):l=e[5];let c;e[6]!==a?(c=a("mainPanelTabs.blocksTabStates.retry"),e[6]=a,e[7]=c):c=e[7];let h;e[8]!==s||e[9]!==c?(h=r.jsx(He,{variant:"outline",size:"sm",onClick:s,children:c}),e[8]=s,e[9]=c,e[10]=h):h=e[10];let p;return e[11]!==d||e[12]!==l||e[13]!==h?(p=r.jsx(nn,{image:o,title:l,description:d,actions:h}),e[11]=d,e[12]=l,e[13]=h,e[14]=p):p=e[14],p}const wi=g.lazy(()=>Jr(()=>import("./sections-editor-DbtrkTJp.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])).then(t=>({default:t.SectionsEditor})));function zn(t){const e=fe.c(50),{virtualMcpId:n,externalSelection:s,onViewJsonFile:a}=t,u=s===void 0?null:s,{org:d}=Xt(),{currentBranch:o,taskId:l}=St(),c=Zn(),h=Zt(),p=mr(),f=c.lifecycle.phase==="running",P=h.previewUrl;let x;e[0]!==o||e[1]!==d||e[2]!==P||e[3]!==l||e[4]!==n?(x=o?{orgSlug:d.slug,virtualMcpId:n,branch:o,threadId:l??null,previewUrl:P}:null,e[0]=o,e[1]=d,e[2]=P,e[3]=l,e[4]=n,e[5]=x):x=e[5];const w=x;let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const S=tn(w,b);let N;e[8]!==f?(N={fetchEnabled:f},e[8]=f,e[9]=N):N=e[9];const y=sr(w,N),k=vi({lifecyclePhase:c.lifecycle.phase,decofile:Kn(S),meta:Kn(y),hasEditableContent:Ss(S.data,y.data),fastPreviewActive:er(n).runtime==="cms"}),v=ki;if(k.kind==="loading"){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=v(r.jsx(Yr,{})),e[10]=O):O=e[10],O}if(k.kind==="empty"){let O;return e[11]===Symbol.for("react.memo_cache_sentinel")?(O=v(r.jsx(xi,{})),e[11]=O):O=e[11],O}if(k.kind==="error"){let O;e[12]!==S||e[13]!==h||e[14]!==y||e[15]!==k.source?(O=()=>{if(k.source==="sandbox"){h.retry();return}Promise.all([S.refetch(),y.refetch()])},e[12]=S,e[13]=h,e[14]=y,e[15]=k.source,e[16]=O):O=e[16];const ne=O;let V;return e[17]!==ne||e[18]!==k.source?(V=v(r.jsx(yi,{source:k.source,onRetry:ne})),e[17]=ne,e[18]=k.source,e[19]=V):V=e[19],V}let E;e[20]===Symbol.for("react.memo_cache_sentinel")?(E=O=>v(r.jsx("div",{className:"h-full min-h-0",children:O})),e[20]=E):E=e[20];const _=E,j=p.state.target;if(j?.kind==="loader"&&S.data&&y.data){const O=o??"",ne=P??null;let V;return e[21]!==S.data||e[22]!==y.data||e[23]!==d.slug||e[24]!==O||e[25]!==ne||e[26]!==j.key||e[27]!==n?(V=_(r.jsx(fi,{orgSlug:d.slug,virtualMcpId:n,branch:O,previewUrl:ne,meta:y.data,decofile:S.data,blockKey:j.key})),e[21]=S.data,e[22]=y.data,e[23]=d.slug,e[24]=O,e[25]=ne,e[26]=j.key,e[27]=n,e[28]=V):V=e[28],V}let F;e[29]!==o||e[30]!==d.slug||e[31]!==j||e[32]!==n?(F=j||!o?null:ar(ir(d.slug,n,o)),e[29]=o,e[30]=d.slug,e[31]=j,e[32]=n,e[33]=F):F=e[33];const K=F;let $="/",T=null,D=null;j?.kind==="page"?($=j.path,T=j.key):j?.kind==="section"?D=j.key:K&&($=K.path,T=K.pageKey);const z=T?`page:${T}`:D?`section:${D}`:`path:${$}`;let W;e[34]===Symbol.for("react.memo_cache_sentinel")?(W=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(Pt,{className:"size-5 text-muted-foreground"})}),e[34]=W):W=e[34];const B=o??"",Y=P??void 0,M=D?null:u,U=!!T&&p.state.editSeoPageKey===T;let ee;return e[35]!==D||e[36]!==T||e[37]!==$||e[38]!==z||e[39]!==a||e[40]!==d.slug||e[41]!==M||e[42]!==U||e[43]!==B||e[44]!==Y||e[45]!==n||e[46]!==p.consumeEditSeo||e[47]!==p.setFocusedBlock||e[48]!==p.setVariantOverride?(ee=_(r.jsx(g.Suspense,{fallback:W,children:r.jsx(wi,{orgSlug:d.slug,virtualMcpId:n,branch:B,previewReady:!0,previewUrl:Y,currentPath:$,activePageBlockKey:T,activeGlobalBlockKey:D,externalSelection:M,initialEditSeo:U,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onFocusedBlockChange:p.setFocusedBlock,onViewJsonFile:a},z)})),e[35]=D,e[36]=T,e[37]=$,e[38]=z,e[39]=a,e[40]=d.slug,e[41]=M,e[42]=U,e[43]=B,e[44]=Y,e[45]=n,e[46]=p.consumeEditSeo,e[47]=p.setFocusedBlock,e[48]=p.setVariantOverride,e[49]=ee):ee=e[49],ee}function ki(t){return r.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:s,onClose:a,ref:u}=t,d=Ne(),o=Qr(),l=$s(n);let c;e[0]!==l||e[1]!==s?(c=Ms(l,ia(s)),e[0]=l,e[1]=s,e[2]=c):c=e[2];const h=c,{org:p}=Xt(),{currentBranch:f,taskId:P}=St(),w=Zt().previewUrl;let b;e[3]!==f||e[4]!==p.slug||e[5]!==w||e[6]!==P||e[7]!==n?(b=f?{orgSlug:p.slug,virtualMcpId:n,branch:f,threadId:P??null,previewUrl:w}:null,e[3]=f,e[4]=p.slug,e[5]=w,e[6]=P,e[7]=n,e[8]=b):b=e[8];const N=tn(b),y=f??"";let k;e[9]!==p.slug||e[10]!==y||e[11]!==n?(k={orgSlug:p.slug,virtualMcpId:n,branch:y},e[9]=p.slug,e[10]=y,e[11]=n,e[12]=k):k=e[12];const{save:v,flush:E}=Is(k),_=N.data?.[s],j=N.data===void 0&&N.isLoading,F=N.data!==void 0&&_===void 0,K=!f||F||j;let $;e[13]!==_?($=_===void 0?"":JSON.stringify(_,null,2),e[13]=_,e[14]=$):$=e[14];const T=$;let D;e[15]!==s||e[16]!==K||e[17]!==v?(D=U=>{if(K)return;let ee;try{ee=JSON.parse(U)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||v(s,ee)},e[15]=s,e[16]=K,e[17]=v,e[18]=D):D=e[18];const z=D;let W;e[19]!==E?(W=()=>({flush:E}),e[19]=E,e[20]=W):W=e[20],g.useImperativeHandle(u,W);let B;e[21]!==h||e[22]!==o||e[23]!==a||e[24]!==d?(B=o?r.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:r.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):r.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:d("sectionsEditor.pageJsonDialog.titleShort")}),r.jsx(He,{variant:"ghost",size:"icon",onClick:a,"aria-label":d("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:r.jsx(sa,{size:14})})]}),e[21]=h,e[22]=o,e[23]=a,e[24]=d,e[25]=B):B=e[25];let Y;e[26]!==N.data||e[27]!==E||e[28]!==T||e[29]!==j||e[30]!==F||e[31]!==s||e[32]!==K||e[33]!==z||e[34]!==d?(Y=j?r.jsx("div",{className:"flex flex-1 items-center justify-center",children:r.jsx(Pt,{className:"size-5 text-muted-foreground"})}):F?r.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):r.jsx("div",{className:"min-h-0 flex-1",children:r.jsx(aa,{code:T,language:"json",readOnly:K,height:"100%",onChange:U=>z(U??""),onSave:U=>{z(U),E()}},`${s}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=E,e[28]=T,e[29]=j,e[30]=F,e[31]=s,e[32]=K,e[33]=z,e[34]=d,e[35]=Y):Y=e[35];let M;return e[36]!==B||e[37]!==Y?(M=r.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[B,Y]}),e[36]=B,e[37]=Y,e[38]=M):M=e[38],M}function br(t){return t.contentEditingEnabled&&!t.isMobile}function Pi(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Si(t,e){return t==="blocks"?"preview":e?"blocks":t}function Ei(t){return br({contentEditingEnabled:or(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 Ni=500,Ci={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Hn=1,qt=["desktop","mobile","tablet"],Wn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Vn(t,e){try{const n=new URL(t,window.location.href);return n.searchParams.set("deviceHint",e),n.href}catch{return t}}function Ri(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 Ye(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 Ti(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 s=t.toLowerCase(),a=e.toLowerCase(),u=a.split("/").filter(Boolean),d=l=>{if(l===n)return 100;const c=l.indexOf(n);if(c===-1)return 0;let h=40;return c===0?h+=30:/[\s/-]/.test(l[c-1]??"")&&(h+=20),h+=Math.round(n.length/l.length*20),h};let o=Math.max(d(s),d(a));return u.at(-1)===n?o=Math.max(o,95):u.includes(n)&&(o=Math.max(o,90)),o}function _i(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ai({virtualMcpId:t}){const e=Ne(),n=Zs(),s=Rs(),{currentBranch:a,taskId:u,virtualMcpId:d}=St(),o=mr(),l=gs(d===t?t:null),c=er(t),h=oa(l?.metadata?.ui?.layout??null),p=or(h),f=br({contentEditingEnabled:p,isMobile:s}),[P,x]=g.useState(()=>Ei({cmsMode:h,isMobile:s})),[w,b]=g.useState("desktop"),[S,N]=g.useState(null),[y,k]=g.useState(null),v=g.useRef(null),E=g.useRef(null),[_,j]=g.useState(!1),F=g.useRef(null),K=()=>{F.current?.flush(),j(!1)},$=()=>j(i=>(i&&F.current?.flush(),!i)),[T,D]=g.useState({width:0,height:0}),[z,W]=g.useState(null),[B,Y]=g.useState(!1),[M,U]=g.useState(""),[ee,O]=g.useState(!1),[ne,V]=g.useState(),[q,Q]=g.useState(null),[J,te]=g.useState(null),[se,X]=g.useState(null),[G,ae]=g.useState(()=>o.state.target?.kind==="page"?o.state.target.path:"/"),[ge,ve]=g.useState(()=>o.state.target?.kind==="page"?o.state.target.key:null),[ce,ie]=g.useState({}),[de,be]=g.useState(!1),Z=g.useRef(null),ue=()=>{be(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>be(!1),15e3)},pe=()=>{Z.current&&(clearTimeout(Z.current),Z.current=null),be(!1)},{org:he}=Xt(),$e=Zn(),Le=Zt(),Oe=Le.vmEntry,We=$e.lifecycle.phase,{url:xe}=Es(t),ye=xe??Le.previewUrl,Ee=!!xe||We==="running",Me=l?.id===t?ws(l.metadata):null,_e=!xe&&l?.id===t&&c.runtime==="cms",Ae=c.projectDefault==="cms",we=Vs({sandboxUrl:ye,previewServerUrl:Me,fastPreviewActive:_e}),Ce=t&&a?{orgSlug:he.slug,virtualMcpId:t,branch:a,threadId:u??null,previewUrl:ye}:null,Ie=tn(Ce,{fetchEnabled:Ee}),I=sr(Ce,{fetchEnabled:Ee}),C=Ie.data,me=I.data,De=C?js(C).sort((i,m)=>i.name.localeCompare(m.name)):[],Et=t&&a?{orgSlug:he.slug,virtualMcpId:t,branch:a}:null,Xe=ui(Et),jt=C&&me?Ns(C,me):[],sn=C&&me?Ks(me,C,"loaders"):[],an=M?(()=>{const i=M.toLowerCase();return De.map(m=>({page:m,score:Oi(m.name,m.path,i)})).filter(({score:m})=>m>0).sort((m,R)=>R.score-m.score||m.page.path.length-R.page.path.length).map(({page:m})=>m)})():De,on=jt.filter(i=>{if(!M)return!0;const m=M.toLowerCase();return i.name.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),ln=f?sn:[],cn=ln.filter(i=>{if(!M)return!0;const m=M.toLowerCase();return i.title.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),it=J?sn.find(i=>i.key===J)??null:null,Be=en,Nt=q||J?null:Cs(De,G,ge),H=Nt?.key??null,Ve=o.state.target?.kind==="section"?o.state.target.key:o.state.focusedBlockKey??H,ot=Nt?.path??null,qe=(H?ce[H]:void 0)??{},ke=Fe(G,qe),Ct={};if(Ee&&ye&&me&&C){const i=zs(me,"loaders"),m=H?C[H]:void 0,R=Da(m,C,re=>i.has(re)),A=Ta(R);for(const re of at(G)){if(re.type!=="param")continue;const Te=Na(G,re.name,R),Pe=_a(Te,i,A);Pe.length>0&&(Ct[re.name]=Pe)}}const lt=t&&a?{orgSlug:he.slug,virtualMcpId:t,branch:a,threadId:u??null}:null,dn=C&&H?Us(C,H,0):[],un=C?Hs(dn,C):[],Rt=un.map(i=>i.isSavedBlock?i.label:""),Tt=un.map(i=>i.isSavedBlock?"global":i.isMultivariate?"variant":"normal"),Lt=dn.map(i=>Yt(i,C??{})),mn=g.useRef(null),je=g.useRef(null),xr=$e.status.state==="paused",Ot=$e.phase,fn=Ws({claimPhase:Ot,lifecycle:$e.lifecycle}),Ke=Le.previewState,yr=Le.userStopped,wr=Qs(he.slug,t??"",a??""),{url:ze}=Ys(_e&&t&&a?{orgSlug:he.slug,virtualMcpId:t,branch:a,previewServerUrl:Me??null,path:ke}:null),kr=Ae&&c.runtime==="sandbox",L=fa({previewState:Ke,progressStatus:fn.status,previewServerUrl:Me,fastPreviewActive:_e,fastPreviewReady:!!ze,codingSession:kr,localPreviewUrl:xe}),ct=L.mode!=="none",pn=L.mode==="production"&&L.iframeBase?Ye(L.iframeBase):null,Pr=pn??(xe&&L.mode==="sandbox"&&L.iframeBase?Ye(L.iframeBase):null),hn=!n,Ge=L.mode==="production"?pn:Ye(ye),Sr=l?.id===t&&l.metadata?.fastPreviewInPlace===!0,Ze=xe?L.mode==="sandbox"&&f&&P==="blocks":L.mode==="production"&&_e&&Sr&&f&&P==="blocks",gn=g.useRef(null),{pin:Er,effective:jr}=Ti(gn.current,{inPlaceRenderActive:Ze,draftPreviewUrl:ze,resolvedPath:ke});gn.current=Er;const Re=Ri(L.mode==="sandbox"&&hn?bt(Vn(se??Gt(ke,L.iframeBase)??L.iframeBase,w),o.state.variantOverride??[]):L.mode==="production"&&hn?bt(Vn(qs(se??jr??Gt(ke,L.iframeBase)??L.iframeBase,L.showWakingPill?Gs:null),w),o.state.variantOverride??[]):null);g.useEffect(()=>{},[n,Pr,z]);const Nr="sandbox.preview.openInNewTab",vn=ze??(L.iframeBase?Gt(ke,L.iframeBase):null),Cr=L.mode==="production"?vn?bt(vn,o.state.variantOverride??[]):null:Re??L.iframeBase,Rr=async()=>{const i=Cr;if(i){window.open(i,"_blank","noopener");return}},dt=t&&a?ir(he.slug,t,a):null,ut=i=>{dt&&Xs(dt,i)},oe=o.state.target;g.useEffect(()=>{if(!(!oe||!we||!me))if(oe.kind==="page"){const i=ce[oe.key]??{};je.current=Fe(oe.path,i),Q(null),te(null),X(null),ve(oe.key),ae(oe.path),ut({path:oe.path,pageKey:oe.key,params:i})}else if(oe.kind==="loader")je.current=null,Q(null),te(oe.key),X(null);else{const i=jt.find(m=>m.key===oe.key);if(i){je.current=null;const m=Tn(me);te(null),Q(i),X(Ln(we,m,i.key))}}},[oe,we,me,ce]),g.useEffect(()=>{!H||ot===null||oe?.kind==="page"&&oe.key===H&&oe.path===ot||o.selectTarget({kind:"page",key:H,path:ot})},[H,ot,oe]);const[bn,Tr]=g.useState(null);if(Ke.kind==="iframe"&&bn!==Ke.previewUrl){const i=bn!==null;Tr(Ke.previewUrl);const m=dt?ar(dt):null;if(m){if(je.current=Fe(m.path,m.params),ae(m.path),ve(m.pageKey),X(null),Q(null),te(null),m.pageKey&&Object.keys(m.params).length>0){const R=m.pageKey;ie(A=>({...A,[R]:m.params}))}}else i&&(je.current=null,ae("/"),X(null),ve(null),Q(null),te(null))}mn.current=Re;const xn=va({iframeRef:v,src:L.mode==="sandbox"?Re:null,active:L.mode==="sandbox"}),yn=g.useRef(null);g.useEffect(()=>{if(!ze||!Re||yn.current===ze)return;yn.current=ze;const i=v.current;i&&i.getAttribute("src")!==Re&&(ue(),i.src=Re)},[ze,Re]);const wn=()=>{const i=v.current?.contentWindow,m=Ge;if(!i||!m||!C||!H)return;const R=C[H];if(!R||typeof R!="object")return;const A=Js({previewBaseUrl:m,pageBlock:R,decofile:C,path:ke,pathTemplate:G});if(!A)return;const re=bt(A.src,o.state.variantOverride??[]);i.postMessage({type:"cms-editor::render",src:re,body:A.body},m)},_t=g.useRef(null);g.useEffect(()=>{if(!Ze||q||J||!H||!C){_t.current=null;return}const i={nav:JSON.stringify({page:H,path:ke,pathTemplate:G}),content:JSON.stringify(C)},m=Li(_t.current,i);_t.current=i,m&&wn()},[C,Ze,q,J,H,ke,G]);const At=g.useRef(null);g.useEffect(()=>{if(!Ze||q||J||!H||!C){At.current=null;return}const i=JSON.stringify(o.state.variantOverride??null),m=At.current;At.current={page:H,sig:i},!(!m||m.page!==H||m.sig===i)&&wn()},[o.state.variantOverride,Ze,q,J,H]);const Lr=!!t&&!!a&&!$e.notFound&&!yr&&!xr&&(Ot?.kind==="ready"||We!=="idle"),le=ji({editingMode:P,sandboxDisplay:L.mode==="sandbox",blocksEditingEnabled:f});g.useEffect(()=>{const i=Ge;if(!i)return;const m=R=>{if(R.origin===i)if(R.data?.type==="visual-editor::element-clicked"){const A=ba.safeParse(R.data.payload);A.success&&N(A.data)}else if(R.data?.type==="cms-editor::section-clicked"){const A=wa.safeParse(R.data.payload);A.success&&k({index:A.data.sectionIndex,seq:A.data.clickSeq})}else R.data?.type==="cms-editor::render-start"?ue():R.data?.type==="cms-editor::render-end"?(pe(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Rt,kinds:Tt,keys:Lt},i)):R.data?.type==="cms-editor::render-error"&&pe()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[Ge,Rt,Tt,Lt]);const kn=()=>{const i=v.current?.contentWindow,m=Ye(ye);!i||!m||i.postMessage({type:"visual-editor::activate",script:xa},m)},Or=()=>{const i=v.current?.contentWindow,m=Ye(ye);!i||!m||i.postMessage({type:"visual-editor::deactivate"},m)},Dt=()=>{const i=v.current?.contentWindow,m=Ge;!i||!m||(i.postMessage(L.mode==="production"||xe?{type:"editor::inject",args:{script:Fn}}:{type:"visual-editor::activate",script:Fn},m),i.postMessage({type:"cms-editor::set-labels",labels:Rt,kinds:Tt,keys:Lt},m))},_r=()=>{const i=v.current?.contentWindow,m=Ge;!i||!m||i.postMessage({type:"cms-editor::deactivate"},m)},Ar=()=>{const i=v.current?.contentWindow,m=Ge;!i||!m||(i.postMessage({type:"cms-editor::clear-hover"},m),i.postMessage({type:"visual-editor::clear-hover"},m))},mt=i=>{if(i==="blocks"&&!f)return;const m=P;!s&&i!==m&&(i==="blocks"?E.current?.resize("30%"):E.current?.collapse()),x(i),N(null),k(null),i!=="blocks"&&te(null),m==="visual"&&Or(),i==="visual"&&kn(),m==="blocks"&&i!=="blocks"&&_r(),i==="blocks"&&Dt()},Dr=()=>{mt(Pi(P,f))},Br=()=>{mt(Si(P,f))};bs(()=>{const i=v.current;if(!i)return;ue();const m=document.activeElement,R=i.tabIndex;i.tabIndex=-1,i.style.pointerEvents="none",i.blur(),_i(i,mn.current);let A;const re=()=>{clearTimeout(A),i.tabIndex=R,i.style.pointerEvents="";const Te=document.activeElement;(!Te||Te===document.body||Te===i)&&m?.focus(),i.removeEventListener("load",re)};i.addEventListener("load",re),A=setTimeout(re,3e3)});const Fr=()=>{const i=qt.indexOf(w);b(qt[(i+1)%qt.length])},Bt=(i,m)=>{if(!H)return;const R=H,A={...qe,[i]:m};je.current=Fe(G,A),ie(re=>({...re,[R]:A})),ut({path:G,pageKey:R,params:A})},$r=ci({iframeBase:L.iframeBase,resolvedPath:ke,activeGlobalSectionName:q?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Pn=i=>{const m=ce[i.key]??{},R=Fe(i.path,m);(q||Be(R)!==Be(ke))&&ue(),je.current=R,Q(null),te(null),X(null),k(null),ve(i.key),ae(i.path),ut({path:i.path,pageKey:i.key,params:m}),o.selectTarget({kind:"page",key:i.key,path:i.path})},Mr=i=>{if(!we||!me){Cn.error(e("sandbox.preview.previewMetadataNotReady"));return}ue(),je.current=null;const m=Tn(me),R=Ln(we,m,i.key);Q(i),te(null),X(R),k(null),o.selectTarget({kind:"section",key:i.key})},Ir=i=>{f&&(Q(null),te(i.key),X(null),mt("blocks"),o.selectTarget({kind:"loader",key:i.key}))},Kr=async({name:i,path:m,templateKey:R})=>{if(!t||!a)return;const A=nr(m);if(A){V(A);return}const re=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(De.some(Pe=>Be(Pe.path)===Be(re))){V(e("sandbox.preview.pageAlreadyExists",{path:re}));return}let Te;if(R&&(Te=C?.[R],!Te)){V(e("sandbox.preview.templateNoLongerExists"));return}V(void 0);try{const Pe=await Xe.mutateAsync({name:i,path:re,template:Te});O(!1),Cn.success(e("sandbox.preview.pageCreated",{name:i})),await ys(Ni),Pn({key:Pe.key,name:Pe.name,path:Pe.path}),mt("blocks")}catch(Pe){V(Pe instanceof Error?Pe.message:e("sandbox.preview.failedToCreatePage"))}},ft=ct&&(Lr||L.mode==="production"),zr=di({showPreviewToolbar:ft,contentEditingEnabled:p}),pt=()=>{Y(!1),U("")},Ft=q?.name??it?.title??Nt?.name,$t=Ie.isPending||I.isPending,Mt=$t?Ye(L.iframeBase):Ft,ht=q?`section:${q.key}`:J?`loader:${J}`:H?`page:${H}`:void 0,Ur=ft?zr?r.jsxs(fs,{open:B,onOpenChange:i=>{Y(i),i||U("")},children:[r.jsx(ps,{asChild:!0,children:r.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:$t?Mt??void 0:q||it?Ft:[Ft,G].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:r.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[q&&r.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:[r.jsx(us,{size:11}),e("sandbox.preview.globalBadge")]}),it&&r.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:[r.jsx(as,{size:11}),e("sandbox.preview.loaderBadge")]}),Mt&&r.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Mt}),!$t&&!q&&!it&&r.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:G}),r.jsx(ns,{size:12,className:It("shrink-0 transition-transform",B&&"rotate-180")})]})})}),r.jsxs(hs,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[r.jsxs(Yn,{shouldFilter:!1,defaultValue:ht,children:[r.jsx(Qn,{value:M,onValueChange:U,placeholder:e("sandbox.preview.searchPagesAndComponents")}),r.jsxs(Jn,{className:"max-h-80",children:[r.jsx(Xn,{children:De.length===0&&jt.length===0&&ln.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),an.length>0&&r.jsx(rt,{children:an.map(i=>r.jsxs(st,{value:`page:${i.key}`,"aria-current":ht===`page:${i.key}`||void 0,title:`${i.name} · ${i.path}`,onSelect:()=>{pt(),Pn(i)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:i.name}),r.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:i.path})]},i.key))}),on.length>0&&r.jsx(rt,{heading:e("sandbox.preview.globalComponents"),children:on.map(i=>r.jsx(st,{value:`section:${i.key}`,"aria-current":ht===`section:${i.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),Mr(i)},children:r.jsx("span",{className:"truncate",children:i.name})},i.key))}),cn.length>0&&r.jsx(rt,{heading:e("sandbox.preview.globalLoaders"),children:cn.map(i=>r.jsx(st,{value:`loader:${i.key}`,"aria-current":ht===`loader:${i.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),Ir(i)},children:r.jsx("span",{className:"truncate",children:i.title})},i.key))})]})]}),!q&&!J&&at(G).some(i=>i.type!=="text")&&r.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:at(G).map((i,m)=>{if(i.type==="text")return r.jsx("span",{children:i.text},`text-${m}`);const R=Ct[i.name];return R&<?r.jsx(Ya,{sources:R,template:G,paramName:i.name,value:qe[i.name]??"",sandboxRef:lt,onCommit:A=>Bt(i.name,A)},`${H}:${i.name}`):r.jsx(oi,{name:i.name,value:qe[i.name]??"",onCommit:A=>Bt(i.name,A)},`${H}:${i.name}`)})}),r.jsx("div",{className:"border-t p-1.5",children:r.jsxs(He,{variant:"ghost",className:"w-full justify-start",onClick:()=>{pt(),V(void 0),O(!0)},children:[r.jsx(ms,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):r.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:$r}):null,Sn=ft||p?r.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[r.jsxs(Kt,{children:[r.jsx(zt,{asChild:!0,children:r.jsx(et,{onClick:Fr,"aria-label":e(Wn[w]),children:w==="mobile"?r.jsx(is,{size:16}):w==="tablet"?r.jsx(os,{size:16}):r.jsx(ls,{size:16})})}),r.jsx(Ut,{children:e(Wn[w])})]}),Ur,r.jsx("div",{className:"flex shrink-0 items-center gap-1",children:r.jsx(et,{onClick:()=>{Rr()},"aria-label":e(Nr),children:r.jsx(Gn,{size:16})})})]}):null,Hr=L.mode==="sandbox",gt=Ci[w],vt=w==="desktop"&&(T.width===0||T.width>=gt.width+2*Hn),En=vt?1:Math.min(T.width>0?T.width/(gt.width+2*Hn):1,1),Wr=vt?{width:"100%",height:"100%"}:{width:`${gt.width}px`,height:T.height>0?`${T.height/En}px`:`${gt.height}px`,transform:`scale(${En})`,transformOrigin:"top center"},jn=r.jsxs(r.Fragment,{children:[Hr&&(ft||p)&&r.jsx(et,{onClick:Dr,"aria-pressed":le==="visual","aria-label":e("sandbox.preview.visualEditor"),active:le==="visual",children:r.jsx(Rn,{size:16})}),f&&r.jsxs(Kt,{children:[r.jsx(zt,{asChild:!0,children:r.jsx(et,{onClick:Br,"aria-pressed":le==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:le==="blocks",children:r.jsx(cs,{size:16})})}),r.jsx(Ut,{children:e("sandbox.preview.blocksEditor")})]}),Ve&&r.jsxs(Kt,{children:[r.jsx(zt,{asChild:!0,children:r.jsx(et,{onClick:$,"aria-pressed":_,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:_,children:r.jsx(ds,{size:16})})}),r.jsx(Ut,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Vr=!!J&&le==="blocks";return r.jsxs("div",{className:"flex flex-col w-full h-full",children:[lt&&Object.entries(Ct).map(([i,m])=>(qe[i]??"")===""?r.jsx(ai,{sources:m,template:G,paramName:i,sandboxRef:lt,onFill:R=>Bt(i,R)},`${H}:${i}`):null),r.jsxs(r.Fragment,{children:[r.jsx(Nn.Toolbar.Center.Portal,{fallback:r.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Sn}),children:Sn}),r.jsx(Nn.Toolbar.Right.Portal,{fallback:jn,children:jn})]}),r.jsx("div",{className:"flex-1 overflow-hidden relative",children:Vr?r.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[r.jsx(zn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:$}),_&&Ve&&r.jsx("div",{className:"absolute inset-0 z-10",children:r.jsx(Un,{ref:F,virtualMcpId:t,pageKey:Ve,onClose:K})})]}):r.jsxs(_n,{orientation:"horizontal",disabled:le!=="blocks",className:"relative isolate",children:[r.jsx(xt,{ref:E,id:"preview-blocks-editor",defaultSize:le==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:le==="blocks"&&r.jsx(zn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:$})}),le==="blocks"&&r.jsx(An,{withHandle:!0}),r.jsx(xt,{id:"preview-canvas",defaultSize:le==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:r.jsxs(_n,{orientation:"horizontal",disabled:!(_&&Ve),children:[r.jsx(xt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:r.jsxs("div",{ref:i=>{if(!i)return;const m=()=>D(A=>A.width===i.clientWidth&&A.height===i.clientHeight?A:{width:i.clientWidth,height:i.clientHeight});m();const R=new ResizeObserver(m);return R.observe(i),()=>R.disconnect()},className:It("h-full relative overflow-clip flex justify-center",ct&&!vt&&"bg-muted/30"),children:[(de||wr)&&ct&&r.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:r.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),L.showBlockingOverlay&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Wt,{kind:"starting",progress:fn,claimPhase:Ot})}),!xe&&Ke.kind==="suspended"&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Wt,{kind:"suspended",onResume:Le.resume})}),!xe&&Ke.kind==="errored"&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Wt,{kind:"errored",error:Ke.error,onRetry:Le.retry,connectionsHref:`/${he.slug}/settings/connections`})}),L.showWakingPill&&r.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[r.jsx(Pt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),r.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),le==="visual"&&!S&&r.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-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:[r.jsx(Rn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),le==="visual"&&S&&r.jsx(Sa,{element:S,onDismiss:()=>N(null)}),ct&&Re&&r.jsx("div",{className:It("shrink-0",!vt&&"border-x border-border bg-background shadow-sm"),style:Wr,onMouseLeave:Ar,children:r.jsx("iframe",{ref:v,src:Re,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:xn.handleError,onLoad:()=>{if(xn.handleLoad(),pe(),L.mode!=="sandbox"||xe){(L.mode==="production"&&!L.showWakingPill||xe)&&le==="blocks"&&Dt();return}if(Xr("vm_preview_loaded",{view_mode:le,vm_id:Oe?.sandboxHandle??null}),!q)try{const i=v.current?.contentWindow?.location?.pathname;if(!i)return;const m=je.current;if(m!==null&&(je.current=null,Be(i)!==Be(m))||Be(i)===Be(ke))return;ae(i),ut({path:i,pageKey:ge,params:qe})}catch{}le==="visual"&&kn(),le==="blocks"&&Dt()}},L.iframeBase)})]})}),_&&Ve&&r.jsxs(r.Fragment,{children:[r.jsx(An,{withHandle:!0}),r.jsx(xt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:r.jsx(Un,{ref:F,virtualMcpId:t,pageKey:Ve,onClose:K})})]})]})})]})}),r.jsx(mi,{open:ee,onOpenChange:O,isPending:Xe.isPending,error:ne,templates:De,onSubmit:Kr})]})}function Di(t){const e=fe.c(22),{virtualMcpId:n}=t,s=Ne(),a=vs(n),{activeTask:u,taskId:d,currentBranch:o}=St(),l=da(d),[c,h]=g.useState(!1);if(ca({threadId:d,sandboxBranch:u?.branch??o,agentHasRepo:Vt(a?.metadata),threadHasRepo:Vt(l)||Vt(u?.metadata)})==="none"){let P;e[0]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:r.jsx(Dn,{className:"size-7 text-foreground"})}),e[0]=P):P=e[0];let x;e[1]!==s?(x=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=x):x=e[2];let w;e[3]!==s?(w=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=w):w=e[4];let b,S;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),S=r.jsx(Dn,{className:"size-4"}),e[5]=b,e[6]=S):(b=e[5],S=e[6]);let N;e[7]!==s?(N=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=N):N=e[8];let y;e[9]!==N?(y=r.jsxs(He,{onClick:b,children:[S,N]}),e[9]=N,e[10]=y):y=e[10];let k;e[11]!==x||e[12]!==w||e[13]!==y?(k=r.jsx(nn,{className:"h-full",image:P,title:x,description:w,actions:y}),e[11]=x,e[12]=w,e[13]=y,e[14]=k):k=e[14];let v;e[15]!==c?(v=r.jsx(la,{open:c,onOpenChange:h,mode:"agent"}),e[15]=c,e[16]=v):v=e[16];let E;return e[17]!==k||e[18]!==v?(E=r.jsxs(r.Fragment,{children:[k,v]}),e[17]=k,e[18]=v,e[19]=E):E=e[19],E}let f;return e[20]!==n?(f=r.jsx(Ai,{virtualMcpId:n}),e[20]=n,e[21]=f):f=e[21],f}function Xc(){const t=fe.c(2),e=ua();let n;return t[0]!==e?(n=r.jsx(Zr,{tabId:"site-editor",children:r.jsx(es,{feature:"cms",children:r.jsx(Di,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{Xc as default};
|
|
518
|
+
`)}function Pa(t,e,n=320,s=44,a=12){const{x:u,y:d}=t,{width:o,height:l}=e,c=Math.max(a,Math.min(u-n/2,o-n-a)),p=d/l>.68?Math.max(a,d-s-18):Math.min(d+18,l-s-a);return{leftPct:c/o*100,topPct:p/l*100}}function Sa(t){const e=fe.c(45),{element:n,onDismiss:s}=t,[a,u]=g.useState(""),d=g.useRef(null),{sendMessage:o}=ts(),{openSidePanel:l}=ea(),c=Ne();let h;e[0]!==n||e[1]!==a||e[2]!==s||e[3]!==l||e[4]!==o?(h=()=>{if(!a.trim())return;const B=ka(n,a);l(),o({parts:[{type:"text",text:B}]}),s()},e[0]=n,e[1]=a,e[2]=s,e[3]=l,e[4]=o,e[5]=h):h=e[5];const p=h;let f;e[6]!==n.position||e[7]!==n.viewport?(f=Pa(n.position,n.viewport),e[6]=n.position,e[7]=n.viewport,e[8]=f):f=e[8];const P=f,x=`${P.leftPct}%`,w=`${P.topPct}%`;let b;e[9]!==x||e[10]!==w?(b={left:x,top:w,width:"320px"},e[9]=x,e[10]=w,e[11]=b):b=e[11];let S;e[12]!==p?(S=B=>{B.preventDefault(),p()},e[12]=p,e[13]=S):S=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=B=>u(B.target.value),e[14]=N):N=e[14];let y;e[15]!==s?(y=B=>{B.key==="Escape"&&s()},e[15]=s,e[16]=y):y=e[16];let k;e[17]!==c?(k=c("sandbox.visualEditorPrompt.inputPlaceholder"),e[17]=c,e[18]=k):k=e[18];let v;e[19]!==a||e[20]!==y||e[21]!==k?(v=r.jsx("input",{ref:d,autoFocus:!0,type:"text",value:a,onChange:N,onKeyDown:y,placeholder:k,className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"}),e[19]=a,e[20]=y,e[21]=k,e[22]=v):v=e[22];let E;e[23]!==a?(E=a.trim(),e[23]=a,e[24]=E):E=e[24];const _=!E;let j;e[25]!==c?(j=c("sandbox.visualEditorPrompt.sendButton"),e[25]=c,e[26]=j):j=e[26];let F;e[27]!==c?(F=c("sandbox.visualEditorPrompt.sendButton"),e[27]=c,e[28]=F):F=e[28];let K;e[29]!==F?(K=r.jsx("title",{children:F}),e[29]=F,e[30]=K):K=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e[31]=$):$=e[31];let T;e[32]!==K?(T=r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[K,$]}),e[32]=K,e[33]=T):T=e[33];let D;e[34]!==_||e[35]!==j||e[36]!==T?(D=r.jsx("button",{type:"submit",disabled:_,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-lg bg-foreground text-background transition-opacity disabled:opacity-30",title:j,children:T}),e[34]=_,e[35]=j,e[36]=T,e[37]=D):D=e[37];let z;e[38]!==v||e[39]!==D||e[40]!==S?(z=r.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:S,children:[v,D]}),e[38]=v,e[39]=D,e[40]=S,e[41]=z):z=e[41];let W;return e[42]!==z||e[43]!==b?(W=r.jsx("div",{className:"absolute z-30 pointer-events-none",style:b,children:z}),e[42]=z,e[43]=b,e[44]=W):W=e[44],W}const $n="site-links",Ea=/details?page|\bpdp\b/i,ja=/listingpage|\bplp\b/i;function Na(t,e,n){const s=new Set;for(const o of n)Ea.test(o)&&s.add("product"),ja.test(o)&&s.add("category");const a=at(en(t)),u=a[a.length-1],d=a[a.length-2];return u?.type==="text"&&u.text==="/p"&&d?.type==="param"&&d.name===e&&s.add("product"),e==="*"&&a.some(o=>o.type==="param"&&o.name==="*")&&s.add("category"),s}const Ca=["rosa","preto","pink","black"];function yt(t,e){const n=e.trim();return n?t(n):Ca.flatMap(s=>t(s))}function Ra(t,e){const n=e.trim(),s=[];/^\d+$/.test(n)&&s.push({resolveType:t,props:{ids:[n]}});const u=n.includes("-")&&!/\s/.test(n)?n.replace(/-+/g," "):n;return s.push({resolveType:t,props:{query:u,count:10}}),s}const fr=new Set(["vtex","shopify","shopify-mcp","magento","wake","linx","linx-impulse","nuvemshop","vnda","wap","salesforce"]);function rn(t){return t.split("/")[0]??""}function Ta(t){const e=new Set;for(const n of t){const s=rn(n);fr.has(s)&&e.add(s)}return e}function La(t,e){const n=rn(t);return!fr.has(n)||e.size===0?!0:e.has(n)}const Oa=[{kind:"product",test:t=>t==="vtex/loaders/intelligentSearch/productList.ts",clientFilter:!1,buildRequests:(t,e)=>yt(n=>Ra(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 _a(t,e,n=new Set){const s=[...e],a=o=>{const l=[];for(const c of Oa){if(c.kind!==o)continue;const h=s.find(p=>c.test(p)&&La(p,n));h&&l.push({cand:c,resolveType:h})}return l.find(c=>n.has(rn(c.resolveType)))??l[0]},u=(o,l,c)=>({kind:o.kind,id:`${o.kind}:${l}`,resolveType:l,clientFilter:o.clientFilter,isFallback:c,buildRequests:h=>o.buildRequests(l,h),optionsFromPayload:o.optionsFromPayload}),d=[];for(const o of["product","category"]){if(!t.has(o))continue;const l=a(o);l&&d.push(u(l.cand,l.resolveType,!1))}return t.size>0&&d.push(Aa(t.has("category")?"category":"product")),d}function Aa(t){return{kind:t,id:$n,resolveType:$n,clientFilter:!0,isFallback:!0,homepageLinks:!0,optionsFromPayload:(e,n)=>Ha(e,n)}}function Ue(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Da(t,e,n){const s=new Set,a=new Set,u=d=>{if(Array.isArray(d)){for(const c of d)u(c);return}const o=Ue(d);if(!o)return;const l=o.__resolveType;if(typeof l=="string"){if(n(l))s.add(l);else if(l in e&&!a.has(l)){a.add(l);const c=Ue(e[l])?.__resolveType;typeof c=="string"&&n(c)&&s.add(l),u(e[l])}}for(const c of Object.values(o))u(c)};return u(t),s}function pr(t){const e=new Set,n=[];for(const s of t)for(const a of s)e.has(a.value)||(e.add(a.value),n.push(a));return n}function hr(t){try{return decodeURIComponent(t)}catch{return t}}function Ba(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fa(t){const e=[];let n="^";for(const s of t)s.type==="text"?n+=Ba(s.text):(e.push(s.name),n+=s.name==="*"?"(.+)":"([^/]+)");return{pattern:new RegExp(`${n}$`),order:e}}function gr(t,e,n){if(typeof t!="string"||!t)return null;let s;try{s=new URL(t,"https://placeholder.invalid").pathname}catch{return null}s=s.replace(/\/+$/,"");const a=at(en(e)),{pattern:u,order:d}=Fa(a),o=d.indexOf(n);if(o===-1)return null;const l=s.match(u);if(!l)return null;const c=l[o+1]?.replace(/^\/+|\/+$/g,"");return c?hr(c):null}function wt(t,e){const n=Ue(t),s=Array.isArray(t)?t:Array.isArray(n?.products)?n.products:Array.isArray(n?.list)?n.list:[],a=[],u=new Set;for(const d of s){const o=Ue(d);if(!o)continue;const l=gr(o.url,e.template,e.paramName);if(!l||u.has(l))continue;u.add(l);const c=Ue(o.isVariantOf),h=typeof c?.name=="string"&&c.name||typeof o.name=="string"&&o.name||l,p=Array.isArray(o.image)?Ue(o.image[0]):null,f=typeof p?.url=="string"?p.url:void 0;a.push({value:l,label:h,image:f})}return a}function $a(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?hr(n):null}function Ma(t){const e=[],n=new Set,s=(a,u)=>{const d=Ue(a);if(!d)return;const o=typeof d.name=="string"&&d.name?d.name:"",l=o?[...u,o]:u,c=$a(d.url);if(c&&!n.has(c)&&(n.add(c),e.push({value:c,label:l.join(" › ")||c})),Array.isArray(d.children))for(const h of d.children)s(h,l)};if(Array.isArray(t))for(const a of t)s(a,[]);return e}const Ia=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 s,a=0;for(;(s=n.exec(t))!==null&&a++<5e3;){const u=s[1]??"",d=(s[2]??"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();e.push({href:u,text:d})}return e}function Ua(t){if(typeof t!="string"||!t)return[];const e=[],n=new Set,s=/"@type":"Product"[\s\S]{0,600}?(?:"url"|\burl):"([^"]+)"[\s\S]{0,300}?(?:"name"|\bname):"([^"]+)"/g,a=/(?:"image"|\bimage):\s*\[\s*\{[\s\S]{0,400}?(?:"url"|\burl):"([^"]+)"/;let u,d=0;for(;(u=s.exec(t))!==null&&d++<3e3;){const o=(u[1]??"").replace(/\\\//g,"/");if(!o||n.has(o))continue;n.add(o);const l=t.slice(u.index,u.index+900).match(a)?.[1]?.replace(/\\\//g,"/");e.push({url:o,name:u[2]??"",image:l||void 0})}return e}function Ha(t,e){const n=[],s=new Set,a=(u,d,o,l)=>{if(n.length>=200)return;const c=gr(u,e.template,e.paramName);!c||s.has(c)||e.paramName==="*"&&/(^|\/)p$/.test(c)||o==="category"&&Ia.has(c.split("/")[0]??"")||(s.add(c),n.push({value:c,label:d&&d.length<=80?d:Ka(c),kind:o,image:l}))};for(const{url:u,name:d,image:o}of Ua(t))a(u,d,"product",o);for(const{href:u,text:d}of za(t))u.startsWith("/")&&!u.startsWith("//")&&a(u,d,"category");return n}function tt(t,e,n=50){const s=e.trim().toLowerCase();return(s?t.filter(u=>u.label.toLowerCase().includes(s)||u.value.toLowerCase().includes(s)):t).slice(0,n)}const vr=1e4;function Wa(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 s=await fetch(Ts(t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({__resolveType:e,...n}),signal:AbortSignal.timeout(vr)});if(!s.ok)throw new Error(`Failed to fetch options: ${s.status}`);return s.json()}async function Mn(t,e){const n=await fetch(Ls(t,e),{signal:AbortSignal.timeout(vr)});if(!n.ok)throw new Error(`Failed to fetch page: ${n.status}`);return n.text()}async function qa(t,e,n){const s=e.optionsFromPayload(await Mn(t,"/"),n),a=s.find(d=>d.kind==="category");if(!a)return s;const u=Fe(n.template,{[n.paramName]:a.value});if(u==="/")return s;try{const d=e.optionsFromPayload(await Mn(t,u),n).filter(o=>o.kind==="product");return pr([s,d])}catch{return s}}function Ga(t,e,n){return qr.sandboxInvoke(`${t.orgSlug}/${t.virtualMcpId}/${t.branch}`,`path-param-${e.id}:${e.clientFilter?"":n}`)}async function Ja(t,e,n,s){if(e.homepageLinks)return qa(t,e,s);const a=e.buildRequests?.(n)??[];if(a.length===0)return[];const u=await Promise.allSettled(a.map(o=>Va(t,o))),d=u.filter(o=>o.status==="fulfilled").map(o=>o.value);if(d.length===0){const o=u.find(l=>l.status==="rejected");throw o?o.reason:new Error("Failed to fetch options")}return pr(d.map(o=>e.optionsFromPayload(o,s)))}function Qt(t,e,n,s,a){return{queryKey:Ga(t,e,n),queryFn:()=>Ja(t,e,n,s),enabled:a,staleTime:6e4,retry:1}}function nt(t){const e=fe.c(16),{heading:n,iconKind:s,options:a,template:u,paramName:d,keyPrefix:o,onSelect:l}=t;if(a.length===0)return null;let c;if(e[0]!==s||e[1]!==o||e[2]!==l||e[3]!==a||e[4]!==d||e[5]!==u){let p;e[7]!==s||e[8]!==o||e[9]!==l||e[10]!==d||e[11]!==u?(p=f=>r.jsxs(st,{value:`${o}:${f.value}`,className:"gap-3 py-2",onSelect:()=>l(f.value),children:[s==="product"&&r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:f.image?r.jsx("img",{src:f.image,alt:"",referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):r.jsx(qn,{size:14,className:"text-muted-foreground"})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:f.label}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:Fe(u,{[d]:f.value})})]})]},`${o}:${f.value}`),e[7]=s,e[8]=o,e[9]=l,e[10]=d,e[11]=u,e[12]=p):p=e[12],c=a.map(p),e[0]=s,e[1]=o,e[2]=l,e[3]=a,e[4]=d,e[5]=u,e[6]=c}else c=e[6];let h;return e[13]!==n||e[14]!==c?(h=r.jsx(rt,{heading:n,children:c}),e[13]=n,e[14]=c,e[15]=h):h=e[15],h}function In(t){const e=fe.c(2),{text:n}=t;let s;return e[0]!==n?(s=r.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=s):s=e[1],s}function Ya(t){const e=fe.c(52),{sources:n,template:s,paramName:a,value:u,sandboxRef:d,onCommit:o}=t,l=Ne(),[c,h]=g.useState(!1),[p,f]=g.useState(""),[P,x]=g.useState(""),w=g.useRef(null),b=a==="*"?l("sandbox.preview.catchAllParamLabel"):`:${a}`,S=Wa(l),y=[...new Set(n.map(I=>S[I.kind].noun))].join(" or ");let k;e[0]!==l||e[1]!==y?(k=l("sandbox.pathParamPickerChip.searchPlaceholder",{options:y}),e[0]=l,e[1]=y,e[2]=k):k=e[2];const v=k,E={template:s,paramName:a};let _;e[3]!==p?(_=(I,C)=>({source:I,query:C,options:I.clientFilter?tt(C.data??[],p):C.data??[]}),e[3]=p,e[4]=_):_=e[4];const j=_,F=n.filter(si),K=n.filter(ri),$=Jt({queries:F.map(I=>Qt(d,I,P,E,c))});let T;e[5]!==$||e[6]!==j?(T=(I,C)=>j(I,$[C]),e[5]=$,e[6]=j,e[7]=T):T=e[7];const D=F.map(T),z=D.length===0||D.every(ni),W=Jt({queries:K.map(I=>Qt(d,I,P,E,c&&z))});let B;e[8]!==W||e[9]!==j?(B=(I,C)=>j(I,W[C]),e[8]=W,e[9]=j,e[10]=B):B=e[10];const Y=K.map(B),M=z?Y:D,U=M.length===1&&M[0]?.source.homepageLinks?M[0]:null,O=U&&!U.query.isLoading&&!U.query.isError?U?.query.data??[]:[],ne=tt(O.filter(ti),p),V=tt(O.filter(ei),p),q=ne.length>0&&V.length>0,Q=I=>{h(I),w.current&&clearTimeout(w.current),f(I?u:""),x(I?u:"")};let J;e[11]===Symbol.for("react.memo_cache_sentinel")?(J=I=>{f(I),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{x(I)},300)},e[11]=J):J=e[11];const te=J,se=I=>{o(I),Q(!1)},X=tr(p),G=Fe(s,{[a]:X}),ae=cr,ge=lr,ve="flex h-[85svh] flex-col gap-0 overflow-hidden p-0 sm:h-[520px] sm:max-w-[560px]",ce=Za;let ie;e[12]!==b||e[13]!==l?(ie=l("sandbox.pathParamPickerChip.pickValueTitle",{paramLabel:b}),e[12]=b,e[13]=l,e[14]=ie):ie=e[14];let de;e[15]!==ie?(de=r.jsx(dr,{className:"sr-only",children:r.jsx(ur,{children:ie})}),e[15]=ie,e[16]=de):de=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=r.jsx(qn,{size:16,className:"shrink-0 text-foreground"}),e[17]=be):be=e[17];let Z;e[18]!==l?(Z=l("sandbox.pathParamPickerChip.pickValueHeading"),e[18]=l,e[19]=Z):Z=e[19];let ue;e[20]!==b?(ue=r.jsx("span",{className:"rounded-sm bg-special/15 px-1 py-0.5 font-mono text-[12px] text-special",children:b}),e[20]=b,e[21]=ue):ue=e[21];let pe;e[22]!==Z||e[23]!==ue?(pe=r.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border px-4",children:[be,r.jsxs("span",{className:"text-sm font-medium text-foreground",children:[Z," ",ue]})]}),e[22]=Z,e[23]=ue,e[24]=pe):pe=e[24];const he=Yn,$e=!1,Le="min-h-0 flex-1";let Oe;e[25]!==v||e[26]!==p?(Oe=r.jsx(Qn,{autoFocus:!0,placeholder:v,value:p,onValueChange:te}),e[25]=v,e[26]=p,e[27]=Oe):Oe=e[27];const We=Jn,xe="flex max-h-none min-h-0 flex-1 flex-col overflow-hidden";let ye;e[28]!==l?(ye=l("sandbox.pathParamPickerChip.noResults"),e[28]=l,e[29]=ye):ye=e[29];let Ee;e[30]!==ye?(Ee=r.jsx(Xn,{children:ye}),e[30]=ye,e[31]=Ee):Ee=e[31];const Me=X&&r.jsx(rt,{className:"shrink-0",children:r.jsxs(st,{value:`__raw__:${X}`,className:"gap-3 py-2",onSelect:()=>se(X),children:[r.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md border border-dashed border-border bg-muted",children:r.jsx(ta,{size:14,className:"text-muted-foreground"})}),r.jsxs("span",{className:"min-w-0 flex-1",children:[r.jsx("span",{className:"block truncate text-sm",children:l("sandbox.pathParamPickerChip.useRawValue",{rawTerm:X,paramLabel:b})}),r.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:G})]})]})}),_e=q?r.jsxs("div",{className:"flex min-h-0 flex-1",children:[r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto border-r border-border",children:r.jsx(nt,{heading:S.category.heading,iconKind:"category",options:ne,template:s,paramName:a,keyPrefix:`${U?.source.id}:cat`,onSelect:se})}),r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r.jsx(nt,{heading:S.product.heading,iconKind:"product",options:V,template:s,paramName:a,keyPrefix:`${U?.source.id}:prod`,onSelect:se})})]}):r.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:M.map(I=>{const{source:C,query:me,options:De}=I,{noun:Et}=S[C.kind];if(me.isLoading)return r.jsx(In,{text:l("sandbox.pathParamPickerChip.loading",{noun:Et})},C.id);if(me.isError)return r.jsx(In,{text:l("sandbox.pathParamPickerChip.couldNotLoad")},C.id);if(C.homepageLinks){const Xe=me.data??[];return r.jsxs(g.Fragment,{children:[r.jsx(nt,{heading:S.category.heading,iconKind:"category",options:tt(Xe.filter(Xa),p),template:s,paramName:a,keyPrefix:`${C.id}:cat`,onSelect:se}),r.jsx(nt,{heading:S.product.heading,iconKind:"product",options:tt(Xe.filter(Qa),p),template:s,paramName:a,keyPrefix:`${C.id}:prod`,onSelect:se})]},C.id)}return r.jsx(nt,{heading:M.length>1?S[C.kind].heading:void 0,iconKind:C.kind,options:De,template:s,paramName:a,keyPrefix:C.id,onSelect:se},C.id)})});let Ae;e[32]!==We||e[33]!==Ee||e[34]!==Me||e[35]!==_e?(Ae=r.jsxs(We,{className:xe,children:[Ee,Me,_e]}),e[32]=We,e[33]=Ee,e[34]=Me,e[35]=_e,e[36]=Ae):Ae=e[36];let we;e[37]!==he||e[38]!==Oe||e[39]!==Ae?(we=r.jsxs(he,{shouldFilter:$e,className:Le,children:[Oe,Ae]}),e[37]=he,e[38]=Oe,e[39]=Ae,e[40]=we):we=e[40];let Ce;e[41]!==ge||e[42]!==de||e[43]!==pe||e[44]!==we||e[45]!==ce?(Ce=r.jsxs(ge,{className:ve,onClick:ce,children:[de,pe,we]}),e[41]=ge,e[42]=de,e[43]=pe,e[44]=we,e[45]=ce,e[46]=Ce):Ce=e[46];let Ie;return e[47]!==ae||e[48]!==Q||e[49]!==c||e[50]!==Ce?(Ie=r.jsx(ae,{open:c,onOpenChange:Q,children:Ce}),e[47]=ae,e[48]=Q,e[49]=c,e[50]=Ce,e[51]=Ie):Ie=e[51],r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",title:l("sandbox.pathParamPickerChip.buttonTitle",{paramLabel:b}),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:I=>{I.stopPropagation(),Q(!0)},children:u||b}),Ie]})}function Qa(t){return t.kind==="product"}function Xa(t){return t.kind!=="product"}function Za(t){return t.stopPropagation()}function ei(t){return t.kind==="product"}function ti(t){return t.kind!=="product"}function ni(t){return!t.query.isLoading&&(t.query.isError||t.options.length===0)}function ri(t){return t.isFallback}function si(t){return!t.isFallback}function ai(t){const e=fe.c(8),{sources:n,template:s,paramName:a,sandboxRef:u,onFill:d}=t;let o,l;if(e[0]!==a||e[1]!==u||e[2]!==n||e[3]!==s){const P={template:s,paramName:a},x=n.filter(ii);l=Jt,o=x.map(w=>Qt(u,w,"",P,!0)),e[0]=a,e[1]=u,e[2]=n,e[3]=s,e[4]=o,e[5]=l}else o=e[4],l=e[5];let c;e[6]!==o?(c={queries:o},e[6]=o,e[7]=c):c=e[7];const h=l(c),[p,f]=g.useState(!1);if(!p)for(const P of h){if(P.isLoading)break;const x=P.data?.[0];if(x){f(!0),queueMicrotask(()=>d(x.value));break}}return null}function ii(t){return!t.isFallback}function oi(t){const e=fe.c(31),{name:n,value:s,onCommit:a}=t,u=Ne(),[d,o]=g.useState(s),[l,c]=g.useState(!1),h=g.useRef(!1);let p;e[0]!==n||e[1]!==u?(p=n==="*"?u("sandbox.preview.catchAllParamLabel"):`:${n}`,e[0]=n,e[1]=u,e[2]=p):p=e[2];const f=p,P=d||f;let x;e[3]!==P?(x=r.jsx("span",{"aria-hidden":!0,className:"invisible whitespace-pre px-1 py-0.5 text-[12px]",children:P}),e[3]=P,e[4]=x):x=e[4];let w;e[5]!==f||e[6]!==u?(w=u("sandbox.preview.valueForParam",{label:f}),e[5]=f,e[6]=u,e[7]=w):w=e[7];let b,S;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=j=>o(j.target.value),S=()=>c(!0),e[8]=b,e[9]=S):(b=e[8],S=e[9]);let N;e[10]!==s?(N=j=>{j.key==="Enter"&&j.currentTarget.blur(),j.key==="Escape"&&(h.current=!0,o(s),j.currentTarget.blur())},e[10]=s,e[11]=N):N=e[11];let y;e[12]!==d||e[13]!==a||e[14]!==s?(y=()=>{if(c(!1),h.current){h.current=!1;return}const j=tr(d);o(j),j!==s&&a(j)},e[12]=d,e[13]=a,e[14]=s,e[15]=y):y=e[15];let k;e[16]!==d||e[17]!==f||e[18]!==w||e[19]!==N||e[20]!==y?(k=r.jsx("input",{type:"text",value:d,placeholder:f,title:w,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:li,onChange:b,onFocus:S,onKeyDown:N,onBlur:y}),e[16]=d,e[17]=f,e[18]=w,e[19]=N,e[20]=y,e[21]=k):k=e[21];let v;e[22]!==x||e[23]!==k?(v=r.jsxs("span",{className:"relative inline-flex max-w-64 shrink-0 items-center overflow-hidden",children:[x,k]}),e[22]=x,e[23]=k,e[24]=v):v=e[24];let E;e[25]!==l||e[26]!==u?(E=l&&r.jsxs("span",{className:"pointer-events-none ml-1.5 flex shrink-0 items-center gap-1 whitespace-nowrap rounded-sm border border-border bg-muted px-1 py-0.5 text-[10px] text-muted-foreground",children:[r.jsx(rs,{size:10}),u("sandbox.preview.enterToGo")]}),e[25]=l,e[26]=u,e[27]=E):E=e[27];let _;return e[28]!==E||e[29]!==v?(_=r.jsxs(r.Fragment,{children:[v,E]}),e[28]=E,e[29]=v,e[30]=_):_=e[30],_}function li(t){return t.stopPropagation()}function ci(t){if(t.activeGlobalSectionName)return t.activeGlobalSectionName;const e=t.iframeBase;if(!e)return t.noServerLabel;try{const n=new URL(e),s=t.resolvedPath==="/"?"":t.resolvedPath;return`${n.host}${s}`}catch{return e}}function di(t){return t.showPreviewToolbar&&t.contentEditingEnabled}function ui(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 s=rr(n);let a;return e[2]!==t||e[3]!==s?(a={mutationFn:async u=>{const{name:d,path:o,template:l}=u;if(!t?.virtualMcpId||!t.branch)throw new Error("Sandbox not ready");const c=Os(d),h=l?{...l,name:d,path:o}:_s(d,o);return await s.mutateAsync({blockKey:c,data:h}),{key:c,name:d,path:o}}},e[2]=t,e[3]=s,e[4]=a):a=e[4],Gr(a)}function mi(t){const e=fe.c(89),{open:n,onOpenChange:s,isPending:a,error:u,templates:d,onSubmit:o}=t,l=a===void 0?!1:a,c=Ne();let h;e[0]!==c?(h=c("sectionsEditor.createPageModal.defaultPageName"),e[0]=c,e[1]=h):h=e[1];const[p,f]=g.useState(h);let P;e[2]!==c?(P=c("sectionsEditor.createPageModal.defaultPagePath"),e[2]=c,e[3]=P):P=e[3];const[x,w]=g.useState(P),[b,S]=g.useState(Ht),[N,y]=g.useState(null),[k,v]=g.useState(n);n!==k&&(v(n),n&&(f(c("sectionsEditor.createPageModal.defaultPageName")),w(c("sectionsEditor.createPageModal.defaultPagePath")),S(Ht),y(null)));const E=!!d?.length;let _;e[4]!==l||e[5]!==s?(_=Z=>{!Z&&!l&&(y(null),s(!1))},e[4]=l,e[5]=s,e[6]=_):_=e[6];const j=_;let F;e[7]!==l||e[8]!==p||e[9]!==o||e[10]!==x||e[11]!==E||e[12]!==b?(F=async Z=>{Z.preventDefault();const ue=p.trim(),pe=x.trim();if(!ue||!pe||l)return;const he=nr(pe);if(he){y(he);return}y(null),await o({name:ue,path:pe,templateKey:E&&b!==Ht?b:null})},e[7]=l,e[8]=p,e[9]=o,e[10]=x,e[11]=E,e[12]=b,e[13]=F):F=e[13];const K=F,$=N??u;let T;e[14]!==c?(T=c("sectionsEditor.createPageModal.title"),e[14]=c,e[15]=T):T=e[15];let D;e[16]!==T?(D=r.jsx(dr,{children:r.jsx(ur,{children:T})}),e[16]=T,e[17]=D):D=e[17];let z;e[18]!==c?(z=c("sectionsEditor.createPageModal.nameLabel"),e[18]=c,e[19]=z):z=e[19];let W;e[20]!==z?(W=r.jsx("label",{htmlFor:"new-page-name",className:"text-xs font-medium text-muted-foreground",children:z}),e[20]=z,e[21]=W):W=e[21];let B;e[22]===Symbol.for("react.memo_cache_sentinel")?(B=Z=>f(Z.target.value),e[22]=B):B=e[22];let Y;e[23]!==c?(Y=c("sectionsEditor.createPageModal.namePlaceholder"),e[23]=c,e[24]=Y):Y=e[24];let M;e[25]!==l||e[26]!==p||e[27]!==Y?(M=r.jsx(On,{id:"new-page-name",value:p,onChange:B,placeholder:Y,autoFocus:!0,disabled:l}),e[25]=l,e[26]=p,e[27]=Y,e[28]=M):M=e[28];let U;e[29]!==M||e[30]!==W?(U=r.jsxs("div",{className:"space-y-1.5",children:[W,M]}),e[29]=M,e[30]=W,e[31]=U):U=e[31];let ee;e[32]!==c?(ee=c("sectionsEditor.createPageModal.pathLabel"),e[32]=c,e[33]=ee):ee=e[33];let O;e[34]!==ee?(O=r.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=>w(Z.target.value),e[36]=ne):ne=e[36];let V;e[37]!==c?(V=c("sectionsEditor.createPageModal.pathPlaceholder"),e[37]=c,e[38]=V):V=e[38];let q;e[39]!==l||e[40]!==x||e[41]!==V?(q=r.jsx(On,{id:"new-page-path",value:x,onChange:ne,placeholder:V,disabled:l}),e[39]=l,e[40]=x,e[41]=V,e[42]=q):q=e[42];let Q;e[43]!==O||e[44]!==q?(Q=r.jsxs("div",{className:"space-y-1.5",children:[O,q]}),e[43]=O,e[44]=q,e[45]=Q):Q=e[45];let J;e[46]!==l||e[47]!==E||e[48]!==c||e[49]!==b||e[50]!==d?(J=E&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{htmlFor:"new-page-template",className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.createPageModal.templateLabel")}),r.jsx(As,{id:"new-page-template",value:b,onChange:S,templates:d??[],disabled:l})]}),e[46]=l,e[47]=E,e[48]=c,e[49]=b,e[50]=d,e[51]=J):J=e[51];let te;e[52]!==$?(te=$&&r.jsx("p",{className:"text-xs text-destructive",children:$}),e[52]=$,e[53]=te):te=e[53];let se;e[54]!==U||e[55]!==Q||e[56]!==J||e[57]!==te?(se=r.jsxs("div",{className:"space-y-4 py-4",children:[U,Q,J,te]}),e[54]=U,e[55]=Q,e[56]=J,e[57]=te,e[58]=se):se=e[58];let X;e[59]!==s?(X=()=>s(!1),e[59]=s,e[60]=X):X=e[60];let G;e[61]!==c?(G=c("sectionsEditor.createPageModal.cancelButton"),e[61]=c,e[62]=G):G=e[62];let ae;e[63]!==l||e[64]!==X||e[65]!==G?(ae=r.jsx(He,{type:"button",variant:"outline",onClick:X,disabled:l,children:G}),e[63]=l,e[64]=X,e[65]=G,e[66]=ae):ae=e[66];let ge;e[67]!==l||e[68]!==p||e[69]!==x?(ge=!p.trim()||!x.trim()||l,e[67]=l,e[68]=p,e[69]=x,e[70]=ge):ge=e[70];let ve;e[71]!==l||e[72]!==c?(ve=l?r.jsxs(r.Fragment,{children:[r.jsx(Pt,{className:"size-3.5"}),c("sectionsEditor.createPageModal.creatingButton")]}):c("sectionsEditor.createPageModal.createButton"),e[71]=l,e[72]=c,e[73]=ve):ve=e[73];let ce;e[74]!==ge||e[75]!==ve?(ce=r.jsx(He,{type:"submit",disabled:ge,children:ve}),e[74]=ge,e[75]=ve,e[76]=ce):ce=e[76];let ie;e[77]!==ae||e[78]!==ce?(ie=r.jsxs(na,{children:[ae,ce]}),e[77]=ae,e[78]=ce,e[79]=ie):ie=e[79];let de;e[80]!==K||e[81]!==se||e[82]!==ie||e[83]!==D?(de=r.jsx(lr,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:K,children:[D,se,ie]})}),e[80]=K,e[81]=se,e[82]=ie,e[83]=D,e[84]=de):de=e[84];let be;return e[85]!==j||e[86]!==n||e[87]!==de?(be=r.jsx(cr,{open:n,onOpenChange:j,children:de}),e[85]=j,e[86]=n,e[87]=de,e[88]=be):be=e[88],be}function fi(t){const e=fe.c(29),{orgSlug:n,virtualMcpId:s,branch:a,previewUrl:u,meta:d,decofile:o,blockKey:l}=t,c=Ne();let h;e[0]!==a||e[1]!==n||e[2]!==s?(h={orgSlug:n,virtualMcpId:s,branch:a},e[0]=a,e[1]=n,e[2]=s,e[3]=h):h=e[3];const p=rr(h);let f;e[4]!==p?(f=Fs((v,E)=>p.mutate({blockKey:v,data:E})),e[4]=p,e[5]=f):f=e[5];const P=f;let x;e[6]!==l||e[7]!==o?(x=Ds(o,l),e[6]=l,e[7]=o,e[8]=x):x=e[8];const{resolveType:w,props:b,title:S}=x;if(!w){let v;e[9]!==c?(v=c("sandbox.preview.loaderNoLongerExists"),e[9]=c,e[10]=v):v=e[10];let E;return e[11]!==v?(E=r.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:v}),e[11]=v,e[12]=E):E=e[12],E}const N=`loader:${l}`;let y;e[13]!==l||e[14]!==w||e[15]!==S?(y={mode:"saved",blockKey:l,resolveType:w,title:S},e[13]=l,e[14]=w,e[15]=S,e[16]=y):y=e[16];let k;return e[17]!==a||e[18]!==o||e[19]!==d||e[20]!==n||e[21]!==u||e[22]!==b||e[23]!==p.isPending||e[24]!==P||e[25]!==N||e[26]!==y||e[27]!==s?(k=r.jsx(Bs,{orgSlug:n,virtualMcpId:s,branch:a,previewUrl:u,meta:d,decofile:o,kind:"loaders",target:y,initialValue:b,isCreating:p.isPending,onCreate:pi,onSaveReferencedBlock:P,showRun:!1},N),e[17]=a,e[18]=o,e[19]=d,e[20]=n,e[21]=u,e[22]=b,e[23]=p.isPending,e[24]=P,e[25]=N,e[26]=y,e[27]=s,e[28]=k):k=e[28],k}async function pi(){}function hi(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Kn(t){return{status:t.status,hasData:t.data!==void 0,errorStatus:hi(t.error)}}function gi(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 vi(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=gi(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(a=>a.status==="error"&&!a.hasData&&a.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 bi="https://github.com/decocms/blocks";function xi(){const t=fe.c(14),e=Ne();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx(ss,{size:48,className:"text-muted-foreground"}),t[0]=n):n=t[0];let s;t[1]!==e?(s=e("mainPanelTabs.blocksTabStates.emptyStateTitle"),t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e?(a=e("mainPanelTabs.blocksTabStates.emptyStateDescription"),t[3]=e,t[4]=a):a=t[4];let u;t[5]!==e?(u=e("mainPanelTabs.blocksTabStates.setupContentEditing"),t[5]=e,t[6]=u):u=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Gn,{size:14}),t[7]=d):d=t[7];let o;t[8]!==u?(o=r.jsx(He,{size:"sm",asChild:!0,children:r.jsxs("a",{href:bi,target:"_blank",rel:"noreferrer",children:[u,d]})}),t[8]=u,t[9]=o):o=t[9];let l;return t[10]!==s||t[11]!==a||t[12]!==o?(l=r.jsx(nn,{className:"h-full w-full",image:n,title:s,description:a,actions:o}),t[10]=s,t[11]=a,t[12]=o,t[13]=l):l=t[13],l}function yi(t){const e=fe.c(15),{source:n,onRetry:s}=t,a=Ne();let u;e[0]!==n||e[1]!==a?(u=a(n==="sandbox"?"mainPanelTabs.blocksTabStates.errorStateSandbox":"mainPanelTabs.blocksTabStates.errorStateData"),e[0]=n,e[1]=a,e[2]=u):u=e[2];const d=u;let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(ra,{size:48,className:"text-muted-foreground"}),e[3]=o):o=e[3];let l;e[4]!==a?(l=a("mainPanelTabs.blocksTabStates.errorStateTitle"),e[4]=a,e[5]=l):l=e[5];let c;e[6]!==a?(c=a("mainPanelTabs.blocksTabStates.retry"),e[6]=a,e[7]=c):c=e[7];let h;e[8]!==s||e[9]!==c?(h=r.jsx(He,{variant:"outline",size:"sm",onClick:s,children:c}),e[8]=s,e[9]=c,e[10]=h):h=e[10];let p;return e[11]!==d||e[12]!==l||e[13]!==h?(p=r.jsx(nn,{image:o,title:l,description:d,actions:h}),e[11]=d,e[12]=l,e[13]=h,e[14]=p):p=e[14],p}const wi=g.lazy(()=>Jr(()=>import("./sections-editor-BrJtbdMq.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])).then(t=>({default:t.SectionsEditor})));function zn(t){const e=fe.c(50),{virtualMcpId:n,externalSelection:s,onViewJsonFile:a}=t,u=s===void 0?null:s,{org:d}=Xt(),{currentBranch:o,taskId:l}=St(),c=Zn(),h=Zt(),p=mr(),f=c.lifecycle.phase==="running",P=h.previewUrl;let x;e[0]!==o||e[1]!==d||e[2]!==P||e[3]!==l||e[4]!==n?(x=o?{orgSlug:d.slug,virtualMcpId:n,branch:o,threadId:l??null,previewUrl:P}:null,e[0]=o,e[1]=d,e[2]=P,e[3]=l,e[4]=n,e[5]=x):x=e[5];const w=x;let b;e[6]!==f?(b={fetchEnabled:f},e[6]=f,e[7]=b):b=e[7];const S=tn(w,b);let N;e[8]!==f?(N={fetchEnabled:f},e[8]=f,e[9]=N):N=e[9];const y=sr(w,N),k=vi({lifecyclePhase:c.lifecycle.phase,decofile:Kn(S),meta:Kn(y),hasEditableContent:Ss(S.data,y.data),fastPreviewActive:er(n).runtime==="cms"}),v=ki;if(k.kind==="loading"){let O;return e[10]===Symbol.for("react.memo_cache_sentinel")?(O=v(r.jsx(Yr,{})),e[10]=O):O=e[10],O}if(k.kind==="empty"){let O;return e[11]===Symbol.for("react.memo_cache_sentinel")?(O=v(r.jsx(xi,{})),e[11]=O):O=e[11],O}if(k.kind==="error"){let O;e[12]!==S||e[13]!==h||e[14]!==y||e[15]!==k.source?(O=()=>{if(k.source==="sandbox"){h.retry();return}Promise.all([S.refetch(),y.refetch()])},e[12]=S,e[13]=h,e[14]=y,e[15]=k.source,e[16]=O):O=e[16];const ne=O;let V;return e[17]!==ne||e[18]!==k.source?(V=v(r.jsx(yi,{source:k.source,onRetry:ne})),e[17]=ne,e[18]=k.source,e[19]=V):V=e[19],V}let E;e[20]===Symbol.for("react.memo_cache_sentinel")?(E=O=>v(r.jsx("div",{className:"h-full min-h-0",children:O})),e[20]=E):E=e[20];const _=E,j=p.state.target;if(j?.kind==="loader"&&S.data&&y.data){const O=o??"",ne=P??null;let V;return e[21]!==S.data||e[22]!==y.data||e[23]!==d.slug||e[24]!==O||e[25]!==ne||e[26]!==j.key||e[27]!==n?(V=_(r.jsx(fi,{orgSlug:d.slug,virtualMcpId:n,branch:O,previewUrl:ne,meta:y.data,decofile:S.data,blockKey:j.key})),e[21]=S.data,e[22]=y.data,e[23]=d.slug,e[24]=O,e[25]=ne,e[26]=j.key,e[27]=n,e[28]=V):V=e[28],V}let F;e[29]!==o||e[30]!==d.slug||e[31]!==j||e[32]!==n?(F=j||!o?null:ar(ir(d.slug,n,o)),e[29]=o,e[30]=d.slug,e[31]=j,e[32]=n,e[33]=F):F=e[33];const K=F;let $="/",T=null,D=null;j?.kind==="page"?($=j.path,T=j.key):j?.kind==="section"?D=j.key:K&&($=K.path,T=K.pageKey);const z=T?`page:${T}`:D?`section:${D}`:`path:${$}`;let W;e[34]===Symbol.for("react.memo_cache_sentinel")?(W=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(Pt,{className:"size-5 text-muted-foreground"})}),e[34]=W):W=e[34];const B=o??"",Y=P??void 0,M=D?null:u,U=!!T&&p.state.editSeoPageKey===T;let ee;return e[35]!==D||e[36]!==T||e[37]!==$||e[38]!==z||e[39]!==a||e[40]!==d.slug||e[41]!==M||e[42]!==U||e[43]!==B||e[44]!==Y||e[45]!==n||e[46]!==p.consumeEditSeo||e[47]!==p.setFocusedBlock||e[48]!==p.setVariantOverride?(ee=_(r.jsx(g.Suspense,{fallback:W,children:r.jsx(wi,{orgSlug:d.slug,virtualMcpId:n,branch:B,previewReady:!0,previewUrl:Y,currentPath:$,activePageBlockKey:T,activeGlobalBlockKey:D,externalSelection:M,initialEditSeo:U,onExitSeo:p.consumeEditSeo,onVariantPreviewOverride:p.setVariantOverride,onFocusedBlockChange:p.setFocusedBlock,onViewJsonFile:a},z)})),e[35]=D,e[36]=T,e[37]=$,e[38]=z,e[39]=a,e[40]=d.slug,e[41]=M,e[42]=U,e[43]=B,e[44]=Y,e[45]=n,e[46]=p.consumeEditSeo,e[47]=p.setFocusedBlock,e[48]=p.setVariantOverride,e[49]=ee):ee=e[49],ee}function ki(t){return r.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:s,onClose:a,ref:u}=t,d=Ne(),o=Qr(),l=$s(n);let c;e[0]!==l||e[1]!==s?(c=Ms(l,ia(s)),e[0]=l,e[1]=s,e[2]=c):c=e[2];const h=c,{org:p}=Xt(),{currentBranch:f,taskId:P}=St(),w=Zt().previewUrl;let b;e[3]!==f||e[4]!==p.slug||e[5]!==w||e[6]!==P||e[7]!==n?(b=f?{orgSlug:p.slug,virtualMcpId:n,branch:f,threadId:P??null,previewUrl:w}:null,e[3]=f,e[4]=p.slug,e[5]=w,e[6]=P,e[7]=n,e[8]=b):b=e[8];const N=tn(b),y=f??"";let k;e[9]!==p.slug||e[10]!==y||e[11]!==n?(k={orgSlug:p.slug,virtualMcpId:n,branch:y},e[9]=p.slug,e[10]=y,e[11]=n,e[12]=k):k=e[12];const{save:v,flush:E}=Is(k),_=N.data?.[s],j=N.data===void 0&&N.isLoading,F=N.data!==void 0&&_===void 0,K=!f||F||j;let $;e[13]!==_?($=_===void 0?"":JSON.stringify(_,null,2),e[13]=_,e[14]=$):$=e[14];const T=$;let D;e[15]!==s||e[16]!==K||e[17]!==v?(D=U=>{if(K)return;let ee;try{ee=JSON.parse(U)}catch{return}ee===null||typeof ee!="object"||Array.isArray(ee)||v(s,ee)},e[15]=s,e[16]=K,e[17]=v,e[18]=D):D=e[18];const z=D;let W;e[19]!==E?(W=()=>({flush:E}),e[19]=E,e[20]=W):W=e[20],g.useImperativeHandle(u,W);let B;e[21]!==h||e[22]!==o||e[23]!==a||e[24]!==d?(B=o?r.jsx("div",{className:"flex shrink-0 items-center border-b px-3 py-2.5",children:r.jsx("span",{title:h,className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:h})}):r.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:d("sectionsEditor.pageJsonDialog.titleShort")}),r.jsx(He,{variant:"ghost",size:"icon",onClick:a,"aria-label":d("sectionsEditor.pageJsonDialog.close"),className:"size-7 shrink-0",children:r.jsx(sa,{size:14})})]}),e[21]=h,e[22]=o,e[23]=a,e[24]=d,e[25]=B):B=e[25];let Y;e[26]!==N.data||e[27]!==E||e[28]!==T||e[29]!==j||e[30]!==F||e[31]!==s||e[32]!==K||e[33]!==z||e[34]!==d?(Y=j?r.jsx("div",{className:"flex flex-1 items-center justify-center",children:r.jsx(Pt,{className:"size-5 text-muted-foreground"})}):F?r.jsxs("div",{className:"p-4 text-xs font-mono text-foreground/60",children:["// ",d("sectionsEditor.pageJsonDialog.pageNotFound")]}):r.jsx("div",{className:"min-h-0 flex-1",children:r.jsx(aa,{code:T,language:"json",readOnly:K,height:"100%",onChange:U=>z(U??""),onSave:U=>{z(U),E()}},`${s}:${N.data===void 0?"loading":"ready"}`)}),e[26]=N.data,e[27]=E,e[28]=T,e[29]=j,e[30]=F,e[31]=s,e[32]=K,e[33]=z,e[34]=d,e[35]=Y):Y=e[35];let M;return e[36]!==B||e[37]!==Y?(M=r.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-background",children:[B,Y]}),e[36]=B,e[37]=Y,e[38]=M):M=e[38],M}function br(t){return t.contentEditingEnabled&&!t.isMobile}function Pi(t,e){return t!=="visual"?"visual":e?"blocks":"preview"}function Si(t,e){return t==="blocks"?"preview":e?"blocks":t}function Ei(t){return br({contentEditingEnabled:or(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 Ni=500,Ci={mobile:{width:412,height:823},tablet:{width:1024,height:1366},desktop:{width:1280,height:800}},Hn=1,qt=["desktop","mobile","tablet"],Wn={mobile:"sandbox.preview.deviceMobile",tablet:"sandbox.preview.deviceTablet",desktop:"sandbox.preview.deviceDesktop"};function Vn(t,e){try{const n=new URL(t,window.location.href);return n.searchParams.set("deviceHint",e),n.href}catch{return t}}function Ri(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 Ye(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 Ti(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 s=t.toLowerCase(),a=e.toLowerCase(),u=a.split("/").filter(Boolean),d=l=>{if(l===n)return 100;const c=l.indexOf(n);if(c===-1)return 0;let h=40;return c===0?h+=30:/[\s/-]/.test(l[c-1]??"")&&(h+=20),h+=Math.round(n.length/l.length*20),h};let o=Math.max(d(s),d(a));return u.at(-1)===n?o=Math.max(o,95):u.includes(n)&&(o=Math.max(o,90)),o}function _i(t,e){try{t.contentWindow?.location.reload()}catch{e&&(t.src=e)}}function Ai({virtualMcpId:t}){const e=Ne(),n=Zs(),s=Rs(),{currentBranch:a,taskId:u,virtualMcpId:d}=St(),o=mr(),l=gs(d===t?t:null),c=er(t),h=oa(l?.metadata?.ui?.layout??null),p=or(h),f=br({contentEditingEnabled:p,isMobile:s}),[P,x]=g.useState(()=>Ei({cmsMode:h,isMobile:s})),[w,b]=g.useState("desktop"),[S,N]=g.useState(null),[y,k]=g.useState(null),v=g.useRef(null),E=g.useRef(null),[_,j]=g.useState(!1),F=g.useRef(null),K=()=>{F.current?.flush(),j(!1)},$=()=>j(i=>(i&&F.current?.flush(),!i)),[T,D]=g.useState({width:0,height:0}),[z,W]=g.useState(null),[B,Y]=g.useState(!1),[M,U]=g.useState(""),[ee,O]=g.useState(!1),[ne,V]=g.useState(),[q,Q]=g.useState(null),[J,te]=g.useState(null),[se,X]=g.useState(null),[G,ae]=g.useState(()=>o.state.target?.kind==="page"?o.state.target.path:"/"),[ge,ve]=g.useState(()=>o.state.target?.kind==="page"?o.state.target.key:null),[ce,ie]=g.useState({}),[de,be]=g.useState(!1),Z=g.useRef(null),ue=()=>{be(!0),Z.current&&clearTimeout(Z.current),Z.current=setTimeout(()=>be(!1),15e3)},pe=()=>{Z.current&&(clearTimeout(Z.current),Z.current=null),be(!1)},{org:he}=Xt(),$e=Zn(),Le=Zt(),Oe=Le.vmEntry,We=$e.lifecycle.phase,{url:xe}=Es(t),ye=xe??Le.previewUrl,Ee=!!xe||We==="running",Me=l?.id===t?ws(l.metadata):null,_e=!xe&&l?.id===t&&c.runtime==="cms",Ae=c.projectDefault==="cms",we=Vs({sandboxUrl:ye,previewServerUrl:Me,fastPreviewActive:_e}),Ce=t&&a?{orgSlug:he.slug,virtualMcpId:t,branch:a,threadId:u??null,previewUrl:ye}:null,Ie=tn(Ce,{fetchEnabled:Ee}),I=sr(Ce,{fetchEnabled:Ee}),C=Ie.data,me=I.data,De=C?js(C).sort((i,m)=>i.name.localeCompare(m.name)):[],Et=t&&a?{orgSlug:he.slug,virtualMcpId:t,branch:a}:null,Xe=ui(Et),jt=C&&me?Ns(C,me):[],sn=C&&me?Ks(me,C,"loaders"):[],an=M?(()=>{const i=M.toLowerCase();return De.map(m=>({page:m,score:Oi(m.name,m.path,i)})).filter(({score:m})=>m>0).sort((m,R)=>R.score-m.score||m.page.path.length-R.page.path.length).map(({page:m})=>m)})():De,on=jt.filter(i=>{if(!M)return!0;const m=M.toLowerCase();return i.name.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),ln=f?sn:[],cn=ln.filter(i=>{if(!M)return!0;const m=M.toLowerCase();return i.title.toLowerCase().includes(m)||i.key.toLowerCase().includes(m)||i.resolveType.toLowerCase().includes(m)}),it=J?sn.find(i=>i.key===J)??null:null,Be=en,Nt=q||J?null:Cs(De,G,ge),H=Nt?.key??null,Ve=o.state.target?.kind==="section"?o.state.target.key:o.state.focusedBlockKey??H,ot=Nt?.path??null,qe=(H?ce[H]:void 0)??{},ke=Fe(G,qe),Ct={};if(Ee&&ye&&me&&C){const i=zs(me,"loaders"),m=H?C[H]:void 0,R=Da(m,C,re=>i.has(re)),A=Ta(R);for(const re of at(G)){if(re.type!=="param")continue;const Te=Na(G,re.name,R),Pe=_a(Te,i,A);Pe.length>0&&(Ct[re.name]=Pe)}}const lt=t&&a?{orgSlug:he.slug,virtualMcpId:t,branch:a,threadId:u??null}:null,dn=C&&H?Us(C,H,0):[],un=C?Hs(dn,C):[],Rt=un.map(i=>i.isSavedBlock?i.label:""),Tt=un.map(i=>i.isSavedBlock?"global":i.isMultivariate?"variant":"normal"),Lt=dn.map(i=>Yt(i,C??{})),mn=g.useRef(null),je=g.useRef(null),xr=$e.status.state==="paused",Ot=$e.phase,fn=Ws({claimPhase:Ot,lifecycle:$e.lifecycle}),Ke=Le.previewState,yr=Le.userStopped,wr=Qs(he.slug,t??"",a??""),{url:ze}=Ys(_e&&t&&a?{orgSlug:he.slug,virtualMcpId:t,branch:a,previewServerUrl:Me??null,path:ke}:null),kr=Ae&&c.runtime==="sandbox",L=fa({previewState:Ke,progressStatus:fn.status,previewServerUrl:Me,fastPreviewActive:_e,fastPreviewReady:!!ze,codingSession:kr,localPreviewUrl:xe}),ct=L.mode!=="none",pn=L.mode==="production"&&L.iframeBase?Ye(L.iframeBase):null,Pr=pn??(xe&&L.mode==="sandbox"&&L.iframeBase?Ye(L.iframeBase):null),hn=!n,Ge=L.mode==="production"?pn:Ye(ye),Sr=l?.id===t&&l.metadata?.fastPreviewInPlace===!0,Ze=xe?L.mode==="sandbox"&&f&&P==="blocks":L.mode==="production"&&_e&&Sr&&f&&P==="blocks",gn=g.useRef(null),{pin:Er,effective:jr}=Ti(gn.current,{inPlaceRenderActive:Ze,draftPreviewUrl:ze,resolvedPath:ke});gn.current=Er;const Re=Ri(L.mode==="sandbox"&&hn?bt(Vn(se??Gt(ke,L.iframeBase)??L.iframeBase,w),o.state.variantOverride??[]):L.mode==="production"&&hn?bt(Vn(qs(se??jr??Gt(ke,L.iframeBase)??L.iframeBase,L.showWakingPill?Gs:null),w),o.state.variantOverride??[]):null);g.useEffect(()=>{},[n,Pr,z]);const Nr="sandbox.preview.openInNewTab",vn=ze??(L.iframeBase?Gt(ke,L.iframeBase):null),Cr=L.mode==="production"?vn?bt(vn,o.state.variantOverride??[]):null:Re??L.iframeBase,Rr=async()=>{const i=Cr;if(i){window.open(i,"_blank","noopener");return}},dt=t&&a?ir(he.slug,t,a):null,ut=i=>{dt&&Xs(dt,i)},oe=o.state.target;g.useEffect(()=>{if(!(!oe||!we||!me))if(oe.kind==="page"){const i=ce[oe.key]??{};je.current=Fe(oe.path,i),Q(null),te(null),X(null),ve(oe.key),ae(oe.path),ut({path:oe.path,pageKey:oe.key,params:i})}else if(oe.kind==="loader")je.current=null,Q(null),te(oe.key),X(null);else{const i=jt.find(m=>m.key===oe.key);if(i){je.current=null;const m=Tn(me);te(null),Q(i),X(Ln(we,m,i.key))}}},[oe,we,me,ce]),g.useEffect(()=>{!H||ot===null||oe?.kind==="page"&&oe.key===H&&oe.path===ot||o.selectTarget({kind:"page",key:H,path:ot})},[H,ot,oe]);const[bn,Tr]=g.useState(null);if(Ke.kind==="iframe"&&bn!==Ke.previewUrl){const i=bn!==null;Tr(Ke.previewUrl);const m=dt?ar(dt):null;if(m){if(je.current=Fe(m.path,m.params),ae(m.path),ve(m.pageKey),X(null),Q(null),te(null),m.pageKey&&Object.keys(m.params).length>0){const R=m.pageKey;ie(A=>({...A,[R]:m.params}))}}else i&&(je.current=null,ae("/"),X(null),ve(null),Q(null),te(null))}mn.current=Re;const xn=va({iframeRef:v,src:L.mode==="sandbox"?Re:null,active:L.mode==="sandbox"}),yn=g.useRef(null);g.useEffect(()=>{if(!ze||!Re||yn.current===ze)return;yn.current=ze;const i=v.current;i&&i.getAttribute("src")!==Re&&(ue(),i.src=Re)},[ze,Re]);const wn=()=>{const i=v.current?.contentWindow,m=Ge;if(!i||!m||!C||!H)return;const R=C[H];if(!R||typeof R!="object")return;const A=Js({previewBaseUrl:m,pageBlock:R,decofile:C,path:ke,pathTemplate:G});if(!A)return;const re=bt(A.src,o.state.variantOverride??[]);i.postMessage({type:"cms-editor::render",src:re,body:A.body},m)},_t=g.useRef(null);g.useEffect(()=>{if(!Ze||q||J||!H||!C){_t.current=null;return}const i={nav:JSON.stringify({page:H,path:ke,pathTemplate:G}),content:JSON.stringify(C)},m=Li(_t.current,i);_t.current=i,m&&wn()},[C,Ze,q,J,H,ke,G]);const At=g.useRef(null);g.useEffect(()=>{if(!Ze||q||J||!H||!C){At.current=null;return}const i=JSON.stringify(o.state.variantOverride??null),m=At.current;At.current={page:H,sig:i},!(!m||m.page!==H||m.sig===i)&&wn()},[o.state.variantOverride,Ze,q,J,H]);const Lr=!!t&&!!a&&!$e.notFound&&!yr&&!xr&&(Ot?.kind==="ready"||We!=="idle"),le=ji({editingMode:P,sandboxDisplay:L.mode==="sandbox",blocksEditingEnabled:f});g.useEffect(()=>{const i=Ge;if(!i)return;const m=R=>{if(R.origin===i)if(R.data?.type==="visual-editor::element-clicked"){const A=ba.safeParse(R.data.payload);A.success&&N(A.data)}else if(R.data?.type==="cms-editor::section-clicked"){const A=wa.safeParse(R.data.payload);A.success&&k({index:A.data.sectionIndex,seq:A.data.clickSeq})}else R.data?.type==="cms-editor::render-start"?ue():R.data?.type==="cms-editor::render-end"?(pe(),v.current?.contentWindow?.postMessage({type:"cms-editor::set-labels",labels:Rt,kinds:Tt,keys:Lt},i)):R.data?.type==="cms-editor::render-error"&&pe()};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[Ge,Rt,Tt,Lt]);const kn=()=>{const i=v.current?.contentWindow,m=Ye(ye);!i||!m||i.postMessage({type:"visual-editor::activate",script:xa},m)},Or=()=>{const i=v.current?.contentWindow,m=Ye(ye);!i||!m||i.postMessage({type:"visual-editor::deactivate"},m)},Dt=()=>{const i=v.current?.contentWindow,m=Ge;!i||!m||(i.postMessage(L.mode==="production"||xe?{type:"editor::inject",args:{script:Fn}}:{type:"visual-editor::activate",script:Fn},m),i.postMessage({type:"cms-editor::set-labels",labels:Rt,kinds:Tt,keys:Lt},m))},_r=()=>{const i=v.current?.contentWindow,m=Ge;!i||!m||i.postMessage({type:"cms-editor::deactivate"},m)},Ar=()=>{const i=v.current?.contentWindow,m=Ge;!i||!m||(i.postMessage({type:"cms-editor::clear-hover"},m),i.postMessage({type:"visual-editor::clear-hover"},m))},mt=i=>{if(i==="blocks"&&!f)return;const m=P;!s&&i!==m&&(i==="blocks"?E.current?.resize("30%"):E.current?.collapse()),x(i),N(null),k(null),i!=="blocks"&&te(null),m==="visual"&&Or(),i==="visual"&&kn(),m==="blocks"&&i!=="blocks"&&_r(),i==="blocks"&&Dt()},Dr=()=>{mt(Pi(P,f))},Br=()=>{mt(Si(P,f))};bs(()=>{const i=v.current;if(!i)return;ue();const m=document.activeElement,R=i.tabIndex;i.tabIndex=-1,i.style.pointerEvents="none",i.blur(),_i(i,mn.current);let A;const re=()=>{clearTimeout(A),i.tabIndex=R,i.style.pointerEvents="";const Te=document.activeElement;(!Te||Te===document.body||Te===i)&&m?.focus(),i.removeEventListener("load",re)};i.addEventListener("load",re),A=setTimeout(re,3e3)});const Fr=()=>{const i=qt.indexOf(w);b(qt[(i+1)%qt.length])},Bt=(i,m)=>{if(!H)return;const R=H,A={...qe,[i]:m};je.current=Fe(G,A),ie(re=>({...re,[R]:A})),ut({path:G,pageKey:R,params:A})},$r=ci({iframeBase:L.iframeBase,resolvedPath:ke,activeGlobalSectionName:q?.name??null,noServerLabel:e("sandbox.preview.noServerRunning")}),Pn=i=>{const m=ce[i.key]??{},R=Fe(i.path,m);(q||Be(R)!==Be(ke))&&ue(),je.current=R,Q(null),te(null),X(null),k(null),ve(i.key),ae(i.path),ut({path:i.path,pageKey:i.key,params:m}),o.selectTarget({kind:"page",key:i.key,path:i.path})},Mr=i=>{if(!we||!me){Cn.error(e("sandbox.preview.previewMetadataNotReady"));return}ue(),je.current=null;const m=Tn(me),R=Ln(we,m,i.key);Q(i),te(null),X(R),k(null),o.selectTarget({kind:"section",key:i.key})},Ir=i=>{f&&(Q(null),te(i.key),X(null),mt("blocks"),o.selectTarget({kind:"loader",key:i.key}))},Kr=async({name:i,path:m,templateKey:R})=>{if(!t||!a)return;const A=nr(m);if(A){V(A);return}const re=m.trim().startsWith("/")?m.trim():`/${m.trim()}`;if(De.some(Pe=>Be(Pe.path)===Be(re))){V(e("sandbox.preview.pageAlreadyExists",{path:re}));return}let Te;if(R&&(Te=C?.[R],!Te)){V(e("sandbox.preview.templateNoLongerExists"));return}V(void 0);try{const Pe=await Xe.mutateAsync({name:i,path:re,template:Te});O(!1),Cn.success(e("sandbox.preview.pageCreated",{name:i})),await ys(Ni),Pn({key:Pe.key,name:Pe.name,path:Pe.path}),mt("blocks")}catch(Pe){V(Pe instanceof Error?Pe.message:e("sandbox.preview.failedToCreatePage"))}},ft=ct&&(Lr||L.mode==="production"),zr=di({showPreviewToolbar:ft,contentEditingEnabled:p}),pt=()=>{Y(!1),U("")},Ft=q?.name??it?.title??Nt?.name,$t=Ie.isPending||I.isPending,Mt=$t?Ye(L.iframeBase):Ft,ht=q?`section:${q.key}`:J?`loader:${J}`:H?`page:${H}`:void 0,Ur=ft?zr?r.jsxs(fs,{open:B,onOpenChange:i=>{Y(i),i||U("")},children:[r.jsx(ps,{asChild:!0,children:r.jsx("button",{type:"button","aria-label":e("sandbox.preview.choosePage"),"data-testid":"preview-page-picker",title:$t?Mt??void 0:q||it?Ft:[Ft,G].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:r.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 px-2 transition-colors group-hover/page-picker:bg-accent/50 group-data-[state=open]/page-picker:bg-accent/50",children:[q&&r.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:[r.jsx(us,{size:11}),e("sandbox.preview.globalBadge")]}),it&&r.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:[r.jsx(as,{size:11}),e("sandbox.preview.loaderBadge")]}),Mt&&r.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground",children:Mt}),!$t&&!q&&!it&&r.jsx("span",{"data-testid":"preview-page-path",className:"ml-auto min-w-0 truncate text-right font-mono text-muted-foreground",children:G}),r.jsx(ns,{size:12,className:It("shrink-0 transition-transform",B&&"rotate-180")})]})})}),r.jsxs(hs,{className:"w-112 max-w-[calc(100vw-2rem)] p-0",align:"center",sideOffset:8,children:[r.jsxs(Yn,{shouldFilter:!1,defaultValue:ht,children:[r.jsx(Qn,{value:M,onValueChange:U,placeholder:e("sandbox.preview.searchPagesAndComponents")}),r.jsxs(Jn,{className:"max-h-80",children:[r.jsx(Xn,{children:De.length===0&&jt.length===0&&ln.length===0?e("sandbox.preview.noPagesFound"):e("sandbox.preview.noSearchResults")}),an.length>0&&r.jsx(rt,{children:an.map(i=>r.jsxs(st,{value:`page:${i.key}`,"aria-current":ht===`page:${i.key}`||void 0,title:`${i.name} · ${i.path}`,onSelect:()=>{pt(),Pn(i)},className:"gap-3 px-3 py-2.5 aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:i.name}),r.jsx("span",{className:"min-w-0 max-w-1/2 truncate text-right font-mono text-xs text-muted-foreground",children:i.path})]},i.key))}),on.length>0&&r.jsx(rt,{heading:e("sandbox.preview.globalComponents"),children:on.map(i=>r.jsx(st,{value:`section:${i.key}`,"aria-current":ht===`section:${i.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),Mr(i)},children:r.jsx("span",{className:"truncate",children:i.name})},i.key))}),cn.length>0&&r.jsx(rt,{heading:e("sandbox.preview.globalLoaders"),children:cn.map(i=>r.jsx(st,{value:`loader:${i.key}`,"aria-current":ht===`loader:${i.key}`||void 0,className:"aria-[current=true]:bg-accent aria-[current=true]:text-accent-foreground",onSelect:()=>{pt(),Ir(i)},children:r.jsx("span",{className:"truncate",children:i.title})},i.key))})]})]}),!q&&!J&&at(G).some(i=>i.type!=="text")&&r.jsx("div",{className:"flex flex-wrap items-center gap-1 border-t px-3 py-3 text-xs text-muted-foreground",children:at(G).map((i,m)=>{if(i.type==="text")return r.jsx("span",{children:i.text},`text-${m}`);const R=Ct[i.name];return R&<?r.jsx(Ya,{sources:R,template:G,paramName:i.name,value:qe[i.name]??"",sandboxRef:lt,onCommit:A=>Bt(i.name,A)},`${H}:${i.name}`):r.jsx(oi,{name:i.name,value:qe[i.name]??"",onCommit:A=>Bt(i.name,A)},`${H}:${i.name}`)})}),r.jsx("div",{className:"border-t p-1.5",children:r.jsxs(He,{variant:"ghost",className:"w-full justify-start",onClick:()=>{pt(),V(void 0),O(!0)},children:[r.jsx(ms,{size:16}),e("sandbox.preview.createNewPage")]})})]})]}):r.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:$r}):null,Sn=ft||p?r.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[r.jsxs(Kt,{children:[r.jsx(zt,{asChild:!0,children:r.jsx(et,{onClick:Fr,"aria-label":e(Wn[w]),children:w==="mobile"?r.jsx(is,{size:16}):w==="tablet"?r.jsx(os,{size:16}):r.jsx(ls,{size:16})})}),r.jsx(Ut,{children:e(Wn[w])})]}),Ur,r.jsx("div",{className:"flex shrink-0 items-center gap-1",children:r.jsx(et,{onClick:()=>{Rr()},"aria-label":e(Nr),children:r.jsx(Gn,{size:16})})})]}):null,Hr=L.mode==="sandbox",gt=Ci[w],vt=w==="desktop"&&(T.width===0||T.width>=gt.width+2*Hn),En=vt?1:Math.min(T.width>0?T.width/(gt.width+2*Hn):1,1),Wr=vt?{width:"100%",height:"100%"}:{width:`${gt.width}px`,height:T.height>0?`${T.height/En}px`:`${gt.height}px`,transform:`scale(${En})`,transformOrigin:"top center"},jn=r.jsxs(r.Fragment,{children:[Hr&&(ft||p)&&r.jsx(et,{onClick:Dr,"aria-pressed":le==="visual","aria-label":e("sandbox.preview.visualEditor"),active:le==="visual",children:r.jsx(Rn,{size:16})}),f&&r.jsxs(Kt,{children:[r.jsx(zt,{asChild:!0,children:r.jsx(et,{onClick:Br,"aria-pressed":le==="blocks","aria-label":e("sandbox.preview.blocksEditor"),active:le==="blocks",children:r.jsx(cs,{size:16})})}),r.jsx(Ut,{children:e("sandbox.preview.blocksEditor")})]}),Ve&&r.jsxs(Kt,{children:[r.jsx(zt,{asChild:!0,children:r.jsx(et,{onClick:$,"aria-pressed":_,"aria-label":e("sectionsEditor.sectionsEditor.viewJson"),active:_,children:r.jsx(ds,{size:16})})}),r.jsx(Ut,{children:e("sectionsEditor.sectionsEditor.viewJson")})]})]}),Vr=!!J&&le==="blocks";return r.jsxs("div",{className:"flex flex-col w-full h-full",children:[lt&&Object.entries(Ct).map(([i,m])=>(qe[i]??"")===""?r.jsx(ai,{sources:m,template:G,paramName:i,sandboxRef:lt,onFill:R=>Bt(i,R)},`${H}:${i}`):null),r.jsxs(r.Fragment,{children:[r.jsx(Nn.Toolbar.Center.Portal,{fallback:r.jsx("div",{className:"flex min-w-0 items-center justify-center border-b p-2",children:Sn}),children:Sn}),r.jsx(Nn.Toolbar.Right.Portal,{fallback:jn,children:jn})]}),r.jsx("div",{className:"flex-1 overflow-hidden relative",children:Vr?r.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[r.jsx(zn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:$}),_&&Ve&&r.jsx("div",{className:"absolute inset-0 z-10",children:r.jsx(Un,{ref:F,virtualMcpId:t,pageKey:Ve,onClose:K})})]}):r.jsxs(_n,{orientation:"horizontal",disabled:le!=="blocks",className:"relative isolate",children:[r.jsx(xt,{ref:E,id:"preview-blocks-editor",defaultSize:le==="blocks"?"30%":"0%",minSize:"20%",collapsible:!0,collapsedSize:"0%",className:"min-w-0 overflow-hidden",children:le==="blocks"&&r.jsx(zn,{virtualMcpId:t,externalSelection:y,onViewJsonFile:$})}),le==="blocks"&&r.jsx(An,{withHandle:!0}),r.jsx(xt,{id:"preview-canvas",defaultSize:le==="blocks"?"70%":"100%",minSize:"35%",className:"min-w-0 overflow-hidden relative z-0",children:r.jsxs(_n,{orientation:"horizontal",disabled:!(_&&Ve),children:[r.jsx(xt,{id:"preview-canvas-inner",minSize:"30%",className:"min-w-0 overflow-hidden",children:r.jsxs("div",{ref:i=>{if(!i)return;const m=()=>D(A=>A.width===i.clientWidth&&A.height===i.clientHeight?A:{width:i.clientWidth,height:i.clientHeight});m();const R=new ResizeObserver(m);return R.observe(i),()=>R.disconnect()},className:It("h-full relative overflow-clip flex justify-center",ct&&!vt&&"bg-muted/30"),children:[(de||wr)&&ct&&r.jsx("div",{className:"absolute inset-x-0 top-0 z-40 h-1 overflow-hidden",children:r.jsx("div",{className:"absolute inset-y-0 left-0 rounded-r-full bg-brand shadow-[0_0_6px] shadow-brand/60 animate-preview-ramp"})}),L.showBlockingOverlay&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Wt,{kind:"starting",progress:fn,claimPhase:Ot})}),!xe&&Ke.kind==="suspended"&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Wt,{kind:"suspended",onResume:Le.resume})}),!xe&&Ke.kind==="errored"&&r.jsx("div",{className:"absolute inset-0 z-30",children:r.jsx(Wt,{kind:"errored",error:Ke.error,onRetry:Le.retry,connectionsHref:`/${he.slug}/settings/connections`})}),L.showWakingPill&&r.jsxs("div",{className:"absolute top-4 left-1/2 z-20 flex max-w-md -translate-x-1/2 items-start gap-3 rounded-xl border border-border bg-muted px-4 py-3 shadow-lg pointer-events-none select-none",children:[r.jsx(Pt,{className:"size-4.5 mt-0.5 shrink-0 text-muted-foreground"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsx("span",{className:"text-sm font-medium text-foreground",children:e("sandbox.preview.startingPreview")}),r.jsx("span",{className:"text-xs text-muted-foreground",children:e("sandbox.preview.startingPreviewHint")})]})]}),le==="visual"&&!S&&r.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-20 flex items-center gap-1.5 rounded-full border border-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:[r.jsx(Rn,{size:12}),e("sandbox.preview.clickElementToAsk")]}),le==="visual"&&S&&r.jsx(Sa,{element:S,onDismiss:()=>N(null)}),ct&&Re&&r.jsx("div",{className:It("shrink-0",!vt&&"border-x border-border bg-background shadow-sm"),style:Wr,onMouseLeave:Ar,children:r.jsx("iframe",{ref:v,src:Re,className:"w-full h-full border-0",title:e("sandbox.preview.devServerPreviewTitle"),onError:xn.handleError,onLoad:()=>{if(xn.handleLoad(),pe(),L.mode!=="sandbox"||xe){(L.mode==="production"&&!L.showWakingPill||xe)&&le==="blocks"&&Dt();return}if(Xr("vm_preview_loaded",{view_mode:le,vm_id:Oe?.sandboxHandle??null}),!q)try{const i=v.current?.contentWindow?.location?.pathname;if(!i)return;const m=je.current;if(m!==null&&(je.current=null,Be(i)!==Be(m))||Be(i)===Be(ke))return;ae(i),ut({path:i,pageKey:ge,params:qe})}catch{}le==="visual"&&kn(),le==="blocks"&&Dt()}},L.iframeBase)})]})}),_&&Ve&&r.jsxs(r.Fragment,{children:[r.jsx(An,{withHandle:!0}),r.jsx(xt,{id:"preview-json-editor",defaultSize:"43%",minSize:"20%",className:"min-w-0 overflow-hidden",children:r.jsx(Un,{ref:F,virtualMcpId:t,pageKey:Ve,onClose:K})})]})]})})]})}),r.jsx(mi,{open:ee,onOpenChange:O,isPending:Xe.isPending,error:ne,templates:De,onSubmit:Kr})]})}function Di(t){const e=fe.c(22),{virtualMcpId:n}=t,s=Ne(),a=vs(n),{activeTask:u,taskId:d,currentBranch:o}=St(),l=da(d),[c,h]=g.useState(!1);if(ca({threadId:d,sandboxBranch:u?.branch??o,agentHasRepo:Vt(a?.metadata),threadHasRepo:Vt(l)||Vt(u?.metadata)})==="none"){let P;e[0]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:r.jsx(Dn,{className:"size-7 text-foreground"})}),e[0]=P):P=e[0];let x;e[1]!==s?(x=s("mainPanelTabs.previewTab.noSourceToPreview"),e[1]=s,e[2]=x):x=e[2];let w;e[3]!==s?(w=s("mainPanelTabs.previewTab.connectGithubDescription"),e[3]=s,e[4]=w):w=e[4];let b,S;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>h(!0),S=r.jsx(Dn,{className:"size-4"}),e[5]=b,e[6]=S):(b=e[5],S=e[6]);let N;e[7]!==s?(N=s("mainPanelTabs.previewTab.connectGithub"),e[7]=s,e[8]=N):N=e[8];let y;e[9]!==N?(y=r.jsxs(He,{onClick:b,children:[S,N]}),e[9]=N,e[10]=y):y=e[10];let k;e[11]!==x||e[12]!==w||e[13]!==y?(k=r.jsx(nn,{className:"h-full",image:P,title:x,description:w,actions:y}),e[11]=x,e[12]=w,e[13]=y,e[14]=k):k=e[14];let v;e[15]!==c?(v=r.jsx(la,{open:c,onOpenChange:h,mode:"agent"}),e[15]=c,e[16]=v):v=e[16];let E;return e[17]!==k||e[18]!==v?(E=r.jsxs(r.Fragment,{children:[k,v]}),e[17]=k,e[18]=v,e[19]=E):E=e[19],E}let f;return e[20]!==n?(f=r.jsx(Ai,{virtualMcpId:n}),e[20]=n,e[21]=f):f=e[21],f}function Xc(){const t=fe.c(2),e=ua();let n;return t[0]!==e?(n=r.jsx(Zr,{tabId:"site-editor",children:r.jsx(es,{feature:"cms",children:r.jsx(Di,{virtualMcpId:e})})}),t[0]=e,t[1]=n):n=t[1],n}export{Xc as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as s,j as e,M as l}from"./index-BjrR9kZj.js";import{ChatLayout as u}from"./index-DSi-K9mm.js";import{AppViewContent as c}from"./project-app-view-CwbZ9tdF.js";import{S as d}from"./settings-tab-C7fwvrln.js";import{a as f}from"./use-virtual-mcp-BHM7_O3U.js";import"./use-mobile-DN-7qwao.js";import"./thread-button-D9YdtqqV.js";import"./use-in-settings-GZqf01My.js";import"./sheet-CBJ9Lsc2.js";import"./X-DMAiKm4q.js";import"./tooltip-a6VXOqQI.js";import"./index-BExO8BBu.js";import"./thread-route-V1sEHiBY.js";import"./use-panel-navigate-fIPDxYtj.js";import"./use-project-scope-DnsWGMAI.js";import"./github-repo-BknN0SVI.js";import"./use-route-default-main-CgrCIrJm.js";import"./hooks-DkDt1nFE.js";import"./use-mcp-client-_RtWTLxt.js";import"./auth-yECgQ-YG.js";import"./backoff-8mStPHYB.js";import"./task-board-D00YvbAx.js";import"./schema-DR6HLXFs.js";import"./agent-icon-8fIO3moM.js";import"./AlertCircle-B6v6clUp.js";import"./Tool01-Cc10eS4M.js";import"./ArrowUp-Cwnen55n.js";import"./ArrowLeft-DDW5by-5.js";import"./ArrowRight-b4OSvT38.js";import"./ZoomOut-BWWdIPu7.js";import"./Globe04-BKigapNa.js";import"./CheckCircle-MH252tOY.js";import"./Check-BcWDZio0.js";import"./ChevronUp-zgSkYMxJ.js";import"./UserSquare-BcjGTyJF.js";import"./Copy01-B1NOvXZB.js";import"./CreditCard01-BZsA4Hwc.js";import"./DotsVertical-Bl1hnuJi.js";import"./Eye-BbaBeCZ5.js";import"./Share07-Cs13DReE.js";import"./XClose-BNpVIYKH.js";import"./Image01-w2ZWkVaa.js";import"./Key01-DT2DLjDU.js";import"./LayoutLeft-DmPeVi4U.js";import"./Link01-CwAzoHCm.js";import"./LinkExternal01-BVro7p0d.js";import"./Monitor01-BXGpB3DU.js";import"./Sun-Cvn5rNir.js";import"./Palette-p6gpXB43.js";import"./Plus-CPRr8eLA.js";import"./SearchMd-DmrZ8tNb.js";import"./Trash01-BUFUahy8.js";import"./Upload01-BYDz7chj.js";import"./User01-jkNTFSxf.js";import"./Users01-CnASZBXO.js";import"./Zap-YBE6LDnX.js";import"./toolbar-icon-button-dJwApEoN.js";import"./shell-layout-CVhVAInm.js";import"./avatar-BWIF2BFh.js";import"./download-app-dialog-REdgjDQr.js";import"./dialog-BGQjuyIa.js";import"./command-CzEVwgKB.js";import"./index-DvDGTSZO.js";import"./integration-icon-DpzEVv6e.js";import"./project-icon-Cr4yXuUg.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-DY_cdaIx.js";import"./autosend-CBLCn5Df.js";import"./use-org-sso-CFSNXhow.js";import"./resizable-BtDH_0Vi.js";import"./route-page-header-BWvRqVR5.js";import"./gateway-client-BA28nWtn.js";import"./tool-namespace-DmnQIdtF.js";import"./use-mcp-tools-DCl_jTFW.js";import"./sandbox-lifecycle-context-ir4poExj.js";import"./use-session-runtime-BSZZ8HIC.js";import"./thread-intent-Dk6BvhGr.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-BiOtKn7P.js";import"./use-entitlements-DWdxlnxk.js";import"./use-ai-providers-OcKKapmz.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-DAkmyAjs.js";import"./use-organization-settings-BxxGkCBh.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Bcpidv6E.js";import"./types-CuuumKKW.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-d9HKC-0k.js";import"./companions-core-BnuxEm_5.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C8GSbvaz.js";import"./form-DTmMHLRx.js";import"./label-68C0kM-R.js";import"./input-DFe835A1.js";import"./use-debounced-value-B18TIcGd.js";import"./provision-repo-scoped-github-connection-B6zdkC6p.js";import"./useQueries-lLlYiC7p.js";import"./authenticate-and-persist-oauth-Cdoq_uUT.js";import"./mcp-oauth-BMxlsP2O.js";import"./track-DIm5D0FO.js";import"./extract-connection-data-D4h0y4EU.js";import"./connection-BY8-KaA4.js";import"./build-improve-prompt-doc-HGUNWQ_n.js";import"./empty-state-CzE4b4zD.js";import"./use-date-fns-locale-B8wxfqnW.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-connection-C8UZsu8O.js";import"./alert-dialog-mXuhGOeD.js";import"./textarea-DcUTXKBn.js";import"./use-debounced-autosave-BPjq0zWT.js";import"./add-connection-dialog-C9-7gsrE.js";import"./collection-search-BvnUba7J.js";import"./connection-card-B4bw8HCo.js";import"./useInfiniteQuery-BBFjBKxn.js";import"./infiniteQueryObserver-DFZOc4R3.js";import"./connection-slug-CITJ0kGN.js";import"./drawer-B-c-ivso.js";import"./select-DfRa6U-n.js";import"./connection-form-helpers-DMj6bxTF.js";import"./collection-tabs--W1A2Kno.js";import"./badge-MUYSitCi.js";import"./use-infinite-scroll-BPlWiH_j.js";import"./useSuspenseInfiniteQuery-xG_Af635.js";import"./file-type-icon-9ZD-EW4g.js";import"./use-org-fs-DORLuh0o.js";import"./checkbox-iCK8-YOo.js";import"./search-input-CFuVSdCR.js";import"./use-mcp-auth-status-DVw_h1d5.js";import"./use-mcp-prompts-DeRVqq5E.js";import"./utils-CVEq3hMx.js";import"./switch-tss5J5qD.js";import"./popover-Bfdv1gl-.js";import"./scroll-area-C2I8c9NJ.js";import"./use-project-native-view-presence-qb6mZmmd.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-D3FQo26s.js";import"./site-slug-DebpOoQq.js";import"./optimistic-project-sidebar-views-Dd7Kmc6p.js";import"./virtual-mcp-IurQ91Dd.js";import"./repository-import-picker-BAZ9mPpT.js";import"./use-navigate-to-agent-D1O3uESn.js";import"./repository-picker-D-TogGEt.js";import"./github-icon-D1YjVdXZ.js";import"./secret-picker-DvWxSNYJ.js";import"./use-secrets-B2ml5euf.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 ei(){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{ei as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as l,N as d,J as p,M as m}from"./index-
|
|
1
|
+
import{c as g,j as l,N as d,J as p,M as m}from"./index-BjrR9kZj.js";import{u as f}from"./use-main-panel-tabs-Box7rwH3.js";import{a as I}from"./thread-route-V1sEHiBY.js";import{r as h}from"./use-panel-navigate-fIPDxYtj.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};
|